PageSourceSearch

https://www.waythrough.org.uk/wp-content/themes/montere/dist/js/montere-349.d7f03c7cbb4406be7397.js

js waythrough.org.uk collected 2026-10-09 21:59:03 UTC 222,739 bytes, 2 lines download raw bytes

1/*! For license information please see montere-349.d7f03c7cbb4406be7397.js.LICENSE.txt */
2(self.webpackChunkmontere=self.webpackChunkmontere||[]).push([[349],{2867:function(t){"use strict";var e,i,s,n,a=function(){var t=Array.prototype,e=function(e,i,s){return t.slice.apply(e,t.slice.call(arguments,1))},i=1e9,s=function(t,i,n,a){if(0==(i|=0))return[];if("function"!=typeof t){var o=s.listSchemes(t,i);if(!o.length)return null;t=o[(n||0)%o.length]}var r=e(arguments,2);return r[0]=i,t.apply(t,r)};s.Scheme=function(t,n){var a={},o=0,r=i,c=function(){if(arguments.length<=1)return l.color_func.bind(l);var t=e(arguments);return function(e){return t[0]=e,l.color_func.apply(l,t)}},l=function(t,e){if(!(t|=0))return[];var i=t;if((t=Math.abs(t))<=o){for(var n=Math.max(t,r);!(n in a);++n);var h=a[n];if(n>t){if(!("shrinking_takes_head"in h?h.shrinking_takes_head:l.shrinking_takes_head))return s.generate((function(t){return h[Math.round(t)]}),i,0,h.length-1);h=h.slice(0,t),n=t}return h=h.slice(),i<0&&h.reverse(),h}return l.color_func?s.generate(c.apply(l,arguments),i,0,1,l.color_func_cyclic):null};return l.scheme_name=t,l.groups=n?"string"==typeof n?[n]:n:[],l.max=0,l.cbf_max=i,l.addPalette=function(t,e){var i=t.length;i&&(a[i]=t,r=Math.min(r,i),o=Math.max(o,i),l.max=Math.max(l.max,i),e||1==i||(l.cbf_max=Math.min(l.cbf_max,i-1)))},l.addPalettes=function(t,e,i){e=e||t.length;for(var s=0;s<e;++s)s in t&&l.addPalette(t[s],!0);l.cbf_max=Math.min(l.cbf_max,i||1)},l.shrinkByTakingHead=function(t,e){void 0!==e?e in a&&(a[e].shrinking_takes_head=!!t):l.shrinking_takes_head=!!t},l.setColorFunction=function(t,e,s){l.color_func=t,l.color_func_cyclic=!!s,l.max=i,e||l.cbf_max!==i||(l.cbf_max=1)},l.color=function(t,e){return l.color_func?l.color_func.apply(this,arguments):null},l},s.Scheme.fromPalettes=function(t,i,n,a,o){var r=s.Scheme(t,i);return r.addPalettes.apply(r,e(arguments,2)),r},s.Scheme.withColorFunction=function(t,i,n,a,o){var r=s.Scheme(t,i);return r.setColorFunction.apply(r,e(arguments,2)),r};var n={};s.register=function(t){n["n-"+t.scheme_name]=[t],t.groups.forEach((function(e){(n["g-"+e]=n["g-"+e]||[]).push(t)})),(n["g-all"]=n["g-all"]||[]).push(t)},s.listSchemes=function(t,e){e?e<0&&(e=-e):e=2;var i=[];return("string"==typeof t?[t]:t).forEach((function(t){var s="-cbf"===t.substring(t.length-4);s&&(t=t.substring(0,t.length-4));for(var a,o=n["g-"+t]||n["n-"+t]||[],r=0;a=o[r];++r)(s?a.cbf:a.max)>=e&&i.push(a)})),i.sort((function(t,e){return t.scheme_name>=e.scheme_name?t.scheme_name>e.scheme_name?1:0:-1})),i},s.generate=function(t,e,i,s,n){if(Math.abs(e)<1)return[];if(i=void 0===i?0:i,s=void 0===s?1:s,Math.abs(e)<2)return[t(i)];for(var a=Math.abs(e),o=i,r=[],c=(s-i)/(n?a:a-1);--a>=0;o+=c)r.push(t(o));return e<0&&r.reverse(),r};var a=function(t){return t>0?t<1?t:1:0};return s.rgbColor=function(t,e,i){return[t,e,i].map((function(t){return 1==(t=Number(Math.round(255*a(t))).toString(16)).length?"0"+t:t})).join("")},s.linearRgbColor=function(t,e,i){return[t,e,i].map((function(t){return(t=a(t))<=.0031308?t*=12.92:t=1.055*Math.pow(t,1/2.4)-.055,1==(t=Number(Math.round(255*t)).toString(16)).length?"0"+t:t})).join("")},s.hsvColor=function(t,e,i){t*=6;var n=void 0===e?1:a(e),o=void 0===i?1:a(i),r=o*(1-n*Math.abs(t%2-1)),c=o*(1-n);switch(Math.floor(t)%6){case 0:return s.rgbColor(o,r,c);case 1:return s.rgbColor(r,o,c);case 2:return s.rgbColor(c,o,r);case 3:return s.rgbColor(c,r,o);case 4:return s.rgbColor(r,c,o);default:return s.rgbColor(o,c,r)}},s.register(s.Scheme.withColorFunction("rainbow","qualitative",s.hsvColor,!1,!0)),s}();a.ColorFunction,a.Palette,a.PalettesList,a.SchemeType,(e=a.Scheme.fromPalettes("mpn65","qualitative",[["ff0029","377eb8","66a61e","984ea3","00d2d5","ff7f00","af8d00","7f80cd","b3e900","c42e60","a65628","f781bf","8dd3c7","bebada","fb8072","80b1d3","fdb462","fccde5","bc80bd","ffed6f","c4eaff","cf8c00","1b9e77","d95f02","e7298a","e6ab02","a6761d","0097ff","00d067","000000","252525","525252","737373","969696","bdbdbd","f43600","4ba93b","5779bb","927acc","97ee3f","bf3947","9f5b00","f48758","8caed6","f2b94f","eff26e","e43872","d9b100","9d7a00","698cff","d9d9d9","00d27e","d06800","009f82","c49200","cbe8ff","fecddf","c27eb6","8cd2ce","c4b8d9","f883b0","a49100","f48800","27d0df","a04a9b"]])).shrinkByTakingHead(!0),a.register(e),i=a.rgbColor,s=function(t,e){for(var i=arguments.length-1,s=arguments[i];i>1;
2)s=s*t+arguments[--i];return s},n=function(t){var e=s(Math.abs(t),1,.278393,.230389,972e-6,.078108);return e*=e,e=1-1/(e*=e),t<0?-e:e},a.register(a.Scheme.fromPalettes("tol","qualitative",[["4477aa"],["4477aa","cc6677"],["4477aa","ddcc77","cc6677"],["4477aa","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677"],["332288","88ccee","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","cc6677","882255","aa4499"],["332288","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","882255","aa4499"],["332288","6699cc","88ccee","44aa99","117733","999933","ddcc77","661100","cc6677","aa4466","882255","aa4499"]],12,12)),a.tolSequentialColor=function(t){return i(1-.392*(1+n((t-.869)/.255)),1.021-.456*(1+n((t-.527)/.376)),1-.493*(1+n((t-.272)/.309)))},a.register(a.Scheme.withColorFunction("tol-sq","sequential",a.tolSequentialColor,!0)),a.tolDivergingColor=function(t){var e=s(t,.572,1.524,-1.811)/s(t,1,-.291,.1574);return i(s(t,.235,-2.13,26.92,-65.5,63.5,-22.36),e*e,1/s(t,1.579,-4.03,12.92,-31.4,48.6,-23.36))},a.register(a.Scheme.withColorFunction("tol-dv","diverging",a.tolDivergingColor,!0)),a.tolRainbowColor=function(t){return i(s(t,.472,-.567,4.05)/s(t,1,8.72,-19.17,14.1),s(t,.108932,-1.22635,27.284,-98.577,163.3,-131.395,40.634),1/s(t,1.97,3.54,-68.5,243,-297,125))},a.register(a.Scheme.withColorFunction("tol-rainbow","qualitative",a.tolRainbowColor,!0)),a.register(a.Scheme.fromPalettes("sol-base","sequential",[["002b36","073642","586e75","657b83","839496","93a1a1","eee8d5","fdf6e3"]],1,8)),a.register(a.Scheme.fromPalettes("sol-accent","qualitative",[["b58900","cb4b16","dc322f","d33682","6c71c4","268bd2","2aa198","859900"]])),function(){var t={YlGn:{type:"sequential",cbf:42,3:["f7fcb9","addd8e","31a354"],4:["ffffcc","c2e699","78c679","238443"],5:["ffffcc","c2e699","78c679","31a354","006837"],
26:["ffffcc","d9f0a3","addd8e","78c679","31a354","006837"],7:["ffffcc","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],8:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","005a32"],9:["ffffe5","f7fcb9","d9f0a3","addd8e","78c679","41ab5d","238443","006837","004529"]},YlGnBu:{type:"sequential",cbf:42,3:["edf8b1","7fcdbb","2c7fb8"],4:["ffffcc","a1dab4","41b6c4","225ea8"],5:["ffffcc","a1dab4","41b6c4","2c7fb8","253494"],6:["ffffcc","c7e9b4","7fcdbb","41b6c4","2c7fb8","253494"],7:["ffffcc","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],8:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","0c2c84"],9:["ffffd9","edf8b1","c7e9b4","7fcdbb","41b6c4","1d91c0","225ea8","253494","081d58"]},GnBu:{type:"sequential",cbf:42,3:["e0f3db","a8ddb5","43a2ca"],4:["f0f9e8","bae4bc","7bccc4","2b8cbe"],5:["f0f9e8","bae4bc","7bccc4","43a2ca","0868ac"],6:["f0f9e8","ccebc5","a8ddb5","7bccc4","43a2ca","0868ac"],7:["f0f9e8","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],8:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","08589e"],9:["f7fcf0","e0f3db","ccebc5","a8ddb5","7bccc4","4eb3d3","2b8cbe","0868ac","084081"]},BuGn:{type:"sequential",cbf:42,3:["e5f5f9","99d8c9","2ca25f"],4:["edf8fb","b2e2e2","66c2a4","238b45"],5:["edf8fb","b2e2e2","66c2a4","2ca25f","006d2c"],6:["edf8fb","ccece6","99d8c9","66c2a4","2ca25f","006d2c"],7:["edf8fb","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],8:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","005824"],9:["f7fcfd","e5f5f9","ccece6","99d8c9","66c2a4","41ae76","238b45","006d2c","00441b"]},PuBuGn:{type:"sequential",cbf:42,3:["ece2f0","a6bddb","1c9099"],4:["f6eff7","bdc9e1","67a9cf","02818a"],5:["f6eff7","bdc9e1","67a9cf","1c9099","016c59"],6:["f6eff7","d0d1e6","a6bddb","67a9cf","1c9099","016c59"],7:["f6eff7","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],8:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016450"],9:["fff7fb","ece2f0","d0d1e6","a6bddb","67a9cf","3690c0","02818a","016c59","014636"]},PuBu:{type:"sequential",cbf:42,3:["ece7f2","a6bddb","2b8cbe"],4:["f1eef6","bdc9e1","74a9cf","0570b0"],5:["f1eef6","bdc9e1","74a9cf","2b8cbe","045a8d"],6:["f1eef6","d0d1e6","a6bddb","74a9cf","2b8cbe","045a8d"],7:["f1eef6","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],8:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","034e7b"],9:["fff7fb","ece7f2","d0d1e6","a6bddb","74a9cf","3690c0","0570b0","045a8d","023858"]},BuPu:{type:"sequential",cbf:42,3:["e0ecf4","9ebcda","8856a7"],4:["edf8fb","b3cde3","8c96c6","88419d"],5:["edf8fb","b3cde3","8c96c6","8856a7","810f7c"],6:["edf8fb","bfd3e6","9ebcda","8c96c6","8856a7","810f7c"],7:["edf8fb","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],8:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","6e016b"],9:["f7fcfd","e0ecf4","bfd3e6","9ebcda","8c96c6","8c6bb1","88419d","810f7c","4d004b"]},RdPu:{type:"sequential",cbf:42,3:["fde0dd","fa9fb5","c51b8a"],4:["feebe2","fbb4b9","f768a1","ae017e"],5:["feebe2","fbb4b9","f768a1","c51b8a","7a0177"],6:["feebe2","fcc5c0","fa9fb5","f768a1","c51b8a","7a0177"],7:["feebe2","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],8:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177"],9:["fff7f3","fde0dd","fcc5c0","fa9fb5","f768a1","dd3497","ae017e","7a0177","49006a"]},PuRd:{type:"sequential",cbf:42,3:["e7e1ef","c994c7","dd1c77"],4:["f1eef6","d7b5d8","df65b0","ce1256"],5:["f1eef6","d7b5d8","df65b0","dd1c77","980043"],6:["f1eef6","d4b9da","c994c7","df65b0","dd1c77","980043"],7:["f1eef6","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],8:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","91003f"],9:["f7f4f9","e7e1ef","d4b9da","c994c7","df65b0","e7298a","ce1256","980043","67001f"]},OrRd:{type:"sequential",cbf:42,3:["fee8c8","fdbb84","e34a33"],4:["fef0d9","fdcc8a","fc8d59","d7301f"],5:["fef0d9","fdcc8a","fc8d59","e34a33","b30000"],6:["fef0d9","fdd49e","fdbb84","fc8d59","e34a33","b30000"],7:["fef0d9","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],8:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","990000"],9:["fff7ec","fee8c8","fdd49e","fdbb84","fc8d59","ef6548","d7301f","b30000","7f0000"]},YlOrRd:{type:"sequential",cbf:42,3:["ffeda0","feb24c","f03b20"],4:["ffffb2","fecc5c","fd8d3c","e31a1c"],5:["ffffb2","fecc5c","fd8d3c","f03b20","bd0026"],6:["ffffb2","fed976","feb24c","fd8d3c","f03b20","bd0026"],7:["ffffb2","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],8:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","b10026"],9:["ffffcc","ffeda0","fed976","feb24c","fd8d3c","fc4e2a","e31a1c","bd0026","800026"]},YlOrBr:{type:"sequential",cbf:42,3:["fff7bc","fec44f","d95f0e"],4:["ffffd4","fed98e","fe9929","cc4c02"],5:["ffffd4","fed98e","fe9929","d95f0e","993404"],6:["ffffd4","fee391","fec44f","fe9929","d95f0e","993404"],7:["ffffd4","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],8:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","8c2d04"],9:["ffffe5","fff7bc","fee391","fec44f","fe9929","ec7014","cc4c02","993404","662506"]},Purples:{type:"sequential",cbf:42,3:["efedf5","bcbddc","756bb1"],4:["f2f0f7","cbc9e2","9e9ac8","6a51a3"],5:["f2f0f7","cbc9e2","9e9ac8","756bb1","54278f"],6:["f2f0f7","dadaeb","bcbddc","9e9ac8","756bb1","54278f"],7:["f2f0f7","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],8:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","4a1486"],9:["fcfbfd","efedf5","dadaeb","bcbddc","9e9ac8","807dba","6a51a3","54278f","3f007d"]},Blues:{type:"sequential",cbf:42,3:["deebf7","9ecae1","3182bd"],4:["eff3ff","bdd7e7","6baed6","2171b5"],5:["eff3ff","bdd7e7","6baed6","3182bd","08519c"],6:["eff3ff","c6dbef","9ecae1","6baed6","3182bd","08519c"],7:["eff3ff","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],8:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","084594"],9:["f7fbff","deebf7","c6dbef","9ecae1","6baed6","4292c6","2171b5","08519c","08306b"]},Greens:{type:"sequential",cbf:42,3:["e5f5e0","a1d99b","31a354"],4:["edf8e9","bae4b3","74c476","238b45"],5:["edf8e9","bae4b3","74c476","31a354","006d2c"],6:["edf8e9","c7e9c0","a1d99b","74c476","31a354","006d2c"],7:["edf8e9","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],8:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","005a32"],9:["f7fcf5","e5f5e0","c7e9c0","a1d99b","74c476","41ab5d","238b45","006d2c","00441b"]},Oranges:{type:"sequential",cbf:42,3:["fee6ce","fdae6b","e6550d"],4:["feedde","fdbe85","fd8d3c","d94701"],5:["feedde","fdbe85","fd8d3c","e6550d","a63603"],6:["feedde","fdd0a2","fdae6b","fd8d3c","e6550d","a63603"],7:["feedde","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],8:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","8c2d04"],9:["fff5eb","fee6ce","fdd0a2","fdae6b","fd8d3c","f16913","d94801","a63603","7f2704"]},Reds:{type:"sequential",cbf:42,3:["fee0d2","fc9272","de2d26"],4:["fee5d9","fcae91","fb6a4a","cb181d"],5:["fee5d9","fcae91","fb6a4a","de2d26","a50f15"],6:["fee5d9","fcbba1","fc9272","fb6a4a","de2d26","a50f15"],7:["fee5d9","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],8:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","99000d"],9:["fff5f0","fee0d2","fcbba1","fc9272","fb6a4a","ef3b2c","cb181d","a50f15","67000d"]},Greys:{type:"sequential",cbf:42,3:["f0f0f0","bdbdbd","636363"],4:["f7f7f7","cccccc","969696","525252"],5:["f7f7f7","cccccc","969696","636363","252525"],6:["f7f7f7","d9d9d9","bdbdbd","969696","636363","252525"],7:["f7f7f7","d9d9d9","bdbdbd","969696","737373","525252","252525"],8:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525"],9:["ffffff","f0f0f0","d9d9d9","bdbdbd","969696","737373","525252","252525","000000"]},PuOr:{type:"diverging",cbf:42,3:["f1a340","f7f7f7","998ec3"],4:["e66101","fdb863","b2abd2","5e3c99"],5:["e66101","fdb863","f7f7f7","b2abd2","5e3c99"],6:["b35806","f1a340","fee0b
26","d8daeb","998ec3","542788"],7:["b35806","f1a340","fee0b6","f7f7f7","d8daeb","998ec3","542788"],8:["b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788"],9:["b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788"],10:["7f3b08","b35806","e08214","fdb863","fee0b6","d8daeb","b2abd2","8073ac","542788","2d004b"],11:["7f3b08","b35806","e08214","fdb863","fee0b6","f7f7f7","d8daeb","b2abd2","8073ac","542788","2d004b"]},BrBG:{type:"diverging",cbf:42,3:["d8b365","f5f5f5","5ab4ac"],4:["a6611a","dfc27d","80cdc1","018571"],5:["a6611a","dfc27d","f5f5f5","80cdc1","018571"],6:["8c510a","d8b365","f6e8c3","c7eae5","5ab4ac","01665e"],7:["8c510a","d8b365","f6e8c3","f5f5f5","c7eae5","5ab4ac","01665e"],8:["8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e"],9:["8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e"],10:["543005","8c510a","bf812d","dfc27d","f6e8c3","c7eae5","80cdc1","35978f","01665e","003c30"],11:["543005","8c510a","bf812d","dfc27d","f6e8c3","f5f5f5","c7eae5","80cdc1","35978f","01665e","003c30"]},PRGn:{type:"diverging",cbf:42,3:["af8dc3","f7f7f7","7fbf7b"],4:["7b3294","c2a5cf","a6dba0","008837"],5:["7b3294","c2a5cf","f7f7f7","a6dba0","008837"],6:["762a83","af8dc3","e7d4e8","d9f0d3","7fbf7b","1b7837"],7:["762a83","af8dc3","e7d4e8","f7f7f7","d9f0d3","7fbf7b","1b7837"],8:["762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837"],9:["762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837"],10:["40004b","762a83","9970ab","c2a5cf","e7d4e8","d9f0d3","a6dba0","5aae61","1b7837","00441b"],11:["40004b","762a83","9970ab","c2a5cf","e7d4e8","f7f7f7","d9f0d3","a6dba0","5aae61","1b7837","00441b"]},PiYG:{type:"diverging",cbf:42,3:["e9a3c9","f7f7f7","a1d76a"],4:["d01c8b","f1b6da","b8e186","4dac26"],5:["d01c8b","f1b6da","f7f7f7","b8e186","4dac26"],6:["c51b7d","e9a3c9","fde0ef","e6f5d0","a1d76a","4d9221"],7:["c51b7d","e9a3c9","fde0ef","f7f7f7","e6f5d0","a1d76a","4d9221"],8:["c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221"],9:["c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221"],10:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","e6f5d0","b8e186","7fbc41","4d9221","276419"],11:["8e0152","c51b7d","de77ae","f1b6da","fde0ef","f7f7f7","e6f5d0","b8e186","7fbc41","4d9221","276419"]},RdBu:{type:"diverging",cbf:42,3:["ef8a62","f7f7f7","67a9cf"],4:["ca0020","f4a582","92c5de","0571b0"],5:["ca0020","f4a582","f7f7f7","92c5de","0571b0"],6:["b2182b","ef8a62","fddbc7","d1e5f0","67a9cf","2166ac"],7:["b2182b","ef8a62","fddbc7","f7f7f7","d1e5f0","67a9cf","2166ac"],8:["b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac"],9:["b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","d1e5f0","92c5de","4393c3","2166ac","053061"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","f7f7f7","d1e5f0","92c5de","4393c3","2166ac","053061"]},RdGy:{type:"diverging",cbf:42,3:["ef8a62","ffffff","999999"],4:["ca0020","f4a582","bababa","404040"],5:["ca0020","f4a582","ffffff","bababa","404040"],6:["b2182b","ef8a62","fddbc7","e0e0e0","999999","4d4d4d"],7:["b2182b","ef8a62","fddbc7","ffffff","e0e0e0","999999","4d4d4d"],8:["b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d"],9:["b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d"],10:["67001f","b2182b","d6604d","f4a582","fddbc7","e0e0e0","bababa","878787","4d4d4d","1a1a1a"],11:["67001f","b2182b","d6604d","f4a582","fddbc7","ffffff","e0e0e0","bababa","878787","4d4d4d","1a1a1a"]},RdYlBu:{type:"diverging",cbf:42,3:["fc8d59","ffffbf","91bfdb"],4:["d7191c","fdae61","abd9e9","2c7bb6"],5:["d7191c","fdae61","ffffbf","abd9e9","2c7bb6"],6:["d73027","fc8d59","fee090","e0f3f8","91bfdb","4575b4"],7:["d73027","fc8d59","fee090","ffffbf","e0f3f8","91bfdb","4575b4"],8:["d73027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4"],9:["d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4"],10:["a50026","d
273027","f46d43","fdae61","fee090","e0f3f8","abd9e9","74add1","4575b4","313695"],11:["a50026","d73027","f46d43","fdae61","fee090","ffffbf","e0f3f8","abd9e9","74add1","4575b4","313695"]},Spectral:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","99d594"],4:["d7191c","fdae61","abdda4","2b83ba"],5:["d7191c","fdae61","ffffbf","abdda4","2b83ba"],6:["d53e4f","fc8d59","fee08b","e6f598","99d594","3288bd"],7:["d53e4f","fc8d59","fee08b","ffffbf","e6f598","99d594","3288bd"],8:["d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd"],9:["d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd"],10:["9e0142","d53e4f","f46d43","fdae61","fee08b","e6f598","abdda4","66c2a5","3288bd","5e4fa2"],11:["9e0142","d53e4f","f46d43","fdae61","fee08b","ffffbf","e6f598","abdda4","66c2a5","3288bd","5e4fa2"]},RdYlGn:{type:"diverging",cbf:0,3:["fc8d59","ffffbf","91cf60"],4:["d7191c","fdae61","a6d96a","1a9641"],5:["d7191c","fdae61","ffffbf","a6d96a","1a9641"],6:["d73027","fc8d59","fee08b","d9ef8b","91cf60","1a9850"],7:["d73027","fc8d59","fee08b","ffffbf","d9ef8b","91cf60","1a9850"],8:["d73027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850"],9:["d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850"],10:["a50026","d
273027","f46d43","fdae61","fee08b","d9ef8b","a6d96a","66bd63","1a9850","006837"],11:["a50026","d73027","f46d43","fdae61","fee08b","ffffbf","d9ef8b","a6d96a","66bd63","1a9850","006837"]},Accent:{type:"qualitative",cbf:0,3:["7fc97f","beaed4","fdc086"],4:["7fc97f","beaed4","fdc086","ffff99"],5:["7fc97f","beaed4","fdc086","ffff99","386cb0"],6:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f"],7:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17"],8:["7fc97f","beaed4","fdc086","ffff99","386cb0","f0027f","bf5b17","666666"]},Dark2:{type:"qualitative",cbf:3,3:["1b9e77","d95f02","7570b3"],4:["1b9e77","d95f02","7570b3","e7298a"],5:["1b9e77","d95f02","7570b3","e7298a","66a61e"],6:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02"],7:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d"],8:["1b9e77","d95f02","7570b3","e7298a","66a61e","e6ab02","a6761d","666666"]},Paired:{type:"qualitative",cbf:4,3:["a6cee3","1f78b4","b2df8a"],4:["a6cee3","1f78b4","b2df8a","33a02c"],5:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99"],6:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c"],7:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f"],8:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00"],9:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6"],10:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a"],11:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99"],12:["a6cee3","1f78b4","b2df8a","33a02c","fb9a99","e31a1c","fdbf6f","ff7f00","cab2d6","6a3d9a","ffff99","b15928"]},Pastel1:{type:"qualitative",cbf:0,3:["fbb4ae","b3cde3","ccebc5"],4:["fbb4ae","b3cde3","ccebc5","decbe4"],5:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6"],6:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc"],7:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd"],8:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec"],9:["fbb4ae","b3cde3","ccebc5","decbe4","fed9a6","ffffcc","e5d8bd","fddaec","f2f2f2"]},Pastel2:{type:"qualitative",cbf:0,3:["b3e2cd","fdcdac","cbd5e8"],4:["b3e2cd","fdcdac","cbd5e8","f4cae4"],5:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9"],6:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae"],7:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc"],8:["b3e2cd","fdcdac","cbd5e8","f4cae4","e6f5c9","fff2ae","f1e2cc","cccccc"]},Set1:{type:"qualitative",cbf:0,3:["e41a1c","377eb8","4daf4a"],4:["e41a1c","377eb8","4daf4a","984ea3"],5:["e41a1c","377eb8","4daf4a","984ea3","ff7f00"],6:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33"],7:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628"],8:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf"],9:["e41a1c","377eb8","4daf4a","984ea3","ff7f00","ffff33","a65628","f781bf","999999"]},Set2:{type:"qualitative",cbf:3,3:["66c2a5","fc8d62","8da0cb"],4:["66c2a5","fc8d62","8da0cb","e78ac3"],5:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854"],6:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f"],7:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494"],8:["66c2a5","fc8d62","8da0cb","e78ac3","a6d854","ffd92f","e5c494","b3b3b3"]},Set3:{type:"qualitative",cbf:0,3:["8dd3c7","ffffb3","bebada"],4:["8dd3c7","ffffb3","bebada","fb8072"],5:["8dd3c7","ffffb3","bebada","fb8072","80b1d3"],6:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462"],7:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69"],8:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5"],9:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9"],10:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd"],11:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5"],12:["8dd3c7","ffffb3","bebada","fb8072","80b1d3","fdb462","b3de69","fccde5","d9d9d9","bc80bd","ccebc5","ffed6f"]}};for(var e in t){var i=t[e];i=a.Scheme.fromPalettes("cb-"+e,[i.type,"cb-"+i.type],i,12,i.cbf),a.register(i)}}(),t.exports&&(t.exports=a)},9943:function(t){t.exports=function(){"use strict";function t(){}const e=function(){let t=0;return function(){return t++}}();function i(t){return null==t}function s(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function n(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const a=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function o(t,e){return a(t)?t:e}function r(t,e){return void 0===t?e:t}const c=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,l=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;
vendor: 5,442 bytes, line 2
2function h(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function d(t,e,i,a){let o,r,c;if(s(t))if(r=t.length,a)for(o=r-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<r;o++)e.call(i,t[o],o);else if(n(t))for(c=Object.keys(t),r=c.length,o=0;o<r;o++)e.call(i,t[c[o]],c[o])}function f(t,e){let i,s,n,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],a=e[i],n.datasetIndex!==a.datasetIndex||n.index!==a.index)return!1;return!0}function u(t){if(s(t))return t.map(u);if(n(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=u(t[i[n]]);return e}return t}function g(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function p(t,e,i,s){if(!g(t))return;const a=e[t],o=i[t];n(a)&&n(o)?b(a,o,s):e[t]=u(o)}function b(t,e,i){const a=s(e)?e:[e],o=a.length;if(!n(t))return t;const r=(i=i||{}).merger||p;for(let s=0;s<o;++s){if(!n(e=a[s]))continue;const o=Object.keys(e);for(let s=0,n=o.length;s<n;++s)r(o[s],t,e,i)}return t}function m(t,e){return b(t,e,{merger:x})}function x(t,e,i){if(!g(t))return;const s=e[t],a=i[t];n(s)&&n(a)?m(s,a):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=u(a))}const _={"":t=>t,x:t=>t.x,y:t=>t.y};function y(t,e){const i=_[e]||(_[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}const w=t=>void 0!==t,k=t=>"function"==typeof t,S=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function P(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const D=Math.PI,C=2*D,O=C+D,A=Number.POSITIVE_INFINITY,T=D/180,L=D/2,R=D/4,E=2*D/3,I=Math.log10,z=Math.sign;function F(t){const e=Math.round(t);t=N(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(I(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function B(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function V(t){return!isNaN(parseFloat(t))&&isFinite(t)}function N(t,e,i){return Math.abs(t-e)<i}function W(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function H(t,e,i){let s,n,a;for(s=0,n=t.length;s<n;s++)a=t[s][i],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function j(t){return t*(D/180)}function $(t){return t*(180/D)}function Y(t){if(!a(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function U(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let a=Math.atan2(s,i);return a<-.5*D&&(a+=C),{angle:a,distance:n}}function q(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function X(t,e){return(t-e+O)%C-D}function G(t){return(t%C+C)%C}function K(t,e,i,s){const n=G(t),a=G(e),o=G(i),r=G(a-n),c=G(o-n),l=G(n-a),h=G(n-o);return n===a||n===o||s&&a===o||r>c&&l<h}function Z(t,e,i){return Math.max(e,Math.min(i,t))}function J(t){return Z(t,-32768,32767)}function Q(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function tt(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,a=0;for(;n-a>1;)s=a+n>>1,i(s)?a=s:n=s;return{lo:a,hi:n}}const et=(t,e,i,s)=>tt(t,i,s?s=>t[s][e]<=i:s=>t[s][e]<i),it=(t,e,i)=>tt(t,i,(s=>t[s][e]>=i));function st(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const nt=["push","pop","shift","splice","unshift"];function at(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),nt.forEach((e=>{const i="_onData"+M(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function ot(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(nt.forEach((e=>{delete t[e]})),delete t._chartjs)}function rt(t){const e=new Set;let i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:Array.from(e)}const ct="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function lt(t,e,i){const s=i||(t=>Array.prototype.slice.call(t));let n=!1,a=[];return function(...i){a=s(i),n||(n=!0,ct.call(window,(()=>{n=!1,t.apply(e,a)})))}}function ht(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}const dt=t=>"start"===t?"left":"end"===t?"right":"center",ft=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,ut=(t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e;function gt(t,e,i){const s=e.length;let n=0,a=s;if(t._sorted){const{iScale:o,_parsed:r}=t,c=o.axis,{min:l,max:h,minDefined:d,maxDefined:f}=o.getUserBounds();d&&(n=Z(Math.min(et(r,o.axis,l).lo,i?s:et(e,c,o.getPixelForValue(l)).lo),0,s-1)),a=f?Z(Math.max(et(r,o.axis,h,!0).hi+1,i?0:et(e,c,o.getPixelForValue(h),!0).hi+1),n,s)-n:s-n}return{start:n,count:a}}function pt(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const a=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),a}var bt=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.listeners[s],a=e.duration;
vendor: 7,768 bytes, line 2
2n.forEach((s=>s({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)})))}_refresh(){this._request||(this._running=!0,this._request=ct.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let a,o=n.length-1,r=!1;for(;o>=0;--o)a=n[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(t),r=!0):(n[o]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};function mt(t){return t+.5|0}const xt=(t,e,i)=>Math.max(Math.min(t,i),e);function _t(t){return xt(mt(2.55*t),0,255)}function yt(t){return xt(mt(255*t),0,255)}function vt(t){return xt(mt(t/2.55)/100,0,1)}function Mt(t){return xt(mt(100*t),0,100)}const wt={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},kt=[..."0123456789ABCDEF"],St=t=>kt[15&t],Pt=t=>kt[(240&t)>>4]+kt[15&t],Dt=t=>(240&t)>>4==(15&t);const Ct=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ot(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function At(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Tt(t,e,i){const s=Ot(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function Lt(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),a=Math.min(e,i,s),o=(n+a)/2;let r,c,l;return n!==a&&(l=n-a,c=o>.5?l/(2-n-a):l/(n+a),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,l,n),r=60*r+.5),[0|r,c||0,o]}function Rt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(yt)}function Et(t,e,i){return Rt(Ot,t,e,i)}function It(t){return(t%360+360)%360}const zt={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"},Ft={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Bt;const Vt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Nt=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Wt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ht(t,e,i){if(t){let s=Lt(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=Et(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function jt(t,e){return t?Object.assign(e||{},t):t}function $t(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=yt(t[3]))):(e=jt(t,{r:0,g:0,b:0,a:1})).a=yt(e.a),e}function Yt(t){return"r"===t.charAt(0)?function(t){const e=Vt.exec(t);let i,s,n,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?_t(t):xt(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?_t(i):xt(i,0,255)),s=255&(e[4]?_t(s):xt(s,0,255)),n=255&(e[6]?_t(n):xt(n,0,255)),{r:i,g:s,b:n,a:a}}}(t):function(t){const e=Ct.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?_t(+e[5]):yt(+e[5]));const n=It(+e[2]),a=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Rt(Tt,t,e,i)}(n,a,o):"hsv"===e[1]?function(t,e,i){return Rt(At,t,e,i)}(n,a,o):Et(n,a,o),{r:i[0],g:i[1],b:i[2],a:s}}(t)}class Ut{constructor(t){if(t instanceof Ut)return t;const e=typeof t;let i;var s,n,a;"object"===e?i=$t(t):"string"===e&&(a=(s=t).length,"#"===s[0]&&(4===a||5===a?n={r:255&17*wt[s[1]],g:255&17*wt[s[2]],b:255&17*wt[s[3]],a:5===a?17*wt[s[4]]:255}:7!==a&&9!==a||(n={r:wt[s[1]]<<4|wt[s[2]],g:wt[s[3]]<<4|wt[s[4]],b:wt[s[5]]<<4|wt[s[6]],a:9===a?wt[s[7]]<<4|wt[s[8]]:255})),i=n||function(t){Bt||(Bt=function(){const t={},e=Object.keys(Ft),i=Object.keys(zt);let s,n,a,o,r;for(s=0;s<e.length;s++){for(o=r=e[s],n=0;n<i.length;n++)a=i[n],r=r.replace(a,zt[a]);a=parseInt(Ft[o],16),t[r]=[a>>16&255,a>>8&255,255&a]}return t}(),Bt.transparent=[0,0,0,0]);const e=Bt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||Yt(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=jt(this._rgb);return t&&(t.a=vt(t.a)),t}set rgb(t){this._rgb=$t(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${vt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?function(t){var e=(t=>Dt(t.r)&&Dt(t.g)&&Dt(t.b)&&Dt(t.a))(t)?St:Pt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;
vendor: 2,578 bytes, line 2
2const e=Lt(t),i=e[0],s=Mt(e[1]),n=Mt(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${vt(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const a=e===n?.5:e,o=2*a-1,r=i.a-s.a,c=((o*r==-1?o:(o+r)/(1+o*r))+1)/2;n=1-c,i.r=255&c*i.r+n*s.r+.5,i.g=255&c*i.g+n*s.g+.5,i.b=255&c*i.b+n*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=Wt(vt(t.r)),n=Wt(vt(t.g)),a=Wt(vt(t.b));return{r:yt(Nt(s+i*(Wt(vt(e.r))-s))),g:yt(Nt(n+i*(Wt(vt(e.g))-n))),b:yt(Nt(a+i*(Wt(vt(e.b))-a))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Ut(this.rgb)}alpha(t){return this._rgb.a=yt(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=mt(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Ht(this._rgb,2,t),this}darken(t){return Ht(this._rgb,2,-t),this}saturate(t){return Ht(this._rgb,1,t),this}desaturate(t){return Ht(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=Lt(t);i[0]=It(i[0]+e),i=Et(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function qt(t){return new Ut(t)}function Xt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Gt(t){return Xt(t)?t:qt(t)}function Kt(t){return Xt(t)?t:qt(t).saturate(.5).darken(.1).hexString()}const Zt=Object.create(null),Jt=Object.create(null);function Qt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;e<s;++e){const s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}function te(t,e,i){return"string"==typeof e?b(Qt(t,e),i):b(Qt(t,""),e)}var ee=new class{constructor(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=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Kt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Kt(e.borderColor),this.hoverColor=(t,e)=>Kt(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={}
vendor: 8,639 bytes, line 2
2,this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return te(this,t,e)}get(t){return Qt(this,t)}describe(t,e){return te(Jt,t,e)}override(t,e){return te(Zt,t,e)}route(t,e,i,s){const a=Qt(this,t),o=Qt(this,i),c="_"+e;Object.defineProperties(a,{[c]:{value:a[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[c],e=o[s];return n(t)?Object.assign({},e,t):r(t,e)},set(t){this[c]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ie(){return"undefined"!=typeof window&&"undefined"!=typeof document}function se(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function ne(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const ae=t=>window.getComputedStyle(t,null);function oe(t,e){return ae(t).getPropertyValue(e)}const re=["top","right","bottom","left"];function ce(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const a=re[n];s[a]=parseFloat(t[e+"-"+a+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function le(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=ae(i),a="border-box"===n.boxSizing,o=ce(n,"padding"),r=ce(n,"border","width"),{x:c,y:l,box:h}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:a}=s;let o,r,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,a,t.target))o=n,r=a;else{const t=e.getBoundingClientRect();o=s.clientX-t.left,r=s.clientY-t.top,c=!0}return{x:o,y:r,box:c}}(t,i),d=o.left+(h&&r.left),f=o.top+(h&&r.top);let{width:u,height:g}=e;return a&&(u-=o.width+r.width,g-=o.height+r.height),{x:Math.round((c-d)/u*i.width/s),y:Math.round((l-f)/g*i.height/s)}}const he=t=>Math.round(10*t)/10;function de(t,e,i,s){const n=ae(t),a=ce(n,"margin"),o=ne(n.maxWidth,t,"clientWidth")||A,r=ne(n.maxHeight,t,"clientHeight")||A,c=function(t,e,i){let s,n;if(void 0===e||void 0===i){const a=se(t);if(a){const t=a.getBoundingClientRect(),o=ae(a),r=ce(o,"border","width"),c=ce(o,"padding");e=t.width-c.width-r.width,i=t.height-c.height-r.height,s=ne(o.maxWidth,a,"clientWidth"),n=ne(o.maxHeight,a,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||A,maxHeight:n||A}}(t,e,i);let{width:l,height:h}=c;if("content-box"===n.boxSizing){const t=ce(n,"border","width"),e=ce(n,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-a.width),h=Math.max(0,s?Math.floor(l/s):h-a.height),l=he(Math.min(l,o,c.maxWidth)),h=he(Math.min(h,r,c.maxHeight)),l&&!h&&(h=he(l/2)),{width:l,height:h}}function fe(t,e,i){const s=e||1,n=Math.floor(t.height*s),a=Math.floor(t.width*s);t.height=n/s,t.width=a/s;const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||o.height!==n||o.width!==a)&&(t.currentDevicePixelRatio=s,o.height=n,o.width=a,t.ctx.setTransform(s,0,0,s,0,0),!0)}const ue=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ge(t,e){const i=oe(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function pe(t){return!t||i(t.size)||i(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function be(t,e,i,s,n){let a=e[n];return a||(a=e[n]=t.measureText(n).width,i.push(n)),a>s&&(s=a),s}function me(t,e,i,n){let a=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(a=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const c=i.length;let l,h,d,f,u;for(l=0;l<c;l++)if(f=i[l],null!=f&&!0!==s(f))r=be(t,a,o,r,f);else if(s(f))for(h=0,d=f.length;h<d;h++)u=f[h],null==u||s(u)||(r=be(t,a,o,r,u));t.restore();const g=o.length/2;if(g>i.length){for(l=0;l<g;l++)delete a[o[l]];o.splice(0,g)}return r}function xe(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function _e(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function ye(t,e,i,s){ve(t,e,i,s,null)}function ve(t,e,i,s,n){let a,o,r,c,l,h;const d=e.pointStyle,f=e.rotation,u=e.radius;let g=(f||0)*T;if(d&&"object"==typeof d&&(a=d.toString(),"[object HTMLImageElement]"===a||"[object HTMLCanvasElement]"===a))return t.save(),t.translate(i,s),t.rotate(g),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(u)||u<=0)){switch(t.beginPath(),d){default:n?t.ellipse(i,s,n/2,u,0,0,C):t.arc(i,s,u,0,C),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(g)*u,s-Math.cos(g)*u),g+=E,t.lineTo(i+Math.sin(g)*u,s-Math.cos(g)*u),g+=E,t.lineTo(i+Math.sin(g)*u,s-Math.cos(g)*u),t.closePath();break;case"rectRounded":l=.516*u,c=u-l,o=Math.cos(g+R)*c,r=Math.sin(g+R)*c,t.arc(i-o,s-r,l,g-D,g-L),t.arc(i+r,s-o,l,g-L,g),t.arc(i+o,s+r,l,g,g+L),t.arc(i-r,s+o,l,g+L,g+D),t.closePath();break;case"rect":if(!f){c=Math.SQRT1_2*u,h=n?n/2:c,t.rect(i-h,s-c,2*h,2*c);break}g+=R;case"rectRot":o=Math.cos(g)*u,r=Math.sin(g)*u,t.moveTo(i-o,s-r),t.lineTo(i+r,s-o),t.lineTo(i+o,s+r),t.lineTo(i-r,s+o),t.closePath();break;case"crossRot":g+=R;case"cross":o=Math.cos(g)*u,r=Math.sin(g)*u,t.moveTo(i-o,s-r),t.lineTo(i+o,s+r),t.moveTo(i+r,s-o),t.lineTo(i-r,s+o);break;case"star":o=Math.cos(g)*u,r=Math.sin(g)*u,t.moveTo(i-o,s-r),t.lineTo(i+o,s+r),t.moveTo(i+r,s-o),t.lineTo(i-r,s+o),g+=R,o=Math.cos(g)*u,r=Math.sin(g)*u,t.moveTo(i-o,s-r),t.lineTo(i+o,s+r),t.moveTo(i+r,s-o),t.lineTo(i-r,s+o);break;case"line":o=n?n/2:Math.cos(g)*u,r=Math.sin(g)*u,t.moveTo(i-o,s-r),t.lineTo(i+o,s+r);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(g)*u,s+Math.sin(g)*u)}t.fill(),e.borderWidth>0&&t.stroke()}}function Me(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function we(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ke(t){t.restore()}function Se(t,e,i,s,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const s=(e.x+i.x)/2;t.lineTo(s,e.y),t.lineTo(s,i.y)}else"after"===n!=!!s?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Pe(t,e,i,s){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?i.cp2x:i.cp1x,s?i.cp2y:i.cp1y,i.x,i.y)}function De(t,e,n,a,o,r={}){const c=s(e)?e:[e],l=r.strokeWidth>0&&""!==r.strokeColor;let h,d;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),i(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),h=0;h<c.length;++h)d=c[h],l&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),i(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(d,n,a,r.maxWidth)),t.fillText(d,n,a,r.maxWidth),Ce(t,n,a,d,r),a+=o.lineHeight;t.restore()}function Ce(t,e,i,s,n){if(n.strikethrough||n.underline){const a=t.measureText(s),o=e-a.actualBoundingBoxLeft,r=e+a.actualBoundingBoxRight,c=i-a.actualBoundingBoxAscent,l=i+a.actualBoundingBoxDescent,h=n.strikethrough?(c+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(o,h),t.lineTo(r,h),t.stroke()}}function Oe(t,e){const{x:i,y:s,w:n,h:a,radius:o}=e;t.arc(i+o.topLeft,s+o.topLeft,o.topLeft,-L,D,!0),t.lineTo(i,s+a-o.bottomLeft),t.arc(i+o.bottomLeft,s+a-o.bottomLeft,o.bottomLeft,D,L,!0),t.lineTo(i+n-o.bottomRight,s+a),t.arc(i+n-o.bottomRight,s+a-o.bottomRight,o.bottomRight,L,0,!0),t.lineTo(i+n,s+o.topRight),t.arc(i+n-o.topRight,s+o.topRight,o.topRight,0,-L,!0),t.lineTo(i+o.topLeft,s)}function Ae(t,e=[""],i=t,s,n=()=>t[0]){w(s)||(s=We("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:n=>Ae([n,...t],e,i,s)};return new Proxy(a,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Ie(i,s,(()=>function(t,e,i,s){let n;for(const a of e)if(n=We(Re(a,t),i),w(n))return Ee(t,n)?Ve(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>He(t).includes(e),ownKeys:t=>He(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Te(t,e,i,a){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Le(t,a),setContext:e=>Te(t,e,i,a),override:s=>Te(t.override(s),e,i,a)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Ie(t,e,(()=>
vendor: 5,052 bytes, line 2
2function(t,e,i){const{_proxy:a,_context:o,_subProxy:r,_descriptors:c}=t;let l=a[e];return k(l)&&c.isScriptable(e)&&(l=function(t,e,i,s){const{_proxy:n,_context:a,_subProxy:o,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);return r.add(t),e=e(a,o||s),r.delete(t),Ee(t,e)&&(e=Ve(n._scopes,n,t,e)),e}(e,l,t,i)),s(l)&&l.length&&(l=function(t,e,i,s){const{_proxy:a,_context:o,_subProxy:r,_descriptors:c}=i;if(w(o.index)&&s(t))e=e[o.index%e.length];else if(n(e[0])){const i=e,s=a._scopes.filter((t=>t!==i));e=[];for(const n of i){const i=Ve(s,a,t,n);e.push(Te(i,o,r&&r[t],c))}}return e}(e,l,t,c.isIndexable)),Ee(e,l)&&(l=Te(l,o,r&&r[e],c)),l}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Le(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:k(i)?i:()=>i,isIndexable:k(s)?s:()=>s}}const Re=(t,e)=>t?t+M(e):e,Ee=(t,e)=>n(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Ie(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function ze(t,e,i){return k(t)?t(e,i):t}const Fe=(t,e)=>!0===t?e:"string"==typeof t?y(e,t):void 0;function Be(t,e,i,s,n){for(const a of e){const e=Fe(i,a);if(e){t.add(e);const a=ze(e._fallback,i,n);if(w(a)&&a!==i&&a!==s)return a}else if(!1===e&&w(s)&&i!==s)return null}return!1}function Ve(t,e,i,a){const o=e._rootScopes,r=ze(e._fallback,i,a),c=[...t,...o],l=new Set;l.add(a);let h=Ne(l,c,i,r||i,a);return null!==h&&(!w(r)||r===i||(h=Ne(l,c,r,h,a),null!==h))&&Ae(Array.from(l),[""],o,r,(()=>function(t,e,i){const a=t._getTarget();e in a||(a[e]={});const o=a[e];return s(o)&&n(i)?i:o}(e,i,a)))}function Ne(t,e,i,s,n){for(;i;)i=Be(t,e,i,s,n);return i}function We(t,e){for(const i of e){if(!i)continue;const e=i[t];if(w(e))return e}}function He(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function je(t,e,i,s){const{iScale:n}=t,{key:a="r"}=this._parsing,o=new Array(s);let r,c,l,h;for(r=0,c=s;r<c;++r)l=r+i,h=e[l],o[r]={r:n.parse(y(h,a),l)};return o}const $e=Number.EPSILON||1e-14,Ye=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ue=t=>"x"===t?"y":"x";function qe(t,e,i,s){const n=t.skip?e:t,a=e,o=i.skip?e:i,r=q(a,n),c=q(o,a);let l=r/(r+c),h=c/(r+c);l=isNaN(l)?0:l,h=isNaN(h)?0:h;const d=s*l,f=s*h;return{previous:{x:a.x-d*(o.x-n.x),y:a.y-d*(o.y-n.y)},next:{x:a.x+f*(o.x-n.x),y:a.y+f*(o.y-n.y)}}}function Xe(t,e="x"){const i=Ue(e),s=t.length,n=Array(s).fill(0),a=Array(s);let o,r,c,l=Ye(t,0);for(o=0;o<s;++o)if(r=c,c=l,l=Ye(t,o+1),c){if(l){const t=l[e]-c[e];n[o]=0!==t?(l[i]-c[i])/t:0}a[o]=r?l?z(n[o-1])!==z(n[o])?0:(n[o-1]+n[o])/2:n[o-1]:n[o]}!function(t,e,i){const s=t.length;let n,a,o,r,c,l=Ye(t,0);for(let h=0;h<s-1;++h)c=l,l=Ye(t,h+1),c&&l&&(N(e[h],0,$e)?i[h]=i[h+1]=0:(n=i[h]/e[h],a=i[h+1]/e[h],r=Math.pow(n,2)+Math.pow(a,2),r<=9||(o=3/Math.sqrt(r),i[h]=n*o*e[h],i[h+1]=a*o*e[h])))}(t,n,a),function(t,e,i="x"){const s=Ue(i),n=t.length;let a,o,r,c=Ye(t,0);for(let l=0;l<n;++l){if(o=r,r=c,c=Ye(t,l+1),!r)continue;const n=r[i],h=r[s];o&&(a=(n-o[i])/3,r[`cp1${i}`]=n-a,r[`cp1${s}`]=h-a*e[l]),c&&(a=(c[i]-n)/3,r[`cp2${i}`]=n+a,r[`cp2${s}`]=h+a*e[l])}}(t,a,e)}function Ge(t,e,i){return Math.max(Math.min(t,i),e)}function Ke(t,e,i,s,n){let a,o,r,c;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)Xe(t,n);else{let i=s?t[t.length-1]:t[0];for(a=0,o=t.length;a<o;++a)r=t[a],c=qe(i,r,t[Math.min(a+1,o-(s?0:1))%o],e.tension),r.cp1x=c.previous.x,r.cp1y=c.previous.y,r.cp2x=c.next.x,r.cp2y=c.next.y,i=r}e.capBezierPoints&&function(t,e){let i,s,n,a,o,r=Me(t[0],e);for(i=0,s=t.length;i<s;++i)o=a,a=r,r=i<s-1&&Me(t[i+1],e),a&&(n=t[i],o&&(n.cp1x=Ge(n.cp1x,e.left,e.right),n.cp1y=Ge(n.cp1y,e.top,e.bottom)),r&&(n.cp2x=Ge(n.cp2x,e.left,e.right),n.cp2y=Ge(n.cp2y,e.top,e.bottom)))}(t,i)}const Ze=t=>0===t||1===t,Je=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*C/i),Qe=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*C/i)+1,ti={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*L),easeOutSine:t=>Math.sin(t*L),easeInOutSine:t=>-.5*(Math.cos(D*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>
vendor: 4,479 bytes, line 2
2Ze(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ze(t)?t:Je(t,.075,.3),easeOutElastic:t=>Ze(t)?t:Qe(t,.075,.3),easeInOutElastic(t){const e=.1125;return Ze(t)?t:t<.5?.5*Je(2*t,e,.45):.5+.5*Qe(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ti.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ti.easeInBounce(2*t):.5*ti.easeOutBounce(2*t-1)+.5};function ei(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function ii(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function si(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},a={x:e.cp1x,y:e.cp1y},o=ei(t,n,i),r=ei(n,a,i),c=ei(a,e,i),l=ei(o,r,i),h=ei(r,c,i);return ei(l,h,i)}const ni=new Map;function ai(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=ni.get(i);return s||(s=new Intl.NumberFormat(t,e),ni.set(i,s)),s}(e,i).format(t)}const oi=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),ri=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function ci(t,e){const i=(""+t).match(oi);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function li(t,e){const i={},s=n(e),a=s?Object.keys(e):e,o=n(t)?s?i=>r(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of a)i[t]=+o(t)||0;return i}function hi(t){return li(t,{top:"y",right:"x",bottom:"y",left:"x"})}function di(t){return li(t,["topLeft","topRight","bottomLeft","bottomRight"])}function fi(t){const e=hi(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ui(t,e){t=t||{},e=e||ee.font;let i=r(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=r(t.style,e.style);s&&!(""+s).match(ri)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:r(t.family,e.family),lineHeight:ci(r(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:r(t.weight,e.weight),string:""};return n.string=pe(n),n}function gi(t,e,i,n){let a,o,r,c=!0;for(a=0,o=t.length;a<o;++a)if(r=t[a],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),c=!1),void 0!==i&&s(r)&&(r=r[i%r.length],c=!1),void 0!==r))return n&&!c&&(n.cacheable=!1),r}function pi(t,e,i){const{min:s,max:n}=t,a=l(e,(n-s)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(s,-Math.abs(a)),max:o(n,a)}}function bi(t,e){return Object.assign(Object.create(t),e)}function mi(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function xi(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function _i(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function yi(t){return"angle"===t?{between:K,compare:X,normalize:G}:{between:Q,compare:(t,e)=>t-e,normalize:t=>t}}function vi({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function Mi(t,e,i){if(!i)return[t];const{property:s,start:n,end:a}=i,o=e.length,{compare:r,between:c,normalize:l}=yi(s),{start:h,end:d,loop:f,style:u}=function(t,e,i){const{property:s,start:n,end:a}=i,{between:o,normalize:r}=yi(s),c=e.length;let l,h,{start:d,end:f,loop:u}=t;if(u){for(d+=c,f+=c,l=0,h=c;l<h&&o(r(e[d%c][s]),n,a);++l)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:u,style:t.style}}(t,e,i),g=[];let p,b,m,x=!1,_=null;for(let t=h,i=h;t<=d;++t)b=e[t%o],b.skip||(p=l(b[s]),p!==m&&(x=c(p,n,a),null===_&&(x||c(n,m,p)&&0!==r(n,m))&&(_=0===r(p,n)?t:i),null!==_&&(!x||0===r(a,p)||c(a,m,p))&&(g.push(vi({start:_,end:t,loop:f,count:o,style:u})),_=null),i=t,m=p));return null!==_&&g.push(vi({start:_,end:d,loop:f,count:o,style:u})),g}function wi(t,e){const i=[],s=t.segments;for(let n=0;n<s.length;n++){const a=Mi(s[n],t.points,e);a.length&&i.push(...a)}return i}
vendor: 2,588 bytes, line 2
2function ki(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const a=!!t._loop,{start:o,end:r}=function(t,e,i,s){let n=0,a=e-1;if(i&&!s)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,i&&(a+=n);a>n&&t[a%e].skip;)a--;return a%=e,{start:n,end:a}}(i,n,a,s);return function(t,e,i,s){return s&&s.setContext&&i?function(t,e,i,s){const n=t._chart.getContext(),a=Si(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,c=i.length,l=[];let h=a,d=e[0].start,f=d;function u(t,e,s,n){const a=r?-1:1;if(t!==e){for(t+=c;i[t%c].skip;)t-=a;for(;i[e%c].skip;)e+=a;t%c!=e%c&&(l.push({start:t%c,end:e%c,loop:s,style:n}),h=n,d=e%c)}}for(const t of e){d=r?d:t.start;let e,a=i[d%c];for(f=d+1;f<=t.end;f++){const r=i[f%c];e=Si(s.setContext(bi(n,{type:"segment",p0:a,p1:r,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:o}))),Pi(e,h)&&u(d,f-1,t.loop,h),a=r,h=e}d<f-1&&u(d,f-1,t.loop,h)}return l}(t,e,i,s):e}(t,!0===s?[{start:o,end:r,loop:a}]:function(t,e,i,s){const n=t.length,a=[];let o,r=e,c=t[e];for(o=e+1;o<=i;++o){const i=t[o%n];i.skip||i.stop?c.skip||(s=!1,a.push({start:e%n,end:(o-1)%n,loop:s}),e=r=i.stop?o:null):(r=o,c.skip&&(e=o)),c=i}return null!==r&&a.push({start:e%n,end:r%n,loop:s}),a}(i,o,r<o?r+n:r,!!t._fullLoop&&0===o&&r===n-1),i,e)}function Si(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Pi(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Di=Object.freeze({__proto__:null,easingEffects:ti,isPatternOrGradient:Xt,color:Gt,getHoverColor:Kt,noop:t,uid:e,isNullOrUndef:i,isArray:s,isObject:n,isFinite:a,finiteOrDefault:o,valueOrDefault:r,toPercentage:c,toDimension:l,callback:h,each:d,_elementsEqual:f,clone:u,_merger:p,merge:b,mergeIf:m,_mergerIf:x,_deprecated:function(t,e,i,s){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+s+'" instead')},resolveObjectKey:y,_splitKey:v,_capitalize:M,defined:w,isFunction:k,setsEqual:S,_isClickEvent:P,toFontString:pe,_measureText:be,_longestText:me,_alignPixel:xe,clearCanvas:_e,drawPoint:ye,drawPointLegend:ve,_isPointInArea:Me,clipArea:we,unclipArea:ke,_steppedLineTo:Se,_bezierCurveTo:Pe,renderText:De,addRoundedRectPath:Oe,_lookup:tt,_lookupByKey:et,_rlookupByKey:it,_filterBetween:st,listenArrayEvents:at,unlistenArrayEvents:ot,_arrayUnique:rt,_createResolver:Ae,_attachContext:Te,_descriptors:Le,_parseObjectDataRadialScale:je,splineCurve:qe,splineCurveMonotone:Xe,_updateBezierControlPoints:Ke,_isDomSupp
vendor: 4,201 bytes, line 2
2orted:ie,_getParentNode:se,getStyle:oe,getRelativePosition:le,getMaximumSize:de,retinaScale:fe,supportsEventListenerOptions:ue,readUsedSize:ge,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:ct,throttled:lt,debounce:ht,_toLeftRightCenter:dt,_alignStartEnd:ft,_textX:ut,_getStartAndCountOfVisiblePoints:gt,_scaleRangesChanged:pt,_pointInLine:ei,_steppedInterpolation:ii,_bezierInterpolation:si,formatNumber:ai,toLineHeight:ci,_readValueToProps:li,toTRBL:hi,toTRBLCorners:di,toPadding:fi,toFont:ui,resolve:gi,_addGrace:pi,createContext:bi,PI:D,TAU:C,PITAU:O,INFINITY:A,RAD_PER_DEG:T,HALF_PI:L,QUARTER_PI:R,TWO_THIRDS_PI:E,log10:I,sign:z,niceNum:F,_factorize:B,isNumber:V,almostEquals:N,almostWhole:W,_setMinAndMaxByKey:H,toRadians:j,toDegrees:$,_decimalPlaces:Y,getAngleFromPoint:U,distanceBetweenPoints:q,_angleDiff:X,_normalizeAngle:G,_angleBetween:K,_limitValue:Z,_int16Range:J,_isBetween:Q,getRtlAdapter:mi,overrideTextDirection:xi,restoreTextDirection:_i,_boundSegment:Mi,_boundSegments:wi,_computeSegments:ki});function Ci(t,e,i,s){const{controller:n,data:a,_sorted:o}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&o&&a.length){const t=r._reversePixels?it:et;if(!s)return t(a,e,i);if(n._sharedOptions){const s=a[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(a,e,i-n),o=t(a,e,i+n);return{lo:s.lo,hi:o.hi}}}}return{lo:0,hi:a.length-1}}function Oi(t,e,i,s,n){const a=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=a.length;t<i;++t){const{index:i,data:r}=a[t],{lo:c,hi:l}=Ci(a[t],e,o,n);for(let t=c;t<=l;++t){const e=r[t];e.skip||s(e,i,t)}}}function Ai(t,e,i,s,n){const a=[];return n||t.isPointInArea(e)?(Oi(t,i,e,(function(i,o,r){(n||Me(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&a.push({element:i,datasetIndex:o,index:r})}),!0),a):a}function Ti(t,e,i,s,n,a){return a||t.isPointInArea(e)?"r"!==i||s?function(t,e,i,s,n,a){let o=[];const r=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,a=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(a,2))}}(i);let c=Number.POSITIVE_INFINITY;return Oi(t,i,e,(function(i,l,h){const d=i.inRange(e.x,e.y,n);if(s&&!d)return;const f=i.getCenterPoint(n);if(!a&&!t.isPointInArea(f)&&!d)return;const u=r(e,f);u<c?(o=[{element:i,datasetIndex:l,index:h}],c=u):u===c&&o.push({element:i,datasetIndex:l,index:h})})),o}(t,e,i,s,n,a):function(t,e,i,s){let n=[];return Oi(t,i,e,(function(t,i,a){const{startAngle:o,endAngle:r}=t.getProps(["startAngle","endAngle"],s),{angle:c}=U(t,{x:e.x,y:e.y});K(c,o,r)&&n.push({element:t,datasetIndex:i,index:a})})),n}(t,e,i,n):[]}function Li(t,e,i,s,n){const a=[],o="x"===i?"inXRange":"inYRange";let r=!1;return Oi(t,i,e,((t,s,c)=>{t[o](e[i],n)&&(a.push({element:t,datasetIndex:s,index:c}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:a}var Ri={evaluateInteractionItems:Oi,modes:{index(t,e,i,s){const n=le(e,t),a=i.axis||"x",o=i.includeInvisible||!1,r=i.intersect?Ai(t,n,a,s,o):Ti(t,n,a,!1,s,o),c=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&c.push({element:i,datasetIndex:t.index,index:e})})),c):[]},dataset(t,e,i,s){const n=le(e,t),a=i.axis||"xy",o=i.includeInvisible||!1;let r=i.intersect?Ai(t,n,a,s,o):Ti(t,n,a,!1,s,o);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;t<i.length;++t)r.push({element:i[t],datasetIndex:e,index:t})}return r},point:(t,e,i,s)=>Ai(t,le(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=le(e,t),a=i.axis||"xy",o=i.includeInvisible||!1;return Ti(t,n,a,i.intersect,s,o)},x:(t,e,i,s)=>Li(t,le(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Li(t,le(e,t),"y",i.intersect,s)}};const Ei=["left","top","right","bottom"];function Ii(t,e){return t.filter((t=>t.pos===e))}function zi(t,e){return t.filter((t=>-1===Ei.indexOf(t.pos)&&t.box.axis===e))}function Fi(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Bi(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function Vi(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)}
vendor: 4,112 bytes, line 2
2function Ni(t,e,i,s){const{pos:a,box:o}=i,r=t.maxPadding;if(!n(a)){i.size&&(t[a]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[a]+=i.size}o.getPadding&&Vi(r,o.getPadding());const c=Math.max(0,e.outerWidth-Bi(r,t,"left","right")),l=Math.max(0,e.outerHeight-Bi(r,t,"top","bottom")),h=c!==t.w,d=l!==t.h;return t.w=c,t.h=l,i.horizontal?{same:h,other:d}:{same:d,other:h}}function Wi(t,e){const i=e.maxPadding;return function(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}(t?["left","right"]:["top","bottom"])}function Hi(t,e,i,s){const n=[];let a,o,r,c,l,h;for(a=0,o=t.length,l=0;a<o;++a){r=t[a],c=r.box,c.update(r.width||e.w,r.height||e.h,Wi(r.horizontal,e));const{same:o,other:d}=Ni(e,i,r,s);l|=o&&n.length,h=h||d,c.fullSize||n.push(r)}return l&&Hi(n,e,i,s)||h}function ji(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function $i(t,e,i,s){const n=i.padding;let{x:a,y:o}=e;for(const r of t){const t=r.box,c=s[r.stack]||{count:1,placed:0,weight:1},l=r.stackWeight/c.weight||1;if(r.horizontal){const s=e.w*l,a=c.size||t.height;w(c.start)&&(o=c.start),t.fullSize?ji(t,n.left,o,i.outerWidth-n.right-n.left,a):ji(t,e.left+c.placed,o,s,a),c.start=o,c.placed+=s,o=t.bottom}else{const s=e.h*l,o=c.size||t.width;w(c.start)&&(a=c.start),t.fullSize?ji(t,a,n.top,o,i.outerHeight-n.bottom-n.top):ji(t,a,e.top+c.placed,o,s),c.start=a,c.placed+=s,a=t.right}}e.x=a,e.y=o}ee.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Yi={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const n=fi(t.options.layout.padding),a=Math.max(e-n.width,0),o=Math.max(i-n.height,0),r=function(t){const e=function(t){const e=[];let i,s,n,a,o,r;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:a,options:{stack:o,stackWeight:r=1}}=n),e.push({index:i,box:n,pos:a,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&a+o,stackWeight:r});return e}(t),i=Fi(e.filter((t=>t.box.fullSize)),!0),s=Fi(Ii(e,"left"),!0),n=Fi(Ii(e,"right")),a=Fi(Ii(e,"top"),!0),o=Fi(Ii(e,"bottom")),r=zi(e,"x"),c=zi(e,"y");return{fullSize:i,leftAndTop:s.concat(a),rightAndBottom:n.concat(c).concat(o).concat(r),chartArea:Ii(e,"chartArea"),vertical:s.concat(n).concat(c),horizontal:a.concat(o).concat(r)}}(t.boxes),c=r.vertical,l=r.horizontal;d(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=c.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,f=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/h,hBoxMaxHeight:o/2}),u=Object.assign({},n);Vi(u,fi(s));const g=Object.assign({maxPadding:u,w:a,h:o,x:n.left,y:n.top},n),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Ei.includes(s))continue;const a=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let a,o,r;for(a=0,o=t.length;a<o;++a){r=t[a];const{fullSize:o}=r.box,c=i[r.stack],l=c&&r.stackWeight/c.weight;r.horizontal?(r.width=l?l*s:o&&e.availableWidth,r.height=n):(r.width=s,r.height=l?l*n:o&&e.availableHeight)}return i}(c.concat(l),f);Hi(r.fullSize,g,f,p),Hi(c,g,f,p),Hi(l,g,f,p)&&Hi(c,g,f,p),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(g),$i(r.leftAndTop,g,f,p),g.x+=g.w,g.y+=g.h,$i(r.rightAndBottom,g,f,p),t.chartArea={left:g.left,top:g.top,right:g.left+g.w,bottom:g.top+g.h,height:g.h,width:g.w},d(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(g.w,g.h,{left:0,top:0,right:0,bottom:0})}))}};class Ui{acquireContext(t,e){}releaseContext(t){return!1}
vendor: 3,670 bytes, line 2
2addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class qi extends Ui{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Xi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Gi=t=>null===t||""===t,Ki=!!ue&&{passive:!0};function Zi(t,e,i){t.canvas.removeEventListener(e,i,Ki)}function Ji(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Qi(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ji(i.addedNodes,s),e=e&&!Ji(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function ts(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Ji(i.removedNodes,s),e=e&&!Ji(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const es=new Map;let is=0;function ss(){const t=window.devicePixelRatio;t!==is&&(is=t,es.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function ns(t,e,i){const s=t.canvas,n=s&&se(s);if(!n)return;const a=lt(((t,e)=>{const s=n.clientWidth;i(t,e),s<n.clientWidth&&i()}),window),o=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||a(i,s)}));return o.observe(n),function(t,e){es.size||window.addEventListener("resize",ss),es.set(t,e)}(t,a),o}function as(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){es.delete(t),es.size||window.removeEventListener("resize",ss)}(t)}function os(t,e,i){const s=t.canvas,n=lt((e=>{null!==t.ctx&&i(function(t,e){const i=Xi[t.type]||t.type,{x:s,y:n}=le(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,Ki)}(s,e,n),n}class rs extends Ui{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Gi(n)){const e=ge(t,"width");void 0!==e&&(t.width=e)}if(Gi(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ge(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const s=e.$chartjs.initial;["height","width"].forEach((t=>{const n=s[t];i(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=s.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:Qi,detach:ts,resize:ns}[e]||os;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];s&&(({attach:as,detach:as,resize:as}[e]||Zi)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return de(t,e,i,s)}isAttached(t){const e=se(t);return!(!e||!e.isConnected)}}function cs(t){return!ie()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?qi:rs}var ls=Object.freeze({__proto__:null,_detectPlatform:cs,BasePlatform:Ui,BasicPlatform:qi,DomPlatform:rs});const hs="transparent",ds={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Gt(t||hs),n=s.valid&&Gt(e||hs);
vendor: 8,498 bytes, line 2
2return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class fs{constructor(t,e,i,s){const n=e[i];s=gi([t.to,s,n,t.from]);const a=gi([t.from,n,s]);this._active=!0,this._fn=t.fn||ds[t.type||typeof a],this._easing=ti[t.easing]||ti.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,a=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=gi([t.to,e,s,t.from]),this._from=gi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,a=this._loop,o=this._to;let r;if(this._active=n!==o&&(a||e<i),!this._active)return this._target[s]=o,void this._notify(!0);e<0?this._target[s]=n:(r=e/i%2,r=a&&r>1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,o,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}ee.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const us=Object.keys(ee.animation);ee.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ee.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ee.describe("animations",{_fallback:"animation"}),ee.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class gs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!n(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const a=t[i];if(!n(a))return;const o={};for(const t of us)o[t]=a[t];(s(a.properties)&&a.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){const n=t[s[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),a=Object.keys(e),o=Date.now();let r;for(r=a.length-1;r>=0;--r){const c=a[r];if("$"===c.charAt(0))continue;if("options"===c){s.push(...this._animateOptions(t,e));continue}const l=e[c];let h=n[c];const d=i.get(c);if(h){if(d&&h.active()){h.update(d,l,o);continue}h.cancel()}d&&d.duration?(n[c]=h=new fs(d,t,c,l),s.push(h)):t[c]=l}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(bt.add(this._chart,i),!0):void 0}}function ps(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:s?a:n,end:s?n:a}}function bs(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,a;for(n=0,a=s.length;n<a;++n)i.push(s[n].index);return i}function ms(t,e,i,s={}){const n=t.keys,o="single"===s.mode;let r,c,l,h;if(null!==e){for(r=0,c=n.length;r<c;++r){if(l=+n[r],l===i){if(s.all)continue;break}h=t.values[l],a(h)&&(o||0===e||z(e)===z(h))&&(e+=h)}return e}}function xs(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function _s(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function ys(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function vs(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:a,vScale:o,index:r}=s,c=a.axis,l=o.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(a,o,s),d=e.length;let f;for(let t=0;t<d;++t){const i=e[t],{[c]:a,[l]:d}=i;f=(i._stacks||(i._stacks={}))[l]=_s(n,h,a),f[r]=d,f._top=ys(f,o,!0,s.type),f._bottom=ys(f,o,!1,s.type)}}function Ms(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function ws(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const ks=t=>"reset"===t||"none"===t,Ss=(t,e)=>e?t:Object.assign({},t);class Ps{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xs(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ws(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=r(i.xAxisID,Ms(t,"x")),a=e.yAxisID=r(i.yAxisID,Ms(t,"y")),o=e.rAxisID=r(i.rAxisID,Ms(t,"r")),c=e.indexAxis,l=e.iAxisID=s(c,n,a,o),h=e.vAxisID=s(c,a,n,o);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ot(this._data,this),t._stacked&&ws(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(n(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,a;for(s=0,n=e.length;s<n;++s)a=e[s],i[s]={x:a,y:t[a]};return i}(e);else if(i!==e){if(i){ot(i,this);const t=this._cachedMeta;ws(t),t._parsed=[]}e&&Object.isExtensible(e)&&at(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=xs(e.vScale,e),e.stack!==i.stack&&(s=!0,ws(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&vs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:a}=this,{iScale:o,_stacked:r}=i,c=o.axis;let l,h,d,f=0===t&&e===a.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=a,i._sorted=!0,d=a;else{d=s(a[t])?this.parseArrayData(i,a,t,e):n(a[t])?this.parseObjectData(i,a,t,e):this.parsePrimitiveData(i,a,t,e);const o=()=>null===h[c]||u&&h[c]<u[c];for(l=0;l<e;++l)i._parsed[l+t]=h=d[l],f&&(o()&&(f=!1),u=h);i._sorted=f}r&&vs(this,d)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:a}=t,o=n.axis,r=a.axis,c=n.getLabels(),l=n===a,h=new Array(s);let d,f,u;for(d=0,f=s;d<f;++d)u=d+i,h[d]={[o]:l||n.parse(c[u],u),[r]:a.parse(e[u],u)};return h}parseArrayData(t,e,i,s){const{xScale:n,yScale:a}=t,o=new Array(s);let r,c,l,h;for(r=0,c=s;r<c;++r)l=r+i,h=e[l],o[r]={x:n.parse(h[0],l),y:a.parse(h[1],l)};return o}parseObjectData(t,e,i,s){const{xScale:n,yScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,c=new Array(s);let l,h,d,f;for(l=0,h=s;l<h;++l)d=l+i,f=e[d],c[l]={x:n.parse(y(f,o),d),y:a.parse(y(f,r),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,n=this._cachedMeta,a=e[t.axis];
vendor: 20,527 bytes, line 2
2return ms({keys:bs(s,!0),values:e._stacks[t.axis]},a,n.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let a=null===n?NaN:n;const o=s&&i._stacks[e.axis];s&&o&&(s.values=o,a=ms(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,n=i._sorted&&t===i.iScale,o=s.length,r=this._getOtherScale(t),c=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:bs(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(r);let f,u;function g(){u=s[f];const e=u[r.axis];return!a(u[t.axis])||h>e||d<e}for(f=0;f<o&&(g()||(this.updateRangeFromParsed(l,t,u,c),!n));++f);if(n)for(f=o-1;f>=0;--f)if(!g()){this.updateRangeFromParsed(l,t,u,c);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s<n;++s)o=e[s][t.axis],a(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,a;return n(t)?(e=t.top,i=t.right,s=t.bottom,a=t.left):e=i=s=a=t,{top:e,right:i,bottom:s,left:a,disabled:!1===t}}(r(this.options.clip,function(t,e,i){if(!1===i)return!1;const s=ps(t,i),n=ps(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],n=e.chartArea,a=[],o=this._drawStart||0,r=this._drawCount||s.length-o,c=this.options.drawActiveElementsOnTop;let l;for(i.dataset&&i.dataset.draw(t,n,o,r),l=o;l<o+r;++l){const e=s[l];e.hidden||(e.active&&c?a.push(e):e.draw(t,n))}for(l=0;l<a.length;++l)a[l].draw(t,n)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return bi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return bi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,n=this._cachedDataOpts,a=t+"-"+e,o=n[a],r=this.enableOptionSharing&&w(i);if(o)return Ss(o,r);const c=this.chart.config,l=c.datasetElementScopeKeys(this._type,t),h=s?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),l),f=Object.keys(ee.elements[t]),u=c.resolveNamedOptions(d,f,(()=>this.getContext(i,s)),h);return u.$shared&&(u.$shared=r,n[a]=Object.freeze(Ss(u,r))),u}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,a=`animation-${e}`,o=n[a];if(o)return o;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),a=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(a,this.getContext(t,i,e))}const c=new gs(s,r&&r.animations);return r&&r._cacheable&&(n[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ks(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),a=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:a}}updateElement(t,e,i,s){ks(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!ks(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,a=Math.min(n,s);a&&this.parse(0,a),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e,i=!0){const s=this._cachedMeta,n=s.data,a=t+e;let o;const r=t=>{for(t.length+=e,o=t.length-1;o>=a;o--)t[o]=t[o-e]};for(r(n),o=t;o<a;++o)n[o]=new this.dataElementType;this._parsing&&r(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&ws(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ps.defaults={},Ps.prototype.datasetElementType=null,Ps.prototype.dataElementType=null;class Ds{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return V(this.x)&&V(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}Ds.defaults={},Ds.defaultRoutes=void 0;const Cs={values:t=>s(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,a=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),a=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=I(Math.abs(a)),r=Math.max(Math.min(-1*Math.floor(o),20),0),c={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(c,this.options.ticks.format),ai(t,s,c)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(I(t)));return 1===s||2===s||5===s?Cs.numeric.call(this,t,e,i):""}};var Os={formatters:Cs};function As(t,e){const s=t.options.ticks,n=s.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),a=s.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],o=a.length,r=a[0],c=a[o-1],l=[];if(o>n)return function(t,e,i,s){let n,a=0,o=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===o&&(e.push(t[n]),a++,o=i[a*s])}(e,l,a,o/n),l;const h=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),n=e.length/i;if(!s)return Math.max(n,1);const a=B(s);for(let t=0,e=a.length-1;t<e;t++){const e=a[t];if(e>n)return e}return Math.max(n,1)}(a,e,n);if(o>0){let t,s;const n=o>1?Math.round((c-r)/(o-1)):null;for(Ts(e,l,h,i(n)?0:r-n,r),t=0,s=o-1;t<s;t++)Ts(e,l,h,a[t],a[t+1]);return Ts(e,l,h,c,i(n)?e.length:c+n),l}return Ts(e,l,h),l}function Ts(t,e,i,s,n){const a=r(s,0),o=Math.min(r(n,t.length),t.length);let c,l,h,d=0;for(i=Math.ceil(i),n&&(c=n-s,i=c/Math.floor(c/i)),h=a;h<0;)d++,h=Math.round(a+d*i);for(l=Math.max(a,0);l<o;l++)l===h&&(e.push(t[l]),d++,h=Math.round(a+d*i))}ee.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Os.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ee.route("scale.ticks","color","","color"),ee.route("scale.grid","color","","borderColor"),ee.route("scale.grid","borderColor","","borderColor"),ee.route("scale.title","color","","color"),ee.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ee.describe("scales",{_fallback:"scale"}),ee.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Ls=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Rs(t,e){const i=[],s=t.length/e,n=t.length;let a=0;for(;a<n;a+=s)i.push(t[Math.floor(a)]);return i}function Es(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),a=t._startPixel,o=t._endPixel,r=1e-6;let c,l=t.getPixelForTick(n);if(!(i&&(c=1===s?Math.max(l-a,o-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,l+=n<e?c:-c,l<a-r||l>o+r)))return l}function Is(t){return t.drawTicks?t.tickLength:0}function zs(t,e){if(!t.display)return 0;const i=ui(t.font,e),n=fi(t.padding);return(s(t.text)?t.text.length:1)*i.lineHeight+n.height}function Fs(t,e,i){let s=dt(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Bs extends Ds{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=o(t,Number.POSITIVE_INFINITY),e=o(e,Number.NEGATIVE_INFINITY),i=o(i,Number.POSITIVE_INFINITY),s=o(s,Number.NEGATIVE_INFINITY),{min:o(t,i),max:o(e,s),minDefined:a(t),maxDefined:a(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:a}=this.getUserBounds();if(n&&a)return{min:i,max:s};const r=this.getMatchingVisibleMetas();for(let o=0,c=r.length;o<c;++o)e=r[o].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),a||(s=Math.max(s,e.max));return i=a&&i>s?s:i,s=n&&i>s?i:s,{min:o(i,o(s,i)),max:o(s,o(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){h(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=pi(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=o<this.ticks.length;this._convertTicksToLabels(r?Rs(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||"auto"===a.source)&&(this.ticks=As(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),r&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){h(this.options.afterUpdate,[this])}beforeSetDimensions(){h(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){h(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),h(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){h(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i],n.label=h(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){h(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){h(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,s=e.minRotation||0,n=e.maxRotation;let a,o,r,c=s;if(!this._isVisible()||!e.display||s>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const l=this._getLabelSizes(),h=l.widest.width,d=l.highest.height,f=Z(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/i:f/(i-1),h+6>a&&(a=f/(i-(t.offset?.5:1)),o=this.maxHeight-Is(t.grid)-e.padding-zs(t.title,this.chart.options.font),r=Math.sqrt(h*h+d*d),c=$(Math.min(Math.asin(Z((l.highest.height+6)/a,-1,1)),Math.asin(Z(o/r,-1,1))-Math.asin(Z(d/r,-1,1)))),c=Math.max(s,Math.min(n,c))),this.labelRotation=c}afterCalculateLabelRotation(){h(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){h(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const a=zs(s,e.options.font);if(o?(t.width=this.maxWidth,t.height=Is(n)+a):(t.height=this.maxHeight,t.width=Is(n)+a),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:a}=this._getLabelSizes(),r=2*i.padding,c=j(this.labelRotation),l=Math.cos(c),h=Math.sin(c);if(o){const e=i.mirror?0:h*n.width+l*a.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:l*n.width+h*a.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,h,l)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:a},position:o}=this.options,r=0!==this.labelRotation,c="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,l=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;r?c?(h=s*t.width,d=i*e.height):(h=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?h=t.width:"inner"!==n&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-o+a)*this.width/(this.width-o),0),this.paddingRight=Math.max((d-l+a)*this.width/(this.width-l),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+a,this.paddingBottom=s+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){h(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,s;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,s=t.length;e<s;e++)i(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Rs(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:n,_longestTextCache:a}=this,o=[],r=[];let c,l,h,f,u,g,p,b,m,x,_,y=0,v=0;for(c=0;c<e;++c){if(f=t[c].label,u=this._resolveTickFontOptions(c),n.font=g=u.string,p=a[g]=a[g]||{data:{},gc:[]},b=u.lineHeight,m=x=0,i(f)||s(f)){if(s(f))for(l=0,h=f.length;l<h;++l)_=f[l],i(_)||s(_)||(m=be(n,p.data,p.gc,m,_),x+=b)}else m=be(n,p.data,p.gc,m,f),x=b;o.push(m),r.push(x),y=Math.max(m,y),v=Math.max(x,v)}!function(t,e){d(t,(t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}}))}(a,e);const M=o.indexOf(y),w=r.indexOf(v),k=t=>({width:o[t]||0,height:r[t]||0});return{first:k(0),last:k(e-1),widest:k(M),highest:k(w),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return J(this._alignToPixels?xe(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return bi(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=bi(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=j(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),n=this._getLabelSizes(),a=t.autoSkipPadding||0,o=n?n.widest.width+a:0,r=n?n.highest.height+a:0;return this.isHorizontal()?r*i>o*s?o/i:r/s:r*s<o*i?r/i:o/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:a,position:o}=s,c=a.offset,l=this.isHorizontal(),h=this.ticks.length+(c?1:0),d=Is(a),f=[],u=a.setContext(this.getContext()),g=u.drawBorder?u.borderWidth:0,p=g/2,b=function(t){return xe(i,t,g)};let m,x,_,y,v,M,w,k,S,P,D,C;if("top"===o)m=b(this.bottom),M=this.bottom-d,k=m-p,P=b(t.top)+p,C=t.bottom;else if("bottom"===o)m=b(this.top),P=t.top,C=b(t.bottom)-p,M=m+p,
vendor: 4,095 bytes, line 2
2k=this.top+d;else if("left"===o)m=b(this.right),v=this.right-d,w=m-p,S=b(t.left)+p,D=t.right;else if("right"===o)m=b(this.left),S=t.left,D=b(t.right)-p,v=m+p,w=this.left+d;else if("x"===e){if("center"===o)m=b((t.top+t.bottom)/2+.5);else if(n(o)){const t=Object.keys(o)[0],e=o[t];m=b(this.chart.scales[t].getPixelForValue(e))}P=t.top,C=t.bottom,M=m+p,k=M+d}else if("y"===e){if("center"===o)m=b((t.left+t.right)/2);else if(n(o)){const t=Object.keys(o)[0],e=o[t];m=b(this.chart.scales[t].getPixelForValue(e))}v=m-p,w=v-d,S=t.left,D=t.right}const O=r(s.ticks.maxTicksLimit,h),A=Math.max(1,Math.ceil(h/O));for(x=0;x<h;x+=A){const t=a.setContext(this.getContext(x)),e=t.lineWidth,s=t.color,n=t.borderDash||[],o=t.borderDashOffset,r=t.tickWidth,h=t.tickColor,d=t.tickBorderDash||[],u=t.tickBorderDashOffset;_=Es(this,x,c),void 0!==_&&(y=xe(i,_,e),l?v=w=S=D=y:M=k=P=C=y,f.push({tx1:v,ty1:M,tx2:w,ty2:k,x1:S,y1:P,x2:D,y2:C,width:e,color:s,borderDash:n,borderDashOffset:o,tickWidth:r,tickColor:h,tickBorderDash:d,tickBorderDashOffset:u}))}return this._ticksLength=h,this._borderValue=m,f}_computeLabelItems(t){const e=this.axis,i=this.options,{position:a,ticks:o}=i,r=this.isHorizontal(),c=this.ticks,{align:l,crossAlign:h,padding:d,mirror:f}=o,u=Is(i.grid),g=u+d,p=f?-d:g,b=-j(this.labelRotation),m=[];let x,_,y,v,M,w,k,S,P,D,C,O,A="middle";if("top"===a)w=this.bottom-p,k=this._getXAxisLabelAlignment();else if("bottom"===a)w=this.top+p,k=this._getXAxisLabelAlignment();else if("left"===a){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,M=t.x}else if("right"===a){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,M=t.x}else if("x"===e){if("center"===a)w=(t.top+t.bottom)/2+g;else if(n(a)){const t=Object.keys(a)[0],e=a[t];w=this.chart.scales[t].getPixelForValue(e)+g}k=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===a)M=(t.left+t.right)/2-g;else if(n(a)){const t=Object.keys(a)[0],e=a[t];M=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===l?A="top":"end"===l&&(A="bottom"));const T=this._getLabelSizes();for(x=0,_=c.length;x<_;++x){y=c[x],v=y.label;const t=o.setContext(this.getContext(x));S=this.getPixelForTick(x)+o.labelOffset,P=this._resolveTickFontOptions(x),D=P.lineHeight,C=s(v)?v.length:1;const e=C/2,i=t.color,n=t.textStrokeColor,l=t.textStrokeWidth;let d,u=k;if(r?(M=S,"inner"===k&&(u=x===_-1?this.options.reverse?"left":"right":0===x?this.options.reverse?"right":"left":"center"),O="top"===a?"near"===h||0!==b?-C*D+D/2:"center"===h?-T.highest.height/2-e*D+D:-T.highest.height+D/2:"near"===h||0!==b?D/2:"center"===h?T.highest.height/2-e*D:T.highest.height-C*D,f&&(O*=-1)):(w=S,O=(1-C)*D/2),t.showLabelBackdrop){const e=fi(t.backdropPadding),i=T.heights[x],s=T.widths[x];let n=w+O-e.top,a=M-e.left;switch(A){case"middle":n-=i/2;break;case"bottom":n-=i}switch(k){case"center":a-=s/2;break;case"right":a-=s}d={left:a,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:b,label:v,font:P,color:i,strokeColor:n,strokeWidth:l,textOffset:O,textAlign:u,textBaseline:A,translation:[M,w],backdrop:d})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-j(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,a=t+n,o=this._getLabelSizes().widest.width;let r,c;return"left"===e?s?(c=this.right+n,"near"===i?r="left":"center"===i?(r="center",c+=o/2):(r="right",c+=o)):(c=this.right-a,"near"===i?r="right":"center"===i?(r="center",c-=o/2):(r="left",c=this.left)):"right"===e?s?(c=this.left+n,"near"===i?r="right":"center"===i?(r="center",c-=o/2):(r="left",c-=o)):(c=this.left+a,"near"===i?r="left":"center"===i?(r="center",c+=o/2):(r="right",c=this.right)):r="right",{textAlign:r,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}
vendor: 4,140 bytes, line 2
2:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,a),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,a;const o=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,a=s.length;n<a;++n){const t=s[n];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,s=i.setContext(this.getContext()),n=i.drawBorder?s.borderWidth:0;if(!n)return;const a=i.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let r,c,l,h;this.isHorizontal()?(r=xe(t,this.left,n)-n/2,c=xe(t,this.right,a)+a/2,l=h=o):(l=xe(t,this.top,n)-n/2,h=xe(t,this.bottom,a)+a/2,r=c=o),e.save(),e.lineWidth=s.borderWidth,e.strokeStyle=s.borderColor,e.beginPath(),e.moveTo(r,l),e.lineTo(c,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&we(e,i);const s=this._labelItems||(this._labelItems=this._computeLabelItems(t));let n,a;for(n=0,a=s.length;n<a;++n){const t=s[n],i=t.font,a=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),De(e,a,0,t.textOffset,i,t)}i&&ke(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:a}}=this;if(!i.display)return;const o=ui(i.font),r=fi(i.padding),c=i.align;let l=o.lineHeight/2;"bottom"===e||"center"===e||n(e)?(l+=r.bottom,s(i.text)&&(l+=o.lineHeight*(i.text.length-1))):l+=r.top;const{titleX:h,titleY:d,maxWidth:f,rotation:u}=function(t,e,i,s){const{top:a,left:o,bottom:r,right:c,chart:l}=t,{chartArea:h,scales:d}=l;let f,u,g,p=0;const b=r-a,m=c-o;if(t.isHorizontal()){if(u=ft(s,o,c),n(i)){const t=Object.keys(i)[0],s=i[t];g=d[t].getPixelForValue(s)+b-e}else g="center"===i?(h.bottom+h.top)/2+b-e:Ls(t,i,e);f=c-o}else{if(n(i)){const t=Object.keys(i)[0],s=i[t];u=d[t].getPixelForValue(s)-m+e}else u="center"===i?(h.left+h.right)/2-m+e:Ls(t,i,e);g=ft(s,r,a),p="left"===i?-L:L}return{titleX:u,titleY:g,maxWidth:f,rotation:p}}(this,l,e,c);De(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:u,textAlign:Fs(c,e,a),textBaseline:"middle",translation:[h,d]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=r(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Bs.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,a;for(n=0,a=e.length;n<a;++n){const a=e[n];a[i]!==this.id||t&&a.type!==t||s.push(a)}return s}_resolveTickFontOptions(t){return ui(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Vs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,n=t.id,a=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);
vendor: 4,302 bytes, line 2
2return n in s||(s[n]=t,function(t,e,i){const s=b(Object.create(null),[i?ee.get(i):{},ee.get(e),t.defaults]);ee.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),n=s.pop(),a=[t].concat(s).join("."),o=e[i].split("."),r=o.pop(),c=o.join(".");ee.route(a,n,c,r)}))}(e,t.defaultRoutes),t.descriptors&&ee.describe(e,t.descriptors)}(t,a,i),this.override&&ee.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in ee[s]&&(delete ee[s][i],this.override&&delete Zt[i])}}var Ns=new class{constructor(){this.controllers=new Vs(Ps,"datasets",!0),this.elements=new Vs(Ds,"elements"),this.plugins=new Vs(Object,"plugins"),this.scales=new Vs(Bs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):d(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=M(t);h(i["before"+s],[],i),e[t](i),h(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}};class Ws{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===h(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){i(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=r(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(Ns.plugins.items);for(let t=0;t<s.length;t++)i.push(Ns.getPlugin(s[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const s=n[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,{plugins:e,localIds:i},s,n){const a=[],o=t.getContext();for(const r of e){const e=r.id,c=Hs(s[e],n);null!==c&&a.push({plugin:r,options:js(t.config,{plugin:r,local:i[e]},c,o)})}return a}(t,n,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Hs(t,e){return e||!1!==t?!0===t?{}:t:null}function js(t,{plugin:e,local:i},s,n){const a=t.pluginScopeKeys(e),o=t.getOptionScopes(s,a);return i&&e.defaults&&o.push(e.defaults),t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $s(t,e){const i=ee.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ys(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Us(t){const e=t.options||(t.options={});e.plugins=r(e.plugins,{}),e.scales=function(t,e){const i=Zt[t.type]||{scales:{}},s=e.scales||{},a=$s(t.type,e),o=Object.create(null),r=Object.create(null);
vendor: 12,377 bytes, line 2
2return Object.keys(s).forEach((t=>{const e=s[t];if(!n(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const c=Ys(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(c,a),h=i.scales||{};o[c]=o[c]||t,r[t]=m(Object.create(null),[{axis:c},e,h[c],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,a=i.indexAxis||$s(n,e),c=(Zt[n]||{}).scales||{};Object.keys(c).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),n=i[e+"AxisID"]||o[e]||e;r[n]=r[n]||Object.create(null),m(r[n],[{axis:e},s[n],c[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];m(e,[ee.scales[e.type],ee.scale])})),r}(t,e)}function qs(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Xs=new Map,Gs=new Set;function Ks(t,e){let i=Xs.get(t);return i||(i=e(),Xs.set(t,i),Gs.add(i)),i}const Zs=(t,e,i)=>{const s=y(e,i);void 0!==s&&t.add(s)};class Js{constructor(t){this._config=function(t){return(t=t||{}).data=qs(t.data),Us(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=qs(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Us(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ks(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Ks(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Ks(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Ks(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,a=this._cachedScopes(t,i),o=a.get(e);if(o)return o;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Zs(r,t,e)))),e.forEach((t=>Zs(r,s,t))),e.forEach((t=>Zs(r,Zt[n]||{},t))),e.forEach((t=>Zs(r,ee,t))),e.forEach((t=>Zs(r,Jt,t)))}));const c=Array.from(r);return 0===c.length&&c.push(Object.create(null)),Gs.has(e)&&a.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,Zt[e]||{},ee.datasets[e]||{},{type:e},ee,Jt]}resolveNamedOptions(t,e,i,n=[""]){const a={$shared:!0},{resolver:o,subPrefixes:r}=Qs(this._resolverCache,t,n);let c=o;(function(t,e){const{isScriptable:i,isIndexable:n}=Le(t);for(const a of e){const e=i(a),o=n(a),r=(o||e)&&t[a];if(e&&(k(r)||tn(r))||o&&s(r))return!0}return!1})(o,e)&&(a.$shared=!1,c=Te(o,i=k(i)?i():i,this.createResolver(t,i,r)));for(const t of e)a[t]=c[t];return a}createResolver(t,e,i=[""],s){const{resolver:a}=Qs(this._resolverCache,t,i);return n(e)?Te(a,e,void 0,s):a}}function Qs(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let a=s.get(n);return a||(a={resolver:Ae(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,a)),a}const tn=t=>n(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||k(t[i])),!1),en=["top","bottom","left","right","chartArea"];function sn(t,e){return"top"===t||"bottom"===t||-1===en.indexOf(t)&&"x"===e}function nn(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function an(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),h(i&&i.onComplete,[t],e)}function on(t){const e=t.chart,i=e.options.animation;h(i&&i.onProgress,[t],e)}function rn(t){return ie()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const cn={},ln=t=>{const e=rn(t);return Object.values(cn).filter((t=>t.canvas===e)).pop()};function hn(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const a=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=a)}}}class dn{constructor(t,i){const s=this.config=new Js(i),n=rn(t),a=ln(n);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||cs(n)),this.platform.updateConfig(s);const r=this.platform.acquireContext(n,o.aspectRatio),c=r&&r.canvas,l=c&&c.height,h=c&&c.width;this.id=e(),this.ctx=r,this.canvas=c,this.width=h,this.height=l,this._options=o,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 Ws,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=ht((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],cn[this.id]=this,r&&c?(bt.listen(this,"complete",an),bt.listen(this,"progress",on),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:a}=this;return i(t)?e&&a?a:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():fe(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return _e(this.canvas,this.ctx),this}stop(){return bt.stop(this),this}resize(t,e){bt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,n),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,fe(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),h(i.onResize,[this,a],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){d(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=Ys(t,i),n="r"===s,a="x"===s;return{options:i,dposition:n?"chartArea":a?"bottom":"left",dtype:n?"radialLinear":a?"category":"linear"}})))),d(n,(e=>{const n=e.options,a=n.id,o=Ys(a,n),c=r(n.type,e.dtype);void 0!==n.position&&sn(n.position,o)===sn(e.dposition)||(n.position=e.dposition),s[a]=!0;let l=null;a in i&&i[a].type===c?l=i[a]:(l=new(Ns.getScale(c))({id:a,type:c,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(n,t)})),d(s,((t,e)=>{t||delete i[e]})),d(i,(t=>{Yi.configure(this,t,t.options),Yi.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(nn("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let n=this.getDatasetMeta(i);const a=s.type||this.config.type;if(n.type&&n.type!==a&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=a,n.indexAxis=s.indexAxis||$s(a,this.options),n.order=s.order||0,n.index=i,n.label=""+s.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=Ns.getController(a),{datasetElementType:s,dataElementType:o}=ee.datasets[a];Object.assign(e.prototype,{dataElementType:Ns.getElement(o),datasetElementType:s&&Ns.getElement(s)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){d(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!s&&-1===n.indexOf(e);e.buildOrUpdateElements(i),a=Math.max(+e.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||d(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nn("z","_idx"));const{_active:o,_lastEvent:r}=this;r?this._eventHandler(r,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){d(this.scales,(t=>{Yi.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);S(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e)hn(t,s,"_removeElements"===i?-n:n)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;t<e;t++)if(!S(s,i(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Yi.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],d(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,k(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(bt.has(this)?this.attached&&!bt.running(this)&&bt.start(this):(this.draw(),an({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,a={meta:t,index:t.index,cancelable:!0};
vendor: 4,629 bytes, line 2
2!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(s&&we(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&ke(e),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return Me(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Ri.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={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},i.push(s)),s}getContext(){return this.$context||(this.$context=bi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),a=n.controller._resolveAnimations(void 0,s);w(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),bt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),_e(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete cn[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};d(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let a;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",n),i("detach",a)};a=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():a()}unbindEvents(){d(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},d(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,a,o,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),o=0,r=t.length;o<r;++o){a=t[o];const e=a&&this.getDatasetMeta(a.datasetIndex).controller;e&&e[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!f(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=n(e,t),o=i?t:n(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,a=e,o=this._getActiveElements(t,s,i,a),r=P(t),c=function(t,e,
vendor: 4,105 bytes, line 2
2i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,h(n.onHover,[t,o,this],this),r&&h(n.onClick,[t,o,this],this));const l=!f(o,s);return(l||e)&&(this._active=o,this._updateHoverStyles(o,s,e)),this._lastEvent=c,l}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}const fn=()=>d(dn.instances,(t=>t._plugins.invalidate())),un=!0;function gn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(dn,{defaults:{enumerable:un,value:ee},instances:{enumerable:un,value:cn},overrides:{enumerable:un,value:Zt},registry:{enumerable:un,value:Ns},version:{enumerable:un,value:"3.9.1"},getChart:{enumerable:un,value:ln},register:{enumerable:un,value:(...t)=>{Ns.add(...t),fn()}},unregister:{enumerable:un,value:(...t)=>{Ns.remove(...t),fn()}}});class pn{constructor(t){this.options=t||{}}init(t){}formats(){return gn()}parse(t,e){return gn()}format(t,e){return gn()}add(t,e,i){return gn()}diff(t,e,i){return gn()}startOf(t,e,i){return gn()}endOf(t,e){return gn()}}pn.override=function(t){Object.assign(pn.prototype,t)};var bn={_date:pn};function mn(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=rt(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,n,a,o,r=e._length;const c=()=>{32767!==a&&-32768!==a&&(w(o)&&(r=Math.min(r,Math.abs(a-o)||r)),o=a)};for(s=0,n=i.length;s<n;++s)a=e.getPixelForValue(i[s]),c();for(o=void 0,s=0,n=e.ticks.length;s<n;++s)a=e.getPixelForTick(s),c();return r}function xn(t,e,i,n){return s(t)?function(t,e,i,s){const n=i.parse(t[0],s),a=i.parse(t[1],s),o=Math.min(n,a),r=Math.max(n,a);let c=o,l=r;Math.abs(o)>Math.abs(r)&&(c=r,l=o),e[i.axis]=l,e._custom={barStart:c,barEnd:l,start:n,end:a,min:o,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function _n(t,e,i,s){const n=t.iScale,a=t.vScale,o=n.getLabels(),r=n===a,c=[];let l,h,d,f;for(l=i,h=i+s;l<h;++l)f=e[l],d={},d[n.axis]=r||n.parse(o[l],l),c.push(xn(f,d,a,l));return c}function yn(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function vn(t,e,i,s){let n=e.borderSkipped;const a={};if(!n)return void(t.borderSkipped=a);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:r,reverse:c,top:l,bottom:h}=function(t){let e,i,s,n,a;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",a="start"):(n="start",a="end"),{start:i,end:s,reverse:e,top:n,bottom:a}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=l:(i._bottom||0)===s?n=h:(a[Mn(h,o,r,c)]=!0,n=l)),a[Mn(n,o,r,c)]=!0,t.borderSkipped=a}function Mn(t,e,i,s){var n,a,o;return s?(o=i,t=wn(t=(n=t)===(a=e)?o:n===o?a:n,i,e)):t=wn(t,e,i),t}function wn(t,e,i){return"start"===t?e:"end"===t?i:t}function kn(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Sn extends Ps{parsePrimitiveData(t,e,i,s){return _n(t,e,i,s)}parseArrayData(t,e,i,s){return _n(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:a}=t,{xAxisKey:o="x",yAxisKey:r="y"}=this._parsing,c="x"===n.axis?o:r,l="x"===a.axis?o:r,h=[];let d,f,u,g;for(d=i,f=i+s;d<f;++d)g=e[d],u={},u[n.axis]=n.parse(y(g,c),d),h.push(xn(y(g,l),u,a,d));return h}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),a=n._custom,o=yn(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const a="reset"===n,{index:o,_cachedMeta:{vScale:r}}
vendor: 4,194 bytes, line 2
2=this,c=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(e,n);for(let u=e;u<e+s;u++){const e=this.getParsed(u),s=a||i(e[r.axis])?{base:c,head:c}:this._calculateBarValuePixels(u),g=this._calculateBarIndexPixels(u,h),p=(e._stacks||{})[r.axis],b={horizontal:l,base:s.base,enableBorderRadius:!p||yn(e._custom)||o===p._top||o===p._bottom,x:l?s.head:g.center,y:l?g.center:s.head,height:l?g.size:Math.abs(s.size),width:l?Math.abs(s.size):g.size};f&&(b.options=d||this.resolveDataElementOptions(u,t[u].active?"active":n));const m=b.options||t[u].options;vn(b,m,p,o),kn(b,m,h.ratio),this.updateElement(t[u],u,b,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),a=s.options.stacked,o=[],r=t=>{const s=t.controller.getParsed(e),n=s&&s[t.vScale.axis];if(i(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!r(i))&&((!1===a||-1===o.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,a;for(n=0,a=e.data.length;n<a;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const o=t.barThickness;return{min:o||mn(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s},options:{base:n,minBarLength:a}}=this,o=n||0,r=this.getParsed(t),c=r._custom,l=yn(c);let h,d,f=r[e.axis],u=0,g=s?this.applyStack(e,r,s):f;g!==f&&(u=g-f,g=f),l&&(f=c.barStart,g=c.barEnd-c.barStart,0!==f&&z(f)!==z(c.barEnd)&&(u=0),u+=f);const p=i(n)||l?u:n;let b=e.getPixelForValue(p);if(h=this.chart.getDataVisibility(t)?e.getPixelForValue(u+g):b,d=h-b,Math.abs(d)<a){d=function(t,e,i){return 0!==t?z(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(d,e,o)*a,f===o&&(b-=d/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),n=Math.max(t,i);b=Math.max(Math.min(b,n),s),h=b+d}if(b===e.getPixelForValue(o)){const t=z(d)*e.getLineWidthForValue(o)/2;b+=t,d-=t}return{size:d,base:b,head:h,center:h+d/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,a=n.skipNull,o=r(n.maxBarThickness,1/0);let c,l;if(e.grouped){const s=a?this._getStackCount(t):e.stackCount,r="flex"===n.barThickness?function(t,e,i,s){const n=e.pixels,a=n[t];let o=t>0?n[t-1]:null,r=t<n.length-1?n[t+1]:null;const c=i.categoryPercentage;null===o&&(o=a-(null===r?e.end-e.start:r-a)),null===r&&(r=a+a-o);const l=a-(a-Math.min(o,r))/2*c;return{chunk:Math.abs(r-o)/2*c/s,ratio:i.barPercentage,start:l}}(t,e,n,s):function(t,e,s,n){const a=s.barThickness;let o,r;return i(a)?(o=e.min*s.categoryPercentage,r=s.barPercentage):(o=a*n,r=1),{chunk:o/n,ratio:r,start:e.pixels[t]-o/2}}(t,e,n,s),h=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);c=r.start+r.chunk*h+r.chunk/2,l=Math.min(o,r.chunk*r.ratio)}else c=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(o,e.min*e.ratio);return{base:c-l/2,head:c+l/2,center:c,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null!==this.getParsed(n)[e.axis]&&i[n].draw(this._ctx)}}Sn.id="bar",Sn.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Sn.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Pn extends Ps{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const n=super.parsePrimitiveData(t,e,i,s);for(let t=0;t<n.length;t++)n[t]._custom=this.resolveDataElementOptions(t+i).radius;return n}parseArrayData(t,e,i,s){const n=super.parseArrayData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=r(s[2],this.resolveDataElementOptions(t+i).radius)}return n}
vendor: 4,622 bytes, line 2
2parseObjectData(t,e,i,s){const n=super.parseObjectData(t,e,i,s);for(let t=0;t<n.length;t++){const s=e[i+t];n[t]._custom=r(s&&s.r&&+s.r,this.resolveDataElementOptions(t+i).radius)}return n}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),a=i.getLabelForValue(n.x),o=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+a+", "+o+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:a,vScale:o}=this._cachedMeta,{sharedOptions:r,includeOptions:c}=this._getSharedOptions(e,s),l=a.axis,h=o.axis;for(let d=e;d<e+i;d++){const e=t[d],i=!n&&this.getParsed(d),f={},u=f[l]=n?a.getPixelForDecimal(.5):a.getPixelForValue(i[l]),g=f[h]=n?o.getBasePixel():o.getPixelForValue(i[h]);f.skip=isNaN(u)||isNaN(g),c&&(f.options=r||this.resolveDataElementOptions(d,e.active?"active":s),n&&(f.options.radius=0)),this.updateElement(e,d,f,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const n=s.radius;return"active"!==e&&(s.radius=0),s.radius+=r(i&&i._custom,n),s}}Pn.id="bubble",Pn.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Pn.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Dn extends Ps{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let a,o,r=t=>+i[t];if(n(i[t])){const{key:t="value"}=this._parsing;r=e=>+y(i[e],t)}for(a=t,o=t+e;a<o;++a)s._parsed[a]=r(a)}}_getRotation(){return j(this.options.rotation-90)}_getCircumference(){return j(this.options.circumference)}_getRotationExtents(){let t=C,e=-C;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),a=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+a)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,n=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-a)/2,0),r=Math.min(c(this.options.cutout,o),1),h=this._getRingWeight(this.index),{circumference:d,rotation:f}=this._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:p,offsetY:b}=function(t,e,i){let s=1,n=1,a=0,o=0;if(e<C){const r=t,c=r+e,l=Math.cos(r),h=Math.sin(r),d=Math.cos(c),f=Math.sin(c),u=(t,e,s)=>K(t,r,c,!0)?1:Math.max(e,e*i,s,s*i),g=(t,e,s)=>K(t,r,c,!0)?-1:Math.min(e,e*i,s,s*i),p=u(0,l,d),b=u(L,h,f),m=g(D,l,d),x=g(D+L,h,f);s=(p-m)/2,n=(b-x)/2,a=-(p+m)/2,o=-(b+x)/2}return{ratioX:s,ratioY:n,offsetX:a,offsetY:o}}(f,d,r),m=(i.width-a)/u,x=(i.height-a)/g,_=Math.max(Math.min(m,x)/2,0),y=l(this.options.radius,_),v=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=b*y,s.total=this.calculateTotal(),this.outerRadius=y-v*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-v*h,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/C)}updateElements(t,e,i,s){const n="reset"===s,a=this.chart,o=a.chartArea,r=a.options.animation,c=(o.left+o.right)/2,l=(o.top+o.bottom)/2,h=n&&r.animateScale,d=h?0:this.innerRadius,f=h?0:this.outerRadius,{sharedOptions:u,includeOptions:g}=this._getSharedOptions(e,s);let p,b=this._getRotation();for(p=0;p<e;++p)b+=this._circumference(p,n);for(p=e;p<e+i;++p){const e=this._circumference(p,n),i=t[p],a={x:c+this.offsetX,y:l+this.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:d};g&&(a.options=u||this.resolveDataElementOptions(p,i.active?"active":s)),b+=e,this.updateElement(i,p,a,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?C*(Math.abs(t)/e):0}
vendor: 10,109 bytes, line 2
2getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ai(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,a,o,r;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){a=i.getDatasetMeta(s),t=a.data,o=a.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)r=o.resolveDataElementOptions(s),"inner"!==r.borderAlign&&(e=Math.max(e,r.borderWidth||0,r.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(r(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Dn.id="doughnut",Dn.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"},Dn.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},Dn.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return s(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Cn extends Ps{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,a=this.chart._animationsDisabled;let{start:o,count:r}=gt(e,s,a);this._drawStart=o,this._drawCount=r,pt(e)&&(o=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:c},t),this.updateElements(s,o,r,t)}updateElements(t,e,s,n){const a="reset"===n,{iScale:o,vScale:r,_stacked:c,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),f=o.axis,u=r.axis,{spanGaps:g,segment:p}=this.options,b=V(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||"none"===n;let x=e>0&&this.getParsed(e-1);for(let g=e;g<e+s;++g){const e=t[g],s=this.getParsed(g),_=m?e:{},y=i(s[u]),v=_[f]=o.getPixelForValue(s[f],g),M=_[u]=a||y?r.getBasePixel():r.getPixelForValue(c?this.applyStack(r,s,c):s[u],g);_.skip=isNaN(v)||isNaN(M)||y,_.stop=g>0&&Math.abs(s[f]-x[f])>b,p&&(_.parsed=s,_.raw=l.data[g]),d&&(_.options=h||this.resolveDataElementOptions(g,e.active?"active":n)),m||this.updateElement(e,g,_,n),x=s}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Cn.id="line",Cn.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Cn.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class On extends Ps{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=ai(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return je.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<e.min&&(e.min=s),s>e.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),a=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,s){const n="reset"===s,a=this.chart,o=a.options.animation,r=this._cachedMeta.rScale,c=r.xCenter,l=r.yCenter,h=r.getIndexAngle(0)-.5*D;let d,f=h;const u=360/this.countVisibleElements();for(d=0;d<e;++d)f+=this._computeAngle(d,s,u);for(d=e;d<e+i;d++){const e=t[d];let i=f,g=f+this._computeAngle(d,s,u),p=a.getDataVisibility(d)?r.getDistanceFromCenterForValue(this.getParsed(d).r):0;f=g,n&&(o.animateScale&&(p=0),o.animateRotate&&(i=g=h));const b={x:c,y:l,innerRadius:0,outerRadius:p,startAngle:i,endAngle:g,options:this.resolveDataElementOptions(d,e.active?"active":s)};this.updateElement(e,d,b,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach(((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?j(this.resolveDataElementOptions(t,e).angle||i):0}}On.id="polarArea",On.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},On.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class An extends Dn{}An.id="pie",An.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Tn extends Ps{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return je.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const a={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,a="reset"===s;for(let o=e;o<e+i;o++){const e=t[o],i=this.resolveDataElementOptions(o,e.active?"active":s),r=n.getPointPositionForValue(o,this.getParsed(o).r),c=a?n.xCenter:r.x,l=a?n.yCenter:r.y,h={x:c,y:l,angle:r.angle,skip:isNaN(c)||isNaN(l),options:i};this.updateElement(e,o,h,s)}}}Tn.id="radar",Tn.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Tn.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ln extends Ps{update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:n,count:a}=gt(e,i,s);if(this._drawStart=n,this._drawCount=a,pt(e)&&(n=0,a=i.length),this.options.showLine){const{dataset:n,_dataset:a}=e;n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const o=this.resolveDatasetElementOptions(t);o.segment=this.options.segment,this.updateElement(n,void 0,{animated:!s,options:o},t)}this.updateElements(i,n,a,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=Ns.getElement("line")),super.addElements()}updateElements(t,e,s,n){const a="reset"===n,{iScale:o,vScale:r,_stacked:c,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),d=this.getSharedOptions(h),f=this.includeOptions(n,d),u=o.axis,g=r.axis,{spanGaps:p,segment:b}=this.options,m=V(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||a||"none"===n;let _=e>0&&this.getParsed(e-1);for(let h=e;h<e+s;++h){const e=t[h],s=this.getParsed(h),p=x?e:{},y=i(s[g]),v=p[u]=o.getPixelForValue(s[u],h),M=p[g]=a||y?r.getBasePixel():r.getPixelForValue(c?this.applyStack(r,s,c):s[g],h);p.skip=isNaN(v)||isNaN(M)||y,p.stop=h>0&&Math.abs(s[u]-_[u])>m,b&&(p.parsed=s,p.raw=l.data[h]),f&&(p.options=d||this.resolveDataElementOptions(h,e.active?"active":n)),x||this.updateElement(e,h,p,n),_=s}this.updateSharedOptions(d,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,a)/2}}Ln.id="scatter",Ln.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Ln.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Rn=Object.freeze({__proto__:null,BarController:Sn,BubbleController:Pn,DoughnutController:Dn,LineController:Cn,PolarAreaController:On,PieController:An,RadarController:Tn,ScatterController:Ln});
2function En(t,e,i){const{startAngle:s,pixelMargin:n,x:a,y:o,outerRadius:r,innerRadius:c}=e;let l=n/r;t.beginPath(),t.arc(a,o,r,s-l,i+l),c>n?(l=n/c,t.arc(a,o,c,i+l,s-l,!0)):t.arc(a,o,n,i+L,s-L),t.closePath(),t.clip()}function In(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function zn(t,e,i,s,n,a){const{x:o,y:r,startAngle:c,pixelMargin:l,innerRadius:h}=e,d=Math.max(e.outerRadius+s+i-l,0),f=h>0?h+s+i+l:0;let u=0;const g=n-c;if(s){const t=((h>0?h-s:0)+(d>0?d-s:0))/2;u=(g-(0!==t?g*t/(t+s):g))/2}const p=(g-Math.max(.001,g*d-i/D)/d)/2,b=c+p+u,m=n-p-u,{outerStart:x,outerEnd:_,innerStart:y,innerEnd:v}=function(t,e,i,s){const n=li(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),a=(i-e)/2,o=Math.min(a,s*e/2),r=t=>{const e=(i-Math.min(a,t))*s/2;return Z(t,0,Math.min(a,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:Z(n.innerStart,0,o),innerEnd:Z(n.innerEnd,0,o)}}(e,f,d,m-b),M=d-x,w=d-_,k=b+x/M,S=m-_/w,P=f+y,C=f+v,O=b+y/P,A=m-v/C;if(t.beginPath(),a){if(t.arc(o,r,d,k,S),_>0){const e=In(w,S,o,r);t.arc(e.x,e.y,_,S,m+L)}const e=In(C,m,o,r);if(t.lineTo(e.x,e.y),v>0){const e=In(C,A,o,r);t.arc(e.x,e.y,v,m+L,A+Math.PI)}if(t.arc(o,r,f,m-v/f,b+y/f,!0),y>0){const e=In(P,O,o,r);t.arc(e.x,e.y,y,O+Math.PI,b-L)}const i=In(M,b,o,r);if(t.lineTo(i.x,i.y),x>0){const e=In(M,k,o,r);t.arc(e.x,e.y,x,b-L,k)}}else{t.moveTo(o,r);const e=Math.cos(k)*d+o,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(S)*d+o,n=Math.sin(S)*d+r;t.lineTo(s,n)}t.closePath()}class Fn extends Ds{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:a}=U(s,{x:t,y:e}),{startAngle:o,endAngle:c,innerRadius:l,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),f=this.options.spacing/2,u=r(d,c-o)>=C||K(n,o,c),g=Q(a,l+f,h+f);return u&&g}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:a,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:c}=this.options,l=(s+n)/2,h=(a+o+c+r)/2;return{x:e+Math.cos(l)*h,y:i+Math.sin(l)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2,a=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>C?Math.floor(i/C):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(s){o=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=D&&(o=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,s,n){const{fullCircles:a,startAngle:o,circumference:r}=e;let c=e.endAngle;if(a){zn(t,e,i,s,o+C,n);for(let e=0;e<a;++e)t.fill();isNaN(r)||(c=o+r%C,r%C==0&&(c+=C))}return zn(t,e,i,s,c,n),t.fill(),c}(t,this,o,n,a);(function(t,e,i,s,n,a){const{options:o}=e,{borderWidth:r,borderJoinStyle:c}=o,l="inner"===o.borderAlign;r&&(l?(t.lineWidth=2*r,t.lineJoin=c||"round"):(t.lineWidth=r,t.lineJoin=c||"bevel"),e.fullCircles&&function(t,e,i){const{x:s,y:n,startAngle:a,pixelMargin:o,fullCircles:r}=e,c=Math.max(e.outerRadius-o,0),l=e.innerRadius+o;let h;for(i&&En(t,e,a+C),t.beginPath(),t.arc(s,n,l,a+C,a,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(s,n,c,a,a+C),h=0;h<r;++h)t.stroke()}(t,e,l),l&&En(t,e,n),zn(t,e,i,s,n,a),t.stroke())})(t,this,o,n,r,a),t.restore()}}function Bn(t,e,i=e){t.lineCap=r(i.borderCapStyle,e.borderCapStyle),t.setLineDash(r(i.borderDash,e.borderDash)),t.lineDashOffset=r(i.borderDashOffset,e.borderDashOffset),t.lineJoin=r(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=r(i.borderWidth,e.borderWidth),t.strokeStyle=r(i.borderColor,e.borderColor)}function Vn(t,e,i){t.lineTo(i.x,i.y)}function Nn(t,e,i={}){const s=t.length,{start:n=0,end:a=s-1}=i,{start:o,end:r}=e,c=Math.max(n,o),l=Math.min(a,r),h=n<o&&a<o||n>r&&a>r;return{count:s,start:c,loop:e.loop,ilen:l<c&&!h?s+l-c:l-c}}function Wn(t,e,i,s){const{points:n,options:a}=e,{count:o,start:r,loop:c,ilen:l}=Nn(n,i,s),h=function(t){return t.stepped?Se:t.tension||"monotone"===t.cubicInterpolationMode?Pe:Vn}(a);let d,f,u,{move:g=!0,reverse:p}=s||{};for(d=0;d<=l;++d)f=n[(r+(p?l-d:d))%o],f.skip||(g?(t.moveTo(f.x,f.y),g=!1):h(t,u,f,p,a.stepped),u=f);return c&&(f=n[(r+(p?l:0))%o],h(t,u,f,p,a.stepped)),!!c}function Hn(t,e,i,s){const n=e.points,{count:a,start:o,ilen:r}=Nn(n,i,s),{move:c=!0,reverse:l}=s||{};let h,d,f,u,g,p,b=0,m=0;const x=t=>(o+(l?r-t:t))%a,_=()=>{u!==g&&(t.lineTo(b,g),t.lineTo(b,u),t.lineTo(b,p))};for(c&&(d=n[x(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=n[x(h)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===f?(i<u?u=i:i>g&&(g=i),b=(m*b+e)/++m):(_(),t.lineTo(e,i),f=s,m=0,u=g=i),p=i}_()}function jn(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Wn:Hn}
vendor: 9,095 bytes, line 2
2Fn.id="arc",Fn.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},Fn.defaultRoutes={backgroundColor:"backgroundColor"};const $n="function"==typeof Path2D;class Yn extends Ds{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ke(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ki(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],n=this.points,a=wi(this,{property:e,start:s,end:s});if(!a.length)return;const o=[],r=function(t){return t.stepped?ii:t.tension||"monotone"===t.cubicInterpolationMode?si:ei}(i);let c,l;for(c=0,l=a.length;c<l;++c){const{start:l,end:h}=a[c],d=n[l],f=n[h];if(d===f){o.push(d);continue}const u=r(d,f,Math.abs((s-d[e])/(f[e]-d[e])),i.stepped);u[e]=t[e],o.push(u)}return 1===o.length?o[0]:o}pathSegment(t,e,i){return jn(this)(t,this,e,i)}path(t,e,i){const s=this.segments,n=jn(this);let a=this._loop;e=e||0,i=i||this.points.length-e;for(const o of s)a&=n(t,this,o,{start:e,end:e+i-1});return!!a}draw(t,e,i,s){const n=this.options||{};(this.points||[]).length&&n.borderWidth&&(t.save(),function(t,e,i,s){$n&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),Bn(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:a}=e,o=jn(e);for(const r of n)Bn(t,a,r.style),t.beginPath(),o(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Un(t,e,i,s){const n=t.options,{[i]:a}=t.getProps([i],s);return Math.abs(e-a)<n.radius+n.hitRadius}Yn.id="line",Yn.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Yn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Yn.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class qn extends Ds{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:a}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(t,e){return Un(this,t,"x",e)}inYRange(t,e){return Un(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Me(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,ye(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Xn(t,e){const{x:i,y:s,base:n,width:a,height:o}=t.getProps(["x","y","base","width","height"],e);let r,c,l,h,d;return t.horizontal?(d=o/2,r=Math.min(i,n),c=Math.max(i,n),l=s-d,h=s+d):(d=a/2,r=i-d,c=i+d,l=Math.min(s,n),h=Math.max(s,n)),{left:r,top:l,right:c,bottom:h}}function Gn(t,e,i,s){return t?0:Z(e,i,s)}function Kn(t){const e=Xn(t),i=e.right-e.left,s=e.bottom-e.top,a=function(t,e,i){const s=t.options.borderWidth,n=t.borderSkipped,a=hi(s);return{t:Gn(n.top,a.top,0,i),r:Gn(n.right,a.right,0,e),b:Gn(n.bottom,a.bottom,0,i),l:Gn(n.left,a.left,0,e)}}(t,i/2,s/2),o=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),a=t.options.borderRadius,o=di(a),r=Math.min(e,i),c=t.borderSkipped,l=s||n(a);return{topLeft:Gn(!l||c.top||c.left,o.topLeft,0,r),topRight:Gn(!l||c.top||c.right,o.topRight,0,r),bottomLeft:Gn(!l||c.bottom||c.left,o.bottomLeft,0,r),bottomRight:Gn(!l||c.bottom||c.right,o.bottomRight,0,r)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:o},inner:{x:e.left+a.l,y:e.top+a.t,w:i-a.l-a.r,h:s-a.t-a.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,o.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(a.b,a.r))}}}}function Zn(t,e,i,s){const n=null===e,a=null===i,o=t&&!(n&&a)&&Xn(t,s);return o&&(n||Q(e,o.left,o.right))&&(a||Q(i,o.top,o.bottom))}function Jn(t,e){t.rect(e.x,e.y,e.w,e.h)}function Qn(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0,a=(t.x+t.w!==i.x+i.w?e:0)-s,o=(t.y+t.h!==i.y+i.h?e:0)-n;return{x:t.x+s,y:t.y+n,w:t.w+a,h:t.h+o,radius:t.radius}}qn.id="point",qn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},qn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class ta extends Ds{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:n,outer:a}=Kn(this),o=(r=a.radius).topLeft||r.topRight||r.bottomLeft||r.bottomRight?Oe:Jn;var r;t.save(),a.w===n.w&&a.h===n.h||(t.beginPath(),o(t,Qn(a,e,n)),t.clip(),o(t,Qn(n,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Qn(n,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Zn(this,t,e,i)}inXRange(t,e){return Zn(this,t,null,e)}inYRange(t,e){return Zn(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}ta.id="bar",ta.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},ta.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var ea=Object.freeze({__proto__:null,ArcElement:Fn,LineElement:Yn,PointElement:qn,BarElement:ta});function ia(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function sa(t){t.data.datasets.forEach((t=>{ia(t)}))}var na={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,s)=>{if(!s.enabled)return void sa(t);const n=t.width;t.data.datasets.forEach(((e,a)=>{const{_data:o,indexAxis:r}=e,c=t.getDatasetMeta(a),l=o||e.data;if("y"===gi([r,t.options.indexAxis]))return;if(!c.controller.supportsDecimation)return;const h=t.scales[c.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let d,{start:f,count:u}=function(t,e){const i=e.length;let s,n=0;const{iScale:a}=t,{min:o,max:r,minDefined:c,maxDefined:l}=a.getUserBounds();return c&&(n=Z(et(e,a.axis,o).lo,0,i-1)),s=l?Z(et(e,a.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(c,l);if(u<=(s.threshold||4*n))ia(e);else{switch(i(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),s.algorithm){case"lttb":d=function(t,e,i,s,n){const a=n.samples||s;if(a>=i)return t.slice(e,e+i);const o=[],r=(i-2)/(a-2);let c=0;const l=e+i-1;let h,d,f,u,g,p=e;for(o[c++]=t[p],h=0;h<a-2;h++){let s,n=0,a=0;const l=Math.floor((h+1)*r)+1+e,b=Math.min(Math.floor((h+2)*r)+1,i)+e,m=b-l;for(s=l;s<b;s++)n+=t[s].x,a+=t[s].y;n/=m,a/=m;const x=Math.floor(h*r)+1+e,_=Math.min(Math.floor((h+1)*r)+1,i)+e,{x:y,y:v}=t[p];for(f=u=-1,s=x;s<_;s++)u=.5*Math.abs((y-n)*(t[s].y-v)-(y-t[s].x)*(a-v)),u>f&&(f=u,d=t[s],g=s);o[c++]=d,p=g}return o[c++]=t[l],o}(l,f,u,n,s);break;case"min-max":d=function(t,e,s,n){let a,o,r,c,l,h,d,f,u,g,p=0,b=0;const m=[],x=e+s-1,_=t[e].x,y=t[x].x-_;for(a=e;a<e+s;++a){o=t[a],r=(o.x-_)/y*n,c=o.y;const e=0|r;if(e===l)c<u?(u=c,h=a):c>g&&(g=c,d=a),p=(b*p+o.x)/++b;else{const s=a-1;if(!i(h)&&!i(d)){const e=Math.min(h,d),i=Math.max(h,d);e!==f&&e!==s&&m.push({...t[e],x:p}),i!==f&&i!==s&&m.push({...t[i],x:p})}a>0&&s!==f&&m.push(t[s]),m.push(o),l=e,b=0,u=g=c,h=d=f=a}}return m}(l,f,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${s.algorithm}'`)}e._decimated=d}}))},destroy(t){sa(t)}};function aa(t,e,i,s){if(s)return;let n=e[t],a=i[t];return"angle"===t&&(n=G(n),a=G(a)),{property:t,start:n,end:a}}function oa(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function ra(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function ca(t,e){let i=[],n=!1;return s(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,a=[];
vendor: 1,077 bytes, line 2
2return e.segments.forEach((({start:t,end:e})=>{e=oa(t,e,n);const o=n[t],r=n[e];null!==s?(a.push({x:o.x,y:s}),a.push({x:r.x,y:s})):null!==i&&(a.push({x:i,y:o.y}),a.push({x:i,y:r.y}))})),a}(t,e),i.length?new Yn({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function la(t){return t&&!1!==t.fill}function ha(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!a(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function da(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=r(i&&i.target,i);return void 0===s&&(s=!!e.backgroundColor),!1!==s&&null!==s&&(!0===s?"origin":s)}(t);if(n(s))return!isNaN(s.value)&&s;let o=parseFloat(s);return a(o)&&Math.floor(o)===o?function(t,e,i,s){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=s)&&i}(s[0],e,o,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function fa(t,e,i){const s=[];for(let n=0;n<i.length;n++){const a=i[n],{first:o,last:r,point:c}=ua(a,e,"x");if(!(!c||o&&r))if(o)s.unshift(c);else if(t.push(c),!r)break}t.push(...s)}
vendor: 4,164 bytes, line 2
2function ua(t,e,i){const s=t.interpolate(e,i);if(!s)return{};const n=s[i],a=t.segments,o=t.points;let r=!1,c=!1;for(let t=0;t<a.length;t++){const e=a[t],s=o[e.start][i],l=o[e.end][i];if(Q(n,s,l)){r=n===s,c=n===l;break}}return{first:r,last:c,point:s}}class ga{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:n,radius:a}=this;return e=e||{start:0,end:C},t.arc(s,n,a,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,n=t.angle;return{x:e+Math.cos(n)*s,y:i+Math.sin(n)*s,angle:n}}}function pa(t){const{chart:e,fill:i,line:s}=t;if(a(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:s}=t,n=[],a=s.segments,o=s.points,r=function(t,e){const i=[],s=t.getMatchingVisibleMetas("line");for(let t=0;t<s.length;t++){const n=s[t];if(n.index===e)break;n.hidden||i.unshift(n.dataset)}return i}(e,i);r.push(ca({x:null,y:e.bottom},s));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)fa(n,o[t],r)}return new Yn({points:n,options:{}})}(t);if("shape"===i)return!0;const o=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,s=e.options,a=e.getLabels().length,o=s.reverse?e.max:e.min,r=function(t,e,i){let s;return s="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:n(t)?t.value:e.getBaseValue(),s}(i,e,o),c=[];if(s.grid.circular){const t=e.getPointPositionForValue(0,o);return new ga({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<a;++t)c.push(e.getPointPositionForValue(t,r));return c}(t):function(t){const{scale:e={},fill:i}=t,s=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:n(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(a(s)){const t=e.isHorizontal();return{x:t?s:null,y:t?null:s}}return null}(t)}(t);return o instanceof ga?o:ca(o,s)}function ba(t,e,i){const s=pa(e),{line:n,scale:a,axis:o}=e,r=n.options,c=r.fill,l=r.backgroundColor,{above:h=l,below:d=l}=c||{};s&&n.points.length&&(we(t,i),function(t,e){const{line:i,target:s,above:n,below:a,area:o,scale:r}=e,c=i._loop?"angle":e.axis;t.save(),"x"===c&&a!==n&&(ma(t,s,o.top),xa(t,{line:i,target:s,color:n,scale:r,property:c}),t.restore(),t.save(),ma(t,s,o.bottom)),xa(t,{line:i,target:s,color:a,scale:r,property:c}),t.restore()}(t,{line:n,target:s,above:h,below:d,area:i,scale:a,axis:o}),ke(t))}function ma(t,e,i){const{segments:s,points:n}=e;let a=!0,o=!1;t.beginPath();for(const r of s){const{start:s,end:c}=r,l=n[s],h=n[oa(s,c,n)];a?(t.moveTo(l.x,l.y),a=!1):(t.lineTo(l.x,i),t.lineTo(l.x,l.y)),o=!!e.pathSegment(t,r,{move:o}),o?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function xa(t,e){const{line:i,target:s,property:n,color:a,scale:o}=e,r=function(t,e,i){const s=t.segments,n=t.points,a=e.points,o=[];for(const t of s){let{start:s,end:r}=t;r=oa(s,r,n);const c=aa(i,n[s],n[r],t.loop);if(!e.segments){o.push({source:t,target:c,start:n[s],end:n[r]});continue}const l=wi(e,c);for(const e of l){const s=aa(i,a[e.start],a[e.end],e.loop),r=Mi(t,n,s);for(const t of r)o.push({source:t,target:e,start:{[i]:ra(c,s,"start",Math.max)},end:{[i]:ra(c,s,"end",Math.min)}})}}return o}(i,s,n);for(const{source:e,target:c,start:l,end:h}of r){const{style:{backgroundColor:r=a}={}}=e,d=!0!==s;t.save(),t.fillStyle=r,_a(t,o,d&&aa(n,l,h)),t.beginPath();const f=!!i.pathSegment(t,e);let u;if(d){f?t.closePath():ya(t,s,h,n);const e=!!s.pathSegment(t,c,{move:f,reverse:!0});u=f&&e,u||ya(t,s,l,n)}t.closePath(),t.fill(u?"evenodd":"nonzero"),t.restore()}}function _a(t,e,i){const{top:s,bottom:n}=e.chart.chartArea,{property:a,start:o,end:r}=i||{};"x"===a&&(t.beginPath(),t.rect(o,s,r-o,n-s),t.clip())}function ya(t,e,i,s){const n=e.interpolate(i,s);n&&t.lineTo(n.x,n.y)}var va={id:"filler",afterDatasetsUpdate(t,e,i){const s=(t.data.datasets||[]).length,n=[];let a,o,r,c;for(o=0;o<s;++o)a=t.getDatasetMeta(o),r=a.dataset,c=null,r&&r.options&&r instanceof Yn&&(c={visible:t.isDatasetVisible(o),index:o,fill:da(r,o,s),chart:t,axis:a.controller.options.indexAxis,scale:a.vScale,line:r}
vendor: 4,565 bytes, line 2
2),a.$filler=c,n.push(c);for(o=0;o<s;++o)c=n[o],c&&!1!==c.fill&&(c.fill=ha(n,o,i.propagate))},beforeDraw(t,e,i){const s="beforeDraw"===i.drawTime,n=t.getSortedVisibleDatasetMetas(),a=t.chartArea;for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&(i.line.updateControlPoints(a,i.axis),s&&i.fill&&ba(t.ctx,i,a))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;la(i)&&ba(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;la(s)&&"beforeDatasetDraw"===i.drawTime&&ba(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ma=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class wa extends Ds{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=h(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=ui(i.font),n=s.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:r}=Ma(i,n);let c,l;e.font=s.string,this.isHorizontal()?(c=this.maxWidth,l=this._fitRows(a,n,o,r)+10):(l=this.maxHeight,c=this._fitCols(a,n,o,r)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(l,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],c=this.lineWidths=[0],l=s+o;let h=t;n.textAlign="left",n.textBaseline="middle";let d=-1,f=-l;return this.legendItems.forEach(((t,u)=>{const g=i+e/2+n.measureText(t.text).width;(0===u||c[c.length-1]+g+2*o>a)&&(h+=l,c[c.length-(u>0?0:1)]=0,f+=l,d++),r[u]={left:0,top:f,row:d,width:g,height:s},c[c.length-1]+=g+o})),h}_fitCols(t,e,i,s){const{ctx:n,maxHeight:a,options:{labels:{padding:o}}}=this,r=this.legendHitBoxes=[],c=this.columnSizes=[],l=a-t;let h=o,d=0,f=0,u=0,g=0;return this.legendItems.forEach(((t,a)=>{const p=i+e/2+n.measureText(t.text).width;a>0&&f+s+2*o>l&&(h+=d+o,c.push({width:d,height:f}),u+=d+o,g++,d=f=0),r[a]={left:u,top:f,col:g,width:p,height:s},d=Math.max(d,p),f+=s+o})),h+=d,c.push({width:d,height:f}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,a=mi(n,this.left,this.width);if(this.isHorizontal()){let n=0,o=ft(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,o=ft(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=a.leftForLtr(a.x(o),r.width),o+=r.width+s}else{let n=0,o=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,o=ft(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=o,r.left+=this.left+s,r.left=a.leftForLtr(a.x(r.left),r.width),o+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;we(t,this),this._draw(),ke(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:a}=t,o=ee.color,c=mi(t.rtl,this.left,this.width),l=ui(a.font),{color:h,padding:d}=a,f=l.size,u=f/2;let g;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:p,boxHeight:b,itemHeight:m}=Ma(a,f),x=this.isHorizontal(),_=this._computeTitleHeight();g=x?{x:ft(n,this.left+d,this.right-i[0]),y:this.top+d+_,line:0}:{x:this.left+d,y:ft(n,this.top+_+d,this.bottom-e[0].height),line:0},xi(this.ctx,t.textDirection);const y=m+d;
vendor: 4,136 bytes, line 2
2this.legendItems.forEach(((v,M)=>{s.strokeStyle=v.fontColor||h,s.fillStyle=v.fontColor||h;const w=s.measureText(v.text).width,k=c.textAlign(v.textAlign||(v.textAlign=a.textAlign)),S=p+u+w;let P=g.x,D=g.y;c.setWidth(this.width),x?M>0&&P+S+d>this.right&&(D=g.y+=y,g.line++,P=g.x=ft(n,this.left+d,this.right-i[g.line])):M>0&&D+y>this.bottom&&(P=g.x=P+e[g.line].width+d,g.line++,D=g.y=ft(n,this.top+_+d,this.bottom-e[g.line].height)),function(t,e,i){if(isNaN(p)||p<=0||isNaN(b)||b<0)return;s.save();const n=r(i.lineWidth,1);if(s.fillStyle=r(i.fillStyle,o),s.lineCap=r(i.lineCap,"butt"),s.lineDashOffset=r(i.lineDashOffset,0),s.lineJoin=r(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=r(i.strokeStyle,o),s.setLineDash(r(i.lineDash,[])),a.usePointStyle){const o={radius:b*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},r=c.xPlus(t,p/2);ve(s,o,r,e+u,a.pointStyleWidth&&p)}else{const a=e+Math.max((f-b)/2,0),o=c.leftForLtr(t,p),r=di(i.borderRadius);s.beginPath(),Object.values(r).some((t=>0!==t))?Oe(s,{x:o,y:a,w:p,h:b,radius:r}):s.rect(o,a,p,b),s.fill(),0!==n&&s.stroke()}s.restore()}(c.x(P),D,v),P=ut(k,P+p+u,x?P+S:this.right,t.rtl),function(t,e,i){De(s,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:c.textAlign(i.textAlign)})}(c.x(P),D,v),x?g.x+=S+d:g.y+=y})),_i(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ui(e.font),s=fi(e.padding);if(!e.display)return;const n=mi(t.rtl,this.left,this.width),a=this.ctx,o=e.position,r=i.size/2,c=s.top+r;let l,h=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),l=this.top+c,h=ft(t.align,h,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);l=c+ft(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const f=ft(o,h,h+d);a.textAlign=n.textAlign(dt(o)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,De(a,e.text,f,l,i)}_computeTitleHeight(){const t=this.options.title,e=ui(t.font),i=fi(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Q(t,this.left,this.right)&&Q(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(s=n[i],Q(t,s.left,s.left+s.width)&&Q(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const a=this._hoveredItem,o=(n=i,null!==(s=a)&&null!==n&&s.datasetIndex===n.datasetIndex&&s.index===n.index);a&&!o&&h(e.onLeave,[t,a,this],this),this._hoveredItem=i,i&&!o&&h(e.onHover,[t,i,this],this)}else i&&h(e.onClick,[t,i,this],this);var s,n}}var ka={id:"legend",_element:wa,start(t,e,i){const s=t.legend=new wa({ctx:t.ctx,options:i,chart:t});Yi.configure(t,s,i),Yi.addBox(t,s)},stop(t){Yi.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;Yi.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),e.hidden=!0):(n.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:a}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const o=t.controller.getStyle(i?0:void 0),r=fi(o.borderWidth);return{text:e[t.index].label,fillStyle:o.backgroundColor,fontColor:a,hidden:!t.visible,lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:o.borderColor,pointStyle:s||o.pointStyle,rotation:o.rotation,textAlign:n||o.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}}
vendor: 4,084 bytes, line 2
2,descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Sa extends Ds{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=s(i.text)?i.text.length:1;this._padding=fi(i.padding);const a=n*ui(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:a}=this,o=a.align;let r,c,l,h=0;return this.isHorizontal()?(c=ft(o,i,n),l=e+t,r=n-i):("left"===a.position?(c=i+t,l=ft(o,s,e),h=-.5*D):(c=n-t,l=ft(o,e,s),h=.5*D),r=s-e),{titleX:c,titleY:l,maxWidth:r,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ui(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:a,maxWidth:o,rotation:r}=this._drawArgs(s);De(t,e.text,0,0,i,{color:e.color,maxWidth:o,rotation:r,textAlign:dt(e.align),textBaseline:"middle",translation:[n,a]})}}var Pa={id:"title",_element:Sa,start(t,e,i){!function(t,e){const i=new Sa({ctx:t.ctx,options:e,chart:t});Yi.configure(t,i,e),Yi.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Yi.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;Yi.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Da=new WeakMap;var Ca={id:"subtitle",start(t,e,i){const s=new Sa({ctx:t.ctx,options:i,chart:t});Yi.configure(t,s,i),Yi.addBox(t,s),Da.set(t,s)},stop(t){Yi.removeBox(t,Da.get(t)),Da.delete(t)},beforeUpdate(t,e,i){const s=Da.get(t);Yi.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Oa={average(t){if(!t.length)return!1;let e,i,s=0,n=0,a=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s+=t.x,n+=t.y,++a}}return{x:s/a,y:n/a}},nearest(t,e){if(!t.length)return!1;let i,s,n,a=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=q(e,s.getCenterPoint());t<r&&(r=t,n=s)}}if(n){const t=n.tooltipPosition();a=t.x,o=t.y}return{x:a,y:o}}};function Aa(t,e){return e&&(s(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ta(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function La(t,e){const{element:i,datasetIndex:s,index:n}=e,a=t.getDatasetMeta(s).controller,{label:o,value:r}=a.getLabelAndValue(n);return{chart:t,label:o,parsed:a.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:a.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ra(t,e){const i=t.chart.ctx,{body:s,footer:n,title:a}=t,{boxWidth:o,boxHeight:r}=e,c=ui(e.bodyFont),l=ui(e.titleFont),h=ui(e.footerFont),f=a.length,u=n.length,g=s.length,p=fi(e.padding);let b=p.height,m=0,x=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);x+=t.beforeBody.length+t.afterBody.length,f&&(b+=f*l.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),x&&(b+=g*(e.displayColors?Math.max(r,c.lineHeight):c.lineHeight)+(x-g)*c.lineHeight+(x-1)*e.bodySpacing),u&&(b+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let _=0;const y=function(t){m=Math.max(m,i.measureText(t).width+_)};return i.save(),i.font=l.string,d(t.title,y),i.font=c.string,d(t.beforeBody.concat(t.afterBody),y),_=e.displayColors?o+2+e.boxPadding:0,d(s,(t=>{d(t.before,y),d(t.lines,y),d(t.after,y)}
vendor: 4,351 bytes, line 2
2)),_=0,i.font=h.string,d(t.footer,y),i.restore(),m+=p.width,{width:m,height:b}}function Ea(t,e,i,s){const{x:n,width:a}=i,{width:o,chartArea:{left:r,right:c}}=t;let l="center";return"center"===s?l=n<=(r+c)/2?"left":"right":n<=a/2?l="left":n>=o-a/2&&(l="right"),function(t,e,i,s){const{x:n,width:a}=s,o=i.caretSize+i.caretPadding;return"left"===t&&n+a+o>e.width||"right"===t&&n-a-o<0||void 0}(l,t,e,i)&&(l="center"),l}function Ia(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Ea(t,e,i,s),yAlign:s}}function za(t,e,i,s){const{caretSize:n,caretPadding:a,cornerRadius:o}=t,{xAlign:r,yAlign:c}=i,l=n+a,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=di(o);let g=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const p=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,c,l);return"center"===c?"left"===r?g+=l:"right"===r&&(g-=l):"left"===r?g-=Math.max(h,f)+n:"right"===r&&(g+=Math.max(d,u)+n),{x:Z(g,0,s.width-e.width),y:Z(p,0,s.height-e.height)}}function Fa(t,e,i){const s=fi(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function Ba(t){return Aa([],Ta(t))}function Va(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Na extends Ds{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new gs(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=bi(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),a=i.afterTitle.apply(this,[t]);let o=[];return o=Aa(o,Ta(s)),o=Aa(o,Ta(n)),o=Aa(o,Ta(a)),o}getBeforeBody(t,e){return Ba(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return d(t,(t=>{const e={before:[],lines:[],after:[]},n=Va(i,t);Aa(e.before,Ta(n.beforeLabel.call(this,t))),Aa(e.lines,n.label.call(this,t)),Aa(e.after,Ta(n.afterLabel.call(this,t))),s.push(e)})),s}getAfterBody(t,e){return Ba(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),a=i.afterFooter.apply(this,[t]);let o=[];return o=Aa(o,Ta(s)),o=Aa(o,Ta(n)),o=Aa(o,Ta(a)),o}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],a=[];let o,r,c=[];for(o=0,r=e.length;o<r;++o)c.push(La(this.chart,e[o]));return t.filter&&(c=c.filter(((e,s,n)=>t.filter(e,s,n,i)))),t.itemSort&&(c=c.sort(((e,s)=>t.itemSort(e,s,i)))),d(c,(e=>{const i=Va(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),a.push(i.labelTextColor.call(this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=a,this.dataPoints=c,c}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,a=[];if(s.length){const t=Oa[i.position].call(this,s,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const e=this._size=Ra(this,i),o=Object.assign({},t,e),r=Ia(this.chart,i,o),c=za(i,o,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0}
vendor: 9,268 bytes, line 2
2);this._tooltipItems=a,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:a,cornerRadius:o}=i,{topLeft:r,topRight:c,bottomLeft:l,bottomRight:h}=di(o),{x:d,y:f}=t,{width:u,height:g}=e;let p,b,m,x,_,y;return"center"===n?(_=f+g/2,"left"===s?(p=d,b=p-a,x=_+a,y=_-a):(p=d+u,b=p+a,x=_-a,y=_+a),m=p):(b="left"===s?d+Math.max(r,l)+a:"right"===s?d+u-Math.max(c,h)-a:this.caretX,"top"===n?(x=f,_=x-a,p=b-a,m=b+a):(x=f+g,_=x+a,p=b+a,m=b-a),y=x),{x1:p,x2:b,x3:m,y1:x,y2:_,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let a,o,r;if(n){const c=mi(i.rtl,this.x,this.width);for(t.x=Fa(this,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=ui(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,r=0;r<n;++r)e.fillText(s[r],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,r+1===n&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,s,a){const o=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:c,boxWidth:l,boxPadding:h}=a,d=ui(a.bodyFont),f=Fa(this,"left",a),u=s.x(f),g=c<d.lineHeight?(d.lineHeight-c)/2:0,p=e.y+g;if(a.usePointStyle){const e={radius:Math.min(l,c)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=s.leftForLtr(u,l)+l/2,n=p+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,ye(t,e,i,n),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,ye(t,e,i,n)}else{t.lineWidth=n(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=s.leftForLtr(u,l-h),i=s.leftForLtr(s.xPlus(u,1),l-h-2),r=di(o.borderRadius);Object.values(r).some((t=>0!==t))?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Oe(t,{x:e,y:p,w:l,h:c,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Oe(t,{x:i,y:p+1,w:l-2,h:c-2,radius:r}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(e,p,l,c),t.strokeRect(e,p,l,c),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:a,displayColors:o,boxHeight:r,boxWidth:c,boxPadding:l}=i,h=ui(i.bodyFont);let f=h.lineHeight,u=0;const g=mi(i.rtl,this.x,this.width),p=function(i){e.fillText(i,g.x(t.x+u),t.y+f/2),t.y+=f+n},b=g.textAlign(a);let m,x,_,y,v,M,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=Fa(this,b,i),e.fillStyle=i.bodyColor,d(this.beforeBody,p),u=o&&"right"!==b?"center"===a?c/2+l:c+2+l:0,y=0,M=s.length;y<M;++y){for(m=s[y],x=this.labelTextColors[y],e.fillStyle=x,d(m.before,p),_=m.lines,o&&_.length&&(this._drawColorBox(e,t,y,g,i),f=Math.max(h.lineHeight,r)),v=0,w=_.length;v<w;++v)p(_[v]),f=h.lineHeight;d(m.after,p)}u=0,f=h.lineHeight,d(this.afterBody,p),t.y-=n}drawFooter(t,e,i){const s=this.footer,n=s.length;let a,o;if(n){const r=mi(i.rtl,this.x,this.width);for(t.x=Fa(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=r.textAlign(i.footerAlign),e.textBaseline="middle",a=ui(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,o=0;o<n;++o)e.fillText(s[o],r.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:n,yAlign:a}=this,{x:o,y:r}=t,{width:c,height:l}=i,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:u}=di(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(o+h,r),"top"===a&&this.drawCaret(t,e,i,s),e.lineTo(o+c-d,r),e.quadraticCurveTo(o+c,r,o+c,r+d),"center"===a&&"right"===n&&this.drawCaret(t,e,i,s),e.lineTo(o+c,r+l-u),e.quadraticCurveTo(o+c,r+l,o+c-u,r+l),"bottom"===a&&this.drawCaret(t,e,i,s),e.lineTo(o+f,r+l),e.quadraticCurveTo(o,r+l,o,r+l-f),"center"===a&&"left"===n&&this.drawCaret(t,e,i,s),e.lineTo(o,r+h),e.quadraticCurveTo(o,r,o+h,r),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=Oa[t.position].call(this,this._active,this._eventPosition);if(!i)return;const a=this._size=Ra(this,t),o=Object.assign({},i,this._size),r=Ia(e,t,o),c=za(t,o,r,e);s._to===c.x&&n._to===c.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=a.width,this.height=a.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=fi(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=i,this.drawBackground(n,t,s,e),xi(t,e.textDirection),n.y+=a.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),_i(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!f(i,s),a=this._positionChanged(s,e);(n||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],a=this._getActiveElements(t,n,e,i),o=this._positionChanged(a,t),r=e||!f(a,n)||o;return r&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const a=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&a.reverse(),a}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,a=Oa[n.position].call(this,t,e);return!1!==a&&(i!==a.x||s!==a.y)}}Na.positioners=Oa;var Wa={id:"tooltip",_element:Na,positioners:Oa,afterInit(t,e,i){i&&(t.tooltip=new Na({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:t,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:t,beforeBody:t,beforeLabel:t,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const s=t.formattedValue;return i(s)||(e+=s),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:t,afterBody:t,beforeFooter:t,footer:t,afterFooter:t}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Ha=Object.freeze({__proto__:null,Decimation:na,Filler:va,Legend:ka,SubTitle:Ca,Title:Pa,Tooltip:Wa});class ja extends Bs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(i(t))return null;const s=this.getLabels();return((t,e)=>null===t?null:Z(Math.round(t),0,e))(e=isFinite(e)&&s[e]===t?e:function(t,e,
vendor: 7,531 bytes, line 2
2i,s){const n=t.indexOf(e);return-1===n?((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s):n!==t.lastIndexOf(e)?i:n}(s,t,r(e,t),this._addedLabels),s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function $a(t,e,{horizontal:i,minRotation:s}){const n=j(s),a=(i?Math.sin(n):Math.cos(n))||.001,o=.75*e*(""+t).length;return Math.min(e/a,o)}ja.id="category",ja.defaults={ticks:{callback:ja.prototype.getLabelForValue}};class Ya extends Bs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return i(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const a=t=>s=e?s:t,o=t=>n=i?n:t;if(t){const t=z(s),e=z(n);t<0&&e<0?o(0):t>0&&e>0&&a(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),o(n+e),t||a(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n=function(t,e){const s=[],{bounds:n,step:a,min:o,max:r,precision:c,count:l,maxTicks:h,maxDigits:d,includeBounds:f}=t,u=a||1,g=h-1,{min:p,max:b}=e,m=!i(o),x=!i(r),_=!i(l),y=(b-p)/(d+1);let v,M,w,k,S=F((b-p)/g/u)*u;if(S<1e-14&&!m&&!x)return[{value:p},{value:b}];k=Math.ceil(b/S)-Math.floor(p/S),k>g&&(S=F(k*S/g/u)*u),i(c)||(v=Math.pow(10,c),S=Math.ceil(S*v)/v),"ticks"===n?(M=Math.floor(p/S)*S,w=Math.ceil(b/S)*S):(M=p,w=b),m&&x&&a&&W((r-o)/a,S/1e3)?(k=Math.round(Math.min((r-o)/S,h)),S=(r-o)/k,M=o,w=r):_?(M=m?o:M,w=x?r:w,k=l-1,S=(w-M)/k):(k=(w-M)/S,k=N(k,Math.round(k),S/1e3)?Math.round(k):Math.ceil(k));const P=Math.max(Y(S),Y(M));v=Math.pow(10,i(c)?P:c),M=Math.round(M*v)/v,w=Math.round(w*v)/v;let D=0;for(m&&(f&&M!==o?(s.push({value:o}),M<o&&D++,N(Math.round((M+D*S)*v)/v,o,$a(o,y,t))&&D++):M<o&&D++);D<k;++D)s.push({value:Math.round((M+D*S)*v)/v});return x&&f&&w!==r?s.length&&N(s[s.length-1].value,r,$a(r,y,t))?s[s.length-1].value=r:s.push({value:r}):x&&w!==r||s.push({value:w}),s}({maxTicks:s,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&&H(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return ai(t,this.chart.options.locale,this.options.ticks.format)}}class Ua extends Ya{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?t:0,this.max=a(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=j(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function qa(t){return 1==t/Math.pow(10,Math.floor(I(t)))}Ua.id="linear",Ua.defaults={ticks:{callback:Os.formatters.numeric}};class Xa extends Bs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Ya.prototype.parse.apply(this,[t,e]);if(0!==i)return a(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=a(t)?Math.max(0,t):null,this.max=a(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,a=t=>s=e?s:t,o=(t,e)=>Math.pow(10,Math.floor(I(t))+e);i===s&&(i<=0?(n(1),a(10)):(n(o(i,-1)),a(o(s,1)))),i<=0&&n(o(s,-1)),s<=0&&a(o(i,1)),this._zero&&this.min!==this._suggestedMin&&i===o(this.min,0)&&n(o(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(I(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let a=o(t.min,Math.pow(10,Math.floor(I(e.min)))),r=Math.floor(I(a)),c=Math.floor(a/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;do{n.push({value:a,major:qa(a)}),++c,10===c&&(c=1,++r,l=r>=0?1:l),a=Math.round(c*Math.pow(10,r)*l)/l}while(r<i||r===i&&c<s);const h=o(t.max,a);return n.push({value:h,major:qa(a)}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&H(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":ai(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=I(t),this._valueRange=I(this.max)-I(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(I(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ga(t){const e=t.ticks;if(e.display&&t.display){const t=fi(e.backdropPadding);return r(e.font&&e.font.size,ee.font.size)+t.height}return 0}function Ka(t,e,i,s,n){return t===s||t===n?{start:e-i/2,end:e+i/2}:t<s||t>n?{start:e-i,end:e}:{start:e,end:e+i}}function Za(t,e,i,s,n){const a=Math.abs(Math.sin(i)),o=Math.abs(Math.cos(i));let r=0,c=0;s.start<e.l?(r=(e.l-s.start)/a,t.l=Math.min(t.l,e.l-r)):s.end>e.r&&(r=(s.end-e.r)/a,t.r=Math.max(t.r,e.r+r)),n.start<e.t?(c=(e.t-n.start)/o,t.t=Math.min(t.t,e.t-c)):n.end>e.b&&(c=(n.end-e.b)/o,t.b=Math.max(t.b,e.b+c))}function Ja(t){return 0===t||180===t?"center":t<180?"left":"right"}function Qa(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function to(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}
vendor: 4,218 bytes, line 2
2function eo(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,C);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let a=1;a<s;a++)i=t.getPointPosition(a,e),n.lineTo(i.x,i.y)}}Xa.id="logarithmic",Xa.defaults={ticks:{callback:Os.formatters.logarithmic,major:{enabled:!0}}};class io extends Ya{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=fi(Ga(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=a(t)&&!isNaN(t)?t:0,this.max=a(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ga(this.options))}generateTickLabels(t){Ya.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map(((t,e)=>{const i=h(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],a=[],o=t._pointLabels.length,r=t.options.pointLabels,c=r.centerPointLabels?D/o:0;for(let f=0;f<o;f++){const o=r.setContext(t.getPointLabelContext(f));a[f]=o.padding;const u=t.getPointPosition(f,t.drawingArea+a[f],c),g=ui(o.font),p=(l=t.ctx,h=g,d=s(d=t._pointLabels[f])?d:[d],{w:me(l,h.string,d),h:d.length*h.lineHeight});n[f]=p;const b=G(t.getIndexAngle(f)+c),m=Math.round($(b));Za(i,e,b,Ka(m,u.x,p.w,0,180),Ka(m,u.y,p.h,90,270))}var l,h,d;t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const s=[],n=t._pointLabels.length,a=t.options,o=Ga(a)/2,r=t.drawingArea,c=a.pointLabels.centerPointLabels?D/n:0;for(let a=0;a<n;a++){const n=t.getPointPosition(a,r+o+i[a],c),l=Math.round($(G(n.angle+L))),h=e[a],d=to(n.y,h.h,l),f=Ja(l),u=Qa(n.x,h.w,f);s.push({x:n.x,y:d,textAlign:f,left:u,top:d,right:u+h.w,bottom:d+h.h})}return s}(t,n,a)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return G(t*(C/(this._pointLabels.length||1))+j(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(i(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(i(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return bi(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-L+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:n}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:n}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),eo(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:s,grid:n}=e,a=this._pointLabels.length;let o,r,c;if(e.pointLabels.display&&function(t,e){const{ctx:s,options:{pointLabels:n}}=t;for(let a=e-1;a>=0;a--){const e=n.setContext(t.getPointLabelContext(a)),o=ui(e.font),{x:r,y:c,textAlign:l,left:h,top:d,right:f,bottom:u}=t._pointLabelItems[a],{backdropColor:g}=e;if(!i(g)){const t=di(e.borderRadius),i=fi(e.backdropPadding);s.fillStyle=g;const n=h-i.left,a=d-i.top,o=f-h+i.width,r=u-d+i.height;
vendor: 5,044 bytes, line 2
2Object.values(t).some((t=>0!==t))?(s.beginPath(),Oe(s,{x:n,y:a,w:o,h:r,radius:t}),s.fill()):s.fillRect(n,a,o,r)}De(s,t._pointLabels[a],r,c+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,a),n.display&&this.ticks.forEach(((t,e)=>{0!==e&&(r=this.getDistanceFromCenterForValue(t.value),function(t,e,i,s){const n=t.ctx,a=e.circular,{color:o,lineWidth:r}=e;!a&&!s||!o||!r||i<0||(n.save(),n.strokeStyle=o,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),eo(t,i,a,s),n.closePath(),n.stroke(),n.restore())}(this,n.setContext(this.getContext(e-1)),r,a))})),s.display){for(t.save(),o=a-1;o>=0;o--){const i=s.setContext(this.getPointLabelContext(o)),{color:n,lineWidth:a}=i;a&&n&&(t.lineWidth=a,t.strokeStyle=n,t.setLineDash(i.borderDash),t.lineDashOffset=i.borderDashOffset,r=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,r),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,o)=>{if(0===o&&!e.reverse)return;const r=i.setContext(this.getContext(o)),c=ui(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[o].value),r.showLabelBackdrop){t.font=c.string,a=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=fi(r.backdropPadding);t.fillRect(-a/2-e.left,-n-c.size/2-e.top,a+e.width,c.size+e.height)}De(t,s.label,0,-n,c,{color:r.color})})),t.restore()}drawTitle(){}}io.id="radialLinear",io.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Os.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},io.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},io.descriptors={angleLines:{_fallback:"grid"}};const so={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}},no=Object.keys(so);function ao(t,e){return t-e}function oo(t,e){if(i(e))return null;const s=t._adapter,{parser:n,round:o,isoWeekday:r}=t._parseOpts;let c=e;return"function"==typeof n&&(c=n(c)),a(c)||(c="string"==typeof n?s.parse(c,n):s.parse(c)),null===c?null:(o&&(c="week"!==o||!V(r)&&!0!==r?s.startOf(c,o):s.startOf(c,"isoWeek",r)),+c)}function ro(t,e,i,s){const n=no.length;for(let a=no.indexOf(t);a<n-1;++a){const t=so[no[a]],n=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(n*t.size))<=s)return no[a]}return no[n-1]}function co(t,e,i){if(i){if(i.length){const{lo:s,hi:n}=tt(i,e);t[i[s]>=e?i[s]:i[n]]=!0}}else t[e]=!0}function lo(t,e,i){const s=[],n={},a=e.length;let o,r;for(o=0;o<a;++o)r=e[o],n[r]=o,s.push({value:r,major:!1});return 0!==a&&i?function(t,e,i,s){const n=t._adapter,a=+n.startOf(e[0].value,s),o=e[e.length-1].value;let r,c;for(r=a;r<=o;r=+n.add(r,1,s))c=i[r],c>=0&&(e[c].major=!0);return e}(t,s,n,i):s}class ho extends Bs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),s=this._adapter=new bn._date(t.adapters.date);s.init(e),m(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:oo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function c(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(c(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||c(this.getMinMax(!1))),s=a(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=a(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,a=st(s,n,this.max);return this._unit=e.unit||(i.autoSkip?ro(e.minUnit,this.min,this.max,this._getLabelCapacity(n)):function(t,e,
vendor: 4,296 bytes, line 2
2i,s,n){for(let a=no.length-1;a>=no.indexOf(i);a--){const i=no[a];if(so[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return no[i?no.indexOf(i):0]}(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=no.indexOf(t)+1,i=no.length;e<i;++e)if(so[no[e]].common)return no[e]}(this._unit):void 0,this.initOffsets(s),t.reverse&&a.reverse(),lo(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((t=>+t.value)))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;s=Z(s,0,a),n=Z(n,0,a),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,a=n.unit||ro(n.minUnit,e,i,this._getLabelCapacity(e)),o=r(n.stepSize,1),c="week"===a&&n.isoWeekday,l=V(c)||!0===c,h={};let d,f,u=e;if(l&&(u=+t.startOf(u,"isoWeek",c)),u=+t.startOf(u,l?"day":a),t.diff(i,e,a)>1e5*o)throw new Error(e+" and "+i+" are too far apart with stepSize of "+o+" "+a);const g="data"===s.ticks.source&&this.getDataTimestamps();for(d=u,f=0;d<i;d=+t.add(d,o,a),f++)co(h,d,g);return d!==i&&"ticks"!==s.bounds&&1!==f||co(h,d,g),Object.keys(h).sort(((t,e)=>t-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,a=n.time.displayFormats,o=this._unit,r=this._majorUnit,c=o&&a[o],l=r&&a[r],d=i[e],f=r&&l&&d&&d.major,u=this._adapter.format(t,s||(f?l:c)),g=n.ticks.callback;return g?h(g,[u,e,i],this):u}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=j(this.isHorizontal()?e.maxRotation:e.minRotation),n=Math.cos(s),a=Math.sin(s),o=this._resolveTickFontOptions(0).size;return{w:i*n+o*a,h:i*a+o*n}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,n=this._tickFormatFunction(t,0,lo(this,[t],this._majorUnit),s),a=this._getLabelSize(n),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t<e;++t)i=i.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(oo(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return rt(t.sort(ao))}}function fo(t,e,i){let s,n,a,o,r=0,c=t.length-1;i?(e>=t[r].pos&&e<=t[c].pos&&({lo:r,hi:c}=et(t,"pos",e)),({pos:s,time:a}=t[r]),({pos:n,time:o}=t[c])):(e>=t[r].time&&e<=t[c].time&&({lo:r,hi:c}=et(t,"time",e)),({time:s,pos:a}=t[r]),({time:n,pos:o}=t[c]));const l=n-s;return l?a+(o-a)*(e-s)/l:a}ho.id="time",ho.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class uo extends ho{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=fo(e,this.min),this._tableRange=fo(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let a,o,r,c,l;for(a=0,o=t.length;a<o;++a)c=t[a],c>=e&&c<=i&&s.push(c);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,o=s.length;a<o;
vendor: 1,103 bytes, line 2
2++a)l=s[a+1],r=s[a-1],c=s[a],Math.round((l+r)/2)!==c&&n.push({time:c,pos:a/(o-1)});return n}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(fo(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return fo(this._table,i*this._tableRange+this._minPos,!0)}}uo.id="timeseries",uo.defaults=ho.defaults;var go=Object.freeze({__proto__:null,CategoryScale:ja,LinearScale:Ua,LogarithmicScale:Xa,RadialLinearScale:io,TimeScale:ho,TimeSeriesScale:uo});return dn.register(Rn,go,ea,Ha),dn.helpers={...Di},dn._adapters=bn,dn.Animation=fs,dn.Animations=gs,dn.animator=bt,dn.controllers=Ns.controllers.items,dn.DatasetController=Ps,dn.Element=Ds,dn.elements=ea,dn.Interaction=Ri,dn.layouts=Yi,dn.platforms=ls,dn.Scale=Bs,dn.Ticks=Os,Object.assign(dn,Rn,go,ea,Ha,ls),dn.Chart=dn,"undefined"!=typeof window&&(window.Chart=dn),dn}()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.