!function(e){"function"==typeof define&&define.amd?define("scripts",e):e()}((function(){"use strict";function e(e,o,n){document.cookie=[encodeURIComponent(e)+"="+encodeURIComponent(o),"max-age="+n,"path=/"].join("; ")}function o(e){for(var o=encodeURIComponent(e)+"=",n=document.cookie.split(";"),t=0;t<n.length;t++){for(var i=n[t];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(o))return decodeURIComponent(i.substring(o.length,i.length))}return null}var n=1e3,t=6e4,i=36e5,p=24*i,s=function(s){if(s&&!(s.length<0)){var a,r,u,c,l,d=JSON.parse(s.getAttribute("data-options")),_=(a=d.locale,u={day:{en:["day","days"],ru:["день","дня","дней"]},hour:{en:["hour","hours"],ru:["час","часа","часов"]},minute:{en:["minute","minutes"],ru:["минута","минуты","минут"]},second:{en:["second","seconds"],ru:["секунда","секунды","секунд"]}},c=void 0!==(r={en:function(e){return 1===e?0:1},ru:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}})[a]?r[a]:r.en,function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(void 0!==u[e]&&void 0!==u[e][a]){var n=c(o);if(void 0!==u[e][a][n])return u[e][a][n]}return e}),m=o(d.identity);if(null!==m){var f=m.split(".");m=parseInt(f[0]),l=f[1],parseInt(l)!==parseInt(d.time)&&(m=(new Date).getTime()+1e3*d.time,e(d.identity,[m,d.time].join("."),d.time))}else m=(new Date).getTime()+1e3*d.time,e(d.identity,[m,d.time].join("."),d.time);var w,h=new Date(m),v=(new Date).getTime(),y=Math.max(0,h-v),b=Math.floor(y/p),g=Math.floor(y%p/i),k=Math.floor(y%i/t),j=Math.floor(y%t/n),T="",x=!d.hide_empty||b>0,C=!d.hide_empty||g>0||x,E=!d.hide_empty||k>0||C;x&&(T+='<div class="'+d.class_prefix+'countdown__item js-mypopup-countdown-days"><div class="'+d.class_prefix+'countdown__num"><span class="js-mypopup-countdown-num"></span></div><div class="'+d.class_prefix+'countdown__label"><span class="js-mypopup-countdown-label"></span></div></div>'),C&&(T+='<div class="'+d.class_prefix+'countdown__item js-mypopup-countdown-hours"><div class="'+d.class_prefix+'countdown__num"><span class="js-mypopup-countdown-num"></span></div><div class="'+d.class_prefix+'countdown__label"><span class="js-mypopup-countdown-label"></span></div></div>'),E&&(T+='<div class="'+d.class_prefix+'countdown__item js-mypopup-countdown-minutes"><div class="'+d.class_prefix+'countdown__num"><span class="js-mypopup-countdown-num"></span></div><div class="'+d.class_prefix+'countdown__label"><span class="js-mypopup-countdown-label"></span></div></div>'),T+='<div class="'+d.class_prefix+'countdown__item js-mypopup-countdown-seconds"><div class="'+d.class_prefix+'countdown__num"><span class="js-mypopup-countdown-num"></span></div><div class="'+d.class_prefix+'countdown__label"><span class="js-mypopup-countdown-label"></span></div></div>',s.innerHTML=T;var M=function(){v=(new Date).getTime(),y=Math.max(0,h-v),b=Math.floor(y/p),g=Math.floor(y%p/i),k=Math.floor(y%i/t),j=Math.floor(y%t/n);var e=s.querySelector(".js-mypopup-countdown-days");null!==e&&(e.querySelector(".js-mypopup-countdown-num").innerHTML=b,e.querySelector(".js-mypopup-countdown-label").innerHTML=_("day",b));var o=s.querySelector(".js-mypopup-countdown-hours");null!==o&&(o.querySelector(".js-mypopup-countdown-num").innerHTML=d.start_with_zero&&g<10?"0"+g:g,o.querySelector(".js-mypopup-countdown-label").innerHTML=_("hour",g));var a=s.querySelector(".js-mypopup-countdown-minutes");null!==a&&(a.querySelector(".js-mypopup-countdown-num").innerHTML=d.start_with_zero&&k<10?"0"+k:k,a.querySelector(".js-mypopup-countdown-label").innerHTML=_("minute",k));var r=s.querySelector(".js-mypopup-countdown-seconds");r.querySelector(".js-mypopup-countdown-num").innerHTML=d.start_with_zero&&j<10?"0"+j:j,r.querySelector(".js-mypopup-countdown-label").innerHTML=_("second",j),y<=0&&(clearInterval(w),document.dispatchEvent(new CustomEvent("mypopup_countdown_elapsed",{detail:{el:s,identity:d.identity}})))};M(),w=setInterval(M,1e3)}};function a(e,o){for(var n=0;n<o.length;n++){var t=o[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,r(t.key),t)}}function r(e){var o=function(e,o){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,o||"default");if("object"!=typeof t)return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(e)}(e,"string");return"symbol"==typeof o?o:o+""}function u(e){try{return JSON.parse(o(e))||[]}catch(e){console.error(e)}return[]}var c=function(){return e=function e(o,n){!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e),this._cookieName=o,this.isPreview=n,this._popups=u(o)},(o=[{key:"getPopupsExcept",value:function(e){return this._popups.filter((function(o){return o.id!==e})).map((function(e){return{id:e.id,time:e.time,show_on:!!e.show_on}}))}},{key:"setAllPopups",value:function(e){return this._popups=e,function(e,o,n){var t;if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),t="; expires="+i.toGMTString()}else t="";document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(o)+t+"; path=/"}(this._cookieName,JSON.stringify(e),this.isPreview?0:"3650"),this}},{key:"isHidden",value:function(e){var o=Math.floor((new Date).getTime()/1e3),n=!1;return this._popups.filter((function(o){return o.id===e.id})).forEach((function(e){e.time>o&&(n=!0)})),n}}])&&a(e.prototype,o),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,o,n}();jQuery((function(e){var o=150,n=!!(my_popup_ajax||{}).is_preview,t=new c(n?"my_popup_hide__preview":"my_popup_hide",n),i=function(){this.stack=[],e(document).keyup(function(e){if(27===e.keyCode){var o=this.stack.pop();o&&"function"==typeof o.callback&&o.callback()}}.bind(this))};i.prototype.push=function(e,o){return this.off(e),this.stack.push({name:e,callback:o}),this},i.prototype.off=function(e){return this.stack=this.stack.filter((function(o){return o.name!==e})),this};var p=new i,a=!1,r=!1,u=!1,l=!1,d=!1,_=!1,m=!1;function f(){a&&h.forEach((function(e){e.show_popup_time_enabled&&void 0===e._showTimout&&(e._showTimout=setTimeout((function(){e.is_show||(b(e),e.is_show=!0)}),e.show_popup_time_value))})),r&&!_&&(window.addEventListener("scroll",j(v),!0),window.addEventListener("resize",j(v),!0),_=!0),u&&!m&&(window.addEventListener("scroll",j(y),!0),m=!0),l&&h.forEach((function(o){if(o.show_popup_inactive_enabled){var n=0;e(document).ready((function(){var t=setInterval((function(){n+=1,!o.is_show&&n>o.show_popup_inactive_value&&(b(o),o.is_show=!0,clearInterval(t))}),1e3);e(this).mousemove((function(e){n=0})),e(this).keypress((function(e){n=0}))}))}})),d&&h.forEach((function(o){o.show_popup_leaves_page&&e(document).mouseleave((function(e){!o.is_show&&e.clientY<100&&(b(o),o.is_show=!0)}))}))}function w(o){e("body").append(o);var n=o.attr("id"),t=o.data("options");t.show_popup_time_enabled&&(a=!0),t.show_popup_scroll_enabled&&(r=!0),t.show_popup_element_enabled&&(u=!0),t.show_popup_inactive_enabled&&(l=!0),t.show_popup_leaves_page&&(d=!0);var i={id:n,is_show:!1,popup_position:t.popup_position,cookies_enabled:!!parseInt(t.cookies_enabled),cookies_type:t.cookies_type,cookies_value:t.cookies_value,enable_overlay:t.enable_overlay,close_button_enabled:t.close_button_enabled,close_button_time:t.close_button_time,close_overlay:t.close_overlay,close_esc:t.close_esc,scroll_lock:t.scroll_lock,close_popup_enabled:t.close_popup_enabled,close_popup_time:t.close_popup_time,overlay_color:t.overlay_color,overlay_opacity:t.overlay_opacity,show_popup_time_enabled:t.show_popup_time_enabled,show_popup_time_value:t.show_popup_time_value,show_popup_scroll_enabled:t.show_popup_scroll_enabled,show_popup_scroll_value:t.show_popup_scroll_value,show_popup_element_enabled:t.show_popup_element_enabled,show_popup_element_value:t.show_popup_element_value,show_popup_inactive_enabled:t.show_popup_inactive_enabled,show_popup_inactive_value:t.show_popup_inactive_value,show_popup_leaves_page:t.show_popup_leaves_page,show_on_click:t.show_popup_on_click,show_on_click_selector:t.show_popup_on_click_selector};i.show_on_click&&i.show_on_click_selector&&e(document).on("click",i.show_on_click_selector,(function(e){e.preventDefault(),b(i,!1),i.is_show=!0})),h.push(i)}window.appendMyPopup=w,window.initMyPopups=f;var h=[];function v(){h.forEach((function(e){e.show_popup_scroll_enabled&&function(){var e=window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop,o=isNaN(window.innerHeight)?window.clientHeight:window.innerHeight,n=parseInt(100*e/(t=document.body,i=document.documentElement,Math.max(t.scrollHeight,t.offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)-o));var t,i;n<=0&&(n=0);n>=100&&(n=100);return n}()>=e.show_popup_scroll_value&&!e.is_show&&(b(e),e.is_show=!0)}))}function y(){h.forEach((function(o){if(o.show_popup_element_enabled){var n=e(o.show_popup_element_value).offset().top;(window.hasOwnProperty("pageYOffset")?window.pageYOffset:window.scrollTop)>n-(isNaN(window.innerHeight)?window.clientHeight:window.innerHeight)&&!o.is_show&&(b(o),o.is_show=!0)}}))}function b(n){var i,a;(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t.isHidden(n)||(n.enable_overlay&&(i=n.id,(a=document.createElement("div")).className="mypopup-over",a.id=i+"_over",h.forEach((function(o){o.overlay_color&&e("mypopup-over").css({"background-color":o.overlay_color}),o.overlay_opacity&&e("mypopup-over").css({opacity:o.overlay_opacity,"filter: alpha(opacity=":o.overlay_opacity}),o.close_overlay||e(a).on("click",(function(e){k(i)}))})),document.body.append(a),n.overlay_color&&e(".mypopup-over").css({"background-color":n.overlay_color}),n.overlay_opacity&&e(".mypopup-over").css({opacity:n.overlay_opacity})),setTimeout((function(){!function(n){e(document.body).addClass("mypopup-open"),n.scroll_lock&&setTimeout((function(){e(document.body).addClass("mypopup-scroll-lock")}),o)}(n);var t,i=e("#"+n.id),a=function(e){if(void 0===e.data("content"))return"";try{var o=decodeURIComponent(T(e.data("content")));return e.removeData("content"),e.removeAttr("data-content"),o}catch(e){console.error(e)}return""}(i);i.append(a),i.show((function(){document.dispatchEvent(new CustomEvent("my_popup_show",{detail:{$popup:i}}))})),i.find(".mypopup-modal-close.js-mypopup-modal-close").hide(),n.close_button_enabled&&setTimeout((function(){i.find(".mypopup-modal-close.js-mypopup-modal-close").show()}),n.close_button_time),g(n.id),[100,500,1e3,2e3].forEach((function(e){return setTimeout((function(){return g(n.id)}),e)})),e(window).resize((function(){g(n.id)})),i.on("click",(function(e){e.target===e.currentTarget&&k(n.id)})),n.close_esc||p.push(n.id,(function(){k(n.id)})),n.close_popup_enabled&&setTimeout((function(){k(n.id)}),n.close_popup_time),t=document.querySelectorAll("#"+n.id+" .js-mypopup-countdown"),NodeList.prototype.isPrototypeOf(t)?t.forEach(s):s(t)}),10))}function g(o){var n=e(window).height();h.filter((function(e){return e.id===o})).forEach((function(o){var t=e("#modal_"+o.id).outerHeight();t+120>n?e("#modal_content_"+o.id).css({"max-height":n-40,"overflow-y":"auto"}):"center_left"!==o.popup_position&&"center_center"!==o.popup_position&&"center_right"!==o.popup_position||e("#modal_"+o.id).css({"margin-top":(n-t)/2})}))}function k(i){if(!n){var s=h.filter((function(e){return e.id===i}));if(!s.length)return!1;s=s[0],p.off(s.id);var a=t.getPopupsExcept(i),r=Math.floor((new Date).getTime()/1e3),u=s.cookies_enabled,c=Math.floor((new Date).getTime()/1e3);s.cookies_enabled?s.cookies_value&&("minutes"===s.cookies_type?r=c+60*s.cookies_value:"hours"===s.cookies_type?r=c+60*s.cookies_value*60:"days"===s.cookies_type?r=c+24*s.cookies_value*60*60:"months"===s.cookies_type&&(r=c+30*s.cookies_value*24*60*60)):r=c+31536e4,a.push({id:i,time:r,show_on:u}),t.setAllPopups(a),e(document.body).removeClass("mypopup-open"),e(document.body).removeClass("mypopup-scroll-lock"),setTimeout((function(){e("#"+i+"_over").remove(),e("#"+i).hide()}),o)}}function j(e,o){void 0===o&&(o=250);var n,t,i=!1;return function p(){if(i)return n=arguments,void(t=e);e.apply(e,arguments),i=!0,setTimeout((function(){i=!1,n&&(p.apply(t,n),n=t=null)}),o)}}function T(e){if("undefined"==typeof window)return new Buffer(e,"base64").toString("utf-8");if(void 0!==window.atob)return decodeURIComponent(escape(window.atob(e)));var o,n,t,i,p,s,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=0,u=0,c="",l=[];if(!e)return e;e+="";do{o=(s=a.indexOf(e.charAt(r++))<<18|a.indexOf(e.charAt(r++))<<12|(i=a.indexOf(e.charAt(r++)))<<6|(p=a.indexOf(e.charAt(r++))))>>16&255,n=s>>8&255,t=255&s,l[u++]=64===i?String.fromCharCode(o):64===p?String.fromCharCode(o,n):String.fromCharCode(o,n,t)}while(r<e.length);return c=l.join(""),decodeURIComponent(escape(c.replace(/\0+$/,"")))}e(".js-mypopup-container").each((function(){w(e(this))})),f(),function(){if(void 0===window.myPopupInitData)return;e.ajax({type:"post",url:my_popup_ajax.url,data:{nonce:my_popup_ajax.nonce,action:"my_popup_init_data",params:window.myPopupInitData.params}}).done((function(o){o.success?(o.data.items.forEach((function(o){w(e(o))})),f()):console.log(o)}))}(),window.myPopupShow=function(e){return h.filter((function(o){return o.id===e})).forEach((function(e){e.show_on_click&&(b(e),e.is_show=!0)})),!1},window.myPopupClose=function(o){if("string"==typeof o)k(o);else{var n=e(o).parents(".mypopup-modal");n.length&&k(n.attr("id").substring(6))}},document.addEventListener("click",(function(o){n&&(e(o.target).blur(),o.stopPropagation(),o.preventDefault(),console.warn("prevent all clicks in preview mode"))}),!0),e(document).on("click",".js-mypopup-modal-close",(function(){k(e(this).parents(".js-mypopup-container").attr("id"))})),e(document).on("click",".js-mypopup-link",(function(){var o=e(this).data("href");if(o){var n;try{n=new URL(o)}catch(e){}if(void 0===n)try{n=new URL(T(o))}catch(e){console.error("Unable to parse encoded url")}void 0!==n&&window.open(n)}})),e(document).on("submit",".mypopup-body form",(function(o){var n=e(o.target),t=n.find('input[data-name="my-popup-form-options"]');if(t.length){o.preventDefault();var i=function(o,t){var i=e("<span>").addClass("mypopup-modal__message mypopup-modal__message--"+t);i.text(o),n.find(".mypopup-modal__message").remove(),n.prepend(i)};e.ajax({type:"POST",url:n.attr("action"),data:n.serialize(),beforeSend:function(){n.find('*[type="submit"]').attr("disabled",!0)},success:function(e){e.success?(e.data&&e.data.message&&i(e.data.message,"success"),t.data("close_time")&&setTimeout((function(){return myPopupClose(n)}),t.data("close_time"))):e.data&&e.data.message&&i(e.data.message,"error")}}).always((function(){n.find('*[type="submit"]').attr("false",!0)}))}}))}))}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s,a){void 0===s&&(s={}),void 0===a&&(a={}),Object.keys(a).forEach((i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}class n extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function l(e){void 0===e&&(e=[]);const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...l(e)):t.push(e)})),t}function o(e,t){return Array.prototype.filter.call(e,t)}function d(e,t){const s=r(),i=a();let l=[];if(!t&&e instanceof n)return e;if(!e)return new n(l);if("string"==typeof e){const s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let e="div";0===s.indexOf("<li")&&(e="ul"),0===s.indexOf("<tr")&&(e="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(e="tr"),0===s.indexOf("<tbody")&&(e="table"),0===s.indexOf("<option")&&(e="select");const t=i.createElement(e);t.innerHTML=s;for(let e=0;e<t.childNodes.length;e+=1)l.push(t.childNodes[e])}else l=function(e,t){if("string"!=typeof e)return[e];const s=[],a=t.querySelectorAll(e);for(let e=0;e<a.length;e+=1)s.push(a[e]);return s}(e.trim(),t||i)}else if(e.nodeType||e===s||e===i)l.push(e);else if(Array.isArray(e)){if(e instanceof n)return e;l=e}return new n(function(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}(l))}d.fn=n.prototype;const c={addClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.add(...a)})),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...a)})),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return o(this,(e=>a.filter((t=>e.classList.contains(t))).length>0)).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));this.forEach((e=>{a.forEach((t=>{e.classList.toggle(t)}))}))},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?`${e}ms`:e;return this},on:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];let[a,i,r,n]=t;function l(e){const t=e.target;if(!t)return;const s=e.target.dom7EventData||[];if(s.indexOf(e)<0&&s.unshift(e),d(t).is(i))r.apply(t,s);else{const e=d(t).parents();for(let t=0;t<e.length;t+=1)d(e[t]).is(i)&&r.apply(e[t],s)}}function o(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof t[1]&&([a,r,n]=t,i=void 0),n||(n=!1);const c=a.split(" ");let p;for(let e=0;e<this.length;e+=1){const t=this[e];if(i)for(p=0;p<c.length;p+=1){const e=c[p];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:l}),t.addEventListener(e,l,n)}else for(p=0;p<c.length;p+=1){const e=c[p];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:o}),t.addEventListener(e,o,n)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];let[a,i,r,n]=t;"function"==typeof t[1]&&([a,r,n]=t,i=void 0),n||(n=!1);const l=a.split(" ");for(let e=0;e<l.length;e+=1){const t=l[e];for(let e=0;e<this.length;e+=1){const s=this[e];let a;if(!i&&s.dom7Listeners?a=s.dom7Listeners[t]:i&&s.dom7LiveListeners&&(a=s.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const i=a[e];r&&i.listener===r||r&&i.listener&&i.listener.dom7proxy&&i.listener.dom7proxy===r?(s.removeEventListener(t,i.proxyListener,n),a.splice(e,1)):r||(s.removeEventListener(t,i.proxyListener,n),a.splice(e,1))}}}return this},trigger:function(){const e=r();for(var t=arguments.length,s=new Array(t),a=0;a<t;a++)s[a]=arguments[a];const i=s[0].split(" "),n=s[1];for(let t=0;t<i.length;t+=1){const a=i[t];for(let t=0;t<this.length;t+=1){const i=this[t];if(e.CustomEvent){const t=new e.CustomEvent(a,{detail:n,bubbles:!0,cancelable:!0});i.dom7EventData=s.filter(((e,t)=>t>0)),i.dispatchEvent(t),i.dom7EventData=[],delete i.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",(function s(a){a.target===this&&(e.call(this,a),t.off("transitionend",s))})),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=r();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=r(),t=a(),s=this[0],i=s.getBoundingClientRect(),n=t.body,l=s.clientTop||n.clientTop||0,o=s.clientLeft||n.clientLeft||0,d=s===e?e.scrollY:s.scrollTop,c=s===e?e.scrollX:s.scrollLeft;return{top:i.top+d-l,left:i.left+c-o}}return null},css:function(e,t){const s=r();let a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(const t in e)this[a].style[t]=e[t];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this}return this},each:function(e){return e?(this.forEach(((t,s)=>{e.apply(t,[t,s])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=r(),s=a(),i=this[0];let l,o;if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(l=d(e),o=0;o<l.length;o+=1)if(l[o]===i)return!0;return!1}if(e===s)return i===s;if(e===t)return i===t;if(e.nodeType||e instanceof n){for(l=e.nodeType?[e]:e,o=0;o<l.length;o+=1)if(l[o]===i)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;if(e>t-1)return d([]);if(e<0){const s=t+e;return d(s<0?[]:[this[s]])}return d([this[e]])},append:function(){let e;const t=a();for(let s=0;s<arguments.length;s+=1){e=s<0||arguments.length<=s?void 0:arguments[s];for(let s=0;s<this.length;s+=1)if("string"==typeof e){const a=t.createElement("div");for(a.innerHTML=e;a.firstChild;)this[s].appendChild(a.firstChild)}else if(e instanceof n)for(let t=0;t<e.length;t+=1)this[s].appendChild(e[t]);else this[s].appendChild(e)}return this},prepend:function(e){const t=a();let s,i;for(s=0;s<this.length;s+=1)if("string"==typeof e){const a=t.createElement("div");for(a.innerHTML=e,i=a.childNodes.length-1;i>=0;i-=1)this[s].insertBefore(a.childNodes[i],this[s].childNodes[0])}else if(e instanceof n)for(i=0;i<e.length;i+=1)this[s].insertBefore(e[i],this[s].childNodes[0]);else this[s].insertBefore(e,this[s].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&d(this[0].nextElementSibling).is(e)?d([this[0].nextElementSibling]):d([]):this[0].nextElementSibling?d([this[0].nextElementSibling]):d([]):d([])},nextAll:function(e){const t=[];let s=this[0];if(!s)return d([]);for(;s.nextElementSibling;){const a=s.nextElementSibling;e?d(a).is(e)&&t.push(a):t.push(a),s=a}return d(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&d(t.previousElementSibling).is(e)?d([t.previousElementSibling]):d([]):t.previousElementSibling?d([t.previousElementSibling]):d([])}return d([])},prevAll:function(e){const t=[];let s=this[0];if(!s)return d([]);for(;s.previousElementSibling;){const a=s.previousElementSibling;e?d(a).is(e)&&t.push(a):t.push(a),s=a}return d(t)},parent:function(e){const t=[];for(let s=0;s<this.length;s+=1)null!==this[s].parentNode&&(e?d(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode));return d(t)},parents:function(e){const t=[];for(let s=0;s<this.length;s+=1){let a=this[s].parentNode;for(;a;)e?d(a).is(e)&&t.push(a):t.push(a),a=a.parentNode}return d(t)},closest:function(e){let t=this;return void 0===e?d([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let s=0;s<this.length;s+=1){const a=this[s].querySelectorAll(e);for(let e=0;e<a.length;e+=1)t.push(a[e])}return d(t)},children:function(e){const t=[];for(let s=0;s<this.length;s+=1){const a=this[s].children;for(let s=0;s<a.length;s+=1)e&&!d(a[s]).is(e)||t.push(a[s])}return d(t)},filter:function(e){return d(o(this,e))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function p(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function u(){return Date.now()}function h(e,t){void 0===t&&(t="x");const s=r();let a,i,n;const l=function(e){const t=r();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(i=l.transform||l.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),n=new s.WebKitCSSMatrix("none"===i?"":i)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=n.toString().split(",")),"x"===t&&(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function m(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function f(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function g(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let s=1;s<arguments.length;s+=1){const a=s<0||arguments.length<=s?void 0:arguments[s];if(null!=a&&!f(a)){const s=Object.keys(Object(a)).filter((e=>t.indexOf(e)<0));for(let t=0,i=s.length;t<i;t+=1){const i=s[t],r=Object.getOwnPropertyDescriptor(a,i);void 0!==r&&r.enumerable&&(m(e[i])&&m(a[i])?a[i].__swiper__?e[i]=a[i]:g(e[i],a[i]):!m(e[i])&&m(a[i])?(e[i]={},a[i].__swiper__?e[i]=a[i]:g(e[i],a[i])):e[i]=a[i])}}}return e}function v(e,t,s){e.style.setProperty(t,s)}function w(e){let{swiper:t,targetPosition:s,side:a}=e;const i=r(),n=-t.translate;let l,o=null;const d=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=s>n?"next":"prev",p=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{l=(new Date).getTime(),null===o&&(o=l);const e=Math.max(Math.min((l-o)/d,1),0),r=.5-Math.cos(e*Math.PI)/2;let c=n+r*(s-n);if(p(c,s)&&(c=s),t.wrapperEl.scrollTo({[a]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[a]:c})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}let b,x,y;function E(){return b||(b=function(){const e=r(),t=a();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const s=Object.defineProperty({},"passive",{get(){t=!0}});e.addEventListener("testPassiveListener",null,s)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),b}function C(e){return void 0===e&&(e={}),x||(x=function(e){let{userAgent:t}=void 0===e?{}:e;const s=E(),a=r(),i=a.navigator.platform,n=t||a.navigator.userAgent,l={ios:!1,android:!1},o=a.screen.width,d=a.screen.height,c=n.match(/(Android);?[\s\/]+([\d.]+)?/);let p=n.match(/(iPad).*OS\s([\d_]+)/);const u=n.match(/(iPod)(.*OS\s([\d_]+))?/),h=!p&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===i;let f="MacIntel"===i;return!p&&f&&s.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${d}`)>=0&&(p=n.match(/(Version)\/([\d.]+)/),p||(p=[0,1,"13_0_0"]),f=!1),c&&!m&&(l.os="android",l.android=!0),(p||h||u)&&(l.os="ios",l.ios=!0),l}(e)),x}function T(){return y||(y=function(){const e=r();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),y}Object.keys(c).forEach((e=>{Object.defineProperty(d.fn,e,{value:c[e],writable:!0})}));var $={on(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;const i=s?"unshift":"push";return e.split(" ").forEach((e=>{a.eventsListeners[e]||(a.eventsListeners[e]=[]),a.eventsListeners[e][i](t)})),a},once(e,t,s){const a=this;if(!a.eventsListeners||a.destroyed)return a;if("function"!=typeof t)return a;function i(){a.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];t.apply(a,r)}return i.__emitterProxy=t,a.on(e,i,s)},onAny(e,t){const s=this;if(!s.eventsListeners||s.destroyed)return s;if("function"!=typeof e)return s;const a=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[a](e),s},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return!s.eventsListeners||s.destroyed?s:s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&s.eventsListeners[e].splice(i,1)}))})),s):s},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,s,a;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];"string"==typeof r[0]||Array.isArray(r[0])?(t=r[0],s=r.slice(1,r.length),a=e):(t=r[0].events,s=r[0].data,a=r[0].context||e),s.unshift(a);return(Array.isArray(t)?t:t.split(" ")).forEach((t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach((e=>{e.apply(a,[t,...s])})),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach((e=>{e.apply(a,s)}))})),e}};var S={updateSize:function(){const e=this;let t,s;const a=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:a[0].clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:a[0].clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(a.css("padding-left")||0,10)-parseInt(a.css("padding-right")||0,10),s=s-parseInt(a.css("padding-top")||0,10)-parseInt(a.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function s(e,s){return parseFloat(e.getPropertyValue(t(s))||0)}const a=e.params,{$wrapperEl:i,size:r,rtlTranslate:n,wrongRTL:l}=e,o=e.virtual&&a.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,c=i.children(`.${e.params.slideClass}`),p=o?e.virtual.slides.length:c.length;let u=[];const h=[],m=[];let f=a.slidesOffsetBefore;"function"==typeof f&&(f=a.slidesOffsetBefore.call(e));let g=a.slidesOffsetAfter;"function"==typeof g&&(g=a.slidesOffsetAfter.call(e));const w=e.snapGrid.length,b=e.slidesGrid.length;let x=a.spaceBetween,y=-f,E=0,C=0;if(void 0===r)return;"string"==typeof x&&x.indexOf("%")>=0&&(x=parseFloat(x.replace("%",""))/100*r),e.virtualSize=-x,n?c.css({marginLeft:"",marginBottom:"",marginTop:""}):c.css({marginRight:"",marginBottom:"",marginTop:""}),a.centeredSlides&&a.cssMode&&(v(e.wrapperEl,"--swiper-centered-offset-before",""),v(e.wrapperEl,"--swiper-centered-offset-after",""));const T=a.grid&&a.grid.rows>1&&e.grid;let $;T&&e.grid.initSlides(p);const S="auto"===a.slidesPerView&&a.breakpoints&&Object.keys(a.breakpoints).filter((e=>void 0!==a.breakpoints[e].slidesPerView)).length>0;for(let i=0;i<p;i+=1){$=0;const n=c.eq(i);if(T&&e.grid.updateSlide(i,n,p,t),"none"!==n.css("display")){if("auto"===a.slidesPerView){S&&(c[i].style[t("width")]="");const r=getComputedStyle(n[0]),l=n[0].style.transform,o=n[0].style.webkitTransform;if(l&&(n[0].style.transform="none"),o&&(n[0].style.webkitTransform="none"),a.roundLengths)$=e.isHorizontal()?n.outerWidth(!0):n.outerHeight(!0);else{const e=s(r,"width"),t=s(r,"padding-left"),a=s(r,"padding-right"),i=s(r,"margin-left"),l=s(r,"margin-right"),o=r.getPropertyValue("box-sizing");if(o&&"border-box"===o)$=e+i+l;else{const{clientWidth:s,offsetWidth:r}=n[0];$=e+t+a+i+l+(r-s)}}l&&(n[0].style.transform=l),o&&(n[0].style.webkitTransform=o),a.roundLengths&&($=Math.floor($))}else $=(r-(a.slidesPerView-1)*x)/a.slidesPerView,a.roundLengths&&($=Math.floor($)),c[i]&&(c[i].style[t("width")]=`${$}px`);c[i]&&(c[i].swiperSlideSize=$),m.push($),a.centeredSlides?(y=y+$/2+E/2+x,0===E&&0!==i&&(y=y-r/2-x),0===i&&(y=y-r/2-x),Math.abs(y)<.001&&(y=0),a.roundLengths&&(y=Math.floor(y)),C%a.slidesPerGroup==0&&u.push(y),h.push(y)):(a.roundLengths&&(y=Math.floor(y)),(C-Math.min(e.params.slidesPerGroupSkip,C))%e.params.slidesPerGroup==0&&u.push(y),h.push(y),y=y+$+x),e.virtualSize+=$+x,E=$,C+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+g,n&&l&&("slide"===a.effect||"coverflow"===a.effect)&&i.css({width:`${e.virtualSize+a.spaceBetween}px`}),a.setWrapperSize&&i.css({[t("width")]:`${e.virtualSize+a.spaceBetween}px`}),T&&e.grid.updateWrapperSize($,u,t),!a.centeredSlides){const t=[];for(let s=0;s<u.length;s+=1){let i=u[s];a.roundLengths&&(i=Math.floor(i)),u[s]<=e.virtualSize-r&&t.push(i)}u=t,Math.floor(e.virtualSize-r)-Math.floor(u[u.length-1])>1&&u.push(e.virtualSize-r)}if(0===u.length&&(u=[0]),0!==a.spaceBetween){const s=e.isHorizontal()&&n?"marginLeft":t("marginRight");c.filter(((e,t)=>!a.cssMode||t!==c.length-1)).css({[s]:`${x}px`})}if(a.centeredSlides&&a.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(a.spaceBetween?a.spaceBetween:0)})),e-=a.spaceBetween;const t=e-r;u=u.map((e=>e<0?-f:e>t?t+g:e))}if(a.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(a.spaceBetween?a.spaceBetween:0)})),e-=a.spaceBetween,e<r){const t=(r-e)/2;u.forEach(((e,s)=>{u[s]=e-t})),h.forEach(((e,s)=>{h[s]=e+t}))}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:h,slidesSizesGrid:m}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){v(e.wrapperEl,"--swiper-centered-offset-before",-u[0]+"px"),v(e.wrapperEl,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}if(p!==d&&e.emit("slidesLengthChange"),u.length!==w&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),!(o||a.cssMode||"slide"!==a.effect&&"fade"!==a.effect)){const t=`${a.containerModifierClass}backface-hidden`,s=e.$el.hasClass(t);p<=a.maxBackfaceHiddenSlides?s||e.$el.addClass(t):s&&e.$el.removeClass(t)}},updateAutoHeight:function(e){const t=this,s=[],a=t.virtual&&t.params.virtual.enabled;let i,r=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const n=e=>a?t.slides.filter((t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e))[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||d([])).each((e=>{s.push(e)}));else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!a)break;s.push(n(e))}else s.push(n(t.activeIndex));for(i=0;i<s.length;i+=1)if(void 0!==s[i]){const e=s[i].offsetHeight;r=e>r?e:r}(r||0===r)&&t.$wrapperEl.css("height",`${r}px`)},updateSlidesOffset:function(){const e=this,t=e.slides;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,s=t.params,{slides:a,rtlTranslate:i,snapGrid:r}=t;if(0===a.length)return;void 0===a[0].swiperSlideOffset&&t.updateSlidesOffset();let n=-e;i&&(n=e),a.removeClass(s.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let e=0;e<a.length;e+=1){const l=a[e];let o=l.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(o-=a[0].swiperSlideOffset);const d=(n+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),c=(n-r[0]+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),p=-(n-o),u=p+t.slidesSizesGrid[e];(p>=0&&p<t.size-1||u>1&&u<=t.size||p<=0&&u>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),a.eq(e).addClass(s.slideVisibleClass)),l.progress=i?-d:d,l.originalProgress=i?-c:c}t.visibleSlides=d(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:r,isEnd:n}=t;const l=r,o=n;0===a?(i=0,r=!0,n=!0):(i=(e-t.minTranslate())/a,r=i<=0,n=i>=1),Object.assign(t,{progress:i,isBeginning:r,isEnd:n}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),r&&!l&&t.emit("reachBeginning toEdge"),n&&!o&&t.emit("reachEnd toEdge"),(l&&!r||o&&!n)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,$wrapperEl:a,activeIndex:i,realIndex:r}=e,n=e.virtual&&s.virtual.enabled;let l;t.removeClass(`${s.slideActiveClass} ${s.slideNextClass} ${s.slidePrevClass} ${s.slideDuplicateActiveClass} ${s.slideDuplicateNextClass} ${s.slideDuplicatePrevClass}`),l=n?e.$wrapperEl.find(`.${s.slideClass}[data-swiper-slide-index="${i}"]`):t.eq(i),l.addClass(s.slideActiveClass),s.loop&&(l.hasClass(s.slideDuplicateClass)?a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${r}"]`).addClass(s.slideDuplicateActiveClass):a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${r}"]`).addClass(s.slideDuplicateActiveClass));let o=l.nextAll(`.${s.slideClass}`).eq(0).addClass(s.slideNextClass);s.loop&&0===o.length&&(o=t.eq(0),o.addClass(s.slideNextClass));let d=l.prevAll(`.${s.slideClass}`).eq(0).addClass(s.slidePrevClass);s.loop&&0===d.length&&(d=t.eq(-1),d.addClass(s.slidePrevClass)),s.loop&&(o.hasClass(s.slideDuplicateClass)?a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass):a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass),d.hasClass(s.slideDuplicateClass)?a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass):a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:a,snapGrid:i,params:r,activeIndex:n,realIndex:l,snapIndex:o}=t;let d,c=e;if(void 0===c){for(let e=0;e<a.length;e+=1)void 0!==a[e+1]?s>=a[e]&&s<a[e+1]-(a[e+1]-a[e])/2?c=e:s>=a[e]&&s<a[e+1]&&(c=e+1):s>=a[e]&&(c=e);r.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(i.indexOf(s)>=0)d=i.indexOf(s);else{const e=Math.min(r.slidesPerGroupSkip,c);d=e+Math.floor((c-e)/r.slidesPerGroup)}if(d>=i.length&&(d=i.length-1),c===n)return void(d!==o&&(t.snapIndex=d,t.emit("snapIndexChange")));const p=parseInt(t.slides.eq(c).attr("data-swiper-slide-index")||c,10);Object.assign(t,{snapIndex:d,realIndex:p,previousIndex:n,activeIndex:c}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),l!==p&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,a=d(e).closest(`.${s.slideClass}`)[0];let i,r=!1;if(a)for(let e=0;e<t.slides.length;e+=1)if(t.slides[e]===a){r=!0,i=e;break}if(!a||!r)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=a,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(d(a).attr("data-swiper-slide-index"),10):t.clickedIndex=i,s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var M={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:s,translate:a,$wrapperEl:i}=this;if(t.virtualTranslate)return s?-a:a;if(t.cssMode)return a;let r=h(i[0],e);return s&&(r=-r),r||0},setTranslate:function(e,t){const s=this,{rtlTranslate:a,params:i,$wrapperEl:r,wrapperEl:n,progress:l}=s;let o,d=0,c=0;s.isHorizontal()?d=a?-e:e:c=e,i.roundLengths&&(d=Math.floor(d),c=Math.floor(c)),i.cssMode?n[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-d:-c:i.virtualTranslate||r.transform(`translate3d(${d}px, ${c}px, 0px)`),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?d:c;const p=s.maxTranslate()-s.minTranslate();o=0===p?0:(e-s.minTranslate())/p,o!==l&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,s,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),void 0===a&&(a=!0);const r=this,{params:n,wrapperEl:l}=r;if(r.animating&&n.preventInteractionOnTransition)return!1;const o=r.minTranslate(),d=r.maxTranslate();let c;if(c=a&&e>o?o:a&&e<d?d:e,r.updateProgress(c),n.cssMode){const e=r.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return w({swiper:r,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(r.setTransition(0),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,i),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),s&&(r.emit("beforeTransitionStart",t,i),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,s&&r.emit("transitionEnd"))}),r.$wrapperEl[0].addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd))),!0}};function P(e){let{swiper:t,runCallbacks:s,direction:a,step:i}=e;const{activeIndex:r,previousIndex:n}=t;let l=a;if(l||(l=r>n?"next":r<n?"prev":"reset"),t.emit(`transition${i}`),s&&r!==n){if("reset"===l)return void t.emit(`slideResetTransition${i}`);t.emit(`slideChangeTransition${i}`),"next"===l?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`)}}var k={slideTo:function(e,t,s,a,i){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"number"!=typeof e&&"string"!=typeof e)throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`);if("string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=t}const r=this;let n=e;n<0&&(n=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:h,enabled:m}=r;if(r.animating&&l.preventInteractionOnTransition||!m&&!a&&!i)return!1;const f=Math.min(r.params.slidesPerGroupSkip,n);let g=f+Math.floor((n-f)/r.params.slidesPerGroup);g>=o.length&&(g=o.length-1);const v=-o[g];if(l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),s=Math.floor(100*d[e]),a=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<a-(a-s)/2?n=e:t>=s&&t<a&&(n=e+1):t>=s&&(n=e)}if(r.initialized&&n!==p){if(!r.allowSlideNext&&v<r.translate&&v<r.minTranslate())return!1;if(!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(p||0)!==n)return!1}let b;if(n!==(c||0)&&s&&r.emit("beforeSlideChangeStart"),r.updateProgress(v),b=n>p?"next":n<p?"prev":"reset",u&&-v===r.translate||!u&&v===r.translate)return r.updateActiveIndex(n),l.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==l.effect&&r.setTranslate(v),"reset"!==b&&(r.transitionStart(s,b),r.transitionEnd(s,b)),!1;if(l.cssMode){const e=r.isHorizontal(),s=u?v:-v;if(0===t){const t=r.virtual&&r.params.virtual.enabled;t&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),h[e?"scrollLeft":"scrollTop"]=s,t&&requestAnimationFrame((()=>{r.wrapperEl.style.scrollSnapType="",r._swiperImmediateVirtual=!1}))}else{if(!r.support.smoothScroll)return w({swiper:r,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,a),r.transitionStart(s,b),0===t?r.transitionEnd(s,b):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(s,b))}),r.$wrapperEl[0].addEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,s,a){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===s&&(s=!0),"string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=t}const i=this;let r=e;return i.params.loop&&(r+=i.loopedSlides),i.slideTo(r,t,s,a)},slideNext:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const a=this,{animating:i,enabled:r,params:n}=a;if(!r)return a;let l=n.slidesPerGroup;"auto"===n.slidesPerView&&1===n.slidesPerGroup&&n.slidesPerGroupAuto&&(l=Math.max(a.slidesPerViewDynamic("current",!0),1));const o=a.activeIndex<n.slidesPerGroupSkip?1:l;if(n.loop){if(i&&n.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}return n.rewind&&a.isEnd?a.slideTo(0,e,t,s):a.slideTo(a.activeIndex+o,e,t,s)},slidePrev:function(e,t,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);const a=this,{params:i,animating:r,snapGrid:n,slidesGrid:l,rtlTranslate:o,enabled:d}=a;if(!d)return a;if(i.loop){if(r&&i.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=c(o?a.translate:-a.translate),u=n.map((e=>c(e)));let h=n[u.indexOf(p)-1];if(void 0===h&&i.cssMode){let e;n.forEach(((t,s)=>{p>=t&&(e=s)})),void 0!==e&&(h=n[e>0?e-1:e])}let m=0;if(void 0!==h&&(m=l.indexOf(h),m<0&&(m=a.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(m=m-a.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.rewind&&a.isBeginning){const i=a.params.virtual&&a.params.virtual.enabled&&a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(i,e,t,s)}return a.slideTo(m,e,t,s)},slideReset:function(e,t,s){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e,t,s,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===a&&(a=.5);const i=this;let r=i.activeIndex;const n=Math.min(i.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/i.params.slidesPerGroup),o=i.rtlTranslate?i.translate:-i.translate;if(o>=i.snapGrid[l]){const e=i.snapGrid[l];o-e>(i.snapGrid[l+1]-e)*a&&(r+=i.params.slidesPerGroup)}else{const e=i.snapGrid[l-1];o-e<=(i.snapGrid[l]-e)*a&&(r-=i.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,i.slidesGrid.length-1),i.slideTo(r,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:s}=e,a="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,r=e.clickedIndex;if(t.loop){if(e.animating)return;i=parseInt(d(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-a/2||r>e.slides.length-e.loopedSlides+a/2?(e.loopFix(),r=s.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),p((()=>{e.slideTo(r)}))):e.slideTo(r):r>e.slides.length-a?(e.loopFix(),r=s.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),p((()=>{e.slideTo(r)}))):e.slideTo(r)}else e.slideTo(r)}};var z={loopCreate:function(){const e=this,t=a(),{params:s,$wrapperEl:i}=e,r=i.children().length>0?d(i.children()[0].parentNode):i;r.children(`.${s.slideClass}.${s.slideDuplicateClass}`).remove();let n=r.children(`.${s.slideClass}`);if(s.loopFillGroupWithBlank){const e=s.slidesPerGroup-n.length%s.slidesPerGroup;if(e!==s.slidesPerGroup){for(let a=0;a<e;a+=1){const e=d(t.createElement("div")).addClass(`${s.slideClass} ${s.slideBlankClass}`);r.append(e)}n=r.children(`.${s.slideClass}`)}}"auto"!==s.slidesPerView||s.loopedSlides||(s.loopedSlides=n.length),e.loopedSlides=Math.ceil(parseFloat(s.loopedSlides||s.slidesPerView,10)),e.loopedSlides+=s.loopAdditionalSlides,e.loopedSlides>n.length&&e.params.loopedSlidesLimit&&(e.loopedSlides=n.length);const l=[],o=[];n.each(((e,t)=>{d(e).attr("data-swiper-slide-index",t)}));for(let t=0;t<e.loopedSlides;t+=1){const e=t-Math.floor(t/n.length)*n.length;o.push(n.eq(e)[0]),l.unshift(n.eq(n.length-e-1)[0])}for(let e=0;e<o.length;e+=1)r.append(d(o[e].cloneNode(!0)).addClass(s.slideDuplicateClass));for(let e=l.length-1;e>=0;e-=1)r.prepend(d(l[e].cloneNode(!0)).addClass(s.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:s,loopedSlides:a,allowSlidePrev:i,allowSlideNext:r,snapGrid:n,rtlTranslate:l}=e;let o;e.allowSlidePrev=!0,e.allowSlideNext=!0;const d=-n[t]-e.getTranslate();if(t<a){o=s.length-3*a+t,o+=a;e.slideTo(o,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)}else if(t>=s.length-a){o=-s.length+t+a,o+=a;e.slideTo(o,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)}e.allowSlidePrev=i,e.allowSlideNext=r,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:s}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),s.removeAttr("data-swiper-slide-index")}};function L(e){const t=this,s=a(),i=r(),n=t.touchEventsData,{params:l,touches:o,enabled:c}=t;if(!c)return;if(t.animating&&l.preventInteractionOnTransition)return;!t.animating&&l.cssMode&&l.loop&&t.loopFix();let p=e;p.originalEvent&&(p=p.originalEvent);let h=d(p.target);if("wrapper"===l.touchEventsTarget&&!h.closest(t.wrapperEl).length)return;if(n.isTouchEvent="touchstart"===p.type,!n.isTouchEvent&&"which"in p&&3===p.which)return;if(!n.isTouchEvent&&"button"in p&&p.button>0)return;if(n.isTouched&&n.isMoved)return;const m=!!l.noSwipingClass&&""!==l.noSwipingClass,f=e.composedPath?e.composedPath():e.path;m&&p.target&&p.target.shadowRoot&&f&&(h=d(f[0]));const g=l.noSwipingSelector?l.noSwipingSelector:`.${l.noSwipingClass}`,v=!(!p.target||!p.target.shadowRoot);if(l.noSwiping&&(v?function(e,t){return void 0===t&&(t=this),function t(s){if(!s||s===a()||s===r())return null;s.assignedSlot&&(s=s.assignedSlot);const i=s.closest(e);return i||s.getRootNode?i||t(s.getRootNode().host):null}(t)}(g,h[0]):h.closest(g)[0]))return void(t.allowClick=!0);if(l.swipeHandler&&!h.closest(l.swipeHandler)[0])return;o.currentX="touchstart"===p.type?p.targetTouches[0].pageX:p.pageX,o.currentY="touchstart"===p.type?p.targetTouches[0].pageY:p.pageY;const w=o.currentX,b=o.currentY,x=l.edgeSwipeDetection||l.iOSEdgeSwipeDetection,y=l.edgeSwipeThreshold||l.iOSEdgeSwipeThreshold;if(x&&(w<=y||w>=i.innerWidth-y)){if("prevent"!==x)return;e.preventDefault()}if(Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=w,o.startY=b,n.touchStartTime=u(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,l.threshold>0&&(n.allowThresholdMove=!1),"touchstart"!==p.type){let e=!0;h.is(n.focusableElements)&&(e=!1,"SELECT"===h[0].nodeName&&(n.isTouched=!1)),s.activeElement&&d(s.activeElement).is(n.focusableElements)&&s.activeElement!==h[0]&&s.activeElement.blur();const a=e&&t.allowTouchMove&&l.touchStartPreventDefault;!l.touchStartForcePreventDefault&&!a||h[0].isContentEditable||p.preventDefault()}t.params.freeMode&&t.params.freeMode.enabled&&t.freeMode&&t.animating&&!l.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",p)}function O(e){const t=a(),s=this,i=s.touchEventsData,{params:r,touches:n,rtlTranslate:l,enabled:o}=s;if(!o)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),!i.isTouched)return void(i.startMoving&&i.isScrolling&&s.emit("touchMoveOpposite",c));if(i.isTouchEvent&&"touchmove"!==c.type)return;const p="touchmove"===c.type&&c.targetTouches&&(c.targetTouches[0]||c.changedTouches[0]),h="touchmove"===c.type?p.pageX:c.pageX,m="touchmove"===c.type?p.pageY:c.pageY;if(c.preventedByNestedSwiper)return n.startX=h,void(n.startY=m);if(!s.allowTouchMove)return d(c.target).is(i.focusableElements)||(s.allowClick=!1),void(i.isTouched&&(Object.assign(n,{startX:h,startY:m,currentX:h,currentY:m}),i.touchStartTime=u()));if(i.isTouchEvent&&r.touchReleaseOnEdges&&!r.loop)if(s.isVertical()){if(m<n.startY&&s.translate<=s.maxTranslate()||m>n.startY&&s.translate>=s.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(h<n.startX&&s.translate<=s.maxTranslate()||h>n.startX&&s.translate>=s.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&c.target===t.activeElement&&d(c.target).is(i.focusableElements))return i.isMoved=!0,void(s.allowClick=!1);if(i.allowTouchCallbacks&&s.emit("touchMove",c),c.targetTouches&&c.targetTouches.length>1)return;n.currentX=h,n.currentY=m;const f=n.currentX-n.startX,g=n.currentY-n.startY;if(s.params.threshold&&Math.sqrt(f**2+g**2)<s.params.threshold)return;if(void 0===i.isScrolling){let e;s.isHorizontal()&&n.currentY===n.startY||s.isVertical()&&n.currentX===n.startX?i.isScrolling=!1:f*f+g*g>=25&&(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,i.isScrolling=s.isHorizontal()?e>r.touchAngle:90-e>r.touchAngle)}if(i.isScrolling&&s.emit("touchMoveOpposite",c),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling)return void(i.isTouched=!1);if(!i.startMoving)return;s.allowClick=!1,!r.cssMode&&c.cancelable&&c.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&c.stopPropagation(),i.isMoved||(r.loop&&!r.cssMode&&s.loopFix(),i.startTranslate=s.getTranslate(),s.setTransition(0),s.animating&&s.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!r.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",c)),s.emit("sliderMove",c),i.isMoved=!0;let v=s.isHorizontal()?f:g;n.diff=v,v*=r.touchRatio,l&&(v=-v),s.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;let w=!0,b=r.resistanceRatio;if(r.touchReleaseOnEdges&&(b=0),v>0&&i.currentTranslate>s.minTranslate()?(w=!1,r.resistance&&(i.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+i.startTranslate+v)**b)):v<0&&i.currentTranslate<s.maxTranslate()&&(w=!1,r.resistance&&(i.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-i.startTranslate-v)**b)),w&&(c.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),s.allowSlidePrev||s.allowSlideNext||(i.currentTranslate=i.startTranslate),r.threshold>0){if(!(Math.abs(v)>r.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=s.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&&!r.cssMode&&((r.freeMode&&r.freeMode.enabled&&s.freeMode||r.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),s.params.freeMode&&r.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(i.currentTranslate),s.setTranslate(i.currentTranslate))}function I(e){const t=this,s=t.touchEventsData,{params:a,touches:i,rtlTranslate:r,slidesGrid:n,enabled:l}=t;if(!l)return;let o=e;if(o.originalEvent&&(o=o.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",o),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&a.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);a.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=u(),c=d-s.touchStartTime;if(t.allowClick){const e=o.path||o.composedPath&&o.composedPath();t.updateClickedSlide(e&&e[0]||o.target),t.emit("tap click",o),c<300&&d-s.lastClickTime<300&&t.emit("doubleTap doubleClick",o)}if(s.lastClickTime=u(),p((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===i.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let h;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,h=a.followFinger?r?t.translate:-t.translate:-s.currentTranslate,a.cssMode)return;if(t.params.freeMode&&a.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});let m=0,f=t.slidesSizesGrid[0];for(let e=0;e<n.length;e+=e<a.slidesPerGroupSkip?1:a.slidesPerGroup){const t=e<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;void 0!==n[e+t]?h>=n[e]&&h<n[e+t]&&(m=e,f=n[e+t]-n[e]):h>=n[e]&&(m=e,f=n[n.length-1]-n[n.length-2])}let g=null,v=null;a.rewind&&(t.isBeginning?v=t.params.virtual&&t.params.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const w=(h-n[m])/f,b=m<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(c>a.longSwipesMs){if(!a.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(w>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?g:m+b):t.slideTo(m)),"prev"===t.swipeDirection&&(w>1-a.longSwipesRatio?t.slideTo(m+b):null!==v&&w<0&&Math.abs(w)>a.longSwipesRatio?t.slideTo(v):t.slideTo(m))}else{if(!a.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(o.target===t.navigation.nextEl||o.target===t.navigation.prevEl)?o.target===t.navigation.nextEl?t.slideTo(m+b):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(null!==g?g:m+b),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:m))}}function A(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:i,snapGrid:r}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=i,e.allowSlideNext=a,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function D(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function G(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:a}=e;if(!a)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const r=e.maxTranslate()-e.minTranslate();i=0===r?0:(e.translate-e.minTranslate())/r,i!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let N=!1;function B(){}const H=(e,t)=>{const s=a(),{params:i,touchEvents:r,el:n,wrapperEl:l,device:o,support:d}=e,c=!!i.nested,p="on"===t?"addEventListener":"removeEventListener",u=t;if(d.touch){const t=!("touchstart"!==r.start||!d.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};n[p](r.start,e.onTouchStart,t),n[p](r.move,e.onTouchMove,d.passiveListener?{passive:!1,capture:c}:c),n[p](r.end,e.onTouchEnd,t),r.cancel&&n[p](r.cancel,e.onTouchEnd,t)}else n[p](r.start,e.onTouchStart,!1),s[p](r.move,e.onTouchMove,c),s[p](r.end,e.onTouchEnd,!1);(i.preventClicks||i.preventClicksPropagation)&&n[p]("click",e.onClick,!0),i.cssMode&&l[p]("scroll",e.onScroll),i.updateOnWindowResize?e[u](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",A,!0):e[u]("observerUpdate",A,!0)};var X={attachEvents:function(){const e=this,t=a(),{params:s,support:i}=e;e.onTouchStart=L.bind(e),e.onTouchMove=O.bind(e),e.onTouchEnd=I.bind(e),s.cssMode&&(e.onScroll=G.bind(e)),e.onClick=D.bind(e),i.touch&&!N&&(t.addEventListener("touchstart",B),N=!0),H(e,"on")},detachEvents:function(){H(this,"off")}};const Y=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var R={addClasses:function(){const e=this,{classNames:t,params:s,rtl:a,$el:i,device:r,support:n}=e,l=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((a=>{e[a]&&s.push(t+a)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"pointer-events":!n.touch},{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:a},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:r.android},{ios:r.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides},{"watch-progress":s.watchSlidesProgress}],s.containerModifierClass);t.push(...l),i.addClass([...t].join(" ")),e.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}};var W={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:!0,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function q(e,t){return function(s){void 0===s&&(s={});const a=Object.keys(s)[0],i=s[a];"object"==typeof i&&null!==i?(["navigation","pagination","scrollbar"].indexOf(a)>=0&&!0===e[a]&&(e[a]={auto:!0}),a in e&&"enabled"in i?(!0===e[a]&&(e[a]={enabled:!0}),"object"!=typeof e[a]||"enabled"in e[a]||(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),g(t,s)):g(t,s)):g(t,s)}}const j={eventsEmitter:$,update:S,translate:M,transition:{setTransition:function(e,t){const s=this;s.params.cssMode||s.$wrapperEl.transition(e),s.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;a.cssMode||(a.autoHeight&&s.updateAutoHeight(),P({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const s=this,{params:a}=s;s.animating=!1,a.cssMode||(s.setTransition(0),P({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:k,loop:z,grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;s.style.cursor="move",s.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:X,breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:s,loopedSlides:a=0,params:i,$el:r}=e,n=i.breakpoints;if(!n||n&&0===Object.keys(n).length)return;const l=e.getBreakpoint(n,e.params.breakpointsBase,e.el);if(!l||e.currentBreakpoint===l)return;const o=(l in n?n[l]:void 0)||e.originalParams,d=Y(e,i),c=Y(e,o),p=i.enabled;d&&!c?(r.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&c&&(r.addClass(`${i.containerModifierClass}grid`),(o.grid.fill&&"column"===o.grid.fill||!o.grid.fill&&"column"===i.grid.fill)&&r.addClass(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach((t=>{const s=i[t]&&i[t].enabled,a=o[t]&&o[t].enabled;s&&!a&&e[t].disable(),!s&&a&&e[t].enable()}));const u=o.direction&&o.direction!==i.direction,h=i.loop&&(o.slidesPerView!==i.slidesPerView||u);u&&s&&e.changeDirection(),g(e.params,o);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!m?e.disable():!p&&m&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",o),h&&s&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-a+e.loopedSlides,0,!1)),e.emit("breakpoint",o)},getBreakpoint:function(e,t,s){if(void 0===t&&(t="window"),!e||"container"===t&&!s)return;let a=!1;const i=r(),n="window"===t?i.innerHeight:s.clientHeight,l=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:n*t,point:e}}return{value:e,point:e}}));l.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<l.length;e+=1){const{point:r,value:n}=l[e];"window"===t?i.matchMedia(`(min-width: ${n}px)`).matches&&(a=r):n<=s.clientWidth&&(a=r)}return a||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:a}=s;if(a){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*a;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:R,images:{loadImage:function(e,t,s,a,i,n){const l=r();let o;function c(){n&&n()}d(e).parent("picture")[0]||e.complete&&i?c():t?(o=new l.Image,o.onload=c,o.onerror=c,a&&(o.sizes=a),s&&(o.srcset=s),t&&(o.src=t)):c()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let s=0;s<e.imagesToLoad.length;s+=1){const a=e.imagesToLoad[s];e.loadImage(a,a.currentSrc||a.getAttribute("src"),a.srcset||a.getAttribute("srcset"),a.sizes||a.getAttribute("sizes"),!0,t)}}}},_={};class V{constructor(){let e,t;for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];if(1===a.length&&a[0].constructor&&"Object"===Object.prototype.toString.call(a[0]).slice(8,-1)?t=a[0]:[e,t]=a,t||(t={}),t=g({},t),e&&!t.el&&(t.el=e),t.el&&d(t.el).length>1){const e=[];return d(t.el).each((s=>{const a=g({},t,{el:s});e.push(new V(a))})),e}const r=this;r.__swiper__=!0,r.support=E(),r.device=C({userAgent:t.userAgent}),r.browser=T(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],t.modules&&Array.isArray(t.modules)&&r.modules.push(...t.modules);const n={};r.modules.forEach((e=>{e({swiper:r,extendParams:q(t,n),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})}));const l=g({},W,n);return r.params=g({},l,_,t),r.originalParams=g({},r.params),r.passedParams=g({},t),r.params&&r.params.on&&Object.keys(r.params.on).forEach((e=>{r.on(e,r.params.on[e])})),r.params&&r.params.onAny&&r.onAny(r.params.onAny),r.$=d,Object.assign(r,{enabled:r.params.enabled,el:e,classNames:[],slides:d(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===r.params.direction,isVertical:()=>"vertical"===r.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return r.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},r.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},r.support.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:u(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const a=s.minTranslate(),i=(s.maxTranslate()-a)*e+a;s.translateTo(i,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each((s=>{const a=e.getSlideClasses(s);t.push({slideEl:s,classNames:a}),e.emit("_slideClass",s,a)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:s,slides:a,slidesGrid:i,slidesSizesGrid:r,size:n,activeIndex:l}=this;let o=1;if(s.centeredSlides){let e,t=a[l].swiperSlideSize;for(let s=l+1;s<a.length;s+=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0));for(let s=l-1;s>=0;s-=1)a[s]&&!e&&(t+=a[s].swiperSlideSize,o+=1,t>n&&(e=!0))}else if("current"===e)for(let e=l+1;e<a.length;e+=1){(t?i[e]+r[e]-i[l]<n:i[e]-i[l]<n)&&(o+=1)}else for(let e=l-1;e>=0;e-=1){i[l]-i[e]<n&&(o+=1)}return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function a(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let i;s.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode&&e.params.freeMode.enabled?(a(),e.params.autoHeight&&e.updateAutoHeight()):(i=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),i||a()),s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const s=this,a=s.params.direction;return e||(e="horizontal"===a?"vertical":"horizontal"),e===a||"horizontal"!==e&&"vertical"!==e||(s.$el.removeClass(`${s.params.containerModifierClass}${a}`).addClass(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.each((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.$el.addClass(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.$el.removeClass(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;const s=d(e||t.params.el);if(!(e=s[0]))return!1;e.swiper=t;const i=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let r=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=d(e.shadowRoot.querySelector(i()));return t.children=e=>s.children(e),t}return s.children?s.children(i()):d(s).children(i())})();if(0===r.length&&t.params.createElements){const e=a().createElement("div");r=d(e),e.className=t.params.wrapperClass,s.append(e),s.children(`.${t.params.slideClass}`).each((e=>{r.append(e)}))}return Object.assign(t,{$el:s,el:e,$wrapperEl:r,wrapperEl:r[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction")),wrongRTL:"-webkit-box"===r.css("display")}),!0}init(e){const t=this;if(t.initialized)return t;return!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const s=this,{params:a,$el:i,$wrapperEl:r,slides:n}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),a.loop&&s.loopDestroy(),t&&(s.removeClasses(),i.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){g(_,e)}static get extendedDefaults(){return _}static get defaults(){return W}static installModule(e){V.prototype.__modules__||(V.prototype.__modules__=[]);const t=V.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>V.installModule(e))),V):(V.installModule(e),V)}}function F(e,t,s,i){const r=a();return e.params.createElements&&Object.keys(i).forEach((a=>{if(!s[a]&&!0===s.auto){let n=e.$el.children(`.${i[a]}`)[0];n||(n=r.createElement("div"),n.className=i[a],e.$el.append(n)),s[a]=n,t[a]=n}})),s}function U(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function K(e){const t=this,{$wrapperEl:s,params:a}=t;if(a.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&s.append(e[t]);else s.append(e);a.loop&&t.loopCreate(),a.observer||t.update()}function Z(e){const t=this,{params:s,$wrapperEl:a,activeIndex:i}=t;s.loop&&t.loopDestroy();let r=i+1;if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&a.prepend(e[t]);r=i+e.length}else a.prepend(e);s.loop&&t.loopCreate(),s.observer||t.update(),t.slideTo(r,0,!1)}function Q(e,t){const s=this,{$wrapperEl:a,params:i,activeIndex:r}=s;let n=r;i.loop&&(n-=s.loopedSlides,s.loopDestroy(),s.slides=a.children(`.${i.slideClass}`));const l=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=l)return void s.appendSlide(t);let o=n>e?n+1:n;const d=[];for(let t=l-1;t>=e;t-=1){const e=s.slides.eq(t);e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&a.append(t[e]);o=n>e?n+t.length:n}else a.append(t);for(let e=0;e<d.length;e+=1)a.append(d[e]);i.loop&&s.loopCreate(),i.observer||s.update(),i.loop?s.slideTo(o+s.loopedSlides,0,!1):s.slideTo(o,0,!1)}function J(e){const t=this,{params:s,$wrapperEl:a,activeIndex:i}=t;let r=i;s.loop&&(r-=t.loopedSlides,t.loopDestroy(),t.slides=a.children(`.${s.slideClass}`));let n,l=r;if("object"==typeof e&&"length"in e){for(let s=0;s<e.length;s+=1)n=e[s],t.slides[n]&&t.slides.eq(n).remove(),n<l&&(l-=1);l=Math.max(l,0)}else n=e,t.slides[n]&&t.slides.eq(n).remove(),n<l&&(l-=1),l=Math.max(l,0);s.loop&&t.loopCreate(),s.observer||t.update(),s.loop?t.slideTo(l+t.loopedSlides,0,!1):t.slideTo(l,0,!1)}function ee(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}function te(e){const{effect:t,swiper:s,on:a,setTranslate:i,setTransition:r,overwriteParams:n,perspective:l,recreateShadows:o,getEffectParams:d}=e;let c;a("beforeInit",(()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=n?n():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),a("setTranslate",(()=>{s.params.effect===t&&i()})),a("setTransition",((e,a)=>{s.params.effect===t&&r(a)})),a("transitionEnd",(()=>{if(s.params.effect===t&&o){if(!d||!d().slideShadows)return;s.slides.each((e=>{s.$(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").remove()})),o()}})),a("virtualUpdate",(()=>{s.params.effect===t&&(s.slides.length||(c=!0),requestAnimationFrame((()=>{c&&s.slides&&s.slides.length&&(i(),c=!1)})))}))}function se(e,t){return e.transformEl?t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):t}function ae(e){let{swiper:t,duration:s,transformEl:a,allSlides:i}=e;const{slides:r,activeIndex:n,$wrapperEl:l}=t;if(t.params.virtualTranslate&&0!==s){let e,s=!1;e=i?a?r.find(a):r:a?r.eq(n).find(a):r.eq(n),e.transitionEnd((()=>{if(s)return;if(!t||t.destroyed)return;s=!0,t.animating=!1;const e=["webkitTransitionEnd","transitionend"];for(let t=0;t<e.length;t+=1)l.trigger(e[t])}))}}function ie(e,t,s){const a="swiper-slide-shadow"+(s?`-${s}`:""),i=e.transformEl?t.find(e.transformEl):t;let r=i.children(`.${a}`);return r.length||(r=d(`<div class="swiper-slide-shadow${s?`-${s}`:""}"></div>`),i.append(r)),r}Object.keys(j).forEach((e=>{Object.keys(j[e]).forEach((t=>{V.prototype[t]=j[e][t]}))})),V.use([function(e){let{swiper:t,on:s,emit:a}=e;const i=r();let n=null,l=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(a("beforeResize"),a("resize"))},d=()=>{t&&!t.destroyed&&t.initialized&&a("orientationchange")};s("init",(()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(n=new ResizeObserver((e=>{l=i.requestAnimationFrame((()=>{const{width:s,height:a}=t;let i=s,r=a;e.forEach((e=>{let{contentBoxSize:s,contentRect:a,target:n}=e;n&&n!==t.el||(i=a?a.width:(s[0]||s).inlineSize,r=a?a.height:(s[0]||s).blockSize)})),i===s&&r===a||o()}))})),n.observe(t.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",d))})),s("destroy",(()=>{l&&i.cancelAnimationFrame(l),n&&n.unobserve&&t.el&&(n.unobserve(t.el),n=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",d)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=[],l=r(),o=function(e,t){void 0===t&&(t={});const s=new(l.MutationObserver||l.WebkitMutationObserver)((e=>{if(1===e.length)return void i("observerUpdate",e[0]);const t=function(){i("observerUpdate",e[0])};l.requestAnimationFrame?l.requestAnimationFrame(t):l.setTimeout(t,0)}));s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),n.push(s)};s({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",(()=>{if(t.params.observer){if(t.params.observeParents){const e=t.$el.parents();for(let t=0;t<e.length;t+=1)o(e[t])}o(t.$el[0],{childList:t.params.observeSlideChildren}),o(t.$wrapperEl[0],{attributes:!1})}})),a("destroy",(()=>{n.forEach((e=>{e.disconnect()})),n.splice(0,n.length)}))}]);const re=[function(e){let t,{swiper:s,extendParams:a,on:i,emit:r}=e;function n(e,t){const a=s.params.virtual;if(a.cache&&s.virtual.cache[t])return s.virtual.cache[t];const i=a.renderSlide?d(a.renderSlide.call(s,e,t)):d(`<div class="${s.params.slideClass}" data-swiper-slide-index="${t}">${e}</div>`);return i.attr("data-swiper-slide-index")||i.attr("data-swiper-slide-index",t),a.cache&&(s.virtual.cache[t]=i),i}function l(e){const{slidesPerView:t,slidesPerGroup:a,centeredSlides:i}=s.params,{addSlidesBefore:l,addSlidesAfter:o}=s.params.virtual,{from:d,to:c,slides:p,slidesGrid:u,offset:h}=s.virtual;s.params.cssMode||s.updateActiveIndex();const m=s.activeIndex||0;let f,g,v;f=s.rtlTranslate?"right":s.isHorizontal()?"left":"top",i?(g=Math.floor(t/2)+a+o,v=Math.floor(t/2)+a+l):(g=t+(a-1)+o,v=a+l);const w=Math.max((m||0)-v,0),b=Math.min((m||0)+g,p.length-1),x=(s.slidesGrid[w]||0)-(s.slidesGrid[0]||0);function y(){s.updateSlides(),s.updateProgress(),s.updateSlidesClasses(),s.lazy&&s.params.lazy.enabled&&s.lazy.load(),r("virtualUpdate")}if(Object.assign(s.virtual,{from:w,to:b,offset:x,slidesGrid:s.slidesGrid}),d===w&&c===b&&!e)return s.slidesGrid!==u&&x!==h&&s.slides.css(f,`${x}px`),s.updateProgress(),void r("virtualUpdate");if(s.params.virtual.renderExternal)return s.params.virtual.renderExternal.call(s,{offset:x,from:w,to:b,slides:function(){const e=[];for(let t=w;t<=b;t+=1)e.push(p[t]);return e}()}),void(s.params.virtual.renderExternalUpdate?y():r("virtualUpdate"));const E=[],C=[];if(e)s.$wrapperEl.find(`.${s.params.slideClass}`).remove();else for(let e=d;e<=c;e+=1)(e<w||e>b)&&s.$wrapperEl.find(`.${s.params.slideClass}[data-swiper-slide-index="${e}"]`).remove();for(let t=0;t<p.length;t+=1)t>=w&&t<=b&&(void 0===c||e?C.push(t):(t>c&&C.push(t),t<d&&E.push(t)));C.forEach((e=>{s.$wrapperEl.append(n(p[e],e))})),E.sort(((e,t)=>t-e)).forEach((e=>{s.$wrapperEl.prepend(n(p[e],e))})),s.$wrapperEl.children(".swiper-slide").css(f,`${x}px`),y()}a({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),s.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},i("beforeInit",(()=>{s.params.virtual.enabled&&(s.virtual.slides=s.params.virtual.slides,s.classNames.push(`${s.params.containerModifierClass}virtual`),s.params.watchSlidesProgress=!0,s.originalParams.watchSlidesProgress=!0,s.params.initialSlide||l())})),i("setTranslate",(()=>{s.params.virtual.enabled&&(s.params.cssMode&&!s._immediateVirtual?(clearTimeout(t),t=setTimeout((()=>{l()}),100)):l())})),i("init update resize",(()=>{s.params.virtual.enabled&&s.params.cssMode&&v(s.wrapperEl,"--swiper-virtual-size",`${s.virtualSize}px`)})),Object.assign(s.virtual,{appendSlide:function(e){if("object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&s.virtual.slides.push(e[t]);else s.virtual.slides.push(e);l(!0)},prependSlide:function(e){const t=s.activeIndex;let a=t+1,i=1;if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)e[t]&&s.virtual.slides.unshift(e[t]);a=t+e.length,i=e.length}else s.virtual.slides.unshift(e);if(s.params.virtual.cache){const e=s.virtual.cache,t={};Object.keys(e).forEach((s=>{const a=e[s],r=a.attr("data-swiper-slide-index");r&&a.attr("data-swiper-slide-index",parseInt(r,10)+i),t[parseInt(s,10)+i]=a})),s.virtual.cache=t}l(!0),s.slideTo(a,0)},removeSlide:function(e){if(null==e)return;let t=s.activeIndex;if(Array.isArray(e))for(let a=e.length-1;a>=0;a-=1)s.virtual.slides.splice(e[a],1),s.params.virtual.cache&&delete s.virtual.cache[e[a]],e[a]<t&&(t-=1),t=Math.max(t,0);else s.virtual.slides.splice(e,1),s.params.virtual.cache&&delete s.virtual.cache[e],e<t&&(t-=1),t=Math.max(t,0);l(!0),s.slideTo(t,0)},removeAllSlides:function(){s.virtual.slides=[],s.params.virtual.cache&&(s.virtual.cache={}),l(!0),s.slideTo(0,0)},update:l})},function(e){let{swiper:t,extendParams:s,on:i,emit:n}=e;const l=a(),o=r();function c(e){if(!t.enabled)return;const{rtlTranslate:s}=t;let a=e;a.originalEvent&&(a=a.originalEvent);const i=a.keyCode||a.charCode,r=t.params.keyboard.pageUpDown,d=r&&33===i,c=r&&34===i,p=37===i,u=39===i,h=38===i,m=40===i;if(!t.allowSlideNext&&(t.isHorizontal()&&u||t.isVertical()&&m||c))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&p||t.isVertical()&&h||d))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||l.activeElement&&l.activeElement.nodeName&&("input"===l.activeElement.nodeName.toLowerCase()||"textarea"===l.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(d||c||p||u||h||m)){let e=!1;if(t.$el.parents(`.${t.params.slideClass}`).length>0&&0===t.$el.parents(`.${t.params.slideActiveClass}`).length)return;const a=t.$el,i=a[0].clientWidth,r=a[0].clientHeight,n=o.innerWidth,l=o.innerHeight,d=t.$el.offset();s&&(d.left-=t.$el[0].scrollLeft);const c=[[d.left,d.top],[d.left+i,d.top],[d.left,d.top+r],[d.left+i,d.top+r]];for(let t=0;t<c.length;t+=1){const s=c[t];if(s[0]>=0&&s[0]<=n&&s[1]>=0&&s[1]<=l){if(0===s[0]&&0===s[1])continue;e=!0}}if(!e)return}t.isHorizontal()?((d||c||p||u)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),((c||u)&&!s||(d||p)&&s)&&t.slideNext(),((d||p)&&!s||(c||u)&&s)&&t.slidePrev()):((d||c||h||m)&&(a.preventDefault?a.preventDefault():a.returnValue=!1),(c||m)&&t.slideNext(),(d||h)&&t.slidePrev()),n("keyPress",i)}}function p(){t.keyboard.enabled||(d(l).on("keydown",c),t.keyboard.enabled=!0)}function u(){t.keyboard.enabled&&(d(l).off("keydown",c),t.keyboard.enabled=!1)}t.keyboard={enabled:!1},s({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}}),i("init",(()=>{t.params.keyboard.enabled&&p()})),i("destroy",(()=>{t.keyboard.enabled&&u()})),Object.assign(t.keyboard,{enable:p,disable:u})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();let l;s({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),t.mousewheel={enabled:!1};let o,c=u();const h=[];function m(){t.enabled&&(t.mouseEntered=!0)}function f(){t.enabled&&(t.mouseEntered=!1)}function g(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&u()-c<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&u()-c<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),i("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),i("scroll",e.raw)),c=(new n.Date).getTime(),!1)))}function v(e){let s=e,a=!0;if(!t.enabled)return;const r=t.params.mousewheel;t.params.cssMode&&s.preventDefault();let n=t.$el;if("container"!==t.params.mousewheel.eventsTarget&&(n=d(t.params.mousewheel.eventsTarget)),!t.mouseEntered&&!n[0].contains(s.target)&&!r.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let c=0;const m=t.rtlTranslate?-1:1,f=function(e){let t=0,s=0,a=0,i=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),a=10*t,i=10*s,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(a=e.deltaX),e.shiftKey&&!a&&(a=i,i=0),(a||i)&&e.deltaMode&&(1===e.deltaMode?(a*=40,i*=40):(a*=800,i*=800)),a&&!t&&(t=a<1?-1:1),i&&!s&&(s=i<1?-1:1),{spinX:t,spinY:s,pixelX:a,pixelY:i}}(s);if(r.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(f.pixelX)>Math.abs(f.pixelY)))return!0;c=-f.pixelX*m}else{if(!(Math.abs(f.pixelY)>Math.abs(f.pixelX)))return!0;c=-f.pixelY}else c=Math.abs(f.pixelX)>Math.abs(f.pixelY)?-f.pixelX*m:-f.pixelY;if(0===c)return!0;r.invert&&(c=-c);let v=t.getTranslate()+c*r.sensitivity;if(v>=t.minTranslate()&&(v=t.minTranslate()),v<=t.maxTranslate()&&(v=t.maxTranslate()),a=!!t.params.loop||!(v===t.minTranslate()||v===t.maxTranslate()),a&&t.params.nested&&s.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:u(),delta:Math.abs(c),direction:Math.sign(c)},a=o&&e.time<o.time+500&&e.delta<=o.delta&&e.direction===o.direction;if(!a){o=void 0,t.params.loop&&t.loopFix();let n=t.getTranslate()+c*r.sensitivity;const d=t.isBeginning,u=t.isEnd;if(n>=t.minTranslate()&&(n=t.minTranslate()),n<=t.maxTranslate()&&(n=t.maxTranslate()),t.setTransition(0),t.setTranslate(n),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!d&&t.isBeginning||!u&&t.isEnd)&&t.updateSlidesClasses(),t.params.freeMode.sticky){clearTimeout(l),l=void 0,h.length>=15&&h.shift();const s=h.length?h[h.length-1]:void 0,a=h[0];if(h.push(e),s&&(e.delta>s.delta||e.direction!==s.direction))h.splice(0);else if(h.length>=15&&e.time-a.time<500&&a.delta-e.delta>=1&&e.delta<=6){const s=c>0?.8:.2;o=e,h.splice(0),l=p((()=>{t.slideToClosest(t.params.speed,!0,void 0,s)}),0)}l||(l=p((()=>{o=e,h.splice(0),t.slideToClosest(t.params.speed,!0,void 0,.5)}),500))}if(a||i("scroll",s),t.params.autoplay&&t.params.autoplayDisableOnInteraction&&t.autoplay.stop(),n===t.minTranslate()||n===t.maxTranslate())return!0}}else{const s={time:u(),delta:Math.abs(c),direction:Math.sign(c),raw:e};h.length>=2&&h.shift();const a=h.length?h[h.length-1]:void 0;if(h.push(s),a?(s.direction!==a.direction||s.delta>a.delta||s.time>a.time+150)&&g(s):g(s),function(e){const s=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&s.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function w(e){let s=t.$el;"container"!==t.params.mousewheel.eventsTarget&&(s=d(t.params.mousewheel.eventsTarget)),s[e]("mouseenter",m),s[e]("mouseleave",f),s[e]("wheel",v)}function b(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",v),!0):!t.mousewheel.enabled&&(w("on"),t.mousewheel.enabled=!0,!0)}function x(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,v),!0):!!t.mousewheel.enabled&&(w("off"),t.mousewheel.enabled=!1,!0)}a("init",(()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&x(),t.params.mousewheel.enabled&&b()})),a("destroy",(()=>{t.params.cssMode&&b(),t.mousewheel.enabled&&x()})),Object.assign(t.mousewheel,{enable:b,disable:x})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;function r(e){let s;return e&&(s=d(e),t.params.uniqueNavElements&&"string"==typeof e&&s.length>1&&1===t.$el.find(e).length&&(s=t.$el.find(e))),s}function n(e,s){const a=t.params.navigation;e&&e.length>0&&(e[s?"addClass":"removeClass"](a.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=s),t.params.watchOverflow&&t.enabled&&e[t.isLocked?"addClass":"removeClass"](a.lockClass))}function l(){if(t.params.loop)return;const{$nextEl:e,$prevEl:s}=t.navigation;n(s,t.isBeginning&&!t.params.rewind),n(e,t.isEnd&&!t.params.rewind)}function o(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function c(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function p(){const e=t.params.navigation;if(t.params.navigation=F(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;const s=r(e.nextEl),a=r(e.prevEl);s&&s.length>0&&s.on("click",c),a&&a.length>0&&a.on("click",o),Object.assign(t.navigation,{$nextEl:s,nextEl:s&&s[0],$prevEl:a,prevEl:a&&a[0]}),t.enabled||(s&&s.addClass(e.lockClass),a&&a.addClass(e.lockClass))}function u(){const{$nextEl:e,$prevEl:s}=t.navigation;e&&e.length&&(e.off("click",c),e.removeClass(t.params.navigation.disabledClass)),s&&s.length&&(s.off("click",o),s.removeClass(t.params.navigation.disabledClass))}s({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},a("init",(()=>{!1===t.params.navigation.enabled?h():(p(),l())})),a("toEdge fromEdge lock unlock",(()=>{l()})),a("destroy",(()=>{u()})),a("enable disable",(()=>{const{$nextEl:e,$prevEl:s}=t.navigation;e&&e[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass),s&&s[t.enabled?"removeClass":"addClass"](t.params.navigation.lockClass)})),a("click",((e,s)=>{const{$nextEl:a,$prevEl:r}=t.navigation,n=s.target;if(t.params.navigation.hideOnClick&&!d(n).is(r)&&!d(n).is(a)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===n||t.pagination.el.contains(n)))return;let e;a?e=a.hasClass(t.params.navigation.hiddenClass):r&&(e=r.hasClass(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),a&&a.toggleClass(t.params.navigation.hiddenClass),r&&r.toggleClass(t.params.navigation.hiddenClass)}}));const h=()=>{t.$el.addClass(t.params.navigation.navigationDisabledClass),u()};Object.assign(t.navigation,{enable:()=>{t.$el.removeClass(t.params.navigation.navigationDisabledClass),p(),l()},disable:h,update:l,init:p,destroy:u})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const r="swiper-pagination";let n;s({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),t.pagination={el:null,$el:null,bullets:[]};let l=0;function o(){return!t.params.pagination.el||!t.pagination.el||!t.pagination.$el||0===t.pagination.$el.length}function c(e,s){const{bulletActiveClass:a}=t.params.pagination;e[s]().addClass(`${a}-${s}`)[s]().addClass(`${a}-${s}-${s}`)}function p(){const e=t.rtl,s=t.params.pagination;if(o())return;const a=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,r=t.pagination.$el;let p;const u=t.params.loop?Math.ceil((a-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(p=Math.ceil((t.activeIndex-t.loopedSlides)/t.params.slidesPerGroup),p>a-1-2*t.loopedSlides&&(p-=a-2*t.loopedSlides),p>u-1&&(p-=u),p<0&&"bullets"!==t.params.paginationType&&(p=u+p)):p=void 0!==t.snapIndex?t.snapIndex:t.activeIndex||0,"bullets"===s.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const a=t.pagination.bullets;let i,o,u;if(s.dynamicBullets&&(n=a.eq(0)[t.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(t.isHorizontal()?"width":"height",n*(s.dynamicMainBullets+4)+"px"),s.dynamicMainBullets>1&&void 0!==t.previousIndex&&(l+=p-(t.previousIndex-t.loopedSlides||0),l>s.dynamicMainBullets-1?l=s.dynamicMainBullets-1:l<0&&(l=0)),i=Math.max(p-l,0),o=i+(Math.min(a.length,s.dynamicMainBullets)-1),u=(o+i)/2),a.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`)).join(" ")),r.length>1)a.each((e=>{const t=d(e),a=t.index();a===p&&t.addClass(s.bulletActiveClass),s.dynamicBullets&&(a>=i&&a<=o&&t.addClass(`${s.bulletActiveClass}-main`),a===i&&c(t,"prev"),a===o&&c(t,"next"))}));else{const e=a.eq(p),r=e.index();if(e.addClass(s.bulletActiveClass),s.dynamicBullets){const e=a.eq(i),n=a.eq(o);for(let e=i;e<=o;e+=1)a.eq(e).addClass(`${s.bulletActiveClass}-main`);if(t.params.loop)if(r>=a.length){for(let e=s.dynamicMainBullets;e>=0;e-=1)a.eq(a.length-e).addClass(`${s.bulletActiveClass}-main`);a.eq(a.length-s.dynamicMainBullets-1).addClass(`${s.bulletActiveClass}-prev`)}else c(e,"prev"),c(n,"next");else c(e,"prev"),c(n,"next")}}if(s.dynamicBullets){const i=Math.min(a.length,s.dynamicMainBullets+4),r=(n*i-n)/2-u*n,l=e?"right":"left";a.css(t.isHorizontal()?l:"top",`${r}px`)}}if("fraction"===s.type&&(r.find(U(s.currentClass)).text(s.formatFractionCurrent(p+1)),r.find(U(s.totalClass)).text(s.formatFractionTotal(u))),"progressbar"===s.type){let e;e=s.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const a=(p+1)/u;let i=1,n=1;"horizontal"===e?i=a:n=a,r.find(U(s.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${i}) scaleY(${n})`).transition(t.params.speed)}"custom"===s.type&&s.renderCustom?(r.html(s.renderCustom(t,p+1,u)),i("paginationRender",r[0])):i("paginationUpdate",r[0]),t.params.watchOverflow&&t.enabled&&r[t.isLocked?"addClass":"removeClass"](s.lockClass)}function u(){const e=t.params.pagination;if(o())return;const s=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,a=t.pagination.$el;let r="";if("bullets"===e.type){let i=t.params.loop?Math.ceil((s-2*t.loopedSlides)/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&!t.params.loop&&i>s&&(i=s);for(let s=0;s<i;s+=1)e.renderBullet?r+=e.renderBullet.call(t,s,e.bulletClass):r+=`<${e.bulletElement} class="${e.bulletClass}"></${e.bulletElement}>`;a.html(r),t.pagination.bullets=a.find(U(e.bulletClass))}"fraction"===e.type&&(r=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`,a.html(r)),"progressbar"===e.type&&(r=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`,a.html(r)),"custom"!==e.type&&i("paginationRender",t.pagination.$el[0])}function h(){t.params.pagination=F(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let s=d(e.el);0!==s.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&s.length>1&&(s=t.$el.find(e.el),s.length>1&&(s=s.filter((e=>d(e).parents(".swiper")[0]===t.el)))),"bullets"===e.type&&e.clickable&&s.addClass(e.clickableClass),s.addClass(e.modifierClass+e.type),s.addClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(s.addClass(`${e.modifierClass}${e.type}-dynamic`),l=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&s.addClass(e.progressbarOppositeClass),e.clickable&&s.on("click",U(e.bulletClass),(function(e){e.preventDefault();let s=d(this).index()*t.params.slidesPerGroup;t.params.loop&&(s+=t.loopedSlides),t.slideTo(s)})),Object.assign(t.pagination,{$el:s,el:s[0]}),t.enabled||s.addClass(e.lockClass))}function m(){const e=t.params.pagination;if(o())return;const s=t.pagination.$el;s.removeClass(e.hiddenClass),s.removeClass(e.modifierClass+e.type),s.removeClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.pagination.bullets&&t.pagination.bullets.removeClass&&t.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&s.off("click",U(e.bulletClass))}a("init",(()=>{!1===t.params.pagination.enabled?f():(h(),u(),p())})),a("activeIndexChange",(()=>{(t.params.loop||void 0===t.snapIndex)&&p()})),a("snapIndexChange",(()=>{t.params.loop||p()})),a("slidesLengthChange",(()=>{t.params.loop&&(u(),p())})),a("snapGridLengthChange",(()=>{t.params.loop||(u(),p())})),a("destroy",(()=>{m()})),a("enable disable",(()=>{const{$el:e}=t.pagination;e&&e[t.enabled?"removeClass":"addClass"](t.params.pagination.lockClass)})),a("lock unlock",(()=>{p()})),a("click",((e,s)=>{const a=s.target,{$el:r}=t.pagination;if(t.params.pagination.el&&t.params.pagination.hideOnClick&&r&&r.length>0&&!d(a).hasClass(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&a===t.navigation.nextEl||t.navigation.prevEl&&a===t.navigation.prevEl))return;const e=r.hasClass(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),r.toggleClass(t.params.pagination.hiddenClass)}}));const f=()=>{t.$el.addClass(t.params.pagination.paginationDisabledClass),t.pagination.$el&&t.pagination.$el.addClass(t.params.pagination.paginationDisabledClass),m()};Object.assign(t.pagination,{enable:()=>{t.$el.removeClass(t.params.pagination.paginationDisabledClass),t.pagination.$el&&t.pagination.$el.removeClass(t.params.pagination.paginationDisabledClass),h(),u(),p()},disable:f,render:u,update:p,init:h,destroy:m})},function(e){let{swiper:t,extendParams:s,on:i,emit:r}=e;const n=a();let l,o,c,u,h=!1,m=null,f=null;function g(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:s,progress:a}=t,{$dragEl:i,$el:r}=e,n=t.params.scrollbar;let l=o,d=(c-o)*a;s?(d=-d,d>0?(l=o-d,d=0):-d+o>c&&(l=c+d)):d<0?(l=o+d,d=0):d+o>c&&(l=c-d),t.isHorizontal()?(i.transform(`translate3d(${d}px, 0, 0)`),i[0].style.width=`${l}px`):(i.transform(`translate3d(0px, ${d}px, 0)`),i[0].style.height=`${l}px`),n.hide&&(clearTimeout(m),r[0].style.opacity=1,m=setTimeout((()=>{r[0].style.opacity=0,r.transition(400)}),1e3))}function v(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{$dragEl:s,$el:a}=e;s[0].style.width="",s[0].style.height="",c=t.isHorizontal()?a[0].offsetWidth:a[0].offsetHeight,u=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),o="auto"===t.params.scrollbar.dragSize?c*u:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?s[0].style.width=`${o}px`:s[0].style.height=`${o}px`,a[0].style.display=u>=1?"none":"",t.params.scrollbar.hide&&(a[0].style.opacity=0),t.params.watchOverflow&&t.enabled&&e.$el[t.isLocked?"addClass":"removeClass"](t.params.scrollbar.lockClass)}function w(e){return t.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY}function b(e){const{scrollbar:s,rtlTranslate:a}=t,{$el:i}=s;let r;r=(w(e)-i.offset()[t.isHorizontal()?"left":"top"]-(null!==l?l:o/2))/(c-o),r=Math.max(Math.min(r,1),0),a&&(r=1-r);const n=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*r;t.updateProgress(n),t.setTranslate(n),t.updateActiveIndex(),t.updateSlidesClasses()}function x(e){const s=t.params.scrollbar,{scrollbar:a,$wrapperEl:i}=t,{$el:n,$dragEl:o}=a;h=!0,l=e.target===o[0]||e.target===o?w(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),i.transition(100),o.transition(100),b(e),clearTimeout(f),n.transition(0),s.hide&&n.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),r("scrollbarDragStart",e)}function y(e){const{scrollbar:s,$wrapperEl:a}=t,{$el:i,$dragEl:n}=s;h&&(e.preventDefault?e.preventDefault():e.returnValue=!1,b(e),a.transition(0),i.transition(0),n.transition(0),r("scrollbarDragMove",e))}function E(e){const s=t.params.scrollbar,{scrollbar:a,$wrapperEl:i}=t,{$el:n}=a;h&&(h=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),i.transition("")),s.hide&&(clearTimeout(f),f=p((()=>{n.css("opacity",0),n.transition(400)}),1e3)),r("scrollbarDragEnd",e),s.snapOnRelease&&t.slideToClosest())}function C(e){const{scrollbar:s,touchEventsTouch:a,touchEventsDesktop:i,params:r,support:l}=t,o=s.$el;if(!o)return;const d=o[0],c=!(!l.passiveListener||!r.passiveListeners)&&{passive:!1,capture:!1},p=!(!l.passiveListener||!r.passiveListeners)&&{passive:!0,capture:!1};if(!d)return;const u="on"===e?"addEventListener":"removeEventListener";l.touch?(d[u](a.start,x,c),d[u](a.move,y,c),d[u](a.end,E,p)):(d[u](i.start,x,c),n[u](i.move,y,c),n[u](i.end,E,p))}function T(){const{scrollbar:e,$el:s}=t;t.params.scrollbar=F(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const a=t.params.scrollbar;if(!a.el)return;let i=d(a.el);t.params.uniqueNavElements&&"string"==typeof a.el&&i.length>1&&1===s.find(a.el).length&&(i=s.find(a.el)),i.addClass(t.isHorizontal()?a.horizontalClass:a.verticalClass);let r=i.find(`.${t.params.scrollbar.dragClass}`);0===r.length&&(r=d(`<div class="${t.params.scrollbar.dragClass}"></div>`),i.append(r)),Object.assign(e,{$el:i,el:i[0],$dragEl:r,dragEl:r[0]}),a.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&C("on"),i&&i[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)}function $(){const e=t.params.scrollbar,s=t.scrollbar.$el;s&&s.removeClass(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&C("off")}s({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null,$el:null,$dragEl:null},i("init",(()=>{!1===t.params.scrollbar.enabled?S():(T(),v(),g())})),i("update resize observerUpdate lock unlock",(()=>{v()})),i("setTranslate",(()=>{g()})),i("setTransition",((e,s)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)}(s)})),i("enable disable",(()=>{const{$el:e}=t.scrollbar;e&&e[t.enabled?"removeClass":"addClass"](t.params.scrollbar.lockClass)})),i("destroy",(()=>{$()}));const S=()=>{t.$el.addClass(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.$el&&t.scrollbar.$el.addClass(t.params.scrollbar.scrollbarDisabledClass),$()};Object.assign(t.scrollbar,{enable:()=>{t.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.$el&&t.scrollbar.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass),T(),v(),g()},disable:S,updateSize:v,setTranslate:g,init:T,destroy:$})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({parallax:{enabled:!1}});const i=(e,s)=>{const{rtl:a}=t,i=d(e),r=a?-1:1,n=i.attr("data-swiper-parallax")||"0";let l=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y");const c=i.attr("data-swiper-parallax-scale"),p=i.attr("data-swiper-parallax-opacity");if(l||o?(l=l||"0",o=o||"0"):t.isHorizontal()?(l=n,o="0"):(o=n,l="0"),l=l.indexOf("%")>=0?parseInt(l,10)*s*r+"%":l*s*r+"px",o=o.indexOf("%")>=0?parseInt(o,10)*s+"%":o*s+"px",null!=p){const e=p-(p-1)*(1-Math.abs(s));i[0].style.opacity=e}if(null==c)i.transform(`translate3d(${l}, ${o}, 0px)`);else{const e=c-(c-1)*(1-Math.abs(s));i.transform(`translate3d(${l}, ${o}, 0px) scale(${e})`)}},r=()=>{const{$el:e,slides:s,progress:a,snapGrid:r}=t;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e=>{i(e,a)})),s.each(((e,s)=>{let n=e.progress;t.params.slidesPerGroup>1&&"auto"!==t.params.slidesPerView&&(n+=Math.ceil(s/2)-a*(r.length-1)),n=Math.min(Math.max(n,-1),1),d(e).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e=>{i(e,n)}))}))};a("beforeInit",(()=>{t.params.parallax.enabled&&(t.params.watchSlidesProgress=!0,t.originalParams.watchSlidesProgress=!0)})),a("init",(()=>{t.params.parallax.enabled&&r()})),a("setTranslate",(()=>{t.params.parallax.enabled&&r()})),a("setTransition",((e,s)=>{t.params.parallax.enabled&&function(e){void 0===e&&(e=t.params.speed);const{$el:s}=t;s.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t=>{const s=d(t);let a=parseInt(s.attr("data-swiper-parallax-duration"),10)||e;0===e&&(a=0),s.transition(a)}))}(s)}))},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;const n=r();s({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),t.zoom={enabled:!1};let l,o,c,p=1,u=!1;const m={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},f={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},g={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let v=1;function w(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,s=e.targetTouches[0].pageY,a=e.targetTouches[1].pageX,i=e.targetTouches[1].pageY;return Math.sqrt((a-t)**2+(i-s)**2)}function b(e){const s=t.support,a=t.params.zoom;if(o=!1,c=!1,!s.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;o=!0,m.scaleStart=w(e)}m.$slideEl&&m.$slideEl.length||(m.$slideEl=d(e.target).closest(`.${t.params.slideClass}`),0===m.$slideEl.length&&(m.$slideEl=t.slides.eq(t.activeIndex)),m.$imageEl=m.$slideEl.find(`.${a.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${a.containerClass}`),m.maxRatio=m.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==m.$imageWrapEl.length)?(m.$imageEl&&m.$imageEl.transition(0),u=!0):m.$imageEl=void 0}function x(e){const s=t.support,a=t.params.zoom,i=t.zoom;if(!s.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;c=!0,m.scaleMove=w(e)}m.$imageEl&&0!==m.$imageEl.length?(s.gestures?i.scale=e.scale*p:i.scale=m.scaleMove/m.scaleStart*p,i.scale>m.maxRatio&&(i.scale=m.maxRatio-1+(i.scale-m.maxRatio+1)**.5),i.scale<a.minRatio&&(i.scale=a.minRatio+1-(a.minRatio-i.scale+1)**.5),m.$imageEl.transform(`translate3d(0,0,0) scale(${i.scale})`)):"gesturechange"===e.type&&b(e)}function y(e){const s=t.device,a=t.support,i=t.params.zoom,r=t.zoom;if(!a.gestures){if(!o||!c)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!s.android)return;o=!1,c=!1}m.$imageEl&&0!==m.$imageEl.length&&(r.scale=Math.max(Math.min(r.scale,m.maxRatio),i.minRatio),m.$imageEl.transition(t.params.speed).transform(`translate3d(0,0,0) scale(${r.scale})`),p=r.scale,u=!1,1===r.scale&&(m.$slideEl=void 0))}function E(e){const s=t.zoom;if(!m.$imageEl||0===m.$imageEl.length)return;if(t.allowClick=!1,!f.isTouched||!m.$slideEl)return;f.isMoved||(f.width=m.$imageEl[0].offsetWidth,f.height=m.$imageEl[0].offsetHeight,f.startX=h(m.$imageWrapEl[0],"x")||0,f.startY=h(m.$imageWrapEl[0],"y")||0,m.slideWidth=m.$slideEl[0].offsetWidth,m.slideHeight=m.$slideEl[0].offsetHeight,m.$imageWrapEl.transition(0));const a=f.width*s.scale,i=f.height*s.scale;if(!(a<m.slideWidth&&i<m.slideHeight)){if(f.minX=Math.min(m.slideWidth/2-a/2,0),f.maxX=-f.minX,f.minY=Math.min(m.slideHeight/2-i/2,0),f.maxY=-f.minY,f.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,f.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!f.isMoved&&!u){if(t.isHorizontal()&&(Math.floor(f.minX)===Math.floor(f.startX)&&f.touchesCurrent.x<f.touchesStart.x||Math.floor(f.maxX)===Math.floor(f.startX)&&f.touchesCurrent.x>f.touchesStart.x))return void(f.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(f.minY)===Math.floor(f.startY)&&f.touchesCurrent.y<f.touchesStart.y||Math.floor(f.maxY)===Math.floor(f.startY)&&f.touchesCurrent.y>f.touchesStart.y))return void(f.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),f.isMoved=!0,f.currentX=f.touchesCurrent.x-f.touchesStart.x+f.startX,f.currentY=f.touchesCurrent.y-f.touchesStart.y+f.startY,f.currentX<f.minX&&(f.currentX=f.minX+1-(f.minX-f.currentX+1)**.8),f.currentX>f.maxX&&(f.currentX=f.maxX-1+(f.currentX-f.maxX+1)**.8),f.currentY<f.minY&&(f.currentY=f.minY+1-(f.minY-f.currentY+1)**.8),f.currentY>f.maxY&&(f.currentY=f.maxY-1+(f.currentY-f.maxY+1)**.8),g.prevPositionX||(g.prevPositionX=f.touchesCurrent.x),g.prevPositionY||(g.prevPositionY=f.touchesCurrent.y),g.prevTime||(g.prevTime=Date.now()),g.x=(f.touchesCurrent.x-g.prevPositionX)/(Date.now()-g.prevTime)/2,g.y=(f.touchesCurrent.y-g.prevPositionY)/(Date.now()-g.prevTime)/2,Math.abs(f.touchesCurrent.x-g.prevPositionX)<2&&(g.x=0),Math.abs(f.touchesCurrent.y-g.prevPositionY)<2&&(g.y=0),g.prevPositionX=f.touchesCurrent.x,g.prevPositionY=f.touchesCurrent.y,g.prevTime=Date.now(),m.$imageWrapEl.transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}}function C(){const e=t.zoom;m.$slideEl&&t.previousIndex!==t.activeIndex&&(m.$imageEl&&m.$imageEl.transform("translate3d(0,0,0) scale(1)"),m.$imageWrapEl&&m.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,p=1,m.$slideEl=void 0,m.$imageEl=void 0,m.$imageWrapEl=void 0)}function T(e){const s=t.zoom,a=t.params.zoom;if(m.$slideEl||(e&&e.target&&(m.$slideEl=d(e.target).closest(`.${t.params.slideClass}`)),m.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):m.$slideEl=t.slides.eq(t.activeIndex)),m.$imageEl=m.$slideEl.find(`.${a.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${a.containerClass}`)),!m.$imageEl||0===m.$imageEl.length||!m.$imageWrapEl||0===m.$imageWrapEl.length)return;let i,r,l,o,c,u,h,g,v,w,b,x,y,E,C,T,$,S;t.params.cssMode&&(t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.touchAction="none"),m.$slideEl.addClass(`${a.zoomedSlideClass}`),void 0===f.touchesStart.x&&e?(i="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,r="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(i=f.touchesStart.x,r=f.touchesStart.y),s.scale=m.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,p=m.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,e?($=m.$slideEl[0].offsetWidth,S=m.$slideEl[0].offsetHeight,l=m.$slideEl.offset().left+n.scrollX,o=m.$slideEl.offset().top+n.scrollY,c=l+$/2-i,u=o+S/2-r,v=m.$imageEl[0].offsetWidth,w=m.$imageEl[0].offsetHeight,b=v*s.scale,x=w*s.scale,y=Math.min($/2-b/2,0),E=Math.min(S/2-x/2,0),C=-y,T=-E,h=c*s.scale,g=u*s.scale,h<y&&(h=y),h>C&&(h=C),g<E&&(g=E),g>T&&(g=T)):(h=0,g=0),m.$imageWrapEl.transition(300).transform(`translate3d(${h}px, ${g}px,0)`),m.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${s.scale})`)}function $(){const e=t.zoom,s=t.params.zoom;m.$slideEl||(t.params.virtual&&t.params.virtual.enabled&&t.virtual?m.$slideEl=t.$wrapperEl.children(`.${t.params.slideActiveClass}`):m.$slideEl=t.slides.eq(t.activeIndex),m.$imageEl=m.$slideEl.find(`.${s.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0),m.$imageWrapEl=m.$imageEl.parent(`.${s.containerClass}`)),m.$imageEl&&0!==m.$imageEl.length&&m.$imageWrapEl&&0!==m.$imageWrapEl.length&&(t.params.cssMode&&(t.wrapperEl.style.overflow="",t.wrapperEl.style.touchAction=""),e.scale=1,p=1,m.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),m.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),m.$slideEl.removeClass(`${s.zoomedSlideClass}`),m.$slideEl=void 0)}function S(e){const s=t.zoom;s.scale&&1!==s.scale?$():T(e)}function M(){const e=t.support;return{passiveListener:!("touchstart"!==t.touchEvents.start||!e.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!e.passiveListener||{passive:!1,capture:!0}}}function P(){return`.${t.params.slideClass}`}function k(e){const{passiveListener:s}=M(),a=P();t.$wrapperEl[e]("gesturestart",a,b,s),t.$wrapperEl[e]("gesturechange",a,x,s),t.$wrapperEl[e]("gestureend",a,y,s)}function z(){l||(l=!0,k("on"))}function L(){l&&(l=!1,k("off"))}function O(){const e=t.zoom;if(e.enabled)return;e.enabled=!0;const s=t.support,{passiveListener:a,activeListenerWithCapture:i}=M(),r=P();s.gestures?(t.$wrapperEl.on(t.touchEvents.start,z,a),t.$wrapperEl.on(t.touchEvents.end,L,a)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.on(t.touchEvents.start,r,b,a),t.$wrapperEl.on(t.touchEvents.move,r,x,i),t.$wrapperEl.on(t.touchEvents.end,r,y,a),t.touchEvents.cancel&&t.$wrapperEl.on(t.touchEvents.cancel,r,y,a)),t.$wrapperEl.on(t.touchEvents.move,`.${t.params.zoom.containerClass}`,E,i)}function I(){const e=t.zoom;if(!e.enabled)return;const s=t.support;e.enabled=!1;const{passiveListener:a,activeListenerWithCapture:i}=M(),r=P();s.gestures?(t.$wrapperEl.off(t.touchEvents.start,z,a),t.$wrapperEl.off(t.touchEvents.end,L,a)):"touchstart"===t.touchEvents.start&&(t.$wrapperEl.off(t.touchEvents.start,r,b,a),t.$wrapperEl.off(t.touchEvents.move,r,x,i),t.$wrapperEl.off(t.touchEvents.end,r,y,a),t.touchEvents.cancel&&t.$wrapperEl.off(t.touchEvents.cancel,r,y,a)),t.$wrapperEl.off(t.touchEvents.move,`.${t.params.zoom.containerClass}`,E,i)}Object.defineProperty(t.zoom,"scale",{get:()=>v,set(e){if(v!==e){const t=m.$imageEl?m.$imageEl[0]:void 0,s=m.$slideEl?m.$slideEl[0]:void 0;i("zoomChange",e,t,s)}v=e}}),a("init",(()=>{t.params.zoom.enabled&&O()})),a("destroy",(()=>{I()})),a("touchStart",((e,s)=>{t.zoom.enabled&&function(e){const s=t.device;m.$imageEl&&0!==m.$imageEl.length&&(f.isTouched||(s.android&&e.cancelable&&e.preventDefault(),f.isTouched=!0,f.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,f.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))}(s)})),a("touchEnd",((e,s)=>{t.zoom.enabled&&function(){const e=t.zoom;if(!m.$imageEl||0===m.$imageEl.length)return;if(!f.isTouched||!f.isMoved)return f.isTouched=!1,void(f.isMoved=!1);f.isTouched=!1,f.isMoved=!1;let s=300,a=300;const i=g.x*s,r=f.currentX+i,n=g.y*a,l=f.currentY+n;0!==g.x&&(s=Math.abs((r-f.currentX)/g.x)),0!==g.y&&(a=Math.abs((l-f.currentY)/g.y));const o=Math.max(s,a);f.currentX=r,f.currentY=l;const d=f.width*e.scale,c=f.height*e.scale;f.minX=Math.min(m.slideWidth/2-d/2,0),f.maxX=-f.minX,f.minY=Math.min(m.slideHeight/2-c/2,0),f.maxY=-f.minY,f.currentX=Math.max(Math.min(f.currentX,f.maxX),f.minX),f.currentY=Math.max(Math.min(f.currentY,f.maxY),f.minY),m.$imageWrapEl.transition(o).transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`)}()})),a("doubleTap",((e,s)=>{!t.animating&&t.params.zoom.enabled&&t.zoom.enabled&&t.params.zoom.toggle&&S(s)})),a("transitionEnd",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&C()})),a("slideChange",(()=>{t.zoom.enabled&&t.params.zoom.enabled&&t.params.cssMode&&C()})),Object.assign(t.zoom,{enable:O,disable:I,in:T,out:$,toggle:S})},function(e){let{swiper:t,extendParams:s,on:a,emit:i}=e;s({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}}),t.lazy={};let n=!1,l=!1;function o(e,s){void 0===s&&(s=!0);const a=t.params.lazy;if(void 0===e)return;if(0===t.slides.length)return;const r=t.virtual&&t.params.virtual.enabled?t.$wrapperEl.children(`.${t.params.slideClass}[data-swiper-slide-index="${e}"]`):t.slides.eq(e),n=r.find(`.${a.elementClass}:not(.${a.loadedClass}):not(.${a.loadingClass})`);!r.hasClass(a.elementClass)||r.hasClass(a.loadedClass)||r.hasClass(a.loadingClass)||n.push(r[0]),0!==n.length&&n.each((e=>{const n=d(e);n.addClass(a.loadingClass);const l=n.attr("data-background"),c=n.attr("data-src"),p=n.attr("data-srcset"),u=n.attr("data-sizes"),h=n.parent("picture");t.loadImage(n[0],c||l,p,u,!1,(()=>{if(null!=t&&t&&(!t||t.params)&&!t.destroyed){if(l?(n.css("background-image",`url("${l}")`),n.removeAttr("data-background")):(p&&(n.attr("srcset",p),n.removeAttr("data-srcset")),u&&(n.attr("sizes",u),n.removeAttr("data-sizes")),h.length&&h.children("source").each((e=>{const t=d(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),c&&(n.attr("src",c),n.removeAttr("data-src"))),n.addClass(a.loadedClass).removeClass(a.loadingClass),r.find(`.${a.preloaderClass}`).remove(),t.params.loop&&s){const e=r.attr("data-swiper-slide-index");if(r.hasClass(t.params.slideDuplicateClass)){o(t.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${t.params.slideDuplicateClass})`).index(),!1)}else{o(t.$wrapperEl.children(`.${t.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).index(),!1)}}i("lazyImageReady",r[0],n[0]),t.params.autoHeight&&t.updateAutoHeight()}})),i("lazyImageLoad",r[0],n[0])}))}function c(){const{$wrapperEl:e,params:s,slides:a,activeIndex:i}=t,r=t.virtual&&s.virtual.enabled,n=s.lazy;let c=s.slidesPerView;function p(t){if(r){if(e.children(`.${s.slideClass}[data-swiper-slide-index="${t}"]`).length)return!0}else if(a[t])return!0;return!1}function u(e){return r?d(e).attr("data-swiper-slide-index"):d(e).index()}if("auto"===c&&(c=0),l||(l=!0),t.params.watchSlidesProgress)e.children(`.${s.slideVisibleClass}`).each((e=>{o(r?d(e).attr("data-swiper-slide-index"):d(e).index())}));else if(c>1)for(let e=i;e<i+c;e+=1)p(e)&&o(e);else o(i);if(n.loadPrevNext)if(c>1||n.loadPrevNextAmount&&n.loadPrevNextAmount>1){const e=n.loadPrevNextAmount,t=Math.ceil(c),s=Math.min(i+t+Math.max(e,t),a.length),r=Math.max(i-Math.max(t,e),0);for(let e=i+t;e<s;e+=1)p(e)&&o(e);for(let e=r;e<i;e+=1)p(e)&&o(e)}else{const t=e.children(`.${s.slideNextClass}`);t.length>0&&o(u(t));const a=e.children(`.${s.slidePrevClass}`);a.length>0&&o(u(a))}}function p(){const e=r();if(!t||t.destroyed)return;const s=t.params.lazy.scrollingElement?d(t.params.lazy.scrollingElement):d(e),a=s[0]===e,i=a?e.innerWidth:s[0].offsetWidth,l=a?e.innerHeight:s[0].offsetHeight,o=t.$el.offset(),{rtlTranslate:u}=t;let h=!1;u&&(o.left-=t.$el[0].scrollLeft);const m=[[o.left,o.top],[o.left+t.width,o.top],[o.left,o.top+t.height],[o.left+t.width,o.top+t.height]];for(let e=0;e<m.length;e+=1){const t=m[e];if(t[0]>=0&&t[0]<=i&&t[1]>=0&&t[1]<=l){if(0===t[0]&&0===t[1])continue;h=!0}}const f=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};h?(c(),s.off("scroll",p,f)):n||(n=!0,s.on("scroll",p,f))}a("beforeInit",(()=>{t.params.lazy.enabled&&t.params.preloadImages&&(t.params.preloadImages=!1)})),a("init",(()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?p():c())})),a("scroll",(()=>{t.params.freeMode&&t.params.freeMode.enabled&&!t.params.freeMode.sticky&&c()})),a("scrollbarDragMove resize _freeModeNoMomentumRelease",(()=>{t.params.lazy.enabled&&(t.params.lazy.checkInView?p():c())})),a("transitionStart",(()=>{t.params.lazy.enabled&&(t.params.lazy.loadOnTransitionStart||!t.params.lazy.loadOnTransitionStart&&!l)&&(t.params.lazy.checkInView?p():c())})),a("transitionEnd",(()=>{t.params.lazy.enabled&&!t.params.lazy.loadOnTransitionStart&&(t.params.lazy.checkInView?p():c())})),a("slideChange",(()=>{const{lazy:e,cssMode:s,watchSlidesProgress:a,touchReleaseOnEdges:i,resistanceRatio:r}=t.params;e.enabled&&(s||a&&(i||0===r))&&c()})),a("destroy",(()=>{t.$el&&t.$el.find(`.${t.params.lazy.loadingClass}`).removeClass(t.params.lazy.loadingClass)})),Object.assign(t.lazy,{load:c,loadInSlide:o})},function(e){let{swiper:t,extendParams:s,on:a}=e;function i(e,t){const s=function(){let e,t,s;return(a,i)=>{for(t=-1,e=a.length;e-t>1;)s=e+t>>1,a[s]<=i?t=s:e=s;return e}}();let a,i;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(i=s(this.x,e),a=i-1,(e-this.x[a])*(this.y[i]-this.y[a])/(this.x[i]-this.x[a])+this.y[a]):0},this}function r(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}s({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},a("beforeInit",(()=>{t.controller.control=t.params.controller.control})),a("update",(()=>{r()})),a("resize",(()=>{r()})),a("observerUpdate",(()=>{r()})),a("setTranslate",((e,s,a)=>{t.controller.control&&t.controller.setTranslate(s,a)})),a("setTransition",((e,s,a)=>{t.controller.control&&t.controller.setTransition(s,a)})),Object.assign(t.controller,{setTranslate:function(e,s){const a=t.controller.control;let r,n;const l=t.constructor;function o(e){const s=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){t.controller.spline||(t.controller.spline=t.params.loop?new i(t.slidesGrid,e.slidesGrid):new i(t.snapGrid,e.snapGrid))}(e),n=-t.controller.spline.interpolate(-s)),n&&"container"!==t.params.controller.by||(r=(e.maxTranslate()-e.minTranslate())/(t.maxTranslate()-t.minTranslate()),n=(s-t.minTranslate())*r+e.minTranslate()),t.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,t),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(let e=0;e<a.length;e+=1)a[e]!==s&&a[e]instanceof l&&o(a[e]);else a instanceof l&&s!==a&&o(a)},setTransition:function(e,s){const a=t.constructor,i=t.controller.control;let r;function n(s){s.setTransition(e,t),0!==e&&(s.transitionStart(),s.params.autoHeight&&p((()=>{s.updateAutoHeight()})),s.$wrapperEl.transitionEnd((()=>{i&&(s.params.loop&&"slide"===t.params.controller.by&&s.loopFix(),s.transitionEnd())})))}if(Array.isArray(i))for(r=0;r<i.length;r+=1)i[r]!==s&&i[r]instanceof a&&n(i[r]);else i instanceof a&&s!==i&&n(i)}})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),t.a11y={clicked:!1};let i=null;function r(e){const t=i;0!==t.length&&(t.html(""),t.html(e))}function n(e){e.attr("tabIndex","0")}function l(e){e.attr("tabIndex","-1")}function o(e,t){e.attr("role",t)}function c(e,t){e.attr("aria-roledescription",t)}function p(e,t){e.attr("aria-label",t)}function u(e){e.attr("aria-disabled",!0)}function h(e){e.attr("aria-disabled",!1)}function m(e){if(13!==e.keyCode&&32!==e.keyCode)return;const s=t.params.a11y,a=d(e.target);t.navigation&&t.navigation.$nextEl&&a.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?r(s.lastSlideMessage):r(s.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&a.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?r(s.firstSlideMessage):r(s.prevSlideMessage)),t.pagination&&a.is(U(t.params.pagination.bulletClass))&&a[0].click()}function f(){return t.pagination&&t.pagination.bullets&&t.pagination.bullets.length}function g(){return f()&&t.params.pagination.clickable}const v=(e,t,s)=>{n(e),"BUTTON"!==e[0].tagName&&(o(e,"button"),e.on("keydown",m)),p(e,s),function(e,t){e.attr("aria-controls",t)}(e,t)},w=()=>{t.a11y.clicked=!0},b=()=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.destroyed||(t.a11y.clicked=!1)}))}))},x=e=>{if(t.a11y.clicked)return;const s=e.target.closest(`.${t.params.slideClass}`);if(!s||!t.slides.includes(s))return;const a=t.slides.indexOf(s)===t.activeIndex,i=t.params.watchSlidesProgress&&t.visibleSlides&&t.visibleSlides.includes(s);a||i||e.sourceCapabilities&&e.sourceCapabilities.firesTouchEvents||(t.isHorizontal()?t.el.scrollLeft=0:t.el.scrollTop=0,t.slideTo(t.slides.indexOf(s),0))},y=()=>{const e=t.params.a11y;e.itemRoleDescriptionMessage&&c(d(t.slides),e.itemRoleDescriptionMessage),e.slideRole&&o(d(t.slides),e.slideRole);const s=t.params.loop?t.slides.filter((e=>!e.classList.contains(t.params.slideDuplicateClass))).length:t.slides.length;e.slideLabelMessage&&t.slides.each(((a,i)=>{const r=d(a),n=t.params.loop?parseInt(r.attr("data-swiper-slide-index"),10):i;p(r,e.slideLabelMessage.replace(/\{\{index\}\}/,n+1).replace(/\{\{slidesLength\}\}/,s))}))},E=()=>{const e=t.params.a11y;t.$el.append(i);const s=t.$el;e.containerRoleDescriptionMessage&&c(s,e.containerRoleDescriptionMessage),e.containerMessage&&p(s,e.containerMessage);const a=t.$wrapperEl,r=e.id||a.attr("id")||`swiper-wrapper-${n=16,void 0===n&&(n=16),"x".repeat(n).replace(/x/g,(()=>Math.round(16*Math.random()).toString(16)))}`;var n;const l=t.params.autoplay&&t.params.autoplay.enabled?"off":"polite";var o;let d,u;o=r,a.attr("id",o),function(e,t){e.attr("aria-live",t)}(a,l),y(),t.navigation&&t.navigation.$nextEl&&(d=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(u=t.navigation.$prevEl),d&&d.length&&v(d,r,e.nextSlideMessage),u&&u.length&&v(u,r,e.prevSlideMessage),g()&&t.pagination.$el.on("keydown",U(t.params.pagination.bulletClass),m),t.$el.on("focus",x,!0),t.$el.on("pointerdown",w,!0),t.$el.on("pointerup",b,!0)};a("beforeInit",(()=>{i=d(`<span class="${t.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)})),a("afterInit",(()=>{t.params.a11y.enabled&&E()})),a("slidesLengthChange snapGridLengthChange slidesGridLengthChange",(()=>{t.params.a11y.enabled&&y()})),a("fromEdge toEdge afterInit lock unlock",(()=>{t.params.a11y.enabled&&function(){if(t.params.loop||t.params.rewind||!t.navigation)return;const{$nextEl:e,$prevEl:s}=t.navigation;s&&s.length>0&&(t.isBeginning?(u(s),l(s)):(h(s),n(s))),e&&e.length>0&&(t.isEnd?(u(e),l(e)):(h(e),n(e)))}()})),a("paginationUpdate",(()=>{t.params.a11y.enabled&&function(){const e=t.params.a11y;f()&&t.pagination.bullets.each((s=>{const a=d(s);t.params.pagination.clickable&&(n(a),t.params.pagination.renderBullet||(o(a,"button"),p(a,e.paginationBulletMessage.replace(/\{\{index\}\}/,a.index()+1)))),a.is(`.${t.params.pagination.bulletActiveClass}`)?a.attr("aria-current","true"):a.removeAttr("aria-current")}))}()})),a("destroy",(()=>{t.params.a11y.enabled&&function(){let e,s;i&&i.length>0&&i.remove(),t.navigation&&t.navigation.$nextEl&&(e=t.navigation.$nextEl),t.navigation&&t.navigation.$prevEl&&(s=t.navigation.$prevEl),e&&e.off("keydown",m),s&&s.off("keydown",m),g()&&t.pagination.$el.off("keydown",U(t.params.pagination.bulletClass),m),t.$el.off("focus",x,!0),t.$el.off("pointerdown",w,!0),t.$el.off("pointerup",b,!0)}()}))},function(e){let{swiper:t,extendParams:s,on:a}=e;s({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let i=!1,n={};const l=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=>{const t=r();let s;s=e?new URL(e):t.location;const a=s.pathname.slice(1).split("/").filter((e=>""!==e)),i=a.length;return{key:a[i-2],value:a[i-1]}},d=(e,s)=>{const a=r();if(!i||!t.params.history.enabled)return;let n;n=t.params.url?new URL(t.params.url):a.location;const o=t.slides.eq(s);let d=l(o.attr("data-history"));if(t.params.history.root.length>0){let s=t.params.history.root;"/"===s[s.length-1]&&(s=s.slice(0,s.length-1)),d=`${s}/${e}/${d}`}else n.pathname.includes(e)||(d=`${e}/${d}`);t.params.history.keepQuery&&(d+=n.search);const c=a.history.state;c&&c.value===d||(t.params.history.replaceState?a.history.replaceState({value:d},null,d):a.history.pushState({value:d},null,d))},c=(e,s,a)=>{if(s)for(let i=0,r=t.slides.length;i<r;i+=1){const r=t.slides.eq(i);if(l(r.attr("data-history"))===s&&!r.hasClass(t.params.slideDuplicateClass)){const s=r.index();t.slideTo(s,e,a)}}else t.slideTo(0,e,a)},p=()=>{n=o(t.params.url),c(t.params.speed,n.value,!1)};a("init",(()=>{t.params.history.enabled&&(()=>{const e=r();if(t.params.history){if(!e.history||!e.history.pushState)return t.params.history.enabled=!1,void(t.params.hashNavigation.enabled=!0);i=!0,n=o(t.params.url),(n.key||n.value)&&(c(0,n.value,t.params.runCallbacksOnInit),t.params.history.replaceState||e.addEventListener("popstate",p))}})()})),a("destroy",(()=>{t.params.history.enabled&&(()=>{const e=r();t.params.history.replaceState||e.removeEventListener("popstate",p)})()})),a("transitionEnd _freeModeNoMomentumRelease",(()=>{i&&d(t.params.history.key,t.activeIndex)})),a("slideChange",(()=>{i&&t.params.cssMode&&d(t.params.history.key,t.activeIndex)}))},function(e){let{swiper:t,extendParams:s,emit:i,on:n}=e,l=!1;const o=a(),c=r();s({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}});const p=()=>{i("hashChange");const e=o.location.hash.replace("#","");if(e!==t.slides.eq(t.activeIndex).attr("data-hash")){const s=t.$wrapperEl.children(`.${t.params.slideClass}[data-hash="${e}"]`).index();if(void 0===s)return;t.slideTo(s)}},u=()=>{if(l&&t.params.hashNavigation.enabled)if(t.params.hashNavigation.replaceState&&c.history&&c.history.replaceState)c.history.replaceState(null,null,`#${t.slides.eq(t.activeIndex).attr("data-hash")}`||""),i("hashSet");else{const e=t.slides.eq(t.activeIndex),s=e.attr("data-hash")||e.attr("data-history");o.location.hash=s||"",i("hashSet")}};n("init",(()=>{t.params.hashNavigation.enabled&&(()=>{if(!t.params.hashNavigation.enabled||t.params.history&&t.params.history.enabled)return;l=!0;const e=o.location.hash.replace("#","");if(e){const s=0;for(let a=0,i=t.slides.length;a<i;a+=1){const i=t.slides.eq(a);if((i.attr("data-hash")||i.attr("data-history"))===e&&!i.hasClass(t.params.slideDuplicateClass)){const e=i.index();t.slideTo(e,s,t.params.runCallbacksOnInit,!0)}}}t.params.hashNavigation.watchState&&d(c).on("hashchange",p)})()})),n("destroy",(()=>{t.params.hashNavigation.enabled&&t.params.hashNavigation.watchState&&d(c).off("hashchange",p)})),n("transitionEnd _freeModeNoMomentumRelease",(()=>{l&&u()})),n("slideChange",(()=>{l&&t.params.cssMode&&u()}))},function(e){let t,{swiper:s,extendParams:i,on:r,emit:n}=e;function l(){if(!s.size)return s.autoplay.running=!1,void(s.autoplay.paused=!1);const e=s.slides.eq(s.activeIndex);let a=s.params.autoplay.delay;e.attr("data-swiper-autoplay")&&(a=e.attr("data-swiper-autoplay")||s.params.autoplay.delay),clearTimeout(t),t=p((()=>{let e;s.params.autoplay.reverseDirection?s.params.loop?(s.loopFix(),e=s.slidePrev(s.params.speed,!0,!0),n("autoplay")):s.isBeginning?s.params.autoplay.stopOnLastSlide?d():(e=s.slideTo(s.slides.length-1,s.params.speed,!0,!0),n("autoplay")):(e=s.slidePrev(s.params.speed,!0,!0),n("autoplay")):s.params.loop?(s.loopFix(),e=s.slideNext(s.params.speed,!0,!0),n("autoplay")):s.isEnd?s.params.autoplay.stopOnLastSlide?d():(e=s.slideTo(0,s.params.speed,!0,!0),n("autoplay")):(e=s.slideNext(s.params.speed,!0,!0),n("autoplay")),(s.params.cssMode&&s.autoplay.running||!1===e)&&l()}),a)}function o(){return void 0===t&&(!s.autoplay.running&&(s.autoplay.running=!0,n("autoplayStart"),l(),!0))}function d(){return!!s.autoplay.running&&(void 0!==t&&(t&&(clearTimeout(t),t=void 0),s.autoplay.running=!1,n("autoplayStop"),!0))}function c(e){s.autoplay.running&&(s.autoplay.paused||(t&&clearTimeout(t),s.autoplay.paused=!0,0!==e&&s.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach((e=>{s.$wrapperEl[0].addEventListener(e,h)})):(s.autoplay.paused=!1,l())))}function u(){const e=a();"hidden"===e.visibilityState&&s.autoplay.running&&c(),"visible"===e.visibilityState&&s.autoplay.paused&&(l(),s.autoplay.paused=!1)}function h(e){s&&!s.destroyed&&s.$wrapperEl&&e.target===s.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((e=>{s.$wrapperEl[0].removeEventListener(e,h)})),s.autoplay.paused=!1,s.autoplay.running?l():d())}function m(){s.params.autoplay.disableOnInteraction?d():(n("autoplayPause"),c()),["transitionend","webkitTransitionEnd"].forEach((e=>{s.$wrapperEl[0].removeEventListener(e,h)}))}function f(){s.params.autoplay.disableOnInteraction||(s.autoplay.paused=!1,n("autoplayResume"),l())}s.autoplay={running:!1,paused:!1},i({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),r("init",(()=>{if(s.params.autoplay.enabled){o();a().addEventListener("visibilitychange",u),s.params.autoplay.pauseOnMouseEnter&&(s.$el.on("mouseenter",m),s.$el.on("mouseleave",f))}})),r("beforeTransitionStart",((e,t,a)=>{s.autoplay.running&&(a||!s.params.autoplay.disableOnInteraction?s.autoplay.pause(t):d())})),r("sliderFirstMove",(()=>{s.autoplay.running&&(s.params.autoplay.disableOnInteraction?d():c())})),r("touchEnd",(()=>{s.params.cssMode&&s.autoplay.paused&&!s.params.autoplay.disableOnInteraction&&l()})),r("destroy",(()=>{s.$el.off("mouseenter",m),s.$el.off("mouseleave",f),s.autoplay.running&&d();a().removeEventListener("visibilitychange",u)})),Object.assign(s.autoplay,{pause:c,run:l,start:o,stop:d})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let i=!1,r=!1;function n(){const e=t.thumbs.swiper;if(!e||e.destroyed)return;const s=e.clickedIndex,a=e.clickedSlide;if(a&&d(a).hasClass(t.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let i;if(i=e.params.loop?parseInt(d(e.clickedSlide).attr("data-swiper-slide-index"),10):s,t.params.loop){let e=t.activeIndex;t.slides.eq(e).hasClass(t.params.slideDuplicateClass)&&(t.loopFix(),t._clientLeft=t.$wrapperEl[0].clientLeft,e=t.activeIndex);const s=t.slides.eq(e).prevAll(`[data-swiper-slide-index="${i}"]`).eq(0).index(),a=t.slides.eq(e).nextAll(`[data-swiper-slide-index="${i}"]`).eq(0).index();i=void 0===s?a:void 0===a?s:a-e<e-s?a:s}t.slideTo(i)}function l(){const{thumbs:e}=t.params;if(i)return!1;i=!0;const s=t.constructor;if(e.swiper instanceof s)t.thumbs.swiper=e.swiper,Object.assign(t.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(t.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1});else if(m(e.swiper)){const a=Object.assign({},e.swiper);Object.assign(a,{watchSlidesProgress:!0,slideToClickedSlide:!1}),t.thumbs.swiper=new s(a),r=!0}return t.thumbs.swiper.$el.addClass(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",n),!0}function o(e){const s=t.thumbs.swiper;if(!s||s.destroyed)return;const a="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView;let i=1;const r=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),s.slides.removeClass(r),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let e=0;e<i;e+=1)s.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex+e}"]`).addClass(r);else for(let e=0;e<i;e+=1)s.slides.eq(t.realIndex+e).addClass(r);const n=t.params.thumbs.autoScrollOffset,l=n&&!s.params.loop;if(t.realIndex!==s.realIndex||l){let i,r,o=s.activeIndex;if(s.params.loop){s.slides.eq(o).hasClass(s.params.slideDuplicateClass)&&(s.loopFix(),s._clientLeft=s.$wrapperEl[0].clientLeft,o=s.activeIndex);const e=s.slides.eq(o).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(),a=s.slides.eq(o).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index();i=void 0===e?a:void 0===a?e:a-o==o-e?s.params.slidesPerGroup>1?a:o:a-o<o-e?a:e,r=t.activeIndex>t.previousIndex?"next":"prev"}else i=t.realIndex,r=i>t.previousIndex?"next":"prev";l&&(i+="next"===r?n:-1*n),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(i)<0&&(s.params.centeredSlides?i=i>o?i-Math.floor(a/2)+1:i+Math.floor(a/2)-1:i>o&&s.params.slidesPerGroup,s.slideTo(i,e?0:void 0))}}t.thumbs={swiper:null},a("beforeInit",(()=>{const{thumbs:e}=t.params;e&&e.swiper&&(l(),o(!0))})),a("slideChange update resize observerUpdate",(()=>{o()})),a("setTransition",((e,s)=>{const a=t.thumbs.swiper;a&&!a.destroyed&&a.setTransition(s)})),a("beforeDestroy",(()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&r&&e.destroy()})),Object.assign(t.thumbs,{init:l,update:o})},function(e){let{swiper:t,extendParams:s,emit:a,once:i}=e;s({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(t,{freeMode:{onTouchStart:function(){const e=t.getTranslate();t.setTranslate(e),t.setTransition(0),t.touchEventsData.velocities.length=0,t.freeMode.onTouchEnd({currentPos:t.rtl?t.translate:-t.translate})},onTouchMove:function(){const{touchEventsData:e,touches:s}=t;0===e.velocities.length&&e.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:e.touchStartTime}),e.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:u()})},onTouchEnd:function(e){let{currentPos:s}=e;const{params:r,$wrapperEl:n,rtlTranslate:l,snapGrid:o,touchEventsData:d}=t,c=u()-d.touchStartTime;if(s<-t.minTranslate())t.slideTo(t.activeIndex);else if(s>-t.maxTranslate())t.slides.length<o.length?t.slideTo(o.length-1):t.slideTo(t.slides.length-1);else{if(r.freeMode.momentum){if(d.velocities.length>1){const e=d.velocities.pop(),s=d.velocities.pop(),a=e.position-s.position,i=e.time-s.time;t.velocity=a/i,t.velocity/=2,Math.abs(t.velocity)<r.freeMode.minimumVelocity&&(t.velocity=0),(i>150||u()-e.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=r.freeMode.momentumVelocityRatio,d.velocities.length=0;let e=1e3*r.freeMode.momentumRatio;const s=t.velocity*e;let c=t.translate+s;l&&(c=-c);let p,h=!1;const m=20*Math.abs(t.velocity)*r.freeMode.momentumBounceRatio;let f;if(c<t.maxTranslate())r.freeMode.momentumBounce?(c+t.maxTranslate()<-m&&(c=t.maxTranslate()-m),p=t.maxTranslate(),h=!0,d.allowMomentumBounce=!0):c=t.maxTranslate(),r.loop&&r.centeredSlides&&(f=!0);else if(c>t.minTranslate())r.freeMode.momentumBounce?(c-t.minTranslate()>m&&(c=t.minTranslate()+m),p=t.minTranslate(),h=!0,d.allowMomentumBounce=!0):c=t.minTranslate(),r.loop&&r.centeredSlides&&(f=!0);else if(r.freeMode.sticky){let e;for(let t=0;t<o.length;t+=1)if(o[t]>-c){e=t;break}c=Math.abs(o[e]-c)<Math.abs(o[e-1]-c)||"next"===t.swipeDirection?o[e]:o[e-1],c=-c}if(f&&i("transitionEnd",(()=>{t.loopFix()})),0!==t.velocity){if(e=l?Math.abs((-c-t.translate)/t.velocity):Math.abs((c-t.translate)/t.velocity),r.freeMode.sticky){const s=Math.abs((l?-c:c)-t.translate),a=t.slidesSizesGrid[t.activeIndex];e=s<a?r.speed:s<2*a?1.5*r.speed:2.5*r.speed}}else if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode.momentumBounce&&h?(t.updateProgress(p),t.setTransition(e),t.setTranslate(c),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd((()=>{t&&!t.destroyed&&d.allowMomentumBounce&&(a("momentumBounce"),t.setTransition(r.speed),setTimeout((()=>{t.setTranslate(p),n.transitionEnd((()=>{t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(a("_freeModeNoMomentumRelease"),t.updateProgress(c),t.setTransition(e),t.setTranslate(c),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd((()=>{t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(c),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(r.freeMode.sticky)return void t.slideToClosest();r.freeMode&&a("_freeModeNoMomentumRelease")}(!r.freeMode.momentum||c>=r.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}}}})},function(e){let t,s,a,{swiper:i,extendParams:r}=e;r({grid:{rows:1,fill:"column"}}),i.grid={initSlides:e=>{const{slidesPerView:r}=i.params,{rows:n,fill:l}=i.params.grid;s=t/n,a=Math.floor(e/n),t=Math.floor(e/n)===e/n?e:Math.ceil(e/n)*n,"auto"!==r&&"row"===l&&(t=Math.max(t,r*n))},updateSlide:(e,r,n,l)=>{const{slidesPerGroup:o,spaceBetween:d}=i.params,{rows:c,fill:p}=i.params.grid;let u,h,m;if("row"===p&&o>1){const s=Math.floor(e/(o*c)),a=e-c*o*s,i=0===s?o:Math.min(Math.ceil((n-s*c*o)/c),o);m=Math.floor(a/i),h=a-m*i+s*o,u=h+m*t/c,r.css({"-webkit-order":u,order:u})}else"column"===p?(h=Math.floor(e/c),m=e-h*c,(h>a||h===a&&m===c-1)&&(m+=1,m>=c&&(m=0,h+=1))):(m=Math.floor(e/s),h=e-m*s);r.css(l("margin-top"),0!==m?d&&`${d}px`:"")},updateWrapperSize:(e,s,a)=>{const{spaceBetween:r,centeredSlides:n,roundLengths:l}=i.params,{rows:o}=i.params.grid;if(i.virtualSize=(e+r)*t,i.virtualSize=Math.ceil(i.virtualSize/o)-r,i.$wrapperEl.css({[a("width")]:`${i.virtualSize+r}px`}),n){s.splice(0,s.length);const e=[];for(let t=0;t<s.length;t+=1){let a=s[t];l&&(a=Math.floor(a)),s[t]<i.virtualSize+s[0]&&e.push(a)}s.push(...e)}}}},function(e){let{swiper:t}=e;Object.assign(t,{appendSlide:K.bind(t),prependSlide:Z.bind(t),addSlide:Q.bind(t),removeSlide:J.bind(t),removeAllSlides:ee.bind(t)})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({fadeEffect:{crossFade:!1,transformEl:null}}),te({effect:"fade",swiper:t,on:a,setTranslate:()=>{const{slides:e}=t,s=t.params.fadeEffect;for(let a=0;a<e.length;a+=1){const e=t.slides.eq(a);let i=-e[0].swiperSlideOffset;t.params.virtualTranslate||(i-=t.translate);let r=0;t.isHorizontal()||(r=i,i=0);const n=t.params.fadeEffect.crossFade?Math.max(1-Math.abs(e[0].progress),0):1+Math.min(Math.max(e[0].progress,-1),0);se(s,e).css({opacity:n}).transform(`translate3d(${i}px, ${r}px, 0px)`)}},setTransition:e=>{const{transformEl:s}=t.params.fadeEffect;(s?t.slides.find(s):t.slides).transition(e),ae({swiper:t,duration:e,transformEl:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const i=(e,t,s)=>{let a=s?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),i=s?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===a.length&&(a=d(`<div class="swiper-slide-shadow-${s?"left":"top"}"></div>`),e.append(a)),0===i.length&&(i=d(`<div class="swiper-slide-shadow-${s?"right":"bottom"}"></div>`),e.append(i)),a.length&&(a[0].style.opacity=Math.max(-t,0)),i.length&&(i[0].style.opacity=Math.max(t,0))};te({effect:"cube",swiper:t,on:a,setTranslate:()=>{const{$el:e,$wrapperEl:s,slides:a,width:r,height:n,rtlTranslate:l,size:o,browser:c}=t,p=t.params.cubeEffect,u=t.isHorizontal(),h=t.virtual&&t.params.virtual.enabled;let m,f=0;p.shadow&&(u?(m=s.find(".swiper-cube-shadow"),0===m.length&&(m=d('<div class="swiper-cube-shadow"></div>'),s.append(m)),m.css({height:`${r}px`})):(m=e.find(".swiper-cube-shadow"),0===m.length&&(m=d('<div class="swiper-cube-shadow"></div>'),e.append(m))));for(let e=0;e<a.length;e+=1){const t=a.eq(e);let s=e;h&&(s=parseInt(t.attr("data-swiper-slide-index"),10));let r=90*s,n=Math.floor(r/360);l&&(r=-r,n=Math.floor(-r/360));const d=Math.max(Math.min(t[0].progress,1),-1);let c=0,m=0,g=0;s%4==0?(c=4*-n*o,g=0):(s-1)%4==0?(c=0,g=4*-n*o):(s-2)%4==0?(c=o+4*n*o,g=o):(s-3)%4==0&&(c=-o,g=3*o+4*o*n),l&&(c=-c),u||(m=c,c=0);const v=`rotateX(${u?0:-r}deg) rotateY(${u?r:0}deg) translate3d(${c}px, ${m}px, ${g}px)`;d<=1&&d>-1&&(f=90*s+90*d,l&&(f=90*-s-90*d)),t.transform(v),p.slideShadows&&i(t,d,u)}if(s.css({"-webkit-transform-origin":`50% 50% -${o/2}px`,"transform-origin":`50% 50% -${o/2}px`}),p.shadow)if(u)m.transform(`translate3d(0px, ${r/2+p.shadowOffset}px, ${-r/2}px) rotateX(90deg) rotateZ(0deg) scale(${p.shadowScale})`);else{const e=Math.abs(f)-90*Math.floor(Math.abs(f)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=p.shadowScale,a=p.shadowScale/t,i=p.shadowOffset;m.transform(`scale3d(${s}, 1, ${a}) translate3d(0px, ${n/2+i}px, ${-n/2/a}px) rotateX(-90deg)`)}const g=c.isSafari||c.isWebView?-o/2:0;s.transform(`translate3d(0px,0,${g}px) rotateX(${t.isHorizontal()?0:f}deg) rotateY(${t.isHorizontal()?-f:0}deg)`),s[0].style.setProperty("--swiper-cube-translate-z",`${g}px`)},setTransition:e=>{const{$el:s,slides:a}=t;a.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&s.find(".swiper-cube-shadow").transition(e)},recreateShadows:()=>{const e=t.isHorizontal();t.slides.each((t=>{const s=Math.max(Math.min(t.progress,1),-1);i(d(t),s,e)}))},getEffectParams:()=>t.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({flipEffect:{slideShadows:!0,limitRotation:!0,transformEl:null}});const i=(e,s,a)=>{let i=t.isHorizontal()?e.find(".swiper-slide-shadow-left"):e.find(".swiper-slide-shadow-top"),r=t.isHorizontal()?e.find(".swiper-slide-shadow-right"):e.find(".swiper-slide-shadow-bottom");0===i.length&&(i=ie(a,e,t.isHorizontal()?"left":"top")),0===r.length&&(r=ie(a,e,t.isHorizontal()?"right":"bottom")),i.length&&(i[0].style.opacity=Math.max(-s,0)),r.length&&(r[0].style.opacity=Math.max(s,0))};te({effect:"flip",swiper:t,on:a,setTranslate:()=>{const{slides:e,rtlTranslate:s}=t,a=t.params.flipEffect;for(let r=0;r<e.length;r+=1){const n=e.eq(r);let l=n[0].progress;t.params.flipEffect.limitRotation&&(l=Math.max(Math.min(n[0].progress,1),-1));const o=n[0].swiperSlideOffset;let d=-180*l,c=0,p=t.params.cssMode?-o-t.translate:-o,u=0;t.isHorizontal()?s&&(d=-d):(u=p,p=0,c=-d,d=0),n[0].style.zIndex=-Math.abs(Math.round(l))+e.length,a.slideShadows&&i(n,l,a);const h=`translate3d(${p}px, ${u}px, 0px) rotateX(${c}deg) rotateY(${d}deg)`;se(a,n).transform(h)}},setTransition:e=>{const{transformEl:s}=t.params.flipEffect;(s?t.slides.find(s):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),ae({swiper:t,duration:e,transformEl:s})},recreateShadows:()=>{const e=t.params.flipEffect;t.slides.each((s=>{const a=d(s);let r=a[0].progress;t.params.flipEffect.limitRotation&&(r=Math.max(Math.min(s.progress,1),-1)),i(a,r,e)}))},getEffectParams:()=>t.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0,transformEl:null}}),te({effect:"coverflow",swiper:t,on:a,setTranslate:()=>{const{width:e,height:s,slides:a,slidesSizesGrid:i}=t,r=t.params.coverflowEffect,n=t.isHorizontal(),l=t.translate,o=n?e/2-l:s/2-l,d=n?r.rotate:-r.rotate,c=r.depth;for(let e=0,t=a.length;e<t;e+=1){const t=a.eq(e),s=i[e],l=(o-t[0].swiperSlideOffset-s/2)/s,p="function"==typeof r.modifier?r.modifier(l):l*r.modifier;let u=n?d*p:0,h=n?0:d*p,m=-c*Math.abs(p),f=r.stretch;"string"==typeof f&&-1!==f.indexOf("%")&&(f=parseFloat(r.stretch)/100*s);let g=n?0:f*p,v=n?f*p:0,w=1-(1-r.scale)*Math.abs(p);Math.abs(v)<.001&&(v=0),Math.abs(g)<.001&&(g=0),Math.abs(m)<.001&&(m=0),Math.abs(u)<.001&&(u=0),Math.abs(h)<.001&&(h=0),Math.abs(w)<.001&&(w=0);const b=`translate3d(${v}px,${g}px,${m}px)  rotateX(${h}deg) rotateY(${u}deg) scale(${w})`;if(se(r,t).transform(b),t[0].style.zIndex=1-Math.abs(Math.round(p)),r.slideShadows){let e=n?t.find(".swiper-slide-shadow-left"):t.find(".swiper-slide-shadow-top"),s=n?t.find(".swiper-slide-shadow-right"):t.find(".swiper-slide-shadow-bottom");0===e.length&&(e=ie(r,t,n?"left":"top")),0===s.length&&(s=ie(r,t,n?"right":"bottom")),e.length&&(e[0].style.opacity=p>0?p:0),s.length&&(s[0].style.opacity=-p>0?-p:0)}}},setTransition:e=>{const{transformEl:s}=t.params.coverflowEffect;(s?t.slides.find(s):t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({creativeEffect:{transformEl:null,limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const i=e=>"string"==typeof e?e:`${e}px`;te({effect:"creative",swiper:t,on:a,setTranslate:()=>{const{slides:e,$wrapperEl:s,slidesSizesGrid:a}=t,r=t.params.creativeEffect,{progressMultiplier:n}=r,l=t.params.centeredSlides;if(l){const e=a[0]/2-t.params.slidesOffsetBefore||0;s.transform(`translateX(calc(50% - ${e}px))`)}for(let s=0;s<e.length;s+=1){const a=e.eq(s),o=a[0].progress,d=Math.min(Math.max(a[0].progress,-r.limitProgress),r.limitProgress);let c=d;l||(c=Math.min(Math.max(a[0].originalProgress,-r.limitProgress),r.limitProgress));const p=a[0].swiperSlideOffset,u=[t.params.cssMode?-p-t.translate:-p,0,0],h=[0,0,0];let m=!1;t.isHorizontal()||(u[1]=u[0],u[0]=0);let f={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};d<0?(f=r.next,m=!0):d>0&&(f=r.prev,m=!0),u.forEach(((e,t)=>{u[t]=`calc(${e}px + (${i(f.translate[t])} * ${Math.abs(d*n)}))`})),h.forEach(((e,t)=>{h[t]=f.rotate[t]*Math.abs(d*n)})),a[0].style.zIndex=-Math.abs(Math.round(o))+e.length;const g=u.join(", "),v=`rotateX(${h[0]}deg) rotateY(${h[1]}deg) rotateZ(${h[2]}deg)`,w=c<0?`scale(${1+(1-f.scale)*c*n})`:`scale(${1-(1-f.scale)*c*n})`,b=c<0?1+(1-f.opacity)*c*n:1-(1-f.opacity)*c*n,x=`translate3d(${g}) ${v} ${w}`;if(m&&f.shadow||!m){let e=a.children(".swiper-slide-shadow");if(0===e.length&&f.shadow&&(e=ie(r,a)),e.length){const t=r.shadowPerProgress?d*(1/r.limitProgress):d;e[0].style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const y=se(r,a);y.transform(x).css({opacity:b}),f.origin&&y.css("transform-origin",f.origin)}},setTransition:e=>{const{transformEl:s}=t.params.creativeEffect;(s?t.slides.find(s):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),ae({swiper:t,duration:e,transformEl:s,allSlides:!0})},perspective:()=>t.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})},function(e){let{swiper:t,extendParams:s,on:a}=e;s({cardsEffect:{slideShadows:!0,transformEl:null,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),te({effect:"cards",swiper:t,on:a,setTranslate:()=>{const{slides:e,activeIndex:s}=t,a=t.params.cardsEffect,{startTranslate:i,isTouched:r}=t.touchEventsData,n=t.translate;for(let l=0;l<e.length;l+=1){const o=e.eq(l),d=o[0].progress,c=Math.min(Math.max(d,-4),4);let p=o[0].swiperSlideOffset;t.params.centeredSlides&&!t.params.cssMode&&t.$wrapperEl.transform(`translateX(${t.minTranslate()}px)`),t.params.centeredSlides&&t.params.cssMode&&(p-=e[0].swiperSlideOffset);let u=t.params.cssMode?-p-t.translate:-p,h=0;const m=-100*Math.abs(c);let f=1,g=-a.perSlideRotate*c,v=a.perSlideOffset-.75*Math.abs(c);const w=t.virtual&&t.params.virtual.enabled?t.virtual.from+l:l,b=(w===s||w===s-1)&&c>0&&c<1&&(r||t.params.cssMode)&&n<i,x=(w===s||w===s+1)&&c<0&&c>-1&&(r||t.params.cssMode)&&n>i;if(b||x){const e=(1-Math.abs((Math.abs(c)-.5)/.5))**.5;g+=-28*c*e,f+=-.5*e,v+=96*e,h=-25*e*Math.abs(c)+"%"}if(u=c<0?`calc(${u}px + (${v*Math.abs(c)}%))`:c>0?`calc(${u}px + (-${v*Math.abs(c)}%))`:`${u}px`,!t.isHorizontal()){const e=h;h=u,u=e}const y=c<0?""+(1+(1-f)*c):""+(1-(1-f)*c),E=`\n        translate3d(${u}, ${h}, ${m}px)\n        rotateZ(${a.rotate?g:0}deg)\n        scale(${y})\n      `;if(a.slideShadows){let e=o.find(".swiper-slide-shadow");0===e.length&&(e=ie(a,o)),e.length&&(e[0].style.opacity=Math.min(Math.max((Math.abs(c)-.5)/.5,0),1))}o[0].style.zIndex=-Math.abs(Math.round(d))+e.length;se(a,o).transform(E)}},setTransition:e=>{const{transformEl:s}=t.params.cardsEffect;(s?t.slides.find(s):t.slides).transition(e).find(".swiper-slide-shadow").transition(e),ae({swiper:t,duration:e,transformEl:s})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!t.params.cssMode})})}];return V.use(re),V}));
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function q(a){for(;++a<n&&!j[a];);return a}function r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(o&&o.length&&o.length>a.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function v(){A(),B.val()!=E&&B.change()}function w(a){if(!B.prop("readonly")){var b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function x(b){if(!B.prop("readonly")){var c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){B.get(0)===document.activeElement&&(z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a))},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})});
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e:e(jQuery,window,document)}(function(e){!function(t){var o="function"==typeof define&&define.amd,a="undefined"!=typeof module&&module.exports,n="https:"==document.location.protocol?"https:":"http:",i="cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js";o||(a?require("jquery-mousewheel")(e):e.event.special.mousewheel||e("head").append(decodeURI("%3Cscript src="+n+"//"+i+"%3E%3C/script%3E"))),t()}(function(){var t,o="mCustomScrollbar",a="mCS",n=".mCustomScrollbar",i={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},r=0,l={},s=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(t){var t=e.extend(!0,{},i,t),o=f.call(this);if(t.live){var s=t.liveSelector||this.selector||n,c=e(s);if("off"===t.live)return void m(s);l[s]=setTimeout(function(){c.mCustomScrollbar(t),"once"===t.live&&c.length&&m(s)},500)}else m(s);return t.setWidth=t.set_width?t.set_width:t.setWidth,t.setHeight=t.set_height?t.set_height:t.setHeight,t.axis=t.horizontalScroll?"x":p(t.axis),t.scrollInertia=t.scrollInertia>0&&t.scrollInertia<17?17:t.scrollInertia,"object"!=typeof t.mouseWheel&&1==t.mouseWheel&&(t.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),t.mouseWheel.scrollAmount=t.mouseWheelPixels?t.mouseWheelPixels:t.mouseWheel.scrollAmount,t.mouseWheel.normalizeDelta=t.advanced.normalizeMouseWheelDelta?t.advanced.normalizeMouseWheelDelta:t.mouseWheel.normalizeDelta,t.scrollButtons.scrollType=g(t.scrollButtons.scrollType),h(t),e(o).each(function(){var o=e(this);if(!o.data(a)){o.data(a,{idx:++r,opt:t,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:o.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var n=o.data(a),i=n.opt,l=o.data("mcs-axis"),s=o.data("mcs-scrollbar-position"),c=o.data("mcs-theme");l&&(i.axis=l),s&&(i.scrollbarPosition=s),c&&(i.theme=c,h(i)),v.call(this),n&&i.callbacks.onCreate&&"function"==typeof i.callbacks.onCreate&&i.callbacks.onCreate.call(this),e("#mCSB_"+n.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,o)}})},update:function(t,o){var n=t||f.call(this);return e(n).each(function(){var t=e(this);if(t.data(a)){var n=t.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container"),l=e("#mCSB_"+n.idx),s=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];if(!r.length)return;n.tweenRunning&&Q(t),o&&n&&i.callbacks.onBeforeUpdate&&"function"==typeof i.callbacks.onBeforeUpdate&&i.callbacks.onBeforeUpdate.call(this),t.hasClass(d[3])&&t.removeClass(d[3]),t.hasClass(d[4])&&t.removeClass(d[4]),l.css("max-height","none"),l.height()!==t.height()&&l.css("max-height",t.height()),_.call(this),"y"===i.axis||i.advanced.autoExpandHorizontalScroll||r.css("width",x(r)),n.overflowed=y.call(this),M.call(this),i.autoDraggerLength&&S.call(this),b.call(this),T.call(this);var c=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];"x"!==i.axis&&(n.overflowed[0]?s[0].height()>s[0].parent().height()?B.call(this):(G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),n.contentReset.y=null):(B.call(this),"y"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[1]&&G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==i.axis&&(n.overflowed[1]?s[1].width()>s[1].parent().width()?B.call(this):(G(t,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),n.contentReset.x=null):(B.call(this),"x"===i.axis?k.call(this):"yx"===i.axis&&n.overflowed[0]&&G(t,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),o&&n&&(2===o&&i.callbacks.onImageLoad&&"function"==typeof i.callbacks.onImageLoad?i.callbacks.onImageLoad.call(this):3===o&&i.callbacks.onSelectorChange&&"function"==typeof i.callbacks.onSelectorChange?i.callbacks.onSelectorChange.call(this):i.callbacks.onUpdate&&"function"==typeof i.callbacks.onUpdate&&i.callbacks.onUpdate.call(this)),N.call(this)}})},scrollTo:function(t,o){if("undefined"!=typeof t&&null!=t){var n=f.call(this);return e(n).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l={trigger:"external",scrollInertia:r.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},s=e.extend(!0,{},l,o),c=Y.call(this,t),d=s.scrollInertia>0&&s.scrollInertia<17?17:s.scrollInertia;c[0]=X.call(this,c[0],"y"),c[1]=X.call(this,c[1],"x"),s.moveDragger&&(c[0]*=i.scrollRatio.y,c[1]*=i.scrollRatio.x),s.dur=ne()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==r.axis&&i.overflowed[0]&&(s.dir="y",s.overwrite="all",G(n,c[0].toString(),s)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==r.axis&&i.overflowed[1]&&(s.dir="x",s.overwrite="none",G(n,c[1].toString(),s))},s.timeout)}})}},stop:function(){var t=f.call(this);return e(t).each(function(){var t=e(this);t.data(a)&&Q(t)})},disable:function(t){var o=f.call(this);return e(o).each(function(){var o=e(this);if(o.data(a)){o.data(a);N.call(this,"remove"),k.call(this),t&&B.call(this),M.call(this,!0),o.addClass(d[3])}})},destroy:function(){var t=f.call(this);return e(t).each(function(){var n=e(this);if(n.data(a)){var i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx),s=e("#mCSB_"+i.idx+"_container"),c=e(".mCSB_"+i.idx+"_scrollbar");r.live&&m(r.liveSelector||e(t).selector),N.call(this,"remove"),k.call(this),B.call(this),n.removeData(a),$(this,"mcs"),c.remove(),s.find("img."+d[2]).removeClass(d[2]),l.replaceWith(s.contents()),n.removeClass(o+" _"+a+"_"+i.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},f=function(){return"object"!=typeof e(this)||e(this).length<1?n:this},h=function(t){var o=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],a=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],n=["minimal","minimal-dark"],i=["minimal","minimal-dark"],r=["minimal","minimal-dark"];t.autoDraggerLength=e.inArray(t.theme,o)>-1?!1:t.autoDraggerLength,t.autoExpandScrollbar=e.inArray(t.theme,a)>-1?!1:t.autoExpandScrollbar,t.scrollButtons.enable=e.inArray(t.theme,n)>-1?!1:t.scrollButtons.enable,t.autoHideScrollbar=e.inArray(t.theme,i)>-1?!0:t.autoHideScrollbar,t.scrollbarPosition=e.inArray(t.theme,r)>-1?"outside":t.scrollbarPosition},m=function(e){l[e]&&(clearTimeout(l[e]),$(l,e))},p=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var t=e(this),n=t.data(a),i=n.opt,r=i.autoExpandScrollbar?" "+d[1]+"_expand":"",l=["<div id='mCSB_"+n.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_vertical"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+n.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+n.idx+"_scrollbar mCS-"+i.theme+" mCSB_scrollTools_horizontal"+r+"'><div class='"+d[12]+"'><div id='mCSB_"+n.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],s="yx"===i.axis?"mCSB_vertical_horizontal":"x"===i.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===i.axis?l[0]+l[1]:"x"===i.axis?l[1]:l[0],u="yx"===i.axis?"<div id='mCSB_"+n.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",f=i.autoHideScrollbar?" "+d[6]:"",h="x"!==i.axis&&"rtl"===n.langDir?" "+d[7]:"";i.setWidth&&t.css("width",i.setWidth),i.setHeight&&t.css("height",i.setHeight),i.setLeft="y"!==i.axis&&"rtl"===n.langDir?"989999px":i.setLeft,t.addClass(o+" _"+a+"_"+n.idx+f+h).wrapInner("<div id='mCSB_"+n.idx+"' class='mCustomScrollBox mCS-"+i.theme+" "+s+"'><div id='mCSB_"+n.idx+"_container' class='mCSB_container' style='position:relative; top:"+i.setTop+"; left:"+i.setLeft+";' dir='"+n.langDir+"' /></div>");var m=e("#mCSB_"+n.idx),p=e("#mCSB_"+n.idx+"_container");"y"===i.axis||i.advanced.autoExpandHorizontalScroll||p.css("width",x(p)),"outside"===i.scrollbarPosition?("static"===t.css("position")&&t.css("position","relative"),t.css("overflow","visible"),m.addClass("mCSB_outside").after(c)):(m.addClass("mCSB_inside").append(c),p.wrap(u)),w.call(this);var g=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},x=function(t){var o=[t[0].scrollWidth,Math.max.apply(Math,t.children().map(function(){return e(this).outerWidth(!0)}).get())],a=t.parent().width();return o[0]>a?o[0]:o[1]>a?o[1]:"100%"},_=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx+"_container");if(n.advanced.autoExpandHorizontalScroll&&"y"!==n.axis){i.css({width:"auto","min-width":0,"overflow-x":"scroll"});var r=Math.ceil(i[0].scrollWidth);3===n.advanced.autoExpandHorizontalScroll||2!==n.advanced.autoExpandHorizontalScroll&&r>i.parent().width()?i.css({width:r,"min-width":"100%","overflow-x":"inherit"}):i.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(i[0].getBoundingClientRect().right+.4)-Math.floor(i[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},w=function(){var t=e(this),o=t.data(a),n=o.opt,i=e(".mCSB_"+o.idx+"_scrollbar:first"),r=oe(n.scrollButtons.tabindex)?"tabindex='"+n.scrollButtons.tabindex+"'":"",l=["<a href='#' class='"+d[13]+"' "+r+" />","<a href='#' class='"+d[14]+"' "+r+" />","<a href='#' class='"+d[15]+"' "+r+" />","<a href='#' class='"+d[16]+"' "+r+" />"],s=["x"===n.axis?l[2]:l[0],"x"===n.axis?l[3]:l[1],l[2],l[3]];n.scrollButtons.enable&&i.prepend(s[0]).append(s[1]).next(".mCSB_scrollTools").prepend(s[2]).append(s[3])},S=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[n.height()/i.outerHeight(!1),n.width()/i.outerWidth(!1)],c=[parseInt(r[0].css("min-height")),Math.round(l[0]*r[0].parent().height()),parseInt(r[1].css("min-width")),Math.round(l[1]*r[1].parent().width())],d=s&&c[1]<c[0]?c[0]:c[1],u=s&&c[3]<c[2]?c[2]:c[3];r[0].css({height:d,"max-height":r[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),r[1].css({width:u,"max-width":r[1].parent().width()-10})},b=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")],l=[i.outerHeight(!1)-n.height(),i.outerWidth(!1)-n.width()],s=[l[0]/(r[0].parent().height()-r[0].height()),l[1]/(r[1].parent().width()-r[1].width())];o.scrollRatio={y:s[0],x:s[1]}},C=function(e,t,o){var a=o?d[0]+"_expanded":"",n=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+a),n.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),n.removeClass(d[1])):(e.addClass(d[0]),n.addClass(d[1])))},y=function(){var t=e(this),o=t.data(a),n=e("#mCSB_"+o.idx),i=e("#mCSB_"+o.idx+"_container"),r=null==o.overflowed?i.height():i.outerHeight(!1),l=null==o.overflowed?i.width():i.outerWidth(!1),s=i[0].scrollHeight,c=i[0].scrollWidth;return s>r&&(r=s),c>l&&(l=c),[r>n.height(),l>n.width()]},B=function(){var t=e(this),o=t.data(a),n=o.opt,i=e("#mCSB_"+o.idx),r=e("#mCSB_"+o.idx+"_container"),l=[e("#mCSB_"+o.idx+"_dragger_vertical"),e("#mCSB_"+o.idx+"_dragger_horizontal")];if(Q(t),("x"!==n.axis&&!o.overflowed[0]||"y"===n.axis&&o.overflowed[0])&&(l[0].add(r).css("top",0),G(t,"_resetY")),"y"!==n.axis&&!o.overflowed[1]||"x"===n.axis&&o.overflowed[1]){var s=dx=0;"rtl"===o.langDir&&(s=i.width()-r.outerWidth(!1),dx=Math.abs(s/o.scrollRatio.x)),r.css("left",s),l[1].css("left",dx),G(t,"_resetX")}},T=function(){function t(){r=setTimeout(function(){e.event.special.mousewheel?(clearTimeout(r),W.call(o[0])):t()},100)}var o=e(this),n=o.data(a),i=n.opt;if(!n.bindEvents){if(I.call(this),i.contentTouchScroll&&D.call(this),E.call(this),i.mouseWheel.enable){var r;t()}P.call(this),U.call(this),i.advanced.autoScrollOnFocus&&H.call(this),i.scrollButtons.enable&&F.call(this),i.keyboard.enable&&q.call(this),n.bindEvents=!0}},k=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=".mCSB_"+o.idx+"_scrollbar",l=e("#mCSB_"+o.idx+",#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,"+r+" ."+d[12]+",#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal,"+r+">a"),s=e("#mCSB_"+o.idx+"_container");n.advanced.releaseDraggableSelectors&&l.add(e(n.advanced.releaseDraggableSelectors)),n.advanced.extraDraggableSelectors&&l.add(e(n.advanced.extraDraggableSelectors)),o.bindEvents&&(e(document).add(e(!A()||top.document)).unbind("."+i),l.each(function(){e(this).unbind("."+i)}),clearTimeout(t[0]._focusTimeout),$(t[0],"_focusTimeout"),clearTimeout(o.sequential.step),$(o.sequential,"step"),clearTimeout(s[0].onCompleteTimeout),$(s[0],"onCompleteTimeout"),o.bindEvents=!1)},M=function(t){var o=e(this),n=o.data(a),i=n.opt,r=e("#mCSB_"+n.idx+"_container_wrapper"),l=r.length?r:e("#mCSB_"+n.idx+"_container"),s=[e("#mCSB_"+n.idx+"_scrollbar_vertical"),e("#mCSB_"+n.idx+"_scrollbar_horizontal")],c=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!t?(s[0].add(c[0]).add(s[0].children("a")).css("display","block"),l.removeClass(d[8]+" "+d[10])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[0].css("display","none"),l.removeClass(d[10])):(s[0].css("display","none"),l.addClass(d[10])),l.addClass(d[8]))),"y"!==i.axis&&(n.overflowed[1]&&!t?(s[1].add(c[1]).add(s[1].children("a")).css("display","block"),l.removeClass(d[9]+" "+d[11])):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&c[1].css("display","none"),l.removeClass(d[11])):(s[1].css("display","none"),l.addClass(d[11])),l.addClass(d[9]))),n.overflowed[0]||n.overflowed[1]?o.removeClass(d[5]):o.addClass(d[5])},O=function(t){var o=t.type,a=t.target.ownerDocument!==document&&null!==frameElement?[e(frameElement).offset().top,e(frameElement).offset().left]:null,n=A()&&t.target.ownerDocument!==top.document&&null!==frameElement?[e(t.view.frameElement).offset().top,e(t.view.frameElement).offset().left]:[0,0];switch(o){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return a?[t.originalEvent.pageY-a[0]+n[0],t.originalEvent.pageX-a[1]+n[1],!1]:[t.originalEvent.pageY,t.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var i=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],r=t.originalEvent.touches.length||t.originalEvent.changedTouches.length;return t.target.ownerDocument!==document?[i.screenY,i.screenX,r>1]:[i.pageY,i.pageX,r>1];default:return a?[t.pageY-a[0]+n[0],t.pageX-a[1]+n[1],!1]:[t.pageY,t.pageX,!1]}},I=function(){function t(e,t,a,n){if(h[0].idleTimer=d.scrollInertia<233?250:0,o.attr("id")===f[1])var i="x",s=(o[0].offsetLeft-t+n)*l.scrollRatio.x;else var i="y",s=(o[0].offsetTop-e+a)*l.scrollRatio.y;G(r,s.toString(),{dir:i,drag:!0})}var o,n,i,r=e(this),l=r.data(a),d=l.opt,u=a+"_"+l.idx,f=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],h=e("#mCSB_"+l.idx+"_container"),m=e("#"+f[0]+",#"+f[1]),p=d.advanced.releaseDraggableSelectors?m.add(e(d.advanced.releaseDraggableSelectors)):m,g=d.advanced.extraDraggableSelectors?e(!A()||top.document).add(e(d.advanced.extraDraggableSelectors)):e(!A()||top.document);m.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(t){if(t.stopImmediatePropagation(),t.preventDefault(),ee(t)){c=!0,s&&(document.onselectstart=function(){return!1}),L.call(h,!1),Q(r),o=e(this);var a=o.offset(),l=O(t)[0]-a.top,u=O(t)[1]-a.left,f=o.height()+a.top,m=o.width()+a.left;f>l&&l>0&&m>u&&u>0&&(n=l,i=u),C(o,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(e){e.stopImmediatePropagation(),e.preventDefault();var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;t(n,i,r,l)}),e(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(e){if(o){var a=o.offset(),r=O(e)[0]-a.top,l=O(e)[1]-a.left;if(n===r&&i===l)return;t(n,i,r,l)}}).add(p).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(){o&&(C(o,"active",d.autoExpandScrollbar),o=null),c=!1,s&&(document.onselectstart=null),L.call(h,!0)})},D=function(){function o(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,b=0,C=0,d=1,y.removeClass("mCS_touch_action");var o=I.offset();u=O(e)[0]-o.top,f=O(e)[1]-o.left,z=[O(e)[0],O(e)[1]]}function n(e){if(te(e)&&!c&&!O(e)[2]&&(T.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!C||b)&&d)){g=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left,n="mcsLinearOut";if(E.push(o),W.push(a),z[2]=Math.abs(O(e)[0]-z[0]),z[3]=Math.abs(O(e)[1]-z[1]),B.overflowed[0])var i=D[0].parent().height()-D[0].height(),r=u-o>0&&o-u>-(i*B.scrollRatio.y)&&(2*z[3]<z[2]||"yx"===T.axis);if(B.overflowed[1])var l=D[1].parent().width()-D[1].width(),h=f-a>0&&a-f>-(l*B.scrollRatio.x)&&(2*z[2]<z[3]||"yx"===T.axis);r||h?(U||e.preventDefault(),b=1):(C=1,y.addClass("mCS_touch_action")),U&&e.preventDefault(),w="yx"===T.axis?[u-o,f-a]:"x"===T.axis?[null,f-a]:[u-o,null],I[0].idleTimer=250,B.overflowed[0]&&s(w[0],R,n,"y","all",!0),B.overflowed[1]&&s(w[1],R,n,"x",L,!0)}}function i(e){if(!te(e)||c||O(e)[2])return void(t=0);t=1,e.stopImmediatePropagation(),Q(y),p=K();var o=M.offset();h=O(e)[0]-o.top,m=O(e)[1]-o.left,E=[],W=[]}function r(e){if(te(e)&&!c&&!O(e)[2]){d=0,e.stopImmediatePropagation(),b=0,C=0,v=K();var t=M.offset(),o=O(e)[0]-t.top,a=O(e)[1]-t.left;if(!(v-g>30)){_=1e3/(v-p);var n="mcsEaseOut",i=2.5>_,r=i?[E[E.length-2],W[W.length-2]]:[0,0];x=i?[o-r[0],a-r[1]]:[o-h,a-m];var u=[Math.abs(x[0]),Math.abs(x[1])];_=i?[Math.abs(x[0]/4),Math.abs(x[1]/4)]:[_,_];var f=[Math.abs(I[0].offsetTop)-x[0]*l(u[0]/_[0],_[0]),Math.abs(I[0].offsetLeft)-x[1]*l(u[1]/_[1],_[1])];w="yx"===T.axis?[f[0],f[1]]:"x"===T.axis?[null,f[1]]:[f[0],null],S=[4*u[0]+T.scrollInertia,4*u[1]+T.scrollInertia];var y=parseInt(T.contentTouchScroll)||0;w[0]=u[0]>y?w[0]:0,w[1]=u[1]>y?w[1]:0,B.overflowed[0]&&s(w[0],S[0],n,"y",L,!1),B.overflowed[1]&&s(w[1],S[1],n,"x",L,!1)}}}function l(e,t){var o=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?o[0]:o[3]:e>60?t>3?o[3]:o[2]:e>30?t>8?o[1]:t>6?o[0]:t>4?t:o[2]:t>8?t:o[3]}function s(e,t,o,a,n,i){e&&G(y,e.toString(),{dur:t,scrollEasing:o,dir:a,overwrite:n,drag:i})}var d,u,f,h,m,p,g,v,x,_,w,S,b,C,y=e(this),B=y.data(a),T=B.opt,k=a+"_"+B.idx,M=e("#mCSB_"+B.idx),I=e("#mCSB_"+B.idx+"_container"),D=[e("#mCSB_"+B.idx+"_dragger_vertical"),e("#mCSB_"+B.idx+"_dragger_horizontal")],E=[],W=[],R=0,L="yx"===T.axis?"none":"all",z=[],P=I.find("iframe"),H=["touchstart."+k+" pointerdown."+k+" MSPointerDown."+k,"touchmove."+k+" pointermove."+k+" MSPointerMove."+k,"touchend."+k+" pointerup."+k+" MSPointerUp."+k],U=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;I.bind(H[0],function(e){o(e)}).bind(H[1],function(e){n(e)}),M.bind(H[0],function(e){i(e)}).bind(H[2],function(e){r(e)}),P.length&&P.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(H[0],function(e){o(e),i(e)}).bind(H[1],function(e){n(e)}).bind(H[2],function(e){r(e)})})})},E=function(){function o(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function n(e,t,o){d.type=o&&i?"stepped":"stepless",d.scrollAmount=10,j(r,e,t,"mcsLinearOut",o?60:null)}var i,r=e(this),l=r.data(a),s=l.opt,d=l.sequential,u=a+"_"+l.idx,f=e("#mCSB_"+l.idx+"_container"),h=f.parent();f.bind("mousedown."+u,function(){t||i||(i=1,c=!0)}).add(document).bind("mousemove."+u,function(e){if(!t&&i&&o()){var a=f.offset(),r=O(e)[0]-a.top+f[0].offsetTop,c=O(e)[1]-a.left+f[0].offsetLeft;r>0&&r<h.height()&&c>0&&c<h.width()?d.step&&n("off",null,"stepped"):("x"!==s.axis&&l.overflowed[0]&&(0>r?n("on",38):r>h.height()&&n("on",40)),"y"!==s.axis&&l.overflowed[1]&&(0>c?n("on",37):c>h.width()&&n("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(){t||(i&&(i=0,n("off",null)),c=!1)})},W=function(){function t(t,a){if(Q(o),!z(o,t.target)){var r="auto"!==i.mouseWheel.deltaFactor?parseInt(i.mouseWheel.deltaFactor):s&&t.deltaFactor<100?100:t.deltaFactor||100,d=i.scrollInertia;if("x"===i.axis||"x"===i.mouseWheel.axis)var u="x",f=[Math.round(r*n.scrollRatio.x),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.width()?.9*l.width():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetLeft),p=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===i.mouseWheel.axis?t.deltaY||a:t.deltaX;else var u="y",f=[Math.round(r*n.scrollRatio.y),parseInt(i.mouseWheel.scrollAmount)],h="auto"!==i.mouseWheel.scrollAmount?f[1]:f[0]>=l.height()?.9*l.height():f[0],m=Math.abs(e("#mCSB_"+n.idx+"_container")[0].offsetTop),p=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=t.deltaY||a;"y"===u&&!n.overflowed[0]||"x"===u&&!n.overflowed[1]||((i.mouseWheel.invert||t.webkitDirectionInvertedFromDevice)&&(v=-v),i.mouseWheel.normalizeDelta&&(v=0>v?-1:1),(v>0&&0!==p||0>v&&p!==g||i.mouseWheel.preventDefault)&&(t.stopImmediatePropagation(),t.preventDefault()),t.deltaFactor<5&&!i.mouseWheel.normalizeDelta&&(h=t.deltaFactor,d=17),G(o,(m-v*h).toString(),{dir:u,dur:d}))}}if(e(this).data(a)){var o=e(this),n=o.data(a),i=n.opt,r=a+"_"+n.idx,l=e("#mCSB_"+n.idx),c=[e("#mCSB_"+n.idx+"_dragger_vertical"),e("#mCSB_"+n.idx+"_dragger_horizontal")],d=e("#mCSB_"+n.idx+"_container").find("iframe");d.length&&d.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind("mousewheel."+r,function(e,o){t(e,o)})})}),l.bind("mousewheel."+r,function(e,o){t(e,o)})}},R=new Object,A=function(t){var o=!1,a=!1,n=null;if(void 0===t?a="#empty":void 0!==e(t).attr("id")&&(a=e(t).attr("id")),a!==!1&&void 0!==R[a])return R[a];if(t){try{var i=t.contentDocument||t.contentWindow.document;n=i.body.innerHTML}catch(r){}o=null!==n}else{try{var i=top.document;n=i.body.innerHTML}catch(r){}o=null!==n}return a!==!1&&(R[a]=o),o},L=function(e){var t=this.find("iframe");if(t.length){var o=e?"auto":"none";t.css("pointer-events",o)}},z=function(t,o){var n=o.nodeName.toLowerCase(),i=t.data(a).opt.mouseWheel.disableOver,r=["select","textarea"];return e.inArray(n,i)>-1&&!(e.inArray(n,r)>-1&&!e(o).is(":focus"))},P=function(){var t,o=e(this),n=o.data(a),i=a+"_"+n.idx,r=e("#mCSB_"+n.idx+"_container"),l=r.parent(),s=e(".mCSB_"+n.idx+"_scrollbar ."+d[12]);s.bind("mousedown."+i+" touchstart."+i+" pointerdown."+i+" MSPointerDown."+i,function(o){c=!0,e(o.target).hasClass("mCSB_dragger")||(t=1)}).bind("touchend."+i+" pointerup."+i+" MSPointerUp."+i,function(){c=!1}).bind("click."+i,function(a){if(t&&(t=0,e(a.target).hasClass(d[12])||e(a.target).hasClass("mCSB_draggerRail"))){Q(o);var i=e(this),s=i.find(".mCSB_dragger");if(i.parent(".mCSB_scrollTools_horizontal").length>0){if(!n.overflowed[1])return;var c="x",u=a.pageX>s.offset().left?-1:1,f=Math.abs(r[0].offsetLeft)-u*(.9*l.width())}else{if(!n.overflowed[0])return;var c="y",u=a.pageY>s.offset().top?-1:1,f=Math.abs(r[0].offsetTop)-u*(.9*l.height())}G(o,f.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},H=function(){var t=e(this),o=t.data(a),n=o.opt,i=a+"_"+o.idx,r=e("#mCSB_"+o.idx+"_container"),l=r.parent();r.bind("focusin."+i,function(){var o=e(document.activeElement),a=r.find(".mCustomScrollBox").length,i=0;o.is(n.advanced.autoScrollOnFocus)&&(Q(t),clearTimeout(t[0]._focusTimeout),t[0]._focusTimer=a?(i+17)*a:0,t[0]._focusTimeout=setTimeout(function(){var e=[ae(o)[0],ae(o)[1]],a=[r[0].offsetTop,r[0].offsetLeft],s=[a[0]+e[0]>=0&&a[0]+e[0]<l.height()-o.outerHeight(!1),a[1]+e[1]>=0&&a[0]+e[1]<l.width()-o.outerWidth(!1)],c="yx"!==n.axis||s[0]||s[1]?"all":"none";"x"===n.axis||s[0]||G(t,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i}),"y"===n.axis||s[1]||G(t,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:i})},t[0]._focusTimer))})},U=function(){var t=e(this),o=t.data(a),n=a+"_"+o.idx,i=e("#mCSB_"+o.idx+"_container").parent();i.bind("scroll."+n,function(){0===i.scrollTop()&&0===i.scrollLeft()||e(".mCSB_"+o.idx+"_scrollbar").css("visibility","hidden")})},F=function(){var t=e(this),o=t.data(a),n=o.opt,i=o.sequential,r=a+"_"+o.idx,l=".mCSB_"+o.idx+"_scrollbar",s=e(l+">a");s.bind("contextmenu."+r,function(e){e.preventDefault()}).bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+" pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+" MSPointerOut."+r+" click."+r,function(a){function r(e,o){i.scrollAmount=n.scrollButtons.scrollAmount,j(t,e,o)}if(a.preventDefault(),ee(a)){var l=e(this).attr("class");switch(i.type=n.scrollButtons.scrollType,a.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===i.type)return;c=!0,o.tweenRunning=!1,r("on",l);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===i.type)return;c=!1,i.dir&&r("off",l);break;case"click":if("stepped"!==i.type||o.tweenRunning)return;r("on",l)}}})},q=function(){function t(t){function a(e,t){r.type=i.keyboard.scrollType,r.scrollAmount=i.keyboard.scrollAmount,"stepped"===r.type&&n.tweenRunning||j(o,e,t)}switch(t.type){case"blur":n.tweenRunning&&r.dir&&a("off",null);break;case"keydown":case"keyup":var l=t.keyCode?t.keyCode:t.which,s="on";if("x"!==i.axis&&(38===l||40===l)||"y"!==i.axis&&(37===l||39===l)){if((38===l||40===l)&&!n.overflowed[0]||(37===l||39===l)&&!n.overflowed[1])return;"keyup"===t.type&&(s="off"),e(document.activeElement).is(u)||(t.preventDefault(),t.stopImmediatePropagation(),a(s,l))}else if(33===l||34===l){if((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type){Q(o);var f=34===l?-1:1;if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=Math.abs(c[0].offsetLeft)-f*(.9*d.width());else var h="y",m=Math.abs(c[0].offsetTop)-f*(.9*d.height());G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===l||36===l)&&!e(document.activeElement).is(u)&&((n.overflowed[0]||n.overflowed[1])&&(t.preventDefault(),t.stopImmediatePropagation()),"keyup"===t.type)){if("x"===i.axis||"yx"===i.axis&&n.overflowed[1]&&!n.overflowed[0])var h="x",m=35===l?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",m=35===l?Math.abs(d.height()-c.outerHeight(!1)):0;G(o,m.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var o=e(this),n=o.data(a),i=n.opt,r=n.sequential,l=a+"_"+n.idx,s=e("#mCSB_"+n.idx),c=e("#mCSB_"+n.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",f=c.find("iframe"),h=["blur."+l+" keydown."+l+" keyup."+l];f.length&&f.each(function(){e(this).bind("load",function(){A(this)&&e(this.contentDocument||this.contentWindow.document).bind(h[0],function(e){t(e)})})}),s.attr("tabindex","0").bind(h[0],function(e){t(e)})},j=function(t,o,n,i,r){function l(e){u.snapAmount&&(f.scrollAmount=u.snapAmount instanceof Array?"x"===f.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var o="stepped"!==f.type,a=r?r:e?o?p/1.5:g:1e3/60,n=e?o?7.5:40:2.5,s=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],m="x"===f.dir[0]?s[1]+f.dir[1]*(d[1]*n):s[0]+f.dir[1]*(d[0]*n),v="x"===f.dir[0]?s[1]+f.dir[1]*parseInt(f.scrollAmount):s[0]+f.dir[1]*parseInt(f.scrollAmount),x="auto"!==f.scrollAmount?v:m,_=i?i:e?o?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",w=!!e;return e&&17>a&&(x="x"===f.dir[0]?s[1]:s[0]),G(t,x.toString(),{dir:f.dir[0],scrollEasing:_,dur:a,onComplete:w}),e?void(f.dir=!1):(clearTimeout(f.step),void(f.step=setTimeout(function(){l()},a)))}function s(){clearTimeout(f.step),$(f,"step"),Q(t)}var c=t.data(a),u=c.opt,f=c.sequential,h=e("#mCSB_"+c.idx+"_container"),m="stepped"===f.type,p=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(o){case"on":if(f.dir=[n===d[16]||n===d[15]||39===n||37===n?"x":"y",n===d[13]||n===d[15]||38===n||37===n?-1:1],Q(t),oe(n)&&"stepped"===f.type)return;l(m);break;case"off":s(),(m||c.tweenRunning&&f.dir)&&l(!0)}},Y=function(t){var o=e(this).data(a).opt,n=[];return"function"==typeof t&&(t=t()),t instanceof Array?n=t.length>1?[t[0],t[1]]:"x"===o.axis?[null,t[0]]:[t[0],null]:(n[0]=t.y?t.y:t.x||"x"===o.axis?null:t,n[1]=t.x?t.x:t.y||"y"===o.axis?null:t),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},X=function(t,o){if(null!=t&&"undefined"!=typeof t){var n=e(this),i=n.data(a),r=i.opt,l=e("#mCSB_"+i.idx+"_container"),s=l.parent(),c=typeof t;o||(o="x"===r.axis?"x":"y");var d="x"===o?l.outerWidth(!1)-s.width():l.outerHeight(!1)-s.height(),f="x"===o?l[0].offsetLeft:l[0].offsetTop,h="x"===o?"left":"top";switch(c){case"function":return t();case"object":var m=t.jquery?t:e(t);if(!m.length)return;return"x"===o?ae(m)[1]:ae(m)[0];case"string":case"number":if(oe(t))return Math.abs(t);if(-1!==t.indexOf("%"))return Math.abs(d*parseInt(t)/100);if(-1!==t.indexOf("-="))return Math.abs(f-parseInt(t.split("-=")[1]));if(-1!==t.indexOf("+=")){var p=f+parseInt(t.split("+=")[1]);return p>=0?0:Math.abs(p)}if(-1!==t.indexOf("px")&&oe(t.split("px")[0]))return Math.abs(t.split("px")[0]);if("top"===t||"left"===t)return 0;if("bottom"===t)return Math.abs(s.height()-l.outerHeight(!1));if("right"===t)return Math.abs(s.width()-l.outerWidth(!1));if("first"===t||"last"===t){var m=l.find(":"+t);return"x"===o?ae(m)[1]:ae(m)[0]}return e(t).length?"x"===o?ae(e(t))[1]:ae(e(t))[0]:(l.css(h,t),void u.update.call(null,n[0]))}}},N=function(t){function o(){return clearTimeout(f[0].autoUpdate),0===l.parents("html").length?void(l=null):void(f[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(s.poll.change.n=i(),s.poll.change.n!==s.poll.change.o)?(s.poll.change.o=s.poll.change.n,void r(3)):c.advanced.updateOnContentResize&&(s.poll.size.n=l[0].scrollHeight+l[0].scrollWidth+f[0].offsetHeight+l[0].offsetHeight+l[0].offsetWidth,s.poll.size.n!==s.poll.size.o)?(s.poll.size.o=s.poll.size.n,void r(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(s.poll.img.n=f.find("img").length,s.poll.img.n===s.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&o()):(s.poll.img.o=s.poll.img.n,void f.find("img").each(function(){n(this)}))},c.advanced.autoUpdateTimeout))}function n(t){function o(e,t){return function(){
return t.apply(e,arguments)}}function a(){this.onload=null,e(t).addClass(d[2]),r(2)}if(e(t).hasClass(d[2]))return void r();var n=new Image;n.onload=o(n,a),n.src=t.src}function i(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=f.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function r(e){clearTimeout(f[0].autoUpdate),u.update.call(null,l[0],e)}var l=e(this),s=l.data(a),c=s.opt,f=e("#mCSB_"+s.idx+"_container");return t?(clearTimeout(f[0].autoUpdate),void $(f[0],"autoUpdate")):void o()},V=function(e,t,o){return Math.round(e/t)*t-o},Q=function(t){var o=t.data(a),n=e("#mCSB_"+o.idx+"_container,#mCSB_"+o.idx+"_container_wrapper,#mCSB_"+o.idx+"_dragger_vertical,#mCSB_"+o.idx+"_dragger_horizontal");n.each(function(){Z.call(this)})},G=function(t,o,n){function i(e){return s&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function r(){return[c.callbacks.alwaysTriggerOffsets||w>=S[0]+y,c.callbacks.alwaysTriggerOffsets||-B>=w]}function l(){var e=[h[0].offsetTop,h[0].offsetLeft],o=[x[0].offsetTop,x[0].offsetLeft],a=[h.outerHeight(!1),h.outerWidth(!1)],i=[f.height(),f.width()];t[0].mcs={content:h,top:e[0],left:e[1],draggerTop:o[0],draggerLeft:o[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(a[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(a[1])-i[1])),direction:n.dir}}var s=t.data(a),c=s.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=e.extend(d,n),u=[n.dur,n.drag?0:n.dur],f=e("#mCSB_"+s.idx),h=e("#mCSB_"+s.idx+"_container"),m=h.parent(),p=c.callbacks.onTotalScrollOffset?Y.call(t,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?Y.call(t,c.callbacks.onTotalScrollBackOffset):[0,0];if(s.trigger=n.trigger,0===m.scrollTop()&&0===m.scrollLeft()||(e(".mCSB_"+s.idx+"_scrollbar").css("visibility","visible"),m.scrollTop(0).scrollLeft(0)),"_resetY"!==o||s.contentReset.y||(i("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(t[0]),s.contentReset.y=1),"_resetX"!==o||s.contentReset.x||(i("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(t[0]),s.contentReset.x=1),"_resetY"!==o&&"_resetX"!==o){if(!s.contentReset.y&&t[0].mcs||!s.overflowed[0]||(i("onOverflowY")&&c.callbacks.onOverflowY.call(t[0]),s.contentReset.x=null),!s.contentReset.x&&t[0].mcs||!s.overflowed[1]||(i("onOverflowX")&&c.callbacks.onOverflowX.call(t[0]),s.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===n.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;o=V(o,v,c.snapOffset)}switch(n.dir){case"x":var x=e("#mCSB_"+s.idx+"_dragger_horizontal"),_="left",w=h[0].offsetLeft,S=[f.width()-h.outerWidth(!1),x.parent().width()-x.width()],b=[o,0===o?0:o/s.scrollRatio.x],y=p[1],B=g[1],T=y>0?y/s.scrollRatio.x:0,k=B>0?B/s.scrollRatio.x:0;break;case"y":var x=e("#mCSB_"+s.idx+"_dragger_vertical"),_="top",w=h[0].offsetTop,S=[f.height()-h.outerHeight(!1),x.parent().height()-x.height()],b=[o,0===o?0:o/s.scrollRatio.y],y=p[0],B=g[0],T=y>0?y/s.scrollRatio.y:0,k=B>0?B/s.scrollRatio.y:0}b[1]<0||0===b[0]&&0===b[1]?b=[0,0]:b[1]>=S[1]?b=[S[0],S[1]]:b[0]=-b[0],t[0].mcs||(l(),i("onInit")&&c.callbacks.onInit.call(t[0])),clearTimeout(h[0].onCompleteTimeout),J(x[0],_,Math.round(b[1]),u[1],n.scrollEasing),!s.tweenRunning&&(0===w&&b[0]>=0||w===S[0]&&b[0]<=S[0])||J(h[0],_,Math.round(b[0]),u[0],n.scrollEasing,n.overwrite,{onStart:function(){n.callbacks&&n.onStart&&!s.tweenRunning&&(i("onScrollStart")&&(l(),c.callbacks.onScrollStart.call(t[0])),s.tweenRunning=!0,C(x),s.cbOffsets=r())},onUpdate:function(){n.callbacks&&n.onUpdate&&i("whileScrolling")&&(l(),c.callbacks.whileScrolling.call(t[0]))},onComplete:function(){if(n.callbacks&&n.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var e=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){i("onScroll")&&(l(),c.callbacks.onScroll.call(t[0])),i("onTotalScroll")&&b[1]>=S[1]-T&&s.cbOffsets[0]&&(l(),c.callbacks.onTotalScroll.call(t[0])),i("onTotalScrollBack")&&b[1]<=k&&s.cbOffsets[1]&&(l(),c.callbacks.onTotalScrollBack.call(t[0])),s.tweenRunning=!1,h[0].idleTimer=0,C(x,"hide")},e)}}})}},J=function(e,t,o,a,n,i,r){function l(){S.stop||(x||m.call(),x=K()-v,s(),x>=S.time&&(S.time=x>S.time?x+f-(x-S.time):x+f-1,S.time<x+1&&(S.time=x+1)),S.time<a?S.id=h(l):g.call())}function s(){a>0?(S.currVal=u(S.time,_,b,a,n),w[t]=Math.round(S.currVal)+"px"):w[t]=o+"px",p.call()}function c(){f=1e3/60,S.time=x+f,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return s(),setTimeout(e,.01)},S.id=h(l)}function d(){null!=S.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(S.id):clearTimeout(S.id),S.id=null)}function u(e,t,o,a,n){switch(n){case"linear":case"mcsLinear":return o*e/a+t;case"mcsLinearOut":return e/=a,e--,o*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=a/2,1>e?o/2*e*e+t:(e--,-o/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=a/2,1>e?o/2*Math.pow(2,10*(e-1))+t:(e--,o/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=a/2,1>e?o/2*e*e*e+t:(e-=2,o/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=a,e--,-o*(e*e*e*e-1)+t;case"easeOutStrong":return o*(-Math.pow(2,-10*e/a)+1)+t;case"easeOut":case"mcsEaseOut":default:var i=(e/=a)*e,r=i*e;return t+o*(.499999999999997*r*i+-2.5*i*i+5.5*r+-6.5*i+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var f,h,r=r||{},m=r.onStart||function(){},p=r.onUpdate||function(){},g=r.onComplete||function(){},v=K(),x=0,_=e.offsetTop,w=e.style,S=e._mTween[t];"left"===t&&(_=e.offsetLeft);var b=o-_;S.stop=0,"none"!==i&&d(),c()},K=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Z=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],o=0;o<t.length;o++){var a=t[o];e._mTween[a].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[a].id):clearTimeout(e._mTween[a].id),e._mTween[a].id=null,e._mTween[a].stop=1)}},$=function(e,t){try{delete e[t]}catch(o){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},oe=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ae=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},ne=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return t?document[t]:!1};e.fn[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o]=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist"):u.init.apply(this,arguments)},e[o].defaults=i,window[o]=!0,e(window).bind("load",function(){e(n)[o](),e.extend(e.expr[":"],{mcsInView:e.expr[":"].mcsInView||function(t){var o,a,n=e(t),i=n.parents(".mCSB_container");if(i.length)return o=i.parent(),a=[i[0].offsetTop,i[0].offsetLeft],a[0]+ae(n)[0]>=0&&a[0]+ae(n)[0]<o.height()-n.outerHeight(!1)&&a[1]+ae(n)[1]>=0&&a[1]+ae(n)[1]<o.width()-n.outerWidth(!1)},mcsInSight:e.expr[":"].mcsInSight||function(t,o,a){var n,i,r,l,s=e(t),c=s.parents(".mCSB_container"),d="exact"===a[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return n=[s.outerHeight(!1),s.outerWidth(!1)],r=[c[0].offsetTop+ae(s)[0],c[0].offsetLeft+ae(s)[1]],i=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],l=[n[0]<i[0]?d[0]:d[1],n[1]<i[1]?d[0]:d[1]],r[0]-i[0]*l[0][0]<0&&r[0]+n[0]-i[0]*l[0][1]>=0&&r[1]-i[1]*l[1][0]<0&&r[1]+n[1]-i[1]*l[1][1]>=0},mcsOverflow:e.expr[":"].mcsOverflow||function(t){var o=e(t).data(a);if(o)return o.overflowed[0]||o.overflowed[1]}})})})});
(function(){var __webpack_modules__={"./node_modules/@babel/runtime/regenerator/index.js":function(module,__unused_webpack_exports,__webpack_require__){eval('module.exports=__webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js");\n\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/regenerator/index.js?')},"./node_modules/regenerator-runtime/runtime.js":function(module){eval('/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime=(function (exports){\n  "use strict";\n\n  var Op=Object.prototype;\n  var hasOwn=Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol=typeof Symbol==="function" ? Symbol:{};\n  var iteratorSymbol=$Symbol.iterator||"@@iterator";\n  var asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator";\n  var toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";\n\n  function define(obj, key, value){\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, "");\n  } catch (err){\n    define=function(obj, key, value){\n      return obj[key]=value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList){\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator=outerFn&&outerFn.prototype instanceof Generator ? outerFn:Generator;\n    var generator=Object.create(protoGenerator.prototype);\n    var context=new Context(tryLocsList||[]);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke=makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap=wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there\'s no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don\'t have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg){\n    try {\n      return { type: "normal", arg: fn.call(obj, arg) };\n    } catch (err){\n      return { type: "throw", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart="suspendedStart";\n  var GenStateSuspendedYield="suspendedYield";\n  var GenStateExecuting="executing";\n  var GenStateCompleted="completed";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel={};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator(){}\n  function GeneratorFunction(){}\n  function GeneratorFunctionPrototype(){}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don\'t natively support it.\n  var IteratorPrototype={};\n  define(IteratorPrototype, iteratorSymbol, function (){\n    return this;\n  });\n\n  var getProto=Object.getPrototypeOf;\n  var NativeIteratorPrototype=getProto&&getProto(getProto(values([])));\n  if(NativeIteratorPrototype&&\n      NativeIteratorPrototype!==Op&&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)){\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype=NativeIteratorPrototype;\n  }\n\n  var Gp=GeneratorFunctionPrototype.prototype=\n    Generator.prototype=Object.create(IteratorPrototype);\n  GeneratorFunction.prototype=GeneratorFunctionPrototype;\n  define(Gp, "constructor", GeneratorFunctionPrototype);\n  define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);\n  GeneratorFunction.displayName=define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    "GeneratorFunction"\n);\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype){\n    ["next", "throw", "return"].forEach(function(method){\n      define(prototype, method, function(arg){\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction=function(genFun){\n    var ctor=typeof genFun==="function"&&genFun.constructor;\n    return ctor\n      ? ctor===GeneratorFunction||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName||ctor.name)==="GeneratorFunction"\n:false;\n  };\n\n  exports.mark=function(genFun){\n    if(Object.setPrototypeOf){\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    }else{\n      genFun.__proto__=GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, "GeneratorFunction");\n    }\n    genFun.prototype=Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, "__await")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap=function(arg){\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl){\n    function invoke(method, arg, resolve, reject){\n      var record=tryCatch(generator[method], generator, arg);\n      if(record.type==="throw"){\n        reject(record.arg);\n      }else{\n        var result=record.arg;\n        var value=result.value;\n        if(value&&\n            typeof value==="object"&&\n            hasOwn.call(value, "__await")){\n          return PromiseImpl.resolve(value.__await).then(function(value){\n            invoke("next", value, resolve, reject);\n          }, function(err){\n            invoke("throw", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped){\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value=unwrapped;\n          resolve(result);\n        }, function(error){\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke("throw", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg){\n      function callInvokeWithMethodAndArg(){\n        return new PromiseImpl(function(resolve, reject){\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise=\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n):callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke=enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function (){\n    return this;\n  });\n  exports.AsyncIterator=AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async=function(innerFn, outerFn, self, tryLocsList, PromiseImpl){\n    if(PromiseImpl===void 0) PromiseImpl=Promise;\n\n    var iter=new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n);\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n:iter.next().then(function(result){\n          return result.done ? result.value:iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context){\n    var state=GenStateSuspendedStart;\n\n    return function invoke(method, arg){\n      if(state===GenStateExecuting){\n        throw new Error("Generator is already running");\n      }\n\n      if(state===GenStateCompleted){\n        if(method==="throw"){\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method=method;\n      context.arg=arg;\n\n      while (true){\n        var delegate=context.delegate;\n        if(delegate){\n          var delegateResult=maybeInvokeDelegate(delegate, context);\n          if(delegateResult){\n            if(delegateResult===ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if(context.method==="next"){\n          // Setting context._sent for legacy support of Babel\'s\n          // function.sent implementation.\n          context.sent=context._sent=context.arg;\n\n        }else if(context.method==="throw"){\n          if(state===GenStateSuspendedStart){\n            state=GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        }else if(context.method==="return"){\n          context.abrupt("return", context.arg);\n        }\n\n        state=GenStateExecuting;\n\n        var record=tryCatch(innerFn, self, context);\n        if(record.type==="normal"){\n          // If an exception is thrown from innerFn, we leave state===\n          // GenStateExecuting and loop back for another invocation.\n          state=context.done\n            ? GenStateCompleted\n:GenStateSuspendedYield;\n\n          if(record.arg===ContinueSentinel){\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        }else if(record.type==="throw"){\n          state=GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method="throw";\n          context.arg=record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context){\n    var method=delegate.iterator[context.method];\n    if(method===undefined){\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate=null;\n\n      if(context.method==="throw"){\n        // Note: ["return"] must be used for ES3 parsing compatibility.\n        if(delegate.iterator["return"]){\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method="return";\n          context.arg=undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if(context.method==="throw"){\n            // If maybeInvokeDelegate(context) changed context.method from\n            // "return" to "throw", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method="throw";\n        context.arg=new TypeError(\n          "The iterator does not provide a \'throw\' method");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record=tryCatch(method, delegate.iterator, context.arg);\n\n    if(record.type==="throw"){\n      context.method="throw";\n      context.arg=record.arg;\n      context.delegate=null;\n      return ContinueSentinel;\n    }\n\n    var info=record.arg;\n\n    if(! info){\n      context.method="throw";\n      context.arg=new TypeError("iterator result is not an object");\n      context.delegate=null;\n      return ContinueSentinel;\n    }\n\n    if(info.done){\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName]=info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next=delegate.nextLoc;\n\n      // If context.method was "throw" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was "next", forget context.arg since it has been\n      // "consumed" by the delegate iterator. If context.method was\n      // "return", allow the original .return call to continue in the\n      // outer generator.\n      if(context.method!=="return"){\n        context.method="next";\n        context.arg=undefined;\n      }\n\n    }else{\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate=null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, "Generator");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers\' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn\'t happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function(){\n    return this;\n  });\n\n  define(Gp, "toString", function(){\n    return "[object Generator]";\n  });\n\n  function pushTryEntry(locs){\n    var entry={ tryLoc: locs[0] };\n\n    if(1 in locs){\n      entry.catchLoc=locs[1];\n    }\n\n    if(2 in locs){\n      entry.finallyLoc=locs[2];\n      entry.afterLoc=locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry){\n    var record=entry.completion||{};\n    record.type="normal";\n    delete record.arg;\n    entry.completion=record;\n  }\n\n  function Context(tryLocsList){\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries=[{ tryLoc: "root" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys=function(object){\n    var keys=[];\n    for (var key in object){\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next(){\n      while (keys.length){\n        var key=keys.pop();\n        if(key in object){\n          next.value=key;\n          next.done=false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done=true;\n      return next;\n    };\n  };\n\n  function values(iterable){\n    if(iterable){\n      var iteratorMethod=iterable[iteratorSymbol];\n      if(iteratorMethod){\n        return iteratorMethod.call(iterable);\n      }\n\n      if(typeof iterable.next==="function"){\n        return iterable;\n      }\n\n      if(!isNaN(iterable.length)){\n        var i=-1, next=function next(){\n          while (++i < iterable.length){\n            if(hasOwn.call(iterable, i)){\n              next.value=iterable[i];\n              next.done=false;\n              return next;\n            }\n          }\n\n          next.value=undefined;\n          next.done=true;\n\n          return next;\n        };\n\n        return next.next=next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values=values;\n\n  function doneResult(){\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype={\n    constructor: Context,\n\n    reset: function(skipTempReset){\n      this.prev=0;\n      this.next=0;\n      // Resetting context._sent for legacy support of Babel\'s\n      // function.sent implementation.\n      this.sent=this._sent=undefined;\n      this.done=false;\n      this.delegate=null;\n\n      this.method="next";\n      this.arg=undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if(!skipTempReset){\n        for (var name in this){\n          // Not sure about the optimal order of these conditions:\n          if(name.charAt(0)==="t"&&\n              hasOwn.call(this, name)&&\n              !isNaN(+name.slice(1))){\n            this[name]=undefined;\n          }\n        }\n      }\n    },\n\n    stop: function(){\n      this.done=true;\n\n      var rootEntry=this.tryEntries[0];\n      var rootRecord=rootEntry.completion;\n      if(rootRecord.type==="throw"){\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception){\n      if(this.done){\n        throw exception;\n      }\n\n      var context=this;\n      function handle(loc, caught){\n        record.type="throw";\n        record.arg=exception;\n        context.next=loc;\n\n        if(caught){\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method="next";\n          context.arg=undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i=this.tryEntries.length - 1; i >=0; --i){\n        var entry=this.tryEntries[i];\n        var record=entry.completion;\n\n        if(entry.tryLoc==="root"){\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle("end");\n        }\n\n        if(entry.tryLoc <=this.prev){\n          var hasCatch=hasOwn.call(entry, "catchLoc");\n          var hasFinally=hasOwn.call(entry, "finallyLoc");\n\n          if(hasCatch&&hasFinally){\n            if(this.prev < entry.catchLoc){\n              return handle(entry.catchLoc, true);\n            }else if(this.prev < entry.finallyLoc){\n              return handle(entry.finallyLoc);\n            }\n\n          }else if(hasCatch){\n            if(this.prev < entry.catchLoc){\n              return handle(entry.catchLoc, true);\n            }\n\n          }else if(hasFinally){\n            if(this.prev < entry.finallyLoc){\n              return handle(entry.finallyLoc);\n            }\n\n          }else{\n            throw new Error("try statement without catch or finally");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg){\n      for (var i=this.tryEntries.length - 1; i >=0; --i){\n        var entry=this.tryEntries[i];\n        if(entry.tryLoc <=this.prev&&\n            hasOwn.call(entry, "finallyLoc")&&\n            this.prev < entry.finallyLoc){\n          var finallyEntry=entry;\n          break;\n        }\n      }\n\n      if(finallyEntry&&\n          (type==="break"||\n           type==="continue")&&\n          finallyEntry.tryLoc <=arg&&\n          arg <=finallyEntry.finallyLoc){\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry=null;\n      }\n\n      var record=finallyEntry ? finallyEntry.completion:{};\n      record.type=type;\n      record.arg=arg;\n\n      if(finallyEntry){\n        this.method="next";\n        this.next=finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc){\n      if(record.type==="throw"){\n        throw record.arg;\n      }\n\n      if(record.type==="break"||\n          record.type==="continue"){\n        this.next=record.arg;\n      }else if(record.type==="return"){\n        this.rval=this.arg=record.arg;\n        this.method="return";\n        this.next="end";\n      }else if(record.type==="normal"&&afterLoc){\n        this.next=afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc){\n      for (var i=this.tryEntries.length - 1; i >=0; --i){\n        var entry=this.tryEntries[i];\n        if(entry.finallyLoc===finallyLoc){\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    "catch": function(tryLoc){\n      for (var i=this.tryEntries.length - 1; i >=0; --i){\n        var entry=this.tryEntries[i];\n        if(entry.tryLoc===tryLoc){\n          var record=entry.completion;\n          if(record.type==="throw"){\n            var thrown=record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error("illegal catch attempt");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc){\n      this.delegate={\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if(this.method==="next"){\n        // Deliberately forget the last sent value so that we don\'t\n        // accidentally pass it on to the delegate.\n        this.arg=undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n   true ? module.exports:0\n));\n\ntry {\n  regeneratorRuntime=runtime;\n} catch (accidentalStrictMode){\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you\'ve misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you\'re not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if(typeof globalThis==="object"){\n    globalThis.regeneratorRuntime=runtime;\n  }else{\n    Function("r", "regeneratorRuntime=r")(runtime);\n  }\n}\n\n\n//# sourceURL=webpack://startHtml/./node_modules/regenerator-runtime/runtime.js?')},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _assertThisInitialized; }\n/* harmony export */ });\nfunction _assertThisInitialized(self){\n  if(self===void 0){\n    throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n  }\n\n  return self;\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?')},"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _asyncToGenerator; }\n/* harmony export */ });\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg){\n  try {\n    var info=gen[key](arg);\n    var value=info.value;\n  } catch (error){\n    reject(error);\n    return;\n  }\n\n  if(info.done){\n    resolve(value);\n  }else{\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn){\n  return function (){\n    var self=this,\n        args=arguments;\n    return new Promise(function (resolve, reject){\n      var gen=fn.apply(self, args);\n\n      function _next(value){\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);\n      }\n\n      function _throw(err){\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js?')},"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _classCallCheck; }\n/* harmony export */ });\nfunction _classCallCheck(instance, Constructor){\n  if(!(instance instanceof Constructor)){\n    throw new TypeError("Cannot call a class as a function");\n  }\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js?')},"./node_modules/@babel/runtime/helpers/esm/createClass.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _createClass; }\n/* harmony export */ });\nfunction _defineProperties(target, props){\n  for (var i=0; i < props.length; i++){\n    var descriptor=props[i];\n    descriptor.enumerable=descriptor.enumerable||false;\n    descriptor.configurable=true;\n    if("value" in descriptor) descriptor.writable=true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps){\n  if(protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if(staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/createClass.js?')},"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _getPrototypeOf; }\n/* harmony export */ });\nfunction _getPrototypeOf(o){\n  _getPrototypeOf=Object.setPrototypeOf ? Object.getPrototypeOf:function _getPrototypeOf(o){\n    return o.__proto__||Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js?')},"./node_modules/@babel/runtime/helpers/esm/inherits.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _inherits; }\n/* harmony export */ });\n/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");\n\nfunction _inherits(subClass, superClass){\n  if(typeof superClass!=="function"&&superClass!==null){\n    throw new TypeError("Super expression must either be null or a function");\n  }\n\n  subClass.prototype=Object.create(superClass&&superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if(superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass);\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/inherits.js?')},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _possibleConstructorReturn; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");\n/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");\n\n\nfunction _possibleConstructorReturn(self, call){\n  if(call&&((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(call)==="object"||typeof call==="function")){\n    return call;\n  }else if(call!==void 0){\n    throw new TypeError("Derived constructors may only return object or undefined");\n  }\n\n  return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(self);\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?')},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _setPrototypeOf; }\n/* harmony export */ });\nfunction _setPrototypeOf(o, p){\n  _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o, p){\n    o.__proto__=p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?')},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ _typeof; }\n/* harmony export */ });\nfunction _typeof(obj){\n  "@babel/helpers - typeof";\n\n  if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){\n    _typeof=function _typeof(obj){\n      return typeof obj;\n    };\n  }else{\n    _typeof=function _typeof(obj){\n      return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype ? "symbol":typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\n//# sourceURL=webpack://startHtml/./node_modules/@babel/runtime/helpers/esm/typeof.js?')},"./node_modules/@kurkle/color/dist/color.esm.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"Color\": function(){ return /* binding */ Color; },\n/* harmony export */   \"b2n\": function(){ return /* binding */ b2n; },\n/* harmony export */   \"b2p\": function(){ return /* binding */ b2p; },\n/* harmony export */   \"default\": function(){ return /* binding */ index_esm; },\n/* harmony export */   \"hexParse\": function(){ return /* binding */ hexParse; },\n/* harmony export */   \"hexString\": function(){ return /* binding */ hexString; },\n/* harmony export */   \"hsl2rgb\": function(){ return /* binding */ hsl2rgb; },\n/* harmony export */   \"hslString\": function(){ return /* binding */ hslString; },\n/* harmony export */   \"hsv2rgb\": function(){ return /* binding */ hsv2rgb; },\n/* harmony export */   \"hueParse\": function(){ return /* binding */ hueParse; },\n/* harmony export */   \"hwb2rgb\": function(){ return /* binding */ hwb2rgb; },\n/* harmony export */   \"lim\": function(){ return /* binding */ lim; },\n/* harmony export */   \"n2b\": function(){ return /* binding */ n2b; },\n/* harmony export */   \"n2p\": function(){ return /* binding */ n2p; },\n/* harmony export */   \"nameParse\": function(){ return /* binding */ nameParse; },\n/* harmony export */   \"p2b\": function(){ return /* binding */ p2b; },\n/* harmony export */   \"rgb2hsl\": function(){ return /* binding */ rgb2hsl; },\n/* harmony export */   \"rgbParse\": function(){ return /* binding */ rgbParse; },\n/* harmony export */   \"rgbString\": function(){ return /* binding */ rgbString; },\n/* harmony export */   \"rotate\": function(){ return /* binding */ rotate; },\n/* harmony export */   \"round\": function(){ return /* binding */ round; }\n/* harmony export */ });\n/*!\n * @kurkle/color v0.3.2\n * https://github.com/kurkle/color#readme\n * (c) 2023 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v){\n  return v + 0.5 | 0;\n}\nconst lim=(v, l, h)=> Math.max(Math.min(v, h), l);\nfunction p2b(v){\n  return lim(round(v * 2.55), 0, 255);\n}\nfunction b2p(v){\n  return lim(round(v / 2.55), 0, 100);\n}\nfunction n2b(v){\n  return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v){\n  return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v){\n  return lim(round(v * 100), 0, 100);\n}\n\nconst map$1={0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};\nconst hex=[...'0123456789ABCDEF'];\nconst h1=b => hex[b & 0xF];\nconst h2=b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq=b => ((b & 0xF0) >> 4)===(b & 0xF);\nconst isShort=v => eq(v.r)&&eq(v.g)&&eq(v.b)&&eq(v.a);\nfunction hexParse(str){\n  var len=str.length;\n  var ret;\n  if(str[0]==='#'){\n    if(len===4||len===5){\n      ret={\n        r: 255 & map$1[str[1]] * 17,\n        g: 255 & map$1[str[2]] * 17,\n        b: 255 & map$1[str[3]] * 17,\n        a: len===5 ? map$1[str[4]] * 17:255\n      };\n    }else if(len===7||len===9){\n      ret={\n        r: map$1[str[1]] << 4 | map$1[str[2]],\n        g: map$1[str[3]] << 4 | map$1[str[4]],\n        b: map$1[str[5]] << 4 | map$1[str[6]],\n        a: len===9 ? (map$1[str[7]] << 4 | map$1[str[8]]):255\n      };\n    }\n  }\n  return ret;\n}\nconst alpha=(a, f)=> a < 255 ? f(a):'';\nfunction hexString(v){\n  var f=isShort(v) ? h1:h2;\n  return v\n    ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n:undefined;\n}\n\nconst HUE_RE=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l){\n  const a=s * Math.min(l, 1 - l);\n  const f=(n, k=(n + h / 30) % 12)=> l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n  return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v){\n  const f=(n, k=(n + h / 60) % 6)=> v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n  return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b){\n  const rgb=hsl2rgbn(h, 1, 0.5);\n  let i;\n  if(w + b > 1){\n    i=1 / (w + b);\n    w *=i;\n    b *=i;\n  }\n  for (i=0; i < 3; i++){\n    rgb[i] *=1 - w - b;\n    rgb[i] +=w;\n  }\n  return rgb;\n}\nfunction hueValue(r, g, b, d, max){\n  if(r===max){\n    return ((g - b) / d) + (g < b ? 6:0);\n  }\n  if(g===max){\n    return (b - r) / d + 2;\n  }\n  return (r - g) / d + 4;\n}\nfunction rgb2hsl(v){\n  const range=255;\n  const r=v.r / range;\n  const g=v.g / range;\n  const b=v.b / range;\n  const max=Math.max(r, g, b);\n  const min=Math.min(r, g, b);\n  const l=(max + min) / 2;\n  let h, s, d;\n  if(max!==min){\n    d=max - min;\n    s=l > 0.5 ? d / (2 - max - min):d / (max + min);\n    h=hueValue(r, g, b, d, max);\n    h=h * 60 + 0.5;\n  }\n  return [h | 0, s||0, l];\n}\nfunction calln(f, a, b, c){\n  return (\n    Array.isArray(a)\n      ? f(a[0], a[1], a[2])\n:f(a, b, c)\n).map(n2b);\n}\nfunction hsl2rgb(h, s, l){\n  return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b){\n  return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v){\n  return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h){\n  return (h % 360 + 360) % 360;\n}\nfunction hueParse(str){\n  const m=HUE_RE.exec(str);\n  let a=255;\n  let v;\n  if(!m){\n    return;\n  }\n  if(m[5]!==v){\n    a=m[6] ? p2b(+m[5]):n2b(+m[5]);\n  }\n  const h=hue(+m[2]);\n  const p1=+m[3] / 100;\n  const p2=+m[4] / 100;\n  if(m[1]==='hwb'){\n    v=hwb2rgb(h, p1, p2);\n  }else if(m[1]==='hsv'){\n    v=hsv2rgb(h, p1, p2);\n  }else{\n    v=hsl2rgb(h, p1, p2);\n  }\n  return {\n    r: v[0],\n    g: v[1],\n    b: v[2],\n    a: a\n  };\n}\nfunction rotate(v, deg){\n  var h=rgb2hsl(v);\n  h[0]=hue(h[0] + deg);\n  h=hsl2rgb(h);\n  v.r=h[0];\n  v.g=h[1];\n  v.b=h[2];\n}\nfunction hslString(v){\n  if(!v){\n    return;\n  }\n  const a=rgb2hsl(v);\n  const h=a[0];\n  const s=n2p(a[1]);\n  const l=n2p(a[2]);\n  return v.a < 255\n    ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n:`hsl(${h}, ${s}%, ${l}%)`;\n}\n\nconst map={\n  x: 'dark',\n  Z: 'light',\n  Y: 're',\n  X: 'blu',\n  W: 'gr',\n  V: 'medium',\n  U: 'slate',\n  A: 'ee',\n  T: 'ol',\n  S: 'or',\n  B: 'ra',\n  C: 'lateg',\n  D: 'ights',\n  R: 'in',\n  Q: 'turquois',\n  E: 'hi',\n  P: 'ro',\n  O: 'al',\n  N: 'le',\n  M: 'de',\n  L: 'yello',\n  F: 'en',\n  K: 'ch',\n  G: 'arks',\n  H: 'ea',\n  I: 'ightg',\n  J: 'wh'\n};\nconst names$1={\n  OiceXe: 'f0f8ff',\n  antiquewEte: 'faebd7',\n  aqua: 'ffff',\n  aquamarRe: '7fffd4',\n  azuY: 'f0ffff',\n  beige: 'f5f5dc',\n  bisque: 'ffe4c4',\n  black: '0',\n  blanKedOmond: 'ffebcd',\n  Xe: 'ff',\n  XeviTet: '8a2be2',\n  bPwn: 'a52a2a',\n  burlywood: 'deb887',\n  caMtXe: '5f9ea0',\n  KartYuse: '7fff00',\n  KocTate: 'd2691e',\n  cSO: 'ff7f50',\n  cSnflowerXe: '6495ed',\n  cSnsilk: 'fff8dc',\n  crimson: 'dc143c',\n  cyan: 'ffff',\n  xXe: '8b',\n  xcyan: '8b8b',\n  xgTMnPd: 'b8860b',\n  xWay: 'a9a9a9',\n  xgYF: '6400',\n  xgYy: 'a9a9a9',\n  xkhaki: 'bdb76b',\n  xmagFta: '8b008b',\n  xTivegYF: '556b2f',\n  xSange: 'ff8c00',\n  xScEd: '9932cc',\n  xYd: '8b0000',\n  xsOmon: 'e9967a',\n  xsHgYF: '8fbc8f',\n  xUXe: '483d8b',\n  xUWay: '2f4f4f',\n  xUgYy: '2f4f4f',\n  xQe: 'ced1',\n  xviTet: '9400d3',\n  dAppRk: 'ff1493',\n  dApskyXe: 'bfff',\n  dimWay: '696969',\n  dimgYy: '696969',\n  dodgerXe: '1e90ff',\n  fiYbrick: 'b22222',\n  flSOwEte: 'fffaf0',\n  foYstWAn: '228b22',\n  fuKsia: 'ff00ff',\n  gaRsbSo: 'dcdcdc',\n  ghostwEte: 'f8f8ff',\n  gTd: 'ffd700',\n  gTMnPd: 'daa520',\n  Way: '808080',\n  gYF: '8000',\n  gYFLw: 'adff2f',\n  gYy: '808080',\n  honeyMw: 'f0fff0',\n  hotpRk: 'ff69b4',\n  RdianYd: 'cd5c5c',\n  Rdigo: '4b0082',\n  ivSy: 'fffff0',\n  khaki: 'f0e68c',\n  lavFMr: 'e6e6fa',\n  lavFMrXsh: 'fff0f5',\n  lawngYF: '7cfc00',\n  NmoncEffon: 'fffacd',\n  ZXe: 'add8e6',\n  ZcSO: 'f08080',\n  Zcyan: 'e0ffff',\n  ZgTMnPdLw: 'fafad2',\n  ZWay: 'd3d3d3',\n  ZgYF: '90ee90',\n  ZgYy: 'd3d3d3',\n  ZpRk: 'ffb6c1',\n  ZsOmon: 'ffa07a',\n  ZsHgYF: '20b2aa',\n  ZskyXe: '87cefa',\n  ZUWay: '778899',\n  ZUgYy: '778899',\n  ZstAlXe: 'b0c4de',\n  ZLw: 'ffffe0',\n  lime: 'ff00',\n  limegYF: '32cd32',\n  lRF: 'faf0e6',\n  magFta: 'ff00ff',\n  maPon: '800000',\n  VaquamarRe: '66cdaa',\n  VXe: 'cd',\n  VScEd: 'ba55d3',\n  VpurpN: '9370db',\n  VsHgYF: '3cb371',\n  VUXe: '7b68ee',\n  VsprRggYF: 'fa9a',\n  VQe: '48d1cc',\n  VviTetYd: 'c71585',\n  midnightXe: '191970',\n  mRtcYam: 'f5fffa',\n  mistyPse: 'ffe4e1',\n  moccasR: 'ffe4b5',\n  navajowEte: 'ffdead',\n  navy: '80',\n  Tdlace: 'fdf5e6',\n  Tive: '808000',\n  TivedBb: '6b8e23',\n  Sange: 'ffa500',\n  SangeYd: 'ff4500',\n  ScEd: 'da70d6',\n  pOegTMnPd: 'eee8aa',\n  pOegYF: '98fb98',\n  pOeQe: 'afeeee',\n  pOeviTetYd: 'db7093',\n  papayawEp: 'ffefd5',\n  pHKpuff: 'ffdab9',\n  peru: 'cd853f',\n  pRk: 'ffc0cb',\n  plum: 'dda0dd',\n  powMrXe: 'b0e0e6',\n  purpN: '800080',\n  YbeccapurpN: '663399',\n  Yd: 'ff0000',\n  Psybrown: 'bc8f8f',\n  PyOXe: '4169e1',\n  saddNbPwn: '8b4513',\n  sOmon: 'fa8072',\n  sandybPwn: 'f4a460',\n  sHgYF: '2e8b57',\n  sHshell: 'fff5ee',\n  siFna: 'a0522d',\n  silver: 'c0c0c0',\n  skyXe: '87ceeb',\n  UXe: '6a5acd',\n  UWay: '708090',\n  UgYy: '708090',\n  snow: 'fffafa',\n  sprRggYF: 'ff7f',\n  stAlXe: '4682b4',\n  tan: 'd2b48c',\n  teO: '8080',\n  tEstN: 'd8bfd8',\n  tomato: 'ff6347',\n  Qe: '40e0d0',\n  viTet: 'ee82ee',\n  JHt: 'f5deb3',\n  wEte: 'ffffff',\n  wEtesmoke: 'f5f5f5',\n  Lw: 'ffff00',\n  LwgYF: '9acd32'\n};\nfunction unpack(){\n  const unpacked={};\n  const keys=Object.keys(names$1);\n  const tkeys=Object.keys(map);\n  let i, j, k, ok, nk;\n  for (i=0; i < keys.length; i++){\n    ok=nk=keys[i];\n    for (j=0; j < tkeys.length; j++){\n      k=tkeys[j];\n      nk=nk.replace(k, map[k]);\n    }\n    k=parseInt(names$1[ok], 16);\n    unpacked[nk]=[k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n  }\n  return unpacked;\n}\n\nlet names;\nfunction nameParse(str){\n  if(!names){\n    names=unpack();\n    names.transparent=[0, 0, 0, 0];\n  }\n  const a=names[str.toLowerCase()];\n  return a&&{\n    r: a[0],\n    g: a[1],\n    b: a[2],\n    a: a.length===4 ? a[3]:255\n  };\n}\n\nconst RGB_RE=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str){\n  const m=RGB_RE.exec(str);\n  let a=255;\n  let r, g, b;\n  if(!m){\n    return;\n  }\n  if(m[7]!==r){\n    const v=+m[7];\n    a=m[8] ? p2b(v):lim(v * 255, 0, 255);\n  }\n  r=+m[1];\n  g=+m[3];\n  b=+m[5];\n  r=255 & (m[2] ? p2b(r):lim(r, 0, 255));\n  g=255 & (m[4] ? p2b(g):lim(g, 0, 255));\n  b=255 & (m[6] ? p2b(b):lim(b, 0, 255));\n  return {\n    r: r,\n    g: g,\n    b: b,\n    a: a\n  };\n}\nfunction rgbString(v){\n  return v&&(\n    v.a < 255\n      ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n:`rgb(${v.r}, ${v.g}, ${v.b})`\n);\n}\n\nconst to=v => v <=0.0031308 ? v * 12.92:Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from=v => v <=0.04045 ? v / 12.92:Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t){\n  const r=from(b2n(rgb1.r));\n  const g=from(b2n(rgb1.g));\n  const b=from(b2n(rgb1.b));\n  return {\n    r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n    g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n    b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n    a: rgb1.a + t * (rgb2.a - rgb1.a)\n  };\n}\n\nfunction modHSL(v, i, ratio){\n  if(v){\n    let tmp=rgb2hsl(v);\n    tmp[i]=Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i===0 ? 360:1));\n    tmp=hsl2rgb(tmp);\n    v.r=tmp[0];\n    v.g=tmp[1];\n    v.b=tmp[2];\n  }\n}\nfunction clone(v, proto){\n  return v ? Object.assign(proto||{}, v):v;\n}\nfunction fromObject(input){\n  var v={r: 0, g: 0, b: 0, a: 255};\n  if(Array.isArray(input)){\n    if(input.length >=3){\n      v={r: input[0], g: input[1], b: input[2], a: 255};\n      if(input.length > 3){\n        v.a=n2b(input[3]);\n      }\n    }\n  }else{\n    v=clone(input, {r: 0, g: 0, b: 0, a: 1});\n    v.a=n2b(v.a);\n  }\n  return v;\n}\nfunction functionParse(str){\n  if(str.charAt(0)==='r'){\n    return rgbParse(str);\n  }\n  return hueParse(str);\n}\nclass Color {\n  constructor(input){\n    if(input instanceof Color){\n      return input;\n    }\n    const type=typeof input;\n    let v;\n    if(type==='object'){\n      v=fromObject(input);\n    }else if(type==='string'){\n      v=hexParse(input)||nameParse(input)||functionParse(input);\n    }\n    this._rgb=v;\n    this._valid = !!v;\n  }\n  get valid(){\n    return this._valid;\n  }\n  get rgb(){\n    var v=clone(this._rgb);\n    if(v){\n      v.a=b2n(v.a);\n    }\n    return v;\n  }\n  set rgb(obj){\n    this._rgb=fromObject(obj);\n  }\n  rgbString(){\n    return this._valid ? rgbString(this._rgb):undefined;\n  }\n  hexString(){\n    return this._valid ? hexString(this._rgb):undefined;\n  }\n  hslString(){\n    return this._valid ? hslString(this._rgb):undefined;\n  }\n  mix(color, weight){\n    if(color){\n      const c1=this.rgb;\n      const c2=color.rgb;\n      let w2;\n      const p=weight===w2 ? 0.5:weight;\n      const w=2 * p - 1;\n      const a=c1.a - c2.a;\n      const w1=((w * a===-1 ? w:(w + a) / (1 + w * a)) + 1) / 2.0;\n      w2=1 - w1;\n      c1.r=0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n      c1.g=0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n      c1.b=0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n      c1.a=p * c1.a + (1 - p) * c2.a;\n      this.rgb=c1;\n    }\n    return this;\n  }\n  interpolate(color, t){\n    if(color){\n      this._rgb=interpolate(this._rgb, color._rgb, t);\n    }\n    return this;\n  }\n  clone(){\n    return new Color(this.rgb);\n  }\n  alpha(a){\n    this._rgb.a=n2b(a);\n    return this;\n  }\n  clearer(ratio){\n    const rgb=this._rgb;\n    rgb.a *=1 - ratio;\n    return this;\n  }\n  greyscale(){\n    const rgb=this._rgb;\n    const val=round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n    rgb.r=rgb.g=rgb.b=val;\n    return this;\n  }\n  opaquer(ratio){\n    const rgb=this._rgb;\n    rgb.a *=1 + ratio;\n    return this;\n  }\n  negate(){\n    const v=this._rgb;\n    v.r=255 - v.r;\n    v.g=255 - v.g;\n    v.b=255 - v.b;\n    return this;\n  }\n  lighten(ratio){\n    modHSL(this._rgb, 2, ratio);\n    return this;\n  }\n  darken(ratio){\n    modHSL(this._rgb, 2, -ratio);\n    return this;\n  }\n  saturate(ratio){\n    modHSL(this._rgb, 1, ratio);\n    return this;\n  }\n  desaturate(ratio){\n    modHSL(this._rgb, 1, -ratio);\n    return this;\n  }\n  rotate(deg){\n    rotate(this._rgb, deg);\n    return this;\n  }\n}\n\nfunction index_esm(input){\n  return new Color(input);\n}\n\n\n\n\n//# sourceURL=webpack://startHtml/./node_modules/@kurkle/color/dist/color.esm.js?")},"./dev/src/js/app.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _classes_MyChart_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! ./classes/MyChart.js */ "./dev/src/js/classes/MyChart.js");\n/* harmony import */ var _classes_CalcForm_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! ./classes/CalcForm.js */ "./dev/src/js/classes/CalcForm.js");\n/* harmony import */ var _classes_CalcToggler_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! ./classes/CalcToggler.js */ "./dev/src/js/classes/CalcToggler.js");\n/* harmony import */ var _classes_Controls_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(/*! ./classes/Controls.js */ "./dev/src/js/classes/Controls.js");\n/* harmony import */ var _classes_Helper_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(/*! ./classes/Helper.js */ "./dev/src/js/classes/Helper.js");\n/* harmony import */ var _classes_Select_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(/*! ./classes/Select.js */ "./dev/src/js/classes/Select.js");\n/* harmony import */ var _classes_SliderUI_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(/*! ./classes/SliderUI.js */ "./dev/src/js/classes/SliderUI.js");\n/* harmony import */ var _classes_Modal_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(/*! ./classes/Modal.js */ "./dev/src/js/classes/Modal.js");\n/* harmony import */ var _classes_Alert_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(/*! ./classes/Alert.js */ "./dev/src/js/classes/Alert.js");\n/* harmony import */ var _classes_Mask_js__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(/*! ./classes/Mask.js */ "./dev/src/js/classes/Mask.js");\n/* harmony import */ var _classes_Tooltip_js__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(/*! ./classes/Tooltip.js */ "./dev/src/js/classes/Tooltip.js");\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://startHtml/./dev/src/js/app.js?')},"./dev/src/js/classes/Alert.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Alert; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n\n\n\nfunction _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor){ _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, "get"); return _classApplyDescriptorGet(receiver, descriptor); }\n\nfunction _classCheckPrivateStaticFieldDescriptor(descriptor, action){ if(descriptor===undefined){ throw new TypeError("attempted to " + action + " private static field before its declaration"); }}\n\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor){ if(receiver!==classConstructor){ throw new TypeError("Private static access of wrong provenance"); }}\n\nfunction _classApplyDescriptorGet(receiver, descriptor){ if(descriptor.get){ return descriptor.get.call(receiver); } return descriptor.value; }\n\nvar alerts=[];\nvar alert=null;\n\nvar Alert=/*#__PURE__*/function (){\n  function Alert(){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Alert);\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Alert, null, [{\n    key: "close",\n    value: function close(alert_item){\n      alert_item.classList.add(\'close\');\n      clearTimeout(this.close_timeout);\n      setTimeout(function (){\n        alert_item.remove();\n        alerts=alerts.filter(function (elem){\n          return elem!=alert_item;\n        });\n      }, 200);\n    }\n  }, {\n    key: "add",\n    value: function add(text){\n      var type=arguments.length > 1&&arguments[1]!==undefined ? arguments[1]:\'success\';\n\n      if(alerts.length >=3){\n        Alert.close(alerts[0]);\n      }\n\n      var alert_item=document.createElement(\'p\');\n      alert_item.innerText=text;\n      alert_item.classList.add(\'alert__box\');\n      alert_item.classList.add(type);\n      alert_item.style.setProperty(\'--lifetime\', _classStaticPrivateFieldSpecGet(this, Alert, _lifeTime) + \'s\');\n      alert_item.close_timeout=setTimeout(function (){\n        Alert.close(alert_item);\n        clearInterval(alert_item.close_timeout);\n      }, _classStaticPrivateFieldSpecGet(this, Alert, _lifeTime) * 1000);\n      alert.append(alert_item);\n      alerts.push(alert_item);\n    }\n  }, {\n    key: "reInit",\n    value: function reInit(){\n      alert=null;\n      Alert.create();\n    }\n  }, {\n    key: "create",\n    value: function create(){\n      alert=document.createElement(\'div\');\n      alert.className=\'alert\';\n      document.body.append(alert);\n    }\n  }]);\n\n  return Alert;\n}();\n\nvar _lifeTime={\n  writable: true,\n  value: 3\n};\n\nAlert.create();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Alert.js?')},"./dev/src/js/classes/CalcForm.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function(){ return /* binding */ CalcForm; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(/*! @babel/runtime/regenerator */ \"./node_modules/@babel/runtime/regenerator/index.js\");\n/* harmony import */ var _MyChart_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(/*! ./MyChart.js */ \"./dev/src/js/classes/MyChart.js\");\n/* harmony import */ var chart_js_auto__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(/*! chart.js/auto */ \"./node_modules/chart.js/auto/auto.js\");\n/* harmony import */ var _Modal_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(/*! ./Modal.js */ \"./dev/src/js/classes/Modal.js\");\n/* harmony import */ var _Alert_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(/*! ./Alert.js */ \"./dev/src/js/classes/Alert.js\");\n/* harmony import */ var _Mask_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(/*! ./Mask.js */ \"./dev/src/js/classes/Mask.js\");\n\n\n\n\n\n\n\n\n\nvar forms=[];\n\nvar CalcForm=/*#__PURE__*/function (){\n  function CalcForm(form){\n    var _this=this;\n\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, CalcForm);\n\n    this.form=form;\n    this.form.addEventListener('keydown', function (e){\n      if(e.keyCode===13){\n        e.preventDefault();\n\n        _this.getGraphics();\n      }\n    });\n    this.calc_name=this.form.querySelector('input[name=\"calc-name\"]').value;\n    this.image=this.form.querySelector('.calc__image');\n    this.graphics=this.form.querySelector('.calc__graphics-ajax');\n    this.btn=this.form.querySelector('.calc__btn');\n    this.btn.addEventListener('click', this.getGraphics.bind(this));\n    this.inputs=this.form.querySelectorAll('.calc__settings input[required]');\n    this.validation_handler=this.validation.bind(this);\n    this.form.addEventListener('change', this.validation_handler);\n    this.validation();\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(CalcForm, [{\n    key: \"validation\",\n    value: function validation(){\n      var valid=true;\n      this.inputs.forEach(function (input){\n        if(input.value==\"\"){\n          valid=false;\n        }\n      });\n      return valid;\n    }\n  }, {\n    key: \"getGraphics\",\n    value: function (){\n      var _getGraphics=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__.mark(function _callee(){\n        var data, response;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__.wrap(function _callee$(_context){\n          while (1){\n            switch (_context.prev=_context.next){\n              case 0:\n                if(!this.validation()){\n                  _context.next=15;\n                  break;\n                }\n\n                this.image.hidden=true;\n                this.graphics.hidden=false;\n                this.graphics.innerHTML='';\n                data=new FormData(this.form);\n                data.append('action', 'get_graphics');\n                _context.next=8;\n                return fetch(ajax, {\n                  method: \"POST\",\n                  body: data\n                });\n\n              case 8:\n                response=_context.sent;\n                _context.next=11;\n                return response.json();\n\n              case 11:\n                response=_context.sent;\n\n                if(response.html){\n                  this.graphics.innerHTML=response.html;\n                  this.calcPrice();\n                  _MyChart_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"].init();\n                  _Modal_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].reInit();\n                  _Mask_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"].init();\n                }\n\n                _context.next=16;\n                break;\n\n              case 15:\n                _Alert_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].add('Заполните обязательные поля', 'error');\n\n              case 16:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function getGraphics(){\n        return _getGraphics.apply(this, arguments);\n      }\n\n      return getGraphics;\n    }()\n  }, {\n    key: \"getGrafPoint\",\n    value: function getGrafPoint(min_value, coef, coef_offset){\n      var work_range=coef - 1;\n\n      if(coef_offset > work_range){\n        coef_offset=Math.abs(work_range - coef_offset);\n      }\n\n      var offset=min_value * coef_offset;\n      return min_value + offset;\n    }\n  }, {\n    key: \"calcPrice\",\n    value: function calcPrice(){\n      var _this2=this;\n\n      //Тема\n      this.calc_theme=this.form.querySelector('input[name=\"theme\"]').value; //Средняя цена\n\n      this.average_price=this.form.querySelector('input[name=\"average-price\"]').value; //Получение списка коэф. SliderUI\n\n      this.calc_age_coef=JSON.parse(this.form.querySelector('#calc-age-coef').textContent);\n      this.calc_top_coef=JSON.parse(this.form.querySelector('#calc-top-coef').textContent); //Получение значения из SliderUI\n\n      if(this.form.querySelector('input[name=\"age\"]')){\n        this.age_value=this.form.querySelector('input[name=\"age\"]').value;\n      }\n\n      if(this.form.querySelector('input[name=\"top\"]')){\n        this.top_value=this.form.querySelector('input[name=\"top\"]').value;\n      } //Получение кэф. \"возраста сайта\"\n\n\n      if(this.age_value){\n        this.get_age_coef=Object.keys(this.calc_age_coef);\n        this.get_age_coef.forEach(function (key, index){\n          if(key===_this2.age_value){\n            _this2.calc_age_coef=_this2.calc_age_coef[key];\n          }\n        });\n      } //Подсчет и вывод итоговой цены\n\n\n      this.price_out=this.form.querySelector('.calc__price-value');\n      this.price_out_input=this.form.querySelector('input[name=\"price\"]');\n\n      if(this.calc_name===\"position\"){\n        //Получение кэф. тематики сайта.\n        this.calc_theme_list=JSON.parse(this.form.querySelector('#calc-theme-list').textContent);\n        this.calc_theme_coef=this.calc_theme_list[this.calc_theme]; //Получение кэф.колличества запросов.\n\n        if(this.top_value){\n          this.get_top_coef=Object.keys(this.calc_top_coef);\n          this.get_top_coef.forEach(function (key, index){\n            if(key===_this2.top_value){\n              _this2.calc_top_coef=_this2.calc_top_coef[key];\n            }\n          });\n        } //Получение приоритетноого продвижения\n\n\n        this.position_supports=this.form.querySelector('input[name=\"supports\"]'); //Получение суммы приоритетного продвижения\n\n        this.position_supports_sum=JSON.parse(this.form.querySelector('#calc-position-supports').textContent);\n        this.get_position_supports_sum=Object.keys(this.position_supports_sum);\n        this.get_position_supports_sum.forEach(function (key, index){\n          _this2.position_supports_value=_this2.position_supports_sum[key];\n        });\n\n        if(!this.position_supports.checked){\n          this.position_supports_value=1;\n        } //Вывод цены\n\n\n        this.price_out.innerHTML=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef * this.calc_top_coef * this.position_supports_value);\n        this.price_out_input.value=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef * this.calc_top_coef * this.position_supports_value); //Массив точек\n\n        var graf_coef=this.top_value;\n        var graf_coef_2=this.top_value * (this.calc_theme_coef * 0.1); //С работами по SEO\n\n        var graf_points=[graf_coef_2 * 0.9, graf_coef_2 * 0.95, graf_coef * 0.3, graf_coef * 0.27, graf_coef * 0.4, graf_coef * 0.65, graf_coef * 0.60, graf_coef * 0.69, graf_coef * 0.77, graf_coef * 0.72, graf_coef * 0.85, graf_coef];\n        graf_points=graf_points.join(',');\n        this.graf_point_input=this.form.querySelector('input[name=\"calc-points\"]');\n        this.graf_point_input.value=graf_points; //Без работ по SEO\n\n        var graf_points_2=[graf_coef_2 * 0.9, graf_coef_2 * 0.95, graf_coef_2 * 0.97, graf_coef_2 * 0.89, graf_coef_2 * 0.95, graf_coef_2 * 0.97, graf_coef_2 * 0.98, graf_coef_2 * 0.85, graf_coef_2 * 0.92, graf_coef_2 * 0.99, graf_coef_2 * 0.89, graf_coef_2];\n        graf_points_2=graf_points_2.join(',');\n        this.graf_point_input_2=this.form.querySelector('input[name=\"calc-points-2\"]');\n        this.graf_point_input_2.value=graf_points_2;\n      }\n\n      if(this.calc_name===\"traffic\"){\n        //Получение надбавки на цену.\n        this.calc_theme_list=JSON.parse(this.form.querySelector('#calc-traffic-price-ratio').textContent);\n        this.calc_theme_coef=this.calc_theme_list[this.calc_theme]; //Получение коэфицента роста для графика\n\n        this.calc_theme_list_2=JSON.parse(this.form.querySelector('#calc-traffic-ratio').textContent);\n        this.calc_theme_coef_2=this.calc_theme_list_2[this.calc_theme]; //Получение трафика.\n\n        this.traffic_value=parseInt(this.form.querySelector('input[name=\"traffic\"]').value); //Получение приоритетноого продвижения\n\n        this.traffic_supports=this.form.querySelector('input[name=\"supports\"]'); //Получение суммы приоритетного продвижения\n\n        this.traffic_supports_sum=JSON.parse(this.form.querySelector('#calc-traffic-supports').textContent);\n        this.get_traffic_supports_sum=Object.keys(this.traffic_supports_sum);\n        this.get_traffic_supports_sum.forEach(function (key, index){\n          _this2.traffic_supports_value=_this2.traffic_supports_sum[key];\n        });\n\n        if(!this.traffic_supports.checked){\n          this.traffic_supports_value=1;\n        } //Вывод цены\n\n\n        this.price_out.innerHTML=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef * this.traffic_supports_value);\n        this.price_out_input.value=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef * this.traffic_supports_value); //Массив точек\n\n        var traffic=this.traffic_value; //С работами по SEO\n\n        var _graf_points=[traffic, traffic * 0.98, traffic * 1.1, this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.25), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.27), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.32), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.25), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.28), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.25), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.28), this.getGrafPoint(traffic, this.calc_theme_coef_2, 0.38), traffic * this.calc_theme_coef_2];\n        _graf_points=_graf_points.join(',');\n        this.graf_point_input=this.form.querySelector('input[name=\"calc-points\"]');\n        this.graf_point_input.value=_graf_points; //Без работ по SEO\n\n        var _graf_points_=[traffic, traffic * 0.98, traffic * 0.97, traffic * 0.92, traffic * 0.95, traffic * 0.97, traffic * 0.96, traffic * 0.9, traffic * 0.92, traffic * 0.94, traffic * 0.97, traffic];\n        _graf_points_=_graf_points_.join(',');\n        this.graf_point_input_2=this.form.querySelector('input[name=\"calc-points-2\"]');\n        this.graf_point_input_2.value=_graf_points_;\n      }\n\n      if(this.calc_name===\"conversion\"){\n        //Получение надбавки на цену.\n        this.calc_theme_list=JSON.parse(this.form.querySelector('#calc-conversion-price-ratio').textContent);\n        this.calc_theme_coef=this.calc_theme_list[this.calc_theme]; //Получение коэфицента роста для графика\n\n        this.calc_theme_list_2=JSON.parse(this.form.querySelector('#calc-conversion-ratio').textContent);\n        this.calc_theme_coef_2=parseFloat(this.calc_theme_list_2[this.calc_theme]); //Получение конверсий.\n\n        this.conversion_value=parseInt(this.form.querySelector('input[name=\"lead\"]').value); //Получение маркетиногового сопровождения\n\n        this.conversion_marketing=this.form.querySelector('input[name=\"marketing\"]'); //Получение суммы маркетиногового сопровождения\n\n        this.conversion_marketing_sum=JSON.parse(this.form.querySelector('#calc-conversion-marketing').textContent);\n        this.get_conversion_marketing_sum=Object.keys(this.conversion_marketing_sum);\n        this.get_conversion_marketing_sum.forEach(function (key, index){\n          _this2.conversion_marketing_value=_this2.conversion_marketing_sum[key];\n        });\n\n        if(!this.conversion_marketing.checked){\n          this.conversion_marketing_value=1;\n        } //Вывод цены\n\n\n        this.price_out.innerHTML=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef * this.conversion_marketing_value);\n        this.price_out_input.value=Math.round(this.average_price * this.calc_theme_coef * this.calc_age_coef); //Массив точек\n\n        var conversion=this.conversion_value; //С работами по SEO\n\n        var _graf_points2=[conversion, conversion * 1, conversion * 1.03, conversion * (1.03 + this.calc_theme_coef_2), conversion * (1.03 + this.calc_theme_coef_2 * 2), conversion * (1.03 + this.calc_theme_coef_2 * 3), conversion * (1.03 + this.calc_theme_coef_2 * 2), conversion * (1.03 + this.calc_theme_coef_2 * 5), conversion * (1.03 + this.calc_theme_coef_2 * 6), conversion * (1.03 + this.calc_theme_coef_2 * 5), conversion * (1.03 + this.calc_theme_coef_2 * 8), conversion * (1.03 + this.calc_theme_coef_2 * 9)];\n        _graf_points2=_graf_points2.join(',');\n        this.graf_point_input=this.form.querySelector('input[name=\"calc-points\"]');\n        this.graf_point_input.value=_graf_points2; //Без работ по SEO\n\n        var _graf_points_2=[conversion, conversion * 1, conversion * 0.97, conversion * 0.98, conversion * 0.99, conversion * 0.97, conversion * 0.98, conversion * 0.99, conversion * 0.98, conversion * 0.96, conversion * 0.98, conversion];\n        _graf_points_2=_graf_points_2.join(',');\n        this.graf_point_input_2=this.form.querySelector('input[name=\"calc-points-2\"]');\n        this.graf_point_input_2.value=_graf_points_2;\n      }\n    }\n  }], [{\n    key: \"reInit\",\n    value: function reInit(){\n      forms.map(function (form){\n        form.innerHTML='';\n        form.image.hidden=false;\n        form.graphics.hidden=true;\n      });\n      CalcForm.init();\n    }\n  }, {\n    key: \"init\",\n    value: function init(){\n      var _forms=document.querySelectorAll('.calc__box');\n\n      if(_forms.length){\n        _forms.forEach(function (form){\n          return forms.push(new CalcForm(form));\n        });\n      }\n    }\n  }]);\n\n  return CalcForm;\n}();\n\n\nCalcForm.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/CalcForm.js?")},"./dev/src/js/classes/CalcToggler.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");\n/* harmony import */ var _SliderUI_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(/*! ./SliderUI.js */ "./dev/src/js/classes/SliderUI.js");\n/* harmony import */ var _Select_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(/*! ./Select.js */ "./dev/src/js/classes/Select.js");\n/* harmony import */ var _CalcForm_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(/*! ./CalcForm.js */ "./dev/src/js/classes/CalcForm.js");\n/* harmony import */ var _Alert_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(/*! ./Alert.js */ "./dev/src/js/classes/Alert.js");\n/* harmony import */ var _Tooltip_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(/*! ./Tooltip.js */ "./dev/src/js/classes/Tooltip.js");\n\n\n\n\n\n\n\n\n\n\nvar CalcToggler=/*#__PURE__*/function (){\n  function CalcToggler(toggler){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, CalcToggler);\n\n    this.toggler=toggler;\n    this.calc_name=this.toggler.dataset.name;\n    this.toggler.addEventListener(\'click\', this.change.bind(this));\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(CalcToggler, [{\n    key: "change",\n    value: function (){\n      var _change=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__.mark(function _callee(e){\n        var data, response;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_3__.wrap(function _callee$(_context){\n          while (1){\n            switch (_context.prev=_context.next){\n              case 0:\n                e.preventDefault();\n                this.togglers=document.querySelectorAll(\'.calc__toggler\');\n                this.togglers.forEach(function (toggler){\n                  toggler.classList.remove(\'active\');\n                });\n                this.toggler.classList.add(\'active\');\n                document.querySelector(\'.calc__ajax-block\').innerHTML=\'\';\n                data=new FormData();\n                data.append(\'action\', \'get_content\');\n                data.append(\'calc_name\', this.calc_name);\n                _context.next=10;\n                return fetch(ajax, {\n                  method: "POST",\n                  body: data\n                });\n\n              case 10:\n                response=_context.sent;\n                _context.next=13;\n                return response.json();\n\n              case 13:\n                response=_context.sent;\n\n                if(response.html){\n                  document.querySelector(\'.calc__ajax-block\').innerHTML=response.html;\n                  _Select_js__WEBPACK_IMPORTED_MODULE_5__["default"].init();\n                  _SliderUI_js__WEBPACK_IMPORTED_MODULE_4__["default"].init();\n                  _CalcForm_js__WEBPACK_IMPORTED_MODULE_6__["default"].reInit();\n                  _Tooltip_js__WEBPACK_IMPORTED_MODULE_8__["default"].reInit();\n                }\n\n              case 15:\n              case "end":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function change(_x){\n        return _change.apply(this, arguments);\n      }\n\n      return change;\n    }()\n  }], [{\n    key: "init",\n    value: function init(){\n      var _togglers=document.querySelectorAll(\'.calc__toggler\');\n\n      if(_togglers.length){\n        _togglers.forEach(function (toggler){\n          return new CalcToggler(toggler);\n        });\n      }\n    }\n  }]);\n\n  return CalcToggler;\n}();\n\nCalcToggler.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/CalcToggler.js?')},"./dev/src/js/classes/Controls.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Controls; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n\n\n\nvar Controls=/*#__PURE__*/function (){\n  function Controls(elem){\n    var _this=this;\n\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Controls);\n\n    window.addEventListener(\'keyup\', function (e){\n      switch (e.key){\n        case \'Escape\':\n          _this.close();\n\n          break;\n\n        case \'ArrowLeft\':\n          _this.prev();\n\n          break;\n\n        case \'ArrowRight\':\n          _this.next();\n\n          break;\n      }\n    });\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Controls, [{\n    key: "close",\n    value: function close(){}\n  }, {\n    key: "prev",\n    value: function prev(){}\n  }, {\n    key: "next",\n    value: function next(){}\n  }]);\n\n  return Controls;\n}();\n\n\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Controls.js?')},"./dev/src/js/classes/Helper.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n\n\n\nvar Helper=/*#__PURE__*/function (){\n  function Helper(){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Helper);\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Helper, null, [{\n    key: "isOuterWindow",\n    value: function isOuterWindow(element){\n      var window_width=innerWidth;\n      var element_properties=element.getBoundingClientRect();\n      var element_right=element_properties.right;\n      return window_width - element_right < 0;\n    }\n  }, {\n    key: "htmlToElement",\n    value: function htmlToElement(html){\n      var template=document.createElement(\'template\');\n      html=html.trim();\n      template.innerHTML=html;\n      return template.content.firstChild;\n    }\n  }]);\n\n  return Helper;\n}();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Helper.js?')},"./dev/src/js/classes/Mask.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Mask; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n\n\n\n// Маска телефона\nvar Mask=/*#__PURE__*/function (){\n  function Mask(phone){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Mask);\n\n    this.phone=phone;\n    if(!this.phone) return console.log(\'Что-то не так с селектором\');\n    this.layout=\'+7 (___) ___-__-__\';\n    this.maskreg=this.getRegexp();\n    this.setListeners();\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Mask, [{\n    key: "getRegexp",\n    value: function getRegexp(){\n      var str=this.layout.replace(/_/g, \'\\\\d\');\n      str=str.replace(/\\(/g, \'\\\\(\');\n      str=str.replace(/\\)/g, \'\\\\)\');\n      str=str.replace(/\\+/g, \'\\\\+\');\n      str=str.replace(/\\s/g, \'\\\\s\');\n      return str;\n    }\n  }, {\n    key: "mask",\n    value: function mask(e){\n      var _this=e.target,\n          matrix=this.layout,\n          i=0,\n          def=matrix.replace(/\\D/g, ""),\n          val=_this.value.replace(/\\D/g, "");\n\n      if(def.length >=val.length) val=def;\n      _this.value=matrix.replace(/./g, function (a){\n        return /[_\\d]/.test(a)&&i < val.length ? val.charAt(i++):i >=val.length ? "":a;\n      });\n\n      if(e.type=="blur"){\n        var regexp=new RegExp(this.maskreg);\n        if(!regexp.test(_this.value)) _this.value="";\n      }else{\n        this.setCursorPosition(_this.value.length, _this);\n      }\n    }\n  }, {\n    key: "setCursorPosition",\n    value: function setCursorPosition(pos, elem){\n      elem.focus();\n      if(elem.setSelectionRange) elem.setSelectionRange(pos, pos);else if(elem.createTextRange){\n        var range=elem.createTextRange();\n        range.collapse(true);\n        range.moveEnd("character", pos);\n        range.moveStart("character", pos);\n        range.select();\n      }\n    }\n  }, {\n    key: "setListeners",\n    value: function setListeners(){\n      this.phone.addEventListener("input", this.mask.bind(this), false);\n      this.phone.addEventListener("focus", this.mask.bind(this), false);\n      this.phone.addEventListener("blur", this.mask.bind(this), false);\n    }\n  }, {\n    key: "getElement",\n    value: function getElement(selector){\n      if(selector===undefined) return false;\n      if(this.isElement(selector)) return selector;\n\n      if(typeof selector==\'string\'){\n        var el=document.querySelector(selector);\n        if(this.isElement(el)) return el;\n      }\n\n      return false;\n    }\n  }, {\n    key: "isElement",\n    value: function isElement(element){\n      return element instanceof Element||element instanceof HTMLDocument;\n    }\n  }], [{\n    key: "init",\n    value: function init(){\n      var phones=document.querySelectorAll(\'[type=tel]:not(.no-mask)\');\n\n      if(phones.length){\n        phones.forEach(function (phone){\n          return new Mask(phone);\n        });\n      }\n    }\n  }]);\n\n  return Mask;\n}();\n\n\nMask.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Mask.js?')},"./dev/src/js/classes/Modal.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Modal; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");\n/* harmony import */ var _Controls_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(/*! ./Controls.js */ "./dev/src/js/classes/Controls.js");\n\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived){ var hasNativeReflectConstruct=_isNativeReflectConstruct(); return function _createSuperInternal(){ var Super=(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(Derived), result; if(hasNativeReflectConstruct){ var NewTarget=(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(this).constructor; result=Reflect.construct(Super, arguments, NewTarget); }else{ result=Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, result); };}\n\nfunction _isNativeReflectConstruct(){ if(typeof Reflect==="undefined"||!Reflect.construct) return false; if(Reflect.construct.sham) return false; if(typeof Proxy==="function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function (){})); return true; } catch (e){ return false; }}\n\n\nvar modals=[];\n\nvar Modal=/*#__PURE__*/function (_Controls){\n  (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(Modal, _Controls);\n\n  var _super=_createSuper(Modal);\n\n  function Modal(modal){\n    var _this;\n\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Modal);\n\n    _this=_super.call(this, modal);\n    _this.modal=modal;\n    _this.modal_type=_this.modal.dataset.modalType; // Открывашки\n\n    _this.open_handler=_this.open.bind((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this));\n    _this.open_buttons=document.querySelectorAll("[data-modal=\\"".concat(_this.modal_type, "\\"]"));\n\n    _this.open_buttons.forEach(function (button){\n      return button.addEventListener(\'click\', _this.open_handler);\n    });// Закрытие\n\n\n    _this.close_handler=_this.closeClick.bind((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this));\n\n    _this.modal.addEventListener(\'click\', _this.close_handler);\n\n    _this.close_buttons=_this.modal.querySelectorAll(\'.modal-calc__close\');\n\n    _this.close_buttons.forEach(function (button){\n      return button.addEventListener(\'click\', _this.close_handler);\n    });// Анимация\n\n\n    _this.animation_time=parseFloat(getComputedStyle(document.body).getPropertyValue(\'--modal-animation-time\'));\n    return _this;\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Modal, [{\n    key: "open",\n    value: function (){\n      var _open=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.mark(function _callee(){\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.wrap(function _callee$(_context){\n          while (1){\n            switch (_context.prev=_context.next){\n              case 0:\n                _context.next=2;\n                return Modal.closeAll();\n\n              case 2:\n                this.modal.hidden=false;\n                this.modal.classList.add(\'open\');\n\n              case 4:\n              case "end":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function open(){\n        return _open.apply(this, arguments);\n      }\n\n      return open;\n    }()\n  }, {\n    key: "closeClick",\n    value: function closeClick(e){\n      if(e.target.classList.contains(\'modal-calc__close\')||e.target.classList.contains(\'modal-calc__content\')||e.target.classList.contains(\'modal-calc\')){\n        this.close();\n      }\n    }\n  }, {\n    key: "close",\n    value: function close(){\n      var _this2=this;\n\n      return new Promise(function (resolve){\n        if(!_this2.modal.hidden){\n          _this2.modal.classList.remove(\'open\');\n\n          setTimeout(function (){\n            _this2.modal.hidden=true;\n            resolve();\n          }, _this2.animation_time * 1000);\n        }else{\n          resolve();\n        }\n      });\n    } // Открытие модалки программно\n\n  }], [{\n    key: "openTarget",\n    value: function (){\n      var _openTarget=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.mark(function _callee2(modal_type){\n        var modal, current;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.wrap(function _callee2$(_context2){\n          while (1){\n            switch (_context2.prev=_context2.next){\n              case 0:\n                _context2.next=2;\n                return Modal.closeAll();\n\n              case 2:\n                _context2.t0=_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.keys(modals);\n\n              case 3:\n                if((_context2.t1=_context2.t0()).done){\n                  _context2.next=11;\n                  break;\n                }\n\n                modal=_context2.t1.value;\n                current=modals[modal];\n\n                if(!(current.modal_type==modal_type)){\n                  _context2.next=9;\n                  break;\n                }\n\n                current.open();\n                return _context2.abrupt("return", null);\n\n              case 9:\n                _context2.next=3;\n                break;\n\n              case 11:\n              case "end":\n                return _context2.stop();\n            }\n          }\n        }, _callee2);\n      }));\n\n      function openTarget(_x){\n        return _openTarget.apply(this, arguments);\n      }\n\n      return openTarget;\n    }() // Закрытие всех модальных окон\n\n  }, {\n    key: "closeAll",\n    value: function closeAll(){\n      return new Promise(/*#__PURE__*/function (){\n        var _ref=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.mark(function _callee3(resolve){\n          var modal, current;\n          return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.wrap(function _callee3$(_context3){\n            while (1){\n              switch (_context3.prev=_context3.next){\n                case 0:\n                  _context3.t0=_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.keys(modals);\n\n                case 1:\n                  if((_context3.t1=_context3.t0()).done){\n                    _context3.next=8;\n                    break;\n                  }\n\n                  modal=_context3.t1.value;\n                  current=modals[modal];\n                  _context3.next=6;\n                  return current.close();\n\n                case 6:\n                  _context3.next=1;\n                  break;\n\n                case 8:\n                  resolve();\n\n                case 9:\n                case "end":\n                  return _context3.stop();\n              }\n            }\n          }, _callee3);\n        }));\n\n        return function (_x2){\n          return _ref.apply(this, arguments);\n        };\n      }());\n    } // Реинициализация всех модалок\n\n  }, {\n    key: "reInit",\n    value: function reInit(){\n      var _loop=function _loop(modal){\n        var current=modals[modal];\n        current.close();\n        current.open_buttons.forEach(function (button){\n          return button.removeEventListener(\'click\', current.open_handler);\n        });\n        current.close_buttons.forEach(function (button){\n          return button.removeEventListener(\'click\', current.close_handler);\n        });\n      };\n\n      for (var modal in modals){\n        _loop(modal);\n      }\n\n      modals=[];\n      Modal.init();\n    }\n  }, {\n    key: "init",\n    value: function init(){\n      var _modals=document.querySelectorAll(\'[data-modal-type]\');\n\n      if(_modals.length){\n        _modals.forEach(function (modal){\n          return modals.push(new Modal(modal));\n        });\n      }\n    }\n  }]);\n\n  return Modal;\n}(_Controls_js__WEBPACK_IMPORTED_MODULE_8__["default"]);\n\n\nModal.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Modal.js?')},"./dev/src/js/classes/MyChart.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function(){ return /* binding */ MyChart; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var chart_js_auto__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! chart.js/auto */ \"./node_modules/chart.js/auto/auto.js\");\n\n\n\n\nvar MyChart=/*#__PURE__*/function (){\n  function MyChart(chart){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, MyChart);\n\n    this.chart=chart; //Точки с работами по SEO\n\n    this.graf_points=document.querySelector('input[name=\"calc-points\"]').value;\n    this.graf_points=this.graf_points.split(','); //Точки без SEO\n\n    this.graf_points_2=document.querySelector('input[name=\"calc-points-2\"]').value;\n    this.graf_points_2=this.graf_points_2.split(',');\n    this.draw();\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(MyChart, [{\n    key: \"draw\",\n    value: function draw(){\n      var labels=['Июль', 'Авг.', 'Сент.', 'Окт.', 'Нояб.', 'Дек.', 'Янв.', 'Февр.', 'Март', 'Апр.', 'Май', 'Июнь'];\n      var data={\n        labels: labels,\n        datasets: [{\n          label: 'С работами по SEO',\n          data: this.graf_points,\n          borderColor: '#B50102',\n          pointStyle: 'circle',\n          backgroundColor: '#B50102',\n          pointRadius: 5,\n          pointBorderColor: '#B50102'\n        }, {\n          label: 'Без работ по SEO',\n          data: this.graf_points_2,\n          borderColor: '#1B1B1B',\n          pointStyle: 'circle',\n          backgroundColor: '#1B1B1B',\n          pointRadius: 5,\n          pointBorderColor: '#1B1B1B'\n        }]\n      };\n      new chart_js_auto__WEBPACK_IMPORTED_MODULE_2__[\"default\"](this.chart, {\n        type: 'line',\n        data: data,\n        options: {\n          responsive: true,\n          plugins: {\n            legend: {\n              position: 'top',\n              align: 'start',\n              maxHeight: 200,\n              labels: {\n                usePointStyle: true,\n                pointStyle: 'circle',\n                padding: 24,\n                font: {\n                  size: 16,\n                  lineHeight: 24,\n                  color: '#1B1B1B'\n                }\n              }\n            }\n          },\n          scales: {\n            y: {\n              ticks: {\n                min: 0,\n                max: 600,\n                stepSize: 100\n              }\n            }\n          }\n        }\n      });\n    }\n  }], [{\n    key: \"init\",\n    value: function init(){\n      var charts=document.querySelectorAll('.calc__graphics');\n\n      if(charts.length){\n        charts.forEach(function (chart){\n          return new MyChart(chart);\n        });\n      }\n    }\n  }]);\n\n  return MyChart;\n}();\n\n\nMyChart.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/MyChart.js?")},"./dev/src/js/classes/Select.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Select; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");\n/* harmony import */ var _Controls_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(/*! ./Controls.js */ "./dev/src/js/classes/Controls.js");\n\n\n\n\n\n\n\n\n\nfunction _createSuper(Derived){ var hasNativeReflectConstruct=_isNativeReflectConstruct(); return function _createSuperInternal(){ var Super=(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(Derived), result; if(hasNativeReflectConstruct){ var NewTarget=(0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(this).constructor; result=Reflect.construct(Super, arguments, NewTarget); }else{ result=Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, result); };}\n\nfunction _isNativeReflectConstruct(){ if(typeof Reflect==="undefined"||!Reflect.construct) return false; if(Reflect.construct.sham) return false; if(typeof Proxy==="function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function (){})); return true; } catch (e){ return false; }}\n\n\n\nvar Select=/*#__PURE__*/function (_Controls){\n  (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(Select, _Controls);\n\n  var _super=_createSuper(Select);\n\n  function Select(select){\n    var _this;\n\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Select);\n\n    _this=_super.call(this, select);\n    _this.select=select;\n    _this.input=_this.select.querySelector(\'input\');\n    _this.is_open=true; // Кнопка селекта\n\n    _this.toggler_handler=_this.toggle.bind((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this));\n    _this.button=_this.select.querySelector(\'.select__button\');\n\n    _this.button.addEventListener(\'click\', _this.toggler_handler); // Список\n\n\n    _this.list=_this.select.querySelector(\'.select__list\');\n\n    if(_this.list){\n      // Значения\n      _this.set_value_handled=_this.setTargetValue.bind((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this));\n      _this.values=_this.list.querySelectorAll(\'li\');\n\n      if(_this.values.length){\n        _this.values.forEach(function (value){\n          return value.addEventListener(\'click\', _this.set_value_handled);\n        });\n\n        document.body.addEventListener(\'click\', _this.isOverflow.bind((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this)));\n      } // Значение по умолчанию\n\n\n      _this.setDefaultValue();\n\n      _this.toggle();\n    }\n\n    return _this;\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(Select, [{\n    key: "isOverflow",\n    value: function isOverflow(e){\n      if(!e.target.closest(\'.select\')){\n        this.close();\n      }\n    }\n  }, {\n    key: "toggle",\n    value: function toggle(){\n      if(this.is_open){\n        this.close();\n      }else{\n        this.open();\n      }\n    }\n  }, {\n    key: "open",\n    value: function open(){\n      this.list.hidden=false;\n      this.is_open=true;\n      this.button.classList.add(\'open\');\n    }\n  }, {\n    key: "close",\n    value: function close(){\n      this.list.hidden=true;\n      this.is_open=false;\n      this.button.classList.remove(\'open\');\n    }\n  }, {\n    key: "setTargetValue",\n    value: function setTargetValue(e){\n      var item=e.target;\n\n      if(item.dataset.value){\n        e.preventDefault();\n        var text=item.innerText;\n        var value=item.dataset.value;\n        this.setValue(text, value);\n        this.close();\n        this.input.dispatchEvent(new Event(\'change\'));\n        item.dispatchEvent(new Event(\'change\'));\n      }else{\n        var _text=item.innerText;\n        this.setValue(_text, \'\');\n        this.close();\n      }\n    }\n  }, {\n    key: "setDefaultValue",\n    value: function (){\n      var _setDefaultValue=(0,_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__["default"])(/*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.mark(function _callee(){\n        var selected_value, selected_text, i, value, placeholder;\n        return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_7__.wrap(function _callee$(_context){\n          while (1){\n            switch (_context.prev=_context.next){\n              case 0:\n                selected_value=\'\';\n                selected_text=\'\';\n                i=0;\n\n              case 3:\n                if(!(i < this.values.length)){\n                  _context.next=26;\n                  break;\n                }\n\n                value=this.values[i];\n\n                if(!value.getAttribute(\'data-selected\')){\n                  _context.next=23;\n                  break;\n                }\n\n                _context.next=8;\n                return value.getAttribute(\'data-selected\');\n\n              case 8:\n                if(!_context.sent){\n                  _context.next=12;\n                  break;\n                }\n\n                _context.t0=value.innerText;\n                _context.next=13;\n                break;\n\n              case 12:\n                _context.t0=null;\n\n              case 13:\n                selected_text=_context.t0;\n                _context.next=16;\n                return value.getAttribute(\'data-selected\');\n\n              case 16:\n                if(!_context.sent){\n                  _context.next=20;\n                  break;\n                }\n\n                _context.t1=value.dataset.value ? value.dataset.value:null;\n                _context.next=21;\n                break;\n\n              case 20:\n                _context.t1=null;\n\n              case 21:\n                selected_value=_context.t1;\n                return _context.abrupt("break", 26);\n\n              case 23:\n                i++;\n                _context.next=3;\n                break;\n\n              case 26:\n                if(selected_text||selected_value){\n                  if(!selected_value) selected_value=\'\';\n                  this.setValue(selected_text, selected_value);\n                }else{\n                  placeholder=\'Выберите\';\n\n                  if(this.button.dataset.placeholder){\n                    placeholder=this.button.dataset.placeholder;\n                  }\n\n                  this.setValue(placeholder, 0);\n                }\n\n              case 27:\n              case "end":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function setDefaultValue(){\n        return _setDefaultValue.apply(this, arguments);\n      }\n\n      return setDefaultValue;\n    }()\n  }, {\n    key: "setValue",\n    value: function setValue(text, value){\n      this.button.querySelector(\'span\').innerText=text;\n      this.input.value=value;\n    }\n  }], [{\n    key: "init",\n    value: function init(){\n      var selects=document.querySelectorAll(\'.select\');\n\n      if(selects.length){\n        selects.forEach(function (select){\n          return new Select(select);\n        });\n      }\n    }\n  }]);\n\n  return Select;\n}(_Controls_js__WEBPACK_IMPORTED_MODULE_8__["default"]);\n\n\nSelect.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Select.js?')},"./dev/src/js/classes/SliderUI.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ SliderUI; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n/* harmony import */ var nouislider__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(/*! nouislider */ "./node_modules/nouislider/dist/nouislider.mjs");\n\n\n\n\nvar SliderUI=/*#__PURE__*/function (){\n  function SliderUI(slider){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, SliderUI);\n\n    this.slider=slider;\n\n    if(this.slider.classList.contains(\'slider--age\')){\n      this.create_age();\n    }\n\n    if(this.slider.classList.contains(\'slider--top\')){\n      this.create_top();\n    }\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(SliderUI, [{\n    key: "create_age",\n    value: function create_age(){\n      var values_list=[0, 2, 5, 7, 10];\n      var formatTop={\n        to: function to(value){\n          return values_list[Math.round(value)];\n        },\n        from: function from(value){\n          return values_list.indexOf(Number(value));\n        }\n      };\n      nouislider__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.slider, {\n        start: [1],\n        connect: [true, false],\n        step: 1,\n        range: {\n          min: 0,\n          max: values_list.length - 1\n        },\n        pips: {\n          mode: \'steps\',\n          format: formatTop\n        }\n      });\n      var input=this.slider.querySelector("input[type=\'hidden\']");\n      this.slider.noUiSlider.on(\'update\', function (values, handle){\n        input.value=values_list[Math.ceil(values)];\n      });\n    }\n  }, {\n    key: "create_top",\n    value: function create_top(){\n      var values_list=[200, 400, 600, 800, 1000];\n      var format={\n        to: function to(value){\n          return values_list[Math.round(value)];\n        },\n        from: function from(value){\n          return values_list.indexOf(Number(value));\n        }\n      };\n      nouislider__WEBPACK_IMPORTED_MODULE_2__["default"].create(this.slider, {\n        start: [0],\n        connect: [true, false],\n        step: 1,\n        range: {\n          min: 0,\n          max: values_list.length - 1\n        },\n        pips: {\n          mode: \'steps\',\n          format: format\n        }\n      });\n      var input=this.slider.querySelector("input[type=\'hidden\']");\n      this.slider.noUiSlider.on(\'update\', function (values, handle){\n        input.value=values_list[Math.ceil(values)];\n      });\n    }\n  }], [{\n    key: "init",\n    value: function init(){\n      var sliders=document.querySelectorAll(\'.slider\');\n\n      if(sliders.length){\n        sliders.forEach(function (slider){\n          return new SliderUI(slider);\n        });\n      }\n    }\n  }]);\n\n  return SliderUI;\n}();\n\n\nSliderUI.init();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/SliderUI.js?')},"./dev/src/js/classes/Tooltip.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "default": function(){ return /* binding */ Tooltip; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");\n\n\nvar tooltip=null;\n\nvar Tooltip=/*#__PURE__*/function (){\n  function Tooltip(){\n    (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Tooltip);\n\n    this.x=innerWidth / 2;\n    this.y=innerHeight / 2;\n    this.start_offset_x=20;\n    this.start_offset_y=20;\n    this.offset_x=this.start_offset_x;\n    this.offset_y=this.start_offset_y;\n    this.targets=document.querySelectorAll(\'[data-tooltip-target]\');\n    this.create();\n    this.setHandlers();\n    this.move();\n  }\n\n  (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Tooltip, [{\n    key: "setHandlers",\n    value: function setHandlers(e){\n      var _this=this;\n\n      this.setXY_handler=this.setXY.bind(this);\n      document.addEventListener(\'mousemove\', this.setXY_handler);\n\n      if(this.targets){\n        this.targets.forEach(function (target){\n          return target.addEventListener(\'mouseover\', _this.enterElement.bind(_this));\n        });\n        this.targets.forEach(function (target){\n          return target.addEventListener(\'mouseout\', _this.leaveElement.bind(_this));\n        });\n      }\n    }\n  }, {\n    key: "setXY",\n    value: function setXY(e){\n      this.x=e.clientX;\n      this.y=e.clientY;\n    }\n  }, {\n    key: "enterElement",\n    value: function enterElement(e){\n      var target=e.target;\n      var parent=target.dataset.tooltipTarget ? target:target.closest(\'[data-tooltip-target]\');\n      var text=parent.dataset.tooltipTarget;\n      this.setText(text);\n      this.show();\n    }\n  }, {\n    key: "leaveElement",\n    value: function leaveElement(e){\n      this.setText(\'\');\n      this.hide();\n    }\n  }, {\n    key: "swapRightToLeft",\n    value: function swapRightToLeft(){\n      this.offset_x=(this.start_offset_x + this.tooltip.clientWidth) * -1;\n    }\n  }, {\n    key: "swapLeftToRight",\n    value: function swapLeftToRight(){\n      this.offset_x=this.start_offset_x;\n    }\n  }, {\n    key: "move",\n    value: function move(e){\n      if(this.x + this.tooltip.clientWidth + this.start_offset_x > innerWidth){\n        this.swapRightToLeft();\n      }\n\n      if(this.x - this.tooltip.clientWidth - this.start_offset_x < 0){\n        this.swapLeftToRight();\n      }\n\n      var target_x=this.x + this.offset_x;\n      var target_y=this.y + this.offset_y;\n      this.tooltip.style.setProperty(\'left\', target_x + \'px\');\n      this.tooltip.style.setProperty(\'top\', target_y + \'px\');\n      window.requestAnimationFrame(this.move.bind(this));\n    }\n  }, {\n    key: "show",\n    value: function show(){\n      this.tooltip.hidden=false;\n    }\n  }, {\n    key: "hide",\n    value: function hide(){\n      this.tooltip.hidden=true;\n    }\n  }, {\n    key: "setText",\n    value: function setText(text){\n      this.tooltip.innerHTML=text;\n    }\n  }, {\n    key: "remove",\n    value: function remove(){\n      document.removeEventListener(\'mousemove\', this.setXY_handler);\n      this.tooltip.remove();\n    }\n  }, {\n    key: "create",\n    value: function create(){\n      this.tooltip=document.createElement(\'div\');\n      this.tooltip.className=\'tooltip\';\n      this.hide();\n      document.body.append(this.tooltip);\n    }\n  }], [{\n    key: "reInit",\n    value: function reInit(){\n      tooltip.remove();\n      tooltip=null;\n      tooltip=new Tooltip();\n    }\n  }]);\n\n  return Tooltip;\n}();\n\n\ntooltip=new Tooltip();\n\n//# sourceURL=webpack://startHtml/./dev/src/js/classes/Tooltip.js?')},"./node_modules/chart.js/auto/auto.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "Animation": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Animation; },\n/* harmony export */   "Animations": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Animations; },\n/* harmony export */   "ArcElement": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.ArcElement; },\n/* harmony export */   "BarController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.BarController; },\n/* harmony export */   "BarElement": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.BarElement; },\n/* harmony export */   "BasePlatform": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.BasePlatform; },\n/* harmony export */   "BasicPlatform": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.BasicPlatform; },\n/* harmony export */   "BubbleController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.BubbleController; },\n/* harmony export */   "CategoryScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.CategoryScale; },\n/* harmony export */   "Chart": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Chart; },\n/* harmony export */   "Colors": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Colors; },\n/* harmony export */   "DatasetController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.DatasetController; },\n/* harmony export */   "Decimation": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Decimation; },\n/* harmony export */   "DomPlatform": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.DomPlatform; },\n/* harmony export */   "DoughnutController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.DoughnutController; },\n/* harmony export */   "Element": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Element; },\n/* harmony export */   "Filler": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Filler; },\n/* harmony export */   "Interaction": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Interaction; },\n/* harmony export */   "Legend": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Legend; },\n/* harmony export */   "LineController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.LineController; },\n/* harmony export */   "LineElement": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.LineElement; },\n/* harmony export */   "LinearScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.LinearScale; },\n/* harmony export */   "LogarithmicScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.LogarithmicScale; },\n/* harmony export */   "PieController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.PieController; },\n/* harmony export */   "PointElement": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.PointElement; },\n/* harmony export */   "PolarAreaController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.PolarAreaController; },\n/* harmony export */   "RadarController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.RadarController; },\n/* harmony export */   "RadialLinearScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.RadialLinearScale; },\n/* harmony export */   "Scale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Scale; },\n/* harmony export */   "ScatterController": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.ScatterController; },\n/* harmony export */   "SubTitle": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.SubTitle; },\n/* harmony export */   "Ticks": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Ticks; },\n/* harmony export */   "TimeScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.TimeScale; },\n/* harmony export */   "TimeSeriesScale": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.TimeSeriesScale; },\n/* harmony export */   "Title": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Title; },\n/* harmony export */   "Tooltip": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Tooltip; },\n/* harmony export */   "_adapters": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__._adapters; },\n/* harmony export */   "_detectPlatform": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__._detectPlatform; },\n/* harmony export */   "animator": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.animator; },\n/* harmony export */   "controllers": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.controllers; },\n/* harmony export */   "defaults": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.defaults; },\n/* harmony export */   "elements": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.elements; },\n/* harmony export */   "layouts": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.layouts; },\n/* harmony export */   "plugins": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.plugins; },\n/* harmony export */   "registerables": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables; },\n/* harmony export */   "registry": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.registry; },\n/* harmony export */   "scales": function(){ return /* reexport safe */ _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.scales; }\n/* harmony export */ });\n/* harmony import */ var _dist_chart_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! ../dist/chart.js */ "./node_modules/chart.js/dist/chart.js");\n\n\n_dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Chart.register(..._dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables);\n\n\n/* harmony default export */ __webpack_exports__["default"]=(_dist_chart_js__WEBPACK_IMPORTED_MODULE_0__.Chart);\n\n\n//# sourceURL=webpack://startHtml/./node_modules/chart.js/auto/auto.js?')},"./node_modules/chart.js/dist/chart.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"Animation\": function(){ return /* binding */ Animation; },\n/* harmony export */   \"Animations\": function(){ return /* binding */ Animations; },\n/* harmony export */   \"ArcElement\": function(){ return /* binding */ ArcElement; },\n/* harmony export */   \"BarController\": function(){ return /* binding */ BarController; },\n/* harmony export */   \"BarElement\": function(){ return /* binding */ BarElement; },\n/* harmony export */   \"BasePlatform\": function(){ return /* binding */ BasePlatform; },\n/* harmony export */   \"BasicPlatform\": function(){ return /* binding */ BasicPlatform; },\n/* harmony export */   \"BubbleController\": function(){ return /* binding */ BubbleController; },\n/* harmony export */   \"CategoryScale\": function(){ return /* binding */ CategoryScale; },\n/* harmony export */   \"Chart\": function(){ return /* binding */ Chart; },\n/* harmony export */   \"Colors\": function(){ return /* binding */ plugin_colors; },\n/* harmony export */   \"DatasetController\": function(){ return /* binding */ DatasetController; },\n/* harmony export */   \"Decimation\": function(){ return /* binding */ plugin_decimation; },\n/* harmony export */   \"DomPlatform\": function(){ return /* binding */ DomPlatform; },\n/* harmony export */   \"DoughnutController\": function(){ return /* binding */ DoughnutController; },\n/* harmony export */   \"Element\": function(){ return /* binding */ Element; },\n/* harmony export */   \"Filler\": function(){ return /* binding */ index; },\n/* harmony export */   \"Interaction\": function(){ return /* binding */ Interaction; },\n/* harmony export */   \"Legend\": function(){ return /* binding */ plugin_legend; },\n/* harmony export */   \"LineController\": function(){ return /* binding */ LineController; },\n/* harmony export */   \"LineElement\": function(){ return /* binding */ LineElement; },\n/* harmony export */   \"LinearScale\": function(){ return /* binding */ LinearScale; },\n/* harmony export */   \"LogarithmicScale\": function(){ return /* binding */ LogarithmicScale; },\n/* harmony export */   \"PieController\": function(){ return /* binding */ PieController; },\n/* harmony export */   \"PointElement\": function(){ return /* binding */ PointElement; },\n/* harmony export */   \"PolarAreaController\": function(){ return /* binding */ PolarAreaController; },\n/* harmony export */   \"RadarController\": function(){ return /* binding */ RadarController; },\n/* harmony export */   \"RadialLinearScale\": function(){ return /* binding */ RadialLinearScale; },\n/* harmony export */   \"Scale\": function(){ return /* binding */ Scale; },\n/* harmony export */   \"ScatterController\": function(){ return /* binding */ ScatterController; },\n/* harmony export */   \"SubTitle\": function(){ return /* binding */ plugin_subtitle; },\n/* harmony export */   \"Ticks\": function(){ return /* reexport safe */ _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aL; },\n/* harmony export */   \"TimeScale\": function(){ return /* binding */ TimeScale; },\n/* harmony export */   \"TimeSeriesScale\": function(){ return /* binding */ TimeSeriesScale; },\n/* harmony export */   \"Title\": function(){ return /* binding */ plugin_title; },\n/* harmony export */   \"Tooltip\": function(){ return /* binding */ plugin_tooltip; },\n/* harmony export */   \"_adapters\": function(){ return /* binding */ adapters; },\n/* harmony export */   \"_detectPlatform\": function(){ return /* binding */ _detectPlatform; },\n/* harmony export */   \"animator\": function(){ return /* binding */ animator; },\n/* harmony export */   \"controllers\": function(){ return /* binding */ controllers; },\n/* harmony export */   \"defaults\": function(){ return /* reexport safe */ _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d; },\n/* harmony export */   \"elements\": function(){ return /* binding */ elements; },\n/* harmony export */   \"layouts\": function(){ return /* binding */ layouts; },\n/* harmony export */   \"plugins\": function(){ return /* binding */ plugins; },\n/* harmony export */   \"registerables\": function(){ return /* binding */ registerables; },\n/* harmony export */   \"registry\": function(){ return /* binding */ registry; },\n/* harmony export */   \"scales\": function(){ return /* binding */ scales; }\n/* harmony export */ });\n/* harmony import */ var _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! ./chunks/helpers.segment.js */ \"./node_modules/chart.js/dist/chunks/helpers.segment.js\");\n/*!\n * Chart.js v4.3.3\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\n\n\n\nclass Animator {\n    constructor(){\n        this._request=null;\n        this._charts=new Map();\n        this._running=false;\n        this._lastDate=undefined;\n    }\n _notify(chart, anims, date, type){\n        const callbacks=anims.listeners[type];\n        const numSteps=anims.duration;\n        callbacks.forEach((fn)=>fn({\n                chart,\n                initial: anims.initial,\n                numSteps,\n                currentStep: Math.min(date - anims.start, numSteps)\n            }));\n    }\n _refresh(){\n        if(this._request){\n            return;\n        }\n        this._running=true;\n        this._request=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.r.call(window, ()=>{\n            this._update();\n            this._request=null;\n            if(this._running){\n                this._refresh();\n            }\n        });\n    }\n _update(date=Date.now()){\n        let remaining=0;\n        this._charts.forEach((anims, chart)=>{\n            if(!anims.running||!anims.items.length){\n                return;\n            }\n            const items=anims.items;\n            let i=items.length - 1;\n            let draw=false;\n            let item;\n            for(; i >=0; --i){\n                item=items[i];\n                if(item._active){\n                    if(item._total > anims.duration){\n                        anims.duration=item._total;\n                    }\n                    item.tick(date);\n                    draw=true;\n                }else{\n                    items[i]=items[items.length - 1];\n                    items.pop();\n                }\n            }\n            if(draw){\n                chart.draw();\n                this._notify(chart, anims, date, 'progress');\n            }\n            if(!items.length){\n                anims.running=false;\n                this._notify(chart, anims, date, 'complete');\n                anims.initial=false;\n            }\n            remaining +=items.length;\n        });\n        this._lastDate=date;\n        if(remaining===0){\n            this._running=false;\n        }\n    }\n _getAnims(chart){\n        const charts=this._charts;\n        let anims=charts.get(chart);\n        if(!anims){\n            anims={\n                running: false,\n                initial: true,\n                items: [],\n                listeners: {\n                    complete: [],\n                    progress: []\n                }\n            };\n            charts.set(chart, anims);\n        }\n        return anims;\n    }\n listen(chart, event, cb){\n        this._getAnims(chart).listeners[event].push(cb);\n    }\n add(chart, items){\n        if(!items||!items.length){\n            return;\n        }\n        this._getAnims(chart).items.push(...items);\n    }\n has(chart){\n        return this._getAnims(chart).items.length > 0;\n    }\n start(chart){\n        const anims=this._charts.get(chart);\n        if(!anims){\n            return;\n        }\n        anims.running=true;\n        anims.start=Date.now();\n        anims.duration=anims.items.reduce((acc, cur)=>Math.max(acc, cur._duration), 0);\n        this._refresh();\n    }\n    running(chart){\n        if(!this._running){\n            return false;\n        }\n        const anims=this._charts.get(chart);\n        if(!anims||!anims.running||!anims.items.length){\n            return false;\n        }\n        return true;\n    }\n stop(chart){\n        const anims=this._charts.get(chart);\n        if(!anims||!anims.items.length){\n            return;\n        }\n        const items=anims.items;\n        let i=items.length - 1;\n        for(; i >=0; --i){\n            items[i].cancel();\n        }\n        anims.items=[];\n        this._notify(chart, anims, Date.now(), 'complete');\n    }\n remove(chart){\n        return this._charts.delete(chart);\n    }\n}\nvar animator=/* #__PURE__ */ new Animator();\n\nconst transparent='transparent';\nconst interpolators={\n    boolean (from, to, factor){\n        return factor > 0.5 ? to:from;\n    },\n color (from, to, factor){\n        const c0=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.c)(from||transparent);\n        const c1=c0.valid&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.c)(to||transparent);\n        return c1&&c1.valid ? c1.mix(c0, factor).hexString():to;\n    },\n    number (from, to, factor){\n        return from + (to - from) * factor;\n    }\n};\nclass Animation {\n    constructor(cfg, target, prop, to){\n        const currentValue=target[prop];\n        to=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a)([\n            cfg.to,\n            to,\n            currentValue,\n            cfg.from\n        ]);\n        const from=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a)([\n            cfg.from,\n            currentValue,\n            to\n        ]);\n        this._active=true;\n        this._fn=cfg.fn||interpolators[cfg.type||typeof from];\n        this._easing=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.e[cfg.easing]||_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.e.linear;\n        this._start=Math.floor(Date.now() + (cfg.delay||0));\n        this._duration=this._total=Math.floor(cfg.duration);\n        this._loop = !!cfg.loop;\n        this._target=target;\n        this._prop=prop;\n        this._from=from;\n        this._to=to;\n        this._promises=undefined;\n    }\n    active(){\n        return this._active;\n    }\n    update(cfg, to, date){\n        if(this._active){\n            this._notify(false);\n            const currentValue=this._target[this._prop];\n            const elapsed=date - this._start;\n            const remain=this._duration - elapsed;\n            this._start=date;\n            this._duration=Math.floor(Math.max(remain, cfg.duration));\n            this._total +=elapsed;\n            this._loop = !!cfg.loop;\n            this._to=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a)([\n                cfg.to,\n                to,\n                currentValue,\n                cfg.from\n            ]);\n            this._from=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a)([\n                cfg.from,\n                currentValue,\n                to\n            ]);\n        }\n    }\n    cancel(){\n        if(this._active){\n            this.tick(Date.now());\n            this._active=false;\n            this._notify(false);\n        }\n    }\n    tick(date){\n        const elapsed=date - this._start;\n        const duration=this._duration;\n        const prop=this._prop;\n        const from=this._from;\n        const loop=this._loop;\n        const to=this._to;\n        let factor;\n        this._active=from!==to&&(loop||elapsed < duration);\n        if(!this._active){\n            this._target[prop]=to;\n            this._notify(true);\n            return;\n        }\n        if(elapsed < 0){\n            this._target[prop]=from;\n            return;\n        }\n        factor=elapsed / duration % 2;\n        factor=loop&&factor > 1 ? 2 - factor:factor;\n        factor=this._easing(Math.min(1, Math.max(0, factor)));\n        this._target[prop]=this._fn(from, to, factor);\n    }\n    wait(){\n        const promises=this._promises||(this._promises=[]);\n        return new Promise((res, rej)=>{\n            promises.push({\n                res,\n                rej\n            });\n        });\n    }\n    _notify(resolved){\n        const method=resolved ? 'res':'rej';\n        const promises=this._promises||[];\n        for(let i=0; i < promises.length; i++){\n            promises[i][method]();\n        }\n    }\n}\n\nclass Animations {\n    constructor(chart, config){\n        this._chart=chart;\n        this._properties=new Map();\n        this.configure(config);\n    }\n    configure(config){\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(config)){\n            return;\n        }\n        const animationOptions=Object.keys(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.animation);\n        const animatedProps=this._properties;\n        Object.getOwnPropertyNames(config).forEach((key)=>{\n            const cfg=config[key];\n            if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(cfg)){\n                return;\n            }\n            const resolved={};\n            for (const option of animationOptions){\n                resolved[option]=cfg[option];\n            }\n            ((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(cfg.properties)&&cfg.properties||[\n                key\n            ]).forEach((prop)=>{\n                if(prop===key||!animatedProps.has(prop)){\n                    animatedProps.set(prop, resolved);\n                }\n            });\n        });\n    }\n _animateOptions(target, values){\n        const newOptions=values.options;\n        const options=resolveTargetOptions(target, newOptions);\n        if(!options){\n            return [];\n        }\n        const animations=this._createAnimations(options, newOptions);\n        if(newOptions.$shared){\n            awaitAll(target.options.$animations, newOptions).then(()=>{\n                target.options=newOptions;\n            }, ()=>{\n            });\n        }\n        return animations;\n    }\n _createAnimations(target, values){\n        const animatedProps=this._properties;\n        const animations=[];\n        const running=target.$animations||(target.$animations={});\n        const props=Object.keys(values);\n        const date=Date.now();\n        let i;\n        for(i=props.length - 1; i >=0; --i){\n            const prop=props[i];\n            if(prop.charAt(0)==='$'){\n                continue;\n            }\n            if(prop==='options'){\n                animations.push(...this._animateOptions(target, values));\n                continue;\n            }\n            const value=values[prop];\n            let animation=running[prop];\n            const cfg=animatedProps.get(prop);\n            if(animation){\n                if(cfg&&animation.active()){\n                    animation.update(cfg, value, date);\n                    continue;\n                }else{\n                    animation.cancel();\n                }\n            }\n            if(!cfg||!cfg.duration){\n                target[prop]=value;\n                continue;\n            }\n            running[prop]=animation=new Animation(cfg, target, prop, value);\n            animations.push(animation);\n        }\n        return animations;\n    }\n update(target, values){\n        if(this._properties.size===0){\n            Object.assign(target, values);\n            return;\n        }\n        const animations=this._createAnimations(target, values);\n        if(animations.length){\n            animator.add(this._chart, animations);\n            return true;\n        }\n    }\n}\nfunction awaitAll(animations, properties){\n    const running=[];\n    const keys=Object.keys(properties);\n    for(let i=0; i < keys.length; i++){\n        const anim=animations[keys[i]];\n        if(anim&&anim.active()){\n            running.push(anim.wait());\n        }\n    }\n    return Promise.all(running);\n}\nfunction resolveTargetOptions(target, newOptions){\n    if(!newOptions){\n        return;\n    }\n    let options=target.options;\n    if(!options){\n        target.options=newOptions;\n        return;\n    }\n    if(options.$shared){\n        target.options=options=Object.assign({}, options, {\n            $shared: false,\n            $animations: {}\n        });\n    }\n    return options;\n}\n\nfunction scaleClip(scale, allowedOverflow){\n    const opts=scale&&scale.options||{};\n    const reverse=opts.reverse;\n    const min=opts.min===undefined ? allowedOverflow:0;\n    const max=opts.max===undefined ? allowedOverflow:0;\n    return {\n        start: reverse ? max:min,\n        end: reverse ? min:max\n    };\n}\nfunction defaultClip(xScale, yScale, allowedOverflow){\n    if(allowedOverflow===false){\n        return false;\n    }\n    const x=scaleClip(xScale, allowedOverflow);\n    const y=scaleClip(yScale, allowedOverflow);\n    return {\n        top: y.end,\n        right: x.end,\n        bottom: y.start,\n        left: x.start\n    };\n}\nfunction toClip(value){\n    let t, r, b, l;\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(value)){\n        t=value.top;\n        r=value.right;\n        b=value.bottom;\n        l=value.left;\n    }else{\n        t=r = b=l = value;\n    }\n    return {\n        top: t,\n        right: r,\n        bottom: b,\n        left: l,\n        disabled: value===false\n    };\n}\nfunction getSortedDatasetIndices(chart, filterVisible){\n    const keys=[];\n    const metasets=chart._getSortedDatasetMetas(filterVisible);\n    let i, ilen;\n    for(i=0, ilen=metasets.length; i < ilen; ++i){\n        keys.push(metasets[i].index);\n    }\n    return keys;\n}\nfunction applyStack(stack, value, dsIndex, options={}){\n    const keys=stack.keys;\n    const singleMode=options.mode==='single';\n    let i, ilen, datasetIndex, otherValue;\n    if(value===null){\n        return;\n    }\n    for(i=0, ilen=keys.length; i < ilen; ++i){\n        datasetIndex=+keys[i];\n        if(datasetIndex===dsIndex){\n            if(options.all){\n                continue;\n            }\n            break;\n        }\n        otherValue=stack.values[datasetIndex];\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(otherValue)&&(singleMode||value===0||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(value)===(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(otherValue))){\n            value +=otherValue;\n        }\n    }\n    return value;\n}\nfunction convertObjectDataToArray(data){\n    const keys=Object.keys(data);\n    const adata=new Array(keys.length);\n    let i, ilen, key;\n    for(i=0, ilen=keys.length; i < ilen; ++i){\n        key=keys[i];\n        adata[i]={\n            x: key,\n            y: data[key]\n        };\n    }\n    return adata;\n}\nfunction isStacked(scale, meta){\n    const stacked=scale&&scale.options.stacked;\n    return stacked||stacked===undefined&&meta.stack!==undefined;\n}\nfunction getStackKey(indexScale, valueScale, meta){\n    return `${indexScale.id}.${valueScale.id}.${meta.stack||meta.type}`;\n}\nfunction getUserBounds(scale){\n    const { min , max , minDefined , maxDefined  }=scale.getUserBounds();\n    return {\n        min: minDefined ? min:Number.NEGATIVE_INFINITY,\n        max: maxDefined ? max:Number.POSITIVE_INFINITY\n    };\n}\nfunction getOrCreateStack(stacks, stackKey, indexValue){\n    const subStack=stacks[stackKey]||(stacks[stackKey]={});\n    return subStack[indexValue]||(subStack[indexValue]={});\n}\nfunction getLastIndexInStack(stack, vScale, positive, type){\n    for (const meta of vScale.getMatchingVisibleMetas(type).reverse()){\n        const value=stack[meta.index];\n        if(positive&&value > 0||!positive&&value < 0){\n            return meta.index;\n        }\n    }\n    return null;\n}\nfunction updateStacks(controller, parsed){\n    const { chart , _cachedMeta: meta  }=controller;\n    const stacks=chart._stacks||(chart._stacks={});\n    const { iScale , vScale , index: datasetIndex  }=meta;\n    const iAxis=iScale.axis;\n    const vAxis=vScale.axis;\n    const key=getStackKey(iScale, vScale, meta);\n    const ilen=parsed.length;\n    let stack;\n    for(let i=0; i < ilen; ++i){\n        const item=parsed[i];\n        const { [iAxis]: index , [vAxis]: value  }=item;\n        const itemStacks=item._stacks||(item._stacks={});\n        stack=itemStacks[vAxis]=getOrCreateStack(stacks, key, index);\n        stack[datasetIndex]=value;\n        stack._top=getLastIndexInStack(stack, vScale, true, meta.type);\n        stack._bottom=getLastIndexInStack(stack, vScale, false, meta.type);\n        const visualValues=stack._visualValues||(stack._visualValues={});\n        visualValues[datasetIndex]=value;\n    }\n}\nfunction getFirstScaleId(chart, axis){\n    const scales=chart.scales;\n    return Object.keys(scales).filter((key)=>scales[key].axis===axis).shift();\n}\nfunction createDatasetContext(parent, index){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        active: false,\n        dataset: undefined,\n        datasetIndex: index,\n        index,\n        mode: 'default',\n        type: 'dataset'\n    });\n}\nfunction createDataContext(parent, index, element){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        active: false,\n        dataIndex: index,\n        parsed: undefined,\n        raw: undefined,\n        element,\n        index,\n        mode: 'default',\n        type: 'data'\n    });\n}\nfunction clearStacks(meta, items){\n    const datasetIndex=meta.controller.index;\n    const axis=meta.vScale&&meta.vScale.axis;\n    if(!axis){\n        return;\n    }\n    items=items||meta._parsed;\n    for (const parsed of items){\n        const stacks=parsed._stacks;\n        if(!stacks||stacks[axis]===undefined||stacks[axis][datasetIndex]===undefined){\n            return;\n        }\n        delete stacks[axis][datasetIndex];\n        if(stacks[axis]._visualValues!==undefined&&stacks[axis]._visualValues[datasetIndex]!==undefined){\n            delete stacks[axis]._visualValues[datasetIndex];\n        }\n    }\n}\nconst isDirectUpdateMode=(mode)=>mode==='reset'||mode==='none';\nconst cloneIfNotShared=(cached, shared)=>shared ? cached:Object.assign({}, cached);\nconst createStack=(canStack, meta, chart)=>canStack&&!meta.hidden&&meta._stacked&&{\n        keys: getSortedDatasetIndices(chart, true),\n        values: null\n    };\nclass DatasetController {\n static defaults={};\n static datasetElementType=null;\n static dataElementType=null;\n constructor(chart, datasetIndex){\n        this.chart=chart;\n        this._ctx=chart.ctx;\n        this.index=datasetIndex;\n        this._cachedDataOpts={};\n        this._cachedMeta=this.getMeta();\n        this._type=this._cachedMeta.type;\n        this.options=undefined;\n         this._parsing=false;\n        this._data=undefined;\n        this._objectData=undefined;\n        this._sharedOptions=undefined;\n        this._drawStart=undefined;\n        this._drawCount=undefined;\n        this.enableOptionSharing=false;\n        this.supportsDecimation=false;\n        this.$context=undefined;\n        this._syncList=[];\n        this.datasetElementType=new.target.datasetElementType;\n        this.dataElementType=new.target.dataElementType;\n        this.initialize();\n    }\n    initialize(){\n        const meta=this._cachedMeta;\n        this.configure();\n        this.linkScales();\n        meta._stacked=isStacked(meta.vScale, meta);\n        this.addElements();\n        if(this.options.fill&&!this.chart.isPluginEnabled('filler')){\n            console.warn(\"Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options\");\n        }\n    }\n    updateIndex(datasetIndex){\n        if(this.index!==datasetIndex){\n            clearStacks(this._cachedMeta);\n        }\n        this.index=datasetIndex;\n    }\n    linkScales(){\n        const chart=this.chart;\n        const meta=this._cachedMeta;\n        const dataset=this.getDataset();\n        const chooseId=(axis, x, y, r)=>axis==='x' ? x:axis==='r' ? r:y;\n        const xid=meta.xAxisID=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n        const yid=meta.yAxisID=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n        const rid=meta.rAxisID=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n        const indexAxis=meta.indexAxis;\n        const iid=meta.iAxisID=chooseId(indexAxis, xid, yid, rid);\n        const vid=meta.vAxisID=chooseId(indexAxis, yid, xid, rid);\n        meta.xScale=this.getScaleForId(xid);\n        meta.yScale=this.getScaleForId(yid);\n        meta.rScale=this.getScaleForId(rid);\n        meta.iScale=this.getScaleForId(iid);\n        meta.vScale=this.getScaleForId(vid);\n    }\n    getDataset(){\n        return this.chart.data.datasets[this.index];\n    }\n    getMeta(){\n        return this.chart.getDatasetMeta(this.index);\n    }\n getScaleForId(scaleID){\n        return this.chart.scales[scaleID];\n    }\n _getOtherScale(scale){\n        const meta=this._cachedMeta;\n        return scale===meta.iScale ? meta.vScale:meta.iScale;\n    }\n    reset(){\n        this._update('reset');\n    }\n _destroy(){\n        const meta=this._cachedMeta;\n        if(this._data){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.u)(this._data, this);\n        }\n        if(meta._stacked){\n            clearStacks(meta);\n        }\n    }\n _dataCheck(){\n        const dataset=this.getDataset();\n        const data=dataset.data||(dataset.data=[]);\n        const _data=this._data;\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(data)){\n            this._data=convertObjectDataToArray(data);\n        }else if(_data!==data){\n            if(_data){\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.u)(_data, this);\n                const meta=this._cachedMeta;\n                clearStacks(meta);\n                meta._parsed=[];\n            }\n            if(data&&Object.isExtensible(data)){\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.l)(data, this);\n            }\n            this._syncList=[];\n            this._data=data;\n        }\n    }\n    addElements(){\n        const meta=this._cachedMeta;\n        this._dataCheck();\n        if(this.datasetElementType){\n            meta.dataset=new this.datasetElementType();\n        }\n    }\n    buildOrUpdateElements(resetNewElements){\n        const meta=this._cachedMeta;\n        const dataset=this.getDataset();\n        let stackChanged=false;\n        this._dataCheck();\n        const oldStacked=meta._stacked;\n        meta._stacked=isStacked(meta.vScale, meta);\n        if(meta.stack!==dataset.stack){\n            stackChanged=true;\n            clearStacks(meta);\n            meta.stack=dataset.stack;\n        }\n        this._resyncElements(resetNewElements);\n        if(stackChanged||oldStacked!==meta._stacked){\n            updateStacks(this, meta._parsed);\n        }\n    }\n configure(){\n        const config=this.chart.config;\n        const scopeKeys=config.datasetScopeKeys(this._type);\n        const scopes=config.getOptionScopes(this.getDataset(), scopeKeys, true);\n        this.options=config.createResolver(scopes, this.getContext());\n        this._parsing=this.options.parsing;\n        this._cachedDataOpts={};\n    }\n parse(start, count){\n        const { _cachedMeta: meta , _data: data  }=this;\n        const { iScale , _stacked  }=meta;\n        const iAxis=iScale.axis;\n        let sorted=start===0&&count===data.length ? true:meta._sorted;\n        let prev=start > 0&&meta._parsed[start - 1];\n        let i, cur, parsed;\n        if(this._parsing===false){\n            meta._parsed=data;\n            meta._sorted=true;\n            parsed=data;\n        }else{\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(data[start])){\n                parsed=this.parseArrayData(meta, data, start, count);\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(data[start])){\n                parsed=this.parseObjectData(meta, data, start, count);\n            }else{\n                parsed=this.parsePrimitiveData(meta, data, start, count);\n            }\n            const isNotInOrderComparedToPrev=()=>cur[iAxis]===null||prev&&cur[iAxis] < prev[iAxis];\n            for(i=0; i < count; ++i){\n                meta._parsed[i + start]=cur=parsed[i];\n                if(sorted){\n                    if(isNotInOrderComparedToPrev()){\n                        sorted=false;\n                    }\n                    prev=cur;\n                }\n            }\n            meta._sorted=sorted;\n        }\n        if(_stacked){\n            updateStacks(this, parsed);\n        }\n    }\n parsePrimitiveData(meta, data, start, count){\n        const { iScale , vScale  }=meta;\n        const iAxis=iScale.axis;\n        const vAxis=vScale.axis;\n        const labels=iScale.getLabels();\n        const singleScale=iScale===vScale;\n        const parsed=new Array(count);\n        let i, ilen, index;\n        for(i=0, ilen=count; i < ilen; ++i){\n            index=i + start;\n            parsed[i]={\n                [iAxis]: singleScale||iScale.parse(labels[index], index),\n                [vAxis]: vScale.parse(data[index], index)\n            };\n        }\n        return parsed;\n    }\n parseArrayData(meta, data, start, count){\n        const { xScale , yScale  }=meta;\n        const parsed=new Array(count);\n        let i, ilen, index, item;\n        for(i=0, ilen=count; i < ilen; ++i){\n            index=i + start;\n            item=data[index];\n            parsed[i]={\n                x: xScale.parse(item[0], index),\n                y: yScale.parse(item[1], index)\n            };\n        }\n        return parsed;\n    }\n parseObjectData(meta, data, start, count){\n        const { xScale , yScale  }=meta;\n        const { xAxisKey='x' , yAxisKey='y'  }=this._parsing;\n        const parsed=new Array(count);\n        let i, ilen, index, item;\n        for(i=0, ilen=count; i < ilen; ++i){\n            index=i + start;\n            item=data[index];\n            parsed[i]={\n                x: xScale.parse((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(item, xAxisKey), index),\n                y: yScale.parse((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(item, yAxisKey), index)\n            };\n        }\n        return parsed;\n    }\n getParsed(index){\n        return this._cachedMeta._parsed[index];\n    }\n getDataElement(index){\n        return this._cachedMeta.data[index];\n    }\n applyStack(scale, parsed, mode){\n        const chart=this.chart;\n        const meta=this._cachedMeta;\n        const value=parsed[scale.axis];\n        const stack={\n            keys: getSortedDatasetIndices(chart, true),\n            values: parsed._stacks[scale.axis]._visualValues\n        };\n        return applyStack(stack, value, meta.index, {\n            mode\n        });\n    }\n updateRangeFromParsed(range, scale, parsed, stack){\n        const parsedValue=parsed[scale.axis];\n        let value=parsedValue===null ? NaN:parsedValue;\n        const values=stack&&parsed._stacks[scale.axis];\n        if(stack&&values){\n            stack.values=values;\n            value=applyStack(stack, parsedValue, this._cachedMeta.index);\n        }\n        range.min=Math.min(range.min, value);\n        range.max=Math.max(range.max, value);\n    }\n getMinMax(scale, canStack){\n        const meta=this._cachedMeta;\n        const _parsed=meta._parsed;\n        const sorted=meta._sorted&&scale===meta.iScale;\n        const ilen=_parsed.length;\n        const otherScale=this._getOtherScale(scale);\n        const stack=createStack(canStack, meta, this.chart);\n        const range={\n            min: Number.POSITIVE_INFINITY,\n            max: Number.NEGATIVE_INFINITY\n        };\n        const { min: otherMin , max: otherMax  }=getUserBounds(otherScale);\n        let i, parsed;\n        function _skip(){\n            parsed=_parsed[i];\n            const otherValue=parsed[otherScale.axis];\n            return !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(parsed[scale.axis])||otherMin > otherValue||otherMax < otherValue;\n        }\n        for(i=0; i < ilen; ++i){\n            if(_skip()){\n                continue;\n            }\n            this.updateRangeFromParsed(range, scale, parsed, stack);\n            if(sorted){\n                break;\n            }\n        }\n        if(sorted){\n            for(i=ilen - 1; i >=0; --i){\n                if(_skip()){\n                    continue;\n                }\n                this.updateRangeFromParsed(range, scale, parsed, stack);\n                break;\n            }\n        }\n        return range;\n    }\n    getAllParsedValues(scale){\n        const parsed=this._cachedMeta._parsed;\n        const values=[];\n        let i, ilen, value;\n        for(i=0, ilen=parsed.length; i < ilen; ++i){\n            value=parsed[i][scale.axis];\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(value)){\n                values.push(value);\n            }\n        }\n        return values;\n    }\n getMaxOverflow(){\n        return false;\n    }\n getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const iScale=meta.iScale;\n        const vScale=meta.vScale;\n        const parsed=this.getParsed(index);\n        return {\n            label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]):'',\n            value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]):''\n        };\n    }\n _update(mode){\n        const meta=this._cachedMeta;\n        this.update(mode||'default');\n        meta._clip=toClip((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n    }\n update(mode){}\n    draw(){\n        const ctx=this._ctx;\n        const chart=this.chart;\n        const meta=this._cachedMeta;\n        const elements=meta.data||[];\n        const area=chart.chartArea;\n        const active=[];\n        const start=this._drawStart||0;\n        const count=this._drawCount||elements.length - start;\n        const drawActiveElementsOnTop=this.options.drawActiveElementsOnTop;\n        let i;\n        if(meta.dataset){\n            meta.dataset.draw(ctx, area, start, count);\n        }\n        for(i=start; i < start + count; ++i){\n            const element=elements[i];\n            if(element.hidden){\n                continue;\n            }\n            if(element.active&&drawActiveElementsOnTop){\n                active.push(element);\n            }else{\n                element.draw(ctx, area);\n            }\n        }\n        for(i=0; i < active.length; ++i){\n            active[i].draw(ctx, area);\n        }\n    }\n getStyle(index, active){\n        const mode=active ? 'active':'default';\n        return index===undefined&&this._cachedMeta.dataset ? this.resolveDatasetElementOptions(mode):this.resolveDataElementOptions(index||0, mode);\n    }\n getContext(index, active, mode){\n        const dataset=this.getDataset();\n        let context;\n        if(index >=0&&index < this._cachedMeta.data.length){\n            const element=this._cachedMeta.data[index];\n            context=element.$context||(element.$context=createDataContext(this.getContext(), index, element));\n            context.parsed=this.getParsed(index);\n            context.raw=dataset.data[index];\n            context.index=context.dataIndex=index;\n        }else{\n            context=this.$context||(this.$context=createDatasetContext(this.chart.getContext(), this.index));\n            context.dataset=dataset;\n            context.index=context.datasetIndex=this.index;\n        }\n        context.active = !!active;\n        context.mode=mode;\n        return context;\n    }\n resolveDatasetElementOptions(mode){\n        return this._resolveElementOptions(this.datasetElementType.id, mode);\n    }\n resolveDataElementOptions(index, mode){\n        return this._resolveElementOptions(this.dataElementType.id, mode, index);\n    }\n _resolveElementOptions(elementType, mode='default', index){\n        const active=mode==='active';\n        const cache=this._cachedDataOpts;\n        const cacheKey=elementType + '-' + mode;\n        const cached=cache[cacheKey];\n        const sharing=this.enableOptionSharing&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.h)(index);\n        if(cached){\n            return cloneIfNotShared(cached, sharing);\n        }\n        const config=this.chart.config;\n        const scopeKeys=config.datasetElementScopeKeys(this._type, elementType);\n        const prefixes=active ? [\n            `${elementType}Hover`,\n            'hover',\n            elementType,\n            ''\n        ]:[\n            elementType,\n            ''\n        ];\n        const scopes=config.getOptionScopes(this.getDataset(), scopeKeys);\n        const names=Object.keys(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.elements[elementType]);\n        const context=()=>this.getContext(index, active, mode);\n        const values=config.resolveNamedOptions(scopes, names, context, prefixes);\n        if(values.$shared){\n            values.$shared=sharing;\n            cache[cacheKey]=Object.freeze(cloneIfNotShared(values, sharing));\n        }\n        return values;\n    }\n _resolveAnimations(index, transition, active){\n        const chart=this.chart;\n        const cache=this._cachedDataOpts;\n        const cacheKey=`animation-${transition}`;\n        const cached=cache[cacheKey];\n        if(cached){\n            return cached;\n        }\n        let options;\n        if(chart.options.animation!==false){\n            const config=this.chart.config;\n            const scopeKeys=config.datasetAnimationScopeKeys(this._type, transition);\n            const scopes=config.getOptionScopes(this.getDataset(), scopeKeys);\n            options=config.createResolver(scopes, this.getContext(index, active, transition));\n        }\n        const animations=new Animations(chart, options&&options.animations);\n        if(options&&options._cacheable){\n            cache[cacheKey]=Object.freeze(animations);\n        }\n        return animations;\n    }\n getSharedOptions(options){\n        if(!options.$shared){\n            return;\n        }\n        return this._sharedOptions||(this._sharedOptions=Object.assign({}, options));\n    }\n includeOptions(mode, sharedOptions){\n        return !sharedOptions||isDirectUpdateMode(mode)||this.chart._animationsDisabled;\n    }\n _getSharedOptions(start, mode){\n        const firstOpts=this.resolveDataElementOptions(start, mode);\n        const previouslySharedOptions=this._sharedOptions;\n        const sharedOptions=this.getSharedOptions(firstOpts);\n        const includeOptions=this.includeOptions(mode, sharedOptions)||sharedOptions!==previouslySharedOptions;\n        this.updateSharedOptions(sharedOptions, mode, firstOpts);\n        return {\n            sharedOptions,\n            includeOptions\n        };\n    }\n updateElement(element, index, properties, mode){\n        if(isDirectUpdateMode(mode)){\n            Object.assign(element, properties);\n        }else{\n            this._resolveAnimations(index, mode).update(element, properties);\n        }\n    }\n updateSharedOptions(sharedOptions, mode, newOptions){\n        if(sharedOptions&&!isDirectUpdateMode(mode)){\n            this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n        }\n    }\n _setStyle(element, index, mode, active){\n        element.active=active;\n        const options=this.getStyle(index, active);\n        this._resolveAnimations(index, mode, active).update(element, {\n            options: !active&&this.getSharedOptions(options)||options\n        });\n    }\n    removeHoverStyle(element, datasetIndex, index){\n        this._setStyle(element, index, 'active', false);\n    }\n    setHoverStyle(element, datasetIndex, index){\n        this._setStyle(element, index, 'active', true);\n    }\n _removeDatasetHoverStyle(){\n        const element=this._cachedMeta.dataset;\n        if(element){\n            this._setStyle(element, undefined, 'active', false);\n        }\n    }\n _setDatasetHoverStyle(){\n        const element=this._cachedMeta.dataset;\n        if(element){\n            this._setStyle(element, undefined, 'active', true);\n        }\n    }\n _resyncElements(resetNewElements){\n        const data=this._data;\n        const elements=this._cachedMeta.data;\n        for (const [method, arg1, arg2] of this._syncList){\n            this[method](arg1, arg2);\n        }\n        this._syncList=[];\n        const numMeta=elements.length;\n        const numData=data.length;\n        const count=Math.min(numData, numMeta);\n        if(count){\n            this.parse(0, count);\n        }\n        if(numData > numMeta){\n            this._insertElements(numMeta, numData - numMeta, resetNewElements);\n        }else if(numData < numMeta){\n            this._removeElements(numData, numMeta - numData);\n        }\n    }\n _insertElements(start, count, resetNewElements=true){\n        const meta=this._cachedMeta;\n        const data=meta.data;\n        const end=start + count;\n        let i;\n        const move=(arr)=>{\n            arr.length +=count;\n            for(i=arr.length - 1; i >=end; i--){\n                arr[i]=arr[i - count];\n            }\n        };\n        move(data);\n        for(i=start; i < end; ++i){\n            data[i]=new this.dataElementType();\n        }\n        if(this._parsing){\n            move(meta._parsed);\n        }\n        this.parse(start, count);\n        if(resetNewElements){\n            this.updateElements(data, start, count, 'reset');\n        }\n    }\n    updateElements(element, start, count, mode){}\n _removeElements(start, count){\n        const meta=this._cachedMeta;\n        if(this._parsing){\n            const removed=meta._parsed.splice(start, count);\n            if(meta._stacked){\n                clearStacks(meta, removed);\n            }\n        }\n        meta.data.splice(start, count);\n    }\n _sync(args){\n        if(this._parsing){\n            this._syncList.push(args);\n        }else{\n            const [method, arg1, arg2]=args;\n            this[method](arg1, arg2);\n        }\n        this.chart._dataChanges.push([\n            this.index,\n            ...args\n        ]);\n    }\n    _onDataPush(){\n        const count=arguments.length;\n        this._sync([\n            '_insertElements',\n            this.getDataset().data.length - count,\n            count\n        ]);\n    }\n    _onDataPop(){\n        this._sync([\n            '_removeElements',\n            this._cachedMeta.data.length - 1,\n            1\n        ]);\n    }\n    _onDataShift(){\n        this._sync([\n            '_removeElements',\n            0,\n            1\n        ]);\n    }\n    _onDataSplice(start, count){\n        if(count){\n            this._sync([\n                '_removeElements',\n                start,\n                count\n            ]);\n        }\n        const newCount=arguments.length - 2;\n        if(newCount){\n            this._sync([\n                '_insertElements',\n                start,\n                newCount\n            ]);\n        }\n    }\n    _onDataUnshift(){\n        this._sync([\n            '_insertElements',\n            0,\n            arguments.length\n        ]);\n    }\n}\n\nfunction getAllScaleValues(scale, type){\n    if(!scale._cache.$bar){\n        const visibleMetas=scale.getMatchingVisibleMetas(type);\n        let values=[];\n        for(let i=0, ilen=visibleMetas.length; i < ilen; i++){\n            values=values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n        }\n        scale._cache.$bar=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__._)(values.sort((a, b)=>a - b));\n    }\n    return scale._cache.$bar;\n}\n function computeMinSampleSize(meta){\n    const scale=meta.iScale;\n    const values=getAllScaleValues(scale, meta.type);\n    let min=scale._length;\n    let i, ilen, curr, prev;\n    const updateMinAndPrev=()=>{\n        if(curr===32767||curr===-32768){\n            return;\n        }\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.h)(prev)){\n            min=Math.min(min, Math.abs(curr - prev)||min);\n        }\n        prev=curr;\n    };\n    for(i=0, ilen=values.length; i < ilen; ++i){\n        curr=scale.getPixelForValue(values[i]);\n        updateMinAndPrev();\n    }\n    prev=undefined;\n    for(i=0, ilen=scale.ticks.length; i < ilen; ++i){\n        curr=scale.getPixelForTick(i);\n        updateMinAndPrev();\n    }\n    return min;\n}\n function computeFitCategoryTraits(index, ruler, options, stackCount){\n    const thickness=options.barThickness;\n    let size, ratio;\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(thickness)){\n        size=ruler.min * options.categoryPercentage;\n        ratio=options.barPercentage;\n    }else{\n        size=thickness * stackCount;\n        ratio=1;\n    }\n    return {\n        chunk: size / stackCount,\n        ratio,\n        start: ruler.pixels[index] - size / 2\n    };\n}\n function computeFlexCategoryTraits(index, ruler, options, stackCount){\n    const pixels=ruler.pixels;\n    const curr=pixels[index];\n    let prev=index > 0 ? pixels[index - 1]:null;\n    let next=index < pixels.length - 1 ? pixels[index + 1]:null;\n    const percent=options.categoryPercentage;\n    if(prev===null){\n        prev=curr - (next===null ? ruler.end - ruler.start:next - curr);\n    }\n    if(next===null){\n        next=curr + curr - prev;\n    }\n    const start=curr - (curr - Math.min(prev, next)) / 2 * percent;\n    const size=Math.abs(next - prev) / 2 * percent;\n    return {\n        chunk: size / stackCount,\n        ratio: options.barPercentage,\n        start\n    };\n}\nfunction parseFloatBar(entry, item, vScale, i){\n    const startValue=vScale.parse(entry[0], i);\n    const endValue=vScale.parse(entry[1], i);\n    const min=Math.min(startValue, endValue);\n    const max=Math.max(startValue, endValue);\n    let barStart=min;\n    let barEnd=max;\n    if(Math.abs(min) > Math.abs(max)){\n        barStart=max;\n        barEnd=min;\n    }\n    item[vScale.axis]=barEnd;\n    item._custom={\n        barStart,\n        barEnd,\n        start: startValue,\n        end: endValue,\n        min,\n        max\n    };\n}\nfunction parseValue(entry, item, vScale, i){\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(entry)){\n        parseFloatBar(entry, item, vScale, i);\n    }else{\n        item[vScale.axis]=vScale.parse(entry, i);\n    }\n    return item;\n}\nfunction parseArrayOrPrimitive(meta, data, start, count){\n    const iScale=meta.iScale;\n    const vScale=meta.vScale;\n    const labels=iScale.getLabels();\n    const singleScale=iScale===vScale;\n    const parsed=[];\n    let i, ilen, item, entry;\n    for(i=start, ilen=start + count; i < ilen; ++i){\n        entry=data[i];\n        item={};\n        item[iScale.axis]=singleScale||iScale.parse(labels[i], i);\n        parsed.push(parseValue(entry, item, vScale, i));\n    }\n    return parsed;\n}\nfunction isFloatBar(custom){\n    return custom&&custom.barStart!==undefined&&custom.barEnd!==undefined;\n}\nfunction barSign(size, vScale, actualBase){\n    if(size!==0){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(size);\n    }\n    return (vScale.isHorizontal() ? 1:-1) * (vScale.min >=actualBase ? 1:-1);\n}\nfunction borderProps(properties){\n    let reverse, start, end, top, bottom;\n    if(properties.horizontal){\n        reverse=properties.base > properties.x;\n        start='left';\n        end='right';\n    }else{\n        reverse=properties.base < properties.y;\n        start='bottom';\n        end='top';\n    }\n    if(reverse){\n        top='end';\n        bottom='start';\n    }else{\n        top='start';\n        bottom='end';\n    }\n    return {\n        start,\n        end,\n        reverse,\n        top,\n        bottom\n    };\n}\nfunction setBorderSkipped(properties, options, stack, index){\n    let edge=options.borderSkipped;\n    const res={};\n    if(!edge){\n        properties.borderSkipped=res;\n        return;\n    }\n    if(edge===true){\n        properties.borderSkipped={\n            top: true,\n            right: true,\n            bottom: true,\n            left: true\n        };\n        return;\n    }\n    const { start , end , reverse , top , bottom  }=borderProps(properties);\n    if(edge==='middle'&&stack){\n        properties.enableBorderRadius=true;\n        if((stack._top||0)===index){\n            edge=top;\n        }else if((stack._bottom||0)===index){\n            edge=bottom;\n        }else{\n            res[parseEdge(bottom, start, end, reverse)]=true;\n            edge=top;\n        }\n    }\n    res[parseEdge(edge, start, end, reverse)]=true;\n    properties.borderSkipped=res;\n}\nfunction parseEdge(edge, a, b, reverse){\n    if(reverse){\n        edge=swap(edge, a, b);\n        edge=startEnd(edge, b, a);\n    }else{\n        edge=startEnd(edge, a, b);\n    }\n    return edge;\n}\nfunction swap(orig, v1, v2){\n    return orig===v1 ? v2:orig===v2 ? v1:orig;\n}\nfunction startEnd(v, start, end){\n    return v==='start' ? start:v==='end' ? end:v;\n}\nfunction setInflateAmount(properties, { inflateAmount  }, ratio){\n    properties.inflateAmount=inflateAmount==='auto' ? ratio===1 ? 0.33:0 : inflateAmount;\n}\nclass BarController extends DatasetController {\n    static id='bar';\n static defaults={\n        datasetElementType: false,\n        dataElementType: 'bar',\n        categoryPercentage: 0.8,\n        barPercentage: 0.9,\n        grouped: true,\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'base',\n                    'width',\n                    'height'\n                ]\n            }\n        }\n    };\n static overrides={\n        scales: {\n            _index_: {\n                type: 'category',\n                offset: true,\n                grid: {\n                    offset: true\n                }\n            },\n            _value_: {\n                type: 'linear',\n                beginAtZero: true\n            }\n        }\n    };\n parsePrimitiveData(meta, data, start, count){\n        return parseArrayOrPrimitive(meta, data, start, count);\n    }\n parseArrayData(meta, data, start, count){\n        return parseArrayOrPrimitive(meta, data, start, count);\n    }\n parseObjectData(meta, data, start, count){\n        const { iScale , vScale  }=meta;\n        const { xAxisKey='x' , yAxisKey='y'  }=this._parsing;\n        const iAxisKey=iScale.axis==='x' ? xAxisKey:yAxisKey;\n        const vAxisKey=vScale.axis==='x' ? xAxisKey:yAxisKey;\n        const parsed=[];\n        let i, ilen, item, obj;\n        for(i=start, ilen=start + count; i < ilen; ++i){\n            obj=data[i];\n            item={};\n            item[iScale.axis]=iScale.parse((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(obj, iAxisKey), i);\n            parsed.push(parseValue((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(obj, vAxisKey), item, vScale, i));\n        }\n        return parsed;\n    }\n updateRangeFromParsed(range, scale, parsed, stack){\n        super.updateRangeFromParsed(range, scale, parsed, stack);\n        const custom=parsed._custom;\n        if(custom&&scale===this._cachedMeta.vScale){\n            range.min=Math.min(range.min, custom.min);\n            range.max=Math.max(range.max, custom.max);\n        }\n    }\n getMaxOverflow(){\n        return 0;\n    }\n getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const { iScale , vScale  }=meta;\n        const parsed=this.getParsed(index);\n        const custom=parsed._custom;\n        const value=isFloatBar(custom) ? '[' + custom.start + ', ' + custom.end + ']':'' + vScale.getLabelForValue(parsed[vScale.axis]);\n        return {\n            label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n            value\n        };\n    }\n    initialize(){\n        this.enableOptionSharing=true;\n        super.initialize();\n        const meta=this._cachedMeta;\n        meta.stack=this.getDataset().stack;\n    }\n    update(mode){\n        const meta=this._cachedMeta;\n        this.updateElements(meta.data, 0, meta.data.length, mode);\n    }\n    updateElements(bars, start, count, mode){\n        const reset=mode==='reset';\n        const { index , _cachedMeta: { vScale  }}=this;\n        const base=vScale.getBasePixel();\n        const horizontal=vScale.isHorizontal();\n        const ruler=this._getRuler();\n        const { sharedOptions , includeOptions  }=this._getSharedOptions(start, mode);\n        for(let i=start; i < start + count; i++){\n            const parsed=this.getParsed(i);\n            const vpixels=reset||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(parsed[vScale.axis]) ? {\n                base,\n                head: base\n            }:this._calculateBarValuePixels(i);\n            const ipixels=this._calculateBarIndexPixels(i, ruler);\n            const stack=(parsed._stacks||{})[vScale.axis];\n            const properties={\n                horizontal,\n                base: vpixels.base,\n                enableBorderRadius: !stack||isFloatBar(parsed._custom)||index===stack._top||index===stack._bottom,\n                x: horizontal ? vpixels.head:ipixels.center,\n                y: horizontal ? ipixels.center:vpixels.head,\n                height: horizontal ? ipixels.size:Math.abs(vpixels.size),\n                width: horizontal ? Math.abs(vpixels.size):ipixels.size\n            };\n            if(includeOptions){\n                properties.options=sharedOptions||this.resolveDataElementOptions(i, bars[i].active ? 'active':mode);\n            }\n            const options=properties.options||bars[i].options;\n            setBorderSkipped(properties, options, stack, index);\n            setInflateAmount(properties, options, ruler.ratio);\n            this.updateElement(bars[i], i, properties, mode);\n        }\n    }\n _getStacks(last, dataIndex){\n        const { iScale  }=this._cachedMeta;\n        const metasets=iScale.getMatchingVisibleMetas(this._type).filter((meta)=>meta.controller.options.grouped);\n        const stacked=iScale.options.stacked;\n        const stacks=[];\n        const skipNull=(meta)=>{\n            const parsed=meta.controller.getParsed(dataIndex);\n            const val=parsed&&parsed[meta.vScale.axis];\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(val)||isNaN(val)){\n                return true;\n            }\n        };\n        for (const meta of metasets){\n            if(dataIndex!==undefined&&skipNull(meta)){\n                continue;\n            }\n            if(stacked===false||stacks.indexOf(meta.stack)===-1||stacked===undefined&&meta.stack===undefined){\n                stacks.push(meta.stack);\n            }\n            if(meta.index===last){\n                break;\n            }\n        }\n        if(!stacks.length){\n            stacks.push(undefined);\n        }\n        return stacks;\n    }\n _getStackCount(index){\n        return this._getStacks(undefined, index).length;\n    }\n _getStackIndex(datasetIndex, name, dataIndex){\n        const stacks=this._getStacks(datasetIndex, dataIndex);\n        const index=name!==undefined ? stacks.indexOf(name):-1;\n        return index===-1 ? stacks.length - 1:index;\n    }\n _getRuler(){\n        const opts=this.options;\n        const meta=this._cachedMeta;\n        const iScale=meta.iScale;\n        const pixels=[];\n        let i, ilen;\n        for(i=0, ilen=meta.data.length; i < ilen; ++i){\n            pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n        }\n        const barThickness=opts.barThickness;\n        const min=barThickness||computeMinSampleSize(meta);\n        return {\n            min,\n            pixels,\n            start: iScale._startPixel,\n            end: iScale._endPixel,\n            stackCount: this._getStackCount(),\n            scale: iScale,\n            grouped: opts.grouped,\n            ratio: barThickness ? 1:opts.categoryPercentage * opts.barPercentage\n        };\n    }\n _calculateBarValuePixels(index){\n        const { _cachedMeta: { vScale , _stacked , index: datasetIndex  } , options: { base: baseValue , minBarLength  }}=this;\n        const actualBase=baseValue||0;\n        const parsed=this.getParsed(index);\n        const custom=parsed._custom;\n        const floating=isFloatBar(custom);\n        let value=parsed[vScale.axis];\n        let start=0;\n        let length=_stacked ? this.applyStack(vScale, parsed, _stacked):value;\n        let head, size;\n        if(length!==value){\n            start=length - value;\n            length=value;\n        }\n        if(floating){\n            value=custom.barStart;\n            length=custom.barEnd - custom.barStart;\n            if(value!==0&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(value)!==(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(custom.barEnd)){\n                start=0;\n            }\n            start +=value;\n        }\n        const startValue = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(baseValue)&&!floating ? baseValue:start;\n        let base=vScale.getPixelForValue(startValue);\n        if(this.chart.getDataVisibility(index)){\n            head=vScale.getPixelForValue(start + length);\n        }else{\n            head=base;\n        }\n        size=head - base;\n        if(Math.abs(size) < minBarLength){\n            size=barSign(size, vScale, actualBase) * minBarLength;\n            if(value===actualBase){\n                base -=size / 2;\n            }\n            const startPixel=vScale.getPixelForDecimal(0);\n            const endPixel=vScale.getPixelForDecimal(1);\n            const min=Math.min(startPixel, endPixel);\n            const max=Math.max(startPixel, endPixel);\n            base=Math.max(Math.min(base, max), min);\n            head=base + size;\n            if(_stacked&&!floating){\n                parsed._stacks[vScale.axis]._visualValues[datasetIndex]=vScale.getValueForPixel(head) - vScale.getValueForPixel(base);\n            }\n        }\n        if(base===vScale.getPixelForValue(actualBase)){\n            const halfGrid=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(size) * vScale.getLineWidthForValue(actualBase) / 2;\n            base +=halfGrid;\n            size -=halfGrid;\n        }\n        return {\n            size,\n            base,\n            head,\n            center: head + size / 2\n        };\n    }\n _calculateBarIndexPixels(index, ruler){\n        const scale=ruler.scale;\n        const options=this.options;\n        const skipNull=options.skipNull;\n        const maxBarThickness=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(options.maxBarThickness, Infinity);\n        let center, size;\n        if(ruler.grouped){\n            const stackCount=skipNull ? this._getStackCount(index):ruler.stackCount;\n            const range=options.barThickness==='flex' ? computeFlexCategoryTraits(index, ruler, options, stackCount):computeFitCategoryTraits(index, ruler, options, stackCount);\n            const stackIndex=this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index:undefined);\n            center=range.start + range.chunk * stackIndex + range.chunk / 2;\n            size=Math.min(maxBarThickness, range.chunk * range.ratio);\n        }else{\n            center=scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n            size=Math.min(maxBarThickness, ruler.min * ruler.ratio);\n        }\n        return {\n            base: center - size / 2,\n            head: center + size / 2,\n            center,\n            size\n        };\n    }\n    draw(){\n        const meta=this._cachedMeta;\n        const vScale=meta.vScale;\n        const rects=meta.data;\n        const ilen=rects.length;\n        let i=0;\n        for(; i < ilen; ++i){\n            if(this.getParsed(i)[vScale.axis]!==null){\n                rects[i].draw(this._ctx);\n            }\n        }\n    }\n}\n\nclass BubbleController extends DatasetController {\n    static id='bubble';\n static defaults={\n        datasetElementType: false,\n        dataElementType: 'point',\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'borderWidth',\n                    'radius'\n                ]\n            }\n        }\n    };\n static overrides={\n        scales: {\n            x: {\n                type: 'linear'\n            },\n            y: {\n                type: 'linear'\n            }\n        }\n    };\n    initialize(){\n        this.enableOptionSharing=true;\n        super.initialize();\n    }\n parsePrimitiveData(meta, data, start, count){\n        const parsed=super.parsePrimitiveData(meta, data, start, count);\n        for(let i=0; i < parsed.length; i++){\n            parsed[i]._custom=this.resolveDataElementOptions(i + start).radius;\n        }\n        return parsed;\n    }\n parseArrayData(meta, data, start, count){\n        const parsed=super.parseArrayData(meta, data, start, count);\n        for(let i=0; i < parsed.length; i++){\n            const item=data[start + i];\n            parsed[i]._custom=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(item[2], this.resolveDataElementOptions(i + start).radius);\n        }\n        return parsed;\n    }\n parseObjectData(meta, data, start, count){\n        const parsed=super.parseObjectData(meta, data, start, count);\n        for(let i=0; i < parsed.length; i++){\n            const item=data[start + i];\n            parsed[i]._custom=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(item&&item.r&&+item.r, this.resolveDataElementOptions(i + start).radius);\n        }\n        return parsed;\n    }\n getMaxOverflow(){\n        const data=this._cachedMeta.data;\n        let max=0;\n        for(let i=data.length - 1; i >=0; --i){\n            max=Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n        }\n        return max > 0&&max;\n    }\n getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const labels=this.chart.data.labels||[];\n        const { xScale , yScale  }=meta;\n        const parsed=this.getParsed(index);\n        const x=xScale.getLabelForValue(parsed.x);\n        const y=yScale.getLabelForValue(parsed.y);\n        const r=parsed._custom;\n        return {\n            label: labels[index]||'',\n            value: '(' + x + ', ' + y + (r ? ', ' + r:'') + ')'\n        };\n    }\n    update(mode){\n        const points=this._cachedMeta.data;\n        this.updateElements(points, 0, points.length, mode);\n    }\n    updateElements(points, start, count, mode){\n        const reset=mode==='reset';\n        const { iScale , vScale  }=this._cachedMeta;\n        const { sharedOptions , includeOptions  }=this._getSharedOptions(start, mode);\n        const iAxis=iScale.axis;\n        const vAxis=vScale.axis;\n        for(let i=start; i < start + count; i++){\n            const point=points[i];\n            const parsed = !reset&&this.getParsed(i);\n            const properties={};\n            const iPixel=properties[iAxis]=reset ? iScale.getPixelForDecimal(0.5):iScale.getPixelForValue(parsed[iAxis]);\n            const vPixel=properties[vAxis]=reset ? vScale.getBasePixel():vScale.getPixelForValue(parsed[vAxis]);\n            properties.skip=isNaN(iPixel)||isNaN(vPixel);\n            if(includeOptions){\n                properties.options=sharedOptions||this.resolveDataElementOptions(i, point.active ? 'active':mode);\n                if(reset){\n                    properties.options.radius=0;\n                }\n            }\n            this.updateElement(point, i, properties, mode);\n        }\n    }\n resolveDataElementOptions(index, mode){\n        const parsed=this.getParsed(index);\n        let values=super.resolveDataElementOptions(index, mode);\n        if(values.$shared){\n            values=Object.assign({}, values, {\n                $shared: false\n            });\n        }\n        const radius=values.radius;\n        if(mode!=='active'){\n            values.radius=0;\n        }\n        values.radius +=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(parsed&&parsed._custom, radius);\n        return values;\n    }\n}\n\nfunction getRatioAndOffset(rotation, circumference, cutout){\n    let ratioX=1;\n    let ratioY=1;\n    let offsetX=0;\n    let offsetY=0;\n    if(circumference < _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T){\n        const startAngle=rotation;\n        const endAngle=startAngle + circumference;\n        const startX=Math.cos(startAngle);\n        const startY=Math.sin(startAngle);\n        const endX=Math.cos(endAngle);\n        const endY=Math.sin(endAngle);\n        const calcMax=(angle, a, b)=>(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.p)(angle, startAngle, endAngle, true) ? 1:Math.max(a, a * cutout, b, b * cutout);\n        const calcMin=(angle, a, b)=>(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.p)(angle, startAngle, endAngle, true) ? -1:Math.min(a, a * cutout, b, b * cutout);\n        const maxX=calcMax(0, startX, endX);\n        const maxY=calcMax(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H, startY, endY);\n        const minX=calcMin(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P, startX, endX);\n        const minY=calcMin(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P + _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H, startY, endY);\n        ratioX=(maxX - minX) / 2;\n        ratioY=(maxY - minY) / 2;\n        offsetX=-(maxX + minX) / 2;\n        offsetY=-(maxY + minY) / 2;\n    }\n    return {\n        ratioX,\n        ratioY,\n        offsetX,\n        offsetY\n    };\n}\nclass DoughnutController extends DatasetController {\n    static id='doughnut';\n static defaults={\n        datasetElementType: false,\n        dataElementType: 'arc',\n        animation: {\n            animateRotate: true,\n            animateScale: false\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'circumference',\n                    'endAngle',\n                    'innerRadius',\n                    'outerRadius',\n                    'startAngle',\n                    'x',\n                    'y',\n                    'offset',\n                    'borderWidth',\n                    'spacing'\n                ]\n            }\n        },\n        cutout: '50%',\n        rotation: 0,\n        circumference: 360,\n        radius: '100%',\n        spacing: 0,\n        indexAxis: 'r'\n    };\n    static descriptors={\n        _scriptable: (name)=>name!=='spacing',\n        _indexable: (name)=>name!=='spacing'&&!name.startsWith('borderDash')&&!name.startsWith('hoverBorderDash')\n    };\n static overrides={\n        aspectRatio: 1,\n        plugins: {\n            legend: {\n                labels: {\n                    generateLabels (chart){\n                        const data=chart.data;\n                        if(data.labels.length&&data.datasets.length){\n                            const { labels: { pointStyle , color  }}=chart.legend.options;\n                            return data.labels.map((label, i)=>{\n                                const meta=chart.getDatasetMeta(0);\n                                const style=meta.controller.getStyle(i);\n                                return {\n                                    text: label,\n                                    fillStyle: style.backgroundColor,\n                                    strokeStyle: style.borderColor,\n                                    fontColor: color,\n                                    lineWidth: style.borderWidth,\n                                    pointStyle: pointStyle,\n                                    hidden: !chart.getDataVisibility(i),\n                                    index: i\n                                };\n                            });\n                        }\n                        return [];\n                    }\n                },\n                onClick (e, legendItem, legend){\n                    legend.chart.toggleDataVisibility(legendItem.index);\n                    legend.chart.update();\n                }\n            }\n        }\n    };\n    constructor(chart, datasetIndex){\n        super(chart, datasetIndex);\n        this.enableOptionSharing=true;\n        this.innerRadius=undefined;\n        this.outerRadius=undefined;\n        this.offsetX=undefined;\n        this.offsetY=undefined;\n    }\n    linkScales(){}\n parse(start, count){\n        const data=this.getDataset().data;\n        const meta=this._cachedMeta;\n        if(this._parsing===false){\n            meta._parsed=data;\n        }else{\n            let getter=(i)=>+data[i];\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(data[start])){\n                const { key='value'  }=this._parsing;\n                getter=(i)=>+(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(data[i], key);\n            }\n            let i, ilen;\n            for(i=start, ilen=start + count; i < ilen; ++i){\n                meta._parsed[i]=getter(i);\n            }\n        }\n    }\n _getRotation(){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.options.rotation - 90);\n    }\n _getCircumference(){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.options.circumference);\n    }\n _getRotationExtents(){\n        let min=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T;\n        let max=-_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T;\n        for(let i=0; i < this.chart.data.datasets.length; ++i){\n            if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){\n                const controller=this.chart.getDatasetMeta(i).controller;\n                const rotation=controller._getRotation();\n                const circumference=controller._getCircumference();\n                min=Math.min(min, rotation);\n                max=Math.max(max, rotation + circumference);\n            }\n        }\n        return {\n            rotation: min,\n            circumference: max - min\n        };\n    }\n update(mode){\n        const chart=this.chart;\n        const { chartArea  }=chart;\n        const meta=this._cachedMeta;\n        const arcs=meta.data;\n        const spacing=this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n        const maxSize=Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n        const cutout=Math.min((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.m)(this.options.cutout, maxSize), 1);\n        const chartWeight=this._getRingWeight(this.index);\n        const { circumference , rotation  }=this._getRotationExtents();\n        const { ratioX , ratioY , offsetX , offsetY  }=getRatioAndOffset(rotation, circumference, cutout);\n        const maxWidth=(chartArea.width - spacing) / ratioX;\n        const maxHeight=(chartArea.height - spacing) / ratioY;\n        const maxRadius=Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n        const outerRadius=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.n)(this.options.radius, maxRadius);\n        const innerRadius=Math.max(outerRadius * cutout, 0);\n        const radiusLength=(outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n        this.offsetX=offsetX * outerRadius;\n        this.offsetY=offsetY * outerRadius;\n        meta.total=this.calculateTotal();\n        this.outerRadius=outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n        this.innerRadius=Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n        this.updateElements(arcs, 0, arcs.length, mode);\n    }\n _circumference(i, reset){\n        const opts=this.options;\n        const meta=this._cachedMeta;\n        const circumference=this._getCircumference();\n        if(reset&&opts.animation.animateRotate||!this.chart.getDataVisibility(i)||meta._parsed[i]===null||meta.data[i].hidden){\n            return 0;\n        }\n        return this.calculateCircumference(meta._parsed[i] * circumference / _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T);\n    }\n    updateElements(arcs, start, count, mode){\n        const reset=mode==='reset';\n        const chart=this.chart;\n        const chartArea=chart.chartArea;\n        const opts=chart.options;\n        const animationOpts=opts.animation;\n        const centerX=(chartArea.left + chartArea.right) / 2;\n        const centerY=(chartArea.top + chartArea.bottom) / 2;\n        const animateScale=reset&&animationOpts.animateScale;\n        const innerRadius=animateScale ? 0:this.innerRadius;\n        const outerRadius=animateScale ? 0:this.outerRadius;\n        const { sharedOptions , includeOptions  }=this._getSharedOptions(start, mode);\n        let startAngle=this._getRotation();\n        let i;\n        for(i=0; i < start; ++i){\n            startAngle +=this._circumference(i, reset);\n        }\n        for(i=start; i < start + count; ++i){\n            const circumference=this._circumference(i, reset);\n            const arc=arcs[i];\n            const properties={\n                x: centerX + this.offsetX,\n                y: centerY + this.offsetY,\n                startAngle,\n                endAngle: startAngle + circumference,\n                circumference,\n                outerRadius,\n                innerRadius\n            };\n            if(includeOptions){\n                properties.options=sharedOptions||this.resolveDataElementOptions(i, arc.active ? 'active':mode);\n            }\n            startAngle +=circumference;\n            this.updateElement(arc, i, properties, mode);\n        }\n    }\n    calculateTotal(){\n        const meta=this._cachedMeta;\n        const metaData=meta.data;\n        let total=0;\n        let i;\n        for(i=0; i < metaData.length; i++){\n            const value=meta._parsed[i];\n            if(value!==null&&!isNaN(value)&&this.chart.getDataVisibility(i)&&!metaData[i].hidden){\n                total +=Math.abs(value);\n            }\n        }\n        return total;\n    }\n    calculateCircumference(value){\n        const total=this._cachedMeta.total;\n        if(total > 0&&!isNaN(value)){\n            return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T * (Math.abs(value) / total);\n        }\n        return 0;\n    }\n    getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const chart=this.chart;\n        const labels=chart.data.labels||[];\n        const value=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.o)(meta._parsed[index], chart.options.locale);\n        return {\n            label: labels[index]||'',\n            value\n        };\n    }\n    getMaxBorderWidth(arcs){\n        let max=0;\n        const chart=this.chart;\n        let i, ilen, meta, controller, options;\n        if(!arcs){\n            for(i=0, ilen=chart.data.datasets.length; i < ilen; ++i){\n                if(chart.isDatasetVisible(i)){\n                    meta=chart.getDatasetMeta(i);\n                    arcs=meta.data;\n                    controller=meta.controller;\n                    break;\n                }\n            }\n        }\n        if(!arcs){\n            return 0;\n        }\n        for(i=0, ilen=arcs.length; i < ilen; ++i){\n            options=controller.resolveDataElementOptions(i);\n            if(options.borderAlign!=='inner'){\n                max=Math.max(max, options.borderWidth||0, options.hoverBorderWidth||0);\n            }\n        }\n        return max;\n    }\n    getMaxOffset(arcs){\n        let max=0;\n        for(let i=0, ilen=arcs.length; i < ilen; ++i){\n            const options=this.resolveDataElementOptions(i);\n            max=Math.max(max, options.offset||0, options.hoverOffset||0);\n        }\n        return max;\n    }\n _getRingWeightOffset(datasetIndex){\n        let ringWeightOffset=0;\n        for(let i=0; i < datasetIndex; ++i){\n            if(this.chart.isDatasetVisible(i)){\n                ringWeightOffset +=this._getRingWeight(i);\n            }\n        }\n        return ringWeightOffset;\n    }\n _getRingWeight(datasetIndex){\n        return Math.max((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n    }\n _getVisibleDatasetWeightTotal(){\n        return this._getRingWeightOffset(this.chart.data.datasets.length)||1;\n    }\n}\n\nclass LineController extends DatasetController {\n    static id='line';\n static defaults={\n        datasetElementType: 'line',\n        dataElementType: 'point',\n        showLine: true,\n        spanGaps: false\n    };\n static overrides={\n        scales: {\n            _index_: {\n                type: 'category'\n            },\n            _value_: {\n                type: 'linear'\n            }\n        }\n    };\n    initialize(){\n        this.enableOptionSharing=true;\n        this.supportsDecimation=true;\n        super.initialize();\n    }\n    update(mode){\n        const meta=this._cachedMeta;\n        const { dataset: line , data: points=[] , _dataset  }=meta;\n        const animationsDisabled=this.chart._animationsDisabled;\n        let { start , count  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.q)(meta, points, animationsDisabled);\n        this._drawStart=start;\n        this._drawCount=count;\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.w)(meta)){\n            start=0;\n            count=points.length;\n        }\n        line._chart=this.chart;\n        line._datasetIndex=this.index;\n        line._decimated = !!_dataset._decimated;\n        line.points=points;\n        const options=this.resolveDatasetElementOptions(mode);\n        if(!this.options.showLine){\n            options.borderWidth=0;\n        }\n        options.segment=this.options.segment;\n        this.updateElement(line, undefined, {\n            animated: !animationsDisabled,\n            options\n        }, mode);\n        this.updateElements(points, start, count, mode);\n    }\n    updateElements(points, start, count, mode){\n        const reset=mode==='reset';\n        const { iScale , vScale , _stacked , _dataset  }=this._cachedMeta;\n        const { sharedOptions , includeOptions  }=this._getSharedOptions(start, mode);\n        const iAxis=iScale.axis;\n        const vAxis=vScale.axis;\n        const { spanGaps , segment  }=this.options;\n        const maxGapLength=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(spanGaps) ? spanGaps:Number.POSITIVE_INFINITY;\n        const directUpdate=this.chart._animationsDisabled||reset||mode==='none';\n        const end=start + count;\n        const pointsCount=points.length;\n        let prevParsed=start > 0&&this.getParsed(start - 1);\n        for(let i=0; i < pointsCount; ++i){\n            const point=points[i];\n            const properties=directUpdate ? point:{};\n            if(i < start||i >=end){\n                properties.skip=true;\n                continue;\n            }\n            const parsed=this.getParsed(i);\n            const nullData=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(parsed[vAxis]);\n            const iPixel=properties[iAxis]=iScale.getPixelForValue(parsed[iAxis], i);\n            const vPixel=properties[vAxis]=reset||nullData ? vScale.getBasePixel():vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked):parsed[vAxis], i);\n            properties.skip=isNaN(iPixel)||isNaN(vPixel)||nullData;\n            properties.stop=i > 0&&Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n            if(segment){\n                properties.parsed=parsed;\n                properties.raw=_dataset.data[i];\n            }\n            if(includeOptions){\n                properties.options=sharedOptions||this.resolveDataElementOptions(i, point.active ? 'active':mode);\n            }\n            if(!directUpdate){\n                this.updateElement(point, i, properties, mode);\n            }\n            prevParsed=parsed;\n        }\n    }\n getMaxOverflow(){\n        const meta=this._cachedMeta;\n        const dataset=meta.dataset;\n        const border=dataset.options&&dataset.options.borderWidth||0;\n        const data=meta.data||[];\n        if(!data.length){\n            return border;\n        }\n        const firstPoint=data[0].size(this.resolveDataElementOptions(0));\n        const lastPoint=data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n        return Math.max(border, firstPoint, lastPoint) / 2;\n    }\n    draw(){\n        const meta=this._cachedMeta;\n        meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n        super.draw();\n    }\n}\n\nclass PolarAreaController extends DatasetController {\n    static id='polarArea';\n static defaults={\n        dataElementType: 'arc',\n        animation: {\n            animateRotate: true,\n            animateScale: true\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'startAngle',\n                    'endAngle',\n                    'innerRadius',\n                    'outerRadius'\n                ]\n            }\n        },\n        indexAxis: 'r',\n        startAngle: 0\n    };\n static overrides={\n        aspectRatio: 1,\n        plugins: {\n            legend: {\n                labels: {\n                    generateLabels (chart){\n                        const data=chart.data;\n                        if(data.labels.length&&data.datasets.length){\n                            const { labels: { pointStyle , color  }}=chart.legend.options;\n                            return data.labels.map((label, i)=>{\n                                const meta=chart.getDatasetMeta(0);\n                                const style=meta.controller.getStyle(i);\n                                return {\n                                    text: label,\n                                    fillStyle: style.backgroundColor,\n                                    strokeStyle: style.borderColor,\n                                    fontColor: color,\n                                    lineWidth: style.borderWidth,\n                                    pointStyle: pointStyle,\n                                    hidden: !chart.getDataVisibility(i),\n                                    index: i\n                                };\n                            });\n                        }\n                        return [];\n                    }\n                },\n                onClick (e, legendItem, legend){\n                    legend.chart.toggleDataVisibility(legendItem.index);\n                    legend.chart.update();\n                }\n            }\n        },\n        scales: {\n            r: {\n                type: 'radialLinear',\n                angleLines: {\n                    display: false\n                },\n                beginAtZero: true,\n                grid: {\n                    circular: true\n                },\n                pointLabels: {\n                    display: false\n                },\n                startAngle: 0\n            }\n        }\n    };\n    constructor(chart, datasetIndex){\n        super(chart, datasetIndex);\n        this.innerRadius=undefined;\n        this.outerRadius=undefined;\n    }\n    getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const chart=this.chart;\n        const labels=chart.data.labels||[];\n        const value=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.o)(meta._parsed[index].r, chart.options.locale);\n        return {\n            label: labels[index]||'',\n            value\n        };\n    }\n    parseObjectData(meta, data, start, count){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.y.bind(this)(meta, data, start, count);\n    }\n    update(mode){\n        const arcs=this._cachedMeta.data;\n        this._updateRadius();\n        this.updateElements(arcs, 0, arcs.length, mode);\n    }\n getMinMax(){\n        const meta=this._cachedMeta;\n        const range={\n            min: Number.POSITIVE_INFINITY,\n            max: Number.NEGATIVE_INFINITY\n        };\n        meta.data.forEach((element, index)=>{\n            const parsed=this.getParsed(index).r;\n            if(!isNaN(parsed)&&this.chart.getDataVisibility(index)){\n                if(parsed < range.min){\n                    range.min=parsed;\n                }\n                if(parsed > range.max){\n                    range.max=parsed;\n                }\n            }\n        });\n        return range;\n    }\n _updateRadius(){\n        const chart=this.chart;\n        const chartArea=chart.chartArea;\n        const opts=chart.options;\n        const minSize=Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n        const outerRadius=Math.max(minSize / 2, 0);\n        const innerRadius=Math.max(opts.cutoutPercentage ? outerRadius / 100 * opts.cutoutPercentage:1, 0);\n        const radiusLength=(outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n        this.outerRadius=outerRadius - radiusLength * this.index;\n        this.innerRadius=this.outerRadius - radiusLength;\n    }\n    updateElements(arcs, start, count, mode){\n        const reset=mode==='reset';\n        const chart=this.chart;\n        const opts=chart.options;\n        const animationOpts=opts.animation;\n        const scale=this._cachedMeta.rScale;\n        const centerX=scale.xCenter;\n        const centerY=scale.yCenter;\n        const datasetStartAngle=scale.getIndexAngle(0) - 0.5 * _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P;\n        let angle=datasetStartAngle;\n        let i;\n        const defaultAngle=360 / this.countVisibleElements();\n        for(i=0; i < start; ++i){\n            angle +=this._computeAngle(i, mode, defaultAngle);\n        }\n        for(i=start; i < start + count; i++){\n            const arc=arcs[i];\n            let startAngle=angle;\n            let endAngle=angle + this._computeAngle(i, mode, defaultAngle);\n            let outerRadius=chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r):0;\n            angle=endAngle;\n            if(reset){\n                if(animationOpts.animateScale){\n                    outerRadius=0;\n                }\n                if(animationOpts.animateRotate){\n                    startAngle=endAngle=datasetStartAngle;\n                }\n            }\n            const properties={\n                x: centerX,\n                y: centerY,\n                innerRadius: 0,\n                outerRadius,\n                startAngle,\n                endAngle,\n                options: this.resolveDataElementOptions(i, arc.active ? 'active':mode)\n            };\n            this.updateElement(arc, i, properties, mode);\n        }\n    }\n    countVisibleElements(){\n        const meta=this._cachedMeta;\n        let count=0;\n        meta.data.forEach((element, index)=>{\n            if(!isNaN(this.getParsed(index).r)&&this.chart.getDataVisibility(index)){\n                count++;\n            }\n        });\n        return count;\n    }\n _computeAngle(index, mode, defaultAngle){\n        return this.chart.getDataVisibility(index) ? (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.resolveDataElementOptions(index, mode).angle||defaultAngle):0;\n    }\n}\n\nclass PieController extends DoughnutController {\n    static id='pie';\n static defaults={\n        cutout: 0,\n        rotation: 0,\n        circumference: 360,\n        radius: '100%'\n    };\n}\n\nclass RadarController extends DatasetController {\n    static id='radar';\n static defaults={\n        datasetElementType: 'line',\n        dataElementType: 'point',\n        indexAxis: 'r',\n        showLine: true,\n        elements: {\n            line: {\n                fill: 'start'\n            }\n        }\n    };\n static overrides={\n        aspectRatio: 1,\n        scales: {\n            r: {\n                type: 'radialLinear'\n            }\n        }\n    };\n getLabelAndValue(index){\n        const vScale=this._cachedMeta.vScale;\n        const parsed=this.getParsed(index);\n        return {\n            label: vScale.getLabels()[index],\n            value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n        };\n    }\n    parseObjectData(meta, data, start, count){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.y.bind(this)(meta, data, start, count);\n    }\n    update(mode){\n        const meta=this._cachedMeta;\n        const line=meta.dataset;\n        const points=meta.data||[];\n        const labels=meta.iScale.getLabels();\n        line.points=points;\n        if(mode!=='resize'){\n            const options=this.resolveDatasetElementOptions(mode);\n            if(!this.options.showLine){\n                options.borderWidth=0;\n            }\n            const properties={\n                _loop: true,\n                _fullLoop: labels.length===points.length,\n                options\n            };\n            this.updateElement(line, undefined, properties, mode);\n        }\n        this.updateElements(points, 0, points.length, mode);\n    }\n    updateElements(points, start, count, mode){\n        const scale=this._cachedMeta.rScale;\n        const reset=mode==='reset';\n        for(let i=start; i < start + count; i++){\n            const point=points[i];\n            const options=this.resolveDataElementOptions(i, point.active ? 'active':mode);\n            const pointPosition=scale.getPointPositionForValue(i, this.getParsed(i).r);\n            const x=reset ? scale.xCenter:pointPosition.x;\n            const y=reset ? scale.yCenter:pointPosition.y;\n            const properties={\n                x,\n                y,\n                angle: pointPosition.angle,\n                skip: isNaN(x)||isNaN(y),\n                options\n            };\n            this.updateElement(point, i, properties, mode);\n        }\n    }\n}\n\nclass ScatterController extends DatasetController {\n    static id='scatter';\n static defaults={\n        datasetElementType: false,\n        dataElementType: 'point',\n        showLine: false,\n        fill: false\n    };\n static overrides={\n        interaction: {\n            mode: 'point'\n        },\n        scales: {\n            x: {\n                type: 'linear'\n            },\n            y: {\n                type: 'linear'\n            }\n        }\n    };\n getLabelAndValue(index){\n        const meta=this._cachedMeta;\n        const labels=this.chart.data.labels||[];\n        const { xScale , yScale  }=meta;\n        const parsed=this.getParsed(index);\n        const x=xScale.getLabelForValue(parsed.x);\n        const y=yScale.getLabelForValue(parsed.y);\n        return {\n            label: labels[index]||'',\n            value: '(' + x + ', ' + y + ')'\n        };\n    }\n    update(mode){\n        const meta=this._cachedMeta;\n        const { data: points=[]  }=meta;\n        const animationsDisabled=this.chart._animationsDisabled;\n        let { start , count  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.q)(meta, points, animationsDisabled);\n        this._drawStart=start;\n        this._drawCount=count;\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.w)(meta)){\n            start=0;\n            count=points.length;\n        }\n        if(this.options.showLine){\n            if(!this.datasetElementType){\n                this.addElements();\n            }\n            const { dataset: line , _dataset  }=meta;\n            line._chart=this.chart;\n            line._datasetIndex=this.index;\n            line._decimated = !!_dataset._decimated;\n            line.points=points;\n            const options=this.resolveDatasetElementOptions(mode);\n            options.segment=this.options.segment;\n            this.updateElement(line, undefined, {\n                animated: !animationsDisabled,\n                options\n            }, mode);\n        }else if(this.datasetElementType){\n            delete meta.dataset;\n            this.datasetElementType=false;\n        }\n        this.updateElements(points, start, count, mode);\n    }\n    addElements(){\n        const { showLine  }=this.options;\n        if(!this.datasetElementType&&showLine){\n            this.datasetElementType=this.chart.registry.getElement('line');\n        }\n        super.addElements();\n    }\n    updateElements(points, start, count, mode){\n        const reset=mode==='reset';\n        const { iScale , vScale , _stacked , _dataset  }=this._cachedMeta;\n        const firstOpts=this.resolveDataElementOptions(start, mode);\n        const sharedOptions=this.getSharedOptions(firstOpts);\n        const includeOptions=this.includeOptions(mode, sharedOptions);\n        const iAxis=iScale.axis;\n        const vAxis=vScale.axis;\n        const { spanGaps , segment  }=this.options;\n        const maxGapLength=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(spanGaps) ? spanGaps:Number.POSITIVE_INFINITY;\n        const directUpdate=this.chart._animationsDisabled||reset||mode==='none';\n        let prevParsed=start > 0&&this.getParsed(start - 1);\n        for(let i=start; i < start + count; ++i){\n            const point=points[i];\n            const parsed=this.getParsed(i);\n            const properties=directUpdate ? point:{};\n            const nullData=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(parsed[vAxis]);\n            const iPixel=properties[iAxis]=iScale.getPixelForValue(parsed[iAxis], i);\n            const vPixel=properties[vAxis]=reset||nullData ? vScale.getBasePixel():vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked):parsed[vAxis], i);\n            properties.skip=isNaN(iPixel)||isNaN(vPixel)||nullData;\n            properties.stop=i > 0&&Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n            if(segment){\n                properties.parsed=parsed;\n                properties.raw=_dataset.data[i];\n            }\n            if(includeOptions){\n                properties.options=sharedOptions||this.resolveDataElementOptions(i, point.active ? 'active':mode);\n            }\n            if(!directUpdate){\n                this.updateElement(point, i, properties, mode);\n            }\n            prevParsed=parsed;\n        }\n        this.updateSharedOptions(sharedOptions, mode, firstOpts);\n    }\n getMaxOverflow(){\n        const meta=this._cachedMeta;\n        const data=meta.data||[];\n        if(!this.options.showLine){\n            let max=0;\n            for(let i=data.length - 1; i >=0; --i){\n                max=Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n            }\n            return max > 0&&max;\n        }\n        const dataset=meta.dataset;\n        const border=dataset.options&&dataset.options.borderWidth||0;\n        if(!data.length){\n            return border;\n        }\n        const firstPoint=data[0].size(this.resolveDataElementOptions(0));\n        const lastPoint=data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n        return Math.max(border, firstPoint, lastPoint) / 2;\n    }\n}\n\nvar controllers=/*#__PURE__*/Object.freeze({\n__proto__: null,\nBarController: BarController,\nBubbleController: BubbleController,\nDoughnutController: DoughnutController,\nLineController: LineController,\nPieController: PieController,\nPolarAreaController: PolarAreaController,\nRadarController: RadarController,\nScatterController: ScatterController\n});\n\n/**\n * @namespace Chart._adapters\n * @since 2.8.0\n * @private\n */ function abstract(){\n    throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */ class DateAdapterBase {\n    /**\n   * Override default date adapter methods.\n   * Accepts type parameter to define options type.\n   * @example\n   * Chart._adapters._date.override<{myAdapterOption: string}>({\n   *   init(){\n   *     console.log(this.options.myAdapterOption);\n   *   }\n   * })\n   */ static override(members){\n        Object.assign(DateAdapterBase.prototype, members);\n    }\n    options;\n    constructor(options){\n        this.options=options||{};\n    }\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    init(){}\n    formats(){\n        return abstract();\n    }\n    parse(){\n        return abstract();\n    }\n    format(){\n        return abstract();\n    }\n    add(){\n        return abstract();\n    }\n    diff(){\n        return abstract();\n    }\n    startOf(){\n        return abstract();\n    }\n    endOf(){\n        return abstract();\n    }\n}\nvar adapters={\n    _date: DateAdapterBase\n};\n\nfunction binarySearch(metaset, axis, value, intersect){\n    const { controller , data , _sorted  }=metaset;\n    const iScale=controller._cachedMeta.iScale;\n    if(iScale&&axis===iScale.axis&&axis!=='r'&&_sorted&&data.length){\n        const lookupMethod=iScale._reversePixels ? _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.A:_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.B;\n        if(!intersect){\n            return lookupMethod(data, axis, value);\n        }else if(controller._sharedOptions){\n            const el=data[0];\n            const range=typeof el.getRange==='function'&&el.getRange(axis);\n            if(range){\n                const start=lookupMethod(data, axis, value - range);\n                const end=lookupMethod(data, axis, value + range);\n                return {\n                    lo: start.lo,\n                    hi: end.hi\n                };\n            }\n        }\n    }\n    return {\n        lo: 0,\n        hi: data.length - 1\n    };\n}\n function evaluateInteractionItems(chart, axis, position, handler, intersect){\n    const metasets=chart.getSortedVisibleDatasetMetas();\n    const value=position[axis];\n    for(let i=0, ilen=metasets.length; i < ilen; ++i){\n        const { index , data  }=metasets[i];\n        const { lo , hi  }=binarySearch(metasets[i], axis, value, intersect);\n        for(let j=lo; j <=hi; ++j){\n            const element=data[j];\n            if(!element.skip){\n                handler(element, index, j);\n            }\n        }\n    }\n}\n function getDistanceMetricForAxis(axis){\n    const useX=axis.indexOf('x')!==-1;\n    const useY=axis.indexOf('y')!==-1;\n    return function(pt1, pt2){\n        const deltaX=useX ? Math.abs(pt1.x - pt2.x):0;\n        const deltaY=useY ? Math.abs(pt1.y - pt2.y):0;\n        return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n    };\n}\n function getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible){\n    const items=[];\n    if(!includeInvisible&&!chart.isPointInArea(position)){\n        return items;\n    }\n    const evaluationFunc=function(element, datasetIndex, index){\n        if(!includeInvisible&&!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)(element, chart.chartArea, 0)){\n            return;\n        }\n        if(element.inRange(position.x, position.y, useFinalPosition)){\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    };\n    evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n    return items;\n}\n function getNearestRadialItems(chart, position, axis, useFinalPosition){\n    let items=[];\n    function evaluationFunc(element, datasetIndex, index){\n        const { startAngle , endAngle  }=element.getProps([\n            'startAngle',\n            'endAngle'\n        ], useFinalPosition);\n        const { angle  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.D)(element, {\n            x: position.x,\n            y: position.y\n        });\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.p)(angle, startAngle, endAngle)){\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    }\n    evaluateInteractionItems(chart, axis, position, evaluationFunc);\n    return items;\n}\n function getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible){\n    let items=[];\n    const distanceMetric=getDistanceMetricForAxis(axis);\n    let minDistance=Number.POSITIVE_INFINITY;\n    function evaluationFunc(element, datasetIndex, index){\n        const inRange=element.inRange(position.x, position.y, useFinalPosition);\n        if(intersect&&!inRange){\n            return;\n        }\n        const center=element.getCenterPoint(useFinalPosition);\n        const pointInArea = !!includeInvisible||chart.isPointInArea(center);\n        if(!pointInArea&&!inRange){\n            return;\n        }\n        const distance=distanceMetric(position, center);\n        if(distance < minDistance){\n            items=[\n                {\n                    element,\n                    datasetIndex,\n                    index\n                }\n            ];\n            minDistance=distance;\n        }else if(distance===minDistance){\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n        }\n    }\n    evaluateInteractionItems(chart, axis, position, evaluationFunc);\n    return items;\n}\n function getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible){\n    if(!includeInvisible&&!chart.isPointInArea(position)){\n        return [];\n    }\n    return axis==='r'&&!intersect ? getNearestRadialItems(chart, position, axis, useFinalPosition):getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n function getAxisItems(chart, position, axis, intersect, useFinalPosition){\n    const items=[];\n    const rangeMethod=axis==='x' ? 'inXRange':'inYRange';\n    let intersectsItem=false;\n    evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index)=>{\n        if(element[rangeMethod](position[axis], useFinalPosition)){\n            items.push({\n                element,\n                datasetIndex,\n                index\n            });\n            intersectsItem=intersectsItem||element.inRange(position.x, position.y, useFinalPosition);\n        }\n    });\n    if(intersect&&!intersectsItem){\n        return [];\n    }\n    return items;\n}\n var Interaction={\n    evaluateInteractionItems,\n    modes: {\n index (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            const axis=options.axis||'x';\n            const includeInvisible=options.includeInvisible||false;\n            const items=options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible):getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n            const elements=[];\n            if(!items.length){\n                return [];\n            }\n            chart.getSortedVisibleDatasetMetas().forEach((meta)=>{\n                const index=items[0].index;\n                const element=meta.data[index];\n                if(element&&!element.skip){\n                    elements.push({\n                        element,\n                        datasetIndex: meta.index,\n                        index\n                    });\n                }\n            });\n            return elements;\n        },\n dataset (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            const axis=options.axis||'xy';\n            const includeInvisible=options.includeInvisible||false;\n            let items=options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible):getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n            if(items.length > 0){\n                const datasetIndex=items[0].datasetIndex;\n                const data=chart.getDatasetMeta(datasetIndex).data;\n                items=[];\n                for(let i=0; i < data.length; ++i){\n                    items.push({\n                        element: data[i],\n                        datasetIndex,\n                        index: i\n                    });\n                }\n            }\n            return items;\n        },\n point (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            const axis=options.axis||'xy';\n            const includeInvisible=options.includeInvisible||false;\n            return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n        },\n nearest (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            const axis=options.axis||'xy';\n            const includeInvisible=options.includeInvisible||false;\n            return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n        },\n x (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n        },\n y (chart, e, options, useFinalPosition){\n            const position=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(e, chart);\n            return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n        }\n    }\n};\n\nconst STATIC_POSITIONS=[\n    'left',\n    'top',\n    'right',\n    'bottom'\n];\nfunction filterByPosition(array, position){\n    return array.filter((v)=>v.pos===position);\n}\nfunction filterDynamicPositionByAxis(array, axis){\n    return array.filter((v)=>STATIC_POSITIONS.indexOf(v.pos)===-1&&v.box.axis===axis);\n}\nfunction sortByWeight(array, reverse){\n    return array.sort((a, b)=>{\n        const v0=reverse ? b:a;\n        const v1=reverse ? a:b;\n        return v0.weight===v1.weight ? v0.index - v1.index:v0.weight - v1.weight;\n    });\n}\nfunction wrapBoxes(boxes){\n    const layoutBoxes=[];\n    let i, ilen, box, pos, stack, stackWeight;\n    for(i=0, ilen=(boxes||[]).length; i < ilen; ++i){\n        box=boxes[i];\n        ({ position: pos , options: { stack , stackWeight=1  }}=box);\n        layoutBoxes.push({\n            index: i,\n            box,\n            pos,\n            horizontal: box.isHorizontal(),\n            weight: box.weight,\n            stack: stack&&pos + stack,\n            stackWeight\n        });\n    }\n    return layoutBoxes;\n}\nfunction buildStacks(layouts){\n    const stacks={};\n    for (const wrap of layouts){\n        const { stack , pos , stackWeight  }=wrap;\n        if(!stack||!STATIC_POSITIONS.includes(pos)){\n            continue;\n        }\n        const _stack=stacks[stack]||(stacks[stack]={\n            count: 0,\n            placed: 0,\n            weight: 0,\n            size: 0\n        });\n        _stack.count++;\n        _stack.weight +=stackWeight;\n    }\n    return stacks;\n}\n function setLayoutDims(layouts, params){\n    const stacks=buildStacks(layouts);\n    const { vBoxMaxWidth , hBoxMaxHeight  }=params;\n    let i, ilen, layout;\n    for(i=0, ilen=layouts.length; i < ilen; ++i){\n        layout=layouts[i];\n        const { fullSize  }=layout.box;\n        const stack=stacks[layout.stack];\n        const factor=stack&&layout.stackWeight / stack.weight;\n        if(layout.horizontal){\n            layout.width=factor ? factor * vBoxMaxWidth:fullSize&&params.availableWidth;\n            layout.height=hBoxMaxHeight;\n        }else{\n            layout.width=vBoxMaxWidth;\n            layout.height=factor ? factor * hBoxMaxHeight:fullSize&&params.availableHeight;\n        }\n    }\n    return stacks;\n}\nfunction buildLayoutBoxes(boxes){\n    const layoutBoxes=wrapBoxes(boxes);\n    const fullSize=sortByWeight(layoutBoxes.filter((wrap)=>wrap.box.fullSize), true);\n    const left=sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n    const right=sortByWeight(filterByPosition(layoutBoxes, 'right'));\n    const top=sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n    const bottom=sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n    const centerHorizontal=filterDynamicPositionByAxis(layoutBoxes, 'x');\n    const centerVertical=filterDynamicPositionByAxis(layoutBoxes, 'y');\n    return {\n        fullSize,\n        leftAndTop: left.concat(top),\n        rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n        chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n        vertical: left.concat(right).concat(centerVertical),\n        horizontal: top.concat(bottom).concat(centerHorizontal)\n    };\n}\nfunction getCombinedMax(maxPadding, chartArea, a, b){\n    return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\nfunction updateMaxPadding(maxPadding, boxPadding){\n    maxPadding.top=Math.max(maxPadding.top, boxPadding.top);\n    maxPadding.left=Math.max(maxPadding.left, boxPadding.left);\n    maxPadding.bottom=Math.max(maxPadding.bottom, boxPadding.bottom);\n    maxPadding.right=Math.max(maxPadding.right, boxPadding.right);\n}\nfunction updateDims(chartArea, params, layout, stacks){\n    const { pos , box  }=layout;\n    const maxPadding=chartArea.maxPadding;\n    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(pos)){\n        if(layout.size){\n            chartArea[pos] -=layout.size;\n        }\n        const stack=stacks[layout.stack]||{\n            size: 0,\n            count: 1\n        };\n        stack.size=Math.max(stack.size, layout.horizontal ? box.height:box.width);\n        layout.size=stack.size / stack.count;\n        chartArea[pos] +=layout.size;\n    }\n    if(box.getPadding){\n        updateMaxPadding(maxPadding, box.getPadding());\n    }\n    const newWidth=Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n    const newHeight=Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n    const widthChanged=newWidth!==chartArea.w;\n    const heightChanged=newHeight!==chartArea.h;\n    chartArea.w=newWidth;\n    chartArea.h=newHeight;\n    return layout.horizontal ? {\n        same: widthChanged,\n        other: heightChanged\n    }:{\n        same: heightChanged,\n        other: widthChanged\n    };\n}\nfunction handleMaxPadding(chartArea){\n    const maxPadding=chartArea.maxPadding;\n    function updatePos(pos){\n        const change=Math.max(maxPadding[pos] - chartArea[pos], 0);\n        chartArea[pos] +=change;\n        return change;\n    }\n    chartArea.y +=updatePos('top');\n    chartArea.x +=updatePos('left');\n    updatePos('right');\n    updatePos('bottom');\n}\nfunction getMargins(horizontal, chartArea){\n    const maxPadding=chartArea.maxPadding;\n    function marginForPositions(positions){\n        const margin={\n            left: 0,\n            top: 0,\n            right: 0,\n            bottom: 0\n        };\n        positions.forEach((pos)=>{\n            margin[pos]=Math.max(chartArea[pos], maxPadding[pos]);\n        });\n        return margin;\n    }\n    return horizontal ? marginForPositions([\n        'left',\n        'right'\n    ]):marginForPositions([\n        'top',\n        'bottom'\n    ]);\n}\nfunction fitBoxes(boxes, chartArea, params, stacks){\n    const refitBoxes=[];\n    let i, ilen, layout, box, refit, changed;\n    for(i=0, ilen=boxes.length, refit=0; i < ilen; ++i){\n        layout=boxes[i];\n        box=layout.box;\n        box.update(layout.width||chartArea.w, layout.height||chartArea.h, getMargins(layout.horizontal, chartArea));\n        const { same , other  }=updateDims(chartArea, params, layout, stacks);\n        refit |=same&&refitBoxes.length;\n        changed=changed||other;\n        if(!box.fullSize){\n            refitBoxes.push(layout);\n        }\n    }\n    return refit&&fitBoxes(refitBoxes, chartArea, params, stacks)||changed;\n}\nfunction setBoxDims(box, left, top, width, height){\n    box.top=top;\n    box.left=left;\n    box.right=left + width;\n    box.bottom=top + height;\n    box.width=width;\n    box.height=height;\n}\nfunction placeBoxes(boxes, chartArea, params, stacks){\n    const userPadding=params.padding;\n    let { x , y  }=chartArea;\n    for (const layout of boxes){\n        const box=layout.box;\n        const stack=stacks[layout.stack]||{\n            count: 1,\n            placed: 0,\n            weight: 1\n        };\n        const weight=layout.stackWeight / stack.weight||1;\n        if(layout.horizontal){\n            const width=chartArea.w * weight;\n            const height=stack.size||box.height;\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.h)(stack.start)){\n                y=stack.start;\n            }\n            if(box.fullSize){\n                setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n            }else{\n                setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n            }\n            stack.start=y;\n            stack.placed +=width;\n            y=box.bottom;\n        }else{\n            const height=chartArea.h * weight;\n            const width=stack.size||box.width;\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.h)(stack.start)){\n                x=stack.start;\n            }\n            if(box.fullSize){\n                setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n            }else{\n                setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n            }\n            stack.start=x;\n            stack.placed +=height;\n            x=box.right;\n        }\n    }\n    chartArea.x=x;\n    chartArea.y=y;\n}\nvar layouts={\n addBox (chart, item){\n        if(!chart.boxes){\n            chart.boxes=[];\n        }\n        item.fullSize=item.fullSize||false;\n        item.position=item.position||'top';\n        item.weight=item.weight||0;\n        item._layers=item._layers||function(){\n            return [\n                {\n                    z: 0,\n                    draw (chartArea){\n                        item.draw(chartArea);\n                    }\n                }\n            ];\n        };\n        chart.boxes.push(item);\n    },\n removeBox (chart, layoutItem){\n        const index=chart.boxes ? chart.boxes.indexOf(layoutItem):-1;\n        if(index!==-1){\n            chart.boxes.splice(index, 1);\n        }\n    },\n configure (chart, item, options){\n        item.fullSize=options.fullSize;\n        item.position=options.position;\n        item.weight=options.weight;\n    },\n update (chart, width, height, minPadding){\n        if(!chart){\n            return;\n        }\n        const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(chart.options.layout.padding);\n        const availableWidth=Math.max(width - padding.width, 0);\n        const availableHeight=Math.max(height - padding.height, 0);\n        const boxes=buildLayoutBoxes(chart.boxes);\n        const verticalBoxes=boxes.vertical;\n        const horizontalBoxes=boxes.horizontal;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(chart.boxes, (box)=>{\n            if(typeof box.beforeLayout==='function'){\n                box.beforeLayout();\n            }\n        });\n        const visibleVerticalBoxCount=verticalBoxes.reduce((total, wrap)=>wrap.box.options&&wrap.box.options.display===false ? total:total + 1, 0)||1;\n        const params=Object.freeze({\n            outerWidth: width,\n            outerHeight: height,\n            padding,\n            availableWidth,\n            availableHeight,\n            vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n            hBoxMaxHeight: availableHeight / 2\n        });\n        const maxPadding=Object.assign({}, padding);\n        updateMaxPadding(maxPadding, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(minPadding));\n        const chartArea=Object.assign({\n            maxPadding,\n            w: availableWidth,\n            h: availableHeight,\n            x: padding.left,\n            y: padding.top\n        }, padding);\n        const stacks=setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n        fitBoxes(boxes.fullSize, chartArea, params, stacks);\n        fitBoxes(verticalBoxes, chartArea, params, stacks);\n        if(fitBoxes(horizontalBoxes, chartArea, params, stacks)){\n            fitBoxes(verticalBoxes, chartArea, params, stacks);\n        }\n        handleMaxPadding(chartArea);\n        placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n        chartArea.x +=chartArea.w;\n        chartArea.y +=chartArea.h;\n        placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n        chart.chartArea={\n            left: chartArea.left,\n            top: chartArea.top,\n            right: chartArea.left + chartArea.w,\n            bottom: chartArea.top + chartArea.h,\n            height: chartArea.h,\n            width: chartArea.w\n        };\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(boxes.chartArea, (layout)=>{\n            const box=layout.box;\n            Object.assign(box, chart.chartArea);\n            box.update(chartArea.w, chartArea.h, {\n                left: 0,\n                top: 0,\n                right: 0,\n                bottom: 0\n            });\n        });\n    }\n};\n\nclass BasePlatform {\n acquireContext(canvas, aspectRatio){}\n releaseContext(context){\n        return false;\n    }\n addEventListener(chart, type, listener){}\n removeEventListener(chart, type, listener){}\n getDevicePixelRatio(){\n        return 1;\n    }\n getMaximumSize(element, width, height, aspectRatio){\n        width=Math.max(0, width||element.width);\n        height=height||element.height;\n        return {\n            width,\n            height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio):height)\n        };\n    }\n isAttached(canvas){\n        return true;\n    }\n updateConfig(config){\n    }\n}\n\nclass BasicPlatform extends BasePlatform {\n    acquireContext(item){\n        return item&&item.getContext&&item.getContext('2d')||null;\n    }\n    updateConfig(config){\n        config.options.animation=false;\n    }\n}\n\nconst EXPANDO_KEY='$chartjs';\n const EVENT_TYPES={\n    touchstart: 'mousedown',\n    touchmove: 'mousemove',\n    touchend: 'mouseup',\n    pointerenter: 'mouseenter',\n    pointerdown: 'mousedown',\n    pointermove: 'mousemove',\n    pointerup: 'mouseup',\n    pointerleave: 'mouseout',\n    pointerout: 'mouseout'\n};\nconst isNullOrEmpty=(value)=>value===null||value==='';\n function initCanvas(canvas, aspectRatio){\n    const style=canvas.style;\n    const renderHeight=canvas.getAttribute('height');\n    const renderWidth=canvas.getAttribute('width');\n    canvas[EXPANDO_KEY]={\n        initial: {\n            height: renderHeight,\n            width: renderWidth,\n            style: {\n                display: style.display,\n                height: style.height,\n                width: style.width\n            }\n        }\n    };\n    style.display=style.display||'block';\n    style.boxSizing=style.boxSizing||'border-box';\n    if(isNullOrEmpty(renderWidth)){\n        const displayWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.J)(canvas, 'width');\n        if(displayWidth!==undefined){\n            canvas.width=displayWidth;\n        }\n    }\n    if(isNullOrEmpty(renderHeight)){\n        if(canvas.style.height===''){\n            canvas.height=canvas.width / (aspectRatio||2);\n        }else{\n            const displayHeight=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.J)(canvas, 'height');\n            if(displayHeight!==undefined){\n                canvas.height=displayHeight;\n            }\n        }\n    }\n    return canvas;\n}\nconst eventListenerOptions=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.K ? {\n    passive: true\n}:false;\nfunction addListener(node, type, listener){\n    node.addEventListener(type, listener, eventListenerOptions);\n}\nfunction removeListener(chart, type, listener){\n    chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\nfunction fromNativeEvent(event, chart){\n    const type=EVENT_TYPES[event.type]||event.type;\n    const { x , y  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.z)(event, chart);\n    return {\n        type,\n        chart,\n        native: event,\n        x: x!==undefined ? x:null,\n        y: y!==undefined ? y:null\n    };\n}\nfunction nodeListContains(nodeList, canvas){\n    for (const node of nodeList){\n        if(node===canvas||node.contains(canvas)){\n            return true;\n        }\n    }\n}\nfunction createAttachObserver(chart, type, listener){\n    const canvas=chart.canvas;\n    const observer=new MutationObserver((entries)=>{\n        let trigger=false;\n        for (const entry of entries){\n            trigger=trigger||nodeListContains(entry.addedNodes, canvas);\n            trigger=trigger&&!nodeListContains(entry.removedNodes, canvas);\n        }\n        if(trigger){\n            listener();\n        }\n    });\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    });\n    return observer;\n}\nfunction createDetachObserver(chart, type, listener){\n    const canvas=chart.canvas;\n    const observer=new MutationObserver((entries)=>{\n        let trigger=false;\n        for (const entry of entries){\n            trigger=trigger||nodeListContains(entry.removedNodes, canvas);\n            trigger=trigger&&!nodeListContains(entry.addedNodes, canvas);\n        }\n        if(trigger){\n            listener();\n        }\n    });\n    observer.observe(document, {\n        childList: true,\n        subtree: true\n    });\n    return observer;\n}\nconst drpListeningCharts=new Map();\nlet oldDevicePixelRatio=0;\nfunction onWindowResize(){\n    const dpr=window.devicePixelRatio;\n    if(dpr===oldDevicePixelRatio){\n        return;\n    }\n    oldDevicePixelRatio=dpr;\n    drpListeningCharts.forEach((resize, chart)=>{\n        if(chart.currentDevicePixelRatio!==dpr){\n            resize();\n        }\n    });\n}\nfunction listenDevicePixelRatioChanges(chart, resize){\n    if(!drpListeningCharts.size){\n        window.addEventListener('resize', onWindowResize);\n    }\n    drpListeningCharts.set(chart, resize);\n}\nfunction unlistenDevicePixelRatioChanges(chart){\n    drpListeningCharts.delete(chart);\n    if(!drpListeningCharts.size){\n        window.removeEventListener('resize', onWindowResize);\n    }\n}\nfunction createResizeObserver(chart, type, listener){\n    const canvas=chart.canvas;\n    const container=canvas&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.I)(canvas);\n    if(!container){\n        return;\n    }\n    const resize=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.L)((width, height)=>{\n        const w=container.clientWidth;\n        listener(width, height);\n        if(w < container.clientWidth){\n            listener();\n        }\n    }, window);\n    const observer=new ResizeObserver((entries)=>{\n        const entry=entries[0];\n        const width=entry.contentRect.width;\n        const height=entry.contentRect.height;\n        if(width===0&&height===0){\n            return;\n        }\n        resize(width, height);\n    });\n    observer.observe(container);\n    listenDevicePixelRatioChanges(chart, resize);\n    return observer;\n}\nfunction releaseObserver(chart, type, observer){\n    if(observer){\n        observer.disconnect();\n    }\n    if(type==='resize'){\n        unlistenDevicePixelRatioChanges(chart);\n    }\n}\nfunction createProxyAndListen(chart, type, listener){\n    const canvas=chart.canvas;\n    const proxy=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.L)((event)=>{\n        if(chart.ctx!==null){\n            listener(fromNativeEvent(event, chart));\n        }\n    }, chart);\n    addListener(canvas, type, proxy);\n    return proxy;\n}\n class DomPlatform extends BasePlatform {\n acquireContext(canvas, aspectRatio){\n        const context=canvas&&canvas.getContext&&canvas.getContext('2d');\n        if(context&&context.canvas===canvas){\n            initCanvas(canvas, aspectRatio);\n            return context;\n        }\n        return null;\n    }\n releaseContext(context){\n        const canvas=context.canvas;\n        if(!canvas[EXPANDO_KEY]){\n            return false;\n        }\n        const initial=canvas[EXPANDO_KEY].initial;\n        [\n            'height',\n            'width'\n        ].forEach((prop)=>{\n            const value=initial[prop];\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(value)){\n                canvas.removeAttribute(prop);\n            }else{\n                canvas.setAttribute(prop, value);\n            }\n        });\n        const style=initial.style||{};\n        Object.keys(style).forEach((key)=>{\n            canvas.style[key]=style[key];\n        });\n        canvas.width=canvas.width;\n        delete canvas[EXPANDO_KEY];\n        return true;\n    }\n addEventListener(chart, type, listener){\n        this.removeEventListener(chart, type);\n        const proxies=chart.$proxies||(chart.$proxies={});\n        const handlers={\n            attach: createAttachObserver,\n            detach: createDetachObserver,\n            resize: createResizeObserver\n        };\n        const handler=handlers[type]||createProxyAndListen;\n        proxies[type]=handler(chart, type, listener);\n    }\n removeEventListener(chart, type){\n        const proxies=chart.$proxies||(chart.$proxies={});\n        const proxy=proxies[type];\n        if(!proxy){\n            return;\n        }\n        const handlers={\n            attach: releaseObserver,\n            detach: releaseObserver,\n            resize: releaseObserver\n        };\n        const handler=handlers[type]||removeListener;\n        handler(chart, type, proxy);\n        proxies[type]=undefined;\n    }\n    getDevicePixelRatio(){\n        return window.devicePixelRatio;\n    }\n getMaximumSize(canvas, width, height, aspectRatio){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.G)(canvas, width, height, aspectRatio);\n    }\n isAttached(canvas){\n        const container=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.I)(canvas);\n        return !!(container&&container.isConnected);\n    }\n}\n\nfunction _detectPlatform(canvas){\n    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.M)()||typeof OffscreenCanvas!=='undefined'&&canvas instanceof OffscreenCanvas){\n        return BasicPlatform;\n    }\n    return DomPlatform;\n}\n\nclass Element {\n    static defaults={};\n    static defaultRoutes=undefined;\n    x;\n    y;\n    active=false;\n    options;\n    $animations;\n    tooltipPosition(useFinalPosition){\n        const { x , y  }=this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return {\n            x,\n            y\n        };\n    }\n    hasValue(){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(this.x)&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(this.y);\n    }\n    getProps(props, final){\n        const anims=this.$animations;\n        if(!final||!anims){\n            // let's not create an object, if not needed\n            return this;\n        }\n        const ret={};\n        props.forEach((prop)=>{\n            ret[prop]=anims[prop]&&anims[prop].active() ? anims[prop]._to:this[prop];\n        });\n        return ret;\n    }\n}\n\nfunction autoSkip(scale, ticks){\n    const tickOpts=scale.options.ticks;\n    const determinedMaxTicks=determineMaxTicks(scale);\n    const ticksLimit=Math.min(tickOpts.maxTicksLimit||determinedMaxTicks, determinedMaxTicks);\n    const majorIndices=tickOpts.major.enabled ? getMajorIndices(ticks):[];\n    const numMajorIndices=majorIndices.length;\n    const first=majorIndices[0];\n    const last=majorIndices[numMajorIndices - 1];\n    const newTicks=[];\n    if(numMajorIndices > ticksLimit){\n        skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n        return newTicks;\n    }\n    const spacing=calculateSpacing(majorIndices, ticks, ticksLimit);\n    if(numMajorIndices > 0){\n        let i, ilen;\n        const avgMajorSpacing=numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)):null;\n        skip(ticks, newTicks, spacing, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(avgMajorSpacing) ? 0:first - avgMajorSpacing, first);\n        for(i=0, ilen=numMajorIndices - 1; i < ilen; i++){\n            skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n        }\n        skip(ticks, newTicks, spacing, last, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(avgMajorSpacing) ? ticks.length:last + avgMajorSpacing);\n        return newTicks;\n    }\n    skip(ticks, newTicks, spacing);\n    return newTicks;\n}\nfunction determineMaxTicks(scale){\n    const offset=scale.options.offset;\n    const tickLength=scale._tickSize();\n    const maxScale=scale._length / tickLength + (offset ? 0:1);\n    const maxChart=scale._maxLength / tickLength;\n    return Math.floor(Math.min(maxScale, maxChart));\n}\n function calculateSpacing(majorIndices, ticks, ticksLimit){\n    const evenMajorSpacing=getEvenSpacing(majorIndices);\n    const spacing=ticks.length / ticksLimit;\n    if(!evenMajorSpacing){\n        return Math.max(spacing, 1);\n    }\n    const factors=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.N)(evenMajorSpacing);\n    for(let i=0, ilen=factors.length - 1; i < ilen; i++){\n        const factor=factors[i];\n        if(factor > spacing){\n            return factor;\n        }\n    }\n    return Math.max(spacing, 1);\n}\n function getMajorIndices(ticks){\n    const result=[];\n    let i, ilen;\n    for(i=0, ilen=ticks.length; i < ilen; i++){\n        if(ticks[i].major){\n            result.push(i);\n        }\n    }\n    return result;\n}\n function skipMajors(ticks, newTicks, majorIndices, spacing){\n    let count=0;\n    let next=majorIndices[0];\n    let i;\n    spacing=Math.ceil(spacing);\n    for(i=0; i < ticks.length; i++){\n        if(i===next){\n            newTicks.push(ticks[i]);\n            count++;\n            next=majorIndices[count * spacing];\n        }\n    }\n}\n function skip(ticks, newTicks, spacing, majorStart, majorEnd){\n    const start=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(majorStart, 0);\n    const end=Math.min((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(majorEnd, ticks.length), ticks.length);\n    let count=0;\n    let length, i, next;\n    spacing=Math.ceil(spacing);\n    if(majorEnd){\n        length=majorEnd - majorStart;\n        spacing=length / Math.floor(length / spacing);\n    }\n    next=start;\n    while(next < 0){\n        count++;\n        next=Math.round(start + count * spacing);\n    }\n    for(i=Math.max(start, 0); i < end; i++){\n        if(i===next){\n            newTicks.push(ticks[i]);\n            count++;\n            next=Math.round(start + count * spacing);\n        }\n    }\n}\n function getEvenSpacing(arr){\n    const len=arr.length;\n    let i, diff;\n    if(len < 2){\n        return false;\n    }\n    for(diff=arr[0], i=1; i < len; ++i){\n        if(arr[i] - arr[i - 1]!==diff){\n            return false;\n        }\n    }\n    return diff;\n}\n\nconst reverseAlign=(align)=>align==='left' ? 'right':align==='right' ? 'left':align;\nconst offsetFromEdge=(scale, edge, offset)=>edge==='top'||edge==='left' ? scale[edge] + offset:scale[edge] - offset;\nconst getTicksLimit=(ticksLength, maxTicksLimit)=>Math.min(maxTicksLimit||ticksLength, ticksLength);\n function sample(arr, numItems){\n    const result=[];\n    const increment=arr.length / numItems;\n    const len=arr.length;\n    let i=0;\n    for(; i < len; i +=increment){\n        result.push(arr[Math.floor(i)]);\n    }\n    return result;\n}\n function getPixelForGridLine(scale, index, offsetGridLines){\n    const length=scale.ticks.length;\n    const validIndex=Math.min(index, length - 1);\n    const start=scale._startPixel;\n    const end=scale._endPixel;\n    const epsilon=1e-6;\n    let lineValue=scale.getPixelForTick(validIndex);\n    let offset;\n    if(offsetGridLines){\n        if(length===1){\n            offset=Math.max(lineValue - start, end - lineValue);\n        }else if(index===0){\n            offset=(scale.getPixelForTick(1) - lineValue) / 2;\n        }else{\n            offset=(lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n        }\n        lineValue +=validIndex < index ? offset:-offset;\n        if(lineValue < start - epsilon||lineValue > end + epsilon){\n            return;\n        }\n    }\n    return lineValue;\n}\n function garbageCollect(caches, length){\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(caches, (cache)=>{\n        const gc=cache.gc;\n        const gcLen=gc.length / 2;\n        let i;\n        if(gcLen > length){\n            for(i=0; i < gcLen; ++i){\n                delete cache.data[gc[i]];\n            }\n            gc.splice(0, gcLen);\n        }\n    });\n}\n function getTickMarkLength(options){\n    return options.drawTicks ? options.tickLength:0;\n}\n function getTitleHeight(options, fallback){\n    if(!options.display){\n        return 0;\n    }\n    const font=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.font, fallback);\n    const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(options.padding);\n    const lines=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(options.text) ? options.text.length:1;\n    return lines * font.lineHeight + padding.height;\n}\nfunction createScaleContext(parent, scale){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        scale,\n        type: 'scale'\n    });\n}\nfunction createTickContext(parent, index, tick){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        tick,\n        index,\n        type: 'tick'\n    });\n}\nfunction titleAlign(align, position, reverse){\n     let ret=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a1)(align);\n    if(reverse&&position!=='right'||!reverse&&position==='right'){\n        ret=reverseAlign(ret);\n    }\n    return ret;\n}\nfunction titleArgs(scale, offset, position, align){\n    const { top , left , bottom , right , chart  }=scale;\n    const { chartArea , scales  }=chart;\n    let rotation=0;\n    let maxWidth, titleX, titleY;\n    const height=bottom - top;\n    const width=right - left;\n    if(scale.isHorizontal()){\n        titleX=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, left, right);\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n            const positionAxisID=Object.keys(position)[0];\n            const value=position[positionAxisID];\n            titleY=scales[positionAxisID].getPixelForValue(value) + height - offset;\n        }else if(position==='center'){\n            titleY=(chartArea.bottom + chartArea.top) / 2 + height - offset;\n        }else{\n            titleY=offsetFromEdge(scale, position, offset);\n        }\n        maxWidth=right - left;\n    }else{\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n            const positionAxisID=Object.keys(position)[0];\n            const value=position[positionAxisID];\n            titleX=scales[positionAxisID].getPixelForValue(value) - width + offset;\n        }else if(position==='center'){\n            titleX=(chartArea.left + chartArea.right) / 2 - width + offset;\n        }else{\n            titleX=offsetFromEdge(scale, position, offset);\n        }\n        titleY=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, bottom, top);\n        rotation=position==='left' ? -_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H:_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H;\n    }\n    return {\n        titleX,\n        titleY,\n        maxWidth,\n        rotation\n    };\n}\nclass Scale extends Element {\n    constructor(cfg){\n        super();\n         this.id=cfg.id;\n         this.type=cfg.type;\n         this.options=undefined;\n         this.ctx=cfg.ctx;\n         this.chart=cfg.chart;\n         this.top=undefined;\n         this.bottom=undefined;\n         this.left=undefined;\n         this.right=undefined;\n         this.width=undefined;\n         this.height=undefined;\n        this._margins={\n            left: 0,\n            right: 0,\n            top: 0,\n            bottom: 0\n        };\n         this.maxWidth=undefined;\n         this.maxHeight=undefined;\n         this.paddingTop=undefined;\n         this.paddingBottom=undefined;\n         this.paddingLeft=undefined;\n         this.paddingRight=undefined;\n         this.axis=undefined;\n         this.labelRotation=undefined;\n        this.min=undefined;\n        this.max=undefined;\n        this._range=undefined;\n         this.ticks=[];\n         this._gridLineItems=null;\n         this._labelItems=null;\n         this._labelSizes=null;\n        this._length=0;\n        this._maxLength=0;\n        this._longestTextCache={};\n         this._startPixel=undefined;\n         this._endPixel=undefined;\n        this._reversePixels=false;\n        this._userMax=undefined;\n        this._userMin=undefined;\n        this._suggestedMax=undefined;\n        this._suggestedMin=undefined;\n        this._ticksLength=0;\n        this._borderValue=0;\n        this._cache={};\n        this._dataLimitsCached=false;\n        this.$context=undefined;\n    }\n init(options){\n        this.options=options.setContext(this.getContext());\n        this.axis=options.axis;\n        this._userMin=this.parse(options.min);\n        this._userMax=this.parse(options.max);\n        this._suggestedMin=this.parse(options.suggestedMin);\n        this._suggestedMax=this.parse(options.suggestedMax);\n    }\n parse(raw, index){\n        return raw;\n    }\n getUserBounds(){\n        let { _userMin , _userMax , _suggestedMin , _suggestedMax  }=this;\n        _userMin=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_userMin, Number.POSITIVE_INFINITY);\n        _userMax=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_userMax, Number.NEGATIVE_INFINITY);\n        _suggestedMin=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_suggestedMin, Number.POSITIVE_INFINITY);\n        _suggestedMax=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_suggestedMax, Number.NEGATIVE_INFINITY);\n        return {\n            min: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_userMin, _suggestedMin),\n            max: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(_userMax, _suggestedMax),\n            minDefined: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(_userMin),\n            maxDefined: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(_userMax)\n        };\n    }\n getMinMax(canStack){\n        let { min , max , minDefined , maxDefined  }=this.getUserBounds();\n        let range;\n        if(minDefined&&maxDefined){\n            return {\n                min,\n                max\n            };\n        }\n        const metas=this.getMatchingVisibleMetas();\n        for(let i=0, ilen=metas.length; i < ilen; ++i){\n            range=metas[i].controller.getMinMax(this, canStack);\n            if(!minDefined){\n                min=Math.min(min, range.min);\n            }\n            if(!maxDefined){\n                max=Math.max(max, range.max);\n            }\n        }\n        min=maxDefined&&min > max ? max:min;\n        max=minDefined&&min > max ? min:max;\n        return {\n            min: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(min, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(max, min)),\n            max: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(max, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(min, max))\n        };\n    }\n getPadding(){\n        return {\n            left: this.paddingLeft||0,\n            top: this.paddingTop||0,\n            right: this.paddingRight||0,\n            bottom: this.paddingBottom||0\n        };\n    }\n getTicks(){\n        return this.ticks;\n    }\n getLabels(){\n        const data=this.chart.data;\n        return this.options.labels||(this.isHorizontal() ? data.xLabels:data.yLabels)||data.labels||[];\n    }\n getLabelItems(chartArea=this.chart.chartArea){\n        const items=this._labelItems||(this._labelItems=this._computeLabelItems(chartArea));\n        return items;\n    }\n    beforeLayout(){\n        this._cache={};\n        this._dataLimitsCached=false;\n    }\n    beforeUpdate(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.beforeUpdate, [\n            this\n        ]);\n    }\n update(maxWidth, maxHeight, margins){\n        const { beginAtZero , grace , ticks: tickOpts  }=this.options;\n        const sampleSize=tickOpts.sampleSize;\n        this.beforeUpdate();\n        this.maxWidth=maxWidth;\n        this.maxHeight=maxHeight;\n        this._margins=margins=Object.assign({\n            left: 0,\n            right: 0,\n            top: 0,\n            bottom: 0\n        }, margins);\n        this.ticks=null;\n        this._labelSizes=null;\n        this._gridLineItems=null;\n        this._labelItems=null;\n        this.beforeSetDimensions();\n        this.setDimensions();\n        this.afterSetDimensions();\n        this._maxLength=this.isHorizontal() ? this.width + margins.left + margins.right:this.height + margins.top + margins.bottom;\n        if(!this._dataLimitsCached){\n            this.beforeDataLimits();\n            this.determineDataLimits();\n            this.afterDataLimits();\n            this._range=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.R)(this, grace, beginAtZero);\n            this._dataLimitsCached=true;\n        }\n        this.beforeBuildTicks();\n        this.ticks=this.buildTicks()||[];\n        this.afterBuildTicks();\n        const samplingEnabled=sampleSize < this.ticks.length;\n        this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize):this.ticks);\n        this.configure();\n        this.beforeCalculateLabelRotation();\n        this.calculateLabelRotation();\n        this.afterCalculateLabelRotation();\n        if(tickOpts.display&&(tickOpts.autoSkip||tickOpts.source==='auto')){\n            this.ticks=autoSkip(this, this.ticks);\n            this._labelSizes=null;\n            this.afterAutoSkip();\n        }\n        if(samplingEnabled){\n            this._convertTicksToLabels(this.ticks);\n        }\n        this.beforeFit();\n        this.fit();\n        this.afterFit();\n        this.afterUpdate();\n    }\n configure(){\n        let reversePixels=this.options.reverse;\n        let startPixel, endPixel;\n        if(this.isHorizontal()){\n            startPixel=this.left;\n            endPixel=this.right;\n        }else{\n            startPixel=this.top;\n            endPixel=this.bottom;\n            reversePixels = !reversePixels;\n        }\n        this._startPixel=startPixel;\n        this._endPixel=endPixel;\n        this._reversePixels=reversePixels;\n        this._length=endPixel - startPixel;\n        this._alignToPixels=this.options.alignToPixels;\n    }\n    afterUpdate(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.afterUpdate, [\n            this\n        ]);\n    }\n    beforeSetDimensions(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.beforeSetDimensions, [\n            this\n        ]);\n    }\n    setDimensions(){\n        if(this.isHorizontal()){\n            this.width=this.maxWidth;\n            this.left=0;\n            this.right=this.width;\n        }else{\n            this.height=this.maxHeight;\n            this.top=0;\n            this.bottom=this.height;\n        }\n        this.paddingLeft=0;\n        this.paddingTop=0;\n        this.paddingRight=0;\n        this.paddingBottom=0;\n    }\n    afterSetDimensions(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.afterSetDimensions, [\n            this\n        ]);\n    }\n    _callHooks(name){\n        this.chart.notifyPlugins(name, this.getContext());\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options[name], [\n            this\n        ]);\n    }\n    beforeDataLimits(){\n        this._callHooks('beforeDataLimits');\n    }\n    determineDataLimits(){}\n    afterDataLimits(){\n        this._callHooks('afterDataLimits');\n    }\n    beforeBuildTicks(){\n        this._callHooks('beforeBuildTicks');\n    }\n buildTicks(){\n        return [];\n    }\n    afterBuildTicks(){\n        this._callHooks('afterBuildTicks');\n    }\n    beforeTickToLabelConversion(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.beforeTickToLabelConversion, [\n            this\n        ]);\n    }\n generateTickLabels(ticks){\n        const tickOpts=this.options.ticks;\n        let i, ilen, tick;\n        for(i=0, ilen=ticks.length; i < ilen; i++){\n            tick=ticks[i];\n            tick.label=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(tickOpts.callback, [\n                tick.value,\n                i,\n                ticks\n            ], this);\n        }\n    }\n    afterTickToLabelConversion(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.afterTickToLabelConversion, [\n            this\n        ]);\n    }\n    beforeCalculateLabelRotation(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.beforeCalculateLabelRotation, [\n            this\n        ]);\n    }\n    calculateLabelRotation(){\n        const options=this.options;\n        const tickOpts=options.ticks;\n        const numTicks=getTicksLimit(this.ticks.length, options.ticks.maxTicksLimit);\n        const minRotation=tickOpts.minRotation||0;\n        const maxRotation=tickOpts.maxRotation;\n        let labelRotation=minRotation;\n        let tickWidth, maxHeight, maxLabelDiagonal;\n        if(!this._isVisible()||!tickOpts.display||minRotation >=maxRotation||numTicks <=1||!this.isHorizontal()){\n            this.labelRotation=minRotation;\n            return;\n        }\n        const labelSizes=this._getLabelSizes();\n        const maxLabelWidth=labelSizes.widest.width;\n        const maxLabelHeight=labelSizes.highest.height;\n        const maxWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n        tickWidth=options.offset ? this.maxWidth / numTicks:maxWidth / (numTicks - 1);\n        if(maxLabelWidth + 6 > tickWidth){\n            tickWidth=maxWidth / (numTicks - (options.offset ? 0.5:1));\n            maxHeight=this.maxHeight - getTickMarkLength(options.grid) - tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n            maxLabelDiagonal=Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n            labelRotation=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.U)(Math.min(Math.asin((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)((labelSizes.highest.height + 6) / tickWidth, -1, 1)), Math.asin((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(maxLabelHeight / maxLabelDiagonal, -1, 1))));\n            labelRotation=Math.max(minRotation, Math.min(maxRotation, labelRotation));\n        }\n        this.labelRotation=labelRotation;\n    }\n    afterCalculateLabelRotation(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.afterCalculateLabelRotation, [\n            this\n        ]);\n    }\n    afterAutoSkip(){}\n    beforeFit(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.beforeFit, [\n            this\n        ]);\n    }\n    fit(){\n        const minSize={\n            width: 0,\n            height: 0\n        };\n        const { chart , options: { ticks: tickOpts , title: titleOpts , grid: gridOpts  }}=this;\n        const display=this._isVisible();\n        const isHorizontal=this.isHorizontal();\n        if(display){\n            const titleHeight=getTitleHeight(titleOpts, chart.options.font);\n            if(isHorizontal){\n                minSize.width=this.maxWidth;\n                minSize.height=getTickMarkLength(gridOpts) + titleHeight;\n            }else{\n                minSize.height=this.maxHeight;\n                minSize.width=getTickMarkLength(gridOpts) + titleHeight;\n            }\n            if(tickOpts.display&&this.ticks.length){\n                const { first , last , widest , highest  }=this._getLabelSizes();\n                const tickPadding=tickOpts.padding * 2;\n                const angleRadians=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.labelRotation);\n                const cos=Math.cos(angleRadians);\n                const sin=Math.sin(angleRadians);\n                if(isHorizontal){\n                    const labelHeight=tickOpts.mirror ? 0:sin * widest.width + cos * highest.height;\n                    minSize.height=Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n                }else{\n                    const labelWidth=tickOpts.mirror ? 0:cos * widest.width + sin * highest.height;\n                    minSize.width=Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n                }\n                this._calculatePadding(first, last, sin, cos);\n            }\n        }\n        this._handleMargins();\n        if(isHorizontal){\n            this.width=this._length=chart.width - this._margins.left - this._margins.right;\n            this.height=minSize.height;\n        }else{\n            this.width=minSize.width;\n            this.height=this._length=chart.height - this._margins.top - this._margins.bottom;\n        }\n    }\n    _calculatePadding(first, last, sin, cos){\n        const { ticks: { align , padding  } , position  }=this.options;\n        const isRotated=this.labelRotation!==0;\n        const labelsBelowTicks=position!=='top'&&this.axis==='x';\n        if(this.isHorizontal()){\n            const offsetLeft=this.getPixelForTick(0) - this.left;\n            const offsetRight=this.right - this.getPixelForTick(this.ticks.length - 1);\n            let paddingLeft=0;\n            let paddingRight=0;\n            if(isRotated){\n                if(labelsBelowTicks){\n                    paddingLeft=cos * first.width;\n                    paddingRight=sin * last.height;\n                }else{\n                    paddingLeft=sin * first.height;\n                    paddingRight=cos * last.width;\n                }\n            }else if(align==='start'){\n                paddingRight=last.width;\n            }else if(align==='end'){\n                paddingLeft=first.width;\n            }else if(align!=='inner'){\n                paddingLeft=first.width / 2;\n                paddingRight=last.width / 2;\n            }\n            this.paddingLeft=Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n            this.paddingRight=Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n        }else{\n            let paddingTop=last.height / 2;\n            let paddingBottom=first.height / 2;\n            if(align==='start'){\n                paddingTop=0;\n                paddingBottom=first.height;\n            }else if(align==='end'){\n                paddingTop=last.height;\n                paddingBottom=0;\n            }\n            this.paddingTop=paddingTop + padding;\n            this.paddingBottom=paddingBottom + padding;\n        }\n    }\n _handleMargins(){\n        if(this._margins){\n            this._margins.left=Math.max(this.paddingLeft, this._margins.left);\n            this._margins.top=Math.max(this.paddingTop, this._margins.top);\n            this._margins.right=Math.max(this.paddingRight, this._margins.right);\n            this._margins.bottom=Math.max(this.paddingBottom, this._margins.bottom);\n        }\n    }\n    afterFit(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.afterFit, [\n            this\n        ]);\n    }\n isHorizontal(){\n        const { axis , position  }=this.options;\n        return position==='top'||position==='bottom'||axis==='x';\n    }\n isFullSize(){\n        return this.options.fullSize;\n    }\n _convertTicksToLabels(ticks){\n        this.beforeTickToLabelConversion();\n        this.generateTickLabels(ticks);\n        let i, ilen;\n        for(i=0, ilen=ticks.length; i < ilen; i++){\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(ticks[i].label)){\n                ticks.splice(i, 1);\n                ilen--;\n                i--;\n            }\n        }\n        this.afterTickToLabelConversion();\n    }\n _getLabelSizes(){\n        let labelSizes=this._labelSizes;\n        if(!labelSizes){\n            const sampleSize=this.options.ticks.sampleSize;\n            let ticks=this.ticks;\n            if(sampleSize < ticks.length){\n                ticks=sample(ticks, sampleSize);\n            }\n            this._labelSizes=labelSizes=this._computeLabelSizes(ticks, ticks.length, this.options.ticks.maxTicksLimit);\n        }\n        return labelSizes;\n    }\n _computeLabelSizes(ticks, length, maxTicksLimit){\n        const { ctx , _longestTextCache: caches  }=this;\n        const widths=[];\n        const heights=[];\n        const increment=Math.floor(length / getTicksLimit(length, maxTicksLimit));\n        let widestLabelSize=0;\n        let highestLabelSize=0;\n        let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n        for(i=0; i < length; i +=increment){\n            label=ticks[i].label;\n            tickFont=this._resolveTickFontOptions(i);\n            ctx.font=fontString=tickFont.string;\n            cache=caches[fontString]=caches[fontString]||{\n                data: {},\n                gc: []\n            };\n            lineHeight=tickFont.lineHeight;\n            width=height=0;\n            if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(label)&&!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(label)){\n                width=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.V)(ctx, cache.data, cache.gc, width, label);\n                height=lineHeight;\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(label)){\n                for(j=0, jlen=label.length; j < jlen; ++j){\n                    nestedLabel=label[j];\n                    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(nestedLabel)&&!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(nestedLabel)){\n                        width=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.V)(ctx, cache.data, cache.gc, width, nestedLabel);\n                        height +=lineHeight;\n                    }\n                }\n            }\n            widths.push(width);\n            heights.push(height);\n            widestLabelSize=Math.max(width, widestLabelSize);\n            highestLabelSize=Math.max(height, highestLabelSize);\n        }\n        garbageCollect(caches, length);\n        const widest=widths.indexOf(widestLabelSize);\n        const highest=heights.indexOf(highestLabelSize);\n        const valueAt=(idx)=>({\n                width: widths[idx]||0,\n                height: heights[idx]||0\n            });\n        return {\n            first: valueAt(0),\n            last: valueAt(length - 1),\n            widest: valueAt(widest),\n            highest: valueAt(highest),\n            widths,\n            heights\n        };\n    }\n getLabelForValue(value){\n        return value;\n    }\n getPixelForValue(value, index){\n        return NaN;\n    }\n getValueForPixel(pixel){}\n getPixelForTick(index){\n        const ticks=this.ticks;\n        if(index < 0||index > ticks.length - 1){\n            return null;\n        }\n        return this.getPixelForValue(ticks[index].value);\n    }\n getPixelForDecimal(decimal){\n        if(this._reversePixels){\n            decimal=1 - decimal;\n        }\n        const pixel=this._startPixel + decimal * this._length;\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.W)(this._alignToPixels ? (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(this.chart, pixel, 0):pixel);\n    }\n getDecimalForPixel(pixel){\n        const decimal=(pixel - this._startPixel) / this._length;\n        return this._reversePixels ? 1 - decimal:decimal;\n    }\n getBasePixel(){\n        return this.getPixelForValue(this.getBaseValue());\n    }\n getBaseValue(){\n        const { min , max  }=this;\n        return min < 0&&max < 0 ? max:min > 0&&max > 0 ? min:0;\n    }\n getContext(index){\n        const ticks=this.ticks||[];\n        if(index >=0&&index < ticks.length){\n            const tick=ticks[index];\n            return tick.$context||(tick.$context=createTickContext(this.getContext(), index, tick));\n        }\n        return this.$context||(this.$context=createScaleContext(this.chart.getContext(), this));\n    }\n _tickSize(){\n        const optionTicks=this.options.ticks;\n        const rot=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.labelRotation);\n        const cos=Math.abs(Math.cos(rot));\n        const sin=Math.abs(Math.sin(rot));\n        const labelSizes=this._getLabelSizes();\n        const padding=optionTicks.autoSkipPadding||0;\n        const w=labelSizes ? labelSizes.widest.width + padding:0;\n        const h=labelSizes ? labelSizes.highest.height + padding:0;\n        return this.isHorizontal() ? h * cos > w * sin ? w / cos:h / sin:h * sin < w * cos ? h / cos:w / sin;\n    }\n _isVisible(){\n        const display=this.options.display;\n        if(display!=='auto'){\n            return !!display;\n        }\n        return this.getMatchingVisibleMetas().length > 0;\n    }\n _computeGridLineItems(chartArea){\n        const axis=this.axis;\n        const chart=this.chart;\n        const options=this.options;\n        const { grid , position , border  }=options;\n        const offset=grid.offset;\n        const isHorizontal=this.isHorizontal();\n        const ticks=this.ticks;\n        const ticksLength=ticks.length + (offset ? 1:0);\n        const tl=getTickMarkLength(grid);\n        const items=[];\n        const borderOpts=border.setContext(this.getContext());\n        const axisWidth=borderOpts.display ? borderOpts.width:0;\n        const axisHalfWidth=axisWidth / 2;\n        const alignBorderValue=function(pixel){\n            return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, pixel, axisWidth);\n        };\n        let borderValue, i, lineValue, alignedLineValue;\n        let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n        if(position==='top'){\n            borderValue=alignBorderValue(this.bottom);\n            ty1=this.bottom - tl;\n            ty2=borderValue - axisHalfWidth;\n            y1=alignBorderValue(chartArea.top) + axisHalfWidth;\n            y2=chartArea.bottom;\n        }else if(position==='bottom'){\n            borderValue=alignBorderValue(this.top);\n            y1=chartArea.top;\n            y2=alignBorderValue(chartArea.bottom) - axisHalfWidth;\n            ty1=borderValue + axisHalfWidth;\n            ty2=this.top + tl;\n        }else if(position==='left'){\n            borderValue=alignBorderValue(this.right);\n            tx1=this.right - tl;\n            tx2=borderValue - axisHalfWidth;\n            x1=alignBorderValue(chartArea.left) + axisHalfWidth;\n            x2=chartArea.right;\n        }else if(position==='right'){\n            borderValue=alignBorderValue(this.left);\n            x1=chartArea.left;\n            x2=alignBorderValue(chartArea.right) - axisHalfWidth;\n            tx1=borderValue + axisHalfWidth;\n            tx2=this.left + tl;\n        }else if(axis==='x'){\n            if(position==='center'){\n                borderValue=alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n                const positionAxisID=Object.keys(position)[0];\n                const value=position[positionAxisID];\n                borderValue=alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n            }\n            y1=chartArea.top;\n            y2=chartArea.bottom;\n            ty1=borderValue + axisHalfWidth;\n            ty2=ty1 + tl;\n        }else if(axis==='y'){\n            if(position==='center'){\n                borderValue=alignBorderValue((chartArea.left + chartArea.right) / 2);\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n                const positionAxisID=Object.keys(position)[0];\n                const value=position[positionAxisID];\n                borderValue=alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n            }\n            tx1=borderValue - axisHalfWidth;\n            tx2=tx1 - tl;\n            x1=chartArea.left;\n            x2=chartArea.right;\n        }\n        const limit=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(options.ticks.maxTicksLimit, ticksLength);\n        const step=Math.max(1, Math.ceil(ticksLength / limit));\n        for(i=0; i < ticksLength; i +=step){\n            const context=this.getContext(i);\n            const optsAtIndex=grid.setContext(context);\n            const optsAtIndexBorder=border.setContext(context);\n            const lineWidth=optsAtIndex.lineWidth;\n            const lineColor=optsAtIndex.color;\n            const borderDash=optsAtIndexBorder.dash||[];\n            const borderDashOffset=optsAtIndexBorder.dashOffset;\n            const tickWidth=optsAtIndex.tickWidth;\n            const tickColor=optsAtIndex.tickColor;\n            const tickBorderDash=optsAtIndex.tickBorderDash||[];\n            const tickBorderDashOffset=optsAtIndex.tickBorderDashOffset;\n            lineValue=getPixelForGridLine(this, i, offset);\n            if(lineValue===undefined){\n                continue;\n            }\n            alignedLineValue=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, lineValue, lineWidth);\n            if(isHorizontal){\n                tx1=tx2=x1=x2=alignedLineValue;\n            }else{\n                ty1=ty2=y1=y2=alignedLineValue;\n            }\n            items.push({\n                tx1,\n                ty1,\n                tx2,\n                ty2,\n                x1,\n                y1,\n                x2,\n                y2,\n                width: lineWidth,\n                color: lineColor,\n                borderDash,\n                borderDashOffset,\n                tickWidth,\n                tickColor,\n                tickBorderDash,\n                tickBorderDashOffset\n            });\n        }\n        this._ticksLength=ticksLength;\n        this._borderValue=borderValue;\n        return items;\n    }\n _computeLabelItems(chartArea){\n        const axis=this.axis;\n        const options=this.options;\n        const { position , ticks: optionTicks  }=options;\n        const isHorizontal=this.isHorizontal();\n        const ticks=this.ticks;\n        const { align , crossAlign , padding , mirror  }=optionTicks;\n        const tl=getTickMarkLength(options.grid);\n        const tickAndPadding=tl + padding;\n        const hTickAndPadding=mirror ? -padding:tickAndPadding;\n        const rotation=-(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.labelRotation);\n        const items=[];\n        let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n        let textBaseline='middle';\n        if(position==='top'){\n            y=this.bottom - hTickAndPadding;\n            textAlign=this._getXAxisLabelAlignment();\n        }else if(position==='bottom'){\n            y=this.top + hTickAndPadding;\n            textAlign=this._getXAxisLabelAlignment();\n        }else if(position==='left'){\n            const ret=this._getYAxisLabelAlignment(tl);\n            textAlign=ret.textAlign;\n            x=ret.x;\n        }else if(position==='right'){\n            const ret=this._getYAxisLabelAlignment(tl);\n            textAlign=ret.textAlign;\n            x=ret.x;\n        }else if(axis==='x'){\n            if(position==='center'){\n                y=(chartArea.top + chartArea.bottom) / 2 + tickAndPadding;\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n                const positionAxisID=Object.keys(position)[0];\n                const value=position[positionAxisID];\n                y=this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n            }\n            textAlign=this._getXAxisLabelAlignment();\n        }else if(axis==='y'){\n            if(position==='center'){\n                x=(chartArea.left + chartArea.right) / 2 - tickAndPadding;\n            }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n                const positionAxisID=Object.keys(position)[0];\n                const value=position[positionAxisID];\n                x=this.chart.scales[positionAxisID].getPixelForValue(value);\n            }\n            textAlign=this._getYAxisLabelAlignment(tl).textAlign;\n        }\n        if(axis==='y'){\n            if(align==='start'){\n                textBaseline='top';\n            }else if(align==='end'){\n                textBaseline='bottom';\n            }\n        }\n        const labelSizes=this._getLabelSizes();\n        for(i=0, ilen=ticks.length; i < ilen; ++i){\n            tick=ticks[i];\n            label=tick.label;\n            const optsAtIndex=optionTicks.setContext(this.getContext(i));\n            pixel=this.getPixelForTick(i) + optionTicks.labelOffset;\n            font=this._resolveTickFontOptions(i);\n            lineHeight=font.lineHeight;\n            lineCount=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(label) ? label.length:1;\n            const halfCount=lineCount / 2;\n            const color=optsAtIndex.color;\n            const strokeColor=optsAtIndex.textStrokeColor;\n            const strokeWidth=optsAtIndex.textStrokeWidth;\n            let tickTextAlign=textAlign;\n            if(isHorizontal){\n                x=pixel;\n                if(textAlign==='inner'){\n                    if(i===ilen - 1){\n                        tickTextAlign = !this.options.reverse ? 'right':'left';\n                    }else if(i===0){\n                        tickTextAlign = !this.options.reverse ? 'left':'right';\n                    }else{\n                        tickTextAlign='center';\n                    }\n                }\n                if(position==='top'){\n                    if(crossAlign==='near'||rotation!==0){\n                        textOffset=-lineCount * lineHeight + lineHeight / 2;\n                    }else if(crossAlign==='center'){\n                        textOffset=-labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n                    }else{\n                        textOffset=-labelSizes.highest.height + lineHeight / 2;\n                    }\n                }else{\n                    if(crossAlign==='near'||rotation!==0){\n                        textOffset=lineHeight / 2;\n                    }else if(crossAlign==='center'){\n                        textOffset=labelSizes.highest.height / 2 - halfCount * lineHeight;\n                    }else{\n                        textOffset=labelSizes.highest.height - lineCount * lineHeight;\n                    }\n                }\n                if(mirror){\n                    textOffset *=-1;\n                }\n                if(rotation!==0&&!optsAtIndex.showLabelBackdrop){\n                    x +=lineHeight / 2 * Math.sin(rotation);\n                }\n            }else{\n                y=pixel;\n                textOffset=(1 - lineCount) * lineHeight / 2;\n            }\n            let backdrop;\n            if(optsAtIndex.showLabelBackdrop){\n                const labelPadding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(optsAtIndex.backdropPadding);\n                const height=labelSizes.heights[i];\n                const width=labelSizes.widths[i];\n                let top=textOffset - labelPadding.top;\n                let left=0 - labelPadding.left;\n                switch(textBaseline){\n                    case 'middle':\n                        top -=height / 2;\n                        break;\n                    case 'bottom':\n                        top -=height;\n                        break;\n                }\n                switch(textAlign){\n                    case 'center':\n                        left -=width / 2;\n                        break;\n                    case 'right':\n                        left -=width;\n                        break;\n                }\n                backdrop={\n                    left,\n                    top,\n                    width: width + labelPadding.width,\n                    height: height + labelPadding.height,\n                    color: optsAtIndex.backdropColor\n                };\n            }\n            items.push({\n                label,\n                font,\n                textOffset,\n                options: {\n                    rotation,\n                    color,\n                    strokeColor,\n                    strokeWidth,\n                    textAlign: tickTextAlign,\n                    textBaseline,\n                    translation: [\n                        x,\n                        y\n                    ],\n                    backdrop\n                }\n            });\n        }\n        return items;\n    }\n    _getXAxisLabelAlignment(){\n        const { position , ticks  }=this.options;\n        const rotation=-(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.labelRotation);\n        if(rotation){\n            return position==='top' ? 'left':'right';\n        }\n        let align='center';\n        if(ticks.align==='start'){\n            align='left';\n        }else if(ticks.align==='end'){\n            align='right';\n        }else if(ticks.align==='inner'){\n            align='inner';\n        }\n        return align;\n    }\n    _getYAxisLabelAlignment(tl){\n        const { position , ticks: { crossAlign , mirror , padding  }}=this.options;\n        const labelSizes=this._getLabelSizes();\n        const tickAndPadding=tl + padding;\n        const widest=labelSizes.widest.width;\n        let textAlign;\n        let x;\n        if(position==='left'){\n            if(mirror){\n                x=this.right + padding;\n                if(crossAlign==='near'){\n                    textAlign='left';\n                }else if(crossAlign==='center'){\n                    textAlign='center';\n                    x +=widest / 2;\n                }else{\n                    textAlign='right';\n                    x +=widest;\n                }\n            }else{\n                x=this.right - tickAndPadding;\n                if(crossAlign==='near'){\n                    textAlign='right';\n                }else if(crossAlign==='center'){\n                    textAlign='center';\n                    x -=widest / 2;\n                }else{\n                    textAlign='left';\n                    x=this.left;\n                }\n            }\n        }else if(position==='right'){\n            if(mirror){\n                x=this.left + padding;\n                if(crossAlign==='near'){\n                    textAlign='right';\n                }else if(crossAlign==='center'){\n                    textAlign='center';\n                    x -=widest / 2;\n                }else{\n                    textAlign='left';\n                    x -=widest;\n                }\n            }else{\n                x=this.left + tickAndPadding;\n                if(crossAlign==='near'){\n                    textAlign='left';\n                }else if(crossAlign==='center'){\n                    textAlign='center';\n                    x +=widest / 2;\n                }else{\n                    textAlign='right';\n                    x=this.right;\n                }\n            }\n        }else{\n            textAlign='right';\n        }\n        return {\n            textAlign,\n            x\n        };\n    }\n _computeLabelArea(){\n        if(this.options.ticks.mirror){\n            return;\n        }\n        const chart=this.chart;\n        const position=this.options.position;\n        if(position==='left'||position==='right'){\n            return {\n                top: 0,\n                left: this.left,\n                bottom: chart.height,\n                right: this.right\n            };\n        }\n        if(position==='top'||position==='bottom'){\n            return {\n                top: this.top,\n                left: 0,\n                bottom: this.bottom,\n                right: chart.width\n            };\n        }\n    }\n drawBackground(){\n        const { ctx , options: { backgroundColor  } , left , top , width , height  }=this;\n        if(backgroundColor){\n            ctx.save();\n            ctx.fillStyle=backgroundColor;\n            ctx.fillRect(left, top, width, height);\n            ctx.restore();\n        }\n    }\n    getLineWidthForValue(value){\n        const grid=this.options.grid;\n        if(!this._isVisible()||!grid.display){\n            return 0;\n        }\n        const ticks=this.ticks;\n        const index=ticks.findIndex((t)=>t.value===value);\n        if(index >=0){\n            const opts=grid.setContext(this.getContext(index));\n            return opts.lineWidth;\n        }\n        return 0;\n    }\n drawGrid(chartArea){\n        const grid=this.options.grid;\n        const ctx=this.ctx;\n        const items=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(chartArea));\n        let i, ilen;\n        const drawLine=(p1, p2, style)=>{\n            if(!style.width||!style.color){\n                return;\n            }\n            ctx.save();\n            ctx.lineWidth=style.width;\n            ctx.strokeStyle=style.color;\n            ctx.setLineDash(style.borderDash||[]);\n            ctx.lineDashOffset=style.borderDashOffset;\n            ctx.beginPath();\n            ctx.moveTo(p1.x, p1.y);\n            ctx.lineTo(p2.x, p2.y);\n            ctx.stroke();\n            ctx.restore();\n        };\n        if(grid.display){\n            for(i=0, ilen=items.length; i < ilen; ++i){\n                const item=items[i];\n                if(grid.drawOnChartArea){\n                    drawLine({\n                        x: item.x1,\n                        y: item.y1\n                    }, {\n                        x: item.x2,\n                        y: item.y2\n                    }, item);\n                }\n                if(grid.drawTicks){\n                    drawLine({\n                        x: item.tx1,\n                        y: item.ty1\n                    }, {\n                        x: item.tx2,\n                        y: item.ty2\n                    }, {\n                        color: item.tickColor,\n                        width: item.tickWidth,\n                        borderDash: item.tickBorderDash,\n                        borderDashOffset: item.tickBorderDashOffset\n                    });\n                }\n            }\n        }\n    }\n drawBorder(){\n        const { chart , ctx , options: { border , grid  }}=this;\n        const borderOpts=border.setContext(this.getContext());\n        const axisWidth=border.display ? borderOpts.width:0;\n        if(!axisWidth){\n            return;\n        }\n        const lastLineWidth=grid.setContext(this.getContext(0)).lineWidth;\n        const borderValue=this._borderValue;\n        let x1, x2, y1, y2;\n        if(this.isHorizontal()){\n            x1=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, this.left, axisWidth) - axisWidth / 2;\n            x2=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n            y1=y2=borderValue;\n        }else{\n            y1=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, this.top, axisWidth) - axisWidth / 2;\n            y2=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.X)(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n            x1=x2=borderValue;\n        }\n        ctx.save();\n        ctx.lineWidth=borderOpts.width;\n        ctx.strokeStyle=borderOpts.color;\n        ctx.beginPath();\n        ctx.moveTo(x1, y1);\n        ctx.lineTo(x2, y2);\n        ctx.stroke();\n        ctx.restore();\n    }\n drawLabels(chartArea){\n        const optionTicks=this.options.ticks;\n        if(!optionTicks.display){\n            return;\n        }\n        const ctx=this.ctx;\n        const area=this._computeLabelArea();\n        if(area){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Y)(ctx, area);\n        }\n        const items=this.getLabelItems(chartArea);\n        for (const item of items){\n            const renderTextOptions=item.options;\n            const tickFont=item.font;\n            const label=item.label;\n            const y=item.textOffset;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, label, 0, y, tickFont, renderTextOptions);\n        }\n        if(area){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.$)(ctx);\n        }\n    }\n drawTitle(){\n        const { ctx , options: { position , title , reverse  }}=this;\n        if(!title.display){\n            return;\n        }\n        const font=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(title.font);\n        const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(title.padding);\n        const align=title.align;\n        let offset=font.lineHeight / 2;\n        if(position==='bottom'||position==='center'||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(position)){\n            offset +=padding.bottom;\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(title.text)){\n                offset +=font.lineHeight * (title.text.length - 1);\n            }\n        }else{\n            offset +=padding.top;\n        }\n        const { titleX , titleY , maxWidth , rotation  }=titleArgs(this, offset, position, align);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, title.text, 0, 0, font, {\n            color: title.color,\n            maxWidth,\n            rotation,\n            textAlign: titleAlign(align, position, reverse),\n            textBaseline: 'middle',\n            translation: [\n                titleX,\n                titleY\n            ]\n        });\n    }\n    draw(chartArea){\n        if(!this._isVisible()){\n            return;\n        }\n        this.drawBackground();\n        this.drawGrid(chartArea);\n        this.drawBorder();\n        this.drawTitle();\n        this.drawLabels(chartArea);\n    }\n _layers(){\n        const opts=this.options;\n        const tz=opts.ticks&&opts.ticks.z||0;\n        const gz=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(opts.grid&&opts.grid.z, -1);\n        const bz=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(opts.border&&opts.border.z, 0);\n        if(!this._isVisible()||this.draw!==Scale.prototype.draw){\n            return [\n                {\n                    z: tz,\n                    draw: (chartArea)=>{\n                        this.draw(chartArea);\n                    }\n                }\n            ];\n        }\n        return [\n            {\n                z: gz,\n                draw: (chartArea)=>{\n                    this.drawBackground();\n                    this.drawGrid(chartArea);\n                    this.drawTitle();\n                }\n            },\n            {\n                z: bz,\n                draw: ()=>{\n                    this.drawBorder();\n                }\n            },\n            {\n                z: tz,\n                draw: (chartArea)=>{\n                    this.drawLabels(chartArea);\n                }\n            }\n        ];\n    }\n getMatchingVisibleMetas(type){\n        const metas=this.chart.getSortedVisibleDatasetMetas();\n        const axisID=this.axis + 'AxisID';\n        const result=[];\n        let i, ilen;\n        for(i=0, ilen=metas.length; i < ilen; ++i){\n            const meta=metas[i];\n            if(meta[axisID]===this.id&&(!type||meta.type===type)){\n                result.push(meta);\n            }\n        }\n        return result;\n    }\n _resolveTickFontOptions(index){\n        const opts=this.options.ticks.setContext(this.getContext(index));\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(opts.font);\n    }\n _maxDigits(){\n        const fontSize=this._resolveTickFontOptions(0).lineHeight;\n        return (this.isHorizontal() ? this.width:this.height) / fontSize;\n    }\n}\n\nclass TypedRegistry {\n    constructor(type, scope, override){\n        this.type=type;\n        this.scope=scope;\n        this.override=override;\n        this.items=Object.create(null);\n    }\n    isForType(type){\n        return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n    }\n register(item){\n        const proto=Object.getPrototypeOf(item);\n        let parentScope;\n        if(isIChartComponent(proto)){\n            parentScope=this.register(proto);\n        }\n        const items=this.items;\n        const id=item.id;\n        const scope=this.scope + '.' + id;\n        if(!id){\n            throw new Error('class does not have id: ' + item);\n        }\n        if(id in items){\n            return scope;\n        }\n        items[id]=item;\n        registerDefaults(item, scope, parentScope);\n        if(this.override){\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.override(item.id, item.overrides);\n        }\n        return scope;\n    }\n get(id){\n        return this.items[id];\n    }\n unregister(item){\n        const items=this.items;\n        const id=item.id;\n        const scope=this.scope;\n        if(id in items){\n            delete items[id];\n        }\n        if(scope&&id in _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d[scope]){\n            delete _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d[scope][id];\n            if(this.override){\n                delete _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3[id];\n            }\n        }\n    }\n}\nfunction registerDefaults(item, scope, parentScope){\n    const itemDefaults=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a4)(Object.create(null), [\n        parentScope ? _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.get(parentScope):{},\n        _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.get(scope),\n        item.defaults\n    ]);\n    _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.set(scope, itemDefaults);\n    if(item.defaultRoutes){\n        routeDefaults(scope, item.defaultRoutes);\n    }\n    if(item.descriptors){\n        _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.describe(scope, item.descriptors);\n    }\n}\nfunction routeDefaults(scope, routes){\n    Object.keys(routes).forEach((property)=>{\n        const propertyParts=property.split('.');\n        const sourceName=propertyParts.pop();\n        const sourceScope=[\n            scope\n        ].concat(propertyParts).join('.');\n        const parts=routes[property].split('.');\n        const targetName=parts.pop();\n        const targetScope=parts.join('.');\n        _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.route(sourceScope, sourceName, targetScope, targetName);\n    });\n}\nfunction isIChartComponent(proto){\n    return 'id' in proto&&'defaults' in proto;\n}\n\nclass Registry {\n    constructor(){\n        this.controllers=new TypedRegistry(DatasetController, 'datasets', true);\n        this.elements=new TypedRegistry(Element, 'elements');\n        this.plugins=new TypedRegistry(Object, 'plugins');\n        this.scales=new TypedRegistry(Scale, 'scales');\n        this._typedRegistries=[\n            this.controllers,\n            this.scales,\n            this.elements\n        ];\n    }\n add(...args){\n        this._each('register', args);\n    }\n    remove(...args){\n        this._each('unregister', args);\n    }\n addControllers(...args){\n        this._each('register', args, this.controllers);\n    }\n addElements(...args){\n        this._each('register', args, this.elements);\n    }\n addPlugins(...args){\n        this._each('register', args, this.plugins);\n    }\n addScales(...args){\n        this._each('register', args, this.scales);\n    }\n getController(id){\n        return this._get(id, this.controllers, 'controller');\n    }\n getElement(id){\n        return this._get(id, this.elements, 'element');\n    }\n getPlugin(id){\n        return this._get(id, this.plugins, 'plugin');\n    }\n getScale(id){\n        return this._get(id, this.scales, 'scale');\n    }\n removeControllers(...args){\n        this._each('unregister', args, this.controllers);\n    }\n removeElements(...args){\n        this._each('unregister', args, this.elements);\n    }\n removePlugins(...args){\n        this._each('unregister', args, this.plugins);\n    }\n removeScales(...args){\n        this._each('unregister', args, this.scales);\n    }\n _each(method, args, typedRegistry){\n        [\n            ...args\n        ].forEach((arg)=>{\n            const reg=typedRegistry||this._getRegistryForType(arg);\n            if(typedRegistry||reg.isForType(arg)||reg===this.plugins&&arg.id){\n                this._exec(method, reg, arg);\n            }else{\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(arg, (item)=>{\n                    const itemReg=typedRegistry||this._getRegistryForType(item);\n                    this._exec(method, itemReg, item);\n                });\n            }\n        });\n    }\n _exec(method, registry, component){\n        const camelMethod=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a5)(method);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(component['before' + camelMethod], [], component);\n        registry[method](component);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(component['after' + camelMethod], [], component);\n    }\n _getRegistryForType(type){\n        for(let i=0; i < this._typedRegistries.length; i++){\n            const reg=this._typedRegistries[i];\n            if(reg.isForType(type)){\n                return reg;\n            }\n        }\n        return this.plugins;\n    }\n _get(id, typedRegistry, type){\n        const item=typedRegistry.get(id);\n        if(item===undefined){\n            throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n        }\n        return item;\n    }\n}\nvar registry=/* #__PURE__ */ new Registry();\n\nclass PluginService {\n    constructor(){\n        this._init=[];\n    }\n notify(chart, hook, args, filter){\n        if(hook==='beforeInit'){\n            this._init=this._createDescriptors(chart, true);\n            this._notify(this._init, chart, 'install');\n        }\n        const descriptors=filter ? this._descriptors(chart).filter(filter):this._descriptors(chart);\n        const result=this._notify(descriptors, chart, hook, args);\n        if(hook==='afterDestroy'){\n            this._notify(descriptors, chart, 'stop');\n            this._notify(this._init, chart, 'uninstall');\n        }\n        return result;\n    }\n _notify(descriptors, chart, hook, args){\n        args=args||{};\n        for (const descriptor of descriptors){\n            const plugin=descriptor.plugin;\n            const method=plugin[hook];\n            const params=[\n                chart,\n                args,\n                descriptor.options\n            ];\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(method, params, plugin)===false&&args.cancelable){\n                return false;\n            }\n        }\n        return true;\n    }\n    invalidate(){\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(this._cache)){\n            this._oldCache=this._cache;\n            this._cache=undefined;\n        }\n    }\n _descriptors(chart){\n        if(this._cache){\n            return this._cache;\n        }\n        const descriptors=this._cache=this._createDescriptors(chart);\n        this._notifyStateChanges(chart);\n        return descriptors;\n    }\n    _createDescriptors(chart, all){\n        const config=chart&&chart.config;\n        const options=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(config.options&&config.options.plugins, {});\n        const plugins=allPlugins(config);\n        return options===false&&!all ? []:createDescriptors(chart, plugins, options, all);\n    }\n _notifyStateChanges(chart){\n        const previousDescriptors=this._oldCache||[];\n        const descriptors=this._cache;\n        const diff=(a, b)=>a.filter((x)=>!b.some((y)=>x.plugin.id===y.plugin.id));\n        this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n        this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n    }\n}\n function allPlugins(config){\n    const localIds={};\n    const plugins=[];\n    const keys=Object.keys(registry.plugins.items);\n    for(let i=0; i < keys.length; i++){\n        plugins.push(registry.getPlugin(keys[i]));\n    }\n    const local=config.plugins||[];\n    for(let i=0; i < local.length; i++){\n        const plugin=local[i];\n        if(plugins.indexOf(plugin)===-1){\n            plugins.push(plugin);\n            localIds[plugin.id]=true;\n        }\n    }\n    return {\n        plugins,\n        localIds\n    };\n}\nfunction getOpts(options, all){\n    if(!all&&options===false){\n        return null;\n    }\n    if(options===true){\n        return {};\n    }\n    return options;\n}\nfunction createDescriptors(chart, { plugins , localIds  }, options, all){\n    const result=[];\n    const context=chart.getContext();\n    for (const plugin of plugins){\n        const id=plugin.id;\n        const opts=getOpts(options[id], all);\n        if(opts===null){\n            continue;\n        }\n        result.push({\n            plugin,\n            options: pluginOpts(chart.config, {\n                plugin,\n                local: localIds[id]\n            }, opts, context)\n        });\n    }\n    return result;\n}\nfunction pluginOpts(config, { plugin , local  }, opts, context){\n    const keys=config.pluginScopeKeys(plugin);\n    const scopes=config.getOptionScopes(opts, keys);\n    if(local&&plugin.defaults){\n        scopes.push(plugin.defaults);\n    }\n    return config.createResolver(scopes, context, [\n        ''\n    ], {\n        scriptable: false,\n        indexable: false,\n        allKeys: true\n    });\n}\n\nfunction getIndexAxis(type, options){\n    const datasetDefaults=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.datasets[type]||{};\n    const datasetOptions=(options.datasets||{})[type]||{};\n    return datasetOptions.indexAxis||options.indexAxis||datasetDefaults.indexAxis||'x';\n}\nfunction getAxisFromDefaultScaleID(id, indexAxis){\n    let axis=id;\n    if(id==='_index_'){\n        axis=indexAxis;\n    }else if(id==='_value_'){\n        axis=indexAxis==='x' ? 'y':'x';\n    }\n    return axis;\n}\nfunction getDefaultScaleIDFromAxis(axis, indexAxis){\n    return axis===indexAxis ? '_index_':'_value_';\n}\nfunction idMatchesAxis(id){\n    if(id==='x'||id==='y'||id==='r'){\n        return id;\n    }\n}\nfunction axisFromPosition(position){\n    if(position==='top'||position==='bottom'){\n        return 'x';\n    }\n    if(position==='left'||position==='right'){\n        return 'y';\n    }\n}\nfunction determineAxis(id, ...scaleOptions){\n    if(idMatchesAxis(id)){\n        return id;\n    }\n    for (const opts of scaleOptions){\n        const axis=opts.axis||axisFromPosition(opts.position)||id.length > 1&&idMatchesAxis(id[0].toLowerCase());\n        if(axis){\n            return axis;\n        }\n    }\n    throw new Error(`Cannot determine type of '${id}' axis. Please provide 'axis' or 'position' option.`);\n}\nfunction getAxisFromDataset(id, axis, dataset){\n    if(dataset[axis + 'AxisID']===id){\n        return {\n            axis\n        };\n    }\n}\nfunction retrieveAxisFromDatasets(id, config){\n    if(config.data&&config.data.datasets){\n        const boundDs=config.data.datasets.filter((d)=>d.xAxisID===id||d.yAxisID===id);\n        if(boundDs.length){\n            return getAxisFromDataset(id, 'x', boundDs[0])||getAxisFromDataset(id, 'y', boundDs[0]);\n        }\n    }\n    return {};\n}\nfunction mergeScaleConfig(config, options){\n    const chartDefaults=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3[config.type]||{\n        scales: {}\n    };\n    const configScales=options.scales||{};\n    const chartIndexAxis=getIndexAxis(config.type, options);\n    const scales=Object.create(null);\n    Object.keys(configScales).forEach((id)=>{\n        const scaleConf=configScales[id];\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(scaleConf)){\n            return console.error(`Invalid scale configuration for scale: ${id}`);\n        }\n        if(scaleConf._proxy){\n            return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n        }\n        const axis=determineAxis(id, scaleConf, retrieveAxisFromDatasets(id, config), _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.scales[scaleConf.type]);\n        const defaultId=getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n        const defaultScaleOptions=chartDefaults.scales||{};\n        scales[id]=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ab)(Object.create(null), [\n            {\n                axis\n            },\n            scaleConf,\n            defaultScaleOptions[axis],\n            defaultScaleOptions[defaultId]\n        ]);\n    });\n    config.data.datasets.forEach((dataset)=>{\n        const type=dataset.type||config.type;\n        const indexAxis=dataset.indexAxis||getIndexAxis(type, options);\n        const datasetDefaults=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3[type]||{};\n        const defaultScaleOptions=datasetDefaults.scales||{};\n        Object.keys(defaultScaleOptions).forEach((defaultID)=>{\n            const axis=getAxisFromDefaultScaleID(defaultID, indexAxis);\n            const id=dataset[axis + 'AxisID']||axis;\n            scales[id]=scales[id]||Object.create(null);\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ab)(scales[id], [\n                {\n                    axis\n                },\n                configScales[id],\n                defaultScaleOptions[defaultID]\n            ]);\n        });\n    });\n    Object.keys(scales).forEach((key)=>{\n        const scale=scales[key];\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ab)(scale, [\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.scales[scale.type],\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.scale\n        ]);\n    });\n    return scales;\n}\nfunction initOptions(config){\n    const options=config.options||(config.options={});\n    options.plugins=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(options.plugins, {});\n    options.scales=mergeScaleConfig(config, options);\n}\nfunction initData(data){\n    data=data||{};\n    data.datasets=data.datasets||[];\n    data.labels=data.labels||[];\n    return data;\n}\nfunction initConfig(config){\n    config=config||{};\n    config.data=initData(config.data);\n    initOptions(config);\n    return config;\n}\nconst keyCache=new Map();\nconst keysCached=new Set();\nfunction cachedKeys(cacheKey, generate){\n    let keys=keyCache.get(cacheKey);\n    if(!keys){\n        keys=generate();\n        keyCache.set(cacheKey, keys);\n        keysCached.add(keys);\n    }\n    return keys;\n}\nconst addIfFound=(set, obj, key)=>{\n    const opts=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.f)(obj, key);\n    if(opts!==undefined){\n        set.add(opts);\n    }\n};\nclass Config {\n    constructor(config){\n        this._config=initConfig(config);\n        this._scopeCache=new Map();\n        this._resolverCache=new Map();\n    }\n    get platform(){\n        return this._config.platform;\n    }\n    get type(){\n        return this._config.type;\n    }\n    set type(type){\n        this._config.type=type;\n    }\n    get data(){\n        return this._config.data;\n    }\n    set data(data){\n        this._config.data=initData(data);\n    }\n    get options(){\n        return this._config.options;\n    }\n    set options(options){\n        this._config.options=options;\n    }\n    get plugins(){\n        return this._config.plugins;\n    }\n    update(){\n        const config=this._config;\n        this.clearCache();\n        initOptions(config);\n    }\n    clearCache(){\n        this._scopeCache.clear();\n        this._resolverCache.clear();\n    }\n datasetScopeKeys(datasetType){\n        return cachedKeys(datasetType, ()=>[\n                [\n                    `datasets.${datasetType}`,\n                    ''\n                ]\n            ]);\n    }\n datasetAnimationScopeKeys(datasetType, transition){\n        return cachedKeys(`${datasetType}.transition.${transition}`, ()=>[\n                [\n                    `datasets.${datasetType}.transitions.${transition}`,\n                    `transitions.${transition}`\n                ],\n                [\n                    `datasets.${datasetType}`,\n                    ''\n                ]\n            ]);\n    }\n datasetElementScopeKeys(datasetType, elementType){\n        return cachedKeys(`${datasetType}-${elementType}`, ()=>[\n                [\n                    `datasets.${datasetType}.elements.${elementType}`,\n                    `datasets.${datasetType}`,\n                    `elements.${elementType}`,\n                    ''\n                ]\n            ]);\n    }\n pluginScopeKeys(plugin){\n        const id=plugin.id;\n        const type=this.type;\n        return cachedKeys(`${type}-plugin-${id}`, ()=>[\n                [\n                    `plugins.${id}`,\n                    ...plugin.additionalOptionScopes||[]\n                ]\n            ]);\n    }\n _cachedScopes(mainScope, resetCache){\n        const _scopeCache=this._scopeCache;\n        let cache=_scopeCache.get(mainScope);\n        if(!cache||resetCache){\n            cache=new Map();\n            _scopeCache.set(mainScope, cache);\n        }\n        return cache;\n    }\n getOptionScopes(mainScope, keyLists, resetCache){\n        const { options , type  }=this;\n        const cache=this._cachedScopes(mainScope, resetCache);\n        const cached=cache.get(keyLists);\n        if(cached){\n            return cached;\n        }\n        const scopes=new Set();\n        keyLists.forEach((keys)=>{\n            if(mainScope){\n                scopes.add(mainScope);\n                keys.forEach((key)=>addIfFound(scopes, mainScope, key));\n            }\n            keys.forEach((key)=>addIfFound(scopes, options, key));\n            keys.forEach((key)=>addIfFound(scopes, _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3[type]||{}, key));\n            keys.forEach((key)=>addIfFound(scopes, _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d, key));\n            keys.forEach((key)=>addIfFound(scopes, _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a6, key));\n        });\n        const array=Array.from(scopes);\n        if(array.length===0){\n            array.push(Object.create(null));\n        }\n        if(keysCached.has(keyLists)){\n            cache.set(keyLists, array);\n        }\n        return array;\n    }\n chartOptionScopes(){\n        const { options , type  }=this;\n        return [\n            options,\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3[type]||{},\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.datasets[type]||{},\n            {\n                type\n            },\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d,\n            _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a6\n        ];\n    }\n resolveNamedOptions(scopes, names, context, prefixes=[\n        ''\n    ]){\n        const result={\n            $shared: true\n        };\n        const { resolver , subPrefixes  }=getResolver(this._resolverCache, scopes, prefixes);\n        let options=resolver;\n        if(needContext(resolver, names)){\n            result.$shared=false;\n            context=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a7)(context) ? context():context;\n            const subResolver=this.createResolver(scopes, context, subPrefixes);\n            options=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a8)(resolver, context, subResolver);\n        }\n        for (const prop of names){\n            result[prop]=options[prop];\n        }\n        return result;\n    }\n createResolver(scopes, context, prefixes=[\n        ''\n    ], descriptorDefaults){\n        const { resolver  }=getResolver(this._resolverCache, scopes, prefixes);\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(context) ? (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a8)(resolver, context, undefined, descriptorDefaults):resolver;\n    }\n}\nfunction getResolver(resolverCache, scopes, prefixes){\n    let cache=resolverCache.get(scopes);\n    if(!cache){\n        cache=new Map();\n        resolverCache.set(scopes, cache);\n    }\n    const cacheKey=prefixes.join();\n    let cached=cache.get(cacheKey);\n    if(!cached){\n        const resolver=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a9)(scopes, prefixes);\n        cached={\n            resolver,\n            subPrefixes: prefixes.filter((p)=>!p.toLowerCase().includes('hover'))\n        };\n        cache.set(cacheKey, cached);\n    }\n    return cached;\n}\nconst hasFunction=(value)=>(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(value)&&Object.getOwnPropertyNames(value).reduce((acc, key)=>acc||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a7)(value[key]), false);\nfunction needContext(proxy, names){\n    const { isScriptable , isIndexable  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aa)(proxy);\n    for (const prop of names){\n        const scriptable=isScriptable(prop);\n        const indexable=isIndexable(prop);\n        const value=(indexable||scriptable)&&proxy[prop];\n        if(scriptable&&((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a7)(value)||hasFunction(value))||indexable&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(value)){\n            return true;\n        }\n    }\n    return false;\n}\n\nvar version=\"4.3.3\";\n\nconst KNOWN_POSITIONS=[\n    'top',\n    'bottom',\n    'left',\n    'right',\n    'chartArea'\n];\nfunction positionIsHorizontal(position, axis){\n    return position==='top'||position==='bottom'||KNOWN_POSITIONS.indexOf(position)===-1&&axis==='x';\n}\nfunction compare2Level(l1, l2){\n    return function(a, b){\n        return a[l1]===b[l1] ? a[l2] - b[l2]:a[l1] - b[l1];\n    };\n}\nfunction onAnimationsComplete(context){\n    const chart=context.chart;\n    const animationOptions=chart.options.animation;\n    chart.notifyPlugins('afterRender');\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(animationOptions&&animationOptions.onComplete, [\n        context\n    ], chart);\n}\nfunction onAnimationProgress(context){\n    const chart=context.chart;\n    const animationOptions=chart.options.animation;\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(animationOptions&&animationOptions.onProgress, [\n        context\n    ], chart);\n}\n function getCanvas(item){\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.M)()&&typeof item==='string'){\n        item=document.getElementById(item);\n    }else if(item&&item.length){\n        item=item[0];\n    }\n    if(item&&item.canvas){\n        item=item.canvas;\n    }\n    return item;\n}\nconst instances={};\nconst getChart=(key)=>{\n    const canvas=getCanvas(key);\n    return Object.values(instances).filter((c)=>c.canvas===canvas).pop();\n};\nfunction moveNumericKeys(obj, start, move){\n    const keys=Object.keys(obj);\n    for (const key of keys){\n        const intKey=+key;\n        if(intKey >=start){\n            const value=obj[key];\n            delete obj[key];\n            if(move > 0||intKey > start){\n                obj[intKey + move]=value;\n            }\n        }\n    }\n}\n function determineLastEvent(e, lastEvent, inChartArea, isClick){\n    if(!inChartArea||e.type==='mouseout'){\n        return null;\n    }\n    if(isClick){\n        return lastEvent;\n    }\n    return e;\n}\nfunction getDatasetArea(meta){\n    const { xScale , yScale  }=meta;\n    if(xScale&&yScale){\n        return {\n            left: xScale.left,\n            right: xScale.right,\n            top: yScale.top,\n            bottom: yScale.bottom\n        };\n    }\n}\nclass Chart {\n    static defaults=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d;\n    static instances=instances;\n    static overrides=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a3;\n    static registry=registry;\n    static version=version;\n    static getChart=getChart;\n    static register(...items){\n        registry.add(...items);\n        invalidatePlugins();\n    }\n    static unregister(...items){\n        registry.remove(...items);\n        invalidatePlugins();\n    }\n    constructor(item, userConfig){\n        const config=this.config=new Config(userConfig);\n        const initialCanvas=getCanvas(item);\n        const existingChart=getChart(initialCanvas);\n        if(existingChart){\n            throw new Error('Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' + ' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.');\n        }\n        const options=config.createResolver(config.chartOptionScopes(), this.getContext());\n        this.platform=new (config.platform||_detectPlatform(initialCanvas))();\n        this.platform.updateConfig(config);\n        const context=this.platform.acquireContext(initialCanvas, options.aspectRatio);\n        const canvas=context&&context.canvas;\n        const height=canvas&&canvas.height;\n        const width=canvas&&canvas.width;\n        this.id=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ac)();\n        this.ctx=context;\n        this.canvas=canvas;\n        this.width=width;\n        this.height=height;\n        this._options=options;\n        this._aspectRatio=this.aspectRatio;\n        this._layers=[];\n        this._metasets=[];\n        this._stacks=undefined;\n        this.boxes=[];\n        this.currentDevicePixelRatio=undefined;\n        this.chartArea=undefined;\n        this._active=[];\n        this._lastEvent=undefined;\n        this._listeners={};\n         this._responsiveListeners=undefined;\n        this._sortedMetasets=[];\n        this.scales={};\n        this._plugins=new PluginService();\n        this.$proxies={};\n        this._hiddenIndices={};\n        this.attached=false;\n        this._animationsDisabled=undefined;\n        this.$context=undefined;\n        this._doResize=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ad)((mode)=>this.update(mode), options.resizeDelay||0);\n        this._dataChanges=[];\n        instances[this.id]=this;\n        if(!context||!canvas){\n            console.error(\"Failed to create chart: can't acquire context from the given item\");\n            return;\n        }\n        animator.listen(this, 'complete', onAnimationsComplete);\n        animator.listen(this, 'progress', onAnimationProgress);\n        this._initialize();\n        if(this.attached){\n            this.update();\n        }\n    }\n    get aspectRatio(){\n        const { options: { aspectRatio , maintainAspectRatio  } , width , height , _aspectRatio  }=this;\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(aspectRatio)){\n            return aspectRatio;\n        }\n        if(maintainAspectRatio&&_aspectRatio){\n            return _aspectRatio;\n        }\n        return height ? width / height:null;\n    }\n    get data(){\n        return this.config.data;\n    }\n    set data(data){\n        this.config.data=data;\n    }\n    get options(){\n        return this._options;\n    }\n    set options(options){\n        this.config.options=options;\n    }\n    get registry(){\n        return registry;\n    }\n _initialize(){\n        this.notifyPlugins('beforeInit');\n        if(this.options.responsive){\n            this.resize();\n        }else{\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ae)(this, this.options.devicePixelRatio);\n        }\n        this.bindEvents();\n        this.notifyPlugins('afterInit');\n        return this;\n    }\n    clear(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.af)(this.canvas, this.ctx);\n        return this;\n    }\n    stop(){\n        animator.stop(this);\n        return this;\n    }\n resize(width, height){\n        if(!animator.running(this)){\n            this._resize(width, height);\n        }else{\n            this._resizeBeforeDraw={\n                width,\n                height\n            };\n        }\n    }\n    _resize(width, height){\n        const options=this.options;\n        const canvas=this.canvas;\n        const aspectRatio=options.maintainAspectRatio&&this.aspectRatio;\n        const newSize=this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n        const newRatio=options.devicePixelRatio||this.platform.getDevicePixelRatio();\n        const mode=this.width ? 'resize':'attach';\n        this.width=newSize.width;\n        this.height=newSize.height;\n        this._aspectRatio=this.aspectRatio;\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ae)(this, newRatio, true)){\n            return;\n        }\n        this.notifyPlugins('resize', {\n            size: newSize\n        });\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(options.onResize, [\n            this,\n            newSize\n        ], this);\n        if(this.attached){\n            if(this._doResize(mode)){\n                this.render();\n            }\n        }\n    }\n    ensureScalesHaveIDs(){\n        const options=this.options;\n        const scalesOptions=options.scales||{};\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(scalesOptions, (axisOptions, axisID)=>{\n            axisOptions.id=axisID;\n        });\n    }\n buildOrUpdateScales(){\n        const options=this.options;\n        const scaleOpts=options.scales;\n        const scales=this.scales;\n        const updated=Object.keys(scales).reduce((obj, id)=>{\n            obj[id]=false;\n            return obj;\n        }, {});\n        let items=[];\n        if(scaleOpts){\n            items=items.concat(Object.keys(scaleOpts).map((id)=>{\n                const scaleOptions=scaleOpts[id];\n                const axis=determineAxis(id, scaleOptions);\n                const isRadial=axis==='r';\n                const isHorizontal=axis==='x';\n                return {\n                    options: scaleOptions,\n                    dposition: isRadial ? 'chartArea':isHorizontal ? 'bottom':'left',\n                    dtype: isRadial ? 'radialLinear':isHorizontal ? 'category':'linear'\n                };\n            }));\n        }\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(items, (item)=>{\n            const scaleOptions=item.options;\n            const id=scaleOptions.id;\n            const axis=determineAxis(id, scaleOptions);\n            const scaleType=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(scaleOptions.type, item.dtype);\n            if(scaleOptions.position===undefined||positionIsHorizontal(scaleOptions.position, axis)!==positionIsHorizontal(item.dposition)){\n                scaleOptions.position=item.dposition;\n            }\n            updated[id]=true;\n            let scale=null;\n            if(id in scales&&scales[id].type===scaleType){\n                scale=scales[id];\n            }else{\n                const scaleClass=registry.getScale(scaleType);\n                scale=new scaleClass({\n                    id,\n                    type: scaleType,\n                    ctx: this.ctx,\n                    chart: this\n                });\n                scales[scale.id]=scale;\n            }\n            scale.init(scaleOptions, options);\n        });\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(updated, (hasUpdated, id)=>{\n            if(!hasUpdated){\n                delete scales[id];\n            }\n        });\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(scales, (scale)=>{\n            layouts.configure(this, scale, scale.options);\n            layouts.addBox(this, scale);\n        });\n    }\n _updateMetasets(){\n        const metasets=this._metasets;\n        const numData=this.data.datasets.length;\n        const numMeta=metasets.length;\n        metasets.sort((a, b)=>a.index - b.index);\n        if(numMeta > numData){\n            for(let i=numData; i < numMeta; ++i){\n                this._destroyDatasetMeta(i);\n            }\n            metasets.splice(numData, numMeta - numData);\n        }\n        this._sortedMetasets=metasets.slice(0).sort(compare2Level('order', 'index'));\n    }\n _removeUnreferencedMetasets(){\n        const { _metasets: metasets , data: { datasets  }}=this;\n        if(metasets.length > datasets.length){\n            delete this._stacks;\n        }\n        metasets.forEach((meta, index)=>{\n            if(datasets.filter((x)=>x===meta._dataset).length===0){\n                this._destroyDatasetMeta(index);\n            }\n        });\n    }\n    buildOrUpdateControllers(){\n        const newControllers=[];\n        const datasets=this.data.datasets;\n        let i, ilen;\n        this._removeUnreferencedMetasets();\n        for(i=0, ilen=datasets.length; i < ilen; i++){\n            const dataset=datasets[i];\n            let meta=this.getDatasetMeta(i);\n            const type=dataset.type||this.config.type;\n            if(meta.type&&meta.type!==type){\n                this._destroyDatasetMeta(i);\n                meta=this.getDatasetMeta(i);\n            }\n            meta.type=type;\n            meta.indexAxis=dataset.indexAxis||getIndexAxis(type, this.options);\n            meta.order=dataset.order||0;\n            meta.index=i;\n            meta.label='' + dataset.label;\n            meta.visible=this.isDatasetVisible(i);\n            if(meta.controller){\n                meta.controller.updateIndex(i);\n                meta.controller.linkScales();\n            }else{\n                const ControllerClass=registry.getController(type);\n                const { datasetElementType , dataElementType  }=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.datasets[type];\n                Object.assign(ControllerClass, {\n                    dataElementType: registry.getElement(dataElementType),\n                    datasetElementType: datasetElementType&&registry.getElement(datasetElementType)\n                });\n                meta.controller=new ControllerClass(this, i);\n                newControllers.push(meta.controller);\n            }\n        }\n        this._updateMetasets();\n        return newControllers;\n    }\n _resetElements(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.data.datasets, (dataset, datasetIndex)=>{\n            this.getDatasetMeta(datasetIndex).controller.reset();\n        }, this);\n    }\n reset(){\n        this._resetElements();\n        this.notifyPlugins('reset');\n    }\n    update(mode){\n        const config=this.config;\n        config.update();\n        const options=this._options=config.createResolver(config.chartOptionScopes(), this.getContext());\n        const animsDisabled=this._animationsDisabled = !options.animation;\n        this._updateScales();\n        this._checkEventBindings();\n        this._updateHiddenIndices();\n        this._plugins.invalidate();\n        if(this.notifyPlugins('beforeUpdate', {\n            mode,\n            cancelable: true\n        })===false){\n            return;\n        }\n        const newControllers=this.buildOrUpdateControllers();\n        this.notifyPlugins('beforeElementsUpdate');\n        let minPadding=0;\n        for(let i=0, ilen=this.data.datasets.length; i < ilen; i++){\n            const { controller  }=this.getDatasetMeta(i);\n            const reset = !animsDisabled&&newControllers.indexOf(controller)===-1;\n            controller.buildOrUpdateElements(reset);\n            minPadding=Math.max(+controller.getMaxOverflow(), minPadding);\n        }\n        minPadding=this._minPadding=options.layout.autoPadding ? minPadding:0;\n        this._updateLayout(minPadding);\n        if(!animsDisabled){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(newControllers, (controller)=>{\n                controller.reset();\n            });\n        }\n        this._updateDatasets(mode);\n        this.notifyPlugins('afterUpdate', {\n            mode\n        });\n        this._layers.sort(compare2Level('z', '_idx'));\n        const { _active , _lastEvent  }=this;\n        if(_lastEvent){\n            this._eventHandler(_lastEvent, true);\n        }else if(_active.length){\n            this._updateHoverStyles(_active, _active, true);\n        }\n        this.render();\n    }\n _updateScales(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.scales, (scale)=>{\n            layouts.removeBox(this, scale);\n        });\n        this.ensureScalesHaveIDs();\n        this.buildOrUpdateScales();\n    }\n _checkEventBindings(){\n        const options=this.options;\n        const existingEvents=new Set(Object.keys(this._listeners));\n        const newEvents=new Set(options.events);\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ag)(existingEvents, newEvents)||!!this._responsiveListeners!==options.responsive){\n            this.unbindEvents();\n            this.bindEvents();\n        }\n    }\n _updateHiddenIndices(){\n        const { _hiddenIndices  }=this;\n        const changes=this._getUniformDataChanges()||[];\n        for (const { method , start , count  } of changes){\n            const move=method==='_removeElements' ? -count:count;\n            moveNumericKeys(_hiddenIndices, start, move);\n        }\n    }\n _getUniformDataChanges(){\n        const _dataChanges=this._dataChanges;\n        if(!_dataChanges||!_dataChanges.length){\n            return;\n        }\n        this._dataChanges=[];\n        const datasetCount=this.data.datasets.length;\n        const makeSet=(idx)=>new Set(_dataChanges.filter((c)=>c[0]===idx).map((c, i)=>i + ',' + c.splice(1).join(',')));\n        const changeSet=makeSet(0);\n        for(let i=1; i < datasetCount; i++){\n            if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ag)(changeSet, makeSet(i))){\n                return;\n            }\n        }\n        return Array.from(changeSet).map((c)=>c.split(',')).map((a)=>({\n                method: a[1],\n                start: +a[2],\n                count: +a[3]\n            }));\n    }\n _updateLayout(minPadding){\n        if(this.notifyPlugins('beforeLayout', {\n            cancelable: true\n        })===false){\n            return;\n        }\n        layouts.update(this, this.width, this.height, minPadding);\n        const area=this.chartArea;\n        const noArea=area.width <=0||area.height <=0;\n        this._layers=[];\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.boxes, (box)=>{\n            if(noArea&&box.position==='chartArea'){\n                return;\n            }\n            if(box.configure){\n                box.configure();\n            }\n            this._layers.push(...box._layers());\n        }, this);\n        this._layers.forEach((item, index)=>{\n            item._idx=index;\n        });\n        this.notifyPlugins('afterLayout');\n    }\n _updateDatasets(mode){\n        if(this.notifyPlugins('beforeDatasetsUpdate', {\n            mode,\n            cancelable: true\n        })===false){\n            return;\n        }\n        for(let i=0, ilen=this.data.datasets.length; i < ilen; ++i){\n            this.getDatasetMeta(i).controller.configure();\n        }\n        for(let i=0, ilen=this.data.datasets.length; i < ilen; ++i){\n            this._updateDataset(i, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a7)(mode) ? mode({\n                datasetIndex: i\n            }):mode);\n        }\n        this.notifyPlugins('afterDatasetsUpdate', {\n            mode\n        });\n    }\n _updateDataset(index, mode){\n        const meta=this.getDatasetMeta(index);\n        const args={\n            meta,\n            index,\n            mode,\n            cancelable: true\n        };\n        if(this.notifyPlugins('beforeDatasetUpdate', args)===false){\n            return;\n        }\n        meta.controller._update(mode);\n        args.cancelable=false;\n        this.notifyPlugins('afterDatasetUpdate', args);\n    }\n    render(){\n        if(this.notifyPlugins('beforeRender', {\n            cancelable: true\n        })===false){\n            return;\n        }\n        if(animator.has(this)){\n            if(this.attached&&!animator.running(this)){\n                animator.start(this);\n            }\n        }else{\n            this.draw();\n            onAnimationsComplete({\n                chart: this\n            });\n        }\n    }\n    draw(){\n        let i;\n        if(this._resizeBeforeDraw){\n            const { width , height  }=this._resizeBeforeDraw;\n            this._resize(width, height);\n            this._resizeBeforeDraw=null;\n        }\n        this.clear();\n        if(this.width <=0||this.height <=0){\n            return;\n        }\n        if(this.notifyPlugins('beforeDraw', {\n            cancelable: true\n        })===false){\n            return;\n        }\n        const layers=this._layers;\n        for(i=0; i < layers.length&&layers[i].z <=0; ++i){\n            layers[i].draw(this.chartArea);\n        }\n        this._drawDatasets();\n        for(; i < layers.length; ++i){\n            layers[i].draw(this.chartArea);\n        }\n        this.notifyPlugins('afterDraw');\n    }\n _getSortedDatasetMetas(filterVisible){\n        const metasets=this._sortedMetasets;\n        const result=[];\n        let i, ilen;\n        for(i=0, ilen=metasets.length; i < ilen; ++i){\n            const meta=metasets[i];\n            if(!filterVisible||meta.visible){\n                result.push(meta);\n            }\n        }\n        return result;\n    }\n getSortedVisibleDatasetMetas(){\n        return this._getSortedDatasetMetas(true);\n    }\n _drawDatasets(){\n        if(this.notifyPlugins('beforeDatasetsDraw', {\n            cancelable: true\n        })===false){\n            return;\n        }\n        const metasets=this.getSortedVisibleDatasetMetas();\n        for(let i=metasets.length - 1; i >=0; --i){\n            this._drawDataset(metasets[i]);\n        }\n        this.notifyPlugins('afterDatasetsDraw');\n    }\n _drawDataset(meta){\n        const ctx=this.ctx;\n        const clip=meta._clip;\n        const useClip = !clip.disabled;\n        const area=getDatasetArea(meta)||this.chartArea;\n        const args={\n            meta,\n            index: meta.index,\n            cancelable: true\n        };\n        if(this.notifyPlugins('beforeDatasetDraw', args)===false){\n            return;\n        }\n        if(useClip){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Y)(ctx, {\n                left: clip.left===false ? 0:area.left - clip.left,\n                right: clip.right===false ? this.width:area.right + clip.right,\n                top: clip.top===false ? 0:area.top - clip.top,\n                bottom: clip.bottom===false ? this.height:area.bottom + clip.bottom\n            });\n        }\n        meta.controller.draw();\n        if(useClip){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.$)(ctx);\n        }\n        args.cancelable=false;\n        this.notifyPlugins('afterDatasetDraw', args);\n    }\n isPointInArea(point){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)(point, this.chartArea, this._minPadding);\n    }\n    getElementsAtEventForMode(e, mode, options, useFinalPosition){\n        const method=Interaction.modes[mode];\n        if(typeof method==='function'){\n            return method(this, e, options, useFinalPosition);\n        }\n        return [];\n    }\n    getDatasetMeta(datasetIndex){\n        const dataset=this.data.datasets[datasetIndex];\n        const metasets=this._metasets;\n        let meta=metasets.filter((x)=>x&&x._dataset===dataset).pop();\n        if(!meta){\n            meta={\n                type: null,\n                data: [],\n                dataset: null,\n                controller: null,\n                hidden: null,\n                xAxisID: null,\n                yAxisID: null,\n                order: dataset&&dataset.order||0,\n                index: datasetIndex,\n                _dataset: dataset,\n                _parsed: [],\n                _sorted: false\n            };\n            metasets.push(meta);\n        }\n        return meta;\n    }\n    getContext(){\n        return this.$context||(this.$context=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(null, {\n            chart: this,\n            type: 'chart'\n        }));\n    }\n    getVisibleDatasetCount(){\n        return this.getSortedVisibleDatasetMetas().length;\n    }\n    isDatasetVisible(datasetIndex){\n        const dataset=this.data.datasets[datasetIndex];\n        if(!dataset){\n            return false;\n        }\n        const meta=this.getDatasetMeta(datasetIndex);\n        return typeof meta.hidden==='boolean' ? !meta.hidden:!dataset.hidden;\n    }\n    setDatasetVisibility(datasetIndex, visible){\n        const meta=this.getDatasetMeta(datasetIndex);\n        meta.hidden = !visible;\n    }\n    toggleDataVisibility(index){\n        this._hiddenIndices[index] = !this._hiddenIndices[index];\n    }\n    getDataVisibility(index){\n        return !this._hiddenIndices[index];\n    }\n _updateVisibility(datasetIndex, dataIndex, visible){\n        const mode=visible ? 'show':'hide';\n        const meta=this.getDatasetMeta(datasetIndex);\n        const anims=meta.controller._resolveAnimations(undefined, mode);\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.h)(dataIndex)){\n            meta.data[dataIndex].hidden = !visible;\n            this.update();\n        }else{\n            this.setDatasetVisibility(datasetIndex, visible);\n            anims.update(meta, {\n                visible\n            });\n            this.update((ctx)=>ctx.datasetIndex===datasetIndex ? mode:undefined);\n        }\n    }\n    hide(datasetIndex, dataIndex){\n        this._updateVisibility(datasetIndex, dataIndex, false);\n    }\n    show(datasetIndex, dataIndex){\n        this._updateVisibility(datasetIndex, dataIndex, true);\n    }\n _destroyDatasetMeta(datasetIndex){\n        const meta=this._metasets[datasetIndex];\n        if(meta&&meta.controller){\n            meta.controller._destroy();\n        }\n        delete this._metasets[datasetIndex];\n    }\n    _stop(){\n        let i, ilen;\n        this.stop();\n        animator.remove(this);\n        for(i=0, ilen=this.data.datasets.length; i < ilen; ++i){\n            this._destroyDatasetMeta(i);\n        }\n    }\n    destroy(){\n        this.notifyPlugins('beforeDestroy');\n        const { canvas , ctx  }=this;\n        this._stop();\n        this.config.clearCache();\n        if(canvas){\n            this.unbindEvents();\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.af)(canvas, ctx);\n            this.platform.releaseContext(ctx);\n            this.canvas=null;\n            this.ctx=null;\n        }\n        delete instances[this.id];\n        this.notifyPlugins('afterDestroy');\n    }\n    toBase64Image(...args){\n        return this.canvas.toDataURL(...args);\n    }\n bindEvents(){\n        this.bindUserEvents();\n        if(this.options.responsive){\n            this.bindResponsiveEvents();\n        }else{\n            this.attached=true;\n        }\n    }\n bindUserEvents(){\n        const listeners=this._listeners;\n        const platform=this.platform;\n        const _add=(type, listener)=>{\n            platform.addEventListener(this, type, listener);\n            listeners[type]=listener;\n        };\n        const listener=(e, x, y)=>{\n            e.offsetX=x;\n            e.offsetY=y;\n            this._eventHandler(e);\n        };\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.options.events, (type)=>_add(type, listener));\n    }\n bindResponsiveEvents(){\n        if(!this._responsiveListeners){\n            this._responsiveListeners={};\n        }\n        const listeners=this._responsiveListeners;\n        const platform=this.platform;\n        const _add=(type, listener)=>{\n            platform.addEventListener(this, type, listener);\n            listeners[type]=listener;\n        };\n        const _remove=(type, listener)=>{\n            if(listeners[type]){\n                platform.removeEventListener(this, type, listener);\n                delete listeners[type];\n            }\n        };\n        const listener=(width, height)=>{\n            if(this.canvas){\n                this.resize(width, height);\n            }\n        };\n        let detached;\n        const attached=()=>{\n            _remove('attach', attached);\n            this.attached=true;\n            this.resize();\n            _add('resize', listener);\n            _add('detach', detached);\n        };\n        detached=()=>{\n            this.attached=false;\n            _remove('resize', listener);\n            this._stop();\n            this._resize(0, 0);\n            _add('attach', attached);\n        };\n        if(platform.isAttached(this.canvas)){\n            attached();\n        }else{\n            detached();\n        }\n    }\n unbindEvents(){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this._listeners, (listener, type)=>{\n            this.platform.removeEventListener(this, type, listener);\n        });\n        this._listeners={};\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this._responsiveListeners, (listener, type)=>{\n            this.platform.removeEventListener(this, type, listener);\n        });\n        this._responsiveListeners=undefined;\n    }\n    updateHoverStyle(items, mode, enabled){\n        const prefix=enabled ? 'set':'remove';\n        let meta, item, i, ilen;\n        if(mode==='dataset'){\n            meta=this.getDatasetMeta(items[0].datasetIndex);\n            meta.controller['_' + prefix + 'DatasetHoverStyle']();\n        }\n        for(i=0, ilen=items.length; i < ilen; ++i){\n            item=items[i];\n            const controller=item&&this.getDatasetMeta(item.datasetIndex).controller;\n            if(controller){\n                controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n            }\n        }\n    }\n getActiveElements(){\n        return this._active||[];\n    }\n setActiveElements(activeElements){\n        const lastActive=this._active||[];\n        const active=activeElements.map(({ datasetIndex , index  })=>{\n            const meta=this.getDatasetMeta(datasetIndex);\n            if(!meta){\n                throw new Error('No dataset found at index ' + datasetIndex);\n            }\n            return {\n                datasetIndex,\n                element: meta.data[index],\n                index\n            };\n        });\n        const changed = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ah)(active, lastActive);\n        if(changed){\n            this._active=active;\n            this._lastEvent=null;\n            this._updateHoverStyles(active, lastActive);\n        }\n    }\n notifyPlugins(hook, args, filter){\n        return this._plugins.notify(this, hook, args, filter);\n    }\n isPluginEnabled(pluginId){\n        return this._plugins._cache.filter((p)=>p.plugin.id===pluginId).length===1;\n    }\n _updateHoverStyles(active, lastActive, replay){\n        const hoverOptions=this.options.hover;\n        const diff=(a, b)=>a.filter((x)=>!b.some((y)=>x.datasetIndex===y.datasetIndex&&x.index===y.index));\n        const deactivated=diff(lastActive, active);\n        const activated=replay ? active:diff(active, lastActive);\n        if(deactivated.length){\n            this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n        }\n        if(activated.length&&hoverOptions.mode){\n            this.updateHoverStyle(activated, hoverOptions.mode, true);\n        }\n    }\n _eventHandler(e, replay){\n        const args={\n            event: e,\n            replay,\n            cancelable: true,\n            inChartArea: this.isPointInArea(e)\n        };\n        const eventFilter=(plugin)=>(plugin.options.events||this.options.events).includes(e.native.type);\n        if(this.notifyPlugins('beforeEvent', args, eventFilter)===false){\n            return;\n        }\n        const changed=this._handleEvent(e, replay, args.inChartArea);\n        args.cancelable=false;\n        this.notifyPlugins('afterEvent', args, eventFilter);\n        if(changed||args.changed){\n            this.render();\n        }\n        return this;\n    }\n _handleEvent(e, replay, inChartArea){\n        const { _active: lastActive=[] , options  }=this;\n        const useFinalPosition=replay;\n        const active=this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n        const isClick=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ai)(e);\n        const lastEvent=determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n        if(inChartArea){\n            this._lastEvent=null;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(options.onHover, [\n                e,\n                active,\n                this\n            ], this);\n            if(isClick){\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(options.onClick, [\n                    e,\n                    active,\n                    this\n                ], this);\n            }\n        }\n        const changed = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ah)(active, lastActive);\n        if(changed||replay){\n            this._active=active;\n            this._updateHoverStyles(active, lastActive, replay);\n        }\n        this._lastEvent=lastEvent;\n        return changed;\n    }\n _getActiveElements(e, lastActive, inChartArea, useFinalPosition){\n        if(e.type==='mouseout'){\n            return [];\n        }\n        if(!inChartArea){\n            return lastActive;\n        }\n        const hoverOptions=this.options.hover;\n        return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n    }\n}\nfunction invalidatePlugins(){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(Chart.instances, (chart)=>chart._plugins.invalidate());\n}\n\nfunction clipArc(ctx, element, endAngle){\n    const { startAngle , pixelMargin , x , y , outerRadius , innerRadius  }=element;\n    let angleMargin=pixelMargin / outerRadius;\n    // Draw an inner border by clipping the arc and drawing a double-width border\n    // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n    ctx.beginPath();\n    ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n    if(innerRadius > pixelMargin){\n        angleMargin=pixelMargin / innerRadius;\n        ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n    }else{\n        ctx.arc(x, y, pixelMargin, endAngle + _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H, startAngle - _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H);\n    }\n    ctx.closePath();\n    ctx.clip();\n}\nfunction toRadiusCorners(value){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ak)(value, [\n        'outerStart',\n        'outerEnd',\n        'innerStart',\n        'innerEnd'\n    ]);\n}\n/**\n * Parse border radius from the provided options\n */ function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta){\n    const o=toRadiusCorners(arc.options.borderRadius);\n    const halfThickness=(outerRadius - innerRadius) / 2;\n    const innerLimit=Math.min(halfThickness, angleDelta * innerRadius / 2);\n    // Outer limits are complicated. We want to compute the available angular distance at\n    // a radius of outerRadius - borderRadius because for small angular distances, this term limits.\n    // We compute at r=outerRadius - borderRadius because this circle defines the center of the border corners.\n    //\n    // If the borderRadius is large, that value can become negative.\n    // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius\n    // we know that the thickness term will dominate and compute the limits at that point\n    const computeOuterLimit=(val)=>{\n        const outerArcLimit=(outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(val, 0, Math.min(halfThickness, outerArcLimit));\n    };\n    return {\n        outerStart: computeOuterLimit(o.outerStart),\n        outerEnd: computeOuterLimit(o.outerEnd),\n        innerStart: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(o.innerStart, 0, innerLimit),\n        innerEnd: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(o.innerEnd, 0, innerLimit)\n    };\n}\n/**\n * Convert (r, 𝜃) to (x, y)\n */ function rThetaToXY(r, theta, x, y){\n    return {\n        x: x + r * Math.cos(theta),\n        y: y + r * Math.sin(theta)\n    };\n}\n/**\n * Path the arc, respecting border radius by separating into left and right halves.\n *\n *   Start      End\n *\n *    1---\x3ea---\x3e2    Outer\n *   /           \\\n *   8           3\n *   |           |\n *   |           |\n *   7           4\n *   \\           /\n *    6<---b<---5    Inner\n */ function pathArc(ctx, element, offset, spacing, end, circular){\n    const { x , y , startAngle: start , pixelMargin , innerRadius: innerR  }=element;\n    const outerRadius=Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n    const innerRadius=innerR > 0 ? innerR + spacing + offset + pixelMargin:0;\n    let spacingOffset=0;\n    const alpha=end - start;\n    if(spacing){\n        // When spacing is present, it is the same for all items\n        // So we adjust the start and end angle of the arc such that\n        // the distance is the same as it would be without the spacing\n        const noSpacingInnerRadius=innerR > 0 ? innerR - spacing:0;\n        const noSpacingOuterRadius=outerRadius > 0 ? outerRadius - spacing:0;\n        const avNogSpacingRadius=(noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n        const adjustedAngle=avNogSpacingRadius!==0 ? alpha * avNogSpacingRadius / (avNogSpacingRadius + spacing):alpha;\n        spacingOffset=(alpha - adjustedAngle) / 2;\n    }\n    const beta=Math.max(0.001, alpha * outerRadius - offset / _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P) / outerRadius;\n    const angleOffset=(alpha - beta) / 2;\n    const startAngle=start + angleOffset + spacingOffset;\n    const endAngle=end - angleOffset - spacingOffset;\n    const { outerStart , outerEnd , innerStart , innerEnd  }=parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);\n    const outerStartAdjustedRadius=outerRadius - outerStart;\n    const outerEndAdjustedRadius=outerRadius - outerEnd;\n    const outerStartAdjustedAngle=startAngle + outerStart / outerStartAdjustedRadius;\n    const outerEndAdjustedAngle=endAngle - outerEnd / outerEndAdjustedRadius;\n    const innerStartAdjustedRadius=innerRadius + innerStart;\n    const innerEndAdjustedRadius=innerRadius + innerEnd;\n    const innerStartAdjustedAngle=startAngle + innerStart / innerStartAdjustedRadius;\n    const innerEndAdjustedAngle=endAngle - innerEnd / innerEndAdjustedRadius;\n    ctx.beginPath();\n    if(circular){\n        // The first arc segments from point 1 to point a to point 2\n        const outerMidAdjustedAngle=(outerStartAdjustedAngle + outerEndAdjustedAngle) / 2;\n        ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerMidAdjustedAngle);\n        ctx.arc(x, y, outerRadius, outerMidAdjustedAngle, outerEndAdjustedAngle);\n        // The corner segment from point 2 to point 3\n        if(outerEnd > 0){\n            const pCenter=rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H);\n        }\n        // The line from point 3 to point 4\n        const p4=rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n        ctx.lineTo(p4.x, p4.y);\n        // The corner segment from point 4 to point 5\n        if(innerEnd > 0){\n            const pCenter=rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H, innerEndAdjustedAngle + Math.PI);\n        }\n        // The inner arc from point 5 to point b to point 6\n        const innerMidAdjustedAngle=(endAngle - innerEnd / innerRadius + (startAngle + innerStart / innerRadius)) / 2;\n        ctx.arc(x, y, innerRadius, endAngle - innerEnd / innerRadius, innerMidAdjustedAngle, true);\n        ctx.arc(x, y, innerRadius, innerMidAdjustedAngle, startAngle + innerStart / innerRadius, true);\n        // The corner segment from point 6 to point 7\n        if(innerStart > 0){\n            const pCenter=rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H);\n        }\n        // The line from point 7 to point 8\n        const p8=rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n        ctx.lineTo(p8.x, p8.y);\n        // The corner segment from point 8 to point 1\n        if(outerStart > 0){\n            const pCenter=rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n            ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H, outerStartAdjustedAngle);\n        }\n    }else{\n        ctx.moveTo(x, y);\n        const outerStartX=Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n        const outerStartY=Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n        ctx.lineTo(outerStartX, outerStartY);\n        const outerEndX=Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n        const outerEndY=Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n        ctx.lineTo(outerEndX, outerEndY);\n    }\n    ctx.closePath();\n}\nfunction drawArc(ctx, element, offset, spacing, circular){\n    const { fullCircles , startAngle , circumference  }=element;\n    let endAngle=element.endAngle;\n    if(fullCircles){\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        for(let i=0; i < fullCircles; ++i){\n            ctx.fill();\n        }\n        if(!isNaN(circumference)){\n            endAngle=startAngle + (circumference % _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T||_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T);\n        }\n    }\n    pathArc(ctx, element, offset, spacing, endAngle, circular);\n    ctx.fill();\n    return endAngle;\n}\nfunction drawBorder(ctx, element, offset, spacing, circular){\n    const { fullCircles , startAngle , circumference , options  }=element;\n    const { borderWidth , borderJoinStyle , borderDash , borderDashOffset  }=options;\n    const inner=options.borderAlign==='inner';\n    if(!borderWidth){\n        return;\n    }\n    ctx.setLineDash(borderDash||[]);\n    ctx.lineDashOffset=borderDashOffset;\n    if(inner){\n        ctx.lineWidth=borderWidth * 2;\n        ctx.lineJoin=borderJoinStyle||'round';\n    }else{\n        ctx.lineWidth=borderWidth;\n        ctx.lineJoin=borderJoinStyle||'bevel';\n    }\n    let endAngle=element.endAngle;\n    if(fullCircles){\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        for(let i=0; i < fullCircles; ++i){\n            ctx.stroke();\n        }\n        if(!isNaN(circumference)){\n            endAngle=startAngle + (circumference % _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T||_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T);\n        }\n    }\n    if(inner){\n        clipArc(ctx, element, endAngle);\n    }\n    if(!fullCircles){\n        pathArc(ctx, element, offset, spacing, endAngle, circular);\n        ctx.stroke();\n    }\n}\nclass ArcElement extends Element {\n    static id='arc';\n    static defaults={\n        borderAlign: 'center',\n        borderColor: '#fff',\n        borderDash: [],\n        borderDashOffset: 0,\n        borderJoinStyle: undefined,\n        borderRadius: 0,\n        borderWidth: 2,\n        offset: 0,\n        spacing: 0,\n        angle: undefined,\n        circular: true\n    };\n    static defaultRoutes={\n        backgroundColor: 'backgroundColor'\n    };\n    static descriptors={\n        _scriptable: true,\n        _indexable: (name)=>name!=='borderDash'\n    };\n    circumference;\n    endAngle;\n    fullCircles;\n    innerRadius;\n    outerRadius;\n    pixelMargin;\n    startAngle;\n    constructor(cfg){\n        super();\n        this.options=undefined;\n        this.circumference=undefined;\n        this.startAngle=undefined;\n        this.endAngle=undefined;\n        this.innerRadius=undefined;\n        this.outerRadius=undefined;\n        this.pixelMargin=0;\n        this.fullCircles=0;\n        if(cfg){\n            Object.assign(this, cfg);\n        }\n    }\n    inRange(chartX, chartY, useFinalPosition){\n        const point=this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        const { angle , distance  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.D)(point, {\n            x: chartX,\n            y: chartY\n        });\n        const { startAngle , endAngle , innerRadius , outerRadius , circumference  }=this.getProps([\n            'startAngle',\n            'endAngle',\n            'innerRadius',\n            'outerRadius',\n            'circumference'\n        ], useFinalPosition);\n        const rAdjust=(this.options.spacing + this.options.borderWidth) / 2;\n        const _circumference=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(circumference, endAngle - startAngle);\n        const betweenAngles=_circumference >=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.p)(angle, startAngle, endAngle);\n        const withinRadius=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n        return betweenAngles&&withinRadius;\n    }\n    getCenterPoint(useFinalPosition){\n        const { x , y , startAngle , endAngle , innerRadius , outerRadius  }=this.getProps([\n            'x',\n            'y',\n            'startAngle',\n            'endAngle',\n            'innerRadius',\n            'outerRadius'\n        ], useFinalPosition);\n        const { offset , spacing  }=this.options;\n        const halfAngle=(startAngle + endAngle) / 2;\n        const halfRadius=(innerRadius + outerRadius + spacing + offset) / 2;\n        return {\n            x: x + Math.cos(halfAngle) * halfRadius,\n            y: y + Math.sin(halfAngle) * halfRadius\n        };\n    }\n    tooltipPosition(useFinalPosition){\n        return this.getCenterPoint(useFinalPosition);\n    }\n    draw(ctx){\n        const { options , circumference  }=this;\n        const offset=(options.offset||0) / 4;\n        const spacing=(options.spacing||0) / 2;\n        const circular=options.circular;\n        this.pixelMargin=options.borderAlign==='inner' ? 0.33:0;\n        this.fullCircles=circumference > _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T ? Math.floor(circumference / _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T):0;\n        if(circumference===0||this.innerRadius < 0||this.outerRadius < 0){\n            return;\n        }\n        ctx.save();\n        const halfAngle=(this.startAngle + this.endAngle) / 2;\n        ctx.translate(Math.cos(halfAngle) * offset, Math.sin(halfAngle) * offset);\n        const fix=1 - Math.sin(Math.min(_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P, circumference||0));\n        const radiusOffset=offset * fix;\n        ctx.fillStyle=options.backgroundColor;\n        ctx.strokeStyle=options.borderColor;\n        drawArc(ctx, this, radiusOffset, spacing, circular);\n        drawBorder(ctx, this, radiusOffset, spacing, circular);\n        ctx.restore();\n    }\n}\n\nfunction setStyle(ctx, options, style=options){\n    ctx.lineCap=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderCapStyle, options.borderCapStyle);\n    ctx.setLineDash((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderDash, options.borderDash));\n    ctx.lineDashOffset=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderDashOffset, options.borderDashOffset);\n    ctx.lineJoin=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderJoinStyle, options.borderJoinStyle);\n    ctx.lineWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderWidth, options.borderWidth);\n    ctx.strokeStyle=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(style.borderColor, options.borderColor);\n}\nfunction lineTo(ctx, previous, target){\n    ctx.lineTo(target.x, target.y);\n}\n function getLineMethod(options){\n    if(options.stepped){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ar;\n    }\n    if(options.tension||options.cubicInterpolationMode==='monotone'){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.as;\n    }\n    return lineTo;\n}\nfunction pathVars(points, segment, params={}){\n    const count=points.length;\n    const { start: paramsStart=0 , end: paramsEnd=count - 1  }=params;\n    const { start: segmentStart , end: segmentEnd  }=segment;\n    const start=Math.max(paramsStart, segmentStart);\n    const end=Math.min(paramsEnd, segmentEnd);\n    const outside=paramsStart < segmentStart&&paramsEnd < segmentStart||paramsStart > segmentEnd&&paramsEnd > segmentEnd;\n    return {\n        count,\n        start,\n        loop: segment.loop,\n        ilen: end < start&&!outside ? count + end - start:end - start\n    };\n}\n function pathSegment(ctx, line, segment, params){\n    const { points , options  }=line;\n    const { count , start , loop , ilen  }=pathVars(points, segment, params);\n    const lineMethod=getLineMethod(options);\n    let { move=true , reverse  }=params||{};\n    let i, point, prev;\n    for(i=0; i <=ilen; ++i){\n        point=points[(start + (reverse ? ilen - i:i)) % count];\n        if(point.skip){\n            continue;\n        }else if(move){\n            ctx.moveTo(point.x, point.y);\n            move=false;\n        }else{\n            lineMethod(ctx, prev, point, reverse, options.stepped);\n        }\n        prev=point;\n    }\n    if(loop){\n        point=points[(start + (reverse ? ilen:0)) % count];\n        lineMethod(ctx, prev, point, reverse, options.stepped);\n    }\n    return !!loop;\n}\n function fastPathSegment(ctx, line, segment, params){\n    const points=line.points;\n    const { count , start , ilen  }=pathVars(points, segment, params);\n    const { move=true , reverse  }=params||{};\n    let avgX=0;\n    let countX=0;\n    let i, point, prevX, minY, maxY, lastY;\n    const pointIndex=(index)=>(start + (reverse ? ilen - index:index)) % count;\n    const drawX=()=>{\n        if(minY!==maxY){\n            ctx.lineTo(avgX, maxY);\n            ctx.lineTo(avgX, minY);\n            ctx.lineTo(avgX, lastY);\n        }\n    };\n    if(move){\n        point=points[pointIndex(0)];\n        ctx.moveTo(point.x, point.y);\n    }\n    for(i=0; i <=ilen; ++i){\n        point=points[pointIndex(i)];\n        if(point.skip){\n            continue;\n        }\n        const x=point.x;\n        const y=point.y;\n        const truncX=x | 0;\n        if(truncX===prevX){\n            if(y < minY){\n                minY=y;\n            }else if(y > maxY){\n                maxY=y;\n            }\n            avgX=(countX * avgX + x) / ++countX;\n        }else{\n            drawX();\n            ctx.lineTo(x, y);\n            prevX=truncX;\n            countX=0;\n            minY=maxY=y;\n        }\n        lastY=y;\n    }\n    drawX();\n}\n function _getSegmentMethod(line){\n    const opts=line.options;\n    const borderDash=opts.borderDash&&opts.borderDash.length;\n    const useFastPath = !line._decimated&&!line._loop&&!opts.tension&&opts.cubicInterpolationMode!=='monotone'&&!opts.stepped&&!borderDash;\n    return useFastPath ? fastPathSegment:pathSegment;\n}\n function _getInterpolationMethod(options){\n    if(options.stepped){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ao;\n    }\n    if(options.tension||options.cubicInterpolationMode==='monotone'){\n        return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ap;\n    }\n    return _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aq;\n}\nfunction strokePathWithCache(ctx, line, start, count){\n    let path=line._path;\n    if(!path){\n        path=line._path=new Path2D();\n        if(line.path(path, start, count)){\n            path.closePath();\n        }\n    }\n    setStyle(ctx, line.options);\n    ctx.stroke(path);\n}\nfunction strokePathDirect(ctx, line, start, count){\n    const { segments , options  }=line;\n    const segmentMethod=_getSegmentMethod(line);\n    for (const segment of segments){\n        setStyle(ctx, options, segment.style);\n        ctx.beginPath();\n        if(segmentMethod(ctx, line, segment, {\n            start,\n            end: start + count - 1\n        })){\n            ctx.closePath();\n        }\n        ctx.stroke();\n    }\n}\nconst usePath2D=typeof Path2D==='function';\nfunction draw(ctx, line, start, count){\n    if(usePath2D&&!line.options.segment){\n        strokePathWithCache(ctx, line, start, count);\n    }else{\n        strokePathDirect(ctx, line, start, count);\n    }\n}\nclass LineElement extends Element {\n    static id='line';\n static defaults={\n        borderCapStyle: 'butt',\n        borderDash: [],\n        borderDashOffset: 0,\n        borderJoinStyle: 'miter',\n        borderWidth: 3,\n        capBezierPoints: true,\n        cubicInterpolationMode: 'default',\n        fill: false,\n        spanGaps: false,\n        stepped: false,\n        tension: 0\n    };\n static defaultRoutes={\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    static descriptors={\n        _scriptable: true,\n        _indexable: (name)=>name!=='borderDash'&&name!=='fill'\n    };\n    constructor(cfg){\n        super();\n        this.animated=true;\n        this.options=undefined;\n        this._chart=undefined;\n        this._loop=undefined;\n        this._fullLoop=undefined;\n        this._path=undefined;\n        this._points=undefined;\n        this._segments=undefined;\n        this._decimated=false;\n        this._pointsUpdated=false;\n        this._datasetIndex=undefined;\n        if(cfg){\n            Object.assign(this, cfg);\n        }\n    }\n    updateControlPoints(chartArea, indexAxis){\n        const options=this.options;\n        if((options.tension||options.cubicInterpolationMode==='monotone')&&!options.stepped&&!this._pointsUpdated){\n            const loop=options.spanGaps ? this._loop:this._fullLoop;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.al)(this._points, options, chartArea, loop, indexAxis);\n            this._pointsUpdated=true;\n        }\n    }\n    set points(points){\n        this._points=points;\n        delete this._segments;\n        delete this._path;\n        this._pointsUpdated=false;\n    }\n    get points(){\n        return this._points;\n    }\n    get segments(){\n        return this._segments||(this._segments=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.am)(this, this.options.segment));\n    }\n first(){\n        const segments=this.segments;\n        const points=this.points;\n        return segments.length&&points[segments[0].start];\n    }\n last(){\n        const segments=this.segments;\n        const points=this.points;\n        const count=segments.length;\n        return count&&points[segments[count - 1].end];\n    }\n interpolate(point, property){\n        const options=this.options;\n        const value=point[property];\n        const points=this.points;\n        const segments=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.an)(this, {\n            property,\n            start: value,\n            end: value\n        });\n        if(!segments.length){\n            return;\n        }\n        const result=[];\n        const _interpolate=_getInterpolationMethod(options);\n        let i, ilen;\n        for(i=0, ilen=segments.length; i < ilen; ++i){\n            const { start , end  }=segments[i];\n            const p1=points[start];\n            const p2=points[end];\n            if(p1===p2){\n                result.push(p1);\n                continue;\n            }\n            const t=Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n            const interpolated=_interpolate(p1, p2, t, options.stepped);\n            interpolated[property]=point[property];\n            result.push(interpolated);\n        }\n        return result.length===1 ? result[0]:result;\n    }\n pathSegment(ctx, segment, params){\n        const segmentMethod=_getSegmentMethod(this);\n        return segmentMethod(ctx, this, segment, params);\n    }\n path(ctx, start, count){\n        const segments=this.segments;\n        const segmentMethod=_getSegmentMethod(this);\n        let loop=this._loop;\n        start=start||0;\n        count=count||this.points.length - start;\n        for (const segment of segments){\n            loop &=segmentMethod(ctx, this, segment, {\n                start,\n                end: start + count - 1\n            });\n        }\n        return !!loop;\n    }\n draw(ctx, chartArea, start, count){\n        const options=this.options||{};\n        const points=this.points||[];\n        if(points.length&&options.borderWidth){\n            ctx.save();\n            draw(ctx, this, start, count);\n            ctx.restore();\n        }\n        if(this.animated){\n            this._pointsUpdated=false;\n            this._path=undefined;\n        }\n    }\n}\n\nfunction inRange$1(el, pos, axis, useFinalPosition){\n    const options=el.options;\n    const { [axis]: value  }=el.getProps([\n        axis\n    ], useFinalPosition);\n    return Math.abs(pos - value) < options.radius + options.hitRadius;\n}\nclass PointElement extends Element {\n    static id='point';\n    parsed;\n    skip;\n    stop;\n    /**\n   * @type {any}\n   */ static defaults={\n        borderWidth: 1,\n        hitRadius: 1,\n        hoverBorderWidth: 1,\n        hoverRadius: 4,\n        pointStyle: 'circle',\n        radius: 3,\n        rotation: 0\n    };\n    /**\n   * @type {any}\n   */ static defaultRoutes={\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    constructor(cfg){\n        super();\n        this.options=undefined;\n        this.parsed=undefined;\n        this.skip=undefined;\n        this.stop=undefined;\n        if(cfg){\n            Object.assign(this, cfg);\n        }\n    }\n    inRange(mouseX, mouseY, useFinalPosition){\n        const options=this.options;\n        const { x , y  }=this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2) < Math.pow(options.hitRadius + options.radius, 2);\n    }\n    inXRange(mouseX, useFinalPosition){\n        return inRange$1(this, mouseX, 'x', useFinalPosition);\n    }\n    inYRange(mouseY, useFinalPosition){\n        return inRange$1(this, mouseY, 'y', useFinalPosition);\n    }\n    getCenterPoint(useFinalPosition){\n        const { x , y  }=this.getProps([\n            'x',\n            'y'\n        ], useFinalPosition);\n        return {\n            x,\n            y\n        };\n    }\n    size(options){\n        options=options||this.options||{};\n        let radius=options.radius||0;\n        radius=Math.max(radius, radius&&options.hoverRadius||0);\n        const borderWidth=radius&&options.borderWidth||0;\n        return (radius + borderWidth) * 2;\n    }\n    draw(ctx, area){\n        const options=this.options;\n        if(this.skip||options.radius < 0.1||!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)(this, area, this.size(options) / 2)){\n            return;\n        }\n        ctx.strokeStyle=options.borderColor;\n        ctx.lineWidth=options.borderWidth;\n        ctx.fillStyle=options.backgroundColor;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.at)(ctx, options, this.x, this.y);\n    }\n    getRange(){\n        const options=this.options||{};\n        // @ts-expect-error Fallbacks should never be hit in practice\n        return options.radius + options.hitRadius;\n    }\n}\n\nfunction getBarBounds(bar, useFinalPosition){\n    const { x , y , base , width , height  }=bar.getProps([\n        'x',\n        'y',\n        'base',\n        'width',\n        'height'\n    ], useFinalPosition);\n    let left, right, top, bottom, half;\n    if(bar.horizontal){\n        half=height / 2;\n        left=Math.min(x, base);\n        right=Math.max(x, base);\n        top=y - half;\n        bottom=y + half;\n    }else{\n        half=width / 2;\n        left=x - half;\n        right=x + half;\n        top=Math.min(y, base);\n        bottom=Math.max(y, base);\n    }\n    return {\n        left,\n        top,\n        right,\n        bottom\n    };\n}\nfunction skipOrLimit(skip, value, min, max){\n    return skip ? 0:(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(value, min, max);\n}\nfunction parseBorderWidth(bar, maxW, maxH){\n    const value=bar.options.borderWidth;\n    const skip=bar.borderSkipped;\n    const o=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.av)(value);\n    return {\n        t: skipOrLimit(skip.top, o.top, 0, maxH),\n        r: skipOrLimit(skip.right, o.right, 0, maxW),\n        b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n        l: skipOrLimit(skip.left, o.left, 0, maxW)\n    };\n}\nfunction parseBorderRadius(bar, maxW, maxH){\n    const { enableBorderRadius  }=bar.getProps([\n        'enableBorderRadius'\n    ]);\n    const value=bar.options.borderRadius;\n    const o=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(value);\n    const maxR=Math.min(maxW, maxH);\n    const skip=bar.borderSkipped;\n    const enableBorder=enableBorderRadius||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(value);\n    return {\n        topLeft: skipOrLimit(!enableBorder||skip.top||skip.left, o.topLeft, 0, maxR),\n        topRight: skipOrLimit(!enableBorder||skip.top||skip.right, o.topRight, 0, maxR),\n        bottomLeft: skipOrLimit(!enableBorder||skip.bottom||skip.left, o.bottomLeft, 0, maxR),\n        bottomRight: skipOrLimit(!enableBorder||skip.bottom||skip.right, o.bottomRight, 0, maxR)\n    };\n}\nfunction boundingRects(bar){\n    const bounds=getBarBounds(bar);\n    const width=bounds.right - bounds.left;\n    const height=bounds.bottom - bounds.top;\n    const border=parseBorderWidth(bar, width / 2, height / 2);\n    const radius=parseBorderRadius(bar, width / 2, height / 2);\n    return {\n        outer: {\n            x: bounds.left,\n            y: bounds.top,\n            w: width,\n            h: height,\n            radius\n        },\n        inner: {\n            x: bounds.left + border.l,\n            y: bounds.top + border.t,\n            w: width - border.l - border.r,\n            h: height - border.t - border.b,\n            radius: {\n                topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n                topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n                bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n                bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r))\n            }\n        }\n    };\n}\nfunction inRange(bar, x, y, useFinalPosition){\n    const skipX=x===null;\n    const skipY=y===null;\n    const skipBoth=skipX&&skipY;\n    const bounds=bar&&!skipBoth&&getBarBounds(bar, useFinalPosition);\n    return bounds&&(skipX||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(x, bounds.left, bounds.right))&&(skipY||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(y, bounds.top, bounds.bottom));\n}\nfunction hasRadius(radius){\n    return radius.topLeft||radius.topRight||radius.bottomLeft||radius.bottomRight;\n}\n function addNormalRectPath(ctx, rect){\n    ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\nfunction inflateRect(rect, amount, refRect={}){\n    const x=rect.x!==refRect.x ? -amount:0;\n    const y=rect.y!==refRect.y ? -amount:0;\n    const w=(rect.x + rect.w!==refRect.x + refRect.w ? amount:0) - x;\n    const h=(rect.y + rect.h!==refRect.y + refRect.h ? amount:0) - y;\n    return {\n        x: rect.x + x,\n        y: rect.y + y,\n        w: rect.w + w,\n        h: rect.h + h,\n        radius: rect.radius\n    };\n}\nclass BarElement extends Element {\n    static id='bar';\n static defaults={\n        borderSkipped: 'start',\n        borderWidth: 0,\n        borderRadius: 0,\n        inflateAmount: 'auto',\n        pointStyle: undefined\n    };\n static defaultRoutes={\n        backgroundColor: 'backgroundColor',\n        borderColor: 'borderColor'\n    };\n    constructor(cfg){\n        super();\n        this.options=undefined;\n        this.horizontal=undefined;\n        this.base=undefined;\n        this.width=undefined;\n        this.height=undefined;\n        this.inflateAmount=undefined;\n        if(cfg){\n            Object.assign(this, cfg);\n        }\n    }\n    draw(ctx){\n        const { inflateAmount , options: { borderColor , backgroundColor  }}=this;\n        const { inner , outer  }=boundingRects(this);\n        const addRectPath=hasRadius(outer.radius) ? _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.au:addNormalRectPath;\n        ctx.save();\n        if(outer.w!==inner.w||outer.h!==inner.h){\n            ctx.beginPath();\n            addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n            ctx.clip();\n            addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n            ctx.fillStyle=borderColor;\n            ctx.fill('evenodd');\n        }\n        ctx.beginPath();\n        addRectPath(ctx, inflateRect(inner, inflateAmount));\n        ctx.fillStyle=backgroundColor;\n        ctx.fill();\n        ctx.restore();\n    }\n    inRange(mouseX, mouseY, useFinalPosition){\n        return inRange(this, mouseX, mouseY, useFinalPosition);\n    }\n    inXRange(mouseX, useFinalPosition){\n        return inRange(this, mouseX, null, useFinalPosition);\n    }\n    inYRange(mouseY, useFinalPosition){\n        return inRange(this, null, mouseY, useFinalPosition);\n    }\n    getCenterPoint(useFinalPosition){\n        const { x , y , base , horizontal  }=this.getProps([\n            'x',\n            'y',\n            'base',\n            'horizontal'\n        ], useFinalPosition);\n        return {\n            x: horizontal ? (x + base) / 2:x,\n            y: horizontal ? y:(y + base) / 2\n        };\n    }\n    getRange(axis){\n        return axis==='x' ? this.width / 2:this.height / 2;\n    }\n}\n\nvar elements=/*#__PURE__*/Object.freeze({\n__proto__: null,\nArcElement: ArcElement,\nBarElement: BarElement,\nLineElement: LineElement,\nPointElement: PointElement\n});\n\nconst BORDER_COLORS=[\n    'rgb(54, 162, 235)',\n    'rgb(255, 99, 132)',\n    'rgb(255, 159, 64)',\n    'rgb(255, 205, 86)',\n    'rgb(75, 192, 192)',\n    'rgb(153, 102, 255)',\n    'rgb(201, 203, 207)' // grey\n];\n// Border colors with 50% transparency\nconst BACKGROUND_COLORS=/* #__PURE__ */ BORDER_COLORS.map((color)=>color.replace('rgb(', 'rgba(').replace(')', ', 0.5)'));\nfunction getBorderColor(i){\n    return BORDER_COLORS[i % BORDER_COLORS.length];\n}\nfunction getBackgroundColor(i){\n    return BACKGROUND_COLORS[i % BACKGROUND_COLORS.length];\n}\nfunction colorizeDefaultDataset(dataset, i){\n    dataset.borderColor=getBorderColor(i);\n    dataset.backgroundColor=getBackgroundColor(i);\n    return ++i;\n}\nfunction colorizeDoughnutDataset(dataset, i){\n    dataset.backgroundColor=dataset.data.map(()=>getBorderColor(i++));\n    return i;\n}\nfunction colorizePolarAreaDataset(dataset, i){\n    dataset.backgroundColor=dataset.data.map(()=>getBackgroundColor(i++));\n    return i;\n}\nfunction getColorizer(chart){\n    let i=0;\n    return (dataset, datasetIndex)=>{\n        const controller=chart.getDatasetMeta(datasetIndex).controller;\n        if(controller instanceof DoughnutController){\n            i=colorizeDoughnutDataset(dataset, i);\n        }else if(controller instanceof PolarAreaController){\n            i=colorizePolarAreaDataset(dataset, i);\n        }else if(controller){\n            i=colorizeDefaultDataset(dataset, i);\n        }\n    };\n}\nfunction containsColorsDefinitions(descriptors){\n    let k;\n    for(k in descriptors){\n        if(descriptors[k].borderColor||descriptors[k].backgroundColor){\n            return true;\n        }\n    }\n    return false;\n}\nfunction containsColorsDefinition(descriptor){\n    return descriptor&&(descriptor.borderColor||descriptor.backgroundColor);\n}\nvar plugin_colors={\n    id: 'colors',\n    defaults: {\n        enabled: true,\n        forceOverride: false\n    },\n    beforeLayout (chart, _args, options){\n        if(!options.enabled){\n            return;\n        }\n        const { data: { datasets  } , options: chartOptions  }=chart.config;\n        const { elements  }=chartOptions;\n        if(!options.forceOverride&&(containsColorsDefinitions(datasets)||containsColorsDefinition(chartOptions)||elements&&containsColorsDefinitions(elements))){\n            return;\n        }\n        const colorizer=getColorizer(chart);\n        datasets.forEach(colorizer);\n    }\n};\n\nfunction lttbDecimation(data, start, count, availableWidth, options){\n const samples=options.samples||availableWidth;\n    if(samples >=count){\n        return data.slice(start, start + count);\n    }\n    const decimated=[];\n    const bucketWidth=(count - 2) / (samples - 2);\n    let sampledIndex=0;\n    const endIndex=start + count - 1;\n    let a=start;\n    let i, maxAreaPoint, maxArea, area, nextA;\n    decimated[sampledIndex++]=data[a];\n    for(i=0; i < samples - 2; i++){\n        let avgX=0;\n        let avgY=0;\n        let j;\n        const avgRangeStart=Math.floor((i + 1) * bucketWidth) + 1 + start;\n        const avgRangeEnd=Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n        const avgRangeLength=avgRangeEnd - avgRangeStart;\n        for(j=avgRangeStart; j < avgRangeEnd; j++){\n            avgX +=data[j].x;\n            avgY +=data[j].y;\n        }\n        avgX /=avgRangeLength;\n        avgY /=avgRangeLength;\n        const rangeOffs=Math.floor(i * bucketWidth) + 1 + start;\n        const rangeTo=Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n        const { x: pointAx , y: pointAy  }=data[a];\n        maxArea=area=-1;\n        for(j=rangeOffs; j < rangeTo; j++){\n            area=0.5 * Math.abs((pointAx - avgX) * (data[j].y - pointAy) - (pointAx - data[j].x) * (avgY - pointAy));\n            if(area > maxArea){\n                maxArea=area;\n                maxAreaPoint=data[j];\n                nextA=j;\n            }\n        }\n        decimated[sampledIndex++]=maxAreaPoint;\n        a=nextA;\n    }\n    decimated[sampledIndex++]=data[endIndex];\n    return decimated;\n}\nfunction minMaxDecimation(data, start, count, availableWidth){\n    let avgX=0;\n    let countX=0;\n    let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n    const decimated=[];\n    const endIndex=start + count - 1;\n    const xMin=data[start].x;\n    const xMax=data[endIndex].x;\n    const dx=xMax - xMin;\n    for(i=start; i < start + count; ++i){\n        point=data[i];\n        x=(point.x - xMin) / dx * availableWidth;\n        y=point.y;\n        const truncX=x | 0;\n        if(truncX===prevX){\n            if(y < minY){\n                minY=y;\n                minIndex=i;\n            }else if(y > maxY){\n                maxY=y;\n                maxIndex=i;\n            }\n            avgX=(countX * avgX + point.x) / ++countX;\n        }else{\n            const lastIndex=i - 1;\n            if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(minIndex)&&!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(maxIndex)){\n                const intermediateIndex1=Math.min(minIndex, maxIndex);\n                const intermediateIndex2=Math.max(minIndex, maxIndex);\n                if(intermediateIndex1!==startIndex&&intermediateIndex1!==lastIndex){\n                    decimated.push({\n                        ...data[intermediateIndex1],\n                        x: avgX\n                    });\n                }\n                if(intermediateIndex2!==startIndex&&intermediateIndex2!==lastIndex){\n                    decimated.push({\n                        ...data[intermediateIndex2],\n                        x: avgX\n                    });\n                }\n            }\n            if(i > 0&&lastIndex!==startIndex){\n                decimated.push(data[lastIndex]);\n            }\n            decimated.push(point);\n            prevX=truncX;\n            countX=0;\n            minY=maxY=y;\n            minIndex=maxIndex=startIndex=i;\n        }\n    }\n    return decimated;\n}\nfunction cleanDecimatedDataset(dataset){\n    if(dataset._decimated){\n        const data=dataset._data;\n        delete dataset._decimated;\n        delete dataset._data;\n        Object.defineProperty(dataset, 'data', {\n            configurable: true,\n            enumerable: true,\n            writable: true,\n            value: data\n        });\n    }\n}\nfunction cleanDecimatedData(chart){\n    chart.data.datasets.forEach((dataset)=>{\n        cleanDecimatedDataset(dataset);\n    });\n}\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points){\n    const pointCount=points.length;\n    let start=0;\n    let count;\n    const { iScale  }=meta;\n    const { min , max , minDefined , maxDefined  }=iScale.getUserBounds();\n    if(minDefined){\n        start=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.B)(points, iScale.axis, min).lo, 0, pointCount - 1);\n    }\n    if(maxDefined){\n        count=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.B)(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n    }else{\n        count=pointCount - start;\n    }\n    return {\n        start,\n        count\n    };\n}\nvar plugin_decimation={\n    id: 'decimation',\n    defaults: {\n        algorithm: 'min-max',\n        enabled: false\n    },\n    beforeElementsUpdate: (chart, args, options)=>{\n        if(!options.enabled){\n            cleanDecimatedData(chart);\n            return;\n        }\n        const availableWidth=chart.width;\n        chart.data.datasets.forEach((dataset, datasetIndex)=>{\n            const { _data , indexAxis  }=dataset;\n            const meta=chart.getDatasetMeta(datasetIndex);\n            const data=_data||dataset.data;\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a)([\n                indexAxis,\n                chart.options.indexAxis\n            ])==='y'){\n                return;\n            }\n            if(!meta.controller.supportsDecimation){\n                return;\n            }\n            const xAxis=chart.scales[meta.xAxisID];\n            if(xAxis.type!=='linear'&&xAxis.type!=='time'){\n                return;\n            }\n            if(chart.options.parsing){\n                return;\n            }\n            let { start , count  }=getStartAndCountOfVisiblePointsSimplified(meta, data);\n            const threshold=options.threshold||4 * availableWidth;\n            if(count <=threshold){\n                cleanDecimatedDataset(dataset);\n                return;\n            }\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(_data)){\n                dataset._data=data;\n                delete dataset.data;\n                Object.defineProperty(dataset, 'data', {\n                    configurable: true,\n                    enumerable: true,\n                    get: function(){\n                        return this._decimated;\n                    },\n                    set: function(d){\n                        this._data=d;\n                    }\n                });\n            }\n            let decimated;\n            switch(options.algorithm){\n                case 'lttb':\n                    decimated=lttbDecimation(data, start, count, availableWidth, options);\n                    break;\n                case 'min-max':\n                    decimated=minMaxDecimation(data, start, count, availableWidth);\n                    break;\n                default:\n                    throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n            }\n            dataset._decimated=decimated;\n        });\n    },\n    destroy (chart){\n        cleanDecimatedData(chart);\n    }\n};\n\nfunction _segments(line, target, property){\n    const segments=line.segments;\n    const points=line.points;\n    const tpoints=target.points;\n    const parts=[];\n    for (const segment of segments){\n        let { start , end  }=segment;\n        end=_findSegmentEnd(start, end, points);\n        const bounds=_getBounds(property, points[start], points[end], segment.loop);\n        if(!target.segments){\n            parts.push({\n                source: segment,\n                target: bounds,\n                start: points[start],\n                end: points[end]\n            });\n            continue;\n        }\n        const targetSegments=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.an)(target, bounds);\n        for (const tgt of targetSegments){\n            const subBounds=_getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n            const fillSources=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ax)(segment, points, subBounds);\n            for (const fillSource of fillSources){\n                parts.push({\n                    source: fillSource,\n                    target: tgt,\n                    start: {\n                        [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n                    },\n                    end: {\n                        [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n                    }\n                });\n            }\n        }\n    }\n    return parts;\n}\nfunction _getBounds(property, first, last, loop){\n    if(loop){\n        return;\n    }\n    let start=first[property];\n    let end=last[property];\n    if(property==='angle'){\n        start=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ay)(start);\n        end=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ay)(end);\n    }\n    return {\n        property,\n        start,\n        end\n    };\n}\nfunction _pointsFromSegments(boundary, line){\n    const { x=null , y=null  }=boundary||{};\n    const linePoints=line.points;\n    const points=[];\n    line.segments.forEach(({ start , end  })=>{\n        end=_findSegmentEnd(start, end, linePoints);\n        const first=linePoints[start];\n        const last=linePoints[end];\n        if(y!==null){\n            points.push({\n                x: first.x,\n                y\n            });\n            points.push({\n                x: last.x,\n                y\n            });\n        }else if(x!==null){\n            points.push({\n                x,\n                y: first.y\n            });\n            points.push({\n                x,\n                y: last.y\n            });\n        }\n    });\n    return points;\n}\nfunction _findSegmentEnd(start, end, points){\n    for(; end > start; end--){\n        const point=points[end];\n        if(!isNaN(point.x)&&!isNaN(point.y)){\n            break;\n        }\n    }\n    return end;\n}\nfunction _getEdge(a, b, prop, fn){\n    if(a&&b){\n        return fn(a[prop], b[prop]);\n    }\n    return a ? a[prop]:b ? b[prop]:0;\n}\n\nfunction _createBoundaryLine(boundary, line){\n    let points=[];\n    let _loop=false;\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(boundary)){\n        _loop=true;\n        points=boundary;\n    }else{\n        points=_pointsFromSegments(boundary, line);\n    }\n    return points.length ? new LineElement({\n        points,\n        options: {\n            tension: 0\n        },\n        _loop,\n        _fullLoop: _loop\n    }):null;\n}\nfunction _shouldApplyFill(source){\n    return source&&source.fill!==false;\n}\n\nfunction _resolveTarget(sources, index, propagate){\n    const source=sources[index];\n    let fill=source.fill;\n    const visited=[\n        index\n    ];\n    let target;\n    if(!propagate){\n        return fill;\n    }\n    while(fill!==false&&visited.indexOf(fill)===-1){\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(fill)){\n            return fill;\n        }\n        target=sources[fill];\n        if(!target){\n            return false;\n        }\n        if(target.visible){\n            return fill;\n        }\n        visited.push(fill);\n        fill=target.fill;\n    }\n    return false;\n}\n function _decodeFill(line, index, count){\n     const fill=parseFillOption(line);\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(fill)){\n        return isNaN(fill.value) ? false:fill;\n    }\n    let target=parseFloat(fill);\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(target)&&Math.floor(target)===target){\n        return decodeTargetIndex(fill[0], index, target, count);\n    }\n    return [\n        'origin',\n        'start',\n        'end',\n        'stack',\n        'shape'\n    ].indexOf(fill) >=0&&fill;\n}\nfunction decodeTargetIndex(firstCh, index, target, count){\n    if(firstCh==='-'||firstCh==='+'){\n        target=index + target;\n    }\n    if(target===index||target < 0||target >=count){\n        return false;\n    }\n    return target;\n}\n function _getTargetPixel(fill, scale){\n    let pixel=null;\n    if(fill==='start'){\n        pixel=scale.bottom;\n    }else if(fill==='end'){\n        pixel=scale.top;\n    }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(fill)){\n        pixel=scale.getPixelForValue(fill.value);\n    }else if(scale.getBasePixel){\n        pixel=scale.getBasePixel();\n    }\n    return pixel;\n}\n function _getTargetValue(fill, scale, startValue){\n    let value;\n    if(fill==='start'){\n        value=startValue;\n    }else if(fill==='end'){\n        value=scale.options.reverse ? scale.min:scale.max;\n    }else if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(fill)){\n        value=fill.value;\n    }else{\n        value=scale.getBaseValue();\n    }\n    return value;\n}\n function parseFillOption(line){\n    const options=line.options;\n    const fillOption=options.fill;\n    let fill=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(fillOption&&fillOption.target, fillOption);\n    if(fill===undefined){\n        fill = !!options.backgroundColor;\n    }\n    if(fill===false||fill===null){\n        return false;\n    }\n    if(fill===true){\n        return 'origin';\n    }\n    return fill;\n}\n\nfunction _buildStackLine(source){\n    const { scale , index , line  }=source;\n    const points=[];\n    const segments=line.segments;\n    const sourcePoints=line.points;\n    const linesBelow=getLinesBelow(scale, index);\n    linesBelow.push(_createBoundaryLine({\n        x: null,\n        y: scale.bottom\n    }, line));\n    for(let i=0; i < segments.length; i++){\n        const segment=segments[i];\n        for(let j=segment.start; j <=segment.end; j++){\n            addPointsBelow(points, sourcePoints[j], linesBelow);\n        }\n    }\n    return new LineElement({\n        points,\n        options: {}\n    });\n}\n function getLinesBelow(scale, index){\n    const below=[];\n    const metas=scale.getMatchingVisibleMetas('line');\n    for(let i=0; i < metas.length; i++){\n        const meta=metas[i];\n        if(meta.index===index){\n            break;\n        }\n        if(!meta.hidden){\n            below.unshift(meta.dataset);\n        }\n    }\n    return below;\n}\n function addPointsBelow(points, sourcePoint, linesBelow){\n    const postponed=[];\n    for(let j=0; j < linesBelow.length; j++){\n        const line=linesBelow[j];\n        const { first , last , point  }=findPoint(line, sourcePoint, 'x');\n        if(!point||first&&last){\n            continue;\n        }\n        if(first){\n            postponed.unshift(point);\n        }else{\n            points.push(point);\n            if(!last){\n                break;\n            }\n        }\n    }\n    points.push(...postponed);\n}\n function findPoint(line, sourcePoint, property){\n    const point=line.interpolate(sourcePoint, property);\n    if(!point){\n        return {};\n    }\n    const pointValue=point[property];\n    const segments=line.segments;\n    const linePoints=line.points;\n    let first=false;\n    let last=false;\n    for(let i=0; i < segments.length; i++){\n        const segment=segments[i];\n        const firstValue=linePoints[segment.start][property];\n        const lastValue=linePoints[segment.end][property];\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(pointValue, firstValue, lastValue)){\n            first=pointValue===firstValue;\n            last=pointValue===lastValue;\n            break;\n        }\n    }\n    return {\n        first,\n        last,\n        point\n    };\n}\n\nclass simpleArc {\n    constructor(opts){\n        this.x=opts.x;\n        this.y=opts.y;\n        this.radius=opts.radius;\n    }\n    pathSegment(ctx, bounds, opts){\n        const { x , y , radius  }=this;\n        bounds=bounds||{\n            start: 0,\n            end: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T\n        };\n        ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n        return !opts.bounds;\n    }\n    interpolate(point){\n        const { x , y , radius  }=this;\n        const angle=point.angle;\n        return {\n            x: x + Math.cos(angle) * radius,\n            y: y + Math.sin(angle) * radius,\n            angle\n        };\n    }\n}\n\nfunction _getTarget(source){\n    const { chart , fill , line  }=source;\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(fill)){\n        return getLineByIndex(chart, fill);\n    }\n    if(fill==='stack'){\n        return _buildStackLine(source);\n    }\n    if(fill==='shape'){\n        return true;\n    }\n    const boundary=computeBoundary(source);\n    if(boundary instanceof simpleArc){\n        return boundary;\n    }\n    return _createBoundaryLine(boundary, line);\n}\n function getLineByIndex(chart, index){\n    const meta=chart.getDatasetMeta(index);\n    const visible=meta&&chart.isDatasetVisible(index);\n    return visible ? meta.dataset:null;\n}\nfunction computeBoundary(source){\n    const scale=source.scale||{};\n    if(scale.getPointPositionForValue){\n        return computeCircularBoundary(source);\n    }\n    return computeLinearBoundary(source);\n}\nfunction computeLinearBoundary(source){\n    const { scale={} , fill  }=source;\n    const pixel=_getTargetPixel(fill, scale);\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(pixel)){\n        const horizontal=scale.isHorizontal();\n        return {\n            x: horizontal ? pixel:null,\n            y: horizontal ? null:pixel\n        };\n    }\n    return null;\n}\nfunction computeCircularBoundary(source){\n    const { scale , fill  }=source;\n    const options=scale.options;\n    const length=scale.getLabels().length;\n    const start=options.reverse ? scale.max:scale.min;\n    const value=_getTargetValue(fill, scale, start);\n    const target=[];\n    if(options.grid.circular){\n        const center=scale.getPointPositionForValue(0, start);\n        return new simpleArc({\n            x: center.x,\n            y: center.y,\n            radius: scale.getDistanceFromCenterForValue(value)\n        });\n    }\n    for(let i=0; i < length; ++i){\n        target.push(scale.getPointPositionForValue(i, value));\n    }\n    return target;\n}\n\nfunction _drawfill(ctx, source, area){\n    const target=_getTarget(source);\n    const { line , scale , axis  }=source;\n    const lineOpts=line.options;\n    const fillOption=lineOpts.fill;\n    const color=lineOpts.backgroundColor;\n    const { above=color , below=color  }=fillOption||{};\n    if(target&&line.points.length){\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Y)(ctx, area);\n        doFill(ctx, {\n            line,\n            target,\n            above,\n            below,\n            area,\n            scale,\n            axis\n        });\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.$)(ctx);\n    }\n}\nfunction doFill(ctx, cfg){\n    const { line , target , above , below , area , scale  }=cfg;\n    const property=line._loop ? 'angle':cfg.axis;\n    ctx.save();\n    if(property==='x'&&below!==above){\n        clipVertical(ctx, target, area.top);\n        fill(ctx, {\n            line,\n            target,\n            color: above,\n            scale,\n            property\n        });\n        ctx.restore();\n        ctx.save();\n        clipVertical(ctx, target, area.bottom);\n    }\n    fill(ctx, {\n        line,\n        target,\n        color: below,\n        scale,\n        property\n    });\n    ctx.restore();\n}\nfunction clipVertical(ctx, target, clipY){\n    const { segments , points  }=target;\n    let first=true;\n    let lineLoop=false;\n    ctx.beginPath();\n    for (const segment of segments){\n        const { start , end  }=segment;\n        const firstPoint=points[start];\n        const lastPoint=points[_findSegmentEnd(start, end, points)];\n        if(first){\n            ctx.moveTo(firstPoint.x, firstPoint.y);\n            first=false;\n        }else{\n            ctx.lineTo(firstPoint.x, clipY);\n            ctx.lineTo(firstPoint.x, firstPoint.y);\n        }\n        lineLoop = !!target.pathSegment(ctx, segment, {\n            move: lineLoop\n        });\n        if(lineLoop){\n            ctx.closePath();\n        }else{\n            ctx.lineTo(lastPoint.x, clipY);\n        }\n    }\n    ctx.lineTo(target.first().x, clipY);\n    ctx.closePath();\n    ctx.clip();\n}\nfunction fill(ctx, cfg){\n    const { line , target , property , color , scale  }=cfg;\n    const segments=_segments(line, target, property);\n    for (const { source: src , target: tgt , start , end  } of segments){\n        const { style: { backgroundColor=color  }={}}=src;\n        const notShape=target!==true;\n        ctx.save();\n        ctx.fillStyle=backgroundColor;\n        clipBounds(ctx, scale, notShape&&_getBounds(property, start, end));\n        ctx.beginPath();\n        const lineLoop = !!line.pathSegment(ctx, src);\n        let loop;\n        if(notShape){\n            if(lineLoop){\n                ctx.closePath();\n            }else{\n                interpolatedLineTo(ctx, target, end, property);\n            }\n            const targetLoop = !!target.pathSegment(ctx, tgt, {\n                move: lineLoop,\n                reverse: true\n            });\n            loop=lineLoop&&targetLoop;\n            if(!loop){\n                interpolatedLineTo(ctx, target, start, property);\n            }\n        }\n        ctx.closePath();\n        ctx.fill(loop ? 'evenodd':'nonzero');\n        ctx.restore();\n    }\n}\nfunction clipBounds(ctx, scale, bounds){\n    const { top , bottom  }=scale.chart.chartArea;\n    const { property , start , end  }=bounds||{};\n    if(property==='x'){\n        ctx.beginPath();\n        ctx.rect(start, top, end - start, bottom - top);\n        ctx.clip();\n    }\n}\nfunction interpolatedLineTo(ctx, target, point, property){\n    const interpolatedPoint=target.interpolate(point, property);\n    if(interpolatedPoint){\n        ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n    }\n}\n\nvar index={\n    id: 'filler',\n    afterDatasetsUpdate (chart, _args, options){\n        const count=(chart.data.datasets||[]).length;\n        const sources=[];\n        let meta, i, line, source;\n        for(i=0; i < count; ++i){\n            meta=chart.getDatasetMeta(i);\n            line=meta.dataset;\n            source=null;\n            if(line&&line.options&&line instanceof LineElement){\n                source={\n                    visible: chart.isDatasetVisible(i),\n                    index: i,\n                    fill: _decodeFill(line, i, count),\n                    chart,\n                    axis: meta.controller.options.indexAxis,\n                    scale: meta.vScale,\n                    line\n                };\n            }\n            meta.$filler=source;\n            sources.push(source);\n        }\n        for(i=0; i < count; ++i){\n            source=sources[i];\n            if(!source||source.fill===false){\n                continue;\n            }\n            source.fill=_resolveTarget(sources, i, options.propagate);\n        }\n    },\n    beforeDraw (chart, _args, options){\n        const draw=options.drawTime==='beforeDraw';\n        const metasets=chart.getSortedVisibleDatasetMetas();\n        const area=chart.chartArea;\n        for(let i=metasets.length - 1; i >=0; --i){\n            const source=metasets[i].$filler;\n            if(!source){\n                continue;\n            }\n            source.line.updateControlPoints(area, source.axis);\n            if(draw&&source.fill){\n                _drawfill(chart.ctx, source, area);\n            }\n        }\n    },\n    beforeDatasetsDraw (chart, _args, options){\n        if(options.drawTime!=='beforeDatasetsDraw'){\n            return;\n        }\n        const metasets=chart.getSortedVisibleDatasetMetas();\n        for(let i=metasets.length - 1; i >=0; --i){\n            const source=metasets[i].$filler;\n            if(_shouldApplyFill(source)){\n                _drawfill(chart.ctx, source, chart.chartArea);\n            }\n        }\n    },\n    beforeDatasetDraw (chart, args, options){\n        const source=args.meta.$filler;\n        if(!_shouldApplyFill(source)||options.drawTime!=='beforeDatasetDraw'){\n            return;\n        }\n        _drawfill(chart.ctx, source, chart.chartArea);\n    },\n    defaults: {\n        propagate: true,\n        drawTime: 'beforeDatasetDraw'\n    }\n};\n\nconst getBoxSize=(labelOpts, fontSize)=>{\n    let { boxHeight=fontSize , boxWidth=fontSize  }=labelOpts;\n    if(labelOpts.usePointStyle){\n        boxHeight=Math.min(boxHeight, fontSize);\n        boxWidth=labelOpts.pointStyleWidth||Math.min(boxWidth, fontSize);\n    }\n    return {\n        boxWidth,\n        boxHeight,\n        itemHeight: Math.max(fontSize, boxHeight)\n    };\n};\nconst itemsEqual=(a, b)=>a!==null&&b!==null&&a.datasetIndex===b.datasetIndex&&a.index===b.index;\nclass Legend extends Element {\n constructor(config){\n        super();\n        this._added=false;\n        this.legendHitBoxes=[];\n this._hoveredItem=null;\n        this.doughnutMode=false;\n        this.chart=config.chart;\n        this.options=config.options;\n        this.ctx=config.ctx;\n        this.legendItems=undefined;\n        this.columnSizes=undefined;\n        this.lineWidths=undefined;\n        this.maxHeight=undefined;\n        this.maxWidth=undefined;\n        this.top=undefined;\n        this.bottom=undefined;\n        this.left=undefined;\n        this.right=undefined;\n        this.height=undefined;\n        this.width=undefined;\n        this._margins=undefined;\n        this.position=undefined;\n        this.weight=undefined;\n        this.fullSize=undefined;\n    }\n    update(maxWidth, maxHeight, margins){\n        this.maxWidth=maxWidth;\n        this.maxHeight=maxHeight;\n        this._margins=margins;\n        this.setDimensions();\n        this.buildLabels();\n        this.fit();\n    }\n    setDimensions(){\n        if(this.isHorizontal()){\n            this.width=this.maxWidth;\n            this.left=this._margins.left;\n            this.right=this.width;\n        }else{\n            this.height=this.maxHeight;\n            this.top=this._margins.top;\n            this.bottom=this.height;\n        }\n    }\n    buildLabels(){\n        const labelOpts=this.options.labels||{};\n        let legendItems=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(labelOpts.generateLabels, [\n            this.chart\n        ], this)||[];\n        if(labelOpts.filter){\n            legendItems=legendItems.filter((item)=>labelOpts.filter(item, this.chart.data));\n        }\n        if(labelOpts.sort){\n            legendItems=legendItems.sort((a, b)=>labelOpts.sort(a, b, this.chart.data));\n        }\n        if(this.options.reverse){\n            legendItems.reverse();\n        }\n        this.legendItems=legendItems;\n    }\n    fit(){\n        const { options , ctx  }=this;\n        if(!options.display){\n            this.width=this.height=0;\n            return;\n        }\n        const labelOpts=options.labels;\n        const labelFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(labelOpts.font);\n        const fontSize=labelFont.size;\n        const titleHeight=this._computeTitleHeight();\n        const { boxWidth , itemHeight  }=getBoxSize(labelOpts, fontSize);\n        let width, height;\n        ctx.font=labelFont.string;\n        if(this.isHorizontal()){\n            width=this.maxWidth;\n            height=this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n        }else{\n            height=this.maxHeight;\n            width=this._fitCols(titleHeight, labelFont, boxWidth, itemHeight) + 10;\n        }\n        this.width=Math.min(width, options.maxWidth||this.maxWidth);\n        this.height=Math.min(height, options.maxHeight||this.maxHeight);\n    }\n _fitRows(titleHeight, fontSize, boxWidth, itemHeight){\n        const { ctx , maxWidth , options: { labels: { padding  }}  }=this;\n        const hitboxes=this.legendHitBoxes=[];\n        const lineWidths=this.lineWidths=[\n            0\n        ];\n        const lineHeight=itemHeight + padding;\n        let totalHeight=titleHeight;\n        ctx.textAlign='left';\n        ctx.textBaseline='middle';\n        let row=-1;\n        let top=-lineHeight;\n        this.legendItems.forEach((legendItem, i)=>{\n            const itemWidth=boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n            if(i===0||lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth){\n                totalHeight +=lineHeight;\n                lineWidths[lineWidths.length - (i > 0 ? 0:1)]=0;\n                top +=lineHeight;\n                row++;\n            }\n            hitboxes[i]={\n                left: 0,\n                top,\n                row,\n                width: itemWidth,\n                height: itemHeight\n            };\n            lineWidths[lineWidths.length - 1] +=itemWidth + padding;\n        });\n        return totalHeight;\n    }\n    _fitCols(titleHeight, labelFont, boxWidth, _itemHeight){\n        const { ctx , maxHeight , options: { labels: { padding  }}  }=this;\n        const hitboxes=this.legendHitBoxes=[];\n        const columnSizes=this.columnSizes=[];\n        const heightLimit=maxHeight - titleHeight;\n        let totalWidth=padding;\n        let currentColWidth=0;\n        let currentColHeight=0;\n        let left=0;\n        let col=0;\n        this.legendItems.forEach((legendItem, i)=>{\n            const { itemWidth , itemHeight  }=calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight);\n            if(i > 0&&currentColHeight + itemHeight + 2 * padding > heightLimit){\n                totalWidth +=currentColWidth + padding;\n                columnSizes.push({\n                    width: currentColWidth,\n                    height: currentColHeight\n                });\n                left +=currentColWidth + padding;\n                col++;\n                currentColWidth=currentColHeight=0;\n            }\n            hitboxes[i]={\n                left,\n                top: currentColHeight,\n                col,\n                width: itemWidth,\n                height: itemHeight\n            };\n            currentColWidth=Math.max(currentColWidth, itemWidth);\n            currentColHeight +=itemHeight + padding;\n        });\n        totalWidth +=currentColWidth;\n        columnSizes.push({\n            width: currentColWidth,\n            height: currentColHeight\n        });\n        return totalWidth;\n    }\n    adjustHitBoxes(){\n        if(!this.options.display){\n            return;\n        }\n        const titleHeight=this._computeTitleHeight();\n        const { legendHitBoxes: hitboxes , options: { align , labels: { padding  } , rtl  }}=this;\n        const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(rtl, this.left, this.width);\n        if(this.isHorizontal()){\n            let row=0;\n            let left=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.left + padding, this.right - this.lineWidths[row]);\n            for (const hitbox of hitboxes){\n                if(row!==hitbox.row){\n                    row=hitbox.row;\n                    left=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.left + padding, this.right - this.lineWidths[row]);\n                }\n                hitbox.top +=this.top + titleHeight + padding;\n                hitbox.left=rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n                left +=hitbox.width + padding;\n            }\n        }else{\n            let col=0;\n            let top=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n            for (const hitbox of hitboxes){\n                if(hitbox.col!==col){\n                    col=hitbox.col;\n                    top=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n                }\n                hitbox.top=top;\n                hitbox.left +=this.left + padding;\n                hitbox.left=rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n                top +=hitbox.height + padding;\n            }\n        }\n    }\n    isHorizontal(){\n        return this.options.position==='top'||this.options.position==='bottom';\n    }\n    draw(){\n        if(this.options.display){\n            const ctx=this.ctx;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Y)(ctx, this);\n            this._draw();\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.$)(ctx);\n        }\n    }\n _draw(){\n        const { options: opts , columnSizes , lineWidths , ctx  }=this;\n        const { align , labels: labelOpts  }=opts;\n        const defaultColor=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.color;\n        const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(opts.rtl, this.left, this.width);\n        const labelFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(labelOpts.font);\n        const { padding  }=labelOpts;\n        const fontSize=labelFont.size;\n        const halfFontSize=fontSize / 2;\n        let cursor;\n        this.drawTitle();\n        ctx.textAlign=rtlHelper.textAlign('left');\n        ctx.textBaseline='middle';\n        ctx.lineWidth=0.5;\n        ctx.font=labelFont.string;\n        const { boxWidth , boxHeight , itemHeight  }=getBoxSize(labelOpts, fontSize);\n        const drawLegendBox=function(x, y, legendItem){\n            if(isNaN(boxWidth)||boxWidth <=0||isNaN(boxHeight)||boxHeight < 0){\n                return;\n            }\n            ctx.save();\n            const lineWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.lineWidth, 1);\n            ctx.fillStyle=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.fillStyle, defaultColor);\n            ctx.lineCap=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.lineCap, 'butt');\n            ctx.lineDashOffset=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.lineDashOffset, 0);\n            ctx.lineJoin=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.lineJoin, 'miter');\n            ctx.lineWidth=lineWidth;\n            ctx.strokeStyle=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.strokeStyle, defaultColor);\n            ctx.setLineDash((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(legendItem.lineDash, []));\n            if(labelOpts.usePointStyle){\n                const drawOptions={\n                    radius: boxHeight * Math.SQRT2 / 2,\n                    pointStyle: legendItem.pointStyle,\n                    rotation: legendItem.rotation,\n                    borderWidth: lineWidth\n                };\n                const centerX=rtlHelper.xPlus(x, boxWidth / 2);\n                const centerY=y + halfFontSize;\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aD)(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth&&boxWidth);\n            }else{\n                const yBoxTop=y + Math.max((fontSize - boxHeight) / 2, 0);\n                const xBoxLeft=rtlHelper.leftForLtr(x, boxWidth);\n                const borderRadius=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(legendItem.borderRadius);\n                ctx.beginPath();\n                if(Object.values(borderRadius).some((v)=>v!==0)){\n                    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.au)(ctx, {\n                        x: xBoxLeft,\n                        y: yBoxTop,\n                        w: boxWidth,\n                        h: boxHeight,\n                        radius: borderRadius\n                    });\n                }else{\n                    ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n                }\n                ctx.fill();\n                if(lineWidth!==0){\n                    ctx.stroke();\n                }\n            }\n            ctx.restore();\n        };\n        const fillText=function(x, y, legendItem){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, legendItem.text, x, y + itemHeight / 2, labelFont, {\n                strikethrough: legendItem.hidden,\n                textAlign: rtlHelper.textAlign(legendItem.textAlign)\n            });\n        };\n        const isHorizontal=this.isHorizontal();\n        const titleHeight=this._computeTitleHeight();\n        if(isHorizontal){\n            cursor={\n                x: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.left + padding, this.right - lineWidths[0]),\n                y: this.top + padding + titleHeight,\n                line: 0\n            };\n        }else{\n            cursor={\n                x: this.left + padding,\n                y: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n                line: 0\n            };\n        }\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aA)(this.ctx, opts.textDirection);\n        const lineHeight=itemHeight + padding;\n        this.legendItems.forEach((legendItem, i)=>{\n            ctx.strokeStyle=legendItem.fontColor;\n            ctx.fillStyle=legendItem.fontColor;\n            const textWidth=ctx.measureText(legendItem.text).width;\n            const textAlign=rtlHelper.textAlign(legendItem.textAlign||(legendItem.textAlign=labelOpts.textAlign));\n            const width=boxWidth + halfFontSize + textWidth;\n            let x=cursor.x;\n            let y=cursor.y;\n            rtlHelper.setWidth(this.width);\n            if(isHorizontal){\n                if(i > 0&&x + width + padding > this.right){\n                    y=cursor.y +=lineHeight;\n                    cursor.line++;\n                    x=cursor.x=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.left + padding, this.right - lineWidths[cursor.line]);\n                }\n            }else if(i > 0&&y + lineHeight > this.bottom){\n                x=cursor.x=x + columnSizes[cursor.line].width + padding;\n                cursor.line++;\n                y=cursor.y=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n            }\n            const realX=rtlHelper.x(x);\n            drawLegendBox(realX, y, legendItem);\n            x=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aB)(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width:this.right, opts.rtl);\n            fillText(rtlHelper.x(x), y, legendItem);\n            if(isHorizontal){\n                cursor.x +=width + padding;\n            }else if(typeof legendItem.text!=='string'){\n                const fontLineHeight=labelFont.lineHeight;\n                cursor.y +=calculateLegendItemHeight(legendItem, fontLineHeight) + padding;\n            }else{\n                cursor.y +=lineHeight;\n            }\n        });\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aC)(this.ctx, opts.textDirection);\n    }\n drawTitle(){\n        const opts=this.options;\n        const titleOpts=opts.title;\n        const titleFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(titleOpts.font);\n        const titlePadding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(titleOpts.padding);\n        if(!titleOpts.display){\n            return;\n        }\n        const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(opts.rtl, this.left, this.width);\n        const ctx=this.ctx;\n        const position=titleOpts.position;\n        const halfFontSize=titleFont.size / 2;\n        const topPaddingPlusHalfFontSize=titlePadding.top + halfFontSize;\n        let y;\n        let left=this.left;\n        let maxWidth=this.width;\n        if(this.isHorizontal()){\n            maxWidth=Math.max(...this.lineWidths);\n            y=this.top + topPaddingPlusHalfFontSize;\n            left=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(opts.align, left, this.right - maxWidth);\n        }else{\n            const maxHeight=this.columnSizes.reduce((acc, size)=>Math.max(acc, size.height), 0);\n            y=topPaddingPlusHalfFontSize + (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n        }\n        const x=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(position, left, left + maxWidth);\n        ctx.textAlign=rtlHelper.textAlign((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a1)(position));\n        ctx.textBaseline='middle';\n        ctx.strokeStyle=titleOpts.color;\n        ctx.fillStyle=titleOpts.color;\n        ctx.font=titleFont.string;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, titleOpts.text, x, y, titleFont);\n    }\n _computeTitleHeight(){\n        const titleOpts=this.options.title;\n        const titleFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(titleOpts.font);\n        const titlePadding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(titleOpts.padding);\n        return titleOpts.display ? titleFont.lineHeight + titlePadding.height:0;\n    }\n _getLegendItemAt(x, y){\n        let i, hitBox, lh;\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(x, this.left, this.right)&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(y, this.top, this.bottom)){\n            lh=this.legendHitBoxes;\n            for(i=0; i < lh.length; ++i){\n                hitBox=lh[i];\n                if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(x, hitBox.left, hitBox.left + hitBox.width)&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aj)(y, hitBox.top, hitBox.top + hitBox.height)){\n                    return this.legendItems[i];\n                }\n            }\n        }\n        return null;\n    }\n handleEvent(e){\n        const opts=this.options;\n        if(!isListened(e.type, opts)){\n            return;\n        }\n        const hoveredItem=this._getLegendItemAt(e.x, e.y);\n        if(e.type==='mousemove'||e.type==='mouseout'){\n            const previous=this._hoveredItem;\n            const sameItem=itemsEqual(previous, hoveredItem);\n            if(previous&&!sameItem){\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(opts.onLeave, [\n                    e,\n                    previous,\n                    this\n                ], this);\n            }\n            this._hoveredItem=hoveredItem;\n            if(hoveredItem&&!sameItem){\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(opts.onHover, [\n                    e,\n                    hoveredItem,\n                    this\n                ], this);\n            }\n        }else if(hoveredItem){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(opts.onClick, [\n                e,\n                hoveredItem,\n                this\n            ], this);\n        }\n    }\n}\nfunction calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight){\n    const itemWidth=calculateItemWidth(legendItem, boxWidth, labelFont, ctx);\n    const itemHeight=calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight);\n    return {\n        itemWidth,\n        itemHeight\n    };\n}\nfunction calculateItemWidth(legendItem, boxWidth, labelFont, ctx){\n    let legendItemText=legendItem.text;\n    if(legendItemText&&typeof legendItemText!=='string'){\n        legendItemText=legendItemText.reduce((a, b)=>a.length > b.length ? a:b);\n    }\n    return boxWidth + labelFont.size / 2 + ctx.measureText(legendItemText).width;\n}\nfunction calculateItemHeight(_itemHeight, legendItem, fontLineHeight){\n    let itemHeight=_itemHeight;\n    if(typeof legendItem.text!=='string'){\n        itemHeight=calculateLegendItemHeight(legendItem, fontLineHeight);\n    }\n    return itemHeight;\n}\nfunction calculateLegendItemHeight(legendItem, fontLineHeight){\n    const labelHeight=legendItem.text ? legendItem.text.length:0;\n    return fontLineHeight * labelHeight;\n}\nfunction isListened(type, opts){\n    if((type==='mousemove'||type==='mouseout')&&(opts.onHover||opts.onLeave)){\n        return true;\n    }\n    if(opts.onClick&&(type==='click'||type==='mouseup')){\n        return true;\n    }\n    return false;\n}\nvar plugin_legend={\n    id: 'legend',\n _element: Legend,\n    start (chart, _args, options){\n        const legend=chart.legend=new Legend({\n            ctx: chart.ctx,\n            options,\n            chart\n        });\n        layouts.configure(chart, legend, options);\n        layouts.addBox(chart, legend);\n    },\n    stop (chart){\n        layouts.removeBox(chart, chart.legend);\n        delete chart.legend;\n    },\n    beforeUpdate (chart, _args, options){\n        const legend=chart.legend;\n        layouts.configure(chart, legend, options);\n        legend.options=options;\n    },\n    afterUpdate (chart){\n        const legend=chart.legend;\n        legend.buildLabels();\n        legend.adjustHitBoxes();\n    },\n    afterEvent (chart, args){\n        if(!args.replay){\n            chart.legend.handleEvent(args.event);\n        }\n    },\n    defaults: {\n        display: true,\n        position: 'top',\n        align: 'center',\n        fullSize: true,\n        reverse: false,\n        weight: 1000,\n        onClick (e, legendItem, legend){\n            const index=legendItem.datasetIndex;\n            const ci=legend.chart;\n            if(ci.isDatasetVisible(index)){\n                ci.hide(index);\n                legendItem.hidden=true;\n            }else{\n                ci.show(index);\n                legendItem.hidden=false;\n            }\n        },\n        onHover: null,\n        onLeave: null,\n        labels: {\n            color: (ctx)=>ctx.chart.options.color,\n            boxWidth: 40,\n            padding: 10,\n            generateLabels (chart){\n                const datasets=chart.data.datasets;\n                const { labels: { usePointStyle , pointStyle , textAlign , color , useBorderRadius , borderRadius  }}=chart.legend.options;\n                return chart._getSortedDatasetMetas().map((meta)=>{\n                    const style=meta.controller.getStyle(usePointStyle ? 0:undefined);\n                    const borderWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(style.borderWidth);\n                    return {\n                        text: datasets[meta.index].label,\n                        fillStyle: style.backgroundColor,\n                        fontColor: color,\n                        hidden: !meta.visible,\n                        lineCap: style.borderCapStyle,\n                        lineDash: style.borderDash,\n                        lineDashOffset: style.borderDashOffset,\n                        lineJoin: style.borderJoinStyle,\n                        lineWidth: (borderWidth.width + borderWidth.height) / 4,\n                        strokeStyle: style.borderColor,\n                        pointStyle: pointStyle||style.pointStyle,\n                        rotation: style.rotation,\n                        textAlign: textAlign||style.textAlign,\n                        borderRadius: useBorderRadius&&(borderRadius||style.borderRadius),\n                        datasetIndex: meta.index\n                    };\n                }, this);\n            }\n        },\n        title: {\n            color: (ctx)=>ctx.chart.options.color,\n            display: false,\n            position: 'center',\n            text: ''\n        }\n    },\n    descriptors: {\n        _scriptable: (name)=>!name.startsWith('on'),\n        labels: {\n            _scriptable: (name)=>![\n                    'generateLabels',\n                    'filter',\n                    'sort'\n                ].includes(name)\n        }\n    }\n};\n\nclass Title extends Element {\n constructor(config){\n        super();\n        this.chart=config.chart;\n        this.options=config.options;\n        this.ctx=config.ctx;\n        this._padding=undefined;\n        this.top=undefined;\n        this.bottom=undefined;\n        this.left=undefined;\n        this.right=undefined;\n        this.width=undefined;\n        this.height=undefined;\n        this.position=undefined;\n        this.weight=undefined;\n        this.fullSize=undefined;\n    }\n    update(maxWidth, maxHeight){\n        const opts=this.options;\n        this.left=0;\n        this.top=0;\n        if(!opts.display){\n            this.width=this.height=this.right=this.bottom=0;\n            return;\n        }\n        this.width=this.right=maxWidth;\n        this.height=this.bottom=maxHeight;\n        const lineCount=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(opts.text) ? opts.text.length:1;\n        this._padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(opts.padding);\n        const textSize=lineCount * (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(opts.font).lineHeight + this._padding.height;\n        if(this.isHorizontal()){\n            this.height=textSize;\n        }else{\n            this.width=textSize;\n        }\n    }\n    isHorizontal(){\n        const pos=this.options.position;\n        return pos==='top'||pos==='bottom';\n    }\n    _drawArgs(offset){\n        const { top , left , bottom , right , options  }=this;\n        const align=options.align;\n        let rotation=0;\n        let maxWidth, titleX, titleY;\n        if(this.isHorizontal()){\n            titleX=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, left, right);\n            titleY=top + offset;\n            maxWidth=right - left;\n        }else{\n            if(options.position==='left'){\n                titleX=left + offset;\n                titleY=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, bottom, top);\n                rotation=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P * -0.5;\n            }else{\n                titleX=right - offset;\n                titleY=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a2)(align, top, bottom);\n                rotation=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P * 0.5;\n            }\n            maxWidth=bottom - top;\n        }\n        return {\n            titleX,\n            titleY,\n            maxWidth,\n            rotation\n        };\n    }\n    draw(){\n        const ctx=this.ctx;\n        const opts=this.options;\n        if(!opts.display){\n            return;\n        }\n        const fontOpts=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(opts.font);\n        const lineHeight=fontOpts.lineHeight;\n        const offset=lineHeight / 2 + this._padding.top;\n        const { titleX , titleY , maxWidth , rotation  }=this._drawArgs(offset);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, opts.text, 0, 0, fontOpts, {\n            color: opts.color,\n            maxWidth,\n            rotation,\n            textAlign: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a1)(opts.align),\n            textBaseline: 'middle',\n            translation: [\n                titleX,\n                titleY\n            ]\n        });\n    }\n}\nfunction createTitle(chart, titleOpts){\n    const title=new Title({\n        ctx: chart.ctx,\n        options: titleOpts,\n        chart\n    });\n    layouts.configure(chart, title, titleOpts);\n    layouts.addBox(chart, title);\n    chart.titleBlock=title;\n}\nvar plugin_title={\n    id: 'title',\n _element: Title,\n    start (chart, _args, options){\n        createTitle(chart, options);\n    },\n    stop (chart){\n        const titleBlock=chart.titleBlock;\n        layouts.removeBox(chart, titleBlock);\n        delete chart.titleBlock;\n    },\n    beforeUpdate (chart, _args, options){\n        const title=chart.titleBlock;\n        layouts.configure(chart, title, options);\n        title.options=options;\n    },\n    defaults: {\n        align: 'center',\n        display: false,\n        font: {\n            weight: 'bold'\n        },\n        fullSize: true,\n        padding: 10,\n        position: 'top',\n        text: '',\n        weight: 2000\n    },\n    defaultRoutes: {\n        color: 'color'\n    },\n    descriptors: {\n        _scriptable: true,\n        _indexable: false\n    }\n};\n\nconst map=new WeakMap();\nvar plugin_subtitle={\n    id: 'subtitle',\n    start (chart, _args, options){\n        const title=new Title({\n            ctx: chart.ctx,\n            options,\n            chart\n        });\n        layouts.configure(chart, title, options);\n        layouts.addBox(chart, title);\n        map.set(chart, title);\n    },\n    stop (chart){\n        layouts.removeBox(chart, map.get(chart));\n        map.delete(chart);\n    },\n    beforeUpdate (chart, _args, options){\n        const title=map.get(chart);\n        layouts.configure(chart, title, options);\n        title.options=options;\n    },\n    defaults: {\n        align: 'center',\n        display: false,\n        font: {\n            weight: 'normal'\n        },\n        fullSize: true,\n        padding: 0,\n        position: 'top',\n        text: '',\n        weight: 1500\n    },\n    defaultRoutes: {\n        color: 'color'\n    },\n    descriptors: {\n        _scriptable: true,\n        _indexable: false\n    }\n};\n\nconst positioners={\n average (items){\n        if(!items.length){\n            return false;\n        }\n        let i, len;\n        let x=0;\n        let y=0;\n        let count=0;\n        for(i=0, len=items.length; i < len; ++i){\n            const el=items[i].element;\n            if(el&&el.hasValue()){\n                const pos=el.tooltipPosition();\n                x +=pos.x;\n                y +=pos.y;\n                ++count;\n            }\n        }\n        return {\n            x: x / count,\n            y: y / count\n        };\n    },\n nearest (items, eventPosition){\n        if(!items.length){\n            return false;\n        }\n        let x=eventPosition.x;\n        let y=eventPosition.y;\n        let minDistance=Number.POSITIVE_INFINITY;\n        let i, len, nearestElement;\n        for(i=0, len=items.length; i < len; ++i){\n            const el=items[i].element;\n            if(el&&el.hasValue()){\n                const center=el.getCenterPoint();\n                const d=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aE)(eventPosition, center);\n                if(d < minDistance){\n                    minDistance=d;\n                    nearestElement=el;\n                }\n            }\n        }\n        if(nearestElement){\n            const tp=nearestElement.tooltipPosition();\n            x=tp.x;\n            y=tp.y;\n        }\n        return {\n            x,\n            y\n        };\n    }\n};\nfunction pushOrConcat(base, toPush){\n    if(toPush){\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(toPush)){\n            Array.prototype.push.apply(base, toPush);\n        }else{\n            base.push(toPush);\n        }\n    }\n    return base;\n}\n function splitNewlines(str){\n    if((typeof str==='string'||str instanceof String)&&str.indexOf('\\n') > -1){\n        return str.split('\\n');\n    }\n    return str;\n}\n function createTooltipItem(chart, item){\n    const { element , datasetIndex , index  }=item;\n    const controller=chart.getDatasetMeta(datasetIndex).controller;\n    const { label , value  }=controller.getLabelAndValue(index);\n    return {\n        chart,\n        label,\n        parsed: controller.getParsed(index),\n        raw: chart.data.datasets[datasetIndex].data[index],\n        formattedValue: value,\n        dataset: controller.getDataset(),\n        dataIndex: index,\n        datasetIndex,\n        element\n    };\n}\n function getTooltipSize(tooltip, options){\n    const ctx=tooltip.chart.ctx;\n    const { body , footer , title  }=tooltip;\n    const { boxWidth , boxHeight  }=options;\n    const bodyFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.bodyFont);\n    const titleFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.titleFont);\n    const footerFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.footerFont);\n    const titleLineCount=title.length;\n    const footerLineCount=footer.length;\n    const bodyLineItemCount=body.length;\n    const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(options.padding);\n    let height=padding.height;\n    let width=0;\n    let combinedBodyLength=body.reduce((count, bodyItem)=>count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n    combinedBodyLength +=tooltip.beforeBody.length + tooltip.afterBody.length;\n    if(titleLineCount){\n        height +=titleLineCount * titleFont.lineHeight + (titleLineCount - 1) * options.titleSpacing + options.titleMarginBottom;\n    }\n    if(combinedBodyLength){\n        const bodyLineHeight=options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight):bodyFont.lineHeight;\n        height +=bodyLineItemCount * bodyLineHeight + (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight + (combinedBodyLength - 1) * options.bodySpacing;\n    }\n    if(footerLineCount){\n        height +=options.footerMarginTop + footerLineCount * footerFont.lineHeight + (footerLineCount - 1) * options.footerSpacing;\n    }\n    let widthPadding=0;\n    const maxLineWidth=function(line){\n        width=Math.max(width, ctx.measureText(line).width + widthPadding);\n    };\n    ctx.save();\n    ctx.font=titleFont.string;\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(tooltip.title, maxLineWidth);\n    ctx.font=bodyFont.string;\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n    widthPadding=options.displayColors ? boxWidth + 2 + options.boxPadding:0;\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(body, (bodyItem)=>{\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(bodyItem.before, maxLineWidth);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(bodyItem.lines, maxLineWidth);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(bodyItem.after, maxLineWidth);\n    });\n    widthPadding=0;\n    ctx.font=footerFont.string;\n    (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(tooltip.footer, maxLineWidth);\n    ctx.restore();\n    width +=padding.width;\n    return {\n        width,\n        height\n    };\n}\nfunction determineYAlign(chart, size){\n    const { y , height  }=size;\n    if(y < height / 2){\n        return 'top';\n    }else if(y > chart.height - height / 2){\n        return 'bottom';\n    }\n    return 'center';\n}\nfunction doesNotFitWithAlign(xAlign, chart, options, size){\n    const { x , width  }=size;\n    const caret=options.caretSize + options.caretPadding;\n    if(xAlign==='left'&&x + width + caret > chart.width){\n        return true;\n    }\n    if(xAlign==='right'&&x - width - caret < 0){\n        return true;\n    }\n}\nfunction determineXAlign(chart, options, size, yAlign){\n    const { x , width  }=size;\n    const { width: chartWidth , chartArea: { left , right  }}=chart;\n    let xAlign='center';\n    if(yAlign==='center'){\n        xAlign=x <=(left + right) / 2 ? 'left':'right';\n    }else if(x <=width / 2){\n        xAlign='left';\n    }else if(x >=chartWidth - width / 2){\n        xAlign='right';\n    }\n    if(doesNotFitWithAlign(xAlign, chart, options, size)){\n        xAlign='center';\n    }\n    return xAlign;\n}\n function determineAlignment(chart, options, size){\n    const yAlign=size.yAlign||options.yAlign||determineYAlign(chart, size);\n    return {\n        xAlign: size.xAlign||options.xAlign||determineXAlign(chart, options, size, yAlign),\n        yAlign\n    };\n}\nfunction alignX(size, xAlign){\n    let { x , width  }=size;\n    if(xAlign==='right'){\n        x -=width;\n    }else if(xAlign==='center'){\n        x -=width / 2;\n    }\n    return x;\n}\nfunction alignY(size, yAlign, paddingAndSize){\n    let { y , height  }=size;\n    if(yAlign==='top'){\n        y +=paddingAndSize;\n    }else if(yAlign==='bottom'){\n        y -=height + paddingAndSize;\n    }else{\n        y -=height / 2;\n    }\n    return y;\n}\n function getBackgroundPoint(options, size, alignment, chart){\n    const { caretSize , caretPadding , cornerRadius  }=options;\n    const { xAlign , yAlign  }=alignment;\n    const paddingAndSize=caretSize + caretPadding;\n    const { topLeft , topRight , bottomLeft , bottomRight  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(cornerRadius);\n    let x=alignX(size, xAlign);\n    const y=alignY(size, yAlign, paddingAndSize);\n    if(yAlign==='center'){\n        if(xAlign==='left'){\n            x +=paddingAndSize;\n        }else if(xAlign==='right'){\n            x -=paddingAndSize;\n        }\n    }else if(xAlign==='left'){\n        x -=Math.max(topLeft, bottomLeft) + caretSize;\n    }else if(xAlign==='right'){\n        x +=Math.max(topRight, bottomRight) + caretSize;\n    }\n    return {\n        x: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(x, 0, chart.width - size.width),\n        y: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(y, 0, chart.height - size.height)\n    };\n}\nfunction getAlignedX(tooltip, align, options){\n    const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(options.padding);\n    return align==='center' ? tooltip.x + tooltip.width / 2:align==='right' ? tooltip.x + tooltip.width - padding.right:tooltip.x + padding.left;\n}\n function getBeforeAfterBodyLines(callback){\n    return pushOrConcat([], splitNewlines(callback));\n}\nfunction createTooltipContext(parent, tooltip, tooltipItems){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        tooltip,\n        tooltipItems,\n        type: 'tooltip'\n    });\n}\nfunction overrideCallbacks(callbacks, context){\n    const override=context&&context.dataset&&context.dataset.tooltip&&context.dataset.tooltip.callbacks;\n    return override ? callbacks.override(override):callbacks;\n}\nconst defaultCallbacks={\n    beforeTitle: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    title (tooltipItems){\n        if(tooltipItems.length > 0){\n            const item=tooltipItems[0];\n            const labels=item.chart.data.labels;\n            const labelCount=labels ? labels.length:0;\n            if(this&&this.options&&this.options.mode==='dataset'){\n                return item.dataset.label||'';\n            }else if(item.label){\n                return item.label;\n            }else if(labelCount > 0&&item.dataIndex < labelCount){\n                return labels[item.dataIndex];\n            }\n        }\n        return '';\n    },\n    afterTitle: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    beforeBody: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    beforeLabel: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    label (tooltipItem){\n        if(this&&this.options&&this.options.mode==='dataset'){\n            return tooltipItem.label + ': ' + tooltipItem.formattedValue||tooltipItem.formattedValue;\n        }\n        let label=tooltipItem.dataset.label||'';\n        if(label){\n            label +=': ';\n        }\n        const value=tooltipItem.formattedValue;\n        if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(value)){\n            label +=value;\n        }\n        return label;\n    },\n    labelColor (tooltipItem){\n        const meta=tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options=meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n            borderColor: options.borderColor,\n            backgroundColor: options.backgroundColor,\n            borderWidth: options.borderWidth,\n            borderDash: options.borderDash,\n            borderDashOffset: options.borderDashOffset,\n            borderRadius: 0\n        };\n    },\n    labelTextColor (){\n        return this.options.bodyColor;\n    },\n    labelPointStyle (tooltipItem){\n        const meta=tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options=meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n            pointStyle: options.pointStyle,\n            rotation: options.rotation\n        };\n    },\n    afterLabel: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    afterBody: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    beforeFooter: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    footer: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF,\n    afterFooter: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aF\n};\n function invokeCallbackWithFallback(callbacks, name, ctx, arg){\n    const result=callbacks[name].call(ctx, arg);\n    if(typeof result==='undefined'){\n        return defaultCallbacks[name].call(ctx, arg);\n    }\n    return result;\n}\nclass Tooltip extends Element {\n static positioners=positioners;\n    constructor(config){\n        super();\n        this.opacity=0;\n        this._active=[];\n        this._eventPosition=undefined;\n        this._size=undefined;\n        this._cachedAnimations=undefined;\n        this._tooltipItems=[];\n        this.$animations=undefined;\n        this.$context=undefined;\n        this.chart=config.chart;\n        this.options=config.options;\n        this.dataPoints=undefined;\n        this.title=undefined;\n        this.beforeBody=undefined;\n        this.body=undefined;\n        this.afterBody=undefined;\n        this.footer=undefined;\n        this.xAlign=undefined;\n        this.yAlign=undefined;\n        this.x=undefined;\n        this.y=undefined;\n        this.height=undefined;\n        this.width=undefined;\n        this.caretX=undefined;\n        this.caretY=undefined;\n        this.labelColors=undefined;\n        this.labelPointStyles=undefined;\n        this.labelTextColors=undefined;\n    }\n    initialize(options){\n        this.options=options;\n        this._cachedAnimations=undefined;\n        this.$context=undefined;\n    }\n _resolveAnimations(){\n        const cached=this._cachedAnimations;\n        if(cached){\n            return cached;\n        }\n        const chart=this.chart;\n        const options=this.options.setContext(this.getContext());\n        const opts=options.enabled&&chart.options.animation&&options.animations;\n        const animations=new Animations(this.chart, opts);\n        if(opts._cacheable){\n            this._cachedAnimations=Object.freeze(animations);\n        }\n        return animations;\n    }\n getContext(){\n        return this.$context||(this.$context=createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n    }\n    getTitle(context, options){\n        const { callbacks  }=options;\n        const beforeTitle=invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);\n        const title=invokeCallbackWithFallback(callbacks, 'title', this, context);\n        const afterTitle=invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);\n        let lines=[];\n        lines=pushOrConcat(lines, splitNewlines(beforeTitle));\n        lines=pushOrConcat(lines, splitNewlines(title));\n        lines=pushOrConcat(lines, splitNewlines(afterTitle));\n        return lines;\n    }\n    getBeforeBody(tooltipItems, options){\n        return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'beforeBody', this, tooltipItems));\n    }\n    getBody(tooltipItems, options){\n        const { callbacks  }=options;\n        const bodyItems=[];\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(tooltipItems, (context)=>{\n            const bodyItem={\n                before: [],\n                lines: [],\n                after: []\n            };\n            const scoped=overrideCallbacks(callbacks, context);\n            pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));\n            pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));\n            pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));\n            bodyItems.push(bodyItem);\n        });\n        return bodyItems;\n    }\n    getAfterBody(tooltipItems, options){\n        return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'afterBody', this, tooltipItems));\n    }\n    getFooter(tooltipItems, options){\n        const { callbacks  }=options;\n        const beforeFooter=invokeCallbackWithFallback(callbacks, 'beforeFooter', this, tooltipItems);\n        const footer=invokeCallbackWithFallback(callbacks, 'footer', this, tooltipItems);\n        const afterFooter=invokeCallbackWithFallback(callbacks, 'afterFooter', this, tooltipItems);\n        let lines=[];\n        lines=pushOrConcat(lines, splitNewlines(beforeFooter));\n        lines=pushOrConcat(lines, splitNewlines(footer));\n        lines=pushOrConcat(lines, splitNewlines(afterFooter));\n        return lines;\n    }\n _createItems(options){\n        const active=this._active;\n        const data=this.chart.data;\n        const labelColors=[];\n        const labelPointStyles=[];\n        const labelTextColors=[];\n        let tooltipItems=[];\n        let i, len;\n        for(i=0, len=active.length; i < len; ++i){\n            tooltipItems.push(createTooltipItem(this.chart, active[i]));\n        }\n        if(options.filter){\n            tooltipItems=tooltipItems.filter((element, index, array)=>options.filter(element, index, array, data));\n        }\n        if(options.itemSort){\n            tooltipItems=tooltipItems.sort((a, b)=>options.itemSort(a, b, data));\n        }\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(tooltipItems, (context)=>{\n            const scoped=overrideCallbacks(options.callbacks, context);\n            labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', this, context));\n            labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', this, context));\n            labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', this, context));\n        });\n        this.labelColors=labelColors;\n        this.labelPointStyles=labelPointStyles;\n        this.labelTextColors=labelTextColors;\n        this.dataPoints=tooltipItems;\n        return tooltipItems;\n    }\n    update(changed, replay){\n        const options=this.options.setContext(this.getContext());\n        const active=this._active;\n        let properties;\n        let tooltipItems=[];\n        if(!active.length){\n            if(this.opacity!==0){\n                properties={\n                    opacity: 0\n                };\n            }\n        }else{\n            const position=positioners[options.position].call(this, active, this._eventPosition);\n            tooltipItems=this._createItems(options);\n            this.title=this.getTitle(tooltipItems, options);\n            this.beforeBody=this.getBeforeBody(tooltipItems, options);\n            this.body=this.getBody(tooltipItems, options);\n            this.afterBody=this.getAfterBody(tooltipItems, options);\n            this.footer=this.getFooter(tooltipItems, options);\n            const size=this._size=getTooltipSize(this, options);\n            const positionAndSize=Object.assign({}, position, size);\n            const alignment=determineAlignment(this.chart, options, positionAndSize);\n            const backgroundPoint=getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n            this.xAlign=alignment.xAlign;\n            this.yAlign=alignment.yAlign;\n            properties={\n                opacity: 1,\n                x: backgroundPoint.x,\n                y: backgroundPoint.y,\n                width: size.width,\n                height: size.height,\n                caretX: position.x,\n                caretY: position.y\n            };\n        }\n        this._tooltipItems=tooltipItems;\n        this.$context=undefined;\n        if(properties){\n            this._resolveAnimations().update(this, properties);\n        }\n        if(changed&&options.external){\n            options.external.call(this, {\n                chart: this.chart,\n                tooltip: this,\n                replay\n            });\n        }\n    }\n    drawCaret(tooltipPoint, ctx, size, options){\n        const caretPosition=this.getCaretPosition(tooltipPoint, size, options);\n        ctx.lineTo(caretPosition.x1, caretPosition.y1);\n        ctx.lineTo(caretPosition.x2, caretPosition.y2);\n        ctx.lineTo(caretPosition.x3, caretPosition.y3);\n    }\n    getCaretPosition(tooltipPoint, size, options){\n        const { xAlign , yAlign  }=this;\n        const { caretSize , cornerRadius  }=options;\n        const { topLeft , topRight , bottomLeft , bottomRight  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(cornerRadius);\n        const { x: ptX , y: ptY  }=tooltipPoint;\n        const { width , height  }=size;\n        let x1, x2, x3, y1, y2, y3;\n        if(yAlign==='center'){\n            y2=ptY + height / 2;\n            if(xAlign==='left'){\n                x1=ptX;\n                x2=x1 - caretSize;\n                y1=y2 + caretSize;\n                y3=y2 - caretSize;\n            }else{\n                x1=ptX + width;\n                x2=x1 + caretSize;\n                y1=y2 - caretSize;\n                y3=y2 + caretSize;\n            }\n            x3=x1;\n        }else{\n            if(xAlign==='left'){\n                x2=ptX + Math.max(topLeft, bottomLeft) + caretSize;\n            }else if(xAlign==='right'){\n                x2=ptX + width - Math.max(topRight, bottomRight) - caretSize;\n            }else{\n                x2=this.caretX;\n            }\n            if(yAlign==='top'){\n                y1=ptY;\n                y2=y1 - caretSize;\n                x1=x2 - caretSize;\n                x3=x2 + caretSize;\n            }else{\n                y1=ptY + height;\n                y2=y1 + caretSize;\n                x1=x2 + caretSize;\n                x3=x2 - caretSize;\n            }\n            y3=y1;\n        }\n        return {\n            x1,\n            x2,\n            x3,\n            y1,\n            y2,\n            y3\n        };\n    }\n    drawTitle(pt, ctx, options){\n        const title=this.title;\n        const length=title.length;\n        let titleFont, titleSpacing, i;\n        if(length){\n            const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(options.rtl, this.x, this.width);\n            pt.x=getAlignedX(this, options.titleAlign, options);\n            ctx.textAlign=rtlHelper.textAlign(options.titleAlign);\n            ctx.textBaseline='middle';\n            titleFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.titleFont);\n            titleSpacing=options.titleSpacing;\n            ctx.fillStyle=options.titleColor;\n            ctx.font=titleFont.string;\n            for(i=0; i < length; ++i){\n                ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n                pt.y +=titleFont.lineHeight + titleSpacing;\n                if(i + 1===length){\n                    pt.y +=options.titleMarginBottom - titleSpacing;\n                }\n            }\n        }\n    }\n _drawColorBox(ctx, pt, i, rtlHelper, options){\n        const labelColor=this.labelColors[i];\n        const labelPointStyle=this.labelPointStyles[i];\n        const { boxHeight , boxWidth  }=options;\n        const bodyFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.bodyFont);\n        const colorX=getAlignedX(this, 'left', options);\n        const rtlColorX=rtlHelper.x(colorX);\n        const yOffSet=boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2:0;\n        const colorY=pt.y + yOffSet;\n        if(options.usePointStyle){\n            const drawOptions={\n                radius: Math.min(boxWidth, boxHeight) / 2,\n                pointStyle: labelPointStyle.pointStyle,\n                rotation: labelPointStyle.rotation,\n                borderWidth: 1\n            };\n            const centerX=rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n            const centerY=colorY + boxHeight / 2;\n            ctx.strokeStyle=options.multiKeyBackground;\n            ctx.fillStyle=options.multiKeyBackground;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.at)(ctx, drawOptions, centerX, centerY);\n            ctx.strokeStyle=labelColor.borderColor;\n            ctx.fillStyle=labelColor.backgroundColor;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.at)(ctx, drawOptions, centerX, centerY);\n        }else{\n            ctx.lineWidth=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.i)(labelColor.borderWidth) ? Math.max(...Object.values(labelColor.borderWidth)):labelColor.borderWidth||1;\n            ctx.strokeStyle=labelColor.borderColor;\n            ctx.setLineDash(labelColor.borderDash||[]);\n            ctx.lineDashOffset=labelColor.borderDashOffset||0;\n            const outerX=rtlHelper.leftForLtr(rtlColorX, boxWidth);\n            const innerX=rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);\n            const borderRadius=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(labelColor.borderRadius);\n            if(Object.values(borderRadius).some((v)=>v!==0)){\n                ctx.beginPath();\n                ctx.fillStyle=options.multiKeyBackground;\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.au)(ctx, {\n                    x: outerX,\n                    y: colorY,\n                    w: boxWidth,\n                    h: boxHeight,\n                    radius: borderRadius\n                });\n                ctx.fill();\n                ctx.stroke();\n                ctx.fillStyle=labelColor.backgroundColor;\n                ctx.beginPath();\n                (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.au)(ctx, {\n                    x: innerX,\n                    y: colorY + 1,\n                    w: boxWidth - 2,\n                    h: boxHeight - 2,\n                    radius: borderRadius\n                });\n                ctx.fill();\n            }else{\n                ctx.fillStyle=options.multiKeyBackground;\n                ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n                ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n                ctx.fillStyle=labelColor.backgroundColor;\n                ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n            }\n        }\n        ctx.fillStyle=this.labelTextColors[i];\n    }\n    drawBody(pt, ctx, options){\n        const { body  }=this;\n        const { bodySpacing , bodyAlign , displayColors , boxHeight , boxWidth , boxPadding  }=options;\n        const bodyFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.bodyFont);\n        let bodyLineHeight=bodyFont.lineHeight;\n        let xLinePadding=0;\n        const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(options.rtl, this.x, this.width);\n        const fillLineOfText=function(line){\n            ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n            pt.y +=bodyLineHeight + bodySpacing;\n        };\n        const bodyAlignForCalculation=rtlHelper.textAlign(bodyAlign);\n        let bodyItem, textColor, lines, i, j, ilen, jlen;\n        ctx.textAlign=bodyAlign;\n        ctx.textBaseline='middle';\n        ctx.font=bodyFont.string;\n        pt.x=getAlignedX(this, bodyAlignForCalculation, options);\n        ctx.fillStyle=options.bodyColor;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.beforeBody, fillLineOfText);\n        xLinePadding=displayColors&&bodyAlignForCalculation!=='right' ? bodyAlign==='center' ? boxWidth / 2 + boxPadding:boxWidth + 2 + boxPadding:0;\n        for(i=0, ilen=body.length; i < ilen; ++i){\n            bodyItem=body[i];\n            textColor=this.labelTextColors[i];\n            ctx.fillStyle=textColor;\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(bodyItem.before, fillLineOfText);\n            lines=bodyItem.lines;\n            if(displayColors&&lines.length){\n                this._drawColorBox(ctx, pt, i, rtlHelper, options);\n                bodyLineHeight=Math.max(bodyFont.lineHeight, boxHeight);\n            }\n            for(j=0, jlen=lines.length; j < jlen; ++j){\n                fillLineOfText(lines[j]);\n                bodyLineHeight=bodyFont.lineHeight;\n            }\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(bodyItem.after, fillLineOfText);\n        }\n        xLinePadding=0;\n        bodyLineHeight=bodyFont.lineHeight;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.F)(this.afterBody, fillLineOfText);\n        pt.y -=bodySpacing;\n    }\n    drawFooter(pt, ctx, options){\n        const footer=this.footer;\n        const length=footer.length;\n        let footerFont, i;\n        if(length){\n            const rtlHelper=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.az)(options.rtl, this.x, this.width);\n            pt.x=getAlignedX(this, options.footerAlign, options);\n            pt.y +=options.footerMarginTop;\n            ctx.textAlign=rtlHelper.textAlign(options.footerAlign);\n            ctx.textBaseline='middle';\n            footerFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(options.footerFont);\n            ctx.fillStyle=options.footerColor;\n            ctx.font=footerFont.string;\n            for(i=0; i < length; ++i){\n                ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n                pt.y +=footerFont.lineHeight + options.footerSpacing;\n            }\n        }\n    }\n    drawBackground(pt, ctx, tooltipSize, options){\n        const { xAlign , yAlign  }=this;\n        const { x , y  }=pt;\n        const { width , height  }=tooltipSize;\n        const { topLeft , topRight , bottomLeft , bottomRight  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(options.cornerRadius);\n        ctx.fillStyle=options.backgroundColor;\n        ctx.strokeStyle=options.borderColor;\n        ctx.lineWidth=options.borderWidth;\n        ctx.beginPath();\n        ctx.moveTo(x + topLeft, y);\n        if(yAlign==='top'){\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + width - topRight, y);\n        ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n        if(yAlign==='center'&&xAlign==='right'){\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + width, y + height - bottomRight);\n        ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n        if(yAlign==='bottom'){\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x + bottomLeft, y + height);\n        ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n        if(yAlign==='center'&&xAlign==='left'){\n            this.drawCaret(pt, ctx, tooltipSize, options);\n        }\n        ctx.lineTo(x, y + topLeft);\n        ctx.quadraticCurveTo(x, y, x + topLeft, y);\n        ctx.closePath();\n        ctx.fill();\n        if(options.borderWidth > 0){\n            ctx.stroke();\n        }\n    }\n _updateAnimationTarget(options){\n        const chart=this.chart;\n        const anims=this.$animations;\n        const animX=anims&&anims.x;\n        const animY=anims&&anims.y;\n        if(animX||animY){\n            const position=positioners[options.position].call(this, this._active, this._eventPosition);\n            if(!position){\n                return;\n            }\n            const size=this._size=getTooltipSize(this, options);\n            const positionAndSize=Object.assign({}, position, this._size);\n            const alignment=determineAlignment(chart, options, positionAndSize);\n            const point=getBackgroundPoint(options, positionAndSize, alignment, chart);\n            if(animX._to!==point.x||animY._to!==point.y){\n                this.xAlign=alignment.xAlign;\n                this.yAlign=alignment.yAlign;\n                this.width=size.width;\n                this.height=size.height;\n                this.caretX=position.x;\n                this.caretY=position.y;\n                this._resolveAnimations().update(this, point);\n            }\n        }\n    }\n _willRender(){\n        return !!this.opacity;\n    }\n    draw(ctx){\n        const options=this.options.setContext(this.getContext());\n        let opacity=this.opacity;\n        if(!opacity){\n            return;\n        }\n        this._updateAnimationTarget(options);\n        const tooltipSize={\n            width: this.width,\n            height: this.height\n        };\n        const pt={\n            x: this.x,\n            y: this.y\n        };\n        opacity=Math.abs(opacity) < 1e-3 ? 0:opacity;\n        const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(options.padding);\n        const hasTooltipContent=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;\n        if(options.enabled&&hasTooltipContent){\n            ctx.save();\n            ctx.globalAlpha=opacity;\n            this.drawBackground(pt, ctx, tooltipSize, options);\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aA)(ctx, options.textDirection);\n            pt.y +=padding.top;\n            this.drawTitle(pt, ctx, options);\n            this.drawBody(pt, ctx, options);\n            this.drawFooter(pt, ctx, options);\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aC)(ctx, options.textDirection);\n            ctx.restore();\n        }\n    }\n getActiveElements(){\n        return this._active||[];\n    }\n setActiveElements(activeElements, eventPosition){\n        const lastActive=this._active;\n        const active=activeElements.map(({ datasetIndex , index  })=>{\n            const meta=this.chart.getDatasetMeta(datasetIndex);\n            if(!meta){\n                throw new Error('Cannot find a dataset at index ' + datasetIndex);\n            }\n            return {\n                datasetIndex,\n                element: meta.data[index],\n                index\n            };\n        });\n        const changed = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ah)(lastActive, active);\n        const positionChanged=this._positionChanged(active, eventPosition);\n        if(changed||positionChanged){\n            this._active=active;\n            this._eventPosition=eventPosition;\n            this._ignoreReplayEvents=true;\n            this.update(true);\n        }\n    }\n handleEvent(e, replay, inChartArea=true){\n        if(replay&&this._ignoreReplayEvents){\n            return false;\n        }\n        this._ignoreReplayEvents=false;\n        const options=this.options;\n        const lastActive=this._active||[];\n        const active=this._getActiveElements(e, lastActive, replay, inChartArea);\n        const positionChanged=this._positionChanged(active, e);\n        const changed=replay||!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ah)(active, lastActive)||positionChanged;\n        if(changed){\n            this._active=active;\n            if(options.enabled||options.external){\n                this._eventPosition={\n                    x: e.x,\n                    y: e.y\n                };\n                this.update(true, replay);\n            }\n        }\n        return changed;\n    }\n _getActiveElements(e, lastActive, replay, inChartArea){\n        const options=this.options;\n        if(e.type==='mouseout'){\n            return [];\n        }\n        if(!inChartArea){\n            return lastActive;\n        }\n        const active=this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n        if(options.reverse){\n            active.reverse();\n        }\n        return active;\n    }\n _positionChanged(active, e){\n        const { caretX , caretY , options  }=this;\n        const position=positioners[options.position].call(this, active, e);\n        return position!==false&&(caretX!==position.x||caretY!==position.y);\n    }\n}\nvar plugin_tooltip={\n    id: 'tooltip',\n    _element: Tooltip,\n    positioners,\n    afterInit (chart, _args, options){\n        if(options){\n            chart.tooltip=new Tooltip({\n                chart,\n                options\n            });\n        }\n    },\n    beforeUpdate (chart, _args, options){\n        if(chart.tooltip){\n            chart.tooltip.initialize(options);\n        }\n    },\n    reset (chart, _args, options){\n        if(chart.tooltip){\n            chart.tooltip.initialize(options);\n        }\n    },\n    afterDraw (chart){\n        const tooltip=chart.tooltip;\n        if(tooltip&&tooltip._willRender()){\n            const args={\n                tooltip\n            };\n            if(chart.notifyPlugins('beforeTooltipDraw', {\n                ...args,\n                cancelable: true\n            })===false){\n                return;\n            }\n            tooltip.draw(chart.ctx);\n            chart.notifyPlugins('afterTooltipDraw', args);\n        }\n    },\n    afterEvent (chart, args){\n        if(chart.tooltip){\n            const useFinalPosition=args.replay;\n            if(chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)){\n                args.changed=true;\n            }\n        }\n    },\n    defaults: {\n        enabled: true,\n        external: null,\n        position: 'average',\n        backgroundColor: 'rgba(0,0,0,0.8)',\n        titleColor: '#fff',\n        titleFont: {\n            weight: 'bold'\n        },\n        titleSpacing: 2,\n        titleMarginBottom: 6,\n        titleAlign: 'left',\n        bodyColor: '#fff',\n        bodySpacing: 2,\n        bodyFont: {},\n        bodyAlign: 'left',\n        footerColor: '#fff',\n        footerSpacing: 2,\n        footerMarginTop: 6,\n        footerFont: {\n            weight: 'bold'\n        },\n        footerAlign: 'left',\n        padding: 6,\n        caretPadding: 2,\n        caretSize: 5,\n        cornerRadius: 6,\n        boxHeight: (ctx, opts)=>opts.bodyFont.size,\n        boxWidth: (ctx, opts)=>opts.bodyFont.size,\n        multiKeyBackground: '#fff',\n        displayColors: true,\n        boxPadding: 0,\n        borderColor: 'rgba(0,0,0,0)',\n        borderWidth: 0,\n        animation: {\n            duration: 400,\n            easing: 'easeOutQuart'\n        },\n        animations: {\n            numbers: {\n                type: 'number',\n                properties: [\n                    'x',\n                    'y',\n                    'width',\n                    'height',\n                    'caretX',\n                    'caretY'\n                ]\n            },\n            opacity: {\n                easing: 'linear',\n                duration: 200\n            }\n        },\n        callbacks: defaultCallbacks\n    },\n    defaultRoutes: {\n        bodyFont: 'font',\n        footerFont: 'font',\n        titleFont: 'font'\n    },\n    descriptors: {\n        _scriptable: (name)=>name!=='filter'&&name!=='itemSort'&&name!=='external',\n        _indexable: false,\n        callbacks: {\n            _scriptable: false,\n            _indexable: false\n        },\n        animation: {\n            _fallback: false\n        },\n        animations: {\n            _fallback: 'animation'\n        }\n    },\n    additionalOptionScopes: [\n        'interaction'\n    ]\n};\n\nvar plugins=/*#__PURE__*/Object.freeze({\n__proto__: null,\nColors: plugin_colors,\nDecimation: plugin_decimation,\nFiller: index,\nLegend: plugin_legend,\nSubTitle: plugin_subtitle,\nTitle: plugin_title,\nTooltip: plugin_tooltip\n});\n\nconst addIfString=(labels, raw, index, addedLabels)=>{\n    if(typeof raw==='string'){\n        index=labels.push(raw) - 1;\n        addedLabels.unshift({\n            index,\n            label: raw\n        });\n    }else if(isNaN(raw)){\n        index=null;\n    }\n    return index;\n};\nfunction findOrAddLabel(labels, raw, index, addedLabels){\n    const first=labels.indexOf(raw);\n    if(first===-1){\n        return addIfString(labels, raw, index, addedLabels);\n    }\n    const last=labels.lastIndexOf(raw);\n    return first!==last ? index:first;\n}\nconst validIndex=(index, max)=>index===null ? null:(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(Math.round(index), 0, max);\nfunction _getLabelForValue(value){\n    const labels=this.getLabels();\n    if(value >=0&&value < labels.length){\n        return labels[value];\n    }\n    return value;\n}\nclass CategoryScale extends Scale {\n    static id='category';\n static defaults={\n        ticks: {\n            callback: _getLabelForValue\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this._startValue=undefined;\n        this._valueRange=0;\n        this._addedLabels=[];\n    }\n    init(scaleOptions){\n        const added=this._addedLabels;\n        if(added.length){\n            const labels=this.getLabels();\n            for (const { index , label  } of added){\n                if(labels[index]===label){\n                    labels.splice(index, 1);\n                }\n            }\n            this._addedLabels=[];\n        }\n        super.init(scaleOptions);\n    }\n    parse(raw, index){\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(raw)){\n            return null;\n        }\n        const labels=this.getLabels();\n        index=isFinite(index)&&labels[index]===raw ? index:findOrAddLabel(labels, raw, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(index, raw), this._addedLabels);\n        return validIndex(index, labels.length - 1);\n    }\n    determineDataLimits(){\n        const { minDefined , maxDefined  }=this.getUserBounds();\n        let { min , max  }=this.getMinMax(true);\n        if(this.options.bounds==='ticks'){\n            if(!minDefined){\n                min=0;\n            }\n            if(!maxDefined){\n                max=this.getLabels().length - 1;\n            }\n        }\n        this.min=min;\n        this.max=max;\n    }\n    buildTicks(){\n        const min=this.min;\n        const max=this.max;\n        const offset=this.options.offset;\n        const ticks=[];\n        let labels=this.getLabels();\n        labels=min===0&&max===labels.length - 1 ? labels:labels.slice(min, max + 1);\n        this._valueRange=Math.max(labels.length - (offset ? 0:1), 1);\n        this._startValue=this.min - (offset ? 0.5:0);\n        for(let value=min; value <=max; value++){\n            ticks.push({\n                value\n            });\n        }\n        return ticks;\n    }\n    getLabelForValue(value){\n        return _getLabelForValue.call(this, value);\n    }\n configure(){\n        super.configure();\n        if(!this.isHorizontal()){\n            this._reversePixels = !this._reversePixels;\n        }\n    }\n    getPixelForValue(value){\n        if(typeof value!=='number'){\n            value=this.parse(value);\n        }\n        return value===null ? NaN:this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n    }\n    getPixelForTick(index){\n        const ticks=this.ticks;\n        if(index < 0||index > ticks.length - 1){\n            return null;\n        }\n        return this.getPixelForValue(ticks[index].value);\n    }\n    getValueForPixel(pixel){\n        return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n    }\n    getBasePixel(){\n        return this.bottom;\n    }\n}\n\nfunction generateTicks$1(generationOptions, dataRange){\n    const ticks=[];\n    const MIN_SPACING=1e-14;\n    const { bounds , step , min , max , precision , count , maxTicks , maxDigits , includeBounds  }=generationOptions;\n    const unit=step||1;\n    const maxSpaces=maxTicks - 1;\n    const { min: rmin , max: rmax  }=dataRange;\n    const minDefined = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(min);\n    const maxDefined = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(max);\n    const countDefined = !(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(count);\n    const minSpacing=(rmax - rmin) / (maxDigits + 1);\n    let spacing=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aH)((rmax - rmin) / maxSpaces / unit) * unit;\n    let factor, niceMin, niceMax, numSpaces;\n    if(spacing < MIN_SPACING&&!minDefined&&!maxDefined){\n        return [\n            {\n                value: rmin\n            },\n            {\n                value: rmax\n            }\n        ];\n    }\n    numSpaces=Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n    if(numSpaces > maxSpaces){\n        spacing=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aH)(numSpaces * spacing / maxSpaces / unit) * unit;\n    }\n    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(precision)){\n        factor=Math.pow(10, precision);\n        spacing=Math.ceil(spacing * factor) / factor;\n    }\n    if(bounds==='ticks'){\n        niceMin=Math.floor(rmin / spacing) * spacing;\n        niceMax=Math.ceil(rmax / spacing) * spacing;\n    }else{\n        niceMin=rmin;\n        niceMax=rmax;\n    }\n    if(minDefined&&maxDefined&&step&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aI)((max - min) / step, spacing / 1000)){\n        numSpaces=Math.round(Math.min((max - min) / spacing, maxTicks));\n        spacing=(max - min) / numSpaces;\n        niceMin=min;\n        niceMax=max;\n    }else if(countDefined){\n        niceMin=minDefined ? min:niceMin;\n        niceMax=maxDefined ? max:niceMax;\n        numSpaces=count - 1;\n        spacing=(niceMax - niceMin) / numSpaces;\n    }else{\n        numSpaces=(niceMax - niceMin) / spacing;\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aJ)(numSpaces, Math.round(numSpaces), spacing / 1000)){\n            numSpaces=Math.round(numSpaces);\n        }else{\n            numSpaces=Math.ceil(numSpaces);\n        }\n    }\n    const decimalPlaces=Math.max((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aK)(spacing), (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aK)(niceMin));\n    factor=Math.pow(10, (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(precision) ? decimalPlaces:precision);\n    niceMin=Math.round(niceMin * factor) / factor;\n    niceMax=Math.round(niceMax * factor) / factor;\n    let j=0;\n    if(minDefined){\n        if(includeBounds&&niceMin!==min){\n            ticks.push({\n                value: min\n            });\n            if(niceMin < min){\n                j++;\n            }\n            if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aJ)(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))){\n                j++;\n            }\n        }else if(niceMin < min){\n            j++;\n        }\n    }\n    for(; j < numSpaces; ++j){\n        const tickValue=Math.round((niceMin + j * spacing) * factor) / factor;\n        if(maxDefined&&tickValue > max){\n            break;\n        }\n        ticks.push({\n            value: tickValue\n        });\n    }\n    if(maxDefined&&includeBounds&&niceMax!==max){\n        if(ticks.length&&(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aJ)(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))){\n            ticks[ticks.length - 1].value=max;\n        }else{\n            ticks.push({\n                value: max\n            });\n        }\n    }else if(!maxDefined||niceMax===max){\n        ticks.push({\n            value: niceMax\n        });\n    }\n    return ticks;\n}\nfunction relativeLabelSize(value, minSpacing, { horizontal , minRotation  }){\n    const rad=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(minRotation);\n    const ratio=(horizontal ? Math.sin(rad):Math.cos(rad))||0.001;\n    const length=0.75 * minSpacing * ('' + value).length;\n    return Math.min(minSpacing / ratio, length);\n}\nclass LinearScaleBase extends Scale {\n    constructor(cfg){\n        super(cfg);\n         this.start=undefined;\n         this.end=undefined;\n         this._startValue=undefined;\n         this._endValue=undefined;\n        this._valueRange=0;\n    }\n    parse(raw, index){\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(raw)){\n            return null;\n        }\n        if((typeof raw==='number'||raw instanceof Number)&&!isFinite(+raw)){\n            return null;\n        }\n        return +raw;\n    }\n    handleTickRangeOptions(){\n        const { beginAtZero  }=this.options;\n        const { minDefined , maxDefined  }=this.getUserBounds();\n        let { min , max  }=this;\n        const setMin=(v)=>min=minDefined ? min:v;\n        const setMax=(v)=>max=maxDefined ? max:v;\n        if(beginAtZero){\n            const minSign=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(min);\n            const maxSign=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.s)(max);\n            if(minSign < 0&&maxSign < 0){\n                setMax(0);\n            }else if(minSign > 0&&maxSign > 0){\n                setMin(0);\n            }\n        }\n        if(min===max){\n            let offset=max===0 ? 1:Math.abs(max * 0.05);\n            setMax(max + offset);\n            if(!beginAtZero){\n                setMin(min - offset);\n            }\n        }\n        this.min=min;\n        this.max=max;\n    }\n    getTickLimit(){\n        const tickOpts=this.options.ticks;\n        let { maxTicksLimit , stepSize  }=tickOpts;\n        let maxTicks;\n        if(stepSize){\n            maxTicks=Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n            if(maxTicks > 1000){\n                console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n                maxTicks=1000;\n            }\n        }else{\n            maxTicks=this.computeTickLimit();\n            maxTicksLimit=maxTicksLimit||11;\n        }\n        if(maxTicksLimit){\n            maxTicks=Math.min(maxTicksLimit, maxTicks);\n        }\n        return maxTicks;\n    }\n computeTickLimit(){\n        return Number.POSITIVE_INFINITY;\n    }\n    buildTicks(){\n        const opts=this.options;\n        const tickOpts=opts.ticks;\n        let maxTicks=this.getTickLimit();\n        maxTicks=Math.max(2, maxTicks);\n        const numericGeneratorOptions={\n            maxTicks,\n            bounds: opts.bounds,\n            min: opts.min,\n            max: opts.max,\n            precision: tickOpts.precision,\n            step: tickOpts.stepSize,\n            count: tickOpts.count,\n            maxDigits: this._maxDigits(),\n            horizontal: this.isHorizontal(),\n            minRotation: tickOpts.minRotation||0,\n            includeBounds: tickOpts.includeBounds!==false\n        };\n        const dataRange=this._range||this;\n        const ticks=generateTicks$1(numericGeneratorOptions, dataRange);\n        if(opts.bounds==='ticks'){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aG)(ticks, this, 'value');\n        }\n        if(opts.reverse){\n            ticks.reverse();\n            this.start=this.max;\n            this.end=this.min;\n        }else{\n            this.start=this.min;\n            this.end=this.max;\n        }\n        return ticks;\n    }\n configure(){\n        const ticks=this.ticks;\n        let start=this.min;\n        let end=this.max;\n        super.configure();\n        if(this.options.offset&&ticks.length){\n            const offset=(end - start) / Math.max(ticks.length - 1, 1) / 2;\n            start -=offset;\n            end +=offset;\n        }\n        this._startValue=start;\n        this._endValue=end;\n        this._valueRange=end - start;\n    }\n    getLabelForValue(value){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.o)(value, this.chart.options.locale, this.options.ticks.format);\n    }\n}\n\nclass LinearScale extends LinearScaleBase {\n    static id='linear';\n static defaults={\n        ticks: {\n            callback: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aL.formatters.numeric\n        }\n    };\n    determineDataLimits(){\n        const { min , max  }=this.getMinMax(true);\n        this.min=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(min) ? min:0;\n        this.max=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(max) ? max:1;\n        this.handleTickRangeOptions();\n    }\n computeTickLimit(){\n        const horizontal=this.isHorizontal();\n        const length=horizontal ? this.width:this.height;\n        const minRotation=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.options.ticks.minRotation);\n        const ratio=(horizontal ? Math.sin(minRotation):Math.cos(minRotation))||0.001;\n        const tickFont=this._resolveTickFontOptions(0);\n        return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n    }\n    getPixelForValue(value){\n        return value===null ? NaN:this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n    }\n    getValueForPixel(pixel){\n        return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n    }\n}\n\nconst log10Floor=(v)=>Math.floor((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aM)(v));\nconst changeExponent=(v, m)=>Math.pow(10, log10Floor(v) + m);\nfunction isMajor(tickVal){\n    const remain=tickVal / Math.pow(10, log10Floor(tickVal));\n    return remain===1;\n}\nfunction steps(min, max, rangeExp){\n    const rangeStep=Math.pow(10, rangeExp);\n    const start=Math.floor(min / rangeStep);\n    const end=Math.ceil(max / rangeStep);\n    return end - start;\n}\nfunction startExp(min, max){\n    const range=max - min;\n    let rangeExp=log10Floor(range);\n    while(steps(min, max, rangeExp) > 10){\n        rangeExp++;\n    }\n    while(steps(min, max, rangeExp) < 10){\n        rangeExp--;\n    }\n    return Math.min(rangeExp, log10Floor(min));\n}\n function generateTicks(generationOptions, { min , max  }){\n    min=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(generationOptions.min, min);\n    const ticks=[];\n    const minExp=log10Floor(min);\n    let exp=startExp(min, max);\n    let precision=exp < 0 ? Math.pow(10, Math.abs(exp)):1;\n    const stepSize=Math.pow(10, exp);\n    const base=minExp > exp ? Math.pow(10, minExp):0;\n    const start=Math.round((min - base) * precision) / precision;\n    const offset=Math.floor((min - base) / stepSize / 10) * stepSize * 10;\n    let significand=Math.floor((start - offset) / Math.pow(10, exp));\n    let value=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(generationOptions.min, Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision);\n    while(value < max){\n        ticks.push({\n            value,\n            major: isMajor(value),\n            significand\n        });\n        if(significand >=10){\n            significand=significand < 15 ? 15:20;\n        }else{\n            significand++;\n        }\n        if(significand >=20){\n            exp++;\n            significand=2;\n            precision=exp >=0 ? 1:precision;\n        }\n        value=Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision;\n    }\n    const lastTick=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.O)(generationOptions.max, value);\n    ticks.push({\n        value: lastTick,\n        major: isMajor(lastTick),\n        significand\n    });\n    return ticks;\n}\nclass LogarithmicScale extends Scale {\n    static id='logarithmic';\n static defaults={\n        ticks: {\n            callback: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aL.formatters.logarithmic,\n            major: {\n                enabled: true\n            }\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this.start=undefined;\n         this.end=undefined;\n         this._startValue=undefined;\n        this._valueRange=0;\n    }\n    parse(raw, index){\n        const value=LinearScaleBase.prototype.parse.apply(this, [\n            raw,\n            index\n        ]);\n        if(value===0){\n            this._zero=true;\n            return undefined;\n        }\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(value)&&value > 0 ? value:null;\n    }\n    determineDataLimits(){\n        const { min , max  }=this.getMinMax(true);\n        this.min=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(min) ? Math.max(0, min):null;\n        this.max=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(max) ? Math.max(0, max):null;\n        if(this.options.beginAtZero){\n            this._zero=true;\n        }\n        if(this._zero&&this.min!==this._suggestedMin&&!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(this._userMin)){\n            this.min=min===changeExponent(this.min, 0) ? changeExponent(this.min, -1):changeExponent(this.min, 0);\n        }\n        this.handleTickRangeOptions();\n    }\n    handleTickRangeOptions(){\n        const { minDefined , maxDefined  }=this.getUserBounds();\n        let min=this.min;\n        let max=this.max;\n        const setMin=(v)=>min=minDefined ? min:v;\n        const setMax=(v)=>max=maxDefined ? max:v;\n        if(min===max){\n            if(min <=0){\n                setMin(1);\n                setMax(10);\n            }else{\n                setMin(changeExponent(min, -1));\n                setMax(changeExponent(max, +1));\n            }\n        }\n        if(min <=0){\n            setMin(changeExponent(max, -1));\n        }\n        if(max <=0){\n            setMax(changeExponent(min, +1));\n        }\n        this.min=min;\n        this.max=max;\n    }\n    buildTicks(){\n        const opts=this.options;\n        const generationOptions={\n            min: this._userMin,\n            max: this._userMax\n        };\n        const ticks=generateTicks(generationOptions, this);\n        if(opts.bounds==='ticks'){\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aG)(ticks, this, 'value');\n        }\n        if(opts.reverse){\n            ticks.reverse();\n            this.start=this.max;\n            this.end=this.min;\n        }else{\n            this.start=this.min;\n            this.end=this.max;\n        }\n        return ticks;\n    }\n getLabelForValue(value){\n        return value===undefined ? '0':(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.o)(value, this.chart.options.locale, this.options.ticks.format);\n    }\n configure(){\n        const start=this.min;\n        super.configure();\n        this._startValue=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aM)(start);\n        this._valueRange=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aM)(this.max) - (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aM)(start);\n    }\n    getPixelForValue(value){\n        if(value===undefined||value===0){\n            value=this.min;\n        }\n        if(value===null||isNaN(value)){\n            return NaN;\n        }\n        return this.getPixelForDecimal(value===this.min ? 0:((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aM)(value) - this._startValue) / this._valueRange);\n    }\n    getValueForPixel(pixel){\n        const decimal=this.getDecimalForPixel(pixel);\n        return Math.pow(10, this._startValue + decimal * this._valueRange);\n    }\n}\n\nfunction getTickBackdropHeight(opts){\n    const tickOpts=opts.ticks;\n    if(tickOpts.display&&opts.display){\n        const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(tickOpts.backdropPadding);\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(tickOpts.font&&tickOpts.font.size, _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.d.font.size) + padding.height;\n    }\n    return 0;\n}\nfunction measureLabelSize(ctx, font, label){\n    label=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.b)(label) ? label:[\n        label\n    ];\n    return {\n        w: (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aN)(ctx, font.string, label),\n        h: label.length * font.lineHeight\n    };\n}\nfunction determineLimits(angle, pos, size, min, max){\n    if(angle===min||angle===max){\n        return {\n            start: pos - size / 2,\n            end: pos + size / 2\n        };\n    }else if(angle < min||angle > max){\n        return {\n            start: pos - size,\n            end: pos\n        };\n    }\n    return {\n        start: pos,\n        end: pos + size\n    };\n}\n function fitWithPointLabels(scale){\n    const orig={\n        l: scale.left + scale._padding.left,\n        r: scale.right - scale._padding.right,\n        t: scale.top + scale._padding.top,\n        b: scale.bottom - scale._padding.bottom\n    };\n    const limits=Object.assign({}, orig);\n    const labelSizes=[];\n    const padding=[];\n    const valueCount=scale._pointLabels.length;\n    const pointLabelOpts=scale.options.pointLabels;\n    const additionalAngle=pointLabelOpts.centerPointLabels ? _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P / valueCount:0;\n    for(let i=0; i < valueCount; i++){\n        const opts=pointLabelOpts.setContext(scale.getPointLabelContext(i));\n        padding[i]=opts.padding;\n        const pointPosition=scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n        const plFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(opts.font);\n        const textSize=measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n        labelSizes[i]=textSize;\n        const angleRadians=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ay)(scale.getIndexAngle(i) + additionalAngle);\n        const angle=Math.round((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.U)(angleRadians));\n        const hLimits=determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n        const vLimits=determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n        updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n    }\n    scale.setCenterPoint(orig.l - limits.l, limits.r - orig.r, orig.t - limits.t, limits.b - orig.b);\n    scale._pointLabelItems=buildPointLabelItems(scale, labelSizes, padding);\n}\nfunction updateLimits(limits, orig, angle, hLimits, vLimits){\n    const sin=Math.abs(Math.sin(angle));\n    const cos=Math.abs(Math.cos(angle));\n    let x=0;\n    let y=0;\n    if(hLimits.start < orig.l){\n        x=(orig.l - hLimits.start) / sin;\n        limits.l=Math.min(limits.l, orig.l - x);\n    }else if(hLimits.end > orig.r){\n        x=(hLimits.end - orig.r) / sin;\n        limits.r=Math.max(limits.r, orig.r + x);\n    }\n    if(vLimits.start < orig.t){\n        y=(orig.t - vLimits.start) / cos;\n        limits.t=Math.min(limits.t, orig.t - y);\n    }else if(vLimits.end > orig.b){\n        y=(vLimits.end - orig.b) / cos;\n        limits.b=Math.max(limits.b, orig.b + y);\n    }\n}\nfunction createPointLabelItem(scale, index, itemOpts){\n    const outerDistance=scale.drawingArea;\n    const { extra , additionalAngle , padding , size  }=itemOpts;\n    const pointLabelPosition=scale.getPointPosition(index, outerDistance + extra + padding, additionalAngle);\n    const angle=Math.round((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.U)((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ay)(pointLabelPosition.angle + _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H)));\n    const y=yForAngle(pointLabelPosition.y, size.h, angle);\n    const textAlign=getTextAlignForAngle(angle);\n    const left=leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n    return {\n        visible: true,\n        x: pointLabelPosition.x,\n        y,\n        textAlign,\n        left,\n        top: y,\n        right: left + size.w,\n        bottom: y + size.h\n    };\n}\nfunction isNotOverlapped(item, area){\n    if(!area){\n        return true;\n    }\n    const { left , top , right , bottom  }=item;\n    const apexesInArea=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)({\n        x: left,\n        y: top\n    }, area)||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)({\n        x: left,\n        y: bottom\n    }, area)||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)({\n        x: right,\n        y: top\n    }, area)||(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.C)({\n        x: right,\n        y: bottom\n    }, area);\n    return !apexesInArea;\n}\nfunction buildPointLabelItems(scale, labelSizes, padding){\n    const items=[];\n    const valueCount=scale._pointLabels.length;\n    const opts=scale.options;\n    const { centerPointLabels , display  }=opts.pointLabels;\n    const itemOpts={\n        extra: getTickBackdropHeight(opts) / 2,\n        additionalAngle: centerPointLabels ? _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.P / valueCount:0\n    };\n    let area;\n    for(let i=0; i < valueCount; i++){\n        itemOpts.padding=padding[i];\n        itemOpts.size=labelSizes[i];\n        const item=createPointLabelItem(scale, i, itemOpts);\n        items.push(item);\n        if(display==='auto'){\n            item.visible=isNotOverlapped(item, area);\n            if(item.visible){\n                area=item;\n            }\n        }\n    }\n    return items;\n}\nfunction getTextAlignForAngle(angle){\n    if(angle===0||angle===180){\n        return 'center';\n    }else if(angle < 180){\n        return 'left';\n    }\n    return 'right';\n}\nfunction leftForTextAlign(x, w, align){\n    if(align==='right'){\n        x -=w;\n    }else if(align==='center'){\n        x -=w / 2;\n    }\n    return x;\n}\nfunction yForAngle(y, h, angle){\n    if(angle===90||angle===270){\n        y -=h / 2;\n    }else if(angle > 270||angle < 90){\n        y -=h;\n    }\n    return y;\n}\nfunction drawPointLabelBox(ctx, opts, item){\n    const { left , top , right , bottom  }=item;\n    const { backdropColor  }=opts;\n    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(backdropColor)){\n        const borderRadius=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aw)(opts.borderRadius);\n        const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(opts.backdropPadding);\n        ctx.fillStyle=backdropColor;\n        const backdropLeft=left - padding.left;\n        const backdropTop=top - padding.top;\n        const backdropWidth=right - left + padding.width;\n        const backdropHeight=bottom - top + padding.height;\n        if(Object.values(borderRadius).some((v)=>v!==0)){\n            ctx.beginPath();\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.au)(ctx, {\n                x: backdropLeft,\n                y: backdropTop,\n                w: backdropWidth,\n                h: backdropHeight,\n                radius: borderRadius\n            });\n            ctx.fill();\n        }else{\n            ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n        }\n    }\n}\nfunction drawPointLabels(scale, labelCount){\n    const { ctx , options: { pointLabels  }}=scale;\n    for(let i=labelCount - 1; i >=0; i--){\n        const item=scale._pointLabelItems[i];\n        if(!item.visible){\n            continue;\n        }\n        const optsAtIndex=pointLabels.setContext(scale.getPointLabelContext(i));\n        drawPointLabelBox(ctx, optsAtIndex, item);\n        const plFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(optsAtIndex.font);\n        const { x , y , textAlign  }=item;\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, scale._pointLabels[i], x, y + plFont.lineHeight / 2, plFont, {\n            color: optsAtIndex.color,\n            textAlign: textAlign,\n            textBaseline: 'middle'\n        });\n    }\n}\nfunction pathRadiusLine(scale, radius, circular, labelCount){\n    const { ctx  }=scale;\n    if(circular){\n        ctx.arc(scale.xCenter, scale.yCenter, radius, 0, _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T);\n    }else{\n        let pointPosition=scale.getPointPosition(0, radius);\n        ctx.moveTo(pointPosition.x, pointPosition.y);\n        for(let i=1; i < labelCount; i++){\n            pointPosition=scale.getPointPosition(i, radius);\n            ctx.lineTo(pointPosition.x, pointPosition.y);\n        }\n    }\n}\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts){\n    const ctx=scale.ctx;\n    const circular=gridLineOpts.circular;\n    const { color , lineWidth  }=gridLineOpts;\n    if(!circular&&!labelCount||!color||!lineWidth||radius < 0){\n        return;\n    }\n    ctx.save();\n    ctx.strokeStyle=color;\n    ctx.lineWidth=lineWidth;\n    ctx.setLineDash(borderOpts.dash);\n    ctx.lineDashOffset=borderOpts.dashOffset;\n    ctx.beginPath();\n    pathRadiusLine(scale, radius, circular, labelCount);\n    ctx.closePath();\n    ctx.stroke();\n    ctx.restore();\n}\nfunction createPointLabelContext(parent, index, label){\n    return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.j)(parent, {\n        label,\n        index,\n        type: 'pointLabel'\n    });\n}\nclass RadialLinearScale extends LinearScaleBase {\n    static id='radialLinear';\n static defaults={\n        display: true,\n        animate: true,\n        position: 'chartArea',\n        angleLines: {\n            display: true,\n            lineWidth: 1,\n            borderDash: [],\n            borderDashOffset: 0.0\n        },\n        grid: {\n            circular: false\n        },\n        startAngle: 0,\n        ticks: {\n            showLabelBackdrop: true,\n            callback: _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aL.formatters.numeric\n        },\n        pointLabels: {\n            backdropColor: undefined,\n            backdropPadding: 2,\n            display: true,\n            font: {\n                size: 10\n            },\n            callback (label){\n                return label;\n            },\n            padding: 5,\n            centerPointLabels: false\n        }\n    };\n    static defaultRoutes={\n        'angleLines.color': 'borderColor',\n        'pointLabels.color': 'color',\n        'ticks.color': 'color'\n    };\n    static descriptors={\n        angleLines: {\n            _fallback: 'grid'\n        }\n    };\n    constructor(cfg){\n        super(cfg);\n         this.xCenter=undefined;\n         this.yCenter=undefined;\n         this.drawingArea=undefined;\n         this._pointLabels=[];\n        this._pointLabelItems=[];\n    }\n    setDimensions(){\n        const padding=this._padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(getTickBackdropHeight(this.options) / 2);\n        const w=this.width=this.maxWidth - padding.width;\n        const h=this.height=this.maxHeight - padding.height;\n        this.xCenter=Math.floor(this.left + w / 2 + padding.left);\n        this.yCenter=Math.floor(this.top + h / 2 + padding.top);\n        this.drawingArea=Math.floor(Math.min(w, h) / 2);\n    }\n    determineDataLimits(){\n        const { min , max  }=this.getMinMax(false);\n        this.min=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(min)&&!isNaN(min) ? min:0;\n        this.max=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(max)&&!isNaN(max) ? max:0;\n        this.handleTickRangeOptions();\n    }\n computeTickLimit(){\n        return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n    }\n    generateTickLabels(ticks){\n        LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n        this._pointLabels=this.getLabels().map((value, index)=>{\n            const label=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(this.options.pointLabels.callback, [\n                value,\n                index\n            ], this);\n            return label||label===0 ? label:'';\n        }).filter((v, i)=>this.chart.getDataVisibility(i));\n    }\n    fit(){\n        const opts=this.options;\n        if(opts.display&&opts.pointLabels.display){\n            fitWithPointLabels(this);\n        }else{\n            this.setCenterPoint(0, 0, 0, 0);\n        }\n    }\n    setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement){\n        this.xCenter +=Math.floor((leftMovement - rightMovement) / 2);\n        this.yCenter +=Math.floor((topMovement - bottomMovement) / 2);\n        this.drawingArea -=Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n    }\n    getIndexAngle(index){\n        const angleMultiplier=_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.T / (this._pointLabels.length||1);\n        const startAngle=this.options.startAngle||0;\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ay)(index * angleMultiplier + (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(startAngle));\n    }\n    getDistanceFromCenterForValue(value){\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(value)){\n            return NaN;\n        }\n        const scalingFactor=this.drawingArea / (this.max - this.min);\n        if(this.options.reverse){\n            return (this.max - value) * scalingFactor;\n        }\n        return (value - this.min) * scalingFactor;\n    }\n    getValueForDistanceFromCenter(distance){\n        if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(distance)){\n            return NaN;\n        }\n        const scaledDistance=distance / (this.drawingArea / (this.max - this.min));\n        return this.options.reverse ? this.max - scaledDistance:this.min + scaledDistance;\n    }\n    getPointLabelContext(index){\n        const pointLabels=this._pointLabels||[];\n        if(index >=0&&index < pointLabels.length){\n            const pointLabel=pointLabels[index];\n            return createPointLabelContext(this.getContext(), index, pointLabel);\n        }\n    }\n    getPointPosition(index, distanceFromCenter, additionalAngle=0){\n        const angle=this.getIndexAngle(index) - _chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.H + additionalAngle;\n        return {\n            x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n            y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n            angle\n        };\n    }\n    getPointPositionForValue(index, value){\n        return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n    }\n    getBasePosition(index){\n        return this.getPointPositionForValue(index||0, this.getBaseValue());\n    }\n    getPointLabelPosition(index){\n        const { left , top , right , bottom  }=this._pointLabelItems[index];\n        return {\n            left,\n            top,\n            right,\n            bottom\n        };\n    }\n drawBackground(){\n        const { backgroundColor , grid: { circular  }}=this.options;\n        if(backgroundColor){\n            const ctx=this.ctx;\n            ctx.save();\n            ctx.beginPath();\n            pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n            ctx.closePath();\n            ctx.fillStyle=backgroundColor;\n            ctx.fill();\n            ctx.restore();\n        }\n    }\n drawGrid(){\n        const ctx=this.ctx;\n        const opts=this.options;\n        const { angleLines , grid , border  }=opts;\n        const labelCount=this._pointLabels.length;\n        let i, offset, position;\n        if(opts.pointLabels.display){\n            drawPointLabels(this, labelCount);\n        }\n        if(grid.display){\n            this.ticks.forEach((tick, index)=>{\n                if(index!==0){\n                    offset=this.getDistanceFromCenterForValue(tick.value);\n                    const context=this.getContext(index);\n                    const optsAtIndex=grid.setContext(context);\n                    const optsAtIndexBorder=border.setContext(context);\n                    drawRadiusLine(this, optsAtIndex, offset, labelCount, optsAtIndexBorder);\n                }\n            });\n        }\n        if(angleLines.display){\n            ctx.save();\n            for(i=labelCount - 1; i >=0; i--){\n                const optsAtIndex=angleLines.setContext(this.getPointLabelContext(i));\n                const { color , lineWidth  }=optsAtIndex;\n                if(!lineWidth||!color){\n                    continue;\n                }\n                ctx.lineWidth=lineWidth;\n                ctx.strokeStyle=color;\n                ctx.setLineDash(optsAtIndex.borderDash);\n                ctx.lineDashOffset=optsAtIndex.borderDashOffset;\n                offset=this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min:this.max);\n                position=this.getPointPosition(i, offset);\n                ctx.beginPath();\n                ctx.moveTo(this.xCenter, this.yCenter);\n                ctx.lineTo(position.x, position.y);\n                ctx.stroke();\n            }\n            ctx.restore();\n        }\n    }\n drawBorder(){}\n drawLabels(){\n        const ctx=this.ctx;\n        const opts=this.options;\n        const tickOpts=opts.ticks;\n        if(!tickOpts.display){\n            return;\n        }\n        const startAngle=this.getIndexAngle(0);\n        let offset, width;\n        ctx.save();\n        ctx.translate(this.xCenter, this.yCenter);\n        ctx.rotate(startAngle);\n        ctx.textAlign='center';\n        ctx.textBaseline='middle';\n        this.ticks.forEach((tick, index)=>{\n            if(index===0&&!opts.reverse){\n                return;\n            }\n            const optsAtIndex=tickOpts.setContext(this.getContext(index));\n            const tickFont=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.a0)(optsAtIndex.font);\n            offset=this.getDistanceFromCenterForValue(this.ticks[index].value);\n            if(optsAtIndex.showLabelBackdrop){\n                ctx.font=tickFont.string;\n                width=ctx.measureText(tick.label).width;\n                ctx.fillStyle=optsAtIndex.backdropColor;\n                const padding=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.E)(optsAtIndex.backdropPadding);\n                ctx.fillRect(-width / 2 - padding.left, -offset - tickFont.size / 2 - padding.top, width + padding.width, tickFont.size + padding.height);\n            }\n            (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Z)(ctx, tick.label, 0, -offset, tickFont, {\n                color: optsAtIndex.color,\n                strokeColor: optsAtIndex.textStrokeColor,\n                strokeWidth: optsAtIndex.textStrokeWidth\n            });\n        });\n        ctx.restore();\n    }\n drawTitle(){}\n}\n\nconst INTERVALS={\n    millisecond: {\n        common: true,\n        size: 1,\n        steps: 1000\n    },\n    second: {\n        common: true,\n        size: 1000,\n        steps: 60\n    },\n    minute: {\n        common: true,\n        size: 60000,\n        steps: 60\n    },\n    hour: {\n        common: true,\n        size: 3600000,\n        steps: 24\n    },\n    day: {\n        common: true,\n        size: 86400000,\n        steps: 30\n    },\n    week: {\n        common: false,\n        size: 604800000,\n        steps: 4\n    },\n    month: {\n        common: true,\n        size: 2.628e9,\n        steps: 12\n    },\n    quarter: {\n        common: false,\n        size: 7.884e9,\n        steps: 4\n    },\n    year: {\n        common: true,\n        size: 3.154e10\n    }\n};\n const UNITS=/* #__PURE__ */ Object.keys(INTERVALS);\n function sorter(a, b){\n    return a - b;\n}\n function parse(scale, input){\n    if((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.k)(input)){\n        return null;\n    }\n    const adapter=scale._adapter;\n    const { parser , round , isoWeekday  }=scale._parseOpts;\n    let value=input;\n    if(typeof parser==='function'){\n        value=parser(value);\n    }\n    if(!(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(value)){\n        value=typeof parser==='string' ? adapter.parse(value,  parser):adapter.parse(value);\n    }\n    if(value===null){\n        return null;\n    }\n    if(round){\n        value=round==='week'&&((0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(isoWeekday)||isoWeekday===true) ? adapter.startOf(value, 'isoWeek', isoWeekday):adapter.startOf(value, round);\n    }\n    return +value;\n}\n function determineUnitForAutoTicks(minUnit, min, max, capacity){\n    const ilen=UNITS.length;\n    for(let i=UNITS.indexOf(minUnit); i < ilen - 1; ++i){\n        const interval=INTERVALS[UNITS[i]];\n        const factor=interval.steps ? interval.steps:Number.MAX_SAFE_INTEGER;\n        if(interval.common&&Math.ceil((max - min) / (factor * interval.size)) <=capacity){\n            return UNITS[i];\n        }\n    }\n    return UNITS[ilen - 1];\n}\n function determineUnitForFormatting(scale, numTicks, minUnit, min, max){\n    for(let i=UNITS.length - 1; i >=UNITS.indexOf(minUnit); i--){\n        const unit=UNITS[i];\n        if(INTERVALS[unit].common&&scale._adapter.diff(max, min, unit) >=numTicks - 1){\n            return unit;\n        }\n    }\n    return UNITS[minUnit ? UNITS.indexOf(minUnit):0];\n}\n function determineMajorUnit(unit){\n    for(let i=UNITS.indexOf(unit) + 1, ilen=UNITS.length; i < ilen; ++i){\n        if(INTERVALS[UNITS[i]].common){\n            return UNITS[i];\n        }\n    }\n}\n function addTick(ticks, time, timestamps){\n    if(!timestamps){\n        ticks[time]=true;\n    }else if(timestamps.length){\n        const { lo , hi  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aP)(timestamps, time);\n        const timestamp=timestamps[lo] >=time ? timestamps[lo]:timestamps[hi];\n        ticks[timestamp]=true;\n    }\n}\n function setMajorTicks(scale, ticks, map, majorUnit){\n    const adapter=scale._adapter;\n    const first=+adapter.startOf(ticks[0].value, majorUnit);\n    const last=ticks[ticks.length - 1].value;\n    let major, index;\n    for(major=first; major <=last; major=+adapter.add(major, 1, majorUnit)){\n        index=map[major];\n        if(index >=0){\n            ticks[index].major=true;\n        }\n    }\n    return ticks;\n}\n function ticksFromTimestamps(scale, values, majorUnit){\n    const ticks=[];\n     const map={};\n    const ilen=values.length;\n    let i, value;\n    for(i=0; i < ilen; ++i){\n        value=values[i];\n        map[value]=i;\n        ticks.push({\n            value,\n            major: false\n        });\n    }\n    return ilen===0||!majorUnit ? ticks:setMajorTicks(scale, ticks, map, majorUnit);\n}\nclass TimeScale extends Scale {\n    static id='time';\n static defaults={\n bounds: 'data',\n        adapters: {},\n        time: {\n            parser: false,\n            unit: false,\n            round: false,\n            isoWeekday: false,\n            minUnit: 'millisecond',\n            displayFormats: {}\n        },\n        ticks: {\n source: 'auto',\n            callback: false,\n            major: {\n                enabled: false\n            }\n        }\n    };\n constructor(props){\n        super(props);\n         this._cache={\n            data: [],\n            labels: [],\n            all: []\n        };\n         this._unit='day';\n         this._majorUnit=undefined;\n        this._offsets={};\n        this._normalized=false;\n        this._parseOpts=undefined;\n    }\n    init(scaleOpts, opts={}){\n        const time=scaleOpts.time||(scaleOpts.time={});\n         const adapter=this._adapter=new adapters._date(scaleOpts.adapters.date);\n        adapter.init(opts);\n        (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.ab)(time.displayFormats, adapter.formats());\n        this._parseOpts={\n            parser: time.parser,\n            round: time.round,\n            isoWeekday: time.isoWeekday\n        };\n        super.init(scaleOpts);\n        this._normalized=opts.normalized;\n    }\n parse(raw, index){\n        if(raw===undefined){\n            return null;\n        }\n        return parse(this, raw);\n    }\n    beforeLayout(){\n        super.beforeLayout();\n        this._cache={\n            data: [],\n            labels: [],\n            all: []\n        };\n    }\n    determineDataLimits(){\n        const options=this.options;\n        const adapter=this._adapter;\n        const unit=options.time.unit||'day';\n        let { min , max , minDefined , maxDefined  }=this.getUserBounds();\n function _applyBounds(bounds){\n            if(!minDefined&&!isNaN(bounds.min)){\n                min=Math.min(min, bounds.min);\n            }\n            if(!maxDefined&&!isNaN(bounds.max)){\n                max=Math.max(max, bounds.max);\n            }\n        }\n        if(!minDefined||!maxDefined){\n            _applyBounds(this._getLabelBounds());\n            if(options.bounds!=='ticks'||options.ticks.source!=='labels'){\n                _applyBounds(this.getMinMax(false));\n            }\n        }\n        min=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(min)&&!isNaN(min) ? min:+adapter.startOf(Date.now(), unit);\n        max=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.g)(max)&&!isNaN(max) ? max:+adapter.endOf(Date.now(), unit) + 1;\n        this.min=Math.min(min, max - 1);\n        this.max=Math.max(min + 1, max);\n    }\n _getLabelBounds(){\n        const arr=this.getLabelTimestamps();\n        let min=Number.POSITIVE_INFINITY;\n        let max=Number.NEGATIVE_INFINITY;\n        if(arr.length){\n            min=arr[0];\n            max=arr[arr.length - 1];\n        }\n        return {\n            min,\n            max\n        };\n    }\n buildTicks(){\n        const options=this.options;\n        const timeOpts=options.time;\n        const tickOpts=options.ticks;\n        const timestamps=tickOpts.source==='labels' ? this.getLabelTimestamps():this._generate();\n        if(options.bounds==='ticks'&&timestamps.length){\n            this.min=this._userMin||timestamps[0];\n            this.max=this._userMax||timestamps[timestamps.length - 1];\n        }\n        const min=this.min;\n        const max=this.max;\n        const ticks=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.aO)(timestamps, min, max);\n        this._unit=timeOpts.unit||(tickOpts.autoSkip ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min)):determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n        this._majorUnit = !tickOpts.major.enabled||this._unit==='year' ? undefined:determineMajorUnit(this._unit);\n        this.initOffsets(timestamps);\n        if(options.reverse){\n            ticks.reverse();\n        }\n        return ticksFromTimestamps(this, ticks, this._majorUnit);\n    }\n    afterAutoSkip(){\n        if(this.options.offsetAfterAutoskip){\n            this.initOffsets(this.ticks.map((tick)=>+tick.value));\n        }\n    }\n initOffsets(timestamps=[]){\n        let start=0;\n        let end=0;\n        let first, last;\n        if(this.options.offset&&timestamps.length){\n            first=this.getDecimalForValue(timestamps[0]);\n            if(timestamps.length===1){\n                start=1 - first;\n            }else{\n                start=(this.getDecimalForValue(timestamps[1]) - first) / 2;\n            }\n            last=this.getDecimalForValue(timestamps[timestamps.length - 1]);\n            if(timestamps.length===1){\n                end=last;\n            }else{\n                end=(last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n            }\n        }\n        const limit=timestamps.length < 3 ? 0.5:0.25;\n        start=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(start, 0, limit);\n        end=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.S)(end, 0, limit);\n        this._offsets={\n            start,\n            end,\n            factor: 1 / (start + 1 + end)\n        };\n    }\n _generate(){\n        const adapter=this._adapter;\n        const min=this.min;\n        const max=this.max;\n        const options=this.options;\n        const timeOpts=options.time;\n        const minor=timeOpts.unit||determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n        const stepSize=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.v)(options.ticks.stepSize, 1);\n        const weekday=minor==='week' ? timeOpts.isoWeekday:false;\n        const hasWeekday=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.x)(weekday)||weekday===true;\n        const ticks={};\n        let first=min;\n        let time, count;\n        if(hasWeekday){\n            first=+adapter.startOf(first, 'isoWeek', weekday);\n        }\n        first=+adapter.startOf(first, hasWeekday ? 'day':minor);\n        if(adapter.diff(max, min, minor) > 100000 * stepSize){\n            throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n        }\n        const timestamps=options.ticks.source==='data'&&this.getDataTimestamps();\n        for(time=first, count=0; time < max; time=+adapter.add(time, stepSize, minor), count++){\n            addTick(ticks, time, timestamps);\n        }\n        if(time===max||options.bounds==='ticks'||count===1){\n            addTick(ticks, time, timestamps);\n        }\n        return Object.keys(ticks).sort(sorter).map((x)=>+x);\n    }\n getLabelForValue(value){\n        const adapter=this._adapter;\n        const timeOpts=this.options.time;\n        if(timeOpts.tooltipFormat){\n            return adapter.format(value, timeOpts.tooltipFormat);\n        }\n        return adapter.format(value, timeOpts.displayFormats.datetime);\n    }\n format(value, format){\n        const options=this.options;\n        const formats=options.time.displayFormats;\n        const unit=this._unit;\n        const fmt=format||formats[unit];\n        return this._adapter.format(value, fmt);\n    }\n _tickFormatFunction(time, index, ticks, format){\n        const options=this.options;\n        const formatter=options.ticks.callback;\n        if(formatter){\n            return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.Q)(formatter, [\n                time,\n                index,\n                ticks\n            ], this);\n        }\n        const formats=options.time.displayFormats;\n        const unit=this._unit;\n        const majorUnit=this._majorUnit;\n        const minorFormat=unit&&formats[unit];\n        const majorFormat=majorUnit&&formats[majorUnit];\n        const tick=ticks[index];\n        const major=majorUnit&&majorFormat&&tick&&tick.major;\n        return this._adapter.format(time, format||(major ? majorFormat:minorFormat));\n    }\n generateTickLabels(ticks){\n        let i, ilen, tick;\n        for(i=0, ilen=ticks.length; i < ilen; ++i){\n            tick=ticks[i];\n            tick.label=this._tickFormatFunction(tick.value, i, ticks);\n        }\n    }\n getDecimalForValue(value){\n        return value===null ? NaN:(value - this.min) / (this.max - this.min);\n    }\n getPixelForValue(value){\n        const offsets=this._offsets;\n        const pos=this.getDecimalForValue(value);\n        return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n    }\n getValueForPixel(pixel){\n        const offsets=this._offsets;\n        const pos=this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n        return this.min + pos * (this.max - this.min);\n    }\n _getLabelSize(label){\n        const ticksOpts=this.options.ticks;\n        const tickLabelWidth=this.ctx.measureText(label).width;\n        const angle=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.t)(this.isHorizontal() ? ticksOpts.maxRotation:ticksOpts.minRotation);\n        const cosRotation=Math.cos(angle);\n        const sinRotation=Math.sin(angle);\n        const tickFontSize=this._resolveTickFontOptions(0).size;\n        return {\n            w: tickLabelWidth * cosRotation + tickFontSize * sinRotation,\n            h: tickLabelWidth * sinRotation + tickFontSize * cosRotation\n        };\n    }\n _getLabelCapacity(exampleTime){\n        const timeOpts=this.options.time;\n        const displayFormats=timeOpts.displayFormats;\n        const format=displayFormats[timeOpts.unit]||displayFormats.millisecond;\n        const exampleLabel=this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [\n            exampleTime\n        ], this._majorUnit), format);\n        const size=this._getLabelSize(exampleLabel);\n        const capacity=Math.floor(this.isHorizontal() ? this.width / size.w:this.height / size.h) - 1;\n        return capacity > 0 ? capacity:1;\n    }\n getDataTimestamps(){\n        let timestamps=this._cache.data||[];\n        let i, ilen;\n        if(timestamps.length){\n            return timestamps;\n        }\n        const metas=this.getMatchingVisibleMetas();\n        if(this._normalized&&metas.length){\n            return this._cache.data=metas[0].controller.getAllParsedValues(this);\n        }\n        for(i=0, ilen=metas.length; i < ilen; ++i){\n            timestamps=timestamps.concat(metas[i].controller.getAllParsedValues(this));\n        }\n        return this._cache.data=this.normalize(timestamps);\n    }\n getLabelTimestamps(){\n        const timestamps=this._cache.labels||[];\n        let i, ilen;\n        if(timestamps.length){\n            return timestamps;\n        }\n        const labels=this.getLabels();\n        for(i=0, ilen=labels.length; i < ilen; ++i){\n            timestamps.push(parse(this, labels[i]));\n        }\n        return this._cache.labels=this._normalized ? timestamps:this.normalize(timestamps);\n    }\n normalize(values){\n        return (0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__._)(values.sort(sorter));\n    }\n}\n\nfunction interpolate(table, val, reverse){\n    let lo=0;\n    let hi=table.length - 1;\n    let prevSource, nextSource, prevTarget, nextTarget;\n    if(reverse){\n        if(val >=table[lo].pos&&val <=table[hi].pos){\n            ({ lo , hi  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.B)(table, 'pos', val));\n        }\n        ({ pos: prevSource , time: prevTarget  }=table[lo]);\n        ({ pos: nextSource , time: nextTarget  }=table[hi]);\n    }else{\n        if(val >=table[lo].time&&val <=table[hi].time){\n            ({ lo , hi  }=(0,_chunks_helpers_segment_js__WEBPACK_IMPORTED_MODULE_0__.B)(table, 'time', val));\n        }\n        ({ time: prevSource , pos: prevTarget  }=table[lo]);\n        ({ time: nextSource , pos: nextTarget  }=table[hi]);\n    }\n    const span=nextSource - prevSource;\n    return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span:prevTarget;\n}\nclass TimeSeriesScale extends TimeScale {\n    static id='timeseries';\n static defaults=TimeScale.defaults;\n constructor(props){\n        super(props);\n         this._table=[];\n         this._minPos=undefined;\n         this._tableRange=undefined;\n    }\n initOffsets(){\n        const timestamps=this._getTimestampsForTable();\n        const table=this._table=this.buildLookupTable(timestamps);\n        this._minPos=interpolate(table, this.min);\n        this._tableRange=interpolate(table, this.max) - this._minPos;\n        super.initOffsets(timestamps);\n    }\n buildLookupTable(timestamps){\n        const { min , max  }=this;\n        const items=[];\n        const table=[];\n        let i, ilen, prev, curr, next;\n        for(i=0, ilen=timestamps.length; i < ilen; ++i){\n            curr=timestamps[i];\n            if(curr >=min&&curr <=max){\n                items.push(curr);\n            }\n        }\n        if(items.length < 2){\n            return [\n                {\n                    time: min,\n                    pos: 0\n                },\n                {\n                    time: max,\n                    pos: 1\n                }\n            ];\n        }\n        for(i=0, ilen=items.length; i < ilen; ++i){\n            next=items[i + 1];\n            prev=items[i - 1];\n            curr=items[i];\n            if(Math.round((next + prev) / 2)!==curr){\n                table.push({\n                    time: curr,\n                    pos: i / (ilen - 1)\n                });\n            }\n        }\n        return table;\n    }\n _generate(){\n        const min=this.min;\n        const max=this.max;\n        let timestamps=super.getDataTimestamps();\n        if(!timestamps.includes(min)||!timestamps.length){\n            timestamps.splice(0, 0, min);\n        }\n        if(!timestamps.includes(max)||timestamps.length===1){\n            timestamps.push(max);\n        }\n        return timestamps.sort((a, b)=>a - b);\n    }\n _getTimestampsForTable(){\n        let timestamps=this._cache.all||[];\n        if(timestamps.length){\n            return timestamps;\n        }\n        const data=this.getDataTimestamps();\n        const label=this.getLabelTimestamps();\n        if(data.length&&label.length){\n            timestamps=this.normalize(data.concat(label));\n        }else{\n            timestamps=data.length ? data:label;\n        }\n        timestamps=this._cache.all=timestamps;\n        return timestamps;\n    }\n getDecimalForValue(value){\n        return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n    }\n getValueForPixel(pixel){\n        const offsets=this._offsets;\n        const decimal=this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n        return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n    }\n}\n\nvar scales=/*#__PURE__*/Object.freeze({\n__proto__: null,\nCategoryScale: CategoryScale,\nLinearScale: LinearScale,\nLogarithmicScale: LogarithmicScale,\nRadialLinearScale: RadialLinearScale,\nTimeScale: TimeScale,\nTimeSeriesScale: TimeSeriesScale\n});\n\nconst registerables=[\n    controllers,\n    elements,\n    plugins,\n    scales\n];\n\n\n//# sourceMappingURL=chart.js.map\n\n\n//# sourceURL=webpack://startHtml/./node_modules/chart.js/dist/chart.js?")},"./node_modules/chart.js/dist/chunks/helpers.segment.js":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"$\": function(){ return /* binding */ unclipArea; },\n/* harmony export */   \"A\": function(){ return /* binding */ _rlookupByKey; },\n/* harmony export */   \"B\": function(){ return /* binding */ _lookupByKey; },\n/* harmony export */   \"C\": function(){ return /* binding */ _isPointInArea; },\n/* harmony export */   \"D\": function(){ return /* binding */ getAngleFromPoint; },\n/* harmony export */   \"E\": function(){ return /* binding */ toPadding; },\n/* harmony export */   \"F\": function(){ return /* binding */ each; },\n/* harmony export */   \"G\": function(){ return /* binding */ getMaximumSize; },\n/* harmony export */   \"H\": function(){ return /* binding */ HALF_PI; },\n/* harmony export */   \"I\": function(){ return /* binding */ _getParentNode; },\n/* harmony export */   \"J\": function(){ return /* binding */ readUsedSize; },\n/* harmony export */   \"K\": function(){ return /* binding */ supportsEventListenerOptions; },\n/* harmony export */   \"L\": function(){ return /* binding */ throttled; },\n/* harmony export */   \"M\": function(){ return /* binding */ _isDomSupported; },\n/* harmony export */   \"N\": function(){ return /* binding */ _factorize; },\n/* harmony export */   \"O\": function(){ return /* binding */ finiteOrDefault; },\n/* harmony export */   \"P\": function(){ return /* binding */ PI; },\n/* harmony export */   \"Q\": function(){ return /* binding */ callback; },\n/* harmony export */   \"R\": function(){ return /* binding */ _addGrace; },\n/* harmony export */   \"S\": function(){ return /* binding */ _limitValue; },\n/* harmony export */   \"T\": function(){ return /* binding */ TAU; },\n/* harmony export */   \"U\": function(){ return /* binding */ toDegrees; },\n/* harmony export */   \"V\": function(){ return /* binding */ _measureText; },\n/* harmony export */   \"W\": function(){ return /* binding */ _int16Range; },\n/* harmony export */   \"X\": function(){ return /* binding */ _alignPixel; },\n/* harmony export */   \"Y\": function(){ return /* binding */ clipArea; },\n/* harmony export */   \"Z\": function(){ return /* binding */ renderText; },\n/* harmony export */   \"_\": function(){ return /* binding */ _arrayUnique; },\n/* harmony export */   \"a\": function(){ return /* binding */ resolve; },\n/* harmony export */   \"a$\": function(){ return /* binding */ fontString; },\n/* harmony export */   \"a0\": function(){ return /* binding */ toFont; },\n/* harmony export */   \"a1\": function(){ return /* binding */ _toLeftRightCenter; },\n/* harmony export */   \"a2\": function(){ return /* binding */ _alignStartEnd; },\n/* harmony export */   \"a3\": function(){ return /* binding */ overrides; },\n/* harmony export */   \"a4\": function(){ return /* binding */ merge; },\n/* harmony export */   \"a5\": function(){ return /* binding */ _capitalize; },\n/* harmony export */   \"a6\": function(){ return /* binding */ descriptors; },\n/* harmony export */   \"a7\": function(){ return /* binding */ isFunction; },\n/* harmony export */   \"a8\": function(){ return /* binding */ _attachContext; },\n/* harmony export */   \"a9\": function(){ return /* binding */ _createResolver; },\n/* harmony export */   \"aA\": function(){ return /* binding */ overrideTextDirection; },\n/* harmony export */   \"aB\": function(){ return /* binding */ _textX; },\n/* harmony export */   \"aC\": function(){ return /* binding */ restoreTextDirection; },\n/* harmony export */   \"aD\": function(){ return /* binding */ drawPointLegend; },\n/* harmony export */   \"aE\": function(){ return /* binding */ distanceBetweenPoints; },\n/* harmony export */   \"aF\": function(){ return /* binding */ noop; },\n/* harmony export */   \"aG\": function(){ return /* binding */ _setMinAndMaxByKey; },\n/* harmony export */   \"aH\": function(){ return /* binding */ niceNum; },\n/* harmony export */   \"aI\": function(){ return /* binding */ almostWhole; },\n/* harmony export */   \"aJ\": function(){ return /* binding */ almostEquals; },\n/* harmony export */   \"aK\": function(){ return /* binding */ _decimalPlaces; },\n/* harmony export */   \"aL\": function(){ return /* binding */ Ticks; },\n/* harmony export */   \"aM\": function(){ return /* binding */ log10; },\n/* harmony export */   \"aN\": function(){ return /* binding */ _longestText; },\n/* harmony export */   \"aO\": function(){ return /* binding */ _filterBetween; },\n/* harmony export */   \"aP\": function(){ return /* binding */ _lookup; },\n/* harmony export */   \"aQ\": function(){ return /* binding */ isPatternOrGradient; },\n/* harmony export */   \"aR\": function(){ return /* binding */ getHoverColor; },\n/* harmony export */   \"aS\": function(){ return /* binding */ clone; },\n/* harmony export */   \"aT\": function(){ return /* binding */ _merger; },\n/* harmony export */   \"aU\": function(){ return /* binding */ _mergerIf; },\n/* harmony export */   \"aV\": function(){ return /* binding */ _deprecated; },\n/* harmony export */   \"aW\": function(){ return /* binding */ _splitKey; },\n/* harmony export */   \"aX\": function(){ return /* binding */ toFontString; },\n/* harmony export */   \"aY\": function(){ return /* binding */ splineCurve; },\n/* harmony export */   \"aZ\": function(){ return /* binding */ splineCurveMonotone; },\n/* harmony export */   \"a_\": function(){ return /* binding */ getStyle; },\n/* harmony export */   \"aa\": function(){ return /* binding */ _descriptors; },\n/* harmony export */   \"ab\": function(){ return /* binding */ mergeIf; },\n/* harmony export */   \"ac\": function(){ return /* binding */ uid; },\n/* harmony export */   \"ad\": function(){ return /* binding */ debounce; },\n/* harmony export */   \"ae\": function(){ return /* binding */ retinaScale; },\n/* harmony export */   \"af\": function(){ return /* binding */ clearCanvas; },\n/* harmony export */   \"ag\": function(){ return /* binding */ setsEqual; },\n/* harmony export */   \"ah\": function(){ return /* binding */ _elementsEqual; },\n/* harmony export */   \"ai\": function(){ return /* binding */ _isClickEvent; },\n/* harmony export */   \"aj\": function(){ return /* binding */ _isBetween; },\n/* harmony export */   \"ak\": function(){ return /* binding */ _readValueToProps; },\n/* harmony export */   \"al\": function(){ return /* binding */ _updateBezierControlPoints; },\n/* harmony export */   \"am\": function(){ return /* binding */ _computeSegments; },\n/* harmony export */   \"an\": function(){ return /* binding */ _boundSegments; },\n/* harmony export */   \"ao\": function(){ return /* binding */ _steppedInterpolation; },\n/* harmony export */   \"ap\": function(){ return /* binding */ _bezierInterpolation; },\n/* harmony export */   \"aq\": function(){ return /* binding */ _pointInLine; },\n/* harmony export */   \"ar\": function(){ return /* binding */ _steppedLineTo; },\n/* harmony export */   \"as\": function(){ return /* binding */ _bezierCurveTo; },\n/* harmony export */   \"at\": function(){ return /* binding */ drawPoint; },\n/* harmony export */   \"au\": function(){ return /* binding */ addRoundedRectPath; },\n/* harmony export */   \"av\": function(){ return /* binding */ toTRBL; },\n/* harmony export */   \"aw\": function(){ return /* binding */ toTRBLCorners; },\n/* harmony export */   \"ax\": function(){ return /* binding */ _boundSegment; },\n/* harmony export */   \"ay\": function(){ return /* binding */ _normalizeAngle; },\n/* harmony export */   \"az\": function(){ return /* binding */ getRtlAdapter; },\n/* harmony export */   \"b\": function(){ return /* binding */ isArray; },\n/* harmony export */   \"b0\": function(){ return /* binding */ toLineHeight; },\n/* harmony export */   \"b1\": function(){ return /* binding */ PITAU; },\n/* harmony export */   \"b2\": function(){ return /* binding */ INFINITY; },\n/* harmony export */   \"b3\": function(){ return /* binding */ RAD_PER_DEG; },\n/* harmony export */   \"b4\": function(){ return /* binding */ QUARTER_PI; },\n/* harmony export */   \"b5\": function(){ return /* binding */ TWO_THIRDS_PI; },\n/* harmony export */   \"b6\": function(){ return /* binding */ _angleDiff; },\n/* harmony export */   \"c\": function(){ return /* binding */ color; },\n/* harmony export */   \"d\": function(){ return /* binding */ defaults; },\n/* harmony export */   \"e\": function(){ return /* binding */ effects; },\n/* harmony export */   \"f\": function(){ return /* binding */ resolveObjectKey; },\n/* harmony export */   \"g\": function(){ return /* binding */ isNumberFinite; },\n/* harmony export */   \"h\": function(){ return /* binding */ defined; },\n/* harmony export */   \"i\": function(){ return /* binding */ isObject; },\n/* harmony export */   \"j\": function(){ return /* binding */ createContext; },\n/* harmony export */   \"k\": function(){ return /* binding */ isNullOrUndef; },\n/* harmony export */   \"l\": function(){ return /* binding */ listenArrayEvents; },\n/* harmony export */   \"m\": function(){ return /* binding */ toPercentage; },\n/* harmony export */   \"n\": function(){ return /* binding */ toDimension; },\n/* harmony export */   \"o\": function(){ return /* binding */ formatNumber; },\n/* harmony export */   \"p\": function(){ return /* binding */ _angleBetween; },\n/* harmony export */   \"q\": function(){ return /* binding */ _getStartAndCountOfVisiblePoints; },\n/* harmony export */   \"r\": function(){ return /* binding */ requestAnimFrame; },\n/* harmony export */   \"s\": function(){ return /* binding */ sign; },\n/* harmony export */   \"t\": function(){ return /* binding */ toRadians; },\n/* harmony export */   \"u\": function(){ return /* binding */ unlistenArrayEvents; },\n/* harmony export */   \"v\": function(){ return /* binding */ valueOrDefault; },\n/* harmony export */   \"w\": function(){ return /* binding */ _scaleRangesChanged; },\n/* harmony export */   \"x\": function(){ return /* binding */ isNumber; },\n/* harmony export */   \"y\": function(){ return /* binding */ _parseObjectDataRadialScale; },\n/* harmony export */   \"z\": function(){ return /* binding */ getRelativePosition; }\n/* harmony export */ });\n/* harmony import */ var _kurkle_color__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(/*! @kurkle/color */ \"./node_modules/@kurkle/color/dist/color.esm.js\");\n/*!\n * Chart.js v4.3.3\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\n\n\n/**\n * @namespace Chart.helpers\n */ /**\n * An empty function that can be used, for example, for optional callback.\n */ function noop(){\n/* noop */ }\n/**\n * Returns a unique id, sequentially generated from a global variable.\n */ const uid=(()=>{\n    let id=0;\n    return ()=>id++;\n})();\n/**\n * Returns true if `value` is neither null nor undefined, else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isNullOrUndef(value){\n    return value===null||typeof value==='undefined';\n}\n/**\n * Returns true if `value` is an array (including typed arrays), else returns false.\n * @param value - The value to test.\n * @function\n */ function isArray(value){\n    if(Array.isArray&&Array.isArray(value)){\n        return true;\n    }\n    const type=Object.prototype.toString.call(value);\n    if(type.slice(0, 7)==='[object'&&type.slice(-6)==='Array]'){\n        return true;\n    }\n    return false;\n}\n/**\n * Returns true if `value` is an object (excluding null), else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isObject(value){\n    return value!==null&&Object.prototype.toString.call(value)==='[object Object]';\n}\n/**\n * Returns true if `value` is a finite number, else returns false\n * @param value  - The value to test.\n */ function isNumberFinite(value){\n    return (typeof value==='number'||value instanceof Number)&&isFinite(+value);\n}\n/**\n * Returns `value` if finite, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is not finite.\n */ function finiteOrDefault(value, defaultValue){\n    return isNumberFinite(value) ? value:defaultValue;\n}\n/**\n * Returns `value` if defined, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is undefined.\n */ function valueOrDefault(value, defaultValue){\n    return typeof value==='undefined' ? defaultValue:value;\n}\nconst toPercentage=(value, dimension)=>typeof value==='string'&&value.endsWith('%') ? parseFloat(value) / 100:+value / dimension;\nconst toDimension=(value, dimension)=>typeof value==='string'&&value.endsWith('%') ? parseFloat(value) / 100 * dimension:+value;\n/**\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n * @param fn - The function to call.\n * @param args - The arguments with which `fn` should be called.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n */ function callback(fn, args, thisArg){\n    if(fn&&typeof fn.call==='function'){\n        return fn.apply(thisArg, args);\n    }\n}\nfunction each(loopable, fn, thisArg, reverse){\n    let i, len, keys;\n    if(isArray(loopable)){\n        len=loopable.length;\n        if(reverse){\n            for(i=len - 1; i >=0; i--){\n                fn.call(thisArg, loopable[i], i);\n            }\n        }else{\n            for(i=0; i < len; i++){\n                fn.call(thisArg, loopable[i], i);\n            }\n        }\n    }else if(isObject(loopable)){\n        keys=Object.keys(loopable);\n        len=keys.length;\n        for(i=0; i < len; i++){\n            fn.call(thisArg, loopable[keys[i]], keys[i]);\n        }\n    }\n}\n/**\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n * @param a0 - The array to compare\n * @param a1 - The array to compare\n * @private\n */ function _elementsEqual(a0, a1){\n    let i, ilen, v0, v1;\n    if(!a0||!a1||a0.length!==a1.length){\n        return false;\n    }\n    for(i=0, ilen=a0.length; i < ilen; ++i){\n        v0=a0[i];\n        v1=a1[i];\n        if(v0.datasetIndex!==v1.datasetIndex||v0.index!==v1.index){\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Returns a deep copy of `source` without keeping references on objects and arrays.\n * @param source - The value to clone.\n */ function clone(source){\n    if(isArray(source)){\n        return source.map(clone);\n    }\n    if(isObject(source)){\n        const target=Object.create(null);\n        const keys=Object.keys(source);\n        const klen=keys.length;\n        let k=0;\n        for(; k < klen; ++k){\n            target[keys[k]]=clone(source[keys[k]]);\n        }\n        return target;\n    }\n    return source;\n}\nfunction isValidKey(key){\n    return [\n        '__proto__',\n        'prototype',\n        'constructor'\n    ].indexOf(key)===-1;\n}\n/**\n * The default merger when Chart.helpers.merge is called without merger option.\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n * @private\n */ function _merger(key, target, source, options){\n    if(!isValidKey(key)){\n        return;\n    }\n    const tval=target[key];\n    const sval=source[key];\n    if(isObject(tval)&&isObject(sval)){\n        // eslint-disable-next-line @typescript-eslint/no-use-before-define\n        merge(tval, sval, options);\n    }else{\n        target[key]=clone(sval);\n    }\n}\nfunction merge(target, source, options){\n    const sources=isArray(source) ? source:[\n        source\n    ];\n    const ilen=sources.length;\n    if(!isObject(target)){\n        return target;\n    }\n    options=options||{};\n    const merger=options.merger||_merger;\n    let current;\n    for(let i=0; i < ilen; ++i){\n        current=sources[i];\n        if(!isObject(current)){\n            continue;\n        }\n        const keys=Object.keys(current);\n        for(let k=0, klen=keys.length; k < klen; ++k){\n            merger(keys[k], target, current, options);\n        }\n    }\n    return target;\n}\nfunction mergeIf(target, source){\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    return merge(target, source, {\n        merger: _mergerIf\n    });\n}\n/**\n * Merges source[key] in target[key] only if target[key] is undefined.\n * @private\n */ function _mergerIf(key, target, source){\n    if(!isValidKey(key)){\n        return;\n    }\n    const tval=target[key];\n    const sval=source[key];\n    if(isObject(tval)&&isObject(sval)){\n        mergeIf(tval, sval);\n    }else if(!Object.prototype.hasOwnProperty.call(target, key)){\n        target[key]=clone(sval);\n    }\n}\n/**\n * @private\n */ function _deprecated(scope, value, previous, current){\n    if(value!==undefined){\n        console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n    }\n}\n// resolveObjectKey resolver cache\nconst keyResolvers={\n    // Chart.helpers.core resolveObjectKey should resolve empty key to root object\n    '': (v)=>v,\n    // default resolvers\n    x: (o)=>o.x,\n    y: (o)=>o.y\n};\n/**\n * @private\n */ function _splitKey(key){\n    const parts=key.split('.');\n    const keys=[];\n    let tmp='';\n    for (const part of parts){\n        tmp +=part;\n        if(tmp.endsWith('\\\\')){\n            tmp=tmp.slice(0, -1) + '.';\n        }else{\n            keys.push(tmp);\n            tmp='';\n        }\n    }\n    return keys;\n}\nfunction _getKeyResolver(key){\n    const keys=_splitKey(key);\n    return (obj)=>{\n        for (const k of keys){\n            if(k===''){\n                break;\n            }\n            obj=obj&&obj[k];\n        }\n        return obj;\n    };\n}\nfunction resolveObjectKey(obj, key){\n    const resolver=keyResolvers[key]||(keyResolvers[key]=_getKeyResolver(key));\n    return resolver(obj);\n}\n/**\n * @private\n */ function _capitalize(str){\n    return str.charAt(0).toUpperCase() + str.slice(1);\n}\nconst defined=(value)=>typeof value!=='undefined';\nconst isFunction=(value)=>typeof value==='function';\n// Adapted from https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality#31129384\nconst setsEqual=(a, b)=>{\n    if(a.size!==b.size){\n        return false;\n    }\n    for (const item of a){\n        if(!b.has(item)){\n            return false;\n        }\n    }\n    return true;\n};\n/**\n * @param e - The event\n * @private\n */ function _isClickEvent(e){\n    return e.type==='mouseup'||e.type==='click'||e.type==='contextmenu';\n}\n\n/**\n * @alias Chart.helpers.math\n * @namespace\n */ const PI=Math.PI;\nconst TAU=2 * PI;\nconst PITAU=TAU + PI;\nconst INFINITY=Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG=PI / 180;\nconst HALF_PI=PI / 2;\nconst QUARTER_PI=PI / 4;\nconst TWO_THIRDS_PI=PI * 2 / 3;\nconst log10=Math.log10;\nconst sign=Math.sign;\nfunction almostEquals(x, y, epsilon){\n    return Math.abs(x - y) < epsilon;\n}\n/**\n * Implementation of the nice number algorithm used in determining where axis labels will go\n */ function niceNum(range){\n    const roundedRange=Math.round(range);\n    range=almostEquals(range, roundedRange, range / 1000) ? roundedRange:range;\n    const niceRange=Math.pow(10, Math.floor(log10(range)));\n    const fraction=range / niceRange;\n    const niceFraction=fraction <=1 ? 1:fraction <=2 ? 2:fraction <=5 ? 5:10;\n    return niceFraction * niceRange;\n}\n/**\n * Returns an array of factors sorted from 1 to sqrt(value)\n * @private\n */ function _factorize(value){\n    const result=[];\n    const sqrt=Math.sqrt(value);\n    let i;\n    for(i=1; i < sqrt; i++){\n        if(value % i===0){\n            result.push(i);\n            result.push(value / i);\n        }\n    }\n    if(sqrt===(sqrt | 0)){\n        result.push(sqrt);\n    }\n    result.sort((a, b)=>a - b).pop();\n    return result;\n}\nfunction isNumber(n){\n    return !isNaN(parseFloat(n))&&isFinite(n);\n}\nfunction almostWhole(x, epsilon){\n    const rounded=Math.round(x);\n    return rounded - epsilon <=x&&rounded + epsilon >=x;\n}\n/**\n * @private\n */ function _setMinAndMaxByKey(array, target, property){\n    let i, ilen, value;\n    for(i=0, ilen=array.length; i < ilen; i++){\n        value=array[i][property];\n        if(!isNaN(value)){\n            target.min=Math.min(target.min, value);\n            target.max=Math.max(target.max, value);\n        }\n    }\n}\nfunction toRadians(degrees){\n    return degrees * (PI / 180);\n}\nfunction toDegrees(radians){\n    return radians * (180 / PI);\n}\n/**\n * Returns the number of decimal places\n * i.e. the number of digits after the decimal point, of the value of this Number.\n * @param x - A number.\n * @returns The number of decimal places.\n * @private\n */ function _decimalPlaces(x){\n    if(!isNumberFinite(x)){\n        return;\n    }\n    let e=1;\n    let p=0;\n    while(Math.round(x * e) / e!==x){\n        e *=10;\n        p++;\n    }\n    return p;\n}\n// Gets the angle from vertical upright to the point about a centre.\nfunction getAngleFromPoint(centrePoint, anglePoint){\n    const distanceFromXCenter=anglePoint.x - centrePoint.x;\n    const distanceFromYCenter=anglePoint.y - centrePoint.y;\n    const radialDistanceFromCenter=Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n    let angle=Math.atan2(distanceFromYCenter, distanceFromXCenter);\n    if(angle < -0.5 * PI){\n        angle +=TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n    }\n    return {\n        angle,\n        distance: radialDistanceFromCenter\n    };\n}\nfunction distanceBetweenPoints(pt1, pt2){\n    return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n/**\n * Shortest distance between angles, in either direction.\n * @private\n */ function _angleDiff(a, b){\n    return (a - b + PITAU) % TAU - PI;\n}\n/**\n * Normalize angle to be between 0 and 2*PI\n * @private\n */ function _normalizeAngle(a){\n    return (a % TAU + TAU) % TAU;\n}\n/**\n * @private\n */ function _angleBetween(angle, start, end, sameAngleIsFullCircle){\n    const a=_normalizeAngle(angle);\n    const s=_normalizeAngle(start);\n    const e=_normalizeAngle(end);\n    const angleToStart=_normalizeAngle(s - a);\n    const angleToEnd=_normalizeAngle(e - a);\n    const startToAngle=_normalizeAngle(a - s);\n    const endToAngle=_normalizeAngle(a - e);\n    return a===s||a===e||sameAngleIsFullCircle&&s===e||angleToStart > angleToEnd&&startToAngle < endToAngle;\n}\n/**\n * Limit `value` between `min` and `max`\n * @param value\n * @param min\n * @param max\n * @private\n */ function _limitValue(value, min, max){\n    return Math.max(min, Math.min(max, value));\n}\n/**\n * @param {number} value\n * @private\n */ function _int16Range(value){\n    return _limitValue(value, -32768, 32767);\n}\n/**\n * @param value\n * @param start\n * @param end\n * @param [epsilon]\n * @private\n */ function _isBetween(value, start, end, epsilon=1e-6){\n    return value >=Math.min(start, end) - epsilon&&value <=Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp){\n    cmp=cmp||((index)=>table[index] < value);\n    let hi=table.length - 1;\n    let lo=0;\n    let mid;\n    while(hi - lo > 1){\n        mid=lo + hi >> 1;\n        if(cmp(mid)){\n            lo=mid;\n        }else{\n            hi=mid;\n        }\n    }\n    return {\n        lo,\n        hi\n    };\n}\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @param last - lookup last index\n * @private\n */ const _lookupByKey=(table, key, value, last)=>_lookup(table, value, last ? (index)=>{\n        const ti=table[index][key];\n        return ti < value||ti===value&&table[index + 1][key]===value;\n    }:(index)=>table[index][key] < value);\n/**\n * Reverse binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @private\n */ const _rlookupByKey=(table, key, value)=>_lookup(table, value, (index)=>table[index][key] >=value);\n/**\n * Return subset of `values` between `min` and `max` inclusive.\n * Values are assumed to be in sorted order.\n * @param values - sorted array of values\n * @param min - min value\n * @param max - max value\n */ function _filterBetween(values, min, max){\n    let start=0;\n    let end=values.length;\n    while(start < end&&values[start] < min){\n        start++;\n    }\n    while(end > start&&values[end - 1] > max){\n        end--;\n    }\n    return start > 0||end < values.length ? values.slice(start, end):values;\n}\nconst arrayEvents=[\n    'push',\n    'pop',\n    'shift',\n    'splice',\n    'unshift'\n];\nfunction listenArrayEvents(array, listener){\n    if(array._chartjs){\n        array._chartjs.listeners.push(listener);\n        return;\n    }\n    Object.defineProperty(array, '_chartjs', {\n        configurable: true,\n        enumerable: false,\n        value: {\n            listeners: [\n                listener\n            ]\n        }\n    });\n    arrayEvents.forEach((key)=>{\n        const method='_onData' + _capitalize(key);\n        const base=array[key];\n        Object.defineProperty(array, key, {\n            configurable: true,\n            enumerable: false,\n            value (...args){\n                const res=base.apply(this, args);\n                array._chartjs.listeners.forEach((object)=>{\n                    if(typeof object[method]==='function'){\n                        object[method](...args);\n                    }\n                });\n                return res;\n            }\n        });\n    });\n}\nfunction unlistenArrayEvents(array, listener){\n    const stub=array._chartjs;\n    if(!stub){\n        return;\n    }\n    const listeners=stub.listeners;\n    const index=listeners.indexOf(listener);\n    if(index!==-1){\n        listeners.splice(index, 1);\n    }\n    if(listeners.length > 0){\n        return;\n    }\n    arrayEvents.forEach((key)=>{\n        delete array[key];\n    });\n    delete array._chartjs;\n}\n/**\n * @param items\n */ function _arrayUnique(items){\n    const set=new Set(items);\n    if(set.size===items.length){\n        return items;\n    }\n    return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily){\n    return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n/**\n* Request animation polyfill\n*/ const requestAnimFrame=function(){\n    if(typeof window==='undefined'){\n        return function(callback){\n            return callback();\n        };\n    }\n    return window.requestAnimationFrame;\n}();\n/**\n * Throttles calling `fn` once per animation frame\n * Latest arguments are used on the actual call\n */ function throttled(fn, thisArg){\n    let argsToUse=[];\n    let ticking=false;\n    return function(...args){\n        // Save the args for use later\n        argsToUse=args;\n        if(!ticking){\n            ticking=true;\n            requestAnimFrame.call(window, ()=>{\n                ticking=false;\n                fn.apply(thisArg, argsToUse);\n            });\n        }\n    };\n}\n/**\n * Debounces calling `fn` for `delay` ms\n */ function debounce(fn, delay){\n    let timeout;\n    return function(...args){\n        if(delay){\n            clearTimeout(timeout);\n            timeout=setTimeout(fn, delay, args);\n        }else{\n            fn.apply(this, args);\n        }\n        return delay;\n    };\n}\n/**\n * Converts 'start' to 'left', 'end' to 'right' and others to 'center'\n * @private\n */ const _toLeftRightCenter=(align)=>align==='start' ? 'left':align==='end' ? 'right':'center';\n/**\n * Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center`\n * @private\n */ const _alignStartEnd=(align, start, end)=>align==='start' ? start:align==='end' ? end:(start + end) / 2;\n/**\n * Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left`\n * @private\n */ const _textX=(align, left, right, rtl)=>{\n    const check=rtl ? 'left':'right';\n    return align===check ? right:align==='center' ? (left + right) / 2:left;\n};\n/**\n * Return start and count of visible points.\n * @private\n */ function _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled){\n    const pointCount=points.length;\n    let start=0;\n    let count=pointCount;\n    if(meta._sorted){\n        const { iScale , _parsed  }=meta;\n        const axis=iScale.axis;\n        const { min , max , minDefined , maxDefined  }=iScale.getUserBounds();\n        if(minDefined){\n            start=_limitValue(Math.min(// @ts-expect-error Need to type _parsed\n            _lookupByKey(_parsed, axis, min).lo, // @ts-expect-error Need to fix types on _lookupByKey\n            animationsDisabled ? pointCount:_lookupByKey(points, axis, iScale.getPixelForValue(min)).lo), 0, pointCount - 1);\n        }\n        if(maxDefined){\n            count=_limitValue(Math.max(// @ts-expect-error Need to type _parsed\n            _lookupByKey(_parsed, iScale.axis, max, true).hi + 1, // @ts-expect-error Need to fix types on _lookupByKey\n            animationsDisabled ? 0:_lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1), start, pointCount) - start;\n        }else{\n            count=pointCount - start;\n        }\n    }\n    return {\n        start,\n        count\n    };\n}\n/**\n * Checks if the scale ranges have changed.\n * @param {object} meta - dataset meta.\n * @returns {boolean}\n * @private\n */ function _scaleRangesChanged(meta){\n    const { xScale , yScale , _scaleRanges  }=meta;\n    const newRanges={\n        xmin: xScale.min,\n        xmax: xScale.max,\n        ymin: yScale.min,\n        ymax: yScale.max\n    };\n    if(!_scaleRanges){\n        meta._scaleRanges=newRanges;\n        return true;\n    }\n    const changed=_scaleRanges.xmin!==xScale.min||_scaleRanges.xmax!==xScale.max||_scaleRanges.ymin!==yScale.min||_scaleRanges.ymax!==yScale.max;\n    Object.assign(_scaleRanges, newRanges);\n    return changed;\n}\n\nconst atEdge=(t)=>t===0||t===1;\nconst elasticIn=(t, s, p)=>-(Math.pow(2, 10 * (t -=1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut=(t, s, p)=>Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easing.effects\n * @see http://www.robertpenner.com/easing/\n */ const effects={\n    linear: (t)=>t,\n    easeInQuad: (t)=>t * t,\n    easeOutQuad: (t)=>-t * (t - 2),\n    easeInOutQuad: (t)=>(t /=0.5) < 1 ? 0.5 * t * t:-0.5 * (--t * (t - 2) - 1),\n    easeInCubic: (t)=>t * t * t,\n    easeOutCubic: (t)=>(t -=1) * t * t + 1,\n    easeInOutCubic: (t)=>(t /=0.5) < 1 ? 0.5 * t * t * t:0.5 * ((t -=2) * t * t + 2),\n    easeInQuart: (t)=>t * t * t * t,\n    easeOutQuart: (t)=>-((t -=1) * t * t * t - 1),\n    easeInOutQuart: (t)=>(t /=0.5) < 1 ? 0.5 * t * t * t * t:-0.5 * ((t -=2) * t * t * t - 2),\n    easeInQuint: (t)=>t * t * t * t * t,\n    easeOutQuint: (t)=>(t -=1) * t * t * t * t + 1,\n    easeInOutQuint: (t)=>(t /=0.5) < 1 ? 0.5 * t * t * t * t * t:0.5 * ((t -=2) * t * t * t * t + 2),\n    easeInSine: (t)=>-Math.cos(t * HALF_PI) + 1,\n    easeOutSine: (t)=>Math.sin(t * HALF_PI),\n    easeInOutSine: (t)=>-0.5 * (Math.cos(PI * t) - 1),\n    easeInExpo: (t)=>t===0 ? 0:Math.pow(2, 10 * (t - 1)),\n    easeOutExpo: (t)=>t===1 ? 1:-Math.pow(2, -10 * t) + 1,\n    easeInOutExpo: (t)=>atEdge(t) ? t:t < 0.5 ? 0.5 * Math.pow(2, 10 * (t * 2 - 1)):0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n    easeInCirc: (t)=>t >=1 ? t:-(Math.sqrt(1 - t * t) - 1),\n    easeOutCirc: (t)=>Math.sqrt(1 - (t -=1) * t),\n    easeInOutCirc: (t)=>(t /=0.5) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1):0.5 * (Math.sqrt(1 - (t -=2) * t) + 1),\n    easeInElastic: (t)=>atEdge(t) ? t:elasticIn(t, 0.075, 0.3),\n    easeOutElastic: (t)=>atEdge(t) ? t:elasticOut(t, 0.075, 0.3),\n    easeInOutElastic (t){\n        const s=0.1125;\n        const p=0.45;\n        return atEdge(t) ? t:t < 0.5 ? 0.5 * elasticIn(t * 2, s, p):0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n    },\n    easeInBack (t){\n        const s=1.70158;\n        return t * t * ((s + 1) * t - s);\n    },\n    easeOutBack (t){\n        const s=1.70158;\n        return (t -=1) * t * ((s + 1) * t + s) + 1;\n    },\n    easeInOutBack (t){\n        let s=1.70158;\n        if((t /=0.5) < 1){\n            return 0.5 * (t * t * (((s *=1.525) + 1) * t - s));\n        }\n        return 0.5 * ((t -=2) * t * (((s *=1.525) + 1) * t + s) + 2);\n    },\n    easeInBounce: (t)=>1 - effects.easeOutBounce(1 - t),\n    easeOutBounce (t){\n        const m=7.5625;\n        const d=2.75;\n        if(t < 1 / d){\n            return m * t * t;\n        }\n        if(t < 2 / d){\n            return m * (t -=1.5 / d) * t + 0.75;\n        }\n        if(t < 2.5 / d){\n            return m * (t -=2.25 / d) * t + 0.9375;\n        }\n        return m * (t -=2.625 / d) * t + 0.984375;\n    },\n    easeInOutBounce: (t)=>t < 0.5 ? effects.easeInBounce(t * 2) * 0.5:effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5\n};\n\nfunction isPatternOrGradient(value){\n    if(value&&typeof value==='object'){\n        const type=value.toString();\n        return type==='[object CanvasPattern]'||type==='[object CanvasGradient]';\n    }\n    return false;\n}\nfunction color(value){\n    return isPatternOrGradient(value) ? value:new _kurkle_color__WEBPACK_IMPORTED_MODULE_0__.Color(value);\n}\nfunction getHoverColor(value){\n    return isPatternOrGradient(value) ? value:new _kurkle_color__WEBPACK_IMPORTED_MODULE_0__.Color(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst numbers=[\n    'x',\n    'y',\n    'borderWidth',\n    'radius',\n    'tension'\n];\nconst colors=[\n    'color',\n    'borderColor',\n    'backgroundColor'\n];\nfunction applyAnimationsDefaults(defaults){\n    defaults.set('animation', {\n        delay: undefined,\n        duration: 1000,\n        easing: 'easeOutQuart',\n        fn: undefined,\n        from: undefined,\n        loop: undefined,\n        to: undefined,\n        type: undefined\n    });\n    defaults.describe('animation', {\n        _fallback: false,\n        _indexable: false,\n        _scriptable: (name)=>name!=='onProgress'&&name!=='onComplete'&&name!=='fn'\n    });\n    defaults.set('animations', {\n        colors: {\n            type: 'color',\n            properties: colors\n        },\n        numbers: {\n            type: 'number',\n            properties: numbers\n        }\n    });\n    defaults.describe('animations', {\n        _fallback: 'animation'\n    });\n    defaults.set('transitions', {\n        active: {\n            animation: {\n                duration: 400\n            }\n        },\n        resize: {\n            animation: {\n                duration: 0\n            }\n        },\n        show: {\n            animations: {\n                colors: {\n                    from: 'transparent'\n                },\n                visible: {\n                    type: 'boolean',\n                    duration: 0\n                }\n            }\n        },\n        hide: {\n            animations: {\n                colors: {\n                    to: 'transparent'\n                },\n                visible: {\n                    type: 'boolean',\n                    easing: 'linear',\n                    fn: (v)=>v | 0\n                }\n            }\n        }\n    });\n}\n\nfunction applyLayoutsDefaults(defaults){\n    defaults.set('layout', {\n        autoPadding: true,\n        padding: {\n            top: 0,\n            right: 0,\n            bottom: 0,\n            left: 0\n        }\n    });\n}\n\nconst intlCache=new Map();\nfunction getNumberFormat(locale, options){\n    options=options||{};\n    const cacheKey=locale + JSON.stringify(options);\n    let formatter=intlCache.get(cacheKey);\n    if(!formatter){\n        formatter=new Intl.NumberFormat(locale, options);\n        intlCache.set(cacheKey, formatter);\n    }\n    return formatter;\n}\nfunction formatNumber(num, locale, options){\n    return getNumberFormat(locale, options).format(num);\n}\n\nconst formatters={\n values (value){\n        return isArray(value) ?  value:'' + value;\n    },\n numeric (tickValue, index, ticks){\n        if(tickValue===0){\n            return '0';\n        }\n        const locale=this.chart.options.locale;\n        let notation;\n        let delta=tickValue;\n        if(ticks.length > 1){\n            const maxTick=Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n            if(maxTick < 1e-4||maxTick > 1e+15){\n                notation='scientific';\n            }\n            delta=calculateDelta(tickValue, ticks);\n        }\n        const logDelta=log10(Math.abs(delta));\n        const numDecimal=isNaN(logDelta) ? 1:Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n        const options={\n            notation,\n            minimumFractionDigits: numDecimal,\n            maximumFractionDigits: numDecimal\n        };\n        Object.assign(options, this.options.ticks.format);\n        return formatNumber(tickValue, locale, options);\n    },\n logarithmic (tickValue, index, ticks){\n        if(tickValue===0){\n            return '0';\n        }\n        const remain=ticks[index].significand||tickValue / Math.pow(10, Math.floor(log10(tickValue)));\n        if([\n            1,\n            2,\n            3,\n            5,\n            10,\n            15\n        ].includes(remain)||index > 0.8 * ticks.length){\n            return formatters.numeric.call(this, tickValue, index, ticks);\n        }\n        return '';\n    }\n};\nfunction calculateDelta(tickValue, ticks){\n    let delta=ticks.length > 3 ? ticks[2].value - ticks[1].value:ticks[1].value - ticks[0].value;\n    if(Math.abs(delta) >=1&&tickValue!==Math.floor(tickValue)){\n        delta=tickValue - Math.floor(tickValue);\n    }\n    return delta;\n}\n var Ticks={\n    formatters\n};\n\nfunction applyScaleDefaults(defaults){\n    defaults.set('scale', {\n        display: true,\n        offset: false,\n        reverse: false,\n        beginAtZero: false,\n bounds: 'ticks',\n grace: 0,\n        grid: {\n            display: true,\n            lineWidth: 1,\n            drawOnChartArea: true,\n            drawTicks: true,\n            tickLength: 8,\n            tickWidth: (_ctx, options)=>options.lineWidth,\n            tickColor: (_ctx, options)=>options.color,\n            offset: false\n        },\n        border: {\n            display: true,\n            dash: [],\n            dashOffset: 0.0,\n            width: 1\n        },\n        title: {\n            display: false,\n            text: '',\n            padding: {\n                top: 4,\n                bottom: 4\n            }\n        },\n        ticks: {\n            minRotation: 0,\n            maxRotation: 50,\n            mirror: false,\n            textStrokeWidth: 0,\n            textStrokeColor: '',\n            padding: 3,\n            display: true,\n            autoSkip: true,\n            autoSkipPadding: 3,\n            labelOffset: 0,\n            callback: Ticks.formatters.values,\n            minor: {},\n            major: {},\n            align: 'center',\n            crossAlign: 'near',\n            showLabelBackdrop: false,\n            backdropColor: 'rgba(255, 255, 255, 0.75)',\n            backdropPadding: 2\n        }\n    });\n    defaults.route('scale.ticks', 'color', '', 'color');\n    defaults.route('scale.grid', 'color', '', 'borderColor');\n    defaults.route('scale.border', 'color', '', 'borderColor');\n    defaults.route('scale.title', 'color', '', 'color');\n    defaults.describe('scale', {\n        _fallback: false,\n        _scriptable: (name)=>!name.startsWith('before')&&!name.startsWith('after')&&name!=='callback'&&name!=='parser',\n        _indexable: (name)=>name!=='borderDash'&&name!=='tickBorderDash'&&name!=='dash'\n    });\n    defaults.describe('scales', {\n        _fallback: 'scale'\n    });\n    defaults.describe('scale.ticks', {\n        _scriptable: (name)=>name!=='backdropPadding'&&name!=='callback',\n        _indexable: (name)=>name!=='backdropPadding'\n    });\n}\n\nconst overrides=Object.create(null);\nconst descriptors=Object.create(null);\n function getScope$1(node, key){\n    if(!key){\n        return node;\n    }\n    const keys=key.split('.');\n    for(let i=0, n=keys.length; i < n; ++i){\n        const k=keys[i];\n        node=node[k]||(node[k]=Object.create(null));\n    }\n    return node;\n}\nfunction set(root, scope, values){\n    if(typeof scope==='string'){\n        return merge(getScope$1(root, scope), values);\n    }\n    return merge(getScope$1(root, ''), scope);\n}\n class Defaults {\n    constructor(_descriptors, _appliers){\n        this.animation=undefined;\n        this.backgroundColor='rgba(0,0,0,0.1)';\n        this.borderColor='rgba(0,0,0,0.1)';\n        this.color='#666';\n        this.datasets={};\n        this.devicePixelRatio=(context)=>context.chart.platform.getDevicePixelRatio();\n        this.elements={};\n        this.events=[\n            'mousemove',\n            'mouseout',\n            'click',\n            'touchstart',\n            'touchmove'\n        ];\n        this.font={\n            family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n            size: 12,\n            style: 'normal',\n            lineHeight: 1.2,\n            weight: null\n        };\n        this.hover={};\n        this.hoverBackgroundColor=(ctx, options)=>getHoverColor(options.backgroundColor);\n        this.hoverBorderColor=(ctx, options)=>getHoverColor(options.borderColor);\n        this.hoverColor=(ctx, options)=>getHoverColor(options.color);\n        this.indexAxis='x';\n        this.interaction={\n            mode: 'nearest',\n            intersect: true,\n            includeInvisible: false\n        };\n        this.maintainAspectRatio=true;\n        this.onHover=null;\n        this.onClick=null;\n        this.parsing=true;\n        this.plugins={};\n        this.responsive=true;\n        this.scale=undefined;\n        this.scales={};\n        this.showLine=true;\n        this.drawActiveElementsOnTop=true;\n        this.describe(_descriptors);\n        this.apply(_appliers);\n    }\n set(scope, values){\n        return set(this, scope, values);\n    }\n get(scope){\n        return getScope$1(this, scope);\n    }\n describe(scope, values){\n        return set(descriptors, scope, values);\n    }\n    override(scope, values){\n        return set(overrides, scope, values);\n    }\n route(scope, name, targetScope, targetName){\n        const scopeObject=getScope$1(this, scope);\n        const targetScopeObject=getScope$1(this, targetScope);\n        const privateName='_' + name;\n        Object.defineProperties(scopeObject, {\n            [privateName]: {\n                value: scopeObject[name],\n                writable: true\n            },\n            [name]: {\n                enumerable: true,\n                get (){\n                    const local=this[privateName];\n                    const target=targetScopeObject[targetName];\n                    if(isObject(local)){\n                        return Object.assign({}, target, local);\n                    }\n                    return valueOrDefault(local, target);\n                },\n                set (value){\n                    this[privateName]=value;\n                }\n            }\n        });\n    }\n    apply(appliers){\n        appliers.forEach((apply)=>apply(this));\n    }\n}\nvar defaults=/* #__PURE__ */ new Defaults({\n    _scriptable: (name)=>!name.startsWith('on'),\n    _indexable: (name)=>name!=='events',\n    hover: {\n        _fallback: 'interaction'\n    },\n    interaction: {\n        _scriptable: false,\n        _indexable: false\n    }\n}, [\n    applyAnimationsDefaults,\n    applyLayoutsDefaults,\n    applyScaleDefaults\n]);\n\n/**\n * Converts the given font object into a CSS font string.\n * @param font - A font object.\n * @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\n * @private\n */ function toFontString(font){\n    if(!font||isNullOrUndef(font.size)||isNullOrUndef(font.family)){\n        return null;\n    }\n    return (font.style ? font.style + ' ':'') + (font.weight ? font.weight + ' ':'') + font.size + 'px ' + font.family;\n}\n/**\n * @private\n */ function _measureText(ctx, data, gc, longest, string){\n    let textWidth=data[string];\n    if(!textWidth){\n        textWidth=data[string]=ctx.measureText(string).width;\n        gc.push(string);\n    }\n    if(textWidth > longest){\n        longest=textWidth;\n    }\n    return longest;\n}\n/**\n * @private\n */ // eslint-disable-next-line complexity\nfunction _longestText(ctx, font, arrayOfThings, cache){\n    cache=cache||{};\n    let data=cache.data=cache.data||{};\n    let gc=cache.garbageCollect=cache.garbageCollect||[];\n    if(cache.font!==font){\n        data=cache.data={};\n        gc=cache.garbageCollect=[];\n        cache.font=font;\n    }\n    ctx.save();\n    ctx.font=font;\n    let longest=0;\n    const ilen=arrayOfThings.length;\n    let i, j, jlen, thing, nestedThing;\n    for(i=0; i < ilen; i++){\n        thing=arrayOfThings[i];\n        // Undefined strings and arrays should not be measured\n        if(thing!==undefined&&thing!==null&&!isArray(thing)){\n            longest=_measureText(ctx, data, gc, longest, thing);\n        }else if(isArray(thing)){\n            // if it is an array lets measure each element\n            // to do maybe simplify this function a bit so we can do this more recursively?\n            for(j=0, jlen=thing.length; j < jlen; j++){\n                nestedThing=thing[j];\n                // Undefined strings and arrays should not be measured\n                if(nestedThing!==undefined&&nestedThing!==null&&!isArray(nestedThing)){\n                    longest=_measureText(ctx, data, gc, longest, nestedThing);\n                }\n            }\n        }\n    }\n    ctx.restore();\n    const gcLen=gc.length / 2;\n    if(gcLen > arrayOfThings.length){\n        for(i=0; i < gcLen; i++){\n            delete data[gc[i]];\n        }\n        gc.splice(0, gcLen);\n    }\n    return longest;\n}\n/**\n * Returns the aligned pixel value to avoid anti-aliasing blur\n * @param chart - The chart instance.\n * @param pixel - A pixel value.\n * @param width - The width of the element.\n * @returns The aligned pixel value.\n * @private\n */ function _alignPixel(chart, pixel, width){\n    const devicePixelRatio=chart.currentDevicePixelRatio;\n    const halfWidth=width!==0 ? Math.max(width / 2, 0.5):0;\n    return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n/**\n * Clears the entire canvas.\n */ function clearCanvas(canvas, ctx){\n    ctx=ctx||canvas.getContext('2d');\n    ctx.save();\n    // canvas.width and canvas.height do not consider the canvas transform,\n    // while clearRect does\n    ctx.resetTransform();\n    ctx.clearRect(0, 0, canvas.width, canvas.height);\n    ctx.restore();\n}\nfunction drawPoint(ctx, options, x, y){\n    // eslint-disable-next-line @typescript-eslint/no-use-before-define\n    drawPointLegend(ctx, options, x, y, null);\n}\n// eslint-disable-next-line complexity\nfunction drawPointLegend(ctx, options, x, y, w){\n    let type, xOffset, yOffset, size, cornerRadius, width, xOffsetW, yOffsetW;\n    const style=options.pointStyle;\n    const rotation=options.rotation;\n    const radius=options.radius;\n    let rad=(rotation||0) * RAD_PER_DEG;\n    if(style&&typeof style==='object'){\n        type=style.toString();\n        if(type==='[object HTMLImageElement]'||type==='[object HTMLCanvasElement]'){\n            ctx.save();\n            ctx.translate(x, y);\n            ctx.rotate(rad);\n            ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n            ctx.restore();\n            return;\n        }\n    }\n    if(isNaN(radius)||radius <=0){\n        return;\n    }\n    ctx.beginPath();\n    switch(style){\n        // Default includes circle\n        default:\n            if(w){\n                ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n            }else{\n                ctx.arc(x, y, radius, 0, TAU);\n            }\n            ctx.closePath();\n            break;\n        case 'triangle':\n            width=w ? w / 2:radius;\n            ctx.moveTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            rad +=TWO_THIRDS_PI;\n            ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            rad +=TWO_THIRDS_PI;\n            ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n            ctx.closePath();\n            break;\n        case 'rectRounded':\n            // NOTE: the rounded rect implementation changed to use `arc` instead of\n            // `quadraticCurveTo` since it generates better results when rect is\n            // almost a circle. 0.516 (instead of 0.5) produces results with visually\n            // closer proportion to the previous impl and it is inscribed in the\n            // circle with `radius`. For more details, see the following PRs:\n            // https://github.com/chartjs/Chart.js/issues/5597\n            // https://github.com/chartjs/Chart.js/issues/5858\n            cornerRadius=radius * 0.516;\n            size=radius - cornerRadius;\n            xOffset=Math.cos(rad + QUARTER_PI) * size;\n            xOffsetW=Math.cos(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius:size);\n            yOffset=Math.sin(rad + QUARTER_PI) * size;\n            yOffsetW=Math.sin(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius:size);\n            ctx.arc(x - xOffsetW, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n            ctx.arc(x + yOffsetW, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n            ctx.arc(x + xOffsetW, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n            ctx.arc(x - yOffsetW, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n            ctx.closePath();\n            break;\n        case 'rect':\n            if(!rotation){\n                size=Math.SQRT1_2 * radius;\n                width=w ? w / 2:size;\n                ctx.rect(x - width, y - size, 2 * width, 2 * size);\n                break;\n            }\n            rad +=QUARTER_PI;\n        /* falls through */ case 'rectRot':\n            xOffsetW=Math.cos(rad) * (w ? w / 2:radius);\n            xOffset=Math.cos(rad) * radius;\n            yOffset=Math.sin(rad) * radius;\n            yOffsetW=Math.sin(rad) * (w ? w / 2:radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            ctx.closePath();\n            break;\n        case 'crossRot':\n            rad +=QUARTER_PI;\n        /* falls through */ case 'cross':\n            xOffsetW=Math.cos(rad) * (w ? w / 2:radius);\n            xOffset=Math.cos(rad) * radius;\n            yOffset=Math.sin(rad) * radius;\n            yOffsetW=Math.sin(rad) * (w ? w / 2:radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            break;\n        case 'star':\n            xOffsetW=Math.cos(rad) * (w ? w / 2:radius);\n            xOffset=Math.cos(rad) * radius;\n            yOffset=Math.sin(rad) * radius;\n            yOffsetW=Math.sin(rad) * (w ? w / 2:radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            rad +=QUARTER_PI;\n            xOffsetW=Math.cos(rad) * (w ? w / 2:radius);\n            xOffset=Math.cos(rad) * radius;\n            yOffset=Math.sin(rad) * radius;\n            yOffsetW=Math.sin(rad) * (w ? w / 2:radius);\n            ctx.moveTo(x - xOffsetW, y - yOffset);\n            ctx.lineTo(x + xOffsetW, y + yOffset);\n            ctx.moveTo(x + yOffsetW, y - xOffset);\n            ctx.lineTo(x - yOffsetW, y + xOffset);\n            break;\n        case 'line':\n            xOffset=w ? w / 2:Math.cos(rad) * radius;\n            yOffset=Math.sin(rad) * radius;\n            ctx.moveTo(x - xOffset, y - yOffset);\n            ctx.lineTo(x + xOffset, y + yOffset);\n            break;\n        case 'dash':\n            ctx.moveTo(x, y);\n            ctx.lineTo(x + Math.cos(rad) * (w ? w / 2:radius), y + Math.sin(rad) * radius);\n            break;\n        case false:\n            ctx.closePath();\n            break;\n    }\n    ctx.fill();\n    if(options.borderWidth > 0){\n        ctx.stroke();\n    }\n}\n/**\n * Returns true if the point is inside the rectangle\n * @param point - The point to test\n * @param area - The rectangle\n * @param margin - allowed margin\n * @private\n */ function _isPointInArea(point, area, margin){\n    margin=margin||0.5; // margin - default is to match rounded decimals\n    return !area||point&&point.x > area.left - margin&&point.x < area.right + margin&&point.y > area.top - margin&&point.y < area.bottom + margin;\n}\nfunction clipArea(ctx, area){\n    ctx.save();\n    ctx.beginPath();\n    ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n    ctx.clip();\n}\nfunction unclipArea(ctx){\n    ctx.restore();\n}\n/**\n * @private\n */ function _steppedLineTo(ctx, previous, target, flip, mode){\n    if(!previous){\n        return ctx.lineTo(target.x, target.y);\n    }\n    if(mode==='middle'){\n        const midpoint=(previous.x + target.x) / 2.0;\n        ctx.lineTo(midpoint, previous.y);\n        ctx.lineTo(midpoint, target.y);\n    }else if(mode==='after'!==!!flip){\n        ctx.lineTo(previous.x, target.y);\n    }else{\n        ctx.lineTo(target.x, previous.y);\n    }\n    ctx.lineTo(target.x, target.y);\n}\n/**\n * @private\n */ function _bezierCurveTo(ctx, previous, target, flip){\n    if(!previous){\n        return ctx.lineTo(target.x, target.y);\n    }\n    ctx.bezierCurveTo(flip ? previous.cp1x:previous.cp2x, flip ? previous.cp1y:previous.cp2y, flip ? target.cp2x:target.cp1x, flip ? target.cp2y:target.cp1y, target.x, target.y);\n}\nfunction setRenderOpts(ctx, opts){\n    if(opts.translation){\n        ctx.translate(opts.translation[0], opts.translation[1]);\n    }\n    if(!isNullOrUndef(opts.rotation)){\n        ctx.rotate(opts.rotation);\n    }\n    if(opts.color){\n        ctx.fillStyle=opts.color;\n    }\n    if(opts.textAlign){\n        ctx.textAlign=opts.textAlign;\n    }\n    if(opts.textBaseline){\n        ctx.textBaseline=opts.textBaseline;\n    }\n}\nfunction decorateText(ctx, x, y, line, opts){\n    if(opts.strikethrough||opts.underline){\n        /**\n     * Now that IE11 support has been dropped, we can use more\n     * of the TextMetrics object. The actual bounding boxes\n     * are unflagged in Chrome, Firefox, Edge, and Safari so they\n     * can be safely used.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Browser_compatibility\n     */ const metrics=ctx.measureText(line);\n        const left=x - metrics.actualBoundingBoxLeft;\n        const right=x + metrics.actualBoundingBoxRight;\n        const top=y - metrics.actualBoundingBoxAscent;\n        const bottom=y + metrics.actualBoundingBoxDescent;\n        const yDecoration=opts.strikethrough ? (top + bottom) / 2:bottom;\n        ctx.strokeStyle=ctx.fillStyle;\n        ctx.beginPath();\n        ctx.lineWidth=opts.decorationWidth||2;\n        ctx.moveTo(left, yDecoration);\n        ctx.lineTo(right, yDecoration);\n        ctx.stroke();\n    }\n}\nfunction drawBackdrop(ctx, opts){\n    const oldColor=ctx.fillStyle;\n    ctx.fillStyle=opts.color;\n    ctx.fillRect(opts.left, opts.top, opts.width, opts.height);\n    ctx.fillStyle=oldColor;\n}\n/**\n * Render text onto the canvas\n */ function renderText(ctx, text, x, y, font, opts={}){\n    const lines=isArray(text) ? text:[\n        text\n    ];\n    const stroke=opts.strokeWidth > 0&&opts.strokeColor!=='';\n    let i, line;\n    ctx.save();\n    ctx.font=font.string;\n    setRenderOpts(ctx, opts);\n    for(i=0; i < lines.length; ++i){\n        line=lines[i];\n        if(opts.backdrop){\n            drawBackdrop(ctx, opts.backdrop);\n        }\n        if(stroke){\n            if(opts.strokeColor){\n                ctx.strokeStyle=opts.strokeColor;\n            }\n            if(!isNullOrUndef(opts.strokeWidth)){\n                ctx.lineWidth=opts.strokeWidth;\n            }\n            ctx.strokeText(line, x, y, opts.maxWidth);\n        }\n        ctx.fillText(line, x, y, opts.maxWidth);\n        decorateText(ctx, x, y, line, opts);\n        y +=Number(font.lineHeight);\n    }\n    ctx.restore();\n}\n/**\n * Add a path of a rectangle with rounded corners to the current sub-path\n * @param ctx - Context\n * @param rect - Bounding rect\n */ function addRoundedRectPath(ctx, rect){\n    const { x , y , w , h , radius  }=rect;\n    // top left arc\n    ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n    // line from top left to bottom left\n    ctx.lineTo(x, y + h - radius.bottomLeft);\n    // bottom left arc\n    ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n    // line from bottom left to bottom right\n    ctx.lineTo(x + w - radius.bottomRight, y + h);\n    // bottom right arc\n    ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n    // line from bottom right to top right\n    ctx.lineTo(x + w, y + radius.topRight);\n    // top right arc\n    ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n    // line from top right to top left\n    ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/;\nconst FONT_STYLE=/^(normal|italic|initial|inherit|unset|(oblique(-?[0-9]?[0-9]deg)?))$/;\n/**\n * @alias Chart.helpers.options\n * @namespace\n */ /**\n * Converts the given line height `value` in pixels for a specific font `size`.\n * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n * @param size - The font size (in pixels) used to resolve relative `value`.\n * @returns The effective line height in pixels (size * 1.2 if value is invalid).\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n * @since 2.7.0\n */ function toLineHeight(value, size){\n    const matches=('' + value).match(LINE_HEIGHT);\n    if(!matches||matches[1]==='normal'){\n        return size * 1.2;\n    }\n    value=+matches[2];\n    switch(matches[3]){\n        case 'px':\n            return value;\n        case '%':\n            value /=100;\n            break;\n    }\n    return size * value;\n}\nconst numberOrZero=(v)=>+v||0;\nfunction _readValueToProps(value, props){\n    const ret={};\n    const objProps=isObject(props);\n    const keys=objProps ? Object.keys(props):props;\n    const read=isObject(value) ? objProps ? (prop)=>valueOrDefault(value[prop], value[props[prop]]):(prop)=>value[prop]:()=>value;\n    for (const prop of keys){\n        ret[prop]=numberOrZero(read(prop));\n    }\n    return ret;\n}\n/**\n * Converts the given value into a TRBL object.\n * @param value - If a number, set the value to all TRBL component,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n *  x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left)\n * @since 3.0.0\n */ function toTRBL(value){\n    return _readValueToProps(value, {\n        top: 'y',\n        right: 'x',\n        bottom: 'y',\n        left: 'x'\n    });\n}\n/**\n * Converts the given value into a TRBL corners object (similar with css border-radius).\n * @param value - If a number, set the value to all TRBL corner components,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)\n * @since 3.0.0\n */ function toTRBLCorners(value){\n    return _readValueToProps(value, [\n        'topLeft',\n        'topRight',\n        'bottomLeft',\n        'bottomRight'\n    ]);\n}\n/**\n * Converts the given value into a padding object with pre-computed width/height.\n * @param value - If a number, set the value to all TRBL component,\n *  else, if an object, use defined properties and sets undefined ones to 0.\n *  x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left, width, height)\n * @since 2.7.0\n */ function toPadding(value){\n    const obj=toTRBL(value);\n    obj.width=obj.left + obj.right;\n    obj.height=obj.top + obj.bottom;\n    return obj;\n}\n/**\n * Parses font options and returns the font object.\n * @param options - A object that contains font options to be parsed.\n * @param fallback - A object that contains fallback font options.\n * @return The font object.\n * @private\n */ function toFont(options, fallback){\n    options=options||{};\n    fallback=fallback||defaults.font;\n    let size=valueOrDefault(options.size, fallback.size);\n    if(typeof size==='string'){\n        size=parseInt(size, 10);\n    }\n    let style=valueOrDefault(options.style, fallback.style);\n    if(style&&!('' + style).match(FONT_STYLE)){\n        console.warn('Invalid font style specified: \"' + style + '\"');\n        style=undefined;\n    }\n    const font={\n        family: valueOrDefault(options.family, fallback.family),\n        lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n        size,\n        style,\n        weight: valueOrDefault(options.weight, fallback.weight),\n        string: ''\n    };\n    font.string=toFontString(font);\n    return font;\n}\n/**\n * Evaluates the given `inputs` sequentially and returns the first defined value.\n * @param inputs - An array of values, falling back to the last value.\n * @param context - If defined and the current value is a function, the value\n * is called with `context` as first argument and the result becomes the new input.\n * @param index - If defined and the current value is an array, the value\n * at `index` become the new input.\n * @param info - object to return information about resolution in\n * @param info.cacheable - Will be set to `false` if option is not cacheable.\n * @since 2.7.0\n */ function resolve(inputs, context, index, info){\n    let cacheable=true;\n    let i, ilen, value;\n    for(i=0, ilen=inputs.length; i < ilen; ++i){\n        value=inputs[i];\n        if(value===undefined){\n            continue;\n        }\n        if(context!==undefined&&typeof value==='function'){\n            value=value(context);\n            cacheable=false;\n        }\n        if(index!==undefined&&isArray(value)){\n            value=value[index % value.length];\n            cacheable=false;\n        }\n        if(value!==undefined){\n            if(info&&!cacheable){\n                info.cacheable=false;\n            }\n            return value;\n        }\n    }\n}\n/**\n * @param minmax\n * @param grace\n * @param beginAtZero\n * @private\n */ function _addGrace(minmax, grace, beginAtZero){\n    const { min , max  }=minmax;\n    const change=toDimension(grace, (max - min) / 2);\n    const keepZero=(value, add)=>beginAtZero&&value===0 ? 0:value + add;\n    return {\n        min: keepZero(min, -Math.abs(change)),\n        max: keepZero(max, change)\n    };\n}\nfunction createContext(parentContext, context){\n    return Object.assign(Object.create(parentContext), context);\n}\n\n/**\n * Creates a Proxy for resolving raw values for options.\n * @param scopes - The option scopes to look for values, in resolution order\n * @param prefixes - The prefixes for values, in resolution order.\n * @param rootScopes - The root option scopes\n * @param fallback - Parent scopes fallback\n * @param getTarget - callback for getting the target for changed values\n * @returns Proxy\n * @private\n */ function _createResolver(scopes, prefixes=[\n    ''\n], rootScopes, fallback, getTarget=()=>scopes[0]){\n    const finalRootScopes=rootScopes||scopes;\n    if(typeof fallback==='undefined'){\n        fallback=_resolve('_fallback', scopes);\n    }\n    const cache={\n        [Symbol.toStringTag]: 'Object',\n        _cacheable: true,\n        _scopes: scopes,\n        _rootScopes: finalRootScopes,\n        _fallback: fallback,\n        _getTarget: getTarget,\n        override: (scope)=>_createResolver([\n                scope,\n                ...scopes\n            ], prefixes, finalRootScopes, fallback)\n    };\n    return new Proxy(cache, {\n        /**\n     * A trap for the delete operator.\n     */ deleteProperty (target, prop){\n            delete target[prop]; // remove from cache\n            delete target._keys; // remove cached keys\n            delete scopes[0][prop]; // remove from top level scope\n            return true;\n        },\n        /**\n     * A trap for getting property values.\n     */ get (target, prop){\n            return _cached(target, prop, ()=>_resolveWithPrefixes(prop, prefixes, scopes, target));\n        },\n        /**\n     * A trap for Object.getOwnPropertyDescriptor.\n     * Also used by Object.hasOwnProperty.\n     */ getOwnPropertyDescriptor (target, prop){\n            return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n        },\n        /**\n     * A trap for Object.getPrototypeOf.\n     */ getPrototypeOf (){\n            return Reflect.getPrototypeOf(scopes[0]);\n        },\n        /**\n     * A trap for the in operator.\n     */ has (target, prop){\n            return getKeysFromAllScopes(target).includes(prop);\n        },\n        /**\n     * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n     */ ownKeys (target){\n            return getKeysFromAllScopes(target);\n        },\n        /**\n     * A trap for setting property values.\n     */ set (target, prop, value){\n            const storage=target._storage||(target._storage=getTarget());\n            target[prop]=storage[prop]=value; // set to top level scope + cache\n            delete target._keys; // remove cached keys\n            return true;\n        }\n    });\n}\n/**\n * Returns an Proxy for resolving option values with context.\n * @param proxy - The Proxy returned by `_createResolver`\n * @param context - Context object for scriptable/indexable options\n * @param subProxy - The proxy provided for scriptable options\n * @param descriptorDefaults - Defaults for descriptors\n * @private\n */ function _attachContext(proxy, context, subProxy, descriptorDefaults){\n    const cache={\n        _cacheable: false,\n        _proxy: proxy,\n        _context: context,\n        _subProxy: subProxy,\n        _stack: new Set(),\n        _descriptors: _descriptors(proxy, descriptorDefaults),\n        setContext: (ctx)=>_attachContext(proxy, ctx, subProxy, descriptorDefaults),\n        override: (scope)=>_attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n    };\n    return new Proxy(cache, {\n        /**\n     * A trap for the delete operator.\n     */ deleteProperty (target, prop){\n            delete target[prop]; // remove from cache\n            delete proxy[prop]; // remove from proxy\n            return true;\n        },\n        /**\n     * A trap for getting property values.\n     */ get (target, prop, receiver){\n            return _cached(target, prop, ()=>_resolveWithContext(target, prop, receiver));\n        },\n        /**\n     * A trap for Object.getOwnPropertyDescriptor.\n     * Also used by Object.hasOwnProperty.\n     */ getOwnPropertyDescriptor (target, prop){\n            return target._descriptors.allKeys ? Reflect.has(proxy, prop) ? {\n                enumerable: true,\n                configurable: true\n            }:undefined:Reflect.getOwnPropertyDescriptor(proxy, prop);\n        },\n        /**\n     * A trap for Object.getPrototypeOf.\n     */ getPrototypeOf (){\n            return Reflect.getPrototypeOf(proxy);\n        },\n        /**\n     * A trap for the in operator.\n     */ has (target, prop){\n            return Reflect.has(proxy, prop);\n        },\n        /**\n     * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n     */ ownKeys (){\n            return Reflect.ownKeys(proxy);\n        },\n        /**\n     * A trap for setting property values.\n     */ set (target, prop, value){\n            proxy[prop]=value; // set to proxy\n            delete target[prop]; // remove from cache\n            return true;\n        }\n    });\n}\n/**\n * @private\n */ function _descriptors(proxy, defaults={\n    scriptable: true,\n    indexable: true\n}){\n    const { _scriptable=defaults.scriptable , _indexable=defaults.indexable , _allKeys=defaults.allKeys  }=proxy;\n    return {\n        allKeys: _allKeys,\n        scriptable: _scriptable,\n        indexable: _indexable,\n        isScriptable: isFunction(_scriptable) ? _scriptable:()=>_scriptable,\n        isIndexable: isFunction(_indexable) ? _indexable:()=>_indexable\n    };\n}\nconst readKey=(prefix, name)=>prefix ? prefix + _capitalize(name):name;\nconst needsSubResolver=(prop, value)=>isObject(value)&&prop!=='adapters'&&(Object.getPrototypeOf(value)===null||value.constructor===Object);\nfunction _cached(target, prop, resolve){\n    if(Object.prototype.hasOwnProperty.call(target, prop)){\n        return target[prop];\n    }\n    const value=resolve();\n    // cache the resolved value\n    target[prop]=value;\n    return value;\n}\nfunction _resolveWithContext(target, prop, receiver){\n    const { _proxy , _context , _subProxy , _descriptors: descriptors  }=target;\n    let value=_proxy[prop]; // resolve from proxy\n    // resolve with context\n    if(isFunction(value)&&descriptors.isScriptable(prop)){\n        value=_resolveScriptable(prop, value, target, receiver);\n    }\n    if(isArray(value)&&value.length){\n        value=_resolveArray(prop, value, target, descriptors.isIndexable);\n    }\n    if(needsSubResolver(prop, value)){\n        // if the resolved value is an object, create a sub resolver for it\n        value=_attachContext(value, _context, _subProxy&&_subProxy[prop], descriptors);\n    }\n    return value;\n}\nfunction _resolveScriptable(prop, getValue, target, receiver){\n    const { _proxy , _context , _subProxy , _stack  }=target;\n    if(_stack.has(prop)){\n        throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n    }\n    _stack.add(prop);\n    let value=getValue(_context, _subProxy||receiver);\n    _stack.delete(prop);\n    if(needsSubResolver(prop, value)){\n        // When scriptable option returns an object, create a resolver on that.\n        value=createSubResolver(_proxy._scopes, _proxy, prop, value);\n    }\n    return value;\n}\nfunction _resolveArray(prop, value, target, isIndexable){\n    const { _proxy , _context , _subProxy , _descriptors: descriptors  }=target;\n    if(typeof _context.index!=='undefined'&&isIndexable(prop)){\n        return value[_context.index % value.length];\n    }else if(isObject(value[0])){\n        // Array of objects, return array or resolvers\n        const arr=value;\n        const scopes=_proxy._scopes.filter((s)=>s!==arr);\n        value=[];\n        for (const item of arr){\n            const resolver=createSubResolver(scopes, _proxy, prop, item);\n            value.push(_attachContext(resolver, _context, _subProxy&&_subProxy[prop], descriptors));\n        }\n    }\n    return value;\n}\nfunction resolveFallback(fallback, prop, value){\n    return isFunction(fallback) ? fallback(prop, value):fallback;\n}\nconst getScope=(key, parent)=>key===true ? parent:typeof key==='string' ? resolveObjectKey(parent, key):undefined;\nfunction addScopes(set, parentScopes, key, parentFallback, value){\n    for (const parent of parentScopes){\n        const scope=getScope(key, parent);\n        if(scope){\n            set.add(scope);\n            const fallback=resolveFallback(scope._fallback, key, value);\n            if(typeof fallback!=='undefined'&&fallback!==key&&fallback!==parentFallback){\n                // When we reach the descriptor that defines a new _fallback, return that.\n                // The fallback will resume to that new scope.\n                return fallback;\n            }\n        }else if(scope===false&&typeof parentFallback!=='undefined'&&key!==parentFallback){\n            // Fallback to `false` results to `false`, when falling back to different key.\n            // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations`\n            return null;\n        }\n    }\n    return false;\n}\nfunction createSubResolver(parentScopes, resolver, prop, value){\n    const rootScopes=resolver._rootScopes;\n    const fallback=resolveFallback(resolver._fallback, prop, value);\n    const allScopes=[\n        ...parentScopes,\n        ...rootScopes\n    ];\n    const set=new Set();\n    set.add(value);\n    let key=addScopesFromKey(set, allScopes, prop, fallback||prop, value);\n    if(key===null){\n        return false;\n    }\n    if(typeof fallback!=='undefined'&&fallback!==prop){\n        key=addScopesFromKey(set, allScopes, fallback, key, value);\n        if(key===null){\n            return false;\n        }\n    }\n    return _createResolver(Array.from(set), [\n        ''\n    ], rootScopes, fallback, ()=>subGetTarget(resolver, prop, value));\n}\nfunction addScopesFromKey(set, allScopes, key, fallback, item){\n    while(key){\n        key=addScopes(set, allScopes, key, fallback, item);\n    }\n    return key;\n}\nfunction subGetTarget(resolver, prop, value){\n    const parent=resolver._getTarget();\n    if(!(prop in parent)){\n        parent[prop]={};\n    }\n    const target=parent[prop];\n    if(isArray(target)&&isObject(value)){\n        // For array of objects, the object is used to store updated values\n        return value;\n    }\n    return target||{};\n}\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy){\n    let value;\n    for (const prefix of prefixes){\n        value=_resolve(readKey(prefix, prop), scopes);\n        if(typeof value!=='undefined'){\n            return needsSubResolver(prop, value) ? createSubResolver(scopes, proxy, prop, value):value;\n        }\n    }\n}\nfunction _resolve(key, scopes){\n    for (const scope of scopes){\n        if(!scope){\n            continue;\n        }\n        const value=scope[key];\n        if(typeof value!=='undefined'){\n            return value;\n        }\n    }\n}\nfunction getKeysFromAllScopes(target){\n    let keys=target._keys;\n    if(!keys){\n        keys=target._keys=resolveKeysFromAllScopes(target._scopes);\n    }\n    return keys;\n}\nfunction resolveKeysFromAllScopes(scopes){\n    const set=new Set();\n    for (const scope of scopes){\n        for (const key of Object.keys(scope).filter((k)=>!k.startsWith('_'))){\n            set.add(key);\n        }\n    }\n    return Array.from(set);\n}\nfunction _parseObjectDataRadialScale(meta, data, start, count){\n    const { iScale  }=meta;\n    const { key='r'  }=this._parsing;\n    const parsed=new Array(count);\n    let i, ilen, index, item;\n    for(i=0, ilen=count; i < ilen; ++i){\n        index=i + start;\n        item=data[index];\n        parsed[i]={\n            r: iScale.parse(resolveObjectKey(item, key), index)\n        };\n    }\n    return parsed;\n}\n\nconst EPSILON=Number.EPSILON||1e-14;\nconst getPoint=(points, i)=>i < points.length&&!points[i].skip&&points[i];\nconst getValueAxis=(indexAxis)=>indexAxis==='x' ? 'y':'x';\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t){\n    // Props to Rob Spencer at scaled innovation for his post on splining between points\n    // http://scaledinnovation.com/analytics/splines/aboutSplines.html\n    // This function must also respect \"skipped\" points\n    const previous=firstPoint.skip ? middlePoint:firstPoint;\n    const current=middlePoint;\n    const next=afterPoint.skip ? middlePoint:afterPoint;\n    const d01=distanceBetweenPoints(current, previous);\n    const d12=distanceBetweenPoints(next, current);\n    let s01=d01 / (d01 + d12);\n    let s12=d12 / (d01 + d12);\n    // If all points are the same, s01 & s02 will be inf\n    s01=isNaN(s01) ? 0:s01;\n    s12=isNaN(s12) ? 0:s12;\n    const fa=t * s01; // scaling factor for triangle Ta\n    const fb=t * s12;\n    return {\n        previous: {\n            x: current.x - fa * (next.x - previous.x),\n            y: current.y - fa * (next.y - previous.y)\n        },\n        next: {\n            x: current.x + fb * (next.x - previous.x),\n            y: current.y + fb * (next.y - previous.y)\n        }\n    };\n}\n/**\n * Adjust tangents to ensure monotonic properties\n */ function monotoneAdjust(points, deltaK, mK){\n    const pointsLen=points.length;\n    let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n    let pointAfter=getPoint(points, 0);\n    for(let i=0; i < pointsLen - 1; ++i){\n        pointCurrent=pointAfter;\n        pointAfter=getPoint(points, i + 1);\n        if(!pointCurrent||!pointAfter){\n            continue;\n        }\n        if(almostEquals(deltaK[i], 0, EPSILON)){\n            mK[i]=mK[i + 1]=0;\n            continue;\n        }\n        alphaK=mK[i] / deltaK[i];\n        betaK=mK[i + 1] / deltaK[i];\n        squaredMagnitude=Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n        if(squaredMagnitude <=9){\n            continue;\n        }\n        tauK=3 / Math.sqrt(squaredMagnitude);\n        mK[i]=alphaK * tauK * deltaK[i];\n        mK[i + 1]=betaK * tauK * deltaK[i];\n    }\n}\nfunction monotoneCompute(points, mK, indexAxis='x'){\n    const valueAxis=getValueAxis(indexAxis);\n    const pointsLen=points.length;\n    let delta, pointBefore, pointCurrent;\n    let pointAfter=getPoint(points, 0);\n    for(let i=0; i < pointsLen; ++i){\n        pointBefore=pointCurrent;\n        pointCurrent=pointAfter;\n        pointAfter=getPoint(points, i + 1);\n        if(!pointCurrent){\n            continue;\n        }\n        const iPixel=pointCurrent[indexAxis];\n        const vPixel=pointCurrent[valueAxis];\n        if(pointBefore){\n            delta=(iPixel - pointBefore[indexAxis]) / 3;\n            pointCurrent[`cp1${indexAxis}`]=iPixel - delta;\n            pointCurrent[`cp1${valueAxis}`]=vPixel - delta * mK[i];\n        }\n        if(pointAfter){\n            delta=(pointAfter[indexAxis] - iPixel) / 3;\n            pointCurrent[`cp2${indexAxis}`]=iPixel + delta;\n            pointCurrent[`cp2${valueAxis}`]=vPixel + delta * mK[i];\n        }\n    }\n}\n/**\n * This function calculates Bézier control points in a similar way than |splineCurve|,\n * but preserves monotonicity of the provided data and ensures no local extremums are added\n * between the dataset discrete points due to the interpolation.\n * See:https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n */ function splineCurveMonotone(points, indexAxis='x'){\n    const valueAxis=getValueAxis(indexAxis);\n    const pointsLen=points.length;\n    const deltaK=Array(pointsLen).fill(0);\n    const mK=Array(pointsLen);\n    // Calculate slopes (deltaK) and initialize tangents (mK)\n    let i, pointBefore, pointCurrent;\n    let pointAfter=getPoint(points, 0);\n    for(i=0; i < pointsLen; ++i){\n        pointBefore=pointCurrent;\n        pointCurrent=pointAfter;\n        pointAfter=getPoint(points, i + 1);\n        if(!pointCurrent){\n            continue;\n        }\n        if(pointAfter){\n            const slopeDelta=pointAfter[indexAxis] - pointCurrent[indexAxis];\n            // In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n            deltaK[i]=slopeDelta!==0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta:0;\n        }\n        mK[i] = !pointBefore ? deltaK[i]:!pointAfter ? deltaK[i - 1]:sign(deltaK[i - 1])!==sign(deltaK[i]) ? 0:(deltaK[i - 1] + deltaK[i]) / 2;\n    }\n    monotoneAdjust(points, deltaK, mK);\n    monotoneCompute(points, mK, indexAxis);\n}\nfunction capControlPoint(pt, min, max){\n    return Math.max(Math.min(pt, max), min);\n}\nfunction capBezierPoints(points, area){\n    let i, ilen, point, inArea, inAreaPrev;\n    let inAreaNext=_isPointInArea(points[0], area);\n    for(i=0, ilen=points.length; i < ilen; ++i){\n        inAreaPrev=inArea;\n        inArea=inAreaNext;\n        inAreaNext=i < ilen - 1&&_isPointInArea(points[i + 1], area);\n        if(!inArea){\n            continue;\n        }\n        point=points[i];\n        if(inAreaPrev){\n            point.cp1x=capControlPoint(point.cp1x, area.left, area.right);\n            point.cp1y=capControlPoint(point.cp1y, area.top, area.bottom);\n        }\n        if(inAreaNext){\n            point.cp2x=capControlPoint(point.cp2x, area.left, area.right);\n            point.cp2y=capControlPoint(point.cp2y, area.top, area.bottom);\n        }\n    }\n}\n/**\n * @private\n */ function _updateBezierControlPoints(points, options, area, loop, indexAxis){\n    let i, ilen, point, controlPoints;\n    // Only consider points that are drawn in case the spanGaps option is used\n    if(options.spanGaps){\n        points=points.filter((pt)=>!pt.skip);\n    }\n    if(options.cubicInterpolationMode==='monotone'){\n        splineCurveMonotone(points, indexAxis);\n    }else{\n        let prev=loop ? points[points.length - 1]:points[0];\n        for(i=0, ilen=points.length; i < ilen; ++i){\n            point=points[i];\n            controlPoints=splineCurve(prev, point, points[Math.min(i + 1, ilen - (loop ? 0:1)) % ilen], options.tension);\n            point.cp1x=controlPoints.previous.x;\n            point.cp1y=controlPoints.previous.y;\n            point.cp2x=controlPoints.next.x;\n            point.cp2y=controlPoints.next.y;\n            prev=point;\n        }\n    }\n    if(options.capBezierPoints){\n        capBezierPoints(points, area);\n    }\n}\n\n/**\n * Note: typedefs are auto-exported, so use a made-up `dom` namespace where\n * necessary to avoid duplicates with `export * from './helpers`; see\n * https://github.com/microsoft/TypeScript/issues/46011\n * @typedef { import('../core/core.controller.js').default } dom.Chart\n * @typedef { import('../../types').ChartEvent } ChartEvent\n */ /**\n * @private\n */ function _isDomSupported(){\n    return typeof window!=='undefined'&&typeof document!=='undefined';\n}\n/**\n * @private\n */ function _getParentNode(domNode){\n    let parent=domNode.parentNode;\n    if(parent&&parent.toString()==='[object ShadowRoot]'){\n        parent=parent.host;\n    }\n    return parent;\n}\n/**\n * convert max-width/max-height values that may be percentages into a number\n * @private\n */ function parseMaxStyle(styleValue, node, parentProperty){\n    let valueInPixels;\n    if(typeof styleValue==='string'){\n        valueInPixels=parseInt(styleValue, 10);\n        if(styleValue.indexOf('%')!==-1){\n            // percentage * size in dimension\n            valueInPixels=valueInPixels / 100 * node.parentNode[parentProperty];\n        }\n    }else{\n        valueInPixels=styleValue;\n    }\n    return valueInPixels;\n}\nconst getComputedStyle=(element)=>element.ownerDocument.defaultView.getComputedStyle(element, null);\nfunction getStyle(el, property){\n    return getComputedStyle(el).getPropertyValue(property);\n}\nconst positions=[\n    'top',\n    'right',\n    'bottom',\n    'left'\n];\nfunction getPositionedStyle(styles, style, suffix){\n    const result={};\n    suffix=suffix ? '-' + suffix:'';\n    for(let i=0; i < 4; i++){\n        const pos=positions[i];\n        result[pos]=parseFloat(styles[style + '-' + pos + suffix])||0;\n    }\n    result.width=result.left + result.right;\n    result.height=result.top + result.bottom;\n    return result;\n}\nconst useOffsetPos=(x, y, target)=>(x > 0||y > 0)&&(!target||!target.shadowRoot);\n/**\n * @param e\n * @param canvas\n * @returns Canvas position\n */ function getCanvasPosition(e, canvas){\n    const touches=e.touches;\n    const source=touches&&touches.length ? touches[0]:e;\n    const { offsetX , offsetY  }=source;\n    let box=false;\n    let x, y;\n    if(useOffsetPos(offsetX, offsetY, e.target)){\n        x=offsetX;\n        y=offsetY;\n    }else{\n        const rect=canvas.getBoundingClientRect();\n        x=source.clientX - rect.left;\n        y=source.clientY - rect.top;\n        box=true;\n    }\n    return {\n        x,\n        y,\n        box\n    };\n}\n/**\n * Gets an event's x, y coordinates, relative to the chart area\n * @param event\n * @param chart\n * @returns x and y coordinates of the event\n */ function getRelativePosition(event, chart){\n    if('native' in event){\n        return event;\n    }\n    const { canvas , currentDevicePixelRatio  }=chart;\n    const style=getComputedStyle(canvas);\n    const borderBox=style.boxSizing==='border-box';\n    const paddings=getPositionedStyle(style, 'padding');\n    const borders=getPositionedStyle(style, 'border', 'width');\n    const { x , y , box  }=getCanvasPosition(event, canvas);\n    const xOffset=paddings.left + (box&&borders.left);\n    const yOffset=paddings.top + (box&&borders.top);\n    let { width , height  }=chart;\n    if(borderBox){\n        width -=paddings.width + borders.width;\n        height -=paddings.height + borders.height;\n    }\n    return {\n        x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n        y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n    };\n}\nfunction getContainerSize(canvas, width, height){\n    let maxWidth, maxHeight;\n    if(width===undefined||height===undefined){\n        const container=_getParentNode(canvas);\n        if(!container){\n            width=canvas.clientWidth;\n            height=canvas.clientHeight;\n        }else{\n            const rect=container.getBoundingClientRect(); // this is the border box of the container\n            const containerStyle=getComputedStyle(container);\n            const containerBorder=getPositionedStyle(containerStyle, 'border', 'width');\n            const containerPadding=getPositionedStyle(containerStyle, 'padding');\n            width=rect.width - containerPadding.width - containerBorder.width;\n            height=rect.height - containerPadding.height - containerBorder.height;\n            maxWidth=parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n            maxHeight=parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n        }\n    }\n    return {\n        width,\n        height,\n        maxWidth: maxWidth||INFINITY,\n        maxHeight: maxHeight||INFINITY\n    };\n}\nconst round1=(v)=>Math.round(v * 10) / 10;\n// eslint-disable-next-line complexity\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio){\n    const style=getComputedStyle(canvas);\n    const margins=getPositionedStyle(style, 'margin');\n    const maxWidth=parseMaxStyle(style.maxWidth, canvas, 'clientWidth')||INFINITY;\n    const maxHeight=parseMaxStyle(style.maxHeight, canvas, 'clientHeight')||INFINITY;\n    const containerSize=getContainerSize(canvas, bbWidth, bbHeight);\n    let { width , height  }=containerSize;\n    if(style.boxSizing==='content-box'){\n        const borders=getPositionedStyle(style, 'border', 'width');\n        const paddings=getPositionedStyle(style, 'padding');\n        width -=paddings.width + borders.width;\n        height -=paddings.height + borders.height;\n    }\n    width=Math.max(0, width - margins.width);\n    height=Math.max(0, aspectRatio ? width / aspectRatio:height - margins.height);\n    width=round1(Math.min(width, maxWidth, containerSize.maxWidth));\n    height=round1(Math.min(height, maxHeight, containerSize.maxHeight));\n    if(width&&!height){\n        // https://github.com/chartjs/Chart.js/issues/4659\n        // If the canvas has width, but no height, default to aspectRatio of 2 (canvas default)\n        height=round1(width / 2);\n    }\n    const maintainHeight=bbWidth!==undefined||bbHeight!==undefined;\n    if(maintainHeight&&aspectRatio&&containerSize.height&&height > containerSize.height){\n        height=containerSize.height;\n        width=round1(Math.floor(height * aspectRatio));\n    }\n    return {\n        width,\n        height\n    };\n}\n/**\n * @param chart\n * @param forceRatio\n * @param forceStyle\n * @returns True if the canvas context size or transformation has changed.\n */ function retinaScale(chart, forceRatio, forceStyle){\n    const pixelRatio=forceRatio||1;\n    const deviceHeight=Math.floor(chart.height * pixelRatio);\n    const deviceWidth=Math.floor(chart.width * pixelRatio);\n    chart.height=Math.floor(chart.height);\n    chart.width=Math.floor(chart.width);\n    const canvas=chart.canvas;\n    // If no style has been set on the canvas, the render size is used as display size,\n    // making the chart visually bigger, so let's enforce it to the \"correct\" values.\n    // See https://github.com/chartjs/Chart.js/issues/3575\n    if(canvas.style&&(forceStyle||!canvas.style.height&&!canvas.style.width)){\n        canvas.style.height=`${chart.height}px`;\n        canvas.style.width=`${chart.width}px`;\n    }\n    if(chart.currentDevicePixelRatio!==pixelRatio||canvas.height!==deviceHeight||canvas.width!==deviceWidth){\n        chart.currentDevicePixelRatio=pixelRatio;\n        canvas.height=deviceHeight;\n        canvas.width=deviceWidth;\n        chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n        return true;\n    }\n    return false;\n}\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */ const supportsEventListenerOptions=function(){\n    let passiveSupported=false;\n    try {\n        const options={\n            get passive (){\n                passiveSupported=true;\n                return false;\n            }\n        };\n        window.addEventListener('test', null, options);\n        window.removeEventListener('test', null, options);\n    } catch (e){\n    // continue regardless of error\n    }\n    return passiveSupported;\n}();\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns Size in pixels or undefined if unknown.\n */ function readUsedSize(element, property){\n    const value=getStyle(element, property);\n    const matches=value&&value.match(/^(\\d+)(\\.\\d+)?px$/);\n    return matches ? +matches[1]:undefined;\n}\n\n/**\n * @private\n */ function _pointInLine(p1, p2, t, mode){\n    return {\n        x: p1.x + t * (p2.x - p1.x),\n        y: p1.y + t * (p2.y - p1.y)\n    };\n}\n/**\n * @private\n */ function _steppedInterpolation(p1, p2, t, mode){\n    return {\n        x: p1.x + t * (p2.x - p1.x),\n        y: mode==='middle' ? t < 0.5 ? p1.y:p2.y:mode==='after' ? t < 1 ? p1.y:p2.y:t > 0 ? p2.y:p1.y\n    };\n}\n/**\n * @private\n */ function _bezierInterpolation(p1, p2, t, mode){\n    const cp1={\n        x: p1.cp2x,\n        y: p1.cp2y\n    };\n    const cp2={\n        x: p2.cp1x,\n        y: p2.cp1y\n    };\n    const a=_pointInLine(p1, cp1, t);\n    const b=_pointInLine(cp1, cp2, t);\n    const c=_pointInLine(cp2, p2, t);\n    const d=_pointInLine(a, b, t);\n    const e=_pointInLine(b, c, t);\n    return _pointInLine(d, e, t);\n}\n\nconst getRightToLeftAdapter=function(rectX, width){\n    return {\n        x (x){\n            return rectX + rectX + width - x;\n        },\n        setWidth (w){\n            width=w;\n        },\n        textAlign (align){\n            if(align==='center'){\n                return align;\n            }\n            return align==='right' ? 'left':'right';\n        },\n        xPlus (x, value){\n            return x - value;\n        },\n        leftForLtr (x, itemWidth){\n            return x - itemWidth;\n        }\n    };\n};\nconst getLeftToRightAdapter=function(){\n    return {\n        x (x){\n            return x;\n        },\n        setWidth (w){},\n        textAlign (align){\n            return align;\n        },\n        xPlus (x, value){\n            return x + value;\n        },\n        leftForLtr (x, _itemWidth){\n            return x;\n        }\n    };\n};\nfunction getRtlAdapter(rtl, rectX, width){\n    return rtl ? getRightToLeftAdapter(rectX, width):getLeftToRightAdapter();\n}\nfunction overrideTextDirection(ctx, direction){\n    let style, original;\n    if(direction==='ltr'||direction==='rtl'){\n        style=ctx.canvas.style;\n        original=[\n            style.getPropertyValue('direction'),\n            style.getPropertyPriority('direction')\n        ];\n        style.setProperty('direction', direction, 'important');\n        ctx.prevTextDirection=original;\n    }\n}\nfunction restoreTextDirection(ctx, original){\n    if(original!==undefined){\n        delete ctx.prevTextDirection;\n        ctx.canvas.style.setProperty('direction', original[0], original[1]);\n    }\n}\n\nfunction propertyFn(property){\n    if(property==='angle'){\n        return {\n            between: _angleBetween,\n            compare: _angleDiff,\n            normalize: _normalizeAngle\n        };\n    }\n    return {\n        between: _isBetween,\n        compare: (a, b)=>a - b,\n        normalize: (x)=>x\n    };\n}\nfunction normalizeSegment({ start , end , count , loop , style  }){\n    return {\n        start: start % count,\n        end: end % count,\n        loop: loop&&(end - start + 1) % count===0,\n        style\n    };\n}\nfunction getSegment(segment, points, bounds){\n    const { property , start: startBound , end: endBound  }=bounds;\n    const { between , normalize  }=propertyFn(property);\n    const count=points.length;\n    let { start , end , loop  }=segment;\n    let i, ilen;\n    if(loop){\n        start +=count;\n        end +=count;\n        for(i=0, ilen=count; i < ilen; ++i){\n            if(!between(normalize(points[start % count][property]), startBound, endBound)){\n                break;\n            }\n            start--;\n            end--;\n        }\n        start %=count;\n        end %=count;\n    }\n    if(end < start){\n        end +=count;\n    }\n    return {\n        start,\n        end,\n        loop,\n        style: segment.style\n    };\n}\n function _boundSegment(segment, points, bounds){\n    if(!bounds){\n        return [\n            segment\n        ];\n    }\n    const { property , start: startBound , end: endBound  }=bounds;\n    const count=points.length;\n    const { compare , between , normalize  }=propertyFn(property);\n    const { start , end , loop , style  }=getSegment(segment, points, bounds);\n    const result=[];\n    let inside=false;\n    let subStart=null;\n    let value, point, prevValue;\n    const startIsBefore=()=>between(startBound, prevValue, value)&&compare(startBound, prevValue)!==0;\n    const endIsBefore=()=>compare(endBound, value)===0||between(endBound, prevValue, value);\n    const shouldStart=()=>inside||startIsBefore();\n    const shouldStop=()=>!inside||endIsBefore();\n    for(let i=start, prev=start; i <=end; ++i){\n        point=points[i % count];\n        if(point.skip){\n            continue;\n        }\n        value=normalize(point[property]);\n        if(value===prevValue){\n            continue;\n        }\n        inside=between(value, startBound, endBound);\n        if(subStart===null&&shouldStart()){\n            subStart=compare(value, startBound)===0 ? i:prev;\n        }\n        if(subStart!==null&&shouldStop()){\n            result.push(normalizeSegment({\n                start: subStart,\n                end: i,\n                loop,\n                count,\n                style\n            }));\n            subStart=null;\n        }\n        prev=i;\n        prevValue=value;\n    }\n    if(subStart!==null){\n        result.push(normalizeSegment({\n            start: subStart,\n            end,\n            loop,\n            count,\n            style\n        }));\n    }\n    return result;\n}\n function _boundSegments(line, bounds){\n    const result=[];\n    const segments=line.segments;\n    for(let i=0; i < segments.length; i++){\n        const sub=_boundSegment(segments[i], line.points, bounds);\n        if(sub.length){\n            result.push(...sub);\n        }\n    }\n    return result;\n}\n function findStartAndEnd(points, count, loop, spanGaps){\n    let start=0;\n    let end=count - 1;\n    if(loop&&!spanGaps){\n        while(start < count&&!points[start].skip){\n            start++;\n        }\n    }\n    while(start < count&&points[start].skip){\n        start++;\n    }\n    start %=count;\n    if(loop){\n        end +=start;\n    }\n    while(end > start&&points[end % count].skip){\n        end--;\n    }\n    end %=count;\n    return {\n        start,\n        end\n    };\n}\n function solidSegments(points, start, max, loop){\n    const count=points.length;\n    const result=[];\n    let last=start;\n    let prev=points[start];\n    let end;\n    for(end=start + 1; end <=max; ++end){\n        const cur=points[end % count];\n        if(cur.skip||cur.stop){\n            if(!prev.skip){\n                loop=false;\n                result.push({\n                    start: start % count,\n                    end: (end - 1) % count,\n                    loop\n                });\n                start=last=cur.stop ? end:null;\n            }\n        }else{\n            last=end;\n            if(prev.skip){\n                start=end;\n            }\n        }\n        prev=cur;\n    }\n    if(last!==null){\n        result.push({\n            start: start % count,\n            end: last % count,\n            loop\n        });\n    }\n    return result;\n}\n function _computeSegments(line, segmentOptions){\n    const points=line.points;\n    const spanGaps=line.options.spanGaps;\n    const count=points.length;\n    if(!count){\n        return [];\n    }\n    const loop = !!line._loop;\n    const { start , end  }=findStartAndEnd(points, count, loop, spanGaps);\n    if(spanGaps===true){\n        return splitByStyles(line, [\n            {\n                start,\n                end,\n                loop\n            }\n        ], points, segmentOptions);\n    }\n    const max=end < start ? end + count:end;\n    const completeLoop = !!line._fullLoop&&start===0&&end===count - 1;\n    return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n function splitByStyles(line, segments, points, segmentOptions){\n    if(!segmentOptions||!segmentOptions.setContext||!points){\n        return segments;\n    }\n    return doSplitByStyles(line, segments, points, segmentOptions);\n}\n function doSplitByStyles(line, segments, points, segmentOptions){\n    const chartContext=line._chart.getContext();\n    const baseStyle=readStyle(line.options);\n    const { _datasetIndex: datasetIndex , options: { spanGaps  }}=line;\n    const count=points.length;\n    const result=[];\n    let prevStyle=baseStyle;\n    let start=segments[0].start;\n    let i=start;\n    function addStyle(s, e, l, st){\n        const dir=spanGaps ? -1:1;\n        if(s===e){\n            return;\n        }\n        s +=count;\n        while(points[s % count].skip){\n            s -=dir;\n        }\n        while(points[e % count].skip){\n            e +=dir;\n        }\n        if(s % count!==e % count){\n            result.push({\n                start: s % count,\n                end: e % count,\n                loop: l,\n                style: st\n            });\n            prevStyle=st;\n            start=e % count;\n        }\n    }\n    for (const segment of segments){\n        start=spanGaps ? start:segment.start;\n        let prev=points[start % count];\n        let style;\n        for(i=start + 1; i <=segment.end; i++){\n            const pt=points[i % count];\n            style=readStyle(segmentOptions.setContext(createContext(chartContext, {\n                type: 'segment',\n                p0: prev,\n                p1: pt,\n                p0DataIndex: (i - 1) % count,\n                p1DataIndex: i % count,\n                datasetIndex\n            })));\n            if(styleChanged(style, prevStyle)){\n                addStyle(start, i - 1, segment.loop, prevStyle);\n            }\n            prev=pt;\n            prevStyle=style;\n        }\n        if(start < i - 1){\n            addStyle(start, i - 1, segment.loop, prevStyle);\n        }\n    }\n    return result;\n}\nfunction readStyle(options){\n    return {\n        backgroundColor: options.backgroundColor,\n        borderCapStyle: options.borderCapStyle,\n        borderDash: options.borderDash,\n        borderDashOffset: options.borderDashOffset,\n        borderJoinStyle: options.borderJoinStyle,\n        borderWidth: options.borderWidth,\n        borderColor: options.borderColor\n    };\n}\nfunction styleChanged(style, prevStyle){\n    if(!prevStyle){\n        return false;\n    }\n    const cache=[];\n    const replacer=function(key, value){\n        if(!isPatternOrGradient(value)){\n            return value;\n        }\n        if(!cache.includes(value)){\n            cache.push(value);\n        }\n        return cache.indexOf(value);\n    };\n    return JSON.stringify(style, replacer)!==JSON.stringify(prevStyle, replacer);\n}\n\n\n//# sourceMappingURL=helpers.segment.js.map\n\n\n//# sourceURL=webpack://startHtml/./node_modules/chart.js/dist/chunks/helpers.segment.js?")},"./node_modules/nouislider/dist/nouislider.mjs":function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   "PipsMode": function(){ return /* binding */ PipsMode; },\n/* harmony export */   "PipsType": function(){ return /* binding */ PipsType; },\n/* harmony export */   "create": function(){ return /* binding */ initialize; },\n/* harmony export */   "cssClasses": function(){ return /* binding */ cssClasses; }\n/* harmony export */ });\n\nvar PipsMode;\n(function (PipsMode){\n    PipsMode["Range"]="range";\n    PipsMode["Steps"]="steps";\n    PipsMode["Positions"]="positions";\n    PipsMode["Count"]="count";\n    PipsMode["Values"]="values";\n})(PipsMode||(PipsMode={}));\nvar PipsType;\n(function (PipsType){\n    PipsType[PipsType["None"]=-1]="None";\n    PipsType[PipsType["NoValue"]=0]="NoValue";\n    PipsType[PipsType["LargeValue"]=1]="LargeValue";\n    PipsType[PipsType["SmallValue"]=2]="SmallValue";\n})(PipsType||(PipsType={}));\n//region Helper Methods\nfunction isValidFormatter(entry){\n    return isValidPartialFormatter(entry)&&typeof entry.from==="function";\n}\nfunction isValidPartialFormatter(entry){\n    // partial formatters only need a to function and not a from function\n    return typeof entry==="object"&&typeof entry.to==="function";\n}\nfunction removeElement(el){\n    el.parentElement.removeChild(el);\n}\nfunction isSet(value){\n    return value!==null&&value!==undefined;\n}\n// Bindable version\nfunction preventDefault(e){\n    e.preventDefault();\n}\n// Removes duplicates from an array.\nfunction unique(array){\n    return array.filter(function (a){\n        return !this[a] ? (this[a]=true):false;\n    }, {});\n}\n// Round a value to the closest \'to\'.\nfunction closest(value, to){\n    return Math.round(value / to) * to;\n}\n// Current position of an element relative to the document.\nfunction offset(elem, orientation){\n    var rect=elem.getBoundingClientRect();\n    var doc=elem.ownerDocument;\n    var docElem=doc.documentElement;\n    var pageOffset=getPageOffset(doc);\n    // getBoundingClientRect contains left scroll in Chrome on Android.\n    // I haven\'t found a feature detection that proves this. Worst case\n    // scenario on mis-match: the \'tap\' feature on horizontal sliders breaks.\n    if(/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)){\n        pageOffset.x=0;\n    }\n    return orientation ? rect.top + pageOffset.y - docElem.clientTop:rect.left + pageOffset.x - docElem.clientLeft;\n}\n// Checks whether a value is numerical.\nfunction isNumeric(a){\n    return typeof a==="number"&&!isNaN(a)&&isFinite(a);\n}\n// Sets a class and removes it after [duration] ms.\nfunction addClassFor(element, className, duration){\n    if(duration > 0){\n        addClass(element, className);\n        setTimeout(function (){\n            removeClass(element, className);\n        }, duration);\n    }\n}\n// Limits a value to 0 - 100\nfunction limit(a){\n    return Math.max(Math.min(a, 100), 0);\n}\n// Wraps a variable as an array, if it isn\'t one yet.\n// Note that an input array is returned by reference!\nfunction asArray(a){\n    return Array.isArray(a) ? a:[a];\n}\n// Counts decimals\nfunction countDecimals(numStr){\n    numStr=String(numStr);\n    var pieces=numStr.split(".");\n    return pieces.length > 1 ? pieces[1].length:0;\n}\n// http://youmightnotneedjquery.com/#add_class\nfunction addClass(el, className){\n    if(el.classList&&!/\\s/.test(className)){\n        el.classList.add(className);\n    }\n    else {\n        el.className +=" " + className;\n    }\n}\n// http://youmightnotneedjquery.com/#remove_class\nfunction removeClass(el, className){\n    if(el.classList&&!/\\s/.test(className)){\n        el.classList.remove(className);\n    }\n    else {\n        el.className=el.className.replace(new RegExp("(^|\\\\b)" + className.split(" ").join("|") + "(\\\\b|$)", "gi"), " ");\n    }\n}\n// https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\nfunction hasClass(el, className){\n    return el.classList ? el.classList.contains(className):new RegExp("\\\\b" + className + "\\\\b").test(el.className);\n}\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\nfunction getPageOffset(doc){\n    var supportPageOffset=window.pageXOffset!==undefined;\n    var isCSS1Compat=(doc.compatMode||"")==="CSS1Compat";\n    var x=supportPageOffset\n        ? window.pageXOffset\n:isCSS1Compat\n            ? doc.documentElement.scrollLeft\n:doc.body.scrollLeft;\n    var y=supportPageOffset\n        ? window.pageYOffset\n:isCSS1Compat\n            ? doc.documentElement.scrollTop\n:doc.body.scrollTop;\n    return {\n        x: x,\n        y: y,\n    };\n}\n// we provide a function to compute constants instead\n// of accessing window.* as soon as the module needs it\n// so that we do not compute anything if not needed\nfunction getActions(){\n    // Determine the events to bind. IE11 implements pointerEvents without\n    // a prefix, which breaks compatibility with the IE10 implementation.\n    return window.navigator.pointerEnabled\n        ? {\n            start: "pointerdown",\n            move: "pointermove",\n            end: "pointerup",\n        }\n:window.navigator.msPointerEnabled\n            ? {\n                start: "MSPointerDown",\n                move: "MSPointerMove",\n                end: "MSPointerUp",\n            }\n:{\n                start: "mousedown touchstart",\n                move: "mousemove touchmove",\n                end: "mouseup touchend",\n            };\n}\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n// Issue #785\nfunction getSupportsPassive(){\n    var supportsPassive=false;\n    /* eslint-disable */\n    try {\n        var opts=Object.defineProperty({}, "passive", {\n            get: function (){\n                supportsPassive=true;\n            },\n        });\n        // @ts-ignore\n        window.addEventListener("test", null, opts);\n    }\n    catch (e){ }\n    /* eslint-enable */\n    return supportsPassive;\n}\nfunction getSupportsTouchActionNone(){\n    return window.CSS&&CSS.supports&&CSS.supports("touch-action", "none");\n}\n//endregion\n//region Range Calculation\n// Determine the size of a sub-range in relation to a full range.\nfunction subRangeRatio(pa, pb){\n    return 100 / (pb - pa);\n}\n// (percentage) How many percent is this value of this range?\nfunction fromPercentage(range, value, startRange){\n    return (value * 100) / (range[startRange + 1] - range[startRange]);\n}\n// (percentage) Where is this value on this range?\nfunction toPercentage(range, value){\n    return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]):value - range[0], 0);\n}\n// (value) How much is this percentage on this range?\nfunction isPercentage(range, value){\n    return (value * (range[1] - range[0])) / 100 + range[0];\n}\nfunction getJ(value, arr){\n    var j=1;\n    while (value >=arr[j]){\n        j +=1;\n    }\n    return j;\n}\n// (percentage) Input a value, find where, on a scale of 0-100, it applies.\nfunction toStepping(xVal, xPct, value){\n    if(value >=xVal.slice(-1)[0]){\n        return 100;\n    }\n    var j=getJ(value, xVal);\n    var va=xVal[j - 1];\n    var vb=xVal[j];\n    var pa=xPct[j - 1];\n    var pb=xPct[j];\n    return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n}\n// (value) Input a percentage, find where it is on the specified range.\nfunction fromStepping(xVal, xPct, value){\n    // There is no range group that fits 100\n    if(value >=100){\n        return xVal.slice(-1)[0];\n    }\n    var j=getJ(value, xPct);\n    var va=xVal[j - 1];\n    var vb=xVal[j];\n    var pa=xPct[j - 1];\n    var pb=xPct[j];\n    return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n}\n// (percentage) Get the step that applies at a certain value.\nfunction getStep(xPct, xSteps, snap, value){\n    if(value===100){\n        return value;\n    }\n    var j=getJ(value, xPct);\n    var a=xPct[j - 1];\n    var b=xPct[j];\n    // If \'snap\' is set, steps are used as fixed points on the slider.\n    if(snap){\n        // Find the closest position, a or b.\n        if(value - a > (b - a) / 2){\n            return b;\n        }\n        return a;\n    }\n    if(!xSteps[j - 1]){\n        return value;\n    }\n    return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n}\n//endregion\n//region Spectrum\nvar Spectrum=/** @class */ (function (){\n    function Spectrum(entry, snap, singleStep){\n        this.xPct=[];\n        this.xVal=[];\n        this.xSteps=[];\n        this.xNumSteps=[];\n        this.xHighestCompleteStep=[];\n        this.xSteps=[singleStep||false];\n        this.xNumSteps=[false];\n        this.snap=snap;\n        var index;\n        var ordered=[];\n        // Map the object keys to an array.\n        Object.keys(entry).forEach(function (index){\n            ordered.push([asArray(entry[index]), index]);\n        });\n        // Sort all entries by value (numeric sort).\n        ordered.sort(function (a, b){\n            return a[0][0] - b[0][0];\n        });\n        // Convert all entries to subranges.\n        for (index=0; index < ordered.length; index++){\n            this.handleEntryPoint(ordered[index][1], ordered[index][0]);\n        }\n        // Store the actual step values.\n        // xSteps is sorted in the same order as xPct and xVal.\n        this.xNumSteps=this.xSteps.slice(0);\n        // Convert all numeric steps to the percentage of the subrange they represent.\n        for (index=0; index < this.xNumSteps.length; index++){\n            this.handleStepPoint(index, this.xNumSteps[index]);\n        }\n    }\n    Spectrum.prototype.getDistance=function (value){\n        var distances=[];\n        for (var index=0; index < this.xNumSteps.length - 1; index++){\n            distances[index]=fromPercentage(this.xVal, value, index);\n        }\n        return distances;\n    };\n    // Calculate the percentual distance over the whole scale of ranges.\n    // direction: 0=backwards / 1=forwards\n    Spectrum.prototype.getAbsoluteDistance=function (value, distances, direction){\n        var xPct_index=0;\n        // Calculate range where to start calculation\n        if(value < this.xPct[this.xPct.length - 1]){\n            while (value > this.xPct[xPct_index + 1]){\n                xPct_index++;\n            }\n        }\n        else if(value===this.xPct[this.xPct.length - 1]){\n            xPct_index=this.xPct.length - 2;\n        }\n        // If looking backwards and the value is exactly at a range separator then look one range further\n        if(!direction&&value===this.xPct[xPct_index + 1]){\n            xPct_index++;\n        }\n        if(distances===null){\n            distances=[];\n        }\n        var start_factor;\n        var rest_factor=1;\n        var rest_rel_distance=distances[xPct_index];\n        var range_pct=0;\n        var rel_range_distance=0;\n        var abs_distance_counter=0;\n        var range_counter=0;\n        // Calculate what part of the start range the value is\n        if(direction){\n            start_factor=(value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        }\n        else {\n            start_factor=(this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        }\n        // Do until the complete distance across ranges is calculated\n        while (rest_rel_distance > 0){\n            // Calculate the percentage of total range\n            range_pct=this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];\n            // Detect if the margin, padding or limit is larger then the current range and calculate\n            if(distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100){\n                // If larger then take the percentual distance of the whole range\n                rel_range_distance=range_pct * start_factor;\n                // Rest factor of relative percentual distance still to be calculated\n                rest_factor=(rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];\n                // Set start factor to 1 as for next range it does not apply.\n                start_factor=1;\n            }\n            else {\n                // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n                rel_range_distance=((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;\n                // No rest left as the rest fits in current range\n                rest_factor=0;\n            }\n            if(direction){\n                abs_distance_counter=abs_distance_counter - rel_range_distance;\n                // Limit range to first range when distance becomes outside of minimum range\n                if(this.xPct.length + range_counter >=1){\n                    range_counter--;\n                }\n            }\n            else {\n                abs_distance_counter=abs_distance_counter + rel_range_distance;\n                // Limit range to last range when distance becomes outside of maximum range\n                if(this.xPct.length - range_counter >=1){\n                    range_counter++;\n                }\n            }\n            // Rest of relative percentual distance still to be calculated\n            rest_rel_distance=distances[xPct_index + range_counter] * rest_factor;\n        }\n        return value + abs_distance_counter;\n    };\n    Spectrum.prototype.toStepping=function (value){\n        value=toStepping(this.xVal, this.xPct, value);\n        return value;\n    };\n    Spectrum.prototype.fromStepping=function (value){\n        return fromStepping(this.xVal, this.xPct, value);\n    };\n    Spectrum.prototype.getStep=function (value){\n        value=getStep(this.xPct, this.xSteps, this.snap, value);\n        return value;\n    };\n    Spectrum.prototype.getDefaultStep=function (value, isDown, size){\n        var j=getJ(value, this.xPct);\n        // When at the top or stepping down, look at the previous sub-range\n        if(value===100||(isDown&&value===this.xPct[j - 1])){\n            j=Math.max(j - 1, 1);\n        }\n        return (this.xVal[j] - this.xVal[j - 1]) / size;\n    };\n    Spectrum.prototype.getNearbySteps=function (value){\n        var j=getJ(value, this.xPct);\n        return {\n            stepBefore: {\n                startValue: this.xVal[j - 2],\n                step: this.xNumSteps[j - 2],\n                highestStep: this.xHighestCompleteStep[j - 2],\n            },\n            thisStep: {\n                startValue: this.xVal[j - 1],\n                step: this.xNumSteps[j - 1],\n                highestStep: this.xHighestCompleteStep[j - 1],\n            },\n            stepAfter: {\n                startValue: this.xVal[j],\n                step: this.xNumSteps[j],\n                highestStep: this.xHighestCompleteStep[j],\n            },\n        };\n    };\n    Spectrum.prototype.countStepDecimals=function (){\n        var stepDecimals=this.xNumSteps.map(countDecimals);\n        return Math.max.apply(null, stepDecimals);\n    };\n    Spectrum.prototype.hasNoSize=function (){\n        return this.xVal[0]===this.xVal[this.xVal.length - 1];\n    };\n    // Outside testing\n    Spectrum.prototype.convert=function (value){\n        return this.getStep(this.toStepping(value));\n    };\n    Spectrum.prototype.handleEntryPoint=function (index, value){\n        var percentage;\n        // Covert min/max syntax to 0 and 100.\n        if(index==="min"){\n            percentage=0;\n        }\n        else if(index==="max"){\n            percentage=100;\n        }\n        else {\n            percentage=parseFloat(index);\n        }\n        // Check for correct input.\n        if(!isNumeric(percentage)||!isNumeric(value[0])){\n            throw new Error("noUiSlider: \'range\' value isn\'t numeric.");\n        }\n        // Store values.\n        this.xPct.push(percentage);\n        this.xVal.push(value[0]);\n        var value1=Number(value[1]);\n        // NaN will evaluate to false too, but to keep\n        // logging clear, set step explicitly. Make sure\n        // not to override the \'step\' setting with false.\n        if(!percentage){\n            if(!isNaN(value1)){\n                this.xSteps[0]=value1;\n            }\n        }\n        else {\n            this.xSteps.push(isNaN(value1) ? false:value1);\n        }\n        this.xHighestCompleteStep.push(0);\n    };\n    Spectrum.prototype.handleStepPoint=function (i, n){\n        // Ignore \'false\' stepping.\n        if(!n){\n            return;\n        }\n        // Step over zero-length ranges (#948);\n        if(this.xVal[i]===this.xVal[i + 1]){\n            this.xSteps[i]=this.xHighestCompleteStep[i]=this.xVal[i];\n            return;\n        }\n        // Factor to range ratio\n        this.xSteps[i]=\n            fromPercentage([this.xVal[i], this.xVal[i + 1]], n, 0) / subRangeRatio(this.xPct[i], this.xPct[i + 1]);\n        var totalSteps=(this.xVal[i + 1] - this.xVal[i]) / this.xNumSteps[i];\n        var highestStep=Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n        var step=this.xVal[i] + this.xNumSteps[i] * highestStep;\n        this.xHighestCompleteStep[i]=step;\n    };\n    return Spectrum;\n}());\n//endregion\n//region Options\n/*\tEvery input option is tested and parsed. This will prevent\n    endless validation in internal methods. These tests are\n    structured with an item for every option available. An\n    option can be marked as required by setting the \'r\' flag.\n    The testing function is provided with three arguments:\n        - The provided value for the option;\n        - A reference to the options object;\n        - The name for the option;\n\n    The testing function returns false when an error is detected,\n    or true when everything is OK. It can also modify the option\n    object, to make sure all values can be correctly looped elsewhere. */\n//region Defaults\nvar defaultFormatter={\n    to: function (value){\n        return value===undefined ? "":value.toFixed(2);\n    },\n    from: Number,\n};\nvar cssClasses={\n    target: "target",\n    base: "base",\n    origin: "origin",\n    handle: "handle",\n    handleLower: "handle-lower",\n    handleUpper: "handle-upper",\n    touchArea: "touch-area",\n    horizontal: "horizontal",\n    vertical: "vertical",\n    background: "background",\n    connect: "connect",\n    connects: "connects",\n    ltr: "ltr",\n    rtl: "rtl",\n    textDirectionLtr: "txt-dir-ltr",\n    textDirectionRtl: "txt-dir-rtl",\n    draggable: "draggable",\n    drag: "state-drag",\n    tap: "state-tap",\n    active: "active",\n    tooltip: "tooltip",\n    pips: "pips",\n    pipsHorizontal: "pips-horizontal",\n    pipsVertical: "pips-vertical",\n    marker: "marker",\n    markerHorizontal: "marker-horizontal",\n    markerVertical: "marker-vertical",\n    markerNormal: "marker-normal",\n    markerLarge: "marker-large",\n    markerSub: "marker-sub",\n    value: "value",\n    valueHorizontal: "value-horizontal",\n    valueVertical: "value-vertical",\n    valueNormal: "value-normal",\n    valueLarge: "value-large",\n    valueSub: "value-sub",\n};\n// Namespaces of internal event listeners\nvar INTERNAL_EVENT_NS={\n    tooltips: ".__tooltips",\n    aria: ".__aria",\n};\n//endregion\nfunction testStep(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'step\' is not numeric.");\n    }\n    // The step option can still be used to set stepping\n    // for linear sliders. Overwritten if set in \'range\'.\n    parsed.singleStep=entry;\n}\nfunction testKeyboardPageMultiplier(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'keyboardPageMultiplier\' is not numeric.");\n    }\n    parsed.keyboardPageMultiplier=entry;\n}\nfunction testKeyboardMultiplier(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'keyboardMultiplier\' is not numeric.");\n    }\n    parsed.keyboardMultiplier=entry;\n}\nfunction testKeyboardDefaultStep(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'keyboardDefaultStep\' is not numeric.");\n    }\n    parsed.keyboardDefaultStep=entry;\n}\nfunction testRange(parsed, entry){\n    // Filter incorrect input.\n    if(typeof entry!=="object"||Array.isArray(entry)){\n        throw new Error("noUiSlider: \'range\' is not an object.");\n    }\n    // Catch missing start or end.\n    if(entry.min===undefined||entry.max===undefined){\n        throw new Error("noUiSlider: Missing \'min\' or \'max\' in \'range\'.");\n    }\n    parsed.spectrum=new Spectrum(entry, parsed.snap||false, parsed.singleStep);\n}\nfunction testStart(parsed, entry){\n    entry=asArray(entry);\n    // Validate input. Values aren\'t tested, as the public .val method\n    // will always provide a valid location.\n    if(!Array.isArray(entry)||!entry.length){\n        throw new Error("noUiSlider: \'start\' option is incorrect.");\n    }\n    // Store the number of handles.\n    parsed.handles=entry.length;\n    // When the slider is initialized, the .val method will\n    // be called with the start options.\n    parsed.start=entry;\n}\nfunction testSnap(parsed, entry){\n    if(typeof entry!=="boolean"){\n        throw new Error("noUiSlider: \'snap\' option must be a boolean.");\n    }\n    // Enforce 100% stepping within subranges.\n    parsed.snap=entry;\n}\nfunction testAnimate(parsed, entry){\n    if(typeof entry!=="boolean"){\n        throw new Error("noUiSlider: \'animate\' option must be a boolean.");\n    }\n    // Enforce 100% stepping within subranges.\n    parsed.animate=entry;\n}\nfunction testAnimationDuration(parsed, entry){\n    if(typeof entry!=="number"){\n        throw new Error("noUiSlider: \'animationDuration\' option must be a number.");\n    }\n    parsed.animationDuration=entry;\n}\nfunction testConnect(parsed, entry){\n    var connect=[false];\n    var i;\n    // Map legacy options\n    if(entry==="lower"){\n        entry=[true, false];\n    }\n    else if(entry==="upper"){\n        entry=[false, true];\n    }\n    // Handle boolean options\n    if(entry===true||entry===false){\n        for (i=1; i < parsed.handles; i++){\n            connect.push(entry);\n        }\n        connect.push(false);\n    }\n    // Reject invalid input\n    else if(!Array.isArray(entry)||!entry.length||entry.length!==parsed.handles + 1){\n        throw new Error("noUiSlider: \'connect\' option doesn\'t match handle count.");\n    }\n    else {\n        connect=entry;\n    }\n    parsed.connect=connect;\n}\nfunction testOrientation(parsed, entry){\n    // Set orientation to an a numerical value for easy\n    // array selection.\n    switch (entry){\n        case "horizontal":\n            parsed.ort=0;\n            break;\n        case "vertical":\n            parsed.ort=1;\n            break;\n        default:\n            throw new Error("noUiSlider: \'orientation\' option is invalid.");\n    }\n}\nfunction testMargin(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'margin\' option must be numeric.");\n    }\n    // Issue #582\n    if(entry===0){\n        return;\n    }\n    parsed.margin=parsed.spectrum.getDistance(entry);\n}\nfunction testLimit(parsed, entry){\n    if(!isNumeric(entry)){\n        throw new Error("noUiSlider: \'limit\' option must be numeric.");\n    }\n    parsed.limit=parsed.spectrum.getDistance(entry);\n    if(!parsed.limit||parsed.handles < 2){\n        throw new Error("noUiSlider: \'limit\' option is only supported on linear sliders with 2 or more handles.");\n    }\n}\nfunction testPadding(parsed, entry){\n    var index;\n    if(!isNumeric(entry)&&!Array.isArray(entry)){\n        throw new Error("noUiSlider: \'padding\' option must be numeric or array of exactly 2 numbers.");\n    }\n    if(Array.isArray(entry)&&!(entry.length===2||isNumeric(entry[0])||isNumeric(entry[1]))){\n        throw new Error("noUiSlider: \'padding\' option must be numeric or array of exactly 2 numbers.");\n    }\n    if(entry===0){\n        return;\n    }\n    if(!Array.isArray(entry)){\n        entry=[entry, entry];\n    }\n    // \'getDistance\' returns false for invalid values.\n    parsed.padding=[parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n    for (index=0; index < parsed.spectrum.xNumSteps.length - 1; index++){\n        // last "range" can\'t contain step size as it is purely an endpoint.\n        if(parsed.padding[0][index] < 0||parsed.padding[1][index] < 0){\n            throw new Error("noUiSlider: \'padding\' option must be a positive number(s).");\n        }\n    }\n    var totalPadding=entry[0] + entry[1];\n    var firstValue=parsed.spectrum.xVal[0];\n    var lastValue=parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n    if(totalPadding / (lastValue - firstValue) > 1){\n        throw new Error("noUiSlider: \'padding\' option must not exceed 100% of the range.");\n    }\n}\nfunction testDirection(parsed, entry){\n    // Set direction as a numerical value for easy parsing.\n    // Invert connection for RTL sliders, so that the proper\n    // handles get the connect/background classes.\n    switch (entry){\n        case "ltr":\n            parsed.dir=0;\n            break;\n        case "rtl":\n            parsed.dir=1;\n            break;\n        default:\n            throw new Error("noUiSlider: \'direction\' option was not recognized.");\n    }\n}\nfunction testBehaviour(parsed, entry){\n    // Make sure the input is a string.\n    if(typeof entry!=="string"){\n        throw new Error("noUiSlider: \'behaviour\' must be a string containing options.");\n    }\n    // Check if the string contains any keywords.\n    // None are required.\n    var tap=entry.indexOf("tap") >=0;\n    var drag=entry.indexOf("drag") >=0;\n    var fixed=entry.indexOf("fixed") >=0;\n    var snap=entry.indexOf("snap") >=0;\n    var hover=entry.indexOf("hover") >=0;\n    var unconstrained=entry.indexOf("unconstrained") >=0;\n    var dragAll=entry.indexOf("drag-all") >=0;\n    var smoothSteps=entry.indexOf("smooth-steps") >=0;\n    if(fixed){\n        if(parsed.handles!==2){\n            throw new Error("noUiSlider: \'fixed\' behaviour must be used with 2 handles");\n        }\n        // Use margin to enforce fixed state\n        testMargin(parsed, parsed.start[1] - parsed.start[0]);\n    }\n    if(unconstrained&&(parsed.margin||parsed.limit)){\n        throw new Error("noUiSlider: \'unconstrained\' behaviour cannot be used with margin or limit");\n    }\n    parsed.events={\n        tap: tap||snap,\n        drag: drag,\n        dragAll: dragAll,\n        smoothSteps: smoothSteps,\n        fixed: fixed,\n        snap: snap,\n        hover: hover,\n        unconstrained: unconstrained,\n    };\n}\nfunction testTooltips(parsed, entry){\n    if(entry===false){\n        return;\n    }\n    if(entry===true||isValidPartialFormatter(entry)){\n        parsed.tooltips=[];\n        for (var i=0; i < parsed.handles; i++){\n            parsed.tooltips.push(entry);\n        }\n    }\n    else {\n        entry=asArray(entry);\n        if(entry.length!==parsed.handles){\n            throw new Error("noUiSlider: must pass a formatter for all handles.");\n        }\n        entry.forEach(function (formatter){\n            if(typeof formatter!=="boolean"&&!isValidPartialFormatter(formatter)){\n                throw new Error("noUiSlider: \'tooltips\' must be passed a formatter or \'false\'.");\n            }\n        });\n        parsed.tooltips=entry;\n    }\n}\nfunction testHandleAttributes(parsed, entry){\n    if(entry.length!==parsed.handles){\n        throw new Error("noUiSlider: must pass a attributes for all handles.");\n    }\n    parsed.handleAttributes=entry;\n}\nfunction testAriaFormat(parsed, entry){\n    if(!isValidPartialFormatter(entry)){\n        throw new Error("noUiSlider: \'ariaFormat\' requires \'to\' method.");\n    }\n    parsed.ariaFormat=entry;\n}\nfunction testFormat(parsed, entry){\n    if(!isValidFormatter(entry)){\n        throw new Error("noUiSlider: \'format\' requires \'to\' and \'from\' methods.");\n    }\n    parsed.format=entry;\n}\nfunction testKeyboardSupport(parsed, entry){\n    if(typeof entry!=="boolean"){\n        throw new Error("noUiSlider: \'keyboardSupport\' option must be a boolean.");\n    }\n    parsed.keyboardSupport=entry;\n}\nfunction testDocumentElement(parsed, entry){\n    // This is an advanced option. Passed values are used without validation.\n    parsed.documentElement=entry;\n}\nfunction testCssPrefix(parsed, entry){\n    if(typeof entry!=="string"&&entry!==false){\n        throw new Error("noUiSlider: \'cssPrefix\' must be a string or `false`.");\n    }\n    parsed.cssPrefix=entry;\n}\nfunction testCssClasses(parsed, entry){\n    if(typeof entry!=="object"){\n        throw new Error("noUiSlider: \'cssClasses\' must be an object.");\n    }\n    if(typeof parsed.cssPrefix==="string"){\n        parsed.cssClasses={};\n        Object.keys(entry).forEach(function (key){\n            parsed.cssClasses[key]=parsed.cssPrefix + entry[key];\n        });\n    }\n    else {\n        parsed.cssClasses=entry;\n    }\n}\n// Test all developer settings and parse to assumption-safe values.\nfunction testOptions(options){\n    // To prove a fix for #537, freeze options here.\n    // If the object is modified, an error will be thrown.\n    // Object.freeze(options);\n    var parsed={\n        margin: null,\n        limit: null,\n        padding: null,\n        animate: true,\n        animationDuration: 300,\n        ariaFormat: defaultFormatter,\n        format: defaultFormatter,\n    };\n    // Tests are executed in the order they are presented here.\n    var tests={\n        step: { r: false, t: testStep },\n        keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n        keyboardMultiplier: { r: false, t: testKeyboardMultiplier },\n        keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n        start: { r: true, t: testStart },\n        connect: { r: true, t: testConnect },\n        direction: { r: true, t: testDirection },\n        snap: { r: false, t: testSnap },\n        animate: { r: false, t: testAnimate },\n        animationDuration: { r: false, t: testAnimationDuration },\n        range: { r: true, t: testRange },\n        orientation: { r: false, t: testOrientation },\n        margin: { r: false, t: testMargin },\n        limit: { r: false, t: testLimit },\n        padding: { r: false, t: testPadding },\n        behaviour: { r: true, t: testBehaviour },\n        ariaFormat: { r: false, t: testAriaFormat },\n        format: { r: false, t: testFormat },\n        tooltips: { r: false, t: testTooltips },\n        keyboardSupport: { r: true, t: testKeyboardSupport },\n        documentElement: { r: false, t: testDocumentElement },\n        cssPrefix: { r: true, t: testCssPrefix },\n        cssClasses: { r: true, t: testCssClasses },\n        handleAttributes: { r: false, t: testHandleAttributes },\n    };\n    var defaults={\n        connect: false,\n        direction: "ltr",\n        behaviour: "tap",\n        orientation: "horizontal",\n        keyboardSupport: true,\n        cssPrefix: "noUi-",\n        cssClasses: cssClasses,\n        keyboardPageMultiplier: 5,\n        keyboardMultiplier: 1,\n        keyboardDefaultStep: 10,\n    };\n    // AriaFormat defaults to regular format, if any.\n    if(options.format&&!options.ariaFormat){\n        options.ariaFormat=options.format;\n    }\n    // Run all options through a testing mechanism to ensure correct\n    // input. It should be noted that options might get modified to\n    // be handled properly. E.g. wrapping integers in arrays.\n    Object.keys(tests).forEach(function (name){\n        // If the option isn\'t set, but it is required, throw an error.\n        if(!isSet(options[name])&&defaults[name]===undefined){\n            if(tests[name].r){\n                throw new Error("noUiSlider: \'" + name + "\' is required.");\n            }\n            return;\n        }\n        tests[name].t(parsed, !isSet(options[name]) ? defaults[name]:options[name]);\n    });\n    // Forward pips options\n    parsed.pips=options.pips;\n    // All recent browsers accept unprefixed transform.\n    // We need -ms- for IE9 and -webkit- for older Android;\n    // Assume use of -webkit- if unprefixed and -ms- are not supported.\n    // https://caniuse.com/#feat=transforms2d\n    var d=document.createElement("div");\n    var msPrefix=d.style.msTransform!==undefined;\n    var noPrefix=d.style.transform!==undefined;\n    parsed.transformRule=noPrefix ? "transform":msPrefix ? "msTransform":"webkitTransform";\n    // Pips don\'t move, so we can place them using left/top.\n    var styles=[\n        ["left", "top"],\n        ["right", "bottom"],\n    ];\n    parsed.style=styles[parsed.dir][parsed.ort];\n    return parsed;\n}\n//endregion\nfunction scope(target, options, originalOptions){\n    var actions=getActions();\n    var supportsTouchActionNone=getSupportsTouchActionNone();\n    var supportsPassive=supportsTouchActionNone&&getSupportsPassive();\n    // All variables local to \'scope\' are prefixed with \'scope_\'\n    // Slider DOM Nodes\n    var scope_Target=target;\n    var scope_Base;\n    var scope_Handles;\n    var scope_Connects;\n    var scope_Pips;\n    var scope_Tooltips;\n    // Slider state values\n    var scope_Spectrum=options.spectrum;\n    var scope_Values=[];\n    var scope_Locations=[];\n    var scope_HandleNumbers=[];\n    var scope_ActiveHandlesCount=0;\n    var scope_Events={};\n    // Document Nodes\n    var scope_Document=target.ownerDocument;\n    var scope_DocumentElement=options.documentElement||scope_Document.documentElement;\n    var scope_Body=scope_Document.body;\n    // For horizontal sliders in standard ltr documents,\n    // make .noUi-origin overflow to the left so the document doesn\'t scroll.\n    var scope_DirOffset=scope_Document.dir==="rtl"||options.ort===1 ? 0:100;\n    // Creates a node, adds it to target, returns the new node.\n    function addNodeTo(addTarget, className){\n        var div=scope_Document.createElement("div");\n        if(className){\n            addClass(div, className);\n        }\n        addTarget.appendChild(div);\n        return div;\n    }\n    // Append a origin to the base\n    function addOrigin(base, handleNumber){\n        var origin=addNodeTo(base, options.cssClasses.origin);\n        var handle=addNodeTo(origin, options.cssClasses.handle);\n        addNodeTo(handle, options.cssClasses.touchArea);\n        handle.setAttribute("data-handle", String(handleNumber));\n        if(options.keyboardSupport){\n            // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n            // 0=focusable and reachable\n            handle.setAttribute("tabindex", "0");\n            handle.addEventListener("keydown", function (event){\n                return eventKeydown(event, handleNumber);\n            });\n        }\n        if(options.handleAttributes!==undefined){\n            var attributes_1=options.handleAttributes[handleNumber];\n            Object.keys(attributes_1).forEach(function (attribute){\n                handle.setAttribute(attribute, attributes_1[attribute]);\n            });\n        }\n        handle.setAttribute("role", "slider");\n        handle.setAttribute("aria-orientation", options.ort ? "vertical":"horizontal");\n        if(handleNumber===0){\n            addClass(handle, options.cssClasses.handleLower);\n        }\n        else if(handleNumber===options.handles - 1){\n            addClass(handle, options.cssClasses.handleUpper);\n        }\n        origin.handle=handle;\n        return origin;\n    }\n    // Insert nodes for connect elements\n    function addConnect(base, add){\n        if(!add){\n            return false;\n        }\n        return addNodeTo(base, options.cssClasses.connect);\n    }\n    // Add handles to the slider base.\n    function addElements(connectOptions, base){\n        var connectBase=addNodeTo(base, options.cssClasses.connects);\n        scope_Handles=[];\n        scope_Connects=[];\n        scope_Connects.push(addConnect(connectBase, connectOptions[0]));\n        // [::::O====O====O====]\n        // connectOptions=[0, 1, 1, 1]\n        for (var i=0; i < options.handles; i++){\n            // Keep a list of all added handles.\n            scope_Handles.push(addOrigin(base, i));\n            scope_HandleNumbers[i]=i;\n            scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n        }\n    }\n    // Initialize a single slider.\n    function addSlider(addTarget){\n        // Apply classes and data to the target.\n        addClass(addTarget, options.cssClasses.target);\n        if(options.dir===0){\n            addClass(addTarget, options.cssClasses.ltr);\n        }\n        else {\n            addClass(addTarget, options.cssClasses.rtl);\n        }\n        if(options.ort===0){\n            addClass(addTarget, options.cssClasses.horizontal);\n        }\n        else {\n            addClass(addTarget, options.cssClasses.vertical);\n        }\n        var textDirection=getComputedStyle(addTarget).direction;\n        if(textDirection==="rtl"){\n            addClass(addTarget, options.cssClasses.textDirectionRtl);\n        }\n        else {\n            addClass(addTarget, options.cssClasses.textDirectionLtr);\n        }\n        return addNodeTo(addTarget, options.cssClasses.base);\n    }\n    function addTooltip(handle, handleNumber){\n        if(!options.tooltips||!options.tooltips[handleNumber]){\n            return false;\n        }\n        return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n    }\n    function isSliderDisabled(){\n        return scope_Target.hasAttribute("disabled");\n    }\n    // Disable the slider dragging if any handle is disabled\n    function isHandleDisabled(handleNumber){\n        var handleOrigin=scope_Handles[handleNumber];\n        return handleOrigin.hasAttribute("disabled");\n    }\n    function disable(handleNumber){\n        if(handleNumber!==null&&handleNumber!==undefined){\n            scope_Handles[handleNumber].setAttribute("disabled", "");\n            scope_Handles[handleNumber].handle.removeAttribute("tabindex");\n        }\n        else {\n            scope_Target.setAttribute("disabled", "");\n            scope_Handles.forEach(function (handle){\n                handle.handle.removeAttribute("tabindex");\n            });\n        }\n    }\n    function enable(handleNumber){\n        if(handleNumber!==null&&handleNumber!==undefined){\n            scope_Handles[handleNumber].removeAttribute("disabled");\n            scope_Handles[handleNumber].handle.setAttribute("tabindex", "0");\n        }\n        else {\n            scope_Target.removeAttribute("disabled");\n            scope_Handles.forEach(function (handle){\n                handle.removeAttribute("disabled");\n                handle.handle.setAttribute("tabindex", "0");\n            });\n        }\n    }\n    function removeTooltips(){\n        if(scope_Tooltips){\n            removeEvent("update" + INTERNAL_EVENT_NS.tooltips);\n            scope_Tooltips.forEach(function (tooltip){\n                if(tooltip){\n                    removeElement(tooltip);\n                }\n            });\n            scope_Tooltips=null;\n        }\n    }\n    // The tooltips option is a shorthand for using the \'update\' event.\n    function tooltips(){\n        removeTooltips();\n        // Tooltips are added with options.tooltips in original order.\n        scope_Tooltips=scope_Handles.map(addTooltip);\n        bindEvent("update" + INTERNAL_EVENT_NS.tooltips, function (values, handleNumber, unencoded){\n            if(!scope_Tooltips||!options.tooltips){\n                return;\n            }\n            if(scope_Tooltips[handleNumber]===false){\n                return;\n            }\n            var formattedValue=values[handleNumber];\n            if(options.tooltips[handleNumber]!==true){\n                formattedValue=options.tooltips[handleNumber].to(unencoded[handleNumber]);\n            }\n            scope_Tooltips[handleNumber].innerHTML=formattedValue;\n        });\n    }\n    function aria(){\n        removeEvent("update" + INTERNAL_EVENT_NS.aria);\n        bindEvent("update" + INTERNAL_EVENT_NS.aria, function (values, handleNumber, unencoded, tap, positions){\n            // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n            scope_HandleNumbers.forEach(function (index){\n                var handle=scope_Handles[index];\n                var min=checkHandlePosition(scope_Locations, index, 0, true, true, true);\n                var max=checkHandlePosition(scope_Locations, index, 100, true, true, true);\n                var now=positions[index];\n                // Formatted value for display\n                var text=String(options.ariaFormat.to(unencoded[index]));\n                // Map to slider range values\n                min=scope_Spectrum.fromStepping(min).toFixed(1);\n                max=scope_Spectrum.fromStepping(max).toFixed(1);\n                now=scope_Spectrum.fromStepping(now).toFixed(1);\n                handle.children[0].setAttribute("aria-valuemin", min);\n                handle.children[0].setAttribute("aria-valuemax", max);\n                handle.children[0].setAttribute("aria-valuenow", now);\n                handle.children[0].setAttribute("aria-valuetext", text);\n            });\n        });\n    }\n    function getGroup(pips){\n        // Use the range.\n        if(pips.mode===PipsMode.Range||pips.mode===PipsMode.Steps){\n            return scope_Spectrum.xVal;\n        }\n        if(pips.mode===PipsMode.Count){\n            if(pips.values < 2){\n                throw new Error("noUiSlider: \'values\' (>=2) required for mode \'count\'.");\n            }\n            // Divide 0 - 100 in \'count\' parts.\n            var interval=pips.values - 1;\n            var spread=100 / interval;\n            var values=[];\n            // List these parts and have them handled as \'positions\'.\n            while (interval--){\n                values[interval]=interval * spread;\n            }\n            values.push(100);\n            return mapToRange(values, pips.stepped);\n        }\n        if(pips.mode===PipsMode.Positions){\n            // Map all percentages to on-range values.\n            return mapToRange(pips.values, pips.stepped);\n        }\n        if(pips.mode===PipsMode.Values){\n            // If the value must be stepped, it needs to be converted to a percentage first.\n            if(pips.stepped){\n                return pips.values.map(function (value){\n                    // Convert to percentage, apply step, return to value.\n                    return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n                });\n            }\n            // Otherwise, we can simply use the values.\n            return pips.values;\n        }\n        return []; // pips.mode=never\n    }\n    function mapToRange(values, stepped){\n        return values.map(function (value){\n            return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value):value);\n        });\n    }\n    function generateSpread(pips){\n        function safeIncrement(value, increment){\n            // Avoid floating point variance by dropping the smallest decimal places.\n            return Number((value + increment).toFixed(7));\n        }\n        var group=getGroup(pips);\n        var indexes={};\n        var firstInRange=scope_Spectrum.xVal[0];\n        var lastInRange=scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n        var ignoreFirst=false;\n        var ignoreLast=false;\n        var prevPct=0;\n        // Create a copy of the group, sort it and filter away all duplicates.\n        group=unique(group.slice().sort(function (a, b){\n            return a - b;\n        }));\n        // Make sure the range starts with the first element.\n        if(group[0]!==firstInRange){\n            group.unshift(firstInRange);\n            ignoreFirst=true;\n        }\n        // Likewise for the last one.\n        if(group[group.length - 1]!==lastInRange){\n            group.push(lastInRange);\n            ignoreLast=true;\n        }\n        group.forEach(function (current, index){\n            // Get the current step and the lower + upper positions.\n            var step;\n            var i;\n            var q;\n            var low=current;\n            var high=group[index + 1];\n            var newPct;\n            var pctDifference;\n            var pctPos;\n            var type;\n            var steps;\n            var realSteps;\n            var stepSize;\n            var isSteps=pips.mode===PipsMode.Steps;\n            // When using \'steps\' mode, use the provided steps.\n            // Otherwise, we\'ll step on to the next subrange.\n            if(isSteps){\n                step=scope_Spectrum.xNumSteps[index];\n            }\n            // Default to a \'full\' step.\n            if(!step){\n                step=high - low;\n            }\n            // If high is undefined we are at the last subrange. Make sure it iterates once (#1088)\n            if(high===undefined){\n                high=low;\n            }\n            // Make sure step isn\'t 0, which would cause an infinite loop (#654)\n            step=Math.max(step, 0.0000001);\n            // Find all steps in the subrange.\n            for (i=low; i <=high; i=safeIncrement(i, step)){\n                // Get the percentage value for the current step,\n                // calculate the size for the subrange.\n                newPct=scope_Spectrum.toStepping(i);\n                pctDifference=newPct - prevPct;\n                steps=pctDifference / (pips.density||1);\n                realSteps=Math.round(steps);\n                // This ratio represents the amount of percentage-space a point indicates.\n                // For a density 1 the points/percentage=1. For density 2, that percentage needs to be re-divided.\n                // Round the percentage offset to an even number, then divide by two\n                // to spread the offset on both sides of the range.\n                stepSize=pctDifference / realSteps;\n                // Divide all points evenly, adding the correct number to this subrange.\n                // Run up to <=so that 100% gets a point, event if ignoreLast is set.\n                for (q=1; q <=realSteps; q +=1){\n                    // The ratio between the rounded value and the actual size might be ~1% off.\n                    // Correct the percentage offset by the number of points\n                    // per subrange. density=1 will result in 100 points on the\n                    // full range, 2 for 50, 4 for 25, etc.\n                    pctPos=prevPct + q * stepSize;\n                    indexes[pctPos.toFixed(5)]=[scope_Spectrum.fromStepping(pctPos), 0];\n                }\n                // Determine the point type.\n                type=group.indexOf(i) > -1 ? PipsType.LargeValue:isSteps ? PipsType.SmallValue:PipsType.NoValue;\n                // Enforce the \'ignoreFirst\' option by overwriting the type for 0.\n                if(!index&&ignoreFirst&&i!==high){\n                    type=0;\n                }\n                if(!(i===high&&ignoreLast)){\n                    // Mark the \'type\' of this point. 0=plain, 1=real value, 2=step value.\n                    indexes[newPct.toFixed(5)]=[i, type];\n                }\n                // Update the percentage count.\n                prevPct=newPct;\n            }\n        });\n        return indexes;\n    }\n    function addMarking(spread, filterFunc, formatter){\n        var _a, _b;\n        var element=scope_Document.createElement("div");\n        var valueSizeClasses=(_a={},\n            _a[PipsType.None]="",\n            _a[PipsType.NoValue]=options.cssClasses.valueNormal,\n            _a[PipsType.LargeValue]=options.cssClasses.valueLarge,\n            _a[PipsType.SmallValue]=options.cssClasses.valueSub,\n            _a);\n        var markerSizeClasses=(_b={},\n            _b[PipsType.None]="",\n            _b[PipsType.NoValue]=options.cssClasses.markerNormal,\n            _b[PipsType.LargeValue]=options.cssClasses.markerLarge,\n            _b[PipsType.SmallValue]=options.cssClasses.markerSub,\n            _b);\n        var valueOrientationClasses=[options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n        var markerOrientationClasses=[options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n        addClass(element, options.cssClasses.pips);\n        addClass(element, options.ort===0 ? options.cssClasses.pipsHorizontal:options.cssClasses.pipsVertical);\n        function getClasses(type, source){\n            var a=source===options.cssClasses.value;\n            var orientationClasses=a ? valueOrientationClasses:markerOrientationClasses;\n            var sizeClasses=a ? valueSizeClasses:markerSizeClasses;\n            return source + " " + orientationClasses[options.ort] + " " + sizeClasses[type];\n        }\n        function addSpread(offset, value, type){\n            // Apply the filter function, if it is set.\n            type=filterFunc ? filterFunc(value, type):type;\n            if(type===PipsType.None){\n                return;\n            }\n            // Add a marker for every point\n            var node=addNodeTo(element, false);\n            node.className=getClasses(type, options.cssClasses.marker);\n            node.style[options.style]=offset + "%";\n            // Values are only appended for points marked \'1\' or \'2\'.\n            if(type > PipsType.NoValue){\n                node=addNodeTo(element, false);\n                node.className=getClasses(type, options.cssClasses.value);\n                node.setAttribute("data-value", String(value));\n                node.style[options.style]=offset + "%";\n                node.innerHTML=String(formatter.to(value));\n            }\n        }\n        // Append all points.\n        Object.keys(spread).forEach(function (offset){\n            addSpread(offset, spread[offset][0], spread[offset][1]);\n        });\n        return element;\n    }\n    function removePips(){\n        if(scope_Pips){\n            removeElement(scope_Pips);\n            scope_Pips=null;\n        }\n    }\n    function pips(pips){\n        // Fix #669\n        removePips();\n        var spread=generateSpread(pips);\n        var filter=pips.filter;\n        var format=pips.format||{\n            to: function (value){\n                return String(Math.round(value));\n            },\n        };\n        scope_Pips=scope_Target.appendChild(addMarking(spread, filter, format));\n        return scope_Pips;\n    }\n    // Shorthand for base dimensions.\n    function baseSize(){\n        var rect=scope_Base.getBoundingClientRect();\n        var alt=("offset" + ["Width", "Height"][options.ort]);\n        return options.ort===0 ? rect.width||scope_Base[alt]:rect.height||scope_Base[alt];\n    }\n    // Handler for attaching events trough a proxy.\n    function attachEvent(events, element, callback, data){\n        // This function can be used to \'filter\' events to the slider.\n        // element is a node, not a nodeList\n        var method=function (event){\n            var e=fixEvent(event, data.pageOffset, data.target||element);\n            // fixEvent returns false if this event has a different target\n            // when handling (multi-) touch events;\n            if(!e){\n                return false;\n            }\n            // doNotReject is passed by all end events to make sure released touches\n            // are not rejected, leaving the slider "stuck" to the cursor;\n            if(isSliderDisabled()&&!data.doNotReject){\n                return false;\n            }\n            // Stop if an active \'tap\' transition is taking place.\n            if(hasClass(scope_Target, options.cssClasses.tap)&&!data.doNotReject){\n                return false;\n            }\n            // Ignore right or middle clicks on start #454\n            if(events===actions.start&&e.buttons!==undefined&&e.buttons > 1){\n                return false;\n            }\n            // Ignore right or middle clicks on start #454\n            if(data.hover&&e.buttons){\n                return false;\n            }\n            // \'supportsPassive\' is only true if a browser also supports touch-action: none in CSS.\n            // iOS safari does not, so it doesn\'t get to benefit from passive scrolling. iOS does support\n            // touch-action: manipulation, but that allows panning, which breaks\n            // sliders after zooming/on non-responsive pages.\n            // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n            if(!supportsPassive){\n                e.preventDefault();\n            }\n            e.calcPoint=e.points[options.ort];\n            // Call the event handler with the event [ and additional data ].\n            callback(e, data);\n            return;\n        };\n        var methods=[];\n        // Bind a closure on the target for every event type.\n        events.split(" ").forEach(function (eventName){\n            element.addEventListener(eventName, method, supportsPassive ? { passive: true }:false);\n            methods.push([eventName, method]);\n        });\n        return methods;\n    }\n    // Provide a clean event with standardized offset values.\n    function fixEvent(e, pageOffset, eventTarget){\n        // Filter the event to register the type, which can be\n        // touch, mouse or pointer. Offset changes need to be\n        // made on an event specific basis.\n        var touch=e.type.indexOf("touch")===0;\n        var mouse=e.type.indexOf("mouse")===0;\n        var pointer=e.type.indexOf("pointer")===0;\n        var x=0;\n        var y=0;\n        // IE10 implemented pointer events with a prefix;\n        if(e.type.indexOf("MSPointer")===0){\n            pointer=true;\n        }\n        // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n        // the slider. They appear to be of type MouseEvent, yet they don\'t have usual properties set. Ignore\n        // events that have no touches or buttons associated with them. (#1057, #1079, #1095)\n        if(e.type==="mousedown"&&!e.buttons&&!e.touches){\n            return false;\n        }\n        // The only thing one handle should be concerned about is the touches that originated on top of it.\n        if(touch){\n            // Returns true if a touch originated on the target.\n            var isTouchOnTarget=function (checkTouch){\n                var target=checkTouch.target;\n                return (target===eventTarget||\n                    eventTarget.contains(target)||\n                    (e.composed&&e.composedPath().shift()===eventTarget));\n            };\n            // In the case of touchstart events, we need to make sure there is still no more than one\n            // touch on the target so we look amongst all touches.\n            if(e.type==="touchstart"){\n                var targetTouches=Array.prototype.filter.call(e.touches, isTouchOnTarget);\n                // Do not support more than one touch per handle.\n                if(targetTouches.length > 1){\n                    return false;\n                }\n                x=targetTouches[0].pageX;\n                y=targetTouches[0].pageY;\n            }\n            else {\n                // In the other cases, find on changedTouches is enough.\n                var targetTouch=Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n                // Cancel if the target touch has not moved.\n                if(!targetTouch){\n                    return false;\n                }\n                x=targetTouch.pageX;\n                y=targetTouch.pageY;\n            }\n        }\n        pageOffset=pageOffset||getPageOffset(scope_Document);\n        if(mouse||pointer){\n            x=e.clientX + pageOffset.x;\n            y=e.clientY + pageOffset.y;\n        }\n        e.pageOffset=pageOffset;\n        e.points=[x, y];\n        e.cursor=mouse||pointer; // Fix #435\n        return e;\n    }\n    // Translate a coordinate in the document to a percentage on the slider\n    function calcPointToPercentage(calcPoint){\n        var location=calcPoint - offset(scope_Base, options.ort);\n        var proposal=(location * 100) / baseSize();\n        // Clamp proposal between 0% and 100%\n        // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n        // are used (e.g. contained handles feature)\n        proposal=limit(proposal);\n        return options.dir ? 100 - proposal:proposal;\n    }\n    // Find handle closest to a certain percentage on the slider\n    function getClosestHandle(clickedPosition){\n        var smallestDifference=100;\n        var handleNumber=false;\n        scope_Handles.forEach(function (handle, index){\n            // Disabled handles are ignored\n            if(isHandleDisabled(index)){\n                return;\n            }\n            var handlePosition=scope_Locations[index];\n            var differenceWithThisHandle=Math.abs(handlePosition - clickedPosition);\n            // Initial state\n            var clickAtEdge=differenceWithThisHandle===100&&smallestDifference===100;\n            // Difference with this handle is smaller than the previously checked handle\n            var isCloser=differenceWithThisHandle < smallestDifference;\n            var isCloserAfter=differenceWithThisHandle <=smallestDifference&&clickedPosition > handlePosition;\n            if(isCloser||isCloserAfter||clickAtEdge){\n                handleNumber=index;\n                smallestDifference=differenceWithThisHandle;\n            }\n        });\n        return handleNumber;\n    }\n    // Fire \'end\' when a mouse or pen leaves the document.\n    function documentLeave(event, data){\n        if(event.type==="mouseout"&&\n            event.target.nodeName==="HTML"&&\n            event.relatedTarget===null){\n            eventEnd(event, data);\n        }\n    }\n    // Handle movement on document for handle and range drag.\n    function eventMove(event, data){\n        // Fix #498\n        // Check value of .buttons in \'start\' to work around a bug in IE10 mobile (data.buttonsProperty).\n        // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n        // IE9 has .buttons and .which zero on mousemove.\n        // Firefox breaks the spec MDN defines.\n        if(navigator.appVersion.indexOf("MSIE 9")===-1&&event.buttons===0&&data.buttonsProperty!==0){\n            return eventEnd(event, data);\n        }\n        // Check if we are moving up or down\n        var movement=(options.dir ? -1:1) * (event.calcPoint - data.startCalcPoint);\n        // Convert the movement into a percentage of the slider width/height\n        var proposal=(movement * 100) / data.baseSize;\n        moveHandles(movement > 0, proposal, data.locations, data.handleNumbers, data.connect);\n    }\n    // Unbind move events on document, call callbacks.\n    function eventEnd(event, data){\n        // The handle is no longer active, so remove the class.\n        if(data.handle){\n            removeClass(data.handle, options.cssClasses.active);\n            scope_ActiveHandlesCount -=1;\n        }\n        // Unbind the move and end events, which are added on \'start\'.\n        data.listeners.forEach(function (c){\n            scope_DocumentElement.removeEventListener(c[0], c[1]);\n        });\n        if(scope_ActiveHandlesCount===0){\n            // Remove dragging class.\n            removeClass(scope_Target, options.cssClasses.drag);\n            setZindex();\n            // Remove cursor styles and text-selection events bound to the body.\n            if(event.cursor){\n                scope_Body.style.cursor="";\n                scope_Body.removeEventListener("selectstart", preventDefault);\n            }\n        }\n        if(options.events.smoothSteps){\n            data.handleNumbers.forEach(function (handleNumber){\n                setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);\n            });\n            data.handleNumbers.forEach(function (handleNumber){\n                fireEvent("update", handleNumber);\n            });\n        }\n        data.handleNumbers.forEach(function (handleNumber){\n            fireEvent("change", handleNumber);\n            fireEvent("set", handleNumber);\n            fireEvent("end", handleNumber);\n        });\n    }\n    // Bind move events on document.\n    function eventStart(event, data){\n        // Ignore event if any handle is disabled\n        if(data.handleNumbers.some(isHandleDisabled)){\n            return;\n        }\n        var handle;\n        if(data.handleNumbers.length===1){\n            var handleOrigin=scope_Handles[data.handleNumbers[0]];\n            handle=handleOrigin.children[0];\n            scope_ActiveHandlesCount +=1;\n            // Mark the handle as \'active\' so it can be styled.\n            addClass(handle, options.cssClasses.active);\n        }\n        // A drag should never propagate up to the \'tap\' event.\n        event.stopPropagation();\n        // Record the event listeners.\n        var listeners=[];\n        // Attach the move and end events.\n        var moveEvent=attachEvent(actions.move, scope_DocumentElement, eventMove, {\n            // The event target has changed so we need to propagate the original one so that we keep\n            // relying on it to extract target touches.\n            target: event.target,\n            handle: handle,\n            connect: data.connect,\n            listeners: listeners,\n            startCalcPoint: event.calcPoint,\n            baseSize: baseSize(),\n            pageOffset: event.pageOffset,\n            handleNumbers: data.handleNumbers,\n            buttonsProperty: event.buttons,\n            locations: scope_Locations.slice(),\n        });\n        var endEvent=attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n            target: event.target,\n            handle: handle,\n            listeners: listeners,\n            doNotReject: true,\n            handleNumbers: data.handleNumbers,\n        });\n        var outEvent=attachEvent("mouseout", scope_DocumentElement, documentLeave, {\n            target: event.target,\n            handle: handle,\n            listeners: listeners,\n            doNotReject: true,\n            handleNumbers: data.handleNumbers,\n        });\n        // We want to make sure we pushed the listeners in the listener list rather than creating\n        // a new one as it has already been passed to the event handlers.\n        listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n        // Text selection isn\'t an issue on touch devices,\n        // so adding cursor styles can be skipped.\n        if(event.cursor){\n            // Prevent the \'I\' cursor and extend the range-drag cursor.\n            scope_Body.style.cursor=getComputedStyle(event.target).cursor;\n            // Mark the target with a dragging state.\n            if(scope_Handles.length > 1){\n                addClass(scope_Target, options.cssClasses.drag);\n            }\n            // Prevent text selection when dragging the handles.\n            // In noUiSlider <=9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n            // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n            // meaning the only holdout is iOS Safari. This doesn\'t matter: text selection isn\'t triggered there.\n            // The \'cursor\' flag is false.\n            // See: http://caniuse.com/#search=selectstart\n            scope_Body.addEventListener("selectstart", preventDefault, false);\n        }\n        data.handleNumbers.forEach(function (handleNumber){\n            fireEvent("start", handleNumber);\n        });\n    }\n    // Move closest handle to tapped location.\n    function eventTap(event){\n        // The tap event shouldn\'t propagate up\n        event.stopPropagation();\n        var proposal=calcPointToPercentage(event.calcPoint);\n        var handleNumber=getClosestHandle(proposal);\n        // Tackle the case that all handles are \'disabled\'.\n        if(handleNumber===false){\n            return;\n        }\n        // Flag the slider as it is now in a transitional state.\n        // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n        if(!options.events.snap){\n            addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n        }\n        setHandle(handleNumber, proposal, true, true);\n        setZindex();\n        fireEvent("slide", handleNumber, true);\n        fireEvent("update", handleNumber, true);\n        if(!options.events.snap){\n            fireEvent("change", handleNumber, true);\n            fireEvent("set", handleNumber, true);\n        }\n        else {\n            eventStart(event, { handleNumbers: [handleNumber] });\n        }\n    }\n    // Fires a \'hover\' event for a hovered mouse/pen position.\n    function eventHover(event){\n        var proposal=calcPointToPercentage(event.calcPoint);\n        var to=scope_Spectrum.getStep(proposal);\n        var value=scope_Spectrum.fromStepping(to);\n        Object.keys(scope_Events).forEach(function (targetEvent){\n            if("hover"===targetEvent.split(".")[0]){\n                scope_Events[targetEvent].forEach(function (callback){\n                    callback.call(scope_Self, value);\n                });\n            }\n        });\n    }\n    // Handles keydown on focused handles\n    // Don\'t move the document when pressing arrow keys on focused handles\n    function eventKeydown(event, handleNumber){\n        if(isSliderDisabled()||isHandleDisabled(handleNumber)){\n            return false;\n        }\n        var horizontalKeys=["Left", "Right"];\n        var verticalKeys=["Down", "Up"];\n        var largeStepKeys=["PageDown", "PageUp"];\n        var edgeKeys=["Home", "End"];\n        if(options.dir&&!options.ort){\n            // On an right-to-left slider, the left and right keys act inverted\n            horizontalKeys.reverse();\n        }\n        else if(options.ort&&!options.dir){\n            // On a top-to-bottom slider, the up and down keys act inverted\n            verticalKeys.reverse();\n            largeStepKeys.reverse();\n        }\n        // Strip "Arrow" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n        var key=event.key.replace("Arrow", "");\n        var isLargeDown=key===largeStepKeys[0];\n        var isLargeUp=key===largeStepKeys[1];\n        var isDown=key===verticalKeys[0]||key===horizontalKeys[0]||isLargeDown;\n        var isUp=key===verticalKeys[1]||key===horizontalKeys[1]||isLargeUp;\n        var isMin=key===edgeKeys[0];\n        var isMax=key===edgeKeys[1];\n        if(!isDown&&!isUp&&!isMin&&!isMax){\n            return true;\n        }\n        event.preventDefault();\n        var to;\n        if(isUp||isDown){\n            var direction=isDown ? 0:1;\n            var steps=getNextStepsForHandle(handleNumber);\n            var step=steps[direction];\n            // At the edge of a slider, do nothing\n            if(step===null){\n                return false;\n            }\n            // No step set, use the default of 10% of the sub-range\n            if(step===false){\n                step=scope_Spectrum.getDefaultStep(scope_Locations[handleNumber], isDown, options.keyboardDefaultStep);\n            }\n            if(isLargeUp||isLargeDown){\n                step *=options.keyboardPageMultiplier;\n            }\n            else {\n                step *=options.keyboardMultiplier;\n            }\n            // Step over zero-length ranges (#948);\n            step=Math.max(step, 0.0000001);\n            // Decrement for down steps\n            step=(isDown ? -1:1) * step;\n            to=scope_Values[handleNumber] + step;\n        }\n        else if(isMax){\n            // End key\n            to=options.spectrum.xVal[options.spectrum.xVal.length - 1];\n        }\n        else {\n            // Home key\n            to=options.spectrum.xVal[0];\n        }\n        setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n        fireEvent("slide", handleNumber);\n        fireEvent("update", handleNumber);\n        fireEvent("change", handleNumber);\n        fireEvent("set", handleNumber);\n        return false;\n    }\n    // Attach events to several slider parts.\n    function bindSliderEvents(behaviour){\n        // Attach the standard drag event to the handles.\n        if(!behaviour.fixed){\n            scope_Handles.forEach(function (handle, index){\n                // These events are only bound to the visual handle\n                // element, not the \'real\' origin element.\n                attachEvent(actions.start, handle.children[0], eventStart, {\n                    handleNumbers: [index],\n                });\n            });\n        }\n        // Attach the tap event to the slider base.\n        if(behaviour.tap){\n            attachEvent(actions.start, scope_Base, eventTap, {});\n        }\n        // Fire hover events\n        if(behaviour.hover){\n            attachEvent(actions.move, scope_Base, eventHover, {\n                hover: true,\n            });\n        }\n        // Make the range draggable.\n        if(behaviour.drag){\n            scope_Connects.forEach(function (connect, index){\n                if(connect===false||index===0||index===scope_Connects.length - 1){\n                    return;\n                }\n                var handleBefore=scope_Handles[index - 1];\n                var handleAfter=scope_Handles[index];\n                var eventHolders=[connect];\n                var handlesToDrag=[handleBefore, handleAfter];\n                var handleNumbersToDrag=[index - 1, index];\n                addClass(connect, options.cssClasses.draggable);\n                // When the range is fixed, the entire range can\n                // be dragged by the handles. The handle in the first\n                // origin will propagate the start event upward,\n                // but it needs to be bound manually on the other.\n                if(behaviour.fixed){\n                    eventHolders.push(handleBefore.children[0]);\n                    eventHolders.push(handleAfter.children[0]);\n                }\n                if(behaviour.dragAll){\n                    handlesToDrag=scope_Handles;\n                    handleNumbersToDrag=scope_HandleNumbers;\n                }\n                eventHolders.forEach(function (eventHolder){\n                    attachEvent(actions.start, eventHolder, eventStart, {\n                        handles: handlesToDrag,\n                        handleNumbers: handleNumbersToDrag,\n                        connect: connect,\n                    });\n                });\n            });\n        }\n    }\n    // Attach an event to this slider, possibly including a namespace\n    function bindEvent(namespacedEvent, callback){\n        scope_Events[namespacedEvent]=scope_Events[namespacedEvent]||[];\n        scope_Events[namespacedEvent].push(callback);\n        // If the event bound is \'update,\' fire it immediately for all handles.\n        if(namespacedEvent.split(".")[0]==="update"){\n            scope_Handles.forEach(function (a, index){\n                fireEvent("update", index);\n            });\n        }\n    }\n    function isInternalNamespace(namespace){\n        return namespace===INTERNAL_EVENT_NS.aria||namespace===INTERNAL_EVENT_NS.tooltips;\n    }\n    // Undo attachment of event\n    function removeEvent(namespacedEvent){\n        var event=namespacedEvent&&namespacedEvent.split(".")[0];\n        var namespace=event ? namespacedEvent.substring(event.length):namespacedEvent;\n        Object.keys(scope_Events).forEach(function (bind){\n            var tEvent=bind.split(".")[0];\n            var tNamespace=bind.substring(tEvent.length);\n            if((!event||event===tEvent)&&(!namespace||namespace===tNamespace)){\n                // only delete protected internal event if intentional\n                if(!isInternalNamespace(tNamespace)||namespace===tNamespace){\n                    delete scope_Events[bind];\n                }\n            }\n        });\n    }\n    // External event handling\n    function fireEvent(eventName, handleNumber, tap){\n        Object.keys(scope_Events).forEach(function (targetEvent){\n            var eventType=targetEvent.split(".")[0];\n            if(eventName===eventType){\n                scope_Events[targetEvent].forEach(function (callback){\n                    callback.call(\n                    // Use the slider public API as the scope (\'this\')\n                    scope_Self, \n                    // Return values as array, so arg_1[arg_2] is always valid.\n                    scope_Values.map(options.format.to), \n                    // Handle index, 0 or 1\n                    handleNumber, \n                    // Un-formatted slider values\n                    scope_Values.slice(), \n                    // Event is fired by tap, true or false\n                    tap||false, \n                    // Left offset of the handle, in relation to the slider\n                    scope_Locations.slice(), \n                    // add the slider public API to an accessible parameter when this is unavailable\n                    scope_Self);\n                });\n            }\n        });\n    }\n    // Split out the handle positioning logic so the Move event can use it, too\n    function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue, smoothSteps){\n        var distance;\n        // For sliders with multiple handles, limit movement to the other handle.\n        // Apply the margin option by adding it to the handle positions.\n        if(scope_Handles.length > 1&&!options.events.unconstrained){\n            if(lookBackward&&handleNumber > 0){\n                distance=scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, false);\n                to=Math.max(to, distance);\n            }\n            if(lookForward&&handleNumber < scope_Handles.length - 1){\n                distance=scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, true);\n                to=Math.min(to, distance);\n            }\n        }\n        // The limit option has the opposite effect, limiting handles to a\n        // maximum distance from another. Limit must be > 0, as otherwise\n        // handles would be unmovable.\n        if(scope_Handles.length > 1&&options.limit){\n            if(lookBackward&&handleNumber > 0){\n                distance=scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, false);\n                to=Math.min(to, distance);\n            }\n            if(lookForward&&handleNumber < scope_Handles.length - 1){\n                distance=scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, true);\n                to=Math.max(to, distance);\n            }\n        }\n        // The padding option keeps the handles a certain distance from the\n        // edges of the slider. Padding must be > 0.\n        if(options.padding){\n            if(handleNumber===0){\n                distance=scope_Spectrum.getAbsoluteDistance(0, options.padding[0], false);\n                to=Math.max(to, distance);\n            }\n            if(handleNumber===scope_Handles.length - 1){\n                distance=scope_Spectrum.getAbsoluteDistance(100, options.padding[1], true);\n                to=Math.min(to, distance);\n            }\n        }\n        if(!smoothSteps){\n            to=scope_Spectrum.getStep(to);\n        }\n        // Limit percentage to the 0 - 100 range\n        to=limit(to);\n        // Return false if handle can\'t move\n        if(to===reference[handleNumber]&&!getValue){\n            return false;\n        }\n        return to;\n    }\n    // Uses slider orientation to create CSS rules. a=base value;\n    function inRuleOrder(v, a){\n        var o=options.ort;\n        return (o ? a:v) + ", " + (o ? v:a);\n    }\n    // Moves handle(s) by a percentage\n    // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n    function moveHandles(upward, proposal, locations, handleNumbers, connect){\n        var proposals=locations.slice();\n        // Store first handle now, so we still have it in case handleNumbers is reversed\n        var firstHandle=handleNumbers[0];\n        var smoothSteps=options.events.smoothSteps;\n        var b=[!upward, upward];\n        var f=[upward, !upward];\n        // Copy handleNumbers so we don\'t change the dataset\n        handleNumbers=handleNumbers.slice();\n        // Check to see which handle is \'leading\'.\n        // If that one can\'t move the second can\'t either.\n        if(upward){\n            handleNumbers.reverse();\n        }\n        // Step 1: get the maximum percentage that any of the handles can move\n        if(handleNumbers.length > 1){\n            handleNumbers.forEach(function (handleNumber, o){\n                var to=checkHandlePosition(proposals, handleNumber, proposals[handleNumber] + proposal, b[o], f[o], false, smoothSteps);\n                // Stop if one of the handles can\'t move.\n                if(to===false){\n                    proposal=0;\n                }\n                else {\n                    proposal=to - proposals[handleNumber];\n                    proposals[handleNumber]=to;\n                }\n            });\n        }\n        // If using one handle, check backward AND forward\n        else {\n            b=f = [true];\n        }\n        var state=false;\n        // Step 2: Try to set the handles with the found percentage\n        handleNumbers.forEach(function (handleNumber, o){\n            state=\n                setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o], false, smoothSteps)||state;\n        });\n        // Step 3: If a handle moved, fire events\n        if(state){\n            handleNumbers.forEach(function (handleNumber){\n                fireEvent("update", handleNumber);\n                fireEvent("slide", handleNumber);\n            });\n            // If target is a connect, then fire drag event\n            if(connect!=undefined){\n                fireEvent("drag", firstHandle);\n            }\n        }\n    }\n    // Takes a base value and an offset. This offset is used for the connect bar size.\n    // In the initial design for this feature, the origin element was 1% wide.\n    // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n    // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n    function transformDirection(a, b){\n        return options.dir ? 100 - a - b:a;\n    }\n    // Updates scope_Locations and scope_Values, updates visual state\n    function updateHandlePosition(handleNumber, to){\n        // Update locations.\n        scope_Locations[handleNumber]=to;\n        // Convert the value to the slider stepping/range.\n        scope_Values[handleNumber]=scope_Spectrum.fromStepping(to);\n        var translation=transformDirection(to, 0) - scope_DirOffset;\n        var translateRule="translate(" + inRuleOrder(translation + "%", "0") + ")";\n        scope_Handles[handleNumber].style[options.transformRule]=translateRule;\n        updateConnect(handleNumber);\n        updateConnect(handleNumber + 1);\n    }\n    // Handles before the slider middle are stacked later=higher,\n    // Handles after the middle later is lower\n    // [[7] [8] .......... | .......... [5] [4]\n    function setZindex(){\n        scope_HandleNumbers.forEach(function (handleNumber){\n            var dir=scope_Locations[handleNumber] > 50 ? -1:1;\n            var zIndex=3 + (scope_Handles.length + dir * handleNumber);\n            scope_Handles[handleNumber].style.zIndex=String(zIndex);\n        });\n    }\n    // Test suggested values and apply margin, step.\n    // if exactInput is true, don\'t run checkHandlePosition, then the handle can be placed in between steps (#436)\n    function setHandle(handleNumber, to, lookBackward, lookForward, exactInput, smoothSteps){\n        if(!exactInput){\n            to=checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false, smoothSteps);\n        }\n        if(to===false){\n            return false;\n        }\n        updateHandlePosition(handleNumber, to);\n        return true;\n    }\n    // Updates style attribute for connect nodes\n    function updateConnect(index){\n        // Skip connects set to false\n        if(!scope_Connects[index]){\n            return;\n        }\n        var l=0;\n        var h=100;\n        if(index!==0){\n            l=scope_Locations[index - 1];\n        }\n        if(index!==scope_Connects.length - 1){\n            h=scope_Locations[index];\n        }\n        // We use two rules:\n        // \'translate\' to change the left/top offset;\n        // \'scale\' to change the width of the element;\n        // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n        var connectWidth=h - l;\n        var translateRule="translate(" + inRuleOrder(transformDirection(l, connectWidth) + "%", "0") + ")";\n        var scaleRule="scale(" + inRuleOrder(connectWidth / 100, "1") + ")";\n        scope_Connects[index].style[options.transformRule]=\n            translateRule + " " + scaleRule;\n    }\n    // Parses value passed to .set method. Returns current value if not parse-able.\n    function resolveToValue(to, handleNumber){\n        // Setting with null indicates an \'ignore\'.\n        // Inputting \'false\' is invalid.\n        if(to===null||to===false||to===undefined){\n            return scope_Locations[handleNumber];\n        }\n        // If a formatted number was passed, attempt to decode it.\n        if(typeof to==="number"){\n            to=String(to);\n        }\n        to=options.format.from(to);\n        if(to!==false){\n            to=scope_Spectrum.toStepping(to);\n        }\n        // If parsing the number failed, use the current value.\n        if(to===false||isNaN(to)){\n            return scope_Locations[handleNumber];\n        }\n        return to;\n    }\n    // Set the slider value.\n    function valueSet(input, fireSetEvent, exactInput){\n        var values=asArray(input);\n        var isInit=scope_Locations[0]===undefined;\n        // Event fires by default\n        fireSetEvent=fireSetEvent===undefined ? true:fireSetEvent;\n        // Animation is optional.\n        // Make sure the initial values were set before using animated placement.\n        if(options.animate&&!isInit){\n            addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n        }\n        // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n        scope_HandleNumbers.forEach(function (handleNumber){\n            setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false, exactInput);\n        });\n        var i=scope_HandleNumbers.length===1 ? 0:1;\n        // Spread handles evenly across the slider if the range has no size (min=max)\n        if(isInit&&scope_Spectrum.hasNoSize()){\n            exactInput=true;\n            scope_Locations[0]=0;\n            if(scope_HandleNumbers.length > 1){\n                var space_1=100 / (scope_HandleNumbers.length - 1);\n                scope_HandleNumbers.forEach(function (handleNumber){\n                    scope_Locations[handleNumber]=handleNumber * space_1;\n                });\n            }\n        }\n        // Secondary passes. Now that all base values are set, apply constraints.\n        // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n        for (; i < scope_HandleNumbers.length; ++i){\n            scope_HandleNumbers.forEach(function (handleNumber){\n                setHandle(handleNumber, scope_Locations[handleNumber], true, true, exactInput);\n            });\n        }\n        setZindex();\n        scope_HandleNumbers.forEach(function (handleNumber){\n            fireEvent("update", handleNumber);\n            // Fire the event only for handles that received a new value, as per #579\n            if(values[handleNumber]!==null&&fireSetEvent){\n                fireEvent("set", handleNumber);\n            }\n        });\n    }\n    // Reset slider to initial values\n    function valueReset(fireSetEvent){\n        valueSet(options.start, fireSetEvent);\n    }\n    // Set value for a single handle\n    function valueSetHandle(handleNumber, value, fireSetEvent, exactInput){\n        // Ensure numeric input\n        handleNumber=Number(handleNumber);\n        if(!(handleNumber >=0&&handleNumber < scope_HandleNumbers.length)){\n            throw new Error("noUiSlider: invalid handle number, got: " + handleNumber);\n        }\n        // Look both backward and forward, since we don\'t want this handle to "push" other handles (#960);\n        // The exactInput argument can be used to ignore slider stepping (#436)\n        setHandle(handleNumber, resolveToValue(value, handleNumber), true, true, exactInput);\n        fireEvent("update", handleNumber);\n        if(fireSetEvent){\n            fireEvent("set", handleNumber);\n        }\n    }\n    // Get the slider value.\n    function valueGet(unencoded){\n        if(unencoded===void 0){ unencoded=false; }\n        if(unencoded){\n            // return a copy of the raw values\n            return scope_Values.length===1 ? scope_Values[0]:scope_Values.slice(0);\n        }\n        var values=scope_Values.map(options.format.to);\n        // If only one handle is used, return a single value.\n        if(values.length===1){\n            return values[0];\n        }\n        return values;\n    }\n    // Removes classes from the root and empties it.\n    function destroy(){\n        // remove protected internal listeners\n        removeEvent(INTERNAL_EVENT_NS.aria);\n        removeEvent(INTERNAL_EVENT_NS.tooltips);\n        Object.keys(options.cssClasses).forEach(function (key){\n            removeClass(scope_Target, options.cssClasses[key]);\n        });\n        while (scope_Target.firstChild){\n            scope_Target.removeChild(scope_Target.firstChild);\n        }\n        delete scope_Target.noUiSlider;\n    }\n    function getNextStepsForHandle(handleNumber){\n        var location=scope_Locations[handleNumber];\n        var nearbySteps=scope_Spectrum.getNearbySteps(location);\n        var value=scope_Values[handleNumber];\n        var increment=nearbySteps.thisStep.step;\n        var decrement=null;\n        // If snapped, directly use defined step value\n        if(options.snap){\n            return [\n                value - nearbySteps.stepBefore.startValue||null,\n                nearbySteps.stepAfter.startValue - value||null,\n            ];\n        }\n        // If the next value in this step moves into the next step,\n        // the increment is the start of the next step - the current value\n        if(increment!==false){\n            if(value + increment > nearbySteps.stepAfter.startValue){\n                increment=nearbySteps.stepAfter.startValue - value;\n            }\n        }\n        // If the value is beyond the starting point\n        if(value > nearbySteps.thisStep.startValue){\n            decrement=nearbySteps.thisStep.step;\n        }\n        else if(nearbySteps.stepBefore.step===false){\n            decrement=false;\n        }\n        // If a handle is at the start of a step, it always steps back into the previous step first\n        else {\n            decrement=value - nearbySteps.stepBefore.highestStep;\n        }\n        // Now, if at the slider edges, there is no in/decrement\n        if(location===100){\n            increment=null;\n        }\n        else if(location===0){\n            decrement=null;\n        }\n        // As per #391, the comparison for the decrement step can have some rounding issues.\n        var stepDecimals=scope_Spectrum.countStepDecimals();\n        // Round per #391\n        if(increment!==null&&increment!==false){\n            increment=Number(increment.toFixed(stepDecimals));\n        }\n        if(decrement!==null&&decrement!==false){\n            decrement=Number(decrement.toFixed(stepDecimals));\n        }\n        return [decrement, increment];\n    }\n    // Get the current step size for the slider.\n    function getNextSteps(){\n        return scope_HandleNumbers.map(getNextStepsForHandle);\n    }\n    // Updatable: margin, limit, padding, step, range, animate, snap\n    function updateOptions(optionsToUpdate, fireSetEvent){\n        // Spectrum is created using the range, snap, direction and step options.\n        // \'snap\' and \'step\' can be updated.\n        // If \'snap\' and \'step\' are not passed, they should remain unchanged.\n        var v=valueGet();\n        var updateAble=[\n            "margin",\n            "limit",\n            "padding",\n            "range",\n            "animate",\n            "snap",\n            "step",\n            "format",\n            "pips",\n            "tooltips",\n        ];\n        // Only change options that we\'re actually passed to update.\n        updateAble.forEach(function (name){\n            // Check for undefined. null removes the value.\n            if(optionsToUpdate[name]!==undefined){\n                originalOptions[name]=optionsToUpdate[name];\n            }\n        });\n        var newOptions=testOptions(originalOptions);\n        // Load new options into the slider state\n        updateAble.forEach(function (name){\n            if(optionsToUpdate[name]!==undefined){\n                options[name]=newOptions[name];\n            }\n        });\n        scope_Spectrum=newOptions.spectrum;\n        // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n        options.margin=newOptions.margin;\n        options.limit=newOptions.limit;\n        options.padding=newOptions.padding;\n        // Update pips, removes existing.\n        if(options.pips){\n            pips(options.pips);\n        }\n        else {\n            removePips();\n        }\n        // Update tooltips, removes existing.\n        if(options.tooltips){\n            tooltips();\n        }\n        else {\n            removeTooltips();\n        }\n        // Invalidate the current positioning so valueSet forces an update.\n        scope_Locations=[];\n        valueSet(isSet(optionsToUpdate.start) ? optionsToUpdate.start:v, fireSetEvent);\n    }\n    // Initialization steps\n    function setupSlider(){\n        // Create the base element, initialize HTML and set classes.\n        // Add handles and connect elements.\n        scope_Base=addSlider(scope_Target);\n        addElements(options.connect, scope_Base);\n        // Attach user events.\n        bindSliderEvents(options.events);\n        // Use the public value method to set the start values.\n        valueSet(options.start);\n        if(options.pips){\n            pips(options.pips);\n        }\n        if(options.tooltips){\n            tooltips();\n        }\n        aria();\n    }\n    setupSlider();\n    var scope_Self={\n        destroy: destroy,\n        steps: getNextSteps,\n        on: bindEvent,\n        off: removeEvent,\n        get: valueGet,\n        set: valueSet,\n        setHandle: valueSetHandle,\n        reset: valueReset,\n        disable: disable,\n        enable: enable,\n        // Exposed for unit testing, don\'t use this in your application.\n        __moveHandles: function (upward, proposal, handleNumbers){\n            moveHandles(upward, proposal, scope_Locations, handleNumbers);\n        },\n        options: originalOptions,\n        updateOptions: updateOptions,\n        target: scope_Target,\n        removePips: removePips,\n        removeTooltips: removeTooltips,\n        getPositions: function (){\n            return scope_Locations.slice();\n        },\n        getTooltips: function (){\n            return scope_Tooltips;\n        },\n        getOrigins: function (){\n            return scope_Handles;\n        },\n        pips: pips, // Issue #594\n    };\n    return scope_Self;\n}\n// Run the standard initializer\nfunction initialize(target, originalOptions){\n    if(!target||!target.nodeName){\n        throw new Error("noUiSlider: create requires a single element, got: " + target);\n    }\n    // Throw an error if the slider was already initialized.\n    if(target.noUiSlider){\n        throw new Error("noUiSlider: Slider was already initialized.");\n    }\n    // Test the options and create the slider environment;\n    var options=testOptions(originalOptions);\n    var api=scope(target, options, originalOptions);\n    target.noUiSlider=api;\n    return api;\n}\n\n\n/* harmony default export */ __webpack_exports__["default"]=({\n    // Exposed for unit testing, don\'t use this in your application.\n    __spectrum: Spectrum,\n    // A reference to the default classes, allows global changes.\n    // Use the cssClasses option for changes to one slider.\n    cssClasses: cssClasses,\n    create: initialize,\n});\n\n\n//# sourceURL=webpack://startHtml/./node_modules/nouislider/dist/nouislider.mjs?')}},__webpack_module_cache__={};function __webpack_require__(n){var e=__webpack_module_cache__[n];if(void 0!==e)return e.exports;var t=__webpack_module_cache__[n]={exports:{}};return __webpack_modules__[n](t,t.exports,__webpack_require__),t.exports}__webpack_require__.d=function(n,e){for(var t in e)__webpack_require__.o(e,t)&&!__webpack_require__.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},__webpack_require__.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},__webpack_require__.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__("./dev/src/js/app.js")})();
(function(factory){
"use strict";
if(typeof define==="function"&&define.amd){
define([ "jquery" ], factory);
}else{
factory(jQuery);
}})(function($){
"use strict";
var instances=[], matchers=[], defaultOptions={
precision: 100,
elapse: false,
defer: false
};
matchers.push(/^[0-9]*$/.source);
matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}([0-9]{1,2}(:[0-9]{2}){2})?/.source);
matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}([0-9]{1,2}(:[0-9]{2}){2})?/.source);
matchers=new RegExp(matchers.join("|"));
function parseDateString(dateString){
if(dateString instanceof Date){
return dateString;
}
if(String(dateString).match(matchers)){
if(String(dateString).match(/^[0-9]*$/)){
dateString=Number(dateString);
}
if(String(dateString).match(/\-/)){
dateString=String(dateString).replace(/\-/g, "/");
}
return new Date(dateString);
}else{
throw new Error("Couldn't cast `" + dateString + "` to a date object.");
}}
var DIRECTIVE_KEY_MAP={
Y: "years",
m: "months",
n: "daysToMonth",
d: "daysToWeek",
w: "weeks",
W: "weeksToMonth",
H: "hours",
M: "minutes",
S: "seconds",
D: "totalDays",
I: "totalHours",
N: "totalMinutes",
T: "totalSeconds"
};
function escapedRegExp(str){
var sanitize=str.toString().replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
return new RegExp(sanitize);
}
function strftime(offsetObject){
return function(format){
var directives=format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);
if(directives){
for (var i=0, len=directives.length; i < len; ++i){
var directive=directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp=escapedRegExp(directive[0]), modifier=directive[1]||"", plural=directive[3]||"", value=null;
directive=directive[2];
if(DIRECTIVE_KEY_MAP.hasOwnProperty(directive)){
value=DIRECTIVE_KEY_MAP[directive];
value=Number(offsetObject[value]);
}
if(value!==null){
if(modifier==="!"){
value=pluralize(plural, value);
}
if(modifier===""){
if(value < 10){
value="0" + value.toString();
}}
format=format.replace(regexp, value.toString());
}}
}
format=format.replace(/%%/, "%");
return format;
};}
function pluralize(format, count){
var plural="s", singular="";
if(format){
format=format.replace(/(:|;|\s)/gi, "").split(/\,/);
if(format.length===1){
plural=format[0];
}else{
singular=format[0];
plural=format[1];
}}
if(Math.abs(count) > 1){
return plural;
}else{
return singular;
}}
var Countdown=function(el, finalDate, options){
this.el=el;
this.$el=$(el);
this.interval=null;
this.offset={};
this.options=$.extend({}, defaultOptions);
this.firstTick=true;
this.instanceNumber=instances.length;
instances.push(this);
this.$el.data("countdown-instance", this.instanceNumber);
if(options){
if(typeof options==="function"){
this.$el.on("update.countdown", options);
this.$el.on("stoped.countdown", options);
this.$el.on("finish.countdown", options);
}else{
this.options=$.extend({}, defaultOptions, options);
}}
this.setFinalDate(finalDate);
if(this.options.defer===false){
this.start();
}};
$.extend(Countdown.prototype, {
start: function(){
if(this.interval!==null){
clearInterval(this.interval);
}
var self=this;
this.update();
this.interval=setInterval(function(){
self.update.call(self);
}, this.options.precision);
},
stop: function(){
clearInterval(this.interval);
this.interval=null;
this.dispatchEvent("stoped");
},
toggle: function(){
if(this.interval){
this.stop();
}else{
this.start();
}},
pause: function(){
this.stop();
},
resume: function(){
this.start();
},
remove: function(){
this.stop.call(this);
instances[this.instanceNumber]=null;
delete this.$el.data().countdownInstance;
},
setFinalDate: function(value){
this.finalDate=parseDateString(value);
},
update: function(){
if(this.$el.closest("html").length===0){
this.remove();
return;
}
var now=new Date(), newTotalSecsLeft;
newTotalSecsLeft=this.finalDate.getTime() - now.getTime();
newTotalSecsLeft=Math.ceil(newTotalSecsLeft / 1e3);
newTotalSecsLeft = !this.options.elapse&&newTotalSecsLeft < 0 ? 0:Math.abs(newTotalSecsLeft);
if(this.totalSecsLeft===newTotalSecsLeft||this.firstTick){
this.firstTick=false;
return;
}else{
this.totalSecsLeft=newTotalSecsLeft;
}
this.elapsed=now >=this.finalDate;
this.offset={
seconds: this.totalSecsLeft % 60,
minutes: Math.floor(this.totalSecsLeft / 60) % 60,
hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24,
days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToWeek: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7,
daysToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 % 30.4368),
weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7),
weeksToMonth: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7) % 4,
months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30.4368),
years: Math.abs(this.finalDate.getFullYear() - now.getFullYear()),
totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24),
totalHours: Math.floor(this.totalSecsLeft / 60 / 60),
totalMinutes: Math.floor(this.totalSecsLeft / 60),
totalSeconds: this.totalSecsLeft
};
if(!this.options.elapse&&this.totalSecsLeft===0){
this.stop();
this.dispatchEvent("finish");
}else{
this.dispatchEvent("update");
}},
dispatchEvent: function(eventName){
var event=$.Event(eventName + ".countdown");
event.finalDate=this.finalDate;
event.elapsed=this.elapsed;
event.offset=$.extend({}, this.offset);
event.strftime=strftime(this.offset);
this.$el.trigger(event);
}});
$.fn.countdown=function(){
var argumentsArray=Array.prototype.slice.call(arguments, 0);
return this.each(function(){
var instanceNumber=$(this).data("countdown-instance");
if(instanceNumber!==undefined){
var instance=instances[instanceNumber], method=argumentsArray[0];
if(Countdown.prototype.hasOwnProperty(method)){
instance[method].apply(instance, argumentsArray.slice(1));
}else if(String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i)===null){
instance.setFinalDate.call(instance, method);
instance.start();
}else{
$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method));
}}else{
new Countdown(this, argumentsArray[0], argumentsArray[1]);
}});
};});
jQuery(document).ready(function ($){
$('.bomb').addClass('animate');
setTimeout(function (){
$('.e-wave:eq(0)').fadeIn(250, function (){
$(this).next().fadeIn(250, arguments.callee).addClass('show');
}).addClass('show');
}, 800);
setTimeout(function (){
$('.rocket-img').addClass('go');
}, 2000);
setTimeout(function (){
$('.rocket-img').removeClass('go');
}, 6000);
$('.btn.animate').prepend('<p class="flare"><span></span></p>');
setPosFlare();
var window_is_mobile=true;
$(window).resize(replace_marquee);
function replace_marquee(){
if(window.screen.width >=992&&window_is_mobile===true){
$('.replace_marquee').each(function(){
$this=$(this);
$text=$this.find('span').eq(0).text();
$html='<marquee direction="'+$this.data('direction')+'" scrollamount="'+$this.data('scrollamount')+'" loop="'+$this.data('loop')+'">';
$count=parseInt($this.data('count_replace'));
for (n=0; n < $count; n++){
$html +='<span>'+$text+'</span>';
}
$html +='</marquee>';
$this.html($html);
});
window_is_mobile=false;
}else if(window.screen.width < 992&&window_is_mobile===false){
$('.replace_marquee').each(function(){
$this=$(this);
$text=$this.find('span').eq(0).text();
$this.html('<span>'+$text+'</span>');
});
window_is_mobile=true;
}}
replace_marquee();
/*
$(window).on("load",function(){
if(window.innerWidth > 991){
$("body").mCustomScrollbar({
theme:"minimal",
autoHideScrollbar: false,
mouseWheel:{ scrollAmount: 350, preventDefault: true},
keyboard:{ enable: true },
documentTouchScroll: true,
callbacks:{
whileScrolling: function(){
scrollAnimateEl();
}}
});
}});
*/
$(window).on('scroll', function (){
if($('.restrict-list').length){
var $element=$('.restrict-list');
let counter=0;
var scroll=$(window).scrollTop() + $(window).height();
var offset=$element.offset().top + 200;
if(scroll > offset&&counter==0){
$('.restrict-list').addClass('animate');
counter=1;
}}
;
});
if($('.swiper_reviews').length){
const swiper=new Swiper('.swiper_reviews', {
speed: 400,
height: "auto",
pagination: {
el: '.reviews-pagination',
},
breakpoints: {
320: {slidesPerView: 1, spaceBetween: 16},
768: {slidesPerView: 2, spaceBetween: 16},
992: {slidesPerView: 3, spaceBetween: 24},
1400: {slidesPerView: 3, spaceBetween: 40}}
});
}
if($('.team .swiper').length){
const swiper=new Swiper('.team .swiper', {
speed: 400,
loop: true,
autoplay: {
delay: 2000,
},
breakpoints: {
768: {slidesPerView: 2, spaceBetween: 16},
992: {slidesPerView: 3, spaceBetween: 24},
1400: {slidesPerView: 4, spaceBetween: 40}}
});
}
var sla=document.querySelectorAll('.section-last-articles');
if(sla.length){
sla.forEach((block)=> {
const swiper2=new Swiper(block.querySelector('.last_articles'), {
speed: 400,
navigation: {
nextEl: block.querySelector('.swiper-next'),
prevEl: block.querySelector('.swiper-prev'),
},
breakpoints: {
290: {slidesPerView: 1.1, spaceBetween: 10, slidesPerGroup: 1},
480: {slidesPerView: 1.3, spaceBetween: 10, slidesPerGroup: 1},
576: {slidesPerView: 1.5, spaceBetween: 10, slidesPerGroup: 1},
768: {slidesPerView: 1.6, spaceBetween: 30, slidesPerGroup: 1},
992: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1}}
});
});
}
if($('.video-lessons').length){
const swiper3=new Swiper('.video-lessons', {
speed: 400,
pagination: {
el: '.lessons-pagination',
clickable: true
},
breakpoints: {
290: {slidesPerView: 1, spaceBetween: 10, slidesPerGroup: 1},
480: {slidesPerView: 1, spaceBetween: 15, slidesPerGroup: 1},
640: {slidesPerView: 2, spaceBetween: 20, slidesPerGroup: 1},
992: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 4, spaceBetween: 20, slidesPerGroup: 1},
1400: {slidesPerView: 5, spaceBetween: 20, slidesPerGroup: 1}}
});
}
if(window.innerWidth < 992){
if($('.swiper_tarif').length){
const swiper4=new Swiper('.swiper_tarif', {
speed: 400,
pagination: {
el: '.tarif-pagination',
},
breakpoints: {
290: {slidesPerView: 1.1, spaceBetween: 10, slidesPerGroup: 1},
576: {slidesPerView: 1.3, spaceBetween: 10, slidesPerGroup: 1},
768: {slidesPerView: 1.4, spaceBetween: 30, slidesPerGroup: 1},
992: {slidesPerView: 4, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 5, spaceBetween: 20, slidesPerGroup: 1}}
});
swiper4.slideTo(1);
}
if($('.swiper-seoarticles').length){
const swiper5=new Swiper('.swiper-seoarticles', {
speed: 400,
breakpoints: {
290: {slidesPerView: 1.1, spaceBetween: 10, slidesPerGroup: 1},
480: {slidesPerView: 1.5, spaceBetween: 10, slidesPerGroup: 1},
768: {slidesPerView: 2, spaceBetween: 30, slidesPerGroup: 1},
992: {slidesPerView: 4, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 5, spaceBetween: 20, slidesPerGroup: 1}}
});
}}
$(".menu_toggle").on("click", function (){
$(this).toggleClass("active");
$(".header-nav").toggleClass("active");
});
/*$('ul#menu-glavnoe li.menu-item-has-children > a').click(function(e){
if($(window).width() < 992){
e.preventDefault();
e.stopPropagation();
$(this).parent().toggleClass('active');
}});*/
$(document).on('click', 'ul#menu-glavnoe li.menu-item-has-children, ul#menu-glavnoe-2 li.menu-item-has-children, ul#menu-top-menu-1 li.menu-item-has-children', function(e){
if($(window).width() < 1140){
e.stopPropagation();
$(this).toggleClass('active');
}});
$("header .search--wrap button").on("click", function (e){
if(window.innerWidth < 992){
e.preventDefault();
$(".search--wrap").addClass("show");
}});
$(document).mouseup(function (e){
var div=$('header .search--wrap input');
var searchwrap=$('.search--wrap');
if(!div.is(e.target)
&& div.has(e.target).length===0){
searchwrap.removeClass('show');
}});
$('.inner-faq_item').click(function (){
var text=$(this).find('.text');
if($(this).hasClass('active')){
$(text).slideUp();
$(this).removeClass('active');
}else{
$(text).slideDown();
$(this).addClass('active');
}});
$(window).on('scroll', function (){
if($(this).scrollTop()){
$('body').addClass('scrolled');
}else{
$('body').removeClass('scrolled');
}
if($(this).scrollTop() > 700){
$('.scroll-up').addClass('active');
}else{
$('.scroll-up').removeClass('active');
}});
$('.scroll-up').on('click', function (){
$('html, body').stop().animate({scrollTop: 0}, 2000);
});
var video=$("#yvideo").attr("src");
$('.popup').click(function (e){
e.preventDefault();
var tarif=$(this).data('tarif');
var modal=$(this).data('modal');
$('#' + modal).removeClass('hide');
if(tarif){
$('<input>', {name: 'tarif', value: tarif, type: 'hidden'}).appendTo('#' + modal + ' form');
}
if($('#' + modal + ' [data-src]')){
const iframe=$('#' + modal + ' [data-src]')
const src=$(iframe).attr('data-src')
$(iframe).attr('src', src)
}});
$('.modal .close, .modal .modal_close').click(function (e){
e.preventDefault();
$(this).parents('.modal').addClass('hide');
$("#yvideo").attr("src", "");
setTimeout(function (){
$("#yvideo").attr("src", video);
}, 1000);
});
$('input[name="phone"], input[name="whatsapp"]').mask('+7 (999) 999-99-99');
$.fn.setCursorPosition=function (pos){
if($(this).get(0).setSelectionRange){
$(this).get(0).setSelectionRange(pos, pos);
}else if($(this).get(0).createTextRange){
var range=$(this).get(0).createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStart('character', pos);
range.select();
}};
$('input[name="phone"], input[name="whatsapp"]').click(function (){
$(this).setCursorPosition(4);
});
$(document).on('click', '#prodvizhenie #have_site_1', function(){
$form=$(this).closest('form');
$form.find('.address_site_label').show();
$form.find('.address_site_label input:text').removeClass('not_required');
});
$(document).on('click', '#prodvizhenie #have_site_0', function(){
$form=$(this).closest('form');
$form.find('.address_site_label').hide();
$form.find('.address_site_label input:text').addClass('not_required').val('');
});
$(document).on('click', '#prodvizhenie .select__list-item', function(){
$form=$(this).closest('form');
$form.find('label.sposob_svyazi').hide();
$form.find('label.sposob_svyazi input:text').addClass('not_required');
$form.find('label.sposob_svyazi:not(.' + $(this).data('value')+') input:text').val('');
$form.find('label.sposob_svyazi.' + $(this).data('value')).show();
$form.find('label.sposob_svyazi.' + $(this).data('value') + ' input:text').removeClass('not_required');
});
$('form:not(.search)').submit(function (e){
e.preventDefault();
var required=true;
$this=this;
var btn=$(this).find('button');
var $form=$(this);
$(this).find('input:not(.not_required), textarea.field_required, select.field_required, input.field_required').each(function (){
if($(this).val()===''){
var input=$(this);
$(this).parent().addClass('required');
$(btn).prop('disabled', true);
setTimeout(function (){
$(input).parent().removeClass('required');
$(btn).prop('disabled', false);
}, 800);
required=false;
console.log(' empty ' + this.name);
return false;
}});
if(required==false){
return false;
}
$overlay_send_form=$('<div id="overlay_send_form" />');
$overlay_send_form.appendTo('body');
setTimeout(function($overlay_send_form){
$overlay_send_form.addClass('visible');
}, 50, $overlay_send_form);
input_action=$(this).find('input:hidden[name=action]');
if(!input_action.length||!input_action.val()){
var data=$(this).serializeArray();
data.push({name: 'action', value: 'form'});
grecaptcha.ready(function (){
grecaptcha.execute('6LcfrzIqAAAAAIhcd0kJOCJhnV3aZHLvZT34-pzp', { action: 'form' }).then(function (token){
data.push({name: 'recaptcha', value: token});
data.push({name: 'referer', value: window.location.href});
contentType='application/x-www-form-urlencoded; charset=UTF-8';
processData=true;
files=$form.find('input:file');
if(files.length&&files.val()){
if(window.FormData===undefined){
alert('В вашем браузере FormData не поддерживается, файл не отправится');
}else{
contentType=false;
processData=false;
var formData=new FormData();
for(n=0; n < data.length; n++){
formData.append(data[n].name, data[n].value);
}
for(n=0; n < files.length; n++){
formData.append(files[n].name, files[n].files[0]);
}
data=formData;
}}
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: data,
cache: false,
contentType: contentType,
processData: processData,
dataType: 'json',
success: function (result){
for (let input in data){
const current=data[input]
if(current.name=='subject'){
switch (current.value){
case 'main_first': {
ym(93256126,'reachGoal','maincta1')
} break;
case 'report': {
ym(93256126,'reachGoal','wantsame')
} break;
case 'results': {
ym(93256126,'reachGoal','result14')
} break;
case 'sure_result': {
ym(93256126,'reachGoal','checkmybusiness')
} break;
case 'callback': {
ym(93256126,'reachGoal','getanswer')
} break;
}}
}
if($form.data('target_calltouch')&&typeof window.ct_goal!=='undefined'){
window.ct_goal($form.data('target_calltouch'));
}
var ct_data={
fio: typeof $this.name!=='undefined' ? $this.name.value:'',
phoneNumber: typeof $this.phone!=='undefined' ? $this.phone.value:'',
email: typeof $this.email!=='undefined' ? $this.email.value:'',
subject: typeof $this.subject!=='undefined' ? $this.subject.value:'',
comment: typeof $this.message!=='undefined' ? $this.message.value:'',
requestUrl: location.href,
sessionId: window.ct('calltracking_params', '37n2yg9s').sessionId
};
jQuery.ajax({
url: 'https://api.calltouch.ru/calls-service/RestAPI/requests/' + 72174 + '/register/',
dataType: 'json',
type: 'POST',
data: ct_data
});
$overlay_send_form.removeClass('visible');
setTimeout(function($overlay_send_form, $form, result){
$overlay_send_form.remove();
if(result.success!==true){
window.alert(result.message);
}
else if(!$form.hasClass('js-new-form')&&!localStorage.getItem('dont_redirect_dev')){
location.href="/spasibo/";
}}, 300, $overlay_send_form, $form, result);
}});
});
});
}else{
var data=new FormData();
$(this).find('input:file').each(function(){
$.each(this.files, function(key, value){
data.append(key, value);
});
});
$(this).find('input:hidden, input:text, textarea').each(function(){
data.append(this.name, this.value);
});
grecaptcha.ready(function (){
grecaptcha.execute('6LcfrzIqAAAAAIhcd0kJOCJhnV3aZHLvZT34-pzp', { action: 'form' }).then(function (token){
data.append('recaptcha', token);
data.append('referer', window.location.href);
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: data,
cache:false,
processData:false,
contentType:false,
dataType: 'json',
success: function (result){
for (let input in data){
const current=data[input]
if(current.name=='subject'){
switch (current.value){
case 'main_first': {
ym(93256126,'reachGoal','maincta1')
} break;
case 'report': {
ym(93256126,'reachGoal','wantsame')
} break;
case 'results': {
ym(93256126,'reachGoal','result14')
} break;
case 'sure_result': {
ym(93256126,'reachGoal','checkmybusiness')
} break;
case 'callback': {
ym(93256126,'reachGoal','getanswer')
} break;
}}
}
if($form.data('target_calltouch')&&typeof window.ct_goal!=='undefined'){
window.ct_goal($form.data('target_calltouch'));
}
$overlay_send_form.removeClass('visible');
setTimeout(function($overlay_send_form){
$overlay_send_form.remove();
}, 300, $overlay_send_form);
if(result.success!==true){
window.alert(result.message);
}
else if(!$form.hasClass('js-new-form')&&!localStorage.getItem('dont_redirect_dev')){
location.href="/spasibo/";
}}
});
});
});
}});
/*
$('.modal-form .img').click(function(){
$('.modal-form .img').removeClass('active');
$(this).addClass('active');
$('input[name="messenger"]').val($(this).data('msg'));
});
*/
$('.modal #checkbox').change(function (){
$('#modal-email').toggleClass('hide');
});
$('.tab').click(function (){
var tab=$(this).data('id');
$(this).addClass('current').siblings().removeClass('current');
if(tab=='all'){
$('.swiper-seoarticles a.item-article').addClass('hide');
$('.swiper-seoarticles a.item-article:lt(12)').removeClass('hide');
$('.show-more').show();
}else{
$('.show-more').hide();
$('.swiper-seoarticles a.item-article').addClass('hide');
$('.swiper-seoarticles a.item-article[data-id="' + tab + '"]').removeClass('hide');
}});
var itemCount=0;
$('.show-more').click(function (){
if(window.innerWidth < 992){
var cnt=6;
}else{
var cnt=8;
}
var item=$(this).parents('.inner-tabs-content').find('a.hide');
if(item.length <=cnt){
$('.show-more').hide();
}
item.each(function (){
if(itemCount!=cnt){
$(this).removeClass('hide');
itemCount++;
}});
itemCount=0;
});
$('.show-tags').click(function (){
$('.inner-tags a').show();
});
$('.guarantee_stage').on('click', function (){
$(this).toggleClass('active');
$(this).find('.guarantee_stages__dropdown').slideToggle(300);
});
$('.show_all_team').on('click', function (){
$('.team_items__col, .team_director__col').show();
$(this).remove();
});
if($('.pop_articles_links.swiper').length){
setTimeout(function(){
new Swiper('.pop_articles_links.swiper', {
speed: 400,
navigation: {
prevEl: '.pop_articles_links_prev',
nextEl: '.pop_articles_links_next',
},
slidesPerView: 'auto',
spaceBetween: 15,
loop: true,
});
}, 300);
}
$('.spoiler_wrapper').each(function(){
$(this).after('<a href="#" class="btn_n spoiler_wrapper_btn">Показать полностью</a>');
});
$('.spoiler_wrapper_btn').click(function(e){
e.preventDefault();
wrapper=$(this).prev('.spoiler_wrapper');
if(wrapper.hasClass('show_all')){
wrapper.removeClass('show_all');
this.innerText='Показать полностью';
$('html, body').animate({scrollTop: wrapper.offset().top - 100}, 800);
}else{
wrapper.addClass('show_all');
this.innerText='Скрыть';
}});
$('form').each(function(){
if(!$(this).hasClass('search')&&!$(this).find('p.agreement').length){
button=$(this).find('button[type="submit"]').eq(0);
button.after(agreement_text);
}});
$('.textbox table').each(function(){
$(this).wrap('<div class="table_wrapper"></div>');
});
$(document).on('click', '.tabs_container > ul.tab_nav > li > a', function(e){
e.preventDefault();
if($(this).hasClass('active')){
return false;
}
$(this).closest('ul.tab_nav').find('a').removeClass('active');
$(this).closest('.tabs_container').children('.tabs_content').children('.tab_content').removeClass('active');
$(this).addClass('active');
$('#' + $(this).data('target') + '.tab_content').addClass('active');
});
$('.feedback-buttons-close').click(function(){
$(".feedback-buttons-wrap").fadeOut();
$(this).fadeOut();
$('.feedback-button-closed').fadeIn();
let $date=new Date();
$date.getDate($date.getDate() + 1);
localStorage.setItem('feedback_buttons_hide', $date.getTime())
});
$('.feedback-button-closed').click(function(){
$(".feedback-buttons-wrap, .feedback-buttons-close").fadeIn();
$(this).fadeOut();
});
$(document).one('scroll', window, function(){
$('.feedback-buttons').fadeIn();
});
if(localStorage.getItem('feedback_buttons_hide')&&parseInt(localStorage.getItem('feedback_buttons_hide')) < Date.now()){
$('.feedback-buttons-close, .feedback-buttons-wrap').css('display', 'none');
$('.feedback-button-closed').css('display', 'block');
}
$('.feedback-button-open').click(function(){
t=$(this).data('title'), d=$(this).data('subtitle'), b=$(this).data('button'), q=$(this).data('question');
target=$(this).data('target');
show_right_form(t, d, b, q, target);
});
$('.right-form-question .close-form, .right-form-question .right-form-bg').click(function(){
$('.right-form-question').removeClass("active");
});
var need_show_auto_right_form=true;
if(localStorage.getItem('dont_need_show_auto_right_form')&&parseInt(localStorage.getItem('dont_need_show_auto_right_form')) > Date.now()){
need_show_auto_right_form=false;
}
function show_right_form(title, desc, button, question, target, audio){
if(typeof audio!=='undefined'){
$audio=$('<audio src="/wp-content/themes/oseo/assets/notice.mp3"></audio>');
$('.right-form-question').append($audio);
$audio[0].play();
}
$('.right-form-question').addClass("active");
$('.right-form-question').find('.rf-title').html(title);
$('.right-form-question').find('.rf-txt').html(desc);
$('.right-form-question').find('button').text(button);
$('.right-form-question form input[name=subject]').val(title);
$('.right-form-question form').data('target_calltouch', target);
if(question==='Y'){
$('.input-question').addClass('visible');
$('.input-question input').removeClass('not_required');
}else{
$('.input-question').removeClass('visible');
$('.input-question input').addClass('not_required');
}}
function auto_show_right_form(){
if(need_show_auto_right_form!==true){
return;
}
need_show_auto_right_form=false;
let curDate=new Date();
curDate.setDate(curDate.getDate() + 1);
localStorage.setItem('dont_need_show_auto_right_form', curDate.getTime());
t='Не уходите без ответов!';
d='Не нашли того, что искали? Проконсультируем по любому вопросу привлечения клиентов с помощью вашего сайта. Оставьте контакты ниже';
b='Отправить заявку', q='N', target='dont-leave', a='audio';
show_right_form(t, d, b, q, target, a);
}
$(document).mouseleave(auto_show_right_form);
setTimeout(auto_show_right_form, 45000);
var dont_show_right_form_50vh=false;
if(localStorage.getItem('dont_show_right_form_50vh')&&parseInt(localStorage.getItem('dont_show_right_form_50vh')) > Date.now()){
dont_show_right_form_50vh=true;
}
if(!dont_show_right_form_50vh){
$(window).scroll(function(){
$doc_half_height=parseInt($(document).height() * 0.9 - $(window).height());
if(!localStorage.getItem('dont_show_right_form_50vh')&&$(window).scrollTop() > $doc_half_height){
dont_show_right_form_50vh=true;
let curDate=new Date();
curDate.setDate(curDate.getDate() + 1);
localStorage.setItem('dont_show_right_form_50vh', curDate.getTime());
t='Нет времени искать информацию?';
d='Не нашли того, что искали? Проконсультируем по любому вопросу привлечения клиентов с помощью вашего сайта. Оставьте контакты ниже';
b='Отправить заявку', q='N', target='dont-leave', a='audio';
show_right_form(t, d, b, q, target, a);
}});
}
});
function setPosFlare(){
setInterval(function (){
$('.btn.animate .flare span').each(function (){
var max=140;
this.style.top=`${Math.floor(Math.random() * (max + 1))}%`;
this.style.left=`${Math.floor(Math.random() * (max + 1))}%`;
});
}, 3000);
}
function onEntry(entry){
entry.forEach(change=> {
if(change.isIntersecting){
change.target.classList.add('el-show');
}});
}
let options={threshold: [0.4]};
let observer=new IntersectionObserver(onEntry, options);
let elements=document.querySelectorAll('.el-animation');
for (let elm of elements){
observer.observe(elm);
}
if(document.querySelector('.advantages__swiper')){
const countSlides=document.querySelectorAll(".advantages__swiper .swiper-slide").length;
if(countSlides <=3){
const swiper6=new Swiper('.advantages__swiper', {
speed: 400,
navigation: {
nextEl: '.advantages__btn-next',
prevEl: '.advantages__btn-prev',
},
breakpoints: {
320: {
slidesPerView: 2,
spaceBetween: 10,
slidesPerGroup: 1
},
992: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1}}
});
}else{
const swiper6=new Swiper('.advantages__swiper', {
speed: 400,
navigation: {
nextEl: '.advantages__btn-next',
prevEl: '.advantages__btn-prev',
},
breakpoints: {
320: {
slidesPerView: 2,
spaceBetween: 10,
slidesPerGroup: 1
},
992: {slidesPerView: 3, spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 4, spaceBetween: 20, slidesPerGroup: 1}}
});
}}
if(document.querySelector('.public__swiper')){
const swiper7=new Swiper('.public__swiper', {
speed: 400,
navigation: {
nextEl: '.public__btn-next',
prevEl: '.public__btn-prev',
},
breakpoints: {
320: {
slidesPerView: 1,
spaceBetween: 10,
},
992: {slidesPerView: 2, spaceBetween: 20},
1200: {slidesPerView: 3, spaceBetween: 20}}
});
}
if(document.querySelector('.gallery__swiper')){
const swiper7=new Swiper('.gallery__swiper', {
speed: 400,
navigation: {
nextEl: '.gallery__btn-next',
prevEl: '.gallery__btn-prev',
},
breakpoints: {
320: {
slidesPerView: 1,
spaceBetween: 10,
},
992: {slidesPerView: 2, spaceBetween: 20},
1200: {slidesPerView: 3, spaceBetween: 20}}
});
}
if(window.innerWidth > 991){
const swiper6=new Swiper('.swiper-approach', {
speed: 400,
slidesPerGroup: 1,
slidesPerView: 'auto'
});
}
class Toggler {
constructor(toggler){
this.toggler_parent=toggler
this.toggle=this.toggler_parent.querySelector('[data-toggle]')
this.toggler=this.toggler_parent.querySelector('[data-toggler]')
this.toggler.addEventListener('click', this.toggleHandler.bind(this))
}
toggleHandler(){
this.toggler.classList.toggle('active')
this.toggle.classList.toggle('active')
}
static init(){
const togglers=document.querySelectorAll('[data-toggler-parent]')
if(togglers.length){
togglers.forEach(toggler=> new Toggler(toggler))
}}
}
Toggler.init()
class Tabs {
constructor(tabs){
this.tabs_parent=tabs
this.togglers_1=this.tabs_parent.querySelectorAll('[data-tab-target]')
this.togglers_1.forEach(toggler=> toggler.addEventListener('click', this.toggle.bind(this)))
this.tabs=this.tabs_parent.querySelectorAll('[data-tab]')
this.tabs.forEach(tab=> tab.hidden=true)
this.togglers_1[0].click()
}
toggle(e){
this.togglers_1.forEach(toggler=> toggler.classList.remove('active'))
this.tabs.forEach(tab=> tab.hidden=true)
e.target.classList.add('active')
const tab_target=e.target.dataset.tabTarget
this.tabs.forEach(tab=> {
if(tab.dataset.tab==tab_target)
tab.hidden=false
})
}
static init(){
const tabs=document.querySelectorAll('[data-tabs-parent]')
if(tabs.length){
tabs.forEach(tab=> new Tabs(tab))
}}
}
Tabs.init()
class Lightbox {
constructor(lightbox){
this.lightbox=lightbox
this.lightbox_content=this.lightbox.querySelector('.lightbox__content')
this.open_handler=this.open.bind(this)
document.body.addEventListener('click', (e)=> {
if(e.target.dataset.lightbox){
e.preventDefault();
this.open_handler(e);
}})
this.close_handler=this.close.bind(this)
this.lightbox.addEventListener('click', this.close_handler)
this.carousel=[]
this.carousel_index=0
this.prev_handler=this.prev.bind(this)
this.prev_button=this.lightbox.querySelector('.lightbox__arrow--prev')
this.prev_button.addEventListener('click', this.prev_handler)
this.next_handler=this.next.bind(this)
this.next_button=this.lightbox.querySelector('.lightbox__arrow--next')
this.next_button.addEventListener('click', this.next_handler)
}
open(e){
const parent=e.target.closest('[data-lightbox-parent]')
this.hideArrow()
if(parent){
let slides=parent.querySelectorAll('[data-lightbox]')
if(slides.length > 1){
slides.forEach((slide, index)=> {
this.carousel.push(slide.dataset.lightbox)
if(slide==e.target){
this.carousel_index=index
}});
this.lightbox_content.innerHTML=this.carousel[this.carousel_index]
this.showArrow()
}else{
const html=e.target.dataset.lightbox
this.lightbox_content.innerHTML=html
}}else{
const html=e.target.dataset.lightbox
this.lightbox_content.innerHTML=html
}
this.lightbox.hidden=false
}
hideArrow(){
this.prev_button.hidden=true
this.next_button.hidden=true
}
showArrow(){
this.prev_button.hidden=false
this.next_button.hidden=false
}
prev(){
this.carousel_index--
if(this.carousel_index < 0){
this.carousel_index=this.carousel.length - 1
}
this.lightbox_content.innerHTML=this.carousel[this.carousel_index]
}
next(){
this.carousel_index++
if(this.carousel_index > this.carousel.length - 1){
this.carousel_index=0
}
this.lightbox_content.innerHTML=this.carousel[this.carousel_index]
}
close(e){
if(e.target.classList.contains('lightbox') ||
e.target.classList.contains('lightbox__content') ||
e.target.classList.contains('lightbox__wrapper')){
this.lightbox.hidden=true
this.lightbox_content.innerHTML=''
this.carousel=[]
}}
static create(){
const lightbox=document.createElement('div')
lightbox.className='lightbox'
lightbox.hidden=true
const lightbox_wrapper=document.createElement('div')
lightbox_wrapper.className='lightbox__wrapper'
const lightbox_content=document.createElement('div')
lightbox_content.className='lightbox__content'
const lightbox_prev=document.createElement('button')
lightbox_prev.className='lightbox__arrow lightbox__arrow--prev'
const lightbox_next=document.createElement('button')
lightbox_next.className='lightbox__arrow lightbox__arrow--next'
lightbox_wrapper.append(lightbox_prev)
lightbox_wrapper.append(lightbox_next)
lightbox_wrapper.append(lightbox_content)
lightbox.append(lightbox_wrapper)
document.body.append(lightbox)
Lightbox.init()
}
static init(){
const lightbox=document.querySelector('.lightbox')
new Lightbox(lightbox)
}}
Lightbox.create();
if(document.querySelector('.stars')){
const stars=document.querySelector('.stars');
const radios=stars.querySelectorAll('.radio');
const value_default=stars.querySelector('[type=radio]:checked')?.value||0;
radios.forEach(radio=> {
const input=radio.querySelector('input');
input.addEventListener('change', function (e){
const value=input.value;
updateRadios(radios, value);
});
});
updateRadios(radios, value_default);
function updateRadios(radios, value){
radios.forEach((radio_, index)=> {
if(index + 1 <=value){
radio_.querySelector('.star').classList.add('active');
}else{
radio_.querySelector('.star').classList.remove('active');
}})
}}
if(document.querySelector('.article-page__rating-stars')){
const rating_form=document.querySelector('.article-page__rating-stars')
rating_form.addEventListener('change', async function (){
const rating=rating_form.querySelector('[type=radio]:checked').value
const post_id=rating_form.querySelector('[name=post_id]').value
const data=new FormData()
data.append('rating', rating)
data.append('post_id', post_id)
data.append('action', 'set_rating')
let response=await fetch(ajax, {
method: 'POST',
body: data
})
response=await response.json()
})
rating_form.addEventListener('submit', async function (e){
e.preventDefault()
})
}
if(document.querySelector('.article-page__comment-form')){
const comment_form=document.querySelector('.article-page__comment-form')
if(comment_form){
const submit_button=comment_form.querySelector('button')
submit_button.addEventListener('click', async function (e){
const comment=comment_form.querySelector('[name=comment]').value
const post_id=comment_form.querySelector('[name=post_id]').value
const data=new FormData(comment_form)
data.append('action', 'add_comment')
let response=await fetch(ajax, {
method: 'POST',
body: data
})
response=await response.json()
if(response.success){
commentShowResult(response.success)
}else if(response.error){
commentShowResult(response.error)
}else if(response.alert){
alert(response.alert)
}
function commentShowResult(text){
document.querySelector('.article-page__comment-main').hidden=true
document.querySelector('.article-page__comment-result').hidden=false
document.querySelector('.article-page__comment-result p').innerHTML=text
}})
}}
const tables=document.querySelectorAll('.inner table')
if(tables.length){
tables.forEach(table=> {
let wrapper=document.createElement('div');
wrapper.setAttribute('class', 'table-wrap');
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
})
}
if(document.querySelectorAll('[data-subject]').length){
document.querySelectorAll('[data-subject]').forEach(button=> button.addEventListener('click', function(e){
const modal=e.target.dataset?.modal
const subject=e.target.dataset?.subject
if(subject){
document.querySelector('#' + modal + ' form input[name=subject]').value=subject;
}}))
}
const swiper=new Swiper('.swiper-thanks', {
speed: 400,
slidesPerGroup: 1,
slidesPerView: 3,
spaceBetween: 40,
breakpoints: {
290: { slidesPerView: 1, spaceBetween: 10, slidesPerGroup: 1},
576: { slidesPerView: 1, spaceBetween: 10, slidesPerGroup: 1},
992: {slidesPerView: 1.5,spaceBetween: 20, slidesPerGroup: 1},
1200: {slidesPerView: 3,spaceBetween: 40, slidesPerGroup: 1}}
});
jQuery(document).ready(function($){
$('[data-modal]').on('click', function(e){
e.preventDefault();
$('.modal').removeClass('active');
var id=$(this).data('modal');
$('.modal#' + id).removeClass('hide').addClass('active');
if($(this).data('target_calltouch')){
$('.modal#' + id + ' form').data('target_calltouch', $(this).data('target_calltouch'));
}});
$('.modal_close').on('click', function(e){
e.preventDefault();
$('.modal').removeClass('active');
});
$('.anchor').on('click', function(e){
$('html,body').stop().animate({ scrollTop: $($(this).attr('href')).offset().top }, 700);
e.preventDefault();
});
$(document).mouseup(function(e){
var div=$(".modal .modal_form");
if(!div.is(e.target)
&& div.has(e.target).length===0){
$('.modal').removeClass('active');
}});
$('.thanks_img picture:nth-child(n+5)').each(function(){
$(this).addClass('hide');
});
var reviewsCount=0;
$('.reviews_more').click(function(){
var cnt=4;
var item=$('.thanks_img').find('.hide');
item.each(function(){
if(reviewsCount!=cnt){
$(this).removeClass('hide');
reviewsCount++;
}});
if(item.length <=cnt){
$('.reviews_more').hide();
}
reviewsCount=0;
});
$('.js-new-form').on('submit', function(){
$form=$(this);
var data=$form.serializeArray();
$overlay_send_form=$('<div id="overlay_send_form" />');
$overlay_send_form.appendTo('body');
setTimeout(function($overlay_send_form){
$overlay_send_form.addClass('visible');
}, 50, $overlay_send_form);
grecaptcha.ready(function (){
grecaptcha.execute('6LcfrzIqAAAAAIhcd0kJOCJhnV3aZHLvZT34-pzp', { action: 'form' }).then(function (token){
data.push({name: 'recaptcha', value: token});
data.push({name: 'referer', value: window.location.href});
$('.modal').removeClass('active');
$form.trigger('reset');
$.ajax({
type: 'POST',
url: '/wp-admin/admin-ajax.php',
data: data,
dataType: 'json',
success: function (result){
if($form.data('target_calltouch')&&typeof window.ct_goal!=='undefined'){
window.ct_goal($form.data('target_calltouch'));
}
$overlay_send_form.removeClass('visible');
setTimeout(function($overlay_send_form){
$overlay_send_form.remove();
}, 300, $overlay_send_form);
if(result.success!==true){
window.alert(result.message);
}else{
window.open("https://drive.google.com/file/d/1Ga4b9Frh2RR1xPtSQOO_oV8ihC7oIyDU/view", '_blank').focus();
if(!localStorage.getItem('dont_redirect_dev')){
location.href="/kompred/";
}}
}});
});
});
});
});
function throttleScroll(n){
0==isScrolling&&window.requestAnimationFrame(function(){
scrolling(n),
isScrolling = !1
}),
isScrolling = !0
}
function scrolling(){
jQuery('.bg_lazy').each(function(){
var frame=jQuery(this),
distance=frame.offset().top - jQuery(window).scrollTop(),
distTopBot=window.innerHeight - distance,
distBotTop=distance + frame.height();
if(this.checkVisibility()&&distTopBot >=-100&&distBotTop >=-100){
frame.removeClass('bg_lazy').addClass('bg_lazy_loaded');
}});
jQuery('.lazy_frame').each(function(){
var frame=jQuery(this),
distance=frame.offset().top - jQuery(window).scrollTop(),
distTopBot=window.innerHeight - distance,
distBotTop=distance + frame.height();
if(this.checkVisibility()&&distTopBot >=-100&&distBotTop >=-100){
f=document.createElement("iframe");
if(frame.data('height')){
f.height=frame.data('height');
}
if(frame.data('width')){
f.width=frame.data('width');
}
if(frame.data('src')){
f.src=frame.data('src');
}
if(frame.data('allow')!==undefined){
f.allow=frame.data('allow');
}
if(frame.data('allowfullscreen')!==undefined){
f.allowFullscreen=true;
}
if(frame.data('delay')){
setTimeout(function($this, f){
$this.append(f);
}, parseInt(frame.data('delay')) * 1000, this, f);
}else{
this.append(f);
}
this.classList.remove("lazy_frame");
this.classList.add("lazy_frame_loaded");
}});
jQuery('.lazy_script').each(function(){
var frame=jQuery(this),
distance=frame.offset().top - jQuery(window).scrollTop(),
distTopBot=window.innerHeight - distance,
distBotTop=distance + frame.height();
if(this.checkVisibility()&&distTopBot >=-100&&distBotTop >=-100){
f=document.createElement("script");
if(frame.data('src')){
f.src=frame.data('src');
}
this.after(f);
this.classList.remove("lazy_script");
this.classList.add("lazy_script_loaded");
}});
}
var isScrolling = !1;
window.addEventListener("scroll", throttleScroll, !1);
document.addEventListener("DOMContentLoaded", scrolling, !1);
(function(){
const siteNavigation=document.getElementById('site-navigation');
if(! siteNavigation){
return;
}
const button=siteNavigation.getElementsByTagName('button')[ 0 ];
if('undefined'===typeof button){
return;
}
const menu=siteNavigation.getElementsByTagName('ul')[ 0 ];
if('undefined'===typeof menu){
button.style.display='none';
return;
}
if(! menu.classList.contains('nav-menu') ){
menu.classList.add('nav-menu');
}
button.addEventListener('click', function(){
siteNavigation.classList.toggle('toggled');
if(button.getAttribute('aria-expanded')==='true'){
button.setAttribute('aria-expanded', 'false');
}else{
button.setAttribute('aria-expanded', 'true');
}});
document.addEventListener('click', function(event){
const isClickInside=siteNavigation.contains(event.target);
if(! isClickInside){
siteNavigation.classList.remove('toggled');
button.setAttribute('aria-expanded', 'false');
}});
const links=menu.getElementsByTagName('a');
const linksWithChildren=menu.querySelectorAll('.menu-item-has-children > a, .page_item_has_children > a');
for(const link of links){
link.addEventListener('focus', toggleFocus, true);
link.addEventListener('blur', toggleFocus, true);
}
for(const link of linksWithChildren){
link.addEventListener('touchstart', toggleFocus, false);
}
function toggleFocus(){
if(event.type==='focus'||event.type==='blur'){
let self=this;
while(! self.classList.contains('nav-menu') ){
if('li'===self.tagName.toLowerCase()){
self.classList.toggle('focus');
}
self=self.parentNode;
}}
if(event.type==='touchstart'){
const menuItem=this.parentNode;
event.preventDefault();
for(const link of menuItem.parentNode.children){
if(menuItem!==link){
link.classList.remove('focus');
}}
menuItem.classList.toggle('focus');
}}
}());
window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o<i;o++)(n=d[o]).addEventListener("touchstart",a),n.addEventListener("click",a)}}function l(e){var t,n,d=g(b.temporaryFormId);d&&h&&(g(b.parentIdFieldId).value="0",t=d.textContent,d.parentNode.replaceChild(h,d),this.style.display="none",n=(d=(d=g(b.commentReplyTitleId))&&d.firstChild)&&d.nextSibling,d&&d.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),d.textContent=t),e.preventDefault())}function a(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,d=m(n,"belowelement"),o=m(n,"commentid"),i=m(n,"respondelement"),r=m(n,"postid"),n=m(n,"replyto")||t;d&&o&&i&&r&&!1===v.addComment.moveForm(d,o,i,r,n)&&e.preventDefault()}function o(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void d()}function m(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return r&&"loading"!==E.readyState?t():r&&v.addEventListener("DOMContentLoaded",t,!1),{init:d,moveForm:function(e,t,n,d,o){var i,r,l,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===o&&(o=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),d&&y&&(y.value=d),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=o),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],r=!1,"getComputedStyle"in v?l=v.getComputedStyle(i):E.documentElement.currentStyle&&(l=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===l.visibility)&&(r=!0),"hidden"!==i.type&&!i.disabled&&!r){i.focus();break}}catch(e){}return!1}}}}(window);
jQuery(document).ready(function($){
var show_modal_popup_blog=true;
if(localStorage.getItem('dont_show_modal_popup_blog')
&& parseInt(localStorage.getItem('dont_show_modal_popup_blog')) > Date.now()){
show_modal_popup_blog=false;
}
if(show_modal_popup_blog){
setTimeout(function($popup_blog_btn){
$popup_blog_btn.trigger('click');
let curDate=new Date();
curDate.setDate(curDate.getDate() + 1);
localStorage.setItem('dont_show_modal_popup_blog', curDate.getTime());
}, 45000, $('.popup_blog_btn'));
}});
!function(){var o,l,n,e,g,m=function(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n},t=function(t){return t},c=(o={duration:300,action:"close",startTime:null,startHeight:null,endHeight:null,easing:t},l=function(e,i){cancelAnimationFrame(e.getAttribute("data-lwptoc-animation-request-id")),e.setAttribute("data-lwptoc-animation-request-id",window.requestAnimationFrame(function(t){n(e,i,t)}))},n=function(t,e,i){e.startTime||(e.startTime=i);var n,o=i-e.startTime;o<e.duration?(t.style.height=((e.endHeight-e.startingHeight)*e.easing(o/e.duration)+e.startingHeight).toFixed(2)+"px",l(t,e)):("close"===e.action&&(t.style.display="none"),"open"===e.action&&(t.style.display="block"),(n=t).style.height=null,n.style.overflow=null)},function(t,e){if(window.requestAnimationFrame){var i=m(o,{});i.action=e,t.style.height?i.startingHeight=parseFloat(t.style.height):i.startingHeight="close"===e?t.scrollHeight:0,(n=t).style.display="block",n.style.overflow="hidden",i.endHeight="close"===e?0:(t.style.height="0px",t.scrollHeight),l(t,i)}else t.style.display="close"===e?"none":"block";var n}),a=function(t){for(var e,i=document.querySelectorAll('[id="'+t+'"]'),n=0;n<i.length;n++)if((e=i[n]).offsetWidth||e.offsetHeight||e.getClientRects().length)return i[n];return null},i=(e={offset:0,duration:500,easing:t,onComplete:function(t,e){}},g=function(t,e){var i=t.getBoundingClientRect().top+window.pageYOffset-e;return i<0?0:i},function(o,t){var l,a=m(e,t);if(window.requestAnimationFrame&&"smooth"!==window.getComputedStyle(document.getElementsByTagName("HTML")[0]).scrollBehavior){var r,s,c=window.pageYOffset,d=null,u=function(t){l=g(o,a.offset),r=l-c;var e=window.pageYOffset;if(!s||!(0<r&&e<s||r<0&&s<e)){s=e,d||(d=t-1);var i=t-d,n=((l-c)*a.easing(i/a.duration)+c).toFixed();window.scroll(0,n),i<a.duration?window.requestAnimationFrame(u):(window.scroll(0,l),a.onComplete(0,l))}};window.requestAnimationFrame(u)}else l=g(o,a.offset),window.scroll(0,l),a.onComplete(0,l)}),u={scrollTo:function(t,e){i(t,e)},registerScrollTrigger:function(t,i){for(var e=0;e<t.length;e++)t[e].addEventListener("click",function(t){t.preventDefault();var e=this.getAttribute("href"),c=e.substring(1),d=a(c);d&&(e!==document.location.hash&&(i.onComplete=function(t,e){var i,n,o,l,a,r,s;d.setAttribute("id",""),i=c,n=t,o=e,(s=document.createElement("a")).setAttribute("id",i),s.setAttribute("style","position:absolute;visibility:hidden;left:"+n+"px;top:"+o+"px;"),l=document.body,a=s,l.prepend?l.prepend(a):l.insertBefore(a,l.firstChild),document.location.hash=i,(r=s).remove?r.remove():r.parentNode.removeChild(r),d.setAttribute("id",c)}),u.scrollTo(d,i))})},init:function(t){if("1"!==t.getAttribute("data-lwptoc-initialized")){t.setAttribute("data-lwptoc-initialized","1");var a,r=t.getElementsByClassName("lwptoc_toggle_label")[0],s=t.getElementsByClassName("lwptoc_items")[0];if(r)r.addEventListener("click",function(t){var e,i,n,o,l;t.preventDefault(),a=r.getAttribute("data-label"),r.setAttribute("data-label",r.innerHTML),r.innerHTML=a,l="lwptoc_items-visible",-1<(" "+s.className+" ").indexOf(" "+l+" ")?(o="lwptoc_items-visible",(n=s).className=(" "+n.className+" ").replace(" "+o+" ","").trim(),c(s,"close")):(i="lwptoc_items-visible",(e=s).className=e.className.trim()+" "+i,c(s,"open"))});"1"===t.getAttribute("data-smooth-scroll")&&u.registerScrollTrigger(s.getElementsByTagName("A"),{offset:t.getAttribute("data-smooth-scroll-offset")})}},globalInit:function(){for(var t=document.getElementsByClassName("lwptoc"),e=0;e<t.length;e++)u.init(t[e])}};window.lwptoc=u,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",u.globalInit):u.globalInit()}();