Файловый менеджер - Редактировать - /home/admin/domains/octawebtools.com/public_html/wp-content/plugins/gutenverse/assets/js/frontend.js
�азад
/*! For license information please see frontend.js.LICENSE.txt */ (()=>{var t,e,n={39:(t,e,n)=>{var i=n(310)(n(453),"WeakMap");t.exports=i},50:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},55:t=>{t.exports=function(){return!1}},61:(t,e,n)=>{var i=n(624),o=n(358),a=n(50),r={};r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&o(t.length)&&!!r[i(t)]}},73:(t,e,n)=>{var i=n(453).Symbol;t.exports=i},77:(t,e,n)=>{var i=n(364),o=n(615),a=n(676),r=n(489),s=n(39),l=n(624),c=n(513),u="[object Map]",h="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",g=c(i),m=c(o),v=c(a),b=c(r),y=c(s),x=l;(i&&x(new i(new ArrayBuffer(1)))!=p||o&&x(new o)!=u||a&&x(a.resolve())!=h||r&&x(new r)!=d||s&&x(new s)!=f)&&(x=function(t){var e=l(t),n="[object Object]"==e?t.constructor:void 0,i=n?c(n):"";if(i)switch(i){case g:return p;case m:return u;case v:return h;case b:return d;case y:return f}return e}),t.exports=x},152:(t,e,n)=>{var i=n(327),o=n(450),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return o(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},167:(t,e,n)=>{var i=n(61),o=n(877),a=n(273),r=a&&a.isTypedArray,s=r?o(r):i;t.exports=s},187:(t,e,n)=>{var i=n(330),o=n(992),a=n(717),r=n(513),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,h=c.hasOwnProperty,d=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||o(t))&&(i(t)?d:s).test(r(t))}},232:(t,e,n)=>{t=n.nmd(t);var i=n(453),o=n(55),a=e&&!e.nodeType&&e,r=a&&t&&!t.nodeType&&t,s=r&&r.exports===a?i.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;t.exports=l},273:(t,e,n)=>{t=n.nmd(t);var i=n(928),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,r=a&&a.exports===o&&i.process,s=function(){try{return a&&a.require&&a.require("util").types||r&&r.binding&&r.binding("util")}catch(t){}}();t.exports=s},310:(t,e,n)=>{var i=n(187),o=n(584);t.exports=function(t,e){var n=o(t,e);return i(n)?n:void 0}},327:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},330:(t,e,n)=>{var i=n(624),o=n(717);t.exports=function(t){if(!o(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},353:(t,e,n)=>{var i=n(453)["__core-js_shared__"];t.exports=i},356:(t,e,n)=>{var i=n(382),o=n(50),a=Object.prototype,r=a.hasOwnProperty,s=a.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return o(t)&&r.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},358:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},364:(t,e,n)=>{var i=n(310)(n(453),"DataView");t.exports=i},382:(t,e,n)=>{var i=n(624),o=n(50);t.exports=function(t){return o(t)&&"[object Arguments]"==i(t)}},450:(t,e,n)=>{var i=n(951)(Object.keys,Object);t.exports=i},453:(t,e,n)=>{var i=n(928),o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},478:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},489:(t,e,n)=>{var i=n(310)(n(453),"Set");t.exports=i},513:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},521:t=>{var e=Array.isArray;t.exports=e},584:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},615:(t,e,n)=>{var i=n(310)(n(453),"Map");t.exports=i},624:(t,e,n)=>{var i=n(73),o=n(915),a=n(478),r=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?o(t):a(t)}},633:(t,e,n)=>{var i=n(152),o=n(77),a=n(356),r=n(521),s=n(710),l=n(232),c=n(327),u=n(167),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(r(t)||"string"==typeof t||"function"==typeof t.splice||l(t)||u(t)||a(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!i(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},676:(t,e,n)=>{var i=n(310)(n(453),"Promise");t.exports=i},710:(t,e,n)=>{var i=n(330),o=n(358);t.exports=function(t){return null!=t&&o(t.length)&&!i(t)}},717:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},877:t=>{t.exports=function(t){return function(e){return t(e)}}},896:()=>{"use strict";"function"!=typeof Object.assign&&(Object.assign=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!t)throw TypeError("Cannot convert undefined or null to object");for(var i=function(e){e&&Object.keys(e).forEach((function(n){return t[n]=e[n]}))},o=0,a=e;o<a.length;o++)i(a[o]);return t})},915:(t,e,n)=>{var i=n(73),o=Object.prototype,a=o.hasOwnProperty,r=o.toString,s=i?i.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var i=!0}catch(t){}var o=r.call(t);return i&&(e?t[s]=n:delete t[s]),o}},928:(t,e,n)=>{var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=i},951:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},992:(t,e,n)=>{var i,o=n(353),a=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!a&&a in t}}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var a=i[t]={id:t,loaded:!1,exports:{}};return n[t](a,a.exports,o),a.loaded=!0,a.exports}o.m=n,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>({511:"chunk-shufflejs",587:"chunk-swiper",991:"chunk-swiper-modules"}[t]+".js"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="gutenverse:",o.l=(n,i,a,r)=>{if(t[n])t[n].push(i);else{var s,l;if(void 0!==a)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u];if(h.getAttribute("src")==n||h.getAttribute("data-webpack")==e+a){s=h;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",e+a),s.src=n),t[n]=[i];var d=(e,i)=>{s.onerror=s.onload=null,clearTimeout(f);var o=t[n];if(delete t[n],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((t=>t(i))),e)return e(i)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var i=n.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=n[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={343:0};o.f.j=(e,n)=>{var i=o.o(t,e)?t[e]:void 0;if(0!==i)if(i)n.push(i[2]);else{var a=new Promise(((n,o)=>i=t[e]=[n,o]));n.push(i[2]=a);var r=o.p+o.u(e),s=new Error;o.l(r,(n=>{if(o.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+a+": "+r+")",s.name="ChunkLoadError",s.type=a,s.request=r,i[1](s)}}),"chunk-"+e,e)}};var e=(e,n)=>{var i,a,[r,s,l]=n,c=0;if(r.some((e=>0!==t[e]))){for(i in s)o.o(s,i)&&(o.m[i]=s[i]);l&&l(o)}for(e&&e(n);c<r.length;c++)a=r[c],o.o(t,a)&&t[a]&&t[a][0](),t[a]=0},n=self.webpackChunkgutenverse=self.webpackChunkgutenverse||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function n(t,n,i){return(n=e(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}const i=gutenverseCoreFrontend;function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function s(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function u(t,e){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},u(t,e)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}const f=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,d()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._tabItems(e)}))}},{key:"_tabItems",value:function(t){var e=(0,i.u)(t),n={headingItems:e.find(".tab-heading-item"),bodyItems:e.find(".tab-body-item"),mobileTabs:e.find(".tab-heading-mobile"),mobileLabel:e.find(".tab-title span"),mobileItems:e.find(".tab-option-item")};this._addClickEvents(n)}},{key:"_addClickEvents",value:function(t){var e=this;t.headingItems.on("click",(function(n){var o=(0,i.u)(n.currentTarget).data("id");e._activateTab(o,t)})),t.mobileItems.on("click",(function(n){var o=(0,i.u)(n.currentTarget).data("id");e._activateTab(o,t)})),t.mobileTabs.on("click",(function(t){var e=(0,i.u)(t.currentTarget);e.hasClass("open")?e.removeClass("open"):e.addClass("open")})),t.headingItems.map((function(e){(0,i.u)(e).hasClass("active")&&t.bodyItems.map((function(t){(0,i.u)(t).data("id")===(0,i.u)(e).data("id")&&(0,i.u)(t).addClass("active")}))}))}},{key:"_activateHeading",value:function(t,e){e.headingItems.map((function(e){var n=(0,i.u)(e),o=n.data("id")===t?"addClass":"removeClass";n[o]("active")}))}},{key:"_activateBody",value:function(t,e){e.bodyItems.map((function(e){var n=(0,i.u)(e),o=n.data("id")===t?"addClass":"removeClass";n[o]("active")}))}},{key:"_activateMobile",value:function(t,e){e.mobileItems.map((function(n){var o=(0,i.u)(n),a=o.data("id")===t?"addClass":"removeClass";if(o[a]("active"),o.data("id")===t){var r=o.children();e.mobileLabel.html(r.html())}}))}},{key:"_activateTab",value:function(t,e){this._activateHeading(t,e),this._activateBody(t,e),this._activateMobile(t,e)}}])}(i.Default);var p={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},g={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},m=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],v={CSS:{},springs:{}};function b(t,e,n){return Math.min(Math.max(t,e),n)}function y(t,e){return t.indexOf(e)>-1}function x(t,e){return t.apply(null,e)}var _={arr:function(t){return Array.isArray(t)},obj:function(t){return y(Object.prototype.toString.call(t),"Object")},pth:function(t){return _.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},inp:function(t){return t instanceof HTMLInputElement},dom:function(t){return t.nodeType||_.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},nil:function(t){return _.und(t)||null===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return _.hex(t)||_.rgb(t)||_.hsl(t)},key:function(t){return!p.hasOwnProperty(t)&&!g.hasOwnProperty(t)&&"targets"!==t&&"keyframes"!==t}};function w(t){var e=/\(([^)]+)\)/.exec(t);return e?e[1].split(",").map((function(t){return parseFloat(t)})):[]}function M(t,e){var n=w(t),i=b(_.und(n[0])?1:n[0],.1,100),o=b(_.und(n[1])?100:n[1],.1,100),a=b(_.und(n[2])?10:n[2],.1,100),r=b(_.und(n[3])?0:n[3],.1,100),s=Math.sqrt(o/i),l=a/(2*Math.sqrt(o*i)),c=l<1?s*Math.sqrt(1-l*l):0,u=l<1?(l*s-r)/c:-r+s;function h(t){var n=e?e*t/1e3:t;return n=l<1?Math.exp(-n*l*s)*(1*Math.cos(c*n)+u*Math.sin(c*n)):(1+u*n)*Math.exp(-n*s),0===t||1===t?t:1-n}return e?h:function(){var e=v.springs[t];if(e)return e;for(var n=1/6,i=0,o=0;;)if(1===h(i+=n)){if(++o>=16)break}else o=0;var a=i*n*1e3;return v.springs[t]=a,a}}function k(t){return void 0===t&&(t=10),function(e){return Math.ceil(b(e,1e-6,1)*t)*(1/t)}}var D,C,S=function(){var t=.1;function e(t,e){return 1-3*e+3*t}function n(t,e){return 3*e-6*t}function i(t){return 3*t}function o(t,o,a){return((e(o,a)*t+n(o,a))*t+i(o))*t}function a(t,o,a){return 3*e(o,a)*t*t+2*n(o,a)*t+i(o)}return function(e,n,i,r){if(0<=e&&e<=1&&0<=i&&i<=1){var s=new Float32Array(11);if(e!==n||i!==r)for(var l=0;l<11;++l)s[l]=o(l*t,e,i);return function(l){return e===n&&i===r||0===l||1===l?l:o(function(n){for(var r=0,l=1;10!==l&&s[l]<=n;++l)r+=t;--l;var c=r+(n-s[l])/(s[l+1]-s[l])*t,u=a(c,e,i);return u>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var s=a(e,n,i);if(0===s)return e;e-=(o(e,n,i)-t)/s}return e}(n,c,e,i):0===u?c:function(t,e,n,i,a){var r,s,l=0;do{(r=o(s=e+(n-e)/2,i,a)-t)>0?n=s:e=s}while(Math.abs(r)>1e-7&&++l<10);return s}(n,r,r+t,e,i)}(l),n,r)}}}}(),P=(D={linear:function(){return function(t){return t}}},C={Sine:function(){return function(t){return 1-Math.cos(t*Math.PI/2)}},Expo:function(){return function(t){return t?Math.pow(2,10*t-10):0}},Circ:function(){return function(t){return 1-Math.sqrt(1-t*t)}},Back:function(){return function(t){return t*t*(3*t-2)}},Bounce:function(){return function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}},Elastic:function(t,e){void 0===t&&(t=1),void 0===e&&(e=.5);var n=b(t,1,10),i=b(e,.1,2);return function(t){return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-i/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/i)}}},["Quad","Cubic","Quart","Quint"].forEach((function(t,e){C[t]=function(){return function(t){return Math.pow(t,e+2)}}})),Object.keys(C).forEach((function(t){var e=C[t];D["easeIn"+t]=e,D["easeOut"+t]=function(t,n){return function(i){return 1-e(t,n)(1-i)}},D["easeInOut"+t]=function(t,n){return function(i){return i<.5?e(t,n)(2*i)/2:1-e(t,n)(-2*i+2)/2}},D["easeOutIn"+t]=function(t,n){return function(i){return i<.5?(1-e(t,n)(1-2*i))/2:(e(t,n)(2*i-1)+1)/2}}})),D);function O(t,e){if(_.fnc(t))return t;var n=t.split("(")[0],i=P[n],o=w(t);switch(n){case"spring":return M(t,e);case"cubicBezier":return x(S,o);case"steps":return x(k,o);default:return x(i,o)}}function T(t){try{return document.querySelectorAll(t)}catch(t){return}}function E(t,e){for(var n=t.length,i=arguments.length>=2?arguments[1]:void 0,o=[],a=0;a<n;a++)if(a in t){var r=t[a];e.call(i,r,a,t)&&o.push(r)}return o}function I(t){return t.reduce((function(t,e){return t.concat(_.arr(e)?I(e):e)}),[])}function A(t){return _.arr(t)?t:(_.str(t)&&(t=T(t)||t),t instanceof NodeList||t instanceof HTMLCollection?[].slice.call(t):[t])}function R(t,e){return t.some((function(t){return t===e}))}function L(t){var e={};for(var n in t)e[n]=t[n];return e}function F(t,e){var n=L(t);for(var i in t)n[i]=e.hasOwnProperty(i)?e[i]:t[i];return n}function j(t,e){var n=L(t);for(var i in e)n[i]=_.und(t[i])?e[i]:t[i];return n}function N(t){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t);if(e)return e[1]}function B(t,e){return _.fnc(t)?t(e.target,e.id,e.total):t}function z(t,e){return t.getAttribute(e)}function H(t,e,n){if(R([n,"deg","rad","turn"],N(e)))return e;var i=v.CSS[e+n];if(!_.und(i))return i;var o=document.createElement(t.tagName),a=t.parentNode&&t.parentNode!==document?t.parentNode:document.body;a.appendChild(o),o.style.position="absolute",o.style.width=100+n;var r=100/o.offsetWidth;a.removeChild(o);var s=r*parseFloat(e);return v.CSS[e+n]=s,s}function V(t,e,n){if(e in t.style){var i=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=t.style[e]||getComputedStyle(t).getPropertyValue(i)||"0";return n?H(t,o,n):o}}function W(t,e){return _.dom(t)&&!_.inp(t)&&(!_.nil(z(t,e))||_.svg(t)&&t[e])?"attribute":_.dom(t)&&R(m,e)?"transform":_.dom(t)&&"transform"!==e&&V(t,e)?"css":null!=t[e]?"object":void 0}function Y(t){if(_.dom(t)){for(var e,n=t.style.transform||"",i=/(\w+)\(([^)]*)\)/g,o=new Map;e=i.exec(n);)o.set(e[1],e[2]);return o}}function $(t,e,n,i){switch(W(t,e)){case"transform":return function(t,e,n,i){var o=y(e,"scale")?1:0+function(t){return y(t,"translate")||"perspective"===t?"px":y(t,"rotate")||y(t,"skew")?"deg":void 0}(e),a=Y(t).get(e)||o;return n&&(n.transforms.list.set(e,a),n.transforms.last=e),i?H(t,a,i):a}(t,e,i,n);case"css":return V(t,e,n);case"attribute":return z(t,e);default:return t[e]||0}}function q(t,e){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var i=N(t)||0,o=parseFloat(e),a=parseFloat(t.replace(n[0],""));switch(n[0][0]){case"+":return o+a+i;case"-":return o-a+i;case"*":return o*a+i}}function U(t,e){if(_.col(t))return function(t){return _.rgb(t)?(n=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e=t))?"rgba("+n[1]+",1)":e:_.hex(t)?function(t){var e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,n,i){return e+e+n+n+i+i})),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(t):_.hsl(t)?function(t){var e,n,i,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t),a=parseInt(o[1],10)/360,r=parseInt(o[2],10)/100,s=parseInt(o[3],10)/100,l=o[4]||1;function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(0==r)e=n=i=s;else{var u=s<.5?s*(1+r):s+r-s*r,h=2*s-u;e=c(h,u,a+1/3),n=c(h,u,a),i=c(h,u,a-1/3)}return"rgba("+255*e+","+255*n+","+255*i+","+l+")"}(t):void 0;var e,n}(t);if(/\s/g.test(t))return t;var n=N(t),i=n?t.substr(0,t.length-n.length):t;return e?i+e:i}function G(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function X(t){for(var e,n=t.points,i=0,o=0;o<n.numberOfItems;o++){var a=n.getItem(o);o>0&&(i+=G(e,a)),e=a}return i}function J(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return function(t){return 2*Math.PI*z(t,"r")}(t);case"rect":return function(t){return 2*z(t,"width")+2*z(t,"height")}(t);case"line":return function(t){return G({x:z(t,"x1"),y:z(t,"y1")},{x:z(t,"x2"),y:z(t,"y2")})}(t);case"polyline":return X(t);case"polygon":return function(t){var e=t.points;return X(t)+G(e.getItem(e.numberOfItems-1),e.getItem(0))}(t)}}function K(t,e){var n=e||{},i=n.el||function(t){for(var e=t.parentNode;_.svg(e)&&_.svg(e.parentNode);)e=e.parentNode;return e}(t),o=i.getBoundingClientRect(),a=z(i,"viewBox"),r=o.width,s=o.height,l=n.viewBox||(a?a.split(" "):[0,0,r,s]);return{el:i,viewBox:l,x:l[0]/1,y:l[1]/1,w:r,h:s,vW:l[2],vH:l[3]}}function Z(t,e,n){function i(n){void 0===n&&(n=0);var i=e+n>=1?e+n:0;return t.el.getPointAtLength(i)}var o=K(t.el,t.svg),a=i(),r=i(-1),s=i(1),l=n?1:o.w/o.vW,c=n?1:o.h/o.vH;switch(t.property){case"x":return(a.x-o.x)*l;case"y":return(a.y-o.y)*c;case"angle":return 180*Math.atan2(s.y-r.y,s.x-r.x)/Math.PI}}function Q(t,e){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,i=U(_.pth(t)?t.totalLength:t,e)+"";return{original:i,numbers:i.match(n)?i.match(n).map(Number):[0],strings:_.str(t)||e?i.split(n):[]}}function tt(t){return E(t?I(_.arr(t)?t.map(A):A(t)):[],(function(t,e,n){return n.indexOf(t)===e}))}function et(t){var e=tt(t);return e.map((function(t,n){return{target:t,id:n,total:e.length,transforms:{list:Y(t)}}}))}function nt(t,e){var n=L(e);if(/^spring/.test(n.easing)&&(n.duration=M(n.easing)),_.arr(t)){var i=t.length;2!==i||_.obj(t[0])?_.fnc(e.duration)||(n.duration=e.duration/i):t={value:t}}var o=_.arr(t)?t:[t];return o.map((function(t,n){var i=_.obj(t)&&!_.pth(t)?t:{value:t};return _.und(i.delay)&&(i.delay=n?0:e.delay),_.und(i.endDelay)&&(i.endDelay=n===o.length-1?e.endDelay:0),i})).map((function(t){return j(t,n)}))}var it={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,i,o){if(i.list.set(e,n),e===i.last||o){var a="";i.list.forEach((function(t,e){a+=e+"("+t+") "})),t.style.transform=a}}};function ot(t,e){et(t).forEach((function(t){for(var n in e){var i=B(e[n],t),o=t.target,a=N(i),r=$(o,n,a,t),s=q(U(i,a||N(r)),r),l=W(o,n);it[l](o,n,s,t.transforms,!0)}}))}function at(t,e){return E(I(t.map((function(t){return e.map((function(e){return function(t,e){var n=W(t.target,e.name);if(n){var i=function(t,e){var n;return t.tweens.map((function(i){var o=function(t,e){var n={};for(var i in t){var o=B(t[i],e);_.arr(o)&&1===(o=o.map((function(t){return B(t,e)}))).length&&(o=o[0]),n[i]=o}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(i,e),a=o.value,r=_.arr(a)?a[1]:a,s=N(r),l=$(e.target,t.name,s,e),c=n?n.to.original:l,u=_.arr(a)?a[0]:c,h=N(u)||N(l),d=s||h;return _.und(r)&&(r=c),o.from=Q(u,d),o.to=Q(q(r,u),d),o.start=n?n.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=O(o.easing,o.duration),o.isPath=_.pth(a),o.isPathTargetInsideSVG=o.isPath&&_.svg(e.target),o.isColor=_.col(o.from.original),o.isColor&&(o.round=1),n=o,o}))}(e,t),o=i[i.length-1];return{type:n,property:e.name,animatable:t,tweens:i,duration:o.end,delay:i[0].delay,endDelay:o.endDelay}}}(t,e)}))}))),(function(t){return!_.und(t)}))}function rt(t,e){var n=t.length,i=function(t){return t.timelineOffset?t.timelineOffset:0},o={};return o.duration=n?Math.max.apply(Math,t.map((function(t){return i(t)+t.duration}))):e.duration,o.delay=n?Math.min.apply(Math,t.map((function(t){return i(t)+t.delay}))):e.delay,o.endDelay=n?o.duration-Math.max.apply(Math,t.map((function(t){return i(t)+t.duration-t.endDelay}))):e.endDelay,o}var st=0,lt=[],ct=function(){var t;function e(n){for(var i=lt.length,o=0;o<i;){var a=lt[o];a.paused?(lt.splice(o,1),i--):(a.tick(n),o++)}t=o>0?requestAnimationFrame(e):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",(function(){ht.suspendWhenDocumentHidden&&(ut()?t=cancelAnimationFrame(t):(lt.forEach((function(t){return t._onDocumentVisibility()})),ct()))})),function(){t||ut()&&ht.suspendWhenDocumentHidden||!(lt.length>0)||(t=requestAnimationFrame(e))}}();function ut(){return!!document&&document.hidden}function ht(t){void 0===t&&(t={});var e,n=0,i=0,o=0,a=0,r=null;function s(t){var e=window.Promise&&new Promise((function(t){return r=t}));return t.finished=e,e}var l=function(t){var e=F(p,t),n=F(g,t),i=function(t,e){var n=[],i=e.keyframes;for(var o in i&&(e=j(function(t){for(var e=E(I(t.map((function(t){return Object.keys(t)}))),(function(t){return _.key(t)})).reduce((function(t,e){return t.indexOf(e)<0&&t.push(e),t}),[]),n={},i=function(i){var o=e[i];n[o]=t.map((function(t){var e={};for(var n in t)_.key(n)?n==o&&(e.value=t[n]):e[n]=t[n];return e}))},o=0;o<e.length;o++)i(o);return n}(i),e)),e)_.key(o)&&n.push({name:o,tweens:nt(e[o],t)});return n}(n,t),o=et(t.targets),a=at(o,i),r=rt(a,n),s=st;return st++,j(e,{id:s,children:[],animatables:o,animations:a,duration:r.duration,delay:r.delay,endDelay:r.endDelay})}(t);function c(){var t=l.direction;"alternate"!==t&&(l.direction="normal"!==t?"normal":"reverse"),l.reversed=!l.reversed,e.forEach((function(t){return t.reversed=l.reversed}))}function u(t){return l.reversed?l.duration-t:t}function h(){n=0,i=u(l.currentTime)*(1/ht.speed)}function d(t,e){e&&e.seek(t-e.timelineOffset)}function f(t){for(var e=0,n=l.animations,i=n.length;e<i;){var o=n[e],a=o.animatable,r=o.tweens,s=r.length-1,c=r[s];s&&(c=E(r,(function(e){return t<e.end}))[0]||c);for(var u=b(t-c.start-c.delay,0,c.duration)/c.duration,h=isNaN(u)?1:c.easing(u),d=c.to.strings,f=c.round,p=[],g=c.to.numbers.length,m=void 0,v=0;v<g;v++){var y=void 0,x=c.to.numbers[v],_=c.from.numbers[v]||0;y=c.isPath?Z(c.value,h*x,c.isPathTargetInsideSVG):_+h*(x-_),f&&(c.isColor&&v>2||(y=Math.round(y*f)/f)),p.push(y)}var w=d.length;if(w){m=d[0];for(var M=0;M<w;M++){d[M];var k=d[M+1],D=p[M];isNaN(D)||(m+=k?D+k:D+" ")}}else m=p[0];it[o.type](a.target,o.property,m,a.transforms),o.currentValue=m,e++}}function m(t){l[t]&&!l.passThrough&&l[t](l)}function v(t){var h=l.duration,p=l.delay,g=h-l.endDelay,v=u(t);l.progress=b(v/h*100,0,100),l.reversePlayback=v<l.currentTime,e&&function(t){if(l.reversePlayback)for(var n=a;n--;)d(t,e[n]);else for(var i=0;i<a;i++)d(t,e[i])}(v),!l.began&&l.currentTime>0&&(l.began=!0,m("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,m("loopBegin")),v<=p&&0!==l.currentTime&&f(0),(v>=g&&l.currentTime!==h||!h)&&f(h),v>p&&v<g?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,m("changeBegin")),m("change"),f(v)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,m("changeComplete")),l.currentTime=b(v,0,h),l.began&&m("update"),t>=h&&(i=0,l.remaining&&!0!==l.remaining&&l.remaining--,l.remaining?(n=o,m("loopComplete"),l.loopBegan=!1,"alternate"===l.direction&&c()):(l.paused=!0,l.completed||(l.completed=!0,m("loopComplete"),m("complete"),!l.passThrough&&"Promise"in window&&(r(),s(l)))))}return s(l),l.reset=function(){var t=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed="reverse"===t,l.remaining=l.loop,e=l.children;for(var n=a=e.length;n--;)l.children[n].reset();(l.reversed&&!0!==l.loop||"alternate"===t&&1===l.loop)&&l.remaining++,f(l.reversed?l.duration:0)},l._onDocumentVisibility=h,l.set=function(t,e){return ot(t,e),l},l.tick=function(t){o=t,n||(n=o),v((o+(i-n))*ht.speed)},l.seek=function(t){v(u(t))},l.pause=function(){l.paused=!0,h()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,lt.push(l),h(),ct())},l.reverse=function(){c(),l.completed=!l.reversed,h()},l.restart=function(){l.reset(),l.play()},l.remove=function(t){ft(tt(t),l)},l.reset(),l.autoplay&&l.play(),l}function dt(t,e){for(var n=e.length;n--;)R(t,e[n].animatable.target)&&e.splice(n,1)}function ft(t,e){var n=e.animations,i=e.children;dt(t,n);for(var o=i.length;o--;){var a=i[o],r=a.animations;dt(t,r),r.length||a.children.length||i.splice(o,1)}n.length||i.length||e.pause()}ht.version="3.2.1",ht.speed=1,ht.suspendWhenDocumentHidden=!0,ht.running=lt,ht.remove=function(t){for(var e=tt(t),n=lt.length;n--;)ft(e,lt[n])},ht.get=$,ht.set=ot,ht.convertPx=H,ht.path=function(t,e){var n=_.str(t)?T(t)[0]:t,i=e||100;return function(t){return{property:t,el:n,svg:K(n),totalLength:J(n)*(i/100)}}},ht.setDashoffset=function(t){var e=J(t);return t.setAttribute("stroke-dasharray",e),e},ht.stagger=function(t,e){void 0===e&&(e={});var n=e.direction||"normal",i=e.easing?O(e.easing):null,o=e.grid,a=e.axis,r=e.from||0,s="first"===r,l="center"===r,c="last"===r,u=_.arr(t),h=u?parseFloat(t[0]):parseFloat(t),d=u?parseFloat(t[1]):0,f=N(u?t[1]:t)||0,p=e.start||0+(u?h:0),g=[],m=0;return function(t,e,v){if(s&&(r=0),l&&(r=(v-1)/2),c&&(r=v-1),!g.length){for(var b=0;b<v;b++){if(o){var y=l?(o[0]-1)/2:r%o[0],x=l?(o[1]-1)/2:Math.floor(r/o[0]),_=y-b%o[0],w=x-Math.floor(b/o[0]),M=Math.sqrt(_*_+w*w);"x"===a&&(M=-_),"y"===a&&(M=-w),g.push(M)}else g.push(Math.abs(r-b));m=Math.max.apply(Math,g)}i&&(g=g.map((function(t){return i(t/m)*m}))),"reverse"===n&&(g=g.map((function(t){return a?t<0?-1*t:-t:Math.abs(m-t)})))}return p+(u?(d-h)/m:h)*(Math.round(100*g[e])/100)+f}},ht.timeline=function(t){void 0===t&&(t={});var e=ht(t);return e.duration=0,e.add=function(n,i){var o=lt.indexOf(e),a=e.children;function r(t){t.passThrough=!0}o>-1&<.splice(o,1);for(var s=0;s<a.length;s++)r(a[s]);var l=j(n,F(g,t));l.targets=l.targets||t.targets;var c=e.duration;l.autoplay=!1,l.direction=e.direction,l.timelineOffset=_.und(i)?c:q(i,c),r(e),e.seek(l.timelineOffset);var u=ht(l);r(u),a.push(u);var h=rt(a,t);return e.delay=h.delay,e.endDelay=h.endDelay,e.duration=h.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e},ht.easing=O,ht.penner=P,ht.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t};const pt=ht;function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}var mt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,gt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._accordionItems(e)}))}},{key:"_accordionItems",value:function(t){var e=(0,i.u)(t),n={accordions:e.find(".accordion-item"),headingItems:e.find(".accordion-item").find(".accordion-heading"),bodyItems:e.find(".accordion-item").find(".accordion-body")};this._addClickEvents(n)}},{key:"_animate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.map((function(t){var n=(0,i.u)(t),o=n.find(".accordion-body .accordion-content").size(),a=n.find(".accordion-body");n.hasClass("active")?pt({targets:a.first(),height:o.height,duration:500,easing:"easeOutCubic"}).finished.finally((function(){a.addClass("expanded"),a.attr("style","")})):(e&&a.addClass("closed"),pt({targets:a.first(),height:"0",duration:500,easing:"easeOutCubic"}).finished.finally((function(){e&&a.removeClass("closed"),a.attr("style","")})))}))}},{key:"_addClickEvents",value:function(t){var e=t.accordions,n=t.headingItems,o=t.bodyItems,a=this;a._animate(e,!1),(0,i.u)(n).on("click",(function(t){var n=(0,i.u)(t.currentTarget).parent();o.map((function(t){var e=(0,i.u)(t);if(e.hasClass("expanded")){var n=e.find(".accordion-content").size();e.attr("style","height: ".concat(n.height,"px")),e.removeClass("expanded")}})),e.map((function(t){var e=(0,i.u)(t);return e.is(n)&&!e.hasClass("active")?e.addClass("active"):e.removeClass("active")})),a._animate(e,!0)}))}}])}(i.Default);const vt=mt;function bt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bt=function(){return!!t})()}const yt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,bt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._addClickEvent(e)}))}},{key:"_addClickEvent",value:function(t){var e=(0,i.u)(t),n=e.find(".profile-popup"),o=n.data("name"),a=n.data("job"),r=n.data("img"),s=n.data("desc"),l=n.data("phone"),c=n.data("email");n.html(this._popupElement(e,{name:o,job:a,img:r,desc:s,phone:l,email:c})),e.find(".profile-box .popup").on("click",(function(){n.hasClass("show")||n.addClass("show")})),e.find(".profile-popup .overlay").on("click",(function(){n.hasClass("show")&&n.removeClass("show")})),e.find(".profile-popup .popup-close").on("click",(function(){n.hasClass("show")&&n.removeClass("show")}))}},{key:"_popupElement",value:function(t,e){var n=e.img,i=void 0===n?"":n,o=e.name,a=void 0===o?"":o,r=e.job,s=void 0===r?"":r,l=e.desc,c=void 0===l?"":l,u=e.phone,h=void 0===u?"":u,d=e.email,f=void 0===d?"":d,p=t.find(".socials-wrapper").html();return'<div class="overlay"></div>\n <div class="popup">\n <div class="popup-close">\n <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokewidth="2" strokelinecap="round" strokelinejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>\n </div>\n <div class="content-1">\n <img src="'.concat(i,'" alt="').concat(a,'">\n </div>\n <div class="content-2">\n <h3 class="profile-title">').concat(a,'</h3>\n <p class="profile-sub">').concat(s,'</p>\n <p class="profile-desc">').concat(c,'</p>\n <p class="profile-phone"><strong>Phone :</strong>').concat(h,'</p>\n <p class="profile-email"><strong>Email :</strong>').concat(f,"</p>\n ").concat(p,"\n </div>\n </div>")}}])}(i.Default);function xt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xt=function(){return!!t})()}const _t=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,xt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._addAnimations(e)}))}},{key:"_addAnimations",value:function(t){var e=(0,i.u)(t),n=e.find(".number-percentage"),o=e.find(".skill-track"),a=o.data("width"),r=o.data("duration"),s=pt({targets:o.first(),width:"".concat(a,"%"),easing:"easeInOutQuart",duration:r,autoplay:!1}),l=pt({targets:n.first(),innerHTML:"".concat(a,"%"),easing:"easeInOutQuart",round:1,duration:r,autoplay:!1});this.playOnScreen(t,[s,l])}}])}(i.Default);function wt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wt=function(){return!!t})()}const Mt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,wt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._addAnimation(e)}))}},{key:"_addAnimation",value:function(t){var e=(0,i.u)(t).find(".number"),n=e.data("number"),o=e.data("duration"),a=pt({targets:e.first(),innerHTML:n,easing:"easeInOutQuart",round:1,duration:o,autoplay:!1});this.playOnScreen(t,[a])}}])}(i.Default);function kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kt=function(){return!!t})()}const Dt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,kt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._init(e)}))}},{key:"_init",value:function(t){var e=(0,i.u)(t),n={wrapper:e,openToggle:e.find(".gutenverse-hamburger-menu"),closeToggle:e.find(".gutenverse-close-menu"),container:e.find(".gutenverse-menu-wrapper"),menuDropdown:e.find("li.menu-item-has-children > a"),singleMenu:e.find("li.menu-item:not(.menu-item-has-children)"),overlay:e.find(".guten-nav-overlay")};this.__handleAnchor(t),this._firstLoad(n)}},{key:"_firstLoad",value:function(t){this._addBodyClass(),this._addDropdownIcon(t),this._toggleMenu(t)}},{key:"_addBodyClass",value:function(){(0,i.u)("html").addClass("gutenverse-nav-menu-loaded")}},{key:"_addDropdownIcon",value:function(t){var e=t.wrapper.data("item-indicator");t.menuDropdown.each((function(t){(0,i.u)(t).find("i").remove(),(0,i.u)(t).append("<i class='".concat(e,"'></i>"))}))}},{key:"_toggleMenu",value:function(t){function e(t){t.toggleClass("dropdown-open")}t.openToggle.off("click").on("click",(function(){t.container.hasClass("active")?t.container.removeClass("active"):t.container.addClass("active"),t.overlay.hasClass("active")?(t.overlay.removeClass("active"),t.overlay.addClass("exiting")):(t.overlay.addClass("active"),t.overlay.removeClass("exiting"))})),t.closeToggle.on("click",(function(){t.container.removeClass("active"),t.overlay.hasClass("active")&&t.overlay.addClass("exiting"),t.overlay.removeClass("active")})),t.wrapper.hasClass("submenu-click-title")&&t.menuDropdown.on("click",(function(n){var o=window.innerWidth;(t.wrapper.hasClass("break-point-mobile")&&o<=425||t.wrapper.hasClass("break-point-tablet")&&o<=780)&&n.preventDefault(),e((0,i.u)(this).siblings(".sub-menu"))})),t.wrapper.find("li.menu-item-has-children > a i").on("click",(function(t){t.preventDefault(),t.stopPropagation(),e((0,i.u)(this).parent("a").siblings(".sub-menu"))})),1===parseInt(t.wrapper.data("close-on-click"))&&t.singleMenu.on("click",(function(){t.container.removeClass("active"),t.overlay.removeClass("active")}))}},{key:"__normalizeUrl",value:function(t){return t.endsWith("/")?t.slice(0,-1):t}},{key:"__removingClass",value:function(t,e){var n=this;(0,i.u)(t).find(".gutenverse-menu a").each((function(t){var o=(0,i.u)(t).closest("li");n.__normalizeUrl(t.href)!==e?o.removeClass("current-menu-item"):o.addClass("current-menu-item")}))}},{key:"__handleAnchor",value:function(t){var e=this,n=this.__normalizeUrl(window.location.href);this.__removingClass(t,n),window.addEventListener("popstate",(function(i){n=e.__normalizeUrl(window.location.href),e.__removingClass(t,n)}))}}])}(i.Default);function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}const St=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Ct()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this,e=this._elements;if(e.length>0){var n=o.e(587).then(o.bind(o,707)),i=o.e(991).then(o.bind(o,299));Promise.all([n,i]).then((function(n){var i=n[0].default,o=n[1],a=o.Autoplay,r=o.Navigation,s=o.Pagination;i.use([a,r,s]),e.map((function(e){t._addSliderEffect(e,i)}))}))}}},{key:"_addSliderEffect",value:function(t,e){var n=(0,i.u)(t).find(".swiper-container"),o=n.attr("id"),a=n.data("loop"),r=n.data("autoplay"),s=n.data("timeout"),l=n.data("nav"),c=n.data("arrow"),u=n.data("breakpoints"),h=function(t){return"true"===t},d={loop:h(a),autoplay:!!h(r)&&{delay:parseInt(s)},navigation:!!h(c)&&{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:!!h(l)&&{el:".swiper-pagination",type:"bullets",clickable:!0},breakpoints:this.swiperBreakpoint(JSON.parse(u))},f={id:o,loop:a,autoplay:r,timeout:s,nav:l,arrow:c,breakpoints:u},p=(0,i.applyFilters)("gutenverse.swiper.frontend",d,f);new e(".".concat(o," .swiper-container"),p)}}])}(i.Default);function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pt=function(){return!!t})()}const Ot=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Pt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this,e=this._elements;if(e.length>0){var n=o.e(587).then(o.bind(o,707)),i=o.e(991).then(o.bind(o,299));Promise.all([n,i]).then((function(n){var i=n[0].default,o=n[1],a=o.Navigation,r=o.Pagination,s=o.Autoplay;i.use([s,a,r]),e.map((function(e){t._addSliderEffect(e,i)}))}))}}},{key:"_addSliderEffect",value:function(t,e){var n=(0,i.u)(t).find(".swiper-container"),o=n.attr("id"),a=n.data("loop"),r=n.data("autoplay"),s=n.data("timeout"),l=n.data("nav"),c=n.data("arrow"),u=n.data("breakpoints"),h=function(t){return"true"===t},d={loop:h(a),autoplay:!!h(r)&&{delay:parseInt(s)},navigation:!!h(c)&&{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:!!h(l)&&{el:".swiper-pagination",type:"bullets",clickable:!0},breakpoints:this.swiperBreakpoint(JSON.parse(u))},f={id:o,loop:a,autoplay:r,timeout:s,nav:l,arrow:c,breakpoints:u},p=(0,i.applyFilters)("gutenverse.swiper.frontend",d,f);new e("#".concat(o),p)}}])}(i.Default);function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Et(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}function It(t){return function(t){if(Array.isArray(t))return Tt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Et(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(At=function(){return!!t})()}var Rt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,At()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;window.onload=function(){if(t._elements.length>0){var e=o.e(511).then(o.bind(o,228)),n=o.e(587).then(o.bind(o,707)),i=o.e(991).then(o.bind(o,299));Promise.all([e,n,i]).then((function(e){var n=e[0].default,i=e[1].default,o=e[2],a=o.Navigation,r=o.Pagination,s=o.Zoom;i.use([a,r,s]),t._loadGallery({Shuffle:n,Swiper:i})}))}}}},{key:"_loadGallery",value:function(t){var e=t.Shuffle,n=t.Swiper,o=this;o._elements.map((function(t){var a=(0,i.u)(t).find(".gallery-item-wrap img").nodes.map((function(t){return new Promise((function(e,n){if(t.onload=function(){t.complete&&0!==t.naturalHeight?e(t):n(new Error("Image is not completely loaded or has a height of zero."))},t.onerror=function(){n(new Error("Failed to load image."))},t.src){var i=t.src;t.src="",t.src=i}}))}));Promise.allSettled(It(a)).then((function(){o._addSliderEffect(t,n),o._addEvents(t,e)}))}))}},{key:"_requestFullscreen",value:function(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}},{key:"_exitFullscreen",value:function(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},{key:"_getFilterSearchValue",value:function(t){var e=(0,i.u)(".".concat(t.split(" ").slice(0,3).join("."))),n=e.find("#guten-gallery-search-box-input"),o="",a="";return n.length>0?(o=n.first().value.toLowerCase(),a=e.find(".search-filter-trigger span").text().toLowerCase(),e.find(".search-filter-trigger").attr("data-flag-all")&&(a="all")):a=e.find(".guten-gallery-control.active").text().toLowerCase(),{searchValue:o,filterValue:"all"===a?"":a}}},{key:"_addSliderEffect",value:function(t,e){var n=this,o=(0,i.u)(t),a=o.nodes[0].className,r=o.find(".gallery-items").data("zoom"),s=o.find(".swiper-slide").nodes;if("disable"!==r){var l=o.find(".gutenverse-popup-gallery"),c=o.find(".gallery-item-wrap"),u=o.find(".swiper-container"),h=l.find(".gallery-header .icon-minimize"),d=l.find(".gallery-header .icon-fullscreen"),f=u.attr("id"),p=null;c.map((function(t){("button"===r?(0,i.u)(t).find(".gallery-link.zoom"):(0,i.u)(t)).on("click",(function(){var o=(0,i.u)(t).data("index"),r=n._getFilterSearchValue(a),c=r.searchValue,h=r.filterValue,d=0;s.forEach((function(t){var e,n,i,a,r;t.remove();var s=null!==(e=t.getAttribute("data-filter"))&&void 0!==e?e:"",l=null!==(n=t.getAttribute("data-title"))&&void 0!==n?n:"",f=null!==(i=t.getAttribute("data-content"))&&void 0!==i?i:"",p=null!==(a=t.getAttribute("data-category"))&&void 0!==a?a:"",g=null!==(r=t.getAttribute("data-index"))&&void 0!==r?r:-1;s.toLowerCase().includes(h)&&(l.toLowerCase().includes(c)||f.toLowerCase().includes(c)||p.toLowerCase().includes(c))&&(u.find(".swiper-wrapper").append(t),g===o&&(o=d),d++)}));var g={initialSlide:parseInt(o),loop:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},zoom:{maxRatio:2},spaceBetween:10,slidesPerView:1,observer:!0,observeParents:!0};p=new e(".".concat(f," .swiper-container"),g),setTimeout((function(){l.hasClass("hidden")?l.removeClass("hidden"):l.addClass("hidden")}),100)}))})),l.find(".gallery-header .icon-zoom").on("click",(function(){var t=l.find(".swiper-slide.swiper-slide-active");p&&(t.hasClass("zoomed")?(p.zoom.out(),t.removeClass("zoomed")):(p.zoom.in(),t.addClass("zoomed"),t.siblings().removeClass("zoomed")))})),l.find(".gallery-header .icon-close").on("click",(function(){var t=l.find(".swiper-slide.swiper-slide-active");l.addClass("hidden"),p.destroy(!0,!0),d.hasClass("hidden")&&n._exitFullscreen(),d.removeClass("hidden"),h.addClass("hidden"),p.zoom.out(),t.removeClass("zoomed")})),d.on("click",(function(){d.addClass("hidden"),h.removeClass("hidden"),n._requestFullscreen(l.first())})),h.on("click",(function(){d.removeClass("hidden"),h.addClass("hidden"),n._exitFullscreen()}))}}},{key:"_addEvents",value:function(t,e){var n=this,o=(0,i.u)(t),a=o.find(".search-filter-controls"),r=o.nodes[0].className,s=new e(o.find(".gallery-items").first(),{itemSelector:".gallery-item-wrap",sizer:".gallery-sizer-element",speed:500}),l=function(t,e){var o=n._getFilterSearchValue(e),a=o.searchValue,r=o.filterValue;t&&t.filter((function(t){return function(t){var e=(0,i.u)(t),n=e.data("control"),o=e.find(".item-title").text(),s=e.find(".item-content").text(),l=e.find(".caption-category span").text();return n.toLowerCase().includes(r)&&(o.toLowerCase().includes(a)||s.toLowerCase().includes(a)||l.toLowerCase().includes(a))}(t)}))};o.find("#guten-gallery-search-box-input").on("change keyup",(function(t){return l(s,r)})),o.find(".guten-gallery-control").on("click",(function(t){var e=(0,i.u)(t.target),n=e.data("filter"),a=e.data("flag-all");o.find("#search-filter-trigger span").text(n||"All"),o.find("#search-filter-trigger").attr("data-flag-all",a),(0,i.u)(t.target).addClass("active"),(0,i.u)(t.target).siblings().removeClass("active"),l(s,r)})),o.find(".guten-gallery-load-more").on("click",(function(t){t.preventDefault();var e=o.find(".gallery-items"),n=parseInt(e.data("loaded")),a=parseInt(e.data("more"));a||(a=2);var r=parseInt(e.data("max")),l=n+a,c=e.find(".gallery-item-wrap");l-a<=r&&(c.map((function(t,e){e>=n&&e<l&&((0,i.u)(t).removeClass("item-hidden"),s.update())})),e.data("loaded",l)),l>=r&&o.find(".load-more-items").remove()})),o.find("#guten-gallery-search-box").on("submit",(function(t){return t.preventDefault()})),o.find("#search-filter-trigger").on("click",(function(){return a.hasClass("open-controls")?a.removeClass("open-controls"):a.addClass("open-controls")}))}}])}(i.Default);const Lt=Rt,Ft={bend:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:["1.1em",0],translateX:["0.55em",0],translateZ:0,rotateZ:[180,0],duration:a,opacity:[0,1],easing:"easeOutExpo",delay:function(t,e){return 50*e}}),void((n||l&&!c())&&i.add({targets:o,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){l&&u()}}));var e,n,i,o,a,r,s,l,c,u},blinds:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,rotateY:[-90,0],opacity:[0,1],delay:function(t,e){return a*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,rotateY:[0,90],opacity:[1,0],easing:"easeOutExpo",delay:function(t,e){return s*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},bounce:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scale:[.3,1.4,.7,1],easing:"easeOutQuad",duration:a,delay:function(t,e){return 50*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,scale:[1,.7,1.4,.3],duration:s,easing:"easeInQuad",delay:function(t,e){return 50*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},drop:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scale:[0,1],opacity:[0,1],duration:a,elasticity:600,delay:function(t,e){return 45*(e+1)}}),void((n||l&&!c())&&i.add({targets:o,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){l&&u()}}));var e,n,i,o,a,r,s,l,c,u},fade:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,opacity:[0,1],easing:"easeInOutQuad",duration:a,delay:function(t,e){return 70*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,opacity:[1,0],easing:"easeOutInQuad",duration:s,delay:function(t,e){return 70*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},fall:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:[-100,0],easing:"easeOutExpo",duration:a,opacity:[0,1],delay:function(t,e){return 30*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateY:[0,100],easing:"easeInExpo",duration:s,opacity:[1,0],delay:function(t,e){return 30*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},flip:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,rotateY:[-90,0],opacity:[0,1],duration:a,delay:function(t,e){return 45*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,rotateY:[0,90],opacity:[1,0],duration:s,easing:"easeOutExpo",delay:function(t,e){return 45*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},jump:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:["1.1em",0],translateZ:0,duration:a,opacity:[0,1],delay:function(t,e){return 50*e}}),void((n||l&&!c())&&i.add({targets:o,opacity:0,duration:s,easing:"easeOutExpo",delay:r,complete:function(){l&&u()}}));var e,n,i,o,a,r,s,l,c,u},pop:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scale:[.3,1],opacity:[0,1],translateZ:0,easing:"easeOutExpo",duration:a,delay:function(t,e){return 70*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,scale:[1,.3],opacity:[1,0],duration:s,easing:"easeOutExpo",delay:function(t,e){return 70*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},rising:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:[100,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:a,delay:function(t,e){return 300+30*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateY:[0,-100],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,e){return 100+30*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},"rubber-band":function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scaleX:[{value:1.25},{value:.75},{value:1.15},{value:.95},{value:1.05},{value:1}],scaleY:[{value:.75},{value:1.25},{value:.85},{value:1.05},{value:.95},{value:1}],opacity:[0,1],duration:a,easing:"easeOutQuad",delay:function(t,e){return 50*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,scaleX:[{value:1.05},{value:.95},{value:1.15},{value:.75},{value:1.25},{value:1}],scaleY:[{value:.95},{value:1.05},{value:.85},{value:1.25},{value:.75},{value:1}],opacity:[1,0],easing:"easeInQuad",duration:s,delay:function(t,e){return 50*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},"slide-down":function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:[-40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:a}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateY:[0,40],opacity:[1,0],easing:"easeInExpo",duration:s,complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},"slide-left":function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateX:[-40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:a,delay:function(t,e){return 500+30*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateX:[0,40],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,e){return 100+30*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},"slide-right":function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateX:[40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:a,delay:function(t,e){return 500+30*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateX:[0,-40],opacity:[1,0],easing:"easeInExpo",duration:s,delay:function(t,e){return 100+30*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},"slide-up":function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,translateY:[40,0],translateZ:0,opacity:[0,1],easing:"easeOutExpo",duration:a}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,translateY:[0,-40],opacity:[1,0],easing:"easeInExpo",duration:s,complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},swing:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,rotate:[{value:15},{value:-10},{value:5},{value:-5},{value:0}],opacity:[0,1],duration:a,easing:"easeOutSine",delay:function(t,e){return 50*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,rotate:[{value:0},{value:-5},{value:10},{value:-15},{value:15}],opacity:0,easing:"easeInSine",duration:s,delay:function(t,e){return 50*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},swirl:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,rotateX:[-90,0],opacity:[0,1],delay:function(t,e){return a*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,rotateX:[0,90],opacity:[1,0],delay:function(t,e){return s*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},wave:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scale:[.3,1],opacity:[0,1],translateZ:0,delay:function(t,e){return a*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,scale:[1,.3],opacity:[1,0],translateZ:0,delay:function(t,e){return s*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u},zoom:function(t){return n=(e=t).loop,i=e.animation,o=e.target,a=e.animationDuration,r=e.displayDuration,s=e.transitionDuration,l=e.isRotationType,c=e.stopRotating,u=e.nextRotationText,i.add({targets:o,scale:[4,1],opacity:[0,1],translateZ:0,easing:"easeOutExpo",duration:a,delay:function(t,e){return 70*e}}),void((n||l&&!c())&&(i.add({targets:o,delay:r}),i.add({targets:o,scale:[1,0],opacity:[1,0],translateZ:0,easing:"easeInExpo",duration:s,delay:function(t,e){return 70*e},complete:function(){l&&u()}})));var e,n,i,o,a,r,s,l,c,u}};var jt=function(){return s((function t(e,o){var r=this;a(this,t),n(this,"_generateElement",(function(){var t=(0,i.u)(r.element).find(".text-wrapper");if(t.html(""),"rotation"==r.textType){r.rotationTexts.forEach((function(e,n){var o=(0,i.u)("<span>").addClass("rotation-text");r._addActiveRotationClass(o,n),r._generateText(o,e.rotationText),t.append(o)}));var e=(0,i.u)(r.element).find(".rotation-text.active").first();t.attr({style:"width: ".concat(e.offsetWidth,"px;")})}else r._generateText(t,r.text)})),n(this,"_setTarget",(function(){"rotation"===r.textType?r.target=It((0,i.u)(r.element).find(".rotation-text.active").find(".letter").nodes):r.target=It((0,i.u)(r.element).find(".letter").nodes)})),n(this,"_generateText",(function(t,e){t.html(e),t.html(t.text().replace(r.splitByWord?/\b\w+\b/g:/\S/g,(function(t){return"<span class='letter'>".concat(t,"</span>")})))})),n(this,"_addActiveRotationClass",(function(t,e){r.rotationTextIndex===e&&(0,i.u)(t).addClass("active")})),n(this,"_updateActiveElementRotation",(function(){var t=(0,i.u)(r.element).find(".rotation-text");t.removeClass("active"),t.each((function(t,e){r._addActiveRotationClass(t,e)}))})),n(this,"_updateRotationIndex",(function(){r.rotationTextIndex+1>=r.rotationTexts.length?r.rotationTextIndex=0:r.rotationTextIndex++})),n(this,"_stopRotating",(function(){var t=r.rotationTextIndex+1>=r.rotationTexts.length;return!r.loop&&t})),n(this,"_smoothAnimationWrapper",(function(){null!=r.animationWrapper&&r.animationWrapper.remove(r.targetWrapper);var t=(0,i.u)(r.element).find(".rotation-text.active").first().offsetWidth;r.targetWrapper=(0,i.u)(r.element).find(".text-wrapper").nodes,r.animationWrapper=pt({targets:r.targetWrapper,width:t+"px",duration:300,easing:"easeInOutQuad"})})),n(this,"_nextRotationText",(function(){r.animeInit.remove(r.target),r._updateRotationIndex(),r._updateActiveElementRotation(),r._setTarget(),r._smoothAnimationWrapper(),r.run()})),this.element=e,this.loop=o.loop,this.splitByWord=o.splitByWord,this.textType=o.textType,this.text=o.text,this.rotationTexts=o.rotationTexts,this.animationDuration=o.animationDuration,this.displayDuration=o.displayDuration,this.transitionDuration=o.transitionDuration,this.rotationTextIndex=0,this.animationStyle=Ft[o.style],this.animeInit=null,this.target=null,this.animationWrapper=null,this.targetWrapper=null,this._generateElement(),this._setTarget()}),[{key:"run",value:function(){this.animeInit&&this.animeInit.remove(this.target.nodes),this.animeInit=pt.timeline({loop:this.loop}),this.animationStyle&&this.animationStyle({loop:this.loop,animation:this.animeInit,target:this.target,animationDuration:this.animationDuration,displayDuration:this.displayDuration,transitionDuration:this.transitionDuration,isRotationType:"rotation"==this.textType,stopRotating:this._stopRotating,nextRotationText:this._nextRotationText})}}])}();const Nt={circle:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-circle">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M281.68,15.89S135.3,14.19,22.05,81.45s331.78,76.17,441,35.68S363.86-35.6,178.77,26.39"\n transform="translate(0.75 -3.61)"\n />\n </svg>\n ')}(t)},x:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-cross">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M7.5,6.5s257,84,483,136"\n transform="translate(-6.1 -2.22)"\n />\n <path\n ').concat(i,'\n d="M490.5,6.5s-310,103-483,136"\n transform="translate(-6.1 -2.22)"\n />\n </svg>\n ')}(t)},curly:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-curly">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M6.5,75.5s25-29,50,0,50,0,50,0,25-32,50,0,50-1,50-1,25-30,50,1,50,0,50,0,27-28,50,0,50,0,50,0,26-25,50,0,36,7,36,7"\n transform="translate(-3.09 -56.78)"\n />\n </svg>\n ')}(t)},diagonal:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-diagonal">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M7.5,6.5s257,84,483,136"\n transform="translate(-6.1 -2.22)"\n />\n </svg>\n ')}(t)},"double-underline":function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-double-underline">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M3,59.5s152.5-13,493-3"\n transform="translate(-2.62 -48.22)"\n />\n <path\n ').concat(i,'\n d="M3,83.5s200.54-11,493,0"\n transform="translate(-2.62 -48.22)"\n />\n </svg>\n ')}(t)},double:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-double">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M3.69,18.7s240.11-30,492.31,0"\n transform="translate(-3.14 -0.87)"\n />\n <path\n ').concat(i,'\n d="M3.65,144S248.43,128,496,144"\n transform="translate(-3.14 -0.87)"\n />\n </svg>\n ')}(t)},strikethrough:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-strikethrough">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M7.5,75.5s200,10,485,0"\n transform="translate(-7.28 -71)"\n />\n </svg>\n ')}(t)},"underline-zigzag":function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-underline-zigzag">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M9.5,52.5s361-31,478,0"\n transform="translate(-9.11 -34.22)"\n />\n <path\n ').concat(i,'\n d="M484.5,55.5s-386-2-432,15c0,0,317-12,358,5,0,0-177-4-227,11"\n transform="translate(-9.11 -34.22)"\n />\n </svg>\n ')}(t)},underline:function(t){return function(t){var e=t.svgProps,n=t.gradientSvg,i=t.commonPathProps;return"\n <svg ".concat(e,' class="svg-underline">\n <defs>').concat(n,"</defs>\n <path\n ").concat(i,'\n d="M3,77.5s200.54-11,493,0"\n transform="translate(-2.75 -68.11)"\n />\n </svg>\n ')}(t)}};var Bt=function(){return s((function t(e,n){a(this,t),this.element=e,this.elementId=n.elementId,this.loop=n.loop,this.text=n.text,this.animationDuration=n.animationDuration,this.displayDuration=n.displayDuration,this.transitionDuration=n.transitionDuration,this.highlightStyle=Nt[n.style],this.highlightedStyle=n.highlightedStyle,this.highlightGradient=n.highlightGradient,this.highlightColorType=n.highlightColorType,this.highlightColor=n.highlightColor,this.animeInit=null,this.target=null,this.svgElement=null}),[{key:"run",value:function(){this.__generateStroke(),this.__inputSvgToElement(),this.__addAnimation()}},{key:"__inputSvgToElement",value:function(){this.element.find(".highlighted").append(this.svgElement)}},{key:"__generateStroke",value:function(){var t=null,e="";"gradient"===this.highlightColorType&&(t='\n <linearGradient\n x1="0"\n y1="0"\n x2="100%"\n y2="100%"\n id="'.concat(this.elementId,'-highlight-gradient"\n >\n ').concat(this.__generateGradient(),"\n </linearGradient>\n "),e="url(#".concat(this.elementId,"-highlight-gradient)"));var n='\n class="style-'.concat(this.highlightColorType,'",\n stroke="').concat(e||void 0,'",\n ');this.svgElement=Nt[this.highlightedStyle]({svgProps:'\n xmlns="http://www.w3.org/2000/svg",\n viewBox="0 0 500 150",\n preserveAspectRatio="none",\n ',gradientSvg:t,commonPathProps:n})}},{key:"__addAnimation",value:function(){for(var t=this.element.find("path").nodes,e=0;e<t.length;e++){var n=t[e].getTotalLength();t[e].setAttribute("stroke-dasharray",n),t[e].setAttribute("stroke-dashoffset",n)}this.target=t,this.animeInit=pt.timeline({loop:this.loop}).add({targets:this.target,strokeDashoffset:function(t){return[t.getTotalLength(),0]},opacity:[0,1],easing:"easeInOutSine",duration:this.animationDuration}),this.loop&&this.animeInit.add({targets:this.target,opacity:[1,0],delay:this.displayDuration,duration:this.transitionDuration,easing:"easeInOutSine"})}},{key:"__generateGradient",value:function(){return this.highlightGradient?this.highlightGradient.map((function(t,e){return'<stop\n key="'.concat(e,'"\n offset="').concat(t.offset,'"\n style="\n stop-color:').concat(t.color,";\n stop-opacity:").concat(t.opacity||1,';\n "\n />')})):null}}])}();function zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zt=function(){return!!t})()}const Ht=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,zt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._loadAnimation(e)}))}},{key:"_loadAnimation",value:function(t){var e=(0,i.u)(t),n=JSON.parse(e.data("animation"));"highlighted"!==n.textType?new jt(e,n).run():new Bt(e,n).run()}}])}(i.Default);var Vt=o(633),Wt=o.n(Vt);function Yt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function $t(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Yt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qt=function(){return!!t})()}const Ut=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,qt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._tabItems(e)}))}},{key:"_loadMore",value:function(t,e){var n=this,o=t.find(".guten-postblock").data("id"),a=e.postId,r=e.inheritQuery,s=e.postType,l=e.postOffset,c=e.numberPost,u=e.column,h=e.includePost,d=e.excludePost,f=e.includeCategory,p=e.excludeCategory,g=e.includeAuthor,m=e.includeTag,v=e.excludeTag,b=e.sortBy,y=e.htmlTag,x=e.categoryEnabled,_=e.categoryPosition,w=e.excerptEnabled,M=e.excerptLength,k=e.excerptMore,D=e.readmoreEnabled,C=e.readmoreIcon,S=e.readmoreIconPosition,P=e.readmoreText,O=e.commentEnabled,T=e.commentIcon,E=e.commentIconPosition,I=e.metaEnabled,A=e.metaAuthorEnabled,R=e.metaAuthorByText,L=e.metaAuthorIcon,F=e.metaAuthorIconPosition,j=e.metaDateEnabled,N=e.metaDateType,B=e.metaDateFormat,z=e.metaDateFormatCustom,H=e.metaDateIcon,V=e.metaDateIconPosition,W=e.postblockType,Y=e.paginationMode,$=e.paginationLoadmoreText,q=e.paginationLoadingText,U=e.paginationNumberPost,G=e.paginationScrollLimit,X=e.paginationIcon,J=e.paginationIconPosition,K=e.postItemMargin,Z=e.postItemPadding,Q=e.postItemBorder,tt=e.thumbnailRadius,et=e.paginationMargin,nt=e.paginationPadding,it=e.paginationBorder,ot=e.hideDesktop,at=e.hideTablet,rt=e.hideMobile,st=e.breakpoint,lt=e.noContentText,ct=e.backgroundHover,ut=e.contentOrder,ht=null,dt=!1;window.GutenverseData&&!Wt()(window.GutenverseData.query)&&(ht=window.GutenverseData.query,dt=!0),t.find(".guten-block-loadmore").html("<span>".concat(q,"</span>")),(0,i.apiFetch)({path:(0,i.addQueryArgs)("/gutenverse-client/v1/postblock/data",{attributes:{postItemMargin:K,postItemPadding:Z,postItemBorder:Q,thumbnailRadius:tt,paginationMargin:et,paginationPadding:nt,paginationBorder:it,hideDesktop:ot,hideTablet:at,hideMobile:rt,breakpoint:st,noContentText:lt,backgroundHover:ct,elementId:o,postId:a,inheritQuery:r,postType:s,postOffset:l,numberPost:parseInt(c)+parseInt(U),column:u,includePost:h,excludePost:d,includeCategory:f,excludeCategory:p,includeAuthor:g,includeTag:m,excludeTag:v,sortBy:b,htmlTag:y,categoryEnabled:x,categoryPosition:_,excerptEnabled:w,excerptLength:M,excerptMore:k,readmoreEnabled:D,readmoreIcon:C,readmoreIconPosition:S,readmoreText:P,commentEnabled:O,commentIcon:T,commentIconPosition:E,metaEnabled:I,metaAuthorEnabled:A,metaAuthorByText:R,metaAuthorIcon:L,metaAuthorIconPosition:F,metaDateEnabled:j,metaDateType:N,metaDateFormat:B,metaDateFormatCustom:z,metaDateIcon:H,metaDateIconPosition:V,postblockType:W,paginationMode:Y,paginationLoadmoreText:$,paginationLoadingText:q,paginationNumberPost:U,paginationScrollLimit:G,paginationIcon:X,paginationIconPosition:J,qApi:dt,qSearch:ht&&ht.q_search,qCategory:ht&&ht.q_category_name,qTag:ht&&ht.q_tag,qAuthor:ht&&ht.q_author,contentOrder:ut}})}).then((function(a){if(t.replace(a.rendered),t.find(".guten-block-loadmore").text($),"scrollload"===Y&&n._shouldItBeLoading(t,e)){var r=(0,i.u)(".".concat(o,".guten-post-block")),s=JSON.parse(r.find(".guten-postblock").data("settings"));n._loadMore(r,s)}else n._tabItems(".".concat(o,".guten-post-block"))})).catch((function(){}))}},{key:"_shouldItBeLoading",value:function(t,e){var n=e.numberPost,i=e.paginationScrollLimit,o=t.find(".guten-block-loadmore");if(t.hasClass("hide-desktop")||t.hasClass("hide-tablet")||t.hasClass("hide-mobile"))return!1;if(o.length>0){var a=o.first().getBoundingClientRect();if(a.y<window.screen.height/2&&a.y>0&&(parseInt(i)>=parseInt(n)||0===parseInt(i)))return!0}return!1}},{key:"_paginatePosts",value:function(t,e,n){var o=this,a=t.find(".guten-postblock").data("id"),r=parseInt(t.find(".guten_block_nav").data("page")||1),s=parseInt(e.numberPost,10);isNaN(n)?"next"===n?r+=1:"prev"===n&&r>1&&(r-=1):r=n;var l=null,c=!1;window.GutenverseData&&!Wt()(window.GutenverseData.query)&&(l=window.GutenverseData.query,c=!0),(0,i.apiFetch)({path:(0,i.addQueryArgs)("/gutenverse-client/v1/postblock/data",{attributes:$t($t({},e),{},{paged:r,numberPost:s,paginationNumberPost:s,qApi:c,qSearch:l&&l.q_search,qCategory:l&&l.q_category_name,qTag:l&&l.q_tag,qAuthor:l&&l.q_author})})}).then((function(e){t.html(e.rendered),o._tabItems(".".concat(a,".guten-post-block"))})).catch((function(){}))}},{key:"_tabItems",value:function(t){var e=this,n=(0,i.u)(t),o=JSON.parse(n.find(".guten-postblock").data("settings")),a=o.paginationMode;if("scrollload"===a){var r,s=function(){clearTimeout(r),r=setTimeout((function(){e._shouldItBeLoading(n,o)&&e._loadMore(n,o)}),500)};window.removeEventListener("scroll",s),window.addEventListener("scroll",s)}if("prevnext"===a||"number"===a){var l=n.find(".guten_block_nav .prev"),c=n.find(".guten_block_nav .next");l.on("click",(function(t){t.preventDefault(),l.hasClass("disabled")||e._paginatePosts(n,o,"prev")})),c.on("click",(function(t){t.preventDefault(),c.hasClass("disabled")||e._paginatePosts(n,o,"next")})),"number"===a&&"number"===a&&document.querySelectorAll(".guten_block_nav .btn-pagination").forEach((function(t){var i=t.getAttribute("data-page");i&&!isNaN(i)&&t.addEventListener("click",(function(t){t.preventDefault(),e._paginatePosts(n,o,i)}))}))}n.find(".guten-block-loadmore").on("click",(function(){e._loadMore(n,o)}))}}])}(i.Default);function Gt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Xt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Gt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jt=function(){return!!t})()}const Kt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Jt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._tabItems(e)}))}},{key:"_loadMore",value:function(t,e){var n=this,o=t.find(".guten-postlist").data("id"),a=e.postId,r=e.inheritQuery,s=e.postType,l=e.postOffset,c=e.numberPost,u=e.includePost,h=e.excludePost,d=e.includeCategory,f=e.excludeCategory,p=e.includeAuthor,g=e.includeTag,m=e.excludeTag,v=e.sortBy,b=e.layout,y=e.imageEnabled,x=e.backgroundImageEnabled,_=e.iconEnabled,w=e.icon,M=e.metaEnabled,k=e.metaDateEnabled,D=e.metaDateType,C=e.metaDateFormat,S=e.metaDateFormatCustom,P=e.metaDateIcon,O=e.metaDateIconPosition,T=e.metaCategoryEnabled,E=e.metaCategoryIcon,I=e.metaPosition,A=e.paginationMode,R=e.paginationLoadmoreText,L=e.paginationLoadingText,F=e.paginationNumberPost,j=e.paginationScrollLimit,N=e.paginationIcon,B=e.paginationIconPosition,z=null,H=!1;window.GutenverseData&&!Wt()(window.GutenverseData.query)&&(z=window.GutenverseData.query,H=!0),t.find(".guten-block-loadmore").html("<span>".concat(L,"</span>")),(0,i.apiFetch)({path:(0,i.addQueryArgs)("/gutenverse-client/v1/postlist/data",{context:"edit",attributes:{elementId:o,postId:a,inheritQuery:r,postType:s,postOffset:l,numberPost:parseInt(c)+parseInt(F),includePost:u,excludePost:h,includeCategory:d,excludeCategory:f,includeAuthor:p,includeTag:g,excludeTag:m,sortBy:v,layout:b,imageEnabled:y,backgroundImageEnabled:x,iconEnabled:_,icon:w,metaEnabled:M,metaDateEnabled:k,metaDateType:D,metaDateFormat:C,metaDateFormatCustom:S,metaDateIcon:P,metaDateIconPosition:O,metaCategoryEnabled:T,metaCategoryIcon:E,metaPosition:I,paginationMode:A,paginationLoadmoreText:R,paginationLoadingText:L,paginationNumberPost:F,paginationScrollLimit:j,paginationIcon:N,paginationIconPosition:B,qApi:H,qSearch:z&&z.q_search,qCategory:z&&z.q_category_name,qTag:z&&z.q_tag,qAuthor:z&&z.q_author}})}).then((function(a){if(t.replace(a.rendered),t.find(".guten-block-loadmore").text(R),"scrollload"===A&&n._shouldItBeLoading(t,e)){var r=(0,i.u)(".".concat(o,".guten-post-list")),s=JSON.parse(r.find(".guten-postlist").data("settings"));n._loadMore(r,s)}else n._tabItems(".".concat(o,".guten-post-list"))})).catch((function(){}))}},{key:"_shouldItBeLoading",value:function(t,e){var n=e.numberPost,i=e.paginationScrollLimit,o=t.find(".guten-block-loadmore");return o.length>0&&o.first().getBoundingClientRect().y<window.screen.height/2&&(parseInt(i)>=parseInt(n)||0===parseInt(i))}},{key:"_paginatePosts",value:function(t,e,n){var o=this,a=t.find(".guten-postlist").data("id"),r=parseInt(t.find(".guten_block_nav").data("page")||1),s=parseInt(e.numberPost,10);isNaN(n)?"next"===n?r+=1:"prev"===n&&r>1&&(r-=1):r=n;var l=null,c=!1;window.GutenverseData&&!Wt()(window.GutenverseData.query)&&(l=window.GutenverseData.query,c=!0),(0,i.apiFetch)({path:(0,i.addQueryArgs)("/gutenverse-client/v1/postlist/data",{attributes:Xt(Xt({},e),{},{paged:r,numberPost:s,paginationNumberPost:s,qApi:c,qSearch:l&&l.q_search,qCategory:l&&l.q_category_name,qTag:l&&l.q_tag,qAuthor:l&&l.q_author})})}).then((function(e){t.html(e.rendered),o._tabItems(".".concat(a,".guten-post-list"))})).catch((function(){}))}},{key:"_tabItems",value:function(t){var e=this,n=(0,i.u)(t),o=JSON.parse(n.find(".guten-postlist").data("settings")),a=o.paginationMode;if("scrollload"===a){var r,s=function(){clearTimeout(r),r=setTimeout((function(){e._shouldItBeLoading(n,o)&&e._loadMore(n,o)}),500)};window.removeEventListener("scroll",s),window.addEventListener("scroll",s)}if("prevnext"===a||"number"===a){var l=n.find(".guten_block_nav .prev"),c=n.find(".guten_block_nav .next");l.on("click",(function(t){t.preventDefault(),l.hasClass("disabled")||e._paginatePosts(n,o,"prev")})),c.on("click",(function(t){t.preventDefault(),c.hasClass("disabled")||e._paginatePosts(n,o,"next")})),"number"===a&&"number"===a&&document.querySelectorAll(".guten_block_nav .btn-pagination").forEach((function(t){var i=t.getAttribute("data-page");i&&!isNaN(i)&&t.addEventListener("click",(function(t){t.preventDefault(),e._paginatePosts(n,o,i)}))}))}n.find(".guten-block-loadmore").on("click",(function(){e._loadMore(n,o)}))}}])}(i.Default);function Zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zt=function(){return!!t})()}var Qt=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Zt()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){new te({element:e,playAnimation:t.playAnimation,getAnimationClass:t.getAnimationClass}),t.playAnimation((0,i.u)(e).find(".guten-popup-content"))}))}}])}(i.Default),te=function(){return s((function t(e){var n=e.element,o=e.playAnimation,r=e.getAnimationClass;a(this,t),this.element=(0,i.u)(n),this.popup=this.element.find(".guten-popup"),this.overlay=this.element.find(".guten-popup-overlay"),this.closeButton=this.element.find(".guten-popup-close"),this.closeOverlay=this.element.data("close-overlay"),this.dontRepeatPopup=this.element.data("hide"),this.stickyWrapper=this.element.find(".sticky-wrapper"),this.wrapperId=this.stickyWrapper.data("id"),this.wrapper=this.element.find(".guten-popup-wrapper"),this.content=this.element.find(".guten-popup-content"),this.contentClass=this.content.attr("class"),this.playAnimation=o,this.getAnimationClass=r,this.shownOnce=localStorage.getItem(this.dontRepeatPopup),this._addCloseClick(),this._addLoadEvent(),null!==this.dontRepeatPopup&&void 0!==this.dontRepeatPopup||localStorage.removeItem(localStorage.getItem("data-hide"))}),[{key:"_showPopup",value:function(){null!==this.dontRepeatPopup&&(localStorage.setItem("data-hide",this.dontRepeatPopup),null!==this.shownOnce)||(this.playAnimation(this.element.find(".guten-popup-content")),this.popup.addClass("show"),this.playAnimation(this.content))}},{key:"_closePopup",value:function(){null!==this.dontRepeatPopup&&localStorage.setItem(this.dontRepeatPopup,!0),this.popup.removeClass("show"),this.popup.addClass("load"),this.content.attr("class",this.contentClass)}},{key:"_addCloseClick",value:function(){var t=this;this.closeButton.on("click",(function(e){e.stopPropagation(),t._closePopup()})),"true"===this.closeOverlay&&(this.overlay.on("click",(function(e){e.stopPropagation(),t._closePopup()})),this.wrapper.on("click",(function(e){e.stopPropagation(),t.content.first().contains(e.target)||t._closePopup()})))}},{key:"_addLoadEvent",value:function(){var t,e,n,o,a=this,r=0,s=this.element.data("trigger"),l=function(){return a.popup.hasClass("load")};switch(s){case"load":e=(e=this.element.data("wait"))||0,l()||setTimeout((function(){a._showPopup()}),e);break;case"scroll":n=(n=this.element.data("scroll"))||0,(0,i.u)(document).on("scroll",(function(){(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)>n&&!l()&&a._showPopup()}));break;case"click":t=(t=this.element.data("anchor"))||"",o=(o=this.element.data("max-click"))?parseInt(o):void 0,(0,i.u)(document).find('*[href="#'.concat(t,'"]')).on("click",(function(t){(!o||r<o)&&(a._showPopup(),r+=1),t.preventDefault()})),(0,i.u)(document).find("#".concat(t)).on("click",(function(t){(!o||r<o)&&(a._showPopup(),r+=1),t.preventDefault()})),(0,i.u)(document).find(".guten-wrap-helper[onclick^=\"window.open('#".concat(t,"'\"]")).on("click",(function(t){(!o||r<o)&&(a._showPopup(),r+=1),t.preventDefault()}));break;case"hover":t=(t=this.element.data("anchor"))||"",o=(o=this.element.data("max-click"))?parseInt(o):void 0,(0,i.u)(document).find('*[href="#'.concat(t,'"]')).on("mouseover",(function(){(!o||r<o)&&(a._showPopup(),r+=1)})),(0,i.u)(document).find("#".concat(t)).on("mouseover",(function(t){(!o||r<o)&&(a._showPopup(),r+=1),t.preventDefault()})),(0,i.u)(document).find(".guten-wrap-helper[onclick^=\"window.open('#".concat(t,"'\"]")).on("mouseover",(function(t){(!o||r<o)&&(a._showPopup(),r+=1),t.preventDefault()}));break;case"exit":(0,i.u)(document.body).on("mouseleave",(function(t){0>t.clientY&&!l()&&a._showPopup()}))}}}])}();const ee=Qt;function ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ne=function(){return!!t})()}const ie=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,ne()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t.__searchItems(e)}))}},{key:"__searchItems",value:function(t){var e=(0,i.u)(t),n={form:e.find(".gutenverse-search-form"),inputField:e.find(".gutenverse-search-form").find(".gutenverse-search-input"),closeIcon:e.find(".gutenverse-search-form").find(".close-icon")};this.__firstLoad(n),this.__addActionToForm(n.form),this.__addClickEvents(n)}},{key:"__firstLoad",value:function(t){t.closeIcon.first().style.visibility="hidden"}},{key:"__addActionToForm",value:function(t){var e;t.attr("action",null===(e=window)||void 0===e||null===(e=e.GutenverseData)||void 0===e?void 0:e.homeUrl)}},{key:"__addClickEvents",value:function(t){t.closeIcon.on("click",(function(){t.inputField.first().value="",t.closeIcon.first().style.visibility="hidden"})),t.inputField.on("input",(function(e){var n=e.target.value;t.closeIcon.first().style.visibility=""!==n?"visible":"hidden"}))}}])}(i.Default);function oe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oe=function(){return!!t})()}const ae=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,oe()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._init(e)}))}},{key:"_init",value:function(t){var e=(0,i.u)(t),n=e.data("form-id"),o=window.GutenverseFormValidationData.filter((function(t){return t.formId==n}));0!==o.length?(o[0].require_login&&!o[0].logged_in?e.remove():(e.attr("style",""),this._onSubmit(e,o[0])),e.find(".guten-submit-wrapper").each((function(t){var e=(0,i.u)(t),n=e.find(".gutenverse-input-submit").attr("class"),o=e.find(".gutenverse-input-submit").first().getBoundingClientRect();e.find(".gutenverse-input-submit-loader").addClass(n),e.find(".gutenverse-input-submit-loader").attr("style","width:".concat(o.width,"px;height:").concat(o.height,"px;"))}))):(e.attr("style",""),this._onSubmit(e,o[0]),e.find(".guten-submit-wrapper").each((function(t){var e=(0,i.u)(t),n=e.find(".gutenverse-input-submit").attr("class"),o=e.find(".gutenverse-input-submit").first().getBoundingClientRect();e.find(".gutenverse-input-submit-loader").addClass(n),e.find(".gutenverse-input-submit-loader").attr("style","width:".concat(o.width,"px;height:").concat(o.height,"px;"))})))}},{key:"_getInputValue",value:function(t,e,n){var o=e.value;if(n){var a=(0,i.u)(e).attr("name");switch(n.type){case"checkbox":o=[],t.find("input[name='".concat(a,"'][type='checkbox']")).each((function(t){t.checked&&o.push(t.value)}));break;case"radio":case"image-radio":case"payment":t.find("input[name='".concat(a,"'][type='radio']")).each((function(t){t.checked&&(o=t.value)}));break;case"multiselect":o=[],t.find("select[name='".concat(a,"']")).filter(".gutenverse-input-multiselect").each((function(t){(0,i.u)(t).find("option").each((function(t){(0,i.u)(t).attr("value")&&o.push((0,i.u)(t).attr("value"))}))}));break;case"multi-group-select":o=[],t.find("select[name='".concat(a,"']")).filter(".multi-group-select").each((function(t){(0,i.u)(t).find("option").each((function(t){(0,i.u)(t).attr("value")&&o.push((0,i.u)(t).attr("value"))}))}))}}return"checkbox"===e.type&&(0,i.u)(e).hasClass("gutenverse-input-switch")&&(o=e.checked),o}},{key:"_getInputType",value:function(t,e){return t&&t.type&&e.hasClass("guten-form-input-".concat(t.type))?t.type:e.hasClass("guten-form-input-switch")?"switch":null}},{key:"_onSubmit",value:function(t,e){var o=this,a=this,r=t.data("form-id"),s=Wt()(window.GutenverseData)?0:window.GutenverseData.postId,l=t.data("hide-after"),c=t.data("redirect");t.on("submit",(function(u){u.preventDefault();var h=u.target,d=(0,i.u)(h),f=[],p=!0,g=null,m=!1,v=!1,b=!1,y=!1;t.find(".gutenverse-input").each((function(t){var e=(0,i.u)(t),n=JSON.parse(e.data("validation")),o=e.attr("name");g=a._getInputValue(d,t,n);var r=a.__validate(e,g,n),s=e.closest(".guten-form-input"),l=a._getInputType(n,s);r?(0,i.u)(s).removeClass("input-invalid"):(0,i.u)(s).addClass("input-invalid"),p=p&&r;var c=(0,i.u)(s).data("guten-input-rule");c&&"hide"===c||(f.push({id:o,value:g,type:l}),n?(m="payment"===n.type&&g,v="payment"===n.type&&g,y="payment"===n.type&&JSON.parse(e.data("payment-option"))):(m=!1,v=!1,y=!1))})),p&&(d.addClass("loading"),d.find(".form-notification").remove(),(0,i.apiFetch)({path:"gutenverse-form-client/v1/form/submit",method:"POST",data:n({},"form-entry",{formId:r,postId:s,data:f})}).then((function(t){var n=t.entry_id;if(m){var a=y.amountInput,r=f.find((function(t){return t.id===a}));b=r.value;var s='<div class="form-notification"><div class="notification-body '.concat("guten-loading",'">').concat("Please wait you are being redirected","</div></div>");d.prepend(s),(0,i.apiFetch)({path:"gutenverse-pro/v1/form-payment",method:"POST",data:{payment:{paymentMethod:v,paymentPrice:b,paymentOption:y,paymentItemName:!1,redirectTo:c,id:n,currentUrl:window.location.href}}}).then((function(t){window.location=t.url})).catch((function(t){d.find(".form-notification").remove();var e=t.data&&t.data.error?t.data.error:t.message,n='<div class="form-notification"><div class="notification-body '.concat("guten-error",'">').concat(e,"</div></div>");d.prepend(n),d.removeClass("loading")}))}else o._requestMessage(d,e,"success",l)})).catch((function(t){d.find(".form-notification").remove();var n=t.data&&t.data.error?t.data.error:t.message,i='<div class="form-notification"><div class="notification-body '.concat("guten-error",'">').concat(n,"</div></div>");d.prepend(i),d.removeClass("loading"),o._requestMessage(d,e,"error",l)})).finally((function(){m||d.removeClass("loading"),c&&!m&&(window.location=c)})))}))}},{key:"_requestMessage",value:function(t,e,n,i){var o="",a="";switch(n){case"success":o=e.form_success_notice,a="guten-success";break;case"error":o=e.form_error_notice,a="guten-error"}if(Wt()(o))"true"!==i&&!0!==i||t.remove();else{var r='<div class="form-notification"><div class="notification-body '.concat(a,'">').concat(o,"</div></div>");"true"===i||!0===i?t.html(r):t.prepend(r)}}},{key:"__validateEmail",value:function(t){return/\S+@\S+\.\S+/.test(t)}},{key:"__validate",value:function(t,e,n){var o=t.closest(".guten-form-input"),a=(0,i.u)(o).data("guten-input-rule");if(a&&"hide"===a)return!0;if(n){if(!0===n.required){if("radio"===n.type||"image-radio"===n.type||"payment"===n.type)return void 0!==e;if("checkbox"===n.type)return 0!==e.length;if(""===e||0===e.length)return!1}if("character"===n.validationType){var r=e.length;return r>=n.validationMin&&r<=n.validationMax}if("word"===n.validationType){var s=e.split(" ").length;return s>=n.validationMin&&s<=n.validationMax}if("email"===n.type)return this.__validateEmail(e)}return!0}}])}(i.Default);var re=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],se={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(t){return"undefined"!=typeof console&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var n=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},le={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1};const ce=le;var ue=function(t,e){return void 0===e&&(e=2),("000"+t).slice(-1*e)},he=function(t){return!0===t?1:0};function de(t,e){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout((function(){return t.apply(i,o)}),e)}}var fe=function(t){return t instanceof Array?t:[t]};function pe(t,e,n){if(!0===n)return t.classList.add(e);t.classList.remove(e)}function ge(t,e,n){var i=window.document.createElement(t);return e=e||"",n=n||"",i.className=e,void 0!==n&&(i.textContent=n),i}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ve(t,e){return e(t)?t:t.parentNode?ve(t.parentNode,e):void 0}function be(t,e){var n=ge("div","numInputWrapper"),i=ge("input","numInput "+t),o=ge("span","arrowUp"),a=ge("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==e)for(var r in e)i.setAttribute(r,e[r]);return n.appendChild(i),n.appendChild(o),n.appendChild(a),n}function ye(t){try{return"function"==typeof t.composedPath?t.composedPath()[0]:t.target}catch(e){return t.target}}var xe=function(){},_e=function(t,e,n){return n.months[e?"shorthand":"longhand"][t]},we={D:xe,F:function(t,e,n){t.setMonth(n.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,n){t.setHours(t.getHours()%12+12*he(new RegExp(n.amPM[1],"i").test(e)))},M:function(t,e,n){t.setMonth(n.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(1e3*parseFloat(e))},W:function(t,e,n){var i=parseInt(e),o=new Date(t.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:xe,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:xe,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}},Me={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ke={Z:function(t){return t.toISOString()},D:function(t,e,n){return e.weekdays.shorthand[ke.w(t,e,n)]},F:function(t,e,n){return _e(ke.n(t,e,n)-1,!1,e)},G:function(t,e,n){return ue(ke.h(t,e,n))},H:function(t){return ue(t.getHours())},J:function(t,e){return void 0!==e.ordinal?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[he(t.getHours()>11)]},M:function(t,e){return _e(t.getMonth(),!0,e)},S:function(t){return ue(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,n){return n.getWeek(t)},Y:function(t){return ue(t.getFullYear(),4)},d:function(t){return ue(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return ue(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return ue(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}},De=function(t){var e=t.config,n=void 0===e?se:e,i=t.l10n,o=void 0===i?le:i,a=t.isMobile,r=void 0!==a&&a;return function(t,e,i){var a=i||o;return void 0===n.formatDate||r?e.split("").map((function(e,i,o){return ke[e]&&"\\"!==o[i-1]?ke[e](t,a,n):"\\"!==e?e:""})).join(""):n.formatDate(t,e,a)}},Ce=function(t){var e=t.config,n=void 0===e?se:e,i=t.l10n,o=void 0===i?le:i;return function(t,e,i,a){if(0===t||t){var r,s=a||o,l=t;if(t instanceof Date)r=new Date(t.getTime());else if("string"!=typeof t&&void 0!==t.toFixed)r=new Date(t);else if("string"==typeof t){var c=e||(n||se).dateFormat,u=String(t).trim();if("today"===u)r=new Date,i=!0;else if(n&&n.parseDate)r=n.parseDate(t,c);else if(/Z$/.test(u)||/GMT$/.test(u))r=new Date(t);else{for(var h=void 0,d=[],f=0,p=0,g="";f<c.length;f++){var m=c[f],v="\\"===m,b="\\"===c[f-1]||v;if(Me[m]&&!b){g+=Me[m];var y=new RegExp(g).exec(t);y&&(h=!0)&&d["Y"!==m?"push":"unshift"]({fn:we[m],val:y[++p]})}else v||(g+=".")}r=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),d.forEach((function(t){var e=t.fn,n=t.val;return r=e(r,n,s)||r})),r=h?r:void 0}}if(r instanceof Date&&!isNaN(r.getTime()))return!0===i&&r.setHours(0,0,0,0),r;n.errorHandler(new Error("Invalid date provided: "+l))}}};function Se(t,e,n){return void 0===n&&(n=!0),!1!==n?new Date(t.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):t.getTime()-e.getTime()}var Pe=function(t,e,n){return 3600*t+60*e+n};function Oe(t){var e=t.defaultHour,n=t.defaultMinute,i=t.defaultSeconds;if(void 0!==t.minDate){var o=t.minDate.getHours(),a=t.minDate.getMinutes(),r=t.minDate.getSeconds();e<o&&(e=o),e===o&&n<a&&(n=a),e===o&&n===a&&i<r&&(i=t.minDate.getSeconds())}if(void 0!==t.maxDate){var s=t.maxDate.getHours(),l=t.maxDate.getMinutes();(e=Math.min(e,s))===s&&(n=Math.min(l,n)),e===s&&n===l&&(i=t.maxDate.getSeconds())}return{hours:e,minutes:n,seconds:i}}o(896);var Te=function(){return Te=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Te.apply(this,arguments)},Ee=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),o=0;for(e=0;e<n;e++)for(var a=arguments[e],r=0,s=a.length;r<s;r++,o++)i[o]=a[r];return i};function Ie(t,e){var n={config:Te(Te({},se),Re.defaultConfig),l10n:ce};function i(){var t;return(null===(t=n.calendarContainer)||void 0===t?void 0:t.getRootNode()).activeElement||document.activeElement}function o(t){return t.bind(n)}function a(){var t=n.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){var e=(n.days.offsetWidth+1)*t.showMonths;n.daysContainer.style.width=e+"px",n.calendarContainer.style.width=e+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function r(t){if(0===n.selectedDates.length){var e=void 0===n.config.minDate||Se(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),i=Oe(n.config);e.setHours(i.hours,i.minutes,i.seconds,e.getMilliseconds()),n.selectedDates=[e],n.latestSelectedDateObj=e}void 0!==t&&"blur"!==t.type&&function(t){t.preventDefault();var e="keydown"===t.type,i=ye(t),o=i;void 0!==n.amPM&&i===n.amPM&&(n.amPM.textContent=n.l10n.amPM[he(n.amPM.textContent===n.l10n.amPM[0])]);var a=parseFloat(o.getAttribute("min")),r=parseFloat(o.getAttribute("max")),s=parseFloat(o.getAttribute("step")),l=parseInt(o.value,10),c=l+s*(t.delta||(e?38===t.which?1:-1:0));if(void 0!==o.value&&2===o.value.length){var u=o===n.hourElement,h=o===n.minuteElement;c<a?(c=r+c+he(!u)+(he(u)&&he(!n.amPM)),h&&g(void 0,-1,n.hourElement)):c>r&&(c=o===n.hourElement?c-r-he(!n.amPM):a,h&&g(void 0,1,n.hourElement)),n.amPM&&u&&(1===s?c+l===23:Math.abs(c-l)>s)&&(n.amPM.textContent=n.l10n.amPM[he(n.amPM.textContent===n.l10n.amPM[0])]),o.value=ue(c)}}(t);var o=n._input.value;s(),Q(),n._input.value!==o&&n._debouncedChange()}function s(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var t,e,i=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(n.minuteElement.value,10)||0)%60,a=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(t=i,e=n.amPM.textContent,i=t%12+12*he(e===n.l10n.amPM[1]));var r=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===Se(n.latestSelectedDateObj,n.config.minDate,!0),s=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===Se(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var l=Pe(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),u=Pe(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),h=Pe(i,o,a);if(h>u&&h<l){var d=function(t){var e=Math.floor(t/3600),n=(t-3600*e)/60;return[e,n,t-3600*e-60*n]}(l);i=d[0],o=d[1],a=d[2]}}else{if(s){var f=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;(i=Math.min(i,f.getHours()))===f.getHours()&&(o=Math.min(o,f.getMinutes())),o===f.getMinutes()&&(a=Math.min(a,f.getSeconds()))}if(r){var p=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;(i=Math.max(i,p.getHours()))===p.getHours()&&o<p.getMinutes()&&(o=p.getMinutes()),o===p.getMinutes()&&(a=Math.max(a,p.getSeconds()))}}c(i,o,a)}}function l(t){var e=t||n.latestSelectedDateObj;e&&e instanceof Date&&c(e.getHours(),e.getMinutes(),e.getSeconds())}function c(t,e,i){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(t%24,e,i||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=ue(n.config.time_24hr?t:(12+t)%12+12*he(t%12==0)),n.minuteElement.value=ue(e),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[he(t>=12)]),void 0!==n.secondElement&&(n.secondElement.value=ue(i)))}function u(t){var e=ye(t),n=parseInt(e.value)+(t.delta||0);(n/1e3>1||"Enter"===t.key&&!/[^\d]/.test(n.toString()))&&T(n)}function h(t,e,i,o){return e instanceof Array?e.forEach((function(e){return h(t,e,i,o)})):t instanceof Array?t.forEach((function(t){return h(t,e,i,o)})):(t.addEventListener(e,i,o),void n._handlers.push({remove:function(){return t.removeEventListener(e,i,o)}}))}function d(){G("onChange")}function f(t,e){var i=void 0!==t?n.parseDate(t):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),o=n.currentYear,a=n.currentMonth;try{void 0!==i&&(n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth())}catch(t){t.message="Invalid date supplied: "+i,n.config.errorHandler(t)}e&&n.currentYear!==o&&(G("onYearChange"),w()),!e||n.currentYear===o&&n.currentMonth===a||G("onMonthChange"),n.redraw()}function p(t){var e=ye(t);~e.className.indexOf("arrow")&&g(t,e.classList.contains("arrowUp")?1:-1)}function g(t,e,n){var i=t&&ye(t),o=n||i&&i.parentNode&&i.parentNode.firstChild,a=X("increment");a.delta=e,o&&o.dispatchEvent(a)}function m(t,e,i,o){var a=E(e,!0),r=ge("span",t,e.getDate().toString());return r.dateObj=e,r.$i=o,r.setAttribute("aria-label",n.formatDate(e,n.config.ariaDateFormat)),-1===t.indexOf("hidden")&&0===Se(e,n.now)&&(n.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),a?(r.tabIndex=-1,J(e)&&(r.classList.add("selected"),n.selectedDateElem=r,"range"===n.config.mode&&(pe(r,"startRange",n.selectedDates[0]&&0===Se(e,n.selectedDates[0],!0)),pe(r,"endRange",n.selectedDates[1]&&0===Se(e,n.selectedDates[1],!0)),"nextMonthDay"===t&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===n.config.mode&&function(t){return!("range"!==n.config.mode||n.selectedDates.length<2)&&Se(t,n.selectedDates[0])>=0&&Se(t,n.selectedDates[1])<=0}(e)&&!J(e)&&r.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==t&&o%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(e)+"</span>"),G("onDayCreate",r),r}function v(t){t.focus(),"range"===n.config.mode&&L(t)}function b(t){for(var e=t>0?0:n.config.showMonths-1,i=t>0?n.config.showMonths:-1,o=e;o!=i;o+=t)for(var a=n.daysContainer.children[o],r=t>0?0:a.children.length-1,s=t>0?a.children.length:-1,l=r;l!=s;l+=t){var c=a.children[l];if(-1===c.className.indexOf("hidden")&&E(c.dateObj))return c}}function y(t,e){var o=i(),a=I(o||document.body),r=void 0!==t?t:a?o:void 0!==n.selectedDateElem&&I(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&I(n.todayDateElem)?n.todayDateElem:b(e>0?1:-1);void 0===r?n._input.focus():a?function(t,e){for(var i=-1===t.className.indexOf("Month")?t.dateObj.getMonth():n.currentMonth,o=e>0?n.config.showMonths:-1,a=e>0?1:-1,r=i-n.currentMonth;r!=o;r+=a)for(var s=n.daysContainer.children[r],l=i-n.currentMonth===r?t.$i+e:e<0?s.children.length-1:0,c=s.children.length,u=l;u>=0&&u<c&&u!=(e>0?c:-1);u+=a){var h=s.children[u];if(-1===h.className.indexOf("hidden")&&E(h.dateObj)&&Math.abs(t.$i-u)>=Math.abs(e))return v(h)}n.changeMonth(a),y(b(a),0)}(r,e):v(r)}function x(t,e){for(var i=(new Date(t,e,1).getDay()-n.l10n.firstDayOfWeek+7)%7,o=n.utils.getDaysInMonth((e-1+12)%12,t),a=n.utils.getDaysInMonth(e,t),r=window.document.createDocumentFragment(),s=n.config.showMonths>1,l=s?"prevMonthDay hidden":"prevMonthDay",c=s?"nextMonthDay hidden":"nextMonthDay",u=o+1-i,h=0;u<=o;u++,h++)r.appendChild(m("flatpickr-day "+l,new Date(t,e-1,u),0,h));for(u=1;u<=a;u++,h++)r.appendChild(m("flatpickr-day",new Date(t,e,u),0,h));for(var d=a+1;d<=42-i&&(1===n.config.showMonths||h%7!=0);d++,h++)r.appendChild(m("flatpickr-day "+c,new Date(t,e+1,d%a),0,h));var f=ge("div","dayContainer");return f.appendChild(r),f}function _(){if(void 0!==n.daysContainer){me(n.daysContainer),n.weekNumbers&&me(n.weekNumbers);for(var t=document.createDocumentFragment(),e=0;e<n.config.showMonths;e++){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+e),t.appendChild(x(i.getFullYear(),i.getMonth()))}n.daysContainer.appendChild(t),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&L()}}function w(){if(!(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)){var t=function(t){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&t<n.config.minDate.getMonth()||void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&t>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++)if(t(e)){var i=ge("option","flatpickr-monthDropdown-month");i.value=new Date(n.currentYear,e).getMonth().toString(),i.textContent=_e(e,n.config.shorthandCurrentMonth,n.l10n),i.tabIndex=-1,n.currentMonth===e&&(i.selected=!0),n.monthsDropdownContainer.appendChild(i)}}}function M(){var t,e=ge("div","flatpickr-month"),i=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?t=ge("span","cur-month"):(n.monthsDropdownContainer=ge("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),h(n.monthsDropdownContainer,"change",(function(t){var e=ye(t),i=parseInt(e.value,10);n.changeMonth(i-n.currentMonth),G("onMonthChange")})),w(),t=n.monthsDropdownContainer);var o=be("cur-year",{tabindex:"-1"}),a=o.getElementsByTagName("input")[0];a.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&a.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(a.setAttribute("max",n.config.maxDate.getFullYear().toString()),a.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var r=ge("div","flatpickr-current-month");return r.appendChild(t),r.appendChild(o),i.appendChild(r),e.appendChild(i),{container:e,yearElement:a,monthElement:t}}function k(){me(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var t=n.config.showMonths;t--;){var e=M();n.yearElements.push(e.yearElement),n.monthElements.push(e.monthElement),n.monthNav.appendChild(e.container)}n.monthNav.appendChild(n.nextMonthNav)}function D(){n.weekdayContainer?me(n.weekdayContainer):n.weekdayContainer=ge("div","flatpickr-weekdays");for(var t=n.config.showMonths;t--;){var e=ge("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(e)}return C(),n.weekdayContainer}function C(){if(n.weekdayContainer){var t=n.l10n.firstDayOfWeek,e=Ee(n.l10n.weekdays.shorthand);t>0&&t<e.length&&(e=Ee(e.splice(t,e.length),e.splice(0,t)));for(var i=n.config.showMonths;i--;)n.weekdayContainer.children[i].innerHTML="\n <span class='flatpickr-weekday'>\n "+e.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function S(t,e){void 0===e&&(e=!0);var i=e?t:t-n.currentMonth;i<0&&!0===n._hidePrevMonthArrow||i>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=i,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,G("onYearChange"),w()),_(),G("onMonthChange"),K())}function P(t){return n.calendarContainer.contains(t)}function O(t){if(n.isOpen&&!n.config.inline){var e=ye(t),i=P(e),o=!(e===n.input||e===n.altInput||n.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(n.input)||~t.path.indexOf(n.altInput))||i||P(t.relatedTarget)),a=!n.config.ignoredFocusElements.some((function(t){return t.contains(e)}));o&&a&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&r(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function T(t){if(!(!t||n.config.minDate&&t<n.config.minDate.getFullYear()||n.config.maxDate&&t>n.config.maxDate.getFullYear())){var e=t,i=n.currentYear!==e;n.currentYear=e||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),i&&(n.redraw(),G("onYearChange"),w())}}function E(t,e){var i;void 0===e&&(e=!0);var o=n.parseDate(t,void 0,e);if(n.config.minDate&&o&&Se(o,n.config.minDate,void 0!==e?e:!n.minDateHasTime)<0||n.config.maxDate&&o&&Se(o,n.config.maxDate,void 0!==e?e:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===o)return!1;for(var a=!!n.config.enable,r=null!==(i=n.config.enable)&&void 0!==i?i:n.config.disable,s=0,l=void 0;s<r.length;s++){if("function"==typeof(l=r[s])&&l(o))return a;if(l instanceof Date&&void 0!==o&&l.getTime()===o.getTime())return a;if("string"==typeof l){var c=n.parseDate(l,void 0,!0);return c&&c.getTime()===o.getTime()?a:!a}if("object"==typeof l&&void 0!==o&&l.from&&l.to&&o.getTime()>=l.from.getTime()&&o.getTime()<=l.to.getTime())return a}return!a}function I(t){return void 0!==n.daysContainer&&-1===t.className.indexOf("hidden")&&-1===t.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(t)}function A(t){var e=t.target===n._input,i=n._input.value.trimEnd()!==Z();!e||!i||t.relatedTarget&&P(t.relatedTarget)||n.setDate(n._input.value,!0,t.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function R(e){var o=ye(e),a=n.config.wrap?t.contains(o):o===n._input,l=n.config.allowInput,c=n.isOpen&&(!l||!a),u=n.config.inline&&a&&!l;if(13===e.keyCode&&a){if(l)return n.setDate(n._input.value,!0,o===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),o.blur();n.open()}else if(P(o)||c||u){var h=!!n.timeContainer&&n.timeContainer.contains(o);switch(e.keyCode){case 13:h?(e.preventDefault(),r(),V()):W(e);break;case 27:e.preventDefault(),V();break;case 8:case 46:a&&!n.config.allowInput&&(e.preventDefault(),n.clear());break;case 37:case 39:if(h||a)n.hourElement&&n.hourElement.focus();else{e.preventDefault();var d=i();if(void 0!==n.daysContainer&&(!1===l||d&&I(d))){var f=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),S(f),y(b(1),0)):y(void 0,f)}}break;case 38:case 40:e.preventDefault();var p=40===e.keyCode?1:-1;n.daysContainer&&void 0!==o.$i||o===n.input||o===n.altInput?e.ctrlKey?(e.stopPropagation(),T(n.currentYear-p),y(b(1),0)):h||y(void 0,7*p):o===n.currentYearElement?T(n.currentYear-p):n.config.enableTime&&(!h&&n.hourElement&&n.hourElement.focus(),r(e),n._debouncedChange());break;case 9:if(h){var g=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(t){return t})),m=g.indexOf(o);if(-1!==m){var v=g[m+(e.shiftKey?-1:1)];e.preventDefault(),(v||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(o)&&e.shiftKey&&(e.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&o===n.amPM)switch(e.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],s(),Q();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],s(),Q()}(a||P(o))&&G("onKeyDown",e)}function L(t,e){if(void 0===e&&(e="flatpickr-day"),1===n.selectedDates.length&&(!t||t.classList.contains(e)&&!t.classList.contains("flatpickr-disabled"))){for(var i=t?t.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),o=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),a=Math.min(i,n.selectedDates[0].getTime()),r=Math.max(i,n.selectedDates[0].getTime()),s=!1,l=0,c=0,u=a;u<r;u+=864e5)E(new Date(u),!0)||(s=s||u>a&&u<r,u<o&&(!l||u>l)?l=u:u>o&&(!c||u<c)&&(c=u));Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+e)).forEach((function(e){var a,r,u,h=e.dateObj.getTime(),d=l>0&&h<l||c>0&&h>c;if(d)return e.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));s&&!d||(["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)})),void 0!==t&&(t.classList.add(i<=n.selectedDates[0].getTime()?"startRange":"endRange"),o<i&&h===o?e.classList.add("startRange"):o>i&&h===o&&e.classList.add("endRange"),h>=l&&(0===c||h<=c)&&(r=o,u=i,(a=h)>Math.min(r,u)&&a<Math.max(r,u))&&e.classList.add("inRange")))}))}}function F(){!n.isOpen||n.config.static||n.config.inline||z()}function j(t){return function(e){var i=n.config["_"+t+"Date"]=n.parseDate(e,n.config.dateFormat),o=n.config["_"+("min"===t?"max":"min")+"Date"];void 0!==i&&(n["min"===t?"minDateHasTime":"maxDateHasTime"]=i.getHours()>0||i.getMinutes()>0||i.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(t){return E(t)})),n.selectedDates.length||"min"!==t||l(i),Q()),n.daysContainer&&(H(),void 0!==i?n.currentYearElement[t]=i.getFullYear().toString():n.currentYearElement.removeAttribute(t),n.currentYearElement.disabled=!!o&&void 0!==i&&o.getFullYear()===i.getFullYear())}}function N(){return n.config.wrap?t.querySelector("[data-input]"):t}function B(){"object"!=typeof n.config.locale&&void 0===Re.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=Te(Te({},Re.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?Re.l10ns[n.config.locale]:void 0),Me.D="("+n.l10n.weekdays.shorthand.join("|")+")",Me.l="("+n.l10n.weekdays.longhand.join("|")+")",Me.M="("+n.l10n.months.shorthand.join("|")+")",Me.F="("+n.l10n.months.longhand.join("|")+")",Me.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===Te(Te({},e),JSON.parse(JSON.stringify(t.dataset||{}))).time_24hr&&void 0===Re.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=De(n),n.parseDate=Ce({config:n.config,l10n:n.l10n})}function z(t){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){G("onPreCalendarPosition");var e=t||n._positionElement,i=Array.prototype.reduce.call(n.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),o=n.calendarContainer.offsetWidth,a=n.config.position.split(" "),r=a[0],s=a.length>1?a[1]:null,l=e.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===r||"below"!==r&&c<i&&l.top>i,h=window.pageYOffset+l.top+(u?-i-2:e.offsetHeight+2);if(pe(n.calendarContainer,"arrowTop",!u),pe(n.calendarContainer,"arrowBottom",u),!n.config.inline){var d=window.pageXOffset+l.left,f=!1,p=!1;"center"===s?(d-=(o-l.width)/2,f=!0):"right"===s&&(d-=o-l.width,p=!0),pe(n.calendarContainer,"arrowLeft",!f&&!p),pe(n.calendarContainer,"arrowCenter",f),pe(n.calendarContainer,"arrowRight",p);var g=window.document.body.offsetWidth-(window.pageXOffset+l.right),m=d+o>window.document.body.offsetWidth,v=g+o>window.document.body.offsetWidth;if(pe(n.calendarContainer,"rightMost",m),!n.config.static)if(n.calendarContainer.style.top=h+"px",m)if(v){var b=function(){for(var t=null,e=0;e<document.styleSheets.length;e++){var n=document.styleSheets[e];if(n.cssRules){try{n.cssRules}catch(t){continue}t=n;break}}return null!=t?t:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===b)return;var y=window.document.body.offsetWidth,x=Math.max(0,y/2-o/2),_=b.cssRules.length,w="{left:"+l.left+"px;right:auto;}";pe(n.calendarContainer,"rightMost",!1),pe(n.calendarContainer,"centerMost",!0),b.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,_),n.calendarContainer.style.left=x+"px",n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=g+"px";else n.calendarContainer.style.left=d+"px",n.calendarContainer.style.right="auto"}}}else n.config.position(n,t)}function H(){n.config.noCalendar||n.isMobile||(w(),K(),_())}function V(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function W(t){t.preventDefault(),t.stopPropagation();var e=ve(ye(t),(function(t){return t.classList&&t.classList.contains("flatpickr-day")&&!t.classList.contains("flatpickr-disabled")&&!t.classList.contains("notAllowed")}));if(void 0!==e){var i=e,o=n.latestSelectedDateObj=new Date(i.dateObj.getTime()),a=(o.getMonth()<n.currentMonth||o.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=i,"single"===n.config.mode)n.selectedDates=[o];else if("multiple"===n.config.mode){var r=J(o);r?n.selectedDates.splice(parseInt(r),1):n.selectedDates.push(o)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=o,n.selectedDates.push(o),0!==Se(o,n.selectedDates[0],!0)&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()})));if(s(),a){var l=n.currentYear!==o.getFullYear();n.currentYear=o.getFullYear(),n.currentMonth=o.getMonth(),l&&(G("onYearChange"),w()),G("onMonthChange")}if(K(),_(),Q(),a||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():v(i),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var c="single"===n.config.mode&&!n.config.enableTime,u="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(c||u)&&V()}d()}}n.parseDate=Ce({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=h,n._setHoursFromDate=l,n._positionCalendar=z,n.changeMonth=S,n.changeYear=T,n.clear=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!0),n.input.value="",void 0!==n.altInput&&(n.altInput.value=""),void 0!==n.mobileInput&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===e&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),!0===n.config.enableTime){var i=Oe(n.config);c(i.hours,i.minutes,i.seconds)}n.redraw(),t&&G("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active")),G("onClose")},n.onMouseOver=L,n._createElement=ge,n.createDay=m,n.destroy=function(){void 0!==n.config&&G("onDestroy");for(var t=n._handlers.length;t--;)n._handlers[t].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var e=n.calendarContainer.parentNode;if(e.lastChild&&e.removeChild(e.lastChild),e.parentNode){for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete n[t]}catch(t){}}))},n.isEnabled=E,n.jumpToDate=f,n.updateValue=Q,n.open=function(t,e){if(void 0===e&&(e=n._positionElement),!0===n.isMobile){if(t){t.preventDefault();var i=ye(t);i&&i.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void G("onOpen")}if(!n._input.disabled&&!n.config.inline){var o=n.isOpen;n.isOpen=!0,o||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),G("onOpen"),z(e)),!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==t&&n.timeContainer.contains(t.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))}},n.redraw=H,n.set=function(t,e){if(null!==t&&"object"==typeof t)for(var i in Object.assign(n.config,t),t)void 0!==Y[i]&&Y[i].forEach((function(t){return t()}));else n.config[t]=e,void 0!==Y[t]?Y[t].forEach((function(t){return t()})):re.indexOf(t)>-1&&(n.config[t]=fe(e));n.redraw(),Q(!0)},n.setDate=function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=n.config.dateFormat),0!==t&&!t||t instanceof Array&&0===t.length)return n.clear(e);$(t,i),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),f(void 0,e),l(),0===n.selectedDates.length&&n.clear(!1),Q(e),e&&G("onChange")},n.toggle=function(t){if(!0===n.isOpen)return n.close();n.open(t)};var Y={locale:[B,C],showMonths:[k,a,D],minDate:[f],maxDate:[f],positionElement:[U],clickOpens:[function(){!0===n.config.clickOpens?(h(n._input,"focus",n.open),h(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function $(t,e){var i=[];if(t instanceof Array)i=t.map((function(t){return n.parseDate(t,e)}));else if(t instanceof Date||"number"==typeof t)i=[n.parseDate(t,e)];else if("string"==typeof t)switch(n.config.mode){case"single":case"time":i=[n.parseDate(t,e)];break;case"multiple":i=t.split(n.config.conjunction).map((function(t){return n.parseDate(t,e)}));break;case"range":i=t.split(n.l10n.rangeSeparator).map((function(t){return n.parseDate(t,e)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));n.selectedDates=n.config.allowInvalidPreload?i:i.filter((function(t){return t instanceof Date&&E(t,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function q(t){return t.slice().map((function(t){return"string"==typeof t||"number"==typeof t||t instanceof Date?n.parseDate(t,void 0,!0):t&&"object"==typeof t&&t.from&&t.to?{from:n.parseDate(t.from,void 0),to:n.parseDate(t.to,void 0)}:t})).filter((function(t){return t}))}function U(){n._positionElement=n.config.positionElement||n._input}function G(t,e){if(void 0!==n.config){var i=n.config[t];if(void 0!==i&&i.length>0)for(var o=0;i[o]&&o<i.length;o++)i[o](n.selectedDates,n.input.value,n,e);"onChange"===t&&(n.input.dispatchEvent(X("change")),n.input.dispatchEvent(X("input")))}}function X(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}function J(t){for(var e=0;e<n.selectedDates.length;e++){var i=n.selectedDates[e];if(i instanceof Date&&0===Se(i,t))return""+e}return!1}function K(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((function(t,e){var i=new Date(n.currentYear,n.currentMonth,1);i.setMonth(n.currentMonth+e),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[e].textContent=_e(i.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=i.getMonth().toString(),t.value=i.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function Z(t){var e=t||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(t){return n.formatDate(t,e)})).filter((function(t,e,i){return"range"!==n.config.mode||n.config.enableTime||i.indexOf(t)===e})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function Q(t){void 0===t&&(t=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=Z(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=Z(n.config.altFormat)),!1!==t&&G("onValueUpdate")}function tt(t){var e=ye(t),i=n.prevMonthNav.contains(e),o=n.nextMonthNav.contains(e);i||o?S(i?-1:1):n.yearElements.indexOf(e)>=0?e.select():e.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):e.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=t,n.isOpen=!1,function(){var i=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=Te(Te({},JSON.parse(JSON.stringify(t.dataset||{}))),e),r={};n.config.parseDate=a.parseDate,n.config.formatDate=a.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(t){n.config._enable=q(t)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(t){n.config._disable=q(t)}});var s="time"===a.mode;if(!a.dateFormat&&(a.enableTime||s)){var l=Re.defaultConfig.dateFormat||se.dateFormat;r.dateFormat=a.noCalendar||s?"H:i"+(a.enableSeconds?":S":""):l+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||s)&&!a.altFormat){var c=Re.defaultConfig.altFormat||se.altFormat;r.altFormat=a.noCalendar||s?"h:i"+(a.enableSeconds?":S K":" K"):c+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:j("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:j("max")});var u=function(t){return function(e){n.config["min"===t?"_minTime":"_maxTime"]=n.parseDate(e,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:u("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:u("max")}),"time"===a.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0),Object.assign(n.config,r,a);for(var h=0;h<i.length;h++)n.config[i[h]]=!0===n.config[i[h]]||"true"===n.config[i[h]];for(re.filter((function(t){return void 0!==n.config[t]})).forEach((function(t){n.config[t]=fe(n.config[t]||[]).map(o)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),h=0;h<n.config.plugins.length;h++){var d=n.config.plugins[h](n)||{};for(var f in d)re.indexOf(f)>-1?n.config[f]=fe(d[f]).map(o).concat(n.config[f]):void 0===a[f]&&(n.config[f]=d[f])}a.altInputClass||(n.config.altInputClass=N().className+" "+n.config.altInputClass),G("onParseConfig")}(),B(),n.input=N(),n.input?(n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=ge(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling)),n.config.allowInput||n._input.setAttribute("readonly","readonly"),U()):n.config.errorHandler(new Error("Invalid input element specified")),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var t=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);t&&$(t,n.config.dateFormat),n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]),void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i")),void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i")),n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(t,e){return void 0===t&&(t=n.currentMonth),void 0===e&&(e=n.currentYear),1===t&&(e%4==0&&e%100!=0||e%400==0)?29:n.l10n.daysInMonth[t]}},n.isMobile||function(){var t=window.document.createDocumentFragment();if(n.calendarContainer=ge("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(t.appendChild((n.monthNav=ge("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=ge("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=ge("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,k(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(t){n.__hidePrevMonthArrow!==t&&(pe(n.prevMonthNav,"flatpickr-disabled",t),n.__hidePrevMonthArrow=t)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(t){n.__hideNextMonthArrow!==t&&(pe(n.nextMonthNav,"flatpickr-disabled",t),n.__hideNextMonthArrow=t)}}),n.currentYearElement=n.yearElements[0],K(),n.monthNav)),n.innerContainer=ge("div","flatpickr-innerContainer"),n.config.weekNumbers){var e=function(){n.calendarContainer.classList.add("hasWeeks");var t=ge("div","flatpickr-weekwrapper");t.appendChild(ge("span","flatpickr-weekday",n.l10n.weekAbbreviation));var e=ge("div","flatpickr-weeks");return t.appendChild(e),{weekWrapper:t,weekNumbers:e}}(),i=e.weekWrapper,o=e.weekNumbers;n.innerContainer.appendChild(i),n.weekNumbers=o,n.weekWrapper=i}n.rContainer=ge("div","flatpickr-rContainer"),n.rContainer.appendChild(D()),n.daysContainer||(n.daysContainer=ge("div","flatpickr-days"),n.daysContainer.tabIndex=-1),_(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),t.appendChild(n.innerContainer)}n.config.enableTime&&t.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var t=Oe(n.config);n.timeContainer=ge("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var e=ge("span","flatpickr-time-separator",":"),i=be("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=i.getElementsByTagName("input")[0];var o=be("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});if(n.minuteElement=o.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=ue(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?t.hours:function(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}(t.hours)),n.minuteElement.value=ue(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():t.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(i),n.timeContainer.appendChild(e),n.timeContainer.appendChild(o),n.config.time_24hr&&n.timeContainer.classList.add("time24hr"),n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var a=be("flatpickr-second");n.secondElement=a.getElementsByTagName("input")[0],n.secondElement.value=ue(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():t.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(ge("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(a)}return n.config.time_24hr||(n.amPM=ge("span","flatpickr-am-pm",n.l10n.amPM[he((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM)),n.timeContainer}()),pe(n.calendarContainer,"rangeMode","range"===n.config.mode),pe(n.calendarContainer,"animate",!0===n.config.animate),pe(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(t);var a=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!a&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var r=ge("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(r,n.element),r.appendChild(n.element),n.altInput&&r.appendChild(n.altInput),r.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){if(n.config.wrap&&["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+t+"]"),(function(e){return h(e,"click",n[t])}))})),n.isMobile)!function(){var t=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=ge("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=t,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===t?"Y-m-d\\TH:i:S":"date"===t?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr)),n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d")),n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d")),n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step"))),n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(t){}h(n.mobileInput,"change",(function(t){n.setDate(ye(t).value,!1,n.mobileFormatStr),G("onChange"),G("onClose")}))}();else{var t=de(F,50);if(n._debouncedChange=de(d,300),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(n.daysContainer,"mouseover",(function(t){"range"===n.config.mode&&L(ye(t))})),h(n._input,"keydown",R),void 0!==n.calendarContainer&&h(n.calendarContainer,"keydown",R),n.config.inline||n.config.static||h(window,"resize",t),void 0!==window.ontouchstart?h(window.document,"touchstart",O):h(window.document,"mousedown",O),h(window.document,"focus",O,{capture:!0}),!0===n.config.clickOpens&&(h(n._input,"focus",n.open),h(n._input,"click",n.open)),void 0!==n.daysContainer&&(h(n.monthNav,"click",tt),h(n.monthNav,["keyup","increment"],u),h(n.daysContainer,"click",W)),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){h(n.timeContainer,["increment"],r),h(n.timeContainer,"blur",r,{capture:!0}),h(n.timeContainer,"click",p),h([n.hourElement,n.minuteElement],["focus","click"],(function(t){return ye(t).select()})),void 0!==n.secondElement&&h(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&h(n.amPM,"click",(function(t){r(t)}))}n.config.allowInput&&h(n._input,"blur",A)}}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&l(n.config.noCalendar?n.latestSelectedDateObj:void 0),Q(!1)),a();var i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&i&&z(),G("onReady")}(),n}function Ae(t,e){for(var n=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement})),i=[],o=0;o<n.length;o++){var a=n[o];try{if(null!==a.getAttribute("data-fp-omit"))continue;void 0!==a._flatpickr&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=Ie(a,e||{}),i.push(a._flatpickr)}catch(t){console.error(t)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(t){return Ae(this,t)},HTMLElement.prototype.flatpickr=function(t){return Ae([this],t)});var Re=function(t,e){return"string"==typeof t?Ae(window.document.querySelectorAll(t),e):t instanceof Node?Ae([t],e):Ae(t,e)};Re.defaultConfig={},Re.l10ns={en:Te({},ce),default:Te({},ce)},Re.localize=function(t){Re.l10ns.default=Te(Te({},Re.l10ns.default),t)},Re.setDefaults=function(t){Re.defaultConfig=Te(Te({},Re.defaultConfig),t)},Re.parseDate=Ce({}),Re.formatDate=De({}),Re.compareDates=Se,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(t){return Ae(this,t)}),Date.prototype.fp_incr=function(t){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof t?parseInt(t,10):t))},"undefined"!=typeof window&&(window.flatpickr=Re);const Le=Re;function Fe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fe=function(){return!!t})()}const je=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Fe()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._dateItems(e)}))}},{key:"_dateItems",value:function(t){var e=this;(0,i.u)(t).find(".gutenverse-input").map((function(t){e.__createDate(t)}))}},{key:"__createDate",value:function(t){var e=JSON.parse((0,i.u)(t).data("date"));e.disableMobile="true",Le(t,e)}}])}(i.Default);function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}const Be=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Ne()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this.choiceInstance=null,this._elements.map((function(e){t._selectItems(e)}))}},{key:"_selectItems",value:function(t){var e=this;(0,i.u)(t).find(".gutenverse-input-select").map((function(t){e.choiceInstance=new i.Choices(t,{removeItemButton:!0,shouldSort:!1})}))}},{key:"destroy",value:function(){this.choiceInstance.destroy()}}])}(i.Default);function ze(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ze=function(){return!!t})()}const He=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,ze()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this.choiceInstance=null,this._elements.map((function(e){t._selectItems(e)})),this.placeholder=""}},{key:"_selectItems",value:function(t){var e=this;(0,i.u)(t).find(".gutenverse-input-multiselect").map((function(n){e.choiceInstance=new i.Choices(n,{removeItemButton:!0,shouldSort:!1,placeholder:!1}),n.addEventListener("change",(function(e){if(e.target.length>0){var n=(0,i.u)(t).find(".choices__input.choices__input--cloned");this.placeholder=n.nodes[0].placeholder,n.nodes[0].placeholder=""}}))}))}},{key:"destroy",value:function(){this.choiceInstance.destroy()}}])}(i.Default);function Ve(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ve=function(){return!!t})()}const We=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Ve()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._countDown(e)}))}},{key:"_countDown",value:function(t){var e=this,n=(0,i.u)(t),o=JSON.parse(n.data("duedate")),a=setInterval((function(){try{e.__handleTimer(n,o,a)}catch(t){console.error("Error during countdown:",t),clearInterval(a)}}),1e3)}},{key:"__handleTimer",value:function(t,e,n){var i=new Date(e)-new Date,o=JSON.parse(t.data("expired"));if(i<=0){if("redirect"===o.action){var a=o.url;try{var r=new URL(a);["http:","https:"].includes(r.protocol)?window.location.assign(a):(console.error("Invalid URL scheme detected. Redirection aborted."),clearInterval(n))}catch(t){console.error("Invalid URL format. Redirection aborted:",t),clearInterval(n)}}else if("section"===o.action){var s=t.find(".countdown-expired-wrapper");s&&s.attr("style","display: block;")}}else{var l,c,u,h=t.find(".days-wrapper"),d=t.find(".hours-wrapper"),f=t.find(".minutes-wrapper"),p=t.find(".seconds-wrapper"),g=null;h?(l=Math.floor(i/864e5),c=Math.floor(i%864e5/36e5),u=Math.floor(i%36e5/6e4),g=Math.floor(i%6e4/1e3)):d?(c=Math.floor(i/36e5),u=Math.floor(i%36e5/6e4),g=Math.floor(i%6e4/1e3)):f?(u=Math.floor(i/6e4),g=Math.floor(i%6e4/1e3)):g=Math.floor(i/1e3),l&&h.find(".countdown-value").html(l),c&&d.find(".countdown-value").html(c),u&&f.find(".countdown-value").html(u),g&&p.find(".countdown-value").html(g)}}}])}(i.Default);function Ye(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ye=function(){return!!t})()}const $e=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,Ye()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t._postComment(e)}))}},{key:"_postComment",value:function(t){var e=(0,i.u)(t).find(".commentlist").data("settings"),n=e&&JSON.parse(e),o=n.enableSuffix,a=n.suffixMain,r=n.suffixReply;o||this._removeSuffix(t),(0,i.u)(t).find(".says:not(.children .says)").each((function(t){t.textContent=a})),(0,i.u)(t).find(".children .says").each((function(t){t.textContent=r}))}},{key:"_removeSuffix",value:function(t){(0,i.u)(t).find(".says").remove()}}])}(i.Default);function qe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qe=function(){return!!t})()}const Ue=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,qe()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){t.__handleAction(e)}))}},{key:"__handleAction",value:function(t){var e=(0,i.u)(t),n=e.data("behavior"),o=e.find(".row-item");"onclick"===n?this.__handleBehavior("click",o,e):this.__handleBehavior("mouseover",o,e)}},{key:"__handleBehavior",value:function(t,e,n){var i=this;e.on(t,(function(t){i.__removeClass(e,n),i.__addClass(t.currentTarget,n)}))}},{key:"__removeClass",value:function(t,e){t.each((function(t){var n=(0,i.u)(t);if(n.hasClass("current-item")){n.removeClass("current-item");var o=n.data("tab"),a=e.find("#".concat(o));a&&a.hasClass("current-item")&&a.removeClass("current-item")}}))}},{key:"__addClass",value:function(t,e){var n=(0,i.u)(t);n.addClass("current-item");var o=n.data("tab"),a=e.find("#".concat(o));a&&!a.hasClass("current-item")&&a.addClass("current-item")}}])}(i.Default);function Ge(t){return t+.5|0}const Xe=(t,e,n)=>Math.max(Math.min(t,n),e);function Je(t){return Xe(Ge(2.55*t),0,255)}function Ke(t){return Xe(Ge(255*t),0,255)}function Ze(t){return Xe(Ge(t/2.55)/100,0,1)}function Qe(t){return Xe(Ge(100*t),0,100)}const tn={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},en=[..."0123456789ABCDEF"],nn=t=>en[15&t],on=t=>en[(240&t)>>4]+en[15&t],an=t=>(240&t)>>4==(15&t);const rn=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function sn(t,e,n){const i=e*Math.min(n,1-n),o=(e,o=(e+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function ln(t,e,n){const i=(i,o=(i+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function cn(t,e,n){const i=sn(t,1,.5);let o;for(e+n>1&&(o=1/(e+n),e*=o,n*=o),o=0;o<3;o++)i[o]*=1-e-n,i[o]+=e;return i}function un(t){const e=t.r/255,n=t.g/255,i=t.b/255,o=Math.max(e,n,i),a=Math.min(e,n,i),r=(o+a)/2;let s,l,c;return o!==a&&(c=o-a,l=r>.5?c/(2-o-a):c/(o+a),s=function(t,e,n,i,o){return t===o?(e-n)/i+(e<n?6:0):e===o?(n-t)/i+2:(t-e)/i+4}(e,n,i,c,o),s=60*s+.5),[0|s,l||0,r]}function hn(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(Ke)}function dn(t,e,n){return hn(sn,t,e,n)}function fn(t){return(t%360+360)%360}const pn={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},gn={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let mn;const vn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,bn=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,yn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function xn(t,e,n){if(t){let i=un(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,0===e?360:1)),i=dn(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function _n(t,e){return t?Object.assign(e||{},t):t}function wn(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ke(t[3]))):(e=_n(t,{r:0,g:0,b:0,a:1})).a=Ke(e.a),e}function Mn(t){return"r"===t.charAt(0)?function(t){const e=vn.exec(t);let n,i,o,a=255;if(e){if(e[7]!==n){const t=+e[7];a=e[8]?Je(t):Xe(255*t,0,255)}return n=+e[1],i=+e[3],o=+e[5],n=255&(e[2]?Je(n):Xe(n,0,255)),i=255&(e[4]?Je(i):Xe(i,0,255)),o=255&(e[6]?Je(o):Xe(o,0,255)),{r:n,g:i,b:o,a}}}(t):function(t){const e=rn.exec(t);let n,i=255;if(!e)return;e[5]!==n&&(i=e[6]?Je(+e[5]):Ke(+e[5]));const o=fn(+e[2]),a=+e[3]/100,r=+e[4]/100;return n="hwb"===e[1]?function(t,e,n){return hn(cn,t,e,n)}(o,a,r):"hsv"===e[1]?function(t,e,n){return hn(ln,t,e,n)}(o,a,r):dn(o,a,r),{r:n[0],g:n[1],b:n[2],a:i}}(t)}class kn{constructor(t){if(t instanceof kn)return t;const e=typeof t;let n;var i,o,a;"object"===e?n=wn(t):"string"===e&&(a=(i=t).length,"#"===i[0]&&(4===a||5===a?o={r:255&17*tn[i[1]],g:255&17*tn[i[2]],b:255&17*tn[i[3]],a:5===a?17*tn[i[4]]:255}:7!==a&&9!==a||(o={r:tn[i[1]]<<4|tn[i[2]],g:tn[i[3]]<<4|tn[i[4]],b:tn[i[5]]<<4|tn[i[6]],a:9===a?tn[i[7]]<<4|tn[i[8]]:255})),n=o||function(t){mn||(mn=function(){const t={},e=Object.keys(gn),n=Object.keys(pn);let i,o,a,r,s;for(i=0;i<e.length;i++){for(r=s=e[i],o=0;o<n.length;o++)a=n[o],s=s.replace(a,pn[a]);a=parseInt(gn[r],16),t[s]=[a>>16&255,a>>8&255,255&a]}return t}(),mn.transparent=[0,0,0,0]);const e=mn[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Mn(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=_n(this._rgb);return t&&(t.a=Ze(t.a)),t}set rgb(t){this._rgb=wn(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ze(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>an(t.r)&&an(t.g)&&an(t.b)&&an(t.a))(t)?nn:on,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=un(t),n=e[0],i=Qe(e[1]),o=Qe(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${o}%, ${Ze(t.a)})`:`hsl(${n}, ${i}%, ${o}%)`}(this._rgb):void 0}mix(t,e){if(t){const n=this.rgb,i=t.rgb;let o;const a=e===o?.5:e,r=2*a-1,s=n.a-i.a,l=((r*s===-1?r:(r+s)/(1+r*s))+1)/2;o=1-l,n.r=255&l*n.r+o*i.r+.5,n.g=255&l*n.g+o*i.g+.5,n.b=255&l*n.b+o*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,n){const i=yn(Ze(t.r)),o=yn(Ze(t.g)),a=yn(Ze(t.b));return{r:Ke(bn(i+n*(yn(Ze(e.r))-i))),g:Ke(bn(o+n*(yn(Ze(e.g))-o))),b:Ke(bn(a+n*(yn(Ze(e.b))-a))),a:t.a+n*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new kn(this.rgb)}alpha(t){return this._rgb.a=Ke(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Ge(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return xn(this._rgb,2,t),this}darken(t){return xn(this._rgb,2,-t),this}saturate(t){return xn(this._rgb,1,t),this}desaturate(t){return xn(this._rgb,1,-t),this}rotate(t){return function(t,e){var n=un(t);n[0]=fn(n[0]+e),n=dn(n),t.r=n[0],t.g=n[1],t.b=n[2]}(this._rgb,t),this}}function Dn(){}const Cn=(()=>{let t=0;return()=>t++})();function Sn(t){return null==t}function Pn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function On(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function Tn(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function En(t,e){return Tn(t)?t:e}function In(t,e){return void 0===t?e:t}const An=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Rn(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)}function Ln(t,e,n,i){let o,a,r;if(Pn(t))if(a=t.length,i)for(o=a-1;o>=0;o--)e.call(n,t[o],o);else for(o=0;o<a;o++)e.call(n,t[o],o);else if(On(t))for(r=Object.keys(t),a=r.length,o=0;o<a;o++)e.call(n,t[r[o]],r[o])}function Fn(t,e){let n,i,o,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(o=t[n],a=e[n],o.datasetIndex!==a.datasetIndex||o.index!==a.index)return!1;return!0}function jn(t){if(Pn(t))return t.map(jn);if(On(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let o=0;for(;o<i;++o)e[n[o]]=jn(t[n[o]]);return e}return t}function Nn(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Bn(t,e,n,i){if(!Nn(t))return;const o=e[t],a=n[t];On(o)&&On(a)?zn(o,a,i):e[t]=jn(a)}function zn(t,e,n){const i=Pn(e)?e:[e],o=i.length;if(!On(t))return t;const a=(n=n||{}).merger||Bn;let r;for(let e=0;e<o;++e){if(r=i[e],!On(r))continue;const o=Object.keys(r);for(let e=0,i=o.length;e<i;++e)a(o[e],t,r,n)}return t}function Hn(t,e){return zn(t,e,{merger:Vn})}function Vn(t,e,n){if(!Nn(t))return;const i=e[t],o=n[t];On(i)&&On(o)?Hn(i,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=jn(o))}const Wn={"":t=>t,x:t=>t.x,y:t=>t.y};function Yn(t,e){const n=Wn[e]||(Wn[e]=function(t){const e=function(t){const e=t.split("."),n=[];let i="";for(const t of e)i+=t,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}(t);return t=>{for(const n of e){if(""===n)break;t=t&&t[n]}return t}}(e));return n(t)}function $n(t){return t.charAt(0).toUpperCase()+t.slice(1)}const qn=t=>void 0!==t,Un=t=>"function"==typeof t,Gn=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0},Xn=Math.PI,Jn=2*Xn,Kn=Jn+Xn,Zn=Number.POSITIVE_INFINITY,Qn=Xn/180,ti=Xn/2,ei=Xn/4,ni=2*Xn/3,ii=Math.log10,oi=Math.sign;function ai(t,e,n){return Math.abs(t-e)<n}function ri(t){const e=Math.round(t);t=ai(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(ii(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function si(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function li(t,e,n){let i,o,a;for(i=0,o=t.length;i<o;i++)a=t[i][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function ci(t){return t*(Xn/180)}function ui(t){return t*(180/Xn)}function hi(t){if(!Tn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function di(t,e){const n=e.x-t.x,i=e.y-t.y,o=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*Xn&&(a+=Jn),{angle:a,distance:o}}function fi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pi(t,e){return(t-e+Kn)%Jn-Xn}function gi(t){return(t%Jn+Jn)%Jn}function mi(t,e,n,i){const o=gi(t),a=gi(e),r=gi(n),s=gi(a-o),l=gi(r-o),c=gi(o-a),u=gi(o-r);return o===a||o===r||i&&a===r||s>l&&c<u}function vi(t,e,n){return Math.max(e,Math.min(n,t))}function bi(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function yi(t,e,n){n=n||(n=>t[n]<e);let i,o=t.length-1,a=0;for(;o-a>1;)i=a+o>>1,n(i)?a=i:o=i;return{lo:a,hi:o}}const xi=(t,e,n,i)=>yi(t,n,i?i=>{const o=t[i][e];return o<n||o===n&&t[i+1][e]===n}:i=>t[i][e]<n),_i=(t,e,n)=>yi(t,n,(i=>t[i][e]>=n)),wi=["push","pop","shift","splice","unshift"];function Mi(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,o=i.indexOf(e);-1!==o&&i.splice(o,1),i.length>0||(wi.forEach((e=>{delete t[e]})),delete t._chartjs)}function ki(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Di="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Ci(t,e){let n=[],i=!1;return function(...o){n=o,i||(i=!0,Di.call(window,(()=>{i=!1,t.apply(e,n)})))}}const Si=t=>"start"===t?"left":"end"===t?"right":"center",Pi=(t,e,n)=>"start"===t?e:"end"===t?n:(e+n)/2;function Oi(t,e,n){const i=e.length;let o=0,a=i;if(t._sorted){const{iScale:r,vScale:s,_parsed:l}=t,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=r.axis,{min:h,max:d,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(o=Math.min(xi(l,u,h).lo,n?i:xi(e,u,r.getPixelForValue(h)).lo),c){const t=l.slice(0,o+1).reverse().findIndex((t=>!Sn(t[s.axis])));o-=Math.max(0,t)}o=vi(o,0,i-1)}if(p){let t=Math.max(xi(l,r.axis,d,!0).hi+1,n?0:xi(e,u,r.getPixelForValue(d),!0).hi+1);if(c){const e=l.slice(t-1).findIndex((t=>!Sn(t[s.axis])));t+=Math.max(0,e)}a=vi(t,o,i)-o}else a=i-o}return{start:o,count:a}}function Ti(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,o={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=o,!0;const a=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,o),a}const Ei=t=>0===t||1===t,Ii=(t,e,n)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Jn/n),Ai=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Jn/n)+1,Ri={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ti),easeOutSine:t=>Math.sin(t*ti),easeInOutSine:t=>-.5*(Math.cos(Xn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Ei(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ei(t)?t:Ii(t,.075,.3),easeOutElastic:t=>Ei(t)?t:Ai(t,.075,.3),easeInOutElastic(t){const e=.1125;return Ei(t)?t:t<.5?.5*Ii(2*t,e,.45):.5+.5*Ai(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Ri.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,n=2.75;return t<1/n?e*t*t:t<2/n?e*(t-=1.5/n)*t+.75:t<2.5/n?e*(t-=2.25/n)*t+.9375:e*(t-=2.625/n)*t+.984375},easeInOutBounce:t=>t<.5?.5*Ri.easeInBounce(2*t):.5*Ri.easeOutBounce(2*t-1)+.5};function Li(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Fi(t){return Li(t)?t:new kn(t)}function ji(t){return Li(t)?t:new kn(t).saturate(.5).darken(.1).hexString()}const Ni=["x","y","borderWidth","radius","tension"],Bi=["color","borderColor","backgroundColor"],zi=new Map;function Hi(t,e,n){return function(t,e){e=e||{};const n=t+JSON.stringify(e);let i=zi.get(n);return i||(i=new Intl.NumberFormat(t,e),zi.set(n,i)),i}(e,n).format(t)}const Vi={values:t=>Pn(t)?t:""+t,numeric(t,e,n){if(0===t)return"0";const i=this.chart.options.locale;let o,a=t;if(n.length>1){const e=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(e<1e-4||e>1e15)&&(o="scientific"),a=function(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}(t,n)}const r=ii(Math.abs(a)),s=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:o,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Hi(t,i,l)},logarithmic(t,e,n){if(0===t)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(ii(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?Vi.numeric.call(this,t,e,n):""}};var Wi={formatters:Vi};const Yi=Object.create(null),$i=Object.create(null);function qi(t,e){if(!e)return t;const n=e.split(".");for(let e=0,i=n.length;e<i;++e){const i=n[e];t=t[i]||(t[i]=Object.create(null))}return t}function Ui(t,e,n){return"string"==typeof e?zn(qi(t,e),n):zn(qi(t,""),e)}class Gi{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>ji(e.backgroundColor),this.hoverBorderColor=(t,e)=>ji(e.borderColor),this.hoverColor=(t,e)=>ji(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ui(this,t,e)}get(t){return qi(this,t)}describe(t,e){return Ui($i,t,e)}override(t,e){return Ui(Yi,t,e)}route(t,e,n,i){const o=qi(this,t),a=qi(this,n),r="_"+e;Object.defineProperties(o,{[r]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=a[i];return On(t)?Object.assign({},e,t):In(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Xi=new Gi({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Bi},numbers:{type:"number",properties:Ni}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Ji(t,e,n,i,o){let a=e[o];return a||(a=e[o]=t.measureText(o).width,n.push(o)),a>i&&(i=a),i}function Ki(t,e,n,i){let o=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(o=i.data={},a=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let r=0;const s=n.length;let l,c,u,h,d;for(l=0;l<s;l++)if(h=n[l],null==h||Pn(h)){if(Pn(h))for(c=0,u=h.length;c<u;c++)d=h[c],null==d||Pn(d)||(r=Ji(t,o,a,r,d))}else r=Ji(t,o,a,r,h);t.restore();const f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete o[a[l]];a.splice(0,f)}return r}function Zi(t,e,n){const i=t.currentDevicePixelRatio,o=0!==n?Math.max(n/2,.5):0;return Math.round((e-o)*i)/i+o}function Qi(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function to(t,e,n,i){eo(t,e,n,i,null)}function eo(t,e,n,i,o){let a,r,s,l,c,u,h,d;const f=e.pointStyle,p=e.rotation,g=e.radius;let m=(p||0)*Qn;if(f&&"object"==typeof f&&(a=f.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(n,i),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:o?t.ellipse(n,i,o/2,g,0,0,Jn):t.arc(n,i,g,0,Jn),t.closePath();break;case"triangle":u=o?o/2:g,t.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=ni,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),m+=ni,t.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":c=.516*g,l=g-c,r=Math.cos(m+ei)*l,h=Math.cos(m+ei)*(o?o/2-c:l),s=Math.sin(m+ei)*l,d=Math.sin(m+ei)*(o?o/2-c:l),t.arc(n-h,i-s,c,m-Xn,m-ti),t.arc(n+d,i-r,c,m-ti,m),t.arc(n+h,i+s,c,m,m+ti),t.arc(n-d,i+r,c,m+ti,m+Xn),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=o?o/2:l,t.rect(n-u,i-l,2*u,2*l);break}m+=ei;case"rectRot":h=Math.cos(m)*(o?o/2:g),r=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(o?o/2:g),t.moveTo(n-h,i-s),t.lineTo(n+d,i-r),t.lineTo(n+h,i+s),t.lineTo(n-d,i+r),t.closePath();break;case"crossRot":m+=ei;case"cross":h=Math.cos(m)*(o?o/2:g),r=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(o?o/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-r),t.lineTo(n-d,i+r);break;case"star":h=Math.cos(m)*(o?o/2:g),r=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(o?o/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-r),t.lineTo(n-d,i+r),m+=ei,h=Math.cos(m)*(o?o/2:g),r=Math.cos(m)*g,s=Math.sin(m)*g,d=Math.sin(m)*(o?o/2:g),t.moveTo(n-h,i-s),t.lineTo(n+h,i+s),t.moveTo(n+d,i-r),t.lineTo(n-d,i+r);break;case"line":r=o?o/2:Math.cos(m)*g,s=Math.sin(m)*g,t.moveTo(n-r,i-s),t.lineTo(n+r,i+s);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(m)*(o?o/2:g),i+Math.sin(m)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function no(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function io(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function oo(t){t.restore()}function ao(t,e,n,i,o){if(!e)return t.lineTo(n.x,n.y);if("middle"===o){const i=(e.x+n.x)/2;t.lineTo(i,e.y),t.lineTo(i,n.y)}else"after"===o!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function ro(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function so(t,e,n,i,o){if(o.strikethrough||o.underline){const a=t.measureText(i),r=e-a.actualBoundingBoxLeft,s=e+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(r,u),t.lineTo(s,u),t.stroke()}}function lo(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function co(t,e,n,i,o,a={}){const r=Pn(e)?e:[e],s=a.strokeWidth>0&&""!==a.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Sn(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,a),l=0;l<r.length;++l)c=r[l],a.backdrop&&lo(t,a.backdrop),s&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),Sn(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(c,n,i,a.maxWidth)),t.fillText(c,n,i,a.maxWidth),so(t,n,i,c,a),i+=Number(o.lineHeight);t.restore()}function uo(t,e){const{x:n,y:i,w:o,h:a,radius:r}=e;t.arc(n+r.topLeft,i+r.topLeft,r.topLeft,1.5*Xn,Xn,!0),t.lineTo(n,i+a-r.bottomLeft),t.arc(n+r.bottomLeft,i+a-r.bottomLeft,r.bottomLeft,Xn,ti,!0),t.lineTo(n+o-r.bottomRight,i+a),t.arc(n+o-r.bottomRight,i+a-r.bottomRight,r.bottomRight,ti,0,!0),t.lineTo(n+o,i+r.topRight),t.arc(n+o-r.topRight,i+r.topRight,r.topRight,0,-ti,!0),t.lineTo(n+r.topLeft,i)}const ho=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,fo=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function po(t,e){const n=(""+t).match(ho);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t}function go(t,e){const n={},i=On(e),o=i?Object.keys(e):e,a=On(t)?i?n=>In(t[n],t[e[n]]):e=>t[e]:()=>t;for(const t of o)n[t]=+a(t)||0;return n}function mo(t){return go(t,{top:"y",right:"x",bottom:"y",left:"x"})}function vo(t){return go(t,["topLeft","topRight","bottomLeft","bottomRight"])}function bo(t){const e=mo(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function yo(t,e){t=t||{},e=e||Xi.font;let n=In(t.size,e.size);"string"==typeof n&&(n=parseInt(n,10));let i=In(t.style,e.style);i&&!(""+i).match(fo)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const o={family:In(t.family,e.family),lineHeight:po(In(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:In(t.weight,e.weight),string:""};return o.string=function(t){return!t||Sn(t.size)||Sn(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o}function xo(t,e,n,i){let o,a,r,s=!0;for(o=0,a=t.length;o<a;++o)if(r=t[o],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),s=!1),void 0!==n&&Pn(r)&&(r=r[n%r.length],s=!1),void 0!==r))return i&&!s&&(i.cacheable=!1),r}function _o(t,e){return Object.assign(Object.create(t),e)}function wo(t,e=[""],n,i,o=()=>t[0]){const a=n||t;void 0===i&&(i=Ao("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:i,_getTarget:o,override:n=>wo([n,...t],e,a,i)};return new Proxy(r,{deleteProperty:(e,n)=>(delete e[n],delete e._keys,delete t[0][n],!0),get:(n,i)=>So(n,i,(()=>function(t,e,n,i){let o;for(const a of e)if(o=Ao(Do(a,t),n),void 0!==o)return Co(t,o)?Eo(n,i,t,o):o}(i,e,t,n))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Ro(t).includes(e),ownKeys:t=>Ro(t),set(t,e,n){const i=t._storage||(t._storage=o());return t[e]=i[e]=n,delete t._keys,!0}})}function Mo(t,e,n,i){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:ko(t,i),setContext:e=>Mo(t,e,n,i),override:o=>Mo(t.override(o),e,n,i)};return new Proxy(o,{deleteProperty:(e,n)=>(delete e[n],delete t[n],!0),get:(t,e,n)=>So(t,e,(()=>function(t,e,n){const{_proxy:i,_context:o,_subProxy:a,_descriptors:r}=t;let s=i[e];return Un(s)&&r.isScriptable(e)&&(s=function(t,e,n,i){const{_proxy:o,_context:a,_subProxy:r,_stack:s}=n;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);let l=e(a,r||i);return s.delete(t),Co(t,l)&&(l=Eo(o._scopes,o,t,l)),l}(e,s,t,n)),Pn(s)&&s.length&&(s=function(t,e,n,i){const{_proxy:o,_context:a,_subProxy:r,_descriptors:s}=n;if(void 0!==a.index&&i(t))return e[a.index%e.length];if(On(e[0])){const n=e,i=o._scopes.filter((t=>t!==n));e=[];for(const l of n){const n=Eo(i,o,t,l);e.push(Mo(n,a,r&&r[t],s))}}return e}(e,s,t,r.isIndexable)),Co(e,s)&&(s=Mo(s,o,a&&a[e],r)),s}(t,e,n))),getOwnPropertyDescriptor:(e,n)=>e._descriptors.allKeys?Reflect.has(t,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,n),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,n)=>Reflect.has(t,n),ownKeys:()=>Reflect.ownKeys(t),set:(e,n,i)=>(t[n]=i,delete e[n],!0)})}function ko(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:i,isScriptable:Un(n)?n:()=>n,isIndexable:Un(i)?i:()=>i}}const Do=(t,e)=>t?t+$n(e):e,Co=(t,e)=>On(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function So(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const i=n();return t[e]=i,i}function Po(t,e,n){return Un(t)?t(e,n):t}const Oo=(t,e)=>!0===t?e:"string"==typeof t?Yn(e,t):void 0;function To(t,e,n,i,o){for(const a of e){const e=Oo(n,a);if(e){t.add(e);const a=Po(e._fallback,n,o);if(void 0!==a&&a!==n&&a!==i)return a}else if(!1===e&&void 0!==i&&n!==i)return null}return!1}function Eo(t,e,n,i){const o=e._rootScopes,a=Po(e._fallback,n,i),r=[...t,...o],s=new Set;s.add(i);let l=Io(s,r,n,a||n,i);return null!==l&&(void 0===a||a===n||(l=Io(s,r,a,l,i),null!==l))&&wo(Array.from(s),[""],o,a,(()=>function(t,e,n){const i=t._getTarget();e in i||(i[e]={});const o=i[e];return Pn(o)&&On(n)?n:o||{}}(e,n,i)))}function Io(t,e,n,i,o){for(;n;)n=To(t,e,n,i,o);return n}function Ao(t,e){for(const n of e){if(!n)continue;const e=n[t];if(void 0!==e)return e}}function Ro(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const n of t)for(const t of Object.keys(n).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Lo(t,e,n,i){const{iScale:o}=t,{key:a="r"}=this._parsing,r=new Array(i);let s,l,c,u;for(s=0,l=i;s<l;++s)c=s+n,u=e[c],r[s]={r:o.parse(Yn(u,a),c)};return r}const Fo=Number.EPSILON||1e-14,jo=(t,e)=>e<t.length&&!t[e].skip&&t[e],No=t=>"x"===t?"y":"x";function Bo(t,e,n,i){const o=t.skip?e:t,a=e,r=n.skip?e:n,s=fi(a,o),l=fi(r,a);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const h=i*c,d=i*u;return{previous:{x:a.x-h*(r.x-o.x),y:a.y-h*(r.y-o.y)},next:{x:a.x+d*(r.x-o.x),y:a.y+d*(r.y-o.y)}}}function zo(t,e,n){return Math.max(Math.min(t,n),e)}function Ho(t,e,n,i,o){let a,r,s,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const n=No(e),i=t.length,o=Array(i).fill(0),a=Array(i);let r,s,l,c=jo(t,0);for(r=0;r<i;++r)if(s=l,l=c,c=jo(t,r+1),l){if(c){const t=c[e]-l[e];o[r]=0!==t?(c[n]-l[n])/t:0}a[r]=s?c?oi(o[r-1])!==oi(o[r])?0:(o[r-1]+o[r])/2:o[r-1]:o[r]}!function(t,e,n){const i=t.length;let o,a,r,s,l,c=jo(t,0);for(let u=0;u<i-1;++u)l=c,c=jo(t,u+1),l&&c&&(ai(e[u],0,Fo)?n[u]=n[u+1]=0:(o=n[u]/e[u],a=n[u+1]/e[u],s=Math.pow(o,2)+Math.pow(a,2),s<=9||(r=3/Math.sqrt(s),n[u]=o*r*e[u],n[u+1]=a*r*e[u])))}(t,o,a),function(t,e,n="x"){const i=No(n),o=t.length;let a,r,s,l=jo(t,0);for(let c=0;c<o;++c){if(r=s,s=l,l=jo(t,c+1),!s)continue;const o=s[n],u=s[i];r&&(a=(o-r[n])/3,s[`cp1${n}`]=o-a,s[`cp1${i}`]=u-a*e[c]),l&&(a=(l[n]-o)/3,s[`cp2${n}`]=o+a,s[`cp2${i}`]=u+a*e[c])}}(t,a,e)}(t,o);else{let n=i?t[t.length-1]:t[0];for(a=0,r=t.length;a<r;++a)s=t[a],l=Bo(n,s,t[Math.min(a+1,r-(i?0:1))%r],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,n=s}e.capBezierPoints&&function(t,e){let n,i,o,a,r,s=no(t[0],e);for(n=0,i=t.length;n<i;++n)r=a,a=s,s=n<i-1&&no(t[n+1],e),a&&(o=t[n],r&&(o.cp1x=zo(o.cp1x,e.left,e.right),o.cp1y=zo(o.cp1y,e.top,e.bottom)),s&&(o.cp2x=zo(o.cp2x,e.left,e.right),o.cp2y=zo(o.cp2y,e.top,e.bottom)))}(t,n)}function Vo(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Wo(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Yo(t,e,n){let i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}const $o=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),qo=["top","right","bottom","left"];function Uo(t,e,n){const i={};n=n?"-"+n:"";for(let o=0;o<4;o++){const a=qo[o];i[a]=parseFloat(t[e+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function Go(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,o=$o(n),a="border-box"===o.boxSizing,r=Uo(o,"padding"),s=Uo(o,"border","width"),{x:l,y:c,box:u}=function(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:o,offsetY:a}=i;let r,s,l=!1;if(((t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot))(o,a,t.target))r=o,s=a;else{const t=e.getBoundingClientRect();r=i.clientX-t.left,s=i.clientY-t.top,l=!0}return{x:r,y:s,box:l}}(t,n),h=r.left+(u&&s.left),d=r.top+(u&&s.top);let{width:f,height:p}=e;return a&&(f-=r.width+s.width,p-=r.height+s.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((c-d)/p*n.height/i)}}const Xo=t=>Math.round(10*t)/10;function Jo(t,e,n){const i=e||1,o=Math.floor(t.height*i),a=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const r=t.canvas;return r.style&&(n||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==i||r.height!==o||r.width!==a)&&(t.currentDevicePixelRatio=i,r.height=o,r.width=a,t.ctx.setTransform(i,0,0,i,0,0),!0)}const Ko=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Vo()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Zo(t,e){const n=function(t,e){return $o(t).getPropertyValue(e)}(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Qo(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function ta(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:"middle"===i?n<.5?t.y:e.y:"after"===i?n<1?t.y:e.y:n>0?e.y:t.y}}function ea(t,e,n,i){const o={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},r=Qo(t,o,n),s=Qo(o,a,n),l=Qo(a,e,n),c=Qo(r,s,n),u=Qo(s,l,n);return Qo(c,u,n)}function na(t,e,n){return t?function(t,e){return{x:n=>t+t+e-n,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,n):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ia(t,e){let n,i;"ltr"!==e&&"rtl"!==e||(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function oa(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function aa(t){return"angle"===t?{between:mi,compare:pi,normalize:gi}:{between:bi,compare:(t,e)=>t-e,normalize:t=>t}}function ra({start:t,end:e,count:n,loop:i,style:o}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0,style:o}}function sa(t,e,n){if(!n)return[t];const{property:i,start:o,end:a}=n,r=e.length,{compare:s,between:l,normalize:c}=aa(i),{start:u,end:h,loop:d,style:f}=function(t,e,n){const{property:i,start:o,end:a}=n,{between:r,normalize:s}=aa(i),l=e.length;let c,u,{start:h,end:d,loop:f}=t;if(f){for(h+=l,d+=l,c=0,u=l;c<u&&r(s(e[h%l][i]),o,a);++c)h--,d--;h%=l,d%=l}return d<h&&(d+=l),{start:h,end:d,loop:f,style:t.style}}(t,e,n),p=[];let g,m,v,b=!1,y=null;for(let t=u,n=u;t<=h;++t)m=e[t%r],m.skip||(g=c(m[i]),g!==v&&(b=l(g,o,a),null===y&&(b||l(o,v,g)&&0!==s(o,v))&&(y=0===s(g,o)?t:n),null!==y&&(!b||0===s(a,g)||l(a,v,g))&&(p.push(ra({start:y,end:t,loop:d,count:r,style:f})),y=null),n=t,v=g));return null!==y&&p.push(ra({start:y,end:h,loop:d,count:r,style:f})),p}function la(t,e){const n=[],i=t.segments;for(let o=0;o<i.length;o++){const a=sa(i[o],t.points,e);a.length&&n.push(...a)}return n}function ca(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ua(t,e){if(!e)return!1;const n=[],i=function(t,e){return Li(e)?(n.includes(e)||n.push(e),n.indexOf(e)):e};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function ha(t,e,n){return t.options.clip?t[n]:e[n]}function da(t,e){const n=e._clip;if(n.disabled)return!1;const i=function(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:ha(n,e,"left"),right:ha(n,e,"right"),top:ha(i,e,"top"),bottom:ha(i,e,"bottom")}:e}(e,t.chartArea);return{left:!1===n.left?0:i.left-(!0===n.left?0:n.left),right:!1===n.right?t.width:i.right+(!0===n.right?0:n.right),top:!1===n.top?0:i.top-(!0===n.top?0:n.top),bottom:!1===n.bottom?t.height:i.bottom+(!0===n.bottom?0:n.bottom)}}class fa{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,n,i){const o=e.listeners[i],a=e.duration;o.forEach((i=>i({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(n-e.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=Di.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((n,i)=>{if(!n.running||!n.items.length)return;const o=n.items;let a,r=o.length-1,s=!1;for(;r>=0;--r)a=o[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),s=!0):(o[r]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,n,t,"progress")),o.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),e+=o.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let n=e.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,n)),n}listen(t,e,n){this._getAnims(t).listeners[e].push(n)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const n=e.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var pa=new fa;const ga="transparent",ma={boolean:(t,e,n)=>n>.5?e:t,color(t,e,n){const i=Fi(t||ga),o=i.valid&&Fi(e||ga);return o&&o.valid?o.mix(i,n).hexString():e},number:(t,e,n)=>t+(e-t)*n};class va{constructor(t,e,n,i){const o=e[n];i=xo([t.to,i,o,t.from]);const a=xo([t.from,o,i]);this._active=!0,this._fn=t.fn||ma[t.type||typeof a],this._easing=Ri[t.easing]||Ri.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,e,n){if(this._active){this._notify(!1);const i=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=xo([t.to,e,i,t.from]),this._from=xo([t.from,i,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,n=this._duration,i=this._prop,o=this._from,a=this._loop,r=this._to;let s;if(this._active=o!==r&&(a||e<n),!this._active)return this._target[i]=r,void this._notify(!0);e<0?this._target[i]=o:(s=e/n%2,s=a&&s>1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[i]=this._fn(o,r,s))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,n)=>{t.push({res:e,rej:n})}))}_notify(t){const e=t?"res":"rej",n=this._promises||[];for(let t=0;t<n.length;t++)n[t][e]()}}class ba{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!On(t))return;const e=Object.keys(Xi.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const o=t[i];if(!On(o))return;const a={};for(const t of e)a[t]=o[t];(Pn(o.properties)&&o.properties||[i]).forEach((t=>{t!==i&&n.has(t)||n.set(t,a)}))}))}_animateOptions(t,e){const n=e.options,i=function(t,e){if(!e)return;let n=t.options;if(n)return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;t.options=e}(t,n);if(!i)return[];const o=this._createAnimations(i,n);return n.$shared&&function(t,e){const n=[],i=Object.keys(e);for(let e=0;e<i.length;e++){const o=t[i[e]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}(t.options.$animations,n).then((()=>{t.options=n}),(()=>{})),o}_createAnimations(t,e){const n=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(e),r=Date.now();let s;for(s=a.length-1;s>=0;--s){const l=a[s];if("$"===l.charAt(0))continue;if("options"===l){i.push(...this._animateOptions(t,e));continue}const c=e[l];let u=o[l];const h=n.get(l);if(u){if(h&&u.active()){u.update(h,c,r);continue}u.cancel()}h&&h.duration?(o[l]=u=new va(h,t,l,c),i.push(u)):t[l]=c}return i}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const n=this._createAnimations(t,e);return n.length?(pa.add(this._chart,n),!0):void 0}}function ya(t,e){const n=t&&t.options||{},i=n.reverse,o=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:o,end:i?o:a}}function xa(t,e){const n=[],i=t._getSortedDatasetMetas(e);let o,a;for(o=0,a=i.length;o<a;++o)n.push(i[o].index);return n}function _a(t,e,n,i={}){const o=t.keys,a="single"===i.mode;let r,s,l,c;if(null===e)return;let u=!1;for(r=0,s=o.length;r<s;++r){if(l=+o[r],l===n){if(u=!0,i.all)continue;break}c=t.values[l],Tn(c)&&(a||0===e||oi(e)===oi(c))&&(e+=c)}return u||i.all?e:0}function wa(t,e){const n=t&&t.options.stacked;return n||void 0===n&&void 0!==e.stack}function Ma(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function ka(t,e,n,i){for(const o of e.getMatchingVisibleMetas(i).reverse()){const e=t[o.index];if(n&&e>0||!n&&e<0)return o.index}return null}function Da(t,e){const{chart:n,_cachedMeta:i}=t,o=n._stacks||(n._stacks={}),{iScale:a,vScale:r,index:s}=i,l=a.axis,c=r.axis,u=function(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}(a,r,i),h=e.length;let d;for(let t=0;t<h;++t){const n=e[t],{[l]:a,[c]:h}=n;d=(n._stacks||(n._stacks={}))[c]=Ma(o,u,a),d[s]=h,d._top=ka(d,r,!0,i.type),d._bottom=ka(d,r,!1,i.type),(d._visualValues||(d._visualValues={}))[s]=h}}function Ca(t,e){const n=t.scales;return Object.keys(n).filter((t=>n[t].axis===e)).shift()}function Sa(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[i]||void 0===e[i][n])return;delete e[i][n],void 0!==e[i]._visualValues&&void 0!==e[i]._visualValues[n]&&delete e[i]._visualValues[n]}}}const Pa=t=>"reset"===t||"none"===t,Oa=(t,e)=>e?t:Object.assign({},t);class Ta{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=wa(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&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")}updateIndex(t){this.index!==t&&Sa(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,n=this.getDataset(),i=(t,e,n,i)=>"x"===t?e:"r"===t?i:n,o=e.xAxisID=In(n.xAxisID,Ca(t,"x")),a=e.yAxisID=In(n.yAxisID,Ca(t,"y")),r=e.rAxisID=In(n.rAxisID,Ca(t,"r")),s=e.indexAxis,l=e.iAxisID=i(s,o,a,r),c=e.vAxisID=i(s,a,o,r);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Mi(this._data,this),t._stacked&&Sa(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),n=this._data;if(On(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:n,vScale:i}=e,o="x"===n.axis?"x":"y",a="x"===i.axis?"x":"y",r=Object.keys(t),s=new Array(r.length);let l,c,u;for(l=0,c=r.length;l<c;++l)u=r[l],s[l]={[o]:u,[a]:t[u]};return s}(e,t)}else if(n!==e){if(n){Mi(n,this);const t=this._cachedMeta;Sa(t),t._parsed=[]}e&&Object.isExtensible(e)&&((i=e)._chartjs?i._chartjs.listeners.push(this):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),wi.forEach((t=>{const e="_onData"+$n(t),n=i[t];Object.defineProperty(i,t,{configurable:!0,enumerable:!1,value(...t){const o=n.apply(this,t);return i._chartjs.listeners.forEach((n=>{"function"==typeof n[e]&&n[e](...t)})),o}})})))),this._syncList=[],this._data=e}var i}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const o=e._stacked;e._stacked=wa(e.vScale,e),e.stack!==n.stack&&(i=!0,Sa(e),e.stack=n.stack),this._resyncElements(t),(i||o!==e._stacked)&&(Da(this,e._parsed),e._stacked=wa(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:n,_data:i}=this,{iScale:o,_stacked:a}=n,r=o.axis;let s,l,c,u=0===t&&e===i.length||n._sorted,h=t>0&&n._parsed[t-1];if(!1===this._parsing)n._parsed=i,n._sorted=!0,c=i;else{c=Pn(i[t])?this.parseArrayData(n,i,t,e):On(i[t])?this.parseObjectData(n,i,t,e):this.parsePrimitiveData(n,i,t,e);const o=()=>null===l[r]||h&&l[r]<h[r];for(s=0;s<e;++s)n._parsed[s+t]=l=c[s],u&&(o()&&(u=!1),h=l);n._sorted=u}a&&Da(this,c)}parsePrimitiveData(t,e,n,i){const{iScale:o,vScale:a}=t,r=o.axis,s=a.axis,l=o.getLabels(),c=o===a,u=new Array(i);let h,d,f;for(h=0,d=i;h<d;++h)f=h+n,u[h]={[r]:c||o.parse(l[f],f),[s]:a.parse(e[f],f)};return u}parseArrayData(t,e,n,i){const{xScale:o,yScale:a}=t,r=new Array(i);let s,l,c,u;for(s=0,l=i;s<l;++s)c=s+n,u=e[c],r[s]={x:o.parse(u[0],c),y:a.parse(u[1],c)};return r}parseObjectData(t,e,n,i){const{xScale:o,yScale:a}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=new Array(i);let c,u,h,d;for(c=0,u=i;c<u;++c)h=c+n,d=e[h],l[c]={x:o.parse(Yn(d,r),h),y:a.parse(Yn(d,s),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,n){const i=this.chart,o=this._cachedMeta,a=e[t.axis];return _a({keys:xa(i,!0),values:e._stacks[t.axis]._visualValues},a,o.index,{mode:n})}updateRangeFromParsed(t,e,n,i){const o=n[e.axis];let a=null===o?NaN:o;const r=i&&n._stacks[e.axis];i&&r&&(i.values=r,a=_a(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const n=this._cachedMeta,i=n._parsed,o=n._sorted&&t===n.iScale,a=i.length,r=this._getOtherScale(t),s=((t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:xa(n,!0),values:null})(e,n,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:u}=function(t){const{min:e,max:n,minDefined:i,maxDefined:o}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}(r);let h,d;function f(){d=i[h];const e=d[r.axis];return!Tn(d[t.axis])||c>e||u<e}for(h=0;h<a&&(f()||(this.updateRangeFromParsed(l,t,d,s),!o));++h);if(o)for(h=a-1;h>=0;--h)if(!f()){this.updateRangeFromParsed(l,t,d,s);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,n=[];let i,o,a;for(i=0,o=e.length;i<o;++i)a=e[i][t.axis],Tn(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,n=e.iScale,i=e.vScale,o=this.getParsed(t);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,n,i,o;return On(t)?(e=t.top,n=t.right,i=t.bottom,o=t.left):e=n=i=o=t,{top:e,right:n,bottom:i,left:o,disabled:!1===t}}(In(this.options.clip,function(t,e,n){if(!1===n)return!1;const i=ya(t,n),o=ya(e,n);return{top:o.end,right:i.end,bottom:o.start,left:i.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,n=this._cachedMeta,i=n.data||[],o=e.chartArea,a=[],r=this._drawStart||0,s=this._drawCount||i.length-r,l=this.options.drawActiveElementsOnTop;let c;for(n.dataset&&n.dataset.draw(t,o,r,s),c=r;c<r+s;++c){const e=i[c];e.hidden||(e.active&&l?a.push(e):e.draw(t,o))}for(c=0;c<a.length;++c)a[c].draw(t,o)}getStyle(t,e){const n=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,e,n){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];o=e.$context||(e.$context=function(t,e,n){return _o(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=function(t,e){return _o(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=n,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",n){const i="active"===e,o=this._cachedDataOpts,a=t+"-"+e,r=o[a],s=this.enableOptionSharing&&qn(n);if(r)return Oa(r,s);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),u=i?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),c),d=Object.keys(Xi.elements[t]),f=l.resolveNamedOptions(h,d,(()=>this.getContext(n,i,e)),u);return f.$shared&&(f.$shared=s,o[a]=Object.freeze(Oa(f,s))),f}_resolveAnimations(t,e,n){const i=this.chart,o=this._cachedDataOpts,a=`animation-${e}`,r=o[a];if(r)return r;let s;if(!1!==i.options.animation){const i=this.chart.config,o=i.datasetAnimationScopeKeys(this._type,e),a=i.getOptionScopes(this.getDataset(),o);s=i.createResolver(a,this.getContext(t,n,e))}const l=new ba(i,s&&s.animations);return s&&s._cacheable&&(o[a]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Pa(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const n=this.resolveDataElementOptions(t,e),i=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(e,o)||o!==i;return this.updateSharedOptions(o,e,n),{sharedOptions:o,includeOptions:a}}updateElement(t,e,n,i){Pa(i)?Object.assign(t,n):this._resolveAnimations(e,i).update(t,n)}updateSharedOptions(t,e,n){t&&!Pa(e)&&this._resolveAnimations(void 0,e).update(t,n)}_setStyle(t,e,n,i){t.active=i;const o=this.getStyle(e,i);this._resolveAnimations(e,n,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,e,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,n=this._cachedMeta.data;for(const[t,e,n]of this._syncList)this[t](e,n);this._syncList=[];const i=n.length,o=e.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,e,n=!0){const i=this._cachedMeta,o=i.data,a=t+e;let r;const s=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(s(o),r=t;r<a;++r)o[r]=new this.dataElementType;this._parsing&&s(i._parsed),this.parse(t,e),n&&this.updateElements(o,t,e,"reset")}updateElements(t,e,n,i){}_removeElements(t,e){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,e);n._stacked&&Sa(n,i)}n.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,n,i]=t;this[e](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Ea(t){const e=t.iScale,n=function(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let i=[];for(let e=0,o=n.length;e<o;e++)i=i.concat(n[e].controller.getAllParsedValues(t));t._cache.$bar=ki(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let i,o,a,r,s=e._length;const l=()=>{32767!==a&&-32768!==a&&(qn(r)&&(s=Math.min(s,Math.abs(a-r)||s)),r=a)};for(i=0,o=n.length;i<o;++i)a=e.getPixelForValue(n[i]),l();for(r=void 0,i=0,o=e.ticks.length;i<o;++i)a=e.getPixelForTick(i),l();return s}function Ia(t,e,n,i){return Pn(t)?function(t,e,n,i){const o=n.parse(t[0],i),a=n.parse(t[1],i),r=Math.min(o,a),s=Math.max(o,a);let l=r,c=s;Math.abs(r)>Math.abs(s)&&(l=s,c=r),e[n.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:a,min:r,max:s}}(t,e,n,i):e[n.axis]=n.parse(t,i),e}function Aa(t,e,n,i){const o=t.iScale,a=t.vScale,r=o.getLabels(),s=o===a,l=[];let c,u,h,d;for(c=n,u=n+i;c<u;++c)d=e[c],h={},h[o.axis]=s||o.parse(r[c],c),l.push(Ia(d,h,a,c));return l}function Ra(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function La(t,e,n,i){let o=e.borderSkipped;const a={};if(!o)return void(t.borderSkipped=a);if(!0===o)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:s,reverse:l,top:c,bottom:u}=function(t){let e,n,i,o,a;return t.horizontal?(e=t.base>t.x,n="left",i="right"):(e=t.base<t.y,n="bottom",i="top"),e?(o="end",a="start"):(o="start",a="end"),{start:n,end:i,reverse:e,top:o,bottom:a}}(t);"middle"===o&&n&&(t.enableBorderRadius=!0,(n._top||0)===i?o=c:(n._bottom||0)===i?o=u:(a[Fa(u,r,s,l)]=!0,o=c)),a[Fa(o,r,s,l)]=!0,t.borderSkipped=a}function Fa(t,e,n,i){var o,a,r;return i?(r=n,t=ja(t=(o=t)===(a=e)?r:o===r?a:o,n,e)):t=ja(t,e,n),t}function ja(t,e,n){return"start"===t?e:"end"===t?n:t}function Na(t,{inflateAmount:e},n){t.inflateAmount="auto"===e?1===n?.33:0:e}class Ba extends Ta{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map(((e,o)=>{const a=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const n=this.getDataset().data,i=this._cachedMeta;if(!1===this._parsing)i._parsed=n;else{let o,a,r=t=>+n[t];if(On(n[t])){const{key:t="value"}=this._parsing;r=e=>+Yn(n[e],t)}for(o=t,a=t+e;o<a;++o)i._parsed[o]=r(o)}}_getRotation(){return ci(this.options.rotation-90)}_getCircumference(){return ci(this.options.circumference)}_getRotationExtents(){let t=Jn,e=-Jn;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),e=Math.max(e,o+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:n}=e,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),s=Math.min((c=r,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/c),1);var l,c;const u=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,n){let i=1,o=1,a=0,r=0;if(e<Jn){const s=t,l=s+e,c=Math.cos(s),u=Math.sin(s),h=Math.cos(l),d=Math.sin(l),f=(t,e,i)=>mi(t,s,l,!0)?1:Math.max(e,e*n,i,i*n),p=(t,e,i)=>mi(t,s,l,!0)?-1:Math.min(e,e*n,i,i*n),g=f(0,c,h),m=f(ti,u,d),v=p(Xn,c,h),b=p(Xn+ti,u,d);i=(g-v)/2,o=(m-b)/2,a=-(g+v)/2,r=-(m+b)/2}return{ratioX:i,ratioY:o,offsetX:a,offsetY:r}}(d,h,s),v=(n.width-a)/f,b=(n.height-a)/p,y=Math.max(Math.min(v,b)/2,0),x=An(this.options.radius,y),_=(x-Math.max(x*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,i.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*u,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const n=this.options,i=this._cachedMeta,o=this._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===i._parsed[t]||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Jn)}updateElements(t,e,n,i){const o="reset"===i,a=this.chart,r=a.chartArea,s=a.options.animation,l=(r.left+r.right)/2,c=(r.top+r.bottom)/2,u=o&&s.animateScale,h=u?0:this.innerRadius,d=u?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,i);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,o);for(g=e;g<e+n;++g){const e=this._circumference(g,o),n=t[g],a={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:h};p&&(a.options=f||this.resolveDataElementOptions(g,n.active?"active":i)),m+=e,this.updateElement(n,g,a,i)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let n,i=0;for(n=0;n<e.length;n++){const o=t._parsed[n];null===o||isNaN(o)||!this.chart.getDataVisibility(n)||e[n].hidden||(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?Jn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=Hi(e._parsed[t],n.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const n=this.chart;let i,o,a,r,s;if(!t)for(i=0,o=n.data.datasets.length;i<o;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),t=a.data,r=a.controller;break}if(!t)return 0;for(i=0,o=t.length;i<o;++i)s=r.resolveDataElementOptions(i),"inner"!==s.borderAlign&&(e=Math.max(e,s.borderWidth||0,s.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let n=0,i=t.length;n<i;++n){const t=this.resolveDataElementOptions(n);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e}_getRingWeight(t){return Math.max(In(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class za extends Ta{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return e.labels.map(((e,o)=>{const a=t.getDatasetMeta(0).controller.getStyle(o);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}}))}return[]}},onClick(t,e,n){n.chart.toggleDataVisibility(e.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=Hi(e._parsed[t].r,n.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,e,n,i){return Lo.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,n)=>{const i=this.getParsed(n).r;!isNaN(i)&&this.chart.getDataVisibility(n)&&(i<e.min&&(e.min=i),i>e.max&&(e.max=i))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,n=t.options,i=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(i/2,0),a=(o-Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,n,i){const o="reset"===i,a=this.chart,r=a.options.animation,s=this._cachedMeta.rScale,l=s.xCenter,c=s.yCenter,u=s.getIndexAngle(0)-.5*Xn;let h,d=u;const f=360/this.countVisibleElements();for(h=0;h<e;++h)d+=this._computeAngle(h,i,f);for(h=e;h<e+n;h++){const e=t[h];let n=d,p=d+this._computeAngle(h,i,f),g=a.getDataVisibility(h)?s.getDistanceFromCenterForValue(this.getParsed(h).r):0;d=p,o&&(r.animateScale&&(g=0),r.animateRotate&&(n=p=u));const m={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:n,endAngle:p,options:this.resolveDataElementOptions(h,e.active?"active":i)};this.updateElement(e,h,m,i)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,n)=>{!isNaN(this.getParsed(n).r)&&this.chart.getDataVisibility(n)&&e++})),e}_computeAngle(t,e,n){return this.chart.getDataVisibility(t)?ci(this.resolveDataElementOptions(t,e).angle||n):0}}var Ha=Object.freeze({__proto__:null,BarController:class extends Ta{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,n,i){return Aa(t,e,n,i)}parseArrayData(t,e,n,i){return Aa(t,e,n,i)}parseObjectData(t,e,n,i){const{iScale:o,vScale:a}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l="x"===o.axis?r:s,c="x"===a.axis?r:s,u=[];let h,d,f,p;for(h=n,d=n+i;h<d;++h)p=e[h],f={},f[o.axis]=o.parse(Yn(p,l),h),u.push(Ia(Yn(p,c),f,a,h));return u}updateRangeFromParsed(t,e,n,i){super.updateRangeFromParsed(t,e,n,i);const o=n._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:n,vScale:i}=e,o=this.getParsed(t),a=o._custom,r=Ra(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,n,i){const o="reset"===i,{index:a,_cachedMeta:{vScale:r}}=this,s=r.getBasePixel(),l=r.isHorizontal(),c=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,i);for(let d=e;d<e+n;d++){const e=this.getParsed(d),n=o||Sn(e[r.axis])?{base:s,head:s}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,c),p=(e._stacks||{})[r.axis],g={horizontal:l,base:n.base,enableBorderRadius:!p||Ra(e._custom)||a===p._top||a===p._bottom,x:l?n.head:f.center,y:l?f.center:n.head,height:l?f.size:Math.abs(n.size),width:l?Math.abs(n.size):f.size};h&&(g.options=u||this.resolveDataElementOptions(d,t[d].active?"active":i));const m=g.options||t[d].options;La(g,m,p,a),Na(g,m,c.ratio),this.updateElement(t[d],d,g,i)}}_getStacks(t,e){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),o=n.options.stacked,a=[],r=this._cachedMeta.controller.getParsed(e),s=r&&r[n.axis],l=t=>{const e=t._parsed.find((t=>t[n.axis]===s)),i=e&&e[t.vScale.axis];if(Sn(i)||isNaN(i))return!0};for(const n of i)if((void 0===e||!l(n))&&((!1===o||-1===a.indexOf(n.stack)||void 0===o&&void 0===n.stack)&&a.push(n.stack),n.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,n){const i=this._getStacks(t,n),o=void 0!==e?i.indexOf(e):-1;return-1===o?i.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,n=e.iScale,i=[];let o,a;for(o=0,a=e.data.length;o<a;++o)i.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const r=t.barThickness;return{min:r||Ea(e),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:n,index:i},options:{base:o,minBarLength:a}}=this,r=o||0,s=this.getParsed(t),l=s._custom,c=Ra(l);let u,h,d=s[e.axis],f=0,p=n?this.applyStack(e,s,n):d;p!==d&&(f=p-d,p=d),c&&(d=l.barStart,p=l.barEnd-l.barStart,0!==d&&oi(d)!==oi(l.barEnd)&&(f=0),f+=d);const g=Sn(o)||c?f:o;let m=e.getPixelForValue(g);if(u=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):m,h=u-m,Math.abs(h)<a){h=function(t,e,n){return 0!==t?oi(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}(h,e,r)*a,d===r&&(m-=h/2);const t=e.getPixelForDecimal(0),o=e.getPixelForDecimal(1),l=Math.min(t,o),f=Math.max(t,o);m=Math.max(Math.min(m,f),l),u=m+h,n&&!c&&(s._stacks[e.axis]._visualValues[i]=e.getValueForPixel(u)-e.getValueForPixel(m))}if(m===e.getPixelForValue(r)){const t=oi(h)*e.getLineWidthForValue(r)/2;m+=t,h-=t}return{size:h,base:m,head:u,center:u+h/2}}_calculateBarIndexPixels(t,e){const n=e.scale,i=this.options,o=i.skipNull,a=In(i.maxBarThickness,1/0);let r,s;if(e.grouped){const n=o?this._getStackCount(t):e.stackCount,l="flex"===i.barThickness?function(t,e,n,i){const o=e.pixels,a=o[t];let r=t>0?o[t-1]:null,s=t<o.length-1?o[t+1]:null;const l=n.categoryPercentage;null===r&&(r=a-(null===s?e.end-e.start:s-a)),null===s&&(s=a+a-r);const c=a-(a-Math.min(r,s))/2*l;return{chunk:Math.abs(s-r)/2*l/i,ratio:n.barPercentage,start:c}}(t,e,i,n):function(t,e,n,i){const o=n.barThickness;let a,r;return Sn(o)?(a=e.min*n.categoryPercentage,r=n.barPercentage):(a=o*i,r=1),{chunk:a/i,ratio:r,start:e.pixels[t]-a/2}}(t,e,i,n),c=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);r=l.start+l.chunk*c+l.chunk/2,s=Math.min(a,l.chunk*l.ratio)}else r=n.getPixelForValue(this.getParsed(t)[n.axis],t),s=Math.min(a,e.min*e.ratio);return{base:r-s/2,head:r+s/2,center:r,size:s}}draw(){const t=this._cachedMeta,e=t.vScale,n=t.data,i=n.length;let o=0;for(;o<i;++o)null===this.getParsed(o)[e.axis]||n[o].hidden||n[o].draw(this._ctx)}},BubbleController:class extends Ta{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,n,i){const o=super.parsePrimitiveData(t,e,n,i);for(let t=0;t<o.length;t++)o[t]._custom=this.resolveDataElementOptions(t+n).radius;return o}parseArrayData(t,e,n,i){const o=super.parseArrayData(t,e,n,i);for(let t=0;t<o.length;t++){const i=e[n+t];o[t]._custom=In(i[2],this.resolveDataElementOptions(t+n).radius)}return o}parseObjectData(t,e,n,i){const o=super.parseObjectData(t,e,n,i);for(let t=0;t<o.length;t++){const i=e[n+t];o[t]._custom=In(i&&i.r&&+i.r,this.resolveDataElementOptions(t+n).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let n=t.length-1;n>=0;--n)e=Math.max(e,t[n].size(this.resolveDataElementOptions(n))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:o}=e,a=this.getParsed(t),r=i.getLabelForValue(a.x),s=o.getLabelForValue(a.y),l=a._custom;return{label:n[t]||"",value:"("+r+", "+s+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,n,i){const o="reset"===i,{iScale:a,vScale:r}=this._cachedMeta,{sharedOptions:s,includeOptions:l}=this._getSharedOptions(e,i),c=a.axis,u=r.axis;for(let h=e;h<e+n;h++){const e=t[h],n=!o&&this.getParsed(h),d={},f=d[c]=o?a.getPixelForDecimal(.5):a.getPixelForValue(n[c]),p=d[u]=o?r.getBasePixel():r.getPixelForValue(n[u]);d.skip=isNaN(f)||isNaN(p),l&&(d.options=s||this.resolveDataElementOptions(h,e.active?"active":i),o&&(d.options.radius=0)),this.updateElement(e,h,d,i)}}resolveDataElementOptions(t,e){const n=this.getParsed(t);let i=super.resolveDataElementOptions(t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return"active"!==e&&(i.radius=0),i.radius+=In(n&&n._custom,o),i}},DoughnutController:Ba,LineController:class extends Ta{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:n,data:i=[],_dataset:o}=e,a=this.chart._animationsDisabled;let{start:r,count:s}=Oi(e,i,a);this._drawStart=r,this._drawCount=s,Ti(e)&&(r=0,s=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:l},t),this.updateElements(i,r,s,t)}updateElements(t,e,n,i){const o="reset"===i,{iScale:a,vScale:r,_stacked:s,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,i),h=a.axis,d=r.axis,{spanGaps:f,segment:p}=this.options,g=si(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||"none"===i,v=e+n,b=t.length;let y=e>0&&this.getParsed(e-1);for(let n=0;n<b;++n){const f=t[n],b=m?f:{};if(n<e||n>=v){b.skip=!0;continue}const x=this.getParsed(n),_=Sn(x[d]),w=b[h]=a.getPixelForValue(x[h],n),M=b[d]=o||_?r.getBasePixel():r.getPixelForValue(s?this.applyStack(r,x,s):x[d],n);b.skip=isNaN(w)||isNaN(M)||_,b.stop=n>0&&Math.abs(x[h]-y[h])>g,p&&(b.parsed=x,b.raw=l.data[n]),u&&(b.options=c||this.resolveDataElementOptions(n,f.active?"active":i)),m||this.updateElement(f,n,b,i),y=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,n=e.options&&e.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends Ba{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:za,RadarController:class extends Ta{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,n=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(n[e.axis])}}parseObjectData(t,e,n,i){return Lo.bind(this)(t,e,n,i)}update(t){const e=this._cachedMeta,n=e.dataset,i=e.data||[],o=e.iScale.getLabels();if(n.points=i,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:e};this.updateElement(n,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,e,n,i){const o=this._cachedMeta.rScale,a="reset"===i;for(let r=e;r<e+n;r++){const e=t[r],n=this.resolveDataElementOptions(r,e.active?"active":i),s=o.getPointPositionForValue(r,this.getParsed(r).r),l=a?o.xCenter:s.x,c=a?o.yCenter:s.y,u={x:l,y:c,angle:s.angle,skip:isNaN(l)||isNaN(c),options:n};this.updateElement(e,r,u,i)}}},ScatterController:class extends Ta{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,n=this.chart.data.labels||[],{xScale:i,yScale:o}=e,a=this.getParsed(t),r=i.getLabelForValue(a.x),s=o.getLabelForValue(a.y);return{label:n[t]||"",value:"("+r+", "+s+")"}}update(t){const e=this._cachedMeta,{data:n=[]}=e,i=this.chart._animationsDisabled;let{start:o,count:a}=Oi(e,n,i);if(this._drawStart=o,this._drawCount=a,Ti(e)&&(o=0,a=n.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:a}=e;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=n;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(o,void 0,{animated:!i,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,n,i){const o="reset"===i,{iScale:a,vScale:r,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,i),u=this.getSharedOptions(c),h=this.includeOptions(i,u),d=a.axis,f=r.axis,{spanGaps:p,segment:g}=this.options,m=si(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||o||"none"===i;let b=e>0&&this.getParsed(e-1);for(let c=e;c<e+n;++c){const e=t[c],n=this.getParsed(c),p=v?e:{},y=Sn(n[f]),x=p[d]=a.getPixelForValue(n[d],c),_=p[f]=o||y?r.getBasePixel():r.getPixelForValue(s?this.applyStack(r,n,s):n[f],c);p.skip=isNaN(x)||isNaN(_)||y,p.stop=c>0&&Math.abs(n[d]-b[d])>m,g&&(p.parsed=n,p.raw=l.data[c]),h&&(p.options=u||this.resolveDataElementOptions(c,e.active?"active":i)),v||this.updateElement(e,c,p,i),b=n}this.updateSharedOptions(u,i,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}const n=t.dataset,i=n.options&&n.options.borderWidth||0;if(!e.length)return i;const o=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(i,o,a)/2}}});function Va(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wa{static override(t){Object.assign(Wa.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Va()}parse(){return Va()}format(){return Va()}add(){return Va()}diff(){return Va()}startOf(){return Va()}endOf(){return Va()}}var Ya=Wa;function $a(t,e,n,i){const{controller:o,data:a,_sorted:r}=t,s=o._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(s&&e===s.axis&&"r"!==e&&r&&a.length){const r=s._reversePixels?_i:xi;if(!i){const i=r(a,e,n);if(l){const{vScale:e}=o._cachedMeta,{_parsed:n}=t,a=n.slice(0,i.lo+1).reverse().findIndex((t=>!Sn(t[e.axis])));i.lo-=Math.max(0,a);const r=n.slice(i.hi).findIndex((t=>!Sn(t[e.axis])));i.hi+=Math.max(0,r)}return i}if(o._sharedOptions){const t=a[0],i="function"==typeof t.getRange&&t.getRange(e);if(i){const t=r(a,e,n-i),o=r(a,e,n+i);return{lo:t.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}function qa(t,e,n,i,o){const a=t.getSortedVisibleDatasetMetas(),r=n[e];for(let t=0,n=a.length;t<n;++t){const{index:n,data:s}=a[t],{lo:l,hi:c}=$a(a[t],e,r,o);for(let t=l;t<=c;++t){const e=s[t];e.skip||i(e,n,t)}}}function Ua(t,e,n,i,o){const a=[];return o||t.isPointInArea(e)?(qa(t,n,e,(function(n,r,s){(o||no(n,t.chartArea,0))&&n.inRange(e.x,e.y,i)&&a.push({element:n,datasetIndex:r,index:s})}),!0),a):a}function Ga(t,e,n,i,o,a){return a||t.isPointInArea(e)?"r"!==n||i?function(t,e,n,i,o,a){let r=[];const s=function(t){const e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){const o=e?Math.abs(t.x-i.x):0,a=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}(n);let l=Number.POSITIVE_INFINITY;return qa(t,n,e,(function(n,c,u){const h=n.inRange(e.x,e.y,o);if(i&&!h)return;const d=n.getCenterPoint(o);if(!a&&!t.isPointInArea(d)&&!h)return;const f=s(e,d);f<l?(r=[{element:n,datasetIndex:c,index:u}],l=f):f===l&&r.push({element:n,datasetIndex:c,index:u})})),r}(t,e,n,i,o,a):function(t,e,n,i){let o=[];return qa(t,n,e,(function(t,n,a){const{startAngle:r,endAngle:s}=t.getProps(["startAngle","endAngle"],i),{angle:l}=di(t,{x:e.x,y:e.y});mi(l,r,s)&&o.push({element:t,datasetIndex:n,index:a})})),o}(t,e,n,o):[]}function Xa(t,e,n,i,o){const a=[],r="x"===n?"inXRange":"inYRange";let s=!1;return qa(t,n,e,((t,i,l)=>{t[r]&&t[r](e[n],o)&&(a.push({element:t,datasetIndex:i,index:l}),s=s||t.inRange(e.x,e.y,o))})),i&&!s?[]:a}var Ja={evaluateInteractionItems:qa,modes:{index(t,e,n,i){const o=Go(e,t),a=n.axis||"x",r=n.includeInvisible||!1,s=n.intersect?Ua(t,o,a,i,r):Ga(t,o,a,!1,i,r),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=s[0].index,n=t.data[e];n&&!n.skip&&l.push({element:n,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,n,i){const o=Go(e,t),a=n.axis||"xy",r=n.includeInvisible||!1;let s=n.intersect?Ua(t,o,a,i,r):Ga(t,o,a,!1,i,r);if(s.length>0){const e=s[0].datasetIndex,n=t.getDatasetMeta(e).data;s=[];for(let t=0;t<n.length;++t)s.push({element:n[t],datasetIndex:e,index:t})}return s},point:(t,e,n,i)=>Ua(t,Go(e,t),n.axis||"xy",i,n.includeInvisible||!1),nearest(t,e,n,i){const o=Go(e,t),a=n.axis||"xy",r=n.includeInvisible||!1;return Ga(t,o,a,n.intersect,i,r)},x:(t,e,n,i)=>Xa(t,Go(e,t),"x",n.intersect,i),y:(t,e,n,i)=>Xa(t,Go(e,t),"y",n.intersect,i)}};const Ka=["left","top","right","bottom"];function Za(t,e){return t.filter((t=>t.pos===e))}function Qa(t,e){return t.filter((t=>-1===Ka.indexOf(t.pos)&&t.box.axis===e))}function tr(t,e){return t.sort(((t,n)=>{const i=e?n:t,o=e?t:n;return i.weight===o.weight?i.index-o.index:i.weight-o.weight}))}function er(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function nr(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function ir(t,e,n,i){const{pos:o,box:a}=n,r=t.maxPadding;if(!On(o)){n.size&&(t[o]-=n.size);const e=i[n.stack]||{size:0,count:1};e.size=Math.max(e.size,n.horizontal?a.height:a.width),n.size=e.size/e.count,t[o]+=n.size}a.getPadding&&nr(r,a.getPadding());const s=Math.max(0,e.outerWidth-er(r,t,"left","right")),l=Math.max(0,e.outerHeight-er(r,t,"top","bottom")),c=s!==t.w,u=l!==t.h;return t.w=s,t.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function or(t,e){const n=e.maxPadding;return function(t){const i={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{i[t]=Math.max(e[t],n[t])})),i}(t?["left","right"]:["top","bottom"])}function ar(t,e,n,i){const o=[];let a,r,s,l,c,u;for(a=0,r=t.length,c=0;a<r;++a){s=t[a],l=s.box,l.update(s.width||e.w,s.height||e.h,or(s.horizontal,e));const{same:r,other:h}=ir(e,n,s,i);c|=r&&o.length,u=u||h,l.fullSize||o.push(s)}return c&&ar(o,e,n,i)||u}function rr(t,e,n,i,o){t.top=n,t.left=e,t.right=e+i,t.bottom=n+o,t.width=i,t.height=o}function sr(t,e,n,i){const o=n.padding;let{x:a,y:r}=e;for(const s of t){const t=s.box,l=i[s.stack]||{count:1,placed:0,weight:1},c=s.stackWeight/l.weight||1;if(s.horizontal){const i=e.w*c,a=l.size||t.height;qn(l.start)&&(r=l.start),t.fullSize?rr(t,o.left,r,n.outerWidth-o.right-o.left,a):rr(t,e.left+l.placed,r,i,a),l.start=r,l.placed+=i,r=t.bottom}else{const i=e.h*c,r=l.size||t.width;qn(l.start)&&(a=l.start),t.fullSize?rr(t,a,o.top,r,n.outerHeight-o.bottom-o.top):rr(t,a,e.top+l.placed,r,i),l.start=a,l.placed+=i,a=t.right}}e.x=a,e.y=r}var lr={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const o=bo(t.options.layout.padding),a=Math.max(e-o.width,0),r=Math.max(n-o.height,0),s=function(t){const e=function(t){const e=[];let n,i,o,a,r,s;for(n=0,i=(t||[]).length;n<i;++n)o=t[n],({position:a,options:{stack:r,stackWeight:s=1}}=o),e.push({index:n,box:o,pos:a,horizontal:o.isHorizontal(),weight:o.weight,stack:r&&a+r,stackWeight:s});return e}(t),n=tr(e.filter((t=>t.box.fullSize)),!0),i=tr(Za(e,"left"),!0),o=tr(Za(e,"right")),a=tr(Za(e,"top"),!0),r=tr(Za(e,"bottom")),s=Qa(e,"x"),l=Qa(e,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:o.concat(l).concat(r).concat(s),chartArea:Za(e,"chartArea"),vertical:i.concat(o).concat(l),horizontal:a.concat(r).concat(s)}}(t.boxes),l=s.vertical,c=s.horizontal;Ln(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const u=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:a,availableHeight:r,vBoxMaxWidth:a/2/u,hBoxMaxHeight:r/2}),d=Object.assign({},o);nr(d,bo(i));const f=Object.assign({maxPadding:d,w:a,h:r,x:o.left,y:o.top},o),p=function(t,e){const n=function(t){const e={};for(const n of t){const{stack:t,pos:i,stackWeight:o}=n;if(!t||!Ka.includes(i))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return e}(t),{vBoxMaxWidth:i,hBoxMaxHeight:o}=e;let a,r,s;for(a=0,r=t.length;a<r;++a){s=t[a];const{fullSize:r}=s.box,l=n[s.stack],c=l&&s.stackWeight/l.weight;s.horizontal?(s.width=c?c*i:r&&e.availableWidth,s.height=o):(s.width=i,s.height=c?c*o:r&&e.availableHeight)}return n}(l.concat(c),h);ar(s.fullSize,f,h,p),ar(l,f,h,p),ar(c,f,h,p)&&ar(l,f,h,p),function(t){const e=t.maxPadding;function n(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(f),sr(s.leftAndTop,f,h,p),f.x+=f.w,f.y+=f.h,sr(s.rightAndBottom,f,h,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Ln(s.chartArea,(e=>{const n=e.box;Object.assign(n,t.chartArea),n.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})}))}};class cr{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,n){}removeEventListener(t,e,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,n,i){return e=Math.max(0,e||t.width),n=n||t.height,{width:e,height:Math.max(0,i?Math.floor(e/i):n)}}isAttached(t){return!0}updateConfig(t){}}class ur extends cr{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const hr="$chartjs",dr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},fr=t=>null===t||""===t,pr=!!Ko&&{passive:!0};function gr(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,pr)}function mr(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function vr(t,e,n){const i=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||mr(n.addedNodes,i),e=e&&!mr(n.removedNodes,i);e&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}function br(t,e,n){const i=t.canvas,o=new MutationObserver((t=>{let e=!1;for(const n of t)e=e||mr(n.removedNodes,i),e=e&&!mr(n.addedNodes,i);e&&n()}));return o.observe(document,{childList:!0,subtree:!0}),o}const yr=new Map;let xr=0;function _r(){const t=window.devicePixelRatio;t!==xr&&(xr=t,yr.forEach(((e,n)=>{n.currentDevicePixelRatio!==t&&e()})))}function wr(t,e,n){const i=t.canvas,o=i&&Wo(i);if(!o)return;const a=Ci(((t,e)=>{const i=o.clientWidth;n(t,e),i<o.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],n=e.contentRect.width,i=e.contentRect.height;0===n&&0===i||a(n,i)}));return r.observe(o),function(t,e){yr.size||window.addEventListener("resize",_r),yr.set(t,e)}(t,a),r}function Mr(t,e,n){n&&n.disconnect(),"resize"===e&&function(t){yr.delete(t),yr.size||window.removeEventListener("resize",_r)}(t)}function kr(t,e,n){const i=t.canvas,o=Ci((e=>{null!==t.ctx&&n(function(t,e){const n=dr[t.type]||t.type,{x:i,y:o}=Go(t,e);return{type:n,chart:e,native:t,x:void 0!==i?i:null,y:void 0!==o?o:null}}(e,t))}),t);return function(t,e,n){t&&t.addEventListener(e,n,pr)}(i,e,o),o}class Dr extends cr{acquireContext(t,e){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){const n=t.style,i=t.getAttribute("height"),o=t.getAttribute("width");if(t[hr]={initial:{height:i,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",fr(o)){const e=Zo(t,"width");void 0!==e&&(t.width=e)}if(fr(i))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Zo(t,"height");void 0!==e&&(t.height=e)}}(t,e),n):null}releaseContext(t){const e=t.canvas;if(!e[hr])return!1;const n=e[hr].initial;["height","width"].forEach((t=>{const i=n[t];Sn(i)?e.removeAttribute(t):e.setAttribute(t,i)}));const i=n.style||{};return Object.keys(i).forEach((t=>{e.style[t]=i[t]})),e.width=e.width,delete e[hr],!0}addEventListener(t,e,n){this.removeEventListener(t,e);const i=t.$proxies||(t.$proxies={}),o={attach:vr,detach:br,resize:wr}[e]||kr;i[e]=o(t,e,n)}removeEventListener(t,e){const n=t.$proxies||(t.$proxies={}),i=n[e];i&&(({attach:Mr,detach:Mr,resize:Mr}[e]||gr)(t,e,i),n[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,n,i){return function(t,e,n,i){const o=$o(t),a=Uo(o,"margin"),r=Yo(o.maxWidth,t,"clientWidth")||Zn,s=Yo(o.maxHeight,t,"clientHeight")||Zn,l=function(t,e,n){let i,o;if(void 0===e||void 0===n){const a=t&&Wo(t);if(a){const t=a.getBoundingClientRect(),r=$o(a),s=Uo(r,"border","width"),l=Uo(r,"padding");e=t.width-l.width-s.width,n=t.height-l.height-s.height,i=Yo(r.maxWidth,a,"clientWidth"),o=Yo(r.maxHeight,a,"clientHeight")}else e=t.clientWidth,n=t.clientHeight}return{width:e,height:n,maxWidth:i||Zn,maxHeight:o||Zn}}(t,e,n);let{width:c,height:u}=l;if("content-box"===o.boxSizing){const t=Uo(o,"border","width"),e=Uo(o,"padding");c-=e.width+t.width,u-=e.height+t.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Xo(Math.min(c,r,l.maxWidth)),u=Xo(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Xo(c/2)),(void 0!==e||void 0!==n)&&i&&l.height&&u>l.height&&(u=l.height,c=Xo(Math.floor(u*i))),{width:c,height:u}}(t,e,n,i)}isAttached(t){const e=t&&Wo(t);return!(!e||!e.isConnected)}}class Cr{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return si(this.x)&&si(this.y)}getProps(t,e){const n=this.$animations;if(!e||!n)return this;const i={};return t.forEach((t=>{i[t]=n[t]&&n[t].active()?n[t]._to:this[t]})),i}}function Sr(t,e,n,i,o){const a=In(i,0),r=Math.min(In(o,t.length),t.length);let s,l,c,u=0;for(n=Math.ceil(n),o&&(s=o-i,n=s/Math.floor(s/n)),c=a;c<0;)u++,c=Math.round(a+u*n);for(l=Math.max(a,0);l<r;l++)l===c&&(e.push(t[l]),u++,c=Math.round(a+u*n))}const Pr=(t,e,n)=>"top"===e||"left"===e?t[e]+n:t[e]-n,Or=(t,e)=>Math.min(e||t,t);function Tr(t,e){const n=[],i=t.length/e,o=t.length;let a=0;for(;a<o;a+=i)n.push(t[Math.floor(a)]);return n}function Er(t,e,n){const i=t.ticks.length,o=Math.min(e,i-1),a=t._startPixel,r=t._endPixel,s=1e-6;let l,c=t.getPixelForTick(o);if(!(n&&(l=1===i?Math.max(c-a,r-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<a-s||c>r+s)))return c}function Ir(t){return t.drawTicks?t.tickLength:0}function Ar(t,e){if(!t.display)return 0;const n=yo(t.font,e),i=bo(t.padding);return(Pn(t.text)?t.text.length:1)*n.lineHeight+i.height}function Rr(t,e,n){let i=Si(t);return(n&&"right"!==e||!n&&"right"===e)&&(i=(t=>"left"===t?"right":"right"===t?"left":t)(i)),i}class Lr extends Cr{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:n,_suggestedMax:i}=this;return t=En(t,Number.POSITIVE_INFINITY),e=En(e,Number.NEGATIVE_INFINITY),n=En(n,Number.POSITIVE_INFINITY),i=En(i,Number.NEGATIVE_INFINITY),{min:En(t,n),max:En(e,i),minDefined:Tn(t),maxDefined:Tn(e)}}getMinMax(t){let e,{min:n,max:i,minDefined:o,maxDefined:a}=this.getUserBounds();if(o&&a)return{min:n,max:i};const r=this.getMatchingVisibleMetas();for(let s=0,l=r.length;s<l;++s)e=r[s].controller.getMinMax(this,t),o||(n=Math.min(n,e.min)),a||(i=Math.max(i,e.max));return n=a&&n>i?i:n,i=o&&n>i?n:i,{min:En(n,En(i,n)),max:En(i,En(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Rn(this.options.beforeUpdate,[this])}update(t,e,n){const{beginAtZero:i,grace:o,ticks:a}=this.options,r=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,n){const{min:i,max:o}=t,a=An(e,(o-i)/2),r=(t,e)=>n&&0===t?0:t+e;return{min:r(i,-Math.abs(a)),max:r(o,a)}}(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=r<this.ticks.length;this._convertTicksToLabels(s?Tr(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=function(t,e){const n=t.options.ticks,i=function(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),o=t._maxLength/n;return Math.floor(Math.min(i,o))}(t),o=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?function(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(e):[],r=a.length,s=a[0],l=a[r-1],c=[];if(r>o)return function(t,e,n,i){let o,a=0,r=n[0];for(i=Math.ceil(i),o=0;o<t.length;o++)o===r&&(e.push(t[o]),a++,r=n[a*i])}(e,c,a,r/o),c;const u=function(t,e,n){const i=function(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}(t),o=e.length/n;if(!i)return Math.max(o,1);const a=function(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(((t,e)=>t-e)).pop(),e}(i);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>o)return e}return Math.max(o,1)}(a,e,o);if(r>0){let t,n;const i=r>1?Math.round((l-s)/(r-1)):null;for(Sr(e,c,u,Sn(i)?0:s-i,s),t=0,n=r-1;t<n;t++)Sr(e,c,u,a[t],a[t+1]);return Sr(e,c,u,l,Sn(i)?e.length:l+i),c}return Sr(e,c,u),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),s&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,n=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,n=!n),this._startPixel=t,this._endPixel=e,this._reversePixels=n,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Rn(this.options.afterUpdate,[this])}beforeSetDimensions(){Rn(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Rn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Rn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Rn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let n,i,o;for(n=0,i=t.length;n<i;n++)o=t[n],o.label=Rn(e.callback,[o.value,n,t],this)}afterTickToLabelConversion(){Rn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Rn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,n=Or(this.ticks.length,t.ticks.maxTicksLimit),i=e.minRotation||0,o=e.maxRotation;let a,r,s,l=i;if(!this._isVisible()||!e.display||i>=o||n<=1||!this.isHorizontal())return void(this.labelRotation=i);const c=this._getLabelSizes(),u=c.widest.width,h=c.highest.height,d=vi(this.chart.width-u,0,this.maxWidth);a=t.offset?this.maxWidth/n:d/(n-1),u+6>a&&(a=d/(n-(t.offset?.5:1)),r=this.maxHeight-Ir(t.grid)-e.padding-Ar(t.title,this.chart.options.font),s=Math.sqrt(u*u+h*h),l=ui(Math.min(Math.asin(vi((c.highest.height+6)/a,-1,1)),Math.asin(vi(r/s,-1,1))-Math.asin(vi(h/s,-1,1)))),l=Math.max(i,Math.min(o,l))),this.labelRotation=l}afterCalculateLabelRotation(){Rn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Rn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:n,title:i,grid:o}}=this,a=this._isVisible(),r=this.isHorizontal();if(a){const a=Ar(i,e.options.font);if(r?(t.width=this.maxWidth,t.height=Ir(o)+a):(t.height=this.maxHeight,t.width=Ir(o)+a),n.display&&this.ticks.length){const{first:e,last:i,widest:o,highest:a}=this._getLabelSizes(),s=2*n.padding,l=ci(this.labelRotation),c=Math.cos(l),u=Math.sin(l);if(r){const e=n.mirror?0:u*o.width+c*a.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{const e=n.mirror?0:c*o.width+u*a.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,i,u,c)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,n,i){const{ticks:{align:o,padding:a},position:r}=this.options,s=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,h=0;s?l?(u=i*t.width,h=n*e.height):(u=n*t.height,h=i*e.width):"start"===o?h=e.width:"end"===o?u=t.width:"inner"!==o&&(u=t.width/2,h=e.width/2),this.paddingLeft=Math.max((u-r+a)*this.width/(this.width-r),0),this.paddingRight=Math.max((h-c+a)*this.width/(this.width-c),0)}else{let n=e.height/2,i=t.height/2;"start"===o?(n=0,i=t.height):"end"===o&&(n=e.height,i=0),this.paddingTop=n+a,this.paddingBottom=i+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Rn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,n=t.length;e<n;e++)Sn(t[e].label)&&(t.splice(e,1),n--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let n=this.ticks;e<n.length&&(n=Tr(n,e)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,n){const{ctx:i,_longestTextCache:o}=this,a=[],r=[],s=Math.floor(e/Or(e,n));let l,c,u,h,d,f,p,g,m,v,b,y=0,x=0;for(l=0;l<e;l+=s){if(h=t[l].label,d=this._resolveTickFontOptions(l),i.font=f=d.string,p=o[f]=o[f]||{data:{},gc:[]},g=d.lineHeight,m=v=0,Sn(h)||Pn(h)){if(Pn(h))for(c=0,u=h.length;c<u;++c)b=h[c],Sn(b)||Pn(b)||(m=Ji(i,p.data,p.gc,m,b),v+=g)}else m=Ji(i,p.data,p.gc,m,h),v=g;a.push(m),r.push(v),y=Math.max(m,y),x=Math.max(v,x)}!function(t,e){Ln(t,(t=>{const n=t.gc,i=n.length/2;let o;if(i>e){for(o=0;o<i;++o)delete t.data[n[o]];n.splice(0,i)}}))}(o,e);const _=a.indexOf(y),w=r.indexOf(x),M=t=>({width:a[t]||0,height:r[t]||0});return{first:M(0),last:M(e-1),widest:M(_),highest:M(w),widths:a,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return vi(this._alignToPixels?Zi(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const n=e[t];return n.$context||(n.$context=function(t,e,n){return _o(t,{tick:n,index:e,type:"tick"})}(this.getContext(),t,n))}return this.$context||(this.$context=_o(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=ci(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,r=o?o.widest.width+a:0,s=o?o.highest.height+a:0;return this.isHorizontal()?s*n>r*i?r/n:s/i:s*i<r*n?s/n:r/i}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,n=this.chart,i=this.options,{grid:o,position:a,border:r}=i,s=o.offset,l=this.isHorizontal(),c=this.ticks.length+(s?1:0),u=Ir(o),h=[],d=r.setContext(this.getContext()),f=d.display?d.width:0,p=f/2,g=function(t){return Zi(n,t,f)};let m,v,b,y,x,_,w,M,k,D,C,S;if("top"===a)m=g(this.bottom),_=this.bottom-u,M=m-p,D=g(t.top)+p,S=t.bottom;else if("bottom"===a)m=g(this.top),D=t.top,S=g(t.bottom)-p,_=m+p,M=this.top+u;else if("left"===a)m=g(this.right),x=this.right-u,w=m-p,k=g(t.left)+p,C=t.right;else if("right"===a)m=g(this.left),k=t.left,C=g(t.right)-p,x=m+p,w=this.left+u;else if("x"===e){if("center"===a)m=g((t.top+t.bottom)/2+.5);else if(On(a)){const t=Object.keys(a)[0],e=a[t];m=g(this.chart.scales[t].getPixelForValue(e))}D=t.top,S=t.bottom,_=m+p,M=_+u}else if("y"===e){if("center"===a)m=g((t.left+t.right)/2);else if(On(a)){const t=Object.keys(a)[0],e=a[t];m=g(this.chart.scales[t].getPixelForValue(e))}x=m-p,w=x-u,k=t.left,C=t.right}const P=In(i.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/P));for(v=0;v<c;v+=O){const t=this.getContext(v),e=o.setContext(t),i=r.setContext(t),a=e.lineWidth,c=e.color,u=i.dash||[],d=i.dashOffset,f=e.tickWidth,p=e.tickColor,g=e.tickBorderDash||[],m=e.tickBorderDashOffset;b=Er(this,v,s),void 0!==b&&(y=Zi(n,b,a),l?x=w=k=C=y:_=M=D=S=y,h.push({tx1:x,ty1:_,tx2:w,ty2:M,x1:k,y1:D,x2:C,y2:S,width:a,color:c,borderDash:u,borderDashOffset:d,tickWidth:f,tickColor:p,tickBorderDash:g,tickBorderDashOffset:m}))}return this._ticksLength=c,this._borderValue=m,h}_computeLabelItems(t){const e=this.axis,n=this.options,{position:i,ticks:o}=n,a=this.isHorizontal(),r=this.ticks,{align:s,crossAlign:l,padding:c,mirror:u}=o,h=Ir(n.grid),d=h+c,f=u?-c:d,p=-ci(this.labelRotation),g=[];let m,v,b,y,x,_,w,M,k,D,C,S,P="middle";if("top"===i)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===i)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,x=t.x}else if("right"===i){const t=this._getYAxisLabelAlignment(h);w=t.textAlign,x=t.x}else if("x"===e){if("center"===i)_=(t.top+t.bottom)/2+d;else if(On(i)){const t=Object.keys(i)[0],e=i[t];_=this.chart.scales[t].getPixelForValue(e)+d}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===i)x=(t.left+t.right)/2-d;else if(On(i)){const t=Object.keys(i)[0],e=i[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(h).textAlign}"y"===e&&("start"===s?P="top":"end"===s&&(P="bottom"));const O=this._getLabelSizes();for(m=0,v=r.length;m<v;++m){b=r[m],y=b.label;const t=o.setContext(this.getContext(m));M=this.getPixelForTick(m)+o.labelOffset,k=this._resolveTickFontOptions(m),D=k.lineHeight,C=Pn(y)?y.length:1;const e=C/2,n=t.color,s=t.textStrokeColor,c=t.textStrokeWidth;let h,d=w;if(a?(x=M,"inner"===w&&(d=m===v-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),S="top"===i?"near"===l||0!==p?-C*D+D/2:"center"===l?-O.highest.height/2-e*D+D:-O.highest.height+D/2:"near"===l||0!==p?D/2:"center"===l?O.highest.height/2-e*D:O.highest.height-C*D,u&&(S*=-1),0===p||t.showLabelBackdrop||(x+=D/2*Math.sin(p))):(_=M,S=(1-C)*D/2),t.showLabelBackdrop){const e=bo(t.backdropPadding),n=O.heights[m],i=O.widths[m];let o=S-e.top,a=0-e.left;switch(P){case"middle":o-=n/2;break;case"bottom":o-=n}switch(w){case"center":a-=i/2;break;case"right":a-=i;break;case"inner":m===v-1?a-=i:m>0&&(a-=i/2)}h={left:a,top:o,width:i+e.width,height:n+e.height,color:t.backdropColor}}g.push({label:y,font:k,textOffset:S,options:{rotation:p,color:n,strokeColor:s,strokeWidth:c,textAlign:d,textBaseline:P,translation:[x,_],backdrop:h}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ci(this.labelRotation))return"top"===t?"left":"right";let n="center";return"start"===e.align?n="left":"end"===e.align?n="right":"inner"===e.align&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:n,mirror:i,padding:o}}=this.options,a=t+o,r=this._getLabelSizes().widest.width;let s,l;return"left"===e?i?(l=this.right+o,"near"===n?s="left":"center"===n?(s="center",l+=r/2):(s="right",l+=r)):(l=this.right-a,"near"===n?s="right":"center"===n?(s="center",l-=r/2):(s="left",l=this.left)):"right"===e?i?(l=this.left+o,"near"===n?s="right":"center"===n?(s="center",l-=r/2):(s="left",l-=r)):(l=this.left+a,"near"===n?s="left":"center"===n?(s="center",l+=r/2):(s="right",l=this.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:n,top:i,width:o,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(n,i,o,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex((e=>e.value===t));return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(e.display)for(o=0,a=i.length;o<a;++o){const t=i[o];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:n,grid:i}}=this,o=n.setContext(this.getContext()),a=n.display?o.width:0;if(!a)return;const r=i.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,c,u,h;this.isHorizontal()?(l=Zi(t,this.left,a)-a/2,c=Zi(t,this.right,r)+r/2,u=h=s):(u=Zi(t,this.top,a)-a/2,h=Zi(t,this.bottom,r)+r/2,l=c=s),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(l,u),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,n=this._computeLabelArea();n&&io(e,n);const i=this.getLabelItems(t);for(const t of i){const n=t.options,i=t.font;co(e,t.label,0,t.textOffset,i,n)}n&&oo(e)}drawTitle(){const{ctx:t,options:{position:e,title:n,reverse:i}}=this;if(!n.display)return;const o=yo(n.font),a=bo(n.padding),r=n.align;let s=o.lineHeight/2;"bottom"===e||"center"===e||On(e)?(s+=a.bottom,Pn(n.text)&&(s+=o.lineHeight*(n.text.length-1))):s+=a.top;const{titleX:l,titleY:c,maxWidth:u,rotation:h}=function(t,e,n,i){const{top:o,left:a,bottom:r,right:s,chart:l}=t,{chartArea:c,scales:u}=l;let h,d,f,p=0;const g=r-o,m=s-a;if(t.isHorizontal()){if(d=Pi(i,a,s),On(n)){const t=Object.keys(n)[0],i=n[t];f=u[t].getPixelForValue(i)+g-e}else f="center"===n?(c.bottom+c.top)/2+g-e:Pr(t,n,e);h=s-a}else{if(On(n)){const t=Object.keys(n)[0],i=n[t];d=u[t].getPixelForValue(i)-m+e}else d="center"===n?(c.left+c.right)/2-m+e:Pr(t,n,e);f=Pi(i,r,o),p="left"===n?-ti:ti}return{titleX:d,titleY:f,maxWidth:h,rotation:p}}(this,s,e,r);co(t,n.text,0,0,o,{color:n.color,maxWidth:u,rotation:h,textAlign:Rr(r,e,i),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,n=In(t.grid&&t.grid.z,-1),i=In(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Lr.prototype.draw?[{z:n,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let o,a;for(o=0,a=e.length;o<a;++o){const a=e[o];a[n]!==this.id||t&&a.type!==t||i.push(a)}return i}_resolveTickFontOptions(t){return yo(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Fr{constructor(t,e,n){this.type=t,this.scope=e,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(e)&&(n=this.register(e));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,function(t,e,n){const i=zn(Object.create(null),[n?Xi.get(n):{},Xi.get(e),t.defaults]);Xi.set(e,i),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((n=>{const i=n.split("."),o=i.pop(),a=[t].concat(i).join("."),r=e[n].split("."),s=r.pop(),l=r.join(".");Xi.route(a,o,l,s)}))}(e,t.defaultRoutes),t.descriptors&&Xi.describe(e,t.descriptors)}(t,a,n),this.override&&Xi.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,n=t.id,i=this.scope;n in e&&delete e[n],i&&n in Xi[i]&&(delete Xi[i][n],this.override&&delete Yi[n])}}class jr{constructor(){this.controllers=new Fr(Ta,"datasets",!0),this.elements=new Fr(Cr,"elements"),this.plugins=new Fr(Object,"plugins"),this.scales=new Fr(Lr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,n){[...e].forEach((e=>{const i=n||this._getRegistryForType(e);n||i.isForType(e)||i===this.plugins&&e.id?this._exec(t,i,e):Ln(e,(e=>{const i=n||this._getRegistryForType(e);this._exec(t,i,e)}))}))}_exec(t,e,n){const i=$n(t);Rn(n["before"+i],[],n),e[t](n),Rn(n["after"+i],[],n)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const n=this._typedRegistries[e];if(n.isForType(t))return n}return this.plugins}_get(t,e,n){const i=e.get(t);if(void 0===i)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var Nr=new jr;class Br{constructor(){this._init=[]}notify(t,e,n,i){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,e,n);return"afterDestroy"===e&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,n,i){i=i||{};for(const o of t){const t=o.plugin;if(!1===Rn(t[n],[e,i,o.options],t)&&i.cancelable)return!1}return!0}invalidate(){Sn(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const n=t&&t.config,i=In(n.options&&n.options.plugins,{}),o=function(t){const e={},n=[],i=Object.keys(Nr.plugins.items);for(let t=0;t<i.length;t++)n.push(Nr.getPlugin(i[t]));const o=t.plugins||[];for(let t=0;t<o.length;t++){const i=o[t];-1===n.indexOf(i)&&(n.push(i),e[i.id]=!0)}return{plugins:n,localIds:e}}(n);return!1!==i||e?function(t,{plugins:e,localIds:n},i,o){const a=[],r=t.getContext();for(const s of e){const e=s.id,l=zr(i[e],o);null!==l&&a.push({plugin:s,options:Hr(t.config,{plugin:s,local:n[e]},l,r)})}return a}(t,o,i,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],n=this._cache,i=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(i(e,n),t,"stop"),this._notify(i(n,e),t,"start")}}function zr(t,e){return e||!1!==t?!0===t?{}:t:null}function Hr(t,{plugin:e,local:n},i,o){const a=t.pluginScopeKeys(e),r=t.getOptionScopes(i,a);return n&&e.defaults&&r.push(e.defaults),t.createResolver(r,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Vr(t,e){const n=Xi.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function Wr(t){if("x"===t||"y"===t||"r"===t)return t}function Yr(t,...e){if(Wr(t))return t;for(const i of e){const e=i.axis||("top"===(n=i.position)||"bottom"===n?"x":"left"===n||"right"===n?"y":void 0)||t.length>1&&Wr(t[0].toLowerCase());if(e)return e}var n;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function $r(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function qr(t){const e=t.options||(t.options={});e.plugins=In(e.plugins,{}),e.scales=function(t,e){const n=Yi[t.type]||{scales:{}},i=e.scales||{},o=Vr(t.type,e),a=Object.create(null);return Object.keys(i).forEach((e=>{const r=i[e];if(!On(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const s=Yr(e,r,function(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(n.length)return $r(t,"x",n[0])||$r(t,"y",n[0])}return{}}(e,t),Xi.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(s,o),c=n.scales||{};a[e]=Hn(Object.create(null),[{axis:s},r,c[s],c[l]])})),t.data.datasets.forEach((n=>{const o=n.type||t.type,r=n.indexAxis||Vr(o,e),s=(Yi[o]||{}).scales||{};Object.keys(s).forEach((t=>{const e=function(t,e){let n=t;return"_index_"===t?n=e:"_value_"===t&&(n="x"===e?"y":"x"),n}(t,r),o=n[e+"AxisID"]||e;a[o]=a[o]||Object.create(null),Hn(a[o],[{axis:e},i[o],s[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];Hn(e,[Xi.scales[e.type],Xi.scale])})),a}(t,e)}function Ur(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Gr=new Map,Xr=new Set;function Jr(t,e){let n=Gr.get(t);return n||(n=e(),Gr.set(t,n),Xr.add(n)),n}const Kr=(t,e,n)=>{const i=Yn(e,n);void 0!==i&&t.add(i)};class Zr{constructor(t){this._config=function(t){return(t=t||{}).data=Ur(t.data),qr(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ur(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),qr(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jr(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Jr(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Jr(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Jr(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const n=this._scopeCache;let i=n.get(t);return i&&!e||(i=new Map,n.set(t,i)),i}getOptionScopes(t,e,n){const{options:i,type:o}=this,a=this._cachedScopes(t,n),r=a.get(e);if(r)return r;const s=new Set;e.forEach((e=>{t&&(s.add(t),e.forEach((e=>Kr(s,t,e)))),e.forEach((t=>Kr(s,i,t))),e.forEach((t=>Kr(s,Yi[o]||{},t))),e.forEach((t=>Kr(s,Xi,t))),e.forEach((t=>Kr(s,$i,t)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),Xr.has(e)&&a.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Yi[e]||{},Xi.datasets[e]||{},{type:e},Xi,$i]}resolveNamedOptions(t,e,n,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:r}=Qr(this._resolverCache,t,i);let s=a;(function(t,e){const{isScriptable:n,isIndexable:i}=ko(t);for(const o of e){const e=n(o),a=i(o),r=(a||e)&&t[o];if(e&&(Un(r)||ts(r))||a&&Pn(r))return!0}return!1})(a,e)&&(o.$shared=!1,s=Mo(a,n=Un(n)?n():n,this.createResolver(t,n,r)));for(const t of e)o[t]=s[t];return o}createResolver(t,e,n=[""],i){const{resolver:o}=Qr(this._resolverCache,t,n);return On(e)?Mo(o,e,void 0,i):o}}function Qr(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const o=n.join();let a=i.get(o);return a||(a={resolver:wo(e,n),subPrefixes:n.filter((t=>!t.toLowerCase().includes("hover")))},i.set(o,a)),a}const ts=t=>On(t)&&Object.getOwnPropertyNames(t).some((e=>Un(t[e]))),es=["top","bottom","left","right","chartArea"];function ns(t,e){return"top"===t||"bottom"===t||-1===es.indexOf(t)&&"x"===e}function is(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function os(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Rn(n&&n.onComplete,[t],e)}function as(t){const e=t.chart,n=e.options.animation;Rn(n&&n.onProgress,[t],e)}function rs(t){return Vo()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ss={},ls=t=>{const e=rs(t);return Object.values(ss).filter((t=>t.canvas===e)).pop()};function cs(t,e,n){const i=Object.keys(t);for(const o of i){const i=+o;if(i>=e){const a=t[o];delete t[o],(n>0||i>e)&&(t[i+n]=a)}}}class us{static defaults=Xi;static instances=ss;static overrides=Yi;static registry=Nr;static version="4.4.9";static getChart=ls;static register(...t){Nr.add(...t),hs()}static unregister(...t){Nr.remove(...t),hs()}constructor(t,e){const n=this.config=new Zr(e),i=rs(t),o=ls(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||function(t){return!Vo()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?ur:Dr}(i)),this.platform.updateConfig(n);const r=this.platform.acquireContext(i,a.aspectRatio),s=r&&r.canvas,l=s&&s.height,c=s&&s.width;this.id=Cn(),this.ctx=r,this.canvas=s,this.width=c,this.height=l,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Br,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}((t=>this.update(t)),a.resizeDelay||0),this._dataChanges=[],ss[this.id]=this,r&&s?(pa.listen(this,"complete",os),pa.listen(this,"progress",as),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:i,_aspectRatio:o}=this;return Sn(t)?e&&o?o:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Nr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Jo(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Qi(this.canvas,this.ctx),this}stop(){return pa.stop(this),this}resize(t,e){pa.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const n=this.options,i=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,e,o),r=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Jo(this,r,!0)&&(this.notifyPlugins("resize",{size:a}),Rn(n.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){Ln(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,n=this.scales,i=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let o=[];e&&(o=o.concat(Object.keys(e).map((t=>{const n=e[t],i=Yr(t,n),o="r"===i,a="x"===i;return{options:n,dposition:o?"chartArea":a?"bottom":"left",dtype:o?"radialLinear":a?"category":"linear"}})))),Ln(o,(e=>{const o=e.options,a=o.id,r=Yr(a,o),s=In(o.type,e.dtype);void 0!==o.position&&ns(o.position,r)===ns(e.dposition)||(o.position=e.dposition),i[a]=!0;let l=null;a in n&&n[a].type===s?l=n[a]:(l=new(Nr.getScale(s))({id:a,type:s,ctx:this.ctx,chart:this}),n[l.id]=l),l.init(o,t)})),Ln(i,((t,e)=>{t||delete n[e]})),Ln(n,(t=>{lr.configure(this,t,t.options),lr.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort(((t,e)=>t.index-e.index)),n>e){for(let t=e;t<n;++t)this._destroyDatasetMeta(t);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(is("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,n)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=e.length;n<i;n++){const i=e[n];let o=this.getDatasetMeta(n);const a=i.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=a,o.indexAxis=i.indexAxis||Vr(a,this.options),o.order=i.order||0,o.index=n,o.label=""+i.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const e=Nr.getController(a),{datasetElementType:i,dataElementType:r}=Xi.datasets[a];Object.assign(e,{dataElementType:Nr.getElement(r),datasetElementType:i&&Nr.getElement(i)}),o.controller=new e(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ln(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),n=!i&&-1===o.indexOf(e);e.buildOrUpdateElements(n),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||Ln(o,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(is("z","_idx"));const{_active:r,_lastEvent:s}=this;s?this._eventHandler(s,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Ln(this.scales,(t=>{lr.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);Gn(e,n)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:o}of e)cs(t,i,"_removeElements"===n?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,n=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),i=n(0);for(let t=1;t<e;t++)if(!Gn(i,n(t)))return;return Array.from(i).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;lr.update(this,this.width,this.height,t);const e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],Ln(this.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Un(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",i)&&(n.controller._update(e),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(pa.has(this)?this.attached&&!pa.running(this)&&pa.start(this):(this.draw(),os({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,n=[];let i,o;for(i=0,o=e.length;i<o;++i){const o=e[i];t&&!o.visible||n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=da(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",n)&&(i&&io(e,i),t.controller.draw(),i&&oo(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return no(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,i){const o=Ja.modes[e];return"function"==typeof o?o(this,t,n,i):[]}getDatasetMeta(t){const e=this.data.datasets[t],n=this._metasets;let i=n.filter((t=>t&&t._dataset===e)).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=_o(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const n=this.getDatasetMeta(t);return"boolean"==typeof n.hidden?!n.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){const i=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);qn(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update((e=>e.datasetIndex===t?i:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),pa.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Qi(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ss[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(t,e,n)=>{t.offsetX=e,t.offsetY=n,this._eventHandler(t)};Ln(this.options.events,(t=>n(t,i)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,n=(n,i)=>{e.addEventListener(this,n,i),t[n]=i},i=(n,i)=>{t[n]&&(e.removeEventListener(this,n,i),delete t[n])},o=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const r=()=>{i("attach",r),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",r)},e.isAttached(this.canvas)?r():a()}unbindEvents(){Ln(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},Ln(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){const i=n?"set":"remove";let o,a,r,s;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),r=0,s=t.length;r<s;++r){a=t[r];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],n=t.map((({datasetIndex:t,index:e})=>{const n=this.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[e],index:e}}));!Fn(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,n){const i=this.options.hover,o=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=o(e,t),r=n?t:o(t,e);a.length&&this.updateHoverStyle(a,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(t,e){const n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",n,i))return;const o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){const{_active:i=[],options:o}=this,a=e,r=this._getActiveElements(t,i,n,a),s=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,n,i){return n&&"mouseout"!==t.type?i?e:t:null}(t,this._lastEvent,n,s);n&&(this._lastEvent=null,Rn(o.onHover,[t,r,this],this),s&&Rn(o.onClick,[t,r,this],this));const c=!Fn(r,i);return(c||e)&&(this._active=r,this._updateHoverStyles(r,i,e)),this._lastEvent=l,c}_getActiveElements(t,e,n,i){if("mouseout"===t.type)return[];if(!n)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}function hs(){return Ln(us.instances,(t=>t._plugins.invalidate()))}function ds(t,e,n,i){return{x:n+t*Math.cos(e),y:i+t*Math.sin(e)}}function fs(t,e,n,i,o,a){const{x:r,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=e,h=Math.max(e.outerRadius+i+n-c,0),d=u>0?u+i+n+c:0;let f=0;const p=o-l;if(i){const t=((u>0?u-i:0)+(h>0?h-i:0))/2;f=(p-(0!==t?p*t/(t+i):p))/2}const g=(p-Math.max(.001,p*h-n/Xn)/h)/2,m=l+g+f,v=o-g-f,{outerStart:b,outerEnd:y,innerStart:x,innerEnd:_}=function(t,e,n,i){const o=go(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(n-e)/2,r=Math.min(a,i*e/2),s=t=>{const e=(n-Math.min(a,t))*i/2;return vi(t,0,Math.min(a,e))};return{outerStart:s(o.outerStart),outerEnd:s(o.outerEnd),innerStart:vi(o.innerStart,0,r),innerEnd:vi(o.innerEnd,0,r)}}(e,d,h,v-m),w=h-b,M=h-y,k=m+b/w,D=v-y/M,C=d+x,S=d+_,P=m+x/C,O=v-_/S;if(t.beginPath(),a){const e=(k+D)/2;if(t.arc(r,s,h,k,e),t.arc(r,s,h,e,D),y>0){const e=ds(M,D,r,s);t.arc(e.x,e.y,y,D,v+ti)}const n=ds(S,v,r,s);if(t.lineTo(n.x,n.y),_>0){const e=ds(S,O,r,s);t.arc(e.x,e.y,_,v+ti,O+Math.PI)}const i=(v-_/d+(m+x/d))/2;if(t.arc(r,s,d,v-_/d,i,!0),t.arc(r,s,d,i,m+x/d,!0),x>0){const e=ds(C,P,r,s);t.arc(e.x,e.y,x,P+Math.PI,m-ti)}const o=ds(w,m,r,s);if(t.lineTo(o.x,o.y),b>0){const e=ds(w,k,r,s);t.arc(e.x,e.y,b,m-ti,k)}}else{t.moveTo(r,s);const e=Math.cos(k)*h+r,n=Math.sin(k)*h+s;t.lineTo(e,n);const i=Math.cos(D)*h+r,o=Math.sin(D)*h+s;t.lineTo(i,o)}t.closePath()}function ps(t,e,n=e){t.lineCap=In(n.borderCapStyle,e.borderCapStyle),t.setLineDash(In(n.borderDash,e.borderDash)),t.lineDashOffset=In(n.borderDashOffset,e.borderDashOffset),t.lineJoin=In(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=In(n.borderWidth,e.borderWidth),t.strokeStyle=In(n.borderColor,e.borderColor)}function gs(t,e,n){t.lineTo(n.x,n.y)}function ms(t,e,n={}){const i=t.length,{start:o=0,end:a=i-1}=n,{start:r,end:s}=e,l=Math.max(o,r),c=Math.min(a,s),u=o<r&&a<r||o>s&&a>s;return{count:i,start:l,loop:e.loop,ilen:c<l&&!u?i+c-l:c-l}}function vs(t,e,n,i){const{points:o,options:a}=e,{count:r,start:s,loop:l,ilen:c}=ms(o,n,i),u=function(t){return t.stepped?ao:t.tension||"monotone"===t.cubicInterpolationMode?ro:gs}(a);let h,d,f,{move:p=!0,reverse:g}=i||{};for(h=0;h<=c;++h)d=o[(s+(g?c-h:h))%r],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):u(t,f,d,g,a.stepped),f=d);return l&&(d=o[(s+(g?c:0))%r],u(t,f,d,g,a.stepped)),!!l}function bs(t,e,n,i){const o=e.points,{count:a,start:r,ilen:s}=ms(o,n,i),{move:l=!0,reverse:c}=i||{};let u,h,d,f,p,g,m=0,v=0;const b=t=>(r+(c?s-t:t))%a,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(h=o[b(0)],t.moveTo(h.x,h.y)),u=0;u<=s;++u){if(h=o[b(u)],h.skip)continue;const e=h.x,n=h.y,i=0|e;i===d?(n<f?f=n:n>p&&(p=n),m=(v*m+e)/++v):(y(),t.lineTo(e,n),d=i,v=0,f=p=n),g=n}y()}function ys(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||n?vs:bs}const xs="function"==typeof Path2D;class _s extends Cr{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Ho(this._points,n,t,i,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const n=t.points,i=t.options.spanGaps,o=n.length;if(!o)return[];const a=!!t._loop,{start:r,end:s}=function(t,e,n,i){let o=0,a=e-1;if(n&&!i)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,n&&(a+=o);a>o&&t[a%e].skip;)a--;return a%=e,{start:o,end:a}}(n,o,a,i);return function(t,e,n,i){return i&&i.setContext&&n?function(t,e,n,i){const o=t._chart.getContext(),a=ca(t.options),{_datasetIndex:r,options:{spanGaps:s}}=t,l=n.length,c=[];let u=a,h=e[0].start,d=h;function f(t,e,i,o){const a=s?-1:1;if(t!==e){for(t+=l;n[t%l].skip;)t-=a;for(;n[e%l].skip;)e+=a;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:i,style:o}),u=o,h=e%l)}}for(const t of e){h=s?h:t.start;let e,a=n[h%l];for(d=h+1;d<=t.end;d++){const s=n[d%l];e=ca(i.setContext(_o(o,{type:"segment",p0:a,p1:s,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),ua(e,u)&&f(h,d-1,t.loop,u),a=s,u=e}h<d-1&&f(h,d-1,t.loop,u)}return c}(t,e,n,i):e}(t,!0===i?[{start:r,end:s,loop:a}]:function(t,e,n,i){const o=t.length,a=[];let r,s=e,l=t[e];for(r=e+1;r<=n;++r){const n=t[r%o];n.skip||n.stop?l.skip||(i=!1,a.push({start:e%o,end:(r-1)%o,loop:i}),e=s=n.stop?r:null):(s=r,l.skip&&(e=r)),l=n}return null!==s&&a.push({start:e%o,end:s%o,loop:i}),a}(n,r,s<r?s+o:s,!!t._fullLoop&&0===r&&s===o-1),n,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,n=t.length;return n&&e[t[n-1].end]}interpolate(t,e){const n=this.options,i=t[e],o=this.points,a=la(this,{property:e,start:i,end:i});if(!a.length)return;const r=[],s=function(t){return t.stepped?ta:t.tension||"monotone"===t.cubicInterpolationMode?ea:Qo}(n);let l,c;for(l=0,c=a.length;l<c;++l){const{start:c,end:u}=a[l],h=o[c],d=o[u];if(h===d){r.push(h);continue}const f=s(h,d,Math.abs((i-h[e])/(d[e]-h[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,n){return ys(this)(t,this,e,n)}path(t,e,n){const i=this.segments,o=ys(this);let a=this._loop;e=e||0,n=n||this.points.length-e;for(const r of i)a&=o(t,this,r,{start:e,end:e+n-1});return!!a}draw(t,e,n,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),function(t,e,n,i){xs&&!e.options.segment?function(t,e,n,i){let o=e._path;o||(o=e._path=new Path2D,e.path(o,n,i)&&o.closePath()),ps(t,e.options),t.stroke(o)}(t,e,n,i):function(t,e,n,i){const{segments:o,options:a}=e,r=ys(e);for(const s of o)ps(t,a,s.style),t.beginPath(),r(t,e,s,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}(t,e,n,i)}(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function ws(t,e,n,i){const o=t.options,{[n]:a}=t.getProps([n],i);return Math.abs(e-a)<o.radius+o.hitRadius}function Ms(t,e){const{x:n,y:i,base:o,width:a,height:r}=t.getProps(["x","y","base","width","height"],e);let s,l,c,u,h;return t.horizontal?(h=r/2,s=Math.min(n,o),l=Math.max(n,o),c=i-h,u=i+h):(h=a/2,s=n-h,l=n+h,c=Math.min(i,o),u=Math.max(i,o)),{left:s,top:c,right:l,bottom:u}}function ks(t,e,n,i){return t?0:vi(e,n,i)}function Ds(t,e,n,i){const o=null===e,a=null===n,r=t&&!(o&&a)&&Ms(t,i);return r&&(o||bi(e,r.left,r.right))&&(a||bi(n,r.top,r.bottom))}function Cs(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ss(t,e,n={}){const i=t.x!==n.x?-e:0,o=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-i,r=(t.y+t.h!==n.y+n.h?e:0)-o;return{x:t.x+i,y:t.y+o,w:t.w+a,h:t.h+r,radius:t.radius}}var Ps=Object.freeze({__proto__:null,ArcElement:class extends Cr{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.getProps(["x","y"],n),{angle:o,distance:a}=di(i,{x:t,y:e}),{startAngle:r,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),h=(this.options.spacing+this.options.borderWidth)/2,d=In(u,s-r),f=mi(o,r,s)&&r!==s,p=d>=Jn||f,g=bi(a,l+h,c+h);return p&&g}getCenterPoint(t){const{x:e,y:n,startAngle:i,endAngle:o,innerRadius:a,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:s,spacing:l}=this.options,c=(i+o)/2,u=(a+r+l+s)/2;return{x:e+Math.cos(c)*u,y:n+Math.sin(c)*u}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:n}=this,i=(e.offset||0)/4,o=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=n>Jn?Math.floor(n/Jn):0,0===n||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*i,Math.sin(r)*i);const s=i*(1-Math.sin(Math.min(Xn,n||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,n,i,o){const{fullCircles:a,startAngle:r,circumference:s}=e;let l=e.endAngle;if(a){fs(t,e,n,i,l,o);for(let e=0;e<a;++e)t.fill();isNaN(s)||(l=r+(s%Jn||Jn))}fs(t,e,n,i,l,o),t.fill()}(t,this,s,o,a),function(t,e,n,i,o){const{fullCircles:a,startAngle:r,circumference:s,options:l}=e,{borderWidth:c,borderJoinStyle:u,borderDash:h,borderDashOffset:d}=l,f="inner"===l.borderAlign;if(!c)return;t.setLineDash(h||[]),t.lineDashOffset=d,f?(t.lineWidth=2*c,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let p=e.endAngle;if(a){fs(t,e,n,i,p,o);for(let e=0;e<a;++e)t.stroke();isNaN(s)||(p=r+(s%Jn||Jn))}f&&function(t,e,n){const{startAngle:i,pixelMargin:o,x:a,y:r,outerRadius:s,innerRadius:l}=e;let c=o/s;t.beginPath(),t.arc(a,r,s,i-c,n+c),l>o?(c=o/l,t.arc(a,r,l,n+c,i-c,!0)):t.arc(a,r,o,n+ti,i-ti),t.closePath(),t.clip()}(t,e,p),a||(fs(t,e,n,i,p,o),t.stroke())}(t,this,s,o,a),t.restore()}},BarElement:class extends Cr{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:n,backgroundColor:i}}=this,{inner:o,outer:a}=function(t){const e=Ms(t),n=e.right-e.left,i=e.bottom-e.top,o=function(t,e,n){const i=t.options.borderWidth,o=t.borderSkipped,a=mo(i);return{t:ks(o.top,a.top,0,n),r:ks(o.right,a.right,0,e),b:ks(o.bottom,a.bottom,0,n),l:ks(o.left,a.left,0,e)}}(t,n/2,i/2),a=function(t,e,n){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,a=vo(o),r=Math.min(e,n),s=t.borderSkipped,l=i||On(o);return{topLeft:ks(!l||s.top||s.left,a.topLeft,0,r),topRight:ks(!l||s.top||s.right,a.topRight,0,r),bottomLeft:ks(!l||s.bottom||s.left,a.bottomLeft,0,r),bottomRight:ks(!l||s.bottom||s.right,a.bottomRight,0,r)}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i,radius:a},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:i-o.t-o.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,a.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(o.b,o.r))}}}}(this),r=(s=a.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?uo:Cs;var s;t.save(),a.w===o.w&&a.h===o.h||(t.beginPath(),r(t,Ss(a,e,o)),t.clip(),r(t,Ss(o,-e,a)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),r(t,Ss(o,e)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,e,n){return Ds(this,t,e,n)}inXRange(t,e){return Ds(this,t,null,e)}inYRange(t,e){return Ds(this,null,t,e)}getCenterPoint(t){const{x:e,y:n,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+i)/2:e,y:o?n:(n+i)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:_s,PointElement:class extends Cr{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,n){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],n);return Math.pow(t-o,2)+Math.pow(e-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,e){return ws(this,t,"x",e)}inYRange(t,e){return ws(this,t,"y",e)}getCenterPoint(t){const{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const n=this.options;this.skip||n.radius<.1||!no(this,e,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,to(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const Os=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Ts=Os.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function Es(t){return Os[t%Os.length]}function Is(t){return Ts[t%Ts.length]}function As(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Rs={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:i},options:o}=t.config,{elements:a}=o,r=As(i)||(s=o)&&(s.borderColor||s.backgroundColor)||a&&As(a)||"rgba(0,0,0,0.1)"!==Xi.borderColor||"rgba(0,0,0,0.1)"!==Xi.backgroundColor;var s;if(!n.forceOverride&&r)return;const l=function(t){let e=0;return(n,i)=>{const o=t.getDatasetMeta(i).controller;o instanceof Ba?e=function(t,e){return t.backgroundColor=t.data.map((()=>Es(e++))),e}(n,e):o instanceof za?e=function(t,e){return t.backgroundColor=t.data.map((()=>Is(e++))),e}(n,e):o&&(e=function(t,e){return t.borderColor=Es(e),t.backgroundColor=Is(e),++e}(n,e))}}(t);i.forEach(l)}};function Ls(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Fs(t){t.data.datasets.forEach((t=>{Ls(t)}))}var js={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled)return void Fs(t);const i=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:a,indexAxis:r}=e,s=t.getDatasetMeta(o),l=a||e.data;if("y"===xo([r,t.options.indexAxis]))return;if(!s.controller.supportsDecimation)return;const c=t.scales[s.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let u,{start:h,count:d}=function(t,e){const n=e.length;let i,o=0;const{iScale:a}=t,{min:r,max:s,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(o=vi(xi(e,a.axis,r).lo,0,n-1)),i=c?vi(xi(e,a.axis,s).hi+1,o,n)-o:n-o,{start:o,count:i}}(s,l);if(d<=(n.threshold||4*i))Ls(e);else{switch(Sn(a)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),n.algorithm){case"lttb":u=function(t,e,n,i,o){const a=o.samples||i;if(a>=n)return t.slice(e,e+n);const r=[],s=(n-2)/(a-2);let l=0;const c=e+n-1;let u,h,d,f,p,g=e;for(r[l++]=t[g],u=0;u<a-2;u++){let i,o=0,a=0;const c=Math.floor((u+1)*s)+1+e,m=Math.min(Math.floor((u+2)*s)+1,n)+e,v=m-c;for(i=c;i<m;i++)o+=t[i].x,a+=t[i].y;o/=v,a/=v;const b=Math.floor(u*s)+1+e,y=Math.min(Math.floor((u+1)*s)+1,n)+e,{x,y:_}=t[g];for(d=f=-1,i=b;i<y;i++)f=.5*Math.abs((x-o)*(t[i].y-_)-(x-t[i].x)*(a-_)),f>d&&(d=f,h=t[i],p=i);r[l++]=h,g=p}return r[l++]=t[c],r}(l,h,d,i,n);break;case"min-max":u=function(t,e,n,i){let o,a,r,s,l,c,u,h,d,f,p=0,g=0;const m=[],v=e+n-1,b=t[e].x,y=t[v].x-b;for(o=e;o<e+n;++o){a=t[o],r=(a.x-b)/y*i,s=a.y;const e=0|r;if(e===l)s<d?(d=s,c=o):s>f&&(f=s,u=o),p=(g*p+a.x)/++g;else{const n=o-1;if(!Sn(c)&&!Sn(u)){const e=Math.min(c,u),i=Math.max(c,u);e!==h&&e!==n&&m.push({...t[e],x:p}),i!==h&&i!==n&&m.push({...t[i],x:p})}o>0&&n!==h&&m.push(t[n]),m.push(a),l=e,g=0,d=f=s,c=u=h=o}}return m}(l,h,d,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}e._decimated=u}}))},destroy(t){Fs(t)}};function Ns(t,e,n,i){if(i)return;let o=e[t],a=n[t];return"angle"===t&&(o=gi(o),a=gi(a)),{property:t,start:o,end:a}}function Bs(t,e,n){for(;e>t;e--){const t=n[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function zs(t,e,n,i){return t&&e?i(t[n],e[n]):t?t[n]:e?e[n]:0}function Hs(t,e){let n=[],i=!1;return Pn(t)?(i=!0,n=t):n=function(t,e){const{x:n=null,y:i=null}=t||{},o=e.points,a=[];return e.segments.forEach((({start:t,end:e})=>{e=Bs(t,e,o);const r=o[t],s=o[e];null!==i?(a.push({x:r.x,y:i}),a.push({x:s.x,y:i})):null!==n&&(a.push({x:n,y:r.y}),a.push({x:n,y:s.y}))})),a}(t,e),n.length?new _s({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function Vs(t){return t&&!1!==t.fill}function Ws(t,e,n){let i=t[e].fill;const o=[e];let a;if(!n)return i;for(;!1!==i&&-1===o.indexOf(i);){if(!Tn(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;o.push(i),i=a.fill}return!1}function Ys(t,e,n){const i=function(t){const e=t.options,n=e.fill;let i=In(n&&n.target,n);return void 0===i&&(i=!!e.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}(t);if(On(i))return!isNaN(i.value)&&i;let o=parseFloat(i);return Tn(o)&&Math.floor(o)===o?function(t,e,n,i){return"-"!==t&&"+"!==t||(n=e+n),!(n===e||n<0||n>=i)&&n}(i[0],e,o,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function $s(t,e,n){const i=[];for(let o=0;o<n.length;o++){const a=n[o],{first:r,last:s,point:l}=qs(a,e,"x");if(!(!l||r&&s))if(r)i.unshift(l);else if(t.push(l),!s)break}t.push(...i)}function qs(t,e,n){const i=t.interpolate(e,n);if(!i)return{};const o=i[n],a=t.segments,r=t.points;let s=!1,l=!1;for(let t=0;t<a.length;t++){const e=a[t],i=r[e.start][n],c=r[e.end][n];if(bi(o,i,c)){s=o===i,l=o===c;break}}return{first:s,last:l,point:i}}class Us{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,n){const{x:i,y:o,radius:a}=this;return e=e||{start:0,end:Jn},t.arc(i,o,a,e.end,e.start,!0),!n.bounds}interpolate(t){const{x:e,y:n,radius:i}=this,o=t.angle;return{x:e+Math.cos(o)*i,y:n+Math.sin(o)*i,angle:o}}}function Gs(t,e,n){const i=function(t){const{chart:e,fill:n,line:i}=t;if(Tn(n))return function(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}(e,n);if("stack"===n)return function(t){const{scale:e,index:n,line:i}=t,o=[],a=i.segments,r=i.points,s=function(t,e){const n=[],i=t.getMatchingVisibleMetas("line");for(let t=0;t<i.length;t++){const o=i[t];if(o.index===e)break;o.hidden||n.unshift(o.dataset)}return n}(e,n);s.push(Hs({x:null,y:e.bottom},i));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)$s(o,r[t],s)}return new _s({points:o,options:{}})}(t);if("shape"===n)return!0;const o=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:n}=t,i=e.options,o=e.getLabels().length,a=i.reverse?e.max:e.min,r=function(t,e,n){let i;return i="start"===t?n:"end"===t?e.options.reverse?e.min:e.max:On(t)?t.value:e.getBaseValue(),i}(n,e,a),s=[];if(i.grid.circular){const t=e.getPointPositionForValue(0,a);return new Us({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<o;++t)s.push(e.getPointPositionForValue(t,r));return s}(t):function(t){const{scale:e={},fill:n}=t,i=function(t,e){let n=null;return"start"===t?n=e.bottom:"end"===t?n=e.top:On(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}(n,e);if(Tn(i)){const t=e.isHorizontal();return{x:t?i:null,y:t?null:i}}return null}(t)}(t);return o instanceof Us?o:Hs(o,i)}(e),{chart:o,index:a,line:r,scale:s,axis:l}=e,c=r.options,u=c.fill,h=c.backgroundColor,{above:d=h,below:f=h}=u||{},p=o.getDatasetMeta(a),g=da(o,p);i&&r.points.length&&(io(t,n),function(t,e){const{line:n,target:i,above:o,below:a,area:r,scale:s,clip:l}=e,c=n._loop?"angle":e.axis;t.save(),"x"===c&&a!==o&&(Xs(t,i,r.top),Js(t,{line:n,target:i,color:o,scale:s,property:c,clip:l}),t.restore(),t.save(),Xs(t,i,r.bottom)),Js(t,{line:n,target:i,color:a,scale:s,property:c,clip:l}),t.restore()}(t,{line:r,target:i,above:d,below:f,area:n,scale:s,axis:l,clip:g}),oo(t))}function Xs(t,e,n){const{segments:i,points:o}=e;let a=!0,r=!1;t.beginPath();for(const s of i){const{start:i,end:l}=s,c=o[i],u=o[Bs(i,l,o)];a?(t.moveTo(c.x,c.y),a=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),r=!!e.pathSegment(t,s,{move:r}),r?t.closePath():t.lineTo(u.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Js(t,e){const{line:n,target:i,property:o,color:a,scale:r,clip:s}=e,l=function(t,e,n){const i=t.segments,o=t.points,a=e.points,r=[];for(const t of i){let{start:i,end:s}=t;s=Bs(i,s,o);const l=Ns(n,o[i],o[s],t.loop);if(!e.segments){r.push({source:t,target:l,start:o[i],end:o[s]});continue}const c=la(e,l);for(const e of c){const i=Ns(n,a[e.start],a[e.end],e.loop),s=sa(t,o,i);for(const t of s)r.push({source:t,target:e,start:{[n]:zs(l,i,"start",Math.max)},end:{[n]:zs(l,i,"end",Math.min)}})}}return r}(n,i,o);for(const{source:e,target:c,start:u,end:h}of l){const{style:{backgroundColor:l=a}={}}=e,d=!0!==i;t.save(),t.fillStyle=l,Ks(t,r,s,d&&Ns(o,u,h)),t.beginPath();const f=!!n.pathSegment(t,e);let p;if(d){f?t.closePath():Zs(t,i,h,o);const e=!!i.pathSegment(t,c,{move:f,reverse:!0});p=f&&e,p||Zs(t,i,u,o)}t.closePath(),t.fill(p?"evenodd":"nonzero"),t.restore()}}function Ks(t,e,n,i){const o=e.chart.chartArea,{property:a,start:r,end:s}=i||{};if("x"===a||"y"===a){let e,i,l,c;"x"===a?(e=r,i=o.top,l=s,c=o.bottom):(e=o.left,i=r,l=o.right,c=s),t.beginPath(),n&&(e=Math.max(e,n.left),l=Math.min(l,n.right),i=Math.max(i,n.top),c=Math.min(c,n.bottom)),t.rect(e,i,l-e,c-i),t.clip()}}function Zs(t,e,n,i){const o=e.interpolate(n,i);o&&t.lineTo(o.x,o.y)}var Qs={id:"filler",afterDatasetsUpdate(t,e,n){const i=(t.data.datasets||[]).length,o=[];let a,r,s,l;for(r=0;r<i;++r)a=t.getDatasetMeta(r),s=a.dataset,l=null,s&&s.options&&s instanceof _s&&(l={visible:t.isDatasetVisible(r),index:r,fill:Ys(s,r,i),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:s}),a.$filler=l,o.push(l);for(r=0;r<i;++r)l=o[r],l&&!1!==l.fill&&(l.fill=Ws(o,r,n.propagate))},beforeDraw(t,e,n){const i="beforeDraw"===n.drawTime,o=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=o.length-1;e>=0;--e){const n=o[e].$filler;n&&(n.line.updateControlPoints(a,n.axis),i&&n.fill&&Gs(t.ctx,n,a))}},beforeDatasetsDraw(t,e,n){if("beforeDatasetsDraw"!==n.drawTime)return;const i=t.getSortedVisibleDatasetMetas();for(let e=i.length-1;e>=0;--e){const n=i[e].$filler;Vs(n)&&Gs(t.ctx,n,t.chartArea)}},beforeDatasetDraw(t,e,n){const i=e.meta.$filler;Vs(i)&&"beforeDatasetDraw"===n.drawTime&&Gs(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const tl=(t,e)=>{let{boxHeight:n=e,boxWidth:i=e}=t;return t.usePointStyle&&(n=Math.min(n,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(e,n)}};class el extends Cr{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,n){this.maxWidth=t,this.maxHeight=e,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Rn(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,n)=>t.sort(e,n,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const n=t.labels,i=yo(n.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:r,itemHeight:s}=tl(n,o);let l,c;e.font=i.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(a,o,r,s)+10):(c=this.maxHeight,l=this._fitCols(a,i,r,s)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,n,i){const{ctx:o,maxWidth:a,options:{labels:{padding:r}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=i+r;let u=t;o.textAlign="left",o.textBaseline="middle";let h=-1,d=-c;return this.legendItems.forEach(((t,f)=>{const p=n+e/2+o.measureText(t.text).width;(0===f||l[l.length-1]+p+2*r>a)&&(u+=c,l[l.length-(f>0?0:1)]=0,d+=c,h++),s[f]={left:0,top:d,row:h,width:p,height:i},l[l.length-1]+=p+r})),u}_fitCols(t,e,n,i){const{ctx:o,maxHeight:a,options:{labels:{padding:r}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=a-t;let u=r,h=0,d=0,f=0,p=0;return this.legendItems.forEach(((t,a)=>{const{itemWidth:g,itemHeight:m}=function(t,e,n,i,o){const a=function(t,e,n,i){let o=t.text;return o&&"string"!=typeof o&&(o=o.reduce(((t,e)=>t.length>e.length?t:e))),e+n.size/2+i.measureText(o).width}(i,t,e,n),r=function(t,e,n){let i=t;return"string"!=typeof e.text&&(i=nl(e,n)),i}(o,i,e.lineHeight);return{itemWidth:a,itemHeight:r}}(n,e,o,t,i);a>0&&d+m+2*r>c&&(u+=h+r,l.push({width:h,height:d}),f+=h+r,p++,h=d=0),s[a]={left:f,top:d,col:p,width:g,height:m},h=Math.max(h,g),d+=m+r})),u+=h,l.push({width:h,height:d}),u}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:n,labels:{padding:i},rtl:o}}=this,a=na(o,this.left,this.width);if(this.isHorizontal()){let o=0,r=Pi(n,this.left+i,this.right-this.lineWidths[o]);for(const s of e)o!==s.row&&(o=s.row,r=Pi(n,this.left+i,this.right-this.lineWidths[o])),s.top+=this.top+t+i,s.left=a.leftForLtr(a.x(r),s.width),r+=s.width+i}else{let o=0,r=Pi(n,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const s of e)s.col!==o&&(o=s.col,r=Pi(n,this.top+t+i,this.bottom-this.columnSizes[o].height)),s.top=r,s.left+=this.left+i,s.left=a.leftForLtr(a.x(s.left),s.width),r+=s.height+i}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;io(t,this),this._draw(),oo(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:n,ctx:i}=this,{align:o,labels:a}=t,r=Xi.color,s=na(t.rtl,this.left,this.width),l=yo(a.font),{padding:c}=a,u=l.size,h=u/2;let d;this.drawTitle(),i.textAlign=s.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:g}=tl(a,u),m=this.isHorizontal(),v=this._computeTitleHeight();d=m?{x:Pi(o,this.left+c,this.right-n[0]),y:this.top+c+v,line:0}:{x:this.left+c,y:Pi(o,this.top+v+c,this.bottom-e[0].height),line:0},ia(this.ctx,t.textDirection);const b=g+c;this.legendItems.forEach(((y,x)=>{i.strokeStyle=y.fontColor,i.fillStyle=y.fontColor;const _=i.measureText(y.text).width,w=s.textAlign(y.textAlign||(y.textAlign=a.textAlign)),M=f+h+_;let k=d.x,D=d.y;if(s.setWidth(this.width),m?x>0&&k+M+c>this.right&&(D=d.y+=b,d.line++,k=d.x=Pi(o,this.left+c,this.right-n[d.line])):x>0&&D+b>this.bottom&&(k=d.x=k+e[d.line].width+c,d.line++,D=d.y=Pi(o,this.top+v+c,this.bottom-e[d.line].height)),function(t,e,n){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;i.save();const o=In(n.lineWidth,1);if(i.fillStyle=In(n.fillStyle,r),i.lineCap=In(n.lineCap,"butt"),i.lineDashOffset=In(n.lineDashOffset,0),i.lineJoin=In(n.lineJoin,"miter"),i.lineWidth=o,i.strokeStyle=In(n.strokeStyle,r),i.setLineDash(In(n.lineDash,[])),a.usePointStyle){const r={radius:p*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},l=s.xPlus(t,f/2);eo(i,r,l,e+h,a.pointStyleWidth&&f)}else{const a=e+Math.max((u-p)/2,0),r=s.leftForLtr(t,f),l=vo(n.borderRadius);i.beginPath(),Object.values(l).some((t=>0!==t))?uo(i,{x:r,y:a,w:f,h:p,radius:l}):i.rect(r,a,f,p),i.fill(),0!==o&&i.stroke()}i.restore()}(s.x(k),D,y),k=((t,e,n,i)=>t===(i?"left":"right")?n:"center"===t?(e+n)/2:e)(w,k+f+h,m?k+M:this.right,t.rtl),function(t,e,n){co(i,n.text,t,e+g/2,l,{strikethrough:n.hidden,textAlign:s.textAlign(n.textAlign)})}(s.x(k),D,y),m)d.x+=M+c;else if("string"!=typeof y.text){const t=l.lineHeight;d.y+=nl(y,t)+c}else d.y+=b})),oa(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,n=yo(e.font),i=bo(e.padding);if(!e.display)return;const o=na(t.rtl,this.left,this.width),a=this.ctx,r=e.position,s=n.size/2,l=i.top+s;let c,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),c=this.top+l,u=Pi(t.align,u,this.right-h);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);c=l+Pi(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=Pi(r,u,u+h);a.textAlign=o.textAlign(Si(r)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=n.string,co(a,e.text,d,c,n)}_computeTitleHeight(){const t=this.options.title,e=yo(t.font),n=bo(t.padding);return t.display?e.lineHeight+n.height:0}_getLegendItemAt(t,e){let n,i,o;if(bi(t,this.left,this.right)&&bi(e,this.top,this.bottom))for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(i=o[n],bi(t,i.left,i.left+i.width)&&bi(e,i.top,i.top+i.height))return this.legendItems[n];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const a=this._hoveredItem,r=(o=n,null!==(i=a)&&null!==o&&i.datasetIndex===o.datasetIndex&&i.index===o.index);a&&!r&&Rn(e.onLeave,[t,a,this],this),this._hoveredItem=n,n&&!r&&Rn(e.onHover,[t,n,this],this)}else n&&Rn(e.onClick,[t,n,this],this);var i,o}}function nl(t,e){return e*(t.text?t.text.length:0)}var il={id:"legend",_element:el,start(t,e,n){const i=t.legend=new el({ctx:t.ctx,options:n,chart:t});lr.configure(t,i,n),lr.addBox(t,i)},stop(t){lr.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const i=t.legend;lr.configure(t,i,n),i.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const i=e.datasetIndex,o=n.chart;o.isDatasetVisible(i)?(o.hide(i),e.hidden=!0):(o.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:o,color:a,useBorderRadius:r,borderRadius:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const l=t.controller.getStyle(n?0:void 0),c=bo(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:o||l.textAlign,borderRadius:r&&(s||l.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class ol extends Cr{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const i=Pn(n.text)?n.text.length:1;this._padding=bo(n.padding);const o=i*yo(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:n,bottom:i,right:o,options:a}=this,r=a.align;let s,l,c,u=0;return this.isHorizontal()?(l=Pi(r,n,o),c=e+t,s=o-n):("left"===a.position?(l=n+t,c=Pi(r,i,e),u=-.5*Xn):(l=o-t,c=Pi(r,e,i),u=.5*Xn),s=i-e),{titleX:l,titleY:c,maxWidth:s,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const n=yo(e.font),i=n.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:r,rotation:s}=this._drawArgs(i);co(t,e.text,0,0,n,{color:e.color,maxWidth:r,rotation:s,textAlign:Si(e.align),textBaseline:"middle",translation:[o,a]})}}var al={id:"title",_element:ol,start(t,e,n){!function(t,e){const n=new ol({ctx:t.ctx,options:e,chart:t});lr.configure(t,n,e),lr.addBox(t,n),t.titleBlock=n}(t,n)},stop(t){const e=t.titleBlock;lr.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;lr.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const rl=new WeakMap;var sl={id:"subtitle",start(t,e,n){const i=new ol({ctx:t.ctx,options:n,chart:t});lr.configure(t,i,n),lr.addBox(t,i),rl.set(t,i)},stop(t){lr.removeBox(t,rl.get(t)),rl.delete(t)},beforeUpdate(t,e,n){const i=rl.get(t);lr.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ll={average(t){if(!t.length)return!1;let e,n,i=new Set,o=0,a=0;for(e=0,n=t.length;e<n;++e){const n=t[e].element;if(n&&n.hasValue()){const t=n.tooltipPosition();i.add(t.x),o+=t.y,++a}}return 0!==a&&0!==i.size&&{x:[...i].reduce(((t,e)=>t+e))/i.size,y:o/a}},nearest(t,e){if(!t.length)return!1;let n,i,o,a=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){const i=t[n].element;if(i&&i.hasValue()){const t=fi(e,i.getCenterPoint());t<s&&(s=t,o=i)}}if(o){const t=o.tooltipPosition();a=t.x,r=t.y}return{x:a,y:r}}};function cl(t,e){return e&&(Pn(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ul(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function hl(t,e){const{element:n,datasetIndex:i,index:o}=e,a=t.getDatasetMeta(i).controller,{label:r,value:s}=a.getLabelAndValue(o);return{chart:t,label:r,parsed:a.getParsed(o),raw:t.data.datasets[i].data[o],formattedValue:s,dataset:a.getDataset(),dataIndex:o,datasetIndex:i,element:n}}function dl(t,e){const n=t.chart.ctx,{body:i,footer:o,title:a}=t,{boxWidth:r,boxHeight:s}=e,l=yo(e.bodyFont),c=yo(e.titleFont),u=yo(e.footerFont),h=a.length,d=o.length,f=i.length,p=bo(e.padding);let g=p.height,m=0,v=i.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);v+=t.beforeBody.length+t.afterBody.length,h&&(g+=h*c.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),v&&(g+=f*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(v-f)*l.lineHeight+(v-1)*e.bodySpacing),d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let b=0;const y=function(t){m=Math.max(m,n.measureText(t).width+b)};return n.save(),n.font=c.string,Ln(t.title,y),n.font=l.string,Ln(t.beforeBody.concat(t.afterBody),y),b=e.displayColors?r+2+e.boxPadding:0,Ln(i,(t=>{Ln(t.before,y),Ln(t.lines,y),Ln(t.after,y)})),b=0,n.font=u.string,Ln(t.footer,y),n.restore(),m+=p.width,{width:m,height:g}}function fl(t,e,n,i){const{x:o,width:a}=n,{width:r,chartArea:{left:s,right:l}}=t;let c="center";return"center"===i?c=o<=(s+l)/2?"left":"right":o<=a/2?c="left":o>=r-a/2&&(c="right"),function(t,e,n,i){const{x:o,width:a}=i,r=n.caretSize+n.caretPadding;return"left"===t&&o+a+r>e.width||"right"===t&&o-a-r<0||void 0}(c,t,e,n)&&(c="center"),c}function pl(t,e,n){const i=n.yAlign||e.yAlign||function(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}(t,n);return{xAlign:n.xAlign||e.xAlign||fl(t,e,n,i),yAlign:i}}function gl(t,e,n,i){const{caretSize:o,caretPadding:a,cornerRadius:r}=t,{xAlign:s,yAlign:l}=n,c=o+a,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=vo(r);let p=function(t,e){let{x:n,width:i}=t;return"right"===e?n-=i:"center"===e&&(n-=i/2),n}(e,s);const g=function(t,e,n){let{y:i,height:o}=t;return"top"===e?i+=n:i-="bottom"===e?o+n:o/2,i}(e,l,c);return"center"===l?"left"===s?p+=c:"right"===s&&(p-=c):"left"===s?p-=Math.max(u,d)+o:"right"===s&&(p+=Math.max(h,f)+o),{x:vi(p,0,i.width-e.width),y:vi(g,0,i.height-e.height)}}function ml(t,e,n){const i=bo(n.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function vl(t){return cl([],ul(t))}function bl(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const yl={beforeTitle:Dn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Dn,beforeBody:Dn,beforeLabel:Dn,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Sn(n)||(e+=n),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Dn,afterBody:Dn,beforeFooter:Dn,footer:Dn,afterFooter:Dn};function xl(t,e,n,i){const o=t[e].call(n,i);return void 0===o?yl[e].call(n,i):o}class _l extends Cr{static positioners=ll;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&e.options.animation&&n.animations,o=new ba(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=_o(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:n}=e,i=xl(n,"beforeTitle",this,t),o=xl(n,"title",this,t),a=xl(n,"afterTitle",this,t);let r=[];return r=cl(r,ul(i)),r=cl(r,ul(o)),r=cl(r,ul(a)),r}getBeforeBody(t,e){return vl(xl(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:n}=e,i=[];return Ln(t,(t=>{const e={before:[],lines:[],after:[]},o=bl(n,t);cl(e.before,ul(xl(o,"beforeLabel",this,t))),cl(e.lines,xl(o,"label",this,t)),cl(e.after,ul(xl(o,"afterLabel",this,t))),i.push(e)})),i}getAfterBody(t,e){return vl(xl(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:n}=e,i=xl(n,"beforeFooter",this,t),o=xl(n,"footer",this,t),a=xl(n,"afterFooter",this,t);let r=[];return r=cl(r,ul(i)),r=cl(r,ul(o)),r=cl(r,ul(a)),r}_createItems(t){const e=this._active,n=this.chart.data,i=[],o=[],a=[];let r,s,l=[];for(r=0,s=e.length;r<s;++r)l.push(hl(this.chart,e[r]));return t.filter&&(l=l.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(l=l.sort(((e,i)=>t.itemSort(e,i,n)))),Ln(l,(e=>{const n=bl(t.callbacks,e);i.push(xl(n,"labelColor",this,e)),o.push(xl(n,"labelPointStyle",this,e)),a.push(xl(n,"labelTextColor",this,e))})),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=l,l}update(t,e){const n=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(i.length){const t=ll[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const e=this._size=dl(this,n),r=Object.assign({},t,e),s=pl(this.chart,n,r),l=gl(n,r,s,this.chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,o={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,n,i){const o=this.getCaretPosition(t,n,i);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,n){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:r}=n,{topLeft:s,topRight:l,bottomLeft:c,bottomRight:u}=vo(r),{x:h,y:d}=t,{width:f,height:p}=e;let g,m,v,b,y,x;return"center"===o?(y=d+p/2,"left"===i?(g=h,m=g-a,b=y+a,x=y-a):(g=h+f,m=g+a,b=y-a,x=y+a),v=g):(m="left"===i?h+Math.max(s,c)+a:"right"===i?h+f-Math.max(l,u)-a:this.caretX,"top"===o?(b=d,y=b-a,g=m-a,v=m+a):(b=d+p,y=b+a,g=m+a,v=m-a),x=b),{x1:g,x2:m,x3:v,y1:b,y2:y,y3:x}}drawTitle(t,e,n){const i=this.title,o=i.length;let a,r,s;if(o){const l=na(n.rtl,this.x,this.width);for(t.x=ml(this,n.titleAlign,n),e.textAlign=l.textAlign(n.titleAlign),e.textBaseline="middle",a=yo(n.titleFont),r=n.titleSpacing,e.fillStyle=n.titleColor,e.font=a.string,s=0;s<o;++s)e.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,s+1===o&&(t.y+=n.titleMarginBottom-r)}}_drawColorBox(t,e,n,i,o){const a=this.labelColors[n],r=this.labelPointStyles[n],{boxHeight:s,boxWidth:l}=o,c=yo(o.bodyFont),u=ml(this,"left",o),h=i.x(u),d=s<c.lineHeight?(c.lineHeight-s)/2:0,f=e.y+d;if(o.usePointStyle){const e={radius:Math.min(l,s)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},n=i.leftForLtr(h,l)+l/2,c=f+s/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,to(t,e,n,c),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,to(t,e,n,c)}else{t.lineWidth=On(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=i.leftForLtr(h,l),n=i.leftForLtr(i.xPlus(h,1),l-2),r=vo(a.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,uo(t,{x:e,y:f,w:l,h:s,radius:r}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),uo(t,{x:n,y:f+1,w:l-2,h:s-2,radius:r}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,f,l,s),t.strokeRect(e,f,l,s),t.fillStyle=a.backgroundColor,t.fillRect(n,f+1,l-2,s-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,e,n){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:r,boxHeight:s,boxWidth:l,boxPadding:c}=n,u=yo(n.bodyFont);let h=u.lineHeight,d=0;const f=na(n.rtl,this.x,this.width),p=function(n){e.fillText(n,f.x(t.x+d),t.y+h/2),t.y+=h+o},g=f.textAlign(a);let m,v,b,y,x,_,w;for(e.textAlign=a,e.textBaseline="middle",e.font=u.string,t.x=ml(this,g,n),e.fillStyle=n.bodyColor,Ln(this.beforeBody,p),d=r&&"right"!==g?"center"===a?l/2+c:l+2+c:0,y=0,_=i.length;y<_;++y){for(m=i[y],v=this.labelTextColors[y],e.fillStyle=v,Ln(m.before,p),b=m.lines,r&&b.length&&(this._drawColorBox(e,t,y,f,n),h=Math.max(u.lineHeight,s)),x=0,w=b.length;x<w;++x)p(b[x]),h=u.lineHeight;Ln(m.after,p)}d=0,h=u.lineHeight,Ln(this.afterBody,p),t.y-=o}drawFooter(t,e,n){const i=this.footer,o=i.length;let a,r;if(o){const s=na(n.rtl,this.x,this.width);for(t.x=ml(this,n.footerAlign,n),t.y+=n.footerMarginTop,e.textAlign=s.textAlign(n.footerAlign),e.textBaseline="middle",a=yo(n.footerFont),e.fillStyle=n.footerColor,e.font=a.string,r=0;r<o;++r)e.fillText(i[r],s.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+n.footerSpacing}}drawBackground(t,e,n,i){const{xAlign:o,yAlign:a}=this,{x:r,y:s}=t,{width:l,height:c}=n,{topLeft:u,topRight:h,bottomLeft:d,bottomRight:f}=vo(i.cornerRadius);e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth,e.beginPath(),e.moveTo(r+u,s),"top"===a&&this.drawCaret(t,e,n,i),e.lineTo(r+l-h,s),e.quadraticCurveTo(r+l,s,r+l,s+h),"center"===a&&"right"===o&&this.drawCaret(t,e,n,i),e.lineTo(r+l,s+c-f),e.quadraticCurveTo(r+l,s+c,r+l-f,s+c),"bottom"===a&&this.drawCaret(t,e,n,i),e.lineTo(r+d,s+c),e.quadraticCurveTo(r,s+c,r,s+c-d),"center"===a&&"left"===o&&this.drawCaret(t,e,n,i),e.lineTo(r,s+u),e.quadraticCurveTo(r,s,r+u,s),e.closePath(),e.fill(),i.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){const n=ll[t.position].call(this,this._active,this._eventPosition);if(!n)return;const a=this._size=dl(this,t),r=Object.assign({},n,this._size),s=pl(e,t,r),l=gl(t,r,s,e);i._to===l.x&&o._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=a.width,this.height=a.height,this.caretX=n.x,this.caretY=n.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(e);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=bo(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=n,this.drawBackground(o,t,i,e),ia(t,e.textDirection),o.y+=a.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),oa(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const n=this._active,i=t.map((({datasetIndex:t,index:e})=>{const n=this.chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),o=!Fn(n,i),a=this._positionChanged(i,e);(o||a)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,n=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,e,n),r=this._positionChanged(a,t),s=e||!Fn(a,o)||r;return s&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}_getActiveElements(t,e,n,i){const o=this.options;if("mouseout"===t.type)return[];if(!i)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const a=this.chart.getElementsAtEventForMode(t,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:n,caretY:i,options:o}=this,a=ll[o.position].call(this,t,e);return!1!==a&&(n!==a.x||i!==a.y)}}var wl={id:"tooltip",_element:_l,positioners:ll,afterInit(t,e,n){n&&(t.tooltip=new _l({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:yl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ml=Object.freeze({__proto__:null,Colors:Rs,Decimation:js,Filler:Qs,Legend:il,SubTitle:sl,Title:al,Tooltip:wl});function kl(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function Dl(t,e,{horizontal:n,minRotation:i}){const o=ci(i),a=(n?Math.sin(o):Math.cos(o))||.001,r=.75*e*(""+t).length;return Math.min(e/a,r)}class Cl extends Lr{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Sn(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:o}=this;const a=t=>i=e?i:t,r=t=>o=n?o:t;if(t){const t=oi(i),e=oi(o);t<0&&e<0?r(0):t>0&&e>0&&a(0)}if(i===o){let e=0===o?1:Math.abs(.05*o);r(o+e),t||a(i-e)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:n,stepSize:i}=t;return i?(e=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i=function(t,e){const n=[],{bounds:i,step:o,min:a,max:r,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:h}=t,d=o||1,f=c-1,{min:p,max:g}=e,m=!Sn(a),v=!Sn(r),b=!Sn(l),y=(g-p)/(u+1);let x,_,w,M,k=ri((g-p)/f/d)*d;if(k<1e-14&&!m&&!v)return[{value:p},{value:g}];M=Math.ceil(g/k)-Math.floor(p/k),M>f&&(k=ri(M*k/f/d)*d),Sn(s)||(x=Math.pow(10,s),k=Math.ceil(k*x)/x),"ticks"===i?(_=Math.floor(p/k)*k,w=Math.ceil(g/k)*k):(_=p,w=g),m&&v&&o&&function(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}((r-a)/o,k/1e3)?(M=Math.round(Math.min((r-a)/k,c)),k=(r-a)/M,_=a,w=r):b?(_=m?a:_,w=v?r:w,M=l-1,k=(w-_)/M):(M=(w-_)/k,M=ai(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const D=Math.max(hi(k),hi(_));x=Math.pow(10,Sn(s)?D:s),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let C=0;for(m&&(h&&_!==a?(n.push({value:a}),_<a&&C++,ai(Math.round((_+C*k)*x)/x,a,Dl(a,y,t))&&C++):_<a&&C++);C<M;++C){const t=Math.round((_+C*k)*x)/x;if(v&&t>r)break;n.push({value:t})}return v&&h&&w!==r?n.length&&ai(n[n.length-1].value,r,Dl(r,y,t))?n[n.length-1].value=r:n.push({value:r}):v&&w!==r||n.push({value:w}),n}({maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&li(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const t=this.ticks;let e=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}getLabelForValue(t){return Hi(t,this.chart.options.locale,this.options.ticks.format)}}class Sl extends Cl{static id="linear";static defaults={ticks:{callback:Wi.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Tn(t)?t:0,this.max=Tn(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,n=ci(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Pl=t=>Math.floor(ii(t)),Ol=(t,e)=>Math.pow(10,Pl(t)+e);function Tl(t){return 1===t/Math.pow(10,Pl(t))}function El(t,e,n){const i=Math.pow(10,n),o=Math.floor(t/i);return Math.ceil(e/i)-o}class Il extends Lr{static id="logarithmic";static defaults={ticks:{callback:Wi.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const n=Cl.prototype.parse.apply(this,[t,e]);if(0!==n)return Tn(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Tn(t)?Math.max(0,t):null,this.max=Tn(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Tn(this._userMin)&&(this.min=t===Ol(this.min,0)?Ol(this.min,-1):Ol(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let n=this.min,i=this.max;const o=e=>n=t?n:e,a=t=>i=e?i:t;n===i&&(n<=0?(o(1),a(10)):(o(Ol(n,-1)),a(Ol(i,1)))),n<=0&&o(Ol(i,-1)),i<=0&&a(Ol(n,1)),this.min=n,this.max=i}buildTicks(){const t=this.options,e=function(t,{min:e,max:n}){e=En(t.min,e);const i=[],o=Pl(e);let a=function(t,e){let n=Pl(e-t);for(;El(t,e,n)>10;)n++;for(;El(t,e,n)<10;)n--;return Math.min(n,Pl(t))}(e,n),r=a<0?Math.pow(10,Math.abs(a)):1;const s=Math.pow(10,a),l=o>a?Math.pow(10,o):0,c=Math.round((e-l)*r)/r,u=Math.floor((e-l)/s/10)*s*10;let h=Math.floor((c-u)/Math.pow(10,a)),d=En(t.min,Math.round((l+u+h*Math.pow(10,a))*r)/r);for(;d<n;)i.push({value:d,major:Tl(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(a++,h=2,r=a>=0?1:r),d=Math.round((l+u+h*Math.pow(10,a))*r)/r;const f=En(t.max,d);return i.push({value:f,major:Tl(f),significand:h}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&li(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Hi(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ii(t),this._valueRange=ii(this.max)-ii(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ii(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Al(t){const e=t.ticks;if(e.display&&t.display){const t=bo(e.backdropPadding);return In(e.font&&e.font.size,Xi.font.size)+t.height}return 0}function Rl(t,e,n,i,o){return t===i||t===o?{start:e-n/2,end:e+n/2}:t<i||t>o?{start:e-n,end:e}:{start:e,end:e+n}}function Ll(t,e,n,i,o){const a=Math.abs(Math.sin(n)),r=Math.abs(Math.cos(n));let s=0,l=0;i.start<e.l?(s=(e.l-i.start)/a,t.l=Math.min(t.l,e.l-s)):i.end>e.r&&(s=(i.end-e.r)/a,t.r=Math.max(t.r,e.r+s)),o.start<e.t?(l=(e.t-o.start)/r,t.t=Math.min(t.t,e.t-l)):o.end>e.b&&(l=(o.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Fl(t,e,n){const i=t.drawingArea,{extra:o,additionalAngle:a,padding:r,size:s}=n,l=t.getPointPosition(e,i+o+r,a),c=Math.round(ui(gi(l.angle+ti))),u=function(t,e,n){return 90===n||270===n?t-=e/2:(n>270||n<90)&&(t-=e),t}(l.y,s.h,c),h=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(c),d=(f=l.x,p=s.w,"right"===(g=h)?f-=p:"center"===g&&(f-=p/2),f);var f,p,g;return{visible:!0,x:l.x,y:u,textAlign:h,left:d,top:u,right:d+s.w,bottom:u+s.h}}function jl(t,e){if(!e)return!0;const{left:n,top:i,right:o,bottom:a}=t;return!(no({x:n,y:i},e)||no({x:n,y:a},e)||no({x:o,y:i},e)||no({x:o,y:a},e))}function Nl(t,e,n){const{left:i,top:o,right:a,bottom:r}=n,{backdropColor:s}=e;if(!Sn(s)){const n=vo(e.borderRadius),l=bo(e.backdropPadding);t.fillStyle=s;const c=i-l.left,u=o-l.top,h=a-i+l.width,d=r-o+l.height;Object.values(n).some((t=>0!==t))?(t.beginPath(),uo(t,{x:c,y:u,w:h,h:d,radius:n}),t.fill()):t.fillRect(c,u,h,d)}}function Bl(t,e,n,i){const{ctx:o}=t;if(n)o.arc(t.xCenter,t.yCenter,e,0,Jn);else{let n=t.getPointPosition(0,e);o.moveTo(n.x,n.y);for(let a=1;a<i;a++)n=t.getPointPosition(a,e),o.lineTo(n.x,n.y)}}class zl extends Cl{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=bo(Al(this.options)/2),e=this.width=this.maxWidth-t.width,n=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+n/2+t.top),this.drawingArea=Math.floor(Math.min(e,n)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Tn(t)&&!isNaN(t)?t:0,this.max=Tn(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Al(this.options))}generateTickLabels(t){Cl.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const n=Rn(this.options.pointLabels.callback,[t,e],this);return n||0===n?n:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],o=[],a=t._pointLabels.length,r=t.options.pointLabels,s=r.centerPointLabels?Xn/a:0;for(let h=0;h<a;h++){const a=r.setContext(t.getPointLabelContext(h));o[h]=a.padding;const d=t.getPointPosition(h,t.drawingArea+o[h],s),f=yo(a.font),p=(l=t.ctx,c=f,u=Pn(u=t._pointLabels[h])?u:[u],{w:Ki(l,c.string,u),h:u.length*c.lineHeight});i[h]=p;const g=gi(t.getIndexAngle(h)+s),m=Math.round(ui(g));Ll(n,e,g,Rl(m,d.x,p.w,0,180),Rl(m,d.y,p.h,90,270))}var l,c,u;t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=function(t,e,n){const i=[],o=t._pointLabels.length,a=t.options,{centerPointLabels:r,display:s}=a.pointLabels,l={extra:Al(a)/2,additionalAngle:r?Xn/o:0};let c;for(let a=0;a<o;a++){l.padding=n[a],l.size=e[a];const o=Fl(t,a,l);i.push(o),"auto"===s&&(o.visible=jl(o,c),o.visible&&(c=o))}return i}(t,i,o)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,n,i){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,n,i))}getIndexAngle(t){return gi(t*(Jn/(this._pointLabels.length||1))+ci(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Sn(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Sn(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const n=e[t];return function(t,e,n){return _o(t,{label:n,index:e,type:"pointLabel"})}(this.getContext(),t,n)}}getPointPosition(t,e,n=0){const i=this.getIndexAngle(t)-ti+n;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:n,right:i,bottom:o}=this._pointLabelItems[t];return{left:e,top:n,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const n=this.ctx;n.save(),n.beginPath(),Bl(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:n,grid:i,border:o}=e,a=this._pointLabels.length;let r,s,l;if(e.pointLabels.display&&function(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let o=e-1;o>=0;o--){const e=t._pointLabelItems[o];if(!e.visible)continue;const a=i.setContext(t.getPointLabelContext(o));Nl(n,a,e);const r=yo(a.font),{x:s,y:l,textAlign:c}=e;co(n,t._pointLabels[o],s,l+r.lineHeight/2,r,{color:a.color,textAlign:c,textBaseline:"middle"})}}(this,a),i.display&&this.ticks.forEach(((t,e)=>{if(0!==e||0===e&&this.min<0){s=this.getDistanceFromCenterForValue(t.value);const n=this.getContext(e),r=i.setContext(n),l=o.setContext(n);!function(t,e,n,i,o){const a=t.ctx,r=e.circular,{color:s,lineWidth:l}=e;!r&&!i||!s||!l||n<0||(a.save(),a.strokeStyle=s,a.lineWidth=l,a.setLineDash(o.dash||[]),a.lineDashOffset=o.dashOffset,a.beginPath(),Bl(t,n,r,i),a.closePath(),a.stroke(),a.restore())}(this,r,s,a,l)}})),n.display){for(t.save(),r=a-1;r>=0;r--){const i=n.setContext(this.getPointLabelContext(r)),{color:o,lineWidth:a}=i;a&&o&&(t.lineWidth=a,t.strokeStyle=o,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,s=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(r,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,n=e.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let o,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((i,r)=>{if(0===r&&this.min>=0&&!e.reverse)return;const s=n.setContext(this.getContext(r)),l=yo(s.font);if(o=this.getDistanceFromCenterForValue(this.ticks[r].value),s.showLabelBackdrop){t.font=l.string,a=t.measureText(i.label).width,t.fillStyle=s.backdropColor;const e=bo(s.backdropPadding);t.fillRect(-a/2-e.left,-o-l.size/2-e.top,a+e.width,l.size+e.height)}co(t,i.label,0,-o,l,{color:s.color,strokeColor:s.textStrokeColor,strokeWidth:s.textStrokeWidth})})),t.restore()}drawTitle(){}}const Hl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Vl=Object.keys(Hl);function Wl(t,e){return t-e}function Yl(t,e){if(Sn(e))return null;const n=t._adapter,{parser:i,round:o,isoWeekday:a}=t._parseOpts;let r=e;return"function"==typeof i&&(r=i(r)),Tn(r)||(r="string"==typeof i?n.parse(r,i):n.parse(r)),null===r?null:(o&&(r="week"!==o||!si(a)&&!0!==a?n.startOf(r,o):n.startOf(r,"isoWeek",a)),+r)}function $l(t,e,n,i){const o=Vl.length;for(let a=Vl.indexOf(t);a<o-1;++a){const t=Hl[Vl[a]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((n-e)/(o*t.size))<=i)return Vl[a]}return Vl[o-1]}function ql(t,e,n){if(n){if(n.length){const{lo:i,hi:o}=yi(n,e);t[n[i]>=e?n[i]:n[o]]=!0}}else t[e]=!0}function Ul(t,e,n){const i=[],o={},a=e.length;let r,s;for(r=0;r<a;++r)s=e[r],o[s]=r,i.push({value:s,major:!1});return 0!==a&&n?function(t,e,n,i){const o=t._adapter,a=+o.startOf(e[0].value,i),r=e[e.length-1].value;let s,l;for(s=a;s<=r;s=+o.add(s,1,i))l=n[s],l>=0&&(e[l].major=!0);return e}(t,i,o,n):i}class Gl extends Lr{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const n=t.time||(t.time={}),i=this._adapter=new Ya(t.adapters.date);i.init(e),Hn(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Yl(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,n=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:r}=this.getUserBounds();function s(t){a||isNaN(t.min)||(i=Math.min(i,t.min)),r||isNaN(t.max)||(o=Math.max(o,t.max))}a&&r||(s(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(this.getMinMax(!1))),i=Tn(i)&&!isNaN(i)?i:+e.startOf(Date.now(),n),o=Tn(o)&&!isNaN(o)?o:+e.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],n=t[t.length-1]),{min:e,max:n}}buildTicks(){const t=this.options,e=t.time,n=t.ticks,i="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=function(t,e,n){let i=0,o=t.length;for(;i<o&&t[i]<e;)i++;for(;o>i&&t[o-1]>n;)o--;return i>0||o<t.length?t.slice(i,o):t}(i,o,this.max);return this._unit=e.unit||(n.autoSkip?$l(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):function(t,e,n,i,o){for(let a=Vl.length-1;a>=Vl.indexOf(n);a--){const n=Vl[a];if(Hl[n].common&&t._adapter.diff(o,i,n)>=e-1)return n}return Vl[n?Vl.indexOf(n):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(t){for(let e=Vl.indexOf(t)+1,n=Vl.length;e<n;++e)if(Hl[Vl[e]].common)return Vl[e]}(this._unit):void 0,this.initOffsets(i),t.reverse&&a.reverse(),Ul(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t=[]){let e,n,i=0,o=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),i=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,n=this.getDecimalForValue(t[t.length-1]),o=1===t.length?n:(n-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;i=vi(i,0,a),o=vi(o,0,a),this._offsets={start:i,end:o,factor:1/(i+1+o)}}_generate(){const t=this._adapter,e=this.min,n=this.max,i=this.options,o=i.time,a=o.unit||$l(o.minUnit,e,n,this._getLabelCapacity(e)),r=In(i.ticks.stepSize,1),s="week"===a&&o.isoWeekday,l=si(s)||!0===s,c={};let u,h,d=e;if(l&&(d=+t.startOf(d,"isoWeek",s)),d=+t.startOf(d,l?"day":a),t.diff(n,e,a)>1e5*r)throw new Error(e+" and "+n+" are too far apart with stepSize of "+r+" "+a);const f="data"===i.ticks.source&&this.getDataTimestamps();for(u=d,h=0;u<n;u=+t.add(u,r,a),h++)ql(c,u,f);return u!==n&&"ticks"!==i.bounds&&1!==h||ql(c,u,f),Object.keys(c).sort(Wl).map((t=>+t))}getLabelForValue(t){const e=this._adapter,n=this.options.time;return n.tooltipFormat?e.format(t,n.tooltipFormat):e.format(t,n.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,i=this._unit,o=e||n[i];return this._adapter.format(t,o)}_tickFormatFunction(t,e,n,i){const o=this.options,a=o.ticks.callback;if(a)return Rn(a,[t,e,n],this);const r=o.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&r[s],u=l&&r[l],h=n[e],d=l&&u&&h&&h.major;return this._adapter.format(t,i||(d?u:c))}generateTickLabels(t){let e,n,i;for(e=0,n=t.length;e<n;++e)i=t[e],i.label=this._tickFormatFunction(i.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+n)*e.factor)}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,n=this.ctx.measureText(t).width,i=ci(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(i),a=Math.sin(i),r=this._resolveTickFontOptions(0).size;return{w:n*o+r*a,h:n*a+r*o}}_getLabelCapacity(t){const e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,o=this._tickFormatFunction(t,0,Ul(this,[t],this._majorUnit),i),a=this._getLabelSize(o),r=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,n=this._cache.data||[];if(n.length)return n;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(t=0,e=i.length;t<e;++t)n=n.concat(i[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}getLabelTimestamps(){const t=this._cache.labels||[];let e,n;if(t.length)return t;const i=this.getLabels();for(e=0,n=i.length;e<n;++e)t.push(Yl(this,i[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ki(t.sort(Wl))}}function Xl(t,e,n){let i,o,a,r,s=0,l=t.length-1;n?(e>=t[s].pos&&e<=t[l].pos&&({lo:s,hi:l}=xi(t,"pos",e)),({pos:i,time:a}=t[s]),({pos:o,time:r}=t[l])):(e>=t[s].time&&e<=t[l].time&&({lo:s,hi:l}=xi(t,"time",e)),({time:i,pos:a}=t[s]),({time:o,pos:r}=t[l]));const c=o-i;return c?a+(r-a)*(e-i)/c:a}var Jl=Object.freeze({__proto__:null,CategoryScale:class extends Lr{static id="category";static defaults={ticks:{callback:kl}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:n,label:i}of e)t[n]===i&&t.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Sn(t))return null;const n=this.getLabels();return((t,e)=>null===t?null:vi(Math.round(t),0,e))(e=isFinite(e)&&n[e]===t?e:function(t,e,n,i){const o=t.indexOf(e);return-1===o?((t,e,n,i)=>("string"==typeof e?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n))(t,e,n,i):o!==t.lastIndexOf(e)?n:o}(n,t,In(e,t),this._addedLabels),n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(n=0),e||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,e=this.max,n=this.options.offset,i=[];let o=this.getLabels();o=0===t&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let n=t;n<=e;n++)i.push({value:n});return i}getLabelForValue(t){return kl.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:Sl,LogarithmicScale:Il,RadialLinearScale:zl,TimeScale:Gl,TimeSeriesScale:class extends Gl{static id="timeseries";static defaults=Gl.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Xl(e,this.min),this._tableRange=Xl(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:n}=this,i=[],o=[];let a,r,s,l,c;for(a=0,r=t.length;a<r;++a)l=t[a],l>=e&&l<=n&&i.push(l);if(i.length<2)return[{time:e,pos:0},{time:n,pos:1}];for(a=0,r=i.length;a<r;++a)c=i[a+1],s=i[a-1],l=i[a],Math.round((c+s)/2)!==l&&o.push({time:l,pos:a/(r-1)});return o}_generate(){const t=this.min,e=this.max;let n=super.getDataTimestamps();return n.includes(t)&&n.length||n.splice(0,0,t),n.includes(e)&&1!==n.length||n.push(e),n.sort(((t,e)=>t-e))}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),n=this.getLabelTimestamps();return t=e.length&&n.length?this.normalize(e.concat(n)):e.length?e:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Xl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end;return Xl(this._table,n*this._tableRange+this._minPos,!0)}}});const Kl=[Ha,Ps,Ml,Jl];us.register(...Kl);const Zl=window.lodash;function Ql(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function tc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ql(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ql(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function ec(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ec=function(){return!!t})()}var nc=function(t){function e(){return a(this,e),t=this,i=arguments,n=c(n=e),l(t,ec()?Reflect.construct(n,i||[],c(t).constructor):n.apply(t,i));var t,n,i}return h(e,t),s(e,[{key:"init",value:function(){var t=this;this._elements.map((function(e){var n=(0,i.u)(e).find(".chart-content.content-chart").find(".chart-container");if(n.length){var o=n.data("chart");if(o){var a=JSON.parse(o),r=(0,i.u)(n).find("canvas");if(!r.nodes[0])return;var s=t._getChartData(a,r.nodes[0]),l=us.registry.getPlugin("tooltip");l&&(l.positioners.custom=function(t,e){return{x:e.x,y:e.y}}),new us(r.nodes[0],s);var c=(0,i.u)(e).find(".chart-content .chart-inside span");t._animateNumber(c,a)}}}))}},{key:"_animateNumber",value:function(t,e){var n=e.chartContent,i=e.chartItems,o=e.totalValue,a=e.animationDuration,r=e.multiValue;pt({targets:t.nodes[0],innerHTML:r||"number"===n?[0,o]:[0,i[0].value],duration:a,easing:"cubicBezier(.02, .01, .47, 1)",round:1})}},{key:"_theColor",value:function(t){var e=t||{r:255,g:255,b:255,a:0},n=e.r,i=e.g,o=e.b,a=e.a,r=e.type,s=e.id,l="";if(!n&&0!==n||!i&&0!==i||!i&&0!==i||(l="rgba(".concat(n,", ").concat(i,", ").concat(o,", ").concat(a,")")),"variable"===r){var c="--wp--preset--color--".concat(s),u=document.createElement("div");document.body.appendChild(u),u.style.setProperty("color","var(".concat(c,")"));var h=getComputedStyle(u).color;document.body.removeChild(u);var d=h.match(/\d+/g);if(!d||d.length<3)return null;var f=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,a,r,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(c)throw o}}return s}}(t,e)||Et(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(d.map(Number),3),p=f[0],g=f[1],m=f[2];l="rgba(".concat(p,", ").concat(g,", ").concat(m,", 1)")}return l}},{key:"_getDeviceType",value:function(){var t=(window.GutenverseConfig||window.GutenverseData||{}).breakPoints,e=window.screen.width,n="Desktop";return(0,Zl.isEmpty)(t)||(e<t.Tablet&&e>t.Mobile?n="Tablet":e<t.Mobile&&(n="Mobile")),n}},{key:"_getChartData",value:function(t,e){var n=this,i=t.chartContent,o=t.tooltipDisplay,a=t.legendDisplay,r=t.chartItems,s=t.chartType,l=t.minValue,c=t.totalValue,u=t.animationDuration,h=t.cutout,d=t.barThickness,f=t.cutoutBackground,p=t.multiValue,g=[],m=[],v=[],b=[],y=[],x=!0;r.forEach((function(t){var i;if("default"===t.colorMode||void 0===t.colorMode)i=n._theColor(t.backgroundColor);else{var o="";switch(t.gradientDirection){case"topBottom":o=e.getContext("2d").createLinearGradient(0,0,0,t.gradientPosition?t.gradientPosition:200);break;case"leftRight":o=e.getContext("2d").createLinearGradient(0,0,t.gradientPosition?t.gradientPosition:200,0);break;case"bottomTop":o=e.getContext("2d").createLinearGradient(0,t.gradientPosition?t.gradientPosition:200,0,0);break;case"rightLeft":o=e.getContext("2d").createLinearGradient(t.gradientPosition?t.gradientPosition:200,0,0,0)}o.addColorStop(0,n._theColor(t.colorGradientOne)),o.addColorStop(1,n._theColor(t.colorGradientTwo)),i=o}g.push(t.value),m.push(t.label),v.push(i),y.push(n._theColor(t.borderColor)),b.push(parseFloat(t.borderWidth))}));var _="number"===i?parseFloat(c):100,w="number"===i?parseFloat(l):0,M=this._theColor(tc(tc({},f),{},{a:1}));switch(s){case"doughnut":var k=this._getDeviceType(),D=g.reduce((function(t,e){return parseFloat(t)+parseFloat(e)}),0),C={id:"customBackground",beforeDraw:function(t){var e=t.ctx,n=t.getDatasetMeta(0).data[0];if(n){var i=n.x,o=n.y,a=n.outerRadius,r=n.innerRadius;e.save(),e.globalAlpha=f.a,e.fillStyle=M,e.beginPath(),e.arc(i,o,a,0,2*Math.PI),e.fill(),e.globalAlpha=1,e.globalCompositeOperation="destination-out",e.beginPath(),e.arc(i,o,r,0,2*Math.PI),e.fill(),e.globalCompositeOperation="source-over",e.restore()}}};if(D<_&&"doughnut"===s){var S=_-D;g.push(S),m.push("gutenEmptyDataSet"),v.push("rgba(255, 255, 255, 0)"),y.push("rgba(255, 255, 255, 0)"),b.push(0)}return{type:s,data:{labels:m,datasets:[{data:g,backgroundColor:v,borderColor:y,borderWidth:b}]},options:{responsive:x,maintainAspectRatio:!1,cutout:"".concat(h[k],"%"),plugins:{tooltip:{enabled:o,position:"custom",filter:function(t){return"gutenEmptyDataSet"!==t.label},callbacks:{label:function(t){return"number"===i?"".concat(t.raw," of ").concat(c):p?"".concat(t.raw,"% of ").concat(c):"".concat(t.label,": ").concat(t.raw,"%")}}},legend:{display:!1}},animation:{animateRotate:!0,duration:u,easing:"easeInOutQuart"}},plugins:[C]};case"bar":case"line":return{type:s,data:{labels:m,datasets:[{data:g,backgroundColor:v,borderColor:y,borderWidth:b,barThickness:d}]},options:{responsive:x,maintainAspectRatio:!1,scales:{y:{beginAtZero:!0,min:w,max:_}},plugins:{tooltip:{enabled:o,position:"custom",callbacks:{label:function(t){return"number"===i?"".concat(t.raw," of ").concat(c):p?"".concat(t.raw,"% of ").concat(c):"".concat(t.label,": ").concat(t.raw,"%")}}},legend:{display:a,onClick:null,labels:{generateLabels:function(t){return t.data.labels.map((function(e,n){return{text:"".concat(e),fillStyle:t.data.datasets[0].backgroundColor[n],hidden:!1,lineWidth:0,pointStyle:"circle"}}))},usePointStyle:!0}}},animation:{animateRotate:!0,duration:u,easing:"easeInOutQuart"}}}}}}])}(i.Default);const ic=nc;var oc;function ac(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function rc(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ac(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ac(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var sc=(n(n(n(n(n(n(n(n(n(n(oc={},"tabs",f),"accordions",vt),"video-wrapper",i.GutenverseVideo),"team",yt),"progress-bar",_t),"fun-fact",Mt),"nav-menu",Dt),"testimonials",St),"client-logo",Ot),"gallery",Lt),n(n(n(n(n(n(n(n(n(oc,"animated-text",Ht),"post-block",Ut),"post-list",Kt),"popup-builder",ee),"search",ie),"countdown",We),"post-comment",$e),"portfolio-gallery",Ue),"chart",ic));if(!window.GutenverseData.activePlugins.includes("gutenverse-form/gutenverse-form.php")){var lc=n(n(n(n({},"form-builder",ae),"form-input-date",je),"form-input-select",Be),"form-input-multiselect",He);sc=rc(rc({},sc),lc)}Object.keys(sc).map((function(t){var e=(0,i.u)(".guten-".concat(t)),n=sc[t];e&&new n(e)}));var cc=(0,i.u)("[data-image-placeholder]"),uc=window.GutenverseFrontendConfig.image_placeholder;cc.nodes.map((function(t){"gutenverse-image-placeholder"===(0,i.u)(t).data("image-placeholder")&&(0,i.u)(t).attr("src",uc)}))})()})();
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генераци� �траницы: 0.02 |
proxy
|
phpinfo
|
�а�тройка