diff --git a/dist/addons/worldMap.js b/dist/addons/worldMap.js index 26647bb9..b8406bf3 100644 --- a/dist/addons/worldMap.js +++ b/dist/addons/worldMap.js @@ -1,4 +1,10 @@ "use strict"; +/*** + * Highcharts map widget + * MDX should return data in format: + * ['Iceland', 1000, 'Madagascar', 2000, 'Venezuela': 500] + * Names should be equal to GeoJSON `name` field + */ var WorldMap_1; Object.defineProperty(exports, "__esModule", { value: true }); exports.WorldMap = void 0; @@ -92,6 +98,10 @@ let WorldMap = class WorldMap extends base_chart_class_1.BaseChartClass { // TODO: solve kpi fired twice this.hideLoading(); const d = []; + if (typeof data.Data[0] !== 'string' || isNaN(parseFloat(data.Data[1]))) { + console.error('Input data for map in wrong format. Make sure that MDX returns data in supported format, eg. [\'Iceland\', 1000, \'Madagascar\', 2000, \'Venezuela\': 500]'); + console.error('Current format is: [', data.Data[0], ',', data.Data[1], ']'); + } for (let i = 0; i < data.Data.length; i += 2) { d.push({ key: data.Data[i], value: data.Data[i + 1] }); } diff --git a/dist/changelog.md b/dist/changelog.md index 1f61004e..b6ac666e 100644 --- a/dist/changelog.md +++ b/dist/changelog.md @@ -1,8 +1,10 @@ -#### 4.0.3 beta +#### 4.0.3 * fixed issue with missing back button after drilldown in pivot table * fixed issue with back button after back from drillthrough * fixed issue with missing gauges charts * fixed issue with switch data source control and first element in list +* fixed issue with treemap labels (#436) +* added notes about data format for map addon widget #### 4.0.2 beta * fixed issue with treemap diff --git a/dist/chunk-FPNTFAD5.js b/dist/chunk-7YLZYSB4.js similarity index 98% rename from dist/chunk-FPNTFAD5.js rename to dist/chunk-7YLZYSB4.js index 991e1eed..103e8111 100644 --- a/dist/chunk-FPNTFAD5.js +++ b/dist/chunk-7YLZYSB4.js @@ -1 +1 @@ -import{a as Y}from"./chunk-KT37IQUX.js";import{a as K}from"./chunk-VHTVZWVH.js";import{a as Q}from"./chunk-EB65ROO7.js";import{a as U,b as X}from"./chunk-UR6JO2ME.js";import{a as G}from"./chunk-EAEBZZLM.js";import"./chunk-4G2GW5IL.js";import"./chunk-RNWIIYZZ.js";import{a as J}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{b as N,d as R,e as z,j as q}from"./chunk-4NDDWB77.js";import{D as V,F as T,H as j,J as $,c as A,s as D,w as H}from"./chunk-B3AVEPVB.js";import{$a as l,$b as E,Ab as C,B as S,Bb as w,Bc as W,Cb as y,Db as r,Eb as c,Jb as F,Nb as _,Ob as h,Xb as g,Yb as m,Zb as B,_b as M,ab as p,ac as O,cc as L,fa as I,hc as b,ic as f,qa as x,ra as v,tb as P,vb as k,wb as u}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function ee(a,o){if(a&1){let s=F();r(0,"div",7),_("click",function(){let i=x(s).$index,e=h();return v(e.setTileColor(i))}),c()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("color-rect "+s),k("active",i.tile.color==t)}}function te(a,o){if(a&1){let s=F();r(0,"div",7),_("click",function(){let i=x(s).$index,e=h();return v(e.setFontColor(i))}),r(1,"span"),g(2,"A"),c()()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("color-rect "+s+" "+i.model.colors[i.tile.color]),k("active",i.tile.fontColor==t),l(),u(s)}}function ie(a,o){if(a&1){let s=F();r(0,"div",8),_("click",function(){let i=x(s).$index,e=h();return v(e.setIcon(i))}),c()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("cl"+i.tile.color+" "+(i.tile.icon==t?"active":"")),P("ngClass",s)}}var Ce=(()=>{let o=class o{constructor(t,i,e,d,n,Z){this.ds=t,this.ms=i,this.sbs=e,this.st=d,this.router=n,this.cdr=Z,this.tiles=[],this.folder="",this.model={colors:T.const.bgColorClasses,fontColors:T.const.fontColors,icons:T.const.icons,widgetList:[]},this.originalTiles="",this.subRouteChange=this.router.events.pipe(Q())}get tile(){return this._tile}set tile(t){let i=t!==this._tile;this._tile=t,i&&this.requestWidgetList()}ngOnInit(){this.subscribeForRouteChange(),this.saveOriginalTiles(),this.requestWidgetList()}ngOnDestroy(){this.ms.onEditDashboard.emit(!1)}saveTiles(){let t=this.st.getTilesSettings();for(let i=0;ithis.tiles.push(i))}requestWidgetList(){this.model.widgetList=[],this.tile&&!this.tile.isFolder&&this.ds.getWidgets(this.tile.fullPath).then(t=>this.fillWidgetList(t))}fillWidgetList(t){t&&(this.model.widgetList=t.widgets.map((i,e)=>({idx:e,name:i.title||i.name})),this.model.widgetList=[{idx:-1,name:""},...this.model.widgetList],this.cdr.detectChanges())}subscribeForRouteChange(){this.subRouteChange.pipe(S(t=>t instanceof D)).subscribe(()=>this.onCancelEditing())}};o.\u0275fac=function(i){return new(i||o)(p(j),p(G),p(J),p($),p(H),p(W))},o.\u0275cmp=I({type:o,selectors:[["dsw-home-editor"]],inputs:{tiles:"tiles",folder:"folder",tile:"tile"},standalone:!0,features:[L],decls:30,vars:23,consts:[[3,"apply","cancel"],[1,"container"],[3,"ngModelChange","ngModel"],[3,"active","class"],[1,"color-rect",3,"ngClass","class"],["bindLabel","name","bindValue","idx",1,"dsw",3,"ngModelChange","ngModel","clearable","items"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"click"],[1,"color-rect",3,"click","ngClass"]],template:function(i,e){i&1&&(r(0,"dsw-sidebar-actions",0),_("apply",function(){return e.onSaveTiles()})("cancel",function(){return e.onCancelEditing()}),g(1,"Edit dashboard"),c(),r(2,"div",1)(3,"label"),g(4),b(5,"i18n"),c(),r(6,"dsw-input",2),O("ngModelChange",function(n){return E(e.tile.customTitle,n)||(e.tile.customTitle=n),n}),c(),r(7,"label"),g(8),b(9,"i18n"),c(),w(10,ee,1,4,"div",3,C),r(12,"label"),g(13),b(14,"i18n"),c(),w(15,te,3,6,"div",3,C),r(17,"label"),g(18),b(19,"i18n"),c(),w(20,ie,1,3,"div",4,C),r(22,"label"),g(23),b(24,"i18n"),c(),r(25,"ng-select",5),O("ngModelChange",function(n){return E(e.tile.widget,n)||(e.tile.widget=n),n}),c(),r(26,"label"),g(27),b(28,"i18n"),r(29,"input",6),O("ngModelChange",function(n){return E(e.tile.hideTitle,n)||(e.tile.hideTitle=n),n}),c()()()),i&2&&(l(4),m(f(5,11,"title")),l(2),M("ngModel",e.tile.customTitle),l(2),m(f(9,13,"bgColor")),l(2),y(e.model.colors),l(3),m(f(14,15,"fntColor")),l(2),y(e.model.fontColors),l(3),m(f(19,17,"icon")),l(2),y(e.model.icons),l(3),m(f(24,19,"widget")),l(2),M("ngModel",e.tile.widget),P("clearable",!1)("items",e.model.widgetList),l(2),B("",f(28,21,"hideTitle")," "),l(2),M("ngModel",e.tile.hideTitle))},dependencies:[K,Y,q,N,R,z,X,U,V,A],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}","[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;outline:none;display:inline}input[type=checkbox][_ngcontent-%COMP%]:focus, input[type=checkbox][_ngcontent-%COMP%]:active{outline:none}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}"],changeDetection:0});let a=o;return a})();export{Ce as HomeEditorComponent}; +import{a as Y}from"./chunk-KT37IQUX.js";import{a as K}from"./chunk-PPMZCCVB.js";import{a as Q}from"./chunk-EB65ROO7.js";import{a as U,b as X}from"./chunk-UR6JO2ME.js";import{a as G}from"./chunk-EAEBZZLM.js";import"./chunk-J6F3GFQR.js";import"./chunk-RNWIIYZZ.js";import{a as J}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{b as N,d as R,e as z,j as q}from"./chunk-4NDDWB77.js";import{D as V,F as T,H as j,J as $,c as A,s as D,w as H}from"./chunk-B3AVEPVB.js";import{$a as l,$b as E,Ab as C,B as S,Bb as w,Bc as W,Cb as y,Db as r,Eb as c,Jb as F,Nb as _,Ob as h,Xb as g,Yb as m,Zb as B,_b as M,ab as p,ac as O,cc as L,fa as I,hc as b,ic as f,qa as x,ra as v,tb as P,vb as k,wb as u}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function ee(a,o){if(a&1){let s=F();r(0,"div",7),_("click",function(){let i=x(s).$index,e=h();return v(e.setTileColor(i))}),c()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("color-rect "+s),k("active",i.tile.color==t)}}function te(a,o){if(a&1){let s=F();r(0,"div",7),_("click",function(){let i=x(s).$index,e=h();return v(e.setFontColor(i))}),r(1,"span"),g(2,"A"),c()()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("color-rect "+s+" "+i.model.colors[i.tile.color]),k("active",i.tile.fontColor==t),l(),u(s)}}function ie(a,o){if(a&1){let s=F();r(0,"div",8),_("click",function(){let i=x(s).$index,e=h();return v(e.setIcon(i))}),c()}if(a&2){let s=o.$implicit,t=o.$index,i=h();u("cl"+i.tile.color+" "+(i.tile.icon==t?"active":"")),P("ngClass",s)}}var Ce=(()=>{let o=class o{constructor(t,i,e,d,n,Z){this.ds=t,this.ms=i,this.sbs=e,this.st=d,this.router=n,this.cdr=Z,this.tiles=[],this.folder="",this.model={colors:T.const.bgColorClasses,fontColors:T.const.fontColors,icons:T.const.icons,widgetList:[]},this.originalTiles="",this.subRouteChange=this.router.events.pipe(Q())}get tile(){return this._tile}set tile(t){let i=t!==this._tile;this._tile=t,i&&this.requestWidgetList()}ngOnInit(){this.subscribeForRouteChange(),this.saveOriginalTiles(),this.requestWidgetList()}ngOnDestroy(){this.ms.onEditDashboard.emit(!1)}saveTiles(){let t=this.st.getTilesSettings();for(let i=0;ithis.tiles.push(i))}requestWidgetList(){this.model.widgetList=[],this.tile&&!this.tile.isFolder&&this.ds.getWidgets(this.tile.fullPath).then(t=>this.fillWidgetList(t))}fillWidgetList(t){t&&(this.model.widgetList=t.widgets.map((i,e)=>({idx:e,name:i.title||i.name})),this.model.widgetList=[{idx:-1,name:""},...this.model.widgetList],this.cdr.detectChanges())}subscribeForRouteChange(){this.subRouteChange.pipe(S(t=>t instanceof D)).subscribe(()=>this.onCancelEditing())}};o.\u0275fac=function(i){return new(i||o)(p(j),p(G),p(J),p($),p(H),p(W))},o.\u0275cmp=I({type:o,selectors:[["dsw-home-editor"]],inputs:{tiles:"tiles",folder:"folder",tile:"tile"},standalone:!0,features:[L],decls:30,vars:23,consts:[[3,"apply","cancel"],[1,"container"],[3,"ngModelChange","ngModel"],[3,"active","class"],[1,"color-rect",3,"ngClass","class"],["bindLabel","name","bindValue","idx",1,"dsw",3,"ngModelChange","ngModel","clearable","items"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"click"],[1,"color-rect",3,"click","ngClass"]],template:function(i,e){i&1&&(r(0,"dsw-sidebar-actions",0),_("apply",function(){return e.onSaveTiles()})("cancel",function(){return e.onCancelEditing()}),g(1,"Edit dashboard"),c(),r(2,"div",1)(3,"label"),g(4),b(5,"i18n"),c(),r(6,"dsw-input",2),O("ngModelChange",function(n){return E(e.tile.customTitle,n)||(e.tile.customTitle=n),n}),c(),r(7,"label"),g(8),b(9,"i18n"),c(),w(10,ee,1,4,"div",3,C),r(12,"label"),g(13),b(14,"i18n"),c(),w(15,te,3,6,"div",3,C),r(17,"label"),g(18),b(19,"i18n"),c(),w(20,ie,1,3,"div",4,C),r(22,"label"),g(23),b(24,"i18n"),c(),r(25,"ng-select",5),O("ngModelChange",function(n){return E(e.tile.widget,n)||(e.tile.widget=n),n}),c(),r(26,"label"),g(27),b(28,"i18n"),r(29,"input",6),O("ngModelChange",function(n){return E(e.tile.hideTitle,n)||(e.tile.hideTitle=n),n}),c()()()),i&2&&(l(4),m(f(5,11,"title")),l(2),M("ngModel",e.tile.customTitle),l(2),m(f(9,13,"bgColor")),l(2),y(e.model.colors),l(3),m(f(14,15,"fntColor")),l(2),y(e.model.fontColors),l(3),m(f(19,17,"icon")),l(2),y(e.model.icons),l(3),m(f(24,19,"widget")),l(2),M("ngModel",e.tile.widget),P("clearable",!1)("items",e.model.widgetList),l(2),B("",f(28,21,"hideTitle")," "),l(2),M("ngModel",e.tile.hideTitle))},dependencies:[K,Y,q,N,R,z,X,U,V,A],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}","[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}input[type=checkbox][_ngcontent-%COMP%]{cursor:pointer;outline:none;display:inline}input[type=checkbox][_ngcontent-%COMP%]:focus, input[type=checkbox][_ngcontent-%COMP%]:active{outline:none}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}"],changeDetection:0});let a=o;return a})();export{Ce as HomeEditorComponent}; diff --git a/dist/chunk-F5NR45AW.js b/dist/chunk-BQ3B4VQP.js similarity index 98% rename from dist/chunk-F5NR45AW.js rename to dist/chunk-BQ3B4VQP.js index 5ac5aafc..8f709d3f 100644 --- a/dist/chunk-F5NR45AW.js +++ b/dist/chunk-BQ3B4VQP.js @@ -1,2 +1,2 @@ -import{a as A}from"./chunk-KT37IQUX.js";import{a as I}from"./chunk-VHTVZWVH.js";import{a as N}from"./chunk-EAEBZZLM.js";import{a as j}from"./chunk-4G2GW5IL.js";import{a as D}from"./chunk-RNWIIYZZ.js";import{a as F}from"./chunk-SUAWKU6Z.js";import{b as T}from"./chunk-4CDX576O.js";import{d as W,e as O,i as P,j as k}from"./chunk-4NDDWB77.js";import{F as S}from"./chunk-B3AVEPVB.js";import{$a as p,$b as u,Db as e,Eb as t,Fb as a,Jb as y,Nb as g,Ob as M,Xb as n,_b as h,ab as s,ac as f,cc as E,fa as _,qa as w,ra as v,rb as x,tb as b,yb as C}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function B(m,l){if(m&1){let z=y();e(0,"button",11),g("click",function(){w(z);let o=M();return v(o.deleteWidgetClick())}),n(1,"Delete widget"),t()}}var U=(()=>{let l=class l{constructor(c,o,i,d,r){this.ms=c,this.dbs=o,this.eds=i,this.mds=d,this.sbs=r,this.invalid=[],this.model={edKey:"ed"+new Date().getTime(),dashboard:this.dbs.current.value,name:"",title:"",dataSource:"",type:"pivot",dataLink:"",dataProperties:[],dependents:[],controls:[],mdx:"",x:0,y:0,rows:4,cols:4}}ngOnInit(){this.eds.resetSavedState(),this.widget?(this.model=this.widget,this.widget.oldWidget=JSON.parse(JSON.stringify(this.widget)),this.eds.updateEditedWidget({widget:this.model}),this.eds.resetSavedState()):this.initializeNewWidget()}ngOnDestroy(){this.eds.cancelEditing()}onCancelEditing(){this.close()}onSave(){this.eds.save(this.model)}onTypeAndDataSourceClick(){this.eds.navigateDataSourceAndType(this.model)}updateWidget(){this.eds.updateEditedWidget({widget:this.model})}deleteWidgetClick(){this.eds.deleteWidget(this.model)}close(){this.sbs.hide()}initializeNewWidget(){let c=this.dbs.getWidgets().filter(o=>o.type!==S.const.emptyWidgetClass).length+1;this.model.name=`Widget${c}`,this.eds.onNewWidget.emit(this.model)}};l.\u0275fac=function(o){return new(o||l)(s(N),s(T),s(j),s(D),s(F))},l.\u0275cmp=_({type:l,selectors:[["dsw-widget-editor"]],inputs:{widget:"widget",invalid:"invalid"},standalone:!0,features:[E],decls:37,vars:5,consts:[[3,"cancel","apply","isWidgetEditorWarning"],[1,"container"],[1,"headline"],[3,"ngModelChange","change","required","ngModel"],[3,"ngModelChange","change","ngModel"],[1,"navigation"],[1,"btn-section",3,"click"],["src","assets/img/icons/icon-next-blue.svg"],["title","Not implemented yet",1,"btn-section","disabled"],[1,"footer"],[1,"btn","btn-white"],[1,"btn","btn-white",3,"click"]],template:function(o,i){o&1&&(e(0,"dsw-sidebar-actions",0),g("cancel",function(){return i.onCancelEditing()})("apply",function(){return i.onSave()}),n(1,` Add widget +import{a as A}from"./chunk-KT37IQUX.js";import{a as I}from"./chunk-PPMZCCVB.js";import{a as N}from"./chunk-EAEBZZLM.js";import{a as j}from"./chunk-J6F3GFQR.js";import{a as D}from"./chunk-RNWIIYZZ.js";import{a as F}from"./chunk-SUAWKU6Z.js";import{b as T}from"./chunk-4CDX576O.js";import{d as W,e as O,i as P,j as k}from"./chunk-4NDDWB77.js";import{F as S}from"./chunk-B3AVEPVB.js";import{$a as p,$b as u,Db as e,Eb as t,Fb as a,Jb as y,Nb as g,Ob as M,Xb as n,_b as h,ab as s,ac as f,cc as E,fa as _,qa as w,ra as v,rb as x,tb as b,yb as C}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function B(m,l){if(m&1){let z=y();e(0,"button",11),g("click",function(){w(z);let o=M();return v(o.deleteWidgetClick())}),n(1,"Delete widget"),t()}}var U=(()=>{let l=class l{constructor(c,o,i,d,r){this.ms=c,this.dbs=o,this.eds=i,this.mds=d,this.sbs=r,this.invalid=[],this.model={edKey:"ed"+new Date().getTime(),dashboard:this.dbs.current.value,name:"",title:"",dataSource:"",type:"pivot",dataLink:"",dataProperties:[],dependents:[],controls:[],mdx:"",x:0,y:0,rows:4,cols:4}}ngOnInit(){this.eds.resetSavedState(),this.widget?(this.model=this.widget,this.widget.oldWidget=JSON.parse(JSON.stringify(this.widget)),this.eds.updateEditedWidget({widget:this.model}),this.eds.resetSavedState()):this.initializeNewWidget()}ngOnDestroy(){this.eds.cancelEditing()}onCancelEditing(){this.close()}onSave(){this.eds.save(this.model)}onTypeAndDataSourceClick(){this.eds.navigateDataSourceAndType(this.model)}updateWidget(){this.eds.updateEditedWidget({widget:this.model})}deleteWidgetClick(){this.eds.deleteWidget(this.model)}close(){this.sbs.hide()}initializeNewWidget(){let c=this.dbs.getWidgets().filter(o=>o.type!==S.const.emptyWidgetClass).length+1;this.model.name=`Widget${c}`,this.eds.onNewWidget.emit(this.model)}};l.\u0275fac=function(o){return new(o||l)(s(N),s(T),s(j),s(D),s(F))},l.\u0275cmp=_({type:l,selectors:[["dsw-widget-editor"]],inputs:{widget:"widget",invalid:"invalid"},standalone:!0,features:[E],decls:37,vars:5,consts:[[3,"cancel","apply","isWidgetEditorWarning"],[1,"container"],[1,"headline"],[3,"ngModelChange","change","required","ngModel"],[3,"ngModelChange","change","ngModel"],[1,"navigation"],[1,"btn-section",3,"click"],["src","assets/img/icons/icon-next-blue.svg"],["title","Not implemented yet",1,"btn-section","disabled"],[1,"footer"],[1,"btn","btn-white"],[1,"btn","btn-white",3,"click"]],template:function(o,i){o&1&&(e(0,"dsw-sidebar-actions",0),g("cancel",function(){return i.onCancelEditing()})("apply",function(){return i.onSave()}),n(1,` Add widget `),t(),e(2,"div",1)(3,"div",2),n(4," General settings "),t(),e(5,"label"),n(6,"Name"),t(),e(7,"dsw-input",3),f("ngModelChange",function(r){return u(i.model.name,r)||(i.model.name=r),r}),g("change",function(){return i.updateWidget()}),t(),e(8,"label"),n(9,"Title"),t(),e(10,"dsw-input",4),f("ngModelChange",function(r){return u(i.model.title,r)||(i.model.title=r),r}),g("change",function(){return i.updateWidget()}),t(),e(11,"div",5)(12,"button",6),g("click",function(){return i.onTypeAndDataSourceClick()}),n(13," Type and data source "),a(14,"img",7),t(),e(15,"button",8),n(16," Widget settings "),a(17,"img",7),t(),e(18,"button",8),n(19," Controls "),a(20,"img",7),t(),e(21,"button",8),n(22," Data properties "),a(23,"img",7),t(),e(24,"div",2),n(25," Diagram and pivot table "),t(),e(26,"button",8),n(27," Table settings "),a(28,"img",7),t(),e(29,"button",8),n(30," Diagram settings "),a(31,"img",7),t(),e(32,"button",8),n(33," Diagram legend "),a(34,"img",7),t()()(),e(35,"div",9),x(36,B,2,0,"button",10),t()),o&2&&(b("isWidgetEditorWarning",!0),p(7),b("required",i.invalid.includes("name")),h("ngModel",i.model.name),p(3),h("ngModel",i.model.title),p(26),C(i.widget?36:-1))},dependencies:[I,A,k,W,P,O],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}"],changeDetection:0});let m=l;return m})();export{U as WidgetEditorComponent}; diff --git a/dist/chunk-T32QXP2R.js b/dist/chunk-DBFBQG2E.js similarity index 94% rename from dist/chunk-T32QXP2R.js rename to dist/chunk-DBFBQG2E.js index 5a1b1e45..f46ee8bf 100644 --- a/dist/chunk-T32QXP2R.js +++ b/dist/chunk-DBFBQG2E.js @@ -1 +1 @@ -import{a as h}from"./chunk-SUAWKU6Z.js";import{Db as t,Eb as n,Fb as i,Nb as r,Xb as c,ab as p,cc as b,fa as g}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";var u=(()=>{let e=class e{constructor(l){this.sbs=l}ngOnInit(){}showThemeSettings(){this.sbs.showComponent({component:import("./chunk-QFEJNEA2.js")})}showAppSettings(){this.sbs.showComponent({component:import("./chunk-OUKRRTVO.js")})}showChartsSettings(){this.sbs.showComponent({component:import("./chunk-BRSXYDLD.js")})}};e.\u0275fac=function(a){return new(a||e)(p(h))},e.\u0275cmp=g({type:e,selectors:[["dsw-menu-settings"]],standalone:!0,features:[b],decls:10,vars:0,consts:[[3,"click"],["src","assets/img/icons/icon-settings.svg"],["src","assets/img/icons/palette-icon.svg"],["src","assets/img/icons/top-records.svg"]],template:function(a,s){a&1&&(t(0,"ul")(1,"li",0),r("click",function(){return s.showAppSettings()}),i(2,"img",1),c(3," Application "),n(),t(4,"li",0),r("click",function(){return s.showThemeSettings()}),i(5,"img",2),c(6," Theme "),n(),t(7,"li",0),r("click",function(){return s.showChartsSettings()}),i(8,"img",3),c(9," Charts "),n()())},styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;display:block;height:100%;-webkit-user-select:none;user-select:none}ul[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:30px 0 0}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}li[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;font-family:Oxygen;color:var(--cl-header-txt);font-size:14px;background-color:var(--cl-sidebar-bg);cursor:pointer;transition:background-color .3s linear;white-space:nowrap;padding:10px 15px 10px 40px;border-radius:0 40px 40px 0}li[_ngcontent-%COMP%]:hover{background-color:var(--cl-hover)}li[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin-right:15px;min-width:18px}li[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:8px}li[_ngcontent-%COMP%]:hover > img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .3s;animation-timing-function:linear}li[_ngcontent-%COMP%]:after{display:block;content:" ";position:absolute;bottom:0;height:1px;left:10px;right:10px;opacity:.2}.version[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-family:Oxygen;font-size:9px;padding:6px;color:var(--cl-header-txt)}.spinner[_ngcontent-%COMP%]{margin-left:86px}.divider[_ngcontent-%COMP%]{height:1px;width:100%;background-color:var(--cl-header-border)}']});let o=e;return o})();export{u as MenuSettingsComponent}; +import{a as h}from"./chunk-SUAWKU6Z.js";import{Db as t,Eb as n,Fb as i,Nb as r,Xb as c,ab as p,cc as b,fa as g}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";var u=(()=>{let e=class e{constructor(l){this.sbs=l}ngOnInit(){}showThemeSettings(){this.sbs.showComponent({component:import("./chunk-QHADAE3C.js")})}showAppSettings(){this.sbs.showComponent({component:import("./chunk-PSGSOQBK.js")})}showChartsSettings(){this.sbs.showComponent({component:import("./chunk-LZIODW2A.js")})}};e.\u0275fac=function(a){return new(a||e)(p(h))},e.\u0275cmp=g({type:e,selectors:[["dsw-menu-settings"]],standalone:!0,features:[b],decls:10,vars:0,consts:[[3,"click"],["src","assets/img/icons/icon-settings.svg"],["src","assets/img/icons/palette-icon.svg"],["src","assets/img/icons/top-records.svg"]],template:function(a,s){a&1&&(t(0,"ul")(1,"li",0),r("click",function(){return s.showAppSettings()}),i(2,"img",1),c(3," Application "),n(),t(4,"li",0),r("click",function(){return s.showThemeSettings()}),i(5,"img",2),c(6," Theme "),n(),t(7,"li",0),r("click",function(){return s.showChartsSettings()}),i(8,"img",3),c(9," Charts "),n()())},styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;display:block;height:100%;-webkit-user-select:none;user-select:none}ul[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:30px 0 0}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}li[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;font-family:Oxygen;color:var(--cl-header-txt);font-size:14px;background-color:var(--cl-sidebar-bg);cursor:pointer;transition:background-color .3s linear;white-space:nowrap;padding:10px 15px 10px 40px;border-radius:0 40px 40px 0}li[_ngcontent-%COMP%]:hover{background-color:var(--cl-hover)}li[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin-right:15px;min-width:18px}li[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:8px}li[_ngcontent-%COMP%]:hover > img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .3s;animation-timing-function:linear}li[_ngcontent-%COMP%]:after{display:block;content:" ";position:absolute;bottom:0;height:1px;left:10px;right:10px;opacity:.2}.version[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-family:Oxygen;font-size:9px;padding:6px;color:var(--cl-header-txt)}.spinner[_ngcontent-%COMP%]{margin-left:86px}.divider[_ngcontent-%COMP%]{height:1px;width:100%;background-color:var(--cl-header-border)}']});let o=e;return o})();export{u as MenuSettingsComponent}; diff --git a/dist/chunk-4G2GW5IL.js b/dist/chunk-J6F3GFQR.js similarity index 92% rename from dist/chunk-4G2GW5IL.js rename to dist/chunk-J6F3GFQR.js index 7987c91b..3110d9be 100644 --- a/dist/chunk-4G2GW5IL.js +++ b/dist/chunk-J6F3GFQR.js @@ -1 +1 @@ -import{a as b}from"./chunk-RNWIIYZZ.js";import{a as u}from"./chunk-SUAWKU6Z.js";import{a as p,b as f}from"./chunk-4CDX576O.js";import{G as l,H as m}from"./chunk-B3AVEPVB.js";import{Da as n,X as c,aa as a,g as h}from"./chunk-ZKAUCJHV.js";import{h as d}from"./chunk-DEPBX7UX.js";var P=(()=>{let s=class s{constructor(e,t,o,i,g,v){this.dbs=e,this.ms=t,this.sbs=o,this.bs=i,this.es=g,this.ds=v,this.onCancelEditing=new n,this.onNewWidget=new n,this.onEditedWidgetChanged=new n,this.onSave=new n,this.onUnsavedChanged=new h(!1),this.onDeleteWidget=new n}resetSavedState(){this.onUnsavedChanged.next(!1)}unsaved(){this.onUnsavedChanged.next(!0)}getWidgetsList(e=[],t=!0){let o=this.dbs.getWidgetsWithoutEmpty(e).map(i=>({name:i.name,label:i.name+(i.title?` (${i.title})`:"")}));return t?[{label:"",name:""},...o]:o}updateEditedWidget(e){this.unsaved(),e.reCreate&&(e.widget.edKey="ed"+new Date().getTime()),this.onEditedWidgetChanged.emit(e)}cancelEditing(){this.onCancelEditing.emit(),this.resetSavedState()}save(e){if(this.validate(e)){if(this.dbs.generateDisplayInfo(e),!e.dashboard){console.error("no dashboard specified in widget:",e);return}this.ds.saveWidget(e.dashboard,e,e?.oldWidget?.name).then(t=>{this.dbs.saveWidgetPositionAndSize(e),this.onSave.emit(),this.sbs.hide(),this.resetSavedState(),this.bs.broadcast("refresh-dashboard")}).catch(t=>{})}}generateWidgetMdx(e){return d(this,null,function*(){if(e.mdx="",e.kpiclass="",e.kpitype="",!e.dataSource)return;let t=e.dataSource.split(".");if(t.pop()?.toLowerCase()==="kpi")e.kpiclass=t.join("."),e.kpitype="sql";else{let i=yield this.ds.getPivotData(e.dataSource);i&&(e.mdx=i.mdx||"")}})}deleteWidget(e){let t=()=>{this.onDeleteWidget.emit(e),this.sbs.hide()};this.askForWidgetDeletion(e,()=>{e.oldWidget?this.ds.deleteWidget(e.dashboard,e.oldWidget.name).then(()=>{t()}):t()})}navigateDataSourceAndType(e,t=[]){this.sbs.showComponent({component:import("./chunk-KION3GZB.js"),single:!0,inputs:{model:e,invalid:t}})}askForWidgetDeletion(e,t){this.ms.show({message:`Do you really want do delete widget "${e.name}"?`,buttons:[{label:"No",autoClose:!0},{label:"Yes",default:!0,autoClose:!0,click:t}]})}validate(e){if(!e.name){this.es.show("Please enter widget name",!0),this.sbs.showComponent({component:import("./chunk-F5NR45AW.js"),single:!0,inputs:{invalid:["name"]}});return}if(!e.dataSource&&!e.dataLink){this.es.show('Please choose "Data source" or "Reference to"',!0),this.navigateDataSourceAndType(e,["datasource"]);return}return!0}};s.\u0275fac=function(t){return new(t||s)(a(f),a(b),a(u),a(p),a(l),a(m))},s.\u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();export{P as a}; +import{a as b}from"./chunk-RNWIIYZZ.js";import{a as u}from"./chunk-SUAWKU6Z.js";import{a as p,b as f}from"./chunk-4CDX576O.js";import{G as l,H as m}from"./chunk-B3AVEPVB.js";import{Da as n,X as c,aa as a,g as h}from"./chunk-ZKAUCJHV.js";import{h as d}from"./chunk-DEPBX7UX.js";var P=(()=>{let s=class s{constructor(e,t,o,i,g,v){this.dbs=e,this.ms=t,this.sbs=o,this.bs=i,this.es=g,this.ds=v,this.onCancelEditing=new n,this.onNewWidget=new n,this.onEditedWidgetChanged=new n,this.onSave=new n,this.onUnsavedChanged=new h(!1),this.onDeleteWidget=new n}resetSavedState(){this.onUnsavedChanged.next(!1)}unsaved(){this.onUnsavedChanged.next(!0)}getWidgetsList(e=[],t=!0){let o=this.dbs.getWidgetsWithoutEmpty(e).map(i=>({name:i.name,label:i.name+(i.title?` (${i.title})`:"")}));return t?[{label:"",name:""},...o]:o}updateEditedWidget(e){this.unsaved(),e.reCreate&&(e.widget.edKey="ed"+new Date().getTime()),this.onEditedWidgetChanged.emit(e)}cancelEditing(){this.onCancelEditing.emit(),this.resetSavedState()}save(e){if(this.validate(e)){if(this.dbs.generateDisplayInfo(e),!e.dashboard){console.error("no dashboard specified in widget:",e);return}this.ds.saveWidget(e.dashboard,e,e?.oldWidget?.name).then(t=>{this.dbs.saveWidgetPositionAndSize(e),this.onSave.emit(),this.sbs.hide(),this.resetSavedState(),this.bs.broadcast("refresh-dashboard")}).catch(t=>{})}}generateWidgetMdx(e){return d(this,null,function*(){if(e.mdx="",e.kpiclass="",e.kpitype="",!e.dataSource)return;let t=e.dataSource.split(".");if(t.pop()?.toLowerCase()==="kpi")e.kpiclass=t.join("."),e.kpitype="sql";else{let i=yield this.ds.getPivotData(e.dataSource);i&&(e.mdx=i.mdx||"")}})}deleteWidget(e){let t=()=>{this.onDeleteWidget.emit(e),this.sbs.hide()};this.askForWidgetDeletion(e,()=>{e.oldWidget?this.ds.deleteWidget(e.dashboard,e.oldWidget.name).then(()=>{t()}):t()})}navigateDataSourceAndType(e,t=[]){this.sbs.showComponent({component:import("./chunk-RO6PDMPM.js"),single:!0,inputs:{model:e,invalid:t}})}askForWidgetDeletion(e,t){this.ms.show({message:`Do you really want do delete widget "${e.name}"?`,buttons:[{label:"No",autoClose:!0},{label:"Yes",default:!0,autoClose:!0,click:t}]})}validate(e){if(!e.name){this.es.show("Please enter widget name",!0),this.sbs.showComponent({component:import("./chunk-BQ3B4VQP.js"),single:!0,inputs:{invalid:["name"]}});return}if(!e.dataSource&&!e.dataLink){this.es.show('Please choose "Data source" or "Reference to"',!0),this.navigateDataSourceAndType(e,["datasource"]);return}return!0}};s.\u0275fac=function(t){return new(t||s)(a(f),a(b),a(u),a(p),a(l),a(m))},s.\u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();export{P as a}; diff --git a/dist/chunk-BRSXYDLD.js b/dist/chunk-LZIODW2A.js similarity index 98% rename from dist/chunk-BRSXYDLD.js rename to dist/chunk-LZIODW2A.js index 2d0b46bf..4534de25 100644 --- a/dist/chunk-BRSXYDLD.js +++ b/dist/chunk-LZIODW2A.js @@ -1 +1 @@ -import{a as D}from"./chunk-JLM5XNR7.js";import{a as W}from"./chunk-VHTVZWVH.js";import"./chunk-W7AFIDCE.js";import{a as J}from"./chunk-54YLOEMX.js";import"./chunk-4G2GW5IL.js";import"./chunk-RNWIIYZZ.js";import{a as I}from"./chunk-SUAWKU6Z.js";import{a as A}from"./chunk-4CDX576O.js";import{D as E,J as L}from"./chunk-B3AVEPVB.js";import{$a as a,$b as x,Bb as S,Bc as V,Cb as O,Db as l,Eb as c,Fb as P,Jb as f,Nb as C,Ob as r,Xb as p,Yb as M,_b as b,ab as w,ac as u,cc as T,fa as k,hc as B,ic as F,qa as d,ra as h,rb as y,tb as g,yb as _,zb as v}from"./chunk-ZKAUCJHV.js";import{f as j}from"./chunk-DEPBX7UX.js";var U=j(J());function N(i,s){if(i&1){let n=f();l(0,"span",5)(1,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r().$index,m=r();return x(m.model.themeColors.hcColors[o],t)||(m.model.themeColors.hcColors[o]=t),h(t)}),C("colorChange",function(){d(n);let t=r(2);return h(t.update())}),c()()}if(i&2){let n=r().$index,e=r();a(),g("isImmediate",!0),b("color",e.model.themeColors.hcColors[n])}}function z(i,s){if(i&1&&y(0,N,2,2,"span",5),i&2){let n=s.$index,e=r();_((e.appearance==null||e.appearance.showSeries==null?null:e.appearance.showSeries[n])!==!1?0:-1)}}function R(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Chart background"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcBackground,t)||(o.model.themeColors.hcBackground=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcBackground)}}function H(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Lines color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcLineColor,t)||(o.model.themeColors.hcLineColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcLineColor)}}function Y(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Text color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcTextColor,t)||(o.model.themeColors.hcTextColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcTextColor)}}function q(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Series border color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcBorderColor,t)||(o.model.themeColors.hcBorderColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcBorderColor)}}var te=(()=>{let s=class s{constructor(e,t,o,m){this.sbs=e,this.ss=t,this.cd=o,this.bs=m,this.model={themeColors:{hcColors:[],hcTextColor:"",hcBackground:"",hcLineColor:"",hcBorderColor:""}},this.key="",this.isApplied=!1,this.isChanged=!1}ngOnInit(){let e=this.ss.getAppSettings();if(this.key=e.theme||"",this.widgetSettings){let t=this.widgetSettings.themeColors[this.key];t&&(this.model.themeColors=JSON.parse(JSON.stringify(t)))}else if(e?.themeColors?.[this.key]&&(this.globalOriginalColors=JSON.parse(JSON.stringify(e.themeColors[this.key]))),!e?.themeColors?.[this.key])e.themeColors||(e.themeColors={}),e.themeColors[this.key]=this.model.themeColors;else{let t=e.themeColors[this.key];t&&(this.model.themeColors=t)}this.initColors()}ngOnDestroy(){this.isApplied||this.restoreColors()}onCancel(){this.sbs.hide()}onApply(){if(this.isApplied=!0,this.onSave)this.isChanged&&(this.widgetSettings.themeColors[this.key]=this.model.themeColors),this.onSave();else{let e=this.ss.getAppSettings();e.themeColors&&(e.themeColors[this.key]=this.model.themeColors),this.ss.setAppSettings(e)}this.sbs.hide()}update(){this.isChanged=!0,this.onUpdate?this.onUpdate(this.model.themeColors):this.bs.broadcast("charts:update-colors",this.model.themeColors)}initColors(){let e=this.model.themeColors,t=this.getDefaultColors();(!e.hcColors||e.hcColors.length===0)&&(e.hcColors=t.hcColors),e.hcTextColor||(e.hcTextColor=t.hcTextColor),e.hcBackground||(e.hcBackground=t.hcBackground),e.hcBorderColor||(e.hcBorderColor=t.hcBorderColor),e.hcLineColor||(e.hcLineColor=t.hcLineColor),this.originalColors=JSON.parse(JSON.stringify(e))}byIndex(e,t){return e}resetToDefault(){let e=this.getDefaultColors();this.model.themeColors.hcLineColor=e.hcLineColor,this.model.themeColors.hcBorderColor=e.hcBorderColor,this.model.themeColors.hcBackground=e.hcBackground,this.model.themeColors.hcTextColor=e.hcTextColor,this.model.themeColors.hcColors=e.hcColors,this.widgetSettings?.themeColors[this.key]&&(this.widgetSettings.themeColors[this.key]=null),this.onUpdate?this.onUpdate(e):this.bs.broadcast("charts:update-colors",e),this.isChanged=!1}restoreColors(){if(this.widgetSettings)this.widgetSettings.themeColors[this.key]=this.originalColors;else{let e=this.ss.getAppSettings();e.themeColors&&(e.themeColors[this.key]=this.globalOriginalColors)}this.onUpdate?this.onUpdate(this.originalColors):this.bs.broadcast("charts:update-colors",this.originalColors)}getDefaultColors(){let e=U.default.getOptions();return{hcColors:e.colors?.slice()||"",hcBackground:e.chart?.backgroundColor||"",hcTextColor:e.labels?.style?.color||"",hcBorderColor:"",hcLineColor:"#e6e6e6"}}};s.\u0275fac=function(t){return new(t||s)(w(I),w(L),w(V),w(A))},s.\u0275cmp=k({type:s,selectors:[["dsw-chart-config"]],inputs:{chart:"chart",widgetSettings:"widgetSettings",onSave:"onSave",appearance:"appearance",onUpdate:"onUpdate"},standalone:!0,features:[T],decls:16,vars:7,consts:[[3,"cancel","apply"],[1,"container"],[1,"series-colors"],[1,"divider"],[1,"btn","btn-success",3,"click"],[1,"color-small"],[3,"colorChange","isImmediate","color"]],template:function(t,o){t&1&&(l(0,"dsw-sidebar-actions",0),C("cancel",function(){return o.onCancel()})("apply",function(){return o.onApply()}),p(1,"Chart colors"),c(),l(2,"div",1)(3,"label"),p(4),B(5,"i18n"),c(),l(6,"div",2),S(7,z,1,1,null,null,v),c(),y(9,R,3,2)(10,H,3,2)(11,Y,3,2)(12,q,3,2),P(13,"div",3),l(14,"button",4),C("click",function(){return o.resetToDefault()}),p(15,"Reset to default"),c()()),t&2&&(a(4),M(F(5,5,"seriesColor")),a(3),O(o.model.themeColors.hcColors),a(2),_((o.appearance==null?null:o.appearance.showBackground)!==!1?9:-1),a(),_((o.appearance==null?null:o.appearance.showLines)!==!1?10:-1),a(),_((o.appearance==null?null:o.appearance.showText)!==!1?11:-1),a(),_((o.appearance==null?null:o.appearance.showBorder)!==!1?12:-1))},dependencies:[W,E,D],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}",".color-small[_ngcontent-%COMP%]{display:inline-block;width:32px;height:32px;min-width:32px;flex-shrink:0}.series-colors[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}label[_ngcontent-%COMP%] + .color-small[_ngcontent-%COMP%]{margin-left:0}.color[_ngcontent-%COMP%]{display:inline-flex}.divider[_ngcontent-%COMP%]{margin-bottom:10px}"]});let i=s;return i})();export{te as ChartColorsConfigComponent}; +import{a as D}from"./chunk-JLM5XNR7.js";import{a as W}from"./chunk-PPMZCCVB.js";import"./chunk-W7AFIDCE.js";import{a as J}from"./chunk-54YLOEMX.js";import"./chunk-J6F3GFQR.js";import"./chunk-RNWIIYZZ.js";import{a as I}from"./chunk-SUAWKU6Z.js";import{a as A}from"./chunk-4CDX576O.js";import{D as E,J as L}from"./chunk-B3AVEPVB.js";import{$a as a,$b as x,Bb as S,Bc as V,Cb as O,Db as l,Eb as c,Fb as P,Jb as f,Nb as C,Ob as r,Xb as p,Yb as M,_b as b,ab as w,ac as u,cc as T,fa as k,hc as B,ic as F,qa as d,ra as h,rb as y,tb as g,yb as _,zb as v}from"./chunk-ZKAUCJHV.js";import{f as j}from"./chunk-DEPBX7UX.js";var U=j(J());function N(i,s){if(i&1){let n=f();l(0,"span",5)(1,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r().$index,m=r();return x(m.model.themeColors.hcColors[o],t)||(m.model.themeColors.hcColors[o]=t),h(t)}),C("colorChange",function(){d(n);let t=r(2);return h(t.update())}),c()()}if(i&2){let n=r().$index,e=r();a(),g("isImmediate",!0),b("color",e.model.themeColors.hcColors[n])}}function z(i,s){if(i&1&&y(0,N,2,2,"span",5),i&2){let n=s.$index,e=r();_((e.appearance==null||e.appearance.showSeries==null?null:e.appearance.showSeries[n])!==!1?0:-1)}}function R(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Chart background"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcBackground,t)||(o.model.themeColors.hcBackground=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcBackground)}}function H(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Lines color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcLineColor,t)||(o.model.themeColors.hcLineColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcLineColor)}}function Y(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Text color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcTextColor,t)||(o.model.themeColors.hcTextColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcTextColor)}}function q(i,s){if(i&1){let n=f();l(0,"label"),p(1,"Series border color"),c(),l(2,"dsw-color-picker",6),u("colorChange",function(t){d(n);let o=r();return x(o.model.themeColors.hcBorderColor,t)||(o.model.themeColors.hcBorderColor=t),h(t)}),C("colorChange",function(){d(n);let t=r();return h(t.update())}),c()}if(i&2){let n=r();a(2),g("isImmediate",!0),b("color",n.model.themeColors.hcBorderColor)}}var te=(()=>{let s=class s{constructor(e,t,o,m){this.sbs=e,this.ss=t,this.cd=o,this.bs=m,this.model={themeColors:{hcColors:[],hcTextColor:"",hcBackground:"",hcLineColor:"",hcBorderColor:""}},this.key="",this.isApplied=!1,this.isChanged=!1}ngOnInit(){let e=this.ss.getAppSettings();if(this.key=e.theme||"",this.widgetSettings){let t=this.widgetSettings.themeColors[this.key];t&&(this.model.themeColors=JSON.parse(JSON.stringify(t)))}else if(e?.themeColors?.[this.key]&&(this.globalOriginalColors=JSON.parse(JSON.stringify(e.themeColors[this.key]))),!e?.themeColors?.[this.key])e.themeColors||(e.themeColors={}),e.themeColors[this.key]=this.model.themeColors;else{let t=e.themeColors[this.key];t&&(this.model.themeColors=t)}this.initColors()}ngOnDestroy(){this.isApplied||this.restoreColors()}onCancel(){this.sbs.hide()}onApply(){if(this.isApplied=!0,this.onSave)this.isChanged&&(this.widgetSettings.themeColors[this.key]=this.model.themeColors),this.onSave();else{let e=this.ss.getAppSettings();e.themeColors&&(e.themeColors[this.key]=this.model.themeColors),this.ss.setAppSettings(e)}this.sbs.hide()}update(){this.isChanged=!0,this.onUpdate?this.onUpdate(this.model.themeColors):this.bs.broadcast("charts:update-colors",this.model.themeColors)}initColors(){let e=this.model.themeColors,t=this.getDefaultColors();(!e.hcColors||e.hcColors.length===0)&&(e.hcColors=t.hcColors),e.hcTextColor||(e.hcTextColor=t.hcTextColor),e.hcBackground||(e.hcBackground=t.hcBackground),e.hcBorderColor||(e.hcBorderColor=t.hcBorderColor),e.hcLineColor||(e.hcLineColor=t.hcLineColor),this.originalColors=JSON.parse(JSON.stringify(e))}byIndex(e,t){return e}resetToDefault(){let e=this.getDefaultColors();this.model.themeColors.hcLineColor=e.hcLineColor,this.model.themeColors.hcBorderColor=e.hcBorderColor,this.model.themeColors.hcBackground=e.hcBackground,this.model.themeColors.hcTextColor=e.hcTextColor,this.model.themeColors.hcColors=e.hcColors,this.widgetSettings?.themeColors[this.key]&&(this.widgetSettings.themeColors[this.key]=null),this.onUpdate?this.onUpdate(e):this.bs.broadcast("charts:update-colors",e),this.isChanged=!1}restoreColors(){if(this.widgetSettings)this.widgetSettings.themeColors[this.key]=this.originalColors;else{let e=this.ss.getAppSettings();e.themeColors&&(e.themeColors[this.key]=this.globalOriginalColors)}this.onUpdate?this.onUpdate(this.originalColors):this.bs.broadcast("charts:update-colors",this.originalColors)}getDefaultColors(){let e=U.default.getOptions();return{hcColors:e.colors?.slice()||"",hcBackground:e.chart?.backgroundColor||"",hcTextColor:e.labels?.style?.color||"",hcBorderColor:"",hcLineColor:"#e6e6e6"}}};s.\u0275fac=function(t){return new(t||s)(w(I),w(L),w(V),w(A))},s.\u0275cmp=k({type:s,selectors:[["dsw-chart-config"]],inputs:{chart:"chart",widgetSettings:"widgetSettings",onSave:"onSave",appearance:"appearance",onUpdate:"onUpdate"},standalone:!0,features:[T],decls:16,vars:7,consts:[[3,"cancel","apply"],[1,"container"],[1,"series-colors"],[1,"divider"],[1,"btn","btn-success",3,"click"],[1,"color-small"],[3,"colorChange","isImmediate","color"]],template:function(t,o){t&1&&(l(0,"dsw-sidebar-actions",0),C("cancel",function(){return o.onCancel()})("apply",function(){return o.onApply()}),p(1,"Chart colors"),c(),l(2,"div",1)(3,"label"),p(4),B(5,"i18n"),c(),l(6,"div",2),S(7,z,1,1,null,null,v),c(),y(9,R,3,2)(10,H,3,2)(11,Y,3,2)(12,q,3,2),P(13,"div",3),l(14,"button",4),C("click",function(){return o.resetToDefault()}),p(15,"Reset to default"),c()()),t&2&&(a(4),M(F(5,5,"seriesColor")),a(3),O(o.model.themeColors.hcColors),a(2),_((o.appearance==null?null:o.appearance.showBackground)!==!1?9:-1),a(),_((o.appearance==null?null:o.appearance.showLines)!==!1?10:-1),a(),_((o.appearance==null?null:o.appearance.showText)!==!1?11:-1),a(),_((o.appearance==null?null:o.appearance.showBorder)!==!1?12:-1))},dependencies:[W,E,D],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}",".color-small[_ngcontent-%COMP%]{display:inline-block;width:32px;height:32px;min-width:32px;flex-shrink:0}.series-colors[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}label[_ngcontent-%COMP%] + .color-small[_ngcontent-%COMP%]{margin-left:0}.color[_ngcontent-%COMP%]{display:inline-flex}.divider[_ngcontent-%COMP%]{margin-bottom:10px}"]});let i=s;return i})();export{te as ChartColorsConfigComponent}; diff --git a/dist/chunk-VHTVZWVH.js b/dist/chunk-PPMZCCVB.js similarity index 98% rename from dist/chunk-VHTVZWVH.js rename to dist/chunk-PPMZCCVB.js index 00abbde4..cc2ada2e 100644 --- a/dist/chunk-VHTVZWVH.js +++ b/dist/chunk-PPMZCCVB.js @@ -1,3 +1,3 @@ -import{a as k}from"./chunk-4G2GW5IL.js";import{a as O}from"./chunk-SUAWKU6Z.js";import{D as E}from"./chunk-B3AVEPVB.js";import{$a as a,Bc as F,Da as s,Db as o,Eb as n,Fb as x,Nb as b,Pb as C,Qb as w,Xb as d,Zb as y,ab as l,cc as _,fa as f,hc as h,ic as p,rb as m,tb as g,vb as u,yb as v}from"./chunk-ZKAUCJHV.js";var M=["*"];function P(r,t){r&1&&(o(0,"div",1),d(1,"You have unsaved changes"),n())}var U=(()=>{let t=class t{constructor(c,i,e){this.sbs=c,this.eds=i,this.cd=e,this.isBack=!1,this.isWidgetEditorWarning=!1,this.cancel=new s,this.apply=new s,this.isWidgetEditorWarningVisible=!1}ngOnInit(){this.subOnUnsavedChanged=this.eds.onUnsavedChanged.subscribe(c=>{this.isWidgetEditorWarningVisible=c,this.cd.detectChanges()})}onCloseClick(){this.isBack&&this.sbs.popComponent(),this.cancel.emit()}ngOnDestroy(){this.subOnUnsavedChanged?.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(l(O),l(k),l(F))},t.\u0275cmp=f({type:t,selectors:[["dsw-sidebar-actions"]],inputs:{isBack:"isBack",isWidgetEditorWarning:"isWidgetEditorWarning"},outputs:{cancel:"cancel",apply:"apply"},standalone:!0,features:[_],ngContentSelectors:M,decls:11,vars:10,consts:[[3,"click","title"],[1,"unsaved"],["src","assets/img/icons/icon-check.svg"]],template:function(i,e){i&1&&(C(),o(0,"button",0),h(1,"i18n"),b("click",function(){return e.onCloseClick()}),d(2),n(),o(3,"label")(4,"div"),w(5),n(),m(6,P,2,0,"div",1),n(),o(7,"button",0),h(8,"i18n"),b("click",function(){return e.apply.emit()}),x(9,"img",2),d(10,` Save +import{a as k}from"./chunk-J6F3GFQR.js";import{a as O}from"./chunk-SUAWKU6Z.js";import{D as E}from"./chunk-B3AVEPVB.js";import{$a as a,Bc as F,Da as s,Db as o,Eb as n,Fb as x,Nb as b,Pb as C,Qb as w,Xb as d,Zb as y,ab as l,cc as _,fa as f,hc as h,ic as p,rb as m,tb as g,vb as u,yb as v}from"./chunk-ZKAUCJHV.js";var M=["*"];function P(r,t){r&1&&(o(0,"div",1),d(1,"You have unsaved changes"),n())}var U=(()=>{let t=class t{constructor(c,i,e){this.sbs=c,this.eds=i,this.cd=e,this.isBack=!1,this.isWidgetEditorWarning=!1,this.cancel=new s,this.apply=new s,this.isWidgetEditorWarningVisible=!1}ngOnInit(){this.subOnUnsavedChanged=this.eds.onUnsavedChanged.subscribe(c=>{this.isWidgetEditorWarningVisible=c,this.cd.detectChanges()})}onCloseClick(){this.isBack&&this.sbs.popComponent(),this.cancel.emit()}ngOnDestroy(){this.subOnUnsavedChanged?.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)(l(O),l(k),l(F))},t.\u0275cmp=f({type:t,selectors:[["dsw-sidebar-actions"]],inputs:{isBack:"isBack",isWidgetEditorWarning:"isWidgetEditorWarning"},outputs:{cancel:"cancel",apply:"apply"},standalone:!0,features:[_],ngContentSelectors:M,decls:11,vars:10,consts:[[3,"click","title"],[1,"unsaved"],["src","assets/img/icons/icon-check.svg"]],template:function(i,e){i&1&&(C(),o(0,"button",0),h(1,"i18n"),b("click",function(){return e.onCloseClick()}),d(2),n(),o(3,"label")(4,"div"),w(5),n(),m(6,P,2,0,"div",1),n(),o(7,"button",0),h(8,"i18n"),b("click",function(){return e.apply.emit()}),x(9,"img",2),d(10,` Save `),n()),i&2&&(g("title",p(1,6,"cancel")),a(2),y(" ",e.isBack?"Back":"Close",` `),a(4),v(e.isWidgetEditorWarning&&e.isWidgetEditorWarningVisible?6:-1),a(),u("warning",e.isWidgetEditorWarning&&e.isWidgetEditorWarningVisible),g("title",p(8,8,"save")))},dependencies:[E],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;white-space:nowrap;height:var(--header-height);display:flex;justify-content:space-between;border-bottom:1px solid var(--cl-header-border);margin-bottom:6px;margin-left:20px}[_nghost-%COMP%] button[_ngcontent-%COMP%]{padding:0;cursor:pointer;font-family:Oxygen;display:block;text-align:left;font-size:14px;background-color:transparent;border:none;outline:none;flex-shrink:0;flex-grow:0;color:var(--cl-accent);min-width:50px;transition:background-color .3s linear}[_nghost-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:var(--cl-header-btn-hover)}[_nghost-%COMP%] button[_ngcontent-%COMP%]:last-child{text-align:right}[_nghost-%COMP%] button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{display:none;vertical-align:middle;transform:translateY(-1px);margin-right:4px;width:14px}[_nghost-%COMP%] > label[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-family:Oxygen;color:#000;font-size:16px}.img-accept[_ngcontent-%COMP%]{max-width:60%;max-height:60%}.unsaved[_ngcontent-%COMP%]{position:absolute;left:0;right:0;text-align:center;bottom:0;font-family:Oxygen;font-size:12px;color:#f70000}"],changeDetection:0});let r=t;return r})();export{U as a}; diff --git a/dist/chunk-OUKRRTVO.js b/dist/chunk-PSGSOQBK.js similarity index 97% rename from dist/chunk-OUKRRTVO.js rename to dist/chunk-PSGSOQBK.js index 3f863b8f..d7142b45 100644 --- a/dist/chunk-OUKRRTVO.js +++ b/dist/chunk-PSGSOQBK.js @@ -1 +1 @@ -import{a as R}from"./chunk-KT37IQUX.js";import{a as B}from"./chunk-VHTVZWVH.js";import{h as T}from"./chunk-HLGTCAUI.js";import"./chunk-V6EVLSKF.js";import"./chunk-NIX3K3AA.js";import"./chunk-W7AFIDCE.js";import"./chunk-54YLOEMX.js";import"./chunk-Y4WNFABU.js";import"./chunk-EB65ROO7.js";import"./chunk-EAEBZZLM.js";import"./chunk-4G2GW5IL.js";import{a as I}from"./chunk-RNWIIYZZ.js";import{a as E}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{b as O,d as P,e as A,j as k}from"./chunk-4NDDWB77.js";import{D as w,E as S,I as y,J as M,K as F}from"./chunk-B3AVEPVB.js";import{$a as l,$b as f,Db as r,Eb as a,Nb as b,Xb as s,Yb as m,Zb as C,_b as h,ab as g,ac as u,cc as x,fa as v,hc as c,ic as d}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";var Q=(()=>{let p=class p{constructor(o,n,e,i,t){this.sbs=o,this.ss=n,this.us=e,this.modal=i,this.i18n=t,this.settings=this.ss.getAppSettings(),this.model={isSaveFilters:this.settings.isSaveFilters===void 0?!0:this.settings.isSaveFilters,isRelatedFilters:this.settings.isRelatedFilters===void 0?!0:this.settings.isRelatedFilters,colCount:this.settings.colCount||T}}ngOnInit(){}onCancel(){this.sbs.hide()}onApply(){this.applySettrings(),this.sbs.hide()}readSettings(o){let n=o.target.files[0];if(!n)return;let e=new FileReader;e.onload=i=>{let t=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(i.target.result)));this.ss.setAllSettings(t),this.ss.onSettingsChanged.emit(this.ss.getAppSettings()),this.sbs.hide(),this.modal.show(this.i18n.get("settingsImported"),()=>{window.location.reload()})},e.readAsArrayBuffer(n)}exportSettings(){let o=F+"."+new Date().toLocaleDateString()+".json",n=JSON.stringify(this.ss.getAllSettings());this.downloadFile(o,n)}resetSettings(){let o=n=>{delete n.userSettings,this.modal.show(this.i18n.get("settingsReset"),()=>{window.location.reload()})};o(sessionStorage);try{o(localStorage)}catch{}}applySettrings(){this.settings.isSaveFilters=!!this.model.isSaveFilters,this.settings.isRelatedFilters=!!this.model.isRelatedFilters,this.settings.colCount=this.model.colCount,this.ss.onSettingsChanged.emit(this.settings),this.ss.setAppSettings(this.settings)}downloadFile(o,n){let e=document.createElement("a");e.style.setProperty("display","none"),e.download=o;let i=new Blob([n],{type:"application/octet-stream"}),t=window.URL.createObjectURL(i);e.href=t,document.body.appendChild(e),e.click(),setTimeout(j=>{document.body.removeChild(e),window.URL.revokeObjectURL(t)},100)}};p.\u0275fac=function(n){return new(n||p)(g(E),g(M),g(y),g(I),g(S))},p.\u0275cmp=v({type:p,selectors:[["dsw-app-settings"]],standalone:!0,features:[x],decls:26,vars:21,consts:[[3,"cancel","apply"],[1,"container"],["type","number",3,"ngModelChange","ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],["type","file","enctype","multipart/form-data",3,"change"],[1,"actions"],[1,"btn",3,"click"]],template:function(n,e){n&1&&(r(0,"dsw-sidebar-actions",0),b("cancel",function(){return e.onCancel()})("apply",function(){return e.onApply()}),s(1,"Settings"),a(),r(2,"div",1)(3,"label"),s(4),c(5,"i18n"),a(),r(6,"dsw-input",2),u("ngModelChange",function(t){return f(e.model.colCount,t)||(e.model.colCount=t),t}),a(),r(7,"label"),s(8),c(9,"i18n"),r(10,"input",3),u("ngModelChange",function(t){return f(e.model.isSaveFilters,t)||(e.model.isSaveFilters=t),t}),a()(),r(11,"label"),s(12),c(13,"i18n"),r(14,"input",3),u("ngModelChange",function(t){return f(e.model.isRelatedFilters,t)||(e.model.isRelatedFilters=t),t}),a()(),r(15,"label"),s(16),c(17,"i18n"),a(),r(18,"input",4),b("change",function(t){return e.readSettings(t)}),a(),r(19,"div",5)(20,"button",6),b("click",function(){return e.resetSettings()}),s(21),c(22,"i18n"),a(),r(23,"button",6),b("click",function(){return e.exportSettings()}),s(24),c(25,"i18n"),a()()()),n&2&&(l(4),m(d(5,9,"dashColumns")),l(2),h("ngModel",e.model.colCount),l(2),C("",d(9,11,"saveFilters")," "),l(2),h("ngModel",e.model.isSaveFilters),l(2),C("",d(13,13,"relatedFilters")," "),l(2),h("ngModel",e.model.isRelatedFilters),l(2),m(d(17,15,"importSettings")),l(5),m(d(22,17,"resetSettings")),l(3),m(d(25,19,"exportSettings")))},dependencies:[B,R,k,O,P,A,w],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}",".actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:20px;margin-bottom:10px}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:first-child{margin-right:5px}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:last-child{margin-left:5px}"]});let _=p;return _})();export{Q as AppSettingsComponent}; +import{a as R}from"./chunk-KT37IQUX.js";import{a as B}from"./chunk-PPMZCCVB.js";import{h as T}from"./chunk-WR6Y5MKE.js";import"./chunk-V6EVLSKF.js";import"./chunk-UGM4WZSG.js";import"./chunk-W7AFIDCE.js";import"./chunk-54YLOEMX.js";import"./chunk-Y4WNFABU.js";import"./chunk-EB65ROO7.js";import"./chunk-EAEBZZLM.js";import"./chunk-J6F3GFQR.js";import{a as I}from"./chunk-RNWIIYZZ.js";import{a as E}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{b as O,d as P,e as A,j as k}from"./chunk-4NDDWB77.js";import{D as w,E as S,I as y,J as M,K as F}from"./chunk-B3AVEPVB.js";import{$a as l,$b as f,Db as r,Eb as a,Nb as b,Xb as s,Yb as m,Zb as C,_b as h,ab as g,ac as u,cc as x,fa as v,hc as c,ic as d}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";var Q=(()=>{let p=class p{constructor(o,n,e,i,t){this.sbs=o,this.ss=n,this.us=e,this.modal=i,this.i18n=t,this.settings=this.ss.getAppSettings(),this.model={isSaveFilters:this.settings.isSaveFilters===void 0?!0:this.settings.isSaveFilters,isRelatedFilters:this.settings.isRelatedFilters===void 0?!0:this.settings.isRelatedFilters,colCount:this.settings.colCount||T}}ngOnInit(){}onCancel(){this.sbs.hide()}onApply(){this.applySettrings(),this.sbs.hide()}readSettings(o){let n=o.target.files[0];if(!n)return;let e=new FileReader;e.onload=i=>{let t=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(i.target.result)));this.ss.setAllSettings(t),this.ss.onSettingsChanged.emit(this.ss.getAppSettings()),this.sbs.hide(),this.modal.show(this.i18n.get("settingsImported"),()=>{window.location.reload()})},e.readAsArrayBuffer(n)}exportSettings(){let o=F+"."+new Date().toLocaleDateString()+".json",n=JSON.stringify(this.ss.getAllSettings());this.downloadFile(o,n)}resetSettings(){let o=n=>{delete n.userSettings,this.modal.show(this.i18n.get("settingsReset"),()=>{window.location.reload()})};o(sessionStorage);try{o(localStorage)}catch{}}applySettrings(){this.settings.isSaveFilters=!!this.model.isSaveFilters,this.settings.isRelatedFilters=!!this.model.isRelatedFilters,this.settings.colCount=this.model.colCount,this.ss.onSettingsChanged.emit(this.settings),this.ss.setAppSettings(this.settings)}downloadFile(o,n){let e=document.createElement("a");e.style.setProperty("display","none"),e.download=o;let i=new Blob([n],{type:"application/octet-stream"}),t=window.URL.createObjectURL(i);e.href=t,document.body.appendChild(e),e.click(),setTimeout(j=>{document.body.removeChild(e),window.URL.revokeObjectURL(t)},100)}};p.\u0275fac=function(n){return new(n||p)(g(E),g(M),g(y),g(I),g(S))},p.\u0275cmp=v({type:p,selectors:[["dsw-app-settings"]],standalone:!0,features:[x],decls:26,vars:21,consts:[[3,"cancel","apply"],[1,"container"],["type","number",3,"ngModelChange","ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],["type","file","enctype","multipart/form-data",3,"change"],[1,"actions"],[1,"btn",3,"click"]],template:function(n,e){n&1&&(r(0,"dsw-sidebar-actions",0),b("cancel",function(){return e.onCancel()})("apply",function(){return e.onApply()}),s(1,"Settings"),a(),r(2,"div",1)(3,"label"),s(4),c(5,"i18n"),a(),r(6,"dsw-input",2),u("ngModelChange",function(t){return f(e.model.colCount,t)||(e.model.colCount=t),t}),a(),r(7,"label"),s(8),c(9,"i18n"),r(10,"input",3),u("ngModelChange",function(t){return f(e.model.isSaveFilters,t)||(e.model.isSaveFilters=t),t}),a()(),r(11,"label"),s(12),c(13,"i18n"),r(14,"input",3),u("ngModelChange",function(t){return f(e.model.isRelatedFilters,t)||(e.model.isRelatedFilters=t),t}),a()(),r(15,"label"),s(16),c(17,"i18n"),a(),r(18,"input",4),b("change",function(t){return e.readSettings(t)}),a(),r(19,"div",5)(20,"button",6),b("click",function(){return e.resetSettings()}),s(21),c(22,"i18n"),a(),r(23,"button",6),b("click",function(){return e.exportSettings()}),s(24),c(25,"i18n"),a()()()),n&2&&(l(4),m(d(5,9,"dashColumns")),l(2),h("ngModel",e.model.colCount),l(2),C("",d(9,11,"saveFilters")," "),l(2),h("ngModel",e.model.isSaveFilters),l(2),C("",d(13,13,"relatedFilters")," "),l(2),h("ngModel",e.model.isRelatedFilters),l(2),m(d(17,15,"importSettings")),l(5),m(d(22,17,"resetSettings")),l(3),m(d(25,19,"exportSettings")))},dependencies:[B,R,k,O,P,A,w],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}",".actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:20px;margin-bottom:10px}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:first-child{margin-right:5px}.actions[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]:last-child{margin-left:5px}"]});let _=p;return _})();export{Q as AppSettingsComponent}; diff --git a/dist/chunk-QFEJNEA2.js b/dist/chunk-QHADAE3C.js similarity index 98% rename from dist/chunk-QFEJNEA2.js rename to dist/chunk-QHADAE3C.js index f004a897..fc4c7c79 100644 --- a/dist/chunk-QFEJNEA2.js +++ b/dist/chunk-QHADAE3C.js @@ -1,3 +1,3 @@ -import{a as j}from"./chunk-JLM5XNR7.js";import{a as D}from"./chunk-VHTVZWVH.js";import"./chunk-W7AFIDCE.js";import{a as z,b as I}from"./chunk-UR6JO2ME.js";import"./chunk-4G2GW5IL.js";import"./chunk-RNWIIYZZ.js";import{a as B}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{c as T,d as A,e as V,j as W}from"./chunk-4NDDWB77.js";import{F as E,J as k}from"./chunk-B3AVEPVB.js";import{$a as h,$b as u,Bb as M,Cb as P,Db as r,Eb as o,Jb as w,Nb as g,Ob as a,Xb as s,Yb as O,_b as f,ab as x,ac as _,cc as S,fa as y,qa as b,ra as m,rb as F,tb as C,yb as v}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function N(l,c){if(l&1){let i=w();r(0,"dsw-color-picker",7),_("colorChange",function(t){b(i);let n=a().$implicit;return u(n.value,t)||(n.value=t),m(t)}),g("colorChange",function(){b(i);let t=a().$implicit,n=a();return m(n.updateVariable(t))}),o()}if(l&2){let i=a().$implicit;f("color",i.value),C("isImmediate",!0)}}function L(l,c){if(l&1){let i=w();r(0,"input",8),_("ngModelChange",function(t){b(i);let n=a().$implicit;return u(n.value,t)||(n.value=t),m(t)}),g("change",function(){b(i);let t=a().$implicit,n=a();return m(n.updateVariable(t))}),o()}if(l&2){let i=a().$implicit;f("ngModel",i.value)}}function R(l,c){if(l&1&&(r(0,"tr")(1,"td"),s(2),o(),r(3,"td"),F(4,N,1,2,"dsw-color-picker",5)(5,L,1,1,"input",6),o()()),l&2){let i=c.$implicit;h(2),O(i.name),h(2),v(i.isColor?4:-1),h(),v(i.isColor?-1:5)}}var Z=(()=>{let c=class c{constructor(e,t){this.sbs=e,this.ss=t,this.variables=[],this.isApplied=!1,this.settings=this.ss.getAppSettings(),this.model={themes:E.const.themes,theme:this.settings.theme},this.initializeVariables()}ngOnDestroy(){this.isApplied||this.restoreTheme()}onCancel(){this.sbs.hide()}onApply(){let e=this.ss.getAppSettings();e.theme=this.model.theme,this.ss.setAppSettings(e),this.isApplied=!0,this.sbs.hide()}exportTheme(){let e=`:root {\r +import{a as j}from"./chunk-JLM5XNR7.js";import{a as D}from"./chunk-PPMZCCVB.js";import"./chunk-W7AFIDCE.js";import{a as z,b as I}from"./chunk-UR6JO2ME.js";import"./chunk-J6F3GFQR.js";import"./chunk-RNWIIYZZ.js";import{a as B}from"./chunk-SUAWKU6Z.js";import"./chunk-4CDX576O.js";import{c as T,d as A,e as V,j as W}from"./chunk-4NDDWB77.js";import{F as E,J as k}from"./chunk-B3AVEPVB.js";import{$a as h,$b as u,Bb as M,Cb as P,Db as r,Eb as o,Jb as w,Nb as g,Ob as a,Xb as s,Yb as O,_b as f,ab as x,ac as _,cc as S,fa as y,qa as b,ra as m,rb as F,tb as C,yb as v}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function N(l,c){if(l&1){let i=w();r(0,"dsw-color-picker",7),_("colorChange",function(t){b(i);let n=a().$implicit;return u(n.value,t)||(n.value=t),m(t)}),g("colorChange",function(){b(i);let t=a().$implicit,n=a();return m(n.updateVariable(t))}),o()}if(l&2){let i=a().$implicit;f("color",i.value),C("isImmediate",!0)}}function L(l,c){if(l&1){let i=w();r(0,"input",8),_("ngModelChange",function(t){b(i);let n=a().$implicit;return u(n.value,t)||(n.value=t),m(t)}),g("change",function(){b(i);let t=a().$implicit,n=a();return m(n.updateVariable(t))}),o()}if(l&2){let i=a().$implicit;f("ngModel",i.value)}}function R(l,c){if(l&1&&(r(0,"tr")(1,"td"),s(2),o(),r(3,"td"),F(4,N,1,2,"dsw-color-picker",5)(5,L,1,1,"input",6),o()()),l&2){let i=c.$implicit;h(2),O(i.name),h(2),v(i.isColor?4:-1),h(),v(i.isColor?-1:5)}}var Z=(()=>{let c=class c{constructor(e,t){this.sbs=e,this.ss=t,this.variables=[],this.isApplied=!1,this.settings=this.ss.getAppSettings(),this.model={themes:E.const.themes,theme:this.settings.theme},this.initializeVariables()}ngOnDestroy(){this.isApplied||this.restoreTheme()}onCancel(){this.sbs.hide()}onApply(){let e=this.ss.getAppSettings();e.theme=this.model.theme,this.ss.setAppSettings(e),this.isApplied=!0,this.sbs.hide()}exportTheme(){let e=`:root {\r `;this.variables.forEach(n=>{e+=" --"+n.name+": "+n.value+`;\r `}),e+="}";let t=document.createElement("a");t.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),t.setAttribute("download","theme.css"),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t)}updateVariable(e){document.documentElement.style.setProperty("--"+e.name,e.value)}restoreTheme(){this.model.theme=this.settings.theme,this.applyTheme()}trackVariable(e,t){return t.name}applyTheme(){this.variables.forEach(t=>{document.documentElement.style.setProperty("--"+t.name,null)});let e=document.getElementById("page-theme");e||(e=document.createElement("link")),e.id="page-theme",e.rel="stylesheet",e.type="text/css",this.model.theme?e.href="css/"+this.model.theme:e.href="",document.head.appendChild(e),setTimeout(()=>{this.initializeVariables()},100)}initializeVariables(){this.variables=this.getAllCssVariables().map(e=>{let t=getComputedStyle(document.documentElement).getPropertyValue(e);return{name:e.replace("--",""),value:t,isColor:this.isColor(t)}})}isColor(e){let t=new Option().style;return t.color=e,t.color!==""}getAllCssVariables(){return Array.from(document.styleSheets).filter(e=>e.href===null||e.href.startsWith(window.location.origin)).reduce((e,t)=>e=[...e,...Array.from(t.cssRules).reduce((n,d)=>n=d.selectorText===":root"?[...n,...Array.from(d.style).filter(p=>p.startsWith("--"))]:n,[])],[])}};c.\u0275fac=function(t){return new(t||c)(x(B),x(k))},c.\u0275cmp=y({type:c,selectors:[["dsw-theme-settings"]],standalone:!0,features:[S],decls:21,vars:3,consts:[[3,"cancel","apply"],[1,"container"],["bindValue","file","bindLabel","text",1,"dsw",3,"ngModelChange","ngModel","clearable","items"],[1,"variables-container"],[1,"btn","btn-success",3,"click"],[3,"color","isImmediate"],[1,"input",3,"ngModel"],[3,"colorChange","color","isImmediate"],[1,"input",3,"ngModelChange","change","ngModel"]],template:function(t,n){t&1&&(r(0,"dsw-sidebar-actions",0),g("cancel",function(){return n.onCancel()})("apply",function(){return n.onApply()}),s(1,"Theme settings"),o(),r(2,"div",1)(3,"label"),s(4,"Current theme"),o(),r(5,"ng-select",2),_("ngModelChange",function(p){return u(n.model.theme,p)||(n.model.theme=p),p}),o(),r(6,"label"),s(7,"Theme variables"),o(),r(8,"div",3)(9,"table")(10,"thead")(11,"tr")(12,"td"),s(13,"Name"),o(),r(14,"td"),s(15,"Value"),o()()(),r(16,"tbody"),M(17,R,6,3,"tr",null,n.trackVariable,!0),o()()(),r(19,"button",4),g("click",function(){return n.exportTheme()}),s(20,"Download theme"),o()()),t&2&&(h(5),f("ngModel",n.model.theme),C("clearable",!1)("items",n.model.themes),h(12),P(n.variables))},dependencies:[D,I,z,W,T,A,V,j],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}","[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}table[_ngcontent-%COMP%]{font-size:12px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%]{opacity:.7}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:50%}.color[_ngcontent-%COMP%]{height:14px;cursor:pointer}.input[_ngcontent-%COMP%]{height:14px}.btn-success[_ngcontent-%COMP%]{margin-top:10px}dsw-color-picker[_ngcontent-%COMP%]{height:20px}"]});let l=c;return l})();export{Z as ThemeSettingsComponent}; diff --git a/dist/chunk-KION3GZB.js b/dist/chunk-RO6PDMPM.js similarity index 97% rename from dist/chunk-KION3GZB.js rename to dist/chunk-RO6PDMPM.js index bd48eece..25933802 100644 --- a/dist/chunk-KION3GZB.js +++ b/dist/chunk-RO6PDMPM.js @@ -1,2 +1,2 @@ -import{a as T}from"./chunk-KT37IQUX.js";import{a as A}from"./chunk-VHTVZWVH.js";import{d as t}from"./chunk-NIX3K3AA.js";import"./chunk-54YLOEMX.js";import"./chunk-Y4WNFABU.js";import{a as F,b as W}from"./chunk-UR6JO2ME.js";import{a as V}from"./chunk-4G2GW5IL.js";import{a as E}from"./chunk-RNWIIYZZ.js";import"./chunk-SUAWKU6Z.js";import{b as D}from"./chunk-4CDX576O.js";import{d as O,e as S,i as P,j as k}from"./chunk-4NDDWB77.js";import"./chunk-B3AVEPVB.js";import{$a as h,$b as _,Db as l,Eb as d,Jb as v,Nb as b,Ob as r,Xb as m,_b as f,ab as u,ac as C,cc as M,fa as x,qa as a,ra as c,rb as w,tb as p,yb as y}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function L(g,s){if(g&1){let i=v();l(0,"div",1)(1,"label"),m(2,"Widget type"),d(),l(3,"ng-select",2),C("ngModelChange",function(e){a(i);let o=r();return _(o.type,e)||(o.type=e),c(e)}),b("change",function(){a(i);let e=r();return c(e.onTypeChange())}),d(),l(4,"label"),m(5,"Data source"),d(),l(6,"dsw-input",3),C("ngModelChange",function(e){a(i);let o=r();return _(o.model.dataSource,e)||(o.model.dataSource=e),c(e)}),b("keydown.enter",function(){a(i);let e=r();return c(e.onDatasourceChanged())})("choose",function(){a(i);let e=r();return c(e.onSelectDataSource())}),d(),l(7,"label"),m(8,"Reference to"),d(),l(9,"ng-select",4),C("ngModelChange",function(e){a(i);let o=r();return _(o.model.dataLink,e)||(o.model.dataLink=e),c(e)}),b("change",function(){a(i);let e=r();return c(e.onLinkChange())}),d()()}if(g&2){let i=r();h(3),f("ngModel",i.type),p("items",i.widgetTypes)("clearable",!1)("closeOnSelect",!0),h(3),p("required",i.invalid.includes("datasource")),f("ngModel",i.model.dataSource),p("chooseButton",!0),h(3),p("items",i.widgetList),f("ngModel",i.model.dataLink),p("clearable",!1)("closeOnSelect",!0)}}var K=(()=>{let s=class s{constructor(n,e,o){this.ms=n,this.eds=e,this.ds=o,this.invalid=[],this.widgetList=[],this.widgetTypes=[t.pivot,t.columnChart,t.columnChartStacked,t.columnChart3D,t.barChart,t.barChartStacked,t.lineChart,t.lineChartMarkers,t.comboChart,t.hilowChart,t.areaChart,t.bubbleChart,t.xyChart,t.pieChart,t.pieChart3D,t.donutChart,t.donutChart3D,t.treeMapChart,t.bullseyeChart,t.timeChart,t.regular,t.textMeter,t.map]}ngOnInit(){this.widgetList=this.eds.getWidgetsList([this.model?.name??""]),this.type=t[this.model?.type?.toLowerCase()??""]}onSelectDataSource(){this.ms.show({title:"Choose data source",component:import("./chunk-LRZVYFUR.js"),buttons:[{label:"Cancel",autoClose:!0}],closeByEsc:!0,search:"",minHeight:!0,outputs:{select:n=>{this.model&&(this.model.dataSource=n.value+"."+n.type),this.onDatasourceChanged()}}})}ngOnDestroy(){this.eds.cancelEditing()}onTypeChange(){this.model&&(this.model.type=Object.entries(t).find(n=>n[1]===this.type)?.[0]||"",this.eds.updateEditedWidget({widget:this.model,reCreate:!0}))}onDatasourceChanged(){this.model&&this.eds.generateWidgetMdx(this.model).then(()=>{this.model&&this.eds.updateEditedWidget({widget:this.model,refreshData:!0})})}onLinkChange(){this.model&&this.eds.updateEditedWidget({widget:this.model,reCreate:!0})}onSave(){this.model&&this.eds.save(this.model)}};s.\u0275fac=function(e){return new(e||s)(u(E),u(V),u(D))},s.\u0275cmp=x({type:s,selectors:[["dsw-type-and-ds"]],inputs:{model:"model",invalid:"invalid"},standalone:!0,features:[M],decls:3,vars:3,consts:[[3,"apply","isWidgetEditorWarning","isBack"],[1,"container"],["bindLabel","label",1,"dsw",3,"ngModelChange","change","ngModel","items","clearable","closeOnSelect"],[3,"ngModelChange","keydown.enter","choose","required","ngModel","chooseButton"],["bindLabel","label","bindValue","name",1,"dsw",3,"ngModelChange","change","items","ngModel","clearable","closeOnSelect"]],template:function(e,o){e&1&&(l(0,"dsw-sidebar-actions",0),b("apply",function(){return o.onSave()}),m(1,` Type & Datasource +import{a as T}from"./chunk-KT37IQUX.js";import{a as A}from"./chunk-PPMZCCVB.js";import{d as t}from"./chunk-UGM4WZSG.js";import"./chunk-54YLOEMX.js";import"./chunk-Y4WNFABU.js";import{a as F,b as W}from"./chunk-UR6JO2ME.js";import{a as V}from"./chunk-J6F3GFQR.js";import{a as E}from"./chunk-RNWIIYZZ.js";import"./chunk-SUAWKU6Z.js";import{b as D}from"./chunk-4CDX576O.js";import{d as O,e as S,i as P,j as k}from"./chunk-4NDDWB77.js";import"./chunk-B3AVEPVB.js";import{$a as h,$b as _,Db as l,Eb as d,Jb as v,Nb as b,Ob as r,Xb as m,_b as f,ab as u,ac as C,cc as M,fa as x,qa as a,ra as c,rb as w,tb as p,yb as y}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function L(g,s){if(g&1){let i=v();l(0,"div",1)(1,"label"),m(2,"Widget type"),d(),l(3,"ng-select",2),C("ngModelChange",function(e){a(i);let o=r();return _(o.type,e)||(o.type=e),c(e)}),b("change",function(){a(i);let e=r();return c(e.onTypeChange())}),d(),l(4,"label"),m(5,"Data source"),d(),l(6,"dsw-input",3),C("ngModelChange",function(e){a(i);let o=r();return _(o.model.dataSource,e)||(o.model.dataSource=e),c(e)}),b("keydown.enter",function(){a(i);let e=r();return c(e.onDatasourceChanged())})("choose",function(){a(i);let e=r();return c(e.onSelectDataSource())}),d(),l(7,"label"),m(8,"Reference to"),d(),l(9,"ng-select",4),C("ngModelChange",function(e){a(i);let o=r();return _(o.model.dataLink,e)||(o.model.dataLink=e),c(e)}),b("change",function(){a(i);let e=r();return c(e.onLinkChange())}),d()()}if(g&2){let i=r();h(3),f("ngModel",i.type),p("items",i.widgetTypes)("clearable",!1)("closeOnSelect",!0),h(3),p("required",i.invalid.includes("datasource")),f("ngModel",i.model.dataSource),p("chooseButton",!0),h(3),p("items",i.widgetList),f("ngModel",i.model.dataLink),p("clearable",!1)("closeOnSelect",!0)}}var K=(()=>{let s=class s{constructor(n,e,o){this.ms=n,this.eds=e,this.ds=o,this.invalid=[],this.widgetList=[],this.widgetTypes=[t.pivot,t.columnChart,t.columnChartStacked,t.columnChart3D,t.barChart,t.barChartStacked,t.lineChart,t.lineChartMarkers,t.comboChart,t.hilowChart,t.areaChart,t.bubbleChart,t.xyChart,t.pieChart,t.pieChart3D,t.donutChart,t.donutChart3D,t.treeMapChart,t.bullseyeChart,t.timeChart,t.regular,t.textMeter,t.map]}ngOnInit(){this.widgetList=this.eds.getWidgetsList([this.model?.name??""]),this.type=t[this.model?.type?.toLowerCase()??""]}onSelectDataSource(){this.ms.show({title:"Choose data source",component:import("./chunk-LRZVYFUR.js"),buttons:[{label:"Cancel",autoClose:!0}],closeByEsc:!0,search:"",minHeight:!0,outputs:{select:n=>{this.model&&(this.model.dataSource=n.value+"."+n.type),this.onDatasourceChanged()}}})}ngOnDestroy(){this.eds.cancelEditing()}onTypeChange(){this.model&&(this.model.type=Object.entries(t).find(n=>n[1]===this.type)?.[0]||"",this.eds.updateEditedWidget({widget:this.model,reCreate:!0}))}onDatasourceChanged(){this.model&&this.eds.generateWidgetMdx(this.model).then(()=>{this.model&&this.eds.updateEditedWidget({widget:this.model,refreshData:!0})})}onLinkChange(){this.model&&this.eds.updateEditedWidget({widget:this.model,reCreate:!0})}onSave(){this.model&&this.eds.save(this.model)}};s.\u0275fac=function(e){return new(e||s)(u(E),u(V),u(D))},s.\u0275cmp=x({type:s,selectors:[["dsw-type-and-ds"]],inputs:{model:"model",invalid:"invalid"},standalone:!0,features:[M],decls:3,vars:3,consts:[[3,"apply","isWidgetEditorWarning","isBack"],[1,"container"],["bindLabel","label",1,"dsw",3,"ngModelChange","change","ngModel","items","clearable","closeOnSelect"],[3,"ngModelChange","keydown.enter","choose","required","ngModel","chooseButton"],["bindLabel","label","bindValue","name",1,"dsw",3,"ngModelChange","change","items","ngModel","clearable","closeOnSelect"]],template:function(e,o){e&1&&(l(0,"dsw-sidebar-actions",0),b("apply",function(){return o.onSave()}),m(1,` Type & Datasource `),d(),w(2,L,10,11,"div",1)),e&2&&(p("isWidgetEditorWarning",!0)("isBack",!0),h(2),y(o.model?2:-1))},dependencies:[A,W,F,k,O,P,S,T],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;padding-bottom:20px;transition:transform 2s linear;min-width:var(--sidebar-width)}.container[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding-left:20px;flex:1 1 100%}.container[_ngcontent-%COMP%]::-webkit-scrollbar{width:20px;height:4px}.container[_ngcontent-%COMP%]::-webkit-scrollbar-track{border-left:solid 16px var(--cl-bg);background:#ebebea}.container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-left:solid 16px var(--cl-bg);border-radius:0;background:#1c1d2066}label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-family:Oxygen;color:var(--cl-sidebar-txt);margin-top:10px;margin-bottom:2px;font-size:14px;width:calc(100% - 4px)}input[_ngcontent-%COMP%]{margin-bottom:4px}.divider[_ngcontent-%COMP%]{display:block;width:100%;clear:both}.btn-section[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;background-color:#fff;padding:10px;color:#1a73e8;font-size:14px;line-height:16px;border:1px solid #EBEBEA;border-radius:4px;width:100%;cursor:pointer;transition:background-color .3s linear}.btn-section[_ngcontent-%COMP%]:not(.disabled):hover{background-color:#1a73e80d}.btn-section[_ngcontent-%COMP%]:not(.disabled):active{transform:translateY(1px)}.headline[_ngcontent-%COMP%]{text-align:center;margin-bottom:10px}.navigation[_ngcontent-%COMP%]{margin-top:20px}.navigation[_ngcontent-%COMP%] > .btn-section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.navigation[_ngcontent-%COMP%] > .headline[_ngcontent-%COMP%]{margin-top:20px}.disabled[_ngcontent-%COMP%]{cursor:default;filter:grayscale(1);opacity:.5}.footer[_ngcontent-%COMP%]{padding-left:20px}.footer[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{margin-top:20px}.footer[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%}.color-rect[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;display:inline-flex;position:relative;align-items:center;justify-content:center;cursor:pointer;width:32px;height:32px;margin-right:4px;margin-bottom:4px;border:var(--tile-border);font-size:24px;outline-offset:-2px;float:left;background-size:60%}.color-rect[_ngcontent-%COMP%]:hover{outline:1px solid var(--cl-accent)}.color-rect.active[_ngcontent-%COMP%]{outline:3px solid var(--cl-accent)}.color-rect.small[_ngcontent-%COMP%]{width:32px}"]});let g=s;return g})();export{K as TypeAndDatasourceComponent}; diff --git a/dist/chunk-FBUH7ZHS.js b/dist/chunk-S4GJMTKD.js similarity index 98% rename from dist/chunk-FBUH7ZHS.js rename to dist/chunk-S4GJMTKD.js index 9b17707b..cec2a29b 100644 --- a/dist/chunk-FBUH7ZHS.js +++ b/dist/chunk-S4GJMTKD.js @@ -1 +1 @@ -import{a as D}from"./chunk-V6EVLSKF.js";import{a as A}from"./chunk-EAEBZZLM.js";import{a as T}from"./chunk-RNWIIYZZ.js";import{a as I}from"./chunk-SUAWKU6Z.js";import{D as O,F as E,H as P,t as S,u as y,w as F}from"./chunk-B3AVEPVB.js";import{$a as g,Db as n,Eb as o,Fb as r,Jb as v,Nb as d,Ob as _,Xb as c,Zb as x,ab as a,cc as C,fa as w,hc as k,ic as M,qa as p,ra as b,rb as u,yb as f}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function V(s,l){if(s&1){let h=v();n(0,"li",5),d("click",function(){p(h);let t=_();return b(t.gotoZenDeepSee())}),r(1,"img",10),c(2),k(3,"i18n"),o()}s&2&&(g(2),x(" ",M(3,1,"gotoDeepSee")," "))}function L(s,l){if(s&1){let h=v();n(0,"li",2),d("click",function(){p(h);let t=_();return b(t.editDashboard())}),r(1,"img",11),c(2," Edit dashboard "),o()}}var U=(()=>{let l=class l{constructor(e,t,i,m,H,j,B){this.router=e,this.route=t,this.ds=i,this.ms=m,this.modal=H,this.sbs=j,this.hs=B,this.isHome=!1,this.version=E.const.ver,this.checkHome()}ngOnInit(){this.subOnRouteChange=this.router.events.subscribe(e=>{e instanceof S&&this.checkHome()})}ngOnDestroy(){this.subOnRouteChange?.unsubscribe()}checkHome(){let e=this.router.url.split("/");this.isHome=!e[e.length-1]?.endsWith(".dashboard")}editDashboard(){this.hs.resetSearch(),this.ms.onEditDashboard.emit(!0)}logout(){this.ds.signOut()}showNamespaceSelector(){this.sbs.showComponent({component:import("./chunk-W6CPS5HH.js")})}showLanguageSelector(){this.sbs.showComponent({component:import("./chunk-3I3QA2NQ.js")})}showAboutDialog(){this.modal.show({title:"DeepSeeWeb v."+this.version,component:import("./chunk-LLXXIN4B.js"),closeByEsc:!0,closeByBackdropClick:!0}),this.sbs.hide()}showSettingsMenu(){this.sbs.showComponent({component:import("./chunk-T32QXP2R.js")})}shareDashboard(){this.hs.shareDashboard()}gotoZenDeepSee(){this.hs.gotoZenDeepSee()}};l.\u0275fac=function(t){return new(t||l)(a(F),a(y),a(P),a(A),a(T),a(I),a(D))},l.\u0275cmp=w({type:l,selectors:[["dsw-menu"]],standalone:!0,features:[C],decls:21,vars:3,consts:[[1,"only-sm"],[1,"divider","only-sm"],[3,"click"],["src","assets/img/icons/icon-settings.svg"],["src","assets/img/icons/icon-namespace.svg"],[1,"only-sm",3,"click"],["src","assets/img/icons/language-24px.svg"],["src","assets/img/icons/icon-info.svg"],["src","assets/img/icons/icon-logout.svg"],[1,"version"],["src","assets/img/icons/icon-navigate.svg"],["src","assets/img/icons/icon-edit.svg"]],template:function(t,i){t&1&&(n(0,"ul"),u(1,V,4,3,"li",0),r(2,"div",1),u(3,L,3,0,"li"),n(4,"li",2),d("click",function(){return i.showSettingsMenu()}),r(5,"img",3),c(6," Settings "),o(),n(7,"li",2),d("click",function(){return i.showNamespaceSelector()}),r(8,"img",4),c(9," Namespace "),o(),n(10,"li",5),d("click",function(){return i.showLanguageSelector()}),r(11,"img",6),c(12," Language "),o(),n(13,"li",2),d("click",function(){return i.showAboutDialog()}),r(14,"img",7),c(15," About "),o(),n(16,"li",5),d("click",function(){return i.logout()}),r(17,"img",8),c(18," Logout "),o()(),n(19,"span",9),c(20),o()),t&2&&(g(),f(i.isHome?-1:1),g(2),f(i.isHome?3:-1),g(17),x("v.",i.version,""))},dependencies:[O],styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;display:block;height:100%;-webkit-user-select:none;user-select:none}ul[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:30px 0 0}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}li[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;font-family:Oxygen;color:var(--cl-header-txt);font-size:14px;background-color:var(--cl-sidebar-bg);cursor:pointer;transition:background-color .3s linear;white-space:nowrap;padding:10px 15px 10px 40px;border-radius:0 40px 40px 0}li[_ngcontent-%COMP%]:hover{background-color:var(--cl-hover)}li[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin-right:15px;min-width:18px}li[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:8px}li[_ngcontent-%COMP%]:hover > img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .3s;animation-timing-function:linear}li[_ngcontent-%COMP%]:after{display:block;content:" ";position:absolute;bottom:0;height:1px;left:10px;right:10px;opacity:.2}.version[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-family:Oxygen;font-size:9px;padding:6px;color:var(--cl-header-txt)}.spinner[_ngcontent-%COMP%]{margin-left:86px}.divider[_ngcontent-%COMP%]{height:1px;width:100%;background-color:var(--cl-header-border)}']});let s=l;return s})();export{U as MenuComponent}; +import{a as D}from"./chunk-V6EVLSKF.js";import{a as A}from"./chunk-EAEBZZLM.js";import{a as T}from"./chunk-RNWIIYZZ.js";import{a as I}from"./chunk-SUAWKU6Z.js";import{D as O,F as E,H as P,t as S,u as y,w as F}from"./chunk-B3AVEPVB.js";import{$a as g,Db as n,Eb as o,Fb as r,Jb as v,Nb as d,Ob as _,Xb as c,Zb as x,ab as a,cc as C,fa as w,hc as k,ic as M,qa as p,ra as b,rb as u,yb as f}from"./chunk-ZKAUCJHV.js";import"./chunk-DEPBX7UX.js";function V(s,l){if(s&1){let h=v();n(0,"li",5),d("click",function(){p(h);let t=_();return b(t.gotoZenDeepSee())}),r(1,"img",10),c(2),k(3,"i18n"),o()}s&2&&(g(2),x(" ",M(3,1,"gotoDeepSee")," "))}function L(s,l){if(s&1){let h=v();n(0,"li",2),d("click",function(){p(h);let t=_();return b(t.editDashboard())}),r(1,"img",11),c(2," Edit dashboard "),o()}}var U=(()=>{let l=class l{constructor(e,t,i,m,H,j,B){this.router=e,this.route=t,this.ds=i,this.ms=m,this.modal=H,this.sbs=j,this.hs=B,this.isHome=!1,this.version=E.const.ver,this.checkHome()}ngOnInit(){this.subOnRouteChange=this.router.events.subscribe(e=>{e instanceof S&&this.checkHome()})}ngOnDestroy(){this.subOnRouteChange?.unsubscribe()}checkHome(){let e=this.router.url.split("/");this.isHome=!e[e.length-1]?.endsWith(".dashboard")}editDashboard(){this.hs.resetSearch(),this.ms.onEditDashboard.emit(!0)}logout(){this.ds.signOut()}showNamespaceSelector(){this.sbs.showComponent({component:import("./chunk-W6CPS5HH.js")})}showLanguageSelector(){this.sbs.showComponent({component:import("./chunk-3I3QA2NQ.js")})}showAboutDialog(){this.modal.show({title:"DeepSeeWeb v."+this.version,component:import("./chunk-LLXXIN4B.js"),closeByEsc:!0,closeByBackdropClick:!0}),this.sbs.hide()}showSettingsMenu(){this.sbs.showComponent({component:import("./chunk-DBFBQG2E.js")})}shareDashboard(){this.hs.shareDashboard()}gotoZenDeepSee(){this.hs.gotoZenDeepSee()}};l.\u0275fac=function(t){return new(t||l)(a(F),a(y),a(P),a(A),a(T),a(I),a(D))},l.\u0275cmp=w({type:l,selectors:[["dsw-menu"]],standalone:!0,features:[C],decls:21,vars:3,consts:[[1,"only-sm"],[1,"divider","only-sm"],[3,"click"],["src","assets/img/icons/icon-settings.svg"],["src","assets/img/icons/icon-namespace.svg"],[1,"only-sm",3,"click"],["src","assets/img/icons/language-24px.svg"],["src","assets/img/icons/icon-info.svg"],["src","assets/img/icons/icon-logout.svg"],[1,"version"],["src","assets/img/icons/icon-navigate.svg"],["src","assets/img/icons/icon-edit.svg"]],template:function(t,i){t&1&&(n(0,"ul"),u(1,V,4,3,"li",0),r(2,"div",1),u(3,L,3,0,"li"),n(4,"li",2),d("click",function(){return i.showSettingsMenu()}),r(5,"img",3),c(6," Settings "),o(),n(7,"li",2),d("click",function(){return i.showNamespaceSelector()}),r(8,"img",4),c(9," Namespace "),o(),n(10,"li",5),d("click",function(){return i.showLanguageSelector()}),r(11,"img",6),c(12," Language "),o(),n(13,"li",2),d("click",function(){return i.showAboutDialog()}),r(14,"img",7),c(15," About "),o(),n(16,"li",5),d("click",function(){return i.logout()}),r(17,"img",8),c(18," Logout "),o()(),n(19,"span",9),c(20),o()),t&2&&(g(),f(i.isHome?-1:1),g(2),f(i.isHome?3:-1),g(17),x("v.",i.version,""))},dependencies:[O],styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;display:block;height:100%;-webkit-user-select:none;user-select:none}ul[_ngcontent-%COMP%]{list-style-type:none;margin:0;padding:30px 0 0}@keyframes _ngcontent-%COMP%_pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}li[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;font-family:Oxygen;color:var(--cl-header-txt);font-size:14px;background-color:var(--cl-sidebar-bg);cursor:pointer;transition:background-color .3s linear;white-space:nowrap;padding:10px 15px 10px 40px;border-radius:0 40px 40px 0}li[_ngcontent-%COMP%]:hover{background-color:var(--cl-hover)}li[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{margin-right:15px;min-width:18px}li[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{margin-right:8px}li[_ngcontent-%COMP%]:hover > img[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pulse .3s;animation-timing-function:linear}li[_ngcontent-%COMP%]:after{display:block;content:" ";position:absolute;bottom:0;height:1px;left:10px;right:10px;opacity:.2}.version[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;font-family:Oxygen;font-size:9px;padding:6px;color:var(--cl-header-txt)}.spinner[_ngcontent-%COMP%]{margin-left:86px}.divider[_ngcontent-%COMP%]{height:1px;width:100%;background-color:var(--cl-header-border)}']});let s=l;return s})();export{U as MenuComponent}; diff --git a/dist/chunk-NIX3K3AA.js b/dist/chunk-UGM4WZSG.js similarity index 87% rename from dist/chunk-NIX3K3AA.js rename to dist/chunk-UGM4WZSG.js index 57eb01c4..3bee43bc 100644 --- a/dist/chunk-NIX3K3AA.js +++ b/dist/chunk-UGM4WZSG.js @@ -1,4 +1,4 @@ -import{a as Jn}from"./chunk-54YLOEMX.js";import{a as vh}from"./chunk-Y4WNFABU.js";import{a as zr}from"./chunk-SUAWKU6Z.js";import{a as yh,b as bh}from"./chunk-4CDX576O.js";import{E as fh,F as Ae,H as gh,I as mh,J as xh,K as xs,r as uh,u as ph}from"./chunk-B3AVEPVB.js";import{$a as Dt,Ab as ne,Ba as ah,Bb as oe,Bc as dh,Cb as ae,Db as Lt,Eb as kt,Fb as le,Jb as hh,Nb as ch,Ob as Nt,Tb as $i,Ub as Ji,Vb as Qi,X as ih,Xa as fs,Xb as ie,Yb as Te,Zb as ms,ba as $t,cc as bt,fa as yt,gb as lh,lb as vt,qa as sh,ra as rh,rb as $s,sa as nh,ta as oh,tb as gs,ua as St,ub as Ee,vb as je,yb as Js}from"./chunk-ZKAUCJHV.js";import{a as xe,b as qi,d as qe,f as qt,g as eh,h as Yt}from"./chunk-DEPBX7UX.js";var ys=qe((Ch,Nr)=>{"use strict";(function(o,t){typeof define=="function"&&define.amd?define(t):typeof Nr=="object"&&Nr.exports?Nr.exports=t():o.numeral=t()})(Ch,function(){var o,t,s="2.0.6",e={},i={},r={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},n={currentLocale:r.currentLocale,zeroFormat:r.zeroFormat,nullFormat:r.nullFormat,defaultFormat:r.defaultFormat,scalePercentBy100:r.scalePercentBy100};function l(a,h){this._input=a,this._value=h}return o=function(a){var h,c,g,u;if(o.isNumeral(a))h=a.value();else if(a===0||typeof a>"u")h=0;else if(a===null||t.isNaN(a))h=null;else if(typeof a=="string")if(n.zeroFormat&&a===n.zeroFormat)h=0;else if(n.nullFormat&&a===n.nullFormat||!a.replace(/[^0-9]+/g,"").length)h=null;else{for(c in e)if(u=typeof e[c].regexps.unformat=="function"?e[c].regexps.unformat():e[c].regexps.unformat,u&&a.match(u)){g=e[c].unformat;break}g=g||o._.stringToNumber,h=g(a)}else h=Number(a)||null;return new l(a,h)},o.version=s,o.isNumeral=function(a){return a instanceof l},o._=t={numberToFormat:function(a,h,c){var g=i[o.options.currentLocale],u=!1,p=!1,b=0,v="",x=1e12,m=1e9,E=1e6,L=1e3,S="",w=!1,R,O,I,_,P,F,A,D,C,d;if(a=a||0,O=Math.abs(a),o._.includes(h,"(")?(u=!0,h=h.replace(/[\(|\)]/g,"")):(o._.includes(h,"+")||o._.includes(h,"-"))&&(D=o._.includes(h,"+")?h.indexOf("+"):a<0?h.indexOf("-"):-1,h=h.replace(/[\+|\-]/g,"")),o._.includes(h,"a")&&(R=h.match(/a(k|m|b|t)?/),R=R?R[1]:!1,o._.includes(h," a")&&(v=" "),h=h.replace(new RegExp(v+"a[kmbt]?"),""),O>=x&&!R||R==="t"?(v+=g.abbreviations.trillion,a=a/x):O=m&&!R||R==="b"?(v+=g.abbreviations.billion,a=a/m):O=E&&!R||R==="m"?(v+=g.abbreviations.million,a=a/E):(O=L&&!R||R==="k")&&(v+=g.abbreviations.thousand,a=a/L)),o._.includes(h,"[.]")&&(p=!0,h=h.replace("[.]",".")),F=a.toString().split(".")[0],A=h.split(".")[1],C=h.indexOf(","),b=(h.split(".")[0].split(",")[0].match(/0/g)||[]).length,A?(o._.includes(A,"[")?(A=A.replace("]",""),A=A.split("["),S=o._.toFixed(a,A[0].length+A[1].length,c,A[1].length)):S=o._.toFixed(a,A.length,c),F=S.split(".")[0],o._.includes(S,".")?S=g.delimiters.decimal+S.split(".")[1]:S="",p&&Number(S.slice(1))===0&&(S="")):F=o._.toFixed(a,0,c),v&&!R&&Number(F)>=1e3&&v!==g.abbreviations.trillion)switch(F=String(Number(F)/1e3),v){case g.abbreviations.thousand:v=g.abbreviations.million;break;case g.abbreviations.million:v=g.abbreviations.billion;break;case g.abbreviations.billion:v=g.abbreviations.trillion;break}if(o._.includes(F,"-")&&(F=F.slice(1),w=!0),F.length0;f--)F="0"+F;return C>-1&&(F=F.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),h.indexOf(".")===0&&(F=""),d=F+S+(v||""),u?d=(u&&w?"(":"")+d+(u&&w?")":""):D>=0?d=D===0?(w?"-":"+")+d:d+(w?"-":"+"):w&&(d="-"+d),d},stringToNumber:function(a){var h=i[n.currentLocale],c=a,g={thousand:3,million:6,billion:9,trillion:12},u,p,b,v;if(n.zeroFormat&&a===n.zeroFormat)p=0;else if(n.nullFormat&&a===n.nullFormat||!a.replace(/[^0-9]+/g,"").length)p=null;else{p=1,h.delimiters.decimal!=="."&&(a=a.replace(/\./g,"").replace(h.delimiters.decimal,"."));for(u in g)if(v=new RegExp("[^a-zA-Z]"+h.abbreviations[u]+"(?:\\)|(\\"+h.currency.symbol+")?(?:\\))?)?$"),c.match(v)){p*=Math.pow(10,g[u]);break}p*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),p*=Number(a)}return p},isNaN:function(a){return typeof a=="number"&&isNaN(a)},includes:function(a,h){return a.indexOf(h)!==-1},insert:function(a,h,c){return a.slice(0,c)+h+a.slice(c)},reduce:function(a,h){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof h!="function")throw new TypeError(h+" is not a function");var c=Object(a),g=c.length>>>0,u=0,p;if(arguments.length===3)p=arguments[2];else{for(;u=g)throw new TypeError("Reduce of empty array with no initial value");p=c[u++]}for(;ug?h:g},1)},toFixed:function(a,h,c,g){var u=a.toString().split("."),p=h-(g||0),b,v,x,m;return u.length===2?b=Math.min(Math.max(u[1].length,p),h):b=p,x=Math.pow(10,b),m=(c(a+"e+"+b)/x).toFixed(b),g>h-b&&(v=new RegExp("\\.?0{1,"+(g-(h-b))+"}$"),m=m.replace(v,"")),m}},o.options=n,o.formats=e,o.locales=i,o.locale=function(a){return a&&(n.currentLocale=a.toLowerCase()),n.currentLocale},o.localeData=function(a){if(!a)return i[n.currentLocale];if(a=a.toLowerCase(),!i[a])throw new Error("Unknown locale : "+a);return i[a]},o.reset=function(){for(var a in r)n[a]=r[a]},o.zeroFormat=function(a){n.zeroFormat=typeof a=="string"?a:null},o.nullFormat=function(a){n.nullFormat=typeof a=="string"?a:null},o.defaultFormat=function(a){n.defaultFormat=typeof a=="string"?a:"0.0"},o.register=function(a,h,c){if(h=h.toLowerCase(),this[a+"s"][h])throw new TypeError(h+" "+a+" already registered.");return this[a+"s"][h]=c,c},o.validate=function(a,h){var c,g,u,p,b,v,x,m;if(typeof a!="string"&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(a==="")return!1;try{x=o.localeData(h)}catch{x=o.localeData(o.locale())}return u=x.currency.symbol,b=x.abbreviations,c=x.delimiters.decimal,x.delimiters.thousands==="."?g="\\.":g=x.delimiters.thousands,m=a.match(/^[^\d]+/),m!==null&&(a=a.substr(1),m[0]!==u)||(m=a.match(/[^\d]+$/),m!==null&&(a=a.slice(0,-1),m[0]!==b.thousand&&m[0]!==b.million&&m[0]!==b.billion&&m[0]!==b.trillion))?!1:(v=new RegExp(g+"{2}"),a.match(/[^\d.,]/g)?!1:(p=a.split(c),p.length>2?!1:p.length<2?!!p[0].match(/^\d+.*\d$/)&&!p[0].match(v):p[0].length===1?!!p[0].match(/^\d+$/)&&!p[0].match(v)&&!!p[1].match(/^\d+$/):!!p[0].match(/^\d+.*\d$/)&&!p[0].match(v)&&!!p[1].match(/^\d+$/)))},o.fn=l.prototype={clone:function(){return o(this)},format:function(a,h){var c=this._value,g=a||n.defaultFormat,u,p,b;if(h=h||Math.round,c===0&&n.zeroFormat!==null)p=n.zeroFormat;else if(c===null&&n.nullFormat!==null)p=n.nullFormat;else{for(u in e)if(g.match(e[u].regexps.format)){b=e[u].format;break}b=b||o._.numberToFormat,p=b(c,g,h)}return p},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){var h=t.correctionFactor.call(null,this._value,a);function c(g,u,p,b){return g+Math.round(h*u)}return this._value=t.reduce([this._value,a],c,0)/h,this},subtract:function(a){var h=t.correctionFactor.call(null,this._value,a);function c(g,u,p,b){return g-Math.round(h*u)}return this._value=t.reduce([a],c,Math.round(this._value*h))/h,this},multiply:function(a){function h(c,g,u,p){var b=t.correctionFactor(c,g);return Math.round(c*b)*Math.round(g*b)/Math.round(b*b)}return this._value=t.reduce([this._value,a],h,1),this},divide:function(a){function h(c,g,u,p){var b=t.correctionFactor(c,g);return Math.round(c*b)/Math.round(g*b)}return this._value=t.reduce([this._value,a],h),this},difference:function(a){return Math.abs(o(this._value).subtract(a).value())}},o.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var h=a%10;return~~(a%100/10)===1?"th":h===1?"st":h===2?"nd":h===3?"rd":"th"},currency:{symbol:"$"}}),function(){o.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,h,c){var g=o._.includes(h," BPS")?" ":"",u;return a=a*1e4,h=h.replace(/\s?BPS/,""),u=o._.numberToFormat(a,h,c),o._.includes(u,")")?(u=u.split(""),u.splice(-1,0,g+"BPS"),u=u.join("")):u=u+g+"BPS",u},unformat:function(a){return+(o._.stringToNumber(a)*1e-4).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},h={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},c=a.suffixes.concat(h.suffixes.filter(function(u){return a.suffixes.indexOf(u)<0})),g=c.join("|");g="("+g.replace("B","B(?!PS)")+")",o.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(g)},format:function(u,p,b){var v,x=o._.includes(p,"ib")?h:a,m=o._.includes(p," b")||o._.includes(p," ib")?" ":"",E,L,S;for(p=p.replace(/\s?i?b/,""),E=0;E<=x.suffixes.length;E++)if(L=Math.pow(x.base,E),S=Math.pow(x.base,E+1),u===null||u===0||u>=L&&u0&&(u=u/L);break}return v=o._.numberToFormat(u,p,b),v+m},unformat:function(u){var p=o._.stringToNumber(u),b,v;if(p){for(b=a.suffixes.length-1;b>=0;b--){if(o._.includes(u,a.suffixes[b])){v=Math.pow(a.base,b);break}if(o._.includes(u,h.suffixes[b])){v=Math.pow(h.base,b);break}}p*=v||1}return p}})}(),function(){o.register("format","currency",{regexps:{format:/(\$)/},format:function(a,h,c){var g=o.locales[o.options.currentLocale],u={before:h.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:h.match(/([\+|\-|\)|\s|\$]*)$/)[0]},p,b,v;for(h=h.replace(/\s?\$\s?/,""),p=o._.numberToFormat(a,h,c),a>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):a<0&&!o._.includes(u.before,"-")&&!o._.includes(u.before,"(")&&(u.before="-"+u.before),v=0;v=0;v--)switch(b=u.after[v],b){case"$":p=v===u.after.length-1?p+g.currency.symbol:o._.insert(p,g.currency.symbol,-(u.after.length-(1+v)));break;case" ":p=v===u.after.length-1?p+" ":o._.insert(p," ",-(u.after.length-(1+v)+g.currency.symbol.length-1));break}return p}})}(),function(){o.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(a,h,c){var g,u=typeof a=="number"&&!o._.isNaN(a)?a.toExponential():"0e+0",p=u.split("e");return h=h.replace(/e[\+|\-]{1}0/,""),g=o._.numberToFormat(Number(p[0]),h,c),g+"e"+p[1]},unformat:function(a){var h=o._.includes(a,"e+")?a.split("e+"):a.split("e-"),c=Number(h[0]),g=Number(h[1]);g=o._.includes(a,"e-")?g*=-1:g;function u(p,b,v,x){var m=o._.correctionFactor(p,b),E=p*m*(b*m)/(m*m);return E}return o._.reduce([c,Math.pow(10,g)],u,1)}})}(),function(){o.register("format","ordinal",{regexps:{format:/(o)/},format:function(a,h,c){var g=o.locales[o.options.currentLocale],u,p=o._.includes(h," o")?" ":"";return h=h.replace(/\s?o/,""),p+=g.ordinal(a),u=o._.numberToFormat(a,h,c),u+p}})}(),function(){o.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(a,h,c){var g=o._.includes(h," %")?" ":"",u;return o.options.scalePercentBy100&&(a=a*100),h=h.replace(/\s?\%/,""),u=o._.numberToFormat(a,h,c),o._.includes(u,")")?(u=u.split(""),u.splice(-1,0,g+"%"),u=u.join("")):u=u+g+"%",u},unformat:function(a){var h=o._.stringToNumber(a);return o.options.scalePercentBy100?h*.01:h}})}(),function(){o.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(a,h,c){var g=Math.floor(a/60/60),u=Math.floor((a-g*60*60)/60),p=Math.round(a-g*60*60-u*60);return g+":"+(u<10?"0"+u:u)+":"+(p<10?"0"+p:p)},unformat:function(a){var h=a.split(":"),c=0;return h.length===3?(c=c+Number(h[0])*60*60,c=c+Number(h[1])*60,c=c+Number(h[2])):h.length===2&&(c=c+Number(h[0])*60,c=c+Number(h[1])),Number(c)}})}(),o})});var Ua=qe((Ya,Va)=>{"use strict";(function(o,t){typeof Ya=="object"&&typeof Va<"u"?Va.exports=t():typeof define=="function"&&define.amd?define(t):(o=o||self).RBush=t()})(Ya,function(){"use strict";function o(x,m,E,L,S){(function w(R,O,I,_,P){for(;_>I;){if(_-I>600){var F=_-I+1,A=O-I+1,D=Math.log(F),C=.5*Math.exp(2*D/3),d=.5*Math.sqrt(D*C*(F-C)/F)*(A-F/2<0?-1:1),f=Math.max(I,Math.floor(O-A*C/F+d)),y=Math.min(_,Math.floor(O+(F-A)*C/F+d));w(R,O,f,y,P)}var M=R[O],k=I,T=_;for(t(R,I,O),P(R[_],M)>0&&t(R,I,_);k0;)T--}P(R[I],M)===0?t(R,I,T):t(R,++T,_),T<=O&&(I=T+1),O<=T&&(_=T-1)}})(x,m,E||0,L||x.length-1,S||s)}function t(x,m,E){var L=x[m];x[m]=x[E],x[E]=L}function s(x,m){return xm?1:0}var e=function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(x,m,E){if(!E)return m.indexOf(x);for(var L=0;L=x.minX&&m.maxY>=x.minY}function b(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(x,m,E,L,S){for(var w=[m,E];w.length;)if(!((E=w.pop())-(m=w.pop())<=L)){var R=m+Math.ceil((E-m)/L/2)*L;o(x,R,m,E,S),w.push(m,R,R,E)}}return e.prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(x){var m=this.data,E=[];if(!p(x,m))return E;for(var L=this.toBBox,S=[];m;){for(var w=0;w=0&&S[m].children.length>this._maxEntries;)this._split(S,m),m--;this._adjustParentBBoxes(L,S,m)},e.prototype._split=function(x,m){var E=x[m],L=E.children.length,S=this._minEntries;this._chooseSplitAxis(E,S,L);var w=this._chooseSplitIndex(E,S,L),R=b(E.children.splice(w,E.children.length-w));R.height=E.height,R.leaf=E.leaf,r(E,this.toBBox),r(R,this.toBBox),m?x[m-1].children.push(R):this._splitRoot(E,R)},e.prototype._splitRoot=function(x,m){this.data=b([x,m]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(x,m,E){for(var L,S,w,R,O,I,_,P=1/0,F=1/0,A=m;A<=E-m;A++){var D=n(x,0,A,this.toBBox),C=n(x,A,E,this.toBBox),d=(S=D,w=C,R=void 0,O=void 0,I=void 0,_=void 0,R=Math.max(S.minX,w.minX),O=Math.max(S.minY,w.minY),I=Math.min(S.maxX,w.maxX),_=Math.min(S.maxY,w.maxY),Math.max(0,I-R)*Math.max(0,_-O)),f=c(D)+c(C);d=m;P--){var F=x.children[P];l(R,x.leaf?S(F):F),O+=g(R)}return O},e.prototype._adjustParentBBoxes=function(x,m,E){for(var L=E;L>=0;L--)l(m[L],x)},e.prototype._condense=function(x){for(var m=x.length-1,E=void 0;m>=0;m--)x[m].children.length===0?m>0?(E=x[m-1].children).splice(E.indexOf(x[m]),1):this.clear():r(x[m],this.toBBox)},e})});var wu=qe((cT,jn)=>{"use strict";(function(o){typeof jn=="object"&&jn.exports?(o.default=o,jn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/map",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisComposition.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r;let{parse:n}=e,{addEvent:l,extend:a,merge:h,pick:c,splat:g}=i;return function(u){let p;function b(){let{userOptions:I}=this;this.colorAxis=[],I.colorAxis&&(I.colorAxis=g(I.colorAxis),I.colorAxis.map(_=>new p(this,_)))}function v(I){let _=this.chart.colorAxis||[],P=C=>{let d=I.allItems.indexOf(C);d!==-1&&(this.destroyItem(I.allItems[d]),I.allItems.splice(d,1))},F=[],A,D;for(_.forEach(function(C){(A=C.options)&&A.showInLegend&&(A.dataClasses&&A.visible?F=F.concat(C.getDataClassLegendSymbols()):A.visible&&F.push(C),C.series.forEach(function(d){(!d.options.showInLegend||A.dataClasses)&&(d.options.legendType==="point"?d.points.forEach(function(f){P(f)}):P(d))}))}),D=F.length;D--;)I.allItems.unshift(F[D])}function x(I){I.visible&&I.item.legendColor&&I.item.legendItem.symbol.attr({fill:I.item.legendColor})}function m(I){this.chart.colorAxis?.forEach(_=>{_.update({},I.redraw)})}function E(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function L(){let I=this.axisTypes;I?I.indexOf("colorAxis")===-1&&I.push("colorAxis"):this.axisTypes=["colorAxis"]}function S(I){let _=this,P=I?"show":"hide";_.visible=_.options.visible=!!I,["graphic","dataLabel"].forEach(function(F){_[F]&&_[F][P]()}),this.series.buildKDTree()}function w(){let I=this,_=this.data.length?this.data:this.points,P=this.options.nullColor,F=this.colorAxis,A=this.colorKey;_.forEach(D=>{let C=D.getNestedProperty(A),d=D.options.color||(D.isNull||D.value===null?P:F&&C!==void 0?F.toColor(C,D):D.color||I.color);d&&D.color!==d&&(D.color=d,I.options.legendType==="point"&&D.legendItem&&D.legendItem.label&&I.chart.legend.colorizeItem(D,D.visible))})}function R(){this.elem.attr("fill",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}function O(){this.elem.attr("stroke",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}u.compose=function(I,_,P,F,A){let D=_.prototype,C=P.prototype,d=A.prototype;D.collectionsWithUpdate.includes("colorAxis")||(p=I,D.collectionsWithUpdate.push("colorAxis"),D.collectionsWithInit.colorAxis=[D.addColorAxis],l(_,"afterGetAxes",b),function(f){let y=f.prototype.createAxis;f.prototype.createAxis=function(M,k){if(M!=="colorAxis")return y.apply(this,arguments);let T=new p(this,h(k.axis,{index:this[M].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(z=>{z.series=[]}),this.series.forEach(z=>{z.bindAxes(),z.isDirtyData=!0}),c(k.redraw,!0)&&this.redraw(k.animation),T}}(_),C.fillSetter=R,C.strokeSetter=O,l(F,"afterGetAllItems",v),l(F,"afterColorizeItem",x),l(F,"afterUpdate",m),a(d,{optionalAxis:"colorAxis",translateColors:w}),a(d.pointClass.prototype,{setVisible:S}),l(A,"afterTranslate",E,{order:1}),l(A,"bindAxes",L))},u.pointSetVisible=S}(r||(r={})),r}),s(t,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}}),s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/Color/ColorAxis.js",[t["Core/Axis/Axis.js"],t["Core/Axis/Color/ColorAxisComposition.js"],t["Core/Axis/Color/ColorAxisDefaults.js"],t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Defaults.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=l,{series:u}=h,{defined:p,extend:b,fireEvent:v,isArray:x,isNumber:m,merge:E,pick:L,relativeLength:S}=c;g.colorAxis=E(g.xAxis,r);class w extends e{static compose(O,I,_,P){i.compose(w,O,I,_,P)}constructor(O,I){super(O,I),this.coll="colorAxis",this.visible=!0,this.init(O,I)}init(O,I){let _=O.options.legend||{},P=I.layout?I.layout!=="vertical":_.layout!=="vertical";this.side=I.side||P?2:1,this.reversed=I.reversed||!P,this.opposite=!P,super.init(O,I,"colorAxis"),this.userOptions=I,x(O.userOptions.colorAxis)&&(O.userOptions.colorAxis[this.index]=I),I.dataClasses&&this.initDataClasses(I),this.initStops(),this.horiz=P,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(O){let I=E(g.colorAxis,O,{showEmpty:!1,title:null,visible:this.chart.options.legend.enabled&&O.visible!==!1});super.setOptions(I),this.options.crosshair=this.options.marker}setAxisSize(){let O=this.chart,I=this.legendItem?.symbol,{width:_,height:P}=this.getSize();I&&(this.left=+I.attr("x"),this.top=+I.attr("y"),this.width=_=+I.attr("width"),this.height=P=+I.attr("height"),this.right=O.chartWidth-this.left-_,this.bottom=O.chartHeight-this.top-P,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?_:P)||w.defaultLegendLength}getOffset(){let O=this.legendItem?.group,I=this.chart.axisOffset[this.side];if(O){this.axisParent=O,super.getOffset();let _=this.chart.legend;_.allItems.forEach(function(P){P instanceof w&&P.drawLegendSymbol(_,P)}),_.render(),this.chart.getMargins(!0),this.chart.series.some(P=>P.isDrilling)||(this.isDirty=!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=I}}setLegendColor(){let O=this.horiz,I=this.reversed,_=I?1:0,P=I?0:1,F=O?[_,0,P,0]:[0,P,0,_];this.legendColor={linearGradient:{x1:F[0],y1:F[1],x2:F[2],y2:F[3]},stops:this.stops}}drawLegendSymbol(O,I){let _=I.legendItem||{},P=O.padding,F=O.options,A=this.options.labels,D=L(F.itemDistance,10),C=this.horiz,{width:d,height:f}=this.getSize(),y=L(F.labelPadding,C?16:30);this.setLegendColor(),_.symbol||(_.symbol=this.chart.renderer.symbol("roundedRect").attr({r:F.symbolRadius??3,zIndex:1}).add(_.group)),_.symbol.attr({x:0,y:(O.baseline||0)-11,width:d,height:f}),_.labelWidth=d+P+(C?D:L(A.x,A.distance)+(this.maxLabelLength||0)),_.labelHeight=f+P+(C?y:0)}setState(O){this.series.forEach(function(I){I.setState(O)})}setVisible(){}getSeriesExtremes(){let O=this.series,I,_,P,F,A,D,C=O.length,d,f;for(this.dataMin=1/0,this.dataMax=-1/0;C--;){if(_=(D=O[C]).colorKey=L(D.options.colorKey,D.colorKey,D.pointValKey,D.zoneAxis,"y"),F=D.pointArrayMap,A=D[_+"Min"]&&D[_+"Max"],D[_+"Data"])I=D[_+"Data"];else if(F){if(I=[],P=F.indexOf(_),d=D.yData,P>=0&&d)for(f=0;fD+C&&(_=D+C+2),I.plotX=_,I.plotY=this.len-_,super.drawCrosshair(O,I),I.plotX=F,I.plotY=A,this.cross&&!this.cross.addedToColorAxis&&P.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(P.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||typeof this.crosshair!="object"||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(O){let I=this.left,_=O.translatedValue,P=this.top;return m(_)?this.horiz?[["M",_-4,P-6],["L",_+4,P-6],["L",_,P],["Z"]]:[["M",I,_],["L",I-6,_+6],["L",I-6,_-6],["Z"]]:super.getPlotLinePath(O)}update(O,I){let _=this.chart.legend;this.series.forEach(P=>{P.isDirtyData=!0}),(O.dataClasses&&_.allItems||this.dataClasses)&&this.destroyItems(),super.update(O,I),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),_.colorizeItem(this,!0))}destroyItems(){let O=this.chart,I=this.legendItem||{};if(I.label)O.legend.destroyItem(this);else if(I.labels)for(let _ of I.labels)O.legend.destroyItem(_);O.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(O){this.destroyItems(),super.remove(O)}getDataClassLegendSymbols(){let O,I=this,_=I.chart,P=I.legendItem&&I.legendItem.labels||[],F=_.options.legend,A=L(F.valueDecimals,-1),D=L(F.valueSuffix,""),C=d=>I.series.reduce((f,y)=>(f.push(...y.points.filter(M=>M.dataClass===d)),f),[]);return P.length||I.dataClasses.forEach((d,f)=>{let y=d.from,M=d.to,{numberFormatter:k}=_,T=!0;O="",y===void 0?O="< ":M===void 0&&(O="> "),y!==void 0&&(O+=k(y,A)+D),y!==void 0&&M!==void 0&&(O+=" - "),M!==void 0&&(O+=k(M,A)+D),P.push(b({chart:_,name:O,options:{},drawLegendSymbol:a.rectangle,visible:!0,isDataClass:!0,setState:z=>{for(let N of C(f))N.setState(z)},setVisible:function(){this.visible=T=I.visible=!T;let z=[];for(let N of C(f))N.setVisible(T),N.hiddenInDataClass=!T,z.indexOf(N.series)===-1&&z.push(N.series);_.legend.colorizeItem(this,T),z.forEach(N=>{v(N,"afterDataClassLegendClick")})}},d))}),P}getSize(){let{chart:O,horiz:I}=this,{height:_,width:P}=this.options,{legend:F}=O.options;return{width:L(p(P)?S(P,O.chartWidth):void 0,F?.symbolWidth,I?w.defaultLegendLength:12),height:L(p(_)?S(_,O.chartHeight):void 0,F?.symbolHeight,I?12:w.defaultLegendLength)}}}return w.defaultLegendLength=200,w.keepProps=["legendItem"],b(w.prototype,n),Array.prototype.push.apply(e.keepProps,w.keepProps),w}),s(t,"masters/modules/coloraxis.src.js",[t["Core/Globals.js"],t["Core/Axis/Color/ColorAxis.js"]],function(e,i){return e.ColorAxis=e.ColorAxis||i,e.ColorAxis.compose(e.Chart,e.Fx,e.Legend,e.Series),e}),s(t,"Maps/MapNavigationDefaults.js",[],function(){return{lang:{zoomIn:"Zoom in",zoomOut:"Zoom out"},mapNavigation:{buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18,padding:5,style:{color:"#666666",fontSize:"1em",fontWeight:"bold"},theme:{fill:"#ffffff",stroke:"#e6e6e6","stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1}}}),s(t,"Maps/MapPointer.js",[t["Core/Utilities.js"]],function(e){var i;let{defined:r,extend:n,pick:l,wrap:a}=e;return function(h){let c,g=0;function u(x){let m=this.chart;x=this.normalize(x),m.options.mapNavigation.enableDoubleClickZoomTo?m.pointer.inClass(x.target,"highcharts-tracker")&&m.hoverPoint&&m.hoverPoint.zoomTo():m.isInsidePlot(x.chartX-m.plotLeft,x.chartY-m.plotTop)&&m.mapZoom(.5,void 0,void 0,x.chartX,x.chartY)}function p(x){let m=this.chart,E=r((x=this.normalize(x)).wheelDelta)&&-x.wheelDelta/120||x.deltaY||x.detail;Math.abs(E)>=1&&(g+=Math.abs(E),c&&clearTimeout(c),c=setTimeout(()=>{g=0},50)),g<10&&m.isInsidePlot(x.chartX-m.plotLeft,x.chartY-m.plotTop)&&m.mapView&&m.mapView.zoomBy(-((m.options.mapNavigation.mouseWheelSensitivity-1)*E),void 0,[x.chartX,x.chartY],!(1>Math.abs(E))&&void 0)}function b(x,m,E){let L=this.chart;if(m=x.call(this,m,E),L&&L.mapView){let S=L.mapView.pixelsToLonLat({x:m.chartX-L.plotLeft,y:m.chartY-L.plotTop});S&&n(m,S)}return m}function v(x){let m=this.chart.options.mapNavigation;m&&l(m.enableTouchZoom,m.enabled)&&(this.chart.zooming.pinchType="xy"),x.apply(this,[].slice.call(arguments,1))}h.compose=function(x){let m=x.prototype;m.onContainerDblClick||(n(m,{onContainerDblClick:u,onContainerMouseWheel:p}),a(m,"normalize",b),a(m,"zoomOption",v))}}(i||(i={})),i}),s(t,"Maps/MapSymbols.js",[],function(){let e;function i(n,l,a,h,c){if(c){let g=c?.r||0;c.brBoxY=l-g,c.brBoxHeight=h+g}return e.roundedRect(n,l,a,h,c)}function r(n,l,a,h,c){if(c){let g=c?.r||0;c.brBoxHeight=h+g}return e.roundedRect(n,l,a,h,c)}return{compose:function(n){(e=n.prototype.symbols).bottombutton=i,e.topbutton=r}}}),s(t,"Maps/MapNavigation.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Maps/MapNavigationDefaults.js"],t["Maps/MapPointer.js"],t["Maps/MapSymbols.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{setOptions:h}=e,{composed:c}=i,{addEvent:g,extend:u,merge:p,objectEach:b,pick:v,pushUnique:x}=a;function m(L){L&&(L.preventDefault&&L.preventDefault(),L.stopPropagation&&L.stopPropagation(),L.cancelBubble=!0)}class E{static compose(S,w,R){n.compose(w),l.compose(R),x(c,"Map.Navigation")&&(g(S,"beforeRender",function(){this.mapNavigation=new E(this),this.mapNavigation.update()}),h(r))}constructor(S){this.chart=S,this.navButtons=[]}update(S){let w=this,R=w.chart,O=w.navButtons,I=function(P){this.handler.call(R,P),m(P)},_=R.options.mapNavigation;for(S&&(_=R.options.mapNavigation=p(R.options.mapNavigation,S));O.length;)O.pop().destroy();if(!R.renderer.forExport&&v(_.enableButtons,_.enabled)){w.navButtonsGroup||(w.navButtonsGroup=R.renderer.g().attr({zIndex:7}).add()),b(_.buttons,(F,A)=>{let D={padding:(F=p(_.buttonOptions,F)).padding};!R.styledMode&&F.theme&&(u(D,F.theme),D.style=p(F.theme.style,F.style));let{text:C,width:d=0,height:f=0,padding:y=0}=F,M=R.renderer.button(C!=="+"&&C!=="-"&&C||"",0,0,I,D,void 0,void 0,void 0,A==="zoomIn"?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[A]).attr({width:d,height:f,title:R.options.lang[A],zIndex:5}).add(w.navButtonsGroup);if(C==="+"||C==="-"){let k=d+1,T=[["M",y+3,y+f/2],["L",y+k-3,y+f/2]];C==="+"&&T.push(["M",y+k/2,y+3],["L",y+k/2,y+f-3]),R.renderer.path(T).addClass("highcharts-button-symbol").attr(R.styledMode?{}:{stroke:F.style?.color,"stroke-width":3,"stroke-linecap":"round"}).add(M)}if(M.handler=F.onclick,g(M.element,"dblclick",m),O.push(M),u(F,{width:M.width,height:2*(M.height||0)}),R.hasLoaded)M.align(F,!1,F.alignTo);else{let k=g(R,"load",()=>{M.element&&M.align(F,!1,F.alignTo),k()})}});let P=(F,A)=>!(A.x>=F.x+F.width||A.x+A.width<=F.x||A.y>=F.y+F.height||A.y+A.height<=F.y);R.hasLoaded||g(R,"render",function(){let F=R.exportingGroup&&R.exportingGroup.getBBox();if(F){let A=w.navButtonsGroup.getBBox();if(P(F,A)){let D=-A.y-A.height+F.y-5,C=F.y+F.height-A.y+5,d=_.buttonOptions&&_.buttonOptions.verticalAlign;w.navButtonsGroup.attr({translateY:d==="bottom"?D:C})}}})}this.updateEvents(_)}updateEvents(S){let w=this.chart;v(S.enableDoubleClickZoom,S.enabled)||S.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||g(w.container,"dblclick",function(R){w.pointer.onContainerDblClick(R)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),v(S.enableMouseWheelZoom,S.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||g(w.container,"wheel",function(R){return w.pointer.inClass(R.target,"highcharts-no-mousewheel")||(w.pointer.onContainerMouseWheel(R),m(R)),!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())}}return E}),s(t,"Series/ColorMapComposition.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{column:{prototype:l}}=e.seriesTypes,{addEvent:a,defined:h}=r;return function(c){function g(u){let p=this.series,b=p.chart.renderer;this.moveToTopOnHover&&this.graphic&&(p.stateMarkerGraphic||(p.stateMarkerGraphic=new i(b,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),u?.state==="hover"?(this.graphic.attr({id:this.id}),p.stateMarkerGraphic.attr({href:`${b.url}#${this.id}`,visibility:"visible"})):p.stateMarkerGraphic.attr({href:""}))}c.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return this.value!==null&&this.value!==1/0&&this.value!==-1/0&&(this.value===void 0||!isNaN(this.value))}},c.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(u){let p={};return h(u.color)&&(!u.state||u.state==="normal")&&(p[this.colorProp||"fill"]=u.color),p},pointAttribs:l.pointAttribs},c.compose=function(u){return a(u.prototype.pointClass,"afterSetState",g),u}}(n||(n={})),n}),s(t,"Core/Chart/MapChart.js",[t["Core/Chart/Chart.js"],t["Core/Defaults.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{getOptions:a}=i,{isNumber:h,merge:c,pick:g}=n;class u extends e{init(b,v){let x=a().credits,m=c({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:g(x.mapText,' \xA9 {geojson.copyrightShort}'),mapTextFull:g(x.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},b);super.init(m,v)}mapZoom(b,v,x,m,E){this.mapView&&(h(b)&&(b=Math.log(b)/Math.log(.5)),this.mapView.zoomBy(b,h(v)&&h(x)?this.mapView.projection.inverse([v,x]):void 0,h(m)&&h(E)?[m,E]:void 0))}update(b){b.chart&&"map"in b.chart&&this.mapView?.recommendMapView(this,[b.chart.map,...(this.options.series||[]).map(v=>v.mapData)],!0),super.update.apply(this,arguments)}}return(l=u||(u={})).maps={},l.mapChart=function(p,b,v){return new l(p,b,v)},l.splitPath=function(p){let b;return b=typeof p=="string"?(p=p.replace(/([A-Za-z])/g," $1 ").replace(/^\s*/,"").replace(/\s*$/,"")).split(/[ ,;]+/).map(v=>/[A-Za-z]/.test(v)?v:parseFloat(v)):p,r.prototype.pathToSegments(b)},u}),s(t,"Maps/MapUtilities.js",[],function(){return{boundsFromPath:function(e){let i=-Number.MAX_VALUE,r=Number.MAX_VALUE,n=-Number.MAX_VALUE,l=Number.MAX_VALUE,a;if(e.forEach(h=>{let c=h[h.length-2],g=h[h.length-1];typeof c=="number"&&typeof g=="number"&&(r=Math.min(r,c),i=Math.max(i,c),l=Math.min(l,g),n=Math.max(n,g),a=!0)}),a)return{x1:r,y1:l,x2:i,y2:n}},pointInPolygon:function({x:e,y:i},r){let n,l,a=!1;for(n=0,l=r.length-1;ni!=r[l][1]>i&&e<(r[l][0]-r[n][0])*(i-r[n][1])/(r[l][1]-r[n][1])+r[n][0]&&(a=!a);return a}}}),s(t,"Series/Map/MapPoint.js",[t["Series/ColorMapComposition.js"],t["Maps/MapUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{boundsFromPath:l}=i,a=r.seriesTypes.scatter.prototype.pointClass,{extend:h,isNumber:c,pick:g}=n;class u extends a{static getProjectedPath(b,v){return b.projectedPath||(v&&b.geometry?(v.hasCoordinates=!0,b.projectedPath=v.path(b.geometry)):b.projectedPath=b.path),b.projectedPath||[]}applyOptions(b,v){let x=this.series,m=super.applyOptions(b,v),E=x.joinBy;if(x.mapData&&x.mapMap){let L=E[1],S=super.getNestedProperty(L),w=S!==void 0&&x.mapMap[S];w?h(m,qi(xe({},w),{name:m.name??w.name})):x.pointArrayMap.indexOf("value")!==-1&&(m.value=m.value||null)}return m}getProjectedBounds(b){let v=l(u.getProjectedPath(this,b)),x=this.properties,m=this.series.chart.mapView;if(v){let E=x&&x["hc-middle-lon"],L=x&&x["hc-middle-lat"];if(m&&c(E)&&c(L)){let S=b.forward([E,L]);v.midX=S[0],v.midY=S[1]}else{let S=x&&x["hc-middle-x"],w=x&&x["hc-middle-y"];v.midX=v.x1+(v.x2-v.x1)*g(this.middleX,c(S)?S:.5);let R=g(this.middleY,c(w)?w:.5);this.geometry||(R=1-R),v.midY=v.y2-(v.y2-v.y1)*R}return v}}onMouseOver(b){n.clearTimeout(this.colorInterval),!this.isNull&&this.visible||this.series.options.nullInteraction?super.onMouseOver.call(this,b):this.series.onMouseOut()}setVisible(b){this.visible=this.options.visible=!!b,this.dataLabel&&this.dataLabel[b?"show":"hide"](),this.graphic&&this.graphic.attr(this.series.pointAttribs(this))}zoomTo(b){let v=this.series.chart,x=v.mapView,m=this.bounds;if(x&&m){let E=c(this.insetIndex)&&x.insets[this.insetIndex];if(E){let L=E.projectedUnitsToPixels({x:m.x1,y:m.y1}),S=E.projectedUnitsToPixels({x:m.x2,y:m.y2}),w=x.pixelsToProjectedUnits({x:L.x,y:L.y}),R=x.pixelsToProjectedUnits({x:S.x,y:S.y});m={x1:w.x,y1:w.y,x2:R.x,y2:R.y}}x.fitToBounds(m,void 0,!1),this.series.isDirty=!0,v.redraw(b)}}}return h(u.prototype,{dataLabelOnNull:e.pointMembers.dataLabelOnNull,moveToTopOnHover:e.pointMembers.moveToTopOnHover,isValid:e.pointMembers.isValid}),u}),s(t,"Series/Map/MapSeriesDefaults.js",[t["Core/Utilities.js"]],function(e){let{isNumber:i}=e;return{affectsMapView:!0,animation:!1,dataLabels:{crop:!1,formatter:function(){let{numberFormatter:r}=this.series.chart,{value:n}=this.point;return i(n)?r(n,-1):this.point.name},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},linecap:"round",marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}
"},turboThreshold:0,allAreas:!0,borderColor:"#e6e6e6",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:void 0,borderColor:"#666666",borderWidth:2},normal:{animation:!0},select:{color:"#cccccc"}},legendSymbol:"rectangle"}}),s(t,"Maps/MapViewDefaults.js",[],function(){return{center:[0,0],fitToGeometry:void 0,maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0,insetOptions:{borderColor:"#cccccc",borderWidth:1,padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}}}),s(t,"Maps/GeoJSONComposition.js",[t["Core/Globals.js"],t["Core/Templating.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{win:l}=e,{format:a}=i,{error:h,extend:c,merge:g,wrap:u}=r;return function(p){function b(S){return this.mapView&&this.mapView.lonLatToProjectedUnits(S)}function v(S){return this.mapView&&this.mapView.projectedUnitsToLonLat(S)}function x(S,w){let R=this.options.chart.proj4||l.proj4;if(!R){h(21,!1,this);return}let{jsonmarginX:O=0,jsonmarginY:I=0,jsonres:_=1,scale:P=1,xoffset:F=0,xpan:A=0,yoffset:D=0,ypan:C=0}=w,d=R(w.crs,[S.lon,S.lat]),f=w.cosAngle||w.rotation&&Math.cos(w.rotation),y=w.sinAngle||w.rotation&&Math.sin(w.rotation),M=w.rotation?[d[0]*f+d[1]*y,-d[0]*y+d[1]*f]:d;return{x:((M[0]-F)*P+A)*_+O,y:-(((D-M[1])*P+C)*_-I)}}function m(S,w){let R=this.options.chart.proj4||l.proj4;if(!R){h(21,!1,this);return}if(S.y===null)return;let{jsonmarginX:O=0,jsonmarginY:I=0,jsonres:_=1,scale:P=1,xoffset:F=0,xpan:A=0,yoffset:D=0,ypan:C=0}=w,d={x:((S.x-O)/_-A)/P+F,y:((S.y-I)/_+C)/P+D},f=w.cosAngle||w.rotation&&Math.cos(w.rotation),y=w.sinAngle||w.rotation&&Math.sin(w.rotation),M=R(w.crs,"WGS84",w.rotation?{x:d.x*f+-(d.y*y),y:d.x*y+d.y*f}:d);return{lat:M.y,lon:M.x}}function E(S,w){w||(w=Object.keys(S.objects)[0]);let R=S.objects[w];if(R["hc-decoded-geojson"]&&R["hc-decoded-geojson"].title===S.title)return R["hc-decoded-geojson"];let O=S.arcs;if(S.transform){let A,D,C,d=S.arcs,{scale:f,translate:y}=S.transform;O=[];for(let M=0,k=d.length;Mtypeof A[0]=="number"?A.reduce((D,C,d)=>{let f=C<0?O[~C]:O[C];return C<0?(f=f.slice(0,d===0?f.length:f.length-1)).reverse():d&&(f=f.slice(1)),D.concat(f)},[]):A.map(I),_=R.geometries,P=[];for(let A=0,D=_.length;A(l[1]-n[1])*(a[0]-n[0])}function r(n,l,a,h){let c=[n[0]-l[0],n[1]-l[1]],g=[a[0]-h[0],a[1]-h[1]],u=n[0]*l[1]-n[1]*l[0],p=a[0]*h[1]-a[1]*h[0],b=1/(c[0]*g[1]-c[1]*g[0]),v=[(u*g[0]-p*c[0])*b,(u*g[1]-p*c[1])*b];return v.isIntersection=!0,v}return{clipLineString:function(n,l){let a=[],h=e(n,l,!1);for(let c=1;cl===0?0:l>0?1:-1),i=Math.PI/180,r=Math.PI/2,n=l=>Math.tan((r+l)/2);return class{constructor(l){let a=(l.parallels||[]).map(p=>p*i),h=a[0]||0,c=a[1]??h,g=Math.cos(h);typeof l.projectedBounds=="object"&&(this.projectedBounds=l.projectedBounds);let u=h===c?Math.sin(h):Math.log(g/Math.cos(c))/Math.log(n(c)/n(h));1e-10>Math.abs(u)&&(u=1e-10*(e(u)||1)),this.n=u,this.c=g*Math.pow(n(h),u)/u}forward(l){let{c:a,n:h,projectedBounds:c}=this,g=l[0]*i,u=l[1]*i;a>0?u<-r+1e-6&&(u=-r+1e-6):u>r-1e-6&&(u=r-1e-6);let p=a/Math.pow(n(u),h),b=p*Math.sin(h*g)*63.78137,v=(a-p*Math.cos(h*g))*63.78137,x=[b,v];return c&&(bc.x2||vc.y2)&&(x.outside=!0),x}inverse(l){let{c:a,n:h}=this,c=l[0]/63.78137,g=a-l[1]/63.78137,u=e(h)*Math.sqrt(c*c+g*g),p=Math.atan2(c,Math.abs(g))*e(g);return g*h<0&&(p-=Math.PI*e(c)*e(g)),[p/h/i,(2*Math.atan(Math.pow(a/u,1/h))-r)/i]}}}),s(t,"Maps/Projections/EqualEarth.js",[],function(){let e=Math.sqrt(3)/2;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}forward(i){let r=Math.PI/180,n=Math.asin(e*Math.sin(i[1]*r)),l=n*n,a=l*l*l;return[i[0]*r*Math.cos(n)*74.03120656864502/(e*(1.340264+-.24331799999999998*l+a*(.0062510000000000005+.034164*l))),74.03120656864502*n*(1.340264+-.081106*l+a*(893e-6+.003796*l))]}inverse(i){let r=i[0]/74.03120656864502,n=i[1]/74.03120656864502,l=180/Math.PI,a=n,h,c,g,u;for(let v=0;v<12&&(c=(h=a*a)*h*h,g=a*(1.340264+-.081106*h+c*(893e-6+.003796*h))-n,a-=u=g/(1.340264+-.24331799999999998*h+c*(.0062510000000000005+.034164*h)),!(1e-9>Math.abs(u)));++v);c=(h=a*a)*h*h;let p=l*e*r*(1.340264+-.24331799999999998*h+c*(.0062510000000000005+.034164*h))/Math.cos(a),b=l*Math.asin(Math.sin(a)/e);return Math.abs(p)>180?[NaN,NaN]:[p,b]}}}),s(t,"Maps/Projections/Miller.js",[],function(){let e=Math.PI/4,i=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}forward(r){return[r[0]*i*63.78137,79.7267125*Math.log(Math.tan(e+.4*r[1]*i))]}inverse(r){return[r[0]/63.78137/i,2.5*(Math.atan(Math.exp(r[1]/63.78137*.8))-e)/i]}}}),s(t,"Maps/Projections/Orthographic.js",[],function(){let e=Math.PI/180;return class{constructor(){this.antimeridianCutting=!1,this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}forward(i){let r=i[0],n=i[1]*e,l=[Math.cos(n)*Math.sin(r*e)*63.78460826781007,63.78460826781007*Math.sin(n)];return(r<-90||r>90)&&(l.outside=!0),l}inverse(i){let r=i[0]/63.78460826781007,n=i[1]/63.78460826781007,l=Math.sqrt(r*r+n*n),a=Math.asin(l),h=Math.sin(a);return[Math.atan2(r*h,l*Math.cos(a))/e,Math.asin(l&&n*h/l)/e]}}}),s(t,"Maps/Projections/WebMercator.js",[],function(){let e=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071},this.maxLatitude=85.0511287798}forward(i){let r=Math.sin(i[1]*e),n=[63.78137*i[0]*e,63.78137*Math.log((1+r)/(1-r))/2];return Math.abs(i[1])>this.maxLatitude&&(n.outside=!0),n}inverse(i){return[i[0]/(63.78137*e),(2*Math.atan(Math.exp(i[1]/63.78137))-Math.PI/2)/e]}}}),s(t,"Maps/Projections/ProjectionRegistry.js",[t["Maps/Projections/LambertConformalConic.js"],t["Maps/Projections/EqualEarth.js"],t["Maps/Projections/Miller.js"],t["Maps/Projections/Orthographic.js"],t["Maps/Projections/WebMercator.js"]],function(e,i,r,n,l){return{EqualEarth:i,LambertConformalConic:e,Miller:r,Orthographic:n,WebMercator:l}}),s(t,"Maps/Projection.js",[t["Core/Geometry/PolygonClip.js"],t["Maps/Projections/ProjectionRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{clipLineString:n,clipPolygon:l}=e,{clamp:a,erase:h}=r,c=2*Math.PI/360,g=v=>(v<-180&&(v+=360),v>180&&(v-=360),v),u=v=>(1-Math.cos(v))/2,p=(v,x)=>{let m=Math.cos,E=v[1]*c,L=v[0]*c,S=x[1]*c,w=x[0]*c;return u(S-E)+m(E)*m(S)*u(w-L)};class b{static add(x,m){b.registry[x]=m}static distance(x,m){let{atan2:E,sqrt:L}=Math,S=p(x,m);return 2*E(L(S),L(1-S))*6371e3}static geodesic(x,m,E,L=5e5){let{atan2:S,cos:w,sin:R,sqrt:O}=Math,I=b.distance,_=x[1]*c,P=x[0]*c,F=m[1]*c,A=m[0]*c,D=w(_)*w(P),C=w(F)*w(A),d=w(_)*R(P),f=w(F)*R(A),y=R(_),M=R(F),k=I(x,m),T=k/6371e3,z=R(T),N=Math.round(k/L),G=[];if(E&&G.push(x),N>1){let X=1/N;for(let j=X;j<.999;j+=X){let B=R((1-j)*T)/z,W=R(j*T)/z,Y=B*D+W*C,U=B*d+W*f,q=S(B*y+W*M,O(Y*Y+U*U)),H=S(U,Y);G.push([H/c,q/c])}}return E&&G.push(m),G}static insertGeodesics(x){let m=x.length-1;for(;m--;)if(Math.max(Math.abs(x[m][0]-x[m+1][0]),Math.abs(x[m][1]-x[m+1][1]))>10){let E=b.geodesic(x[m],x[m+1]);E.length&&x.splice(m+1,0,...E)}}static toString(x){let{name:m,rotation:E}=x||{};return[m,E&&E.join(",")].join(";")}constructor(x={}){this.hasCoordinates=!1,this.hasGeoProjection=!1,this.maxLatitude=90,this.options=x;let{name:m,projectedBounds:E,rotation:L}=x;this.rotator=L?this.getRotator(L):void 0;let S=m?b.registry[m]:void 0;S&&(this.def=new S(x));let{def:w,rotator:R}=this;w&&(this.maxLatitude=w.maxLatitude||90,this.hasGeoProjection=!0),R&&w?(this.forward=O=>w.forward(R.forward(O)),this.inverse=O=>R.inverse(w.inverse(O))):w?(this.forward=O=>w.forward(O),this.inverse=O=>w.inverse(O)):R&&(this.forward=R.forward,this.inverse=R.inverse),this.bounds=E==="world"?w&&w.bounds:E}lineIntersectsBounds(x){let{x1:m,x2:E,y1:L,y2:S}=this.bounds||{},w=(I,_,P)=>{let[F,A]=I,D=_?0:1;if(typeof P=="number"&&F[_]>=P!=A[_]>=P){let C=(P-F[_])/(A[_]-F[_]),d=F[D]+C*(A[D]-F[D]);return _?[d,P]:[P,d]}},R,O=x[0];return((R=w(x,0,m))||(R=w(x,0,E)))&&(O=R,x[1]=R),((R=w(x,1,L))||(R=w(x,1,S)))&&(O=R),O}getRotator(x){let m=x[0]*c,E=(x[1]||0)*c,L=(x[2]||0)*c,S=Math.cos(E),w=Math.sin(E),R=Math.cos(L),O=Math.sin(L);if(m!==0||E!==0||L!==0)return{forward:I=>{let _=I[0]*c+m,P=I[1]*c,F=Math.cos(P),A=Math.cos(_)*F,D=Math.sin(_)*F,C=Math.sin(P),d=C*S+A*w;return[Math.atan2(D*R-d*O,A*S-C*w)/c,Math.asin(d*R+D*O)/c]},inverse:I=>{let _=I[0]*c,P=I[1]*c,F=Math.cos(P),A=Math.cos(_)*F,D=Math.sin(_)*F,C=Math.sin(P),d=C*R-D*O;return[(Math.atan2(D*R+C*O,A*S+d*w)-m)/c,Math.asin(d*S-A*w)/c]}}}forward(x){return x}inverse(x){return x}cutOnAntimeridian(x,m){let E,L=[],S=[x];for(let w=0,R=x.length;w90)&&(P<-90||P>90)&&_>0!=P>0){let F=a((180-(_+360)%360)/((P+360)%360-(_+360)%360),0,1),A=I[1]+F*(O[1]-I[1]);L.push({i:w,lat:A,direction:_<0?1:-1,previousLonLat:I,lonLat:O})}}if(L.length)if(m){L.length%2==1&&(E=L.slice().sort((R,O)=>Math.abs(O.lat)-Math.abs(R.lat))[0],h(L,E));let w=L.length-2;for(;w>=0;){let R=L[w].i,O=g(180+1e-6*L[w].direction),I=g(180-1e-6*L[w].direction),_=x.splice(R,L[w+1].i-R,...b.geodesic([O,L[w].lat],[O,L[w+1].lat],!0));_.push(...b.geodesic([I,L[w+1].lat],[I,L[w].lat],!0)),S.push(_),w-=2}if(E)for(let R=0;R-1){let F=(I<0?-1:1)*this.maxLatitude,A=g(180+1e-6*O),D=g(180-1e-6*O),C=b.geodesic([A,I],[A,F],!0);for(let d=A+120*O;d>-180&&d<180;d+=120*O)C.push([d,F]);C.push(...b.geodesic([D,F],[D,E.lat],!0)),_.splice(P,0,...C);break}}}else{let w=L.length;for(;w--;){let R=L[w].i,O=x.splice(R,x.length,[g(180+1e-6*L[w].direction),L[w].lat]);O.unshift([g(180-1e-6*L[w].direction),L[w].lat]),S.push(O)}}return S}path(x){let m,{bounds:E,def:L,rotator:S}=this,w=[],R=x.type==="Polygon"||x.type==="MultiPolygon",O=this.hasGeoProjection,I=!L||L.antimeridianCutting!==!1,_=I?S:void 0,P=I&&L||this;E&&(m=[[E.x1,E.y1],[E.x2,E.y1],[E.x2,E.y2],[E.x1,E.y2]]);let F=A=>{let D=A.map(d=>{if(I){_&&(d=_.forward(d));let f=d[0];1e-6>Math.abs(f-180)&&(f=f<180?179.999999:180.000001),d=[f,d[1]]}return d}),C=[D];O&&(b.insertGeodesics(D),I&&(C=this.cutOnAntimeridian(D,R))),C.forEach(d=>{let f,y;if(d.length<2)return;let M=!1,k=!1,T=X=>{M?w.push(["L",X[0],X[1]]):(w.push(["M",X[0],X[1]]),M=!0)},z=!1,N=!1,G=d.map(X=>{let j=P.forward(X);return j.outside?z=!0:N=!0,j[1]===1/0?j[1]=1e10:j[1]===-1/0&&(j[1]=-1e10),j});if(I){if(R&&G.push(G[0]),z){if(!N)return;if(m){if(R)G=l(G,m);else if(E){n(G,m).forEach(X=>{M=!1,X.forEach(T)});return}}}G.forEach(T)}else for(let X=0;XT(P.forward(W))):M=!1),T(B),y=j,k=!1)}})};return x.type==="LineString"?F(x.coordinates):x.type==="MultiLineString"?x.coordinates.forEach(A=>F(A)):x.type==="Polygon"?(x.coordinates.forEach(A=>F(A)),w.length&&w.push(["Z"])):x.type==="MultiPolygon"&&(x.coordinates.forEach(A=>{A.forEach(D=>F(D))}),w.length&&w.push(["Z"])),w}}return b.registry=i,b}),s(t,"Maps/MapView.js",[t["Core/Globals.js"],t["Maps/MapViewDefaults.js"],t["Maps/GeoJSONComposition.js"],t["Maps/MapUtilities.js"],t["Maps/Projection.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{composed:h}=e,{topo2geo:c}=r,{boundsFromPath:g,pointInPolygon:u}=n,{addEvent:p,clamp:b,crisp:v,fireEvent:x,isArray:m,isNumber:E,isObject:L,isString:S,merge:w,pick:R,pushUnique:O,relativeLength:I}=a,_={};function P(C,d){let{width:f,height:y}=d;return Math.log(400.979322/Math.max((C.x2-C.x1)/(f/256),(C.y2-C.y1)/(y/256)))/Math.log(2)}function F(C){C.seriesOptions.mapData&&this.mapView?.recommendMapView(this,[this.options.chart.map,C.seriesOptions.mapData],this.options.drilldown?.mapZooming)}class A{static compose(d){O(h,"MapView")&&(_=d.maps,p(d,"afterInit",function(){this.mapView=new A(this,this.options.mapView)},{order:0}),p(d,"addSeriesAsDrilldown",F),p(d,"afterDrillUp",F))}static compositeBounds(d){if(d.length)return d.slice(1).reduce((f,y)=>(f.x1=Math.min(f.x1,y.x1),f.y1=Math.min(f.y1,y.y1),f.x2=Math.max(f.x2,y.x2),f.y2=Math.max(f.y2,y.y2),f),w(d[0]))}static mergeInsets(d,f){let y=k=>{let T={};return k.forEach((z,N)=>{T[z&&z.id||`i${N}`]=z}),T},M=w(y(d),y(f));return Object.keys(M).map(k=>M[k])}constructor(d,f){this.allowTransformAnimation=!0,this.eventsToUnbind=[],this.insets=[],this.padding=[0,0,0,0],this.recommendedMapView={},this instanceof D||this.recommendMapView(d,[d.options.chart.map,...(d.options.series||[]).map(T=>T.mapData)]),this.userOptions=f||{};let y=w(i,this.recommendedMapView,f),M=this.recommendedMapView?.insets,k=f&&f.insets;M&&k&&(y.insets=A.mergeInsets(M,k)),this.chart=d,this.center=y.center,this.options=y,this.projection=new l(y.projection),this.playingField=d.plotBox,this.zoom=y.zoom||0,this.minZoom=y.minZoom,this.createInsets(),this.eventsToUnbind.push(p(d,"afterSetChartSize",()=>{this.playingField=this.getField(),(this.minZoom===void 0||this.minZoom===this.zoom)&&(this.fitToBounds(void 0,void 0,!1),!this.chart.hasRendered&&E(this.userOptions.zoom)&&(this.zoom=this.userOptions.zoom),this.userOptions.center&&w(!0,this.center,this.userOptions.center))})),this.setUpEvents()}createInsets(){let d=this.options,f=d.insets;f&&f.forEach(y=>{let M=new D(this,w(d.insetOptions,y));this.insets.push(M)})}fitToBounds(d,f,y=!0,M){let k=d||this.getProjectedBounds();if(k){let T=R(f,d?0:this.options.padding),z=this.getField(!1),N=m(T)?T:[T,T,T,T];this.padding=[I(N[0],z.height),I(N[1],z.width),I(N[2],z.height),I(N[3],z.width)],this.playingField=this.getField();let G=P(k,this.playingField);d||(this.minZoom=G);let X=this.projection.inverse([(k.x2+k.x1)/2,(k.y2+k.y1)/2]);this.setView(X,G,y,M)}}getField(d=!0){let f=d?this.padding:[0,0,0,0];return{x:f[3],y:f[0],width:this.chart.plotWidth-f[1]-f[3],height:this.chart.plotHeight-f[0]-f[2]}}getGeoMap(d){if(S(d))return _[d]&&_[d].type==="Topology"?c(_[d]):_[d];if(L(d,!0)){if(d.type==="FeatureCollection")return d;if(d.type==="Topology")return c(d)}}getMapBBox(){let d=this.getProjectedBounds(),f=this.getScale();if(d){let y=this.padding,M=this.projectedUnitsToPixels({x:d.x1,y:d.y2});return{width:(d.x2-d.x1)*f+y[1]+y[3],height:(d.y2-d.y1)*f+y[0]+y[2],x:M.x-y[3],y:M.y-y[0]}}}getProjectedBounds(){let d=this.projection,f=this.chart.series.reduce((M,k)=>{let T=k.getProjectedBounds&&k.getProjectedBounds();return T&&k.options.affectsMapView!==!1&&M.push(T),M},[]),y=this.options.fitToGeometry;if(y){if(!this.fitToGeometryCache)if(y.type==="MultiPoint"){let M=y.coordinates.map(z=>d.forward(z)),k=M.map(z=>z[0]),T=M.map(z=>z[1]);this.fitToGeometryCache={x1:Math.min.apply(0,k),x2:Math.max.apply(0,k),y1:Math.min.apply(0,T),y2:Math.max.apply(0,T)}}else this.fitToGeometryCache=g(d.path(y));return this.fitToGeometryCache}return this.projection.bounds||A.compositeBounds(f)}getScale(){return 256/400.979322*Math.pow(2,this.zoom)}getSVGTransform(){let{x:d,y:f,width:y,height:M}=this.playingField,k=this.projection.forward(this.center),T=this.projection.hasCoordinates?-1:1,z=this.getScale(),N=z*T,G=d+y/2-k[0]*z,X=f+M/2-k[1]*N;return{scaleX:z,scaleY:N,translateX:G,translateY:X}}lonLatToPixels(d){let f=this.lonLatToProjectedUnits(d);if(f)return this.projectedUnitsToPixels(f)}lonLatToProjectedUnits(d){let f=this.chart,y=f.mapTransforms;if(y){for(let k in y)if(Object.hasOwnProperty.call(y,k)&&y[k].hitZone){let T=f.transformFromLatLon(d,y[k]);if(T&&u(T,y[k].hitZone.coordinates[0]))return T}return f.transformFromLatLon(d,y.default)}for(let k of this.insets)if(k.options.geoBounds&&u({x:d.lon,y:d.lat},k.options.geoBounds.coordinates[0])){let T=k.projection.forward([d.lon,d.lat]),z=k.projectedUnitsToPixels({x:T[0],y:T[1]});return this.pixelsToProjectedUnits(z)}let M=this.projection.forward([d.lon,d.lat]);if(!M.outside)return{x:M[0],y:M[1]}}projectedUnitsToLonLat(d){let f=this.chart,y=f.mapTransforms;if(y){for(let T in y)if(Object.hasOwnProperty.call(y,T)&&y[T].hitZone&&u(d,y[T].hitZone.coordinates[0]))return f.transformToLatLon(d,y[T]);return f.transformToLatLon(d,y.default)}let M=this.projectedUnitsToPixels(d);for(let T of this.insets)if(T.hitZone&&u(M,T.hitZone.coordinates[0])){let z=T.pixelsToProjectedUnits(M),N=T.projection.inverse([z.x,z.y]);return{lon:N[0],lat:N[1]}}let k=this.projection.inverse([d.x,d.y]);return{lon:k[0],lat:k[1]}}recommendMapView(d,f,y=!1){this.recommendedMapView={};let M=f.map(z=>this.getGeoMap(z)),k=[];M.forEach(z=>{if(z&&(Object.keys(this.recommendedMapView).length||(this.recommendedMapView=z["hc-recommended-mapview"]||{}),z.bbox)){let[N,G,X,j]=z.bbox;k.push({x1:N,y1:G,x2:X,y2:j})}});let T=k.length&&A.compositeBounds(k);x(this,"onRecommendMapView",{geoBounds:T,chart:d},function(){if(T&&this.recommendedMapView){if(!this.recommendedMapView.projection){let{x1:z,y1:N,x2:G,y2:X}=T;this.recommendedMapView.projection=G-z>180&&X-N>90?{name:"EqualEarth",parallels:[0,0],rotation:[0]}:{name:"LambertConformalConic",parallels:[N,X],rotation:[-(z+G)/2]}}this.recommendedMapView.insets||(this.recommendedMapView.insets=void 0)}}),this.geoMap=M[0],y&&d.hasRendered&&!d.userOptions.mapView?.projection&&this.recommendedMapView&&this.update(this.recommendedMapView)}redraw(d){this.chart.series.forEach(f=>{f.useMapGeometry&&(f.isDirty=!0)}),this.chart.redraw(d)}setView(d,f,y=!0,M){d&&(this.center=d),typeof f=="number"&&(typeof this.minZoom=="number"&&(f=Math.max(f,this.minZoom)),typeof this.options.maxZoom=="number"&&(f=Math.min(f,this.options.maxZoom)),E(f)&&(this.zoom=f));let k=this.getProjectedBounds();if(k){let T=this.projection.forward(this.center),{x:z,y:N,width:G,height:X}=this.playingField,j=this.getScale(),B=this.projectedUnitsToPixels({x:k.x1,y:k.y1}),W=this.projectedUnitsToPixels({x:k.x2,y:k.y2}),Y=[(k.x1+k.x2)/2,(k.y1+k.y2)/2];if(!this.chart.series.some(U=>U.isDrilling)){let U=B.x,q=W.y,H=W.x,V=B.y;H-Uz+G&&U>z&&(T[0]+=Math.min(H-G-z,U-z)/j),V-qN+X&&q>N&&(T[1]-=Math.min(V-X-N,q-N)/j),this.center=this.projection.inverse(T)}this.insets.forEach(U=>{U.options.field&&(U.hitZone=U.getHitZone(),U.playingField=U.getField())}),this.render()}x(this,"afterSetView"),y&&this.redraw(M)}projectedUnitsToPixels(d){let f=this.getScale(),y=this.projection.forward(this.center),M=this.playingField,k=M.x+M.width/2,T=M.y+M.height/2;return{x:k-f*(y[0]-d.x),y:T+f*(y[1]-d.y)}}pixelsToLonLat(d){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(d))}pixelsToProjectedUnits(d){let{x:f,y}=d,M=this.getScale(),k=this.projection.forward(this.center),T=this.playingField,z=T.x+T.width/2,N=T.y+T.height/2;return{x:k[0]+(f-z)/M,y:k[1]-(y-N)/M}}setUpEvents(){let d,f,y,{chart:M}=this,k=T=>{let{lastTouches:z,pinchDown:N}=M.pointer,G=this.projection,X=T.touches,{mouseDownX:j,mouseDownY:B}=M,W=0;if(N?.length===1?(j=N[0].chartX,B=N[0].chartY):N?.length===2&&(j=(N[0].chartX+N[1].chartX)/2,B=(N[0].chartY+N[1].chartY)/2),X?.length===2&&z&&(W=Math.log(Math.sqrt(Math.pow(z[0].chartX-z[1].chartX,2)+Math.pow(z[0].chartY-z[1].chartY,2))/Math.sqrt(Math.pow(X[0].chartX-X[1].chartX,2)+Math.pow(X[0].chartY-X[1].chartY,2)))/Math.log(.5)),E(j)&&E(B)){let Y=`${j},${B}`,{chartX:U,chartY:q}=T.originalEvent;X?.length===2&&(U=(X[0].chartX+X[1].chartX)/2,q=(X[0].chartY+X[1].chartY)/2),Y!==f&&(f=Y,d=this.projection.forward(this.center),y=(this.projection.options.rotation||[0,0]).slice());let H=G.def&&G.def.bounds,V=H&&P(H,this.playingField)||-1/0;if(G.options.name==="Orthographic"&&2>(X?.length||0)&&(this.minZoom||1/0)<1.3*V){let Z=440/(this.getScale()*Math.min(M.plotWidth,M.plotHeight));if(y){let K=(j-U)*Z-y[0],J=b(-y[1]-(B-q)*Z,-80,80),tt=this.zoom;this.update({projection:{rotation:[-K,-J]}},!1),this.fitToBounds(void 0,void 0,!1),this.zoom=tt,M.redraw(!1)}}else if(E(U)&&E(q)){let Z=this.getScale(),K=this.projection.hasCoordinates?1:-1,J=this.projection.inverse([d[0]+(j-U)/Z,d[1]-(B-q)/Z*K]);isNaN(J[0]+J[1])||this.zoomBy(W,J,void 0,!1)}T.preventDefault()}};p(M,"pan",k),p(M,"touchpan",k),p(M,"selection",T=>{if(T.resetSelection)this.zoomBy();else{let z=T.x-M.plotLeft,N=T.y-M.plotTop,{y:G,x:X}=this.pixelsToProjectedUnits({x:z,y:N}),{y:j,x:B}=this.pixelsToProjectedUnits({x:z+T.width,y:N+T.height});this.fitToBounds({x1:X,y1:G,x2:B,y2:j},void 0,!0,!T.originalEvent.touches&&void 0),/^touch/.test(T.originalEvent.type)||M.showResetZoom(),T.preventDefault()}})}render(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())}update(d,f=!0,y){let M=d.projection,k=M&&l.toString(M)!==l.toString(this.options.projection),T=!1;w(!0,this.userOptions,d),w(!0,this.options,d),"insets"in d&&(this.insets.forEach(z=>z.destroy()),this.insets.length=0,T=!0),(k||"fitToGeometry"in d)&&delete this.fitToGeometryCache,(k||T)&&(this.chart.series.forEach(z=>{let N=z.transformGroups;if(z.clearBounds&&z.clearBounds(),z.isDirty=!0,z.isDirtyData=!0,T&&N)for(;N.length>1;){let G=N.pop();G&&G.destroy()}}),k&&(this.projection=new l(this.options.projection)),T&&this.createInsets(),!d.center&&Object.hasOwnProperty.call(d,"zoom")&&!E(d.zoom)&&this.fitToBounds(void 0,void 0,!1)),d.center||E(d.zoom)?this.setView(this.options.center,d.zoom,!1):"fitToGeometry"in d&&this.fitToBounds(void 0,void 0,!1),f&&this.chart.redraw(y)}zoomBy(d,f,y,M){let k=this.chart,T=this.projection.forward(this.center);if(typeof d=="number"){let z,N,G,X=this.zoom+d;if(y){let[j,B]=y,W=this.getScale(),Y=j-k.plotLeft-k.plotWidth/2,U=B-k.plotTop-k.plotHeight/2;N=T[0]+Y/W,G=T[1]+U/W}if(typeof N=="number"&&typeof G=="number"){let j=1-Math.pow(2,this.zoom)/Math.pow(2,X),B=T[0]-N,W=T[1]-G;T[0]-=B*j,T[1]+=W*j,z=this.projection.inverse(T)}this.setView(f||z,X,void 0,M)}else this.fitToBounds(void 0,void 0,void 0,M)}}class D extends A{constructor(d,f){if(super(d.chart,f),this.id=f.id,this.mapView=d,this.options=w({center:[0,0]},d.options.insetOptions,f),this.allBounds=[],this.options.geoBounds){let y=d.projection.path(this.options.geoBounds);this.geoBoundsProjectedBox=g(y),this.geoBoundsProjectedPolygon=y.map(M=>[M[1]||0,M[2]||0])}}getField(d=!0){let f=this.hitZone;if(f){let y=d?this.padding:[0,0,0,0],M=f.coordinates[0],k=M.map(j=>j[0]),T=M.map(j=>j[1]),z=Math.min.apply(0,k)+y[3],N=Math.max.apply(0,k)-y[1],G=Math.min.apply(0,T)+y[0],X=Math.max.apply(0,T)-y[2];if(E(z)&&E(G))return{x:z,y:G,width:N-z,height:X-G}}return super.getField.call(this,d)}getHitZone(){let{chart:d,mapView:f,options:y}=this,{coordinates:M}=y.field||{};if(M){let k=M[0];if(y.units==="percent"){let T=y.relativeTo==="mapBoundingBox"&&f.getMapBBox()||w(d.plotBox,{x:0,y:0});k=k.map(z=>[I(`${z[0]}%`,T.width,T.x),I(`${z[1]}%`,T.height,T.y)])}return{type:"Polygon",coordinates:[k]}}}getProjectedBounds(){return A.compositeBounds(this.allBounds)}isInside(d){let{geoBoundsProjectedBox:f,geoBoundsProjectedPolygon:y}=this;return!!(f&&d.x>=f.x1&&d.x<=f.x2&&d.y>=f.y1&&d.y<=f.y2&&y&&u(d,y))}render(){let{chart:d,mapView:f,options:y}=this,M=y.borderPath||y.field;if(M&&f.group){let k=!0;this.border||(this.border=d.renderer.path().addClass("highcharts-mapview-inset-border").add(f.group),k=!1),d.styledMode||this.border.attr({stroke:y.borderColor,"stroke-width":y.borderWidth});let T=this.border.strokeWidth(),z=y.relativeTo==="mapBoundingBox"&&f.getMapBBox()||f.playingField,N=(M.coordinates||[]).reduce((G,X)=>X.reduce((j,B,W)=>{let[Y,U]=B;return y.units==="percent"&&(Y=d.plotLeft+I(`${Y}%`,z.width,z.x),U=d.plotTop+I(`${U}%`,z.height,z.y)),Y=v(Y,T),U=v(U,T),j.push(W===0?["M",Y,U]:["L",Y,U]),j},G),[]);this.border[k?"animate":"attr"]({d:N})}}destroy(){this.border&&(this.border=this.border.destroy()),this.eventsToUnbind.forEach(d=>d())}setUpEvents(){}}return A}),s(t,"Series/Map/MapSeries.js",[t["Core/Animation/AnimationUtilities.js"],t["Series/ColorMapComposition.js"],t["Series/CenteredUtilities.js"],t["Core/Globals.js"],t["Core/Chart/MapChart.js"],t["Series/Map/MapPoint.js"],t["Series/Map/MapSeriesDefaults.js"],t["Maps/MapView.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){let{animObject:p,stop:b}=e,{noop:v}=n,{splitPath:x}=l,{column:m,scatter:E}=g.seriesTypes,{extend:L,find:S,fireEvent:w,getNestedProperty:R,isArray:O,defined:I,isNumber:_,isObject:P,merge:F,objectEach:A,pick:D,splat:C}=u;class d extends E{constructor(){super(...arguments),this.processedData=[]}animate(y){let{chart:M,group:k}=this,T=p(this.options.animation);y?k.attr({translateX:M.plotLeft+M.plotWidth/2,translateY:M.plotTop+M.plotHeight/2,scaleX:.001,scaleY:.001}):k.animate({translateX:M.plotLeft,translateY:M.plotTop,scaleX:1,scaleY:1},T)}clearBounds(){this.points.forEach(y=>{delete y.bounds,delete y.insetIndex,delete y.projectedPath}),delete this.bounds}doFullTranslate(){return!!(this.isDirtyData||this.chart.isResizing||!this.hasRendered)}drawMapDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}drawPoints(){let y=this,{chart:M,group:k,transformGroups:T=[]}=this,{mapView:z,renderer:N}=M;if(z){this.transformGroups=T,T[0]||(T[0]=N.g().add(k));for(let G=0,X=z.insets.length;G{let{graphic:X}=G;G.group=T[typeof G.insetIndex=="number"?G.insetIndex+1:0],X&&X.parentGroup!==G.group&&X.add(G.group)}),m.prototype.drawPoints.apply(this),this.points.forEach(G=>{let X=G.graphic;if(X){let j=X.animate,B="";G.name&&(B+="highcharts-name-"+G.name.replace(/ /g,"-").toLowerCase()),G.properties&&G.properties["hc-key"]&&(B+=" highcharts-key-"+G.properties["hc-key"].toString().toLowerCase()),B&&X.addClass(B),M.styledMode&&X.css(this.pointAttribs(G,G.selected&&"select"||void 0)),X.attr({visibility:!G.visible&&(G.visible||G.isNull)?"hidden":"inherit"}),X.animate=function(W,Y,U){let q=_(W["stroke-width"])&&!_(X["stroke-width"]),H=_(X["stroke-width"])&&!_(W["stroke-width"]);if(q||H){let V=D(y.getStrokeWidth(y.options),1)/(M.mapView&&M.mapView.getScale()||1);q&&(X["stroke-width"]=V),H&&(W["stroke-width"]=V)}return j.call(X,W,Y,H?function(){X.element.removeAttribute("stroke-width"),delete X["stroke-width"],U&&U.apply(this,arguments)}:U)}}})),T.forEach((G,X)=>{let j=(X===0?z:z.insets[X-1]).getSVGTransform(),B=D(this.getStrokeWidth(this.options),1),W=j.scaleX,Y=j.scaleY>0?1:-1,U=q=>{(y.points||[]).forEach(H=>{let V,Z=H.graphic;Z&&Z["stroke-width"]&&(V=this.getStrokeWidth(H.options))&&Z.attr({"stroke-width":V/q})})};if(N.globalAnimation&&M.hasRendered&&z.allowTransformAnimation){let q=Number(G.attr("translateX")),H=Number(G.attr("translateY")),V=Number(G.attr("scaleX")),Z=(tt,$)=>{let Q=V+(W-V)*$.pos;G.attr({translateX:q+(j.translateX-q)*$.pos,translateY:H+(j.translateY-H)*$.pos,scaleX:Q,scaleY:Q*Y,"stroke-width":B/Q}),U(Q)},K=F(p(N.globalAnimation)),J=K.step;K.step=function(){J&&J.apply(this,arguments),Z.apply(this,arguments)},G.attr({animator:0}).animate({animator:1},K,(function(){typeof N.globalAnimation!="boolean"&&N.globalAnimation.complete&&N.globalAnimation.complete({applyDrilldown:!0}),w(this,"mapZoomComplete")}).bind(this))}else b(G),G.attr(F(j,{"stroke-width":B/W})),U(W)}),this.isDrilling||this.drawMapDataLabels()}}getProjectedBounds(){if(!this.bounds&&this.chart.mapView){let{insets:y,projection:M}=this.chart.mapView,k=[];(this.points||[]).forEach(T=>{if(T.path||T.geometry){if(typeof T.path=="string"?T.path=x(T.path):O(T.path)&&T.path[0]==="M"&&(T.path=this.chart.renderer.pathToSegments(T.path)),!T.bounds){let z=T.getProjectedBounds(M);if(z){T.labelrank=D(T.labelrank,(z.x2-z.x1)*(z.y2-z.y1));let{midX:N,midY:G}=z;if(y&&_(N)&&_(G)){let X=S(y,j=>j.isInside({x:N,y:G}));X&&(delete T.projectedPath,(z=T.getProjectedBounds(X.projection))&&X.allBounds.push(z),T.insetIndex=y.indexOf(X))}T.bounds=z}}T.bounds&&T.insetIndex===void 0&&k.push(T.bounds)}}),this.bounds=c.compositeBounds(k)}return this.bounds}getStrokeWidth(y){let M=this.pointAttrToOptions;return y[M&&M["stroke-width"]||"borderWidth"]}hasData(){return!!this.processedXData.length}pointAttribs(y,M){let{mapView:k,styledMode:T}=y.series.chart,z=T?this.colorAttribs(y):m.prototype.pointAttribs.call(this,y,M),N=this.getStrokeWidth(y.options);if(M){let X=F(this.options.states&&this.options.states[M],y.options.states&&y.options.states[M]||{}),j=this.getStrokeWidth(X);I(j)&&(N=j),z.stroke=X.borderColor??y.color}N&&k&&(N/=k.getScale());let G=this.getStrokeWidth(this.options);return z.dashstyle&&k&&_(G)&&(N=G/k.getScale()),y.visible||(z.fill=this.options.nullColor),I(N)?z["stroke-width"]=N:delete z["stroke-width"],z["stroke-linecap"]=z["stroke-linejoin"]=this.options.linecap,z}updateData(){return!this.processedData&&super.updateData.apply(this,arguments)}setData(y,M=!0,k,T){delete this.bounds,super.setData(y,!1,void 0,T),this.processData(),this.generatePoints(),M&&this.chart.redraw(k)}processData(){let y,M,k,T=this.options,z=T.data,N=this.chart,G=N.options.chart,X=this.joinBy,j=T.keys||this.pointArrayMap,B=[],W={},Y=this.chart.mapView,U=Y&&(P(T.mapData,!0)?Y.getGeoMap(T.mapData):Y.geoMap),q=N.mapTransforms=G.mapTransforms||U&&U["hc-transform"]||N.mapTransforms;q&&A(q,V=>{V.rotation&&(V.cosAngle=Math.cos(V.rotation),V.sinAngle=Math.sin(V.rotation))}),O(T.mapData)?k=T.mapData:U&&U.type==="FeatureCollection"&&(this.mapTitle=U.title,k=n.geojson(U,this.type,this)),this.processedData=[];let H=this.processedData;if(z){let V;for(let Z=0,K=z.length;Zj.length&&typeof V[0]=="string"&&(H[Z]["hc-key"]=V[0],++J);for(let tt=0;tt0?a.prototype.setNestedProperty(H[Z],V[J],j[tt]):H[Z][j[tt]]=V[J])}else H[Z]=z[Z];X&&X[0]==="_i"&&(H[Z]._i=Z)}}if(k){this.mapData=k,this.mapMap={};for(let V=0;V{let K=R(V,Z);W[K]&&B.push(W[K])})}if(T.allAreas){if(X[1]){let Z=X[1];H.forEach(K=>{B.push(R(Z,K))})}let V="|"+B.map(function(Z){return Z&&Z[X[0]]}).join("|")+"|";k.forEach(Z=>{X[0]&&V.indexOf("|"+Z[X[0]]+"|")!==-1||H.push(F(Z,{value:null}))})}}this.processedXData=Array(H.length)}setOptions(y){let M=super.setOptions(y),k=M.joinBy;return M.joinBy===null&&(k="_i"),(k=this.joinBy=C(k))[1]||(k[1]=k[0]),M}translate(){let y=this.doFullTranslate(),M=this.chart.mapView,k=M&&M.projection;if(this.chart.hasRendered&&(this.isDirtyData||!this.hasRendered)&&(this.processData(),this.generatePoints(),delete this.bounds,!M||M.userOptions.center||_(M.userOptions.zoom)||M.zoom!==M.minZoom?this.getProjectedBounds():M.fitToBounds(void 0,void 0,!1)),M){let T=M.getSVGTransform();this.points.forEach(z=>{let N=_(z.insetIndex)&&M.insets[z.insetIndex].getSVGTransform()||T;N&&z.bounds&&_(z.bounds.midX)&&_(z.bounds.midY)&&(z.plotX=z.bounds.midX*N.scaleX+N.translateX,z.plotY=z.bounds.midY*N.scaleY+N.translateY),y&&(z.shapeType="path",z.shapeArgs={d:a.getProjectedPath(z,k)}),z.hiddenInDataClass||(z.projectedPath&&!z.projectedPath.length?z.setVisible(!1):z.visible||z.setVisible(!0))})}w(this,"afterTranslate")}update(y){y.mapData&&this.chart.mapView?.recommendMapView(this.chart,[this.chart.options.chart.map,...(this.chart.options.series||[]).map((M,k)=>k===this._i?y.mapData:M.mapData)],!0),super.update.apply(this,arguments)}}return d.defaultOptions=F(E.defaultOptions,h),L(d.prototype,{type:"map",axisTypes:i.seriesMembers.axisTypes,colorAttribs:i.seriesMembers.colorAttribs,colorKey:i.seriesMembers.colorKey,directTouch:!0,drawDataLabels:v,drawGraph:v,forceDL:!0,getCenter:r.getCenter,getExtremesFromAll:!0,getSymbol:v,isCartesian:!1,parallelArrays:i.seriesMembers.parallelArrays,pointArrayMap:i.seriesMembers.pointArrayMap,pointClass:a,preserveAspectRatio:!0,searchPoint:v,trackerGroups:i.seriesMembers.trackerGroups,useMapGeometry:!0}),i.compose(d),g.registerSeriesType("map",d),d}),s(t,"Series/MapLine/MapLineSeriesDefaults.js",[],function(){return{lineWidth:1,fillColor:"none",legendSymbol:"lineMarker"}}),s(t,"Series/MapLine/MapLineSeries.js",[t["Series/MapLine/MapLineSeriesDefaults.js"],t["Series/Map/MapSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{extend:l,merge:a}=n;class h extends i{pointAttribs(g,u){let p=super.pointAttribs(g,u);return p.fill=this.options.fillColor,p}}return h.defaultOptions=a(i.defaultOptions,e),l(h.prototype,{type:"mapline",colorProp:"stroke",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"}}),r.registerSeriesType("mapline",h),h}),s(t,"Series/MapPoint/MapPointPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:r}=e.seriesTypes,{isNumber:n}=i;class l extends r.prototype.pointClass{isValid(){return!!(this.options.geometry||n(this.x)&&n(this.y)||n(this.options.lon)&&n(this.options.lat))}}return l}),s(t,"Series/MapPoint/MapPointSeriesDefaults.js",[],function(){return{dataLabels:{crop:!1,defer:!1,enabled:!0,formatter:function(){return this.point.name},overflow:!1,style:{color:"#000000"}},legendSymbol:"lineMarker"}}),s(t,"Series/MapPoint/MapPointSeries.js",[t["Core/Globals.js"],t["Series/MapPoint/MapPointPoint.js"],t["Series/MapPoint/MapPointSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{noop:h}=e,{map:c,scatter:g}=n.seriesTypes,{extend:u,fireEvent:p,isNumber:b,merge:v}=a;class x extends g{constructor(){super(...arguments),this.clearBounds=c.prototype.clearBounds}drawDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}projectPoint(E){let L=this.chart.mapView;if(L){let{geometry:S,lon:w,lat:R}=E,O=S&&S.type==="Point"&&S.coordinates;if(b(w)&&b(R)&&(O=[w,R]),O)return L.lonLatToProjectedUnits({lon:O[0],lat:O[1]})}}translate(){let E=this.chart.mapView;if(this.processedXData||this.processData(),this.generatePoints(),this.getProjectedBounds&&this.isDirtyData&&(delete this.bounds,this.getProjectedBounds()),E){let L=E.getSVGTransform(),{hasCoordinates:S}=E.projection;this.points.forEach(w=>{let R,{x:O,y:I}=w,_=b(w.insetIndex)&&E.insets[w.insetIndex].getSVGTransform()||L,P=this.projectPoint(w.options)||w.properties&&this.projectPoint(w.properties);if(P?(O=P.x,I=P.y):w.bounds&&(O=w.bounds.midX,I=w.bounds.midY,_&&b(O)&&b(I)&&(w.plotX=O*_.scaleX+_.translateX,w.plotY=I*_.scaleY+_.translateY,R=!0)),b(O)&&b(I)){if(!R){let F=E.projectedUnitsToPixels({x:O,y:I});w.plotX=F.x,w.plotY=S?F.y:this.chart.plotHeight-F.y}}else w.y=w.plotX=w.plotY=void 0;w.isInside=this.isPointInside(w),w.zone=this.zones.length?w.getZone():void 0})}p(this,"afterTranslate")}}return x.defaultOptions=v(g.defaultOptions,r),l.prototype.symbols.mapmarker=(m,E,L,S,w)=>{let R,O,I=w&&w.context==="legend";I?(R=m+L/2,O=E+S):w&&typeof w.anchorX=="number"&&typeof w.anchorY=="number"?(R=w.anchorX,O=w.anchorY):(R=m+L/2,O=E+S/2,E-=S);let _=I?S/3:S/2;return[["M",R,O],["C",R,O,R-_,E+1.5*_,R-_,E+_],["A",_,_,1,1,1,R+_,E+_],["C",R+_,E+1.5*_,R,O,R,O],["Z"]]},u(x.prototype,{type:"mappoint",axisTypes:["colorAxis"],forceDL:!0,isCartesian:!1,pointClass:i,searchPoint:h,useMapGeometry:!0}),n.registerSeriesType("mappoint",x),x}),s(t,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}),s(t,"Series/Bubble/BubbleLegendItem.js",[t["Core/Color/Color.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{parse:l}=e,{noop:a}=r,{arrayMax:h,arrayMin:c,isNumber:g,merge:u,pick:p,stableSort:b}=n;return class{constructor(v,x){this.setState=a,this.init(v,x)}init(v,x){this.options=v,this.visible=!0,this.chart=x.chart,this.legend=x}addToLegend(v){v.splice(this.options.legendIndex,0,this)}drawLegendSymbol(v){let x,m=p(v.options.itemDistance,20),E=this.legendItem||{},L=this.options,S=L.ranges,w=L.connectorDistance;if(!S||!S.length||!g(S[0].value)){v.options.bubbleLegend.autoRanges=!0;return}b(S,function(_,P){return P.value-_.value}),this.ranges=S,this.setOptions(),this.render();let R=this.getMaxLabelSize(),O=this.ranges[0].radius,I=2*O;x=(x=w-O+R.width)>0?x:0,this.maxLabel=R,this.movementX=L.labels.align==="left"?x:0,E.labelWidth=I+x+m,E.labelHeight=I+R.height/2}setOptions(){let v=this.ranges,x=this.options,m=this.chart.series[x.seriesIndex],E=this.legend.baseline,L={zIndex:x.zIndex,"stroke-width":x.borderWidth},S={zIndex:x.zIndex,"stroke-width":x.connectorWidth},w={align:this.legend.options.rtl||x.labels.align==="left"?"right":"left",zIndex:x.zIndex},R=m.options.marker.fillOpacity,O=this.chart.styledMode;v.forEach(function(I,_){O||(L.stroke=p(I.borderColor,x.borderColor,m.color),L.fill=p(I.color,x.color,R!==1?l(m.color).setOpacity(R).get("rgba"):m.color),S.stroke=p(I.connectorColor,x.connectorColor,m.color)),v[_].radius=this.getRangeRadius(I.value),v[_]=u(v[_],{center:v[0].radius-v[_].radius+E}),O||u(!0,v[_],{bubbleAttribs:u(L),connectorAttribs:u(S),labelAttribs:w})},this)}getRangeRadius(v){let x=this.options,m=this.options.seriesIndex,E=this.chart.series[m],L=x.ranges[0].value,S=x.ranges[x.ranges.length-1].value,w=x.minSize,R=x.maxSize;return E.getRadius.call(this,S,L,w,R,v)}render(){let v=this.legendItem||{},x=this.chart.renderer,m=this.options.zThreshold;for(let E of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),v.symbol=x.g("bubble-legend"),v.label=x.g("bubble-legend-item").css(this.legend.itemStyle||{}),v.symbol.translateX=0,v.symbol.translateY=0,v.symbol.add(v.label),v.label.add(v.group),this.ranges))E.value>=m&&this.renderRange(E);this.hideOverlappingLabels()}renderRange(v){let x=this.ranges[0],m=this.legend,E=this.options,L=E.labels,S=this.chart,w=S.series[E.seriesIndex],R=S.renderer,O=this.symbols,I=O.labels,_=v.center,P=Math.abs(v.radius),F=E.connectorDistance||0,A=L.align,D=m.options.rtl,C=E.borderWidth,d=E.connectorWidth,f=x.radius||0,y=_-P-C/2+d/2,M=(y%1?1:.5)-(d%2?0:.5),k=R.styledMode,T=D||A==="left"?-F:F;A==="center"&&(T=0,E.connectorDistance=0,v.labelAttribs.align="center"),O.bubbleItems.push(R.circle(f,_+M,P).attr(k?{}:v.bubbleAttribs).addClass((k?"highcharts-color-"+w.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(E.className||"")).add(this.legendItem.symbol)),O.connectors.push(R.path(R.crispLine([["M",f,y],["L",f+T,y]],E.connectorWidth)).attr(k?{}:v.connectorAttribs).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(E.connectorClassName||"")).add(this.legendItem.symbol));let z=R.text(this.formatLabel(v)).attr(k?{}:v.labelAttribs).css(k?{}:L.style).addClass("highcharts-bubble-legend-labels "+(E.labels.className||"")).add(this.legendItem.symbol),N={x:f+T+E.labels.x,y:y+E.labels.y+.4*z.getBBox().height};z.attr(N),I.push(z),z.placed=!0,z.alignAttr=N}getMaxLabelSize(){let v,x;return this.symbols.labels.forEach(function(m){x=m.getBBox(!0),v=v?x.width>v.width?x:v:x}),v||{}}formatLabel(v){let x=this.options,m=x.labels.formatter,E=x.labels.format,{numberFormatter:L}=this.chart;return E?i.format(E,v):m?m.call(v):L(v.value,1)}hideOverlappingLabels(){let v=this.chart,x=this.options.labels.allowOverlap,m=this.symbols;!x&&m&&(v.hideOverlappingLabels(m.labels),m.labels.forEach(function(E,L){E.newOpacity?E.newOpacity!==E.oldOpacity&&m.connectors[L].show():m.connectors[L].hide()}))}getRanges(){let v=this.legend.bubbleLegend,x=v.chart.series,m=v.options.ranges,E,L,S=Number.MAX_VALUE,w=-Number.MAX_VALUE;return x.forEach(function(R){R.isBubble&&!R.ignoreSeries&&(L=R.zData.filter(g)).length&&(S=p(R.options.zMin,Math.min(S,Math.max(c(L),R.options.displayNegative===!1?R.options.zThreshold:-Number.MAX_VALUE))),w=p(R.options.zMax,Math.max(w,h(L))))}),E=S===w?[{value:w}]:[{value:S},{value:(S+w)/2},{value:w,autoRanges:!0}],m.length&&m[0].radius&&E.reverse(),E.forEach(function(R,O){m&&m[O]&&(E[O]=u(m[O],R))}),E}predictBubbleSizes(){let v=this.chart,x=v.legend.options,m=x.floating,E=x.layout==="horizontal",L=E?v.legend.lastLineHeight:0,S=v.plotSizeX,w=v.plotSizeY,R=v.series[this.options.seriesIndex],O=R.getPxExtremes(),I=Math.ceil(O.minPxSize),_=Math.ceil(O.maxPxSize),P,F=R.options.maxSize;return m||!/%$/.test(F)?P=_:(P=(Math.min(w,S)+L)*(F=parseFloat(F))/100/(F/100+1),(E&&w-P>=S||!E&&S-P>=w)&&(P=_)),[I,Math.ceil(P)]}updateRanges(v,x){let m=this.legend.options.bubbleLegend;m.minSize=v,m.maxSize=x,m.ranges=this.getRanges()}correctSizes(){let v=this.legend,x=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(x.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,x.maxPxSize),v.render())}}}),s(t,"Series/Bubble/BubbleLegendComposition.js",[t["Series/Bubble/BubbleLegendDefaults.js"],t["Series/Bubble/BubbleLegendItem.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{setOptions:a}=r,{composed:h}=n,{addEvent:c,objectEach:g,pushUnique:u,wrap:p}=l;function b(S,w,R){let O,I,_,P=this.legend,F=v(this)>=0;P&&P.options.enabled&&P.bubbleLegend&&P.options.bubbleLegend.autoRanges&&F?(O=P.bubbleLegend.options,I=P.bubbleLegend.predictBubbleSizes(),P.bubbleLegend.updateRanges(I[0],I[1]),O.placed||(P.group.placed=!1,P.allItems.forEach(A=>{(_=A.legendItem||{}).group&&(_.group.translateY=void 0)})),P.render(),O.placed||(this.getMargins(),this.axes.forEach(function(A){A.visible&&A.render(),O.placed||(A.setScale(),A.updateNames(),g(A.ticks,function(D){D.isNew=!0,D.isNewLabel=!0}))}),this.getMargins()),O.placed=!0,S.call(this,w,R),P.bubbleLegend.correctSizes(),L(P,x(P))):(S.call(this,w,R),P&&P.options.enabled&&P.bubbleLegend&&(P.render(),L(P,x(P))))}function v(S){let w=S.series,R=0;for(;RI.height&&(I.height=w[A].itemHeight);I.step=F}return R}function m(S){let w=this.bubbleLegend,R=this.options,O=R.bubbleLegend,I=v(this.chart);w&&w.ranges&&w.ranges.length&&(O.ranges.length&&(O.autoRanges=!!O.ranges[0].autoRanges),this.destroyItem(w)),I>=0&&R.enabled&&O.enabled&&(O.seriesIndex=I,this.bubbleLegend=new i(O,this),this.bubbleLegend.addToLegend(S.allItems))}function E(S){let w;if(S.defaultPrevented)return!1;let R=this.chart,O=this.visible,I=this.chart.legend;I&&I.bubbleLegend&&(this.visible=!O,this.ignoreSeries=O,w=v(R)>=0,I.bubbleLegend.visible!==w&&(I.update({bubbleLegend:{enabled:w}}),I.bubbleLegend.visible=w),this.visible=O)}function L(S,w){let R=S.allItems,O=S.options.rtl,I,_,P,F,A=0;R.forEach((D,C)=>{(F=D.legendItem||{}).group&&(I=F.group.translateX||0,_=F.y||0,((P=D.movementX)||O&&D.ranges)&&(P=O?I-D.options.maxSize/2:I+P,F.group.attr({translateX:P})),C>w[A].step&&A++,F.group.attr({translateY:Math.round(_+w[A].height/2)}),F.y=_+w[A].height/2)})}return{compose:function(S,w,R){u(h,"Series.BubbleLegend")&&(a({legend:{bubbleLegend:e}}),p(S.prototype,"drawChartBox",b),c(w,"afterGetAllItems",m),c(R,"legendItemClick",E))}}}),s(t,"Series/Bubble/BubblePoint.js",[t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{scatter:{prototype:{pointClass:n}}}}=i,{extend:l}=r;class a extends n{haloPath(c){return e.prototype.haloPath.call(this,c===0?0:(this.marker&&this.marker.radius||0)+c)}}return l(a.prototype,{ttBelow:!1}),a}),s(t,"Series/Bubble/BubbleSeries.js",[t["Series/Bubble/BubbleLegendComposition.js"],t["Series/Bubble/BubblePoint.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{parse:h}=r,{composed:c,noop:g}=n,{series:u,seriesTypes:{column:{prototype:p},scatter:b}}=l,{addEvent:v,arrayMax:x,arrayMin:m,clamp:E,extend:L,isNumber:S,merge:w,pick:R,pushUnique:O}=a;function I(){let P=this.len,{coll:F,isXAxis:A,min:D}=this,C=A?"xData":"yData",d=(this.max||0)-(D||0),f=0,y=P,M=P/d,k;(F==="xAxis"||F==="yAxis")&&(this.series.forEach(T=>{if(T.bubblePadding&&T.reserveSpace()){this.allowZoomOutside=!0,k=!0;let z=T[C];if(A&&((T.onPoint||T).getRadii(0,0,T),T.onPoint&&(T.radii=T.onPoint.radii)),d>0){let N=z.length;for(;N--;)if(S(z[N])&&this.dataMin<=z[N]&&z[N]<=this.max){let G=T.radii&&T.radii[N]||0;f=Math.min((z[N]-D)*M-G,f),y=Math.max((z[N]-D)*M+G,y)}}}}),k&&d>0&&!this.logarithmic&&(y-=P,M*=(P+Math.max(0,f)-Math.min(y,P))/P,[["min","userMin",f],["max","userMax",y]].forEach(T=>{R(this.options[T[0]],this[T[1]])===void 0&&(this[T[0]]+=T[2]/M)})))}class _ extends b{static compose(F,A,D,C){e.compose(A,D,C),O(c,"Series.Bubble")&&v(F,"foundExtremes",I)}animate(F){!F&&this.points.length{if(G.bubblePadding&&G.reserveSpace()){let X=(G.onPoint||G).getZExtremes();X&&(z=Math.min(R(z,X.zMin),X.zMin),N=Math.max(R(N,X.zMax),X.zMax),T=!0)}}),T?(y={zMin:z,zMax:N},this.chart.bubbleZExtremes=y):y={zMin:0,zMax:0}}for(d=0,C=F.length;d0&&(z=(d-F)/T)}return M&&z>=0&&(z=Math.sqrt(z)),Math.ceil(D+z*(C-D))/2}hasData(){return!!this.processedXData.length}markerAttribs(F,A){let D=super.markerAttribs(F,A),{height:C=0,width:d=0}=D;return this.chart.inverted?L(D,{x:(F.plotX||0)-d/2,y:(F.plotY||0)-C/2}):D}pointAttribs(F,A){let D=this.options.marker.fillOpacity,C=u.prototype.pointAttribs.call(this,F,A);return D!==1&&(C.fill=h(C.fill).setOpacity(D).get("rgba")),C}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:F,options:A,radii:D}=this,{minPxSize:C}=this.getPxExtremes(),d=F.length;for(;d--;){let f=F[d],y=D?D[d]:0;this.zoneAxis==="z"&&(f.negative=(f.z||0)<(A.zThreshold||0)),S(y)&&y>=C/2?(f.marker=L(f.marker,{radius:y,width:2*y,height:2*y}),f.dlBox={x:f.plotX-y,y:f.plotY-y,width:2*y,height:2*y}):(f.shapeArgs=f.plotY=f.dlBox=void 0,f.isInside=!1)}}getPxExtremes(){let F=Math.min(this.chart.plotWidth,this.chart.plotHeight),A=d=>{let f;return typeof d=="string"&&(f=/%$/.test(d),d=parseInt(d,10)),f?F*d/100:d},D=A(R(this.options.minSize,8)),C=Math.max(A(R(this.options.maxSize,"20%")),D);return{minPxSize:D,maxPxSize:C}}getZExtremes(){let F=this.options,A=(this.zData||[]).filter(S);if(A.length){let D=R(F.zMin,E(m(A),F.displayNegative===!1?F.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),C=R(F.zMax,x(A));if(S(D)&&S(C))return{zMin:D,zMax:C}}}}return _.defaultOptions=w(b.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:P}=this.series.chart,{z:F}=this.point;return S(F)?P(F,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),L(_.prototype,{alignDataLabel:p.alignDataLabel,applyZones:g,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:i,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),v(_,"updatedData",P=>{delete P.target.chart.bubbleZExtremes}),v(_,"remove",P=>{delete P.target.chart.bubbleZExtremes}),l.registerSeriesType("bubble",_),_}),s(t,"Series/MapBubble/MapBubblePoint.js",[t["Series/Bubble/BubblePoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{map:{prototype:{pointClass:{prototype:n}}}}}=i,{extend:l}=r;class a extends e{isValid(){return typeof this.z=="number"}}return l(a.prototype,{applyOptions:n.applyOptions,getProjectedBounds:n.getProjectedBounds}),a}),s(t,"Series/MapBubble/MapBubbleSeries.js",[t["Series/Bubble/BubbleSeries.js"],t["Series/MapBubble/MapBubblePoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{seriesTypes:{map:{prototype:l},mappoint:{prototype:a}}}=r,{extend:h,merge:c}=n;class g extends e{constructor(){super(...arguments),this.clearBounds=l.clearBounds}searchPoint(p,b){return this.searchKDTree({plotX:p.chartX-this.chart.plotLeft,plotY:p.chartY-this.chart.plotTop},b,p)}translate(){a.translate.call(this),this.getRadii(),this.translateBubble()}updateParallelArrays(p,b,v){super.updateParallelArrays.call(this,p,b,v);let x=this.processedXData,m=this.xData;x&&m&&(x.length=m.length)}}return g.defaultOptions=c(e.defaultOptions,{lineWidth:0,animationLimit:500,joinBy:"hc-key",tooltip:{pointFormat:"{point.name}: {point.z}"}}),h(g.prototype,{type:"mapbubble",axisTypes:["colorAxis"],getProjectedBounds:l.getProjectedBounds,isCartesian:!1,pointArrayMap:["z"],pointClass:i,processData:l.processData,projectPoint:a.projectPoint,kdAxisArray:["plotX","plotY"],setData:l.setData,setOptions:l.setOptions,updateData:l.updateData,useMapGeometry:!0,xyFromShape:!0}),r.registerSeriesType("mapbubble",g),g}),s(t,"Series/Heatmap/HeatmapPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{clamp:n,defined:l,extend:a,pick:h}=i;class c extends r{applyOptions(u,p){return(this.isNull||this.value===null)&&delete this.color,super.applyOptions(u,p),this.formatPrefix=this.isNull||this.value===null?"null":"point",this}getCellAttributes(){let u=this.series,p=u.options,b=(p.colsize||1)/2,v=(p.rowsize||1)/2,x=u.xAxis,m=u.yAxis,E=this.options.marker||u.options.marker,L=u.pointPlacementToXValue(),S=h(this.pointPadding,p.pointPadding,0),w={x1:n(Math.round(x.len-x.translate(this.x-b,!1,!0,!1,!0,-L)),-x.len,2*x.len),x2:n(Math.round(x.len-x.translate(this.x+b,!1,!0,!1,!0,-L)),-x.len,2*x.len),y1:n(Math.round(m.translate(this.y-v,!1,!0,!1,!0)),-m.len,2*m.len),y2:n(Math.round(m.translate(this.y+v,!1,!0,!1,!0)),-m.len,2*m.len)};for(let R of[["width","x"],["height","y"]]){let O=R[0],I=R[1],_=I+"1",P=I+"2",F=Math.abs(w[_]-w[P]),A=E&&E.lineWidth||0,D=Math.abs(w[_]+w[P])/2,C=E&&E[O];if(l(C)&&C"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}}),s(t,"Series/InterpolationUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{doc:r}=e,{defined:n,pick:l}=i;return{colorFromPoint:function(a,h){let c=h.series.colorAxis;if(c){let g=c.toColor(a||0,h).split(")")[0].split("(")[1].split(",").map(u=>l(parseFloat(u),parseInt(u,10)));return g[3]=255*l(g[3],1),n(a)&&h.visible||(g[3]=0),g}return[0,0,0,0]},getContext:function(a){let{canvas:h,context:c}=a;return h&&c?(c.clearRect(0,0,h.width,h.height),c):(a.canvas=r.createElement("canvas"),a.context=a.canvas.getContext("2d",{willReadFrequently:!0})||void 0,a.context)}}}),s(t,"Series/Heatmap/HeatmapSeries.js",[t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Series/Heatmap/HeatmapPoint.js"],t["Series/Heatmap/HeatmapSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"],t["Series/InterpolationUtilities.js"]],function(e,i,r,n,l,a,h,c){let{series:g,seriesTypes:{column:u,scatter:p}}=l,{prototype:{symbols:b}}=a,{addEvent:v,extend:x,fireEvent:m,isNumber:E,merge:L,pick:S}=h,{colorFromPoint:w,getContext:R}=c;class O extends p{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let _=this,P=_.options,F=P.interpolation,A=P.marker||{};if(F){let{image:D,chart:C,xAxis:d,yAxis:f}=_,{reversed:y=!1,len:M}=d,{reversed:k=!1,len:T}=f,z={width:M,height:T};if(!D||_.isDirtyData||_.isDirtyCanvas){let N=R(_),{canvas:G,options:{colsize:X=1,rowsize:j=1},points:B,points:{length:W}}=_,Y=C.colorAxis&&C.colorAxis[0];if(G&&N&&Y){let{min:U,max:q}=d.getExtremes(),{min:H,max:V}=f.getExtremes(),Z=q-U,K=V-H,J=Math.round(Z/X/8*8),tt=Math.round(K/j/8*8),[$,Q]=[[J,J/Z,y,"ceil"],[tt,tt/K,!k,"floor"]].map(([ot,at,ct,ht])=>ct?lt=>Math[ht](ot-at*lt):lt=>Math[ht](at*lt)),et=G.width=J+1,it=et*(G.height=tt+1),st=(W-1)/it,rt=new Uint8ClampedArray(4*it),nt=(ot,at)=>4*Math.ceil(et*Q(at-H)+$(ot-U));_.buildKDTree();for(let ot=0;ot{D.graphic&&(D.graphic[_.chart.styledMode?"css":"animate"](_.colorAttribs(D)),D.value===null&&D.graphic.addClass("highcharts-null-point"))}))}getExtremes(){let{dataMin:_,dataMax:P}=g.prototype.getExtremes.call(this,this.valueData);return E(_)&&(this.valueMin=_),E(P)&&(this.valueMax=P),g.prototype.getExtremes.call(this)}getValidPoints(_,P){return g.prototype.getValidPoints.call(this,_,P,!0)}hasData(){return!!this.processedXData.length}init(){super.init.apply(this,arguments);let _=this.options;_.pointRange=S(_.pointRange,_.colsize||1),this.yAxis.axisPointRange=_.rowsize||1,b.ellipse=b.circle,_.marker&&E(_.borderRadius)&&(_.marker.r=_.borderRadius)}markerAttribs(_,P){let F=_.shapeArgs||{};if(_.hasImage)return{x:_.plotX,y:_.plotY};if(P&&P!=="normal"){let A=_.options.marker||{},D=this.options.marker||{},C=D.states&&D.states[P]||{},d=A.states&&A.states[P]||{},f=(d.width||C.width||F.width||0)+(d.widthPlus||C.widthPlus||0),y=(d.height||C.height||F.height||0)+(d.heightPlus||C.heightPlus||0);return{x:(F.x||0)+((F.width||0)-f)/2,y:(F.y||0)+((F.height||0)-y)/2,width:f,height:y}}return F}pointAttribs(_,P){let F=g.prototype.pointAttribs.call(this,_,P),A=this.options||{},D=this.chart.options.plotOptions||{},C=D.series||{},d=D.heatmap||{},f=_&&_.options.borderColor||A.borderColor||d.borderColor||C.borderColor,y=_&&_.options.borderWidth||A.borderWidth||d.borderWidth||C.borderWidth||F["stroke-width"];if(F.stroke=_&&_.marker&&_.marker.lineColor||A.marker&&A.marker.lineColor||f||this.color,F["stroke-width"]=y,P&&P!=="normal"){let M=L(A.states&&A.states[P],A.marker&&A.marker.states&&A.marker.states[P],_&&_.options.states&&_.options.states[P]||{});F.fill=M.color||e.parse(F.fill).brighten(M.brightness||0).get(),F.stroke=M.lineColor||F.stroke}return F}translate(){let{borderRadius:_,marker:P}=this.options,F=P&&P.symbol||"rect",A=b[F]?F:"rect",D=["circle","square"].indexOf(A)!==-1;for(let C of(this.generatePoints(),this.points)){let d=C.getCellAttributes(),f=Math.min(d.x1,d.x2),y=Math.min(d.y1,d.y2),M=Math.max(Math.abs(d.x2-d.x1),0),k=Math.max(Math.abs(d.y2-d.y1),0);if(C.hasImage=(C.marker&&C.marker.symbol||F||"").indexOf("url")===0,D){let T=Math.abs(M-k);f=Math.min(d.x1,d.x2)+(M{"use strict";(function(o){typeof Bn=="object"&&Bn.exports?(o.default=o,Bn.exports=o):typeof define=="function"&&define.amd?define("highcharts/highcharts-more",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Extensions/Pane/PaneComposition.js",[t["Core/Utilities.js"]],function(e){let{addEvent:i,correctFloat:r,defined:n,pick:l}=e;function a(p){let b,v=this;return p&&v.pane.forEach(x=>{h(p.chartX-v.plotLeft,p.chartY-v.plotTop,x.center)&&(b=x)}),b}function h(p,b,v,x,m){let E=!0,L=v[0],S=v[1];if(n(x)&&n(m)){let w=Math.atan2(r(b-S,8),r(p-L,8));m!==x&&(E=x>m?w>=x&&w<=Math.PI||w<=m&&w>=-Math.PI:w>=x&&w<=r(m,8))}return Math.sqrt(Math.pow(p-L,2)+Math.pow(b-S,2))<=Math.ceil(v[2]/2)&&E}function c(p){this.polar&&(p.options.inverted&&([p.x,p.y]=[p.y,p.x]),p.isInsidePlot=this.pane.some(b=>h(p.x,p.y,b.center,b.axis&&b.axis.normalizedStartAngleRad,b.axis&&b.axis.normalizedEndAngleRad)))}function g(p){let b=this.chart;p.hoverPoint&&p.hoverPoint.plotX&&p.hoverPoint.plotY&&b.hoverPane&&!h(p.hoverPoint.plotX,p.hoverPoint.plotY,b.hoverPane.center)&&(p.hoverPoint=void 0)}function u(p){let b=this.chart;b.polar?(b.hoverPane=b.getHoverPane(p),p.filter=function(v){return v.visible&&!(!p.shared&&v.directTouch)&&l(v.options.enableMouseTracking,!0)&&(!b.hoverPane||v.xAxis.pane===b.hoverPane)}):b.hoverPane=void 0}return{compose:function(p,b){let v=p.prototype;v.getHoverPane||(v.collectionsWithUpdate.push("pane"),v.getHoverPane=a,i(p,"afterIsInsidePlot",c),i(b,"afterGetHoverData",g),i(b,"beforeGetHoverData",u))}}}),s(t,"Extensions/Pane/PaneDefaults.js",[],function(){return{pane:{center:["50%","50%"],size:"85%",innerSize:"0%",startAngle:0},background:{shape:"circle",borderRadius:0,borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}}}),s(t,"Extensions/Pane/Pane.js",[t["Series/CenteredUtilities.js"],t["Extensions/Pane/PaneComposition.js"],t["Extensions/Pane/PaneDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{extend:l,merge:a,splat:h}=n;class c{constructor(u,p){this.coll="pane",this.init(u,p)}init(u,p){this.chart=p,this.background=[],p.pane.push(this),this.setOptions(u)}setOptions(u){this.options=u=a(r.pane,this.chart.angular?{background:{}}:void 0,u)}render(){let u=this.options,p=this.chart.renderer;this.group||(this.group=p.g("pane-group").attr({zIndex:u.zIndex||0}).add()),this.updateCenter();let b=this.options.background;if(b){let v=Math.max((b=h(b)).length,this.background.length||0);for(let x=0;xd,w.y=w.high,w._plotY=w.plotY,w.plotY=C,F[S]=w.dataLabel,w.dataLabel=w.dataLabelUpper,w.below=R,D?O.align||(O.align=R?"right":"left"):O.verticalAlign||(O.verticalAlign=R?"top":"bottom")}for(this.options.dataLabels=O,h.drawDataLabels&&h.drawDataLabels.apply(this,arguments),S=P;S--;)(w=_[S])&&(w.dataLabelUpper=w.dataLabel,w.dataLabel=F[S],delete w.dataLabels,w.y=w.low,w.plotY=w._plotY)}if(I.enabled||this.hasDataLabels?.()){for(S=P;S--;)if(w=_[S]){let{plotHigh:C=0,plotLow:d=0}=w;R=I.inside?Cd,w.below=!R,D?I.align||(I.align=R?"left":"right"):I.verticalAlign||(I.verticalAlign=R?"bottom":"top")}this.options.dataLabels=I,h.drawDataLabels&&h.drawDataLabels.apply(this,arguments)}if(O.enabled)for(S=P;S--;)(w=_[S])&&(w.dataLabels=[w.dataLabelUpper,w.dataLabel].filter(function(C){return!!C}));this.options.dataLabels=A}}alignDataLabel(){c.alignDataLabel.apply(this,arguments)}modifyMarkerSettings(){let S={marker:this.options.marker,symbol:this.symbol};if(this.options.lowMarker){let{options:{marker:w,lowMarker:R}}=this;this.options.marker=m(w,R),R.symbol&&(this.symbol=R.symbol)}return S}restoreMarkerSettings(S){this.options.marker=S.marker,this.symbol=S.symbol}drawPoints(){let S,w,R=this.points.length,O=this.modifyMarkerSettings();for(h.drawPoints.apply(this,arguments),this.restoreMarkerSettings(O),S=0;S=0&&w.plotY<=this.yAxis.len&&w.plotX>=0&&w.plotX<=this.xAxis.len),S++;for(h.drawPoints.apply(this,arguments),S=0;S\u25CF {series.name}: {point.low} - {point.high}
'},trackByArea:!0,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}}),g(E,"afterTranslate",function(){this.pointArrayMap.join(",")==="low,high"&&this.points.forEach(L=>{let S=L.high,w=L.plotY;L.isNull?L.plotY=void 0:(L.plotLow=w,L.plotHigh=v(S)?this.yAxis.translate(this.dataModify?this.dataModify.modifyValue(S):S,!1,!0,void 0,!0):void 0,this.dataModify&&(L.yBottom=L.plotHigh))})},{order:0}),g(E,"afterTranslate",function(){this.points.forEach(L=>{if(this.chart.polar)this.highToXY(L),L.plotLow=L.plotY,L.tooltipPos=[((L.plotHighX||0)+(L.plotLowX||0))/2,((L.plotHigh||0)+(L.plotLow||0))/2];else{let S=L.pos(!1,L.plotLow),w=L.pos(!1,L.plotHigh);S&&w&&(S[0]=(S[0]+w[0])/2,S[1]=(S[1]+w[1])/2),L.tooltipPos=S}})},{order:3}),p(E.prototype,{deferTranslatePolar:!0,pointArrayMap:["low","high"],pointClass:e,pointValKey:"low",setStackedPoints:l}),r.registerSeriesType("arearange",E),E}),s(t,"Series/AreaSplineRange/AreaSplineRangeSeries.js",[t["Series/AreaRange/AreaRangeSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{spline:{prototype:n}}=i.seriesTypes,{merge:l,extend:a}=r;class h extends e{}return h.defaultOptions=l(e.defaultOptions),a(h.prototype,{getPointSpline:n.getPointSpline}),i.registerSeriesType("areasplinerange",h),h}),s(t,"Series/BoxPlot/BoxPlotSeriesDefaults.js",[],function(){return{threshold:null,tooltip:{pointFormat:'\u25CF {series.name}
Maximum: {point.high}
Upper quartile: {point.q3}
Median: {point.median}
Lower quartile: {point.q1}
Minimum: {point.low}
'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2}}),s(t,"Series/BoxPlot/BoxPlotSeries.js",[t["Series/BoxPlot/BoxPlotSeriesDefaults.js"],t["Series/Column/ColumnSeries.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{noop:a}=r,{crisp:h,extend:c,merge:g,pick:u}=l;class p extends i{pointAttribs(){return{}}translate(){let v=this.yAxis,x=this.pointArrayMap;super.translate.apply(this),this.points.forEach(function(m){x.forEach(function(E){m[E]!==null&&(m[E+"Plot"]=v.translate(m[E],0,1,0,1))}),m.plotHigh=m.highPlot})}drawPoints(){let v,x,m,E,L,S,w,R,O,I,_,P,F,A=this.points,D=this.options,C=this.chart,d=C.renderer,f=this.doQuartiles!==!1,y=this.options.whiskerLength;for(let M of A){let k=(R=M.graphic)?"animate":"attr",T=M.shapeArgs,z={},N={},G={},X={},j=M.color||this.color;if(M.plotY!==void 0){let B;O=T.width,_=(I=T.x)+O,P=O/2,v=f?M.q1Plot:M.lowPlot,x=f?M.q3Plot:M.lowPlot,m=M.highPlot,E=M.lowPlot,R||(M.graphic=R=d.g("point").add(this.group),M.stem=d.path().addClass("highcharts-boxplot-stem").add(R),y&&(M.whiskers=d.path().addClass("highcharts-boxplot-whisker").add(R)),f&&(M.box=d.path(w).addClass("highcharts-boxplot-box").add(R)),M.medianShape=d.path(S).addClass("highcharts-boxplot-median").add(R)),C.styledMode||(N.stroke=M.stemColor||D.stemColor||j,N["stroke-width"]=u(M.stemWidth,D.stemWidth,D.lineWidth),N.dashstyle=M.stemDashStyle||D.stemDashStyle||D.dashStyle,M.stem.attr(N),y&&(G.stroke=M.whiskerColor||D.whiskerColor||j,G["stroke-width"]=u(M.whiskerWidth,D.whiskerWidth,D.lineWidth),G.dashstyle=M.whiskerDashStyle||D.whiskerDashStyle||D.dashStyle,M.whiskers.attr(G)),f&&(z.fill=M.fillColor||D.fillColor||j,z.stroke=D.lineColor||j,z["stroke-width"]=D.lineWidth||0,z.dashstyle=M.boxDashStyle||D.boxDashStyle||D.dashStyle,M.box.attr(z)),X.stroke=M.medianColor||D.medianColor||j,X["stroke-width"]=u(M.medianWidth,D.medianWidth,D.lineWidth),X.dashstyle=M.medianDashStyle||D.medianDashStyle||D.dashStyle,M.medianShape.attr(X));let W=h(M.plotX||0,M.stem.strokeWidth());if(B=[["M",W,x],["L",W,m],["M",W,v],["L",W,E]],M.stem[k]({d:B}),f){let Y=M.box.strokeWidth();v=h(v,Y),x=h(x,Y),B=[["M",I=h(I,Y),x],["L",I,v],["L",_=h(_,Y),v],["L",_,x],["L",I,x],["Z"]],M.box[k]({d:B})}if(y){let Y=M.whiskers.strokeWidth();m=h(M.highPlot,Y),E=h(M.lowPlot,Y),B=[["M",h(W-(F=typeof y=="string"&&/%$/.test(y)?P*parseFloat(y)/100:Number(y)/2)),m],["L",h(W+F),m],["M",h(W-F),E],["L",h(W+F),E]],M.whiskers[k]({d:B})}B=[["M",I,L=h(M.medianPlot,M.medianShape.strokeWidth())],["L",_,L]],M.medianShape[k]({d:B})}}}toYData(v){return[v.low,v.q1,v.median,v.q3,v.high]}}return p.defaultOptions=g(i.defaultOptions,e),c(p.prototype,{pointArrayMap:["low","q1","median","q3","high"],pointValKey:"high",drawDataLabels:a,setStackedPoints:a}),n.registerSeriesType("boxplot",p),p}),s(t,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}),s(t,"Series/Bubble/BubbleLegendItem.js",[t["Core/Color/Color.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{parse:l}=e,{noop:a}=r,{arrayMax:h,arrayMin:c,isNumber:g,merge:u,pick:p,stableSort:b}=n;return class{constructor(v,x){this.setState=a,this.init(v,x)}init(v,x){this.options=v,this.visible=!0,this.chart=x.chart,this.legend=x}addToLegend(v){v.splice(this.options.legendIndex,0,this)}drawLegendSymbol(v){let x,m=p(v.options.itemDistance,20),E=this.legendItem||{},L=this.options,S=L.ranges,w=L.connectorDistance;if(!S||!S.length||!g(S[0].value)){v.options.bubbleLegend.autoRanges=!0;return}b(S,function(_,P){return P.value-_.value}),this.ranges=S,this.setOptions(),this.render();let R=this.getMaxLabelSize(),O=this.ranges[0].radius,I=2*O;x=(x=w-O+R.width)>0?x:0,this.maxLabel=R,this.movementX=L.labels.align==="left"?x:0,E.labelWidth=I+x+m,E.labelHeight=I+R.height/2}setOptions(){let v=this.ranges,x=this.options,m=this.chart.series[x.seriesIndex],E=this.legend.baseline,L={zIndex:x.zIndex,"stroke-width":x.borderWidth},S={zIndex:x.zIndex,"stroke-width":x.connectorWidth},w={align:this.legend.options.rtl||x.labels.align==="left"?"right":"left",zIndex:x.zIndex},R=m.options.marker.fillOpacity,O=this.chart.styledMode;v.forEach(function(I,_){O||(L.stroke=p(I.borderColor,x.borderColor,m.color),L.fill=p(I.color,x.color,R!==1?l(m.color).setOpacity(R).get("rgba"):m.color),S.stroke=p(I.connectorColor,x.connectorColor,m.color)),v[_].radius=this.getRangeRadius(I.value),v[_]=u(v[_],{center:v[0].radius-v[_].radius+E}),O||u(!0,v[_],{bubbleAttribs:u(L),connectorAttribs:u(S),labelAttribs:w})},this)}getRangeRadius(v){let x=this.options,m=this.options.seriesIndex,E=this.chart.series[m],L=x.ranges[0].value,S=x.ranges[x.ranges.length-1].value,w=x.minSize,R=x.maxSize;return E.getRadius.call(this,S,L,w,R,v)}render(){let v=this.legendItem||{},x=this.chart.renderer,m=this.options.zThreshold;for(let E of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),v.symbol=x.g("bubble-legend"),v.label=x.g("bubble-legend-item").css(this.legend.itemStyle||{}),v.symbol.translateX=0,v.symbol.translateY=0,v.symbol.add(v.label),v.label.add(v.group),this.ranges))E.value>=m&&this.renderRange(E);this.hideOverlappingLabels()}renderRange(v){let x=this.ranges[0],m=this.legend,E=this.options,L=E.labels,S=this.chart,w=S.series[E.seriesIndex],R=S.renderer,O=this.symbols,I=O.labels,_=v.center,P=Math.abs(v.radius),F=E.connectorDistance||0,A=L.align,D=m.options.rtl,C=E.borderWidth,d=E.connectorWidth,f=x.radius||0,y=_-P-C/2+d/2,M=(y%1?1:.5)-(d%2?0:.5),k=R.styledMode,T=D||A==="left"?-F:F;A==="center"&&(T=0,E.connectorDistance=0,v.labelAttribs.align="center"),O.bubbleItems.push(R.circle(f,_+M,P).attr(k?{}:v.bubbleAttribs).addClass((k?"highcharts-color-"+w.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(E.className||"")).add(this.legendItem.symbol)),O.connectors.push(R.path(R.crispLine([["M",f,y],["L",f+T,y]],E.connectorWidth)).attr(k?{}:v.connectorAttribs).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(E.connectorClassName||"")).add(this.legendItem.symbol));let z=R.text(this.formatLabel(v)).attr(k?{}:v.labelAttribs).css(k?{}:L.style).addClass("highcharts-bubble-legend-labels "+(E.labels.className||"")).add(this.legendItem.symbol),N={x:f+T+E.labels.x,y:y+E.labels.y+.4*z.getBBox().height};z.attr(N),I.push(z),z.placed=!0,z.alignAttr=N}getMaxLabelSize(){let v,x;return this.symbols.labels.forEach(function(m){x=m.getBBox(!0),v=v?x.width>v.width?x:v:x}),v||{}}formatLabel(v){let x=this.options,m=x.labels.formatter,E=x.labels.format,{numberFormatter:L}=this.chart;return E?i.format(E,v):m?m.call(v):L(v.value,1)}hideOverlappingLabels(){let v=this.chart,x=this.options.labels.allowOverlap,m=this.symbols;!x&&m&&(v.hideOverlappingLabels(m.labels),m.labels.forEach(function(E,L){E.newOpacity?E.newOpacity!==E.oldOpacity&&m.connectors[L].show():m.connectors[L].hide()}))}getRanges(){let v=this.legend.bubbleLegend,x=v.chart.series,m=v.options.ranges,E,L,S=Number.MAX_VALUE,w=-Number.MAX_VALUE;return x.forEach(function(R){R.isBubble&&!R.ignoreSeries&&(L=R.zData.filter(g)).length&&(S=p(R.options.zMin,Math.min(S,Math.max(c(L),R.options.displayNegative===!1?R.options.zThreshold:-Number.MAX_VALUE))),w=p(R.options.zMax,Math.max(w,h(L))))}),E=S===w?[{value:w}]:[{value:S},{value:(S+w)/2},{value:w,autoRanges:!0}],m.length&&m[0].radius&&E.reverse(),E.forEach(function(R,O){m&&m[O]&&(E[O]=u(m[O],R))}),E}predictBubbleSizes(){let v=this.chart,x=v.legend.options,m=x.floating,E=x.layout==="horizontal",L=E?v.legend.lastLineHeight:0,S=v.plotSizeX,w=v.plotSizeY,R=v.series[this.options.seriesIndex],O=R.getPxExtremes(),I=Math.ceil(O.minPxSize),_=Math.ceil(O.maxPxSize),P,F=R.options.maxSize;return m||!/%$/.test(F)?P=_:(P=(Math.min(w,S)+L)*(F=parseFloat(F))/100/(F/100+1),(E&&w-P>=S||!E&&S-P>=w)&&(P=_)),[I,Math.ceil(P)]}updateRanges(v,x){let m=this.legend.options.bubbleLegend;m.minSize=v,m.maxSize=x,m.ranges=this.getRanges()}correctSizes(){let v=this.legend,x=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(x.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,x.maxPxSize),v.render())}}}),s(t,"Series/Bubble/BubbleLegendComposition.js",[t["Series/Bubble/BubbleLegendDefaults.js"],t["Series/Bubble/BubbleLegendItem.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{setOptions:a}=r,{composed:h}=n,{addEvent:c,objectEach:g,pushUnique:u,wrap:p}=l;function b(S,w,R){let O,I,_,P=this.legend,F=v(this)>=0;P&&P.options.enabled&&P.bubbleLegend&&P.options.bubbleLegend.autoRanges&&F?(O=P.bubbleLegend.options,I=P.bubbleLegend.predictBubbleSizes(),P.bubbleLegend.updateRanges(I[0],I[1]),O.placed||(P.group.placed=!1,P.allItems.forEach(A=>{(_=A.legendItem||{}).group&&(_.group.translateY=void 0)})),P.render(),O.placed||(this.getMargins(),this.axes.forEach(function(A){A.visible&&A.render(),O.placed||(A.setScale(),A.updateNames(),g(A.ticks,function(D){D.isNew=!0,D.isNewLabel=!0}))}),this.getMargins()),O.placed=!0,S.call(this,w,R),P.bubbleLegend.correctSizes(),L(P,x(P))):(S.call(this,w,R),P&&P.options.enabled&&P.bubbleLegend&&(P.render(),L(P,x(P))))}function v(S){let w=S.series,R=0;for(;RI.height&&(I.height=w[A].itemHeight);I.step=F}return R}function m(S){let w=this.bubbleLegend,R=this.options,O=R.bubbleLegend,I=v(this.chart);w&&w.ranges&&w.ranges.length&&(O.ranges.length&&(O.autoRanges=!!O.ranges[0].autoRanges),this.destroyItem(w)),I>=0&&R.enabled&&O.enabled&&(O.seriesIndex=I,this.bubbleLegend=new i(O,this),this.bubbleLegend.addToLegend(S.allItems))}function E(S){let w;if(S.defaultPrevented)return!1;let R=this.chart,O=this.visible,I=this.chart.legend;I&&I.bubbleLegend&&(this.visible=!O,this.ignoreSeries=O,w=v(R)>=0,I.bubbleLegend.visible!==w&&(I.update({bubbleLegend:{enabled:w}}),I.bubbleLegend.visible=w),this.visible=O)}function L(S,w){let R=S.allItems,O=S.options.rtl,I,_,P,F,A=0;R.forEach((D,C)=>{(F=D.legendItem||{}).group&&(I=F.group.translateX||0,_=F.y||0,((P=D.movementX)||O&&D.ranges)&&(P=O?I-D.options.maxSize/2:I+P,F.group.attr({translateX:P})),C>w[A].step&&A++,F.group.attr({translateY:Math.round(_+w[A].height/2)}),F.y=_+w[A].height/2)})}return{compose:function(S,w,R){u(h,"Series.BubbleLegend")&&(a({legend:{bubbleLegend:e}}),p(S.prototype,"drawChartBox",b),c(w,"afterGetAllItems",m),c(R,"legendItemClick",E))}}}),s(t,"Series/Bubble/BubblePoint.js",[t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{scatter:{prototype:{pointClass:n}}}}=i,{extend:l}=r;class a extends n{haloPath(c){return e.prototype.haloPath.call(this,c===0?0:(this.marker&&this.marker.radius||0)+c)}}return l(a.prototype,{ttBelow:!1}),a}),s(t,"Series/Bubble/BubbleSeries.js",[t["Series/Bubble/BubbleLegendComposition.js"],t["Series/Bubble/BubblePoint.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{parse:h}=r,{composed:c,noop:g}=n,{series:u,seriesTypes:{column:{prototype:p},scatter:b}}=l,{addEvent:v,arrayMax:x,arrayMin:m,clamp:E,extend:L,isNumber:S,merge:w,pick:R,pushUnique:O}=a;function I(){let P=this.len,{coll:F,isXAxis:A,min:D}=this,C=A?"xData":"yData",d=(this.max||0)-(D||0),f=0,y=P,M=P/d,k;(F==="xAxis"||F==="yAxis")&&(this.series.forEach(T=>{if(T.bubblePadding&&T.reserveSpace()){this.allowZoomOutside=!0,k=!0;let z=T[C];if(A&&((T.onPoint||T).getRadii(0,0,T),T.onPoint&&(T.radii=T.onPoint.radii)),d>0){let N=z.length;for(;N--;)if(S(z[N])&&this.dataMin<=z[N]&&z[N]<=this.max){let G=T.radii&&T.radii[N]||0;f=Math.min((z[N]-D)*M-G,f),y=Math.max((z[N]-D)*M+G,y)}}}}),k&&d>0&&!this.logarithmic&&(y-=P,M*=(P+Math.max(0,f)-Math.min(y,P))/P,[["min","userMin",f],["max","userMax",y]].forEach(T=>{R(this.options[T[0]],this[T[1]])===void 0&&(this[T[0]]+=T[2]/M)})))}class _ extends b{static compose(F,A,D,C){e.compose(A,D,C),O(c,"Series.Bubble")&&v(F,"foundExtremes",I)}animate(F){!F&&this.points.length{if(G.bubblePadding&&G.reserveSpace()){let X=(G.onPoint||G).getZExtremes();X&&(z=Math.min(R(z,X.zMin),X.zMin),N=Math.max(R(N,X.zMax),X.zMax),T=!0)}}),T?(y={zMin:z,zMax:N},this.chart.bubbleZExtremes=y):y={zMin:0,zMax:0}}for(d=0,C=F.length;d0&&(z=(d-F)/T)}return M&&z>=0&&(z=Math.sqrt(z)),Math.ceil(D+z*(C-D))/2}hasData(){return!!this.processedXData.length}markerAttribs(F,A){let D=super.markerAttribs(F,A),{height:C=0,width:d=0}=D;return this.chart.inverted?L(D,{x:(F.plotX||0)-d/2,y:(F.plotY||0)-C/2}):D}pointAttribs(F,A){let D=this.options.marker.fillOpacity,C=u.prototype.pointAttribs.call(this,F,A);return D!==1&&(C.fill=h(C.fill).setOpacity(D).get("rgba")),C}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:F,options:A,radii:D}=this,{minPxSize:C}=this.getPxExtremes(),d=F.length;for(;d--;){let f=F[d],y=D?D[d]:0;this.zoneAxis==="z"&&(f.negative=(f.z||0)<(A.zThreshold||0)),S(y)&&y>=C/2?(f.marker=L(f.marker,{radius:y,width:2*y,height:2*y}),f.dlBox={x:f.plotX-y,y:f.plotY-y,width:2*y,height:2*y}):(f.shapeArgs=f.plotY=f.dlBox=void 0,f.isInside=!1)}}getPxExtremes(){let F=Math.min(this.chart.plotWidth,this.chart.plotHeight),A=d=>{let f;return typeof d=="string"&&(f=/%$/.test(d),d=parseInt(d,10)),f?F*d/100:d},D=A(R(this.options.minSize,8)),C=Math.max(A(R(this.options.maxSize,"20%")),D);return{minPxSize:D,maxPxSize:C}}getZExtremes(){let F=this.options,A=(this.zData||[]).filter(S);if(A.length){let D=R(F.zMin,E(m(A),F.displayNegative===!1?F.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),C=R(F.zMax,x(A));if(S(D)&&S(C))return{zMin:D,zMax:C}}}}return _.defaultOptions=w(b.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:P}=this.series.chart,{z:F}=this.point;return S(F)?P(F,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),L(_.prototype,{alignDataLabel:p.alignDataLabel,applyZones:g,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:i,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),v(_,"updatedData",P=>{delete P.target.chart.bubbleZExtremes}),v(_,"remove",P=>{delete P.target.chart.bubbleZExtremes}),l.registerSeriesType("bubble",_),_}),s(t,"Series/ColumnRange/ColumnRangePoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{seriesTypes:{column:{prototype:{pointClass:{prototype:r}}},arearange:{prototype:{pointClass:n}}}}=e,{extend:l,isNumber:a}=i;class h extends n{isValid(){return a(this.low)}}return l(h.prototype,{setState:r.setState}),h}),s(t,"Series/ColumnRange/ColumnRangeSeries.js",[t["Series/ColumnRange/ColumnRangePoint.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=i,{seriesTypes:{arearange:a,column:h,column:{prototype:c}}}=r,{addEvent:g,clamp:u,extend:p,isNumber:b,merge:v,pick:x}=n;class m extends a{setOptions(){return v(!0,arguments[0],{stacking:void 0}),a.prototype.setOptions.apply(this,arguments)}translate(){return c.translate.apply(this)}pointAttribs(){return c.pointAttribs.apply(this,arguments)}translate3dPoints(){return c.translate3dPoints.apply(this,arguments)}translate3dShapes(){return c.translate3dShapes.apply(this,arguments)}afterColumnTranslate(){let L,S,w,R,O=this.yAxis,I=this.xAxis,_=I.startAngleRad,P=this.chart,F=this.xAxis.isRadial,A=Math.max(P.chartWidth,P.chartHeight)+999;this.points.forEach(D=>{let C=D.shapeArgs||{},d=this.options.minPointLength,f=D.plotY,y=O.translate(D.high,0,1,0,1);if(b(y)&&b(f))if(D.plotHigh=u(y,-A,A),D.plotLow=u(f,-A,A),R=D.plotHigh,Math.abs(L=x(D.rectPlotY,D.plotY)-D.plotHigh)\u25CF {series.name}: {point.low} - {point.high}
'},whiskerWidth:null}}),s(t,"Series/ErrorBar/ErrorBarSeries.js",[t["Series/BoxPlot/BoxPlotSeries.js"],t["Series/Column/ColumnSeries.js"],t["Series/ErrorBar/ErrorBarSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{arearange:a}=n.seriesTypes,{addEvent:h,merge:c,extend:g}=l;class u extends e{getColumnMetrics(){return this.linkedParent&&this.linkedParent.columnMetrics||i.prototype.getColumnMetrics.call(this)}drawDataLabels(){let b=this.pointValKey;if(a)for(let v of(a.prototype.drawDataLabels.call(this),this.points))v.y=v[b]}toYData(b){return[b.low,b.high]}}return u.defaultOptions=c(e.defaultOptions,r),h(u,"afterTranslate",function(){for(let p of this.points)p.plotLow=p.plotY},{order:0}),g(u.prototype,{pointArrayMap:["low","high"],pointValKey:"high",doQuartiles:!1}),n.registerSeriesType("errorbar",u),u}),s(t,"Series/Gauge/GaugePoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{series:{prototype:{pointClass:i}}}=e;return class extends i{setState(r){this.state=r}}}),s(t,"Series/Gauge/GaugeSeries.js",[t["Series/Gauge/GaugePoint.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=i,{series:a,seriesTypes:{column:h}}=r,{clamp:c,isNumber:g,extend:u,merge:p,pick:b,pInt:v,defined:x}=n;class m extends a{translate(){let L=this.yAxis,S=this.options,w=L.center;this.generatePoints(),this.points.forEach(R=>{let O=p(S.dial,R.dial),I=v(O.radius)*w[2]/200,_=v(O.baseLength)*I/100,P=v(O.rearLength)*I/100,F=O.baseWidth,A=O.topWidth,D=S.overshoot,C=L.startAngleRad+L.translate(R.y,void 0,void 0,void 0,!0);(g(D)||S.wrap===!1)&&(D=g(D)?D/180*Math.PI:0,C=c(C,L.startAngleRad-D,L.endAngleRad+D)),C=180*C/Math.PI,R.shapeType="path";let d=O.path||[["M",-P,-F/2],["L",_,-F/2],["L",I,-A/2],["L",I,A/2],["L",_,F/2],["L",-P,F/2],["Z"]];R.shapeArgs={d,translateX:w[0],translateY:w[1],rotation:C},R.plotX=w[0],R.plotY=w[1],x(R.y)&&L.max-L.min&&(R.percentage=(R.y-L.min)/(L.max-L.min)*100)})}drawPoints(){let L=this,S=L.chart,w=L.yAxis.center,R=L.pivot,O=L.options,I=O.pivot,_=S.renderer;L.points.forEach(P=>{let F=P.graphic,A=P.shapeArgs,D=A.d,C=p(O.dial,P.dial);F?(F.animate(A),A.d=D):P.graphic=_[P.shapeType](A).addClass("highcharts-dial").add(L.group),S.styledMode||P.graphic[F?"animate":"attr"]({stroke:C.borderColor,"stroke-width":C.borderWidth,fill:C.backgroundColor})}),R?R.animate({translateX:w[0],translateY:w[1]}):I&&(L.pivot=_.circle(0,0,I.radius).attr({zIndex:2}).addClass("highcharts-pivot").translate(w[0],w[1]).add(L.group),S.styledMode||L.pivot.attr({fill:I.backgroundColor,stroke:I.borderColor,"stroke-width":I.borderWidth}))}animate(L){let S=this;L||S.points.forEach(w=>{let R=w.graphic;R&&(R.attr({rotation:180*S.yAxis.startAngleRad/Math.PI}),R.animate({rotation:w.shapeArgs.rotation},S.options.animation))})}render(){this.group=this.plotGroup("group","series",this.visible?"inherit":"hidden",this.options.zIndex,this.chart.seriesGroup),a.prototype.render.call(this),this.group.clip(this.chart.clipRect)}setData(L,S){a.prototype.setData.call(this,L,!1),this.processData(),this.generatePoints(),b(S,!0)&&this.chart.redraw()}hasData(){return!!this.points.length}}return m.defaultOptions=p(a.defaultOptions,{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:!1,defer:!1,enabled:!0,verticalAlign:"top",y:15,zIndex:2},dial:{backgroundColor:"#000000",baseLength:"70%",baseWidth:3,borderColor:"#cccccc",borderWidth:0,radius:"80%",rearLength:"10%",topWidth:1},pivot:{radius:5,borderWidth:0,borderColor:"#cccccc",backgroundColor:"#000000"},tooltip:{headerFormat:""},showInLegend:!1}),u(m.prototype,{angular:!0,directTouch:!0,drawGraph:l,drawTracker:h.prototype.drawTracker,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,pointClass:e,trackerGroups:["group","dataLabelsGroup"]}),r.registerSeriesType("gauge",m),m}),s(t,"Series/DragNodesComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{composed:r}=e,{addEvent:n,pushUnique:l}=i;function a(){let h,c,g,u=this;u.container&&(h=n(u.container,"mousedown",p=>{let b=u.hoverPoint;b&&b.series&&b.series.hasDraggableNodes&&b.series.options.draggable&&(b.series.onMouseDown(b,p),c=n(u.container,"mousemove",v=>b&&b.series&&b.series.onMouseMove(b,v)),g=n(u.container.ownerDocument,"mouseup",v=>(c(),g(),b&&b.series&&b.series.onMouseUp(b,v))))})),n(u,"destroy",function(){h()})}return{compose:function(h){l(r,"DragNodes")&&n(h,"load",a)},onMouseDown:function(h,c){let g=this.chart.pointer?.normalize(c)||c;h.fixedPosition={chartX:g.chartX,chartY:g.chartY,plotX:h.plotX,plotY:h.plotY},h.inDragMode=!0},onMouseMove:function(h,c){if(h.fixedPosition&&h.inDragMode){let g,u,p=this.chart,b=p.pointer?.normalize(c)||c,v=h.fixedPosition.chartX-b.chartX,x=h.fixedPosition.chartY-b.chartY,m=p.graphLayoutsLookup;(Math.abs(v)>5||Math.abs(x)>5)&&(g=h.fixedPosition.plotX-v,u=h.fixedPosition.plotY-x,p.isInsidePlot(g,u)&&(h.plotX=g,h.plotY=u,h.hasDragged=!0,this.redrawHalo(h),m.forEach(E=>{E.restartSimulation()})))}},onMouseUp:function(h){h.fixedPosition&&(h.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),h.inDragMode=h.hasDragged=!1,this.options.fixedDraggable||delete h.fixedPosition)},redrawHalo:function(h){h&&this.halo&&this.halo.attr({d:h.haloPath(this.options.states.hover.halo.size)})}}}),s(t,"Series/GraphLayoutComposition.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r){let{setAnimation:n}=e,{composed:l}=i,{addEvent:a,pushUnique:h}=r;function c(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(b=>{b.updateSimulation()}),this.redraw())}function g(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(b=>{b.updateSimulation(!1)}),this.redraw())}function u(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(b=>{b.stop()})}function p(){let b,v=!1,x=m=>{m.maxIterations--&&isFinite(m.temperature)&&!m.isStable()&&!m.enableSimulation&&(m.beforeStep&&m.beforeStep(),m.step(),b=!1,v=!0)};if(this.graphLayoutsLookup){for(n(!1,this),this.graphLayoutsLookup.forEach(m=>m.start());!b;)b=!0,this.graphLayoutsLookup.forEach(x);v&&this.series.forEach(m=>{m&&m.layout&&m.render()})}}return{compose:function(b){h(l,"GraphLayout")&&(a(b,"afterPrint",c),a(b,"beforePrint",g),a(b,"predraw",u),a(b,"render",p))},integrations:{},layouts:{}}}),s(t,"Series/PackedBubble/PackedBubblePoint.js",[t["Core/Chart/Chart.js"],t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"]],function(e,i,r){let{seriesTypes:{bubble:{prototype:{pointClass:n}}}}=r;return class extends n{destroy(){return this.series.layout&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes),i.prototype.destroy.apply(this,arguments)}firePointEvent(){let l=this.series.options;if(this.isParentNode&&l.parentNode){let a=l.allowPointSelect;l.allowPointSelect=l.parentNode.allowPointSelect,i.prototype.firePointEvent.apply(this,arguments),l.allowPointSelect=a}else i.prototype.firePointEvent.apply(this,arguments)}select(){let l=this.series.chart;this.isParentNode?(l.getSelectedPoints=l.getSelectedParentNodes,i.prototype.select.apply(this,arguments),l.getSelectedPoints=e.prototype.getSelectedPoints):i.prototype.select.apply(this,arguments)}}}),s(t,"Series/PackedBubble/PackedBubbleSeriesDefaults.js",[t["Core/Utilities.js"]],function(e){let{isNumber:i}=e;return{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",crisp:!1,tooltip:{pointFormat:"Value: {point.value}"},draggable:!0,useSimulation:!0,parentNode:{allowPointSelect:!1},dataLabels:{formatter:function(){let{numberFormatter:r}=this.series.chart,{value:n}=this.point;return i(n)?r(n,-1):""},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:!0},padding:0,style:{transition:"opacity 2000ms"}},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,bubblePadding:5,parentNodeLimit:!1,seriesInteraction:!0,dragBetweenSeries:!1,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50,initialPositionRadius:100,seriesInteraction:!0,marker:{fillColor:null,fillOpacity:1,lineWidth:null,lineColor:null,symbol:"circle"}},enableSimulation:!0,type:"packedbubble",integration:"packedbubble",maxIterations:1e3,splitSeries:!1,maxSpeed:5,gravitationalConstant:.01,friction:-.981}}}),s(t,"Series/Networkgraph/VerletIntegration.js",[],function(){return{attractive:function(e,i,r){let n=e.getMass(),l=-r.x*i*this.diffTemperature,a=-r.y*i*this.diffTemperature;e.fromNode.fixedPosition||(e.fromNode.plotX-=l*n.fromNode/e.fromNode.degree,e.fromNode.plotY-=a*n.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.plotX+=l*n.toNode/e.toNode.degree,e.toNode.plotY+=a*n.toNode/e.toNode.degree)},attractiveForceFunction:function(e,i){return(i-e)/e},barycenter:function(){let e=this.options.gravitationalConstant||0,i=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*e,r=(this.barycenter.yFactor-(this.box.top+this.box.height)/2)*e;this.nodes.forEach(function(n){n.fixedPosition||(n.plotX-=i/n.mass/n.degree,n.plotY-=r/n.mass/n.degree)})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.5)},integrate:function(e,i){let r=-e.options.friction,n=e.options.maxSpeed,l=i.prevX,a=i.prevY,h=(i.plotX+i.dispX-l)*r,c=(i.plotY+i.dispY-a)*r,g=Math.abs,u=g(h)/(h||1),p=g(c)/(c||1),b=u*Math.min(n,Math.abs(h)),v=p*Math.min(n,Math.abs(c));i.prevX=i.plotX+i.dispX,i.prevY=i.plotY+i.dispY,i.plotX+=b,i.plotY+=v,i.temperature=e.vectorLength({x:b,y:v})},repulsive:function(e,i,r){let n=i*this.diffTemperature/e.mass/e.degree;e.fixedPosition||(e.plotX+=r.x*n,e.plotY+=r.y*n)},repulsiveForceFunction:function(e,i){return(i-e)/e*(i>e?1:0)}}}),s(t,"Series/PackedBubble/PackedBubbleIntegration.js",[t["Core/Globals.js"],t["Series/Networkgraph/VerletIntegration.js"]],function(e,i){let{noop:r}=e;return{barycenter:function(){let n,l,a=this.options.gravitationalConstant,h=this.box,c=this.nodes;for(let g of c)this.options.splitSeries&&!g.isParentNode?(n=g.series.parentNode.plotX,l=g.series.parentNode.plotY):(n=h.width/2,l=h.height/2),g.fixedPosition||(g.plotX-=(g.plotX-n)*a/(g.mass*Math.sqrt(c.length)),g.plotY-=(g.plotY-l)*a/(g.mass*Math.sqrt(c.length)))},getK:r,integrate:i.integrate,repulsive:function(n,l,a,h){let c=l*this.diffTemperature/n.mass/n.degree,g=a.x*c,u=a.y*c;n.fixedPosition||(n.plotX+=g,n.plotY+=u),h.fixedPosition||(h.plotX-=g,h.plotY-=u)},repulsiveForceFunction:function(n,l,a,h){return Math.min(n,(a.marker.radius+h.marker.radius)/2)}}}),s(t,"Series/Networkgraph/EulerIntegration.js",[],function(){return{attractive:function(e,i,r,n){let l=e.getMass(),a=r.x/n*i,h=r.y/n*i;e.fromNode.fixedPosition||(e.fromNode.dispX-=a*l.fromNode/e.fromNode.degree,e.fromNode.dispY-=h*l.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.dispX+=a*l.toNode/e.toNode.degree,e.toNode.dispY+=h*l.toNode/e.toNode.degree)},attractiveForceFunction:function(e,i){return e*e/i},barycenter:function(){let e=this.options.gravitationalConstant,i=this.barycenter.xFactor,r=this.barycenter.yFactor;this.nodes.forEach(function(n){if(!n.fixedPosition){let l=n.getDegree(),a=l*(1+l/2);n.dispX+=(i-n.plotX)*e*a/n.degree,n.dispY+=(r-n.plotY)*e*a/n.degree}})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.3)},integrate:function(e,i){i.dispX+=i.dispX*e.options.friction,i.dispY+=i.dispY*e.options.friction;let r=i.temperature=e.vectorLength({x:i.dispX,y:i.dispY});r!==0&&(i.plotX+=i.dispX/r*Math.min(Math.abs(i.dispX),e.temperature),i.plotY+=i.dispY/r*Math.min(Math.abs(i.dispY),e.temperature))},repulsive:function(e,i,r,n){e.dispX+=r.x/n*i/e.degree,e.dispY+=r.y/n*i/e.degree},repulsiveForceFunction:function(e,i){return i*i/e}}}),s(t,"Series/Networkgraph/QuadTreeNode.js",[],function(){class e{constructor(r){this.body=!1,this.isEmpty=!1,this.isInternal=!1,this.nodes=[],this.box=r,this.boxSize=Math.min(r.width,r.height)}divideBox(){let r=this.box.width/2,n=this.box.height/2;this.nodes[0]=new e({left:this.box.left,top:this.box.top,width:r,height:n}),this.nodes[1]=new e({left:this.box.left+r,top:this.box.top,width:r,height:n}),this.nodes[2]=new e({left:this.box.left+r,top:this.box.top+n,width:r,height:n}),this.nodes[3]=new e({left:this.box.left,top:this.box.top+n,width:r,height:n})}getBoxPosition(r){let n=r.plotXthis.step())):(this.simulation=!1,this.series.forEach(E=>{p(E,"afterSimulation")}))}}stop(){this.simulation&&h.cancelAnimationFrame(this.simulation)}setArea(m,E,L,S){this.box={left:m,top:E,width:L,height:S}}setK(){this.k=this.options.linkLength||this.integration.getK(this)}addElementsToCollection(m,E){for(let L of m)E.indexOf(L)===-1&&E.push(L)}removeElementFromCollection(m,E){let L=E.indexOf(m);L!==-1&&E.splice(L,1)}clear(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()}resetSimulation(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()}restartSimulation(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))}setMaxIterations(m){this.maxIterations=b(m,this.options.maxIterations)}setTemperature(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)}setDiffTemperature(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)}setInitialRendering(m){this.initialRendering=m}createQuadTree(){this.quadTree=new n(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)}initPositions(){let m=this.options.initialPositions;if(u(m))for(let E of(m.call(this),this.nodes))g(E.prevX)||(E.prevX=E.plotX),g(E.prevY)||(E.prevY=E.plotY),E.dispX=0,E.dispY=0;else m==="circle"?this.setCircularPositions():this.setRandomPositions()}setCircularPositions(){let m,E=this.box,L=this.nodes,S=2*Math.PI/(L.length+1),w=L.filter(function(P){return P.linksTo.length===0}),R={},O=this.options.initialPositionRadius,I=P=>{for(let F of P.linksFrom||[])R[F.toNode.id]||(R[F.toNode.id]=!0,_.push(F.toNode),I(F.toNode))},_=[];for(let P of w)_.push(P),I(P);if(_.length)for(let P of L)_.indexOf(P)===-1&&_.push(P);else _=L;for(let P=0,F=_.length;P{let O=R*R/Math.PI;return O-Math.floor(O)};for(let R=0,O=L.length;Rthis.barnesHutApproximation(m,E));else{let m,E,L;for(let S of this.nodes)for(let w of this.nodes)S===w||S.fixedPosition||(L=this.getDistXY(S,w),(E=this.vectorLength(L))!==0&&(m=this.repulsiveForce(E,this.k),this.force("repulsive",S,m*w.mass,L,E)))}}attractiveForces(){let m,E,L;for(let S of this.links)S.fromNode&&S.toNode&&(m=this.getDistXY(S.fromNode,S.toNode),(E=this.vectorLength(m))!==0&&(L=this.attractiveForce(E,this.k),this.force("attractive",S,L,m,E)))}applyLimits(){for(let m of this.nodes)m.fixedPosition||(this.integration.integrate(this,m),this.applyLimitBox(m,this.box),m.dispX=0,m.dispY=0)}applyLimitBox(m,E){let L=m.radius;m.plotX=c(m.plotX,E.left+L,E.width-L),m.plotY=c(m.plotY,E.top+L,E.height-L)}coolDown(m,E,L){return m-E*L}isStable(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0}getSystemTemperature(){let m=0;for(let E of this.nodes)m+=E.temperature;return m}vectorLength(m){return Math.sqrt(m.x*m.x+m.y*m.y)}getDistR(m,E){let L=this.getDistXY(m,E);return this.vectorLength(L)}getDistXY(m,E){let L=m.plotX-E.plotX,S=m.plotY-E.plotY;return{x:L,y:S,absX:Math.abs(L),absY:Math.abs(S)}}}return v}),s(t,"Series/PackedBubble/PackedBubbleLayout.js",[t["Series/GraphLayoutComposition.js"],t["Series/PackedBubble/PackedBubbleIntegration.js"],t["Series/Networkgraph/ReingoldFruchtermanLayout.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{addEvent:l,pick:a}=n;function h(){let u=this.series,p=[];return u.forEach(b=>{b.parentNode&&b.parentNode.selected&&p.push(b.parentNode)}),p}function c(){this.allDataPoints&&delete this.allDataPoints}class g extends r{constructor(){super(...arguments),this.index=NaN,this.nodes=[],this.series=[]}static compose(p){r.compose(p),e.integrations.packedbubble=i,e.layouts.packedbubble=g;let b=p.prototype;b.getSelectedParentNodes||(l(p,"beforeRedraw",c),b.getSelectedParentNodes=h)}beforeStep(){this.options.marker&&this.series.forEach(p=>{p&&p.calculateParentRadius()})}isStable(){let p=Math.abs(this.prevSystemTemperature-this.systemTemperature);return 1>Math.abs(10*this.systemTemperature/Math.sqrt(this.nodes.length))&&p<1e-5||this.temperature<=0}setCircularPositions(){let p=this.box,b=this.nodes,v=2*Math.PI/(b.length+1),x=this.options.initialPositionRadius,m,E,L=0;for(let S of b)this.options.splitSeries&&!S.isParentNode?(m=S.series.parentNode.plotX,E=S.series.parentNode.plotY):(m=p.width/2,E=p.height/2),S.plotX=S.prevX=a(S.plotX,m+x*Math.cos(S.index||L*v)),S.plotY=S.prevY=a(S.plotY,E+x*Math.sin(S.index||L*v)),S.dispX=0,S.dispY=0,L++}repulsiveForces(){let p,b,v,x=this,m=x.options.bubblePadding,E=x.nodes;E.forEach(L=>{L.degree=L.mass,L.neighbours=0,E.forEach(S=>{p=0,L!==S&&!L.fixedPosition&&(x.options.seriesInteraction||L.series===S.series)&&(v=x.getDistXY(L,S),(b=x.vectorLength(v)-(L.marker.radius+S.marker.radius+m))<0&&(L.degree+=.01,L.neighbours++,p=x.repulsiveForce(-b/Math.sqrt(L.neighbours),x.k,L,S)),x.force("repulsive",L,p*S.mass,v,S,b))})})}applyLimitBox(p,b){let v,x;this.options.splitSeries&&!p.isParentNode&&this.options.parentNodeLimit&&(v=this.getDistXY(p,p.series.parentNode),(x=p.series.parentNodeRadius-p.marker.radius-this.vectorLength(v))<0&&x>-2*p.marker.radius&&(p.plotX-=.01*v.x,p.plotY-=.01*v.y)),super.applyLimitBox(p,b)}}return e.layouts.packedbubble=g,g}),s(t,"Series/SimulationSeriesUtilities.js",[t["Core/Utilities.js"],t["Core/Animation/AnimationUtilities.js"]],function(e,i){let{merge:r,syncTimeout:n}=e,{animObject:l}=i;return{initDataLabels:function(){let a=this.options.dataLabels;if(!this.dataLabelsGroup){let h=this.initDataLabelsGroup();return!this.chart.styledMode&&a?.style&&h.css(a.style),h.attr({opacity:0}),this.visible&&h.show(),h}return this.dataLabelsGroup.attr(r({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){let a=this.options.dataLabels;a?.defer&&this.options.layoutAlgorithm?.enableSimulation?n(()=>{this.deferDataLabels=!1},a?l(a.animation).defer:0):this.deferDataLabels=!1}}}),s(t,"Series/PackedBubble/PackedBubbleSeries.js",[t["Core/Color/Color.js"],t["Series/DragNodesComposition.js"],t["Series/GraphLayoutComposition.js"],t["Core/Globals.js"],t["Series/PackedBubble/PackedBubblePoint.js"],t["Series/PackedBubble/PackedBubbleSeriesDefaults.js"],t["Series/PackedBubble/PackedBubbleLayout.js"],t["Core/Series/SeriesRegistry.js"],t["Series/SimulationSeriesUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){let{parse:p}=e,{noop:b}=n,{series:{prototype:v},seriesTypes:{bubble:x}}=c,{initDataLabels:m,initDataLabelsDefer:E}=g,{addEvent:L,clamp:S,defined:w,extend:R,fireEvent:O,isArray:I,isNumber:_,merge:P,pick:F}=u;class A extends x{constructor(){super(...arguments),this.parentNodeMass=0,this.deferDataLabels=!0}static compose(C,d,f,y){x.compose(C,d,f,y),i.compose(d),h.compose(d)}accumulateAllPoints(){let C,d=this.chart,f=[];for(let y of d.series)if(y.is("packedbubble")&&y.reserveSpace()){C=y.yData||[];for(let M=0;M{T.mass=2,T.degree=1,T.collisionNmb=1}),k.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),k.addElementsToCollection([this],k.series),k.addElementsToCollection(this.points,k.nodes)}addSeriesLayout(){let C=this.options.layoutAlgorithm=this.options.layoutAlgorithm||{},d=C.type||"packedbubble",f=this.chart.graphLayoutsStorage,y=this.chart.graphLayoutsLookup,M=P(C,C.parentNodeOptions,{enableSimulation:this.layout.options.enableSimulation}),k=f[d+"-series"];k||(f[d+"-series"]=k=new r.layouts[d],k.init(M),y.splice(k.index,0,k)),this.parentNodeLayout=k,this.createParentNodes()}calculateParentRadius(){let C=this.seriesBox();this.parentNodeRadius=S(Math.sqrt(2*this.parentNodeMass/Math.PI)+20,20,C?Math.max(Math.sqrt(Math.pow(C.width,2)+Math.pow(C.height,2))/2+20,20):Math.sqrt(2*this.parentNodeMass/Math.PI)+20),this.parentNode&&(this.parentNode.marker.radius=this.parentNode.radius=this.parentNodeRadius)}calculateZExtremes(){let C=this.chart.series,d=this.options.zMin,f=this.options.zMax,y=1/0,M=-1/0;return d&&f?[d,f]:(C.forEach(k=>{k.yData.forEach(T=>{w(T)&&(T>M&&(M=T),T{this.parentNodeMass+=Math.PI*Math.pow(z.marker.radius,2)}),this.calculateParentRadius(),f.nodes.forEach(z=>{z.seriesIndex===this.index&&(M=!0)}),f.setArea(0,0,d.plotWidth,d.plotHeight),M||(k||(k=new C(this,{mass:this.parentNodeRadius/2,marker:T,dataLabels:{inside:!1},states:{normal:{marker:T},hover:{marker:T}},dataLabelOnNull:!0,degree:this.parentNodeRadius,isParentNode:!0,seriesIndex:this.index})),this.parentNode&&(k.plotX=this.parentNode.plotX,k.plotY=this.parentNode.plotY),this.parentNode=k,f.addElementsToCollection([this],f.series),f.addElementsToCollection([k],f.nodes))}deferLayout(){let C=this.options.layoutAlgorithm;this.visible&&(this.addLayout(),C.splitSeries&&this.addSeriesLayout())}destroy(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach(C=>{C.removeElementFromCollection(this,C.series)},this),this.parentNode&&this.parentNodeLayout&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy())),v.destroy.apply(this,arguments)}drawDataLabels(){!this.deferDataLabels&&(v.drawDataLabels.call(this,this.points),this.parentNode&&(this.parentNode.formatPrefix="parentNode",v.drawDataLabels.call(this,[this.parentNode])))}drawGraph(){if(!this.layout||!this.layout.options.splitSeries)return;let C=this.chart,d=this.layout.options.parentNodeOptions.marker,f={fill:d.fillColor||p(this.color).brighten(.4).get(),opacity:d.fillOpacity,stroke:d.lineColor||this.color,"stroke-width":F(d.lineWidth,this.options.lineWidth)},y={};this.parentNodesGroup=this.plotGroup("parentNodesGroup","parentNode",this.visible?"inherit":"hidden",.1,C.seriesGroup),this.group?.attr({zIndex:2}),this.calculateParentRadius(),this.parentNode&&w(this.parentNode.plotX)&&w(this.parentNode.plotY)&&w(this.parentNodeRadius)&&(y=P({x:this.parentNode.plotX-this.parentNodeRadius,y:this.parentNode.plotY-this.parentNodeRadius,width:2*this.parentNodeRadius,height:2*this.parentNodeRadius},f),this.parentNode.graphic||(this.graph=this.parentNode.graphic=C.renderer.symbol(f.symbol).add(this.parentNodesGroup)),this.parentNode.graphic.attr(y))}drawTracker(){let C,d=this.parentNode;super.drawTracker(),d&&(C=I(d.dataLabels)?d.dataLabels:d.dataLabel?[d.dataLabel]:[],d.graphic&&(d.graphic.element.point=d),C.forEach(f=>{(f.div||f.element).point=d}))}getPointRadius(){let C,d,f,y,M=this.chart,k=M.plotWidth,T=M.plotHeight,z=this.options,N=z.useSimulation,G=Math.min(k,T),X={},j=[],B=M.allDataPoints||[],W=B.length;["minSize","maxSize"].forEach(U=>{let q=parseInt(z[U],10),H=/%$/.test(z[U]);X[U]=H?G*q/100:q*Math.sqrt(W)}),M.minRadius=C=X.minSize/Math.sqrt(W),M.maxRadius=d=X.maxSize/Math.sqrt(W);let Y=N?this.calculateZExtremes():[C,d];B.forEach((U,q)=>{f=N?S(U[2],Y[0],Y[1]):U[2],(y=this.getRadius(Y[0],Y[1],C,d,f))===0&&(y=null),B[q][2]=y,j.push(y)}),this.radii=j}init(){return v.init.apply(this,arguments),E.call(this),this.eventsToUnbind.push(L(this,"updatedData",function(){this.chart.series.forEach(C=>{C.type===this.type&&(C.isDirty=!0)},this)})),this}onMouseUp(C){if(C.fixedPosition&&!C.removed){let d,f=this.layout,y=this.parentNodeLayout;y&&f.options.dragBetweenSeries&&y.nodes.forEach(M=>{C&&C.marker&&M!==C.series.parentNode&&(d=f.getDistXY(C,M),f.vectorLength(d)-M.marker.radius-C.marker.radius<0&&(M.series.addPoint(P(C.options,{plotX:C.plotX,plotY:C.plotY}),!1),f.removeElementFromCollection(C,f.nodes),C.remove()))}),i.onMouseUp.apply(this,arguments)}}placeBubbles(C){let d=this.checkOverlap,f=this.positionBubble,y=[],M=1,k=0,T=0,z,N=[],G,X=C.sort((j,B)=>B[2]-j[2]);if(X.length){if(y.push([[0,0,X[0][2],X[0][3],X[0][4]]]),X.length>1)for(y.push([[0,0-X[1][2]-X[0][2],X[1][2],X[1][3],X[1][4]]]),G=2;G1&&y[M-1][T+1]&&d(z,y[M-1][T+1])?(T++,y[M].push(f(y[M][k],y[M-1][T],X[G])),k++):(k++,y[M].push(z));this.chart.stages=y,this.chart.rawPositions=[].concat.apply([],y),this.resizeRadius(),N=this.chart.rawPositions}return N}pointAttribs(C,d){let f=this.options,y=C&&C.isParentNode,M=f.marker;y&&f.layoutAlgorithm&&f.layoutAlgorithm.parentNodeOptions&&(M=f.layoutAlgorithm.parentNodeOptions.marker);let k=M.fillOpacity,T=v.pointAttribs.call(this,C,d);return k!==1&&(T["fill-opacity"]=k),T}positionBubble(C,d,f){let y=Math.pow,M=(0,Math.sqrt)(y(C[0]-d[0],2)+y(C[1]-d[1],2)),k=(0,Math.acos)((y(M,2)+y(f[2]+d[2],2)-y(f[2]+C[2],2))/(2*(f[2]+d[2])*M)),T=(0,Math.asin)((0,Math.abs)(C[0]-d[0])/M),z=(C[1]-d[1]<0?0:Math.PI)+k+T*((C[0]-d[0])*(C[1]-d[1])<0?1:-1);return[d[0]+(d[2]+f[2])*Math.sin(z),d[1]-(d[2]+f[2])*Math.cos(z),f[2],f[3],f[4]]}render(){let C=[];v.render.apply(this,arguments),!this.options.dataLabels.allowOverlap&&(this.data.forEach(d=>{I(d.dataLabels)&&d.dataLabels.forEach(f=>{C.push(f)})}),this.options.useSimulation&&this.chart.hideOverlappingLabels(C))}resizeRadius(){let C,d,f,y,M,k=this.chart,T=k.rawPositions,z=Math.min,N=Math.max,G=k.plotLeft,X=k.plotTop,j=k.plotHeight,B=k.plotWidth;for(let q of(C=f=Number.POSITIVE_INFINITY,d=y=Number.NEGATIVE_INFINITY,T))M=q[2],C=z(C,q[0]-M),d=N(d,q[0]+M),f=z(f,q[1]-M),y=N(y,q[1]+M);let W=[d-C,y-f],Y=[(B-G)/W[0],(j-X)/W[1]],U=z.apply([],Y);if(Math.abs(U-1)>1e-10){for(let q of T)q[2]*=U;this.placeBubbles(T)}else k.diffY=j/2+X-f-(y-f)/2,k.diffX=B/2+G-C-(d-C)/2}seriesBox(){let C,d=this.chart,f=this.data,y=Math.max,M=Math.min,k=[d.plotLeft,d.plotLeft+d.plotWidth,d.plotTop,d.plotTop+d.plotHeight];return f.forEach(T=>{w(T.plotX)&&w(T.plotY)&&T.marker.radius&&(C=T.marker.radius,k[0]=M(k[0],T.plotX-C),k[1]=y(k[1],T.plotX+C),k[2]=M(k[2],T.plotY-C),k[3]=y(k[3],T.plotY+C))}),_(k.width/k.height)?k:null}setVisible(){let C=this;v.setVisible.apply(C,arguments),C.parentNodeLayout&&C.graph?C.visible?(C.graph.show(),C.parentNode.dataLabel&&C.parentNode.dataLabel.show()):(C.graph.hide(),C.parentNodeLayout.removeElementFromCollection(C.parentNode,C.parentNodeLayout.nodes),C.parentNode.dataLabel&&C.parentNode.dataLabel.hide()):C.layout&&(C.visible?C.layout.addElementsToCollection(C.points,C.layout.nodes):C.points.forEach(d=>{C.layout.removeElementFromCollection(d,C.layout.nodes)}))}translate(){let C,d,f,y=this.chart,M=this.data,k=this.index,T=this.options.useSimulation;for(let z of(this.processedXData=this.xData,this.generatePoints(),w(y.allDataPoints)||(y.allDataPoints=this.accumulateAllPoints(),this.getPointRadius()),T?f=y.allDataPoints:(f=this.placeBubbles(y.allDataPoints),this.options.draggable=!1),f))z[3]===k&&(C=M[z[4]],d=F(z[2],void 0),T||(C.plotX=z[0]-y.plotLeft+y.diffX,C.plotY=z[1]-y.plotTop+y.diffY),_(d)&&(C.marker=R(C.marker,{radius:d,width:2*d,height:2*d}),C.radius=d));T&&this.deferLayout(),O(this,"afterTranslate")}}return A.defaultOptions=P(x.defaultOptions,a),R(A.prototype,{pointClass:l,axisTypes:[],directTouch:!0,forces:["barycenter","repulsive"],hasDraggableNodes:!0,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointArrayMap:["value"],pointValKey:"value",requireSorting:!1,trackerGroups:["group","dataLabelsGroup","parentNodesGroup"],initDataLabels:m,alignDataLabel:v.alignDataLabel,indexateNodes:b,onMouseDown:i.onMouseDown,onMouseMove:i.onMouseMove,redrawHalo:i.redrawHalo,searchPoint:b}),c.registerSeriesType("packedbubble",A),A}),s(t,"Series/Polygon/PolygonSeriesDefaults.js",[],function(){return{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0,legendSymbol:"rectangle"}}),s(t,"Series/Polygon/PolygonSeries.js",[t["Core/Globals.js"],t["Series/Polygon/PolygonSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=e,{area:a,line:h,scatter:c}=r.seriesTypes,{extend:g,merge:u}=n;class p extends c{getGraphPath(){let v=h.prototype.getGraphPath.call(this),x=v.length+1;for(;x--;)(x===v.length||v[x][0]==="M")&&x>0&&v.splice(x,0,["Z"]);return this.areaPath=v,v}drawGraph(){this.options.fillColor=this.color,a.prototype.drawGraph.call(this)}}return p.defaultOptions=u(c.defaultOptions,i),g(p.prototype,{type:"polygon",drawTracker:h.prototype.drawTracker,setStackedPoints:l}),r.registerSeriesType("polygon",p),p}),s(t,"Core/Axis/RadialAxisDefaults.js",[],function(){return{circular:{gridLineWidth:1,labels:{align:void 0,x:0,y:void 0,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},radial:{gridLineInterpolation:"circle",gridLineWidth:1,labels:{align:"right",padding:5,x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},radialGauge:{endOnTick:!1,gridLineWidth:0,labels:{align:"center",distance:-25,x:0,y:void 0},lineWidth:1,minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickPosition:"inside",tickWidth:2,title:{rotation:0,text:""},zIndex:2}}}),s(t,"Core/Axis/RadialAxis.js",[t["Core/Axis/RadialAxisDefaults.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{defaultOptions:a}=i,{composed:h,noop:c}=r,{addEvent:g,correctFloat:u,defined:p,extend:b,fireEvent:v,isObject:x,merge:m,pick:E,pushUnique:L,relativeLength:S,wrap:w}=n;return function(R){function O(){this.autoConnect=this.isCircular&&E(this.userMax,this.options.max)===void 0&&u(this.endAngleRad-this.startAngleRad)===u(2*Math.PI),!this.isCircular&&this.chart.inverted&&this.max++,this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)}function I(){return()=>{if(this.isRadial&&this.tickPositions&&this.options.labels&&this.options.labels.allowOverlap!==!0)return this.tickPositions.map(V=>this.ticks[V]&&this.ticks[V].label).filter(V=>!!V)}}function _(){return c}function P(V,Z,K){let J=this.pane.center,tt=V.value,$,Q,et;return this.isCircular?(p(tt)?V.point&&(V.point.shapeArgs||{}).start&&(tt=this.chart.inverted?this.translate(V.point.rectPlotY,!0):V.point.x):(Q=V.chartX||0,et=V.chartY||0,tt=this.translate(Math.atan2(et-K,Q-Z)-this.startAngleRad,!0)),Q=($=this.getPosition(tt)).x,et=$.y):(p(tt)||(Q=V.chartX,et=V.chartY),p(Q)&&p(et)&&(K=J[1]+this.chart.plotTop,tt=this.translate(Math.min(Math.sqrt(Math.pow(Q-Z,2)+Math.pow(et-K,2)),J[2]/2)-J[3]/2,!0))),[tt,Q||0,et||0]}function F(V,Z,K){let J=this.pane.center,tt=this.chart,$=this.left||0,Q=this.top||0,et,it=E(Z,J[2]/2-this.offset),st;return K===void 0&&(K=this.horiz?0:this.center&&-this.center[3]/2),K&&(it+=K),this.isCircular||Z!==void 0?((st=this.chart.renderer.symbols.arc($+J[0],Q+J[1],it,it,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})).xBounds=[$+J[0]],st.yBounds=[Q+J[1]-it]):(et=this.postTranslate(this.angleRad,it),st=[["M",this.center[0]+tt.plotLeft,this.center[1]+tt.plotTop],["L",et.x,et.y]]),st}function A(){this.constructor.prototype.getOffset.call(this),this.chart.axisOffset[this.side]=0}function D(V,Z,K){let J=this.chart,tt=Tt=>{if(typeof Tt=="string"){let zt=parseInt(Tt,10);return nt.test(Tt)&&(zt=zt*et/100),zt}return Tt},$=this.center,Q=this.startAngleRad,et=$[2]/2,it=Math.min(this.offset,0),st=this.left||0,rt=this.top||0,nt=/%$/,ot=this.isCircular,at,ct,ht,lt,xt,wt,dt=E(tt(K.outerRadius),et),Ct=tt(K.innerRadius),ft=E(tt(K.thickness),10);if(this.options.gridLineInterpolation==="polygon")wt=this.getPlotLinePath({value:V}).concat(this.getPlotLinePath({value:Z,reverse:!0}));else{V=Math.max(V,this.min),Z=Math.min(Z,this.max);let Tt=this.translate(V),zt=this.translate(Z);ot||(dt=Tt||0,Ct=zt||0),K.shape!=="circle"&&ot?(at=Q+(Tt||0),ct=Q+(zt||0)):(at=-Math.PI/2,ct=1.5*Math.PI,xt=!0),dt-=it,ft-=it,wt=J.renderer.symbols.arc(st+$[0],rt+$[1],dt,dt,{start:Math.min(at,ct),end:Math.max(at,ct),innerR:E(Ct,dt-ft),open:xt,borderRadius:K.borderRadius}),ot&&(ht=(ct+at)/2,lt=st+$[0]+$[2]/2*Math.cos(ht),wt.xBounds=ht>-Math.PI/2&&ht-Math.PI&&ht<0||ht>Math.PI?-10:10)}return wt}function C(V){let Z=this.pane.center,K=this.chart,J=K.inverted,tt=V.reverse,$=this.pane.options.background?this.pane.options.background[0]||this.pane.options.background:{},Q=$.innerRadius||"0%",et=$.outerRadius||"100%",it=Z[0]+K.plotLeft,st=Z[1]+K.plotTop,rt=this.height,nt=V.isCrosshair,ot=Z[3]/2,at=V.value,ct,ht,lt,xt,wt,dt,Ct,ft,Tt,zt=this.getPosition(at),pe=zt.x,ee=zt.y;if(nt&&(at=(ft=this.getCrosshairPosition(V,it,st))[0],pe=ft[1],ee=ft[2]),this.isCircular)ht=Math.sqrt(Math.pow(pe-it,2)+Math.pow(ee-st,2)),lt=typeof Q=="string"?S(Q,1):Q/ht,xt=typeof et=="string"?S(et,1):et/ht,Z&&ot&&(lt<(ct=ot/ht)&&(lt=ct),xtrt)&&(at=0),this.options.gridLineInterpolation==="circle")Tt=this.getLinePath(0,at,ot);else if(Tt=[],K[J?"yAxis":"xAxis"].forEach(we=>{we.pane===this.pane&&(wt=we)}),wt){Ct=wt.tickPositions,wt.autoConnect&&(Ct=Ct.concat([Ct[0]])),tt&&(Ct=Ct.slice().reverse()),at&&(at+=ot);for(let we=0;weMath.PI&&(it-=$),st>Math.PI&&(st-=$),this.normalizedStartAngleRad=it,this.normalizedEndAngleRad=st}}function k(V){this.isRadial&&(V.align=void 0,V.preventDefault())}function T(){if(this.chart&&this.chart.labelCollectors){let V=this.labelCollector?this.chart.labelCollectors.indexOf(this.labelCollector):-1;V>=0&&this.chart.labelCollectors.splice(V,1)}}function z(V){let Z,K=this.chart,J=K.angular,tt=K.polar,$=this.isXAxis,Q=this.coll,et=V.userOptions.pane||0,it=this.pane=K.pane&&K.pane[et];if(Q==="colorAxis"){this.isRadial=!1;return}J?(J&&$?(this.isHidden=!0,this.createLabelCollector=_,this.getOffset=c,this.redraw=W,this.render=W,this.setScale=c,this.setCategories=c,this.setTitle=c):y(this),Z=!$):tt&&(y(this),Z=this.horiz),J||tt?(this.isRadial=!0,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&K.labelCollectors.push(this.labelCollector)):this.isRadial=!1,it&&Z&&(it.axis=this),this.isCircular=Z}function N(){this.isRadial&&this.beforeSetTickPositions()}function G(V){let Z=this.label;if(!Z)return;let K=this.axis,J=Z.getBBox(),tt=K.options.labels,$=(K.translate(this.pos)+K.startAngleRad+Math.PI/2)/Math.PI*180%360,Q=Math.round($),et=p(tt.y)?0:-(.3*J.height),it=tt.y,st,rt=20,nt=tt.align,ot="end",at=Q<0?Q+360:Q,ct=at,ht=0,lt=0;K.isRadial&&(st=K.getPosition(this.pos,K.center[2]/2+S(E(tt.distance,-25),K.center[2]/2,-K.center[2]/2)),tt.rotation==="auto"?Z.attr({rotation:$}):p(it)||(it=K.chart.renderer.fontMetrics(Z).b-J.height/2),p(nt)||(K.isCircular?(J.width>K.len*K.tickInterval/(K.max-K.min)&&(rt=0),nt=$>rt&&$<180-rt?"left":$>180+rt&&$<360-rt?"right":"center"):nt="center",Z.attr({align:nt})),nt==="auto"&&K.tickPositions.length===2&&K.isCircular&&(at>90&&at<180?at=180-at:at>270&&at<=360&&(at=540-at),ct>180&&ct<=360&&(ct=360-ct),(K.pane.options.startAngle===Q||K.pane.options.startAngle===Q+360||K.pane.options.startAngle===Q-360)&&(ot="start"),nt=Q>=-90&&Q<=90||Q>=-360&&Q<=-270||Q>=270&&Q<=360?ot==="start"?"right":"left":ot==="start"?"left":"right",ct>70&&ct<110&&(nt="center"),at<15||at>=180&&at<195?ht=.3*J.height:at>=15&&at<=35?ht=ot==="start"?0:.75*J.height:at>=195&&at<=215?ht=ot==="start"?.75*J.height:0:at>35&&at<=90?ht=ot==="start"?-(.25*J.height):J.height:at>215&&at<=270&&(ht=ot==="start"?J.height:-(.25*J.height)),ct<15?lt=ot==="start"?-(.15*J.height):.15*J.height:ct>165&&ct<=180&&(lt=ot==="start"?.15*J.height:-(.15*J.height)),Z.attr({align:nt}),Z.translate(lt,ht+et)),V.pos.x=st.x+(tt.x||0),V.pos.y=st.y+(it||0))}function X(V){this.axis.getPosition&&b(V.pos,this.axis.getPosition(this.pos))}function j({options:V}){V.xAxis&&m(!0,R.radialDefaultOptions.circular,V.xAxis),V.yAxis&&m(!0,R.radialDefaultOptions.radialGauge,V.yAxis)}function B(V,Z){let K=this.chart,J=this.center;return V=this.startAngleRad+V,{x:K.plotLeft+J[0]+Math.cos(V)*Z,y:K.plotTop+J[1]+Math.sin(V)*Z}}function W(){this.isDirty=!1}function Y(){let V,Z;this.constructor.prototype.setAxisSize.call(this),this.isRadial&&(this.pane.updateCenter(this),V=this.center=this.pane.center.slice(),this.isCircular?this.sector=this.endAngleRad-this.startAngleRad:(Z=this.postTranslate(this.angleRad,V[3]/2),V[0]=Z.x-this.chart.plotLeft,V[1]=Z.y-this.chart.plotTop),this.len=this.width=this.height=(V[2]-V[3])*E(this.sector,1)/2)}function U(){this.constructor.prototype.setAxisTranslation.call(this),this.center&&(this.isCircular?this.transA=(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.transA=(this.center[2]-this.center[3])/2/(this.max-this.min||1),this.isXAxis?this.minPixelPadding=this.transA*this.minPointOffset:this.minPixelPadding=0)}function q(V){let{coll:Z}=this,{angular:K,inverted:J,polar:tt}=this.chart,$={};K?this.isXAxis||($=m(a.yAxis,R.radialDefaultOptions.radialGauge)):tt&&($=this.horiz?m(a.xAxis,R.radialDefaultOptions.circular):m(Z==="xAxis"?a.xAxis:a.yAxis,R.radialDefaultOptions.radial)),J&&Z==="yAxis"&&($.stackLabels=x(a.yAxis,!0)?a.yAxis.stackLabels:{},$.reversedStacks=!0);let Q=this.options=m($,V);Q.plotBands||(Q.plotBands=[]),v(this,"afterSetOptions")}function H(V,Z,K,J,tt,$,Q){let et,it=this.axis;return it.isRadial?["M",Z,K,"L",(et=it.getPosition(this.pos,it.center[2]/2+J)).x,et.y]:V.call(this,Z,K,J,tt,$,Q)}R.radialDefaultOptions=m(e),R.compose=function(V,Z){return L(h,"Axis.Radial")&&(g(V,"afterInit",M),g(V,"autoLabelAlign",k),g(V,"destroy",T),g(V,"init",z),g(V,"initialAxisTranslation",N),g(Z,"afterGetLabelPosition",G),g(Z,"afterGetPosition",X),g(r,"setOptions",j),w(Z.prototype,"getMarkPath",H)),V}}(l||(l={})),l}),s(t,"Series/PolarComposition.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Extensions/Pane/Pane.js"],t["Core/Axis/RadialAxis.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{animObject:h}=e,{composed:c}=i,{addEvent:g,defined:u,find:p,isNumber:b,merge:v,pick:x,pushUnique:m,relativeLength:E,splat:L,uniqueKey:S,wrap:w}=a;function R(){(this.pane||[]).forEach(j=>{j.render()})}function O(j){let B=j.args[0].xAxis,W=j.args[0].yAxis,Y=j.args[0].chart;B&&W&&(W.gridLineInterpolation==="polygon"?(B.startOnTick=!0,B.endOnTick=!0):B.gridLineInterpolation==="polygon"&&Y.inverted&&(W.startOnTick=!0,W.endOnTick=!0))}function I(){this.pane||(this.pane=[]),this.options.pane=L(this.options.pane),this.options.pane.forEach(j=>{new n(j,this)},this)}function _(j){let B=j.args.marker,W=this.chart.xAxis[0],Y=this.chart.yAxis[0],U=this.chart.inverted,q=U?Y:W,H=U?W:Y;if(this.chart.polar){j.preventDefault();let V=(B.attr?B.attr("start"):B.start)-q.startAngleRad,Z=B.attr?B.attr("r"):B.r,K=(B.attr?B.attr("end"):B.end)-q.startAngleRad,J=B.attr?B.attr("innerR"):B.innerR;j.result.x=V+q.pos,j.result.width=K-V,j.result.y=H.len+H.pos-Z,j.result.height=Z-J}}function P(j){let B=this.chart;if(B.polar&&B.hoverPane&&B.hoverPane.axis){j.preventDefault();let W=B.hoverPane.center,Y=B.mouseDownX||0,U=B.mouseDownY||0,q=j.args.chartY,H=j.args.chartX,V=2*Math.PI,Z=B.hoverPane.axis.startAngleRad,K=B.hoverPane.axis.endAngleRad,J=B.inverted?B.xAxis[0]:B.yAxis[0],tt={},$="arc";if(tt.x=W[0]+B.plotLeft,tt.y=W[1]+B.plotTop,this.zoomHor){let Q=Z>0?K-Z:Math.abs(Z)+Math.abs(K),et=Math.atan2(U-B.plotTop-W[1],Y-B.plotLeft-W[0])-Z,it=Math.atan2(q-B.plotTop-W[1],H-B.plotLeft-W[0])-Z;tt.r=W[2]/2,tt.innerR=W[3]/2,et<=0&&(et+=V),it<=0&&(it+=V),itK+(V-Q)/2&&(it=et,et=Z<=0?Z:0);let st=tt.start=Math.max(et+Z,Z),rt=tt.end=Math.min(it+Z,K);if(J.options.gridLineInterpolation==="polygon"){let nt=B.hoverPane.axis,ot=st-nt.startAngleRad+nt.pos,at=J.getPlotLinePath({value:J.max}),ct=nt.toValue(ot),ht=nt.toValue(ot+(rt-st));if(ctW[2]/2&&(it=W[2]/2),etj.max?(Y[U].isNull=!0,Y[U].plotY=NaN):Y[U].isNull=Y[U].isValid&&!Y[U].isValid());this.hasClipCircleSetter||(this.hasClipCircleSetter=!!this.eventsToUnbind.push(g(this,"afterRender",function(){let q;W.polar&&this.options.clip!==!1&&(q=this.yAxis.pane.center,this.clipCircle?this.clipCircle.animate({x:q[0],y:q[1],r:q[2]/2,innerR:q[3]/2}):this.clipCircle=function(H,V,Z,K,J){let tt=S(),$=H.createElement("clipPath").attr({id:tt}).add(H.defs),Q=J?H.arc(V,Z,K,J,0,2*Math.PI).add($):H.circle(V,Z,K).add($);return Q.id=tt,Q.clipPath=$,Q}(W.renderer,q[0],q[1],q[2]/2,q[3]/2),this.group.clip(this.clipCircle),this.setClip=i.noop)})))}}function D(j){let B=this.chart,W=this.xAxis,Y=this.yAxis,U=W.pane&&W.pane.center,q=j.chartX-(U&&U[0]||0)-B.plotLeft,H=j.chartY-(U&&U[1]||0)-B.plotTop,V=B.inverted?{clientX:j.chartX-Y.pos,plotY:j.chartY-W.pos}:{clientX:180+-180/Math.PI*Math.atan2(q,H)};return this.searchKDTree(V)}function C(j,B,W,Y){let U=Y.tickInterval,q=Y.tickPositions,H=p(q,Z=>Z>=W),V=p([...q].reverse(),Z=>Z<=B);return u(H)||(H=q[q.length-1]),u(V)||(V=q[0],H+=U,j[0][0]="L",j.unshift(j[j.length-3])),(j=j.slice(q.indexOf(V),q.indexOf(H)+1))[0][0]="M",j}function d(j,B){return p(this.pane||[],W=>W.options.id===B)||j.call(this,B)}function f(j,B,W,Y,U,q){let H,V,Z,K=this.chart,J=x(Y.inside,!!this.options.stacking);if(K.polar){if(H=B.rectPlotX/Math.PI*180,K.inverted)this.forceDL=K.isInsidePlot(B.plotX,B.plotY),J&&B.shapeArgs?(V=B.shapeArgs,U=v(U,{x:(Z=this.yAxis.postTranslate(((V.start||0)+(V.end||0))/2-this.xAxis.startAngleRad,B.barX+B.pointWidth/2)).x-K.plotLeft,y:Z.y-K.plotTop})):B.tooltipPos&&(U=v(U,{x:B.tooltipPos[0],y:B.tooltipPos[1]})),Y.align=x(Y.align,"center"),Y.verticalAlign=x(Y.verticalAlign,"middle");else{var tt;let $,Q;(tt=Y).align===null&&($=H>20&&H<160?"left":H>200&&H<340?"right":"center",tt.align=$),tt.verticalAlign===null&&(Q=H<45||H>315?"bottom":H>135&&H<225?"top":"middle",tt.verticalAlign=Q),Y=tt}r.prototype.alignDataLabel.call(this,B,W,Y,U,q),this.isRadialBar&&B.shapeArgs&&B.shapeArgs.start===B.shapeArgs.end?W.hide():W.show()}else j.call(this,B,W,Y,U,q)}function y(){let j=this.options,B=j.stacking,W=this.chart,Y=this.xAxis,U=this.yAxis,q=U.reversed,H=U.center,V=Y.startAngleRad,Z=Y.endAngleRad-V,K=j.threshold,J=0,tt,$,Q,et,it,st=0,rt=0,nt,ot,at,ct,ht,lt,xt,wt;if(Y.isRadial)for(Q=(tt=this.points).length,et=U.translate(U.min),it=U.translate(U.max),K=j.threshold||0,W.inverted&&b(K)&&u(J=U.translate(K))&&(J<0?J=0:J>Z&&(J=Z),this.translatedThreshold=J+V);Q--;){if(lt=($=tt[Q]).barX,ot=$.x,at=$.y,$.shapeType="arc",W.inverted){$.plotY=U.translate(at),B&&U.stacking?(ht=U.stacking.stacks[(at<0?"-":"")+this.stackKey],this.visible&&ht&&ht[ot]&&!$.isNull&&(ct=ht[ot].points[this.getStackIndicator(void 0,ot,this.index).key],st=U.translate(ct[0]),rt=U.translate(ct[1]),u(st)&&(st=a.clamp(st,0,Z)))):(st=J,rt=$.plotY),st>rt&&(rt=[st,st=rt][0]),q?rt>et?rt=et:stet||rtit?rt=it:(rtit)&&(st=rt=0),U.min>U.max&&(st=rt=q?Z:0),st+=V,rt+=V,H&&($.barX=lt+=H[3]/2),xt=Math.max(lt,0),wt=Math.max(lt+$.pointWidth,0);let dt=j.borderRadius,Ct=E((typeof dt=="object"?dt.radius:dt)||0,wt-xt);$.shapeArgs={x:H[0],y:H[1],r:wt,innerR:xt,start:st,end:rt,borderRadius:Ct},$.opacity=st===rt?0:void 0,$.plotY=(u(this.translatedThreshold)&&(stH[1])}}function M(j,B){let W,Y,U=this;if(this.chart.polar){B=B||this.points;for(let H=0;H{H.polarPlotY===void 0&&U.polar.toXY(H)})}let q=j.apply(this,[].slice.call(arguments,1));return Y&&B.pop(),q}function k(j,B){let W=this.chart,Y={xAxis:[],yAxis:[]};return W.polar?W.axes.forEach(U=>{if(U.coll==="colorAxis")return;let q=U.isXAxis,H=U.center,V=B.chartX-H[0]-W.plotLeft,Z=B.chartY-H[1]-W.plotTop;Y[q?"xAxis":"yAxis"].push({axis:U,value:U.translate(q?Math.PI-Math.atan2(V,Z):Math.sqrt(Math.pow(V,2)+Math.pow(Z,2)),!0)})}):Y=j.call(this,B),Y}function T(j,B){this.chart.polar||j.call(this,B)}function z(j,B){let W=this,Y=this.chart,U=this.group,q=this.markerGroup,H=this.xAxis&&this.xAxis.center,V=Y.plotLeft,Z=Y.plotTop,K=this.options.animation,J,tt,$,Q,et,it;Y.polar?W.isRadialBar?B||(W.startAngleRad=x(W.translatedThreshold,W.xAxis.startAngleRad),i.seriesTypes.pie.prototype.animate.call(W,B)):(K=h(K),W.is("column")?B||(tt=H[3]/2,W.points.forEach(st=>{$=st.graphic,et=(Q=st.shapeArgs)&&Q.r,it=Q&&Q.innerR,$&&Q&&($.attr({r:tt,innerR:tt}),$.animate({r:et,innerR:it},W.options.animation))})):B?(J={translateX:H[0]+V,translateY:H[1]+Z,scaleX:.001,scaleY:.001},U.attr(J),q&&q.attr(J)):(J={translateX:V,translateY:Z,scaleX:1,scaleY:1},U.animate(J,K),q&&q.animate(J,K))):j.call(this,B)}function N(j,B,W,Y){let U,q;if(this.chart.polar)if(Y){let H=(q=function Z(K,J,tt,$){let Q,et,it,st,rt,nt,ot=$?1:0,at=(Q=J>=0&&J<=K.length-1?J:J<0?K.length-1+J:0)-1<0?K.length-(1+ot):Q-1,ct=Q+1>K.length-1?ot:Q+1,ht=K[at],lt=K[ct],xt=ht.plotX,wt=ht.plotY,dt=lt.plotX,Ct=lt.plotY,ft=K[Q].plotX,Tt=K[Q].plotY;et=(1.5*ft+xt)/2.5,it=(1.5*Tt+wt)/2.5,st=(1.5*ft+dt)/2.5,rt=(1.5*Tt+Ct)/2.5;let zt=Math.sqrt(Math.pow(et-ft,2)+Math.pow(it-Tt,2)),pe=Math.sqrt(Math.pow(st-ft,2)+Math.pow(rt-Tt,2)),ee=Math.atan2(it-Tt,et-ft);nt=Math.PI/2+(ee+Math.atan2(rt-Tt,st-ft))/2,Math.abs(ee-nt)>Math.PI/2&&(nt-=Math.PI),et=ft+Math.cos(nt)*zt,it=Tt+Math.sin(nt)*zt;let we={rightContX:st=ft+Math.cos(Math.PI+nt)*pe,rightContY:rt=Tt+Math.sin(Math.PI+nt)*pe,leftContX:et,leftContY:it,plotX:ft,plotY:Tt};return tt&&(we.prevPointCont=Z(K,at,!1,$)),we}(B,Y,!0,this.connectEnds)).prevPointCont&&q.prevPointCont.rightContX,V=q.prevPointCont&&q.prevPointCont.rightContY;U=["C",b(H)?H:q.plotX,b(V)?V:q.plotY,b(q.leftContX)?q.leftContX:q.plotX,b(q.leftContY)?q.leftContY:q.plotY,q.plotX,q.plotY]}else U=["M",W.plotX,W.plotY];else U=j.call(this,B,W,Y);return U}function G(j,B,W=this.plotY){if(!this.destroyed){let{plotX:Y,series:U}=this,{chart:q}=U;return q.polar&&b(Y)&&b(W)?[Y+(B?q.plotLeft:0),W+(B?q.plotTop:0)]:j.call(this,B,W)}}class X{static compose(B,W,Y,U,q,H,V,Z,K,J){if(n.compose(W,Y),l.compose(B,q),m(c,"Polar")){let tt=W.prototype,$=H.prototype,Q=Y.prototype,et=U.prototype;if(g(W,"afterDrawChartBox",R),g(W,"getAxes",I),g(W,"init",O),w(tt,"get",d),w(Q,"getCoordinates",k),w(Q,"pinch",T),g(Y,"getSelectionMarkerAttrs",P),g(Y,"getSelectionBox",_),g(U,"afterInit",F),g(U,"afterTranslate",A,{order:2}),g(U,"afterColumnTranslate",y,{order:4}),w(et,"animate",z),w($,"pos",G),Z){let it=Z.prototype;w(it,"alignDataLabel",f),w(it,"animate",z)}if(K&&w(K.prototype,"getGraphPath",M),J){let it=J.prototype;w(it,"getPointSpline",N),V&&(V.prototype.getPointSpline=it.getPointSpline)}}}constructor(B){this.series=B}arc(B,W,Y,U){let q=this.series,H=q.xAxis.center,V=q.yAxis.len,Z=H[3]/2,K=V-W+Z,J=V-x(B,V)+Z;return q.yAxis.reversed&&(K<0&&(K=Z),J<0&&(J=Z)),{x:H[0],y:H[1],r:K,innerR:J,start:Y,end:U}}toXY(B){let W=this.series,Y=W.chart,U=W.xAxis,q=W.yAxis,H=B.plotX,V=Y.inverted,Z=B.y,K=B.plotY,J=V?H:q.len-K,tt;if(V&&W&&!W.isRadialBar&&(B.plotY=K=b(Z)?q.translate(Z):0),B.rectPlotX=H,B.rectPlotY=K,q.center&&(J+=q.center[3]/2),b(K)){let $=V?q.postTranslate(K,J):U.postTranslate(H,J);B.plotX=B.polarPlotX=$.x-Y.plotLeft,B.plotY=B.polarPlotY=$.y-Y.plotTop}W.kdByAngle?((tt=(H/Math.PI*180+U.pane.options.startAngle)%360)<0&&(tt+=360),B.clientX=tt):B.clientX=B.plotX}}return X}),s(t,"Core/Axis/WaterfallAxis.js",[t["Core/Globals.js"],t["Core/Axis/Stacking/StackItem.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{composed:l}=e,{addEvent:a,objectEach:h,pushUnique:c}=r;return function(g){function u(){let m=this.waterfall.stacks;m&&(m.changed=!1,delete m.alreadyChanged)}function p(){let m=this.options.stackLabels;m&&m.enabled&&this.waterfall.stacks&&this.waterfall.renderStackTotals()}function b(){this.waterfall||(this.waterfall=new x(this))}function v(){let m=this.axes;for(let E of this.series)if(E.options.stacking){for(let L of m)L.isXAxis||(L.waterfall.stacks.changed=!0);break}}g.compose=function(m,E){c(l,"Axis.Waterfall")&&(a(m,"init",b),a(m,"afterBuildStacks",u),a(m,"afterRender",p),a(E,"beforeRedraw",v))};class x{constructor(E){this.axis=E,this.stacks={changed:!1}}renderStackTotals(){let E=this.axis,L=E.waterfall.stacks,S=E.stacking&&E.stacking.stackTotalGroup,w=new i(E,E.options.stackLabels||{},!1,0,void 0);this.dummyStackItem=w,S&&h(L,R=>{h(R,(O,I)=>{w.total=O.stackTotal,w.x=+I,O.label&&(w.label=O.label),i.prototype.render.call(w,S),O.label=w.label,delete w.label})}),w.total=null}}g.Composition=x}(n||(n={})),n}),s(t,"Series/Waterfall/WaterfallPoint.js",[t["Series/Column/ColumnSeries.js"],t["Core/Series/Point.js"],t["Core/Utilities.js"]],function(e,i,r){let{isNumber:n}=r;class l extends e.prototype.pointClass{getClassName(){let h=i.prototype.getClassName.call(this);return this.isSum?h+=" highcharts-sum":this.isIntermediateSum&&(h+=" highcharts-intermediate-sum"),h}isValid(){return n(this.y)||this.isSum||!!this.isIntermediateSum}}return l}),s(t,"Series/Waterfall/WaterfallSeriesDefaults.js",[],function(){return{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}}}),s(t,"Series/Waterfall/WaterfallSeries.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"],t["Core/Axis/WaterfallAxis.js"],t["Series/Waterfall/WaterfallPoint.js"],t["Series/Waterfall/WaterfallSeriesDefaults.js"]],function(e,i,r,n,l){let{column:a,line:h}=e.seriesTypes,{addEvent:c,arrayMax:g,arrayMin:u,correctFloat:p,crisp:b,extend:v,isNumber:x,merge:m,objectEach:E,pick:L}=i;function S(R,O){return Object.hasOwnProperty.call(R,O)}class w extends a{generatePoints(){a.prototype.generatePoints.apply(this);for(let O=0,I=this.points.length;O0?_:void 0);let P=a.prototype.pointAttribs.call(this,O,I);return delete P.dashstyle,P}getGraphPath(){return[["M",0,0]]}getCrispPath(){let O=this.data.filter(d=>x(d.y)),I=this.yAxis,_=O.length,P=this.graph?.strokeWidth()||0,F=this.xAxis.reversed,A=this.yAxis.reversed,D=this.options.stacking,C=[];for(let d=1;d<_;d++){if(!(this.options.connectNulls||x(this.data[O[d].index-1].y)))continue;let f=O[d].box,y=O[d-1],M=y.y||0,k=O[d-1].box;if(!f||!k)continue;let T=I.waterfall.stacks[this.stackKey],z=M>0?-k.height:0;if(T&&k&&f){let N,G=T[d-1];if(D){let X=G.connectorThreshold;N=b(I.translate(X,!1,!0,!1,!0)+(A?z:0),P)}else N=b(k.y+(y.minPointLengthOffset||0),P);C.push(["M",(k.x||0)+(F?0:k.width||0),N],["L",(f.x||0)+(F&&f.width||0),N])}if(k&&C.length&&(!D&&M<0&&!A||M>0&&A)){let N=C[C.length-2];N&&typeof N[2]=="number"&&(N[2]+=k.height||0);let G=C[C.length-1];G&&typeof G[2]=="number"&&(G[2]+=k.height||0)}}return C}drawGraph(){h.prototype.drawGraph.call(this),this.graph&&this.graph.attr({d:this.getCrispPath()})}setStackedPoints(O){let I=this.options,_=O.waterfall?.stacks,P=I.threshold||0,F=this.stackKey,A=this.xData,D=A.length,C=P,d=C,f,y=0,M=0,k=0,T,z,N,G,X,j,B,W,Y=(U,q,H,V)=>{if(f){if(T)for(;HB.indexOf(F)&&(W=!0),_[F]||(_[F]={});let U=_[F];if(U)for(let q=0;q=0?f.posTotal+=X:f.negTotal+=X,G=I.data[q],z=f.absolutePos=f.posTotal,N=f.absoluteNeg=f.negTotal,f.stackTotal=z+N,T=f.stackState.length,G&&G.isIntermediateSum?(Y(k,M,0,k),k=M,M=P,C^=d,d^=C,C^=d):G&&G.isSum?(Y(P,y,T,0),C=P):(Y(C,X,0,y),G&&(y+=X,M+=X)),f.stateIndex++,f.threshold=C,C+=f.stackTotal;_.changed=!1,_.alreadyChanged||(_.alreadyChanged=[]),_.alreadyChanged.push(F)}}getExtremes(){let O,I,_,P=this.options.stacking;return P?(O=this.yAxis.waterfall.stacks,I=this.stackedYNeg=[],_=this.stackedYPos=[],P==="overlap"?E(O[this.stackKey],function(F){I.push(u(F.stackState)),_.push(g(F.stackState))}):E(O[this.stackKey],function(F){I.push(F.negTotal+F.threshold),_.push(F.posTotal+F.threshold)}),{dataMin:u(I),dataMax:g(_)}):{dataMin:this.dataMin,dataMax:this.dataMax}}}return w.defaultOptions=m(a.defaultOptions,l),w.compose=r.compose,v(w.prototype,{pointValKey:"y",showLine:!0,pointClass:n}),c(w,"afterColumnTranslate",function(){let{options:R,points:O,yAxis:I}=this,_=L(R.minPointLength,5),P=_/2,F=R.threshold||0,A=R.stacking,D=I.waterfall.stacks[this.stackKey],C=F,d=F,f,y,M,k;for(let T=0;T=0?y:y-j,S(Y,"absolutePos")&&delete Y.absolutePos,S(Y,"absoluteNeg")&&delete Y.absoluteNeg):(j>=0?(y=Y.threshold+Y.posTotal,Y.posTotal-=j,f=y):(y=Y.threshold+Y.negTotal,Y.negTotal-=j,f=y-j),!Y.posTotal&&x(Y.absolutePos)&&S(Y,"absolutePos")&&(Y.posTotal=Y.absolutePos,delete Y.absolutePos),!Y.negTotal&&x(Y.absoluteNeg)&&S(Y,"absoluteNeg")&&(Y.negTotal=Y.absoluteNeg,delete Y.absoluteNeg)),z.isSum||(Y.connectorThreshold=Y.threshold+Y.stackTotal),I.reversed?(M=j>=0?f-j:f+j,k=f):(M=f,k=f-j),z.below=M<=F,G.y=I.translate(M,!1,!0,!1,!0),G.height=Math.abs(G.y-I.translate(k,!1,!0,!1,!0));let U=I.waterfall.dummyStackItem;U&&(U.x=T,U.label=D[T].label,U.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[T],this.stackedYPos[T],void 0,this.xAxis))}}else f=Math.max(d,d+j)+X[0],G.y=I.translate(f,!1,!0,!1,!0),z.isSum?(G.y=I.translate(X[1],!1,!0,!1,!0),G.height=Math.min(I.translate(X[0],!1,!0,!1,!0),I.len)-G.y,z.below=X[1]<=F):z.isIntermediateSum?(j>=0?(M=X[1]+C,k=C):(M=C,k=X[1]+C),I.reversed&&(M^=k,k^=M,M^=k),G.y=I.translate(M,!1,!0,!1,!0),G.height=Math.abs(G.y-Math.min(I.translate(k,!1,!0,!1,!0),I.len)),C+=X[1],z.below=M<=F):(G.height=N>0?I.translate(d,!1,!0,!1,!0)-G.y:I.translate(d,!1,!0,!1,!0)-I.translate(d-N,!1,!0,!1,!0),d+=N,z.below=d{"use strict";(function(o){typeof Gn=="object"&&Gn.exports?(o.default=o,Gn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Extensions/Breadcrumbs/BreadcrumbsDefaults.js",[],function(){return{lang:{mainBreadcrumb:"Main"},options:{buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},buttonSpacing:5,floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"#666666",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7}}}),s(t,"Extensions/Breadcrumbs/Breadcrumbs.js",[t["Extensions/Breadcrumbs/BreadcrumbsDefaults.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{format:l}=i,{composed:a}=r,{addEvent:h,defined:c,extend:g,fireEvent:u,isString:p,merge:b,objectEach:v,pick:x,pushUnique:m}=n;function E(){if(this.breadcrumbs){let I=this.resetZoomButton&&this.resetZoomButton.getBBox(),_=this.breadcrumbs.options;I&&_.position.align==="right"&&_.relativeTo==="plotBox"&&this.breadcrumbs.alignBreadcrumbsGroup(-I.width-_.buttonSpacing)}}function L(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function S(){let I=this.breadcrumbs;if(I&&!I.options.floating&&I.level){let _=I.options,P=_.buttonTheme,F=(P.height||0)+2*(P.padding||0)+_.buttonSpacing,A=_.position.verticalAlign;A==="bottom"?(this.marginBottom=(this.marginBottom||0)+F,I.yOffset=F):A!=="middle"?(this.plotTop+=F,I.yOffset=-F):I.yOffset=void 0}}function w(){this.breadcrumbs&&this.breadcrumbs.redraw()}function R(I){I.resetSelection===!0&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class O{static compose(_,P){m(a,"Breadcrumbs")&&(h(_,"destroy",L),h(_,"afterShowResetZoom",E),h(_,"getMargins",S),h(_,"redraw",w),h(_,"selection",R),g(P.lang,e.lang))}constructor(_,P){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let F=b(_.options.drilldown&&_.options.drilldown.drillUpButton,O.defaultOptions,_.options.navigation&&_.options.navigation.breadcrumbs,P);this.chart=_,this.options=F||{}}updateProperties(_){this.setList(_),this.setLevel(),this.isDirty=!0}setList(_){this.list=_}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(_){let P=this.chart,F=this.options,A=P.options.lang,D=x(F.format,F.showFullPath?"{level.name}":"\u2190 {level.name}"),C=A&&x(A.drillUpText,A.mainBreadcrumb),d=F.formatter&&F.formatter(_)||l(D,{level:_.levelOptions},P)||"";return(p(d)&&!d.length||d==="\u2190 ")&&c(C)&&(d=F.showFullPath?C:"\u2190 "+C),d}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let _=this.chart,P=this.options;!this.group&&P&&(this.group=_.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:P.zIndex}).add()),P.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let _=this.chart,P=this.list,F=this.options.buttonSpacing;this.destroyListElements();let A=this.group?this.group.getBBox().width:F,D=P[P.length-2];!_.drillUpButton&&this.level>0?_.drillUpButton=this.renderButton(D,A,F):_.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(_){if(this.group){let P=this.options,F=P.buttonTheme,A=P.position,D=P.relativeTo==="chart"||P.relativeTo==="spacingBox"?void 0:"plotBox",C=this.group.getBBox(),d=2*(F.padding||0)+P.buttonSpacing;A.width=C.width+d,A.height=C.height+d;let f=b(A);_&&(f.x+=_),this.options.rtl&&(f.x+=A.width),f.y=x(f.y,this.yOffset,0),this.group.align(f,!0,D)}}renderButton(_,P,F){let A=this,D=this.chart,C=A.options,d=b(C.buttonTheme),f=D.renderer.button(A.getButtonText(_),P,F,function(y){let M,k=C.events&&C.events.click;k&&(M=k.call(A,y,_)),M!==!1&&(C.showFullPath?y.newLevel=_.level:y.newLevel=A.level-1,u(A,"up",y))},d).addClass("highcharts-breadcrumbs-button").add(A.group);return D.styledMode||f.attr(C.style),f}renderSeparator(_,P){let F=this.chart,A=this.options.separator,D=F.renderer.label(A.text,_,P,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return F.styledMode||D.css(A.style),D}update(_){b(!0,this.options,_),this.destroy(),this.isDirty=!0}updateSingleButton(){let _=this.chart,P=this.list[this.level-1];_.drillUpButton&&_.drillUpButton.attr({text:this.getButtonText(P)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(_){let P=this.elementList;v(P,(F,A)=>{(_||!P[A].updated)&&((F=P[A]).button&&F.button.destroy(),F.separator&&F.separator.destroy(),delete F.button,delete F.separator,delete P[A])}),_&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){v(this.elementList,_=>{_.updated=!1})}updateListElements(){let _=this.elementList,P=this.options.buttonSpacing,F=this.list,A=this.options.rtl,D=A?-1:1,C=function(k,T){return D*k.getBBox().width+D*T},d=function(k,T,z){k.translate(T-k.getBBox().width,z)},f=this.group?C(this.group,P):P,y,M;for(let k=0,T=F.length;k{e.graphic=c=c&&c.destroy(),typeof n=="function"&&n()};Object.keys(r).length?c.animate(r,void 0,()=>g()):g()}}}}),s(t,"Series/Treemap/TreemapPoint.js",[t["Series/DrawPointUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{pie:{prototype:{pointClass:n}},scatter:{prototype:{pointClass:l}}}=i.seriesTypes,{extend:a,isNumber:h,pick:c}=r;class g extends l{constructor(){super(...arguments),this.shapeType="rect"}draw(p){e.draw(this,p)}getClassName(){let p=this.series,b=p.options,v=super.getClassName();return this.node.level<=p.nodeMap[p.rootNode].level?v+=" highcharts-above-level":this.node.isLeaf||c(b.interactByLeaf,!b.allowTraversingTree)?this.node.isLeaf||(v+=" highcharts-internal-node"):v+=" highcharts-internal-node-interactive",v}isValid(){return!!(this.id||h(this.value))}setState(p){super.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:p==="hover"?1:0})}shouldDraw(){return h(this.plotY)&&this.y!==null}}return a(g.prototype,{setVisible:n.prototype.setVisible}),g}),s(t,"Series/Treemap/TreemapSeriesDefaults.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{isString:r}=i;return{allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){let n=this&&this.point?this.point:{};return r(n.name)?n.name:""},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"{point.name}: {point.value}
"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:e.seriesTypes.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle"}}),s(t,"Series/Treemap/TreemapUtilities.js",[],function(){var e;return(e||(e={})).recursive=function i(r,n,l){let a=n.call(l||this,r);a!==!1&&i(a,n,l)},e}),s(t,"Series/TreeUtilities.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){let{extend:r,isArray:n,isNumber:l,isObject:a,merge:h,pick:c,relativeLength:g}=i;return{getColor:function(u,p){let b,v,x,m,E,L,S=p.index,w=p.mapOptionsToLevel,R=p.parentColor,O=p.parentColorIndex,I=p.series,_=p.colors,P=p.siblings,F=I.points,A=I.chart.options.chart;return u&&(b=F[u.i],v=w[u.level]||{},b&&v.colorByPoint&&(m=b.index%(_?_.length:A.colorCount),x=_&&_[m]),I.chart.styledMode||(E=c(b&&b.options.color,v&&v.color,x,R&&(D=>{let C=v&&v.colorVariation;return C&&C.key==="brightness"&&S&&P?e.parse(D).brighten(C.to*(S/P)).get():D})(R),I.color)),L=c(b&&b.options.colorIndex,v&&v.colorIndex,m,O,p.colorIndex)),{color:E,colorIndex:L}},getLevelOptions:function(u){let p,b,v,x,m,E,L={};if(a(u))for(x=l(u.from)?u.from:1,E=u.levels,b={},p=a(u.defaults)?u.defaults:{},n(E)&&(b=E.reduce((S,w)=>{let R,O,I;return a(w)&&l(w.level)&&(O=c((I=h({},w)).levelIsConstant,p.levelIsConstant),delete I.levelIsConstant,delete I.level,a(S[R=w.level+(O?0:x-1)])?h(!0,S[R],I):S[R]=I),S},{})),m=l(u.to)?u.to:1,v=0;v<=m;v++)L[v]=h({},p,a(b[v])?b[v]:{});return L},getNodeWidth:function(u,p){let{chart:b,options:v}=u,{nodeDistance:x=0,nodeWidth:m=0}=v,{plotSizeX:E=1}=b;if(m==="auto"){if(typeof x=="string"&&/%$/.test(x))return E/(p+parseFloat(x)/100*(p-1));let L=Number(x);return(E+L)/(p||1)-L}return g(m,E)},setTreeValues:function u(p,b){let v=b.before,x=b.idRoot,m=b.mapIdToNode[x],E=b.levelIsConstant!==!1,L=b.points[p.i],S=L&&L.options||{},w=[],R=0;p.levelDynamic=p.level-(E?0:m.level),p.name=c(L&&L.name,""),p.visible=x===p.id||b.visible===!0,typeof v=="function"&&(p=v(p,b)),p.children.forEach((I,_)=>{let P=r({},b);r(P,{index:_,siblings:p.children.length,visible:p.visible}),I=u(I,P),w.push(I),I.visible&&(R+=I.val)});let O=c(S.value,R);return p.visible=O>=0&&(R>0||p.visible),p.children=w,p.childrenTotal=R,p.isLeaf=p.visible&&!R,p.val=O,p},updateRootId:function(u){let p,b;return a(u)&&(b=a(u.options)?u.options:{},p=c(u.rootNode,b.rootId,""),a(u.userOptions)&&(u.userOptions.rootId=p),u.rootNode=p),p}}}),s(t,"Series/Treemap/TreemapSeries.js",[t["Extensions/Breadcrumbs/Breadcrumbs.js"],t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Series/Treemap/TreemapAlgorithmGroup.js"],t["Series/Treemap/TreemapNode.js"],t["Series/Treemap/TreemapPoint.js"],t["Series/Treemap/TreemapSeriesDefaults.js"],t["Series/Treemap/TreemapUtilities.js"],t["Series/TreeUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u,p,b){let{parse:v}=i,{composed:x,noop:m}=n,{column:E,scatter:L}=l.seriesTypes,{getColor:S,getLevelOptions:w,updateRootId:R}=p,{addEvent:O,correctFloat:I,crisp:_,defined:P,error:F,extend:A,fireEvent:D,isArray:C,isObject:d,isString:f,merge:y,pick:M,pushUnique:k,stableSort:T}=b,z=!1;function N(){let X,j=this.xAxis,B=this.yAxis;j&&B&&(this.is("treemap")?(X={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,minPadding:0,max:100,maxPadding:0,startOnTick:!1,title:void 0,tickPositions:[]},A(B.options,X),A(j.options,X),z=!0):z&&(B.setOptions(B.userOptions),j.setOptions(j.userOptions),z=!1))}class G extends L{static compose(j){k(x,"TreemapSeries")&&O(j,"afterBindAxes",N)}algorithmCalcPoints(j,B,W,Y){let U=W.plot,q=W.elArr.length-1,H,V,Z,K,J=W.lW,tt=W.lH,$,Q=0;for(let et of(B?(J=W.nW,tt=W.nH):$=W.elArr[q],W.elArr))(B||QV.lP.lR&&this.algorithmCalcPoints(j,!1,V,Y,U),K===H&&this.algorithmCalcPoints(j,!0,V,Y,U),++K;return Y}alignDataLabel(j,B,W){let Y=W.style;Y&&!P(Y.textOverflow)&&B.text&&B.getBBox().width>(B.text.textWidth||0)&&B.css({textOverflow:"ellipsis",width:Y.width+="px"}),E.prototype.alignDataLabel.apply(this,arguments),j.dataLabel&&j.dataLabel.attr({zIndex:(j.node.zIndex||0)+1})}calculateChildrenAreas(j,B){let W=this.options,Y=this.mapOptionsToLevel[j.level+1],U=M(this[Y&&Y.layoutAlgorithm]&&Y.layoutAlgorithm,W.layoutAlgorithm),q=W.alternateStartingDirection,H=j.children.filter(K=>!K.ignore),V=[];Y&&Y.layoutStartingDirection&&(B.direction=Y.layoutStartingDirection==="vertical"?0:1),V=this[U](B,H);let Z=-1;for(let K of H){let J=V[++Z];K.values=y(J,{val:K.childrenTotal,direction:q?1-B.direction:B.direction}),K.pointValues=y(J,{x:J.x/this.axisRatio,y:100-J.y-J.height,width:J.width/this.axisRatio}),K.children.length&&this.calculateChildrenAreas(K,K.values)}}createList(j){let B=this.chart,W=B.breadcrumbs,Y=[];if(W){let U=0;Y.push({level:U,levelOptions:B.series[0]});let q=j.target.nodeMap[j.newRootId],H=[];for(;q.parent||q.parent==="";)H.push(q),q=j.target.nodeMap[q.parent];for(let V of H.reverse())Y.push({level:++U,levelOptions:V});Y.length<=1&&(Y.length=0)}return Y}drawDataLabels(){let j,B,W=this.mapOptionsToLevel;for(let Y of this.points.filter(function(U){return U.node.visible}))B=W[Y.node.level],j={style:{}},Y.node.isLeaf||(j.enabled=!1),B&&B.dataLabels&&(j=y(j,B.dataLabels),this.hasDataLabels=()=>!0),Y.shapeArgs&&(j.style.width=Y.shapeArgs.width,Y.dataLabel&&Y.dataLabel.css({width:Y.shapeArgs.width+"px"})),Y.dlOptions=y(j,Y.options.dataLabels);super.drawDataLabels()}drawPoints(j=this.points){let B=this.chart,W=B.renderer,Y=B.styledMode,U=this.options,q=Y?{}:U.shadow,H=U.borderRadius,V=B.pointCount{let H=q.userOptions;P(H.allowDrillToNode)&&!P(H.allowTraversingTree)&&(H.allowTraversingTree=H.allowDrillToNode,delete H.allowDrillToNode),P(H.drillUpButton)&&!P(H.traverseUpButton)&&(H.traverseUpButton=H.drillUpButton,delete H.drillUpButton)});super.init(j,B),delete W.opacity,W.eventsToUnbind.push(U),W.options.allowTraversingTree&&(W.eventsToUnbind.push(O(W,"click",W.onClickDrillToNode)),W.eventsToUnbind.push(O(W,"setRootNode",function(q){let H=W.chart;H.breadcrumbs&&H.breadcrumbs.updateProperties(W.createList(q))})),W.eventsToUnbind.push(O(W,"update",function(q,H){let V=this.chart.breadcrumbs;V&&q.options.breadcrumbs&&V.update(q.options.breadcrumbs)})),W.eventsToUnbind.push(O(W,"destroy",function(q){let H=this.chart;H.breadcrumbs&&!q.keepEventsForUpdate&&(H.breadcrumbs.destroy(),H.breadcrumbs=void 0)}))),j.breadcrumbs||(j.breadcrumbs=new e(j,Y)),W.eventsToUnbind.push(O(j.breadcrumbs,"up",function(q){let H=this.level-q.newLevel;for(let V=0;VU?0:j.pointAttribs(H)["stroke-width"]||0;for(let H of B){let{pointValues:V,visible:Z}=H.node;if(V&&Z){let{height:K,width:J,x:tt,y:$}=V,Q=q(H),et=_(W.toPixels(tt,!0),Q,!0),it=_(W.toPixels(tt+J,!0),Q,!0),st=_(Y.toPixels($,!0),Q,!0),rt=_(Y.toPixels($+K,!0),Q,!0),nt={x:Math.min(et,it),y:Math.min(st,rt),width:Math.abs(it-et),height:Math.abs(rt-st)};H.plotX=nt.x+nt.width/2,H.plotY=nt.y+nt.height/2,H.shapeArgs=nt}else delete H.plotX,delete H.plotY}}setRootNode(j,B,W){D(this,"setRootNode",A({newRootId:j,previousRootId:this.rootNode,redraw:M(B,!0),series:this},W),function(Y){let U=Y.series;U.idPreviousRoot=Y.previousRootId,U.rootNode=Y.newRootId,U.isDirty=!0,Y.redraw&&U.chart.redraw()})}setState(j){this.options.inactiveOtherPoints=!0,super.setState(j,!1),this.options.inactiveOtherPoints=!1}setTreeValues(j){let B=this.options,W=this.rootNode,Y=this.nodeMap[W],U=typeof B.levelIsConstant!="boolean"||B.levelIsConstant,q=[],H=this.points[j.i],V=0;for(let K of j.children)K=this.setTreeValues(K),q.push(K),K.ignore||(V+=K.val);T(q,(K,J)=>(K.sortIndex||0)-(J.sortIndex||0));let Z=M(H&&H.options.value,V);return H&&(H.value=Z),A(j,{children:q,childrenTotal:V,ignore:!(M(H&&H.visible,!0)&&Z>0),isLeaf:j.visible&&!V,levelDynamic:j.level-(U?0:Y.level),name:M(H&&H.name,""),sortIndex:M(H&&H.sortIndex,-Z),val:Z}),j}sliceAndDice(j,B){return this.algorithmFill(!0,j,B)}squarified(j,B){return this.algorithmLowAspectRatio(!0,j,B)}strip(j,B){return this.algorithmLowAspectRatio(!1,j,B)}stripes(j,B){return this.algorithmFill(!1,j,B)}translate(){let j=this,B=j.options,W=R(j),Y,U,q,H;super.translate();let V=j.tree=j.getTree();Y=j.nodeMap[W],W===""||Y&&Y.children.length||(j.setRootNode("",!1),W=j.rootNode,Y=j.nodeMap[W]),j.mapOptionsToLevel=w({from:Y.level+1,levels:B.levels,to:V.height,defaults:{levelIsConstant:j.options.levelIsConstant,colorByPoint:B.colorByPoint}}),u.recursive(j.nodeMap[j.rootNode],Z=>{let K=Z.parent,J=!1;return Z.visible=!0,(K||K==="")&&(J=j.nodeMap[K]),J}),u.recursive(j.nodeMap[j.rootNode].children,Z=>{let K=!1;for(let J of Z)J.visible=!0,J.children.length&&(K=(K||[]).concat(J.children));return K}),j.setTreeValues(V),j.axisRatio=j.xAxis.len/j.yAxis.len,j.nodeMap[""].pointValues=U={x:0,y:0,width:100,height:100},j.nodeMap[""].values=q=y(U,{width:U.width*j.axisRatio,direction:B.layoutStartingDirection==="vertical"?0:1,val:V.val}),j.calculateChildrenAreas(V,q),j.colorAxis||B.colorByPoint||j.setColorRecursive(j.tree),B.allowTraversingTree&&(H=Y.pointValues,j.xAxis.setExtremes(H.x,H.x+H.width,!1),j.yAxis.setExtremes(H.y,H.y+H.height,!1),j.xAxis.setScale(),j.yAxis.setScale()),j.setPointValues()}}return G.defaultOptions=y(L.defaultOptions,g),A(G.prototype,{buildKDTree:m,colorAttribs:r.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,getExtremesFromAll:!0,getSymbol:m,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:c,NodeClass:h,trackerGroups:["group","dataLabelsGroup"],utils:u}),r.compose(G),l.registerSeriesType("treemap",G),G}),s(t,"masters/modules/treemap.src.js",[t["Core/Globals.js"],t["Extensions/Breadcrumbs/Breadcrumbs.js"],t["Series/Treemap/TreemapSeries.js"]],function(e,i,r){return e.Breadcrumbs=e.Breadcrumbs||i,e.Breadcrumbs.compose(e.Chart,e.defaultOptions),r.compose(e.Series),e})})});var Eu=qe((AT,Xn)=>{"use strict";(function(o){typeof Xn=="object"&&Xn.exports?(o.default=o,Xn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/heatmap",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisComposition.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r;let{parse:n}=e,{addEvent:l,extend:a,merge:h,pick:c,splat:g}=i;return function(u){let p;function b(){let{userOptions:I}=this;this.colorAxis=[],I.colorAxis&&(I.colorAxis=g(I.colorAxis),I.colorAxis.map(_=>new p(this,_)))}function v(I){let _=this.chart.colorAxis||[],P=C=>{let d=I.allItems.indexOf(C);d!==-1&&(this.destroyItem(I.allItems[d]),I.allItems.splice(d,1))},F=[],A,D;for(_.forEach(function(C){(A=C.options)&&A.showInLegend&&(A.dataClasses&&A.visible?F=F.concat(C.getDataClassLegendSymbols()):A.visible&&F.push(C),C.series.forEach(function(d){(!d.options.showInLegend||A.dataClasses)&&(d.options.legendType==="point"?d.points.forEach(function(f){P(f)}):P(d))}))}),D=F.length;D--;)I.allItems.unshift(F[D])}function x(I){I.visible&&I.item.legendColor&&I.item.legendItem.symbol.attr({fill:I.item.legendColor})}function m(I){this.chart.colorAxis?.forEach(_=>{_.update({},I.redraw)})}function E(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function L(){let I=this.axisTypes;I?I.indexOf("colorAxis")===-1&&I.push("colorAxis"):this.axisTypes=["colorAxis"]}function S(I){let _=this,P=I?"show":"hide";_.visible=_.options.visible=!!I,["graphic","dataLabel"].forEach(function(F){_[F]&&_[F][P]()}),this.series.buildKDTree()}function w(){let I=this,_=this.data.length?this.data:this.points,P=this.options.nullColor,F=this.colorAxis,A=this.colorKey;_.forEach(D=>{let C=D.getNestedProperty(A),d=D.options.color||(D.isNull||D.value===null?P:F&&C!==void 0?F.toColor(C,D):D.color||I.color);d&&D.color!==d&&(D.color=d,I.options.legendType==="point"&&D.legendItem&&D.legendItem.label&&I.chart.legend.colorizeItem(D,D.visible))})}function R(){this.elem.attr("fill",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}function O(){this.elem.attr("stroke",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}u.compose=function(I,_,P,F,A){let D=_.prototype,C=P.prototype,d=A.prototype;D.collectionsWithUpdate.includes("colorAxis")||(p=I,D.collectionsWithUpdate.push("colorAxis"),D.collectionsWithInit.colorAxis=[D.addColorAxis],l(_,"afterGetAxes",b),function(f){let y=f.prototype.createAxis;f.prototype.createAxis=function(M,k){if(M!=="colorAxis")return y.apply(this,arguments);let T=new p(this,h(k.axis,{index:this[M].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(z=>{z.series=[]}),this.series.forEach(z=>{z.bindAxes(),z.isDirtyData=!0}),c(k.redraw,!0)&&this.redraw(k.animation),T}}(_),C.fillSetter=R,C.strokeSetter=O,l(F,"afterGetAllItems",v),l(F,"afterColorizeItem",x),l(F,"afterUpdate",m),a(d,{optionalAxis:"colorAxis",translateColors:w}),a(d.pointClass.prototype,{setVisible:S}),l(A,"afterTranslate",E,{order:1}),l(A,"bindAxes",L))},u.pointSetVisible=S}(r||(r={})),r}),s(t,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}}),s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/Color/ColorAxis.js",[t["Core/Axis/Axis.js"],t["Core/Axis/Color/ColorAxisComposition.js"],t["Core/Axis/Color/ColorAxisDefaults.js"],t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Defaults.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=l,{series:u}=h,{defined:p,extend:b,fireEvent:v,isArray:x,isNumber:m,merge:E,pick:L,relativeLength:S}=c;g.colorAxis=E(g.xAxis,r);class w extends e{static compose(O,I,_,P){i.compose(w,O,I,_,P)}constructor(O,I){super(O,I),this.coll="colorAxis",this.visible=!0,this.init(O,I)}init(O,I){let _=O.options.legend||{},P=I.layout?I.layout!=="vertical":_.layout!=="vertical";this.side=I.side||P?2:1,this.reversed=I.reversed||!P,this.opposite=!P,super.init(O,I,"colorAxis"),this.userOptions=I,x(O.userOptions.colorAxis)&&(O.userOptions.colorAxis[this.index]=I),I.dataClasses&&this.initDataClasses(I),this.initStops(),this.horiz=P,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(O){let I=E(g.colorAxis,O,{showEmpty:!1,title:null,visible:this.chart.options.legend.enabled&&O.visible!==!1});super.setOptions(I),this.options.crosshair=this.options.marker}setAxisSize(){let O=this.chart,I=this.legendItem?.symbol,{width:_,height:P}=this.getSize();I&&(this.left=+I.attr("x"),this.top=+I.attr("y"),this.width=_=+I.attr("width"),this.height=P=+I.attr("height"),this.right=O.chartWidth-this.left-_,this.bottom=O.chartHeight-this.top-P,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?_:P)||w.defaultLegendLength}getOffset(){let O=this.legendItem?.group,I=this.chart.axisOffset[this.side];if(O){this.axisParent=O,super.getOffset();let _=this.chart.legend;_.allItems.forEach(function(P){P instanceof w&&P.drawLegendSymbol(_,P)}),_.render(),this.chart.getMargins(!0),this.chart.series.some(P=>P.isDrilling)||(this.isDirty=!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=I}}setLegendColor(){let O=this.horiz,I=this.reversed,_=I?1:0,P=I?0:1,F=O?[_,0,P,0]:[0,P,0,_];this.legendColor={linearGradient:{x1:F[0],y1:F[1],x2:F[2],y2:F[3]},stops:this.stops}}drawLegendSymbol(O,I){let _=I.legendItem||{},P=O.padding,F=O.options,A=this.options.labels,D=L(F.itemDistance,10),C=this.horiz,{width:d,height:f}=this.getSize(),y=L(F.labelPadding,C?16:30);this.setLegendColor(),_.symbol||(_.symbol=this.chart.renderer.symbol("roundedRect").attr({r:F.symbolRadius??3,zIndex:1}).add(_.group)),_.symbol.attr({x:0,y:(O.baseline||0)-11,width:d,height:f}),_.labelWidth=d+P+(C?D:L(A.x,A.distance)+(this.maxLabelLength||0)),_.labelHeight=f+P+(C?y:0)}setState(O){this.series.forEach(function(I){I.setState(O)})}setVisible(){}getSeriesExtremes(){let O=this.series,I,_,P,F,A,D,C=O.length,d,f;for(this.dataMin=1/0,this.dataMax=-1/0;C--;){if(_=(D=O[C]).colorKey=L(D.options.colorKey,D.colorKey,D.pointValKey,D.zoneAxis,"y"),F=D.pointArrayMap,A=D[_+"Min"]&&D[_+"Max"],D[_+"Data"])I=D[_+"Data"];else if(F){if(I=[],P=F.indexOf(_),d=D.yData,P>=0&&d)for(f=0;fD+C&&(_=D+C+2),I.plotX=_,I.plotY=this.len-_,super.drawCrosshair(O,I),I.plotX=F,I.plotY=A,this.cross&&!this.cross.addedToColorAxis&&P.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(P.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||typeof this.crosshair!="object"||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(O){let I=this.left,_=O.translatedValue,P=this.top;return m(_)?this.horiz?[["M",_-4,P-6],["L",_+4,P-6],["L",_,P],["Z"]]:[["M",I,_],["L",I-6,_+6],["L",I-6,_-6],["Z"]]:super.getPlotLinePath(O)}update(O,I){let _=this.chart.legend;this.series.forEach(P=>{P.isDirtyData=!0}),(O.dataClasses&&_.allItems||this.dataClasses)&&this.destroyItems(),super.update(O,I),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),_.colorizeItem(this,!0))}destroyItems(){let O=this.chart,I=this.legendItem||{};if(I.label)O.legend.destroyItem(this);else if(I.labels)for(let _ of I.labels)O.legend.destroyItem(_);O.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(O){this.destroyItems(),super.remove(O)}getDataClassLegendSymbols(){let O,I=this,_=I.chart,P=I.legendItem&&I.legendItem.labels||[],F=_.options.legend,A=L(F.valueDecimals,-1),D=L(F.valueSuffix,""),C=d=>I.series.reduce((f,y)=>(f.push(...y.points.filter(M=>M.dataClass===d)),f),[]);return P.length||I.dataClasses.forEach((d,f)=>{let y=d.from,M=d.to,{numberFormatter:k}=_,T=!0;O="",y===void 0?O="< ":M===void 0&&(O="> "),y!==void 0&&(O+=k(y,A)+D),y!==void 0&&M!==void 0&&(O+=" - "),M!==void 0&&(O+=k(M,A)+D),P.push(b({chart:_,name:O,options:{},drawLegendSymbol:a.rectangle,visible:!0,isDataClass:!0,setState:z=>{for(let N of C(f))N.setState(z)},setVisible:function(){this.visible=T=I.visible=!T;let z=[];for(let N of C(f))N.setVisible(T),N.hiddenInDataClass=!T,z.indexOf(N.series)===-1&&z.push(N.series);_.legend.colorizeItem(this,T),z.forEach(N=>{v(N,"afterDataClassLegendClick")})}},d))}),P}getSize(){let{chart:O,horiz:I}=this,{height:_,width:P}=this.options,{legend:F}=O.options;return{width:L(p(P)?S(P,O.chartWidth):void 0,F?.symbolWidth,I?w.defaultLegendLength:12),height:L(p(_)?S(_,O.chartHeight):void 0,F?.symbolHeight,I?12:w.defaultLegendLength)}}}return w.defaultLegendLength=200,w.keepProps=["legendItem"],b(w.prototype,n),Array.prototype.push.apply(e.keepProps,w.keepProps),w}),s(t,"masters/modules/coloraxis.src.js",[t["Core/Globals.js"],t["Core/Axis/Color/ColorAxis.js"]],function(e,i){return e.ColorAxis=e.ColorAxis||i,e.ColorAxis.compose(e.Chart,e.Fx,e.Legend,e.Series),e}),s(t,"Series/ColorMapComposition.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{column:{prototype:l}}=e.seriesTypes,{addEvent:a,defined:h}=r;return function(c){function g(u){let p=this.series,b=p.chart.renderer;this.moveToTopOnHover&&this.graphic&&(p.stateMarkerGraphic||(p.stateMarkerGraphic=new i(b,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),u?.state==="hover"?(this.graphic.attr({id:this.id}),p.stateMarkerGraphic.attr({href:`${b.url}#${this.id}`,visibility:"visible"})):p.stateMarkerGraphic.attr({href:""}))}c.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return this.value!==null&&this.value!==1/0&&this.value!==-1/0&&(this.value===void 0||!isNaN(this.value))}},c.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(u){let p={};return h(u.color)&&(!u.state||u.state==="normal")&&(p[this.colorProp||"fill"]=u.color),p},pointAttribs:l.pointAttribs},c.compose=function(u){return a(u.prototype.pointClass,"afterSetState",g),u}}(n||(n={})),n}),s(t,"Series/Heatmap/HeatmapPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{clamp:n,defined:l,extend:a,pick:h}=i;class c extends r{applyOptions(u,p){return(this.isNull||this.value===null)&&delete this.color,super.applyOptions(u,p),this.formatPrefix=this.isNull||this.value===null?"null":"point",this}getCellAttributes(){let u=this.series,p=u.options,b=(p.colsize||1)/2,v=(p.rowsize||1)/2,x=u.xAxis,m=u.yAxis,E=this.options.marker||u.options.marker,L=u.pointPlacementToXValue(),S=h(this.pointPadding,p.pointPadding,0),w={x1:n(Math.round(x.len-x.translate(this.x-b,!1,!0,!1,!0,-L)),-x.len,2*x.len),x2:n(Math.round(x.len-x.translate(this.x+b,!1,!0,!1,!0,-L)),-x.len,2*x.len),y1:n(Math.round(m.translate(this.y-v,!1,!0,!1,!0)),-m.len,2*m.len),y2:n(Math.round(m.translate(this.y+v,!1,!0,!1,!0)),-m.len,2*m.len)};for(let R of[["width","x"],["height","y"]]){let O=R[0],I=R[1],_=I+"1",P=I+"2",F=Math.abs(w[_]-w[P]),A=E&&E.lineWidth||0,D=Math.abs(w[_]+w[P])/2,C=E&&E[O];if(l(C)&&C"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}}),s(t,"Series/InterpolationUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{doc:r}=e,{defined:n,pick:l}=i;return{colorFromPoint:function(a,h){let c=h.series.colorAxis;if(c){let g=c.toColor(a||0,h).split(")")[0].split("(")[1].split(",").map(u=>l(parseFloat(u),parseInt(u,10)));return g[3]=255*l(g[3],1),n(a)&&h.visible||(g[3]=0),g}return[0,0,0,0]},getContext:function(a){let{canvas:h,context:c}=a;return h&&c?(c.clearRect(0,0,h.width,h.height),c):(a.canvas=r.createElement("canvas"),a.context=a.canvas.getContext("2d",{willReadFrequently:!0})||void 0,a.context)}}}),s(t,"Series/Heatmap/HeatmapSeries.js",[t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Series/Heatmap/HeatmapPoint.js"],t["Series/Heatmap/HeatmapSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"],t["Series/InterpolationUtilities.js"]],function(e,i,r,n,l,a,h,c){let{series:g,seriesTypes:{column:u,scatter:p}}=l,{prototype:{symbols:b}}=a,{addEvent:v,extend:x,fireEvent:m,isNumber:E,merge:L,pick:S}=h,{colorFromPoint:w,getContext:R}=c;class O extends p{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let _=this,P=_.options,F=P.interpolation,A=P.marker||{};if(F){let{image:D,chart:C,xAxis:d,yAxis:f}=_,{reversed:y=!1,len:M}=d,{reversed:k=!1,len:T}=f,z={width:M,height:T};if(!D||_.isDirtyData||_.isDirtyCanvas){let N=R(_),{canvas:G,options:{colsize:X=1,rowsize:j=1},points:B,points:{length:W}}=_,Y=C.colorAxis&&C.colorAxis[0];if(G&&N&&Y){let{min:U,max:q}=d.getExtremes(),{min:H,max:V}=f.getExtremes(),Z=q-U,K=V-H,J=Math.round(Z/X/8*8),tt=Math.round(K/j/8*8),[$,Q]=[[J,J/Z,y,"ceil"],[tt,tt/K,!k,"floor"]].map(([ot,at,ct,ht])=>ct?lt=>Math[ht](ot-at*lt):lt=>Math[ht](at*lt)),et=G.width=J+1,it=et*(G.height=tt+1),st=(W-1)/it,rt=new Uint8ClampedArray(4*it),nt=(ot,at)=>4*Math.ceil(et*Q(at-H)+$(ot-U));_.buildKDTree();for(let ot=0;ot{D.graphic&&(D.graphic[_.chart.styledMode?"css":"animate"](_.colorAttribs(D)),D.value===null&&D.graphic.addClass("highcharts-null-point"))}))}getExtremes(){let{dataMin:_,dataMax:P}=g.prototype.getExtremes.call(this,this.valueData);return E(_)&&(this.valueMin=_),E(P)&&(this.valueMax=P),g.prototype.getExtremes.call(this)}getValidPoints(_,P){return g.prototype.getValidPoints.call(this,_,P,!0)}hasData(){return!!this.processedXData.length}init(){super.init.apply(this,arguments);let _=this.options;_.pointRange=S(_.pointRange,_.colsize||1),this.yAxis.axisPointRange=_.rowsize||1,b.ellipse=b.circle,_.marker&&E(_.borderRadius)&&(_.marker.r=_.borderRadius)}markerAttribs(_,P){let F=_.shapeArgs||{};if(_.hasImage)return{x:_.plotX,y:_.plotY};if(P&&P!=="normal"){let A=_.options.marker||{},D=this.options.marker||{},C=D.states&&D.states[P]||{},d=A.states&&A.states[P]||{},f=(d.width||C.width||F.width||0)+(d.widthPlus||C.widthPlus||0),y=(d.height||C.height||F.height||0)+(d.heightPlus||C.heightPlus||0);return{x:(F.x||0)+((F.width||0)-f)/2,y:(F.y||0)+((F.height||0)-y)/2,width:f,height:y}}return F}pointAttribs(_,P){let F=g.prototype.pointAttribs.call(this,_,P),A=this.options||{},D=this.chart.options.plotOptions||{},C=D.series||{},d=D.heatmap||{},f=_&&_.options.borderColor||A.borderColor||d.borderColor||C.borderColor,y=_&&_.options.borderWidth||A.borderWidth||d.borderWidth||C.borderWidth||F["stroke-width"];if(F.stroke=_&&_.marker&&_.marker.lineColor||A.marker&&A.marker.lineColor||f||this.color,F["stroke-width"]=y,P&&P!=="normal"){let M=L(A.states&&A.states[P],A.marker&&A.marker.states&&A.marker.states[P],_&&_.options.states&&_.options.states[P]||{});F.fill=M.color||e.parse(F.fill).brighten(M.brightness||0).get(),F.stroke=M.lineColor||F.stroke}return F}translate(){let{borderRadius:_,marker:P}=this.options,F=P&&P.symbol||"rect",A=b[F]?F:"rect",D=["circle","square"].indexOf(A)!==-1;for(let C of(this.generatePoints(),this.points)){let d=C.getCellAttributes(),f=Math.min(d.x1,d.x2),y=Math.min(d.y1,d.y2),M=Math.max(Math.abs(d.x2-d.x1),0),k=Math.max(Math.abs(d.y2-d.y1),0);if(C.hasImage=(C.marker&&C.marker.symbol||F||"").indexOf("url")===0,D){let T=Math.abs(M-k);f=Math.min(d.x1,d.x2)+(M{"use strict";(function(o){typeof Wn=="object"&&Wn.exports?(o.default=o,Wn.exports=o):typeof define=="function"&&define.amd?define("highcharts/highcharts-3d",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Math3D.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{deg2rad:r}=e,{pick:n}=i;function l(c,g,u,p){let b=g.options.chart.options3d,v=n(p,!!u&&g.inverted),x={x:g.plotWidth/2,y:g.plotHeight/2,z:b.depth/2,vd:n(b.depth,1)*n(b.viewDistance,0)},m=g.scale3d||1,E=r*b.beta*(v?-1:1),L=r*b.alpha*(v?-1:1),S={cosA:Math.cos(L),cosB:Math.cos(-E),sinA:Math.sin(L),sinB:Math.sin(-E)};return u||(x.x+=g.plotLeft,x.y+=g.plotTop),c.map(function(w){var R,O,I;let _=(R=(v?w.y:w.x)-x.x,O=(v?w.x:w.y)-x.y,I=(w.z||0)-x.z,{x:S.cosB*R-S.sinB*I,y:-S.sinA*S.sinB*R+S.cosA*O-S.cosB*S.sinA*I,z:S.cosA*S.sinB*R+S.sinA*O+S.cosA*S.cosB*I}),P=a(_,x,x.vd);return P.x=P.x*m+x.x,P.y=P.y*m+x.y,P.z=_.z*m+x.z,{x:v?P.y:P.x,y:v?P.x:P.y,z:P.z}})}function a(c,g,u){let p=u>0&&u=0?0:360),C.beta=C.beta%360+(C.beta>=0?0:360));let d=this.inverted,f=this.clipBox,y=this.margin;f[d?"y":"x"]=-(y[3]||0),f[d?"x":"y"]=-(y[0]||0),f[d?"height":"width"]=this.chartWidth+(y[3]||0)+(y[1]||0),f[d?"width":"height"]=this.chartHeight+(y[0]||0)+(y[2]||0),this.scale3d=1,C.fitToPlot===!0&&(this.scale3d=this.chart3d.getScale(C.depth)),this.chart3d.frame3d=this.chart3d.get3dFrame()}}function O(){this.is3d()&&(this.isDirtyBox=!0)}function I(){this.chart3d&&this.is3d()&&(this.chart3d.frame3d=this.chart3d.get3dFrame())}function _(){this.chart3d||(this.chart3d=new D(this))}function P(C){return this.is3d()||C.apply(this,[].slice.call(arguments,1))}function F(C){let d,f=this.series.length;if(this.is3d())for(;f--;)(d=this.series[f]).translate(),d.render();else C.call(this)}function A(C){C.apply(this,[].slice.call(arguments,1)),this.is3d()&&(this.container.className+=" highcharts-3d-chart")}m.defaultOptions={chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,axisLabelPosition:null,frame:{visible:"default",size:1,bottom:{},top:{},left:{},right:{},back:{},front:{}}}}},m.compose=function(C,d){let f=C.prototype,y=d.prototype;f.is3d=function(){return!!this.options.chart.options3d?.enabled},f.propsRequireDirtyBox.push("chart.options3d"),f.propsRequireUpdateSeries.push("chart.options3d"),y.matrixSetter=function(){let M;if(this.pos<1&&(p(this.start)||p(this.end))){let k=this.start||[1,0,0,1,0,0],T=this.end||[1,0,0,1,0,0];M=[];for(let z=0;z<6;z++)M.push(this.pos*T[z]+(1-this.pos)*k[z])}else M=this.end;this.elem.attr(this.prop,M,null,!0)},b(!0,h,m.defaultOptions),u(C,"init",_),u(C,"addSeries",E),u(C,"afterDrawChartBox",L),u(C,"afterGetContainer",S),u(C,"afterInit",w),u(C,"afterSetChartSize",R),u(C,"beforeRedraw",O),u(C,"beforeRender",I),x(f,"isInsidePlot",P),x(f,"renderSeries",F),x(f,"setClassName",A)};class D{constructor(d){this.chart=d}get3dFrame(){let d=this.chart,f=d.options.chart.options3d,y=f.frame,M=d.plotLeft,k=d.plotLeft+d.plotWidth,T=d.plotTop,z=d.plotTop+d.plotHeight,N=f.depth,G=function(tt){let $=g(tt,d);return $>.5?1:$<-.5?-1:0},X=G([{x:M,y:z,z:N},{x:k,y:z,z:N},{x:k,y:z,z:0},{x:M,y:z,z:0}]),j=G([{x:M,y:T,z:0},{x:k,y:T,z:0},{x:k,y:T,z:N},{x:M,y:T,z:N}]),B=G([{x:M,y:T,z:0},{x:M,y:T,z:N},{x:M,y:z,z:N},{x:M,y:z,z:0}]),W=G([{x:k,y:T,z:N},{x:k,y:T,z:0},{x:k,y:z,z:0},{x:k,y:z,z:N}]),Y=G([{x:M,y:z,z:0},{x:k,y:z,z:0},{x:k,y:T,z:0},{x:M,y:T,z:0}]),U=G([{x:M,y:T,z:N},{x:k,y:T,z:N},{x:k,y:z,z:N},{x:M,y:z,z:N}]),q=!1,H=!1,V=!1,Z=!1;[].concat(d.xAxis,d.yAxis,d.zAxis).forEach(function(tt){tt&&(tt.horiz?tt.opposite?H=!0:q=!0:tt.opposite?Z=!0:V=!0)});let K=function(tt,$,Q){let et=["size","color","visible"],it={};for(let rt=0;rt0),{size:v(it.size,1),color:v(it.color,"none"),frontFacing:$>0,visible:st}},J={axes:{},bottom:K([y.bottom,y.top,y],X,q),top:K([y.top,y.bottom,y],j,H),left:K([y.left,y.right,y.side,y],B,V),right:K([y.right,y.left,y.side,y],W,Z),back:K([y.back,y.front,y],U,!0),front:K([y.front,y.back,y],Y,!1)};if(f.axisLabelPosition==="auto"){let tt=function(nt,ot){return nt.visible!==ot.visible||nt.visible&&ot.visible&&nt.frontFacing!==ot.frontFacing},$=[];tt(J.left,J.front)&&$.push({y:(T+z)/2,x:M,z:0,xDir:{x:1,y:0,z:0}}),tt(J.left,J.back)&&$.push({y:(T+z)/2,x:M,z:N,xDir:{x:0,y:0,z:-1}}),tt(J.right,J.front)&&$.push({y:(T+z)/2,x:k,z:0,xDir:{x:0,y:0,z:1}}),tt(J.right,J.back)&&$.push({y:(T+z)/2,x:k,z:N,xDir:{x:-1,y:0,z:0}});let Q=[];tt(J.bottom,J.front)&&Q.push({x:(M+k)/2,y:z,z:0,xDir:{x:1,y:0,z:0}}),tt(J.bottom,J.back)&&Q.push({x:(M+k)/2,y:z,z:N,xDir:{x:-1,y:0,z:0}});let et=[];tt(J.top,J.front)&&et.push({x:(M+k)/2,y:T,z:0,xDir:{x:1,y:0,z:0}}),tt(J.top,J.back)&&et.push({x:(M+k)/2,y:T,z:N,xDir:{x:-1,y:0,z:0}});let it=[];tt(J.bottom,J.left)&&it.push({z:(0+N)/2,y:z,x:M,xDir:{x:0,y:0,z:-1}}),tt(J.bottom,J.right)&&it.push({z:(0+N)/2,y:z,x:k,xDir:{x:0,y:0,z:1}});let st=[];tt(J.top,J.left)&&st.push({z:(0+N)/2,y:T,x:M,xDir:{x:0,y:0,z:-1}}),tt(J.top,J.right)&&st.push({z:(0+N)/2,y:T,x:k,xDir:{x:0,y:0,z:1}});let rt=function(nt,ot,at){if(nt.length===0)return null;if(nt.length===1)return nt[0];let ct=c(nt,d,!1),ht=0;for(let lt=1;ltat*ct[ht][ot]||at*ct[lt][ot]==at*ct[ht][ot]&&ct[lt].zG.minX&&(j=Math.min(j,1-Math.abs((y+z)/(G.minX+z))%1)),MG.minY&&(j=G.minY<0?Math.min(j,(k+N)/(-G.minY+k+N)):Math.min(j,1-(k+N)/(G.minY+N)%1)),T({plotX:w.x,plotY:w.y,plotZ:w.z})),this.group&&L&&L.depth&&L.beta&&(this.markerGroup&&(this.markerGroup.add(this.group),this.markerGroup.attr({translateX:0,translateY:0})),this.group.attr({zIndex:Math.max(1,L.beta>270||L.beta<90?L.depth-Math.round(this.zPadding||0):Math.round(this.zPadding||0))})),E.reversed=!0;let S=v.call(this,E,!0,!0);if(S[0]&&S[0][0]==="M"&&(S[0]=["L",S[0][1],S[0][2]]),this.areaPath){let w=this.areaPath.splice(0,this.areaPath.length/2).concat(S);w.xMap=this.areaPath.xMap,this.areaPath=w}return this.graphPath=b,b}return{compose:function(p){c(l,"Area3DSeries")&&g(p.prototype,"getGraphPath",u)}}}),s(t,"Core/Axis/Axis3DDefaults.js",[],function(){return{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}}}),s(t,"Core/Axis/Tick3DComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{composed:r}=e,{addEvent:n,extend:l,pushUnique:a,wrap:h}=i;function c(u){let p=this.axis.axis3D;p&&l(u.pos,p.fix3dPosition(u.pos))}function g(u){let p=this.axis.axis3D,b=u.apply(this,[].slice.call(arguments,1));if(p){let v=b[0],x=b[1];if(v[0]==="M"&&x[0]==="L"){let m=[p.fix3dPosition({x:v[1],y:v[2],z:0}),p.fix3dPosition({x:x[1],y:x[2],z:0})];return this.axis.chart.renderer.toLineSegments(m)}}return b}return{compose:function(u){a(r,"Axis.Tick3D")&&(n(u,"afterGetLabelPosition",c),h(u.prototype,"getMarkPath",g))}}}),s(t,"Core/Axis/Axis3DComposition.js",[t["Core/Axis/Axis3DDefaults.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Axis/Tick3DComposition.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{defaultOptions:h}=i,{deg2rad:c}=r,{perspective:g,perspective3D:u,shapeArea:p}=n,{addEvent:b,merge:v,pick:x,wrap:m}=a;function E(){let F=this.chart,A=this.options;F.is3d&&F.is3d()&&this.coll!=="colorAxis"&&(A.tickWidth=x(A.tickWidth,0),A.gridLineWidth=x(A.gridLineWidth,1))}function L(F){this.chart.is3d()&&this.coll!=="colorAxis"&&F.point&&(F.point.crosshairPos=this.isXAxis?F.point.axisXpos:this.len-F.point.axisYpos)}function S(){this.axis3D||(this.axis3D=new P(this))}function w(F){return this.chart.is3d()&&this.coll!=="colorAxis"?[]:F.apply(this,[].slice.call(arguments,1))}function R(F){if(!this.chart.is3d()||this.coll==="colorAxis")return F.apply(this,[].slice.call(arguments,1));let A=arguments,D=A[1],C=A[2],d=[],f=this.getPlotLinePath({value:D}),y=this.getPlotLinePath({value:C});if(f&&y)for(let M=0;Mp(g([A,{x:A.x+W.x,y:A.y+W.y,z:A.z+W.z},{x:A.x+Y.x,y:A.y+Y.y,z:A.z+Y.z}],C.chart))&&(W={x:-W.x,y:-W.y,z:-W.z});let H=g([{x:A.x,y:A.y,z:A.z},{x:A.x+W.x,y:A.y+W.y,z:A.z+W.z},{x:A.x+Y.x,y:A.y+Y.y,z:A.z+Y.z}],C.chart);q.matrix=[H[1].x-H[0].x,H[1].y-H[0].y,H[2].x-H[0].x,H[2].y-H[0].y,q.x,q.y],q.matrix[4]-=q.x*q.matrix[0]+q.y*q.matrix[2],q.matrix[5]-=q.x*q.matrix[1]+q.y*q.matrix[3]}return q}swapZ(A,D){let C=this.axis;if(C.isZAxis){let d=D?0:C.chart.plotLeft;return{x:d+A.z,y:A.y,z:A.x-d}}return A}}return P}),s(t,"Core/Series/Series3D.js",[t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{composed:l}=e,{perspective:a}=i,{addEvent:h,extend:c,isNumber:g,merge:u,pick:p,pushUnique:b}=n;class v extends r{static compose(m){b(l,"Core.Series3D")&&(h(m,"afterTranslate",function(){this.chart.is3d()&&this.translate3dPoints()}),c(m.prototype,{translate3dPoints:v.prototype.translate3dPoints}))}translate3dPoints(){let m,E,L=this,S=L.options,w=L.chart,R=p(L.zAxis,w.options.zAxis[0]),O=[],I=[],_=S.stacking?g(S.stack)?S.stack:0:L.index||0;L.zPadding=_*(S.depth||0+(S.groupZPadding||1)),L.data.forEach(F=>{R&&R.translate?(E=R.logarithmic&&R.val2lin?R.val2lin(F.z):F.z,F.plotZ=R.translate(E),F.isInside=!!F.isInside&&E>=R.min&&E<=R.max):F.plotZ=L.zPadding,F.axisXpos=F.plotX,F.axisYpos=F.plotY,F.axisZpos=F.plotZ,O.push({x:F.plotX,y:F.plotY,z:F.plotZ}),I.push(F.plotX||0)}),L.rawPointsX=I;let P=a(O,w,!0);L.data.forEach((F,A)=>{m=P[A],F.plotX=m.x,F.plotY=m.y,F.plotZ=m.z})}}return v.defaultOptions=u(r.defaultOptions),v}),s(t,"Core/Renderer/SVG/SVGElement3D.js",[t["Core/Color/Color.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{parse:n}=e,{Element:l}=i.getRendererType().prototype,{defined:a,pick:h}=r;class c extends l{constructor(){super(...arguments),this.parts=["front","top","side"],this.pathType="cuboid"}initArgs(u){let p=this.renderer,b=p[this.pathType+"Path"](u),v=b.zIndexes;for(let x of this.parts){let m={class:"highcharts-3d-"+x,zIndex:v[x]||0};p.styledMode&&(x==="top"?m.filter="url(#highcharts-brighter)":x==="side"&&(m.filter="url(#highcharts-darker)")),this[x]=p.path(b[x]).attr(m).add(this)}this.attr({"stroke-linejoin":"round",zIndex:v.group}),this.forcedSides=b.forcedSides}singleSetterForParts(u,p,b,v,x,m){let E={},L=[null,null,v||"attr",x,m],S=b&&b.zIndexes;if(b){for(let w of(S&&S.group&&this.attr({zIndex:S.group}),Object.keys(b)))E[w]={},E[w][u]=b[w],S&&(E[w].zIndex=b.zIndexes[w]||0);L[1]=E}else E[u]=p,L[0]=E;return this.processParts.apply(this,L)}processParts(u,p,b,v,x){for(let m of this.parts)p&&(u=h(p[m],!1)),u!==!1&&this[m][b](u,v,x);return this}destroy(){return this.processParts(null,null,"destroy"),super.destroy()}attr(u,p,b,v){if(typeof u=="string"&&p!==void 0){let x=u;(u={})[x]=p}return u.shapeArgs||a(u.x)?this.singleSetterForParts("d",null,this.renderer[this.pathType+"Path"](u.shapeArgs||u)):super.attr(u,void 0,b,v)}animate(u,p,b){if(a(u.x)&&a(u.y)){let v=this.renderer[this.pathType+"Path"](u),x=v.forcedSides;this.singleSetterForParts("d",null,v,"animate",p,b),this.attr({zIndex:v.zIndexes.group}),x===this.forcedSides||(this.forcedSides=x,this.renderer.styledMode||this.fillSetter(this.fill))}else super.animate(u,p,b);return this}fillSetter(u){return this.forcedSides=this.forcedSides||[],this.singleSetterForParts("fill",null,{front:u,top:n(u).brighten(this.forcedSides.indexOf("top")>=0?0:.1).get(),side:n(u).brighten(this.forcedSides.indexOf("side")>=0?0:-.1).get()}),this.color=this.fill=u,this}}return c.types={base:c,cuboid:c},c}),s(t,"Core/Renderer/SVG/SVGRenderer3D.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Renderer/SVG/SVGElement3D.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){var h;let{animObject:c}=e,{parse:g}=i,{charts:u,deg2rad:p}=r,{perspective:b,shapeArea:v}=n,{defined:x,extend:m,merge:E,pick:L}=a,S=Math.cos,w=Math.sin,R=Math.PI,O=4*(Math.sqrt(2)-1)/3/(R/2);function I(_,P,F,A,D,C,d,f){let y=C-D,M=[];return C>D&&C-D>Math.PI/2+1e-4?M=(M=M.concat(I(_,P,F,A,D,D+Math.PI/2,d,f))).concat(I(_,P,F,A,D+Math.PI/2,C,d,f)):CMath.PI/2+1e-4?M=(M=M.concat(I(_,P,F,A,D,D-Math.PI/2,d,f))).concat(I(_,P,F,A,D-Math.PI/2,C,d,f)):[["C",_+F*Math.cos(D)-F*O*y*Math.sin(D)+d,P+A*Math.sin(D)+A*O*y*Math.cos(D)+f,_+F*Math.cos(C)+F*O*y*Math.sin(C)+d,P+A*Math.sin(C)-A*O*y*Math.cos(C)+f,_+F*Math.cos(C)+d,P+A*Math.sin(C)+f]]}return function(_){function P(k,T){let z=[];for(let N of k)z.push(["L",N.x,N.y]);return k.length&&(z[0][0]="M",T&&z.push(["Z"])),z}function F(k){let T=[],z=!0;for(let N of k)T.push(z?["M",N.x,N.y]:["L",N.x,N.y]),z=!z;return T}function A(k){let T=this,z=T.Element.prototype,N=T.createElement("path");return N.vertexes=[],N.insidePlotArea=!1,N.enabled=!0,N.attr=function(G){if(typeof G=="object"&&(x(G.enabled)||x(G.vertexes)||x(G.insidePlotArea))){this.enabled=L(G.enabled,this.enabled),this.vertexes=L(G.vertexes,this.vertexes),this.insidePlotArea=L(G.insidePlotArea,this.insidePlotArea),delete G.enabled,delete G.vertexes,delete G.insidePlotArea;let X=u[T.chartIndex],j=b(this.vertexes,X,this.insidePlotArea),B=T.toLinePath(j,!0),W=v(j);G.d=B,G.visibility=this.enabled&&W>0?"inherit":"hidden"}return z.attr.apply(this,arguments)},N.animate=function(G){if(typeof G=="object"&&(x(G.enabled)||x(G.vertexes)||x(G.insidePlotArea))){this.enabled=L(G.enabled,this.enabled),this.vertexes=L(G.vertexes,this.vertexes),this.insidePlotArea=L(G.insidePlotArea,this.insidePlotArea),delete G.enabled,delete G.vertexes,delete G.insidePlotArea;let X=u[T.chartIndex],j=b(this.vertexes,X,this.insidePlotArea),B=T.toLinePath(j,!0),W=v(j),Y=this.enabled&&W>0?"visible":"hidden";G.d=B,this.attr("visibility",Y)}return z.animate.apply(this,arguments)},N.attr(k)}function D(k){let T=this,z=T.Element.prototype,N=T.g(),G=N.destroy;return this.styledMode||N.attr({"stroke-linejoin":"round"}),N.faces=[],N.destroy=function(){for(let X=0;XX.faces.length;)N.faces.pop().destroy();for(;N.faces.lengthX.faces.length;)N.faces.pop().destroy();for(;N.faces.lengthG===0&&st>1&&st<6?{x:H[st].x,y:H[st].y+10,z:H[st].z}:H[0].x===H[7].x&&st>=4?{x:H[st].x+10,y:H[st].y,z:H[st].z}:j===0&&st<2||st>5?{x:H[st].x,y:H[st].y,z:H[st].z+10}:H[st],Z=st=>H[st],K=(st,rt,nt)=>{let ot=st.map(Z),at=rt.map(Z),ct=st.map(V),ht=rt.map(V),lt=[[],-1];return 0>v(ot)?lt=[ot,0]:0>v(at)?lt=[at,1]:nt&&(Y.push(nt),lt=0>v(ct)?[ot,0]:0>v(ht)?[at,1]:[ot,0]),lt},J=(U=K([3,2,1,0],[7,6,5,4],"front"))[0],tt=U[1],$=(U=K([1,6,7,0],[4,5,2,3],"top"))[0],Q=U[1],et=(U=K([1,2,5,6],[0,7,4,3],"side"))[0],it=U[1];return it===1?q+=1e6*(B.plotWidth-T):it||(q+=1e6*T),q+=10*(!Q||W>=0&&W<=180||W<360&&W>357.5?B.plotHeight-z:10+z),tt===1?q+=100*N:tt||(q+=100*(1e3-N)),{front:this.toLinePath(J,!0),top:this.toLinePath($,!0),side:this.toLinePath(et,!0),zIndexes:{group:Math.round(q)},forcedSides:Y,isFront:tt,isTop:Q}}function y(k){let T=this.g(),z=this.Element.prototype,N=["x","y","r","innerR","start","end","depth"];function G(X){let j={},B=!1,W;for(W in X=E(X))N.indexOf(W)!==-1&&(j[W]=X[W],delete X[W],B=!0);return!!B&&[j,X]}for(let X of((k=E(k)).alpha=(k.alpha||0)*p,k.beta=(k.beta||0)*p,T.top=this.path(),T.side1=this.path(),T.side2=this.path(),T.inn=this.path(),T.out=this.path(),T.onAdd=function(){let j=T.parentGroup,B=T.attr("class");for(let W of(T.top.add(T),["out","inn","side1","side2"]))T[W].attr({class:B+" highcharts-3d-side"}).add(j)},["addClass","removeClass"]))T[X]=function(){let j=arguments;for(let B of["top","out","inn","side1","side2"])T[B][X].apply(T[B],j)};for(let X of(T.setPaths=function(j){let B=T.renderer.arc3dPath(j),W=100*B.zTop;T.attribs=j,T.top.attr({d:B.top,zIndex:B.zTop}),T.inn.attr({d:B.inn,zIndex:B.zInn}),T.out.attr({d:B.out,zIndex:B.zOut}),T.side1.attr({d:B.side1,zIndex:B.zSide1}),T.side2.attr({d:B.side2,zIndex:B.zSide2}),T.zIndex=W,T.attr({zIndex:W}),j.center&&(T.top.setRadialReference(j.center),delete j.center)},T.setPaths(k),T.fillSetter=function(j){let B=g(j).brighten(-.1).get();return this.fill=j,this.side1.attr({fill:B}),this.side2.attr({fill:B}),this.inn.attr({fill:B}),this.out.attr({fill:B}),this.top.attr({fill:j}),this},["opacity","translateX","translateY","visibility"]))T[X+"Setter"]=function(j,B){for(let W of(T[B]=j,["out","inn","side1","side2","top"]))T[W].attr(B,j)};return T.attr=function(X){let j,B;return typeof X=="object"&&(B=G(X))&&(j=B[0],arguments[0]=B[1],m(T.attribs,j),T.setPaths(T.attribs)),z.attr.apply(T,arguments)},T.animate=function(X,j,B){let W,Y,U=this.attribs,q="data-"+Math.random().toString(26).substring(2,9);delete X.center,delete X.z,delete X.alpha,delete X.beta;let H=c(L(j,this.renderer.globalAnimation));return H.duration&&(W=G(X),T[q]=0,X[q]=1,T[q+"Setter"]=r.noop,W&&(Y=W[0],H.step=function(V,Z){let K=J=>U[J]+(L(Y[J],U[J])-U[J])*Z.pos;Z.prop===q&&Z.elem.setPaths(E(U,{x:K("x"),y:K("y"),r:K("r"),innerR:K("innerR"),start:K("start"),end:K("end"),depth:K("depth")}))}),j=H),z.animate.call(this,X,j,B)},T.destroy=function(){return this.top.destroy(),this.out.destroy(),this.inn.destroy(),this.side1.destroy(),this.side2.destroy(),z.destroy.call(this)},T.hide=function(){this.top.hide(),this.out.hide(),this.inn.hide(),this.side1.hide(),this.side2.hide()},T.show=function(X){this.top.show(X),this.out.show(X),this.inn.show(X),this.side1.show(X),this.side2.show(X)},T}function M(k){let T=k.x||0,z=k.y||0,N=k.start||0,G=(k.end||0)-1e-5,X=k.r||0,j=k.innerR||0,B=k.depth||0,W=k.alpha||0,Y=k.beta||0,U=Math.cos(N),q=Math.sin(N),H=Math.cos(G),V=Math.sin(G),Z=X*Math.cos(Y),K=X*Math.cos(W),J=j*Math.cos(Y),tt=j*Math.cos(W),$=B*Math.sin(Y),Q=B*Math.sin(W),et=[["M",T+Z*U,z+K*q]];(et=et.concat(I(T,z,Z,K,N,G,0,0))).push(["L",T+J*H,z+tt*V]),(et=et.concat(I(T,z,J,tt,G,N,0,0))).push(["Z"]);let it=Y>0?Math.PI/2:0,st=W>0?0:Math.PI/2,rt=N>-it?N:G>-it?-it:N,nt=Got&&NR-st&&NMath.PI&&(ee=2*Math.PI-ee),ee}wt=ft(wt),dt=ft(dt);let Tt=1e5*(Ct=ft(Ct)),zt=1e5*dt,pe=1e5*wt;return{top:et,zTop:1e5*Math.PI+1,out:at,zOut:Math.max(Tt,zt,pe),inn:ct,zInn:Math.max(Tt,zt,pe),side1:ht,zSide1:.99*pe,side2:lt,zSide2:.99*zt}}_.compose=function(k){let T=k.prototype;T.element3d||m(T,{Element3D:l,arc3d:y,arc3dPath:M,cuboid:d,cuboidPath:f,element3d:C,face3d:A,polyhedron:D,toLinePath:P,toLineSegments:F})}}(h||(h={})),h}),s(t,"Core/Axis/ZAxis.js",[t["Core/Axis/Axis.js"],t["Core/Defaults.js"],t["Core/Utilities.js"]],function(e,i,r){let{defaultOptions:n}=i,{addEvent:l,merge:a,pick:h,splat:c}=r;function g(b){return new p(this,b)}function u(){let b=this.options.zAxis=c(this.options.zAxis||{});this.is3d()&&(this.zAxis=[],b.forEach(v=>{this.addZAxis(v).setScale()}))}class p extends e{constructor(){super(...arguments),this.isZAxis=!0}static compose(v){let x=v.prototype;x.addZAxis||(n.zAxis=a(n.xAxis,{offset:0,lineWidth:0}),x.addZAxis=g,x.collectionsWithInit.zAxis=[x.addZAxis],x.collectionsWithUpdate.push("zAxis"),l(v,"afterGetAxes",u))}init(v,x){this.isZAxis=!0,super.init(v,x,"zAxis")}getSeriesExtremes(){this.hasVisibleSeries=!1,this.dataMin=this.dataMax=this.ignoreMinPadding=this.ignoreMaxPadding=void 0,this.stacking&&this.stacking.buildStacks(),this.series.forEach(v=>{if(v.reserveSpace()){let x=v.options.threshold;this.hasVisibleSeries=!0,this.positiveValuesOnly&&x<=0&&(x=void 0);let m=v.zData;m.length&&(this.dataMin=Math.min(h(this.dataMin,m[0]),Math.min.apply(null,m)),this.dataMax=Math.max(h(this.dataMax,m[0]),Math.max.apply(null,m)))}})}setAxisSize(){let v=this.chart;super.setAxisSize(),this.width=this.len=v.options.chart.options3d&&v.options.chart.options3d.depth||0,this.right=v.chartWidth-this.width-this.left}}return p}),s(t,"Series/Column3D/Column3DComposition.js",[t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Utilities.js"]],function(e,i,r){let{composed:n}=e,{perspective:l}=i,{addEvent:a,extend:h,pick:c,pushUnique:g,wrap:u}=r;function p(){let _=this.chart,P=this.options,F=P.depth,A=(P.stacking?P.stack||0:this.index)*(F+(P.groupZPadding||1)),D=this.borderWidth%2?.5:0,C;for(let d of(_.inverted&&!this.yAxis.reversed&&(D*=-1),P.grouping!==!1&&(A=0),A+=P.groupZPadding||1,this.points))if(d.outside3dPlot=null,d.y!==null){let f,y=h({x:0,y:0,width:0,height:0},d.shapeArgs||{}),M=[["x","width"],["y","height"]],k=d.tooltipPos;for(let T of M)if((f=y[T[0]]-D)<0&&(y[T[1]]+=y[T[0]]+D,y[T[0]]=-D,f=0),f+y[T[1]]>this[T[0]+"Axis"].len&&y[T[1]]!==0&&(y[T[1]]=this[T[0]+"Axis"].len-y[T[0]]),y[T[1]]!==0&&(y[T[0]]>=this[T[0]+"Axis"].len||y[T[0]]+y[T[1]]<=D)){for(let z in y)y[z]=z==="y"?-9999:0;d.outside3dPlot=!0}if(d.shapeType==="roundedRect"&&(d.shapeType="cuboid"),d.shapeArgs=h(y,{z:A,depth:F,insidePlotArea:!0}),C={x:y.x+y.width/2,y:y.y,z:A+F/2},_.inverted&&(C.x=y.height,C.y=d.clientX||0),d.axisXpos=C.x,d.axisYpos=C.y,d.axisZpos=C.z,d.plot3d=l([C],_,!0,!1)[0],k){let T=l([{x:k[0],y:k[1],z:A+F/2}],_,!0,!1)[0];d.tooltipPos=[T.x,T.y]}}this.z=A}function b(){if(this.chart.is3d()){let _=this.options,P=_.grouping,F=_.stacking,A=this.yAxis.options.reversedStacks,D=0;if(!(P!==void 0&&!P)){let C,d=function(y,M){let k=y.series,T={totalStacks:0},z,N=1;return k.forEach(function(G){T[z=c(G.options.stack,M?0:k.length-1-G.index)]?T[z].series.push(G):(T[z]={series:[G],position:N},N++)}),T.totalStacks=N+1,T}(this.chart,F),f=_.stack||0;for(C=0;C=90&&y.alpha<=270&&(k.y+=P.shapeArgs.width)),k=l([k],C,!0,!1)[0],D.x=k.x-M,D.y=P.outside3dPlot?-9e9:k.y}_.apply(this,[].slice.call(arguments,1))}function O(_){return!arguments[2].outside3dPlot&&_.apply(this,[].slice.call(arguments,1))}function I(_,P){let F=_.apply(this,[].slice.call(arguments,1)),A=this.axis.chart,{width:D}=P;if(A.is3d()&&this.base){let C=+this.base.split(",")[0],d=A.series[C],f=A.options.chart.options3d;if(d&&d.type==="column"){let y={x:F.x+(A.inverted?F.height:D/2),y:F.y,z:d.options.depth/2};A.inverted&&(F.width=0,f.alpha>=90&&f.alpha<=270&&(y.y+=D)),y=l([y],A,!0,!1)[0],F.x=y.x-D/2,F.y=y.y}}return F}return{compose:function(_,P){if(g(n,"Column3D")){let F=_.prototype,A=P.prototype,{column:D,columnRange:C}=_.types;if(u(F,"alignDataLabel",R),u(F,"justifyDataLabel",O),u(A,"getStackBox",I),D){let d=D.prototype,f=d.pointClass.prototype;d.translate3dPoints=()=>{},d.translate3dShapes=p,a(d,"afterInit",b),u(f,"hasNewShapeType",v),u(d,"animate",x),u(d,"plotGroup",m),u(d,"pointAttribs",E),u(d,"setState",L),u(d,"setVisible",S),u(d,"translate",w)}if(C){let d=C.prototype;u(d.pointClass.prototype,"hasNewShapeType",v),u(d,"plotGroup",m),u(d,"pointAttribs",E),u(d,"setState",L),u(d,"setVisible",S)}}}}}),s(t,"Series/Pie3D/Pie3DPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{pie:{prototype:{pointClass:i}}}=e.seriesTypes;return class extends i{haloPath(){return this.series?.chart.is3d()?[]:super.haloPath.apply(this,arguments)}}}),s(t,"Series/Pie3D/Pie3DSeries.js",[t["Core/Globals.js"],t["Series/Pie3D/Pie3DPoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{composed:l,deg2rad:a}=e,{pie:h}=r.seriesTypes,{extend:c,pick:g,pushUnique:u}=n;class p extends h{static compose(v){u(l,"Pie3D")&&(v.types.pie=p)}addPoint(){super.addPoint.apply(this,arguments),this.chart.is3d()&&this.update(this.userOptions,!0)}animate(v){if(this.chart.is3d()){let x=this.center,m=this.group,E=this.markerGroup,L=this.options.animation,S;L===!0&&(L={}),v?(m.oldtranslateX=g(m.oldtranslateX,m.translateX),m.oldtranslateY=g(m.oldtranslateY,m.translateY),S={translateX:x[0],translateY:x[1],scaleX:.001,scaleY:.001},m.attr(S),E&&(E.attrSetters=m.attrSetters,E.attr(S))):(S={translateX:m.oldtranslateX,translateY:m.oldtranslateY,scaleX:1,scaleY:1},m.animate(S,L),E&&E.animate(S,L))}else super.animate.apply(this,arguments)}getDataLabelPosition(v,x){let m=super.getDataLabelPosition(v,x);if(this.chart.is3d()){let E=this.chart.options.chart.options3d,L=v.shapeArgs,S=L.r,w=(L.alpha||E?.alpha)*a,R=(L.beta||E?.beta)*a,O=(L.start+L.end)/2,I=m.connectorPosition,_=-S*(1-Math.cos(w))*Math.sin(O),P=S*(Math.cos(R)-1)*Math.cos(O);for(let F of[m?.natural,I.breakAt,I.touchingSliceAt])F.x+=P,F.y+=_}return m}pointAttribs(v){let x=super.pointAttribs.apply(this,arguments),m=this.options;return this.chart.is3d()&&!this.chart.styledMode&&(x.stroke=m.edgeColor||v.color||this.color,x["stroke-width"]=g(m.edgeWidth,1)),x}translate(){if(super.translate.apply(this,arguments),!this.chart.is3d())return;let v=this.options,x=v.depth||0,m=this.chart.options.chart.options3d,E=m.alpha,L=m.beta,S=v.stacking?(v.stack||0)*x:this._i*x;for(let w of(S+=x/2,v.grouping!==!1&&(S=0),this.points)){let R=w.shapeArgs;w.shapeType="arc3d",R.z=S,R.depth=.75*x,R.alpha=E,R.beta=L,R.center=this.center;let O=(R.end+R.start)/2;w.slicedTranslation={translateX:Math.round(Math.cos(O)*v.slicedOffset*Math.cos(E*a)),translateY:Math.round(Math.sin(O)*v.slicedOffset*Math.cos(E*a))}}}drawTracker(){if(super.drawTracker.apply(this,arguments),this.chart.is3d()){for(let v of this.points)if(v.graphic)for(let x of["out","inn","side1","side2"])v.graphic&&(v.graphic[x].element.point=v)}}}return c(p.prototype,{pointClass:i}),p}),s(t,"Series/Scatter3D/Scatter3DPoint.js",[t["Series/Scatter/ScatterSeries.js"],t["Core/Utilities.js"]],function(e,i){let{pointClass:r}=e.prototype,{defined:n}=i;return class extends r{applyOptions(){return super.applyOptions.apply(this,arguments),n(this.z)||(this.z=0),this}}}),s(t,"Series/Scatter3D/Scatter3DSeriesDefaults.js",[],function(){return{tooltip:{pointFormat:"x: {point.x}
y: {point.y}
z: {point.z}
"}}}),s(t,"Series/Scatter3D/Scatter3DSeries.js",[t["Core/Math3D.js"],t["Series/Scatter3D/Scatter3DPoint.js"],t["Series/Scatter3D/Scatter3DSeriesDefaults.js"],t["Series/Scatter/ScatterSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{pointCameraDistance:h}=e,{extend:c,merge:g}=a;class u extends n{pointAttribs(b){let v=super.pointAttribs.apply(this,arguments);return this.chart.is3d()&&b&&(v.zIndex=h(b,this.chart)),v}}return u.defaultOptions=g(n.defaultOptions,r),c(u.prototype,{axisTypes:["xAxis","yAxis","zAxis"],directTouch:!0,parallelArrays:["x","y","z"],pointArrayMap:["x","y","z"],pointClass:i}),l.registerSeriesType("scatter3d",u),u}),s(t,"masters/highcharts-3d.src.js",[t["Core/Globals.js"],t["Core/Chart/Chart3D.js"],t["Series/Area3D/Area3DSeries.js"],t["Core/Axis/Axis3DComposition.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Series/Series3D.js"],t["Core/Axis/Stacking/StackItem.js"],t["Core/Renderer/SVG/SVGRenderer3D.js"],t["Core/Axis/ZAxis.js"],t["Series/Column3D/Column3DComposition.js"],t["Series/Pie3D/Pie3DSeries.js"]],function(e,i,r,n,l,a,h,c,g,u,p){return r.compose(e.seriesTypes.area),n.compose(e.Axis,e.Tick),i.compose(e.Chart,e.Fx),u.compose(e.Series,h),p.compose(e.Series),a.compose(e.Series),c.compose(l.getRendererType()),g.compose(e.Chart),e})})});var Au=qe((RT,Yn)=>{"use strict";(function(o){typeof Yn=="object"&&Yn.exports?(o.default=o,Yn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Chart/ChartNavigationComposition.js",[],function(){var e;return function(i){i.compose=function(n){return n.navigation||(n.navigation=new r(n)),n};class r{constructor(l){this.updates=[],this.chart=l}addUpdate(l){this.chart.navigation.updates.push(l)}update(l,a){this.updates.forEach(h=>{h.call(this.chart,l,a)})}}i.Additions=r}(e||(e={})),e}),s(t,"Extensions/Exporting/ExportingDefaults.js",[t["Core/Globals.js"]],function(e){let{isTouchDevice:i}=e;return{exporting:{allowTableSorting:!0,type:"image/png",url:"https://export.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadPDF","downloadSVG"]}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen&&this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:3,height:28,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:i?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}}}),s(t,"Extensions/Exporting/ExportingSymbols.js",[],function(){var e;return function(i){let r=[];function n(a,h,c,g){return[["M",a,h+2.5],["L",a+c,h+2.5],["M",a,h+g/2+.5],["L",a+c,h+g/2+.5],["M",a,h+g-1.5],["L",a+c,h+g-1.5]]}function l(a,h,c,g){let u=g/3-2;return[].concat(this.circle(c-u,h,u,u),this.circle(c-u,h+u+4,u,u),this.circle(c-u,h+2*(u+4),u,u))}i.compose=function(a){if(r.indexOf(a)===-1){r.push(a);let h=a.prototype.symbols;h.menu=n,h.menuball=l.bind(h)}}}(e||(e={})),e}),s(t,"Extensions/Exporting/Fullscreen.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r){let{composed:n}=i,{addEvent:l,fireEvent:a,pushUnique:h}=r;function c(){this.fullscreen=new g(this)}class g{static compose(p){h(n,"Fullscreen")&&l(p,"beforeRender",c)}constructor(p){this.chart=p,this.isOpen=!1;let b=p.renderTo;!this.browserProps&&(typeof b.requestFullscreen=="function"?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:b.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:b.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:b.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let p=this,b=p.chart,v=b.options.chart;a(b,"fullscreenClose",null,function(){p.isOpen&&p.browserProps&&b.container.ownerDocument instanceof Document&&b.container.ownerDocument[p.browserProps.exitFullscreen](),p.unbindFullscreenEvent&&(p.unbindFullscreenEvent=p.unbindFullscreenEvent()),b.setSize(p.origWidth,p.origHeight,!1),p.origWidth=void 0,p.origHeight=void 0,v.width=p.origWidthOption,v.height=p.origHeightOption,p.origWidthOption=void 0,p.origHeightOption=void 0,p.isOpen=!1,p.setButtonText()})}open(){let p=this,b=p.chart,v=b.options.chart;a(b,"fullscreenOpen",null,function(){if(v&&(p.origWidthOption=v.width,p.origHeightOption=v.height),p.origWidth=b.chartWidth,p.origHeight=b.chartHeight,p.browserProps){let x=l(b.container.ownerDocument,p.browserProps.fullscreenChange,function(){p.isOpen?(p.isOpen=!1,p.close()):(b.setSize(null,null,!1),p.isOpen=!0,p.setButtonText())}),m=l(b,"destroy",x);p.unbindFullscreenEvent=()=>{x(),m()};let E=b.renderTo[p.browserProps.requestFullscreen]();E&&E.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let p=this.chart,b=p.exportDivElements,v=p.options.exporting,x=v&&v.buttons&&v.buttons.contextButton.menuItems,m=p.options.lang;if(v&&v.menuItemDefinitions&&m&&m.exitFullscreen&&m.viewFullscreen&&x&&b){let E=b[x.indexOf("viewFullscreen")];E&&e.setElementHTML(E,this.isOpen?m.exitFullscreen:v.menuItemDefinitions.viewFullscreen.text||m.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}return g}),s(t,"Core/HttpUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{win:r}=e,{discardElement:n,objectEach:l}=i,a={ajax:function(h){let c={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},g=new XMLHttpRequest;function u(p,b){h.error&&h.error(p,b)}if(!h.url)return!1;g.open((h.type||"get").toUpperCase(),h.url,!0),h.headers&&h.headers["Content-Type"]||g.setRequestHeader("Content-Type",c[h.dataType||"json"]||c.text),l(h.headers,function(p,b){g.setRequestHeader(b,p)}),h.responseType&&(g.responseType=h.responseType),g.onreadystatechange=function(){let p;if(g.readyState===4){if(g.status===200){if(h.responseType!=="blob"&&(p=g.responseText,h.dataType==="json"))try{p=JSON.parse(p)}catch(b){if(b instanceof Error)return u(g,b)}return h.success&&h.success(p,g)}u(g,g.responseText)}},h.data&&typeof h.data!="string"&&(h.data=JSON.stringify(h.data)),g.send(h.data)},getJSON:function(h,c){a.ajax({url:h,success:c,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(h,c,g){let u=new r.FormData;l(c,function(v,x){u.append(x,v)}),u.append("b64","true");let{filename:p,type:b}=c;return r.fetch(h,xe({method:"POST",body:u},g)).then(v=>{v.ok&&v.text().then(x=>{let m=document.createElement("a");m.href=`data:${b};base64,${x}`,m.download=p,m.click(),n(m)})})}};return a}),s(t,"Extensions/Exporting/Exporting.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Chart/Chart.js"],t["Core/Chart/ChartNavigationComposition.js"],t["Core/Defaults.js"],t["Extensions/Exporting/ExportingDefaults.js"],t["Extensions/Exporting/ExportingSymbols.js"],t["Extensions/Exporting/Fullscreen.js"],t["Core/Globals.js"],t["Core/HttpUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){var p;let{defaultOptions:b}=n,{doc:v,SVG_NS:x,win:m}=c,{addEvent:E,css:L,createElement:S,discardElement:w,extend:R,find:O,fireEvent:I,isObject:_,merge:P,objectEach:F,pick:A,removeEvent:D,uniqueKey:C}=u;return function(d){let f,y=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^[0-9]+$/],M=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"];d.inlineAllowlist=[];let k=["clipPath","defs","desc"];function T($){let Q,et,it=this,st=it.renderer,rt=P(it.options.navigation.buttonOptions,$),nt=rt.onclick,ot=rt.menuItems,at=rt.symbolSize||12;if(it.btnCount||(it.btnCount=0),it.exportDivElements||(it.exportDivElements=[],it.exportSVGElements=[]),rt.enabled===!1||!rt.theme)return;let ct=it.styledMode?{}:rt.theme;nt?et=function(lt){lt&<.stopPropagation(),nt.call(it,lt)}:ot&&(et=function(lt){lt&<.stopPropagation(),it.contextMenu(ht.menuClassName,ot,ht.translateX||0,ht.translateY||0,ht.width||0,ht.height||0,ht),ht.setState(2)}),rt.text&&rt.symbol?ct.paddingLeft=A(ct.paddingLeft,30):rt.text||R(ct,{width:rt.width,height:rt.height,padding:0});let ht=st.button(rt.text,0,0,et,ct,void 0,void 0,void 0,void 0,rt.useHTML).addClass($.className).attr({title:A(it.options.lang[rt._titleKey||rt.titleKey],"")});ht.menuClassName=$.menuClassName||"highcharts-menu-"+it.btnCount++,rt.symbol&&(Q=st.symbol(rt.symbol,Math.round((rt.symbolX||0)-at/2),Math.round((rt.symbolY||0)-at/2),at,at,{width:at,height:at}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(ht),it.styledMode||Q.attr({stroke:rt.symbolStroke,fill:rt.symbolFill,"stroke-width":rt.symbolStrokeWidth||1})),ht.add(it.exportingGroup).align(R(rt,{width:ht.width,x:A(rt.x,it.buttonOffset)}),!0,"spacingBox"),it.buttonOffset+=((ht.width||0)+rt.buttonSpacing)*(rt.align==="right"?-1:1),it.exportSVGElements.push(ht,Q)}function z(){if(!this.printReverseInfo)return;let{childNodes:$,origDisplay:Q,resetParams:et}=this.printReverseInfo;this.moveContainers(this.renderTo),[].forEach.call($,function(it,st){it.nodeType===1&&(it.style.display=Q[st]||"")}),this.isPrinting=!1,et&&this.setSize.apply(this,et),delete this.printReverseInfo,f=void 0,I(this,"afterPrint")}function N(){let $=v.body,Q=this.options.exporting.printMaxWidth,et={childNodes:$.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,this.pointer?.reset(void 0,0),I(this,"beforePrint"),Q&&this.chartWidth>Q&&(et.resetParams=[this.options.chart.width,void 0,!1],this.setSize(Q,void 0,!1)),[].forEach.call(et.childNodes,function(it,st){it.nodeType===1&&(et.origDisplay[st]=it.style.display,it.style.display="none")}),this.moveContainers($),this.printReverseInfo=et}function G($){$.renderExporting(),E($,"redraw",$.renderExporting),E($,"destroy",$.destroyExport)}function X($,Q,et,it,st,rt,nt){let ot=this,at=ot.options.navigation,ct=ot.chartWidth,ht=ot.chartHeight,lt="cache-"+$,xt=Math.max(st,rt),wt,dt=ot[lt];dt||(ot.exportContextMenu=ot[lt]=dt=S("div",{className:$},xe({position:"absolute",zIndex:1e3,padding:xt+"px",pointerEvents:"auto"},ot.renderer.style),ot.scrollablePlotArea?.fixedDiv||ot.container),wt=S("ul",{className:"highcharts-menu"},ot.styledMode?{}:{listStyle:"none",margin:0,padding:0},dt),ot.styledMode||L(wt,R({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},at.menuStyle)),dt.hideMenu=function(){L(dt,{display:"none"}),nt&&nt.setState(0),ot.openMenu=!1,L(ot.renderTo,{overflow:"hidden"}),L(ot.container,{overflow:"hidden"}),u.clearTimeout(dt.hideTimer),I(ot,"exportMenuHidden")},ot.exportEvents.push(E(dt,"mouseleave",function(){dt.hideTimer=m.setTimeout(dt.hideMenu,500)}),E(dt,"mouseenter",function(){u.clearTimeout(dt.hideTimer)}),E(v,"mouseup",function(ft){ot.pointer?.inClass(ft.target,$)||dt.hideMenu()}),E(dt,"click",function(){ot.openMenu&&dt.hideMenu()})),Q.forEach(function(ft){if(typeof ft=="string"&&(ft=ot.options.exporting.menuItemDefinitions[ft]),_(ft,!0)){let Tt;ft.separator?Tt=S("hr",void 0,void 0,wt):(ft.textKey==="viewData"&&ot.isDataTableVisible&&(ft.textKey="hideData"),Tt=S("li",{className:"highcharts-menu-item",onclick:function(zt){zt&&zt.stopPropagation(),dt.hideMenu(),typeof ft!="string"&&ft.onclick&&ft.onclick.apply(ot,arguments)}},void 0,wt),e.setElementHTML(Tt,ft.text||ot.options.lang[ft.textKey]),ot.styledMode||(Tt.onmouseover=function(){L(this,at.menuItemHoverStyle)},Tt.onmouseout=function(){L(this,at.menuItemStyle)},L(Tt,R({cursor:"pointer"},at.menuItemStyle||{})))),ot.exportDivElements.push(Tt)}}),ot.exportDivElements.push(wt,dt),ot.exportMenuWidth=dt.offsetWidth,ot.exportMenuHeight=dt.offsetHeight);let Ct={display:"block"};et+(ot.exportMenuWidth||0)>ct?Ct.right=ct-et-st-xt+"px":Ct.left=et-xt+"px",it+rt+(ot.exportMenuHeight||0)>ht&&nt.alignOptions?.verticalAlign!=="top"?Ct.bottom=ht-it-xt+"px":Ct.top=it+rt-xt+"px",L(dt,Ct),L(ot.renderTo,{overflow:""}),L(ot.container,{overflow:""}),ot.openMenu=!0,I(ot,"exportMenuShown")}function j($){let Q,et=$?$.target:this,it=et.exportSVGElements,st=et.exportDivElements,rt=et.exportEvents;it&&(it.forEach((nt,ot)=>{nt&&(nt.onclick=nt.ontouchstart=null,et[Q="cache-"+nt.menuClassName]&&delete et[Q],it[ot]=nt.destroy())}),it.length=0),et.exportingGroup&&(et.exportingGroup.destroy(),delete et.exportingGroup),st&&(st.forEach(function(nt,ot){nt&&(u.clearTimeout(nt.hideTimer),D(nt,"mouseleave"),st[ot]=nt.onmouseout=nt.onmouseover=nt.ontouchstart=nt.onclick=null,w(nt))}),st.length=0),rt&&(rt.forEach(function(nt){nt()}),rt.length=0)}function B($,Q){let et=this.getSVGForExport($,Q);$=P(this.options.exporting,$),g.post($.url,{filename:$.filename?$.filename.replace(/\//g,"-"):this.getFilename(),type:$.type,width:$.width,scale:$.scale,svg:et},$.fetchOptions)}function W(){return this.styledMode&&this.inlineStyles(),this.container.innerHTML}function Y(){let $=this.userOptions.title&&this.userOptions.title.text,Q=this.options.exporting.filename;return Q?Q.replace(/\//g,"-"):(typeof $=="string"&&(Q=$.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!Q||Q.length<5)&&(Q="chart"),Q)}function U($){let Q,et,it=P(this.options,$);it.plotOptions=P(this.userOptions.plotOptions,$&&$.plotOptions),it.time=P(this.userOptions.time,$&&$.time);let st=S("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},v.body),rt=this.renderTo.style.width,nt=this.renderTo.style.height,ot=it.exporting.sourceWidth||it.chart.width||/px$/.test(rt)&&parseInt(rt,10)||(it.isGantt?800:600),at=it.exporting.sourceHeight||it.chart.height||/px$/.test(nt)&&parseInt(nt,10)||400;R(it.chart,{animation:!1,renderTo:st,forExport:!0,renderer:"SVGRenderer",width:ot,height:at}),it.exporting.enabled=!1,delete it.data,it.series=[],this.series.forEach(function(lt){(et=P(lt.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:lt.visible})).isInternal||it.series.push(et)});let ct={};this.axes.forEach(function(lt){lt.userOptions.internalKey||(lt.userOptions.internalKey=C()),lt.options.isInternal||(ct[lt.coll]||(ct[lt.coll]=!0,it[lt.coll]=[]),it[lt.coll].push(P(lt.userOptions,{visible:lt.visible})))}),it.colorAxis=this.userOptions.colorAxis;let ht=new this.constructor(it,this.callback);return $&&["xAxis","yAxis","series"].forEach(function(lt){let xt={};$[lt]&&(xt[lt]=$[lt],ht.update(xt))}),this.axes.forEach(function(lt){let xt=O(ht.axes,function(ft){return ft.options.internalKey===lt.userOptions.internalKey}),wt=lt.getExtremes(),dt=wt.userMin,Ct=wt.userMax;xt&&(dt!==void 0&&dt!==xt.min||Ct!==void 0&&Ct!==xt.max)&&xt.setExtremes(dt,Ct,!0,!1)}),Q=ht.getChartHTML(),I(this,"getSVG",{chartCopy:ht}),Q=this.sanitizeSVG(Q,it),it=null,ht.destroy(),w(st),Q}function q($,Q){let et=this.options.exporting;return this.getSVG(P({chart:{borderRadius:0}},et.chartOptions,Q,{exporting:{sourceWidth:$&&$.sourceWidth||et.sourceWidth,sourceHeight:$&&$.sourceHeight||et.sourceHeight}}))}function H(){let $,Q=d.inlineAllowlist,et={},it=v.createElement("iframe");L(it,{width:"1px",height:"1px",visibility:"hidden"}),v.body.appendChild(it);let st=it.contentWindow&&it.contentWindow.document;st&&st.body.appendChild(st.createElementNS(x,"svg")),function rt(nt){let ot,at,ct,ht,lt,xt,wt={};if(st&&nt.nodeType===1&&k.indexOf(nt.nodeName)===-1){if(ot=m.getComputedStyle(nt,null),at=nt.nodeName==="svg"?{}:m.getComputedStyle(nt.parentNode,null),!et[nt.nodeName]){$=st.getElementsByTagName("svg")[0],ct=st.createElementNS(nt.namespaceURI,nt.nodeName),$.appendChild(ct);let dt=m.getComputedStyle(ct,null),Ct={};for(let ft in dt)ft.length<1e3&&typeof dt[ft]=="string"&&!/^[0-9]+$/.test(ft)&&(Ct[ft]=dt[ft]);et[nt.nodeName]=Ct,nt.nodeName==="text"&&delete et.text.fill,$.removeChild(ct)}for(let dt in ot)(c.isFirefox||c.isMS||c.isSafari||Object.hasOwnProperty.call(ot,dt))&&function(Ct,ft){if(ht=lt=!1,Q.length){for(xt=Q.length;xt--&&!lt;)lt=Q[xt].test(ft);ht=!lt}for(ft==="transform"&&Ct==="none"&&(ht=!0),xt=y.length;xt--&&!ht;){if(ft.length>1e3)throw Error("Input too long");ht=y[xt].test(ft)||typeof Ct=="function"}!ht&&(at[ft]!==Ct||nt.nodeName==="svg")&&et[nt.nodeName][ft]!==Ct&&(M&&M.indexOf(ft)===-1?wt[ft]=Ct:Ct&&nt.setAttribute(ft.replace(/([A-Z])/g,function(Tt,zt){return"-"+zt.toLowerCase()}),Ct))}(ot[dt],dt);if(L(nt,wt),nt.nodeName==="svg"&&nt.setAttribute("stroke-width","1px"),nt.nodeName==="text")return;[].forEach.call(nt.children||nt.childNodes,rt)}}(this.container.querySelector("svg")),$.parentNode.removeChild($),it.parentNode.removeChild(it)}function V($){let{scrollablePlotArea:Q}=this;(Q?[Q.fixedDiv,Q.scrollingContainer]:[this.container]).forEach(function(et){$.appendChild(et)})}function Z(){let $=this,Q=(et,it,st)=>{$.isDirtyExporting=!0,P(!0,$.options[et],it),A(st,!0)&&$.redraw()};$.exporting={update:function(et,it){Q("exporting",et,it)}},r.compose($).navigation.addUpdate((et,it)=>{Q("navigation",et,it)})}function K(){let $=this;$.isPrinting||(f=$,c.isSafari||$.beforePrint(),setTimeout(()=>{m.focus(),m.print(),c.isSafari||setTimeout(()=>{$.afterPrint()},1e3)},1))}function J(){let $=this,Q=$.options.exporting,et=Q.buttons,it=$.isDirtyExporting||!$.exportSVGElements;$.buttonOffset=0,$.isDirtyExporting&&$.destroyExport(),it&&Q.enabled!==!1&&($.exportEvents=[],$.exportingGroup=$.exportingGroup||$.renderer.g("exporting-group").attr({zIndex:3}).add(),F(et,function(st){$.addButton(st)}),$.isDirtyExporting=!1)}function tt($,Q){let et=$.indexOf("")+6,it=$.substr(et);return $=$.substr(0,et),Q&&Q.exporting&&Q.exporting.allowHTML&&it&&(it=''+it.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"",$=$.replace("",it+"")),$=$.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|")\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/{"use strict";(function(o){typeof Vn=="object"&&Vn.exports?(o.default=o,Vn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/stock",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Series/DataModifyComposition.js",[t["Core/Axis/Axis.js"],t["Core/Series/Point.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{tooltipFormatter:a}=i.prototype,{addEvent:h,arrayMax:c,arrayMin:g,correctFloat:u,defined:p,isArray:b,isNumber:v,isString:x,pick:m}=n;return function(E){function L(D,C,d){!this.isXAxis&&(this.series.forEach(function(f){D==="compare"&&typeof C!="boolean"?f.setCompare(C,!1):D!=="cumulative"||x(C)||f.setCumulative(C,!1)}),m(d,!0)&&this.chart.redraw())}function S(D){let C=this,{numberFormatter:d}=C.series.chart,f=function(y){D=D.replace("{point."+y+"}",(C[y]>0&&y==="change"?"+":"")+d(C[y],m(C.series.tooltipOptions.changeDecimals,2)))};return p(C.change)&&f("change"),p(C.cumulativeSum)&&f("cumulativeSum"),a.apply(this,[D])}function w(){let D,C=this.options.compare;(C==="percent"||C==="value"||this.options.cumulative)&&(D=new A(this),C==="percent"||C==="value"?D.initCompare(C):D.initCumulative()),this.dataModify=D}function R(D){let C=D.dataExtremes,d=C.activeYData;if(this.dataModify&&C){let f;this.options.compare?f=[this.dataModify.modifyValue(C.dataMin),this.dataModify.modifyValue(C.dataMax)]:this.options.cumulative&&b(d)&&d.length>=2&&(f=A.getCumulativeExtremes(d)),f&&(C.dataMin=g(f),C.dataMax=c(f))}}function O(D,C){this.options.compare=this.userOptions.compare=D,this.update({},m(C,!0)),this.dataModify&&(D==="value"||D==="percent")?this.dataModify.initCompare(D):this.points.forEach(d=>{delete d.change})}function I(){if(this.xAxis&&this.processedYData&&this.dataModify){let D=this.processedXData,C=this.processedYData,d=C.length,f=this.options.compareStart===!0?0:1,y=-1,M;for(this.pointArrayMap&&(y=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y")),M=0;M-1?C[M][y]:C[M];if(v(k)&&k!==0&&D[M+f]>=(this.xAxis.min||0)){this.dataModify.compareValue=k;break}}}}function _(D,C){this.setModifier("compare",D,C)}function P(D,C){D=m(D,!1),this.options.cumulative=this.userOptions.cumulative=D,this.update({},m(C,!0)),this.dataModify?this.dataModify.initCumulative():this.points.forEach(d=>{delete d.cumulativeSum})}function F(D,C){this.setModifier("cumulative",D,C)}E.compose=function(D,C,d){let f=C.prototype,y=d.prototype,M=D.prototype;return M.setCompare||(M.setCompare=O,M.setCumulative=P,h(D,"afterInit",w),h(D,"afterGetExtremes",R),h(D,"afterProcessData",I)),f.setCompare||(f.setCompare=_,f.setModifier=L,f.setCumulative=F,y.tooltipFormatter=S),D};class A{constructor(C){this.series=C}modifyValue(){return 0}static getCumulativeExtremes(C){let d=1/0,f=-1/0;return C.reduce((y,M)=>{let k=y+M;return d=Math.min(d,k,y),f=Math.max(f,k,y),k}),[d,f]}initCompare(C){this.modifyValue=function(d,f){d===null&&(d=0);let y=this.compareValue;if(d!==void 0&&y!==void 0){if(C==="value"?d-=y:d=d/y*100-(this.series.options.compareBase===100?0:100),f!==void 0){let M=this.series.points[f];M&&(M.change=d)}return d}return 0}}initCumulative(){this.modifyValue=function(C,d){if(C===null&&(C=0),C!==void 0&&d!==void 0){let f=d>0?this.series.points[d-1]:null;f&&f.cumulativeSum&&(C=u(f.cumulativeSum+C));let y=this.series.points[d],M=y.series.options.cumulativeStart,k=y.x<=this.series.xAxis.max&&y.x>=this.series.xAxis.min;return y&&(!M||k?y.cumulativeSum=C:y.cumulativeSum=void 0),C}return 0}}}E.Additions=A}(l||(l={})),l}),s(t,"Stock/Navigator/ChartNavigatorComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let r,{isTouchDevice:n}=e,{addEvent:l,merge:a,pick:h}=i,c=[];function g(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function u(){let E,L,S,w=this.legend,R=this.navigator;if(R){E=w&&w.options,L=R.xAxis,S=R.yAxis;let{scrollbarHeight:O,scrollButtonSize:I}=R;this.inverted?(R.left=R.opposite?this.chartWidth-O-R.height:this.spacing[3]+O,R.top=this.plotTop+I):(R.left=h(L.left,this.plotLeft+I),R.top=R.navigatorOptions.top||this.chartHeight-R.height-O-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(E&&E.verticalAlign==="bottom"&&E.layout!=="proximate"&&E.enabled&&!E.floating?w.legendHeight+h(E.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),L&&S&&(this.inverted?L.options.left=S.options.left=R.left:L.options.top=S.options.top=R.top,L.setAxisSize(),S.setAxisSize())}}function p(E){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new r(this),h(E.redraw,!0)&&this.redraw(E.animation))}function b(){let E=this.options;(E.navigator.enabled||E.scrollbar.enabled)&&(this.scroller=this.navigator=new r(this))}function v(){let E=this.options,L=E.navigator,S=E.rangeSelector;if((L&&L.enabled||S&&S.enabled)&&(!n&&this.zooming.type==="x"||n&&this.zooming.pinchType==="x"))return!1}function x(E){let L=E.navigator;if(L&&E.xAxis[0]){let S=E.xAxis[0].getExtremes();L.render(S.min,S.max)}}function m(E){let L=E.options.navigator||{},S=E.options.scrollbar||{};!this.navigator&&!this.scroller&&(L.enabled||S.enabled)&&(a(!0,this.options.navigator,L),a(!0,this.options.scrollbar,S),delete E.options.navigator,delete E.options.scrollbar)}return{compose:function(E,L){if(i.pushUnique(c,E)){let S=E.prototype;r=L,S.callbacks.push(x),l(E,"afterAddSeries",g),l(E,"afterSetChartSize",u),l(E,"afterUpdate",p),l(E,"beforeRender",b),l(E,"beforeShowResetZoom",v),l(E,"update",m)}}}}),s(t,"Core/Axis/NavigatorAxisComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{isTouchDevice:r}=e,{addEvent:n,correctFloat:l,defined:a,isNumber:h,pick:c}=i;function g(){this.navigatorAxis||(this.navigatorAxis=new p(this))}function u(b){let v,x=this.chart,m=x.options,E=m.navigator,L=this.navigatorAxis,S=x.zooming.pinchType,w=m.rangeSelector,R=x.zooming.type;if(this.isXAxis&&(E?.enabled||w?.enabled)){if(R==="y"&&b.trigger==="zoom")v=!1;else if((b.trigger==="zoom"&&R==="xy"||r&&S==="xy")&&this.options.range){let O=L.previousZoom;a(b.min)?L.previousZoom=[this.min,this.max]:O&&(b.min=O[0],b.max=O[1],L.previousZoom=void 0)}}v!==void 0&&b.preventDefault()}class p{static compose(v){v.keepProps.includes("navigatorAxis")||(v.keepProps.push("navigatorAxis"),n(v,"init",g),n(v,"setExtremes",u))}constructor(v){this.axis=v}destroy(){this.axis=void 0}toFixedRange(v,x,m,E){let L=this.axis,S=(L.pointRange||0)/2,w=c(m,L.translate(v,!0,!L.horiz)),R=c(E,L.translate(x,!0,!L.horiz));return a(m)||(w=l(w+S)),a(E)||(R=l(R-S)),h(w)&&h(R)||(w=R=void 0),{min:w,max:R}}}return p}),s(t,"Stock/Navigator/NavigatorDefaults.js",[t["Core/Color/Color.js"],t["Core/Series/SeriesRegistry.js"]],function(e,i){let{parse:r}=e,{seriesTypes:n}=i;return{height:40,margin:25,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:r("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:n.areaspline===void 0?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),s(t,"Stock/Navigator/NavigatorSymbols.js",[t["Core/Renderer/SVG/Symbols.js"],t["Core/Utilities.js"]],function(e,i){let{relativeLength:r}=i;return{"navigator-handle":function(n,l,a,h,c={}){let g=c.width?c.width/2:a,u=r(c.borderRadius||0,Math.min(2*g,h));return[["M",-1.5,(h=c.height||h)/2-3.5],["L",-1.5,h/2+4.5],["M",.5,h/2-3.5],["L",.5,h/2+4.5],...e.rect(-g-1,.5,2*g+1,h,{r:u})]}}}),s(t,"Stock/Utilities/StockUtilities.js",[t["Core/Utilities.js"]],function(e){let{defined:i}=e;return{setFixedRange:function(r){let n=this.xAxis[0];i(n.dataMax)&&i(n.dataMin)&&r?this.fixedRange=Math.min(r,n.dataMax-n.dataMin):this.fixedRange=r}}}),s(t,"Stock/Navigator/NavigatorComposition.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/NavigatorAxisComposition.js"],t["Stock/Navigator/NavigatorDefaults.js"],t["Stock/Navigator/NavigatorSymbols.js"],t["Core/Renderer/RendererRegistry.js"],t["Stock/Utilities/StockUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{setOptions:g}=e,{composed:u}=i,{getRendererType:p}=a,{setFixedRange:b}=h,{addEvent:v,extend:x,pushUnique:m}=c;function E(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}return{compose:function(L,S,w){r.compose(S),m(u,"Navigator")&&(L.prototype.setFixedRange=b,x(p().prototype.symbols,l),v(w,"afterUpdate",E),g({navigator:n}))}}}),s(t,"Core/Axis/ScrollbarAxis.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){var r;let{composed:n}=e,{addEvent:l,defined:a,pick:h,pushUnique:c}=i;return function(g){let u;function p(m){let E=h(m.options&&m.options.min,m.min),L=h(m.options&&m.options.max,m.max);return{axisMin:E,axisMax:L,scrollMin:a(m.dataMin)?Math.min(E,m.min,m.dataMin,h(m.threshold,1/0)):E,scrollMax:a(m.dataMax)?Math.max(L,m.max,m.dataMax,h(m.threshold,-1/0)):L}}function b(){let m=this.scrollbar,E=m&&!m.options.opposite,L=this.horiz?2:E?3:1;m&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[L]+=m.size+(m.options.margin||0))}function v(){let m=this;m.options&&m.options.scrollbar&&m.options.scrollbar.enabled&&(m.options.scrollbar.vertical=!m.horiz,m.options.startOnTick=m.options.endOnTick=!1,m.scrollbar=new u(m.chart.renderer,m.options.scrollbar,m.chart),l(m.scrollbar,"changed",function(E){let L,S,{axisMin:w,axisMax:R,scrollMin:O,scrollMax:I}=p(m),_=I-O;if(a(w)&&a(R))if(m.horiz&&!m.reversed||!m.horiz&&m.reversed?(L=O+_*this.to,S=O+_*this.from):(L=O+_*(1-this.from),S=O+_*(1-this.to)),this.shouldUpdateExtremes(E.DOMType)){let P=E.DOMType!=="mousemove"&&E.DOMType!=="touchmove"&&void 0;m.setExtremes(S,L,!0,P,E)}else this.setRange(this.from,this.to)}))}function x(){let m,E,L,{scrollMin:S,scrollMax:w}=p(this),R=this.scrollbar,O=this.axisTitleMargin+(this.titleOffset||0),I=this.chart.scrollbarsOffsets,_=this.options.margin||0;if(R&&I){if(this.horiz)this.opposite||(I[1]+=O),R.position(this.left,this.top+this.height+2+I[1]-(this.opposite?_:0),this.width,this.height),this.opposite||(I[1]+=_),m=1;else{let P;this.opposite&&(I[0]+=O),P=R.options.opposite?this.left+this.width+2+I[0]-(this.opposite?0:_):this.opposite?0:_,R.position(P,this.top,this.width,this.height),this.opposite&&(I[0]+=_),m=0}I[m]+=R.size+(R.options.margin||0),isNaN(S)||isNaN(w)||!a(this.min)||!a(this.max)||this.min===this.max?R.setRange(0,1):(E=(this.min-S)/(w-S),L=(this.max-S)/(w-S),this.horiz&&!this.reversed||!this.horiz&&this.reversed?R.setRange(E,L):R.setRange(1-L,1-E))}}g.compose=function(m,E){c(n,"Axis.Scrollbar")&&(u=E,l(m,"afterGetOffset",b),l(m,"afterInit",v),l(m,"afterRender",x))}}(r||(r={})),r}),s(t,"Stock/Scrollbar/ScrollbarDefaults.js",[],function(){return{height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1}}),s(t,"Stock/Scrollbar/Scrollbar.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/ScrollbarAxis.js"],t["Stock/Scrollbar/ScrollbarDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{defaultOptions:a}=e,{addEvent:h,correctFloat:c,crisp:g,defined:u,destroyObjectProperties:p,fireEvent:b,merge:v,pick:x,removeEvent:m}=l;class E{static compose(S){r.compose(S,E)}static swapXY(S,w){return w&&S.forEach(R=>{let O,I=R.length;for(let _=0;_this.calculatedWidth?w.minWidth:0;return{chartX:(S.chartX-this.x-this.xOffset)/(this.barWidth-R),chartY:(S.chartY-this.y-this.yOffset)/(this.barWidth-R)}}destroy(){let S=this,w=S.chart.scroller;S.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(R){S[R]&&S[R].destroy&&(S[R]=S[R].destroy())}),w&&S===w.scrollbar&&(w.scrollbar=null,p(w.scrollbarButtons))}drawScrollbarButton(S){let w=this.renderer,R=this.scrollbarButtons,O=this.options,I=this.size,_=w.g().add(this.group);if(R.push(_),O.buttonsEnabled){let P=w.rect().addClass("highcharts-scrollbar-button").add(_);this.chart.styledMode||P.attr({stroke:O.buttonBorderColor,"stroke-width":O.buttonBorderWidth,fill:O.buttonBackgroundColor}),P.attr(P.crisp({x:-.5,y:-.5,width:I,height:I,r:O.buttonBorderRadius},P.strokeWidth()));let F=w.path(E.swapXY([["M",I/2+(S?-1:1),I/2-3],["L",I/2+(S?-1:1),I/2+3],["L",I/2+(S?2:-2),I/2]],O.vertical)).addClass("highcharts-scrollbar-arrow").add(R[S]);this.chart.styledMode||F.attr({fill:O.buttonArrowColor})}}init(S,w,R){this.scrollbarButtons=[],this.renderer=S,this.userOptions=w,this.options=v(n,a.scrollbar,w),this.options.margin=x(this.options.margin,10),this.chart=R,this.size=x(this.options.size,this.options.height),w.enabled&&(this.render(),this.addEvents())}mouseDownHandler(S){let w=this.chart.pointer?.normalize(S)||S,R=this.cursorToScrollbarPosition(w);this.chartX=R.chartX,this.chartY=R.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(S){let w,R=this.chart.pointer?.normalize(S)||S,O=this.options.vertical?"chartY":"chartX",I=this.initPositions||[];this.grabbedCenter&&(!S.touches||S.touches[0][O]!==0)&&(w=this.cursorToScrollbarPosition(R)[O]-this[O],this.hasDragged=!0,this.updatePosition(I[0]+w,I[1]+w),this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:S.type,DOMEvent:S}))}mouseUpHandler(S){this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:S.type,DOMEvent:S}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(S,w,R,O){let{buttonsEnabled:I,margin:_=0,vertical:P}=this.options,F=this.rendered?"animate":"attr",A=O,D=0;this.group.show(),this.x=S,this.y=w+this.trackBorderWidth,this.width=R,this.height=O,this.xOffset=A,this.yOffset=D,P?(this.width=this.yOffset=R=D=this.size,this.xOffset=A=0,this.yOffset=D=I?this.size:0,this.barWidth=O-(I?2*R:0),this.x=S+=_):(this.height=O=this.size,this.xOffset=A=I?this.size:0,this.barWidth=R-(I?2*O:0),this.y=this.y+_),this.group[F]({translateX:S,translateY:this.y}),this.track[F]({width:R,height:O}),this.scrollbarButtons[1][F]({translateX:P?0:R-A,translateY:P?O-D:0})}removeEvents(){this._events.forEach(function(S){m.apply(null,S)}),this._events.length=0}render(){let S=this.renderer,w=this.options,R=this.size,O=this.chart.styledMode,I=S.g("scrollbar").attr({zIndex:w.zIndex}).hide().add();this.group=I,this.track=S.rect().addClass("highcharts-scrollbar-track").attr({r:w.trackBorderRadius||0,height:R,width:R}).add(I),O||this.track.attr({fill:w.trackBackgroundColor,stroke:w.trackBorderColor,"stroke-width":w.trackBorderWidth});let _=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-g(0,_),y:-g(0,_)}),this.scrollbarGroup=S.g().add(I),this.scrollbar=S.rect().addClass("highcharts-scrollbar-thumb").attr({height:R-_,width:R-_,r:w.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=S.path(E.swapXY([["M",-3,R/4],["L",-3,2*R/3],["M",0,R/4],["L",0,2*R/3],["M",3,R/4],["L",3,2*R/3]],w.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),O||(this.scrollbar.attr({fill:w.barBackgroundColor,stroke:w.barBorderColor,"stroke-width":w.barBorderWidth}),this.scrollbarRifles.attr({stroke:w.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-g(0,this.scrollbarStrokeWidth),-g(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(S,w){let R,O,I=this.options,_=I.vertical,P=I.minWidth,F=this.barWidth,A=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!u(F))return;let D=F*Math.min(w,1);R=Math.ceil(F*(S=Math.max(S,0))),this.calculatedWidth=O=c(D-R),O=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(S){return x(this.options.liveRedraw,i.svg&&!i.isTouchDevice&&!this.chart.boosted)||S==="mouseup"||S==="touchend"||!u(S)}trackClick(S){let w=this.chart.pointer?.normalize(S)||S,R=this.to-this.from,O=this.y+this.scrollbarTop,I=this.x+this.scrollbarLeft;this.options.vertical&&w.chartY>O||!this.options.vertical&&w.chartX>I?this.updatePosition(this.from+R,this.to+R):this.updatePosition(this.from-R,this.to-R),b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:S})}update(S){this.destroy(),this.init(this.chart.renderer,v(!0,this.options,S),this.chart)}updatePosition(S,w){w>1&&(S=c(1-c(w-S)),w=1),S<0&&(w=c(w-S),S=0),this.from=S,this.to=w}}return E.defaultOptions=n,a.scrollbar=v(!0,E.defaultOptions,a.scrollbar),E}),s(t,"Stock/Navigator/Navigator.js",[t["Core/Axis/Axis.js"],t["Stock/Navigator/ChartNavigatorComposition.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/NavigatorAxisComposition.js"],t["Stock/Navigator/NavigatorComposition.js"],t["Stock/Scrollbar/Scrollbar.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=r,{isTouchDevice:u}=n,{addEvent:p,clamp:b,correctFloat:v,defined:x,destroyObjectProperties:m,erase:E,extend:L,find:S,fireEvent:w,isArray:R,isNumber:O,merge:I,pick:_,removeEvent:P,splat:F}=c;function A(C,...d){let f=[].filter.call(d,O);if(f.length)return Math[C].apply(0,f)}class D{static compose(d,f,y){i.compose(d,D),a.compose(d,f,y)}constructor(d){this.scrollbarHeight=0,this.init(d)}drawHandle(d,f,y,M){let k=this.navigatorOptions.handles.height;this.handles[f][M](y?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(d,10)+.5-k)}:{translateX:Math.round(this.left+parseInt(d,10)),translateY:Math.round(this.top+this.height/2-k/2-1)})}drawOutline(d,f,y,M){let k=this.navigatorOptions.maskInside,T=this.outline.strokeWidth(),z=T/2,N=T%2/2,G=this.scrollButtonSize,X=this.size,j=this.top,B=this.height,W=j-z,Y=j+B,U=this.left,q,H;y?(q=j+f+N,f=j+d+N,H=[["M",U+B,j-G-N],["L",U+B,q],["L",U,q],["M",U,f],["L",U+B,f],["L",U+B,j+X+G]],k&&H.push(["M",U+B,q-z],["L",U+B,f+z])):(U-=G,d+=U+G-N,f+=U+G-N,H=[["M",U,W],["L",d,W],["L",d,Y],["M",f,Y],["L",f,W],["L",U+X+2*G,j+z]],k&&H.push(["M",d-z,W],["L",f+z,W])),this.outline[M]({d:H})}drawMasks(d,f,y,M){let k,T,z,N,G=this.left,X=this.top,j=this.height;y?(z=[G,G,G],N=[X,X+d,X+f],T=[j,j,j],k=[d,f-d,this.size-f]):(z=[G,G+d,G+f],N=[X,X,X],T=[d,f-d,this.size-f],k=[j,j,j]),this.shades.forEach((B,W)=>{B[M]({x:z[W],y:N[W],width:T[W],height:k[W]})})}renderElements(){let d=this,f=d.navigatorOptions,y=f.maskInside,M=d.chart,k=M.inverted,T=M.renderer,z={cursor:k?"ns-resize":"ew-resize"},N=d.navigatorGroup=T.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();if([!y,y,!y].forEach((G,X)=>{let j=T.rect().addClass("highcharts-navigator-mask"+(X===1?"-inside":"-outside")).add(N);M.styledMode||(j.attr({fill:G?f.maskFill:"rgba(0,0,0,0)"}),X===1&&j.css(z)),d.shades[X]=j}),d.outline=T.path().addClass("highcharts-navigator-outline").add(N),M.styledMode||d.outline.attr({"stroke-width":f.outlineWidth,stroke:f.outlineColor}),f.handles&&f.handles.enabled){let G=f.handles,{height:X,width:j}=G;[0,1].forEach(B=>{d.handles[B]=T.symbol(G.symbols[B],-j/2-1,0,j,X,G),M.inverted&&d.handles[B].attr({rotation:90,rotationOriginX:Math.floor(-j/2),rotationOriginY:(X+j)/2}),d.handles[B].attr({zIndex:7-B}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][B]).add(N),M.styledMode||d.handles[B].attr({fill:G.backgroundColor,stroke:G.borderColor,"stroke-width":G.lineWidth}).css(z)})}}update(d){(this.series||[]).forEach(f=>{f.baseSeries&&delete f.baseSeries.navigatorSeries}),this.destroy(),I(!0,this.chart.options.navigator,d),this.init(this.chart)}render(d,f,y,M){let k=this.chart,T=this.xAxis,z=T.pointRange||0,N=T.navigatorAxis.fake?k.xAxis[0]:T,G=this.navigatorEnabled,X=this.rendered,j=k.inverted,B=k.xAxis[0].minRange,W=k.xAxis[0].options.maxRange,Y=this.scrollButtonSize,U,q,H,V=this.scrollbarHeight,Z,K;if(this.hasDragged&&!x(y))return;if(d=v(d-z/2),f=v(f+z/2),!O(d)||!O(f)){if(!X)return;y=0,M=_(T.width,N.width)}this.left=_(T.left,k.plotLeft+Y+(j?k.plotWidth:0));let J=this.size=Z=_(T.len,(j?k.plotHeight:k.plotWidth)-2*Y);U=j?V:Z+2*Y,y=_(y,T.toPixels(d,!0)),M=_(M,T.toPixels(f,!0)),O(y)&&Math.abs(y)!==1/0||(y=0,M=U);let tt=T.toValue(y,!0),$=T.toValue(M,!0),Q=Math.abs(v($-tt));QW&&(this.grabbedLeft?y=T.toPixels($-W-z,!0):this.grabbedRight&&(M=T.toPixels(tt+W+z,!0))),this.zoomedMax=b(Math.max(y,M),0,J),this.zoomedMin=b(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(y,M),0,J),this.range=this.zoomedMax-this.zoomedMin,J=Math.round(this.zoomedMax);let et=Math.round(this.zoomedMin);G&&(this.navigatorGroup.attr({visibility:"inherit"}),K=X&&!this.hasDragged?"animate":"attr",this.drawMasks(et,J,j,K),this.drawOutline(et,J,j,K),this.navigatorOptions.handles.enabled&&(this.drawHandle(et,0,j,K),this.drawHandle(J,1,j,K))),this.scrollbar&&(j?(H=this.top-Y,q=this.left-V+(G||!N.opposite?0:(N.titleOffset||0)+N.axisTitleMargin),V=Z+2*Y):(H=this.top+(G?this.height:-V),q=this.left-Y),this.scrollbar.position(q,H,U,V),this.scrollbar.setRange(this.zoomedMin/(Z||1),this.zoomedMax/(Z||1))),this.rendered=!0,w(this,"afterRender")}addMouseEvents(){let d=this,f=d.chart,y=f.container,M=[],k,T;d.mouseMoveHandler=k=function(z){d.onMouseMove(z)},d.mouseUpHandler=T=function(z){d.onMouseUp(z)},(M=d.getPartsEvents("mousedown")).push(p(f.renderTo,"mousemove",k),p(y.ownerDocument,"mouseup",T),p(f.renderTo,"touchmove",k),p(y.ownerDocument,"touchend",T)),M.concat(d.getPartsEvents("touchstart")),d.eventsToUnbind=M,d.series&&d.series[0]&&M.push(p(d.series[0].xAxis,"foundExtremes",function(){f.navigator.modifyNavigatorAxisExtremes()}))}getPartsEvents(d){let f=this,y=[];return["shades","handles"].forEach(function(M){f[M].forEach(function(k,T){y.push(p(k.element,d,function(z){f[M+"Mousedown"](z,T)}))})}),y}shadesMousedown(d,f){d=this.chart.pointer?.normalize(d)||d;let y=this.chart,M=this.xAxis,k=this.zoomedMin,T=this.size,z=this.range,N=this.left,G=d.chartX,X,j,B,W;y.inverted&&(G=d.chartY,N=this.top),f===1?(this.grabbedCenter=G,this.fixedWidth=z,this.dragOffset=G-k):(W=G-N-z/2,f===0?W=Math.max(0,W):f===2&&W+z>=T&&(W=T-z,this.reversedExtremes?(W-=z,j=this.getUnionExtremes().dataMin):X=this.getUnionExtremes().dataMax),W!==k&&(this.fixedWidth=z,x((B=M.navigatorAxis.toFixedRange(W,W+z,j,X)).min)&&w(this,"setRange",{min:Math.min(B.min,B.max),max:Math.max(B.min,B.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(d,f){d=this.chart.pointer?.normalize(d)||d;let y=this.chart,M=y.xAxis[0],k=this.reversedExtremes;f===0?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=k?M.min:M.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=k?M.max:M.min),y.setFixedRange(void 0)}onMouseMove(d){let f=this,y=f.chart,M=f.navigatorSize,k=f.range,T=f.dragOffset,z=y.inverted,N=f.left,G;(!d.touches||d.touches[0].pageX!==0)&&(G=(d=y.pointer?.normalize(d)||d).chartX,z&&(N=f.top,G=d.chartY),f.grabbedLeft?(f.hasDragged=!0,f.render(0,0,G-N,f.otherHandlePos)):f.grabbedRight?(f.hasDragged=!0,f.render(0,0,f.otherHandlePos,G-N)):f.grabbedCenter&&(f.hasDragged=!0,GM+T-k&&(G=M+T-k),f.render(0,0,G-T,G-T+k)),f.hasDragged&&f.scrollbar&&_(f.scrollbar.options.liveRedraw,!u&&!this.chart.boosted)&&(d.DOMType=d.type,setTimeout(function(){f.onMouseUp(d)},0)))}onMouseUp(d){let f,y,M,k,T,z,N=this.chart,G=this.xAxis,X=this.scrollbar,j=d.DOMEvent||d,B=N.inverted,W=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!X||!X.hasDragged)||d.trigger==="scrollbar")&&(M=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?k=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(T=this.fixedExtreme),this.zoomedMax===this.size&&(T=this.reversedExtremes?M.dataMin:M.dataMax),this.zoomedMin===0&&(k=this.reversedExtremes?M.dataMax:M.dataMin),x((z=G.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,k,T)).min)&&w(this,"setRange",{min:Math.min(z.min,z.max),max:Math.max(z.min,z.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:j}})),d.DOMType!=="mousemove"&&d.DOMType!=="touchmove"&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&O(this.zoomedMin)&&O(this.zoomedMax)&&(y=Math.round(this.zoomedMin),f=Math.round(this.zoomedMax),this.shades&&this.drawMasks(y,f,B,W),this.outline&&this.drawOutline(y,f,B,W),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(y,0,B,W),this.drawHandle(f,1,B,W)))}removeEvents(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(d){d()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let d=this.baseSeries||[];this.navigatorEnabled&&d[0]&&(this.navigatorOptions.adaptToUpdatedData!==!1&&d.forEach(function(f){P(f,"updatedData",this.updatedDataHandler)},this),d[0].xAxis&&P(d[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}init(d){let f=d.options,y=f.navigator||{},M=y.enabled,k=f.scrollbar||{},T=k.enabled,z=M&&y.height||0,N=T&&k.height||0,G=k.buttonsEnabled&&N||0;this.handles=[],this.shades=[],this.chart=d,this.setBaseSeries(),this.height=z,this.scrollbarHeight=N,this.scrollButtonSize=G,this.scrollbarEnabled=T,this.navigatorEnabled=M,this.navigatorOptions=y,this.scrollbarOptions=k,this.opposite=_(y.opposite,!!(!M&&d.inverted));let X=this,j=X.baseSeries,B=d.xAxis.length,W=d.yAxis.length,Y=j&&j[0]&&j[0].xAxis||d.xAxis[0]||{options:{}};if(d.isDirtyBox=!0,X.navigatorEnabled?(X.xAxis=new e(d,I({breaks:Y.options.breaks,ordinal:Y.options.ordinal,overscroll:Y.options.overscroll},y.xAxis,{type:"datetime",index:B,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},d.inverted?{offsets:[G,0,-G,0],width:z}:{offsets:[0,-G,0,G],height:z}),"xAxis"),X.yAxis=new e(d,I(y.yAxis,{alignTicks:!1,offset:0,index:W,isInternal:!0,reversed:_(y.yAxis&&y.yAxis.reversed,d.yAxis[0]&&d.yAxis[0].reversed,!1),zoomEnabled:!1},d.inverted?{width:z}:{height:z}),"yAxis"),j||y.series.data?X.updateNavigatorSeries(!1):d.series.length===0&&(X.unbindRedraw=p(d,"beforeRedraw",function(){d.series.length>0&&!X.series&&(X.setBaseSeries(),X.unbindRedraw())})),X.reversedExtremes=d.inverted&&!X.xAxis.reversed||!d.inverted&&X.xAxis.reversed,X.renderElements(),X.addMouseEvents()):(X.xAxis={chart:d,navigatorAxis:{fake:!0},translate:function(U,q){let H=d.xAxis[0],V=H.getExtremes(),Z=H.len-2*G,K=A("min",H.options.min,V.dataMin),J=A("max",H.options.max,V.dataMax)-K;return q?U*J/Z+K:Z*(U-K)/J},toPixels:function(U){return this.translate(U)},toValue:function(U){return this.translate(U,!0)}},X.xAxis.navigatorAxis.axis=X.xAxis,X.xAxis.navigatorAxis.toFixedRange=l.prototype.toFixedRange.bind(X.xAxis.navigatorAxis)),d.options.scrollbar.enabled){let U=I(d.options.scrollbar,{vertical:d.inverted});!O(U.margin)&&X.navigatorEnabled&&(U.margin=d.inverted?-3:3),d.scrollbar=X.scrollbar=new h(d.renderer,U,d),p(X.scrollbar,"changed",function(q){let H=X.size,V=H*this.to,Z=H*this.from;X.hasDragged=X.scrollbar.hasDragged,X.render(0,0,Z,V),this.shouldUpdateExtremes(q.DOMType)&&setTimeout(function(){X.onMouseUp(q)})})}X.addBaseSeriesEvents(),X.addChartEvents()}getUnionExtremes(d){let f,y=this.chart.xAxis[0],M=this.xAxis,k=M.options,T=y.options;return d&&y.dataMin===null||(f={dataMin:_(k&&k.min,A("min",T.min,y.dataMin,M.dataMin,M.min)),dataMax:_(k&&k.max,A("max",T.max,y.dataMax,M.dataMax,M.max))}),f}setBaseSeries(d,f){let y=this.chart,M=this.baseSeries=[];d=d||y.options&&y.options.navigator.baseSeries||(y.series.length?S(y.series,k=>!k.options.isInternal).index:0),(y.series||[]).forEach((k,T)=>{!k.options.isInternal&&(k.options.showInNavigator||(T===d||k.options.id===d)&&k.options.showInNavigator!==!1)&&M.push(k)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,f)}updateNavigatorSeries(d,f){let y=this,M=y.chart,k=y.baseSeries,T={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},z=y.series=(y.series||[]).filter(B=>{let W=B.baseSeries;return!(0>k.indexOf(W))||(W&&(P(W,"updatedData",y.updatedDataHandler),delete W.navigatorSeries),B.chart&&B.destroy(),!1)}),N,G,X=y.navigatorOptions.series,j;k&&k.length&&k.forEach(B=>{let W=B.navigatorSeries,Y=L({color:B.color,visible:B.visible},R(X)?g.navigator.series:X);if(W&&y.navigatorOptions.adaptToUpdatedData===!1)return;T.name="Navigator "+k.length,j=(N=B.options||{}).navigatorOptions||{},Y.dataLabels=F(Y.dataLabels),(G=I(N,T,Y,j)).pointRange=_(Y.pointRange,j.pointRange,g.plotOptions[G.type||"line"].pointRange);let U=j.data||Y.data;y.hasNavigatorData=y.hasNavigatorData||!!U,G.data=U||N.data&&N.data.slice(0),W&&W.options?W.update(G,f):(B.navigatorSeries=M.initSeries(G),M.setSortedData(),B.navigatorSeries.baseSeries=B,z.push(B.navigatorSeries))}),(X.data&&!(k&&k.length)||R(X))&&(y.hasNavigatorData=!1,(X=F(X)).forEach((B,W)=>{T.name="Navigator "+(z.length+1),(G=I(g.navigator.series,{color:M.series[W]&&!M.series[W].options.isInternal&&M.series[W].color||M.options.colors[W]||M.options.colors[0]},T,B)).data=B.data,G.data&&(y.hasNavigatorData=!0,z.push(M.initSeries(G)))})),d&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let d=this,f=d.baseSeries||[];f[0]&&f[0].xAxis&&f[0].eventsToUnbind.push(p(f[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),f.forEach(y=>{y.eventsToUnbind.push(p(y,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),y.eventsToUnbind.push(p(y,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),this.navigatorOptions.adaptToUpdatedData!==!1&&y.xAxis&&y.eventsToUnbind.push(p(y,"updatedData",this.updatedDataHandler)),y.eventsToUnbind.push(p(y,"remove",function(){this.navigatorSeries&&(E(d.series,this.navigatorSeries),x(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(d){return this.baseSeries.reduce(function(f,y){return Math.min(f,y.xData&&y.xData.length?y.xData[0]:f)},d)}modifyNavigatorAxisExtremes(){let d=this.xAxis;if(d.getExtremes!==void 0){let f=this.getUnionExtremes(!0);f&&(f.dataMin!==d.min||f.dataMax!==d.max)&&(d.min=f.dataMin,d.max=f.dataMax)}}modifyBaseAxisExtremes(){let d,f,y=this.chart.navigator,M=this.getExtremes(),k=M.min,T=M.max,z=M.dataMin,N=M.dataMax,G=T-k,X=y.stickToMin,j=y.stickToMax,B=_(this.ordinal?.convertOverscroll(this.options.overscroll),0),W=y.series&&y.series[0],Y=!!this.setExtremes;!(this.eventArgs&&this.eventArgs.trigger==="rangeSelectorButton")&&(X&&(d=(f=z)+G),j&&(d=N+B,X||(f=Math.max(z,d-G,y.getBaseSeriesMin(W&&W.xData?W.xData[0]:-Number.MAX_VALUE)))),Y&&(X||j)&&O(f)&&(this.min=this.userMin=f,this.max=this.userMax=d)),y.stickToMin=y.stickToMax=null}updatedDataHandler(){let d=this.chart.navigator,f=this.navigatorSeries,y=d.reversedExtremes?Math.round(d.zoomedMin)===0:Math.round(d.zoomedMax)>=Math.round(d.size);d.stickToMax=_(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,y),d.stickToMin=d.shouldStickToMin(this,d),f&&!d.hasNavigatorData&&(f.options.pointStart=this.xData[0],f.setData(this.options.data,!1,null,!1))}shouldStickToMin(d,f){let y=f.getBaseSeriesMin(d.xData[0]),M=d.xAxis,k=M.max,T=M.min,z=M.options.range;return!!(O(k)&&O(T))&&(z&&k-y>0?k-y{d.destroy&&d.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(d=>{this[d]&&this[d].destroy&&this[d].destroy(),this[d]=null}),[this.handles].forEach(d=>{m(d)})}}return D}),s(t,"Core/Axis/OrdinalAxis.js",[t["Core/Axis/Axis.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{addEvent:a,correctFloat:h,css:c,defined:g,error:u,isNumber:p,pick:b,timeUnits:v,isString:x}=n;return function(m){function E(C,d,f,y,M=[],k=0,T){let z={},N=this.options.tickPixelInterval,G=this.chart.time,X=[],j,B,W,Y,U,q=0,H=[],V=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!M||M.length<3||d===void 0)return G.getTimeTicks.apply(G,arguments);let Z=M.length;for(j=0;jf,M[j]5*k||U){if(M[j]>V){for(B=G.getTimeTicks(C,M[q],M[j],y);B.length&&B[0]<=V;)B.shift();B.length&&(V=B[B.length-1]),X.push(H.length),H=H.concat(B)}q=j+1}if(U)break}if(B){if(Y=B.info,T&&Y.unitRange<=v.hour){for(q=1,j=H.length-1;qnt-ot),(it=tt[Math.floor(tt.length/2)])<.6*N&&(it=null),rt=H[K-1]>f?K-1:K,et=void 0;rt--;)st=Math.abs(et-(Q=J[rt])),et&&st<.8*N&&(it===null||st<.8*it)?(z[H[rt]]&&!z[H[rt+1]]?($=rt+1,et=Q):$=rt,H.splice($,1)):et=Q}return H}function L(C){let d=this.ordinal.positions;if(!d)return C;let f=d.length-1,y;return C<0?C=d[0]:C>f?C=d[f]:(f=Math.floor(C),y=C-f),y!==void 0&&d[f]!==void 0?d[f]+(y?y*(d[f+1]-d[f]):0):C}function S(C){let d=this.ordinal,f=this.old?this.old.min:this.min,y=this.old?this.old.transA:this.transA,M=d.getExtendedPositions();if(M&&M.length){let k=h((C-f)*y+this.minPixelPadding),T=h(d.getIndexOfPoint(k,M)),z=h(T%1);if(T>=0&&T<=M.length-1){let N=M[Math.floor(T)],G=M[Math.ceil(T)];return M[Math.floor(T)]+z*(G-N)}}return C}function w(C,d){let f=m.Additions.findIndexOf(C,d,!0);if(C[f]===d)return f;let y=(d-C[f])/(C[f+1]-C[f]);return f+y}function R(){this.ordinal||(this.ordinal=new m.Additions(this))}function O(){let{eventArgs:C,options:d}=this;if(this.isXAxis&&g(d.overscroll)&&d.overscroll!==0&&p(this.max)&&p(this.min)&&(this.options.ordinal&&!this.ordinal.originalOrdinalRange&&this.ordinal.getExtendedPositions(!1),this.max===this.dataMax&&(C?.trigger!=="pan"||this.isInternal)&&C?.trigger!=="navigator")){let f=this.ordinal.convertOverscroll(d.overscroll);this.max+=f,!this.isInternal&&g(this.userMin)&&C?.trigger!=="mousewheel"&&(this.min+=f)}}function I(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}function _(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function P(C){let d=this.xAxis[0],f=d.ordinal.convertOverscroll(d.options.overscroll),y=C.originalEvent.chartX,M=this.options.chart.panning,k=!1;if(M&&M.type!=="y"&&d.options.ordinal&&d.series.length){let T,z,N=this.mouseDownX,G=d.getExtremes(),X=G.dataMin,j=G.dataMax,B=G.min,W=G.max,Y=this.hoverPoints,U=d.closestPointRange||d.ordinal&&d.ordinal.overscrollPointsRange,q=Math.round((N-y)/(d.translationSlope*(d.ordinal.slope||U))),H=d.ordinal.getExtendedPositions(),V={ordinal:{positions:H,extendedOrdinalPositions:H}},Z=d.index2val,K=d.val2lin;if(B<=X&&q<0||W+f>=j&&q>0)return;V.ordinal.positions?Math.abs(q)>1&&(Y&&Y.forEach(function(J){J.setState()}),j>(z=V.ordinal.positions)[z.length-1]&&z.push(j),this.setFixedRange(W-B),(T=d.navigatorAxis.toFixedRange(void 0,void 0,Z.apply(V,[K.apply(V,[B,!0])+q]),Z.apply(V,[K.apply(V,[W,!0])+q]))).min>=Math.min(G.dataMin,B)&&T.max<=Math.max(j,W)+f&&d.setExtremes(T.min,T.max,!0,!1,{trigger:"pan"}),this.mouseDownX=y,c(this.container,{cursor:"move"})):k=!0}else k=!0;k||M&&/y/.test(M.type)?f&&(d.max=d.dataMax+f):C.preventDefault()}function F(){let C=this.xAxis;C&&C.options.ordinal&&(delete C.ordinal.index,delete C.ordinal.originalOrdinalRange)}function A(C,d){let f,y=this.ordinal,M=y.positions,k=y.slope,T;if(!M)return C;let z=M.length;if(M[0]<=C&&M[z-1]>=C)f=w(M,C);else{if(!((T=y.getExtendedPositions&&y.getExtendedPositions())&&T.length))return C;let N=T.length;k||(k=(T[N-1]-T[0])/N);let G=w(T,M[0]);if(C>=T[0]&&C<=T[N-1])f=w(T,C)-G;else{if(!d)return C;f=C0&&J.options.id!=="highcharts-navigator-series"&&J.processedXData.length>1&&(V=K!==J.processedXData[1]-J.processedXData[0]),K=J.processedXData[1]-J.processedXData[0],J.boosted&&(Z=J.boosted),J.reserveSpace()&&(J.takeOrdinalPosition!==!1||T)&&(N=(U=U.concat(J.processedXData)).length,U.sort(function($,Q){return $-Q}),q=Math.min(q,b(J.closestPointRange,q)),N)){for(tt=0;tt2){for(X=U[1]-U[0],Y=N-1;Y--&&!H;)U[Y+1]-U[Y]!==X&&(H=!0);!d.options.keepOrdinalPadding&&(U[0]-M>X||k-U[U.length-1]>X)&&(H=!0)}else d.options.overscroll&&(N===2?q=U[1]-U[0]:N===1?(q=d.ordinal.convertOverscroll(d.options.overscroll),U=[U[0],U[0]+q]):q=f.overscrollPointsRange);H||d.forceOrdinal?(d.options.overscroll&&(f.overscrollPointsRange=q,U=U.concat(f.getOverscrollPositions())),f.positions=U,j=d.ordinal2lin(Math.max(M,U[0]),!0),B=Math.max(d.ordinal2lin(Math.min(k,U[U.length-1]),!0),1),f.slope=W=(k-M)/(B-j),f.offset=M-j*W):(f.overscrollPointsRange=b(d.closestPointRange,f.overscrollPointsRange),f.positions=d.ordinal.slope=f.offset=void 0)}d.isOrdinal=z&&H,f.groupIntervalFactor=null}static findIndexOf(d,f,y){let M=0,k=d.length-1,T;for(;MB.x>=X&&B.x<=j)};M.series.forEach(G=>{let X=G.points?.[0];g(X?.plotX)&&(X.plotXA()),m.splice(_,1);return}}}function O(){let _=this.rangeSelector;if(_){let P=_.getHeight();this.extraTopMargin&&(this.plotTop+=P),this.extraBottomMargin&&(this.marginBottom+=P)}}function I(_){let P=_.options.rangeSelector,F=this.extraBottomMargin,A=this.extraTopMargin,D=this.rangeSelector;if(P&&P.enabled&&!g(D)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=D=new l(this)),this.extraBottomMargin=!1,this.extraTopMargin=!1,D){let C=P&&P.verticalAlign||D.options&&D.options.verticalAlign;D.options.floating||(C==="bottom"?this.extraBottomMargin=!0:C==="middle"||(this.extraTopMargin=!0)),(this.extraBottomMargin!==F||this.extraTopMargin!==A)&&(this.isDirtyBox=!0)}}return{compose:function(_,P,F){if(l=F,x(h,"RangeSelector")){let A=P.prototype;_.prototype.minFromRange=E,c(P,"afterGetContainer",L),c(P,"beforeRender",S),c(P,"destroy",R),c(P,"getMargins",O),c(P,"redraw",w),c(P,"update",I),A.callbacks.push(w),u(a,{rangeSelector:r.rangeSelector}),u(a.lang,r.lang)}}}}),s(t,"Stock/RangeSelector/RangeSelector.js",[t["Core/Axis/Axis.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Stock/RangeSelector/RangeSelectorComposition.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"],t["Core/Axis/OrdinalAxis.js"]],function(e,i,r,n,l,a,h){let{defaultOptions:c}=i,{addEvent:g,createElement:u,css:p,defined:b,destroyObjectProperties:v,discardElement:x,extend:m,fireEvent:E,isNumber:L,merge:S,objectEach:w,pad:R,pick:O,pInt:I,splat:_}=a;class P{static compose(A,D){n.compose(A,D,P)}constructor(A){this.buttonOptions=P.prototype.defaultButtons,this.initialButtonGroupWidth=0,this.init(A)}clickButton(A,D){let C=this.chart,d=this.buttonOptions[A],f=C.xAxis[0],y=C.scroller&&C.scroller.getUnionExtremes()||f||{},M=d.type,k=d.dataGrouping,T=y.dataMin,z=y.dataMax,N,G=f&&Math.round(Math.min(f.max,O(z,f.max))),X,j=d._range,B,W,Y,U=!0;if(T!==null&&z!==null){if(this.setSelected(A),k&&(this.forcedDataGrouping=!0,e.prototype.setDataGrouping.call(f||{chart:this.chart},k,!1),this.frozenStates=d.preserveDataGrouping),M==="month"||M==="year")f?(W={range:d,max:G,chart:C,dataMin:T,dataMax:z},N=f.minFromRange.call(W),L(W.newMax)&&(G=W.newMax),U=!1):j=d;else if(j)G=Math.min((N=Math.max(G-j,T))+j,z),U=!1;else if(M==="ytd")if(f)(z===void 0||T===void 0)&&(T=Number.MAX_VALUE,z=Number.MIN_VALUE,C.series.forEach(q=>{let H=q.xData;H&&(T=Math.min(H[0],T),z=Math.max(H[H.length-1],z))}),D=!1),N=B=(Y=this.getYTDExtremes(z,T,C.time.useUTC)).min,G=Y.max;else{this.deferredYTDClick=A;return}else M==="all"&&f&&(C.navigator&&C.navigator.baseSeries[0]&&(C.navigator.baseSeries[0].xAxis.options.range=void 0),N=T,G=z);if(U&&d._offsetMin&&b(N)&&(N+=d._offsetMin),d._offsetMax&&b(G)&&(G+=d._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=A+1),f)f.setExtremes(N,G,O(D,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:d}),C.setFixedRange(d._range);else{X=_(C.options.xAxis)[0];let q=g(C,"afterGetAxes",function(){let H=C.xAxis[0];H.range=H.options.range=j,H.min=H.options.min=B});g(C,"load",function(){let H=C.xAxis[0];C.setFixedRange(d._range),H.options.range=X.range,H.options.min=X.min,q()})}E(this,"afterBtnClick")}}setSelected(A){this.selected=this.options.selected=A}init(A){let D=this,C=A.options.rangeSelector,d=C.buttons||D.defaultButtons.slice(),f=C.selected,y=function(){let M=D.minInput,k=D.maxInput;M&&M.blur&&E(M,"blur"),k&&k.blur&&E(k,"blur")};D.chart=A,D.options=C,D.buttons=[],D.buttonOptions=d,this.eventsToUnbind=[],this.eventsToUnbind.push(g(A.container,"mousedown",y)),this.eventsToUnbind.push(g(A,"resize",y)),d.forEach(D.computeButtonRange),f!==void 0&&d[f]&&this.clickButton(f,!1),this.eventsToUnbind.push(g(A,"load",function(){A.xAxis&&A.xAxis[0]&&g(A.xAxis[0],"setExtremes",function(M){L(this.max)&&L(this.min)&&this.max-this.min!==A.fixedRange&&M.trigger!=="rangeSelectorButton"&&M.trigger!=="updatedData"&&D.forcedDataGrouping&&!D.frozenStates&&this.setDataGrouping(!1,!1)})})),this.createElements()}updateButtonStates(){let A=this,D=this.chart,C=this.dropdown,d=this.dropdownLabel,f=D.xAxis[0],y=Math.round(f.max-f.min),M=!f.hasVisibleSeries,k=24*36e5,T=D.scroller&&D.scroller.getUnionExtremes()||f,z=T.dataMin,N=T.dataMax,G=A.getYTDExtremes(N,z,D.time.useUTC),X=G.min,j=G.max,B=A.selected,W=A.options.allButtonsEnabled,Y=Array(A.buttonOptions.length).fill(0),U=L(B),q=A.buttons,H=!1,V=null;A.buttonOptions.forEach((Z,K)=>{let J=Z._range,tt=Z.type,$=Z.count||1,Q=Z._offsetMax-Z._offsetMin,et=K===B,it=J>N-z,st=JJ&&(nt=!0)}else(tt==="month"||tt==="year")&&y+36e5>={month:28,year:365}[tt]*k*$-Q&&y-36e5<={month:31,year:366}[tt]*k*$+Q?nt=!0:tt==="ytd"?(nt=j-X+Q===y,rt=!et):tt==="all"&&(nt=f.max-f.min>=N-z);let ot=!W&&!(H&&tt==="all")&&(it||st||M),at=H&&tt==="all"||!rt&&nt||et&&A.frozenStates;ot?Y[K]=3:at&&(!U||K===B)&&(V=K)}),V!==null?(Y[V]=2,A.setSelected(V)):(A.setSelected(),d&&(d.setState(0),d.attr({text:(c.lang.rangeSelectorZoom||"")+" \u25BE"})));for(let Z=0;Z6&&(y.lastIndexOf("-")===y.length-6||y.lastIndexOf("+")===y.length-6))){let M=new Date(d).getTimezoneOffset()/60;d+=M<=0?`+${R(-M)}:00`:`-${R(M)}:00`}}let f=Date.parse(d);if(!L(f)){let y=A.split("-");f=Date.UTC(I(y[0]),I(y[1])-1,I(y[2]))}return C&&D&&L(f)&&(f+=C.getTimezoneOffset(f)),f}drawInput(A){let{chart:D,div:C,inputGroup:d}=this,f=this,y=D.renderer.style||{},M=D.renderer,k=D.options.rangeSelector,T=c.lang,z=A==="min";function N(Y){let{maxInput:U,minInput:q}=f,H=D.xAxis[0],V=D.scroller?.getUnionExtremes()||H,Z=V.dataMin,K=V.dataMax,J=D.xAxis[0].getExtremes()[Y],tt=f.getInputValue(Y);L(tt)&&tt!==J&&(z&&U&&L(Z)?tt>Number(U.getAttribute("data-hc-time"))?tt=void 0:ttK&&(tt=K)),tt!==void 0&&H.setExtremes(z?tt:H.min,z?H.max:tt,void 0,void 0,{trigger:"rangeSelectorInput"}))}let G=T[z?"rangeSelectorFrom":"rangeSelectorTo"]||"",X=M.label(G,0).addClass("highcharts-range-label").attr({padding:G?2:0,height:G?k.inputBoxHeight:0}).add(d),j=M.label("",0).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth,height:k.inputBoxHeight,"text-align":"center"}).on("click",function(){f.showInput(A),f[A+"Input"].focus()});D.styledMode||j.attr({stroke:k.inputBoxBorderColor,"stroke-width":1}),j.add(d);let B=u("input",{name:A,className:"highcharts-range-selector"},void 0,C);B.setAttribute("type",function(Y){if(Y.indexOf("%L")!==-1)return"text";let U=["a","A","d","e","w","b","B","m","o","y","Y"].some(H=>Y.indexOf("%"+H)!==-1),q=["H","k","I","l","M","S"].some(H=>Y.indexOf("%"+H)!==-1);return U&&q?"datetime-local":U?"date":q?"time":"text"}(k.inputDateFormat||"%e %b %Y")),D.styledMode||(X.css(S(y,k.labelStyle)),j.css(S({color:"#333333"},y,k.inputStyle)),p(B,m({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:y.fontSize,fontFamily:y.fontFamily,top:"-9999em"},k.inputStyle))),B.onfocus=()=>{f.showInput(A)},B.onblur=()=>{B===r.doc.activeElement&&N(A),f.hideInput(A),f.setInputValue(A),B.blur()};let W=!1;return B.onchange=()=>{W||(N(A),f.hideInput(A),B.blur())},B.onkeypress=Y=>{Y.keyCode===13&&N(A)},B.onkeydown=Y=>{W=!0,(Y.key==="ArrowUp"||Y.key==="ArrowDown"||Y.key==="Tab")&&N(A)},B.onkeyup=()=>{W=!1},{dateBox:j,input:B,label:X}}getPosition(){let A=this.chart,D=A.options.rangeSelector,C=D.verticalAlign==="top"?A.plotTop-A.axisOffset[0]:0;return{buttonTop:C+D.buttonPosition.y,inputTop:C+D.inputPosition.y-10}}getYTDExtremes(A,D,C){let d=this.chart.time,f=new d.Date(A),y=d.get("FullYear",f),M=C?d.Date.UTC(y,0,1):+new d.Date(y,0,1),k=f.getTime();return{max:Math.min(A||k,k),min:Math.max(D,M)}}createElements(){let A=this.chart,D=A.renderer,C=A.container,d=A.options,f=d.rangeSelector,y=f.inputEnabled,M=O(d.chart.style?.zIndex,0)+1;if(f.enabled!==!1&&(this.group=D.g("range-selector-group").attr({zIndex:7}).add(),this.div=u("div",void 0,{position:"relative",height:0,zIndex:M}),this.buttonOptions.length&&this.renderButtons(),C.parentNode&&C.parentNode.insertBefore(this.div,C),y)){this.inputGroup=D.g("input-group").add(this.group);let k=this.drawInput("min");this.minDateBox=k.dateBox,this.minLabel=k.label,this.minInput=k.input;let T=this.drawInput("max");this.maxDateBox=T.dateBox,this.maxLabel=T.label,this.maxInput=T.input}}render(A,D){let C=this.chart,d=C.options.rangeSelector,f=d.inputEnabled;if(d.enabled!==!1){if(f){this.setInputValue("min",A),this.setInputValue("max",D);let y=C.scroller&&C.scroller.getUnionExtremes()||C.xAxis[0]||{};if(b(y.dataMin)&&b(y.dataMax)){let M=C.xAxis[0].minRange||0;this.setInputExtremes("min",y.dataMin,Math.min(y.dataMax,this.getInputValue("max"))-M),this.setInputExtremes("max",Math.max(y.dataMin,this.getInputValue("min"))+M,y.dataMax)}if(this.inputGroup){let M=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(k=>{if(k){let{width:T}=k.getBBox();T&&(k.attr({x:M}),M+=T+d.inputSpacing)}})}}this.alignElements(),this.updateButtonStates()}}renderButtons(){let{buttons:A,chart:D,options:C}=this,d=c.lang,f=D.renderer,y=S(C.buttonTheme),M=y&&y.states,k=y.width||28;delete y.width,delete y.states,this.buttonGroup=f.g("range-selector-buttons").add(this.group);let T=this.dropdown=u("select",void 0,{position:"absolute",padding:0,border:0,cursor:"pointer",opacity:1e-4},this.div),z=D.userOptions.rangeSelector?.buttonTheme;this.dropdownLabel=f.button("",0,0,()=>{},S(y,{"stroke-width":O(y["stroke-width"],0),width:"auto",paddingLeft:O(C.buttonTheme.paddingLeft,z?.padding,8),paddingRight:O(C.buttonTheme.paddingRight,z?.padding,8)}),M&&M.hover,M&&M.select,M&&M.disabled).hide().add(this.group),g(T,"touchstart",()=>{T.style.fontSize="16px"});let N=r.isMS?"mouseover":"mouseenter",G=r.isMS?"mouseout":"mouseleave";g(T,N,()=>{E(this.dropdownLabel.element,N)}),g(T,G,()=>{E(this.dropdownLabel.element,G)}),g(T,"change",()=>{E(this.buttons[T.selectedIndex-1].element,"click")}),this.zoomText=f.label(d.rangeSelectorZoom||"",0).attr({padding:C.buttonTheme.padding,height:C.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(C.labelStyle),y["stroke-width"]=O(y["stroke-width"],0)),u("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,T),this.buttonOptions.forEach((X,j)=>{u("option",{textContent:X.title||X.text},void 0,T),A[j]=f.button(X.text,0,0,B=>{let W,Y=X.events&&X.events.click;Y&&(W=Y.call(X,B)),W!==!1&&this.clickButton(j),this.isActive=!0},y,M&&M.hover,M&&M.select,M&&M.disabled).attr({"text-align":"center",width:k}).add(this.buttonGroup),X.title&&A[j].attr("title",X.title)})}alignElements(){let{buttonGroup:A,buttons:D,chart:C,group:d,inputGroup:f,options:y,zoomText:M}=this,k=C.options,T=k.exporting&&k.exporting.enabled!==!1&&k.navigation&&k.navigation.buttonOptions,{buttonPosition:z,inputPosition:N,verticalAlign:G}=y,X=(B,W)=>T&&this.titleCollision(C)&&G==="top"&&W.align==="right"&&W.y-B.getBBox().height-12<(T.y||0)+(T.height||0)+C.spacing[0]?-40:0,j=C.plotLeft;if(d&&z&&N){let B=z.x-C.spacing[3];if(A){if(this.positionButtons(),!this.initialButtonGroupWidth){let J=0;M&&(J+=M.getBBox().width+5),D.forEach((tt,$)=>{J+=tt.width||0,$!==D.length-1&&(J+=y.buttonSpacing)}),this.initialButtonGroupWidth=J}j-=C.spacing[3];let K=X(A,z);this.alignButtonGroup(K),this.buttonGroup?.translateY&&this.dropdownLabel.attr({y:this.buttonGroup.translateY}),d.placed=A.placed=C.hasLoaded}let W=0;f&&(W=X(f,N),N.align==="left"?B=j:N.align==="right"&&(B=-Math.max(C.axisOffset[1],-W)),f.align({y:N.y,width:f.getBBox().width,align:N.align,x:N.x+B-2},!0,C.spacingBox),f.placed=C.hasLoaded),this.handleCollision(W),d.align({verticalAlign:G},!0,C.spacingBox);let Y=d.alignAttr.translateY,U=d.getBBox().height+20,q=0;if(G==="bottom"){let K=C.legend&&C.legend.options;q=Y-(U=U+(K&&K.verticalAlign==="bottom"&&K.enabled&&!K.floating?C.legend.legendHeight+O(K.margin,10):0)-20)-(y.floating?0:y.y)-(C.titleOffset?C.titleOffset[2]:0)-10}G==="top"?(y.floating&&(q=0),C.titleOffset&&C.titleOffset[0]&&(q=C.titleOffset[0]),q+=C.margin[0]-C.spacing[0]||0):G==="middle"&&(N.y===z.y?q=Y:(N.y||z.y)&&(N.y<0||z.y<0?q-=Math.min(N.y,z.y):q=Y-U)),d.translate(y.x,y.y+Math.floor(q));let{minInput:H,maxInput:V,dropdown:Z}=this;y.inputEnabled&&H&&V&&(H.style.marginTop=d.translateY+"px",V.style.marginTop=d.translateY+"px"),Z&&(Z.style.marginTop=d.translateY+"px")}}alignButtonGroup(A,D){let{chart:C,options:d,buttonGroup:f}=this,{buttonPosition:y}=d,M=C.plotLeft-C.spacing[3],k=y.x-C.spacing[3];y.align==="right"?k+=A-M:y.align==="center"&&(k-=M/2),f&&f.align({y:y.y,width:O(D,this.initialButtonGroupWidth),align:y.align,x:k},!0,C.spacingBox)}positionButtons(){let{buttons:A,chart:D,options:C,zoomText:d}=this,f=D.hasLoaded?"animate":"attr",{buttonPosition:y}=C,M=D.plotLeft,k=M;d&&d.visibility!=="hidden"&&(d[f]({x:O(M+y.x,M)}),k+=y.x+d.getBBox().width+5);for(let T=0,z=this.buttonOptions.length;T{let N=0;return this.buttons.forEach(G=>{let X=G.getBBox();X.width>N&&(N=X.width)}),N},T=N=>{if(d?.alignOptions&&C){let G=d.alignAttr.translateX+d.alignOptions.x-A+d.getBBox().x+2,X=d.alignOptions.width||0,j=C.alignAttr.translateX+C.getBBox().x;return j+N>G&&G+X>j&&f.y{d&&C&&d.attr({translateX:d.alignAttr.translateX+(D.axisOffset[1]>=-A?0:-A),translateY:d.alignAttr.translateY+C.getBBox().height+10})};if(C){if(y==="always"){this.collapseButtons(),T(k())&&z();return}y==="never"&&this.expandButtons()}d&&C?M.align===f.align||T(this.initialButtonGroupWidth+20)?y==="responsive"?(this.collapseButtons(),T(k())&&z()):z():y==="responsive"&&this.expandButtons():C&&y==="responsive"&&(this.initialButtonGroupWidth>D.plotWidth?this.collapseButtons():this.expandButtons())}collapseButtons(){let{buttons:A,zoomText:D}=this;this.isCollapsed!==!0&&(this.isCollapsed=!0,D.hide(),A.forEach(C=>void C.hide()),this.showDropdown())}expandButtons(){let{buttons:A,zoomText:D}=this;this.isCollapsed!==!1&&(this.isCollapsed=!1,this.hideDropdown(),D.show(),A.forEach(C=>void C.show()),this.positionButtons())}showDropdown(){let{buttonGroup:A,chart:D,dropdownLabel:C,dropdown:d}=this;if(A&&d){let{translateX:f=0,translateY:y=0}=A,M=D.plotLeft+f;C.attr({x:M,y}).show(),p(d,{left:M+"px",top:y+"px",visibility:"inherit"}),this.hasVisibleDropdown=!0}}hideDropdown(){let{dropdown:A}=this;A&&(this.dropdownLabel.hide(),p(A,{visibility:"hidden",width:"1px",height:"1px"}),this.hasVisibleDropdown=!1)}getHeight(){let A=this.options,D=this.group,C=A.inputPosition,d=A.buttonPosition,f=A.y,y=d.y,M=C.y,k=0;return A.height?A.height:(this.alignElements(),k=D?D.getBBox(!0).height+13+f:0,(M<0&&y<0||M>0&&y>0)&&(k+=Math.abs(Math.min(M,y))),k)}titleCollision(A){return!(A.options.title.text||A.options.subtitle.text)}update(A,D=!0){let C=this.chart;S(!0,C.options.rangeSelector,A),this.destroy(),this.init(C),D&&this.render()}destroy(){let A=this,D=A.minInput,C=A.maxInput;A.eventsToUnbind&&(A.eventsToUnbind.forEach(d=>d()),A.eventsToUnbind=void 0),v(A.buttons),D&&(D.onfocus=D.onblur=D.onchange=null),C&&(C.onfocus=C.onblur=C.onchange=null),w(A,function(d,f){d&&f!=="chart"&&(d instanceof l?d.destroy():d instanceof window.HTMLElement&&x(d)),d!==P.prototype[f]&&(A[f]=null)},this)}}return m(P.prototype,{defaultButtons:[{type:"month",count:1,text:"1m",title:"View 1 month"},{type:"month",count:3,text:"3m",title:"View 3 months"},{type:"month",count:6,text:"6m",title:"View 6 months"},{type:"ytd",text:"YTD",title:"View year to date"},{type:"year",count:1,text:"1y",title:"View 1 year"},{type:"all",text:"All",title:"View all"}],inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}}),P}),s(t,"Core/Chart/StockChart.js",[t["Core/Chart/Chart.js"],t["Core/Templating.js"],t["Core/Defaults.js"],t["Stock/Navigator/NavigatorDefaults.js"],t["Stock/RangeSelector/RangeSelectorDefaults.js"],t["Stock/Scrollbar/ScrollbarDefaults.js"],t["Stock/Utilities/StockUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{format:g}=i,{getOptions:u}=r,{setFixedRange:p}=h,{addEvent:b,clamp:v,crisp:x,defined:m,extend:E,find:L,isNumber:S,isString:w,merge:R,pick:O,splat:I}=c;function _(A,D,C){return A==="xAxis"?{minPadding:0,maxPadding:0,overscroll:0,ordinal:!0}:A==="yAxis"?{labels:{y:-2},opposite:C.opposite??D.opposite??!0,showLastLabel:!!(D.categories||D.type==="category"),title:{text:C.title?.text!=="Values"?C.title?.text:null}}:{}}function P(A,D){if(A==="xAxis"){let C=O(D.navigator&&D.navigator.enabled,n.enabled,!0),d={type:"datetime",categories:void 0};return C&&(d.startOnTick=!1,d.endOnTick=!1),d}return{}}class F extends e{init(D,C){let d=u(),f=D.xAxis,y=D.yAxis,M=O(D.navigator&&D.navigator.enabled,n.enabled,!0);D.xAxis=D.yAxis=void 0;let k=R({chart:{panning:{enabled:!0,type:"x"},zooming:{pinchType:"x",mouseWheel:{type:"x"}}},navigator:{enabled:M},scrollbar:{enabled:O(a.enabled,!0)},rangeSelector:{enabled:O(l.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:O(d.tooltip&&d.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},D,{isStock:!0});D.xAxis=f,D.yAxis=y,k.xAxis=I(D.xAxis||{}).map(T=>R(_("xAxis",T,d.xAxis),T,P("xAxis",D))),k.yAxis=I(D.yAxis||{}).map(T=>R(_("yAxis",T,d.yAxis),T)),super.init(k,C)}createAxis(D,C){return C.axis=R(_(D,C.axis,u()[D]),C.axis,P(D,this.userOptions)),super.createAxis(D,C)}}return b(e,"update",function(A){let D=A.options;"scrollbar"in D&&this.navigator&&(R(!0,this.options.scrollbar,D.scrollbar),this.navigator.update({}),delete D.scrollbar)}),function(A){function D(z){if(!this.crosshair||!this.crosshair.label||!this.crosshair.label.enabled||!this.cross||!S(this.min)||!S(this.max))return;let N=this.chart,G=this.logarithmic,X=this.crosshair.label,j=this.horiz,B=this.opposite,W=this.left,Y=this.top,U=this.width,q=this.options.tickPosition==="inside",H=this.crosshair.snap!==!1,V=z.e||this.cross&&this.cross.e,Z=z.point,K=this.crossLabel,J,tt,$=X.format,Q="",et,it=0,st=this.min,rt=this.max;G&&(st=G.lin2log(this.min),rt=G.lin2log(this.max));let nt=j?"center":B?this.labelAlign==="right"?"right":"left":this.labelAlign==="left"?"left":"center";K||(K=this.crossLabel=N.renderer.label("",0,void 0,X.shape||"callout").addClass("highcharts-crosshair-label highcharts-color-"+(Z&&Z.series?Z.series.colorIndex:this.series[0]&&this.series[0].colorIndex)).attr({align:X.align||nt,padding:O(X.padding,8),r:O(X.borderRadius,3),zIndex:2}).add(this.labelGroup),N.styledMode||K.attr({fill:X.backgroundColor||Z&&Z.series&&Z.series.color||"#666666",stroke:X.borderColor||"","stroke-width":X.borderWidth||0}).css(E({color:"#ffffff",fontWeight:"normal",fontSize:"0.7em",textAlign:"center"},X.style||{}))),j?(J=H?(Z.plotX||0)+W:V.chartX,tt=Y+(B?0:this.height)):(J=W+this.offset+(B?U:0),tt=H?(Z.plotY||0)+Y:V.chartY),$||X.formatter||(this.dateTime&&(Q="%b %d, %Y"),$="{value"+(Q?":"+Q:"")+"}");let ot=H?this.isXAxis?Z.x:Z.y:this.toValue(j?V.chartX:V.chartY),at=Z&&Z.series?Z.series.isPointInside(Z):S(ot)&&ot>st&&ot=et.right&&(it=-(lt+ht.width-et.right)),K.attr({x:J+it,y:tt,anchorX:j?J:this.opposite?0:N.chartWidth,anchorY:j?this.opposite?N.chartHeight:0:tt+ht.height/2})}function C(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}function d(z){let N=this.chart,G=this.options,X=N._labelPanes=N._labelPanes||{},j=G.labels;if(N.options.isStock&&this.coll==="yAxis"){let B=G.top+","+G.height;!X[B]&&j.enabled&&(j.distance===15&&this.side===1&&(j.distance=0),j.align===void 0&&(j.align="right"),X[B]=this,z.align="right",z.preventDefault())}}function f(){let z=this.chart,N=this.options&&this.options.top+","+this.options.height;N&&z._labelPanes&&z._labelPanes[N]===this&&delete z._labelPanes[N]}function y(z){let N=this,G=N.isLinked&&!N.series&&N.linkedParent?N.linkedParent.series:N.series,X=N.chart,j=X.renderer,B=N.left,W=N.top,Y=[],U=z.translatedValue,q=z.value,H=z.force,V,Z,K,J,tt=[],$,Q;if(X.options.isStock&&z.acrossPanes!==!1&&N.coll==="xAxis"||N.coll==="yAxis"){for(let et of(z.preventDefault(),tt=(it=>{let st=it==="xAxis"?"yAxis":"xAxis",rt=N.options[st];return S(rt)?[X[st][rt]]:w(rt)?[X.get(rt)]:G.map(nt=>nt[st])})(N.coll),N.isXAxis?X.yAxis:X.xAxis))if(!m(et.options.id)||et.options.id.indexOf("navigator")===-1){let it=et.isXAxis?"yAxis":"xAxis";N===(m(et.options[it])?X[it][et.options[it]]:X[it][0])&&tt.push(et)}for(let et of($=tt.length?[]:[N.isXAxis?X.yAxis[0]:X.xAxis[0]],tt))$.indexOf(et)!==-1||L($,it=>it.pos===et.pos&&it.len===et.len)||$.push(et);if(S(Q=O(U,N.translate(q||0,void 0,void 0,z.old))))if(N.horiz)for(let et of $){let it;J=(Z=et.pos)+et.len,V=K=Math.round(Q+N.transB),H!=="pass"&&(VB+N.width)&&(H?V=K=v(V,B,B+N.width):it=!0),it||Y.push(["M",V,Z],["L",K,J])}else for(let et of $){let it;K=(V=et.pos)+et.len,Z=J=Math.round(W+N.height-Q),H!=="pass"&&(ZW+N.height)&&(H?Z=J=v(Z,W,W+N.height):it=!0),it||Y.push(["M",V,Z],["L",K,J])}z.path=Y.length>0?j.crispPolyLine(Y,z.lineWidth||1):void 0}}function M(z){if(this.chart.options.isStock){let N;this.is("column")||this.is("columnrange")?N={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(N={marker:{enabled:!1,radius:2}}),N&&(z.plotOptions[this.type]=R(z.plotOptions[this.type],N))}}function k(){let z=this.chart,N=this.options.dataGrouping;return this.allowDG!==!1&&N&&O(N.enabled,z.options.isStock)}function T(z,N){for(let G=0;G\u25CF {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0}}),s(t,"Series/HLC/HLCSeries.js",[t["Series/HLC/HLCPoint.js"],t["Series/HLC/HLCSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{column:l}=r.seriesTypes,{crisp:a,extend:h,merge:c}=n;class g extends l{extendStem(p,b,v){let x=p[0],m=p[1];typeof x[2]=="number"&&(x[2]=Math.max(v+b,x[2])),typeof m[2]=="number"&&(m[2]=Math.min(v-b,m[2]))}getPointPath(p,b){let v=b.strokeWidth(),x=p.series,m=a(p.plotX||0,v),E=Math.round(p.shapeArgs.width/2),L=[["M",m,Math.round(p.yBottom)],["L",m,Math.round(p.plotHigh)]];if(p.close!==null){let S=a(p.plotClose,v);L.push(["M",m,S],["L",m+E,S]),x.extendStem(L,v/2,S)}return L}drawSinglePoint(p){let b=p.series,v=b.chart,x,m=p.graphic;p.plotY!==void 0&&(m||(p.graphic=m=v.renderer.path().add(b.group)),v.styledMode||m.attr(b.pointAttribs(p,p.selected&&"select")),x=b.getPointPath(p,m),m[m?"animate":"attr"]({d:x}).addClass(p.getClassName(),!0))}drawPoints(){this.points.forEach(this.drawSinglePoint)}init(){super.init.apply(this,arguments),this.options.stacking=void 0}pointAttribs(p,b){let v=super.pointAttribs.call(this,p,b);return delete v.fill,v}toYData(p){return[p.high,p.low,p.close]}translate(){let p=this,b=p.yAxis,v=this.pointArrayMap&&this.pointArrayMap.slice()||[],x=v.map(m=>`plot${m.charAt(0).toUpperCase()+m.slice(1)}`);x.push("yBottom"),v.push("low"),super.translate.apply(p),p.points.forEach(function(m){v.forEach(function(E,L){let S=m[E];S!==null&&(p.dataModify&&(S=p.dataModify.modifyValue(S)),m[x[L]]=b.toPixels(S,!0))}),m.tooltipPos[1]=m.plotHigh+b.pos-p.chart.plotTop})}}return g.defaultOptions=c(l.defaultOptions,i),h(g.prototype,{pointClass:e,animate:null,directTouch:!1,pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"}),r.registerSeriesType("hlc",g),g}),s(t,"Series/OHLC/OHLCPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{seriesTypes:{hlc:i}}=e;class r extends i.prototype.pointClass{getClassName(){return super.getClassName.call(this)+(this.open\u25CF {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'}}}),s(t,"Series/OHLC/OHLCSeries.js",[t["Core/Globals.js"],t["Series/OHLC/OHLCPoint.js"],t["Series/OHLC/OHLCSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{composed:a}=e,{hlc:h}=n.seriesTypes,{addEvent:c,crisp:g,extend:u,merge:p,pushUnique:b}=l;function v(E){let L=E.options,S=L.dataGrouping;S&&L.useOhlcData&&L.id!=="highcharts-navigator-series"&&(S.approximation="ohlc")}function x(E){let L=E.options;L.useOhlcData&&L.id!=="highcharts-navigator-series"&&u(this,{pointValKey:m.prototype.pointValKey,pointArrayMap:m.prototype.pointArrayMap,toYData:m.prototype.toYData})}class m extends h{static compose(L,...S){b(a,"OHLCSeries")&&(c(L,"afterSetOptions",v),c(L,"init",x))}getPointPath(L,S){let w=super.getPointPath(L,S),R=S.strokeWidth(),O=g(L.plotX||0,R),I=Math.round(L.shapeArgs.width/2);if(L.open!==null){let _=g(L.plotOpen,R);w.push(["M",O,_],["L",O-I,_]),super.extendStem(w,R/2,_)}return w}pointAttribs(L,S){let w=super.pointAttribs.call(this,L,S),R=this.options;return delete w.fill,!L.options.color&&R.upColor&&L.openp&&(g-=Math.round((b-p)/2),p=b),x=h[c](g,u,p,b,v),m&&E){let L=m;if(c==="circle")L=g+p/2;else{let w=x[0],R=x[1];w[0]==="M"&&R[0]==="L"&&(L=(w[1]+R[1])/2)}let S=u>E?u:u+b;x.push(["M",L,S],["L",m,E]),x=x.concat(h.circle(m-1,E-1,2,2))}return x}}r.compose=function(h){if(n.indexOf(h)===-1){n.push(h);let g=h.prototype.symbols;g.flag=l,a(g,"circle"),a(g,"square")}let c=e.getRendererType();n.indexOf(c)&&n.push(c)}}(i||(i={})),i}),s(t,"Series/OnSeriesComposition.js",[t["Series/Column/ColumnSeries.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{composed:a}=i,{prototype:h}=e,{prototype:c}=r,{defined:g,pushUnique:u,stableSort:p}=n;return function(b){function v(m){return c.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,m)}function x(){h.translate.apply(this);let m=this,E=m.options,L=m.chart,S=m.points,w=E.onSeries,R=w&&L.get(w),O=R&&R.options.step,I=R&&R.points,_=L.inverted,P=m.xAxis,F=m.yAxis,A=S.length-1,D,C,d=E.onKey||"y",f=I&&I.length,y=0,M,k,T,z,N;if(R&&R.visible&&f){for(y=(R.pointXOffset||0)+(R.barW||0)/2,z=R.currentDataGrouping,k=I[f-1].x+(z?z.totalRange:0),p(S,(G,X)=>G.x-X.x),d="plot"+d[0].toUpperCase()+d.substr(1);f--&&S[A];)if(M=I[f],(D=S[A]).y=M.y,M.x<=D.x&&M[d]!==void 0){if(D.x<=k&&(D.plotY=M[d],M.xMath.pow(1-H,3)*G[V]+3*(1-H)*(1-H)*H*j[V]+3*(1-H)*H*H*B[V]+H*H*H*X[V],Y=0,U=1,q;for(let H=0;H<100;H++){let V=(Y+U)/2,Z=W(V,0);if(Z===null)break;if(.25>Math.abs(Z-D.plotX)){q=V;break}Z{let j;G.plotX+=y,(G.plotY===void 0||_)&&(G.plotX>=0&&G.plotX<=P.len?_?(G.plotY=P.translate(G.x,0,1,0,1),G.plotX=g(G.y)?F.translate(G.y,0,0,0,1):0):G.plotY=(P.opposite?0:m.yAxis.len)+P.offset:G.shapeArgs={}),(C=S[X-1])&&C.plotX===G.plotX&&(C.stackIndex===void 0&&(C.stackIndex=0),j=C.stackIndex+1),G.stackIndex=j}),this.onSeries=R}b.compose=function(m){if(u(a,"OnSeries")){let E=m.prototype;E.getPlotBox=v,E.translate=x}return m},b.getPlotBox=v,b.translate=x}(l||(l={})),l}),s(t,"Series/Flags/FlagsSeries.js",[t["Series/Flags/FlagsPoint.js"],t["Series/Flags/FlagsSeriesDefaults.js"],t["Series/Flags/FlagsSymbols.js"],t["Core/Globals.js"],t["Series/OnSeriesComposition.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g){let{noop:u}=n,{distribute:p}=a,{series:b,seriesTypes:{column:v}}=h,{addEvent:x,defined:m,extend:E,isNumber:L,merge:S,objectEach:w,wrap:R}=g;class O extends v{animate(_){_&&this.setClip()}drawPoints(){let _,P,F,A,D,C,d,f,y,M,k,T=this.points,z=this.chart,N=z.renderer,G=z.inverted,X=this.options,j=X.y,B=this.yAxis,W={},Y=[],U=L(X.borderRadius)?X.borderRadius:0;for(A=T.length;A--;)D=T[A],M=(G?D.plotY:D.plotX)>this.xAxis.len,_=D.plotX,d=D.stackIndex,F=D.options.shape||X.shape,(P=D.plotY)!==void 0&&(P=D.plotY+j-(d!==void 0&&d*X.stackDistance)),D.anchorX=d?void 0:D.plotX,f=d?void 0:D.plotY,k=F!=="flag",C=D.graphic,P!==void 0&&_>=0&&!M?(C&&D.hasNewShapeType()&&(C=C.destroy()),C||(C=D.graphic=N.label("",0,void 0,F,void 0,void 0,X.useHTML).addClass("highcharts-point").add(this.markerGroup),D.graphic.div&&(D.graphic.div.point=D),C.isNew=!0),C.attr({align:k?"center":"left",width:X.width,height:X.height,"text-align":X.textAlign,r:U}),z.styledMode||C.attr(this.pointAttribs(D)).css(S(X.style,D.style)).shadow(X.shadow),_>0&&(_-=C.strokeWidth()%2),y={y:P,anchorY:f},X.allowOverlapX&&(y.x=_,y.anchorX=D.anchorX),C.attr({text:D.options.title??X.title??"A"})[C.isNew?"attr":"animate"](y),X.allowOverlapX||(W[D.plotX]?W[D.plotX].size=Math.max(W[D.plotX].size,C.width||0):W[D.plotX]={align:k?.5:0,size:C.width||0,target:_,anchorX:_}),D.tooltipPos=[_,P+B.pos-z.plotTop]):C&&(D.graphic=C.destroy());if(!X.allowOverlapX){let q=100;for(let H of(w(W,function(V){V.plotX=V.anchorX,Y.push(V),q=Math.max(V.size,q)}),p(Y,G?B.len:this.xAxis.len,q),T)){let V=H.plotX,Z=H.graphic,K=Z&&W[V];K&&Z&&(m(K.pos)?Z[Z.isNew?"attr":"animate"]({x:K.pos+(K.align||0)*K.size,anchorX:H.anchorX}).show().isNew=!1:Z.hide().isNew=!0)}}X.useHTML&&this.markerGroup&&R(this.markerGroup,"on",function(q){return c.prototype.on.apply(q.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})}drawTracker(){let _=this.points;for(let P of(super.drawTracker(),_)){let F=P.graphic;F&&(P.unbindMouseOver&&P.unbindMouseOver(),P.unbindMouseOver=x(F.element,"mouseover",function(){for(let A of(P.stackIndex>0&&!P.raised&&(P._y=F.y,F.attr({y:P._y-8}),P.raised=!0),_))A!==P&&A.raised&&A.graphic&&(A.graphic.attr({y:A._y}),A.raised=!1)}))}}pointAttribs(_,P){let F=this.options,A=_&&_.color||this.color,D=F.lineColor,C=_&&_.lineWidth,d=_&&_.fillColor||F.fillColor;return P&&(d=F.states[P].fillColor,D=F.states[P].lineColor,C=F.states[P].lineWidth),{fill:d||A,stroke:D||A,"stroke-width":C||F.lineWidth||0}}setClip(){b.prototype.setClip.apply(this,arguments),this.options.clip!==!1&&this.sharedClipKey&&this.markerGroup&&this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey])}}return O.compose=r.compose,O.defaultOptions=S(v.defaultOptions,i),l.compose(O),E(O.prototype,{allowDG:!1,forceCrop:!0,invertible:!1,noSharedTooltip:!0,pointClass:e,sorted:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],buildKDTree:u,init:b.prototype.init}),h.registerSeriesType("flags",O),O}),s(t,"Core/Axis/BrokenAxis.js",[t["Core/Axis/Stacking/StackItem.js"],t["Core/Utilities.js"]],function(e,i){var r;let{addEvent:n,find:l,fireEvent:a,isArray:h,isNumber:c,pick:g}=i;return function(u){function p(){this.brokenAxis!==void 0&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function b(){this.brokenAxis?.hasBreaks&&(this.options.ordinal=!1)}function v(){let R=this.brokenAxis;if(R?.hasBreaks){let O=this.tickPositions,I=this.tickPositions.info,_=[];for(let P=0;Py.to||_>y.from&&Py.from&&Py.from&&P>y.to&&P0){let A,D;for(this.options.gapUnit!=="value"&&(P*=this.basePointRange),O&&O>P&&O>=this.basePointRange&&(P=O);F--;)if(D&&D.visible!==!1||(D=I[F+1]),A=I[F],D.visible!==!1&&A.visible!==!1){if(D.x-A.x>P){let C=(A.x+D.x)/2;I.splice(F+1,0,{isNull:!0,x:C}),_.stacking&&this.options.stacking&&((_.stacking.stacks[this.stackKey][C]=new e(_,_.options.stackLabels,!1,C,this.stack)).total=0)}D=A}}return this.getGraphPath(I)}u.compose=function(R,O){if(!R.keepProps.includes("brokenAxis")){R.keepProps.push("brokenAxis"),n(R,"init",x),n(R,"afterInit",p),n(R,"afterSetTickPositions",v),n(R,"afterSetOptions",b);let I=O.prototype;I.drawBreaks=L,I.gappedPath=S,n(O,"afterGeneratePoints",m),n(O,"afterRender",E)}return R};class w{static isInBreak(O,I){let _=O.repeat||1/0,P=O.from,F=O.to-O.from,A=I>=P?(I-P)%_:_-(P-I)%_;return O.inclusive?A<=F:A=P);A++)(F.to=O)break;if(w.isInBreak(F,O)){P-=O-F.from;break}}return P}constructor(O){this.hasBreaks=!1,this.axis=O}findBreakAt(O,I){return l(I,function(_){return _.fromk;)z-=M;for(;zthis.chart.plotSizeX/x||E&&L.forced)&&(m=!0));return m?x:0}function u(){this.series.forEach(function(b){b.hasProcessed=!1})}function p(b,v){let x;if(v=h(v,!0),b||(b={forced:!1,units:null}),this instanceof r)for(x=this.series.length;x--;)this.series[x].update({dataGrouping:b},!1);else this.chart.options.series.forEach(function(m){m.dataGrouping=typeof b=="boolean"?b:a(b,m.dataGrouping)});this.ordinal&&(this.ordinal.slope=void 0),v&&this.chart.redraw()}return{compose:function(b){r=b;let v=b.prototype;v.applyGrouping||(n(b,"afterSetScale",u),n(b,"postProcessData",c),l(v,{applyGrouping:c,getGroupPixelWidth:g,setDataGrouping:p}))}}}),s(t,"Extensions/DataGrouping/DataGroupingSeriesComposition.js",[t["Extensions/DataGrouping/ApproximationRegistry.js"],t["Extensions/DataGrouping/DataGroupingDefaults.js"],t["Core/Axis/DateTimeAxis.js"],t["Core/Defaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{series:{prototype:h}}=l,{addEvent:c,defined:g,error:u,extend:p,isNumber:b,merge:v,pick:x}=a,m=h.generatePoints;function E(I){var _;let P,F,A=this.chart,D=this.options.dataGrouping,C=this.allowDG!==!1&&D&&x(D.enabled,A.options.isStock),d=this.reserveSpace(),f=this.currentDataGrouping,y,M,k=!1;C&&!this.requireSorting&&(this.requireSorting=k=!0);let T=!!(this.isCartesian&&!this.isDirty&&!this.xAxis.isDirty&&!this.yAxis.isDirty&&!I)||!C;if(k&&(this.requireSorting=!1),T)return;this.destroyGroupedData();let z=D.groupAll?this.xData:this.processedXData,N=D.groupAll?this.yData:this.processedYData,G=A.plotSizeX,X=this.xAxis,j=X.options.ordinal,B=this.groupPixelWidth;if(B&&z&&z.length&&G){F=!0,this.isDirty=!0,this.points=null;let W=X.getExtremes(),Y=W.min,U=W.max,q=j&&X.ordinal&&X.ordinal.getGroupIntervalFactor(Y,U,this)||1,H=B*(U-Y)/G*q,V=X.getTimeTicks(r.Additions.prototype.normalizeTimeTickInterval(H,D.units||i.units),Math.min(Y,z[0]),Math.max(U,z[z.length-1]),X.options.startOfWeek,z,this.closestPointRange),Z=h.groupData.apply(this,[z,N,V,D.approximation]),K=Z.groupedXData,J=Z.groupedYData,tt=0;for(D&&D.smoothed&&K.length&&(D.firstAnchor="firstPoint",D.anchor="middle",D.lastAnchor="lastPoint",u(32,!1,A,{"dataGrouping.smoothed":"use dataGrouping.anchor"})),P=1;P=Q[0]){let lt;ht++;let xt=$.groupMap[0].start,wt=$.groupMap[0].length;b(xt)&&b(wt)&&(lt=xt+(wt-1)),Q[0]={start:Q[0],middle:Q[0]+.5*st,end:Q[0]+st,firstPoint:$.xData[0],lastPoint:lt&&$.xData[lt]}[ot]}if(rt>0&&at&&st&&Q[rt]>=et-st){ct--;let lt=$.groupMap[$.groupMap.length-1].start;Q[rt]={start:Q[rt],middle:Q[rt]+.5*st,end:Q[rt]+st,firstPoint:lt&&$.xData[lt],lastPoint:$.xData[$.xData.length-1]}[at]}if(nt&&nt!=="start"){let lt=st*{middle:.5,end:1}[nt];for(;ct>=ht;)Q[ct]+=lt,ct--}}(this,K,U),d&&(g((_=K)[0])&&b(X.min)&&b(X.dataMin)&&_[0]X.max&&((!g(X.options.max)&&b(X.dataMax)&&X.max>=X.dataMax||X.max===X.dataMax)&&(X.max=Math.max(_[_.length-1],X.max)),X.dataMax=Math.max(_[_.length-1],X.dataMax))),D.groupAll&&(this.allGroupedData=J,K=(M=this.cropData(K,J,X.min,X.max)).xData,J=M.yData,this.cropStart=M.start),this.processedXData=K,this.processedYData=J}else this.groupMap=null,this.currentDataGrouping=void 0;this.hasGroupedData=F,this.preventGraphAnimation=(f&&f.totalRange)!==(y&&y.totalRange)}function L(){this.groupedData&&(this.groupedData.forEach(function(I,_){I&&(this.groupedData[_]=I.destroy?I.destroy():null)},this),this.groupedData.length=0,delete this.allGroupedData)}function S(){m.apply(this),this.destroyGroupedData(),this.groupedData=this.hasGroupedData?this.points:null}function w(){return this.is("arearange")?"range":this.is("ohlc")?"ohlc":this.is("hlc")?"hlc":this.is("column")||this.options.cumulative?"sum":"average"}function R(I,_,P,F){let A=this,D=A.data,C=A.options&&A.options.data,d=[],f=[],y=[],M=I.length,k=!!_,T=[],z=A.pointArrayMap,N=z&&z.length,G=["x"].concat(z||["y"]),X=this.options.dataGrouping&&this.options.dataGrouping.groupAll,j,B,W,Y=0,U=0,q=typeof F=="function"?F:F&&e[F]?e[F]:e[A.getDGApproximation&&A.getDGApproximation()||"average"];if(N){let V=z.length;for(;V--;)T.push([])}else T.push([]);let H=N||1;for(let V=0;V<=M;V++)if(!(I[V]=P[Y+1]||V===M;){j=P[Y],A.dataGroupInfo={start:X?U:A.cropStart+U,length:T[0].length,groupStart:j},W=q.apply(A,T),A.pointClass&&!g(A.dataGroupInfo.options)&&(A.dataGroupInfo.options=v(A.pointClass.prototype.optionsToObject.call({series:A},A.options.data[A.cropStart+U])),G.forEach(function(Z){delete A.dataGroupInfo.options[Z]})),W!==void 0&&(d.push(j),f.push(W),y.push(A.dataGroupInfo)),U=V;for(let Z=0;Z{let c=h.axis.getExtremes(),g=c.min,u=c.max,p=n(h.axis.minPointOffset,0);return r(g)&&r(u)&&h.value>=g-p&&h.value<=u+p&&!h.axis.options.isInternal})[0]},getFieldType:function(a,h){let c=l[a],g=typeof h;return i(c)&&(g=c),{string:"text",number:"number",boolean:"checkbox"}[g]}}}),s(t,"Extensions/MouseWheelZoom/MouseWheelZoom.js",[t["Core/Utilities.js"],t["Extensions/Annotations/NavigationBindingsUtilities.js"]],function(e,i){let r,{addEvent:n,isObject:l,pick:a,defined:h,merge:c}=e,{getAssignedAxis:g}=i,u=[],p={enabled:!0,sensitivity:1.1},b=m=>(l(m)||(m={enabled:m??!0}),c(p,m)),v=function(m,E,L,S,w,R,O){let I=a(O.type,m.zooming.type,""),_=[];I==="x"?_=L:I==="y"?_=S:I==="xy"&&(_=m.axes);let P=m.transform({axes:_,to:{x:w-5,y:R-5,width:10,height:10},from:{x:w-5*E,y:R-5*E,width:10*E,height:10*E},trigger:"mousewheel"});return P&&(h(r)&&clearTimeout(r),r=setTimeout(()=>{m.pointer?.drop()},400)),P};function x(){let m=b(this.zooming.mouseWheel);m.enabled&&n(this.container,"wheel",E=>{E=this.pointer?.normalize(E)||E;let{pointer:L}=this,S=L&&!L.inClass(E.target,"highcharts-no-mousewheel");if(this.isInsidePlot(E.chartX-this.plotLeft,E.chartY-this.plotTop)&&S){let w=m.sensitivity||1.1,R=E.detail||(E.deltaY||0)/120,O=g(L.getCoordinates(E).xAxis),I=g(L.getCoordinates(E).yAxis);v(this,Math.pow(w,R),O?[O.axis]:this.xAxis,I?[I.axis]:this.yAxis,E.chartX,E.chartY,m)&&E.preventDefault?.()}})}return{compose:function(m){u.indexOf(m)===-1&&(u.push(m),n(m,"afterGetContainer",x))}}}),s(t,"masters/modules/mouse-wheel-zoom.src.js",[t["Core/Globals.js"],t["Extensions/MouseWheelZoom/MouseWheelZoom.js"]],function(e,i){return e.MouseWheelZoom=e.MouseWheelZoom||i,e.MouseWheelZoom.compose(e.Chart),e}),s(t,"masters/modules/stock.src.js",[t["Core/Globals.js"],t["Series/DataModifyComposition.js"],t["Stock/Navigator/Navigator.js"],t["Core/Axis/OrdinalAxis.js"],t["Stock/RangeSelector/RangeSelector.js"],t["Stock/Scrollbar/Scrollbar.js"],t["Core/Chart/StockChart.js"],t["Series/OHLC/OHLCSeries.js"],t["Series/Flags/FlagsSeries.js"]],function(e,i,r,n,l,a,h,c,g){return e.Navigator=e.Navigator||r,e.OrdinalAxis=e.OrdinalAxis||n,e.RangeSelector=e.RangeSelector||l,e.Scrollbar=e.Scrollbar||a,e.stockChart=e.stockChart||h.stockChart,e.StockChart=e.StockChart||e.stockChart,e.extend(e.StockChart,h),i.compose(e.Series,e.Axis,e.Point),g.compose(e.Renderer),c.compose(e.Series),e.Navigator.compose(e.Chart,e.Axis,e.Series),e.OrdinalAxis.compose(e.Axis,e.Series,e.Chart),e.RangeSelector.compose(e.Axis,e.Chart),e.Scrollbar.compose(e.Axis),e.StockChart.compose(e.Chart,e.Axis,e.Series,e.SVGRenderer),e})})});var Du=qe((NT,Un)=>{"use strict";(function(o){typeof Un=="object"&&Un.exports?(o.default=o,Un.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/solid-gauge",["highcharts","highcharts/highcharts-more"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/SolidGaugeAxis.js",[t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Utilities.js"]],function(e,i){let{extend:r}=i;return{init:function(n){r(n,e)}}}),s(t,"Series/SolidGauge/SolidGaugeSeriesDefaults.js",[],function(){return{colorByPoint:!0,dataLabels:{y:0}}}),s(t,"Series/SolidGauge/SolidGaugeSeries.js",[t["Extensions/BorderRadius.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Axis/SolidGaugeAxis.js"],t["Series/SolidGauge/SolidGaugeSeriesDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{gauge:a,pie:h}=i.seriesTypes,{clamp:c,extend:g,isNumber:u,merge:p,pick:b,pInt:v}=l;class x extends a{translate(){let E=this.yAxis;r.init(E),!E.dataClasses&&E.options.dataClasses&&E.initDataClasses(E.options),E.initStops(),a.prototype.translate.call(this)}drawPoints(){let E,L=this.yAxis,S=L.center,w=this.options,R=this.chart.renderer,O=w.overshoot,I=w.rounded&&w.borderRadius===void 0,_=u(O)?O/180*Math.PI:0;for(let P of(u(w.threshold)&&(E=L.startAngleRad+L.translate(w.threshold,void 0,void 0,void 0,!0)),this.thresholdAngleRad=b(E,L.startAngleRad),this.points))if(!P.isNull){let F=v(b(P.options.radius,w.radius,100))*S[2]/200,A=v(b(P.options.innerRadius,w.innerRadius,60))*S[2]/200,D=Math.min(L.startAngleRad,L.endAngleRad),C=Math.max(L.startAngleRad,L.endAngleRad),d=P.graphic,f=L.startAngleRad+L.translate(P.y,void 0,void 0,void 0,!0),y,M,k=L.toColor(P.y,P);k==="none"&&(k=P.color||this.color||"none"),k!=="none"&&(P.color=k),f=c(f,D-_,C+_),w.wrap===!1&&(f=c(f,D,C));let T=I?(F-A)/2/F:0,z=Math.min(f,this.thresholdAngleRad)-T,N=Math.max(f,this.thresholdAngleRad)+T;N-z>2*Math.PI&&(N=z+2*Math.PI);let G=I?"50%":0;w.borderRadius&&(G=e.optionsToObject(w.borderRadius).radius),P.shapeArgs=y={x:S[0],y:S[1],r:F,innerR:A,start:z,end:N,borderRadius:G},P.startR=F,d?(M=y.d,d.animate(g({fill:k},y)),M&&(y.d=M)):P.graphic=d=R.arc(y).attr({fill:k,"sweep-flag":0}).add(this.group),this.chart.styledMode||(w.linecap!=="square"&&d.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),d.attr({stroke:w.borderColor||"none","stroke-width":w.borderWidth||0})),d&&d.addClass(P.getClassName(),!0)}}animate(E){E||(this.startAngleRad=this.thresholdAngleRad,h.prototype.animate.call(this,E))}}return x.defaultOptions=p(a.defaultOptions,n),i.registerSeriesType("solidgauge",x),x}),s(t,"masters/modules/solid-gauge.src.js",[t["Core/Globals.js"]],function(e){return e})})});var Qn=qt(ys());var _h="Oxygen",wh="mdx2json.emptyportlet",Sh="DSW.Addons.";var ye=(()=>{let t=class t{constructor(){this.model={},this.el=$t(ah),this.cd=$t(dh),this.ds=$t(gh),this.ss=$t(xh),this.bs=$t(yh),this.us=$t(mh),this.i18n=$t(fh),this.route=$t(ph),this.fs=$t(vh),this.dbs=$t(bh),this.isSpinner=!0,this.drills=[],this.drillFilterWidgets=[],this.customDataSource="",this.preventColFilteringBasedOnDataProperties=!1,this.drillFilter="",this.drillFilterDrills=[],this.customColSpec="",this.customRowSpec="",this.linkedMdx="",this.canDoDrillthrough=!1,this.firstRun=!0,this.baseType="",this.hasDatasourceChooser=!1,this.oneItemDrillApplied=!1}get inline(){return this.widget.inline}ngOnInit(){this.baseType=this.widget?.type,this.override=this.getOverride(),this.extendPropsWithOverrides(),this.loadWidgetSettings(),this.initializeDrills(),this.initializeTile(),this.initializeActionAndPvItems(),this.initializeDataSourceChooser(),this.initializeDrillthrough(),this.initializeLiveDataUpdate(),this.subscribe(),this.initializeLinkedWidgets(),this.initializeDependants(),this.initializeDrillFilter(),this.initializeChoseDataSource(),this.initializeInputControls(),this.initializeActions(),this.requestPivotData(),this.initializeDataRequest()}ngOnDestroy(){clearInterval(this.liveUpdateInterval),this.subDrilldown?.unsubscribe(),this.subDrillthrough?.unsubscribe(),this.subLinkedMdx?.unsubscribe(),this.subRefreshDependants?.unsubscribe(),this.subDrillFilter?.unsubscribe(),this.subDrillFilterAll?.unsubscribe(),this.subPivotVar?.unsubscribe(),this.subPivotVarAll?.unsubscribe(),this.subDataSourceChange?.unsubscribe(),this.subColSpec?.unsubscribe(),this.subColSpecAll?.unsubscribe(),this.subChartType?.unsubscribe()}getDataProp(e){if(this.widget.dataProperties)return this.widget.dataProperties.find(i=>i.name===e)}getDataPropByDataValue(e){if(!this.widget.dataProperties)return;let i=e.split("/");return this.widget.dataProperties.find(r=>{let n=r.dataValue?.toString().split("/");return i.some(l=>n.includes(l))})}getDataPropValue(e){let i=this.getDataProp(e);if(i&&i.dataValue!==null&&i.dataValue!==void 0)return i.dataValue.toString()}initializeActions(){if(!this.widget.controls||this.widget.controls.length===0)return;let e=["chooserowspec","setrowspec","choosedatasource","choosecharttype","applyfilter","setfilter","refresh","reloaddashboard","showlisting","showgeolisting","showbreakdown","setdatasource","applyvariable","setrowcount","setrowsort","setcolumncount","setcolumnsort","choosecolumnspec"],i=this.widget.controls.filter(r=>e.indexOf(r.action.toLowerCase())===-1&&r.type!=="hidden");i.length!==0&&(this.widget.acItems=i)}initializeChoseDataSource(){return Yt(this,null,function*(){if(!this.widget)return;let e=n=>n.action==="chooseDataSource"||n.action==="chooseRowSpec"||n.action==="setRowSpec"||n.action==="chooseColumnSpec",i=this.widget.type===wh;if(!i&&(!this.widget.controls||this.widget.controls.length===0))return;let r=[];if(this.widget.controls&&(r=this.widget.controls.filter(e).filter(n=>n.location!=="dashboard")),i){let n=this.dbs.getWidgets();for(let l=0;la.location==="dashboard")))}if(r.length!==0){this.hasDatasourceChooser=!0,this.widget.dsItems=[];for(let n=0;n{h[b]=p[v]})}}let g={action:r[n].action,label:r[n].label||this.i18n.get("dataSource"),dsSelected:r[n].value,control:r[n],labels:[],values:[],field:"select"};this.widget.dsItems.push(g);let u=null;if(c?u=yield this.ds.getTermList(c):u=h,u&&typeof u=="object"){for(let b in u)u[b]===this.widget.dataSource&&(this.widget.dsSelected=b);g.labels=[],g.values=[],(g.control?.action==="chooseRowSpec"||g.control?.action==="setRowSpec")&&(g.labels.push(""),g.values.push(""));for(let b in u)g.labels.push(b),g.values.push(u[b]);let p=-1;this.customDataSource?p=g.values.findIndex(b=>b===this.customDataSource):p=g.values.findIndex(b=>b.split("/").pop()===g.dsSelected),p===-1?g.dsSelected=g.labels[0]:g.dsSelected=g.labels[p],this.parent?.filters.detectChanges()}}}})}onVariableChange(e){let i=e.target;this.bs.broadcast(`updatePivotVar:${i}`)}onPivotVarChanged(){this.requestData()}getDataByColumnName(e,i,r,n=""){if(!e||!e.Data||!e.Cols||!e.Cols[0]||!e.Cols[0].tuples)return;let l=e.Cols[0].tuples.filter(g=>g.caption.toLowerCase()===i.toLowerCase());if(l.length===0)return;let a=e.Cols[0].tuples.indexOf(l[0]),h=e.Cols[0].tuples[a].originalIndex;h!==void 0&&(a=h);let c=e.Data[r+a];return n&&(c=this.formatNumber(c,n)),c}initializeDrillFilter(){let e=this.fs.getClickFilterTarget(this.widget.name);e?.length&&(this.drillFilterWidgets=e)}resetClickFilter(){if(this.widget.clickFilterActive=!1,!(!this.drillFilterWidgets||!this.drillFilterWidgets.length))for(let e=0;e{this.bs.broadcast("drillFilter:"+r,{path:"",drills:[]})})}}doDrillFilter(e,i=[]){if(!this.drillFilterWidgets||!this.drillFilterWidgets.length)return;let r=i.slice();e||r.pop(),this.widget.clickFilterActive=!!e;for(let n=0;n{this.bs.broadcast("drillFilter:"+a,{path:e,drills:r})})}this.parent?.header?.cd.detectChanges()}onDrillFilter(e,i){this.drillFilter=e,this.drillFilterDrills=i,this.requestData()}actionNavigate(e,i=!1){let r=e.targetProperty,n=r.toUpperCase().indexOf("DASHBOARD=");if(n!==-1){let l=r.substring(n+10,r.length);l.indexOf("?")===-1&&(l=l.replace("&","?"));let a=location.href;a.indexOf("#")!==-1?r=a.split("#")[0]+"#/"+xs+"/"+l:r+="#/"+xs+"/"+l}if(r=r.replace("$$$FILTERS",this.fs.getFiltersUrlString(this.widget.name)),this.lpt&&this.lpt.getSelectedRows().length){let l=this.lpt.dataController.getData(),a=l.dataArray[(this.lpt.getSelectedRows()[0]-1)*l.columnProps.length],h=r.toLowerCase().indexOf("$$$currvalue");h!==-1&&(r=r.substring(0,h)+a+r.substring(h+12,r.length))}if(this.lpt&&this.lpt.getSelectedRows().length){let l=this.lpt.dataController.getData(),a=this.lpt.getSelectedRows(),h=[];for(let g=0;gthis.requestData())}getDrillTitle(e){if(!e)return this.widget.baseTitle||"";let i=e.path.split(".");return i.pop(),(this.widget.baseTitle?this.widget.baseTitle+" - ":"")+(e.name?i[i.length-1]+" - ":"")+(e.name||e.category)}isEmptyData(e){return!e||!e.Cols||!e.Cols[1]||!e.Cols[1]||!e.Cols[1].tuples||e.Cols[1].tuples.length===0||!e.Data||e.Data.length===0||e.Data[0]==="@NOPROPERTY"}doDrillUp(){this.widget.isDrillthrough?(this.restoreWidgetType(),this.widget.isDrillthrough=!1,this.widget.backButton=!!this.drills?.length,this.parent.header?.cd.detectChanges()):this.doDrillOnly()}restoreWidgetType(){delete this.widget.pivotMdx,delete this.widget.pivotData,this.widget?.oldType&&(this.widget.type=this.widget.oldType,this.parent?.updateComponent())}changeWidgetType(e){this.widget.oldType=this.widget.type,this.widget.type=e,this.parent?.updateComponent()}getDrillthroughMdx(e){let i=e.toLowerCase(),r="select non empty",n=i.lastIndexOf(r);n===-1&&(r="select",n=i.lastIndexOf(r));let l=i.lastIndexOf("from");if(n===-1){console.warn("Can't find 'select' in MDX during calculation drillthrough mdx");return}if(l===-1){console.warn("Can't find 'from' in MDX during calculation drillthrough mdx");return}let a="";if(this.pivotData?.listingRows){let c=parseInt(this.pivotData.listingRows,10);c&&(a=` MAXROWS ${c} `)}let h=this.widget.controls.find(c=>c.action==="showListing");if(h){let c=h.targetPropertyDisplay;if(c)return"DRILLTHROUGH "+a+e.substring(0,n+r.length)+" "+e.substring(l,e.length)+` %LISTING [${c}]`}return"DRILLTHROUGH "+a+e.substring(0,n+r.length)+" "+e.substring(l,e.length)}doDrill(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{this.clearError(),l||this.doDrillFilter(e,this.drills);let u=this.drills.slice();e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading();let b=()=>{if(n){n();return}if(!this.canDoDrillthrough)return;let v=this.getDrillthroughMdx(p)||"";this.ds.execMDX(v).then(x=>{!x||!x.children||x.children.length===0||(this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.widget.pivotData=x,this._currentData=x,this.displayAsPivot(v))}).catch(x=>{h&&h(x)})};this.showLoading(),this.ds.execMDX(p).catch(v=>{l?h&&h(v):b()}).then(v=>{if(v){if(this.chartConfig&&(this.chartConfig.loading=!1),this.isEmptyData(v)&&e){b();return}this.isEmptyData(v)||(e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop(),this.widget.backButton=this.drills.length!==0,this.widget.title=this.getDrillTitle(this.drills[this.drills.length-1]),this.broadcastDependents(p),this.retrieveData(v),this.updateLocationDrillParameters(),this.parent?.header?.cd.detectChanges(),this._currentData=v,a&&a())}}).finally(()=>{this.hideLoading(),c()})})}doDrillthrough(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{if(!this.canDoDrillthrough){c();return}this.clearError();let u=this.drills.slice();e?Array.isArray(e)?e.forEach(v=>{this.drills.push({path:v,name:i||"",category:r})}):this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading();let b=this.getDrillthroughMdx(p)||"";this.ds.execMDX(b).then(v=>{!v||!v.children||v.children.length===0||(this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.widget.pivotData=v,this.displayAsPivot(b))}).catch(v=>{h&&h(v)}).finally(()=>{this.hideLoading()})})}doDrillOnly(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{this.clearError();let u=this.drills.slice();e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading(),this.ds.execMDX(p).catch(b=>{h&&h(b)}).then(b=>{b&&(this.chartConfig&&(this.chartConfig.loading=!1),!this.isEmptyData(b)&&(this._currentData=b,e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop(),this.widget.backButton=this.drills.length!==0,this.widget.title=this.getDrillTitle(this.drills[this.drills.length-1]),this.broadcastDependents(p),this.retrieveData(b),this.updateLocationDrillParameters(),this.parent?.header?.cd.detectChanges(),a&&a()))}).finally(()=>{this.hideLoading(),c()})})}checkForAutoDrill(e){return Yt(this,null,function*(){let i=!1;return e?.Cols[1]?.tuples?.length===1&&(this.oneItemDrillApplied=!0,yield this.doDrill(e.Cols[1].tuples[0].path,e.Cols[1].tuples[0].caption,void 0,void 0,!0,()=>{this.widget.backButton=!1,this.parent?.header?.cd.detectChanges(),i=!0},()=>{this.oneItemDrillApplied=!1})),i})}showLoading(){this.isSpinner||(this.isSpinner=!0,this.parent.cd.detectChanges(),this.cd.detectChanges())}hideLoading(){this.isSpinner&&(this.isSpinner=!1,this.parent.cd.detectChanges(),this.cd.detectChanges())}applyDrill(e){let i=this.route.snapshot.queryParamMap.get("filter");i&&(e=e+" %FILTER "+i);let r=this.drills;if(r.length===0&&(r=this.drillFilterDrills),r.length===0)return e;let n=[];this.pivotData&&this.pivotData.rowAxisOptions&&this.pivotData.rowAxisOptions.drilldownSpec&&(n=this.pivotData.rowAxisOptions.drilldownSpec.split("^"));for(let g=0;gthis._retriveDataSource(i)).catch(i=>{this.showError(i.error?.Error||i.message)})}convertKPIToMDXData(e,i=!1){let r=e,n=e.Result,l={Info:{cubeName:r.Info.KpiName},Cols:[],Data:[]},a=[];for(let c=0;cthis.broadcastDependents(),0),e.indexOf("$")!==-1&&!this.pivotVariables&&this.ds.getPivotVariables(this.widget.cube).then(i=>{this.pivotVariables=i}).catch(i=>{this.showError(i.message)}),this.showLoading(),this.ds.execMDX(e).then(i=>{this.removeColsThatNotExistInDataProperties(i),this._currentData=i,this.retrieveData(i)}).catch(i=>this._onRequestError(i)).finally(()=>{this.hideLoading()})}broadcastDependents(e){if(this.hasDependents())for(let i=0;in.action==="applyVariable");if(this.widget.shared){let n=this.route.snapshot.queryParamMap.get("variables");n&&n.split("~").forEach(a=>{let h=a.split("."),c=h[0],g=h[1],u=r.findIndex(p=>p.targetProperty==="$variable."+c);u!==-1?r[u].value=g:r.push({targetProperty:"$variable."+c,value:g})})}if(!r.length)return e;for(let n=0;nu+b+(g?".%NOT":"")).join(",")||"",e+="})"}else e+=" %FILTER "+c}}return e}dateToHorolog(e){let i=new Date("12/31/1840Z"),n=this.us.toDate(e).getTime()-i.getTime();return Math.ceil(n/(1e3*3600*24)).toString()}getMDX(){let e=!1;if(this.widget.kpitype)return"";let i=this.fs.getWidgetFilters(this.widget.name);if(this.isLinked()){let l=this.replaceMDXVariables(this.linkedMdx||this.widget.linkedMdx||"",i);return l=this.checkColSpec(l),this.applyDrill(l)}if(this.drillFilter){let l=this.drillFilter.indexOf("&");l!==-1&&i.push({targetProperty:this.drillFilter.substring(0,l-1),value:"&"+this.drillFilter.substring(l+1,this.drillFilter.length)})}for(let l=0;l{this.onResize()},0))}displayAsPivot(e){this.widget.type==="pivot"?(this.widget.isDrillthrough=!1,this.restoreWidgetType()):(this.widget.pivotMdx=e||this.getMDX(),this.changeWidgetType("pivot")),this.parent?.cd&&this.parent.cd.detectChanges()}formatNumber(e,i=""){let r="";if(e==null&&(e=""),i?r=(0,Qn.default)(e).format(i.replace(/;/g,""))||"":r=e.toString(),this.dataInfo){let n=this.dataInfo.numericGroupSeparator,l=this.dataInfo.numericGroupSize||3;if(n){let a=r.split(".");a[0]=a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),r=a.join(".")}this.dataInfo.decimalSeparator&&(r=r.replace(/\./g,this.dataInfo.decimalSeparator))}return r}getDrillsAsParameter(){let e=this.drills;return e?.length?encodeURIComponent(e.map(i=>i.path).join("~")):""}getFormat(e,i,r){let n="";return this.widget?.format&&(n=this.widget.format),i.Cols[0].tuples[e].format&&(n=i.Cols[0].tuples[e].format),r?.format&&(n=r?.format),n}getDataValue(e,i,r){let n=i.Data[e],l=this.getFormat(e,i,r);return l&&(n=(0,Qn.default)(n).format(l)),n}_requestKPIData(e){let i=this.customDataSource||this.widget.dataSource;if(!i)return;let r=this.fs.getWidgetFilters(this.widget.name)?.filter(n=>!!n.value).map(n=>n.value.toString().split("|").map(a=>({name:n.targetProperty,value:a}))).flat();return e&&r.push(...e),this.showLoading(),this.ds.getKPIData(i,r,!!e).then(n=>this._retriveKPI(n,!!e)).finally(()=>{this.hideLoading()})}removeColsThatNotExistInDataProperties(e){if(this.preventColFilteringBasedOnDataProperties||!this.widget.dataProperties?.length||!e?.Cols[0]?.tuples?.length)return;let i=[],r=e.Cols[0]?.tuples?.length||0;r&&(e.Cols[0].tuples=e?.Cols[0]?.tuples.filter((n,l)=>{let a=n.dimension.toString().split("/"),h=this.widget.dataProperties.some(c=>c.dataValue.toString().split("/").some(u=>a.includes(u)));return h||i.push(l),h}),e.Data=e.Data?.filter((n,l)=>!i.some(a=>l%r===a)))}subscribe(){this.subDrillFilter=this.bs.subscribe("drillFilter:"+this.widget.name,({path:e,drills:i})=>{this.onDrillFilter(e,i)}),this.subDrillFilterAll=this.bs.subscribe("drillFilter:*",({path:e,drills:i})=>{this.onDrillFilter(e,i)}),this.subDrilldown=this.bs.subscribe("drilldown:"+this.widget.name,({path:e,title:i})=>{this.doDrillOnly(e,i,i)}),this.subDrillthrough=this.bs.subscribe("drillthrough:"+this.widget.name,({path:e,title:i})=>{this.doDrillthrough(e,i,i)}),this.subPivotVar=this.bs.subscribe("updatePivotVar:"+this.widget.name,e=>this.onPivotVarChanged()),this.subPivotVarAll=this.bs.subscribe("updatePivotVar:*",e=>this.onPivotVarChanged()),this.subColSpec=this.bs.subscribe("setColSpec:"+this.widget.name,e=>this.onColSpecChanged(e)),this.subColSpecAll=this.bs.subscribe("setColSpec:*",e=>this.onColSpecChanged(e)),this.subDataSourceChange=this.bs.subscribe("changeDataSource:"+this.widget.name,e=>this.changeDataSource(e)),this.subChartType=this.bs.subscribe("setWidgetType:"+this.widget.name,e=>{this.changeWidgetType(e)})}getOverride(){let e=this.baseType;return e==="lineChartMarkers"&&(e="lineChart"),e==="regular"&&(e="scoreCard"),this.widget?.overrides?.find(i=>i._type===e)}updateLocationDrillParameters(){if(!this.widget?.shared)return;let e=location.hash,i=this.getDrillsAsParameter();this.ds.router.navigate([],{relativeTo:this.route,queryParams:{drilldown:i},queryParamsHandling:"merge"});let r={type:"drill",index:this.route.snapshot.queryParamMap.get("widget"),widget:this.widget,drills:this.drills};window.parent&&window.parent.postMessage(r,"*");try{window.parent.dsw?.onDrill&&window.parent.dsw.onDrill(r)}catch(n){console.error(n)}}updateDatasourceParameterInURL(){if(!this.widget?.shared)return;this.ds.router.navigate([],{relativeTo:this.route,queryParams:{datasource:this.customDataSource},queryParamsHandling:"merge"});let e={type:"datasource",index:this.route.snapshot.queryParamMap.get("widget"),widget:this.widget,datasource:this.customDataSource};window.parent&&window.parent.postMessage(e,"*");try{window.parent.dsw?.onDataSource&&window.parent.dsw.onDataSource(e)}catch(i){console.error(i)}}navigateDashboard(e){this.ds.router.navigateByUrl(xs+"/"+e)}initializeInputControls(){let e="setRowCount";this.widget.controls.filter(r=>e.includes(r.action)).forEach(r=>{this.widget.dsItems.push({action:r.action,label:r.label||"Row count",field:"input",type:"number",_value:r.value||void 0})})}applyRowCount(e){let i=this.widget.dsItems.find(h=>h.action==="setRowCount");if(!i||!i._value)return e;let r=/(HEAD\(.*),(.*)(\))/i;if(e.match(r))return e.replace(r,`$1,${i._value}$3`);let l=e.match(/ON 0,(.*)ON 1/)?.[1];if(!l)return e;l=l.replace("NON EMPTY","");let a=" HEAD("+l.trim()+`, ${i._value}) `;return e.replace(l,a)}extendPropsWithOverrides(){this.override&&this.override.columns?.forEach((e,i)=>{let r=this.widget.dataProperties[i];r&&(e.showAs&&(r.showAs=e.showAs),e.format&&(r.format=e.format),e.display&&(r.display=e.display),e.label&&(r.label=e.label),e.summary&&(r.summary=e.summary),e.rangeLower&&(r.rangeLower=e.rangeLower),e.rangeUpper&&(r.rangeUpper=e.rangeUpper),e.targetValue&&(r.targetValue=e.targetValue),e.thresholdLower&&(r.thresholdLower=e.thresholdLower),e.thresholdUpper&&(r.thresholdUpper=e.thresholdUpper))})}initializeDataSourceChooser(){this.widget.dsItems=[],this.widget.dsLabel="",this.widget.dsSelected="",this.widget&&this.widget.dataSource&&(this.widget.dsSelected=this.us.removeExt(this.widget.dataSource.split("/").pop()))}initializeLiveDataUpdate(){if(!(this.widget&&this.widget.controls))return;let e=this.widget.controls.filter(r=>r.action==="setColumnSpec");e.length!==0&&(this.customColSpec=e[0].targetProperty);let i=this.widget.controls.filter(r=>r.action==="refresh"&&parseInt(r.timeout,10)>0);i.length!==0&&(this.liveUpdateInterval=setInterval(()=>this.requestData(),parseInt(i[0].timeout,10)*1e3))}initializeLinkedWidgets(){if(this.isLinked())if(this.widget.shared||this.widget.inline||this.widget.edKey){let i=this.dbs.getAllWidgets().find(r=>r.name===this.widget.dataLink);i&&(this.linkedMdx=i.mdx)}else this.subLinkedMdx=this.bs.subscribe("setLinkedMDX:"+this.widget.name,e=>this.onSetLinkedMdx(e))}loadWidgetSettings(){let e=this.ss.getAppSettings(),i=e.theme||"";this.widgetsSettings=this.ss.getWidgetsSettings(this.widget.dashboard)||{},this.tc=e?.themeColors?.[i];let r=this.widgetsSettings?.[this.widget.name]?.themeColors?.[i];r&&(this.tc=r)}initializeDrills(){this.widget?.drills&&(this.drills=this.widget.drills)}initializeTile(){this.tile&&(this.widget={},this.us.mergeRecursive(this.widget,this.tile))}initializeActionAndPvItems(){this.widget.acItems=[],this.widget.pvItems=[]}initializeDrillthrough(){this.widget.controls&&this.widget.controls.length&&(this.canDoDrillthrough=!0)}initializeDependants(){this.hasDependents()&&(this.subRefreshDependants=this.bs.subscribe("widget:"+this.widget.name+":refreshDependents",e=>this.onRefreshDependents()))}initializeDataRequest(){this.widget?.properties?.chartToggle==="table"&&this.widget.type!=="pivot"&&!this.widget.oldType?this.requestData():this.customDataSource||this.requestData()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=yt({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(i,r){i&2&&je("inline",r.inline)},inputs:{model:"model",parent:"parent",widget:"widget"},standalone:!0,features:[bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var ep=["images"];function ip(o,t){if(o&1){let s=hh();Lt(0,"div",2),ch("click",function(){let i=sh(s).$implicit,r=Nt();return rh(r.onClick(i))}),nh(),Lt(1,"svg",3,0)(3,"text"),ie(4),Lt(5,"tspan",4),ie(6),kt(),Lt(7,"tspan",5),ie(8),kt()()(),oh(),Lt(9,"label"),ie(10),kt()()}if(o&2){let s=t.$implicit,e=Nt();je("clickable",e.canDrillthrough),Dt(3),Ee("fill",s.valueColor),Dt(),ms("",s.value," "),Dt(2),Te(s.deltaNeg),Dt(2),Te(s.delta),Dt(2),Te(s.label)}}var Mh=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.images=[],this.widget={},this.textData=[]}get flexDirection(){let e=this.el?.nativeElement;if(e)return e.offsetWidth>e.offsetHeight?"row":"column"}get canDrillthrough(){return this.canDoDrillthrough}ngOnInit(){this.textData=[],super.ngOnInit()}ngAfterViewInit(){}findDataPropByName(e){if(this.widget.dataProperties){for(let i=0;i{let i=e.nativeElement,n=i.firstChild.getBBox();i.setAttribute("viewBox",[n.x,n.y,n.width,n.height].join(" "))})}retrieveData(e){if(this.textData=[],this.hideLoading(),e)for(let i=0;iu){let b=this.widget.properties?.highRangeColor;p.highStyle&&(b=this.getCss(p.highStyle).fill),b&&(c=b)}}this.textData.push({label:a,value:n,color:l,valueColor:c,dimension:e.Cols[0].tuples[i].dimension})}}this.cd.detectChanges(),setTimeout(()=>this.adjustSize())}onClick(e){this.doDrillthrough("",e.label)}getCss(e){let i={};return e.split(";").filter(r=>r).forEach(r=>{let n=r.split(":");i[n[0]]=n[1]}),i}getNumber(e){return typeof e=="string"?parseFloat(e.replace(/,/g,"").replace(/ /g,"")):e}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-wtext"]],viewQuery:function(i,r){if(i&1&&$i(ep,5),i&2){let n;Ji(n=Qi())&&(r.images=n)}},hostVars:2,hostBindings:function(i,r){i&2&&Ee("flex-direction",r.flexDirection)},inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[["images",""],[1,"item2",3,"clickable"],[1,"item2",3,"click"],[1,"text-widget"],[2,"font-size","4px","fill","red"],[2,"font-size","4px","fill","green"]],template:function(i,r){i&1&&oe(0,ip,11,8,"div",1,ne),i&2&&ae(r.textData)},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-display:row;width:100%;height:100%;font-family:Oxygen;-webkit-user-select:initial;user-select:initial}.inline[_nghost-%COMP%] label[_ngcontent-%COMP%]{background-color:transparent;background-image:none}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}label[_ngcontent-%COMP%]{display:block;flex-shrink:0;height:16px;background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8);width:100%;text-align:center;font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item2[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 100%;justify-content:center;align-items:center;margin:10px;background-color:#fafafa;padding:10px;min-height:0;min-width:0}.item2.clickable[_ngcontent-%COMP%]{cursor:pointer}.item2[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{height:auto;background:transparent;color:gray;font-size:19px}.item2[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{height:50%;width:100%;display:block}.text-widget[_ngcontent-%COMP%]{height:100%}"]});let o=t;return o})();var to=(()=>{let t=class t extends ye{constructor(){super(),this.widget={},this.isSpinner=!1,this._oldMdx=""}ngAfterViewInit(){this.createPivotTable()}ngOnDestroy(){super.ngOnDestroy()}createPivotTable(){let e=this,i={initialData:this.widget.pivotData,container:this.el.nativeElement,pivotProperties:{},enableListingSelect:!1,enableSearch:!1,dataSource:{pivot:this.widget.dataSource,MDX2JSONSource:this.ds.url.substring(0,this.ds.url.length-1),basicMDX:this.widget.pivotMdx||this.getMDX(),namespace:xs,sendCookies:!0},triggers:{drillDown:r=>this.onDrillDown(r),rowClick:(r,n,l)=>e.drillFilterWidgets?.length?(e.doDrillFilter(l.source.path,e.drills),e.parent?.header?.cd.detectChanges(),!1):!this.widget.kpitype,back:r=>this.onDrillDown(r),cellDrillThrough:(...r)=>this.onDrillThrough(...r),responseHandler:r=>{r.status!==200&&this.showError(r.xhr.responseText)}},loadingMessageHTML:'',columnResizeAnimation:!0,locale:this.i18n.current,hideButtons:!0,formatNumbers:"#,###.##",controls:this.widget.controls};delete this.widget.pivotMdx,this.lpt=new LightPivotTable(i),this.widget.edKey&&this.lpt?.pivotView.displayMessage("")}doDrillUp(){this.widget.isDrillthrough&&this.restoreWidgetType?(this.widget.isDrillthrough=!1,this.restoreWidgetType(),this.widget.kpitype&&this.requestData()):this.lpt?.CONTROLS.back(),this.widget.backButton=this.lpt?.DRILL_LEVEL!==0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges()}onDrillThrough(...e){if(!this.canDoDrillthrough)return!1;if(this.widget.kpitype){let{cellData:i,x:r,y:n}=e[0],{info:l,dimensions:a}=e[1];if(!a[0])return;let h=a[0][r-l.leftHeaderColumnsNumber]?.dimension||"",c=a[0][0]?.dimension||"",g=a[1][n-l.topHeaderRowsNumber]?.title||"";if(!h||!c)return;let u=[{name:h,value:i.value,path:""},{name:c,value:g,path:""}];return this._requestKPIData(u)?.then(()=>{this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges()}),!1}return this._oldMdx=this.lpt?.getActualMDX()||"",this.widget.backButton=!0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges(),!0}onDrillDown(e){e.path?(this.doDrillFilter(e.path,this.drills),this.drills.push({path:e.path,name:"",category:""}),this.widget.backButton=!0):(this.drills.pop(),this.doDrillFilter(e.path,this.drills)),this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges(),this.broadcastDependents(e.mdx)}requestData(){let e=this.customDataSource||this.widget.dataSource;if(this.widget.kpitype){this._requestKPIData();return}if(this.lpt){let i=this.getMDX();if(this.lpt.isListing()&&(delete this.lpt.CONFIG.initialData,i.toLowerCase().substr(0,12)!=="drillthrough"&&(i=this.getDrillthroughMdx(i)||"")),i==="")return;this.drillFilter&&(i=i+" %FILTER "+this.drillFilter),this.broadcastDependents(),this.clearError(),this.lpt.changeBasicMDX(i)}}onResize(){this.lpt&&setTimeout(()=>this.lpt?.updateSizes(),100)}print(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=yt({type:t,selectors:[["dsw-pivot"]],inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},styles:["[_nghost-%COMP%]{height:100%}"]});let o=t;return o})();var eo=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var Jt=eo;var Be={PROPERTYCHANGE:"propertychange"};var io=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},bs=io;function $e(o,t){return o>t?1:o0?i-1:i}return e-1}if(s>0){for(let i=1;i0||s&&n===0)})}function xi(){return!0}function yi(){return!1}function Ge(){}function Ah(o){let t=!1,s,e,i;return function(){let r=Array.prototype.slice.call(arguments);return(!t||this!==i||!he(r,e))&&(t=!0,i=this,e=r,s=o.apply(this,arguments)),s}}function Je(o){for(let t in o)delete o[t]}function bi(o){let t;for(t in o)return!1;return!t}var so=class extends bs{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,s){if(!t||!s)return;let e=this.listeners_||(this.listeners_={}),i=e[t]||(e[t]=[]);i.includes(s)||i.push(s)}dispatchEvent(t){let s=typeof t=="string",e=s?t:t.type,i=this.listeners_&&this.listeners_[e];if(!i)return;let r=s?new Jt(t):t;r.target||(r.target=this.eventTarget_||this);let n=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});e in n||(n[e]=0,l[e]=0),++n[e];let a;for(let h=0,c=i.length;h0:!1}removeEventListener(t,s){let e=this.listeners_&&this.listeners_[t];if(e){let i=e.indexOf(s);i!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(e[i]=Ge,++this.pendingRemovals_[t]):(e.splice(i,1),e.length===0&&delete this.listeners_[t]))}}},Li=so;var ut={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function Mt(o,t,s,e,i){if(e&&e!==o&&(s=s.bind(e)),i){let n=s;s=function(){o.removeEventListener(t,s),n.apply(this,arguments)}}let r={target:o,type:t,listener:s};return o.addEventListener(t,s),r}function Cs(o,t,s,e){return Mt(o,t,s,e,!0)}function At(o){o&&o.target&&(o.target.removeEventListener(o.type,o.listener),Je(o))}var _s=class extends Li{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(ut.CHANGE)}getRevision(){return this.revision_}onInternal(t,s){if(Array.isArray(t)){let e=t.length,i=new Array(e);for(let r=0;r0;)this.pop()}extend(t){for(let s=0,e=t.length;sthis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(s),this.array_.splice(t,0,s),this.updateLength_(),this.dispatchEvent(new ws(Qt.ADD,s,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let s=this.getLength();return this.insertAt(s,t),this.getLength()}remove(t){let s=this.array_;for(let e=0,i=s.length;e=this.getLength())return;let s=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ws(Qt.REMOVE,s,t)),s}setAt(t,s){let e=this.getLength();if(t>=e){this.insertAt(t,s);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(s,t);let i=this.array_[t];this.array_[t]=s,this.dispatchEvent(new ws(Qt.REMOVE,i,t)),this.dispatchEvent(new ws(Qt.ADD,s,t))}updateLength_(){this.set(Ph.LENGTH,this.array_.length)}assertUnique_(t,s){for(let e=0,i=this.array_.length;ei&&(a=a|Ht.RIGHT),lr&&(a=a|Ht.ABOVE),a===Ht.UNKNOWN&&(a=Ht.INTERSECTING),a}function Vt(){return[1/0,1/0,-1/0,-1/0]}function Pe(o,t,s,e,i){return i?(i[0]=o,i[1]=t,i[2]=s,i[3]=e,i):[o,t,s,e]}function ts(o){return Pe(1/0,1/0,-1/0,-1/0,o)}function Fh(o,t){let s=o[0],e=o[1];return Pe(s,e,s,e,t)}function Hr(o,t,s,e,i){let r=ts(i);return ho(r,o,t,s,e)}function Ci(o,t){return o[0]==t[0]&&o[2]==t[2]&&o[1]==t[1]&&o[3]==t[3]}function zh(o,t){return t[0]o[2]&&(o[2]=t[2]),t[1]o[3]&&(o[3]=t[3]),o}function es(o,t){t[0]o[2]&&(o[2]=t[0]),t[1]o[3]&&(o[3]=t[1])}function ho(o,t,s,e,i){for(;st[0]?e[0]=o[0]:e[0]=t[0],o[1]>t[1]?e[1]=o[1]:e[1]=t[1],o[2]=t[0]&&o[1]<=t[3]&&o[3]>=t[1]}function Fi(o){return o[2]=n&&v<=a),!e&&r&Ht.RIGHT&&!(i&Ht.RIGHT)&&(x=p-(u-a)*b,e=x>=l&&x<=h),!e&&r&Ht.BELOW&&!(i&Ht.BELOW)&&(v=u-(p-l)/b,e=v>=n&&v<=a),!e&&r&Ht.LEFT&&!(i&Ht.LEFT)&&(x=p-(u-n)*b,e=x>=l&&x<=h)}return e}function Gh(o,t,s,e){if(Fi(o))return ts(s);let i=[];if(e>1){let l=o[2]-o[0],a=o[3]-o[1];for(let h=0;h=s[2])){let i=Pt(s),n=Math.floor((e[0]-s[0])/i)*i;o[0]-=n,o[2]-=n}return o}function Xh(o,t){if(t.canWrapX()){let s=t.getExtent();if(!isFinite(o[0])||!isFinite(o[2]))return[[s[0],o[1],s[2],o[3]]];co(o,t);let e=Pt(s);if(Pt(o)>e)return[[s[0],o[1],s[2],o[3]]];if(o[0]s[2])return[[o[0],o[1],s[2],o[3]],[s[0],o[1],o[2]-e,o[3]]]}return[o]}function Rt(o,t,s){return Math.min(Math.max(o,t),s)}function Wh(o,t,s,e,i,r){let n=i-s,l=r-e;if(n!==0||l!==0){let a=((o-s)*n+(t-e)*l)/(n*n+l*l);a>1?(s=i,e=r):a>0&&(s+=n*a,e+=l*a)}return Xe(o,t,s,e)}function Xe(o,t,s,e){let i=s-o,r=e-t;return i*i+r*r}function Yh(o){let t=o.length;for(let e=0;er&&(r=a,i=l)}if(r===0)return null;let n=o[i];o[i]=o[e],o[e]=n;for(let l=e+1;l=0;e--){s[e]=o[e][t]/o[e][e];for(let i=e-1;i>=0;i--)o[i][t]-=o[i][e]*s[e]}return s}function Ds(o){return o*Math.PI/180}function _i(o,t){let s=o%t;return s*t<0?s+t:s}function be(o,t,s){return o+s*(t-o)}function qr(o,t){let s=Math.pow(10,t);return Math.round(o*s)/s}function ir(o,t){return Math.floor(qr(o,t))}function sr(o,t){return Math.ceil(qr(o,t))}var dp=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,up=/^([a-z]*)$|^hsla?\(.*\)$/i;function $r(o){return typeof o=="string"?o:uo(o)}function pp(o){let t=document.createElement("div");if(t.style.color=o,t.style.color!==""){document.body.appendChild(t);let s=getComputedStyle(t).color;return document.body.removeChild(t),s}return""}var fp=function(){let t={},s=0;return function(e){let i;if(t.hasOwnProperty(e))i=t[e];else{if(s>=1024){let r=0;for(let n in t)r++&3||(delete t[n],--s)}i=gp(e),t[e]=i,++s}return i}}();function is(o){return Array.isArray(o)?o:fp(o)}function gp(o){let t,s,e,i,r;if(up.exec(o)&&(o=pp(o)),dp.exec(o)){let n=o.length-1,l;n<=4?l=1:l=2;let a=n===4||n===8;t=parseInt(o.substr(1+0*l,l),16),s=parseInt(o.substr(1+1*l,l),16),e=parseInt(o.substr(1+2*l,l),16),a?i=parseInt(o.substr(1+3*l,l),16):i=255,l==1&&(t=(t<<4)+t,s=(s<<4)+s,e=(e<<4)+e,a&&(i=(i<<4)+i)),r=[t,s,e,i/255]}else o.startsWith("rgba(")?(r=o.slice(5,-1).split(",").map(Number),Vh(r)):o.startsWith("rgb(")?(r=o.slice(4,-1).split(",").map(Number),r.push(1),Vh(r)):gt(!1,14);return r}function Vh(o){return o[0]=Rt(o[0]+.5|0,0,255),o[1]=Rt(o[1]+.5|0,0,255),o[2]=Rt(o[2]+.5|0,0,255),o[3]=Rt(o[3],0,1),o}function uo(o){let t=o[0];t!=(t|0)&&(t=t+.5|0);let s=o[1];s!=(s|0)&&(s=s+.5|0);let e=o[2];e!=(e|0)&&(e=e+.5|0);let i=o[3]===void 0?1:Math.round(o[3]*100)/100;return"rgba("+t+","+s+","+e+","+i+")"}var po=class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(let s in this.cache_){let e=this.cache_[s];!(t++&3)&&!e.hasListener()&&(delete this.cache_[s],--this.cacheSize_)}}}get(t,s,e){let i=Uh(t,s,e);return i in this.cache_?this.cache_[i]:null}set(t,s,e,i){let r=Uh(t,s,e);this.cache_[r]=i,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};function Uh(o,t,s){let e=s?$r(s):"null";return t+":"+o+":"+e}var Ls=new po;var It={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var fo=class extends Ut{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let s=Object.assign({},t);typeof t.properties=="object"&&(delete s.properties,Object.assign(s,t.properties)),s[It.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof s[It.OPACITY]=="number",64),s[It.VISIBLE]=t.visible!==void 0?t.visible:!0,s[It.Z_INDEX]=t.zIndex,s[It.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,s[It.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,s[It.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,s[It.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=s.className!==void 0?s.className:"ol-layer",delete s.className,this.setProperties(s),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let s=this.state_||{layer:this,managed:t===void 0?!0:t},e=this.getZIndex();return s.opacity=Rt(Math.round(this.getOpacity()*100)/100,0,1),s.visible=this.getVisible(),s.extent=this.getExtent(),s.zIndex=e===void 0&&!s.managed?1/0:e,s.maxResolution=this.getMaxResolution(),s.minResolution=Math.max(this.getMinResolution(),0),s.minZoom=this.getMinZoom(),s.maxZoom=this.getMaxZoom(),this.state_=s,s}getLayersArray(t){return Et()}getLayerStatesArray(t){return Et()}getExtent(){return this.get(It.EXTENT)}getMaxResolution(){return this.get(It.MAX_RESOLUTION)}getMinResolution(){return this.get(It.MIN_RESOLUTION)}getMinZoom(){return this.get(It.MIN_ZOOM)}getMaxZoom(){return this.get(It.MAX_ZOOM)}getOpacity(){return this.get(It.OPACITY)}getSourceState(){return Et()}getVisible(){return this.get(It.VISIBLE)}getZIndex(){return this.get(It.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(It.EXTENT,t)}setMaxResolution(t){this.set(It.MAX_RESOLUTION,t)}setMinResolution(t){this.set(It.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(It.MAX_ZOOM,t)}setMinZoom(t){this.set(It.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number",64),this.set(It.OPACITY,t)}setVisible(t){this.set(It.VISIBLE,t)}setZIndex(t){this.set(It.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Jr=fo;var ge={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var Zt={ANIMATING:0,INTERACTING:1};var Oe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var We={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var go=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||We[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Qr=go;var rr=6378137,Is=Math.PI*rr,mp=[-Is,-Is,Is,Is],xp=[-180,-85,180,85],tn=rr*Math.log(Math.tan(Math.PI/2)),zi=class extends Qr{constructor(t){super({code:t,units:"m",extent:mp,global:!0,worldExtent:xp,getPointResolution:function(s,e){return s/Math.cosh(e[1]/rr)}})}},mo=[new zi("EPSG:3857"),new zi("EPSG:102100"),new zi("EPSG:102113"),new zi("EPSG:900913"),new zi("http://www.opengis.net/def/crs/EPSG/0/3857"),new zi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Hh(o,t,s){let e=o.length;s=s>1?s:2,t===void 0&&(s>2?t=o.slice():t=new Array(e));for(let i=0;itn?r=tn:r<-tn&&(r=-tn),t[i+1]=r}return t}function Zh(o,t,s){let e=o.length;s=s>1?s:2,t===void 0&&(s>2?t=o.slice():t=new Array(e));for(let i=0;i=0;--e)if(o[e]!=t[e]){s=!1;break}return s}function ks(o,t){let s=Math.cos(t),e=Math.sin(t),i=o[0]*s-o[1]*e,r=o[1]*s+o[0]*e;return o[0]=i,o[1]=r,o}function tc(o,t){return o[0]*=t,o[1]*=t,o}function en(o,t){if(t.canWrapX()){let s=Pt(t.getExtent()),e=ec(o,t,s);e&&(o[0]-=e*s)}return o}function ec(o,t,s){let e=t.getExtent(),i=0;return t.canWrapX()&&(o[0]e[2])&&(s=s||Pt(e),i=Math.floor((o[0]-e[0])/s)),i}var vp=63710088e-1;function bo(o,t,s){s=s||vp;let e=Ds(o[1]),i=Ds(t[1]),r=(i-e)/2,n=Ds(t[0]-o[0])/2,l=Math.sin(r)*Math.sin(r)+Math.sin(n)*Math.sin(n)*Math.cos(e)*Math.cos(i);return 2*s*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var ic={info:1,warn:2,error:3,none:4},Cp=ic.info;function sn(...o){Cp>ic.warn||console.warn(...o)}var vo=!0;function rc(o){vo=!(o===void 0?!0:o)}function Co(o,t){if(t!==void 0){for(let s=0,e=o.length;s=-180&&o[0]<=180&&o[1]>=-90&&o[1]<=90&&(vo=!1,sn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),o)}function Os(o,t){return Ye?oc(o,t,Ye):o}function Ue(o,t){return Ye?oc(o,Ye,t):o}function ac(o,t){if(!Ye)return o;let s=ue(t).getUnits(),e=Ye.getUnits();return s&&e?o*We[s]/We[e]:o}function Mp(){sc(mo),sc(xo),Sp(xo,mo,Hh,Zh)}Mp();function wo(o,t,s){return function(e,i,r,n,l){if(!e)return;if(!i&&!t)return e;let a=t?0:r[0]*i,h=t?0:r[1]*i,c=l?l[0]:0,g=l?l[1]:0,u=o[0]+a/2+c,p=o[2]-a/2+c,b=o[1]+h/2+g,v=o[3]-h/2+g;u>p&&(u=(p+u)/2,p=u),b>v&&(b=(v+b)/2,v=b);let x=Rt(e[0],u,p),m=Rt(e[1],b,v);if(n&&s&&i){let E=30*i;x+=-E*Math.log(1+Math.max(0,u-e[0])/E)+E*Math.log(1+Math.max(0,e[0]-p)/E),m+=-E*Math.log(1+Math.max(0,b-e[1])/E)+E*Math.log(1+Math.max(0,e[1]-v)/E)}return[x,m]}}function lc(o){return o}function So(o,t,s,e){let i=Pt(t)/s[0],r=de(t)/s[1];return e?Math.min(o,Math.max(i,r)):Math.min(o,Math.min(i,r))}function Mo(o,t,s){let e=Math.min(o,t),i=50;return e*=Math.log(1+i*Math.max(0,o/t-1))/i+1,s&&(e=Math.max(e,s),e/=Math.log(1+i*Math.max(0,s/o-1))/i+1),Rt(e,s/2,t*2)}function hc(o,t,s,e){return t=t!==void 0?t:!0,function(i,r,n,l){if(i!==void 0){let a=o[0],h=o[o.length-1],c=s?So(a,s,n,e):a;if(l)return t?Mo(i,c,h):Rt(i,h,c);let g=Math.min(c,i),u=Math.floor(vs(o,g,r));return o[u]>c&&u1)g=s;else if(u>0){for(let p=0;pi&&(i=h),r=l,n=a}return i}function Io(o,t,s,e,i){for(let r=0,n=s.length;r0;){let g=h.pop(),u=h.pop(),p=0,b=o[u],v=o[u+1],x=o[g],m=o[g+1];for(let E=u+e;Ep&&(c=E,p=w)}p>i&&(a[(c-t)/e]=1,u+e0&&v>p)&&(b<0&&x0&&x>b)){h=g,c=u;continue}r[n++]=h,r[n++]=c,l=h,a=c,h=g,c=u}return r[n++]=h,r[n++]=c,n}function Fo(o,t,s,e,i,r,n,l){for(let a=0,h=s.length;ar&&(h-l)*(r-a)-(i-l)*(c-a)>0&&n++:c<=r&&(h-l)*(r-a)-(i-l)*(c-a)<0&&n--,l=h,a=c}return n!==0}function cr(o,t,s,e,i,r){if(s.length===0||!Gi(o,t,s[0],e,i,r))return!1;for(let n=1,l=s.length;nm&&(h=(c+g)/2,cr(o,t,s,e,h,b)&&(x=h,m=E)),c=g}return isNaN(x)&&(x=i[r]),n?(n.push(x,b,m),n):[x,b,m]}function Lc(o,t,s,e,i){let r=[];for(let n=0,l=s.length;n=i[0]&&r[2]<=i[2]||r[1]>=i[1]&&r[3]<=i[3]?!0:Ic(o,t,s,e,function(n,l){return Bh(i,n,l)}):!1}function Wo(o,t,s,e,i){return!!(Rc(o,t,s,e,i)||Gi(o,t,s,e,i[0],i[1])||Gi(o,t,s,e,i[0],i[3])||Gi(o,t,s,e,i[2],i[1])||Gi(o,t,s,e,i[2],i[3]))}function Yo(o,t,s,e,i){if(!Wo(o,t,s[0],e,i))return!1;if(s.length===1)return!0;for(let r=1,n=s.length;r0}function Vo(o,t,s,e,i){i=i!==void 0?i:!1;for(let r=0,n=s.length;r1&&typeof arguments[s-1]=="function"&&(e=arguments[s-1],--s);let i=0;for(;i0}getInteracting(){return this.hints_[Zt.INTERACTING]>0}cancelAnimations(){this.setHint(Zt.ANIMATING,-this.hints_[Zt.ANIMATING]);let t;for(let s=0,e=this.animations_.length;s=0;--e){let i=this.animations_[e],r=!0;for(let n=0,l=i.length;n0?h/a.duration:1;c>=1?(a.complete=!0,c=1):r=!1;let g=a.easing(c);if(a.sourceCenter){let u=a.sourceCenter[0],p=a.sourceCenter[1],b=a.targetCenter[0],v=a.targetCenter[1];this.nextCenter_=a.targetCenter;let x=u+g*(b-u),m=p+g*(v-p);this.targetCenter_=[x,m]}if(a.sourceResolution&&a.targetResolution){let u=g===1?a.targetResolution:a.sourceResolution+g*(a.targetResolution-a.sourceResolution);if(a.anchor){let p=this.getViewportSize_(this.getRotation()),b=this.constraints_.resolution(u,0,p,!0);this.targetCenter_=this.calculateCenterZoom(b,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=u,this.applyTargetState_(!0)}if(a.sourceRotation!==void 0&&a.targetRotation!==void 0){let u=g===1?_i(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+g*(a.targetRotation-a.sourceRotation);if(a.anchor){let p=this.constraints_.rotation(u,!0);this.targetCenter_=this.calculateCenterRotate(p,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=u}if(this.applyTargetState_(!0),s=!0,!a.complete)break}if(r){this.animations_[e]=null,this.setHint(Zt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let n=i[0].callback;n&&hn(n,!0)}}this.animations_=this.animations_.filter(Boolean),s&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,s){let e,i=this.getCenterInternal();return i!==void 0&&(e=[i[0]-s[0],i[1]-s[1]],ks(e,t-this.getRotation()),Qh(e,s)),e}calculateCenterZoom(t,s){let e,i=this.getCenterInternal(),r=this.getResolution();if(i!==void 0&&r!==void 0){let n=s[0]-t*(s[0]-i[0])/r,l=s[1]-t*(s[1]-i[1])/r;e=[n,l]}return e}getViewportSize_(t){let s=this.viewportSize_;if(t){let e=s[0],i=s[1];return[Math.abs(e*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(e*Math.sin(t))+Math.abs(i*Math.cos(t))]}return s}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){let t=this.getCenterInternal();return t&&ar(t,this.getProjection())}getCenterInternal(){return this.get(Oe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){let s=this.calculateExtentInternal(t);return Os(s,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();let s=this.getCenterInternal();gt(s,1);let e=this.getResolution();gt(e!==void 0,2);let i=this.getRotation();return gt(i!==void 0,3),er(s,e,i,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Oe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,s){return this.getResolutionForExtentInternal(Ue(t,this.getProjection()),s)}getResolutionForExtentInternal(t,s){s=s||this.getViewportSizeMinusPadding_();let e=Pt(t)/s[0],i=de(t)/s[1];return Math.max(e,i)}getResolutionForValueFunction(t){t=t||2;let s=this.getConstrainedResolution(this.maxResolution_),e=this.minResolution_,i=Math.log(s/e)/Math.log(t);return function(r){return s/Math.pow(t,r*i)}}getRotation(){return this.get(Oe.ROTATION)}getValueForResolutionFunction(t){let s=Math.log(t||2),e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(e/i)/s;return function(n){return Math.log(e/n)/s/r}}getViewportSizeMinusPadding_(t){let s=this.getViewportSize_(t),e=this.padding_;return e&&(s=[s[0]-e[1]-e[3],s[1]-e[0]-e[2]]),s}getState(){let t=this.getProjection(),s=this.getResolution(),e=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){let n=this.getViewportSizeMinusPadding_();i=Ko(i,this.getViewportSize_(),[n[0]/2+r[3],n[1]/2+r[0]],s,e)}return{center:i.slice(0),projection:t!==void 0?t:null,resolution:s,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:e,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t,s=this.getResolution();return s!==void 0&&(t=this.getZoomForResolution(s)),t}getZoomForResolution(t){let s=this.minZoom_||0,e,i;if(this.resolutions_){let r=vs(this.resolutions_,t,1);s=r,e=this.resolutions_[r],r==this.resolutions_.length-1?i=2:i=e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return s+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;let s=Rt(Math.floor(t),0,this.resolutions_.length-2),e=this.resolutions_[s]/this.resolutions_[s+1];return this.resolutions_[s]/Math.pow(e,Rt(t-s,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,s){let e;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){gt(!Fi(t),25);let i=Ue(t,this.getProjection());e=Ho(i)}else if(t.getType()==="Circle"){let i=Ue(t.getExtent(),this.getProjection());e=Ho(i),e.rotate(this.getRotation(),Qe(i))}else{let i=nn();i?e=t.clone().transform(i,this.getProjection()):e=t}this.fitInternal(e,s)}rotatedExtentForGeometry(t){let s=this.getRotation(),e=Math.cos(s),i=Math.sin(-s),r=t.getFlatCoordinates(),n=t.getStride(),l=1/0,a=1/0,h=-1/0,c=-1/0;for(let g=0,u=r.length;g{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let s,e=this.getMapInternal();!t&&e&&(t=e.getView()),t instanceof De?s={viewState:t.getState(),extent:t.calculateExtent()}:s=t,!s.layerStatesArray&&e&&(s.layerStatesArray=e.getLayerGroup().getLayerStatesArray());let i;s.layerStatesArray?i=s.layerStatesArray.find(n=>n.layer===this):i=this.getLayerState();let r=this.getExtent();return dr(i,s.viewState)&&(!r||Wt(r,s.extent))}getAttributions(t){if(!this.isVisible(t))return[];let s,e=this.getSource();if(e&&(s=e.getAttributions()),!s)return[];let i=t instanceof De?t.getViewStateAndExtent():t,r=s(i);return Array.isArray(r)||(r=[r]),r}render(t,s){let e=this.getRenderer();return e.prepareFrame(t)?(this.rendered=!0,e.renderFrame(t,s)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(It.MAP,t)}getMapInternal(){return this.get(It.MAP)}setMap(t){this.mapPrecomposeKey_&&(At(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(At(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Mt(t,ge.PRECOMPOSE,function(s){let i=s.frameState.layerStatesArray,r=this.getLayerState(!1);gt(!i.some(function(n){return n.layer===r.layer}),67),i.push(r)},this),this.mapRenderKey_=Mt(this,ut.CHANGE,t.render,t),this.changed())}setSource(t){this.set(It.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function dr(o,t){if(!o.visible)return!1;let s=t.resolution;if(s=o.maxResolution)return!1;let e=t.zoom;return e>o.minZoom&&e<=o.maxZoom}var ns=$o;var Jo=class extends bs{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,s){Et()}calculateMatrices2D(t){let s=t.viewState,e=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;fe(e,t.size[0]/2,t.size[1]/2,1/s.resolution,-1/s.resolution,-s.rotation,-s.center[0],-s.center[1]),Ms(i,e)}forEachFeatureAtCoordinate(t,s,e,i,r,n,l,a){let h,c=s.viewState;function g(S,w,R,O){return r.call(n,w,S?R:null,O)}let u=c.projection,p=en(t.slice(),u),b=[[0,0]];if(u.canWrapX()&&i){let S=u.getExtent(),w=Pt(S);b.push([-w,0],[w,0])}let v=s.layerStatesArray,x=v.length,m=[],E=[];for(let S=0;S=0;--w){let R=v[w],O=R.layer;if(O.hasRenderer()&&dr(R,c)&&l.call(a,O)){let I=O.getRenderer(),_=O.getSource();if(I&&_){let P=_.getWrapX()?p:t,F=g.bind(null,R.managed);E[0]=P[0]+b[S][0],E[1]=P[1]+b[S][1],h=I.forEachFeatureAtCoordinate(E,s,e,F,m)}if(h)return h}}if(m.length===0)return;let L=1/m.length;return m.forEach((S,w)=>S.distanceSq+=w*L),m.sort((S,w)=>S.distanceSq-w.distanceSq),m.some(S=>h=S.callback(S.feature,S.layer,S.geometry)),h}hasFeatureAtCoordinate(t,s,e,i,r,n){return this.forEachFeatureAtCoordinate(t,s,e,i,xi,this,r,n)!==void 0}getMap(){return this.map_}renderFrame(t){Et()}flushDeclutterItems(t){}scheduleExpireIconCache(t){Ls.canExpireCache()&&t.postRenderFunctions.push(Ip)}};function Ip(o,t){Ls.expire()}var jc=Jo;var Qo=class extends Jt{constructor(t,s,e,i){super(t),this.inversePixelTransform=s,this.frameState=e,this.context=i}},cn=Qo;var ur="ol-hidden";var Wi="ol-unselectable";var Ns="ol-control",ta="ol-collapsed",Rp=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Bc=["style","variant","weight","size","lineHeight","family"],ea=function(o){let t=o.match(Rp);if(!t)return null;let s={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let e=0,i=Bc.length;e{"use strict";(function(o,t){typeof define=="function"&&define.amd?define(t):typeof Nr=="object"&&Nr.exports?Nr.exports=t():o.numeral=t()})(Ch,function(){var o,t,s="2.0.6",e={},i={},r={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},n={currentLocale:r.currentLocale,zeroFormat:r.zeroFormat,nullFormat:r.nullFormat,defaultFormat:r.defaultFormat,scalePercentBy100:r.scalePercentBy100};function l(a,h){this._input=a,this._value=h}return o=function(a){var h,c,g,u;if(o.isNumeral(a))h=a.value();else if(a===0||typeof a>"u")h=0;else if(a===null||t.isNaN(a))h=null;else if(typeof a=="string")if(n.zeroFormat&&a===n.zeroFormat)h=0;else if(n.nullFormat&&a===n.nullFormat||!a.replace(/[^0-9]+/g,"").length)h=null;else{for(c in e)if(u=typeof e[c].regexps.unformat=="function"?e[c].regexps.unformat():e[c].regexps.unformat,u&&a.match(u)){g=e[c].unformat;break}g=g||o._.stringToNumber,h=g(a)}else h=Number(a)||null;return new l(a,h)},o.version=s,o.isNumeral=function(a){return a instanceof l},o._=t={numberToFormat:function(a,h,c){var g=i[o.options.currentLocale],u=!1,p=!1,b=0,v="",x=1e12,m=1e9,E=1e6,L=1e3,S="",w=!1,R,O,I,_,P,F,A,D,C,d;if(a=a||0,O=Math.abs(a),o._.includes(h,"(")?(u=!0,h=h.replace(/[\(|\)]/g,"")):(o._.includes(h,"+")||o._.includes(h,"-"))&&(D=o._.includes(h,"+")?h.indexOf("+"):a<0?h.indexOf("-"):-1,h=h.replace(/[\+|\-]/g,"")),o._.includes(h,"a")&&(R=h.match(/a(k|m|b|t)?/),R=R?R[1]:!1,o._.includes(h," a")&&(v=" "),h=h.replace(new RegExp(v+"a[kmbt]?"),""),O>=x&&!R||R==="t"?(v+=g.abbreviations.trillion,a=a/x):O=m&&!R||R==="b"?(v+=g.abbreviations.billion,a=a/m):O=E&&!R||R==="m"?(v+=g.abbreviations.million,a=a/E):(O=L&&!R||R==="k")&&(v+=g.abbreviations.thousand,a=a/L)),o._.includes(h,"[.]")&&(p=!0,h=h.replace("[.]",".")),F=a.toString().split(".")[0],A=h.split(".")[1],C=h.indexOf(","),b=(h.split(".")[0].split(",")[0].match(/0/g)||[]).length,A?(o._.includes(A,"[")?(A=A.replace("]",""),A=A.split("["),S=o._.toFixed(a,A[0].length+A[1].length,c,A[1].length)):S=o._.toFixed(a,A.length,c),F=S.split(".")[0],o._.includes(S,".")?S=g.delimiters.decimal+S.split(".")[1]:S="",p&&Number(S.slice(1))===0&&(S="")):F=o._.toFixed(a,0,c),v&&!R&&Number(F)>=1e3&&v!==g.abbreviations.trillion)switch(F=String(Number(F)/1e3),v){case g.abbreviations.thousand:v=g.abbreviations.million;break;case g.abbreviations.million:v=g.abbreviations.billion;break;case g.abbreviations.billion:v=g.abbreviations.trillion;break}if(o._.includes(F,"-")&&(F=F.slice(1),w=!0),F.length0;f--)F="0"+F;return C>-1&&(F=F.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),h.indexOf(".")===0&&(F=""),d=F+S+(v||""),u?d=(u&&w?"(":"")+d+(u&&w?")":""):D>=0?d=D===0?(w?"-":"+")+d:d+(w?"-":"+"):w&&(d="-"+d),d},stringToNumber:function(a){var h=i[n.currentLocale],c=a,g={thousand:3,million:6,billion:9,trillion:12},u,p,b,v;if(n.zeroFormat&&a===n.zeroFormat)p=0;else if(n.nullFormat&&a===n.nullFormat||!a.replace(/[^0-9]+/g,"").length)p=null;else{p=1,h.delimiters.decimal!=="."&&(a=a.replace(/\./g,"").replace(h.delimiters.decimal,"."));for(u in g)if(v=new RegExp("[^a-zA-Z]"+h.abbreviations[u]+"(?:\\)|(\\"+h.currency.symbol+")?(?:\\))?)?$"),c.match(v)){p*=Math.pow(10,g[u]);break}p*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),p*=Number(a)}return p},isNaN:function(a){return typeof a=="number"&&isNaN(a)},includes:function(a,h){return a.indexOf(h)!==-1},insert:function(a,h,c){return a.slice(0,c)+h+a.slice(c)},reduce:function(a,h){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof h!="function")throw new TypeError(h+" is not a function");var c=Object(a),g=c.length>>>0,u=0,p;if(arguments.length===3)p=arguments[2];else{for(;u=g)throw new TypeError("Reduce of empty array with no initial value");p=c[u++]}for(;ug?h:g},1)},toFixed:function(a,h,c,g){var u=a.toString().split("."),p=h-(g||0),b,v,x,m;return u.length===2?b=Math.min(Math.max(u[1].length,p),h):b=p,x=Math.pow(10,b),m=(c(a+"e+"+b)/x).toFixed(b),g>h-b&&(v=new RegExp("\\.?0{1,"+(g-(h-b))+"}$"),m=m.replace(v,"")),m}},o.options=n,o.formats=e,o.locales=i,o.locale=function(a){return a&&(n.currentLocale=a.toLowerCase()),n.currentLocale},o.localeData=function(a){if(!a)return i[n.currentLocale];if(a=a.toLowerCase(),!i[a])throw new Error("Unknown locale : "+a);return i[a]},o.reset=function(){for(var a in r)n[a]=r[a]},o.zeroFormat=function(a){n.zeroFormat=typeof a=="string"?a:null},o.nullFormat=function(a){n.nullFormat=typeof a=="string"?a:null},o.defaultFormat=function(a){n.defaultFormat=typeof a=="string"?a:"0.0"},o.register=function(a,h,c){if(h=h.toLowerCase(),this[a+"s"][h])throw new TypeError(h+" "+a+" already registered.");return this[a+"s"][h]=c,c},o.validate=function(a,h){var c,g,u,p,b,v,x,m;if(typeof a!="string"&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(a==="")return!1;try{x=o.localeData(h)}catch{x=o.localeData(o.locale())}return u=x.currency.symbol,b=x.abbreviations,c=x.delimiters.decimal,x.delimiters.thousands==="."?g="\\.":g=x.delimiters.thousands,m=a.match(/^[^\d]+/),m!==null&&(a=a.substr(1),m[0]!==u)||(m=a.match(/[^\d]+$/),m!==null&&(a=a.slice(0,-1),m[0]!==b.thousand&&m[0]!==b.million&&m[0]!==b.billion&&m[0]!==b.trillion))?!1:(v=new RegExp(g+"{2}"),a.match(/[^\d.,]/g)?!1:(p=a.split(c),p.length>2?!1:p.length<2?!!p[0].match(/^\d+.*\d$/)&&!p[0].match(v):p[0].length===1?!!p[0].match(/^\d+$/)&&!p[0].match(v)&&!!p[1].match(/^\d+$/):!!p[0].match(/^\d+.*\d$/)&&!p[0].match(v)&&!!p[1].match(/^\d+$/)))},o.fn=l.prototype={clone:function(){return o(this)},format:function(a,h){var c=this._value,g=a||n.defaultFormat,u,p,b;if(h=h||Math.round,c===0&&n.zeroFormat!==null)p=n.zeroFormat;else if(c===null&&n.nullFormat!==null)p=n.nullFormat;else{for(u in e)if(g.match(e[u].regexps.format)){b=e[u].format;break}b=b||o._.numberToFormat,p=b(c,g,h)}return p},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){var h=t.correctionFactor.call(null,this._value,a);function c(g,u,p,b){return g+Math.round(h*u)}return this._value=t.reduce([this._value,a],c,0)/h,this},subtract:function(a){var h=t.correctionFactor.call(null,this._value,a);function c(g,u,p,b){return g-Math.round(h*u)}return this._value=t.reduce([a],c,Math.round(this._value*h))/h,this},multiply:function(a){function h(c,g,u,p){var b=t.correctionFactor(c,g);return Math.round(c*b)*Math.round(g*b)/Math.round(b*b)}return this._value=t.reduce([this._value,a],h,1),this},divide:function(a){function h(c,g,u,p){var b=t.correctionFactor(c,g);return Math.round(c*b)/Math.round(g*b)}return this._value=t.reduce([this._value,a],h),this},difference:function(a){return Math.abs(o(this._value).subtract(a).value())}},o.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var h=a%10;return~~(a%100/10)===1?"th":h===1?"st":h===2?"nd":h===3?"rd":"th"},currency:{symbol:"$"}}),function(){o.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,h,c){var g=o._.includes(h," BPS")?" ":"",u;return a=a*1e4,h=h.replace(/\s?BPS/,""),u=o._.numberToFormat(a,h,c),o._.includes(u,")")?(u=u.split(""),u.splice(-1,0,g+"BPS"),u=u.join("")):u=u+g+"BPS",u},unformat:function(a){return+(o._.stringToNumber(a)*1e-4).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},h={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},c=a.suffixes.concat(h.suffixes.filter(function(u){return a.suffixes.indexOf(u)<0})),g=c.join("|");g="("+g.replace("B","B(?!PS)")+")",o.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(g)},format:function(u,p,b){var v,x=o._.includes(p,"ib")?h:a,m=o._.includes(p," b")||o._.includes(p," ib")?" ":"",E,L,S;for(p=p.replace(/\s?i?b/,""),E=0;E<=x.suffixes.length;E++)if(L=Math.pow(x.base,E),S=Math.pow(x.base,E+1),u===null||u===0||u>=L&&u0&&(u=u/L);break}return v=o._.numberToFormat(u,p,b),v+m},unformat:function(u){var p=o._.stringToNumber(u),b,v;if(p){for(b=a.suffixes.length-1;b>=0;b--){if(o._.includes(u,a.suffixes[b])){v=Math.pow(a.base,b);break}if(o._.includes(u,h.suffixes[b])){v=Math.pow(h.base,b);break}}p*=v||1}return p}})}(),function(){o.register("format","currency",{regexps:{format:/(\$)/},format:function(a,h,c){var g=o.locales[o.options.currentLocale],u={before:h.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:h.match(/([\+|\-|\)|\s|\$]*)$/)[0]},p,b,v;for(h=h.replace(/\s?\$\s?/,""),p=o._.numberToFormat(a,h,c),a>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):a<0&&!o._.includes(u.before,"-")&&!o._.includes(u.before,"(")&&(u.before="-"+u.before),v=0;v=0;v--)switch(b=u.after[v],b){case"$":p=v===u.after.length-1?p+g.currency.symbol:o._.insert(p,g.currency.symbol,-(u.after.length-(1+v)));break;case" ":p=v===u.after.length-1?p+" ":o._.insert(p," ",-(u.after.length-(1+v)+g.currency.symbol.length-1));break}return p}})}(),function(){o.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(a,h,c){var g,u=typeof a=="number"&&!o._.isNaN(a)?a.toExponential():"0e+0",p=u.split("e");return h=h.replace(/e[\+|\-]{1}0/,""),g=o._.numberToFormat(Number(p[0]),h,c),g+"e"+p[1]},unformat:function(a){var h=o._.includes(a,"e+")?a.split("e+"):a.split("e-"),c=Number(h[0]),g=Number(h[1]);g=o._.includes(a,"e-")?g*=-1:g;function u(p,b,v,x){var m=o._.correctionFactor(p,b),E=p*m*(b*m)/(m*m);return E}return o._.reduce([c,Math.pow(10,g)],u,1)}})}(),function(){o.register("format","ordinal",{regexps:{format:/(o)/},format:function(a,h,c){var g=o.locales[o.options.currentLocale],u,p=o._.includes(h," o")?" ":"";return h=h.replace(/\s?o/,""),p+=g.ordinal(a),u=o._.numberToFormat(a,h,c),u+p}})}(),function(){o.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(a,h,c){var g=o._.includes(h," %")?" ":"",u;return o.options.scalePercentBy100&&(a=a*100),h=h.replace(/\s?\%/,""),u=o._.numberToFormat(a,h,c),o._.includes(u,")")?(u=u.split(""),u.splice(-1,0,g+"%"),u=u.join("")):u=u+g+"%",u},unformat:function(a){var h=o._.stringToNumber(a);return o.options.scalePercentBy100?h*.01:h}})}(),function(){o.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(a,h,c){var g=Math.floor(a/60/60),u=Math.floor((a-g*60*60)/60),p=Math.round(a-g*60*60-u*60);return g+":"+(u<10?"0"+u:u)+":"+(p<10?"0"+p:p)},unformat:function(a){var h=a.split(":"),c=0;return h.length===3?(c=c+Number(h[0])*60*60,c=c+Number(h[1])*60,c=c+Number(h[2])):h.length===2&&(c=c+Number(h[0])*60,c=c+Number(h[1])),Number(c)}})}(),o})});var Ua=qe((Ya,Va)=>{"use strict";(function(o,t){typeof Ya=="object"&&typeof Va<"u"?Va.exports=t():typeof define=="function"&&define.amd?define(t):(o=o||self).RBush=t()})(Ya,function(){"use strict";function o(x,m,E,L,S){(function w(R,O,I,_,P){for(;_>I;){if(_-I>600){var F=_-I+1,A=O-I+1,D=Math.log(F),C=.5*Math.exp(2*D/3),d=.5*Math.sqrt(D*C*(F-C)/F)*(A-F/2<0?-1:1),f=Math.max(I,Math.floor(O-A*C/F+d)),y=Math.min(_,Math.floor(O+(F-A)*C/F+d));w(R,O,f,y,P)}var M=R[O],k=I,T=_;for(t(R,I,O),P(R[_],M)>0&&t(R,I,_);k0;)T--}P(R[I],M)===0?t(R,I,T):t(R,++T,_),T<=O&&(I=T+1),O<=T&&(_=T-1)}})(x,m,E||0,L||x.length-1,S||s)}function t(x,m,E){var L=x[m];x[m]=x[E],x[E]=L}function s(x,m){return xm?1:0}var e=function(x){x===void 0&&(x=9),this._maxEntries=Math.max(4,x),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(x,m,E){if(!E)return m.indexOf(x);for(var L=0;L=x.minX&&m.maxY>=x.minY}function b(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(x,m,E,L,S){for(var w=[m,E];w.length;)if(!((E=w.pop())-(m=w.pop())<=L)){var R=m+Math.ceil((E-m)/L/2)*L;o(x,R,m,E,S),w.push(m,R,R,E)}}return e.prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(x){var m=this.data,E=[];if(!p(x,m))return E;for(var L=this.toBBox,S=[];m;){for(var w=0;w=0&&S[m].children.length>this._maxEntries;)this._split(S,m),m--;this._adjustParentBBoxes(L,S,m)},e.prototype._split=function(x,m){var E=x[m],L=E.children.length,S=this._minEntries;this._chooseSplitAxis(E,S,L);var w=this._chooseSplitIndex(E,S,L),R=b(E.children.splice(w,E.children.length-w));R.height=E.height,R.leaf=E.leaf,r(E,this.toBBox),r(R,this.toBBox),m?x[m-1].children.push(R):this._splitRoot(E,R)},e.prototype._splitRoot=function(x,m){this.data=b([x,m]),this.data.height=x.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(x,m,E){for(var L,S,w,R,O,I,_,P=1/0,F=1/0,A=m;A<=E-m;A++){var D=n(x,0,A,this.toBBox),C=n(x,A,E,this.toBBox),d=(S=D,w=C,R=void 0,O=void 0,I=void 0,_=void 0,R=Math.max(S.minX,w.minX),O=Math.max(S.minY,w.minY),I=Math.min(S.maxX,w.maxX),_=Math.min(S.maxY,w.maxY),Math.max(0,I-R)*Math.max(0,_-O)),f=c(D)+c(C);d=m;P--){var F=x.children[P];l(R,x.leaf?S(F):F),O+=g(R)}return O},e.prototype._adjustParentBBoxes=function(x,m,E){for(var L=E;L>=0;L--)l(m[L],x)},e.prototype._condense=function(x){for(var m=x.length-1,E=void 0;m>=0;m--)x[m].children.length===0?m>0?(E=x[m-1].children).splice(E.indexOf(x[m]),1):this.clear():r(x[m],this.toBBox)},e})});var wu=qe((cT,jn)=>{"use strict";(function(o){typeof jn=="object"&&jn.exports?(o.default=o,jn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/map",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisComposition.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r;let{parse:n}=e,{addEvent:l,extend:a,merge:h,pick:c,splat:g}=i;return function(u){let p;function b(){let{userOptions:I}=this;this.colorAxis=[],I.colorAxis&&(I.colorAxis=g(I.colorAxis),I.colorAxis.map(_=>new p(this,_)))}function v(I){let _=this.chart.colorAxis||[],P=C=>{let d=I.allItems.indexOf(C);d!==-1&&(this.destroyItem(I.allItems[d]),I.allItems.splice(d,1))},F=[],A,D;for(_.forEach(function(C){(A=C.options)&&A.showInLegend&&(A.dataClasses&&A.visible?F=F.concat(C.getDataClassLegendSymbols()):A.visible&&F.push(C),C.series.forEach(function(d){(!d.options.showInLegend||A.dataClasses)&&(d.options.legendType==="point"?d.points.forEach(function(f){P(f)}):P(d))}))}),D=F.length;D--;)I.allItems.unshift(F[D])}function x(I){I.visible&&I.item.legendColor&&I.item.legendItem.symbol.attr({fill:I.item.legendColor})}function m(I){this.chart.colorAxis?.forEach(_=>{_.update({},I.redraw)})}function E(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function L(){let I=this.axisTypes;I?I.indexOf("colorAxis")===-1&&I.push("colorAxis"):this.axisTypes=["colorAxis"]}function S(I){let _=this,P=I?"show":"hide";_.visible=_.options.visible=!!I,["graphic","dataLabel"].forEach(function(F){_[F]&&_[F][P]()}),this.series.buildKDTree()}function w(){let I=this,_=this.data.length?this.data:this.points,P=this.options.nullColor,F=this.colorAxis,A=this.colorKey;_.forEach(D=>{let C=D.getNestedProperty(A),d=D.options.color||(D.isNull||D.value===null?P:F&&C!==void 0?F.toColor(C,D):D.color||I.color);d&&D.color!==d&&(D.color=d,I.options.legendType==="point"&&D.legendItem&&D.legendItem.label&&I.chart.legend.colorizeItem(D,D.visible))})}function R(){this.elem.attr("fill",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}function O(){this.elem.attr("stroke",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}u.compose=function(I,_,P,F,A){let D=_.prototype,C=P.prototype,d=A.prototype;D.collectionsWithUpdate.includes("colorAxis")||(p=I,D.collectionsWithUpdate.push("colorAxis"),D.collectionsWithInit.colorAxis=[D.addColorAxis],l(_,"afterGetAxes",b),function(f){let y=f.prototype.createAxis;f.prototype.createAxis=function(M,k){if(M!=="colorAxis")return y.apply(this,arguments);let T=new p(this,h(k.axis,{index:this[M].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(z=>{z.series=[]}),this.series.forEach(z=>{z.bindAxes(),z.isDirtyData=!0}),c(k.redraw,!0)&&this.redraw(k.animation),T}}(_),C.fillSetter=R,C.strokeSetter=O,l(F,"afterGetAllItems",v),l(F,"afterColorizeItem",x),l(F,"afterUpdate",m),a(d,{optionalAxis:"colorAxis",translateColors:w}),a(d.pointClass.prototype,{setVisible:S}),l(A,"afterTranslate",E,{order:1}),l(A,"bindAxes",L))},u.pointSetVisible=S}(r||(r={})),r}),s(t,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}}),s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/Color/ColorAxis.js",[t["Core/Axis/Axis.js"],t["Core/Axis/Color/ColorAxisComposition.js"],t["Core/Axis/Color/ColorAxisDefaults.js"],t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Defaults.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=l,{series:u}=h,{defined:p,extend:b,fireEvent:v,isArray:x,isNumber:m,merge:E,pick:L,relativeLength:S}=c;g.colorAxis=E(g.xAxis,r);class w extends e{static compose(O,I,_,P){i.compose(w,O,I,_,P)}constructor(O,I){super(O,I),this.coll="colorAxis",this.visible=!0,this.init(O,I)}init(O,I){let _=O.options.legend||{},P=I.layout?I.layout!=="vertical":_.layout!=="vertical";this.side=I.side||P?2:1,this.reversed=I.reversed||!P,this.opposite=!P,super.init(O,I,"colorAxis"),this.userOptions=I,x(O.userOptions.colorAxis)&&(O.userOptions.colorAxis[this.index]=I),I.dataClasses&&this.initDataClasses(I),this.initStops(),this.horiz=P,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(O){let I=E(g.colorAxis,O,{showEmpty:!1,title:null,visible:this.chart.options.legend.enabled&&O.visible!==!1});super.setOptions(I),this.options.crosshair=this.options.marker}setAxisSize(){let O=this.chart,I=this.legendItem?.symbol,{width:_,height:P}=this.getSize();I&&(this.left=+I.attr("x"),this.top=+I.attr("y"),this.width=_=+I.attr("width"),this.height=P=+I.attr("height"),this.right=O.chartWidth-this.left-_,this.bottom=O.chartHeight-this.top-P,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?_:P)||w.defaultLegendLength}getOffset(){let O=this.legendItem?.group,I=this.chart.axisOffset[this.side];if(O){this.axisParent=O,super.getOffset();let _=this.chart.legend;_.allItems.forEach(function(P){P instanceof w&&P.drawLegendSymbol(_,P)}),_.render(),this.chart.getMargins(!0),this.chart.series.some(P=>P.isDrilling)||(this.isDirty=!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=I}}setLegendColor(){let O=this.horiz,I=this.reversed,_=I?1:0,P=I?0:1,F=O?[_,0,P,0]:[0,P,0,_];this.legendColor={linearGradient:{x1:F[0],y1:F[1],x2:F[2],y2:F[3]},stops:this.stops}}drawLegendSymbol(O,I){let _=I.legendItem||{},P=O.padding,F=O.options,A=this.options.labels,D=L(F.itemDistance,10),C=this.horiz,{width:d,height:f}=this.getSize(),y=L(F.labelPadding,C?16:30);this.setLegendColor(),_.symbol||(_.symbol=this.chart.renderer.symbol("roundedRect").attr({r:F.symbolRadius??3,zIndex:1}).add(_.group)),_.symbol.attr({x:0,y:(O.baseline||0)-11,width:d,height:f}),_.labelWidth=d+P+(C?D:L(A.x,A.distance)+(this.maxLabelLength||0)),_.labelHeight=f+P+(C?y:0)}setState(O){this.series.forEach(function(I){I.setState(O)})}setVisible(){}getSeriesExtremes(){let O=this.series,I,_,P,F,A,D,C=O.length,d,f;for(this.dataMin=1/0,this.dataMax=-1/0;C--;){if(_=(D=O[C]).colorKey=L(D.options.colorKey,D.colorKey,D.pointValKey,D.zoneAxis,"y"),F=D.pointArrayMap,A=D[_+"Min"]&&D[_+"Max"],D[_+"Data"])I=D[_+"Data"];else if(F){if(I=[],P=F.indexOf(_),d=D.yData,P>=0&&d)for(f=0;fD+C&&(_=D+C+2),I.plotX=_,I.plotY=this.len-_,super.drawCrosshair(O,I),I.plotX=F,I.plotY=A,this.cross&&!this.cross.addedToColorAxis&&P.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(P.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||typeof this.crosshair!="object"||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(O){let I=this.left,_=O.translatedValue,P=this.top;return m(_)?this.horiz?[["M",_-4,P-6],["L",_+4,P-6],["L",_,P],["Z"]]:[["M",I,_],["L",I-6,_+6],["L",I-6,_-6],["Z"]]:super.getPlotLinePath(O)}update(O,I){let _=this.chart.legend;this.series.forEach(P=>{P.isDirtyData=!0}),(O.dataClasses&&_.allItems||this.dataClasses)&&this.destroyItems(),super.update(O,I),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),_.colorizeItem(this,!0))}destroyItems(){let O=this.chart,I=this.legendItem||{};if(I.label)O.legend.destroyItem(this);else if(I.labels)for(let _ of I.labels)O.legend.destroyItem(_);O.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(O){this.destroyItems(),super.remove(O)}getDataClassLegendSymbols(){let O,I=this,_=I.chart,P=I.legendItem&&I.legendItem.labels||[],F=_.options.legend,A=L(F.valueDecimals,-1),D=L(F.valueSuffix,""),C=d=>I.series.reduce((f,y)=>(f.push(...y.points.filter(M=>M.dataClass===d)),f),[]);return P.length||I.dataClasses.forEach((d,f)=>{let y=d.from,M=d.to,{numberFormatter:k}=_,T=!0;O="",y===void 0?O="< ":M===void 0&&(O="> "),y!==void 0&&(O+=k(y,A)+D),y!==void 0&&M!==void 0&&(O+=" - "),M!==void 0&&(O+=k(M,A)+D),P.push(b({chart:_,name:O,options:{},drawLegendSymbol:a.rectangle,visible:!0,isDataClass:!0,setState:z=>{for(let N of C(f))N.setState(z)},setVisible:function(){this.visible=T=I.visible=!T;let z=[];for(let N of C(f))N.setVisible(T),N.hiddenInDataClass=!T,z.indexOf(N.series)===-1&&z.push(N.series);_.legend.colorizeItem(this,T),z.forEach(N=>{v(N,"afterDataClassLegendClick")})}},d))}),P}getSize(){let{chart:O,horiz:I}=this,{height:_,width:P}=this.options,{legend:F}=O.options;return{width:L(p(P)?S(P,O.chartWidth):void 0,F?.symbolWidth,I?w.defaultLegendLength:12),height:L(p(_)?S(_,O.chartHeight):void 0,F?.symbolHeight,I?12:w.defaultLegendLength)}}}return w.defaultLegendLength=200,w.keepProps=["legendItem"],b(w.prototype,n),Array.prototype.push.apply(e.keepProps,w.keepProps),w}),s(t,"masters/modules/coloraxis.src.js",[t["Core/Globals.js"],t["Core/Axis/Color/ColorAxis.js"]],function(e,i){return e.ColorAxis=e.ColorAxis||i,e.ColorAxis.compose(e.Chart,e.Fx,e.Legend,e.Series),e}),s(t,"Maps/MapNavigationDefaults.js",[],function(){return{lang:{zoomIn:"Zoom in",zoomOut:"Zoom out"},mapNavigation:{buttonOptions:{alignTo:"plotBox",align:"left",verticalAlign:"top",x:0,width:18,height:18,padding:5,style:{color:"#666666",fontSize:"1em",fontWeight:"bold"},theme:{fill:"#ffffff",stroke:"#e6e6e6","stroke-width":1,"text-align":"center"}},buttons:{zoomIn:{onclick:function(){this.mapZoom(.5)},text:"+",y:0},zoomOut:{onclick:function(){this.mapZoom(2)},text:"-",y:28}},mouseWheelSensitivity:1.1}}}),s(t,"Maps/MapPointer.js",[t["Core/Utilities.js"]],function(e){var i;let{defined:r,extend:n,pick:l,wrap:a}=e;return function(h){let c,g=0;function u(x){let m=this.chart;x=this.normalize(x),m.options.mapNavigation.enableDoubleClickZoomTo?m.pointer.inClass(x.target,"highcharts-tracker")&&m.hoverPoint&&m.hoverPoint.zoomTo():m.isInsidePlot(x.chartX-m.plotLeft,x.chartY-m.plotTop)&&m.mapZoom(.5,void 0,void 0,x.chartX,x.chartY)}function p(x){let m=this.chart,E=r((x=this.normalize(x)).wheelDelta)&&-x.wheelDelta/120||x.deltaY||x.detail;Math.abs(E)>=1&&(g+=Math.abs(E),c&&clearTimeout(c),c=setTimeout(()=>{g=0},50)),g<10&&m.isInsidePlot(x.chartX-m.plotLeft,x.chartY-m.plotTop)&&m.mapView&&m.mapView.zoomBy(-((m.options.mapNavigation.mouseWheelSensitivity-1)*E),void 0,[x.chartX,x.chartY],!(1>Math.abs(E))&&void 0)}function b(x,m,E){let L=this.chart;if(m=x.call(this,m,E),L&&L.mapView){let S=L.mapView.pixelsToLonLat({x:m.chartX-L.plotLeft,y:m.chartY-L.plotTop});S&&n(m,S)}return m}function v(x){let m=this.chart.options.mapNavigation;m&&l(m.enableTouchZoom,m.enabled)&&(this.chart.zooming.pinchType="xy"),x.apply(this,[].slice.call(arguments,1))}h.compose=function(x){let m=x.prototype;m.onContainerDblClick||(n(m,{onContainerDblClick:u,onContainerMouseWheel:p}),a(m,"normalize",b),a(m,"zoomOption",v))}}(i||(i={})),i}),s(t,"Maps/MapSymbols.js",[],function(){let e;function i(n,l,a,h,c){if(c){let g=c?.r||0;c.brBoxY=l-g,c.brBoxHeight=h+g}return e.roundedRect(n,l,a,h,c)}function r(n,l,a,h,c){if(c){let g=c?.r||0;c.brBoxHeight=h+g}return e.roundedRect(n,l,a,h,c)}return{compose:function(n){(e=n.prototype.symbols).bottombutton=i,e.topbutton=r}}}),s(t,"Maps/MapNavigation.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Maps/MapNavigationDefaults.js"],t["Maps/MapPointer.js"],t["Maps/MapSymbols.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{setOptions:h}=e,{composed:c}=i,{addEvent:g,extend:u,merge:p,objectEach:b,pick:v,pushUnique:x}=a;function m(L){L&&(L.preventDefault&&L.preventDefault(),L.stopPropagation&&L.stopPropagation(),L.cancelBubble=!0)}class E{static compose(S,w,R){n.compose(w),l.compose(R),x(c,"Map.Navigation")&&(g(S,"beforeRender",function(){this.mapNavigation=new E(this),this.mapNavigation.update()}),h(r))}constructor(S){this.chart=S,this.navButtons=[]}update(S){let w=this,R=w.chart,O=w.navButtons,I=function(P){this.handler.call(R,P),m(P)},_=R.options.mapNavigation;for(S&&(_=R.options.mapNavigation=p(R.options.mapNavigation,S));O.length;)O.pop().destroy();if(!R.renderer.forExport&&v(_.enableButtons,_.enabled)){w.navButtonsGroup||(w.navButtonsGroup=R.renderer.g().attr({zIndex:7}).add()),b(_.buttons,(F,A)=>{let D={padding:(F=p(_.buttonOptions,F)).padding};!R.styledMode&&F.theme&&(u(D,F.theme),D.style=p(F.theme.style,F.style));let{text:C,width:d=0,height:f=0,padding:y=0}=F,M=R.renderer.button(C!=="+"&&C!=="-"&&C||"",0,0,I,D,void 0,void 0,void 0,A==="zoomIn"?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+{zoomIn:"zoom-in",zoomOut:"zoom-out"}[A]).attr({width:d,height:f,title:R.options.lang[A],zIndex:5}).add(w.navButtonsGroup);if(C==="+"||C==="-"){let k=d+1,T=[["M",y+3,y+f/2],["L",y+k-3,y+f/2]];C==="+"&&T.push(["M",y+k/2,y+3],["L",y+k/2,y+f-3]),R.renderer.path(T).addClass("highcharts-button-symbol").attr(R.styledMode?{}:{stroke:F.style?.color,"stroke-width":3,"stroke-linecap":"round"}).add(M)}if(M.handler=F.onclick,g(M.element,"dblclick",m),O.push(M),u(F,{width:M.width,height:2*(M.height||0)}),R.hasLoaded)M.align(F,!1,F.alignTo);else{let k=g(R,"load",()=>{M.element&&M.align(F,!1,F.alignTo),k()})}});let P=(F,A)=>!(A.x>=F.x+F.width||A.x+A.width<=F.x||A.y>=F.y+F.height||A.y+A.height<=F.y);R.hasLoaded||g(R,"render",function(){let F=R.exportingGroup&&R.exportingGroup.getBBox();if(F){let A=w.navButtonsGroup.getBBox();if(P(F,A)){let D=-A.y-A.height+F.y-5,C=F.y+F.height-A.y+5,d=_.buttonOptions&&_.buttonOptions.verticalAlign;w.navButtonsGroup.attr({translateY:d==="bottom"?D:C})}}})}this.updateEvents(_)}updateEvents(S){let w=this.chart;v(S.enableDoubleClickZoom,S.enabled)||S.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||g(w.container,"dblclick",function(R){w.pointer.onContainerDblClick(R)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),v(S.enableMouseWheelZoom,S.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||g(w.container,"wheel",function(R){return w.pointer.inClass(R.target,"highcharts-no-mousewheel")||(w.pointer.onContainerMouseWheel(R),m(R)),!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())}}return E}),s(t,"Series/ColorMapComposition.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{column:{prototype:l}}=e.seriesTypes,{addEvent:a,defined:h}=r;return function(c){function g(u){let p=this.series,b=p.chart.renderer;this.moveToTopOnHover&&this.graphic&&(p.stateMarkerGraphic||(p.stateMarkerGraphic=new i(b,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),u?.state==="hover"?(this.graphic.attr({id:this.id}),p.stateMarkerGraphic.attr({href:`${b.url}#${this.id}`,visibility:"visible"})):p.stateMarkerGraphic.attr({href:""}))}c.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return this.value!==null&&this.value!==1/0&&this.value!==-1/0&&(this.value===void 0||!isNaN(this.value))}},c.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(u){let p={};return h(u.color)&&(!u.state||u.state==="normal")&&(p[this.colorProp||"fill"]=u.color),p},pointAttribs:l.pointAttribs},c.compose=function(u){return a(u.prototype.pointClass,"afterSetState",g),u}}(n||(n={})),n}),s(t,"Core/Chart/MapChart.js",[t["Core/Chart/Chart.js"],t["Core/Defaults.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{getOptions:a}=i,{isNumber:h,merge:c,pick:g}=n;class u extends e{init(b,v){let x=a().credits,m=c({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:g(x.mapText,' \xA9 {geojson.copyrightShort}'),mapTextFull:g(x.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},b);super.init(m,v)}mapZoom(b,v,x,m,E){this.mapView&&(h(b)&&(b=Math.log(b)/Math.log(.5)),this.mapView.zoomBy(b,h(v)&&h(x)?this.mapView.projection.inverse([v,x]):void 0,h(m)&&h(E)?[m,E]:void 0))}update(b){b.chart&&"map"in b.chart&&this.mapView?.recommendMapView(this,[b.chart.map,...(this.options.series||[]).map(v=>v.mapData)],!0),super.update.apply(this,arguments)}}return(l=u||(u={})).maps={},l.mapChart=function(p,b,v){return new l(p,b,v)},l.splitPath=function(p){let b;return b=typeof p=="string"?(p=p.replace(/([A-Za-z])/g," $1 ").replace(/^\s*/,"").replace(/\s*$/,"")).split(/[ ,;]+/).map(v=>/[A-Za-z]/.test(v)?v:parseFloat(v)):p,r.prototype.pathToSegments(b)},u}),s(t,"Maps/MapUtilities.js",[],function(){return{boundsFromPath:function(e){let i=-Number.MAX_VALUE,r=Number.MAX_VALUE,n=-Number.MAX_VALUE,l=Number.MAX_VALUE,a;if(e.forEach(h=>{let c=h[h.length-2],g=h[h.length-1];typeof c=="number"&&typeof g=="number"&&(r=Math.min(r,c),i=Math.max(i,c),l=Math.min(l,g),n=Math.max(n,g),a=!0)}),a)return{x1:r,y1:l,x2:i,y2:n}},pointInPolygon:function({x:e,y:i},r){let n,l,a=!1;for(n=0,l=r.length-1;ni!=r[l][1]>i&&e<(r[l][0]-r[n][0])*(i-r[n][1])/(r[l][1]-r[n][1])+r[n][0]&&(a=!a);return a}}}),s(t,"Series/Map/MapPoint.js",[t["Series/ColorMapComposition.js"],t["Maps/MapUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{boundsFromPath:l}=i,a=r.seriesTypes.scatter.prototype.pointClass,{extend:h,isNumber:c,pick:g}=n;class u extends a{static getProjectedPath(b,v){return b.projectedPath||(v&&b.geometry?(v.hasCoordinates=!0,b.projectedPath=v.path(b.geometry)):b.projectedPath=b.path),b.projectedPath||[]}applyOptions(b,v){let x=this.series,m=super.applyOptions(b,v),E=x.joinBy;if(x.mapData&&x.mapMap){let L=E[1],S=super.getNestedProperty(L),w=S!==void 0&&x.mapMap[S];w?h(m,qi(xe({},w),{name:m.name??w.name})):x.pointArrayMap.indexOf("value")!==-1&&(m.value=m.value||null)}return m}getProjectedBounds(b){let v=l(u.getProjectedPath(this,b)),x=this.properties,m=this.series.chart.mapView;if(v){let E=x&&x["hc-middle-lon"],L=x&&x["hc-middle-lat"];if(m&&c(E)&&c(L)){let S=b.forward([E,L]);v.midX=S[0],v.midY=S[1]}else{let S=x&&x["hc-middle-x"],w=x&&x["hc-middle-y"];v.midX=v.x1+(v.x2-v.x1)*g(this.middleX,c(S)?S:.5);let R=g(this.middleY,c(w)?w:.5);this.geometry||(R=1-R),v.midY=v.y2-(v.y2-v.y1)*R}return v}}onMouseOver(b){n.clearTimeout(this.colorInterval),!this.isNull&&this.visible||this.series.options.nullInteraction?super.onMouseOver.call(this,b):this.series.onMouseOut()}setVisible(b){this.visible=this.options.visible=!!b,this.dataLabel&&this.dataLabel[b?"show":"hide"](),this.graphic&&this.graphic.attr(this.series.pointAttribs(this))}zoomTo(b){let v=this.series.chart,x=v.mapView,m=this.bounds;if(x&&m){let E=c(this.insetIndex)&&x.insets[this.insetIndex];if(E){let L=E.projectedUnitsToPixels({x:m.x1,y:m.y1}),S=E.projectedUnitsToPixels({x:m.x2,y:m.y2}),w=x.pixelsToProjectedUnits({x:L.x,y:L.y}),R=x.pixelsToProjectedUnits({x:S.x,y:S.y});m={x1:w.x,y1:w.y,x2:R.x,y2:R.y}}x.fitToBounds(m,void 0,!1),this.series.isDirty=!0,v.redraw(b)}}}return h(u.prototype,{dataLabelOnNull:e.pointMembers.dataLabelOnNull,moveToTopOnHover:e.pointMembers.moveToTopOnHover,isValid:e.pointMembers.isValid}),u}),s(t,"Series/Map/MapSeriesDefaults.js",[t["Core/Utilities.js"]],function(e){let{isNumber:i}=e;return{affectsMapView:!0,animation:!1,dataLabels:{crop:!1,formatter:function(){let{numberFormatter:r}=this.series.chart,{value:n}=this.point;return i(n)?r(n,-1):this.point.name},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},linecap:"round",marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}
"},turboThreshold:0,allAreas:!0,borderColor:"#e6e6e6",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:void 0,borderColor:"#666666",borderWidth:2},normal:{animation:!0},select:{color:"#cccccc"}},legendSymbol:"rectangle"}}),s(t,"Maps/MapViewDefaults.js",[],function(){return{center:[0,0],fitToGeometry:void 0,maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0,insetOptions:{borderColor:"#cccccc",borderWidth:1,padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}}}),s(t,"Maps/GeoJSONComposition.js",[t["Core/Globals.js"],t["Core/Templating.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{win:l}=e,{format:a}=i,{error:h,extend:c,merge:g,wrap:u}=r;return function(p){function b(S){return this.mapView&&this.mapView.lonLatToProjectedUnits(S)}function v(S){return this.mapView&&this.mapView.projectedUnitsToLonLat(S)}function x(S,w){let R=this.options.chart.proj4||l.proj4;if(!R){h(21,!1,this);return}let{jsonmarginX:O=0,jsonmarginY:I=0,jsonres:_=1,scale:P=1,xoffset:F=0,xpan:A=0,yoffset:D=0,ypan:C=0}=w,d=R(w.crs,[S.lon,S.lat]),f=w.cosAngle||w.rotation&&Math.cos(w.rotation),y=w.sinAngle||w.rotation&&Math.sin(w.rotation),M=w.rotation?[d[0]*f+d[1]*y,-d[0]*y+d[1]*f]:d;return{x:((M[0]-F)*P+A)*_+O,y:-(((D-M[1])*P+C)*_-I)}}function m(S,w){let R=this.options.chart.proj4||l.proj4;if(!R){h(21,!1,this);return}if(S.y===null)return;let{jsonmarginX:O=0,jsonmarginY:I=0,jsonres:_=1,scale:P=1,xoffset:F=0,xpan:A=0,yoffset:D=0,ypan:C=0}=w,d={x:((S.x-O)/_-A)/P+F,y:((S.y-I)/_+C)/P+D},f=w.cosAngle||w.rotation&&Math.cos(w.rotation),y=w.sinAngle||w.rotation&&Math.sin(w.rotation),M=R(w.crs,"WGS84",w.rotation?{x:d.x*f+-(d.y*y),y:d.x*y+d.y*f}:d);return{lat:M.y,lon:M.x}}function E(S,w){w||(w=Object.keys(S.objects)[0]);let R=S.objects[w];if(R["hc-decoded-geojson"]&&R["hc-decoded-geojson"].title===S.title)return R["hc-decoded-geojson"];let O=S.arcs;if(S.transform){let A,D,C,d=S.arcs,{scale:f,translate:y}=S.transform;O=[];for(let M=0,k=d.length;Mtypeof A[0]=="number"?A.reduce((D,C,d)=>{let f=C<0?O[~C]:O[C];return C<0?(f=f.slice(0,d===0?f.length:f.length-1)).reverse():d&&(f=f.slice(1)),D.concat(f)},[]):A.map(I),_=R.geometries,P=[];for(let A=0,D=_.length;A(l[1]-n[1])*(a[0]-n[0])}function r(n,l,a,h){let c=[n[0]-l[0],n[1]-l[1]],g=[a[0]-h[0],a[1]-h[1]],u=n[0]*l[1]-n[1]*l[0],p=a[0]*h[1]-a[1]*h[0],b=1/(c[0]*g[1]-c[1]*g[0]),v=[(u*g[0]-p*c[0])*b,(u*g[1]-p*c[1])*b];return v.isIntersection=!0,v}return{clipLineString:function(n,l){let a=[],h=e(n,l,!1);for(let c=1;cl===0?0:l>0?1:-1),i=Math.PI/180,r=Math.PI/2,n=l=>Math.tan((r+l)/2);return class{constructor(l){let a=(l.parallels||[]).map(p=>p*i),h=a[0]||0,c=a[1]??h,g=Math.cos(h);typeof l.projectedBounds=="object"&&(this.projectedBounds=l.projectedBounds);let u=h===c?Math.sin(h):Math.log(g/Math.cos(c))/Math.log(n(c)/n(h));1e-10>Math.abs(u)&&(u=1e-10*(e(u)||1)),this.n=u,this.c=g*Math.pow(n(h),u)/u}forward(l){let{c:a,n:h,projectedBounds:c}=this,g=l[0]*i,u=l[1]*i;a>0?u<-r+1e-6&&(u=-r+1e-6):u>r-1e-6&&(u=r-1e-6);let p=a/Math.pow(n(u),h),b=p*Math.sin(h*g)*63.78137,v=(a-p*Math.cos(h*g))*63.78137,x=[b,v];return c&&(bc.x2||vc.y2)&&(x.outside=!0),x}inverse(l){let{c:a,n:h}=this,c=l[0]/63.78137,g=a-l[1]/63.78137,u=e(h)*Math.sqrt(c*c+g*g),p=Math.atan2(c,Math.abs(g))*e(g);return g*h<0&&(p-=Math.PI*e(c)*e(g)),[p/h/i,(2*Math.atan(Math.pow(a/u,1/h))-r)/i]}}}),s(t,"Maps/Projections/EqualEarth.js",[],function(){let e=Math.sqrt(3)/2;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}forward(i){let r=Math.PI/180,n=Math.asin(e*Math.sin(i[1]*r)),l=n*n,a=l*l*l;return[i[0]*r*Math.cos(n)*74.03120656864502/(e*(1.340264+-.24331799999999998*l+a*(.0062510000000000005+.034164*l))),74.03120656864502*n*(1.340264+-.081106*l+a*(893e-6+.003796*l))]}inverse(i){let r=i[0]/74.03120656864502,n=i[1]/74.03120656864502,l=180/Math.PI,a=n,h,c,g,u;for(let v=0;v<12&&(c=(h=a*a)*h*h,g=a*(1.340264+-.081106*h+c*(893e-6+.003796*h))-n,a-=u=g/(1.340264+-.24331799999999998*h+c*(.0062510000000000005+.034164*h)),!(1e-9>Math.abs(u)));++v);c=(h=a*a)*h*h;let p=l*e*r*(1.340264+-.24331799999999998*h+c*(.0062510000000000005+.034164*h))/Math.cos(a),b=l*Math.asin(Math.sin(a)/e);return Math.abs(p)>180?[NaN,NaN]:[p,b]}}}),s(t,"Maps/Projections/Miller.js",[],function(){let e=Math.PI/4,i=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}forward(r){return[r[0]*i*63.78137,79.7267125*Math.log(Math.tan(e+.4*r[1]*i))]}inverse(r){return[r[0]/63.78137/i,2.5*(Math.atan(Math.exp(r[1]/63.78137*.8))-e)/i]}}}),s(t,"Maps/Projections/Orthographic.js",[],function(){let e=Math.PI/180;return class{constructor(){this.antimeridianCutting=!1,this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}forward(i){let r=i[0],n=i[1]*e,l=[Math.cos(n)*Math.sin(r*e)*63.78460826781007,63.78460826781007*Math.sin(n)];return(r<-90||r>90)&&(l.outside=!0),l}inverse(i){let r=i[0]/63.78460826781007,n=i[1]/63.78460826781007,l=Math.sqrt(r*r+n*n),a=Math.asin(l),h=Math.sin(a);return[Math.atan2(r*h,l*Math.cos(a))/e,Math.asin(l&&n*h/l)/e]}}}),s(t,"Maps/Projections/WebMercator.js",[],function(){let e=Math.PI/180;return class{constructor(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071},this.maxLatitude=85.0511287798}forward(i){let r=Math.sin(i[1]*e),n=[63.78137*i[0]*e,63.78137*Math.log((1+r)/(1-r))/2];return Math.abs(i[1])>this.maxLatitude&&(n.outside=!0),n}inverse(i){return[i[0]/(63.78137*e),(2*Math.atan(Math.exp(i[1]/63.78137))-Math.PI/2)/e]}}}),s(t,"Maps/Projections/ProjectionRegistry.js",[t["Maps/Projections/LambertConformalConic.js"],t["Maps/Projections/EqualEarth.js"],t["Maps/Projections/Miller.js"],t["Maps/Projections/Orthographic.js"],t["Maps/Projections/WebMercator.js"]],function(e,i,r,n,l){return{EqualEarth:i,LambertConformalConic:e,Miller:r,Orthographic:n,WebMercator:l}}),s(t,"Maps/Projection.js",[t["Core/Geometry/PolygonClip.js"],t["Maps/Projections/ProjectionRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{clipLineString:n,clipPolygon:l}=e,{clamp:a,erase:h}=r,c=2*Math.PI/360,g=v=>(v<-180&&(v+=360),v>180&&(v-=360),v),u=v=>(1-Math.cos(v))/2,p=(v,x)=>{let m=Math.cos,E=v[1]*c,L=v[0]*c,S=x[1]*c,w=x[0]*c;return u(S-E)+m(E)*m(S)*u(w-L)};class b{static add(x,m){b.registry[x]=m}static distance(x,m){let{atan2:E,sqrt:L}=Math,S=p(x,m);return 2*E(L(S),L(1-S))*6371e3}static geodesic(x,m,E,L=5e5){let{atan2:S,cos:w,sin:R,sqrt:O}=Math,I=b.distance,_=x[1]*c,P=x[0]*c,F=m[1]*c,A=m[0]*c,D=w(_)*w(P),C=w(F)*w(A),d=w(_)*R(P),f=w(F)*R(A),y=R(_),M=R(F),k=I(x,m),T=k/6371e3,z=R(T),N=Math.round(k/L),G=[];if(E&&G.push(x),N>1){let X=1/N;for(let j=X;j<.999;j+=X){let B=R((1-j)*T)/z,W=R(j*T)/z,Y=B*D+W*C,U=B*d+W*f,q=S(B*y+W*M,O(Y*Y+U*U)),H=S(U,Y);G.push([H/c,q/c])}}return E&&G.push(m),G}static insertGeodesics(x){let m=x.length-1;for(;m--;)if(Math.max(Math.abs(x[m][0]-x[m+1][0]),Math.abs(x[m][1]-x[m+1][1]))>10){let E=b.geodesic(x[m],x[m+1]);E.length&&x.splice(m+1,0,...E)}}static toString(x){let{name:m,rotation:E}=x||{};return[m,E&&E.join(",")].join(";")}constructor(x={}){this.hasCoordinates=!1,this.hasGeoProjection=!1,this.maxLatitude=90,this.options=x;let{name:m,projectedBounds:E,rotation:L}=x;this.rotator=L?this.getRotator(L):void 0;let S=m?b.registry[m]:void 0;S&&(this.def=new S(x));let{def:w,rotator:R}=this;w&&(this.maxLatitude=w.maxLatitude||90,this.hasGeoProjection=!0),R&&w?(this.forward=O=>w.forward(R.forward(O)),this.inverse=O=>R.inverse(w.inverse(O))):w?(this.forward=O=>w.forward(O),this.inverse=O=>w.inverse(O)):R&&(this.forward=R.forward,this.inverse=R.inverse),this.bounds=E==="world"?w&&w.bounds:E}lineIntersectsBounds(x){let{x1:m,x2:E,y1:L,y2:S}=this.bounds||{},w=(I,_,P)=>{let[F,A]=I,D=_?0:1;if(typeof P=="number"&&F[_]>=P!=A[_]>=P){let C=(P-F[_])/(A[_]-F[_]),d=F[D]+C*(A[D]-F[D]);return _?[d,P]:[P,d]}},R,O=x[0];return((R=w(x,0,m))||(R=w(x,0,E)))&&(O=R,x[1]=R),((R=w(x,1,L))||(R=w(x,1,S)))&&(O=R),O}getRotator(x){let m=x[0]*c,E=(x[1]||0)*c,L=(x[2]||0)*c,S=Math.cos(E),w=Math.sin(E),R=Math.cos(L),O=Math.sin(L);if(m!==0||E!==0||L!==0)return{forward:I=>{let _=I[0]*c+m,P=I[1]*c,F=Math.cos(P),A=Math.cos(_)*F,D=Math.sin(_)*F,C=Math.sin(P),d=C*S+A*w;return[Math.atan2(D*R-d*O,A*S-C*w)/c,Math.asin(d*R+D*O)/c]},inverse:I=>{let _=I[0]*c,P=I[1]*c,F=Math.cos(P),A=Math.cos(_)*F,D=Math.sin(_)*F,C=Math.sin(P),d=C*R-D*O;return[(Math.atan2(D*R+C*O,A*S+d*w)-m)/c,Math.asin(d*S-A*w)/c]}}}forward(x){return x}inverse(x){return x}cutOnAntimeridian(x,m){let E,L=[],S=[x];for(let w=0,R=x.length;w90)&&(P<-90||P>90)&&_>0!=P>0){let F=a((180-(_+360)%360)/((P+360)%360-(_+360)%360),0,1),A=I[1]+F*(O[1]-I[1]);L.push({i:w,lat:A,direction:_<0?1:-1,previousLonLat:I,lonLat:O})}}if(L.length)if(m){L.length%2==1&&(E=L.slice().sort((R,O)=>Math.abs(O.lat)-Math.abs(R.lat))[0],h(L,E));let w=L.length-2;for(;w>=0;){let R=L[w].i,O=g(180+1e-6*L[w].direction),I=g(180-1e-6*L[w].direction),_=x.splice(R,L[w+1].i-R,...b.geodesic([O,L[w].lat],[O,L[w+1].lat],!0));_.push(...b.geodesic([I,L[w+1].lat],[I,L[w].lat],!0)),S.push(_),w-=2}if(E)for(let R=0;R-1){let F=(I<0?-1:1)*this.maxLatitude,A=g(180+1e-6*O),D=g(180-1e-6*O),C=b.geodesic([A,I],[A,F],!0);for(let d=A+120*O;d>-180&&d<180;d+=120*O)C.push([d,F]);C.push(...b.geodesic([D,F],[D,E.lat],!0)),_.splice(P,0,...C);break}}}else{let w=L.length;for(;w--;){let R=L[w].i,O=x.splice(R,x.length,[g(180+1e-6*L[w].direction),L[w].lat]);O.unshift([g(180-1e-6*L[w].direction),L[w].lat]),S.push(O)}}return S}path(x){let m,{bounds:E,def:L,rotator:S}=this,w=[],R=x.type==="Polygon"||x.type==="MultiPolygon",O=this.hasGeoProjection,I=!L||L.antimeridianCutting!==!1,_=I?S:void 0,P=I&&L||this;E&&(m=[[E.x1,E.y1],[E.x2,E.y1],[E.x2,E.y2],[E.x1,E.y2]]);let F=A=>{let D=A.map(d=>{if(I){_&&(d=_.forward(d));let f=d[0];1e-6>Math.abs(f-180)&&(f=f<180?179.999999:180.000001),d=[f,d[1]]}return d}),C=[D];O&&(b.insertGeodesics(D),I&&(C=this.cutOnAntimeridian(D,R))),C.forEach(d=>{let f,y;if(d.length<2)return;let M=!1,k=!1,T=X=>{M?w.push(["L",X[0],X[1]]):(w.push(["M",X[0],X[1]]),M=!0)},z=!1,N=!1,G=d.map(X=>{let j=P.forward(X);return j.outside?z=!0:N=!0,j[1]===1/0?j[1]=1e10:j[1]===-1/0&&(j[1]=-1e10),j});if(I){if(R&&G.push(G[0]),z){if(!N)return;if(m){if(R)G=l(G,m);else if(E){n(G,m).forEach(X=>{M=!1,X.forEach(T)});return}}}G.forEach(T)}else for(let X=0;XT(P.forward(W))):M=!1),T(B),y=j,k=!1)}})};return x.type==="LineString"?F(x.coordinates):x.type==="MultiLineString"?x.coordinates.forEach(A=>F(A)):x.type==="Polygon"?(x.coordinates.forEach(A=>F(A)),w.length&&w.push(["Z"])):x.type==="MultiPolygon"&&(x.coordinates.forEach(A=>{A.forEach(D=>F(D))}),w.length&&w.push(["Z"])),w}}return b.registry=i,b}),s(t,"Maps/MapView.js",[t["Core/Globals.js"],t["Maps/MapViewDefaults.js"],t["Maps/GeoJSONComposition.js"],t["Maps/MapUtilities.js"],t["Maps/Projection.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{composed:h}=e,{topo2geo:c}=r,{boundsFromPath:g,pointInPolygon:u}=n,{addEvent:p,clamp:b,crisp:v,fireEvent:x,isArray:m,isNumber:E,isObject:L,isString:S,merge:w,pick:R,pushUnique:O,relativeLength:I}=a,_={};function P(C,d){let{width:f,height:y}=d;return Math.log(400.979322/Math.max((C.x2-C.x1)/(f/256),(C.y2-C.y1)/(y/256)))/Math.log(2)}function F(C){C.seriesOptions.mapData&&this.mapView?.recommendMapView(this,[this.options.chart.map,C.seriesOptions.mapData],this.options.drilldown?.mapZooming)}class A{static compose(d){O(h,"MapView")&&(_=d.maps,p(d,"afterInit",function(){this.mapView=new A(this,this.options.mapView)},{order:0}),p(d,"addSeriesAsDrilldown",F),p(d,"afterDrillUp",F))}static compositeBounds(d){if(d.length)return d.slice(1).reduce((f,y)=>(f.x1=Math.min(f.x1,y.x1),f.y1=Math.min(f.y1,y.y1),f.x2=Math.max(f.x2,y.x2),f.y2=Math.max(f.y2,y.y2),f),w(d[0]))}static mergeInsets(d,f){let y=k=>{let T={};return k.forEach((z,N)=>{T[z&&z.id||`i${N}`]=z}),T},M=w(y(d),y(f));return Object.keys(M).map(k=>M[k])}constructor(d,f){this.allowTransformAnimation=!0,this.eventsToUnbind=[],this.insets=[],this.padding=[0,0,0,0],this.recommendedMapView={},this instanceof D||this.recommendMapView(d,[d.options.chart.map,...(d.options.series||[]).map(T=>T.mapData)]),this.userOptions=f||{};let y=w(i,this.recommendedMapView,f),M=this.recommendedMapView?.insets,k=f&&f.insets;M&&k&&(y.insets=A.mergeInsets(M,k)),this.chart=d,this.center=y.center,this.options=y,this.projection=new l(y.projection),this.playingField=d.plotBox,this.zoom=y.zoom||0,this.minZoom=y.minZoom,this.createInsets(),this.eventsToUnbind.push(p(d,"afterSetChartSize",()=>{this.playingField=this.getField(),(this.minZoom===void 0||this.minZoom===this.zoom)&&(this.fitToBounds(void 0,void 0,!1),!this.chart.hasRendered&&E(this.userOptions.zoom)&&(this.zoom=this.userOptions.zoom),this.userOptions.center&&w(!0,this.center,this.userOptions.center))})),this.setUpEvents()}createInsets(){let d=this.options,f=d.insets;f&&f.forEach(y=>{let M=new D(this,w(d.insetOptions,y));this.insets.push(M)})}fitToBounds(d,f,y=!0,M){let k=d||this.getProjectedBounds();if(k){let T=R(f,d?0:this.options.padding),z=this.getField(!1),N=m(T)?T:[T,T,T,T];this.padding=[I(N[0],z.height),I(N[1],z.width),I(N[2],z.height),I(N[3],z.width)],this.playingField=this.getField();let G=P(k,this.playingField);d||(this.minZoom=G);let X=this.projection.inverse([(k.x2+k.x1)/2,(k.y2+k.y1)/2]);this.setView(X,G,y,M)}}getField(d=!0){let f=d?this.padding:[0,0,0,0];return{x:f[3],y:f[0],width:this.chart.plotWidth-f[1]-f[3],height:this.chart.plotHeight-f[0]-f[2]}}getGeoMap(d){if(S(d))return _[d]&&_[d].type==="Topology"?c(_[d]):_[d];if(L(d,!0)){if(d.type==="FeatureCollection")return d;if(d.type==="Topology")return c(d)}}getMapBBox(){let d=this.getProjectedBounds(),f=this.getScale();if(d){let y=this.padding,M=this.projectedUnitsToPixels({x:d.x1,y:d.y2});return{width:(d.x2-d.x1)*f+y[1]+y[3],height:(d.y2-d.y1)*f+y[0]+y[2],x:M.x-y[3],y:M.y-y[0]}}}getProjectedBounds(){let d=this.projection,f=this.chart.series.reduce((M,k)=>{let T=k.getProjectedBounds&&k.getProjectedBounds();return T&&k.options.affectsMapView!==!1&&M.push(T),M},[]),y=this.options.fitToGeometry;if(y){if(!this.fitToGeometryCache)if(y.type==="MultiPoint"){let M=y.coordinates.map(z=>d.forward(z)),k=M.map(z=>z[0]),T=M.map(z=>z[1]);this.fitToGeometryCache={x1:Math.min.apply(0,k),x2:Math.max.apply(0,k),y1:Math.min.apply(0,T),y2:Math.max.apply(0,T)}}else this.fitToGeometryCache=g(d.path(y));return this.fitToGeometryCache}return this.projection.bounds||A.compositeBounds(f)}getScale(){return 256/400.979322*Math.pow(2,this.zoom)}getSVGTransform(){let{x:d,y:f,width:y,height:M}=this.playingField,k=this.projection.forward(this.center),T=this.projection.hasCoordinates?-1:1,z=this.getScale(),N=z*T,G=d+y/2-k[0]*z,X=f+M/2-k[1]*N;return{scaleX:z,scaleY:N,translateX:G,translateY:X}}lonLatToPixels(d){let f=this.lonLatToProjectedUnits(d);if(f)return this.projectedUnitsToPixels(f)}lonLatToProjectedUnits(d){let f=this.chart,y=f.mapTransforms;if(y){for(let k in y)if(Object.hasOwnProperty.call(y,k)&&y[k].hitZone){let T=f.transformFromLatLon(d,y[k]);if(T&&u(T,y[k].hitZone.coordinates[0]))return T}return f.transformFromLatLon(d,y.default)}for(let k of this.insets)if(k.options.geoBounds&&u({x:d.lon,y:d.lat},k.options.geoBounds.coordinates[0])){let T=k.projection.forward([d.lon,d.lat]),z=k.projectedUnitsToPixels({x:T[0],y:T[1]});return this.pixelsToProjectedUnits(z)}let M=this.projection.forward([d.lon,d.lat]);if(!M.outside)return{x:M[0],y:M[1]}}projectedUnitsToLonLat(d){let f=this.chart,y=f.mapTransforms;if(y){for(let T in y)if(Object.hasOwnProperty.call(y,T)&&y[T].hitZone&&u(d,y[T].hitZone.coordinates[0]))return f.transformToLatLon(d,y[T]);return f.transformToLatLon(d,y.default)}let M=this.projectedUnitsToPixels(d);for(let T of this.insets)if(T.hitZone&&u(M,T.hitZone.coordinates[0])){let z=T.pixelsToProjectedUnits(M),N=T.projection.inverse([z.x,z.y]);return{lon:N[0],lat:N[1]}}let k=this.projection.inverse([d.x,d.y]);return{lon:k[0],lat:k[1]}}recommendMapView(d,f,y=!1){this.recommendedMapView={};let M=f.map(z=>this.getGeoMap(z)),k=[];M.forEach(z=>{if(z&&(Object.keys(this.recommendedMapView).length||(this.recommendedMapView=z["hc-recommended-mapview"]||{}),z.bbox)){let[N,G,X,j]=z.bbox;k.push({x1:N,y1:G,x2:X,y2:j})}});let T=k.length&&A.compositeBounds(k);x(this,"onRecommendMapView",{geoBounds:T,chart:d},function(){if(T&&this.recommendedMapView){if(!this.recommendedMapView.projection){let{x1:z,y1:N,x2:G,y2:X}=T;this.recommendedMapView.projection=G-z>180&&X-N>90?{name:"EqualEarth",parallels:[0,0],rotation:[0]}:{name:"LambertConformalConic",parallels:[N,X],rotation:[-(z+G)/2]}}this.recommendedMapView.insets||(this.recommendedMapView.insets=void 0)}}),this.geoMap=M[0],y&&d.hasRendered&&!d.userOptions.mapView?.projection&&this.recommendedMapView&&this.update(this.recommendedMapView)}redraw(d){this.chart.series.forEach(f=>{f.useMapGeometry&&(f.isDirty=!0)}),this.chart.redraw(d)}setView(d,f,y=!0,M){d&&(this.center=d),typeof f=="number"&&(typeof this.minZoom=="number"&&(f=Math.max(f,this.minZoom)),typeof this.options.maxZoom=="number"&&(f=Math.min(f,this.options.maxZoom)),E(f)&&(this.zoom=f));let k=this.getProjectedBounds();if(k){let T=this.projection.forward(this.center),{x:z,y:N,width:G,height:X}=this.playingField,j=this.getScale(),B=this.projectedUnitsToPixels({x:k.x1,y:k.y1}),W=this.projectedUnitsToPixels({x:k.x2,y:k.y2}),Y=[(k.x1+k.x2)/2,(k.y1+k.y2)/2];if(!this.chart.series.some(U=>U.isDrilling)){let U=B.x,q=W.y,H=W.x,V=B.y;H-Uz+G&&U>z&&(T[0]+=Math.min(H-G-z,U-z)/j),V-qN+X&&q>N&&(T[1]-=Math.min(V-X-N,q-N)/j),this.center=this.projection.inverse(T)}this.insets.forEach(U=>{U.options.field&&(U.hitZone=U.getHitZone(),U.playingField=U.getField())}),this.render()}x(this,"afterSetView"),y&&this.redraw(M)}projectedUnitsToPixels(d){let f=this.getScale(),y=this.projection.forward(this.center),M=this.playingField,k=M.x+M.width/2,T=M.y+M.height/2;return{x:k-f*(y[0]-d.x),y:T+f*(y[1]-d.y)}}pixelsToLonLat(d){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(d))}pixelsToProjectedUnits(d){let{x:f,y}=d,M=this.getScale(),k=this.projection.forward(this.center),T=this.playingField,z=T.x+T.width/2,N=T.y+T.height/2;return{x:k[0]+(f-z)/M,y:k[1]-(y-N)/M}}setUpEvents(){let d,f,y,{chart:M}=this,k=T=>{let{lastTouches:z,pinchDown:N}=M.pointer,G=this.projection,X=T.touches,{mouseDownX:j,mouseDownY:B}=M,W=0;if(N?.length===1?(j=N[0].chartX,B=N[0].chartY):N?.length===2&&(j=(N[0].chartX+N[1].chartX)/2,B=(N[0].chartY+N[1].chartY)/2),X?.length===2&&z&&(W=Math.log(Math.sqrt(Math.pow(z[0].chartX-z[1].chartX,2)+Math.pow(z[0].chartY-z[1].chartY,2))/Math.sqrt(Math.pow(X[0].chartX-X[1].chartX,2)+Math.pow(X[0].chartY-X[1].chartY,2)))/Math.log(.5)),E(j)&&E(B)){let Y=`${j},${B}`,{chartX:U,chartY:q}=T.originalEvent;X?.length===2&&(U=(X[0].chartX+X[1].chartX)/2,q=(X[0].chartY+X[1].chartY)/2),Y!==f&&(f=Y,d=this.projection.forward(this.center),y=(this.projection.options.rotation||[0,0]).slice());let H=G.def&&G.def.bounds,V=H&&P(H,this.playingField)||-1/0;if(G.options.name==="Orthographic"&&2>(X?.length||0)&&(this.minZoom||1/0)<1.3*V){let Z=440/(this.getScale()*Math.min(M.plotWidth,M.plotHeight));if(y){let K=(j-U)*Z-y[0],J=b(-y[1]-(B-q)*Z,-80,80),tt=this.zoom;this.update({projection:{rotation:[-K,-J]}},!1),this.fitToBounds(void 0,void 0,!1),this.zoom=tt,M.redraw(!1)}}else if(E(U)&&E(q)){let Z=this.getScale(),K=this.projection.hasCoordinates?1:-1,J=this.projection.inverse([d[0]+(j-U)/Z,d[1]-(B-q)/Z*K]);isNaN(J[0]+J[1])||this.zoomBy(W,J,void 0,!1)}T.preventDefault()}};p(M,"pan",k),p(M,"touchpan",k),p(M,"selection",T=>{if(T.resetSelection)this.zoomBy();else{let z=T.x-M.plotLeft,N=T.y-M.plotTop,{y:G,x:X}=this.pixelsToProjectedUnits({x:z,y:N}),{y:j,x:B}=this.pixelsToProjectedUnits({x:z+T.width,y:N+T.height});this.fitToBounds({x1:X,y1:G,x2:B,y2:j},void 0,!0,!T.originalEvent.touches&&void 0),/^touch/.test(T.originalEvent.type)||M.showResetZoom(),T.preventDefault()}})}render(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())}update(d,f=!0,y){let M=d.projection,k=M&&l.toString(M)!==l.toString(this.options.projection),T=!1;w(!0,this.userOptions,d),w(!0,this.options,d),"insets"in d&&(this.insets.forEach(z=>z.destroy()),this.insets.length=0,T=!0),(k||"fitToGeometry"in d)&&delete this.fitToGeometryCache,(k||T)&&(this.chart.series.forEach(z=>{let N=z.transformGroups;if(z.clearBounds&&z.clearBounds(),z.isDirty=!0,z.isDirtyData=!0,T&&N)for(;N.length>1;){let G=N.pop();G&&G.destroy()}}),k&&(this.projection=new l(this.options.projection)),T&&this.createInsets(),!d.center&&Object.hasOwnProperty.call(d,"zoom")&&!E(d.zoom)&&this.fitToBounds(void 0,void 0,!1)),d.center||E(d.zoom)?this.setView(this.options.center,d.zoom,!1):"fitToGeometry"in d&&this.fitToBounds(void 0,void 0,!1),f&&this.chart.redraw(y)}zoomBy(d,f,y,M){let k=this.chart,T=this.projection.forward(this.center);if(typeof d=="number"){let z,N,G,X=this.zoom+d;if(y){let[j,B]=y,W=this.getScale(),Y=j-k.plotLeft-k.plotWidth/2,U=B-k.plotTop-k.plotHeight/2;N=T[0]+Y/W,G=T[1]+U/W}if(typeof N=="number"&&typeof G=="number"){let j=1-Math.pow(2,this.zoom)/Math.pow(2,X),B=T[0]-N,W=T[1]-G;T[0]-=B*j,T[1]+=W*j,z=this.projection.inverse(T)}this.setView(f||z,X,void 0,M)}else this.fitToBounds(void 0,void 0,void 0,M)}}class D extends A{constructor(d,f){if(super(d.chart,f),this.id=f.id,this.mapView=d,this.options=w({center:[0,0]},d.options.insetOptions,f),this.allBounds=[],this.options.geoBounds){let y=d.projection.path(this.options.geoBounds);this.geoBoundsProjectedBox=g(y),this.geoBoundsProjectedPolygon=y.map(M=>[M[1]||0,M[2]||0])}}getField(d=!0){let f=this.hitZone;if(f){let y=d?this.padding:[0,0,0,0],M=f.coordinates[0],k=M.map(j=>j[0]),T=M.map(j=>j[1]),z=Math.min.apply(0,k)+y[3],N=Math.max.apply(0,k)-y[1],G=Math.min.apply(0,T)+y[0],X=Math.max.apply(0,T)-y[2];if(E(z)&&E(G))return{x:z,y:G,width:N-z,height:X-G}}return super.getField.call(this,d)}getHitZone(){let{chart:d,mapView:f,options:y}=this,{coordinates:M}=y.field||{};if(M){let k=M[0];if(y.units==="percent"){let T=y.relativeTo==="mapBoundingBox"&&f.getMapBBox()||w(d.plotBox,{x:0,y:0});k=k.map(z=>[I(`${z[0]}%`,T.width,T.x),I(`${z[1]}%`,T.height,T.y)])}return{type:"Polygon",coordinates:[k]}}}getProjectedBounds(){return A.compositeBounds(this.allBounds)}isInside(d){let{geoBoundsProjectedBox:f,geoBoundsProjectedPolygon:y}=this;return!!(f&&d.x>=f.x1&&d.x<=f.x2&&d.y>=f.y1&&d.y<=f.y2&&y&&u(d,y))}render(){let{chart:d,mapView:f,options:y}=this,M=y.borderPath||y.field;if(M&&f.group){let k=!0;this.border||(this.border=d.renderer.path().addClass("highcharts-mapview-inset-border").add(f.group),k=!1),d.styledMode||this.border.attr({stroke:y.borderColor,"stroke-width":y.borderWidth});let T=this.border.strokeWidth(),z=y.relativeTo==="mapBoundingBox"&&f.getMapBBox()||f.playingField,N=(M.coordinates||[]).reduce((G,X)=>X.reduce((j,B,W)=>{let[Y,U]=B;return y.units==="percent"&&(Y=d.plotLeft+I(`${Y}%`,z.width,z.x),U=d.plotTop+I(`${U}%`,z.height,z.y)),Y=v(Y,T),U=v(U,T),j.push(W===0?["M",Y,U]:["L",Y,U]),j},G),[]);this.border[k?"animate":"attr"]({d:N})}}destroy(){this.border&&(this.border=this.border.destroy()),this.eventsToUnbind.forEach(d=>d())}setUpEvents(){}}return A}),s(t,"Series/Map/MapSeries.js",[t["Core/Animation/AnimationUtilities.js"],t["Series/ColorMapComposition.js"],t["Series/CenteredUtilities.js"],t["Core/Globals.js"],t["Core/Chart/MapChart.js"],t["Series/Map/MapPoint.js"],t["Series/Map/MapSeriesDefaults.js"],t["Maps/MapView.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){let{animObject:p,stop:b}=e,{noop:v}=n,{splitPath:x}=l,{column:m,scatter:E}=g.seriesTypes,{extend:L,find:S,fireEvent:w,getNestedProperty:R,isArray:O,defined:I,isNumber:_,isObject:P,merge:F,objectEach:A,pick:D,splat:C}=u;class d extends E{constructor(){super(...arguments),this.processedData=[]}animate(y){let{chart:M,group:k}=this,T=p(this.options.animation);y?k.attr({translateX:M.plotLeft+M.plotWidth/2,translateY:M.plotTop+M.plotHeight/2,scaleX:.001,scaleY:.001}):k.animate({translateX:M.plotLeft,translateY:M.plotTop,scaleX:1,scaleY:1},T)}clearBounds(){this.points.forEach(y=>{delete y.bounds,delete y.insetIndex,delete y.projectedPath}),delete this.bounds}doFullTranslate(){return!!(this.isDirtyData||this.chart.isResizing||!this.hasRendered)}drawMapDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}drawPoints(){let y=this,{chart:M,group:k,transformGroups:T=[]}=this,{mapView:z,renderer:N}=M;if(z){this.transformGroups=T,T[0]||(T[0]=N.g().add(k));for(let G=0,X=z.insets.length;G{let{graphic:X}=G;G.group=T[typeof G.insetIndex=="number"?G.insetIndex+1:0],X&&X.parentGroup!==G.group&&X.add(G.group)}),m.prototype.drawPoints.apply(this),this.points.forEach(G=>{let X=G.graphic;if(X){let j=X.animate,B="";G.name&&(B+="highcharts-name-"+G.name.replace(/ /g,"-").toLowerCase()),G.properties&&G.properties["hc-key"]&&(B+=" highcharts-key-"+G.properties["hc-key"].toString().toLowerCase()),B&&X.addClass(B),M.styledMode&&X.css(this.pointAttribs(G,G.selected&&"select"||void 0)),X.attr({visibility:!G.visible&&(G.visible||G.isNull)?"hidden":"inherit"}),X.animate=function(W,Y,U){let q=_(W["stroke-width"])&&!_(X["stroke-width"]),H=_(X["stroke-width"])&&!_(W["stroke-width"]);if(q||H){let V=D(y.getStrokeWidth(y.options),1)/(M.mapView&&M.mapView.getScale()||1);q&&(X["stroke-width"]=V),H&&(W["stroke-width"]=V)}return j.call(X,W,Y,H?function(){X.element.removeAttribute("stroke-width"),delete X["stroke-width"],U&&U.apply(this,arguments)}:U)}}})),T.forEach((G,X)=>{let j=(X===0?z:z.insets[X-1]).getSVGTransform(),B=D(this.getStrokeWidth(this.options),1),W=j.scaleX,Y=j.scaleY>0?1:-1,U=q=>{(y.points||[]).forEach(H=>{let V,Z=H.graphic;Z&&Z["stroke-width"]&&(V=this.getStrokeWidth(H.options))&&Z.attr({"stroke-width":V/q})})};if(N.globalAnimation&&M.hasRendered&&z.allowTransformAnimation){let q=Number(G.attr("translateX")),H=Number(G.attr("translateY")),V=Number(G.attr("scaleX")),Z=(tt,$)=>{let Q=V+(W-V)*$.pos;G.attr({translateX:q+(j.translateX-q)*$.pos,translateY:H+(j.translateY-H)*$.pos,scaleX:Q,scaleY:Q*Y,"stroke-width":B/Q}),U(Q)},K=F(p(N.globalAnimation)),J=K.step;K.step=function(){J&&J.apply(this,arguments),Z.apply(this,arguments)},G.attr({animator:0}).animate({animator:1},K,(function(){typeof N.globalAnimation!="boolean"&&N.globalAnimation.complete&&N.globalAnimation.complete({applyDrilldown:!0}),w(this,"mapZoomComplete")}).bind(this))}else b(G),G.attr(F(j,{"stroke-width":B/W})),U(W)}),this.isDrilling||this.drawMapDataLabels()}}getProjectedBounds(){if(!this.bounds&&this.chart.mapView){let{insets:y,projection:M}=this.chart.mapView,k=[];(this.points||[]).forEach(T=>{if(T.path||T.geometry){if(typeof T.path=="string"?T.path=x(T.path):O(T.path)&&T.path[0]==="M"&&(T.path=this.chart.renderer.pathToSegments(T.path)),!T.bounds){let z=T.getProjectedBounds(M);if(z){T.labelrank=D(T.labelrank,(z.x2-z.x1)*(z.y2-z.y1));let{midX:N,midY:G}=z;if(y&&_(N)&&_(G)){let X=S(y,j=>j.isInside({x:N,y:G}));X&&(delete T.projectedPath,(z=T.getProjectedBounds(X.projection))&&X.allBounds.push(z),T.insetIndex=y.indexOf(X))}T.bounds=z}}T.bounds&&T.insetIndex===void 0&&k.push(T.bounds)}}),this.bounds=c.compositeBounds(k)}return this.bounds}getStrokeWidth(y){let M=this.pointAttrToOptions;return y[M&&M["stroke-width"]||"borderWidth"]}hasData(){return!!this.processedXData.length}pointAttribs(y,M){let{mapView:k,styledMode:T}=y.series.chart,z=T?this.colorAttribs(y):m.prototype.pointAttribs.call(this,y,M),N=this.getStrokeWidth(y.options);if(M){let X=F(this.options.states&&this.options.states[M],y.options.states&&y.options.states[M]||{}),j=this.getStrokeWidth(X);I(j)&&(N=j),z.stroke=X.borderColor??y.color}N&&k&&(N/=k.getScale());let G=this.getStrokeWidth(this.options);return z.dashstyle&&k&&_(G)&&(N=G/k.getScale()),y.visible||(z.fill=this.options.nullColor),I(N)?z["stroke-width"]=N:delete z["stroke-width"],z["stroke-linecap"]=z["stroke-linejoin"]=this.options.linecap,z}updateData(){return!this.processedData&&super.updateData.apply(this,arguments)}setData(y,M=!0,k,T){delete this.bounds,super.setData(y,!1,void 0,T),this.processData(),this.generatePoints(),M&&this.chart.redraw(k)}processData(){let y,M,k,T=this.options,z=T.data,N=this.chart,G=N.options.chart,X=this.joinBy,j=T.keys||this.pointArrayMap,B=[],W={},Y=this.chart.mapView,U=Y&&(P(T.mapData,!0)?Y.getGeoMap(T.mapData):Y.geoMap),q=N.mapTransforms=G.mapTransforms||U&&U["hc-transform"]||N.mapTransforms;q&&A(q,V=>{V.rotation&&(V.cosAngle=Math.cos(V.rotation),V.sinAngle=Math.sin(V.rotation))}),O(T.mapData)?k=T.mapData:U&&U.type==="FeatureCollection"&&(this.mapTitle=U.title,k=n.geojson(U,this.type,this)),this.processedData=[];let H=this.processedData;if(z){let V;for(let Z=0,K=z.length;Zj.length&&typeof V[0]=="string"&&(H[Z]["hc-key"]=V[0],++J);for(let tt=0;tt0?a.prototype.setNestedProperty(H[Z],V[J],j[tt]):H[Z][j[tt]]=V[J])}else H[Z]=z[Z];X&&X[0]==="_i"&&(H[Z]._i=Z)}}if(k){this.mapData=k,this.mapMap={};for(let V=0;V{let K=R(V,Z);W[K]&&B.push(W[K])})}if(T.allAreas){if(X[1]){let Z=X[1];H.forEach(K=>{B.push(R(Z,K))})}let V="|"+B.map(function(Z){return Z&&Z[X[0]]}).join("|")+"|";k.forEach(Z=>{X[0]&&V.indexOf("|"+Z[X[0]]+"|")!==-1||H.push(F(Z,{value:null}))})}}this.processedXData=Array(H.length)}setOptions(y){let M=super.setOptions(y),k=M.joinBy;return M.joinBy===null&&(k="_i"),(k=this.joinBy=C(k))[1]||(k[1]=k[0]),M}translate(){let y=this.doFullTranslate(),M=this.chart.mapView,k=M&&M.projection;if(this.chart.hasRendered&&(this.isDirtyData||!this.hasRendered)&&(this.processData(),this.generatePoints(),delete this.bounds,!M||M.userOptions.center||_(M.userOptions.zoom)||M.zoom!==M.minZoom?this.getProjectedBounds():M.fitToBounds(void 0,void 0,!1)),M){let T=M.getSVGTransform();this.points.forEach(z=>{let N=_(z.insetIndex)&&M.insets[z.insetIndex].getSVGTransform()||T;N&&z.bounds&&_(z.bounds.midX)&&_(z.bounds.midY)&&(z.plotX=z.bounds.midX*N.scaleX+N.translateX,z.plotY=z.bounds.midY*N.scaleY+N.translateY),y&&(z.shapeType="path",z.shapeArgs={d:a.getProjectedPath(z,k)}),z.hiddenInDataClass||(z.projectedPath&&!z.projectedPath.length?z.setVisible(!1):z.visible||z.setVisible(!0))})}w(this,"afterTranslate")}update(y){y.mapData&&this.chart.mapView?.recommendMapView(this.chart,[this.chart.options.chart.map,...(this.chart.options.series||[]).map((M,k)=>k===this._i?y.mapData:M.mapData)],!0),super.update.apply(this,arguments)}}return d.defaultOptions=F(E.defaultOptions,h),L(d.prototype,{type:"map",axisTypes:i.seriesMembers.axisTypes,colorAttribs:i.seriesMembers.colorAttribs,colorKey:i.seriesMembers.colorKey,directTouch:!0,drawDataLabels:v,drawGraph:v,forceDL:!0,getCenter:r.getCenter,getExtremesFromAll:!0,getSymbol:v,isCartesian:!1,parallelArrays:i.seriesMembers.parallelArrays,pointArrayMap:i.seriesMembers.pointArrayMap,pointClass:a,preserveAspectRatio:!0,searchPoint:v,trackerGroups:i.seriesMembers.trackerGroups,useMapGeometry:!0}),i.compose(d),g.registerSeriesType("map",d),d}),s(t,"Series/MapLine/MapLineSeriesDefaults.js",[],function(){return{lineWidth:1,fillColor:"none",legendSymbol:"lineMarker"}}),s(t,"Series/MapLine/MapLineSeries.js",[t["Series/MapLine/MapLineSeriesDefaults.js"],t["Series/Map/MapSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{extend:l,merge:a}=n;class h extends i{pointAttribs(g,u){let p=super.pointAttribs(g,u);return p.fill=this.options.fillColor,p}}return h.defaultOptions=a(i.defaultOptions,e),l(h.prototype,{type:"mapline",colorProp:"stroke",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"}}),r.registerSeriesType("mapline",h),h}),s(t,"Series/MapPoint/MapPointPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:r}=e.seriesTypes,{isNumber:n}=i;class l extends r.prototype.pointClass{isValid(){return!!(this.options.geometry||n(this.x)&&n(this.y)||n(this.options.lon)&&n(this.options.lat))}}return l}),s(t,"Series/MapPoint/MapPointSeriesDefaults.js",[],function(){return{dataLabels:{crop:!1,defer:!1,enabled:!0,formatter:function(){return this.point.name},overflow:!1,style:{color:"#000000"}},legendSymbol:"lineMarker"}}),s(t,"Series/MapPoint/MapPointSeries.js",[t["Core/Globals.js"],t["Series/MapPoint/MapPointPoint.js"],t["Series/MapPoint/MapPointSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{noop:h}=e,{map:c,scatter:g}=n.seriesTypes,{extend:u,fireEvent:p,isNumber:b,merge:v}=a;class x extends g{constructor(){super(...arguments),this.clearBounds=c.prototype.clearBounds}drawDataLabels(){super.drawDataLabels(),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)}projectPoint(E){let L=this.chart.mapView;if(L){let{geometry:S,lon:w,lat:R}=E,O=S&&S.type==="Point"&&S.coordinates;if(b(w)&&b(R)&&(O=[w,R]),O)return L.lonLatToProjectedUnits({lon:O[0],lat:O[1]})}}translate(){let E=this.chart.mapView;if(this.processedXData||this.processData(),this.generatePoints(),this.getProjectedBounds&&this.isDirtyData&&(delete this.bounds,this.getProjectedBounds()),E){let L=E.getSVGTransform(),{hasCoordinates:S}=E.projection;this.points.forEach(w=>{let R,{x:O,y:I}=w,_=b(w.insetIndex)&&E.insets[w.insetIndex].getSVGTransform()||L,P=this.projectPoint(w.options)||w.properties&&this.projectPoint(w.properties);if(P?(O=P.x,I=P.y):w.bounds&&(O=w.bounds.midX,I=w.bounds.midY,_&&b(O)&&b(I)&&(w.plotX=O*_.scaleX+_.translateX,w.plotY=I*_.scaleY+_.translateY,R=!0)),b(O)&&b(I)){if(!R){let F=E.projectedUnitsToPixels({x:O,y:I});w.plotX=F.x,w.plotY=S?F.y:this.chart.plotHeight-F.y}}else w.y=w.plotX=w.plotY=void 0;w.isInside=this.isPointInside(w),w.zone=this.zones.length?w.getZone():void 0})}p(this,"afterTranslate")}}return x.defaultOptions=v(g.defaultOptions,r),l.prototype.symbols.mapmarker=(m,E,L,S,w)=>{let R,O,I=w&&w.context==="legend";I?(R=m+L/2,O=E+S):w&&typeof w.anchorX=="number"&&typeof w.anchorY=="number"?(R=w.anchorX,O=w.anchorY):(R=m+L/2,O=E+S/2,E-=S);let _=I?S/3:S/2;return[["M",R,O],["C",R,O,R-_,E+1.5*_,R-_,E+_],["A",_,_,1,1,1,R+_,E+_],["C",R+_,E+1.5*_,R,O,R,O],["Z"]]},u(x.prototype,{type:"mappoint",axisTypes:["colorAxis"],forceDL:!0,isCartesian:!1,pointClass:i,searchPoint:h,useMapGeometry:!0}),n.registerSeriesType("mappoint",x),x}),s(t,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}),s(t,"Series/Bubble/BubbleLegendItem.js",[t["Core/Color/Color.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{parse:l}=e,{noop:a}=r,{arrayMax:h,arrayMin:c,isNumber:g,merge:u,pick:p,stableSort:b}=n;return class{constructor(v,x){this.setState=a,this.init(v,x)}init(v,x){this.options=v,this.visible=!0,this.chart=x.chart,this.legend=x}addToLegend(v){v.splice(this.options.legendIndex,0,this)}drawLegendSymbol(v){let x,m=p(v.options.itemDistance,20),E=this.legendItem||{},L=this.options,S=L.ranges,w=L.connectorDistance;if(!S||!S.length||!g(S[0].value)){v.options.bubbleLegend.autoRanges=!0;return}b(S,function(_,P){return P.value-_.value}),this.ranges=S,this.setOptions(),this.render();let R=this.getMaxLabelSize(),O=this.ranges[0].radius,I=2*O;x=(x=w-O+R.width)>0?x:0,this.maxLabel=R,this.movementX=L.labels.align==="left"?x:0,E.labelWidth=I+x+m,E.labelHeight=I+R.height/2}setOptions(){let v=this.ranges,x=this.options,m=this.chart.series[x.seriesIndex],E=this.legend.baseline,L={zIndex:x.zIndex,"stroke-width":x.borderWidth},S={zIndex:x.zIndex,"stroke-width":x.connectorWidth},w={align:this.legend.options.rtl||x.labels.align==="left"?"right":"left",zIndex:x.zIndex},R=m.options.marker.fillOpacity,O=this.chart.styledMode;v.forEach(function(I,_){O||(L.stroke=p(I.borderColor,x.borderColor,m.color),L.fill=p(I.color,x.color,R!==1?l(m.color).setOpacity(R).get("rgba"):m.color),S.stroke=p(I.connectorColor,x.connectorColor,m.color)),v[_].radius=this.getRangeRadius(I.value),v[_]=u(v[_],{center:v[0].radius-v[_].radius+E}),O||u(!0,v[_],{bubbleAttribs:u(L),connectorAttribs:u(S),labelAttribs:w})},this)}getRangeRadius(v){let x=this.options,m=this.options.seriesIndex,E=this.chart.series[m],L=x.ranges[0].value,S=x.ranges[x.ranges.length-1].value,w=x.minSize,R=x.maxSize;return E.getRadius.call(this,S,L,w,R,v)}render(){let v=this.legendItem||{},x=this.chart.renderer,m=this.options.zThreshold;for(let E of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),v.symbol=x.g("bubble-legend"),v.label=x.g("bubble-legend-item").css(this.legend.itemStyle||{}),v.symbol.translateX=0,v.symbol.translateY=0,v.symbol.add(v.label),v.label.add(v.group),this.ranges))E.value>=m&&this.renderRange(E);this.hideOverlappingLabels()}renderRange(v){let x=this.ranges[0],m=this.legend,E=this.options,L=E.labels,S=this.chart,w=S.series[E.seriesIndex],R=S.renderer,O=this.symbols,I=O.labels,_=v.center,P=Math.abs(v.radius),F=E.connectorDistance||0,A=L.align,D=m.options.rtl,C=E.borderWidth,d=E.connectorWidth,f=x.radius||0,y=_-P-C/2+d/2,M=(y%1?1:.5)-(d%2?0:.5),k=R.styledMode,T=D||A==="left"?-F:F;A==="center"&&(T=0,E.connectorDistance=0,v.labelAttribs.align="center"),O.bubbleItems.push(R.circle(f,_+M,P).attr(k?{}:v.bubbleAttribs).addClass((k?"highcharts-color-"+w.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(E.className||"")).add(this.legendItem.symbol)),O.connectors.push(R.path(R.crispLine([["M",f,y],["L",f+T,y]],E.connectorWidth)).attr(k?{}:v.connectorAttribs).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(E.connectorClassName||"")).add(this.legendItem.symbol));let z=R.text(this.formatLabel(v)).attr(k?{}:v.labelAttribs).css(k?{}:L.style).addClass("highcharts-bubble-legend-labels "+(E.labels.className||"")).add(this.legendItem.symbol),N={x:f+T+E.labels.x,y:y+E.labels.y+.4*z.getBBox().height};z.attr(N),I.push(z),z.placed=!0,z.alignAttr=N}getMaxLabelSize(){let v,x;return this.symbols.labels.forEach(function(m){x=m.getBBox(!0),v=v?x.width>v.width?x:v:x}),v||{}}formatLabel(v){let x=this.options,m=x.labels.formatter,E=x.labels.format,{numberFormatter:L}=this.chart;return E?i.format(E,v):m?m.call(v):L(v.value,1)}hideOverlappingLabels(){let v=this.chart,x=this.options.labels.allowOverlap,m=this.symbols;!x&&m&&(v.hideOverlappingLabels(m.labels),m.labels.forEach(function(E,L){E.newOpacity?E.newOpacity!==E.oldOpacity&&m.connectors[L].show():m.connectors[L].hide()}))}getRanges(){let v=this.legend.bubbleLegend,x=v.chart.series,m=v.options.ranges,E,L,S=Number.MAX_VALUE,w=-Number.MAX_VALUE;return x.forEach(function(R){R.isBubble&&!R.ignoreSeries&&(L=R.zData.filter(g)).length&&(S=p(R.options.zMin,Math.min(S,Math.max(c(L),R.options.displayNegative===!1?R.options.zThreshold:-Number.MAX_VALUE))),w=p(R.options.zMax,Math.max(w,h(L))))}),E=S===w?[{value:w}]:[{value:S},{value:(S+w)/2},{value:w,autoRanges:!0}],m.length&&m[0].radius&&E.reverse(),E.forEach(function(R,O){m&&m[O]&&(E[O]=u(m[O],R))}),E}predictBubbleSizes(){let v=this.chart,x=v.legend.options,m=x.floating,E=x.layout==="horizontal",L=E?v.legend.lastLineHeight:0,S=v.plotSizeX,w=v.plotSizeY,R=v.series[this.options.seriesIndex],O=R.getPxExtremes(),I=Math.ceil(O.minPxSize),_=Math.ceil(O.maxPxSize),P,F=R.options.maxSize;return m||!/%$/.test(F)?P=_:(P=(Math.min(w,S)+L)*(F=parseFloat(F))/100/(F/100+1),(E&&w-P>=S||!E&&S-P>=w)&&(P=_)),[I,Math.ceil(P)]}updateRanges(v,x){let m=this.legend.options.bubbleLegend;m.minSize=v,m.maxSize=x,m.ranges=this.getRanges()}correctSizes(){let v=this.legend,x=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(x.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,x.maxPxSize),v.render())}}}),s(t,"Series/Bubble/BubbleLegendComposition.js",[t["Series/Bubble/BubbleLegendDefaults.js"],t["Series/Bubble/BubbleLegendItem.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{setOptions:a}=r,{composed:h}=n,{addEvent:c,objectEach:g,pushUnique:u,wrap:p}=l;function b(S,w,R){let O,I,_,P=this.legend,F=v(this)>=0;P&&P.options.enabled&&P.bubbleLegend&&P.options.bubbleLegend.autoRanges&&F?(O=P.bubbleLegend.options,I=P.bubbleLegend.predictBubbleSizes(),P.bubbleLegend.updateRanges(I[0],I[1]),O.placed||(P.group.placed=!1,P.allItems.forEach(A=>{(_=A.legendItem||{}).group&&(_.group.translateY=void 0)})),P.render(),O.placed||(this.getMargins(),this.axes.forEach(function(A){A.visible&&A.render(),O.placed||(A.setScale(),A.updateNames(),g(A.ticks,function(D){D.isNew=!0,D.isNewLabel=!0}))}),this.getMargins()),O.placed=!0,S.call(this,w,R),P.bubbleLegend.correctSizes(),L(P,x(P))):(S.call(this,w,R),P&&P.options.enabled&&P.bubbleLegend&&(P.render(),L(P,x(P))))}function v(S){let w=S.series,R=0;for(;RI.height&&(I.height=w[A].itemHeight);I.step=F}return R}function m(S){let w=this.bubbleLegend,R=this.options,O=R.bubbleLegend,I=v(this.chart);w&&w.ranges&&w.ranges.length&&(O.ranges.length&&(O.autoRanges=!!O.ranges[0].autoRanges),this.destroyItem(w)),I>=0&&R.enabled&&O.enabled&&(O.seriesIndex=I,this.bubbleLegend=new i(O,this),this.bubbleLegend.addToLegend(S.allItems))}function E(S){let w;if(S.defaultPrevented)return!1;let R=this.chart,O=this.visible,I=this.chart.legend;I&&I.bubbleLegend&&(this.visible=!O,this.ignoreSeries=O,w=v(R)>=0,I.bubbleLegend.visible!==w&&(I.update({bubbleLegend:{enabled:w}}),I.bubbleLegend.visible=w),this.visible=O)}function L(S,w){let R=S.allItems,O=S.options.rtl,I,_,P,F,A=0;R.forEach((D,C)=>{(F=D.legendItem||{}).group&&(I=F.group.translateX||0,_=F.y||0,((P=D.movementX)||O&&D.ranges)&&(P=O?I-D.options.maxSize/2:I+P,F.group.attr({translateX:P})),C>w[A].step&&A++,F.group.attr({translateY:Math.round(_+w[A].height/2)}),F.y=_+w[A].height/2)})}return{compose:function(S,w,R){u(h,"Series.BubbleLegend")&&(a({legend:{bubbleLegend:e}}),p(S.prototype,"drawChartBox",b),c(w,"afterGetAllItems",m),c(R,"legendItemClick",E))}}}),s(t,"Series/Bubble/BubblePoint.js",[t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{scatter:{prototype:{pointClass:n}}}}=i,{extend:l}=r;class a extends n{haloPath(c){return e.prototype.haloPath.call(this,c===0?0:(this.marker&&this.marker.radius||0)+c)}}return l(a.prototype,{ttBelow:!1}),a}),s(t,"Series/Bubble/BubbleSeries.js",[t["Series/Bubble/BubbleLegendComposition.js"],t["Series/Bubble/BubblePoint.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{parse:h}=r,{composed:c,noop:g}=n,{series:u,seriesTypes:{column:{prototype:p},scatter:b}}=l,{addEvent:v,arrayMax:x,arrayMin:m,clamp:E,extend:L,isNumber:S,merge:w,pick:R,pushUnique:O}=a;function I(){let P=this.len,{coll:F,isXAxis:A,min:D}=this,C=A?"xData":"yData",d=(this.max||0)-(D||0),f=0,y=P,M=P/d,k;(F==="xAxis"||F==="yAxis")&&(this.series.forEach(T=>{if(T.bubblePadding&&T.reserveSpace()){this.allowZoomOutside=!0,k=!0;let z=T[C];if(A&&((T.onPoint||T).getRadii(0,0,T),T.onPoint&&(T.radii=T.onPoint.radii)),d>0){let N=z.length;for(;N--;)if(S(z[N])&&this.dataMin<=z[N]&&z[N]<=this.max){let G=T.radii&&T.radii[N]||0;f=Math.min((z[N]-D)*M-G,f),y=Math.max((z[N]-D)*M+G,y)}}}}),k&&d>0&&!this.logarithmic&&(y-=P,M*=(P+Math.max(0,f)-Math.min(y,P))/P,[["min","userMin",f],["max","userMax",y]].forEach(T=>{R(this.options[T[0]],this[T[1]])===void 0&&(this[T[0]]+=T[2]/M)})))}class _ extends b{static compose(F,A,D,C){e.compose(A,D,C),O(c,"Series.Bubble")&&v(F,"foundExtremes",I)}animate(F){!F&&this.points.length{if(G.bubblePadding&&G.reserveSpace()){let X=(G.onPoint||G).getZExtremes();X&&(z=Math.min(R(z,X.zMin),X.zMin),N=Math.max(R(N,X.zMax),X.zMax),T=!0)}}),T?(y={zMin:z,zMax:N},this.chart.bubbleZExtremes=y):y={zMin:0,zMax:0}}for(d=0,C=F.length;d0&&(z=(d-F)/T)}return M&&z>=0&&(z=Math.sqrt(z)),Math.ceil(D+z*(C-D))/2}hasData(){return!!this.processedXData.length}markerAttribs(F,A){let D=super.markerAttribs(F,A),{height:C=0,width:d=0}=D;return this.chart.inverted?L(D,{x:(F.plotX||0)-d/2,y:(F.plotY||0)-C/2}):D}pointAttribs(F,A){let D=this.options.marker.fillOpacity,C=u.prototype.pointAttribs.call(this,F,A);return D!==1&&(C.fill=h(C.fill).setOpacity(D).get("rgba")),C}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:F,options:A,radii:D}=this,{minPxSize:C}=this.getPxExtremes(),d=F.length;for(;d--;){let f=F[d],y=D?D[d]:0;this.zoneAxis==="z"&&(f.negative=(f.z||0)<(A.zThreshold||0)),S(y)&&y>=C/2?(f.marker=L(f.marker,{radius:y,width:2*y,height:2*y}),f.dlBox={x:f.plotX-y,y:f.plotY-y,width:2*y,height:2*y}):(f.shapeArgs=f.plotY=f.dlBox=void 0,f.isInside=!1)}}getPxExtremes(){let F=Math.min(this.chart.plotWidth,this.chart.plotHeight),A=d=>{let f;return typeof d=="string"&&(f=/%$/.test(d),d=parseInt(d,10)),f?F*d/100:d},D=A(R(this.options.minSize,8)),C=Math.max(A(R(this.options.maxSize,"20%")),D);return{minPxSize:D,maxPxSize:C}}getZExtremes(){let F=this.options,A=(this.zData||[]).filter(S);if(A.length){let D=R(F.zMin,E(m(A),F.displayNegative===!1?F.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),C=R(F.zMax,x(A));if(S(D)&&S(C))return{zMin:D,zMax:C}}}}return _.defaultOptions=w(b.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:P}=this.series.chart,{z:F}=this.point;return S(F)?P(F,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),L(_.prototype,{alignDataLabel:p.alignDataLabel,applyZones:g,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:i,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),v(_,"updatedData",P=>{delete P.target.chart.bubbleZExtremes}),v(_,"remove",P=>{delete P.target.chart.bubbleZExtremes}),l.registerSeriesType("bubble",_),_}),s(t,"Series/MapBubble/MapBubblePoint.js",[t["Series/Bubble/BubblePoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{map:{prototype:{pointClass:{prototype:n}}}}}=i,{extend:l}=r;class a extends e{isValid(){return typeof this.z=="number"}}return l(a.prototype,{applyOptions:n.applyOptions,getProjectedBounds:n.getProjectedBounds}),a}),s(t,"Series/MapBubble/MapBubbleSeries.js",[t["Series/Bubble/BubbleSeries.js"],t["Series/MapBubble/MapBubblePoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{seriesTypes:{map:{prototype:l},mappoint:{prototype:a}}}=r,{extend:h,merge:c}=n;class g extends e{constructor(){super(...arguments),this.clearBounds=l.clearBounds}searchPoint(p,b){return this.searchKDTree({plotX:p.chartX-this.chart.plotLeft,plotY:p.chartY-this.chart.plotTop},b,p)}translate(){a.translate.call(this),this.getRadii(),this.translateBubble()}updateParallelArrays(p,b,v){super.updateParallelArrays.call(this,p,b,v);let x=this.processedXData,m=this.xData;x&&m&&(x.length=m.length)}}return g.defaultOptions=c(e.defaultOptions,{lineWidth:0,animationLimit:500,joinBy:"hc-key",tooltip:{pointFormat:"{point.name}: {point.z}"}}),h(g.prototype,{type:"mapbubble",axisTypes:["colorAxis"],getProjectedBounds:l.getProjectedBounds,isCartesian:!1,pointArrayMap:["z"],pointClass:i,processData:l.processData,projectPoint:a.projectPoint,kdAxisArray:["plotX","plotY"],setData:l.setData,setOptions:l.setOptions,updateData:l.updateData,useMapGeometry:!0,xyFromShape:!0}),r.registerSeriesType("mapbubble",g),g}),s(t,"Series/Heatmap/HeatmapPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{clamp:n,defined:l,extend:a,pick:h}=i;class c extends r{applyOptions(u,p){return(this.isNull||this.value===null)&&delete this.color,super.applyOptions(u,p),this.formatPrefix=this.isNull||this.value===null?"null":"point",this}getCellAttributes(){let u=this.series,p=u.options,b=(p.colsize||1)/2,v=(p.rowsize||1)/2,x=u.xAxis,m=u.yAxis,E=this.options.marker||u.options.marker,L=u.pointPlacementToXValue(),S=h(this.pointPadding,p.pointPadding,0),w={x1:n(Math.round(x.len-x.translate(this.x-b,!1,!0,!1,!0,-L)),-x.len,2*x.len),x2:n(Math.round(x.len-x.translate(this.x+b,!1,!0,!1,!0,-L)),-x.len,2*x.len),y1:n(Math.round(m.translate(this.y-v,!1,!0,!1,!0)),-m.len,2*m.len),y2:n(Math.round(m.translate(this.y+v,!1,!0,!1,!0)),-m.len,2*m.len)};for(let R of[["width","x"],["height","y"]]){let O=R[0],I=R[1],_=I+"1",P=I+"2",F=Math.abs(w[_]-w[P]),A=E&&E.lineWidth||0,D=Math.abs(w[_]+w[P])/2,C=E&&E[O];if(l(C)&&C"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}}),s(t,"Series/InterpolationUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{doc:r}=e,{defined:n,pick:l}=i;return{colorFromPoint:function(a,h){let c=h.series.colorAxis;if(c){let g=c.toColor(a||0,h).split(")")[0].split("(")[1].split(",").map(u=>l(parseFloat(u),parseInt(u,10)));return g[3]=255*l(g[3],1),n(a)&&h.visible||(g[3]=0),g}return[0,0,0,0]},getContext:function(a){let{canvas:h,context:c}=a;return h&&c?(c.clearRect(0,0,h.width,h.height),c):(a.canvas=r.createElement("canvas"),a.context=a.canvas.getContext("2d",{willReadFrequently:!0})||void 0,a.context)}}}),s(t,"Series/Heatmap/HeatmapSeries.js",[t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Series/Heatmap/HeatmapPoint.js"],t["Series/Heatmap/HeatmapSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"],t["Series/InterpolationUtilities.js"]],function(e,i,r,n,l,a,h,c){let{series:g,seriesTypes:{column:u,scatter:p}}=l,{prototype:{symbols:b}}=a,{addEvent:v,extend:x,fireEvent:m,isNumber:E,merge:L,pick:S}=h,{colorFromPoint:w,getContext:R}=c;class O extends p{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let _=this,P=_.options,F=P.interpolation,A=P.marker||{};if(F){let{image:D,chart:C,xAxis:d,yAxis:f}=_,{reversed:y=!1,len:M}=d,{reversed:k=!1,len:T}=f,z={width:M,height:T};if(!D||_.isDirtyData||_.isDirtyCanvas){let N=R(_),{canvas:G,options:{colsize:X=1,rowsize:j=1},points:B,points:{length:W}}=_,Y=C.colorAxis&&C.colorAxis[0];if(G&&N&&Y){let{min:U,max:q}=d.getExtremes(),{min:H,max:V}=f.getExtremes(),Z=q-U,K=V-H,J=Math.round(Z/X/8*8),tt=Math.round(K/j/8*8),[$,Q]=[[J,J/Z,y,"ceil"],[tt,tt/K,!k,"floor"]].map(([ot,at,ct,ht])=>ct?lt=>Math[ht](ot-at*lt):lt=>Math[ht](at*lt)),et=G.width=J+1,it=et*(G.height=tt+1),st=(W-1)/it,rt=new Uint8ClampedArray(4*it),nt=(ot,at)=>4*Math.ceil(et*Q(at-H)+$(ot-U));_.buildKDTree();for(let ot=0;ot{D.graphic&&(D.graphic[_.chart.styledMode?"css":"animate"](_.colorAttribs(D)),D.value===null&&D.graphic.addClass("highcharts-null-point"))}))}getExtremes(){let{dataMin:_,dataMax:P}=g.prototype.getExtremes.call(this,this.valueData);return E(_)&&(this.valueMin=_),E(P)&&(this.valueMax=P),g.prototype.getExtremes.call(this)}getValidPoints(_,P){return g.prototype.getValidPoints.call(this,_,P,!0)}hasData(){return!!this.processedXData.length}init(){super.init.apply(this,arguments);let _=this.options;_.pointRange=S(_.pointRange,_.colsize||1),this.yAxis.axisPointRange=_.rowsize||1,b.ellipse=b.circle,_.marker&&E(_.borderRadius)&&(_.marker.r=_.borderRadius)}markerAttribs(_,P){let F=_.shapeArgs||{};if(_.hasImage)return{x:_.plotX,y:_.plotY};if(P&&P!=="normal"){let A=_.options.marker||{},D=this.options.marker||{},C=D.states&&D.states[P]||{},d=A.states&&A.states[P]||{},f=(d.width||C.width||F.width||0)+(d.widthPlus||C.widthPlus||0),y=(d.height||C.height||F.height||0)+(d.heightPlus||C.heightPlus||0);return{x:(F.x||0)+((F.width||0)-f)/2,y:(F.y||0)+((F.height||0)-y)/2,width:f,height:y}}return F}pointAttribs(_,P){let F=g.prototype.pointAttribs.call(this,_,P),A=this.options||{},D=this.chart.options.plotOptions||{},C=D.series||{},d=D.heatmap||{},f=_&&_.options.borderColor||A.borderColor||d.borderColor||C.borderColor,y=_&&_.options.borderWidth||A.borderWidth||d.borderWidth||C.borderWidth||F["stroke-width"];if(F.stroke=_&&_.marker&&_.marker.lineColor||A.marker&&A.marker.lineColor||f||this.color,F["stroke-width"]=y,P&&P!=="normal"){let M=L(A.states&&A.states[P],A.marker&&A.marker.states&&A.marker.states[P],_&&_.options.states&&_.options.states[P]||{});F.fill=M.color||e.parse(F.fill).brighten(M.brightness||0).get(),F.stroke=M.lineColor||F.stroke}return F}translate(){let{borderRadius:_,marker:P}=this.options,F=P&&P.symbol||"rect",A=b[F]?F:"rect",D=["circle","square"].indexOf(A)!==-1;for(let C of(this.generatePoints(),this.points)){let d=C.getCellAttributes(),f=Math.min(d.x1,d.x2),y=Math.min(d.y1,d.y2),M=Math.max(Math.abs(d.x2-d.x1),0),k=Math.max(Math.abs(d.y2-d.y1),0);if(C.hasImage=(C.marker&&C.marker.symbol||F||"").indexOf("url")===0,D){let T=Math.abs(M-k);f=Math.min(d.x1,d.x2)+(M{"use strict";(function(o){typeof Bn=="object"&&Bn.exports?(o.default=o,Bn.exports=o):typeof define=="function"&&define.amd?define("highcharts/highcharts-more",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Extensions/Pane/PaneComposition.js",[t["Core/Utilities.js"]],function(e){let{addEvent:i,correctFloat:r,defined:n,pick:l}=e;function a(p){let b,v=this;return p&&v.pane.forEach(x=>{h(p.chartX-v.plotLeft,p.chartY-v.plotTop,x.center)&&(b=x)}),b}function h(p,b,v,x,m){let E=!0,L=v[0],S=v[1];if(n(x)&&n(m)){let w=Math.atan2(r(b-S,8),r(p-L,8));m!==x&&(E=x>m?w>=x&&w<=Math.PI||w<=m&&w>=-Math.PI:w>=x&&w<=r(m,8))}return Math.sqrt(Math.pow(p-L,2)+Math.pow(b-S,2))<=Math.ceil(v[2]/2)&&E}function c(p){this.polar&&(p.options.inverted&&([p.x,p.y]=[p.y,p.x]),p.isInsidePlot=this.pane.some(b=>h(p.x,p.y,b.center,b.axis&&b.axis.normalizedStartAngleRad,b.axis&&b.axis.normalizedEndAngleRad)))}function g(p){let b=this.chart;p.hoverPoint&&p.hoverPoint.plotX&&p.hoverPoint.plotY&&b.hoverPane&&!h(p.hoverPoint.plotX,p.hoverPoint.plotY,b.hoverPane.center)&&(p.hoverPoint=void 0)}function u(p){let b=this.chart;b.polar?(b.hoverPane=b.getHoverPane(p),p.filter=function(v){return v.visible&&!(!p.shared&&v.directTouch)&&l(v.options.enableMouseTracking,!0)&&(!b.hoverPane||v.xAxis.pane===b.hoverPane)}):b.hoverPane=void 0}return{compose:function(p,b){let v=p.prototype;v.getHoverPane||(v.collectionsWithUpdate.push("pane"),v.getHoverPane=a,i(p,"afterIsInsidePlot",c),i(b,"afterGetHoverData",g),i(b,"beforeGetHoverData",u))}}}),s(t,"Extensions/Pane/PaneDefaults.js",[],function(){return{pane:{center:["50%","50%"],size:"85%",innerSize:"0%",startAngle:0},background:{shape:"circle",borderRadius:0,borderWidth:1,borderColor:"#cccccc",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#ffffff"],[1,"#e6e6e6"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}}}),s(t,"Extensions/Pane/Pane.js",[t["Series/CenteredUtilities.js"],t["Extensions/Pane/PaneComposition.js"],t["Extensions/Pane/PaneDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{extend:l,merge:a,splat:h}=n;class c{constructor(u,p){this.coll="pane",this.init(u,p)}init(u,p){this.chart=p,this.background=[],p.pane.push(this),this.setOptions(u)}setOptions(u){this.options=u=a(r.pane,this.chart.angular?{background:{}}:void 0,u)}render(){let u=this.options,p=this.chart.renderer;this.group||(this.group=p.g("pane-group").attr({zIndex:u.zIndex||0}).add()),this.updateCenter();let b=this.options.background;if(b){let v=Math.max((b=h(b)).length,this.background.length||0);for(let x=0;xd,w.y=w.high,w._plotY=w.plotY,w.plotY=C,F[S]=w.dataLabel,w.dataLabel=w.dataLabelUpper,w.below=R,D?O.align||(O.align=R?"right":"left"):O.verticalAlign||(O.verticalAlign=R?"top":"bottom")}for(this.options.dataLabels=O,h.drawDataLabels&&h.drawDataLabels.apply(this,arguments),S=P;S--;)(w=_[S])&&(w.dataLabelUpper=w.dataLabel,w.dataLabel=F[S],delete w.dataLabels,w.y=w.low,w.plotY=w._plotY)}if(I.enabled||this.hasDataLabels?.()){for(S=P;S--;)if(w=_[S]){let{plotHigh:C=0,plotLow:d=0}=w;R=I.inside?Cd,w.below=!R,D?I.align||(I.align=R?"left":"right"):I.verticalAlign||(I.verticalAlign=R?"bottom":"top")}this.options.dataLabels=I,h.drawDataLabels&&h.drawDataLabels.apply(this,arguments)}if(O.enabled)for(S=P;S--;)(w=_[S])&&(w.dataLabels=[w.dataLabelUpper,w.dataLabel].filter(function(C){return!!C}));this.options.dataLabels=A}}alignDataLabel(){c.alignDataLabel.apply(this,arguments)}modifyMarkerSettings(){let S={marker:this.options.marker,symbol:this.symbol};if(this.options.lowMarker){let{options:{marker:w,lowMarker:R}}=this;this.options.marker=m(w,R),R.symbol&&(this.symbol=R.symbol)}return S}restoreMarkerSettings(S){this.options.marker=S.marker,this.symbol=S.symbol}drawPoints(){let S,w,R=this.points.length,O=this.modifyMarkerSettings();for(h.drawPoints.apply(this,arguments),this.restoreMarkerSettings(O),S=0;S=0&&w.plotY<=this.yAxis.len&&w.plotX>=0&&w.plotX<=this.xAxis.len),S++;for(h.drawPoints.apply(this,arguments),S=0;S\u25CF {series.name}: {point.low} - {point.high}
'},trackByArea:!0,dataLabels:{align:void 0,verticalAlign:void 0,xLow:0,xHigh:0,yLow:0,yHigh:0}}),g(E,"afterTranslate",function(){this.pointArrayMap.join(",")==="low,high"&&this.points.forEach(L=>{let S=L.high,w=L.plotY;L.isNull?L.plotY=void 0:(L.plotLow=w,L.plotHigh=v(S)?this.yAxis.translate(this.dataModify?this.dataModify.modifyValue(S):S,!1,!0,void 0,!0):void 0,this.dataModify&&(L.yBottom=L.plotHigh))})},{order:0}),g(E,"afterTranslate",function(){this.points.forEach(L=>{if(this.chart.polar)this.highToXY(L),L.plotLow=L.plotY,L.tooltipPos=[((L.plotHighX||0)+(L.plotLowX||0))/2,((L.plotHigh||0)+(L.plotLow||0))/2];else{let S=L.pos(!1,L.plotLow),w=L.pos(!1,L.plotHigh);S&&w&&(S[0]=(S[0]+w[0])/2,S[1]=(S[1]+w[1])/2),L.tooltipPos=S}})},{order:3}),p(E.prototype,{deferTranslatePolar:!0,pointArrayMap:["low","high"],pointClass:e,pointValKey:"low",setStackedPoints:l}),r.registerSeriesType("arearange",E),E}),s(t,"Series/AreaSplineRange/AreaSplineRangeSeries.js",[t["Series/AreaRange/AreaRangeSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{spline:{prototype:n}}=i.seriesTypes,{merge:l,extend:a}=r;class h extends e{}return h.defaultOptions=l(e.defaultOptions),a(h.prototype,{getPointSpline:n.getPointSpline}),i.registerSeriesType("areasplinerange",h),h}),s(t,"Series/BoxPlot/BoxPlotSeriesDefaults.js",[],function(){return{threshold:null,tooltip:{pointFormat:'\u25CF {series.name}
Maximum: {point.high}
Upper quartile: {point.q3}
Median: {point.median}
Lower quartile: {point.q1}
Minimum: {point.low}
'},whiskerLength:"50%",fillColor:"#ffffff",lineWidth:1,medianWidth:2,whiskerWidth:2}}),s(t,"Series/BoxPlot/BoxPlotSeries.js",[t["Series/BoxPlot/BoxPlotSeriesDefaults.js"],t["Series/Column/ColumnSeries.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{noop:a}=r,{crisp:h,extend:c,merge:g,pick:u}=l;class p extends i{pointAttribs(){return{}}translate(){let v=this.yAxis,x=this.pointArrayMap;super.translate.apply(this),this.points.forEach(function(m){x.forEach(function(E){m[E]!==null&&(m[E+"Plot"]=v.translate(m[E],0,1,0,1))}),m.plotHigh=m.highPlot})}drawPoints(){let v,x,m,E,L,S,w,R,O,I,_,P,F,A=this.points,D=this.options,C=this.chart,d=C.renderer,f=this.doQuartiles!==!1,y=this.options.whiskerLength;for(let M of A){let k=(R=M.graphic)?"animate":"attr",T=M.shapeArgs,z={},N={},G={},X={},j=M.color||this.color;if(M.plotY!==void 0){let B;O=T.width,_=(I=T.x)+O,P=O/2,v=f?M.q1Plot:M.lowPlot,x=f?M.q3Plot:M.lowPlot,m=M.highPlot,E=M.lowPlot,R||(M.graphic=R=d.g("point").add(this.group),M.stem=d.path().addClass("highcharts-boxplot-stem").add(R),y&&(M.whiskers=d.path().addClass("highcharts-boxplot-whisker").add(R)),f&&(M.box=d.path(w).addClass("highcharts-boxplot-box").add(R)),M.medianShape=d.path(S).addClass("highcharts-boxplot-median").add(R)),C.styledMode||(N.stroke=M.stemColor||D.stemColor||j,N["stroke-width"]=u(M.stemWidth,D.stemWidth,D.lineWidth),N.dashstyle=M.stemDashStyle||D.stemDashStyle||D.dashStyle,M.stem.attr(N),y&&(G.stroke=M.whiskerColor||D.whiskerColor||j,G["stroke-width"]=u(M.whiskerWidth,D.whiskerWidth,D.lineWidth),G.dashstyle=M.whiskerDashStyle||D.whiskerDashStyle||D.dashStyle,M.whiskers.attr(G)),f&&(z.fill=M.fillColor||D.fillColor||j,z.stroke=D.lineColor||j,z["stroke-width"]=D.lineWidth||0,z.dashstyle=M.boxDashStyle||D.boxDashStyle||D.dashStyle,M.box.attr(z)),X.stroke=M.medianColor||D.medianColor||j,X["stroke-width"]=u(M.medianWidth,D.medianWidth,D.lineWidth),X.dashstyle=M.medianDashStyle||D.medianDashStyle||D.dashStyle,M.medianShape.attr(X));let W=h(M.plotX||0,M.stem.strokeWidth());if(B=[["M",W,x],["L",W,m],["M",W,v],["L",W,E]],M.stem[k]({d:B}),f){let Y=M.box.strokeWidth();v=h(v,Y),x=h(x,Y),B=[["M",I=h(I,Y),x],["L",I,v],["L",_=h(_,Y),v],["L",_,x],["L",I,x],["Z"]],M.box[k]({d:B})}if(y){let Y=M.whiskers.strokeWidth();m=h(M.highPlot,Y),E=h(M.lowPlot,Y),B=[["M",h(W-(F=typeof y=="string"&&/%$/.test(y)?P*parseFloat(y)/100:Number(y)/2)),m],["L",h(W+F),m],["M",h(W-F),E],["L",h(W+F),E]],M.whiskers[k]({d:B})}B=[["M",I,L=h(M.medianPlot,M.medianShape.strokeWidth())],["L",_,L]],M.medianShape[k]({d:B})}}}toYData(v){return[v.low,v.q1,v.median,v.q3,v.high]}}return p.defaultOptions=g(i.defaultOptions,e),c(p.prototype,{pointArrayMap:["low","q1","median","q3","high"],pointValKey:"high",drawDataLabels:a,setStackedPoints:a}),n.registerSeriesType("boxplot",p),p}),s(t,"Series/Bubble/BubbleLegendDefaults.js",[],function(){return{borderColor:void 0,borderWidth:2,className:void 0,color:void 0,connectorClassName:void 0,connectorColor:void 0,connectorDistance:60,connectorWidth:1,enabled:!1,labels:{className:void 0,allowOverlap:!1,format:"",formatter:void 0,align:"right",style:{fontSize:"0.9em",color:"#000000"},x:0,y:0},maxSize:60,minSize:10,legendIndex:0,ranges:{value:void 0,borderColor:void 0,color:void 0,connectorColor:void 0},sizeBy:"area",sizeByAbsoluteValue:!1,zIndex:1,zThreshold:0}}),s(t,"Series/Bubble/BubbleLegendItem.js",[t["Core/Color/Color.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{parse:l}=e,{noop:a}=r,{arrayMax:h,arrayMin:c,isNumber:g,merge:u,pick:p,stableSort:b}=n;return class{constructor(v,x){this.setState=a,this.init(v,x)}init(v,x){this.options=v,this.visible=!0,this.chart=x.chart,this.legend=x}addToLegend(v){v.splice(this.options.legendIndex,0,this)}drawLegendSymbol(v){let x,m=p(v.options.itemDistance,20),E=this.legendItem||{},L=this.options,S=L.ranges,w=L.connectorDistance;if(!S||!S.length||!g(S[0].value)){v.options.bubbleLegend.autoRanges=!0;return}b(S,function(_,P){return P.value-_.value}),this.ranges=S,this.setOptions(),this.render();let R=this.getMaxLabelSize(),O=this.ranges[0].radius,I=2*O;x=(x=w-O+R.width)>0?x:0,this.maxLabel=R,this.movementX=L.labels.align==="left"?x:0,E.labelWidth=I+x+m,E.labelHeight=I+R.height/2}setOptions(){let v=this.ranges,x=this.options,m=this.chart.series[x.seriesIndex],E=this.legend.baseline,L={zIndex:x.zIndex,"stroke-width":x.borderWidth},S={zIndex:x.zIndex,"stroke-width":x.connectorWidth},w={align:this.legend.options.rtl||x.labels.align==="left"?"right":"left",zIndex:x.zIndex},R=m.options.marker.fillOpacity,O=this.chart.styledMode;v.forEach(function(I,_){O||(L.stroke=p(I.borderColor,x.borderColor,m.color),L.fill=p(I.color,x.color,R!==1?l(m.color).setOpacity(R).get("rgba"):m.color),S.stroke=p(I.connectorColor,x.connectorColor,m.color)),v[_].radius=this.getRangeRadius(I.value),v[_]=u(v[_],{center:v[0].radius-v[_].radius+E}),O||u(!0,v[_],{bubbleAttribs:u(L),connectorAttribs:u(S),labelAttribs:w})},this)}getRangeRadius(v){let x=this.options,m=this.options.seriesIndex,E=this.chart.series[m],L=x.ranges[0].value,S=x.ranges[x.ranges.length-1].value,w=x.minSize,R=x.maxSize;return E.getRadius.call(this,S,L,w,R,v)}render(){let v=this.legendItem||{},x=this.chart.renderer,m=this.options.zThreshold;for(let E of(this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),v.symbol=x.g("bubble-legend"),v.label=x.g("bubble-legend-item").css(this.legend.itemStyle||{}),v.symbol.translateX=0,v.symbol.translateY=0,v.symbol.add(v.label),v.label.add(v.group),this.ranges))E.value>=m&&this.renderRange(E);this.hideOverlappingLabels()}renderRange(v){let x=this.ranges[0],m=this.legend,E=this.options,L=E.labels,S=this.chart,w=S.series[E.seriesIndex],R=S.renderer,O=this.symbols,I=O.labels,_=v.center,P=Math.abs(v.radius),F=E.connectorDistance||0,A=L.align,D=m.options.rtl,C=E.borderWidth,d=E.connectorWidth,f=x.radius||0,y=_-P-C/2+d/2,M=(y%1?1:.5)-(d%2?0:.5),k=R.styledMode,T=D||A==="left"?-F:F;A==="center"&&(T=0,E.connectorDistance=0,v.labelAttribs.align="center"),O.bubbleItems.push(R.circle(f,_+M,P).attr(k?{}:v.bubbleAttribs).addClass((k?"highcharts-color-"+w.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(E.className||"")).add(this.legendItem.symbol)),O.connectors.push(R.path(R.crispLine([["M",f,y],["L",f+T,y]],E.connectorWidth)).attr(k?{}:v.connectorAttribs).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(E.connectorClassName||"")).add(this.legendItem.symbol));let z=R.text(this.formatLabel(v)).attr(k?{}:v.labelAttribs).css(k?{}:L.style).addClass("highcharts-bubble-legend-labels "+(E.labels.className||"")).add(this.legendItem.symbol),N={x:f+T+E.labels.x,y:y+E.labels.y+.4*z.getBBox().height};z.attr(N),I.push(z),z.placed=!0,z.alignAttr=N}getMaxLabelSize(){let v,x;return this.symbols.labels.forEach(function(m){x=m.getBBox(!0),v=v?x.width>v.width?x:v:x}),v||{}}formatLabel(v){let x=this.options,m=x.labels.formatter,E=x.labels.format,{numberFormatter:L}=this.chart;return E?i.format(E,v):m?m.call(v):L(v.value,1)}hideOverlappingLabels(){let v=this.chart,x=this.options.labels.allowOverlap,m=this.symbols;!x&&m&&(v.hideOverlappingLabels(m.labels),m.labels.forEach(function(E,L){E.newOpacity?E.newOpacity!==E.oldOpacity&&m.connectors[L].show():m.connectors[L].hide()}))}getRanges(){let v=this.legend.bubbleLegend,x=v.chart.series,m=v.options.ranges,E,L,S=Number.MAX_VALUE,w=-Number.MAX_VALUE;return x.forEach(function(R){R.isBubble&&!R.ignoreSeries&&(L=R.zData.filter(g)).length&&(S=p(R.options.zMin,Math.min(S,Math.max(c(L),R.options.displayNegative===!1?R.options.zThreshold:-Number.MAX_VALUE))),w=p(R.options.zMax,Math.max(w,h(L))))}),E=S===w?[{value:w}]:[{value:S},{value:(S+w)/2},{value:w,autoRanges:!0}],m.length&&m[0].radius&&E.reverse(),E.forEach(function(R,O){m&&m[O]&&(E[O]=u(m[O],R))}),E}predictBubbleSizes(){let v=this.chart,x=v.legend.options,m=x.floating,E=x.layout==="horizontal",L=E?v.legend.lastLineHeight:0,S=v.plotSizeX,w=v.plotSizeY,R=v.series[this.options.seriesIndex],O=R.getPxExtremes(),I=Math.ceil(O.minPxSize),_=Math.ceil(O.maxPxSize),P,F=R.options.maxSize;return m||!/%$/.test(F)?P=_:(P=(Math.min(w,S)+L)*(F=parseFloat(F))/100/(F/100+1),(E&&w-P>=S||!E&&S-P>=w)&&(P=_)),[I,Math.ceil(P)]}updateRanges(v,x){let m=this.legend.options.bubbleLegend;m.minSize=v,m.maxSize=x,m.ranges=this.getRanges()}correctSizes(){let v=this.legend,x=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(x.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,x.maxPxSize),v.render())}}}),s(t,"Series/Bubble/BubbleLegendComposition.js",[t["Series/Bubble/BubbleLegendDefaults.js"],t["Series/Bubble/BubbleLegendItem.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{setOptions:a}=r,{composed:h}=n,{addEvent:c,objectEach:g,pushUnique:u,wrap:p}=l;function b(S,w,R){let O,I,_,P=this.legend,F=v(this)>=0;P&&P.options.enabled&&P.bubbleLegend&&P.options.bubbleLegend.autoRanges&&F?(O=P.bubbleLegend.options,I=P.bubbleLegend.predictBubbleSizes(),P.bubbleLegend.updateRanges(I[0],I[1]),O.placed||(P.group.placed=!1,P.allItems.forEach(A=>{(_=A.legendItem||{}).group&&(_.group.translateY=void 0)})),P.render(),O.placed||(this.getMargins(),this.axes.forEach(function(A){A.visible&&A.render(),O.placed||(A.setScale(),A.updateNames(),g(A.ticks,function(D){D.isNew=!0,D.isNewLabel=!0}))}),this.getMargins()),O.placed=!0,S.call(this,w,R),P.bubbleLegend.correctSizes(),L(P,x(P))):(S.call(this,w,R),P&&P.options.enabled&&P.bubbleLegend&&(P.render(),L(P,x(P))))}function v(S){let w=S.series,R=0;for(;RI.height&&(I.height=w[A].itemHeight);I.step=F}return R}function m(S){let w=this.bubbleLegend,R=this.options,O=R.bubbleLegend,I=v(this.chart);w&&w.ranges&&w.ranges.length&&(O.ranges.length&&(O.autoRanges=!!O.ranges[0].autoRanges),this.destroyItem(w)),I>=0&&R.enabled&&O.enabled&&(O.seriesIndex=I,this.bubbleLegend=new i(O,this),this.bubbleLegend.addToLegend(S.allItems))}function E(S){let w;if(S.defaultPrevented)return!1;let R=this.chart,O=this.visible,I=this.chart.legend;I&&I.bubbleLegend&&(this.visible=!O,this.ignoreSeries=O,w=v(R)>=0,I.bubbleLegend.visible!==w&&(I.update({bubbleLegend:{enabled:w}}),I.bubbleLegend.visible=w),this.visible=O)}function L(S,w){let R=S.allItems,O=S.options.rtl,I,_,P,F,A=0;R.forEach((D,C)=>{(F=D.legendItem||{}).group&&(I=F.group.translateX||0,_=F.y||0,((P=D.movementX)||O&&D.ranges)&&(P=O?I-D.options.maxSize/2:I+P,F.group.attr({translateX:P})),C>w[A].step&&A++,F.group.attr({translateY:Math.round(_+w[A].height/2)}),F.y=_+w[A].height/2)})}return{compose:function(S,w,R){u(h,"Series.BubbleLegend")&&(a({legend:{bubbleLegend:e}}),p(S.prototype,"drawChartBox",b),c(w,"afterGetAllItems",m),c(R,"legendItemClick",E))}}}),s(t,"Series/Bubble/BubblePoint.js",[t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{seriesTypes:{scatter:{prototype:{pointClass:n}}}}=i,{extend:l}=r;class a extends n{haloPath(c){return e.prototype.haloPath.call(this,c===0?0:(this.marker&&this.marker.radius||0)+c)}}return l(a.prototype,{ttBelow:!1}),a}),s(t,"Series/Bubble/BubbleSeries.js",[t["Series/Bubble/BubbleLegendComposition.js"],t["Series/Bubble/BubblePoint.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{parse:h}=r,{composed:c,noop:g}=n,{series:u,seriesTypes:{column:{prototype:p},scatter:b}}=l,{addEvent:v,arrayMax:x,arrayMin:m,clamp:E,extend:L,isNumber:S,merge:w,pick:R,pushUnique:O}=a;function I(){let P=this.len,{coll:F,isXAxis:A,min:D}=this,C=A?"xData":"yData",d=(this.max||0)-(D||0),f=0,y=P,M=P/d,k;(F==="xAxis"||F==="yAxis")&&(this.series.forEach(T=>{if(T.bubblePadding&&T.reserveSpace()){this.allowZoomOutside=!0,k=!0;let z=T[C];if(A&&((T.onPoint||T).getRadii(0,0,T),T.onPoint&&(T.radii=T.onPoint.radii)),d>0){let N=z.length;for(;N--;)if(S(z[N])&&this.dataMin<=z[N]&&z[N]<=this.max){let G=T.radii&&T.radii[N]||0;f=Math.min((z[N]-D)*M-G,f),y=Math.max((z[N]-D)*M+G,y)}}}}),k&&d>0&&!this.logarithmic&&(y-=P,M*=(P+Math.max(0,f)-Math.min(y,P))/P,[["min","userMin",f],["max","userMax",y]].forEach(T=>{R(this.options[T[0]],this[T[1]])===void 0&&(this[T[0]]+=T[2]/M)})))}class _ extends b{static compose(F,A,D,C){e.compose(A,D,C),O(c,"Series.Bubble")&&v(F,"foundExtremes",I)}animate(F){!F&&this.points.length{if(G.bubblePadding&&G.reserveSpace()){let X=(G.onPoint||G).getZExtremes();X&&(z=Math.min(R(z,X.zMin),X.zMin),N=Math.max(R(N,X.zMax),X.zMax),T=!0)}}),T?(y={zMin:z,zMax:N},this.chart.bubbleZExtremes=y):y={zMin:0,zMax:0}}for(d=0,C=F.length;d0&&(z=(d-F)/T)}return M&&z>=0&&(z=Math.sqrt(z)),Math.ceil(D+z*(C-D))/2}hasData(){return!!this.processedXData.length}markerAttribs(F,A){let D=super.markerAttribs(F,A),{height:C=0,width:d=0}=D;return this.chart.inverted?L(D,{x:(F.plotX||0)-d/2,y:(F.plotY||0)-C/2}):D}pointAttribs(F,A){let D=this.options.marker.fillOpacity,C=u.prototype.pointAttribs.call(this,F,A);return D!==1&&(C.fill=h(C.fill).setOpacity(D).get("rgba")),C}translate(){super.translate.call(this),this.getRadii(),this.translateBubble()}translateBubble(){let{data:F,options:A,radii:D}=this,{minPxSize:C}=this.getPxExtremes(),d=F.length;for(;d--;){let f=F[d],y=D?D[d]:0;this.zoneAxis==="z"&&(f.negative=(f.z||0)<(A.zThreshold||0)),S(y)&&y>=C/2?(f.marker=L(f.marker,{radius:y,width:2*y,height:2*y}),f.dlBox={x:f.plotX-y,y:f.plotY-y,width:2*y,height:2*y}):(f.shapeArgs=f.plotY=f.dlBox=void 0,f.isInside=!1)}}getPxExtremes(){let F=Math.min(this.chart.plotWidth,this.chart.plotHeight),A=d=>{let f;return typeof d=="string"&&(f=/%$/.test(d),d=parseInt(d,10)),f?F*d/100:d},D=A(R(this.options.minSize,8)),C=Math.max(A(R(this.options.maxSize,"20%")),D);return{minPxSize:D,maxPxSize:C}}getZExtremes(){let F=this.options,A=(this.zData||[]).filter(S);if(A.length){let D=R(F.zMin,E(m(A),F.displayNegative===!1?F.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),C=R(F.zMax,x(A));if(S(D)&&S(C))return{zMin:D,zMax:C}}}}return _.defaultOptions=w(b.defaultOptions,{dataLabels:{formatter:function(){let{numberFormatter:P}=this.series.chart,{z:F}=this.point;return S(F)?P(F,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),L(_.prototype,{alignDataLabel:p.alignDataLabel,applyZones:g,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:i,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),v(_,"updatedData",P=>{delete P.target.chart.bubbleZExtremes}),v(_,"remove",P=>{delete P.target.chart.bubbleZExtremes}),l.registerSeriesType("bubble",_),_}),s(t,"Series/ColumnRange/ColumnRangePoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{seriesTypes:{column:{prototype:{pointClass:{prototype:r}}},arearange:{prototype:{pointClass:n}}}}=e,{extend:l,isNumber:a}=i;class h extends n{isValid(){return a(this.low)}}return l(h.prototype,{setState:r.setState}),h}),s(t,"Series/ColumnRange/ColumnRangeSeries.js",[t["Series/ColumnRange/ColumnRangePoint.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=i,{seriesTypes:{arearange:a,column:h,column:{prototype:c}}}=r,{addEvent:g,clamp:u,extend:p,isNumber:b,merge:v,pick:x}=n;class m extends a{setOptions(){return v(!0,arguments[0],{stacking:void 0}),a.prototype.setOptions.apply(this,arguments)}translate(){return c.translate.apply(this)}pointAttribs(){return c.pointAttribs.apply(this,arguments)}translate3dPoints(){return c.translate3dPoints.apply(this,arguments)}translate3dShapes(){return c.translate3dShapes.apply(this,arguments)}afterColumnTranslate(){let L,S,w,R,O=this.yAxis,I=this.xAxis,_=I.startAngleRad,P=this.chart,F=this.xAxis.isRadial,A=Math.max(P.chartWidth,P.chartHeight)+999;this.points.forEach(D=>{let C=D.shapeArgs||{},d=this.options.minPointLength,f=D.plotY,y=O.translate(D.high,0,1,0,1);if(b(y)&&b(f))if(D.plotHigh=u(y,-A,A),D.plotLow=u(f,-A,A),R=D.plotHigh,Math.abs(L=x(D.rectPlotY,D.plotY)-D.plotHigh)\u25CF {series.name}: {point.low} - {point.high}
'},whiskerWidth:null}}),s(t,"Series/ErrorBar/ErrorBarSeries.js",[t["Series/BoxPlot/BoxPlotSeries.js"],t["Series/Column/ColumnSeries.js"],t["Series/ErrorBar/ErrorBarSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{arearange:a}=n.seriesTypes,{addEvent:h,merge:c,extend:g}=l;class u extends e{getColumnMetrics(){return this.linkedParent&&this.linkedParent.columnMetrics||i.prototype.getColumnMetrics.call(this)}drawDataLabels(){let b=this.pointValKey;if(a)for(let v of(a.prototype.drawDataLabels.call(this),this.points))v.y=v[b]}toYData(b){return[b.low,b.high]}}return u.defaultOptions=c(e.defaultOptions,r),h(u,"afterTranslate",function(){for(let p of this.points)p.plotLow=p.plotY},{order:0}),g(u.prototype,{pointArrayMap:["low","high"],pointValKey:"high",doQuartiles:!1}),n.registerSeriesType("errorbar",u),u}),s(t,"Series/Gauge/GaugePoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{series:{prototype:{pointClass:i}}}=e;return class extends i{setState(r){this.state=r}}}),s(t,"Series/Gauge/GaugeSeries.js",[t["Series/Gauge/GaugePoint.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=i,{series:a,seriesTypes:{column:h}}=r,{clamp:c,isNumber:g,extend:u,merge:p,pick:b,pInt:v,defined:x}=n;class m extends a{translate(){let L=this.yAxis,S=this.options,w=L.center;this.generatePoints(),this.points.forEach(R=>{let O=p(S.dial,R.dial),I=v(O.radius)*w[2]/200,_=v(O.baseLength)*I/100,P=v(O.rearLength)*I/100,F=O.baseWidth,A=O.topWidth,D=S.overshoot,C=L.startAngleRad+L.translate(R.y,void 0,void 0,void 0,!0);(g(D)||S.wrap===!1)&&(D=g(D)?D/180*Math.PI:0,C=c(C,L.startAngleRad-D,L.endAngleRad+D)),C=180*C/Math.PI,R.shapeType="path";let d=O.path||[["M",-P,-F/2],["L",_,-F/2],["L",I,-A/2],["L",I,A/2],["L",_,F/2],["L",-P,F/2],["Z"]];R.shapeArgs={d,translateX:w[0],translateY:w[1],rotation:C},R.plotX=w[0],R.plotY=w[1],x(R.y)&&L.max-L.min&&(R.percentage=(R.y-L.min)/(L.max-L.min)*100)})}drawPoints(){let L=this,S=L.chart,w=L.yAxis.center,R=L.pivot,O=L.options,I=O.pivot,_=S.renderer;L.points.forEach(P=>{let F=P.graphic,A=P.shapeArgs,D=A.d,C=p(O.dial,P.dial);F?(F.animate(A),A.d=D):P.graphic=_[P.shapeType](A).addClass("highcharts-dial").add(L.group),S.styledMode||P.graphic[F?"animate":"attr"]({stroke:C.borderColor,"stroke-width":C.borderWidth,fill:C.backgroundColor})}),R?R.animate({translateX:w[0],translateY:w[1]}):I&&(L.pivot=_.circle(0,0,I.radius).attr({zIndex:2}).addClass("highcharts-pivot").translate(w[0],w[1]).add(L.group),S.styledMode||L.pivot.attr({fill:I.backgroundColor,stroke:I.borderColor,"stroke-width":I.borderWidth}))}animate(L){let S=this;L||S.points.forEach(w=>{let R=w.graphic;R&&(R.attr({rotation:180*S.yAxis.startAngleRad/Math.PI}),R.animate({rotation:w.shapeArgs.rotation},S.options.animation))})}render(){this.group=this.plotGroup("group","series",this.visible?"inherit":"hidden",this.options.zIndex,this.chart.seriesGroup),a.prototype.render.call(this),this.group.clip(this.chart.clipRect)}setData(L,S){a.prototype.setData.call(this,L,!1),this.processData(),this.generatePoints(),b(S,!0)&&this.chart.redraw()}hasData(){return!!this.points.length}}return m.defaultOptions=p(a.defaultOptions,{dataLabels:{borderColor:"#cccccc",borderRadius:3,borderWidth:1,crop:!1,defer:!1,enabled:!0,verticalAlign:"top",y:15,zIndex:2},dial:{backgroundColor:"#000000",baseLength:"70%",baseWidth:3,borderColor:"#cccccc",borderWidth:0,radius:"80%",rearLength:"10%",topWidth:1},pivot:{radius:5,borderWidth:0,borderColor:"#cccccc",backgroundColor:"#000000"},tooltip:{headerFormat:""},showInLegend:!1}),u(m.prototype,{angular:!0,directTouch:!0,drawGraph:l,drawTracker:h.prototype.drawTracker,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,pointClass:e,trackerGroups:["group","dataLabelsGroup"]}),r.registerSeriesType("gauge",m),m}),s(t,"Series/DragNodesComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{composed:r}=e,{addEvent:n,pushUnique:l}=i;function a(){let h,c,g,u=this;u.container&&(h=n(u.container,"mousedown",p=>{let b=u.hoverPoint;b&&b.series&&b.series.hasDraggableNodes&&b.series.options.draggable&&(b.series.onMouseDown(b,p),c=n(u.container,"mousemove",v=>b&&b.series&&b.series.onMouseMove(b,v)),g=n(u.container.ownerDocument,"mouseup",v=>(c(),g(),b&&b.series&&b.series.onMouseUp(b,v))))})),n(u,"destroy",function(){h()})}return{compose:function(h){l(r,"DragNodes")&&n(h,"load",a)},onMouseDown:function(h,c){let g=this.chart.pointer?.normalize(c)||c;h.fixedPosition={chartX:g.chartX,chartY:g.chartY,plotX:h.plotX,plotY:h.plotY},h.inDragMode=!0},onMouseMove:function(h,c){if(h.fixedPosition&&h.inDragMode){let g,u,p=this.chart,b=p.pointer?.normalize(c)||c,v=h.fixedPosition.chartX-b.chartX,x=h.fixedPosition.chartY-b.chartY,m=p.graphLayoutsLookup;(Math.abs(v)>5||Math.abs(x)>5)&&(g=h.fixedPosition.plotX-v,u=h.fixedPosition.plotY-x,p.isInsidePlot(g,u)&&(h.plotX=g,h.plotY=u,h.hasDragged=!0,this.redrawHalo(h),m.forEach(E=>{E.restartSimulation()})))}},onMouseUp:function(h){h.fixedPosition&&(h.hasDragged&&(this.layout.enableSimulation?this.layout.start():this.chart.redraw()),h.inDragMode=h.hasDragged=!1,this.options.fixedDraggable||delete h.fixedPosition)},redrawHalo:function(h){h&&this.halo&&this.halo.attr({d:h.haloPath(this.options.states.hover.halo.size)})}}}),s(t,"Series/GraphLayoutComposition.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r){let{setAnimation:n}=e,{composed:l}=i,{addEvent:a,pushUnique:h}=r;function c(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(b=>{b.updateSimulation()}),this.redraw())}function g(){this.graphLayoutsLookup&&(this.graphLayoutsLookup.forEach(b=>{b.updateSimulation(!1)}),this.redraw())}function u(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(b=>{b.stop()})}function p(){let b,v=!1,x=m=>{m.maxIterations--&&isFinite(m.temperature)&&!m.isStable()&&!m.enableSimulation&&(m.beforeStep&&m.beforeStep(),m.step(),b=!1,v=!0)};if(this.graphLayoutsLookup){for(n(!1,this),this.graphLayoutsLookup.forEach(m=>m.start());!b;)b=!0,this.graphLayoutsLookup.forEach(x);v&&this.series.forEach(m=>{m&&m.layout&&m.render()})}}return{compose:function(b){h(l,"GraphLayout")&&(a(b,"afterPrint",c),a(b,"beforePrint",g),a(b,"predraw",u),a(b,"render",p))},integrations:{},layouts:{}}}),s(t,"Series/PackedBubble/PackedBubblePoint.js",[t["Core/Chart/Chart.js"],t["Core/Series/Point.js"],t["Core/Series/SeriesRegistry.js"]],function(e,i,r){let{seriesTypes:{bubble:{prototype:{pointClass:n}}}}=r;return class extends n{destroy(){return this.series.layout&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes),i.prototype.destroy.apply(this,arguments)}firePointEvent(){let l=this.series.options;if(this.isParentNode&&l.parentNode){let a=l.allowPointSelect;l.allowPointSelect=l.parentNode.allowPointSelect,i.prototype.firePointEvent.apply(this,arguments),l.allowPointSelect=a}else i.prototype.firePointEvent.apply(this,arguments)}select(){let l=this.series.chart;this.isParentNode?(l.getSelectedPoints=l.getSelectedParentNodes,i.prototype.select.apply(this,arguments),l.getSelectedPoints=e.prototype.getSelectedPoints):i.prototype.select.apply(this,arguments)}}}),s(t,"Series/PackedBubble/PackedBubbleSeriesDefaults.js",[t["Core/Utilities.js"]],function(e){let{isNumber:i}=e;return{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",crisp:!1,tooltip:{pointFormat:"Value: {point.value}"},draggable:!0,useSimulation:!0,parentNode:{allowPointSelect:!1},dataLabels:{formatter:function(){let{numberFormatter:r}=this.series.chart,{value:n}=this.point;return i(n)?r(n,-1):""},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:!0},padding:0,style:{transition:"opacity 2000ms"}},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,bubblePadding:5,parentNodeLimit:!1,seriesInteraction:!0,dragBetweenSeries:!1,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50,initialPositionRadius:100,seriesInteraction:!0,marker:{fillColor:null,fillOpacity:1,lineWidth:null,lineColor:null,symbol:"circle"}},enableSimulation:!0,type:"packedbubble",integration:"packedbubble",maxIterations:1e3,splitSeries:!1,maxSpeed:5,gravitationalConstant:.01,friction:-.981}}}),s(t,"Series/Networkgraph/VerletIntegration.js",[],function(){return{attractive:function(e,i,r){let n=e.getMass(),l=-r.x*i*this.diffTemperature,a=-r.y*i*this.diffTemperature;e.fromNode.fixedPosition||(e.fromNode.plotX-=l*n.fromNode/e.fromNode.degree,e.fromNode.plotY-=a*n.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.plotX+=l*n.toNode/e.toNode.degree,e.toNode.plotY+=a*n.toNode/e.toNode.degree)},attractiveForceFunction:function(e,i){return(i-e)/e},barycenter:function(){let e=this.options.gravitationalConstant||0,i=(this.barycenter.xFactor-(this.box.left+this.box.width)/2)*e,r=(this.barycenter.yFactor-(this.box.top+this.box.height)/2)*e;this.nodes.forEach(function(n){n.fixedPosition||(n.plotX-=i/n.mass/n.degree,n.plotY-=r/n.mass/n.degree)})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.5)},integrate:function(e,i){let r=-e.options.friction,n=e.options.maxSpeed,l=i.prevX,a=i.prevY,h=(i.plotX+i.dispX-l)*r,c=(i.plotY+i.dispY-a)*r,g=Math.abs,u=g(h)/(h||1),p=g(c)/(c||1),b=u*Math.min(n,Math.abs(h)),v=p*Math.min(n,Math.abs(c));i.prevX=i.plotX+i.dispX,i.prevY=i.plotY+i.dispY,i.plotX+=b,i.plotY+=v,i.temperature=e.vectorLength({x:b,y:v})},repulsive:function(e,i,r){let n=i*this.diffTemperature/e.mass/e.degree;e.fixedPosition||(e.plotX+=r.x*n,e.plotY+=r.y*n)},repulsiveForceFunction:function(e,i){return(i-e)/e*(i>e?1:0)}}}),s(t,"Series/PackedBubble/PackedBubbleIntegration.js",[t["Core/Globals.js"],t["Series/Networkgraph/VerletIntegration.js"]],function(e,i){let{noop:r}=e;return{barycenter:function(){let n,l,a=this.options.gravitationalConstant,h=this.box,c=this.nodes;for(let g of c)this.options.splitSeries&&!g.isParentNode?(n=g.series.parentNode.plotX,l=g.series.parentNode.plotY):(n=h.width/2,l=h.height/2),g.fixedPosition||(g.plotX-=(g.plotX-n)*a/(g.mass*Math.sqrt(c.length)),g.plotY-=(g.plotY-l)*a/(g.mass*Math.sqrt(c.length)))},getK:r,integrate:i.integrate,repulsive:function(n,l,a,h){let c=l*this.diffTemperature/n.mass/n.degree,g=a.x*c,u=a.y*c;n.fixedPosition||(n.plotX+=g,n.plotY+=u),h.fixedPosition||(h.plotX-=g,h.plotY-=u)},repulsiveForceFunction:function(n,l,a,h){return Math.min(n,(a.marker.radius+h.marker.radius)/2)}}}),s(t,"Series/Networkgraph/EulerIntegration.js",[],function(){return{attractive:function(e,i,r,n){let l=e.getMass(),a=r.x/n*i,h=r.y/n*i;e.fromNode.fixedPosition||(e.fromNode.dispX-=a*l.fromNode/e.fromNode.degree,e.fromNode.dispY-=h*l.fromNode/e.fromNode.degree),e.toNode.fixedPosition||(e.toNode.dispX+=a*l.toNode/e.toNode.degree,e.toNode.dispY+=h*l.toNode/e.toNode.degree)},attractiveForceFunction:function(e,i){return e*e/i},barycenter:function(){let e=this.options.gravitationalConstant,i=this.barycenter.xFactor,r=this.barycenter.yFactor;this.nodes.forEach(function(n){if(!n.fixedPosition){let l=n.getDegree(),a=l*(1+l/2);n.dispX+=(i-n.plotX)*e*a/n.degree,n.dispY+=(r-n.plotY)*e*a/n.degree}})},getK:function(e){return Math.pow(e.box.width*e.box.height/e.nodes.length,.3)},integrate:function(e,i){i.dispX+=i.dispX*e.options.friction,i.dispY+=i.dispY*e.options.friction;let r=i.temperature=e.vectorLength({x:i.dispX,y:i.dispY});r!==0&&(i.plotX+=i.dispX/r*Math.min(Math.abs(i.dispX),e.temperature),i.plotY+=i.dispY/r*Math.min(Math.abs(i.dispY),e.temperature))},repulsive:function(e,i,r,n){e.dispX+=r.x/n*i/e.degree,e.dispY+=r.y/n*i/e.degree},repulsiveForceFunction:function(e,i){return i*i/e}}}),s(t,"Series/Networkgraph/QuadTreeNode.js",[],function(){class e{constructor(r){this.body=!1,this.isEmpty=!1,this.isInternal=!1,this.nodes=[],this.box=r,this.boxSize=Math.min(r.width,r.height)}divideBox(){let r=this.box.width/2,n=this.box.height/2;this.nodes[0]=new e({left:this.box.left,top:this.box.top,width:r,height:n}),this.nodes[1]=new e({left:this.box.left+r,top:this.box.top,width:r,height:n}),this.nodes[2]=new e({left:this.box.left+r,top:this.box.top+n,width:r,height:n}),this.nodes[3]=new e({left:this.box.left,top:this.box.top+n,width:r,height:n})}getBoxPosition(r){let n=r.plotXthis.step())):(this.simulation=!1,this.series.forEach(E=>{p(E,"afterSimulation")}))}}stop(){this.simulation&&h.cancelAnimationFrame(this.simulation)}setArea(m,E,L,S){this.box={left:m,top:E,width:L,height:S}}setK(){this.k=this.options.linkLength||this.integration.getK(this)}addElementsToCollection(m,E){for(let L of m)E.indexOf(L)===-1&&E.push(L)}removeElementFromCollection(m,E){let L=E.indexOf(m);L!==-1&&E.splice(L,1)}clear(){this.nodes.length=0,this.links.length=0,this.series.length=0,this.resetSimulation()}resetSimulation(){this.forcedStop=!1,this.systemTemperature=0,this.setMaxIterations(),this.setTemperature(),this.setDiffTemperature()}restartSimulation(){this.simulation?this.resetSimulation():(this.setInitialRendering(!1),this.enableSimulation?this.start():this.setMaxIterations(1),this.chart&&this.chart.redraw(),this.setInitialRendering(!0))}setMaxIterations(m){this.maxIterations=b(m,this.options.maxIterations)}setTemperature(){this.temperature=this.startTemperature=Math.sqrt(this.nodes.length)}setDiffTemperature(){this.diffTemperature=this.startTemperature/(this.options.maxIterations+1)}setInitialRendering(m){this.initialRendering=m}createQuadTree(){this.quadTree=new n(this.box.left,this.box.top,this.box.width,this.box.height),this.quadTree.insertNodes(this.nodes)}initPositions(){let m=this.options.initialPositions;if(u(m))for(let E of(m.call(this),this.nodes))g(E.prevX)||(E.prevX=E.plotX),g(E.prevY)||(E.prevY=E.plotY),E.dispX=0,E.dispY=0;else m==="circle"?this.setCircularPositions():this.setRandomPositions()}setCircularPositions(){let m,E=this.box,L=this.nodes,S=2*Math.PI/(L.length+1),w=L.filter(function(P){return P.linksTo.length===0}),R={},O=this.options.initialPositionRadius,I=P=>{for(let F of P.linksFrom||[])R[F.toNode.id]||(R[F.toNode.id]=!0,_.push(F.toNode),I(F.toNode))},_=[];for(let P of w)_.push(P),I(P);if(_.length)for(let P of L)_.indexOf(P)===-1&&_.push(P);else _=L;for(let P=0,F=_.length;P{let O=R*R/Math.PI;return O-Math.floor(O)};for(let R=0,O=L.length;Rthis.barnesHutApproximation(m,E));else{let m,E,L;for(let S of this.nodes)for(let w of this.nodes)S===w||S.fixedPosition||(L=this.getDistXY(S,w),(E=this.vectorLength(L))!==0&&(m=this.repulsiveForce(E,this.k),this.force("repulsive",S,m*w.mass,L,E)))}}attractiveForces(){let m,E,L;for(let S of this.links)S.fromNode&&S.toNode&&(m=this.getDistXY(S.fromNode,S.toNode),(E=this.vectorLength(m))!==0&&(L=this.attractiveForce(E,this.k),this.force("attractive",S,L,m,E)))}applyLimits(){for(let m of this.nodes)m.fixedPosition||(this.integration.integrate(this,m),this.applyLimitBox(m,this.box),m.dispX=0,m.dispY=0)}applyLimitBox(m,E){let L=m.radius;m.plotX=c(m.plotX,E.left+L,E.width-L),m.plotY=c(m.plotY,E.top+L,E.height-L)}coolDown(m,E,L){return m-E*L}isStable(){return 1e-5>Math.abs(this.systemTemperature-this.prevSystemTemperature)||this.temperature<=0}getSystemTemperature(){let m=0;for(let E of this.nodes)m+=E.temperature;return m}vectorLength(m){return Math.sqrt(m.x*m.x+m.y*m.y)}getDistR(m,E){let L=this.getDistXY(m,E);return this.vectorLength(L)}getDistXY(m,E){let L=m.plotX-E.plotX,S=m.plotY-E.plotY;return{x:L,y:S,absX:Math.abs(L),absY:Math.abs(S)}}}return v}),s(t,"Series/PackedBubble/PackedBubbleLayout.js",[t["Series/GraphLayoutComposition.js"],t["Series/PackedBubble/PackedBubbleIntegration.js"],t["Series/Networkgraph/ReingoldFruchtermanLayout.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{addEvent:l,pick:a}=n;function h(){let u=this.series,p=[];return u.forEach(b=>{b.parentNode&&b.parentNode.selected&&p.push(b.parentNode)}),p}function c(){this.allDataPoints&&delete this.allDataPoints}class g extends r{constructor(){super(...arguments),this.index=NaN,this.nodes=[],this.series=[]}static compose(p){r.compose(p),e.integrations.packedbubble=i,e.layouts.packedbubble=g;let b=p.prototype;b.getSelectedParentNodes||(l(p,"beforeRedraw",c),b.getSelectedParentNodes=h)}beforeStep(){this.options.marker&&this.series.forEach(p=>{p&&p.calculateParentRadius()})}isStable(){let p=Math.abs(this.prevSystemTemperature-this.systemTemperature);return 1>Math.abs(10*this.systemTemperature/Math.sqrt(this.nodes.length))&&p<1e-5||this.temperature<=0}setCircularPositions(){let p=this.box,b=this.nodes,v=2*Math.PI/(b.length+1),x=this.options.initialPositionRadius,m,E,L=0;for(let S of b)this.options.splitSeries&&!S.isParentNode?(m=S.series.parentNode.plotX,E=S.series.parentNode.plotY):(m=p.width/2,E=p.height/2),S.plotX=S.prevX=a(S.plotX,m+x*Math.cos(S.index||L*v)),S.plotY=S.prevY=a(S.plotY,E+x*Math.sin(S.index||L*v)),S.dispX=0,S.dispY=0,L++}repulsiveForces(){let p,b,v,x=this,m=x.options.bubblePadding,E=x.nodes;E.forEach(L=>{L.degree=L.mass,L.neighbours=0,E.forEach(S=>{p=0,L!==S&&!L.fixedPosition&&(x.options.seriesInteraction||L.series===S.series)&&(v=x.getDistXY(L,S),(b=x.vectorLength(v)-(L.marker.radius+S.marker.radius+m))<0&&(L.degree+=.01,L.neighbours++,p=x.repulsiveForce(-b/Math.sqrt(L.neighbours),x.k,L,S)),x.force("repulsive",L,p*S.mass,v,S,b))})})}applyLimitBox(p,b){let v,x;this.options.splitSeries&&!p.isParentNode&&this.options.parentNodeLimit&&(v=this.getDistXY(p,p.series.parentNode),(x=p.series.parentNodeRadius-p.marker.radius-this.vectorLength(v))<0&&x>-2*p.marker.radius&&(p.plotX-=.01*v.x,p.plotY-=.01*v.y)),super.applyLimitBox(p,b)}}return e.layouts.packedbubble=g,g}),s(t,"Series/SimulationSeriesUtilities.js",[t["Core/Utilities.js"],t["Core/Animation/AnimationUtilities.js"]],function(e,i){let{merge:r,syncTimeout:n}=e,{animObject:l}=i;return{initDataLabels:function(){let a=this.options.dataLabels;if(!this.dataLabelsGroup){let h=this.initDataLabelsGroup();return!this.chart.styledMode&&a?.style&&h.css(a.style),h.attr({opacity:0}),this.visible&&h.show(),h}return this.dataLabelsGroup.attr(r({opacity:1},this.getPlotBox("data-labels"))),this.dataLabelsGroup},initDataLabelsDefer:function(){let a=this.options.dataLabels;a?.defer&&this.options.layoutAlgorithm?.enableSimulation?n(()=>{this.deferDataLabels=!1},a?l(a.animation).defer:0):this.deferDataLabels=!1}}}),s(t,"Series/PackedBubble/PackedBubbleSeries.js",[t["Core/Color/Color.js"],t["Series/DragNodesComposition.js"],t["Series/GraphLayoutComposition.js"],t["Core/Globals.js"],t["Series/PackedBubble/PackedBubblePoint.js"],t["Series/PackedBubble/PackedBubbleSeriesDefaults.js"],t["Series/PackedBubble/PackedBubbleLayout.js"],t["Core/Series/SeriesRegistry.js"],t["Series/SimulationSeriesUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){let{parse:p}=e,{noop:b}=n,{series:{prototype:v},seriesTypes:{bubble:x}}=c,{initDataLabels:m,initDataLabelsDefer:E}=g,{addEvent:L,clamp:S,defined:w,extend:R,fireEvent:O,isArray:I,isNumber:_,merge:P,pick:F}=u;class A extends x{constructor(){super(...arguments),this.parentNodeMass=0,this.deferDataLabels=!0}static compose(C,d,f,y){x.compose(C,d,f,y),i.compose(d),h.compose(d)}accumulateAllPoints(){let C,d=this.chart,f=[];for(let y of d.series)if(y.is("packedbubble")&&y.reserveSpace()){C=y.yData||[];for(let M=0;M{T.mass=2,T.degree=1,T.collisionNmb=1}),k.setArea(0,0,this.chart.plotWidth,this.chart.plotHeight),k.addElementsToCollection([this],k.series),k.addElementsToCollection(this.points,k.nodes)}addSeriesLayout(){let C=this.options.layoutAlgorithm=this.options.layoutAlgorithm||{},d=C.type||"packedbubble",f=this.chart.graphLayoutsStorage,y=this.chart.graphLayoutsLookup,M=P(C,C.parentNodeOptions,{enableSimulation:this.layout.options.enableSimulation}),k=f[d+"-series"];k||(f[d+"-series"]=k=new r.layouts[d],k.init(M),y.splice(k.index,0,k)),this.parentNodeLayout=k,this.createParentNodes()}calculateParentRadius(){let C=this.seriesBox();this.parentNodeRadius=S(Math.sqrt(2*this.parentNodeMass/Math.PI)+20,20,C?Math.max(Math.sqrt(Math.pow(C.width,2)+Math.pow(C.height,2))/2+20,20):Math.sqrt(2*this.parentNodeMass/Math.PI)+20),this.parentNode&&(this.parentNode.marker.radius=this.parentNode.radius=this.parentNodeRadius)}calculateZExtremes(){let C=this.chart.series,d=this.options.zMin,f=this.options.zMax,y=1/0,M=-1/0;return d&&f?[d,f]:(C.forEach(k=>{k.yData.forEach(T=>{w(T)&&(T>M&&(M=T),T{this.parentNodeMass+=Math.PI*Math.pow(z.marker.radius,2)}),this.calculateParentRadius(),f.nodes.forEach(z=>{z.seriesIndex===this.index&&(M=!0)}),f.setArea(0,0,d.plotWidth,d.plotHeight),M||(k||(k=new C(this,{mass:this.parentNodeRadius/2,marker:T,dataLabels:{inside:!1},states:{normal:{marker:T},hover:{marker:T}},dataLabelOnNull:!0,degree:this.parentNodeRadius,isParentNode:!0,seriesIndex:this.index})),this.parentNode&&(k.plotX=this.parentNode.plotX,k.plotY=this.parentNode.plotY),this.parentNode=k,f.addElementsToCollection([this],f.series),f.addElementsToCollection([k],f.nodes))}deferLayout(){let C=this.options.layoutAlgorithm;this.visible&&(this.addLayout(),C.splitSeries&&this.addSeriesLayout())}destroy(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach(C=>{C.removeElementFromCollection(this,C.series)},this),this.parentNode&&this.parentNodeLayout&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy())),v.destroy.apply(this,arguments)}drawDataLabels(){!this.deferDataLabels&&(v.drawDataLabels.call(this,this.points),this.parentNode&&(this.parentNode.formatPrefix="parentNode",v.drawDataLabels.call(this,[this.parentNode])))}drawGraph(){if(!this.layout||!this.layout.options.splitSeries)return;let C=this.chart,d=this.layout.options.parentNodeOptions.marker,f={fill:d.fillColor||p(this.color).brighten(.4).get(),opacity:d.fillOpacity,stroke:d.lineColor||this.color,"stroke-width":F(d.lineWidth,this.options.lineWidth)},y={};this.parentNodesGroup=this.plotGroup("parentNodesGroup","parentNode",this.visible?"inherit":"hidden",.1,C.seriesGroup),this.group?.attr({zIndex:2}),this.calculateParentRadius(),this.parentNode&&w(this.parentNode.plotX)&&w(this.parentNode.plotY)&&w(this.parentNodeRadius)&&(y=P({x:this.parentNode.plotX-this.parentNodeRadius,y:this.parentNode.plotY-this.parentNodeRadius,width:2*this.parentNodeRadius,height:2*this.parentNodeRadius},f),this.parentNode.graphic||(this.graph=this.parentNode.graphic=C.renderer.symbol(f.symbol).add(this.parentNodesGroup)),this.parentNode.graphic.attr(y))}drawTracker(){let C,d=this.parentNode;super.drawTracker(),d&&(C=I(d.dataLabels)?d.dataLabels:d.dataLabel?[d.dataLabel]:[],d.graphic&&(d.graphic.element.point=d),C.forEach(f=>{(f.div||f.element).point=d}))}getPointRadius(){let C,d,f,y,M=this.chart,k=M.plotWidth,T=M.plotHeight,z=this.options,N=z.useSimulation,G=Math.min(k,T),X={},j=[],B=M.allDataPoints||[],W=B.length;["minSize","maxSize"].forEach(U=>{let q=parseInt(z[U],10),H=/%$/.test(z[U]);X[U]=H?G*q/100:q*Math.sqrt(W)}),M.minRadius=C=X.minSize/Math.sqrt(W),M.maxRadius=d=X.maxSize/Math.sqrt(W);let Y=N?this.calculateZExtremes():[C,d];B.forEach((U,q)=>{f=N?S(U[2],Y[0],Y[1]):U[2],(y=this.getRadius(Y[0],Y[1],C,d,f))===0&&(y=null),B[q][2]=y,j.push(y)}),this.radii=j}init(){return v.init.apply(this,arguments),E.call(this),this.eventsToUnbind.push(L(this,"updatedData",function(){this.chart.series.forEach(C=>{C.type===this.type&&(C.isDirty=!0)},this)})),this}onMouseUp(C){if(C.fixedPosition&&!C.removed){let d,f=this.layout,y=this.parentNodeLayout;y&&f.options.dragBetweenSeries&&y.nodes.forEach(M=>{C&&C.marker&&M!==C.series.parentNode&&(d=f.getDistXY(C,M),f.vectorLength(d)-M.marker.radius-C.marker.radius<0&&(M.series.addPoint(P(C.options,{plotX:C.plotX,plotY:C.plotY}),!1),f.removeElementFromCollection(C,f.nodes),C.remove()))}),i.onMouseUp.apply(this,arguments)}}placeBubbles(C){let d=this.checkOverlap,f=this.positionBubble,y=[],M=1,k=0,T=0,z,N=[],G,X=C.sort((j,B)=>B[2]-j[2]);if(X.length){if(y.push([[0,0,X[0][2],X[0][3],X[0][4]]]),X.length>1)for(y.push([[0,0-X[1][2]-X[0][2],X[1][2],X[1][3],X[1][4]]]),G=2;G1&&y[M-1][T+1]&&d(z,y[M-1][T+1])?(T++,y[M].push(f(y[M][k],y[M-1][T],X[G])),k++):(k++,y[M].push(z));this.chart.stages=y,this.chart.rawPositions=[].concat.apply([],y),this.resizeRadius(),N=this.chart.rawPositions}return N}pointAttribs(C,d){let f=this.options,y=C&&C.isParentNode,M=f.marker;y&&f.layoutAlgorithm&&f.layoutAlgorithm.parentNodeOptions&&(M=f.layoutAlgorithm.parentNodeOptions.marker);let k=M.fillOpacity,T=v.pointAttribs.call(this,C,d);return k!==1&&(T["fill-opacity"]=k),T}positionBubble(C,d,f){let y=Math.pow,M=(0,Math.sqrt)(y(C[0]-d[0],2)+y(C[1]-d[1],2)),k=(0,Math.acos)((y(M,2)+y(f[2]+d[2],2)-y(f[2]+C[2],2))/(2*(f[2]+d[2])*M)),T=(0,Math.asin)((0,Math.abs)(C[0]-d[0])/M),z=(C[1]-d[1]<0?0:Math.PI)+k+T*((C[0]-d[0])*(C[1]-d[1])<0?1:-1);return[d[0]+(d[2]+f[2])*Math.sin(z),d[1]-(d[2]+f[2])*Math.cos(z),f[2],f[3],f[4]]}render(){let C=[];v.render.apply(this,arguments),!this.options.dataLabels.allowOverlap&&(this.data.forEach(d=>{I(d.dataLabels)&&d.dataLabels.forEach(f=>{C.push(f)})}),this.options.useSimulation&&this.chart.hideOverlappingLabels(C))}resizeRadius(){let C,d,f,y,M,k=this.chart,T=k.rawPositions,z=Math.min,N=Math.max,G=k.plotLeft,X=k.plotTop,j=k.plotHeight,B=k.plotWidth;for(let q of(C=f=Number.POSITIVE_INFINITY,d=y=Number.NEGATIVE_INFINITY,T))M=q[2],C=z(C,q[0]-M),d=N(d,q[0]+M),f=z(f,q[1]-M),y=N(y,q[1]+M);let W=[d-C,y-f],Y=[(B-G)/W[0],(j-X)/W[1]],U=z.apply([],Y);if(Math.abs(U-1)>1e-10){for(let q of T)q[2]*=U;this.placeBubbles(T)}else k.diffY=j/2+X-f-(y-f)/2,k.diffX=B/2+G-C-(d-C)/2}seriesBox(){let C,d=this.chart,f=this.data,y=Math.max,M=Math.min,k=[d.plotLeft,d.plotLeft+d.plotWidth,d.plotTop,d.plotTop+d.plotHeight];return f.forEach(T=>{w(T.plotX)&&w(T.plotY)&&T.marker.radius&&(C=T.marker.radius,k[0]=M(k[0],T.plotX-C),k[1]=y(k[1],T.plotX+C),k[2]=M(k[2],T.plotY-C),k[3]=y(k[3],T.plotY+C))}),_(k.width/k.height)?k:null}setVisible(){let C=this;v.setVisible.apply(C,arguments),C.parentNodeLayout&&C.graph?C.visible?(C.graph.show(),C.parentNode.dataLabel&&C.parentNode.dataLabel.show()):(C.graph.hide(),C.parentNodeLayout.removeElementFromCollection(C.parentNode,C.parentNodeLayout.nodes),C.parentNode.dataLabel&&C.parentNode.dataLabel.hide()):C.layout&&(C.visible?C.layout.addElementsToCollection(C.points,C.layout.nodes):C.points.forEach(d=>{C.layout.removeElementFromCollection(d,C.layout.nodes)}))}translate(){let C,d,f,y=this.chart,M=this.data,k=this.index,T=this.options.useSimulation;for(let z of(this.processedXData=this.xData,this.generatePoints(),w(y.allDataPoints)||(y.allDataPoints=this.accumulateAllPoints(),this.getPointRadius()),T?f=y.allDataPoints:(f=this.placeBubbles(y.allDataPoints),this.options.draggable=!1),f))z[3]===k&&(C=M[z[4]],d=F(z[2],void 0),T||(C.plotX=z[0]-y.plotLeft+y.diffX,C.plotY=z[1]-y.plotTop+y.diffY),_(d)&&(C.marker=R(C.marker,{radius:d,width:2*d,height:2*d}),C.radius=d));T&&this.deferLayout(),O(this,"afterTranslate")}}return A.defaultOptions=P(x.defaultOptions,a),R(A.prototype,{pointClass:l,axisTypes:[],directTouch:!0,forces:["barycenter","repulsive"],hasDraggableNodes:!0,invertible:!1,isCartesian:!1,noSharedTooltip:!0,pointArrayMap:["value"],pointValKey:"value",requireSorting:!1,trackerGroups:["group","dataLabelsGroup","parentNodesGroup"],initDataLabels:m,alignDataLabel:v.alignDataLabel,indexateNodes:b,onMouseDown:i.onMouseDown,onMouseMove:i.onMouseMove,redrawHalo:i.redrawHalo,searchPoint:b}),c.registerSeriesType("packedbubble",A),A}),s(t,"Series/Polygon/PolygonSeriesDefaults.js",[],function(){return{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0,legendSymbol:"rectangle"}}),s(t,"Series/Polygon/PolygonSeries.js",[t["Core/Globals.js"],t["Series/Polygon/PolygonSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{noop:l}=e,{area:a,line:h,scatter:c}=r.seriesTypes,{extend:g,merge:u}=n;class p extends c{getGraphPath(){let v=h.prototype.getGraphPath.call(this),x=v.length+1;for(;x--;)(x===v.length||v[x][0]==="M")&&x>0&&v.splice(x,0,["Z"]);return this.areaPath=v,v}drawGraph(){this.options.fillColor=this.color,a.prototype.drawGraph.call(this)}}return p.defaultOptions=u(c.defaultOptions,i),g(p.prototype,{type:"polygon",drawTracker:h.prototype.drawTracker,setStackedPoints:l}),r.registerSeriesType("polygon",p),p}),s(t,"Core/Axis/RadialAxisDefaults.js",[],function(){return{circular:{gridLineWidth:1,labels:{align:void 0,x:0,y:void 0,style:{textOverflow:"none"}},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},radial:{gridLineInterpolation:"circle",gridLineWidth:1,labels:{align:"right",padding:5,x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},radialGauge:{endOnTick:!1,gridLineWidth:0,labels:{align:"center",distance:-25,x:0,y:void 0},lineWidth:1,minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",minorTickWidth:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickPosition:"inside",tickWidth:2,title:{rotation:0,text:""},zIndex:2}}}),s(t,"Core/Axis/RadialAxis.js",[t["Core/Axis/RadialAxisDefaults.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{defaultOptions:a}=i,{composed:h,noop:c}=r,{addEvent:g,correctFloat:u,defined:p,extend:b,fireEvent:v,isObject:x,merge:m,pick:E,pushUnique:L,relativeLength:S,wrap:w}=n;return function(R){function O(){this.autoConnect=this.isCircular&&E(this.userMax,this.options.max)===void 0&&u(this.endAngleRad-this.startAngleRad)===u(2*Math.PI),!this.isCircular&&this.chart.inverted&&this.max++,this.autoConnect&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)}function I(){return()=>{if(this.isRadial&&this.tickPositions&&this.options.labels&&this.options.labels.allowOverlap!==!0)return this.tickPositions.map(V=>this.ticks[V]&&this.ticks[V].label).filter(V=>!!V)}}function _(){return c}function P(V,Z,K){let J=this.pane.center,tt=V.value,$,Q,et;return this.isCircular?(p(tt)?V.point&&(V.point.shapeArgs||{}).start&&(tt=this.chart.inverted?this.translate(V.point.rectPlotY,!0):V.point.x):(Q=V.chartX||0,et=V.chartY||0,tt=this.translate(Math.atan2(et-K,Q-Z)-this.startAngleRad,!0)),Q=($=this.getPosition(tt)).x,et=$.y):(p(tt)||(Q=V.chartX,et=V.chartY),p(Q)&&p(et)&&(K=J[1]+this.chart.plotTop,tt=this.translate(Math.min(Math.sqrt(Math.pow(Q-Z,2)+Math.pow(et-K,2)),J[2]/2)-J[3]/2,!0))),[tt,Q||0,et||0]}function F(V,Z,K){let J=this.pane.center,tt=this.chart,$=this.left||0,Q=this.top||0,et,it=E(Z,J[2]/2-this.offset),st;return K===void 0&&(K=this.horiz?0:this.center&&-this.center[3]/2),K&&(it+=K),this.isCircular||Z!==void 0?((st=this.chart.renderer.symbols.arc($+J[0],Q+J[1],it,it,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0})).xBounds=[$+J[0]],st.yBounds=[Q+J[1]-it]):(et=this.postTranslate(this.angleRad,it),st=[["M",this.center[0]+tt.plotLeft,this.center[1]+tt.plotTop],["L",et.x,et.y]]),st}function A(){this.constructor.prototype.getOffset.call(this),this.chart.axisOffset[this.side]=0}function D(V,Z,K){let J=this.chart,tt=Tt=>{if(typeof Tt=="string"){let zt=parseInt(Tt,10);return nt.test(Tt)&&(zt=zt*et/100),zt}return Tt},$=this.center,Q=this.startAngleRad,et=$[2]/2,it=Math.min(this.offset,0),st=this.left||0,rt=this.top||0,nt=/%$/,ot=this.isCircular,at,ct,ht,lt,xt,wt,dt=E(tt(K.outerRadius),et),Ct=tt(K.innerRadius),ft=E(tt(K.thickness),10);if(this.options.gridLineInterpolation==="polygon")wt=this.getPlotLinePath({value:V}).concat(this.getPlotLinePath({value:Z,reverse:!0}));else{V=Math.max(V,this.min),Z=Math.min(Z,this.max);let Tt=this.translate(V),zt=this.translate(Z);ot||(dt=Tt||0,Ct=zt||0),K.shape!=="circle"&&ot?(at=Q+(Tt||0),ct=Q+(zt||0)):(at=-Math.PI/2,ct=1.5*Math.PI,xt=!0),dt-=it,ft-=it,wt=J.renderer.symbols.arc(st+$[0],rt+$[1],dt,dt,{start:Math.min(at,ct),end:Math.max(at,ct),innerR:E(Ct,dt-ft),open:xt,borderRadius:K.borderRadius}),ot&&(ht=(ct+at)/2,lt=st+$[0]+$[2]/2*Math.cos(ht),wt.xBounds=ht>-Math.PI/2&&ht-Math.PI&&ht<0||ht>Math.PI?-10:10)}return wt}function C(V){let Z=this.pane.center,K=this.chart,J=K.inverted,tt=V.reverse,$=this.pane.options.background?this.pane.options.background[0]||this.pane.options.background:{},Q=$.innerRadius||"0%",et=$.outerRadius||"100%",it=Z[0]+K.plotLeft,st=Z[1]+K.plotTop,rt=this.height,nt=V.isCrosshair,ot=Z[3]/2,at=V.value,ct,ht,lt,xt,wt,dt,Ct,ft,Tt,zt=this.getPosition(at),pe=zt.x,ee=zt.y;if(nt&&(at=(ft=this.getCrosshairPosition(V,it,st))[0],pe=ft[1],ee=ft[2]),this.isCircular)ht=Math.sqrt(Math.pow(pe-it,2)+Math.pow(ee-st,2)),lt=typeof Q=="string"?S(Q,1):Q/ht,xt=typeof et=="string"?S(et,1):et/ht,Z&&ot&&(lt<(ct=ot/ht)&&(lt=ct),xtrt)&&(at=0),this.options.gridLineInterpolation==="circle")Tt=this.getLinePath(0,at,ot);else if(Tt=[],K[J?"yAxis":"xAxis"].forEach(we=>{we.pane===this.pane&&(wt=we)}),wt){Ct=wt.tickPositions,wt.autoConnect&&(Ct=Ct.concat([Ct[0]])),tt&&(Ct=Ct.slice().reverse()),at&&(at+=ot);for(let we=0;weMath.PI&&(it-=$),st>Math.PI&&(st-=$),this.normalizedStartAngleRad=it,this.normalizedEndAngleRad=st}}function k(V){this.isRadial&&(V.align=void 0,V.preventDefault())}function T(){if(this.chart&&this.chart.labelCollectors){let V=this.labelCollector?this.chart.labelCollectors.indexOf(this.labelCollector):-1;V>=0&&this.chart.labelCollectors.splice(V,1)}}function z(V){let Z,K=this.chart,J=K.angular,tt=K.polar,$=this.isXAxis,Q=this.coll,et=V.userOptions.pane||0,it=this.pane=K.pane&&K.pane[et];if(Q==="colorAxis"){this.isRadial=!1;return}J?(J&&$?(this.isHidden=!0,this.createLabelCollector=_,this.getOffset=c,this.redraw=W,this.render=W,this.setScale=c,this.setCategories=c,this.setTitle=c):y(this),Z=!$):tt&&(y(this),Z=this.horiz),J||tt?(this.isRadial=!0,this.labelCollector||(this.labelCollector=this.createLabelCollector()),this.labelCollector&&K.labelCollectors.push(this.labelCollector)):this.isRadial=!1,it&&Z&&(it.axis=this),this.isCircular=Z}function N(){this.isRadial&&this.beforeSetTickPositions()}function G(V){let Z=this.label;if(!Z)return;let K=this.axis,J=Z.getBBox(),tt=K.options.labels,$=(K.translate(this.pos)+K.startAngleRad+Math.PI/2)/Math.PI*180%360,Q=Math.round($),et=p(tt.y)?0:-(.3*J.height),it=tt.y,st,rt=20,nt=tt.align,ot="end",at=Q<0?Q+360:Q,ct=at,ht=0,lt=0;K.isRadial&&(st=K.getPosition(this.pos,K.center[2]/2+S(E(tt.distance,-25),K.center[2]/2,-K.center[2]/2)),tt.rotation==="auto"?Z.attr({rotation:$}):p(it)||(it=K.chart.renderer.fontMetrics(Z).b-J.height/2),p(nt)||(K.isCircular?(J.width>K.len*K.tickInterval/(K.max-K.min)&&(rt=0),nt=$>rt&&$<180-rt?"left":$>180+rt&&$<360-rt?"right":"center"):nt="center",Z.attr({align:nt})),nt==="auto"&&K.tickPositions.length===2&&K.isCircular&&(at>90&&at<180?at=180-at:at>270&&at<=360&&(at=540-at),ct>180&&ct<=360&&(ct=360-ct),(K.pane.options.startAngle===Q||K.pane.options.startAngle===Q+360||K.pane.options.startAngle===Q-360)&&(ot="start"),nt=Q>=-90&&Q<=90||Q>=-360&&Q<=-270||Q>=270&&Q<=360?ot==="start"?"right":"left":ot==="start"?"left":"right",ct>70&&ct<110&&(nt="center"),at<15||at>=180&&at<195?ht=.3*J.height:at>=15&&at<=35?ht=ot==="start"?0:.75*J.height:at>=195&&at<=215?ht=ot==="start"?.75*J.height:0:at>35&&at<=90?ht=ot==="start"?-(.25*J.height):J.height:at>215&&at<=270&&(ht=ot==="start"?J.height:-(.25*J.height)),ct<15?lt=ot==="start"?-(.15*J.height):.15*J.height:ct>165&&ct<=180&&(lt=ot==="start"?.15*J.height:-(.15*J.height)),Z.attr({align:nt}),Z.translate(lt,ht+et)),V.pos.x=st.x+(tt.x||0),V.pos.y=st.y+(it||0))}function X(V){this.axis.getPosition&&b(V.pos,this.axis.getPosition(this.pos))}function j({options:V}){V.xAxis&&m(!0,R.radialDefaultOptions.circular,V.xAxis),V.yAxis&&m(!0,R.radialDefaultOptions.radialGauge,V.yAxis)}function B(V,Z){let K=this.chart,J=this.center;return V=this.startAngleRad+V,{x:K.plotLeft+J[0]+Math.cos(V)*Z,y:K.plotTop+J[1]+Math.sin(V)*Z}}function W(){this.isDirty=!1}function Y(){let V,Z;this.constructor.prototype.setAxisSize.call(this),this.isRadial&&(this.pane.updateCenter(this),V=this.center=this.pane.center.slice(),this.isCircular?this.sector=this.endAngleRad-this.startAngleRad:(Z=this.postTranslate(this.angleRad,V[3]/2),V[0]=Z.x-this.chart.plotLeft,V[1]=Z.y-this.chart.plotTop),this.len=this.width=this.height=(V[2]-V[3])*E(this.sector,1)/2)}function U(){this.constructor.prototype.setAxisTranslation.call(this),this.center&&(this.isCircular?this.transA=(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.transA=(this.center[2]-this.center[3])/2/(this.max-this.min||1),this.isXAxis?this.minPixelPadding=this.transA*this.minPointOffset:this.minPixelPadding=0)}function q(V){let{coll:Z}=this,{angular:K,inverted:J,polar:tt}=this.chart,$={};K?this.isXAxis||($=m(a.yAxis,R.radialDefaultOptions.radialGauge)):tt&&($=this.horiz?m(a.xAxis,R.radialDefaultOptions.circular):m(Z==="xAxis"?a.xAxis:a.yAxis,R.radialDefaultOptions.radial)),J&&Z==="yAxis"&&($.stackLabels=x(a.yAxis,!0)?a.yAxis.stackLabels:{},$.reversedStacks=!0);let Q=this.options=m($,V);Q.plotBands||(Q.plotBands=[]),v(this,"afterSetOptions")}function H(V,Z,K,J,tt,$,Q){let et,it=this.axis;return it.isRadial?["M",Z,K,"L",(et=it.getPosition(this.pos,it.center[2]/2+J)).x,et.y]:V.call(this,Z,K,J,tt,$,Q)}R.radialDefaultOptions=m(e),R.compose=function(V,Z){return L(h,"Axis.Radial")&&(g(V,"afterInit",M),g(V,"autoLabelAlign",k),g(V,"destroy",T),g(V,"init",z),g(V,"initialAxisTranslation",N),g(Z,"afterGetLabelPosition",G),g(Z,"afterGetPosition",X),g(r,"setOptions",j),w(Z.prototype,"getMarkPath",H)),V}}(l||(l={})),l}),s(t,"Series/PolarComposition.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Extensions/Pane/Pane.js"],t["Core/Axis/RadialAxis.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{animObject:h}=e,{composed:c}=i,{addEvent:g,defined:u,find:p,isNumber:b,merge:v,pick:x,pushUnique:m,relativeLength:E,splat:L,uniqueKey:S,wrap:w}=a;function R(){(this.pane||[]).forEach(j=>{j.render()})}function O(j){let B=j.args[0].xAxis,W=j.args[0].yAxis,Y=j.args[0].chart;B&&W&&(W.gridLineInterpolation==="polygon"?(B.startOnTick=!0,B.endOnTick=!0):B.gridLineInterpolation==="polygon"&&Y.inverted&&(W.startOnTick=!0,W.endOnTick=!0))}function I(){this.pane||(this.pane=[]),this.options.pane=L(this.options.pane),this.options.pane.forEach(j=>{new n(j,this)},this)}function _(j){let B=j.args.marker,W=this.chart.xAxis[0],Y=this.chart.yAxis[0],U=this.chart.inverted,q=U?Y:W,H=U?W:Y;if(this.chart.polar){j.preventDefault();let V=(B.attr?B.attr("start"):B.start)-q.startAngleRad,Z=B.attr?B.attr("r"):B.r,K=(B.attr?B.attr("end"):B.end)-q.startAngleRad,J=B.attr?B.attr("innerR"):B.innerR;j.result.x=V+q.pos,j.result.width=K-V,j.result.y=H.len+H.pos-Z,j.result.height=Z-J}}function P(j){let B=this.chart;if(B.polar&&B.hoverPane&&B.hoverPane.axis){j.preventDefault();let W=B.hoverPane.center,Y=B.mouseDownX||0,U=B.mouseDownY||0,q=j.args.chartY,H=j.args.chartX,V=2*Math.PI,Z=B.hoverPane.axis.startAngleRad,K=B.hoverPane.axis.endAngleRad,J=B.inverted?B.xAxis[0]:B.yAxis[0],tt={},$="arc";if(tt.x=W[0]+B.plotLeft,tt.y=W[1]+B.plotTop,this.zoomHor){let Q=Z>0?K-Z:Math.abs(Z)+Math.abs(K),et=Math.atan2(U-B.plotTop-W[1],Y-B.plotLeft-W[0])-Z,it=Math.atan2(q-B.plotTop-W[1],H-B.plotLeft-W[0])-Z;tt.r=W[2]/2,tt.innerR=W[3]/2,et<=0&&(et+=V),it<=0&&(it+=V),itK+(V-Q)/2&&(it=et,et=Z<=0?Z:0);let st=tt.start=Math.max(et+Z,Z),rt=tt.end=Math.min(it+Z,K);if(J.options.gridLineInterpolation==="polygon"){let nt=B.hoverPane.axis,ot=st-nt.startAngleRad+nt.pos,at=J.getPlotLinePath({value:J.max}),ct=nt.toValue(ot),ht=nt.toValue(ot+(rt-st));if(ctW[2]/2&&(it=W[2]/2),etj.max?(Y[U].isNull=!0,Y[U].plotY=NaN):Y[U].isNull=Y[U].isValid&&!Y[U].isValid());this.hasClipCircleSetter||(this.hasClipCircleSetter=!!this.eventsToUnbind.push(g(this,"afterRender",function(){let q;W.polar&&this.options.clip!==!1&&(q=this.yAxis.pane.center,this.clipCircle?this.clipCircle.animate({x:q[0],y:q[1],r:q[2]/2,innerR:q[3]/2}):this.clipCircle=function(H,V,Z,K,J){let tt=S(),$=H.createElement("clipPath").attr({id:tt}).add(H.defs),Q=J?H.arc(V,Z,K,J,0,2*Math.PI).add($):H.circle(V,Z,K).add($);return Q.id=tt,Q.clipPath=$,Q}(W.renderer,q[0],q[1],q[2]/2,q[3]/2),this.group.clip(this.clipCircle),this.setClip=i.noop)})))}}function D(j){let B=this.chart,W=this.xAxis,Y=this.yAxis,U=W.pane&&W.pane.center,q=j.chartX-(U&&U[0]||0)-B.plotLeft,H=j.chartY-(U&&U[1]||0)-B.plotTop,V=B.inverted?{clientX:j.chartX-Y.pos,plotY:j.chartY-W.pos}:{clientX:180+-180/Math.PI*Math.atan2(q,H)};return this.searchKDTree(V)}function C(j,B,W,Y){let U=Y.tickInterval,q=Y.tickPositions,H=p(q,Z=>Z>=W),V=p([...q].reverse(),Z=>Z<=B);return u(H)||(H=q[q.length-1]),u(V)||(V=q[0],H+=U,j[0][0]="L",j.unshift(j[j.length-3])),(j=j.slice(q.indexOf(V),q.indexOf(H)+1))[0][0]="M",j}function d(j,B){return p(this.pane||[],W=>W.options.id===B)||j.call(this,B)}function f(j,B,W,Y,U,q){let H,V,Z,K=this.chart,J=x(Y.inside,!!this.options.stacking);if(K.polar){if(H=B.rectPlotX/Math.PI*180,K.inverted)this.forceDL=K.isInsidePlot(B.plotX,B.plotY),J&&B.shapeArgs?(V=B.shapeArgs,U=v(U,{x:(Z=this.yAxis.postTranslate(((V.start||0)+(V.end||0))/2-this.xAxis.startAngleRad,B.barX+B.pointWidth/2)).x-K.plotLeft,y:Z.y-K.plotTop})):B.tooltipPos&&(U=v(U,{x:B.tooltipPos[0],y:B.tooltipPos[1]})),Y.align=x(Y.align,"center"),Y.verticalAlign=x(Y.verticalAlign,"middle");else{var tt;let $,Q;(tt=Y).align===null&&($=H>20&&H<160?"left":H>200&&H<340?"right":"center",tt.align=$),tt.verticalAlign===null&&(Q=H<45||H>315?"bottom":H>135&&H<225?"top":"middle",tt.verticalAlign=Q),Y=tt}r.prototype.alignDataLabel.call(this,B,W,Y,U,q),this.isRadialBar&&B.shapeArgs&&B.shapeArgs.start===B.shapeArgs.end?W.hide():W.show()}else j.call(this,B,W,Y,U,q)}function y(){let j=this.options,B=j.stacking,W=this.chart,Y=this.xAxis,U=this.yAxis,q=U.reversed,H=U.center,V=Y.startAngleRad,Z=Y.endAngleRad-V,K=j.threshold,J=0,tt,$,Q,et,it,st=0,rt=0,nt,ot,at,ct,ht,lt,xt,wt;if(Y.isRadial)for(Q=(tt=this.points).length,et=U.translate(U.min),it=U.translate(U.max),K=j.threshold||0,W.inverted&&b(K)&&u(J=U.translate(K))&&(J<0?J=0:J>Z&&(J=Z),this.translatedThreshold=J+V);Q--;){if(lt=($=tt[Q]).barX,ot=$.x,at=$.y,$.shapeType="arc",W.inverted){$.plotY=U.translate(at),B&&U.stacking?(ht=U.stacking.stacks[(at<0?"-":"")+this.stackKey],this.visible&&ht&&ht[ot]&&!$.isNull&&(ct=ht[ot].points[this.getStackIndicator(void 0,ot,this.index).key],st=U.translate(ct[0]),rt=U.translate(ct[1]),u(st)&&(st=a.clamp(st,0,Z)))):(st=J,rt=$.plotY),st>rt&&(rt=[st,st=rt][0]),q?rt>et?rt=et:stet||rtit?rt=it:(rtit)&&(st=rt=0),U.min>U.max&&(st=rt=q?Z:0),st+=V,rt+=V,H&&($.barX=lt+=H[3]/2),xt=Math.max(lt,0),wt=Math.max(lt+$.pointWidth,0);let dt=j.borderRadius,Ct=E((typeof dt=="object"?dt.radius:dt)||0,wt-xt);$.shapeArgs={x:H[0],y:H[1],r:wt,innerR:xt,start:st,end:rt,borderRadius:Ct},$.opacity=st===rt?0:void 0,$.plotY=(u(this.translatedThreshold)&&(stH[1])}}function M(j,B){let W,Y,U=this;if(this.chart.polar){B=B||this.points;for(let H=0;H{H.polarPlotY===void 0&&U.polar.toXY(H)})}let q=j.apply(this,[].slice.call(arguments,1));return Y&&B.pop(),q}function k(j,B){let W=this.chart,Y={xAxis:[],yAxis:[]};return W.polar?W.axes.forEach(U=>{if(U.coll==="colorAxis")return;let q=U.isXAxis,H=U.center,V=B.chartX-H[0]-W.plotLeft,Z=B.chartY-H[1]-W.plotTop;Y[q?"xAxis":"yAxis"].push({axis:U,value:U.translate(q?Math.PI-Math.atan2(V,Z):Math.sqrt(Math.pow(V,2)+Math.pow(Z,2)),!0)})}):Y=j.call(this,B),Y}function T(j,B){this.chart.polar||j.call(this,B)}function z(j,B){let W=this,Y=this.chart,U=this.group,q=this.markerGroup,H=this.xAxis&&this.xAxis.center,V=Y.plotLeft,Z=Y.plotTop,K=this.options.animation,J,tt,$,Q,et,it;Y.polar?W.isRadialBar?B||(W.startAngleRad=x(W.translatedThreshold,W.xAxis.startAngleRad),i.seriesTypes.pie.prototype.animate.call(W,B)):(K=h(K),W.is("column")?B||(tt=H[3]/2,W.points.forEach(st=>{$=st.graphic,et=(Q=st.shapeArgs)&&Q.r,it=Q&&Q.innerR,$&&Q&&($.attr({r:tt,innerR:tt}),$.animate({r:et,innerR:it},W.options.animation))})):B?(J={translateX:H[0]+V,translateY:H[1]+Z,scaleX:.001,scaleY:.001},U.attr(J),q&&q.attr(J)):(J={translateX:V,translateY:Z,scaleX:1,scaleY:1},U.animate(J,K),q&&q.animate(J,K))):j.call(this,B)}function N(j,B,W,Y){let U,q;if(this.chart.polar)if(Y){let H=(q=function Z(K,J,tt,$){let Q,et,it,st,rt,nt,ot=$?1:0,at=(Q=J>=0&&J<=K.length-1?J:J<0?K.length-1+J:0)-1<0?K.length-(1+ot):Q-1,ct=Q+1>K.length-1?ot:Q+1,ht=K[at],lt=K[ct],xt=ht.plotX,wt=ht.plotY,dt=lt.plotX,Ct=lt.plotY,ft=K[Q].plotX,Tt=K[Q].plotY;et=(1.5*ft+xt)/2.5,it=(1.5*Tt+wt)/2.5,st=(1.5*ft+dt)/2.5,rt=(1.5*Tt+Ct)/2.5;let zt=Math.sqrt(Math.pow(et-ft,2)+Math.pow(it-Tt,2)),pe=Math.sqrt(Math.pow(st-ft,2)+Math.pow(rt-Tt,2)),ee=Math.atan2(it-Tt,et-ft);nt=Math.PI/2+(ee+Math.atan2(rt-Tt,st-ft))/2,Math.abs(ee-nt)>Math.PI/2&&(nt-=Math.PI),et=ft+Math.cos(nt)*zt,it=Tt+Math.sin(nt)*zt;let we={rightContX:st=ft+Math.cos(Math.PI+nt)*pe,rightContY:rt=Tt+Math.sin(Math.PI+nt)*pe,leftContX:et,leftContY:it,plotX:ft,plotY:Tt};return tt&&(we.prevPointCont=Z(K,at,!1,$)),we}(B,Y,!0,this.connectEnds)).prevPointCont&&q.prevPointCont.rightContX,V=q.prevPointCont&&q.prevPointCont.rightContY;U=["C",b(H)?H:q.plotX,b(V)?V:q.plotY,b(q.leftContX)?q.leftContX:q.plotX,b(q.leftContY)?q.leftContY:q.plotY,q.plotX,q.plotY]}else U=["M",W.plotX,W.plotY];else U=j.call(this,B,W,Y);return U}function G(j,B,W=this.plotY){if(!this.destroyed){let{plotX:Y,series:U}=this,{chart:q}=U;return q.polar&&b(Y)&&b(W)?[Y+(B?q.plotLeft:0),W+(B?q.plotTop:0)]:j.call(this,B,W)}}class X{static compose(B,W,Y,U,q,H,V,Z,K,J){if(n.compose(W,Y),l.compose(B,q),m(c,"Polar")){let tt=W.prototype,$=H.prototype,Q=Y.prototype,et=U.prototype;if(g(W,"afterDrawChartBox",R),g(W,"getAxes",I),g(W,"init",O),w(tt,"get",d),w(Q,"getCoordinates",k),w(Q,"pinch",T),g(Y,"getSelectionMarkerAttrs",P),g(Y,"getSelectionBox",_),g(U,"afterInit",F),g(U,"afterTranslate",A,{order:2}),g(U,"afterColumnTranslate",y,{order:4}),w(et,"animate",z),w($,"pos",G),Z){let it=Z.prototype;w(it,"alignDataLabel",f),w(it,"animate",z)}if(K&&w(K.prototype,"getGraphPath",M),J){let it=J.prototype;w(it,"getPointSpline",N),V&&(V.prototype.getPointSpline=it.getPointSpline)}}}constructor(B){this.series=B}arc(B,W,Y,U){let q=this.series,H=q.xAxis.center,V=q.yAxis.len,Z=H[3]/2,K=V-W+Z,J=V-x(B,V)+Z;return q.yAxis.reversed&&(K<0&&(K=Z),J<0&&(J=Z)),{x:H[0],y:H[1],r:K,innerR:J,start:Y,end:U}}toXY(B){let W=this.series,Y=W.chart,U=W.xAxis,q=W.yAxis,H=B.plotX,V=Y.inverted,Z=B.y,K=B.plotY,J=V?H:q.len-K,tt;if(V&&W&&!W.isRadialBar&&(B.plotY=K=b(Z)?q.translate(Z):0),B.rectPlotX=H,B.rectPlotY=K,q.center&&(J+=q.center[3]/2),b(K)){let $=V?q.postTranslate(K,J):U.postTranslate(H,J);B.plotX=B.polarPlotX=$.x-Y.plotLeft,B.plotY=B.polarPlotY=$.y-Y.plotTop}W.kdByAngle?((tt=(H/Math.PI*180+U.pane.options.startAngle)%360)<0&&(tt+=360),B.clientX=tt):B.clientX=B.plotX}}return X}),s(t,"Core/Axis/WaterfallAxis.js",[t["Core/Globals.js"],t["Core/Axis/Stacking/StackItem.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{composed:l}=e,{addEvent:a,objectEach:h,pushUnique:c}=r;return function(g){function u(){let m=this.waterfall.stacks;m&&(m.changed=!1,delete m.alreadyChanged)}function p(){let m=this.options.stackLabels;m&&m.enabled&&this.waterfall.stacks&&this.waterfall.renderStackTotals()}function b(){this.waterfall||(this.waterfall=new x(this))}function v(){let m=this.axes;for(let E of this.series)if(E.options.stacking){for(let L of m)L.isXAxis||(L.waterfall.stacks.changed=!0);break}}g.compose=function(m,E){c(l,"Axis.Waterfall")&&(a(m,"init",b),a(m,"afterBuildStacks",u),a(m,"afterRender",p),a(E,"beforeRedraw",v))};class x{constructor(E){this.axis=E,this.stacks={changed:!1}}renderStackTotals(){let E=this.axis,L=E.waterfall.stacks,S=E.stacking&&E.stacking.stackTotalGroup,w=new i(E,E.options.stackLabels||{},!1,0,void 0);this.dummyStackItem=w,S&&h(L,R=>{h(R,(O,I)=>{w.total=O.stackTotal,w.x=+I,O.label&&(w.label=O.label),i.prototype.render.call(w,S),O.label=w.label,delete w.label})}),w.total=null}}g.Composition=x}(n||(n={})),n}),s(t,"Series/Waterfall/WaterfallPoint.js",[t["Series/Column/ColumnSeries.js"],t["Core/Series/Point.js"],t["Core/Utilities.js"]],function(e,i,r){let{isNumber:n}=r;class l extends e.prototype.pointClass{getClassName(){let h=i.prototype.getClassName.call(this);return this.isSum?h+=" highcharts-sum":this.isIntermediateSum&&(h+=" highcharts-intermediate-sum"),h}isValid(){return n(this.y)||this.isSum||!!this.isIntermediateSum}}return l}),s(t,"Series/Waterfall/WaterfallSeriesDefaults.js",[],function(){return{dataLabels:{inside:!0},lineWidth:1,lineColor:"#333333",dashStyle:"Dot",borderColor:"#333333",states:{hover:{lineWidthPlus:0}}}}),s(t,"Series/Waterfall/WaterfallSeries.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"],t["Core/Axis/WaterfallAxis.js"],t["Series/Waterfall/WaterfallPoint.js"],t["Series/Waterfall/WaterfallSeriesDefaults.js"]],function(e,i,r,n,l){let{column:a,line:h}=e.seriesTypes,{addEvent:c,arrayMax:g,arrayMin:u,correctFloat:p,crisp:b,extend:v,isNumber:x,merge:m,objectEach:E,pick:L}=i;function S(R,O){return Object.hasOwnProperty.call(R,O)}class w extends a{generatePoints(){a.prototype.generatePoints.apply(this);for(let O=0,I=this.points.length;O0?_:void 0);let P=a.prototype.pointAttribs.call(this,O,I);return delete P.dashstyle,P}getGraphPath(){return[["M",0,0]]}getCrispPath(){let O=this.data.filter(d=>x(d.y)),I=this.yAxis,_=O.length,P=this.graph?.strokeWidth()||0,F=this.xAxis.reversed,A=this.yAxis.reversed,D=this.options.stacking,C=[];for(let d=1;d<_;d++){if(!(this.options.connectNulls||x(this.data[O[d].index-1].y)))continue;let f=O[d].box,y=O[d-1],M=y.y||0,k=O[d-1].box;if(!f||!k)continue;let T=I.waterfall.stacks[this.stackKey],z=M>0?-k.height:0;if(T&&k&&f){let N,G=T[d-1];if(D){let X=G.connectorThreshold;N=b(I.translate(X,!1,!0,!1,!0)+(A?z:0),P)}else N=b(k.y+(y.minPointLengthOffset||0),P);C.push(["M",(k.x||0)+(F?0:k.width||0),N],["L",(f.x||0)+(F&&f.width||0),N])}if(k&&C.length&&(!D&&M<0&&!A||M>0&&A)){let N=C[C.length-2];N&&typeof N[2]=="number"&&(N[2]+=k.height||0);let G=C[C.length-1];G&&typeof G[2]=="number"&&(G[2]+=k.height||0)}}return C}drawGraph(){h.prototype.drawGraph.call(this),this.graph&&this.graph.attr({d:this.getCrispPath()})}setStackedPoints(O){let I=this.options,_=O.waterfall?.stacks,P=I.threshold||0,F=this.stackKey,A=this.xData,D=A.length,C=P,d=C,f,y=0,M=0,k=0,T,z,N,G,X,j,B,W,Y=(U,q,H,V)=>{if(f){if(T)for(;HB.indexOf(F)&&(W=!0),_[F]||(_[F]={});let U=_[F];if(U)for(let q=0;q=0?f.posTotal+=X:f.negTotal+=X,G=I.data[q],z=f.absolutePos=f.posTotal,N=f.absoluteNeg=f.negTotal,f.stackTotal=z+N,T=f.stackState.length,G&&G.isIntermediateSum?(Y(k,M,0,k),k=M,M=P,C^=d,d^=C,C^=d):G&&G.isSum?(Y(P,y,T,0),C=P):(Y(C,X,0,y),G&&(y+=X,M+=X)),f.stateIndex++,f.threshold=C,C+=f.stackTotal;_.changed=!1,_.alreadyChanged||(_.alreadyChanged=[]),_.alreadyChanged.push(F)}}getExtremes(){let O,I,_,P=this.options.stacking;return P?(O=this.yAxis.waterfall.stacks,I=this.stackedYNeg=[],_=this.stackedYPos=[],P==="overlap"?E(O[this.stackKey],function(F){I.push(u(F.stackState)),_.push(g(F.stackState))}):E(O[this.stackKey],function(F){I.push(F.negTotal+F.threshold),_.push(F.posTotal+F.threshold)}),{dataMin:u(I),dataMax:g(_)}):{dataMin:this.dataMin,dataMax:this.dataMax}}}return w.defaultOptions=m(a.defaultOptions,l),w.compose=r.compose,v(w.prototype,{pointValKey:"y",showLine:!0,pointClass:n}),c(w,"afterColumnTranslate",function(){let{options:R,points:O,yAxis:I}=this,_=L(R.minPointLength,5),P=_/2,F=R.threshold||0,A=R.stacking,D=I.waterfall.stacks[this.stackKey],C=F,d=F,f,y,M,k;for(let T=0;T=0?y:y-j,S(Y,"absolutePos")&&delete Y.absolutePos,S(Y,"absoluteNeg")&&delete Y.absoluteNeg):(j>=0?(y=Y.threshold+Y.posTotal,Y.posTotal-=j,f=y):(y=Y.threshold+Y.negTotal,Y.negTotal-=j,f=y-j),!Y.posTotal&&x(Y.absolutePos)&&S(Y,"absolutePos")&&(Y.posTotal=Y.absolutePos,delete Y.absolutePos),!Y.negTotal&&x(Y.absoluteNeg)&&S(Y,"absoluteNeg")&&(Y.negTotal=Y.absoluteNeg,delete Y.absoluteNeg)),z.isSum||(Y.connectorThreshold=Y.threshold+Y.stackTotal),I.reversed?(M=j>=0?f-j:f+j,k=f):(M=f,k=f-j),z.below=M<=F,G.y=I.translate(M,!1,!0,!1,!0),G.height=Math.abs(G.y-I.translate(k,!1,!0,!1,!0));let U=I.waterfall.dummyStackItem;U&&(U.x=T,U.label=D[T].label,U.setOffset(this.pointXOffset||0,this.barW||0,this.stackedYNeg[T],this.stackedYPos[T],void 0,this.xAxis))}}else f=Math.max(d,d+j)+X[0],G.y=I.translate(f,!1,!0,!1,!0),z.isSum?(G.y=I.translate(X[1],!1,!0,!1,!0),G.height=Math.min(I.translate(X[0],!1,!0,!1,!0),I.len)-G.y,z.below=X[1]<=F):z.isIntermediateSum?(j>=0?(M=X[1]+C,k=C):(M=C,k=X[1]+C),I.reversed&&(M^=k,k^=M,M^=k),G.y=I.translate(M,!1,!0,!1,!0),G.height=Math.abs(G.y-Math.min(I.translate(k,!1,!0,!1,!0),I.len)),C+=X[1],z.below=M<=F):(G.height=N>0?I.translate(d,!1,!0,!1,!0)-G.y:I.translate(d,!1,!0,!1,!0)-I.translate(d-N,!1,!0,!1,!0),d+=N,z.below=d{"use strict";(function(o){typeof Gn=="object"&&Gn.exports?(o.default=o,Gn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/treemap",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Extensions/Breadcrumbs/BreadcrumbsDefaults.js",[],function(){return{lang:{mainBreadcrumb:"Main"},options:{buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},buttonSpacing:5,floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"#666666",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7}}}),s(t,"Extensions/Breadcrumbs/Breadcrumbs.js",[t["Extensions/Breadcrumbs/BreadcrumbsDefaults.js"],t["Core/Templating.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{format:l}=i,{composed:a}=r,{addEvent:h,defined:c,extend:g,fireEvent:u,isString:p,merge:b,objectEach:v,pick:x,pushUnique:m}=n;function E(){if(this.breadcrumbs){let I=this.resetZoomButton&&this.resetZoomButton.getBBox(),_=this.breadcrumbs.options;I&&_.position.align==="right"&&_.relativeTo==="plotBox"&&this.breadcrumbs.alignBreadcrumbsGroup(-I.width-_.buttonSpacing)}}function L(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function S(){let I=this.breadcrumbs;if(I&&!I.options.floating&&I.level){let _=I.options,P=_.buttonTheme,F=(P.height||0)+2*(P.padding||0)+_.buttonSpacing,A=_.position.verticalAlign;A==="bottom"?(this.marginBottom=(this.marginBottom||0)+F,I.yOffset=F):A!=="middle"?(this.plotTop+=F,I.yOffset=-F):I.yOffset=void 0}}function w(){this.breadcrumbs&&this.breadcrumbs.redraw()}function R(I){I.resetSelection===!0&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class O{static compose(_,P){m(a,"Breadcrumbs")&&(h(_,"destroy",L),h(_,"afterShowResetZoom",E),h(_,"getMargins",S),h(_,"redraw",w),h(_,"selection",R),g(P.lang,e.lang))}constructor(_,P){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let F=b(_.options.drilldown&&_.options.drilldown.drillUpButton,O.defaultOptions,_.options.navigation&&_.options.navigation.breadcrumbs,P);this.chart=_,this.options=F||{}}updateProperties(_){this.setList(_),this.setLevel(),this.isDirty=!0}setList(_){this.list=_}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(_){let P=this.chart,F=this.options,A=P.options.lang,D=x(F.format,F.showFullPath?"{level.name}":"\u2190 {level.name}"),C=A&&x(A.drillUpText,A.mainBreadcrumb),d=F.formatter&&F.formatter(_)||l(D,{level:_.levelOptions},P)||"";return(p(d)&&!d.length||d==="\u2190 ")&&c(C)&&(d=F.showFullPath?C:"\u2190 "+C),d}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let _=this.chart,P=this.options;!this.group&&P&&(this.group=_.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:P.zIndex}).add()),P.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let _=this.chart,P=this.list,F=this.options.buttonSpacing;this.destroyListElements();let A=this.group?this.group.getBBox().width:F,D=P[P.length-2];!_.drillUpButton&&this.level>0?_.drillUpButton=this.renderButton(D,A,F):_.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(_){if(this.group){let P=this.options,F=P.buttonTheme,A=P.position,D=P.relativeTo==="chart"||P.relativeTo==="spacingBox"?void 0:"plotBox",C=this.group.getBBox(),d=2*(F.padding||0)+P.buttonSpacing;A.width=C.width+d,A.height=C.height+d;let f=b(A);_&&(f.x+=_),this.options.rtl&&(f.x+=A.width),f.y=x(f.y,this.yOffset,0),this.group.align(f,!0,D)}}renderButton(_,P,F){let A=this,D=this.chart,C=A.options,d=b(C.buttonTheme),f=D.renderer.button(A.getButtonText(_),P,F,function(y){let M,k=C.events&&C.events.click;k&&(M=k.call(A,y,_)),M!==!1&&(C.showFullPath?y.newLevel=_.level:y.newLevel=A.level-1,u(A,"up",y))},d).addClass("highcharts-breadcrumbs-button").add(A.group);return D.styledMode||f.attr(C.style),f}renderSeparator(_,P){let F=this.chart,A=this.options.separator,D=F.renderer.label(A.text,_,P,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return F.styledMode||D.css(A.style),D}update(_){b(!0,this.options,_),this.destroy(),this.isDirty=!0}updateSingleButton(){let _=this.chart,P=this.list[this.level-1];_.drillUpButton&&_.drillUpButton.attr({text:this.getButtonText(P)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(_){let P=this.elementList;v(P,(F,A)=>{(_||!P[A].updated)&&((F=P[A]).button&&F.button.destroy(),F.separator&&F.separator.destroy(),delete F.button,delete F.separator,delete P[A])}),_&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){v(this.elementList,_=>{_.updated=!1})}updateListElements(){let _=this.elementList,P=this.options.buttonSpacing,F=this.list,A=this.options.rtl,D=A?-1:1,C=function(k,T){return D*k.getBBox().width+D*T},d=function(k,T,z){k.translate(T-k.getBBox().width,z)},f=this.group?C(this.group,P):P,y,M;for(let k=0,T=F.length;k{e.graphic=c=c&&c.destroy(),typeof n=="function"&&n()};Object.keys(r).length?c.animate(r,void 0,()=>g()):g()}}}}),s(t,"Series/Treemap/TreemapPoint.js",[t["Series/DrawPointUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{pie:{prototype:{pointClass:n}},scatter:{prototype:{pointClass:l}}}=i.seriesTypes,{extend:a,isNumber:h,pick:c}=r;class g extends l{constructor(){super(...arguments),this.shapeType="rect"}draw(p){e.draw(this,p)}getClassName(){let p=this.series,b=p.options,v=super.getClassName();return this.node.level<=p.nodeMap[p.rootNode].level?v+=" highcharts-above-level":this.node.isLeaf||c(b.interactByLeaf,!b.allowTraversingTree)?this.node.isLeaf||(v+=" highcharts-internal-node"):v+=" highcharts-internal-node-interactive",v}isValid(){return!!(this.id||h(this.value))}setState(p){super.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:p==="hover"?1:0})}shouldDraw(){return h(this.plotY)&&this.y!==null}}return a(g.prototype,{setVisible:n.prototype.setVisible}),g}),s(t,"Series/Treemap/TreemapSeriesDefaults.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{isString:r}=i;return{allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){let n=this&&this.point?this.point:{};return r(n.name)?n.name:""},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"{point.name}: {point.value}
"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:e.seriesTypes.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle"}}),s(t,"Series/Treemap/TreemapUtilities.js",[],function(){var e;return(e||(e={})).recursive=function i(r,n,l){let a=n.call(l||this,r);a!==!1&&i(a,n,l)},e}),s(t,"Series/TreeUtilities.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){let{extend:r,isArray:n,isNumber:l,isObject:a,merge:h,pick:c,relativeLength:g}=i;return{getColor:function(u,p){let b,v,x,m,E,L,S=p.index,w=p.mapOptionsToLevel,R=p.parentColor,O=p.parentColorIndex,I=p.series,_=p.colors,P=p.siblings,F=I.points,A=I.chart.options.chart;return u&&(b=F[u.i],v=w[u.level]||{},b&&v.colorByPoint&&(m=b.index%(_?_.length:A.colorCount),x=_&&_[m]),I.chart.styledMode||(E=c(b&&b.options.color,v&&v.color,x,R&&(D=>{let C=v&&v.colorVariation;return C&&C.key==="brightness"&&S&&P?e.parse(D).brighten(C.to*(S/P)).get():D})(R),I.color)),L=c(b&&b.options.colorIndex,v&&v.colorIndex,m,O,p.colorIndex)),{color:E,colorIndex:L}},getLevelOptions:function(u){let p,b,v,x,m,E,L={};if(a(u))for(x=l(u.from)?u.from:1,E=u.levels,b={},p=a(u.defaults)?u.defaults:{},n(E)&&(b=E.reduce((S,w)=>{let R,O,I;return a(w)&&l(w.level)&&(O=c((I=h({},w)).levelIsConstant,p.levelIsConstant),delete I.levelIsConstant,delete I.level,a(S[R=w.level+(O?0:x-1)])?h(!0,S[R],I):S[R]=I),S},{})),m=l(u.to)?u.to:1,v=0;v<=m;v++)L[v]=h({},p,a(b[v])?b[v]:{});return L},getNodeWidth:function(u,p){let{chart:b,options:v}=u,{nodeDistance:x=0,nodeWidth:m=0}=v,{plotSizeX:E=1}=b;if(m==="auto"){if(typeof x=="string"&&/%$/.test(x))return E/(p+parseFloat(x)/100*(p-1));let L=Number(x);return(E+L)/(p||1)-L}return g(m,E)},setTreeValues:function u(p,b){let v=b.before,x=b.idRoot,m=b.mapIdToNode[x],E=b.levelIsConstant!==!1,L=b.points[p.i],S=L&&L.options||{},w=[],R=0;p.levelDynamic=p.level-(E?0:m.level),p.name=c(L&&L.name,""),p.visible=x===p.id||b.visible===!0,typeof v=="function"&&(p=v(p,b)),p.children.forEach((I,_)=>{let P=r({},b);r(P,{index:_,siblings:p.children.length,visible:p.visible}),I=u(I,P),w.push(I),I.visible&&(R+=I.val)});let O=c(S.value,R);return p.visible=O>=0&&(R>0||p.visible),p.children=w,p.childrenTotal=R,p.isLeaf=p.visible&&!R,p.val=O,p},updateRootId:function(u){let p,b;return a(u)&&(b=a(u.options)?u.options:{},p=c(u.rootNode,b.rootId,""),a(u.userOptions)&&(u.userOptions.rootId=p),u.rootNode=p),p}}}),s(t,"Series/Treemap/TreemapSeries.js",[t["Extensions/Breadcrumbs/Breadcrumbs.js"],t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Core/Globals.js"],t["Core/Series/SeriesRegistry.js"],t["Series/Treemap/TreemapAlgorithmGroup.js"],t["Series/Treemap/TreemapNode.js"],t["Series/Treemap/TreemapPoint.js"],t["Series/Treemap/TreemapSeriesDefaults.js"],t["Series/Treemap/TreemapUtilities.js"],t["Series/TreeUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u,p,b){let{parse:v}=i,{composed:x,noop:m}=n,{column:E,scatter:L}=l.seriesTypes,{getColor:S,getLevelOptions:w,updateRootId:R}=p,{addEvent:O,correctFloat:I,crisp:_,defined:P,error:F,extend:A,fireEvent:D,isArray:C,isObject:d,isString:f,merge:y,pick:M,pushUnique:k,stableSort:T}=b,z=!1;function N(){let X,j=this.xAxis,B=this.yAxis;j&&B&&(this.is("treemap")?(X={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,minPadding:0,max:100,maxPadding:0,startOnTick:!1,title:void 0,tickPositions:[]},A(B.options,X),A(j.options,X),z=!0):z&&(B.setOptions(B.userOptions),j.setOptions(j.userOptions),z=!1))}class G extends L{static compose(j){k(x,"TreemapSeries")&&O(j,"afterBindAxes",N)}algorithmCalcPoints(j,B,W,Y){let U=W.plot,q=W.elArr.length-1,H,V,Z,K,J=W.lW,tt=W.lH,$,Q=0;for(let et of(B?(J=W.nW,tt=W.nH):$=W.elArr[q],W.elArr))(B||QV.lP.lR&&this.algorithmCalcPoints(j,!1,V,Y,U),K===H&&this.algorithmCalcPoints(j,!0,V,Y,U),++K;return Y}alignDataLabel(j,B,W){let Y=W.style;Y&&!P(Y.textOverflow)&&B.text&&B.getBBox().width>(B.text.textWidth||0)&&B.css({textOverflow:"ellipsis",width:Y.width+="px"}),E.prototype.alignDataLabel.apply(this,arguments),j.dataLabel&&j.dataLabel.attr({zIndex:(j.node.zIndex||0)+1})}calculateChildrenAreas(j,B){let W=this.options,Y=this.mapOptionsToLevel[j.level+1],U=M(this[Y&&Y.layoutAlgorithm]&&Y.layoutAlgorithm,W.layoutAlgorithm),q=W.alternateStartingDirection,H=j.children.filter(K=>!K.ignore),V=[];Y&&Y.layoutStartingDirection&&(B.direction=Y.layoutStartingDirection==="vertical"?0:1),V=this[U](B,H);let Z=-1;for(let K of H){let J=V[++Z];K.values=y(J,{val:K.childrenTotal,direction:q?1-B.direction:B.direction}),K.pointValues=y(J,{x:J.x/this.axisRatio,y:100-J.y-J.height,width:J.width/this.axisRatio}),K.children.length&&this.calculateChildrenAreas(K,K.values)}}createList(j){let B=this.chart,W=B.breadcrumbs,Y=[];if(W){let U=0;Y.push({level:U,levelOptions:B.series[0]});let q=j.target.nodeMap[j.newRootId],H=[];for(;q.parent||q.parent==="";)H.push(q),q=j.target.nodeMap[q.parent];for(let V of H.reverse())Y.push({level:++U,levelOptions:V});Y.length<=1&&(Y.length=0)}return Y}drawDataLabels(){let j,B,W=this.mapOptionsToLevel;for(let Y of this.points.filter(function(U){return U.node.visible}))B=W[Y.node.level],j={style:{}},Y.node.isLeaf||(j.enabled=!1),B&&B.dataLabels&&(j=y(j,B.dataLabels),this.hasDataLabels=()=>!0),Y.shapeArgs&&(j.style.width=Y.shapeArgs.width,Y.dataLabel&&Y.dataLabel.css({width:Y.shapeArgs.width+"px"})),Y.dlOptions=y(j,Y.options.dataLabels);super.drawDataLabels()}drawPoints(j=this.points){let B=this.chart,W=B.renderer,Y=B.styledMode,U=this.options,q=Y?{}:U.shadow,H=U.borderRadius,V=B.pointCount{let H=q.userOptions;P(H.allowDrillToNode)&&!P(H.allowTraversingTree)&&(H.allowTraversingTree=H.allowDrillToNode,delete H.allowDrillToNode),P(H.drillUpButton)&&!P(H.traverseUpButton)&&(H.traverseUpButton=H.drillUpButton,delete H.drillUpButton)});super.init(j,B),delete W.opacity,W.eventsToUnbind.push(U),W.options.allowTraversingTree&&(W.eventsToUnbind.push(O(W,"click",W.onClickDrillToNode)),W.eventsToUnbind.push(O(W,"setRootNode",function(q){let H=W.chart;H.breadcrumbs&&H.breadcrumbs.updateProperties(W.createList(q))})),W.eventsToUnbind.push(O(W,"update",function(q,H){let V=this.chart.breadcrumbs;V&&q.options.breadcrumbs&&V.update(q.options.breadcrumbs)})),W.eventsToUnbind.push(O(W,"destroy",function(q){let H=this.chart;H.breadcrumbs&&!q.keepEventsForUpdate&&(H.breadcrumbs.destroy(),H.breadcrumbs=void 0)}))),j.breadcrumbs||(j.breadcrumbs=new e(j,Y)),W.eventsToUnbind.push(O(j.breadcrumbs,"up",function(q){let H=this.level-q.newLevel;for(let V=0;VU?0:j.pointAttribs(H)["stroke-width"]||0;for(let H of B){let{pointValues:V,visible:Z}=H.node;if(V&&Z){let{height:K,width:J,x:tt,y:$}=V,Q=q(H),et=_(W.toPixels(tt,!0),Q,!0),it=_(W.toPixels(tt+J,!0),Q,!0),st=_(Y.toPixels($,!0),Q,!0),rt=_(Y.toPixels($+K,!0),Q,!0),nt={x:Math.min(et,it),y:Math.min(st,rt),width:Math.abs(it-et),height:Math.abs(rt-st)};H.plotX=nt.x+nt.width/2,H.plotY=nt.y+nt.height/2,H.shapeArgs=nt}else delete H.plotX,delete H.plotY}}setRootNode(j,B,W){D(this,"setRootNode",A({newRootId:j,previousRootId:this.rootNode,redraw:M(B,!0),series:this},W),function(Y){let U=Y.series;U.idPreviousRoot=Y.previousRootId,U.rootNode=Y.newRootId,U.isDirty=!0,Y.redraw&&U.chart.redraw()})}setState(j){this.options.inactiveOtherPoints=!0,super.setState(j,!1),this.options.inactiveOtherPoints=!1}setTreeValues(j){let B=this.options,W=this.rootNode,Y=this.nodeMap[W],U=typeof B.levelIsConstant!="boolean"||B.levelIsConstant,q=[],H=this.points[j.i],V=0;for(let K of j.children)K=this.setTreeValues(K),q.push(K),K.ignore||(V+=K.val);T(q,(K,J)=>(K.sortIndex||0)-(J.sortIndex||0));let Z=M(H&&H.options.value,V);return H&&(H.value=Z),A(j,{children:q,childrenTotal:V,ignore:!(M(H&&H.visible,!0)&&Z>0),isLeaf:j.visible&&!V,levelDynamic:j.level-(U?0:Y.level),name:M(H&&H.name,""),sortIndex:M(H&&H.sortIndex,-Z),val:Z}),j}sliceAndDice(j,B){return this.algorithmFill(!0,j,B)}squarified(j,B){return this.algorithmLowAspectRatio(!0,j,B)}strip(j,B){return this.algorithmLowAspectRatio(!1,j,B)}stripes(j,B){return this.algorithmFill(!1,j,B)}translate(){let j=this,B=j.options,W=R(j),Y,U,q,H;super.translate();let V=j.tree=j.getTree();Y=j.nodeMap[W],W===""||Y&&Y.children.length||(j.setRootNode("",!1),W=j.rootNode,Y=j.nodeMap[W]),j.mapOptionsToLevel=w({from:Y.level+1,levels:B.levels,to:V.height,defaults:{levelIsConstant:j.options.levelIsConstant,colorByPoint:B.colorByPoint}}),u.recursive(j.nodeMap[j.rootNode],Z=>{let K=Z.parent,J=!1;return Z.visible=!0,(K||K==="")&&(J=j.nodeMap[K]),J}),u.recursive(j.nodeMap[j.rootNode].children,Z=>{let K=!1;for(let J of Z)J.visible=!0,J.children.length&&(K=(K||[]).concat(J.children));return K}),j.setTreeValues(V),j.axisRatio=j.xAxis.len/j.yAxis.len,j.nodeMap[""].pointValues=U={x:0,y:0,width:100,height:100},j.nodeMap[""].values=q=y(U,{width:U.width*j.axisRatio,direction:B.layoutStartingDirection==="vertical"?0:1,val:V.val}),j.calculateChildrenAreas(V,q),j.colorAxis||B.colorByPoint||j.setColorRecursive(j.tree),B.allowTraversingTree&&(H=Y.pointValues,j.xAxis.setExtremes(H.x,H.x+H.width,!1),j.yAxis.setExtremes(H.y,H.y+H.height,!1),j.xAxis.setScale(),j.yAxis.setScale()),j.setPointValues()}}return G.defaultOptions=y(L.defaultOptions,g),A(G.prototype,{buildKDTree:m,colorAttribs:r.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,getExtremesFromAll:!0,getSymbol:m,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:c,NodeClass:h,trackerGroups:["group","dataLabelsGroup"],utils:u}),r.compose(G),l.registerSeriesType("treemap",G),G}),s(t,"masters/modules/treemap.src.js",[t["Core/Globals.js"],t["Extensions/Breadcrumbs/Breadcrumbs.js"],t["Series/Treemap/TreemapSeries.js"]],function(e,i,r){return e.Breadcrumbs=e.Breadcrumbs||i,e.Breadcrumbs.compose(e.Chart,e.defaultOptions),r.compose(e.Series),e})})});var Eu=qe((AT,Xn)=>{"use strict";(function(o){typeof Xn=="object"&&Xn.exports?(o.default=o,Xn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/heatmap",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisComposition.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r;let{parse:n}=e,{addEvent:l,extend:a,merge:h,pick:c,splat:g}=i;return function(u){let p;function b(){let{userOptions:I}=this;this.colorAxis=[],I.colorAxis&&(I.colorAxis=g(I.colorAxis),I.colorAxis.map(_=>new p(this,_)))}function v(I){let _=this.chart.colorAxis||[],P=C=>{let d=I.allItems.indexOf(C);d!==-1&&(this.destroyItem(I.allItems[d]),I.allItems.splice(d,1))},F=[],A,D;for(_.forEach(function(C){(A=C.options)&&A.showInLegend&&(A.dataClasses&&A.visible?F=F.concat(C.getDataClassLegendSymbols()):A.visible&&F.push(C),C.series.forEach(function(d){(!d.options.showInLegend||A.dataClasses)&&(d.options.legendType==="point"?d.points.forEach(function(f){P(f)}):P(d))}))}),D=F.length;D--;)I.allItems.unshift(F[D])}function x(I){I.visible&&I.item.legendColor&&I.item.legendItem.symbol.attr({fill:I.item.legendColor})}function m(I){this.chart.colorAxis?.forEach(_=>{_.update({},I.redraw)})}function E(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function L(){let I=this.axisTypes;I?I.indexOf("colorAxis")===-1&&I.push("colorAxis"):this.axisTypes=["colorAxis"]}function S(I){let _=this,P=I?"show":"hide";_.visible=_.options.visible=!!I,["graphic","dataLabel"].forEach(function(F){_[F]&&_[F][P]()}),this.series.buildKDTree()}function w(){let I=this,_=this.data.length?this.data:this.points,P=this.options.nullColor,F=this.colorAxis,A=this.colorKey;_.forEach(D=>{let C=D.getNestedProperty(A),d=D.options.color||(D.isNull||D.value===null?P:F&&C!==void 0?F.toColor(C,D):D.color||I.color);d&&D.color!==d&&(D.color=d,I.options.legendType==="point"&&D.legendItem&&D.legendItem.label&&I.chart.legend.colorizeItem(D,D.visible))})}function R(){this.elem.attr("fill",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}function O(){this.elem.attr("stroke",n(this.start).tweenTo(n(this.end),this.pos),void 0,!0)}u.compose=function(I,_,P,F,A){let D=_.prototype,C=P.prototype,d=A.prototype;D.collectionsWithUpdate.includes("colorAxis")||(p=I,D.collectionsWithUpdate.push("colorAxis"),D.collectionsWithInit.colorAxis=[D.addColorAxis],l(_,"afterGetAxes",b),function(f){let y=f.prototype.createAxis;f.prototype.createAxis=function(M,k){if(M!=="colorAxis")return y.apply(this,arguments);let T=new p(this,h(k.axis,{index:this[M].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(z=>{z.series=[]}),this.series.forEach(z=>{z.bindAxes(),z.isDirtyData=!0}),c(k.redraw,!0)&&this.redraw(k.animation),T}}(_),C.fillSetter=R,C.strokeSetter=O,l(F,"afterGetAllItems",v),l(F,"afterColorizeItem",x),l(F,"afterUpdate",m),a(d,{optionalAxis:"colorAxis",translateColors:w}),a(d.pointClass.prototype,{setVisible:S}),l(A,"afterTranslate",E,{order:1}),l(A,"bindAxes",L))},u.pointSetVisible=S}(r||(r={})),r}),s(t,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}}),s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/Color/ColorAxis.js",[t["Core/Axis/Axis.js"],t["Core/Axis/Color/ColorAxisComposition.js"],t["Core/Axis/Color/ColorAxisDefaults.js"],t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Defaults.js"],t["Core/Legend/LegendSymbol.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=l,{series:u}=h,{defined:p,extend:b,fireEvent:v,isArray:x,isNumber:m,merge:E,pick:L,relativeLength:S}=c;g.colorAxis=E(g.xAxis,r);class w extends e{static compose(O,I,_,P){i.compose(w,O,I,_,P)}constructor(O,I){super(O,I),this.coll="colorAxis",this.visible=!0,this.init(O,I)}init(O,I){let _=O.options.legend||{},P=I.layout?I.layout!=="vertical":_.layout!=="vertical";this.side=I.side||P?2:1,this.reversed=I.reversed||!P,this.opposite=!P,super.init(O,I,"colorAxis"),this.userOptions=I,x(O.userOptions.colorAxis)&&(O.userOptions.colorAxis[this.index]=I),I.dataClasses&&this.initDataClasses(I),this.initStops(),this.horiz=P,this.zoomEnabled=!1}hasData(){return!!(this.tickPositions||[]).length}setTickPositions(){if(!this.dataClasses)return super.setTickPositions()}setOptions(O){let I=E(g.colorAxis,O,{showEmpty:!1,title:null,visible:this.chart.options.legend.enabled&&O.visible!==!1});super.setOptions(I),this.options.crosshair=this.options.marker}setAxisSize(){let O=this.chart,I=this.legendItem?.symbol,{width:_,height:P}=this.getSize();I&&(this.left=+I.attr("x"),this.top=+I.attr("y"),this.width=_=+I.attr("width"),this.height=P=+I.attr("height"),this.right=O.chartWidth-this.left-_,this.bottom=O.chartHeight-this.top-P,this.pos=this.horiz?this.left:this.top),this.len=(this.horiz?_:P)||w.defaultLegendLength}getOffset(){let O=this.legendItem?.group,I=this.chart.axisOffset[this.side];if(O){this.axisParent=O,super.getOffset();let _=this.chart.legend;_.allItems.forEach(function(P){P instanceof w&&P.drawLegendSymbol(_,P)}),_.render(),this.chart.getMargins(!0),this.chart.series.some(P=>P.isDrilling)||(this.isDirty=!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=I}}setLegendColor(){let O=this.horiz,I=this.reversed,_=I?1:0,P=I?0:1,F=O?[_,0,P,0]:[0,P,0,_];this.legendColor={linearGradient:{x1:F[0],y1:F[1],x2:F[2],y2:F[3]},stops:this.stops}}drawLegendSymbol(O,I){let _=I.legendItem||{},P=O.padding,F=O.options,A=this.options.labels,D=L(F.itemDistance,10),C=this.horiz,{width:d,height:f}=this.getSize(),y=L(F.labelPadding,C?16:30);this.setLegendColor(),_.symbol||(_.symbol=this.chart.renderer.symbol("roundedRect").attr({r:F.symbolRadius??3,zIndex:1}).add(_.group)),_.symbol.attr({x:0,y:(O.baseline||0)-11,width:d,height:f}),_.labelWidth=d+P+(C?D:L(A.x,A.distance)+(this.maxLabelLength||0)),_.labelHeight=f+P+(C?y:0)}setState(O){this.series.forEach(function(I){I.setState(O)})}setVisible(){}getSeriesExtremes(){let O=this.series,I,_,P,F,A,D,C=O.length,d,f;for(this.dataMin=1/0,this.dataMax=-1/0;C--;){if(_=(D=O[C]).colorKey=L(D.options.colorKey,D.colorKey,D.pointValKey,D.zoneAxis,"y"),F=D.pointArrayMap,A=D[_+"Min"]&&D[_+"Max"],D[_+"Data"])I=D[_+"Data"];else if(F){if(I=[],P=F.indexOf(_),d=D.yData,P>=0&&d)for(f=0;fD+C&&(_=D+C+2),I.plotX=_,I.plotY=this.len-_,super.drawCrosshair(O,I),I.plotX=F,I.plotY=A,this.cross&&!this.cross.addedToColorAxis&&P.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(P.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||typeof this.crosshair!="object"||this.cross.attr({fill:this.crosshair.color})))}getPlotLinePath(O){let I=this.left,_=O.translatedValue,P=this.top;return m(_)?this.horiz?[["M",_-4,P-6],["L",_+4,P-6],["L",_,P],["Z"]]:[["M",I,_],["L",I-6,_+6],["L",I-6,_-6],["Z"]]:super.getPlotLinePath(O)}update(O,I){let _=this.chart.legend;this.series.forEach(P=>{P.isDirtyData=!0}),(O.dataClasses&&_.allItems||this.dataClasses)&&this.destroyItems(),super.update(O,I),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),_.colorizeItem(this,!0))}destroyItems(){let O=this.chart,I=this.legendItem||{};if(I.label)O.legend.destroyItem(this);else if(I.labels)for(let _ of I.labels)O.legend.destroyItem(_);O.isDirtyLegend=!0}destroy(){this.chart.isDirtyLegend=!0,this.destroyItems(),super.destroy(...[].slice.call(arguments))}remove(O){this.destroyItems(),super.remove(O)}getDataClassLegendSymbols(){let O,I=this,_=I.chart,P=I.legendItem&&I.legendItem.labels||[],F=_.options.legend,A=L(F.valueDecimals,-1),D=L(F.valueSuffix,""),C=d=>I.series.reduce((f,y)=>(f.push(...y.points.filter(M=>M.dataClass===d)),f),[]);return P.length||I.dataClasses.forEach((d,f)=>{let y=d.from,M=d.to,{numberFormatter:k}=_,T=!0;O="",y===void 0?O="< ":M===void 0&&(O="> "),y!==void 0&&(O+=k(y,A)+D),y!==void 0&&M!==void 0&&(O+=" - "),M!==void 0&&(O+=k(M,A)+D),P.push(b({chart:_,name:O,options:{},drawLegendSymbol:a.rectangle,visible:!0,isDataClass:!0,setState:z=>{for(let N of C(f))N.setState(z)},setVisible:function(){this.visible=T=I.visible=!T;let z=[];for(let N of C(f))N.setVisible(T),N.hiddenInDataClass=!T,z.indexOf(N.series)===-1&&z.push(N.series);_.legend.colorizeItem(this,T),z.forEach(N=>{v(N,"afterDataClassLegendClick")})}},d))}),P}getSize(){let{chart:O,horiz:I}=this,{height:_,width:P}=this.options,{legend:F}=O.options;return{width:L(p(P)?S(P,O.chartWidth):void 0,F?.symbolWidth,I?w.defaultLegendLength:12),height:L(p(_)?S(_,O.chartHeight):void 0,F?.symbolHeight,I?12:w.defaultLegendLength)}}}return w.defaultLegendLength=200,w.keepProps=["legendItem"],b(w.prototype,n),Array.prototype.push.apply(e.keepProps,w.keepProps),w}),s(t,"masters/modules/coloraxis.src.js",[t["Core/Globals.js"],t["Core/Axis/Color/ColorAxis.js"]],function(e,i){return e.ColorAxis=e.ColorAxis||i,e.ColorAxis.compose(e.Chart,e.Fx,e.Legend,e.Series),e}),s(t,"Series/ColorMapComposition.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r){var n;let{column:{prototype:l}}=e.seriesTypes,{addEvent:a,defined:h}=r;return function(c){function g(u){let p=this.series,b=p.chart.renderer;this.moveToTopOnHover&&this.graphic&&(p.stateMarkerGraphic||(p.stateMarkerGraphic=new i(b,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),u?.state==="hover"?(this.graphic.attr({id:this.id}),p.stateMarkerGraphic.attr({href:`${b.url}#${this.id}`,visibility:"visible"})):p.stateMarkerGraphic.attr({href:""}))}c.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return this.value!==null&&this.value!==1/0&&this.value!==-1/0&&(this.value===void 0||!isNaN(this.value))}},c.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(u){let p={};return h(u.color)&&(!u.state||u.state==="normal")&&(p[this.colorProp||"fill"]=u.color),p},pointAttribs:l.pointAttribs},c.compose=function(u){return a(u.prototype.pointClass,"afterSetState",g),u}}(n||(n={})),n}),s(t,"Series/Heatmap/HeatmapPoint.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i){let{scatter:{prototype:{pointClass:r}}}=e.seriesTypes,{clamp:n,defined:l,extend:a,pick:h}=i;class c extends r{applyOptions(u,p){return(this.isNull||this.value===null)&&delete this.color,super.applyOptions(u,p),this.formatPrefix=this.isNull||this.value===null?"null":"point",this}getCellAttributes(){let u=this.series,p=u.options,b=(p.colsize||1)/2,v=(p.rowsize||1)/2,x=u.xAxis,m=u.yAxis,E=this.options.marker||u.options.marker,L=u.pointPlacementToXValue(),S=h(this.pointPadding,p.pointPadding,0),w={x1:n(Math.round(x.len-x.translate(this.x-b,!1,!0,!1,!0,-L)),-x.len,2*x.len),x2:n(Math.round(x.len-x.translate(this.x+b,!1,!0,!1,!0,-L)),-x.len,2*x.len),y1:n(Math.round(m.translate(this.y-v,!1,!0,!1,!0)),-m.len,2*m.len),y2:n(Math.round(m.translate(this.y+v,!1,!0,!1,!0)),-m.len,2*m.len)};for(let R of[["width","x"],["height","y"]]){let O=R[0],I=R[1],_=I+"1",P=I+"2",F=Math.abs(w[_]-w[P]),A=E&&E.lineWidth||0,D=Math.abs(w[_]+w[P])/2,C=E&&E[O];if(l(C)&&C"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}}),s(t,"Series/InterpolationUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{doc:r}=e,{defined:n,pick:l}=i;return{colorFromPoint:function(a,h){let c=h.series.colorAxis;if(c){let g=c.toColor(a||0,h).split(")")[0].split("(")[1].split(",").map(u=>l(parseFloat(u),parseInt(u,10)));return g[3]=255*l(g[3],1),n(a)&&h.visible||(g[3]=0),g}return[0,0,0,0]},getContext:function(a){let{canvas:h,context:c}=a;return h&&c?(c.clearRect(0,0,h.width,h.height),c):(a.canvas=r.createElement("canvas"),a.context=a.canvas.getContext("2d",{willReadFrequently:!0})||void 0,a.context)}}}),s(t,"Series/Heatmap/HeatmapSeries.js",[t["Core/Color/Color.js"],t["Series/ColorMapComposition.js"],t["Series/Heatmap/HeatmapPoint.js"],t["Series/Heatmap/HeatmapSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGRenderer.js"],t["Core/Utilities.js"],t["Series/InterpolationUtilities.js"]],function(e,i,r,n,l,a,h,c){let{series:g,seriesTypes:{column:u,scatter:p}}=l,{prototype:{symbols:b}}=a,{addEvent:v,extend:x,fireEvent:m,isNumber:E,merge:L,pick:S}=h,{colorFromPoint:w,getContext:R}=c;class O extends p{constructor(){super(...arguments),this.valueMax=NaN,this.valueMin=NaN,this.isDirtyCanvas=!0}drawPoints(){let _=this,P=_.options,F=P.interpolation,A=P.marker||{};if(F){let{image:D,chart:C,xAxis:d,yAxis:f}=_,{reversed:y=!1,len:M}=d,{reversed:k=!1,len:T}=f,z={width:M,height:T};if(!D||_.isDirtyData||_.isDirtyCanvas){let N=R(_),{canvas:G,options:{colsize:X=1,rowsize:j=1},points:B,points:{length:W}}=_,Y=C.colorAxis&&C.colorAxis[0];if(G&&N&&Y){let{min:U,max:q}=d.getExtremes(),{min:H,max:V}=f.getExtremes(),Z=q-U,K=V-H,J=Math.round(Z/X/8*8),tt=Math.round(K/j/8*8),[$,Q]=[[J,J/Z,y,"ceil"],[tt,tt/K,!k,"floor"]].map(([ot,at,ct,ht])=>ct?lt=>Math[ht](ot-at*lt):lt=>Math[ht](at*lt)),et=G.width=J+1,it=et*(G.height=tt+1),st=(W-1)/it,rt=new Uint8ClampedArray(4*it),nt=(ot,at)=>4*Math.ceil(et*Q(at-H)+$(ot-U));_.buildKDTree();for(let ot=0;ot{D.graphic&&(D.graphic[_.chart.styledMode?"css":"animate"](_.colorAttribs(D)),D.value===null&&D.graphic.addClass("highcharts-null-point"))}))}getExtremes(){let{dataMin:_,dataMax:P}=g.prototype.getExtremes.call(this,this.valueData);return E(_)&&(this.valueMin=_),E(P)&&(this.valueMax=P),g.prototype.getExtremes.call(this)}getValidPoints(_,P){return g.prototype.getValidPoints.call(this,_,P,!0)}hasData(){return!!this.processedXData.length}init(){super.init.apply(this,arguments);let _=this.options;_.pointRange=S(_.pointRange,_.colsize||1),this.yAxis.axisPointRange=_.rowsize||1,b.ellipse=b.circle,_.marker&&E(_.borderRadius)&&(_.marker.r=_.borderRadius)}markerAttribs(_,P){let F=_.shapeArgs||{};if(_.hasImage)return{x:_.plotX,y:_.plotY};if(P&&P!=="normal"){let A=_.options.marker||{},D=this.options.marker||{},C=D.states&&D.states[P]||{},d=A.states&&A.states[P]||{},f=(d.width||C.width||F.width||0)+(d.widthPlus||C.widthPlus||0),y=(d.height||C.height||F.height||0)+(d.heightPlus||C.heightPlus||0);return{x:(F.x||0)+((F.width||0)-f)/2,y:(F.y||0)+((F.height||0)-y)/2,width:f,height:y}}return F}pointAttribs(_,P){let F=g.prototype.pointAttribs.call(this,_,P),A=this.options||{},D=this.chart.options.plotOptions||{},C=D.series||{},d=D.heatmap||{},f=_&&_.options.borderColor||A.borderColor||d.borderColor||C.borderColor,y=_&&_.options.borderWidth||A.borderWidth||d.borderWidth||C.borderWidth||F["stroke-width"];if(F.stroke=_&&_.marker&&_.marker.lineColor||A.marker&&A.marker.lineColor||f||this.color,F["stroke-width"]=y,P&&P!=="normal"){let M=L(A.states&&A.states[P],A.marker&&A.marker.states&&A.marker.states[P],_&&_.options.states&&_.options.states[P]||{});F.fill=M.color||e.parse(F.fill).brighten(M.brightness||0).get(),F.stroke=M.lineColor||F.stroke}return F}translate(){let{borderRadius:_,marker:P}=this.options,F=P&&P.symbol||"rect",A=b[F]?F:"rect",D=["circle","square"].indexOf(A)!==-1;for(let C of(this.generatePoints(),this.points)){let d=C.getCellAttributes(),f=Math.min(d.x1,d.x2),y=Math.min(d.y1,d.y2),M=Math.max(Math.abs(d.x2-d.x1),0),k=Math.max(Math.abs(d.y2-d.y1),0);if(C.hasImage=(C.marker&&C.marker.symbol||F||"").indexOf("url")===0,D){let T=Math.abs(M-k);f=Math.min(d.x1,d.x2)+(M{"use strict";(function(o){typeof Wn=="object"&&Wn.exports?(o.default=o,Wn.exports=o):typeof define=="function"&&define.amd?define("highcharts/highcharts-3d",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Math3D.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{deg2rad:r}=e,{pick:n}=i;function l(c,g,u,p){let b=g.options.chart.options3d,v=n(p,!!u&&g.inverted),x={x:g.plotWidth/2,y:g.plotHeight/2,z:b.depth/2,vd:n(b.depth,1)*n(b.viewDistance,0)},m=g.scale3d||1,E=r*b.beta*(v?-1:1),L=r*b.alpha*(v?-1:1),S={cosA:Math.cos(L),cosB:Math.cos(-E),sinA:Math.sin(L),sinB:Math.sin(-E)};return u||(x.x+=g.plotLeft,x.y+=g.plotTop),c.map(function(w){var R,O,I;let _=(R=(v?w.y:w.x)-x.x,O=(v?w.x:w.y)-x.y,I=(w.z||0)-x.z,{x:S.cosB*R-S.sinB*I,y:-S.sinA*S.sinB*R+S.cosA*O-S.cosB*S.sinA*I,z:S.cosA*S.sinB*R+S.sinA*O+S.cosA*S.cosB*I}),P=a(_,x,x.vd);return P.x=P.x*m+x.x,P.y=P.y*m+x.y,P.z=_.z*m+x.z,{x:v?P.y:P.x,y:v?P.x:P.y,z:P.z}})}function a(c,g,u){let p=u>0&&u=0?0:360),C.beta=C.beta%360+(C.beta>=0?0:360));let d=this.inverted,f=this.clipBox,y=this.margin;f[d?"y":"x"]=-(y[3]||0),f[d?"x":"y"]=-(y[0]||0),f[d?"height":"width"]=this.chartWidth+(y[3]||0)+(y[1]||0),f[d?"width":"height"]=this.chartHeight+(y[0]||0)+(y[2]||0),this.scale3d=1,C.fitToPlot===!0&&(this.scale3d=this.chart3d.getScale(C.depth)),this.chart3d.frame3d=this.chart3d.get3dFrame()}}function O(){this.is3d()&&(this.isDirtyBox=!0)}function I(){this.chart3d&&this.is3d()&&(this.chart3d.frame3d=this.chart3d.get3dFrame())}function _(){this.chart3d||(this.chart3d=new D(this))}function P(C){return this.is3d()||C.apply(this,[].slice.call(arguments,1))}function F(C){let d,f=this.series.length;if(this.is3d())for(;f--;)(d=this.series[f]).translate(),d.render();else C.call(this)}function A(C){C.apply(this,[].slice.call(arguments,1)),this.is3d()&&(this.container.className+=" highcharts-3d-chart")}m.defaultOptions={chart:{options3d:{enabled:!1,alpha:0,beta:0,depth:100,fitToPlot:!0,viewDistance:25,axisLabelPosition:null,frame:{visible:"default",size:1,bottom:{},top:{},left:{},right:{},back:{},front:{}}}}},m.compose=function(C,d){let f=C.prototype,y=d.prototype;f.is3d=function(){return!!this.options.chart.options3d?.enabled},f.propsRequireDirtyBox.push("chart.options3d"),f.propsRequireUpdateSeries.push("chart.options3d"),y.matrixSetter=function(){let M;if(this.pos<1&&(p(this.start)||p(this.end))){let k=this.start||[1,0,0,1,0,0],T=this.end||[1,0,0,1,0,0];M=[];for(let z=0;z<6;z++)M.push(this.pos*T[z]+(1-this.pos)*k[z])}else M=this.end;this.elem.attr(this.prop,M,null,!0)},b(!0,h,m.defaultOptions),u(C,"init",_),u(C,"addSeries",E),u(C,"afterDrawChartBox",L),u(C,"afterGetContainer",S),u(C,"afterInit",w),u(C,"afterSetChartSize",R),u(C,"beforeRedraw",O),u(C,"beforeRender",I),x(f,"isInsidePlot",P),x(f,"renderSeries",F),x(f,"setClassName",A)};class D{constructor(d){this.chart=d}get3dFrame(){let d=this.chart,f=d.options.chart.options3d,y=f.frame,M=d.plotLeft,k=d.plotLeft+d.plotWidth,T=d.plotTop,z=d.plotTop+d.plotHeight,N=f.depth,G=function(tt){let $=g(tt,d);return $>.5?1:$<-.5?-1:0},X=G([{x:M,y:z,z:N},{x:k,y:z,z:N},{x:k,y:z,z:0},{x:M,y:z,z:0}]),j=G([{x:M,y:T,z:0},{x:k,y:T,z:0},{x:k,y:T,z:N},{x:M,y:T,z:N}]),B=G([{x:M,y:T,z:0},{x:M,y:T,z:N},{x:M,y:z,z:N},{x:M,y:z,z:0}]),W=G([{x:k,y:T,z:N},{x:k,y:T,z:0},{x:k,y:z,z:0},{x:k,y:z,z:N}]),Y=G([{x:M,y:z,z:0},{x:k,y:z,z:0},{x:k,y:T,z:0},{x:M,y:T,z:0}]),U=G([{x:M,y:T,z:N},{x:k,y:T,z:N},{x:k,y:z,z:N},{x:M,y:z,z:N}]),q=!1,H=!1,V=!1,Z=!1;[].concat(d.xAxis,d.yAxis,d.zAxis).forEach(function(tt){tt&&(tt.horiz?tt.opposite?H=!0:q=!0:tt.opposite?Z=!0:V=!0)});let K=function(tt,$,Q){let et=["size","color","visible"],it={};for(let rt=0;rt0),{size:v(it.size,1),color:v(it.color,"none"),frontFacing:$>0,visible:st}},J={axes:{},bottom:K([y.bottom,y.top,y],X,q),top:K([y.top,y.bottom,y],j,H),left:K([y.left,y.right,y.side,y],B,V),right:K([y.right,y.left,y.side,y],W,Z),back:K([y.back,y.front,y],U,!0),front:K([y.front,y.back,y],Y,!1)};if(f.axisLabelPosition==="auto"){let tt=function(nt,ot){return nt.visible!==ot.visible||nt.visible&&ot.visible&&nt.frontFacing!==ot.frontFacing},$=[];tt(J.left,J.front)&&$.push({y:(T+z)/2,x:M,z:0,xDir:{x:1,y:0,z:0}}),tt(J.left,J.back)&&$.push({y:(T+z)/2,x:M,z:N,xDir:{x:0,y:0,z:-1}}),tt(J.right,J.front)&&$.push({y:(T+z)/2,x:k,z:0,xDir:{x:0,y:0,z:1}}),tt(J.right,J.back)&&$.push({y:(T+z)/2,x:k,z:N,xDir:{x:-1,y:0,z:0}});let Q=[];tt(J.bottom,J.front)&&Q.push({x:(M+k)/2,y:z,z:0,xDir:{x:1,y:0,z:0}}),tt(J.bottom,J.back)&&Q.push({x:(M+k)/2,y:z,z:N,xDir:{x:-1,y:0,z:0}});let et=[];tt(J.top,J.front)&&et.push({x:(M+k)/2,y:T,z:0,xDir:{x:1,y:0,z:0}}),tt(J.top,J.back)&&et.push({x:(M+k)/2,y:T,z:N,xDir:{x:-1,y:0,z:0}});let it=[];tt(J.bottom,J.left)&&it.push({z:(0+N)/2,y:z,x:M,xDir:{x:0,y:0,z:-1}}),tt(J.bottom,J.right)&&it.push({z:(0+N)/2,y:z,x:k,xDir:{x:0,y:0,z:1}});let st=[];tt(J.top,J.left)&&st.push({z:(0+N)/2,y:T,x:M,xDir:{x:0,y:0,z:-1}}),tt(J.top,J.right)&&st.push({z:(0+N)/2,y:T,x:k,xDir:{x:0,y:0,z:1}});let rt=function(nt,ot,at){if(nt.length===0)return null;if(nt.length===1)return nt[0];let ct=c(nt,d,!1),ht=0;for(let lt=1;ltat*ct[ht][ot]||at*ct[lt][ot]==at*ct[ht][ot]&&ct[lt].zG.minX&&(j=Math.min(j,1-Math.abs((y+z)/(G.minX+z))%1)),MG.minY&&(j=G.minY<0?Math.min(j,(k+N)/(-G.minY+k+N)):Math.min(j,1-(k+N)/(G.minY+N)%1)),T({plotX:w.x,plotY:w.y,plotZ:w.z})),this.group&&L&&L.depth&&L.beta&&(this.markerGroup&&(this.markerGroup.add(this.group),this.markerGroup.attr({translateX:0,translateY:0})),this.group.attr({zIndex:Math.max(1,L.beta>270||L.beta<90?L.depth-Math.round(this.zPadding||0):Math.round(this.zPadding||0))})),E.reversed=!0;let S=v.call(this,E,!0,!0);if(S[0]&&S[0][0]==="M"&&(S[0]=["L",S[0][1],S[0][2]]),this.areaPath){let w=this.areaPath.splice(0,this.areaPath.length/2).concat(S);w.xMap=this.areaPath.xMap,this.areaPath=w}return this.graphPath=b,b}return{compose:function(p){c(l,"Area3DSeries")&&g(p.prototype,"getGraphPath",u)}}}),s(t,"Core/Axis/Axis3DDefaults.js",[],function(){return{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}}}),s(t,"Core/Axis/Tick3DComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{composed:r}=e,{addEvent:n,extend:l,pushUnique:a,wrap:h}=i;function c(u){let p=this.axis.axis3D;p&&l(u.pos,p.fix3dPosition(u.pos))}function g(u){let p=this.axis.axis3D,b=u.apply(this,[].slice.call(arguments,1));if(p){let v=b[0],x=b[1];if(v[0]==="M"&&x[0]==="L"){let m=[p.fix3dPosition({x:v[1],y:v[2],z:0}),p.fix3dPosition({x:x[1],y:x[2],z:0})];return this.axis.chart.renderer.toLineSegments(m)}}return b}return{compose:function(u){a(r,"Axis.Tick3D")&&(n(u,"afterGetLabelPosition",c),h(u.prototype,"getMarkPath",g))}}}),s(t,"Core/Axis/Axis3DComposition.js",[t["Core/Axis/Axis3DDefaults.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Axis/Tick3DComposition.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{defaultOptions:h}=i,{deg2rad:c}=r,{perspective:g,perspective3D:u,shapeArea:p}=n,{addEvent:b,merge:v,pick:x,wrap:m}=a;function E(){let F=this.chart,A=this.options;F.is3d&&F.is3d()&&this.coll!=="colorAxis"&&(A.tickWidth=x(A.tickWidth,0),A.gridLineWidth=x(A.gridLineWidth,1))}function L(F){this.chart.is3d()&&this.coll!=="colorAxis"&&F.point&&(F.point.crosshairPos=this.isXAxis?F.point.axisXpos:this.len-F.point.axisYpos)}function S(){this.axis3D||(this.axis3D=new P(this))}function w(F){return this.chart.is3d()&&this.coll!=="colorAxis"?[]:F.apply(this,[].slice.call(arguments,1))}function R(F){if(!this.chart.is3d()||this.coll==="colorAxis")return F.apply(this,[].slice.call(arguments,1));let A=arguments,D=A[1],C=A[2],d=[],f=this.getPlotLinePath({value:D}),y=this.getPlotLinePath({value:C});if(f&&y)for(let M=0;Mp(g([A,{x:A.x+W.x,y:A.y+W.y,z:A.z+W.z},{x:A.x+Y.x,y:A.y+Y.y,z:A.z+Y.z}],C.chart))&&(W={x:-W.x,y:-W.y,z:-W.z});let H=g([{x:A.x,y:A.y,z:A.z},{x:A.x+W.x,y:A.y+W.y,z:A.z+W.z},{x:A.x+Y.x,y:A.y+Y.y,z:A.z+Y.z}],C.chart);q.matrix=[H[1].x-H[0].x,H[1].y-H[0].y,H[2].x-H[0].x,H[2].y-H[0].y,q.x,q.y],q.matrix[4]-=q.x*q.matrix[0]+q.y*q.matrix[2],q.matrix[5]-=q.x*q.matrix[1]+q.y*q.matrix[3]}return q}swapZ(A,D){let C=this.axis;if(C.isZAxis){let d=D?0:C.chart.plotLeft;return{x:d+A.z,y:A.y,z:A.x-d}}return A}}return P}),s(t,"Core/Series/Series3D.js",[t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{composed:l}=e,{perspective:a}=i,{addEvent:h,extend:c,isNumber:g,merge:u,pick:p,pushUnique:b}=n;class v extends r{static compose(m){b(l,"Core.Series3D")&&(h(m,"afterTranslate",function(){this.chart.is3d()&&this.translate3dPoints()}),c(m.prototype,{translate3dPoints:v.prototype.translate3dPoints}))}translate3dPoints(){let m,E,L=this,S=L.options,w=L.chart,R=p(L.zAxis,w.options.zAxis[0]),O=[],I=[],_=S.stacking?g(S.stack)?S.stack:0:L.index||0;L.zPadding=_*(S.depth||0+(S.groupZPadding||1)),L.data.forEach(F=>{R&&R.translate?(E=R.logarithmic&&R.val2lin?R.val2lin(F.z):F.z,F.plotZ=R.translate(E),F.isInside=!!F.isInside&&E>=R.min&&E<=R.max):F.plotZ=L.zPadding,F.axisXpos=F.plotX,F.axisYpos=F.plotY,F.axisZpos=F.plotZ,O.push({x:F.plotX,y:F.plotY,z:F.plotZ}),I.push(F.plotX||0)}),L.rawPointsX=I;let P=a(O,w,!0);L.data.forEach((F,A)=>{m=P[A],F.plotX=m.x,F.plotY=m.y,F.plotZ=m.z})}}return v.defaultOptions=u(r.defaultOptions),v}),s(t,"Core/Renderer/SVG/SVGElement3D.js",[t["Core/Color/Color.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Utilities.js"]],function(e,i,r){let{parse:n}=e,{Element:l}=i.getRendererType().prototype,{defined:a,pick:h}=r;class c extends l{constructor(){super(...arguments),this.parts=["front","top","side"],this.pathType="cuboid"}initArgs(u){let p=this.renderer,b=p[this.pathType+"Path"](u),v=b.zIndexes;for(let x of this.parts){let m={class:"highcharts-3d-"+x,zIndex:v[x]||0};p.styledMode&&(x==="top"?m.filter="url(#highcharts-brighter)":x==="side"&&(m.filter="url(#highcharts-darker)")),this[x]=p.path(b[x]).attr(m).add(this)}this.attr({"stroke-linejoin":"round",zIndex:v.group}),this.forcedSides=b.forcedSides}singleSetterForParts(u,p,b,v,x,m){let E={},L=[null,null,v||"attr",x,m],S=b&&b.zIndexes;if(b){for(let w of(S&&S.group&&this.attr({zIndex:S.group}),Object.keys(b)))E[w]={},E[w][u]=b[w],S&&(E[w].zIndex=b.zIndexes[w]||0);L[1]=E}else E[u]=p,L[0]=E;return this.processParts.apply(this,L)}processParts(u,p,b,v,x){for(let m of this.parts)p&&(u=h(p[m],!1)),u!==!1&&this[m][b](u,v,x);return this}destroy(){return this.processParts(null,null,"destroy"),super.destroy()}attr(u,p,b,v){if(typeof u=="string"&&p!==void 0){let x=u;(u={})[x]=p}return u.shapeArgs||a(u.x)?this.singleSetterForParts("d",null,this.renderer[this.pathType+"Path"](u.shapeArgs||u)):super.attr(u,void 0,b,v)}animate(u,p,b){if(a(u.x)&&a(u.y)){let v=this.renderer[this.pathType+"Path"](u),x=v.forcedSides;this.singleSetterForParts("d",null,v,"animate",p,b),this.attr({zIndex:v.zIndexes.group}),x===this.forcedSides||(this.forcedSides=x,this.renderer.styledMode||this.fillSetter(this.fill))}else super.animate(u,p,b);return this}fillSetter(u){return this.forcedSides=this.forcedSides||[],this.singleSetterForParts("fill",null,{front:u,top:n(u).brighten(this.forcedSides.indexOf("top")>=0?0:.1).get(),side:n(u).brighten(this.forcedSides.indexOf("side")>=0?0:-.1).get()}),this.color=this.fill=u,this}}return c.types={base:c,cuboid:c},c}),s(t,"Core/Renderer/SVG/SVGRenderer3D.js",[t["Core/Animation/AnimationUtilities.js"],t["Core/Color/Color.js"],t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Renderer/SVG/SVGElement3D.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){var h;let{animObject:c}=e,{parse:g}=i,{charts:u,deg2rad:p}=r,{perspective:b,shapeArea:v}=n,{defined:x,extend:m,merge:E,pick:L}=a,S=Math.cos,w=Math.sin,R=Math.PI,O=4*(Math.sqrt(2)-1)/3/(R/2);function I(_,P,F,A,D,C,d,f){let y=C-D,M=[];return C>D&&C-D>Math.PI/2+1e-4?M=(M=M.concat(I(_,P,F,A,D,D+Math.PI/2,d,f))).concat(I(_,P,F,A,D+Math.PI/2,C,d,f)):CMath.PI/2+1e-4?M=(M=M.concat(I(_,P,F,A,D,D-Math.PI/2,d,f))).concat(I(_,P,F,A,D-Math.PI/2,C,d,f)):[["C",_+F*Math.cos(D)-F*O*y*Math.sin(D)+d,P+A*Math.sin(D)+A*O*y*Math.cos(D)+f,_+F*Math.cos(C)+F*O*y*Math.sin(C)+d,P+A*Math.sin(C)-A*O*y*Math.cos(C)+f,_+F*Math.cos(C)+d,P+A*Math.sin(C)+f]]}return function(_){function P(k,T){let z=[];for(let N of k)z.push(["L",N.x,N.y]);return k.length&&(z[0][0]="M",T&&z.push(["Z"])),z}function F(k){let T=[],z=!0;for(let N of k)T.push(z?["M",N.x,N.y]:["L",N.x,N.y]),z=!z;return T}function A(k){let T=this,z=T.Element.prototype,N=T.createElement("path");return N.vertexes=[],N.insidePlotArea=!1,N.enabled=!0,N.attr=function(G){if(typeof G=="object"&&(x(G.enabled)||x(G.vertexes)||x(G.insidePlotArea))){this.enabled=L(G.enabled,this.enabled),this.vertexes=L(G.vertexes,this.vertexes),this.insidePlotArea=L(G.insidePlotArea,this.insidePlotArea),delete G.enabled,delete G.vertexes,delete G.insidePlotArea;let X=u[T.chartIndex],j=b(this.vertexes,X,this.insidePlotArea),B=T.toLinePath(j,!0),W=v(j);G.d=B,G.visibility=this.enabled&&W>0?"inherit":"hidden"}return z.attr.apply(this,arguments)},N.animate=function(G){if(typeof G=="object"&&(x(G.enabled)||x(G.vertexes)||x(G.insidePlotArea))){this.enabled=L(G.enabled,this.enabled),this.vertexes=L(G.vertexes,this.vertexes),this.insidePlotArea=L(G.insidePlotArea,this.insidePlotArea),delete G.enabled,delete G.vertexes,delete G.insidePlotArea;let X=u[T.chartIndex],j=b(this.vertexes,X,this.insidePlotArea),B=T.toLinePath(j,!0),W=v(j),Y=this.enabled&&W>0?"visible":"hidden";G.d=B,this.attr("visibility",Y)}return z.animate.apply(this,arguments)},N.attr(k)}function D(k){let T=this,z=T.Element.prototype,N=T.g(),G=N.destroy;return this.styledMode||N.attr({"stroke-linejoin":"round"}),N.faces=[],N.destroy=function(){for(let X=0;XX.faces.length;)N.faces.pop().destroy();for(;N.faces.lengthX.faces.length;)N.faces.pop().destroy();for(;N.faces.lengthG===0&&st>1&&st<6?{x:H[st].x,y:H[st].y+10,z:H[st].z}:H[0].x===H[7].x&&st>=4?{x:H[st].x+10,y:H[st].y,z:H[st].z}:j===0&&st<2||st>5?{x:H[st].x,y:H[st].y,z:H[st].z+10}:H[st],Z=st=>H[st],K=(st,rt,nt)=>{let ot=st.map(Z),at=rt.map(Z),ct=st.map(V),ht=rt.map(V),lt=[[],-1];return 0>v(ot)?lt=[ot,0]:0>v(at)?lt=[at,1]:nt&&(Y.push(nt),lt=0>v(ct)?[ot,0]:0>v(ht)?[at,1]:[ot,0]),lt},J=(U=K([3,2,1,0],[7,6,5,4],"front"))[0],tt=U[1],$=(U=K([1,6,7,0],[4,5,2,3],"top"))[0],Q=U[1],et=(U=K([1,2,5,6],[0,7,4,3],"side"))[0],it=U[1];return it===1?q+=1e6*(B.plotWidth-T):it||(q+=1e6*T),q+=10*(!Q||W>=0&&W<=180||W<360&&W>357.5?B.plotHeight-z:10+z),tt===1?q+=100*N:tt||(q+=100*(1e3-N)),{front:this.toLinePath(J,!0),top:this.toLinePath($,!0),side:this.toLinePath(et,!0),zIndexes:{group:Math.round(q)},forcedSides:Y,isFront:tt,isTop:Q}}function y(k){let T=this.g(),z=this.Element.prototype,N=["x","y","r","innerR","start","end","depth"];function G(X){let j={},B=!1,W;for(W in X=E(X))N.indexOf(W)!==-1&&(j[W]=X[W],delete X[W],B=!0);return!!B&&[j,X]}for(let X of((k=E(k)).alpha=(k.alpha||0)*p,k.beta=(k.beta||0)*p,T.top=this.path(),T.side1=this.path(),T.side2=this.path(),T.inn=this.path(),T.out=this.path(),T.onAdd=function(){let j=T.parentGroup,B=T.attr("class");for(let W of(T.top.add(T),["out","inn","side1","side2"]))T[W].attr({class:B+" highcharts-3d-side"}).add(j)},["addClass","removeClass"]))T[X]=function(){let j=arguments;for(let B of["top","out","inn","side1","side2"])T[B][X].apply(T[B],j)};for(let X of(T.setPaths=function(j){let B=T.renderer.arc3dPath(j),W=100*B.zTop;T.attribs=j,T.top.attr({d:B.top,zIndex:B.zTop}),T.inn.attr({d:B.inn,zIndex:B.zInn}),T.out.attr({d:B.out,zIndex:B.zOut}),T.side1.attr({d:B.side1,zIndex:B.zSide1}),T.side2.attr({d:B.side2,zIndex:B.zSide2}),T.zIndex=W,T.attr({zIndex:W}),j.center&&(T.top.setRadialReference(j.center),delete j.center)},T.setPaths(k),T.fillSetter=function(j){let B=g(j).brighten(-.1).get();return this.fill=j,this.side1.attr({fill:B}),this.side2.attr({fill:B}),this.inn.attr({fill:B}),this.out.attr({fill:B}),this.top.attr({fill:j}),this},["opacity","translateX","translateY","visibility"]))T[X+"Setter"]=function(j,B){for(let W of(T[B]=j,["out","inn","side1","side2","top"]))T[W].attr(B,j)};return T.attr=function(X){let j,B;return typeof X=="object"&&(B=G(X))&&(j=B[0],arguments[0]=B[1],m(T.attribs,j),T.setPaths(T.attribs)),z.attr.apply(T,arguments)},T.animate=function(X,j,B){let W,Y,U=this.attribs,q="data-"+Math.random().toString(26).substring(2,9);delete X.center,delete X.z,delete X.alpha,delete X.beta;let H=c(L(j,this.renderer.globalAnimation));return H.duration&&(W=G(X),T[q]=0,X[q]=1,T[q+"Setter"]=r.noop,W&&(Y=W[0],H.step=function(V,Z){let K=J=>U[J]+(L(Y[J],U[J])-U[J])*Z.pos;Z.prop===q&&Z.elem.setPaths(E(U,{x:K("x"),y:K("y"),r:K("r"),innerR:K("innerR"),start:K("start"),end:K("end"),depth:K("depth")}))}),j=H),z.animate.call(this,X,j,B)},T.destroy=function(){return this.top.destroy(),this.out.destroy(),this.inn.destroy(),this.side1.destroy(),this.side2.destroy(),z.destroy.call(this)},T.hide=function(){this.top.hide(),this.out.hide(),this.inn.hide(),this.side1.hide(),this.side2.hide()},T.show=function(X){this.top.show(X),this.out.show(X),this.inn.show(X),this.side1.show(X),this.side2.show(X)},T}function M(k){let T=k.x||0,z=k.y||0,N=k.start||0,G=(k.end||0)-1e-5,X=k.r||0,j=k.innerR||0,B=k.depth||0,W=k.alpha||0,Y=k.beta||0,U=Math.cos(N),q=Math.sin(N),H=Math.cos(G),V=Math.sin(G),Z=X*Math.cos(Y),K=X*Math.cos(W),J=j*Math.cos(Y),tt=j*Math.cos(W),$=B*Math.sin(Y),Q=B*Math.sin(W),et=[["M",T+Z*U,z+K*q]];(et=et.concat(I(T,z,Z,K,N,G,0,0))).push(["L",T+J*H,z+tt*V]),(et=et.concat(I(T,z,J,tt,G,N,0,0))).push(["Z"]);let it=Y>0?Math.PI/2:0,st=W>0?0:Math.PI/2,rt=N>-it?N:G>-it?-it:N,nt=Got&&NR-st&&NMath.PI&&(ee=2*Math.PI-ee),ee}wt=ft(wt),dt=ft(dt);let Tt=1e5*(Ct=ft(Ct)),zt=1e5*dt,pe=1e5*wt;return{top:et,zTop:1e5*Math.PI+1,out:at,zOut:Math.max(Tt,zt,pe),inn:ct,zInn:Math.max(Tt,zt,pe),side1:ht,zSide1:.99*pe,side2:lt,zSide2:.99*zt}}_.compose=function(k){let T=k.prototype;T.element3d||m(T,{Element3D:l,arc3d:y,arc3dPath:M,cuboid:d,cuboidPath:f,element3d:C,face3d:A,polyhedron:D,toLinePath:P,toLineSegments:F})}}(h||(h={})),h}),s(t,"Core/Axis/ZAxis.js",[t["Core/Axis/Axis.js"],t["Core/Defaults.js"],t["Core/Utilities.js"]],function(e,i,r){let{defaultOptions:n}=i,{addEvent:l,merge:a,pick:h,splat:c}=r;function g(b){return new p(this,b)}function u(){let b=this.options.zAxis=c(this.options.zAxis||{});this.is3d()&&(this.zAxis=[],b.forEach(v=>{this.addZAxis(v).setScale()}))}class p extends e{constructor(){super(...arguments),this.isZAxis=!0}static compose(v){let x=v.prototype;x.addZAxis||(n.zAxis=a(n.xAxis,{offset:0,lineWidth:0}),x.addZAxis=g,x.collectionsWithInit.zAxis=[x.addZAxis],x.collectionsWithUpdate.push("zAxis"),l(v,"afterGetAxes",u))}init(v,x){this.isZAxis=!0,super.init(v,x,"zAxis")}getSeriesExtremes(){this.hasVisibleSeries=!1,this.dataMin=this.dataMax=this.ignoreMinPadding=this.ignoreMaxPadding=void 0,this.stacking&&this.stacking.buildStacks(),this.series.forEach(v=>{if(v.reserveSpace()){let x=v.options.threshold;this.hasVisibleSeries=!0,this.positiveValuesOnly&&x<=0&&(x=void 0);let m=v.zData;m.length&&(this.dataMin=Math.min(h(this.dataMin,m[0]),Math.min.apply(null,m)),this.dataMax=Math.max(h(this.dataMax,m[0]),Math.max.apply(null,m)))}})}setAxisSize(){let v=this.chart;super.setAxisSize(),this.width=this.len=v.options.chart.options3d&&v.options.chart.options3d.depth||0,this.right=v.chartWidth-this.width-this.left}}return p}),s(t,"Series/Column3D/Column3DComposition.js",[t["Core/Globals.js"],t["Core/Math3D.js"],t["Core/Utilities.js"]],function(e,i,r){let{composed:n}=e,{perspective:l}=i,{addEvent:a,extend:h,pick:c,pushUnique:g,wrap:u}=r;function p(){let _=this.chart,P=this.options,F=P.depth,A=(P.stacking?P.stack||0:this.index)*(F+(P.groupZPadding||1)),D=this.borderWidth%2?.5:0,C;for(let d of(_.inverted&&!this.yAxis.reversed&&(D*=-1),P.grouping!==!1&&(A=0),A+=P.groupZPadding||1,this.points))if(d.outside3dPlot=null,d.y!==null){let f,y=h({x:0,y:0,width:0,height:0},d.shapeArgs||{}),M=[["x","width"],["y","height"]],k=d.tooltipPos;for(let T of M)if((f=y[T[0]]-D)<0&&(y[T[1]]+=y[T[0]]+D,y[T[0]]=-D,f=0),f+y[T[1]]>this[T[0]+"Axis"].len&&y[T[1]]!==0&&(y[T[1]]=this[T[0]+"Axis"].len-y[T[0]]),y[T[1]]!==0&&(y[T[0]]>=this[T[0]+"Axis"].len||y[T[0]]+y[T[1]]<=D)){for(let z in y)y[z]=z==="y"?-9999:0;d.outside3dPlot=!0}if(d.shapeType==="roundedRect"&&(d.shapeType="cuboid"),d.shapeArgs=h(y,{z:A,depth:F,insidePlotArea:!0}),C={x:y.x+y.width/2,y:y.y,z:A+F/2},_.inverted&&(C.x=y.height,C.y=d.clientX||0),d.axisXpos=C.x,d.axisYpos=C.y,d.axisZpos=C.z,d.plot3d=l([C],_,!0,!1)[0],k){let T=l([{x:k[0],y:k[1],z:A+F/2}],_,!0,!1)[0];d.tooltipPos=[T.x,T.y]}}this.z=A}function b(){if(this.chart.is3d()){let _=this.options,P=_.grouping,F=_.stacking,A=this.yAxis.options.reversedStacks,D=0;if(!(P!==void 0&&!P)){let C,d=function(y,M){let k=y.series,T={totalStacks:0},z,N=1;return k.forEach(function(G){T[z=c(G.options.stack,M?0:k.length-1-G.index)]?T[z].series.push(G):(T[z]={series:[G],position:N},N++)}),T.totalStacks=N+1,T}(this.chart,F),f=_.stack||0;for(C=0;C=90&&y.alpha<=270&&(k.y+=P.shapeArgs.width)),k=l([k],C,!0,!1)[0],D.x=k.x-M,D.y=P.outside3dPlot?-9e9:k.y}_.apply(this,[].slice.call(arguments,1))}function O(_){return!arguments[2].outside3dPlot&&_.apply(this,[].slice.call(arguments,1))}function I(_,P){let F=_.apply(this,[].slice.call(arguments,1)),A=this.axis.chart,{width:D}=P;if(A.is3d()&&this.base){let C=+this.base.split(",")[0],d=A.series[C],f=A.options.chart.options3d;if(d&&d.type==="column"){let y={x:F.x+(A.inverted?F.height:D/2),y:F.y,z:d.options.depth/2};A.inverted&&(F.width=0,f.alpha>=90&&f.alpha<=270&&(y.y+=D)),y=l([y],A,!0,!1)[0],F.x=y.x-D/2,F.y=y.y}}return F}return{compose:function(_,P){if(g(n,"Column3D")){let F=_.prototype,A=P.prototype,{column:D,columnRange:C}=_.types;if(u(F,"alignDataLabel",R),u(F,"justifyDataLabel",O),u(A,"getStackBox",I),D){let d=D.prototype,f=d.pointClass.prototype;d.translate3dPoints=()=>{},d.translate3dShapes=p,a(d,"afterInit",b),u(f,"hasNewShapeType",v),u(d,"animate",x),u(d,"plotGroup",m),u(d,"pointAttribs",E),u(d,"setState",L),u(d,"setVisible",S),u(d,"translate",w)}if(C){let d=C.prototype;u(d.pointClass.prototype,"hasNewShapeType",v),u(d,"plotGroup",m),u(d,"pointAttribs",E),u(d,"setState",L),u(d,"setVisible",S)}}}}}),s(t,"Series/Pie3D/Pie3DPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{pie:{prototype:{pointClass:i}}}=e.seriesTypes;return class extends i{haloPath(){return this.series?.chart.is3d()?[]:super.haloPath.apply(this,arguments)}}}),s(t,"Series/Pie3D/Pie3DSeries.js",[t["Core/Globals.js"],t["Series/Pie3D/Pie3DPoint.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{composed:l,deg2rad:a}=e,{pie:h}=r.seriesTypes,{extend:c,pick:g,pushUnique:u}=n;class p extends h{static compose(v){u(l,"Pie3D")&&(v.types.pie=p)}addPoint(){super.addPoint.apply(this,arguments),this.chart.is3d()&&this.update(this.userOptions,!0)}animate(v){if(this.chart.is3d()){let x=this.center,m=this.group,E=this.markerGroup,L=this.options.animation,S;L===!0&&(L={}),v?(m.oldtranslateX=g(m.oldtranslateX,m.translateX),m.oldtranslateY=g(m.oldtranslateY,m.translateY),S={translateX:x[0],translateY:x[1],scaleX:.001,scaleY:.001},m.attr(S),E&&(E.attrSetters=m.attrSetters,E.attr(S))):(S={translateX:m.oldtranslateX,translateY:m.oldtranslateY,scaleX:1,scaleY:1},m.animate(S,L),E&&E.animate(S,L))}else super.animate.apply(this,arguments)}getDataLabelPosition(v,x){let m=super.getDataLabelPosition(v,x);if(this.chart.is3d()){let E=this.chart.options.chart.options3d,L=v.shapeArgs,S=L.r,w=(L.alpha||E?.alpha)*a,R=(L.beta||E?.beta)*a,O=(L.start+L.end)/2,I=m.connectorPosition,_=-S*(1-Math.cos(w))*Math.sin(O),P=S*(Math.cos(R)-1)*Math.cos(O);for(let F of[m?.natural,I.breakAt,I.touchingSliceAt])F.x+=P,F.y+=_}return m}pointAttribs(v){let x=super.pointAttribs.apply(this,arguments),m=this.options;return this.chart.is3d()&&!this.chart.styledMode&&(x.stroke=m.edgeColor||v.color||this.color,x["stroke-width"]=g(m.edgeWidth,1)),x}translate(){if(super.translate.apply(this,arguments),!this.chart.is3d())return;let v=this.options,x=v.depth||0,m=this.chart.options.chart.options3d,E=m.alpha,L=m.beta,S=v.stacking?(v.stack||0)*x:this._i*x;for(let w of(S+=x/2,v.grouping!==!1&&(S=0),this.points)){let R=w.shapeArgs;w.shapeType="arc3d",R.z=S,R.depth=.75*x,R.alpha=E,R.beta=L,R.center=this.center;let O=(R.end+R.start)/2;w.slicedTranslation={translateX:Math.round(Math.cos(O)*v.slicedOffset*Math.cos(E*a)),translateY:Math.round(Math.sin(O)*v.slicedOffset*Math.cos(E*a))}}}drawTracker(){if(super.drawTracker.apply(this,arguments),this.chart.is3d()){for(let v of this.points)if(v.graphic)for(let x of["out","inn","side1","side2"])v.graphic&&(v.graphic[x].element.point=v)}}}return c(p.prototype,{pointClass:i}),p}),s(t,"Series/Scatter3D/Scatter3DPoint.js",[t["Series/Scatter/ScatterSeries.js"],t["Core/Utilities.js"]],function(e,i){let{pointClass:r}=e.prototype,{defined:n}=i;return class extends r{applyOptions(){return super.applyOptions.apply(this,arguments),n(this.z)||(this.z=0),this}}}),s(t,"Series/Scatter3D/Scatter3DSeriesDefaults.js",[],function(){return{tooltip:{pointFormat:"x: {point.x}
y: {point.y}
z: {point.z}
"}}}),s(t,"Series/Scatter3D/Scatter3DSeries.js",[t["Core/Math3D.js"],t["Series/Scatter3D/Scatter3DPoint.js"],t["Series/Scatter3D/Scatter3DSeriesDefaults.js"],t["Series/Scatter/ScatterSeries.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{pointCameraDistance:h}=e,{extend:c,merge:g}=a;class u extends n{pointAttribs(b){let v=super.pointAttribs.apply(this,arguments);return this.chart.is3d()&&b&&(v.zIndex=h(b,this.chart)),v}}return u.defaultOptions=g(n.defaultOptions,r),c(u.prototype,{axisTypes:["xAxis","yAxis","zAxis"],directTouch:!0,parallelArrays:["x","y","z"],pointArrayMap:["x","y","z"],pointClass:i}),l.registerSeriesType("scatter3d",u),u}),s(t,"masters/highcharts-3d.src.js",[t["Core/Globals.js"],t["Core/Chart/Chart3D.js"],t["Series/Area3D/Area3DSeries.js"],t["Core/Axis/Axis3DComposition.js"],t["Core/Renderer/RendererRegistry.js"],t["Core/Series/Series3D.js"],t["Core/Axis/Stacking/StackItem.js"],t["Core/Renderer/SVG/SVGRenderer3D.js"],t["Core/Axis/ZAxis.js"],t["Series/Column3D/Column3DComposition.js"],t["Series/Pie3D/Pie3DSeries.js"]],function(e,i,r,n,l,a,h,c,g,u,p){return r.compose(e.seriesTypes.area),n.compose(e.Axis,e.Tick),i.compose(e.Chart,e.Fx),u.compose(e.Series,h),p.compose(e.Series),a.compose(e.Series),c.compose(l.getRendererType()),g.compose(e.Chart),e})})});var Au=qe((RT,Yn)=>{"use strict";(function(o){typeof Yn=="object"&&Yn.exports?(o.default=o,Yn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/exporting",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Chart/ChartNavigationComposition.js",[],function(){var e;return function(i){i.compose=function(n){return n.navigation||(n.navigation=new r(n)),n};class r{constructor(l){this.updates=[],this.chart=l}addUpdate(l){this.chart.navigation.updates.push(l)}update(l,a){this.updates.forEach(h=>{h.call(this.chart,l,a)})}}i.Additions=r}(e||(e={})),e}),s(t,"Extensions/Exporting/ExportingDefaults.js",[t["Core/Globals.js"]],function(e){let{isTouchDevice:i}=e;return{exporting:{allowTableSorting:!0,type:"image/png",url:"https://export.highcharts.com/",pdfFont:{normal:void 0,bold:void 0,bolditalic:void 0,italic:void 0},printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",titleKey:"contextButtonTitle",menuItems:["viewFullscreen","printChart","separator","downloadPNG","downloadJPEG","downloadPDF","downloadSVG"]}},menuItemDefinitions:{viewFullscreen:{textKey:"viewFullscreen",onclick:function(){this.fullscreen&&this.fullscreen.toggle()}},printChart:{textKey:"printChart",onclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:"downloadPNG",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},downloadPDF:{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},downloadSVG:{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}}},lang:{viewFullscreen:"View in full screen",exitFullscreen:"Exit from full screen",printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"},navigation:{buttonOptions:{symbolSize:14,symbolX:14.5,symbolY:13.5,align:"right",buttonSpacing:3,height:28,verticalAlign:"top",width:28,symbolFill:"#666666",symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",padding:5,stroke:"none","stroke-linecap":"round"}},menuStyle:{border:"none",borderRadius:"3px",background:"#ffffff",padding:"0.5em"},menuItemStyle:{background:"none",borderRadius:"3px",color:"#333333",padding:"0.5em",fontSize:i?"0.9em":"0.8em",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#f2f2f2"}}}}),s(t,"Extensions/Exporting/ExportingSymbols.js",[],function(){var e;return function(i){let r=[];function n(a,h,c,g){return[["M",a,h+2.5],["L",a+c,h+2.5],["M",a,h+g/2+.5],["L",a+c,h+g/2+.5],["M",a,h+g-1.5],["L",a+c,h+g-1.5]]}function l(a,h,c,g){let u=g/3-2;return[].concat(this.circle(c-u,h,u,u),this.circle(c-u,h+u+4,u,u),this.circle(c-u,h+2*(u+4),u,u))}i.compose=function(a){if(r.indexOf(a)===-1){r.push(a);let h=a.prototype.symbols;h.menu=n,h.menuball=l.bind(h)}}}(e||(e={})),e}),s(t,"Extensions/Exporting/Fullscreen.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i,r){let{composed:n}=i,{addEvent:l,fireEvent:a,pushUnique:h}=r;function c(){this.fullscreen=new g(this)}class g{static compose(p){h(n,"Fullscreen")&&l(p,"beforeRender",c)}constructor(p){this.chart=p,this.isOpen=!1;let b=p.renderTo;!this.browserProps&&(typeof b.requestFullscreen=="function"?this.browserProps={fullscreenChange:"fullscreenchange",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen"}:b.mozRequestFullScreen?this.browserProps={fullscreenChange:"mozfullscreenchange",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen"}:b.webkitRequestFullScreen?this.browserProps={fullscreenChange:"webkitfullscreenchange",requestFullscreen:"webkitRequestFullScreen",exitFullscreen:"webkitExitFullscreen"}:b.msRequestFullscreen&&(this.browserProps={fullscreenChange:"MSFullscreenChange",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen"}))}close(){let p=this,b=p.chart,v=b.options.chart;a(b,"fullscreenClose",null,function(){p.isOpen&&p.browserProps&&b.container.ownerDocument instanceof Document&&b.container.ownerDocument[p.browserProps.exitFullscreen](),p.unbindFullscreenEvent&&(p.unbindFullscreenEvent=p.unbindFullscreenEvent()),b.setSize(p.origWidth,p.origHeight,!1),p.origWidth=void 0,p.origHeight=void 0,v.width=p.origWidthOption,v.height=p.origHeightOption,p.origWidthOption=void 0,p.origHeightOption=void 0,p.isOpen=!1,p.setButtonText()})}open(){let p=this,b=p.chart,v=b.options.chart;a(b,"fullscreenOpen",null,function(){if(v&&(p.origWidthOption=v.width,p.origHeightOption=v.height),p.origWidth=b.chartWidth,p.origHeight=b.chartHeight,p.browserProps){let x=l(b.container.ownerDocument,p.browserProps.fullscreenChange,function(){p.isOpen?(p.isOpen=!1,p.close()):(b.setSize(null,null,!1),p.isOpen=!0,p.setButtonText())}),m=l(b,"destroy",x);p.unbindFullscreenEvent=()=>{x(),m()};let E=b.renderTo[p.browserProps.requestFullscreen]();E&&E.catch(function(){alert("Full screen is not supported inside a frame.")})}})}setButtonText(){let p=this.chart,b=p.exportDivElements,v=p.options.exporting,x=v&&v.buttons&&v.buttons.contextButton.menuItems,m=p.options.lang;if(v&&v.menuItemDefinitions&&m&&m.exitFullscreen&&m.viewFullscreen&&x&&b){let E=b[x.indexOf("viewFullscreen")];E&&e.setElementHTML(E,this.isOpen?m.exitFullscreen:v.menuItemDefinitions.viewFullscreen.text||m.viewFullscreen)}}toggle(){this.isOpen?this.close():this.open()}}return g}),s(t,"Core/HttpUtilities.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{win:r}=e,{discardElement:n,objectEach:l}=i,a={ajax:function(h){let c={json:"application/json",xml:"application/xml",text:"text/plain",octet:"application/octet-stream"},g=new XMLHttpRequest;function u(p,b){h.error&&h.error(p,b)}if(!h.url)return!1;g.open((h.type||"get").toUpperCase(),h.url,!0),h.headers&&h.headers["Content-Type"]||g.setRequestHeader("Content-Type",c[h.dataType||"json"]||c.text),l(h.headers,function(p,b){g.setRequestHeader(b,p)}),h.responseType&&(g.responseType=h.responseType),g.onreadystatechange=function(){let p;if(g.readyState===4){if(g.status===200){if(h.responseType!=="blob"&&(p=g.responseText,h.dataType==="json"))try{p=JSON.parse(p)}catch(b){if(b instanceof Error)return u(g,b)}return h.success&&h.success(p,g)}u(g,g.responseText)}},h.data&&typeof h.data!="string"&&(h.data=JSON.stringify(h.data)),g.send(h.data)},getJSON:function(h,c){a.ajax({url:h,success:c,dataType:"json",headers:{"Content-Type":"text/plain"}})},post:function(h,c,g){let u=new r.FormData;l(c,function(v,x){u.append(x,v)}),u.append("b64","true");let{filename:p,type:b}=c;return r.fetch(h,xe({method:"POST",body:u},g)).then(v=>{v.ok&&v.text().then(x=>{let m=document.createElement("a");m.href=`data:${b};base64,${x}`,m.download=p,m.click(),n(m)})})}};return a}),s(t,"Extensions/Exporting/Exporting.js",[t["Core/Renderer/HTML/AST.js"],t["Core/Chart/Chart.js"],t["Core/Chart/ChartNavigationComposition.js"],t["Core/Defaults.js"],t["Extensions/Exporting/ExportingDefaults.js"],t["Extensions/Exporting/ExportingSymbols.js"],t["Extensions/Exporting/Fullscreen.js"],t["Core/Globals.js"],t["Core/HttpUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g,u){var p;let{defaultOptions:b}=n,{doc:v,SVG_NS:x,win:m}=c,{addEvent:E,css:L,createElement:S,discardElement:w,extend:R,find:O,fireEvent:I,isObject:_,merge:P,objectEach:F,pick:A,removeEvent:D,uniqueKey:C}=u;return function(d){let f,y=[/-/,/^(clipPath|cssText|d|height|width)$/,/^font$/,/[lL]ogical(Width|Height)$/,/^parentRule$/,/^(cssRules|ownerRules)$/,/perspective/,/TapHighlightColor/,/^transition/,/^length$/,/^[0-9]+$/],M=["fill","stroke","strokeLinecap","strokeLinejoin","strokeWidth","textAnchor","x","y"];d.inlineAllowlist=[];let k=["clipPath","defs","desc"];function T($){let Q,et,it=this,st=it.renderer,rt=P(it.options.navigation.buttonOptions,$),nt=rt.onclick,ot=rt.menuItems,at=rt.symbolSize||12;if(it.btnCount||(it.btnCount=0),it.exportDivElements||(it.exportDivElements=[],it.exportSVGElements=[]),rt.enabled===!1||!rt.theme)return;let ct=it.styledMode?{}:rt.theme;nt?et=function(lt){lt&<.stopPropagation(),nt.call(it,lt)}:ot&&(et=function(lt){lt&<.stopPropagation(),it.contextMenu(ht.menuClassName,ot,ht.translateX||0,ht.translateY||0,ht.width||0,ht.height||0,ht),ht.setState(2)}),rt.text&&rt.symbol?ct.paddingLeft=A(ct.paddingLeft,30):rt.text||R(ct,{width:rt.width,height:rt.height,padding:0});let ht=st.button(rt.text,0,0,et,ct,void 0,void 0,void 0,void 0,rt.useHTML).addClass($.className).attr({title:A(it.options.lang[rt._titleKey||rt.titleKey],"")});ht.menuClassName=$.menuClassName||"highcharts-menu-"+it.btnCount++,rt.symbol&&(Q=st.symbol(rt.symbol,Math.round((rt.symbolX||0)-at/2),Math.round((rt.symbolY||0)-at/2),at,at,{width:at,height:at}).addClass("highcharts-button-symbol").attr({zIndex:1}).add(ht),it.styledMode||Q.attr({stroke:rt.symbolStroke,fill:rt.symbolFill,"stroke-width":rt.symbolStrokeWidth||1})),ht.add(it.exportingGroup).align(R(rt,{width:ht.width,x:A(rt.x,it.buttonOffset)}),!0,"spacingBox"),it.buttonOffset+=((ht.width||0)+rt.buttonSpacing)*(rt.align==="right"?-1:1),it.exportSVGElements.push(ht,Q)}function z(){if(!this.printReverseInfo)return;let{childNodes:$,origDisplay:Q,resetParams:et}=this.printReverseInfo;this.moveContainers(this.renderTo),[].forEach.call($,function(it,st){it.nodeType===1&&(it.style.display=Q[st]||"")}),this.isPrinting=!1,et&&this.setSize.apply(this,et),delete this.printReverseInfo,f=void 0,I(this,"afterPrint")}function N(){let $=v.body,Q=this.options.exporting.printMaxWidth,et={childNodes:$.childNodes,origDisplay:[],resetParams:void 0};this.isPrinting=!0,this.pointer?.reset(void 0,0),I(this,"beforePrint"),Q&&this.chartWidth>Q&&(et.resetParams=[this.options.chart.width,void 0,!1],this.setSize(Q,void 0,!1)),[].forEach.call(et.childNodes,function(it,st){it.nodeType===1&&(et.origDisplay[st]=it.style.display,it.style.display="none")}),this.moveContainers($),this.printReverseInfo=et}function G($){$.renderExporting(),E($,"redraw",$.renderExporting),E($,"destroy",$.destroyExport)}function X($,Q,et,it,st,rt,nt){let ot=this,at=ot.options.navigation,ct=ot.chartWidth,ht=ot.chartHeight,lt="cache-"+$,xt=Math.max(st,rt),wt,dt=ot[lt];dt||(ot.exportContextMenu=ot[lt]=dt=S("div",{className:$},xe({position:"absolute",zIndex:1e3,padding:xt+"px",pointerEvents:"auto"},ot.renderer.style),ot.scrollablePlotArea?.fixedDiv||ot.container),wt=S("ul",{className:"highcharts-menu"},ot.styledMode?{}:{listStyle:"none",margin:0,padding:0},dt),ot.styledMode||L(wt,R({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},at.menuStyle)),dt.hideMenu=function(){L(dt,{display:"none"}),nt&&nt.setState(0),ot.openMenu=!1,L(ot.renderTo,{overflow:"hidden"}),L(ot.container,{overflow:"hidden"}),u.clearTimeout(dt.hideTimer),I(ot,"exportMenuHidden")},ot.exportEvents.push(E(dt,"mouseleave",function(){dt.hideTimer=m.setTimeout(dt.hideMenu,500)}),E(dt,"mouseenter",function(){u.clearTimeout(dt.hideTimer)}),E(v,"mouseup",function(ft){ot.pointer?.inClass(ft.target,$)||dt.hideMenu()}),E(dt,"click",function(){ot.openMenu&&dt.hideMenu()})),Q.forEach(function(ft){if(typeof ft=="string"&&(ft=ot.options.exporting.menuItemDefinitions[ft]),_(ft,!0)){let Tt;ft.separator?Tt=S("hr",void 0,void 0,wt):(ft.textKey==="viewData"&&ot.isDataTableVisible&&(ft.textKey="hideData"),Tt=S("li",{className:"highcharts-menu-item",onclick:function(zt){zt&&zt.stopPropagation(),dt.hideMenu(),typeof ft!="string"&&ft.onclick&&ft.onclick.apply(ot,arguments)}},void 0,wt),e.setElementHTML(Tt,ft.text||ot.options.lang[ft.textKey]),ot.styledMode||(Tt.onmouseover=function(){L(this,at.menuItemHoverStyle)},Tt.onmouseout=function(){L(this,at.menuItemStyle)},L(Tt,R({cursor:"pointer"},at.menuItemStyle||{})))),ot.exportDivElements.push(Tt)}}),ot.exportDivElements.push(wt,dt),ot.exportMenuWidth=dt.offsetWidth,ot.exportMenuHeight=dt.offsetHeight);let Ct={display:"block"};et+(ot.exportMenuWidth||0)>ct?Ct.right=ct-et-st-xt+"px":Ct.left=et-xt+"px",it+rt+(ot.exportMenuHeight||0)>ht&&nt.alignOptions?.verticalAlign!=="top"?Ct.bottom=ht-it-xt+"px":Ct.top=it+rt-xt+"px",L(dt,Ct),L(ot.renderTo,{overflow:""}),L(ot.container,{overflow:""}),ot.openMenu=!0,I(ot,"exportMenuShown")}function j($){let Q,et=$?$.target:this,it=et.exportSVGElements,st=et.exportDivElements,rt=et.exportEvents;it&&(it.forEach((nt,ot)=>{nt&&(nt.onclick=nt.ontouchstart=null,et[Q="cache-"+nt.menuClassName]&&delete et[Q],it[ot]=nt.destroy())}),it.length=0),et.exportingGroup&&(et.exportingGroup.destroy(),delete et.exportingGroup),st&&(st.forEach(function(nt,ot){nt&&(u.clearTimeout(nt.hideTimer),D(nt,"mouseleave"),st[ot]=nt.onmouseout=nt.onmouseover=nt.ontouchstart=nt.onclick=null,w(nt))}),st.length=0),rt&&(rt.forEach(function(nt){nt()}),rt.length=0)}function B($,Q){let et=this.getSVGForExport($,Q);$=P(this.options.exporting,$),g.post($.url,{filename:$.filename?$.filename.replace(/\//g,"-"):this.getFilename(),type:$.type,width:$.width,scale:$.scale,svg:et},$.fetchOptions)}function W(){return this.styledMode&&this.inlineStyles(),this.container.innerHTML}function Y(){let $=this.userOptions.title&&this.userOptions.title.text,Q=this.options.exporting.filename;return Q?Q.replace(/\//g,"-"):(typeof $=="string"&&(Q=$.toLowerCase().replace(/<\/?[^>]+(>|$)/g,"").replace(/[\s_]+/g,"-").replace(/[^a-z0-9\-]/g,"").replace(/^[\-]+/g,"").replace(/[\-]+/g,"-").substr(0,24).replace(/[\-]+$/g,"")),(!Q||Q.length<5)&&(Q="chart"),Q)}function U($){let Q,et,it=P(this.options,$);it.plotOptions=P(this.userOptions.plotOptions,$&&$.plotOptions),it.time=P(this.userOptions.time,$&&$.time);let st=S("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},v.body),rt=this.renderTo.style.width,nt=this.renderTo.style.height,ot=it.exporting.sourceWidth||it.chart.width||/px$/.test(rt)&&parseInt(rt,10)||(it.isGantt?800:600),at=it.exporting.sourceHeight||it.chart.height||/px$/.test(nt)&&parseInt(nt,10)||400;R(it.chart,{animation:!1,renderTo:st,forExport:!0,renderer:"SVGRenderer",width:ot,height:at}),it.exporting.enabled=!1,delete it.data,it.series=[],this.series.forEach(function(lt){(et=P(lt.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:lt.visible})).isInternal||it.series.push(et)});let ct={};this.axes.forEach(function(lt){lt.userOptions.internalKey||(lt.userOptions.internalKey=C()),lt.options.isInternal||(ct[lt.coll]||(ct[lt.coll]=!0,it[lt.coll]=[]),it[lt.coll].push(P(lt.userOptions,{visible:lt.visible})))}),it.colorAxis=this.userOptions.colorAxis;let ht=new this.constructor(it,this.callback);return $&&["xAxis","yAxis","series"].forEach(function(lt){let xt={};$[lt]&&(xt[lt]=$[lt],ht.update(xt))}),this.axes.forEach(function(lt){let xt=O(ht.axes,function(ft){return ft.options.internalKey===lt.userOptions.internalKey}),wt=lt.getExtremes(),dt=wt.userMin,Ct=wt.userMax;xt&&(dt!==void 0&&dt!==xt.min||Ct!==void 0&&Ct!==xt.max)&&xt.setExtremes(dt,Ct,!0,!1)}),Q=ht.getChartHTML(),I(this,"getSVG",{chartCopy:ht}),Q=this.sanitizeSVG(Q,it),it=null,ht.destroy(),w(st),Q}function q($,Q){let et=this.options.exporting;return this.getSVG(P({chart:{borderRadius:0}},et.chartOptions,Q,{exporting:{sourceWidth:$&&$.sourceWidth||et.sourceWidth,sourceHeight:$&&$.sourceHeight||et.sourceHeight}}))}function H(){let $,Q=d.inlineAllowlist,et={},it=v.createElement("iframe");L(it,{width:"1px",height:"1px",visibility:"hidden"}),v.body.appendChild(it);let st=it.contentWindow&&it.contentWindow.document;st&&st.body.appendChild(st.createElementNS(x,"svg")),function rt(nt){let ot,at,ct,ht,lt,xt,wt={};if(st&&nt.nodeType===1&&k.indexOf(nt.nodeName)===-1){if(ot=m.getComputedStyle(nt,null),at=nt.nodeName==="svg"?{}:m.getComputedStyle(nt.parentNode,null),!et[nt.nodeName]){$=st.getElementsByTagName("svg")[0],ct=st.createElementNS(nt.namespaceURI,nt.nodeName),$.appendChild(ct);let dt=m.getComputedStyle(ct,null),Ct={};for(let ft in dt)ft.length<1e3&&typeof dt[ft]=="string"&&!/^[0-9]+$/.test(ft)&&(Ct[ft]=dt[ft]);et[nt.nodeName]=Ct,nt.nodeName==="text"&&delete et.text.fill,$.removeChild(ct)}for(let dt in ot)(c.isFirefox||c.isMS||c.isSafari||Object.hasOwnProperty.call(ot,dt))&&function(Ct,ft){if(ht=lt=!1,Q.length){for(xt=Q.length;xt--&&!lt;)lt=Q[xt].test(ft);ht=!lt}for(ft==="transform"&&Ct==="none"&&(ht=!0),xt=y.length;xt--&&!ht;){if(ft.length>1e3)throw Error("Input too long");ht=y[xt].test(ft)||typeof Ct=="function"}!ht&&(at[ft]!==Ct||nt.nodeName==="svg")&&et[nt.nodeName][ft]!==Ct&&(M&&M.indexOf(ft)===-1?wt[ft]=Ct:Ct&&nt.setAttribute(ft.replace(/([A-Z])/g,function(Tt,zt){return"-"+zt.toLowerCase()}),Ct))}(ot[dt],dt);if(L(nt,wt),nt.nodeName==="svg"&&nt.setAttribute("stroke-width","1px"),nt.nodeName==="text")return;[].forEach.call(nt.children||nt.childNodes,rt)}}(this.container.querySelector("svg")),$.parentNode.removeChild($),it.parentNode.removeChild(it)}function V($){let{scrollablePlotArea:Q}=this;(Q?[Q.fixedDiv,Q.scrollingContainer]:[this.container]).forEach(function(et){$.appendChild(et)})}function Z(){let $=this,Q=(et,it,st)=>{$.isDirtyExporting=!0,P(!0,$.options[et],it),A(st,!0)&&$.redraw()};$.exporting={update:function(et,it){Q("exporting",et,it)}},r.compose($).navigation.addUpdate((et,it)=>{Q("navigation",et,it)})}function K(){let $=this;$.isPrinting||(f=$,c.isSafari||$.beforePrint(),setTimeout(()=>{m.focus(),m.print(),c.isSafari||setTimeout(()=>{$.afterPrint()},1e3)},1))}function J(){let $=this,Q=$.options.exporting,et=Q.buttons,it=$.isDirtyExporting||!$.exportSVGElements;$.buttonOffset=0,$.isDirtyExporting&&$.destroyExport(),it&&Q.enabled!==!1&&($.exportEvents=[],$.exportingGroup=$.exportingGroup||$.renderer.g("exporting-group").attr({zIndex:3}).add(),F(et,function(st){$.addButton(st)}),$.isDirtyExporting=!1)}function tt($,Q){let et=$.indexOf("")+6,it=$.substr(et);return $=$.substr(0,et),Q&&Q.exporting&&Q.exporting.allowHTML&&it&&(it=''+it.replace(/(<(?:img|br).*?(?=\>))>/g,"$1 />")+"",$=$.replace("",it+"")),$=$.replace(/zIndex="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(.*?)("|")\;?\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/{"use strict";(function(o){typeof Vn=="object"&&Vn.exports?(o.default=o,Vn.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/stock",["highcharts"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Series/DataModifyComposition.js",[t["Core/Axis/Axis.js"],t["Core/Series/Point.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{tooltipFormatter:a}=i.prototype,{addEvent:h,arrayMax:c,arrayMin:g,correctFloat:u,defined:p,isArray:b,isNumber:v,isString:x,pick:m}=n;return function(E){function L(D,C,d){!this.isXAxis&&(this.series.forEach(function(f){D==="compare"&&typeof C!="boolean"?f.setCompare(C,!1):D!=="cumulative"||x(C)||f.setCumulative(C,!1)}),m(d,!0)&&this.chart.redraw())}function S(D){let C=this,{numberFormatter:d}=C.series.chart,f=function(y){D=D.replace("{point."+y+"}",(C[y]>0&&y==="change"?"+":"")+d(C[y],m(C.series.tooltipOptions.changeDecimals,2)))};return p(C.change)&&f("change"),p(C.cumulativeSum)&&f("cumulativeSum"),a.apply(this,[D])}function w(){let D,C=this.options.compare;(C==="percent"||C==="value"||this.options.cumulative)&&(D=new A(this),C==="percent"||C==="value"?D.initCompare(C):D.initCumulative()),this.dataModify=D}function R(D){let C=D.dataExtremes,d=C.activeYData;if(this.dataModify&&C){let f;this.options.compare?f=[this.dataModify.modifyValue(C.dataMin),this.dataModify.modifyValue(C.dataMax)]:this.options.cumulative&&b(d)&&d.length>=2&&(f=A.getCumulativeExtremes(d)),f&&(C.dataMin=g(f),C.dataMax=c(f))}}function O(D,C){this.options.compare=this.userOptions.compare=D,this.update({},m(C,!0)),this.dataModify&&(D==="value"||D==="percent")?this.dataModify.initCompare(D):this.points.forEach(d=>{delete d.change})}function I(){if(this.xAxis&&this.processedYData&&this.dataModify){let D=this.processedXData,C=this.processedYData,d=C.length,f=this.options.compareStart===!0?0:1,y=-1,M;for(this.pointArrayMap&&(y=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y")),M=0;M-1?C[M][y]:C[M];if(v(k)&&k!==0&&D[M+f]>=(this.xAxis.min||0)){this.dataModify.compareValue=k;break}}}}function _(D,C){this.setModifier("compare",D,C)}function P(D,C){D=m(D,!1),this.options.cumulative=this.userOptions.cumulative=D,this.update({},m(C,!0)),this.dataModify?this.dataModify.initCumulative():this.points.forEach(d=>{delete d.cumulativeSum})}function F(D,C){this.setModifier("cumulative",D,C)}E.compose=function(D,C,d){let f=C.prototype,y=d.prototype,M=D.prototype;return M.setCompare||(M.setCompare=O,M.setCumulative=P,h(D,"afterInit",w),h(D,"afterGetExtremes",R),h(D,"afterProcessData",I)),f.setCompare||(f.setCompare=_,f.setModifier=L,f.setCumulative=F,y.tooltipFormatter=S),D};class A{constructor(C){this.series=C}modifyValue(){return 0}static getCumulativeExtremes(C){let d=1/0,f=-1/0;return C.reduce((y,M)=>{let k=y+M;return d=Math.min(d,k,y),f=Math.max(f,k,y),k}),[d,f]}initCompare(C){this.modifyValue=function(d,f){d===null&&(d=0);let y=this.compareValue;if(d!==void 0&&y!==void 0){if(C==="value"?d-=y:d=d/y*100-(this.series.options.compareBase===100?0:100),f!==void 0){let M=this.series.points[f];M&&(M.change=d)}return d}return 0}}initCumulative(){this.modifyValue=function(C,d){if(C===null&&(C=0),C!==void 0&&d!==void 0){let f=d>0?this.series.points[d-1]:null;f&&f.cumulativeSum&&(C=u(f.cumulativeSum+C));let y=this.series.points[d],M=y.series.options.cumulativeStart,k=y.x<=this.series.xAxis.max&&y.x>=this.series.xAxis.min;return y&&(!M||k?y.cumulativeSum=C:y.cumulativeSum=void 0),C}return 0}}}E.Additions=A}(l||(l={})),l}),s(t,"Stock/Navigator/ChartNavigatorComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let r,{isTouchDevice:n}=e,{addEvent:l,merge:a,pick:h}=i,c=[];function g(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function u(){let E,L,S,w=this.legend,R=this.navigator;if(R){E=w&&w.options,L=R.xAxis,S=R.yAxis;let{scrollbarHeight:O,scrollButtonSize:I}=R;this.inverted?(R.left=R.opposite?this.chartWidth-O-R.height:this.spacing[3]+O,R.top=this.plotTop+I):(R.left=h(L.left,this.plotLeft+I),R.top=R.navigatorOptions.top||this.chartHeight-R.height-O-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(E&&E.verticalAlign==="bottom"&&E.layout!=="proximate"&&E.enabled&&!E.floating?w.legendHeight+h(E.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),L&&S&&(this.inverted?L.options.left=S.options.left=R.left:L.options.top=S.options.top=R.top,L.setAxisSize(),S.setAxisSize())}}function p(E){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new r(this),h(E.redraw,!0)&&this.redraw(E.animation))}function b(){let E=this.options;(E.navigator.enabled||E.scrollbar.enabled)&&(this.scroller=this.navigator=new r(this))}function v(){let E=this.options,L=E.navigator,S=E.rangeSelector;if((L&&L.enabled||S&&S.enabled)&&(!n&&this.zooming.type==="x"||n&&this.zooming.pinchType==="x"))return!1}function x(E){let L=E.navigator;if(L&&E.xAxis[0]){let S=E.xAxis[0].getExtremes();L.render(S.min,S.max)}}function m(E){let L=E.options.navigator||{},S=E.options.scrollbar||{};!this.navigator&&!this.scroller&&(L.enabled||S.enabled)&&(a(!0,this.options.navigator,L),a(!0,this.options.scrollbar,S),delete E.options.navigator,delete E.options.scrollbar)}return{compose:function(E,L){if(i.pushUnique(c,E)){let S=E.prototype;r=L,S.callbacks.push(x),l(E,"afterAddSeries",g),l(E,"afterSetChartSize",u),l(E,"afterUpdate",p),l(E,"beforeRender",b),l(E,"beforeShowResetZoom",v),l(E,"update",m)}}}}),s(t,"Core/Axis/NavigatorAxisComposition.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){let{isTouchDevice:r}=e,{addEvent:n,correctFloat:l,defined:a,isNumber:h,pick:c}=i;function g(){this.navigatorAxis||(this.navigatorAxis=new p(this))}function u(b){let v,x=this.chart,m=x.options,E=m.navigator,L=this.navigatorAxis,S=x.zooming.pinchType,w=m.rangeSelector,R=x.zooming.type;if(this.isXAxis&&(E?.enabled||w?.enabled)){if(R==="y"&&b.trigger==="zoom")v=!1;else if((b.trigger==="zoom"&&R==="xy"||r&&S==="xy")&&this.options.range){let O=L.previousZoom;a(b.min)?L.previousZoom=[this.min,this.max]:O&&(b.min=O[0],b.max=O[1],L.previousZoom=void 0)}}v!==void 0&&b.preventDefault()}class p{static compose(v){v.keepProps.includes("navigatorAxis")||(v.keepProps.push("navigatorAxis"),n(v,"init",g),n(v,"setExtremes",u))}constructor(v){this.axis=v}destroy(){this.axis=void 0}toFixedRange(v,x,m,E){let L=this.axis,S=(L.pointRange||0)/2,w=c(m,L.translate(v,!0,!L.horiz)),R=c(E,L.translate(x,!0,!L.horiz));return a(m)||(w=l(w+S)),a(E)||(R=l(R-S)),h(w)&&h(R)||(w=R=void 0),{min:w,max:R}}}return p}),s(t,"Stock/Navigator/NavigatorDefaults.js",[t["Core/Color/Color.js"],t["Core/Series/SeriesRegistry.js"]],function(e,i){let{parse:r}=e,{seriesTypes:n}=i;return{height:40,margin:25,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:r("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:n.areaspline===void 0?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),s(t,"Stock/Navigator/NavigatorSymbols.js",[t["Core/Renderer/SVG/Symbols.js"],t["Core/Utilities.js"]],function(e,i){let{relativeLength:r}=i;return{"navigator-handle":function(n,l,a,h,c={}){let g=c.width?c.width/2:a,u=r(c.borderRadius||0,Math.min(2*g,h));return[["M",-1.5,(h=c.height||h)/2-3.5],["L",-1.5,h/2+4.5],["M",.5,h/2-3.5],["L",.5,h/2+4.5],...e.rect(-g-1,.5,2*g+1,h,{r:u})]}}}),s(t,"Stock/Utilities/StockUtilities.js",[t["Core/Utilities.js"]],function(e){let{defined:i}=e;return{setFixedRange:function(r){let n=this.xAxis[0];i(n.dataMax)&&i(n.dataMin)&&r?this.fixedRange=Math.min(r,n.dataMax-n.dataMin):this.fixedRange=r}}}),s(t,"Stock/Navigator/NavigatorComposition.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/NavigatorAxisComposition.js"],t["Stock/Navigator/NavigatorDefaults.js"],t["Stock/Navigator/NavigatorSymbols.js"],t["Core/Renderer/RendererRegistry.js"],t["Stock/Utilities/StockUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{setOptions:g}=e,{composed:u}=i,{getRendererType:p}=a,{setFixedRange:b}=h,{addEvent:v,extend:x,pushUnique:m}=c;function E(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}return{compose:function(L,S,w){r.compose(S),m(u,"Navigator")&&(L.prototype.setFixedRange=b,x(p().prototype.symbols,l),v(w,"afterUpdate",E),g({navigator:n}))}}}),s(t,"Core/Axis/ScrollbarAxis.js",[t["Core/Globals.js"],t["Core/Utilities.js"]],function(e,i){var r;let{composed:n}=e,{addEvent:l,defined:a,pick:h,pushUnique:c}=i;return function(g){let u;function p(m){let E=h(m.options&&m.options.min,m.min),L=h(m.options&&m.options.max,m.max);return{axisMin:E,axisMax:L,scrollMin:a(m.dataMin)?Math.min(E,m.min,m.dataMin,h(m.threshold,1/0)):E,scrollMax:a(m.dataMax)?Math.max(L,m.max,m.dataMax,h(m.threshold,-1/0)):L}}function b(){let m=this.scrollbar,E=m&&!m.options.opposite,L=this.horiz?2:E?3:1;m&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[L]+=m.size+(m.options.margin||0))}function v(){let m=this;m.options&&m.options.scrollbar&&m.options.scrollbar.enabled&&(m.options.scrollbar.vertical=!m.horiz,m.options.startOnTick=m.options.endOnTick=!1,m.scrollbar=new u(m.chart.renderer,m.options.scrollbar,m.chart),l(m.scrollbar,"changed",function(E){let L,S,{axisMin:w,axisMax:R,scrollMin:O,scrollMax:I}=p(m),_=I-O;if(a(w)&&a(R))if(m.horiz&&!m.reversed||!m.horiz&&m.reversed?(L=O+_*this.to,S=O+_*this.from):(L=O+_*(1-this.from),S=O+_*(1-this.to)),this.shouldUpdateExtremes(E.DOMType)){let P=E.DOMType!=="mousemove"&&E.DOMType!=="touchmove"&&void 0;m.setExtremes(S,L,!0,P,E)}else this.setRange(this.from,this.to)}))}function x(){let m,E,L,{scrollMin:S,scrollMax:w}=p(this),R=this.scrollbar,O=this.axisTitleMargin+(this.titleOffset||0),I=this.chart.scrollbarsOffsets,_=this.options.margin||0;if(R&&I){if(this.horiz)this.opposite||(I[1]+=O),R.position(this.left,this.top+this.height+2+I[1]-(this.opposite?_:0),this.width,this.height),this.opposite||(I[1]+=_),m=1;else{let P;this.opposite&&(I[0]+=O),P=R.options.opposite?this.left+this.width+2+I[0]-(this.opposite?0:_):this.opposite?0:_,R.position(P,this.top,this.width,this.height),this.opposite&&(I[0]+=_),m=0}I[m]+=R.size+(R.options.margin||0),isNaN(S)||isNaN(w)||!a(this.min)||!a(this.max)||this.min===this.max?R.setRange(0,1):(E=(this.min-S)/(w-S),L=(this.max-S)/(w-S),this.horiz&&!this.reversed||!this.horiz&&this.reversed?R.setRange(E,L):R.setRange(1-L,1-E))}}g.compose=function(m,E){c(n,"Axis.Scrollbar")&&(u=E,l(m,"afterGetOffset",b),l(m,"afterInit",v),l(m,"afterRender",x))}}(r||(r={})),r}),s(t,"Stock/Scrollbar/ScrollbarDefaults.js",[],function(){return{height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1}}),s(t,"Stock/Scrollbar/Scrollbar.js",[t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/ScrollbarAxis.js"],t["Stock/Scrollbar/ScrollbarDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{defaultOptions:a}=e,{addEvent:h,correctFloat:c,crisp:g,defined:u,destroyObjectProperties:p,fireEvent:b,merge:v,pick:x,removeEvent:m}=l;class E{static compose(S){r.compose(S,E)}static swapXY(S,w){return w&&S.forEach(R=>{let O,I=R.length;for(let _=0;_this.calculatedWidth?w.minWidth:0;return{chartX:(S.chartX-this.x-this.xOffset)/(this.barWidth-R),chartY:(S.chartY-this.y-this.yOffset)/(this.barWidth-R)}}destroy(){let S=this,w=S.chart.scroller;S.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(R){S[R]&&S[R].destroy&&(S[R]=S[R].destroy())}),w&&S===w.scrollbar&&(w.scrollbar=null,p(w.scrollbarButtons))}drawScrollbarButton(S){let w=this.renderer,R=this.scrollbarButtons,O=this.options,I=this.size,_=w.g().add(this.group);if(R.push(_),O.buttonsEnabled){let P=w.rect().addClass("highcharts-scrollbar-button").add(_);this.chart.styledMode||P.attr({stroke:O.buttonBorderColor,"stroke-width":O.buttonBorderWidth,fill:O.buttonBackgroundColor}),P.attr(P.crisp({x:-.5,y:-.5,width:I,height:I,r:O.buttonBorderRadius},P.strokeWidth()));let F=w.path(E.swapXY([["M",I/2+(S?-1:1),I/2-3],["L",I/2+(S?-1:1),I/2+3],["L",I/2+(S?2:-2),I/2]],O.vertical)).addClass("highcharts-scrollbar-arrow").add(R[S]);this.chart.styledMode||F.attr({fill:O.buttonArrowColor})}}init(S,w,R){this.scrollbarButtons=[],this.renderer=S,this.userOptions=w,this.options=v(n,a.scrollbar,w),this.options.margin=x(this.options.margin,10),this.chart=R,this.size=x(this.options.size,this.options.height),w.enabled&&(this.render(),this.addEvents())}mouseDownHandler(S){let w=this.chart.pointer?.normalize(S)||S,R=this.cursorToScrollbarPosition(w);this.chartX=R.chartX,this.chartY=R.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(S){let w,R=this.chart.pointer?.normalize(S)||S,O=this.options.vertical?"chartY":"chartX",I=this.initPositions||[];this.grabbedCenter&&(!S.touches||S.touches[0][O]!==0)&&(w=this.cursorToScrollbarPosition(R)[O]-this[O],this.hasDragged=!0,this.updatePosition(I[0]+w,I[1]+w),this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:S.type,DOMEvent:S}))}mouseUpHandler(S){this.hasDragged&&b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:S.type,DOMEvent:S}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(S,w,R,O){let{buttonsEnabled:I,margin:_=0,vertical:P}=this.options,F=this.rendered?"animate":"attr",A=O,D=0;this.group.show(),this.x=S,this.y=w+this.trackBorderWidth,this.width=R,this.height=O,this.xOffset=A,this.yOffset=D,P?(this.width=this.yOffset=R=D=this.size,this.xOffset=A=0,this.yOffset=D=I?this.size:0,this.barWidth=O-(I?2*R:0),this.x=S+=_):(this.height=O=this.size,this.xOffset=A=I?this.size:0,this.barWidth=R-(I?2*O:0),this.y=this.y+_),this.group[F]({translateX:S,translateY:this.y}),this.track[F]({width:R,height:O}),this.scrollbarButtons[1][F]({translateX:P?0:R-A,translateY:P?O-D:0})}removeEvents(){this._events.forEach(function(S){m.apply(null,S)}),this._events.length=0}render(){let S=this.renderer,w=this.options,R=this.size,O=this.chart.styledMode,I=S.g("scrollbar").attr({zIndex:w.zIndex}).hide().add();this.group=I,this.track=S.rect().addClass("highcharts-scrollbar-track").attr({r:w.trackBorderRadius||0,height:R,width:R}).add(I),O||this.track.attr({fill:w.trackBackgroundColor,stroke:w.trackBorderColor,"stroke-width":w.trackBorderWidth});let _=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-g(0,_),y:-g(0,_)}),this.scrollbarGroup=S.g().add(I),this.scrollbar=S.rect().addClass("highcharts-scrollbar-thumb").attr({height:R-_,width:R-_,r:w.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=S.path(E.swapXY([["M",-3,R/4],["L",-3,2*R/3],["M",0,R/4],["L",0,2*R/3],["M",3,R/4],["L",3,2*R/3]],w.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),O||(this.scrollbar.attr({fill:w.barBackgroundColor,stroke:w.barBorderColor,"stroke-width":w.barBorderWidth}),this.scrollbarRifles.attr({stroke:w.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-g(0,this.scrollbarStrokeWidth),-g(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(S,w){let R,O,I=this.options,_=I.vertical,P=I.minWidth,F=this.barWidth,A=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!u(F))return;let D=F*Math.min(w,1);R=Math.ceil(F*(S=Math.max(S,0))),this.calculatedWidth=O=c(D-R),O=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(S){return x(this.options.liveRedraw,i.svg&&!i.isTouchDevice&&!this.chart.boosted)||S==="mouseup"||S==="touchend"||!u(S)}trackClick(S){let w=this.chart.pointer?.normalize(S)||S,R=this.to-this.from,O=this.y+this.scrollbarTop,I=this.x+this.scrollbarLeft;this.options.vertical&&w.chartY>O||!this.options.vertical&&w.chartX>I?this.updatePosition(this.from+R,this.to+R):this.updatePosition(this.from-R,this.to-R),b(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:S})}update(S){this.destroy(),this.init(this.chart.renderer,v(!0,this.options,S),this.chart)}updatePosition(S,w){w>1&&(S=c(1-c(w-S)),w=1),S<0&&(w=c(w-S),S=0),this.from=S,this.to=w}}return E.defaultOptions=n,a.scrollbar=v(!0,E.defaultOptions,a.scrollbar),E}),s(t,"Stock/Navigator/Navigator.js",[t["Core/Axis/Axis.js"],t["Stock/Navigator/ChartNavigatorComposition.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Core/Axis/NavigatorAxisComposition.js"],t["Stock/Navigator/NavigatorComposition.js"],t["Stock/Scrollbar/Scrollbar.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{defaultOptions:g}=r,{isTouchDevice:u}=n,{addEvent:p,clamp:b,correctFloat:v,defined:x,destroyObjectProperties:m,erase:E,extend:L,find:S,fireEvent:w,isArray:R,isNumber:O,merge:I,pick:_,removeEvent:P,splat:F}=c;function A(C,...d){let f=[].filter.call(d,O);if(f.length)return Math[C].apply(0,f)}class D{static compose(d,f,y){i.compose(d,D),a.compose(d,f,y)}constructor(d){this.scrollbarHeight=0,this.init(d)}drawHandle(d,f,y,M){let k=this.navigatorOptions.handles.height;this.handles[f][M](y?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(d,10)+.5-k)}:{translateX:Math.round(this.left+parseInt(d,10)),translateY:Math.round(this.top+this.height/2-k/2-1)})}drawOutline(d,f,y,M){let k=this.navigatorOptions.maskInside,T=this.outline.strokeWidth(),z=T/2,N=T%2/2,G=this.scrollButtonSize,X=this.size,j=this.top,B=this.height,W=j-z,Y=j+B,U=this.left,q,H;y?(q=j+f+N,f=j+d+N,H=[["M",U+B,j-G-N],["L",U+B,q],["L",U,q],["M",U,f],["L",U+B,f],["L",U+B,j+X+G]],k&&H.push(["M",U+B,q-z],["L",U+B,f+z])):(U-=G,d+=U+G-N,f+=U+G-N,H=[["M",U,W],["L",d,W],["L",d,Y],["M",f,Y],["L",f,W],["L",U+X+2*G,j+z]],k&&H.push(["M",d-z,W],["L",f+z,W])),this.outline[M]({d:H})}drawMasks(d,f,y,M){let k,T,z,N,G=this.left,X=this.top,j=this.height;y?(z=[G,G,G],N=[X,X+d,X+f],T=[j,j,j],k=[d,f-d,this.size-f]):(z=[G,G+d,G+f],N=[X,X,X],T=[d,f-d,this.size-f],k=[j,j,j]),this.shades.forEach((B,W)=>{B[M]({x:z[W],y:N[W],width:T[W],height:k[W]})})}renderElements(){let d=this,f=d.navigatorOptions,y=f.maskInside,M=d.chart,k=M.inverted,T=M.renderer,z={cursor:k?"ns-resize":"ew-resize"},N=d.navigatorGroup=T.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();if([!y,y,!y].forEach((G,X)=>{let j=T.rect().addClass("highcharts-navigator-mask"+(X===1?"-inside":"-outside")).add(N);M.styledMode||(j.attr({fill:G?f.maskFill:"rgba(0,0,0,0)"}),X===1&&j.css(z)),d.shades[X]=j}),d.outline=T.path().addClass("highcharts-navigator-outline").add(N),M.styledMode||d.outline.attr({"stroke-width":f.outlineWidth,stroke:f.outlineColor}),f.handles&&f.handles.enabled){let G=f.handles,{height:X,width:j}=G;[0,1].forEach(B=>{d.handles[B]=T.symbol(G.symbols[B],-j/2-1,0,j,X,G),M.inverted&&d.handles[B].attr({rotation:90,rotationOriginX:Math.floor(-j/2),rotationOriginY:(X+j)/2}),d.handles[B].attr({zIndex:7-B}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][B]).add(N),M.styledMode||d.handles[B].attr({fill:G.backgroundColor,stroke:G.borderColor,"stroke-width":G.lineWidth}).css(z)})}}update(d){(this.series||[]).forEach(f=>{f.baseSeries&&delete f.baseSeries.navigatorSeries}),this.destroy(),I(!0,this.chart.options.navigator,d),this.init(this.chart)}render(d,f,y,M){let k=this.chart,T=this.xAxis,z=T.pointRange||0,N=T.navigatorAxis.fake?k.xAxis[0]:T,G=this.navigatorEnabled,X=this.rendered,j=k.inverted,B=k.xAxis[0].minRange,W=k.xAxis[0].options.maxRange,Y=this.scrollButtonSize,U,q,H,V=this.scrollbarHeight,Z,K;if(this.hasDragged&&!x(y))return;if(d=v(d-z/2),f=v(f+z/2),!O(d)||!O(f)){if(!X)return;y=0,M=_(T.width,N.width)}this.left=_(T.left,k.plotLeft+Y+(j?k.plotWidth:0));let J=this.size=Z=_(T.len,(j?k.plotHeight:k.plotWidth)-2*Y);U=j?V:Z+2*Y,y=_(y,T.toPixels(d,!0)),M=_(M,T.toPixels(f,!0)),O(y)&&Math.abs(y)!==1/0||(y=0,M=U);let tt=T.toValue(y,!0),$=T.toValue(M,!0),Q=Math.abs(v($-tt));QW&&(this.grabbedLeft?y=T.toPixels($-W-z,!0):this.grabbedRight&&(M=T.toPixels(tt+W+z,!0))),this.zoomedMax=b(Math.max(y,M),0,J),this.zoomedMin=b(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(y,M),0,J),this.range=this.zoomedMax-this.zoomedMin,J=Math.round(this.zoomedMax);let et=Math.round(this.zoomedMin);G&&(this.navigatorGroup.attr({visibility:"inherit"}),K=X&&!this.hasDragged?"animate":"attr",this.drawMasks(et,J,j,K),this.drawOutline(et,J,j,K),this.navigatorOptions.handles.enabled&&(this.drawHandle(et,0,j,K),this.drawHandle(J,1,j,K))),this.scrollbar&&(j?(H=this.top-Y,q=this.left-V+(G||!N.opposite?0:(N.titleOffset||0)+N.axisTitleMargin),V=Z+2*Y):(H=this.top+(G?this.height:-V),q=this.left-Y),this.scrollbar.position(q,H,U,V),this.scrollbar.setRange(this.zoomedMin/(Z||1),this.zoomedMax/(Z||1))),this.rendered=!0,w(this,"afterRender")}addMouseEvents(){let d=this,f=d.chart,y=f.container,M=[],k,T;d.mouseMoveHandler=k=function(z){d.onMouseMove(z)},d.mouseUpHandler=T=function(z){d.onMouseUp(z)},(M=d.getPartsEvents("mousedown")).push(p(f.renderTo,"mousemove",k),p(y.ownerDocument,"mouseup",T),p(f.renderTo,"touchmove",k),p(y.ownerDocument,"touchend",T)),M.concat(d.getPartsEvents("touchstart")),d.eventsToUnbind=M,d.series&&d.series[0]&&M.push(p(d.series[0].xAxis,"foundExtremes",function(){f.navigator.modifyNavigatorAxisExtremes()}))}getPartsEvents(d){let f=this,y=[];return["shades","handles"].forEach(function(M){f[M].forEach(function(k,T){y.push(p(k.element,d,function(z){f[M+"Mousedown"](z,T)}))})}),y}shadesMousedown(d,f){d=this.chart.pointer?.normalize(d)||d;let y=this.chart,M=this.xAxis,k=this.zoomedMin,T=this.size,z=this.range,N=this.left,G=d.chartX,X,j,B,W;y.inverted&&(G=d.chartY,N=this.top),f===1?(this.grabbedCenter=G,this.fixedWidth=z,this.dragOffset=G-k):(W=G-N-z/2,f===0?W=Math.max(0,W):f===2&&W+z>=T&&(W=T-z,this.reversedExtremes?(W-=z,j=this.getUnionExtremes().dataMin):X=this.getUnionExtremes().dataMax),W!==k&&(this.fixedWidth=z,x((B=M.navigatorAxis.toFixedRange(W,W+z,j,X)).min)&&w(this,"setRange",{min:Math.min(B.min,B.max),max:Math.max(B.min,B.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(d,f){d=this.chart.pointer?.normalize(d)||d;let y=this.chart,M=y.xAxis[0],k=this.reversedExtremes;f===0?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=k?M.min:M.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=k?M.max:M.min),y.setFixedRange(void 0)}onMouseMove(d){let f=this,y=f.chart,M=f.navigatorSize,k=f.range,T=f.dragOffset,z=y.inverted,N=f.left,G;(!d.touches||d.touches[0].pageX!==0)&&(G=(d=y.pointer?.normalize(d)||d).chartX,z&&(N=f.top,G=d.chartY),f.grabbedLeft?(f.hasDragged=!0,f.render(0,0,G-N,f.otherHandlePos)):f.grabbedRight?(f.hasDragged=!0,f.render(0,0,f.otherHandlePos,G-N)):f.grabbedCenter&&(f.hasDragged=!0,GM+T-k&&(G=M+T-k),f.render(0,0,G-T,G-T+k)),f.hasDragged&&f.scrollbar&&_(f.scrollbar.options.liveRedraw,!u&&!this.chart.boosted)&&(d.DOMType=d.type,setTimeout(function(){f.onMouseUp(d)},0)))}onMouseUp(d){let f,y,M,k,T,z,N=this.chart,G=this.xAxis,X=this.scrollbar,j=d.DOMEvent||d,B=N.inverted,W=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!X||!X.hasDragged)||d.trigger==="scrollbar")&&(M=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?k=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(T=this.fixedExtreme),this.zoomedMax===this.size&&(T=this.reversedExtremes?M.dataMin:M.dataMax),this.zoomedMin===0&&(k=this.reversedExtremes?M.dataMax:M.dataMin),x((z=G.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,k,T)).min)&&w(this,"setRange",{min:Math.min(z.min,z.max),max:Math.max(z.min,z.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:j}})),d.DOMType!=="mousemove"&&d.DOMType!=="touchmove"&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&O(this.zoomedMin)&&O(this.zoomedMax)&&(y=Math.round(this.zoomedMin),f=Math.round(this.zoomedMax),this.shades&&this.drawMasks(y,f,B,W),this.outline&&this.drawOutline(y,f,B,W),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(y,0,B,W),this.drawHandle(f,1,B,W)))}removeEvents(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(d){d()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let d=this.baseSeries||[];this.navigatorEnabled&&d[0]&&(this.navigatorOptions.adaptToUpdatedData!==!1&&d.forEach(function(f){P(f,"updatedData",this.updatedDataHandler)},this),d[0].xAxis&&P(d[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}init(d){let f=d.options,y=f.navigator||{},M=y.enabled,k=f.scrollbar||{},T=k.enabled,z=M&&y.height||0,N=T&&k.height||0,G=k.buttonsEnabled&&N||0;this.handles=[],this.shades=[],this.chart=d,this.setBaseSeries(),this.height=z,this.scrollbarHeight=N,this.scrollButtonSize=G,this.scrollbarEnabled=T,this.navigatorEnabled=M,this.navigatorOptions=y,this.scrollbarOptions=k,this.opposite=_(y.opposite,!!(!M&&d.inverted));let X=this,j=X.baseSeries,B=d.xAxis.length,W=d.yAxis.length,Y=j&&j[0]&&j[0].xAxis||d.xAxis[0]||{options:{}};if(d.isDirtyBox=!0,X.navigatorEnabled?(X.xAxis=new e(d,I({breaks:Y.options.breaks,ordinal:Y.options.ordinal,overscroll:Y.options.overscroll},y.xAxis,{type:"datetime",index:B,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},d.inverted?{offsets:[G,0,-G,0],width:z}:{offsets:[0,-G,0,G],height:z}),"xAxis"),X.yAxis=new e(d,I(y.yAxis,{alignTicks:!1,offset:0,index:W,isInternal:!0,reversed:_(y.yAxis&&y.yAxis.reversed,d.yAxis[0]&&d.yAxis[0].reversed,!1),zoomEnabled:!1},d.inverted?{width:z}:{height:z}),"yAxis"),j||y.series.data?X.updateNavigatorSeries(!1):d.series.length===0&&(X.unbindRedraw=p(d,"beforeRedraw",function(){d.series.length>0&&!X.series&&(X.setBaseSeries(),X.unbindRedraw())})),X.reversedExtremes=d.inverted&&!X.xAxis.reversed||!d.inverted&&X.xAxis.reversed,X.renderElements(),X.addMouseEvents()):(X.xAxis={chart:d,navigatorAxis:{fake:!0},translate:function(U,q){let H=d.xAxis[0],V=H.getExtremes(),Z=H.len-2*G,K=A("min",H.options.min,V.dataMin),J=A("max",H.options.max,V.dataMax)-K;return q?U*J/Z+K:Z*(U-K)/J},toPixels:function(U){return this.translate(U)},toValue:function(U){return this.translate(U,!0)}},X.xAxis.navigatorAxis.axis=X.xAxis,X.xAxis.navigatorAxis.toFixedRange=l.prototype.toFixedRange.bind(X.xAxis.navigatorAxis)),d.options.scrollbar.enabled){let U=I(d.options.scrollbar,{vertical:d.inverted});!O(U.margin)&&X.navigatorEnabled&&(U.margin=d.inverted?-3:3),d.scrollbar=X.scrollbar=new h(d.renderer,U,d),p(X.scrollbar,"changed",function(q){let H=X.size,V=H*this.to,Z=H*this.from;X.hasDragged=X.scrollbar.hasDragged,X.render(0,0,Z,V),this.shouldUpdateExtremes(q.DOMType)&&setTimeout(function(){X.onMouseUp(q)})})}X.addBaseSeriesEvents(),X.addChartEvents()}getUnionExtremes(d){let f,y=this.chart.xAxis[0],M=this.xAxis,k=M.options,T=y.options;return d&&y.dataMin===null||(f={dataMin:_(k&&k.min,A("min",T.min,y.dataMin,M.dataMin,M.min)),dataMax:_(k&&k.max,A("max",T.max,y.dataMax,M.dataMax,M.max))}),f}setBaseSeries(d,f){let y=this.chart,M=this.baseSeries=[];d=d||y.options&&y.options.navigator.baseSeries||(y.series.length?S(y.series,k=>!k.options.isInternal).index:0),(y.series||[]).forEach((k,T)=>{!k.options.isInternal&&(k.options.showInNavigator||(T===d||k.options.id===d)&&k.options.showInNavigator!==!1)&&M.push(k)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,f)}updateNavigatorSeries(d,f){let y=this,M=y.chart,k=y.baseSeries,T={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},z=y.series=(y.series||[]).filter(B=>{let W=B.baseSeries;return!(0>k.indexOf(W))||(W&&(P(W,"updatedData",y.updatedDataHandler),delete W.navigatorSeries),B.chart&&B.destroy(),!1)}),N,G,X=y.navigatorOptions.series,j;k&&k.length&&k.forEach(B=>{let W=B.navigatorSeries,Y=L({color:B.color,visible:B.visible},R(X)?g.navigator.series:X);if(W&&y.navigatorOptions.adaptToUpdatedData===!1)return;T.name="Navigator "+k.length,j=(N=B.options||{}).navigatorOptions||{},Y.dataLabels=F(Y.dataLabels),(G=I(N,T,Y,j)).pointRange=_(Y.pointRange,j.pointRange,g.plotOptions[G.type||"line"].pointRange);let U=j.data||Y.data;y.hasNavigatorData=y.hasNavigatorData||!!U,G.data=U||N.data&&N.data.slice(0),W&&W.options?W.update(G,f):(B.navigatorSeries=M.initSeries(G),M.setSortedData(),B.navigatorSeries.baseSeries=B,z.push(B.navigatorSeries))}),(X.data&&!(k&&k.length)||R(X))&&(y.hasNavigatorData=!1,(X=F(X)).forEach((B,W)=>{T.name="Navigator "+(z.length+1),(G=I(g.navigator.series,{color:M.series[W]&&!M.series[W].options.isInternal&&M.series[W].color||M.options.colors[W]||M.options.colors[0]},T,B)).data=B.data,G.data&&(y.hasNavigatorData=!0,z.push(M.initSeries(G)))})),d&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let d=this,f=d.baseSeries||[];f[0]&&f[0].xAxis&&f[0].eventsToUnbind.push(p(f[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),f.forEach(y=>{y.eventsToUnbind.push(p(y,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),y.eventsToUnbind.push(p(y,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),this.navigatorOptions.adaptToUpdatedData!==!1&&y.xAxis&&y.eventsToUnbind.push(p(y,"updatedData",this.updatedDataHandler)),y.eventsToUnbind.push(p(y,"remove",function(){this.navigatorSeries&&(E(d.series,this.navigatorSeries),x(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(d){return this.baseSeries.reduce(function(f,y){return Math.min(f,y.xData&&y.xData.length?y.xData[0]:f)},d)}modifyNavigatorAxisExtremes(){let d=this.xAxis;if(d.getExtremes!==void 0){let f=this.getUnionExtremes(!0);f&&(f.dataMin!==d.min||f.dataMax!==d.max)&&(d.min=f.dataMin,d.max=f.dataMax)}}modifyBaseAxisExtremes(){let d,f,y=this.chart.navigator,M=this.getExtremes(),k=M.min,T=M.max,z=M.dataMin,N=M.dataMax,G=T-k,X=y.stickToMin,j=y.stickToMax,B=_(this.ordinal?.convertOverscroll(this.options.overscroll),0),W=y.series&&y.series[0],Y=!!this.setExtremes;!(this.eventArgs&&this.eventArgs.trigger==="rangeSelectorButton")&&(X&&(d=(f=z)+G),j&&(d=N+B,X||(f=Math.max(z,d-G,y.getBaseSeriesMin(W&&W.xData?W.xData[0]:-Number.MAX_VALUE)))),Y&&(X||j)&&O(f)&&(this.min=this.userMin=f,this.max=this.userMax=d)),y.stickToMin=y.stickToMax=null}updatedDataHandler(){let d=this.chart.navigator,f=this.navigatorSeries,y=d.reversedExtremes?Math.round(d.zoomedMin)===0:Math.round(d.zoomedMax)>=Math.round(d.size);d.stickToMax=_(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,y),d.stickToMin=d.shouldStickToMin(this,d),f&&!d.hasNavigatorData&&(f.options.pointStart=this.xData[0],f.setData(this.options.data,!1,null,!1))}shouldStickToMin(d,f){let y=f.getBaseSeriesMin(d.xData[0]),M=d.xAxis,k=M.max,T=M.min,z=M.options.range;return!!(O(k)&&O(T))&&(z&&k-y>0?k-y{d.destroy&&d.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(d=>{this[d]&&this[d].destroy&&this[d].destroy(),this[d]=null}),[this.handles].forEach(d=>{m(d)})}}return D}),s(t,"Core/Axis/OrdinalAxis.js",[t["Core/Axis/Axis.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{addEvent:a,correctFloat:h,css:c,defined:g,error:u,isNumber:p,pick:b,timeUnits:v,isString:x}=n;return function(m){function E(C,d,f,y,M=[],k=0,T){let z={},N=this.options.tickPixelInterval,G=this.chart.time,X=[],j,B,W,Y,U,q=0,H=[],V=-Number.MAX_VALUE;if(!this.options.ordinal&&!this.options.breaks||!M||M.length<3||d===void 0)return G.getTimeTicks.apply(G,arguments);let Z=M.length;for(j=0;jf,M[j]5*k||U){if(M[j]>V){for(B=G.getTimeTicks(C,M[q],M[j],y);B.length&&B[0]<=V;)B.shift();B.length&&(V=B[B.length-1]),X.push(H.length),H=H.concat(B)}q=j+1}if(U)break}if(B){if(Y=B.info,T&&Y.unitRange<=v.hour){for(q=1,j=H.length-1;qnt-ot),(it=tt[Math.floor(tt.length/2)])<.6*N&&(it=null),rt=H[K-1]>f?K-1:K,et=void 0;rt--;)st=Math.abs(et-(Q=J[rt])),et&&st<.8*N&&(it===null||st<.8*it)?(z[H[rt]]&&!z[H[rt+1]]?($=rt+1,et=Q):$=rt,H.splice($,1)):et=Q}return H}function L(C){let d=this.ordinal.positions;if(!d)return C;let f=d.length-1,y;return C<0?C=d[0]:C>f?C=d[f]:(f=Math.floor(C),y=C-f),y!==void 0&&d[f]!==void 0?d[f]+(y?y*(d[f+1]-d[f]):0):C}function S(C){let d=this.ordinal,f=this.old?this.old.min:this.min,y=this.old?this.old.transA:this.transA,M=d.getExtendedPositions();if(M&&M.length){let k=h((C-f)*y+this.minPixelPadding),T=h(d.getIndexOfPoint(k,M)),z=h(T%1);if(T>=0&&T<=M.length-1){let N=M[Math.floor(T)],G=M[Math.ceil(T)];return M[Math.floor(T)]+z*(G-N)}}return C}function w(C,d){let f=m.Additions.findIndexOf(C,d,!0);if(C[f]===d)return f;let y=(d-C[f])/(C[f+1]-C[f]);return f+y}function R(){this.ordinal||(this.ordinal=new m.Additions(this))}function O(){let{eventArgs:C,options:d}=this;if(this.isXAxis&&g(d.overscroll)&&d.overscroll!==0&&p(this.max)&&p(this.min)&&(this.options.ordinal&&!this.ordinal.originalOrdinalRange&&this.ordinal.getExtendedPositions(!1),this.max===this.dataMax&&(C?.trigger!=="pan"||this.isInternal)&&C?.trigger!=="navigator")){let f=this.ordinal.convertOverscroll(d.overscroll);this.max+=f,!this.isInternal&&g(this.userMin)&&C?.trigger!=="mousewheel"&&(this.min+=f)}}function I(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)}function _(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))}function P(C){let d=this.xAxis[0],f=d.ordinal.convertOverscroll(d.options.overscroll),y=C.originalEvent.chartX,M=this.options.chart.panning,k=!1;if(M&&M.type!=="y"&&d.options.ordinal&&d.series.length){let T,z,N=this.mouseDownX,G=d.getExtremes(),X=G.dataMin,j=G.dataMax,B=G.min,W=G.max,Y=this.hoverPoints,U=d.closestPointRange||d.ordinal&&d.ordinal.overscrollPointsRange,q=Math.round((N-y)/(d.translationSlope*(d.ordinal.slope||U))),H=d.ordinal.getExtendedPositions(),V={ordinal:{positions:H,extendedOrdinalPositions:H}},Z=d.index2val,K=d.val2lin;if(B<=X&&q<0||W+f>=j&&q>0)return;V.ordinal.positions?Math.abs(q)>1&&(Y&&Y.forEach(function(J){J.setState()}),j>(z=V.ordinal.positions)[z.length-1]&&z.push(j),this.setFixedRange(W-B),(T=d.navigatorAxis.toFixedRange(void 0,void 0,Z.apply(V,[K.apply(V,[B,!0])+q]),Z.apply(V,[K.apply(V,[W,!0])+q]))).min>=Math.min(G.dataMin,B)&&T.max<=Math.max(j,W)+f&&d.setExtremes(T.min,T.max,!0,!1,{trigger:"pan"}),this.mouseDownX=y,c(this.container,{cursor:"move"})):k=!0}else k=!0;k||M&&/y/.test(M.type)?f&&(d.max=d.dataMax+f):C.preventDefault()}function F(){let C=this.xAxis;C&&C.options.ordinal&&(delete C.ordinal.index,delete C.ordinal.originalOrdinalRange)}function A(C,d){let f,y=this.ordinal,M=y.positions,k=y.slope,T;if(!M)return C;let z=M.length;if(M[0]<=C&&M[z-1]>=C)f=w(M,C);else{if(!((T=y.getExtendedPositions&&y.getExtendedPositions())&&T.length))return C;let N=T.length;k||(k=(T[N-1]-T[0])/N);let G=w(T,M[0]);if(C>=T[0]&&C<=T[N-1])f=w(T,C)-G;else{if(!d)return C;f=C0&&J.options.id!=="highcharts-navigator-series"&&J.processedXData.length>1&&(V=K!==J.processedXData[1]-J.processedXData[0]),K=J.processedXData[1]-J.processedXData[0],J.boosted&&(Z=J.boosted),J.reserveSpace()&&(J.takeOrdinalPosition!==!1||T)&&(N=(U=U.concat(J.processedXData)).length,U.sort(function($,Q){return $-Q}),q=Math.min(q,b(J.closestPointRange,q)),N)){for(tt=0;tt2){for(X=U[1]-U[0],Y=N-1;Y--&&!H;)U[Y+1]-U[Y]!==X&&(H=!0);!d.options.keepOrdinalPadding&&(U[0]-M>X||k-U[U.length-1]>X)&&(H=!0)}else d.options.overscroll&&(N===2?q=U[1]-U[0]:N===1?(q=d.ordinal.convertOverscroll(d.options.overscroll),U=[U[0],U[0]+q]):q=f.overscrollPointsRange);H||d.forceOrdinal?(d.options.overscroll&&(f.overscrollPointsRange=q,U=U.concat(f.getOverscrollPositions())),f.positions=U,j=d.ordinal2lin(Math.max(M,U[0]),!0),B=Math.max(d.ordinal2lin(Math.min(k,U[U.length-1]),!0),1),f.slope=W=(k-M)/(B-j),f.offset=M-j*W):(f.overscrollPointsRange=b(d.closestPointRange,f.overscrollPointsRange),f.positions=d.ordinal.slope=f.offset=void 0)}d.isOrdinal=z&&H,f.groupIntervalFactor=null}static findIndexOf(d,f,y){let M=0,k=d.length-1,T;for(;MB.x>=X&&B.x<=j)};M.series.forEach(G=>{let X=G.points?.[0];g(X?.plotX)&&(X.plotXA()),m.splice(_,1);return}}}function O(){let _=this.rangeSelector;if(_){let P=_.getHeight();this.extraTopMargin&&(this.plotTop+=P),this.extraBottomMargin&&(this.marginBottom+=P)}}function I(_){let P=_.options.rangeSelector,F=this.extraBottomMargin,A=this.extraTopMargin,D=this.rangeSelector;if(P&&P.enabled&&!g(D)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=D=new l(this)),this.extraBottomMargin=!1,this.extraTopMargin=!1,D){let C=P&&P.verticalAlign||D.options&&D.options.verticalAlign;D.options.floating||(C==="bottom"?this.extraBottomMargin=!0:C==="middle"||(this.extraTopMargin=!0)),(this.extraBottomMargin!==F||this.extraTopMargin!==A)&&(this.isDirtyBox=!0)}}return{compose:function(_,P,F){if(l=F,x(h,"RangeSelector")){let A=P.prototype;_.prototype.minFromRange=E,c(P,"afterGetContainer",L),c(P,"beforeRender",S),c(P,"destroy",R),c(P,"getMargins",O),c(P,"redraw",w),c(P,"update",I),A.callbacks.push(w),u(a,{rangeSelector:r.rangeSelector}),u(a.lang,r.lang)}}}}),s(t,"Stock/RangeSelector/RangeSelector.js",[t["Core/Axis/Axis.js"],t["Core/Defaults.js"],t["Core/Globals.js"],t["Stock/RangeSelector/RangeSelectorComposition.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"],t["Core/Axis/OrdinalAxis.js"]],function(e,i,r,n,l,a,h){let{defaultOptions:c}=i,{addEvent:g,createElement:u,css:p,defined:b,destroyObjectProperties:v,discardElement:x,extend:m,fireEvent:E,isNumber:L,merge:S,objectEach:w,pad:R,pick:O,pInt:I,splat:_}=a;class P{static compose(A,D){n.compose(A,D,P)}constructor(A){this.buttonOptions=P.prototype.defaultButtons,this.initialButtonGroupWidth=0,this.init(A)}clickButton(A,D){let C=this.chart,d=this.buttonOptions[A],f=C.xAxis[0],y=C.scroller&&C.scroller.getUnionExtremes()||f||{},M=d.type,k=d.dataGrouping,T=y.dataMin,z=y.dataMax,N,G=f&&Math.round(Math.min(f.max,O(z,f.max))),X,j=d._range,B,W,Y,U=!0;if(T!==null&&z!==null){if(this.setSelected(A),k&&(this.forcedDataGrouping=!0,e.prototype.setDataGrouping.call(f||{chart:this.chart},k,!1),this.frozenStates=d.preserveDataGrouping),M==="month"||M==="year")f?(W={range:d,max:G,chart:C,dataMin:T,dataMax:z},N=f.minFromRange.call(W),L(W.newMax)&&(G=W.newMax),U=!1):j=d;else if(j)G=Math.min((N=Math.max(G-j,T))+j,z),U=!1;else if(M==="ytd")if(f)(z===void 0||T===void 0)&&(T=Number.MAX_VALUE,z=Number.MIN_VALUE,C.series.forEach(q=>{let H=q.xData;H&&(T=Math.min(H[0],T),z=Math.max(H[H.length-1],z))}),D=!1),N=B=(Y=this.getYTDExtremes(z,T,C.time.useUTC)).min,G=Y.max;else{this.deferredYTDClick=A;return}else M==="all"&&f&&(C.navigator&&C.navigator.baseSeries[0]&&(C.navigator.baseSeries[0].xAxis.options.range=void 0),N=T,G=z);if(U&&d._offsetMin&&b(N)&&(N+=d._offsetMin),d._offsetMax&&b(G)&&(G+=d._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=A+1),f)f.setExtremes(N,G,O(D,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:d}),C.setFixedRange(d._range);else{X=_(C.options.xAxis)[0];let q=g(C,"afterGetAxes",function(){let H=C.xAxis[0];H.range=H.options.range=j,H.min=H.options.min=B});g(C,"load",function(){let H=C.xAxis[0];C.setFixedRange(d._range),H.options.range=X.range,H.options.min=X.min,q()})}E(this,"afterBtnClick")}}setSelected(A){this.selected=this.options.selected=A}init(A){let D=this,C=A.options.rangeSelector,d=C.buttons||D.defaultButtons.slice(),f=C.selected,y=function(){let M=D.minInput,k=D.maxInput;M&&M.blur&&E(M,"blur"),k&&k.blur&&E(k,"blur")};D.chart=A,D.options=C,D.buttons=[],D.buttonOptions=d,this.eventsToUnbind=[],this.eventsToUnbind.push(g(A.container,"mousedown",y)),this.eventsToUnbind.push(g(A,"resize",y)),d.forEach(D.computeButtonRange),f!==void 0&&d[f]&&this.clickButton(f,!1),this.eventsToUnbind.push(g(A,"load",function(){A.xAxis&&A.xAxis[0]&&g(A.xAxis[0],"setExtremes",function(M){L(this.max)&&L(this.min)&&this.max-this.min!==A.fixedRange&&M.trigger!=="rangeSelectorButton"&&M.trigger!=="updatedData"&&D.forcedDataGrouping&&!D.frozenStates&&this.setDataGrouping(!1,!1)})})),this.createElements()}updateButtonStates(){let A=this,D=this.chart,C=this.dropdown,d=this.dropdownLabel,f=D.xAxis[0],y=Math.round(f.max-f.min),M=!f.hasVisibleSeries,k=24*36e5,T=D.scroller&&D.scroller.getUnionExtremes()||f,z=T.dataMin,N=T.dataMax,G=A.getYTDExtremes(N,z,D.time.useUTC),X=G.min,j=G.max,B=A.selected,W=A.options.allButtonsEnabled,Y=Array(A.buttonOptions.length).fill(0),U=L(B),q=A.buttons,H=!1,V=null;A.buttonOptions.forEach((Z,K)=>{let J=Z._range,tt=Z.type,$=Z.count||1,Q=Z._offsetMax-Z._offsetMin,et=K===B,it=J>N-z,st=JJ&&(nt=!0)}else(tt==="month"||tt==="year")&&y+36e5>={month:28,year:365}[tt]*k*$-Q&&y-36e5<={month:31,year:366}[tt]*k*$+Q?nt=!0:tt==="ytd"?(nt=j-X+Q===y,rt=!et):tt==="all"&&(nt=f.max-f.min>=N-z);let ot=!W&&!(H&&tt==="all")&&(it||st||M),at=H&&tt==="all"||!rt&&nt||et&&A.frozenStates;ot?Y[K]=3:at&&(!U||K===B)&&(V=K)}),V!==null?(Y[V]=2,A.setSelected(V)):(A.setSelected(),d&&(d.setState(0),d.attr({text:(c.lang.rangeSelectorZoom||"")+" \u25BE"})));for(let Z=0;Z6&&(y.lastIndexOf("-")===y.length-6||y.lastIndexOf("+")===y.length-6))){let M=new Date(d).getTimezoneOffset()/60;d+=M<=0?`+${R(-M)}:00`:`-${R(M)}:00`}}let f=Date.parse(d);if(!L(f)){let y=A.split("-");f=Date.UTC(I(y[0]),I(y[1])-1,I(y[2]))}return C&&D&&L(f)&&(f+=C.getTimezoneOffset(f)),f}drawInput(A){let{chart:D,div:C,inputGroup:d}=this,f=this,y=D.renderer.style||{},M=D.renderer,k=D.options.rangeSelector,T=c.lang,z=A==="min";function N(Y){let{maxInput:U,minInput:q}=f,H=D.xAxis[0],V=D.scroller?.getUnionExtremes()||H,Z=V.dataMin,K=V.dataMax,J=D.xAxis[0].getExtremes()[Y],tt=f.getInputValue(Y);L(tt)&&tt!==J&&(z&&U&&L(Z)?tt>Number(U.getAttribute("data-hc-time"))?tt=void 0:ttK&&(tt=K)),tt!==void 0&&H.setExtremes(z?tt:H.min,z?H.max:tt,void 0,void 0,{trigger:"rangeSelectorInput"}))}let G=T[z?"rangeSelectorFrom":"rangeSelectorTo"]||"",X=M.label(G,0).addClass("highcharts-range-label").attr({padding:G?2:0,height:G?k.inputBoxHeight:0}).add(d),j=M.label("",0).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth,height:k.inputBoxHeight,"text-align":"center"}).on("click",function(){f.showInput(A),f[A+"Input"].focus()});D.styledMode||j.attr({stroke:k.inputBoxBorderColor,"stroke-width":1}),j.add(d);let B=u("input",{name:A,className:"highcharts-range-selector"},void 0,C);B.setAttribute("type",function(Y){if(Y.indexOf("%L")!==-1)return"text";let U=["a","A","d","e","w","b","B","m","o","y","Y"].some(H=>Y.indexOf("%"+H)!==-1),q=["H","k","I","l","M","S"].some(H=>Y.indexOf("%"+H)!==-1);return U&&q?"datetime-local":U?"date":q?"time":"text"}(k.inputDateFormat||"%e %b %Y")),D.styledMode||(X.css(S(y,k.labelStyle)),j.css(S({color:"#333333"},y,k.inputStyle)),p(B,m({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:y.fontSize,fontFamily:y.fontFamily,top:"-9999em"},k.inputStyle))),B.onfocus=()=>{f.showInput(A)},B.onblur=()=>{B===r.doc.activeElement&&N(A),f.hideInput(A),f.setInputValue(A),B.blur()};let W=!1;return B.onchange=()=>{W||(N(A),f.hideInput(A),B.blur())},B.onkeypress=Y=>{Y.keyCode===13&&N(A)},B.onkeydown=Y=>{W=!0,(Y.key==="ArrowUp"||Y.key==="ArrowDown"||Y.key==="Tab")&&N(A)},B.onkeyup=()=>{W=!1},{dateBox:j,input:B,label:X}}getPosition(){let A=this.chart,D=A.options.rangeSelector,C=D.verticalAlign==="top"?A.plotTop-A.axisOffset[0]:0;return{buttonTop:C+D.buttonPosition.y,inputTop:C+D.inputPosition.y-10}}getYTDExtremes(A,D,C){let d=this.chart.time,f=new d.Date(A),y=d.get("FullYear",f),M=C?d.Date.UTC(y,0,1):+new d.Date(y,0,1),k=f.getTime();return{max:Math.min(A||k,k),min:Math.max(D,M)}}createElements(){let A=this.chart,D=A.renderer,C=A.container,d=A.options,f=d.rangeSelector,y=f.inputEnabled,M=O(d.chart.style?.zIndex,0)+1;if(f.enabled!==!1&&(this.group=D.g("range-selector-group").attr({zIndex:7}).add(),this.div=u("div",void 0,{position:"relative",height:0,zIndex:M}),this.buttonOptions.length&&this.renderButtons(),C.parentNode&&C.parentNode.insertBefore(this.div,C),y)){this.inputGroup=D.g("input-group").add(this.group);let k=this.drawInput("min");this.minDateBox=k.dateBox,this.minLabel=k.label,this.minInput=k.input;let T=this.drawInput("max");this.maxDateBox=T.dateBox,this.maxLabel=T.label,this.maxInput=T.input}}render(A,D){let C=this.chart,d=C.options.rangeSelector,f=d.inputEnabled;if(d.enabled!==!1){if(f){this.setInputValue("min",A),this.setInputValue("max",D);let y=C.scroller&&C.scroller.getUnionExtremes()||C.xAxis[0]||{};if(b(y.dataMin)&&b(y.dataMax)){let M=C.xAxis[0].minRange||0;this.setInputExtremes("min",y.dataMin,Math.min(y.dataMax,this.getInputValue("max"))-M),this.setInputExtremes("max",Math.max(y.dataMin,this.getInputValue("min"))+M,y.dataMax)}if(this.inputGroup){let M=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(k=>{if(k){let{width:T}=k.getBBox();T&&(k.attr({x:M}),M+=T+d.inputSpacing)}})}}this.alignElements(),this.updateButtonStates()}}renderButtons(){let{buttons:A,chart:D,options:C}=this,d=c.lang,f=D.renderer,y=S(C.buttonTheme),M=y&&y.states,k=y.width||28;delete y.width,delete y.states,this.buttonGroup=f.g("range-selector-buttons").add(this.group);let T=this.dropdown=u("select",void 0,{position:"absolute",padding:0,border:0,cursor:"pointer",opacity:1e-4},this.div),z=D.userOptions.rangeSelector?.buttonTheme;this.dropdownLabel=f.button("",0,0,()=>{},S(y,{"stroke-width":O(y["stroke-width"],0),width:"auto",paddingLeft:O(C.buttonTheme.paddingLeft,z?.padding,8),paddingRight:O(C.buttonTheme.paddingRight,z?.padding,8)}),M&&M.hover,M&&M.select,M&&M.disabled).hide().add(this.group),g(T,"touchstart",()=>{T.style.fontSize="16px"});let N=r.isMS?"mouseover":"mouseenter",G=r.isMS?"mouseout":"mouseleave";g(T,N,()=>{E(this.dropdownLabel.element,N)}),g(T,G,()=>{E(this.dropdownLabel.element,G)}),g(T,"change",()=>{E(this.buttons[T.selectedIndex-1].element,"click")}),this.zoomText=f.label(d.rangeSelectorZoom||"",0).attr({padding:C.buttonTheme.padding,height:C.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(C.labelStyle),y["stroke-width"]=O(y["stroke-width"],0)),u("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,T),this.buttonOptions.forEach((X,j)=>{u("option",{textContent:X.title||X.text},void 0,T),A[j]=f.button(X.text,0,0,B=>{let W,Y=X.events&&X.events.click;Y&&(W=Y.call(X,B)),W!==!1&&this.clickButton(j),this.isActive=!0},y,M&&M.hover,M&&M.select,M&&M.disabled).attr({"text-align":"center",width:k}).add(this.buttonGroup),X.title&&A[j].attr("title",X.title)})}alignElements(){let{buttonGroup:A,buttons:D,chart:C,group:d,inputGroup:f,options:y,zoomText:M}=this,k=C.options,T=k.exporting&&k.exporting.enabled!==!1&&k.navigation&&k.navigation.buttonOptions,{buttonPosition:z,inputPosition:N,verticalAlign:G}=y,X=(B,W)=>T&&this.titleCollision(C)&&G==="top"&&W.align==="right"&&W.y-B.getBBox().height-12<(T.y||0)+(T.height||0)+C.spacing[0]?-40:0,j=C.plotLeft;if(d&&z&&N){let B=z.x-C.spacing[3];if(A){if(this.positionButtons(),!this.initialButtonGroupWidth){let J=0;M&&(J+=M.getBBox().width+5),D.forEach((tt,$)=>{J+=tt.width||0,$!==D.length-1&&(J+=y.buttonSpacing)}),this.initialButtonGroupWidth=J}j-=C.spacing[3];let K=X(A,z);this.alignButtonGroup(K),this.buttonGroup?.translateY&&this.dropdownLabel.attr({y:this.buttonGroup.translateY}),d.placed=A.placed=C.hasLoaded}let W=0;f&&(W=X(f,N),N.align==="left"?B=j:N.align==="right"&&(B=-Math.max(C.axisOffset[1],-W)),f.align({y:N.y,width:f.getBBox().width,align:N.align,x:N.x+B-2},!0,C.spacingBox),f.placed=C.hasLoaded),this.handleCollision(W),d.align({verticalAlign:G},!0,C.spacingBox);let Y=d.alignAttr.translateY,U=d.getBBox().height+20,q=0;if(G==="bottom"){let K=C.legend&&C.legend.options;q=Y-(U=U+(K&&K.verticalAlign==="bottom"&&K.enabled&&!K.floating?C.legend.legendHeight+O(K.margin,10):0)-20)-(y.floating?0:y.y)-(C.titleOffset?C.titleOffset[2]:0)-10}G==="top"?(y.floating&&(q=0),C.titleOffset&&C.titleOffset[0]&&(q=C.titleOffset[0]),q+=C.margin[0]-C.spacing[0]||0):G==="middle"&&(N.y===z.y?q=Y:(N.y||z.y)&&(N.y<0||z.y<0?q-=Math.min(N.y,z.y):q=Y-U)),d.translate(y.x,y.y+Math.floor(q));let{minInput:H,maxInput:V,dropdown:Z}=this;y.inputEnabled&&H&&V&&(H.style.marginTop=d.translateY+"px",V.style.marginTop=d.translateY+"px"),Z&&(Z.style.marginTop=d.translateY+"px")}}alignButtonGroup(A,D){let{chart:C,options:d,buttonGroup:f}=this,{buttonPosition:y}=d,M=C.plotLeft-C.spacing[3],k=y.x-C.spacing[3];y.align==="right"?k+=A-M:y.align==="center"&&(k-=M/2),f&&f.align({y:y.y,width:O(D,this.initialButtonGroupWidth),align:y.align,x:k},!0,C.spacingBox)}positionButtons(){let{buttons:A,chart:D,options:C,zoomText:d}=this,f=D.hasLoaded?"animate":"attr",{buttonPosition:y}=C,M=D.plotLeft,k=M;d&&d.visibility!=="hidden"&&(d[f]({x:O(M+y.x,M)}),k+=y.x+d.getBBox().width+5);for(let T=0,z=this.buttonOptions.length;T{let N=0;return this.buttons.forEach(G=>{let X=G.getBBox();X.width>N&&(N=X.width)}),N},T=N=>{if(d?.alignOptions&&C){let G=d.alignAttr.translateX+d.alignOptions.x-A+d.getBBox().x+2,X=d.alignOptions.width||0,j=C.alignAttr.translateX+C.getBBox().x;return j+N>G&&G+X>j&&f.y{d&&C&&d.attr({translateX:d.alignAttr.translateX+(D.axisOffset[1]>=-A?0:-A),translateY:d.alignAttr.translateY+C.getBBox().height+10})};if(C){if(y==="always"){this.collapseButtons(),T(k())&&z();return}y==="never"&&this.expandButtons()}d&&C?M.align===f.align||T(this.initialButtonGroupWidth+20)?y==="responsive"?(this.collapseButtons(),T(k())&&z()):z():y==="responsive"&&this.expandButtons():C&&y==="responsive"&&(this.initialButtonGroupWidth>D.plotWidth?this.collapseButtons():this.expandButtons())}collapseButtons(){let{buttons:A,zoomText:D}=this;this.isCollapsed!==!0&&(this.isCollapsed=!0,D.hide(),A.forEach(C=>void C.hide()),this.showDropdown())}expandButtons(){let{buttons:A,zoomText:D}=this;this.isCollapsed!==!1&&(this.isCollapsed=!1,this.hideDropdown(),D.show(),A.forEach(C=>void C.show()),this.positionButtons())}showDropdown(){let{buttonGroup:A,chart:D,dropdownLabel:C,dropdown:d}=this;if(A&&d){let{translateX:f=0,translateY:y=0}=A,M=D.plotLeft+f;C.attr({x:M,y}).show(),p(d,{left:M+"px",top:y+"px",visibility:"inherit"}),this.hasVisibleDropdown=!0}}hideDropdown(){let{dropdown:A}=this;A&&(this.dropdownLabel.hide(),p(A,{visibility:"hidden",width:"1px",height:"1px"}),this.hasVisibleDropdown=!1)}getHeight(){let A=this.options,D=this.group,C=A.inputPosition,d=A.buttonPosition,f=A.y,y=d.y,M=C.y,k=0;return A.height?A.height:(this.alignElements(),k=D?D.getBBox(!0).height+13+f:0,(M<0&&y<0||M>0&&y>0)&&(k+=Math.abs(Math.min(M,y))),k)}titleCollision(A){return!(A.options.title.text||A.options.subtitle.text)}update(A,D=!0){let C=this.chart;S(!0,C.options.rangeSelector,A),this.destroy(),this.init(C),D&&this.render()}destroy(){let A=this,D=A.minInput,C=A.maxInput;A.eventsToUnbind&&(A.eventsToUnbind.forEach(d=>d()),A.eventsToUnbind=void 0),v(A.buttons),D&&(D.onfocus=D.onblur=D.onchange=null),C&&(C.onfocus=C.onblur=C.onchange=null),w(A,function(d,f){d&&f!=="chart"&&(d instanceof l?d.destroy():d instanceof window.HTMLElement&&x(d)),d!==P.prototype[f]&&(A[f]=null)},this)}}return m(P.prototype,{defaultButtons:[{type:"month",count:1,text:"1m",title:"View 1 month"},{type:"month",count:3,text:"3m",title:"View 3 months"},{type:"month",count:6,text:"6m",title:"View 6 months"},{type:"ytd",text:"YTD",title:"View year to date"},{type:"year",count:1,text:"1y",title:"View 1 year"},{type:"all",text:"All",title:"View all"}],inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}}),P}),s(t,"Core/Chart/StockChart.js",[t["Core/Chart/Chart.js"],t["Core/Templating.js"],t["Core/Defaults.js"],t["Stock/Navigator/NavigatorDefaults.js"],t["Stock/RangeSelector/RangeSelectorDefaults.js"],t["Stock/Scrollbar/ScrollbarDefaults.js"],t["Stock/Utilities/StockUtilities.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c){let{format:g}=i,{getOptions:u}=r,{setFixedRange:p}=h,{addEvent:b,clamp:v,crisp:x,defined:m,extend:E,find:L,isNumber:S,isString:w,merge:R,pick:O,splat:I}=c;function _(A,D,C){return A==="xAxis"?{minPadding:0,maxPadding:0,overscroll:0,ordinal:!0}:A==="yAxis"?{labels:{y:-2},opposite:C.opposite??D.opposite??!0,showLastLabel:!!(D.categories||D.type==="category"),title:{text:C.title?.text!=="Values"?C.title?.text:null}}:{}}function P(A,D){if(A==="xAxis"){let C=O(D.navigator&&D.navigator.enabled,n.enabled,!0),d={type:"datetime",categories:void 0};return C&&(d.startOnTick=!1,d.endOnTick=!1),d}return{}}class F extends e{init(D,C){let d=u(),f=D.xAxis,y=D.yAxis,M=O(D.navigator&&D.navigator.enabled,n.enabled,!0);D.xAxis=D.yAxis=void 0;let k=R({chart:{panning:{enabled:!0,type:"x"},zooming:{pinchType:"x",mouseWheel:{type:"x"}}},navigator:{enabled:M},scrollbar:{enabled:O(a.enabled,!0)},rangeSelector:{enabled:O(l.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:O(d.tooltip&&d.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},D,{isStock:!0});D.xAxis=f,D.yAxis=y,k.xAxis=I(D.xAxis||{}).map(T=>R(_("xAxis",T,d.xAxis),T,P("xAxis",D))),k.yAxis=I(D.yAxis||{}).map(T=>R(_("yAxis",T,d.yAxis),T)),super.init(k,C)}createAxis(D,C){return C.axis=R(_(D,C.axis,u()[D]),C.axis,P(D,this.userOptions)),super.createAxis(D,C)}}return b(e,"update",function(A){let D=A.options;"scrollbar"in D&&this.navigator&&(R(!0,this.options.scrollbar,D.scrollbar),this.navigator.update({}),delete D.scrollbar)}),function(A){function D(z){if(!this.crosshair||!this.crosshair.label||!this.crosshair.label.enabled||!this.cross||!S(this.min)||!S(this.max))return;let N=this.chart,G=this.logarithmic,X=this.crosshair.label,j=this.horiz,B=this.opposite,W=this.left,Y=this.top,U=this.width,q=this.options.tickPosition==="inside",H=this.crosshair.snap!==!1,V=z.e||this.cross&&this.cross.e,Z=z.point,K=this.crossLabel,J,tt,$=X.format,Q="",et,it=0,st=this.min,rt=this.max;G&&(st=G.lin2log(this.min),rt=G.lin2log(this.max));let nt=j?"center":B?this.labelAlign==="right"?"right":"left":this.labelAlign==="left"?"left":"center";K||(K=this.crossLabel=N.renderer.label("",0,void 0,X.shape||"callout").addClass("highcharts-crosshair-label highcharts-color-"+(Z&&Z.series?Z.series.colorIndex:this.series[0]&&this.series[0].colorIndex)).attr({align:X.align||nt,padding:O(X.padding,8),r:O(X.borderRadius,3),zIndex:2}).add(this.labelGroup),N.styledMode||K.attr({fill:X.backgroundColor||Z&&Z.series&&Z.series.color||"#666666",stroke:X.borderColor||"","stroke-width":X.borderWidth||0}).css(E({color:"#ffffff",fontWeight:"normal",fontSize:"0.7em",textAlign:"center"},X.style||{}))),j?(J=H?(Z.plotX||0)+W:V.chartX,tt=Y+(B?0:this.height)):(J=W+this.offset+(B?U:0),tt=H?(Z.plotY||0)+Y:V.chartY),$||X.formatter||(this.dateTime&&(Q="%b %d, %Y"),$="{value"+(Q?":"+Q:"")+"}");let ot=H?this.isXAxis?Z.x:Z.y:this.toValue(j?V.chartX:V.chartY),at=Z&&Z.series?Z.series.isPointInside(Z):S(ot)&&ot>st&&ot=et.right&&(it=-(lt+ht.width-et.right)),K.attr({x:J+it,y:tt,anchorX:j?J:this.opposite?0:N.chartWidth,anchorY:j?this.opposite?N.chartHeight:0:tt+ht.height/2})}function C(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())}function d(z){let N=this.chart,G=this.options,X=N._labelPanes=N._labelPanes||{},j=G.labels;if(N.options.isStock&&this.coll==="yAxis"){let B=G.top+","+G.height;!X[B]&&j.enabled&&(j.distance===15&&this.side===1&&(j.distance=0),j.align===void 0&&(j.align="right"),X[B]=this,z.align="right",z.preventDefault())}}function f(){let z=this.chart,N=this.options&&this.options.top+","+this.options.height;N&&z._labelPanes&&z._labelPanes[N]===this&&delete z._labelPanes[N]}function y(z){let N=this,G=N.isLinked&&!N.series&&N.linkedParent?N.linkedParent.series:N.series,X=N.chart,j=X.renderer,B=N.left,W=N.top,Y=[],U=z.translatedValue,q=z.value,H=z.force,V,Z,K,J,tt=[],$,Q;if(X.options.isStock&&z.acrossPanes!==!1&&N.coll==="xAxis"||N.coll==="yAxis"){for(let et of(z.preventDefault(),tt=(it=>{let st=it==="xAxis"?"yAxis":"xAxis",rt=N.options[st];return S(rt)?[X[st][rt]]:w(rt)?[X.get(rt)]:G.map(nt=>nt[st])})(N.coll),N.isXAxis?X.yAxis:X.xAxis))if(!m(et.options.id)||et.options.id.indexOf("navigator")===-1){let it=et.isXAxis?"yAxis":"xAxis";N===(m(et.options[it])?X[it][et.options[it]]:X[it][0])&&tt.push(et)}for(let et of($=tt.length?[]:[N.isXAxis?X.yAxis[0]:X.xAxis[0]],tt))$.indexOf(et)!==-1||L($,it=>it.pos===et.pos&&it.len===et.len)||$.push(et);if(S(Q=O(U,N.translate(q||0,void 0,void 0,z.old))))if(N.horiz)for(let et of $){let it;J=(Z=et.pos)+et.len,V=K=Math.round(Q+N.transB),H!=="pass"&&(VB+N.width)&&(H?V=K=v(V,B,B+N.width):it=!0),it||Y.push(["M",V,Z],["L",K,J])}else for(let et of $){let it;K=(V=et.pos)+et.len,Z=J=Math.round(W+N.height-Q),H!=="pass"&&(ZW+N.height)&&(H?Z=J=v(Z,W,W+N.height):it=!0),it||Y.push(["M",V,Z],["L",K,J])}z.path=Y.length>0?j.crispPolyLine(Y,z.lineWidth||1):void 0}}function M(z){if(this.chart.options.isStock){let N;this.is("column")||this.is("columnrange")?N={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(N={marker:{enabled:!1,radius:2}}),N&&(z.plotOptions[this.type]=R(z.plotOptions[this.type],N))}}function k(){let z=this.chart,N=this.options.dataGrouping;return this.allowDG!==!1&&N&&O(N.enabled,z.options.isStock)}function T(z,N){for(let G=0;G\u25CF {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0}}),s(t,"Series/HLC/HLCSeries.js",[t["Series/HLC/HLCPoint.js"],t["Series/HLC/HLCSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n){let{column:l}=r.seriesTypes,{crisp:a,extend:h,merge:c}=n;class g extends l{extendStem(p,b,v){let x=p[0],m=p[1];typeof x[2]=="number"&&(x[2]=Math.max(v+b,x[2])),typeof m[2]=="number"&&(m[2]=Math.min(v-b,m[2]))}getPointPath(p,b){let v=b.strokeWidth(),x=p.series,m=a(p.plotX||0,v),E=Math.round(p.shapeArgs.width/2),L=[["M",m,Math.round(p.yBottom)],["L",m,Math.round(p.plotHigh)]];if(p.close!==null){let S=a(p.plotClose,v);L.push(["M",m,S],["L",m+E,S]),x.extendStem(L,v/2,S)}return L}drawSinglePoint(p){let b=p.series,v=b.chart,x,m=p.graphic;p.plotY!==void 0&&(m||(p.graphic=m=v.renderer.path().add(b.group)),v.styledMode||m.attr(b.pointAttribs(p,p.selected&&"select")),x=b.getPointPath(p,m),m[m?"animate":"attr"]({d:x}).addClass(p.getClassName(),!0))}drawPoints(){this.points.forEach(this.drawSinglePoint)}init(){super.init.apply(this,arguments),this.options.stacking=void 0}pointAttribs(p,b){let v=super.pointAttribs.call(this,p,b);return delete v.fill,v}toYData(p){return[p.high,p.low,p.close]}translate(){let p=this,b=p.yAxis,v=this.pointArrayMap&&this.pointArrayMap.slice()||[],x=v.map(m=>`plot${m.charAt(0).toUpperCase()+m.slice(1)}`);x.push("yBottom"),v.push("low"),super.translate.apply(p),p.points.forEach(function(m){v.forEach(function(E,L){let S=m[E];S!==null&&(p.dataModify&&(S=p.dataModify.modifyValue(S)),m[x[L]]=b.toPixels(S,!0))}),m.tooltipPos[1]=m.plotHigh+b.pos-p.chart.plotTop})}}return g.defaultOptions=c(l.defaultOptions,i),h(g.prototype,{pointClass:e,animate:null,directTouch:!1,pointArrayMap:["high","low","close"],pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointValKey:"close"}),r.registerSeriesType("hlc",g),g}),s(t,"Series/OHLC/OHLCPoint.js",[t["Core/Series/SeriesRegistry.js"]],function(e){let{seriesTypes:{hlc:i}}=e;class r extends i.prototype.pointClass{getClassName(){return super.getClassName.call(this)+(this.open\u25CF {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'}}}),s(t,"Series/OHLC/OHLCSeries.js",[t["Core/Globals.js"],t["Series/OHLC/OHLCPoint.js"],t["Series/OHLC/OHLCSeriesDefaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{composed:a}=e,{hlc:h}=n.seriesTypes,{addEvent:c,crisp:g,extend:u,merge:p,pushUnique:b}=l;function v(E){let L=E.options,S=L.dataGrouping;S&&L.useOhlcData&&L.id!=="highcharts-navigator-series"&&(S.approximation="ohlc")}function x(E){let L=E.options;L.useOhlcData&&L.id!=="highcharts-navigator-series"&&u(this,{pointValKey:m.prototype.pointValKey,pointArrayMap:m.prototype.pointArrayMap,toYData:m.prototype.toYData})}class m extends h{static compose(L,...S){b(a,"OHLCSeries")&&(c(L,"afterSetOptions",v),c(L,"init",x))}getPointPath(L,S){let w=super.getPointPath(L,S),R=S.strokeWidth(),O=g(L.plotX||0,R),I=Math.round(L.shapeArgs.width/2);if(L.open!==null){let _=g(L.plotOpen,R);w.push(["M",O,_],["L",O-I,_]),super.extendStem(w,R/2,_)}return w}pointAttribs(L,S){let w=super.pointAttribs.call(this,L,S),R=this.options;return delete w.fill,!L.options.color&&R.upColor&&L.openp&&(g-=Math.round((b-p)/2),p=b),x=h[c](g,u,p,b,v),m&&E){let L=m;if(c==="circle")L=g+p/2;else{let w=x[0],R=x[1];w[0]==="M"&&R[0]==="L"&&(L=(w[1]+R[1])/2)}let S=u>E?u:u+b;x.push(["M",L,S],["L",m,E]),x=x.concat(h.circle(m-1,E-1,2,2))}return x}}r.compose=function(h){if(n.indexOf(h)===-1){n.push(h);let g=h.prototype.symbols;g.flag=l,a(g,"circle"),a(g,"square")}let c=e.getRendererType();n.indexOf(c)&&n.push(c)}}(i||(i={})),i}),s(t,"Series/OnSeriesComposition.js",[t["Series/Column/ColumnSeries.js"],t["Core/Globals.js"],t["Core/Series/Series.js"],t["Core/Utilities.js"]],function(e,i,r,n){var l;let{composed:a}=i,{prototype:h}=e,{prototype:c}=r,{defined:g,pushUnique:u,stableSort:p}=n;return function(b){function v(m){return c.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this,m)}function x(){h.translate.apply(this);let m=this,E=m.options,L=m.chart,S=m.points,w=E.onSeries,R=w&&L.get(w),O=R&&R.options.step,I=R&&R.points,_=L.inverted,P=m.xAxis,F=m.yAxis,A=S.length-1,D,C,d=E.onKey||"y",f=I&&I.length,y=0,M,k,T,z,N;if(R&&R.visible&&f){for(y=(R.pointXOffset||0)+(R.barW||0)/2,z=R.currentDataGrouping,k=I[f-1].x+(z?z.totalRange:0),p(S,(G,X)=>G.x-X.x),d="plot"+d[0].toUpperCase()+d.substr(1);f--&&S[A];)if(M=I[f],(D=S[A]).y=M.y,M.x<=D.x&&M[d]!==void 0){if(D.x<=k&&(D.plotY=M[d],M.xMath.pow(1-H,3)*G[V]+3*(1-H)*(1-H)*H*j[V]+3*(1-H)*H*H*B[V]+H*H*H*X[V],Y=0,U=1,q;for(let H=0;H<100;H++){let V=(Y+U)/2,Z=W(V,0);if(Z===null)break;if(.25>Math.abs(Z-D.plotX)){q=V;break}Z{let j;G.plotX+=y,(G.plotY===void 0||_)&&(G.plotX>=0&&G.plotX<=P.len?_?(G.plotY=P.translate(G.x,0,1,0,1),G.plotX=g(G.y)?F.translate(G.y,0,0,0,1):0):G.plotY=(P.opposite?0:m.yAxis.len)+P.offset:G.shapeArgs={}),(C=S[X-1])&&C.plotX===G.plotX&&(C.stackIndex===void 0&&(C.stackIndex=0),j=C.stackIndex+1),G.stackIndex=j}),this.onSeries=R}b.compose=function(m){if(u(a,"OnSeries")){let E=m.prototype;E.getPlotBox=v,E.translate=x}return m},b.getPlotBox=v,b.translate=x}(l||(l={})),l}),s(t,"Series/Flags/FlagsSeries.js",[t["Series/Flags/FlagsPoint.js"],t["Series/Flags/FlagsSeriesDefaults.js"],t["Series/Flags/FlagsSymbols.js"],t["Core/Globals.js"],t["Series/OnSeriesComposition.js"],t["Core/Renderer/RendererUtilities.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Renderer/SVG/SVGElement.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a,h,c,g){let{noop:u}=n,{distribute:p}=a,{series:b,seriesTypes:{column:v}}=h,{addEvent:x,defined:m,extend:E,isNumber:L,merge:S,objectEach:w,wrap:R}=g;class O extends v{animate(_){_&&this.setClip()}drawPoints(){let _,P,F,A,D,C,d,f,y,M,k,T=this.points,z=this.chart,N=z.renderer,G=z.inverted,X=this.options,j=X.y,B=this.yAxis,W={},Y=[],U=L(X.borderRadius)?X.borderRadius:0;for(A=T.length;A--;)D=T[A],M=(G?D.plotY:D.plotX)>this.xAxis.len,_=D.plotX,d=D.stackIndex,F=D.options.shape||X.shape,(P=D.plotY)!==void 0&&(P=D.plotY+j-(d!==void 0&&d*X.stackDistance)),D.anchorX=d?void 0:D.plotX,f=d?void 0:D.plotY,k=F!=="flag",C=D.graphic,P!==void 0&&_>=0&&!M?(C&&D.hasNewShapeType()&&(C=C.destroy()),C||(C=D.graphic=N.label("",0,void 0,F,void 0,void 0,X.useHTML).addClass("highcharts-point").add(this.markerGroup),D.graphic.div&&(D.graphic.div.point=D),C.isNew=!0),C.attr({align:k?"center":"left",width:X.width,height:X.height,"text-align":X.textAlign,r:U}),z.styledMode||C.attr(this.pointAttribs(D)).css(S(X.style,D.style)).shadow(X.shadow),_>0&&(_-=C.strokeWidth()%2),y={y:P,anchorY:f},X.allowOverlapX&&(y.x=_,y.anchorX=D.anchorX),C.attr({text:D.options.title??X.title??"A"})[C.isNew?"attr":"animate"](y),X.allowOverlapX||(W[D.plotX]?W[D.plotX].size=Math.max(W[D.plotX].size,C.width||0):W[D.plotX]={align:k?.5:0,size:C.width||0,target:_,anchorX:_}),D.tooltipPos=[_,P+B.pos-z.plotTop]):C&&(D.graphic=C.destroy());if(!X.allowOverlapX){let q=100;for(let H of(w(W,function(V){V.plotX=V.anchorX,Y.push(V),q=Math.max(V.size,q)}),p(Y,G?B.len:this.xAxis.len,q),T)){let V=H.plotX,Z=H.graphic,K=Z&&W[V];K&&Z&&(m(K.pos)?Z[Z.isNew?"attr":"animate"]({x:K.pos+(K.align||0)*K.size,anchorX:H.anchorX}).show().isNew=!1:Z.hide().isNew=!0)}}X.useHTML&&this.markerGroup&&R(this.markerGroup,"on",function(q){return c.prototype.on.apply(q.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})}drawTracker(){let _=this.points;for(let P of(super.drawTracker(),_)){let F=P.graphic;F&&(P.unbindMouseOver&&P.unbindMouseOver(),P.unbindMouseOver=x(F.element,"mouseover",function(){for(let A of(P.stackIndex>0&&!P.raised&&(P._y=F.y,F.attr({y:P._y-8}),P.raised=!0),_))A!==P&&A.raised&&A.graphic&&(A.graphic.attr({y:A._y}),A.raised=!1)}))}}pointAttribs(_,P){let F=this.options,A=_&&_.color||this.color,D=F.lineColor,C=_&&_.lineWidth,d=_&&_.fillColor||F.fillColor;return P&&(d=F.states[P].fillColor,D=F.states[P].lineColor,C=F.states[P].lineWidth),{fill:d||A,stroke:D||A,"stroke-width":C||F.lineWidth||0}}setClip(){b.prototype.setClip.apply(this,arguments),this.options.clip!==!1&&this.sharedClipKey&&this.markerGroup&&this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey])}}return O.compose=r.compose,O.defaultOptions=S(v.defaultOptions,i),l.compose(O),E(O.prototype,{allowDG:!1,forceCrop:!0,invertible:!1,noSharedTooltip:!0,pointClass:e,sorted:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],buildKDTree:u,init:b.prototype.init}),h.registerSeriesType("flags",O),O}),s(t,"Core/Axis/BrokenAxis.js",[t["Core/Axis/Stacking/StackItem.js"],t["Core/Utilities.js"]],function(e,i){var r;let{addEvent:n,find:l,fireEvent:a,isArray:h,isNumber:c,pick:g}=i;return function(u){function p(){this.brokenAxis!==void 0&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function b(){this.brokenAxis?.hasBreaks&&(this.options.ordinal=!1)}function v(){let R=this.brokenAxis;if(R?.hasBreaks){let O=this.tickPositions,I=this.tickPositions.info,_=[];for(let P=0;Py.to||_>y.from&&Py.from&&Py.from&&P>y.to&&P0){let A,D;for(this.options.gapUnit!=="value"&&(P*=this.basePointRange),O&&O>P&&O>=this.basePointRange&&(P=O);F--;)if(D&&D.visible!==!1||(D=I[F+1]),A=I[F],D.visible!==!1&&A.visible!==!1){if(D.x-A.x>P){let C=(A.x+D.x)/2;I.splice(F+1,0,{isNull:!0,x:C}),_.stacking&&this.options.stacking&&((_.stacking.stacks[this.stackKey][C]=new e(_,_.options.stackLabels,!1,C,this.stack)).total=0)}D=A}}return this.getGraphPath(I)}u.compose=function(R,O){if(!R.keepProps.includes("brokenAxis")){R.keepProps.push("brokenAxis"),n(R,"init",x),n(R,"afterInit",p),n(R,"afterSetTickPositions",v),n(R,"afterSetOptions",b);let I=O.prototype;I.drawBreaks=L,I.gappedPath=S,n(O,"afterGeneratePoints",m),n(O,"afterRender",E)}return R};class w{static isInBreak(O,I){let _=O.repeat||1/0,P=O.from,F=O.to-O.from,A=I>=P?(I-P)%_:_-(P-I)%_;return O.inclusive?A<=F:A=P);A++)(F.to=O)break;if(w.isInBreak(F,O)){P-=O-F.from;break}}return P}constructor(O){this.hasBreaks=!1,this.axis=O}findBreakAt(O,I){return l(I,function(_){return _.fromk;)z-=M;for(;zthis.chart.plotSizeX/x||E&&L.forced)&&(m=!0));return m?x:0}function u(){this.series.forEach(function(b){b.hasProcessed=!1})}function p(b,v){let x;if(v=h(v,!0),b||(b={forced:!1,units:null}),this instanceof r)for(x=this.series.length;x--;)this.series[x].update({dataGrouping:b},!1);else this.chart.options.series.forEach(function(m){m.dataGrouping=typeof b=="boolean"?b:a(b,m.dataGrouping)});this.ordinal&&(this.ordinal.slope=void 0),v&&this.chart.redraw()}return{compose:function(b){r=b;let v=b.prototype;v.applyGrouping||(n(b,"afterSetScale",u),n(b,"postProcessData",c),l(v,{applyGrouping:c,getGroupPixelWidth:g,setDataGrouping:p}))}}}),s(t,"Extensions/DataGrouping/DataGroupingSeriesComposition.js",[t["Extensions/DataGrouping/ApproximationRegistry.js"],t["Extensions/DataGrouping/DataGroupingDefaults.js"],t["Core/Axis/DateTimeAxis.js"],t["Core/Defaults.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,i,r,n,l,a){let{series:{prototype:h}}=l,{addEvent:c,defined:g,error:u,extend:p,isNumber:b,merge:v,pick:x}=a,m=h.generatePoints;function E(I){var _;let P,F,A=this.chart,D=this.options.dataGrouping,C=this.allowDG!==!1&&D&&x(D.enabled,A.options.isStock),d=this.reserveSpace(),f=this.currentDataGrouping,y,M,k=!1;C&&!this.requireSorting&&(this.requireSorting=k=!0);let T=!!(this.isCartesian&&!this.isDirty&&!this.xAxis.isDirty&&!this.yAxis.isDirty&&!I)||!C;if(k&&(this.requireSorting=!1),T)return;this.destroyGroupedData();let z=D.groupAll?this.xData:this.processedXData,N=D.groupAll?this.yData:this.processedYData,G=A.plotSizeX,X=this.xAxis,j=X.options.ordinal,B=this.groupPixelWidth;if(B&&z&&z.length&&G){F=!0,this.isDirty=!0,this.points=null;let W=X.getExtremes(),Y=W.min,U=W.max,q=j&&X.ordinal&&X.ordinal.getGroupIntervalFactor(Y,U,this)||1,H=B*(U-Y)/G*q,V=X.getTimeTicks(r.Additions.prototype.normalizeTimeTickInterval(H,D.units||i.units),Math.min(Y,z[0]),Math.max(U,z[z.length-1]),X.options.startOfWeek,z,this.closestPointRange),Z=h.groupData.apply(this,[z,N,V,D.approximation]),K=Z.groupedXData,J=Z.groupedYData,tt=0;for(D&&D.smoothed&&K.length&&(D.firstAnchor="firstPoint",D.anchor="middle",D.lastAnchor="lastPoint",u(32,!1,A,{"dataGrouping.smoothed":"use dataGrouping.anchor"})),P=1;P=Q[0]){let lt;ht++;let xt=$.groupMap[0].start,wt=$.groupMap[0].length;b(xt)&&b(wt)&&(lt=xt+(wt-1)),Q[0]={start:Q[0],middle:Q[0]+.5*st,end:Q[0]+st,firstPoint:$.xData[0],lastPoint:lt&&$.xData[lt]}[ot]}if(rt>0&&at&&st&&Q[rt]>=et-st){ct--;let lt=$.groupMap[$.groupMap.length-1].start;Q[rt]={start:Q[rt],middle:Q[rt]+.5*st,end:Q[rt]+st,firstPoint:lt&&$.xData[lt],lastPoint:$.xData[$.xData.length-1]}[at]}if(nt&&nt!=="start"){let lt=st*{middle:.5,end:1}[nt];for(;ct>=ht;)Q[ct]+=lt,ct--}}(this,K,U),d&&(g((_=K)[0])&&b(X.min)&&b(X.dataMin)&&_[0]X.max&&((!g(X.options.max)&&b(X.dataMax)&&X.max>=X.dataMax||X.max===X.dataMax)&&(X.max=Math.max(_[_.length-1],X.max)),X.dataMax=Math.max(_[_.length-1],X.dataMax))),D.groupAll&&(this.allGroupedData=J,K=(M=this.cropData(K,J,X.min,X.max)).xData,J=M.yData,this.cropStart=M.start),this.processedXData=K,this.processedYData=J}else this.groupMap=null,this.currentDataGrouping=void 0;this.hasGroupedData=F,this.preventGraphAnimation=(f&&f.totalRange)!==(y&&y.totalRange)}function L(){this.groupedData&&(this.groupedData.forEach(function(I,_){I&&(this.groupedData[_]=I.destroy?I.destroy():null)},this),this.groupedData.length=0,delete this.allGroupedData)}function S(){m.apply(this),this.destroyGroupedData(),this.groupedData=this.hasGroupedData?this.points:null}function w(){return this.is("arearange")?"range":this.is("ohlc")?"ohlc":this.is("hlc")?"hlc":this.is("column")||this.options.cumulative?"sum":"average"}function R(I,_,P,F){let A=this,D=A.data,C=A.options&&A.options.data,d=[],f=[],y=[],M=I.length,k=!!_,T=[],z=A.pointArrayMap,N=z&&z.length,G=["x"].concat(z||["y"]),X=this.options.dataGrouping&&this.options.dataGrouping.groupAll,j,B,W,Y=0,U=0,q=typeof F=="function"?F:F&&e[F]?e[F]:e[A.getDGApproximation&&A.getDGApproximation()||"average"];if(N){let V=z.length;for(;V--;)T.push([])}else T.push([]);let H=N||1;for(let V=0;V<=M;V++)if(!(I[V]=P[Y+1]||V===M;){j=P[Y],A.dataGroupInfo={start:X?U:A.cropStart+U,length:T[0].length,groupStart:j},W=q.apply(A,T),A.pointClass&&!g(A.dataGroupInfo.options)&&(A.dataGroupInfo.options=v(A.pointClass.prototype.optionsToObject.call({series:A},A.options.data[A.cropStart+U])),G.forEach(function(Z){delete A.dataGroupInfo.options[Z]})),W!==void 0&&(d.push(j),f.push(W),y.push(A.dataGroupInfo)),U=V;for(let Z=0;Z{let c=h.axis.getExtremes(),g=c.min,u=c.max,p=n(h.axis.minPointOffset,0);return r(g)&&r(u)&&h.value>=g-p&&h.value<=u+p&&!h.axis.options.isInternal})[0]},getFieldType:function(a,h){let c=l[a],g=typeof h;return i(c)&&(g=c),{string:"text",number:"number",boolean:"checkbox"}[g]}}}),s(t,"Extensions/MouseWheelZoom/MouseWheelZoom.js",[t["Core/Utilities.js"],t["Extensions/Annotations/NavigationBindingsUtilities.js"]],function(e,i){let r,{addEvent:n,isObject:l,pick:a,defined:h,merge:c}=e,{getAssignedAxis:g}=i,u=[],p={enabled:!0,sensitivity:1.1},b=m=>(l(m)||(m={enabled:m??!0}),c(p,m)),v=function(m,E,L,S,w,R,O){let I=a(O.type,m.zooming.type,""),_=[];I==="x"?_=L:I==="y"?_=S:I==="xy"&&(_=m.axes);let P=m.transform({axes:_,to:{x:w-5,y:R-5,width:10,height:10},from:{x:w-5*E,y:R-5*E,width:10*E,height:10*E},trigger:"mousewheel"});return P&&(h(r)&&clearTimeout(r),r=setTimeout(()=>{m.pointer?.drop()},400)),P};function x(){let m=b(this.zooming.mouseWheel);m.enabled&&n(this.container,"wheel",E=>{E=this.pointer?.normalize(E)||E;let{pointer:L}=this,S=L&&!L.inClass(E.target,"highcharts-no-mousewheel");if(this.isInsidePlot(E.chartX-this.plotLeft,E.chartY-this.plotTop)&&S){let w=m.sensitivity||1.1,R=E.detail||(E.deltaY||0)/120,O=g(L.getCoordinates(E).xAxis),I=g(L.getCoordinates(E).yAxis);v(this,Math.pow(w,R),O?[O.axis]:this.xAxis,I?[I.axis]:this.yAxis,E.chartX,E.chartY,m)&&E.preventDefault?.()}})}return{compose:function(m){u.indexOf(m)===-1&&(u.push(m),n(m,"afterGetContainer",x))}}}),s(t,"masters/modules/mouse-wheel-zoom.src.js",[t["Core/Globals.js"],t["Extensions/MouseWheelZoom/MouseWheelZoom.js"]],function(e,i){return e.MouseWheelZoom=e.MouseWheelZoom||i,e.MouseWheelZoom.compose(e.Chart),e}),s(t,"masters/modules/stock.src.js",[t["Core/Globals.js"],t["Series/DataModifyComposition.js"],t["Stock/Navigator/Navigator.js"],t["Core/Axis/OrdinalAxis.js"],t["Stock/RangeSelector/RangeSelector.js"],t["Stock/Scrollbar/Scrollbar.js"],t["Core/Chart/StockChart.js"],t["Series/OHLC/OHLCSeries.js"],t["Series/Flags/FlagsSeries.js"]],function(e,i,r,n,l,a,h,c,g){return e.Navigator=e.Navigator||r,e.OrdinalAxis=e.OrdinalAxis||n,e.RangeSelector=e.RangeSelector||l,e.Scrollbar=e.Scrollbar||a,e.stockChart=e.stockChart||h.stockChart,e.StockChart=e.StockChart||e.stockChart,e.extend(e.StockChart,h),i.compose(e.Series,e.Axis,e.Point),g.compose(e.Renderer),c.compose(e.Series),e.Navigator.compose(e.Chart,e.Axis,e.Series),e.OrdinalAxis.compose(e.Axis,e.Series,e.Chart),e.RangeSelector.compose(e.Axis,e.Chart),e.Scrollbar.compose(e.Axis),e.StockChart.compose(e.Chart,e.Axis,e.Series,e.SVGRenderer),e})})});var Du=qe((NT,Un)=>{"use strict";(function(o){typeof Un=="object"&&Un.exports?(o.default=o,Un.exports=o):typeof define=="function"&&define.amd?define("highcharts/modules/solid-gauge",["highcharts","highcharts/highcharts-more"],function(t){return o(t),o.Highcharts=t,o}):o(typeof Highcharts<"u"?Highcharts:void 0)})(function(o){"use strict";var t=o?o._modules:{};function s(e,i,r,n){e.hasOwnProperty(i)||(e[i]=n.apply(null,r),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}s(t,"Core/Axis/Color/ColorAxisLike.js",[t["Core/Color/Color.js"],t["Core/Utilities.js"]],function(e,i){var r,n;let{parse:l}=e,{merge:a}=i;return(n=r||(r={})).initDataClasses=function(h){let c=this.chart,g=this.legendItem=this.legendItem||{},u=this.options,p=h.dataClasses||[],b,v,x=c.options.chart.colorCount,m=0,E;this.dataClasses=v=[],g.labels=[];for(let L=0,S=p.length;L=u)&&(p===void 0||h<=p)){b=v.color,c&&(c.dataClass=x,c.colorIndex=v.colorIndex);break}}else{for(g=this.normalizedValue(h),x=E.length;x--&&!(g>E[x][0]););u=E[x]||E[x+1],g=1-((p=E[x+1]||u)[0]-g)/(p[0]-u[0]||1),b=u.color.tweenTo(p.color,g)}return b},r}),s(t,"Core/Axis/SolidGaugeAxis.js",[t["Core/Axis/Color/ColorAxisLike.js"],t["Core/Utilities.js"]],function(e,i){let{extend:r}=i;return{init:function(n){r(n,e)}}}),s(t,"Series/SolidGauge/SolidGaugeSeriesDefaults.js",[],function(){return{colorByPoint:!0,dataLabels:{y:0}}}),s(t,"Series/SolidGauge/SolidGaugeSeries.js",[t["Extensions/BorderRadius.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Axis/SolidGaugeAxis.js"],t["Series/SolidGauge/SolidGaugeSeriesDefaults.js"],t["Core/Utilities.js"]],function(e,i,r,n,l){let{gauge:a,pie:h}=i.seriesTypes,{clamp:c,extend:g,isNumber:u,merge:p,pick:b,pInt:v}=l;class x extends a{translate(){let E=this.yAxis;r.init(E),!E.dataClasses&&E.options.dataClasses&&E.initDataClasses(E.options),E.initStops(),a.prototype.translate.call(this)}drawPoints(){let E,L=this.yAxis,S=L.center,w=this.options,R=this.chart.renderer,O=w.overshoot,I=w.rounded&&w.borderRadius===void 0,_=u(O)?O/180*Math.PI:0;for(let P of(u(w.threshold)&&(E=L.startAngleRad+L.translate(w.threshold,void 0,void 0,void 0,!0)),this.thresholdAngleRad=b(E,L.startAngleRad),this.points))if(!P.isNull){let F=v(b(P.options.radius,w.radius,100))*S[2]/200,A=v(b(P.options.innerRadius,w.innerRadius,60))*S[2]/200,D=Math.min(L.startAngleRad,L.endAngleRad),C=Math.max(L.startAngleRad,L.endAngleRad),d=P.graphic,f=L.startAngleRad+L.translate(P.y,void 0,void 0,void 0,!0),y,M,k=L.toColor(P.y,P);k==="none"&&(k=P.color||this.color||"none"),k!=="none"&&(P.color=k),f=c(f,D-_,C+_),w.wrap===!1&&(f=c(f,D,C));let T=I?(F-A)/2/F:0,z=Math.min(f,this.thresholdAngleRad)-T,N=Math.max(f,this.thresholdAngleRad)+T;N-z>2*Math.PI&&(N=z+2*Math.PI);let G=I?"50%":0;w.borderRadius&&(G=e.optionsToObject(w.borderRadius).radius),P.shapeArgs=y={x:S[0],y:S[1],r:F,innerR:A,start:z,end:N,borderRadius:G},P.startR=F,d?(M=y.d,d.animate(g({fill:k},y)),M&&(y.d=M)):P.graphic=d=R.arc(y).attr({fill:k,"sweep-flag":0}).add(this.group),this.chart.styledMode||(w.linecap!=="square"&&d.attr({"stroke-linecap":"round","stroke-linejoin":"round"}),d.attr({stroke:w.borderColor||"none","stroke-width":w.borderWidth||0})),d&&d.addClass(P.getClassName(),!0)}}animate(E){E||(this.startAngleRad=this.thresholdAngleRad,h.prototype.animate.call(this,E))}}return x.defaultOptions=p(a.defaultOptions,n),i.registerSeriesType("solidgauge",x),x}),s(t,"masters/modules/solid-gauge.src.js",[t["Core/Globals.js"]],function(e){return e})})});var Qn=qt(ys());var _h="Oxygen",wh="mdx2json.emptyportlet",Sh="DSW.Addons.";var ye=(()=>{let t=class t{constructor(){this.model={},this.el=$t(ah),this.cd=$t(dh),this.ds=$t(gh),this.ss=$t(xh),this.bs=$t(yh),this.us=$t(mh),this.i18n=$t(fh),this.route=$t(ph),this.fs=$t(vh),this.dbs=$t(bh),this.isSpinner=!0,this.drills=[],this.drillFilterWidgets=[],this.customDataSource="",this.preventColFilteringBasedOnDataProperties=!1,this.drillFilter="",this.drillFilterDrills=[],this.customColSpec="",this.customRowSpec="",this.linkedMdx="",this.canDoDrillthrough=!1,this.firstRun=!0,this.baseType="",this.hasDatasourceChooser=!1,this.oneItemDrillApplied=!1}get inline(){return this.widget.inline}ngOnInit(){this.baseType=this.widget?.type,this.override=this.getOverride(),this.extendPropsWithOverrides(),this.loadWidgetSettings(),this.initializeDrills(),this.initializeTile(),this.initializeActionAndPvItems(),this.initializeDataSourceChooser(),this.initializeDrillthrough(),this.initializeLiveDataUpdate(),this.subscribe(),this.initializeLinkedWidgets(),this.initializeDependants(),this.initializeDrillFilter(),this.initializeChoseDataSource(),this.initializeInputControls(),this.initializeActions(),this.requestPivotData(),this.initializeDataRequest()}ngOnDestroy(){clearInterval(this.liveUpdateInterval),this.subDrilldown?.unsubscribe(),this.subDrillthrough?.unsubscribe(),this.subLinkedMdx?.unsubscribe(),this.subRefreshDependants?.unsubscribe(),this.subDrillFilter?.unsubscribe(),this.subDrillFilterAll?.unsubscribe(),this.subPivotVar?.unsubscribe(),this.subPivotVarAll?.unsubscribe(),this.subDataSourceChange?.unsubscribe(),this.subColSpec?.unsubscribe(),this.subColSpecAll?.unsubscribe(),this.subChartType?.unsubscribe()}getDataProp(e){if(this.widget.dataProperties)return this.widget.dataProperties.find(i=>i.name===e)}getDataPropByDataValue(e){if(!this.widget.dataProperties||!e)return;let i=e.split("/");return this.widget.dataProperties.find(r=>{let n=r.dataValue?.toString().split("/");return i.some(l=>n.includes(l))})}getDataPropValue(e){let i=this.getDataProp(e);if(i&&i.dataValue!==null&&i.dataValue!==void 0)return i.dataValue.toString()}initializeActions(){if(!this.widget.controls||this.widget.controls.length===0)return;let e=["chooserowspec","setrowspec","choosedatasource","choosecharttype","applyfilter","setfilter","refresh","reloaddashboard","showlisting","showgeolisting","showbreakdown","setdatasource","applyvariable","setrowcount","setrowsort","setcolumncount","setcolumnsort","choosecolumnspec"],i=this.widget.controls.filter(r=>e.indexOf(r.action.toLowerCase())===-1&&r.type!=="hidden");i.length!==0&&(this.widget.acItems=i)}initializeChoseDataSource(){return Yt(this,null,function*(){if(!this.widget)return;let e=n=>n.action==="chooseDataSource"||n.action==="chooseRowSpec"||n.action==="setRowSpec"||n.action==="chooseColumnSpec",i=this.widget.type===wh;if(!i&&(!this.widget.controls||this.widget.controls.length===0))return;let r=[];if(this.widget.controls&&(r=this.widget.controls.filter(e).filter(n=>n.location!=="dashboard")),i){let n=this.dbs.getWidgets();for(let l=0;la.location==="dashboard")))}if(r.length!==0){this.hasDatasourceChooser=!0,this.widget.dsItems=[];for(let n=0;n{h[b]=p[v]})}}let g={action:r[n].action,label:r[n].label||this.i18n.get("dataSource"),dsSelected:r[n].value,control:r[n],labels:[],values:[],field:"select"};this.widget.dsItems.push(g);let u=null;if(c?u=yield this.ds.getTermList(c):u=h,u&&typeof u=="object"){for(let b in u)u[b]===this.widget.dataSource&&(this.widget.dsSelected=b);g.labels=[],g.values=[],(g.control?.action==="chooseRowSpec"||g.control?.action==="setRowSpec")&&(g.labels.push(""),g.values.push(""));for(let b in u)g.labels.push(b),g.values.push(u[b]);let p=-1;this.customDataSource?p=g.values.findIndex(b=>b===this.customDataSource):p=g.values.findIndex(b=>b.split("/").pop()===g.dsSelected),p===-1?g.dsSelected=g.labels[0]:g.dsSelected=g.labels[p],this.parent?.filters.detectChanges()}}}})}onVariableChange(e){let i=e.target;this.bs.broadcast(`updatePivotVar:${i}`)}onPivotVarChanged(){this.requestData()}getDataByColumnName(e,i,r,n=""){if(!e||!e.Data||!e.Cols||!e.Cols[0]||!e.Cols[0].tuples)return;let l=e.Cols[0].tuples.filter(g=>g.caption.toLowerCase()===i.toLowerCase());if(l.length===0)return;let a=e.Cols[0].tuples.indexOf(l[0]),h=e.Cols[0].tuples[a].originalIndex;h!==void 0&&(a=h);let c=e.Data[r+a];return n&&(c=this.formatNumber(c,n)),c}initializeDrillFilter(){let e=this.fs.getClickFilterTarget(this.widget.name);e?.length&&(this.drillFilterWidgets=e)}resetClickFilter(){if(this.widget.clickFilterActive=!1,!(!this.drillFilterWidgets||!this.drillFilterWidgets.length))for(let e=0;e{this.bs.broadcast("drillFilter:"+r,{path:"",drills:[]})})}}doDrillFilter(e,i=[]){if(!this.drillFilterWidgets||!this.drillFilterWidgets.length)return;let r=i.slice();e||r.pop(),this.widget.clickFilterActive=!!e;for(let n=0;n{this.bs.broadcast("drillFilter:"+a,{path:e,drills:r})})}this.parent?.header?.cd.detectChanges()}onDrillFilter(e,i){this.drillFilter=e,this.drillFilterDrills=i,this.requestData()}actionNavigate(e,i=!1){let r=e.targetProperty,n=r.toUpperCase().indexOf("DASHBOARD=");if(n!==-1){let l=r.substring(n+10,r.length);l.indexOf("?")===-1&&(l=l.replace("&","?"));let a=location.href;a.indexOf("#")!==-1?r=a.split("#")[0]+"#/"+xs+"/"+l:r+="#/"+xs+"/"+l}if(r=r.replace("$$$FILTERS",this.fs.getFiltersUrlString(this.widget.name)),this.lpt&&this.lpt.getSelectedRows().length){let l=this.lpt.dataController.getData(),a=l.dataArray[(this.lpt.getSelectedRows()[0]-1)*l.columnProps.length],h=r.toLowerCase().indexOf("$$$currvalue");h!==-1&&(r=r.substring(0,h)+a+r.substring(h+12,r.length))}if(this.lpt&&this.lpt.getSelectedRows().length){let l=this.lpt.dataController.getData(),a=this.lpt.getSelectedRows(),h=[];for(let g=0;gthis.requestData())}getDrillTitle(e){if(!e)return this.widget.baseTitle||"";let i=e.path.split(".");return i.pop(),(this.widget.baseTitle?this.widget.baseTitle+" - ":"")+(e.name?i[i.length-1]+" - ":"")+(e.name||e.category)}isEmptyData(e){return!e||!e.Cols||!e.Cols[1]||!e.Cols[1]||!e.Cols[1].tuples||e.Cols[1].tuples.length===0||!e.Data||e.Data.length===0||e.Data[0]==="@NOPROPERTY"}doDrillUp(){this.widget.isDrillthrough?(this.restoreWidgetType(),this.widget.isDrillthrough=!1,this.widget.backButton=!!this.drills?.length,this.parent.header?.cd.detectChanges()):this.doDrillOnly()}restoreWidgetType(){delete this.widget.pivotMdx,delete this.widget.pivotData,this.widget?.oldType&&(this.widget.type=this.widget.oldType,this.parent?.updateComponent())}changeWidgetType(e){this.widget.oldType=this.widget.type,this.widget.type=e,this.parent?.updateComponent()}getDrillthroughMdx(e){let i=e.toLowerCase(),r="select non empty",n=i.lastIndexOf(r);n===-1&&(r="select",n=i.lastIndexOf(r));let l=i.lastIndexOf("from");if(n===-1){console.warn("Can't find 'select' in MDX during calculation drillthrough mdx");return}if(l===-1){console.warn("Can't find 'from' in MDX during calculation drillthrough mdx");return}let a="";if(this.pivotData?.listingRows){let c=parseInt(this.pivotData.listingRows,10);c&&(a=` MAXROWS ${c} `)}let h=this.widget.controls.find(c=>c.action==="showListing");if(h){let c=h.targetPropertyDisplay;if(c)return"DRILLTHROUGH "+a+e.substring(0,n+r.length)+" "+e.substring(l,e.length)+` %LISTING [${c}]`}return"DRILLTHROUGH "+a+e.substring(0,n+r.length)+" "+e.substring(l,e.length)}doDrill(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{this.clearError(),l||this.doDrillFilter(e,this.drills);let u=this.drills.slice();e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading();let b=()=>{if(n){n();return}if(!this.canDoDrillthrough)return;let v=this.getDrillthroughMdx(p)||"";this.ds.execMDX(v).then(x=>{!x||!x.children||x.children.length===0||(this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.widget.pivotData=x,this._currentData=x,this.displayAsPivot(v))}).catch(x=>{h&&h(x)})};this.showLoading(),this.ds.execMDX(p).catch(v=>{l?h&&h(v):b()}).then(v=>{if(v){if(this.chartConfig&&(this.chartConfig.loading=!1),this.isEmptyData(v)&&e){b();return}this.isEmptyData(v)||(e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop(),this.widget.backButton=this.drills.length!==0,this.widget.title=this.getDrillTitle(this.drills[this.drills.length-1]),this.broadcastDependents(p),this.retrieveData(v),this.updateLocationDrillParameters(),this.parent?.header?.cd.detectChanges(),this._currentData=v,a&&a())}}).finally(()=>{this.hideLoading(),c()})})}doDrillthrough(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{if(!this.canDoDrillthrough){c();return}this.clearError();let u=this.drills.slice();e?Array.isArray(e)?e.forEach(v=>{this.drills.push({path:v,name:i||"",category:r})}):this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading();let b=this.getDrillthroughMdx(p)||"";this.ds.execMDX(b).then(v=>{!v||!v.children||v.children.length===0||(this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.widget.pivotData=v,this.displayAsPivot(b))}).catch(v=>{h&&h(v)}).finally(()=>{this.hideLoading()})})}doDrillOnly(e,i,r,n,l=!1,a,h){return new Promise((c,g)=>{this.clearError();let u=this.drills.slice();e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop();let p=this.getMDX();this.drills=u,this.showLoading(),this.ds.execMDX(p).catch(b=>{h&&h(b)}).then(b=>{b&&(this.chartConfig&&(this.chartConfig.loading=!1),!this.isEmptyData(b)&&(this._currentData=b,e?this.drills.push({path:e,name:i||"",category:r}):this.drills.pop(),this.widget.backButton=this.drills.length!==0,this.widget.title=this.getDrillTitle(this.drills[this.drills.length-1]),this.broadcastDependents(p),this.retrieveData(b),this.updateLocationDrillParameters(),this.parent?.header?.cd.detectChanges(),a&&a()))}).finally(()=>{this.hideLoading(),c()})})}checkForAutoDrill(e){return Yt(this,null,function*(){let i=!1;return e?.Cols[1]?.tuples?.length===1&&(this.oneItemDrillApplied=!0,yield this.doDrill(e.Cols[1].tuples[0].path,e.Cols[1].tuples[0].caption,void 0,void 0,!0,()=>{this.widget.backButton=!1,this.parent?.header?.cd.detectChanges(),i=!0},()=>{this.oneItemDrillApplied=!1})),i})}showLoading(){this.isSpinner||(this.isSpinner=!0,this.parent.cd.detectChanges(),this.cd.detectChanges())}hideLoading(){this.isSpinner&&(this.isSpinner=!1,this.parent.cd.detectChanges(),this.cd.detectChanges())}applyDrill(e){let i=this.route.snapshot.queryParamMap.get("filter");i&&(e=e+" %FILTER "+i);let r=this.drills;if(r.length===0&&(r=this.drillFilterDrills),r.length===0)return e;let n=[];this.pivotData&&this.pivotData.rowAxisOptions&&this.pivotData.rowAxisOptions.drilldownSpec&&(n=this.pivotData.rowAxisOptions.drilldownSpec.split("^"));for(let g=0;gthis._retriveDataSource(i)).catch(i=>{this.showError(i.error?.Error||i.message)})}convertKPIToMDXData(e,i=!1){let r=e,n=e.Result,l={Info:{cubeName:r.Info.KpiName},Cols:[],Data:[]},a=[];for(let c=0;cthis.broadcastDependents(),0),e.indexOf("$")!==-1&&!this.pivotVariables&&this.ds.getPivotVariables(this.widget.cube).then(i=>{this.pivotVariables=i}).catch(i=>{this.showError(i.message)}),this.showLoading(),this.ds.execMDX(e).then(i=>{this.removeColsThatNotExistInDataProperties(i),this._currentData=i,this.retrieveData(i)}).catch(i=>this._onRequestError(i)).finally(()=>{this.hideLoading()})}broadcastDependents(e){if(this.hasDependents())for(let i=0;in.action==="applyVariable");if(this.widget.shared){let n=this.route.snapshot.queryParamMap.get("variables");n&&n.split("~").forEach(a=>{let h=a.split("."),c=h[0],g=h[1],u=r.findIndex(p=>p.targetProperty==="$variable."+c);u!==-1?r[u].value=g:r.push({targetProperty:"$variable."+c,value:g})})}if(!r.length)return e;for(let n=0;nu+b+(g?".%NOT":"")).join(",")||"",e+="})"}else e+=" %FILTER "+c}}return e}dateToHorolog(e){let i=new Date("12/31/1840Z"),n=this.us.toDate(e).getTime()-i.getTime();return Math.ceil(n/(1e3*3600*24)).toString()}getMDX(){let e=!1;if(this.widget.kpitype)return"";let i=this.fs.getWidgetFilters(this.widget.name);if(this.isLinked()){let l=this.replaceMDXVariables(this.linkedMdx||this.widget.linkedMdx||"",i);return l=this.checkColSpec(l),this.applyDrill(l)}if(this.drillFilter){let l=this.drillFilter.indexOf("&");l!==-1&&i.push({targetProperty:this.drillFilter.substring(0,l-1),value:"&"+this.drillFilter.substring(l+1,this.drillFilter.length)})}for(let l=0;l{this.onResize()},0))}displayAsPivot(e){this.widget.type==="pivot"?(this.widget.isDrillthrough=!1,this.restoreWidgetType()):(this.widget.pivotMdx=e||this.getMDX(),this.changeWidgetType("pivot")),this.parent?.cd&&this.parent.cd.detectChanges()}formatNumber(e,i=""){let r="";if(e==null&&(e=""),i?r=(0,Qn.default)(e).format(i.replace(/;/g,""))||"":r=e.toString(),this.dataInfo){let n=this.dataInfo.numericGroupSeparator,l=this.dataInfo.numericGroupSize||3;if(n){let a=r.split(".");a[0]=a[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),r=a.join(".")}this.dataInfo.decimalSeparator&&(r=r.replace(/\./g,this.dataInfo.decimalSeparator))}return r}getDrillsAsParameter(){let e=this.drills;return e?.length?encodeURIComponent(e.map(i=>i.path).join("~")):""}getFormat(e,i,r){let n="";return this.widget?.format&&(n=this.widget.format),i.Cols[0].tuples[e].format&&(n=i.Cols[0].tuples[e].format),r?.format&&(n=r?.format),n}getDataValue(e,i,r){let n=i.Data[e],l=this.getFormat(e,i,r);return l&&(n=(0,Qn.default)(n).format(l)),n}_requestKPIData(e){let i=this.customDataSource||this.widget.dataSource;if(!i)return;let r=this.fs.getWidgetFilters(this.widget.name)?.filter(n=>!!n.value).map(n=>n.value.toString().split("|").map(a=>({name:n.targetProperty,value:a}))).flat();return e&&r.push(...e),this.showLoading(),this.ds.getKPIData(i,r,!!e).then(n=>this._retriveKPI(n,!!e)).finally(()=>{this.hideLoading()})}removeColsThatNotExistInDataProperties(e){if(this.preventColFilteringBasedOnDataProperties||!this.widget.dataProperties?.length||!e?.Cols[0]?.tuples?.length)return;let i=[],r=e.Cols[0]?.tuples?.length||0;r&&(e.Cols[0].tuples=e?.Cols[0]?.tuples.filter((n,l)=>{let a=n.dimension.toString().split("/"),h=this.widget.dataProperties.some(c=>c.dataValue.toString().split("/").some(u=>a.includes(u)));return h||i.push(l),h}),e.Data=e.Data?.filter((n,l)=>!i.some(a=>l%r===a)))}subscribe(){this.subDrillFilter=this.bs.subscribe("drillFilter:"+this.widget.name,({path:e,drills:i})=>{this.onDrillFilter(e,i)}),this.subDrillFilterAll=this.bs.subscribe("drillFilter:*",({path:e,drills:i})=>{this.onDrillFilter(e,i)}),this.subDrilldown=this.bs.subscribe("drilldown:"+this.widget.name,({path:e,title:i})=>{this.doDrillOnly(e,i,i)}),this.subDrillthrough=this.bs.subscribe("drillthrough:"+this.widget.name,({path:e,title:i})=>{this.doDrillthrough(e,i,i)}),this.subPivotVar=this.bs.subscribe("updatePivotVar:"+this.widget.name,e=>this.onPivotVarChanged()),this.subPivotVarAll=this.bs.subscribe("updatePivotVar:*",e=>this.onPivotVarChanged()),this.subColSpec=this.bs.subscribe("setColSpec:"+this.widget.name,e=>this.onColSpecChanged(e)),this.subColSpecAll=this.bs.subscribe("setColSpec:*",e=>this.onColSpecChanged(e)),this.subDataSourceChange=this.bs.subscribe("changeDataSource:"+this.widget.name,e=>this.changeDataSource(e)),this.subChartType=this.bs.subscribe("setWidgetType:"+this.widget.name,e=>{this.changeWidgetType(e)})}getOverride(){let e=this.baseType;return e==="lineChartMarkers"&&(e="lineChart"),e==="regular"&&(e="scoreCard"),this.widget?.overrides?.find(i=>i._type===e)}updateLocationDrillParameters(){if(!this.widget?.shared)return;let e=location.hash,i=this.getDrillsAsParameter();this.ds.router.navigate([],{relativeTo:this.route,queryParams:{drilldown:i},queryParamsHandling:"merge"});let r={type:"drill",index:this.route.snapshot.queryParamMap.get("widget"),widget:this.widget,drills:this.drills};window.parent&&window.parent.postMessage(r,"*");try{window.parent.dsw?.onDrill&&window.parent.dsw.onDrill(r)}catch(n){console.error(n)}}updateDatasourceParameterInURL(){if(!this.widget?.shared)return;this.ds.router.navigate([],{relativeTo:this.route,queryParams:{datasource:this.customDataSource},queryParamsHandling:"merge"});let e={type:"datasource",index:this.route.snapshot.queryParamMap.get("widget"),widget:this.widget,datasource:this.customDataSource};window.parent&&window.parent.postMessage(e,"*");try{window.parent.dsw?.onDataSource&&window.parent.dsw.onDataSource(e)}catch(i){console.error(i)}}navigateDashboard(e){this.ds.router.navigateByUrl(xs+"/"+e)}initializeInputControls(){let e="setRowCount";this.widget.controls.filter(r=>e.includes(r.action)).forEach(r=>{this.widget.dsItems.push({action:r.action,label:r.label||"Row count",field:"input",type:"number",_value:r.value||void 0})})}applyRowCount(e){let i=this.widget.dsItems.find(h=>h.action==="setRowCount");if(!i||!i._value)return e;let r=/(HEAD\(.*),(.*)(\))/i;if(e.match(r))return e.replace(r,`$1,${i._value}$3`);let l=e.match(/ON 0,(.*)ON 1/)?.[1];if(!l)return e;l=l.replace("NON EMPTY","");let a=" HEAD("+l.trim()+`, ${i._value}) `;return e.replace(l,a)}extendPropsWithOverrides(){this.override&&this.override.columns?.forEach((e,i)=>{let r=this.widget.dataProperties[i];r&&(e.showAs&&(r.showAs=e.showAs),e.format&&(r.format=e.format),e.display&&(r.display=e.display),e.label&&(r.label=e.label),e.summary&&(r.summary=e.summary),e.rangeLower&&(r.rangeLower=e.rangeLower),e.rangeUpper&&(r.rangeUpper=e.rangeUpper),e.targetValue&&(r.targetValue=e.targetValue),e.thresholdLower&&(r.thresholdLower=e.thresholdLower),e.thresholdUpper&&(r.thresholdUpper=e.thresholdUpper))})}initializeDataSourceChooser(){this.widget.dsItems=[],this.widget.dsLabel="",this.widget.dsSelected="",this.widget&&this.widget.dataSource&&(this.widget.dsSelected=this.us.removeExt(this.widget.dataSource.split("/").pop()))}initializeLiveDataUpdate(){if(!(this.widget&&this.widget.controls))return;let e=this.widget.controls.filter(r=>r.action==="setColumnSpec");e.length!==0&&(this.customColSpec=e[0].targetProperty);let i=this.widget.controls.filter(r=>r.action==="refresh"&&parseInt(r.timeout,10)>0);i.length!==0&&(this.liveUpdateInterval=setInterval(()=>this.requestData(),parseInt(i[0].timeout,10)*1e3))}initializeLinkedWidgets(){if(this.isLinked())if(this.widget.shared||this.widget.inline||this.widget.edKey){let i=this.dbs.getAllWidgets().find(r=>r.name===this.widget.dataLink);i&&(this.linkedMdx=i.mdx)}else this.subLinkedMdx=this.bs.subscribe("setLinkedMDX:"+this.widget.name,e=>this.onSetLinkedMdx(e))}loadWidgetSettings(){let e=this.ss.getAppSettings(),i=e.theme||"";this.widgetsSettings=this.ss.getWidgetsSettings(this.widget.dashboard)||{},this.tc=e?.themeColors?.[i];let r=this.widgetsSettings?.[this.widget.name]?.themeColors?.[i];r&&(this.tc=r)}initializeDrills(){this.widget?.drills&&(this.drills=this.widget.drills)}initializeTile(){this.tile&&(this.widget={},this.us.mergeRecursive(this.widget,this.tile))}initializeActionAndPvItems(){this.widget.acItems=[],this.widget.pvItems=[]}initializeDrillthrough(){this.widget.controls&&this.widget.controls.length&&(this.canDoDrillthrough=!0)}initializeDependants(){this.hasDependents()&&(this.subRefreshDependants=this.bs.subscribe("widget:"+this.widget.name+":refreshDependents",e=>this.onRefreshDependents()))}initializeDataRequest(){this.widget?.properties?.chartToggle==="table"&&this.widget.type!=="pivot"&&!this.widget.oldType?this.requestData():this.customDataSource||this.requestData()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=yt({type:t,selectors:[["ng-component"]],hostVars:2,hostBindings:function(i,r){i&2&&je("inline",r.inline)},inputs:{model:"model",parent:"parent",widget:"widget"},standalone:!0,features:[bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var ep=["images"];function ip(o,t){if(o&1){let s=hh();Lt(0,"div",2),ch("click",function(){let i=sh(s).$implicit,r=Nt();return rh(r.onClick(i))}),nh(),Lt(1,"svg",3,0)(3,"text"),ie(4),Lt(5,"tspan",4),ie(6),kt(),Lt(7,"tspan",5),ie(8),kt()()(),oh(),Lt(9,"label"),ie(10),kt()()}if(o&2){let s=t.$implicit,e=Nt();je("clickable",e.canDrillthrough),Dt(3),Ee("fill",s.valueColor),Dt(),ms("",s.value," "),Dt(2),Te(s.deltaNeg),Dt(2),Te(s.delta),Dt(2),Te(s.label)}}var Mh=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.images=[],this.widget={},this.textData=[]}get flexDirection(){let e=this.el?.nativeElement;if(e)return e.offsetWidth>e.offsetHeight?"row":"column"}get canDrillthrough(){return this.canDoDrillthrough}ngOnInit(){this.textData=[],super.ngOnInit()}ngAfterViewInit(){}findDataPropByName(e){if(this.widget.dataProperties){for(let i=0;i{let i=e.nativeElement,n=i.firstChild.getBBox();i.setAttribute("viewBox",[n.x,n.y,n.width,n.height].join(" "))})}retrieveData(e){if(this.textData=[],this.hideLoading(),e)for(let i=0;iu){let b=this.widget.properties?.highRangeColor;p.highStyle&&(b=this.getCss(p.highStyle).fill),b&&(c=b)}}this.textData.push({label:a,value:n,color:l,valueColor:c,dimension:e.Cols[0].tuples[i].dimension})}}this.cd.detectChanges(),setTimeout(()=>this.adjustSize())}onClick(e){this.doDrillthrough("",e.label)}getCss(e){let i={};return e.split(";").filter(r=>r).forEach(r=>{let n=r.split(":");i[n[0]]=n[1]}),i}getNumber(e){return typeof e=="string"?parseFloat(e.replace(/,/g,"").replace(/ /g,"")):e}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-wtext"]],viewQuery:function(i,r){if(i&1&&$i(ep,5),i&2){let n;Ji(n=Qi())&&(r.images=n)}},hostVars:2,hostBindings:function(i,r){i&2&&Ee("flex-direction",r.flexDirection)},inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[["images",""],[1,"item2",3,"clickable"],[1,"item2",3,"click"],[1,"text-widget"],[2,"font-size","4px","fill","red"],[2,"font-size","4px","fill","green"]],template:function(i,r){i&1&&oe(0,ip,11,8,"div",1,ne),i&2&&ae(r.textData)},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:flex;flex-display:row;width:100%;height:100%;font-family:Oxygen;-webkit-user-select:initial;user-select:initial}.inline[_nghost-%COMP%] label[_ngcontent-%COMP%]{background-color:transparent;background-image:none}.item[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}label[_ngcontent-%COMP%]{display:block;flex-shrink:0;height:16px;background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8);width:100%;text-align:center;font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item2[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 100%;justify-content:center;align-items:center;margin:10px;background-color:#fafafa;padding:10px;min-height:0;min-width:0}.item2.clickable[_ngcontent-%COMP%]{cursor:pointer}.item2[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{height:auto;background:transparent;color:gray;font-size:19px}.item2[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{height:50%;width:100%;display:block}.text-widget[_ngcontent-%COMP%]{height:100%}"]});let o=t;return o})();var to=(()=>{let t=class t extends ye{constructor(){super(),this.widget={},this.isSpinner=!1,this._oldMdx=""}ngAfterViewInit(){this.createPivotTable()}ngOnDestroy(){super.ngOnDestroy()}createPivotTable(){let e=this,i={initialData:this.widget.pivotData,container:this.el.nativeElement,pivotProperties:{},enableListingSelect:!1,enableSearch:!1,dataSource:{pivot:this.widget.dataSource,MDX2JSONSource:this.ds.url.substring(0,this.ds.url.length-1),basicMDX:this.widget.pivotMdx||this.getMDX(),namespace:xs,sendCookies:!0},triggers:{drillDown:r=>this.onDrillDown(r),rowClick:(r,n,l)=>e.drillFilterWidgets?.length?(e.doDrillFilter(l.source.path,e.drills),e.parent?.header?.cd.detectChanges(),!1):!this.widget.kpitype,back:r=>this.onDrillDown(r),cellDrillThrough:(...r)=>this.onDrillThrough(...r),responseHandler:r=>{r.status!==200&&this.showError(r.xhr.responseText)}},loadingMessageHTML:'',columnResizeAnimation:!0,locale:this.i18n.current,hideButtons:!0,formatNumbers:"#,###.##",controls:this.widget.controls};delete this.widget.pivotMdx,this.lpt=new LightPivotTable(i),this.widget.edKey&&this.lpt?.pivotView.displayMessage("")}doDrillUp(){this.widget.isDrillthrough&&this.restoreWidgetType?(this.widget.isDrillthrough=!1,this.restoreWidgetType(),this.widget.kpitype&&this.requestData()):this.lpt?.CONTROLS.back(),this.widget.backButton=this.lpt?.DRILL_LEVEL!==0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges()}onDrillThrough(...e){if(!this.canDoDrillthrough)return!1;if(this.widget.kpitype){let{cellData:i,x:r,y:n}=e[0],{info:l,dimensions:a}=e[1];if(!a[0])return;let h=a[0][r-l.leftHeaderColumnsNumber]?.dimension||"",c=a[0][0]?.dimension||"",g=a[1][n-l.topHeaderRowsNumber]?.title||"";if(!h||!c)return;let u=[{name:h,value:i.value,path:""},{name:c,value:g,path:""}];return this._requestKPIData(u)?.then(()=>{this.widget.isDrillthrough=!0,this.widget.backButton=!0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges()}),!1}return this._oldMdx=this.lpt?.getActualMDX()||"",this.widget.backButton=!0,this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges(),!0}onDrillDown(e){e.path?(this.doDrillFilter(e.path,this.drills),this.drills.push({path:e.path,name:"",category:""}),this.widget.backButton=!0):(this.drills.pop(),this.doDrillFilter(e.path,this.drills)),this.parent.cd.detectChanges(),this.parent.header?.cd.detectChanges(),this.broadcastDependents(e.mdx)}requestData(){let e=this.customDataSource||this.widget.dataSource;if(this.widget.kpitype){this._requestKPIData();return}if(this.lpt){let i=this.getMDX();if(this.lpt.isListing()&&(delete this.lpt.CONFIG.initialData,i.toLowerCase().substr(0,12)!=="drillthrough"&&(i=this.getDrillthroughMdx(i)||"")),i==="")return;this.drillFilter&&(i=i+" %FILTER "+this.drillFilter),this.broadcastDependents(),this.clearError(),this.lpt.changeBasicMDX(i)}}onResize(){this.lpt&&setTimeout(()=>this.lpt?.updateSizes(),100)}print(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=yt({type:t,selectors:[["dsw-pivot"]],inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},styles:["[_nghost-%COMP%]{height:100%}"]});let o=t;return o})();var eo=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}};var Jt=eo;var Be={PROPERTYCHANGE:"propertychange"};var io=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},bs=io;function $e(o,t){return o>t?1:o0?i-1:i}return e-1}if(s>0){for(let i=1;i0||s&&n===0)})}function xi(){return!0}function yi(){return!1}function Ge(){}function Ah(o){let t=!1,s,e,i;return function(){let r=Array.prototype.slice.call(arguments);return(!t||this!==i||!he(r,e))&&(t=!0,i=this,e=r,s=o.apply(this,arguments)),s}}function Je(o){for(let t in o)delete o[t]}function bi(o){let t;for(t in o)return!1;return!t}var so=class extends bs{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,s){if(!t||!s)return;let e=this.listeners_||(this.listeners_={}),i=e[t]||(e[t]=[]);i.includes(s)||i.push(s)}dispatchEvent(t){let s=typeof t=="string",e=s?t:t.type,i=this.listeners_&&this.listeners_[e];if(!i)return;let r=s?new Jt(t):t;r.target||(r.target=this.eventTarget_||this);let n=this.dispatching_||(this.dispatching_={}),l=this.pendingRemovals_||(this.pendingRemovals_={});e in n||(n[e]=0,l[e]=0),++n[e];let a;for(let h=0,c=i.length;h0:!1}removeEventListener(t,s){let e=this.listeners_&&this.listeners_[t];if(e){let i=e.indexOf(s);i!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(e[i]=Ge,++this.pendingRemovals_[t]):(e.splice(i,1),e.length===0&&delete this.listeners_[t]))}}},Li=so;var ut={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function Mt(o,t,s,e,i){if(e&&e!==o&&(s=s.bind(e)),i){let n=s;s=function(){o.removeEventListener(t,s),n.apply(this,arguments)}}let r={target:o,type:t,listener:s};return o.addEventListener(t,s),r}function Cs(o,t,s,e){return Mt(o,t,s,e,!0)}function At(o){o&&o.target&&(o.target.removeEventListener(o.type,o.listener),Je(o))}var _s=class extends Li{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(ut.CHANGE)}getRevision(){return this.revision_}onInternal(t,s){if(Array.isArray(t)){let e=t.length,i=new Array(e);for(let r=0;r0;)this.pop()}extend(t){for(let s=0,e=t.length;sthis.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(s),this.array_.splice(t,0,s),this.updateLength_(),this.dispatchEvent(new ws(Qt.ADD,s,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let s=this.getLength();return this.insertAt(s,t),this.getLength()}remove(t){let s=this.array_;for(let e=0,i=s.length;e=this.getLength())return;let s=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ws(Qt.REMOVE,s,t)),s}setAt(t,s){let e=this.getLength();if(t>=e){this.insertAt(t,s);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(s,t);let i=this.array_[t];this.array_[t]=s,this.dispatchEvent(new ws(Qt.REMOVE,i,t)),this.dispatchEvent(new ws(Qt.ADD,s,t))}updateLength_(){this.set(Ph.LENGTH,this.array_.length)}assertUnique_(t,s){for(let e=0,i=this.array_.length;ei&&(a=a|Ht.RIGHT),lr&&(a=a|Ht.ABOVE),a===Ht.UNKNOWN&&(a=Ht.INTERSECTING),a}function Vt(){return[1/0,1/0,-1/0,-1/0]}function Pe(o,t,s,e,i){return i?(i[0]=o,i[1]=t,i[2]=s,i[3]=e,i):[o,t,s,e]}function ts(o){return Pe(1/0,1/0,-1/0,-1/0,o)}function Fh(o,t){let s=o[0],e=o[1];return Pe(s,e,s,e,t)}function Hr(o,t,s,e,i){let r=ts(i);return ho(r,o,t,s,e)}function Ci(o,t){return o[0]==t[0]&&o[2]==t[2]&&o[1]==t[1]&&o[3]==t[3]}function zh(o,t){return t[0]o[2]&&(o[2]=t[2]),t[1]o[3]&&(o[3]=t[3]),o}function es(o,t){t[0]o[2]&&(o[2]=t[0]),t[1]o[3]&&(o[3]=t[1])}function ho(o,t,s,e,i){for(;st[0]?e[0]=o[0]:e[0]=t[0],o[1]>t[1]?e[1]=o[1]:e[1]=t[1],o[2]=t[0]&&o[1]<=t[3]&&o[3]>=t[1]}function Fi(o){return o[2]=n&&v<=a),!e&&r&Ht.RIGHT&&!(i&Ht.RIGHT)&&(x=p-(u-a)*b,e=x>=l&&x<=h),!e&&r&Ht.BELOW&&!(i&Ht.BELOW)&&(v=u-(p-l)/b,e=v>=n&&v<=a),!e&&r&Ht.LEFT&&!(i&Ht.LEFT)&&(x=p-(u-n)*b,e=x>=l&&x<=h)}return e}function Gh(o,t,s,e){if(Fi(o))return ts(s);let i=[];if(e>1){let l=o[2]-o[0],a=o[3]-o[1];for(let h=0;h=s[2])){let i=Pt(s),n=Math.floor((e[0]-s[0])/i)*i;o[0]-=n,o[2]-=n}return o}function Xh(o,t){if(t.canWrapX()){let s=t.getExtent();if(!isFinite(o[0])||!isFinite(o[2]))return[[s[0],o[1],s[2],o[3]]];co(o,t);let e=Pt(s);if(Pt(o)>e)return[[s[0],o[1],s[2],o[3]]];if(o[0]s[2])return[[o[0],o[1],s[2],o[3]],[s[0],o[1],o[2]-e,o[3]]]}return[o]}function Rt(o,t,s){return Math.min(Math.max(o,t),s)}function Wh(o,t,s,e,i,r){let n=i-s,l=r-e;if(n!==0||l!==0){let a=((o-s)*n+(t-e)*l)/(n*n+l*l);a>1?(s=i,e=r):a>0&&(s+=n*a,e+=l*a)}return Xe(o,t,s,e)}function Xe(o,t,s,e){let i=s-o,r=e-t;return i*i+r*r}function Yh(o){let t=o.length;for(let e=0;er&&(r=a,i=l)}if(r===0)return null;let n=o[i];o[i]=o[e],o[e]=n;for(let l=e+1;l=0;e--){s[e]=o[e][t]/o[e][e];for(let i=e-1;i>=0;i--)o[i][t]-=o[i][e]*s[e]}return s}function Ds(o){return o*Math.PI/180}function _i(o,t){let s=o%t;return s*t<0?s+t:s}function be(o,t,s){return o+s*(t-o)}function qr(o,t){let s=Math.pow(10,t);return Math.round(o*s)/s}function ir(o,t){return Math.floor(qr(o,t))}function sr(o,t){return Math.ceil(qr(o,t))}var dp=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,up=/^([a-z]*)$|^hsla?\(.*\)$/i;function $r(o){return typeof o=="string"?o:uo(o)}function pp(o){let t=document.createElement("div");if(t.style.color=o,t.style.color!==""){document.body.appendChild(t);let s=getComputedStyle(t).color;return document.body.removeChild(t),s}return""}var fp=function(){let t={},s=0;return function(e){let i;if(t.hasOwnProperty(e))i=t[e];else{if(s>=1024){let r=0;for(let n in t)r++&3||(delete t[n],--s)}i=gp(e),t[e]=i,++s}return i}}();function is(o){return Array.isArray(o)?o:fp(o)}function gp(o){let t,s,e,i,r;if(up.exec(o)&&(o=pp(o)),dp.exec(o)){let n=o.length-1,l;n<=4?l=1:l=2;let a=n===4||n===8;t=parseInt(o.substr(1+0*l,l),16),s=parseInt(o.substr(1+1*l,l),16),e=parseInt(o.substr(1+2*l,l),16),a?i=parseInt(o.substr(1+3*l,l),16):i=255,l==1&&(t=(t<<4)+t,s=(s<<4)+s,e=(e<<4)+e,a&&(i=(i<<4)+i)),r=[t,s,e,i/255]}else o.startsWith("rgba(")?(r=o.slice(5,-1).split(",").map(Number),Vh(r)):o.startsWith("rgb(")?(r=o.slice(4,-1).split(",").map(Number),r.push(1),Vh(r)):gt(!1,14);return r}function Vh(o){return o[0]=Rt(o[0]+.5|0,0,255),o[1]=Rt(o[1]+.5|0,0,255),o[2]=Rt(o[2]+.5|0,0,255),o[3]=Rt(o[3],0,1),o}function uo(o){let t=o[0];t!=(t|0)&&(t=t+.5|0);let s=o[1];s!=(s|0)&&(s=s+.5|0);let e=o[2];e!=(e|0)&&(e=e+.5|0);let i=o[3]===void 0?1:Math.round(o[3]*100)/100;return"rgba("+t+","+s+","+e+","+i+")"}var po=class{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(let s in this.cache_){let e=this.cache_[s];!(t++&3)&&!e.hasListener()&&(delete this.cache_[s],--this.cacheSize_)}}}get(t,s,e){let i=Uh(t,s,e);return i in this.cache_?this.cache_[i]:null}set(t,s,e,i){let r=Uh(t,s,e);this.cache_[r]=i,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};function Uh(o,t,s){let e=s?$r(s):"null";return t+":"+o+":"+e}var Ls=new po;var It={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};var fo=class extends Ut{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let s=Object.assign({},t);typeof t.properties=="object"&&(delete s.properties,Object.assign(s,t.properties)),s[It.OPACITY]=t.opacity!==void 0?t.opacity:1,gt(typeof s[It.OPACITY]=="number",64),s[It.VISIBLE]=t.visible!==void 0?t.visible:!0,s[It.Z_INDEX]=t.zIndex,s[It.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,s[It.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,s[It.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,s[It.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=s.className!==void 0?s.className:"ol-layer",delete s.className,this.setProperties(s),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let s=this.state_||{layer:this,managed:t===void 0?!0:t},e=this.getZIndex();return s.opacity=Rt(Math.round(this.getOpacity()*100)/100,0,1),s.visible=this.getVisible(),s.extent=this.getExtent(),s.zIndex=e===void 0&&!s.managed?1/0:e,s.maxResolution=this.getMaxResolution(),s.minResolution=Math.max(this.getMinResolution(),0),s.minZoom=this.getMinZoom(),s.maxZoom=this.getMaxZoom(),this.state_=s,s}getLayersArray(t){return Et()}getLayerStatesArray(t){return Et()}getExtent(){return this.get(It.EXTENT)}getMaxResolution(){return this.get(It.MAX_RESOLUTION)}getMinResolution(){return this.get(It.MIN_RESOLUTION)}getMinZoom(){return this.get(It.MIN_ZOOM)}getMaxZoom(){return this.get(It.MAX_ZOOM)}getOpacity(){return this.get(It.OPACITY)}getSourceState(){return Et()}getVisible(){return this.get(It.VISIBLE)}getZIndex(){return this.get(It.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(It.EXTENT,t)}setMaxResolution(t){this.set(It.MAX_RESOLUTION,t)}setMinResolution(t){this.set(It.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(It.MAX_ZOOM,t)}setMinZoom(t){this.set(It.MIN_ZOOM,t)}setOpacity(t){gt(typeof t=="number",64),this.set(It.OPACITY,t)}setVisible(t){this.set(It.VISIBLE,t)}setZIndex(t){this.set(It.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Jr=fo;var ge={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var Zt={ANIMATING:0,INTERACTING:1};var Oe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var We={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var go=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||We[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Qr=go;var rr=6378137,Is=Math.PI*rr,mp=[-Is,-Is,Is,Is],xp=[-180,-85,180,85],tn=rr*Math.log(Math.tan(Math.PI/2)),zi=class extends Qr{constructor(t){super({code:t,units:"m",extent:mp,global:!0,worldExtent:xp,getPointResolution:function(s,e){return s/Math.cosh(e[1]/rr)}})}},mo=[new zi("EPSG:3857"),new zi("EPSG:102100"),new zi("EPSG:102113"),new zi("EPSG:900913"),new zi("http://www.opengis.net/def/crs/EPSG/0/3857"),new zi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Hh(o,t,s){let e=o.length;s=s>1?s:2,t===void 0&&(s>2?t=o.slice():t=new Array(e));for(let i=0;itn?r=tn:r<-tn&&(r=-tn),t[i+1]=r}return t}function Zh(o,t,s){let e=o.length;s=s>1?s:2,t===void 0&&(s>2?t=o.slice():t=new Array(e));for(let i=0;i=0;--e)if(o[e]!=t[e]){s=!1;break}return s}function ks(o,t){let s=Math.cos(t),e=Math.sin(t),i=o[0]*s-o[1]*e,r=o[1]*s+o[0]*e;return o[0]=i,o[1]=r,o}function tc(o,t){return o[0]*=t,o[1]*=t,o}function en(o,t){if(t.canWrapX()){let s=Pt(t.getExtent()),e=ec(o,t,s);e&&(o[0]-=e*s)}return o}function ec(o,t,s){let e=t.getExtent(),i=0;return t.canWrapX()&&(o[0]e[2])&&(s=s||Pt(e),i=Math.floor((o[0]-e[0])/s)),i}var vp=63710088e-1;function bo(o,t,s){s=s||vp;let e=Ds(o[1]),i=Ds(t[1]),r=(i-e)/2,n=Ds(t[0]-o[0])/2,l=Math.sin(r)*Math.sin(r)+Math.sin(n)*Math.sin(n)*Math.cos(e)*Math.cos(i);return 2*s*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var ic={info:1,warn:2,error:3,none:4},Cp=ic.info;function sn(...o){Cp>ic.warn||console.warn(...o)}var vo=!0;function rc(o){vo=!(o===void 0?!0:o)}function Co(o,t){if(t!==void 0){for(let s=0,e=o.length;s=-180&&o[0]<=180&&o[1]>=-90&&o[1]<=90&&(vo=!1,sn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),o)}function Os(o,t){return Ye?oc(o,t,Ye):o}function Ue(o,t){return Ye?oc(o,Ye,t):o}function ac(o,t){if(!Ye)return o;let s=ue(t).getUnits(),e=Ye.getUnits();return s&&e?o*We[s]/We[e]:o}function Mp(){sc(mo),sc(xo),Sp(xo,mo,Hh,Zh)}Mp();function wo(o,t,s){return function(e,i,r,n,l){if(!e)return;if(!i&&!t)return e;let a=t?0:r[0]*i,h=t?0:r[1]*i,c=l?l[0]:0,g=l?l[1]:0,u=o[0]+a/2+c,p=o[2]-a/2+c,b=o[1]+h/2+g,v=o[3]-h/2+g;u>p&&(u=(p+u)/2,p=u),b>v&&(b=(v+b)/2,v=b);let x=Rt(e[0],u,p),m=Rt(e[1],b,v);if(n&&s&&i){let E=30*i;x+=-E*Math.log(1+Math.max(0,u-e[0])/E)+E*Math.log(1+Math.max(0,e[0]-p)/E),m+=-E*Math.log(1+Math.max(0,b-e[1])/E)+E*Math.log(1+Math.max(0,e[1]-v)/E)}return[x,m]}}function lc(o){return o}function So(o,t,s,e){let i=Pt(t)/s[0],r=de(t)/s[1];return e?Math.min(o,Math.max(i,r)):Math.min(o,Math.min(i,r))}function Mo(o,t,s){let e=Math.min(o,t),i=50;return e*=Math.log(1+i*Math.max(0,o/t-1))/i+1,s&&(e=Math.max(e,s),e/=Math.log(1+i*Math.max(0,s/o-1))/i+1),Rt(e,s/2,t*2)}function hc(o,t,s,e){return t=t!==void 0?t:!0,function(i,r,n,l){if(i!==void 0){let a=o[0],h=o[o.length-1],c=s?So(a,s,n,e):a;if(l)return t?Mo(i,c,h):Rt(i,h,c);let g=Math.min(c,i),u=Math.floor(vs(o,g,r));return o[u]>c&&u1)g=s;else if(u>0){for(let p=0;pi&&(i=h),r=l,n=a}return i}function Io(o,t,s,e,i){for(let r=0,n=s.length;r0;){let g=h.pop(),u=h.pop(),p=0,b=o[u],v=o[u+1],x=o[g],m=o[g+1];for(let E=u+e;Ep&&(c=E,p=w)}p>i&&(a[(c-t)/e]=1,u+e0&&v>p)&&(b<0&&x0&&x>b)){h=g,c=u;continue}r[n++]=h,r[n++]=c,l=h,a=c,h=g,c=u}return r[n++]=h,r[n++]=c,n}function Fo(o,t,s,e,i,r,n,l){for(let a=0,h=s.length;ar&&(h-l)*(r-a)-(i-l)*(c-a)>0&&n++:c<=r&&(h-l)*(r-a)-(i-l)*(c-a)<0&&n--,l=h,a=c}return n!==0}function cr(o,t,s,e,i,r){if(s.length===0||!Gi(o,t,s[0],e,i,r))return!1;for(let n=1,l=s.length;nm&&(h=(c+g)/2,cr(o,t,s,e,h,b)&&(x=h,m=E)),c=g}return isNaN(x)&&(x=i[r]),n?(n.push(x,b,m),n):[x,b,m]}function Lc(o,t,s,e,i){let r=[];for(let n=0,l=s.length;n=i[0]&&r[2]<=i[2]||r[1]>=i[1]&&r[3]<=i[3]?!0:Ic(o,t,s,e,function(n,l){return Bh(i,n,l)}):!1}function Wo(o,t,s,e,i){return!!(Rc(o,t,s,e,i)||Gi(o,t,s,e,i[0],i[1])||Gi(o,t,s,e,i[0],i[3])||Gi(o,t,s,e,i[2],i[1])||Gi(o,t,s,e,i[2],i[3]))}function Yo(o,t,s,e,i){if(!Wo(o,t,s[0],e,i))return!1;if(s.length===1)return!0;for(let r=1,n=s.length;r0}function Vo(o,t,s,e,i){i=i!==void 0?i:!1;for(let r=0,n=s.length;r1&&typeof arguments[s-1]=="function"&&(e=arguments[s-1],--s);let i=0;for(;i0}getInteracting(){return this.hints_[Zt.INTERACTING]>0}cancelAnimations(){this.setHint(Zt.ANIMATING,-this.hints_[Zt.ANIMATING]);let t;for(let s=0,e=this.animations_.length;s=0;--e){let i=this.animations_[e],r=!0;for(let n=0,l=i.length;n0?h/a.duration:1;c>=1?(a.complete=!0,c=1):r=!1;let g=a.easing(c);if(a.sourceCenter){let u=a.sourceCenter[0],p=a.sourceCenter[1],b=a.targetCenter[0],v=a.targetCenter[1];this.nextCenter_=a.targetCenter;let x=u+g*(b-u),m=p+g*(v-p);this.targetCenter_=[x,m]}if(a.sourceResolution&&a.targetResolution){let u=g===1?a.targetResolution:a.sourceResolution+g*(a.targetResolution-a.sourceResolution);if(a.anchor){let p=this.getViewportSize_(this.getRotation()),b=this.constraints_.resolution(u,0,p,!0);this.targetCenter_=this.calculateCenterZoom(b,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=u,this.applyTargetState_(!0)}if(a.sourceRotation!==void 0&&a.targetRotation!==void 0){let u=g===1?_i(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+g*(a.targetRotation-a.sourceRotation);if(a.anchor){let p=this.constraints_.rotation(u,!0);this.targetCenter_=this.calculateCenterRotate(p,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=u}if(this.applyTargetState_(!0),s=!0,!a.complete)break}if(r){this.animations_[e]=null,this.setHint(Zt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;let n=i[0].callback;n&&hn(n,!0)}}this.animations_=this.animations_.filter(Boolean),s&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,s){let e,i=this.getCenterInternal();return i!==void 0&&(e=[i[0]-s[0],i[1]-s[1]],ks(e,t-this.getRotation()),Qh(e,s)),e}calculateCenterZoom(t,s){let e,i=this.getCenterInternal(),r=this.getResolution();if(i!==void 0&&r!==void 0){let n=s[0]-t*(s[0]-i[0])/r,l=s[1]-t*(s[1]-i[1])/r;e=[n,l]}return e}getViewportSize_(t){let s=this.viewportSize_;if(t){let e=s[0],i=s[1];return[Math.abs(e*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(e*Math.sin(t))+Math.abs(i*Math.cos(t))]}return s}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){let t=this.getCenterInternal();return t&&ar(t,this.getProjection())}getCenterInternal(){return this.get(Oe.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){let s=this.calculateExtentInternal(t);return Os(s,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();let s=this.getCenterInternal();gt(s,1);let e=this.getResolution();gt(e!==void 0,2);let i=this.getRotation();return gt(i!==void 0,3),er(s,e,i,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Oe.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,s){return this.getResolutionForExtentInternal(Ue(t,this.getProjection()),s)}getResolutionForExtentInternal(t,s){s=s||this.getViewportSizeMinusPadding_();let e=Pt(t)/s[0],i=de(t)/s[1];return Math.max(e,i)}getResolutionForValueFunction(t){t=t||2;let s=this.getConstrainedResolution(this.maxResolution_),e=this.minResolution_,i=Math.log(s/e)/Math.log(t);return function(r){return s/Math.pow(t,r*i)}}getRotation(){return this.get(Oe.ROTATION)}getValueForResolutionFunction(t){let s=Math.log(t||2),e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,r=Math.log(e/i)/s;return function(n){return Math.log(e/n)/s/r}}getViewportSizeMinusPadding_(t){let s=this.getViewportSize_(t),e=this.padding_;return e&&(s=[s[0]-e[1]-e[3],s[1]-e[0]-e[2]]),s}getState(){let t=this.getProjection(),s=this.getResolution(),e=this.getRotation(),i=this.getCenterInternal(),r=this.padding_;if(r){let n=this.getViewportSizeMinusPadding_();i=Ko(i,this.getViewportSize_(),[n[0]/2+r[3],n[1]/2+r[0]],s,e)}return{center:i.slice(0),projection:t!==void 0?t:null,resolution:s,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:e,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t,s=this.getResolution();return s!==void 0&&(t=this.getZoomForResolution(s)),t}getZoomForResolution(t){let s=this.minZoom_||0,e,i;if(this.resolutions_){let r=vs(this.resolutions_,t,1);s=r,e=this.resolutions_[r],r==this.resolutions_.length-1?i=2:i=e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return s+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;let s=Rt(Math.floor(t),0,this.resolutions_.length-2),e=this.resolutions_[s]/this.resolutions_[s+1];return this.resolutions_[s]/Math.pow(e,Rt(t-s,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,s){let e;if(gt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){gt(!Fi(t),25);let i=Ue(t,this.getProjection());e=Ho(i)}else if(t.getType()==="Circle"){let i=Ue(t.getExtent(),this.getProjection());e=Ho(i),e.rotate(this.getRotation(),Qe(i))}else{let i=nn();i?e=t.clone().transform(i,this.getProjection()):e=t}this.fitInternal(e,s)}rotatedExtentForGeometry(t){let s=this.getRotation(),e=Math.cos(s),i=Math.sin(-s),r=t.getFlatCoordinates(),n=t.getStride(),l=1/0,a=1/0,h=-1/0,c=-1/0;for(let g=0,u=r.length;g{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let s,e=this.getMapInternal();!t&&e&&(t=e.getView()),t instanceof De?s={viewState:t.getState(),extent:t.calculateExtent()}:s=t,!s.layerStatesArray&&e&&(s.layerStatesArray=e.getLayerGroup().getLayerStatesArray());let i;s.layerStatesArray?i=s.layerStatesArray.find(n=>n.layer===this):i=this.getLayerState();let r=this.getExtent();return dr(i,s.viewState)&&(!r||Wt(r,s.extent))}getAttributions(t){if(!this.isVisible(t))return[];let s,e=this.getSource();if(e&&(s=e.getAttributions()),!s)return[];let i=t instanceof De?t.getViewStateAndExtent():t,r=s(i);return Array.isArray(r)||(r=[r]),r}render(t,s){let e=this.getRenderer();return e.prepareFrame(t)?(this.rendered=!0,e.renderFrame(t,s)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(It.MAP,t)}getMapInternal(){return this.get(It.MAP)}setMap(t){this.mapPrecomposeKey_&&(At(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(At(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Mt(t,ge.PRECOMPOSE,function(s){let i=s.frameState.layerStatesArray,r=this.getLayerState(!1);gt(!i.some(function(n){return n.layer===r.layer}),67),i.push(r)},this),this.mapRenderKey_=Mt(this,ut.CHANGE,t.render,t),this.changed())}setSource(t){this.set(It.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function dr(o,t){if(!o.visible)return!1;let s=t.resolution;if(s=o.maxResolution)return!1;let e=t.zoom;return e>o.minZoom&&e<=o.maxZoom}var ns=$o;var Jo=class extends bs{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,s){Et()}calculateMatrices2D(t){let s=t.viewState,e=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;fe(e,t.size[0]/2,t.size[1]/2,1/s.resolution,-1/s.resolution,-s.rotation,-s.center[0],-s.center[1]),Ms(i,e)}forEachFeatureAtCoordinate(t,s,e,i,r,n,l,a){let h,c=s.viewState;function g(S,w,R,O){return r.call(n,w,S?R:null,O)}let u=c.projection,p=en(t.slice(),u),b=[[0,0]];if(u.canWrapX()&&i){let S=u.getExtent(),w=Pt(S);b.push([-w,0],[w,0])}let v=s.layerStatesArray,x=v.length,m=[],E=[];for(let S=0;S=0;--w){let R=v[w],O=R.layer;if(O.hasRenderer()&&dr(R,c)&&l.call(a,O)){let I=O.getRenderer(),_=O.getSource();if(I&&_){let P=_.getWrapX()?p:t,F=g.bind(null,R.managed);E[0]=P[0]+b[S][0],E[1]=P[1]+b[S][1],h=I.forEachFeatureAtCoordinate(E,s,e,F,m)}if(h)return h}}if(m.length===0)return;let L=1/m.length;return m.forEach((S,w)=>S.distanceSq+=w*L),m.sort((S,w)=>S.distanceSq-w.distanceSq),m.some(S=>h=S.callback(S.feature,S.layer,S.geometry)),h}hasFeatureAtCoordinate(t,s,e,i,r,n){return this.forEachFeatureAtCoordinate(t,s,e,i,xi,this,r,n)!==void 0}getMap(){return this.map_}renderFrame(t){Et()}flushDeclutterItems(t){}scheduleExpireIconCache(t){Ls.canExpireCache()&&t.postRenderFunctions.push(Ip)}};function Ip(o,t){Ls.expire()}var jc=Jo;var Qo=class extends Jt{constructor(t,s,e,i){super(t),this.inversePixelTransform=s,this.frameState=e,this.context=i}},cn=Qo;var ur="ol-hidden";var Wi="ol-unselectable";var Ns="ol-control",ta="ol-collapsed",Rp=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Bc=["style","variant","weight","size","lineHeight","family"],ea=function(o){let t=o.match(Rp);if(!t)return null;let s={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let e=0,i=Bc.length;et?t-h:r,S=n+c>s?s-c:n,w=b[3]+L*u[0]+b[1],R=b[0]+S*u[1]+b[2],O=m-b[3],I=E-b[0];(v||g!==0)&&(Hi[0]=O,Zi[0]=O,Hi[1]=I,Pi[1]=I,Pi[0]=O+w,Di[0]=Pi[0],Di[1]=I+R,Zi[1]=Di[1]);let _;return g!==0?(_=fe(ce(),e,i,1,1,g,-e,-i),Xt(_,Hi),Xt(_,Pi),Xt(_,Di),Xt(_,Zi),Pe(Math.min(Hi[0],Pi[0],Di[0],Zi[0]),Math.min(Hi[1],Pi[1],Di[1],Zi[1]),Math.max(Hi[0],Pi[0],Di[0],Zi[0]),Math.max(Hi[1],Pi[1],Di[1],Zi[1]),Ys)):Pe(Math.min(O,O+w),Math.min(I,I+R),Math.max(O,O+w),Math.max(I,I+R),Ys),p&&(m=Math.round(m),E=Math.round(E)),{drawImageX:m,drawImageY:E,drawImageW:L,drawImageH:S,originX:h,originY:c,declutterBox:{minX:Ys[0],minY:Ys[1],maxX:Ys[2],maxY:Ys[3],value:x},canvasTransform:_,scale:u}}replayImageOrLabel_(t,s,e,i,r,n,l){let a=!!(n||l),h=i.declutterBox,c=t.canvas,g=l?l[2]*i.scale[0]/2:0;return h.minX-g<=c.width/s&&h.maxX+g>=0&&h.minY-g<=c.height/s&&h.maxY+g>=0&&(a&&this.replayTextBackground_(t,Hi,Pi,Di,Zi,n,l),Uc(t,i.canvasTransform,r,e,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(t){if(this.alignFill_){let s=Xt(this.renderedTransform_,[0,0]),e=512*this.pixelRatio;t.save(),t.translate(s[0]%e,s[1]%e),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,s){t.strokeStyle=s[1],t.lineWidth=s[2],t.lineCap=s[3],t.lineJoin=s[4],t.miterLimit=s[5],t.lineDashOffset=s[7],t.setLineDash(s[6])}drawLabelWithPointPlacement_(t,s,e,i){let r=this.textStates[s],n=this.createLabel(t,s,i,e),l=this.strokeStates[e],a=this.pixelRatio,h=cl(Array.isArray(t)?t[0]:t,r.textAlign||Yi),c=Er[r.textBaseline||ls],g=l&&l.lineWidth?l.lineWidth:0,u=n.width/a-2*r.scale[0],p=h*u+2*(.5-h)*g,b=c*n.height/a+2*(.5-c)*g;return{label:n,anchorX:p,anchorY:b}}execute_(t,s,e,i,r,n,l,a){let h;this.pixelCoordinates_&&he(e,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=ze(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),kh(this.renderedTransform_,e));let c=0,g=i.length,u=0,p,b,v,x,m,E,L,S,w,R,O,I,_=0,P=0,F=null,A=null,D=this.coordinateCache_,C=this.viewRotation_,d=Math.round(Math.atan2(-e[1],e[0])*1e12)/1e12,f={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:C},y=this.instructions!=i||this.overlaps?0:200,M,k,T,z;for(;cy&&(this.fill_(t),_=0),P>y&&(t.stroke(),P=0),!_&&!P&&(t.beginPath(),x=NaN,m=NaN),++c;break;case mt.CIRCLE:u=N[1];let X=h[u],j=h[u+1],B=h[u+2],W=h[u+3],Y=B-X,U=W-j,q=Math.sqrt(Y*Y+U*U);t.moveTo(X+q,j),t.arc(X,j,q,0,2*Math.PI,!0),++c;break;case mt.CLOSE_PATH:t.closePath(),++c;break;case mt.CUSTOM:u=N[1],p=N[2];let H=N[3],V=N[4],Z=N.length==6?N[5]:void 0;f.geometry=H,f.feature=M,c in D||(D[c]=[]);let K=D[c];Z?Z(h,u,p,2,K):(K[0]=h[u],K[1]=h[u+1],K.length=2),V(K,f),++c;break;case mt.DRAW_IMAGE:u=N[1],p=N[2],S=N[3],b=N[4],v=N[5];let J=N[6],tt=N[7],$=N[8],Q=N[9],et=N[10],it=N[11],st=N[12],rt=N[13],nt=N[14],ot=N[15];if(!S&&N.length>=20){w=N[19],R=N[20],O=N[21],I=N[22];let Se=this.drawLabelWithPointPlacement_(w,R,O,I);S=Se.label,N[3]=S;let ps=N[23];b=(Se.anchorX-ps)*this.pixelRatio,N[4]=b;let Ie=N[24];v=(Se.anchorY-Ie)*this.pixelRatio,N[5]=v,J=S.height,N[6]=J,rt=S.width,N[13]=rt}let at;N.length>25&&(at=N[25]);let ct,ht,lt;N.length>17?(ct=N[16],ht=N[17],lt=N[18]):(ct=Ei,ht=!1,lt=!1),et&&d?it+=C:!et&&!d&&(it-=C);let xt=0;for(;u0){if(!n||p!=="Image"&&p!=="Text"||n.includes(w)){let P=(u[I]-3)/4,F=i-P%l,A=i-(P/l|0),D=r(w,R,F*F+A*A);if(D)return D}c.clearRect(0,0,l,l);break}}let v=Object.keys(this.executorsByZIndex_).map(Number);v.sort($e);let x,m,E,L,S;for(x=v.length-1;x>=0;--x){let w=v[x].toString();for(E=this.executorsByZIndex_[w],m=ul.length-1;m>=0;--m)if(p=ul[m],L=E[p],L!==void 0&&(S=L.executeHitDetection(c,a,e,b,g),S))return S}}getClipCoords(t){let s=this.maxExtent_;if(!s)return null;let e=s[0],i=s[1],r=s[2],n=s[3],l=[e,i,e,n,r,n,r,i];return ze(l,0,8,2,t,l),l}isEmpty(){return bi(this.executorsByZIndex_)}execute(t,s,e,i,r,n,l){let a=Object.keys(this.executorsByZIndex_).map(Number);a.sort($e),this.maxExtent_&&(t.save(),this.clip(t,e)),n=n||ul;let h,c,g,u,p,b;for(l&&a.reverse(),h=0,c=a.length;hs)break;let a=e[l];a||(a=[],e[l]=a),a.push(((o+r)*t+(o+n))*4+3),r>0&&a.push(((o-r)*t+(o+n))*4+3),n>0&&(a.push(((o+r)*t+(o-n))*4+3),r>0&&a.push(((o-r)*t+(o-n))*4+3))}let i=[];for(let r=0,n=e.length;rg*this.pixelRatio_),lineDashOffset:(n||Ce)*this.pixelRatio_,lineJoin:l!==void 0?l:ri,lineWidth:(a!==void 0?a:Ti)*this.pixelRatio_,miterLimit:h!==void 0?h:Si,strokeStyle:_e(e||Mi)}}}setImageStyle(t){let s;if(!t||!(s=t.getSize())){this.image_=null;return}let e=t.getPixelRatio(this.pixelRatio_),i=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*e,this.imageAnchorY_=i[1]*e,this.imageHeight_=s[1]*e,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();let n=t.getScaleArray();this.imageScale_=[n[0]*this.pixelRatio_/e,n[1]*this.pixelRatio_/e],this.imageWidth_=s[0]*e}setTextStyle(t){if(!t)this.text_="";else{let s=t.getFill();if(!s)this.textFillState_=null;else{let p=s.getColor();this.textFillState_={fillStyle:_e(p||Kt)}}let e=t.getStroke();if(!e)this.textStrokeState_=null;else{let p=e.getColor(),b=e.getLineCap(),v=e.getLineDash(),x=e.getLineDashOffset(),m=e.getLineJoin(),E=e.getWidth(),L=e.getMiterLimit();this.textStrokeState_={lineCap:b!==void 0?b:as,lineDash:v||ve,lineDashOffset:x||Ce,lineJoin:m!==void 0?m:ri,lineWidth:E!==void 0?E:Ti,miterLimit:L!==void 0?L:Si,strokeStyle:_e(p||Mi)}}let i=t.getFont(),r=t.getOffsetX(),n=t.getOffsetY(),l=t.getRotateWithView(),a=t.getRotation(),h=t.getScaleArray(),c=t.getText(),g=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:i!==void 0?i:un,textAlign:g!==void 0?g:Yi,textBaseline:u!==void 0?u:ls},this.text_=c!==void 0?Array.isArray(c)?c.reduce((p,b,v)=>p+=v%2?" ":b,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=n!==void 0?this.pixelRatio_*n:0,this.textRotateWithView_=l!==void 0?l:!1,this.textRotation_=a!==void 0?a:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}},Wd=ml;var Ke=.5;function Yd(o,t,s,e,i,r,n){let l=o[0]*Ke,a=o[1]*Ke,h=jt(l,a);h.imageSmoothingEnabled=!1;let c=h.canvas,g=new Wd(h,Ke,i,null,n),u=s.length,p=Math.floor((256*256*256-1)/u),b={};for(let x=1;x<=u;++x){let m=s[x-1],E=m.getStyleFunction()||e;if(!E)continue;let L=E(m,r);if(!L)continue;Array.isArray(L)||(L=[L]);let w=(x*p).toString(16).padStart(7,"#00000");for(let R=0,O=L.length;R{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){let e=[this.context.canvas.width,this.context.canvas.height];Xt(this.pixelTransform,e);let i=this.renderedCenter_,r=this.renderedResolution_,n=this.renderedRotation_,l=this.renderedProjection_,a=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],g=e[0]*Ke,u=e[1]*Ke;c.push(this.getRenderTransform(i,r,n,Ke,g,u,0).slice());let p=h.getSource(),b=l.getExtent();if(p.getWrapX()&&l.canWrapX()&&!vi(b,a)){let v=a[0],x=Pt(b),m=0,E;for(;vb[2];)++m,E=x*m,c.push(this.getRenderTransform(i,r,n,Ke,g,u,E).slice()),v-=x}this.hitDetectionImageData_=Yd(e,c,this.renderedFeatures_,h.getStyleFunction(),a,r,n)}s(Vd(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,s,e,i,r){if(!this.replayGroup_)return;let n=s.viewState.resolution,l=s.viewState.rotation,a=this.getLayer(),h={},c=function(p,b,v){let x=_t(p),m=h[x];if(m){if(m!==!0&&vg=p.forEachFeatureAtCoordinate(t,n,l,e,c,p===this.declutterExecutorGroup&&s.declutterTree?s.declutterTree.all().map(b=>b.value):null)),g}handleFontsChanged(){let t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){let s=this.getLayer(),e=s.getSource();if(!e)return!1;let i=t.viewHints[Zt.ANIMATING],r=t.viewHints[Zt.INTERACTING],n=s.getUpdateWhileAnimating(),l=s.getUpdateWhileInteracting();if(this.ready&&!n&&i||!l&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;let a=t.extent,h=t.viewState,c=h.projection,g=h.resolution,u=t.pixelRatio,p=s.getRevision(),b=s.getRenderBuffer(),v=s.getRenderOrder();v===void 0&&(v=Hd);let x=h.center.slice(),m=Es(a,b*g),E=m.slice(),L=[m.slice()],S=c.getExtent();if(e.getWrapX()&&c.canWrapX()&&!vi(S,t.extent)){let f=Pt(S),y=Math.max(Pt(m)/2,f);m[0]=S[0]-y,m[2]=S[2]+y,en(x,c);let M=co(L[0],c);M[0]S[0]&&M[2]>S[2]&&L.push([M[0]-f,M[1],M[2]-f,M[3]])}if(this.ready&&this.renderedResolution_==g&&this.renderedRevision_==p&&this.renderedRenderOrder_==v&&vi(this.wrappedRenderedExtent_,m))return he(this.renderedExtent_,E)||(this.hitDetectionImageData_=null,this.renderedExtent_=E),this.renderedCenter_=x,this.replayGroupChanged=!1,!0;this.replayGroup_=null;let w=new ol(En(g,u),m,g,u),R;this.getLayer().getDeclutter()&&(R=new ol(En(g,u),m,g,u));let O=nn(),I;if(O){for(let f=0,y=L.length;f{let y,M=f.getStyleFunction()||s.getStyleFunction();if(M&&(y=M(f,g)),y){let k=this.renderFeature(f,_,y,w,I,R);P=P&&!k}},A=Os(m,c),D=e.getFeaturesInExtent(A);v&&D.sort(v);for(let f=0,y=D.length;f=200&&l.status<300){let h=t.getType(),c;h=="json"||h=="text"?c=l.responseText:h=="xml"?(c=l.responseXML,c||(c=new DOMParser().parseFromString(l.responseText,"application/xml"))):h=="arraybuffer"&&(c=l.response),c?r(t.readFeatures(c,{extent:s,featureProjection:i}),t.readProjection(c)):n()}else n()},l.onerror=n,l.send()}function wl(o,t){return function(s,e,i,r,n){let l=this;rf(o,t,s,e,i,function(a,h){l.addFeatures(a),r!==void 0&&r(a)},n||Ge)}}var pi=class extends Jt{constructor(t,s,e){super(t),this.feature=s,this.features=e}},Sl=class extends Tn{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Ge,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(gt(this.format_,7),this.loader_=wl(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:Qd;let s=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=s?new Cl:null,this.loadedExtentsRtree_=new Cl,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let e,i;Array.isArray(t.features)?i=t.features:t.features&&(e=t.features,i=e.getArray()),!s&&e===void 0&&(e=new se(i)),i!==void 0&&this.addFeaturesInternal(i),e!==void 0&&this.bindFeaturesCollection_(e)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){let s=_t(t);if(!this.addToIndex_(s,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(s,t);let e=t.getGeometry();if(e){let i=e.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[s]=t;this.dispatchEvent(new pi(Ne.ADDFEATURE,t))}setupChangeEvents_(t,s){this.featureChangeKeys_[t]=[Mt(s,ut.CHANGE,this.handleFeatureChange_,this),Mt(s,Be.PROPERTYCHANGE,this.handleFeatureChange_,this)]}addToIndex_(t,s){let e=!0,i=s.getId();return i!==void 0&&(i.toString()in this.idIndex_?e=!1:this.idIndex_[i.toString()]=s),e&&(gt(!(t in this.uidIndex_),30),this.uidIndex_[t]=s),e}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){let s=[],e=[],i=[];for(let r=0,n=t.length;r{s||(s=!0,this.addFeature(e.element),s=!1)}),t.addEventListener(Qt.REMOVE,e=>{s||(s=!0,this.removeFeature(e.element),s=!1)}),this.featuresCollection_=t}clear(t){if(t){for(let e in this.featureChangeKeys_)this.featureChangeKeys_[e].forEach(At);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){let e=i=>{this.removeFeatureInternal(i)};this.featuresRtree_.forEach(e);for(let i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};let s=new pi(Ne.CLEAR);this.dispatchEvent(s),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,s){let e=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(e,function(i){if(i.getGeometry().intersectsCoordinate(t))return s(i)})}forEachFeatureInExtent(t,s){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,s);this.featuresCollection_&&this.featuresCollection_.forEach(s)}forEachFeatureIntersectingExtent(t,s){return this.forEachFeatureInExtent(t,function(e){if(e.getGeometry().intersectsExtent(t)){let r=s(e);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),bi(this.nullGeometryFeatures_)||mi(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){let s=[];return this.forEachFeatureAtCoordinateDirect(t,function(e){s.push(e)}),s}getFeaturesInExtent(t,s){if(this.featuresRtree_){if(!(s&&s.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);let i=Xh(t,s);return[].concat(...i.map(r=>this.featuresRtree_.getInExtent(r)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,s){let e=t[0],i=t[1],r=null,n=[NaN,NaN],l=1/0,a=[-1/0,-1/0,1/0,1/0];return s=s||xi,this.featuresRtree_.forEachInExtent(a,function(h){if(s(h)){let c=h.getGeometry(),g=l;if(l=c.closestPointXY(e,i,n,l),l{--this.loadingExtentsCount_,this.dispatchEvent(new pi(Ne.FEATURESLOADEND,void 0,c))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new pi(Ne.FEATURESLOADERROR))}),i.insert(a,{extent:a.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){let s=this.loadedExtentsRtree_,e;s.forEachInExtent(t,function(i){if(Ci(i.extent,t))return e=i,!0}),e&&s.remove(e)}removeFeature(t){if(!t)return;let s=_t(t);s in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[s]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){let s=_t(t),e=this.featureChangeKeys_[s];if(!e)return;e.forEach(At),delete this.featureChangeKeys_[s];let i=t.getId();return i!==void 0&&delete this.idIndex_[i.toString()],delete this.uidIndex_[s],this.dispatchEvent(new pi(Ne.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let s=!1;for(let e in this.idIndex_)if(this.idIndex_[e]===t){delete this.idIndex_[e],s=!0;break}return s}setLoader(t){this.loader_=t}setUrl(t){gt(this.format_,7),this.url_=t,this.setLoader(wl(t,this.format_))}},Ar=Sl;var Ml=class o extends ti{constructor(t,s){super(),s&&!Array.isArray(t[0])?this.setFlatCoordinates(s,t):this.setCoordinates(t,s)}appendPoint(t){this.flatCoordinates?mi(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()}clone(){let t=new o(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,s,e,i){if(it)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){Et()}getAlpha(t,s){if(!this.transition_)return 1;let e=this.transitionStarts_[t];if(!e)e=s,this.transitionStarts_[t]=e;else if(e===-1)return 1;let i=s-e+1e3/60;return i>=this.transition_?1:Ao(i/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}},An=Al;var Pl=class extends An{constructor(t,s,e,i,r,n){super(t,s,n),this.crossOrigin_=i,this.src_=e,this.key=e,this.image_=new Image,i!==null&&(this.image_.crossOrigin=i),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=pt.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=pt.ERROR,this.unlistenImage_(),this.image_=nf(),this.changed()}handleImageLoad_(){let t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=pt.LOADED:this.state=pt.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==pt.ERROR&&(this.state=pt.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==pt.IDLE&&(this.state=pt.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=wn(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}};function nf(){let o=jt(1,1);return o.fillStyle="rgba(0,0,0,0)",o.fillRect(0,0,1,1),o.canvas}var Pn=Pl;var of=10,iu=.25,Dl=class{constructor(t,s,e,i,r,n){this.sourceProj_=t,this.targetProj_=s;let l={},a=rs(this.targetProj_,this.sourceProj_);this.transformInv_=function(E){let L=E[0]+"/"+E[1];return l[L]||(l[L]=a(E)),l[L]},this.maxSourceExtent_=i,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Pt(i)>=Pt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Pt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Pt(this.targetProj_.getExtent()):null;let h=ke(e),c=Ps(e),g=As(e),u=Ts(e),p=this.transformInv_(h),b=this.transformInv_(c),v=this.transformInv_(g),x=this.transformInv_(u),m=of+(n?Math.max(0,Math.ceil(Math.log2(tr(e)/(n*n*256*256)))):0);if(this.addQuad_(h,c,g,u,p,b,v,x,m),this.wrapsXInSource_){let E=1/0;this.triangles_.forEach(function(L,S,w){E=Math.min(E,L.source[0][0],L.source[1][0],L.source[2][0])}),this.triangles_.forEach(L=>{if(Math.max(L.source[0][0],L.source[1][0],L.source[2][0])-E>this.sourceWorldWidth_/2){let S=[[L.source[0][0],L.source[0][1]],[L.source[1][0],L.source[1][1]],[L.source[2][0],L.source[2][1]]];S[0][0]-E>this.sourceWorldWidth_/2&&(S[0][0]-=this.sourceWorldWidth_),S[1][0]-E>this.sourceWorldWidth_/2&&(S[1][0]-=this.sourceWorldWidth_),S[2][0]-E>this.sourceWorldWidth_/2&&(S[2][0]-=this.sourceWorldWidth_);let w=Math.min(S[0][0],S[1][0],S[2][0]);Math.max(S[0][0],S[1][0],S[2][0])-w.5&&g<1,b=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){let x=lo([t,s,e,i]);b=Pt(x)/this.targetWorldWidth_>iu||b}!p&&this.sourceProj_.isGlobal()&&g&&(b=g>iu||b)}if(!b&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!Wt(c,this.maxSourceExtent_))return;let v=0;if(!b&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(n[0])||!isFinite(n[1])||!isFinite(l[0])||!isFinite(l[1])||!isFinite(a[0])||!isFinite(a[1]))){if(h>0)b=!0;else if(v=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(n[0])||!isFinite(n[1])?4:0)+(!isFinite(l[0])||!isFinite(l[1])?2:0)+(!isFinite(a[0])||!isFinite(a[1])?1:0),v!=1&&v!=2&&v!=4&&v!=8)return}if(h>0){if(!b){let x=[(t[0]+e[0])/2,(t[1]+e[1])/2],m=this.transformInv_(x),E;p?E=(_i(r[0],u)+_i(l[0],u))/2-_i(m[0],u):E=(r[0]+l[0])/2-m[0];let L=(r[1]+l[1])/2-m[1];b=E*E+L*L>this.errorThresholdSquared_}if(b){if(Math.abs(t[0]-e[0])<=Math.abs(t[1]-e[1])){let x=[(s[0]+e[0])/2,(s[1]+e[1])/2],m=this.transformInv_(x),E=[(i[0]+t[0])/2,(i[1]+t[1])/2],L=this.transformInv_(E);this.addQuad_(t,s,x,E,r,n,m,L,h-1),this.addQuad_(E,x,e,i,L,m,l,a,h-1)}else{let x=[(t[0]+s[0])/2,(t[1]+s[1])/2],m=this.transformInv_(x),E=[(e[0]+i[0])/2,(e[1]+i[1])/2],L=this.transformInv_(E);this.addQuad_(t,x,E,i,r,m,L,a,h-1),this.addQuad_(x,s,e,E,m,n,l,L,h-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}v&11||this.addTriangle_(t,e,i,r,l,a),v&14||this.addTriangle_(t,e,s,r,l,n),v&&(v&13||this.addTriangle_(s,i,t,n,a,r),v&7||this.addTriangle_(s,i,e,n,a,l))}calculateSourceExtent(){let t=Vt();return this.triangles_.forEach(function(s,e,i){let r=s.source;es(t,r[0]),es(t,r[1]),es(t,r[2])}),t}getTriangles(){return this.triangles_}},su=Dl;var Ll,cs=[];function ru(o,t,s,e,i){o.beginPath(),o.moveTo(0,0),o.lineTo(t,s),o.lineTo(e,i),o.closePath(),o.save(),o.clip(),o.fillRect(0,0,Math.max(t,e)+1,Math.max(s,i)),o.restore()}function Il(o,t){return Math.abs(o[t*4]-210)>2||Math.abs(o[t*4+3]-.75*255)>2}function af(){if(Ll===void 0){let o=jt(6,6,cs);o.globalCompositeOperation="lighter",o.fillStyle="rgba(210, 0, 0, 0.75)",ru(o,4,5,4,0),ru(o,4,5,0,5);let t=o.getImageData(0,0,3,3).data;Ll=Il(t,0)||Il(t,4)||Il(t,8),os(o),cs.push(o.canvas)}return Ll}function nu(o,t,s,e){let i=ji(s,t,o),r=_o(t,e,s),n=t.getMetersPerUnit();n!==void 0&&(r*=n);let l=o.getMetersPerUnit();l!==void 0&&(r/=l);let a=o.getExtent();if(!a||ki(a,i)){let h=_o(o,r,i)/r;isFinite(h)&&h>0&&(r/=h)}return r}function ou(o,t,s,e){let i=Qe(s),r=nu(o,t,i,e);return(!isFinite(r)||r<=0)&&Zr(s,function(n){return r=nu(o,t,n,e),isFinite(r)&&r>0}),r}function au(o,t,s,e,i,r,n,l,a,h,c,g){let u=jt(Math.round(s*o),Math.round(s*t),cs);if(g||(u.imageSmoothingEnabled=!1),a.length===0)return u.canvas;u.scale(s,s);function p(S){return Math.round(S*s)/s}u.globalCompositeOperation="lighter";let b=Vt();a.forEach(function(S,w,R){zh(b,S.extent)});let v=Pt(b),x=de(b),m=jt(Math.round(s*v/e),Math.round(s*x/e),cs);g||(m.imageSmoothingEnabled=!1);let E=s/e;a.forEach(function(S,w,R){let O=S.extent[0]-b[0],I=-(S.extent[3]-b[3]),_=Pt(S.extent),P=de(S.extent);S.image.width>0&&S.image.height>0&&m.drawImage(S.image,h,h,S.image.width-2*h,S.image.height-2*h,O*E,I*E,_*E,P*E)});let L=ke(n);return l.getTriangles().forEach(function(S,w,R){let O=S.source,I=S.target,_=O[0][0],P=O[0][1],F=O[1][0],A=O[1][1],D=O[2][0],C=O[2][1],d=p((I[0][0]-L[0])/r),f=p(-(I[0][1]-L[1])/r),y=p((I[1][0]-L[0])/r),M=p(-(I[1][1]-L[1])/r),k=p((I[2][0]-L[0])/r),T=p(-(I[2][1]-L[1])/r),z=_,N=P;_=0,P=0,F-=z,A-=N,D-=z,C-=N;let G=[[F,A,0,0,y-d],[D,C,0,0,k-d],[0,0,F,A,M-f],[0,0,D,C,T-f]],X=Yh(G);if(X){if(u.save(),u.beginPath(),af()||!g){u.moveTo(y,M);let j=4,B=d-y,W=f-M;for(let Y=0;Y{s&&s.getState()==pt.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(s.tileCoord),image:s.getImage()})}),this.sourceTiles_.length=0,t.length===0)this.state=pt.ERROR;else{let s=this.wrappedTileCoord_[0],e=this.targetTileGrid_.getTileSize(s),i=typeof e=="number"?e:e[0],r=typeof e=="number"?e:e[1],n=this.targetTileGrid_.getResolution(s),l=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=au(i,r,this.pixelRatio_,l,this.sourceTileGrid_.getExtent(),n,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=pt.LOADED}this.changed()}load(){if(this.state==pt.IDLE){this.state=pt.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(s=>{let e=s.getState();if(e==pt.IDLE||e==pt.LOADING){t++;let i=Mt(s,ut.CHANGE,function(r){let n=s.getState();(n==pt.LOADED||n==pt.ERROR||n==pt.EMPTY)&&(At(i),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(i)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(s,e,i){s.getState()==pt.IDLE&&s.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(At),this.sourcesListenerKeys_=null}release(){this.canvas_&&(os(this.canvas_.getContext("2d")),cs.push(this.canvas_),this.canvas_=null),super.release()}},Pr=Rl;var Dn=class{constructor(t,s,e,i){this.minX=t,this.maxX=s,this.minY=e,this.maxY=i}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,s){return this.minX<=t&&t<=this.maxX&&this.minY<=s&&s<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}};function ds(o,t,s,e,i){return i!==void 0?(i.minX=o,i.maxX=t,i.minY=s,i.maxY=e,i):new Dn(o,t,s,e)}var Ln=Dn;var kl=class extends Mn{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=Vt(),this.tmpTileRange_=new Ln(0,0,0,0)}isDrawableTile(t){let s=this.getLayer(),e=t.getState(),i=s.getUseInterimTilesOnError();return e==pt.LOADED||e==pt.EMPTY||e==pt.ERROR&&!i}getTile(t,s,e,i){let r=i.pixelRatio,n=i.viewState.projection,l=this.getLayer(),h=l.getSource().getTile(t,s,e,r,n);return h.getState()==pt.ERROR&&l.getUseInterimTilesOnError()&&l.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(h)||(h=h.getInterimTile()),h}getData(t){let s=this.frameState;if(!s)return null;let e=this.getLayer(),i=Xt(s.pixelToCoordinateTransform,t.slice()),r=e.getExtent();if(r&&!ki(r,i))return null;let n=s.pixelRatio,l=s.viewState.projection,a=s.viewState,h=e.getRenderSource(),c=h.getTileGridForProjection(a.projection),g=h.getTilePixelRatio(s.pixelRatio);for(let u=c.getZForResolution(a.resolution);u>=c.getMinZoom();--u){let p=c.getTileCoordForCoordAndZ(i,u),b=h.getTile(u,p[1],p[2],n,l);if(!(b instanceof Pn||b instanceof Pr)||b instanceof Pr&&b.getState()===pt.EMPTY)return null;if(b.getState()!==pt.LOADED)continue;let v=c.getOrigin(u),x=te(c.getTileSize(u)),m=c.getResolution(u),E=Math.floor(g*((i[0]-v[0])/m-p[1]*x[0])),L=Math.floor(g*((v[1]-i[1])/m-p[2]*x[1])),S=Math.round(g*h.getGutterForProjection(a.projection));return this.getImageData(b.getImage(),E+S,L+S)}return null}loadedTileCallback(t,s,e){return this.isDrawableTile(e)?super.loadedTileCallback(t,s,e):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,s){let e=t.layerStatesArray[t.layerIndex],i=t.viewState,r=i.projection,n=i.resolution,l=i.center,a=i.rotation,h=t.pixelRatio,c=this.getLayer(),g=c.getSource(),u=g.getRevision(),p=g.getTileGridForProjection(r),b=p.getZForResolution(n,g.zDirection),v=p.getResolution(b),x=t.extent,m=t.viewState.resolution,E=g.getTilePixelRatio(h),L=Math.round(Pt(x)/m*h),S=Math.round(de(x)/m*h),w=e.extent&&Ue(e.extent,r);w&&(x=Oi(x,Ue(e.extent,r)));let R=v*L/2/E,O=v*S/2/E,I=[l[0]-R,l[1]-O,l[0]+R,l[1]+O],_=p.getTileRangeForExtentAndZ(x,b),P={};P[b]={};let F=this.createLoadedTileFinder(g,r,P),A=this.tmpExtent,D=this.tmpTileRange_;this.newTiles_=!1;let C=a?Kr(i.center,m,a,t.size):void 0;for(let G=_.minX;G<=_.maxX;++G)for(let X=_.minY;X<=_.maxY;++X){if(a&&!p.tileCoordIntersectsViewport([b,G,X],C))continue;let j=this.getTile(b,G,X,t);if(this.isDrawableTile(j)){let Y=_t(this);if(j.getState()==pt.LOADED){P[b][j.tileCoord.toString()]=j;let U=j.inTransition(Y);U&&e.opacity!==1&&(j.endTransition(Y),U=!1),!this.newTiles_&&(U||!this.renderedTiles.includes(j))&&(this.newTiles_=!0)}if(j.getAlpha(Y,t.time)===1)continue}let B=p.getTileCoordChildTileRange(j.tileCoord,D,A),W=!1;B&&(W=F(b+1,B)),W||p.forEachTileCoordParentTileRange(j.tileCoord,F,D,A)}let d=v/n*h/E;fe(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,a,-L/2,-S/2);let f=Yr(this.pixelTransform);this.useContainer(s,f,this.getBackground(t));let y=this.context,M=y.canvas;Ms(this.inversePixelTransform,this.pixelTransform),fe(this.tempTransform,L/2,S/2,d,d,0,-L/2,-S/2),M.width!=L||M.height!=S?(M.width=L,M.height=S):this.containerReused||y.clearRect(0,0,L,S),w&&this.clipUnrotated(y,t,w),g.getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),this.renderedTiles.length=0;let k=Object.keys(P).map(Number);k.sort($e);let T,z,N;e.opacity===1&&(!this.containerReused||g.getOpaque(t.viewState.projection))?k=k.reverse():(T=[],z=[]);for(let G=k.length-1;G>=0;--G){let X=k[G],j=g.getTilePixelSize(X,h,r),W=p.getResolution(X)/v,Y=j[0]*W*d,U=j[1]*W*d,q=p.getTileCoordForCoordAndZ(ke(I),X),H=p.getTileCoordExtent(q),V=Xt(this.tempTransform,[E*(H[0]-I[0])/v,E*(I[3]-H[3])/v]),Z=E*g.getGutterForProjection(r),K=P[X];for(let J in K){let tt=K[J],$=tt.tileCoord,Q=q[1]-$[1],et=Math.round(V[0]-(Q-1)*Y),it=q[2]-$[2],st=Math.round(V[1]-(it-1)*U),rt=Math.round(V[0]-Q*Y),nt=Math.round(V[1]-it*U),ot=et-rt,at=st-nt,ct=b===X,ht=ct&&tt.getAlpha(_t(this),t.time)!==1,lt=!1;if(!ht)if(T){N=[rt,nt,rt+ot,nt,rt+ot,nt+at,rt,nt+at];for(let xt=0,wt=T.length;xt0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let s=this.oldest_;for(;s;)t(s.value_,s.key_,this),s=s.newer}get(t,s){let e=this.entries_[t];return gt(e!==void 0,15),e===this.newest_||(e===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.newest_,this.newest_.newer=e,this.newest_=e),e.value_}remove(t){let s=this.entries_[t];return gt(s!==void 0,15),s===this.newest_?(this.newest_=s.older,this.newest_&&(this.newest_.newer=null)):s===this.oldest_?(this.oldest_=s.newer,this.oldest_&&(this.oldest_.older=null)):(s.newer.older=s.older,s.older.newer=s.newer),delete this.entries_[t],--this.count_,s.value_}getCount(){return this.count_}getKeys(){let t=new Array(this.count_),s=0,e;for(e=this.newest_;e;e=e.older)t[s++]=e.key_;return t}getValues(){let t=new Array(this.count_),s=0,e;for(e=this.newest_;e;e=e.older)t[s++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){if(this.containsKey(t))return this.entries_[t].value_}pop(){let t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,s){this.get(t),this.entries_[t].value_=s}set(t,s){gt(!(t in this.entries_),16);let e={key_:t,newer:null,older:this.newest_,value_:s};this.newest_?this.newest_.newer=e:this.oldest_=e,this.newest_=e,this.entries_[t]=e,++this.count_}setSize(t){this.highWaterMark=t}},hu=Ol;function Fl(o,t,s,e){return e!==void 0?(e[0]=o,e[1]=t,e[2]=s,e):[o,t,s]}function us(o,t,s){return o+"/"+t+"/"+s}function In(o){return us(o[0],o[1],o[2])}function cu(o){return o.split("/").map(Number)}function du(o){return(o[1]<s||s>t.getMaxZoom())return!1;let r=t.getFullTileRange(s);return r?r.containsXY(e,i):!0}var zl=class extends hu{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;let t=this.peekFirstKey(),e=cu(t)[0];this.forEach(i=>{i.tileCoord[0]!==e&&(this.remove(In(i.tileCoord)),i.release())})}},Rn=zl;var Vs=[0,0,0],Ki=5,Nl=class{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,gt(Th(this.resolutions_,function(i,r){return r-i},!0),17);let s;if(!t.origins){for(let i=0,r=this.resolutions_.length-1;i=this.minZoom;){if(this.zoomFactor_===2?(n=Math.floor(n/2),l=Math.floor(l/2),r=ds(n,n,l,l,e)):r=this.getTileRangeForExtentAndZ(a,h,e),s(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,s,e){if(t[0]this.maxZoom||s0?e:Math.max(r/s[0],i/s[1]);let n=t+1,l=new Array(n);for(let a=0;ae.highWaterMark&&(e.highWaterMark=t)}useTile(t,s,e,i){}},zn=class extends Jt{constructor(t,s){super(t),this.tile=s}},mu=Bl;function cf(o,t){let s=/\{z\}/g,e=/\{x\}/g,i=/\{y\}/g,r=/\{-y\}/g;return function(n,l,a){if(n)return o.replace(s,n[0].toString()).replace(e,n[1].toString()).replace(i,n[2].toString()).replace(r,function(){let h=n[0],c=t.getFullTileRange(h);return gt(c,55),(c.getHeight()-n[2]-1).toString()})}}function xu(o,t){let s=o.length,e=new Array(s);for(let i=0;ithis.getTileInternal(x,m,E,L,n),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return v.key=g,h?(v.interimTile=h,v.refreshInterimChain(),l.replace(c,v)):l.set(c,v),v}getTileInternal(t,s,e,i,r){let n=null,l=us(t,s,e),a=this.getKey();if(!this.tileCache.containsKey(l))n=this.createTile_(t,s,e,i,r,a),this.tileCache.set(l,n);else if(n=this.tileCache.get(l),n.key!=a){let h=n;n=this.createTile_(t,s,e,i,r,a),h.getState()==pt.IDLE?n.interimTile=h.interimTile:n.interimTile=h,n.refreshInterimChain(),this.tileCache.replace(l,n)}return n}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(let s in this.tileCacheForProjection)this.tileCacheForProjection[s].clear();this.changed()}}setTileGridForProjection(t,s){let e=ue(t);if(e){let i=_t(e);i in this.tileGridForProjection||(this.tileGridForProjection[i]=s)}}clear(){super.clear();for(let t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}};function uf(o,t){o.getImage().src=t}var Cu=Vl;var Ul=class extends Cu{constructor(t){t=t||{};let s=t.projection!==void 0?t.projection:"EPSG:3857",e=t.tileGrid!==void 0?t.tileGrid:fu({extent:Fn(s),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:s,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:e,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}},_u=Ul;var pf='© OpenStreetMap contributors.',Hl=class extends _u{constructor(t){t=t||{};let s;t.attributions!==void 0?s=t.attributions:s=[pf];let e=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",i=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:s,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:e,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:i,wrapX:t.wrapX,zDirection:t.zDirection})}},Zl=Hl;var ff=["popup"],gf=["tooltip"],Nn=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.tooltipData={visible:!1,content:"",name:"",items:[]},this.preventColFilteringBasedOnDataProperties=!0,this.CLUSTER_RANGE=1,this.isRGBColor=!1,this._selectedFeature=null,this.featureOverlay=null,this.mapData=null,this.hintTimeout=null,this.popupElement=null,this.polyData=null,this.isGeoJSON=!1}ngOnInit(){super.ngOnInit(),this.popupElement=this.popupEl.nativeElement,this.tooltipData.name="",this.tooltipData.items=[],this.widget.isMap=!0,this.requestPolygons(),this.us.isEmbedded()&&(this.onMessage=e=>{let i=e.data;switch(i.type){case"map.applyStyle":this.applyStyle(i);break}},window.addEventListener("message",this.onMessage))}applyStyle(e){let{selector:i,style:r,value:n}=e,l=this.map?.getTargetElement();(l&&l.querySelectorAll(i))?.forEach(h=>{h.style[r]=n})}ngAfterViewInit(){this.createMap()}ngOnDestroy(){this.us.isEmbedded()&&window.removeEventListener("message",this.onMessage),this.tooltip?.nativeElement?.remove(),super.ngOnDestroy()}createMap(){let e=this.ss.getAppSettings(),i;i=this.getDataPropValue("tileUrl");let r=new Zl({wrapX:!0,url:i}),n=new wd({layers:[new Yl({source:r})],controls:xr({attributionOptions:{collapsible:!1}}),target:this.el.nativeElement,view:new De({center:[0,0],zoom:2})});n.getViewport().addEventListener("mouseout",l=>{this.hideTooltip()},!1),this.map=n,this.initialize()}hideTooltip(){this.hintTimeout&&clearTimeout(this.hintTimeout),this.tooltip&&(this.tooltip.nativeElement.style.display="none")}rejectTooltipCreation(){clearTimeout(this.hintTimeout)}showTooltip(e,i,r){this.hintTimeout&&clearTimeout(this.hintTimeout),this.hintTimeout=setTimeout(()=>{let n=this.tooltip?.nativeElement,l=this.getDataPropValue("tooltipStyles");if(l){let a=JSON.parse(l);for(let h in a)n.style.setProperty(h,a[h])}n.innerHTML=e,n.style.left=i.toString()+"px",n.style.top=r.toString()+"px",n.style.display="block"},600)}showPopup(){let e=this.popupElement,i=this.getDataPropValue("popupStyles");if(i){let r=JSON.parse(i);for(let n in r)e.style.setProperty(n,r[n])}this.popupElement&&(this.popupElement.style.visibility="hidden"),setTimeout(()=>{this.popupElement&&(this.popupElement.style.visibility="visible"),this.map?.render()},0)}hidePopup(){this.popupElement&&(this.popupElement.style.visibility="hidden")}doDrillUp(){this.hideTooltip(),this.hidePopup(),this.doDrill()}displayAsPivot(e){this.hideTooltip(),this.rejectTooltipCreation(),this.widget.type==="pivot"?(this.widget.isDrillthrough=!1,this.restoreWidgetType()):(this.widget.pivotMdx=e||this.getMDX(),this.changeWidgetType("pivot"))}requestPolygons(){let e=this.widget.name;this.widget.name.indexOf(".")===-1&&(e+=".js"),e=this.getDataPropValue("coordsJsFile")||e;let r=(this.ss.serverSettings.DefaultApp||"/csp")+"/"+e;this.ds.getFile(r).then(n=>this.onPolyFileLoaded(n)).finally(()=>this.hideLoading())}onPolyFileLoaded(e){this.isGeoJSON=!1;try{let n=JSON.parse(e);this.polyData=n,this.isGeoJSON=!0,this.buildPolygons();return}catch{}var i={};e="("+e+")(polys)",window["eval"](e),this.polyData=i,this.buildPolygons()}onPolyJSONFileLoaded(e){this.polyData=e,this.buildPolygons()}getFeatureColor(e,i){let r=this.mapData.Cols[1].tuples.filter(b=>b.caption===e);if(r.length===0)return;r=r[0];let n,l=this.mapData.Cols[1].tuples.indexOf(r),a=this.mapData.Cols[0].tuples.length,h="ColorExplicitValue";h=this.getDataPropValue("colorProperty")||h;let c;isNaN(parseInt(h,10))?c=this.mapData.Cols[0].tuples.filter(b=>b.caption===h):c=this.mapData.Cols[0].tuples.slice(h,1),c=c[0];let g=this.mapData.Cols[0].tuples.indexOf(c),u=this.mapData.Data[l*a+g];if(isNaN(parseFloat(u)))return u.toString().indexOf("rgb")!==-1&&u.toString().indexOf("rgba")===-1&&(u=u.replace("rgb","rgba"),u=u.substr(0,u.length-1)+", 0)"),n=u.split(","),n[3]="0.4)",n.join(",");{let b=this.getDataPropValue("colorFormula")||"hsl((255-x)/255 * 120, 100%, 50%)";this.isRGBColor&&(b="rgb(x, 255-x, 0)");let v=b.indexOf("("),x=b.substring(0,v).toLowerCase();b=b.substring(v+1,b.length-1),n=b.split(",");let m=i||0;var p;for(let E=0;E255&&(p=255),p<0&&(p=0),n[E]=Math.floor(p).toString()}return x.indexOf("a")===-1?x+"a("+n.join(",")+", 0.45)":x+"("+n.join(",")+")"}}centerView(e,i){let r,n,l;if(this.widget.properties&&(r=parseFloat(this.widget.properties.latitude),n=parseFloat(this.widget.properties.longitude),l=parseFloat(this.widget.properties.zoom)),this.drills.length===0&&!isNaN(r)&&!isNaN(n)&&!isNaN(l)&&r!==void 0&&n!==void 0&&l!==void 0)this.map?.getView().setCenter(ji([n,r],"EPSG:4326","EPSG:900913")),this.map?.getView().setZoom(l);else{if(Math.abs(e[0]-i[0])<1e-8&&Math.abs(e[1]-i[1])<1e-8)return;let a=ji([e[0],e[1]],"EPSG:4326","EPSG:900913"),h=ji([i[0],i[1]],"EPSG:4326","EPSG:900913");this.map?.getView().fit([a[0],a[1],h[0],h[1]],this.map?.getSize())}this.getDataPropValue("fixMaxZoom")==="1"&&this.map?.getView().setMaxZoom(this.map?.getView().getZoom()||1),this.getDataPropValue("fixMinZoom")==="1"&&this.map?.getView().setMinZoom(this.map?.getView().getZoom()||1),this.getDataPropValue("maxZoom")&&this.map?.getView().setMaxZoom(parseFloat(this.getDataPropValue("maxZoom")||"1"))}buildPolygons(){let e,i,r,n,l,a,h,c,g,u,p,b;this.isRGBColor=!1;let v=this.getDataPropValue("colorProperty")||"ColorHSLValue",x=this.getDataPropValue("coordsProperty")||"CoordKeyValue";if(!this.polyData||!this.map||!this.mapData)return;let m=[];h=this.mapData.Cols[0].tuples.length;let E=Number.MAX_VALUE,L=Number.MIN_VALUE,S=0;for(isNaN(parseInt(v))?(b=this.mapData.Cols[0].tuples.filter(I=>I.caption===v),S=this.mapData.Cols[0].tuples.indexOf(b[0]),S===-1&&(this.isRGBColor=!0,v="ColorRGBValue",b=this.mapData.Cols[0].tuples.filter(I=>I.caption===v),S=this.mapData.Cols[0].tuples.indexOf(b[0]))):S=parseInt(this.widget.properties.colorProperty,10)||0,c=0;cL&&(L=g);let w=[99999999,99999999],R=[-99999999,-99999999],O=0;for(p=-1,b=this.mapData.Cols[0].tuples.filter(I=>I.caption===x),b.length===0&&(b=this.mapData.Cols[0].tuples.filter(I=>I.caption==="Key")),b.length!==0&&(p=this.mapData.Cols[0].tuples.indexOf(b[0])),c=0;cR[0]&&(R[0]=parseFloat(N)),parseFloat(i)>R[1]&&(R[1]=parseFloat(i)),k.push(z.getCoordinates())}if(y.push(k),y.length>300){let T=[];for(n=0;nM.caption===D);if(y.length!==0){let M=this.mapData.Cols[0].tuples.indexOf(y[0]);M!==-1&&(A=this.mapData.Data[c*h+M])}}let C=Xi;if(this.isGeoJSON){switch(u.type.toLowerCase()){}C=Tl}let d=new Fa({geometry:new C(P),key:I,title:A,dataIdx:c*h,path:this.mapData.Cols[1].tuples[c].path,desc:this.mapData.Cols[1].tuples[c].title}),f;if(isNaN(parseFloat(A))||(A=this.formatNumber(A,"")),F){let y=JSON.parse(F),M=y.size||12,k=y.font||"Calibri,Arial,sans-serif",T=y.color||"#000",z=y.stroke||"#fff",N=y.strokeWidth||2;f=new vr({font:`${M}px ${k}`,fill:new hi({color:T}),stroke:new ci({color:z,width:N}),text:A+""})}g=this.mapData.Data[c*h+S],d.setStyle(new Ze({zIndex:0,fill:new hi({color:this.getFeatureColor(I,(g-E)*255/(L-E))||"none"}),stroke:new ci({color:"rgba(0, 0, 0, 0.3)",width:1}),text:f})),m.push(d)}this.featureOverlay.getSource().clear(),this.polys.clear(),this.polys.addFeatures(m),setTimeout(()=>{this.centerView(w,R)})}retrieveData(e){if(setTimeout(()=>{this.map?.updateSize()},0),e.Error){this.showError(e.Error);return}e.Info&&(this.dataInfo=e.Info),this.hideTooltip(),this.markers.clear(),this.mapData=e,this.buildPolygons();let i=[Number.MAX_VALUE,Number.MAX_VALUE],r=[-Number.MAX_VALUE,-Number.MAX_VALUE];if(e&&this.map){let n=e.Cols[0].tuples.length,l=0,a=[],h="latitude";this.widget.properties&&this.widget.properties.latitudeProperty&&(h=this.widget.properties.latitudeProperty);let c="longitude";this.widget.properties&&this.widget.properties.longitudeProperty&&(c=this.widget.properties.longitudeProperty);let g=-1,u=-1,p=e.Cols[0].tuples.filter(v=>v.caption.toLowerCase()===h);if(p.length!==0&&(u=e.Cols[0].tuples.indexOf(p[0])),p=e.Cols[0].tuples.filter(v=>v.caption.toLowerCase()===c),p.length!==0&&(g=e.Cols[0].tuples.indexOf(p[0])),u===-1||g===-1)return;let b=e.Cols[1].tuples;b[0]?.children&&(b=b[0]?.children);for(let v=0;vr[1]&&(r[1]=parseFloat(m.toString())),parseFloat(x.toString())>r[0]&&(r[0]=parseFloat(x.toString())),i[0]==r[0]&&(i[0]-=.25,r[0]+=.25),i[1]==r[1]&&(i[1]-=.25,r[1]+=.25),a.push(R),l+=n}a.length!==0&&(this.markers.addFeatures(a),this.centerView(i,r)),this.centerView(i,r)}}initialize(){this.iconStyle=new Ze({zIndex:100,image:new hs({anchor:[.5,40],anchorXUnits:"fraction",anchorYUnits:"pixels",opacity:1,src:"assets/img/map-marker-red.png"})});let e=this.map,i=new Ze({zIndex:0,stroke:new ci({color:"rgba(0, 0, 0, 0.5)",width:1})});this.polyStyle=i,this.hoverStyle=new Ze({zIndex:1,stroke:new ci({color:"blue",width:2})}),this.polys=new Ar({features:[]});let r=new Tr({source:this.polys,style:this.polyStyle});r.setZIndex(1),this.map?.addLayer(r),this.markers=new Ar({features:[]});let n=new se;this.featureOverlay=new Tr({map:this.map,source:new Ar({features:n,useSpatialIndex:!1}),style:this.hoverStyle,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.featureOverlay.setZIndex(10),this.featureOverlay.setMap(this.map),this.markers&&(r=new Tr({source:this.markers,style:this.iconStyle}),r.setZIndex(100),this.map?.addLayer(r)),this.map?.on("click",l=>this.onMapClick(l)),this.map?.on("pointermove",l=>this.onPointerMove(l))}onPointerMove(e){if(Ae.mobile&&e.originalEvent.touches&&e.originalEvent.touches.length!==1)return;this.hideTooltip();let i=this.map?.forEachFeatureAtPixel(e.pixel,(n,l)=>n);if(i){let n=i.get("dataIdx"),l,a="TooltipValue",h="",c=this.getDataProp("tooltipProperty");c&&(a=c.dataValue,h=c.format),l=this.getDataByColumnName(this.mapData,a||"Name",n,h),!l&&this.widget.properties?.polygonTitleProperty&&i.get("title")&&(l=i.get("title")),l||(l=this.getDataByColumnName(this.mapData,"Name",n)),l||(l=(this.mapData.Cols[1].tuples[0]?.children||this.mapData.Cols[1].tuples)[Math.floor(n/this.mapData.Cols[0].tuples.length)].caption||""),l&&this.showTooltip(l,e.pixel[0],e.pixel[1])}if(e.dragging){this.hideTooltip();return}let r=this.map?.getEventPixel(e.originalEvent);if(r){let n=this.map?.hasFeatureAtPixel(r);(this.map?.getTarget()).style.cursor=n?"pointer":""}this.featureOverlay?.getSource().clear(),i&&this.featureOverlay?.getSource().addFeature(i)}getTooltipData(e){if(!this.mapData)return;let i=[],r=this.mapData.Cols[1].tuples.filter(c=>c.caption===e);if(r.length===0)return;r=r[0];let n=this.mapData.Cols[1].tuples.indexOf(r),l=this.mapData.Cols[0].tuples.length,a=this.mapData.Cols[0].tuples.filter(c=>c.caption==="tooltip");if(a.length===0)return;a=a[0];let h=this.mapData.Cols[0].tuples.indexOf(a);return i.push({label:"",value:this.mapData?.Data[n*l+h].split(":")[1]||""}),i}onMapClick(e){if(this.hidePopup(),Ae.mobile&&e.originalEvent.touches&&e.originalEvent.touches.length!==1)return;let i=this.map?.forEachFeatureAtPixel(e.pixel,(n,l)=>n);if(i){if(this.hideTooltip(),Ae.mobile&&this._selectedFeature!==i){this._selectedFeature=i,this.onPointerMove(e);return}this.doDrill(i.get("path"),i.get("name")||i.get("title"),void 0,()=>{r(i)})}else this.hideTooltip();let r=n=>{let l=n.get("dataIdx"),a,h,c="PopupValue",g="",u=this.getDataProp("popupProperty");if(u&&(c=u.dataValue,g=u.format),c?(h=""+(n.get("key")||n.values_.title)+"
",h+=c+": ",h+=this.getDataByColumnName(this.mapData,c,l,g)):h=this.mapData?.Cols[1].tuples[Math.floor(l/this.mapData?.Cols[0].tuples.length)].caption||this.mapData?.Cols[1].tuples[Math.floor(l/this.mapData?.Cols[0].tuples.length)].desc||"",!h)if(h=""+(n.get("name")||n.values_.title)+"
",this.mapData?.Cols[0].tuples.length)for(let p=0;p${v}`,p!==this.mapData?.Cols[0].tuples.length-1&&(h+="
")}else h=this.getDataByColumnName(this.mapData,"Name",l);h&&(this.tooltipData.content=h,this.popupElement&&(this.popupElement.style.left=e.pixel[0]+"px",this.popupElement.style.top=e.pixel[1]-10+"px",this.popupElement.innerHTML=h),this.showPopup())}}onResize(){this.map&&this.map.updateSize()}buildGeoJSON(e){}getPartsByKey(e,i="Key"){if(this.isGeoJSON){let r=this.polyData?.features.find(n=>n.properties[i]===e);return r?r.geometry:void 0}else if(this.polyData?.[e])return this.polyData[e]?.split(";")}convertCoordinatesOfGEOJson(e,i,r){let n=JSON.parse(JSON.stringify(e.coordinates));for(let l=0;lr[0]&&(r[0]=parseFloat(p)),parseFloat(g)>r[1]&&(r[1]=parseFloat(g))}return{poly:n,min:i,max:r}}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-map-widget"]],viewQuery:function(i,r){if(i&1&&($i(ff,7),$i(gf,7)),i&2){let n;Ji(n=Qi())&&(r.popupEl=n.first),Ji(n=Qi())&&(r.tooltip=n.first)}},standalone:!0,features:[vt,bt],decls:7,vars:0,consts:[["popup",""],["tooltip",""],[1,"panel","panel-default","map-popup",2,"visibility","hidden"],["ng-bind-html","model.tooltip.content | sanitize"],[1,"arrow_box"],[1,"tooltip",2,"display","none"]],template:function(i,r){i&1&&(Lt(0,"div",2,0)(2,"div"),le(3,"div",3),kt(),le(4,"div",4),kt(),le(5,"div",5,1))},styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative}.tooltip[_ngcontent-%COMP%]{margin-top:24px;z-index:1000;position:absolute;border:solid 1px #000000;color:#000;background-color:#ffffe1;white-space:nowrap;font-family:Tahoma,sans-serif;font-size:13px;-moz-box-shadow:2px 2px 4px #7f7f7f;box-shadow:2px 2px 4px #7f7f7f;padding:2px 3px}.map-popup[_ngcontent-%COMP%]{transform:translateY(-100%) translate(-50%);z-index:1;position:absolute;background-color:var(--cl-widget-filter-bg);margin-bottom:0;border-color:#b0b0b0;padding:4px;-webkit-box-shadow:1px 1px 9px 0px rgba(50,50,50,.5);-moz-box-shadow:1px 1px 9px 0px rgba(50,50,50,.5);box-shadow:1px 1px 9px #32323280;color:var(--cl-widget-header-txt)}.map-popup[_ngcontent-%COMP%]:after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:8px 4px 0 4px;bottom:-8px;left:calc(50% - 4px);position:absolute;border-color:var(--cl-widget-filter-bg) transparent transparent transparent}']});let o=t;return o})();var Le=qt(Jn()),Iu=qt(wu()),Ru=qt(Su()),ku=qt(Mu()),Ou=qt(Eu()),Fu=qt(Tu()),zu=qt(Au()),Nu=qt(Pu()),ju=qt(Du());(0,Ru.default)(Le.default);(0,ju.default)(Le.default);(0,Iu.default)(Le.default);(0,ku.default)(Le.default);(0,Ou.default)(Le.default);(0,Fu.default)(Le.default);(0,zu.default)(Le.default);(0,Nu.default)(Le.default);var Ir=20;var Lr={treemap:{showLines:!1,showText:!1},pie:{showLines:!1}},Bt=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.widgetData=null,this.seriesTypes=[],this.firstRun=!0,this.baseSeriesType="bar",this.sbs=$t(zr),this.wts=$t(Lu),this.zone=$t(lh),this.axisLabelListeners=[],this.seriesVisibility=[]}ngOnInit(){super.ngOnInit(),this.widget.isChart=!0,this.setupHeaderButtons(),this.override?.seriesTypes&&(this.seriesTypes=this.override?.seriesTypes.split(",")),this.subPrint=this.bs.subscribe("print:"+this.widget.name,()=>{if(this.chart){let e=new Blob([this.chart.getSVG()],{type:"image/svg+xml"}),i=window.open(URL.createObjectURL(e),"_blank");i&&(i.onload=()=>{let r=i?.document.querySelector("svg");r?.setAttribute("width","100%"),r?.setAttribute("height","100%"),r&&(r.style.height="auto"),i?.print()},i.onafterprint=()=>{i?.close()})}}),this.setupChart(),this.widget.inline&&this.setupInline(),this.subColorsConfig=this.bs.subscribe("charts:update-colors",e=>this.updateColors(e))}ngAfterViewInit(){this.createChart(),setTimeout(()=>{this.chart?.reflow()})}createChart(){this.chartConfig.chart&&(this.chartConfig.chart.renderTo=this.el.nativeElement),this.chartConfig?.chart?.type==="map"?this.chart=Le.default.mapChart(this.chartConfig):this.widget.type.toLowerCase()==="timechart"?this.chart=Le.default.stockChart(this.chartConfig):this.chart=Le.default.chart(this.chartConfig)}clearSeries(e){let i=e||this.chart;if(i)for(;i.series.length>0;)i.series[0].remove(!1)}onHeaderButton(e){switch(super.onHeaderButton(e),e.name){case"isLegend":this.toggleLegend(e.state);break;case"showValues":{(this.chartConfig?.plotOptions?.series?.dataLabels).enabled=e.state,this.chartConfig.plotOptions?.pie?.dataLabels&&(this.chartConfig.plotOptions.pie.dataLabels.enabled=e.state),this.updateChart(),this.chart?.legend.update({enabled:this.widget.isLegend},!0);break}case"showZero":this.showZeroOnAxis();break;case"isTop":this.limitSeriesAndData();break;case"chartConfig":this.showChartConfig();break}}updateChart(e=!1,i=!1){this.chart&&this.chart.update(this.chartConfig,e,!1,i)}hasOption(e){let i=this.ss.getWidgetsSettings(this.widget.dashboard);return!(!i[this.widget.name]||i[this.widget.name][e]===void 0||i[this.widget.name][e]===!1)}setYAxisMinToZero(){if(this.chartConfig.yAxis instanceof Array)for(let e=0;e{if(!n||!n.Info)return"";let l="";for(let a=0;ai.visible)??[],this.clearSeries(),this.widgetData=JSON.parse(JSON.stringify(e)),e.Error){this.showError(e.Error);return}if(e){let i=this.getMinValue(e.Data);if(i>0&&i<=10&&(this.chartConfig.yAxis.min=-10),!e.Cols)return;if(e.Cols[0].tuples.length===0&&e.Data.length!==0&&e.Cols[0].tuples.push({caption:this.i18n.get("count")}),this.parseData(e),this.widget.showZero&&this.setYAxisMinToZero(),this.firstRun){let r=this.ss.getWidgetsSettings(this.widget.dashboard);if(this.us.isEmbedded()){let n=this.route.snapshot.queryParamMap.get("hiddenSeries"),l=[];n&&(l=n.split(",")),l.forEach(a=>{this.chartConfig?.series?.[a]&&(this.chartConfig.series[a].visible=!1)})}else if(r[this.widget.name]&&r[this.widget.name].series)for(let n=0;n<(this.chartConfig?.series?.length||0);n++)r[this.widget.name].series[n]===!1&&this.chartConfig.series&&(this.chartConfig.series[n].visible=!1);this.firstRun=!1,this.onResize()}}(this.chart?.series?.length??0)<2&&!this.hasOption("isLegend")&&(this.widget.isLegend=!1,this.parent?.header?.cd?.detectChanges(),this.chart?.legend.update({enabled:!1}))}buildAxisTitles(e){if(this.chartConfig?.chart?.type!=="column")return;let i=!1,r=!1,n=this.getMDX(),l=n.indexOf("ON"),a=-1;l!==-1&&(a=n.indexOf("FROM",l),a!==-1&&(r=n.substring(l,a).toLowerCase().lastIndexOf(".members")!==-1)),a!==-1&&(l=a,a=n.indexOf("FROM",l),i=n.substring(l,a).toLowerCase().lastIndexOf(".members")!==-1),this.chartConfig.yAxis&&e.Cols[0]&&e.Cols[0].tuples&&e.Cols[0].tuples.length&&(this.chartConfig.yAxis.title={text:e.Cols[0].tuples.map(h=>h.caption||"").join(" & ")}),this.chartConfig.xAxis&&e.Cols[1]&&e.Cols[1].tuples&&e.Cols[1].tuples.length&&(this.chartConfig.xAxis.title={text:e.Cols[1].tuples.map(h=>h.caption||"").join(" & ")})}addSeries(e,i,r,n=!1){let l=i||this.chart;if(!l)return;let a=(l.options||this.chartConfig).series?.length??-1;if(e&&e.data&&e.data.length!==0){let u=!0,p=!1;for(let b=0;bparseInt(b,10)));let p=(this.chart||this.chartConfig).series?.length||-1;e.yAxis=u[p]||0}e.showInLegend=!0,l.addSeries(e,n,!1);let g=this.seriesVisibility[l.series.length-1];g!==void 0&&(l.series[l.series.length-1].visible=g)}enableStacking(){let e={plotOptions:{series:{stacking:"normal"}}};this.us.mergeRecursive(this.chartConfig,e)}getMinValue(e){let i=1/0;for(let r=0;rc.action==="setRowCount")[0],h=a&&parseInt(a.value.toString())||Ir;if(this.chartConfig?.plotOptions?.series?.stacking==="normal"||!this.chartConfig?.plotOptions?.series?.stacking){let c=e.Cols[1].tuples,g=e.Cols[0].tuples;if(this.widget.isTop)if(g.length===1){let u=!0;for(;u;){u=!1;let p;for(p=0;pthis.setElColor(n,i))}updateColors(e){this.zone.runOutsideAngular(()=>{let i=this.chart;if(!i)return;let r=i.options?.chart?.type;if(e.hcColors)if(r==="treemap"||r==="pie"){let l=i.options.plotOptions?.[r];l&&(l.colors=e.hcColors);for(let a=0;a{u.color=h,this.setElColor(u.graphic?.element,h)});let g=i.legend.allItems[l];g&&g.legendSymbol&&[g.legendSymbol.element,g.legendLine.element].forEach(u=>{u&&(u.setAttribute("fill",h),u.setAttribute("stroke",h))}),i.series[l].color=h}if(e.hcBorderColor&&Lr[r||""]?.showBorder!==!1)for(let l=0;l{let c=h.graphic?.element;c&&c.setAttribute("stroke",e.hcBorderColor)});if(e.hcBackground&&Lr[r||""]?.showBackground!==!1){let l=i.chartBackground.element;l.setAttribute("fill",e.hcBackground),l.setAttribute("stroke",e.hcBackground),i.options.chart&&(i.options.chart.backgroundColor=e.hcBackground)}if(e.hcLineColor&&Lr[r||""]?.showLines!==!1){let l=e.hcLineColor;i.yAxis.forEach(a=>{i.yAxis[0].options.minorGridLineColor=l,a.gridGroup.element.setAttribute("stroke",l),a.gridGroup.element.childNodes.forEach(h=>{h.setAttribute("stroke",l)})}),i?.xAxis.forEach(a=>{a.axisGroup.element.setAttribute("stroke",l),a.axisGroup.element.childNodes.forEach(h=>{h.setAttribute("stroke",l)})})}let n=e.hcTextColor;if(n&&Lr[r||""]?.showText!==!1){let l=a=>{if(a.labelGroup){a.labelGroup.element.setAttribute("fill",n);for(let h=0;h{a.options.color=n,a.legendItem&&(a.legendItem?.group?.element?.setAttribute("color",n),a.legendItem?.group?.element?.setAttribute("fill",n),a.legendItem?.label?.element?.setAttribute("color",n),a.legendItem?.label?.element?.setAttribute("fill",n))}),i?.series.forEach(a=>a.data.forEach(h=>{let c=h.dataLabel?.element?.children[0]?.style;c&&(c.color=n,c.fill=n)}))}})}fixData(e){for(let i=0;i{i&&l>i-1||((n.children?.length??0)>1?n.children?.forEach(a=>{a.caption=n.caption+"/"+a.caption,r.push(a)}):r.push(n))}),r}buildSeries(e){this.chartConfig.series=[];let i=this.widget.controls.find(a=>a.action.toLowerCase()==="setcolumncount"),r=this.buildAxis(e.Cols[1],i?.value||0),n=this.buildAxis(e.Cols[0]);n.forEach((a,h)=>{let c=[];r.forEach((g,u)=>{c.push({y:+e.Data[u*n.length+h],drilldown:!0,cube:e.Info?.cubeName||"",path:g.path,name:g.caption,title:g.title})}),this.fixData(c),this.addSeries({data:c,name:a.caption,format:a.format,path:a.path})});let l=this.chartConfig.xAxis;l.categories=r.map(a=>a.caption)}removeAxisListeners(){this.axisLabelListeners.forEach(e=>{e.element.removeEventListener(e.event,e.func)})}saveSeriesVisiblilityState(e,i){let r=this.ss.getWidgetsSettings(this.widget.dashboard);r[this.widget.name]||(r[this.widget.name]={});let n=r[this.widget.name];n.series||(n.series={}),n.series[e]=i,this.ss.setWidgetsSettings(r,this.widget.dashboard)}setupChart(){let e=this,i=this.wts.getDesc(this.widget.type);function r(){let n=this.value,l=e.override,a=l?.valueLabelFormat,h=e.baseType;return(l?.yAxisList[0]?.axisType==="percent"||l?.xAxis.axisType==="percent"&&(h==="barChart"||h==="barChartStacked"))&&(n=e.formatNumber(n,"#%")),n}if(this.chartConfig={accessibility:{enabled:!1},drilldown:{activeAxisLabelStyle:{color:this.tc?.hcTextColor||void 0},activeDataLabelStyle:{color:this.tc?.hcTextColor||void 0}},legend:xe({enabled:this.widget.isLegend,align:"left"},this.tc?.hcTextColor?{itemStyle:{color:this.tc?.hcTextColor}}:{}),navigation:{buttonOptions:{align:"center"}},chart:{type:i?.chart||"column",backgroundColor:this.tc?.hcBackground||"transparent",events:{redraw:n=>{e.removeAxisListeners(),n.target?.series?.forEach(l=>{e.chartConfig.chart?.type==="pie"&&e.chart?.legend.allItems.forEach(a=>{let h=u=>{this.onLegendItemHover({series:a.series,index:a.index})},c=u=>{this.onLegendItemOut({series:a.series,index:a.index})},g=a.legendItem?.group.element;g&&(g.addEventListener("mouseover",h),e.axisLabelListeners.push({event:"mouseover",element:g,func:h}),g.addEventListener("mouseout",c),e.axisLabelListeners.push({event:"out",element:g,func:c}))}),l.data.forEach((a,h)=>{let c="contextmenu",g=a.graphic?.element;if(!g)return;let u=p=>{p.preventDefault(),p.stopImmediatePropagation();let b=e._currentData?.Cols[1]?.tuples;if(!b||!b[h])return;let v=l.userOptions.path,x=b[h].path;v&&(x=v),this.bs.broadcast("contextmenu",{widget:this.widget,event:p,ctxData:{canDrillthrough:this.canDoDrillthrough,canDrill:!0,drillPath:x,drillTitle:b[h].caption||b[h].title}})};a.graphic?.element?.addEventListener(c,u),this.axisLabelListeners.push({event:c,element:g,func:u})})}),e.chartConfig?.chart?.type==="pie"?e.chart?.legend?.allItems.forEach(l=>{let a=l.dataLabel?.element;if(!a)return;let h=()=>{e.showLoading(),e.doDrillOnly(l.options.path,l.name.toString(),l.name.toString()).finally(()=>{e.hideLoading()})};a.addEventListener("click",h),this.axisLabelListeners.push({event:"click",element:a,func:h})}):e.chart?.xAxis[0]?.labelGroup?.element?.childNodes?.forEach((l,a)=>{let h=()=>{let c=e._currentData?.Cols[1]?.tuples,g=e._currentData?.Cols[1]?.tuples[0]?.children;g?.length&&(a=Math.floor(a/g?.length)),!(!c||!c[a])&&(e.showLoading(),e.doDrillOnly(c[a].path,c[a].caption||c[a].title,c[a].caption||c[a].title).finally(()=>{e.hideLoading()}))};l.addEventListener("click",h),this.axisLabelListeners.push({event:"click",element:l,func:h})})}}},credits:{enabled:!1},tooltip:{formatter(){let n=e.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=l.y;h=e.formatNumber(h,a);let c=l.point.title;c===l.point.name&&(c="");let g=(l.point.name||l.x||"")+"
"+(c?c+"
":"")+l.series.name+": "+h+"
";return l.point.percentage&&(g+=e.formatNumber(this.point.percentage,e.getDataPropByDataValue(this.series?.userOptions?.name||"")?.format||"#.##")+"%"),g}},exporting:{enabled:!1},plotOptions:{column:{borderColor:this.tc?.hcBorderColor||void 0},bar:{borderColor:this.tc?.hcBorderColor||void 0},pie:{borderColor:this.tc?.hcBorderColor,colors:this.tc?.hcColors},treemap:{colors:this.tc?.hcColors},series:{opacity:this.tc?.hcOpacity,cursor:"pointer",point:{events:{click(n){if(e.drillFilterWidgets?.length){e.doDrillFilter(n.point.path,e.drills),e.parent?.header?.cd.detectChanges();return}if(!n.point)return;if(Ae.mobile&&e._selectedPoint!==n.point){e._selectedPoint=n.point;return}let l=n.point.series.userOptions.path,a=[n.point.path];l&&a.push(l),e.showLoading(),e.doDrillthrough(a,n.point.name,n.point.category).finally(()=>{e.hideLoading()})}}},dataLabels:{color:this.tc?.hcTextColor||void 0,enabled:this.widget.showValues===!0,formatter(){let n=e.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=l.y;return h=e.formatNumber(h,a),h}},events:{hide:n=>this.saveSeriesVisiblilityState(n.target.name,n.target.visible),show:n=>this.saveSeriesVisiblilityState(n.target.name,n.target.visible)}}},yAxis:{events:{},title:{text:""},labels:{style:{color:this.tc?.hcTextColor||void 0,textOverflow:"none"},formatter:r},minorGridLineColor:this.tc?.hcLineColor||"#e6e6e6",gridLineColor:this.tc?.hcLineColor||"#e6e6e6",lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor},xAxis:{events:{},title:{text:""},labels:{style:{color:this.tc?.hcTextColor||void 0,textOverflow:"none",cursor:"pointer"}},minorGridLineColor:this.tc?.hcLineColor||"#e6e6e6",gridLineColor:this.tc?.hcLineColor||"#e6e6e6",lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor},series:[],title:{text:""}},this.setup3DChart(),this.chartConfig.navigator={outlineColor:this.tc?.hcLineColor,xAxis:{gridLineColor:this.tc?.hcLineColor},yAxis:{gridLineColor:this.tc?.hcLineColor}},this.widget.type.toLowerCase()==="combochart"&&(this.chartConfig.yAxis=[{events:{},gridLineColor:this.tc?.hcLineColor,lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor,labels:{style:{color:this.tc?.hcTextColor||void 0}}},{events:{},opposite:!0,gridLineColor:this.tc?.hcLineColor,lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor,labels:{style:{color:this.tc?.hcTextColor||void 0}}}],this.widget.overrides&&this.widget.overrides[0]&&this.widget.overrides[0]._type==="comboChart")){let l=this.widget.overrides.find(a=>a._type.toLowerCase()==="combochart")?.yAxisList;if(l&&l.length)for(let a=0;a{this.ss.setWidgetsSettings(i,this.widget.dashboard)};i[e]||(i[e]={}),i[e].themeColors||(i[e].themeColors={});let n=Lr[this.chart?.options?.chart?.type||""]||{};this.sbs.showComponent({component:import("./chunk-BRSXYDLD.js"),inputs:{widgetSettings:i[e],appearance:n,onSave:r,onUpdate:l=>this.updateColors(l),chart:this.chart}})}setupAxisMinMax(e){let i=this.override,r=this.chartConfig.yAxis,n=this.chartConfig.xAxis,l=i?.yAxisList[0];e.some(a=>a<0)||(r.min=0),(this.baseType==="barChart"||this.baseType==="barChartStacked")&&(l=i?.xAxis),l?.minValue!==void 0&&(r.min=l.minValue),l?.maxValue!==void 0&&(r.max=l.maxValue)}removeUndefinedColors(e){let i=(r,n)=>{r[n]===void 0&&delete r[n]};i(e.plotOptions?.column,"borderColor"),i(e.plotOptions?.bar,"borderColor"),i(e.plotOptions?.pie,"borderColor"),i(e.plotOptions?.treemap,"borderColor"),i(e.plotOptions?.treemap,"borderColor"),i(e.drilldown?.activeAxisLabelStyle,"color"),i(e.drilldown?.activeDataLabelStyle,"color"),i(e.legend?.itemStyle,"color"),i(e.chart,"backgroundColor"),i(e.plotOptions?.series,"opacity"),i(e.plotOptions?.series?.dataLabels,"color"),i(e.yAxis?.labels?.style,"color"),i(e.yAxis,"minorGridLineColor"),i(e.yAxis,"gridLineColor"),i(e.yAxis,"lineColor"),i(e.yAxis,"tickColor"),i(e.xAxis?.labels?.style,"color"),i(e.xAxis,"minorGridLineColor"),i(e.xAxis,"gridLineColor"),i(e.xAxis,"lineColor"),i(e.xAxis,"tickColor"),this.removeEmptyObjects(e)}removeEmptyObjects(e){let i=!0;for(;i;)i=!1,Object.keys(e).forEach(r=>{typeof e[r]=="object"&&!Array.isArray(e[r])&&(Object.keys(e[r]).length===0?(i=!0,delete e[r]):this.removeEmptyObjects(e[r]))})}setup3DChart(){this.widget?.type.toLowerCase().includes("3d")&&(this.chartConfig.chart&&(this.chartConfig.chart.options3d={enabled:!0,alpha:0,beta:8,depth:50,viewDistance:8}),this.chartConfig.plotOptions?.column&&(this.chartConfig.plotOptions.column.depth=25),this.chartConfig.plotOptions?.bar&&(this.chartConfig.plotOptions.bar.depth=25),this.chartConfig.plotOptions?.pie&&(this.chartConfig.plotOptions.pie.depth=25))}sortTuplesArray(e,i){let r=new Map;i.forEach((n,l)=>{r.set(n,l)}),e.forEach((n,l)=>{n.originalIndex=l}),e.sort((n,l)=>{let a=r.get(n.dimension),h=r.get(l.dimension);return a!==void 0&&h!==void 0?a-h:a!==void 0?-1:h!==void 0?1:0})}sortTuplesBasedOnLabels(e){if(!e.Cols[0].tuples?.length)return;let i=this.widget.overrides?.find(n=>n._type==="chartLegend");if(!i)return;let r=i.legendLabels?.split(",");r&&this.sortTuplesArray(e.Cols[0].tuples,r)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["ng-component"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Hn=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0,this.widget.type.toLowerCase()==="columnchartstacked"&&this.enableStacking()}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-column-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Zn=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.isSpinner=!1}ngOnInit(){this.widget.title=this.i18n.get("filters"),this.widget.toolbar=!0,this.widget.viewSize=this.getViewSize()}requestData(){}onHeaderButton(e){switch(e.name){case"setDefault":this.setFiltersToDefaults();break;case"byRows":this.setViewSize(0);break;case"by2columns":this.setViewSize(1);break;case"by3columns":this.setViewSize(2);break;case"by4columns":this.setViewSize(3);break;case"by5columns":this.setViewSize(4);break;case"by6columns":this.setViewSize(5);break}}setFiltersToDefaults(){for(let e=0;e{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-empty-widget"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Bu=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.isPercent=!0,this.totalSum=0,this.prevData=null,this.baseSeriesType="treemap"}ngOnInit(){super.ngOnInit(),this.totalSum=0,this.widget.overrides&&this.widget.overrides[0]&&this.widget.overrides[0].showPercentage===0&&(this.isPercent=!1);let e=this,i={levels:[{level:1,layoutAlgorithm:"sliceAndDice",dataLabels:{enabled:!0,align:"left",verticalAlign:"top",style:{fontSize:"15px",fontWeight:"bold"}}}],legend:{enabled:this.widget.isLegend},plotOptions:{series:{animation:!1,colorByPoint:!0,legendType:"point"},treemap:{dataLabels:{enabled:!0,formatter(){if(e.totalSum){let r=this.point.value/e.totalSum*100;return r=e.formatNumber(r,e.getDataPropByDataValue(this.series?.userOptions?.dimension)?.format||"#.##"),`${this.point.caption}
${r}%`}else return`${this.point.caption}`}}}},tooltip:{formatter(){let r=this.series.userOptions.caption,n=this.series.userOptions.format,l=this.point.value;return l=e.formatNumber(l,n),this.point.caption+"
"+r+": "+l+""}}};this.us.mergeRecursive(this.chartConfig,i),delete this.chartConfig.plotOptions?.series?.dataLabels}parseData(e){return Yt(this,null,function*(){this.prevData=e,e&&e.Info&&(this.dataInfo=e.Info);let i=[];if(e.Cols[0].tuples.length){if(e.Cols[0].tuples[0].children)console.error("Data converter for this treemap chart not implemented!");else{if(yield this.checkForAutoDrill(e))return;i=[];let r=0;for(let a=0;a"+parseFloat(parseFloat(e.Data[a])/r*100).toFixed(2).toString()+"%",value:parseFloat(e.Data[a]),y:parseFloat(e.Data[a]),path:e.Cols[1].tuples[a].path,name:e.Cols[1].tuples[a].caption});let n="",l="";e.Cols[0].tuples[0]&&(n=e.Cols[0].tuples[0].caption,l=e.Cols[0].tuples[0].format),this.totalSum=e.Data.map(a=>parseFloat(a)||0).reduce((a,h)=>a+h,0),this.addSeries({data:i,name:"",layoutAlgorithm:"squarified",caption:n,dimension:e.Cols[0].tuples[0].dimension,format:l,dataLabels:{enabled:!0}},void 0,void 0,!0)}this.toggleLegend(this.widget.isLegend)}})}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-tree-map"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Kn=qt(ys());var Gu=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.thirdTitle=""}ngOnInit(){super.ngOnInit();let e=this,i={plotOptions:{bubble:{minSize:"5%",maxSize:"35%",sizeBy:"width"},series:{cursor:null,point:{events:{click:null}}}},chart:{zoomType:"xy"},xAxis:{tickWidth:10,title:{enabled:!0}},tooltip:{formatter:function(){let r=this.series.userOptions.format1,n=this.series.userOptions.format2,l=this.series.userOptions.format3,a=this.x,h=this.y,c=this.point.z;r&&(a=(0,Kn.default)(a).format(r)),n&&(h=(0,Kn.default)(h).format(n)),l&&(c=(0,Kn.default)(c).format(l));let g=e.thirdTitle||"radius";return this.series.name+"
"+e.chartConfig.xAxis.title.text+":"+a+"
"+e.chartConfig.yAxis.title.text+":"+h+""+(c?"
"+g+": "+c.toString()+"":"")}}};this.us.mergeRecursive(this.chartConfig,i)}getSeriesNames(e){let i={};if(e.Cols[0].tuples.length==4)for(let r=3;r=1&&(this.chartConfig.xAxis.title.text=e.Cols[0].tuples[0].caption),e.Cols[0].tuples.length>=2&&(this.chartConfig.yAxis.title.text=e.Cols[0].tuples[1].caption),e.Cols[0].tuples.length>=3&&(this.thirdTitle=e.Cols[0].tuples[2].caption);let r=[];if(e.Cols[0].tuples[0].children)this.showError("Data converter for this bubble chart not implemented!");else{let n=e.Cols[0].tuples.length,l="",a="",h="";e.Cols[0].tuples[0]&&(l=e.Cols[0].tuples[0].format),e.Cols[0].tuples[1]&&(a=e.Cols[0].tuples[1].format),e.Cols[0].tuples[2]&&(h=e.Cols[0].tuples[2].format);let c={},g=!1,u;if(this.hasOption("isTop")){g=!0;let v=(this.widget.controls||[]).filter(function(x){return x.action==="setRowCount"})[0];u=v?v.value||Ir:Ir}let p=g?u:e.Data.length;p>e.Data.length&&(p=e.Data.length);for(let b=0;b{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-bubble-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var qn=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={};this.widget.type.toLowerCase()!=="combochart"&&(e={plotOptions:{series:{lineWidth:3,marker:{enabled:!1}}}}),this.widget.type.toLowerCase()==="linechartmarkers"&&(e={series:{marker:{enabled:!0}}}),this.us.mergeRecursive(this.chartConfig,e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Kl=qt(ys());var Xu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit();let e={series:{fillColor:"#dddddF"},plotOptions:{boxplot:{fillColor:"#fafafF",whiskerLength:0,colorByPoint:!0,lineWidth:3,stemWidth:0}},tooltip:{formatter:function(){let i=this.series.userOptions.caption1||"Minimum",r=this.series.userOptions.caption2||"Maximum",n=this.series.userOptions.format1,l=this.series.userOptions.format2,a=this.point.low,h=this.point.high;return n&&(a=(0,Kl.default)(a).format(n)),l&&(h=(0,Kl.default)(h).format(l)),this.key+"
"+r+":"+h+"
"+i+":"+a+""}}};this.us.mergeRecursive(this.chartConfig,e)}parseData(e){return Yt(this,null,function*(){let i=this.chartConfig.xAxis;i.categories=[];for(let n=0;n{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-hi-low-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Wu=qt(ys()),Yu=qt(Jn());var mf=["charts"];function xf(o,t){o&1&&le(0,"div",null,0)}var ql=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.confs=[],this.charts=[]}ngOnInit(){super.ngOnInit();let e={title:{verticalAlign:"bottom",style:{fontFamily:_h}},tooltip:{enabled:!1},legend:{enabled:!1},chart:{plotBackgroundColor:null,plotBackgroundImage:null,plotBorderWidth:0,plotShadow:!1},plotOptions:{series:{dataLabels:{enabled:!0,formatter:function(){let i=this.point.y,r=this.series.userOptions.format||"#.##";return r&&(i=(0,Wu.default)(i).format(r.replace(",","."))),i}}}},pane:{startAngle:-150,endAngle:150,background:[{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#333"]]},borderWidth:0,outerRadius:"109%"},{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#333"],[1,"#FFF"]]},borderWidth:1,outerRadius:"107%"},{},{backgroundColor:"#DDD",borderWidth:0,outerRadius:"105%",innerRadius:"103%"}]}};this.chartConfig.yAxis={minorTickInterval:"auto",minorTickWidth:1,minorTickLength:10,minorTickPosition:"inside",minorTickColor:"#666",tickWidth:2,tickPosition:"inside",tickLength:10,tickColor:"#666"},this.chartConfig.chart?.type==="solidgauge"&&(e.pane={center:["50%","85%"],size:"140%",startAngle:-90,endAngle:90,background:[{backgroundColor:"#EEE",innerRadius:"60%",outerRadius:"100%",shape:"arc"}]}),this.us.mergeRecursive(this.chartConfig,e)}ngAfterViewInit(){}createChart(){let e=this.chartsEl?.toArray().map(i=>i.nativeElement);this.charts=[],this.confs.forEach((i,r)=>{i.chart&&(i.chart.renderTo=e?.[r]),this.charts.push(Yu.default.chart(i))})}retrieveData(e){let i;if(this.hideLoading(),this.charts.forEach(r=>{for(;r.series.length>0;)r.series[0].remove()}),this.widgetData=JSON.parse(JSON.stringify(e)),e.Error){this.showError(e.Error);return}if(e){if(!e.Cols)return;e.Cols[0].tuples.length===0&&e.Data.length!==0&&e.Cols[0].tuples.push({caption:this.i18n.get("count")}),this.parseData(e)}}parseData(e){return Yt(this,null,function*(){if(this.confs.length===0){for(let i=0;ia.dataValue===e.Cols[0].tuples[i].dimension);n&&n.label&&n.label!=="$auto"&&(r=n.label),this.confs.push(this.us.mergeRecursive({},this.chartConfig));let l=this.confs[this.confs.length-1];l.title&&(l.title.text=r)}this.cd.markForCheck(),this.cd.detectChanges(),setTimeout(()=>{this.createChart(),this.parseData(e)});return}for(let i=0;in.max&&(p=n.max),n.plotBands=[],u!==n.min&&n.plotBands.push({from:n.min,to:u,color:"rgba(255, 0, 0, 0.4)",zIndex:5}),p!==n.max&&n.plotBands.push({from:p,to:n.max,color:"rgba(255, 0, 0, 0.4)",zIndex:5}),l.targetValue){let b=parseFloat(l.targetValue);n.plotLines=[{value:b,color:"rgba(0, 180, 0, 0.4)",width:3,zIndex:5}]}}let a="";this.widget.properties&&this.widget.properties.format&&(a=this.widget.properties.format),e.Cols[0].tuples[i].format&&(a=e.Cols[0].tuples[i].format);let h=e.Cols[0].tuples[i].caption;l&&l.label&&l.label!=="$auto"&&(h=l.label),this.addSeries({data:[e.Data[i]||0],name:h,format:a},this.charts[i],this.confs[i]),this.charts[i]&&this.charts[i].update(this.confs[i])}})}onResize(){super.onResize(),this.charts.forEach(e=>e.reflow())}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-speedometer-chart"]],viewQuery:function(i,r){if(i&1&&$i(mf,5),i&2){let n;Ji(n=Qi())&&(r.chartsEl=n)}},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[["charts",""]],template:function(i,r){i&1&&oe(0,xf,2,0,"div",null,ne),i&2&&ae(r.confs)},styles:["[_nghost-%COMP%]{display:flex}div[_ngcontent-%COMP%]{flex:1 1 100%}"]});let o=t;return o})();var Vu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={plotOptions:{series:{colorByPoint:!1},area:{stacking:"normal",marker:{enabled:!1}}}};this.us.mergeRecursive(this.chartConfig,e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-area-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Uu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={plotOptions:{series:{cursor:null,point:{events:{click:null}}},pie:{allowPointSelect:!1,dataLabels:{enabled:!0,color:"#000000",connectorColor:"#000000",formatter:function(){return""+this.point.name+": "+this.series.options.size}}}},tooltip:{formatter:function(){return this.key+": "+this.y+"
"}}};this.us.mergeRecursive(this.chartConfig,e)}parseData(e){return Yt(this,null,function*(){let i=[];this.clearSeries();let r=Math.max.apply(null,e.Data);for(let n=0;n{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-area-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Rr=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnValues=!0;let e={series:{allowPointSelect:!0,stickyTracking:!1}};this.chartConfig.plotOptions||(this.chartConfig.plotOptions={}),this.us.mergeRecursive(this.chartConfig.plotOptions,e),(this.widget.type==="donutChart"||this.widget.type==="donutChart3D")&&(e={plotOptions:{pie:{innerSize:"20%"}}},this.us.mergeRecursive(this.chartConfig,e)),(this.widget.type==="pieChart3D"||this.widget.type==="donutChart3D")&&(e={chart:{options3d:{enabled:!0,alpha:55,beta:0}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",depth:35}}},this.us.mergeRecursive(this.chartConfig,e));let i=this,r={plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!0,formatter:function(){let n=i.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=this.point.name,c=i.formatNumber(this.y,a);i.widget.showValues||(c=""),i.widget["btn.ShowAnnotations"]===!1&&(h="");let g=i.formatNumber(this.point.percentage,i.getDataPropByDataValue(this.series?.userOptions?.name)?.format||"#.##")+"%";return i.widget["btn.ShowPercents"]||(g=""),[h,c,g].filter(u=>u).join(", ")}},showInLegend:!0},series:{dataLabels:{formatter:function(){let n=this,l=n.series.options.format,a=n.y;return l&&(a=i.formatNumber(a,l)),n.key+", "+a}},point:{events:{legendItemClick:function(){let n=this.path,l=this.name,a=this.visible;i.chart?.series.forEach(h=>{h.data.forEach(c=>{(n&&c.path===n||l&&c.name===l)&&(c!==this&&c.update({visible:!a}),a&&c.setState("normal"))})})},mouseOut:function(){let n=[],l=this.series,a=this.index;l.chart.series.forEach(h=>{h!==l&&n.push(h.points[a])}),n.forEach(h=>{h.setState("")})},mouseOver:function(){let n=[],l=this.series,a=this.index;l.chart.series.forEach(h=>{h!==l&&n.push(h.points[a])}),n.forEach(h=>{h.setState("hover")})}}}}}};this.us.mergeRecursive(this.chartConfig,r),this.chartConfig?.plotOptions?.series?.dataLabels||(this.chartConfig.plotOptions.series.dataLabels={}),(this.chartConfig?.plotOptions?.pie?.dataLabels).enabled=this.isValuesVisible(),this.widget.showValues,this.updateChart(!0,!0)}isValuesVisible(){return this.widget.showValues||this.widget["btn.ShowAnnotations"]}onHeaderButton(e){(e.name==="ShowValues"||e.name==="btn.ShowAnnotations"||e.name==="btn.ShowPercents")&&((this.chartConfig.plotOptions?.pie?.dataLabels).enabled=this.isValuesVisible(),this.updateChart(!0),this.chart?.series.forEach((i,r)=>{r!==0&&(i.options.showInLegend=!1)}),(this.chart?.series.length??0)>1&&this.chartConfig.legend&&this.chart?.legend.update(this.chartConfig.legend,!0)),super.onHeaderButton(e)}addSeries(e,i,r,n=!1){let l=this._currentData?.Cols[0]?.tuples?.length||1,a=this._currentData?.Cols[1]?.tuples?.length||1;if(l!==1){let h=100/l,c=this.chart?.series.length||0;e.center=[(h/2+c*h).toString()+"%","50%"],c>a&&(e.showInLegend=!1)}super.addSeries(e,i,r,n),this.chart&&this.chart.series.length>1&&(this.chart.series[this.chart.series.length-1].options.showInLegend=!1)}updateSeriesVisibilityAndPositionForMultiplePies(){this.chart?.series.forEach((e,i)=>{e.options.showInLegend=i===0})}onLegendItemHover(e){super.onLegendItemHover(e),(this.chart?.series?.length??0)>1&&this.chart?.series.forEach(i=>{i!==e.series&&i.setState("inactive",!0)}),this.chartConfig.plotOptions.series.point.events.mouseOver.call(e)}onLegendItemOut(e){super.onLegendItemOut(e),(this.chart?.series?.length??0)>1&&this.chart?.series.forEach(i=>{i!==e.series&&i.setState("normal",!0)}),this.chartConfig.plotOptions.series.point.events.mouseOut.call(e)}parseData(e){return Yt(this,null,function*(){yield eh(t.prototype,this,"parseData").call(this,e),this.toggleLegend(this.widget.isLegend)})}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var $l=qt(ys());var Hu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.chartConfig.plotOptions={series:{lineWidth:3,marker:{enabled:!0}}};let e=this;this.chartConfig.tooltip={formatter(){let i=this.series.userOptions,r=i.format1,n=i.format2,l=this.y,a=this.x;r&&(l=(0,$l.default)(l).format(r)),n&&(a=(0,$l.default)(a).format(n));let h=e.chartConfig.yAxis,c=e.chartConfig.xAxis;return h.title?.text+":"+l+"
"+c.title?.text+":"+a+""}},this.updateChart()}parseData(e){return Yt(this,null,function*(){let i="",r="";if(e.Cols[0].tuples.length>=1){let l=this.chartConfig.xAxis;l?.title&&(l.title.text=e.Cols[0].tuples[0].caption),i=e.Cols[0].tuples[0].format}if(e.Cols[0].tuples.length>=2){let l=this.chartConfig.yAxis;l?.title!==void 0&&(l.title.text=e.Cols[0]?.tuples[1]?.caption),i=e.Cols[0].tuples[1].format}this.chartConfig.series=[];let n=[];if(e.Cols[0].tuples[0].children)this.showError("Data converter for this xy chart not implemented!");else{for(let l=0;l{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Zu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnValues=!0;let e=this;function i(){let n,l,a,h=this,c=new Date(h.x),g=c.toLocaleDateString();if(c.getHours()!==0&&c.getMinutes()!==0&&c.getSeconds()!==0&&(g+=" "+c.toLocaleTimeString()),h.series)return l=h.series.options.format,a=h.y,a=e.formatNumber(a,l),n=""+g+'
\u25CF'+h.series.name+": "+a,n;n=""+g+"
";for(let u=h.points.length-1;u>-1;u--)l=h.points[u].series.options.format,a=h.points[u].y,a=e.formatNumber(a,l),n+='\u25CF'+h.points[u].series.name+": "+a+"
";return n}let r={options:{chart:{zoomType:"x"},tooltip:{formatter:i},navigator:{enabled:!0},scrollbar:{enabled:!1}},series:[],useHighStocks:!0,loading:!0};this.us.mergeRecursive(this.chartConfig,r)}parseData(e){return Yt(this,null,function*(){e&&e.Info&&(this.dataInfo=e.Info),this.chartConfig.yAxis.min=this.getMinValue(e.Data),this.clearSeries();let i=[],r,n;if(e.Cols[0].tuples[0].children){let l=0;for(let a=0;a=0;l--){for(i=[],n=0;n1&&(h=parseInt(a[1])),l=this.addDays(l,parseInt(r)),h&&l.setSeconds(h),Date.parse(l)}else return this.getDate(e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Jl=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0,this.widget.type.toLowerCase()==="barchartstacked"&&this.enableStacking()}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-bar-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Ku=qt(Jn());function yf(o,t){if(o&1&&(Lt(0,"div",2)(1,"div",4),ie(2),kt(),le(3,"span")(4,"span")(5,"span")(6,"span"),Lt(7,"div",4),ie(8),kt()()),o&2){let s=Nt().$implicit;Dt(2),Te(s.rangeLower||"0"),Dt(6),Te(s.rangeUpper||"0")}}function bf(o,t){if(o&1&&(Lt(0,"div"),ie(1),kt()),o&2){let s=Nt().$implicit;je("align-left",s.display==="label"),Dt(),ms(" ",s.label," ")}}function vf(o,t){if(o&1&&(Lt(0,"td"),$s(1,yf,9,2,"div",2)(2,bf,2,3,"div",3),kt()),o&2){let s,e=t.$implicit;je("plotbox-cell",e.display==="plotBox"),Dt(),Js((s=e.display)==="plotBox"?1:2)}}function Cf(o,t){if(o&1&&(Lt(0,"div"),le(1,"img",7),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Dt(),gs("src",i.data[e][s],fs)}}function _f(o,t){if(o&1&&le(0,"span",10),o&2){let s=Nt(2).$index,e=Nt().$index,i=Nt();Ee("left",i.targets[e][s],"%")}}function wf(o,t){if(o&1&&(Lt(0,"div",8),$s(1,_f,1,2,"span",9),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Ee("background-color",i.color)("width",i.data[e][s],"%"),Dt(),Js(i.targets[e][s]?1:-1)}}function Sf(o,t){if(o&1&&(Lt(0,"div"),ie(1),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Dt(),ms(" ",i.data[e]?i.data[e][s]:""," ")}}function Mf(o,t){if(o&1&&(Lt(0,"td"),$s(1,Cf,2,1,"div")(2,wf,2,5,"div",6)(3,Sf,2,1,"div"),kt()),o&2){let s,e=t.$implicit,i=Nt(2);Ee("width",e.display==="plotBox"?100/i.props.length*2:null,"%"),je("align-left",e.display==="label")("align-center",e.display==="itemNo"),Dt(),Js((s=e.display)==="trendLine"?1:s==="plotBox"?2:3)}}function Ef(o,t){if(o&1&&(Lt(0,"tr"),oe(1,Mf,4,7,"td",5,ne),kt()),o&2){let s=Nt();Dt(),ae(s.props)}}function Tf(o,t){if(o&1&&(Lt(0,"td"),ie(1),kt()),o&2){let s=t.$implicit;Dt(),ms(" ",s," ")}}function Af(o,t){if(o&1&&(Lt(0,"tr",1),oe(1,Tf,2,1,"td",null,ne),kt()),o&2){let s=Nt();Dt(),ae(s.footerValues)}}var qu=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.widget={},this.columns=[],this.rows=[],this.data=[],this.targets=[],this.color="",this.props=[],this.hasFooter=!1,this.footerValues=[],this.san=$t(uh),this.sbs=$t(zr),this.totalByColumn={},this.originalData=[]}ngOnInit(){super.ngOnInit(),this.color=Ku.default.getOptions().colors?.[0],this.tc&&this.tc.hcColors&&(this.color=this.tc.hcColors[0]),this.subColorsConfig=this.bs.subscribe("charts:update-colors",e=>this.updateColors(e)),this.prepareProps(),this.props?.length||this.override?.columns?.length&&(this.props=this.override.columns)}ngOnDestroy(){this.subColorsConfig?.unsubscribe(),super.ngOnDestroy()}retrieveData(e){super.retrieveData(e),!e.Error&&(this.originalData=e.Data,this.columns=e.Cols[0].tuples,this.rows=e.Cols[1]?.tuples||[{}],this.prepareData(e.Data),this.cd.detectChanges())}prepareProps(){this.props=this.widget.dataProperties,this.props&&this.props.forEach(e=>e.label=e.label.replace("\\n",` -`))}onHeaderButton(e){switch(super.onHeaderButton(e),e.name){case"chartConfig":this.showChartConfig();break}}getValue(e,i,r,n,l){switch(r.display||""){case"itemNo":return(i+1).toString();case"label":return this.rows[i].caption;case"":case"value":case"plotBox":{let a=r.format,h=this.getPropValue(e,i,r);if(r.display==="plotBox"){let c=r.rangeLower||0,g=r.rangeUpper||0;return n!==void 0&&(c=n),l!==void 0&&(g=l),r.showAs==="target%"?parseFloat(h)/parseFloat(this.getPropValue(e,i,r,"targetValue"))*100:g-c===0?0:(h-c)/(g-c)*100}else{if(h==="")return"";if(r.showAs==="target%"){let c=this.getPropValue(e,i,r,"targetValue");return this.formatNumber(h/c,a)}return r.showAs==="sum%"?this.formatNumber(h/this.totalByColumn[r.dataValue],a||"#.##%"):this.formatNumber(h,a)}}case"trendLine":{let a=this.getColumnIndex(r.dataValue),h="";return a!==-1&&(h=e[i*this.columns.length+a]),this.getSvgForTrendLine(r,h)}}return 0}prepareFooter(){if(this.hasFooter=this.props.some(e=>e.summary==="sum"),this.footerValues=[],!!this.hasFooter)for(let e=0;e{this.ss.setWidgetsSettings(i,this.widget.dashboard)};i[e]||(i[e]={}),i[e].themeColors||(i[e].themeColors={}),this.sbs.showComponent({component:import("./chunk-BRSXYDLD.js"),inputs:{appearance:{showSeries:[!0,!1,!1,!1,!1,!1,!1,!1,!1,!1],showBackground:!1,showLines:!1,showText:!1,showBorder:!1},widgetSettings:i[e],onSave:r,onUpdate:n=>this.updateColors(n)}})}getPropValue(e,i,r,n="dataValue"){let l=!isNaN(parseFloat(r[n])),a=r[n];if(!l){let h=this.getColumnIndex(r[n]);h===-1?a=0:a=e[i*this.columns.length+h]}return a}getColumnIndex(e){return this.columns.findIndex(r=>r.dimension?e.split("/").includes(r.dimension):/^Properties\(\"([^)]+)\"\)/.exec(r.valueID)?.[1]===e)}prepareData(e){let i=[];for(let r=0;r(g+a)%this.columns.length===0);l=Math.max(...h),n=Math.min(...h)}n=0,i.push({min:n,max:l}),this.props[r].rangeLower||(this.props[r].rangeLower=n),this.props[r].rangeUpper||(this.props[r].rangeUpper=l)}this.preparePercentageSums(e),this.data=[],this.targets=[];for(let r=0;r{if(!u)return 0;let p=parseFloat(u);return isNaN(p)?0:p}):typeof i=="number"?n=[i]:Array.isArray(i);let l=Math.max(...n),a=Math.min(...n),h=(n.length-1)*4,c=` +`);this.generateTileUrlFunction_?this.setTileUrlFunction(xu(t,this.tileGrid),s):this.setKey(s)}tileUrlFunction(t,s,e){}useTile(t,s,e){let i=us(t,s,e);this.tileCache.containsKey(i)&&this.tileCache.get(i)}},bu=Gl;var Xl=class extends ns{constructor(t){t=t||{};let s=Object.assign({},t);delete s.preload,delete s.useInterimTilesOnError,super(s),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(Dr.PRELOAD)}setPreload(t){this.set(Dr.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Dr.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Dr.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}},vu=Xl;var Wl=class extends vu{constructor(t){super(t)}createRenderer(){return new lu(this)}},Yl=Wl;var Vl=class extends bu{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:uf,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:Pn,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(let t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,s){let e=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==e?s:{});for(let i in this.tileCacheForProjection){let r=this.tileCacheForProjection[i];r.expireCache(r==e?s:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Ni(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!Ni(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){let s=this.getProjection();if(this.tileGrid&&(!s||Ni(s,t)))return this.tileGrid;let e=_t(t);return e in this.tileGridForProjection||(this.tileGridForProjection[e]=On(t)),this.tileGridForProjection[e]}getTileCacheForProjection(t){let s=this.getProjection();if(!s||Ni(s,t))return this.tileCache;let e=_t(t);return e in this.tileCacheForProjection||(this.tileCacheForProjection[e]=new Rn(this.tileCache.highWaterMark)),this.tileCacheForProjection[e]}createTile_(t,s,e,i,r,n){let l=[t,s,e],a=this.getTileCoordForTileUrlFunction(l,r),h=a?this.tileUrlFunction(a,i,r):void 0,c=new this.tileClass(l,h!==void 0?pt.IDLE:pt.EMPTY,h!==void 0?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=n,c.addEventListener(ut.CHANGE,this.handleTileChange.bind(this)),c}getTile(t,s,e,i,r){let n=this.getProjection();if(!n||!r||Ni(n,r))return this.getTileInternal(t,s,e,i,n||r);let l=this.getTileCacheForProjection(r),a=[t,s,e],h,c=In(a);l.containsKey(c)&&(h=l.get(c));let g=this.getKey();if(h&&h.key==g)return h;let u=this.getTileGridForProjection(n),p=this.getTileGridForProjection(r),b=this.getTileCoordForTileUrlFunction(a,r),v=new Pr(n,u,r,p,a,b,this.getTilePixelRatio(i),this.getGutter(),(x,m,E,L)=>this.getTileInternal(x,m,E,L,n),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return v.key=g,h?(v.interimTile=h,v.refreshInterimChain(),l.replace(c,v)):l.set(c,v),v}getTileInternal(t,s,e,i,r){let n=null,l=us(t,s,e),a=this.getKey();if(!this.tileCache.containsKey(l))n=this.createTile_(t,s,e,i,r,a),this.tileCache.set(l,n);else if(n=this.tileCache.get(l),n.key!=a){let h=n;n=this.createTile_(t,s,e,i,r,a),h.getState()==pt.IDLE?n.interimTile=h.interimTile:n.interimTile=h,n.refreshInterimChain(),this.tileCache.replace(l,n)}return n}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(let s in this.tileCacheForProjection)this.tileCacheForProjection[s].clear();this.changed()}}setTileGridForProjection(t,s){let e=ue(t);if(e){let i=_t(e);i in this.tileGridForProjection||(this.tileGridForProjection[i]=s)}}clear(){super.clear();for(let t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}};function uf(o,t){o.getImage().src=t}var Cu=Vl;var Ul=class extends Cu{constructor(t){t=t||{};let s=t.projection!==void 0?t.projection:"EPSG:3857",e=t.tileGrid!==void 0?t.tileGrid:fu({extent:Fn(s),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:s,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:e,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}},_u=Ul;var pf='© OpenStreetMap contributors.',Hl=class extends _u{constructor(t){t=t||{};let s;t.attributions!==void 0?s=t.attributions:s=[pf];let e=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",i=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:s,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:e,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:i,wrapX:t.wrapX,zDirection:t.zDirection})}},Zl=Hl;var ff=["popup"],gf=["tooltip"],Nn=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.tooltipData={visible:!1,content:"",name:"",items:[]},this.preventColFilteringBasedOnDataProperties=!0,this.CLUSTER_RANGE=1,this.isRGBColor=!1,this._selectedFeature=null,this.featureOverlay=null,this.mapData=null,this.hintTimeout=null,this.popupElement=null,this.polyData=null,this.isGeoJSON=!1}ngOnInit(){super.ngOnInit(),this.popupElement=this.popupEl.nativeElement,this.tooltipData.name="",this.tooltipData.items=[],this.widget.isMap=!0,this.requestPolygons(),this.us.isEmbedded()&&(this.onMessage=e=>{let i=e.data;switch(i.type){case"map.applyStyle":this.applyStyle(i);break}},window.addEventListener("message",this.onMessage))}applyStyle(e){let{selector:i,style:r,value:n}=e,l=this.map?.getTargetElement();(l&&l.querySelectorAll(i))?.forEach(h=>{h.style[r]=n})}ngAfterViewInit(){this.createMap()}ngOnDestroy(){this.us.isEmbedded()&&window.removeEventListener("message",this.onMessage),this.tooltip?.nativeElement?.remove(),super.ngOnDestroy()}createMap(){let e=this.ss.getAppSettings(),i;i=this.getDataPropValue("tileUrl");let r=new Zl({wrapX:!0,url:i}),n=new wd({layers:[new Yl({source:r})],controls:xr({attributionOptions:{collapsible:!1}}),target:this.el.nativeElement,view:new De({center:[0,0],zoom:2})});n.getViewport().addEventListener("mouseout",l=>{this.hideTooltip()},!1),this.map=n,this.initialize()}hideTooltip(){this.hintTimeout&&clearTimeout(this.hintTimeout),this.tooltip&&(this.tooltip.nativeElement.style.display="none")}rejectTooltipCreation(){clearTimeout(this.hintTimeout)}showTooltip(e,i,r){this.hintTimeout&&clearTimeout(this.hintTimeout),this.hintTimeout=setTimeout(()=>{let n=this.tooltip?.nativeElement,l=this.getDataPropValue("tooltipStyles");if(l){let a=JSON.parse(l);for(let h in a)n.style.setProperty(h,a[h])}n.innerHTML=e,n.style.left=i.toString()+"px",n.style.top=r.toString()+"px",n.style.display="block"},600)}showPopup(){let e=this.popupElement,i=this.getDataPropValue("popupStyles");if(i){let r=JSON.parse(i);for(let n in r)e.style.setProperty(n,r[n])}this.popupElement&&(this.popupElement.style.visibility="hidden"),setTimeout(()=>{this.popupElement&&(this.popupElement.style.visibility="visible"),this.map?.render()},0)}hidePopup(){this.popupElement&&(this.popupElement.style.visibility="hidden")}doDrillUp(){this.hideTooltip(),this.hidePopup(),this.doDrill()}displayAsPivot(e){this.hideTooltip(),this.rejectTooltipCreation(),this.widget.type==="pivot"?(this.widget.isDrillthrough=!1,this.restoreWidgetType()):(this.widget.pivotMdx=e||this.getMDX(),this.changeWidgetType("pivot"))}requestPolygons(){let e=this.widget.name;this.widget.name.indexOf(".")===-1&&(e+=".js"),e=this.getDataPropValue("coordsJsFile")||e;let r=(this.ss.serverSettings.DefaultApp||"/csp")+"/"+e;this.ds.getFile(r).then(n=>this.onPolyFileLoaded(n)).finally(()=>this.hideLoading())}onPolyFileLoaded(e){this.isGeoJSON=!1;try{let n=JSON.parse(e);this.polyData=n,this.isGeoJSON=!0,this.buildPolygons();return}catch{}var i={};e="("+e+")(polys)",window["eval"](e),this.polyData=i,this.buildPolygons()}onPolyJSONFileLoaded(e){this.polyData=e,this.buildPolygons()}getFeatureColor(e,i){let r=this.mapData.Cols[1].tuples.filter(b=>b.caption===e);if(r.length===0)return;r=r[0];let n,l=this.mapData.Cols[1].tuples.indexOf(r),a=this.mapData.Cols[0].tuples.length,h="ColorExplicitValue";h=this.getDataPropValue("colorProperty")||h;let c;isNaN(parseInt(h,10))?c=this.mapData.Cols[0].tuples.filter(b=>b.caption===h):c=this.mapData.Cols[0].tuples.slice(h,1),c=c[0];let g=this.mapData.Cols[0].tuples.indexOf(c),u=this.mapData.Data[l*a+g];if(isNaN(parseFloat(u)))return u.toString().indexOf("rgb")!==-1&&u.toString().indexOf("rgba")===-1&&(u=u.replace("rgb","rgba"),u=u.substr(0,u.length-1)+", 0)"),n=u.split(","),n[3]="0.4)",n.join(",");{let b=this.getDataPropValue("colorFormula")||"hsl((255-x)/255 * 120, 100%, 50%)";this.isRGBColor&&(b="rgb(x, 255-x, 0)");let v=b.indexOf("("),x=b.substring(0,v).toLowerCase();b=b.substring(v+1,b.length-1),n=b.split(",");let m=i||0;var p;for(let E=0;E255&&(p=255),p<0&&(p=0),n[E]=Math.floor(p).toString()}return x.indexOf("a")===-1?x+"a("+n.join(",")+", 0.45)":x+"("+n.join(",")+")"}}centerView(e,i){let r,n,l;if(this.widget.properties&&(r=parseFloat(this.widget.properties.latitude),n=parseFloat(this.widget.properties.longitude),l=parseFloat(this.widget.properties.zoom)),this.drills.length===0&&!isNaN(r)&&!isNaN(n)&&!isNaN(l)&&r!==void 0&&n!==void 0&&l!==void 0)this.map?.getView().setCenter(ji([n,r],"EPSG:4326","EPSG:900913")),this.map?.getView().setZoom(l);else{if(Math.abs(e[0]-i[0])<1e-8&&Math.abs(e[1]-i[1])<1e-8)return;let a=ji([e[0],e[1]],"EPSG:4326","EPSG:900913"),h=ji([i[0],i[1]],"EPSG:4326","EPSG:900913");this.map?.getView().fit([a[0],a[1],h[0],h[1]],this.map?.getSize())}this.getDataPropValue("fixMaxZoom")==="1"&&this.map?.getView().setMaxZoom(this.map?.getView().getZoom()||1),this.getDataPropValue("fixMinZoom")==="1"&&this.map?.getView().setMinZoom(this.map?.getView().getZoom()||1),this.getDataPropValue("maxZoom")&&this.map?.getView().setMaxZoom(parseFloat(this.getDataPropValue("maxZoom")||"1"))}buildPolygons(){let e,i,r,n,l,a,h,c,g,u,p,b;this.isRGBColor=!1;let v=this.getDataPropValue("colorProperty")||"ColorHSLValue",x=this.getDataPropValue("coordsProperty")||"CoordKeyValue";if(!this.polyData||!this.map||!this.mapData)return;let m=[];h=this.mapData.Cols[0].tuples.length;let E=Number.MAX_VALUE,L=Number.MIN_VALUE,S=0;for(isNaN(parseInt(v))?(b=this.mapData.Cols[0].tuples.filter(I=>I.caption===v),S=this.mapData.Cols[0].tuples.indexOf(b[0]),S===-1&&(this.isRGBColor=!0,v="ColorRGBValue",b=this.mapData.Cols[0].tuples.filter(I=>I.caption===v),S=this.mapData.Cols[0].tuples.indexOf(b[0]))):S=parseInt(this.widget.properties.colorProperty,10)||0,c=0;cL&&(L=g);let w=[99999999,99999999],R=[-99999999,-99999999],O=0;for(p=-1,b=this.mapData.Cols[0].tuples.filter(I=>I.caption===x),b.length===0&&(b=this.mapData.Cols[0].tuples.filter(I=>I.caption==="Key")),b.length!==0&&(p=this.mapData.Cols[0].tuples.indexOf(b[0])),c=0;cR[0]&&(R[0]=parseFloat(N)),parseFloat(i)>R[1]&&(R[1]=parseFloat(i)),k.push(z.getCoordinates())}if(y.push(k),y.length>300){let T=[];for(n=0;nM.caption===D);if(y.length!==0){let M=this.mapData.Cols[0].tuples.indexOf(y[0]);M!==-1&&(A=this.mapData.Data[c*h+M])}}let C=Xi;if(this.isGeoJSON){switch(u.type.toLowerCase()){}C=Tl}let d=new Fa({geometry:new C(P),key:I,title:A,dataIdx:c*h,path:this.mapData.Cols[1].tuples[c].path,desc:this.mapData.Cols[1].tuples[c].title}),f;if(isNaN(parseFloat(A))||(A=this.formatNumber(A,"")),F){let y=JSON.parse(F),M=y.size||12,k=y.font||"Calibri,Arial,sans-serif",T=y.color||"#000",z=y.stroke||"#fff",N=y.strokeWidth||2;f=new vr({font:`${M}px ${k}`,fill:new hi({color:T}),stroke:new ci({color:z,width:N}),text:A+""})}g=this.mapData.Data[c*h+S],d.setStyle(new Ze({zIndex:0,fill:new hi({color:this.getFeatureColor(I,(g-E)*255/(L-E))||"none"}),stroke:new ci({color:"rgba(0, 0, 0, 0.3)",width:1}),text:f})),m.push(d)}this.featureOverlay.getSource().clear(),this.polys.clear(),this.polys.addFeatures(m),setTimeout(()=>{this.centerView(w,R)})}retrieveData(e){if(setTimeout(()=>{this.map?.updateSize()},0),e.Error){this.showError(e.Error);return}e.Info&&(this.dataInfo=e.Info),this.hideTooltip(),this.markers.clear(),this.mapData=e,this.buildPolygons();let i=[Number.MAX_VALUE,Number.MAX_VALUE],r=[-Number.MAX_VALUE,-Number.MAX_VALUE];if(e&&this.map){let n=e.Cols[0].tuples.length,l=0,a=[],h="latitude";this.widget.properties&&this.widget.properties.latitudeProperty&&(h=this.widget.properties.latitudeProperty);let c="longitude";this.widget.properties&&this.widget.properties.longitudeProperty&&(c=this.widget.properties.longitudeProperty);let g=-1,u=-1,p=e.Cols[0].tuples.filter(v=>v.caption.toLowerCase()===h);if(p.length!==0&&(u=e.Cols[0].tuples.indexOf(p[0])),p=e.Cols[0].tuples.filter(v=>v.caption.toLowerCase()===c),p.length!==0&&(g=e.Cols[0].tuples.indexOf(p[0])),u===-1||g===-1)return;let b=e.Cols[1].tuples;b[0]?.children&&(b=b[0]?.children);for(let v=0;vr[1]&&(r[1]=parseFloat(m.toString())),parseFloat(x.toString())>r[0]&&(r[0]=parseFloat(x.toString())),i[0]==r[0]&&(i[0]-=.25,r[0]+=.25),i[1]==r[1]&&(i[1]-=.25,r[1]+=.25),a.push(R),l+=n}a.length!==0&&(this.markers.addFeatures(a),this.centerView(i,r)),this.centerView(i,r)}}initialize(){this.iconStyle=new Ze({zIndex:100,image:new hs({anchor:[.5,40],anchorXUnits:"fraction",anchorYUnits:"pixels",opacity:1,src:"assets/img/map-marker-red.png"})});let e=this.map,i=new Ze({zIndex:0,stroke:new ci({color:"rgba(0, 0, 0, 0.5)",width:1})});this.polyStyle=i,this.hoverStyle=new Ze({zIndex:1,stroke:new ci({color:"blue",width:2})}),this.polys=new Ar({features:[]});let r=new Tr({source:this.polys,style:this.polyStyle});r.setZIndex(1),this.map?.addLayer(r),this.markers=new Ar({features:[]});let n=new se;this.featureOverlay=new Tr({map:this.map,source:new Ar({features:n,useSpatialIndex:!1}),style:this.hoverStyle,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.featureOverlay.setZIndex(10),this.featureOverlay.setMap(this.map),this.markers&&(r=new Tr({source:this.markers,style:this.iconStyle}),r.setZIndex(100),this.map?.addLayer(r)),this.map?.on("click",l=>this.onMapClick(l)),this.map?.on("pointermove",l=>this.onPointerMove(l))}onPointerMove(e){if(Ae.mobile&&e.originalEvent.touches&&e.originalEvent.touches.length!==1)return;this.hideTooltip();let i=this.map?.forEachFeatureAtPixel(e.pixel,(n,l)=>n);if(i){let n=i.get("dataIdx"),l,a="TooltipValue",h="",c=this.getDataProp("tooltipProperty");c&&(a=c.dataValue,h=c.format),l=this.getDataByColumnName(this.mapData,a||"Name",n,h),!l&&this.widget.properties?.polygonTitleProperty&&i.get("title")&&(l=i.get("title")),l||(l=this.getDataByColumnName(this.mapData,"Name",n)),l||(l=(this.mapData.Cols[1].tuples[0]?.children||this.mapData.Cols[1].tuples)[Math.floor(n/this.mapData.Cols[0].tuples.length)].caption||""),l&&this.showTooltip(l,e.pixel[0],e.pixel[1])}if(e.dragging){this.hideTooltip();return}let r=this.map?.getEventPixel(e.originalEvent);if(r){let n=this.map?.hasFeatureAtPixel(r);(this.map?.getTarget()).style.cursor=n?"pointer":""}this.featureOverlay?.getSource().clear(),i&&this.featureOverlay?.getSource().addFeature(i)}getTooltipData(e){if(!this.mapData)return;let i=[],r=this.mapData.Cols[1].tuples.filter(c=>c.caption===e);if(r.length===0)return;r=r[0];let n=this.mapData.Cols[1].tuples.indexOf(r),l=this.mapData.Cols[0].tuples.length,a=this.mapData.Cols[0].tuples.filter(c=>c.caption==="tooltip");if(a.length===0)return;a=a[0];let h=this.mapData.Cols[0].tuples.indexOf(a);return i.push({label:"",value:this.mapData?.Data[n*l+h].split(":")[1]||""}),i}onMapClick(e){if(this.hidePopup(),Ae.mobile&&e.originalEvent.touches&&e.originalEvent.touches.length!==1)return;let i=this.map?.forEachFeatureAtPixel(e.pixel,(n,l)=>n);if(i){if(this.hideTooltip(),Ae.mobile&&this._selectedFeature!==i){this._selectedFeature=i,this.onPointerMove(e);return}this.doDrill(i.get("path"),i.get("name")||i.get("title"),void 0,()=>{r(i)})}else this.hideTooltip();let r=n=>{let l=n.get("dataIdx"),a,h,c="PopupValue",g="",u=this.getDataProp("popupProperty");if(u&&(c=u.dataValue,g=u.format),c?(h=""+(n.get("key")||n.values_.title)+"
",h+=c+": ",h+=this.getDataByColumnName(this.mapData,c,l,g)):h=this.mapData?.Cols[1].tuples[Math.floor(l/this.mapData?.Cols[0].tuples.length)].caption||this.mapData?.Cols[1].tuples[Math.floor(l/this.mapData?.Cols[0].tuples.length)].desc||"",!h)if(h=""+(n.get("name")||n.values_.title)+"
",this.mapData?.Cols[0].tuples.length)for(let p=0;p${v}`,p!==this.mapData?.Cols[0].tuples.length-1&&(h+="
")}else h=this.getDataByColumnName(this.mapData,"Name",l);h&&(this.tooltipData.content=h,this.popupElement&&(this.popupElement.style.left=e.pixel[0]+"px",this.popupElement.style.top=e.pixel[1]-10+"px",this.popupElement.innerHTML=h),this.showPopup())}}onResize(){this.map&&this.map.updateSize()}buildGeoJSON(e){}getPartsByKey(e,i="Key"){if(this.isGeoJSON){let r=this.polyData?.features.find(n=>n.properties[i]===e);return r?r.geometry:void 0}else if(this.polyData?.[e])return this.polyData[e]?.split(";")}convertCoordinatesOfGEOJson(e,i,r){let n=JSON.parse(JSON.stringify(e.coordinates));for(let l=0;lr[0]&&(r[0]=parseFloat(p)),parseFloat(g)>r[1]&&(r[1]=parseFloat(g))}return{poly:n,min:i,max:r}}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-map-widget"]],viewQuery:function(i,r){if(i&1&&($i(ff,7),$i(gf,7)),i&2){let n;Ji(n=Qi())&&(r.popupEl=n.first),Ji(n=Qi())&&(r.tooltip=n.first)}},standalone:!0,features:[vt,bt],decls:7,vars:0,consts:[["popup",""],["tooltip",""],[1,"panel","panel-default","map-popup",2,"visibility","hidden"],["ng-bind-html","model.tooltip.content | sanitize"],[1,"arrow_box"],[1,"tooltip",2,"display","none"]],template:function(i,r){i&1&&(Lt(0,"div",2,0)(2,"div"),le(3,"div",3),kt(),le(4,"div",4),kt(),le(5,"div",5,1))},styles:['[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative}.tooltip[_ngcontent-%COMP%]{margin-top:24px;z-index:1000;position:absolute;border:solid 1px #000000;color:#000;background-color:#ffffe1;white-space:nowrap;font-family:Tahoma,sans-serif;font-size:13px;-moz-box-shadow:2px 2px 4px #7f7f7f;box-shadow:2px 2px 4px #7f7f7f;padding:2px 3px}.map-popup[_ngcontent-%COMP%]{transform:translateY(-100%) translate(-50%);z-index:1;position:absolute;background-color:var(--cl-widget-filter-bg);margin-bottom:0;border-color:#b0b0b0;padding:4px;-webkit-box-shadow:1px 1px 9px 0px rgba(50,50,50,.5);-moz-box-shadow:1px 1px 9px 0px rgba(50,50,50,.5);box-shadow:1px 1px 9px #32323280;color:var(--cl-widget-header-txt)}.map-popup[_ngcontent-%COMP%]:after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:8px 4px 0 4px;bottom:-8px;left:calc(50% - 4px);position:absolute;border-color:var(--cl-widget-filter-bg) transparent transparent transparent}']});let o=t;return o})();var Le=qt(Jn()),Iu=qt(wu()),Ru=qt(Su()),ku=qt(Mu()),Ou=qt(Eu()),Fu=qt(Tu()),zu=qt(Au()),Nu=qt(Pu()),ju=qt(Du());(0,Ru.default)(Le.default);(0,ju.default)(Le.default);(0,Iu.default)(Le.default);(0,ku.default)(Le.default);(0,Ou.default)(Le.default);(0,Fu.default)(Le.default);(0,zu.default)(Le.default);(0,Nu.default)(Le.default);var Ir=20;var Lr={treemap:{showLines:!1,showText:!1},pie:{showLines:!1}},Bt=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.widgetData=null,this.seriesTypes=[],this.firstRun=!0,this.baseSeriesType="bar",this.sbs=$t(zr),this.wts=$t(Lu),this.zone=$t(lh),this.axisLabelListeners=[],this.seriesVisibility=[]}ngOnInit(){super.ngOnInit(),this.widget.isChart=!0,this.setupHeaderButtons(),this.override?.seriesTypes&&(this.seriesTypes=this.override?.seriesTypes.split(",")),this.subPrint=this.bs.subscribe("print:"+this.widget.name,()=>{if(this.chart){let e=new Blob([this.chart.getSVG()],{type:"image/svg+xml"}),i=window.open(URL.createObjectURL(e),"_blank");i&&(i.onload=()=>{let r=i?.document.querySelector("svg");r?.setAttribute("width","100%"),r?.setAttribute("height","100%"),r&&(r.style.height="auto"),i?.print()},i.onafterprint=()=>{i?.close()})}}),this.setupChart(),this.widget.inline&&this.setupInline(),this.subColorsConfig=this.bs.subscribe("charts:update-colors",e=>this.updateColors(e))}ngAfterViewInit(){this.createChart(),setTimeout(()=>{this.chart?.reflow()})}createChart(){this.chartConfig.chart&&(this.chartConfig.chart.renderTo=this.el.nativeElement),this.chartConfig?.chart?.type==="map"?this.chart=Le.default.mapChart(this.chartConfig):this.widget.type.toLowerCase()==="timechart"?this.chart=Le.default.stockChart(this.chartConfig):this.chart=Le.default.chart(this.chartConfig)}clearSeries(e){let i=e||this.chart;if(i)for(;i.series.length>0;)i.series[0].remove(!1)}onHeaderButton(e){switch(super.onHeaderButton(e),e.name){case"isLegend":this.toggleLegend(e.state);break;case"showValues":{(this.chartConfig?.plotOptions?.series?.dataLabels).enabled=e.state,this.chartConfig.plotOptions?.pie?.dataLabels&&(this.chartConfig.plotOptions.pie.dataLabels.enabled=e.state),this.updateChart(),this.chart?.legend.update({enabled:this.widget.isLegend},!0);break}case"showZero":this.showZeroOnAxis();break;case"isTop":this.limitSeriesAndData();break;case"chartConfig":this.showChartConfig();break}}updateChart(e=!1,i=!1){this.chart&&this.chart.update(this.chartConfig,e,!1,i)}hasOption(e){let i=this.ss.getWidgetsSettings(this.widget.dashboard);return!(!i[this.widget.name]||i[this.widget.name][e]===void 0||i[this.widget.name][e]===!1)}setYAxisMinToZero(){if(this.chartConfig.yAxis instanceof Array)for(let e=0;e{if(!n||!n.Info)return"";let l="";for(let a=0;ai.visible)??[],this.clearSeries(),this.widgetData=JSON.parse(JSON.stringify(e)),e.Error){this.showError(e.Error);return}if(e){let i=this.getMinValue(e.Data);if(i>0&&i<=10&&(this.chartConfig.yAxis.min=-10),!e.Cols)return;if(e.Cols[0].tuples.length===0&&e.Data.length!==0&&e.Cols[0].tuples.push({caption:this.i18n.get("count")}),this.parseData(e),this.widget.showZero&&this.setYAxisMinToZero(),this.firstRun){let r=this.ss.getWidgetsSettings(this.widget.dashboard);if(this.us.isEmbedded()){let n=this.route.snapshot.queryParamMap.get("hiddenSeries"),l=[];n&&(l=n.split(",")),l.forEach(a=>{this.chartConfig?.series?.[a]&&(this.chartConfig.series[a].visible=!1)})}else if(r[this.widget.name]&&r[this.widget.name].series)for(let n=0;n<(this.chartConfig?.series?.length||0);n++)r[this.widget.name].series[n]===!1&&this.chartConfig.series&&(this.chartConfig.series[n].visible=!1);this.firstRun=!1,this.onResize()}}(this.chart?.series?.length??0)<2&&!this.hasOption("isLegend")&&(this.widget.isLegend=!1,this.parent?.header?.cd?.detectChanges(),this.chart?.legend.update({enabled:!1}))}buildAxisTitles(e){if(this.chartConfig?.chart?.type!=="column")return;let i=!1,r=!1,n=this.getMDX(),l=n.indexOf("ON"),a=-1;l!==-1&&(a=n.indexOf("FROM",l),a!==-1&&(r=n.substring(l,a).toLowerCase().lastIndexOf(".members")!==-1)),a!==-1&&(l=a,a=n.indexOf("FROM",l),i=n.substring(l,a).toLowerCase().lastIndexOf(".members")!==-1),this.chartConfig.yAxis&&e.Cols[0]&&e.Cols[0].tuples&&e.Cols[0].tuples.length&&(this.chartConfig.yAxis.title={text:e.Cols[0].tuples.map(h=>h.caption||"").join(" & ")}),this.chartConfig.xAxis&&e.Cols[1]&&e.Cols[1].tuples&&e.Cols[1].tuples.length&&(this.chartConfig.xAxis.title={text:e.Cols[1].tuples.map(h=>h.caption||"").join(" & ")})}addSeries(e,i,r,n=!1){let l=i||this.chart;if(!l)return;let a=(l.options||this.chartConfig).series?.length??-1;if(e&&e.data&&e.data.length!==0){let u=!0,p=!1;for(let b=0;bparseInt(b,10)));let p=(this.chart||this.chartConfig).series?.length||-1;e.yAxis=u[p]||0}e.showInLegend=!0,l.addSeries(e,n,!1);let g=this.seriesVisibility[l.series.length-1];g!==void 0&&(l.series[l.series.length-1].visible=g)}enableStacking(){let e={plotOptions:{series:{stacking:"normal"}}};this.us.mergeRecursive(this.chartConfig,e)}getMinValue(e){let i=1/0;for(let r=0;rc.action==="setRowCount")[0],h=a&&parseInt(a.value.toString())||Ir;if(this.chartConfig?.plotOptions?.series?.stacking==="normal"||!this.chartConfig?.plotOptions?.series?.stacking){let c=e.Cols[1].tuples,g=e.Cols[0].tuples;if(this.widget.isTop)if(g.length===1){let u=!0;for(;u;){u=!1;let p;for(p=0;pthis.setElColor(n,i))}updateColors(e){this.zone.runOutsideAngular(()=>{let i=this.chart;if(!i)return;let r=i.options?.chart?.type;if(e.hcColors)if(r==="treemap"||r==="pie"){let l=i.options.plotOptions?.[r];l&&(l.colors=e.hcColors);for(let a=0;a{u.color=h,this.setElColor(u.graphic?.element,h)});let g=i.legend.allItems[l];g&&g.legendSymbol&&[g.legendSymbol.element,g.legendLine.element].forEach(u=>{u&&(u.setAttribute("fill",h),u.setAttribute("stroke",h))}),i.series[l].color=h}if(e.hcBorderColor&&Lr[r||""]?.showBorder!==!1)for(let l=0;l{let c=h.graphic?.element;c&&c.setAttribute("stroke",e.hcBorderColor)});if(e.hcBackground&&Lr[r||""]?.showBackground!==!1){let l=i.chartBackground.element;l.setAttribute("fill",e.hcBackground),l.setAttribute("stroke",e.hcBackground),i.options.chart&&(i.options.chart.backgroundColor=e.hcBackground)}if(e.hcLineColor&&Lr[r||""]?.showLines!==!1){let l=e.hcLineColor;i.yAxis.forEach(a=>{i.yAxis[0].options.minorGridLineColor=l,a.gridGroup.element.setAttribute("stroke",l),a.gridGroup.element.childNodes.forEach(h=>{h.setAttribute("stroke",l)})}),i?.xAxis.forEach(a=>{a.axisGroup.element.setAttribute("stroke",l),a.axisGroup.element.childNodes.forEach(h=>{h.setAttribute("stroke",l)})})}let n=e.hcTextColor;if(n&&Lr[r||""]?.showText!==!1){let l=a=>{if(a.labelGroup){a.labelGroup.element.setAttribute("fill",n);for(let h=0;h{a.options.color=n,a.legendItem&&(a.legendItem?.group?.element?.setAttribute("color",n),a.legendItem?.group?.element?.setAttribute("fill",n),a.legendItem?.label?.element?.setAttribute("color",n),a.legendItem?.label?.element?.setAttribute("fill",n))}),i?.series.forEach(a=>a.data.forEach(h=>{let c=h.dataLabel?.element?.children[0]?.style;c&&(c.color=n,c.fill=n)}))}})}fixData(e){for(let i=0;i{i&&l>i-1||((n.children?.length??0)>1?n.children?.forEach(a=>{a.caption=n.caption+"/"+a.caption,r.push(a)}):r.push(n))}),r}buildSeries(e){this.chartConfig.series=[];let i=this.widget.controls.find(a=>a.action.toLowerCase()==="setcolumncount"),r=this.buildAxis(e.Cols[1],i?.value||0),n=this.buildAxis(e.Cols[0]);n.forEach((a,h)=>{let c=[];r.forEach((g,u)=>{c.push({y:+e.Data[u*n.length+h],drilldown:!0,cube:e.Info?.cubeName||"",path:g.path,name:g.caption,title:g.title})}),this.fixData(c),this.addSeries({data:c,name:a.caption,format:a.format,path:a.path})});let l=this.chartConfig.xAxis;l.categories=r.map(a=>a.caption)}removeAxisListeners(){this.axisLabelListeners.forEach(e=>{e.element.removeEventListener(e.event,e.func)})}saveSeriesVisiblilityState(e,i){let r=this.ss.getWidgetsSettings(this.widget.dashboard);r[this.widget.name]||(r[this.widget.name]={});let n=r[this.widget.name];n.series||(n.series={}),n.series[e]=i,this.ss.setWidgetsSettings(r,this.widget.dashboard)}setupChart(){let e=this,i=this.wts.getDesc(this.widget.type);function r(){let n=this.value,l=e.override,a=l?.valueLabelFormat,h=e.baseType;return(l?.yAxisList[0]?.axisType==="percent"||l?.xAxis.axisType==="percent"&&(h==="barChart"||h==="barChartStacked"))&&(n=e.formatNumber(n,"#%")),n}if(this.chartConfig={accessibility:{enabled:!1},drilldown:{activeAxisLabelStyle:{color:this.tc?.hcTextColor||void 0},activeDataLabelStyle:{color:this.tc?.hcTextColor||void 0}},legend:xe({enabled:this.widget.isLegend,align:"left"},this.tc?.hcTextColor?{itemStyle:{color:this.tc?.hcTextColor}}:{}),navigation:{buttonOptions:{align:"center"}},chart:{type:i?.chart||"column",backgroundColor:this.tc?.hcBackground||"transparent",events:{redraw:n=>{e.removeAxisListeners(),n.target?.series?.forEach(l=>{e.chartConfig.chart?.type==="pie"&&e.chart?.legend.allItems.forEach(a=>{let h=u=>{this.onLegendItemHover({series:a.series,index:a.index})},c=u=>{this.onLegendItemOut({series:a.series,index:a.index})},g=a.legendItem?.group.element;g&&(g.addEventListener("mouseover",h),e.axisLabelListeners.push({event:"mouseover",element:g,func:h}),g.addEventListener("mouseout",c),e.axisLabelListeners.push({event:"out",element:g,func:c}))}),l.data.forEach((a,h)=>{let c="contextmenu",g=a.graphic?.element;if(!g)return;let u=p=>{p.preventDefault(),p.stopImmediatePropagation();let b=e._currentData?.Cols[1]?.tuples;if(!b||!b[h])return;let v=l.userOptions.path,x=b[h].path;v&&(x=v),this.bs.broadcast("contextmenu",{widget:this.widget,event:p,ctxData:{canDrillthrough:this.canDoDrillthrough,canDrill:!0,drillPath:x,drillTitle:b[h].caption||b[h].title}})};a.graphic?.element?.addEventListener(c,u),this.axisLabelListeners.push({event:c,element:g,func:u})})}),e.chartConfig?.chart?.type==="pie"?e.chart?.legend?.allItems.forEach(l=>{let a=l.dataLabel?.element;if(!a)return;let h=()=>{e.showLoading(),e.doDrillOnly(l.options.path,l.name.toString(),l.name.toString()).finally(()=>{e.hideLoading()})};a.addEventListener("click",h),this.axisLabelListeners.push({event:"click",element:a,func:h})}):e.chart?.xAxis[0]?.labelGroup?.element?.childNodes?.forEach((l,a)=>{let h=()=>{let c=e._currentData?.Cols[1]?.tuples,g=e._currentData?.Cols[1]?.tuples[0]?.children;g?.length&&(a=Math.floor(a/g?.length)),!(!c||!c[a])&&(e.showLoading(),e.doDrillOnly(c[a].path,c[a].caption||c[a].title,c[a].caption||c[a].title).finally(()=>{e.hideLoading()}))};l.addEventListener("click",h),this.axisLabelListeners.push({event:"click",element:l,func:h})})}}},credits:{enabled:!1},tooltip:{formatter(){let n=e.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=l.y;h=e.formatNumber(h,a);let c=l.point.title;c===l.point.name&&(c="");let g=(l.point.name||l.x||"")+"
"+(c?c+"
":"")+l.series.name+": "+h+"
";return l.point.percentage&&(g+=e.formatNumber(this.point.percentage,e.getDataPropByDataValue(this.series?.userOptions?.name||"")?.format||"#.##")+"%"),g}},exporting:{enabled:!1},plotOptions:{column:{borderColor:this.tc?.hcBorderColor||void 0},bar:{borderColor:this.tc?.hcBorderColor||void 0},pie:{borderColor:this.tc?.hcBorderColor,colors:this.tc?.hcColors},treemap:{colors:this.tc?.hcColors},series:{opacity:this.tc?.hcOpacity,cursor:"pointer",point:{events:{click(n){if(e.drillFilterWidgets?.length){e.doDrillFilter(n.point.path,e.drills),e.parent?.header?.cd.detectChanges();return}if(!n.point)return;if(Ae.mobile&&e._selectedPoint!==n.point){e._selectedPoint=n.point;return}let l=n.point.series.userOptions.path,a=[n.point.path];l&&a.push(l),e.showLoading(),e.doDrillthrough(a,n.point.name,n.point.category).finally(()=>{e.hideLoading()})}}},dataLabels:{color:this.tc?.hcTextColor||void 0,enabled:this.widget.showValues===!0,formatter(){let n=e.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=l.y;return h=e.formatNumber(h,a),h}},events:{hide:n=>this.saveSeriesVisiblilityState(n.target.name,n.target.visible),show:n=>this.saveSeriesVisiblilityState(n.target.name,n.target.visible)}}},yAxis:{events:{},title:{text:""},labels:{style:{color:this.tc?.hcTextColor||void 0,textOverflow:"none"},formatter:r},minorGridLineColor:this.tc?.hcLineColor||"#e6e6e6",gridLineColor:this.tc?.hcLineColor||"#e6e6e6",lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor},xAxis:{events:{},title:{text:""},labels:{style:{color:this.tc?.hcTextColor||void 0,textOverflow:"none",cursor:"pointer"}},minorGridLineColor:this.tc?.hcLineColor||"#e6e6e6",gridLineColor:this.tc?.hcLineColor||"#e6e6e6",lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor},series:[],title:{text:""}},this.setup3DChart(),this.chartConfig.navigator={outlineColor:this.tc?.hcLineColor,xAxis:{gridLineColor:this.tc?.hcLineColor},yAxis:{gridLineColor:this.tc?.hcLineColor}},this.widget.type.toLowerCase()==="combochart"&&(this.chartConfig.yAxis=[{events:{},gridLineColor:this.tc?.hcLineColor,lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor,labels:{style:{color:this.tc?.hcTextColor||void 0}}},{events:{},opposite:!0,gridLineColor:this.tc?.hcLineColor,lineColor:this.tc?.hcLineColor,tickColor:this.tc?.hcLineColor,labels:{style:{color:this.tc?.hcTextColor||void 0}}}],this.widget.overrides&&this.widget.overrides[0]&&this.widget.overrides[0]._type==="comboChart")){let l=this.widget.overrides.find(a=>a._type.toLowerCase()==="combochart")?.yAxisList;if(l&&l.length)for(let a=0;a{this.ss.setWidgetsSettings(i,this.widget.dashboard)};i[e]||(i[e]={}),i[e].themeColors||(i[e].themeColors={});let n=Lr[this.chart?.options?.chart?.type||""]||{};this.sbs.showComponent({component:import("./chunk-LZIODW2A.js"),inputs:{widgetSettings:i[e],appearance:n,onSave:r,onUpdate:l=>this.updateColors(l),chart:this.chart}})}setupAxisMinMax(e){let i=this.override,r=this.chartConfig.yAxis,n=this.chartConfig.xAxis,l=i?.yAxisList[0];e.some(a=>a<0)||(r.min=0),(this.baseType==="barChart"||this.baseType==="barChartStacked")&&(l=i?.xAxis),l?.minValue!==void 0&&(r.min=l.minValue),l?.maxValue!==void 0&&(r.max=l.maxValue)}removeUndefinedColors(e){let i=(r,n)=>{r[n]===void 0&&delete r[n]};i(e.plotOptions?.column,"borderColor"),i(e.plotOptions?.bar,"borderColor"),i(e.plotOptions?.pie,"borderColor"),i(e.plotOptions?.treemap,"borderColor"),i(e.plotOptions?.treemap,"borderColor"),i(e.drilldown?.activeAxisLabelStyle,"color"),i(e.drilldown?.activeDataLabelStyle,"color"),i(e.legend?.itemStyle,"color"),i(e.chart,"backgroundColor"),i(e.plotOptions?.series,"opacity"),i(e.plotOptions?.series?.dataLabels,"color"),i(e.yAxis?.labels?.style,"color"),i(e.yAxis,"minorGridLineColor"),i(e.yAxis,"gridLineColor"),i(e.yAxis,"lineColor"),i(e.yAxis,"tickColor"),i(e.xAxis?.labels?.style,"color"),i(e.xAxis,"minorGridLineColor"),i(e.xAxis,"gridLineColor"),i(e.xAxis,"lineColor"),i(e.xAxis,"tickColor"),this.removeEmptyObjects(e)}removeEmptyObjects(e){let i=!0;for(;i;)i=!1,Object.keys(e).forEach(r=>{typeof e[r]=="object"&&!Array.isArray(e[r])&&(Object.keys(e[r]).length===0?(i=!0,delete e[r]):this.removeEmptyObjects(e[r]))})}setup3DChart(){this.widget?.type.toLowerCase().includes("3d")&&(this.chartConfig.chart&&(this.chartConfig.chart.options3d={enabled:!0,alpha:0,beta:8,depth:50,viewDistance:8}),this.chartConfig.plotOptions?.column&&(this.chartConfig.plotOptions.column.depth=25),this.chartConfig.plotOptions?.bar&&(this.chartConfig.plotOptions.bar.depth=25),this.chartConfig.plotOptions?.pie&&(this.chartConfig.plotOptions.pie.depth=25))}sortTuplesArray(e,i){let r=new Map;i.forEach((n,l)=>{r.set(n,l)}),e.forEach((n,l)=>{n.originalIndex=l}),e.sort((n,l)=>{let a=r.get(n.dimension),h=r.get(l.dimension);return a!==void 0&&h!==void 0?a-h:a!==void 0?-1:h!==void 0?1:0})}sortTuplesBasedOnLabels(e){if(!e.Cols[0].tuples?.length)return;let i=this.widget.overrides?.find(n=>n._type==="chartLegend");if(!i)return;let r=i.legendLabels?.split(",");r&&this.sortTuplesArray(e.Cols[0].tuples,r)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["ng-component"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Hn=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0,this.widget.type.toLowerCase()==="columnchartstacked"&&this.enableStacking()}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-column-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Zn=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.isSpinner=!1}ngOnInit(){this.widget.title=this.i18n.get("filters"),this.widget.toolbar=!0,this.widget.viewSize=this.getViewSize()}requestData(){}onHeaderButton(e){switch(e.name){case"setDefault":this.setFiltersToDefaults();break;case"byRows":this.setViewSize(0);break;case"by2columns":this.setViewSize(1);break;case"by3columns":this.setViewSize(2);break;case"by4columns":this.setViewSize(3);break;case"by5columns":this.setViewSize(4);break;case"by6columns":this.setViewSize(5);break}}setFiltersToDefaults(){for(let e=0;e{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-empty-widget"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Bu=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.isPercent=!0,this.totalSum=0,this.prevData=null,this.baseSeriesType="treemap"}ngOnInit(){super.ngOnInit(),this.totalSum=0,this.widget.overrides&&this.widget.overrides[0]&&this.widget.overrides[0].showPercentage===0&&(this.isPercent=!1);let e=this,i={levels:[{level:1,layoutAlgorithm:"sliceAndDice",dataLabels:{enabled:!0,align:"left",verticalAlign:"top",style:{fontSize:"15px",fontWeight:"bold"}}}],legend:{enabled:this.widget.isLegend},plotOptions:{series:{animation:!1,colorByPoint:!0,legendType:"point"},treemap:{dataLabels:{enabled:!0,formatter(){if(e.totalSum){let r=this.point.value/e.totalSum*100;return r=e.formatNumber(r,e.getDataPropByDataValue(this.series?.userOptions?.dimension)?.format||"#.##"),`${this.point.caption}
${r}%`}else return`${this.point.caption}`}}}},tooltip:{formatter(){let r=this.series.userOptions.caption,n=this.series.userOptions.format,l=this.point.value;return l=e.formatNumber(l,n),this.point.caption+"
"+r+": "+l+""}}};this.us.mergeRecursive(this.chartConfig,i),delete this.chartConfig.plotOptions?.series?.dataLabels}parseData(e){return Yt(this,null,function*(){this.prevData=e,e&&e.Info&&(this.dataInfo=e.Info);let i=[];if(e.Cols[0].tuples.length){if(e.Cols[0].tuples[0].children)console.error("Data converter for this treemap chart not implemented!");else{if(yield this.checkForAutoDrill(e))return;i=[];let r=0;for(let a=0;a"+parseFloat(parseFloat(e.Data[a])/r*100).toFixed(2).toString()+"%",value:parseFloat(e.Data[a]),y:parseFloat(e.Data[a]),path:e.Cols[1].tuples[a].path,name:e.Cols[1].tuples[a].caption});let n="",l="";e.Cols[0].tuples[0]&&(n=e.Cols[0].tuples[0].caption,l=e.Cols[0].tuples[0].format),this.totalSum=e.Data.map(a=>parseFloat(a)||0).reduce((a,h)=>a+h,0),this.addSeries({data:i,name:"",layoutAlgorithm:"squarified",caption:n,dimension:e.Cols[0].tuples[0].dimension,format:l,dataLabels:{enabled:!0}},void 0,void 0,!0)}this.toggleLegend(this.widget.isLegend)}})}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-tree-map"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Kn=qt(ys());var Gu=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.thirdTitle=""}ngOnInit(){super.ngOnInit();let e=this,i={plotOptions:{bubble:{minSize:"5%",maxSize:"35%",sizeBy:"width"},series:{cursor:null,point:{events:{click:null}}}},chart:{zoomType:"xy"},xAxis:{tickWidth:10,title:{enabled:!0}},tooltip:{formatter:function(){let r=this.series.userOptions.format1,n=this.series.userOptions.format2,l=this.series.userOptions.format3,a=this.x,h=this.y,c=this.point.z;r&&(a=(0,Kn.default)(a).format(r)),n&&(h=(0,Kn.default)(h).format(n)),l&&(c=(0,Kn.default)(c).format(l));let g=e.thirdTitle||"radius";return this.series.name+"
"+e.chartConfig.xAxis.title.text+":"+a+"
"+e.chartConfig.yAxis.title.text+":"+h+""+(c?"
"+g+": "+c.toString()+"":"")}}};this.us.mergeRecursive(this.chartConfig,i)}getSeriesNames(e){let i={};if(e.Cols[0].tuples.length==4)for(let r=3;r=1&&(this.chartConfig.xAxis.title.text=e.Cols[0].tuples[0].caption),e.Cols[0].tuples.length>=2&&(this.chartConfig.yAxis.title.text=e.Cols[0].tuples[1].caption),e.Cols[0].tuples.length>=3&&(this.thirdTitle=e.Cols[0].tuples[2].caption);let r=[];if(e.Cols[0].tuples[0].children)this.showError("Data converter for this bubble chart not implemented!");else{let n=e.Cols[0].tuples.length,l="",a="",h="";e.Cols[0].tuples[0]&&(l=e.Cols[0].tuples[0].format),e.Cols[0].tuples[1]&&(a=e.Cols[0].tuples[1].format),e.Cols[0].tuples[2]&&(h=e.Cols[0].tuples[2].format);let c={},g=!1,u;if(this.hasOption("isTop")){g=!0;let v=(this.widget.controls||[]).filter(function(x){return x.action==="setRowCount"})[0];u=v?v.value||Ir:Ir}let p=g?u:e.Data.length;p>e.Data.length&&(p=e.Data.length);for(let b=0;b{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-bubble-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var qn=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={};this.widget.type.toLowerCase()!=="combochart"&&(e={plotOptions:{series:{lineWidth:3,marker:{enabled:!1}}}}),this.widget.type.toLowerCase()==="linechartmarkers"&&(e={series:{marker:{enabled:!0}}}),this.us.mergeRecursive(this.chartConfig,e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Kl=qt(ys());var Xu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit();let e={series:{fillColor:"#dddddF"},plotOptions:{boxplot:{fillColor:"#fafafF",whiskerLength:0,colorByPoint:!0,lineWidth:3,stemWidth:0}},tooltip:{formatter:function(){let i=this.series.userOptions.caption1||"Minimum",r=this.series.userOptions.caption2||"Maximum",n=this.series.userOptions.format1,l=this.series.userOptions.format2,a=this.point.low,h=this.point.high;return n&&(a=(0,Kl.default)(a).format(n)),l&&(h=(0,Kl.default)(h).format(l)),this.key+"
"+r+":"+h+"
"+i+":"+a+""}}};this.us.mergeRecursive(this.chartConfig,e)}parseData(e){return Yt(this,null,function*(){let i=this.chartConfig.xAxis;i.categories=[];for(let n=0;n{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-hi-low-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Wu=qt(ys()),Yu=qt(Jn());var mf=["charts"];function xf(o,t){o&1&&le(0,"div",null,0)}var ql=(()=>{let t=class t extends Bt{constructor(){super(...arguments),this.confs=[],this.charts=[]}ngOnInit(){super.ngOnInit();let e={title:{verticalAlign:"bottom",style:{fontFamily:_h}},tooltip:{enabled:!1},legend:{enabled:!1},chart:{plotBackgroundColor:null,plotBackgroundImage:null,plotBorderWidth:0,plotShadow:!1},plotOptions:{series:{dataLabels:{enabled:!0,formatter:function(){let i=this.point.y,r=this.series.userOptions.format||"#.##";return r&&(i=(0,Wu.default)(i).format(r.replace(",","."))),i}}}},pane:{startAngle:-150,endAngle:150,background:[{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#333"]]},borderWidth:0,outerRadius:"109%"},{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#333"],[1,"#FFF"]]},borderWidth:1,outerRadius:"107%"},{},{backgroundColor:"#DDD",borderWidth:0,outerRadius:"105%",innerRadius:"103%"}]}};this.chartConfig.yAxis={minorTickInterval:"auto",minorTickWidth:1,minorTickLength:10,minorTickPosition:"inside",minorTickColor:"#666",tickWidth:2,tickPosition:"inside",tickLength:10,tickColor:"#666"},this.chartConfig.chart?.type==="solidgauge"&&(e.pane={center:["50%","85%"],size:"140%",startAngle:-90,endAngle:90,background:[{backgroundColor:"#EEE",innerRadius:"60%",outerRadius:"100%",shape:"arc"}]}),this.us.mergeRecursive(this.chartConfig,e)}ngAfterViewInit(){}createChart(){let e=this.chartsEl?.toArray().map(i=>i.nativeElement);this.charts=[],this.confs.forEach((i,r)=>{i.chart&&(i.chart.renderTo=e?.[r]),this.charts.push(Yu.default.chart(i))})}retrieveData(e){let i;if(this.hideLoading(),this.charts.forEach(r=>{for(;r.series.length>0;)r.series[0].remove()}),this.widgetData=JSON.parse(JSON.stringify(e)),e.Error){this.showError(e.Error);return}if(e){if(!e.Cols)return;e.Cols[0].tuples.length===0&&e.Data.length!==0&&e.Cols[0].tuples.push({caption:this.i18n.get("count")}),this.parseData(e)}}parseData(e){return Yt(this,null,function*(){if(this.confs.length===0){for(let i=0;ia.dataValue===e.Cols[0].tuples[i].dimension);n&&n.label&&n.label!=="$auto"&&(r=n.label),this.confs.push(this.us.mergeRecursive({},this.chartConfig));let l=this.confs[this.confs.length-1];l.title&&(l.title.text=r)}this.cd.markForCheck(),this.cd.detectChanges(),setTimeout(()=>{this.createChart(),this.parseData(e)});return}for(let i=0;in.max&&(p=n.max),n.plotBands=[],u!==n.min&&n.plotBands.push({from:n.min,to:u,color:"rgba(255, 0, 0, 0.4)",zIndex:5}),p!==n.max&&n.plotBands.push({from:p,to:n.max,color:"rgba(255, 0, 0, 0.4)",zIndex:5}),l.targetValue){let b=parseFloat(l.targetValue);n.plotLines=[{value:b,color:"rgba(0, 180, 0, 0.4)",width:3,zIndex:5}]}}let a="";this.widget.properties&&this.widget.properties.format&&(a=this.widget.properties.format),e.Cols[0].tuples[i].format&&(a=e.Cols[0].tuples[i].format);let h=e.Cols[0].tuples[i].caption;l&&l.label&&l.label!=="$auto"&&(h=l.label),this.addSeries({data:[e.Data[i]||0],name:h,format:a},this.charts[i],this.confs[i]),this.charts[i]&&this.charts[i].update(this.confs[i])}})}onResize(){super.onResize(),this.charts.forEach(e=>e.reflow())}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-speedometer-chart"]],viewQuery:function(i,r){if(i&1&&$i(mf,5),i&2){let n;Ji(n=Qi())&&(r.chartsEl=n)}},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[["charts",""]],template:function(i,r){i&1&&oe(0,xf,2,0,"div",null,ne),i&2&&ae(r.confs)},styles:["[_nghost-%COMP%]{display:flex}div[_ngcontent-%COMP%]{flex:1 1 100%}"]});let o=t;return o})();var Vu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={plotOptions:{series:{colorByPoint:!1},area:{stacking:"normal",marker:{enabled:!1}}}};this.us.mergeRecursive(this.chartConfig,e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-area-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Uu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0;let e={plotOptions:{series:{cursor:null,point:{events:{click:null}}},pie:{allowPointSelect:!1,dataLabels:{enabled:!0,color:"#000000",connectorColor:"#000000",formatter:function(){return""+this.point.name+": "+this.series.options.size}}}},tooltip:{formatter:function(){return this.key+": "+this.y+"
"}}};this.us.mergeRecursive(this.chartConfig,e)}parseData(e){return Yt(this,null,function*(){let i=[];this.clearSeries();let r=Math.max.apply(null,e.Data);for(let n=0;n{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-area-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Rr=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnValues=!0;let e={series:{allowPointSelect:!0,stickyTracking:!1}};this.chartConfig.plotOptions||(this.chartConfig.plotOptions={}),this.us.mergeRecursive(this.chartConfig.plotOptions,e),(this.widget.type==="donutChart"||this.widget.type==="donutChart3D")&&(e={plotOptions:{pie:{innerSize:"20%"}}},this.us.mergeRecursive(this.chartConfig,e)),(this.widget.type==="pieChart3D"||this.widget.type==="donutChart3D")&&(e={chart:{options3d:{enabled:!0,alpha:55,beta:0}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",depth:35}}},this.us.mergeRecursive(this.chartConfig,e));let i=this,r={plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!0,formatter:function(){let n=i.override,l=this,a=n?.valueLabelFormat||l.series.options.format,h=this.point.name,c=i.formatNumber(this.y,a);i.widget.showValues||(c=""),i.widget["btn.ShowAnnotations"]===!1&&(h="");let g=i.formatNumber(this.point.percentage,i.getDataPropByDataValue(this.series?.userOptions?.name)?.format||"#.##")+"%";return i.widget["btn.ShowPercents"]||(g=""),[h,c,g].filter(u=>u).join(", ")}},showInLegend:!0},series:{dataLabels:{formatter:function(){let n=this,l=n.series.options.format,a=n.y;return l&&(a=i.formatNumber(a,l)),n.key+", "+a}},point:{events:{legendItemClick:function(){let n=this.path,l=this.name,a=this.visible;i.chart?.series.forEach(h=>{h.data.forEach(c=>{(n&&c.path===n||l&&c.name===l)&&(c!==this&&c.update({visible:!a}),a&&c.setState("normal"))})})},mouseOut:function(){let n=[],l=this.series,a=this.index;l.chart.series.forEach(h=>{h!==l&&n.push(h.points[a])}),n.forEach(h=>{h.setState("")})},mouseOver:function(){let n=[],l=this.series,a=this.index;l.chart.series.forEach(h=>{h!==l&&n.push(h.points[a])}),n.forEach(h=>{h.setState("hover")})}}}}}};this.us.mergeRecursive(this.chartConfig,r),this.chartConfig?.plotOptions?.series?.dataLabels||(this.chartConfig.plotOptions.series.dataLabels={}),(this.chartConfig?.plotOptions?.pie?.dataLabels).enabled=this.isValuesVisible(),this.widget.showValues,this.updateChart(!0,!0)}isValuesVisible(){return this.widget.showValues||this.widget["btn.ShowAnnotations"]}onHeaderButton(e){(e.name==="ShowValues"||e.name==="btn.ShowAnnotations"||e.name==="btn.ShowPercents")&&((this.chartConfig.plotOptions?.pie?.dataLabels).enabled=this.isValuesVisible(),this.updateChart(!0),this.chart?.series.forEach((i,r)=>{r!==0&&(i.options.showInLegend=!1)}),(this.chart?.series.length??0)>1&&this.chartConfig.legend&&this.chart?.legend.update(this.chartConfig.legend,!0)),super.onHeaderButton(e)}addSeries(e,i,r,n=!1){let l=this._currentData?.Cols[0]?.tuples?.length||1,a=this._currentData?.Cols[1]?.tuples?.length||1;if(l!==1){let h=100/l,c=this.chart?.series.length||0;e.center=[(h/2+c*h).toString()+"%","50%"],c>a&&(e.showInLegend=!1)}super.addSeries(e,i,r,n),this.chart&&this.chart.series.length>1&&(this.chart.series[this.chart.series.length-1].options.showInLegend=!1)}updateSeriesVisibilityAndPositionForMultiplePies(){this.chart?.series.forEach((e,i)=>{e.options.showInLegend=i===0})}onLegendItemHover(e){super.onLegendItemHover(e),(this.chart?.series?.length??0)>1&&this.chart?.series.forEach(i=>{i!==e.series&&i.setState("inactive",!0)}),this.chartConfig.plotOptions.series.point.events.mouseOver.call(e)}onLegendItemOut(e){super.onLegendItemOut(e),(this.chart?.series?.length??0)>1&&this.chart?.series.forEach(i=>{i!==e.series&&i.setState("normal",!0)}),this.chartConfig.plotOptions.series.point.events.mouseOut.call(e)}parseData(e){return Yt(this,null,function*(){yield eh(t.prototype,this,"parseData").call(this,e),this.toggleLegend(this.widget.isLegend)})}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var $l=qt(ys());var Hu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.chartConfig.plotOptions={series:{lineWidth:3,marker:{enabled:!0}}};let e=this;this.chartConfig.tooltip={formatter(){let i=this.series.userOptions,r=i.format1,n=i.format2,l=this.y,a=this.x;r&&(l=(0,$l.default)(l).format(r)),n&&(a=(0,$l.default)(a).format(n));let h=e.chartConfig.yAxis,c=e.chartConfig.xAxis;return h.title?.text+":"+l+"
"+c.title?.text+":"+a+""}},this.updateChart()}parseData(e){return Yt(this,null,function*(){let i="",r="";if(e.Cols[0].tuples.length>=1){let l=this.chartConfig.xAxis;l?.title&&(l.title.text=e.Cols[0].tuples[0].caption),i=e.Cols[0].tuples[0].format}if(e.Cols[0].tuples.length>=2){let l=this.chartConfig.yAxis;l?.title!==void 0&&(l.title.text=e.Cols[0]?.tuples[1]?.caption),i=e.Cols[0].tuples[1].format}this.chartConfig.series=[];let n=[];if(e.Cols[0].tuples[0].children)this.showError("Data converter for this xy chart not implemented!");else{for(let l=0;l{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Zu=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnValues=!0;let e=this;function i(){let n,l,a,h=this,c=new Date(h.x),g=c.toLocaleDateString();if(c.getHours()!==0&&c.getMinutes()!==0&&c.getSeconds()!==0&&(g+=" "+c.toLocaleTimeString()),h.series)return l=h.series.options.format,a=h.y,a=e.formatNumber(a,l),n=""+g+'
\u25CF'+h.series.name+": "+a,n;n=""+g+"
";for(let u=h.points.length-1;u>-1;u--)l=h.points[u].series.options.format,a=h.points[u].y,a=e.formatNumber(a,l),n+='\u25CF'+h.points[u].series.name+": "+a+"
";return n}let r={options:{chart:{zoomType:"x"},tooltip:{formatter:i},navigator:{enabled:!0},scrollbar:{enabled:!1}},series:[],useHighStocks:!0,loading:!0};this.us.mergeRecursive(this.chartConfig,r)}parseData(e){return Yt(this,null,function*(){e&&e.Info&&(this.dataInfo=e.Info),this.chartConfig.yAxis.min=this.getMinValue(e.Data),this.clearSeries();let i=[],r,n;if(e.Cols[0].tuples[0].children){let l=0;for(let a=0;a=0;l--){for(i=[],n=0;n1&&(h=parseInt(a[1])),l=this.addDays(l,parseInt(r)),h&&l.setSeconds(h),Date.parse(l)}else return this.getDate(e)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-line-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Jl=(()=>{let t=class t extends Bt{ngOnInit(){super.ngOnInit(),this.widget.isBtnZero=!0,this.widget.isBtnValues=!0,this.widget.type.toLowerCase()==="barchartstacked"&&this.enableStacking()}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-bar-chart"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();var Ku=qt(Jn());function yf(o,t){if(o&1&&(Lt(0,"div",2)(1,"div",4),ie(2),kt(),le(3,"span")(4,"span")(5,"span")(6,"span"),Lt(7,"div",4),ie(8),kt()()),o&2){let s=Nt().$implicit;Dt(2),Te(s.rangeLower||"0"),Dt(6),Te(s.rangeUpper||"0")}}function bf(o,t){if(o&1&&(Lt(0,"div"),ie(1),kt()),o&2){let s=Nt().$implicit;je("align-left",s.display==="label"),Dt(),ms(" ",s.label," ")}}function vf(o,t){if(o&1&&(Lt(0,"td"),$s(1,yf,9,2,"div",2)(2,bf,2,3,"div",3),kt()),o&2){let s,e=t.$implicit;je("plotbox-cell",e.display==="plotBox"),Dt(),Js((s=e.display)==="plotBox"?1:2)}}function Cf(o,t){if(o&1&&(Lt(0,"div"),le(1,"img",7),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Dt(),gs("src",i.data[e][s],fs)}}function _f(o,t){if(o&1&&le(0,"span",10),o&2){let s=Nt(2).$index,e=Nt().$index,i=Nt();Ee("left",i.targets[e][s],"%")}}function wf(o,t){if(o&1&&(Lt(0,"div",8),$s(1,_f,1,2,"span",9),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Ee("background-color",i.color)("width",i.data[e][s],"%"),Dt(),Js(i.targets[e][s]?1:-1)}}function Sf(o,t){if(o&1&&(Lt(0,"div"),ie(1),kt()),o&2){let s=Nt().$index,e=Nt().$index,i=Nt();Dt(),ms(" ",i.data[e]?i.data[e][s]:""," ")}}function Mf(o,t){if(o&1&&(Lt(0,"td"),$s(1,Cf,2,1,"div")(2,wf,2,5,"div",6)(3,Sf,2,1,"div"),kt()),o&2){let s,e=t.$implicit,i=Nt(2);Ee("width",e.display==="plotBox"?100/i.props.length*2:null,"%"),je("align-left",e.display==="label")("align-center",e.display==="itemNo"),Dt(),Js((s=e.display)==="trendLine"?1:s==="plotBox"?2:3)}}function Ef(o,t){if(o&1&&(Lt(0,"tr"),oe(1,Mf,4,7,"td",5,ne),kt()),o&2){let s=Nt();Dt(),ae(s.props)}}function Tf(o,t){if(o&1&&(Lt(0,"td"),ie(1),kt()),o&2){let s=t.$implicit;Dt(),ms(" ",s," ")}}function Af(o,t){if(o&1&&(Lt(0,"tr",1),oe(1,Tf,2,1,"td",null,ne),kt()),o&2){let s=Nt();Dt(),ae(s.footerValues)}}var qu=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.widget={},this.columns=[],this.rows=[],this.data=[],this.targets=[],this.color="",this.props=[],this.hasFooter=!1,this.footerValues=[],this.san=$t(uh),this.sbs=$t(zr),this.totalByColumn={},this.originalData=[]}ngOnInit(){super.ngOnInit(),this.color=Ku.default.getOptions().colors?.[0],this.tc&&this.tc.hcColors&&(this.color=this.tc.hcColors[0]),this.subColorsConfig=this.bs.subscribe("charts:update-colors",e=>this.updateColors(e)),this.prepareProps(),this.props?.length||this.override?.columns?.length&&(this.props=this.override.columns)}ngOnDestroy(){this.subColorsConfig?.unsubscribe(),super.ngOnDestroy()}retrieveData(e){super.retrieveData(e),!e.Error&&(this.originalData=e.Data,this.columns=e.Cols[0].tuples,this.rows=e.Cols[1]?.tuples||[{}],this.prepareData(e.Data),this.cd.detectChanges())}prepareProps(){this.props=this.widget.dataProperties,this.props&&this.props.forEach(e=>e.label=e.label.replace("\\n",` +`))}onHeaderButton(e){switch(super.onHeaderButton(e),e.name){case"chartConfig":this.showChartConfig();break}}getValue(e,i,r,n,l){switch(r.display||""){case"itemNo":return(i+1).toString();case"label":return this.rows[i].caption;case"":case"value":case"plotBox":{let a=r.format,h=this.getPropValue(e,i,r);if(r.display==="plotBox"){let c=r.rangeLower||0,g=r.rangeUpper||0;return n!==void 0&&(c=n),l!==void 0&&(g=l),r.showAs==="target%"?parseFloat(h)/parseFloat(this.getPropValue(e,i,r,"targetValue"))*100:g-c===0?0:(h-c)/(g-c)*100}else{if(h==="")return"";if(r.showAs==="target%"){let c=this.getPropValue(e,i,r,"targetValue");return this.formatNumber(h/c,a)}return r.showAs==="sum%"?this.formatNumber(h/this.totalByColumn[r.dataValue],a||"#.##%"):this.formatNumber(h,a)}}case"trendLine":{let a=this.getColumnIndex(r.dataValue),h="";return a!==-1&&(h=e[i*this.columns.length+a]),this.getSvgForTrendLine(r,h)}}return 0}prepareFooter(){if(this.hasFooter=this.props.some(e=>e.summary==="sum"),this.footerValues=[],!!this.hasFooter)for(let e=0;e{this.ss.setWidgetsSettings(i,this.widget.dashboard)};i[e]||(i[e]={}),i[e].themeColors||(i[e].themeColors={}),this.sbs.showComponent({component:import("./chunk-LZIODW2A.js"),inputs:{appearance:{showSeries:[!0,!1,!1,!1,!1,!1,!1,!1,!1,!1],showBackground:!1,showLines:!1,showText:!1,showBorder:!1},widgetSettings:i[e],onSave:r,onUpdate:n=>this.updateColors(n)}})}getPropValue(e,i,r,n="dataValue"){let l=!isNaN(parseFloat(r[n])),a=r[n];if(!l){let h=this.getColumnIndex(r[n]);h===-1?a=0:a=e[i*this.columns.length+h]}return a}getColumnIndex(e){return this.columns.findIndex(r=>r.dimension?e.split("/").includes(r.dimension):/^Properties\(\"([^)]+)\"\)/.exec(r.valueID)?.[1]===e)}prepareData(e){let i=[];for(let r=0;r(g+a)%this.columns.length===0);l=Math.max(...h),n=Math.min(...h)}n=0,i.push({min:n,max:l}),this.props[r].rangeLower||(this.props[r].rangeLower=n),this.props[r].rangeUpper||(this.props[r].rangeUpper=l)}this.preparePercentageSums(e),this.data=[],this.targets=[];for(let r=0;r{if(!u)return 0;let p=parseFloat(u);return isNaN(p)?0:p}):typeof i=="number"?n=[i]:Array.isArray(i);let l=Math.max(...n),a=Math.min(...n),h=(n.length-1)*4,c=` r.showAs==="sum%");i?.length&&i.forEach(r=>{let n=this.columns.findIndex(l=>l.dimension===r.dataValue);this.totalByColumn[r.dataValue]=e.reduce((l,a,h)=>{if(h%this.columns.length!==n||a==="")return l;let c=parseFloat(a);return isNaN(c)?l:l+c},0)})}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-scorecard"]],inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:9,vars:1,consts:[[3,"plotbox-cell"],[1,"footer"],[1,"axis"],[3,"align-left"],[1,"label"],[3,"width","align-left","align-center"],[1,"box",3,"background-color","width"],[3,"src"],[1,"box"],[1,"target",3,"left"],[1,"target"]],template:function(i,r){i&1&&(Lt(0,"table")(1,"thead")(2,"tr"),oe(3,vf,3,3,"td",0,ne),kt()(),Lt(5,"tbody"),oe(6,Ef,3,0,"tr",null,ne),$s(8,Af,3,0,"tr",1),kt()()),i&2&&(Dt(3),ae(r.props),Dt(3),ae(r.rows),Dt(2),Js(r.hasFooter?8:-1))},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{overflow-y:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0;width:100%}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{color:#686868}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%]{position:relative;z-index:2}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{white-space:pre;text-align:right;position:sticky;top:0;padding:0 10px;height:40px;background-color:var(--cl-widget-filter-bg);border-bottom:1px solid var(--cl-header-border)}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td.align-left[_ngcontent-%COMP%]{text-align:left}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td.align-center[_ngcontent-%COMP%]{text-align:center}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:6px 10px;text-align:right}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td.align-left[_ngcontent-%COMP%]{text-align:left}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td.align-center[_ngcontent-%COMP%]{text-align:center}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:30px}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#00000003}.box[_ngcontent-%COMP%]{height:18px;flex-shrink:0;flex-grow:0;position:relative}.boxes-container[_ngcontent-%COMP%]{display:flex}.boxes-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:40px;flex-shrink:0;flex-grow:0;margin-right:10px}.axis[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:10px;border-bottom:1px solid gray;height:6px;border-left:1px solid gray;margin-top:28px;position:relative}.axis[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{position:absolute;text-align:center;top:-14px}.axis[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]:first-child{left:0;transform:translate(-50%)}.axis[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]:last-child{right:0;transform:translate(50%)}.axis[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{width:100%;border-right:1px solid gray}.footer[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{color:var(--cl-txt);background-color:var(--cl-widget-filter-bg);border-top:1px solid var(--cl-header-border);position:sticky;bottom:0}.target[_ngcontent-%COMP%]{display:inline-block;width:2px;transform:translate(-1);background-color:#1c1d20;height:calc(100% + 4px);position:absolute;top:-2px}.plotbox-cell[_ngcontent-%COMP%]{z-index:1}"]});let o=t;return o})();var Us=(()=>{let t=class t extends ye{constructor(){super(...arguments),this.data=[]}retrieveData(e){this.hideLoading(),this.prepareMeterData(e),this.cd.markForCheck(),this.cd.detectChanges()}prepareMeterData(e){if(this.data=[],!e)return;let i=!!this.widget?.dataProperties?.length,r=i?this.widget?.dataProperties:e.Cols[0].tuples;for(let n=0;nx.dimension===l.dataValue);h=e.Cols[0].tuples[v].caption,a=e.Data[v]}else h=r[n].caption,a=e.Data[n];let c=1,g=parseFloat(l.rangeLower.toString()),u=parseFloat(l.rangeUpper.toString());isNaN(g)&&(g=0),isNaN(u)&&(u=100);let p=g,b=u;isNaN(p)&&(p=33.33333),isNaN(b)&&(b=66.66666),a=b&&(c=2),this.data.push({caption:h,state:c,value:a,min:g,max:u})}}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["ng-component"]],standalone:!0,features:[vt,bt],decls:0,vars:0,template:function(i,r){},encapsulation:2});let o=t;return o})();function Pf(o,t){if(o&1&&(Lt(0,"div",0),le(1,"img",1),Lt(2,"label"),ie(3),kt()()),o&2){let s=t.$implicit;Dt(),gs("src","assets/img/smiley/"+(s.state===1?"smile-yellow.svg":s.state===0?"smile-red.svg":"smile-green.svg"),fs),Dt(2),Te(s.caption)}}var $u=(()=>{let t=class t extends Us{constructor(){super(...arguments),this.widget={}}get gridColumns(){return"repeat("+(this.data?.length>=3?3:this.data?.length||0).toString()+", 1fr)"}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-wsmiley"]],hostVars:2,hostBindings:function(i,r){i&2&&Ee("grid-template-columns",r.gridColumns)},inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[[1,"card"],[3,"src"]],template:function(i,r){i&1&&oe(0,Pf,4,2,"div",0,ne),i&2&&ae(r.data)},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:grid;width:100%;height:100%;font-family:Oxygen;-webkit-user-select:initial;user-select:initial;align-items:center;justify-content:center}img[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 24px);max-width:100%}.card[_ngcontent-%COMP%]{width:100%;height:100%;flex:1 1 100%;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:100%}label[_ngcontent-%COMP%]{width:100%;font-family:Oxygen;color:gray;font-size:14px;text-align:center;height:24px;max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0});let o=t;return o})();function Df(o,t){if(o&1&&le(0,"div",3),o&2){let s=t.$implicit,e=Nt().$implicit;je("filled",e.progress>=s+1)}}function Lf(o,t){if(o&1&&(Lt(0,"div",0)(1,"div",1),oe(2,Df,1,2,"div",2,ne),kt(),Lt(4,"label"),ie(5),kt()()),o&2){let s=t.$implicit,e=Nt();Dt(),je("high",s.state===2)("low",s.state===0),Dt(),ae(e.dots),Dt(3),Te(s.caption)}}var Ju=(()=>{let t=class t extends Us{constructor(){super(...arguments),this.widget={},this.data=[],this.dots=[0,1,2,3,4,5,6,7,8,9]}get gridColumns(){return"repeat("+(this.data?.length>=5?2:1).toString()+", 1fr)"}prepareMeterData(e){super.prepareMeterData(e),this.data.forEach(i=>{i.progress=(i.value-i.min)/(i.max-i.min)*10,isNaN(i.progress)&&(i.progress=0)}),console.log(this.data)}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-light-bar"]],hostVars:2,hostBindings:function(i,r){i&2&&Ee("grid-template-columns",r.gridColumns)},inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[[1,"holder"],[1,"bar"],[1,"dot",3,"filled"],[1,"dot"]],template:function(i,r){i&1&&oe(0,Lf,6,5,"div",0,ne),i&2&&ae(r.data)},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:grid;width:100%;height:100%;font-family:Oxygen;-webkit-user-select:initial;user-select:initial;align-items:center;justify-content:center;gap:20px}.holder[_ngcontent-%COMP%]{width:100%;height:100%;flex:1 1 100%;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center}label[_ngcontent-%COMP%]{width:100%;font-family:Oxygen;color:gray;font-size:14px;text-align:center;height:24px;max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar[_ngcontent-%COMP%]{display:flex;width:100%;height:24px;border:1px solid var(--cl-accent);border-radius:1000px;padding-left:3px;padding-right:3px;gap:4px;justify-content:space-between;align-items:center}.dot[_ngcontent-%COMP%]{background:var(--cl-hover);border-radius:1000px;width:100%;height:100%;max-width:18px;max-height:18px}.dot.filled[_ngcontent-%COMP%]{background:var(--cl-accent)}.bar.high[_ngcontent-%COMP%] > .dot[_ngcontent-%COMP%]:last-child{background-color:#e07d86}.bar.low[_ngcontent-%COMP%] > .dot[_ngcontent-%COMP%]:first-child{background-color:#175ab8}"],changeDetection:0});let o=t;return o})();function If(o,t){if(o&1&&(Lt(0,"div",0),le(1,"img",1),Lt(2,"label"),ie(3),kt()()),o&2){let s=t.$implicit;Dt(),gs("src","assets/img/traffic-light/"+(s.state===1?"yellow.svg":s.state===0?"red.svg":"green.svg"),fs),Dt(2),Te(s.caption)}}var Qu=(()=>{let t=class t extends Us{constructor(){super(...arguments),this.widget={}}get gridColumns(){return"repeat("+(this.data?.length>=3?3:this.data?.length||0).toString()+", 1fr)"}};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=St(t)))(r||t)}})(),t.\u0275cmp=yt({type:t,selectors:[["dsw-traffic-light"]],hostVars:2,hostBindings:function(i,r){i&2&&Ee("grid-template-columns",r.gridColumns)},inputs:{widget:"widget"},standalone:!0,features:[vt,bt],decls:2,vars:0,consts:[[1,"card"],[3,"src"]],template:function(i,r){i&1&&oe(0,If,4,2,"div",0,ne),i&2&&ae(r.data)},styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{display:grid;width:100%;height:100%;font-family:Oxygen;-webkit-user-select:initial;user-select:initial;align-items:center;justify-content:center;gap:20px}img[_ngcontent-%COMP%]{width:100%;max-height:calc(100% - 24px);max-width:100%}.card[_ngcontent-%COMP%]{width:100%;height:100%;flex:1 1 100%;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{height:100%}label[_ngcontent-%COMP%]{width:100%;font-family:Oxygen;color:gray;font-size:14px;text-align:center;height:24px;max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"],changeDetection:0});let o=t;return o})();var kr=[{id:"btn.ShowAnnotations",text:"Show annotations",tooltip:"Show annotations",icon:"assets/img/icons/text.svg",defValue:!0},{id:"btn.ShowPercents",text:"Show percents",tooltip:"Show percents",icon:"assets/img/icons/percent.svg"}],Hs={regular:{label:"Scorecard chart",class:qu,allowShowAsPivot:!0},fuelGauge:{class:ql,type:"chart",chart:"solidgauge",allowShowAsPivot:!0},bullseyeChart:{label:"Bullseye chart",class:Uu,type:"chart",chart:"pie",headerButtons:kr,allowShowAsPivot:!0},speedometer:{class:ql,type:"chart",chart:"gauge",allowShowAsPivot:!0,disableLegend:!0},bubbleChart:{label:"Bubble chart",class:Gu,type:"chart",chart:"bubble",allowShowAsPivot:!0},treeMapChart:{label:"Tree map chart",class:Bu,type:"chart",chart:"treemap",allowShowAsPivot:!0},hilowChart:{label:"Hi-low chart",class:Xu,type:"chart",chart:"boxplot",allowShowAsPivot:!0},pieChart3D:{label:"Pie chart 3D",class:Rr,type:"chart",chart:"pie",headerButtons:kr,allowShowAsPivot:!0},donutChart3D:{label:"Donut chart 3D",class:Rr,type:"chart",chart:"pie",headerButtons:kr,allowShowAsPivot:!0},donutChart:{label:"Donut chart",class:Rr,type:"chart",chart:"pie",headerButtons:kr,allowShowAsPivot:!0},pieChart:{label:"Pie chart",class:Rr,type:"chart",chart:"pie",headerButtons:kr,allowShowAsPivot:!0},areaChart:{label:"Area chart",class:Vu,type:"chart",chart:"area",allowShowAsPivot:!0},barChart:{label:"Bar chart",class:Jl,type:"chart",chart:"bar",allowShowAsPivot:!0},barChartStacked:{label:"Bar chart stacked",class:Jl,type:"chart",chart:"bar",allowShowAsPivot:!0},lineChart:{label:"Linear chart",class:qn,type:"chart",chart:"line",allowShowAsPivot:!0},lineChartMarkers:{label:"Linear chart with markers",class:qn,type:"chart",chart:"line",allowShowAsPivot:!0},comboChart:{label:"Combo chart",class:qn,type:"chart",chart:"line",allowShowAsPivot:!0},columnChart:{label:"Column chart",class:Hn,type:"chart",chart:"column",allowShowAsPivot:!0},columnChart3D:{label:"Column chart 3D",class:Hn,type:"chart",chart:"column",allowShowAsPivot:!0},columnChartStacked:{label:"Column chart stacked",class:Hn,type:"chart",chart:"column",allowShowAsPivot:!0},xyChart:{label:"XY chart",class:Hu,type:"chart",chart:"scatter",allowShowAsPivot:!0},timeChart:{label:"Time chart",class:Zu,type:"chart",allowShowAsPivot:!0},pivot:{label:"Table",class:to,type:"pivot"},"deepsee.lightpivottable":{class:to,type:"pivot"},textMeter:{label:"Text meter",class:Mh,type:"text",allowShowAsPivot:!0},map:{label:"World map",class:Nn,type:"map",allowShowAsPivot:!0},"deepsee.enhancedmapportlet":{class:Nn,type:"map",allowShowAsPivot:!0},"rf.mapportlet":{class:Nn,type:"map",allowShowAsPivot:!0},horizontalControls:{class:Zn,type:"empty"},verticalControls:{class:Zn,type:"empty"},smiley:{class:$u,allowShowAsPivot:!1},lightBar:{class:Ju,allowShowAsPivot:!1},trafficLight:{class:Qu,allowShowAsPivot:!1}};Hs[Ae.const.emptyWidgetClass]={class:Zn,type:"empty"};var Lu=(()=>{let t=class t{constructor(){}initialize(){let e=Ae.addons;if(e&&e&&e.length)for(let i=0;i{e.$item.compactEnabled!==!1&&this.moveTillCollision(e.$item,i,s)&&(t=!0,e.item[i]=e.$item[i],e.itemChanged())}),t&&this.checkCompact()}moveTillCollision(i,s,t){return i[s]+=t,this.gridster.checkCollision(i)?(i[s]-=t,!1):(this.moveTillCollision(i,s,t),!0)}},mi={gridType:v.Fit,scale:1,fixedColWidth:250,fixedRowHeight:250,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,setGridSize:!1,compactType:P.None,mobileBreakpoint:640,useBodyForBreakpoint:!1,allowMultiLayer:!1,defaultLayerIndex:0,maxLayerIndex:2,baseLayerIndex:1,minCols:1,maxCols:100,minRows:1,maxRows:100,defaultItemCols:1,defaultItemRows:1,maxItemCols:50,maxItemRows:50,minItemCols:1,minItemRows:1,minItemArea:1,maxItemArea:2500,addEmptyRowsCount:0,rowHeightRatio:1,margin:10,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,useTransformPositioning:!0,scrollSensitivity:10,scrollSpeed:20,initCallback:void 0,destroyCallback:void 0,gridSizeChangedCallback:void 0,itemChangeCallback:void 0,itemResizeCallback:void 0,itemInitCallback:void 0,itemRemovedCallback:void 0,itemValidateCallback:void 0,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,enableOccupiedCellDrop:!1,emptyCellClickCallback:void 0,emptyCellContextMenuCallback:void 0,emptyCellDropCallback:void 0,emptyCellDragCallback:void 0,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{delayStart:0,enabled:!1,ignoreContentClass:"gridster-item-content",ignoreContent:!1,dragHandleClass:"drag-handler",stop:void 0,start:void 0,dropOverItems:!1,dropOverItemsCallback:void 0},resizable:{delayStart:0,enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0},stop:void 0,start:void 0},swap:!0,swapWhileDragging:!1,pushItems:!1,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:zt.OnDragAndResize,disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1,disableScrollHorizontal:!1,disableScrollVertical:!1,enableBoundaryControl:!1,disableAutoPositionOnConflict:!1,dirType:O.LTR},L=class o{static merge(i,s,t){for(let e in s)s[e]!==void 0&&t.hasOwnProperty(e)&&(typeof s[e]=="object"?(e in i||(i[e]={}),i[e]=o.merge(i[e],s[e],t[e])):i[e]=s[e]);return i}static checkTouchEvent(i){i.clientX===void 0&&i.touches&&(i.touches&&i.touches.length?(i.clientX=i.touches[0].clientX,i.clientY=i.touches[0].clientY):i.changedTouches&&i.changedTouches.length&&(i.clientX=i.changedTouches[0].clientX,i.clientY=i.changedTouches[0].clientY))}static checkContentClassForEvent(i,s){if(i.$options.draggable.ignoreContent){if(!o.checkDragHandleClass(s.target,s.currentTarget,i.$options.draggable.dragHandleClass,i.$options.draggable.ignoreContentClass))return!0}else if(o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.ignoreContentClass))return!0;return!1}static checkContentClassForEmptyCellClickEvent(i,s){return o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.ignoreContentClass)||o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.dragHandleClass)}static checkDragHandleClass(i,s,t,e){if(!i||i===s)return!1;if(i.hasAttribute("class")){let n=i.getAttribute("class").split(" ");if(n.indexOf(t)>-1)return!0;if(n.indexOf(e)>-1)return!1}return o.checkDragHandleClass(i.parentNode,s,t,e)}static checkContentClass(i,s,t){return!i||i===s?!1:i.hasAttribute("class")&&i.getAttribute("class").split(" ").indexOf(t)>-1?!0:o.checkContentClass(i.parentNode,s,t)}static compareItems(i,s){return i.y>s.y?-1:i.ys.x?-1:1}},qt=class{constructor(i){this.gridster=i,this.emptyCellClickCb=s=>{if(!this.gridster||this.gridster.movingItem||L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellContextMenuCb=s=>{if(this.gridster.movingItem||L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellDragDrop=s=>{let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellDragOver=s=>{s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);t?(s.dataTransfer&&(s.dataTransfer.dropEffect="move"),this.gridster.movingItem=t):(s.dataTransfer&&(s.dataTransfer.dropEffect="none"),this.gridster.movingItem=null),this.gridster.previewStyle()},this.emptyCellMouseDown=s=>{if(L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);!t||s.buttons!==1&&!(s instanceof TouchEvent)||(this.initialItem=t,this.gridster.movingItem=t,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular(()=>{this.removeWindowMousemoveListenerFn=this.gridster.renderer.listen("window","mousemove",this.emptyCellMouseMove),this.removeWindowTouchmoveListenerFn=this.gridster.renderer.listen("window","touchmove",this.emptyCellMouseMove)}),this.removeWindowMouseupListenerFn=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp),this.removeWindowTouchendListenerFn=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp))},this.emptyCellMouseMove=s=>{s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s,this.initialItem);t&&(this.gridster.movingItem=t,this.gridster.previewStyle())},this.emptyCellMouseUp=s=>{this.removeWindowMousemoveListenerFn(),this.removeWindowTouchmoveListenerFn(),this.removeWindowMouseupListenerFn(),this.removeWindowTouchendListenerFn();let t=this.getValidItemFromEvent(s,this.initialItem);t&&(this.gridster.movingItem=t),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(s,this.gridster.movingItem),setTimeout(()=>{this.initialItem=null,this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle())}),this.gridster.cdRef.markForCheck()}}destroy(){this.gridster.previewStyle&&this.gridster.previewStyle(),this.gridster.movingItem=null,this.initialItem=this.gridster=null,this.removeDocumentDragendListenerFn&&(this.removeDocumentDragendListenerFn(),this.removeDocumentDragendListenerFn=null)}updateOptions(){this.gridster.$options.enableEmptyCellClick&&!this.removeEmptyCellClickListenerFn&&this.gridster.options.emptyCellClickCallback?(this.removeEmptyCellClickListenerFn=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb),this.removeEmptyCellTouchendListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb)):!this.gridster.$options.enableEmptyCellClick&&this.removeEmptyCellClickListenerFn&&this.removeEmptyCellTouchendListenerFn&&(this.removeEmptyCellClickListenerFn(),this.removeEmptyCellTouchendListenerFn(),this.removeEmptyCellClickListenerFn=null,this.removeEmptyCellTouchendListenerFn=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.removeEmptyCellContextMenuListenerFn&&this.gridster.options.emptyCellContextMenuCallback?this.removeEmptyCellContextMenuListenerFn=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb):!this.gridster.$options.enableEmptyCellContextMenu&&this.removeEmptyCellContextMenuListenerFn&&(this.removeEmptyCellContextMenuListenerFn(),this.removeEmptyCellContextMenuListenerFn=null),this.gridster.$options.enableEmptyCellDrop&&!this.removeEmptyCellDropListenerFn&&this.gridster.options.emptyCellDropCallback?(this.removeEmptyCellDropListenerFn=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop),this.gridster.zone.runOutsideAngular(()=>{this.removeEmptyCellDragoverListenerFn=this.gridster.renderer.listen(this.gridster.el,"dragover",this.emptyCellDragOver)}),this.removeDocumentDragendListenerFn=this.gridster.renderer.listen("document","dragend",()=>{this.gridster.movingItem=null,this.gridster.previewStyle()})):!this.gridster.$options.enableEmptyCellDrop&&this.removeEmptyCellDropListenerFn&&this.removeEmptyCellDragoverListenerFn&&this.removeDocumentDragendListenerFn&&(this.removeEmptyCellDropListenerFn(),this.removeEmptyCellDragoverListenerFn(),this.removeDocumentDragendListenerFn(),this.removeEmptyCellDragoverListenerFn=null,this.removeEmptyCellDropListenerFn=null,this.removeDocumentDragendListenerFn=null),this.gridster.$options.enableEmptyCellDrag&&!this.removeEmptyCellMousedownListenerFn&&this.gridster.options.emptyCellDragCallback?(this.removeEmptyCellMousedownListenerFn=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown),this.removeEmptyCellTouchstartListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown)):!this.gridster.$options.enableEmptyCellDrag&&this.removeEmptyCellMousedownListenerFn&&this.removeEmptyCellTouchstartListenerFn&&(this.removeEmptyCellMousedownListenerFn(),this.removeEmptyCellTouchstartListenerFn(),this.removeEmptyCellMousedownListenerFn=null,this.removeEmptyCellTouchstartListenerFn=null)}getPixelsX(i,s){let t=this.gridster.options.scale;return t?(i.clientX-s.left)/t+this.gridster.el.scrollLeft-this.gridster.gridRenderer.getLeftMargin():i.clientX+this.gridster.el.scrollLeft-s.left-this.gridster.gridRenderer.getLeftMargin()}getPixelsY(i,s){let t=this.gridster.options.scale;return t?(i.clientY-s.top)/t+this.gridster.el.scrollTop-this.gridster.gridRenderer.getTopMargin():i.clientY+this.gridster.el.scrollTop-s.top-this.gridster.gridRenderer.getTopMargin()}getValidItemFromEvent(i,s){i.preventDefault(),i.stopPropagation(),L.checkTouchEvent(i);let t=this.gridster.el.getBoundingClientRect(),e=this.getPixelsX(i,t),n=this.getPixelsY(i,t),r={x:this.gridster.pixelsToPositionX(e,Math.floor,!0),y:this.gridster.pixelsToPositionY(n,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(s&&(r.cols=Math.min(Math.abs(s.x-r.x)+1,this.gridster.$options.emptyCellDragMaxCols),r.rows=Math.min(Math.abs(s.y-r.y)+1,this.gridster.$options.emptyCellDragMaxRows),s.xthis.gridster.$options.emptyCellDragMaxCols-1&&(r.x=this.gridster.movingItem?this.gridster.movingItem.x:0),s.ythis.gridster.$options.emptyCellDragMaxRows-1&&(r.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),!(!this.gridster.$options.enableOccupiedCellDrop&&this.gridster.checkCollision(r)))return r}},Qt=class{constructor(i){this.gridster=i,this.lastGridColumnStyles={},this.lastGridRowStyles={}}destroy(){this.gridster=null}updateItem(i,s,t){if(this.gridster.mobile)this.clearCellPosition(t,i),this.gridster.$options.keepFixedHeightInMobile?t.setStyle(i,"height",(s.rows-1)*this.gridster.$options.margin+s.rows*this.gridster.$options.fixedRowHeight+"px"):t.setStyle(i,"height",s.rows*this.gridster.curWidth/s.cols+"px"),this.gridster.$options.keepFixedWidthInMobile?t.setStyle(i,"width",this.gridster.$options.fixedColWidth+"px"):t.setStyle(i,"width",""),t.setStyle(i,"margin-bottom",this.gridster.$options.margin+"px"),t.setStyle(i,O.LTR?"margin-right":"margin-left","");else{let e=Math.round(this.gridster.curColWidth*s.x),n=Math.round(this.gridster.curRowHeight*s.y),r=this.gridster.curColWidth*s.cols-this.gridster.$options.margin,l=this.gridster.curRowHeight*s.rows-this.gridster.$options.margin;this.setCellPosition(t,i,e,n),t.setStyle(i,"width",r+"px"),t.setStyle(i,"height",l+"px");let h=null,u=null;this.gridster.$options.outerMargin&&(this.gridster.rows===s.rows+s.y&&(this.gridster.$options.outerMarginBottom!==null?h=this.gridster.$options.outerMarginBottom+"px":h=this.gridster.$options.margin+"px"),this.gridster.columns===s.cols+s.x&&(this.gridster.$options.outerMarginBottom!==null?u=this.gridster.$options.outerMarginRight+"px":u=this.gridster.$options.margin+"px")),t.setStyle(i,"margin-bottom",h),t.setStyle(i,O.LTR?"margin-right":"margin-left",u)}}updateGridster(){let i="",s="",t="",e="";if(this.gridster.$options.gridType===v.Fit)i=v.Fit,s=v.ScrollVertical,t=v.ScrollHorizontal,e=v.Fixed;else if(this.gridster.$options.gridType===v.ScrollVertical)this.gridster.curRowHeight=this.gridster.curColWidth*this.gridster.$options.rowHeightRatio,i=v.ScrollVertical,s=v.Fit,t=v.ScrollHorizontal,e=v.Fixed;else if(this.gridster.$options.gridType===v.ScrollHorizontal){let n=this.gridster.$options.rowHeightRatio,r=n>=1?n:n+1;this.gridster.curColWidth=this.gridster.curRowHeight*r,i=v.ScrollHorizontal,s=v.Fit,t=v.ScrollVertical,e=v.Fixed}else this.gridster.$options.gridType===v.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.Fixed,s=v.Fit,t=v.ScrollVertical,e=v.ScrollHorizontal):this.gridster.$options.gridType===v.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.ScrollVertical,s=v.Fit,t=v.ScrollHorizontal,e=v.Fixed):this.gridster.$options.gridType===v.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.ScrollHorizontal,s=v.Fit,t=v.ScrollVertical,e=v.Fixed);this.gridster.mobile||this.gridster.$options.setGridSize&&this.gridster.$options.gridType!==v.Fit?this.gridster.renderer.removeClass(this.gridster.el,i):this.gridster.renderer.addClass(this.gridster.el,i),this.gridster.renderer.removeClass(this.gridster.el,s),this.gridster.renderer.removeClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,e)}getGridColumnStyle(i){let s={left:this.gridster.curColWidth*i,width:this.gridster.curColWidth-this.gridster.$options.margin,height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};s.style=Ot(it({},this.getLeftPosition(s.left)),{width:s.width+"px",height:s.height+"px"});let t=this.lastGridColumnStyles[i];return t&&t.left===s.left&&t.width===s.width&&t.height===s.height?t.style:(this.lastGridColumnStyles[i]=s,s.style)}getGridRowStyle(i){let s={top:this.gridster.curRowHeight*i,width:this.gridster.gridColumns.length*this.gridster.curColWidth+this.gridster.$options.margin,height:this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};s.style=Ot(it({},this.getTopPosition(s.top)),{width:s.width+"px",height:s.height+"px"});let t=this.lastGridRowStyles[i];return t&&t.top===s.top&&t.width===s.width&&t.height===s.height?t.style:(this.lastGridRowStyles[i]=s,s.style)}getLeftPosition(i){let s=this.gridster.$options.dirType===O.RTL?-i:i;return this.gridster.$options.useTransformPositioning?{transform:"translateX("+s+"px)"}:{left:this.getLeftMargin()+s+"px"}}getTopPosition(i){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+i+"px)"}:{top:this.getTopMargin()+i+"px"}}clearCellPosition(i,s){this.gridster.$options.useTransformPositioning?i.setStyle(s,"transform",""):(i.setStyle(s,"top",""),i.setStyle(s,"left",""))}setCellPosition(i,s,t,e){let n=this.gridster.$options.dirType===O.RTL?-t:t;if(this.gridster.$options.useTransformPositioning){let r="translate3d("+n+"px, "+e+"px, 0)";i.setStyle(s,"transform",r)}else i.setStyle(s,"left",this.getLeftMargin()+n+"px"),i.setStyle(s,"top",this.getTopMargin()+e+"px")}getLeftMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginLeft!==null?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0}getTopMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginTop!==null?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0}},gi=(()=>{let i=class i{constructor(t,e){this.renderer=e,this.el=t.nativeElement}ngOnInit(){this.sub=this.previewStyle$.subscribe(t=>this.previewStyle(t))}ngOnDestroy(){this.sub&&this.sub.unsubscribe()}previewStyle(t){t?(this.renderer.setStyle(this.el,"display","block"),this.gridRenderer.updateItem(this.el,t,this.renderer)):this.renderer.setStyle(this.el,"display","")}};i.\u0275fac=function(e){return new(e||i)(_(J),_(ot))},i.\u0275cmp=A({type:i,selectors:[["gridster-preview"]],inputs:{previewStyle$:"previewStyle$",gridRenderer:"gridRenderer"},standalone:!0,features:[X],decls:0,vars:0,template:function(e,n){},styles:[`gridster-preview{position:absolute;display:none;background:#00000026} +import{a as Pt}from"./chunk-V6EVLSKF.js";import{a as Pe,c as Fe,e as ze,f as We}from"./chunk-UGM4WZSG.js";import{c as De,d as Gt,f as wt,h as jt}from"./chunk-W7AFIDCE.js";import{a as st}from"./chunk-Y4WNFABU.js";import{a as nt}from"./chunk-EB65ROO7.js";import{a as Ee}from"./chunk-EAEBZZLM.js";import{a as Et}from"./chunk-J6F3GFQR.js";import{a as Ft}from"./chunk-RNWIIYZZ.js";import{a as ke}from"./chunk-SUAWKU6Z.js";import{a as pt,b as Me}from"./chunk-4CDX576O.js";import{c as ye,d as _e,e as ve,f as Ie,g as Se,h as Te,j as $e}from"./chunk-4NDDWB77.js";import{D as $t,E as kt,F as tt,G as be,H as xe,I as dt,J as ct,K as ft,L as Mt,d as Yt,e as we,k as Ce,u as ht}from"./chunk-B3AVEPVB.js";import{$a as a,$b as Xt,Ab as G,Ba as J,Bb as B,Bc as K,Cb as H,Da as V,Db as d,Eb as g,F as le,Fb as I,Ib as fe,Jb as y,Nb as f,Ob as c,Pb as Bt,Qb as Ht,R as ae,Rb as Q,S as Rt,Tb as j,Ub as U,Vb as q,Wb as at,X as St,Xa as pe,Xb as b,Y as he,Yb as M,Zb as Tt,_b as At,ab as _,ac as Nt,ba as z,cc as X,eb as ot,f as It,fa as A,ga as de,gb as Vt,ha as ce,hc as S,ic as T,jb as me,lb as ge,pa as gt,qa as p,ra as m,rb as F,s as ne,tb as k,ub as ut,vb as E,xb as ue,y as re,yb as x,z as oe,zb as Lt}from"./chunk-ZKAUCJHV.js";import{a as it,b as Ot}from"./chunk-DEPBX7UX.js";var Ve=["*"];function si(o,i){if(o&1&&I(0,"div",0),o&2){let s=i.$index,t=c();k("ngStyle",t.gridRenderer.getGridColumnStyle(s))}}function ni(o,i){if(o&1&&I(0,"div",1),o&2){let s=i.$index,t=c();k("ngStyle",t.gridRenderer.getGridRowStyle(s))}}function ri(o,i){if(o&1){let s=y();d(0,"div",8),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function oi(o,i){if(o&1){let s=y();d(0,"div",9),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function li(o,i){if(o&1){let s=y();d(0,"div",10),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function ai(o,i){if(o&1){let s=y();d(0,"div",11),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function hi(o,i){if(o&1){let s=y();d(0,"div",12),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function di(o,i){if(o&1){let s=y();d(0,"div",13),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function ci(o,i){if(o&1){let s=y();d(0,"div",14),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}function pi(o,i){if(o&1){let s=y();d(0,"div",15),f("mousedown",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))})("touchstart",function(e){p(s);let n=c();return m(n.resize.dragStartDelay(e))}),g()}}var v=function(o){return o.Fit="fit",o.ScrollVertical="scrollVertical",o.ScrollHorizontal="scrollHorizontal",o.Fixed="fixed",o.VerticalFixed="verticalFixed",o.HorizontalFixed="horizontalFixed",o}(v||{}),zt=function(o){return o.Always="always",o.OnDragAndResize="onDrag&Resize",o.None="none",o}(zt||{}),P=function(o){return o.None="none",o.CompactUp="compactUp",o.CompactLeft="compactLeft",o.CompactUpAndLeft="compactUp&Left",o.CompactLeftAndUp="compactLeft&Up",o.CompactRight="compactRight",o.CompactUpAndRight="compactUp&Right",o.CompactRightAndUp="compactRight&Up",o.CompactDown="compactDown",o.CompactDownAndLeft="compactDown&Left",o.CompactLeftAndDown="compactLeft&Down",o.CompactDownAndRight="compactDown&Right",o.CompactRightAndDown="compactRight&Down",o}(P||{}),O=function(o){return o.LTR="ltr",o.RTL="rtl",o}(O||{}),Ut=class{constructor(i){this.gridster=i}destroy(){this.gridster=null}checkCompact(){this.gridster.$options.compactType!==P.None&&(this.gridster.$options.compactType===P.CompactUp?this.checkCompactMovement("y",-1):this.gridster.$options.compactType===P.CompactLeft?this.checkCompactMovement("x",-1):this.gridster.$options.compactType===P.CompactUpAndLeft?(this.checkCompactMovement("y",-1),this.checkCompactMovement("x",-1)):this.gridster.$options.compactType===P.CompactLeftAndUp?(this.checkCompactMovement("x",-1),this.checkCompactMovement("y",-1)):this.gridster.$options.compactType===P.CompactRight?this.checkCompactMovement("x",1):this.gridster.$options.compactType===P.CompactUpAndRight?(this.checkCompactMovement("y",-1),this.checkCompactMovement("x",1)):this.gridster.$options.compactType===P.CompactRightAndUp?(this.checkCompactMovement("x",1),this.checkCompactMovement("y",-1)):this.gridster.$options.compactType===P.CompactDown?this.checkCompactMovement("y",1):this.gridster.$options.compactType===P.CompactDownAndLeft?(this.checkCompactMovement("y",1),this.checkCompactMovement("x",-1)):this.gridster.$options.compactType===P.CompactDownAndRight?(this.checkCompactMovement("y",1),this.checkCompactMovement("x",1)):this.gridster.$options.compactType===P.CompactLeftAndDown?(this.checkCompactMovement("x",-1),this.checkCompactMovement("y",1)):this.gridster.$options.compactType===P.CompactRightAndDown&&(this.checkCompactMovement("x",1),this.checkCompactMovement("y",1)))}checkCompactItem(i){this.gridster.$options.compactType!==P.None&&(this.gridster.$options.compactType===P.CompactUp?this.moveTillCollision(i,"y",-1):this.gridster.$options.compactType===P.CompactLeft?this.moveTillCollision(i,"x",-1):this.gridster.$options.compactType===P.CompactUpAndLeft?(this.moveTillCollision(i,"y",-1),this.moveTillCollision(i,"x",-1)):this.gridster.$options.compactType===P.CompactLeftAndUp?(this.moveTillCollision(i,"x",-1),this.moveTillCollision(i,"y",-1)):this.gridster.$options.compactType===P.CompactUpAndRight?(this.moveTillCollision(i,"y",-1),this.moveTillCollision(i,"x",1)):this.gridster.$options.compactType===P.CompactDown?this.moveTillCollision(i,"y",1):this.gridster.$options.compactType===P.CompactDownAndLeft?(this.moveTillCollision(i,"y",1),this.moveTillCollision(i,"x",-1)):this.gridster.$options.compactType===P.CompactLeftAndDown?(this.moveTillCollision(i,"x",-1),this.moveTillCollision(i,"y",1)):this.gridster.$options.compactType===P.CompactDownAndRight?(this.moveTillCollision(i,"y",1),this.moveTillCollision(i,"x",1)):this.gridster.$options.compactType===P.CompactRightAndDown&&(this.moveTillCollision(i,"x",1),this.moveTillCollision(i,"y",1)))}checkCompactMovement(i,s){let t=!1;this.gridster.grid.forEach(e=>{e.$item.compactEnabled!==!1&&this.moveTillCollision(e.$item,i,s)&&(t=!0,e.item[i]=e.$item[i],e.itemChanged())}),t&&this.checkCompact()}moveTillCollision(i,s,t){return i[s]+=t,this.gridster.checkCollision(i)?(i[s]-=t,!1):(this.moveTillCollision(i,s,t),!0)}},mi={gridType:v.Fit,scale:1,fixedColWidth:250,fixedRowHeight:250,keepFixedHeightInMobile:!1,keepFixedWidthInMobile:!1,setGridSize:!1,compactType:P.None,mobileBreakpoint:640,useBodyForBreakpoint:!1,allowMultiLayer:!1,defaultLayerIndex:0,maxLayerIndex:2,baseLayerIndex:1,minCols:1,maxCols:100,minRows:1,maxRows:100,defaultItemCols:1,defaultItemRows:1,maxItemCols:50,maxItemRows:50,minItemCols:1,minItemRows:1,minItemArea:1,maxItemArea:2500,addEmptyRowsCount:0,rowHeightRatio:1,margin:10,outerMargin:!0,outerMarginTop:null,outerMarginRight:null,outerMarginBottom:null,outerMarginLeft:null,useTransformPositioning:!0,scrollSensitivity:10,scrollSpeed:20,initCallback:void 0,destroyCallback:void 0,gridSizeChangedCallback:void 0,itemChangeCallback:void 0,itemResizeCallback:void 0,itemInitCallback:void 0,itemRemovedCallback:void 0,itemValidateCallback:void 0,enableEmptyCellClick:!1,enableEmptyCellContextMenu:!1,enableEmptyCellDrop:!1,enableEmptyCellDrag:!1,enableOccupiedCellDrop:!1,emptyCellClickCallback:void 0,emptyCellContextMenuCallback:void 0,emptyCellDropCallback:void 0,emptyCellDragCallback:void 0,emptyCellDragMaxCols:50,emptyCellDragMaxRows:50,ignoreMarginInRow:!1,draggable:{delayStart:0,enabled:!1,ignoreContentClass:"gridster-item-content",ignoreContent:!1,dragHandleClass:"drag-handler",stop:void 0,start:void 0,dropOverItems:!1,dropOverItemsCallback:void 0},resizable:{delayStart:0,enabled:!1,handles:{s:!0,e:!0,n:!0,w:!0,se:!0,ne:!0,sw:!0,nw:!0},stop:void 0,start:void 0},swap:!0,swapWhileDragging:!1,pushItems:!1,disablePushOnDrag:!1,disablePushOnResize:!1,pushDirections:{north:!0,east:!0,south:!0,west:!0},pushResizeItems:!1,displayGrid:zt.OnDragAndResize,disableWindowResize:!1,disableWarnings:!1,scrollToNewItems:!1,disableScrollHorizontal:!1,disableScrollVertical:!1,enableBoundaryControl:!1,disableAutoPositionOnConflict:!1,dirType:O.LTR},L=class o{static merge(i,s,t){for(let e in s)s[e]!==void 0&&t.hasOwnProperty(e)&&(typeof s[e]=="object"?(e in i||(i[e]={}),i[e]=o.merge(i[e],s[e],t[e])):i[e]=s[e]);return i}static checkTouchEvent(i){i.clientX===void 0&&i.touches&&(i.touches&&i.touches.length?(i.clientX=i.touches[0].clientX,i.clientY=i.touches[0].clientY):i.changedTouches&&i.changedTouches.length&&(i.clientX=i.changedTouches[0].clientX,i.clientY=i.changedTouches[0].clientY))}static checkContentClassForEvent(i,s){if(i.$options.draggable.ignoreContent){if(!o.checkDragHandleClass(s.target,s.currentTarget,i.$options.draggable.dragHandleClass,i.$options.draggable.ignoreContentClass))return!0}else if(o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.ignoreContentClass))return!0;return!1}static checkContentClassForEmptyCellClickEvent(i,s){return o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.ignoreContentClass)||o.checkContentClass(s.target,s.currentTarget,i.$options.draggable.dragHandleClass)}static checkDragHandleClass(i,s,t,e){if(!i||i===s)return!1;if(i.hasAttribute("class")){let n=i.getAttribute("class").split(" ");if(n.indexOf(t)>-1)return!0;if(n.indexOf(e)>-1)return!1}return o.checkDragHandleClass(i.parentNode,s,t,e)}static checkContentClass(i,s,t){return!i||i===s?!1:i.hasAttribute("class")&&i.getAttribute("class").split(" ").indexOf(t)>-1?!0:o.checkContentClass(i.parentNode,s,t)}static compareItems(i,s){return i.y>s.y?-1:i.ys.x?-1:1}},qt=class{constructor(i){this.gridster=i,this.emptyCellClickCb=s=>{if(!this.gridster||this.gridster.movingItem||L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellClickCallback&&this.gridster.options.emptyCellClickCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellContextMenuCb=s=>{if(this.gridster.movingItem||L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellContextMenuCallback&&this.gridster.options.emptyCellContextMenuCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellDragDrop=s=>{let t=this.getValidItemFromEvent(s);t&&(this.gridster.options.emptyCellDropCallback&&this.gridster.options.emptyCellDropCallback(s,t),this.gridster.cdRef.markForCheck())},this.emptyCellDragOver=s=>{s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);t?(s.dataTransfer&&(s.dataTransfer.dropEffect="move"),this.gridster.movingItem=t):(s.dataTransfer&&(s.dataTransfer.dropEffect="none"),this.gridster.movingItem=null),this.gridster.previewStyle()},this.emptyCellMouseDown=s=>{if(L.checkContentClassForEmptyCellClickEvent(this.gridster,s))return;s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s);!t||s.buttons!==1&&!(s instanceof TouchEvent)||(this.initialItem=t,this.gridster.movingItem=t,this.gridster.previewStyle(),this.gridster.zone.runOutsideAngular(()=>{this.removeWindowMousemoveListenerFn=this.gridster.renderer.listen("window","mousemove",this.emptyCellMouseMove),this.removeWindowTouchmoveListenerFn=this.gridster.renderer.listen("window","touchmove",this.emptyCellMouseMove)}),this.removeWindowMouseupListenerFn=this.gridster.renderer.listen("window","mouseup",this.emptyCellMouseUp),this.removeWindowTouchendListenerFn=this.gridster.renderer.listen("window","touchend",this.emptyCellMouseUp))},this.emptyCellMouseMove=s=>{s.preventDefault(),s.stopPropagation();let t=this.getValidItemFromEvent(s,this.initialItem);t&&(this.gridster.movingItem=t,this.gridster.previewStyle())},this.emptyCellMouseUp=s=>{this.removeWindowMousemoveListenerFn(),this.removeWindowTouchmoveListenerFn(),this.removeWindowMouseupListenerFn(),this.removeWindowTouchendListenerFn();let t=this.getValidItemFromEvent(s,this.initialItem);t&&(this.gridster.movingItem=t),this.gridster.options.emptyCellDragCallback&&this.gridster.movingItem&&this.gridster.options.emptyCellDragCallback(s,this.gridster.movingItem),setTimeout(()=>{this.initialItem=null,this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle())}),this.gridster.cdRef.markForCheck()}}destroy(){this.gridster.previewStyle&&this.gridster.previewStyle(),this.gridster.movingItem=null,this.initialItem=this.gridster=null,this.removeDocumentDragendListenerFn&&(this.removeDocumentDragendListenerFn(),this.removeDocumentDragendListenerFn=null)}updateOptions(){this.gridster.$options.enableEmptyCellClick&&!this.removeEmptyCellClickListenerFn&&this.gridster.options.emptyCellClickCallback?(this.removeEmptyCellClickListenerFn=this.gridster.renderer.listen(this.gridster.el,"click",this.emptyCellClickCb),this.removeEmptyCellTouchendListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchend",this.emptyCellClickCb)):!this.gridster.$options.enableEmptyCellClick&&this.removeEmptyCellClickListenerFn&&this.removeEmptyCellTouchendListenerFn&&(this.removeEmptyCellClickListenerFn(),this.removeEmptyCellTouchendListenerFn(),this.removeEmptyCellClickListenerFn=null,this.removeEmptyCellTouchendListenerFn=null),this.gridster.$options.enableEmptyCellContextMenu&&!this.removeEmptyCellContextMenuListenerFn&&this.gridster.options.emptyCellContextMenuCallback?this.removeEmptyCellContextMenuListenerFn=this.gridster.renderer.listen(this.gridster.el,"contextmenu",this.emptyCellContextMenuCb):!this.gridster.$options.enableEmptyCellContextMenu&&this.removeEmptyCellContextMenuListenerFn&&(this.removeEmptyCellContextMenuListenerFn(),this.removeEmptyCellContextMenuListenerFn=null),this.gridster.$options.enableEmptyCellDrop&&!this.removeEmptyCellDropListenerFn&&this.gridster.options.emptyCellDropCallback?(this.removeEmptyCellDropListenerFn=this.gridster.renderer.listen(this.gridster.el,"drop",this.emptyCellDragDrop),this.gridster.zone.runOutsideAngular(()=>{this.removeEmptyCellDragoverListenerFn=this.gridster.renderer.listen(this.gridster.el,"dragover",this.emptyCellDragOver)}),this.removeDocumentDragendListenerFn=this.gridster.renderer.listen("document","dragend",()=>{this.gridster.movingItem=null,this.gridster.previewStyle()})):!this.gridster.$options.enableEmptyCellDrop&&this.removeEmptyCellDropListenerFn&&this.removeEmptyCellDragoverListenerFn&&this.removeDocumentDragendListenerFn&&(this.removeEmptyCellDropListenerFn(),this.removeEmptyCellDragoverListenerFn(),this.removeDocumentDragendListenerFn(),this.removeEmptyCellDragoverListenerFn=null,this.removeEmptyCellDropListenerFn=null,this.removeDocumentDragendListenerFn=null),this.gridster.$options.enableEmptyCellDrag&&!this.removeEmptyCellMousedownListenerFn&&this.gridster.options.emptyCellDragCallback?(this.removeEmptyCellMousedownListenerFn=this.gridster.renderer.listen(this.gridster.el,"mousedown",this.emptyCellMouseDown),this.removeEmptyCellTouchstartListenerFn=this.gridster.renderer.listen(this.gridster.el,"touchstart",this.emptyCellMouseDown)):!this.gridster.$options.enableEmptyCellDrag&&this.removeEmptyCellMousedownListenerFn&&this.removeEmptyCellTouchstartListenerFn&&(this.removeEmptyCellMousedownListenerFn(),this.removeEmptyCellTouchstartListenerFn(),this.removeEmptyCellMousedownListenerFn=null,this.removeEmptyCellTouchstartListenerFn=null)}getPixelsX(i,s){let t=this.gridster.options.scale;return t?(i.clientX-s.left)/t+this.gridster.el.scrollLeft-this.gridster.gridRenderer.getLeftMargin():i.clientX+this.gridster.el.scrollLeft-s.left-this.gridster.gridRenderer.getLeftMargin()}getPixelsY(i,s){let t=this.gridster.options.scale;return t?(i.clientY-s.top)/t+this.gridster.el.scrollTop-this.gridster.gridRenderer.getTopMargin():i.clientY+this.gridster.el.scrollTop-s.top-this.gridster.gridRenderer.getTopMargin()}getValidItemFromEvent(i,s){i.preventDefault(),i.stopPropagation(),L.checkTouchEvent(i);let t=this.gridster.el.getBoundingClientRect(),e=this.getPixelsX(i,t),n=this.getPixelsY(i,t),r={x:this.gridster.pixelsToPositionX(e,Math.floor,!0),y:this.gridster.pixelsToPositionY(n,Math.floor,!0),cols:this.gridster.$options.defaultItemCols,rows:this.gridster.$options.defaultItemRows};if(s&&(r.cols=Math.min(Math.abs(s.x-r.x)+1,this.gridster.$options.emptyCellDragMaxCols),r.rows=Math.min(Math.abs(s.y-r.y)+1,this.gridster.$options.emptyCellDragMaxRows),s.xthis.gridster.$options.emptyCellDragMaxCols-1&&(r.x=this.gridster.movingItem?this.gridster.movingItem.x:0),s.ythis.gridster.$options.emptyCellDragMaxRows-1&&(r.y=this.gridster.movingItem?this.gridster.movingItem.y:0)),!(!this.gridster.$options.enableOccupiedCellDrop&&this.gridster.checkCollision(r)))return r}},Qt=class{constructor(i){this.gridster=i,this.lastGridColumnStyles={},this.lastGridRowStyles={}}destroy(){this.gridster=null}updateItem(i,s,t){if(this.gridster.mobile)this.clearCellPosition(t,i),this.gridster.$options.keepFixedHeightInMobile?t.setStyle(i,"height",(s.rows-1)*this.gridster.$options.margin+s.rows*this.gridster.$options.fixedRowHeight+"px"):t.setStyle(i,"height",s.rows*this.gridster.curWidth/s.cols+"px"),this.gridster.$options.keepFixedWidthInMobile?t.setStyle(i,"width",this.gridster.$options.fixedColWidth+"px"):t.setStyle(i,"width",""),t.setStyle(i,"margin-bottom",this.gridster.$options.margin+"px"),t.setStyle(i,O.LTR?"margin-right":"margin-left","");else{let e=Math.round(this.gridster.curColWidth*s.x),n=Math.round(this.gridster.curRowHeight*s.y),r=this.gridster.curColWidth*s.cols-this.gridster.$options.margin,l=this.gridster.curRowHeight*s.rows-this.gridster.$options.margin;this.setCellPosition(t,i,e,n),t.setStyle(i,"width",r+"px"),t.setStyle(i,"height",l+"px");let h=null,u=null;this.gridster.$options.outerMargin&&(this.gridster.rows===s.rows+s.y&&(this.gridster.$options.outerMarginBottom!==null?h=this.gridster.$options.outerMarginBottom+"px":h=this.gridster.$options.margin+"px"),this.gridster.columns===s.cols+s.x&&(this.gridster.$options.outerMarginBottom!==null?u=this.gridster.$options.outerMarginRight+"px":u=this.gridster.$options.margin+"px")),t.setStyle(i,"margin-bottom",h),t.setStyle(i,O.LTR?"margin-right":"margin-left",u)}}updateGridster(){let i="",s="",t="",e="";if(this.gridster.$options.gridType===v.Fit)i=v.Fit,s=v.ScrollVertical,t=v.ScrollHorizontal,e=v.Fixed;else if(this.gridster.$options.gridType===v.ScrollVertical)this.gridster.curRowHeight=this.gridster.curColWidth*this.gridster.$options.rowHeightRatio,i=v.ScrollVertical,s=v.Fit,t=v.ScrollHorizontal,e=v.Fixed;else if(this.gridster.$options.gridType===v.ScrollHorizontal){let n=this.gridster.$options.rowHeightRatio,r=n>=1?n:n+1;this.gridster.curColWidth=this.gridster.curRowHeight*r,i=v.ScrollHorizontal,s=v.Fit,t=v.ScrollVertical,e=v.Fixed}else this.gridster.$options.gridType===v.Fixed?(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.Fixed,s=v.Fit,t=v.ScrollVertical,e=v.ScrollHorizontal):this.gridster.$options.gridType===v.VerticalFixed?(this.gridster.curRowHeight=this.gridster.$options.fixedRowHeight+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.ScrollVertical,s=v.Fit,t=v.ScrollHorizontal,e=v.Fixed):this.gridster.$options.gridType===v.HorizontalFixed&&(this.gridster.curColWidth=this.gridster.$options.fixedColWidth+(this.gridster.$options.ignoreMarginInRow?0:this.gridster.$options.margin),i=v.ScrollHorizontal,s=v.Fit,t=v.ScrollVertical,e=v.Fixed);this.gridster.mobile||this.gridster.$options.setGridSize&&this.gridster.$options.gridType!==v.Fit?this.gridster.renderer.removeClass(this.gridster.el,i):this.gridster.renderer.addClass(this.gridster.el,i),this.gridster.renderer.removeClass(this.gridster.el,s),this.gridster.renderer.removeClass(this.gridster.el,t),this.gridster.renderer.removeClass(this.gridster.el,e)}getGridColumnStyle(i){let s={left:this.gridster.curColWidth*i,width:this.gridster.curColWidth-this.gridster.$options.margin,height:this.gridster.gridRows.length*this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};s.style=Ot(it({},this.getLeftPosition(s.left)),{width:s.width+"px",height:s.height+"px"});let t=this.lastGridColumnStyles[i];return t&&t.left===s.left&&t.width===s.width&&t.height===s.height?t.style:(this.lastGridColumnStyles[i]=s,s.style)}getGridRowStyle(i){let s={top:this.gridster.curRowHeight*i,width:this.gridster.gridColumns.length*this.gridster.curColWidth+this.gridster.$options.margin,height:this.gridster.curRowHeight-this.gridster.$options.margin,style:{}};s.style=Ot(it({},this.getTopPosition(s.top)),{width:s.width+"px",height:s.height+"px"});let t=this.lastGridRowStyles[i];return t&&t.top===s.top&&t.width===s.width&&t.height===s.height?t.style:(this.lastGridRowStyles[i]=s,s.style)}getLeftPosition(i){let s=this.gridster.$options.dirType===O.RTL?-i:i;return this.gridster.$options.useTransformPositioning?{transform:"translateX("+s+"px)"}:{left:this.getLeftMargin()+s+"px"}}getTopPosition(i){return this.gridster.$options.useTransformPositioning?{transform:"translateY("+i+"px)"}:{top:this.getTopMargin()+i+"px"}}clearCellPosition(i,s){this.gridster.$options.useTransformPositioning?i.setStyle(s,"transform",""):(i.setStyle(s,"top",""),i.setStyle(s,"left",""))}setCellPosition(i,s,t,e){let n=this.gridster.$options.dirType===O.RTL?-t:t;if(this.gridster.$options.useTransformPositioning){let r="translate3d("+n+"px, "+e+"px, 0)";i.setStyle(s,"transform",r)}else i.setStyle(s,"left",this.getLeftMargin()+n+"px"),i.setStyle(s,"top",this.getTopMargin()+e+"px")}getLeftMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginLeft!==null?this.gridster.$options.outerMarginLeft:this.gridster.$options.margin:0}getTopMargin(){return this.gridster.$options.outerMargin?this.gridster.$options.outerMarginTop!==null?this.gridster.$options.outerMarginTop:this.gridster.$options.margin:0}},gi=(()=>{let i=class i{constructor(t,e){this.renderer=e,this.el=t.nativeElement}ngOnInit(){this.sub=this.previewStyle$.subscribe(t=>this.previewStyle(t))}ngOnDestroy(){this.sub&&this.sub.unsubscribe()}previewStyle(t){t?(this.renderer.setStyle(this.el,"display","block"),this.gridRenderer.updateItem(this.el,t,this.renderer)):this.renderer.setStyle(this.el,"display","")}};i.\u0275fac=function(e){return new(e||i)(_(J),_(ot))},i.\u0275cmp=A({type:i,selectors:[["gridster-preview"]],inputs:{previewStyle$:"previewStyle$",gridRenderer:"gridRenderer"},standalone:!0,features:[X],decls:0,vars:0,template:function(e,n){},styles:[`gridster-preview{position:absolute;display:none;background:#00000026} `],encapsulation:2});let o=i;return o})(),ee=(()=>{let i=class i{constructor(t,e,n,r){this.renderer=e,this.cdRef=n,this.zone=r,this.columns=0,this.rows=0,this.gridColumns=[],this.gridRows=[],this.previewStyle$=new V,this.calculateLayout$=new It,this.resize$=new It,this.destroy$=new It,this.optionsChanged=()=>{this.setOptions();let l=this.grid.length-1,h;for(;l>=0;l--)h=this.grid[l],h.updateOptions();this.calculateLayout()},this.onResize=()=>{this.el.clientWidth&&(this.options.setGridSize&&(this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.setGridSize(),this.calculateLayout())},this.getNextPossiblePosition=(l,h={})=>{l.cols===-1&&(l.cols=this.$options.defaultItemCols),l.rows===-1&&(l.rows=this.$options.defaultItemRows),this.setGridDimensions();let u=h.y||0,w;for(;u=this.rows+l.rows,$=this.$options.maxCols>=this.columns+l.cols;return!(this.rows<=this.columns&&C)&&$?(l.x=this.columns,l.y=0,!0):C?(l.y=this.rows,l.x=0,!0):!1},this.getFirstPossiblePosition=l=>{let h=Object.assign({},l);return this.getNextPossiblePosition(h),h},this.getLastPossiblePosition=l=>{let h={y:0,x:0};h=this.grid.reduce((w,C)=>{let $={y:C.$item.y+C.$item.rows-1,x:C.$item.x+C.$item.cols-1};return L.compareItems(w,$)===1?$:w},h);let u=Object.assign({},l);return this.getNextPossiblePosition(u,h),u},this.el=t.nativeElement,this.$options=JSON.parse(JSON.stringify(mi)),this.mobile=!1,this.curWidth=0,this.curHeight=0,this.grid=[],this.curColWidth=0,this.curRowHeight=0,this.dragInProgress=!1,this.emptyCell=new qt(this),this.compact=new Ut(this),this.gridRenderer=new Qt(this)}static checkCollisionTwoItemsForSwaping(t,e){let n=t.cols===1?0:1,r=e.cols===1?0:1,l=t.rows===1?0:1,h=e.rows===1?0:1;return t.x+ne.x+r&&t.y+le.y+h}checkCollisionTwoItems(t,e){if(!(t.xe.x&&t.ye.y))return!1;if(!this.$options.allowMultiLayer)return!0;let r=this.$options.defaultLayerIndex,l=t.layerIndex===void 0?r:t.layerIndex,h=e.layerIndex===void 0?r:e.layerIndex;return l===h}ngOnInit(){this.options.initCallback&&this.options.initCallback(this),this.calculateLayout$.pipe(le(0),Rt(this.destroy$)).subscribe(()=>this.calculateLayout()),this.resize$.pipe(ae(()=>oe(100)),Rt(this.destroy$)).subscribe(()=>this.resize())}ngOnChanges(t){t.options&&(this.setOptions(),this.options.api={optionsChanged:this.optionsChanged,resize:this.onResize,getNextPossiblePosition:this.getNextPossiblePosition,getFirstPossiblePosition:this.getFirstPossiblePosition,getLastPossiblePosition:this.getLastPossiblePosition,getItemComponent:e=>this.getItemComponent(e)},this.columns=this.$options.minCols,this.rows=this.$options.minRows+this.$options.addEmptyRowsCount,this.setGridSize(),this.calculateLayout())}resize(){let t,e;this.$options.gridType==="fit"&&!this.mobile?(e=this.el.offsetWidth,t=this.el.offsetHeight):(e=this.el.clientWidth,t=this.el.clientHeight),(e!==this.curWidth||t!==this.curHeight)&&this.checkIfToResize()&&this.onResize()}setOptions(){this.$options=L.merge(this.$options,this.options,this.$options),!this.$options.disableWindowResize&&!this.windowResize?this.windowResize=this.renderer.listen("window","resize",this.onResize):this.$options.disableWindowResize&&this.windowResize&&(this.windowResize(),this.windowResize=null),this.emptyCell.updateOptions()}ngOnDestroy(){this.destroy$.next(),this.previewStyle$.complete(),this.windowResize&&this.windowResize(),this.options&&this.options.destroyCallback&&this.options.destroyCallback(this),this.options&&this.options.api&&(this.options.api.resize=void 0,this.options.api.optionsChanged=void 0,this.options.api.getNextPossiblePosition=void 0,this.options.api=void 0),this.emptyCell.destroy(),this.emptyCell=null,this.compact.destroy(),this.compact=null}checkIfToResize(){let t=this.el.clientWidth,e=this.el.offsetWidth,n=this.el.scrollWidth,r=this.el.clientHeight,l=this.el.offsetHeight,h=this.el.scrollHeight,u=tl&&h-le&&n-edocument.body.clientWidth:this.$options.mobileBreakpoint>this.curWidth}setGridSize(){let t=this.el,e,n;this.$options.setGridSize||this.$options.gridType===v.Fit&&!this.mobile?(e=t.offsetWidth,n=t.offsetHeight):(e=t.clientWidth,n=t.clientHeight),this.curWidth=e,this.curHeight=n}setGridDimensions(){this.setGridSize(),!this.mobile&&this.checkIfMobile()?(this.mobile=!this.mobile,this.renderer.addClass(this.el,"mobile")):this.mobile&&!this.checkIfMobile()&&(this.mobile=!this.mobile,this.renderer.removeClass(this.el,"mobile"));let t=this.$options.minRows,e=this.$options.minCols,n=this.grid.length-1,r;for(;n>=0;n--)r=this.grid[n],r.notPlaced||(t=Math.max(t,r.$item.y+r.$item.rows),e=Math.max(e,r.$item.x+r.$item.cols));t+=this.$options.addEmptyRowsCount,(this.columns!==e||this.rows!==t)&&(this.columns=e,this.rows=t,this.options.gridSizeChangedCallback&&this.options.gridSizeChangedCallback(this))}calculateLayout(){if(this.compact&&this.compact.checkCompact(),this.setGridDimensions(),this.$options.outerMargin){let n=-this.$options.margin;this.$options.outerMarginLeft!==null?(n+=this.$options.outerMarginLeft,this.renderer.setStyle(this.el,"padding-left",this.$options.outerMarginLeft+"px")):(n+=this.$options.margin,this.renderer.setStyle(this.el,"padding-left",this.$options.margin+"px")),this.$options.outerMarginRight!==null?(n+=this.$options.outerMarginRight,this.renderer.setStyle(this.el,"padding-right",this.$options.outerMarginRight+"px")):(n+=this.$options.margin,this.renderer.setStyle(this.el,"padding-right",this.$options.margin+"px")),this.curColWidth=(this.curWidth-n)/this.columns;let r=-this.$options.margin;this.$options.outerMarginTop!==null?(r+=this.$options.outerMarginTop,this.renderer.setStyle(this.el,"padding-top",this.$options.outerMarginTop+"px")):(r+=this.$options.margin,this.renderer.setStyle(this.el,"padding-top",this.$options.margin+"px")),this.$options.outerMarginBottom!==null?(r+=this.$options.outerMarginBottom,this.renderer.setStyle(this.el,"padding-bottom",this.$options.outerMarginBottom+"px")):(r+=this.$options.margin,this.renderer.setStyle(this.el,"padding-bottom",this.$options.margin+"px")),this.curRowHeight=(this.curHeight-r)/this.rows*this.$options.rowHeightRatio}else this.curColWidth=(this.curWidth+this.$options.margin)/this.columns,this.curRowHeight=(this.curHeight+this.$options.margin)/this.rows*this.$options.rowHeightRatio,this.renderer.setStyle(this.el,"padding-left","0px"),this.renderer.setStyle(this.el,"padding-right","0px"),this.renderer.setStyle(this.el,"padding-top","0px"),this.renderer.setStyle(this.el,"padding-bottom","0px");this.gridRenderer.updateGridster(),this.$options.setGridSize?(this.renderer.addClass(this.el,"gridSize"),this.mobile||(this.renderer.setStyle(this.el,"width",this.columns*this.curColWidth+this.$options.margin+"px"),this.renderer.setStyle(this.el,"height",this.rows*this.curRowHeight+this.$options.margin+"px"))):(this.renderer.removeClass(this.el,"gridSize"),this.renderer.setStyle(this.el,"width",""),this.renderer.setStyle(this.el,"height","")),this.updateGrid();let t=this.grid.length-1,e;for(;t>=0;t--)e=this.grid[t],e.setSize(),e.drag.toggle(),e.resize.toggle();this.resize$.next()}updateGrid(){this.$options.displayGrid==="always"&&!this.mobile?this.renderer.addClass(this.el,"display-grid"):this.$options.displayGrid==="onDrag&Resize"&&this.dragInProgress?this.renderer.addClass(this.el,"display-grid"):(this.$options.displayGrid==="none"||!this.dragInProgress||this.mobile)&&this.renderer.removeClass(this.el,"display-grid"),this.setGridDimensions(),this.gridColumns.length=i.getNewArrayLength(this.columns,this.curWidth,this.curColWidth),this.gridRows.length=i.getNewArrayLength(this.rows,this.curHeight,this.curRowHeight),this.cdRef.markForCheck()}addItem(t){t.$item.cols===void 0&&(t.$item.cols=this.$options.defaultItemCols,t.item.cols=t.$item.cols,t.itemChanged()),t.$item.rows===void 0&&(t.$item.rows=this.$options.defaultItemRows,t.item.rows=t.$item.rows,t.itemChanged()),t.$item.x===-1||t.$item.y===-1?this.autoPositionItem(t):this.checkCollision(t.$item)&&(this.$options.disableWarnings||(t.notPlaced=!0,console.warn("Can't be placed in the bounds of the dashboard, trying to auto position!/n"+JSON.stringify(t.item,["cols","rows","x","y"]))),this.$options.disableAutoPositionOnConflict?t.notPlaced=!0:this.autoPositionItem(t)),this.grid.push(t),this.calculateLayout$.next()}removeItem(t){this.grid.splice(this.grid.indexOf(t),1),this.calculateLayout$.next(),this.options.itemRemovedCallback&&this.options.itemRemovedCallback(t.item,t)}checkCollision(t){let e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){let n=this.findItemWithItem(t);n&&(e=n)}return e}checkGridCollision(t){let e=t.y>-1&&t.x>-1,n=t.cols+t.x<=this.$options.maxCols,r=t.rows+t.y<=this.$options.maxRows,l=t.maxItemCols===void 0?this.$options.maxItemCols:t.maxItemCols,h=t.minItemCols===void 0?this.$options.minItemCols:t.minItemCols,u=t.maxItemRows===void 0?this.$options.maxItemRows:t.maxItemRows,w=t.minItemRows===void 0?this.$options.minItemRows:t.minItemRows,C=t.cols<=l&&t.cols>=h,$=t.rows<=u&&t.rows>=w,W=t.minItemArea===void 0?this.$options.minItemArea:t.minItemArea,R=t.maxItemArea===void 0?this.$options.maxItemArea:t.maxItemArea,D=t.cols*t.rows,Z=W<=D,mt=R>=D;return!(e&&n&&r&&C&&$&&Z&&mt)}findItemWithItem(t){let e=0,n;for(;ee.item===t)}checkCollisionForSwaping(t){let e=!1;if(this.options.itemValidateCallback&&(e=!this.options.itemValidateCallback(t)),!e&&this.checkGridCollision(t)&&(e=!0),!e){let n=this.findItemWithItemForSwapping(t);n&&(e=n)}return e}findItemWithItemForSwapping(t){let e=this.grid.length-1,n;for(;e>-1;e--)if(n=this.grid[e],n.$item!==t&&i.checkCollisionTwoItemsForSwaping(n.$item,t))return n;return!1}previewStyle(t=!1){this.movingItem?(this.compact&&t&&this.compact.checkCompactItem(this.movingItem),this.previewStyle$.next(this.movingItem)):this.previewStyle$.next(null)}static getNewArrayLength(t,e,n){let r=Math.max(t,Math.floor(e/n));return r<0?0:Number.isFinite(r)?Math.floor(r):0}};i.\u0275fac=function(e){return new(e||i)(_(J),_(ot),_(K),_(Vt))},i.\u0275cmp=A({type:i,selectors:[["gridster"]],inputs:{options:"options"},standalone:!0,features:[gt,X],ngContentSelectors:Ve,decls:6,vars:2,consts:[[1,"gridster-column",3,"ngStyle"],[1,"gridster-row",3,"ngStyle"],[1,"gridster-preview",3,"gridRenderer","previewStyle$"]],template:function(e,n){e&1&&(Bt(),B(0,si,1,1,"div",0,Lt),B(2,ni,1,1,"div",1,Lt),Ht(4),I(5,"gridster-preview",2)),e&2&&(H(n.gridColumns),a(2),H(n.gridRows),a(3),k("gridRenderer",n.gridRenderer)("previewStyle$",n.previewStyle$))},dependencies:[we,gi],styles:[`gridster{position:relative;box-sizing:border-box;background:gray;width:100%;height:100%;-webkit-user-select:none;user-select:none;display:block}gridster.fit{overflow-x:hidden;overflow-y:hidden}gridster.scrollVertical{overflow-x:hidden;overflow-y:auto}gridster.scrollHorizontal{overflow-x:auto;overflow-y:hidden}gridster.fixed{overflow:auto}gridster.mobile{overflow-x:hidden;overflow-y:auto}gridster.mobile gridster-item{position:relative}gridster.gridSize{height:initial;width:initial}gridster.gridSize.fit{height:100%;width:100%}gridster .gridster-column,gridster .gridster-row{position:absolute;display:none;transition:.3s;box-sizing:border-box}gridster.display-grid .gridster-column,gridster.display-grid .gridster-row{display:block}gridster .gridster-column{border-left:1px solid white;border-right:1px solid white}gridster .gridster-row{border-top:1px solid white;border-bottom:1px solid white} `],encapsulation:2});let o=i;return o})(),Dt=class{constructor(i){this.iteration=0,this.pushedItems=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],this.pushedItemsPath=[],this.gridsterItem=i,this.gridster=i.gridster,this.tryPattern={fromEast:[this.tryWest,this.trySouth,this.tryNorth,this.tryEast],fromWest:[this.tryEast,this.trySouth,this.tryNorth,this.tryWest],fromNorth:[this.trySouth,this.tryEast,this.tryWest,this.tryNorth],fromSouth:[this.tryNorth,this.tryEast,this.tryWest,this.trySouth]},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}destroy(){this.gridster=this.gridsterItem=null}pushItems(i,s){if(this.gridster.$options.pushItems&&!s){this.pushedItemsOrder=[],this.iteration=0;let t=this.push(this.gridsterItem,i);return t||this.restoreTempItems(),this.pushedItemsOrder=[],this.pushedItemsTemp=[],this.pushedItemsTempPath=[],t}else return!1}restoreTempItems(){let i=this.pushedItemsTemp.length-1;for(;i>-1;i--)this.removeFromTempPushed(this.pushedItemsTemp[i])}restoreItems(){let i=0,s=this.pushedItems.length,t;for(;i-1;i--)this.checkPushedItem(this.pushedItems[i],i)&&(s=!0);s&&this.checkPushBack()}push(i,s){if(this.iteration>100)return console.warn("max iteration reached"),!1;if(this.gridster.checkGridCollision(i.$item)||s==="")return!1;let t=this.gridster.findItemsWithItem(i.$item),e=s===this.fromNorth||s===this.fromWest;t.sort((u,w)=>e?w.$item.y-u.$item.y||w.$item.x-u.$item.x:u.$item.y-w.$item.y||u.$item.x-w.$item.x);let n=0,r,l=!0,h=[];for(;n-1&&this.pushedItemsTempPath[u].length>10){l=!1;break}if(this.tryPattern[s][0].call(this,r,i))this.pushedItemsOrder.push(r),h.push(r);else if(this.tryPattern[s][1].call(this,r,i))this.pushedItemsOrder.push(r),h.push(r);else if(this.tryPattern[s][2].call(this,r,i))this.pushedItemsOrder.push(r),h.push(r);else if(this.tryPattern[s][3].call(this,r,i))this.pushedItemsOrder.push(r),h.push(r);else{l=!1;break}}if(!l&&(n=this.pushedItemsOrder.lastIndexOf(h[0]),n>-1)){let u=this.pushedItemsOrder.length-1;for(;u>=n;u--)r=this.pushedItemsOrder[u],this.pushedItemsOrder.pop(),this.removeFromTempPushed(r),this.removeFromPushedItem(r)}return this.iteration++,l}trySouth(i,s){return this.gridster.$options.pushDirections.south?(this.addToTempPushed(i),i.$item.y=s.$item.y+s.$item.rows,this.push(i,this.fromNorth)?(i.setSize(),this.addToPushed(i),!0):(this.removeFromTempPushed(i),!1)):!1}tryNorth(i,s){return this.gridster.$options.pushDirections.north?(this.addToTempPushed(i),i.$item.y=s.$item.y-i.$item.rows,this.push(i,this.fromSouth)?(i.setSize(),this.addToPushed(i),!0):(this.removeFromTempPushed(i),!1)):!1}tryEast(i,s){return this.gridster.$options.pushDirections.east?(this.addToTempPushed(i),i.$item.x=s.$item.x+s.$item.cols,this.push(i,this.fromWest)?(i.setSize(),this.addToPushed(i),!0):(this.removeFromTempPushed(i),!1)):!1}tryWest(i,s){return this.gridster.$options.pushDirections.west?(this.addToTempPushed(i),i.$item.x=s.$item.x-i.$item.cols,this.push(i,this.fromEast)?(i.setSize(),this.addToPushed(i),!0):(this.removeFromTempPushed(i),!1)):!1}addToTempPushed(i){let s=this.pushedItemsTemp.indexOf(i);s===-1&&(s=this.pushedItemsTemp.push(i)-1,this.pushedItemsTempPath[s]=[]),this.pushedItemsTempPath[s].push({x:i.$item.x,y:i.$item.y})}removeFromTempPushed(i){let s=this.pushedItemsTemp.indexOf(i),t=this.pushedItemsTempPath[s].pop();t&&(i.$item.x=t.x,i.$item.y=t.y,i.setSize(),this.pushedItemsTempPath[s].length||(this.pushedItemsTemp.splice(s,1),this.pushedItemsTempPath.splice(s,1)))}addToPushed(i){if(this.pushedItems.indexOf(i)<0)this.pushedItems.push(i),this.pushedItemsPath.push([{x:i.item.x||0,y:i.item.y||0},{x:i.$item.x,y:i.$item.y}]);else{let s=this.pushedItems.indexOf(i);this.pushedItemsPath[s].push({x:i.$item.x,y:i.$item.y})}}removeFromPushed(i){i>-1&&(this.pushedItems.splice(i,1),this.pushedItemsPath.splice(i,1))}removeFromPushedItem(i){let s=this.pushedItems.indexOf(i);s>-1&&(this.pushedItemsPath[s].pop(),this.pushedItemsPath.length||(this.pushedItems.splice(s,1),this.pushedItemsPath.splice(s,1)))}checkPushedItem(i,s){let t=this.pushedItemsPath[s],e=t.length-2,n,r,l,h=!1;for(;e>-1;e--)n=t[e],r=i.$item.x,l=i.$item.y,i.$item.x=n.x,i.$item.y=n.y,this.gridster.findItemWithItem(i.$item)?(i.$item.x=r,i.$item.y=l):(i.setSize(),t.splice(e+1,t.length-e-1),h=!0);return t.length<2&&this.removeFromPushed(s),h}},Ct,lt,Le=50,Y,bt,et,xt,yt,_t,vt;function Be(o,i,s,t,e,n,r,l,h,u){Ct=o.$options.scrollSensitivity,lt=o.$options.scrollSpeed,Y=o.el,bt=h,et=u;let w=Y.offsetWidth,C=Y.offsetHeight,$=Y.scrollLeft,W=Y.scrollTop,R=s-W,D=C+W-s-e,{clientX:Z,clientY:mt}=n;if(!o.$options.disableScrollVertical)if(r.clientYmt&&W>0&&RZ&&$>0&&ii{(!Y||o===-1&&Y.scrollTop-lt<0)&&se(),Y.scrollTop+=o*lt,t+=o*lt,i({clientX:s.clientX,clientY:t})},Le)}function Re(o,i,s){let t=s.clientX;return window.setInterval(()=>{(!Y||o===-1&&Y.scrollLeft-lt<0)&&ie(),Y.scrollLeft+=o*lt,t+=o*lt,i({clientX:t,clientY:s.clientY})},Le)}function He(){ie(),se(),Y=null}function ie(){Ae(),Xe()}function se(){Ye(),Ne()}function Ae(){xt&&(clearInterval(xt),xt=0)}function Xe(){yt&&(clearInterval(yt),yt=0)}function Ne(){vt&&(clearInterval(vt),vt=0)}function Ye(){_t&&(clearInterval(_t),_t=0)}var Kt=class{constructor(i){this.gridsterItem=i,this.gridster=i.gridster}destroy(){this.gridster=this.gridsterItem=this.swapedItem=null}swapItems(){this.gridster.$options.swap&&(this.checkSwapBack(),this.checkSwap(this.gridsterItem))}checkSwapBack(){if(this.swapedItem){let i=this.swapedItem.$item.x,s=this.swapedItem.$item.y;this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.gridster.checkCollision(this.swapedItem.$item)?(this.swapedItem.$item.x=i,this.swapedItem.$item.y=s):(this.swapedItem.setSize(),this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.swapedItem=void 0)}}restoreSwapItem(){this.swapedItem&&(this.swapedItem.$item.x=this.swapedItem.item.x||0,this.swapedItem.$item.y=this.swapedItem.item.y||0,this.swapedItem.setSize(),this.swapedItem=void 0)}setSwapItem(){this.swapedItem&&(this.swapedItem.checkItemChanges(this.swapedItem.$item,this.swapedItem.item),this.swapedItem=void 0)}checkSwap(i){let s;if(this.gridster.$options.swapWhileDragging?s=this.gridster.checkCollisionForSwaping(i.$item):s=this.gridster.checkCollision(i.$item),s&&s!==!0&&s.canBeDragged()){let t=s,e=t.$item.x,n=t.$item.y,r=i.$item.x,l=i.$item.y,h=r-e,u=l-n;t.$item.x=i.item.x-h,t.$item.y=i.item.y-u,i.$item.x=t.item.x+h,i.$item.y=t.item.y+u,this.gridster.checkCollision(t.$item)||this.gridster.checkCollision(i.$item)?(i.$item.x=r,i.$item.y=l,t.$item.x=e,t.$item.y=n):(t.setSize(),this.swapedItem=t,this.gridster.$options.swapWhileDragging&&(this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.setSwapItem()))}}},ui="gridster-item-resizable-handler",N=function(o){return o.UP="UP",o.DOWN="DOWN",o.LEFT="LEFT",o.RIGHT="RIGHT",o}(N||{}),Zt=class{constructor(i,s,t){this.zone=t,this.collision=!1,this.dragMove=e=>{e.stopPropagation(),e.preventDefault(),L.checkTouchEvent(e);let n=this.getDirections(e);this.gridster.options.enableBoundaryControl&&(n.includes(N.UP)&&this.gridsterItem.el.getBoundingClientRect().topr!=N.UP),e=new MouseEvent(e.type,{clientX:e.clientX,clientY:this.lastMouse.clientY})),n.includes(N.LEFT)&&this.gridsterItem.el.getBoundingClientRect().leftr!=N.LEFT),e=new MouseEvent(e.type,{clientX:this.lastMouse.clientX,clientY:e.clientY})),n.includes(N.RIGHT)&&this.gridsterItem.el.getBoundingClientRect().right>this.gridster.el.getBoundingClientRect().right-(this.outerMarginRight??this.margin)&&(n=n.filter(r=>r!=N.RIGHT),e=new MouseEvent(e.type,{clientX:this.lastMouse.clientX,clientY:e.clientY})),n.includes(N.DOWN)&&this.gridsterItem.el.getBoundingClientRect().bottom>this.gridster.el.getBoundingClientRect().bottom-(this.outerMarginBottom??this.margin)&&(n=n.filter(r=>r!=N.DOWN),e=new MouseEvent(e.type,{clientX:e.clientX,clientY:this.lastMouse.clientY}))),n.length&&(this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,Be(this.gridster,this.left,this.top,this.width,this.height,e,this.lastMouse,this.calculateItemPositionFromMousePosition),this.calculateItemPositionFromMousePosition(e))},this.calculateItemPositionFromMousePosition=e=>{this.gridster.options.scale?this.calculateItemPositionWithScale(e,this.gridster.options.scale):this.calculateItemPositionWithoutScale(e),this.calculateItemPosition(),this.lastMouse.clientX=e.clientX,this.lastMouse.clientY=e.clientY,this.zone.run(()=>{this.gridster.updateGrid()})},this.dragStop=e=>{e.stopPropagation(),e.preventDefault(),He(),this.cancelOnBlur(),this.mousemove(),this.mouseup(),this.mouseleave(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-moving"),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.path=[],this.gridster.options.draggable&&this.gridster.options.draggable.stop?Promise.resolve(this.gridster.options.draggable.stop(this.gridsterItem.item,this.gridsterItem,e)).then(this.makeDrag,this.cancelDrag):this.makeDrag(),setTimeout(()=>{this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle(!0))})},this.cancelDrag=()=>{this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push&&this.push.restoreItems(),this.swap&&this.swap.restoreSwapItem(),this.push&&(this.push.destroy(),this.push=null),this.swap&&(this.swap.destroy(),this.swap=null)},this.makeDrag=()=>{this.gridster.$options.draggable.dropOverItems&&this.gridster.options.draggable&&this.gridster.options.draggable.dropOverItemsCallback&&this.collision&&this.collision!==!0&&this.collision.$item&&this.gridster.options.draggable.dropOverItemsCallback(this.gridsterItem.item,this.collision.item,this.gridster),this.collision=!1,this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push&&this.push.setPushedItems(),this.swap&&this.swap.setSwapItem(),this.push&&(this.push.destroy(),this.push=null),this.swap&&(this.swap.destroy(),this.swap=null)},this.dragStartDelay=e=>{if(e.target.classList.contains(ui)||L.checkContentClassForEvent(this.gridster,e))return;if(L.checkTouchEvent(e),!this.gridster.$options.draggable.delayStart){this.dragStart(e);return}let r=setTimeout(()=>{this.dragStart(e),R()},this.gridster.$options.draggable.delayStart),l=this.gridsterItem.renderer.listen("document","mouseup",R),h=this.gridsterItem.renderer.listen("document","mouseleave",R),u=this.gridsterItem.renderer.listen("window","blur",R),w=this.gridsterItem.renderer.listen("document","touchmove",W),C=this.gridsterItem.renderer.listen("document","touchend",R),$=this.gridsterItem.renderer.listen("document","touchcancel",R);function W(D){L.checkTouchEvent(D),(Math.abs(D.clientX-e.clientX)>9||Math.abs(D.clientY-e.clientY)>9)&&R()}function R(){clearTimeout(r),u(),l(),h(),w(),C(),$()}},this.gridsterItem=i,this.gridster=s,this.lastMouse={clientX:0,clientY:0},this.path=[]}destroy(){this.gridster.previewStyle&&this.gridster.previewStyle(!0),this.gridsterItem=this.gridster=this.collision=null,this.mousedown&&(this.mousedown(),this.touchstart())}dragStart(i){i.which&&i.which!==1||(this.gridster.options.draggable&&this.gridster.options.draggable.start&&this.gridster.options.draggable.start(this.gridsterItem.item,this.gridsterItem,i),i.stopPropagation(),i.preventDefault(),this.zone.runOutsideAngular(()=>{this.mousemove=this.gridsterItem.renderer.listen("document","mousemove",this.dragMove),this.touchmove=this.gridster.renderer.listen(this.gridster.el,"touchmove",this.dragMove)}),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStop),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStop),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStop),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStop),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStop),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-moving"),this.margin=this.gridster.$options.margin,this.outerMarginTop=this.gridster.$options.outerMarginTop,this.outerMarginRight=this.gridster.$options.outerMarginRight,this.outerMarginBottom=this.gridster.$options.outerMarginBottom,this.outerMarginLeft=this.gridster.$options.outerMarginLeft,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.left=this.gridsterItem.left-this.margin,this.top=this.gridsterItem.top-this.margin,this.originalClientX=i.clientX,this.originalClientY=i.clientY,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.gridster.$options.dirType===O.RTL?this.diffLeft=i.clientX-this.gridster.el.scrollWidth+this.gridsterItem.left:this.diffLeft=i.clientX+this.offsetLeft-this.margin-this.left,this.diffTop=i.clientY+this.offsetTop-this.margin-this.top,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(!0),this.push=new Dt(this.gridsterItem),this.swap=new Kt(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid(),this.path.push({x:this.gridsterItem.item.x||0,y:this.gridsterItem.item.y||0}))}calculateItemPositionWithScale(i,s){this.gridster.$options.dirType===O.RTL?this.left=this.gridster.el.scrollWidth-this.originalClientX+(i.clientX-this.originalClientX)/s+this.diffLeft:this.left=this.originalClientX+(i.clientX-this.originalClientX)/s+this.offsetLeft-this.diffLeft,this.top=this.originalClientY+(i.clientY-this.originalClientY)/s+this.offsetTop-this.diffTop}calculateItemPositionWithoutScale(i){this.gridster.$options.dirType===O.RTL?this.left=this.gridster.el.scrollWidth-i.clientX+this.diffLeft:this.left=i.clientX+this.offsetLeft-this.diffLeft,this.top=i.clientY+this.offsetTop-this.diffTop}calculateItemPosition(){if(this.gridster.movingItem=this.gridsterItem.$item,this.positionX=this.gridster.pixelsToPositionX(this.left,Math.round),this.positionY=this.gridster.pixelsToPositionY(this.top,Math.round),this.positionXBackup=this.gridsterItem.$item.x,this.positionYBackup=this.gridsterItem.$item.y,this.gridsterItem.$item.x=this.positionX,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.x=this.positionXBackup),this.gridsterItem.$item.y=this.positionY,this.gridster.checkGridCollision(this.gridsterItem.$item)&&(this.gridsterItem.$item.y=this.positionYBackup),this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,this.top),this.positionXBackup!==this.gridsterItem.$item.x||this.positionYBackup!==this.gridsterItem.$item.y){let i=this.path[this.path.length-1],s="";i.xthis.gridsterItem.$item.x?s=this.push.fromEast:i.ythis.gridsterItem.$item.y&&(s=this.push.fromSouth),this.push.pushItems(s,this.gridster.$options.disablePushOnDrag),this.swap.swapItems(),this.collision=this.gridster.checkCollision(this.gridsterItem.$item),this.collision?(this.gridsterItem.$item.x=this.positionXBackup,this.gridsterItem.$item.y=this.positionYBackup,this.gridster.$options.draggable.dropOverItems&&this.collision!==!0&&this.collision.$item&&(this.gridster.movingItem=null)):this.path.push({x:this.gridsterItem.$item.x,y:this.gridsterItem.$item.y}),this.push.checkPushBack()}else this.collision=!1;this.gridster.previewStyle(!0)}toggle(){let i=this.gridsterItem.canBeDragged();!this.enabled&&i?(this.enabled=!this.enabled,this.mousedown=this.gridsterItem.renderer.listen(this.gridsterItem.el,"mousedown",this.dragStartDelay),this.touchstart=this.gridsterItem.renderer.listen(this.gridsterItem.el,"touchstart",this.dragStartDelay)):this.enabled&&!i&&(this.enabled=!this.enabled,this.mousedown(),this.touchstart())}getDirections(i){let s=[];return this.lastMouse.clientX===0&&this.lastMouse.clientY===0&&(this.lastMouse.clientY=i.clientY,this.lastMouse.clientX=i.clientX),this.lastMouse.clientY>i.clientY&&s.push(N.UP),this.lastMouse.clientYi.clientX&&s.push(N.LEFT),s}},Jt=class{constructor(i){this.pushedItems=[],this.pushedItemsPath=[],this.gridsterItem=i,this.gridster=i.gridster,this.tryPattern={fromEast:this.tryWest,fromWest:this.tryEast,fromNorth:this.trySouth,fromSouth:this.tryNorth},this.fromSouth="fromSouth",this.fromNorth="fromNorth",this.fromEast="fromEast",this.fromWest="fromWest"}destroy(){this.gridster=this.gridsterItem=null}pushItems(i){return this.gridster.$options.pushResizeItems?this.push(this.gridsterItem,i):!1}restoreItems(){let i=0,s=this.pushedItems.length,t;for(;i-1;i--)this.checkPushedItem(this.pushedItems[i],i)&&(s=!0);s&&this.checkPushBack()}push(i,s){let t=this.gridster.checkCollision(i.$item);if(t&&t!==!0&&t!==this.gridsterItem&&t.canBeResized()){if(this.tryPattern[s].call(this,t,i,s))return!0}else if(t===!1)return!0;return!1}trySouth(i,s,t){let e=i.$item.y,n=i.$item.rows;return i.$item.y=s.$item.y+s.$item.rows,i.$item.rows=n+e-i.$item.y,!this.gridster.checkCollisionTwoItems(i.$item,s.$item)&&!this.gridster.checkGridCollision(i.$item)?(i.setSize(),this.addToPushed(i),this.push(s,t),!0):(i.$item.y=e,i.$item.rows=n,!1)}tryNorth(i,s,t){let e=i.$item.rows;return i.$item.rows=s.$item.y-i.$item.y,!this.gridster.checkCollisionTwoItems(i.$item,s.$item)&&!this.gridster.checkGridCollision(i.$item)?(i.setSize(),this.addToPushed(i),this.push(s,t),!0):(i.$item.rows=e,!1)}tryEast(i,s,t){let e=i.$item.x,n=i.$item.cols;return i.$item.x=s.$item.x+s.$item.cols,i.$item.cols=n+e-i.$item.x,!this.gridster.checkCollisionTwoItems(i.$item,s.$item)&&!this.gridster.checkGridCollision(i.$item)?(i.setSize(),this.addToPushed(i),this.push(s,t),!0):(i.$item.x=e,i.$item.cols=n,!1)}tryWest(i,s,t){let e=i.$item.cols;return i.$item.cols=s.$item.x-i.$item.x,!this.gridster.checkCollisionTwoItems(i.$item,s.$item)&&!this.gridster.checkGridCollision(i.$item)?(i.setSize(),this.addToPushed(i),this.push(s,t),!0):(i.$item.cols=e,!1)}addToPushed(i){if(this.pushedItems.indexOf(i)<0)this.pushedItems.push(i),this.pushedItemsPath.push([{x:i.item.x||0,y:i.item.y||0,cols:i.item.cols||0,rows:i.item.rows||0},{x:i.$item.x,y:i.$item.y,cols:i.$item.cols,rows:i.$item.rows}]);else{let s=this.pushedItems.indexOf(i);this.pushedItemsPath[s].push({x:i.$item.x,y:i.$item.y,cols:i.$item.cols,rows:i.$item.rows})}}removeFromPushed(i){i>-1&&(this.pushedItems.splice(i,1),this.pushedItemsPath.splice(i,1))}checkPushedItem(i,s){let t=this.pushedItemsPath[s],e=t.length-2,n,r,l,h,u;for(;e>-1;e--)n=t[e],r=i.$item.x,l=i.$item.y,h=i.$item.cols,u=i.$item.rows,i.$item.x=n.x,i.$item.y=n.y,i.$item.cols=n.cols,i.$item.rows=n.rows,this.gridster.findItemWithItem(i.$item)?(i.$item.x=r,i.$item.y=l,i.$item.cols=h,i.$item.rows=u):(i.setSize(),t.splice(e+1,t.length-1-e));return t.length<2?(this.removeFromPushed(s),!0):!1}},te=class{constructor(i,s,t){this.zone=t,this.directionFunction=null,this.dragMove=e=>{if(this.directionFunction===null)throw new Error("The `directionFunction` has not been set before calling `dragMove`.");e.stopPropagation(),e.preventDefault(),L.checkTouchEvent(e),this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,Be(this.gridster,this.left,this.top,this.width,this.height,e,this.lastMouse,this.directionFunction,!0,this.resizeEventScrollType);let n=this.gridster.options.scale||1;this.directionFunction({clientX:this.originalClientX+(e.clientX-this.originalClientX)/n,clientY:this.originalClientY+(e.clientY-this.originalClientY)/n}),this.lastMouse.clientX=e.clientX,this.lastMouse.clientY=e.clientY,this.zone.run(()=>{this.gridster.updateGrid()})},this.dragStop=e=>{e.stopPropagation(),e.preventDefault(),He(),this.mousemove(),this.mouseup(),this.mouseleave(),this.cancelOnBlur(),this.touchmove(),this.touchend(),this.touchcancel(),this.gridster.dragInProgress=!1,this.gridster.updateGrid(),this.gridster.options.resizable&&this.gridster.options.resizable.stop?Promise.resolve(this.gridster.options.resizable.stop(this.gridsterItem.item,this.gridsterItem,e)).then(this.makeResize,this.cancelResize):this.makeResize(),setTimeout(()=>{this.gridsterItem.renderer.removeClass(this.gridsterItem.el,"gridster-item-resizing"),this.gridster&&(this.gridster.movingItem=null,this.gridster.previewStyle())})},this.cancelResize=()=>{this.gridsterItem.$item.cols=this.gridsterItem.item.cols||1,this.gridsterItem.$item.rows=this.gridsterItem.item.rows||1,this.gridsterItem.$item.x=this.gridsterItem.item.x||0,this.gridsterItem.$item.y=this.gridsterItem.item.y||0,this.gridsterItem.setSize(),this.push.restoreItems(),this.pushResize.restoreItems(),this.push.destroy(),this.push=null,this.pushResize.destroy(),this.pushResize=null},this.makeResize=()=>{this.gridsterItem.setSize(),this.gridsterItem.checkItemChanges(this.gridsterItem.$item,this.gridsterItem.item),this.push.setPushedItems(),this.pushResize.setPushedItems(),this.push.destroy(),this.push=null,this.pushResize.destroy(),this.pushResize=null},this.handleNorth=e=>{this.top=e.clientY+this.offsetTop-this.diffTop,this.height=this.bottom-this.top,this.minHeight>this.height?(this.height=this.minHeight,this.top=this.bottom-this.minHeight):this.gridster.options.enableBoundaryControl&&(this.top=Math.max(0,this.top),this.height=this.bottom-this.top);let n=this.gridster.options.pushItems?this.margin:0;if(this.newPosition=this.gridster.pixelsToPositionY(this.top+n,Math.floor),this.gridsterItem.$item.y!==this.newPosition){if(this.itemBackup[1]=this.gridsterItem.$item.y,this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows+=this.gridsterItem.$item.y-this.newPosition,this.gridsterItem.$item.y=this.newPosition,this.pushResize.pushItems(this.pushResize.fromSouth),this.push.pushItems(this.push.fromSouth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.y=this.itemBackup[1],this.gridsterItem.$item.rows=this.itemBackup[3],this.top=this.gridster.positionYToPixels(this.gridsterItem.$item.y),this.setItemTop(this.gridster.positionYToPixels(this.gridsterItem.$item.y)),this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemTop(this.top),this.setItemHeight(this.height)},this.handleWest=e=>{let n=this.gridster.$options.dirType===O.RTL?this.originalClientX+(this.originalClientX-e.clientX):e.clientX;this.left=n+this.offsetLeft-this.diffLeft,this.width=this.right-this.left,this.minWidth>this.width?(this.width=this.minWidth,this.left=this.right-this.minWidth):this.gridster.options.enableBoundaryControl&&(this.left=Math.max(0,this.left),this.width=this.right-this.left);let r=this.gridster.options.pushItems?this.margin:0;if(this.newPosition=this.gridster.pixelsToPositionX(this.left+r,Math.floor),this.gridsterItem.$item.x!==this.newPosition){if(this.itemBackup[0]=this.gridsterItem.$item.x,this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols+=this.gridsterItem.$item.x-this.newPosition,this.gridsterItem.$item.x=this.newPosition,this.pushResize.pushItems(this.pushResize.fromEast),this.push.pushItems(this.push.fromEast,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.x=this.itemBackup[0],this.gridsterItem.$item.cols=this.itemBackup[2],this.left=this.gridster.positionXToPixels(this.gridsterItem.$item.x),this.setItemLeft(this.gridster.positionXToPixels(this.gridsterItem.$item.x)),this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemLeft(this.left),this.setItemWidth(this.width)},this.handleSouth=e=>{if(this.height=e.clientY+this.offsetTop-this.diffBottom-this.top,this.minHeight>this.height&&(this.height=this.minHeight),this.bottom=this.top+this.height,this.gridster.options.enableBoundaryControl){let r=this.outerMarginBottom??this.margin,l=this.gridster.el.getBoundingClientRect();this.bottom=Math.min(this.bottom,l.bottom-l.top-2*r),this.height=this.bottom-this.top}let n=this.gridster.options.pushItems?0:this.margin;if(this.newPosition=this.gridster.pixelsToPositionY(this.bottom+n,Math.ceil),this.gridsterItem.$item.y+this.gridsterItem.$item.rows!==this.newPosition){if(this.itemBackup[3]=this.gridsterItem.$item.rows,this.gridsterItem.$item.rows=this.newPosition-this.gridsterItem.$item.y,this.pushResize.pushItems(this.pushResize.fromNorth),this.push.pushItems(this.push.fromNorth,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.rows=this.itemBackup[3],this.setItemHeight(this.gridster.positionYToPixels(this.gridsterItem.$item.rows)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemHeight(this.height)},this.handleEast=e=>{let n=this.gridster.$options.dirType===O.RTL?this.originalClientX+(this.originalClientX-e.clientX):e.clientX;if(this.width=n+this.offsetLeft-this.diffRight-this.left,this.minWidth>this.width&&(this.width=this.minWidth),this.right=this.left+this.width,this.gridster.options.enableBoundaryControl){let l=this.outerMarginRight??this.margin,h=this.gridster.el.getBoundingClientRect();this.right=Math.min(this.right,h.right-h.left-2*l),this.width=this.right-this.left}let r=this.gridster.options.pushItems?0:this.margin;if(this.newPosition=this.gridster.pixelsToPositionX(this.right+r,Math.ceil),this.gridsterItem.$item.x+this.gridsterItem.$item.cols!==this.newPosition){if(this.itemBackup[2]=this.gridsterItem.$item.cols,this.gridsterItem.$item.cols=this.newPosition-this.gridsterItem.$item.x,this.pushResize.pushItems(this.pushResize.fromWest),this.push.pushItems(this.push.fromWest,this.gridster.$options.disablePushOnResize),this.gridster.checkCollision(this.gridsterItem.$item)){this.gridsterItem.$item.cols=this.itemBackup[2],this.setItemWidth(this.gridster.positionXToPixels(this.gridsterItem.$item.cols)-this.margin);return}else this.gridster.previewStyle();this.pushResize.checkPushBack(),this.push.checkPushBack()}this.setItemWidth(this.width)},this.handleNorthWest=e=>{this.handleNorth(e),this.handleWest(e)},this.handleNorthEast=e=>{this.handleNorth(e),this.handleEast(e)},this.handleSouthWest=e=>{this.handleSouth(e),this.handleWest(e)},this.handleSouthEast=e=>{this.handleSouth(e),this.handleEast(e)},this.gridsterItem=i,this.gridster=s,this.lastMouse={clientX:0,clientY:0},this.itemBackup=[0,0,0,0],this.resizeEventScrollType={west:!1,east:!1,north:!1,south:!1}}destroy(){this.gridster?.previewStyle(),this.gridster=this.gridsterItem=null}dragStart(i){if(i.which&&i.which!==1)return;this.gridster.options.resizable&&this.gridster.options.resizable.start&&this.gridster.options.resizable.start(this.gridsterItem.item,this.gridsterItem,i),i.stopPropagation(),i.preventDefault(),this.zone.runOutsideAngular(()=>{this.mousemove=this.gridsterItem.renderer.listen("document","mousemove",this.dragMove),this.touchmove=this.gridster.renderer.listen(this.gridster.el,"touchmove",this.dragMove)}),this.mouseup=this.gridsterItem.renderer.listen("document","mouseup",this.dragStop),this.mouseleave=this.gridsterItem.renderer.listen("document","mouseleave",this.dragStop),this.cancelOnBlur=this.gridsterItem.renderer.listen("window","blur",this.dragStop),this.touchend=this.gridsterItem.renderer.listen("document","touchend",this.dragStop),this.touchcancel=this.gridsterItem.renderer.listen("document","touchcancel",this.dragStop),this.gridsterItem.renderer.addClass(this.gridsterItem.el,"gridster-item-resizing"),this.lastMouse.clientX=i.clientX,this.lastMouse.clientY=i.clientY,this.left=this.gridsterItem.left,this.top=this.gridsterItem.top,this.originalClientX=i.clientX,this.originalClientY=i.clientY,this.width=this.gridsterItem.width,this.height=this.gridsterItem.height,this.bottom=this.gridsterItem.top+this.gridsterItem.height,this.right=this.gridsterItem.left+this.gridsterItem.width,this.margin=this.gridster.$options.margin,this.outerMarginTop=this.gridster.$options.outerMarginTop,this.outerMarginRight=this.gridster.$options.outerMarginRight,this.outerMarginBottom=this.gridster.$options.outerMarginBottom,this.outerMarginLeft=this.gridster.$options.outerMarginLeft,this.offsetLeft=this.gridster.el.scrollLeft-this.gridster.el.offsetLeft,this.offsetTop=this.gridster.el.scrollTop-this.gridster.el.offsetTop,this.diffLeft=i.clientX+this.offsetLeft-this.left,this.diffRight=i.clientX+this.offsetLeft-this.right,this.diffTop=i.clientY+this.offsetTop-this.top,this.diffBottom=i.clientY+this.offsetTop-this.bottom,this.minHeight=this.gridster.positionYToPixels(this.gridsterItem.$item.minItemRows||this.gridster.$options.minItemRows)-this.margin,this.minWidth=this.gridster.positionXToPixels(this.gridsterItem.$item.minItemCols||this.gridster.$options.minItemCols)-this.margin,this.gridster.movingItem=this.gridsterItem.$item,this.gridster.previewStyle(),this.push=new Dt(this.gridsterItem),this.pushResize=new Jt(this.gridsterItem),this.gridster.dragInProgress=!0,this.gridster.updateGrid();let{classList:s}=i.target;s.contains("handle-n")?(this.resizeEventScrollType.north=!0,this.directionFunction=this.handleNorth):s.contains("handle-w")?this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.east=!0,this.directionFunction=this.handleEast):(this.resizeEventScrollType.west=!0,this.directionFunction=this.handleWest):s.contains("handle-s")?(this.resizeEventScrollType.south=!0,this.directionFunction=this.handleSouth):s.contains("handle-e")?this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.west=!0,this.directionFunction=this.handleWest):(this.resizeEventScrollType.east=!0,this.directionFunction=this.handleEast):s.contains("handle-nw")?this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleNorthEast):(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleNorthWest):s.contains("handle-ne")?this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleNorthWest):(this.resizeEventScrollType.north=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleNorthEast):s.contains("handle-sw")?this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleSouthEast):(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleSouthWest):s.contains("handle-se")&&(this.gridster.$options.dirType===O.RTL?(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.west=!0,this.directionFunction=this.handleSouthWest):(this.resizeEventScrollType.south=!0,this.resizeEventScrollType.east=!0,this.directionFunction=this.handleSouthEast))}toggle(){this.resizeEnabled=this.gridsterItem.canBeResized(),this.resizableHandles=this.gridsterItem.getResizableHandles()}dragStartDelay(i){if(L.checkTouchEvent(i),!this.gridster.$options.resizable.delayStart){this.dragStart(i);return}let s=setTimeout(()=>{this.dragStart(i),w()},this.gridster.$options.resizable.delayStart),{cancelMouse:t,cancelMouseLeave:e,cancelOnBlur:n,cancelTouchMove:r,cancelTouchEnd:l,cancelTouchCancel:h}=this.zone.runOutsideAngular(()=>{let C=this.gridsterItem.renderer.listen("document","mouseup",w),$=this.gridsterItem.renderer.listen("document","mouseleave",w),W=this.gridsterItem.renderer.listen("window","blur",w),R=this.gridsterItem.renderer.listen("document","touchmove",u),D=this.gridsterItem.renderer.listen("document","touchend",w),Z=this.gridsterItem.renderer.listen("document","touchcancel",w);return{cancelMouse:C,cancelMouseLeave:$,cancelOnBlur:W,cancelTouchMove:R,cancelTouchEnd:D,cancelTouchCancel:Z}});function u(C){L.checkTouchEvent(C),(Math.abs(C.clientX-i.clientX)>9||Math.abs(C.clientY-i.clientY)>9)&&w()}function w(){clearTimeout(s),n(),t(),e(),r(),l(),h()}}setItemTop(i){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,this.left,i)}setItemLeft(i){this.gridster.gridRenderer.setCellPosition(this.gridsterItem.renderer,this.gridsterItem.el,i,this.top)}setItemHeight(i){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"height",i+"px")}setItemWidth(i){this.gridsterItem.renderer.setStyle(this.gridsterItem.el,"width",i+"px")}},Ge=(()=>{let i=class i{get zIndex(){return this.getLayerIndex()+this.gridster.$options.baseLayerIndex}constructor(t,e,n,r){this.renderer=n,this.zone=r,this.itemInit=new V,this.itemChange=new V,this.itemResize=new V,this.el=t.nativeElement,this.$item={cols:-1,rows:-1,x:-1,y:-1},this.gridster=e,this.drag=new Zt(this,e,this.zone),this.resize=new te(this,e,this.zone)}ngOnInit(){this.gridster.addItem(this)}ngOnChanges(t){t.item&&(this.updateOptions(),this.init||this.gridster.calculateLayout$.next()),t.item&&t.item.previousValue&&this.setSize()}updateOptions(){this.$item=L.merge(this.$item,this.item,{cols:void 0,rows:void 0,x:void 0,y:void 0,layerIndex:void 0,dragEnabled:void 0,resizeEnabled:void 0,compactEnabled:void 0,maxItemRows:void 0,minItemRows:void 0,maxItemCols:void 0,minItemCols:void 0,maxItemArea:void 0,minItemArea:void 0,resizableHandles:{s:void 0,e:void 0,n:void 0,w:void 0,se:void 0,ne:void 0,sw:void 0,nw:void 0}})}ngOnDestroy(){this.gridster.removeItem(this),this.drag.destroy(),this.resize.destroy(),this.gridster=this.drag=this.resize=null}setSize(){this.renderer.setStyle(this.el,"display",this.notPlaced?"":"block"),this.gridster.gridRenderer.updateItem(this.el,this.$item,this.renderer),this.updateItemSize()}updateItemSize(){let t=this.$item.y*this.gridster.curRowHeight,e=this.$item.x*this.gridster.curColWidth,n=this.$item.cols*this.gridster.curColWidth-this.gridster.$options.margin,r=this.$item.rows*this.gridster.curRowHeight-this.gridster.$options.margin;this.top=t,this.left=e,!this.init&&n>0&&r>0&&(this.init=!0,this.item.initCallback&&this.item.initCallback(this.item,this),this.gridster.options.itemInitCallback&&this.gridster.options.itemInitCallback(this.item,this),this.itemInit.next({item:this.item,itemComponent:this}),this.gridster.$options.scrollToNewItems&&this.el.scrollIntoView(!1)),(n!==this.width||r!==this.height)&&(this.width=n,this.height=r,this.gridster.options.itemResizeCallback&&this.gridster.options.itemResizeCallback(this.item,this),this.itemResize.next({item:this.item,itemComponent:this}))}itemChanged(){this.gridster.options.itemChangeCallback&&this.gridster.options.itemChangeCallback(this.item,this),this.itemChange.next({item:this.item,itemComponent:this})}checkItemChanges(t,e){t.rows===e.rows&&t.cols===e.cols&&t.x===e.x&&t.y===e.y||(this.gridster.checkCollision(this.$item)?(this.$item.x=e.x||0,this.$item.y=e.y||0,this.$item.cols=e.cols||1,this.$item.rows=e.rows||1,this.setSize()):(this.item.cols=this.$item.cols,this.item.rows=this.$item.rows,this.item.x=this.$item.x,this.item.y=this.$item.y,this.gridster.calculateLayout$.next(),this.itemChanged()))}canBeDragged(){let t=this.gridster.$options.draggable.enabled,e=this.$item.dragEnabled===void 0?t:this.$item.dragEnabled;return!this.gridster.mobile&&t&&e}canBeResized(){let t=this.gridster.$options.resizable.enabled,e=this.$item.resizeEnabled===void 0?t:this.$item.resizeEnabled;return!this.gridster.mobile&&t&&e}getResizableHandles(){let t=this.gridster.$options.resizable.handles,e=this.$item.resizableHandles;return e===void 0?t:it(it({},t),e)}bringToFront(t){if(t&&t<=0)return;let e=this.getLayerIndex(),n=this.gridster.$options.maxLayerIndex;if(en?n:r}}sendToBack(t){if(t&&t<=0)return;let e=this.getLayerIndex();if(e>0){let n=t?e-t:0;this.item.layerIndex=this.$item.layerIndex=n<0?0:n}}getLayerIndex(){return this.item.layerIndex!==void 0?this.item.layerIndex:this.gridster.$options.defaultLayerIndex!==void 0?this.gridster.$options.defaultLayerIndex:0}};i.\u0275fac=function(e){return new(e||i)(_(J),_(ee),_(ot),_(Vt))},i.\u0275cmp=A({type:i,selectors:[["gridster-item"]],hostVars:2,hostBindings:function(e,n){e&2&&ut("z-index",n.zIndex)},inputs:{item:"item"},outputs:{itemInit:"itemInit",itemChange:"itemChange",itemResize:"itemResize"},standalone:!0,features:[gt,X],ngContentSelectors:Ve,decls:9,vars:8,consts:[[1,"gridster-item-resizable-handler","handle-s"],[1,"gridster-item-resizable-handler","handle-e"],[1,"gridster-item-resizable-handler","handle-n"],[1,"gridster-item-resizable-handler","handle-w"],[1,"gridster-item-resizable-handler","handle-se"],[1,"gridster-item-resizable-handler","handle-ne"],[1,"gridster-item-resizable-handler","handle-sw"],[1,"gridster-item-resizable-handler","handle-nw"],[1,"gridster-item-resizable-handler","handle-s",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-e",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-n",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-w",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-se",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-ne",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-sw",3,"mousedown","touchstart"],[1,"gridster-item-resizable-handler","handle-nw",3,"mousedown","touchstart"]],template:function(e,n){e&1&&(Bt(),Ht(0),F(1,ri,1,0,"div",0)(2,oi,1,0,"div",1)(3,li,1,0,"div",2)(4,ai,1,0,"div",3)(5,hi,1,0,"div",4)(6,di,1,0,"div",5)(7,ci,1,0,"div",6)(8,pi,1,0,"div",7)),e&2&&(a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.s&&n.resize.resizeEnabled?1:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.e&&n.resize.resizeEnabled?2:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.n&&n.resize.resizeEnabled?3:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.w&&n.resize.resizeEnabled?4:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.se&&n.resize.resizeEnabled?5:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.ne&&n.resize.resizeEnabled?6:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.sw&&n.resize.resizeEnabled?7:-1),a(),x(n.resize.resizableHandles!=null&&n.resize.resizableHandles.nw&&n.resize.resizeEnabled?8:-1))},styles:[`gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;user-select:text}gridster-item.gridster-item-moving{cursor:move}gridster-item.gridster-item-resizing,gridster-item.gridster-item-moving{transition:0s;z-index:2;box-shadow:0 0 5px 5px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.gridster-item-resizable-handler{position:absolute;z-index:2}.gridster-item-resizable-handler.handle-n{cursor:ns-resize;height:10px;right:0;top:0;left:0}.gridster-item-resizable-handler.handle-e{cursor:ew-resize;width:10px;bottom:0;right:0;top:0}.gridster-item-resizable-handler.handle-s{cursor:ns-resize;height:10px;right:0;bottom:0;left:0}.gridster-item-resizable-handler.handle-w{cursor:ew-resize;width:10px;left:0;top:0;bottom:0}.gridster-item-resizable-handler.handle-ne{cursor:ne-resize;width:10px;height:10px;right:0;top:0}.gridster-item-resizable-handler.handle-nw{cursor:nw-resize;width:10px;height:10px;left:0;top:0}.gridster-item-resizable-handler.handle-se{cursor:se-resize;width:0;height:0;right:0;bottom:0;border-style:solid;border-width:0 0 10px 10px;border-color:transparent}.gridster-item-resizable-handler.handle-sw{cursor:sw-resize;width:10px;height:10px;left:0;bottom:0}gridster-item:hover .gridster-item-resizable-handler.handle-se{border-color:transparent transparent #ccc} `],encapsulation:2});let o=i;return o})();var Fs=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=de({type:i}),i.\u0275inj=he({});let o=i;return o})();var Wt=(()=>{let i=class i{constructor(){this.items=[],this.widgets=[]}init(t){if(this.items=[],this.widgets=[],!!t.widgets)for(let e=0;e{let i=class i{constructor(){this.list=[],this.dbs=z(Me),this.cd=z(K),this.eds=z(Et),this.route=z(ht),this.ss=z(ct),this.ns=z(Mt),this.ds=z(xe),this.sbs=z(ke),this.fs=z(st),this.bs=z(pt),this.ms=z(Ee),this.r2=z(ot),this.us=z(dt),this.hs=z(Pt),this.vs=z(Wt),this.i18n=z(kt),this.es=z(be),this.subOnEditedWidgetChanged=this.eds.onEditedWidgetChanged.pipe(nt()),this.subOnNewWidget=this.eds.onNewWidget.pipe(nt()),this.subOnSaveWidget=this.eds.onSave.pipe(nt()),this.subCancelEditing=this.eds.onCancelEditing.pipe(nt()),this.subOnDeleteWidget=this.eds.onDeleteWidget.pipe(nt())}ngOnDestroy(){clearTimeout(this.scrollToNewWidgetTimeout)}getWidgetByInfo(t){if(t)return this.widgets.find(e=>e.widget===t)}subscribeForEditing(){this.subOnEditedWidgetChanged.subscribe(t=>this.updateEditedWidget(t)),this.subOnNewWidget.subscribe(t=>this.newWidget(t)),this.subOnSaveWidget.subscribe(()=>this.onSaveWidget()),this.subCancelEditing.subscribe(()=>this.cancelEditing()),this.subOnDeleteWidget.subscribe(t=>this.deleteWidget(t))}updateEditedWidget(t){this.editedWidget||(this.editedWidget=t.widget);let e=this.getWidgetByInfo(this.editedWidget);e&&(e.header?.cd.detectChanges(),e.cd.detectChanges(),t.refreshData&&e.requestData()),this.detectChanges()}newWidget(t){let e=this.dbs.getWidgetsWithoutEmpty().pop();e&&(t.cols=e.cols,t.rows=e.rows),this.editedWidget=t,this.list.push(this.editedWidget);let n=this.gridster.getFirstPossiblePosition(this.editedWidget);this.editedWidget.x=n.x,this.editedWidget.y=n.y,this.editedWidget.cols=n.cols,this.editedWidget.rows=n.rows,this.detectChanges(),this.scrollNewWidgetIntoView()}onSaveWidget(){this.editedWidget&&(this.editedWidget.edKey=""),this.editedWidget=void 0,this.detectChanges()}cancelEditing(){if(!this.editedWidget)return;let t=this.list.indexOf(this.editedWidget);if(this.editedWidget?.oldWidget){this.editedWidget=this.editedWidget.oldWidget,this.editedWidget.edKey="ed"+new Date().getTime(),this.list[t]=this.editedWidget,this.cd.detectChanges(),this.editedWidget.edKey="",this.editedWidget=void 0,this.detectChanges();return}else t!==-1&&this.list.splice(t,1);this.editedWidget=void 0,this.detectChanges()}scrollNewWidgetIntoView(){clearTimeout(this.scrollToNewWidgetTimeout),this.scrollToNewWidgetTimeout=setTimeout(()=>{let t=document.getElementById("edited-widget");t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})},300)}detectChanges(){let t=this.gridster.el.scrollLeft,e=this.gridster.el.scrollTop;this.cd.detectChanges(),this.gridster.onResize(),this.gridster.el.scrollLeft=t,this.gridster.el.scrollTop=e}deleteWidget(t){this.editedWidget=void 0;let e=this.list.indexOf(t);e!==-1&&this.list.splice(e,1),this.list=[...this.list],this.cd.detectChanges()}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=A({type:i,selectors:[["ng-component"]],viewQuery:function(e,n){if(e&1&&(j(wi,5),j(Ci,5)),e&2){let r;U(r=q())&&(n.gridster=r.first),U(r=q())&&(n.widgets=r)}},standalone:!0,features:[X],decls:0,vars:0,template:function(e,n){},encapsulation:2});let o=i;return o})();var Ue=(()=>{let i=class i{constructor(t){this.el=t,this.tooltip="",this.tooltipEl=null,this.onHover=e=>this.showTooltip(e),this.onOut=e=>this.removeTooltip()}ngAfterViewInit(){this.el.nativeElement.addEventListener("mouseover",this.onHover),this.el.nativeElement.addEventListener("mouseout",this.onOut)}ngOnDestroy(){this.el.nativeElement.removeEventListener("mouseover",this.onHover),this.el.nativeElement.removeEventListener("mouseout",this.onOut),this.removeTooltip()}showTooltip(t){if(this.tooltipEl||(this.createTooltip(),!this.tooltipEl))return;let e=t.clientX,n=t.clientY,r=this.tooltipEl.offsetWidth,l=this.tooltipEl.offsetHeight,h=window.innerWidth,u=window.innerHeight,w=e,C=n;e+r>h&&(w=e-r),n+l>u&&(C=n-l),this.tooltipEl&&(this.tooltipEl.style.left=w+"px",this.tooltipEl.style.top=C+"px")}removeTooltip(){this.tooltipEl&&(this.tooltipEl.parentNode?.removeChild(this.tooltipEl),this.tooltipEl=null)}createTooltip(){this.removeTooltip(),this.tooltipEl=document.createElement("div"),this.tooltipEl.classList.add("dsw-tooltip"),this.tooltipEl.innerHTML=this.tooltip,document.body.appendChild(this.tooltipEl)}};i.\u0275fac=function(e){return new(e||i)(_(J))},i.\u0275dir=ce({type:i,selectors:[["","tooltip",""]],inputs:{tooltip:"tooltip"},standalone:!0});let o=i;return o})();var qe=(()=>{let i=class i{constructor(){this.onToggleHeaderButton=new V}toggleButton(t){this.onToggleHeaderButton.emit(t)}};i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=St({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function vi(o,i){if(o&1&&I(0,"img",1),o&2){let s=c();k("tooltip",s.filtersTooltip)}}function Ii(o,i){if(o&1){let s=y();d(0,"button",6),f("click",function(){p(s);let e=c();return m(e.onBackClick())}),I(1,"img",7),d(2,"label"),b(3),S(4,"i18n"),g()()}o&2&&(a(3),M(T(4,1,"back")))}function Si(o,i){if(o&1){let s=y();d(0,"button",6),f("click",function(){p(s);let e=c();return m(e.onResetClickFilterHandler())}),I(1,"img",8),d(2,"label"),b(3),S(4,"i18n"),g()()}o&2&&(a(3),M(T(4,1,"resetClickFilter")))}function Ti(o,i){if(o&1){let s=y();d(0,"button",9),S(1,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("by6columns"))}),I(2,"img",10),g(),d(3,"button",9),S(4,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("by5columns"))}),I(5,"img",11),g(),d(6,"button",9),S(7,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("by4columns"))}),I(8,"img",12),g(),d(9,"button",9),S(10,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("by3columns"))}),I(11,"img",13),g(),d(12,"button",9),S(13,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("by2columns"))}),I(14,"img",14),g(),d(15,"button",9),S(16,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("byRows"))}),I(17,"img",15),g(),d(18,"button",16),S(19,"i18n"),f("click",function(){p(s);let e=c();return m(e.onClick("setDefault"))}),I(20,"img",17),d(21,"label"),b(22),S(23,"i18n"),g()(),d(24,"button",18),f("click",function(){p(s);let e=c();return m(e.closeMobileFilter())}),I(25,"img",8),d(26,"label"),b(27),S(28,"i18n"),g()()}if(o&2){let s=c();E("active",s.widget.viewSize===5),k("title",T(1,21,"by6columns")),a(3),E("active",s.widget.viewSize===4),k("title",T(4,23,"by5columns")),a(3),E("active",s.widget.viewSize===3),k("title",T(7,25,"by4columns")),a(3),E("active",s.widget.viewSize===2),k("title",T(10,27,"by3columns")),a(3),E("active",s.widget.viewSize===1),k("title",T(13,29,"by2columns")),a(3),E("active",s.widget.viewSize===0),k("title",T(16,31,"byRows")),a(3),k("title",T(19,33,"setDefault")),a(4),M(T(23,35,"refresh")),a(5),M(T(28,37,"close"))}}function $i(o,i){if(o&1){let s=y();d(0,"button",19),f("click",function(){p(s);let e=c();return m(e.deleteWidgetClick())}),I(1,"img",20),d(2,"label"),b(3,"Delete widget"),g()()}}function ki(o,i){if(o&1){let s=y();d(0,"button",16),f("click",function(){let e=p(s).$implicit,n=c(2);return m(n.onClick(e.id))}),I(1,"img",24),d(2,"label"),b(3),g()()}if(o&2){let s=i.$implicit,t=c(2);E("active",t.widget[s.id]),k("title",s.tooltip),a(),k("src",s.icon,pe),a(2),M(s.text)}}function Mi(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("isLegend"))}),I(2,"img",25),d(3,"label"),b(4,"Legend"),g()()}if(o&2){let s=c(2);E("active",s.widget.isLegend),Q("title",T(1,3,"showLegend"))}}function Pi(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("showValues"))}),I(2,"img",26),d(3,"label"),b(4,"Values"),g()()}if(o&2){let s=c(2);E("active",s.widget.showValues),Q("title",T(1,3,"showValues"))}}function Fi(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("isTop"))}),I(2,"img",27),d(3,"label"),b(4,"Top"),g()()}if(o&2){let s=c(2);E("active",s.widget.isTop),Q("title",T(1,3,"showTop"))}}function Ei(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("showZero"))}),I(2,"img",28),d(3,"label"),b(4,"Zero"),g()()}if(o&2){let s=c(2);E("active",s.widget.showZero),Q("title",T(1,3,"showZero"))}}function Di(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("displayAsPivot"))}),I(2,"img",29),d(3,"label"),b(4,"Pivot"),g()()}if(o&2){let s=c(2);E("active",s.widget.type==="pivot"),Q("title",T(1,3,"showPivot"))}}function zi(o,i){if(o&1){let s=y();d(0,"button",16),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("chartConfig"))}),I(2,"img",30),d(3,"label"),b(4,"Colors"),g()()}o&2&&Q("title",T(1,1,"changeColors"))}function Wi(o,i){if(o&1){let s=y();d(0,"button",31),S(1,"i18n"),f("click",function(){p(s);let e=c(2);return m(e.onClick("expand"))}),I(2,"img",32),g()}if(o&2){let s=c(2);E("active",s.widget.isExpanded),k("title",T(1,4,"fullscreen"))("hidden",s.isEmptyWidget()||!s.widget.isSupported)}}function Oi(o,i){if(o&1&&(B(0,ki,4,5,"button",21,G),F(2,Mi,5,5,"button",21)(3,Pi,5,5,"button",21)(4,Fi,5,5,"button",21)(5,Ei,5,5,"button",21)(6,Di,5,5,"button",21)(7,zi,5,3,"button",22)(8,Wi,3,6,"button",23)),o&2){let s=c();H(s.typeDesc==null?null:s.typeDesc.headerButtons),a(2),x(!(s.typeDesc!=null&&s.typeDesc.disableLegend)&&s.widget.isChart&&!s.widget.noToggleLegend?2:-1),a(),x(s.widget.isBtnValues?3:-1),a(),x(s.widget.isChart?4:-1),a(),x(s.widget.isBtnZero?5:-1),a(),x(s.widget.isChart||s.widget.isMap||s.widget.type==="regular"||s.widget.oldType==="regular"?6:-1),a(),x(s.widget.isChart||s.widget.type==="regular"?7:-1),a(),x(s.widget.shared?-1:8)}}var Ke=(()=>{let i=class i{constructor(t,e,n,r,l,h,u,w,C){this.ss=t,this.us=e,this.ws=n,this.cd=r,this.ns=l,this.fs=h,this.hs=u,this.eds=w,this.route=C,this.onButtonClick=new V,this.onBack=new V,this.onResetClickFilter=new V,this.hasFilters=!1,this.filtersTooltip="",this.noDrag=!1,this.noDrag=this.route.snapshot.queryParamMap.get("nodrag")==="1"}ngOnInit(){this.subFiltersChanged=this.fs.onFiltersChanged.subscribe(()=>{this.updateActiveFiltersInfo(),this.cd.detectChanges()}),this.updateActiveFiltersInfo()}updateActiveFiltersInfo(){if(!this.widget||this.widget.type===tt.const.emptyWidgetClass)return;let t=this.fs.getWidgetFilters(this.widget?.name).filter(e=>e.value!==""||e.isInterval);this.hasFilters=!!t.length,this.filtersTooltip=t.map(e=>e.label+': '+e.valueDisplay+"").join(` `)}onClick(t){this.widget[t]=!this.widget[t];let e=this.ss.getWidgetsSettings(this.widget.dashboard);e[this.widget.name]||(e[this.widget.name]={}),e[this.widget.name][t]=this.widget[t],this.ss.setWidgetsSettings(e,this.widget.dashboard),this.onButtonClick.emit({widget:this.widget,name:t,state:this.widget[t]})}loadToolbarButton(t,e,n){if(this.us.isEmbedded()){let r=this.route.snapshot.queryParamMap.get(e);if(r){let l=!1;r.toLowerCase()==="true"?l=!0:r.toLowerCase()==="false"&&(l=!1),this.widget[e]=l;return}}t[this.widget.name]&&(t[this.widget.name][e]!==void 0?this.widget[e]=this.widgetsSettings[this.widget.name][e]:n!==void 0&&(this.widget[e]=n))}onBackClick(){this.onBack.emit()}onResetClickFilterHandler(){this.onResetClickFilter.emit()}isEmptyWidget(){if(!this.widget)return!1;let t=this.widget.type;return t===Pe||t==="horizontalControls"||t==="verticalControls"}closeMobileFilter(){this.hs.toggleMobileFilterDialog()}ngOnChanges(t){t.widget?.currentValue&&t.widget.currentValue!==t.widget.previousValue&&this.loadButtons()}ngOnDestroy(){this.subFiltersChanged?.unsubscribe()}onHeaderDoubleClick(){this.isEmptyWidget()||!this.widget.isSupported||this.onClick("expand")}deleteWidgetClick(){this.eds.deleteWidget(this.widget)}loadButtons(){this.widgetsSettings=this.ss.getWidgetsSettings(this.widget.dashboard)||{},this.loadToolbarButton(this.widgetsSettings,"isLegend"),this.loadToolbarButton(this.widgetsSettings,"isTop"),this.loadToolbarButton(this.widgetsSettings,"showZero"),this.loadToolbarButton(this.widgetsSettings,"showValues");let t=this.typeDesc?.headerButtons;if(t)for(let e=0;e .drag-handle[_ngcontent-%COMP%]{position:absolute;inset:-20px -20px 0}[_nghost-%COMP%] button[_ngcontent-%COMP%]{z-index:1;flex:0 0 auto;cursor:pointer;background-color:transparent;border:none;padding-left:4px;padding-right:4px;margin:-3px 0 0;height:22px;display:flex;align-items:center;justify-content:center;transition:background-color .3s line-height;outline:none}[_nghost-%COMP%] button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{opacity:var(--widget-header-btn-opacity);filter:var(--widget-header-btn-filter)}[_nghost-%COMP%] button[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{opacity:var(--widget-header-btn-opacity);filter:var(--widget-header-btn-filter)}[_nghost-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:var(--cl-header-btn-hover-darken)}[_nghost-%COMP%] button.active[_ngcontent-%COMP%] > img[_ngcontent-%COMP%], [_nghost-%COMP%] button.active[_ngcontent-%COMP%] > i[_ngcontent-%COMP%]{opacity:1;filter:var(--widget-header-btn-active-filter)}[_nghost-%COMP%] button[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{display:none}@media (max-width: 576px){[_nghost-%COMP%] button[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;flex:1 1 100%}[_nghost-%COMP%] button[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{display:inline-block;font-size:13px;opacity:var(--widget-header-btn-opacity);filter:var(--widget-header-btn-filter)}[_nghost-%COMP%] button[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:calc(var(--header-height) * .5)}}@media (max-width: 576px){[_nghost-%COMP%]{order:3;height:var(--header-height);border-bottom:none;border-top:1px solid var(--cl-header-border)}}.drag-handle[_ngcontent-%COMP%]{cursor:move;flex:1 1 100%;display:flex;justify-content:center;align-items:center}.drag-handle.no-drag[_ngcontent-%COMP%], .drag-handle.expanded[_ngcontent-%COMP%]{cursor:default}button.btn-with-text[_ngcontent-%COMP%]{cursor:pointer;color:var(--cl-widget-header-txt);display:flex;align-items:center}button.btn-with-text[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:100%}button.btn-with-text[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{display:block;cursor:pointer}@media (max-width: 576px){button.btn-with-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;flex:1 1 100%}button.btn-with-text[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{display:inline-block;font-size:13px;opacity:var(--widget-header-btn-opacity);filter:var(--widget-header-btn-filter)}button.btn-with-text[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{height:calc(var(--header-height) * .5)}}.title-text[_ngcontent-%COMP%]{pointer-events:none;margin-left:0;margin-right:4px;font-size:14px;font-weight:700;z-index:2}@media (max-width: 576px){.title-text[_ngcontent-%COMP%]{display:none!important}}.divider[_ngcontent-%COMP%]{margin-left:auto}.btn-filters[_ngcontent-%COMP%]{pointer-events:auto;vertical-align:top}"],changeDetection:0});let o=i;return o})();var Li=["filterPopup"];function Bi(o,i){if(o&1){let s=y();d(0,"span",1)(1,"label"),b(2),g(),d(3,"input",3),Nt("ngModelChange",function(e){let n=p(s).$implicit;return Xt(n.value,e)||(n.value=e),m(e)}),f("keydown.enter",function(){let e=p(s).$implicit,n=c();return m(n.emitVarChange(e))}),g()()}if(o&2){let s=i.$implicit;a(2),M(s.label),a(),At("ngModel",s.value)}}function Hi(o,i){if(o&1&&(d(0,"option",7),b(1),g()),o&2){let s=i.$implicit;k("ngValue",s),a(),M(s)}}function Ai(o,i){if(o&1){let s=y();d(0,"select",6),Nt("ngModelChange",function(e){p(s);let n=c().$implicit;return Xt(n.dsSelected,e)||(n.dsSelected=e),m(e)}),f("change",function(){p(s);let e=c().$implicit,n=c();return m(n.onDataSourceChangeHandler(e))}),B(1,Hi,2,2,"option",7,G),g()}if(o&2){let s=c().$implicit;At("ngModel",s.dsSelected),a(),H(s.labels)}}function Xi(o,i){if(o&1){let s=y();d(0,"input",8,0),f("keydown.enter",function(){p(s);let e=at(1);return m(e.blur())})("change",function(){p(s);let e=at(1),n=c().$implicit,r=c();return m(r.setControlValue(n,e.value,e))}),g()}if(o&2){let s=c().$implicit;k("type",s.type)("value",s._value)}}function Ni(o,i){if(o&1&&(d(0,"span",1)(1,"label"),b(2),g(),F(3,Ai,3,1,"select",4)(4,Xi,2,2,"input",5),g()),o&2){let s=i.$implicit;a(2),M(s.label),a(),x(s.field==="select"?3:-1),a(),x(s.field==="input"?4:-1)}}function Yi(o,i){if(o&1){let s=y();d(0,"span",1)(1,"button",9),f("click",function(){let e=p(s).$implicit,n=c();return m(n.performAction(e))}),b(2),g()()}if(o&2){let s=i.$implicit;a(2),M(s.label||s.action)}}function Gi(o,i){if(o&1){let s=y();d(0,"span",1)(1,"label"),b(2),g(),d(3,"input",10),f("click",function(e){let n=p(s).$implicit,r=c();return n.isOpen=!0,m(r.toggleFilter(n.idx,e))}),g()()}if(o&2){let s=i.$implicit,t=c();E("active",t.openedFilter===s.idx),a(2),M(s.label),a(),Q("value",s.text),Q("title",s.text)}}var Ze=(()=>{let i=class i{constructor(t,e,n,r,l,h){this.fs=t,this.ms=e,this.el=n,this.us=r,this.bs=l,this.cd=h,this.filters=[],this.onVariable=new V,this.onDataSource=new V,this.onAction=new V,this.onFilter=new V,this.openedFilter=-1}get isHorizontal(){return this.widget.type==="horizontalControls"}get colCount2(){return this.widget?.viewSize===1}get colCount3(){return this.widget?.viewSize===2}get colCount4(){return this.widget?.viewSize===3}get colCount5(){return this.widget?.viewSize===4}get colCount6(){return this.widget?.viewSize===5}get colCount1(){return this.widget?.viewSize===0}ngOnInit(){}emitVarChange(t){this.onVariable.emit(t)}onDataSourceChangeHandler(t){this.onDataSource.emit(t)}performAction(t){this.onAction.emit(t)}toggleFilter(t,e){let n=this.fs.getFilter(t);if(!n)return;this.openedFilter=t;let l=e.target.getBoundingClientRect(),h=l.x-4,u=l.y+l.height+4,w=n.isDate?420:340;h+w>window.innerWidth&&(h=l.x+l.width-w);let C=this.us.isMobile(),$;if(C){let W=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"),10);$=window.document.body.offsetHeight-W-this.el.nativeElement.offsetHeight}this.ms.show({component:import("./chunk-B7IYJD5T.js"),hideBackdrop:!0,closeByEsc:!0,closeByBackdropClick:!0,buttons:[],noPadding:!0,componentStyles:{position:"absolute",left:h+"px",top:u+"px",height:C?`${$}px`:"auto"},onComponentInit:W=>{W.initialize(this.widget,n,this.widget.dataSource)},onClose:()=>{this.openedFilter=-1,this.cd.detectChanges()}})}setControlValue(t,e,n){let r=parseInt(e,10);isNaN(r)||r===0?(delete t._value,n.value=""):t._value=e,this.bs.broadcast("refresh:"+this.widget.name)}detectChanges(){this.cd.detectChanges()}};i.\u0275fac=function(e){return new(e||i)(_(st),_(Ft),_(J),_(dt),_(pt),_(K))},i.\u0275cmp=A({type:i,selectors:[["dsw-widget-filter"]],viewQuery:function(e,n){if(e&1&&j(Li,7,me),e&2){let r;U(r=q())&&(n.filterPopup=r.first)}},hostVars:14,hostBindings:function(e,n){e&2&&E("horizontal",n.isHorizontal)("col-2",n.colCount2)("col-3",n.colCount3)("col-4",n.colCount4)("col-5",n.colCount5)("col-6",n.colCount6)("col-1",n.colCount1)},inputs:{widget:"widget",filters:"filters"},outputs:{onVariable:"onVariable",onDataSource:"onDataSource",onAction:"onAction",onFilter:"onFilter"},standalone:!0,features:[X],decls:8,vars:0,consts:[["inp",""],[1,"flt-holder"],[1,"flt-holder",3,"active"],[3,"ngModelChange","keydown.enter","ngModel"],[3,"ngModel"],[3,"type","value"],[3,"ngModelChange","change","ngModel"],[3,"ngValue"],[3,"keydown.enter","change","type","value"],[1,"btn-round",3,"click"],["readonly","","type","text",3,"click","value","title"]],template:function(e,n){e&1&&(B(0,Bi,4,2,"span",1,G),B(2,Ni,5,3,"span",1,G),B(4,Yi,3,1,"span",1,G),B(6,Gi,4,5,"span",2,G)),e&2&&(H(n.widget.pvItems),a(2),H(n.widget.dsItems),a(2),H(n.widget.acItems),a(2),H(n.filters))},dependencies:[$e,Se,Te,ye,Ie,_e,ve],styles:["[_ngcontent-%COMP%]:root{--cl-bg: #F5F5F5;--cl-accent: #1A73E8;--cl-btn-hover: #76abf1;--cl-hover: #E8F0FE;--cl-txt: #555555;--input-border-radius: 13px;--cl-btn-main: #5cb85c;--cl-btn-main-txt: #fff;--cl-btn-main-border: #4cae4c;--cl-btn-main-hover: #6eca6e;--cl-btn-secondary: #e6e6e6;--cl-btn-secondary-txt: #cccccc;--cl-btn-secondary-border: #b4b2b2;--cl-btn-secondary-hover: #dbdbdb;--icon-filter: none;--cl1: #b6e6ff;--cl2: #f7bfb7;--cl3: #bceca8;--cl4: #fff9a8;--cl5: #ffc593;--cl6: #f9b1ab;--cl7: #9de7fb;--cl8: #a8b8f9;--cl9: #9df1ae;--cl-header-bg: #FFFFFF;--cl-header-border: #F5F5F5;--cl-header-txt: #606367;--cl-header-ico: var(--cl-header-txt);--cl-header-btn-active: var(--cl-header-bg);--cl-header-btn-hover: var(--cl-bg);--cl-header-btn-hover-darken: var(--cl-hover);--header-height: 64px;--menu-item-icon-filter: none;--cl-sidebar-bg: #F5F5F5;--cl-sidebar-txt: #606367;--tile-border: none;--tile-border-radius: 10px;--tile-header-height: 28px;--cl-modal-bg: white;--fc0: #606367;--fc1: black;--fc2: red;--fc3: white;--fc4: green;--fc5: blue;--cl-widget-bg: white;--cl-widget-header-btn-active: #A9FFA1;--cl-widget-header-border: none;--cl-text-widget-font: #6b6464;--cl-widget-header-bg: var(--cl-header-bg);--cl-widget-header-txt: var(--cl-header-txt);--cl-widget-filter-txt: #606367;--cl-widget-filter-bg: var(--cl-header-bg);--widget-header-btn-opacity: 1;--widget-header-btn-filter: none;--widget-header-btn-active-filter: contrast(.7) sepia(1) brightness(1) hue-rotate(-898deg) contrast(9);--cl-input-bg: white;--cl-input-border: #EBEBEA;--cl-check-border: #606367;--cl-input-placeholder: rgba(96, 99, 103, .6);--cl-input-text: #606367;--cl-input-height: 26px;--cl-pivot-cell-border: rgb(208, 208, 208);--cl-pivot-cell-hover: #FFF7D7;--pivot-row-hover: inset 0 0 30px #fff5b9;--sidebar-width: 322px;--cl-scrollbar: #606367}[_nghost-%COMP%]{position:relative;display:flex;flex-shrink:0;background:var(--cl-widget-filter-bg);height:auto;flex-wrap:wrap;margin-bottom:5px}.col-1[_nghost-%COMP%], .col-2[_nghost-%COMP%], .col-3[_nghost-%COMP%], .col-4[_nghost-%COMP%], .col-5[_nghost-%COMP%], .col-6[_nghost-%COMP%]{display:grid;gap:10px}.col-1[_nghost-%COMP%] > span[_ngcontent-%COMP%], .col-2[_nghost-%COMP%] > span[_ngcontent-%COMP%], .col-3[_nghost-%COMP%] > span[_ngcontent-%COMP%], .col-4[_nghost-%COMP%] > span[_ngcontent-%COMP%], .col-5[_nghost-%COMP%] > span[_ngcontent-%COMP%], .col-6[_nghost-%COMP%] > span[_ngcontent-%COMP%]{width:100%;padding:0}.col-1[_nghost-%COMP%]{grid-template-columns:1fr}.col-2[_nghost-%COMP%]{grid-template-columns:1fr 1fr}.col-3[_nghost-%COMP%]{grid-template-columns:1fr 1fr 1fr}.col-4[_nghost-%COMP%]{grid-template-columns:1fr 1fr 1fr 1fr}.col-5[_nghost-%COMP%]{grid-template-columns:1fr 1fr 1fr 1fr 1fr}.col-6[_nghost-%COMP%]{grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr}.flt-holder[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden;padding:2px 4px}.flt-holder[_ngcontent-%COMP%]:first-child{padding-left:0}.flt-holder[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{font-size:12px;color:var(--cl-widget-filter-txt);margin-bottom:4px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.flt-holder[_ngcontent-%COMP%] > input[_ngcontent-%COMP%], .flt-holder[_ngcontent-%COMP%] > select[_ngcontent-%COMP%]{cursor:pointer;height:26px;padding:0 10px;border:1px solid #EBEBEA;border-radius:13px;box-shadow:none}.flt-holder[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus, .flt-holder[_ngcontent-%COMP%] > select[_ngcontent-%COMP%]:focus{outline:none;outline-offset:-1px}@media (max-width: 576px){.flt-holder[_ngcontent-%COMP%] > input[_ngcontent-%COMP%], .flt-holder[_ngcontent-%COMP%] > select[_ngcontent-%COMP%]{height:34px}}.flt-holder.active[_ngcontent-%COMP%]{background-color:var(--cl-widget-filter-bg)}.flt-holder.active[_ngcontent-%COMP%] > input[_ngcontent-%COMP%], .flt-holder.active[_ngcontent-%COMP%] > select[_ngcontent-%COMP%]{border-color:var(--cl-accent)}@media (max-width: 576px){.flt-holder[_ngcontent-%COMP%]{width:auto!important;flex:1 1 25%!important}}.input-group[_ngcontent-%COMP%]{display:flex;flex-direction:row}"]});let o=i;return o})();var ji=["header"],Ui=["filters"];function qi(o,i){o&1&&fe(0)}function Qi(o,i){if(o&1&&F(0,qi,1,0,"ng-container",6),o&2){let s=c();k("ngComponentOutlet",s.widgetType.class)("ngComponentOutletInputs",s.widgetInputs)}}function Ki(o,i){if(o&1&&(d(0,"div",4),b(1),g()),o&2){let s=c();a(),M(s.model.error)}}function Zi(o,i){o&1&&(d(0,"div",5),I(1,"img",7),g()),o&2&&k("@fade-in-out",void 0)}var Je=(()=>{let i=class i{constructor(t,e,n,r,l,h,u,w,C){this.fs=t,this.ss=e,this.vs=n,this.i18n=r,this.wts=l,this.bs=h,this.ms=u,this.cd=w,this.route=C,this.widget={},this.model={error:""},this.hasDatasourceChooser=!1,this.hasActions=!1,this.isHeader=!0,this.isHeader=this.route.snapshot.queryParamMap.get("noheader")!=="1"}ngOnInit(){this.widgetInputs={widget:this.widget,model:this.model,parent:this},this.updateComponent(),this.initFilters(),this.setupPivotVariables(),this.checkToolbarVisibility(),this.subscribeFilters(),this.subscribeActions()}ngAfterViewInit(){this.component=this.ngComponentOutlet?._componentRef?.instance,this.initDataSourceFromParams(),this.initDrillsForSharedWidget()}onHeaderButton(t){if(t.name==="displayAsPivot"){this.component?.displayAsPivot();return}this.component?.onHeaderButton(t),this.header?.cd.detectChanges()}setupPivotVariables(){this.widget.pvItems=[];let t=this.widget.type==="mdx2json.emptyportlet",e=[];this.vs.isExists()&&(e=this.vs.items.filter(n=>t?n.location==="dashboard":n.location!=="dashboard"&&(n.location==="*"||n.location===this.widget.name)),this.widget.pvItems=e,this.showToolbar())}showLoading(){this.widget.isLoading=!0}hideLoading(){this.widget.isLoading=!1}ngOnDestroy(){this.subCopyMdx?.unsubscribe(),this.subRefresh?.unsubscribe(),this.subFilter?.unsubscribe(),this.subUpdateFilterText?.unsubscribe(),this.subFilterAll?.unsubscribe(),this.subShare?.unsubscribe(),this.subChangeType?.unsubscribe()}clearError(){this.model.error=""}showError(t){this.model.error=t}updateFiltersText(){if(this.widget.type==="mdx2json.emptyportlet")for(let t=0;t{n.onCopy=()=>{this.ms.close(e)}}};this.ms.show(e)}appendShareState(t,e){let n=this.widget[e];return n&&(t+="&"+e+"="+n),t}share(){let t=this.component?.chart,e=this.fs.getFiltersShareUrl(),n=e.split("#")[1],r=(this.widget.name||this.widget.idx).toString();if(n&&n.indexOf("?")===-1?e+="?widget="+r:e+="&widget="+r,e=this.appendShareState(e,"isLegend"),e=this.appendShareState(e,"isTop"),e=this.appendShareState(e,"showZero"),e=this.appendShareState(e,"showValues"),t&&t.series){let w=t.series.map((C,$)=>({v:C.visible,i:$})).filter(C=>!C.v);w.length&&(e+="&hiddenSeries="+w.map(C=>C.i).join(","))}let l=this.component?.getDrillsAsParameter();l&&(e+="&drilldown="+l);let h='