1?e-1:0),t=1;tn).forEach(n=>{for(let[a,s]of Object.entries(n))if(s!==void 0&&s.toString()==="[object Object]"){let r=o[a]!==void 0?o[a].toString():void 0,h=s.toString(),d=Array.isArray(s)?[]:{};o[a]=o[a]?r!==h?d:o[a]:d,X(o[a],s)}else o[a]=s}),o}function M(o){let e=o;return o instanceof Date||(typeof o=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(o)&&(o+="T00:00:00"),e=new Date(o)),isNaN(e.getTime())&&(console.log(`Unable to convert value "${o}" to Date object`),e=!1),e}function le(o){let e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+o+")($|<|"+e+")","g")}function H(o,e,i){return(e=function(t){var n=function(a,s){if(typeof a!="object"||a===null)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var h=r.call(a,"string");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(t);return typeof n=="symbol"?n:String(n)}(e))in o?Object.defineProperty(o,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[e]=i,o}class Re{constructor(){let{type:e,date:i,dp:t,opts:n,body:a}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};H(this,"focus",()=>{this.$cell.classList.add("-focus-"),this.focused=!0}),H(this,"removeFocus",()=>{this.$cell.classList.remove("-focus-"),this.focused=!1}),H(this,"select",()=>{this.$cell.classList.add("-selected-"),this.selected=!0}),H(this,"removeSelect",()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1}),H(this,"onChangeSelectedDate",()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())}),H(this,"onChangeFocusDate",s=>{if(!s)return void(this.focused&&this.removeFocus());let r=b(s,this.date,this.type);r?this.focus():!r&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()}),H(this,"render",()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell)),this.type=e,this.singleType=this.type.slice(0,-1),this.date=i,this.dp=t,this.opts=n,this.body=a,this.customData=!1,this.init()}init(){var e;let{onRenderCell:i}=this.opts;i&&(this.customData=i({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(e=this.customData)!==null&&e!==void 0&&e.disabled&&this.dp.disableDate(this.date)}_bindDatepickerEvents(){this.dp.on(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(l.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(l.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var e;let{year:i,month:t,date:n}=y(this.date),a=((e=this.customData)===null||e===void 0?void 0:e.attrs)||{};this.$cell=f({attrs:be({"data-year":i,"data-month":t,"data-date":n},a)}),this.$cell.adpCell=this}_getClassName(){var e;let i=new Date,{selectOtherMonths:t,selectOtherYears:n}=this.opts,{minDate:a,maxDate:s,isDateDisabled:r}=this.dp,{day:h}=y(this.date),d=this._isOutOfMinMaxRange(),u=r(this.date),c=S("air-datepicker-cell",`-${this.singleType}-`,{"-current-":b(i,this.date,this.type),"-min-date-":a&&b(a,this.date,this.type),"-max-date-":s&&b(s,this.date,this.type)}),m="";switch(this.type){case l.days:m=S({"-weekend-":this.dp.isWeekend(h),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!t||d||u});break;case l.months:m=S({"-disabled-":d});break;case l.years:m=S({"-other-decade-":this.isOtherDecade,"-disabled-":d||this.isOtherDecade&&!n})}return S(c,m,(e=this.customData)===null||e===void 0?void 0:e.classes).split(" ")}_getHtml(){var e;let{year:i,month:t,date:n}=y(this.date),{showOtherMonths:a,showOtherYears:s}=this.opts;if((e=this.customData)!==null&&e!==void 0&&e.html)return this.customData.html;switch(this.type){case l.days:return!a&&this.isOtherMonth?"":n;case l.months:return this.dp.locale[this.opts.monthsField][t];case l.years:return!s&&this.isOtherDecade?"":i}}_isOutOfMinMaxRange(){let{minDate:e,maxDate:i}=this.dp,{type:t,date:n}=this,{month:a,year:s,date:r}=y(n),h=t===l.days,d=t===l.years,u=!!e&&new Date(s,d?e.getMonth():a,h?r:e.getDate()),c=!!i&&new Date(s,d?i.getMonth():a,h?r:i.getDate());return e&&i?U(u,e)||T(c,i):e?U(u,e):i?T(c,i):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:e,focusDate:i,rangeDateTo:t,rangeDateFrom:n}=this.dp,a=e.length;if(!a)return;let s=n,r=t;if(a===1&&i){let m=T(i,e[0]);s=m?e[0]:i,r=m?i:e[0]}let h=S({"-in-range-":s&&r&&(d=this.date,u=s,c=r,T(d,u)&&U(d,c)),"-range-from-":s&&b(this.date,s,this.type),"-range-to-":r&&b(this.date,r,this.type)});var d,u,c;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),h&&this.$cell.classList.add(...h.split(" "))}_handleSelectedStatus(){let e=this.dp._checkIfDateIsSelected(this.date,this.type);e?this.select():!e&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){b(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function $(o,e,i){return(e=function(t){var n=function(a,s){if(typeof a!="object"||a===null)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var h=r.call(a,"string");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(t);return typeof n=="symbol"?n:String(n)}(e))in o?Object.defineProperty(o,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[e]=i,o}let Ke={[l.days]:``,[l.months]:``,[l.years]:``},J=".air-datepicker-cell";class O{constructor(e){let{dp:i,type:t,opts:n}=e;$(this,"handleClick",a=>{let s=a.target.closest(J).adpCell;if(s.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let r=this.dp._checkIfDateIsSelected(s.date,s.type);r?this.dp._handleAlreadySelectedDates(r,s.date):this.dp.selectDate(s.date)}),$(this,"handleDayNameClick",a=>{let s=a.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(s),datepicker:this.dp})}),$(this,"onChangeCurrentView",a=>{a!==this.type?this.hide():(this.show(),this.render())}),$(this,"onMouseOverCell",a=>{let s=z(a.target,J);this.dp.setFocusDate(!!s&&s.adpCell.date)}),$(this,"onMouseOutCell",()=>{this.dp.setFocusDate(!1)}),$(this,"onClickBody",a=>{let{onClickDayName:s}=this.opts,r=a.target;r.closest(J)&&this.handleClick(a),s&&r.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(a)}),$(this,"onMouseDown",a=>{this.pressed=!0;let s=z(a.target,J),r=s&&s.adpCell;b(r.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),b(r.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)}),$(this,"onMouseMove",a=>{if(!this.pressed||!this.dp.isMinViewReached)return;a.preventDefault();let s=z(a.target,J),r=s&&s.adpCell,{selectedDates:h,rangeDateTo:d,rangeDateFrom:u}=this.dp;if(!r||r.isDisabled)return;let{date:c}=r;if(h.length===2){if(this.rangeFromFocused&&!T(c,d)){let{hours:m,minutes:D}=y(u);c.setHours(m),c.setMinutes(D),this.dp.rangeDateFrom=c,this.dp.replaceDate(u,c)}if(this.rangeToFocused&&!U(c,u)){let{hours:m,minutes:D}=y(d);c.setHours(m),c.setMinutes(D),this.dp.rangeDateTo=c,this.dp.replaceDate(d,c)}}}),$(this,"onMouseUp",()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1}),$(this,"onChangeViewDate",(a,s)=>{if(!this.isVisible)return;let r=A(a),h=A(s);switch(this.dp.currentView){case l.days:if(b(a,s,l.months))return;break;case l.months:if(b(a,s,l.years))return;break;case l.years:if(r[0]===h[0]&&r[1]===h[1])return}this.render()}),$(this,"render",()=>{this.destroyCells(),this._generateCells(),this.cells.forEach(a=>{this.$cells.appendChild(a.render())})}),this.dp=i,this.type=t,this.opts=n,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===l.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:e,dynamicRange:i}=this.opts;_(this.$el,"mouseover",this.onMouseOverCell),_(this.$el,"mouseout",this.onMouseOutCell),_(this.$el,"click",this.onClickBody),e&&i&&(_(this.$el,"mousedown",this.onMouseDown),_(this.$el,"mousemove",this.onMouseMove),_(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(l.eventChangeViewDate,this.onChangeViewDate),this.dp.on(l.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=f({className:`air-datepicker-body -${this.type}-`,innerHtml:Ke[this.type]}),this.$names=p(".air-datepicker-body--day-names",this.$el),this.$cells=p(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,i="",t=this.dp.isWeekend,{onClickDayName:n}=this.opts,a=e,s=0;for(;s<7;){let r=a%7;i+=`${this.dp.locale.daysMin[r]}
`,s++,a++}return i}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(e){let{type:i,dp:t,opts:n}=this;return new Re({type:i,dp:t,opts:n,date:e,body:this})}_generateCells(){O.getDatesFunction(this.type)(this.dp,e=>{this.cells.push(this._generateCell(e))})}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach(e=>e.destroy()),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(l.eventChangeViewDate,this.onChangeViewDate),this.dp.off(l.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(e,i){let{viewDate:t,opts:{fixedHeight:n},locale:{firstDay:a}}=e,s=R(t),{year:r,month:h}=y(t),d=new Date(r,h,1),u=new Date(r,h,s),c=d.getDay()-a,m=6-u.getDay()+a;c=c<0?c+7:c,m=m>6?m-7:m;let D=function(B,de){let{year:ee,month:qe,date:Ge}=y(B);return new Date(ee,qe,Ge-de)}(d,c),C=s+c+m,k=D.getDate(),{year:Z,month:q}=y(D),P=0;n&&(C=42);let j=[];for(;P0&&arguments[0]!==void 0?arguments[0]:l.days;return{[l.days]:O.getDaysDates,[l.months]:O.getMonthsDates,[l.years]:O.getYearsDates}[e]}}function L(o,e,i){return(e=function(t){var n=function(a,s){if(typeof a!="object"||a===null)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var h=r.call(a,"string");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(t);return typeof n=="symbol"?n:String(n)}(e))in o?Object.defineProperty(o,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[e]=i,o}class Ue{constructor(e){let{dp:i,opts:t}=e;L(this,"onClickNav",n=>{let a=z(n.target,".air-datepicker-nav--action");if(!a)return;let s=a.dataset.action;this.dp[s]()}),L(this,"onChangeViewDate",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),L(this,"onChangeCurrentView",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),L(this,"onClickNavTitle",()=>{this.dp.isFinalView||this.dp.up()}),L(this,"update",()=>{let{prevHtml:n,nextHtml:a}=this.opts;this.$prev.innerHTML=n,this.$next.innerHTML=a,this._resetNavStatus(),this.render(),this.handleNavStatus()}),L(this,"renderDelay",()=>{setTimeout(this.render)}),L(this,"render",()=>{this.$title.innerHTML=this._getTitle(),function(n,a){for(let s in a)a[s]?n.classList.add(s):n.classList.remove(s)}(this.$title,{"-disabled-":this.dp.isFinalView})}),this.dp=i,this.opts=t,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=p(".air-datepicker-nav--title",this.$el),this.$prev=p('[data-action="prev"]',this.$el),this.$next=p('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(l.eventChangeViewDate,this.onChangeViewDate),this.dp.on(l.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(l.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(l.eventChangeTime,this.render))}destroy(){this.dp.off(l.eventChangeViewDate,this.onChangeViewDate),this.dp.off(l.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(l.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(l.eventChangeTime,this.render))}_createElement(){this.$el=f({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:e,opts:i}=this,t=i.navTitles[e.currentView];return typeof t=="function"?t(e):e.formatDate(e.viewDate,t)}handleNavStatus(){let{disableNavWhenOutOfRange:e}=this.opts,{minDate:i,maxDate:t}=this.dp;if(!i&&!t||!e)return;let{year:n,month:a}=this.dp.parsedViewDate,s=!!i&&y(i),r=!!t&&y(t);switch(this.dp.currentView){case l.days:i&&s.month>=a&&s.year>=n&&this._disableNav("prev"),t&&r.month<=a&&r.year<=n&&this._disableNav("next");break;case l.months:i&&s.year>=n&&this._disableNav("prev"),t&&r.year<=n&&this._disableNav("next");break;case l.years:{let h=A(this.dp.viewDate);i&&s.year>=h[0]&&this._disableNav("prev"),t&&r.year<=h[1]&&this._disableNav("next");break}}}_disableNav(e){p('[data-action="'+e+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(e){for(var i=arguments.length,t=new Array(i>1?i-1:0),n=1;n{a.classList.remove(...t)}):e.classList.remove(...t)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:e,nextHtml:i}=this.opts;this.$el.innerHTML=`${e}
${i}
`}get isNavIsFunction(){let{navTitles:e}=this.opts;return Object.keys(e).find(i=>typeof e[i]=="function")}}var De={today:{content:o=>o.locale.today,onClick:o=>o.setViewDate(new Date)},clear:{content:o=>o.locale.clear,onClick:o=>o.clear()}};class Ye{constructor(e){let{dp:i,opts:t}=e;this.dp=i,this.opts=t,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=f({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:e}=this.opts;Array.isArray(e)||(e=[e]),e.forEach(i=>{let t=i;typeof i=="string"&&De[i]&&(t=De[i]);let n=this.createButton(t);t.onClick&&this.attachEventToButton(n,t.onClick),this.$el.appendChild(n)})}attachEventToButton(e,i){e.addEventListener("click",()=>{i(this.dp)})}createButton(e){let{content:i,className:t,tagName:n="button",attrs:a={}}=e;return f({tagName:n,innerHtml:`${typeof i=="function"?i(this.dp):i}`,className:S("air-datepicker-button",t),attrs:a})}render(){this.generateButtons()}}function N(o,e,i){return(e=function(t){var n=function(a,s){if(typeof a!="object"||a===null)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var h=r.call(a,"string");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(t);return typeof n=="symbol"?n:String(n)}(e))in o?Object.defineProperty(o,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[e]=i,o}class We{constructor(){let{opts:e,dp:i}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};N(this,"toggleTimepickerIsActive",n=>{this.dp.timepickerIsActive=n}),N(this,"onChangeSelectedDate",n=>{let{date:a,updateTime:s=!1}=n;a&&(this.setMinMaxTime(a),this.setCurrentTime(!!s&&a),this.addTimeToDate(a))}),N(this,"onChangeLastSelectedDate",n=>{n&&(this.setTime(n),this.render())}),N(this,"onChangeInputRange",n=>{let a=n.target;this[a.getAttribute("name")]=a.value,this.updateText(),this.dp.trigger(l.eventChangeTime,{hours:this.hours,minutes:this.minutes})}),N(this,"onMouseEnterLeave",n=>{let a=n.target.getAttribute("name"),s=this.$minutesText;a==="hours"&&(s=this.$hoursText),s.classList.toggle("-focus-")}),N(this,"onFocus",()=>{this.toggleTimepickerIsActive(!0)}),N(this,"onBlur",()=>{this.toggleTimepickerIsActive(!1)}),this.opts=e,this.dp=i;let{timeFormat:t}=this.dp.locale;t&&(t.match(le("h"))||t.match(le("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(l.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let e="input";navigator.userAgent.match(/trident/gi)&&(e="change"),_(this.$ranges,e,this.onChangeInputRange),_(this.$ranges,"mouseenter",this.onMouseEnterLeave),_(this.$ranges,"mouseleave",this.onMouseEnterLeave),_(this.$ranges,"focus",this.onFocus),_(this.$ranges,"mousedown",this.onFocus),_(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=f({className:S("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(l.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(l.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:e,hours:i,displayHours:t,minutes:n,minHours:a,minMinutes:s,maxHours:r,maxMinutes:h,dayPeriod:d,opts:{hoursStep:u,minutesStep:c}}=this;this.$el.innerHTML=` ${K(t)} : ${K(n)} `+(e?`${d}`:"")+`
`}defineDOM(){let e=i=>p(i,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=e('[name="hours"]'),this.$minutes=e('[name="minutes"]'),this.$hoursText=e(".air-datepicker-time--current-hours"),this.$minutesText=e(".air-datepicker-time--current-minutes"),this.$ampm=e(".air-datepicker-time--current-ampm")}setTime(e){this.setMinMaxTime(e),this.setCurrentTime(e)}addTimeToDate(e){e&&(e.setHours(this.hours),e.setMinutes(this.minutes))}setMinMaxTime(e){if(this.setMinMaxTimeFromOptions(),e){let{minDate:i,maxDate:t}=this.dp;i&&b(e,i)&&this.setMinTimeFromMinDate(i),t&&b(e,t)&&this.setMaxTimeFromMaxDate(t)}}setCurrentTime(e){let{hours:i,minutes:t}=e?y(e):this;this.hours=Y(i,this.minHours,this.maxHours),this.minutes=Y(t,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:e,minMinutes:i,maxHours:t,maxMinutes:n}=this.opts;this.minHours=Y(e,0,23),this.minMinutes=Y(i,0,59),this.maxHours=Y(t,0,23),this.maxMinutes=Y(n,0,59)}setMinTimeFromMinDate(e){let{lastSelectedDate:i}=this.dp;this.minHours=e.getHours(),i&&i.getHours()>e.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=e.getMinutes()}setMaxTimeFromMaxDate(e){let{lastSelectedDate:i}=this.dp;this.maxHours=e.getHours(),i&&i.getHours()n.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],n=>n.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],n=>n.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],n=>n.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],n=>n.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],n=>n.year-=10],[["Control","Shift","ArrowUp"],(n,a)=>a.up()]])),I(this,"handleHotKey",n=>{let a=this.hotKeys.get(n),s=y(this.getInitialFocusDate());a(s,this.dp);let{year:r,month:h,date:d}=s,u=R(new Date(r,h));u{let n=!1,a=this.pressedKeys.size,s=r=>this.pressedKeys.has(r);for(let[r]of this.hotKeys){if(n)break;if(Array.isArray(r[0]))r.forEach(h=>{n||a!==h.length||(n=h.every(s)&&r)});else{if(a!==r.length)continue;n=r.every(s)&&r}}return n}),I(this,"isArrow",n=>n>=37&&n<=40),I(this,"onKeyDown",n=>{let{key:a,which:s}=n,{dp:r,dp:{focusDate:h},opts:d}=this;this.registerKey(a);let u=this.isHotKeyPressed();if(u)return n.preventDefault(),void this.handleHotKey(u);if(this.isArrow(s))return n.preventDefault(),void this.focusNextCell(a);if(a==="Enter"){if(r.currentView!==d.minView)return void r.down();if(h){let c=r._checkIfDateIsSelected(h);return void(c?r._handleAlreadySelectedDates(c,h):r.selectDate(h))}}a==="Escape"&&this.dp.hide()}),I(this,"onKeyUp",n=>{this.removeKey(n.key)}),this.dp=i,this.opts=t,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:e}=this.dp;e.addEventListener("keydown",this.onKeyDown),e.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:e}=this.dp;e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:e,currentView:i,selectedDates:t,parsedViewDate:{year:n,month:a}}=this.dp,s=e||t[t.length-1];if(!s)switch(i){case l.days:s=new Date(n,a,new Date().getDate());break;case l.months:s=new Date(n,a,1);break;case l.years:s=new Date(n,0,1)}return s}focusNextCell(e){let i=this.getInitialFocusDate(),{currentView:t}=this.dp,{days:n,months:a,years:s}=l,r=y(i),h=r.year,d=r.month,u=r.date;switch(e){case"ArrowLeft":t===n&&(u-=1),t===a&&(d-=1),t===s&&(h-=1);break;case"ArrowUp":t===n&&(u-=7),t===a&&(d-=3),t===s&&(h-=4);break;case"ArrowRight":t===n&&(u+=1),t===a&&(d+=1),t===s&&(h+=1);break;case"ArrowDown":t===n&&(u+=7),t===a&&(d+=3),t===s&&(h+=4)}let c=this.dp.getClampedDate(new Date(h,d,u));this.dp.setFocusDate(c,{viewDateTransition:!0})}registerKey(e){this.pressedKeys.add(e)}removeKey(e){this.pressedKeys.delete(e)}}let Je={on(o,e){this.__events||(this.__events={}),this.__events[o]?this.__events[o].push(e):this.__events[o]=[e]},off(o,e){this.__events&&this.__events[o]&&(this.__events[o]=this.__events[o].filter(i=>i!==e))},removeAllEvents(){this.__events={}},trigger(o){for(var e=arguments.length,i=new Array(e>1?e-1:0),t=1;t{n(...i)})}};function g(o,e,i){return(e=function(t){var n=function(a,s){if(typeof a!="object"||a===null)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var h=r.call(a,"string");if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(t);return typeof n=="symbol"?n:String(n)}(e))in o?Object.defineProperty(o,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[e]=i,o}let W="",x="",he=!1;class V{static buildGlobalContainer(e){he=!0,W=f({className:e,id:e}),p("body").appendChild(W)}constructor(e,i){var t=this;if(g(this,"viewIndexes",[l.days,l.months,l.years]),g(this,"next",()=>{let{year:s,month:r}=this.parsedViewDate;switch(this.currentView){case l.days:this.setViewDate(new Date(s,r+1,1));break;case l.months:this.setViewDate(new Date(s+1,r,1));break;case l.years:this.setViewDate(new Date(s+10,0,1))}}),g(this,"prev",()=>{let{year:s,month:r}=this.parsedViewDate;switch(this.currentView){case l.days:this.setViewDate(new Date(s,r-1,1));break;case l.months:this.setViewDate(new Date(s-1,r,1));break;case l.years:this.setViewDate(new Date(s-10,0,1))}}),g(this,"_finishHide",()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)}),g(this,"setPosition",function(s){let r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(s=s||t.opts.position)=="function")return void(t.customHide=s({$datepicker:t.$datepicker,$target:t.$el,$pointer:t.$pointer,isViewChange:r,done:t._finishHide}));let h,d,{isMobile:u}=t.opts,c=t.$el.getBoundingClientRect(),m=t.$el.getBoundingClientRect(),D=t.$datepicker.offsetParent,C=t.$el.offsetParent,k=t.$datepicker.getBoundingClientRect(),Z=s.split(" "),q=window.scrollY,P=window.scrollX,j=t.opts.offset,B=Z[0],de=Z[1];if(u)t.$datepicker.style.cssText="left: 50%; top: 50%";else{if(D===C&&D!==document.body&&(m={top:t.$el.offsetTop,left:t.$el.offsetLeft,width:c.width,height:t.$el.offsetHeight},q=0,P=0),D!==C&&D!==document.body){let ee=D.getBoundingClientRect();m={top:c.top-ee.top,left:c.left-ee.left,width:c.width,height:c.height},q=0,P=0}switch(B){case"top":h=m.top-k.height-j;break;case"right":d=m.left+m.width+j;break;case"bottom":h=m.top+m.height+j;break;case"left":d=m.left-k.width-j}switch(de){case"top":h=m.top;break;case"right":d=m.left+m.width-k.width;break;case"bottom":h=m.top+m.height-k.height;break;case"left":d=m.left;break;case"center":/left|right/.test(B)?h=m.top+m.height/2-k.height/2:d=m.left+m.width/2-k.width/2}t.$datepicker.style.cssText=`left: ${d+P}px; top: ${h+q}px`}}),g(this,"_setInputValue",()=>{let{opts:s,$altField:r,locale:{dateFormat:h}}=this,{altFieldDateFormat:d,altField:u}=s;u&&r&&(r.value=this._getInputValue(d)),this.$el.value=this._getInputValue(h)}),g(this,"_getInputValue",s=>{let{selectedDates:r,opts:h}=this,{multipleDates:d,multipleDatesSeparator:u}=h;if(!r.length)return"";let c=typeof s=="function",m=c?s(d?r:r[0]):r.map(D=>this.formatDate(D,s));return m=c?m:m.join(u),m}),g(this,"_checkIfDateIsSelected",function(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.days,h=!1;return t.selectedDates.some(d=>{let u=b(s,d,r);return h=u&&d,u}),h}),g(this,"_scheduleCallAfterTransition",s=>{this._cancelScheduledCall(),s&&s(!1),this._onTransitionEnd=()=>{s&&s(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})}),g(this,"_cancelScheduledCall",()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)}),g(this,"setViewDate",s=>{if(!((s=M(s))instanceof Date)||b(s,this.viewDate))return;let r=this.viewDate;this.viewDate=s;let{onChangeViewDate:h}=this.opts;if(h){let{month:d,year:u}=this.parsedViewDate;h({month:d,year:u,decade:this.curDecade})}this.trigger(l.eventChangeViewDate,s,r)}),g(this,"setFocusDate",function(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!s||(s=M(s))instanceof Date)&&(t.focusDate=s,t.trigger(l.eventChangeFocusDate,s,r))}),g(this,"setCurrentView",function(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t.viewIndexes.includes(s)){if(t.currentView=s,t.elIsInput&&t.visible&&t.setPosition(void 0,!0),t.trigger(l.eventChangeCurrentView,s),!t.views[s]){let h=t.views[s]=new O({dp:t,opts:t.opts,type:s});t.shouldUpdateDOM&&t.$content.appendChild(h.$el)}t.opts.onChangeView&&!r.silent&&t.opts.onChangeView(s)}}),g(this,"_updateLastSelectedDate",s=>{this.lastSelectedDate=s,this.trigger(l.eventChangeLastSelectedDate,s)}),g(this,"destroy",()=>{if(this.isDestroyed)return;let{showEvent:s,isMobile:r}=this.opts,h=this.$datepicker.parentNode;h&&h.removeChild(this.$datepicker),this.$el.removeEventListener(s,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),r&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0}),g(this,"update",function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=X({},t.opts),{silent:d}=r;X(t.opts,s);let{timepicker:u,buttons:c,range:m,selectedDates:D,isMobile:C}=t.opts,k=t.visible||t.treatAsInline;t._createMinMaxDates(),t._limitViewDateByMaxMinDates(),t._handleLocale(),D&&(t.selectedDates=[],t.selectDate(D,{silent:d})),s.view&&t.setCurrentView(s.view,{silent:d}),t._setInputValue(),h.range&&!m?(t.rangeDateTo=!1,t.rangeDateFrom=!1):!h.range&&m&&t.selectedDates.length&&(t.rangeDateFrom=t.selectedDates[0],t.rangeDateTo=t.selectedDates[1]),h.timepicker&&!u?(k&&t.timepicker.destroy(),t.timepicker=!1,t.$timepicker.parentNode.removeChild(t.$timepicker)):!h.timepicker&&u&&t._addTimepicker(),!h.buttons&&c?t._addButtons():h.buttons&&!c?(t.buttons.destroy(),t.$buttons.parentNode.removeChild(t.$buttons)):k&&h.buttons&&c&&t.buttons.clearHtml().render(),!h.isMobile&&C?(t.treatAsInline||x||t._createMobileOverlay(),t._addMobileAttributes(),t.visible&&t._showMobileOverlay()):h.isMobile&&!C&&(t._removeMobileAttributes(),t.visible&&(x.classList.remove("-active-"),typeof t.opts.position!="function"&&t.setPosition())),k&&(t.nav.update(),t.views[t.currentView].render(),t.currentView===l.days&&t.views[t.currentView].renderDayNames())}),g(this,"disableDate",(s,r)=>{(Array.isArray(s)?s:[s]).forEach(h=>{let d=M(h);if(!d)return;let u=r?"delete":"add";this.disabledDates[u](this.formatDate(d,"yyyy-MM-dd"));let c=this.getCell(d,this.currentViewSingular);c&&c.adpCell.render()},[])}),g(this,"enableDate",s=>{this.disableDate(s,!0)}),g(this,"isDateDisabled",s=>{let r=M(s);return this.disabledDates.has(this.formatDate(r,"yyyy-MM-dd"))}),g(this,"isOtherMonth",s=>{let{month:r}=y(s);return r!==this.parsedViewDate.month}),g(this,"isOtherYear",s=>{let{year:r}=y(s);return r!==this.parsedViewDate.year}),g(this,"isOtherDecade",s=>{let{year:r}=y(s),[h,d]=A(this.viewDate);return rd}),g(this,"_onChangeSelectedDate",s=>{let{silent:r}=s;setTimeout(()=>{this._setInputValue(),this.opts.onSelect&&!r&&this._triggerOnSelect()})}),g(this,"_onChangeFocusedDate",function(s){let{viewDateTransition:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!s)return;let h=!1;r&&(h=t.isOtherMonth(s)||t.isOtherYear(s)||t.isOtherDecade(s)),h&&t.setViewDate(s),t.opts.onFocus&&t.opts.onFocus({datepicker:t,date:s})}),g(this,"_onChangeTime",s=>{let{hours:r,minutes:h}=s,d=new Date,{lastSelectedDate:u,opts:{onSelect:c}}=this,m=u;u||(m=d);let D=this.getCell(m,this.currentViewSingular),C=D&&D.adpCell;C&&C.isDisabled||(m.setHours(r),m.setMinutes(h),u?(this._setInputValue(),c&&this._triggerOnSelect()):this.selectDate(m))}),g(this,"_onFocus",s=>{this.visible||this.show()}),g(this,"_onBlur",s=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()}),g(this,"_onMouseDown",s=>{this.inFocus=!0}),g(this,"_onMouseUp",s=>{this.inFocus=!1,this.$el.focus()}),g(this,"_onResize",()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()}),g(this,"_onClickOverlay",()=>{this.visible&&this.hide()}),g(this,"getViewDates",function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l.days;return O.getDatesFunction(s)(t)}),g(this,"isWeekend",s=>this.opts.weekends.includes(s)),g(this,"getClampedDate",s=>{let{minDate:r,maxDate:h}=this,d=s;return h&&T(s,h)?d=h:r&&U(s,r)&&(d=r),d}),this.$el=p(e),!this.$el)return;this.$datepicker=f({className:"air-datepicker"}),this.opts=X({},v,i),this.$customContainer=!!this.opts.container&&p(this.opts.container),this.$altField=p(this.opts.altField||!1);let{view:n,startDate:a}=this.opts;a||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=M(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=n,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:e,treatAsInline:i,opts:{inline:t,isMobile:n,selectedDates:a,keyboardNav:s,onlyTimepicker:r}}=this,h=p("body");(!he||he&&W&&!h.contains(W))&&!t&&this.elIsInput&&!this.$customContainer&&V.buildGlobalContainer(V.defaultGlobalContainerId),!n||x||i||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(t||this._bindEvents(),s&&!r&&(this.keyboardNav=new ze({dp:this,opts:e}))),a&&this.selectDate(a,{silent:!0}),this.opts.visible&&!i&&this.show(),n&&!i&&this.$el.setAttribute("readonly",!0),i&&this._createComponents()}_createMobileOverlay(){x=f({className:"air-datepicker-overlay"}),W.appendChild(x)}_createComponents(){let{opts:e,treatAsInline:i,opts:{inline:t,buttons:n,timepicker:a,position:s,classes:r,onlyTimepicker:h,isMobile:d}}=this;this._buildBaseHtml(),this.elIsInput&&(t||this._setPositionClasses(s)),!t&&this.elIsInput||this.$datepicker.classList.add("-inline-"),r&&this.$datepicker.classList.add(...r.split(" ")),h&&this.$datepicker.classList.add("-only-timepicker-"),d&&!i&&this._addMobileAttributes(),this.views[this.currentView]=new O({dp:this,type:this.currentView,opts:e}),this.nav=new Ue({dp:this,opts:e}),a&&this._addTimepicker(),n&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let e in this.views)this.views[e].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){x.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){x.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:e,maxDate:i}=this.opts;this.minDate=!!e&&M(e),this.maxDate=!!i&&M(i)}_addTimepicker(){this.$timepicker=f({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new We({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=f({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new Ye({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(l.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(l.eventChangeFocusDate,this._onChangeFocusedDate),this.on(l.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:e}=this.opts;var i,t;this.elIsInput?e?(i=this.$datepicker,(t=this.$el).parentNode.insertBefore(i,t.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='',this.$content=p(".air-datepicker--content",this.$datepicker),this.$pointer=p(".air-datepicker--pointer",this.$datepicker),this.$nav=p(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:e,dateFormat:i,firstDay:t,timepicker:n,onlyTimepicker:a,timeFormat:s,dateTimeSeparator:r}=this.opts;var h;this.locale=(h=e,JSON.parse(JSON.stringify(h))),i&&(this.locale.dateFormat=i),s!==void 0&&s!==""&&(this.locale.timeFormat=s);let{timeFormat:d}=this.locale;if(t!==""&&(this.locale.firstDay=t),n&&typeof i!="function"){let u=d?r:"";this.locale.dateFormat=[this.locale.dateFormat,d||""].join(u)}a&&typeof i!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(e){if(typeof e=="function")return void this.$datepicker.classList.add("-custom-position-");let i=(e=e.split(" "))[0],t=`air-datepicker -${i}-${e[1]}- -from-${i}-`;this.$datepicker.classList.add(...t.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:e,minDate:i,maxDate:t}=this;t&&T(e,t)&&this.setViewDate(t),i&&U(e,i)&&this.setViewDate(i)}formatDate(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,i=arguments.length>1?arguments[1]:void 0;if(e=M(e),!(e instanceof Date))return;let t=i,n=this.locale,a=y(e),s=a.dayPeriod,r=A(e),h=V.replacer,d={T:e.getTime(),m:a.minutes,mm:a.fullMinutes,h:a.hours12,hh:a.fullHours12,H:a.hours,HH:a.fullHours,aa:s,AA:s.toUpperCase(),E:n.daysShort[a.day],EEEE:n.days[a.day],d:a.date,dd:a.fullDate,M:a.month+1,MM:a.fullMonth,MMM:n.monthsShort[a.month],MMMM:n.months[a.month],yy:a.year.toString().slice(-2),yyyy:a.year,yyyy1:r[0],yyyy2:r[1]};for(let[u,c]of Object.entries(d))t=h(t,le(u),c);return t}down(e){this._handleUpDownActions(e,"down")}up(e){this._handleUpDownActions(e,"up")}selectDate(e){let i,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:n,parsedViewDate:a,selectedDates:s}=this,{updateTime:r}=t,{moveToOtherMonthsOnSelect:h,moveToOtherYearsOnSelect:d,multipleDates:u,range:c,autoClose:m,onBeforeSelect:D}=this.opts,C=s.length;if(Array.isArray(e))return e.forEach(k=>{this.selectDate(k,t)}),new Promise(k=>{setTimeout(k)});if((e=M(e))instanceof Date){if(D&&!D({date:e,datepicker:this}))return Promise.resolve();if(n===l.days&&e.getMonth()!==a.month&&h&&(i=new Date(e.getFullYear(),e.getMonth(),1)),n===l.years&&e.getFullYear()!==a.year&&d&&(i=new Date(e.getFullYear(),0,1)),i&&this.setViewDate(i),u&&!c){if(C===u)return;this._checkIfDateIsSelected(e)||s.push(e)}else if(c)switch(C){case 1:s.push(e),this.rangeDateTo||(this.rangeDateTo=e),T(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=e),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[e],this.rangeDateFrom=e,this.rangeDateTo="";break;default:this.selectedDates=[e],this.rangeDateFrom=e}else this.selectedDates=[e];return this.trigger(l.eventChangeSelectedDate,{action:l.actionSelectDate,silent:t?.silent,date:e,updateTime:r}),this._updateLastSelectedDate(e),m&&!this.timepickerIsActive&&this.visible&&(u||c?c&&C===1&&this.hide():this.hide()),new Promise(k=>{setTimeout(k)})}}unselectDate(e){let i=this.selectedDates,t=this;if((e=M(e))instanceof Date)return i.some((n,a)=>{if(b(n,e))return i.splice(a,1),t.selectedDates.length?(t.rangeDateTo="",t.rangeDateFrom=i[0],t._updateLastSelectedDate(t.selectedDates[t.selectedDates.length-1])):(t.rangeDateFrom="",t.rangeDateTo="",t._updateLastSelectedDate(!1)),this.trigger(l.eventChangeSelectedDate,{action:l.actionUnselectDate,date:e}),!0})}replaceDate(e,i){let t=this.selectedDates.find(a=>b(a,e,this.currentView)),n=this.selectedDates.indexOf(t);n<0||b(this.selectedDates[n],i,this.currentView)||(this.selectedDates[n]=i,this.trigger(l.eventChangeSelectedDate,{action:l.actionSelectDate,date:i,updateTime:!0}),this._updateLastSelectedDate(i))}clear(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(l.eventChangeSelectedDate,{action:l.actionUnselectDate,silent:e.silent}),new Promise(i=>{setTimeout(i)})}show(){let{onShow:e,isMobile:i}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,e&&this._scheduleCallAfterTransition(e),i&&this._showMobileOverlay()}hide(){let{onHide:e,isMobile:i}=this.opts,t=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition(n=>{!this.customHide&&(n&&t||!n&&!t)&&this._finishHide(),e&&e(n)}),i&&x.classList.remove("-active-")}_triggerOnSelect(){let e=[],i=[],{selectedDates:t,locale:n,opts:{onSelect:a,multipleDates:s,range:r}}=this,h=s||r,d=typeof n.dateFormat=="function";t.length&&(e=t.map(Q),i=d?s?n.dateFormat(e):e.map(u=>n.dateFormat(u)):e.map(u=>this.formatDate(u,n.dateFormat))),a({date:h?e:e[0],formattedDate:h?i:i[0],datepicker:this})}_handleAlreadySelectedDates(e,i){let{selectedDates:t,rangeDateFrom:n,rangeDateTo:a}=this,{range:s,toggleSelected:r}=this.opts,h=t.length,d=typeof r=="function"?r({datepicker:this,date:i}):r,u=!!(s&&h===1&&e),c=u?Q(i):i;s&&!d&&(h!==2&&this.selectDate(c),h===2&&b(n,a))||(d?this.unselectDate(c):this._updateLastSelectedDate(u?c:e))}_handleUpDownActions(e,i){if(!((e=M(e||this.focusDate||this.viewDate))instanceof Date))return;let t=i==="up"?this.viewIndex+1:this.viewIndex-1;t>2&&(t=2),t<0&&(t=0),this.setViewDate(new Date(e.getFullYear(),e.getMonth(),1)),this.setCurrentView(this.viewIndexes[t])}getCell(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.day;if(!((e=M(e))instanceof Date))return;let{year:t,month:n,date:a}=y(e),s=`[data-year="${t}"]`,r=`[data-month="${n}"]`,h={[l.day]:`${s}${r}[data-date="${a}"]`,[l.month]:`${s}${r}`,[l.year]:`${s}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(h[i]):void 0}_showMobileOverlay(){x.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((e,i)=>parseFloat(i)+e,0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return y(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return A(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===l.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===l.days}get $container(){return this.$customContainer||W}static replacer(e,i,t){return e.replace(i,function(n,a,s,r){return a+t+r})}}var ye;return g(V,"defaults",v),g(V,"version","3.5.3"),g(V,"defaultGlobalContainerId","air-datepicker-global-container"),ye=V.prototype,Object.assign(ye,Je),F.default}()})});var Pe=we(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.default=void 0;var Qe={days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:mm aa",firstDay:0};oe.default=Qe});var Ne=ke(Le()),Ie=Ne.default;var je=ke(Pe());var Be=(()=>{class w{constructor(l){this.el=l,this.inline=!1,this.range=!1,this.select=new Ce,this.ignoreSelectEvent=!1}ngOnInit(){}ngAfterViewInit(){this.dp=new Ie(this.el.nativeElement,{inline:this.inline,range:this.range,toggleSelected:!1,locale:je.default,onSelect:(l,v,p)=>{this.ignoreSelectEvent||this.select.emit({date:l,formattedDate:v,datepicker:p})}})}setDateRange(l,v){this.ignoreSelectEvent=!0,this.dp.clear(),this.dp.update({range:!!v}),this.dp.selectDate(l,{silent:!0}),v&&this.dp.selectDate(v,{silent:!0}),setTimeout(()=>{this.ignoreSelectEvent=!1})}static{this.\u0275fac=function(v){return new(v||w)(se(_e))}}static{this.\u0275cmp=te({type:w,selectors:[["dsw-date-picker"]],inputs:{inline:"inline",range:"range"},outputs:{select:"select"},standalone:!0,features:[re],decls:0,vars:0,template:function(v,p){},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}"]})}}return w})();var Ze=["datePicker"];function et(w,F){if(w&1){let l=pe();ae(0,"li",3),me("click",function(){let p=ce(l),f=p.$implicit,E=p.$index,R=ge();return ue(R.setFilter(f,E))}),Oe(1),ne()}if(w&2){let l=F.$implicit,v=F.$index,p=ge();$e("selected",p.curFilter===v),ie(),Ae("",l.label," ")}}var ct=(()=>{class w{constructor(l){this.cd=l,this.filters=[{label:"Today",init:function(){let p=new Date;this.dateFrom=p}},{label:"This week",init:function(){let p=new Date,f=p.getDate()-p.getDay()+1,E=f+6;this.dateFrom=new Date(p.setDate(f)),this.dateTo=new Date(p.setDate(E))}},{label:"Last 30 days",init:function(){let p=new Date,f=new Date().setDate(p.getDate()-30);this.dateFrom=new Date(f),this.dateTo=p}},{label:"Last 3 months",init:function(){let p=new Date,f=new Date().setMonth(p.getMonth()-3);this.dateFrom=new Date(f),this.dateTo=p}},{label:"Last 6 months",init:function(){let p=new Date,f=new Date().setMonth(p.getMonth()-6);this.dateFrom=new Date(f),this.dateTo=p}},{label:"Last year",init:function(){let p=new Date(new Date().getFullYear()-1,0,1);this.dateFrom=new Date(p.getFullYear(),0,1),this.dateTo=new Date(p.getFullYear(),11,31)}},{label:"This year (Jan - Today)",init:function(){let p=new Date;this.dateFrom=new Date(p.getFullYear(),0,1),this.dateTo=p}},{label:"Custom",init:function(){this.dateFrom=new Date,this.dateTo=new Date}}],this.curFilter=this.filters.length-1,this.initialize()}initialize(){this.filters.forEach(l=>{l.init&&l.init()})}setFilter(l,v){this.curFilter=v,this.datePicker&&l.dateFrom&&this.datePicker.setDateRange(l.dateFrom,l.dateTo)}onSelect(l){this.curFilter=this.filters.length-1,this.datePicker.dp.update({range:!0})}getValues(){let l=this.datePicker.dp.selectedDates;return l.length>1&&l[0].toDateString()===l[1].toDateString()&&l.pop(),l}setDateRange(l,v){this.datePicker.setDateRange(l,v);let p=this.filters.findIndex(f=>v?f.dateFrom?.toDateString()===l.toDateString()&&f.dateTo?.toDateString()===v.toDateString():f.dateFrom?.toDateString()===l.toDateString());p!==-1&&(this.curFilter=p),this.cd.detectChanges()}static{this.\u0275fac=function(v){return new(v||w)(se(He))}}static{this.\u0275cmp=te({type:w,selectors:[["dsw-date-filter"]],viewQuery:function(v,p){if(v&1&&xe(Ze,5),v&2){let f;Ve(f=Ee())&&(p.datePicker=f.first)}},standalone:!0,features:[re],decls:5,vars:2,consts:[["datePicker",""],[3,"selected"],[3,"select","inline","range"],[3,"click"]],template:function(v,p){if(v&1){let f=pe();ae(0,"ul"),Se(1,et,2,3,"li",1,Fe),ne(),ae(3,"dsw-date-picker",2,0),me("select",function(R){return ce(f),ue(p.onSelect(R))}),ne()}v&2&&(ie(),Te(p.filters),ie(2),Me("inline",!0)("range",!0))},dependencies:[Be],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%]{font-family:Oxygen;font-size:14px;color:var(--cl-widget-filter-txt);display:flex;align-items:flex-start;overflow:auto}[_nghost-%COMP%]::-webkit-scrollbar{width:5px;height:8px;background-color:#eee}[_nghost-%COMP%]::-webkit-scrollbar-thumb{background:#aaa}ul[_ngcontent-%COMP%]{border-right:1px solid var(--cl-input-border);padding:20px;margin:0;list-style-type:none}li[_ngcontent-%COMP%]{white-space:nowrap;cursor:pointer}li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:12px}li.selected[_ngcontent-%COMP%]{position:relative;color:var(--cl-accent)}li.selected[_ngcontent-%COMP%]:before{position:absolute;left:-20px;top:0;height:100%;width:2px;content:"";background-color:var(--cl-accent)}dsw-date-picker[_ngcontent-%COMP%] .air-datepicker{border:none}'],changeDetection:0})}}return w})();export{ct as DateFilterComponent};
diff --git a/dist/chunk-54YLOEMX.js b/dist/chunk-54YLOEMX.js
deleted file mode 100644
index 3c5667c1..00000000
--- a/dist/chunk-54YLOEMX.js
+++ /dev/null
@@ -1,2 +0,0 @@
-import{a as Dt,b as Rt,d as _t}from"./chunk-DEPBX7UX.js";var Jt=_t((Zt,zt)=>{"use strict";(function(Pt,z){typeof zt=="object"&&zt.exports?(z.default=z,zt.exports=Pt&&Pt.document?z(Pt):z):typeof define=="function"&&define.amd?define("highcharts/highstock",function(){return z(Pt)}):(Pt.Highcharts&&Pt.Highcharts.error(16,!0),Pt.Highcharts=z(Pt))})(typeof window<"u"?window:Zt,function(Pt){"use strict";var z={};function gt(V,Q,nt,at){V.hasOwnProperty(Q)||(V[Q]=at.apply(null,nt),typeof CustomEvent=="function"&&Pt.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:Q,module:V[Q]}})))}return gt(z,"Core/Globals.js",[],function(){var V,Q;return(Q=V||(V={})).SVG_NS="http://www.w3.org/2000/svg",Q.product="Highcharts",Q.version="11.4.3",Q.win=Pt!==void 0?Pt:{},Q.doc=Q.win.document,Q.svg=Q.doc&&Q.doc.createElementNS&&!!Q.doc.createElementNS(Q.SVG_NS,"svg").createSVGRect,Q.userAgent=Q.win.navigator&&Q.win.navigator.userAgent||"",Q.isChrome=Q.userAgent.indexOf("Chrome")!==-1,Q.isFirefox=Q.userAgent.indexOf("Firefox")!==-1,Q.isMS=/(edge|msie|trident)/i.test(Q.userAgent)&&!Q.win.opera,Q.isSafari=!Q.isChrome&&Q.userAgent.indexOf("Safari")!==-1,Q.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(Q.userAgent),Q.isWebKit=Q.userAgent.indexOf("AppleWebKit")!==-1,Q.deg2rad=2*Math.PI/360,Q.hasBidiBug=Q.isFirefox&&4>parseInt(Q.userAgent.split("Firefox/")[1],10),Q.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],Q.noop=function(){},Q.supportsPassiveEvents=function(){let nt=!1;if(!Q.isMS){let at=Object.defineProperty({},"passive",{get:function(){nt=!0}});Q.win.addEventListener&&Q.win.removeEventListener&&(Q.win.addEventListener("testPassive",Q.noop,at),Q.win.removeEventListener("testPassive",Q.noop,at))}return nt}(),Q.charts=[],Q.composed=[],Q.dateFormats={},Q.seriesTypes={},Q.symbolSizes={},Q.chartCount=0,V}),gt(z,"Core/Utilities.js",[z["Core/Globals.js"]],function(V){let Q,{charts:nt,doc:at,win:st}=V;function it(s,t,e,i){let o=t?"Highcharts error":"Highcharts warning";s===32&&(s=`${o}: Deprecated member`);let n=E(s),d=n?`${o} #${s}: www.highcharts.com/errors/${s}/`:s.toString();if(i!==void 0){let b="";n&&(d+="?"),g(i,function(R,c){b+=`
- - ${c}: ${R}`,n&&(d+=encodeURI(c)+"="+encodeURI(R))}),d+=b}x(V,"displayError",{chart:e,code:s,message:d,params:i},function(){if(t)throw Error(d);st.console&&it.messages.indexOf(d)===-1&&console.warn(d)}),it.messages.push(d)}function J(s,t){return parseInt(s,t||10)}function Y(s){return typeof s=="string"}function W(s){let t=Object.prototype.toString.call(s);return t==="[object Array]"||t==="[object Array Iterator]"}function U(s,t){return!!s&&typeof s=="object"&&(!t||!W(s))}function S(s){return U(s)&&typeof s.nodeType=="number"}function O(s){let t=s&&s.constructor;return!!(U(s,!0)&&!S(s)&&t&&t.name&&t.name!=="Object")}function E(s){return typeof s=="number"&&!isNaN(s)&&s<1/0&&s>-1/0}function L(s){return s!=null}function p(s,t,e){let i,o=Y(t)&&!L(e),n=(d,b)=>{L(d)?s.setAttribute(b,d):o?(i=s.getAttribute(b))||b!=="class"||(i=s.getAttribute(b+"Name")):s.removeAttribute(b)};return Y(t)?n(e,t):g(t,n),i}function C(s){return W(s)?s:[s]}function w(s,t){let e;for(e in s||(s={}),t)s[e]=t[e];return s}function m(){let s=arguments,t=s.length;for(let e=0;e1e14?s:parseFloat(s.toPrecision(t||14))}(it||(it={})).messages=[],Math.easeInOutSine=function(s){return-.5*(Math.cos(Math.PI*s)-1)};let D=Array.prototype.find?function(s,t){return s.find(t)}:function(s,t){let e,i=s.length;for(e=0;eb.order-R.order),o.forEach(b=>{b.fn.call(s,e)===!1&&e.preventDefault()})}i&&!e.defaultPrevented&&i.call(s,e)}g({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(s,t){V[t]=function(e){return it(32,!1,void 0,{[`Highcharts.${t}`]:`use Array.${s}`}),Array.prototype[s].apply(e,[].slice.call(arguments,1))}});let r=function(){let s=Math.random().toString(36).substring(2,9)+"-",t=0;return function(){return"highcharts-"+(Q?"":s)+t++}}();return st.jQuery&&(st.jQuery.fn.highcharts=function(){let s=[].slice.call(arguments);if(this[0])return s[0]?(new V[Y(s[0])?s.shift():"Chart"](this[0],s[0],s[1]),this):nt[p(this[0],"data-highcharts-chart")]}),{addEvent:function(s,t,e,i={}){let o=typeof s=="function"&&s.prototype||s;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let n=o.hcEvents;V.Point&&s instanceof V.Point&&s.series&&s.series.chart&&(s.series.chart.runTrackerClick=!0);let d=s.addEventListener;d&&d.call(s,t,e,!!V.supportsPassiveEvents&&{passive:i.passive===void 0?t.indexOf("touch")!==-1:i.passive,capture:!1}),n[t]||(n[t]=[]);let b={fn:e,order:typeof i.order=="number"?i.order:1/0};return n[t].push(b),n[t].sort((R,c)=>R.order-c.order),function(){a(s,t,e)}},arrayMax:function(s){let t=s.length,e=s[0];for(;t--;)s[t]>e&&(e=s[t]);return e},arrayMin:function(s){let t=s.length,e=s[0];for(;t--;)s[t]t?s{let i=t%2/2,o=e?-1:1;return(Math.round(s*o-i)+i)*o},css:h,defined:L,destroyObjectProperties:function(s,t,e){g(s,function(i,o){i!==t&&i?.destroy&&i.destroy(),(i?.destroy||!e)&&delete s[o]})},diffObjects:function(s,t,e,i){let o={};return function n(d,b,R,c){let A=e?b:d;g(d,function(T,B){if(!c&&i&&i.indexOf(B)>-1&&b[B]){T=C(T),R[B]=[];for(let H=0;H{if(b.length>1)for(n=i=b.length-1;n>0;n--)(o=b[n]-b[n-1])<0&&!d?(t?.(),t=void 0):o&&(e===void 0||o=d-1&&(d=Math.floor(b)),Math.max(0,d-(s(t,"padding-left",!0)||0)-(s(t,"padding-right",!0)||0))}if(e==="height")return Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(s(t,"padding-top",!0)||0)-(s(t,"padding-bottom",!0)||0));let n=st.getComputedStyle(t,void 0);return n&&(o=n.getPropertyValue(e),m(i,e!=="opacity")&&(o=J(o))),o},inArray:function(s,t,e){return it(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),t.indexOf(s,e)},insertItem:function(s,t){let e,i=s.options.index,o=t.length;for(e=s.options.isInternal?o:0;e=s))&&(o||!(b<=(t[n]+(t[n+1]||t[n]))/2)));n++);return I(d*e,-Math.round(Math.log(.001)/Math.LN10))},objectEach:g,offset:function(s){let t=at.documentElement,e=s.parentElement||s.parentNode?s.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:e.top+(st.pageYOffset||t.scrollTop)-(t.clientTop||0),left:e.left+(st.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:e.width,height:e.height}},pad:function(s,t,e){return Array((t||2)+1-String(s).replace("-","").length).join(e||"0")+s},pick:m,pInt:J,pushUnique:function(s,t){return 0>s.indexOf(t)&&!!s.push(t)},relativeLength:function(s,t,e){return/%$/.test(s)?t*parseFloat(s)/100+(e||0):parseFloat(s)},removeEvent:a,replaceNested:function(s,...t){let e,i;do for(i of(e=s,t))s=s.replace(i[0],i[1]);while(s!==e);return s},splat:C,stableSort:function(s,t){let e,i,o=s.length;for(i=0;i0?setTimeout(s,t,e):(s.call(0,e),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:r,useSerialIds:function(s){return Q=m(s,Q)},wrap:function(s,t,e){let i=s[t];s[t]=function(){let o=arguments,n=this;return e.apply(this,[function(){return i.apply(n,arguments.length?arguments:o)}].concat([].slice.call(arguments)))}}}}),gt(z,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),gt(z,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),gt(z,"Core/Time.js",[z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q){let{win:nt}=V,{defined:at,error:st,extend:it,isNumber:J,isObject:Y,merge:W,objectEach:U,pad:S,pick:O,splat:E,timeUnits:L}=Q,p=V.isSafari&&nt.Intl&&nt.Intl.DateTimeFormat.prototype.formatRange,C=V.isSafari&&nt.Intl&&!nt.Intl.DateTimeFormat.prototype.formatRange;class w{constructor(h){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=nt.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(h)}get(h,f){if(this.variableTimezone||this.timezoneOffset){let I=f.getTime(),D=I-this.getTimezoneOffset(f);f.setTime(D);let g=f["getUTC"+h]();return f.setTime(I),g}return this.useUTC?f["getUTC"+h]():f["get"+h]()}set(h,f,I){if(this.variableTimezone||this.timezoneOffset){if(h==="Milliseconds"||h==="Seconds"||h==="Minutes"&&this.getTimezoneOffset(f)%36e5==0)return f["setUTC"+h](I);let D=this.getTimezoneOffset(f),g=f.getTime()-D;f.setTime(g),f["setUTC"+h](I);let a=this.getTimezoneOffset(f);return g=f.getTime()+a,f.setTime(g)}return this.useUTC||p&&h==="FullYear"?f["setUTC"+h](I):f["set"+h](I)}update(h={}){let f=O(h.useUTC,!0);this.options=h=W(!0,this.options,h),this.Date=h.Date||nt.Date||Date,this.useUTC=f,this.timezoneOffset=f&&h.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=f&&!!(h.getTimezoneOffset||h.timezone)}makeTime(h,f,I,D,g,a){let x,r,s;return this.useUTC?(x=this.Date.UTC.apply(0,arguments),r=this.getTimezoneOffset(x),x+=r,r!==(s=this.getTimezoneOffset(x))?x+=s-r:r-36e5!==this.getTimezoneOffset(x-36e5)||C||(x-=36e5)):x=new this.Date(h,f,O(I,1),O(D,0),O(g,0),O(a,0)).getTime(),x}timezoneOffsetFunction(){let h=this,f=this.options,I=f.getTimezoneOffset;return this.useUTC?f.timezone?D=>{try{let g=`shortOffset,${f.timezone||""}`,[a,x,r,s,t=0]=(w.formatCache[g]=w.formatCache[g]||Intl.DateTimeFormat("en",{timeZone:f.timezone,timeZoneName:"shortOffset"})).format(D).split(/(GMT|:)/).map(Number),e=-(36e5*(r+t/60));if(J(e))return e}catch{st(34)}return 0}:this.useUTC&&I?D=>6e4*I(D.valueOf()):()=>6e4*(h.timezoneOffset||0):D=>6e4*new Date(D.toString()).getTimezoneOffset()}dateFormat(h,f,I){if(!at(f)||isNaN(f))return V.defaultOptions.lang&&V.defaultOptions.lang.invalidDate||"";h=O(h,"%Y-%m-%d %H:%M:%S");let D=this,g=new this.Date(f),a=this.get("Hours",g),x=this.get("Day",g),r=this.get("Date",g),s=this.get("Month",g),t=this.get("FullYear",g),e=V.defaultOptions.lang,i=e&&e.weekdays,o=e&&e.shortWeekdays;return U(it({a:o?o[x]:i[x].substr(0,3),A:i[x],d:S(r),e:S(r,2," "),w:x,b:e.shortMonths[s],B:e.months[s],m:S(s+1),o:s+1,y:t.toString().substr(2,2),Y:t,H:S(a),k:a,I:S(a%12||12),l:a%12||12,M:S(this.get("Minutes",g)),p:a<12?"AM":"PM",P:a<12?"am":"pm",S:S(this.get("Seconds",g)),L:S(Math.floor(f%1e3),3)},V.dateFormats),function(n,d){for(;h.indexOf("%"+d)!==-1;)h=h.replace("%"+d,typeof n=="function"?n.call(D,f):n)}),I?h.substr(0,1).toUpperCase()+h.substr(1):h}resolveDTLFormat(h){return Y(h,!0)?h:{main:(h=E(h))[0],from:h[1],to:h[2]}}getTimeTicks(h,f,I,D){let g,a,x,r,s=this,t=s.Date,e=[],i={},o=new t(f),n=h.unitRange,d=h.count||1;if(D=O(D,1),at(f)){s.set("Milliseconds",o,n>=L.second?0:d*Math.floor(s.get("Milliseconds",o)/d)),n>=L.second&&s.set("Seconds",o,n>=L.minute?0:d*Math.floor(s.get("Seconds",o)/d)),n>=L.minute&&s.set("Minutes",o,n>=L.hour?0:d*Math.floor(s.get("Minutes",o)/d)),n>=L.hour&&s.set("Hours",o,n>=L.day?0:d*Math.floor(s.get("Hours",o)/d)),n>=L.day&&s.set("Date",o,n>=L.month?1:Math.max(1,d*Math.floor(s.get("Date",o)/d))),n>=L.month&&(s.set("Month",o,n>=L.year?0:d*Math.floor(s.get("Month",o)/d)),a=s.get("FullYear",o)),n>=L.year&&(a-=a%d,s.set("FullYear",o,a)),n===L.week&&(r=s.get("Day",o),s.set("Date",o,s.get("Date",o)-r+D+(r4*L.month||s.getTimezoneOffset(f)!==s.getTimezoneOffset(I));let A=o.getTime();for(g=1;A1?A=s.makeTime(a,b,R,c+g*d):A+=n*d,g++;e.push(A),n<=L.hour&&e.length<1e4&&e.forEach(function(T){T%18e5==0&&s.dateFormat("%H%M%S%L",T)==="000000000"&&(i[T]="day")})}return e.info=it(h,{higherRanks:i,totalRange:n*d}),e}getDateFormat(h,f,I,D){let g=this.dateFormat("%m-%d %H:%M:%S.%L",f),a="01-01 00:00:00.000",x={millisecond:15,second:12,minute:9,hour:6,day:3},r="millisecond",s=r;for(r in L){if(h===L.week&&+this.dateFormat("%w",f)===I&&g.substr(6)===a.substr(6)){r="week";break}if(L[r]>h){r=s;break}if(x[r]&&g.substr(x[r])!==a.substr(x[r]))break;r!=="week"&&(s=r)}return this.resolveDTLFormat(D[r]).main}}return w.formatCache={},w}),gt(z,"Core/Defaults.js",[z["Core/Chart/ChartDefaults.js"],z["Core/Globals.js"],z["Core/Color/Palettes.js"],z["Core/Time.js"],z["Core/Utilities.js"]],function(V,Q,nt,at,st){let{isTouchDevice:it}=Q,{fireEvent:J,merge:Y}=st,W={colors:nt.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{buttonTheme:{fill:"#f7f7f7",padding:8,r:2,stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},states:{hover:{fill:"#e6e6e6"},select:{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},disabled:{style:{color:"#cccccc"}}}}},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:V,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:{duration:300,easing:S=>Math.sqrt(1-Math.pow(S-1,2))},borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:it?25:10,headerFormat:'{point.key}
',pointFormat:'\u25CF {series.name}: {point.y}
',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};W.chart.styledMode=!1;let U=new at(W.time);return{defaultOptions:W,defaultTime:U,getOptions:function(){return W},setOptions:function(S){return J(Q,"setOptions",{options:S}),Y(!0,W,S),(S.time||S.global)&&(Q.time?Q.time.update(Y(W.global,W.time,S.global,S.time)):Q.time=U),W}}}),gt(z,"Core/Color/Color.js",[z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q){let{isNumber:nt,merge:at,pInt:st}=Q;class it{static parse(Y){return Y?new it(Y):it.None}constructor(Y){let W,U,S,O;this.rgba=[NaN,NaN,NaN,NaN],this.input=Y;let E=V.Color;if(E&&E!==it)return new E(Y);if(typeof Y=="object"&&Y.stops!==void 0)this.stops=Y.stops.map(L=>new it(L[1]));else if(typeof Y=="string"){if(this.input=Y=it.names[Y.toLowerCase()]||Y,Y.charAt(0)==="#"){let L=Y.length,p=parseInt(Y.substr(1),16);L===7?U=[(16711680&p)>>16,(65280&p)>>8,255&p,1]:L===4&&(U=[(3840&p)>>4|(3840&p)>>8,(240&p)>>4|240&p,(15&p)<<4|15&p,1])}if(!U)for(S=it.parsers.length;S--&&!U;)(W=(O=it.parsers[S]).regex.exec(Y))&&(U=O.parse(W))}U&&(this.rgba=U)}get(Y){let W=this.input,U=this.rgba;if(typeof W=="object"&&this.stops!==void 0){let S=at(W);return S.stops=[].slice.call(S.stops),this.stops.forEach((O,E)=>{S.stops[E]=[S.stops[E][0],O.get(Y)]}),S}return U&&nt(U[0])?Y!=="rgb"&&(Y||U[3]!==1)?Y==="a"?`${U[3]}`:"rgba("+U.join(",")+")":"rgb("+U[0]+","+U[1]+","+U[2]+")":W}brighten(Y){let W=this.rgba;if(this.stops)this.stops.forEach(function(U){U.brighten(Y)});else if(nt(Y)&&Y!==0)for(let U=0;U<3;U++)W[U]+=st(255*Y),W[U]<0&&(W[U]=0),W[U]>255&&(W[U]=255);return this}setOpacity(Y){return this.rgba[3]=Y,this}tweenTo(Y,W){let U=this.rgba,S=Y.rgba;if(!nt(U[0])||!nt(S[0]))return Y.input||"none";let O=S[3]!==1||U[3]!==1;return(O?"rgba(":"rgb(")+Math.round(S[0]+(U[0]-S[0])*(1-W))+","+Math.round(S[1]+(U[1]-S[1])*(1-W))+","+Math.round(S[2]+(U[2]-S[2])*(1-W))+(O?","+(S[3]+(U[3]-S[3])*(1-W)):"")+")"}}return it.names={white:"#ffffff",black:"#000000"},it.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(J){return[st(J[1]),st(J[2]),st(J[3]),parseFloat(J[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(J){return[st(J[1]),st(J[2]),st(J[3]),1]}}],it.None=new it(""),it}),gt(z,"Core/Animation/Fx.js",[z["Core/Color/Color.js"],z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q,nt){let{parse:at}=V,{win:st}=Q,{isNumber:it,objectEach:J}=nt;class Y{constructor(U,S,O){this.pos=NaN,this.options=S,this.elem=U,this.prop=O}dSetter(){let U=this.paths,S=U&&U[0],O=U&&U[1],E=this.now||0,L=[];if(E!==1&&S&&O)if(S.length===O.length&&E<1)for(let p=0;p=w+this.startTime?(this.now=this.end,this.pos=1,this.update(),m[this.prop]=!0,O=!0,J(m,function(h){h!==!0&&(O=!1)}),O&&C&&C.call(p),S=!1):(this.pos=L.easing((E-this.startTime)/w),this.now=this.start+(this.end-this.start)*this.pos,this.update(),S=!0),S}initPath(U,S,O){let E=U.startX,L=U.endX,p=O.slice(),C=U.isArea,w=C?2:1,m,h,f,I,D=S&&S.slice();if(!D)return[p,p];function g(x,r){for(;x.length{let I=S(f.options.animation);m=J(L)&&nt(L.defer)?C.defer:Math.max(m,I.duration+I.defer),h=Math.min(C.duration,I.duration)}),E.renderer.forExport&&(m=0),{defer:Math.max(0,m-h),duration:Math.min(m,h)}},setAnimation:function(E,L){L.renderer.globalAnimation=U(E,L.options.chart.animation,!0)},stop:O}}),gt(z,"Core/Renderer/HTML/AST.js",[z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q){let{SVG_NS:nt,win:at}=V,{attr:st,createElement:it,css:J,error:Y,isFunction:W,isString:U,objectEach:S,splat:O}=Q,{trustedTypes:E}=at,L=E&&W(E.createPolicy)&&E.createPolicy("highcharts",{createHTML:m=>m}),p=L?L.createHTML(""):"",C=function(){try{return!!new DOMParser().parseFromString(p,"text/html")}catch{return!1}}();class w{static filterUserAttributes(h){return S(h,(f,I)=>{let D=!0;w.allowedAttributes.indexOf(I)===-1&&(D=!1),["background","dynsrc","href","lowsrc","src"].indexOf(I)!==-1&&(D=U(f)&&w.allowedReferences.some(g=>f.indexOf(g)===0)),D||(Y(33,!1,void 0,{"Invalid attribute in config":`${I}`}),delete h[I]),U(f)&&h[I]&&(h[I]=f.replace(/{let D=I.split(":").map(a=>a.trim()),g=D.shift();return g&&D.length&&(f[g.replace(/-([a-z])/g,a=>a[1].toUpperCase())]=D.join(":")),f},{})}static setElementHTML(h,f){h.innerHTML=w.emptyHTML,f&&new w(f).addToDOM(h)}constructor(h){this.nodes=typeof h=="string"?this.parseMarkup(h):h}addToDOM(h){return function f(I,D){let g;return O(I).forEach(function(a){let x,r=a.tagName,s=a.textContent?V.doc.createTextNode(a.textContent):void 0,t=w.bypassHTMLFiltering;if(r)if(r==="#text")x=s;else if(w.allowedTags.indexOf(r)!==-1||t){let e=r==="svg"?nt:D.namespaceURI||nt,i=V.doc.createElementNS(e,r),o=a.attributes||{};S(a,function(n,d){d!=="tagName"&&d!=="attributes"&&d!=="children"&&d!=="style"&&d!=="textContent"&&(o[d]=n)}),st(i,t?o:w.filterUserAttributes(o)),a.style&&J(i,a.style),s&&i.appendChild(s),f(a.children||[],i),x=i}else Y(33,!1,void 0,{"Invalid tagName in config":r});x&&D.appendChild(x),g=x}),g}(this.nodes,h)}parseMarkup(h){let f,I=[];if(h=h.trim().replace(/ style=(["'])/g," data-style=$1"),C)f=new DOMParser().parseFromString(L?L.createHTML(h):h,"text/html");else{let g=it("div");g.innerHTML=h,f={body:g}}let D=(g,a)=>{let x=g.nodeName.toLowerCase(),r={tagName:x};x==="#text"&&(r.textContent=g.textContent||"");let s=g.attributes;if(s){let t={};[].forEach.call(s,e=>{e.name==="data-style"?r.style=w.parseStyle(e.value):t[e.name]=e.value}),r.attributes=t}if(g.childNodes.length){let t=[];[].forEach.call(g.childNodes,e=>{D(e,t)}),t.length&&(r.children=t)}a.push(r)};return[].forEach.call(f.body.childNodes,g=>D(g,I)),I}}return w.allowedAttributes=["alt","aria-controls","aria-describedby","aria-expanded","aria-haspopup","aria-hidden","aria-label","aria-labelledby","aria-live","aria-pressed","aria-readonly","aria-roledescription","aria-selected","class","clip-path","color","colspan","cx","cy","d","dx","dy","disabled","fill","filterUnits","flood-color","flood-opacity","height","href","id","in","markerHeight","markerWidth","offset","opacity","orient","padding","paddingLeft","paddingRight","patternUnits","r","refX","refY","role","scope","slope","src","startOffset","stdDeviation","stroke","stroke-linecap","stroke-width","style","tableValues","result","rowspan","summary","target","tabindex","text-align","text-anchor","textAnchor","textLength","title","type","valign","width","x","x1","x2","xlink:href","y","y1","y2","zIndex"],w.allowedReferences=["https://","http://","mailto:","/","../","./","#"],w.allowedTags=["a","abbr","b","br","button","caption","circle","clipPath","code","dd","defs","div","dl","dt","em","feComponentTransfer","feDropShadow","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feOffset","feMerge","feMergeNode","filter","h1","h2","h3","h4","h5","h6","hr","i","img","li","linearGradient","marker","ol","p","path","pattern","pre","rect","small","span","stop","strong","style","sub","sup","svg","table","text","textPath","thead","title","tbody","tspan","td","th","tr","u","ul","#text"],w.emptyHTML=p,w.bypassHTMLFiltering=!1,w}),gt(z,"Core/Templating.js",[z["Core/Defaults.js"],z["Core/Utilities.js"]],function(V,Q){let{defaultOptions:nt,defaultTime:at}=V,{extend:st,getNestedProperty:it,isArray:J,isNumber:Y,isObject:W,pick:U,pInt:S}=Q,O={add:(p,C)=>p+C,divide:(p,C)=>C!==0?p/C:"",eq:(p,C)=>p==C,each:function(p){let C=arguments[arguments.length-1];return!!J(p)&&p.map((w,m)=>E(C.body,st(W(w)?w:{"@this":w},{"@index":m,"@first":m===0,"@last":m===p.length-1}))).join("")},ge:(p,C)=>p>=C,gt:(p,C)=>p>C,if:p=>!!p,le:(p,C)=>p<=C,lt:(p,C)=>pp*C,ne:(p,C)=>p!=C,subtract:(p,C)=>p-C,unless:p=>!p};function E(p="",C,w){let m=/\{([a-zA-Z0-9\:\.\,;\-\/<>%_@"'= #\(\)]+)\}/g,h=/\(([a-zA-Z0-9\:\.\,;\-\/<>%_@"'= ]+)\)/g,f=[],I=/f$/,D=/\.([0-9])/,g=nt.lang,a=w&&w.time||at,x=w&&w.numberFormatter||L,r=(o="")=>{let n;return o==="true"||o!=="false"&&((n=Number(o)).toString()===o?n:it(o,C))},s,t,e=0,i;for(;(s=m.exec(p))!==null;){let o=h.exec(s[1]);o&&(s=o,i=!0),t&&t.isBlock||(t={ctx:C,expression:s[1],find:s[0],isBlock:s[1].charAt(0)==="#",start:s.index,startInner:s.index+s[0].length,length:s[0].length});let n=s[1].split(" ")[0].replace("#","");O[n]&&(t.isBlock&&n===t.fn&&e++,t.fn||(t.fn=n));let d=s[1]==="else";if(t.isBlock&&t.fn&&(s[1]===`/${t.fn}`||d))if(e)!d&&e--;else{let b=t.startInner,R=p.substr(b,s.index-b);t.body===void 0?(t.body=R,t.startInner=s.index+s[0].length):t.elseBody=R,t.find+=R+s[0],d||(f.push(t),t=void 0)}else t.isBlock||f.push(t);if(o&&!t?.isBlock)break}return f.forEach(o=>{let n,d,{body:b,elseBody:R,expression:c,fn:A}=o;if(A){let T=[o],B=c.split(" ");for(d=O[A].length;d--;)T.unshift(r(B[d+1]));n=O[A].apply(C,T),o.isBlock&&typeof n=="boolean"&&(n=E(n?b:R,C,w))}else{let T=c.split(":");if(n=r(T.shift()||""),T.length&&typeof n=="number"){let B=T.join(":");if(I.test(B)){let H=parseInt((B.match(D)||["","-1"])[1],10);n!==null&&(n=x(n,H,g.decimalPoint,B.indexOf(",")>-1?g.thousandsSep:""))}else n=a.dateFormat(B,n)}}p=p.replace(o.find,U(n,""))}),i?E(p,C,w):p}function L(p,C,w,m){let h,f;p=+p||0,C=+C;let I=nt.lang,D=(p.toString().split(".")[1]||"").split("e")[0].length,g=p.toString().split("e"),a=C;C===-1?C=Math.min(D,20):Y(C)?C&&g[1]&&g[1]<0&&((f=C+ +g[1])>=0?(g[0]=(+g[0]).toExponential(f).split("e")[0],C=f):(g[0]=g[0].split(".")[0]||0,p=C<20?(g[0]*Math.pow(10,g[1])).toFixed(C):0,g[1]=0)):C=2;let x=(Math.abs(g[1]?g[0]:p)+Math.pow(10,-Math.max(C,D)-1)).toFixed(C),r=String(S(x)),s=r.length>3?r.length%3:0;return w=U(w,I.decimalPoint),m=U(m,I.thousandsSep),h=(p<0?"-":"")+(s?r.substr(0,s)+m:""),0>+g[1]&&!a?h="0":h+=r.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+m),C?h+=w+x.slice(-C):+h==0&&(h="0"),g[1]&&+h!=0&&(h+="e"+g[1]),h}return{dateFormat:function(p,C,w){return at.dateFormat(p,C,w)},format:E,helpers:O,numberFormat:L}}),gt(z,"Core/Renderer/RendererRegistry.js",[z["Core/Globals.js"]],function(V){var Q,nt;let at;return(nt=Q||(Q={})).rendererTypes={},nt.getRendererType=function(st=at){return nt.rendererTypes[st]||nt.rendererTypes[at]},nt.registerRendererType=function(st,it,J){nt.rendererTypes[st]=it,(!at||J)&&(at=st,V.Renderer=it)},Q}),gt(z,"Core/Renderer/RendererUtilities.js",[z["Core/Utilities.js"]],function(V){var Q;let{clamp:nt,pick:at,pushUnique:st,stableSort:it}=V;return(Q||(Q={})).distribute=function J(Y,W,U){let S=Y,O=S.reducedLen||W,E=(r,s)=>r.target-s.target,L=[],p=Y.length,C=[],w=L.push,m,h,f,I=!0,D,g,a=0,x;for(m=p;m--;)a+=Y[m].size;if(a>O){for(it(Y,(r,s)=>(s.rank||0)-(r.rank||0)),f=(x=Y[0].rank===Y[Y.length-1].rank)?p/2:-1,h=x?f:p-1;f&&a>O;)D=Y[m=Math.floor(h)],st(C,m)&&(a-=D.size),h+=f,x&&h>=Y.length&&(f/=2,h=f);C.sort((r,s)=>s-r).forEach(r=>w.apply(L,Y.splice(r,1)))}for(it(Y,E),Y=Y.map(r=>({size:r.size,targets:[r.target],align:at(r.align,.5)}));I;){for(m=Y.length;m--;)D=Y[m],g=(Math.min.apply(0,D.targets)+Math.max.apply(0,D.targets))/2,D.pos=nt(g-D.size*D.align,0,W-D.size);for(m=Y.length,I=!1;m--;)m>0&&Y[m-1].pos+Y[m-1].size>Y[m].pos&&(Y[m-1].size+=Y[m].size,Y[m-1].targets=Y[m-1].targets.concat(Y[m].targets),Y[m-1].align=.5,Y[m-1].pos+Y[m-1].size>W&&(Y[m-1].pos=W-Y[m-1].size),Y.splice(m,1),I=!0)}return w.apply(S,L),m=0,Y.some(r=>{let s=0;return(r.targets||[]).some(()=>(S[m].pos=r.pos+s,U!==void 0&&Math.abs(S[m].pos-S[m].target)>U?(S.slice(0,m+1).forEach(t=>delete t.pos),S.reducedLen=(S.reducedLen||W)-.1*W,S.reducedLen>.1*W&&J(S,W,U),!0):(s+=S[m].size,m++,!1)))}),it(S,E),S},Q}),gt(z,"Core/Renderer/SVG/SVGElement.js",[z["Core/Animation/AnimationUtilities.js"],z["Core/Color/Color.js"],z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q,nt,at){let{animate:st,animObject:it,stop:J}=V,{deg2rad:Y,doc:W,svg:U,SVG_NS:S,win:O}=nt,{addEvent:E,attr:L,createElement:p,crisp:C,css:w,defined:m,erase:h,extend:f,fireEvent:I,isArray:D,isFunction:g,isObject:a,isString:x,merge:r,objectEach:s,pick:t,pInt:e,pushUnique:i,replaceNested:o,syncTimeout:n,uniqueKey:d}=at;class b{_defaultGetter(c){let A=t(this[c+"Value"],this[c],this.element?this.element.getAttribute(c):null,0);return/^[\-0-9\.]+$/.test(A)&&(A=parseFloat(A)),A}_defaultSetter(c,A,T){T.setAttribute(A,c)}add(c){let A,T=this.renderer,B=this.element;return c&&(this.parentGroup=c),this.textStr!==void 0&&this.element.nodeName==="text"&&T.buildText(this),this.added=!0,(!c||c.handleZ||this.zIndex)&&(A=this.zIndexSetter()),A||(c?c.element:T.box).appendChild(B),this.onAdd&&this.onAdd(),this}addClass(c,A){let T=A?"":this.attr("class")||"";return(c=(c||"").split(/ /g).reduce(function(B,H){return T.indexOf(H)===-1&&B.push(H),B},T?[T]:[]).join(" "))!==T&&this.attr("class",c),this}afterSetters(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)}align(c,A,T,B=!0){let H,u,y,v,G={},l=this.renderer,M=l.alignedObjects,k=!!c;c?(this.alignOptions=c,this.alignByTranslate=A,this.alignTo=T):(c=this.alignOptions||{},A=this.alignByTranslate,T=this.alignTo);let P=!T||x(T)?T||"renderer":void 0;P&&(k&&i(M,this),T=void 0);let j=t(T,l[P],l),N=c.align,$=c.verticalAlign;return H=(j.x||0)+(c.x||0),u=(j.y||0)+(c.y||0),N==="right"?y=1:N==="center"&&(y=2),y&&(H+=((j.width||0)-(c.width||0))/y),G[A?"translateX":"x"]=Math.round(H),$==="bottom"?v=1:$==="middle"&&(v=2),v&&(u+=((j.height||0)-(c.height||0))/v),G[A?"translateY":"y"]=Math.round(u),B&&(this[this.placed?"animate":"attr"](G),this.placed=!0),this.alignAttr=G,this}alignSetter(c){let A={left:"start",center:"middle",right:"end"};A[c]&&(this.alignValue=c,this.element.setAttribute("text-anchor",A[c]))}animate(c,A,T){let B=it(t(A,this.renderer.globalAnimation,!0)),H=B.defer;return W.hidden&&(B.duration=0),B.duration!==0?(T&&(B.complete=T),n(()=>{this.element&&st(this,c,B)},H)):(this.attr(c,void 0,T||B.complete),s(c,function(u,y){B.step&&B.step.call(this,u,{prop:y,pos:1,elem:this})},this)),this}applyTextOutline(c){let A=this.element;c.indexOf("contrast")!==-1&&(c=c.replace(/contrast/g,this.renderer.getContrast(A.style.fill)));let T=c.split(" "),B=T[T.length-1],H=T[0];if(H&&H!=="none"&&nt.svg){this.fakeTS=!0,H=H.replace(/(^[\d\.]+)(.*?)$/g,function(l,M,k){return 2*Number(M)+k}),this.removeTextOutline();let u=W.createElementNS(S,"tspan");L(u,{class:"highcharts-text-outline",fill:B,stroke:B,"stroke-width":H,"stroke-linejoin":"round"});let y=A.querySelector("textPath")||A;[].forEach.call(y.childNodes,l=>{let M=l.cloneNode(!0);M.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(k=>M.removeAttribute(k)),u.appendChild(M)});let v=0;[].forEach.call(y.querySelectorAll("text tspan"),l=>{v+=Number(l.getAttribute("dy"))});let G=W.createElementNS(S,"tspan");G.textContent="\u200B",L(G,{x:Number(A.getAttribute("x")),dy:-v}),u.appendChild(G),y.insertBefore(u,y.firstChild)}}attr(c,A,T,B){let{element:H}=this,u=b.symbolCustomAttribs,y,v,G=this,l;return typeof c=="string"&&A!==void 0&&(y=c,(c={})[y]=A),typeof c=="string"?G=(this[c+"Getter"]||this._defaultGetter).call(this,c,H):(s(c,function(M,k){l=!1,B||J(this,k),this.symbolName&&u.indexOf(k)!==-1&&(v||(this.symbolAttr(c),v=!0),l=!0),this.rotation&&(k==="x"||k==="y")&&(this.doTransform=!0),l||(this[k+"Setter"]||this._defaultSetter).call(this,M,k,H)},this),this.afterSetters()),T&&T.call(this),G}clip(c){if(c&&!c.clipPath){let A=d()+"-",T=this.renderer.createElement("clipPath").attr({id:A}).add(this.renderer.defs);f(c,{clipPath:T,id:A,count:0}),c.add(T)}return this.attr("clip-path",c?`url(${this.renderer.url}#${c.id})`:"none")}crisp(c,A){A=Math.round(A||c.strokeWidth||0);let T=c.x||this.x||0,B=c.y||this.y||0,H=(c.width||this.width||0)+T,u=(c.height||this.height||0)+B,y=C(T,A),v=C(B,A);return f(c,{x:y,y:v,width:C(H,A)-y,height:C(u,A)-v}),m(c.strokeWidth)&&(c.strokeWidth=A),c}complexColor(c,A,T){let B=this.renderer,H,u,y,v,G,l,M,k,P,j,N=[],$;I(this.renderer,"complexColor",{args:arguments},function(){if(c.radialGradient?u="radialGradient":c.linearGradient&&(u="linearGradient"),u){if(y=c[u],G=B.gradients,l=c.stops,P=T.radialReference,D(y)&&(c[u]=y={x1:y[0],y1:y[1],x2:y[2],y2:y[3],gradientUnits:"userSpaceOnUse"}),u==="radialGradient"&&P&&!m(y.gradientUnits)&&(v=y,y=r(y,B.getRadialAttr(P,v),{gradientUnits:"userSpaceOnUse"})),s(y,function(Z,_){_!=="id"&&N.push(_,Z)}),s(l,function(Z){N.push(Z)}),G[N=N.join(",")])j=G[N].attr("id");else{y.id=j=d();let Z=G[N]=B.createElement(u).attr(y).add(B.defs);Z.radAttr=v,Z.stops=[],l.forEach(function(_){_[1].indexOf("rgba")===0?(M=(H=Q.parse(_[1])).get("rgb"),k=H.get("a")):(M=_[1],k=1);let ot=B.createElement("stop").attr({offset:_[0],"stop-color":M,"stop-opacity":k}).add(Z);Z.stops.push(ot)})}$="url("+B.url+"#"+j+")",T.setAttribute(A,$),T.gradient=N,c.toString=function(){return $}}})}css(c){let A=this.styles,T={},B=this.element,H,u=!A;if(A&&s(c,function(y,v){A&&A[v]!==y&&(T[v]=y,u=!0)}),u){A&&(c=f(A,T)),c.width===null||c.width==="auto"?delete this.textWidth:B.nodeName.toLowerCase()==="text"&&c.width&&(H=this.textWidth=e(c.width)),f(this.styles,c),H&&!U&&this.renderer.forExport&&delete c.width;let y=r(c);B.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(v=>y&&delete y[v]),y.color&&(y.fill=y.color)),w(B,y)}return this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),c.textOutline&&this.applyTextOutline(c.textOutline)),this}dashstyleSetter(c){let A,T=this["stroke-width"];if(T==="inherit"&&(T=1),c=c&&c.toLowerCase()){let B=c.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(A=B.length;A--;)B[A]=""+e(B[A])*t(T,NaN);c=B.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",c)}}destroy(){let c=this,A=c.element||{},T=c.renderer,B=A.ownerSVGElement,H=A.nodeName==="SPAN"&&c.parentGroup||void 0,u,y;if(A.onclick=A.onmouseout=A.onmouseover=A.onmousemove=A.point=null,J(c),c.clipPath&&B){let v=c.clipPath;[].forEach.call(B.querySelectorAll("[clip-path],[CLIP-PATH]"),function(G){G.getAttribute("clip-path").indexOf(v.element.id)>-1&&G.removeAttribute("clip-path")}),c.clipPath=v.destroy()}if(c.connector=c.connector?.destroy(),c.stops){for(y=0;yH&&H.join?(u?B+" ":"")+H.join(" "):(H||"").toString(),"")),/(NaN| {2}|^$)/.test(c)&&(c="M 0 0"),this[A]!==c&&(T.setAttribute(A,c),this[A]=c)}fillSetter(c,A,T){typeof c=="string"?T.setAttribute(A,c):c&&this.complexColor(c,A,T)}hrefSetter(c,A,T){T.setAttributeNS("http://www.w3.org/1999/xlink",A,c)}getBBox(c,A){let T,B,H,u,{alignValue:y,element:v,renderer:G,styles:l,textStr:M}=this,{cache:k,cacheKeys:P}=G,j=v.namespaceURI===this.SVG_NS,N=t(A,this.rotation,0),$=G.styledMode?v&&b.prototype.getStyle.call(v,"font-size"):l.fontSize;if(m(M)&&((u=M.toString()).indexOf("<")===-1&&(u=u.replace(/[0-9]/g,"0")),u+=["",G.rootFontSize,$,N,this.textWidth,y,l.textOverflow,l.fontWeight].join(",")),u&&!c&&(T=k[u]),!T){if(j||G.forExport){try{H=this.fakeTS&&function(Z){let _=v.querySelector(".highcharts-text-outline");_&&w(_,{display:Z})},g(H)&&H("none"),T=v.getBBox?f({},v.getBBox()):{width:v.offsetWidth,height:v.offsetHeight,x:0,y:0},g(H)&&H("")}catch{}(!T||T.width<0)&&(T={x:0,y:0,width:0,height:0})}else T=this.htmlGetBBox();B=T.height,j&&(T.height=B={"11px,17":14,"13px,20":16}[`${$||""},${Math.round(B)}`]||B),N&&(T=this.getRotatedBox(T,N))}if(u&&(M===""||T.height>0)){for(;P.length>250;)delete k[P.shift()];k[u]||P.push(u),k[u]=T}return T}getRotatedBox(c,A){let{x:T,y:B,width:H,height:u}=c,{alignValue:y,translateY:v,rotationOriginX:G=0,rotationOriginY:l=0}=this,M={right:1,center:.5}[y||0]||0,k=Number(this.element.getAttribute("y")||0)-(v?0:B),P=A*Y,j=(A-90)*Y,N=Math.cos(P),$=Math.sin(P),Z=H*N,_=H*$,ot=Math.cos(j),ht=Math.sin(j),[[X,F],[q,K]]=[G,l].map(bt=>[bt-bt*N,bt*$]),et=T+M*(H-Z)+X+K+k*ot,tt=et+Z,rt=tt-u*ot,lt=rt-Z,dt=B+k-M*_-F+q+k*ht,pt=dt+_,ut=pt-u*ht,ct=ut-_,mt=Math.min(et,tt,rt,lt),yt=Math.min(dt,pt,ut,ct),xt=Math.max(et,tt,rt,lt)-mt,ft=Math.max(dt,pt,ut,ct)-yt;return{x:mt,y:yt,width:xt,height:ft}}getStyle(c){return O.getComputedStyle(this.element||this,"").getPropertyValue(c)}hasClass(c){return(""+this.attr("class")).split(" ").indexOf(c)!==-1}hide(){return this.attr({visibility:"hidden"})}htmlGetBBox(){return{height:0,width:0,x:0,y:0}}constructor(c,A){this.onEvents={},this.opacity=1,this.SVG_NS=S,this.element=A==="span"||A==="body"?p(A):W.createElementNS(this.SVG_NS,A),this.renderer=c,this.styles={},I(this,"afterInit")}on(c,A){let{onEvents:T}=this;return T[c]&&T[c](),T[c]=E(this.element,c,A),this}opacitySetter(c,A,T){let B=Number(Number(c).toFixed(3));this.opacity=B,T.setAttribute(A,B)}reAlign(){this.alignOptions?.width&&this.alignOptions.align!=="left"&&(this.alignOptions.width=this.getBBox().width,this.placed=!1,this.align())}removeClass(c){return this.attr("class",(""+this.attr("class")).replace(x(c)?RegExp(`(^| )${c}( |$)`):c," ").replace(/ +/g," ").trim())}removeTextOutline(){let c=this.element.querySelector("tspan.highcharts-text-outline");c&&this.safeRemoveChild(c)}safeRemoveChild(c){let A=c.parentNode;A&&A.removeChild(c)}setRadialReference(c){let A=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=c,A&&A.radAttr&&A.animate(this.renderer.getRadialAttr(c,A.radAttr)),this}setTextPath(c,A){A=r(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},A);let T=this.renderer.url,B=this.text||this,H=B.textPath,{attributes:u,enabled:y}=A;if(c=c||H&&H.path,H&&H.undo(),c&&y){let v=E(B,"afterModifyTree",G=>{if(c&&y){let l=c.attr("id");l||c.attr("id",l=d());let M={x:0,y:0};m(u.dx)&&(M.dx=u.dx,delete u.dx),m(u.dy)&&(M.dy=u.dy,delete u.dy),B.attr(M),this.attr({transform:""}),this.box&&(this.box=this.box.destroy());let k=G.nodes.slice(0);G.nodes.length=0,G.nodes[0]={tagName:"textPath",attributes:f(u,{"text-anchor":u.textAnchor,href:`${T}#${l}`}),children:k}}});B.textPath={path:c,undo:v}}else B.attr({dx:0,dy:0}),delete B.textPath;return this.added&&(B.textCache="",this.renderer.buildText(B)),this}shadow(c){let{renderer:A}=this,T=r(this.parentGroup?.rotation===90?{offsetX:-1,offsetY:-1}:{},a(c)?c:{}),B=A.shadowDefinition(T);return this.attr({filter:c?`url(${A.url}#${B})`:"none"})}show(c=!0){return this.attr({visibility:c?"inherit":"visible"})}"stroke-widthSetter"(c,A,T){this[A]=c,T.setAttribute(A,c)}strokeWidth(){if(!this.renderer.styledMode)return this["stroke-width"]||0;let c=this.getStyle("stroke-width"),A=0,T;return/px$/.test(c)?A=e(c):c!==""&&(L(T=W.createElementNS(S,"rect"),{width:c,"stroke-width":0}),this.element.parentNode.appendChild(T),A=T.getBBox().width,T.parentNode.removeChild(T)),A}symbolAttr(c){let A=this;b.symbolCustomAttribs.forEach(function(T){A[T]=t(c[T],A[T])}),A.attr({d:A.renderer.symbols[A.symbolName](A.x,A.y,A.width,A.height,A)})}textSetter(c){c!==this.textStr&&(delete this.textPxLength,this.textStr=c,this.added&&this.renderer.buildText(this),this.reAlign())}titleSetter(c){let A=this.element,T=A.getElementsByTagName("title")[0]||W.createElementNS(this.SVG_NS,"title");A.insertBefore?A.insertBefore(T,A.firstChild):A.appendChild(T),T.textContent=o(t(c,""),[/<[^>]*>/g,""]).replace(/</g,"<").replace(/>/g,">")}toFront(){let c=this.element;return c.parentNode.appendChild(c),this}translate(c,A){return this.attr({translateX:c,translateY:A})}updateTransform(c="transform"){let{element:A,matrix:T,rotation:B=0,rotationOriginX:H,rotationOriginY:u,scaleX:y,scaleY:v,translateX:G=0,translateY:l=0}=this,M=["translate("+G+","+l+")"];m(T)&&M.push("matrix("+T.join(",")+")"),B&&(M.push("rotate("+B+" "+t(H,A.getAttribute("x"),0)+" "+t(u,A.getAttribute("y")||0)+")"),this.text?.element.tagName==="SPAN"&&this.text.attr({rotation:B,rotationOriginX:(H||0)-this.padding,rotationOriginY:(u||0)-this.padding})),(m(y)||m(v))&&M.push("scale("+t(y,1)+" "+t(v,1)+")"),M.length&&!(this.text||this).textPath&&A.setAttribute(c,M.join(" "))}visibilitySetter(c,A,T){c==="inherit"?T.removeAttribute(A):this[A]!==c&&T.setAttribute(A,c),this[A]=c}xGetter(c){return this.element.nodeName==="circle"&&(c==="x"?c="cx":c==="y"&&(c="cy")),this._defaultGetter(c)}zIndexSetter(c,A){let T=this.renderer,B=this.parentGroup,H=(B||T).element||T.box,u=this.element,y=H===T.box,v,G,l,M=!1,k,P=this.added,j;if(m(c)?(u.setAttribute("data-z-index",c),c=+c,this[A]===c&&(P=!1)):m(this[A])&&u.removeAttribute("data-z-index"),this[A]=c,P){for((c=this.zIndex)&&B&&(B.handleZ=!0),j=(v=H.childNodes).length-1;j>=0&&!M;j--)k=!m(l=(G=v[j]).getAttribute("data-z-index")),G!==u&&(c<0&&k&&!y&&!j?(H.insertBefore(u,v[j]),M=!0):(e(l)<=c||k&&(!m(c)||c>=0))&&(H.insertBefore(u,v[j+1]),M=!0));M||(H.insertBefore(u,v[y?3:0]),M=!0)}return M}}return b.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],b.prototype.strokeSetter=b.prototype.fillSetter,b.prototype.yGetter=b.prototype.xGetter,b.prototype.matrixSetter=b.prototype.rotationOriginXSetter=b.prototype.rotationOriginYSetter=b.prototype.rotationSetter=b.prototype.scaleXSetter=b.prototype.scaleYSetter=b.prototype.translateXSetter=b.prototype.translateYSetter=b.prototype.verticalAlignSetter=function(R,c){this[c]=R,this.doTransform=!0},b}),gt(z,"Core/Renderer/SVG/SVGLabel.js",[z["Core/Renderer/SVG/SVGElement.js"],z["Core/Utilities.js"]],function(V,Q){let{defined:nt,extend:at,isNumber:st,merge:it,pick:J,removeEvent:Y}=Q;class W extends V{constructor(S,O,E,L,p,C,w,m,h,f){let I;super(S,"g"),this.paddingLeftSetter=this.paddingSetter,this.paddingRightSetter=this.paddingSetter,this.textStr=O,this.x=E,this.y=L,this.anchorX=C,this.anchorY=w,this.baseline=h,this.className=f,this.addClass(f==="button"?"highcharts-no-tooltip":"highcharts-label"),f&&this.addClass("highcharts-"+f),this.text=S.text(void 0,0,0,m).attr({zIndex:1}),typeof p=="string"&&((I=/^url\((.*?)\)$/.test(p))||this.renderer.symbols[p])&&(this.symbolKey=p),this.bBox=W.emptyBBox,this.padding=3,this.baselineOffset=0,this.needsBox=S.styledMode||I,this.deferredAttr={},this.alignFactor=0}alignSetter(S){let O={left:0,center:.5,right:1}[S];O!==this.alignFactor&&(this.alignFactor=O,this.bBox&&st(this.xSetting)&&this.attr({x:this.xSetting}))}anchorXSetter(S,O){this.anchorX=S,this.boxAttr(O,Math.round(S)-this.getCrispAdjust()-this.xSetting)}anchorYSetter(S,O){this.anchorY=S,this.boxAttr(O,S-this.ySetting)}boxAttr(S,O){this.box?this.box.attr(S,O):this.deferredAttr[S]=O}css(S){if(S){let O={};S=it(S),W.textProps.forEach(E=>{S[E]!==void 0&&(O[E]=S[E],delete S[E])}),this.text.css(O),"fontSize"in O||"fontWeight"in O?this.updateTextPadding():("width"in O||"textOverflow"in O)&&this.updateBoxSize()}return V.prototype.css.call(this,S)}destroy(){Y(this.element,"mouseenter"),Y(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),V.prototype.destroy.call(this)}fillSetter(S,O){S&&(this.needsBox=!0),this.fill=S,this.boxAttr(O,S)}getBBox(S,O){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();let{padding:E,height:L=0,translateX:p=0,translateY:C=0,width:w=0}=this,m=J(this.paddingLeft,E),h=O??(this.rotation||0),f={width:w,height:L,x:p+this.bBox.x-m,y:C+this.bBox.y-E+this.baselineOffset};return h&&(f=this.getRotatedBox(f,h)),f}getCrispAdjust(){return(this.renderer.styledMode&&this.box?this.box.strokeWidth():this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2}heightSetter(S){this.heightSetting=S}onAdd(){this.text.add(this),this.attr({text:J(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&nt(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})}paddingSetter(S,O){st(S)?S!==this[O]&&(this[O]=S,this.updateTextPadding()):this[O]=void 0}rSetter(S,O){this.boxAttr(O,S)}strokeSetter(S,O){this.stroke=S,this.boxAttr(O,S)}"stroke-widthSetter"(S,O){S&&(this.needsBox=!0),this["stroke-width"]=S,this.boxAttr(O,S)}"text-alignSetter"(S){this.textAlign=S}textSetter(S){S!==void 0&&this.text.attr({text:S}),this.updateTextPadding(),this.reAlign()}updateBoxSize(){let S,O=this.text,E={},L=this.padding,p=this.bBox=(!st(this.widthSetting)||!st(this.heightSetting)||this.textAlign)&&nt(O.textStr)?O.getBBox(void 0,0):W.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||p.height||0)+2*L;let C=this.renderer.fontMetrics(O);if(this.baselineOffset=L+Math.min((this.text.firstLineMetrics||C).b,p.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-C.h)/2),this.needsBox&&!O.textPath){if(!this.box){let w=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect();w.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),w.add(this)}S=this.getCrispAdjust(),E.x=S,E.y=(this.baseline?-this.baselineOffset:0)+S,E.width=Math.round(this.width),E.height=Math.round(this.height),this.box.attr(at(E,this.deferredAttr)),this.deferredAttr={}}}updateTextPadding(){let S=this.text;if(!S.textPath){this.updateBoxSize();let O=this.baseline?0:this.baselineOffset,E=J(this.paddingLeft,this.padding);nt(this.widthSetting)&&this.bBox&&(this.textAlign==="center"||this.textAlign==="right")&&(E+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(E!==S.x||O!==S.y)&&(S.attr("x",E),S.hasBoxWidthChanged&&(this.bBox=S.getBBox(!0)),O!==void 0&&S.attr("y",O)),S.x=E,S.y=O}}widthSetter(S){this.widthSetting=st(S)?S:void 0}getPaddedWidth(){let S=this.padding,O=J(this.paddingLeft,S),E=J(this.paddingRight,S);return(this.widthSetting||this.bBox.width||0)+O+E}xSetter(S){this.x=S,this.alignFactor&&(S-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(S),this.attr("translateX",this.xSetting)}ySetter(S){this.ySetting=this.y=Math.round(S),this.attr("translateY",this.ySetting)}}return W.emptyBBox={width:0,height:0,x:0,y:0},W.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],W}),gt(z,"Core/Renderer/SVG/Symbols.js",[z["Core/Utilities.js"]],function(V){let{defined:Q,isNumber:nt,pick:at}=V;function st(Y,W,U,S,O){let E=[];if(O){let L=O.start||0,p=at(O.r,U),C=at(O.r,S||U),w=2e-4/Math.max(p,1),m=Math.abs((O.end||0)-L-2*Math.PI)0&&C0)return w;if(Y+p>U-L)if(C>W+L&&CW+L&&C0){let m=CS&&pL&&w.splice(1,1,["L",p-6,W],["L",p,W-6],["L",p+6,W],["L",U-E,W]);return w},circle:function(Y,W,U,S){return st(Y+U/2,W+S/2,U/2,S/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(Y,W,U,S){return[["M",Y+U/2,W],["L",Y+U,W+S/2],["L",Y+U/2,W+S],["L",Y,W+S/2],["Z"]]},rect:it,roundedRect:J,square:it,triangle:function(Y,W,U,S){return[["M",Y+U/2,W],["L",Y+U,W+S],["L",Y,W+S],["Z"]]},"triangle-down":function(Y,W,U,S){return[["M",Y,W],["L",Y+U,W],["L",Y+U/2,W+S],["Z"]]}}}),gt(z,"Core/Renderer/SVG/TextBuilder.js",[z["Core/Renderer/HTML/AST.js"],z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q,nt){let{doc:at,SVG_NS:st,win:it}=Q,{attr:J,extend:Y,fireEvent:W,isString:U,objectEach:S,pick:O}=nt;return class{constructor(E){let L=E.styles;this.renderer=E.renderer,this.svgElement=E,this.width=E.textWidth,this.textLineHeight=L&&L.lineHeight,this.textOutline=L&&L.textOutline,this.ellipsis=!!(L&&L.textOverflow==="ellipsis"),this.noWrap=!!(L&&L.whiteSpace==="nowrap")}buildSVG(){let E=this.svgElement,L=E.element,p=E.renderer,C=O(E.textStr,"").toString(),w=C.indexOf("<")!==-1,m=L.childNodes,h=!E.added&&p.box,f=[C,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,E.getStyle("font-size"),this.width].join(",");if(f!==E.textCache){E.textCache=f,delete E.actualWidth;for(let I=m.length;I--;)L.removeChild(m[I]);if(w||this.ellipsis||this.width||E.textPath||C.indexOf(" ")!==-1&&(!this.noWrap||//g.test(C))){if(C!==""){h&&h.appendChild(L);let I=new V(C);this.modifyTree(I.nodes),I.addToDOM(L),this.modifyDOM(),this.ellipsis&&(L.textContent||"").indexOf("\u2026")!==-1&&E.attr("title",this.unescapeEntities(E.textStr||"",["<",">"])),h&&h.removeChild(L)}}else L.appendChild(at.createTextNode(this.unescapeEntities(C)));U(this.textOutline)&&E.applyTextOutline&&E.applyTextOutline(this.textOutline)}}modifyDOM(){let E,L=this.svgElement,p=J(L.element,"x");for(L.firstLineMetrics=void 0;(E=L.element.firstChild)&&/^[\s\u200B]*$/.test(E.textContent||" ");)L.element.removeChild(E);[].forEach.call(L.element.querySelectorAll("tspan.highcharts-br"),(h,f)=>{h.nextSibling&&h.previousSibling&&(f===0&&h.previousSibling.nodeType===1&&(L.firstLineMetrics=L.renderer.fontMetrics(h.previousSibling)),J(h,{dy:this.getLineHeight(h.nextSibling),x:p}))});let C=this.width||0;if(!C)return;let w=(h,f)=>{let I=h.textContent||"",D=I.replace(/([^\^])-/g,"$1- ").split(" "),g=!this.noWrap&&(D.length>1||L.element.childNodes.length>1),a=this.getLineHeight(f),x=0,r=L.actualWidth;if(this.ellipsis)I&&this.truncate(h,I,void 0,0,Math.max(0,C-.8*a),(s,t)=>s.substring(0,t)+"\u2026");else if(g){let s=[],t=[];for(;f.firstChild&&f.firstChild!==h;)t.push(f.firstChild),f.removeChild(f.firstChild);for(;D.length;)D.length&&!this.noWrap&&x>0&&(s.push(h.textContent||""),h.textContent=D.join(" ").replace(/- /g,"-")),this.truncate(h,void 0,D,x===0&&r||0,C,(e,i)=>D.slice(0,i).join(" ").replace(/- /g,"-")),r=L.actualWidth,x++;t.forEach(e=>{f.insertBefore(e,h)}),s.forEach(e=>{f.insertBefore(at.createTextNode(e),h);let i=at.createElementNS(st,"tspan");i.textContent="\u200B",J(i,{dy:a,x:p}),f.insertBefore(i,h)})}},m=h=>{[].slice.call(h.childNodes).forEach(f=>{f.nodeType===it.Node.TEXT_NODE?w(f,h):(f.className.baseVal.indexOf("highcharts-br")!==-1&&(L.actualWidth=0),m(f))})};m(L.element)}getLineHeight(E){let L=E.nodeType===it.Node.TEXT_NODE?E.parentElement:E;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(L||this.svgElement.element).h}modifyTree(E){let L=(p,C)=>{let{attributes:w={},children:m,style:h={},tagName:f}=p,I=this.renderer.styledMode;if(f==="b"||f==="strong"?I?w.class="highcharts-strong":h.fontWeight="bold":(f==="i"||f==="em")&&(I?w.class="highcharts-emphasized":h.fontStyle="italic"),h&&h.color&&(h.fill=h.color),f==="br"){w.class="highcharts-br",p.textContent="\u200B";let D=E[C+1];D&&D.textContent&&(D.textContent=D.textContent.replace(/^ +/gm,""))}else f==="a"&&m&&m.some(D=>D.tagName==="#text")&&(p.children=[{children:m,tagName:"tspan"}]);f!=="#text"&&f!=="a"&&(p.tagName="tspan"),Y(p,{attributes:w,style:h}),m&&m.filter(D=>D.tagName!=="#text").forEach(L)};E.forEach(L),W(this.svgElement,"afterModifyTree",{nodes:E})}truncate(E,L,p,C,w,m){let h,f,I=this.svgElement,{rotation:D}=I,g=[],a=p?1:0,x=(L||p||"").length,r=x,s=function(t,e){let i=e||t,o=E.parentNode;if(o&&g[i]===void 0&&o.getSubStringLength)try{g[i]=C+o.getSubStringLength(0,p?i+1:i)}catch{}return g[i]};if(I.rotation=0,C+(f=s(E.textContent.length))>w){for(;a<=x;)r=Math.ceil((a+x)/2),p&&(h=m(p,r)),f=s(r,h&&h.length-1),a===x?a=x+1:f>w?x=r-1:a=r;x===0?E.textContent="":L&&x===L.length-1||(E.textContent=h||m(L||p,r))}p&&p.splice(0,r),I.actualWidth=f,I.rotation=D}unescapeEntities(E,L){return S(this.renderer.escapes,function(p,C){L&&L.indexOf(p)!==-1||(E=E.toString().replace(RegExp(p,"g"),C))}),E}}}),gt(z,"Core/Renderer/SVG/SVGRenderer.js",[z["Core/Renderer/HTML/AST.js"],z["Core/Defaults.js"],z["Core/Color/Color.js"],z["Core/Globals.js"],z["Core/Renderer/RendererRegistry.js"],z["Core/Renderer/SVG/SVGElement.js"],z["Core/Renderer/SVG/SVGLabel.js"],z["Core/Renderer/SVG/Symbols.js"],z["Core/Renderer/SVG/TextBuilder.js"],z["Core/Utilities.js"]],function(V,Q,nt,at,st,it,J,Y,W,U){let S,{defaultOptions:O}=Q,{charts:E,deg2rad:L,doc:p,isFirefox:C,isMS:w,isWebKit:m,noop:h,SVG_NS:f,symbolSizes:I,win:D}=at,{addEvent:g,attr:a,createElement:x,crisp:r,css:s,defined:t,destroyObjectProperties:e,extend:i,isArray:o,isNumber:n,isObject:d,isString:b,merge:R,pick:c,pInt:A,replaceNested:T,uniqueKey:B}=U;class H{constructor(y,v,G,l,M,k,P){let j,N,$=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),Z=$.element;P||$.css(this.getStyle(l||{})),y.appendChild(Z),a(y,"dir","ltr"),y.innerHTML.indexOf("xmlns")===-1&&a(Z,"xmlns",this.SVG_NS),this.box=Z,this.boxWrapper=$,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(p.createTextNode("Created with Highcharts 11.4.3")),this.defs=this.createElement("defs").add(),this.allowHTML=k,this.forExport=M,this.styledMode=P,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.rootFontSize=$.getStyle("font-size"),this.setSize(v,G,!1),C&&y.getBoundingClientRect&&((j=function(){s(y,{left:0,top:0}),N=y.getBoundingClientRect(),s(y,{left:Math.ceil(N.left)-N.left+"px",top:Math.ceil(N.top)-N.top+"px"})})(),this.unSubPixelFix=g(D,"resize",j))}definition(y){return new V([y]).addToDOM(this.defs.element)}getReferenceURL(){if((C||m)&&p.getElementsByTagName("base").length){if(!t(S)){let y=B(),v=new V([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:y},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":`url(#${y})`,fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(p.body);s(v,{position:"fixed",top:0,left:0,zIndex:9e5});let G=p.elementFromPoint(6,6);S=(G&&G.id)==="hitme",p.body.removeChild(v)}if(S)return T(D.location.href.split("#")[0],[/<[^>]*>/g,""],[/([\('\)])/g,"\\$1"],[/ /g,"%20"])}return""}getStyle(y){return this.style=i({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},y),this.style}setStyle(y){this.boxWrapper.css(this.getStyle(y))}isHidden(){return!this.boxWrapper.getBBox().width}destroy(){let y=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),e(this.gradients||{}),this.gradients=null,this.defs=y.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null}createElement(y){return new this.Element(this,y)}getRadialAttr(y,v){return{cx:y[0]-y[2]/2+(v.cx||0)*y[2],cy:y[1]-y[2]/2+(v.cy||0)*y[2],r:(v.r||0)*y[2]}}shadowDefinition(y){let v=[`highcharts-drop-shadow-${this.chartIndex}`,...Object.keys(y).map(l=>`${l}-${y[l]}`)].join("-").toLowerCase().replace(/[^a-z0-9\-]/g,""),G=R({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},y);return this.defs.element.querySelector(`#${v}`)||this.definition({tagName:"filter",attributes:{id:v,filterUnits:G.filterUnits},children:[{tagName:"feDropShadow",attributes:{dx:G.offsetX,dy:G.offsetY,"flood-color":G.color,"flood-opacity":Math.min(5*G.opacity,1),stdDeviation:G.width/2}}]}),v}buildText(y){new W(y).buildSVG()}getContrast(y){let v=nt.parse(y).rgba.map(l=>{let M=l/255;return M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4)}),G=.2126*v[0]+.7152*v[1]+.0722*v[2];return 1.05/(G+.05)>(G+.05)/.05?"#FFFFFF":"#000000"}button(y,v,G,l,M={},k,P,j,N,$){let Z=this.label(y,v,G,N,void 0,void 0,$,void 0,"button"),_=this.styledMode,ot=arguments,ht=0;M=R(O.global.buttonTheme,M),_&&(delete M.fill,delete M.stroke,delete M["stroke-width"]);let X=M.states||{},F=M.style||{};delete M.states,delete M.style;let q=[V.filterUserAttributes(M)],K=[F];return _||["hover","select","disabled"].forEach((et,tt)=>{q.push(R(q[0],V.filterUserAttributes(ot[tt+5]||X[et]||{}))),K.push(q[tt+1].style),delete q[tt+1].style}),g(Z.element,w?"mouseover":"mouseenter",function(){ht!==3&&Z.setState(1)}),g(Z.element,w?"mouseout":"mouseleave",function(){ht!==3&&Z.setState(ht)}),Z.setState=(et=0)=>{if(et!==1&&(Z.state=ht=et),Z.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][et]),!_){Z.attr(q[et]);let tt=K[et];d(tt)&&Z.css(tt)}},Z.attr(q[0]),!_&&(Z.css(i({cursor:"default"},F)),$&&Z.text.css({pointerEvents:"none"})),Z.on("touchstart",et=>et.stopPropagation()).on("click",function(et){ht!==3&&l.call(Z,et)})}crispLine(y,v){let[G,l]=y;return t(G[1])&&G[1]===l[1]&&(G[1]=l[1]=r(G[1],v)),t(G[2])&&G[2]===l[2]&&(G[2]=l[2]=r(G[2],v)),y}path(y){let v=this.styledMode?{}:{fill:"none"};return o(y)?v.d=y:d(y)&&i(v,y),this.createElement("path").attr(v)}circle(y,v,G){let l=d(y)?y:y===void 0?{}:{x:y,y:v,r:G},M=this.createElement("circle");return M.xSetter=M.ySetter=function(k,P,j){j.setAttribute("c"+P,k)},M.attr(l)}arc(y,v,G,l,M,k){let P;d(y)?(v=(P=y).y,G=P.r,l=P.innerR,M=P.start,k=P.end,y=P.x):P={innerR:l,start:M,end:k};let j=this.symbol("arc",y,v,G,G,P);return j.r=G,j}rect(y,v,G,l,M,k){let P=d(y)?y:y===void 0?{}:{x:y,y:v,r:M,width:Math.max(G||0,0),height:Math.max(l||0,0)},j=this.createElement("rect");return this.styledMode||(k!==void 0&&(P["stroke-width"]=k,i(P,j.crisp(P))),P.fill="none"),j.rSetter=function(N,$,Z){j.r=N,a(Z,{rx:N,ry:N})},j.rGetter=function(){return j.r||0},j.attr(P)}roundedRect(y){return this.symbol("roundedRect").attr(y)}setSize(y,v,G){this.width=y,this.height=v,this.boxWrapper.animate({width:y,height:v},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:c(G,!0)?void 0:0}),this.alignElements()}g(y){let v=this.createElement("g");return y?v.attr({class:"highcharts-"+y}):v}image(y,v,G,l,M,k){let P={preserveAspectRatio:"none"};n(v)&&(P.x=v),n(G)&&(P.y=G),n(l)&&(P.width=l),n(M)&&(P.height=M);let j=this.createElement("image").attr(P),N=function($){j.attr({href:y}),k.call(j,$)};if(k){j.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});let $=new D.Image;g($,"load",N),$.src=y,$.complete&&N({})}else j.attr({href:y});return j}symbol(y,v,G,l,M,k){let P,j,N,$,Z=this,_=/^url\((.*?)\)$/,ot=_.test(y),ht=!ot&&(this.symbols[y]?y:"circle"),X=ht&&this.symbols[ht];if(X)typeof v=="number"&&(j=X.call(this.symbols,v||0,G||0,l||0,M||0,k)),P=this.path(j),Z.styledMode||P.attr("fill","none"),i(P,{symbolName:ht||void 0,x:v,y:G,width:l,height:M}),k&&i(P,k);else if(ot){N=y.match(_)[1];let F=P=this.image(N);F.imgwidth=c(k&&k.width,I[N]&&I[N].width),F.imgheight=c(k&&k.height,I[N]&&I[N].height),$=q=>q.attr({width:q.width,height:q.height}),["width","height"].forEach(q=>{F[`${q}Setter`]=function(K,et){this[et]=K;let{alignByTranslate:tt,element:rt,width:lt,height:dt,imgwidth:pt,imgheight:ut}=this,ct=et==="width"?pt:ut,mt=1;k&&k.backgroundSize==="within"&<&&dt&&pt&&ut?(mt=Math.min(lt/pt,dt/ut),a(rt,{width:Math.round(pt*mt),height:Math.round(ut*mt)})):rt&&ct&&rt.setAttribute(et,ct),!tt&&pt&&ut&&this.translate(((lt||0)-pt*mt)/2,((dt||0)-ut*mt)/2)}}),t(v)&&F.attr({x:v,y:G}),F.isImg=!0,t(F.imgwidth)&&t(F.imgheight)?$(F):(F.attr({width:0,height:0}),x("img",{onload:function(){let q=E[Z.chartIndex];this.width===0&&(s(this,{position:"absolute",top:"-999em"}),p.body.appendChild(this)),I[N]={width:this.width,height:this.height},F.imgwidth=this.width,F.imgheight=this.height,F.element&&$(F),this.parentNode&&this.parentNode.removeChild(this),Z.imgCount--,Z.imgCount||!q||q.hasLoaded||q.onload()},src:N}),this.imgCount++)}return P}clipRect(y,v,G,l){return this.rect(y,v,G,l,0)}text(y,v,G,l){let M={};if(l&&(this.allowHTML||!this.forExport))return this.html(y,v,G);M.x=Math.round(v||0),G&&(M.y=Math.round(G)),t(y)&&(M.text=y);let k=this.createElement("text").attr(M);return l&&(!this.forExport||this.allowHTML)||(k.xSetter=function(P,j,N){let $=N.getElementsByTagName("tspan"),Z=N.getAttribute(j);for(let _=0,ot;_<$.length;_++)(ot=$[_]).getAttribute(j)===Z&&ot.setAttribute(j,P);N.setAttribute(j,P)}),k}fontMetrics(y){let v=A(it.prototype.getStyle.call(y,"font-size")||0),G=v<24?v+3:Math.round(1.2*v),l=Math.round(.8*G);return{h:G,b:l,f:v}}rotCorr(y,v,G){let l=y;return v&&G&&(l=Math.max(l*Math.cos(v*L),4)),{x:-y/3*Math.sin(v*L),y:l}}pathToSegments(y){let v=[],G=[],l={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2};for(let M=0;My.align())}}return i(H.prototype,{Element:it,SVG_NS:f,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:Y,draw:h}),st.registerRendererType("svg",H,!0),H}),gt(z,"Core/Renderer/HTML/HTMLElement.js",[z["Core/Renderer/HTML/AST.js"],z["Core/Globals.js"],z["Core/Renderer/SVG/SVGElement.js"],z["Core/Utilities.js"]],function(V,Q,nt,at){let{composed:st}=Q,{attr:it,css:J,createElement:Y,defined:W,extend:U,pInt:S,pushUnique:O}=at;function E(w,m,h){let f=this.div?.style||h.style;nt.prototype[`${m}Setter`].call(this,w,m,h),f&&(f[m]=w)}let L=(w,m)=>{if(!w.div){let h=it(w.element,"class"),f=w.css,I=Y("div",h?{className:h}:void 0,Rt(Dt({position:"absolute",left:`${w.translateX||0}px`,top:`${w.translateY||0}px`},w.styles),{display:w.display,opacity:w.opacity,visibility:w.visibility}),w.parentGroup?.div||m);w.classSetter=(D,g,a)=>{a.setAttribute("class",D),I.className=D},w.translateXSetter=w.translateYSetter=(D,g)=>{w[g]=D,I.style[g==="translateX"?"left":"top"]=`${D}px`,w.doTransform=!0},w.opacitySetter=w.visibilitySetter=E,w.css=D=>(f.call(w,D),D.cursor&&(I.style.cursor=D.cursor),D.pointerEvents&&(I.style.pointerEvents=D.pointerEvents),w),w.on=function(){return nt.prototype.on.apply({element:I,onEvents:w.onEvents},arguments),w},w.div=I}return w.div};class p extends nt{static compose(m){O(st,this.compose)&&(m.prototype.html=function(h,f,I){return new p(this,"span").attr({text:h,x:Math.round(f),y:Math.round(I)})})}constructor(m,h){super(m,h),this.css(Dt({position:"absolute"},m.styledMode?{}:{fontFamily:m.style.fontFamily,fontSize:m.style.fontSize})),this.element.style.whiteSpace="nowrap"}getSpanCorrection(m,h,f){this.xCorr=-m*f,this.yCorr=-h}css(m){let h,{element:f}=this,I=f.tagName==="SPAN"&&m&&"width"in m,D=I&&m.width;return I&&(delete m.width,this.textWidth=S(D)||void 0,h=!0),m?.textOverflow==="ellipsis"&&(m.whiteSpace="nowrap",m.overflow="hidden"),U(this.styles,m),J(f,m),h&&this.updateTransform(),this}htmlGetBBox(){let{element:m}=this;return{x:m.offsetLeft,y:m.offsetTop,width:m.offsetWidth,height:m.offsetHeight}}updateTransform(){if(!this.added){this.alignOnAdd=!0;return}let{element:m,renderer:h,rotation:f,rotationOriginX:I,rotationOriginY:D,styles:g,textAlign:a="left",textWidth:x,translateX:r=0,translateY:s=0,x:t=0,y:e=0}=this,i=g.whiteSpace;if(J(m,{marginLeft:`${r}px`,marginTop:`${s}px`}),m.tagName==="SPAN"){let o=[f,a,m.innerHTML,x,this.textAlign].join(","),n=-(this.parentGroup?.padding*1)||0,d,b=!1;if(x!==this.oldTextWidth){let B=this.textPxLength?this.textPxLength:(J(m,{width:"",whiteSpace:i||"nowrap"}),m.offsetWidth),H=x||0;(H>this.oldTextWidth||B>H)&&(/[ \-]/.test(m.textContent||m.innerText)||m.style.textOverflow==="ellipsis")&&(J(m,{width:B>H||f?x+"px":"auto",display:"block",whiteSpace:i||"normal"}),this.oldTextWidth=x,b=!0)}this.hasBoxWidthChanged=b,o!==this.cTT&&(d=h.fontMetrics(m).b,W(f)&&(f!==(this.oldRotation||0)||a!==this.oldAlign)&&this.setSpanRotation(f,n,n),this.getSpanCorrection(!W(f)&&this.textPxLength||m.offsetWidth,d,{left:0,center:.5,right:1}[a]));let{xCorr:R=0,yCorr:c=0}=this,A=(I??t)-R-t-n,T=(D??e)-c-e-n;J(m,{left:`${t+R}px`,top:`${e+c}px`,transformOrigin:`${A}px ${T}px`}),this.cTT=o,this.oldRotation=f,this.oldAlign=a}}setSpanRotation(m,h,f){J(this.element,{transform:`rotate(${m}deg)`,transformOrigin:`${h}% ${f}px`})}add(m){let h,f=this.renderer.box.parentNode,I=[];if(this.parentGroup=m,m&&!(h=m.div)){let D=m;for(;D;)I.push(D),D=D.parentGroup;for(let g of I.reverse())h=L(g,f)}return(h||f).appendChild(this.element),this.added=!0,this.alignOnAdd&&this.updateTransform(),this}textSetter(m){m!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,V.setElementHTML(this.element,m??""),this.textStr=m,this.doTransform=!0)}alignSetter(m){this.alignValue=this.textAlign=m,this.doTransform=!0}xSetter(m,h){this[h]=m,this.doTransform=!0}}let C=p.prototype;return C.visibilitySetter=C.opacitySetter=E,C.ySetter=C.rotationSetter=C.rotationOriginXSetter=C.rotationOriginYSetter=C.xSetter,p}),gt(z,"Core/Axis/AxisDefaults.js",[],function(){var V,Q;return(Q=V||(V={})).xAxis={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},Q.yAxis={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){let{numberFormatter:nt}=this.axis.chart;return nt(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},V}),gt(z,"Core/Foundation.js",[z["Core/Utilities.js"]],function(V){var Q;let{addEvent:nt,isFunction:at,objectEach:st,removeEvent:it}=V;return(Q||(Q={})).registerEventOptions=function(J,Y){J.eventOptions=J.eventOptions||{},st(Y.events,function(W,U){J.eventOptions[U]!==W&&(J.eventOptions[U]&&(it(J,U,J.eventOptions[U]),delete J.eventOptions[U]),at(W)&&(J.eventOptions[U]=W,nt(J,U,W,{order:0})))})},Q}),gt(z,"Core/Axis/Tick.js",[z["Core/Templating.js"],z["Core/Globals.js"],z["Core/Utilities.js"]],function(V,Q,nt){let{deg2rad:at}=Q,{clamp:st,correctFloat:it,defined:J,destroyObjectProperties:Y,extend:W,fireEvent:U,isNumber:S,merge:O,objectEach:E,pick:L}=nt;return class{constructor(p,C,w,m,h){this.isNew=!0,this.isNewLabel=!0,this.axis=p,this.pos=C,this.type=w||"",this.parameters=h||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,U(this,"init"),w||m||this.addLabel()}addLabel(){let p=this,C=p.axis,w=C.options,m=C.chart,h=C.categories,f=C.logarithmic,I=C.names,D=p.pos,g=L(p.options&&p.options.labels,w.labels),a=C.tickPositions,x=D===a[0],r=D===a[a.length-1],s=(!g.step||g.step===1)&&C.tickInterval===1,t=a.info,e=p.label,i,o,n,d=this.parameters.category||(h?L(h[D],I[D],D):D);f&&S(d)&&(d=it(f.lin2log(d))),C.dateTime&&(t?i=(o=m.time.resolveDTLFormat(w.dateTimeLabelFormats[!w.grid&&t.higherRanks[D]||t.unitName])).main:S(d)&&(i=C.dateTime.getXDateFormat(d,w.dateTimeLabelFormats||{}))),p.isFirst=x,p.isLast=r;let b={axis:C,chart:m,dateTimeLabelFormat:i,isFirst:x,isLast:r,pos:D,tick:p,tickPositionInfo:t,value:d};U(this,"labelFormat",b);let R=T=>g.formatter?g.formatter.call(T,T):g.format?(T.text=C.defaultLabelFormatter.call(T),V.format(g.format,T,m)):C.defaultLabelFormatter.call(T),c=R.call(b,b),A=o&&o.list;A?p.shortenLabel=function(){for(n=0;n0&&m+x*r>D&&(d=Math.round((h-m)/Math.cos(a*at))):(o=m-x*r,n=m+(1-x)*r,oD&&(e=D-p.x+e*x,i=-1),(e=Math.min(s,e))e||C.autoRotation&&(g.styles||{}).width)&&(d=e)),d&&(this.shortenLabel?this.shortenLabel():(t.width=Math.floor(d)+"px",(w.style||{}).textOverflow||(t.textOverflow="ellipsis"),g.css(t)))}moveLabel(p,C){let w=this,m=w.label,h=w.axis,f=!1,I;m&&m.textStr===p?(w.movedLabel=m,f=!0,delete w.label):E(h.ticks,function(D){f||D.isNew||D===w||!D.label||D.label.textStr!==p||(w.movedLabel=D.label,f=!0,D.labelPos=w.movedLabel.xy,delete D.label)}),!f&&(w.labelPos||m)&&(I=w.labelPos||m.xy,w.movedLabel=w.createLabel(p,C,I),w.movedLabel&&w.movedLabel.attr({opacity:0}))}render(p,C,w){let m=this.axis,h=m.horiz,f=this.pos,I=L(this.tickmarkOffset,m.tickmarkOffset),D=this.getPosition(h,f,I,C),g=D.x,a=D.y,x=m.pos,r=x+m.len,s=h?g:a;!m.chart.polar&&this.isNew&&(it(s)r)&&(w=0);let t=L(w,this.label&&this.label.newOpacity,1);w=L(w,1),this.isActive=!0,this.renderGridLine(C,w),this.renderMark(D,w),this.renderLabel(D,C,t,p),this.isNew=!1,U(this,"afterRender")}renderGridLine(p,C){let w=this.axis,m=w.options,h={},f=this.pos,I=this.type,D=L(this.tickmarkOffset,w.tickmarkOffset),g=w.chart.renderer,a=this.gridLine,x,r=m.gridLineWidth,s=m.gridLineColor,t=m.gridLineDashStyle;this.type==="minor"&&(r=m.minorGridLineWidth,s=m.minorGridLineColor,t=m.minorGridLineDashStyle),a||(w.chart.styledMode||(h.stroke=s,h["stroke-width"]=r||0,h.dashstyle=t),I||(h.zIndex=1),p&&(C=0),this.gridLine=a=g.path().attr(h).addClass("highcharts-"+(I?I+"-":"")+"grid-line").add(w.gridGroup)),a&&(x=w.getPlotLinePath({value:f+D,lineWidth:a.strokeWidth(),force:"pass",old:p,acrossPanes:!1}))&&a[p||this.isNew?"attr":"animate"]({d:x,opacity:C})}renderMark(p,C){let w=this.axis,m=w.options,h=w.chart.renderer,f=this.type,I=w.tickSize(f?f+"Tick":"tick"),D=p.x,g=p.y,a=L(m[f!=="minor"?"tickWidth":"minorTickWidth"],!f&&w.isXAxis?1:0),x=m[f!=="minor"?"tickColor":"minorTickColor"],r=this.mark,s=!r;I&&(w.opposite&&(I[0]=-I[0]),r||(this.mark=r=h.path().addClass("highcharts-"+(f?f+"-":"")+"tick").add(w.axisGroup),w.chart.styledMode||r.attr({stroke:x,"stroke-width":a})),r[s?"attr":"animate"]({d:this.getMarkPath(D,g,I[0],r.strokeWidth(),w.horiz,h),opacity:C}))}renderLabel(p,C,w,m){let h=this.axis,f=h.horiz,I=h.options,D=this.label,g=I.labels,a=g.step,x=L(this.tickmarkOffset,h.tickmarkOffset),r=p.x,s=p.y,t=!0;D&&S(r)&&(D.xy=p=this.getLabelPosition(r,s,D,f,g,x,m,a),(!this.isFirst||this.isLast||I.showFirstLabel)&&(!this.isLast||this.isFirst||I.showLastLabel)?!f||g.step||g.rotation||C||w===0||this.handleOverflow(p):t=!1,a&&m%a&&(t=!1),t&&S(p.y)?(p.opacity=w,D[this.isNewLabel?"attr":"animate"](p).show(!0),this.isNewLabel=!1):(D.hide(),this.isNewLabel=!0))}replaceMovedLabel(){let p=this.label,C=this.axis;p&&!this.isNew&&(p.animate({opacity:0},void 0,p.destroy),delete this.label),C.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel}}}),gt(z,"Core/Axis/Axis.js",[z["Core/Animation/AnimationUtilities.js"],z["Core/Axis/AxisDefaults.js"],z["Core/Color/Color.js"],z["Core/Defaults.js"],z["Core/Foundation.js"],z["Core/Globals.js"],z["Core/Axis/Tick.js"],z["Core/Utilities.js"]],function(V,Q,nt,at,st,it,J,Y){let{animObject:W}=V,{xAxis:U,yAxis:S}=Q,{defaultOptions:O}=at,{registerEventOptions:E}=st,{deg2rad:L}=it,{arrayMax:p,arrayMin:C,clamp:w,correctFloat:m,defined:h,destroyObjectProperties:f,erase:I,error:D,extend:g,fireEvent:a,getClosestDistance:x,insertItem:r,isArray:s,isNumber:t,isString:e,merge:i,normalizeTickInterval:o,objectEach:n,pick:d,relativeLength:b,removeEvent:R,splat:c,syncTimeout:A}=Y,T=(H,u)=>o(u,void 0,void 0,d(H.options.allowDecimals,u<.5||H.tickAmount!==void 0),!!H.tickAmount);g(O,{xAxis:U,yAxis:i(U,S)});class B{constructor(u,y,v){this.init(u,y,v)}init(u,y,v=this.coll){let G=v==="xAxis",l=this.isZAxis||(u.inverted?!G:G);this.chart=u,this.horiz=l,this.isXAxis=G,this.coll=v,a(this,"init",{userOptions:y}),this.opposite=d(y.opposite,this.opposite),this.side=d(y.side,this.side,l?this.opposite?0:2:this.opposite?1:3),this.setOptions(y);let M=this.options,k=M.labels,P=M.type;this.userOptions=y,this.minPixelPadding=0,this.reversed=d(M.reversed,this.reversed),this.visible=M.visible,this.zoomEnabled=M.zoomEnabled,this.hasNames=P==="category"||M.categories===!0,this.categories=s(M.categories)&&M.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=h(M.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len??(this.len=0),this.minRange=this.userMinRange=M.minRange||M.maxZoom,this.range=M.range,this.offset=M.offset||0,this.max=void 0,this.min=void 0;let j=d(M.crosshair,c(u.options.tooltip.crosshairs)[G?0:1]);this.crosshair=j===!0?{}:j,u.axes.indexOf(this)===-1&&(G?u.axes.splice(u.xAxis.length,0,this):u.axes.push(this),r(this,u[this.coll])),u.orderItems(this.coll),this.series=this.series||[],u.inverted&&!this.isZAxis&&G&&!h(this.reversed)&&(this.reversed=!0),this.labelRotation=t(k.rotation)?k.rotation:void 0,E(this,M),a(this,"afterInit")}setOptions(u){let y=this.horiz?{labels:{autoRotation:[-45],padding:4},margin:15}:{labels:{padding:1},title:{rotation:90*this.side}};this.options=i(y,O[this.coll],u),a(this,"afterSetOptions",{userOptions:u})}defaultLabelFormatter(){let u=this.axis,{numberFormatter:y}=this.chart,v=t(this.value)?this.value:NaN,G=u.chart.time,l=u.categories,M=this.dateTimeLabelFormat,k=O.lang,P=k.numericSymbols,j=k.numericSymbolMagnitude||1e3,N=u.logarithmic?Math.abs(v):u.tickInterval,$=P&&P.length,Z,_;if(l)_=`${this.value}`;else if(M)_=G.dateFormat(M,v);else if($&&P&&N>=1e3)for(;$--&&_===void 0;)N>=(Z=Math.pow(j,$+1))&&10*v%Z==0&&P[$]!==null&&v!==0&&(_=y(v/Z,-1)+P[$]);return _===void 0&&(_=Math.abs(v)>=1e4?y(v,-1):y(v,-1,void 0,"")),_}getSeriesExtremes(){let u,y=this;a(this,"getSeriesExtremes",null,function(){y.hasVisibleSeries=!1,y.dataMin=y.dataMax=y.threshold=void 0,y.softThreshold=!y.isXAxis,y.series.forEach(v=>{if(v.reserveSpace()){let G=v.options,l,M=G.threshold,k,P;if(y.hasVisibleSeries=!0,y.positiveValuesOnly&&0>=(M||0)&&(M=void 0),y.isXAxis)(l=v.xData)&&l.length&&(l=y.logarithmic?l.filter(j=>j>0):l,k=(u=v.getXExtremes(l)).min,P=u.max,t(k)||k instanceof Date||(l=l.filter(t),k=(u=v.getXExtremes(l)).min,P=u.max),l.length&&(y.dataMin=Math.min(d(y.dataMin,k),k),y.dataMax=Math.max(d(y.dataMax,P),P)));else{let j=v.applyExtremes();t(j.dataMin)&&(k=j.dataMin,y.dataMin=Math.min(d(y.dataMin,k),k)),t(j.dataMax)&&(P=j.dataMax,y.dataMax=Math.max(d(y.dataMax,P),P)),h(M)&&(y.threshold=M),(!G.softThreshold||y.positiveValuesOnly)&&(y.softThreshold=!1)}}})}),a(this,"afterGetSeriesExtremes")}translate(u,y,v,G,l,M){let k=this.linkedParent||this,P=G&&k.old?k.old.min:k.min;if(!t(P))return NaN;let j=k.minPixelPadding,N=(k.isOrdinal||k.brokenAxis?.hasBreaks||k.logarithmic&&l)&&k.lin2val,$=1,Z=0,_=G&&k.old?k.old.transA:k.transA,ot=0;return _||(_=k.transA),v&&($*=-1,Z=k.len),k.reversed&&($*=-1,Z-=$*(k.sector||k.len)),y?(ot=(u=u*$+Z-j)/_+P,N&&(ot=k.lin2val(ot))):(N&&(u=k.val2lin(u)),ot=$*(u-P)*_+Z+$*j+(t(M)?_*M:0),k.isRadial||(ot=m(ot))),ot}toPixels(u,y){return this.translate(u,!1,!this.horiz,void 0,!0)+(y?0:this.pos)}toValue(u,y){return this.translate(u-(y?0:this.pos),!0,!this.horiz,void 0,!0)}getPlotLinePath(u){let y=this,v=y.chart,G=y.left,l=y.top,M=u.old,k=u.value,P=u.lineWidth,j=M&&v.oldChartHeight||v.chartHeight,N=M&&v.oldChartWidth||v.chartWidth,$=y.transB,Z=u.translatedValue,_=u.force,ot,ht,X,F,q;function K(tt,rt,lt){return _!=="pass"&&(tt