| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/ravel.network/public/wp-content/plugins/independent-analytics/dist/js/ |
Upload File : |
!function(t,e,r,n,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[n]&&a[n],s=o.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!s[e]){if(!t[e]){var i="function"==typeof a[n]&&a[n];if(!r&&i)return i(e,!0);if(o)return o(e,!0);if(l&&"string"==typeof e)return l(e);var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var h=s[e]=new u.Module(e);t[e][0].call(h.exports,f,h,h.exports,this)}return s[e].exports;function f(t){var e=f.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=s,u.parent=o,u.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[n]}}),a[n]=u;for(var c=0;c<e.length;c++)u(e[c]);if(r){var h=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=h:"function"==typeof define&&define.amd&&define(function(){return h})}}({"5IuoB":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js"),i=t("@hotwired/stimulus"),a=t("./controllers/chart_controller"),o=n.interopDefault(a);window.Stimulus=(0,i.Application).start(),Stimulus.register("chart",o.default)},{"@hotwired/stimulus":"crDvk","./controllers/chart_controller":"78XDv","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],crDvk:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"Application",function(){return tu}),n.export(r,"AttributeObserver",function(){return C}),n.export(r,"Context",function(){return $}),n.export(r,"Controller",function(){return tb}),n.export(r,"ElementObserver",function(){return D}),n.export(r,"IndexedMultimap",function(){return R}),n.export(r,"Multimap",function(){return L}),n.export(r,"SelectorObserver",function(){return B}),n.export(r,"StringMapObserver",function(){return N}),n.export(r,"TokenListObserver",function(){return V}),n.export(r,"ValueListObserver",function(){return z}),n.export(r,"add",function(){return j}),n.export(r,"defaultSchema",function(){return ts}),n.export(r,"del",function(){return T}),n.export(r,"fetch",function(){return F}),n.export(r,"prune",function(){return I});var i=t("@swc/helpers/_/_async_to_generator"),a=t("@swc/helpers/_/_class_call_check"),o=t("@swc/helpers/_/_create_class"),s=t("@swc/helpers/_/_define_property"),l=t("@swc/helpers/_/_get"),u=t("@swc/helpers/_/_get_prototype_of"),c=t("@swc/helpers/_/_inherits"),h=t("@swc/helpers/_/_sliced_to_array"),f=t("@swc/helpers/_/_to_consumable_array"),d=t("@swc/helpers/_/_type_of"),p=t("@swc/helpers/_/_create_super"),v=t("@swc/helpers/_/_ts_generator"),g=function(){function t(e,r,n){(0,a._)(this,t),this.eventTarget=e,this.eventName=r,this.eventOptions=n,this.unorderedBindings=new Set}return(0,o._)(t,[{key:"connect",value:function(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}},{key:"disconnect",value:function(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}},{key:"bindingConnected",value:function(t){this.unorderedBindings.add(t)}},{key:"bindingDisconnected",value:function(t){this.unorderedBindings.delete(t)}},{key:"handleEvent",value:function(t){var e=function(t){if("immediatePropagationStopped"in t)return t;var e=t.stopImmediatePropagation;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation:function(){this.immediatePropagationStopped=!0,e.call(this)}})}(t),r=!0,n=!1,i=void 0;try{for(var a,o=this.bindings[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(e.immediatePropagationStopped)break;s.handleEvent(e)}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"hasBindings",value:function(){return this.unorderedBindings.size>0}},{key:"bindings",get:function(){return Array.from(this.unorderedBindings).sort(function(t,e){var r=t.index,n=e.index;return r<n?-1:r>n?1:0})}}]),t}(),y=function(){function t(e){(0,a._)(this,t),this.application=e,this.eventListenerMaps=new Map,this.started=!1}return(0,o._)(t,[{key:"start",value:function(){this.started||(this.started=!0,this.eventListeners.forEach(function(t){return t.connect()}))}},{key:"stop",value:function(){this.started&&(this.started=!1,this.eventListeners.forEach(function(t){return t.disconnect()}))}},{key:"eventListeners",get:function(){return Array.from(this.eventListenerMaps.values()).reduce(function(t,e){return t.concat(Array.from(e.values()))},[])}},{key:"bindingConnected",value:function(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}},{key:"bindingDisconnected",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}},{key:"handleError",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.application.handleError(t,"Error ".concat(e),r)}},{key:"clearEventListenersForBinding",value:function(t){var e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}},{key:"removeMappedEventListenerFor",value:function(t){var e=t.eventTarget,r=t.eventName,n=t.eventOptions,i=this.fetchEventListenerMapForEventTarget(e),a=this.cacheKey(r,n);i.delete(a),0==i.size&&this.eventListenerMaps.delete(e)}},{key:"fetchEventListenerForBinding",value:function(t){var e=t.eventTarget,r=t.eventName,n=t.eventOptions;return this.fetchEventListener(e,r,n)}},{key:"fetchEventListener",value:function(t,e,r){var n=this.fetchEventListenerMapForEventTarget(t),i=this.cacheKey(e,r),a=n.get(i);return a||(a=this.createEventListener(t,e,r),n.set(i,a)),a}},{key:"createEventListener",value:function(t,e,r){var n=new g(t,e,r);return this.started&&n.connect(),n}},{key:"fetchEventListenerMapForEventTarget",value:function(t){var e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}},{key:"cacheKey",value:function(t,e){var r=[t];return Object.keys(e).sort().forEach(function(t){r.push("".concat(e[t]?"":"!").concat(t))}),r.join(":")}}]),t}(),m={stop:function(t){var e=t.event;return t.value&&e.stopPropagation(),!0},prevent:function(t){var e=t.event;return t.value&&e.preventDefault(),!0},self:function(t){var e=t.event,r=t.value,n=t.element;return!r||n===e.target}},b=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function _(t){return t.replace(/(?:[_-])([a-z0-9])/g,function(t,e){return e.toUpperCase()})}function x(t){return _(t.replace(/--/g,"-").replace(/__/g,"_"))}function k(t){return t.charAt(0).toUpperCase()+t.slice(1)}function w(t){return t.replace(/([A-Z])/g,function(t,e){return"-".concat(e.toLowerCase())})}function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var S=["meta","ctrl","alt","shift"],O=function(){function t(e,r,n,i){(0,a._)(this,t),this.element=e,this.index=r,this.eventTarget=n.eventTarget||e,this.eventName=n.eventName||function(t){var e=t.tagName.toLowerCase();if(e in A)return A[e](t)}(e)||E("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||E("missing identifier"),this.methodName=n.methodName||E("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=i}return(0,o._)(t,[{key:"toString",value:function(){var t=this.keyFilter?".".concat(this.keyFilter):"",e=this.eventTargetName?"@".concat(this.eventTargetName):"";return"".concat(this.eventName).concat(t).concat(e,"->").concat(this.identifier,"#").concat(this.methodName)}},{key:"shouldIgnoreKeyboardEvent",value:function(t){if(!this.keyFilter)return!1;var e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;var r=e.filter(function(t){return!S.includes(t)})[0];return!!r&&(M(this.keyMappings,r)||E("contains unknown key filter: ".concat(this.keyFilter)),this.keyMappings[r].toLowerCase()!==t.key.toLowerCase())}},{key:"shouldIgnoreMouseEvent",value:function(t){if(!this.keyFilter)return!1;var e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}},{key:"params",get:function(){var t={},e=RegExp("^data-".concat(this.identifier,"-(.+)-param$"),"i"),r=!0,n=!1,i=void 0;try{for(var a,o=Array.from(this.element.attributes)[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value,l=s.name,u=s.value,c=l.match(e),h=c&&c[1];h&&(t[_(h)]=function(t){try{return JSON.parse(t)}catch(e){return t}}(u))}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return t}},{key:"eventTargetName",get:function(){var t;return(t=this.eventTarget)==window?"window":t==document?"document":void 0}},{key:"keyMappings",get:function(){return this.schema.keyMappings}},{key:"keyFilterDissatisfied",value:function(t,e){var r=(0,h._)(S.map(function(t){return e.includes(t)}),4),n=r[0],i=r[1],a=r[2],o=r[3];return t.metaKey!==n||t.ctrlKey!==i||t.altKey!==a||t.shiftKey!==o}}],[{key:"forToken",value:function(t,e){var r,n,i,a;return new this(t.element,t.index,(n=(r=t.content.trim().match(b)||[])[2],(i=r[3])&&!["keydown","keyup","keypress"].includes(n)&&(n+=".".concat(i),i=""),{eventTarget:"window"==(a=r[4])?window:"document"==a?document:void 0,eventName:n,eventOptions:r[7]?r[7].split(":").reduce(function(t,e){return Object.assign(t,(0,s._)({},e.replace(/^!/,""),!/^!/.test(e)))},{}):{},identifier:r[5],methodName:r[6],keyFilter:r[1]||i}),e)}}]),t}(),A={a:function(){return"click"},button:function(){return"click"},form:function(){return"submit"},details:function(){return"toggle"},input:function(t){return"submit"==t.getAttribute("type")?"click":"input"},select:function(){return"change"},textarea:function(){return"input"}};function E(t){throw Error(t)}var P=function(){function t(e,r){(0,a._)(this,t),this.context=e,this.action=r}return(0,o._)(t,[{key:"index",get:function(){return this.action.index}},{key:"eventTarget",get:function(){return this.action.eventTarget}},{key:"eventOptions",get:function(){return this.action.eventOptions}},{key:"identifier",get:function(){return this.context.identifier}},{key:"handleEvent",value:function(t){var e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}},{key:"eventName",get:function(){return this.action.eventName}},{key:"method",get:function(){var t=this.controller[this.methodName];if("function"==typeof t)return t;throw Error('Action "'.concat(this.action,'" references undefined method "').concat(this.methodName,'"'))}},{key:"applyEventModifiers",value:function(t){var e=this.action.element,r=this.context.application.actionDescriptorFilters,n=this.context.controller,i=!0,a=!0,o=!1,s=void 0;try{for(var l,u=Object.entries(this.eventOptions)[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var c=(0,h._)(l.value,2),f=c[0],d=c[1];if(f in r){var p=r[f];i=i&&p({name:f,value:d,event:t,element:e,controller:n})}}}catch(t){o=!0,s=t}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return i}},{key:"prepareActionEvent",value:function(t){return Object.assign(t,{params:this.action.params})}},{key:"invokeWithEvent",value:function(t){var e=t.target,r=t.currentTarget;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:r,action:this.methodName})}catch(e){var n=this.identifier,i=this.controller,a=this.element,o=this.index;this.context.handleError(e,'invoking action "'.concat(this.action,'"'),{identifier:n,controller:i,element:a,index:o,event:t})}}},{key:"willBeInvokedByEvent",value:function(t){var e=t.target;return!(t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t)||t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t))&&(this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)))}},{key:"controller",get:function(){return this.context.controller}},{key:"methodName",get:function(){return this.action.methodName}},{key:"element",get:function(){return this.scope.element}},{key:"scope",get:function(){return this.context.scope}}]),t}(),D=function(){function t(e,r){var n=this;(0,a._)(this,t),this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=r,this.elements=new Set,this.mutationObserver=new MutationObserver(function(t){return n.processMutations(t)})}return(0,o._)(t,[{key:"start",value:function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}},{key:"pause",value:function(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}},{key:"stop",value:function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}},{key:"refresh",value:function(){if(this.started){var t=new Set(this.matchElementsInTree()),e=!0,r=!1,n=void 0;try{for(var i,a=Array.from(this.elements)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;t.has(o)||this.removeElement(o)}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}var s=!0,l=!1,u=void 0;try{for(var c,h=Array.from(t)[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var f=c.value;this.addElement(f)}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}}}},{key:"processMutations",value:function(t){var e=!0,r=!1,n=void 0;if(this.started)try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;this.processMutation(o)}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"processMutation",value:function(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}},{key:"processAttributeChange",value:function(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}},{key:"processRemovedNodes",value:function(t){var e=!0,r=!1,n=void 0;try{for(var i,a=Array.from(t)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value,s=this.elementFromNode(o);s&&this.processTree(s,this.removeElement)}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"processAddedNodes",value:function(t){var e=!0,r=!1,n=void 0;try{for(var i,a=Array.from(t)[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value,s=this.elementFromNode(o);s&&this.elementIsActive(s)&&this.processTree(s,this.addElement)}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"matchElement",value:function(t){return this.delegate.matchElement(t)}},{key:"matchElementsInTree",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.element;return this.delegate.matchElementsInTree(t)}},{key:"processTree",value:function(t,e){var r=!0,n=!1,i=void 0;try{for(var a,o=this.matchElementsInTree(t)[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;e.call(this,s)}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"elementFromNode",value:function(t){if(t.nodeType==Node.ELEMENT_NODE)return t}},{key:"elementIsActive",value:function(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}},{key:"addElement",value:function(t){!this.elements.has(t)&&this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}},{key:"removeElement",value:function(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}]),t}(),C=function(){function t(e,r,n){(0,a._)(this,t),this.attributeName=r,this.delegate=n,this.elementObserver=new D(e,this)}return(0,o._)(t,[{key:"element",get:function(){return this.elementObserver.element}},{key:"selector",get:function(){return"[".concat(this.attributeName,"]")}},{key:"start",value:function(){this.elementObserver.start()}},{key:"pause",value:function(t){this.elementObserver.pause(t)}},{key:"stop",value:function(){this.elementObserver.stop()}},{key:"refresh",value:function(){this.elementObserver.refresh()}},{key:"started",get:function(){return this.elementObserver.started}},{key:"matchElement",value:function(t){return t.hasAttribute(this.attributeName)}},{key:"matchElementsInTree",value:function(t){var e=this.matchElement(t)?[t]:[],r=Array.from(t.querySelectorAll(this.selector));return e.concat(r)}},{key:"elementMatched",value:function(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}},{key:"elementUnmatched",value:function(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}},{key:"elementAttributeChanged",value:function(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}]),t}();function j(t,e,r){F(t,e).add(r)}function T(t,e,r){F(t,e).delete(r),I(t,e)}function F(t,e){var r=t.get(e);return r||(r=new Set,t.set(e,r)),r}function I(t,e){var r=t.get(e);null!=r&&0==r.size&&t.delete(e)}var L=function(){function t(){(0,a._)(this,t),this.valuesByKey=new Map}return(0,o._)(t,[{key:"keys",get:function(){return Array.from(this.valuesByKey.keys())}},{key:"values",get:function(){return Array.from(this.valuesByKey.values()).reduce(function(t,e){return t.concat(Array.from(e))},[])}},{key:"size",get:function(){return Array.from(this.valuesByKey.values()).reduce(function(t,e){return t+e.size},0)}},{key:"add",value:function(t,e){j(this.valuesByKey,t,e)}},{key:"delete",value:function(t,e){T(this.valuesByKey,t,e)}},{key:"has",value:function(t,e){var r=this.valuesByKey.get(t);return null!=r&&r.has(e)}},{key:"hasKey",value:function(t){return this.valuesByKey.has(t)}},{key:"hasValue",value:function(t){return Array.from(this.valuesByKey.values()).some(function(e){return e.has(t)})}},{key:"getValuesForKey",value:function(t){var e=this.valuesByKey.get(t);return e?Array.from(e):[]}},{key:"getKeysForValue",value:function(t){return Array.from(this.valuesByKey).filter(function(e){var r=(0,h._)(e,2);return(r[0],r[1]).has(t)}).map(function(t){var e=(0,h._)(t,2),r=e[0];return e[1],r})}}]),t}(),R=function(t){(0,c._)(r,t);var e=(0,p._)(r);function r(){var t;return(0,a._)(this,r),(t=e.call(this)).keysByValue=new Map,t}return(0,o._)(r,[{key:"values",get:function(){return Array.from(this.keysByValue.keys())}},{key:"add",value:function(t,e){(0,l._)((0,u._)(r.prototype),"add",this).call(this,t,e),j(this.keysByValue,e,t)}},{key:"delete",value:function(t,e){(0,l._)((0,u._)(r.prototype),"delete",this).call(this,t,e),T(this.keysByValue,e,t)}},{key:"hasValue",value:function(t){return this.keysByValue.has(t)}},{key:"getKeysForValue",value:function(t){var e=this.keysByValue.get(t);return e?Array.from(e):[]}}]),r}(L),B=function(){function t(e,r,n,i){(0,a._)(this,t),this._selector=r,this.details=i,this.elementObserver=new D(e,this),this.delegate=n,this.matchesByElement=new L}return(0,o._)(t,[{key:"started",get:function(){return this.elementObserver.started}},{key:"selector",get:function(){return this._selector},set:function(t){this._selector=t,this.refresh()}},{key:"start",value:function(){this.elementObserver.start()}},{key:"pause",value:function(t){this.elementObserver.pause(t)}},{key:"stop",value:function(){this.elementObserver.stop()}},{key:"refresh",value:function(){this.elementObserver.refresh()}},{key:"element",get:function(){return this.elementObserver.element}},{key:"matchElement",value:function(t){var e=this.selector;if(!e)return!1;var r=t.matches(e);return this.delegate.selectorMatchElement?r&&this.delegate.selectorMatchElement(t,this.details):r}},{key:"matchElementsInTree",value:function(t){var e=this,r=this.selector;if(!r)return[];var n=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(r)).filter(function(t){return e.matchElement(t)});return n.concat(i)}},{key:"elementMatched",value:function(t){var e=this.selector;e&&this.selectorMatched(t,e)}},{key:"elementUnmatched",value:function(t){var e=this.matchesByElement.getKeysForValue(t),r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;this.selectorUnmatched(t,s)}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"elementAttributeChanged",value:function(t,e){var r=this.selector;if(r){var n=this.matchElement(t),i=this.matchesByElement.has(r,t);n&&!i?this.selectorMatched(t,r):!n&&i&&this.selectorUnmatched(t,r)}}},{key:"selectorMatched",value:function(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}},{key:"selectorUnmatched",value:function(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}}]),t}(),N=function(){function t(e,r){var n=this;(0,a._)(this,t),this.element=e,this.delegate=r,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(function(t){return n.processMutations(t)})}return(0,o._)(t,[{key:"start",value:function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}},{key:"stop",value:function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}},{key:"refresh",value:function(){var t=!0,e=!1,r=void 0;if(this.started)try{for(var n,i=this.knownAttributeNames[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var a=n.value;this.refreshAttribute(a,null)}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"processMutations",value:function(t){var e=!0,r=!1,n=void 0;if(this.started)try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0){var o=i.value;this.processMutation(o)}}catch(t){r=!0,n=t}finally{try{e||null==a.return||a.return()}finally{if(r)throw n}}}},{key:"processMutation",value:function(t){var e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}},{key:"refreshAttribute",value:function(t,e){var r=this.delegate.getStringMapKeyForAttribute(t);if(null!=r){this.stringMap.has(t)||this.stringMapKeyAdded(r,t);var n=this.element.getAttribute(t);if(this.stringMap.get(t)!=n&&this.stringMapValueChanged(n,r,e),null==n){var i=this.stringMap.get(t);this.stringMap.delete(t),i&&this.stringMapKeyRemoved(r,t,i)}else this.stringMap.set(t,n)}}},{key:"stringMapKeyAdded",value:function(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}},{key:"stringMapValueChanged",value:function(t,e,r){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,r)}},{key:"stringMapKeyRemoved",value:function(t,e,r){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,r)}},{key:"knownAttributeNames",get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}},{key:"currentAttributeNames",get:function(){return Array.from(this.element.attributes).map(function(t){return t.name})}},{key:"recordedAttributeNames",get:function(){return Array.from(this.stringMap.keys())}}]),t}(),V=function(){function t(e,r,n){(0,a._)(this,t),this.attributeObserver=new C(e,r,this),this.delegate=n,this.tokensByElement=new L}return(0,o._)(t,[{key:"started",get:function(){return this.attributeObserver.started}},{key:"start",value:function(){this.attributeObserver.start()}},{key:"pause",value:function(t){this.attributeObserver.pause(t)}},{key:"stop",value:function(){this.attributeObserver.stop()}},{key:"refresh",value:function(){this.attributeObserver.refresh()}},{key:"element",get:function(){return this.attributeObserver.element}},{key:"attributeName",get:function(){return this.attributeObserver.attributeName}},{key:"elementMatchedAttribute",value:function(t){this.tokensMatched(this.readTokensForElement(t))}},{key:"elementAttributeValueChanged",value:function(t){var e=(0,h._)(this.refreshTokensForElement(t),2),r=e[0],n=e[1];this.tokensUnmatched(r),this.tokensMatched(n)}},{key:"elementUnmatchedAttribute",value:function(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}},{key:"tokensMatched",value:function(t){var e=this;t.forEach(function(t){return e.tokenMatched(t)})}},{key:"tokensUnmatched",value:function(t){var e=this;t.forEach(function(t){return e.tokenUnmatched(t)})}},{key:"tokenMatched",value:function(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}},{key:"tokenUnmatched",value:function(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}},{key:"refreshTokensForElement",value:function(t){var e=this.tokensByElement.getValuesForKey(t),r=this.readTokensForElement(t),n=Array.from({length:Math.max(e.length,r.length)},function(t,n){return[e[n],r[n]]}).findIndex(function(t){var e,r,n=(0,h._)(t,2);return e=n[0],r=n[1],!e||!r||e.index!=r.index||e.content!=r.content});return -1==n?[[],[]]:[e.slice(n),r.slice(n)]}},{key:"readTokensForElement",value:function(t){var e=this.attributeName;return(t.getAttribute(e)||"").trim().split(/\s+/).filter(function(t){return t.length}).map(function(r,n){return{element:t,attributeName:e,content:r,index:n}})}}]),t}(),z=function(){function t(e,r,n){(0,a._)(this,t),this.tokenListObserver=new V(e,r,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return(0,o._)(t,[{key:"started",get:function(){return this.tokenListObserver.started}},{key:"start",value:function(){this.tokenListObserver.start()}},{key:"stop",value:function(){this.tokenListObserver.stop()}},{key:"refresh",value:function(){this.tokenListObserver.refresh()}},{key:"element",get:function(){return this.tokenListObserver.element}},{key:"attributeName",get:function(){return this.tokenListObserver.attributeName}},{key:"tokenMatched",value:function(t){var e=t.element,r=this.fetchParseResultForToken(t).value;r&&(this.fetchValuesByTokenForElement(e).set(t,r),this.delegate.elementMatchedValue(e,r))}},{key:"tokenUnmatched",value:function(t){var e=t.element,r=this.fetchParseResultForToken(t).value;r&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,r))}},{key:"fetchParseResultForToken",value:function(t){var e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}},{key:"fetchValuesByTokenForElement",value:function(t){var e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}},{key:"parseToken",value:function(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(t){return{error:t}}}}]),t}(),W=function(){function t(e,r){(0,a._)(this,t),this.context=e,this.delegate=r,this.bindingsByAction=new Map}return(0,o._)(t,[{key:"start",value:function(){this.valueListObserver||(this.valueListObserver=new z(this.element,this.actionAttribute,this),this.valueListObserver.start())}},{key:"stop",value:function(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}},{key:"element",get:function(){return this.context.element}},{key:"identifier",get:function(){return this.context.identifier}},{key:"actionAttribute",get:function(){return this.schema.actionAttribute}},{key:"schema",get:function(){return this.context.schema}},{key:"bindings",get:function(){return Array.from(this.bindingsByAction.values())}},{key:"connectAction",value:function(t){var e=new P(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}},{key:"disconnectAction",value:function(t){var e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}},{key:"disconnectAllActions",value:function(){var t=this;this.bindings.forEach(function(e){return t.delegate.bindingDisconnected(e,!0)}),this.bindingsByAction.clear()}},{key:"parseValueForToken",value:function(t){var e=O.forToken(t,this.schema);if(e.identifier==this.identifier)return e}},{key:"elementMatchedValue",value:function(t,e){this.connectAction(e)}},{key:"elementUnmatchedValue",value:function(t,e){this.disconnectAction(e)}}]),t}(),H=function(){function t(e,r){(0,a._)(this,t),this.context=e,this.receiver=r,this.stringMapObserver=new N(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}return(0,o._)(t,[{key:"start",value:function(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}},{key:"stop",value:function(){this.stringMapObserver.stop()}},{key:"element",get:function(){return this.context.element}},{key:"controller",get:function(){return this.context.controller}},{key:"getStringMapKeyForAttribute",value:function(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}},{key:"stringMapKeyAdded",value:function(t,e){var r=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,r.writer(this.receiver[t]),r.writer(r.defaultValue))}},{key:"stringMapValueChanged",value:function(t,e,r){var n=this.valueDescriptorNameMap[e];null!==t&&(null===r&&(r=n.writer(n.defaultValue)),this.invokeChangedCallback(e,t,r))}},{key:"stringMapKeyRemoved",value:function(t,e,r){var n=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,n.writer(this.receiver[t]),r):this.invokeChangedCallback(t,n.writer(n.defaultValue),r)}},{key:"invokeChangedCallbacksForDefaultValues",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.valueDescriptors[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var a=n.value,o=a.key,s=a.name,l=a.defaultValue,u=a.writer;void 0==l||this.controller.data.has(o)||this.invokeChangedCallback(s,u(l),void 0)}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"invokeChangedCallback",value:function(t,e,r){var n=this.receiver["".concat(t,"Changed")];if("function"==typeof n){var i=this.valueDescriptorNameMap[t];try{var a=i.reader(e),o=r;r&&(o=i.reader(r)),n.call(this.receiver,a,o)}catch(t){throw t instanceof TypeError&&(t.message='Stimulus Value "'.concat(this.context.identifier,".").concat(i.name,'" - ').concat(t.message)),t}}}},{key:"valueDescriptors",get:function(){var t=this.valueDescriptorMap;return Object.keys(t).map(function(e){return t[e]})}},{key:"valueDescriptorNameMap",get:function(){var t=this,e={};return Object.keys(this.valueDescriptorMap).forEach(function(r){var n=t.valueDescriptorMap[r];e[n.name]=n}),e}},{key:"hasValue",value:function(t){var e=this.valueDescriptorNameMap[t],r="has".concat(k(e.name));return this.receiver[r]}}]),t}(),U=function(){function t(e,r){(0,a._)(this,t),this.context=e,this.delegate=r,this.targetsByName=new L}return(0,o._)(t,[{key:"start",value:function(){this.tokenListObserver||(this.tokenListObserver=new V(this.element,this.attributeName,this),this.tokenListObserver.start())}},{key:"stop",value:function(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}},{key:"tokenMatched",value:function(t){var e=t.element,r=t.content;this.scope.containsElement(e)&&this.connectTarget(e,r)}},{key:"tokenUnmatched",value:function(t){var e=t.element,r=t.content;this.disconnectTarget(e,r)}},{key:"connectTarget",value:function(t,e){var r,n=this;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(r=this.tokenListObserver)||void 0===r||r.pause(function(){return n.delegate.targetConnected(t,e)}))}},{key:"disconnectTarget",value:function(t,e){var r,n=this;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(r=this.tokenListObserver)||void 0===r||r.pause(function(){return n.delegate.targetDisconnected(t,e)}))}},{key:"disconnectAllTargets",value:function(){var t=!0,e=!1,r=void 0,n=!0,i=!1,a=void 0;try{for(var o,s=this.targetsByName.keys[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;try{for(var u,c=this.targetsByName.getValuesForKey(l)[Symbol.iterator]();!(t=(u=c.next()).done);t=!0){var h=u.value;this.disconnectTarget(h,l)}}catch(t){e=!0,r=t}finally{try{t||null==c.return||c.return()}finally{if(e)throw r}}}}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}}},{key:"attributeName",get:function(){return"data-".concat(this.context.identifier,"-target")}},{key:"element",get:function(){return this.context.element}},{key:"scope",get:function(){return this.context.scope}}]),t}();function K(t,e){return Array.from(Y(t).reduce(function(t,r){var n;return(Array.isArray(n=r[e])?n:[]).forEach(function(e){return t.add(e)}),t},new Set))}function Y(t){for(var e=[];t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}var X=function(){function t(e,r){(0,a._)(this,t),this.started=!1,this.context=e,this.delegate=r,this.outletsByName=new L,this.outletElementsByName=new L,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}return(0,o._)(t,[{key:"start",value:function(){var t=this;this.started||(this.outletDefinitions.forEach(function(e){t.setupSelectorObserverForOutlet(e),t.setupAttributeObserverForOutlet(e)}),this.started=!0,this.dependentContexts.forEach(function(t){return t.refresh()}))}},{key:"refresh",value:function(){this.selectorObserverMap.forEach(function(t){return t.refresh()}),this.attributeObserverMap.forEach(function(t){return t.refresh()})}},{key:"stop",value:function(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}},{key:"stopSelectorObservers",value:function(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(function(t){return t.stop()}),this.selectorObserverMap.clear())}},{key:"stopAttributeObservers",value:function(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(function(t){return t.stop()}),this.attributeObserverMap.clear())}},{key:"selectorMatched",value:function(t,e,r){var n=r.outletName,i=this.getOutlet(t,n);i&&this.connectOutlet(i,t,n)}},{key:"selectorUnmatched",value:function(t,e,r){var n=r.outletName,i=this.getOutletFromMap(t,n);i&&this.disconnectOutlet(i,t,n)}},{key:"selectorMatchElement",value:function(t,e){var r=e.outletName,n=this.selector(r),i=this.hasOutlet(t,r),a=t.matches("[".concat(this.schema.controllerAttribute,"~=").concat(r,"]"));return!!n&&i&&a&&t.matches(n)}},{key:"elementMatchedAttribute",value:function(t,e){var r=this.getOutletNameFromOutletAttributeName(e);r&&this.updateSelectorObserverForOutlet(r)}},{key:"elementAttributeValueChanged",value:function(t,e){var r=this.getOutletNameFromOutletAttributeName(e);r&&this.updateSelectorObserverForOutlet(r)}},{key:"elementUnmatchedAttribute",value:function(t,e){var r=this.getOutletNameFromOutletAttributeName(e);r&&this.updateSelectorObserverForOutlet(r)}},{key:"connectOutlet",value:function(t,e,r){var n,i=this;this.outletElementsByName.has(r,e)||(this.outletsByName.add(r,t),this.outletElementsByName.add(r,e),null===(n=this.selectorObserverMap.get(r))||void 0===n||n.pause(function(){return i.delegate.outletConnected(t,e,r)}))}},{key:"disconnectOutlet",value:function(t,e,r){var n,i=this;this.outletElementsByName.has(r,e)&&(this.outletsByName.delete(r,t),this.outletElementsByName.delete(r,e),null===(n=this.selectorObserverMap.get(r))||void 0===n||n.pause(function(){return i.delegate.outletDisconnected(t,e,r)}))}},{key:"disconnectAllOutlets",value:function(){var t=!0,e=!1,r=void 0;try{for(var n,i=this.outletElementsByName.keys[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var a=n.value,o=!0,s=!1,l=void 0,u=!0,c=!1,h=void 0;try{for(var f,d=this.outletElementsByName.getValuesForKey(a)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;try{for(var v,g=this.outletsByName.getValuesForKey(a)[Symbol.iterator]();!(o=(v=g.next()).done);o=!0){var y=v.value;this.disconnectOutlet(y,p,a)}}catch(t){s=!0,l=t}finally{try{o||null==g.return||g.return()}finally{if(s)throw l}}}}catch(t){c=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(c)throw h}}}}catch(t){e=!0,r=t}finally{try{t||null==i.return||i.return()}finally{if(e)throw r}}}},{key:"updateSelectorObserverForOutlet",value:function(t){var e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}},{key:"setupSelectorObserverForOutlet",value:function(t){var e=this.selector(t),r=new B(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,r),r.start()}},{key:"setupAttributeObserverForOutlet",value:function(t){var e=this.attributeNameForOutletName(t),r=new C(this.scope.element,e,this);this.attributeObserverMap.set(t,r),r.start()}},{key:"selector",value:function(t){return this.scope.outlets.getSelectorForOutletName(t)}},{key:"attributeNameForOutletName",value:function(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}},{key:"getOutletNameFromOutletAttributeName",value:function(t){var e=this;return this.outletDefinitions.find(function(r){return e.attributeNameForOutletName(r)===t})}},{key:"outletDependencies",get:function(){var t=new L;return this.router.modules.forEach(function(e){K(e.definition.controllerConstructor,"outlets").forEach(function(r){return t.add(r,e.identifier)})}),t}},{key:"outletDefinitions",get:function(){return this.outletDependencies.getKeysForValue(this.identifier)}},{key:"dependentControllerIdentifiers",get:function(){return this.outletDependencies.getValuesForKey(this.identifier)}},{key:"dependentContexts",get:function(){var t=this.dependentControllerIdentifiers;return this.router.contexts.filter(function(e){return t.includes(e.identifier)})}},{key:"hasOutlet",value:function(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}},{key:"getOutlet",value:function(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}},{key:"getOutletFromMap",value:function(t,e){return this.outletsByName.getValuesForKey(e).find(function(e){return e.element===t})}},{key:"scope",get:function(){return this.context.scope}},{key:"schema",get:function(){return this.context.schema}},{key:"identifier",get:function(){return this.context.identifier}},{key:"application",get:function(){return this.context.application}},{key:"router",get:function(){return this.application.router}}]),t}(),$=function(){function t(e,r){var n=this;(0,a._)(this,t),this.logDebugActivity=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({identifier:n.identifier,controller:n.controller,element:n.element},e),n.application.logDebugActivity(n.identifier,t,e)},this.module=e,this.scope=r,this.controller=new e.controllerConstructor(this),this.bindingObserver=new W(this,this.dispatcher),this.valueObserver=new H(this,this.controller),this.targetObserver=new U(this,this),this.outletObserver=new X(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(t){this.handleError(t,"initializing controller")}}return(0,o._)(t,[{key:"connect",value:function(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}},{key:"refresh",value:function(){this.outletObserver.refresh()}},{key:"disconnect",value:function(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}},{key:"application",get:function(){return this.module.application}},{key:"identifier",get:function(){return this.module.identifier}},{key:"schema",get:function(){return this.application.schema}},{key:"dispatcher",get:function(){return this.application.dispatcher}},{key:"element",get:function(){return this.scope.element}},{key:"parentElement",get:function(){return this.element.parentElement}},{key:"handleError",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign({identifier:this.identifier,controller:this.controller,element:this.element},r),this.application.handleError(t,"Error ".concat(e),r)}},{key:"targetConnected",value:function(t,e){this.invokeControllerMethod("".concat(e,"TargetConnected"),t)}},{key:"targetDisconnected",value:function(t,e){this.invokeControllerMethod("".concat(e,"TargetDisconnected"),t)}},{key:"outletConnected",value:function(t,e,r){this.invokeControllerMethod("".concat(x(r),"OutletConnected"),t,e)}},{key:"outletDisconnected",value:function(t,e,r){this.invokeControllerMethod("".concat(x(r),"OutletDisconnected"),t,e)}},{key:"invokeControllerMethod",value:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=this.controller;"function"==typeof i[t]&&i[t].apply(i,(0,f._)(r))}}]),t}(),q="function"==typeof Object.getOwnPropertySymbols?function(t){return(0,f._)(Object.getOwnPropertyNames(t)).concat((0,f._)(Object.getOwnPropertySymbols(t)))}:Object.getOwnPropertyNames,G=function(){function t(t){function e(){return Reflect.construct(t,arguments,this instanceof e?this.constructor:void 0)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{var e;return(e=t(function(){this.a.call(this)})).prototype.a=function(){},new e,t}catch(t){return function(t){return function(t){(0,c._)(r,t);var e=(0,p._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return r}(t)}}}(),Q=function(){function t(e,r){var n,i,o,l,u,c;(0,a._)(this,t),this.application=e,this.definition={identifier:r.identifier,controllerConstructor:(i=n=r.controllerConstructor,o=K(n,"blessings").reduce(function(t,e){var r=e(n);for(var i in r){var a=t[i]||{};t[i]=Object.assign(a,r[i])}return t},{}),u=G(i),l=i.prototype,c=q(o).reduce(function(t,e){var r=function(t,e,r){var n=Object.getOwnPropertyDescriptor(t,r);if(!(n&&"value"in n)){var i=Object.getOwnPropertyDescriptor(e,r).value;return n&&(i.get=n.get||i.get,i.set=n.set||i.set),i}}(l,o,e);return r&&Object.assign(t,(0,s._)({},e,r)),t},{}),Object.defineProperties(u.prototype,c),u)},this.contextsByScope=new WeakMap,this.connectedContexts=new Set}return(0,o._)(t,[{key:"identifier",get:function(){return this.definition.identifier}},{key:"controllerConstructor",get:function(){return this.definition.controllerConstructor}},{key:"contexts",get:function(){return Array.from(this.connectedContexts)}},{key:"connectContextForScope",value:function(t){var e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}},{key:"disconnectContextForScope",value:function(t){var e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}},{key:"fetchContextForScope",value:function(t){var e=this.contextsByScope.get(t);return e||(e=new $(this,t),this.contextsByScope.set(t,e)),e}}]),t}(),J=function(){function t(e){(0,a._)(this,t),this.scope=e}return(0,o._)(t,[{key:"has",value:function(t){return this.data.has(this.getDataKey(t))}},{key:"get",value:function(t){return this.getAll(t)[0]}},{key:"getAll",value:function(t){return(this.data.get(this.getDataKey(t))||"").match(/[^\s]+/g)||[]}},{key:"getAttributeName",value:function(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}},{key:"getDataKey",value:function(t){return"".concat(t,"-class")}},{key:"data",get:function(){return this.scope.data}}]),t}(),Z=function(){function t(e){(0,a._)(this,t),this.scope=e}return(0,o._)(t,[{key:"element",get:function(){return this.scope.element}},{key:"identifier",get:function(){return this.scope.identifier}},{key:"get",value:function(t){var e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}},{key:"set",value:function(t,e){var r=this.getAttributeNameForKey(t);return this.element.setAttribute(r,e),this.get(t)}},{key:"has",value:function(t){var e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}},{key:"delete",value:function(t){if(!this.has(t))return!1;var e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}},{key:"getAttributeNameForKey",value:function(t){return"data-".concat(this.identifier,"-").concat(w(t))}}]),t}(),tt=function(){function t(e){(0,a._)(this,t),this.warnedKeysByObject=new WeakMap,this.logger=e}return(0,o._)(t,[{key:"warn",value:function(t,e,r){var n=this.warnedKeysByObject.get(t);n||(n=new Set,this.warnedKeysByObject.set(t,n)),n.has(e)||(n.add(e),this.logger.warn(r,t))}}]),t}();function te(t,e){return"[".concat(t,'~="').concat(e,'"]')}var tr=function(){function t(e){(0,a._)(this,t),this.scope=e}return(0,o._)(t,[{key:"element",get:function(){return this.scope.element}},{key:"identifier",get:function(){return this.scope.identifier}},{key:"schema",get:function(){return this.scope.schema}},{key:"has",value:function(t){return null!=this.find(t)}},{key:"find",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(e,r){return e||t.findTarget(r)||t.findLegacyTarget(r)},void 0)}},{key:"findAll",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(e,r){return(0,f._)(e).concat((0,f._)(t.findAllTargets(r)),(0,f._)(t.findAllLegacyTargets(r)))},[])}},{key:"findTarget",value:function(t){var e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}},{key:"findAllTargets",value:function(t){var e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}},{key:"getSelectorForTargetName",value:function(t){return te(this.schema.targetAttributeForScope(this.identifier),t)}},{key:"findLegacyTarget",value:function(t){var e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}},{key:"findAllLegacyTargets",value:function(t){var e=this,r=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(r).map(function(r){return e.deprecate(r,t)})}},{key:"getLegacySelectorForTargetName",value:function(t){var e="".concat(this.identifier,".").concat(t);return te(this.schema.targetAttribute,e)}},{key:"deprecate",value:function(t,e){if(t){var r=this.identifier,n=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(r);this.guide.warn(t,"target:".concat(e),"Please replace ".concat(n,'="').concat(r,".").concat(e,'" with ').concat(i,'="').concat(e,'". ')+"The ".concat(n," attribute is deprecated and will be removed in a future version of Stimulus."))}return t}},{key:"guide",get:function(){return this.scope.guide}}]),t}(),tn=function(){function t(e,r){(0,a._)(this,t),this.scope=e,this.controllerElement=r}return(0,o._)(t,[{key:"element",get:function(){return this.scope.element}},{key:"identifier",get:function(){return this.scope.identifier}},{key:"schema",get:function(){return this.scope.schema}},{key:"has",value:function(t){return null!=this.find(t)}},{key:"find",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(e,r){return e||t.findOutlet(r)},void 0)}},{key:"findAll",value:function(){for(var t=this,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(e,r){return(0,f._)(e).concat((0,f._)(t.findAllOutlets(r)))},[])}},{key:"getSelectorForOutletName",value:function(t){var e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}},{key:"findOutlet",value:function(t){var e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}},{key:"findAllOutlets",value:function(t){var e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}},{key:"findElement",value:function(t,e){var r=this;return this.scope.queryElements(t).filter(function(n){return r.matchesElement(n,t,e)})[0]}},{key:"findAllElements",value:function(t,e){var r=this;return this.scope.queryElements(t).filter(function(n){return r.matchesElement(n,t,e)})}},{key:"matchesElement",value:function(t,e,r){var n=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&n.split(" ").includes(r)}}]),t}(),ti=function(){function t(e,r,n,i){var o=this;(0,a._)(this,t),this.targets=new tr(this),this.classes=new J(this),this.data=new Z(this),this.containsElement=function(t){return t.closest(o.controllerSelector)===o.element},this.schema=e,this.element=r,this.identifier=n,this.guide=new tt(i),this.outlets=new tn(this.documentScope,r)}return(0,o._)(t,[{key:"findElement",value:function(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}},{key:"findAllElements",value:function(t){return(0,f._)(this.element.matches(t)?[this.element]:[]).concat((0,f._)(this.queryElements(t).filter(this.containsElement)))}},{key:"queryElements",value:function(t){return Array.from(this.element.querySelectorAll(t))}},{key:"controllerSelector",get:function(){return te(this.schema.controllerAttribute,this.identifier)}},{key:"isDocumentScope",get:function(){return this.element===document.documentElement}},{key:"documentScope",get:function(){return this.isDocumentScope?this:new t(this.schema,document.documentElement,this.identifier,this.guide.logger)}}]),t}(),ta=function(){function t(e,r,n){(0,a._)(this,t),this.element=e,this.schema=r,this.delegate=n,this.valueListObserver=new z(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}return(0,o._)(t,[{key:"start",value:function(){this.valueListObserver.start()}},{key:"stop",value:function(){this.valueListObserver.stop()}},{key:"controllerAttribute",get:function(){return this.schema.controllerAttribute}},{key:"parseValueForToken",value:function(t){var e=t.element,r=t.content;return this.parseValueForElementAndIdentifier(e,r)}},{key:"parseValueForElementAndIdentifier",value:function(t,e){var r=this.fetchScopesByIdentifierForElement(t),n=r.get(e);return n||(n=this.delegate.createScopeForElementAndIdentifier(t,e),r.set(e,n)),n}},{key:"elementMatchedValue",value:function(t,e){var r=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,r),1==r&&this.delegate.scopeConnected(e)}},{key:"elementUnmatchedValue",value:function(t,e){var r=this.scopeReferenceCounts.get(e);r&&(this.scopeReferenceCounts.set(e,r-1),1==r&&this.delegate.scopeDisconnected(e))}},{key:"fetchScopesByIdentifierForElement",value:function(t){var e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}]),t}(),to=function(){function t(e){(0,a._)(this,t),this.application=e,this.scopeObserver=new ta(this.element,this.schema,this),this.scopesByIdentifier=new L,this.modulesByIdentifier=new Map}return(0,o._)(t,[{key:"element",get:function(){return this.application.element}},{key:"schema",get:function(){return this.application.schema}},{key:"logger",get:function(){return this.application.logger}},{key:"controllerAttribute",get:function(){return this.schema.controllerAttribute}},{key:"modules",get:function(){return Array.from(this.modulesByIdentifier.values())}},{key:"contexts",get:function(){return this.modules.reduce(function(t,e){return t.concat(e.contexts)},[])}},{key:"start",value:function(){this.scopeObserver.start()}},{key:"stop",value:function(){this.scopeObserver.stop()}},{key:"loadDefinition",value:function(t){this.unloadIdentifier(t.identifier);var e=new Q(this.application,t);this.connectModule(e);var r=t.controllerConstructor.afterLoad;r&&r.call(t.controllerConstructor,t.identifier,this.application)}},{key:"unloadIdentifier",value:function(t){var e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}},{key:"getContextForElementAndIdentifier",value:function(t,e){var r=this.modulesByIdentifier.get(e);if(r)return r.contexts.find(function(e){return e.element==t})}},{key:"proposeToConnectScopeForElementAndIdentifier",value:function(t,e){var r=this.scopeObserver.parseValueForElementAndIdentifier(t,e);r?this.scopeObserver.elementMatchedValue(r.element,r):console.error("Couldn't find or create scope for identifier: \"".concat(e,'" and element:'),t)}},{key:"handleError",value:function(t,e,r){this.application.handleError(t,e,r)}},{key:"createScopeForElementAndIdentifier",value:function(t,e){return new ti(this.schema,t,e,this.logger)}},{key:"scopeConnected",value:function(t){this.scopesByIdentifier.add(t.identifier,t);var e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}},{key:"scopeDisconnected",value:function(t){this.scopesByIdentifier.delete(t.identifier,t);var e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}},{key:"connectModule",value:function(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(function(e){return t.connectContextForScope(e)})}},{key:"disconnectModule",value:function(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(function(e){return t.disconnectContextForScope(e)})}}]),t}(),ts={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:function(t){return"data-".concat(t,"-target")},outletAttributeForScope:function(t,e){return"data-".concat(t,"-").concat(e,"-outlet")},keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},tl("abcdefghijklmnopqrstuvwxyz".split("").map(function(t){return[t,t]}))),tl("0123456789".split("").map(function(t){return[t,t]})))};function tl(t){return t.reduce(function(t,e){var r=(0,h._)(e,2),n=r[0],i=r[1];return Object.assign(Object.assign({},t),(0,s._)({},n,i))},{})}var tu=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ts,n=this;(0,a._)(this,t),this.logger=console,this.debug=!1,this.logDebugActivity=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.debug&&n.logFormattedMessage(t,e,r)},this.element=e,this.schema=r,this.dispatcher=new y(this),this.router=new to(this),this.actionDescriptorFilters=Object.assign({},m)}return(0,o._)(t,[{key:"start",value:function(){var t=this;return(0,i._)(function(){return(0,v._)(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",function(){return t()}):t()})];case 1:return e.sent(),t.logDebugActivity("application","starting"),t.dispatcher.start(),t.router.start(),t.logDebugActivity("application","start"),[2]}})})()}},{key:"stop",value:function(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}},{key:"register",value:function(t,e){this.load({identifier:t,controllerConstructor:e})}},{key:"registerActionOption",value:function(t,e){this.actionDescriptorFilters[t]=e}},{key:"load",value:function(t){for(var e=this,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(Array.isArray(t)?t:[t].concat((0,f._)(n))).forEach(function(t){t.controllerConstructor.shouldLoad&&e.router.loadDefinition(t)})}},{key:"unload",value:function(t){for(var e=this,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(Array.isArray(t)?t:[t].concat((0,f._)(n))).forEach(function(t){return e.router.unloadIdentifier(t)})}},{key:"controllers",get:function(){return this.router.contexts.map(function(t){return t.controller})}},{key:"getControllerForElementAndIdentifier",value:function(t,e){var r=this.router.getContextForElementAndIdentifier(t,e);return r?r.controller:null}},{key:"handleError",value:function(t,e,r){var n;this.logger.error("%s\n\n%o\n\n%o",e,t,r),null===(n=window.onerror)||void 0===n||n.call(window,e,"",0,0,t)}},{key:"logFormattedMessage",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign({application:this},r),this.logger.groupCollapsed("".concat(t," #").concat(e)),this.logger.log("details:",Object.assign({},r)),this.logger.groupEnd()}}],[{key:"start",value:function(t,e){var r=new this(t,e);return r.start(),r}}]),t}();function tc(t,e,r){return t.application.getControllerForElementAndIdentifier(e,r)}function th(t,e,r){var n=tc(t,e,r);return n||((t.application.router.proposeToConnectScopeForElementAndIdentifier(e,r),n=tc(t,e,r))?n:void 0)}function tf(t,e){var r,n,i,a,o,s=(0,h._)(t,2);return n=(r={controller:e,token:s[0],typeDefinition:s[1]}).token,i=r.typeDefinition,a="".concat(w(n),"-value"),{type:o=function(t){var e=t.controller,r=t.token,n=t.typeDefinition,i=function(t){var e=t.controller,r=t.token,n=t.typeObject,i=null!=n.type,a=null!=n.default,o=td(n.type),s=tp(t.typeObject.default);if(i&&!a)return o;if(!i&&a)return s;if(o!==s){var l=e?"".concat(e,".").concat(r):r;throw Error('The specified default value for the Stimulus Value "'.concat(l,'" must match the defined type "').concat(o,'". The provided default value of "').concat(n.default,'" is of type "').concat(s,'".'))}if(i&&a)return o}({controller:e,token:r,typeObject:n}),a=tp(n),o=td(n),s=i||a||o;if(s)return s;var l=e?"".concat(e,".").concat(n):r;throw Error('Unknown value type "'.concat(l,'" for "').concat(r,'" value'))}(r),key:a,name:_(a),get defaultValue(){return function(t){var e=td(t);if(e)return tv[e];var r=M(t,"default"),n=M(t,"type");if(r)return t.default;if(n){var i=td(t.type);if(i)return tv[i]}return t}(i)},get hasCustomDefaultValue(){return void 0!==tp(i)},reader:tg[o],writer:ty[o]||ty.default}}function td(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function tp(t){switch(void 0===t?"undefined":(0,d._)(t)){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}var tv={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},tg={array:function(t){var e=JSON.parse(t);if(!Array.isArray(e))throw TypeError('expected value of type "array" but instead got value "'.concat(t,'" of type "').concat(tp(e),'"'));return e},boolean:function(t){return!("0"==t||"false"==String(t).toLowerCase())},number:function(t){return Number(t.replace(/_/g,""))},object:function(t){var e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw TypeError('expected value of type "object" but instead got value "'.concat(t,'" of type "').concat(tp(e),'"'));return e},string:function(t){return t}},ty={default:function(t){return"".concat(t)},array:tm,object:tm};function tm(t){return JSON.stringify(t)}var tb=function(){function t(e){(0,a._)(this,t),this.context=e}return(0,o._)(t,[{key:"application",get:function(){return this.context.application}},{key:"scope",get:function(){return this.context.scope}},{key:"element",get:function(){return this.scope.element}},{key:"identifier",get:function(){return this.scope.identifier}},{key:"targets",get:function(){return this.scope.targets}},{key:"outlets",get:function(){return this.scope.outlets}},{key:"classes",get:function(){return this.scope.classes}},{key:"data",get:function(){return this.scope.data}},{key:"initialize",value:function(){}},{key:"connect",value:function(){}},{key:"disconnect",value:function(){}},{key:"dispatch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.target,n=void 0===r?this.element:r,i=e.detail,a=e.prefix,o=void 0===a?this.identifier:a,s=e.bubbles,l=e.cancelable,u=new CustomEvent(o?"".concat(o,":").concat(t):t,{detail:void 0===i?{}:i,bubbles:void 0===s||s,cancelable:void 0===l||l});return n.dispatchEvent(u),u}}],[{key:"shouldLoad",get:function(){return!0}},{key:"afterLoad",value:function(t,e){}}]),t}();tb.blessings=[function(t){return K(t,"classes").reduce(function(t,e){var r;return Object.assign(t,(r={},(0,s._)(r,"".concat(e,"Class"),{get:function(){var t=this.classes;if(t.has(e))return t.get(e);var r=t.getAttributeName(e);throw Error('Missing attribute "'.concat(r,'"'))}}),(0,s._)(r,"".concat(e,"Classes"),{get:function(){return this.classes.getAll(e)}}),(0,s._)(r,"has".concat(k(e),"Class"),{get:function(){return this.classes.has(e)}}),r))},{})},function(t){return K(t,"targets").reduce(function(t,e){var r;return Object.assign(t,(r={},(0,s._)(r,"".concat(e,"Target"),{get:function(){var t=this.targets.find(e);if(t)return t;throw Error('Missing target element "'.concat(e,'" for "').concat(this.identifier,'" controller'))}}),(0,s._)(r,"".concat(e,"Targets"),{get:function(){return this.targets.findAll(e)}}),(0,s._)(r,"has".concat(k(e),"Target"),{get:function(){return this.targets.has(e)}}),r))},{})},function(t){var e,r=(e="values",Y(t).reduce(function(t,r){var n;return t.push.apply(t,(0,f._)((n=r[e])?Object.keys(n).map(function(t){return[t,n[t]]}):[])),t},[]));return r.reduce(function(t,e){var r,n,i,a,o,l;return Object.assign(t,(i=(n=tf(e,void 0)).key,a=n.name,o=n.reader,l=n.writer,r={},(0,s._)(r,a,{get:function(){var t=this.data.get(i);return null!==t?o(t):n.defaultValue},set:function(t){void 0===t?this.data.delete(i):this.data.set(i,l(t))}}),(0,s._)(r,"has".concat(k(a)),{get:function(){return this.data.has(i)||n.hasCustomDefaultValue}}),r))},{valueDescriptorMap:{get:function(){var t=this;return r.reduce(function(e,r){var n=tf(r,t.identifier),i=t.data.getAttributeNameForKey(n.key);return Object.assign(e,(0,s._)({},i,n))},{})}}})},function(t){return K(t,"outlets").reduce(function(t,e){var r,n;return Object.assign(t,(n=x(e),r={},(0,s._)(r,"".concat(n,"Outlet"),{get:function(){var t=this.outlets.find(e),r=this.outlets.getSelectorForOutletName(e);if(t){var n=th(this,t,e);if(n)return n;throw Error('The provided outlet element is missing an outlet controller "'.concat(e,'" instance for host controller "').concat(this.identifier,'"'))}throw Error('Missing outlet element "'.concat(e,'" for host controller "').concat(this.identifier,'". Stimulus couldn\'t find a matching outlet element using selector "').concat(r,'".'))}}),(0,s._)(r,"".concat(n,"Outlets"),{get:function(){var t=this,r=this.outlets.findAll(e);return r.length>0?r.map(function(r){var n=th(t,r,e);if(n)return n;console.warn('The provided outlet element is missing an outlet controller "'.concat(e,'" instance for host controller "').concat(t.identifier,'"'),r)}).filter(function(t){return t}):[]}}),(0,s._)(r,"".concat(n,"OutletElement"),{get:function(){var t=this.outlets.find(e),r=this.outlets.getSelectorForOutletName(e);if(t)return t;throw Error('Missing outlet element "'.concat(e,'" for host controller "').concat(this.identifier,'". Stimulus couldn\'t find a matching outlet element using selector "').concat(r,'".'))}}),(0,s._)(r,"".concat(n,"OutletElements"),{get:function(){return this.outlets.findAll(e)}}),(0,s._)(r,"has".concat(k(n),"Outlet"),{get:function(){return this.outlets.has(e)}}),r))},{})}],tb.targets=[],tb.outlets=[],tb.values={}},{"@swc/helpers/_/_async_to_generator":"6Tpxj","@swc/helpers/_/_class_call_check":"2HOGN","@swc/helpers/_/_create_class":"8oe8p","@swc/helpers/_/_define_property":"27c3O","@swc/helpers/_/_get":"6FgjI","@swc/helpers/_/_get_prototype_of":"4Pl3E","@swc/helpers/_/_inherits":"7gHjg","@swc/helpers/_/_sliced_to_array":"hefcy","@swc/helpers/_/_to_consumable_array":"4oNkS","@swc/helpers/_/_type_of":"2bRX5","@swc/helpers/_/_create_super":"a37Ru","@swc/helpers/_/_ts_generator":"lwj56","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"6Tpxj":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e,r,n,i,a,o){try{var s=t[a](o),l=s.value}catch(t){r(t);return}s.done?e(l):Promise.resolve(l).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function s(t){i(o,n,a,s,l,"next",t)}function l(t){i(o,n,a,s,l,"throw",t)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],kPSB8:[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})}),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],"2HOGN":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"8oe8p":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t}n.defineInteropFlag(r),n.export(r,"_create_class",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"27c3O":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}n.defineInteropFlag(r),n.export(r,"_define_property",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"6FgjI":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_get",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_super_prop_base.js");function a(t,e,r){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=(0,i._super_prop_base)(t,e);if(n){var a=Object.getOwnPropertyDescriptor(n,e);return a.get?a.get.call(r||t):a.value}})(t,e,r||t)}},{"./_super_prop_base.js":"dQQ6T","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],dQQ6T:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_super_prop_base",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_get_prototype_of.js");function a(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=(0,i._get_prototype_of)(t)););return t}},{"./_get_prototype_of.js":"4Pl3E","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"4Pl3E":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.defineInteropFlag(r),n.export(r,"_get_prototype_of",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"7gHjg":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_inherits",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_set_prototype_of.js");function a(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&(0,i._set_prototype_of)(t,e)}},{"./_set_prototype_of.js":"c50KS","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],c50KS:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.defineInteropFlag(r),n.export(r,"_set_prototype_of",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],hefcy:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_sliced_to_array",function(){return l}),n.export(r,"_",function(){return l});var i=t("./_array_with_holes.js"),a=t("./_iterable_to_array_limit.js"),o=t("./_non_iterable_rest.js"),s=t("./_unsupported_iterable_to_array.js");function l(t,e){return(0,i._array_with_holes)(t)||(0,a._iterable_to_array_limit)(t,e)||(0,s._unsupported_iterable_to_array)(t,e)||(0,o._non_iterable_rest)()}},{"./_array_with_holes.js":"lJccj","./_iterable_to_array_limit.js":"9jMet","./_non_iterable_rest.js":"4Vr6L","./_unsupported_iterable_to_array.js":"eXnUq","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],lJccj:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){if(Array.isArray(t))return t}n.defineInteropFlag(r),n.export(r,"_array_with_holes",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"9jMet":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){var r,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a=[],o=!0,s=!1;try{for(i=i.call(t);!(o=(r=i.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(t){s=!0,n=t}finally{try{o||null==i.return||i.return()}finally{if(s)throw n}}return a}}n.defineInteropFlag(r),n.export(r,"_iterable_to_array_limit",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"4Vr6L":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_rest",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],eXnUq:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_unsupported_iterable_to_array",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_array_like_to_array.js");function a(t,e){if(t){if("string"==typeof t)return(0,i._array_like_to_array)(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return(0,i._array_like_to_array)(t,e)}}},{"./_array_like_to_array.js":"av2SH","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],av2SH:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}n.defineInteropFlag(r),n.export(r,"_array_like_to_array",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"4oNkS":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",function(){return l}),n.export(r,"_",function(){return l});var i=t("./_array_without_holes.js"),a=t("./_iterable_to_array.js"),o=t("./_non_iterable_spread.js"),s=t("./_unsupported_iterable_to_array.js");function l(t){return(0,i._array_without_holes)(t)||(0,a._iterable_to_array)(t)||(0,s._unsupported_iterable_to_array)(t)||(0,o._non_iterable_spread)()}},{"./_array_without_holes.js":"a6ngs","./_iterable_to_array.js":"k1xC7","./_non_iterable_spread.js":"frpxd","./_unsupported_iterable_to_array.js":"eXnUq","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],a6ngs:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_array_like_to_array.js");function a(t){if(Array.isArray(t))return(0,i._array_like_to_array)(t)}},{"./_array_like_to_array.js":"av2SH","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],k1xC7:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}n.defineInteropFlag(r),n.export(r,"_iterable_to_array",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],frpxd:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_spread",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"2bRX5":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],a37Ru:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_create_super",function(){return s}),n.export(r,"_",function(){return s});var i=t("./_get_prototype_of.js"),a=t("./_is_native_reflect_construct.js"),o=t("./_possible_constructor_return.js");function s(t){var e=(0,a._is_native_reflect_construct)();return function(){var r,n=(0,i._get_prototype_of)(t);return r=e?Reflect.construct(n,arguments,(0,i._get_prototype_of)(this).constructor):n.apply(this,arguments),(0,o._possible_constructor_return)(this,r)}}},{"./_get_prototype_of.js":"4Pl3E","./_is_native_reflect_construct.js":"cYeVo","./_possible_constructor_return.js":"6Yo1h","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],cYeVo:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}n.defineInteropFlag(r),n.export(r,"_is_native_reflect_construct",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"6Yo1h":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_possible_constructor_return",function(){return o}),n.export(r,"_",function(){return o});var i=t("./_assert_this_initialized.js"),a=t("./_type_of.js");function o(t,e){return e&&("object"===(0,a._type_of)(e)||"function"==typeof e)?e:(0,i._assert_this_initialized)(t)}},{"./_assert_this_initialized.js":"atUI0","./_type_of.js":"2bRX5","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],atUI0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.defineInteropFlag(r),n.export(r,"_assert_this_initialized",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],lwj56:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return i.__generator}),n.export(r,"_ts_generator",function(){return i.__generator});var i=t("tslib")},{tslib:"8J6gG","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"8J6gG":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return o}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return u}),n.export(r,"__param",function(){return c}),n.export(r,"__esDecorate",function(){return h}),n.export(r,"__runInitializers",function(){return f}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return p}),n.export(r,"__metadata",function(){return v}),n.export(r,"__awaiter",function(){return g}),n.export(r,"__generator",function(){return y}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return _}),n.export(r,"__read",function(){return x}),n.export(r,"__spread",function(){return k}),n.export(r,"__spreadArrays",function(){return w}),n.export(r,"__spreadArray",function(){return M}),n.export(r,"__await",function(){return S}),n.export(r,"__asyncGenerator",function(){return O}),n.export(r,"__asyncDelegator",function(){return A}),n.export(r,"__asyncValues",function(){return E}),n.export(r,"__makeTemplateObject",function(){return P}),n.export(r,"__importStar",function(){return C}),n.export(r,"__importDefault",function(){return j}),n.export(r,"__classPrivateFieldGet",function(){return T}),n.export(r,"__classPrivateFieldSet",function(){return F}),n.export(r,"__classPrivateFieldIn",function(){return I}),n.export(r,"__addDisposableResource",function(){return L}),n.export(r,"__disposeResources",function(){return B});var i=t("@swc/helpers/_/_type_of"),a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return(s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function l(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>e.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function u(t,e,r,n){var i,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,r,o):i(e,r))||o);return a>3&&o&&Object.defineProperty(e,r,o),o}function c(t,e){return function(r,n){e(r,n,t)}}function h(t,e,r,n,i,a){function o(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var s,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!e&&t?n.static?t:t.prototype:null,h=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var p={};for(var v in n)p[v]="access"===v?{}:n[v];for(var v in n.access)p.access[v]=n.access[v];p.addInitializer=function(t){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(o(t||null))};var g=(0,r[d])("accessor"===l?{get:h.get,set:h.set}:h[u],p);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(s=o(g.get))&&(h.get=s),(s=o(g.set))&&(h.set=s),(s=o(g.init))&&i.unshift(s)}else(s=o(g))&&("field"===l?i.unshift(s):h[u]=s)}c&&Object.defineProperty(c,n.name,h),f=!0}function f(t,e,r){for(var n=arguments.length>2,i=0;i<e.length;i++)r=n?e[i].call(t,r):e[i].call(t);return n?r:void 0}function d(t){return(void 0===t?"undefined":(0,i._)(t))==="symbol"?t:"".concat(t)}function p(t,e,r){return(void 0===e?"undefined":(0,i._)(e))==="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function v(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function g(t,e,r,n){return new(r||(r=Promise))(function(i,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(o,s)}l((n=n.apply(t,e||[])).next())})}function y(t,e){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(r)throw TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var m=Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]};function b(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||m(e,t,r)}function _(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function k(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(x(arguments[e]));return t}function w(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),i=0,e=0;e<r;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)n[i]=a[o];return n}function M(t,e,r){if(r||2==arguments.length)for(var n,i=0,a=e.length;i<a;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function S(t){return this instanceof S?(this.v=t,this):new S(t)}function O(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise(function(r,n){a.push([t,e,r,n])>1||s(t,e)})})}function s(t,e){try{var r;(r=i[t](e)).value instanceof S?Promise.resolve(r.value.v).then(l,u):c(a[0][2],r)}catch(t){c(a[0][3],t)}}function l(t){s("next",t)}function u(t){s("throw",t)}function c(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function A(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:S(t[n](e)),done:!1}:i?i(e):e}:i}}function E(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=_(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,i){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,i,(e=t[r](e)).done,e.value)})}}}function P(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var D=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function C(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&m(e,t,r);return D(e,t),e}function j(t){return t&&t.__esModule?t:{default:t}}function T(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function F(t,e,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(t,r):i?i.value=r:e.set(t,r),r}function I(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function L(t,e,r){if(null!=e){var n;if("object"!=typeof e&&"function"!=typeof e)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose]}if("function"!=typeof n)throw TypeError("Object not disposable.");t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var R="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var n=Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function B(t){function e(e){t.error=t.hasError?new R(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}return function r(){for(;t.stack.length;){var n=t.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(t){return e(t),r()})}catch(t){e(t)}}if(t.hasError)throw t.error}()}r.default={__extends:o,__assign:s,__rest:l,__decorate:u,__param:c,__metadata:v,__awaiter:g,__generator:y,__createBinding:m,__exportStar:b,__values:_,__read:x,__spread:k,__spreadArrays:w,__spreadArray:M,__await:S,__asyncGenerator:O,__asyncDelegator:A,__asyncValues:E,__makeTemplateObject:P,__importStar:C,__importDefault:j,__classPrivateFieldGet:T,__classPrivateFieldSet:F,__classPrivateFieldIn:I,__addDisposableResource:L,__disposeResources:B}},{"@swc/helpers/_/_type_of":"2bRX5","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],"78XDv":[function(t,e,r){var n,i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(r),i.export(r,"default",function(){return x});var a=t("@swc/helpers/_/_assert_this_initialized"),o=t("@swc/helpers/_/_class_call_check"),s=t("@swc/helpers/_/_create_class"),l=t("@swc/helpers/_/_define_property"),u=t("@swc/helpers/_/_inherits"),c=t("@swc/helpers/_/_object_spread"),h=t("@swc/helpers/_/_object_spread_props"),f=t("@swc/helpers/_/_to_consumable_array"),d=t("@swc/helpers/_/_create_super"),p=t("@hotwired/stimulus"),v=t("../chart_plugins/corsair_plugin"),g=i.interopDefault(v),y=t("chart.js"),m=t("color"),b=i.interopDefault(m),_=t("../utils/appearance");(n=y.Chart).register.apply(n,(0,f._)(y.registerables));var x=function(t){(0,u._)(r,t);var e=(0,d._)(r);function r(){var t;return(0,o._)(this,r),t=e.apply(this,arguments),(0,l._)((0,a._)(t),"metricGroups",[{metrics:["views","visitors","sessions"],format:"int"},{metrics:["clicks"],format:"int"},{metrics:["average_session_duration"],format:"time"},{metrics:["bounce_rate"],format:"percent"},{metrics:["views_per_session"],format:"float"},{metrics:["wc_orders","wc_refunds"],format:"int"},{metrics:["wc_gross_sales","wc_refunded_amount","wc_net_sales"],format:"whole_currency"},{metrics:["wc_conversion_rate"],format:"percent"},{metrics:["wc_earnings_per_visitor"],format:"currency"},{metrics:["wc_average_order_volume"],format:"whole_currency"},{metrics:["form_submissions"],prefix_to_include:"form_submissions_for_",format:"int"},{metrics:["form_conversion_rate"],prefix_to_include:"form_conversion_rate_for_",format:"percent"}]),(0,l._)((0,a._)(t),"tooltipLabel",function(e){return"function"==typeof e.dataset.tooltipLabel?e.dataset.tooltipLabel(e):e.dataset.label+": "+t.formatValueForMetric(e.dataset.id,e.raw)}),t}return(0,s._)(r,[{key:"connect",value:function(){this.isPreviewValue||(this.updateMetricSelectWidth(this.primaryMetricSelectTarget),1===this.hasMultipleDatasetsValue&&this.updateMetricSelectWidth(this.secondaryMetricSelectTarget)),this.createChart(),this.updateChart()}},{key:"disconnect",value:function(){this.chart&&(this.chart.destroy(),this.chart=null)}},{key:"getLocale",value:function(){try{return new Intl.NumberFormat(this.localeValue),this.localeValue}catch(t){return"en-US"}}},{key:"hasSecondaryMetric",value:function(){return this.hasSecondaryChartMetricIdValue&&this.secondaryChartMetricIdValue&&"no_comparison"!==this.secondaryChartMetricIdValue}},{key:"tooltipTitle",value:function(t){return JSON.parse(t[0].label).tooltipLabel}},{key:"getGroupByMetricId",value:function(t){return this.metricGroups.find(function(e){return e.metrics.includes(t)||e.prefix_to_include&&t.startsWith(e.prefix_to_include)})}},{key:"formatValueForMetric",value:function(t,e){switch(this.getGroupByMetricId(t).format){case"whole_currency":return new Intl.NumberFormat(this.localeValue,{style:"currency",currency:this.currencyValue,currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).format(e/100);case"currency":return new Intl.NumberFormat(this.localeValue,{style:"currency",currency:this.currencyValue,currencyDisplay:"narrowSymbol",minimumFractionDigits:2,maximumFractionDigits:2}).format(e/100);case"percent":return new Intl.NumberFormat(this.localeValue,{style:"percent",maximumFractionDigits:2}).format(e/100);case"time":var r=Math.floor(e/60),n=e%60;return r.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0");case"int":return new Intl.NumberFormat(this.localeValue,{maximumFractionDigits:0}).format(e);case"float":return new Intl.NumberFormat(this.localeValue,{maximumFractionDigits:2}).format(e);default:return e}}},{key:"tickText",value:function(t){return JSON.parse(this.getLabelForValue(t)).tick}},{key:"updateMetricSelectWidth",value:function(t){var e=this,r=t.options[t.selectedIndex];new IntersectionObserver(function(n,i){n.forEach(function(n){n.isIntersecting&&(e.adaptiveWidthSelectTarget[0].innerHTML=r.innerText,t.style.width=e.adaptiveWidthSelectTarget.getBoundingClientRect().width+"px",i.disconnect())})}).observe(this.adaptiveWidthSelectTarget),t.parentElement.classList.add("visible")}},{key:"hasSharedAxis",value:function(t,e){var r=this.getGroupByMetricId(t),n=this.getGroupByMetricId(e);return JSON.stringify(r)===JSON.stringify(n)}},{key:"changePrimaryMetric",value:function(t){var e=t.target;this.primaryChartMetricIdValue=e.value,this.primaryChartMetricNameValue=e.options[e.selectedIndex].innerText,this.updateMetricSelectWidth(e),this.updateChart(),Array.from(this.secondaryMetricSelectTarget.querySelectorAll("option")).forEach(function(t){t.toggleAttribute("disabled",t.value===e.value)}),document.dispatchEvent(new CustomEvent("iawp:changePrimaryChartMetric",{detail:{primaryChartMetricId:e.value}}))}},{key:"changeSecondaryMetric",value:function(t){var e=t.target,r=""!==e.value;r?(this.secondaryChartMetricIdValue=e.value,this.secondaryChartMetricNameValue=e.options[e.selectedIndex].innerText):(this.secondaryChartMetricIdValue="",this.secondaryChartMetricNameValue=""),this.updateMetricSelectWidth(e),this.updateChart(),Array.from(this.primaryMetricSelectTarget.querySelectorAll("option")).forEach(function(t){t.toggleAttribute("disabled",t.value===e.value)}),document.dispatchEvent(new CustomEvent("iawp:changeSecondaryChartMetric",{detail:{secondaryChartMetricId:r?e.value:null}}))}},{key:"updateChart",value:function(){var t=this.chart.data.datasets[0];t.id=this.primaryChartMetricIdValue,t.data=this.dataValue[this.primaryChartMetricIdValue],t.label=this.primaryChartMetricNameValue;var e=t.data.every(function(t){return 0===t});if(this.chart.options.scales.y.suggestedMax=e?10:null,this.chart.options.scales.y.beginAtZero="bounce_rate"!==t.id,this.chart.data.datasets.length>1&&this.chart.data.datasets.pop(),this.hasSecondaryMetric()){var r=this.secondaryChartMetricIdValue,n=this.secondaryChartMetricNameValue,i=this.dataValue[r],a=this.hasSharedAxis(this.primaryChartMetricIdValue,r)?"y":"defaultRight";this.chart.data.datasets.push(this.makeDataset(r,n,i,a,"rgba(246,157,10)"));var o=i.every(function(t){return 0===t});this.chart.options.scales.defaultRight.suggestedMax=o?10:null,this.chart.options.scales.defaultRight.beginAtZero="bounce_rate"!==r}this.chart.update()}},{key:"makeDataset",value:function(t,e,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=(0,b.default)(i);return{id:t,label:e,data:r,borderColor:o.string(),backgroundColor:o.alpha(.1).string(),pointBackgroundColor:o.string(),tension:.4,yAxisID:n,fill:!0,order:a?1:0}}},{key:"shouldUseDarkMode",value:function(){return(0,_.isDarkMode)()&&!this.disableDarkModeValue}},{key:"createChart",value:function(){var t=this;y.Chart.defaults.font.family='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';var e={type:"line",data:{labels:this.labelsValue,datasets:[this.makeDataset(this.primaryChartMetricIdValue,this.primaryChartMetricNameValue,this.dataValue[this.primaryChartMetricIdValue],"y","rgba(108,70,174)",!0)].filter(function(t){return null!==t})},options:{locale:this.getLocale(),maintainAspectRatio:!this.isPreviewValue,aspectRatio:3,onResize:function(t,e){e.width,document.documentElement.clientWidth<=782&&3===t.options.aspectRatio?(t.options.aspectRatio=1.5,t.update()):document.documentElement.clientWidth>782&&1.5===t.options.aspectRatio&&(t.options.aspectRatio=3,t.update())},interaction:{intersect:!1,mode:"index"},scales:{y:{border:{color:"#DEDAE6",dash:[2,4]},grid:{color:this.shouldUseDarkMode()?"#676173":"#DEDAE6",tickColor:"#DEDAE6",display:!0,drawOnChartArea:!0},beginAtZero:!0,suggestedMax:null,ticks:{color:this.shouldUseDarkMode()?"#ffffff":"#6D6A73",font:{size:14,weight:400},precision:0,callback:function(e,r,n){return t.formatValueForMetric(t.primaryChartMetricIdValue,e)}}},defaultRight:{position:"right",display:"auto",border:{color:"#DEDAE6",dash:[2,4]},grid:{color:this.shouldUseDarkMode()?"#9a95a6":"#DEDAE6",tickColor:"#DEDAE6",display:!0,drawOnChartArea:!1},beginAtZero:!0,suggestedMax:null,ticks:{color:this.shouldUseDarkMode()?"#ffffff":"#6D6A73",font:{size:14,weight:400},precision:0,callback:function(e,r,n){return t.hasSecondaryMetric()?t.formatValueForMetric(t.secondaryChartMetricIdValue,e):e}}},x:{border:{color:"#DEDAE6"},grid:{tickColor:"#DEDAE6",display:!0,drawOnChartArea:!1},ticks:{color:this.shouldUseDarkMode()?"#ffffff":"#6D6A73",autoSkip:!0,autoSkipPadding:16,maxRotation:0,font:{size:14,weight:400},callback:this.tickText}}},plugins:{mode:String,legend:{display:this.showLegendValue,align:"start",labels:{boxHeight:14,boxWidth:14,useBorderRadius:!0,borderRadius:7,padding:8,color:this.shouldUseDarkMode()?"#DEDAE6":"#676173",generateLabels:function(t){return(0,y.Chart).defaults.plugins.legend.labels.generateLabels(t).map(function(t){return(0,h._)((0,c._)({},t),{fillStyle:t.strokeStyle,lineWidth:0})})}}},corsair:{dash:[2,4],color:"#777",width:1},tooltip:{itemSort:function(t,e){return t.datasetIndex<e.datasetIndex?-1:1},callbacks:{title:this.tooltipTitle,label:this.tooltipLabel}}},elements:{point:{radius:4}}},plugins:[g.default,{beforeInit:function(t){var e=t.legend.fit;t.legend.fit=function(){e.bind(t.legend)(),this.height+=16}}}]};this.chart||(this.chart=new y.Chart(this.canvasTarget,e))}}]),r}(p.Controller);(0,l._)(x,"targets",["canvas","primaryMetricSelect","secondaryMetricSelect","adaptiveWidthSelect"]),(0,l._)(x,"values",{labels:Array,data:Object,locale:String,currency:{type:String,default:"USD"},isPreview:{type:Boolean,default:!1},showLegend:{type:Boolean,default:!1},disableDarkMode:{type:Boolean,default:!1},primaryChartMetricId:String,primaryChartMetricName:String,secondaryChartMetricId:String,secondaryChartMetricName:String,hasMultipleDatasets:Number})},{"@swc/helpers/_/_assert_this_initialized":"atUI0","@swc/helpers/_/_class_call_check":"2HOGN","@swc/helpers/_/_create_class":"8oe8p","@swc/helpers/_/_define_property":"27c3O","@swc/helpers/_/_inherits":"7gHjg","@swc/helpers/_/_object_spread":"kexvf","@swc/helpers/_/_object_spread_props":"c7x3p","@swc/helpers/_/_to_consumable_array":"4oNkS","@swc/helpers/_/_create_super":"a37Ru","@hotwired/stimulus":"crDvk","../chart_plugins/corsair_plugin":"aPJHp","chart.js":"1eVD3",color:"Fap9I","../utils/appearance":"j01R3","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],kexvf:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",function(){return a}),n.export(r,"_",function(){return a});var i=t("./_define_property.js");function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){(0,i._define_property)(t,e,r[e])})}return t}},{"./_define_property.js":"27c3O","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],c7x3p:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r})(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}n.defineInteropFlag(r),n.export(r,"_object_spread_props",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],aPJHp:[function(t,e,r){e.exports={id:"corsair",beforeInit:function(t,e,r){r.disabled||(t.corsair={x:0,y:0})},afterEvent:function(t,e,r){if(!r.disabled){var n=t.chartArea,i=n.top,a=n.bottom,o=n.left,s=n.right,l=e.event,u=l.x,c=l.y;if(u<o||u>s||c<i||c>a){t.corsair={x:u,y:c,draw:!1},t.draw();return}t.corsair={x:u,y:c,draw:!0},t.draw()}},afterDatasetsDraw:function(t,e,r){if(!r.disabled){var n=t.ctx,i=t.chartArea,a=i.top,o=i.bottom;i.left,i.right;var s=t.corsair,l=s.x;s.y,s.draw&&(l=t.tooltip.caretX,n.lineWidth=r.width||0,n.setLineDash(r.dash||[]),n.strokeStyle=r.color||"black",n.save(),n.beginPath(),n.moveTo(l,o),n.lineTo(l,a),n.stroke(),n.restore(),n.setLineDash([]))}}}},{}],"1eVD3":[function(t,e,r){/*!
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"Animation",function(){return k}),n.export(r,"Animations",function(){return w}),n.export(r,"ArcElement",function(){return ee}),n.export(r,"BarController",function(){return V}),n.export(r,"BarElement",function(){return ey}),n.export(r,"BasePlatform",function(){return tf}),n.export(r,"BasicPlatform",function(){return td}),n.export(r,"BubbleController",function(){return z}),n.export(r,"CategoryScale",function(){return e7}),n.export(r,"Chart",function(){return t4}),n.export(r,"Colors",function(){return eM}),n.export(r,"DatasetController",function(){return F}),n.export(r,"Decimation",function(){return eA}),n.export(r,"DomPlatform",function(){return tA}),n.export(r,"DoughnutController",function(){return W}),n.export(r,"Element",function(){return tP}),n.export(r,"Filler",function(){return eN}),n.export(r,"Interaction",function(){return te}),n.export(r,"Legend",function(){return eH}),n.export(r,"LineController",function(){return H}),n.export(r,"LineElement",function(){return eu}),n.export(r,"LinearScale",function(){return re}),n.export(r,"LogarithmicScale",function(){return ro}),n.export(r,"PieController",function(){return K}),n.export(r,"PointElement",function(){return eh}),n.export(r,"PolarAreaController",function(){return U}),n.export(r,"RadarController",function(){return Y}),n.export(r,"RadialLinearScale",function(){return rc}),n.export(r,"Scale",function(){return tL}),n.export(r,"ScatterController",function(){return X}),n.export(r,"SubTitle",function(){return eX}),n.export(r,"Ticks",function(){return m.aM}),n.export(r,"TimeScale",function(){return rm}),n.export(r,"TimeSeriesScale",function(){return r_}),n.export(r,"Title",function(){return eK}),n.export(r,"Tooltip",function(){return e6}),n.export(r,"_adapters",function(){return G}),n.export(r,"_detectPlatform",function(){return tE}),n.export(r,"animator",function(){return b}),n.export(r,"controllers",function(){return $}),n.export(r,"defaults",function(){return m.d}),n.export(r,"elements",function(){return em}),n.export(r,"layouts",function(){return th}),n.export(r,"plugins",function(){return e8}),n.export(r,"registerables",function(){return rk}),n.export(r,"registry",function(){return tB}),n.export(r,"scales",function(){return rx});var i=t("@swc/helpers/_/_assert_this_initialized"),a=t("@swc/helpers/_/_class_call_check"),o=t("@swc/helpers/_/_create_class"),s=t("@swc/helpers/_/_define_property"),l=t("@swc/helpers/_/_get"),u=t("@swc/helpers/_/_get_prototype_of"),c=t("@swc/helpers/_/_inherits"),h=t("@swc/helpers/_/_object_spread"),f=t("@swc/helpers/_/_object_spread_props"),d=t("@swc/helpers/_/_sliced_to_array"),p=t("@swc/helpers/_/_to_consumable_array"),v=t("@swc/helpers/_/_type_of"),g=t("@swc/helpers/_/_wrap_native_super"),y=t("@swc/helpers/_/_create_super"),m=t("./chunks/helpers.dataset.js");t("@kurkle/color");var b=new(function(){function t(){(0,a._)(this,t),this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}return(0,o._)(t,[{key:"_notify",value:function(t,e,r,n){var i=e.listeners[n],a=e.duration;i.forEach(function(n){return n({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(r-e.start,a)})})}},{key:"_refresh",value:function(){var t=this;this._request||(this._running=!0,this._request=(0,m.r).call(window,function(){t._update(),t._request=null,t._running&&t._refresh()}))}},{key:"_update",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),r=0;this._charts.forEach(function(n,i){if(n.running&&n.items.length){for(var a,o=n.items,s=o.length-1,l=!1;s>=0;--s)(a=o[s])._active?(a._total>n.duration&&(n.duration=a._total),a.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(i.draw(),t._notify(i,n,e,"progress")),o.length||(n.running=!1,t._notify(i,n,e,"complete"),n.initial=!1),r+=o.length}}),this._lastDate=e,0===r&&(this._running=!1)}},{key:"_getAnims",value:function(t){var e=this._charts,r=e.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,r)),r}},{key:"listen",value:function(t,e,r){this._getAnims(t).listeners[e].push(r)}},{key:"add",value:function(t,e){var r;e&&e.length&&(r=this._getAnims(t).items).push.apply(r,(0,p._)(e))}},{key:"has",value:function(t){return this._getAnims(t).items.length>0}},{key:"start",value:function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(function(t,e){return Math.max(t,e._duration)},0),this._refresh())}},{key:"running",value:function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!e&&!!e.running&&!!e.items.length}},{key:"stop",value:function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var r=e.items,n=r.length-1;n>=0;--n)r[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}}},{key:"remove",value:function(t){return this._charts.delete(t)}}]),t}()),_="transparent",x={boolean:function(t,e,r){return r>.5?e:t},color:function(t,e,r){var n=(0,m.c)(t||_),i=n.valid&&(0,m.c)(e||_);return i&&i.valid?i.mix(n,r).hexString():e},number:function(t,e,r){return t+(e-t)*r}},k=function(){function t(e,r,n,i){(0,a._)(this,t);var o=r[n];i=(0,m.a)([e.to,i,o,e.from]);var s=(0,m.a)([e.from,o,i]);this._active=!0,this._fn=e.fn||x[e.type||(void 0===s?"undefined":(0,v._)(s))],this._easing=m.e[e.easing]||m.e.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=s,this._to=i,this._promises=void 0}return(0,o._)(t,[{key:"active",value:function(){return this._active}},{key:"update",value:function(t,e,r){if(this._active){this._notify(!1);var n=this._target[this._prop],i=r-this._start,a=this._duration-i;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=i,this._loop=!!t.loop,this._to=(0,m.a)([t.to,e,n,t.from]),this._from=(0,m.a)([t.from,n,e])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(t){var e,r=t-this._start,n=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;if(this._active=a!==s&&(o||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=a;return}e=r/n%2,e=o&&e>1?2-e:e,e=this._easing(Math.min(1,Math.max(0,e))),this._target[i]=this._fn(a,s,e)}},{key:"wait",value:function(){var t=this._promises||(this._promises=[]);return new Promise(function(e,r){t.push({res:e,rej:r})})}},{key:"_notify",value:function(t){for(var e=t?"res":"rej",r=this._promises||[],n=0;n<r.length;n++)r[n][e]()}}]),t}(),w=function(){function t(e,r){(0,a._)(this,t),this._chart=e,this._properties=new Map,this.configure(r)}return(0,o._)(t,[{key:"configure",value:function(t){if((0,m.i)(t)){var e=Object.keys(m.d.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(function(n){var i=t[n];if((0,m.i)(i)){var a={},o=!0,s=!1,l=void 0;try{for(var u,c=e[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value;a[h]=i[h]}}catch(t){s=!0,l=t}finally{try{o||null==c.return||c.return()}finally{if(s)throw l}}((0,m.b)(i.properties)&&i.properties||[n]).forEach(function(t){t!==n&&r.has(t)||r.set(t,a)})}})}}},{key:"_animateOptions",value:function(t,e){var r=e.options,n=function(t,e){if(e){var r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}}(t,r);if(!n)return[];var i=this._createAnimations(n,r);return r.$shared&&(function(t,e){for(var r=[],n=Object.keys(e),i=0;i<n.length;i++){var a=t[n[i]];a&&a.active()&&r.push(a.wait())}return Promise.all(r)})(t.options.$animations,r).then(function(){t.options=r},function(){}),i}},{key:"_createAnimations",value:function(t,e){var r=this._properties,n=[],i=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();for(s=a.length-1;s>=0;--s){var s,l=a[s];if("$"!==l.charAt(0)){if("options"===l){n.push.apply(n,(0,p._)(this._animateOptions(t,e)));continue}var u=e[l],c=i[l],h=r.get(l);if(c){if(h&&c.active()){c.update(h,u,o);continue}c.cancel()}if(!h||!h.duration){t[l]=u;continue}i[l]=c=new k(h,t,l,u),n.push(c)}}return n}},{key:"update",value:function(t,e){if(0===this._properties.size){Object.assign(t,e);return}var r=this._createAnimations(t,e);if(r.length)return b.add(this._chart,r),!0}}]),t}();function M(t,e){var r=t&&t.options||{},n=r.reverse,i=void 0===r.min?e:0,a=void 0===r.max?e:0;return{start:n?a:i,end:n?i:a}}function S(t,e){var r,n,i=[],a=t._getSortedDatasetMetas(e);for(r=0,n=a.length;r<n;++r)i.push(a[r].index);return i}function O(t,e,r){var n,i,a,o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=t.keys,u="single"===s.mode;if(null!==e){var c=!1;for(n=0,i=l.length;n<i;++n){if((a=+l[n])===r){if(c=!0,s.all)continue;break}o=t.values[a],(0,m.g)(o)&&(u||0===e||(0,m.s)(e)===(0,m.s)(o))&&(e+=o)}return c||s.all?e:0}}function A(t,e){var r=t&&t.options.stacked;return r||void 0===r&&void 0!==e.stack}function E(t,e,r,n){var i=!0,a=!1,o=void 0;try{for(var s,l=e.getMatchingVisibleMetas(n).reverse()[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=t[u.index];if(r&&c>0||!r&&c<0)return u.index}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}return null}function P(t,e){for(var r,n=t.chart,i=t._cachedMeta,a=n._stacks||(n._stacks={}),o=i.iScale,s=i.vScale,l=i.index,u=o.axis,c=s.axis,h="".concat(o.id,".").concat(s.id,".").concat(i.stack||i.type),f=e.length,d=0;d<f;++d){var p=e[d],v=p[u],g=p[c];(r=(p._stacks||(p._stacks={}))[c]=function(t,e,r){var n=t[e]||(t[e]={});return n[r]||(n[r]={})}(a,h,v))[l]=g,r._top=E(r,s,!0,i.type),r._bottom=E(r,s,!1,i.type),(r._visualValues||(r._visualValues={}))[l]=g}}function D(t,e){var r=t.scales;return Object.keys(r).filter(function(t){return r[t].axis===e}).shift()}function C(t,e){var r=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;var i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value._stacks;if(!u||void 0===u[n]||void 0===u[n][r])return;delete u[n][r],void 0!==u[n]._visualValues&&void 0!==u[n]._visualValues[r]&&delete u[n]._visualValues[r]}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}}}var j=function(t){return"reset"===t||"none"===t},T=function(t,e){return e?t:Object.assign({},t)},F=function(){function t(e,r){(0,a._)(this,t),this.chart=e,this._ctx=e.ctx,this.index=r,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=(this instanceof t?this.constructor:void 0).datasetElementType,this.dataElementType=(this instanceof t?this.constructor:void 0).dataElementType,this.initialize()}return(0,o._)(t,[{key:"initialize",value:function(){var t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=A(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")}},{key:"updateIndex",value:function(t){this.index!==t&&C(this._cachedMeta),this.index=t}},{key:"linkScales",value:function(){var t=this.chart,e=this._cachedMeta,r=this.getDataset(),n=function(t,e,r,n){return"x"===t?e:"r"===t?n:r},i=e.xAxisID=(0,m.v)(r.xAxisID,D(t,"x")),a=e.yAxisID=(0,m.v)(r.yAxisID,D(t,"y")),o=e.rAxisID=(0,m.v)(r.rAxisID,D(t,"r")),s=e.indexAxis,l=e.iAxisID=n(s,i,a,o),u=e.vAxisID=n(s,a,i,o);e.xScale=this.getScaleForId(i),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(u)}},{key:"getDataset",value:function(){return this.chart.data.datasets[this.index]}},{key:"getMeta",value:function(){return this.chart.getDatasetMeta(this.index)}},{key:"getScaleForId",value:function(t){return this.chart.scales[t]}},{key:"_getOtherScale",value:function(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}},{key:"reset",value:function(){this._update("reset")}},{key:"_destroy",value:function(){var t=this._cachedMeta;this._data&&(0,m.u)(this._data,this),t._stacked&&C(t)}},{key:"_dataCheck",value:function(){var t=this.getDataset(),e=t.data||(t.data=[]),r=this._data;if((0,m.i)(e)){var n=this._cachedMeta;this._data=function(t,e){var r,n,i,a,o=e.iScale,l=e.vScale,u="x"===o.axis?"x":"y",c="x"===l.axis?"x":"y",h=Object.keys(t),f=Array(h.length);for(r=0,n=h.length;r<n;++r)i=h[r],f[r]=(a={},(0,s._)(a,u,i),(0,s._)(a,c,t[i]),a);return f}(e,n)}else if(r!==e){if(r){(0,m.u)(r,this);var i=this._cachedMeta;C(i),i._parsed=[]}e&&Object.isExtensible(e)&&(0,m.l)(e,this),this._syncList=[],this._data=e}}},{key:"addElements",value:function(){var t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}},{key:"buildOrUpdateElements",value:function(t){var e=this._cachedMeta,r=this.getDataset(),n=!1;this._dataCheck();var i=e._stacked;e._stacked=A(e.vScale,e),e.stack!==r.stack&&(n=!0,C(e),e.stack=r.stack),this._resyncElements(t),(n||i!==e._stacked)&&(P(this,e._parsed),e._stacked=A(e.vScale,e))}},{key:"configure",value:function(){var t=this.chart.config,e=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}},{key:"parse",value:function(t,e){var r,n,i,a=this._cachedMeta,o=this._data,s=a.iScale,l=a._stacked,u=s.axis,c=0===t&&e===o.length||a._sorted,h=t>0&&a._parsed[t-1];if(!1===this._parsing)a._parsed=o,a._sorted=!0,i=o;else{for(r=0,i=(0,m.b)(o[t])?this.parseArrayData(a,o,t,e):(0,m.i)(o[t])?this.parseObjectData(a,o,t,e):this.parsePrimitiveData(a,o,t,e);r<e;++r)a._parsed[r+t]=n=i[r],c&&((null===n[u]||h&&n[u]<h[u])&&(c=!1),h=n);a._sorted=c}l&&P(this,i)}},{key:"parsePrimitiveData",value:function(t,e,r,n){var i,a,o,l=t.iScale,u=t.vScale,c=l.axis,h=u.axis,f=l.getLabels(),d=l===u,p=Array(n);for(i=0;i<n;++i)a=i+r,p[i]=(o={},(0,s._)(o,c,d||l.parse(f[a],a)),(0,s._)(o,h,u.parse(e[a],a)),o);return p}},{key:"parseArrayData",value:function(t,e,r,n){var i,a,o,s=t.xScale,l=t.yScale,u=Array(n);for(i=0;i<n;++i)o=e[a=i+r],u[i]={x:s.parse(o[0],a),y:l.parse(o[1],a)};return u}},{key:"parseObjectData",value:function(t,e,r,n){var i,a,o,s=t.xScale,l=t.yScale,u=this._parsing,c=u.xAxisKey,h=void 0===c?"x":c,f=u.yAxisKey,d=void 0===f?"y":f,p=Array(n);for(i=0;i<n;++i)o=e[a=i+r],p[i]={x:s.parse((0,m.f)(o,h),a),y:l.parse((0,m.f)(o,d),a)};return p}},{key:"getParsed",value:function(t){return this._cachedMeta._parsed[t]}},{key:"getDataElement",value:function(t){return this._cachedMeta.data[t]}},{key:"applyStack",value:function(t,e,r){var n=this.chart,i=this._cachedMeta,a=e[t.axis];return O({keys:S(n,!0),values:e._stacks[t.axis]._visualValues},a,i.index,{mode:r})}},{key:"updateRangeFromParsed",value:function(t,e,r,n){var i=r[e.axis],a=null===i?NaN:i,o=n&&r._stacks[e.axis];n&&o&&(n.values=o,a=O(n,i,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}},{key:"getMinMax",value:function(t,e){var r,n,i,a,o,s,l=this._cachedMeta,u=l._parsed,c=l._sorted&&t===l.iScale,h=u.length,f=this._getOtherScale(t),d=(r=this.chart,e&&!l.hidden&&l._stacked&&{keys:S(r,!0),values:null}),p={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},v=(i=(n=f.getUserBounds()).min,a=n.max,{min:n.minDefined?i:Number.NEGATIVE_INFINITY,max:n.maxDefined?a:Number.POSITIVE_INFINITY}),g=v.min,y=v.max;function b(){var e=(s=u[o])[f.axis];return!(0,m.g)(s[t.axis])||g>e||y<e}for(o=0;o<h&&(b()||(this.updateRangeFromParsed(p,t,s,d),!c));++o);if(c){for(o=h-1;o>=0;--o)if(!b()){this.updateRangeFromParsed(p,t,s,d);break}}return p}},{key:"getAllParsedValues",value:function(t){var e,r,n,i=this._cachedMeta._parsed,a=[];for(e=0,r=i.length;e<r;++e)n=i[e][t.axis],(0,m.g)(n)&&a.push(n);return a}},{key:"getMaxOverflow",value:function(){return!1}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=e.iScale,n=e.vScale,i=this.getParsed(t);return{label:r?""+r.getLabelForValue(i[r.axis]):"",value:n?""+n.getLabelForValue(i[n.axis]):""}}},{key:"_update",value:function(t){var e,r,n,i,a,o=this._cachedMeta;this.update(t||"default"),o._clip=(e=(0,m.v)(this.options.clip,function(t,e,r){if(!1===r)return!1;var n=M(t,r),i=M(e,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}(o.xScale,o.yScale,this.getMaxOverflow())),(0,m.i)(e)?(r=e.top,n=e.right,i=e.bottom,a=e.left):r=n=i=a=e,{top:r,right:n,bottom:i,left:a,disabled:!1===e})}},{key:"update",value:function(t){}},{key:"draw",value:function(){var t,e=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],a=r.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;for(n.dataset&&n.dataset.draw(e,a,s,l),t=s;t<s+l;++t){var c=i[t];c.hidden||(c.active&&u?o.push(c):c.draw(e,a))}for(t=0;t<o.length;++t)o[t].draw(e,a)}},{key:"getStyle",value:function(t,e){var r=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}},{key:"getContext",value:function(t,e,r){var n,i,a,o=this.getDataset();if(t>=0&&t<this._cachedMeta.data.length){var s,l=this._cachedMeta.data[t];(a=l.$context||(l.$context=(s=this.getContext(),(0,m.j)(s,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:l,index:t,mode:"default",type:"data"})))).parsed=this.getParsed(t),a.raw=o.data[t],a.index=a.dataIndex=t}else(a=this.$context||(this.$context=(n=this.chart.getContext(),i=this.index,(0,m.j)(n,{active:!1,dataset:void 0,datasetIndex:i,index:i,mode:"default",type:"dataset"})))).dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!e,a.mode=r,a}},{key:"resolveDatasetElementOptions",value:function(t){return this._resolveElementOptions(this.datasetElementType.id,t)}},{key:"resolveDataElementOptions",value:function(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}},{key:"_resolveElementOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2?arguments[2]:void 0,i="active"===r,a=this._cachedDataOpts,o=t+"-"+r,s=a[o],l=this.enableOptionSharing&&(0,m.h)(n);if(s)return T(s,l);var u=this.chart.config,c=u.datasetElementScopeKeys(this._type,t),h=u.getOptionScopes(this.getDataset(),c),f=Object.keys(m.d.elements[t]),d=u.resolveNamedOptions(h,f,function(){return e.getContext(n,i,r)},i?["".concat(t,"Hover"),"hover",t,""]:[t,""]);return d.$shared&&(d.$shared=l,a[o]=Object.freeze(T(d,l))),d}},{key:"_resolveAnimations",value:function(t,e,r){var n,i=this.chart,a=this._cachedDataOpts,o="animation-".concat(e),s=a[o];if(s)return s;if(!1!==i.options.animation){var l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,e),c=l.getOptionScopes(this.getDataset(),u);n=l.createResolver(c,this.getContext(t,r,e))}var h=new w(i,n&&n.animations);return n&&n._cacheable&&(a[o]=Object.freeze(h)),h}},{key:"getSharedOptions",value:function(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}},{key:"includeOptions",value:function(t,e){return!e||j(t)||this.chart._animationsDisabled}},{key:"_getSharedOptions",value:function(t,e){var r=this.resolveDataElementOptions(t,e),n=this._sharedOptions,i=this.getSharedOptions(r),a=this.includeOptions(e,i)||i!==n;return this.updateSharedOptions(i,e,r),{sharedOptions:i,includeOptions:a}}},{key:"updateElement",value:function(t,e,r,n){j(n)?Object.assign(t,r):this._resolveAnimations(e,n).update(t,r)}},{key:"updateSharedOptions",value:function(t,e,r){t&&!j(e)&&this._resolveAnimations(void 0,e).update(t,r)}},{key:"_setStyle",value:function(t,e,r,n){t.active=n;var i=this.getStyle(e,n);this._resolveAnimations(e,r,n).update(t,{options:!n&&this.getSharedOptions(i)||i})}},{key:"removeHoverStyle",value:function(t,e,r){this._setStyle(t,r,"active",!1)}},{key:"setHoverStyle",value:function(t,e,r){this._setStyle(t,r,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}},{key:"_resyncElements",value:function(t){var e=this._data,r=this._cachedMeta.data,n=!0,i=!1,a=void 0;try{for(var o,s=this._syncList[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=(0,d._)(o.value,3),u=l[0],c=l[1],h=l[2];this[u](c,h)}}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}this._syncList=[];var f=r.length,p=e.length,v=Math.min(p,f);v&&this.parse(0,v),p>f?this._insertElements(f,p-f,t):p<f&&this._removeElements(p,f-p)}},{key:"_insertElements",value:function(t,e){var r,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=this._cachedMeta,a=i.data,o=t+e,s=function(t){for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(s(a),r=t;r<o;++r)a[r]=new this.dataElementType;this._parsing&&s(i._parsed),this.parse(t,e),n&&this.updateElements(a,t,e,"reset")}},{key:"updateElements",value:function(t,e,r,n){}},{key:"_removeElements",value:function(t,e){var r=this._cachedMeta;if(this._parsing){var n=r._parsed.splice(t,e);r._stacked&&C(r,n)}r.data.splice(t,e)}},{key:"_sync",value:function(t){if(this._parsing)this._syncList.push(t);else{var e=(0,d._)(t,3),r=e[0],n=e[1],i=e[2];this[r](n,i)}this.chart._dataChanges.push([this.index].concat((0,p._)(t)))}},{key:"_onDataPush",value:function(){var t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}},{key:"_onDataPop",value:function(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}},{key:"_onDataShift",value:function(){this._sync(["_removeElements",0,1])}},{key:"_onDataSplice",value:function(t,e){e&&this._sync(["_removeElements",t,e]);var r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}},{key:"_onDataUnshift",value:function(){this._sync(["_insertElements",0,arguments.length])}}]),t}();function I(t,e,r,n){if((0,m.b)(t)){var i,a,o,s,l,u;o=Math.min(i=r.parse(t[0],n),a=r.parse(t[1],n)),s=Math.max(i,a),l=o,u=s,Math.abs(o)>Math.abs(s)&&(l=s,u=o),e[r.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:a,min:o,max:s}}else e[r.axis]=r.parse(t,n);return e}function L(t,e,r,n){var i,a,o,s,l=t.iScale,u=t.vScale,c=l.getLabels(),h=l===u,f=[];for(i=r,a=r+n;i<a;++i)s=e[i],(o={})[l.axis]=h||l.parse(c[i],i),f.push(I(s,o,u,i));return f}function R(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function B(t,e,r,n){var i;return t=n?N(t=(i=t)===e?r:i===r?e:i,r,e):N(t,e,r)}function N(t,e,r){return"start"===t?e:"end"===t?r:t}(0,s._)(F,"defaults",{}),(0,s._)(F,"datasetElementType",null),(0,s._)(F,"dataElementType",null);var V=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"parsePrimitiveData",value:function(t,e,r,n){return L(t,e,r,n)}},{key:"parseArrayData",value:function(t,e,r,n){return L(t,e,r,n)}},{key:"parseObjectData",value:function(t,e,r,n){var i,a,o,s,l=t.iScale,u=t.vScale,c=this._parsing,h=c.xAxisKey,f=void 0===h?"x":h,d=c.yAxisKey,p=void 0===d?"y":d,v="x"===l.axis?f:p,g="x"===u.axis?f:p,y=[];for(i=r,a=r+n;i<a;++i)s=e[i],(o={})[l.axis]=l.parse((0,m.f)(s,v),i),y.push(I((0,m.f)(s,g),o,u,i));return y}},{key:"updateRangeFromParsed",value:function(t,e,n,i){(0,l._)((0,u._)(r.prototype),"updateRangeFromParsed",this).call(this,t,e,n,i);var a=n._custom;a&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}},{key:"getMaxOverflow",value:function(){return 0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=e.iScale,n=e.vScale,i=this.getParsed(t),a=i._custom,o=R(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(i[n.axis]);return{label:""+r.getLabelForValue(i[r.axis]),value:o}}},{key:"initialize",value:function(){this.enableOptionSharing=!0,(0,l._)((0,u._)(r.prototype),"initialize",this).call(this),this._cachedMeta.stack=this.getDataset().stack}},{key:"update",value:function(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}},{key:"updateElements",value:function(t,e,r,n){for(var i="reset"===n,a=this.index,o=this._cachedMeta.vScale,s=o.getBasePixel(),l=o.isHorizontal(),u=this._getRuler(),c=this._getSharedOptions(e,n),h=c.sharedOptions,f=c.includeOptions,d=e;d<e+r;d++){var p=this.getParsed(d),v=i||(0,m.k)(p[o.axis])?{base:s,head:s}:this._calculateBarValuePixels(d),g=this._calculateBarIndexPixels(d,u),y=(p._stacks||{})[o.axis],b={horizontal:l,base:v.base,enableBorderRadius:!y||R(p._custom)||a===y._top||a===y._bottom,x:l?v.head:g.center,y:l?g.center:v.head,height:l?g.size:Math.abs(v.size),width:l?Math.abs(v.size):g.size};f&&(b.options=h||this.resolveDataElementOptions(d,t[d].active?"active":n));var _=b.options||t[d].options;(function(t,e,r,n){var i,a,o,s,l,u=e.borderSkipped,c={};if(!u){t.borderSkipped=c;return}if(!0===u){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}var h=(t.horizontal?(i=t.base>t.x,a="left",o="right"):(i=t.base<t.y,a="bottom",o="top"),i?(s="end",l="start"):(s="start",l="end"),{start:a,end:o,reverse:i,top:s,bottom:l}),f=h.start,d=h.end,p=h.reverse,v=h.top,g=h.bottom;"middle"===u&&r&&(t.enableBorderRadius=!0,(r._top||0)===n?u=v:(r._bottom||0)===n?u=g:(c[B(g,f,d,p)]=!0,u=v)),c[B(u,f,d,p)]=!0,t.borderSkipped=c})(b,_,y,a),function(t,e,r){var n=e.inflateAmount;t.inflateAmount="auto"===n?1===r?.33:0:n}(b,_,u.ratio),this.updateElement(t[d],d,b,n)}}},{key:"_getStacks",value:function(t,e){var r=this._cachedMeta.iScale,n=r.getMatchingVisibleMetas(this._type).filter(function(t){return t.controller.options.grouped}),i=r.options.stacked,a=[],o=this._cachedMeta.controller.getParsed(e),s=o&&o[r.axis],l=!0,u=!1,c=void 0;try{for(var h,f=n[Symbol.iterator]();!(l=(h=f.next()).done);l=!0){var d=h.value;if(!(void 0!==e&&function(t){var e=t._parsed.find(function(t){return t[r.axis]===s}),n=e&&e[t.vScale.axis];if((0,m.k)(n)||isNaN(n))return!0}(d))&&((!1===i||-1===a.indexOf(d.stack)||void 0===i&&void 0===d.stack)&&a.push(d.stack),d.index===t))break}}catch(t){u=!0,c=t}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return a.length||a.push(void 0),a}},{key:"_getStackCount",value:function(t){return this._getStacks(void 0,t).length}},{key:"_getAxisCount",value:function(){return this._getAxis().length}},{key:"getFirstScaleIdForIndexAxis",value:function(){var t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(function(r){return t[r].axis===e}).shift()}},{key:"_getAxis",value:function(){var t={},e=this.getFirstScaleIdForIndexAxis(),r=!0,n=!1,i=void 0;try{for(var a,o=this.chart.data.datasets[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;t[(0,m.v)("x"===this.chart.options.indexAxis?s.xAxisID:s.yAxisID,e)]=!0}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return Object.keys(t)}},{key:"_getStackIndex",value:function(t,e,r){var n=this._getStacks(t,r),i=void 0!==e?n.indexOf(e):-1;return -1===i?n.length-1:i}},{key:"_getRuler",value:function(){var t,e,r=this.options,n=this._cachedMeta,i=n.iScale,a=[];for(t=0,e=n.data.length;t<e;++t)a.push(i.getPixelForValue(this.getParsed(t)[i.axis],t));var o=r.barThickness;return{min:o||function(t){var e,r,n,i,a=t.iScale,o=function(t,e){if(!t._cache.$bar){for(var r=t.getMatchingVisibleMetas(e),n=[],i=0,a=r.length;i<a;i++)n=n.concat(r[i].controller.getAllParsedValues(t));t._cache.$bar=(0,m._)(n.sort(function(t,e){return t-e}))}return t._cache.$bar}(a,t.type),s=a._length,l=function(){32767!==n&&-32768!==n&&((0,m.h)(i)&&(s=Math.min(s,Math.abs(n-i)||s)),i=n)};for(e=0,r=o.length;e<r;++e)n=a.getPixelForValue(o[e]),l();for(e=0,i=void 0,r=a.ticks.length;e<r;++e)n=a.getPixelForTick(e),l();return s}(n),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:r.grouped,ratio:o?1:r.categoryPercentage*r.barPercentage}}},{key:"_calculateBarValuePixels",value:function(t){var e,r,n=this._cachedMeta,i=n.vScale,a=n._stacked,o=n.index,s=this.options,l=s.base,u=s.minBarLength,c=l||0,h=this.getParsed(t),f=h._custom,d=R(f),p=h[i.axis],v=0,g=a?this.applyStack(i,h,a):p;g!==p&&(v=g-p,g=p),d&&(p=f.barStart,g=f.barEnd-f.barStart,0!==p&&(0,m.s)(p)!==(0,m.s)(f.barEnd)&&(v=0),v+=p);var y=(0,m.k)(l)||d?v:l,b=i.getPixelForValue(y);if(Math.abs(r=(e=this.chart.getDataVisibility(t)?i.getPixelForValue(v+g):b)-b)<u){r=(0!==(_=r)?(0,m.s)(_):(i.isHorizontal()?1:-1)*(i.min>=c?1:-1))*u,p===c&&(b-=r/2);var _,x=i.getPixelForDecimal(0),k=i.getPixelForDecimal(1);e=(b=Math.max(Math.min(b,Math.max(x,k)),Math.min(x,k)))+r,a&&!d&&(h._stacks[i.axis]._visualValues[o]=i.getValueForPixel(e)-i.getValueForPixel(b))}if(b===i.getPixelForValue(c)){var w=(0,m.s)(r)*i.getLineWidthForValue(c)/2;b+=w,r-=w}return{size:r,base:b,head:e,center:e+r/2}}},{key:"_calculateBarIndexPixels",value:function(t,e){var r,n,i=e.scale,a=this.options,o=a.skipNull,s=(0,m.v)(a.maxBarThickness,1/0),l=this._getAxisCount();if(e.grouped){var u,c,h,f,d,p,v,g,y,b,_,x=o?this._getStackCount(t):e.stackCount,k="flex"===a.barThickness?(u=x*l,h=(c=e.pixels)[t],f=t>0?c[t-1]:null,d=t<c.length-1?c[t+1]:null,p=a.categoryPercentage,null===f&&(f=h-(null===d?e.end-e.start:d-h)),null===d&&(d=h+h-f),v=h-(h-Math.min(f,d))/2*p,{chunk:Math.abs(d-f)/2*p/u,ratio:a.barPercentage,start:v}):(g=x*l,_=a.barThickness,(0,m.k)(_)?(y=e.min*a.categoryPercentage,b=a.barPercentage):(y=_*g,b=1),{chunk:y/g,ratio:b,start:e.pixels[t]-y/2}),w="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,M=this._getAxis().indexOf((0,m.v)(w,this.getFirstScaleIdForIndexAxis())),S=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+M;r=k.start+k.chunk*S+k.chunk/2,n=Math.min(s,k.chunk*k.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),n=Math.min(s,e.min*e.ratio);return{base:r-n/2,head:r+n/2,center:r,size:n}}},{key:"draw",value:function(){for(var t=this._cachedMeta,e=t.vScale,r=t.data,n=r.length,i=0;i<n;++i)null===this.getParsed(i)[e.axis]||r[i].hidden||r[i].draw(this._ctx)}}]),r}(F);(0,s._)(V,"id","bar"),(0,s._)(V,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),(0,s._)(V,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var z=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"initialize",value:function(){this.enableOptionSharing=!0,(0,l._)((0,u._)(r.prototype),"initialize",this).call(this)}},{key:"parsePrimitiveData",value:function(t,e,n,i){for(var a=(0,l._)((0,u._)(r.prototype),"parsePrimitiveData",this).call(this,t,e,n,i),o=0;o<a.length;o++)a[o]._custom=this.resolveDataElementOptions(o+n).radius;return a}},{key:"parseArrayData",value:function(t,e,n,i){for(var a=(0,l._)((0,u._)(r.prototype),"parseArrayData",this).call(this,t,e,n,i),o=0;o<a.length;o++){var s=e[n+o];a[o]._custom=(0,m.v)(s[2],this.resolveDataElementOptions(o+n).radius)}return a}},{key:"parseObjectData",value:function(t,e,n,i){for(var a=(0,l._)((0,u._)(r.prototype),"parseObjectData",this).call(this,t,e,n,i),o=0;o<a.length;o++){var s=e[n+o];a[o]._custom=(0,m.v)(s&&s.r&&+s.r,this.resolveDataElementOptions(o+n).radius)}return a}},{key:"getMaxOverflow",value:function(){for(var t=this._cachedMeta.data,e=0,r=t.length-1;r>=0;--r)e=Math.max(e,t[r].size(this.resolveDataElementOptions(r))/2);return e>0&&e}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=this.chart.data.labels||[],n=e.xScale,i=e.yScale,a=this.getParsed(t),o=n.getLabelForValue(a.x),s=i.getLabelForValue(a.y),l=a._custom;return{label:r[t]||"",value:"("+o+", "+s+(l?", "+l:"")+")"}}},{key:"update",value:function(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}},{key:"updateElements",value:function(t,e,r,n){for(var i="reset"===n,a=this._cachedMeta,o=a.iScale,s=a.vScale,l=this._getSharedOptions(e,n),u=l.sharedOptions,c=l.includeOptions,h=o.axis,f=s.axis,d=e;d<e+r;d++){var p=t[d],v=!i&&this.getParsed(d),g={},y=g[h]=i?o.getPixelForDecimal(.5):o.getPixelForValue(v[h]),m=g[f]=i?s.getBasePixel():s.getPixelForValue(v[f]);g.skip=isNaN(y)||isNaN(m),c&&(g.options=u||this.resolveDataElementOptions(d,p.active?"active":n),i&&(g.options.radius=0)),this.updateElement(p,d,g,n)}}},{key:"resolveDataElementOptions",value:function(t,e){var n=this.getParsed(t),i=(0,l._)((0,u._)(r.prototype),"resolveDataElementOptions",this).call(this,t,e);i.$shared&&(i=Object.assign({},i,{$shared:!1}));var a=i.radius;return"active"!==e&&(i.radius=0),i.radius+=(0,m.v)(n&&n._custom,a),i}}]),r}(F);(0,s._)(z,"id","bubble"),(0,s._)(z,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),(0,s._)(z,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});var W=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t,n){var i;return(0,a._)(this,r),(i=e.call(this,t,n)).enableOptionSharing=!0,i.innerRadius=void 0,i.outerRadius=void 0,i.offsetX=void 0,i.offsetY=void 0,i}return(0,o._)(r,[{key:"linkScales",value:function(){}},{key:"parse",value:function(t,e){var r=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=r;else{var i,a,o=function(t){return+r[t]};if((0,m.i)(r[t])){var s=this._parsing.key,l=void 0===s?"value":s;o=function(t){return+(0,m.f)(r[t],l)}}for(i=t,a=t+e;i<a;++i)n._parsed[i]=o(i)}}},{key:"_getRotation",value:function(){return(0,m.t)(this.options.rotation-90)}},{key:"_getCircumference",value:function(){return(0,m.t)(this.options.circumference)}},{key:"_getRotationExtents",value:function(){for(var t=m.T,e=-m.T,r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){var n=this.chart.getDatasetMeta(r).controller,i=n._getRotation(),a=n._getCircumference();t=Math.min(t,i),e=Math.max(e,i+a)}return{rotation:t,circumference:e-t}}},{key:"update",value:function(t){var e=this.chart.chartArea,r=this._cachedMeta,n=r.data,i=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,a=Math.max((Math.min(e.width,e.height)-i)/2,0),o=Math.min((0,m.m)(this.options.cutout,a),1),s=this._getRingWeight(this.index),l=this._getRotationExtents(),u=l.circumference,c=function(t,e,r){var n=1,i=1,a=0,o=0;if(e<m.T){var s=t+e,l=Math.cos(t),u=Math.sin(t),c=Math.cos(s),h=Math.sin(s),f=function(e,n,i){return(0,m.p)(e,t,s,!0)?1:Math.max(n,n*r,i,i*r)},d=function(e,n,i){return(0,m.p)(e,t,s,!0)?-1:Math.min(n,n*r,i,i*r)},p=f(0,l,c),v=f(m.H,u,h),g=d(m.P,l,c),y=d(m.P+m.H,u,h);n=(p-g)/2,i=(v-y)/2,a=-(p+g)/2,o=-(v+y)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}(l.rotation,u,o),h=c.ratioX,f=c.ratioY,d=c.offsetX,p=c.offsetY,v=(e.width-i)/h,g=(e.height-i)/f,y=(0,m.n)(this.options.radius,Math.max(Math.min(v,g)/2,0)),b=Math.max(y*o,0),_=(y-b)/this._getVisibleDatasetWeightTotal();this.offsetX=d*y,this.offsetY=p*y,r.total=this.calculateTotal(),this.outerRadius=y-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*s,0),this.updateElements(n,0,n.length,t)}},{key:"_circumference",value:function(t,e){var r=this.options,n=this._cachedMeta,i=this._getCircumference();return e&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*i/m.T)}},{key:"updateElements",value:function(t,e,r,n){var i,a="reset"===n,o=this.chart,s=o.chartArea,l=o.options.animation,u=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=a&&l.animateScale,f=h?0:this.innerRadius,d=h?0:this.outerRadius,p=this._getSharedOptions(e,n),v=p.sharedOptions,g=p.includeOptions,y=this._getRotation();for(i=0;i<e;++i)y+=this._circumference(i,a);for(i=e;i<e+r;++i){var m=this._circumference(i,a),b=t[i],_={x:u+this.offsetX,y:c+this.offsetY,startAngle:y,endAngle:y+m,circumference:m,outerRadius:d,innerRadius:f};g&&(_.options=v||this.resolveDataElementOptions(i,b.active?"active":n)),y+=m,this.updateElement(b,i,_,n)}}},{key:"calculateTotal",value:function(){var t,e=this._cachedMeta,r=e.data,n=0;for(t=0;t<r.length;t++){var i=e._parsed[t];null!==i&&!isNaN(i)&&this.chart.getDataVisibility(t)&&!r[t].hidden&&(n+=Math.abs(i))}return n}},{key:"calculateCircumference",value:function(t){var e=this._cachedMeta.total;return e>0&&!isNaN(t)?m.T*(Math.abs(t)/e):0}},{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=(0,m.o)(e._parsed[t],r.options.locale);return{label:n[t]||"",value:i}}},{key:"getMaxBorderWidth",value:function(t){var e,r,n,i,a,o=0,s=this.chart;if(!t){for(e=0,r=s.data.datasets.length;e<r;++e)if(s.isDatasetVisible(e)){t=(n=s.getDatasetMeta(e)).data,i=n.controller;break}}if(!t)return 0;for(e=0,r=t.length;e<r;++e)"inner"!==(a=i.resolveDataElementOptions(e)).borderAlign&&(o=Math.max(o,a.borderWidth||0,a.hoverBorderWidth||0));return o}},{key:"getMaxOffset",value:function(t){for(var e=0,r=0,n=t.length;r<n;++r){var i=this.resolveDataElementOptions(r);e=Math.max(e,i.offset||0,i.hoverOffset||0)}return e}},{key:"_getRingWeightOffset",value:function(t){for(var e=0,r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(e+=this._getRingWeight(r));return e}},{key:"_getRingWeight",value:function(t){return Math.max((0,m.v)(this.chart.data.datasets[t].weight,1),0)}},{key:"_getVisibleDatasetWeightTotal",value:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}]),r}(F);(0,s._)(W,"id","doughnut"),(0,s._)(W,"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"}),(0,s._)(W,"descriptors",{_scriptable:function(t){return"spacing"!==t},_indexable:function(t){return"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}}),(0,s._)(W,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(t){var e=t.data,r=t.legend.options.labels,n=r.pointStyle,i=r.textAlign,a=r.color,o=r.useBorderRadius,s=r.borderRadius;return e.labels.length&&e.datasets.length?e.labels.map(function(e,r){var l=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:l.backgroundColor,fontColor:a,hidden:!t.getDataVisibility(r),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:i,pointStyle:n,borderRadius:o&&(s||l.borderRadius),index:r}}):[]}},onClick:function(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}}});var H=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"initialize",value:function(){this.enableOptionSharing=!0,this.supportsDecimation=!0,(0,l._)((0,u._)(r.prototype),"initialize",this).call(this)}},{key:"update",value:function(t){var e=this._cachedMeta,r=e.dataset,n=e.data,i=void 0===n?[]:n,a=e._dataset,o=this.chart._animationsDisabled,s=(0,m.q)(e,i,o),l=s.start,u=s.count;this._drawStart=l,this._drawCount=u,(0,m.w)(e)&&(l=0,u=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;var c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:c},t),this.updateElements(i,l,u,t)}},{key:"updateElements",value:function(t,e,r,n){for(var i="reset"===n,a=this._cachedMeta,o=a.iScale,s=a.vScale,l=a._stacked,u=a._dataset,c=this._getSharedOptions(e,n),h=c.sharedOptions,f=c.includeOptions,d=o.axis,p=s.axis,v=this.options,g=v.spanGaps,y=v.segment,b=(0,m.x)(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||i||"none"===n,x=e+r,k=t.length,w=e>0&&this.getParsed(e-1),M=0;M<k;++M){var S=t[M],O=_?S:{};if(M<e||M>=x){O.skip=!0;continue}var A=this.getParsed(M),E=(0,m.k)(A[p]),P=O[d]=o.getPixelForValue(A[d],M),D=O[p]=i||E?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,A,l):A[p],M);O.skip=isNaN(P)||isNaN(D)||E,O.stop=M>0&&Math.abs(A[d]-w[d])>b,y&&(O.parsed=A,O.raw=u.data[M]),f&&(O.options=h||this.resolveDataElementOptions(M,S.active?"active":n)),_||this.updateElement(S,M,O,n),w=A}}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.dataset,r=e.options&&e.options.borderWidth||0,n=t.data||[];return n.length?Math.max(r,n[0].size(this.resolveDataElementOptions(0)),n[n.length-1].size(this.resolveDataElementOptions(n.length-1)))/2:r}},{key:"draw",value:function(){var t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),(0,l._)((0,u._)(r.prototype),"draw",this).call(this)}}]),r}(F);(0,s._)(H,"id","line"),(0,s._)(H,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),(0,s._)(H,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var U=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t,n){var i;return(0,a._)(this,r),(i=e.call(this,t,n)).innerRadius=void 0,i.outerRadius=void 0,i}return(0,o._)(r,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=this.chart,n=r.data.labels||[],i=(0,m.o)(e._parsed[t].r,r.options.locale);return{label:n[t]||"",value:i}}},{key:"parseObjectData",value:function(t,e,r,n){return(0,m.y).bind(this)(t,e,r,n)}},{key:"update",value:function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}},{key:"getMinMax",value:function(){var t=this,e=this._cachedMeta,r={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach(function(e,n){var i=t.getParsed(n).r;!isNaN(i)&&t.chart.getDataVisibility(n)&&(i<r.min&&(r.min=i),i>r.max&&(r.max=i))}),r}},{key:"_updateRadius",value:function(){var t=this.chart,e=t.chartArea,r=t.options,n=Math.max(Math.min(e.right-e.left,e.bottom-e.top)/2,0),i=Math.max(r.cutoutPercentage?n/100*r.cutoutPercentage:1,0),a=(n-i)/t.getVisibleDatasetCount();this.outerRadius=n-a*this.index,this.innerRadius=this.outerRadius-a}},{key:"updateElements",value:function(t,e,r,n){var i,a="reset"===n,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,c=l.yCenter,h=l.getIndexAngle(0)-.5*m.P,f=h,d=360/this.countVisibleElements();for(i=0;i<e;++i)f+=this._computeAngle(i,n,d);for(i=e;i<e+r;i++){var p=t[i],v=f,g=f+this._computeAngle(i,n,d),y=o.getDataVisibility(i)?l.getDistanceFromCenterForValue(this.getParsed(i).r):0;f=g,a&&(s.animateScale&&(y=0),s.animateRotate&&(v=g=h));var b={x:u,y:c,innerRadius:0,outerRadius:y,startAngle:v,endAngle:g,options:this.resolveDataElementOptions(i,p.active?"active":n)};this.updateElement(p,i,b,n)}}},{key:"countVisibleElements",value:function(){var t=this,e=this._cachedMeta,r=0;return e.data.forEach(function(e,n){!isNaN(t.getParsed(n).r)&&t.chart.getDataVisibility(n)&&r++}),r}},{key:"_computeAngle",value:function(t,e,r){return this.chart.getDataVisibility(t)?(0,m.t)(this.resolveDataElementOptions(t,e).angle||r):0}}]),r}(F);(0,s._)(U,"id","polarArea"),(0,s._)(U,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),(0,s._)(U,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(t){var e=t.data;if(e.labels.length&&e.datasets.length){var r=t.legend.options.labels,n=r.pointStyle,i=r.color;return e.labels.map(function(e,r){var a=t.getDatasetMeta(0).controller.getStyle(r);return{text:e,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,fontColor:i,lineWidth:a.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick:function(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var K=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return r}(W);(0,s._)(K,"id","pie"),(0,s._)(K,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Y=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta.vScale,r=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(r[e.axis])}}},{key:"parseObjectData",value:function(t,e,r,n){return(0,m.y).bind(this)(t,e,r,n)}},{key:"update",value:function(t){var e=this._cachedMeta,r=e.dataset,n=e.data||[],i=e.iScale.getLabels();if(r.points=n,"resize"!==t){var a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);var o={_loop:!0,_fullLoop:i.length===n.length,options:a};this.updateElement(r,void 0,o,t)}this.updateElements(n,0,n.length,t)}},{key:"updateElements",value:function(t,e,r,n){for(var i=this._cachedMeta.rScale,a="reset"===n,o=e;o<e+r;o++){var s=t[o],l=this.resolveDataElementOptions(o,s.active?"active":n),u=i.getPointPositionForValue(o,this.getParsed(o).r),c=a?i.xCenter:u.x,h=a?i.yCenter:u.y,f={x:c,y:h,angle:u.angle,skip:isNaN(c)||isNaN(h),options:l};this.updateElement(s,o,f,n)}}}]),r}(F);(0,s._)(Y,"id","radar"),(0,s._)(Y,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),(0,s._)(Y,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var X=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"getLabelAndValue",value:function(t){var e=this._cachedMeta,r=this.chart.data.labels||[],n=e.xScale,i=e.yScale,a=this.getParsed(t),o=n.getLabelForValue(a.x),s=i.getLabelForValue(a.y);return{label:r[t]||"",value:"("+o+", "+s+")"}}},{key:"update",value:function(t){var e=this._cachedMeta,r=e.data,n=void 0===r?[]:r,i=this.chart._animationsDisabled,a=(0,m.q)(e,n,i),o=a.start,s=a.count;if(this._drawStart=o,this._drawCount=s,(0,m.w)(e)&&(o=0,s=n.length),this.options.showLine){this.datasetElementType||this.addElements();var l=e.dataset,u=e._dataset;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!u._decimated,l.points=n;var c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(l,void 0,{animated:!i,options:c},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(n,o,s,t)}},{key:"addElements",value:function(){var t=this.options.showLine;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),(0,l._)((0,u._)(r.prototype),"addElements",this).call(this)}},{key:"updateElements",value:function(t,e,r,n){for(var i="reset"===n,a=this._cachedMeta,o=a.iScale,s=a.vScale,l=a._stacked,u=a._dataset,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),f=this.includeOptions(n,h),d=o.axis,p=s.axis,v=this.options,g=v.spanGaps,y=v.segment,b=(0,m.x)(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||i||"none"===n,x=e>0&&this.getParsed(e-1),k=e;k<e+r;++k){var w=t[k],M=this.getParsed(k),S=_?w:{},O=(0,m.k)(M[p]),A=S[d]=o.getPixelForValue(M[d],k),E=S[p]=i||O?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,M,l):M[p],k);S.skip=isNaN(A)||isNaN(E)||O,S.stop=k>0&&Math.abs(M[d]-x[d])>b,y&&(S.parsed=M,S.raw=u.data[k]),f&&(S.options=h||this.resolveDataElementOptions(k,w.active?"active":n)),_||this.updateElement(w,k,S,n),x=M}this.updateSharedOptions(h,n,c)}},{key:"getMaxOverflow",value:function(){var t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){for(var r=0,n=e.length-1;n>=0;--n)r=Math.max(r,e[n].size(this.resolveDataElementOptions(n))/2);return r>0&&r}var i=t.dataset,a=i.options&&i.options.borderWidth||0;return e.length?Math.max(a,e[0].size(this.resolveDataElementOptions(0)),e[e.length-1].size(this.resolveDataElementOptions(e.length-1)))/2:a}}]),r}(F);(0,s._)(X,"id","scatter"),(0,s._)(X,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),(0,s._)(X,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var $=Object.freeze({__proto__:null,BarController:V,BubbleController:z,DoughnutController:W,LineController:H,PieController:K,PolarAreaController:U,RadarController:Y,ScatterController:X});function q(){throw Error("This method is not implemented: Check that a complete date adapter is provided.")}var G={_date:function(){function t(e){(0,a._)(this,t),(0,s._)(this,"options",void 0),this.options=e||{}}return(0,o._)(t,[{key:"init",value:function(){}},{key:"formats",value:function(){return q()}},{key:"parse",value:function(){return q()}},{key:"format",value:function(){return q()}},{key:"add",value:function(){return q()}},{key:"diff",value:function(){return q()}},{key:"startOf",value:function(){return q()}},{key:"endOf",value:function(){return q()}}],[{key:"override",value:function(e){Object.assign(t.prototype,e)}}]),t}()};function Q(t,e,r,n,i){for(var a=t.getSortedVisibleDatasetMetas(),o=r[e],s=0,l=a.length;s<l;++s)for(var u=a[s],c=u.index,h=u.data,f=function(t,e,r,n){var i=t.controller,a=t.data,o=t._sorted,s=i._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(s&&e===s.axis&&"r"!==e&&o&&a.length){var u=s._reversePixels?m.A:m.B;if(n){if(i._sharedOptions){var c=a[0],h="function"==typeof c.getRange&&c.getRange(e);if(h){var f=u(a,e,r-h),d=u(a,e,r+h);return{lo:f.lo,hi:d.hi}}}}else{var p=u(a,e,r);if(l){var v=i._cachedMeta.vScale,g=t._parsed,y=g.slice(0,p.lo+1).reverse().findIndex(function(t){return!(0,m.k)(t[v.axis])});p.lo-=Math.max(0,y);var b=g.slice(p.hi).findIndex(function(t){return!(0,m.k)(t[v.axis])});p.hi+=Math.max(0,b)}return p}}return{lo:0,hi:a.length-1}}(a[s],e,o,i),d=f.lo,p=f.hi,v=d;v<=p;++v){var g=h[v];g.skip||n(g,c,v)}}function J(t,e,r,n,i){var a=[];return(i||t.isPointInArea(e))&&Q(t,r,e,function(r,o,s){(i||(0,m.C)(r,t.chartArea,0))&&r.inRange(e.x,e.y,n)&&a.push({element:r,datasetIndex:o,index:s})},!0),a}function Z(t,e,r,n,i,a){var o,s,l,u,c,h;return a||t.isPointInArea(e)?"r"!==r||n?(o=[],s=-1!==r.indexOf("x"),l=-1!==r.indexOf("y"),u=function(t,e){return Math.sqrt(Math.pow(s?Math.abs(t.x-e.x):0,2)+Math.pow(l?Math.abs(t.y-e.y):0,2))},c=Number.POSITIVE_INFINITY,Q(t,r,e,function(r,s,l){var h=r.inRange(e.x,e.y,i);if(!n||h){var f=r.getCenterPoint(i);if(a||t.isPointInArea(f)||h){var d=u(e,f);d<c?(o=[{element:r,datasetIndex:s,index:l}],c=d):d===c&&o.push({element:r,datasetIndex:s,index:l})}}}),o):(h=[],Q(t,r,e,function(t,r,n){var a=t.getProps(["startAngle","endAngle"],i),o=a.startAngle,s=a.endAngle,l=(0,m.D)(t,{x:e.x,y:e.y}).angle;(0,m.p)(l,o,s)&&h.push({element:t,datasetIndex:r,index:n})}),h):[]}function tt(t,e,r,n,i){var a=[],o="x"===r?"inXRange":"inYRange",s=!1;return(Q(t,r,e,function(t,n,l){t[o]&&t[o](e[r],i)&&(a.push({element:t,datasetIndex:n,index:l}),s=s||t.inRange(e.x,e.y,i))}),n&&!s)?[]:a}var te={evaluateInteractionItems:Q,modes:{index:function(t,e,r,n){var i=(0,m.z)(e,t),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?J(t,i,a,n,o):Z(t,i,a,!1,n,o),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(function(t){var e=s[0].index,r=t.data[e];r&&!r.skip&&l.push({element:r,datasetIndex:t.index,index:e})}),l):[]},dataset:function(t,e,r,n){var i=(0,m.z)(e,t),a=r.axis||"xy",o=r.includeInvisible||!1,s=r.intersect?J(t,i,a,n,o):Z(t,i,a,!1,n,o);if(s.length>0){var l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(var c=0;c<u.length;++c)s.push({element:u[c],datasetIndex:l,index:c})}return s},point:function(t,e,r,n){var i=(0,m.z)(e,t);return J(t,i,r.axis||"xy",n,r.includeInvisible||!1)},nearest:function(t,e,r,n){var i=(0,m.z)(e,t),a=r.axis||"xy",o=r.includeInvisible||!1;return Z(t,i,a,r.intersect,n,o)},x:function(t,e,r,n){var i=(0,m.z)(e,t);return tt(t,i,"x",r.intersect,n)},y:function(t,e,r,n){var i=(0,m.z)(e,t);return tt(t,i,"y",r.intersect,n)}}},tr=["left","top","right","bottom"];function tn(t,e){return t.filter(function(t){return t.pos===e})}function ti(t,e){return t.filter(function(t){return -1===tr.indexOf(t.pos)&&t.box.axis===e})}function ta(t,e){return t.sort(function(t,r){var n=e?r:t,i=e?t:r;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function to(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function ts(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 tl(t,e,r,n){var i,a,o,s,l,u,c=[];for(i=0,a=t.length,l=0;i<a;++i){(s=(o=t[i]).box).update(o.width||e.w,o.height||e.h,function(t,e){var r=e.maxPadding;return function(t){var n={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){n[t]=Math.max(e[t],r[t])}),n}(t?["left","right"]:["top","bottom"])}(o.horizontal,e));var h=function(t,e,r,n){var i=r.pos,a=r.box,o=t.maxPadding;if(!(0,m.i)(i)){r.size&&(t[i]-=r.size);var s=n[r.stack]||{size:0,count:1};s.size=Math.max(s.size,r.horizontal?a.height:a.width),r.size=s.size/s.count,t[i]+=r.size}a.getPadding&&ts(o,a.getPadding());var l=Math.max(0,e.outerWidth-to(o,t,"left","right")),u=Math.max(0,e.outerHeight-to(o,t,"top","bottom")),c=l!==t.w,h=u!==t.h;return t.w=l,t.h=u,r.horizontal?{same:c,other:h}:{same:h,other:c}}(e,r,o,n),f=h.same,d=h.other;l|=f&&c.length,u=u||d,s.fullSize||c.push(o)}return l&&tl(c,e,r,n)||u}function tu(t,e,r,n,i){t.top=r,t.left=e,t.right=e+n,t.bottom=r+i,t.width=n,t.height=i}function tc(t,e,r,n){var i=r.padding,a=e.x,o=e.y,s=!0,l=!1,u=void 0;try{for(var c,h=t[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var f=c.value,d=f.box,p=n[f.stack]||{count:1,placed:0,weight:1},v=f.stackWeight/p.weight||1;if(f.horizontal){var g=e.w*v,y=p.size||d.height;(0,m.h)(p.start)&&(o=p.start),d.fullSize?tu(d,i.left,o,r.outerWidth-i.right-i.left,y):tu(d,e.left+p.placed,o,g,y),p.start=o,p.placed+=g,o=d.bottom}else{var b=e.h*v,_=p.size||d.width;(0,m.h)(p.start)&&(a=p.start),d.fullSize?tu(d,a,i.top,_,r.outerHeight-i.bottom-i.top):tu(d,a,e.top+p.placed,_,b),p.start=a,p.placed+=b,a=d.right}}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}e.x=a,e.y=o}var th={addBox:function(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:function(t){e.draw(t)}}]},t.boxes.push(e)},removeBox:function(t,e){var r=t.boxes?t.boxes.indexOf(e):-1;-1!==r&&t.boxes.splice(r,1)},configure:function(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update:function(t,e,r,n){if(t){var i,a,o,s,l,u,c,h,f=(0,m.E)(t.options.layout.padding),d=Math.max(e-f.width,0),p=Math.max(r-f.height,0),v=(a=ta((i=function(t){var e,r,n,i,a,o,s,l,u=[];for(e=0,r=(t||[]).length;e<r;++e)i=(n=t[e]).position,a=(s=n.options).stack,o=void 0===(l=s.stackWeight)?1:l,u.push({index:e,box:n,pos:i,horizontal:n.isHorizontal(),weight:n.weight,stack:a&&i+a,stackWeight:o});return u}(t.boxes)).filter(function(t){return t.box.fullSize}),!0),o=ta(tn(i,"left"),!0),s=ta(tn(i,"right")),l=ta(tn(i,"top"),!0),u=ta(tn(i,"bottom")),c=ti(i,"x"),h=ti(i,"y"),{fullSize:a,leftAndTop:o.concat(l),rightAndBottom:s.concat(h).concat(u).concat(c),chartArea:tn(i,"chartArea"),vertical:o.concat(s).concat(h),horizontal:l.concat(u).concat(c)}),g=v.vertical,y=v.horizontal;(0,m.F)(t.boxes,function(t){"function"==typeof t.beforeLayout&&t.beforeLayout()});var b=Object.freeze({outerWidth:e,outerHeight:r,padding:f,availableWidth:d,availableHeight:p,vBoxMaxWidth:d/2/(g.reduce(function(t,e){return e.box.options&&!1===e.box.options.display?t:t+1},0)||1),hBoxMaxHeight:p/2}),_=Object.assign({},f);ts(_,(0,m.E)(n));var x=Object.assign({maxPadding:_,w:d,h:p,x:f.left,y:f.top},f),k=function(t,e){var r,n,i,a=function(t){var e={},r=!0,n=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value,l=s.stack,u=s.pos,c=s.stackWeight;if(l&&tr.includes(u)){var h=e[l]||(e[l]={count:0,placed:0,weight:0,size:0});h.count++,h.weight+=c}}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return e}(t),o=e.vBoxMaxWidth,s=e.hBoxMaxHeight;for(r=0,n=t.length;r<n;++r){var l=(i=t[r]).box.fullSize,u=a[i.stack],c=u&&i.stackWeight/u.weight;i.horizontal?(i.width=c?c*o:l&&e.availableWidth,i.height=s):(i.width=o,i.height=c?c*s:l&&e.availableHeight)}return a}(g.concat(y),b);tl(v.fullSize,x,b,k),tl(g,x,b,k),tl(y,x,b,k)&&tl(g,x,b,k),function(t){var e=t.maxPadding;function r(r){var n=Math.max(e[r]-t[r],0);return t[r]+=n,n}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}(x),tc(v.leftAndTop,x,b,k),x.x+=x.w,x.y+=x.h,tc(v.rightAndBottom,x,b,k),t.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},(0,m.F)(v.chartArea,function(e){var r=e.box;Object.assign(r,t.chartArea),r.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}}},tf=function(){function t(){(0,a._)(this,t)}return(0,o._)(t,[{key:"acquireContext",value:function(t,e){}},{key:"releaseContext",value:function(t){return!1}},{key:"addEventListener",value:function(t,e,r){}},{key:"removeEventListener",value:function(t,e,r){}},{key:"getDevicePixelRatio",value:function(){return 1}},{key:"getMaximumSize",value:function(t,e,r,n){return e=Math.max(0,e||t.width),r=r||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):r)}}},{key:"isAttached",value:function(t){return!0}},{key:"updateConfig",value:function(t){}}]),t}(),td=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"acquireContext",value:function(t){return t&&t.getContext&&t.getContext("2d")||null}},{key:"updateConfig",value:function(t){t.options.animation=!1}}]),r}(tf),tp="$chartjs",tv={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tg=function(t){return null===t||""===t},ty=!!m.K&&{passive:!0};function tm(t,e){var r=!0,n=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s===e||s.contains(e))return!0}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}function tb(t,e,r){var n=t.canvas,i=new MutationObserver(function(t){var e=!1,i=!0,a=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;e=(e=e||tm(u.addedNodes,n))&&!tm(u.removedNodes,n)}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}e&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function t_(t,e,r){var n=t.canvas,i=new MutationObserver(function(t){var e=!1,i=!0,a=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;e=(e=e||tm(u.removedNodes,n))&&!tm(u.addedNodes,n)}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}e&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}var tx=new Map,tk=0;function tw(){var t=window.devicePixelRatio;t!==tk&&(tk=t,tx.forEach(function(e,r){r.currentDevicePixelRatio!==t&&e()}))}function tM(t,e,r){var n=t.canvas,i=n&&(0,m.I)(n);if(i){var a=(0,m.L)(function(t,e){var n=i.clientWidth;r(t,e),n<i.clientWidth&&r()},window),o=new ResizeObserver(function(t){var e=t[0],r=e.contentRect.width,n=e.contentRect.height;(0!==r||0!==n)&&a(r,n)});return o.observe(i),tx.size||window.addEventListener("resize",tw),tx.set(t,a),o}}function tS(t,e,r){r&&r.disconnect(),"resize"===e&&(tx.delete(t),tx.size||window.removeEventListener("resize",tw))}function tO(t,e,r){var n=t.canvas,i=(0,m.L)(function(e){if(null!==t.ctx){var n,i,a,o;r((n=tv[e.type]||e.type,a=(i=(0,m.z)(e,t)).x,{type:n,chart:t,native:e,x:void 0!==a?a:null,y:void 0!==(o=i.y)?o:null}))}},t);return n&&n.addEventListener(e,i,ty),i}var tA=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"acquireContext",value:function(t,e){var r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(function(t,e){var r=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[tp]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",tg(i)){var a=(0,m.J)(t,"width");void 0!==a&&(t.width=a)}if(tg(n)){if(""===t.style.height)t.height=t.width/(e||2);else{var o=(0,m.J)(t,"height");void 0!==o&&(t.height=o)}}}(t,e),r):null}},{key:"releaseContext",value:function(t){var e=t.canvas;if(!e[tp])return!1;var r=e[tp].initial;["height","width"].forEach(function(t){var n=r[t];(0,m.k)(n)?e.removeAttribute(t):e.setAttribute(t,n)});var n=r.style||{};return Object.keys(n).forEach(function(t){e.style[t]=n[t]}),e.width=e.width,delete e[tp],!0}},{key:"addEventListener",value:function(t,e,r){this.removeEventListener(t,e);var n=t.$proxies||(t.$proxies={}),i={attach:tb,detach:t_,resize:tM}[e]||tO;n[e]=i(t,e,r)}},{key:"removeEventListener",value:function(t,e){var r=t.$proxies||(t.$proxies={}),n=r[e];n&&((({attach:tS,detach:tS,resize:tS})[e]||function(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,ty)})(t,e,n),r[e]=void 0)}},{key:"getDevicePixelRatio",value:function(){return window.devicePixelRatio}},{key:"getMaximumSize",value:function(t,e,r,n){return(0,m.G)(t,e,r,n)}},{key:"isAttached",value:function(t){var e=t&&(0,m.I)(t);return!!(e&&e.isConnected)}}]),r}(tf);function tE(t){return!(0,m.M)()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?td:tA}var tP=function(){function t(){(0,a._)(this,t),(0,s._)(this,"x",void 0),(0,s._)(this,"y",void 0),(0,s._)(this,"active",!1),(0,s._)(this,"options",void 0),(0,s._)(this,"$animations",void 0)}return(0,o._)(t,[{key:"tooltipPosition",value:function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}}},{key:"hasValue",value:function(){return(0,m.x)(this.x)&&(0,m.x)(this.y)}},{key:"getProps",value:function(t,e){var r=this,n=this.$animations;if(!e||!n)return this;var i={};return t.forEach(function(t){i[t]=n[t]&&n[t].active()?n[t]._to:r[t]}),i}}]),t}();function tD(t,e,r,n,i){var a,o,s,l=(0,m.v)(n,0),u=Math.min((0,m.v)(i,t.length),t.length),c=0;for(r=Math.ceil(r),i&&(r=(a=i-n)/Math.floor(a/r)),s=l;s<0;)s=Math.round(l+ ++c*r);for(o=Math.max(l,0);o<u;o++)o===s&&(e.push(t[o]),s=Math.round(l+ ++c*r))}(0,s._)(tP,"defaults",{}),(0,s._)(tP,"defaultRoutes",void 0);var tC=function(t,e,r){return"top"===e||"left"===e?t[e]+r:t[e]-r},tj=function(t,e){return Math.min(e||t,t)};function tT(t,e){for(var r=[],n=t.length/e,i=t.length,a=0;a<i;a+=n)r.push(t[Math.floor(a)]);return r}function tF(t){return t.drawTicks?t.tickLength:0}function tI(t,e){if(!t.display)return 0;var r=(0,m.a0)(t.font,e),n=(0,m.E)(t.padding);return((0,m.b)(t.text)?t.text.length:1)*r.lineHeight+n.height}var tL=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this)).id=t.id,n.type=t.type,n.options=void 0,n.ctx=t.ctx,n.chart=t.chart,n.top=void 0,n.bottom=void 0,n.left=void 0,n.right=void 0,n.width=void 0,n.height=void 0,n._margins={left:0,right:0,top:0,bottom:0},n.maxWidth=void 0,n.maxHeight=void 0,n.paddingTop=void 0,n.paddingBottom=void 0,n.paddingLeft=void 0,n.paddingRight=void 0,n.axis=void 0,n.labelRotation=void 0,n.min=void 0,n.max=void 0,n._range=void 0,n.ticks=[],n._gridLineItems=null,n._labelItems=null,n._labelSizes=null,n._length=0,n._maxLength=0,n._longestTextCache={},n._startPixel=void 0,n._endPixel=void 0,n._reversePixels=!1,n._userMax=void 0,n._userMin=void 0,n._suggestedMax=void 0,n._suggestedMin=void 0,n._ticksLength=0,n._borderValue=0,n._cache={},n._dataLimitsCached=!1,n.$context=void 0,n}return(0,o._)(r,[{key:"init",value:function(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)}},{key:"parse",value:function(t,e){return t}},{key:"getUserBounds",value:function(){var t=this._userMin,e=this._userMax,r=this._suggestedMin,n=this._suggestedMax;return t=(0,m.O)(t,Number.POSITIVE_INFINITY),e=(0,m.O)(e,Number.NEGATIVE_INFINITY),r=(0,m.O)(r,Number.POSITIVE_INFINITY),n=(0,m.O)(n,Number.NEGATIVE_INFINITY),{min:(0,m.O)(t,r),max:(0,m.O)(e,n),minDefined:(0,m.g)(t),maxDefined:(0,m.g)(e)}}},{key:"getMinMax",value:function(t){var e,r=this.getUserBounds(),n=r.min,i=r.max,a=r.minDefined,o=r.maxDefined;if(a&&o)return{min:n,max:i};for(var s=this.getMatchingVisibleMetas(),l=0,u=s.length;l<u;++l)e=s[l].controller.getMinMax(this,t),a||(n=Math.min(n,e.min)),o||(i=Math.max(i,e.max));return n=o&&n>i?i:n,i=a&&n>i?n:i,{min:(0,m.O)(n,(0,m.O)(i,n)),max:(0,m.O)(i,(0,m.O)(n,i))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}},{key:"getLabelItems",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea;return this._labelItems||(this._labelItems=this._computeLabelItems(t))}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){(0,m.Q)(this.options.beforeUpdate,[this])}},{key:"update",value:function(t,e,r){var n=this.options,i=n.beginAtZero,a=n.grace,o=n.ticks,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=(0,m.R)(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s<this.ticks.length;this._convertTicksToLabels(l?tT(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(t,e){var r=t.options.ticks,n=(h=t.options.offset,f=t._tickSize(),Math.floor(Math.min(t._length/f+(h?0:1),t._maxLength/f))),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?function(t){var e,r,n=[];for(e=0,r=t.length;e<r;e++)t[e].major&&n.push(e);return n}(e):[],o=a.length,s=a[0],l=a[o-1],u=[];if(o>i)return function(t,e,r,n){var i,a=0,o=r[0];for(i=0,n=Math.ceil(n);i<t.length;i++)i===o&&(e.push(t[i]),o=r[++a*n])}(e,u,a,o/i),u;var c=function(t,e,r){var n=function(t){var e,r,n=t.length;if(n<2)return!1;for(r=t[0],e=1;e<n;++e)if(t[e]-t[e-1]!==r)return!1;return r}(t),i=e.length/r;if(!n)return Math.max(i,1);for(var a=(0,m.N)(n),o=0,s=a.length-1;o<s;o++){var l=a[o];if(l>i)return l}return Math.max(i,1)}(a,e,i);if(o>0){var h,f,d,p,v=o>1?Math.round((l-s)/(o-1)):null;for(tD(e,u,c,(0,m.k)(v)?0:s-v,s),d=0,p=o-1;d<p;d++)tD(e,u,c,a[d],a[d+1]);return tD(e,u,c,l,(0,m.k)(v)?e.length:l+v),u}return tD(e,u,c),u}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}},{key:"configure",value:function(){var t,e,r=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,r=!r),this._startPixel=t,this._endPixel=e,this._reversePixels=r,this._length=e-t,this._alignToPixels=this.options.alignToPixels}},{key:"afterUpdate",value:function(){(0,m.Q)(this.options.afterUpdate,[this])}},{key:"beforeSetDimensions",value:function(){(0,m.Q)(this.options.beforeSetDimensions,[this])}},{key:"setDimensions",value:function(){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}},{key:"afterSetDimensions",value:function(){(0,m.Q)(this.options.afterSetDimensions,[this])}},{key:"_callHooks",value:function(t){this.chart.notifyPlugins(t,this.getContext()),(0,m.Q)(this.options[t],[this])}},{key:"beforeDataLimits",value:function(){this._callHooks("beforeDataLimits")}},{key:"determineDataLimits",value:function(){}},{key:"afterDataLimits",value:function(){this._callHooks("afterDataLimits")}},{key:"beforeBuildTicks",value:function(){this._callHooks("beforeBuildTicks")}},{key:"buildTicks",value:function(){return[]}},{key:"afterBuildTicks",value:function(){this._callHooks("afterBuildTicks")}},{key:"beforeTickToLabelConversion",value:function(){(0,m.Q)(this.options.beforeTickToLabelConversion,[this])}},{key:"generateTickLabels",value:function(t){var e,r,n,i=this.options.ticks;for(e=0,r=t.length;e<r;e++)(n=t[e]).label=(0,m.Q)(i.callback,[n.value,e,t],this)}},{key:"afterTickToLabelConversion",value:function(){(0,m.Q)(this.options.afterTickToLabelConversion,[this])}},{key:"beforeCalculateLabelRotation",value:function(){(0,m.Q)(this.options.beforeCalculateLabelRotation,[this])}},{key:"calculateLabelRotation",value:function(){var t,e,r,n=this.options,i=n.ticks,a=tj(this.ticks.length,n.ticks.maxTicksLimit),o=i.minRotation||0,s=i.maxRotation,l=o;if(!this._isVisible()||!i.display||o>=s||a<=1||!this.isHorizontal()){this.labelRotation=o;return}var u=this._getLabelSizes(),c=u.widest.width,h=u.highest.height,f=(0,m.S)(this.chart.width-c,0,this.maxWidth);c+6>(t=n.offset?this.maxWidth/a:f/(a-1))&&(t=f/(a-(n.offset?.5:1)),e=this.maxHeight-tF(n.grid)-i.padding-tI(n.title,this.chart.options.font),r=Math.sqrt(c*c+h*h),l=Math.max(o,Math.min(s,l=(0,m.U)(Math.min(Math.asin((0,m.S)((u.highest.height+6)/t,-1,1)),Math.asin((0,m.S)(e/r,-1,1))-Math.asin((0,m.S)(h/r,-1,1))))))),this.labelRotation=l}},{key:"afterCalculateLabelRotation",value:function(){(0,m.Q)(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){(0,m.Q)(this.options.beforeFit,[this])}},{key:"fit",value:function(){var t={width:0,height:0},e=this.chart,r=this.options,n=r.ticks,i=r.title,a=r.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=tI(i,e.options.font);if(s?(t.width=this.maxWidth,t.height=tF(a)+l):(t.height=this.maxHeight,t.width=tF(a)+l),n.display&&this.ticks.length){var u=this._getLabelSizes(),c=u.first,h=u.last,f=u.widest,d=u.highest,p=2*n.padding,v=(0,m.t)(this.labelRotation),g=Math.cos(v),y=Math.sin(v);if(s){var b=n.mirror?0:y*f.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{var _=n.mirror?0:g*f.width+y*d.height;t.width=Math.min(this.maxWidth,t.width+_+p)}this._calculatePadding(c,h,y,g)}}this._handleMargins(),s?(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)}},{key:"_calculatePadding",value:function(t,e,r,n){var i=this.options,a=i.ticks,o=a.align,s=a.padding,l=i.position,u=0!==this.labelRotation,c="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var h=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,p=0;u?c?(d=n*t.width,p=r*e.height):(d=r*t.height,p=n*e.width):"start"===o?p=e.width:"end"===o?d=t.width:"inner"!==o&&(d=t.width/2,p=e.width/2),this.paddingLeft=Math.max((d-h+s)*this.width/(this.width-h),0),this.paddingRight=Math.max((p-f+s)*this.width/(this.width-f),0)}else{var v=e.height/2,g=t.height/2;"start"===o?(v=0,g=t.height):"end"===o&&(v=e.height,g=0),this.paddingTop=v+s,this.paddingBottom=g+s}}},{key:"_handleMargins",value:function(){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))}},{key:"afterFit",value:function(){(0,m.Q)(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var t=this.options,e=t.axis,r=t.position;return"top"===r||"bottom"===r||"x"===e}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(t){var e,r;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,r=t.length;e<r;e++)(0,m.k)(t[e].label)&&(t.splice(e,1),r--,e--);this.afterTickToLabelConversion()}},{key:"_getLabelSizes",value:function(){var t=this._labelSizes;if(!t){var e=this.options.ticks.sampleSize,r=this.ticks;e<r.length&&(r=tT(r,e)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}},{key:"_computeLabelSizes",value:function(t,e,r){var n,i,a,o,s,l,u,c,h,f,d,p=this.ctx,v=this._longestTextCache,g=[],y=[],b=Math.floor(e/tj(e,r)),_=0,x=0;for(n=0;n<e;n+=b){if(o=t[n].label,s=this._resolveTickFontOptions(n),p.font=l=s.string,u=v[l]=v[l]||{data:{},gc:[]},c=s.lineHeight,h=f=0,(0,m.k)(o)||(0,m.b)(o)){if((0,m.b)(o))for(i=0,a=o.length;i<a;++i)d=o[i],(0,m.k)(d)||(0,m.b)(d)||(h=(0,m.V)(p,u.data,u.gc,h,d),f+=c)}else h=(0,m.V)(p,u.data,u.gc,h,o),f=c;g.push(h),y.push(f),_=Math.max(h,_),x=Math.max(f,x)}(0,m.F)(v,function(t){var r,n=t.gc,i=n.length/2;if(i>e){for(r=0;r<i;++r)delete t.data[n[r]];n.splice(0,i)}});var k=g.indexOf(_),w=y.indexOf(x),M=function(t){return{width:g[t]||0,height:y[t]||0}};return{first:M(0),last:M(e-1),widest:M(k),highest:M(w),widths:g,heights:y}}},{key:"getLabelForValue",value:function(t){return t}},{key:"getPixelForValue",value:function(t,e){return NaN}},{key:"getValueForPixel",value:function(t){}},{key:"getPixelForTick",value:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getPixelForDecimal",value:function(t){this._reversePixels&&(t=1-t);var e=this._startPixel+t*this._length;return(0,m.W)(this._alignToPixels?(0,m.X)(this.chart,e,0):e)}},{key:"getDecimalForPixel",value:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0}},{key:"getContext",value:function(t){var e,r=this.ticks||[];if(t>=0&&t<r.length){var n,i=r[t];return i.$context||(i.$context=(n=this.getContext(),(0,m.j)(n,{tick:i,index:t,type:"tick"})))}return this.$context||(this.$context=(e=this.chart.getContext(),(0,m.j)(e,{scale:this,type:"scale"})))}},{key:"_tickSize",value:function(){var t=this.options.ticks,e=(0,m.t)(this.labelRotation),r=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),i=this._getLabelSizes(),a=t.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?s*r>o*n?o/r:s/n:s*n<o*r?s/r:o/n}},{key:"_isVisible",value:function(){var t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}},{key:"_computeGridLineItems",value:function(t){var e,r,n,i,a,o,s,l,u,c,h,f,d=this.axis,p=this.chart,v=this.options,g=v.grid,y=v.position,b=v.border,_=g.offset,x=this.isHorizontal(),k=this.ticks.length+(_?1:0),w=tF(g),M=[],S=b.setContext(this.getContext()),O=S.display?S.width:0,A=O/2,E=function(t){return(0,m.X)(p,t,O)};if("top"===y)e=E(this.bottom),o=this.bottom-w,l=e-A,c=E(t.top)+A,f=t.bottom;else if("bottom"===y)e=E(this.top),c=t.top,f=E(t.bottom)-A,o=e+A,l=this.top+w;else if("left"===y)e=E(this.right),a=this.right-w,s=e-A,u=E(t.left)+A,h=t.right;else if("right"===y)e=E(this.left),u=t.left,h=E(t.right)-A,a=e+A,s=this.left+w;else if("x"===d){if("center"===y)e=E((t.top+t.bottom)/2+.5);else if((0,m.i)(y)){var P=Object.keys(y)[0],D=y[P];e=E(this.chart.scales[P].getPixelForValue(D))}c=t.top,f=t.bottom,l=(o=e+A)+w}else if("y"===d){if("center"===y)e=E((t.left+t.right)/2);else if((0,m.i)(y)){var C=Object.keys(y)[0],j=y[C];e=E(this.chart.scales[C].getPixelForValue(j))}s=(a=e-A)-w,u=t.left,h=t.right}var T=(0,m.v)(v.ticks.maxTicksLimit,k),F=Math.max(1,Math.ceil(k/T));for(r=0;r<k;r+=F){var I=this.getContext(r),L=g.setContext(I),R=b.setContext(I),B=L.lineWidth,N=L.color,V=R.dash||[],z=R.dashOffset,W=L.tickWidth,H=L.tickColor,U=L.tickBorderDash||[],K=L.tickBorderDashOffset;void 0!==(n=function(t,e,r){var n,i=t.ticks.length,a=Math.min(e,i-1),o=t._startPixel,s=t._endPixel,l=t.getPixelForTick(a);if(!r||(n=1===i?Math.max(l-o,s-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(a-1))/2,!((l+=a<e?n:-n)<o-1e-6)&&!(l>s+1e-6)))return l}(this,r,_))&&(i=(0,m.X)(p,n,B),x?a=s=u=h=i:o=l=c=f=i,M.push({tx1:a,ty1:o,tx2:s,ty2:l,x1:u,y1:c,x2:h,y2:f,width:B,color:N,borderDash:V,borderDashOffset:z,tickWidth:W,tickColor:H,tickBorderDash:U,tickBorderDashOffset:K}))}return this._ticksLength=k,this._borderValue=e,M}},{key:"_computeLabelItems",value:function(t){var e,r,n,i,a,o,s,l,u,c,h,f=this.axis,d=this.options,p=d.position,v=d.ticks,g=this.isHorizontal(),y=this.ticks,b=v.align,_=v.crossAlign,x=v.padding,k=v.mirror,w=tF(d.grid),M=w+x,S=k?-x:M,O=-(0,m.t)(this.labelRotation),A=[],E="middle";if("top"===p)a=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===p)a=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===p){var P=this._getYAxisLabelAlignment(w);o=P.textAlign,i=P.x}else if("right"===p){var D=this._getYAxisLabelAlignment(w);o=D.textAlign,i=D.x}else if("x"===f){if("center"===p)a=(t.top+t.bottom)/2+M;else if((0,m.i)(p)){var C=Object.keys(p)[0],j=p[C];a=this.chart.scales[C].getPixelForValue(j)+M}o=this._getXAxisLabelAlignment()}else if("y"===f){if("center"===p)i=(t.left+t.right)/2-M;else if((0,m.i)(p)){var T=Object.keys(p)[0],F=p[T];i=this.chart.scales[T].getPixelForValue(F)}o=this._getYAxisLabelAlignment(w).textAlign}"y"===f&&("start"===b?E="top":"end"===b&&(E="bottom"));var I=this._getLabelSizes();for(e=0,r=y.length;e<r;++e){n=y[e].label;var L=v.setContext(this.getContext(e));s=this.getPixelForTick(e)+v.labelOffset,u=(l=this._resolveTickFontOptions(e)).lineHeight;var R=(c=(0,m.b)(n)?n.length:1)/2,B=L.color,N=L.textStrokeColor,V=L.textStrokeWidth,z=o;g?(i=s,"inner"===o&&(z=e===r-1?this.options.reverse?"left":"right":0===e?this.options.reverse?"right":"left":"center"),h="top"===p?"near"===_||0!==O?-c*u+u/2:"center"===_?-I.highest.height/2-R*u+u:-I.highest.height+u/2:"near"===_||0!==O?u/2:"center"===_?I.highest.height/2-R*u:I.highest.height-c*u,k&&(h*=-1),0===O||L.showLabelBackdrop||(i+=u/2*Math.sin(O))):(a=s,h=(1-c)*u/2);var W=void 0;if(L.showLabelBackdrop){var H=(0,m.E)(L.backdropPadding),U=I.heights[e],K=I.widths[e],Y=h-H.top,X=0-H.left;switch(E){case"middle":Y-=U/2;break;case"bottom":Y-=U}switch(o){case"center":X-=K/2;break;case"right":X-=K;break;case"inner":e===r-1?X-=K:e>0&&(X-=K/2)}W={left:X,top:Y,width:K+H.width,height:U+H.height,color:L.backdropColor}}A.push({label:n,font:l,textOffset:h,options:{rotation:O,color:B,strokeColor:N,strokeWidth:V,textAlign:z,textBaseline:E,translation:[i,a],backdrop:W}})}return A}},{key:"_getXAxisLabelAlignment",value:function(){var t=this.options,e=t.position,r=t.ticks;if(-(0,m.t)(this.labelRotation))return"top"===e?"left":"right";var n="center";return"start"===r.align?n="left":"end"===r.align?n="right":"inner"===r.align&&(n="inner"),n}},{key:"_getYAxisLabelAlignment",value:function(t){var e,r,n=this.options,i=n.position,a=n.ticks,o=a.crossAlign,s=a.mirror,l=a.padding,u=this._getLabelSizes(),c=t+l,h=u.widest.width;return"left"===i?s?(r=this.right+l,"near"===o?e="left":"center"===o?(e="center",r+=h/2):(e="right",r+=h)):(r=this.right-c,"near"===o?e="right":"center"===o?(e="center",r-=h/2):(e="left",r=this.left)):"right"===i?s?(r=this.left+l,"near"===o?e="right":"center"===o?(e="center",r-=h/2):(e="left",r-=h)):(r=this.left+c,"near"===o?e="left":"center"===o?(e="center",r+=h/2):(e="right",r=this.right)):e="right",{textAlign:e,x:r}}},{key:"_computeLabelArea",value:function(){if(!this.options.ticks.mirror){var t=this.chart,e=this.options.position;if("left"===e||"right"===e)return{top:0,left:this.left,bottom:t.height,right:this.right};if("top"===e||"bottom"===e)return{top:this.top,left:0,bottom:this.bottom,right:t.width}}}},{key:"drawBackground",value:function(){var t=this.ctx,e=this.options.backgroundColor,r=this.left,n=this.top,i=this.width,a=this.height;e&&(t.save(),t.fillStyle=e,t.fillRect(r,n,i,a),t.restore())}},{key:"getLineWidthForValue",value:function(t){var e=this.options.grid;if(!this._isVisible()||!e.display)return 0;var r=this.ticks.findIndex(function(e){return e.value===t});return r>=0?e.setContext(this.getContext(r)).lineWidth:0}},{key:"drawGrid",value:function(t){var e,r,n=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),o=function(t,e,r){r.width&&r.color&&(i.save(),i.lineWidth=r.width,i.strokeStyle=r.color,i.setLineDash(r.borderDash||[]),i.lineDashOffset=r.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(n.display)for(e=0,r=a.length;e<r;++e){var s=a[e];n.drawOnChartArea&&o({x:s.x1,y:s.y1},{x:s.x2,y:s.y2},s),n.drawTicks&&o({x:s.tx1,y:s.ty1},{x:s.tx2,y:s.ty2},{color:s.tickColor,width:s.tickWidth,borderDash:s.tickBorderDash,borderDashOffset:s.tickBorderDashOffset})}}},{key:"drawBorder",value:function(){var t,e,r,n,i=this.chart,a=this.ctx,o=this.options,s=o.border,l=o.grid,u=s.setContext(this.getContext()),c=s.display?u.width:0;if(c){var h=l.setContext(this.getContext(0)).lineWidth,f=this._borderValue;this.isHorizontal()?(t=(0,m.X)(i,this.left,c)-c/2,e=(0,m.X)(i,this.right,h)+h/2,r=n=f):(r=(0,m.X)(i,this.top,c)-c/2,n=(0,m.X)(i,this.bottom,h)+h/2,t=e=f),a.save(),a.lineWidth=u.width,a.strokeStyle=u.color,a.beginPath(),a.moveTo(t,r),a.lineTo(e,n),a.stroke(),a.restore()}}},{key:"drawLabels",value:function(t){if(this.options.ticks.display){var e=this.ctx,r=this._computeLabelArea();r&&(0,m.Y)(e,r);var n=this.getLabelItems(t),i=!0,a=!1,o=void 0;try{for(var s,l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=u.options,h=u.font,f=u.label,d=u.textOffset;(0,m.Z)(e,f,0,d,h,c)}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}r&&(0,m.$)(e)}}},{key:"drawTitle",value:function(){var t=this.ctx,e=this.options,r=e.position,n=e.title,i=e.reverse;if(n.display){var a,o,s=(0,m.a0)(n.font),l=(0,m.E)(n.padding),u=n.align,c=s.lineHeight/2;"bottom"===r||"center"===r||(0,m.i)(r)?(c+=l.bottom,(0,m.b)(n.text)&&(c+=s.lineHeight*(n.text.length-1))):c+=l.top;var h=function(t,e,r,n){var i,a,o,s=t.top,l=t.left,u=t.bottom,c=t.right,h=t.chart,f=h.chartArea,d=h.scales,p=0,v=u-s,g=c-l;if(t.isHorizontal()){if(a=(0,m.a2)(n,l,c),(0,m.i)(r)){var y=Object.keys(r)[0],b=r[y];o=d[y].getPixelForValue(b)+v-e}else o="center"===r?(f.bottom+f.top)/2+v-e:tC(t,r,e);i=c-l}else{if((0,m.i)(r)){var _=Object.keys(r)[0],x=r[_];a=d[_].getPixelForValue(x)-g+e}else a="center"===r?(f.left+f.right)/2-g+e:tC(t,r,e);o=(0,m.a2)(n,u,s),p="left"===r?-m.H:m.H}return{titleX:a,titleY:o,maxWidth:i,rotation:p}}(this,c,r,u),f=h.titleX,d=h.titleY,p=h.maxWidth,v=h.rotation;(0,m.Z)(t,n.text,0,0,s,{color:n.color,maxWidth:p,rotation:v,textAlign:(o=(0,m.a1)(u),(i&&"right"!==r||!i&&"right"===r)&&(o="left"===(a=o)?"right":"right"===a?"left":a),o),textBaseline:"middle",translation:[f,d]})}}},{key:"draw",value:function(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}},{key:"_layers",value:function(){var t=this,e=this.options,n=e.ticks&&e.ticks.z||0,i=(0,m.v)(e.grid&&e.grid.z,-1),a=(0,m.v)(e.border&&e.border.z,0);return this._isVisible()&&this.draw===r.prototype.draw?[{z:i,draw:function(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:a,draw:function(){t.drawBorder()}},{z:n,draw:function(e){t.drawLabels(e)}}]:[{z:n,draw:function(e){t.draw(e)}}]}},{key:"getMatchingVisibleMetas",value:function(t){var e,r,n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];for(e=0,r=n.length;e<r;++e){var o=n[e];o[i]!==this.id||t&&o.type!==t||a.push(o)}return a}},{key:"_resolveTickFontOptions",value:function(t){var e=this.options.ticks.setContext(this.getContext(t));return(0,m.a0)(e.font)}},{key:"_maxDigits",value:function(){var t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}]),r}((0,g._)(tP)),tR=function(){function t(e,r,n){(0,a._)(this,t),this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}return(0,o._)(t,[{key:"isForType",value:function(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}},{key:"register",value:function(t){var e,r,n,i=Object.getPrototypeOf(t);"id"in i&&"defaults"in i&&(n=this.register(i));var a=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw Error("class does not have id: "+t);return o in a||(a[o]=t,e=n,r=(0,m.a4)(Object.create(null),[e?(0,m.d).get(e):{},(0,m.d).get(s),t.defaults]),(0,m.d).set(s,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(function(r){var n=r.split("."),i=n.pop(),a=[t].concat(n).join("."),o=e[r].split("."),s=o.pop(),l=o.join(".");(0,m.d).route(a,i,l,s)})}(s,t.defaultRoutes),t.descriptors&&(0,m.d).describe(s,t.descriptors),this.override&&(0,m.d).override(t.id,t.overrides)),s}},{key:"get",value:function(t){return this.items[t]}},{key:"unregister",value:function(t){var e=this.items,r=t.id,n=this.scope;r in e&&delete e[r],n&&r in m.d[n]&&(delete m.d[n][r],this.override&&delete m.a3[r])}}]),t}(),tB=new(function(){function t(){(0,a._)(this,t),this.controllers=new tR(F,"datasets",!0),this.elements=new tR(tP,"elements"),this.plugins=new tR(Object,"plugins"),this.scales=new tR(tL,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}return(0,o._)(t,[{key:"add",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("register",e)}},{key:"remove",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("unregister",e)}},{key:"addControllers",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("register",e,this.controllers)}},{key:"addElements",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("register",e,this.elements)}},{key:"addPlugins",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("register",e,this.plugins)}},{key:"addScales",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("register",e,this.scales)}},{key:"getController",value:function(t){return this._get(t,this.controllers,"controller")}},{key:"getElement",value:function(t){return this._get(t,this.elements,"element")}},{key:"getPlugin",value:function(t){return this._get(t,this.plugins,"plugin")}},{key:"getScale",value:function(t){return this._get(t,this.scales,"scale")}},{key:"removeControllers",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("unregister",e,this.controllers)}},{key:"removeElements",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("unregister",e,this.elements)}},{key:"removePlugins",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("unregister",e,this.plugins)}},{key:"removeScales",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];this._each("unregister",e,this.scales)}},{key:"_each",value:function(t,e,r){var n=this;(0,p._)(e).forEach(function(e){var i=r||n._getRegistryForType(e);r||i.isForType(e)||i===n.plugins&&e.id?n._exec(t,i,e):(0,m.F)(e,function(e){var i=r||n._getRegistryForType(e);n._exec(t,i,e)})})}},{key:"_exec",value:function(t,e,r){var n=(0,m.a5)(t);(0,m.Q)(r["before"+n],[],r),e[t](r),(0,m.Q)(r["after"+n],[],r)}},{key:"_getRegistryForType",value:function(t){for(var e=0;e<this._typedRegistries.length;e++){var r=this._typedRegistries[e];if(r.isForType(t))return r}return this.plugins}},{key:"_get",value:function(t,e,r){var n=e.get(t);if(void 0===n)throw Error('"'+t+'" is not a registered '+r+".");return n}}]),t}()),tN=function(){function t(){(0,a._)(this,t),this._init=void 0}return(0,o._)(t,[{key:"notify",value:function(t,e,r,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0!==this._init){var i=n?this._descriptors(t).filter(n):this._descriptors(t),a=this._notify(i,t,e,r);return"afterDestroy"===e&&(this._notify(i,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),a}}},{key:"_notify",value:function(t,e,r,n){n=n||{};var i=!0,a=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=u.plugin,h=c[r],f=[e,n,u.options];if(!1===(0,m.Q)(h,f,c)&&n.cancelable)return!1}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}return!0}},{key:"invalidate",value:function(){(0,m.k)(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}},{key:"_descriptors",value:function(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}},{key:"_createDescriptors",value:function(t,e){var r=t&&t.config,n=(0,m.v)(r.options&&r.options.plugins,{}),i=function(t){for(var e={},r=[],n=Object.keys(tB.plugins.items),i=0;i<n.length;i++)r.push(tB.getPlugin(n[i]));for(var a=t.plugins||[],o=0;o<a.length;o++){var s=a[o];-1===r.indexOf(s)&&(r.push(s),e[s.id]=!0)}return{plugins:r,localIds:e}}(r);return!1!==n||e?function(t,e,r,n){var i=e.plugins,a=e.localIds,o=[],s=t.getContext(),l=!0,u=!1,c=void 0;try{for(var h,f=i[Symbol.iterator]();!(l=(h=f.next()).done);l=!0){var d,p=h.value,v=p.id,g=(d=r[v],n||!1!==d?!0===d?{}:d:null);null!==g&&o.push({plugin:p,options:function(t,e,r,n){var i=e.plugin,a=e.local,o=t.pluginScopeKeys(i),s=t.getOptionScopes(r,o);return a&&i.defaults&&s.push(i.defaults),t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(t.config,{plugin:p,local:a[v]},g,s)})}}catch(t){u=!0,c=t}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return o}(t,i,n,e):[]}},{key:"_notifyStateChanges",value:function(t){var e=this._oldCache||[],r=this._cache,n=function(t,e){return t.filter(function(t){return!e.some(function(e){return t.plugin.id===e.plugin.id})})};this._notify(n(e,r),t,"stop"),this._notify(n(r,e),t,"start")}}]),t}();function tV(t,e){var r=m.d.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function tz(t){if("x"===t||"y"===t||"r"===t)return t}function tW(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];if(tz(t))return t;var i=!0,a=!1,o=void 0;try{for(var s,l=r[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u,c=s.value,h=c.axis||(u=c.position,"top"===u||"bottom"===u?"x":"left"===u||"right"===u?"y":void 0)||t.length>1&&tz(t[0].toLowerCase());if(h)return h}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}throw Error("Cannot determine type of '".concat(t,"' axis. Please provide 'axis' or 'position' option."))}function tH(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function tU(t){var e,r,n,i,a=t.options||(t.options={});a.plugins=(0,m.v)(a.plugins,{}),a.scales=(e=m.a3[t.type]||{scales:{}},r=a.scales||{},n=tV(t.type,a),i=Object.create(null),Object.keys(r).forEach(function(a){var o=r[a];if(!(0,m.i)(o))return console.error("Invalid scale configuration for scale: ".concat(a));if(o._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(a));var s=tW(a,o,function(t,e){if(e.data&&e.data.datasets){var r=e.data.datasets.filter(function(e){return e.xAxisID===t||e.yAxisID===t});if(r.length)return tH(t,"x",r[0])||tH(t,"y",r[0])}return{}}(a,t),m.d.scales[o.type]),l=s===n?"_index_":"_value_",u=e.scales||{};i[a]=(0,m.ab)(Object.create(null),[{axis:s},o,u[s],u[l]])}),t.data.datasets.forEach(function(e){var n=e.type||t.type,o=e.indexAxis||tV(n,a),s=(m.a3[n]||{}).scales||{};Object.keys(s).forEach(function(t){var n,a=(n=t,"_index_"===t?n=o:"_value_"===t&&(n="x"===o?"y":"x"),n),l=e[a+"AxisID"]||a;i[l]=i[l]||Object.create(null),(0,m.ab)(i[l],[{axis:a},r[l],s[t]])})}),Object.keys(i).forEach(function(t){var e=i[t];(0,m.ab)(e,[m.d.scales[e.type],m.d.scale])}),i)}function tK(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}var tY=new Map,tX=new Set;function t$(t,e){var r=tY.get(t);return r||(r=e(),tY.set(t,r),tX.add(r)),r}var tq=function(t,e,r){var n=(0,m.f)(e,r);void 0!==n&&t.add(n)},tG=function(){function t(e){var r;(0,a._)(this,t),this._config=((r=(r=e)||{}).data=tK(r.data),tU(r),r),this._scopeCache=new Map,this._resolverCache=new Map}return(0,o._)(t,[{key:"platform",get:function(){return this._config.platform}},{key:"type",get:function(){return this._config.type},set:function(t){this._config.type=t}},{key:"data",get:function(){return this._config.data},set:function(t){this._config.data=tK(t)}},{key:"options",get:function(){return this._config.options},set:function(t){this._config.options=t}},{key:"plugins",get:function(){return this._config.plugins}},{key:"update",value:function(){var t=this._config;this.clearCache(),tU(t)}},{key:"clearCache",value:function(){this._scopeCache.clear(),this._resolverCache.clear()}},{key:"datasetScopeKeys",value:function(t){return t$(t,function(){return[["datasets.".concat(t),""]]})}},{key:"datasetAnimationScopeKeys",value:function(t,e){return t$("".concat(t,".transition.").concat(e),function(){return[["datasets.".concat(t,".transitions.").concat(e),"transitions.".concat(e)],["datasets.".concat(t),""]]})}},{key:"datasetElementScopeKeys",value:function(t,e){return t$("".concat(t,"-").concat(e),function(){return[["datasets.".concat(t,".elements.").concat(e),"datasets.".concat(t),"elements.".concat(e),""]]})}},{key:"pluginScopeKeys",value:function(t){var e=t.id,r=this.type;return t$("".concat(r,"-plugin-").concat(e),function(){return[["plugins.".concat(e)].concat((0,p._)(t.additionalOptionScopes||[]))]})}},{key:"_cachedScopes",value:function(t,e){var r=this._scopeCache,n=r.get(t);return(!n||e)&&(n=new Map,r.set(t,n)),n}},{key:"getOptionScopes",value:function(t,e,r){var n=this.options,i=this.type,a=this._cachedScopes(t,r),o=a.get(e);if(o)return o;var s=new Set;e.forEach(function(e){t&&(s.add(t),e.forEach(function(e){return tq(s,t,e)})),e.forEach(function(t){return tq(s,n,t)}),e.forEach(function(t){return tq(s,m.a3[i]||{},t)}),e.forEach(function(t){return tq(s,m.d,t)}),e.forEach(function(t){return tq(s,m.a6,t)})});var l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),tX.has(e)&&a.set(e,l),l}},{key:"chartOptionScopes",value:function(){var t=this.options,e=this.type;return[t,m.a3[e]||{},m.d.datasets[e]||{},{type:e},m.d,m.a6]}},{key:"resolveNamedOptions",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],i={$shared:!0},a=tQ(this._resolverCache,t,n),o=a.resolver,s=a.subPrefixes,l=o;if(function(t,e){var r=(0,m.aa)(t),n=r.isScriptable,i=r.isIndexable,a=!0,o=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var c=l.value,h=n(c),f=i(c),d=(f||h)&&t[c];if(h&&((0,m.a7)(d)||tJ(d))||f&&(0,m.b)(d))return!0}}catch(t){o=!0,s=t}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return!1}(o,e)){i.$shared=!1,r=(0,m.a7)(r)?r():r;var u=this.createResolver(t,r,s);l=(0,m.a8)(o,r,u)}var c=!0,h=!1,f=void 0;try{for(var d,p=e[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var v=d.value;i[v]=l[v]}}catch(t){h=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(h)throw f}}return i}},{key:"createResolver",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],n=arguments.length>3?arguments[3]:void 0,i=tQ(this._resolverCache,t,r).resolver;return(0,m.i)(e)?(0,m.a8)(i,e,void 0,n):i}}]),t}();function tQ(t,e,r){var n=t.get(e);n||(n=new Map,t.set(e,n));var i=r.join(),a=n.get(i);return a||(a={resolver:(0,m.a9)(e,r),subPrefixes:r.filter(function(t){return!t.toLowerCase().includes("hover")})},n.set(i,a)),a}var tJ=function(t){return(0,m.i)(t)&&Object.getOwnPropertyNames(t).some(function(e){return(0,m.a7)(t[e])})},tZ=["top","bottom","left","right","chartArea"];function t0(t,e){return"top"===t||"bottom"===t||-1===tZ.indexOf(t)&&"x"===e}function t1(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function t2(t){var e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),(0,m.Q)(r&&r.onComplete,[t],e)}function t5(t){var e=t.chart,r=e.options.animation;(0,m.Q)(r&&r.onProgress,[t],e)}function t3(t){return(0,m.M)()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}var t6={},t8=function(t){var e=t3(t);return Object.values(t6).filter(function(t){return t.canvas===e}).pop()},t4=function(){function t(e,r){var n=this;(0,a._)(this,t);var i=this.config=new tG(r),o=t3(e),s=t8(o);if(s)throw Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");var l=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||tE(o)),this.platform.updateConfig(i);var u=this.platform.acquireContext(o,l.aspectRatio),c=u&&u.canvas,h=c&&c.height,f=c&&c.width;if(this.id=(0,m.ac)(),this.ctx=u,this.canvas=c,this.width=f,this.height=h,this._options=l,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 tN,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(0,m.ad)(function(t){return n.update(t)},l.resizeDelay||0),this._dataChanges=[],t6[this.id]=this,!u||!c){console.error("Failed to create chart: can't acquire context from the given item");return}b.listen(this,"complete",t2),b.listen(this,"progress",t5),this._initialize(),this.attached&&this.update()}return(0,o._)(t,[{key:"aspectRatio",get:function(){var t=this.options,e=t.aspectRatio,r=t.maintainAspectRatio,n=this.width,i=this.height,a=this._aspectRatio;return(0,m.k)(e)?r&&a?a:i?n/i:null:e}},{key:"data",get:function(){return this.config.data},set:function(t){this.config.data=t}},{key:"options",get:function(){return this._options},set:function(t){this.config.options=t}},{key:"registry",get:function(){return tB}},{key:"_initialize",value:function(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():(0,m.ae)(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}},{key:"clear",value:function(){return(0,m.af)(this.canvas,this.ctx),this}},{key:"stop",value:function(){return b.stop(this),this}},{key:"resize",value:function(t,e){b.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}},{key:"_resize",value:function(t,e){var r=this.options,n=this.canvas,i=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(n,t,e,i),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,(0,m.ae)(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),(0,m.Q)(r.onResize,[this,a],this),this.attached&&this._doResize(s)&&this.render())}},{key:"ensureScalesHaveIDs",value:function(){var t=this.options.scales||{};(0,m.F)(t,function(t,e){t.id=e})}},{key:"buildOrUpdateScales",value:function(){var t=this,e=this.options,r=e.scales,n=this.scales,i=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{}),a=[];r&&(a=a.concat(Object.keys(r).map(function(t){var e=r[t],n=tW(t,e),i="r"===n,a="x"===n;return{options:e,dposition:i?"chartArea":a?"bottom":"left",dtype:i?"radialLinear":a?"category":"linear"}}))),(0,m.F)(a,function(r){var a=r.options,o=a.id,s=tW(o,a),l=(0,m.v)(a.type,r.dtype);(void 0===a.position||t0(a.position,s)!==t0(r.dposition))&&(a.position=r.dposition),i[o]=!0;var u=null;o in n&&n[o].type===l?u=n[o]:n[(u=new(tB.getScale(l))({id:o,type:l,ctx:t.ctx,chart:t})).id]=u,u.init(a,e)}),(0,m.F)(i,function(t,e){t||delete n[e]}),(0,m.F)(n,function(e){th.configure(t,e,e.options),th.addBox(t,e)})}},{key:"_updateMetasets",value:function(){var t=this._metasets,e=this.data.datasets.length,r=t.length;if(t.sort(function(t,e){return t.index-e.index}),r>e){for(var n=e;n<r;++n)this._destroyDatasetMeta(n);t.splice(e,r-e)}this._sortedMetasets=t.slice(0).sort(t1("order","index"))}},{key:"_removeUnreferencedMetasets",value:function(){var t=this,e=this._metasets,r=this.data.datasets;e.length>r.length&&delete this._stacks,e.forEach(function(e,n){0===r.filter(function(t){return t===e._dataset}).length&&t._destroyDatasetMeta(n)})}},{key:"buildOrUpdateControllers",value:function(){var t,e,r=[],n=this.data.datasets;for(this._removeUnreferencedMetasets(),t=0,e=n.length;t<e;t++){var i=n[t],a=this.getDatasetMeta(t),o=i.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(t),a=this.getDatasetMeta(t)),a.type=o,a.indexAxis=i.indexAxis||tV(o,this.options),a.order=i.order||0,a.index=t,a.label=""+i.label,a.visible=this.isDatasetVisible(t),a.controller)a.controller.updateIndex(t),a.controller.linkScales();else{var s=tB.getController(o),l=m.d.datasets[o],u=l.datasetElementType,c=l.dataElementType;Object.assign(s,{dataElementType:tB.getElement(c),datasetElementType:u&&tB.getElement(u)}),a.controller=new s(this,t),r.push(a.controller)}}return this._updateMetasets(),r}},{key:"_resetElements",value:function(){var t=this;(0,m.F)(this.data.datasets,function(e,r){t.getDatasetMeta(r).controller.reset()},this)}},{key:"reset",value:function(){this._resetElements(),this.notifyPlugins("reset")}},{key:"update",value:function(t){var e=this.config;e.update();var r=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1!==this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){var i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");for(var a=0,o=0,s=this.data.datasets.length;o<s;o++){var l=this.getDatasetMeta(o).controller,u=!n&&-1===i.indexOf(l);l.buildOrUpdateElements(u),a=Math.max(+l.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),n||(0,m.F)(i,function(t){t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(t1("z","_idx"));var c=this._active,h=this._lastEvent;h?this._eventHandler(h,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}}},{key:"_updateScales",value:function(){var t=this;(0,m.F)(this.scales,function(e){th.removeBox(t,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}},{key:"_checkEventBindings",value:function(){var t=this.options,e=new Set(Object.keys(this._listeners)),r=new Set(t.events);(0,m.ag)(e,r)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}},{key:"_updateHiddenIndices",value:function(){var t=this._hiddenIndices,e=this._getUniformDataChanges()||[],r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value,l=s.method,u=s.start,c=s.count,h="_removeElements"===l?-c:c;!function(t,e,r){var n=Object.keys(t),i=!0,a=!1,o=void 0;try{for(var s,l=n[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value,c=+u;if(c>=e){var h=t[u];delete t[u],(r>0||c>e)&&(t[c+r]=h)}}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}}(t,u,h)}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}},{key:"_getUniformDataChanges",value:function(){var t=this._dataChanges;if(t&&t.length){this._dataChanges=[];for(var e=this.data.datasets.length,r=function(e){return new Set(t.filter(function(t){return t[0]===e}).map(function(t,e){return e+","+t.splice(1).join(",")}))},n=r(0),i=1;i<e;i++)if(!(0,m.ag)(n,r(i)))return;return Array.from(n).map(function(t){return t.split(",")}).map(function(t){return{method:t[1],start:+t[2],count:+t[3]}})}}},{key:"_updateLayout",value:function(t){var e=this;if(!1!==this.notifyPlugins("beforeLayout",{cancelable:!0})){th.update(this,this.width,this.height,t);var r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],(0,m.F)(this.boxes,function(t){var r;n&&"chartArea"===t.position||(t.configure&&t.configure(),(r=e._layers).push.apply(r,(0,p._)(t._layers())))},this),this._layers.forEach(function(t,e){t._idx=e}),this.notifyPlugins("afterLayout")}}},{key:"_updateDatasets",value:function(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(var e=0,r=this.data.datasets.length;e<r;++e)this.getDatasetMeta(e).controller.configure();for(var n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,(0,m.a7)(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}},{key:"_updateDataset",value:function(t,e){var r=this.getDatasetMeta(t),n={meta:r,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(r.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}},{key:"render",value:function(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(b.has(this)?this.attached&&!b.running(this)&&b.start(this):(this.draw(),t2({chart:this})))}},{key:"draw",value:function(){if(this._resizeBeforeDraw){var t,e=this._resizeBeforeDraw,r=e.width,n=e.height;this._resizeBeforeDraw=null,this._resize(r,n)}if(this.clear(),!(this.width<=0)&&!(this.height<=0)&&!1!==this.notifyPlugins("beforeDraw",{cancelable:!0})){var i=this._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(this.chartArea);for(this._drawDatasets();t<i.length;++t)i[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}}},{key:"_getSortedDatasetMetas",value:function(t){var e,r,n=this._sortedMetasets,i=[];for(e=0,r=n.length;e<r;++e){var a=n[e];(!t||a.visible)&&i.push(a)}return i}},{key:"getSortedVisibleDatasetMetas",value:function(){return this._getSortedDatasetMetas(!0)}},{key:"_drawDatasets",value:function(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){for(var t=this.getSortedVisibleDatasetMetas(),e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(t){var e=this.ctx,r={meta:t,index:t.index,cancelable:!0},n=(0,m.ah)(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",r)&&(n&&(0,m.Y)(e,n),t.controller.draw(),n&&(0,m.$)(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}},{key:"isPointInArea",value:function(t){return(0,m.C)(t,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(t,e,r,n){var i=te.modes[e];return"function"==typeof i?i(this,t,r,n):[]}},{key:"getDatasetMeta",value:function(t){var e=this.data.datasets[t],r=this._metasets,n=r.filter(function(t){return t&&t._dataset===e}).pop();return n||(n={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},r.push(n)),n}},{key:"getContext",value:function(){return this.$context||(this.$context=(0,m.j)(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(t){var e=this.data.datasets[t];if(!e)return!1;var r=this.getDatasetMeta(t);return"boolean"==typeof r.hidden?!r.hidden:!e.hidden}},{key:"setDatasetVisibility",value:function(t,e){this.getDatasetMeta(t).hidden=!e}},{key:"toggleDataVisibility",value:function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}},{key:"getDataVisibility",value:function(t){return!this._hiddenIndices[t]}},{key:"_updateVisibility",value:function(t,e,r){var n=r?"show":"hide",i=this.getDatasetMeta(t),a=i.controller._resolveAnimations(void 0,n);(0,m.h)(e)?(i.data[e].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(i,{visible:r}),this.update(function(e){return e.datasetIndex===t?n:void 0}))}},{key:"hide",value:function(t,e){this._updateVisibility(t,e,!1)}},{key:"show",value:function(t,e){this._updateVisibility(t,e,!0)}},{key:"_destroyDatasetMeta",value:function(t){var e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}},{key:"_stop",value:function(){var t,e;for(this.stop(),b.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}},{key:"destroy",value:function(){this.notifyPlugins("beforeDestroy");var t=this.canvas,e=this.ctx;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),(0,m.af)(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete t6[this.id],this.notifyPlugins("afterDestroy")}},{key:"toBase64Image",value:function(){for(var t,e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=this.canvas).toDataURL.apply(t,(0,p._)(r))}},{key:"bindEvents",value:function(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}},{key:"bindUserEvents",value:function(){var t=this,e=this._listeners,r=this.platform,n=function(n,i){r.addEventListener(t,n,i),e[n]=i},i=function(e,r,n){e.offsetX=r,e.offsetY=n,t._eventHandler(e)};(0,m.F)(this.options.events,function(t){return n(t,i)})}},{key:"bindResponsiveEvents",value:function(){var t,e=this;this._responsiveListeners||(this._responsiveListeners={});var r=this._responsiveListeners,n=this.platform,i=function(t,i){n.addEventListener(e,t,i),r[t]=i},a=function(t,i){r[t]&&(n.removeEventListener(e,t,i),delete r[t])},o=function(t,r){e.canvas&&e.resize(t,r)},s=function(){a("attach",s),e.attached=!0,e.resize(),i("resize",o),i("detach",t)};t=function(){e.attached=!1,a("resize",o),e._stop(),e._resize(0,0),i("attach",s)},n.isAttached(this.canvas)?s():t()}},{key:"unbindEvents",value:function(){var t=this;(0,m.F)(this._listeners,function(e,r){t.platform.removeEventListener(t,r,e)}),this._listeners={},(0,m.F)(this._responsiveListeners,function(e,r){t.platform.removeEventListener(t,r,e)}),this._responsiveListeners=void 0}},{key:"updateHoverStyle",value:function(t,e,r){var n,i,a,o=r?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+o+"DatasetHoverStyle"](),i=0,a=t.length;i<a;++i){var s=(n=t[i])&&this.getDatasetMeta(n.datasetIndex).controller;s&&s[o+"HoverStyle"](n.element,n.datasetIndex,n.index)}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t){var e=this,r=this._active||[],n=t.map(function(t){var r=t.datasetIndex,n=t.index,i=e.getDatasetMeta(r);if(!i)throw Error("No dataset found at index "+r);return{datasetIndex:r,element:i.data[n],index:n}});(0,m.ai)(n,r)||(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}},{key:"notifyPlugins",value:function(t,e,r){return this._plugins.notify(this,t,e,r)}},{key:"isPluginEnabled",value:function(t){return 1===this._plugins._cache.filter(function(e){return e.plugin.id===t}).length}},{key:"_updateHoverStyles",value:function(t,e,r){var n=this.options.hover,i=function(t,e){return t.filter(function(t){return!e.some(function(e){return t.datasetIndex===e.datasetIndex&&t.index===e.index})})},a=i(e,t),o=r?t:i(t,e);a.length&&this.updateHoverStyle(a,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}},{key:"_eventHandler",value:function(t,e){var r=this,n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},i=function(e){return(e.options.events||r.options.events).includes(t.native.type)};if(!1!==this.notifyPlugins("beforeEvent",n,i)){var a=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}}},{key:"_handleEvent",value:function(t,e,r){var n,i=this._active,a=void 0===i?[]:i,o=this.options,s=this._getActiveElements(t,a,r,e),l=(0,m.aj)(t),u=(n=this._lastEvent,r&&"mouseout"!==t.type?l?n:t:null);r&&(this._lastEvent=null,(0,m.Q)(o.onHover,[t,s,this],this),l&&(0,m.Q)(o.onClick,[t,s,this],this));var c=!(0,m.ai)(s,a);return(c||e)&&(this._active=s,this._updateHoverStyles(s,a,e)),this._lastEvent=u,c}},{key:"_getActiveElements",value:function(t,e,r,n){if("mouseout"===t.type)return[];if(!r)return e;var i=this.options.hover;return this.getElementsAtEventForMode(t,i.mode,i,n)}}],[{key:"register",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];tB.add.apply(tB,(0,p._)(e)),t7()}},{key:"unregister",value:function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];tB.remove.apply(tB,(0,p._)(e)),t7()}}]),t}();function t7(){return(0,m.F)(t4.instances,function(t){return t._plugins.invalidate()})}function t9(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function et(t,e,r,n,i,a){var o,s,l,u,c,h,f=e.x,d=e.y,p=e.startAngle,v=e.pixelMargin,g=e.innerRadius,y=Math.max(e.outerRadius+n+r-v,0),b=g>0?g+n+r+v:0,_=0,x=i-p;if(n){var k=y>0?y-n:0,w=((g>0?g-n:0)+k)/2;_=(x-(0!==w?x*w/(w+n):x))/2}var M=Math.max(.001,x*y-r/m.P)/y,S=(x-M)/2,O=p+S+_,A=i-S-_,E=(o=A-O,s=e.options.borderRadius,l=(0,m.am)(s,["outerStart","outerEnd","innerStart","innerEnd"]),c=Math.min(u=(y-b)/2,o*b/2),{outerStart:(h=function(t){var e=(y-Math.min(u,t))*o/2;return(0,m.S)(t,0,Math.min(u,e))})(l.outerStart),outerEnd:h(l.outerEnd),innerStart:(0,m.S)(l.innerStart,0,c),innerEnd:(0,m.S)(l.innerEnd,0,c)}),P=E.outerStart,D=E.outerEnd,C=E.innerStart,j=E.innerEnd,T=y-P,F=y-D,I=O+P/T,L=A-D/F,R=b+C,B=b+j,N=O+C/R,V=A-j/B;if(t.beginPath(),a){var z=(I+L)/2;if(t.arc(f,d,y,I,z),t.arc(f,d,y,z,L),D>0){var W=t9(F,L,f,d);t.arc(W.x,W.y,D,L,A+m.H)}var H=t9(B,A,f,d);if(t.lineTo(H.x,H.y),j>0){var U=t9(B,V,f,d);t.arc(U.x,U.y,j,A+m.H,V+Math.PI)}var K=(A-j/b+(O+C/b))/2;if(t.arc(f,d,b,A-j/b,K,!0),t.arc(f,d,b,K,O+C/b,!0),C>0){var Y=t9(R,N,f,d);t.arc(Y.x,Y.y,C,N+Math.PI,O-m.H)}var X=t9(T,O,f,d);if(t.lineTo(X.x,X.y),P>0){var $=t9(T,I,f,d);t.arc($.x,$.y,P,O-m.H,I)}}else{t.moveTo(f,d);var q=Math.cos(I)*y+f,G=Math.sin(I)*y+d;t.lineTo(q,G);var Q=Math.cos(L)*y+f,J=Math.sin(L)*y+d;t.lineTo(Q,J)}t.closePath()}(0,s._)(t4,"defaults",m.d),(0,s._)(t4,"instances",t6),(0,s._)(t4,"overrides",m.a3),(0,s._)(t4,"registry",tB),(0,s._)(t4,"version","4.5.1"),(0,s._)(t4,"getChart",t8);var ee=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),n=e.call(this),(0,s._)((0,i._)(n),"circumference",void 0),(0,s._)((0,i._)(n),"endAngle",void 0),(0,s._)((0,i._)(n),"fullCircles",void 0),(0,s._)((0,i._)(n),"innerRadius",void 0),(0,s._)((0,i._)(n),"outerRadius",void 0),(0,s._)((0,i._)(n),"pixelMargin",void 0),(0,s._)((0,i._)(n),"startAngle",void 0),n.options=void 0,n.circumference=void 0,n.startAngle=void 0,n.endAngle=void 0,n.innerRadius=void 0,n.outerRadius=void 0,n.pixelMargin=0,n.fullCircles=0,t&&Object.assign((0,i._)(n),t),n}return(0,o._)(r,[{key:"inRange",value:function(t,e,r){var n=this.getProps(["x","y"],r),i=(0,m.D)(n,{x:t,y:e}),a=i.angle,o=i.distance,s=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),l=s.startAngle,u=s.endAngle,c=s.innerRadius,h=s.outerRadius,f=s.circumference,d=(this.options.spacing+this.options.borderWidth)/2,p=(0,m.v)(f,u-l),v=(0,m.p)(a,l,u)&&l!==u,g=p>=m.T||v,y=(0,m.ak)(o,c+d,h+d);return g&&y}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),r=e.x,n=e.y,i=e.startAngle,a=e.endAngle,o=e.innerRadius,s=e.outerRadius,l=this.options,u=l.offset,c=l.spacing,h=(i+a)/2,f=(o+s+c+u)/2;return{x:r+Math.cos(h)*f,y:n+Math.sin(h)*f}}},{key:"tooltipPosition",value:function(t){return this.getCenterPoint(t)}},{key:"draw",value:function(t){var e=this.options,r=this.circumference,n=(e.offset||0)/4,i=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=r>m.T?Math.floor(r/m.T):0,0!==r&&!(this.innerRadius<0)&&!(this.outerRadius<0)){t.save();var o=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(o)*n,Math.sin(o)*n);var s=n*(1-Math.sin(Math.min(m.P,r||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,r,n,i){var a=e.fullCircles,o=e.startAngle,s=e.circumference,l=e.endAngle;if(a){et(t,e,r,n,l,i);for(var u=0;u<a;++u)t.fill();isNaN(s)||(l=o+(s%m.T||m.T))}et(t,e,r,n,l,i),t.fill()}(t,this,s,i,a),function(t,e,r,n,i){var a=e.fullCircles,o=e.startAngle,s=e.circumference,l=e.options,u=l.borderWidth,c=l.borderJoinStyle,h=l.borderDash,f=l.borderDashOffset,d=l.borderRadius,p="inner"===l.borderAlign;if(u){t.setLineDash(h||[]),t.lineDashOffset=f,p?(t.lineWidth=2*u,t.lineJoin=c||"round"):(t.lineWidth=u,t.lineJoin=c||"bevel");var v,g,y,b,_,x,k,w,M=e.endAngle;if(a){et(t,e,r,n,M,i);for(var S=0;S<a;++S)t.stroke();isNaN(s)||(M=o+(s%m.T||m.T))}p&&(v=M,g=e.startAngle,y=e.pixelMargin,b=e.x,_=e.y,x=e.outerRadius,k=e.innerRadius,w=y/x,t.beginPath(),t.arc(b,_,x,g-w,v+w),k>y?(w=y/k,t.arc(b,_,k,v+w,g-w,!0)):t.arc(b,_,y,v+m.H,g-m.H),t.closePath(),t.clip()),l.selfJoin&&M-o>=m.P&&0===d&&"miter"!==c&&function(t,e,r){var n=e.startAngle,i=e.x,a=e.y,o=e.outerRadius,s=e.innerRadius,l=e.options,u=l.borderWidth,c=l.borderJoinStyle,h=Math.min(u/o,(0,m.al)(n-r));if(t.beginPath(),t.arc(i,a,o-u/2,n+h/2,r-h/2),s>0){var f=Math.min(u/s,(0,m.al)(n-r));t.arc(i,a,s+u/2,r-f/2,n+f/2,!0)}else{var d=Math.min(u/2,o*(0,m.al)(n-r));if("round"===c)t.arc(i,a,d,r-m.P/2,n+m.P/2,!0);else if("bevel"===c){var p=2*d*d,v=-p*Math.cos(r+m.P/2)+i,g=-p*Math.sin(r+m.P/2)+a,y=p*Math.cos(n+m.P/2)+i,b=p*Math.sin(n+m.P/2)+a;t.lineTo(v,g),t.lineTo(y,b)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,M),a||(et(t,e,r,n,M,i),t.stroke())}}(t,this,s,i,a),t.restore()}}}]),r}((0,g._)(tP));function er(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;t.lineCap=(0,m.v)(r.borderCapStyle,e.borderCapStyle),t.setLineDash((0,m.v)(r.borderDash,e.borderDash)),t.lineDashOffset=(0,m.v)(r.borderDashOffset,e.borderDashOffset),t.lineJoin=(0,m.v)(r.borderJoinStyle,e.borderJoinStyle),t.lineWidth=(0,m.v)(r.borderWidth,e.borderWidth),t.strokeStyle=(0,m.v)(r.borderColor,e.borderColor)}function en(t,e,r){t.lineTo(r.x,r.y)}function ei(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.length,i=r.start,a=void 0===i?0:i,o=r.end,s=void 0===o?n-1:o,l=e.start,u=e.end,c=Math.max(a,l),h=Math.min(s,u);return{count:n,start:c,loop:e.loop,ilen:h<c&&!(a<l&&s<l||a>u&&s>u)?n+h-c:h-c}}function ea(t,e,r,n){var i,a,o,s=e.points,l=e.options,u=ei(s,r,n),c=u.count,h=u.start,f=u.loop,d=u.ilen,p=l.stepped?m.at:l.tension||"monotone"===l.cubicInterpolationMode?m.au:en,v=n||{},g=v.move,y=void 0===g||g,b=v.reverse;for(i=0;i<=d;++i)(a=s[(h+(b?d-i:i))%c]).skip||(y?(t.moveTo(a.x,a.y),y=!1):p(t,o,a,b,l.stepped),o=a);return f&&p(t,o,a=s[(h+(b?d:0))%c],b,l.stepped),!!f}function eo(t,e,r,n){var i,a,o,s,l,u,c=e.points,h=ei(c,r,n),f=h.count,d=h.start,p=h.ilen,v=n||{},g=v.move,y=v.reverse,m=0,b=0,_=function(t){return(d+(y?p-t:t))%f},x=function(){s!==l&&(t.lineTo(m,l),t.lineTo(m,s),t.lineTo(m,u))};for((void 0===g||g)&&(a=c[_(0)],t.moveTo(a.x,a.y)),i=0;i<=p;++i)if(!(a=c[_(i)]).skip){var k=a.x,w=a.y,M=0|k;M===o?(w<s?s=w:w>l&&(l=w),m=(b*m+k)/++b):(x(),t.lineTo(k,w),o=M,b=0,s=l=w),u=w}x()}function es(t){var e=t.options,r=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||r?ea:eo}(0,s._)(ee,"id","arc"),(0,s._)(ee,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),(0,s._)(ee,"defaultRoutes",{backgroundColor:"backgroundColor"}),(0,s._)(ee,"descriptors",{_scriptable:!0,_indexable:function(t){return"borderDash"!==t}});var el="function"==typeof Path2D,eu=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this)).animated=!0,n.options=void 0,n._chart=void 0,n._loop=void 0,n._fullLoop=void 0,n._path=void 0,n._points=void 0,n._segments=void 0,n._decimated=!1,n._pointsUpdated=!1,n._datasetIndex=void 0,t&&Object.assign((0,i._)(n),t),n}return(0,o._)(r,[{key:"updateControlPoints",value:function(t,e){var r=this.options;if((r.tension||"monotone"===r.cubicInterpolationMode)&&!r.stepped&&!this._pointsUpdated){var n=r.spanGaps?this._loop:this._fullLoop;(0,m.an)(this._points,r,t,n,e),this._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=(0,m.ao)(this,this.options.segment))}},{key:"first",value:function(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}},{key:"last",value:function(){var t=this.segments,e=this.points,r=t.length;return r&&e[t[r-1].end]}},{key:"interpolate",value:function(t,e){var r,n,i=this.options,a=t[e],o=this.points,s=(0,m.ap)(this,{property:e,start:a,end:a});if(s.length){var l=[],u=i.stepped?m.aq:i.tension||"monotone"===i.cubicInterpolationMode?m.ar:m.as;for(r=0,n=s.length;r<n;++r){var c=s[r],h=c.start,f=c.end,d=o[h],p=o[f];if(d===p){l.push(d);continue}var v=Math.abs((a-d[e])/(p[e]-d[e])),g=u(d,p,v,i.stepped);g[e]=t[e],l.push(g)}return 1===l.length?l[0]:l}}},{key:"pathSegment",value:function(t,e,r){return es(this)(t,this,e,r)}},{key:"path",value:function(t,e,r){var n=this.segments,i=es(this),a=this._loop;e=e||0,r=r||this.points.length-e;var o=!0,s=!1,l=void 0;try{for(var u,c=n[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value;a&=i(t,this,h,{start:e,end:e+r-1})}}catch(t){s=!0,l=t}finally{try{o||null==c.return||c.return()}finally{if(s)throw l}}return!!a}},{key:"draw",value:function(t,e,r,n){var i=this.options||{};(this.points||[]).length&&i.borderWidth&&(t.save(),function(t,e,r,n){if(el&&!e.options.segment){var i;(i=e._path)||(i=e._path=new Path2D,e.path(i,r,n)&&i.closePath()),er(t,e.options),t.stroke(i)}else!function(t,e,r,n){var i=e.segments,a=e.options,o=es(e),s=!0,l=!1,u=void 0;try{for(var c,h=i[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var f=c.value;er(t,a,f.style),t.beginPath(),o(t,e,f,{start:r,end:r+n-1})&&t.closePath(),t.stroke()}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}}(t,e,r,n)}(t,this,r,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}]),r}((0,g._)(tP));function ec(t,e,r,n){var i=t.options;return Math.abs(e-t.getProps([r],n)[r])<i.radius+i.hitRadius}(0,s._)(eu,"id","line"),(0,s._)(eu,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),(0,s._)(eu,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),(0,s._)(eu,"descriptors",{_scriptable:!0,_indexable:function(t){return"borderDash"!==t&&"fill"!==t}});var eh=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),n=e.call(this),(0,s._)((0,i._)(n),"parsed",void 0),(0,s._)((0,i._)(n),"skip",void 0),(0,s._)((0,i._)(n),"stop",void 0),n.options=void 0,n.parsed=void 0,n.skip=void 0,n.stop=void 0,t&&Object.assign((0,i._)(n),t),n}return(0,o._)(r,[{key:"inRange",value:function(t,e,r){var n=this.options,i=this.getProps(["x","y"],r);return Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(n.hitRadius+n.radius,2)}},{key:"inXRange",value:function(t,e){return ec(this,t,"x",e)}},{key:"inYRange",value:function(t,e){return ec(this,t,"y",e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}}},{key:"size",value:function(t){var e=(t=t||this.options||{}).radius||0,r=(e=Math.max(e,e&&t.hoverRadius||0))&&t.borderWidth||0;return(e+r)*2}},{key:"draw",value:function(t,e){var r=this.options;!this.skip&&!(r.radius<.1)&&(0,m.C)(this,e,this.size(r)/2)&&(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,(0,m.av)(t,r,this.x,this.y))}},{key:"getRange",value:function(){var t=this.options||{};return t.radius+t.hitRadius}}]),r}((0,g._)(tP));function ef(t,e){var r,n,i,a,o,s=t.getProps(["x","y","base","width","height"],e),l=s.x,u=s.y,c=s.base,h=s.width,f=s.height;return t.horizontal?(o=f/2,r=Math.min(l,c),n=Math.max(l,c),i=u-o,a=u+o):(r=l-(o=h/2),n=l+o,i=Math.min(u,c),a=Math.max(u,c)),{left:r,top:i,right:n,bottom:a}}function ed(t,e,r,n){return t?0:(0,m.S)(e,r,n)}function ep(t,e,r,n){var i=null===e,a=null===r,o=t&&!(i&&a)&&ef(t,n);return o&&(i||(0,m.ak)(e,o.left,o.right))&&(a||(0,m.ak)(r,o.top,o.bottom))}function ev(t,e){t.rect(e.x,e.y,e.w,e.h)}function eg(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=t.x!==r.x?-e:0,i=t.y!==r.y?-e:0,a=(t.x+t.w!==r.x+r.w?e:0)-n,o=(t.y+t.h!==r.y+r.h?e:0)-i;return{x:t.x+n,y:t.y+i,w:t.w+a,h:t.h+o,radius:t.radius}}(0,s._)(eh,"id","point"),(0,s._)(eh,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),(0,s._)(eh,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var ey=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this)).options=void 0,n.horizontal=void 0,n.base=void 0,n.width=void 0,n.height=void 0,n.inflateAmount=void 0,t&&Object.assign((0,i._)(n),t),n}return(0,o._)(r,[{key:"draw",value:function(t){var e,r,n,i,a,o,s,l,u,c,h,f,d,p,v,g,y,b,_,x=this.inflateAmount,k=this.options,w=k.borderColor,M=k.backgroundColor,S=(r=(e=ef(this)).right-e.left,n=e.bottom-e.top,i=r/2,a=n/2,o=this.options.borderWidth,s=this.borderSkipped,l=(0,m.ax)(o),u={t:ed(s.top,l.top,0,a),r:ed(s.right,l.right,0,i),b:ed(s.bottom,l.bottom,0,a),l:ed(s.left,l.left,0,i)},c=r/2,h=n/2,f=this.getProps(["enableBorderRadius"]).enableBorderRadius,d=this.options.borderRadius,p=(0,m.ay)(d),v=Math.min(c,h),g=this.borderSkipped,b={topLeft:ed(!(y=f||(0,m.i)(d))||g.top||g.left,p.topLeft,0,v),topRight:ed(!y||g.top||g.right,p.topRight,0,v),bottomLeft:ed(!y||g.bottom||g.left,p.bottomLeft,0,v),bottomRight:ed(!y||g.bottom||g.right,p.bottomRight,0,v)},{outer:{x:e.left,y:e.top,w:r,h:n,radius:b},inner:{x:e.left+u.l,y:e.top+u.t,w:r-u.l-u.r,h:n-u.t-u.b,radius:{topLeft:Math.max(0,b.topLeft-Math.max(u.t,u.l)),topRight:Math.max(0,b.topRight-Math.max(u.t,u.r)),bottomLeft:Math.max(0,b.bottomLeft-Math.max(u.b,u.l)),bottomRight:Math.max(0,b.bottomRight-Math.max(u.b,u.r))}}}),O=S.inner,A=S.outer,E=(_=A.radius).topLeft||_.topRight||_.bottomLeft||_.bottomRight?m.aw:ev;t.save(),(A.w!==O.w||A.h!==O.h)&&(t.beginPath(),E(t,eg(A,x,O)),t.clip(),E(t,eg(O,-x,A)),t.fillStyle=w,t.fill("evenodd")),t.beginPath(),E(t,eg(O,x)),t.fillStyle=M,t.fill(),t.restore()}},{key:"inRange",value:function(t,e,r){return ep(this,t,e,r)}},{key:"inXRange",value:function(t,e){return ep(this,t,null,e)}},{key:"inYRange",value:function(t,e){return ep(this,null,t,e)}},{key:"getCenterPoint",value:function(t){var e=this.getProps(["x","y","base","horizontal"],t),r=e.x,n=e.y,i=e.base,a=e.horizontal;return{x:a?(r+i)/2:r,y:a?n:(n+i)/2}}},{key:"getRange",value:function(t){return"x"===t?this.width/2:this.height/2}}]),r}((0,g._)(tP));(0,s._)(ey,"id","bar"),(0,s._)(ey,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),(0,s._)(ey,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var em=Object.freeze({__proto__:null,ArcElement:ee,BarElement:ey,LineElement:eu,PointElement:eh}),eb=["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)"],e_=eb.map(function(t){return t.replace("rgb(","rgba(").replace(")",", 0.5)")});function ex(t){return eb[t%eb.length]}function ek(t){return e_[t%e_.length]}function ew(t){var e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var eM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout:function(t,e,r){if(r.enabled){var n=t.config,i=n.data.datasets,a=n.options,o=a.elements,s=ew(i)||a&&(a.borderColor||a.backgroundColor)||o&&ew(o)||"rgba(0,0,0,0.1)"!==m.d.borderColor||"rgba(0,0,0,0.1)"!==m.d.backgroundColor;if(r.forceOverride||!s){var l,u=(l=0,function(e,r){var n,i,a,o=t.getDatasetMeta(r).controller;o instanceof W?(n=l,e.backgroundColor=e.data.map(function(){return ex(n++)}),l=n):o instanceof U?(i=l,e.backgroundColor=e.data.map(function(){return ek(i++)}),l=i):o&&(a=l,e.borderColor=ex(a),e.backgroundColor=ek(a),l=++a)});i.forEach(u)}}}};function eS(t){if(t._decimated){var e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function eO(t){t.data.datasets.forEach(function(t){eS(t)})}var eA={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:function(t,e,r){if(!r.enabled){eO(t);return}var n=t.width;t.data.datasets.forEach(function(e,i){var a,o=e._data,s=e.indexAxis,l=t.getDatasetMeta(i),u=o||e.data;if("y"!==(0,m.a)([s,t.options.indexAxis])&&l.controller.supportsDecimation){var c=t.scales[l.xAxisID];if(("linear"===c.type||"time"===c.type)&&!t.options.parsing){var d,p,v,g,y,b,_,x,k,w=(p=u.length,v=0,b=(y=(g=l.iScale).getUserBounds()).min,_=y.max,x=y.minDefined,k=y.maxDefined,x&&(v=(0,m.S)((0,m.B)(u,g.axis,b).lo,0,p-1)),d=k?(0,m.S)((0,m.B)(u,g.axis,_).hi+1,v,p)-v:p-v,{start:v,count:d}),M=w.start,S=w.count;if(S<=(r.threshold||4*n)){eS(e);return}switch((0,m.k)(o)&&(e._data=u,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),r.algorithm){case"lttb":a=function(t,e,r,n,i){var a,o,s,l,u,c=i.samples||n;if(c>=r)return t.slice(e,e+r);var h=[],f=(r-2)/(c-2),d=0,p=e+r-1,v=e;for(a=0,h[d++]=t[v];a<c-2;a++){var g=0,y=0,m=void 0,b=Math.floor((a+1)*f)+1+e,_=Math.min(Math.floor((a+2)*f)+1,r)+e,x=_-b;for(m=b;m<_;m++)g+=t[m].x,y+=t[m].y;g/=x,y/=x;var k=Math.floor(a*f)+1+e,w=Math.min(Math.floor((a+1)*f)+1,r)+e,M=t[v],S=M.x,O=M.y;for(s=l=-1,m=k;m<w;m++)(l=.5*Math.abs((S-g)*(t[m].y-O)-(S-t[m].x)*(y-O)))>s&&(s=l,o=t[m],u=m);h[d++]=o,v=u}return h[d++]=t[p],h}(u,M,S,n,r);break;case"min-max":a=function(t,e,r,n){var i,a,o,s,l,u,c,d,p,v,g=0,y=0,b=[],_=t[e].x,x=t[e+r-1].x-_;for(i=e;i<e+r;++i){o=((a=t[i]).x-_)/x*n,s=a.y;var k=0|o;if(k===l)s<p?(p=s,u=i):s>v&&(v=s,c=i),g=(y*g+a.x)/++y;else{var w=i-1;if(!(0,m.k)(u)&&!(0,m.k)(c)){var M=Math.min(u,c),S=Math.max(u,c);M!==d&&M!==w&&b.push((0,f._)((0,h._)({},t[M]),{x:g})),S!==d&&S!==w&&b.push((0,f._)((0,h._)({},t[S]),{x:g}))}i>0&&w!==d&&b.push(t[w]),b.push(a),l=k,y=0,p=v=s,u=c=d=i}}return b}(u,M,S,n);break;default:throw Error("Unsupported decimation algorithm '".concat(r.algorithm,"'"))}e._decimated=a}}})},destroy:function(t){eO(t)}};function eE(t,e,r,n){if(!n){var i=e[t],a=r[t];return"angle"===t&&(i=(0,m.al)(i),a=(0,m.al)(a)),{property:t,start:i,end:a}}}function eP(t,e,r){for(;e>t;e--){var n=r[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function eD(t,e,r,n){return t&&e?n(t[r],e[r]):t?t[r]:e?e[r]:0}function eC(t,e){var r,n,i,a,o,s,l,u=[],c=!1;return(0,m.b)(t)?(c=!0,u=t):(i=void 0===(n=(r=t||{}).x)?null:n,o=void 0===(a=r.y)?null:a,s=e.points,l=[],e.segments.forEach(function(t){var e=t.start,r=t.end;r=eP(e,r,s);var n=s[e],a=s[r];null!==o?(l.push({x:n.x,y:o}),l.push({x:a.x,y:o})):null!==i&&(l.push({x:i,y:n.y}),l.push({x:i,y:a.y}))}),u=l),u.length?new eu({points:u,options:{tension:0},_loop:c,_fullLoop:c}):null}function ej(t){return t&&!1!==t.fill}var eT=function(){function t(e){(0,a._)(this,t),this.x=e.x,this.y=e.y,this.radius=e.radius}return(0,o._)(t,[{key:"pathSegment",value:function(t,e,r){var n=this.x,i=this.y,a=this.radius;return e=e||{start:0,end:m.T},t.arc(n,i,a,e.end,e.start,!0),!r.bounds}},{key:"interpolate",value:function(t){var e=this.x,r=this.y,n=this.radius,i=t.angle;return{x:e+Math.cos(i)*n,y:r+Math.sin(i)*n,angle:i}}}]),t}();function eF(t,e,r){var n=function(t){var e,r=t.chart,n=t.fill,i=t.line;if((0,m.g)(n))return(e=r.getDatasetMeta(n))&&r.isDatasetVisible(n)?e.dataset:null;if("stack"===n)return function(t){var e=t.scale,r=t.index,n=t.line,i=[],a=n.segments,o=n.points,s=function(t,e){for(var r=[],n=t.getMatchingVisibleMetas("line"),i=0;i<n.length;i++){var a=n[i];if(a.index===e)break;a.hidden||r.unshift(a.dataset)}return r}(e,r);s.push(eC({x:null,y:e.bottom},n));for(var l=0;l<a.length;l++)for(var u=a[l],c=u.start;c<=u.end;c++)!function(t,e,r){for(var n=[],i=0;i<r.length;i++){var a=function(t,e,r){var n=t.interpolate(e,"x");if(!n)return{};for(var i=n.x,a=t.segments,o=t.points,s=!1,l=!1,u=0;u<a.length;u++){var c=a[u],h=o[c.start][r],f=o[c.end][r];if((0,m.ak)(i,h,f)){s=i===h,l=i===f;break}}return{first:s,last:l,point:n}}(r[i],e,"x"),o=a.first,s=a.last,l=a.point;if(l&&(!o||!s)){if(o)n.unshift(l);else if(t.push(l),!s)break}}t.push.apply(t,(0,p._)(n))}(i,o[c],s);return new eu({points:i,options:{}})}(t);if("shape"===n)return!0;var a=(t.scale||{}).getPointPositionForValue?function(t){var e=t.scale,r=t.fill,n=e.options,i=e.getLabels().length,a=n.reverse?e.max:e.min,o="start"===r?a:"end"===r?e.options.reverse?e.min:e.max:(0,m.i)(r)?r.value:e.getBaseValue(),s=[];if(n.grid.circular){var l=e.getPointPositionForValue(0,a);return new eT({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(var u=0;u<i;++u)s.push(e.getPointPositionForValue(u,o));return s}(t):function(t){var e,r,n=t.scale,i=void 0===n?{}:n,a=(e=t.fill,r=null,"start"===e?r=i.bottom:"end"===e?r=i.top:(0,m.i)(e)?r=i.getPixelForValue(e.value):i.getBasePixel&&(r=i.getBasePixel()),r);if((0,m.g)(a)){var o=i.isHorizontal();return{x:o?a:null,y:o?null:a}}return null}(t);return a instanceof eT?a:eC(a,i)}(e),i=e.chart,a=e.index,o=e.line,s=e.scale,l=e.axis,u=o.options,c=u.fill,h=u.backgroundColor,f=c||{},d=f.above,v=f.below,g=i.getDatasetMeta(a),y=(0,m.ah)(i,g);n&&o.points.length&&((0,m.Y)(t,r),function(t,e){var r=e.line,n=e.target,i=e.above,a=e.below,o=e.area,s=e.scale,l=e.clip,u=r._loop?"angle":e.axis;t.save();var c=a;a!==i&&("x"===u?(eI(t,n,o.top),eR(t,{line:r,target:n,color:i,scale:s,property:u,clip:l}),t.restore(),t.save(),eI(t,n,o.bottom)):"y"===u&&(eL(t,n,o.left),eR(t,{line:r,target:n,color:a,scale:s,property:u,clip:l}),t.restore(),t.save(),eL(t,n,o.right),c=i)),eR(t,{line:r,target:n,color:c,scale:s,property:u,clip:l}),t.restore()}(t,{line:o,target:n,above:void 0===d?h:d,below:void 0===v?h:v,area:r,scale:s,axis:l,clip:y}),(0,m.$)(t))}function eI(t,e,r){var n=e.segments,i=e.points,a=!0,o=!1;t.beginPath();var s=!0,l=!1,u=void 0;try{for(var c,h=n[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var f=c.value,d=f.start,p=f.end,v=i[d],g=i[eP(d,p,i)];a?(t.moveTo(v.x,v.y),a=!1):(t.lineTo(v.x,r),t.lineTo(v.x,v.y)),(o=!!e.pathSegment(t,f,{move:o}))?t.closePath():t.lineTo(g.x,r)}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}t.lineTo(e.first().x,r),t.closePath(),t.clip()}function eL(t,e,r){var n=e.segments,i=e.points,a=!0,o=!1;t.beginPath();var s=!0,l=!1,u=void 0;try{for(var c,h=n[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var f=c.value,d=f.start,p=f.end,v=i[d],g=i[eP(d,p,i)];a?(t.moveTo(v.x,v.y),a=!1):(t.lineTo(r,v.y),t.lineTo(v.x,v.y)),(o=!!e.pathSegment(t,f,{move:o}))?t.closePath():t.lineTo(r,g.y)}}catch(t){l=!0,u=t}finally{try{s||null==h.return||h.return()}finally{if(l)throw u}}t.lineTo(r,e.first().y),t.closePath(),t.clip()}function eR(t,e){var r=e.line,n=e.target,i=e.property,a=e.color,o=e.scale,l=e.clip,u=function(t,e,r){var n=t.segments,i=t.points,a=e.points,o=[],l=!0,u=!1,c=void 0;try{for(var h,f=n[Symbol.iterator]();!(l=(h=f.next()).done);l=!0){var d=h.value,p=d.start,v=d.end;v=eP(p,v,i);var g=eE(r,i[p],i[v],d.loop);if(!e.segments){o.push({source:d,target:g,start:i[p],end:i[v]});continue}var y=(0,m.ap)(e,g),b=!0,_=!1,x=void 0;try{for(var k,w=y[Symbol.iterator]();!(b=(k=w.next()).done);b=!0){var M=k.value,S=eE(r,a[M.start],a[M.end],M.loop),O=(0,m.az)(d,i,S),A=!0,E=!1,P=void 0;try{for(var D,C=O[Symbol.iterator]();!(A=(D=C.next()).done);A=!0){var j=D.value;o.push({source:j,target:M,start:(0,s._)({},r,eD(g,S,"start",Math.max)),end:(0,s._)({},r,eD(g,S,"end",Math.min))})}}catch(t){E=!0,P=t}finally{try{A||null==C.return||C.return()}finally{if(E)throw P}}}}catch(t){_=!0,x=t}finally{try{b||null==w.return||w.return()}finally{if(_)throw x}}}}catch(t){u=!0,c=t}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}return o}(r,n,i),c=!0,h=!1,f=void 0;try{for(var d,p=u[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var v=d.value,g=v.source,y=v.target,b=v.start,_=v.end,x=g.style,k=(void 0===x?{}:x).backgroundColor,w=void 0===k?a:k,M=!0!==n;t.save(),t.fillStyle=w,function(t,e,r,n){var i,a,o,s,l=e.chart.chartArea,u=n||{},c=u.property,h=u.start,f=u.end;("x"===c||"y"===c)&&("x"===c?(i=h,a=l.top,o=f,s=l.bottom):(i=l.left,a=h,o=l.right,s=f),t.beginPath(),r&&(i=Math.max(i,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),s=Math.min(s,r.bottom)),t.rect(i,a,o-i,s-a),t.clip())}(t,o,l,M&&eE(i,b,_)),t.beginPath();var S=!!r.pathSegment(t,g),O=void 0;if(M){S?t.closePath():eB(t,n,_,i);var A=!!n.pathSegment(t,y,{move:S,reverse:!0});(O=S&&A)||eB(t,n,b,i)}t.closePath(),t.fill(O?"evenodd":"nonzero"),t.restore()}}catch(t){h=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(h)throw f}}}function eB(t,e,r,n){var i=e.interpolate(r,n);i&&t.lineTo(i.x,i.y)}var eN={id:"filler",afterDatasetsUpdate:function(t,e,r){var n,i,a,o,s=(t.data.datasets||[]).length,l=[];for(i=0;i<s;++i)a=(n=t.getDatasetMeta(i)).dataset,o=null,a&&a.options&&a instanceof eu&&(o={visible:t.isDatasetVisible(i),index:i,fill:function(t,e,r){var n,i,a=function(t){var e=t.options,r=e.fill,n=(0,m.v)(r&&r.target,r);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if((0,m.i)(a))return!isNaN(a.value)&&a;var o=parseFloat(a);return(0,m.g)(o)&&Math.floor(o)===o?(n=a[0],i=o,("-"===n||"+"===n)&&(i=e+i),i!==e&&!(i<0)&&!(i>=r)&&i):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}(a,i,s),chart:t,axis:n.controller.options.indexAxis,scale:n.vScale,line:a}),n.$filler=o,l.push(o);for(i=0;i<s;++i)(o=l[i])&&!1!==o.fill&&(o.fill=function(t,e,r){var n,i=t[e].fill,a=[e];if(!r)return i;for(;!1!==i&&-1===a.indexOf(i);){if(!(0,m.g)(i))return i;if(!(n=t[i]))break;if(n.visible)return i;a.push(i),i=n.fill}return!1}(l,i,r.propagate))},beforeDraw:function(t,e,r){for(var n="beforeDraw"===r.drawTime,i=t.getSortedVisibleDatasetMetas(),a=t.chartArea,o=i.length-1;o>=0;--o){var s=i[o].$filler;s&&(s.line.updateControlPoints(a,s.axis),n&&s.fill&&eF(t.ctx,s,a))}},beforeDatasetsDraw:function(t,e,r){if("beforeDatasetsDraw"===r.drawTime)for(var n=t.getSortedVisibleDatasetMetas(),i=n.length-1;i>=0;--i){var a=n[i].$filler;ej(a)&&eF(t.ctx,a,t.chartArea)}},beforeDatasetDraw:function(t,e,r){var n=e.meta.$filler;ej(n)&&"beforeDatasetDraw"===r.drawTime&&eF(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},eV=function(t,e){var r=t.boxHeight,n=void 0===r?e:r,i=t.boxWidth,a=void 0===i?e:i;return t.usePointStyle&&(n=Math.min(n,e),a=t.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:n,itemHeight:Math.max(e,n)}},ez=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this))._added=!1,n.legendHitBoxes=[],n._hoveredItem=null,n.doughnutMode=!1,n.chart=t.chart,n.options=t.options,n.ctx=t.ctx,n.legendItems=void 0,n.columnSizes=void 0,n.lineWidths=void 0,n.maxHeight=void 0,n.maxWidth=void 0,n.top=void 0,n.bottom=void 0,n.left=void 0,n.right=void 0,n.height=void 0,n.width=void 0,n._margins=void 0,n.position=void 0,n.weight=void 0,n.fullSize=void 0,n}return(0,o._)(r,[{key:"update",value:function(t,e,r){this.maxWidth=t,this.maxHeight=e,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}},{key:"setDimensions",value:function(){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)}},{key:"buildLabels",value:function(){var t=this,e=this.options.labels||{},r=(0,m.Q)(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(function(r){return e.filter(r,t.chart.data)})),e.sort&&(r=r.sort(function(r,n){return e.sort(r,n,t.chart.data)})),this.options.reverse&&r.reverse(),this.legendItems=r}},{key:"fit",value:function(){var t,e,r=this.options,n=this.ctx;if(!r.display){this.width=this.height=0;return}var i=r.labels,a=(0,m.a0)(i.font),o=a.size,s=this._computeTitleHeight(),l=eV(i,o),u=l.boxWidth,c=l.itemHeight;n.font=a.string,this.isHorizontal()?(t=this.maxWidth,e=this._fitRows(s,o,u,c)+10):(e=this.maxHeight,t=this._fitCols(s,a,u,c)+10),this.width=Math.min(t,r.maxWidth||this.maxWidth),this.height=Math.min(e,r.maxHeight||this.maxHeight)}},{key:"_fitRows",value:function(t,e,r,n){var i=this.ctx,a=this.maxWidth,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+o,c=t;i.textAlign="left",i.textBaseline="middle";var h=-1,f=-u;return this.legendItems.forEach(function(t,d){var p=r+e/2+i.measureText(t.text).width;(0===d||l[l.length-1]+p+2*o>a)&&(c+=u,l[l.length-(d>0?0:1)]=0,f+=u,h++),s[d]={left:0,top:f,row:h,width:p,height:n},l[l.length-1]+=p+o}),c}},{key:"_fitCols",value:function(t,e,r,n){var i=this.ctx,a=this.maxHeight,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.columnSizes=[],u=a-t,c=o,h=0,f=0,d=0,p=0;return this.legendItems.forEach(function(t,a){var v,g,y,m={itemWidth:((v=t.text)&&"string"!=typeof v&&(v=v.reduce(function(t,e){return t.length>e.length?t:e})),r+e.size/2+i.measureText(v).width),itemHeight:(g=e.lineHeight,y=n,"string"!=typeof t.text&&(y=eW(t,g)),y)},b=m.itemWidth,_=m.itemHeight;a>0&&f+_+2*o>u&&(c+=h+o,l.push({width:h,height:f}),d+=h+o,p++,h=f=0),s[a]={left:d,top:f,col:p,width:b,height:_},h=Math.max(h,b),f+=_+o}),c+=h,l.push({width:h,height:f}),c}},{key:"adjustHitBoxes",value:function(){if(this.options.display){var t=this._computeTitleHeight(),e=this.legendHitBoxes,r=this.options,n=r.align,i=r.labels.padding,a=r.rtl,o=(0,m.aA)(a,this.left,this.width);if(this.isHorizontal()){var s=0,l=(0,m.a2)(n,this.left+i,this.right-this.lineWidths[s]),u=!0,c=!1,h=void 0;try{for(var f,d=e[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;s!==p.row&&(s=p.row,l=(0,m.a2)(n,this.left+i,this.right-this.lineWidths[s])),p.top+=this.top+t+i,p.left=o.leftForLtr(o.x(l),p.width),l+=p.width+i}}catch(t){c=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(c)throw h}}}else{var v=0,g=(0,m.a2)(n,this.top+t+i,this.bottom-this.columnSizes[v].height),y=!0,b=!1,_=void 0;try{for(var x,k=e[Symbol.iterator]();!(y=(x=k.next()).done);y=!0){var w=x.value;w.col!==v&&(v=w.col,g=(0,m.a2)(n,this.top+t+i,this.bottom-this.columnSizes[v].height)),w.top=g,w.left+=this.left+i,w.left=o.leftForLtr(o.x(w.left),w.width),g+=w.height+i}}catch(t){b=!0,_=t}finally{try{y||null==k.return||k.return()}finally{if(b)throw _}}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){if(this.options.display){var t=this.ctx;(0,m.Y)(t,this),this._draw(),(0,m.$)(t)}}},{key:"_draw",value:function(){var t,e=this,r=this.options,n=this.columnSizes,i=this.lineWidths,a=this.ctx,o=r.align,s=r.labels,l=m.d.color,u=(0,m.aA)(r.rtl,this.left,this.width),c=(0,m.a0)(s.font),h=s.padding,f=c.size,d=f/2;this.drawTitle(),a.textAlign=u.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=c.string;var p=eV(s,f),v=p.boxWidth,g=p.boxHeight,y=p.itemHeight,b=function(t,e,r){if(!(isNaN(v)||v<=0||isNaN(g))&&!(g<0)){a.save();var n=(0,m.v)(r.lineWidth,1);if(a.fillStyle=(0,m.v)(r.fillStyle,l),a.lineCap=(0,m.v)(r.lineCap,"butt"),a.lineDashOffset=(0,m.v)(r.lineDashOffset,0),a.lineJoin=(0,m.v)(r.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=(0,m.v)(r.strokeStyle,l),a.setLineDash((0,m.v)(r.lineDash,[])),s.usePointStyle){var i={radius:g*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:n},o=u.xPlus(t,v/2);(0,m.aE)(a,i,o,e+d,s.pointStyleWidth&&v)}else{var c=e+Math.max((f-g)/2,0),h=u.leftForLtr(t,v),p=(0,m.ay)(r.borderRadius);a.beginPath(),Object.values(p).some(function(t){return 0!==t})?(0,m.aw)(a,{x:h,y:c,w:v,h:g,radius:p}):a.rect(h,c,v,g),a.fill(),0!==n&&a.stroke()}a.restore()}},_=function(t,e,r){(0,m.Z)(a,r.text,t,e+y/2,c,{strikethrough:r.hidden,textAlign:u.textAlign(r.textAlign)})},x=this.isHorizontal(),k=this._computeTitleHeight();t=x?{x:(0,m.a2)(o,this.left+h,this.right-i[0]),y:this.top+h+k,line:0}:{x:this.left+h,y:(0,m.a2)(o,this.top+k+h,this.bottom-n[0].height),line:0},(0,m.aB)(this.ctx,r.textDirection);var w=y+h;this.legendItems.forEach(function(l,f){a.strokeStyle=l.fontColor,a.fillStyle=l.fontColor;var p=a.measureText(l.text).width,g=u.textAlign(l.textAlign||(l.textAlign=s.textAlign)),y=v+d+p,M=t.x,S=t.y;if(u.setWidth(e.width),x?f>0&&M+y+h>e.right&&(S=t.y+=w,t.line++,M=t.x=(0,m.a2)(o,e.left+h,e.right-i[t.line])):f>0&&S+w>e.bottom&&(M=t.x=M+n[t.line].width+h,t.line++,S=t.y=(0,m.a2)(o,e.top+k+h,e.bottom-n[t.line].height)),b(u.x(M),S,l),M=(0,m.aC)(g,M+v+d,x?M+y:e.right,r.rtl),_(u.x(M),S,l),x)t.x+=y+h;else if("string"!=typeof l.text){var O=c.lineHeight;t.y+=eW(l,O)+h}else t.y+=w}),(0,m.aD)(this.ctx,r.textDirection)}},{key:"drawTitle",value:function(){var t,e,r=this.options,n=r.title,i=(0,m.a0)(n.font),a=(0,m.E)(n.padding);if(n.display){var o=(0,m.aA)(r.rtl,this.left,this.width),s=this.ctx,l=n.position,u=i.size/2,c=a.top+u,h=this.left,f=this.width;if(this.isHorizontal())f=(e=Math).max.apply(e,(0,p._)(this.lineWidths)),t=this.top+c,h=(0,m.a2)(r.align,h,this.right-f);else{var d=this.columnSizes.reduce(function(t,e){return Math.max(t,e.height)},0);t=c+(0,m.a2)(r.align,this.top,this.bottom-d-r.labels.padding-this._computeTitleHeight())}var v=(0,m.a2)(l,h,h+f);s.textAlign=o.textAlign((0,m.a1)(l)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,(0,m.Z)(s,n.text,v,t,i)}}},{key:"_computeTitleHeight",value:function(){var t=this.options.title,e=(0,m.a0)(t.font),r=(0,m.E)(t.padding);return t.display?e.lineHeight+r.height:0}},{key:"_getLegendItemAt",value:function(t,e){var r,n,i;if((0,m.ak)(t,this.left,this.right)&&(0,m.ak)(e,this.top,this.bottom)){for(r=0,i=this.legendHitBoxes;r<i.length;++r)if(n=i[r],(0,m.ak)(t,n.left,n.left+n.width)&&(0,m.ak)(e,n.top,n.top+n.height))return this.legendItems[r]}return null}},{key:"handleEvent",value:function(t){var e,r=this.options;if(("mousemove"===(e=t.type)||"mouseout"===e)&&(r.onHover||r.onLeave)||r.onClick&&("click"===e||"mouseup"===e)){var n=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){var i=this._hoveredItem,a=null!==i&&null!==n&&i.datasetIndex===n.datasetIndex&&i.index===n.index;i&&!a&&(0,m.Q)(r.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&(0,m.Q)(r.onHover,[t,n,this],this)}else n&&(0,m.Q)(r.onClick,[t,n,this],this)}}}]),r}((0,g._)(tP));function eW(t,e){return e*(t.text?t.text.length:0)}var eH={id:"legend",_element:ez,start:function(t,e,r){var n=t.legend=new ez({ctx:t.ctx,options:r,chart:t});th.configure(t,n,r),th.addBox(t,n)},stop:function(t){th.removeBox(t,t.legend),delete t.legend},beforeUpdate:function(t,e,r){var n=t.legend;th.configure(t,n,r),n.options=r},afterUpdate:function(t){var e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent:function(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick:function(t,e,r){var n=e.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:function(t){return t.chart.options.color},boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,r=t.legend.options.labels,n=r.usePointStyle,i=r.pointStyle,a=r.textAlign,o=r.color,s=r.useBorderRadius,l=r.borderRadius;return t._getSortedDatasetMetas().map(function(t){var r=t.controller.getStyle(n?0:void 0),u=(0,m.E)(r.borderWidth);return{text:e[t.index].label,fillStyle:r.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:r.borderColor,pointStyle:i||r.pointStyle,rotation:r.rotation,textAlign:a||r.textAlign,borderRadius:s&&(l||r.borderRadius),datasetIndex:t.index}},this)}},title:{color:function(t){return t.chart.options.color},display:!1,position:"center",text:""}},descriptors:{_scriptable:function(t){return!t.startsWith("on")},labels:{_scriptable:function(t){return!["generateLabels","filter","sort"].includes(t)}}}},eU=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this)).chart=t.chart,n.options=t.options,n.ctx=t.ctx,n._padding=void 0,n.top=void 0,n.bottom=void 0,n.left=void 0,n.right=void 0,n.width=void 0,n.height=void 0,n.position=void 0,n.weight=void 0,n.fullSize=void 0,n}return(0,o._)(r,[{key:"update",value:function(t,e){var r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;var n=(0,m.b)(r.text)?r.text.length:1;this._padding=(0,m.E)(r.padding);var i=n*(0,m.a0)(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=i:this.width=i}},{key:"isHorizontal",value:function(){var t=this.options.position;return"top"===t||"bottom"===t}},{key:"_drawArgs",value:function(t){var e,r,n,i=this.top,a=this.left,o=this.bottom,s=this.right,l=this.options,u=l.align,c=0;return this.isHorizontal()?(r=(0,m.a2)(u,a,s),n=i+t,e=s-a):("left"===l.position?(r=a+t,n=(0,m.a2)(u,o,i),c=-.5*m.P):(r=s-t,n=(0,m.a2)(u,i,o),c=.5*m.P),e=o-i),{titleX:r,titleY:n,maxWidth:e,rotation:c}}},{key:"draw",value:function(){var t=this.ctx,e=this.options;if(e.display){var r=(0,m.a0)(e.font),n=r.lineHeight/2+this._padding.top,i=this._drawArgs(n),a=i.titleX,o=i.titleY,s=i.maxWidth,l=i.rotation;(0,m.Z)(t,e.text,0,0,r,{color:e.color,maxWidth:s,rotation:l,textAlign:(0,m.a1)(e.align),textBaseline:"middle",translation:[a,o]})}}}]),r}((0,g._)(tP)),eK={id:"title",_element:eU,start:function(t,e,r){var n;n=new eU({ctx:t.ctx,options:r,chart:t}),th.configure(t,n,r),th.addBox(t,n),t.titleBlock=n},stop:function(t){var e=t.titleBlock;th.removeBox(t,e),delete t.titleBlock},beforeUpdate:function(t,e,r){var n=t.titleBlock;th.configure(t,n,r),n.options=r},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}},eY=new WeakMap,eX={id:"subtitle",start:function(t,e,r){var n=new eU({ctx:t.ctx,options:r,chart:t});th.configure(t,n,r),th.addBox(t,n),eY.set(t,n)},stop:function(t){th.removeBox(t,eY.get(t)),eY.delete(t)},beforeUpdate:function(t,e,r){var n=eY.get(t);th.configure(t,n,r),n.options=r},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}},e$={average:function(t){if(!t.length)return!1;var e,r,n=new Set,i=0,a=0;for(e=0,r=t.length;e<r;++e){var o=t[e].element;if(o&&o.hasValue()){var s=o.tooltipPosition();n.add(s.x),i+=s.y,++a}}return 0!==a&&0!==n.size&&{x:(0,p._)(n).reduce(function(t,e){return t+e})/n.size,y:i/a}},nearest:function(t,e){if(!t.length)return!1;var r,n,i,a=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(r=0,n=t.length;r<n;++r){var l=t[r].element;if(l&&l.hasValue()){var u=l.getCenterPoint(),c=(0,m.aF)(e,u);c<s&&(s=c,i=l)}}if(i){var h=i.tooltipPosition();a=h.x,o=h.y}return{x:a,y:o}}};function eq(t,e){return e&&((0,m.b)(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function eG(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function eQ(t,e){var r=t.chart.ctx,n=t.body,i=t.footer,a=t.title,o=e.boxWidth,s=e.boxHeight,l=(0,m.a0)(e.bodyFont),u=(0,m.a0)(e.titleFont),c=(0,m.a0)(e.footerFont),h=a.length,f=i.length,d=n.length,p=(0,m.E)(e.padding),v=p.height,g=0,y=n.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);y+=t.beforeBody.length+t.afterBody.length,h&&(v+=h*u.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),y&&(v+=d*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(y-d)*l.lineHeight+(y-1)*e.bodySpacing),f&&(v+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);var b=0,_=function(t){g=Math.max(g,r.measureText(t).width+b)};return r.save(),r.font=u.string,(0,m.F)(t.title,_),r.font=l.string,(0,m.F)(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?o+2+e.boxPadding:0,(0,m.F)(n,function(t){(0,m.F)(t.before,_),(0,m.F)(t.lines,_),(0,m.F)(t.after,_)}),b=0,r.font=c.string,(0,m.F)(t.footer,_),r.restore(),{width:g+=p.width,height:v}}function eJ(t,e,r){var n,i,a,o,s,l,u,c,h,f=r.yAlign||e.yAlign||((n=r.y)<(i=r.height)/2?"top":n>t.height-i/2?"bottom":"center");return{xAlign:r.xAlign||e.xAlign||(a=r.x,o=r.width,s=t.width,u=(l=t.chartArea).left,c=l.right,h="center","center"===f?h=a<=(u+c)/2?"left":"right":a<=o/2?h="left":a>=s-o/2&&(h="right"),function(t,e,r,n){var i=n.x,a=n.width,o=r.caretSize+r.caretPadding;if("left"===t&&i+a+o>e.width||"right"===t&&i-a-o<0)return!0}(h,t,e,r)&&(h="center"),h),yAlign:f}}function eZ(t,e,r,n){var i,a,o,s,l=t.caretSize,u=t.caretPadding,c=t.cornerRadius,h=r.xAlign,f=r.yAlign,d=l+u,p=(0,m.ay)(c),v=p.topLeft,g=p.topRight,y=p.bottomLeft,b=p.bottomRight,_=(i=e.x,a=e.width,"right"===h?i-=a:"center"===h&&(i-=a/2),i),x=(o=e.y,s=e.height,"top"===f?o+=d:"bottom"===f?o-=s+d:o-=s/2,o);return"center"===f?"left"===h?_+=d:"right"===h&&(_-=d):"left"===h?_-=Math.max(v,y)+l:"right"===h&&(_+=Math.max(g,b)+l),{x:(0,m.S)(_,0,n.width-e.width),y:(0,m.S)(x,0,n.height-e.height)}}function e0(t,e,r){var n=(0,m.E)(r.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function e1(t,e){var r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}var e2={beforeTitle:m.aG,title:function(t){if(t.length>0){var e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:m.aG,beforeBody:m.aG,beforeLabel:m.aG,label:function(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;var e=t.dataset.label||"";e&&(e+=": ");var r=t.formattedValue;return(0,m.k)(r)||(e+=r),e},labelColor:function(t){var 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:function(){return this.options.bodyColor},labelPointStyle:function(t){var e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:m.aG,afterBody:m.aG,beforeFooter:m.aG,footer:m.aG,afterFooter:m.aG};function e5(t,e,r,n){var i=t[e].call(r,n);return void 0===i?e2[e].call(r,n):i}var e3=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this)).opacity=0,n._active=[],n._eventPosition=void 0,n._size=void 0,n._cachedAnimations=void 0,n._tooltipItems=[],n.$animations=void 0,n.$context=void 0,n.chart=t.chart,n.options=t.options,n.dataPoints=void 0,n.title=void 0,n.beforeBody=void 0,n.body=void 0,n.afterBody=void 0,n.footer=void 0,n.xAlign=void 0,n.yAlign=void 0,n.x=void 0,n.y=void 0,n.height=void 0,n.width=void 0,n.caretX=void 0,n.caretY=void 0,n.labelColors=void 0,n.labelPointStyles=void 0,n.labelTextColors=void 0,n}return(0,o._)(r,[{key:"initialize",value:function(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var t=this._cachedAnimations;if(t)return t;var e=this.chart,r=this.options.setContext(this.getContext()),n=r.enabled&&e.options.animation&&r.animations,i=new w(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}},{key:"getContext",value:function(){var t,e;return this.$context||(this.$context=(t=this.chart.getContext(),e=this._tooltipItems,(0,m.j)(t,{tooltip:this,tooltipItems:e,type:"tooltip"})))}},{key:"getTitle",value:function(t,e){var r=e.callbacks,n=e5(r,"beforeTitle",this,t),i=e5(r,"title",this,t),a=e5(r,"afterTitle",this,t),o=[];return o=eq(o,eG(n)),o=eq(o,eG(i)),o=eq(o,eG(a))}},{key:"getBeforeBody",value:function(t,e){return eq([],eG(e5(e.callbacks,"beforeBody",this,t)))}},{key:"getBody",value:function(t,e){var r=this,n=e.callbacks,i=[];return(0,m.F)(t,function(t){var e={before:[],lines:[],after:[]},a=e1(n,t);eq(e.before,eG(e5(a,"beforeLabel",r,t))),eq(e.lines,e5(a,"label",r,t)),eq(e.after,eG(e5(a,"afterLabel",r,t))),i.push(e)}),i}},{key:"getAfterBody",value:function(t,e){return eq([],eG(e5(e.callbacks,"afterBody",this,t)))}},{key:"getFooter",value:function(t,e){var r=e.callbacks,n=e5(r,"beforeFooter",this,t),i=e5(r,"footer",this,t),a=e5(r,"afterFooter",this,t),o=[];return o=eq(o,eG(n)),o=eq(o,eG(i)),o=eq(o,eG(a))}},{key:"_createItems",value:function(t){var e,r,n=this,i=this._active,a=this.chart.data,o=[],s=[],l=[],u=[];for(e=0,r=i.length;e<r;++e)u.push(function(t,e){var r=e.element,n=e.datasetIndex,i=e.index,a=t.getDatasetMeta(n).controller,o=a.getLabelAndValue(i),s=o.label,l=o.value;return{chart:t,label:s,parsed:a.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:l,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:r}}(this.chart,i[e]));return t.filter&&(u=u.filter(function(e,r,n){return t.filter(e,r,n,a)})),t.itemSort&&(u=u.sort(function(e,r){return t.itemSort(e,r,a)})),(0,m.F)(u,function(e){var r=e1(t.callbacks,e);o.push(e5(r,"labelColor",n,e)),s.push(e5(r,"labelPointStyle",n,e)),l.push(e5(r,"labelTextColor",n,e))}),this.labelColors=o,this.labelPointStyles=s,this.labelTextColors=l,this.dataPoints=u,u}},{key:"update",value:function(t,e){var r,n=this.options.setContext(this.getContext()),i=this._active,a=[];if(i.length){var o=e$[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);var s=this._size=eQ(this,n),l=Object.assign({},o,s),u=eJ(this.chart,n,l),c=eZ(n,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:c.x,y:c.y,width:s.width,height:s.height,caretX:o.x,caretY:o.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:e})}},{key:"drawCaret",value:function(t,e,r,n){var i=this.getCaretPosition(t,r,n);e.lineTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.lineTo(i.x3,i.y3)}},{key:"getCaretPosition",value:function(t,e,r){var n,i,a,o,s,l,u=this.xAlign,c=this.yAlign,h=r.caretSize,f=r.cornerRadius,d=(0,m.ay)(f),p=d.topLeft,v=d.topRight,g=d.bottomLeft,y=d.bottomRight,b=t.x,_=t.y,x=e.width,k=e.height;return"center"===c?(s=_+k/2,"left"===u?(i=(n=b)-h,o=s+h,l=s-h):(i=(n=b+x)+h,o=s-h,l=s+h),a=n):(i="left"===u?b+Math.max(p,g)+h:"right"===u?b+x-Math.max(v,y)-h:this.caretX,"top"===c?(s=(o=_)-h,n=i-h,a=i+h):(s=(o=_+k)+h,n=i+h,a=i-h),l=o),{x1:n,x2:i,x3:a,y1:o,y2:s,y3:l}}},{key:"drawTitle",value:function(t,e,r){var n,i,a,o=this.title,s=o.length;if(s){var l=(0,m.aA)(r.rtl,this.x,this.width);for(a=0,t.x=e0(this,r.titleAlign,r),e.textAlign=l.textAlign(r.titleAlign),e.textBaseline="middle",n=(0,m.a0)(r.titleFont),i=r.titleSpacing,e.fillStyle=r.titleColor,e.font=n.string;a<s;++a)e.fillText(o[a],l.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+i,a+1===s&&(t.y+=r.titleMarginBottom-i)}}},{key:"_drawColorBox",value:function(t,e,r,n,i){var a=this.labelColors[r],o=this.labelPointStyles[r],s=i.boxHeight,l=i.boxWidth,u=(0,m.a0)(i.bodyFont),c=e0(this,"left",i),h=n.x(c),f=s<u.lineHeight?(u.lineHeight-s)/2:0,d=e.y+f;if(i.usePointStyle){var v={radius:Math.min(l,s)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=n.leftForLtr(h,l)+l/2,y=d+s/2;t.strokeStyle=i.multiKeyBackground,t.fillStyle=i.multiKeyBackground,(0,m.av)(t,v,g,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,(0,m.av)(t,v,g,y)}else{t.lineWidth=(0,m.i)(a.borderWidth)?(b=Math).max.apply(b,(0,p._)(Object.values(a.borderWidth))):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;var b,_=n.leftForLtr(h,l),x=n.leftForLtr(n.xPlus(h,1),l-2),k=(0,m.ay)(a.borderRadius);Object.values(k).some(function(t){return 0!==t})?(t.beginPath(),t.fillStyle=i.multiKeyBackground,(0,m.aw)(t,{x:_,y:d,w:l,h:s,radius:k}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),(0,m.aw)(t,{x:x,y:d+1,w:l-2,h:s-2,radius:k}),t.fill()):(t.fillStyle=i.multiKeyBackground,t.fillRect(_,d,l,s),t.strokeRect(_,d,l,s),t.fillStyle=a.backgroundColor,t.fillRect(x,d+1,l-2,s-2))}t.fillStyle=this.labelTextColors[r]}},{key:"drawBody",value:function(t,e,r){var n,i,a,o,s,l,u,c=this.body,h=r.bodySpacing,f=r.bodyAlign,d=r.displayColors,p=r.boxHeight,v=r.boxWidth,g=r.boxPadding,y=(0,m.a0)(r.bodyFont),b=y.lineHeight,_=0,x=(0,m.aA)(r.rtl,this.x,this.width),k=function(r){e.fillText(r,x.x(t.x+_),t.y+b/2),t.y+=b+h},w=x.textAlign(f);for(e.textAlign=f,e.textBaseline="middle",e.font=y.string,t.x=e0(this,w,r),e.fillStyle=r.bodyColor,(0,m.F)(this.beforeBody,k),_=d&&"right"!==w?"center"===f?v/2+g:v+2+g:0,o=0,l=c.length;o<l;++o){for(n=c[o],i=this.labelTextColors[o],e.fillStyle=i,(0,m.F)(n.before,k),a=n.lines,d&&a.length&&(this._drawColorBox(e,t,o,x,r),b=Math.max(y.lineHeight,p)),s=0,u=a.length;s<u;++s)k(a[s]),b=y.lineHeight;(0,m.F)(n.after,k)}_=0,b=y.lineHeight,(0,m.F)(this.afterBody,k),t.y-=h}},{key:"drawFooter",value:function(t,e,r){var n,i,a=this.footer,o=a.length;if(o){var s=(0,m.aA)(r.rtl,this.x,this.width);for(t.x=e0(this,r.footerAlign,r),t.y+=r.footerMarginTop,e.textAlign=s.textAlign(r.footerAlign),e.textBaseline="middle",n=(0,m.a0)(r.footerFont),e.fillStyle=r.footerColor,e.font=n.string,i=0;i<o;++i)e.fillText(a[i],s.x(t.x),t.y+n.lineHeight/2),t.y+=n.lineHeight+r.footerSpacing}}},{key:"drawBackground",value:function(t,e,r,n){var i=this.xAlign,a=this.yAlign,o=t.x,s=t.y,l=r.width,u=r.height,c=(0,m.ay)(n.cornerRadius),h=c.topLeft,f=c.topRight,d=c.bottomLeft,p=c.bottomRight;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(o+h,s),"top"===a&&this.drawCaret(t,e,r,n),e.lineTo(o+l-f,s),e.quadraticCurveTo(o+l,s,o+l,s+f),"center"===a&&"right"===i&&this.drawCaret(t,e,r,n),e.lineTo(o+l,s+u-p),e.quadraticCurveTo(o+l,s+u,o+l-p,s+u),"bottom"===a&&this.drawCaret(t,e,r,n),e.lineTo(o+d,s+u),e.quadraticCurveTo(o,s+u,o,s+u-d),"center"===a&&"left"===i&&this.drawCaret(t,e,r,n),e.lineTo(o,s+h),e.quadraticCurveTo(o,s,o+h,s),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}},{key:"_updateAnimationTarget",value:function(t){var e=this.chart,r=this.$animations,n=r&&r.x,i=r&&r.y;if(n||i){var a=e$[t.position].call(this,this._active,this._eventPosition);if(!a)return;var o=this._size=eQ(this,t),s=Object.assign({},a,this._size),l=eJ(e,t,s),u=eZ(t,s,l,e);(n._to!==u.x||i._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}},{key:"_willRender",value:function(){return!!this.opacity}},{key:"draw",value:function(t){var e=this.options.setContext(this.getContext()),r=this.opacity;if(r){this._updateAnimationTarget(e);var n={width:this.width,height:this.height},i={x:this.x,y:this.y};r=.001>Math.abs(r)?0:r;var a=(0,m.E)(e.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(i,t,n,e),(0,m.aB)(t,e.textDirection),i.y+=a.top,this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),(0,m.aD)(t,e.textDirection),t.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(t,e){var r=this,n=this._active,i=t.map(function(t){var e=t.datasetIndex,n=t.index,i=r.chart.getDatasetMeta(e);if(!i)throw Error("Cannot find a dataset at index "+e);return{datasetIndex:e,element:i.data[n],index:n}}),a=!(0,m.ai)(n,i),o=this._positionChanged(i,e);(a||o)&&(this._active=i,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}},{key:"handleEvent",value:function(t,e){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var n=this.options,i=this._active||[],a=this._getActiveElements(t,i,e,r),o=this._positionChanged(a,t),s=e||!(0,m.ai)(a,i)||o;return s&&(this._active=a,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),s}},{key:"_getActiveElements",value:function(t,e,r,n){var i=this,a=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter(function(t){return i.chart.data.datasets[t.datasetIndex]&&void 0!==i.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)});var o=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&o.reverse(),o}},{key:"_positionChanged",value:function(t,e){var r=this.caretX,n=this.caretY,i=e$[this.options.position].call(this,t,e);return!1!==i&&(r!==i.x||n!==i.y)}}]),r}((0,g._)(tP));(0,s._)(e3,"positioners",e$);var e6={id:"tooltip",_element:e3,positioners:e$,afterInit:function(t,e,r){r&&(t.tooltip=new e3({chart:t,options:r}))},beforeUpdate:function(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset:function(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw:function(t){var e=t.tooltip;if(e&&e._willRender()){var r={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",(0,f._)((0,h._)({},r),{cancelable:!0})))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent:function(t,e){if(t.tooltip){var r=e.replay;t.tooltip.handleEvent(e.event,r,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:function(t,e){return e.bodyFont.size},boxWidth:function(t,e){return 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:e2},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:function(t){return"filter"!==t&&"itemSort"!==t&&"external"!==t},_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},e8=Object.freeze({__proto__:null,Colors:eM,Decimation:eA,Filler:eN,Legend:eH,SubTitle:eX,Title:eK,Tooltip:e6});function e4(t){var e=this.getLabels();return t>=0&&t<e.length?e[t]:t}var e7=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t))._startValue=void 0,n._valueRange=0,n._addedLabels=[],n}return(0,o._)(r,[{key:"init",value:function(t){var e=this._addedLabels;if(e.length){var n=this.getLabels(),i=!0,a=!1,o=void 0;try{for(var s,c=e[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var h=s.value,f=h.index,d=h.label;n[f]===d&&n.splice(f,1)}}catch(t){a=!0,o=t}finally{try{i||null==c.return||c.return()}finally{if(a)throw o}}this._addedLabels=[]}(0,l._)((0,u._)(r.prototype),"init",this).call(this,t)}},{key:"parse",value:function(t,e){if((0,m.k)(t))return null;var r,n,i,a,o,s,l,u,c=this.getLabels();return l=e=isFinite(e)&&c[e]===t?e:(r=c,n=t,i=(0,m.v)(e,t),a=this._addedLabels,-1===(s=r.indexOf(n))?(o=i,"string"==typeof n?(o=r.push(n)-1,a.unshift({index:o,label:n})):isNaN(n)&&(o=null),o):s!==r.lastIndexOf(n)?i:s),u=c.length-1,null===l?null:(0,m.S)(Math.round(l),0,u)}},{key:"determineDataLimits",value:function(){var t=this.getUserBounds(),e=t.minDefined,r=t.maxDefined,n=this.getMinMax(!0),i=n.min,a=n.max;"ticks"!==this.options.bounds||(e||(i=0),r||(a=this.getLabels().length-1)),this.min=i,this.max=a}},{key:"buildTicks",value:function(){var t=this.min,e=this.max,r=this.options.offset,n=[],i=this.getLabels();i=0===t&&e===i.length-1?i:i.slice(t,e+1),this._valueRange=Math.max(i.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(var a=t;a<=e;a++)n.push({value:a});return n}},{key:"getLabelForValue",value:function(t){return e4.call(this,t)}},{key:"configure",value:function(){(0,l._)((0,u._)(r.prototype),"configure",this).call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}},{key:"getPixelForValue",value:function(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getPixelForTick",value:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}},{key:"getValueForPixel",value:function(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),r}(tL);function e9(t,e,r){var n=r.horizontal,i=r.minRotation,a=(0,m.t)(i),o=.75*e*(""+t).length;return Math.min(e/((n?Math.sin(a):Math.cos(a))||.001),o)}(0,s._)(e7,"id","category"),(0,s._)(e7,"defaults",{ticks:{callback:e4}});var rt=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t)).start=void 0,n.end=void 0,n._startValue=void 0,n._endValue=void 0,n._valueRange=0,n}return(0,o._)(r,[{key:"parse",value:function(t,e){return(0,m.k)(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}},{key:"handleTickRangeOptions",value:function(){var t=this.options.beginAtZero,e=this.getUserBounds(),r=e.minDefined,n=e.maxDefined,i=this.min,a=this.max,o=function(t){return i=r?i:t},s=function(t){return a=n?a:t};if(t){var l=(0,m.s)(i),u=(0,m.s)(a);l<0&&u<0?s(0):l>0&&u>0&&o(0)}if(i===a){var c=0===a?1:Math.abs(.05*a);s(a+c),t||o(i-c)}this.min=i,this.max=a}},{key:"getTickLimit",value:function(){var t,e=this.options.ticks,r=e.maxTicksLimit,n=e.stepSize;return n?(t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(n," would result generating up to ").concat(t," ticks. Limiting to 1000.")),t=1e3):(t=this.computeTickLimit(),r=r||11),r&&(t=Math.min(r,t)),t}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var t=this.options,e=t.ticks,r=this.getTickLimit(),n=function(t,e){var r,n,i,a,o=[],s=t.bounds,l=t.step,u=t.min,c=t.max,h=t.precision,f=t.count,d=t.maxTicks,p=t.maxDigits,v=t.includeBounds,g=l||1,y=d-1,b=e.min,_=e.max,x=!(0,m.k)(u),k=!(0,m.k)(c),w=!(0,m.k)(f),M=(_-b)/(p+1),S=(0,m.aI)((_-b)/y/g)*g;if(S<1e-14&&!x&&!k)return[{value:b},{value:_}];(a=Math.ceil(_/S)-Math.floor(b/S))>y&&(S=(0,m.aI)(a*S/y/g)*g),(0,m.k)(h)||(S=Math.ceil(S*(r=Math.pow(10,h)))/r),"ticks"===s?(n=Math.floor(b/S)*S,i=Math.ceil(_/S)*S):(n=b,i=_),x&&k&&l&&(0,m.aJ)((c-u)/l,S/1e3)?(a=Math.round(Math.min((c-u)/S,d)),S=(c-u)/a,n=u,i=c):w?(n=x?u:n,S=((i=k?c:i)-n)/(a=f-1)):(a=(i-n)/S,a=(0,m.aK)(a,Math.round(a),S/1e3)?Math.round(a):Math.ceil(a));var O=Math.max((0,m.aL)(S),(0,m.aL)(n));n=Math.round(n*(r=Math.pow(10,(0,m.k)(h)?O:h)))/r,i=Math.round(i*r)/r;var A=0;for(x&&(v&&n!==u?(o.push({value:u}),n<u&&A++,(0,m.aK)(Math.round((n+A*S)*r)/r,u,e9(u,M,t))&&A++):n<u&&A++);A<a;++A){var E=Math.round((n+A*S)*r)/r;if(k&&E>c)break;o.push({value:E})}return k&&v&&i!==c?o.length&&(0,m.aK)(o[o.length-1].value,c,e9(c,M,t))?o[o.length-1].value=c:o.push({value:c}):k&&i!==c||o.push({value:i}),o}({maxTicks:r=Math.max(2,r),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&&(0,m.aH)(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}},{key:"configure",value:function(){var t=this.ticks,e=this.min,n=this.max;if((0,l._)((0,u._)(r.prototype),"configure",this).call(this),this.options.offset&&t.length){var i=(n-e)/Math.max(t.length-1,1)/2;e-=i,n+=i}this._startValue=e,this._endValue=n,this._valueRange=n-e}},{key:"getLabelForValue",value:function(t){return(0,m.o)(t,this.chart.options.locale,this.options.ticks.format)}}]),r}(tL),re=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(){return(0,a._)(this,r),e.apply(this,arguments)}return(0,o._)(r,[{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,r=t.max;this.min=(0,m.g)(e)?e:0,this.max=(0,m.g)(r)?r:1,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var t=this.isHorizontal(),e=t?this.width:this.height,r=(0,m.t)(this.options.ticks.minRotation);return Math.ceil(e/Math.min(40,this._resolveTickFontOptions(0).lineHeight/((t?Math.sin(r):Math.cos(r))||.001)))}},{key:"getPixelForValue",value:function(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}]),r}(rt);(0,s._)(re,"id","linear"),(0,s._)(re,"defaults",{ticks:{callback:m.aM.formatters.numeric}});var rr=function(t){return Math.floor((0,m.aN)(t))},rn=function(t,e){return Math.pow(10,rr(t)+e)};function ri(t){return 1==t/Math.pow(10,rr(t))}function ra(t,e,r){var n=Math.pow(10,r);return Math.ceil(e/n)-Math.floor(t/n)}var ro=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t)).start=void 0,n.end=void 0,n._startValue=void 0,n._valueRange=0,n}return(0,o._)(r,[{key:"parse",value:function(t,e){var r=rt.prototype.parse.apply(this,[t,e]);if(0===r){this._zero=!0;return}return(0,m.g)(r)&&r>0?r:null}},{key:"determineDataLimits",value:function(){var t=this.getMinMax(!0),e=t.min,r=t.max;this.min=(0,m.g)(e)?Math.max(0,e):null,this.max=(0,m.g)(r)?Math.max(0,r):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!(0,m.g)(this._userMin)&&(this.min=e===rn(this.min,0)?rn(this.min,-1):rn(this.min,0)),this.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var t=this.getUserBounds(),e=t.minDefined,r=t.maxDefined,n=this.min,i=this.max,a=function(t){return n=e?n:t},o=function(t){return i=r?i:t};n===i&&(n<=0?(a(1),o(10)):(a(rn(n,-1)),o(rn(i,1)))),n<=0&&a(rn(i,-1)),i<=0&&o(rn(n,1)),this.min=n,this.max=i}},{key:"buildTicks",value:function(){var t=this.options,e=function(t,e){var r=e.min,n=e.max;r=(0,m.O)(t.min,r);for(var i=[],a=rr(r),o=function(t,e){for(var r=rr(e-t);ra(t,e,r)>10;)r++;for(;10>ra(t,e,r);)r--;return Math.min(r,rr(t))}(r,n),s=o<0?Math.pow(10,Math.abs(o)):1,l=Math.pow(10,o),u=a>o?Math.pow(10,a):0,c=Math.round((r-u)*s)/s,h=Math.floor((r-u)/l/10)*l*10,f=Math.floor((c-h)/Math.pow(10,o)),d=(0,m.O)(t.min,Math.round((u+h+f*Math.pow(10,o))*s)/s);d<n;)i.push({value:d,major:ri(d),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(f=2,s=++o>=0?1:s),d=Math.round((u+h+f*Math.pow(10,o))*s)/s;var p=(0,m.O)(t.max,d);return i.push({value:p,major:ri(p),significand:f}),i}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&(0,m.aH)(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}},{key:"getLabelForValue",value:function(t){return void 0===t?"0":(0,m.o)(t,this.chart.options.locale,this.options.ticks.format)}},{key:"configure",value:function(){var t=this.min;(0,l._)((0,u._)(r.prototype),"configure",this).call(this),this._startValue=(0,m.aN)(t),this._valueRange=(0,m.aN)(this.max)-(0,m.aN)(t)}},{key:"getPixelForValue",value:function(t){return((void 0===t||0===t)&&(t=this.min),null===t||isNaN(t))?NaN:this.getPixelForDecimal(t===this.min?0:((0,m.aN)(t)-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(t){var e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}]),r}(tL);function rs(t){var e=t.ticks;if(e.display&&t.display){var r=(0,m.E)(e.backdropPadding);return(0,m.v)(e.font&&e.font.size,m.d.font.size)+r.height}return 0}function rl(t,e,r,n,i){return t===n||t===i?{start:e-r/2,end:e+r/2}:t<n||t>i?{start:e-r,end:e}:{start:e,end:e+r}}function ru(t,e,r,n){var i=t.ctx;if(r)i.arc(t.xCenter,t.yCenter,e,0,m.T);else{var a=t.getPointPosition(0,e);i.moveTo(a.x,a.y);for(var o=1;o<n;o++)a=t.getPointPosition(o,e),i.lineTo(a.x,a.y)}}(0,s._)(ro,"id","logarithmic"),(0,s._)(ro,"defaults",{ticks:{callback:m.aM.formatters.logarithmic,major:{enabled:!0}}});var rc=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t)).xCenter=void 0,n.yCenter=void 0,n.drawingArea=void 0,n._pointLabels=[],n._pointLabelItems=[],n}return(0,o._)(r,[{key:"setDimensions",value:function(){var t=this._padding=(0,m.E)(rs(this.options)/2),e=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(e,r)/2)}},{key:"determineDataLimits",value:function(){var t=this.getMinMax(!1),e=t.min,r=t.max;this.min=(0,m.g)(e)&&!isNaN(e)?e:0,this.max=(0,m.g)(r)&&!isNaN(r)?r:0,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){return Math.ceil(this.drawingArea/rs(this.options))}},{key:"generateTickLabels",value:function(t){var e=this;rt.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(function(t,r){var n=(0,m.Q)(e.options.pointLabels.callback,[t,r],e);return n||0===n?n:""}).filter(function(t,r){return e.chart.getDataVisibility(r)})}},{key:"fit",value:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){for(var 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},r=Object.assign({},e),n=[],i=[],a=t._pointLabels.length,o=t.options.pointLabels,s=o.centerPointLabels?m.P/a:0,l=0;l<a;l++){var u,c,h=o.setContext(t.getPointLabelContext(l));i[l]=h.padding;var f=t.getPointPosition(l,t.drawingArea+i[l],s),d=(0,m.a0)(h.font),p=(u=t.ctx,c=t._pointLabels[l],c=(0,m.b)(c)?c:[c],{w:(0,m.aO)(u,d.string,c),h:c.length*d.lineHeight});n[l]=p;var v=(0,m.al)(t.getIndexAngle(l)+s),g=Math.round((0,m.U)(v));(function(t,e,r,n,i){var a=Math.abs(Math.sin(r)),o=Math.abs(Math.cos(r)),s=0,l=0;n.start<e.l?(s=(e.l-n.start)/a,t.l=Math.min(t.l,e.l-s)):n.end>e.r&&(s=(n.end-e.r)/a,t.r=Math.max(t.r,e.r+s)),i.start<e.t?(l=(e.t-i.start)/o,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/o,t.b=Math.max(t.b,e.b+l))})(r,e,v,rl(g,f.x,p.w,0,180),rl(g,f.y,p.h,90,270))}t.setCenterPoint(e.l-r.l,r.r-e.r,e.t-r.t,r.b-e.b),t._pointLabelItems=function(t,e,r){for(var n,i=[],a=t._pointLabels.length,o=t.options,s=o.pointLabels,l=s.centerPointLabels,u=s.display,c={extra:rs(o)/2,additionalAngle:l?m.P/a:0},h=0;h<a;h++){c.padding=r[h],c.size=e[h];var f=function(t,e,r){var n,i,a,o,s=t.drawingArea,l=r.extra,u=r.additionalAngle,c=r.padding,h=r.size,f=t.getPointPosition(e,s+l+c,u),d=Math.round((0,m.U)((0,m.al)(f.angle+m.H))),p=(n=f.y,i=h.h,90===d||270===d?n-=i/2:(d>270||d<90)&&(n-=i),n),v=0===d||180===d?"center":d<180?"left":"right",g=(a=f.x,o=h.w,"right"===v?a-=o:"center"===v&&(a-=o/2),a);return{visible:!0,x:f.x,y:p,textAlign:v,left:g,top:p,right:g+h.w,bottom:p+h.h}}(t,h,c);i.push(f),"auto"===u&&(f.visible=function(t,e){if(!e)return!0;var r=t.left,n=t.top,i=t.right,a=t.bottom;return!((0,m.C)({x:r,y:n},e)||(0,m.C)({x:r,y:a},e)||(0,m.C)({x:i,y:n},e)||(0,m.C)({x:i,y:a},e))}(f,n),f.visible&&(n=f))}return i}(t,n,i)}(this):this.setCenterPoint(0,0,0,0)}},{key:"setCenterPoint",value:function(t,e,r,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((r-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,r,n))}},{key:"getIndexAngle",value:function(t){var e=m.T/(this._pointLabels.length||1),r=this.options.startAngle||0;return(0,m.al)(t*e+(0,m.t)(r))}},{key:"getDistanceFromCenterForValue",value:function(t){if((0,m.k)(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}},{key:"getValueForDistanceFromCenter",value:function(t){if((0,m.k)(t))return NaN;var e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}},{key:"getPointLabelContext",value:function(t){var e=this._pointLabels||[];if(t>=0&&t<e.length){var r,n=e[t];return r=this.getContext(),(0,m.j)(r,{label:n,index:t,type:"pointLabel"})}}},{key:"getPointPosition",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.getIndexAngle(t)-m.H+r;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}},{key:"getPointPositionForValue",value:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}},{key:"getBasePosition",value:function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(t){var e=this._pointLabelItems[t];return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}},{key:"drawBackground",value:function(){var t=this.options,e=t.backgroundColor,r=t.grid.circular;if(e){var n=this.ctx;n.save(),n.beginPath(),ru(this,this.getDistanceFromCenterForValue(this._endValue),r,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}},{key:"drawGrid",value:function(){var t,e,r,n=this,i=this.ctx,a=this.options,o=a.angleLines,s=a.grid,l=a.border,u=this._pointLabels.length;if(a.pointLabels.display&&function(t,e){for(var r=t.ctx,n=t.options.pointLabels,i=e-1;i>=0;i--){var a=t._pointLabelItems[i];if(a.visible){var o=n.setContext(t.getPointLabelContext(i));!function(t,e,r){var n=r.left,i=r.top,a=r.right,o=r.bottom,s=e.backdropColor;if(!(0,m.k)(s)){var l=(0,m.ay)(e.borderRadius),u=(0,m.E)(e.backdropPadding);t.fillStyle=s;var c=n-u.left,h=i-u.top,f=a-n+u.width,d=o-i+u.height;Object.values(l).some(function(t){return 0!==t})?(t.beginPath(),(0,m.aw)(t,{x:c,y:h,w:f,h:d,radius:l}),t.fill()):t.fillRect(c,h,f,d)}}(r,o,a);var s=(0,m.a0)(o.font),l=a.x,u=a.y,c=a.textAlign;(0,m.Z)(r,t._pointLabels[i],l,u+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}}(this,u),s.display&&this.ticks.forEach(function(t,r){if(0!==r||0===r&&n.min<0){e=n.getDistanceFromCenterForValue(t.value);var i,a,o,c,h,f=n.getContext(r),d=s.setContext(f),p=l.setContext(f);i=e,a=n.ctx,o=d.circular,c=d.color,h=d.lineWidth,(o||u)&&c&&h&&!(i<0)&&(a.save(),a.strokeStyle=c,a.lineWidth=h,a.setLineDash(p.dash||[]),a.lineDashOffset=p.dashOffset,a.beginPath(),ru(n,i,o,u),a.closePath(),a.stroke(),a.restore())}}),o.display){for(i.save(),t=u-1;t>=0;t--){var c=o.setContext(this.getPointLabelContext(t)),h=c.color,f=c.lineWidth;f&&h&&(i.lineWidth=f,i.strokeStyle=h,i.setLineDash(c.borderDash),i.lineDashOffset=c.borderDashOffset,e=this.getDistanceFromCenterForValue(a.reverse?this.min:this.max),r=this.getPointPosition(t,e),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(r.x,r.y),i.stroke())}i.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var t,e,r=this,n=this.ctx,i=this.options,a=i.ticks;if(a.display){var o=this.getIndexAngle(0);n.save(),n.translate(this.xCenter,this.yCenter),n.rotate(o),n.textAlign="center",n.textBaseline="middle",this.ticks.forEach(function(o,s){if(0!==s||!(r.min>=0)||i.reverse){var l=a.setContext(r.getContext(s)),u=(0,m.a0)(l.font);if(t=r.getDistanceFromCenterForValue(r.ticks[s].value),l.showLabelBackdrop){n.font=u.string,e=n.measureText(o.label).width,n.fillStyle=l.backdropColor;var c=(0,m.E)(l.backdropPadding);n.fillRect(-e/2-c.left,-t-u.size/2-c.top,e+c.width,u.size+c.height)}(0,m.Z)(n,o.label,0,-t,u,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}}),n.restore()}}},{key:"drawTitle",value:function(){}}]),r}(rt);(0,s._)(rc,"id","radialLinear"),(0,s._)(rc,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:m.aM.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(t){return t},padding:5,centerPointLabels:!1}}),(0,s._)(rc,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),(0,s._)(rc,"descriptors",{angleLines:{_fallback:"grid"}});var rh={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}},rf=Object.keys(rh);function rd(t,e){return t-e}function rp(t,e){if((0,m.k)(e))return null;var r=t._adapter,n=t._parseOpts,i=n.parser,a=n.round,o=n.isoWeekday,s=e;return("function"==typeof i&&(s=i(s)),(0,m.g)(s)||(s="string"==typeof i?r.parse(s,i):r.parse(s)),null===s)?null:(a&&(s="week"===a&&((0,m.x)(o)||!0===o)?r.startOf(s,"isoWeek",o):r.startOf(s,a)),+s)}function rv(t,e,r,n){for(var i=rf.length,a=rf.indexOf(t);a<i-1;++a){var o=rh[rf[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-e)/(s*o.size))<=n)return rf[a]}return rf[i-1]}function rg(t,e,r){if(r){if(r.length){var n=(0,m.aQ)(r,e),i=n.lo,a=n.hi;t[r[i]>=e?r[i]:r[a]]=!0}}else t[e]=!0}function ry(t,e,r){var n,i,a=[],o={},s=e.length;for(n=0;n<s;++n)o[i=e[n]]=n,a.push({value:i,major:!1});return 0!==s&&r?function(t,e,r,n){var i,a,o=t._adapter,s=+o.startOf(e[0].value,n),l=e[e.length-1].value;for(i=s;i<=l;i=+o.add(i,1,n))(a=r[i])>=0&&(e[a].major=!0);return e}(t,a,o,r):a}var rm=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t))._cache={data:[],labels:[],all:[]},n._unit="day",n._majorUnit=void 0,n._offsets={},n._normalized=!1,n._parseOpts=void 0,n}return(0,o._)(r,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.time||(t.time={}),i=this._adapter=new G._date(t.adapters.date);i.init(e),(0,m.ab)(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},(0,l._)((0,u._)(r.prototype),"init",this).call(this,t),this._normalized=e.normalized}},{key:"parse",value:function(t,e){return void 0===t?null:rp(this,t)}},{key:"beforeLayout",value:function(){(0,l._)((0,u._)(r.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var t=this.options,e=this._adapter,r=t.time.unit||"day",n=this.getUserBounds(),i=n.min,a=n.max,o=n.minDefined,s=n.maxDefined;function l(t){o||isNaN(t.min)||(i=Math.min(i,t.min)),s||isNaN(t.max)||(a=Math.max(a,t.max))}o&&s||(l(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&l(this.getMinMax(!1))),i=(0,m.g)(i)&&!isNaN(i)?i:+e.startOf(Date.now(),r),a=(0,m.g)(a)&&!isNaN(a)?a:+e.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}},{key:"_getLabelBounds",value:function(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],r=t[t.length-1]),{min:e,max:r}}},{key:"buildTicks",value:function(){var t=this.options,e=t.time,r=t.ticks,n="labels"===r.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);var i=this.min,a=this.max,o=(0,m.aP)(n,i,a);return this._unit=e.unit||(r.autoSkip?rv(e.minUnit,this.min,this.max,this._getLabelCapacity(i)):function(t,e,r,n,i){for(var a=rf.length-1;a>=rf.indexOf(r);a--){var o=rf[a];if(rh[o].common&&t._adapter.diff(i,n,o)>=e-1)return o}return rf[r?rf.indexOf(r):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=r.major.enabled&&"year"!==this._unit?function(t){for(var e=rf.indexOf(t)+1,r=rf.length;e<r;++e)if(rh[rf[e]].common)return rf[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),ry(this,o,this._majorUnit)}},{key:"afterAutoSkip",value:function(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(function(t){return+t.value}))}},{key:"initOffsets",value:function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=0,i=0;this.options.offset&&r.length&&(t=this.getDecimalForValue(r[0]),n=1===r.length?1-t:(this.getDecimalForValue(r[1])-t)/2,e=this.getDecimalForValue(r[r.length-1]),i=1===r.length?e:(e-this.getDecimalForValue(r[r.length-2]))/2);var a=r.length<3?.5:.25;n=(0,m.S)(n,0,a),i=(0,m.S)(i,0,a),this._offsets={start:n,end:i,factor:1/(n+1+i)}}},{key:"_generate",value:function(){var t,e,r=this._adapter,n=this.min,i=this.max,a=this.options,o=a.time,s=o.unit||rv(o.minUnit,n,i,this._getLabelCapacity(n)),l=(0,m.v)(a.ticks.stepSize,1),u="week"===s&&o.isoWeekday,c=(0,m.x)(u)||!0===u,h={},f=n;if(c&&(f=+r.startOf(f,"isoWeek",u)),f=+r.startOf(f,c?"day":s),r.diff(i,n,s)>1e5*l)throw Error(n+" and "+i+" are too far apart with stepSize of "+l+" "+s);var d="data"===a.ticks.source&&this.getDataTimestamps();for(t=f,e=0;t<i;t=+r.add(t,l,s),e++)rg(h,t,d);return(t===i||"ticks"===a.bounds||1===e)&&rg(h,t,d),Object.keys(h).sort(rd).map(function(t){return+t})}},{key:"getLabelForValue",value:function(t){var e=this._adapter,r=this.options.time;return r.tooltipFormat?e.format(t,r.tooltipFormat):e.format(t,r.displayFormats.datetime)}},{key:"format",value:function(t,e){var r=this.options.time.displayFormats,n=this._unit,i=e||r[n];return this._adapter.format(t,i)}},{key:"_tickFormatFunction",value:function(t,e,r,n){var i=this.options,a=i.ticks.callback;if(a)return(0,m.Q)(a,[t,e,r],this);var o=i.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&o[s],c=l&&o[l],h=r[e],f=l&&c&&h&&h.major;return this._adapter.format(t,n||(f?c:u))}},{key:"generateTickLabels",value:function(t){var e,r,n;for(e=0,r=t.length;e<r;++e)(n=t[e]).label=this._tickFormatFunction(n.value,e,t)}},{key:"getDecimalForValue",value:function(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}},{key:"getPixelForValue",value:function(t){var e=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+r)*e.factor)}},{key:"getValueForPixel",value:function(t){var e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+r*(this.max-this.min)}},{key:"_getLabelSize",value:function(t){var e=this.options.ticks,r=this.ctx.measureText(t).width,n=(0,m.t)(this.isHorizontal()?e.maxRotation:e.minRotation),i=Math.cos(n),a=Math.sin(n),o=this._resolveTickFontOptions(0).size;return{w:r*i+o*a,h:r*a+o*i}}},{key:"_getLabelCapacity",value:function(t){var e=this.options.time,r=e.displayFormats,n=r[e.unit]||r.millisecond,i=this._tickFormatFunction(t,0,ry(this,[t],this._majorUnit),n),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}},{key:"getDataTimestamps",value:function(){var t,e,r=this._cache.data||[];if(r.length)return r;var n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)r=r.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(r)}},{key:"getLabelTimestamps",value:function(){var t,e,r=this._cache.labels||[];if(r.length)return r;var n=this.getLabels();for(t=0,e=n.length;t<e;++t)r.push(rp(this,n[t]));return this._cache.labels=this._normalized?r:this.normalize(r)}},{key:"normalize",value:function(t){return(0,m._)(t.sort(rd))}}]),r}(tL);function rb(t,e,r){var n,i,a,o,s,l,u,c,h,f,d=0,p=t.length-1;r?(e>=t[d].pos&&e<=t[p].pos&&(d=(s=(0,m.B)(t,"pos",e)).lo,p=s.hi),n=(l=t[d]).pos,a=l.time,i=(u=t[p]).pos,o=u.time):(e>=t[d].time&&e<=t[p].time&&(d=(c=(0,m.B)(t,"time",e)).lo,p=c.hi),n=(h=t[d]).time,a=h.pos,i=(f=t[p]).time,o=f.pos);var v=i-n;return v?a+(o-a)*(e-n)/v:a}(0,s._)(rm,"id","time"),(0,s._)(rm,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});var r_=function(t){(0,c._)(r,t);var e=(0,y._)(r);function r(t){var n;return(0,a._)(this,r),(n=e.call(this,t))._table=[],n._minPos=void 0,n._tableRange=void 0,n}return(0,o._)(r,[{key:"initOffsets",value:function(){var t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=rb(e,this.min),this._tableRange=rb(e,this.max)-this._minPos,(0,l._)((0,u._)(r.prototype),"initOffsets",this).call(this,t)}},{key:"buildLookupTable",value:function(t){var e,r,n,i=this.min,a=this.max,o=[],s=[];for(e=0,r=t.length;e<r;++e)(n=t[e])>=i&&n<=a&&o.push(n);if(o.length<2)return[{time:i,pos:0},{time:a,pos:1}];for(e=0,r=o.length;e<r;++e)Math.round((o[e+1]+o[e-1])/2)!==(n=o[e])&&s.push({time:n,pos:e/(r-1)});return s}},{key:"_generate",value:function(){var t=this.min,e=this.max,n=(0,l._)((0,u._)(r.prototype),"getDataTimestamps",this).call(this);return n.includes(t)&&n.length||n.splice(0,0,t),n.includes(e)&&1!==n.length||n.push(e),n.sort(function(t,e){return t-e})}},{key:"_getTimestampsForTable",value:function(){var t=this._cache.all||[];if(t.length)return t;var e=this.getDataTimestamps(),r=this.getLabelTimestamps();return t=e.length&&r.length?this.normalize(e.concat(r)):e.length?e:r,t=this._cache.all=t}},{key:"getDecimalForValue",value:function(t){return(rb(this._table,t)-this._minPos)/this._tableRange}},{key:"getValueForPixel",value:function(t){var e=this._offsets,r=this.getDecimalForPixel(t)/e.factor-e.end;return rb(this._table,r*this._tableRange+this._minPos,!0)}}]),r}(rm);(0,s._)(r_,"id","timeseries"),(0,s._)(r_,"defaults",rm.defaults);var rx=Object.freeze({__proto__:null,CategoryScale:e7,LinearScale:re,LogarithmicScale:ro,RadialLinearScale:rc,TimeScale:rm,TimeSeriesScale:r_}),rk=[$,em,e8,rx]},{"@swc/helpers/_/_assert_this_initialized":"atUI0","@swc/helpers/_/_class_call_check":"2HOGN","@swc/helpers/_/_create_class":"8oe8p","@swc/helpers/_/_define_property":"27c3O","@swc/helpers/_/_get":"6FgjI","@swc/helpers/_/_get_prototype_of":"4Pl3E","@swc/helpers/_/_inherits":"7gHjg","@swc/helpers/_/_object_spread":"kexvf","@swc/helpers/_/_object_spread_props":"c7x3p","@swc/helpers/_/_sliced_to_array":"hefcy","@swc/helpers/_/_to_consumable_array":"4oNkS","@swc/helpers/_/_type_of":"2bRX5","@swc/helpers/_/_wrap_native_super":"d3OTW","@swc/helpers/_/_create_super":"a37Ru","./chunks/helpers.dataset.js":"ipEF4","@kurkle/color":"gdy3W","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],d3OTW:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_wrap_native_super",function(){return l}),n.export(r,"_",function(){return l});var i=t("./_construct.js"),a=t("./_get_prototype_of.js"),o=t("./_is_native_function.js"),s=t("./_set_prototype_of.js");function l(t){var e="function"==typeof Map?new Map:void 0;return(l=function(t){if(null===t||!(0,o._is_native_function)(t))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return(0,i._construct)(t,arguments,(0,a._get_prototype_of)(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s._set_prototype_of)(r,t)})(t)}},{"./_construct.js":"jL2CZ","./_get_prototype_of.js":"4Pl3E","./_is_native_function.js":"i6WsT","./_set_prototype_of.js":"c50KS","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],jL2CZ:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_construct",function(){return o}),n.export(r,"_",function(){return o});var i=t("./_is_native_reflect_construct.js"),a=t("./_set_prototype_of.js");function o(t,e,r){return(o=(0,i._is_native_reflect_construct)()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&(0,a._set_prototype_of)(i,r.prototype),i}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"cYeVo","./_set_prototype_of.js":"c50KS","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],i6WsT:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function i(t){return -1!==Function.toString.call(t).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_is_native_function",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],ipEF4:[function(t,e,r){/*!
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/var n,i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(r),i.export(r,"$",function(){return t2}),i.export(r,"A",function(){return tp}),i.export(r,"B",function(){return td}),i.export(r,"C",function(){return t0}),i.export(r,"D",function(){return ti}),i.export(r,"E",function(){return en}),i.export(r,"F",function(){return k}),i.export(r,"G",function(){return eT}),i.export(r,"H",function(){return U}),i.export(r,"I",function(){return eS}),i.export(r,"J",function(){return eL}),i.export(r,"K",function(){return eI}),i.export(r,"L",function(){return tk}),i.export(r,"M",function(){return eM}),i.export(r,"N",function(){return Q}),i.export(r,"O",function(){return y}),i.export(r,"P",function(){return N}),i.export(r,"Q",function(){return x}),i.export(r,"R",function(){return eo}),i.export(r,"S",function(){return tu}),i.export(r,"T",function(){return V}),i.export(r,"U",function(){return tr}),i.export(r,"V",function(){return t$}),i.export(r,"W",function(){return tc}),i.export(r,"X",function(){return tG}),i.export(r,"Y",function(){return t1}),i.export(r,"Z",function(){return t6}),i.export(r,"_",function(){return tb}),i.export(r,"a",function(){return ea}),i.export(r,"a$",function(){return eE}),i.export(r,"a0",function(){return ei}),i.export(r,"a1",function(){return tM}),i.export(r,"a2",function(){return tS}),i.export(r,"a3",function(){return tW}),i.export(r,"a4",function(){return A}),i.export(r,"a5",function(){return F}),i.export(r,"a6",function(){return tH}),i.export(r,"a7",function(){return L}),i.export(r,"a8",function(){return function t(e,r,n,i){return new Proxy({_cacheable:!1,_proxy:e,_context:r,_subProxy:n,_stack:new Set,_descriptors:eu(e,i),setContext:function(r){return t(e,r,n,i)},override:function(a){return t(e.override(a),r,n,i)}},{deleteProperty:function(t,r){return delete t[r],delete e[r],!0},get:function(e,r,n){return eh(e,r,function(){var i,a,o,s,l;return i=e._proxy,a=e._context,o=e._subProxy,s=e._descriptors,L(l=i[r])&&s.isScriptable(r)&&(l=function(t,e,r,n){var i=r._proxy,a=r._context,o=r._subProxy,s=r._stack;if(s.has(t))throw Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);s.add(t);var l=e(a,o||n);return s.delete(t),ec(t,l)&&(l=ef(i._scopes,i,t,l)),l}(r,l,e,n)),p(l)&&l.length&&(l=function(e,r,n,i){var a=n._proxy,o=n._context,s=n._subProxy,l=n._descriptors;if(void 0!==o.index&&i(e))return r[o.index%r.length];if(v(r[0])){var u=r,c=a._scopes.filter(function(t){return t!==u});r=[];var h=!0,f=!1,d=void 0;try{for(var p,g=u[Symbol.iterator]();!(h=(p=g.next()).done);h=!0){var y=p.value,m=ef(c,a,e,y);r.push(t(m,o,s&&s[e],l))}}catch(t){f=!0,d=t}finally{try{h||null==g.return||g.return()}finally{if(f)throw d}}}return r}(r,l,e,s.isIndexable)),ec(r,l)&&(l=t(l,a,o&&o[r],s)),l})},getOwnPropertyDescriptor:function(t,r){return t._descriptors.allKeys?Reflect.has(e,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,r)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e)},has:function(t,r){return Reflect.has(e,r)},ownKeys:function(){return Reflect.ownKeys(e)},set:function(t,r,n){return e[r]=n,delete t[r],!0}})}}),i.export(r,"a9",function(){return el}),i.export(r,"aA",function(){return eV}),i.export(r,"aB",function(){return ez}),i.export(r,"aC",function(){return tO}),i.export(r,"aD",function(){return eW}),i.export(r,"aE",function(){return tZ}),i.export(r,"aF",function(){return ta}),i.export(r,"aG",function(){return h}),i.export(r,"aH",function(){return tt}),i.export(r,"aI",function(){return G}),i.export(r,"aJ",function(){return Z}),i.export(r,"aK",function(){return q}),i.export(r,"aL",function(){return tn}),i.export(r,"aM",function(){return tz}),i.export(r,"aN",function(){return X}),i.export(r,"aO",function(){return tq}),i.export(r,"aP",function(){return tv}),i.export(r,"aQ",function(){return tf}),i.export(r,"aR",function(){return tT}),i.export(r,"aS",function(){return tI}),i.export(r,"aT",function(){return M}),i.export(r,"aU",function(){return O}),i.export(r,"aV",function(){return P}),i.export(r,"aW",function(){return D}),i.export(r,"aX",function(){return j}),i.export(r,"aY",function(){return tX}),i.export(r,"aZ",function(){return e_}),i.export(r,"a_",function(){return ex}),i.export(r,"aa",function(){return eu}),i.export(r,"ab",function(){return E}),i.export(r,"ac",function(){return f}),i.export(r,"ad",function(){return tw}),i.export(r,"ae",function(){return eF}),i.export(r,"af",function(){return tQ}),i.export(r,"ag",function(){return R}),i.export(r,"ah",function(){return eQ}),i.export(r,"ai",function(){return w}),i.export(r,"aj",function(){return B}),i.export(r,"ak",function(){return th}),i.export(r,"al",function(){return ts}),i.export(r,"am",function(){return et}),i.export(r,"an",function(){return ew}),i.export(r,"ao",function(){return eX}),i.export(r,"ap",function(){return eY}),i.export(r,"aq",function(){return eB}),i.export(r,"ar",function(){return eN}),i.export(r,"as",function(){return eR}),i.export(r,"at",function(){return t5}),i.export(r,"au",function(){return t3}),i.export(r,"av",function(){return tJ}),i.export(r,"aw",function(){return t8}),i.export(r,"ax",function(){return ee}),i.export(r,"ay",function(){return er}),i.export(r,"az",function(){return eK}),i.export(r,"b",function(){return p}),i.export(r,"b0",function(){return t_}),i.export(r,"b1",function(){return t9}),i.export(r,"b2",function(){return z}),i.export(r,"b3",function(){return W}),i.export(r,"b4",function(){return H}),i.export(r,"b5",function(){return K}),i.export(r,"b6",function(){return Y}),i.export(r,"b7",function(){return to}),i.export(r,"c",function(){return tF}),i.export(r,"d",function(){return tY}),i.export(r,"e",function(){return tj}),i.export(r,"f",function(){return T}),i.export(r,"g",function(){return g}),i.export(r,"h",function(){return I}),i.export(r,"i",function(){return v}),i.export(r,"j",function(){return es}),i.export(r,"k",function(){return d}),i.export(r,"l",function(){return ty}),i.export(r,"m",function(){return b}),i.export(r,"n",function(){return _}),i.export(r,"o",function(){return tN}),i.export(r,"p",function(){return tl}),i.export(r,"q",function(){return tA}),i.export(r,"r",function(){return tx}),i.export(r,"s",function(){return $}),i.export(r,"t",function(){return te}),i.export(r,"u",function(){return tm}),i.export(r,"v",function(){return m}),i.export(r,"w",function(){return tE}),i.export(r,"x",function(){return J}),i.export(r,"y",function(){return eg}),i.export(r,"z",function(){return eC});var a=t("@swc/helpers/_/_class_call_check"),o=t("@swc/helpers/_/_create_class"),s=t("@swc/helpers/_/_define_property"),l=t("@swc/helpers/_/_to_consumable_array"),u=t("@swc/helpers/_/_type_of"),c=t("@kurkle/color");function h(){}var f=(n=0,function(){return n++});function d(t){return null==t}function p(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function v(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function g(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function y(t,e){return g(t)?t:e}function m(t,e){return void 0===t?e:t}var b=function(t,e){return"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:+t/e},_=function(t,e){return"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t};function x(t,e,r){if(t&&"function"==typeof t.call)return t.apply(r,e)}function k(t,e,r,n){var i,a,o;if(p(t)){if(a=t.length,n)for(i=a-1;i>=0;i--)e.call(r,t[i],i);else for(i=0;i<a;i++)e.call(r,t[i],i)}else if(v(t))for(i=0,a=(o=Object.keys(t)).length;i<a;i++)e.call(r,t[o[i]],o[i])}function w(t,e){var r,n,i,a;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(i=t[r],a=e[r],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function M(t){if(p(t))return t.map(M);if(v(t)){for(var e=Object.create(null),r=Object.keys(t),n=r.length,i=0;i<n;++i)e[r[i]]=M(t[r[i]]);return e}return t}function S(t){return -1===["__proto__","prototype","constructor"].indexOf(t)}function O(t,e,r,n){if(S(t)){var i=e[t],a=r[t];v(i)&&v(a)?A(i,a,n):e[t]=M(a)}}function A(t,e,r){var n,i=p(e)?e:[e],a=i.length;if(!v(t))return t;for(var o=(r=r||{}).merger||O,s=0;s<a;++s)if(v(n=i[s]))for(var l=Object.keys(n),u=0,c=l.length;u<c;++u)o(l[u],t,n,r);return t}function E(t,e){return A(t,e,{merger:P})}function P(t,e,r){if(S(t)){var n=e[t],i=r[t];v(n)&&v(i)?E(n,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=M(i))}}function D(t,e,r,n){void 0!==e&&console.warn(t+': "'+r+'" is deprecated. Please use "'+n+'" instead')}var C={"":function(t){return t},x:function(t){return t.x},y:function(t){return t.y}};function j(t){var e=t.split("."),r=[],n="",i=!0,a=!1,o=void 0;try{for(var s,l=e[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var u=s.value;(n+=u).endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="")}}catch(t){a=!0,o=t}finally{try{i||null==l.return||l.return()}finally{if(a)throw o}}return r}function T(t,e){var r;return(C[e]||(C[e]=(r=j(e),function(t){var e=!0,n=!1,i=void 0;try{for(var a,o=r[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var s=a.value;if(""===s)break;t=t&&t[s]}}catch(t){n=!0,i=t}finally{try{e||null==o.return||o.return()}finally{if(n)throw i}}return t})))(t)}function F(t){return t.charAt(0).toUpperCase()+t.slice(1)}var I=function(t){return void 0!==t},L=function(t){return"function"==typeof t},R=function(t,e){if(t.size!==e.size)return!1;var r=!0,n=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(!e.has(s))return!1}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}return!0};function B(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}var N=Math.PI,V=2*N,z=V+N,W=Number.POSITIVE_INFINITY,H=N/180,U=N/2,K=N/4,Y=2*N/3,X=Math.log10,$=Math.sign;function q(t,e,r){return Math.abs(t-e)<r}function G(t){var e=Math.round(t),r=Math.pow(10,Math.floor(X(t=q(t,e,t/1e3)?e:t))),n=t/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function Q(t){var e,r=[],n=Math.sqrt(t);for(e=1;e<n;e++)t%e==0&&(r.push(e),r.push(t/e));return n===(0|n)&&r.push(n),r.sort(function(t,e){return t-e}).pop(),r}function J(t){return!((void 0===t?"undefined":(0,u._)(t))==="symbol"||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t))&&!isNaN(parseFloat(t))&&isFinite(t)}function Z(t,e){var r=Math.round(t);return r-e<=t&&r+e>=t}function tt(t,e,r){var n,i,a;for(n=0,i=t.length;n<i;n++)isNaN(a=t[n][r])||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function te(t){return N/180*t}function tr(t){return 180/N*t}function tn(t){if(g(t)){for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r}}function ti(t,e){var r=e.x-t.x,n=e.y-t.y,i=Math.atan2(n,r);return i<-.5*N&&(i+=V),{angle:i,distance:Math.sqrt(r*r+n*n)}}function ta(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function to(t,e){return(t-e+z)%V-N}function ts(t){return(t%V+V)%V}function tl(t,e,r,n){var i=ts(t),a=ts(e),o=ts(r),s=ts(a-i),l=ts(o-i),u=ts(i-a),c=ts(i-o);return i===a||i===o||n&&a===o||s>l&&u<c}function tu(t,e,r){return Math.max(e,Math.min(r,t))}function tc(t){return tu(t,-32768,32767)}function th(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function tf(t,e,r){r=r||function(r){return t[r]<e};for(var n,i=t.length-1,a=0;i-a>1;)r(n=a+i>>1)?a=n:i=n;return{lo:a,hi:i}}var td=function(t,e,r,n){return tf(t,r,n?function(n){var i=t[n][e];return i<r||i===r&&t[n+1][e]===r}:function(n){return t[n][e]<r})},tp=function(t,e,r){return tf(t,r,function(n){return t[n][e]>=r})};function tv(t,e,r){for(var n=0,i=t.length;n<i&&t[n]<e;)n++;for(;i>n&&t[i-1]>r;)i--;return n>0||i<t.length?t.slice(n,i):t}var tg=["push","pop","shift","splice","unshift"];function ty(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tg.forEach(function(e){var r="_onData"+F(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){for(var e=arguments.length,i=Array(e),a=0;a<e;a++)i[a]=arguments[a];var o=n.apply(this,i);return t._chartjs.listeners.forEach(function(t){"function"==typeof t[r]&&t[r].apply(t,(0,l._)(i))}),o}})})}function tm(t,e){var r=t._chartjs;if(r){var n=r.listeners,i=n.indexOf(e);-1!==i&&n.splice(i,1),n.length>0||(tg.forEach(function(e){delete t[e]}),delete t._chartjs)}}function tb(t){var e=new Set(t);return e.size===t.length?t:Array.from(e)}function t_(t,e,r){return e+" "+t+"px "+r}var tx="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function tk(t,e){var r=[],n=!1;return function(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];r=a,n||(n=!0,tx.call(window,function(){n=!1,t.apply(e,r)}))}}function tw(t,e){var r;return function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];return e?(clearTimeout(r),r=setTimeout(t,e,i)):t.apply(this,i),e}}var tM=function(t){return"start"===t?"left":"end"===t?"right":"center"},tS=function(t,e,r){return"start"===t?e:"end"===t?r:(e+r)/2},tO=function(t,e,r,n){return t===(n?"left":"right")?r:"center"===t?(e+r)/2:e};function tA(t,e,r){var n=e.length,i=0,a=n;if(t._sorted){var o=t.iScale,s=t.vScale,l=t._parsed,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=o.axis,h=o.getUserBounds(),f=h.min,p=h.max,v=h.minDefined,g=h.maxDefined;if(v){if(i=Math.min(td(l,c,f).lo,r?n:td(e,c,o.getPixelForValue(f)).lo),u){var y=l.slice(0,i+1).reverse().findIndex(function(t){return!d(t[s.axis])});i-=Math.max(0,y)}i=tu(i,0,n-1)}if(g){var m=Math.max(td(l,o.axis,p,!0).hi+1,r?0:td(e,c,o.getPixelForValue(p),!0).hi+1);if(u){var b=l.slice(m-1).findIndex(function(t){return!d(t[s.axis])});m+=Math.max(0,b)}a=tu(m,i,n)-i}else a=n-i}return{start:i,count:a}}function tE(t){var e=t.xScale,r=t.yScale,n=t._scaleRanges,i={xmin:e.min,xmax:e.max,ymin:r.min,ymax:r.max};if(!n)return t._scaleRanges=i,!0;var a=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),a}var tP=function(t){return 0===t||1===t},tD=function(t,e,r){return-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*V/r))},tC=function(t,e,r){return Math.pow(2,-10*t)*Math.sin((t-e)*V/r)+1},tj={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-Math.cos(t*U)+1},easeOutSine:function(t){return Math.sin(t*U)},easeInOutSine:function(t){return -.5*(Math.cos(N*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:-Math.pow(2,-10*t)+1},easeInOutExpo:function(t){return tP(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(-Math.pow(2,-10*(2*t-1))+2)},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){return tP(t)?t:tD(t,.075,.3)},easeOutElastic:function(t){return tP(t)?t:tC(t,.075,.3)},easeInOutElastic:function(t){return tP(t)?t:t<.5?.5*tD(2*t,.1125,.45):.5+.5*tC(2*t-1,.1125,.45)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*(((e*=1.525)+1)*t-e)*.5:.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-tj.easeOutBounce(1-t)},easeOutBounce:function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*tj.easeInBounce(2*t):.5*tj.easeOutBounce(2*t-1)+.5}};function tT(t){if(t&&"object"==typeof t){var e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function tF(t){return tT(t)?t:new c.Color(t)}function tI(t){return tT(t)?t:new(0,c.Color)(t).saturate(.5).darken(.1).hexString()}var tL=["x","y","borderWidth","radius","tension"],tR=["color","borderColor","backgroundColor"],tB=new Map;function tN(t,e,r){var n,i,a;return(i=e+JSON.stringify(n=(n=r)||{}),(a=tB.get(i))||(a=new Intl.NumberFormat(e,n),tB.set(i,a)),a).format(t)}var tV={values:function(t){return p(t)?t:""+t},numeric:function(t,e,r){if(0===t)return"0";var n,i=this.chart.options.locale,a=t;if(r.length>1){var o,s=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(s<1e-4||s>1e15)&&(n="scientific"),Math.abs(o=r.length>3?r[2].value-r[1].value:r[1].value-r[0].value)>=1&&t!==Math.floor(t)&&(o=t-Math.floor(t)),a=o}var l=X(Math.abs(a)),u=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),c={notation:n,minimumFractionDigits:u,maximumFractionDigits:u};return Object.assign(c,this.options.ticks.format),tN(t,i,c)},logarithmic:function(t,e,r){return 0===t?"0":[1,2,3,5,10,15].includes(r[e].significand||t/Math.pow(10,Math.floor(X(t))))||e>.8*r.length?tV.numeric.call(this,t,e,r):""}},tz={formatters:tV},tW=Object.create(null),tH=Object.create(null);function tU(t,e){if(!e)return t;for(var r=e.split("."),n=0,i=r.length;n<i;++n){var a=r[n];t=t[a]||(t[a]=Object.create(null))}return t}function tK(t,e,r){return"string"==typeof e?A(tU(t,e),r):A(tU(t,""),e)}var tY=new(function(){function t(e,r){(0,a._)(this,t),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=function(t){return 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=function(t,e){return tI(e.backgroundColor)},this.hoverBorderColor=function(t,e){return tI(e.borderColor)},this.hoverColor=function(t,e){return tI(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(e),this.apply(r)}return(0,o._)(t,[{key:"set",value:function(t,e){return tK(this,t,e)}},{key:"get",value:function(t){return tU(this,t)}},{key:"describe",value:function(t,e){return tK(tH,t,e)}},{key:"override",value:function(t,e){return tK(tW,t,e)}},{key:"route",value:function(t,e,r,n){var i,a=tU(this,t),o=tU(this,r),l="_"+e;Object.defineProperties(a,(i={},(0,s._)(i,l,{value:a[e],writable:!0}),(0,s._)(i,e,{enumerable:!0,get:function(){var t=this[l],e=o[n];return v(t)?Object.assign({},e,t):m(t,e)},set:function(t){this[l]=t}}),i))}},{key:"apply",value:function(t){var e=this;t.forEach(function(t){return t(e)})}}]),t}())({_scriptable:function(t){return!t.startsWith("on")},_indexable:function(t){return"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:function(t){return"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}}),t.set("animations",{colors:{type:"color",properties:tR},numbers:{type:"number",properties:tL}}),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:function(t){return 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:function(t,e){return e.lineWidth},tickColor:function(t,e){return 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:tz.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:function(t){return!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t},_indexable:function(t){return"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:function(t){return"backdropPadding"!==t&&"callback"!==t},_indexable:function(t){return"backdropPadding"!==t}})}]);function tX(t){return!t||d(t.size)||d(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function t$(t,e,r,n,i){var a=e[i];return a||(a=e[i]=t.measureText(i).width,r.push(i)),a>n&&(n=a),n}function tq(t,e,r,n){var i,a,o,s,l,u=(n=n||{}).data=n.data||{},c=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(u=n.data={},c=n.garbageCollect=[],n.font=e),t.save(),t.font=e;var h=0,f=r.length;for(i=0;i<f;i++)if(null==(s=r[i])||p(s)){if(p(s))for(a=0,o=s.length;a<o;a++)null==(l=s[a])||p(l)||(h=t$(t,u,c,h,l))}else h=t$(t,u,c,h,s);t.restore();var d=c.length/2;if(d>r.length){for(i=0;i<d;i++)delete u[c[i]];c.splice(0,d)}return h}function tG(t,e,r){var n=t.currentDevicePixelRatio,i=0!==r?Math.max(r/2,.5):0;return Math.round((e-i)*n)/n+i}function tQ(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function tJ(t,e,r,n){tZ(t,e,r,n,null)}function tZ(t,e,r,n,i){var a,o,s,l,u,c,h,f,d=e.pointStyle,p=e.rotation,v=e.radius,g=(p||0)*H;if(d&&"object"==typeof d&&("[object HTMLImageElement]"===(a=d.toString())||"[object HTMLCanvasElement]"===a)){t.save(),t.translate(r,n),t.rotate(g),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),t.restore();return}if(!isNaN(v)&&!(v<=0)){switch(t.beginPath(),d){default:i?t.ellipse(r,n,i/2,v,0,0,V):t.arc(r,n,v,0,V),t.closePath();break;case"triangle":c=i?i/2:v,t.moveTo(r+Math.sin(g)*c,n-Math.cos(g)*v),g+=Y,t.lineTo(r+Math.sin(g)*c,n-Math.cos(g)*v),g+=Y,t.lineTo(r+Math.sin(g)*c,n-Math.cos(g)*v),t.closePath();break;case"rectRounded":u=.516*v,o=Math.cos(g+K)*(l=v-u),h=Math.cos(g+K)*(i?i/2-u:l),s=Math.sin(g+K)*l,f=Math.sin(g+K)*(i?i/2-u:l),t.arc(r-h,n-s,u,g-N,g-U),t.arc(r+f,n-o,u,g-U,g),t.arc(r+h,n+s,u,g,g+U),t.arc(r-f,n+o,u,g+U,g+N),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*v,c=i?i/2:l,t.rect(r-c,n-l,2*c,2*l);break}g+=K;case"rectRot":h=Math.cos(g)*(i?i/2:v),o=Math.cos(g)*v,s=Math.sin(g)*v,f=Math.sin(g)*(i?i/2:v),t.moveTo(r-h,n-s),t.lineTo(r+f,n-o),t.lineTo(r+h,n+s),t.lineTo(r-f,n+o),t.closePath();break;case"crossRot":g+=K;case"cross":h=Math.cos(g)*(i?i/2:v),o=Math.cos(g)*v,s=Math.sin(g)*v,f=Math.sin(g)*(i?i/2:v),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+f,n-o),t.lineTo(r-f,n+o);break;case"star":h=Math.cos(g)*(i?i/2:v),o=Math.cos(g)*v,s=Math.sin(g)*v,f=Math.sin(g)*(i?i/2:v),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+f,n-o),t.lineTo(r-f,n+o),g+=K,h=Math.cos(g)*(i?i/2:v),o=Math.cos(g)*v,s=Math.sin(g)*v,f=Math.sin(g)*(i?i/2:v),t.moveTo(r-h,n-s),t.lineTo(r+h,n+s),t.moveTo(r+f,n-o),t.lineTo(r-f,n+o);break;case"line":o=i?i/2:Math.cos(g)*v,s=Math.sin(g)*v,t.moveTo(r-o,n-s),t.lineTo(r+o,n+s);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(g)*(i?i/2:v),n+Math.sin(g)*v);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function t0(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function t1(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function t2(t){t.restore()}function t5(t,e,r,n,i){if(!e)return t.lineTo(r.x,r.y);if("middle"===i){var a=(e.x+r.x)/2;t.lineTo(a,e.y),t.lineTo(a,r.y)}else"after"===i!=!!n?t.lineTo(e.x,r.y):t.lineTo(r.x,e.y);t.lineTo(r.x,r.y)}function t3(t,e,r,n){if(!e)return t.lineTo(r.x,r.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function t6(t,e,r,n,i){var a,o,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=p(e)?e:[e],u=s.strokeWidth>0&&""!==s.strokeColor;for(t.save(),t.font=i.string,s.translation&&t.translate(s.translation[0],s.translation[1]),d(s.rotation)||t.rotate(s.rotation),s.color&&(t.fillStyle=s.color),s.textAlign&&(t.textAlign=s.textAlign),s.textBaseline&&(t.textBaseline=s.textBaseline),a=0;a<l.length;++a)o=l[a],s.backdrop&&function(t,e){var r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}(t,s.backdrop),u&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),d(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(o,r,n,s.maxWidth)),t.fillText(o,r,n,s.maxWidth),function(t,e,r,n,i){if(i.strikethrough||i.underline){var a=t.measureText(n),o=e-a.actualBoundingBoxLeft,s=e+a.actualBoundingBoxRight,l=r-a.actualBoundingBoxAscent,u=r+a.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,c),t.lineTo(s,c),t.stroke()}}(t,r,n,o,s),n+=Number(i.lineHeight);t.restore()}function t8(t,e){var r=e.x,n=e.y,i=e.w,a=e.h,o=e.radius;t.arc(r+o.topLeft,n+o.topLeft,o.topLeft,1.5*N,N,!0),t.lineTo(r,n+a-o.bottomLeft),t.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,N,U,!0),t.lineTo(r+i-o.bottomRight,n+a),t.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,U,0,!0),t.lineTo(r+i,n+o.topRight),t.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-U,!0),t.lineTo(r+o.topLeft,n)}var t4=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,t7=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function t9(t,e){var r=(""+t).match(t4);if(!r||"normal"===r[1])return 1.2*e;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100}return e*t}function et(t,e){var r={},n=v(e),i=n?Object.keys(e):e,a=v(t)?n?function(r){return m(t[r],t[e[r]])}:function(e){return t[e]}:function(){return t},o=!0,s=!1,l=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value;r[h]=+a(h)||0}}catch(t){s=!0,l=t}finally{try{o||null==c.return||c.return()}finally{if(s)throw l}}return r}function ee(t){return et(t,{top:"y",right:"x",bottom:"y",left:"x"})}function er(t){return et(t,["topLeft","topRight","bottomLeft","bottomRight"])}function en(t){var e=ee(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ei(t,e){t=t||{},e=e||tY.font;var r=m(t.size,e.size);"string"==typeof r&&(r=parseInt(r,10));var n=m(t.style,e.style);n&&!(""+n).match(t7)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);var i={family:m(t.family,e.family),lineHeight:t9(m(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:m(t.weight,e.weight),string:""};return i.string=tX(i),i}function ea(t,e,r,n){var i,a,o,s=!0;for(i=0,a=t.length;i<a;++i)if(void 0!==(o=t[i])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==r&&p(o)&&(o=o[r%o.length],s=!1),void 0!==o))return n&&!s&&(n.cacheable=!1),o}function eo(t,e,r){var n=t.min,i=t.max,a=_(e,(i-n)/2),o=function(t,e){return r&&0===t?0:t+e};return{min:o(n,-Math.abs(a)),max:o(i,a)}}function es(t,e){return Object.assign(Object.create(t),e)}function el(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return t[0]},o=n||t;return void 0===i&&(i=ep("_fallback",t)),new Proxy((e={},(0,s._)(e,Symbol.toStringTag,"Object"),(0,s._)(e,"_cacheable",!0),(0,s._)(e,"_scopes",t),(0,s._)(e,"_rootScopes",o),(0,s._)(e,"_fallback",i),(0,s._)(e,"_getTarget",a),(0,s._)(e,"override",function(e){return el([e].concat((0,l._)(t)),r,o,i)}),e),{deleteProperty:function(e,r){return delete e[r],delete e._keys,delete t[0][r],!0},get:function(e,n){return eh(e,n,function(){return function(t,e,r,n){var i=!0,a=!1,o=void 0;try{for(var s,l,u=e[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var c=l.value;if(s=ep(c?c+F(t):t,r),void 0!==s)return ec(t,s)?ef(r,n,t,s):s}}catch(t){a=!0,o=t}finally{try{i||null==u.return||u.return()}finally{if(a)throw o}}}(n,r,t,e)})},getOwnPropertyDescriptor:function(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf:function(){return Reflect.getPrototypeOf(t[0])},has:function(t,e){return ev(t).includes(e)},ownKeys:function(t){return ev(t)},set:function(t,e,r){var n=t._storage||(t._storage=a());return t[e]=n[e]=r,delete t._keys,!0}})}function eu(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},r=t._scriptable,n=void 0===r?e.scriptable:r,i=t._indexable,a=void 0===i?e.indexable:i,o=t._allKeys;return{allKeys:void 0===o?e.allKeys:o,scriptable:n,indexable:a,isScriptable:L(n)?n:function(){return n},isIndexable:L(a)?a:function(){return a}}}var ec=function(t,e){return v(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object)};function eh(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];var n=r();return t[e]=n,n}function ef(t,e,r,n){var i,a=e._rootScopes,o=L(i=e._fallback)?i(r,n):i,s=(0,l._)(t).concat((0,l._)(a)),u=new Set;u.add(n);var c=ed(u,s,r,o||r,n);return null!==c&&(void 0===o||o===r||null!==(c=ed(u,s,o,c,n)))&&el(Array.from(u),[""],a,o,function(){var t,i;return r in(t=e._getTarget())||(t[r]={}),p(i=t[r])&&v(n)?n:i||{}})}function ed(t,e,r,n,i){for(;r;)r=function(t,e,r,n,i){var a=!0,o=!1,s=void 0;try{for(var l,u=e[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var c=l.value,h=!0===r?c:"string"==typeof r?T(c,r):void 0;if(h){t.add(h);var f,d=(f=h._fallback,L(f)?f(r,i):f);if(void 0!==d&&d!==r&&d!==n)return d}else if(!1===h&&void 0!==n&&r!==n)return null}}catch(t){o=!0,s=t}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return!1}(t,e,r,n,i);return r}function ep(t,e){var r=!0,n=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(r=(a=o.next()).done);r=!0){var s=a.value;if(s){var l=s[t];if(void 0!==l)return l}}}catch(t){n=!0,i=t}finally{try{r||null==o.return||o.return()}finally{if(n)throw i}}}function ev(t){var e=t._keys;return e||(e=t._keys=function(t){var e=new Set,r=!0,n=!1,i=void 0,a=!0,o=!1,s=void 0;try{for(var l,u=t[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var c=l.value;try{for(var h,f=Object.keys(c).filter(function(t){return!t.startsWith("_")})[Symbol.iterator]();!(r=(h=f.next()).done);r=!0){var d=h.value;e.add(d)}}catch(t){n=!0,i=t}finally{try{r||null==f.return||f.return()}finally{if(n)throw i}}}}catch(t){o=!0,s=t}finally{try{a||null==u.return||u.return()}finally{if(o)throw s}}return Array.from(e)}(t._scopes)),e}function eg(t,e,r,n){var i,a,o,s=t.iScale,l=this._parsing.key,u=void 0===l?"r":l,c=Array(n);for(i=0;i<n;++i)o=e[a=i+r],c[i]={r:s.parse(T(o,u),a)};return c}var ey=Number.EPSILON||1e-14,em=function(t,e){return e<t.length&&!t[e].skip&&t[e]},eb=function(t){return"x"===t?"y":"x"};function e_(t,e,r,n){var i=t.skip?e:t,a=r.skip?e:r,o=ta(e,i),s=ta(a,e),l=o/(o+s),u=s/(o+s);l=isNaN(l)?0:l,u=isNaN(u)?0:u;var c=n*l,h=n*u;return{previous:{x:e.x-c*(a.x-i.x),y:e.y-c*(a.y-i.y)},next:{x:e.x+h*(a.x-i.x),y:e.y+h*(a.y-i.y)}}}function ex(t){var e,r,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",a=eb(i),o=t.length,s=Array(o).fill(0),l=Array(o),u=em(t,0);for(e=0;e<o;++e)if(r=n,n=u,u=em(t,e+1),n){if(u){var c=u[i]-n[i];s[e]=0!==c?(u[a]-n[a])/c:0}l[e]=r?u?$(s[e-1])!==$(s[e])?0:(s[e-1]+s[e])/2:s[e-1]:s[e]}!function(t,e,r){for(var n,i,a,o,s,l=t.length,u=em(t,0),c=0;c<l-1;++c)if(s=u,u=em(t,c+1),s&&u){if(q(e[c],0,ey)){r[c]=r[c+1]=0;continue}(o=Math.pow(n=r[c]/e[c],2)+Math.pow(i=r[c+1]/e[c],2))<=9||(a=3/Math.sqrt(o),r[c]=n*a*e[c],r[c+1]=i*a*e[c])}}(t,s,l),function(t,e){for(var r,n,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",o=eb(a),s=t.length,l=em(t,0),u=0;u<s;++u)if(n=i,i=l,l=em(t,u+1),i){var c=i[a],h=i[o];n&&(r=(c-n[a])/3,i["cp1".concat(a)]=c-r,i["cp1".concat(o)]=h-r*e[u]),l&&(r=(l[a]-c)/3,i["cp2".concat(a)]=c+r,i["cp2".concat(o)]=h+r*e[u])}}(t,l,i)}function ek(t,e,r){return Math.max(Math.min(t,r),e)}function ew(t,e,r,n,i){var a,o,s,l;if(e.spanGaps&&(t=t.filter(function(t){return!t.skip})),"monotone"===e.cubicInterpolationMode)ex(t,i);else{var u=n?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)l=e_(u,s=t[a],t[Math.min(a+1,o-(n?0:1))%o],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}e.capBezierPoints&&function(t,e){var r,n,i,a,o,s=t0(t[0],e);for(r=0,n=t.length;r<n;++r)o=a,a=s,s=r<n-1&&t0(t[r+1],e),a&&(i=t[r],o&&(i.cp1x=ek(i.cp1x,e.left,e.right),i.cp1y=ek(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=ek(i.cp2x,e.left,e.right),i.cp2y=ek(i.cp2y,e.top,e.bottom)))}(t,r)}function eM(){return"undefined"!=typeof window&&"undefined"!=typeof document}function eS(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function eO(t,e,r){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[r])):n=t,n}var eA=function(t){return t.ownerDocument.defaultView.getComputedStyle(t,null)};function eE(t,e){return eA(t).getPropertyValue(e)}var eP=["top","right","bottom","left"];function eD(t,e,r){var n={};r=r?"-"+r:"";for(var i=0;i<4;i++){var a=eP[i];n[a]=parseFloat(t[e+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function eC(t,e){if("native"in t)return t;var r=e.canvas,n=e.currentDevicePixelRatio,i=eA(r),a="border-box"===i.boxSizing,o=eD(i,"padding"),s=eD(i,"border","width"),l=function(t,e){var r,n,i,a=t.touches,o=a&&a.length?a[0]:t,s=o.offsetX,l=o.offsetY,u=!1;if(r=t.target,(s>0||l>0)&&(!r||!r.shadowRoot))n=s,i=l;else{var c=e.getBoundingClientRect();n=o.clientX-c.left,i=o.clientY-c.top,u=!0}return{x:n,y:i,box:u}}(t,r),u=l.x,c=l.y,h=l.box,f=o.left+(h&&s.left),d=o.top+(h&&s.top),p=e.width,v=e.height;return a&&(p-=o.width+s.width,v-=o.height+s.height),{x:Math.round((u-f)/p*r.width/n),y:Math.round((c-d)/v*r.height/n)}}var ej=function(t){return Math.round(10*t)/10};function eT(t,e,r,n){var i=eA(t),a=eD(i,"margin"),o=eO(i.maxWidth,t,"clientWidth")||W,s=eO(i.maxHeight,t,"clientHeight")||W,l=function(t,e,r){var n,i;if(void 0===e||void 0===r){var a=t&&eS(t);if(a){var o=a.getBoundingClientRect(),s=eA(a),l=eD(s,"border","width"),u=eD(s,"padding");e=o.width-u.width-l.width,r=o.height-u.height-l.height,n=eO(s.maxWidth,a,"clientWidth"),i=eO(s.maxHeight,a,"clientHeight")}else e=t.clientWidth,r=t.clientHeight}return{width:e,height:r,maxWidth:n||W,maxHeight:i||W}}(t,e,r),u=l.width,c=l.height;if("content-box"===i.boxSizing){var h=eD(i,"border","width"),f=eD(i,"padding");u-=f.width+h.width,c-=f.height+h.height}return u=Math.max(0,u-a.width),c=Math.max(0,n?u/n:c-a.height),u=ej(Math.min(u,o,l.maxWidth)),c=ej(Math.min(c,s,l.maxHeight)),u&&!c&&(c=ej(u/2)),(void 0!==e||void 0!==r)&&n&&l.height&&c>l.height&&(u=ej(Math.floor((c=l.height)*n))),{width:u,height:c}}function eF(t,e,r){var n=e||1,i=ej(t.height*n),a=ej(t.width*n);t.height=ej(t.height),t.width=ej(t.width);var o=t.canvas;return o.style&&(r||!o.style.height&&!o.style.width)&&(o.style.height="".concat(t.height,"px"),o.style.width="".concat(t.width,"px")),(t.currentDevicePixelRatio!==n||o.height!==i||o.width!==a)&&(t.currentDevicePixelRatio=n,o.height=i,o.width=a,t.ctx.setTransform(n,0,0,n,0,0),!0)}var eI=function(){var t=!1;try{var e={get passive(){return t=!0,!1}};eM()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function eL(t,e){var r=eE(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function eR(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}}function eB(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:"middle"===n?r<.5?t.y:e.y:"after"===n?r<1?t.y:e.y:r>0?e.y:t.y}}function eN(t,e,r,n){var i={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=eR(t,i,r),s=eR(i,a,r),l=eR(a,e,r),u=eR(o,s,r),c=eR(s,l,r);return eR(u,c,r)}function eV(t,e,r){var n;return t?(n=r,{x:function(t){return e+e+n-t},setWidth:function(t){n=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function ez(t,e){var r,n;("ltr"===e||"rtl"===e)&&(n=[(r=t.canvas.style).getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function eW(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function eH(t){return"angle"===t?{between:tl,compare:to,normalize:ts}:{between:th,compare:function(t,e){return t-e},normalize:function(t){return t}}}function eU(t){var e=t.start,r=t.end,n=t.count;return{start:e%n,end:r%n,loop:t.loop&&(r-e+1)%n==0,style:t.style}}function eK(t,e,r){if(!r)return[t];for(var n,i,a,o=r.property,s=r.start,l=r.end,u=e.length,c=eH(o),h=c.compare,f=c.between,d=c.normalize,p=function(t,e,r){var n,i=r.property,a=r.start,o=r.end,s=eH(i),l=s.between,u=s.normalize,c=e.length,h=t.start,f=t.end,d=t.loop;if(d){for(h+=c,f+=c,n=0;n<c&&l(u(e[h%c][i]),a,o);++n)h--,f--;h%=c,f%=c}return f<h&&(f+=c),{start:h,end:f,loop:d,style:t.style}}(t,e,r),v=p.start,g=p.end,y=p.loop,m=p.style,b=[],_=!1,x=null,k=v,w=v;k<=g;++k)(i=e[k%u]).skip||(n=d(i[o]))===a||(_=f(n,s,l),null===x&&(_||f(s,a,n)&&0!==h(s,a))&&(x=0===h(n,s)?k:w),null!==x&&(!_||0===h(l,n)||f(l,a,n))&&(b.push(eU({start:x,end:k,loop:y,count:u,style:m})),x=null),w=k,a=n);return null!==x&&b.push(eU({start:x,end:g,loop:y,count:u,style:m})),b}function eY(t,e){for(var r=[],n=t.segments,i=0;i<n.length;i++){var a=eK(n[i],t.points,e);a.length&&r.push.apply(r,(0,l._)(a))}return r}function eX(t,e){var r=t.points,n=t.options.spanGaps,i=r.length;if(!i)return[];var a=!!t._loop,o=function(t,e,r,n){var i=0,a=e-1;if(r&&!n)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,r&&(a+=i);a>i&&t[a%e].skip;)a--;return{start:i,end:a%=e}}(r,i,a,n),s=o.start,l=o.end;if(!0===n)return e$(t,[{start:s,end:l,loop:a}],r,e);var u=l<s?l+i:l,c=!!t._fullLoop&&0===s&&l===i-1;return e$(t,function(t,e,r,n){var i,a=t.length,o=[],s=e,l=t[e];for(i=e+1;i<=r;++i){var u=t[i%a];u.skip||u.stop?l.skip||(n=!1,o.push({start:e%a,end:(i-1)%a,loop:n}),e=s=u.stop?i:null):(s=i,l.skip&&(e=i)),l=u}return null!==s&&o.push({start:e%a,end:s%a,loop:n}),o}(r,s,u,c),r,e)}function e$(t,e,r,n){return n&&n.setContext&&r?function(t,e,r,n){var i=t._chart.getContext(),a=eq(t.options),o=t._datasetIndex,s=t.options.spanGaps,l=r.length,u=[],c=a,h=e[0].start,f=h;function d(t,e,n,i){var a=s?-1:1;if(t!==e){for(t+=l;r[t%l].skip;)t-=a;for(;r[e%l].skip;)e+=a;t%l!=e%l&&(u.push({start:t%l,end:e%l,loop:n,style:i}),c=i,h=e%l)}}var p=!0,v=!1,g=void 0;try{for(var y,m=e[Symbol.iterator]();!(p=(y=m.next()).done);p=!0){var b=y.value,_=r[(h=s?h:b.start)%l],x=void 0;for(f=h+1;f<=b.end;f++){var k=r[f%l];x=eq(n.setContext(es(i,{type:"segment",p0:_,p1:k,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),function(t,e){if(!e)return!1;var r=[],n=function(t,e){return tT(e)?(r.includes(e)||r.push(e),r.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}(x,c)&&d(h,f-1,b.loop,c),_=k,c=x}h<f-1&&d(h,f-1,b.loop,c)}}catch(t){v=!0,g=t}finally{try{p||null==m.return||m.return()}finally{if(v)throw g}}return u}(t,e,r,n):e}function eq(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function eG(t,e,r){return t.options.clip?t[r]:e[r]}function eQ(t,e){var r,n,i,a=e._clip;if(a.disabled)return!1;var o=(r=t.chartArea,n=e.xScale,i=e.yScale,n&&i?{left:eG(n,r,"left"),right:eG(n,r,"right"),top:eG(i,r,"top"),bottom:eG(i,r,"bottom")}:r);return{left:!1===a.left?0:o.left-(!0===a.left?0:a.left),right:!1===a.right?t.width:o.right+(!0===a.right?0:a.right),top:!1===a.top?0:o.top-(!0===a.top?0:a.top),bottom:!1===a.bottom?t.height:o.bottom+(!0===a.bottom?0:a.bottom)}}},{"@swc/helpers/_/_class_call_check":"2HOGN","@swc/helpers/_/_create_class":"8oe8p","@swc/helpers/_/_define_property":"27c3O","@swc/helpers/_/_to_consumable_array":"4oNkS","@swc/helpers/_/_type_of":"2bRX5","@kurkle/color":"gdy3W","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],gdy3W:[function(t,e,r){/*!
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*/var n,i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(r),i.export(r,"Color",function(){return Y}),i.export(r,"b2n",function(){return d}),i.export(r,"b2p",function(){return h}),i.export(r,"default",function(){return X}),i.export(r,"hexParse",function(){return _}),i.export(r,"hexString",function(){return x}),i.export(r,"hsl2rgb",function(){return E}),i.export(r,"hslString",function(){return F}),i.export(r,"hsv2rgb",function(){return D}),i.export(r,"hueParse",function(){return j}),i.export(r,"hwb2rgb",function(){return P}),i.export(r,"lim",function(){return u}),i.export(r,"n2b",function(){return f}),i.export(r,"n2p",function(){return p}),i.export(r,"nameParse",function(){return R}),i.export(r,"p2b",function(){return c}),i.export(r,"rgb2hsl",function(){return O}),i.export(r,"rgbParse",function(){return N}),i.export(r,"rgbString",function(){return V}),i.export(r,"rotate",function(){return T}),i.export(r,"round",function(){return l});var a=t("@swc/helpers/_/_class_call_check"),o=t("@swc/helpers/_/_create_class"),s=t("@swc/helpers/_/_type_of");function l(t){return t+.5|0}var u=function(t,e,r){return Math.max(Math.min(t,r),e)};function c(t){return u(l(2.55*t),0,255)}function h(t){return u(l(t/2.55),0,100)}function f(t){return u(l(255*t),0,255)}function d(t){return u(l(t/2.55)/100,0,1)}function p(t){return u(l(100*t),0,100)}var v={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},g=Array.from("0123456789ABCDEF"),y=function(t){return g[15&t]},m=function(t){return g[(240&t)>>4]+g[15&t]},b=function(t){return(240&t)>>4==(15&t)};function _(t){var e,r=t.length;return"#"===t[0]&&(4===r||5===r?e={r:255&17*v[t[1]],g:255&17*v[t[2]],b:255&17*v[t[3]],a:5===r?17*v[t[4]]:255}:(7===r||9===r)&&(e={r:v[t[1]]<<4|v[t[2]],g:v[t[3]]<<4|v[t[4]],b:v[t[5]]<<4|v[t[6]],a:9===r?v[t[7]]<<4|v[t[8]]:255})),e}function x(t){var e,r=b(t.r)&&b(t.g)&&b(t.b)&&b(t.a)?y:m;return t?"#"+r(t.r)+r(t.g)+r(t.b)+((e=t.a)<255?r(e):""):void 0}var k=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function w(t,e,r){var n=e*Math.min(r,1-r),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return r-n*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function M(t,e,r){var n=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(n+t/60)%6;return r-r*e*Math.max(Math.min(i,4-i,1),0)};return[n(5),n(3),n(1)]}function S(t,e,r){var n,i=w(t,1,.5);for(e+r>1&&(n=1/(e+r),e*=n,r*=n),n=0;n<3;n++)i[n]*=1-e-r,i[n]+=e;return i}function O(t){var e,r,n,i=t.r/255,a=t.g/255,o=t.b/255,s=Math.max(i,a,o),l=Math.min(i,a,o),u=(s+l)/2;return s!==l&&(n=s-l,r=u>.5?n/(2-s-l):n/(s+l),e=60*(e=i===s?(a-o)/n+(a<o?6:0):a===s?(o-i)/n+2:(i-a)/n+4)+.5),[0|e,r||0,u]}function A(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(f)}function E(t,e,r){return A(w,t,e,r)}function P(t,e,r){return A(S,t,e,r)}function D(t,e,r){return A(M,t,e,r)}function C(t){return(t%360+360)%360}function j(t){var e,r=k.exec(t),n=255;if(r){r[5]!==e&&(n=r[6]?c(+r[5]):f(+r[5]));var i=C(+r[2]),a=+r[3]/100,o=+r[4]/100;return{r:(e="hwb"===r[1]?P(i,a,o):"hsv"===r[1]?D(i,a,o):E(i,a,o))[0],g:e[1],b:e[2],a:n}}}function T(t,e){var r=O(t);r[0]=C(r[0]+e),r=E(r),t.r=r[0],t.g=r[1],t.b=r[2]}function F(t){if(t){var e=O(t),r=e[0],n=p(e[1]),i=p(e[2]);return t.a<255?"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(d(t.a),")"):"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)")}}var I={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"},L={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"};function R(t){n||((n=function(){var t,e,r,n,i,a={},o=Object.keys(L),s=Object.keys(I);for(t=0;t<o.length;t++){for(e=0,n=i=o[t];e<s.length;e++)r=s[e],i=i.replace(r,I[r]);r=parseInt(L[n],16),a[i]=[r>>16&255,r>>8&255,255&r]}return a}()).transparent=[0,0,0,0]);var e=n[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}var B=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function N(t){var e,r,n,i=B.exec(t),a=255;if(i){if(i[7]!==e){var o=+i[7];a=i[8]?c(o):u(255*o,0,255)}return e=+i[1],r=+i[3],n=+i[5],{r:e=255&(i[2]?c(e):u(e,0,255)),g:r=255&(i[4]?c(r):u(r,0,255)),b:n=255&(i[6]?c(n):u(n,0,255)),a:a}}}function V(t){return t&&(t.a<255?"rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", ").concat(d(t.a),")"):"rgb(".concat(t.r,", ").concat(t.g,", ").concat(t.b,")"))}var z=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},W=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)};function H(t,e,r){if(t){var n=O(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,0===e?360:1)),n=E(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function U(t,e){return t?Object.assign(e||{},t):t}function K(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=f(t[3]))):(e=U(t,{r:0,g:0,b:0,a:1})).a=f(e.a),e}var Y=function(){function t(e){if((0,a._)(this,t),e instanceof t)return e;var r,n=void 0===e?"undefined":(0,s._)(e);"object"===n?r=K(e):"string"===n&&(r=_(e)||R(e)||("r"===e.charAt(0)?N(e):j(e))),this._rgb=r,this._valid=!!r}return(0,o._)(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=U(this._rgb);return t&&(t.a=d(t.a)),t},set:function(t){this._rgb=K(t)}},{key:"rgbString",value:function(){return this._valid?V(this._rgb):void 0}},{key:"hexString",value:function(){return this._valid?x(this._rgb):void 0}},{key:"hslString",value:function(){return this._valid?F(this._rgb):void 0}},{key:"mix",value:function(t,e){if(t){var r,n=this.rgb,i=t.rgb,a=e===r?.5:e,o=2*a-1,s=n.a-i.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;r=1-l,n.r=255&l*n.r+r*i.r+.5,n.g=255&l*n.g+r*i.g+.5,n.b=255&l*n.b+r*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}},{key:"interpolate",value:function(t,e){if(t){var r,n,i,a,o;this._rgb=(r=this._rgb,n=t._rgb,i=W(d(r.r)),a=W(d(r.g)),o=W(d(r.b)),{r:f(z(i+e*(W(d(n.r))-i))),g:f(z(a+e*(W(d(n.g))-a))),b:f(z(o+e*(W(d(n.b))-o))),a:r.a+e*(n.a-r.a)})}return this}},{key:"clone",value:function(){return new t(this.rgb)}},{key:"alpha",value:function(t){return this._rgb.a=f(t),this}},{key:"clearer",value:function(t){var e=this._rgb;return e.a*=1-t,this}},{key:"greyscale",value:function(){var t=this._rgb,e=l(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}},{key:"opaquer",value:function(t){var e=this._rgb;return e.a*=1+t,this}},{key:"negate",value:function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}},{key:"lighten",value:function(t){return H(this._rgb,2,t),this}},{key:"darken",value:function(t){return H(this._rgb,2,-t),this}},{key:"saturate",value:function(t){return H(this._rgb,1,t),this}},{key:"desaturate",value:function(t){return H(this._rgb,1,-t),this}},{key:"rotate",value:function(t){return T(this._rgb,t),this}}]),t}();function X(t){return new Y(t)}},{"@swc/helpers/_/_class_call_check":"2HOGN","@swc/helpers/_/_create_class":"8oe8p","@swc/helpers/_/_type_of":"2bRX5","@parcel/transformer-js/src/esmodule-helpers.js":"kPSB8"}],Fap9I:[function(t,e,r){var n=t("@swc/helpers/_/_sliced_to_array"),i=t("@swc/helpers/_/_to_consumable_array"),a=t("@swc/helpers/_/_type_of"),o=t("71b6e3b39cf59f9f"),s=t("c094f2fb379d5867"),l=["keyword","gray","hex"],u={},c=!0,h=!1,f=void 0;try{for(var d,p=Object.keys(s)[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var v=d.value;u[(0,i._)(s[v].labels).sort().join("")]=v}}catch(t){h=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(h)throw f}}var g={};function y(t,e){if(!(this instanceof y))return new y(t,e);if(e&&e in l&&(e=null),e&&!(e in s))throw Error("Unknown model: "+e);if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof y)this.model=t.model,this.color=(0,i._)(t.color),this.valpha=t.valpha;else if("string"==typeof t){var r,n,a=o.get(t);if(null===a)throw Error("Unable to parse color from string: "+t);this.model=a.model,n=s[this.model].channels,this.color=a.value.slice(0,n),this.valpha="number"==typeof a.value[n]?a.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=s[this.model].channels;var c=Array.prototype.slice.call(t,0,n);this.color=S(c,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;var h=Object.keys(t);"alpha"in t&&(h.splice(h.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);var f=h.sort().join("");if(!(f in u))throw Error("Unable to parse color from object: "+JSON.stringify(t));this.model=u[f];var d=s[this.model].labels,p=[];for(r=0;r<d.length;r++)p.push(t[d[r]]);this.color=S(p)}if(g[this.model])for(r=0,n=s[this.model].channels;r<n;r++){var v=g[this.model][r];v&&(this.color[r]=v(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}y.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in o.to?this:this.rgb(),r=1===(e=e.round("number"==typeof t?t:1)).valpha?e.color:(0,i._)(e.color).concat([this.valpha]);return o.to[e.model](r)},percentString:function(t){var e=this.rgb().round("number"==typeof t?t:1),r=1===e.valpha?e.color:(0,i._)(e.color).concat([this.valpha]);return o.to.rgb.percent(r)},array:function(){return 1===this.valpha?(0,i._)(this.color):(0,i._)(this.color).concat([this.valpha])},object:function(){for(var t={},e=s[this.model].channels,r=s[this.model].labels,n=0;n<e;n++)t[r[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round:function(t){var e;return t=Math.max(t||0,0),new y((0,i._)(this.color.map((e=t,function(t){return Number(t.toFixed(e))}))).concat([this.valpha]),this.model)},alpha:function(t){return void 0!==t?new y((0,i._)(this.color).concat([Math.max(0,Math.min(1,t))]),this.model):this.valpha},red:w("rgb",0,M(255)),green:w("rgb",1,M(255)),blue:w("rgb",2,M(255)),hue:w(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:w("hsl",1,M(100)),lightness:w("hsl",2,M(100)),saturationv:w("hsv",1,M(100)),value:w("hsv",2,M(100)),chroma:w("hcg",1,M(100)),gray:w("hcg",2,M(100)),white:w("hwb",1,M(100)),wblack:w("hwb",2,M(100)),cyan:w("cmyk",0,M(100)),magenta:w("cmyk",1,M(100)),yellow:w("cmyk",2,M(100)),black:w("cmyk",3,M(100)),x:w("xyz",0,M(95.047)),y:w("xyz",1,M(100)),z:w("xyz",2,M(108.833)),l:w("lab",0,M(100)),a:w("lab",1),b:w("lab",2),keyword:function(t){return void 0!==t?new y(t):s[this.model].keyword(this.color)},hex:function(t){return void 0!==t?new y(t):o.to.hex(this.rgb().round().color)},hexa:function(t){if(void 0!==t)return new y(t);var e=this.rgb().round().color,r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),o.to.hex(e)+r},rgbNumber:function(){var t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity:function(){var t=this.rgb().color,e=[],r=!0,i=!1,a=void 0;try{for(var o,s=t.entries()[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var l=(0,n._)(o.value,2),u=l[0],c=l[1]/255;e[u]=c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}}catch(t){i=!0,a=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return y.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r=(r+t)%360)<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+(void 0===t?"undefined":(0,a._)(t)));var r=t.rgb(),n=this.rgb(),i=void 0===e?.5:e,o=2*i-1,s=r.alpha()-n.alpha(),l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2,u=1-l;return y.rgb(l*r.red()+u*n.red(),l*r.green()+u*n.green(),l*r.blue()+u*n.blue(),r.alpha()*i+n.alpha()*(1-i))}};var m=!0,b=!1,_=void 0;try{for(var x,k=Object.keys(s)[Symbol.iterator]();!(m=(x=k.next()).done);m=!0)!function(){var t=x.value;if(!l.includes(t)){var e=s[t].channels;y.prototype[t]=function(){for(var e,r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];return this.model===t?new y(this):n.length>0?new y(n,t):new y((0,i._)((e=s[this.model][t].raw(this.color),Array.isArray(e)?e:[e])).concat([this.valpha]),t)},y[t]=function(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n[0];return"number"==typeof a&&(a=S(n,e)),new y(a,t)}}}()}catch(t){b=!0,_=t}finally{try{m||null==k.return||k.return()}finally{if(b)throw _}}function w(t,e,r){t=Array.isArray(t)?t:[t];var n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var l=o.value;(g[l]||(g[l]=[]))[e]=r}}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return t=t[0],function(n){var i;return void 0!==n?(r&&(n=r(n)),(i=this[t]()).color[e]=n):(i=this[t]().color[e],r&&(i=r(i))),i}}function M(t){return function(e){return Math.max(0,Math.min(t,e))}}function S(t,e){for(var r=0;r<e;r++)"number"!=typeof t[r]&&(t[r]=0);return t}e.exports=y},{"@swc/helpers/_/_sliced_to_array":"hefcy","@swc/helpers/_/_to_consumable_array":"4oNkS","@swc/helpers/_/_type_of":"2bRX5","71b6e3b39cf59f9f":"1g3LE",c094f2fb379d5867:"b0bZu"}],"1g3LE":[function(t,e,r){var n=t("d7a6eeb7388b4bb"),i=t("248ce9e419a8df53"),a=Object.hasOwnProperty,o=Object.create(null);for(var s in n)a.call(n,s)&&(o[n[s]]=s);var l=e.exports={to:{},get:{}};function u(t,e,r){return Math.min(Math.max(e,t),r)}function c(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}l.get=function(t){var e,r;switch(t.substring(0,3).toLowerCase()){case"hsl":e=l.get.hsl(t),r="hsl";break;case"hwb":e=l.get.hwb(t),r="hwb";break;default:e=l.get.rgb(t),r="rgb"}return e?{model:r,value:e}:null},l.get.rgb=function(t){if(!t)return null;var e,r,i,o=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=0,i=e[2],e=e[1];r<3;r++){var s=2*r;o[r]=parseInt(e.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=0,i=(e=e[1])[3];r<3;r++)o[r]=parseInt(e[r]+e[r],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)o[r]=parseInt(e[r+1],0);e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}else if(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(r=0;r<3;r++)o[r]=Math.round(2.55*parseFloat(e[r+1]));e[4]&&(e[5]?o[3]=.01*parseFloat(e[4]):o[3]=parseFloat(e[4]))}else if(!(e=t.match(/^(\w+)$/)))return null;else return"transparent"===e[1]?[0,0,0,0]:a.call(n,e[1])?((o=n[e[1]])[3]=1,o):null;for(r=0;r<3;r++)o[r]=u(o[r],0,255);return o[3]=u(o[3],0,1),o},l.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(r)?1:r,0,1)]}return null},l.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var r=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(r)?1:r,0,1)]}return null},l.to.hex=function(){var t=i(arguments);return"#"+c(t[0])+c(t[1])+c(t[2])+(t[3]<1?c(Math.round(255*t[3])):"")},l.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},l.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+r+"%, "+n+"%)":"rgba("+e+"%, "+r+"%, "+n+"%, "+t[3]+")"},l.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},l.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},l.to.keyword=function(t){return o[t.slice(0,3)]}},{d7a6eeb7388b4bb:"9CRqC","248ce9e419a8df53":"7SGVb"}],"9CRqC":[function(t,e,r){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],"7SGVb":[function(t,e,r){var n=t("ce0bf6d0bc000d24"),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(t){for(var e=[],r=0,o=t.length;r<o;r++){var s=t[r];n(s)?e=i.call(e,a.call(s)):e.push(s)}return e};o.wrap=function(t){return function(){return t(o(arguments))}}},{ce0bf6d0bc000d24:"4HvEH"}],"4HvEH":[function(t,e,r){e.exports=function(t){return!!t&&"string"!=typeof t&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}},{}],b0bZu:[function(t,e,r){var n=t("739980f7990d3c32"),i=t("30ea0c7ee5f3dd94"),a={};Object.keys(n).forEach(function(t){a[t]={},Object.defineProperty(a[t],"channels",{value:n[t].channels}),Object.defineProperty(a[t],"labels",{value:n[t].labels});var e=i(t);Object.keys(e).forEach(function(r){var n,i,o=e[r];a[t][r]=(n=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0];if(null==n)return n;n.length>1&&(e=n);var i=o(e);if("object"==typeof i)for(var a=i.length,s=0;s<a;s++)i[s]=Math.round(i[s]);return i},"conversion"in o&&(n.conversion=o.conversion),n),a[t][r].raw=(i=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0];return null==n?n:(n.length>1&&(e=n),o(e))},"conversion"in o&&(i.conversion=o.conversion),i)})}),e.exports=a},{"739980f7990d3c32":"bLCsr","30ea0c7ee5f3dd94":"B0afd"}],bLCsr:[function(t,e,r){var n=t("@swc/helpers/_/_sliced_to_array"),i=t("efc99055946c4df8"),a={},o=!0,s=!1,l=void 0;try{for(var u,c=Object.keys(i)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value;a[i[h]]=h}}catch(t){s=!0,l=t}finally{try{o||null==c.return||c.return()}finally{if(s)throw l}}var f={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=f;var d=!0,p=!1,v=void 0;try{for(var g,y=Object.keys(f)[Symbol.iterator]();!(d=(g=y.next()).done);d=!0){var m=g.value;if(!("channels"in f[m]))throw Error("missing channels property: "+m);if(!("labels"in f[m]))throw Error("missing channel labels property: "+m);if(f[m].labels.length!==f[m].channels)throw Error("channel and label counts mismatch: "+m);var b=f[m],_=b.channels,x=b.labels;delete f[m].channels,delete f[m].labels,Object.defineProperty(f[m],"channels",{value:_}),Object.defineProperty(f[m],"labels",{value:x})}}catch(t){p=!0,v=t}finally{try{d||null==y.return||y.return()}finally{if(p)throw v}}f.rgb.hsl=function(t){var e,r=t[0]/255,n=t[1]/255,i=t[2]/255,a=Math.min(r,n,i),o=Math.max(r,n,i),s=o-a;o===a?e=0:r===o?e=(n-i)/s:n===o?e=2+(i-r)/s:i===o&&(e=4+(r-n)/s),(e=Math.min(60*e,360))<0&&(e+=360);var l=(a+o)/2;return[e,100*(o===a?0:l<=.5?s/(o+a):s/(2-o-a)),100*l]},f.rgb.hsv=function(t){var e,r,n,i,a,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),h=function(t){return(u-t)/6/c+.5};return 0===c?(i=0,a=0):(a=c/u,e=h(o),r=h(s),n=h(l),o===u?i=n-r:s===u?i=1/3+e-n:l===u&&(i=2/3+r-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*u]},f.rgb.hwb=function(t){var e=t[0],r=t[1],n=t[2];return[f.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(r,n))*100,100*(n=1-1/255*Math.max(e,Math.max(r,n)))]},f.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255,i=Math.min(1-e,1-r,1-n);return[100*((1-e-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},f.rgb.keyword=function(t){var e=a[t];if(e)return e;var r=1/0,n=!0,o=!1,s=void 0;try{for(var l,u,c=Object.keys(i)[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var h=u.value,f=i[h],d=Math.pow(t[0]-f[0],2)+Math.pow(t[1]-f[1],2)+Math.pow(t[2]-f[2],2);d<r&&(r=d,l=h)}}catch(t){o=!0,s=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw s}}return l},f.keyword.rgb=function(t){return i[t]},f.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,n=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*r+.0722*n),100*(.0193*e+.1192*r+.9505*n)]},f.rgb.lab=function(t){var e=f.rgb.xyz(t),r=e[0],n=e[1],i=e[2];return r/=95.047,n/=100,i/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},f.hsl.rgb=function(t){var e,r,n,i=t[0]/360,a=t[1]/100,o=t[2]/100;if(0===a)return[n=255*o,n,n];e=o<.5?o*(1+a):o+a-o*a;for(var s=2*o-e,l=[0,0,0],u=0;u<3;u++)(r=i+-(1/3*(u-1)))<0&&r++,r>1&&r--,n=6*r<1?s+(e-s)*6*r:2*r<1?e:3*r<2?s+(e-s)*(2/3-r)*6:s,l[u]=255*n;return l},f.hsl.hsv=function(t){var e=t[0],r=t[1]/100,n=t[2]/100,i=r,a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;var o=(n+r)/2;return[e,100*(0===n?2*i/(a+i):2*r/(n+r)),100*o]},f.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,i=e-Math.floor(e),a=255*n*(1-r),o=255*n*(1-r*i),s=255*n*(1-r*(1-i));switch(n*=255,Math.floor(e)%6){case 0:return[n,s,a];case 1:return[o,n,a];case 2:return[a,n,s];case 3:return[a,o,n];case 4:return[s,a,n];case 5:return[n,a,o]}},f.hsv.hsl=function(t){var e,r,n=t[0],i=t[1]/100,a=t[2]/100,o=Math.max(a,.01);r=(2-i)*a;var s=(2-i)*o;return[n,100*(i*o/(s<=1?s:2-s)||0),100*(r/=2)]},f.hwb.rgb=function(t){var e,r,n,i,a=t[0]/360,o=t[1]/100,s=t[2]/100,l=o+s;l>1&&(o/=l,s/=l);var u=Math.floor(6*a),c=1-s;e=6*a-u,(1&u)!=0&&(e=1-e);var h=o+e*(c-o);switch(u){default:case 6:case 0:r=c,n=h,i=o;break;case 1:r=h,n=c,i=o;break;case 2:r=o,n=c,i=h;break;case 3:r=o,n=h,i=c;break;case 4:r=h,n=o,i=c;break;case 5:r=c,n=o,i=h}return[255*r,255*n,255*i]},f.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,n=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},f.xyz.rgb=function(t){var e,r,n,i=t[0]/100,a=t[1]/100,o=t[2]/100;return e=3.2406*i+-1.5372*a+-.4986*o,r=-.9689*i+1.8758*a+.0415*o,n=.0557*i+-.204*a+1.057*o,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(e=Math.min(Math.max(0,e),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},f.xyz.lab=function(t){var e=t[0],r=t[1],n=t[2];return e/=95.047,r/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(e-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},f.lab.xyz=function(t){var e,r,n,i=t[0],a=t[1],o=t[2];e=a/500+(r=(i+16)/116),n=r-o/200;var s=Math.pow(r,3),l=Math.pow(e,3),u=Math.pow(n,3);return r=(s>.008856?s:(r-16/116)/7.787)*100,[e=(l>.008856?l:(e-16/116)/7.787)*95.047,r,n=(u>.008856?u:(n-16/116)/7.787)*108.883]},f.lab.lch=function(t){var e,r=t[0],n=t[1],i=t[2];return(e=360*Math.atan2(i,n)/2/Math.PI)<0&&(e+=360),[r,Math.sqrt(n*n+i*i),e]},f.lch.lab=function(t){var e=t[0],r=t[1],n=t[2]/360*2*Math.PI;return[e,r*Math.cos(n),r*Math.sin(n)]},f.rgb.ansi16=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=(0,n._)(t,3),i=r[0],a=r[1],o=r[2],s=null===e?f.rgb.hsv(t)[2]:e;if(0===(s=Math.round(s/50)))return 30;var l=30+(Math.round(o/255)<<2|Math.round(a/255)<<1|Math.round(i/255));return 2===s&&(l+=60),l},f.hsv.ansi16=function(t){return f.rgb.ansi16(f.hsv.rgb(t),t[2])},f.rgb.ansi256=function(t){var e=t[0],r=t[1],n=t[2];return e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},f.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var r=(~~(t>50)+1)*.5;return[(1&e)*r*255,(e>>1&1)*r*255,(e>>2&1)*r*255]},f.ansi256.rgb=function(t){if(t>=232){var e,r=(t-232)*10+8;return[r,r,r]}return[Math.floor((t-=16)/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},f.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},f.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];3===e[0].length&&(r=r.split("").map(function(t){return t+t}).join(""));var n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},f.rgb.hcg=function(t){var e,r=t[0]/255,n=t[1]/255,i=t[2]/255,a=Math.max(Math.max(r,n),i),o=Math.min(Math.min(r,n),i),s=a-o;return e=s<1?o/(1-s):0,[(s<=0?0:a===r?(n-i)/s%6:a===n?2+(i-r)/s:4+(r-n)/s)/6%1*360,100*s,100*e]},f.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=r<.5?2*e*r:2*e*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[t[0],100*n,100*i]},f.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,n=e*r,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},f.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,n=t[2]/100;if(0===r)return[255*n,255*n,255*n];var i=[0,0,0],a=e%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[(r*i[0]+l)*255,(r*i[1]+l)*255,(r*i[2]+l)*255]},f.hcg.hsv=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e),n=0;return r>0&&(n=e/r),[t[0],100*n,100*r]},f.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100*(1-e)+.5*e,n=0;return r>0&&r<.5?n=e/(2*r):r>=.5&&r<1&&(n=e/(2*(1-r))),[t[0],100*n,100*r]},f.hcg.hwb=function(t){var e=t[1]/100,r=e+t[2]/100*(1-e);return[t[0],(r-e)*100,(1-r)*100]},f.hwb.hcg=function(t){var e=t[1]/100,r=1-t[2]/100,n=r-e,i=0;return n<1&&(i=(r-n)/(1-n)),[t[0],100*n,100*i]},f.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},f.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},f.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},f.gray.hsl=function(t){return[0,0,t[0]]},f.gray.hsv=f.gray.hsl,f.gray.hwb=function(t){return[0,100,t[0]]},f.gray.cmyk=function(t){return[0,0,0,t[0]]},f.gray.lab=function(t){return[t[0],0,0]},f.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(r.length)+r},f.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},{"@swc/helpers/_/_sliced_to_array":"hefcy",efc99055946c4df8:"9CRqC"}],B0afd:[function(t,e,r){var n=t("22442592002c5ac3");e.exports=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(n),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),a=Object.keys(n[i]),o=a.length,s=0;s<o;s++){var l=a[s],u=e[l];-1===u.distance&&(u.distance=e[i].distance+1,u.parent=i,r.unshift(l))}return e}(t),r={},i=Object.keys(e),a=i.length,o=0;o<a;o++){var s=i[o];null!==e[s].parent&&(r[s]=function(t,e){for(var r=[e[t].parent,t],i=n[e[t].parent][t],a=e[t].parent;e[a].parent;)r.unshift(e[a].parent),i=function(t,e){return function(r){return e(t(r))}}(n[e[a].parent][a],i),a=e[a].parent;return i.conversion=r,i}(s,e))}return r}},{"22442592002c5ac3":"bLCsr"}],j01R3:[function(t,e,r){e.exports={isLightMode:function(){return document.body.classList.contains("iawp-light-mode")||!document.body.classList.contains("iawp-light-mode")&&!document.body.classList.contains("iawp-dark-mode")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches},isDarkMode:function(){return document.body.classList.contains("iawp-dark-mode")||!document.body.classList.contains("iawp-light-mode")&&!document.body.classList.contains("iawp-dark-mode")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}}},{}]},["5IuoB"],"5IuoB","parcelRequirec571");