@kong-ui-public/analytics-chart 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/types/components/chart-plugins/HighlightPlugin.d.ts.map +1 -1
- package/dist/types/components/chart-types/StackedBarChart.vue.d.ts.map +1 -1
- package/dist/types/composables/useBarChartOptions.d.ts +5 -2
- package/dist/types/composables/useBarChartOptions.d.ts.map +1 -1
- package/dist/types/composables/useChartLegendValues.d.ts.map +1 -1
- package/dist/types/composables/useLineChartOptions.d.ts +4 -2
- package/dist/types/composables/useLineChartOptions.d.ts.map +1 -1
- package/dist/vitals-chart.es.js +4176 -4159
- package/dist/vitals-chart.umd.js +17 -17
- package/package.json +1 -1
package/dist/vitals-chart.umd.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
(function(_t,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(_t=typeof globalThis<"u"?globalThis:_t||self,b(_t["kong-ui-publicvitals-chart"]={},_t.Vue))})(this,function(_t,b){var Xe,uh;"use strict";var JT=Object.defineProperty;var tM=(_t,b,_e)=>b in _t?JT(_t,b,{enumerable:!0,configurable:!0,writable:!0,value:_e}):_t[b]=_e;var E=(_t,b,_e)=>(tM(_t,typeof b!="symbol"?b+"":b,_e),_e);var _e=function(e,t){return _e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},_e(e,t)};function oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");_e(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(this,arguments)};function hh(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function we(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,a;i<r;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var $;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})($||($={}));var gt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(gt||(gt={}));var bn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(bn||(bn={}));function fo(e){return e.type===gt.literal}function fh(e){return e.type===gt.argument}function go(e){return e.type===gt.number}function mo(e){return e.type===gt.date}function po(e){return e.type===gt.time}function bo(e){return e.type===gt.select}function vo(e){return e.type===gt.plural}function gh(e){return e.type===gt.pound}function yo(e){return e.type===gt.tag}function xo(e){return!!(e&&typeof e=="object"&&e.type===bn.number)}function Lr(e){return!!(e&&typeof e=="object"&&e.type===bn.dateTime)}var _o=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mh=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function ph(e){var t={};return e.replace(mh,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var bh=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function vh(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(bh).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var a=r[i],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),c=0,u=l;c<u.length;c++){var d=u[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function yh(e){return e.replace(/^(.*?)-/,"")}var wo=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,To=/^(@+)?(\+|#+)?[rs]?$/g,xh=/(\*)(0+)|(#+)(0+)|(0+)/g,Mo=/^(0+)$/;function So(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(To,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function Do(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function _h(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Mo.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Po(e){var t={},n=Do(e);return n||t}function wh(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=yh(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=I(I(I({},t),{notation:"scientific"}),r.options.reduce(function(l,c){return I(I({},l),Po(c))},{}));continue;case"engineering":t=I(I(I({},t),{notation:"engineering"}),r.options.reduce(function(l,c){return I(I({},l),Po(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(xh,function(l,c,u,d,h,f){if(c)t.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Mo.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(wo.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(wo,function(l,c,u,d,h,f){return u==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&f?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=r.options[0];a==="w"?t=I(I({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=I(I({},t),So(a)));continue}if(To.test(r.stem)){t=I(I({},t),So(r.stem));continue}var s=Do(r.stem);s&&(t=I(I({},t),s));var o=_h(r.stem);o&&(t=I(I({},t),o))}return t}var Oi={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Th(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",c=Mh(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=c+n}else r==="J"?n+="H":n+=r}return n}function Mh(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=Oi[i||""]||Oi[n||""]||Oi["".concat(n,"-001")]||Oi["001"];return r[0]}var Ir,Sh=new RegExp("^".concat(_o.source,"*")),Dh=new RegExp("".concat(_o.source,"*$"));function K(e,t){return{start:e,end:t}}var Ph=!!String.prototype.startsWith,Eh=!!String.fromCodePoint,Ch=!!Object.fromEntries,kh=!!String.prototype.codePointAt,Oh=!!String.prototype.trimStart,Ah=!!String.prototype.trimEnd,Rh=!!Number.isSafeInteger,Lh=Rh?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Nr=!0;try{var Ih=Oo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Nr=((Ir=Ih.exec("a"))===null||Ir===void 0?void 0:Ir[0])==="a"}catch{Nr=!1}var Eo=Ph?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Br=Eh?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=e.length,r=0,a;i>r;){if(a=e[r++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Co=Ch?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],s=r[1];t[a]=s}return t},ko=kh?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i=e.charCodeAt(t),r;return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},Nh=Oh?function(e){return e.trimStart()}:function(e){return e.replace(Sh,"")},Bh=Ah?function(e){return e.trimEnd()}:function(e){return e.replace(Dh,"")};function Oo(e,t){return new RegExp(e,t)}var Hr;if(Nr){var Ao=Oo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Hr=function(e,t){var n;Ao.lastIndex=t;var i=Ao.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}}else Hr=function(e,t){for(var n=[];;){var i=ko(e,t);if(i===void 0||Ro(i)||Wh(i))break;n.push(i),t+=i>=65536?2:1}return Br.apply(void 0,n)};var Hh=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,i);if(s.err)return s;r.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),r.push({type:gt.pound,location:K(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error($.UNMATCHED_CLOSING_TAG,K(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Fr(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:gt.literal,value:"<".concat(r,"/>"),location:K(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Fr(this.char()))return this.error($.INVALID_TAG,K(o,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return r!==c?this.error($.UNMATCHED_CLOSING_TAG,K(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:gt.tag,value:r,children:s,location:K(i,this.clonePosition())},err:null}:this.error($.INVALID_TAG,K(o,this.clonePosition())))}else return this.error($.UNCLOSED_TAG,K(i,this.clonePosition()))}else return this.error($.INVALID_TAG,K(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Uh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var a=this.tryParseQuote(n);if(a){r+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){r+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var l=K(i,this.clonePosition());return{val:{type:gt.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Fh(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Br.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Br(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,K(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error($.EMPTY_ARGUMENT,K(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error($.MALFORMED_ARGUMENT,K(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,K(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:gt.argument,value:r,location:K(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,K(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error($.MALFORMED_ARGUMENT,K(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Hr(this.message,n),r=n+i.length;this.bumpTo(r);var a=this.clonePosition(),s=K(t,a);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,n,i,r){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error($.EXPECT_ARGUMENT_TYPE,K(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=Bh(d.val);if(h.length===0)return this.error($.EXPECT_ARGUMENT_STYLE,K(this.clonePosition(),this.clonePosition()));var f=K(u,this.clonePosition());c={style:h,styleLocation:f}}var g=this.tryParseArgumentClose(r);if(g.err)return g;var v=K(r,this.clonePosition());if(c&&Eo(c==null?void 0:c.style,"::",0)){var p=Nh(c.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(p,c.styleLocation);return d.err?d:{val:{type:gt.number,value:i,location:v,style:d.val},err:null}}else{if(p.length===0)return this.error($.EXPECT_DATE_TIME_SKELETON,v);var m=p;this.locale&&(m=Th(p,this.locale));var h={type:bn.dateTime,pattern:m,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?ph(m):{}},y=o==="date"?gt.date:gt.time;return{val:{type:y,value:i,location:v,style:h},err:null}}}return{val:{type:o==="number"?gt.number:o==="date"?gt.date:gt.time,value:i,location:v,style:(a=c==null?void 0:c.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error($.EXPECT_SELECT_ARGUMENT_OPTIONS,K(_,I({},_)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),w=0;if(o!=="select"&&x.value==="offset"){if(!this.bumpIf(":"))return this.error($.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,K(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger($.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,$.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),x=this.parseIdentifierIfPossible(),w=d.val}var T=this.tryParsePluralOrSelectOptions(t,o,n,x);if(T.err)return T;var g=this.tryParseArgumentClose(r);if(g.err)return g;var M=K(r,this.clonePosition());return o==="select"?{val:{type:gt.select,value:i,options:Co(T.val),location:M},err:null}:{val:{type:gt.plural,value:i,options:Co(T.val),offset:w,pluralType:o==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error($.INVALID_ARGUMENT_TYPE,K(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error($.EXPECT_ARGUMENT_CLOSING_BRACE,K(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error($.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,K(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=vh(t)}catch{return this.error($.INVALID_NUMBER_SKELETON,n)}return{val:{type:bn.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?wh(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var a,s=!1,o=[],l=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger($.EXPECT_PLURAL_ARGUMENT_SELECTOR,$.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=K(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?$.DUPLICATE_SELECT_ARGUMENT_SELECTOR:$.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?$.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:$.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,K(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,i);if(g.err)return g;var v=this.tryParseArgumentClose(f);if(v.err)return v;o.push([c,{value:g.val,location:K(f,this.clonePosition())}]),l.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,u=a.location}return o.length===0?this.error(n==="select"?$.EXPECT_SELECT_ARGUMENT_SELECTOR:$.EXPECT_PLURAL_ARGUMENT_SELECTOR,K(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error($.MISSING_OTHER_CLAUSE,K(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=K(r,this.clonePosition());return a?(s*=i,Lh(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=ko(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Eo(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ro(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function Fr(e){return e>=97&&e<=122||e>=65&&e<=90}function Fh(e){return Fr(e)||e===47}function Uh(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ro(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Wh(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Ur(e){e.forEach(function(t){if(delete t.location,bo(t)||vo(t))for(var n in t.options)delete t.options[n].location,Ur(t.options[n].value);else go(t)&&xo(t.style)||(mo(t)||po(t))&&Lr(t.style)?delete t.style.location:yo(t)&&Ur(t.children)})}function Yh(e,t){t===void 0&&(t={}),t=I({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Hh(e,t).parse();if(n.err){var i=SyntaxError($[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||Ur(n.val),n.val}function ue(e,t){var n=t&&t.cache?t.cache:Gh,i=t&&t.serializer?t.serializer:qh,r=t&&t.strategy?t.strategy:jh;return r(e,{cache:n,serializer:i})}function zh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Lo(e,t,n,i){var r=zh(i)?i:n(i),a=t.get(r);return typeof a>"u"&&(a=e.call(this,i),t.set(r,a)),a}function Io(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return typeof a>"u"&&(a=e.apply(this,i),t.set(r,a)),a}function Wr(e,t,n,i,r){return n.bind(t,e,i,r)}function jh(e,t){var n=e.length===1?Lo:Io;return Wr(e,this,n,t.cache.create(),t.serializer)}function Vh(e,t){return Wr(e,this,Io,t.cache.create(),t.serializer)}function $h(e,t){return Wr(e,this,Lo,t.cache.create(),t.serializer)}var qh=function(){return JSON.stringify(arguments)};function Yr(){this.cache=Object.create(null)}Yr.prototype.get=function(e){return this.cache[e]},Yr.prototype.set=function(e,t){this.cache[e]=t};var Gh={create:function(){return new Yr}},de={variadic:Vh,monadic:$h},he;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(he||(he={}));var Ae=function(e){oe(t,e);function t(n,i,r){var a=e.call(this,n)||this;return a.code=i,a.originalMessage=r,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),No=function(e){oe(t,e);function t(n,i,r,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),he.INVALID_VALUE,a)||this}return t}(Ae),Xh=function(e){oe(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),he.INVALID_VALUE,r)||this}return t}(Ae),Kh=function(e){oe(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),he.MISSING_VALUE,i)||this}return t}(Ae),zt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(zt||(zt={}));function Zh(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==zt.literal||n.type!==zt.literal?t.push(n):i.value+=n.value,t},[])}function Qh(e){return typeof e=="function"}function Ai(e,t,n,i,r,a,s){if(e.length===1&&fo(e[0]))return[{type:zt.literal,value:e[0].value}];for(var o=[],l=0,c=e;l<c.length;l++){var u=c[l];if(fo(u)){o.push({type:zt.literal,value:u.value});continue}if(gh(u)){typeof a=="number"&&o.push({type:zt.literal,value:n.getNumberFormat(t).format(a)});continue}var d=u.value;if(!(r&&d in r))throw new Kh(d,s);var h=r[d];if(fh(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?zt.literal:zt.object,value:h});continue}if(mo(u)){var f=typeof u.style=="string"?i.date[u.style]:Lr(u.style)?u.style.parsedOptions:void 0;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(po(u)){var f=typeof u.style=="string"?i.time[u.style]:Lr(u.style)?u.style.parsedOptions:i.time.medium;o.push({type:zt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(go(u)){var f=typeof u.style=="string"?i.number[u.style]:xo(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(h=h*(f.scale||1)),o.push({type:zt.literal,value:n.getNumberFormat(t,f).format(h)});continue}if(yo(u)){var g=u.children,v=u.value,p=r[v];if(!Qh(p))throw new Xh(v,"function",s);var m=Ai(g,t,n,i,r,a),y=p(m.map(function(w){return w.value}));Array.isArray(y)||(y=[y]),o.push.apply(o,y.map(function(w){return{type:typeof w=="string"?zt.literal:zt.object,value:w}}))}if(bo(u)){var _=u.options[h]||u.options.other;if(!_)throw new No(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ai(_.value,t,n,i,r));continue}if(vo(u)){var _=u.options["=".concat(h)];if(!_){if(!Intl.PluralRules)throw new Ae(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
(function(yt,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(yt=typeof globalThis<"u"?globalThis:yt||self,b(yt["kong-ui-publicvitals-chart"]={},yt.Vue))})(this,function(yt,b){var Ze,fh;"use strict";var tM=Object.defineProperty;var eM=(yt,b,we)=>b in yt?tM(yt,b,{enumerable:!0,configurable:!0,writable:!0,value:we}):yt[b]=we;var k=(yt,b,we)=>(eM(yt,typeof b!="symbol"?b+"":b,we),we);var we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},we(e,t)};function le(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");we(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(this,arguments)};function ph(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function Te(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,a;i<r;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var q;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(q||(q={}));var gt;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(gt||(gt={}));var vn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(vn||(vn={}));function mo(e){return e.type===gt.literal}function mh(e){return e.type===gt.argument}function bo(e){return e.type===gt.number}function vo(e){return e.type===gt.date}function yo(e){return e.type===gt.time}function xo(e){return e.type===gt.select}function _o(e){return e.type===gt.plural}function bh(e){return e.type===gt.pound}function wo(e){return e.type===gt.tag}function To(e){return!!(e&&typeof e=="object"&&e.type===vn.number)}function Ir(e){return!!(e&&typeof e=="object"&&e.type===vn.dateTime)}var Mo=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,vh=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function yh(e){var t={};return e.replace(vh,function(n){var i=n.length;switch(n[0]){case"G":t.era=i===4?"long":i===5?"narrow":"short";break;case"y":t.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][i-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][i-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][i-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][i-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][i-1];break;case"s":t.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var xh=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function _h(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(xh).filter(function(h){return h.length>0}),n=[],i=0,r=t;i<r.length;i++){var a=r[i],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),c=0,u=l;c<u.length;c++){var d=u[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function wh(e){return e.replace(/^(.*?)-/,"")}var So=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Do=/^(@+)?(\+|#+)?[rs]?$/g,Th=/(\*)(0+)|(#+)(0+)|(0+)/g,Po=/^(0+)$/;function ko(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Do,function(n,i,r){return typeof r!="string"?(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length):r==="+"?t.minimumSignificantDigits=i.length:i[0]==="#"?t.maximumSignificantDigits=i.length:(t.minimumSignificantDigits=i.length,t.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),t}function Co(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Mh(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Po.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Eo(e){var t={},n=Co(e);return n||t}function Sh(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=r.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=wh(r.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=I(I(I({},t),{notation:"scientific"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"engineering":t=I(I(I({},t),{notation:"engineering"}),r.options.reduce(function(l,c){return I(I({},l),Eo(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(Th,function(l,c,u,d,h,f){if(c)t.minimumIntegerDigits=u.length;else{if(d&&h)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Po.test(r.stem)){t.minimumIntegerDigits=r.stem.length;continue}if(So.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(So,function(l,c,u,d,h,f){return u==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:h&&f?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+f.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var a=r.options[0];a==="w"?t=I(I({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=I(I({},t),ko(a)));continue}if(Do.test(r.stem)){t=I(I({},t),ko(r.stem));continue}var s=Co(r.stem);s&&(t=I(I({},t),s));var o=Mh(r.stem);o&&(t=I(I({},t),o))}return t}var Ai={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Dh(e,t){for(var n="",i=0;i<e.length;i++){var r=e.charAt(i);if(r==="j"){for(var a=0;i+1<e.length&&e.charAt(i+1)===r;)a++,i++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",c=Ph(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=c+n}else r==="J"?n+="H":n+=r}return n}function Ph(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,i;n!=="root"&&(i=e.maximize().region);var r=Ai[i||""]||Ai[n||""]||Ai["".concat(n,"-001")]||Ai["001"];return r[0]}var Nr,kh=new RegExp("^".concat(Mo.source,"*")),Ch=new RegExp("".concat(Mo.source,"*$"));function Z(e,t){return{start:e,end:t}}var Eh=!!String.prototype.startsWith,Oh=!!String.fromCodePoint,Ah=!!Object.fromEntries,Rh=!!String.prototype.codePointAt,Lh=!!String.prototype.trimStart,Ih=!!String.prototype.trimEnd,Nh=!!Number.isSafeInteger,Bh=Nh?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Br=!0;try{var Hh=Lo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Br=((Nr=Hh.exec("a"))===null||Nr===void 0?void 0:Nr[0])==="a"}catch{Br=!1}var Oo=Eh?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Hr=Oh?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n="",i=e.length,r=0,a;i>r;){if(a=e[r++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Ao=Ah?Object.fromEntries:function(e){for(var t={},n=0,i=e;n<i.length;n++){var r=i[n],a=r[0],s=r[1];t[a]=s}return t},Ro=Rh?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var i=e.charCodeAt(t),r;return i<55296||i>56319||t+1===n||(r=e.charCodeAt(t+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},Fh=Lh?function(e){return e.trimStart()}:function(e){return e.replace(kh,"")},Uh=Ih?function(e){return e.trimEnd()}:function(e){return e.replace(Ch,"")};function Lo(e,t){return new RegExp(e,t)}var Fr;if(Br){var Io=Lo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fr=function(e,t){var n;Io.lastIndex=t;var i=Io.exec(e);return(n=i[1])!==null&&n!==void 0?n:""}}else Fr=function(e,t){for(var n=[];;){var i=Ro(e,t);if(i===void 0||No(i)||jh(i))break;n.push(i),t+=i>=65536?2:1}return Hr.apply(void 0,n)};var Wh=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,i){for(var r=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,i);if(s.err)return s;r.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),r.push({type:gt.pound,location:Z(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(q.UNMATCHED_CLOSING_TAG,Z(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&Ur(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(t,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:gt.literal,value:"<".concat(r,"/>"),location:Z(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ur(this.char()))return this.error(q.INVALID_TAG,Z(o,this.clonePosition()));var l=this.clonePosition(),c=this.parseTagName();return r!==c?this.error(q.UNMATCHED_CLOSING_TAG,Z(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:gt.tag,value:r,children:s,location:Z(i,this.clonePosition())},err:null}:this.error(q.INVALID_TAG,Z(o,this.clonePosition())))}else return this.error(q.UNCLOSED_TAG,Z(i,this.clonePosition()))}else return this.error(q.INVALID_TAG,Z(i,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&zh(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var i=this.clonePosition(),r="";;){var a=this.tryParseQuote(n);if(a){r+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){r+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var l=Z(i,this.clonePosition());return{val:{type:gt.literal,value:r,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Yh(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Hr.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&t>0?null:(this.bump(),Hr(i))},e.prototype.parseArgument=function(t,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Z(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(q.EMPTY_ARGUMENT,Z(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(q.MALFORMED_ARGUMENT,Z(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Z(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:gt.argument,value:r,location:Z(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Z(i,this.clonePosition())):this.parseArgumentOptions(t,n,r,i);default:return this.error(q.MALFORMED_ARGUMENT,Z(i,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),i=Fr(this.message,n),r=n+i.length;this.bumpTo(r);var a=this.clonePosition(),s=Z(t,a);return{value:i,location:s}},e.prototype.parseArgumentOptions=function(t,n,i,r){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(q.EXPECT_ARGUMENT_TYPE,Z(s,l));case"number":case"date":case"time":{this.bumpSpace();var c=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),d=this.parseSimpleArgStyleIfPossible();if(d.err)return d;var h=Uh(d.val);if(h.length===0)return this.error(q.EXPECT_ARGUMENT_STYLE,Z(this.clonePosition(),this.clonePosition()));var f=Z(u,this.clonePosition());c={style:h,styleLocation:f}}var g=this.tryParseArgumentClose(r);if(g.err)return g;var v=Z(r,this.clonePosition());if(c&&Oo(c==null?void 0:c.style,"::",0)){var m=Fh(c.style.slice(2));if(o==="number"){var d=this.parseNumberSkeletonFromString(m,c.styleLocation);return d.err?d:{val:{type:gt.number,value:i,location:v,style:d.val},err:null}}else{if(m.length===0)return this.error(q.EXPECT_DATE_TIME_SKELETON,v);var p=m;this.locale&&(p=Dh(m,this.locale));var h={type:vn.dateTime,pattern:p,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?yh(p):{}},y=o==="date"?gt.date:gt.time;return{val:{type:y,value:i,location:v,style:h},err:null}}}return{val:{type:o==="number"?gt.number:o==="date"?gt.date:gt.time,value:i,location:v,style:(a=c==null?void 0:c.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var _=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(q.EXPECT_SELECT_ARGUMENT_OPTIONS,Z(_,I({},_)));this.bumpSpace();var x=this.parseIdentifierIfPossible(),w=0;if(o!=="select"&&x.value==="offset"){if(!this.bumpIf(":"))return this.error(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z(this.clonePosition(),this.clonePosition()));this.bumpSpace();var d=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(d.err)return d;this.bumpSpace(),x=this.parseIdentifierIfPossible(),w=d.val}var T=this.tryParsePluralOrSelectOptions(t,o,n,x);if(T.err)return T;var g=this.tryParseArgumentClose(r);if(g.err)return g;var M=Z(r,this.clonePosition());return o==="select"?{val:{type:gt.select,value:i,options:Ao(T.val),location:M},err:null}:{val:{type:gt.plural,value:i,options:Ao(T.val),offset:w,pluralType:o==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error(q.INVALID_ARGUMENT_TYPE,Z(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(q.EXPECT_ARGUMENT_CLOSING_BRACE,Z(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(q.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Z(r,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var i=[];try{i=_h(t)}catch{return this.error(q.INVALID_NUMBER_SKELETON,n)}return{val:{type:vn.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?Sh(i):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,i,r){for(var a,s=!1,o=[],l=new Set,c=r.value,u=r.location;;){if(c.length===0){var d=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(q.EXPECT_PLURAL_ARGUMENT_SELECTOR,q.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;u=Z(d,this.clonePosition()),c=this.message.slice(d.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?q.DUPLICATE_SELECT_ARGUMENT_SELECTOR:q.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:q.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Z(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,i);if(g.err)return g;var v=this.tryParseArgumentClose(f);if(v.err)return v;o.push([c,{value:g.val,location:Z(f,this.clonePosition())}]),l.add(c),this.bumpSpace(),a=this.parseIdentifierIfPossible(),c=a.value,u=a.location}return o.length===0?this.error(n==="select"?q.EXPECT_SELECT_ARGUMENT_SELECTOR:q.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(q.MISSING_OTHER_CLAUSE,Z(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=Z(r,this.clonePosition());return a?(s*=i,Bh(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Ro(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Oo(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),i=this.message.indexOf(t,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&No(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(t>=65536?2:1));return i??null},e}();function Ur(e){return e>=97&&e<=122||e>=65&&e<=90}function Yh(e){return Ur(e)||e===47}function zh(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function No(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function jh(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Wr(e){e.forEach(function(t){if(delete t.location,xo(t)||_o(t))for(var n in t.options)delete t.options[n].location,Wr(t.options[n].value);else bo(t)&&To(t.style)||(vo(t)||yo(t))&&Ir(t.style)?delete t.style.location:wo(t)&&Wr(t.children)})}function $h(e,t){t===void 0&&(t={}),t=I({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Wh(e,t).parse();if(n.err){var i=SyntaxError(q[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return t!=null&&t.captureLocation||Wr(n.val),n.val}function de(e,t){var n=t&&t.cache?t.cache:Zh,i=t&&t.serializer?t.serializer:Kh,r=t&&t.strategy?t.strategy:qh;return r(e,{cache:n,serializer:i})}function Vh(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Bo(e,t,n,i){var r=Vh(i)?i:n(i),a=t.get(r);return typeof a>"u"&&(a=e.call(this,i),t.set(r,a)),a}function Ho(e,t,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),a=t.get(r);return typeof a>"u"&&(a=e.apply(this,i),t.set(r,a)),a}function Yr(e,t,n,i,r){return n.bind(t,e,i,r)}function qh(e,t){var n=e.length===1?Bo:Ho;return Yr(e,this,n,t.cache.create(),t.serializer)}function Gh(e,t){return Yr(e,this,Ho,t.cache.create(),t.serializer)}function Xh(e,t){return Yr(e,this,Bo,t.cache.create(),t.serializer)}var Kh=function(){return JSON.stringify(arguments)};function zr(){this.cache=Object.create(null)}zr.prototype.get=function(e){return this.cache[e]},zr.prototype.set=function(e,t){this.cache[e]=t};var Zh={create:function(){return new zr}},he={variadic:Gh,monadic:Xh},fe;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(fe||(fe={}));var Re=function(e){le(t,e);function t(n,i,r){var a=e.call(this,n)||this;return a.code=i,a.originalMessage=r,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Fo=function(e){le(t,e);function t(n,i,r,a){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),fe.INVALID_VALUE,a)||this}return t}(Re),Qh=function(e){le(t,e);function t(n,i,r){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),fe.INVALID_VALUE,r)||this}return t}(Re),Jh=function(e){le(t,e);function t(n,i){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),fe.MISSING_VALUE,i)||this}return t}(Re),jt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(jt||(jt={}));function tf(e){return e.length<2?e:e.reduce(function(t,n){var i=t[t.length-1];return!i||i.type!==jt.literal||n.type!==jt.literal?t.push(n):i.value+=n.value,t},[])}function ef(e){return typeof e=="function"}function Ri(e,t,n,i,r,a,s){if(e.length===1&&mo(e[0]))return[{type:jt.literal,value:e[0].value}];for(var o=[],l=0,c=e;l<c.length;l++){var u=c[l];if(mo(u)){o.push({type:jt.literal,value:u.value});continue}if(bh(u)){typeof a=="number"&&o.push({type:jt.literal,value:n.getNumberFormat(t).format(a)});continue}var d=u.value;if(!(r&&d in r))throw new Jh(d,s);var h=r[d];if(mh(u)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?jt.literal:jt.object,value:h});continue}if(vo(u)){var f=typeof u.style=="string"?i.date[u.style]:Ir(u.style)?u.style.parsedOptions:void 0;o.push({type:jt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(yo(u)){var f=typeof u.style=="string"?i.time[u.style]:Ir(u.style)?u.style.parsedOptions:i.time.medium;o.push({type:jt.literal,value:n.getDateTimeFormat(t,f).format(h)});continue}if(bo(u)){var f=typeof u.style=="string"?i.number[u.style]:To(u.style)?u.style.parsedOptions:void 0;f&&f.scale&&(h=h*(f.scale||1)),o.push({type:jt.literal,value:n.getNumberFormat(t,f).format(h)});continue}if(wo(u)){var g=u.children,v=u.value,m=r[v];if(!ef(m))throw new Qh(v,"function",s);var p=Ri(g,t,n,i,r,a),y=m(p.map(function(w){return w.value}));Array.isArray(y)||(y=[y]),o.push.apply(o,y.map(function(w){return{type:typeof w=="string"?jt.literal:jt.object,value:w}}))}if(xo(u)){var _=u.options[h]||u.options.other;if(!_)throw new Fo(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ri(_.value,t,n,i,r));continue}if(_o(u)){var _=u.options["=".concat(h)];if(!_){if(!Intl.PluralRules)throw new Re(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
|
-
`,
|
|
3
|
+
`,fe.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:u.pluralType}).select(h-(u.offset||0));_=u.options[x]||u.options.other}if(!_)throw new Fo(u.value,h,Object.keys(u.options),s);o.push.apply(o,Ri(_.value,t,n,i,r,h-(u.offset||0)));continue}}return tf(o)}function nf(e,t){return t?I(I(I({},e||{}),t||{}),Object.keys(e).reduce(function(n,i){return n[i]=I(I({},e[i]),t[i]||{}),n},{})):e}function rf(e,t){return t?Object.keys(e).reduce(function(n,i){return n[i]=nf(e[i],t[i]),n},I({},e)):e}function jr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function af(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:de(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.NumberFormat).bind.apply(t,Te([void 0],n,!1)))},{cache:jr(e.number),strategy:he.variadic}),getDateTimeFormat:de(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.DateTimeFormat).bind.apply(t,Te([void 0],n,!1)))},{cache:jr(e.dateTime),strategy:he.variadic}),getPluralRules:de(function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((t=Intl.PluralRules).bind.apply(t,Te([void 0],n,!1)))},{cache:jr(e.pluralRules),strategy:he.variadic})}}var Uo=function(){function e(t,n,i,r){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var c=a.formatToParts(l);if(c.length===1)return c[0].value;var u=c.reduce(function(d,h){return!d.length||h.type!==jt.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(l){return Ri(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=r||{};s.formatters;var o=ph(s,["formatters"]);this.ast=e.__parse(t,I(I({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=rf(e.formats,i),this.formatters=r&&r.formatters||af(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=$h,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Qe;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Qe||(Qe={}));var Bn=function(e){le(t,e);function t(n,i,r){var a=this,s=r?r instanceof Error?r:new Error(String(r)):void 0;return a=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(i,`
|
|
4
4
|
`).concat(s?`
|
|
5
5
|
`.concat(s.message,`
|
|
6
|
-
`).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t}(Error),
|
|
6
|
+
`).concat(s.stack):""))||this,a.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a,t),a}return t}(Error),sf=function(e){le(t,e);function t(n,i){return e.call(this,Qe.UNSUPPORTED_FORMATTER,n,i)||this}return t}(Bn),of=function(e){le(t,e);function t(n,i){return e.call(this,Qe.INVALID_CONFIG,n,i)||this}return t}(Bn),Wo=function(e){le(t,e);function t(n,i){return e.call(this,Qe.MISSING_DATA,n,i)||this}return t}(Bn),re=function(e){le(t,e);function t(n,i,r){var a=e.call(this,Qe.FORMAT_ERROR,"".concat(n,`
|
|
7
7
|
Locale: `).concat(i,`
|
|
8
|
-
`),r)||this;return a.locale=i,a}return t}(
|
|
8
|
+
`),r)||this;return a.locale=i,a}return t}(Bn),$r=function(e){le(t,e);function t(n,i,r,a){var s=e.call(this,"".concat(n,`
|
|
9
9
|
MessageID: `).concat(r==null?void 0:r.id,`
|
|
10
10
|
Default Message: `).concat(r==null?void 0:r.defaultMessage,`
|
|
11
11
|
Description: `).concat(r==null?void 0:r.description,`
|
|
12
|
-
`),i,a)||this;return s.descriptor=r,s.locale=i,s}return t}(
|
|
12
|
+
`),i,a)||this;return s.descriptor=r,s.locale=i,s}return t}(re),lf=function(e){le(t,e);function t(n,i){var r=e.call(this,Qe.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(i,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(a){var s;return(s=a.value)!==null&&s!==void 0?s:JSON.stringify(a)}).join(),")"):"id"," as fallback."))||this;return r.descriptor=n,r}return t}(Bn);function Je(e,t,n){return n===void 0&&(n={}),t.reduce(function(i,r){return r in e?i[r]=e[r]:r in n&&(i[r]=n[r]),i},{})}var cf=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},uf=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},df={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:cf,onWarn:uf};function Yo(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function tn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function hf(e){e===void 0&&(e=Yo());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,i=Intl.DisplayNames,r=de(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.DateTimeFormat).bind.apply(o,Te([void 0],l,!1)))},{cache:tn(e.dateTime),strategy:he.variadic}),a=de(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.NumberFormat).bind.apply(o,Te([void 0],l,!1)))},{cache:tn(e.number),strategy:he.variadic}),s=de(function(){for(var o,l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];return new((o=Intl.PluralRules).bind.apply(o,Te([void 0],l,!1)))},{cache:tn(e.pluralRules),strategy:he.variadic});return{getDateTimeFormat:r,getNumberFormat:a,getMessageFormat:de(function(o,l,c,u){return new Uo(o,l,c,I({formatters:{getNumberFormat:a,getDateTimeFormat:r,getPluralRules:s}},u||{}))},{cache:tn(e.message),strategy:he.variadic}),getRelativeTimeFormat:de(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(t.bind.apply(t,Te([void 0],o,!1)))},{cache:tn(e.relativeTime),strategy:he.variadic}),getPluralRules:s,getListFormat:de(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(n.bind.apply(n,Te([void 0],o,!1)))},{cache:tn(e.list),strategy:he.variadic}),getDisplayNames:de(function(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];return new(i.bind.apply(i,Te([void 0],o,!1)))},{cache:tn(e.displayNames),strategy:he.variadic})}}function Vr(e,t,n,i){var r=e&&e[t],a;if(r&&(a=r[n]),a)return a;i(new sf("No ".concat(t," format named: ").concat(n)))}function ff(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}function Li(e,t){return Object.keys(e).reduce(function(n,i){return n[i]=I({timeZone:t},e[i]),n},{})}function zo(e,t){var n=Object.keys(I(I({},e),t));return n.reduce(function(i,r){return i[r]=I(I({},e[r]||{}),t[r]||{}),i},{})}function jo(e,t){if(!t)return e;var n=Uo.formats;return I(I(I({},n),e),{date:zo(Li(n.date,t),Li(e.date||{},t)),time:zo(Li(n.time,t),Li(e.time||{},t))})}var $o=function(e,t,n,i,r){var a=e.locale,s=e.formats,o=e.messages,l=e.defaultLocale,c=e.defaultFormats,u=e.fallbackOnEmptyString,d=e.onError,h=e.timeZone,f=e.defaultRichTextElements;n===void 0&&(n={id:""});var g=n.id,v=n.defaultMessage;ff(!!g,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var m=String(g),p=o&&Object.prototype.hasOwnProperty.call(o,m)&&o[m];if(Array.isArray(p)&&p.length===1&&p[0].type===gt.literal)return p[0].value;if(!i&&p&&typeof p=="string"&&!f)return p.replace(/'\{(.*?)\}'/gi,"{$1}");if(i=I(I({},f),i||{}),s=jo(s,h),c=jo(c,h),!p){if(u===!1&&p==="")return p;if((!v||a&&a.toLowerCase()!==l.toLowerCase())&&d(new lf(n,a)),v)try{var y=t.getMessageFormat(v,l,c,r);return y.format(i)}catch(_){return d(new $r('Error formatting default message for: "'.concat(m,'", rendering default message verbatim'),a,n,_)),typeof v=="string"?v:m}return m}try{var y=t.getMessageFormat(p,a,s,I({formatters:t},r||{}));return y.format(i)}catch(_){d(new $r('Error formatting message: "'.concat(m,'", using ').concat(v?"default message":"id"," as fallback."),a,n,_))}if(v)try{var y=t.getMessageFormat(v,l,c,r);return y.format(i)}catch(_){d(new $r('Error formatting the default message for: "'.concat(m,'", rendering message verbatim'),a,n,_))}return typeof p=="string"?p:typeof v=="string"?v:m},Vo=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Ii(e,t,n,i){var r=e.locale,a=e.formats,s=e.onError,o=e.timeZone;i===void 0&&(i={});var l=i.format,c=I(I({},o&&{timeZone:o}),l&&Vr(a,t,l,s)),u=Je(i,Vo,c);return t==="time"&&!u.hour&&!u.minute&&!u.second&&!u.timeStyle&&!u.dateStyle&&(u=I(I({},u),{hour:"numeric",minute:"numeric"})),n(r,u)}function gf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ii(e,"date",t,s).format(o)}catch(l){e.onError(new re("Error formatting date.",e.locale,l))}return String(o)}function pf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ii(e,"time",t,s).format(o)}catch(l){e.onError(new re("Error formatting time.",e.locale,l))}return String(o)}function mf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=n[2],o=s===void 0?{}:s,l=e.timeZone,c=e.locale,u=e.onError,d=Je(o,Vo,l?{timeZone:l}:{});try{return t(c,d).formatRange(r,a)}catch(h){u(new re("Error formatting date time range.",e.locale,h))}return String(r)}function bf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ii(e,"date",t,s).formatToParts(o)}catch(l){e.onError(new re("Error formatting date.",e.locale,l))}return[]}function vf(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n[0],a=n[1],s=a===void 0?{}:a,o=typeof r=="string"?new Date(r||0):r;try{return Ii(e,"time",t,s).formatToParts(o)}catch(l){e.onError(new re("Error formatting time.",e.locale,l))}return[]}var yf=["style","type","fallback","languageDisplay"];function xf(e,t,n,i){var r=e.locale,a=e.onError,s=Intl.DisplayNames;s||a(new Re(`Intl.DisplayNames is not available in this environment.
|
|
13
13
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
14
|
-
`,
|
|
14
|
+
`,fe.MISSING_INTL_API));var o=Je(i,yf);try{return t(r,o).of(n)}catch(l){a(new re("Error formatting display name.",r,l))}}var _f=["type","style"],qo=Date.now();function wf(e){return"".concat(qo,"_").concat(e,"_").concat(qo)}function Tf(e,t,n,i){i===void 0&&(i={});var r=Go(e,t,n,i).reduce(function(a,s){var o=s.value;return typeof o!="string"?a.push(o):typeof a[a.length-1]=="string"?a[a.length-1]+=o:a.push(o),a},[]);return r.length===1?r[0]:r.length===0?"":r}function Go(e,t,n,i){var r=e.locale,a=e.onError;i===void 0&&(i={});var s=Intl.ListFormat;s||a(new Re(`Intl.ListFormat is not available in this environment.
|
|
15
15
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
16
|
-
`,
|
|
16
|
+
`,fe.MISSING_INTL_API));var o=Je(i,_f);try{var l={},c=n.map(function(u,d){if(typeof u=="object"){var h=wf(d);return l[h]=u,h}return String(u)});return t(r,o).formatToParts(c).map(function(u){return u.type==="literal"?u:I(I({},u),{value:l[u.value]||u.value})})}catch(u){a(new re("Error formatting list.",r,u))}return n}var Mf=["type"];function Sf(e,t,n,i){var r=e.locale,a=e.onError;i===void 0&&(i={}),Intl.PluralRules||a(new Re(`Intl.PluralRules is not available in this environment.
|
|
17
17
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
18
|
-
`,
|
|
18
|
+
`,fe.MISSING_INTL_API));var s=Je(i,Mf);try{return t(r,s).select(n)}catch(o){a(new re("Error formatting plural.",r,o))}return"other"}var Df=["numeric","style"];function Pf(e,t,n){var i=e.locale,r=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=!!s&&Vr(r,"relative",s,a)||{},l=Je(n,Df,o);return t(i,l)}function kf(e,t,n,i,r){r===void 0&&(r={}),i||(i="second");var a=Intl.RelativeTimeFormat;a||e.onError(new Re(`Intl.RelativeTimeFormat is not available in this environment.
|
|
19
19
|
Try polyfilling it using "@formatjs/intl-relativetimeformat"
|
|
20
|
-
`,
|
|
20
|
+
`,fe.MISSING_INTL_API));try{return Pf(e,t,r).format(n,i)}catch(s){e.onError(new re("Error formatting relative time.",e.locale,s))}return String(n)}var Cf=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Xo(e,t,n){var i=e.locale,r=e.formats,a=e.onError;n===void 0&&(n={});var s=n.format,o=s&&Vr(r,"number",s,a)||{},l=Je(n,Cf,o);return t(i,l)}function Ef(e,t,n,i){i===void 0&&(i={});try{return Xo(e,t,i).format(n)}catch(r){e.onError(new re("Error formatting number.",e.locale,r))}return String(n)}function Of(e,t,n,i){i===void 0&&(i={});try{return Xo(e,t,i).formatToParts(n)}catch(r){e.onError(new re("Error formatting number.",e.locale,r))}return[]}function Af(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function Rf(e){e.onWarn&&e.defaultRichTextElements&&Af(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
|
|
21
21
|
Please consider using "@formatjs/cli" to pre-compile your messages for performance.
|
|
22
|
-
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function
|
|
22
|
+
For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Lf(e,t){var n=hf(t),i=I(I({},df),e),r=i.locale,a=i.defaultLocale,s=i.onError;return r?!Intl.NumberFormat.supportedLocalesOf(r).length&&s?s(new Wo('Missing locale data for locale: "'.concat(r,'" in Intl.NumberFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(r).length&&s&&s(new Wo('Missing locale data for locale: "'.concat(r,'" in Intl.DateTimeFormat. Using default locale: "').concat(a,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new of('"locale" was not configured, using "'.concat(a,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),i.locale=i.defaultLocale||"en"),Rf(i),I(I({},i),{formatters:n,formatNumber:Ef.bind(null,i,n.getNumberFormat),formatNumberToParts:Of.bind(null,i,n.getNumberFormat),formatRelativeTime:kf.bind(null,i,n.getRelativeTimeFormat),formatDate:gf.bind(null,i,n.getDateTimeFormat),formatDateToParts:bf.bind(null,i,n.getDateTimeFormat),formatTime:pf.bind(null,i,n.getDateTimeFormat),formatDateTimeRange:mf.bind(null,i,n.getDateTimeFormat),formatTimeToParts:vf.bind(null,i,n.getDateTimeFormat),formatPlural:Sf.bind(null,i,n.getPluralRules),formatMessage:$o.bind(null,i,n),$t:$o.bind(null,i,n),formatList:Tf.bind(null,i,n.getListFormat),formatListToParts:Go.bind(null,i,n.getListFormat),formatDisplayName:xf.bind(null,i,n.getDisplayNames)})}var If=Hn;Hn.flatten=Hn,Hn.unflatten=Qo;function Ko(e){return e&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Zo(e){return e}function Hn(e,t){t=t||{};const n=t.delimiter||".",i=t.maxDepth,r=t.transformKey||Zo,a={};function s(o,l,c){c=c||1,Object.keys(o).forEach(function(u){const d=o[u],h=t.safe&&Array.isArray(d),f=Object.prototype.toString.call(d),g=Ko(d),v=f==="[object Object]"||f==="[object Array]",m=l?l+n+r(u):r(u);if(!h&&!g&&v&&Object.keys(d).length&&(!t.maxDepth||c<i))return s(d,m,c+1);a[m]=d})}return s(e),a}function Qo(e,t){t=t||{};const n=t.delimiter||".",i=t.overwrite||!1,r=t.transformKey||Zo,a={};if(Ko(e)||Object.prototype.toString.call(e)!=="[object Object]")return e;function s(c){const u=Number(c);return isNaN(u)||c.indexOf(".")!==-1||t.object?c:u}function o(c,u,d){return Object.keys(d).reduce(function(h,f){return h[c+n+f]=d[f],h},u)}function l(c){const u=Object.prototype.toString.call(c),d=u==="[object Array]",h=u==="[object Object]";if(c){if(d)return!c.length;if(h)return!Object.keys(c).length}else return!0}return e=Object.keys(e).reduce(function(c,u){const d=Object.prototype.toString.call(e[u]);return!(d==="[object Object]"||d==="[object Array]")||l(e[u])?(c[u]=e[u],c):o(u,c,Hn(e[u],t))},{}),Object.keys(e).forEach(function(c){const u=c.split(n).map(r);let d=s(u.shift()),h=s(u[0]),f=a;for(;h!==void 0;){if(d==="__proto__")return;const g=Object.prototype.toString.call(f[d]),v=g==="[object Object]"||g==="[object Array]";if(!i&&!v&&typeof f[d]<"u")return;(i&&!v||!i&&f[d]==null)&&(f[d]=typeof h=="number"&&!t.object?[]:{}),f=f[d],u.length>0&&(d=s(u.shift()),h=s(u[0]))}f[d]=Qo(e[c],t)}),a}const Nf=Yo(),Bf=(e,t,n=!1)=>{const i=Lf({...typeof n=="boolean"?null:n,locale:e,messages:If.flatten(t,{safe:!0})},Nf),{$t:r,...a}=i,s=a,o=c=>{const u="Invalid Date";if(!c)return u;try{const d=new Date(c*1e3);return s.formatDate(d,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"})}catch{return u}},l={formatUnixTimeStamp:o,formatIsoDate:c=>{const u=Date.parse(c)/1e3;return o(u)},t:(c,u,d)=>s.formatMessage({id:c},u,d),te:c=>!!s.messages[c],tm:c=>s.messages[c]||[],...s,source:t};return typeof n=="boolean"&&n===!0||typeof n!="boolean"&&n.isGlobal,l},Hf=(e=null)=>b.defineComponent({name:"I18nT",props:{i18n:{type:Object,default:null},keypath:{type:String,required:!0},tag:{type:String,default:"span"}},setup(t,{slots:n}){const i=r=>{if(!r)return[];const a=/(\{[^}]+\})/g;return r.split(a).filter(Boolean)};return()=>{const r=Object.keys(n).filter(o=>o!=="_"),a=(e||t.i18n).messages[t.keypath].toString();let s=i(a);return s=s.filter(o=>o!==""),s.forEach((o,l)=>{if(!o.startsWith("{")&&!o.endsWith("}"))return;const c=o.replace(/[\{\}]/g,"");c==="0"&&n.default?s[l]=n.default():r.includes(c)&&n[c]&&(s[l]=n[c]())}),b.h(t.tag,t,s)}}}),Ff={noDataAvailableTitle:"No data in the current time frame",noDataAvailableDescription:"Once there is traffic, it will display here",limitedResultsShown:"Not all data is shown in the below report. Reports are currently limited to a maximum of {maxReturned} entities.",entityNoName:"no-name",chartUnits:{ms:"ms",bytes:"Bytes",count:"requests","count/minute":"rpm",requests:"requests"},legend:{datapointValueDisplay:"{value} {unit}"},chartLabels:{Service:"Service",ServiceVersion:"Service Version",Route:"Route",Application:"Application",RuntimeGroup:"Runtime Group",GatewayService:"Gateway Service",StatusCode:"Status Code",CodeClass:"Status Code (grouped)",Time:"Time",API_PRODUCT:"API Product",API_PRODUCT_VERSION:"API Product Version",RUNTIME_GROUP:"Runtime Group",GATEWAY_SERVICE:"Gateway Service",ROUTE:"Route",APPLICATION:"Application",STATUS_CODE:"Status Code",STATUS_CODE_GROUPED:"Status Code (grouped)",TIME:"Time",ORGANIZATION:"Organization",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99)",LatencyP95:"Response Latency (p95)",LatencyP50:"Response Latency (p50)",LatencyAverage:"Response Latency (avg)",UpstreamLatencyP99:"Upstream Latency (p99)",UpstreamLatencyP95:"Upstream Latency (p95)",UpstreamLatencyP50:"Upstream Latency (p50)",UpstreamLatencyAverage:"Upstream Latency (avg)",KongLatencyP99:"Kong Latency (p99)",KongLatencyP95:"Kong Latency (p95)",KongLatencyP50:"Kong Latency (p50)",KongLatencyAverage:"Kong Latency (avg)",ResponseSizeP99:"Response Size (p99)",ResponseSizeP95:"Response Size (p95)",ResponseSizeP50:"Response Size (p50)",RequestSizeP99:"Request Size (p99)",RequestSizeP95:"Request Size (p95)",RequestSizeP50:"Request Size (p50)",SuccessfulRequests:"Successful requests",SUCCESS:"Successful requests",FailedRequests:"Failed requests",FAILURE:"Failed requests","5XX":"5xx","4XX":"4xx",REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency",RESPONSE_LATENCY_P95:"Response Latency",RESPONSE_LATENCY_P50:"Response Latency",RESPONSE_SIZE_P99:"Response Size (p99)",RESPONSE_SIZE_P95:"Response Size (p95)",RESPONSE_SIZE_P50:"Response Size (p50)",REQUEST_SIZE_P99:"Request Size (p99)",REQUEST_SIZE_P95:"Request Size (p95)",REQUEST_SIZE_P50:"Request Size (p50)"},metricAxisTitles:{REQUEST_COUNT:"Request Count",REQUEST_PER_MINUTE:"Requests per Minute",RESPONSE_LATENCY_P99:"Response Latency (p99) in {unit}",RESPONSE_LATENCY_P95:"Response Latency (p95) in {unit}",RESPONSE_LATENCY_P50:"Response Latency (p50) in {unit}",RESPONSE_SIZE_P99:"Response Size (p99) in {unit}",RESPONSE_SIZE_P95:"Response Size (p95) in {unit}",RESPONSE_SIZE_P50:"Response Size (p50) in {unit}",REQUEST_SIZE_P99:"Request Size (p99) in {unit}",REQUEST_SIZE_P95:"Request Size (p95) in {unit}",REQUEST_SIZE_P50:"Request Size (p50) in {unit}",TotalRequests:"Request Count",RequestsPerMinute:"Requests per Minute",LatencyP99:"Response Latency (p99) in {unit}",LatencyP95:"Response Latency (p95) in {unit}",LatencyP50:"Response Latency (p50) in {unit}",LatencyAverage:"Response Latency (avg) in {unit}",UpstreamLatencyP99:"Upstream Latency (p99) in {unit}",UpstreamLatencyP95:"Upstream Latency (p95) in {unit}",UpstreamLatencyP50:"Upstream Latency (p50) in {unit}",UpstreamLatencyAverage:"Upstream Latency (avg) in {unit}",KongLatencyP99:"Kong Latency (p99) in {unit}",KongLatencyP95:"Kong Latency (p95) in {unit}",KongLatencyP50:"Kong Latency (p50) in {unit}",KongLatencyAverage:"Kong Latency (avg) in {unit}",ResponseSizeP99:"Response Size (p99) in {unit}",ResponseSizeP95:"Response Size (p95) in {unit}",ResponseSizeP50:"Response Size (p50) in {unit}",RequestSizeP99:"Request Size (p99) in {unit}",RequestSizeP95:"Request Size (p95) in {unit}",RequestSizeP50:"Request Size (p50) in {unit}"},granularityAxisTitles:{Minutely:"@timestamp per minute",Hourly:"@timestamp per hour",Daily:"@timestamp per day",Weekly:"@timestamp per week"}};function Uf(){const e=Bf("en-us",Ff);return{i18n:e,i18nT:Hf(e)}}/*!
|
|
23
23
|
* @kurkle/color v0.3.2
|
|
24
24
|
* https://github.com/kurkle/color#readme
|
|
25
25
|
* (c) 2023 Jukka Kurkela
|
|
26
26
|
* Released under the MIT License
|
|
27
|
-
*/function
|
|
27
|
+
*/function Fn(e){return e+.5|0}const Le=(e,t,n)=>Math.max(Math.min(e,n),t);function Un(e){return Le(Fn(e*2.55),0,255)}function Ie(e){return Le(Fn(e*255),0,255)}function Me(e){return Le(Fn(e/2.55)/100,0,1)}function Jo(e){return Le(Fn(e*100),0,100)}const ae={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},qr=[..."0123456789ABCDEF"],Wf=e=>qr[e&15],Yf=e=>qr[(e&240)>>4]+qr[e&15],Ni=e=>(e&240)>>4===(e&15),zf=e=>Ni(e.r)&&Ni(e.g)&&Ni(e.b)&&Ni(e.a);function jf(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ae[e[1]]*17,g:255&ae[e[2]]*17,b:255&ae[e[3]]*17,a:t===5?ae[e[4]]*17:255}:(t===7||t===9)&&(n={r:ae[e[1]]<<4|ae[e[2]],g:ae[e[3]]<<4|ae[e[4]],b:ae[e[5]]<<4|ae[e[6]],a:t===9?ae[e[7]]<<4|ae[e[8]]:255})),n}const $f=(e,t)=>e<255?t(e):"";function Vf(e){var t=zf(e)?Wf:Yf;return e?"#"+t(e.r)+t(e.g)+t(e.b)+$f(e.a,t):void 0}const qf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tl(e,t,n){const i=t*Math.min(n,1-n),r=(a,s=(a+e/30)%12)=>n-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function Gf(e,t,n){const i=(r,a=(r+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[i(5),i(3),i(1)]}function Xf(e,t,n){const i=tl(e,1,.5);let r;for(t+n>1&&(r=1/(t+n),t*=r,n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function Kf(e,t,n,i,r){return e===r?(t-n)/i+(t<n?6:0):t===r?(n-e)/i+2:(e-t)/i+4}function Gr(e){const n=e.r/255,i=e.g/255,r=e.b/255,a=Math.max(n,i,r),s=Math.min(n,i,r),o=(a+s)/2;let l,c,u;return a!==s&&(u=a-s,c=o>.5?u/(2-a-s):u/(a+s),l=Kf(n,i,r,u,a),l=l*60+.5),[l|0,c||0,o]}function Xr(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(Ie)}function Kr(e,t,n){return Xr(tl,e,t,n)}function Zf(e,t,n){return Xr(Xf,e,t,n)}function Qf(e,t,n){return Xr(Gf,e,t,n)}function el(e){return(e%360+360)%360}function Jf(e){const t=qf.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?Un(+t[5]):Ie(+t[5]));const r=el(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=Zf(r,a,s):t[1]==="hsv"?i=Qf(r,a,s):i=Kr(r,a,s),{r:i[0],g:i[1],b:i[2],a:n}}function tg(e,t){var n=Gr(e);n[0]=el(n[0]+t),n=Kr(n),e.r=n[0],e.g=n[1],e.b=n[2]}function eg(e){if(!e)return;const t=Gr(e),n=t[0],i=Jo(t[1]),r=Jo(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${r}%, ${Me(e.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const nl={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"},il={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ng(){const e={},t=Object.keys(il),n=Object.keys(nl);let i,r,a,s,o;for(i=0;i<t.length;i++){for(s=o=t[i],r=0;r<n.length;r++)a=n[r],o=o.replace(a,nl[a]);a=parseInt(il[s],16),e[o]=[a>>16&255,a>>8&255,a&255]}return e}let Bi;function ig(e){Bi||(Bi=ng(),Bi.transparent=[0,0,0,0]);const t=Bi[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const rg=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ag(e){const t=rg.exec(e);let n=255,i,r,a;if(t){if(t[7]!==i){const s=+t[7];n=t[8]?Un(s):Le(s*255,0,255)}return i=+t[1],r=+t[3],a=+t[5],i=255&(t[2]?Un(i):Le(i,0,255)),r=255&(t[4]?Un(r):Le(r,0,255)),a=255&(t[6]?Un(a):Le(a,0,255)),{r:i,g:r,b:a,a:n}}}function sg(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Me(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Zr=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,yn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function og(e,t,n){const i=yn(Me(e.r)),r=yn(Me(e.g)),a=yn(Me(e.b));return{r:Ie(Zr(i+n*(yn(Me(t.r))-i))),g:Ie(Zr(r+n*(yn(Me(t.g))-r))),b:Ie(Zr(a+n*(yn(Me(t.b))-a))),a:e.a+n*(t.a-e.a)}}function Hi(e,t,n){if(e){let i=Gr(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=Kr(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function rl(e,t){return e&&Object.assign(t||{},e)}function al(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Ie(e[3]))):(t=rl(e,{r:0,g:0,b:0,a:1}),t.a=Ie(t.a)),t}function lg(e){return e.charAt(0)==="r"?ag(e):Jf(e)}class Wn{constructor(t){if(t instanceof Wn)return t;const n=typeof t;let i;n==="object"?i=al(t):n==="string"&&(i=jf(t)||ig(t)||lg(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=rl(this._rgb);return t&&(t.a=Me(t.a)),t}set rgb(t){this._rgb=al(t)}rgbString(){return this._valid?sg(this._rgb):void 0}hexString(){return this._valid?Vf(this._rgb):void 0}hslString(){return this._valid?eg(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,r=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,l=i.a-r.a,c=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-c,i.r=255&c*i.r+a*r.r+.5,i.g=255&c*i.g+a*r.g+.5,i.b=255&c*i.b+a*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=og(this._rgb,t._rgb,n)),this}clone(){return new Wn(this.rgb)}alpha(t){return this._rgb.a=Ie(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Fn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.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 Hi(this._rgb,2,t),this}darken(t){return Hi(this._rgb,2,-t),this}saturate(t){return Hi(this._rgb,1,t),this}desaturate(t){return Hi(this._rgb,1,-t),this}rotate(t){return tg(this._rgb,t),this}}/*!
|
|
28
28
|
* Chart.js v4.3.0
|
|
29
29
|
* https://www.chartjs.org
|
|
30
30
|
* (c) 2023 Chart.js Contributors
|
|
31
31
|
* Released under the MIT License
|
|
32
|
-
*/function Me(){}const sg=(()=>{let e=0;return()=>e++})();function U(e){return e===null||typeof e>"u"}function tt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function j(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function xt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ee(e,t){return xt(e)?e:t}function F(e,t){return typeof e>"u"?t:e}const og=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,il=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function st(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function ot(e,t,n,i){let r,a,s;if(tt(e))if(a=e.length,i)for(r=a-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<a;r++)t.call(n,e[r],r);else if(j(e))for(s=Object.keys(e),a=s.length,r=0;r<a;r++)t.call(n,e[s[r]],s[r])}function Hi(e,t){let n,i,r,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],a=t[n],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Fi(e){if(tt(e))return e.map(Fi);if(j(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=Fi(e[n[r]]);return t}return e}function rl(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function lg(e,t,n,i){if(!rl(e))return;const r=t[e],a=n[e];j(r)&&j(a)?Wn(r,a,i):t[e]=Fi(a)}function Wn(e,t,n){const i=tt(t)?t:[t],r=i.length;if(!j(e))return e;n=n||{};const a=n.merger||lg;let s;for(let o=0;o<r;++o){if(s=i[o],!j(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],e,s,n)}return e}function Yn(e,t){return Wn(e,t,{merger:cg})}function cg(e,t,n){if(!rl(e))return;const i=t[e],r=n[e];j(i)&&j(r)?Yn(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Fi(r))}const al={"":e=>e,x:e=>e.x,y:e=>e.y};function ug(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function dg(e){const t=ug(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function Ie(e,t){return(al[t]||(al[t]=dg(t)))(e)}function Zr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const qt=e=>typeof e<"u",Gt=e=>typeof e=="function",sl=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function hg(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const q=Math.PI,dt=2*q,fg=dt+q,Ui=Number.POSITIVE_INFINITY,Qr=q/180,ht=q/2,ae=q/4,Wi=q*2/3,Ne=Math.log10,fe=Math.sign;function zn(e,t,n){return Math.abs(e-t)<n}function ol(e){const t=Math.round(e);e=zn(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Ne(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function gg(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,a)=>r-a).pop(),t}function Be(e){return!isNaN(parseFloat(e))&&isFinite(e)}function mg(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function ll(e,t,n){let i,r,a;for(i=0,r=e.length;i<r;i++)a=e[i][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function kt(e){return e*(q/180)}function Yi(e){return e*(180/q)}function cl(e){if(!xt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function ul(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*q&&(a+=dt),{angle:a,distance:r}}function yn(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function pg(e,t){return(e-t+fg)%dt-q}function ne(e){return(e%dt+dt)%dt}function jn(e,t,n,i){const r=ne(e),a=ne(t),s=ne(n),o=ne(a-r),l=ne(s-r),c=ne(r-a),u=ne(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function Nt(e,t,n){return Math.max(t,Math.min(n,e))}function bg(e){return Nt(e,-32768,32767)}function Se(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function Jr(e,t,n){n=n||(s=>e[s]<t);let i=e.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,n(a)?r=a:i=a;return{lo:r,hi:i}}const De=(e,t,n,i)=>Jr(e,n,i?r=>{const a=e[r][t];return a<n||a===n&&e[r+1][t]===n}:r=>e[r][t]<n),vg=(e,t,n)=>Jr(e,n,i=>e[i][t]>=n);function yg(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const dl=["push","pop","shift","splice","unshift"];function xg(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),dl.forEach(n=>{const i="_onData"+Zr(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function hl(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(dl.forEach(a=>{delete e[a]}),delete e._chartjs)}function fl(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const gl=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function ml(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,gl.call(window,()=>{i=!1,e.apply(t,n)}))}}function _g(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const ta=e=>e==="start"?"left":e==="end"?"right":"center",Wt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,wg=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function pl(e,t,n){const i=t.length;let r=0,a=i;if(e._sorted){const{iScale:s,_parsed:o}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=Nt(Math.min(De(o,s.axis,c).lo,n?i:De(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=Nt(Math.max(De(o,s.axis,u,!0).hi+1,n?0:De(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function bl(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),a}const zi=e=>e===0||e===1,vl=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*dt/n)),yl=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*dt/n)+1,Vn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ht)+1,easeOutSine:e=>Math.sin(e*ht),easeInOutSine:e=>-.5*(Math.cos(q*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>zi(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>zi(e)?e:vl(e,.075,.3),easeOutElastic:e=>zi(e)?e:yl(e,.075,.3),easeInOutElastic(e){return zi(e)?e:e<.5?.5*vl(e*2,.1125,.45):.5+.5*yl(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Vn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Vn.easeInBounce(e*2)*.5:Vn.easeOutBounce(e*2-1)*.5+.5};function ea(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xl(e){return ea(e)?e:new Un(e)}function na(e){return ea(e)?e:new Un(e).saturate(.5).darken(.1).hexString()}const Tg=["x","y","borderWidth","radius","tension"],Mg=["color","borderColor","backgroundColor"];function Sg(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Mg},numbers:{type:"number",properties:Tg}}),e.describe("animations",{_fallback:"animation"}),e.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=>t|0}}}})}function Dg(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _l=new Map;function Pg(e,t){t=t||{};const n=e+JSON.stringify(t);let i=_l.get(n);return i||(i=new Intl.NumberFormat(e,t),_l.set(n,i)),i}function $n(e,t,n){return Pg(t,n).format(e)}const wl={values(e){return tt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=Eg(e,n)}const s=Ne(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),$n(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(Ne(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?wl.numeric.call(this,e,t,n):""}};function Eg(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var ji={formatters:wl};function Cg(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ji.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Je=Object.create(null),ia=Object.create(null);function qn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const a=n[i];e=e[a]||(e[a]=Object.create(null))}return e}function ra(e,t,n){return typeof t=="string"?Wn(qn(e,t),n):Wn(qn(e,""),t)}class kg{constructor(t,n){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=i=>i.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=(i,r)=>na(r.backgroundColor),this.hoverBorderColor=(i,r)=>na(r.borderColor),this.hoverColor=(i,r)=>na(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return ra(this,t,n)}get(t){return qn(this,t)}describe(t,n){return ra(ia,t,n)}override(t,n){return ra(Je,t,n)}route(t,n,i,r){const a=qn(this,t),s=qn(this,i),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],c=s[r];return j(l)?Object.assign({},c,l):F(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(n=>n(this))}}var wt=new kg({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Sg,Dg,Cg]);function Og(e){return!e||U(e.size)||U(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Vi(e,t,n,i,r){let a=t[r];return a||(a=t[r]=e.measureText(r).width,n.push(r)),a>i&&(i=a),i}function Ag(e,t,n,i){i=i||{};let r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},a=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let s=0;const o=n.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=n[l],d!=null&&!tt(d))s=Vi(e,r,a,s,d);else if(tt(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!tt(h)&&(s=Vi(e,r,a,s,h));e.restore();const f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function tn(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Tl(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function aa(e,t,n,i){Ml(e,t,n,i,null)}function Ml(e,t,n,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,g=t.rotation,v=t.radius;let p=(g||0)*Qr;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(p),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(v)||v<=0)){switch(e.beginPath(),f){default:r?e.ellipse(n,i,r/2,v,0,0,dt):e.arc(n,i,v,0,dt),e.closePath();break;case"triangle":u=r?r/2:v,e.moveTo(n+Math.sin(p)*u,i-Math.cos(p)*v),p+=Wi,e.lineTo(n+Math.sin(p)*u,i-Math.cos(p)*v),p+=Wi,e.lineTo(n+Math.sin(p)*u,i-Math.cos(p)*v),e.closePath();break;case"rectRounded":c=v*.516,l=v-c,s=Math.cos(p+ae)*l,d=Math.cos(p+ae)*(r?r/2-c:l),o=Math.sin(p+ae)*l,h=Math.sin(p+ae)*(r?r/2-c:l),e.arc(n-d,i-o,c,p-q,p-ht),e.arc(n+h,i-s,c,p-ht,p),e.arc(n+d,i+o,c,p,p+ht),e.arc(n-h,i+s,c,p+ht,p+q),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*v,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}p+=ae;case"rectRot":d=Math.cos(p)*(r?r/2:v),s=Math.cos(p)*v,o=Math.sin(p)*v,h=Math.sin(p)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+h,i-s),e.lineTo(n+d,i+o),e.lineTo(n-h,i+s),e.closePath();break;case"crossRot":p+=ae;case"cross":d=Math.cos(p)*(r?r/2:v),s=Math.cos(p)*v,o=Math.sin(p)*v,h=Math.sin(p)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"star":d=Math.cos(p)*(r?r/2:v),s=Math.cos(p)*v,o=Math.sin(p)*v,h=Math.sin(p)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s),p+=ae,d=Math.cos(p)*(r?r/2:v),s=Math.cos(p)*v,o=Math.sin(p)*v,h=Math.sin(p)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"line":s=r?r/2:Math.cos(p)*v,o=Math.sin(p)*v,e.moveTo(n-s,i-o),e.lineTo(n+s,i+o);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(p)*(r?r/2:v),i+Math.sin(p)*v);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Pe(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Gn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Xn(e){e.restore()}function Rg(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Lg(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Ig(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),U(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Ng(e,t,n,i,r){if(r.strikethrough||r.underline){const a=e.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,u),e.lineTo(o,u),e.stroke()}}function Bg(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function en(e,t,n,i,r,a={}){const s=tt(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=r.string,Ig(e,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Bg(e,a.backdrop),o&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),U(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,i,a.maxWidth)),e.fillText(c,n,i,a.maxWidth),Ng(e,n,i,c,a),i+=Number(r.lineHeight);e.restore()}function xn(e,t){const{x:n,y:i,w:r,h:a,radius:s}=t;e.arc(n+s.topLeft,i+s.topLeft,s.topLeft,-ht,q,!0),e.lineTo(n,i+a-s.bottomLeft),e.arc(n+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,q,ht,!0),e.lineTo(n+r-s.bottomRight,i+a),e.arc(n+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,ht,0,!0),e.lineTo(n+r,i+s.topRight),e.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-ht,!0),e.lineTo(n+s.topLeft,i)}const Hg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Fg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Ug(e,t){const n=(""+e).match(Hg);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const Wg=e=>+e||0;function sa(e,t){const n={},i=j(t),r=i?Object.keys(t):t,a=j(e)?i?s=>F(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of r)n[s]=Wg(a(s));return n}function Sl(e){return sa(e,{top:"y",right:"x",bottom:"y",left:"x"})}function He(e){return sa(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Ot(e){const t=Sl(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function mt(e,t){e=e||{},t=t||wt.font;let n=F(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=F(e.style,t.style);i&&!(""+i).match(Fg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:F(e.family,t.family),lineHeight:Ug(F(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:F(e.weight,t.weight),string:""};return r.string=Og(r),r}function Kn(e,t,n,i){let r=!0,a,s,o;for(a=0,s=e.length;a<s;++a)if(o=e[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),n!==void 0&&tt(o)&&(o=o[n%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function Yg(e,t,n){const{min:i,max:r}=e,a=il(t,(r-i)/2),s=(o,l)=>n&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function Fe(e,t){return Object.assign(Object.create(e),t)}function oa(e,t=[""],n,i,r=()=>e[0]){const a=n||e;typeof i>"u"&&(i=kl("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>oa([o,...e],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete e[0][l],!0},get(o,l){return Pl(o,l,()=>Kg(l,t,e,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,l){return Ol(o).includes(l)},ownKeys(o){return Ol(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function _n(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Dl(e,i),setContext:a=>_n(e,a,n,i),override:a=>_n(e.override(a),t,n,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return Pl(a,s,()=>jg(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function Dl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:Gt(n)?n:()=>n,isIndexable:Gt(i)?i:()=>i}}const zg=(e,t)=>e?e+Zr(t):t,la=(e,t)=>j(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Pl(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function jg(e,t,n){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=e;let o=i[t];return Gt(o)&&s.isScriptable(t)&&(o=Vg(t,o,e,n)),tt(o)&&o.length&&(o=$g(t,o,e,s.isIndexable)),la(t,o)&&(o=_n(o,r,a&&a[t],s)),o}function Vg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||i);return o.delete(e),la(e,l)&&(l=ca(r._scopes,r,e,l)),l}function $g(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&i(e))return t[a.index%t.length];if(j(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=ca(c,r,e,u);t.push(_n(d,a,s&&s[e],o))}}return t}function El(e,t,n){return Gt(e)?e(t,n):e}const qg=(e,t)=>e===!0?t:typeof e=="string"?Ie(t,e):void 0;function Gg(e,t,n,i,r){for(const a of t){const s=qg(n,a);if(s){e.add(s);const o=El(s._fallback,n,r);if(typeof o<"u"&&o!==n&&o!==i)return o}else if(s===!1&&typeof i<"u"&&n!==i)return null}return!1}function ca(e,t,n,i){const r=t._rootScopes,a=El(t._fallback,n,i),s=[...e,...r],o=new Set;o.add(i);let l=Cl(o,s,n,a||n,i);return l===null||typeof a<"u"&&a!==n&&(l=Cl(o,s,a,l,i),l===null)?!1:oa(Array.from(o),[""],r,a,()=>Xg(t,n,i))}function Cl(e,t,n,i,r){for(;n;)n=Gg(e,t,n,i,r);return n}function Xg(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return tt(r)&&j(n)?n:r||{}}function Kg(e,t,n,i){let r;for(const a of t)if(r=kl(zg(a,e),n),typeof r<"u")return la(e,r)?ca(n,i,e,r):r}function kl(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function Ol(e){let t=e._keys;return t||(t=e._keys=Zg(e._scopes)),t}function Zg(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Al(e,t,n,i){const{iScale:r}=e,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+n,u=t[c],s[o]={r:r.parse(Ie(u,a),c)};return s}const Qg=Number.EPSILON||1e-14,wn=(e,t)=>t<e.length&&!e[t].skip&&e[t],Rl=e=>e==="x"?"y":"x";function Jg(e,t,n,i){const r=e.skip?t:e,a=t,s=n.skip?t:n,o=yn(a,r),l=yn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function tm(e,t,n){const i=e.length;let r,a,s,o,l,c=wn(e,0);for(let u=0;u<i-1;++u)if(l=c,c=wn(e,u+1),!(!l||!c)){if(zn(t[u],0,Qg)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],a=n[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),n[u]=r*s*t[u],n[u+1]=a*s*t[u])}}function em(e,t,n="x"){const i=Rl(n),r=e.length;let a,s,o,l=wn(e,0);for(let c=0;c<r;++c){if(s=o,o=l,l=wn(e,c+1),!o)continue;const u=o[n],d=o[i];s&&(a=(u-s[n])/3,o[`cp1${n}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[n]-u)/3,o[`cp2${n}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function nm(e,t="x"){const n=Rl(t),i=e.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=wn(e,0);for(s=0;s<i;++s)if(o=l,l=c,c=wn(e,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[n]-l[n])/u:0}a[s]=o?c?fe(r[s-1])!==fe(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}tm(e,r,a),em(e,a,t)}function $i(e,t,n){return Math.max(Math.min(e,n),t)}function im(e,t){let n,i,r,a,s,o=Pe(e[0],t);for(n=0,i=e.length;n<i;++n)s=a,a=o,o=n<i-1&&Pe(e[n+1],t),a&&(r=e[n],s&&(r.cp1x=$i(r.cp1x,t.left,t.right),r.cp1y=$i(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=$i(r.cp2x,t.left,t.right),r.cp2y=$i(r.cp2y,t.top,t.bottom)))}function rm(e,t,n,i,r){let a,s,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")nm(e,r);else{let c=i?e[e.length-1]:e[0];for(a=0,s=e.length;a<s;++a)o=e[a],l=Jg(c,o,e[Math.min(a+1,s-(i?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&im(e,n)}function Ll(){return typeof window<"u"&&typeof document<"u"}function ua(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function qi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Gi=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function am(e,t){return Gi(e).getPropertyValue(t)}const sm=["top","right","bottom","left"];function nn(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const a=sm[r];i[a]=parseFloat(e[t+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const om=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function lm(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(om(r,a,e.target))o=r,l=a;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function rn(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Gi(n),a=r.boxSizing==="border-box",s=nn(r,"padding"),o=nn(r,"border","width"),{x:l,y:c,box:u}=lm(e,n),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:g}=t;return a&&(f-=s.width+o.width,g-=s.height+o.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/g*n.height/i)}}function cm(e,t,n){let i,r;if(t===void 0||n===void 0){const a=ua(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=Gi(a),l=nn(o,"border","width"),c=nn(o,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,i=qi(o.maxWidth,a,"clientWidth"),r=qi(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:i||Ui,maxHeight:r||Ui}}const Xi=e=>Math.round(e*10)/10;function um(e,t,n,i){const r=Gi(e),a=nn(r,"margin"),s=qi(r.maxWidth,e,"clientWidth")||Ui,o=qi(r.maxHeight,e,"clientHeight")||Ui,l=cm(e,t,n);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=nn(r,"border","width"),f=nn(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Xi(Math.min(c,s,l.maxWidth)),u=Xi(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Xi(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Xi(Math.floor(u*i))),{width:c,height:u}}function Il(e,t,n){const i=t||1,r=Math.floor(e.height*i),a=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(e.currentDevicePixelRatio=i,s.height=r,s.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const dm=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function Nl(e,t){const n=am(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function an(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function hm(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function fm(e,t,n,i){const r={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=an(e,r,n),o=an(r,a,n),l=an(a,t,n),c=an(s,o,n),u=an(o,l,n);return an(c,u,n)}const gm=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},mm=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Tn(e,t,n){return e?gm(t,n):mm()}function Bl(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Hl(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Fl(e){return e==="angle"?{between:jn,compare:pg,normalize:ne}:{between:Se,compare:(t,n)=>t-n,normalize:t=>t}}function Ul({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function pm(e,t,n){const{property:i,start:r,end:a}=n,{between:s,normalize:o}=Fl(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Wl(e,t,n){if(!n)return[e];const{property:i,start:r,end:a}=n,s=t.length,{compare:o,between:l,normalize:c}=Fl(i),{start:u,end:d,loop:h,style:f}=pm(e,t,n),g=[];let v=!1,p=null,m,y,_;const x=()=>l(r,_,m)&&o(r,_)!==0,w=()=>o(a,m)===0||l(a,_,m),T=()=>v||x(),M=()=>!v||w();for(let S=u,P=u;S<=d;++S)y=t[S%s],!y.skip&&(m=c(y[i]),m!==_&&(v=l(m,r,a),p===null&&T()&&(p=o(m,r)===0?S:P),p!==null&&M()&&(g.push(Ul({start:p,end:S,loop:h,count:s,style:f})),p=null),P=S,_=m));return p!==null&&g.push(Ul({start:p,end:d,loop:h,count:s,style:f})),g}function Yl(e,t){const n=[],i=e.segments;for(let r=0;r<i.length;r++){const a=Wl(i[r],e.points,t);a.length&&n.push(...a)}return n}function bm(e,t,n,i){let r=0,a=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(a+=r);a>r&&e[a%t].skip;)a--;return a%=t,{start:r,end:a}}function vm(e,t,n,i){const r=e.length,a=[];let s=t,o=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%r];c.skip||c.stop?o.skip||(i=!1,a.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%r,end:s%r,loop:i}),a}function ym(e,t){const n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];const a=!!e._loop,{start:s,end:o}=bm(n,r,a,i);if(i===!0)return zl(e,[{start:s,end:o,loop:a}],n,t);const l=o<s?o+r:o,c=!!e._fullLoop&&s===0&&o===r-1;return zl(e,vm(n,s,l,c),n,t)}function zl(e,t,n,i){return!i||!i.setContext||!n?t:xm(e,t,n,i)}function xm(e,t,n,i){const r=e._chart.getContext(),a=jl(e.options),{_datasetIndex:s,options:{spanGaps:o}}=e,l=n.length,c=[];let u=a,d=t[0].start,h=d;function f(g,v,p,m){const y=o?-1:1;if(g!==v){for(g+=l;n[g%l].skip;)g-=y;for(;n[v%l].skip;)v+=y;g%l!==v%l&&(c.push({start:g%l,end:v%l,loop:p,style:m}),u=m,d=v%l)}}for(const g of t){d=o?d:g.start;let v=n[d%l],p;for(h=d+1;h<=g.end;h++){const m=n[h%l];p=jl(i.setContext(Fe(r,{type:"segment",p0:v,p1:m,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),_m(p,u)&&f(d,h-1,g.loop,u),v=m,u=p}d<h-1&&f(d,h-1,g.loop,u)}return c}function jl(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function _m(e,t){if(!t)return!1;const n=[],i=function(r,a){return ea(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
|
|
32
|
+
*/function Se(){}const cg=(()=>{let e=0;return()=>e++})();function U(e){return e===null||typeof e>"u"}function et(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function $(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function vt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ne(e,t){return vt(e)?e:t}function F(e,t){return typeof e>"u"?t:e}const ug=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,sl=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ot(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function lt(e,t,n,i){let r,a,s;if(et(e))if(a=e.length,i)for(r=a-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<a;r++)t.call(n,e[r],r);else if($(e))for(s=Object.keys(e),a=s.length,r=0;r<a;r++)t.call(n,e[s[r]],s[r])}function Fi(e,t){let n,i,r,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(r=e[n],a=t[n],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function Ui(e){if(et(e))return e.map(Ui);if($(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let r=0;for(;r<i;++r)t[n[r]]=Ui(e[n[r]]);return t}return e}function ol(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function dg(e,t,n,i){if(!ol(e))return;const r=t[e],a=n[e];$(r)&&$(a)?Yn(r,a,i):t[e]=Ui(a)}function Yn(e,t,n){const i=et(t)?t:[t],r=i.length;if(!$(e))return e;n=n||{};const a=n.merger||dg;let s;for(let o=0;o<r;++o){if(s=i[o],!$(s))continue;const l=Object.keys(s);for(let c=0,u=l.length;c<u;++c)a(l[c],e,s,n)}return e}function zn(e,t){return Yn(e,t,{merger:hg})}function hg(e,t,n){if(!ol(e))return;const i=t[e],r=n[e];$(i)&&$(r)?zn(i,r):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Ui(r))}const ll={"":e=>e,x:e=>e.x,y:e=>e.y};function fg(e){const t=e.split("."),n=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function gg(e){const t=fg(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function Ne(e,t){return(ll[t]||(ll[t]=gg(t)))(e)}function Qr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Gt=e=>typeof e<"u",Xt=e=>typeof e=="function",cl=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function pg(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const G=Math.PI,dt=2*G,mg=dt+G,Wi=Number.POSITIVE_INFINITY,Jr=G/180,ht=G/2,se=G/4,Yi=G*2/3,Be=Math.log10,ge=Math.sign;function jn(e,t,n){return Math.abs(e-t)<n}function ul(e){const t=Math.round(e);e=jn(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Be(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function bg(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((r,a)=>r-a).pop(),t}function He(e){return!isNaN(parseFloat(e))&&isFinite(e)}function vg(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function dl(e,t,n){let i,r,a;for(i=0,r=e.length;i<r;i++)a=e[i][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Pt(e){return e*(G/180)}function zi(e){return e*(180/G)}function hl(e){if(!vt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function fl(e,t){const n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i);let a=Math.atan2(i,n);return a<-.5*G&&(a+=dt),{angle:a,distance:r}}function xn(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function yg(e,t){return(e-t+mg)%dt-G}function ie(e){return(e%dt+dt)%dt}function $n(e,t,n,i){const r=ie(e),a=ie(t),s=ie(n),o=ie(a-r),l=ie(s-r),c=ie(r-a),u=ie(r-s);return r===a||r===s||i&&a===s||o>l&&c<u}function It(e,t,n){return Math.max(t,Math.min(n,e))}function xg(e){return It(e,-32768,32767)}function De(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function ta(e,t,n){n=n||(s=>e[s]<t);let i=e.length-1,r=0,a;for(;i-r>1;)a=r+i>>1,n(a)?r=a:i=a;return{lo:r,hi:i}}const Pe=(e,t,n,i)=>ta(e,n,i?r=>{const a=e[r][t];return a<n||a===n&&e[r+1][t]===n}:r=>e[r][t]<n),_g=(e,t,n)=>ta(e,n,i=>e[i][t]>=n);function wg(e,t,n){let i=0,r=e.length;for(;i<r&&e[i]<t;)i++;for(;r>i&&e[r-1]>n;)r--;return i>0||r<e.length?e.slice(i,r):e}const gl=["push","pop","shift","splice","unshift"];function Tg(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),gl.forEach(n=>{const i="_onData"+Qr(n),r=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=r.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...a)}),s}})})}function pl(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(gl.forEach(a=>{delete e[a]}),delete e._chartjs)}function ml(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const bl=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function vl(e,t){let n=[],i=!1;return function(...r){n=r,i||(i=!0,bl.call(window,()=>{i=!1,e.apply(t,n)}))}}function Mg(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const ea=e=>e==="start"?"left":e==="end"?"right":"center",Yt=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Sg=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function yl(e,t,n){const i=t.length;let r=0,a=i;if(e._sorted){const{iScale:s,_parsed:o}=e,l=s.axis,{min:c,max:u,minDefined:d,maxDefined:h}=s.getUserBounds();d&&(r=It(Math.min(Pe(o,s.axis,c).lo,n?i:Pe(t,l,s.getPixelForValue(c)).lo),0,i-1)),h?a=It(Math.max(Pe(o,s.axis,u,!0).hi+1,n?0:Pe(t,l,s.getPixelForValue(u),!0).hi+1),r,i)-r:a=i-r}return{start:r,count:a}}function xl(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,r={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=r,!0;const a=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),a}const ji=e=>e===0||e===1,_l=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*dt/n)),wl=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*dt/n)+1,Vn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ht)+1,easeOutSine:e=>Math.sin(e*ht),easeInOutSine:e=>-.5*(Math.cos(G*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>ji(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>ji(e)?e:_l(e,.075,.3),easeOutElastic:e=>ji(e)?e:wl(e,.075,.3),easeInOutElastic(e){return ji(e)?e:e<.5?.5*_l(e*2,.1125,.45):.5+.5*wl(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Vn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Vn.easeInBounce(e*2)*.5:Vn.easeOutBounce(e*2-1)*.5+.5};function na(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Tl(e){return na(e)?e:new Wn(e)}function ia(e){return na(e)?e:new Wn(e).saturate(.5).darken(.1).hexString()}const Dg=["x","y","borderWidth","radius","tension"],Pg=["color","borderColor","backgroundColor"];function kg(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Pg},numbers:{type:"number",properties:Dg}}),e.describe("animations",{_fallback:"animation"}),e.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=>t|0}}}})}function Cg(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ml=new Map;function Eg(e,t){t=t||{};const n=e+JSON.stringify(t);let i=Ml.get(n);return i||(i=new Intl.NumberFormat(e,t),Ml.set(n,i)),i}function qn(e,t,n){return Eg(t,n).format(e)}const Sl={values(e){return et(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let r,a=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(r="scientific"),a=Og(e,n)}const s=Be(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),qn(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(Be(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?Sl.numeric.call(this,e,t,n):""}};function Og(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var $i={formatters:Sl};function Ag(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$i.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const en=Object.create(null),ra=Object.create(null);function Gn(e,t){if(!t)return e;const n=t.split(".");for(let i=0,r=n.length;i<r;++i){const a=n[i];e=e[a]||(e[a]=Object.create(null))}return e}function aa(e,t,n){return typeof t=="string"?Yn(Gn(e,t),n):Yn(Gn(e,""),t)}class Rg{constructor(t,n){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=i=>i.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=(i,r)=>ia(r.backgroundColor),this.hoverBorderColor=(i,r)=>ia(r.borderColor),this.hoverColor=(i,r)=>ia(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return aa(this,t,n)}get(t){return Gn(this,t)}describe(t,n){return aa(ra,t,n)}override(t,n){return aa(en,t,n)}route(t,n,i,r){const a=Gn(this,t),s=Gn(this,i),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],c=s[r];return $(l)?Object.assign({},c,l):F(l,c)},set(l){this[o]=l}}})}apply(t){t.forEach(n=>n(this))}}var xt=new Rg({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[kg,Cg,Ag]);function Lg(e){return!e||U(e.size)||U(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Vi(e,t,n,i,r){let a=t[r];return a||(a=t[r]=e.measureText(r).width,n.push(r)),a>i&&(i=a),i}function Ig(e,t,n,i){i=i||{};let r=i.data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},a=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let s=0;const o=n.length;let l,c,u,d,h;for(l=0;l<o;l++)if(d=n[l],d!=null&&!et(d))s=Vi(e,r,a,s,d);else if(et(d))for(c=0,u=d.length;c<u;c++)h=d[c],h!=null&&!et(h)&&(s=Vi(e,r,a,s,h));e.restore();const f=a.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[a[l]];a.splice(0,f)}return s}function nn(e,t,n){const i=e.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((t-r)*i)/i+r}function Dl(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function sa(e,t,n,i){Pl(e,t,n,i,null)}function Pl(e,t,n,i,r){let a,s,o,l,c,u,d,h;const f=t.pointStyle,g=t.rotation,v=t.radius;let m=(g||0)*Jr;if(f&&typeof f=="object"&&(a=f.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),e.restore();return}if(!(isNaN(v)||v<=0)){switch(e.beginPath(),f){default:r?e.ellipse(n,i,r/2,v,0,0,dt):e.arc(n,i,v,0,dt),e.closePath();break;case"triangle":u=r?r/2:v,e.moveTo(n+Math.sin(m)*u,i-Math.cos(m)*v),m+=Yi,e.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*v),m+=Yi,e.lineTo(n+Math.sin(m)*u,i-Math.cos(m)*v),e.closePath();break;case"rectRounded":c=v*.516,l=v-c,s=Math.cos(m+se)*l,d=Math.cos(m+se)*(r?r/2-c:l),o=Math.sin(m+se)*l,h=Math.sin(m+se)*(r?r/2-c:l),e.arc(n-d,i-o,c,m-G,m-ht),e.arc(n+h,i-s,c,m-ht,m),e.arc(n+d,i+o,c,m,m+ht),e.arc(n-h,i+s,c,m+ht,m+G),e.closePath();break;case"rect":if(!g){l=Math.SQRT1_2*v,u=r?r/2:l,e.rect(n-u,i-l,2*u,2*l);break}m+=se;case"rectRot":d=Math.cos(m)*(r?r/2:v),s=Math.cos(m)*v,o=Math.sin(m)*v,h=Math.sin(m)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+h,i-s),e.lineTo(n+d,i+o),e.lineTo(n-h,i+s),e.closePath();break;case"crossRot":m+=se;case"cross":d=Math.cos(m)*(r?r/2:v),s=Math.cos(m)*v,o=Math.sin(m)*v,h=Math.sin(m)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"star":d=Math.cos(m)*(r?r/2:v),s=Math.cos(m)*v,o=Math.sin(m)*v,h=Math.sin(m)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s),m+=se,d=Math.cos(m)*(r?r/2:v),s=Math.cos(m)*v,o=Math.sin(m)*v,h=Math.sin(m)*(r?r/2:v),e.moveTo(n-d,i-o),e.lineTo(n+d,i+o),e.moveTo(n+h,i-s),e.lineTo(n-h,i+s);break;case"line":s=r?r/2:Math.cos(m)*v,o=Math.sin(m)*v,e.moveTo(n-s,i-o),e.lineTo(n+s,i+o);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(m)*(r?r/2:v),i+Math.sin(m)*v);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function ke(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Xn(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Kn(e){e.restore()}function Ng(e,t,n,i,r){if(!t)return e.lineTo(n.x,n.y);if(r==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else r==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Bg(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function Hg(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),U(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function Fg(e,t,n,i,r){if(r.strikethrough||r.underline){const a=e.measureText(i),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,l=n-a.actualBoundingBoxAscent,c=n+a.actualBoundingBoxDescent,u=r.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=r.decorationWidth||2,e.moveTo(s,u),e.lineTo(o,u),e.stroke()}}function Ug(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function rn(e,t,n,i,r,a={}){const s=et(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=r.string,Hg(e,a),l=0;l<s.length;++l)c=s[l],a.backdrop&&Ug(e,a.backdrop),o&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),U(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,n,i,a.maxWidth)),e.fillText(c,n,i,a.maxWidth),Fg(e,n,i,c,a),i+=Number(r.lineHeight);e.restore()}function _n(e,t){const{x:n,y:i,w:r,h:a,radius:s}=t;e.arc(n+s.topLeft,i+s.topLeft,s.topLeft,-ht,G,!0),e.lineTo(n,i+a-s.bottomLeft),e.arc(n+s.bottomLeft,i+a-s.bottomLeft,s.bottomLeft,G,ht,!0),e.lineTo(n+r-s.bottomRight,i+a),e.arc(n+r-s.bottomRight,i+a-s.bottomRight,s.bottomRight,ht,0,!0),e.lineTo(n+r,i+s.topRight),e.arc(n+r-s.topRight,i+s.topRight,s.topRight,0,-ht,!0),e.lineTo(n+s.topLeft,i)}const Wg=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Yg=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zg(e,t){const n=(""+e).match(Wg);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const jg=e=>+e||0;function oa(e,t){const n={},i=$(t),r=i?Object.keys(t):t,a=$(e)?i?s=>F(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of r)n[s]=jg(a(s));return n}function kl(e){return oa(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Fe(e){return oa(e,["topLeft","topRight","bottomLeft","bottomRight"])}function kt(e){const t=kl(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function pt(e,t){e=e||{},t=t||xt.font;let n=F(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=F(e.style,t.style);i&&!(""+i).match(Yg)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:F(e.family,t.family),lineHeight:zg(F(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:F(e.weight,t.weight),string:""};return r.string=Lg(r),r}function Zn(e,t,n,i){let r=!0,a,s,o;for(a=0,s=e.length;a<s;++a)if(o=e[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),r=!1),n!==void 0&&et(o)&&(o=o[n%o.length],r=!1),o!==void 0))return i&&!r&&(i.cacheable=!1),o}function $g(e,t,n){const{min:i,max:r}=e,a=sl(t,(r-i)/2),s=(o,l)=>n&&o===0?0:o+l;return{min:s(i,-Math.abs(a)),max:s(r,a)}}function Ue(e,t){return Object.assign(Object.create(e),t)}function la(e,t=[""],n,i,r=()=>e[0]){const a=n||e;typeof i>"u"&&(i=Rl("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:i,_getTarget:r,override:o=>la([o,...e],t,a,i)};return new Proxy(s,{deleteProperty(o,l){return delete o[l],delete o._keys,delete e[0][l],!0},get(o,l){return El(o,l,()=>Jg(l,t,e,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,l){return Ll(o).includes(l)},ownKeys(o){return Ll(o)},set(o,l,c){const u=o._storage||(o._storage=r());return o[l]=u[l]=c,delete o._keys,!0}})}function wn(e,t,n,i){const r={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Cl(e,i),setContext:a=>wn(e,a,n,i),override:a=>wn(e.override(a),t,n,i)};return new Proxy(r,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return El(a,s,()=>qg(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function Cl(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=e;return{allKeys:r,scriptable:n,indexable:i,isScriptable:Xt(n)?n:()=>n,isIndexable:Xt(i)?i:()=>i}}const Vg=(e,t)=>e?e+Qr(t):t,ca=(e,t)=>$(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function El(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const i=n();return e[t]=i,i}function qg(e,t,n){const{_proxy:i,_context:r,_subProxy:a,_descriptors:s}=e;let o=i[t];return Xt(o)&&s.isScriptable(t)&&(o=Gg(t,o,e,n)),et(o)&&o.length&&(o=Xg(t,o,e,s.isIndexable)),ca(t,o)&&(o=wn(o,r,a&&a[t],s)),o}function Gg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let l=t(a,s||i);return o.delete(e),ca(e,l)&&(l=ua(r._scopes,r,e,l)),l}function Xg(e,t,n,i){const{_proxy:r,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&i(e))return t[a.index%t.length];if($(t[0])){const l=t,c=r._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=ua(c,r,e,u);t.push(wn(d,a,s&&s[e],o))}}return t}function Ol(e,t,n){return Xt(e)?e(t,n):e}const Kg=(e,t)=>e===!0?t:typeof e=="string"?Ne(t,e):void 0;function Zg(e,t,n,i,r){for(const a of t){const s=Kg(n,a);if(s){e.add(s);const o=Ol(s._fallback,n,r);if(typeof o<"u"&&o!==n&&o!==i)return o}else if(s===!1&&typeof i<"u"&&n!==i)return null}return!1}function ua(e,t,n,i){const r=t._rootScopes,a=Ol(t._fallback,n,i),s=[...e,...r],o=new Set;o.add(i);let l=Al(o,s,n,a||n,i);return l===null||typeof a<"u"&&a!==n&&(l=Al(o,s,a,l,i),l===null)?!1:la(Array.from(o),[""],r,a,()=>Qg(t,n,i))}function Al(e,t,n,i,r){for(;n;)n=Zg(e,t,n,i,r);return n}function Qg(e,t,n){const i=e._getTarget();t in i||(i[t]={});const r=i[t];return et(r)&&$(n)?n:r||{}}function Jg(e,t,n,i){let r;for(const a of t)if(r=Rl(Vg(a,e),n),typeof r<"u")return ca(e,r)?ua(n,i,e,r):r}function Rl(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function Ll(e){let t=e._keys;return t||(t=e._keys=tp(e._scopes)),t}function tp(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Il(e,t,n,i){const{iScale:r}=e,{key:a="r"}=this._parsing,s=new Array(i);let o,l,c,u;for(o=0,l=i;o<l;++o)c=o+n,u=t[c],s[o]={r:r.parse(Ne(u,a),c)};return s}const ep=Number.EPSILON||1e-14,Tn=(e,t)=>t<e.length&&!e[t].skip&&e[t],Nl=e=>e==="x"?"y":"x";function np(e,t,n,i){const r=e.skip?t:e,a=t,s=n.skip?t:n,o=xn(a,r),l=xn(s,a);let c=o/(o+l),u=l/(o+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=i*c,h=i*u;return{previous:{x:a.x-d*(s.x-r.x),y:a.y-d*(s.y-r.y)},next:{x:a.x+h*(s.x-r.x),y:a.y+h*(s.y-r.y)}}}function ip(e,t,n){const i=e.length;let r,a,s,o,l,c=Tn(e,0);for(let u=0;u<i-1;++u)if(l=c,c=Tn(e,u+1),!(!l||!c)){if(jn(t[u],0,ep)){n[u]=n[u+1]=0;continue}r=n[u]/t[u],a=n[u+1]/t[u],o=Math.pow(r,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),n[u]=r*s*t[u],n[u+1]=a*s*t[u])}}function rp(e,t,n="x"){const i=Nl(n),r=e.length;let a,s,o,l=Tn(e,0);for(let c=0;c<r;++c){if(s=o,o=l,l=Tn(e,c+1),!o)continue;const u=o[n],d=o[i];s&&(a=(u-s[n])/3,o[`cp1${n}`]=u-a,o[`cp1${i}`]=d-a*t[c]),l&&(a=(l[n]-u)/3,o[`cp2${n}`]=u+a,o[`cp2${i}`]=d+a*t[c])}}function ap(e,t="x"){const n=Nl(t),i=e.length,r=Array(i).fill(0),a=Array(i);let s,o,l,c=Tn(e,0);for(s=0;s<i;++s)if(o=l,l=c,c=Tn(e,s+1),!!l){if(c){const u=c[t]-l[t];r[s]=u!==0?(c[n]-l[n])/u:0}a[s]=o?c?ge(r[s-1])!==ge(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}ip(e,r,a),rp(e,a,t)}function qi(e,t,n){return Math.max(Math.min(e,n),t)}function sp(e,t){let n,i,r,a,s,o=ke(e[0],t);for(n=0,i=e.length;n<i;++n)s=a,a=o,o=n<i-1&&ke(e[n+1],t),a&&(r=e[n],s&&(r.cp1x=qi(r.cp1x,t.left,t.right),r.cp1y=qi(r.cp1y,t.top,t.bottom)),o&&(r.cp2x=qi(r.cp2x,t.left,t.right),r.cp2y=qi(r.cp2y,t.top,t.bottom)))}function op(e,t,n,i,r){let a,s,o,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")ap(e,r);else{let c=i?e[e.length-1]:e[0];for(a=0,s=e.length;a<s;++a)o=e[a],l=np(c,o,e[Math.min(a+1,s-(i?0:1))%s],t.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,c=o}t.capBezierPoints&&sp(e,n)}function Bl(){return typeof window<"u"&&typeof document<"u"}function da(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Gi(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Xi=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function lp(e,t){return Xi(e).getPropertyValue(t)}const cp=["top","right","bottom","left"];function an(e,t,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const a=cp[r];i[a]=parseFloat(e[t+"-"+a+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const up=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function dp(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:r,offsetY:a}=i;let s=!1,o,l;if(up(r,a,e.target))o=r,l=a;else{const c=t.getBoundingClientRect();o=i.clientX-c.left,l=i.clientY-c.top,s=!0}return{x:o,y:l,box:s}}function We(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,r=Xi(n),a=r.boxSizing==="border-box",s=an(r,"padding"),o=an(r,"border","width"),{x:l,y:c,box:u}=dp(e,n),d=s.left+(u&&o.left),h=s.top+(u&&o.top);let{width:f,height:g}=t;return a&&(f-=s.width+o.width,g-=s.height+o.height),{x:Math.round((l-d)/f*n.width/i),y:Math.round((c-h)/g*n.height/i)}}function hp(e,t,n){let i,r;if(t===void 0||n===void 0){const a=da(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=Xi(a),l=an(o,"border","width"),c=an(o,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,i=Gi(o.maxWidth,a,"clientWidth"),r=Gi(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:i||Wi,maxHeight:r||Wi}}const Ki=e=>Math.round(e*10)/10;function fp(e,t,n,i){const r=Xi(e),a=an(r,"margin"),s=Gi(r.maxWidth,e,"clientWidth")||Wi,o=Gi(r.maxHeight,e,"clientHeight")||Wi,l=hp(e,t,n);let{width:c,height:u}=l;if(r.boxSizing==="content-box"){const h=an(r,"border","width"),f=an(r,"padding");c-=f.width+h.width,u-=f.height+h.height}return c=Math.max(0,c-a.width),u=Math.max(0,i?c/i:u-a.height),c=Ki(Math.min(c,s,l.maxWidth)),u=Ki(Math.min(u,o,l.maxHeight)),c&&!u&&(u=Ki(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Ki(Math.floor(u*i))),{width:c,height:u}}function Hl(e,t,n){const i=t||1,r=Math.floor(e.height*i),a=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||s.height!==r||s.width!==a?(e.currentDevicePixelRatio=i,s.height=r,s.width=a,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const gp=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function Fl(e,t){const n=lp(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function sn(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function pp(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function mp(e,t,n,i){const r={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=sn(e,r,n),o=sn(r,a,n),l=sn(a,t,n),c=sn(s,o,n),u=sn(o,l,n);return sn(c,u,n)}const bp=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},vp=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Mn(e,t,n){return e?bp(t,n):vp()}function Ul(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Wl(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Yl(e){return e==="angle"?{between:$n,compare:yg,normalize:ie}:{between:De,compare:(t,n)=>t-n,normalize:t=>t}}function zl({start:e,end:t,count:n,loop:i,style:r}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:r}}function yp(e,t,n){const{property:i,start:r,end:a}=n,{between:s,normalize:o}=Yl(i),l=t.length;let{start:c,end:u,loop:d}=e,h,f;if(d){for(c+=l,u+=l,h=0,f=l;h<f&&s(o(t[c%l][i]),r,a);++h)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function jl(e,t,n){if(!n)return[e];const{property:i,start:r,end:a}=n,s=t.length,{compare:o,between:l,normalize:c}=Yl(i),{start:u,end:d,loop:h,style:f}=yp(e,t,n),g=[];let v=!1,m=null,p,y,_;const x=()=>l(r,_,p)&&o(r,_)!==0,w=()=>o(a,p)===0||l(a,_,p),T=()=>v||x(),M=()=>!v||w();for(let S=u,P=u;S<=d;++S)y=t[S%s],!y.skip&&(p=c(y[i]),p!==_&&(v=l(p,r,a),m===null&&T()&&(m=o(p,r)===0?S:P),m!==null&&M()&&(g.push(zl({start:m,end:S,loop:h,count:s,style:f})),m=null),P=S,_=p));return m!==null&&g.push(zl({start:m,end:d,loop:h,count:s,style:f})),g}function $l(e,t){const n=[],i=e.segments;for(let r=0;r<i.length;r++){const a=jl(i[r],e.points,t);a.length&&n.push(...a)}return n}function xp(e,t,n,i){let r=0,a=t-1;if(n&&!i)for(;r<t&&!e[r].skip;)r++;for(;r<t&&e[r].skip;)r++;for(r%=t,n&&(a+=r);a>r&&e[a%t].skip;)a--;return a%=t,{start:r,end:a}}function _p(e,t,n,i){const r=e.length,a=[];let s=t,o=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%r];c.skip||c.stop?o.skip||(i=!1,a.push({start:t%r,end:(l-1)%r,loop:i}),t=s=c.stop?l:null):(s=l,o.skip&&(t=l)),o=c}return s!==null&&a.push({start:t%r,end:s%r,loop:i}),a}function wp(e,t){const n=e.points,i=e.options.spanGaps,r=n.length;if(!r)return[];const a=!!e._loop,{start:s,end:o}=xp(n,r,a,i);if(i===!0)return Vl(e,[{start:s,end:o,loop:a}],n,t);const l=o<s?o+r:o,c=!!e._fullLoop&&s===0&&o===r-1;return Vl(e,_p(n,s,l,c),n,t)}function Vl(e,t,n,i){return!i||!i.setContext||!n?t:Tp(e,t,n,i)}function Tp(e,t,n,i){const r=e._chart.getContext(),a=ql(e.options),{_datasetIndex:s,options:{spanGaps:o}}=e,l=n.length,c=[];let u=a,d=t[0].start,h=d;function f(g,v,m,p){const y=o?-1:1;if(g!==v){for(g+=l;n[g%l].skip;)g-=y;for(;n[v%l].skip;)v+=y;g%l!==v%l&&(c.push({start:g%l,end:v%l,loop:m,style:p}),u=p,d=v%l)}}for(const g of t){d=o?d:g.start;let v=n[d%l],m;for(h=d+1;h<=g.end;h++){const p=n[h%l];m=ql(i.setContext(Ue(r,{type:"segment",p0:v,p1:p,p0DataIndex:(h-1)%l,p1DataIndex:h%l,datasetIndex:s}))),Mp(m,u)&&f(d,h-1,g.loop,u),v=p,u=m}d<h-1&&f(d,h-1,g.loop,u)}return c}function ql(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Mp(e,t){if(!t)return!1;const n=[],i=function(r,a){return na(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
|
|
33
33
|
* Chart.js v4.3.0
|
|
34
34
|
* https://www.chartjs.org
|
|
35
35
|
* (c) 2023 Chart.js Contributors
|
|
36
36
|
* Released under the MIT License
|
|
37
|
-
*/class wm{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const a=n.listeners[r],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=gl.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(r.draw(),this._notify(r,i,t,"progress")),a.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ee=new wm;const Vl="transparent",Tm={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=xl(e||Vl),r=i.valid&&xl(t||Vl);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Mm{constructor(t,n,i,r){const a=n[i];r=Kn([t.to,r,a,t.from]);const s=Kn([t.from,a,r]);this._active=!0,this._fn=t.fn||Tm[t.type||typeof s],this._easing=Vn[t.easing]||Vn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Kn([t.to,n,r,t.from]),this._from=Kn([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,r=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||n<i),!this._active){this._target[r]=o,this._notify(!0);return}if(n<0){this._target[r]=a;return}l=n/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class da{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!j(t))return;const n=Object.keys(wt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!j(a))return;const s={};for(const o of n)s[o]=a[o];(tt(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,n){const i=n.options,r=Dm(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&Sm(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,n){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,n));continue}const u=n[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new Mm(h,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Ee.add(this._chart,i),!0}}function Sm(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=e[i[r]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Dm(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function $l(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Pm(e,t,n){if(n===!1)return!1;const i=$l(e,n),r=$l(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Em(e){let t,n,i,r;return j(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function ql(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)n.push(i[r].index);return n}function Gl(e,t,n,i={}){const r=e.keys,a=i.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===n){if(i.all)continue;break}c=e.values[l],xt(c)&&(a||t===0||fe(t)===fe(c))&&(t+=c)}return t}}function Cm(e){const t=Object.keys(e),n=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],n[i]={x:a,y:e[a]};return n}function Xl(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function km(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Om(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Am(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Kl(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=e[r.index];if(n&&a>0||!n&&a<0)return r.index}return null}function Zl(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=km(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const g=t[f],{[l]:v,[c]:p}=g,m=g._stacks||(g._stacks={});h=m[c]=Am(r,u,v),h[o]=p,h._top=Kl(h,s,!0,i.type),h._bottom=Kl(h,s,!1,i.type);const y=h._visualValues||(h._visualValues={});y[o]=p}}function ha(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Rm(e,t){return Fe(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Lm(e,t,n){return Fe(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Zn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const fa=e=>e==="reset"||e==="none",Ql=(e,t)=>t?e:Object.assign({},e),Im=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:ql(n,!0),values:null};class le{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Xl(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Zn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,a=n.xAxisID=F(i.xAxisID,ha(t,"x")),s=n.yAxisID=F(i.yAxisID,ha(t,"y")),o=n.rAxisID=F(i.rAxisID,ha(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,a,s,o),u=n.vAxisID=r(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&hl(this._data,this),t._stacked&&Zn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(j(n))this._data=Cm(n);else if(i!==n){if(i){hl(i,this);const r=this._cachedMeta;Zn(r),r._parsed=[]}n&&Object.isExtensible(n)&&xg(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=n._stacked;n._stacked=Xl(n.vScale,n),n.stack!==i.stack&&(r=!0,Zn(n),n.stack=i.stack),this._resyncElements(t),(r||a!==n._stacked)&&Zl(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{tt(r[t])?h=this.parseArrayData(i,r,t,n):j(r[t])?h=this.parseObjectData(i,r,t,n):h=this.parsePrimitiveData(i,r,t,n);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&Zl(this,h)}parsePrimitiveData(t,n,i,r){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(r);let h,f,g;for(h=0,f=r;h<f;++h)g=h+i,d[h]={[o]:u||a.parse(c[g],g),[l]:s.parse(n[g],g)};return d}parseArrayData(t,n,i,r){const{xScale:a,yScale:s}=t,o=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=n[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=n[h],c[u]={x:a.parse(Ie(f,o),h),y:s.parse(Ie(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:ql(r,!0),values:n._stacks[t.axis]._visualValues};return Gl(o,s,a.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const a=i[n.axis];let s=a===null?NaN:a;const o=r&&i._stacks[n.axis];r&&o&&(r.values=o,s=Gl(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=Im(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Om(o);let h,f;function g(){f=r[h];const v=f[o.axis];return!xt(f[t.axis])||u>v||d<v}for(h=0;h<s&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=n.length;r<a;++r)s=n[r][t.axis],xt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Em(F(this.options.clip,Pm(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const r=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=Lm(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=Rm(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],l=this.enableOptionSharing&&qt(i);if(o)return Ql(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(wt.elements[t]),g=()=>this.getContext(i,r,n),v=c.resolveNamedOptions(h,f,g,d);return v.$shared&&(v.$shared=l,a[s]=Object.freeze(Ql(v,l))),v}_resolveAnimations(t,n,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new da(r,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||fa(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(n,a)||a!==r;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:s}}updateElement(t,n,i,r){fa(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!fa(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const a=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=this._data,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const r=i.length,a=n.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,n,i=!0){const r=this._cachedMeta,a=r.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(a,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&Zn(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](i,r)}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,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}E(le,"defaults",{}),E(le,"datasetElementType",null),E(le,"dataElementType",null);function Nm(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=n.length;r<a;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=fl(i.sort((r,a)=>r-a))}return e._cache.$bar}function Bm(e){const t=e.iScale,n=Nm(t,e.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(qt(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=n.length;r<a;++r)s=t.getPixelForValue(n[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function Hm(e,t,n,i){const r=n.barThickness;let a,s;return U(r)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[e]-a/2}}function Fm(e,t,n,i){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=n.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/i,ratio:n.barPercentage,start:c}}function Um(e,t,n,i){const r=n.parse(e[0],i),a=n.parse(e[1],i),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function Jl(e,t,n,i){return tt(e)?Um(e,t,n,i):t[n.axis]=n.parse(e,i),t}function tc(e,t,n,i){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=n,u=n+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(Jl(h,d,a,c));return l}function ga(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Wm(e,t,n){return e!==0?fe(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function Ym(e){let t,n,i,r,a;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:n,end:i,reverse:t,top:r,bottom:a}}function zm(e,t,n,i){let r=t.borderSkipped;const a={};if(!r){e.borderSkipped=a;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=Ym(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(a[ec(u,s,o,l)]=!0,r=c)),a[ec(r,s,o,l)]=!0,e.borderSkipped=a}function ec(e,t,n,i){return i?(e=jm(e,t,n),e=nc(e,n,t)):e=nc(e,t,n),e}function jm(e,t,n){return e===t?n:e===n?t:e}function nc(e,t,n){return e==="start"?t:e==="end"?n:e}function Vm(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Qn extends le{parsePrimitiveData(t,n,i,r){return tc(t,n,i,r)}parseArrayData(t,n,i,r){return tc(t,n,i,r)}parseObjectData(t,n,i,r){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let h,f,g,v;for(h=i,f=i+r;h<f;++h)v=n[h],g={},g[a.axis]=a.parse(Ie(v,c),h),d.push(Jl(Ie(v,u),g,s,h));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const a=i._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:r}=n,a=this.getParsed(t),s=a._custom,o=ga(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r);for(let f=n;f<n+i;f++){const g=this.getParsed(f),v=a||U(g[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),p=this._calculateBarIndexPixels(f,u),m=(g._stacks||{})[o.axis],y={horizontal:c,base:v.base,enableBorderRadius:!m||ga(g._custom)||s===m._top||s===m._bottom,x:c?v.head:p.center,y:c?p.center:v.head,height:c?p.size:Math.abs(v.size),width:c?Math.abs(v.size):p.size};h&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const _=y.options||t[f].options;zm(y,_,m,s),Vm(y,_,u.ratio),this.updateElement(t[f],f,y,r)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=i.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(U(u)||isNaN(u))return!0};for(const l of r)if(!(n!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const r=this._getStacks(t,i),a=n!==void 0?r.indexOf(n):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let a,s;for(a=0,s=n.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||Bm(n),pixels:r,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:n,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=ga(c);let d=l[n.axis],h=0,f=i?this.applyStack(n,l,i):d,g,v;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&fe(d)!==fe(c.barEnd)&&(h=0),h+=d);const p=!U(a)&&!u?a:h;let m=n.getPixelForValue(p);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(h+f):g=m,v=g-m,Math.abs(v)<s){v=Wm(v,n,o)*s,d===o&&(m-=v/2);const y=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),x=Math.min(y,_),w=Math.max(y,_);m=Math.max(Math.min(m,w),x),g=m+v,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(g)-n.getValueForPixel(m))}if(m===n.getPixelForValue(o)){const y=fe(v)*n.getLineWidthForValue(o)/2;m+=y,v-=y}return{size:v,base:m,head:g,center:g+v/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,a=r.skipNull,s=F(r.maxBarThickness,1/0);let o,l;if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,u=r.barThickness==="flex"?Fm(t,n,r,c):Hm(t,n,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}E(Qn,"id","bar"),E(Qn,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),E(Qn,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Ki extends le{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,r){const a=super.parsePrimitiveData(t,n,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,n,i,r){const a=super.parseArrayData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=F(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,n,i,r){const a=super.parseObjectData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=F(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,r),u=s.axis,d=o.axis;for(let h=n;h<n+i;h++){const f=t[h],g=!a&&this.getParsed(h),v={},p=v[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),m=v[d]=a?o.getBasePixel():o.getPixelForValue(g[d]);v.skip=isNaN(p)||isNaN(m),c&&(v.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(v.options.radius=0)),this.updateElement(f,h,v,r)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return n!=="active"&&(r.radius=0),r.radius+=F(i&&i._custom,a),r}}E(Ki,"id","bubble"),E(Ki,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),E(Ki,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function $m(e,t,n){let i=1,r=1,a=0,s=0;if(t<dt){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(_,x,w)=>jn(_,o,l,!0)?1:Math.max(x,x*n,w,w*n),g=(_,x,w)=>jn(_,o,l,!0)?-1:Math.min(x,x*n,w,w*n),v=f(0,c,d),p=f(ht,u,h),m=g(q,c,d),y=g(q+ht,u,h);i=(v-m)/2,r=(p-y)/2,a=-(v+m)/2,s=-(p+y)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Ue extends le{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if(j(i[t])){const{key:l="value"}=this._parsing;a=c=>+Ie(i[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return kt(this.options.rotation-90)}_getCircumference(){return kt(this.options.circumference)}_getRotationExtents(){let t=dt,n=-dt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),n=Math.max(n,a+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(og(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:v}=$m(d,u,l),p=(i.width-s)/h,m=(i.height-s)/f,y=Math.max(Math.min(p,m)/2,0),_=il(this.options.radius,y),x=Math.max(_*l,0),w=(_-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=v*_,r.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/dt)}updateElements(t,n,i,r){const a=r==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=a&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:v,includeOptions:p}=this._getSharedOptions(n,r);let m=this._getRotation(),y;for(y=0;y<n;++y)m+=this._circumference(y,a);for(y=n;y<n+i;++y){const _=this._circumference(y,a),x=t[y],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:m,endAngle:m+_,circumference:_,outerRadius:g,innerRadius:f};p&&(w.options=v||this.resolveDataElementOptions(y,x.active?"active":r)),m+=_,this.updateElement(x,y,w,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,r;for(r=0;r<n.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?dt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=$n(n._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const i=this.chart;let r,a,s,o,l;if(!t){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,o=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)l=o.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(F(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}E(Ue,"id","doughnut"),E(Ue,"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"}),E(Ue,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),E(Ue,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class Jn extends le{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=pl(n,r,s);this._drawStart=o,this._drawCount=l,bl(n)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,o,l,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),h=s.axis,f=o.axis,{spanGaps:g,segment:v}=this.options,p=Be(g)?g:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||a||r==="none",y=n+i,_=t.length;let x=n>0&&this.getParsed(n-1);for(let w=0;w<_;++w){const T=t[w],M=m?T:{};if(w<n||w>=y){M.skip=!0;continue}const S=this.getParsed(w),P=U(S[f]),D=M[h]=s.getPixelForValue(S[h],w),C=M[f]=a||P?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[f],w);M.skip=isNaN(D)||isNaN(C)||P,M.stop=w>0&&Math.abs(S[h]-x[h])>p,v&&(M.parsed=S,M.raw=c.data[w]),d&&(M.options=u||this.resolveDataElementOptions(w,T.active?"active":r)),m||this.updateElement(T,w,M,r),x=S}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}E(Jn,"id","line"),E(Jn,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),E(Jn,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ti extends le{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=$n(n._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,n,i,r){return Al.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*q;let f=h,g;const v=360/this.countVisibleElements();for(g=0;g<n;++g)f+=this._computeAngle(g,r,v);for(g=n;g<n+i;g++){const p=t[g];let m=f,y=f+this._computeAngle(g,r,v),_=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,a&&(l.animateScale&&(_=0),l.animateRotate&&(m=y=h));const x={x:u,y:d,innerRadius:0,outerRadius:_,startAngle:m,endAngle:y,options:this.resolveDataElementOptions(g,p.active?"active":r)};this.updateElement(p,g,x,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?kt(this.resolveDataElementOptions(t,n).angle||i):0}}E(ti,"id","polarArea"),E(ti,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),E(ti,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ma extends Ue{}E(ma,"id","pie"),E(ma,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Zi extends le{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,r){return Al.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta,i=n.dataset,r=n.data||[],a=n.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(i,void 0,o,t)}this.updateElements(r,0,r.length,t)}updateElements(t,n,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=n;o<n+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":r),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}E(Zi,"id","radar"),E(Zi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),E(Zi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Qi extends le{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:a,count:s}=pl(n,i,r);if(this._drawStart=a,this._drawCount=s,bl(n)&&(a=0,s=i.length),this.options.showLine){const{dataset:o,_dataset:l}=n;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t)}this.updateElements(i,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,g=o.axis,{spanGaps:v,segment:p}=this.options,m=Be(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none";let _=n>0&&this.getParsed(n-1);for(let x=n;x<n+i;++x){const w=t[x],T=this.getParsed(x),M=y?w:{},S=U(T[g]),P=M[f]=s.getPixelForValue(T[f],x),D=M[g]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,T,l):T[g],x);M.skip=isNaN(P)||isNaN(D)||S,M.stop=x>0&&Math.abs(T[f]-_[f])>m,p&&(M.parsed=T,M.raw=c.data[x]),h&&(M.options=d||this.resolveDataElementOptions(x,w.active?"active":r)),y||this.updateElement(w,x,M,r),_=T}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,a,s)/2}}E(Qi,"id","scatter"),E(Qi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),E(Qi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var qm=Object.freeze({__proto__:null,BarController:Qn,BubbleController:Ki,DoughnutController:Ue,LineController:Jn,PieController:ma,PolarAreaController:ti,RadarController:Zi,ScatterController:Qi});function sn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pa{constructor(t){E(this,"options");this.options=t||{}}static override(t){Object.assign(pa.prototype,t)}init(){}formats(){return sn()}parse(){return sn()}format(){return sn()}add(){return sn()}diff(){return sn()}startOf(){return sn()}endOf(){return sn()}}var ic={_date:pa};function Gm(e,t,n,i){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?vg:De;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,n-u),h=l(a,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function ei(e,t,n,i,r){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=Gm(a[o],t,s,r);for(let f=d;f<=h;++f){const g=u[f];g.skip||i(g,c,f)}}}function Xm(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function ba(e,t,n,i,r){const a=[];return!r&&!e.isPointInArea(t)||ei(e,n,t,function(o,l,c){!r&&!Pe(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Km(e,t,n,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=ul(s,{x:t.x,y:t.y});jn(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return ei(e,n,t,a),r}function Zm(e,t,n,i,r,a){let s=[];const o=Xm(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const g=u.getCenterPoint(r);if(!(!!a||e.isPointInArea(g))&&!f)return;const p=o(t,g);p<l?(s=[{element:u,datasetIndex:d,index:h}],l=p):p===l&&s.push({element:u,datasetIndex:d,index:h})}return ei(e,n,t,c),s}function va(e,t,n,i,r,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!i?Km(e,t,n,r):Zm(e,t,n,i,r,a)}function rc(e,t,n,i,r){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return ei(e,n,t,(l,c,u)=>{l[s](t[n],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var Qm={evaluateInteractionItems:ei,modes:{index(e,t,n,i){const r=rn(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?ba(e,r,a,i,s):va(e,r,a,!1,i,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const r=rn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?ba(e,r,a,i,s):va(e,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,i){const r=rn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return ba(e,r,a,i,s)},nearest(e,t,n,i){const r=rn(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return va(e,r,a,n.intersect,i,s)},x(e,t,n,i){const r=rn(t,e);return rc(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=rn(t,e);return rc(e,r,"y",n.intersect,i)}}};const ac=["left","top","right","bottom"];function ni(e,t){return e.filter(n=>n.pos===t)}function sc(e,t){return e.filter(n=>ac.indexOf(n.pos)===-1&&n.box.axis===t)}function ii(e,t){return e.sort((n,i)=>{const r=t?i:n,a=t?n:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function Jm(e){const t=[];let n,i,r,a,s,o;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:n,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function tp(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:a}=n;if(!i||!ac.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function ep(e,t){const n=tp(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:l}=o.box,c=n[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*i:l&&t.availableWidth,o.height=r):(o.width=i,o.height=u?u*r:l&&t.availableHeight)}return n}function np(e){const t=Jm(e),n=ii(t.filter(c=>c.box.fullSize),!0),i=ii(ni(t,"left"),!0),r=ii(ni(t,"right")),a=ii(ni(t,"top"),!0),s=ii(ni(t,"bottom")),o=sc(t,"x"),l=sc(t,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:ni(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function oc(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function lc(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function ip(e,t,n,i){const{pos:r,box:a}=n,s=e.maxPadding;if(!j(r)){n.size&&(e[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[r]+=n.size}a.getPadding&&lc(s,a.getPadding());const o=Math.max(0,t.outerWidth-oc(s,e,"left","right")),l=Math.max(0,t.outerHeight-oc(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function rp(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function ap(e,t){const n=t.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{a[s]=Math.max(t[s],n[s])}),a}return i(e?["left","right"]:["top","bottom"])}function ri(e,t,n,i){const r=[];let a,s,o,l,c,u;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,ap(o.horizontal,t));const{same:d,other:h}=ip(t,n,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&ri(r,t,n,i)||u}function Ji(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function cc(e,t,n,i){const r=n.padding;let{x:a,y:s}=t;for(const o of e){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,h=c.size||l.height;qt(c.start)&&(s=c.start),l.fullSize?Ji(l,r.left,s,n.outerWidth-r.right-r.left,h):Ji(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;qt(c.start)&&(a=c.start),l.fullSize?Ji(l,a,r.top,h,n.outerHeight-r.bottom-r.top):Ji(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var Yt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=Ot(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(n-r.height,0),o=np(e.boxes),l=o.vertical,c=o.horizontal;ot(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,p)=>p.box.options&&p.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);lc(h,Ot(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),g=ep(l.concat(c),d);ri(o.fullSize,f,d,g),ri(l,f,d,g),ri(c,f,d,g)&&ri(l,f,d,g),rp(f),cc(o.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,cc(o.rightAndBottom,f,d,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ot(o.chartArea,v=>{const p=v.box;Object.assign(p,e.chartArea),p.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class uc{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class sp extends uc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const tr="$chartjs",op={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},dc=e=>e===null||e==="";function lp(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[tr]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",dc(r)){const a=Nl(e,"width");a!==void 0&&(e.width=a)}if(dc(i))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Nl(e,"height");a!==void 0&&(e.height=a)}return e}const hc=dm?{passive:!0}:!1;function cp(e,t,n){e.addEventListener(t,n,hc)}function up(e,t,n){e.canvas.removeEventListener(t,n,hc)}function dp(e,t){const n=op[e.type]||e.type,{x:i,y:r}=rn(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function er(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function hp(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||er(o.addedNodes,i),s=s&&!er(o.removedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function fp(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||er(o.removedNodes,i),s=s&&!er(o.addedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const ai=new Map;let fc=0;function gc(){const e=window.devicePixelRatio;e!==fc&&(fc=e,ai.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function gp(e,t){ai.size||window.addEventListener("resize",gc),ai.set(e,t)}function mp(e){ai.delete(e),ai.size||window.removeEventListener("resize",gc)}function pp(e,t,n){const i=e.canvas,r=i&&ua(i);if(!r)return;const a=ml((o,l)=>{const c=r.clientWidth;n(o,l),c<r.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(r),gp(e,a),s}function ya(e,t,n){n&&n.disconnect(),t==="resize"&&mp(e)}function bp(e,t,n){const i=e.canvas,r=ml(a=>{e.ctx!==null&&n(dp(a,e))},e);return cp(i,t,r),r}class vp extends uc{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(lp(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[tr])return!1;const i=n[tr].initial;["height","width"].forEach(a=>{const s=i[a];U(s)?n.removeAttribute(a):n.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{n.style[a]=r[a]}),n.width=n.width,delete n[tr],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),s={attach:hp,detach:fp,resize:pp}[n]||bp;r[n]=s(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:ya,detach:ya,resize:ya}[n]||up)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return um(t,n,i,r)}isAttached(t){const n=ua(t);return!!(n&&n.isConnected)}}function yp(e){return!Ll()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?sp:vp}class Ht{constructor(){E(this,"x");E(this,"y");E(this,"active",!1);E(this,"options");E(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return Be(this.x)&&Be(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}E(Ht,"defaults",{}),E(Ht,"defaultRoutes");function xp(e,t){const n=e.options.ticks,i=_p(e),r=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Tp(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return Mp(t,c,a,s/r),c;const u=wp(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(nr(t,c,u,U(f)?0:o-f,o),d=0,h=s-1;d<h;d++)nr(t,c,u,a[d],a[d+1]);return nr(t,c,u,l,U(f)?t.length:l+f),c}return nr(t,c,u),c}function _p(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function wp(e,t,n){const i=Sp(e),r=t.length/n;if(!i)return Math.max(r,1);const a=gg(i);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>r)return l}return Math.max(r,1)}function Tp(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Mp(e,t,n,i){let r=0,a=n[0],s;for(i=Math.ceil(i),s=0;s<e.length;s++)s===a&&(t.push(e[s]),r++,a=n[r*i])}function nr(e,t,n,i,r){const a=F(i,0),s=Math.min(F(r,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=a;u<0;)o++,u=Math.round(a+o*n);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(a+o*n))}function Sp(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const Dp=e=>e==="left"?"right":e==="right"?"left":e,mc=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,pc=(e,t)=>Math.min(t||e,e);function bc(e,t){const n=[],i=e.length/t,r=e.length;let a=0;for(;a<r;a+=i)n.push(e[Math.floor(a)]);return n}function Pp(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-a,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function Ep(e,t){ot(e,n=>{const i=n.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete n.data[i[a]];i.splice(0,r)}})}function si(e){return e.drawTicks?e.tickLength:0}function vc(e,t){if(!e.display)return 0;const n=mt(e.font,t),i=Ot(e.padding);return(tt(e.text)?e.text.length:1)*n.lineHeight+i.height}function Cp(e,t){return Fe(e,{scale:t,type:"scale"})}function kp(e,t,n){return Fe(e,{tick:n,index:t,type:"tick"})}function Op(e,t,n){let i=ta(e);return(n&&t!=="right"||!n&&t==="right")&&(i=Dp(i)),i}function Ap(e,t,n,i){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,h,f,g;const v=s-r,p=o-a;if(e.isHorizontal()){if(f=Wt(i,a,o),j(n)){const m=Object.keys(n)[0],y=n[m];g=u[m].getPixelForValue(y)+v-t}else n==="center"?g=(c.bottom+c.top)/2+v-t:g=mc(e,n,t);h=o-a}else{if(j(n)){const m=Object.keys(n)[0],y=n[m];f=u[m].getPixelForValue(y)-p+t}else n==="center"?f=(c.left+c.right)/2-p+t:f=mc(e,n,t);g=Wt(i,s,r),d=n==="left"?-ht:ht}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}class on extends Ht{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=ee(t,Number.POSITIVE_INFINITY),n=ee(n,Number.NEGATIVE_INFINITY),i=ee(i,Number.POSITIVE_INFINITY),r=ee(r,Number.NEGATIVE_INFINITY),{min:ee(t,i),max:ee(n,r),minDefined:xt(t),maxDefined:xt(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(n=Math.min(n,s.min)),a||(i=Math.max(i,s.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:ee(n,ee(i,n)),max:ee(i,ee(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){st(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=Yg(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?bc(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=xp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){st(this.options.afterUpdate,[this])}beforeSetDimensions(){st(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(){st(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),st(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){st(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=st(n.callback,[a.value,i,t],this)}afterTickToLabelConversion(){st(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){st(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=pc(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,a=n.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!n.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=Nt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-si(t.grid)-n.padding-vc(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=Yi(Math.min(Math.asin(Nt((u.highest.height+6)/o,-1,1)),Math.asin(Nt(l/c,-1,1))-Math.asin(Nt(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){st(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){st(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=vc(r,n.options.font);if(o?(t.width=this.maxWidth,t.height=si(a)+l):(t.height=this.maxHeight,t.width=si(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,g=kt(this.labelRotation),v=Math.cos(g),p=Math.sin(g);if(o){const m=i.mirror?0:p*d.width+v*h.height;t.height=Math.min(this.maxHeight,t.height+m+f)}else{const m=i.mirror?0:v*d.width+p*h.height;t.width=Math.min(this.maxWidth,t.width+m+f)}this._calculatePadding(c,u,p,v)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,r){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=r*t.width,f=i*n.height):(h=i*t.height,f=r*n.width):a==="start"?f=n.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){st(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)U(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=bc(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(n/pc(n,i));let c=0,u=0,d,h,f,g,v,p,m,y,_,x,w;for(d=0;d<n;d+=l){if(g=t[d].label,v=this._resolveTickFontOptions(d),r.font=p=v.string,m=a[p]=a[p]||{data:{},gc:[]},y=v.lineHeight,_=x=0,!U(g)&&!tt(g))_=Vi(r,m.data,m.gc,_,g),x=y;else if(tt(g))for(h=0,f=g.length;h<f;++h)w=g[h],!U(w)&&!tt(w)&&(_=Vi(r,m.data,m.gc,_,w),x+=y);s.push(_),o.push(x),c=Math.max(_,c),u=Math.max(x,u)}Ep(a,n);const T=s.indexOf(c),M=o.indexOf(u),S=P=>({width:s[P]||0,height:o[P]||0});return{first:S(0),last:S(n-1),widest:S(T),highest:S(M),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return bg(this._alignToPixels?tn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=kp(this.getContext(),t,i))}return this.$context||(this.$context=Cp(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=kt(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*i>o*r?o/i:l/r:l*r<o*i?l/i:o/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,r=this.options,{grid:a,position:s,border:o}=r,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=si(a),f=[],g=o.setContext(this.getContext()),v=g.display?g.width:0,p=v/2,m=function(Y){return tn(i,Y,v)};let y,_,x,w,T,M,S,P,D,C,L,W;if(s==="top")y=m(this.bottom),M=this.bottom-h,P=y-p,C=m(t.top)+p,W=t.bottom;else if(s==="bottom")y=m(this.top),C=t.top,W=m(t.bottom)-p,M=y+p,P=this.top+h;else if(s==="left")y=m(this.right),T=this.right-h,S=y-p,D=m(t.left)+p,L=t.right;else if(s==="right")y=m(this.left),D=t.left,L=m(t.right)-p,T=y+p,S=this.left+h;else if(n==="x"){if(s==="center")y=m((t.top+t.bottom)/2+.5);else if(j(s)){const Y=Object.keys(s)[0],Z=s[Y];y=m(this.chart.scales[Y].getPixelForValue(Z))}C=t.top,W=t.bottom,M=y+p,P=M+h}else if(n==="y"){if(s==="center")y=m((t.left+t.right)/2);else if(j(s)){const Y=Object.keys(s)[0],Z=s[Y];y=m(this.chart.scales[Y].getPixelForValue(Z))}T=y-p,S=T-h,D=t.left,L=t.right}const at=F(r.ticks.maxTicksLimit,d),N=Math.max(1,Math.ceil(d/at));for(_=0;_<d;_+=N){const Y=this.getContext(_),Z=a.setContext(Y),Lt=o.setContext(Y),bt=Z.lineWidth,Qt=Z.color,$t=Lt.dash||[],Bt=Lt.dashOffset,Jt=Z.tickWidth,ct=Z.tickColor,te=Z.tickBorderDash||[],se=Z.tickBorderDashOffset;x=Pp(this,_,l),x!==void 0&&(w=tn(i,x,bt),c?T=S=D=L=w:M=P=C=W=w,f.push({tx1:T,ty1:M,tx2:S,ty2:P,x1:D,y1:C,x2:L,y2:W,width:bt,color:Qt,borderDash:$t,borderDashOffset:Bt,tickWidth:Jt,tickColor:ct,tickBorderDash:te,tickBorderDashOffset:se}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const n=this.axis,i=this.options,{position:r,ticks:a}=i,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,h=si(i.grid),f=h+u,g=d?-u:f,v=-kt(this.labelRotation),p=[];let m,y,_,x,w,T,M,S,P,D,C,L,W="middle";if(r==="top")T=this.bottom-g,M=this._getXAxisLabelAlignment();else if(r==="bottom")T=this.top+g,M=this._getXAxisLabelAlignment();else if(r==="left"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,w=N.x}else if(r==="right"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,w=N.x}else if(n==="x"){if(r==="center")T=(t.top+t.bottom)/2+f;else if(j(r)){const N=Object.keys(r)[0],Y=r[N];T=this.chart.scales[N].getPixelForValue(Y)+f}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")w=(t.left+t.right)/2-f;else if(j(r)){const N=Object.keys(r)[0],Y=r[N];w=this.chart.scales[N].getPixelForValue(Y)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const at=this._getLabelSizes();for(m=0,y=o.length;m<y;++m){_=o[m],x=_.label;const N=a.setContext(this.getContext(m));S=this.getPixelForTick(m)+a.labelOffset,P=this._resolveTickFontOptions(m),D=P.lineHeight,C=tt(x)?x.length:1;const Y=C/2,Z=N.color,Lt=N.textStrokeColor,bt=N.textStrokeWidth;let Qt=M;s?(w=S,M==="inner"&&(m===y-1?Qt=this.options.reverse?"left":"right":m===0?Qt=this.options.reverse?"right":"left":Qt="center"),r==="top"?c==="near"||v!==0?L=-C*D+D/2:c==="center"?L=-at.highest.height/2-Y*D+D:L=-at.highest.height+D/2:c==="near"||v!==0?L=D/2:c==="center"?L=at.highest.height/2-Y*D:L=at.highest.height-C*D,d&&(L*=-1),v!==0&&!N.showLabelBackdrop&&(w+=D/2*Math.sin(v))):(T=S,L=(1-C)*D/2);let $t;if(N.showLabelBackdrop){const Bt=Ot(N.backdropPadding),Jt=at.heights[m],ct=at.widths[m];let te=L-Bt.top,se=0-Bt.left;switch(W){case"middle":te-=Jt/2;break;case"bottom":te-=Jt;break}switch(M){case"center":se-=ct/2;break;case"right":se-=ct;break}$t={left:se,top:te,width:ct+Bt.width,height:Jt+Bt.height,color:N.backdropColor}}p.push({label:x,font:P,textOffset:L,options:{rotation:v,color:Z,strokeColor:Lt,strokeWidth:bt,textAlign:Qt,textBaseline:W,translation:[w,T],backdrop:$t}})}return p}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-kt(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return n==="left"?r?(u=this.right+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?r?(u=this.left+a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(a=0,s=r.length;a<s;++a){const l=r[a];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:r}}=this,a=i.setContext(this.getContext()),s=i.display?a.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=tn(t,this.left,s)-s/2,u=tn(t,this.right,o)+o/2,d=h=l):(d=tn(t,this.top,s)-s/2,h=tn(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Gn(i,r);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;en(i,c,0,u,l,o)}r&&Xn(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const a=mt(i.font),s=Ot(i.padding),o=i.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||j(n)?(l+=s.bottom,tt(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=Ap(this,l,n,o);en(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Op(o,n,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=F(t.grid&&t.grid.z,-1),r=F(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==on.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return mt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ir{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Ip(n)&&(i=this.register(n));const r=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,Rp(t,s,i),this.override&&wt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in wt[r]&&(delete wt[r][i],this.override&&delete Je[i])}}function Rp(e,t,n){const i=Wn(Object.create(null),[n?wt.get(n):{},wt.get(t),e.defaults]);wt.set(t,i),e.defaultRoutes&&Lp(t,e.defaultRoutes),e.descriptors&&wt.describe(t,e.descriptors)}function Lp(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),a=[e].concat(i).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");wt.route(a,r,l,o)})}function Ip(e){return"id"in e&&"defaults"in e}class Np{constructor(){this.controllers=new ir(le,"datasets",!0),this.elements=new ir(Ht,"elements"),this.plugins=new ir(Object,"plugins"),this.scales=new ir(on,"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,n,i){[...n].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):ot(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,i){const r=Zr(t);st(i["before"+r],[],i),n[t](i),st(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var ge=new Np;class Bp{constructor(){this._init=[]}notify(t,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(a,t,n,i);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[n,r,a.options];if(st(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=F(i.options&&i.options.plugins,{}),a=Hp(i);return r===!1&&!n?[]:Up(t,a,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function Hp(e){const t={},n=[],i=Object.keys(ge.plugins.items);for(let a=0;a<i.length;a++)n.push(ge.getPlugin(i[a]));const r=e.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function Fp(e,t){return!t&&e===!1?null:e===!0?{}:e}function Up(e,{plugins:t,localIds:n},i,r){const a=[],s=e.getContext();for(const o of t){const l=o.id,c=Fp(i[l],r);c!==null&&a.push({plugin:o,options:Wp(e.config,{plugin:o,local:n[l]},c,s)})}return a}function Wp(e,{plugin:t,local:n},i,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(i,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xa(e,t){const n=wt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function Yp(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function zp(e,t){return e===t?"_index_":"_value_"}function yc(e){if(e==="x"||e==="y"||e==="r")return e}function jp(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function _a(e,...t){if(yc(e))return e;for(const n of t){const i=n.axis||jp(n.position)||e.length>1&&yc(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function xc(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Vp(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return xc(e,"x",n[0])||xc(e,"y",n[0])}return{}}function $p(e,t){const n=Je[e.type]||{scales:{}},i=t.scales||{},r=xa(e.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!j(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=_a(s,o,Vp(s,e),wt.scales[o.type]),c=zp(l,r),u=n.scales||{};a[s]=Yn(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||xa(o,t),u=(Je[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=Yp(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),Yn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];Yn(o,[wt.scales[o.type],wt.scale])}),a}function _c(e){const t=e.options||(e.options={});t.plugins=F(t.plugins,{}),t.scales=$p(e,t)}function wc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function qp(e){return e=e||{},e.data=wc(e.data),_c(e),e}const Tc=new Map,Mc=new Set;function rr(e,t){let n=Tc.get(e);return n||(n=t(),Tc.set(e,n),Mc.add(n)),n}const oi=(e,t,n)=>{const i=Ie(t,n);i!==void 0&&e.add(i)};class Gp{constructor(t){this._config=qp(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=wc(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(),_c(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return rr(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return rr(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return rr(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return rr(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>oi(l,t,d))),u.forEach(d=>oi(l,r,d)),u.forEach(d=>oi(l,Je[a]||{},d)),u.forEach(d=>oi(l,wt,d)),u.forEach(d=>oi(l,ia,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Mc.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Je[n]||{},wt.datasets[n]||{},{type:n},wt,ia]}resolveNamedOptions(t,n,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=Sc(this._resolverCache,t,r);let l=s;if(Kp(s,n)){a.$shared=!1,i=Gt(i)?i():i;const c=this.createResolver(t,i,o);l=_n(s,i,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,i=[""],r){const{resolver:a}=Sc(this._resolverCache,t,i);return j(n)?_n(a,n,void 0,r):a}}function Sc(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let a=i.get(r);return a||(a={resolver:oa(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const Xp=e=>j(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Gt(e[n]),!1);function Kp(e,t){const{isScriptable:n,isIndexable:i}=Dl(e);for(const r of t){const a=n(r),s=i(r),o=(s||a)&&e[r];if(a&&(Gt(o)||Xp(o))||s&&tt(o))return!0}return!1}var Zp="4.3.0";const Qp=["top","bottom","left","right","chartArea"];function Dc(e,t){return e==="top"||e==="bottom"||Qp.indexOf(e)===-1&&t==="x"}function Pc(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Ec(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),st(n&&n.onComplete,[e],t)}function Jp(e){const t=e.chart,n=t.options.animation;st(n&&n.onProgress,[e],t)}function Cc(e){return Ll()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const ar={},kc=e=>{const t=Cc(e);return Object.values(ar).filter(n=>n.canvas===t).pop()};function t0(e,t,n){const i=Object.keys(e);for(const r of i){const a=+r;if(a>=t){const s=e[r];delete e[r],(n>0||a>t)&&(e[a+n]=s)}}}function e0(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function n0(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}let Xt=(Xe=class{static register(...t){ge.add(...t),Oc()}static unregister(...t){ge.remove(...t),Oc()}constructor(t,n){const i=this.config=new Gp(n),r=Cc(t),a=kc(r);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 s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||yp(r)),this.platform.updateConfig(i);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=sg(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 Bp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=_g(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],ar[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ee.listen(this,"complete",Ec),Ee.listen(this,"progress",Jp),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:a}=this;return U(t)?n&&a?a:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ge}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Il(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Tl(this.canvas,this.ctx),this}stop(){return Ee.stop(this),this}resize(t,n){Ee.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,n,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Il(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),st(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ot(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=_a(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ot(a,s=>{const o=s.options,l=o.id,c=_a(l,o),u=F(o.type,s.dtype);(o.position===void 0||Dc(o.position,c)!==Dc(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=ge.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),ot(r,(s,o)=>{s||delete i[o]}),ot(i,s=>{Yt.configure(this,s,s.options),Yt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Pc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const a=n[i];let s=this.getDatasetMeta(i);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=a.indexAxis||xa(o,this.options),s.order=a.order||0,s.index=i,s.label=""+a.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=ge.getController(o),{datasetElementType:c,dataElementType:u}=wt.datasets[o];Object.assign(l,{dataElementType:ge.getElement(u),datasetElementType:c&&ge.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){ot(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||ot(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Pc("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ot(this.scales,t=>{Yt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!sl(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of n){const s=i==="_removeElements"?-a:a;t0(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),r=i(0);for(let a=1;a<n;a++)if(!sl(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Yt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],ot(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Gt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ee.has(this)?this.attached&&!Ee.running(this)&&Ee.start(this):(this.draw(),Ec({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,a;for(r=0,a=n.length;r<a;++r){const s=n[r];(!t||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,a=n0(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Gn(n,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),r&&Xn(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Pe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const a=Qm.modes[n];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=Fe(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);qt(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ee.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Tl(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ar[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,n=this.platform,i=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};ot(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){ot(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},ot(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let a,s,o,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!Hi(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const r=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(n,t),o=i?t:a(t,n);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:a}=this,s=n,o=this._getActiveElements(t,r,i,s),l=hg(t),c=e0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,st(a.onHover,[t,o,this],this),l&&st(a.onClick,[t,o,this],this));const u=!Hi(o,r);return(u||n)&&(this._active=o,this._updateHoverStyles(o,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},E(Xe,"defaults",wt),E(Xe,"instances",ar),E(Xe,"overrides",Je),E(Xe,"registry",ge),E(Xe,"version",Zp),E(Xe,"getChart",kc),Xe);function Oc(){return ot(Xt.instances,e=>e._plugins.invalidate())}function i0(e,t,n){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,i-c,n+c),l>r?(c=r/l,e.arc(a,s,l,n+c,i-c,!0)):e.arc(a,s,r,n+ht,i-ht),e.closePath(),e.clip()}function r0(e){return sa(e,["outerStart","outerEnd","innerStart","innerEnd"])}function a0(e,t,n,i){const r=r0(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(n-Math.min(a,l))*i/2;return Nt(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:Nt(r.innerStart,0,s),innerEnd:Nt(r.innerEnd,0,s)}}function Mn(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function sr(e,t,n,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const g=r-l;if(i){const N=u>0?u-i:0,Y=d>0?d-i:0,Z=(N+Y)/2,Lt=Z!==0?g*Z/(Z+i):g;f=(g-Lt)/2}const v=Math.max(.001,g*d-n/q)/d,p=(g-v)/2,m=l+p+f,y=r-p-f,{outerStart:_,outerEnd:x,innerStart:w,innerEnd:T}=a0(t,h,d,y-m),M=d-_,S=d-x,P=m+_/M,D=y-x/S,C=h+w,L=h+T,W=m+w/C,at=y-T/L;if(e.beginPath(),a){const N=(P+D)/2;if(e.arc(s,o,d,P,N),e.arc(s,o,d,N,D),x>0){const bt=Mn(S,D,s,o);e.arc(bt.x,bt.y,x,D,y+ht)}const Y=Mn(L,y,s,o);if(e.lineTo(Y.x,Y.y),T>0){const bt=Mn(L,at,s,o);e.arc(bt.x,bt.y,T,y+ht,at+Math.PI)}const Z=(y-T/h+(m+w/h))/2;if(e.arc(s,o,h,y-T/h,Z,!0),e.arc(s,o,h,Z,m+w/h,!0),w>0){const bt=Mn(C,W,s,o);e.arc(bt.x,bt.y,w,W+Math.PI,m-ht)}const Lt=Mn(M,m,s,o);if(e.lineTo(Lt.x,Lt.y),_>0){const bt=Mn(M,P,s,o);e.arc(bt.x,bt.y,_,m-ht,P)}}else{e.moveTo(s,o);const N=Math.cos(P)*d+s,Y=Math.sin(P)*d+o;e.lineTo(N,Y);const Z=Math.cos(D)*d+s,Lt=Math.sin(D)*d+o;e.lineTo(Z,Lt)}e.closePath()}function s0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){sr(e,t,n,i,l,r);for(let c=0;c<a;++c)e.fill();isNaN(o)||(l=s+(o%dt||dt))}return sr(e,t,n,i,l,r),e.fill(),l}function o0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,f?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let g=t.endAngle;if(a){sr(e,t,n,i,g,r);for(let v=0;v<a;++v)e.stroke();isNaN(o)||(g=s+(o%dt||dt))}f&&i0(e,t,g),a||(sr(e,t,n,i,g,r),e.stroke())}class li extends Ht{constructor(n){super();E(this,"circumference");E(this,"endAngle");E(this,"fullCircles");E(this,"innerRadius");E(this,"outerRadius");E(this,"pixelMargin");E(this,"startAngle");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,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=ul(a,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,v=F(h,c-l)>=dt||jn(s,l,c),p=Se(o,u+f,d+f);return v&&p}getCenterPoint(n){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:r}=this,a=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>dt?Math.floor(r/dt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(q,r||0)),u=a*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,s0(n,this,u,s,o),o0(n,this,u,s,o),n.restore()}}E(li,"id","arc"),E(li,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),E(li,"defaultRoutes",{backgroundColor:"backgroundColor"}),E(li,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Ac(e,t,n=t){e.lineCap=F(n.borderCapStyle,t.borderCapStyle),e.setLineDash(F(n.borderDash,t.borderDash)),e.lineDashOffset=F(n.borderDashOffset,t.borderDashOffset),e.lineJoin=F(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=F(n.borderWidth,t.borderWidth),e.strokeStyle=F(n.borderColor,t.borderColor)}function l0(e,t,n){e.lineTo(n.x,n.y)}function c0(e){return e.stepped?Rg:e.tension||e.cubicInterpolationMode==="monotone"?Lg:l0}function Rc(e,t,n={}){const i=e.length,{start:r=0,end:a=i-1}=n,{start:s,end:o}=t,l=Math.max(r,s),c=Math.min(a,o),u=r<s&&a<s||r>o&&a>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function u0(e,t,n,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Rc(r,n,i),u=c0(a);let{move:d=!0,reverse:h}=i||{},f,g,v;for(f=0;f<=c;++f)g=r[(o+(h?c-f:f))%s],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,v,g,h,a.stepped),v=g);return l&&(g=r[(o+(h?c:0))%s],u(e,v,g,h,a.stepped)),!!l}function d0(e,t,n,i){const r=t.points,{count:a,start:s,ilen:o}=Rc(r,n,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,g,v,p,m;const y=x=>(s+(c?o-x:x))%a,_=()=>{v!==p&&(e.lineTo(u,p),e.lineTo(u,v),e.lineTo(u,m))};for(l&&(f=r[y(0)],e.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[y(h)],f.skip)continue;const x=f.x,w=f.y,T=x|0;T===g?(w<v?v=w:w>p&&(p=w),u=(d*u+x)/++d):(_(),e.lineTo(x,w),g=T,d=0,v=p=w),m=w}_()}function wa(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?d0:u0}function h0(e){return e.stepped?hm:e.tension||e.cubicInterpolationMode==="monotone"?fm:an}function f0(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Ac(e,t.options),e.stroke(r)}function g0(e,t,n,i){const{segments:r,options:a}=t,s=wa(t);for(const o of r)Ac(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const m0=typeof Path2D=="function";function p0(e,t,n,i){m0&&!t.options.segment?f0(e,t,n,i):g0(e,t,n,i)}class We extends Ht{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,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;rm(this._points,i,t,r,n),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=ym(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,r=t[n],a=this.points,s=Yl(this,{property:n,start:r,end:r});if(!s.length)return;const o=[],l=h0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],g=a[h];if(f===g){o.push(f);continue}const v=Math.abs((r-f[n])/(g[n]-f[n])),p=l(f,g,v,i.stepped);p[n]=t[n],o.push(p)}return o.length===1?o[0]:o}pathSegment(t,n,i){return wa(this)(t,this,n,i)}path(t,n,i){const r=this.segments,a=wa(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const o of r)s&=a(t,this,o,{start:n,end:n+i-1});return!!s}draw(t,n,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),p0(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}E(We,"id","line"),E(We,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),E(We,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),E(We,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Lc(e,t,n,i){const r=e.options,{[n]:a}=e.getProps([n],i);return Math.abs(t-a)<r.radius+r.hitRadius}class or extends Ht{constructor(n){super();E(this,"parsed");E(this,"skip");E(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(n-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return Lc(this,n,"x",i)}inYRange(n,i){return Lc(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!Pe(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,aa(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}E(or,"id","point"),E(or,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),E(or,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Ic(e,t){const{x:n,y:i,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=a/2,o=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function Ye(e,t,n,i){return e?0:Nt(t,n,i)}function b0(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,a=Sl(i);return{t:Ye(r.top,a.top,0,n),r:Ye(r.right,a.right,0,t),b:Ye(r.bottom,a.bottom,0,n),l:Ye(r.left,a.left,0,t)}}function v0(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=He(r),s=Math.min(t,n),o=e.borderSkipped,l=i||j(r);return{topLeft:Ye(!l||o.top||o.left,a.topLeft,0,s),topRight:Ye(!l||o.top||o.right,a.topRight,0,s),bottomLeft:Ye(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Ye(!l||o.bottom||o.right,a.bottomRight,0,s)}}function y0(e){const t=Ic(e),n=t.right-t.left,i=t.bottom-t.top,r=b0(e,n/2,i/2),a=v0(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function Ta(e,t,n,i){const r=t===null,a=n===null,o=e&&!(r&&a)&&Ic(e,i);return o&&(r||Se(t,o.left,o.right))&&(a||Se(n,o.top,o.bottom))}function x0(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function _0(e,t){e.rect(t.x,t.y,t.w,t.h)}function Ma(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-i,s=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class lr extends Ht{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:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=y0(this),o=x0(s.radius)?xn:_0;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Ma(s,n,a)),t.clip(),o(t,Ma(a,-n,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Ma(a,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return Ta(this,t,n,i)}inXRange(t,n){return Ta(this,t,null,n)}inYRange(t,n){return Ta(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+r)/2:n,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}E(lr,"id","bar"),E(lr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),E(lr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var w0=Object.freeze({__proto__:null,ArcElement:li,BarElement:lr,LineElement:We,PointElement:or});const Sa=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Nc=Sa.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Bc(e){return Sa[e%Sa.length]}function Hc(e){return Nc[e%Nc.length]}function T0(e,t){return e.borderColor=Bc(t),e.backgroundColor=Hc(t),++t}function M0(e,t){return e.backgroundColor=e.data.map(()=>Bc(t++)),t}function S0(e,t){return e.backgroundColor=e.data.map(()=>Hc(t++)),t}function D0(e){let t=0;return(n,i)=>{const r=e.getDatasetMeta(i).controller;r instanceof Ue?t=M0(n,t):r instanceof ti?t=S0(n,t):r&&(t=T0(n,t))}}function Fc(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function P0(e){return e&&(e.borderColor||e.backgroundColor)}var E0={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=e.config,{elements:a}=r;if(!n.forceOverride&&(Fc(i)||P0(r)||a&&Fc(a)))return;const s=D0(e);i.forEach(s)}};function C0(e,t,n,i,r){const a=r.samples||i;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const c=t+n-1;let u=t,d,h,f,g,v;for(s[l++]=e[u],d=0;d<a-2;d++){let p=0,m=0,y;const _=Math.floor((d+1)*o)+1+t,x=Math.min(Math.floor((d+2)*o)+1,n)+t,w=x-_;for(y=_;y<x;y++)p+=e[y].x,m+=e[y].y;p/=w,m/=w;const T=Math.floor(d*o)+1+t,M=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:S,y:P}=e[u];for(f=g=-1,y=T;y<M;y++)g=.5*Math.abs((S-p)*(e[y].y-P)-(S-e[y].x)*(m-P)),g>f&&(f=g,h=e[y],v=y);s[l++]=h,u=v}return s[l++]=e[c],s}function k0(e,t,n,i){let r=0,a=0,s,o,l,c,u,d,h,f,g,v;const p=[],m=t+n-1,y=e[t].x,x=e[m].x-y;for(s=t;s<t+n;++s){o=e[s],l=(o.x-y)/x*i,c=o.y;const w=l|0;if(w===u)c<g?(g=c,d=s):c>v&&(v=c,h=s),r=(a*r+o.x)/++a;else{const T=s-1;if(!U(d)&&!U(h)){const M=Math.min(d,h),S=Math.max(d,h);M!==f&&M!==T&&p.push({...e[M],x:r}),S!==f&&S!==T&&p.push({...e[S],x:r})}s>0&&T!==f&&p.push(e[T]),p.push(o),u=w,a=0,g=v=c,d=h=f=s}}return p}function Uc(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Wc(e){e.data.datasets.forEach(t=>{Uc(t)})}function O0(e,t){const n=t.length;let i=0,r;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=Nt(De(t,a.axis,s).lo,0,n-1)),c?r=Nt(De(t,a.axis,o).hi+1,i,n)-i:r=n-i,{start:i,count:r}}var A0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Wc(e);return}const i=e.width;e.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=e.getDatasetMeta(a),c=s||r.data;if(Kn([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=O0(l,c);const f=n.threshold||4*i;if(h<=f){Uc(r);return}U(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(n.algorithm){case"lttb":g=C0(c,d,h,i,n);break;case"min-max":g=k0(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=g})},destroy(e){Wc(e)}};function R0(e,t,n){const i=e.segments,r=e.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Pa(l,c,r);const u=Da(n,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=Yl(t,u);for(const h of d){const f=Da(n,a[h.start],a[h.end],h.loop),g=Wl(o,r,f);for(const v of g)s.push({source:v,target:h,start:{[n]:Yc(u,f,"start",Math.max)},end:{[n]:Yc(u,f,"end",Math.min)}})}}return s}function Da(e,t,n,i){if(i)return;let r=t[e],a=n[e];return e==="angle"&&(r=ne(r),a=ne(a)),{property:e,start:r,end:a}}function L0(e,t){const{x:n=null,y:i=null}=e||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Pa(s,o,r);const l=r[s],c=r[o];i!==null?(a.push({x:l.x,y:i}),a.push({x:c.x,y:i})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:c.y}))}),a}function Pa(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Yc(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function zc(e,t){let n=[],i=!1;return tt(e)?(i=!0,n=e):n=L0(e,t),n.length?new We({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function jc(e){return e&&e.fill!==!1}function I0(e,t,n){let r=e[t].fill;const a=[t];let s;if(!n)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!xt(r))return r;if(s=e[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function N0(e,t,n){const i=U0(e);if(j(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return xt(r)&&Math.floor(r)===r?B0(i[0],t,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function B0(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function H0(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:j(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function F0(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:j(e)?i=e.value:i=t.getBaseValue(),i}function U0(e){const t=e.options,n=t.fill;let i=F(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function W0(e){const{scale:t,index:n,line:i}=e,r=[],a=i.segments,s=i.points,o=Y0(t,n);o.push(zc({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)z0(r,s[u],o)}return new We({points:r,options:{}})}function Y0(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function z0(e,t,n){const i=[];for(let r=0;r<n.length;r++){const a=n[r],{first:s,last:o,point:l}=j0(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function j0(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const r=i[n],a=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][n],h=s[u.end][n];if(Se(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class Vc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:r,y:a,radius:s}=this;return n=n||{start:0,end:dt},t.arc(r,a,s,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:r}=this,a=t.angle;return{x:n+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function V0(e){const{chart:t,fill:n,line:i}=e;if(xt(n))return $0(t,n);if(n==="stack")return W0(e);if(n==="shape")return!0;const r=q0(e);return r instanceof Vc?r:zc(r,i)}function $0(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function q0(e){return(e.scale||{}).getPointPositionForValue?X0(e):G0(e)}function G0(e){const{scale:t={},fill:n}=e,i=H0(n,t);if(xt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function X0(e){const{scale:t,fill:n}=e,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=F0(n,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Vc({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)o.push(t.getPointPositionForValue(l,s));return o}function Ea(e,t,n){const i=V0(t),{line:r,scale:a,axis:s}=t,o=r.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};i&&r.points.length&&(Gn(e,n),K0(e,{line:r,target:i,above:u,below:d,area:n,scale:a,axis:s}),Xn(e))}function K0(e,t){const{line:n,target:i,above:r,below:a,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&a!==r&&($c(e,i,s.top),qc(e,{line:n,target:i,color:r,scale:o,property:l}),e.restore(),e.save(),$c(e,i,s.bottom)),qc(e,{line:n,target:i,color:a,scale:o,property:l}),e.restore()}function $c(e,t,n){const{segments:i,points:r}=t;let a=!0,s=!1;e.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Pa(l,c,r)];a?(e.moveTo(u.x,u.y),a=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function qc(e,t){const{line:n,target:i,property:r,color:a,scale:s}=t,o=R0(n,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;e.save(),e.fillStyle=h,Z0(e,s,f&&Da(r,u,d)),e.beginPath();const g=!!n.pathSegment(e,l);let v;if(f){g?e.closePath():Gc(e,i,d,r);const p=!!i.pathSegment(e,c,{move:g,reverse:!0});v=g&&p,v||Gc(e,i,u,r)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function Z0(e,t,n){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=n||{};a==="x"&&(e.beginPath(),e.rect(s,i,o-s,r-i),e.clip())}function Gc(e,t,n,i){const r=t.interpolate(n,i);r&&e.lineTo(r.x,r.y)}var Q0={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=e.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof We&&(l={visible:e.isDatasetVisible(s),index:s,fill:N0(o,s,i),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=I0(r,s,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),i&&o.fill&&Ea(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;jc(a)&&Ea(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!jc(i)||n.drawTime!=="beforeDatasetDraw"||Ea(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Xc=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},J0=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Kc extends Ht{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=st(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=mt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Xc(i,a);let c,u;n.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,r){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+o;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,v)=>{const p=i+n/2+a.measureText(g.text).width;(v===0||c[c.length-1]+p+2*o>s)&&(d+=u,c[c.length-(v>0?0:1)]=0,f+=u,h++),l[v]={left:0,top:f,row:h,width:p,height:r},c[c.length-1]+=p+o}),d}_fitCols(t,n,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,g=0,v=0;return this.legendItems.forEach((p,m)=>{const{itemWidth:y,itemHeight:_}=tb(i,n,a,p,r);m>0&&f+_+2*o>u&&(d+=h+o,c.push({width:h,height:f}),g+=h+o,v++,h=f=0),l[m]={left:g,top:f,col:v,width:y,height:_},h=Math.max(h,y),f+=_+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:a}}=this,s=Tn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Wt(i,this.left+r,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=Wt(i,this.left+r,this.right-this.lineWidths[o])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let o=0,l=Wt(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=Wt(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Gn(t,this),this._draw(),Xn(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=wt.color,l=Tn(t.rtl,this.left,this.width),c=mt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:p}=Xc(s,d),m=function(T,M,S){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;r.save();const P=F(S.lineWidth,1);if(r.fillStyle=F(S.fillStyle,o),r.lineCap=F(S.lineCap,"butt"),r.lineDashOffset=F(S.lineDashOffset,0),r.lineJoin=F(S.lineJoin,"miter"),r.lineWidth=P,r.strokeStyle=F(S.strokeStyle,o),r.setLineDash(F(S.lineDash,[])),s.usePointStyle){const D={radius:v*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:P},C=l.xPlus(T,g/2),L=M+h;Ml(r,D,C,L,s.pointStyleWidth&&g)}else{const D=M+Math.max((d-v)/2,0),C=l.leftForLtr(T,g),L=He(S.borderRadius);r.beginPath(),Object.values(L).some(W=>W!==0)?xn(r,{x:C,y:D,w:g,h:v,radius:L}):r.rect(C,D,g,v),r.fill(),P!==0&&r.stroke()}r.restore()},y=function(T,M,S){en(r,S.text,T,M+p/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?f={x:Wt(a,this.left+u,this.right-i[0]),y:this.top+u+x,line:0}:f={x:this.left+u,y:Wt(a,this.top+x+u,this.bottom-n[0].height),line:0},Bl(this.ctx,t.textDirection);const w=p+u;this.legendItems.forEach((T,M)=>{r.strokeStyle=T.fontColor,r.fillStyle=T.fontColor;const S=r.measureText(T.text).width,P=l.textAlign(T.textAlign||(T.textAlign=s.textAlign)),D=g+h+S;let C=f.x,L=f.y;l.setWidth(this.width),_?M>0&&C+D+u>this.right&&(L=f.y+=w,f.line++,C=f.x=Wt(a,this.left+u,this.right-i[f.line])):M>0&&L+w>this.bottom&&(C=f.x=C+n[f.line].width+u,f.line++,L=f.y=Wt(a,this.top+x+u,this.bottom-n[f.line].height));const W=l.x(C);if(m(W,L,T),C=wg(P,C+g+h,_?C+D:this.right,t.rtl),y(l.x(C),L,T),_)f.x+=D+u;else if(typeof T.text!="string"){const at=c.lineHeight;f.y+=Zc(T,at)}else f.y+=w}),Hl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=mt(n.font),r=Ot(n.padding);if(!n.display)return;const a=Tn(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Wt(t.align,d,this.right-h);else{const g=this.columnSizes.reduce((v,p)=>Math.max(v,p.height),0);u=c+Wt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=Wt(o,d,d+h);s.textAlign=a.textAlign(ta(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,en(s,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=mt(t.font),i=Ot(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,a;if(Se(t,this.left,this.right)&&Se(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],Se(t,r.left,r.left+r.width)&&Se(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!ib(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=J0(r,i);r&&!a&&st(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&st(n.onHover,[t,i,this],this)}else i&&st(n.onClick,[t,i,this],this)}}function tb(e,t,n,i,r){const a=eb(i,e,t,n),s=nb(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function eb(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+i.measureText(r).width}function nb(e,t,n){let i=e;return typeof t.text!="string"&&(i=Zc(t,n)),i}function Zc(e,t){const n=e.text?e.text.length+.5:0;return t*n}function ib(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var rb={id:"legend",_element:Kc,start(e,t,n){const i=e.legend=new Kc({ctx:e.ctx,options:n,chart:e});Yt.configure(e,i,n),Yt.addBox(e,i)},stop(e){Yt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Yt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Ot(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Ca extends Ht{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,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const r=tt(i.text)?i.text.length:1;this._padding=Ot(i.padding);const a=r*mt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=Wt(o,i,a),d=n+t,c=a-i):(s.position==="left"?(u=i+t,d=Wt(o,r,n),l=q*-.5):(u=a-t,d=Wt(o,n,r),l=q*.5),c=r-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=mt(n.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);en(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:ta(n.align),textBaseline:"middle",translation:[s,o]})}}function ab(e,t){const n=new Ca({ctx:e.ctx,options:t,chart:e});Yt.configure(e,n,t),Yt.addBox(e,n),e.titleBlock=n}var sb={id:"title",_element:Ca,start(e,t,n){ab(e,n)},stop(e){const t=e.titleBlock;Yt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Yt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const cr=new WeakMap;var ob={id:"subtitle",start(e,t,n){const i=new Ca({ctx:e.ctx,options:n,chart:e});Yt.configure(e,i,n),Yt.addBox(e,i),cr.set(e,i)},stop(e){Yt.removeBox(e,cr.get(e)),cr.delete(e)},beforeUpdate(e,t,n){const i=cr.get(e);Yt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ci={average(e){if(!e.length)return!1;let t,n,i=0,r=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=yn(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function me(e,t){return t&&(tt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ce(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
37
|
+
*/class Sp{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,r){const a=n.listeners[r],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(i-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=bl.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const a=i.items;let s=a.length-1,o=!1,l;for(;s>=0;--s)l=a[s],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(r.draw(),this._notify(r,i,t,"progress")),a.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Ce=new Sp;const Gl="transparent",Dp={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=Tl(e||Gl),r=i.valid&&Tl(t||Gl);return r&&r.valid?r.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Pp{constructor(t,n,i,r){const a=n[i];r=Zn([t.to,r,a,t.from]);const s=Zn([t.from,a,r]);this._active=!0,this._fn=t.fn||Dp[t.type||typeof s],this._easing=Vn[t.easing]||Vn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],a=i-this._start,s=this._duration-a;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=Zn([t.to,n,r,t.from]),this._from=Zn([t.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,r=this._prop,a=this._from,s=this._loop,o=this._to;let l;if(this._active=a!==o&&(s||n<i),!this._active){this._target[r]=o,this._notify(!0);return}if(n<0){this._target[r]=a;return}l=n/i%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(a,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class ha{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!$(t))return;const n=Object.keys(xt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(r=>{const a=t[r];if(!$(a))return;const s={};for(const o of n)s[o]=a[o];(et(a.properties)&&a.properties||[r]).forEach(o=>{(o===r||!i.has(o))&&i.set(o,s)})})}_animateOptions(t,n){const i=n.options,r=Cp(t,i);if(!r)return[];const a=this._createAnimations(r,i);return i.$shared&&kp(t.options.$animations,i).then(()=>{t.options=i},()=>{}),a}_createAnimations(t,n){const i=this._properties,r=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){r.push(...this._animateOptions(t,n));continue}const u=n[c];let d=a[c];const h=i.get(c);if(d)if(h&&d.active()){d.update(h,u,o);continue}else d.cancel();if(!h||!h.duration){t[c]=u;continue}a[c]=d=new Pp(h,t,c,u),r.push(d)}return r}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return Ce.add(this._chart,i),!0}}function kp(e,t){const n=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const a=e[i[r]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function Cp(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Xl(e,t){const n=e&&e.options||{},i=n.reverse,r=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:i?a:r,end:i?r:a}}function Ep(e,t,n){if(n===!1)return!1;const i=Xl(e,n),r=Xl(t,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function Op(e){let t,n,i,r;return $(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r,disabled:e===!1}}function Kl(e,t){const n=[],i=e._getSortedDatasetMetas(t);let r,a;for(r=0,a=i.length;r<a;++r)n.push(i[r].index);return n}function Zl(e,t,n,i={}){const r=e.keys,a=i.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=r.length;s<o;++s){if(l=+r[s],l===n){if(i.all)continue;break}c=e.values[l],vt(c)&&(a||t===0||ge(t)===ge(c))&&(t+=c)}return t}}function Ap(e){const t=Object.keys(e),n=new Array(t.length);let i,r,a;for(i=0,r=t.length;i<r;++i)a=t[i],n[i]={x:a,y:e[a]};return n}function Ql(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Rp(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Lp(e){const{min:t,max:n,minDefined:i,maxDefined:r}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function Ip(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function Jl(e,t,n,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const a=e[r.index];if(n&&a>0||!n&&a<0)return r.index}return null}function tc(e,t){const{chart:n,_cachedMeta:i}=e,r=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=i,l=a.axis,c=s.axis,u=Rp(a,s,i),d=t.length;let h;for(let f=0;f<d;++f){const g=t[f],{[l]:v,[c]:m}=g,p=g._stacks||(g._stacks={});h=p[c]=Ip(r,u,v),h[o]=m,h._top=Jl(h,s,!0,i.type),h._bottom=Jl(h,s,!1,i.type);const y=h._visualValues||(h._visualValues={});y[o]=m}}function fa(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function Np(e,t){return Ue(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Bp(e,t,n){return Ue(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Qn(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const r of t){const a=r._stacks;if(!a||a[i]===void 0||a[i][n]===void 0)return;delete a[i][n],a[i]._visualValues!==void 0&&a[i]._visualValues[n]!==void 0&&delete a[i]._visualValues[n]}}}const ga=e=>e==="reset"||e==="none",ec=(e,t)=>t?e:Object.assign({},e),Hp=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Kl(n,!0),values:null};class ce{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ql(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Qn(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(d,h,f,g)=>d==="x"?h:d==="r"?g:f,a=n.xAxisID=F(i.xAxisID,fa(t,"x")),s=n.yAxisID=F(i.yAxisID,fa(t,"y")),o=n.rAxisID=F(i.rAxisID,fa(t,"r")),l=n.indexAxis,c=n.iAxisID=r(l,a,s,o),u=n.vAxisID=r(l,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&pl(this._data,this),t._stacked&&Qn(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if($(n))this._data=Ap(n);else if(i!==n){if(i){pl(i,this);const r=this._cachedMeta;Qn(r),r._parsed=[]}n&&Object.isExtensible(n)&&Tg(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const a=n._stacked;n._stacked=Ql(n.vScale,n),n.stack!==i.stack&&(r=!0,Qn(n),n.stack=i.stack),this._resyncElements(t),(r||a!==n._stacked)&&tc(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:r}=this,{iScale:a,_stacked:s}=i,o=a.axis;let l=t===0&&n===r.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,d,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{et(r[t])?h=this.parseArrayData(i,r,t,n):$(r[t])?h=this.parseObjectData(i,r,t,n):h=this.parsePrimitiveData(i,r,t,n);const f=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)i._parsed[u+t]=d=h[u],l&&(f()&&(l=!1),c=d);i._sorted=l}s&&tc(this,h)}parsePrimitiveData(t,n,i,r){const{iScale:a,vScale:s}=t,o=a.axis,l=s.axis,c=a.getLabels(),u=a===s,d=new Array(r);let h,f,g;for(h=0,f=r;h<f;++h)g=h+i,d[h]={[o]:u||a.parse(c[g],g),[l]:s.parse(n[g],g)};return d}parseArrayData(t,n,i,r){const{xScale:a,yScale:s}=t,o=new Array(r);let l,c,u,d;for(l=0,c=r;l<c;++l)u=l+i,d=n[u],o[l]={x:a.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,i,r){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(r);let u,d,h,f;for(u=0,d=r;u<d;++u)h=u+i,f=n[h],c[u]={x:a.parse(Ne(f,o),h),y:s.parse(Ne(f,l),h)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const r=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:Kl(r,!0),values:n._stacks[t.axis]._visualValues};return Zl(o,s,a.index,{mode:i})}updateRangeFromParsed(t,n,i,r){const a=i[n.axis];let s=a===null?NaN:a;const o=r&&i._stacks[n.axis];r&&o&&(r.values=o,s=Zl(r,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const i=this._cachedMeta,r=i._parsed,a=i._sorted&&t===i.iScale,s=r.length,o=this._getOtherScale(t),l=Hp(n,i,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Lp(o);let h,f;function g(){f=r[h];const v=f[o.axis];return!vt(f[t.axis])||u>v||d<v}for(h=0;h<s&&!(!g()&&(this.updateRangeFromParsed(c,t,f,l),a));++h);if(a){for(h=s-1;h>=0;--h)if(!g()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let r,a,s;for(r=0,a=n.length;r<a;++r)s=n[r][t.axis],vt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,r=n.vScale,a=this.getParsed(t);return{label:i?""+i.getLabelForValue(a[i.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=Op(F(this.options.clip,Ep(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],a=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||r.length-o,c=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,a,o,l),u=o;u<o+l;++u){const d=r[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,a))}for(u=0;u<s.length;++u)s[u].draw(t,a)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const r=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=Bp(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=r.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=Np(this.chart.getContext(),this.index)),a.dataset=r,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=i,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const r=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],l=this.enableOptionSharing&&Gt(i);if(o)return ec(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=r?[`${t}Hover`,"hover",t,""]:[t,""],h=c.getOptionScopes(this.getDataset(),u),f=Object.keys(xt.elements[t]),g=()=>this.getContext(i,r,n),v=c.resolveNamedOptions(h,f,g,d);return v.$shared&&(v.$shared=l,a[s]=Object.freeze(ec(v,l))),v}_resolveAnimations(t,n,i){const r=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let l;if(r.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(h,this.getContext(t,i,n))}const c=new ha(r,l&&l.animations);return l&&l._cacheable&&(a[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ga(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),r=this._sharedOptions,a=this.getSharedOptions(i),s=this.includeOptions(n,a)||a!==r;return this.updateSharedOptions(a,n,i),{sharedOptions:a,includeOptions:s}}updateElement(t,n,i,r){ga(r)?Object.assign(t,i):this._resolveAnimations(n,r).update(t,i)}updateSharedOptions(t,n,i){t&&!ga(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,r){t.active=r;const a=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(t,{options:!r&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,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 n=this._data,i=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const r=i.length,a=n.length,s=Math.min(a,r);s&&this.parse(0,s),a>r?this._insertElements(r,a-r,t):a<r&&this._removeElements(a,r-a)}_insertElements(t,n,i=!0){const r=this._cachedMeta,a=r.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(t,n),i&&this.updateElements(a,t,n,"reset")}updateElements(t,n,i,r){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,n);i._stacked&&Qn(i,r)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,r]=t;this[n](i,r)}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,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}k(ce,"defaults",{}),k(ce,"datasetElementType",null),k(ce,"dataElementType",null);function Fp(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let r=0,a=n.length;r<a;r++)i=i.concat(n[r].controller.getAllParsedValues(e));e._cache.$bar=ml(i.sort((r,a)=>r-a))}return e._cache.$bar}function Up(e){const t=e.iScale,n=Fp(t,e.type);let i=t._length,r,a,s,o;const l=()=>{s===32767||s===-32768||(Gt(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(r=0,a=n.length;r<a;++r)s=t.getPixelForValue(n[r]),l();for(o=void 0,r=0,a=t.ticks.length;r<a;++r)s=t.getPixelForTick(r),l();return i}function Wp(e,t,n,i){const r=n.barThickness;let a,s;return U(r)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=r*i,s=1),{chunk:a/i,ratio:s,start:t.pixels[e]-a/2}}function Yp(e,t,n,i){const r=t.pixels,a=r[e];let s=e>0?r[e-1]:null,o=e<r.length-1?r[e+1]:null;const l=n.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const c=a-(a-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/i,ratio:n.barPercentage,start:c}}function zp(e,t,n,i){const r=n.parse(e[0],i),a=n.parse(e[1],i),s=Math.min(r,a),o=Math.max(r,a);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:r,end:a,min:s,max:o}}function nc(e,t,n,i){return et(e)?zp(e,t,n,i):t[n.axis]=n.parse(e,i),t}function ic(e,t,n,i){const r=e.iScale,a=e.vScale,s=r.getLabels(),o=r===a,l=[];let c,u,d,h;for(c=n,u=n+i;c<u;++c)h=t[c],d={},d[r.axis]=o||r.parse(s[c],c),l.push(nc(h,d,a,c));return l}function pa(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function jp(e,t,n){return e!==0?ge(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function $p(e){let t,n,i,r,a;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(r="end",a="start"):(r="start",a="end"),{start:n,end:i,reverse:t,top:r,bottom:a}}function Vp(e,t,n,i){let r=t.borderSkipped;const a={};if(!r){e.borderSkipped=a;return}if(r===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=$p(e);r==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?r=c:(n._bottom||0)===i?r=u:(a[rc(u,s,o,l)]=!0,r=c)),a[rc(r,s,o,l)]=!0,e.borderSkipped=a}function rc(e,t,n,i){return i?(e=qp(e,t,n),e=ac(e,n,t)):e=ac(e,t,n),e}function qp(e,t,n){return e===t?n:e===n?t:e}function ac(e,t,n){return e==="start"?t:e==="end"?n:e}function Gp(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Jn extends ce{parsePrimitiveData(t,n,i,r){return ic(t,n,i,r)}parseArrayData(t,n,i,r){return ic(t,n,i,r)}parseObjectData(t,n,i,r){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let h,f,g,v;for(h=i,f=i+r;h<f;++h)v=n[h],g={},g[a.axis]=a.parse(Ne(v,c),h),d.push(nc(Ne(v,u),g,s,h));return d}updateRangeFromParsed(t,n,i,r){super.updateRangeFromParsed(t,n,i,r);const a=i._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:r}=n,a=this.getParsed(t),s=a._custom,o=pa(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+i.getLabelForValue(a[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,r){const a=r==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:h}=this._getSharedOptions(n,r);for(let f=n;f<n+i;f++){const g=this.getParsed(f),v=a||U(g[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,u),p=(g._stacks||{})[o.axis],y={horizontal:c,base:v.base,enableBorderRadius:!p||pa(g._custom)||s===p._top||s===p._bottom,x:c?v.head:m.center,y:c?m.center:v.head,height:c?m.size:Math.abs(v.size),width:c?Math.abs(v.size):m.size};h&&(y.options=d||this.resolveDataElementOptions(f,t[f].active?"active":r));const _=y.options||t[f].options;Vp(y,_,p,s),Gp(y,_,u.ratio),this.updateElement(t[f],f,y,r)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),a=i.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(U(u)||isNaN(u))return!0};for(const l of r)if(!(n!==void 0&&o(l))&&((a===!1||s.indexOf(l.stack)===-1||a===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const r=this._getStacks(t,i),a=n!==void 0?r.indexOf(n):-1;return a===-1?r.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,r=[];let a,s;for(a=0,s=n.data.length;a<s;++a)r.push(i.getPixelForValue(this.getParsed(a)[i.axis],a));const o=t.barThickness;return{min:o||Up(n),pixels:r,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:n,_stacked:i,index:r},options:{base:a,minBarLength:s}}=this,o=a||0,l=this.getParsed(t),c=l._custom,u=pa(c);let d=l[n.axis],h=0,f=i?this.applyStack(n,l,i):d,g,v;f!==d&&(h=f-d,f=d),u&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ge(d)!==ge(c.barEnd)&&(h=0),h+=d);const m=!U(a)&&!u?a:h;let p=n.getPixelForValue(m);if(this.chart.getDataVisibility(t)?g=n.getPixelForValue(h+f):g=p,v=g-p,Math.abs(v)<s){v=jp(v,n,o)*s,d===o&&(p-=v/2);const y=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),x=Math.min(y,_),w=Math.max(y,_);p=Math.max(Math.min(p,w),x),g=p+v,i&&!u&&(l._stacks[n.axis]._visualValues[r]=n.getValueForPixel(g)-n.getValueForPixel(p))}if(p===n.getPixelForValue(o)){const y=ge(v)*n.getLineWidthForValue(o)/2;p+=y,v-=y}return{size:v,base:p,head:g,center:g+v/2}}_calculateBarIndexPixels(t,n){const i=n.scale,r=this.options,a=r.skipNull,s=F(r.maxBarThickness,1/0);let o,l;if(n.grouped){const c=a?this._getStackCount(t):n.stackCount,u=r.barThickness==="flex"?Yp(t,n,r,c):Wp(t,n,r,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,r=i.length;let a=0;for(;a<r;++a)this.getParsed(a)[n.axis]!==null&&i[a].draw(this._ctx)}}k(Jn,"id","bar"),k(Jn,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),k(Jn,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Zi extends ce{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,i,r){const a=super.parsePrimitiveData(t,n,i,r);for(let s=0;s<a.length;s++)a[s]._custom=this.resolveDataElementOptions(s+i).radius;return a}parseArrayData(t,n,i,r){const a=super.parseArrayData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=F(o[2],this.resolveDataElementOptions(s+i).radius)}return a}parseObjectData(t,n,i,r){const a=super.parseObjectData(t,n,i,r);for(let s=0;s<a.length;s++){const o=n[i+s];a[s]._custom=F(o&&o.r&&+o.r,this.resolveDataElementOptions(s+i).radius)}return a}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let i=t.length-1;i>=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y),c=s._custom;return{label:i[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,r),u=s.axis,d=o.axis;for(let h=n;h<n+i;h++){const f=t[h],g=!a&&this.getParsed(h),v={},m=v[u]=a?s.getPixelForDecimal(.5):s.getPixelForValue(g[u]),p=v[d]=a?o.getBasePixel():o.getPixelForValue(g[d]);v.skip=isNaN(m)||isNaN(p),c&&(v.options=l||this.resolveDataElementOptions(h,f.active?"active":r),a&&(v.options.radius=0)),this.updateElement(f,h,v,r)}}resolveDataElementOptions(t,n){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,n);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const a=r.radius;return n!=="active"&&(r.radius=0),r.radius+=F(i&&i._custom,a),r}}k(Zi,"id","bubble"),k(Zi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),k(Zi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Xp(e,t,n){let i=1,r=1,a=0,s=0;if(t<dt){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),h=Math.sin(l),f=(_,x,w)=>$n(_,o,l,!0)?1:Math.max(x,x*n,w,w*n),g=(_,x,w)=>$n(_,o,l,!0)?-1:Math.min(x,x*n,w,w*n),v=f(0,c,d),m=f(ht,u,h),p=g(G,c,d),y=g(G+ht,u,h);i=(v-p)/2,r=(m-y)/2,a=-(v+p)/2,s=-(m+y)/2}return{ratioX:i,ratioY:r,offsetX:a,offsetY:s}}class Ye extends ce{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let a=l=>+i[l];if($(i[t])){const{key:l="value"}=this._parsing;a=c=>+Ne(i[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)r._parsed[s]=a(s)}}_getRotation(){return Pt(this.options.rotation-90)}_getCircumference(){return Pt(this.options.circumference)}_getRotationExtents(){let t=dt,n=-dt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const r=this.chart.getDatasetMeta(i).controller,a=r._getRotation(),s=r._getCircumference();t=Math.min(t,a),n=Math.max(n,a+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,r=this._cachedMeta,a=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),l=Math.min(ug(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:h,ratioY:f,offsetX:g,offsetY:v}=Xp(d,u,l),m=(i.width-s)/h,p=(i.height-s)/f,y=Math.max(Math.min(m,p)/2,0),_=sl(this.options.radius,y),x=Math.max(_*l,0),w=(_-x)/this._getVisibleDatasetWeightTotal();this.offsetX=g*_,this.offsetY=v*_,r.total=this.calculateTotal(),this.outerRadius=_-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,n){const i=this.options,r=this._cachedMeta,a=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*a/dt)}updateElements(t,n,i,r){const a=r==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,h=a&&c.animateScale,f=h?0:this.innerRadius,g=h?0:this.outerRadius,{sharedOptions:v,includeOptions:m}=this._getSharedOptions(n,r);let p=this._getRotation(),y;for(y=0;y<n;++y)p+=this._circumference(y,a);for(y=n;y<n+i;++y){const _=this._circumference(y,a),x=t[y],w={x:u+this.offsetX,y:d+this.offsetY,startAngle:p,endAngle:p+_,circumference:_,outerRadius:g,innerRadius:f};m&&(w.options=v||this.resolveDataElementOptions(y,x.active?"active":r)),p+=_,this.updateElement(x,y,w,r)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,r;for(r=0;r<n.length;r++){const a=t._parsed[r];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(r)&&!n[r].hidden&&(i+=Math.abs(a))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?dt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=qn(n._parsed[t],i.options.locale);return{label:r[t]||"",value:a}}getMaxBorderWidth(t){let n=0;const i=this.chart;let r,a,s,o,l;if(!t){for(r=0,a=i.data.datasets.length;r<a;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,o=s.controller;break}}if(!t)return 0;for(r=0,a=t.length;r<a;++r)l=o.resolveDataElementOptions(r),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,r=t.length;i<r;++i){const a=this.resolveDataElementOptions(i);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(F(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}k(Ye,"id","doughnut"),k(Ye,"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"}),k(Ye,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),k(Ye,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class ti extends ce{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=yl(n,r,s);this._drawStart=o,this._drawCount=l,xl(n)&&(o=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!a._decimated,i.points=r;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:c},t),this.updateElements(r,o,l,t)}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,r),h=s.axis,f=o.axis,{spanGaps:g,segment:v}=this.options,m=He(g)?g:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||a||r==="none",y=n+i,_=t.length;let x=n>0&&this.getParsed(n-1);for(let w=0;w<_;++w){const T=t[w],M=p?T:{};if(w<n||w>=y){M.skip=!0;continue}const S=this.getParsed(w),P=U(S[f]),D=M[h]=s.getPixelForValue(S[h],w),C=M[f]=a||P?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,S,l):S[f],w);M.skip=isNaN(D)||isNaN(C)||P,M.stop=w>0&&Math.abs(S[h]-x[h])>m,v&&(M.parsed=S,M.raw=c.data[w]),d&&(M.options=u||this.resolveDataElementOptions(w,T.active?"active":r)),p||this.updateElement(T,w,M,r),x=S}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const a=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}k(ti,"id","line"),k(ti,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),k(ti,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ei extends ce{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,r=i.data.labels||[],a=qn(n._parsed[t].r,i.options.locale);return{label:r[t]||"",value:a}}parseObjectData(t,n,i,r){return Il.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const a=this.getParsed(r).r;!isNaN(a)&&this.chart.getDataVisibility(r)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?a/100*i.cutoutPercentage:1,0),o=(a-s)/t.getVisibleDatasetCount();this.outerRadius=a-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,i,r){const a=r==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,h=c.getIndexAngle(0)-.5*G;let f=h,g;const v=360/this.countVisibleElements();for(g=0;g<n;++g)f+=this._computeAngle(g,r,v);for(g=n;g<n+i;g++){const m=t[g];let p=f,y=f+this._computeAngle(g,r,v),_=s.getDataVisibility(g)?c.getDistanceFromCenterForValue(this.getParsed(g).r):0;f=y,a&&(l.animateScale&&(_=0),l.animateRotate&&(p=y=h));const x={x:u,y:d,innerRadius:0,outerRadius:_,startAngle:p,endAngle:y,options:this.resolveDataElementOptions(g,m.active?"active":r)};this.updateElement(m,g,x,r)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?Pt(this.resolveDataElementOptions(t,n).angle||i):0}}k(ei,"id","polarArea"),k(ei,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),k(ei,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:r}}=t.legend.options;return n.labels.map((a,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:r,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ma extends Ye{}k(ma,"id","pie"),k(ma,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Qi extends ce{getLabelAndValue(t){const n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,r){return Il.bind(this)(t,n,i,r)}update(t){const n=this._cachedMeta,i=n.dataset,r=n.data||[],a=n.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:a.length===r.length,options:s};this.updateElement(i,void 0,o,t)}this.updateElements(r,0,r.length,t)}updateElements(t,n,i,r){const a=this._cachedMeta.rScale,s=r==="reset";for(let o=n;o<n+i;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":r),u=a.getPointPositionForValue(o,this.getParsed(o).r),d=s?a.xCenter:u.x,h=s?a.yCenter:u.y,f={x:d,y:h,angle:u.angle,skip:isNaN(d)||isNaN(h),options:c};this.updateElement(l,o,f,r)}}}k(Qi,"id","radar"),k(Qi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),k(Qi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Ji extends ce{getLabelAndValue(t){const n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:r,yScale:a}=n,s=this.getParsed(t),o=r.getLabelForValue(s.x),l=a.getLabelForValue(s.y);return{label:i[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:i=[]}=n,r=this.chart._animationsDisabled;let{start:a,count:s}=yl(n,i,r);if(this._drawStart=a,this._drawCount=s,xl(n)&&(a=0,s=i.length),this.options.showLine){const{dataset:o,_dataset:l}=n;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=i;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!r,options:c},t)}this.updateElements(i,a,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,i,r){const a=r==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,r),d=this.getSharedOptions(u),h=this.includeOptions(r,d),f=s.axis,g=o.axis,{spanGaps:v,segment:m}=this.options,p=He(v)?v:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||a||r==="none";let _=n>0&&this.getParsed(n-1);for(let x=n;x<n+i;++x){const w=t[x],T=this.getParsed(x),M=y?w:{},S=U(T[g]),P=M[f]=s.getPixelForValue(T[f],x),D=M[g]=a||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,T,l):T[g],x);M.skip=isNaN(P)||isNaN(D)||S,M.stop=x>0&&Math.abs(T[f]-_[f])>p,m&&(M.parsed=T,M.raw=c.data[x]),h&&(M.options=d||this.resolveDataElementOptions(x,w.active?"active":r)),y||this.updateElement(w,x,M,r),_=T}this.updateSharedOptions(d,r,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!n.length)return r;const a=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(r,a,s)/2}}k(Ji,"id","scatter"),k(Ji,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),k(Ji,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Kp=Object.freeze({__proto__:null,BarController:Jn,BubbleController:Zi,DoughnutController:Ye,LineController:ti,PieController:ma,PolarAreaController:ei,RadarController:Qi,ScatterController:Ji});function on(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ba{constructor(t){k(this,"options");this.options=t||{}}static override(t){Object.assign(ba.prototype,t)}init(){}formats(){return on()}parse(){return on()}format(){return on()}add(){return on()}diff(){return on()}startOf(){return on()}endOf(){return on()}}var sc={_date:ba};function Zp(e,t,n,i){const{controller:r,data:a,_sorted:s}=e,o=r._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const l=o._reversePixels?_g:Pe;if(i){if(r._sharedOptions){const c=a[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(a,t,n-u),h=l(a,t,n+u);return{lo:d.lo,hi:h.hi}}}}else return l(a,t,n)}return{lo:0,hi:a.length-1}}function ni(e,t,n,i,r){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=a.length;o<l;++o){const{index:c,data:u}=a[o],{lo:d,hi:h}=Zp(a[o],t,s,r);for(let f=d;f<=h;++f){const g=u[f];g.skip||i(g,c,f)}}}function Qp(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,r){const a=t?Math.abs(i.x-r.x):0,s=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function va(e,t,n,i,r){const a=[];return!r&&!e.isPointInArea(t)||ni(e,n,t,function(o,l,c){!r&&!ke(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&a.push({element:o,datasetIndex:l,index:c})},!0),a}function Jp(e,t,n,i){let r=[];function a(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:d}=fl(s,{x:t.x,y:t.y});$n(d,c,u)&&r.push({element:s,datasetIndex:o,index:l})}return ni(e,n,t,a),r}function tm(e,t,n,i,r,a){let s=[];const o=Qp(n);let l=Number.POSITIVE_INFINITY;function c(u,d,h){const f=u.inRange(t.x,t.y,r);if(i&&!f)return;const g=u.getCenterPoint(r);if(!(!!a||e.isPointInArea(g))&&!f)return;const m=o(t,g);m<l?(s=[{element:u,datasetIndex:d,index:h}],l=m):m===l&&s.push({element:u,datasetIndex:d,index:h})}return ni(e,n,t,c),s}function ya(e,t,n,i,r,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!i?Jp(e,t,n,r):tm(e,t,n,i,r,a)}function oc(e,t,n,i,r){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return ni(e,n,t,(l,c,u)=>{l[s](t[n],r)&&(a.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,r))}),i&&!o?[]:a}var xa={evaluateInteractionItems:ni,modes:{index(e,t,n,i){const r=We(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?va(e,r,a,i,s):ya(e,r,a,!1,i,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){const r=We(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?va(e,r,a,i,s):ya(e,r,a,!1,i,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,i){const r=We(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return va(e,r,a,i,s)},nearest(e,t,n,i){const r=We(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return ya(e,r,a,n.intersect,i,s)},x(e,t,n,i){const r=We(t,e);return oc(e,r,"x",n.intersect,i)},y(e,t,n,i){const r=We(t,e);return oc(e,r,"y",n.intersect,i)}}};const lc=["left","top","right","bottom"];function ii(e,t){return e.filter(n=>n.pos===t)}function cc(e,t){return e.filter(n=>lc.indexOf(n.pos)===-1&&n.box.axis===t)}function ri(e,t){return e.sort((n,i)=>{const r=t?i:n,a=t?n:i;return r.weight===a.weight?r.index-a.index:r.weight-a.weight})}function em(e){const t=[];let n,i,r,a,s,o;for(n=0,i=(e||[]).length;n<i;++n)r=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=r,t.push({index:n,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&a+s,stackWeight:o});return t}function nm(e){const t={};for(const n of e){const{stack:i,pos:r,stackWeight:a}=n;if(!i||!lc.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function im(e,t){const n=nm(e),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:l}=o.box,c=n[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*i:l&&t.availableWidth,o.height=r):(o.width=i,o.height=u?u*r:l&&t.availableHeight)}return n}function rm(e){const t=em(e),n=ri(t.filter(c=>c.box.fullSize),!0),i=ri(ii(t,"left"),!0),r=ri(ii(t,"right")),a=ri(ii(t,"top"),!0),s=ri(ii(t,"bottom")),o=cc(t,"x"),l=cc(t,"y");return{fullSize:n,leftAndTop:i.concat(a),rightAndBottom:r.concat(l).concat(s).concat(o),chartArea:ii(t,"chartArea"),vertical:i.concat(r).concat(l),horizontal:a.concat(s).concat(o)}}function uc(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function dc(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function am(e,t,n,i){const{pos:r,box:a}=n,s=e.maxPadding;if(!$(r)){n.size&&(e[r]-=n.size);const d=i[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?a.height:a.width),n.size=d.size/d.count,e[r]+=n.size}a.getPadding&&dc(s,a.getPadding());const o=Math.max(0,t.outerWidth-uc(s,e,"left","right")),l=Math.max(0,t.outerHeight-uc(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function sm(e){const t=e.maxPadding;function n(i){const r=Math.max(t[i]-e[i],0);return e[i]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function om(e,t){const n=t.maxPadding;function i(r){const a={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{a[s]=Math.max(t[s],n[s])}),a}return i(e?["left","right"]:["top","bottom"])}function ai(e,t,n,i){const r=[];let a,s,o,l,c,u;for(a=0,s=e.length,c=0;a<s;++a){o=e[a],l=o.box,l.update(o.width||t.w,o.height||t.h,om(o.horizontal,t));const{same:d,other:h}=am(t,n,o,i);c|=d&&r.length,u=u||h,l.fullSize||r.push(o)}return c&&ai(r,t,n,i)||u}function tr(e,t,n,i,r){e.top=n,e.left=t,e.right=t+i,e.bottom=n+r,e.width=i,e.height=r}function hc(e,t,n,i){const r=n.padding;let{x:a,y:s}=t;for(const o of e){const l=o.box,c=i[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,h=c.size||l.height;Gt(c.start)&&(s=c.start),l.fullSize?tr(l,r.left,s,n.outerWidth-r.right-r.left,h):tr(l,t.left+c.placed,s,d,h),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,h=c.size||l.width;Gt(c.start)&&(a=c.start),l.fullSize?tr(l,a,r.top,h,n.outerHeight-r.bottom-r.top):tr(l,a,t.top+c.placed,h,d),c.start=a,c.placed+=d,a=l.right}}t.x=a,t.y=s}var zt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const r=kt(e.options.layout.padding),a=Math.max(t-r.width,0),s=Math.max(n-r.height,0),o=rm(e.boxes),l=o.vertical,c=o.horizontal;lt(e.boxes,v=>{typeof v.beforeLayout=="function"&&v.beforeLayout()});const u=l.reduce((v,m)=>m.box.options&&m.box.options.display===!1?v:v+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:r,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);dc(h,kt(i));const f=Object.assign({maxPadding:h,w:a,h:s,x:r.left,y:r.top},r),g=im(l.concat(c),d);ai(o.fullSize,f,d,g),ai(l,f,d,g),ai(c,f,d,g)&&ai(l,f,d,g),sm(f),hc(o.leftAndTop,f,d,g),f.x+=f.w,f.y+=f.h,hc(o.rightAndBottom,f,d,g),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},lt(o.chartArea,v=>{const m=v.box;Object.assign(m,e.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class fc{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,r){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(t){return!0}updateConfig(t){}}class lm extends fc{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const er="$chartjs",cm={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},gc=e=>e===null||e==="";function um(e,t){const n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e[er]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",gc(r)){const a=Fl(e,"width");a!==void 0&&(e.width=a)}if(gc(i))if(e.style.height==="")e.height=e.width/(t||2);else{const a=Fl(e,"height");a!==void 0&&(e.height=a)}return e}const pc=gp?{passive:!0}:!1;function dm(e,t,n){e.addEventListener(t,n,pc)}function hm(e,t,n){e.canvas.removeEventListener(t,n,pc)}function fm(e,t){const n=cm[e.type]||e.type,{x:i,y:r}=We(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:r!==void 0?r:null}}function nr(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function gm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||nr(o.addedNodes,i),s=s&&!nr(o.removedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function pm(e,t,n){const i=e.canvas,r=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||nr(o.removedNodes,i),s=s&&!nr(o.addedNodes,i);s&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const si=new Map;let mc=0;function bc(){const e=window.devicePixelRatio;e!==mc&&(mc=e,si.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function mm(e,t){si.size||window.addEventListener("resize",bc),si.set(e,t)}function bm(e){si.delete(e),si.size||window.removeEventListener("resize",bc)}function vm(e,t,n){const i=e.canvas,r=i&&da(i);if(!r)return;const a=vl((o,l)=>{const c=r.clientWidth;n(o,l),c<r.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return s.observe(r),mm(e,a),s}function _a(e,t,n){n&&n.disconnect(),t==="resize"&&bm(e)}function ym(e,t,n){const i=e.canvas,r=vl(a=>{e.ctx!==null&&n(fm(a,e))},e);return dm(i,t,r),r}class xm extends fc{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(um(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[er])return!1;const i=n[er].initial;["height","width"].forEach(a=>{const s=i[a];U(s)?n.removeAttribute(a):n.setAttribute(a,s)});const r=i.style||{};return Object.keys(r).forEach(a=>{n.style[a]=r[a]}),n.width=n.width,delete n[er],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const r=t.$proxies||(t.$proxies={}),s={attach:gm,detach:pm,resize:vm}[n]||ym;r[n]=s(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),r=i[n];if(!r)return;({attach:_a,detach:_a,resize:_a}[n]||hm)(t,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,r){return fp(t,n,i,r)}isAttached(t){const n=da(t);return!!(n&&n.isConnected)}}function _m(e){return!Bl()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?lm:xm}class Ht{constructor(){k(this,"x");k(this,"y");k(this,"active",!1);k(this,"options");k(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return He(this.x)&&He(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const r={};return t.forEach(a=>{r[a]=i[a]&&i[a].active()?i[a]._to:this[a]}),r}}k(Ht,"defaults",{}),k(Ht,"defaultRoutes");function wm(e,t){const n=e.options.ticks,i=Tm(e),r=Math.min(n.maxTicksLimit||i,i),a=n.major.enabled?Sm(t):[],s=a.length,o=a[0],l=a[s-1],c=[];if(s>r)return Dm(t,c,a,s/r),c;const u=Mm(a,t,r);if(s>0){let d,h;const f=s>1?Math.round((l-o)/(s-1)):null;for(ir(t,c,u,U(f)?0:o-f,o),d=0,h=s-1;d<h;d++)ir(t,c,u,a[d],a[d+1]);return ir(t,c,u,l,U(f)?t.length:l+f),c}return ir(t,c,u),c}function Tm(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),r=e._maxLength/n;return Math.floor(Math.min(i,r))}function Mm(e,t,n){const i=Pm(e),r=t.length/n;if(!i)return Math.max(r,1);const a=bg(i);for(let s=0,o=a.length-1;s<o;s++){const l=a[s];if(l>r)return l}return Math.max(r,1)}function Sm(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function Dm(e,t,n,i){let r=0,a=n[0],s;for(i=Math.ceil(i),s=0;s<e.length;s++)s===a&&(t.push(e[s]),r++,a=n[r*i])}function ir(e,t,n,i,r){const a=F(i,0),s=Math.min(F(r,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),u=a;u<0;)o++,u=Math.round(a+o*n);for(c=Math.max(a,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(a+o*n))}function Pm(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const km=e=>e==="left"?"right":e==="right"?"left":e,vc=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,yc=(e,t)=>Math.min(t||e,e);function xc(e,t){const n=[],i=e.length/t,r=e.length;let a=0;for(;a<r;a+=i)n.push(e[Math.floor(a)]);return n}function Cm(e,t,n){const i=e.ticks.length,r=Math.min(t,i-1),a=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(r),c;if(!(n&&(i===1?c=Math.max(l-a,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(r-1))/2,l+=r<t?c:-c,l<a-o||l>s+o)))return l}function Em(e,t){lt(e,n=>{const i=n.gc,r=i.length/2;let a;if(r>t){for(a=0;a<r;++a)delete n.data[i[a]];i.splice(0,r)}})}function oi(e){return e.drawTicks?e.tickLength:0}function _c(e,t){if(!e.display)return 0;const n=pt(e.font,t),i=kt(e.padding);return(et(e.text)?e.text.length:1)*n.lineHeight+i.height}function Om(e,t){return Ue(e,{scale:t,type:"scale"})}function Am(e,t,n){return Ue(e,{tick:n,index:t,type:"tick"})}function Rm(e,t,n){let i=ea(e);return(n&&t!=="right"||!n&&t==="right")&&(i=km(i)),i}function Lm(e,t,n,i){const{top:r,left:a,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,h,f,g;const v=s-r,m=o-a;if(e.isHorizontal()){if(f=Yt(i,a,o),$(n)){const p=Object.keys(n)[0],y=n[p];g=u[p].getPixelForValue(y)+v-t}else n==="center"?g=(c.bottom+c.top)/2+v-t:g=vc(e,n,t);h=o-a}else{if($(n)){const p=Object.keys(n)[0],y=n[p];f=u[p].getPixelForValue(y)-m+t}else n==="center"?f=(c.left+c.right)/2-m+t:f=vc(e,n,t);g=Yt(i,s,r),d=n==="left"?-ht:ht}return{titleX:f,titleY:g,maxWidth:h,rotation:d}}class ln extends Ht{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return t=ne(t,Number.POSITIVE_INFINITY),n=ne(n,Number.NEGATIVE_INFINITY),i=ne(i,Number.POSITIVE_INFINITY),r=ne(r,Number.NEGATIVE_INFINITY),{min:ne(t,i),max:ne(n,r),minDefined:vt(t),maxDefined:vt(n)}}getMinMax(t){let{min:n,max:i,minDefined:r,maxDefined:a}=this.getUserBounds(),s;if(r&&a)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),r||(n=Math.min(n,s.min)),a||(i=Math.max(i,s.max));return n=a&&n>i?i:n,i=r&&n>i?n:i,{min:ne(n,ne(i,n)),max:ne(i,ne(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ot(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:r,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,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=$g(this,a,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?xc(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=wm(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ot(this.options.afterUpdate,[this])}beforeSetDimensions(){ot(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(){ot(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ot(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ot(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,r,a;for(i=0,r=t.length;i<r;i++)a=t[i],a.label=ot(n.callback,[a.value,i,t],this)}afterTickToLabelConversion(){ot(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ot(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=yc(this.ticks.length,t.ticks.maxTicksLimit),r=n.minRotation||0,a=n.maxRotation;let s=r,o,l,c;if(!this._isVisible()||!n.display||r>=a||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),d=u.widest.width,h=u.highest.height,f=It(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/i:f/(i-1),d+6>o&&(o=f/(i-(t.offset?.5:1)),l=this.maxHeight-oi(t.grid)-n.padding-_c(t.title,this.chart.options.font),c=Math.sqrt(d*d+h*h),s=zi(Math.min(Math.asin(It((u.highest.height+6)/o,-1,1)),Math.asin(It(l/c,-1,1))-Math.asin(It(h/c,-1,1)))),s=Math.max(r,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){ot(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ot(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=_c(r,n.options.font);if(o?(t.width=this.maxWidth,t.height=oi(a)+l):(t.height=this.maxHeight,t.width=oi(a)+l),i.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:h}=this._getLabelSizes(),f=i.padding*2,g=Pt(this.labelRotation),v=Math.cos(g),m=Math.sin(g);if(o){const p=i.mirror?0:m*d.width+v*h.height;t.height=Math.min(this.maxHeight,t.height+p+f)}else{const p=i.mirror?0:v*d.width+m*h.height;t.width=Math.min(this.maxWidth,t.width+p+f)}this._calculatePadding(c,u,m,v)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,r){const{ticks:{align:a,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,f=0;l?c?(h=r*t.width,f=i*n.height):(h=i*t.height,f=r*n.width):a==="start"?f=n.width:a==="end"?h=t.width:a!=="inner"&&(h=t.width/2,f=n.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;a==="start"?(u=0,d=t.height):a==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){ot(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)U(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=xc(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:r,_longestTextCache:a}=this,s=[],o=[],l=Math.floor(n/yc(n,i));let c=0,u=0,d,h,f,g,v,m,p,y,_,x,w;for(d=0;d<n;d+=l){if(g=t[d].label,v=this._resolveTickFontOptions(d),r.font=m=v.string,p=a[m]=a[m]||{data:{},gc:[]},y=v.lineHeight,_=x=0,!U(g)&&!et(g))_=Vi(r,p.data,p.gc,_,g),x=y;else if(et(g))for(h=0,f=g.length;h<f;++h)w=g[h],!U(w)&&!et(w)&&(_=Vi(r,p.data,p.gc,_,w),x+=y);s.push(_),o.push(x),c=Math.max(_,c),u=Math.max(x,u)}Em(a,n);const T=s.indexOf(c),M=o.indexOf(u),S=P=>({width:s[P]||0,height:o[P]||0});return{first:S(0),last:S(n-1),widest:S(T),highest:S(M),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return xg(this._alignToPixels?nn(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=Am(this.getContext(),t,i))}return this.$context||(this.$context=Om(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Pt(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,l=a?a.highest.height+s:0;return this.isHorizontal()?l*i>o*r?o/i:l/r:l*r<o*i?l/i:o/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,r=this.options,{grid:a,position:s,border:o}=r,l=a.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),h=oi(a),f=[],g=o.setContext(this.getContext()),v=g.display?g.width:0,m=v/2,p=function(Y){return nn(i,Y,v)};let y,_,x,w,T,M,S,P,D,C,L,W;if(s==="top")y=p(this.bottom),M=this.bottom-h,P=y-m,C=p(t.top)+m,W=t.bottom;else if(s==="bottom")y=p(this.top),C=t.top,W=p(t.bottom)-m,M=y+m,P=this.top+h;else if(s==="left")y=p(this.right),T=this.right-h,S=y-m,D=p(t.left)+m,L=t.right;else if(s==="right")y=p(this.left),D=t.left,L=p(t.right)-m,T=y+m,S=this.left+h;else if(n==="x"){if(s==="center")y=p((t.top+t.bottom)/2+.5);else if($(s)){const Y=Object.keys(s)[0],Q=s[Y];y=p(this.chart.scales[Y].getPixelForValue(Q))}C=t.top,W=t.bottom,M=y+m,P=M+h}else if(n==="y"){if(s==="center")y=p((t.left+t.right)/2);else if($(s)){const Y=Object.keys(s)[0],Q=s[Y];y=p(this.chart.scales[Y].getPixelForValue(Q))}T=y-m,S=T-h,D=t.left,L=t.right}const st=F(r.ticks.maxTicksLimit,d),N=Math.max(1,Math.ceil(d/st));for(_=0;_<d;_+=N){const Y=this.getContext(_),Q=a.setContext(Y),At=o.setContext(Y),bt=Q.lineWidth,Jt=Q.color,qt=At.dash||[],Nt=At.dashOffset,te=Q.tickWidth,ut=Q.tickColor,ee=Q.tickBorderDash||[],oe=Q.tickBorderDashOffset;x=Cm(this,_,l),x!==void 0&&(w=nn(i,x,bt),c?T=S=D=L=w:M=P=C=W=w,f.push({tx1:T,ty1:M,tx2:S,ty2:P,x1:D,y1:C,x2:L,y2:W,width:bt,color:Jt,borderDash:qt,borderDashOffset:Nt,tickWidth:te,tickColor:ut,tickBorderDash:ee,tickBorderDashOffset:oe}))}return this._ticksLength=d,this._borderValue=y,f}_computeLabelItems(t){const n=this.axis,i=this.options,{position:r,ticks:a}=i,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=a,h=oi(i.grid),f=h+u,g=d?-u:f,v=-Pt(this.labelRotation),m=[];let p,y,_,x,w,T,M,S,P,D,C,L,W="middle";if(r==="top")T=this.bottom-g,M=this._getXAxisLabelAlignment();else if(r==="bottom")T=this.top+g,M=this._getXAxisLabelAlignment();else if(r==="left"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,w=N.x}else if(r==="right"){const N=this._getYAxisLabelAlignment(h);M=N.textAlign,w=N.x}else if(n==="x"){if(r==="center")T=(t.top+t.bottom)/2+f;else if($(r)){const N=Object.keys(r)[0],Y=r[N];T=this.chart.scales[N].getPixelForValue(Y)+f}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")w=(t.left+t.right)/2-f;else if($(r)){const N=Object.keys(r)[0],Y=r[N];w=this.chart.scales[N].getPixelForValue(Y)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(l==="start"?W="top":l==="end"&&(W="bottom"));const st=this._getLabelSizes();for(p=0,y=o.length;p<y;++p){_=o[p],x=_.label;const N=a.setContext(this.getContext(p));S=this.getPixelForTick(p)+a.labelOffset,P=this._resolveTickFontOptions(p),D=P.lineHeight,C=et(x)?x.length:1;const Y=C/2,Q=N.color,At=N.textStrokeColor,bt=N.textStrokeWidth;let Jt=M;s?(w=S,M==="inner"&&(p===y-1?Jt=this.options.reverse?"left":"right":p===0?Jt=this.options.reverse?"right":"left":Jt="center"),r==="top"?c==="near"||v!==0?L=-C*D+D/2:c==="center"?L=-st.highest.height/2-Y*D+D:L=-st.highest.height+D/2:c==="near"||v!==0?L=D/2:c==="center"?L=st.highest.height/2-Y*D:L=st.highest.height-C*D,d&&(L*=-1),v!==0&&!N.showLabelBackdrop&&(w+=D/2*Math.sin(v))):(T=S,L=(1-C)*D/2);let qt;if(N.showLabelBackdrop){const Nt=kt(N.backdropPadding),te=st.heights[p],ut=st.widths[p];let ee=L-Nt.top,oe=0-Nt.left;switch(W){case"middle":ee-=te/2;break;case"bottom":ee-=te;break}switch(M){case"center":oe-=ut/2;break;case"right":oe-=ut;break}qt={left:oe,top:ee,width:ut+Nt.width,height:te+Nt.height,color:N.backdropColor}}m.push({label:x,font:P,textOffset:L,options:{rotation:v,color:Q,strokeColor:At,strokeWidth:bt,textAlign:Jt,textBaseline:W,translation:[w,T],backdrop:qt}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Pt(this.labelRotation))return t==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:r,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,l=s.widest.width;let c,u;return n==="left"?r?(u=this.right+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?r?(u=this.left+a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:r,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,r,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(a=>a.value===t);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(a=0,s=r.length;a<s;++a){const l=r[a];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:r}}=this,a=i.setContext(this.getContext()),s=i.display?a.width:0;if(!s)return;const o=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,h;this.isHorizontal()?(c=nn(t,this.left,s)-s/2,u=nn(t,this.right,o)+o/2,d=h=l):(d=nn(t,this.top,s)-s/2,h=nn(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&Xn(i,r);const a=this.getLabelItems(t);for(const s of a){const o=s.options,l=s.font,c=s.label,u=s.textOffset;rn(i,c,0,u,l,o)}r&&Kn(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const a=pt(i.font),s=kt(i.padding),o=i.align;let l=a.lineHeight/2;n==="bottom"||n==="center"||$(n)?(l+=s.bottom,et(i.text)&&(l+=a.lineHeight*(i.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:h}=Lm(this,l,n,o);rn(t,i.text,0,0,a,{color:i.color,maxWidth:d,rotation:h,textAlign:Rm(o,n,r),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=F(t.grid&&t.grid.z,-1),r=F(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ln.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:i,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[i]===this.id&&(!t||o.type===t)&&r.push(o)}return r}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return pt(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class rr{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;Bm(n)&&(i=this.register(n));const r=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,Im(t,s,i),this.override&&xt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,r=this.scope;i in n&&delete n[i],r&&i in xt[r]&&(delete xt[r][i],this.override&&delete en[i])}}function Im(e,t,n){const i=Yn(Object.create(null),[n?xt.get(n):{},xt.get(t),e.defaults]);xt.set(t,i),e.defaultRoutes&&Nm(t,e.defaultRoutes),e.descriptors&&xt.describe(t,e.descriptors)}function Nm(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),r=i.pop(),a=[e].concat(i).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");xt.route(a,r,l,o)})}function Bm(e){return"id"in e&&"defaults"in e}class Hm{constructor(){this.controllers=new rr(ce,"datasets",!0),this.elements=new rr(Ht,"elements"),this.plugins=new rr(Object,"plugins"),this.scales=new rr(ln,"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,n,i){[...n].forEach(r=>{const a=i||this._getRegistryForType(r);i||a.isForType(r)||a===this.plugins&&r.id?this._exec(t,a,r):lt(r,s=>{const o=i||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,i){const r=Qr(t);ot(i["before"+r],[],i),n[t](i),ot(i["after"+r],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const r=n.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var pe=new Hm;class Fm{constructor(){this._init=[]}notify(t,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(a,t,n,i);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,i,r){r=r||{};for(const a of t){const s=a.plugin,o=s[i],l=[n,r,a.options];if(ot(o,l,s)===!1&&r.cancelable)return!1}return!0}invalidate(){U(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,r=F(i.options&&i.options.plugins,{}),a=Um(i);return r===!1&&!n?[]:Ym(t,a,r,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,r=(a,s)=>a.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(r(n,i),t,"stop"),this._notify(r(i,n),t,"start")}}function Um(e){const t={},n=[],i=Object.keys(pe.plugins.items);for(let a=0;a<i.length;a++)n.push(pe.getPlugin(i[a]));const r=e.plugins||[];for(let a=0;a<r.length;a++){const s=r[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function Wm(e,t){return!t&&e===!1?null:e===!0?{}:e}function Ym(e,{plugins:t,localIds:n},i,r){const a=[],s=e.getContext();for(const o of t){const l=o.id,c=Wm(i[l],r);c!==null&&a.push({plugin:o,options:zm(e.config,{plugin:o,local:n[l]},c,s)})}return a}function zm(e,{plugin:t,local:n},i,r){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(i,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wa(e,t){const n=xt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function jm(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function $m(e,t){return e===t?"_index_":"_value_"}function wc(e){if(e==="x"||e==="y"||e==="r")return e}function Vm(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Ta(e,...t){if(wc(e))return e;for(const n of t){const i=n.axis||Vm(n.position)||e.length>1&&wc(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Tc(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function qm(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Tc(e,"x",n[0])||Tc(e,"y",n[0])}return{}}function Gm(e,t){const n=en[e.type]||{scales:{}},i=t.scales||{},r=wa(e.type,t),a=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!$(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Ta(s,o,qm(s,e),xt.scales[o.type]),c=$m(l,r),u=n.scales||{};a[s]=zn(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||wa(o,t),u=(en[o]||{}).scales||{};Object.keys(u).forEach(d=>{const h=jm(d,l),f=s[h+"AxisID"]||h;a[f]=a[f]||Object.create(null),zn(a[f],[{axis:h},i[f],u[d]])})}),Object.keys(a).forEach(s=>{const o=a[s];zn(o,[xt.scales[o.type],xt.scale])}),a}function Mc(e){const t=e.options||(e.options={});t.plugins=F(t.plugins,{}),t.scales=Gm(e,t)}function Sc(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Xm(e){return e=e||{},e.data=Sc(e.data),Mc(e),e}const Dc=new Map,Pc=new Set;function ar(e,t){let n=Dc.get(e);return n||(n=t(),Dc.set(e,n),Pc.add(n)),n}const li=(e,t,n)=>{const i=Ne(t,n);i!==void 0&&e.add(i)};class Km{constructor(t){this._config=Xm(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=Sc(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(),Mc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ar(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return ar(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return ar(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return ar(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let r=i.get(t);return(!r||n)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,n,i){const{options:r,type:a}=this,s=this._cachedScopes(t,i),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>li(l,t,d))),u.forEach(d=>li(l,r,d)),u.forEach(d=>li(l,en[a]||{},d)),u.forEach(d=>li(l,xt,d)),u.forEach(d=>li(l,ra,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Pc.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,en[n]||{},xt.datasets[n]||{},{type:n},xt,ra]}resolveNamedOptions(t,n,i,r=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=kc(this._resolverCache,t,r);let l=s;if(Qm(s,n)){a.$shared=!1,i=Xt(i)?i():i;const c=this.createResolver(t,i,o);l=wn(s,i,c)}for(const c of n)a[c]=l[c];return a}createResolver(t,n,i=[""],r){const{resolver:a}=kc(this._resolverCache,t,i);return $(n)?wn(a,n,void 0,r):a}}function kc(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const r=n.join();let a=i.get(r);return a||(a={resolver:la(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},i.set(r,a)),a}const Zm=e=>$(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Xt(e[n]),!1);function Qm(e,t){const{isScriptable:n,isIndexable:i}=Cl(e);for(const r of t){const a=n(r),s=i(r),o=(s||a)&&e[r];if(a&&(Xt(o)||Zm(o))||s&&et(o))return!0}return!1}var Jm="4.3.0";const t0=["top","bottom","left","right","chartArea"];function Cc(e,t){return e==="top"||e==="bottom"||t0.indexOf(e)===-1&&t==="x"}function Ec(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Oc(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ot(n&&n.onComplete,[e],t)}function e0(e){const t=e.chart,n=t.options.animation;ot(n&&n.onProgress,[e],t)}function Ac(e){return Bl()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const sr={},Rc=e=>{const t=Ac(e);return Object.values(sr).filter(n=>n.canvas===t).pop()};function n0(e,t,n){const i=Object.keys(e);for(const r of i){const a=+r;if(a>=t){const s=e[r];delete e[r],(n>0||a>t)&&(e[a+n]=s)}}}function i0(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function r0(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}let Kt=(Ze=class{static register(...t){pe.add(...t),Lc()}static unregister(...t){pe.remove(...t),Lc()}constructor(t,n){const i=this.config=new Km(n),r=Ac(t),a=Rc(r);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 s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||_m(r)),this.platform.updateConfig(i);const o=this.platform.acquireContext(r,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=cg(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 Fm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Mg(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],sr[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ce.listen(this,"complete",Oc),Ce.listen(this,"progress",e0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:r,_aspectRatio:a}=this;return U(t)?n&&a?a:r?i/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return pe}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Dl(this.canvas,this.ctx),this}stop(){return Ce.stop(this),this}resize(t,n){Ce.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,r=this.canvas,a=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,n,a),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Hl(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),ot(i.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};lt(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,r=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],l=Ta(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),lt(a,s=>{const o=s.options,l=o.id,c=Ta(l,o),u=F(o.type,s.dtype);(o.position===void 0||Cc(o.position,c)!==Cc(s.dposition))&&(o.position=s.dposition),r[l]=!0;let d=null;if(l in i&&i[l].type===u)d=i[l];else{const h=pe.getScale(u);d=new h({id:l,type:u,ctx:this.ctx,chart:this}),i[d.id]=d}d.init(o,t)}),lt(r,(s,o)=>{s||delete i[o]}),lt(i,s=>{zt.configure(this,s,s.options),zt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((r,a)=>r.index-a.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(Ec("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,r)=>{n.filter(a=>a===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const a=n[i];let s=this.getDatasetMeta(i);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=a.indexAxis||wa(o,this.options),s.order=a.order||0,s.index=i,s.label=""+a.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const l=pe.getController(o),{datasetElementType:c,dataElementType:u}=xt.datasets[o];Object.assign(l,{dataElementType:pe.getElement(u),datasetElementType:c&&pe.getElement(c)}),s.controller=new l(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){lt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),h=!r&&a.indexOf(d)===-1;d.buildOrUpdateElements(h),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||lt(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ec("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){lt(this.scales,t=>{zt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!cl(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:a}of n){const s=i==="_removeElements"?-a:a;n0(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),r=i(0);for(let a=1;a<n;a++)if(!cl(r,i(a)))return;return Array.from(r).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;zt.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],lt(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,a)=>{r._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,Xt(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Ce.has(this)?this.attached&&!Ce.running(this)&&Ce.start(this):(this.draw(),Oc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let r,a;for(r=0,a=n.length;r<a;++r){const s=n[r];(!t||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,r=!i.disabled,a=r0(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&Xn(n,{left:i.left===!1?0:a.left-i.left,right:i.right===!1?this.width:a.right+i.right,top:i.top===!1?0:a.top-i.top,bottom:i.bottom===!1?this.height:a.bottom+i.bottom}),t.controller.draw(),r&&Kn(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return ke(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,r){const a=xa.modes[n];return typeof a=="function"?a(this,t,i,r):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let r=i.filter(a=>a&&a._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=Ue(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const r=i?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,r);Gt(n)?(a.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(a,{visible:i}),this.update(o=>o.datasetIndex===t?r:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Ce.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Dl(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete sr[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,n=this.platform,i=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},r=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};lt(this.options.events,a=>i(a,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},r=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{r("attach",o),this.attached=!0,this.resize(),i("resize",a),i("detach",s)};s=()=>{this.attached=!1,r("resize",a),this._stop(),this._resize(0,0),i("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){lt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},lt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const r=i?"set":"remove";let a,s,o,l;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+r+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!Fi(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const r=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=a(n,t),o=i?t:a(t,n);s.length&&this.updateHoverStyle(s,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},r=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const a=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(a||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:r=[],options:a}=this,s=n,o=this._getActiveElements(t,r,i,s),l=pg(t),c=i0(t,this._lastEvent,i,l);i&&(this._lastEvent=null,ot(a.onHover,[t,o,this],this),l&&ot(a.onClick,[t,o,this],this));const u=!Fi(o,r);return(u||n)&&(this._active=o,this._updateHoverStyles(o,r,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,r){if(t.type==="mouseout")return[];if(!i)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,r)}},k(Ze,"defaults",xt),k(Ze,"instances",sr),k(Ze,"overrides",en),k(Ze,"registry",pe),k(Ze,"version",Jm),k(Ze,"getChart",Rc),Ze);function Lc(){return lt(Kt.instances,e=>e._plugins.invalidate())}function a0(e,t,n){const{startAngle:i,pixelMargin:r,x:a,y:s,outerRadius:o,innerRadius:l}=t;let c=r/o;e.beginPath(),e.arc(a,s,o,i-c,n+c),l>r?(c=r/l,e.arc(a,s,l,n+c,i-c,!0)):e.arc(a,s,r,n+ht,i-ht),e.closePath(),e.clip()}function s0(e){return oa(e,["outerStart","outerEnd","innerStart","innerEnd"])}function o0(e,t,n,i){const r=s0(e.options.borderRadius),a=(n-t)/2,s=Math.min(a,i*t/2),o=l=>{const c=(n-Math.min(a,l))*i/2;return It(l,0,Math.min(a,c))};return{outerStart:o(r.outerStart),outerEnd:o(r.outerEnd),innerStart:It(r.innerStart,0,s),innerEnd:It(r.innerEnd,0,s)}}function Sn(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function or(e,t,n,i,r,a){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+i+n-c,0),h=u>0?u+i+n+c:0;let f=0;const g=r-l;if(i){const N=u>0?u-i:0,Y=d>0?d-i:0,Q=(N+Y)/2,At=Q!==0?g*Q/(Q+i):g;f=(g-At)/2}const v=Math.max(.001,g*d-n/G)/d,m=(g-v)/2,p=l+m+f,y=r-m-f,{outerStart:_,outerEnd:x,innerStart:w,innerEnd:T}=o0(t,h,d,y-p),M=d-_,S=d-x,P=p+_/M,D=y-x/S,C=h+w,L=h+T,W=p+w/C,st=y-T/L;if(e.beginPath(),a){const N=(P+D)/2;if(e.arc(s,o,d,P,N),e.arc(s,o,d,N,D),x>0){const bt=Sn(S,D,s,o);e.arc(bt.x,bt.y,x,D,y+ht)}const Y=Sn(L,y,s,o);if(e.lineTo(Y.x,Y.y),T>0){const bt=Sn(L,st,s,o);e.arc(bt.x,bt.y,T,y+ht,st+Math.PI)}const Q=(y-T/h+(p+w/h))/2;if(e.arc(s,o,h,y-T/h,Q,!0),e.arc(s,o,h,Q,p+w/h,!0),w>0){const bt=Sn(C,W,s,o);e.arc(bt.x,bt.y,w,W+Math.PI,p-ht)}const At=Sn(M,p,s,o);if(e.lineTo(At.x,At.y),_>0){const bt=Sn(M,P,s,o);e.arc(bt.x,bt.y,_,p-ht,P)}}else{e.moveTo(s,o);const N=Math.cos(P)*d+s,Y=Math.sin(P)*d+o;e.lineTo(N,Y);const Q=Math.cos(D)*d+s,At=Math.sin(D)*d+o;e.lineTo(Q,At)}e.closePath()}function l0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o}=t;let l=t.endAngle;if(a){or(e,t,n,i,l,r);for(let c=0;c<a;++c)e.fill();isNaN(o)||(l=s+(o%dt||dt))}return or(e,t,n,i,l,r),e.fill(),l}function c0(e,t,n,i,r){const{fullCircles:a,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:h}=l,f=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=h,f?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let g=t.endAngle;if(a){or(e,t,n,i,g,r);for(let v=0;v<a;++v)e.stroke();isNaN(o)||(g=s+(o%dt||dt))}f&&a0(e,t,g),a||(or(e,t,n,i,g,r),e.stroke())}class ci extends Ht{constructor(n){super();k(this,"circumference");k(this,"endAngle");k(this,"fullCircles");k(this,"innerRadius");k(this,"outerRadius");k(this,"pixelMargin");k(this,"startAngle");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,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.getProps(["x","y"],r),{angle:s,distance:o}=fl(a,{x:n,y:i}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,v=F(h,c-l)>=dt||$n(s,l,c),m=De(o,u+f,d+f);return v&&m}getCenterPoint(n){const{x:i,y:r,startAngle:a,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(a+s)/2,h=(o+l+u+c)/2;return{x:i+Math.cos(d)*h,y:r+Math.sin(d)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:r}=this,a=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=r>dt?Math.floor(r/dt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*a,Math.sin(l)*a);const c=1-Math.sin(Math.min(G,r||0)),u=a*c;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,l0(n,this,u,s,o),c0(n,this,u,s,o),n.restore()}}k(ci,"id","arc"),k(ci,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),k(ci,"defaultRoutes",{backgroundColor:"backgroundColor"}),k(ci,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Ic(e,t,n=t){e.lineCap=F(n.borderCapStyle,t.borderCapStyle),e.setLineDash(F(n.borderDash,t.borderDash)),e.lineDashOffset=F(n.borderDashOffset,t.borderDashOffset),e.lineJoin=F(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=F(n.borderWidth,t.borderWidth),e.strokeStyle=F(n.borderColor,t.borderColor)}function u0(e,t,n){e.lineTo(n.x,n.y)}function d0(e){return e.stepped?Ng:e.tension||e.cubicInterpolationMode==="monotone"?Bg:u0}function Nc(e,t,n={}){const i=e.length,{start:r=0,end:a=i-1}=n,{start:s,end:o}=t,l=Math.max(r,s),c=Math.min(a,o),u=r<s&&a<s||r>o&&a>o;return{count:i,start:l,loop:t.loop,ilen:c<l&&!u?i+c-l:c-l}}function h0(e,t,n,i){const{points:r,options:a}=t,{count:s,start:o,loop:l,ilen:c}=Nc(r,n,i),u=d0(a);let{move:d=!0,reverse:h}=i||{},f,g,v;for(f=0;f<=c;++f)g=r[(o+(h?c-f:f))%s],!g.skip&&(d?(e.moveTo(g.x,g.y),d=!1):u(e,v,g,h,a.stepped),v=g);return l&&(g=r[(o+(h?c:0))%s],u(e,v,g,h,a.stepped)),!!l}function f0(e,t,n,i){const r=t.points,{count:a,start:s,ilen:o}=Nc(r,n,i),{move:l=!0,reverse:c}=i||{};let u=0,d=0,h,f,g,v,m,p;const y=x=>(s+(c?o-x:x))%a,_=()=>{v!==m&&(e.lineTo(u,m),e.lineTo(u,v),e.lineTo(u,p))};for(l&&(f=r[y(0)],e.moveTo(f.x,f.y)),h=0;h<=o;++h){if(f=r[y(h)],f.skip)continue;const x=f.x,w=f.y,T=x|0;T===g?(w<v?v=w:w>m&&(m=w),u=(d*u+x)/++d):(_(),e.lineTo(x,w),g=T,d=0,v=m=w),p=w}_()}function Ma(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?f0:h0}function g0(e){return e.stepped?pp:e.tension||e.cubicInterpolationMode==="monotone"?mp:sn}function p0(e,t,n,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,n,i)&&r.closePath()),Ic(e,t.options),e.stroke(r)}function m0(e,t,n,i){const{segments:r,options:a}=t,s=Ma(t);for(const o of r)Ic(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const b0=typeof Path2D=="function";function v0(e,t,n,i){b0&&!t.options.segment?p0(e,t,n,i):m0(e,t,n,i)}class ze extends Ht{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,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;op(this._points,i,t,r,n),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=wp(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,r=t[n],a=this.points,s=$l(this,{property:n,start:r,end:r});if(!s.length)return;const o=[],l=g0(i);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:h}=s[c],f=a[d],g=a[h];if(f===g){o.push(f);continue}const v=Math.abs((r-f[n])/(g[n]-f[n])),m=l(f,g,v,i.stepped);m[n]=t[n],o.push(m)}return o.length===1?o[0]:o}pathSegment(t,n,i){return Ma(this)(t,this,n,i)}path(t,n,i){const r=this.segments,a=Ma(this);let s=this._loop;n=n||0,i=i||this.points.length-n;for(const o of r)s&=a(t,this,o,{start:n,end:n+i-1});return!!s}draw(t,n,i,r){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),v0(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}k(ze,"id","line"),k(ze,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),k(ze,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),k(ze,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Bc(e,t,n,i){const r=e.options,{[n]:a}=e.getProps([n],i);return Math.abs(t-a)<r.radius+r.hitRadius}class lr extends Ht{constructor(n){super();k(this,"parsed");k(this,"skip");k(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],r);return Math.pow(n-s,2)+Math.pow(i-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,i){return Bc(this,n,"x",i)}inYRange(n,i){return Bc(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!ke(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,sa(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}k(lr,"id","point"),k(lr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),k(lr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Hc(e,t){const{x:n,y:i,base:r,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,r),l=Math.max(n,r),c=i-d,u=i+d):(d=a/2,o=n-d,l=n+d,c=Math.min(i,r),u=Math.max(i,r)),{left:o,top:c,right:l,bottom:u}}function je(e,t,n,i){return e?0:It(t,n,i)}function y0(e,t,n){const i=e.options.borderWidth,r=e.borderSkipped,a=kl(i);return{t:je(r.top,a.top,0,n),r:je(r.right,a.right,0,t),b:je(r.bottom,a.bottom,0,n),l:je(r.left,a.left,0,t)}}function x0(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,a=Fe(r),s=Math.min(t,n),o=e.borderSkipped,l=i||$(r);return{topLeft:je(!l||o.top||o.left,a.topLeft,0,s),topRight:je(!l||o.top||o.right,a.topRight,0,s),bottomLeft:je(!l||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:je(!l||o.bottom||o.right,a.bottomRight,0,s)}}function _0(e){const t=Hc(e),n=t.right-t.left,i=t.bottom-t.top,r=y0(e,n/2,i/2),a=x0(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:a},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,a.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(r.b,r.r))}}}}function Sa(e,t,n,i){const r=t===null,a=n===null,o=e&&!(r&&a)&&Hc(e,i);return o&&(r||De(t,o.left,o.right))&&(a||De(n,o.top,o.bottom))}function w0(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function T0(e,t){e.rect(t.x,t.y,t.w,t.h)}function Da(e,t,n={}){const i=e.x!==n.x?-t:0,r=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-i,s=(e.y+e.h!==n.y+n.h?t:0)-r;return{x:e.x+i,y:e.y+r,w:e.w+a,h:e.h+s,radius:e.radius}}class cr extends Ht{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:n,options:{borderColor:i,backgroundColor:r}}=this,{inner:a,outer:s}=_0(this),o=w0(s.radius)?_n:T0;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,Da(s,n,a)),t.clip(),o(t,Da(a,-n,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Da(a,n)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,n,i){return Sa(this,t,n,i)}inXRange(t,n){return Sa(this,t,null,n)}inYRange(t,n){return Sa(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:r,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+r)/2:n,y:a?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}k(cr,"id","bar"),k(cr,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),k(cr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var M0=Object.freeze({__proto__:null,ArcElement:ci,BarElement:cr,LineElement:ze,PointElement:lr});const Pa=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Fc=Pa.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function Uc(e){return Pa[e%Pa.length]}function Wc(e){return Fc[e%Fc.length]}function S0(e,t){return e.borderColor=Uc(t),e.backgroundColor=Wc(t),++t}function D0(e,t){return e.backgroundColor=e.data.map(()=>Uc(t++)),t}function P0(e,t){return e.backgroundColor=e.data.map(()=>Wc(t++)),t}function k0(e){let t=0;return(n,i)=>{const r=e.getDatasetMeta(i).controller;r instanceof Ye?t=D0(n,t):r instanceof ei?t=P0(n,t):r&&(t=S0(n,t))}}function Yc(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function C0(e){return e&&(e.borderColor||e.backgroundColor)}var E0={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:i},options:r}=e.config,{elements:a}=r;if(!n.forceOverride&&(Yc(i)||C0(r)||a&&Yc(a)))return;const s=k0(e);i.forEach(s)}};function O0(e,t,n,i,r){const a=r.samples||i;if(a>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(a-2);let l=0;const c=t+n-1;let u=t,d,h,f,g,v;for(s[l++]=e[u],d=0;d<a-2;d++){let m=0,p=0,y;const _=Math.floor((d+1)*o)+1+t,x=Math.min(Math.floor((d+2)*o)+1,n)+t,w=x-_;for(y=_;y<x;y++)m+=e[y].x,p+=e[y].y;m/=w,p/=w;const T=Math.floor(d*o)+1+t,M=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:S,y:P}=e[u];for(f=g=-1,y=T;y<M;y++)g=.5*Math.abs((S-m)*(e[y].y-P)-(S-e[y].x)*(p-P)),g>f&&(f=g,h=e[y],v=y);s[l++]=h,u=v}return s[l++]=e[c],s}function A0(e,t,n,i){let r=0,a=0,s,o,l,c,u,d,h,f,g,v;const m=[],p=t+n-1,y=e[t].x,x=e[p].x-y;for(s=t;s<t+n;++s){o=e[s],l=(o.x-y)/x*i,c=o.y;const w=l|0;if(w===u)c<g?(g=c,d=s):c>v&&(v=c,h=s),r=(a*r+o.x)/++a;else{const T=s-1;if(!U(d)&&!U(h)){const M=Math.min(d,h),S=Math.max(d,h);M!==f&&M!==T&&m.push({...e[M],x:r}),S!==f&&S!==T&&m.push({...e[S],x:r})}s>0&&T!==f&&m.push(e[T]),m.push(o),u=w,a=0,g=v=c,d=h=f=s}}return m}function zc(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function jc(e){e.data.datasets.forEach(t=>{zc(t)})}function R0(e,t){const n=t.length;let i=0,r;const{iScale:a}=e,{min:s,max:o,minDefined:l,maxDefined:c}=a.getUserBounds();return l&&(i=It(Pe(t,a.axis,s).lo,0,n-1)),c?r=It(Pe(t,a.axis,o).hi+1,i,n)-i:r=n-i,{start:i,count:r}}var L0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){jc(e);return}const i=e.width;e.data.datasets.forEach((r,a)=>{const{_data:s,indexAxis:o}=r,l=e.getDatasetMeta(a),c=s||r.data;if(Zn([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:h}=R0(l,c);const f=n.threshold||4*i;if(h<=f){zc(r);return}U(s)&&(r._data=c,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(v){this._data=v}}));let g;switch(n.algorithm){case"lttb":g=O0(c,d,h,i,n);break;case"min-max":g=A0(c,d,h,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}r._decimated=g})},destroy(e){jc(e)}};function I0(e,t,n){const i=e.segments,r=e.points,a=t.points,s=[];for(const o of i){let{start:l,end:c}=o;c=Ca(l,c,r);const u=ka(n,r[l],r[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:r[l],end:r[c]});continue}const d=$l(t,u);for(const h of d){const f=ka(n,a[h.start],a[h.end],h.loop),g=jl(o,r,f);for(const v of g)s.push({source:v,target:h,start:{[n]:$c(u,f,"start",Math.max)},end:{[n]:$c(u,f,"end",Math.min)}})}}return s}function ka(e,t,n,i){if(i)return;let r=t[e],a=n[e];return e==="angle"&&(r=ie(r),a=ie(a)),{property:e,start:r,end:a}}function N0(e,t){const{x:n=null,y:i=null}=e||{},r=t.points,a=[];return t.segments.forEach(({start:s,end:o})=>{o=Ca(s,o,r);const l=r[s],c=r[o];i!==null?(a.push({x:l.x,y:i}),a.push({x:c.x,y:i})):n!==null&&(a.push({x:n,y:l.y}),a.push({x:n,y:c.y}))}),a}function Ca(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function $c(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function Vc(e,t){let n=[],i=!1;return et(e)?(i=!0,n=e):n=N0(e,t),n.length?new ze({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function qc(e){return e&&e.fill!==!1}function B0(e,t,n){let r=e[t].fill;const a=[t];let s;if(!n)return r;for(;r!==!1&&a.indexOf(r)===-1;){if(!vt(r))return r;if(s=e[r],!s)return!1;if(s.visible)return r;a.push(r),r=s.fill}return!1}function H0(e,t,n){const i=Y0(e);if($(i))return isNaN(i.value)?!1:i;let r=parseFloat(i);return vt(r)&&Math.floor(r)===r?F0(i[0],t,r,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function F0(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function U0(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:$(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function W0(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:$(e)?i=e.value:i=t.getBaseValue(),i}function Y0(e){const t=e.options,n=t.fill;let i=F(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function z0(e){const{scale:t,index:n,line:i}=e,r=[],a=i.segments,s=i.points,o=j0(t,n);o.push(Vc({x:null,y:t.bottom},i));for(let l=0;l<a.length;l++){const c=a[l];for(let u=c.start;u<=c.end;u++)$0(r,s[u],o)}return new ze({points:r,options:{}})}function j0(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let r=0;r<i.length;r++){const a=i[r];if(a.index===t)break;a.hidden||n.unshift(a.dataset)}return n}function $0(e,t,n){const i=[];for(let r=0;r<n.length;r++){const a=n[r],{first:s,last:o,point:l}=V0(a,t,"x");if(!(!l||s&&o)){if(s)i.unshift(l);else if(e.push(l),!o)break}}e.push(...i)}function V0(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const r=i[n],a=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<a.length;c++){const u=a[c],d=s[u.start][n],h=s[u.end][n];if(De(r,d,h)){o=r===d,l=r===h;break}}return{first:o,last:l,point:i}}class Gc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:r,y:a,radius:s}=this;return n=n||{start:0,end:dt},t.arc(r,a,s,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:r}=this,a=t.angle;return{x:n+Math.cos(a)*r,y:i+Math.sin(a)*r,angle:a}}}function q0(e){const{chart:t,fill:n,line:i}=e;if(vt(n))return G0(t,n);if(n==="stack")return z0(e);if(n==="shape")return!0;const r=X0(e);return r instanceof Gc?r:Vc(r,i)}function G0(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function X0(e){return(e.scale||{}).getPointPositionForValue?Z0(e):K0(e)}function K0(e){const{scale:t={},fill:n}=e,i=U0(n,t);if(vt(i)){const r=t.isHorizontal();return{x:r?i:null,y:r?null:i}}return null}function Z0(e){const{scale:t,fill:n}=e,i=t.options,r=t.getLabels().length,a=i.reverse?t.max:t.min,s=W0(n,t,a),o=[];if(i.grid.circular){const l=t.getPointPositionForValue(0,a);return new Gc({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<r;++l)o.push(t.getPointPositionForValue(l,s));return o}function Ea(e,t,n){const i=q0(t),{line:r,scale:a,axis:s}=t,o=r.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};i&&r.points.length&&(Xn(e,n),Q0(e,{line:r,target:i,above:u,below:d,area:n,scale:a,axis:s}),Kn(e))}function Q0(e,t){const{line:n,target:i,above:r,below:a,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&a!==r&&(Xc(e,i,s.top),Kc(e,{line:n,target:i,color:r,scale:o,property:l}),e.restore(),e.save(),Xc(e,i,s.bottom)),Kc(e,{line:n,target:i,color:a,scale:o,property:l}),e.restore()}function Xc(e,t,n){const{segments:i,points:r}=t;let a=!0,s=!1;e.beginPath();for(const o of i){const{start:l,end:c}=o,u=r[l],d=r[Ca(l,c,r)];a?(e.moveTo(u.x,u.y),a=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function Kc(e,t){const{line:n,target:i,property:r,color:a,scale:s}=t,o=I0(n,i,r);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:h=a}={}}=l,f=i!==!0;e.save(),e.fillStyle=h,J0(e,s,f&&ka(r,u,d)),e.beginPath();const g=!!n.pathSegment(e,l);let v;if(f){g?e.closePath():Zc(e,i,d,r);const m=!!i.pathSegment(e,c,{move:g,reverse:!0});v=g&&m,v||Zc(e,i,u,r)}e.closePath(),e.fill(v?"evenodd":"nonzero"),e.restore()}}function J0(e,t,n){const{top:i,bottom:r}=t.chart.chartArea,{property:a,start:s,end:o}=n||{};a==="x"&&(e.beginPath(),e.rect(s,i,o-s,r-i),e.clip())}function Zc(e,t,n,i){const r=t.interpolate(n,i);r&&e.lineTo(r.x,r.y)}var tb={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,r=[];let a,s,o,l;for(s=0;s<i;++s)a=e.getDatasetMeta(s),o=a.dataset,l=null,o&&o.options&&o instanceof ze&&(l={visible:e.isDatasetVisible(s),index:s,fill:H0(o,s,i),chart:e,axis:a.controller.options.indexAxis,scale:a.vScale,line:o}),a.$filler=l,r.push(l);for(s=0;s<i;++s)l=r[s],!(!l||l.fill===!1)&&(l.fill=B0(r,s,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",r=e.getSortedVisibleDatasetMetas(),a=e.chartArea;for(let s=r.length-1;s>=0;--s){const o=r[s].$filler;o&&(o.line.updateControlPoints(a,o.axis),i&&o.fill&&Ea(e.ctx,o,a))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let r=i.length-1;r>=0;--r){const a=i[r].$filler;qc(a)&&Ea(e.ctx,a,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!qc(i)||n.drawTime!=="beforeDatasetDraw"||Ea(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Qc=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},eb=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Jc extends Ht{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,n,i){this.maxWidth=t,this.maxHeight=n,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 n=ot(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=pt(i.font),a=r.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=Qc(i,a);let c,u;n.font=r.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,a,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,r,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,r){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=r+o;let d=t;a.textAlign="left",a.textBaseline="middle";let h=-1,f=-u;return this.legendItems.forEach((g,v)=>{const m=i+n/2+a.measureText(g.text).width;(v===0||c[c.length-1]+m+2*o>s)&&(d+=u,c[c.length-(v>0?0:1)]=0,f+=u,h++),l[v]={left:0,top:f,row:h,width:m,height:r},c[c.length-1]+=m+o}),d}_fitCols(t,n,i,r){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,h=0,f=0,g=0,v=0;return this.legendItems.forEach((m,p)=>{const{itemWidth:y,itemHeight:_}=nb(i,n,a,m,r);p>0&&f+_+2*o>u&&(d+=h+o,c.push({width:h,height:f}),g+=h+o,v++,h=f=0),l[p]={left:g,top:f,col:v,width:y,height:_},h=Math.max(h,y),f+=_+o}),d+=h,c.push({width:h,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:r},rtl:a}}=this,s=Mn(a,this.left,this.width);if(this.isHorizontal()){let o=0,l=Yt(i,this.left+r,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=Yt(i,this.left+r,this.right-this.lineWidths[o])),c.top+=this.top+t+r,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+r}else{let o=0,l=Yt(i,this.top+t+r,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=Yt(i,this.top+t+r,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+r,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Xn(t,this),this._draw(),Kn(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:r}=this,{align:a,labels:s}=t,o=xt.color,l=Mn(t.rtl,this.left,this.width),c=pt(s.font),{padding:u}=s,d=c.size,h=d/2;let f;this.drawTitle(),r.textAlign=l.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=c.string;const{boxWidth:g,boxHeight:v,itemHeight:m}=Qc(s,d),p=function(T,M,S){if(isNaN(g)||g<=0||isNaN(v)||v<0)return;r.save();const P=F(S.lineWidth,1);if(r.fillStyle=F(S.fillStyle,o),r.lineCap=F(S.lineCap,"butt"),r.lineDashOffset=F(S.lineDashOffset,0),r.lineJoin=F(S.lineJoin,"miter"),r.lineWidth=P,r.strokeStyle=F(S.strokeStyle,o),r.setLineDash(F(S.lineDash,[])),s.usePointStyle){const D={radius:v*Math.SQRT2/2,pointStyle:S.pointStyle,rotation:S.rotation,borderWidth:P},C=l.xPlus(T,g/2),L=M+h;Pl(r,D,C,L,s.pointStyleWidth&&g)}else{const D=M+Math.max((d-v)/2,0),C=l.leftForLtr(T,g),L=Fe(S.borderRadius);r.beginPath(),Object.values(L).some(W=>W!==0)?_n(r,{x:C,y:D,w:g,h:v,radius:L}):r.rect(C,D,g,v),r.fill(),P!==0&&r.stroke()}r.restore()},y=function(T,M,S){rn(r,S.text,T,M+m/2,c,{strikethrough:S.hidden,textAlign:l.textAlign(S.textAlign)})},_=this.isHorizontal(),x=this._computeTitleHeight();_?f={x:Yt(a,this.left+u,this.right-i[0]),y:this.top+u+x,line:0}:f={x:this.left+u,y:Yt(a,this.top+x+u,this.bottom-n[0].height),line:0},Ul(this.ctx,t.textDirection);const w=m+u;this.legendItems.forEach((T,M)=>{r.strokeStyle=T.fontColor,r.fillStyle=T.fontColor;const S=r.measureText(T.text).width,P=l.textAlign(T.textAlign||(T.textAlign=s.textAlign)),D=g+h+S;let C=f.x,L=f.y;l.setWidth(this.width),_?M>0&&C+D+u>this.right&&(L=f.y+=w,f.line++,C=f.x=Yt(a,this.left+u,this.right-i[f.line])):M>0&&L+w>this.bottom&&(C=f.x=C+n[f.line].width+u,f.line++,L=f.y=Yt(a,this.top+x+u,this.bottom-n[f.line].height));const W=l.x(C);if(p(W,L,T),C=Sg(P,C+g+h,_?C+D:this.right,t.rtl),y(l.x(C),L,T),_)f.x+=D+u;else if(typeof T.text!="string"){const st=c.lineHeight;f.y+=tu(T,st)}else f.y+=w}),Wl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=pt(n.font),r=kt(n.padding);if(!n.display)return;const a=Mn(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=i.size/2,c=r.top+l;let u,d=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,d=Yt(t.align,d,this.right-h);else{const g=this.columnSizes.reduce((v,m)=>Math.max(v,m.height),0);u=c+Yt(t.align,this.top,this.bottom-g-t.labels.padding-this._computeTitleHeight())}const f=Yt(o,d,d+h);s.textAlign=a.textAlign(ea(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=i.string,rn(s,n.text,f,u,i)}_computeTitleHeight(){const t=this.options.title,n=pt(t.font),i=kt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,r,a;if(De(t,this.left,this.right)&&De(n,this.top,this.bottom)){for(a=this.legendHitBoxes,i=0;i<a.length;++i)if(r=a[i],De(t,r.left,r.left+r.width)&&De(n,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!ab(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,a=eb(r,i);r&&!a&&ot(n.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!a&&ot(n.onHover,[t,i,this],this)}else i&&ot(n.onClick,[t,i,this],this)}}function nb(e,t,n,i,r){const a=ib(i,e,t,n),s=rb(r,i,t.lineHeight);return{itemWidth:a,itemHeight:s}}function ib(e,t,n,i){let r=e.text;return r&&typeof r!="string"&&(r=r.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+i.measureText(r).width}function rb(e,t,n){let i=e;return typeof t.text!="string"&&(i=tu(t,n)),i}function tu(e,t){const n=e.text?e.text.length+.5:0;return t*n}function ab(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var sb={id:"legend",_element:Jc,start(e,t,n){const i=e.legend=new Jc({ctx:e.ctx,options:n,chart:e});zt.configure(e,i,n),zt.addBox(e,i)},stop(e){zt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;zt.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,r=n.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:r,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=kt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:r||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Oa extends Ht{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,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const r=et(i.text)?i.text.length:1;this._padding=kt(i.padding);const a=r*pt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:r,right:a,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=Yt(o,i,a),d=n+t,c=a-i):(s.position==="left"?(u=i+t,d=Yt(o,r,n),l=G*-.5):(u=a-t,d=Yt(o,n,r),l=G*.5),c=r-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=pt(n.font),a=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(a);rn(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:ea(n.align),textBaseline:"middle",translation:[s,o]})}}function ob(e,t){const n=new Oa({ctx:e.ctx,options:t,chart:e});zt.configure(e,n,t),zt.addBox(e,n),e.titleBlock=n}var lb={id:"title",_element:Oa,start(e,t,n){ob(e,n)},stop(e){const t=e.titleBlock;zt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;zt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ur=new WeakMap;var cb={id:"subtitle",start(e,t,n){const i=new Oa({ctx:e.ctx,options:n,chart:e});zt.configure(e,i,n),zt.addBox(e,i),ur.set(e,i)},stop(e){zt.removeBox(e,ur.get(e)),ur.delete(e)},beforeUpdate(e,t,n){const i=ur.get(e);zt.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ui={average(e){if(!e.length)return!1;let t,n,i=0,r=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();i+=o.x,r+=o.y,++a}}return{x:i/a,y:r/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,r=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=xn(t,c);u<r&&(r=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function me(e,t){return t&&(et(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ee(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
38
38
|
`)>-1?e.split(`
|
|
39
|
-
`):e}function lb(e,t){const{element:n,datasetIndex:i,index:r}=t,a=e.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function Qc(e,t){const n=e.chart.ctx,{body:i,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=mt(t.bodyFont),c=mt(t.titleFont),u=mt(t.footerFont),d=a.length,h=r.length,f=i.length,g=Ot(t.padding);let v=g.height,p=0,m=i.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(m+=e.beforeBody.length+e.afterBody.length,d&&(v+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;v+=f*x+(m-f)*l.lineHeight+(m-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const _=function(x){p=Math.max(p,n.measureText(x).width+y)};return n.save(),n.font=c.string,ot(e.title,_),n.font=l.string,ot(e.beforeBody.concat(e.afterBody),_),y=t.displayColors?s+2+t.boxPadding:0,ot(i,x=>{ot(x.before,_),ot(x.lines,_),ot(x.after,_)}),y=0,n.font=u.string,ot(e.footer,_),n.restore(),p+=g.width,{width:p,height:v}}function cb(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function ub(e,t,n,i){const{x:r,width:a}=i,s=n.caretSize+n.caretPadding;if(e==="left"&&r+a+s>t.width||e==="right"&&r-a-s<0)return!0}function db(e,t,n,i){const{x:r,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),ub(c,e,t,n)&&(c="center"),c}function Jc(e,t,n){const i=n.yAlign||t.yAlign||cb(e,n);return{xAlign:n.xAlign||t.xAlign||db(e,t,n,i),yAlign:i}}function hb(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function fb(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function tu(e,t,n,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=He(s);let g=hb(t,o);const v=fb(t,l,c);return l==="center"?o==="left"?g+=c:o==="right"&&(g-=c):o==="left"?g-=Math.max(u,h)+r:o==="right"&&(g+=Math.max(d,f)+r),{x:Nt(g,0,i.width-t.width),y:Nt(v,0,i.height-t.height)}}function ur(e,t,n){const i=Ot(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function eu(e){return me([],Ce(e))}function gb(e,t,n){return Fe(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function nu(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const iu={beforeTitle:Me,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Me,beforeBody:Me,beforeLabel:Me,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return U(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Me,afterBody:Me,beforeFooter:Me,footer:Me,afterFooter:Me};function Kt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?iu[t].call(n,i):r}class ka extends Ht{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new da(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=gb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=Kt(i,"beforeTitle",this,t),a=Kt(i,"title",this,t),s=Kt(i,"afterTitle",this,t);let o=[];return o=me(o,Ce(r)),o=me(o,Ce(a)),o=me(o,Ce(s)),o}getBeforeBody(t,n){return eu(Kt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return ot(t,a=>{const s={before:[],lines:[],after:[]},o=nu(i,a);me(s.before,Ce(Kt(o,"beforeLabel",this,a))),me(s.lines,Kt(o,"label",this,a)),me(s.after,Ce(Kt(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,n){return eu(Kt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=Kt(i,"beforeFooter",this,t),a=Kt(i,"footer",this,t),s=Kt(i,"afterFooter",this,t);let o=[];return o=me(o,Ce(r)),o=me(o,Ce(a)),o=me(o,Ce(s)),o}_createItems(t){const n=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(lb(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),ot(o,u=>{const d=nu(t.callbacks,u);r.push(Kt(d,"labelColor",this,u)),a.push(Kt(d,"labelPointStyle",this,u)),s.push(Kt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const i=this.options.setContext(this.getContext()),r=this._active;let a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const o=ci[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=Qc(this,i),c=Object.assign({},o,l),u=Jc(this.chart,i,c),d=tu(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){const a=this.getCaretPosition(t,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=He(o),{x:h,y:f}=t,{width:g,height:v}=n;let p,m,y,_,x,w;return a==="center"?(x=f+v/2,r==="left"?(p=h,m=p-s,_=x+s,w=x-s):(p=h+g,m=p+s,_=x-s,w=x+s),y=p):(r==="left"?m=h+Math.max(l,u)+s:r==="right"?m=h+g-Math.max(c,d)-s:m=this.caretX,a==="top"?(_=f,x=_-s,p=m-s,y=m+s):(_=f+v,x=_+s,p=m+s,y=m-s),w=_),{x1:p,x2:m,x3:y,y1:_,y2:x,y3:w}}drawTitle(t,n,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=Tn(i.rtl,this.x,this.width);for(t.x=ur(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",s=mt(i.titleFont),o=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<a;++l)n.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,n,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=mt(a.bodyFont),d=ur(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+f;if(a.usePointStyle){const v={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},p=r.leftForLtr(h,c)+c/2,m=g+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,aa(t,v,p,m),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,aa(t,v,p,m)}else{t.lineWidth=j(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const v=r.leftForLtr(h,c),p=r.leftForLtr(r.xPlus(h,1),c-2),m=He(s.borderRadius);Object.values(m).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,xn(t,{x:v,y:g,w:c,h:l,radius:m}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),xn(t,{x:p,y:g+1,w:c-2,h:l-2,radius:m}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(v,g,c,l),t.strokeRect(v,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(p,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=mt(i.bodyFont);let h=d.lineHeight,f=0;const g=Tn(i.rtl,this.x,this.width),v=function(S){n.fillText(S,g.x(t.x+f),t.y+h/2),t.y+=h+a},p=g.textAlign(s);let m,y,_,x,w,T,M;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=ur(this,p,i),n.fillStyle=i.bodyColor,ot(this.beforeBody,v),f=o&&p!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,T=r.length;x<T;++x){for(m=r[x],y=this.labelTextColors[x],n.fillStyle=y,ot(m.before,v),_=m.lines,o&&_.length&&(this._drawColorBox(n,t,x,g,i),h=Math.max(d.lineHeight,l)),w=0,M=_.length;w<M;++w)v(_[w]),h=d.lineHeight;ot(m.after,v)}f=0,h=d.lineHeight,ot(this.afterBody,v),t.y-=a}drawFooter(t,n,i){const r=this.footer,a=r.length;let s,o;if(a){const l=Tn(i.rtl,this.x,this.width);for(t.x=ur(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=mt(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=He(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,i,r),n.lineTo(o+c-h,l),n.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,n,i,r),n.lineTo(o+c,l+u-g),n.quadraticCurveTo(o+c,l+u,o+c-g,l+u),s==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(o+f,l+u),n.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,n,i,r),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=ci[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Qc(this,t),l=Object.assign({},s,this._size),c=Jc(n,t,l),u=tu(t,l,c,n);(r._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=Ot(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,n),Bl(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Hl(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,r=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!Hi(i,r),s=this._positionChanged(r,n);(a||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,i),o=this._positionChanged(s,t),l=n||!Hi(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return n;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:i,caretY:r,options:a}=this,s=ci[a.position].call(this,t,n);return s!==!1&&(i!==s.x||r!==s.y)}}E(ka,"positioners",ci);var dr={id:"tooltip",_element:ka,positioners:ci,afterInit(e,t,n){n&&(e.tooltip=new ka({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:iu},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},mb=Object.freeze({__proto__:null,Colors:E0,Decimation:A0,Filler:Q0,Legend:rb,SubTitle:ob,Title:sb,Tooltip:dr});const pb=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function bb(e,t,n,i){const r=e.indexOf(t);if(r===-1)return pb(e,t,n,i);const a=e.lastIndexOf(t);return r!==a?n:r}const vb=(e,t)=>e===null?null:Nt(Math.round(e),0,t);function ru(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oa extends on{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(U(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:bb(i,t,F(n,t),this._addedLabels),vb(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=n;s++)r.push({value:s});return r}getLabelForValue(t){return ru.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}E(Oa,"id","category"),E(Oa,"defaults",{ticks:{callback:ru}});function yb(e,t){const n=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=a||1,g=u-1,{min:v,max:p}=t,m=!U(s),y=!U(o),_=!U(c),x=(p-v)/(d+1);let w=ol((p-v)/g/f)*f,T,M,S,P;if(w<1e-14&&!m&&!y)return[{value:v},{value:p}];P=Math.ceil(p/w)-Math.floor(v/w),P>g&&(w=ol(P*w/g/f)*f),U(l)||(T=Math.pow(10,l),w=Math.ceil(w*T)/T),r==="ticks"?(M=Math.floor(v/w)*w,S=Math.ceil(p/w)*w):(M=v,S=p),m&&y&&a&&mg((o-s)/a,w/1e3)?(P=Math.round(Math.min((o-s)/w,u)),w=(o-s)/P,M=s,S=o):_?(M=m?s:M,S=y?o:S,P=c-1,w=(S-M)/P):(P=(S-M)/w,zn(P,Math.round(P),w/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(cl(w),cl(M));T=Math.pow(10,U(l)?D:l),M=Math.round(M*T)/T,S=Math.round(S*T)/T;let C=0;for(m&&(h&&M!==s?(n.push({value:s}),M<s&&C++,zn(Math.round((M+C*w)*T)/T,s,au(s,x,e))&&C++):M<s&&C++);C<P;++C){const L=Math.round((M+C*w)*T)/T;if(y&&L>o)break;n.push({value:L})}return y&&h&&S!==o?n.length&&zn(n[n.length-1].value,o,au(o,x,e))?n[n.length-1].value=o:n.push({value:o}):(!y||S===o)&&n.push({value:S}),n}function au(e,t,{horizontal:n,minRotation:i}){const r=kt(i),a=(n?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class hr extends on{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,n){return U(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=n?r:l,o=l=>a=i?a:l;if(t){const l=fe(r),c=fe(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(r-l)}this.min=r,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=yb(r,a);return t.bounds==="ticks"&&ll(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return $n(t,this.chart.options.locale,this.options.ticks.format)}}class Aa extends hr{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xt(t)?t:0,this.max=xt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=kt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}E(Aa,"id","linear"),E(Aa,"defaults",{ticks:{callback:ji.formatters.numeric}});const ui=e=>Math.floor(Ne(e)),ln=(e,t)=>Math.pow(10,ui(e)+t);function su(e){return e/Math.pow(10,ui(e))===1}function ou(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function xb(e,t){const n=t-e;let i=ui(n);for(;ou(e,t,i)>10;)i++;for(;ou(e,t,i)<10;)i--;return Math.min(i,ui(e))}function _b(e,{min:t,max:n}){t=ee(e.min,t);const i=[],r=ui(t);let a=xb(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),h=ee(e.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<n;)i.push({value:h,major:su(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=ee(e.max,h);return i.push({value:f,major:su(f),significand:d}),i}class Ra extends on{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=hr.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return xt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=xt(t)?Math.max(0,t):null,this.max=xt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!xt(this._userMin)&&(this.min=t===ln(this.min,0)?ln(this.min,-1):ln(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=n?r:o;i===r&&(i<=0?(a(1),s(10)):(a(ln(i,-1)),s(ln(r,1)))),i<=0&&a(ln(r,-1)),r<=0&&s(ln(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=_b(n,this);return t.bounds==="ticks"&&ll(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":$n(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ne(t),this._valueRange=Ne(this.max)-Ne(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ne(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}E(Ra,"id","logarithmic"),E(Ra,"defaults",{ticks:{callback:ji.formatters.logarithmic,major:{enabled:!0}}});function La(e){const t=e.ticks;if(t.display&&e.display){const n=Ot(t.backdropPadding);return F(t.font&&t.font.size,wt.font.size)+n.height}return 0}function wb(e,t,n){return n=tt(n)?n:[n],{w:Ag(e,t.string,n),h:n.length*t.lineHeight}}function lu(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Tb(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?q/a:0;for(let l=0;l<a;l++){const c=s.setContext(e.getPointLabelContext(l));r[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],o),d=mt(c.font),h=wb(e.ctx,d,e._pointLabels[l]);i[l]=h;const f=ne(e.getIndexAngle(l)+o),g=Math.round(Yi(f)),v=lu(g,u.x,h.w,0,180),p=lu(g,u.y,h.h,90,270);Mb(n,t,f,v,p)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Pb(e,i,r)}function Mb(e,t,n,i,r){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function Sb(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,i+r+s,a),c=Math.round(Yi(ne(l.angle+ht))),u=kb(l.y,o.h,c),d=Eb(c),h=Cb(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function Db(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:a}=e;return!(Pe({x:n,y:i},t)||Pe({x:n,y:a},t)||Pe({x:r,y:i},t)||Pe({x:r,y:a},t))}function Pb(e,t,n){const i=[],r=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:La(a)/2,additionalAngle:s?q/r:0};let c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];const d=Sb(e,u,l);i.push(d),o==="auto"&&(d.visible=Db(d,c),d.visible&&(c=d))}return i}function Eb(e){return e===0||e===180?"center":e<180?"left":"right"}function Cb(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function kb(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Ob(e,t,n){const{left:i,top:r,right:a,bottom:s}=n,{backdropColor:o}=t;if(!U(o)){const l=He(t.borderRadius),c=Ot(t.backdropPadding);e.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),xn(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function Ab(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const a=e._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(e.getPointLabelContext(r));Ob(n,s,a);const o=mt(s.font),{x:l,y:c,textAlign:u}=a;en(n,e._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function cu(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,dt);else{let a=e.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=e.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function Rb(e,t,n,i,r){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),cu(e,n,s,i),a.closePath(),a.stroke(),a.restore())}function Lb(e,t,n){return Fe(e,{label:n,index:t,type:"pointLabel"})}class di extends hr{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=Ot(La(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=xt(t)&&!isNaN(t)?t:0,this.max=xt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/La(this.options))}generateTickLabels(t){hr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=st(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Tb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=dt/(this._pointLabels.length||1),i=this.options.startAngle||0;return ne(t*n+kt(i))}getDistanceFromCenterForValue(t){if(U(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(U(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return Lb(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-ht+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),cu(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:a}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&Ab(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),g=a.setContext(h);Rb(this,f,l,s,g)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=mt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=Ot(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}en(t,o.label,0,-a,u,{color:c.color})}),t.restore()}drawTitle(){}}E(di,"id","radialLinear"),E(di,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ji.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),E(di,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),E(di,"descriptors",{angleLines:{_fallback:"grid"}});const fr={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}},Zt=Object.keys(fr);function Ib(e,t){return e-t}function uu(e,t){if(U(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:a}=e._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),xt(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(Be(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,r)),+s)}function du(e,t,n,i){const r=Zt.length;for(let a=Zt.indexOf(e);a<r-1;++a){const s=fr[Zt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=i)return Zt[a]}return Zt[r-1]}function Nb(e,t,n,i,r){for(let a=Zt.length-1;a>=Zt.indexOf(n);a--){const s=Zt[a];if(fr[s].common&&e._adapter.diff(r,i,s)>=t-1)return s}return Zt[n?Zt.indexOf(n):0]}function Bb(e){for(let t=Zt.indexOf(e)+1,n=Zt.length;t<n;++t)if(fr[Zt[t]].common)return Zt[t]}function hu(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=Jr(n,t),a=n[i]>=t?n[i]:n[r];e[a]=!0}}function Hb(e,t,n,i){const r=e._adapter,a=+r.startOf(t[0].value,i),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,i))l=n[o],l>=0&&(t[l].major=!0);return t}function fu(e,t,n){const i=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,i.push({value:o,major:!1});return a===0||!n?i:Hb(e,i,r,n)}class hi extends on{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,n={}){const i=t.time||(t.time={}),r=this._adapter=new ic._date(t.adapters.date);r.init(n),Yn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:uu(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:r,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=xt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=xt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const a=this.min,s=this.max,o=yg(r,a,s);return this._unit=n.unit||(i.autoSkip?du(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Nb(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Bb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),fu(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Nt(n,0,s),i=Nt(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||du(a.minUnit,n,i,this._getLabelCapacity(n)),o=F(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=Be(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,n,s)>1e5*o)throw new Error(n+" and "+i+" are too far apart with stepSize of "+o+" "+s);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)hu(u,h,g);return(h===i||r.bounds==="ticks"||f===1)&&hu(u,h,g),Object.keys(u).sort((v,p)=>v-p).map(v=>+v)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,a=this._unit,s=n||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,i,r){const a=this.options,s=a.ticks.callback;if(s)return st(s,[t,n,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=kt(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:i*a+o*s,h:i*s+o*a}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,fu(this,[t],this._majorUnit),r),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(uu(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return fl(t.sort(Ib))}}E(hi,"id","time"),E(hi,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function gr(e,t,n){let i=0,r=e.length-1,a,s,o,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=De(e,"pos",t)),{pos:a,time:o}=e[i],{pos:s,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=De(e,"time",t)),{time:a,pos:o}=e[i],{time:s,pos:l}=e[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ia extends hi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=gr(n,this.min),this._tableRange=gr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(s=0,o=r.length;s<o;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(gr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return gr(this._table,i*this._tableRange+this._minPos,!0)}}E(Ia,"id","timeseries"),E(Ia,"defaults",hi.defaults);var Fb=Object.freeze({__proto__:null,CategoryScale:Oa,LinearScale:Aa,LogarithmicScale:Ra,RadialLinearScale:di,TimeScale:hi,TimeSeriesScale:Ia});const Ub=[qm,w0,mb,Fb],Wb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Yb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],zb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],jb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],gu=(e,t,n)=>{let i=e;return typeof t=="string"||Array.isArray(t)?i=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(i=e.toLocaleString(void 0,n)),i};function Na(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?jb:zb:t.binary?Yb:Wb,i=t.space?" ":"";if(t.signed&&e===0)return` 0${i}${n[0]}`;const r=e<0,a=r?"-":t.signed?"+":"";r&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=gu(e,t.locale,s);return a+u+i+n[0]}const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**o,s||(e=e.toPrecision(3));const l=gu(Number(e),t.locale,s),c=n[o];return a+l+i+c}function ke(e){"@babel/helpers - typeof";return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ke(e)}function pt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function H(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||ke(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function mu(e,t){R(2,arguments);var n=H(e),i=pt(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Ba(e,t){R(2,arguments);var n=H(e),i=pt(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function fi(e,t){R(2,arguments);var n=H(e).getTime(),i=pt(t);return new Date(n+i)}var Vb=36e5;function $b(e,t){R(2,arguments);var n=pt(t);return fi(e,n*Vb)}var qb={};function ze(){return qb}function pu(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=ze(),d=pt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=H(e),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function mr(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ha(e){R(1,arguments);var t=H(e);return t.setHours(0,0,0,0),t}var Gb=864e5;function Xb(e,t){R(2,arguments);var n=Ha(e),i=Ha(t),r=n.getTime()-mr(n),a=i.getTime()-mr(i);return Math.round((r-a)/Gb)}var Kb=6e4;function Zb(e,t){R(2,arguments);var n=pt(t);return fi(e,n*Kb)}function Qb(e,t){R(2,arguments);var n=pt(t),i=n*3;return Ba(e,i)}function Jb(e,t){R(2,arguments);var n=pt(t);return fi(e,n*1e3)}function tv(e,t){R(2,arguments);var n=pt(t),i=n*7;return mu(e,i)}function ev(e,t){R(2,arguments);var n=pt(t);return Ba(e,n*12)}function gi(e,t){R(2,arguments);var n=H(e),i=H(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var pr=6e4,mi=36e5,nv=1e3,iv=3600;function rv(e){return R(1,arguments),e instanceof Date||ke(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Fa(e){if(R(1,arguments),!rv(e)&&typeof e!="number")return!1;var t=H(e);return!isNaN(Number(t))}function av(e,t){R(2,arguments);var n=H(e),i=H(t),r=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return r*12+a}function sv(e,t){R(2,arguments);var n=H(e),i=H(t);return n.getFullYear()-i.getFullYear()}function bu(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function vu(e,t){R(2,arguments);var n=H(e),i=H(t),r=bu(n,i),a=Math.abs(Xb(n,i));n.setDate(n.getDate()-r*a);var s=+(bu(n,i)===-r),o=r*(a-s);return o===0?0:o}function br(e,t){return R(2,arguments),H(e).getTime()-H(t).getTime()}var yu={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},ov="trunc";function pi(e){return e?yu[e]:yu[ov]}function lv(e,t,n){R(2,arguments);var i=br(e,t)/mi;return pi(n==null?void 0:n.roundingMethod)(i)}function cv(e,t,n){R(2,arguments);var i=br(e,t)/pr;return pi(n==null?void 0:n.roundingMethod)(i)}function xu(e){R(1,arguments);var t=H(e);return t.setHours(23,59,59,999),t}function _u(e){R(1,arguments);var t=H(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function uv(e){R(1,arguments);var t=H(e);return xu(t).getTime()===_u(t).getTime()}function wu(e,t){R(2,arguments);var n=H(e),i=H(t),r=gi(n,i),a=Math.abs(av(n,i)),s;if(a<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*a);var o=gi(n,i)===-r;uv(H(e))&&a===1&&gi(e,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function dv(e,t,n){R(2,arguments);var i=wu(e,t)/3;return pi(n==null?void 0:n.roundingMethod)(i)}function hv(e,t,n){R(2,arguments);var i=br(e,t)/1e3;return pi(n==null?void 0:n.roundingMethod)(i)}function fv(e,t,n){R(2,arguments);var i=vu(e,t)/7;return pi(n==null?void 0:n.roundingMethod)(i)}function gv(e,t){R(2,arguments);var n=H(e),i=H(t),r=gi(n,i),a=Math.abs(sv(n,i));n.setFullYear(1584),i.setFullYear(1584);var s=gi(n,i)===-r,o=r*(a-Number(s));return o===0?0:o}function mv(e){R(1,arguments);var t=H(e);return t.setSeconds(0,0),t}function pv(e){R(1,arguments);var t=H(e),n=t.getMonth(),i=n-n%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function bv(e){R(1,arguments);var t=H(e);return t.setDate(1),t.setHours(0,0,0,0),t}function vv(e){R(1,arguments);var t=H(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function yv(e){R(1,arguments);var t=H(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function xv(e){R(1,arguments);var t=H(e);return t.setMinutes(59,59,999),t}function _v(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=ze(),d=pt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=H(e),f=h.getDay(),g=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+g),h.setHours(23,59,59,999),h}function wv(e){R(1,arguments);var t=H(e);return t.setSeconds(59,999),t}function Tv(e){R(1,arguments);var t=H(e),n=t.getMonth(),i=n-n%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function Mv(e){R(1,arguments);var t=H(e);return t.setMilliseconds(999),t}function Tu(e,t){R(2,arguments);var n=pt(t);return fi(e,-n)}var Sv=864e5;function Dv(e){R(1,arguments);var t=H(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/Sv)+1}function Sn(e){R(1,arguments);var t=1,n=H(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Mu(e){R(1,arguments);var t=H(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=Sn(i),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var s=Sn(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Pv(e){R(1,arguments);var t=Mu(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Sn(n);return i}var Ev=6048e5;function Su(e){R(1,arguments);var t=H(e),n=Sn(t).getTime()-Pv(t).getTime();return Math.round(n/Ev)+1}function cn(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=ze(),d=pt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=H(e),f=h.getUTCDay(),g=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function Ua(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=H(e),d=u.getUTCFullYear(),h=ze(),f=pt((n=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(d+1,0,f),g.setUTCHours(0,0,0,0);var v=cn(g,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var m=cn(p,t);return u.getTime()>=v.getTime()?d+1:u.getTime()>=m.getTime()?d:d-1}function Cv(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=ze(),d=pt((n=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=Ua(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var g=cn(f,t);return g}var kv=6048e5;function Du(e,t){R(1,arguments);var n=H(e),i=cn(n,t).getTime()-Cv(n,t).getTime();return Math.round(i/kv)+1}function lt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Ov={y:function(t,n){var i=t.getUTCFullYear(),r=i>0?i:1-i;return lt(n==="yy"?r%100:r,n.length)},M:function(t,n){var i=t.getUTCMonth();return n==="M"?String(i+1):lt(i+1,2)},d:function(t,n){return lt(t.getUTCDate(),n.length)},a:function(t,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(t,n){return lt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return lt(t.getUTCHours(),n.length)},m:function(t,n){return lt(t.getUTCMinutes(),n.length)},s:function(t,n){return lt(t.getUTCSeconds(),n.length)},S:function(t,n){var i=n.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return lt(a,n.length)}};const je=Ov;var Dn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Av={G:function(t,n,i){var r=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,n,i){if(n==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return je.y(t,n)},Y:function(t,n,i,r){var a=Ua(t,r),s=a>0?a:1-a;if(n==="YY"){var o=s%100;return lt(o,2)}return n==="Yo"?i.ordinalNumber(s,{unit:"year"}):lt(s,n.length)},R:function(t,n){var i=Mu(t);return lt(i,n.length)},u:function(t,n){var i=t.getUTCFullYear();return lt(i,n.length)},Q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return lt(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return lt(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,i){var r=t.getUTCMonth();switch(n){case"M":case"MM":return je.M(t,n);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,i){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return lt(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,i,r){var a=Du(t,r);return n==="wo"?i.ordinalNumber(a,{unit:"week"}):lt(a,n.length)},I:function(t,n,i){var r=Su(t);return n==="Io"?i.ordinalNumber(r,{unit:"week"}):lt(r,n.length)},d:function(t,n,i){return n==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):je.d(t,n)},D:function(t,n,i){var r=Dv(t);return n==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):lt(r,n.length)},E:function(t,n,i){var r=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return lt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return lt(s,n.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,n,i){var r=t.getUTCDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return lt(a,n.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,n,i){var r=t.getUTCHours(),a;switch(r===12?a=Dn.noon:r===0?a=Dn.midnight:a=r/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,n,i){var r=t.getUTCHours(),a;switch(r>=17?a=Dn.evening:r>=12?a=Dn.afternoon:r>=4?a=Dn.morning:a=Dn.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,n,i){if(n==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return je.h(t,n)},H:function(t,n,i){return n==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):je.H(t,n)},K:function(t,n,i){var r=t.getUTCHours()%12;return n==="Ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},k:function(t,n,i){var r=t.getUTCHours();return r===0&&(r=24),n==="ko"?i.ordinalNumber(r,{unit:"hour"}):lt(r,n.length)},m:function(t,n,i){return n==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):je.m(t,n)},s:function(t,n,i){return n==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):je.s(t,n)},S:function(t,n){return je.S(t,n)},X:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return Eu(s);case"XXXX":case"XX":return un(s);case"XXXXX":case"XXX":default:return un(s,":")}},x:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"x":return Eu(s);case"xxxx":case"xx":return un(s);case"xxxxx":case"xxx":default:return un(s,":")}},O:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Pu(s,":");case"OOOO":default:return"GMT"+un(s,":")}},z:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Pu(s,":");case"zzzz":default:return"GMT"+un(s,":")}},t:function(t,n,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return lt(s,n.length)},T:function(t,n,i,r){var a=r._originalDate||t,s=a.getTime();return lt(s,n.length)}};function Pu(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+lt(a,2)}function Eu(e,t){if(e%60===0){var n=e>0?"-":"+";return n+lt(Math.abs(e)/60,2)}return un(e,t)}function un(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=lt(Math.floor(r/60),2),s=lt(r%60,2);return i+a+n+s}const Rv=Av;var Cu=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},ku=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Lv=function(t,n){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Cu(t,n);var s;switch(r){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Cu(r,n)).replace("{{time}}",ku(a,n))},Iv={p:ku,P:Lv};const Wa=Iv;var Nv=["D","DD"],Bv=["YY","YYYY"];function Ou(e){return Nv.indexOf(e)!==-1}function Au(e){return Bv.indexOf(e)!==-1}function vr(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Hv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fv=function(t,n,i){var r,a=Hv[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const Uv=Fv;function Ya(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var Wv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zv={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jv={date:Ya({formats:Wv,defaultWidth:"full"}),time:Ya({formats:Yv,defaultWidth:"full"}),dateTime:Ya({formats:zv,defaultWidth:"full"})};const Vv=jv;var $v={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qv=function(t,n,i,r){return $v[t]};const Gv=qv;function bi(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return r[c]}}var Xv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Zv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qv={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Jv={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ty={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ey=function(t,n){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},ny={ordinalNumber:ey,era:bi({values:Xv,defaultWidth:"wide"}),quarter:bi({values:Kv,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:bi({values:Zv,defaultWidth:"wide"}),day:bi({values:Qv,defaultWidth:"wide"}),dayPeriod:bi({values:Jv,defaultWidth:"wide",formattingValues:ty,defaultFormattingWidth:"wide"})};const iy=ny;function vi(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?ay(o,function(d){return d.test(s)}):ry(o,function(d){return d.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function ry(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function ay(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function sy(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var oy=/^(\d+)(th|st|nd|rd)?/i,ly=/\d+/i,cy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},uy={any:[/^b/i,/^(a|c)/i]},dy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hy={any:[/1/i,/2/i,/3/i,/4/i]},fy={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},gy={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},my={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},py={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},by={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yy={ordinalNumber:sy({matchPattern:oy,parsePattern:ly,valueCallback:function(t){return parseInt(t,10)}}),era:vi({matchPatterns:cy,defaultMatchWidth:"wide",parsePatterns:uy,defaultParseWidth:"any"}),quarter:vi({matchPatterns:dy,defaultMatchWidth:"wide",parsePatterns:hy,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:vi({matchPatterns:fy,defaultMatchWidth:"wide",parsePatterns:gy,defaultParseWidth:"any"}),day:vi({matchPatterns:my,defaultMatchWidth:"wide",parsePatterns:py,defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:by,defaultMatchWidth:"any",parsePatterns:vy,defaultParseWidth:"any"})},xy={code:"en-US",formatDistance:Uv,formatLong:Vv,formatRelative:Gv,localize:iy,match:yy,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ru=xy;var _y=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ty=/^'([^]*?)'?$/,My=/''/g,Sy=/[a-zA-Z]/;function Dy(e,t,n){var i,r,a,s,o,l,c,u,d,h,f,g,v,p,m,y,_,x;R(2,arguments);var w=String(t),T=ze(),M=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:Ru,S=pt((a=(s=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&s!==void 0?s:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=pt((f=(g=(v=(p=n==null?void 0:n.weekStartsOn)!==null&&p!==void 0?p:n==null||(m=n.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&v!==void 0?v:T.weekStartsOn)!==null&&g!==void 0?g:(_=T.locale)===null||_===void 0||(x=_.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var D=H(e);if(!Fa(D))throw new RangeError("Invalid time value");var C=mr(D),L=Tu(D,C),W={firstWeekContainsDate:S,weekStartsOn:P,locale:M,_originalDate:D},at=w.match(wy).map(function(N){var Y=N[0];if(Y==="p"||Y==="P"){var Z=Wa[Y];return Z(N,M.formatLong)}return N}).join("").match(_y).map(function(N){if(N==="''")return"'";var Y=N[0];if(Y==="'")return Py(N);var Z=Rv[Y];if(Z)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Au(N)&&vr(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ou(N)&&vr(N,t,String(e)),Z(L,N,M.localize,W);if(Y.match(Sy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return N}).join("");return at}function Py(e){var t=e.match(Ty);return t?t[1].replace(My,"'"):e}function Ey(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Lu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Cy(e,t){if(e){if(typeof e=="string")return Lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lu(e,t)}}function Iu(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cy(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
40
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw o}}}}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function za(e,t){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},za(e,t)}function Q(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&za(e,t)}function yr(e){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yr(e)}function ky(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Oy(e,t){if(t&&(ke(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function J(e){var t=ky();return function(){var i=yr(e),r;if(t){var a=yr(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Oy(this,r)}}function G(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ay(e,t){if(ke(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(ke(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nu(e){var t=Ay(e,"string");return ke(t)==="symbol"?t:String(t)}function Bu(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Nu(i.key),i)}}function X(e,t,n){return t&&Bu(e.prototype,t),n&&Bu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t,n){return t=Nu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ry=10,Hu=function(){function e(){G(this,e),k(this,"priority",void 0),k(this,"subPriority",0)}return X(e,[{key:"validate",value:function(n,i){return!0}}]),e}(),Ly=function(e){Q(n,e);var t=J(n);function n(i,r,a,s,o){var l;return G(this,n),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return X(n,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,s){return this.setValue(r,a,this.value,s)}}]),n}(Hu),Iy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",Ry),k(A(i),"subPriority",-1),i}return X(n,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}}]),n}(Hu),it=function(){function e(){G(this,e),k(this,"incompatibleTokens",void 0),k(this,"priority",void 0),k(this,"subPriority",void 0)}return X(e,[{key:"run",value:function(n,i,r,a){var s=this.parse(n,i,r,a);return s?{setter:new Ly(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,i,r){return!0}}]),e}(),Ny=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",140),k(A(i),"incompatibleTokens",["R","u","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,s){return a.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),Et={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},pe={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Ct(e,t){return e&&{value:t(e.value),rest:e.rest}}function Tt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function be(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var i=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*mi+a*pr+s*nv),rest:t.slice(n[0].length)}}function Fu(e){return Tt(Et.anyDigitsSigned,e)}function Pt(e,t){switch(e){case 1:return Tt(Et.singleDigit,t);case 2:return Tt(Et.twoDigits,t);case 3:return Tt(Et.threeDigits,t);case 4:return Tt(Et.fourDigits,t);default:return Tt(new RegExp("^\\d{1,"+e+"}"),t)}}function xr(e,t){switch(e){case 1:return Tt(Et.singleDigitSigned,t);case 2:return Tt(Et.twoDigitsSigned,t);case 3:return Tt(Et.threeDigitsSigned,t);case 4:return Tt(Et.fourDigitsSigned,t);default:return Tt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function ja(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Uu(e,t){var n=t>0,i=n?t:1-t,r;if(i<=50)r=e||100;else{var a=i+50,s=Math.floor(a/100)*100,o=e>=a%100;r=e+s-(o?100:0)}return n?r:1-r}function Wu(e){return e%400===0||e%4===0&&e%100!==0}var By=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",130),k(A(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Ct(Pt(4,r),o);case"yo":return Ct(s.ordinalNumber(r,{unit:"year"}),o);default:return Ct(Pt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s){var o=r.getUTCFullYear();if(s.isTwoDigitYear){var l=Uu(s.year,o);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),Hy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",130),k(A(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Ct(Pt(4,r),o);case"Yo":return Ct(s.ordinalNumber(r,{unit:"year"}),o);default:return Ct(Pt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s,o){var l=Ua(r,o);if(s.isTwoDigitYear){var c=Uu(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),cn(r,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),cn(r,o)}}]),n}(it),Fy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",130),k(A(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a){return xr(a==="R"?4:a.length,r)}},{key:"set",value:function(r,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),Sn(o)}}]),n}(it),Uy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",130),k(A(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a){return xr(a==="u"?4:a.length,r)}},{key:"set",value:function(r,a,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),Wy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",120),k(A(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Pt(a.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),Yy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",120),k(A(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Pt(a.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),zy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),k(A(i),"priority",110),i}return X(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Ct(Tt(Et.month,r),o);case"MM":return Ct(Pt(2,r),o);case"Mo":return Ct(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),n}(it),jy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",110),k(A(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Ct(Tt(Et.month,r),o);case"LL":return Ct(Pt(2,r),o);case"Lo":return Ct(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),n}(it);function Vy(e,t,n){R(2,arguments);var i=H(e),r=pt(t),a=Du(i,n)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var $y=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",100),k(A(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"w":return Tt(Et.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return cn(Vy(r,s,o),o)}}]),n}(it);function qy(e,t){R(2,arguments);var n=H(e),i=pt(t),r=Su(n)-i;return n.setUTCDate(n.getUTCDate()-r*7),n}var Gy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",100),k(A(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"I":return Tt(Et.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return Sn(qy(r,s))}}]),n}(it),Xy=[31,28,31,30,31,30,31,31,30,31,30,31],Ky=[31,29,31,30,31,30,31,31,30,31,30,31],Zy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"subPriority",1),k(A(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"d":return Tt(Et.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Wu(s),l=r.getUTCMonth();return o?a>=1&&a<=Ky[l]:a>=1&&a<=Xy[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),n}(it),Qy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"subpriority",1),k(A(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return Tt(Et.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=Wu(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),n}(it);function Va(e,t,n){var i,r,a,s,o,l,c,u;R(2,arguments);var d=ze(),h=pt((i=(r=(a=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(o=n.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=H(e),g=pt(t),v=f.getUTCDay(),p=g%7,m=(p+7)%7,y=(m<h?7:0)+g-v;return f.setUTCDate(f.getUTCDate()+y),f}var Jy=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Va(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),tx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return Ct(Pt(a.length,r),l);case"eo":return Ct(s.ordinalNumber(r,{unit:"day"}),l);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Va(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it),ex=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return Ct(Pt(a.length,r),l);case"co":return Ct(s.ordinalNumber(r,{unit:"day"}),l);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=Va(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(it);function nx(e,t){R(2,arguments);var n=pt(t);n%7===0&&(n=n-7);var i=1,r=H(e),a=r.getUTCDay(),s=n%7,o=(s+7)%7,l=(o<i?7:0)+n-a;return r.setUTCDate(r.getUTCDate()+l),r}var ix=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",90),k(A(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Pt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Ct(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Ct(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Ct(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Ct(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,s){return r=nx(r,s),r.setUTCHours(0,0,0,0),r}}]),n}(it),rx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",80),k(A(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(ja(s),0,0,0),r}}]),n}(it),ax=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",80),k(A(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(ja(s),0,0,0),r}}]),n}(it),sx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",80),k(A(i),"incompatibleTokens",["a","b","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(ja(s),0,0,0),r}}]),n}(it),ox=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",70),k(A(i),"incompatibleTokens",["H","K","k","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"h":return Tt(Et.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):!o&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),n}(it),lx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",70),k(A(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"H":return Tt(Et.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,s){return r.setUTCHours(s,0,0,0),r}}]),n}(it),cx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",70),k(A(i),"incompatibleTokens",["h","H","k","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"K":return Tt(Et.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),n}(it),ux=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",70),k(A(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"k":return Tt(Et.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,s){var o=s<=24?s%24:s;return r.setUTCHours(o,0,0,0),r}}]),n}(it),dx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",60),k(A(i),"incompatibleTokens",["t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"m":return Tt(Et.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCMinutes(s,0,0),r}}]),n}(it),hx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",50),k(A(i),"incompatibleTokens",["t","T"]),i}return X(n,[{key:"parse",value:function(r,a,s){switch(a){case"s":return Tt(Et.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Pt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCSeconds(s,0),r}}]),n}(it),fx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",30),k(A(i),"incompatibleTokens",["t","T"]),i}return X(n,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Ct(Pt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),n}(it),gx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",10),k(A(i),"incompatibleTokens",["t","T","x"]),i}return X(n,[{key:"parse",value:function(r,a){switch(a){case"X":return be(pe.basicOptionalMinutes,r);case"XX":return be(pe.basic,r);case"XXXX":return be(pe.basicOptionalSeconds,r);case"XXXXX":return be(pe.extendedOptionalSeconds,r);case"XXX":default:return be(pe.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),mx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",10),k(A(i),"incompatibleTokens",["t","T","X"]),i}return X(n,[{key:"parse",value:function(r,a){switch(a){case"x":return be(pe.basicOptionalMinutes,r);case"xx":return be(pe.basic,r);case"xxxx":return be(pe.basicOptionalSeconds,r);case"xxxxx":return be(pe.extendedOptionalSeconds,r);case"xxx":default:return be(pe.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(it),px=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",40),k(A(i),"incompatibleTokens","*"),i}return X(n,[{key:"parse",value:function(r){return Fu(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(it),bx=function(e){Q(n,e);var t=J(n);function n(){var i;G(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),k(A(i),"priority",20),k(A(i),"incompatibleTokens","*"),i}return X(n,[{key:"parse",value:function(r){return Fu(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(it),vx={G:new Ny,y:new By,Y:new Hy,R:new Fy,u:new Uy,Q:new Wy,q:new Yy,M:new zy,L:new jy,w:new $y,I:new Gy,d:new Zy,D:new Qy,E:new Jy,e:new tx,c:new ex,i:new ix,a:new rx,b:new ax,B:new sx,h:new ox,H:new lx,K:new cx,k:new ux,m:new dx,s:new hx,S:new fx,X:new gx,x:new mx,t:new px,T:new bx},yx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_x=/^'([^]*?)'?$/,wx=/''/g,Tx=/\S/,Mx=/[a-zA-Z]/;function Sx(e,t,n,i){var r,a,s,o,l,c,u,d,h,f,g,v,p,m,y,_,x,w;R(3,arguments);var T=String(e),M=String(t),S=ze(),P=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Ru;if(!P.match)throw new RangeError("locale must contain match property");var D=pt((s=(o=(l=(c=i==null?void 0:i.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(u=i.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=pt((g=(v=(p=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(y=i.locale)===null||y===void 0||(_=y.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:S.weekStartsOn)!==null&&v!==void 0?v:(x=S.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&g!==void 0?g:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(M==="")return T===""?H(n):new Date(NaN);var L={firstWeekContainsDate:D,weekStartsOn:C,locale:P},W=[new Iy],at=M.match(xx).map(function(ft){var et=ft[0];if(et in Wa){var O=Wa[et];return O(ft,P.formatLong)}return ft}).join("").match(yx),N=[],Y=Iu(at),Z;try{var Lt=function(){var et=Z.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Au(et)&&vr(et,M,e),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Ou(et)&&vr(et,M,e);var O=et[0],B=vx[O];if(B){var V=B.incompatibleTokens;if(Array.isArray(V)){var rt=N.find(function(ut){return V.includes(ut.token)||ut.token===O});if(rt)throw new RangeError("The format string mustn't contain `".concat(rt.fullToken,"` and `").concat(et,"` at the same time"))}else if(B.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(et,"` and any other token at the same time"));N.push({token:O,fullToken:et});var nt=B.run(T,et,P.match,L);if(!nt)return{v:new Date(NaN)};W.push(nt.setter),T=nt.rest}else{if(O.match(Mx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");if(et==="''"?et="'":O==="'"&&(et=Dx(et)),T.indexOf(et)===0)T=T.slice(et.length);else return{v:new Date(NaN)}}};for(Y.s();!(Z=Y.n()).done;){var bt=Lt();if(ke(bt)==="object")return bt.v}}catch(ft){Y.e(ft)}finally{Y.f()}if(T.length>0&&Tx.test(T))return new Date(NaN);var Qt=W.map(function(ft){return ft.priority}).sort(function(ft,et){return et-ft}).filter(function(ft,et,O){return O.indexOf(ft)===et}).map(function(ft){return W.filter(function(et){return et.priority===ft}).sort(function(et,O){return O.subPriority-et.subPriority})}).map(function(ft){return ft[0]}),$t=H(n);if(isNaN($t.getTime()))return new Date(NaN);var Bt=Tu($t,mr($t)),Jt={},ct=Iu(Qt),te;try{for(ct.s();!(te=ct.n()).done;){var se=te.value;if(!se.validate(Bt,L))return new Date(NaN);var It=se.set(Bt,Jt,L);Array.isArray(It)?(Bt=It[0],Ey(Jt,It[1])):Bt=It}}catch(ft){ct.e(ft)}finally{ct.f()}return Bt}function Dx(e){return e.match(_x)[1].replace(wx,"'")}function Px(e){R(1,arguments);var t=H(e);return t.setMinutes(0,0,0),t}function Ex(e){R(1,arguments);var t=H(e);return t.setMilliseconds(0),t}function Cx(e){R(1,arguments);var t=e/mi;return Math.floor(t)}function Yu(e,t){var n;R(1,arguments);var i=pt((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=Rx(e),a;if(r.date){var s=Lx(r.date,i);a=Ix(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=Nx(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Bx(r.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var _r={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},kx=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ox=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ax=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Rx(e){var t={},n=e.split(_r.dateTimeDelimiter),i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],_r.timeZoneDelimiter.test(t.date)&&(t.date=e.split(_r.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){var r=_r.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function Lx(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:a===null?r:a*100,restDateString:e.slice((i[1]||i[2]).length)}}function Ix(e,t){if(t===null)return new Date(NaN);var n=e.match(kx);if(!n)return new Date(NaN);var i=!!n[4],r=yi(n[1]),a=yi(n[2])-1,s=yi(n[3]),o=yi(n[4]),l=yi(n[5])-1;if(i)return Yx(t,o,l)?Hx(t,o,l):new Date(NaN);var c=new Date(0);return!Ux(t,a,s)||!Wx(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function yi(e){return e?parseInt(e):1}function Nx(e){var t=e.match(Ox);if(!t)return NaN;var n=$a(t[1]),i=$a(t[2]),r=$a(t[3]);return zx(n,i,r)?n*mi+i*pr+r*1e3:NaN}function $a(e){return e&&parseFloat(e.replace(",","."))||0}function Bx(e){if(e==="Z")return 0;var t=e.match(Ax);if(!t)return 0;var n=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return jx(i,r)?n*(i*mi+r*pr):NaN}function Hx(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var Fx=[31,null,31,30,31,30,31,31,30,31,30,31];function zu(e){return e%400===0||e%4===0&&e%100!==0}function Ux(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Fx[t]||(zu(e)?29:28))}function Wx(e,t){return t>=1&&t<=(zu(e)?366:365)}function Yx(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function zx(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function jx(e,t){return t>=0&&t<=59}function Vx(e){R(1,arguments);var t=e/iv;return Math.floor(t)}var $x=Object.defineProperty,qx=(e,t,n)=>t in e?$x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ve=(e,t,n)=>(qx(e,typeof t!="symbol"?t+"":t,n),n),z=(e=>(e.MINUTELY="Minutely",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e))(z||{}),Mt=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(Mt||{}),Rt=(e=>(e.DOUGHNUT="Doughnut",e.HORIZONTAL_BAR="HorizontalBar",e.VERTICAL_BAR="VerticalBar",e.TIMESERIES_LINE="Line",e.TIMESERIES_BAR="TimeSeriesBar",e))(Rt||{});const Gx={[z.MINUTELY]:60*1e3,[z.HOURLY]:60*60*1e3,[z.DAILY]:60*60*24*1e3,[z.WEEKLY]:60*60*24*7*1e3};function xi(e){return e&&Object.values(z).find(t=>e<=Gx[t])||null}function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function wr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function ye(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Pn(e){ye(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||qa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ju(e,t){ye(2,arguments);var n=Pn(e),i=wr(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Xx(e,t){ye(2,arguments);var n=Pn(e),i=wr(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}var Kx={};function Zx(){return Kx}function Tr(e,t){var n,i,r,a,s,o,l,c;ye(1,arguments);var u=Zx(),d=wr((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Pn(e),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Vu(e){ye(1,arguments);var t=Pn(e);return t.setHours(0,0,0,0),t}var Qx=60,Jx=3600;function En(e){ye(1,arguments);var t=Pn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function t_(e){ye(1,arguments);var t=Pn(e),n=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(n,i+1,0),r.setHours(0,0,0,0),r.getDate()}function e_(e){return ye(1,arguments),Math.floor(e*Jx)}function n_(e){ye(1,arguments);var t=e/Qx;return Math.floor(t)}function i_(e,t){ye(2,arguments);var n=wr(t);return Xx(e,-n)}class ce{constructor(t){ve(this,"timeframeText"),ve(this,"key"),ve(this,"display"),ve(this,"timeframeLength"),ve(this,"allowedTiers"),ve(this,"defaultResponseGranularity"),ve(this,"dataGranularity"),ve(this,"isRelative"),ve(this,"_startCustom"),ve(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&t.add(z.MINUTELY),n>=2&&n<=7*24&&t.add(z.HOURLY),n>=2*24&&t.add(z.DAILY),n>=2*24*14&&t.add(z.WEEKLY),t}}class r_ extends ce{rawStart(){return Tr(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class a_ extends ce{rawStart(){return En(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class s_ extends ce{rawEnd(){return Tr(new Date,{weekStartsOn:1})}rawStart(){return Tr(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class o_ extends ce{rawEnd(){return En(new Date)}rawStart(){return En(new Date().setMonth(new Date().getMonth()-1))}}Mt.FIFTEEN_MIN,new ce({key:Mt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Mt.ONE_HOUR,new ce({key:Mt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Mt.SIX_HOUR,new ce({key:Mt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Mt.TWELVE_HOUR,new ce({key:Mt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Mt.ONE_DAY,new ce({key:Mt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),Mt.SEVEN_DAY,new ce({key:Mt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Mt.THIRTY_DAY,new ce({key:Mt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),Mt.CURRENT_WEEK,new r_({key:Mt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Tr(new Date,{weekStartsOn:1});return(Vu(ju(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Mt.CURRENT_MONTH,new a_({key:Mt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=En(new Date);return(Vu(ju(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Mt.PREVIOUS_WEEK,new s_({key:Mt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),Mt.PREVIOUS_MONTH,new o_({key:Mt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=En(new Date),n=En(i_(new Date,1));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=l_(t,n)),60*60*24*t_(new Date().setMonth(new Date().getMonth()-1))+e_(e)},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function l_(e,t){return n_(e.getTimezoneOffset()-t.getTimezoneOffset())}var At=(e=>(e.Hidden="hidden",e.Right="right",e.Bottom="bottom",e))(At||{});const Ga=(e,t)=>{var i,r;const{tooltip:n}=t;if(n.opacity===0&&!e.locked){e.showTooltip=!1;return}if(n.body&&!e.locked){const a=n.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Rt.HORIZONTAL_BAR,Rt.VERTICAL_BAR].includes(e.chartType),l=e.chartType===Rt.DOUGHNUT;e.tooltipContext=n.dataPoints[0].parsed.x,e.tooltipSeries=n.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;e.units==="bytes"?h=isNaN(d)?d:Na(d):h=`${d%1===0?Us.format(d):Us.format(Number(d.toFixed(Dw)))} ${e.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),e.left=`${n.x}px`,e.top=`${n.y}px`,e.showTooltip=!0}},c_=e=>e&&e.datasets&&e.datasets.length,u_=e=>c_(e)&&e.datasets.some(t=>t.data.length),d_=e=>u_(e)&&e.datasets.some(t=>t.data.length>1),h_=e=>d_(e)&&e.datasets.some(t=>t.data[0]&&Fa(t.data[0].x)),f_=e=>h_(e)&&e.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Xa=(e,t,n)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return e.x<n?e.x+t*a*(1-r):e.x-t*s*(1-r)},g_=(e,t,n)=>e.y<n?e.y+t*.15:e.y-t*.5;function _i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ka={exports:{}},$u={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($u);var St=$u.exports,Za={exports:{}},Qa={exports:{}},qu={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(qu);var Gu=qu.exports,Ja={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}e.exports=t.default})(Ja,Ja.exports);var jt=Ja.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Gu),r=n(jt);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}e.exports=t.default})(Qa,Qa.exports);var m_=Qa.exports,ts={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Gu),r=n(jt);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}e.exports=t.default})(ts,ts.exports);var xe=ts.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(m_),r=n(xe),a=n(jt);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}e.exports=t.default})(Za,Za.exports);var p_=Za.exports,es={exports:{}},ns={exports:{}},is={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}e.exports=t.default})(is,is.exports);var dn=is.exports;const b_=_i(dn);(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(dn),r=n(xe),a=n(jt);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}e.exports=t.default})(ns,ns.exports);var v_=ns.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(v_),r=n(jt),a=n(dn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}e.exports=t.default})(es,es.exports);var y_=es.exports,rs={exports:{}},as={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(xe),r=n(jt),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}e.exports=t.default})(as,as.exports);var x_=as.exports,ss={exports:{}},os={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(xe),r=n(jt);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}e.exports=t.default})(os,os.exports);var ls=os.exports,cs={exports:{}},us={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(xe),r=n(jt),a=n(ls);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}e.exports=t.default})(us,us.exports);var Xu=us.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(Xu),r=n(ls),a=n(jt);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}e.exports=t.default})(cs,cs.exports);var __=cs.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(xe),r=n(ls),a=n(__),s=n(jt),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}e.exports=t.default})(ss,ss.exports);var w_=ss.exports,ds={exports:{}},hs={exports:{}},hn={};Object.defineProperty(hn,"__esModule",{value:!0}),hn.getDefaultOptions=T_,hn.setDefaultOptions=M_;var Ku={};function T_(){return Ku}function M_(e){Ku=e}(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(xe),r=n(jt),a=n(dn),s=hn;function o(l,c){var u,d,h,f,g,v,p,m;(0,r.default)(1,arguments);var y=(0,s.getDefaultOptions)(),_=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(g=c.locale)===null||g===void 0||(v=g.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:y.weekStartsOn)!==null&&d!==void 0?d:(p=y.locale)===null||p===void 0||(m=p.options)===null||m===void 0?void 0:m.weekStartsOn)!==null&&u!==void 0?u:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=(0,i.default)(l),w=x.getUTCDay(),T=(w<_?7:0)+w-_;return x.setUTCDate(x.getUTCDate()-T),x.setUTCHours(0,0,0,0),x}e.exports=t.default})(hs,hs.exports);var fs=hs.exports,gs={exports:{}},ms={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(xe),r=n(jt),a=n(fs),s=n(dn),o=hn;function l(c,u){var d,h,f,g,v,p,m,y;(0,r.default)(1,arguments);var _=(0,i.default)(c),x=_.getUTCFullYear(),w=(0,o.getDefaultOptions)(),T=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(p=v.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&f!==void 0?f:w.firstWeekContainsDate)!==null&&h!==void 0?h:(m=w.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=new Date(0);M.setUTCFullYear(x+1,0,T),M.setUTCHours(0,0,0,0);var S=(0,a.default)(M,u),P=new Date(0);P.setUTCFullYear(x,0,T),P.setUTCHours(0,0,0,0);var D=(0,a.default)(P,u);return _.getTime()>=S.getTime()?x+1:_.getTime()>=D.getTime()?x:x-1}e.exports=t.default})(ms,ms.exports);var Zu=ms.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(Zu),r=n(jt),a=n(fs),s=n(dn),o=hn;function l(c,u){var d,h,f,g,v,p,m,y;(0,r.default)(1,arguments);var _=(0,o.getDefaultOptions)(),x=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(p=v.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(m=_.locale)===null||m===void 0||(y=m.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1),w=(0,i.default)(c,u),T=new Date(0);T.setUTCFullYear(w,0,x),T.setUTCHours(0,0,0,0);var M=(0,a.default)(T,u);return M}e.exports=t.default})(gs,gs.exports);var S_=gs.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(xe),r=n(fs),a=n(S_),s=n(jt),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}e.exports=t.default})(ds,ds.exports);var D_=ds.exports,ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}e.exports=t.default})(ps,ps.exports);var Qu=ps.exports,bs={exports:{}};(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(Qu),r={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,i.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,i.default)(c+1,2)},d:function(o,l){return(0,i.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,i.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,i.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,i.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,i.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,i.default)(d,l.length)}},a=r;t.default=a,e.exports=t.default})(bs,bs.exports);var P_=bs.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(x_),r=n(w_),a=n(Xu),s=n(D_),o=n(Zu),l=n(Qu),c=n(P_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(m,y,_){var x=m.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return _.era(x,{width:"abbreviated"});case"GGGGG":return _.era(x,{width:"narrow"});case"GGGG":default:return _.era(x,{width:"wide"})}},y:function(m,y,_){if(y==="yo"){var x=m.getUTCFullYear(),w=x>0?x:1-x;return _.ordinalNumber(w,{unit:"year"})}return c.default.y(m,y)},Y:function(m,y,_,x){var w=(0,o.default)(m,x),T=w>0?w:1-w;if(y==="YY"){var M=T%100;return(0,l.default)(M,2)}return y==="Yo"?_.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,y.length)},R:function(m,y){var _=(0,a.default)(m);return(0,l.default)(_,y.length)},u:function(m,y){var _=m.getUTCFullYear();return(0,l.default)(_,y.length)},Q:function(m,y,_){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"Q":return String(x);case"QQ":return(0,l.default)(x,2);case"Qo":return _.ordinalNumber(x,{unit:"quarter"});case"QQQ":return _.quarter(x,{width:"abbreviated",context:"formatting"});case"QQQQQ":return _.quarter(x,{width:"narrow",context:"formatting"});case"QQQQ":default:return _.quarter(x,{width:"wide",context:"formatting"})}},q:function(m,y,_){var x=Math.ceil((m.getUTCMonth()+1)/3);switch(y){case"q":return String(x);case"qq":return(0,l.default)(x,2);case"qo":return _.ordinalNumber(x,{unit:"quarter"});case"qqq":return _.quarter(x,{width:"abbreviated",context:"standalone"});case"qqqqq":return _.quarter(x,{width:"narrow",context:"standalone"});case"qqqq":default:return _.quarter(x,{width:"wide",context:"standalone"})}},M:function(m,y,_){var x=m.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(m,y);case"Mo":return _.ordinalNumber(x+1,{unit:"month"});case"MMM":return _.month(x,{width:"abbreviated",context:"formatting"});case"MMMMM":return _.month(x,{width:"narrow",context:"formatting"});case"MMMM":default:return _.month(x,{width:"wide",context:"formatting"})}},L:function(m,y,_){var x=m.getUTCMonth();switch(y){case"L":return String(x+1);case"LL":return(0,l.default)(x+1,2);case"Lo":return _.ordinalNumber(x+1,{unit:"month"});case"LLL":return _.month(x,{width:"abbreviated",context:"standalone"});case"LLLLL":return _.month(x,{width:"narrow",context:"standalone"});case"LLLL":default:return _.month(x,{width:"wide",context:"standalone"})}},w:function(m,y,_,x){var w=(0,s.default)(m,x);return y==="wo"?_.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,y.length)},I:function(m,y,_){var x=(0,r.default)(m);return y==="Io"?_.ordinalNumber(x,{unit:"week"}):(0,l.default)(x,y.length)},d:function(m,y,_){return y==="do"?_.ordinalNumber(m.getUTCDate(),{unit:"date"}):c.default.d(m,y)},D:function(m,y,_){var x=(0,i.default)(m);return y==="Do"?_.ordinalNumber(x,{unit:"dayOfYear"}):(0,l.default)(x,y.length)},E:function(m,y,_){var x=m.getUTCDay();switch(y){case"E":case"EE":case"EEE":return _.day(x,{width:"abbreviated",context:"formatting"});case"EEEEE":return _.day(x,{width:"narrow",context:"formatting"});case"EEEEEE":return _.day(x,{width:"short",context:"formatting"});case"EEEE":default:return _.day(x,{width:"wide",context:"formatting"})}},e:function(m,y,_,x){var w=m.getUTCDay(),T=(w-x.weekStartsOn+8)%7||7;switch(y){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return _.ordinalNumber(T,{unit:"day"});case"eee":return _.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return _.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return _.day(w,{width:"short",context:"formatting"});case"eeee":default:return _.day(w,{width:"wide",context:"formatting"})}},c:function(m,y,_,x){var w=m.getUTCDay(),T=(w-x.weekStartsOn+8)%7||7;switch(y){case"c":return String(T);case"cc":return(0,l.default)(T,y.length);case"co":return _.ordinalNumber(T,{unit:"day"});case"ccc":return _.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return _.day(w,{width:"narrow",context:"standalone"});case"cccccc":return _.day(w,{width:"short",context:"standalone"});case"cccc":default:return _.day(w,{width:"wide",context:"standalone"})}},i:function(m,y,_){var x=m.getUTCDay(),w=x===0?7:x;switch(y){case"i":return String(w);case"ii":return(0,l.default)(w,y.length);case"io":return _.ordinalNumber(w,{unit:"day"});case"iii":return _.day(x,{width:"abbreviated",context:"formatting"});case"iiiii":return _.day(x,{width:"narrow",context:"formatting"});case"iiiiii":return _.day(x,{width:"short",context:"formatting"});case"iiii":default:return _.day(x,{width:"wide",context:"formatting"})}},a:function(m,y,_){var x=m.getUTCHours(),w=x/12>=1?"pm":"am";switch(y){case"a":case"aa":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(m,y,_){var x=m.getUTCHours(),w;switch(x===12?w=u.noon:x===0?w=u.midnight:w=x/12>=1?"pm":"am",y){case"b":case"bb":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(m,y,_){var x=m.getUTCHours(),w;switch(x>=17?w=u.evening:x>=12?w=u.afternoon:x>=4?w=u.morning:w=u.night,y){case"B":case"BB":case"BBB":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(m,y,_){if(y==="ho"){var x=m.getUTCHours()%12;return x===0&&(x=12),_.ordinalNumber(x,{unit:"hour"})}return c.default.h(m,y)},H:function(m,y,_){return y==="Ho"?_.ordinalNumber(m.getUTCHours(),{unit:"hour"}):c.default.H(m,y)},K:function(m,y,_){var x=m.getUTCHours()%12;return y==="Ko"?_.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},k:function(m,y,_){var x=m.getUTCHours();return x===0&&(x=24),y==="ko"?_.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},m:function(m,y,_){return y==="mo"?_.ordinalNumber(m.getUTCMinutes(),{unit:"minute"}):c.default.m(m,y)},s:function(m,y,_){return y==="so"?_.ordinalNumber(m.getUTCSeconds(),{unit:"second"}):c.default.s(m,y)},S:function(m,y){return c.default.S(m,y)},X:function(m,y,_,x){var w=x._originalDate||m,T=w.getTimezoneOffset();if(T===0)return"Z";switch(y){case"X":return f(T);case"XXXX":case"XX":return g(T);case"XXXXX":case"XXX":default:return g(T,":")}},x:function(m,y,_,x){var w=x._originalDate||m,T=w.getTimezoneOffset();switch(y){case"x":return f(T);case"xxxx":case"xx":return g(T);case"xxxxx":case"xxx":default:return g(T,":")}},O:function(m,y,_,x){var w=x._originalDate||m,T=w.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+h(T,":");case"OOOO":default:return"GMT"+g(T,":")}},z:function(m,y,_,x){var w=x._originalDate||m,T=w.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+h(T,":");case"zzzz":default:return"GMT"+g(T,":")}},t:function(m,y,_,x){var w=x._originalDate||m,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,y.length)},T:function(m,y,_,x){var w=x._originalDate||m,T=w.getTime();return(0,l.default)(T,y.length)}};function h(p,m){var y=p>0?"-":"+",_=Math.abs(p),x=Math.floor(_/60),w=_%60;if(w===0)return y+String(x);var T=m||"";return y+String(x)+T+(0,l.default)(w,2)}function f(p,m){if(p%60===0){var y=p>0?"-":"+";return y+(0,l.default)(Math.abs(p)/60,2)}return g(p,m)}function g(p,m){var y=m||"",_=p>0?"-":"+",x=Math.abs(p),w=(0,l.default)(Math.floor(x/60),2),T=(0,l.default)(x%60,2);return _+w+y+T}var v=d;t.default=v,e.exports=t.default})(rs,rs.exports);var E_=rs.exports,vs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},i=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},r=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],h=u[2];if(!h)return n(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",n(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,e.exports=t.default})(vs,vs.exports);var C_=vs.exports,ys={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}e.exports=t.default})(ys,ys.exports);var Ju=ys.exports;const td=_i(Ju);var wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.isProtectedDayOfYearToken=A_,wi.isProtectedWeekYearToken=R_,wi.throwProtectedError=L_;var k_=["D","DD"],O_=["YY","YYYY"];function A_(e){return k_.indexOf(e)!==-1}function R_(e){return O_.indexOf(e)!==-1}function L_(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var xs={exports:{}},_s={exports:{}},ws={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(s,o,l){var c,u=n[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},r=i;t.default=r,e.exports=t.default})(ws,ws.exports);var I_=ws.exports,Ts={exports:{}},Ms={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}e.exports=t.default})(Ms,Ms.exports);var N_=Ms.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(N_),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,e.exports=t.default})(Ts,Ts.exports);var B_=Ts.exports,Ss={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(s,o,l,c){return n[s]},r=i;t.default=r,e.exports=t.default})(Ss,Ss.exports);var H_=Ss.exports,Ds={exports:{}},Ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}e.exports=t.default})(Ps,Ps.exports);var F_=Ps.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(F_),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(g,v){var p=Number(g),m=p%100;if(m>20||m<10)switch(m%10){case 1:return p+"st";case 2:return p+"nd";case 3:return p+"rd"}return p+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(g){return g-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},h=d;t.default=h,e.exports=t.default})(Ds,Ds.exports);var U_=Ds.exports,Es={exports:{}},Cs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(p){return p.test(d)}):i(h,function(p){return p.test(d)}),g;g=a.valueCallback?a.valueCallback(f):f,g=o.valueCallback?o.valueCallback(g):g;var v=s.slice(d.length);return{value:g,rest:v}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}e.exports=t.default})(Cs,Cs.exports);var W_=Cs.exports,ks={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}e.exports=t.default})(ks,ks.exports);var Y_=ks.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(W_),r=n(Y_),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},h={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},g={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},p={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},m={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(x){return parseInt(x,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(x){return x+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:g,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:p,defaultParseWidth:"any"})},y=m;t.default=y,e.exports=t.default})(Es,Es.exports);var z_=Es.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(I_),r=n(B_),a=n(H_),s=n(U_),o=n(z_),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,e.exports=t.default})(_s,_s.exports);var j_=_s.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(j_),r=i.default;t.default=r,e.exports=t.default})(xs,xs.exports);var V_=xs.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var i=n(p_),r=n(y_),a=n(xe),s=n(E_),o=n(C_),l=n(Ju),c=wi,u=n(dn),d=n(jt),h=hn,f=n(V_),g=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,p=/^'([^]*?)'?$/,m=/''/g,y=/[a-zA-Z]/;function _(w,T,M){var S,P,D,C,L,W,at,N,Y,Z,Lt,bt,Qt,$t,Bt,Jt,ct,te;(0,d.default)(2,arguments);var se=String(T),It=(0,h.getDefaultOptions)(),ft=(S=(P=M==null?void 0:M.locale)!==null&&P!==void 0?P:It.locale)!==null&&S!==void 0?S:f.default,et=(0,u.default)((D=(C=(L=(W=M==null?void 0:M.firstWeekContainsDate)!==null&&W!==void 0?W:M==null||(at=M.locale)===null||at===void 0||(N=at.options)===null||N===void 0?void 0:N.firstWeekContainsDate)!==null&&L!==void 0?L:It.firstWeekContainsDate)!==null&&C!==void 0?C:(Y=It.locale)===null||Y===void 0||(Z=Y.options)===null||Z===void 0?void 0:Z.firstWeekContainsDate)!==null&&D!==void 0?D:1);if(!(et>=1&&et<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var O=(0,u.default)((Lt=(bt=(Qt=($t=M==null?void 0:M.weekStartsOn)!==null&&$t!==void 0?$t:M==null||(Bt=M.locale)===null||Bt===void 0||(Jt=Bt.options)===null||Jt===void 0?void 0:Jt.weekStartsOn)!==null&&Qt!==void 0?Qt:It.weekStartsOn)!==null&&bt!==void 0?bt:(ct=It.locale)===null||ct===void 0||(te=ct.options)===null||te===void 0?void 0:te.weekStartsOn)!==null&&Lt!==void 0?Lt:0);if(!(O>=0&&O<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ft.localize)throw new RangeError("locale must contain localize property");if(!ft.formatLong)throw new RangeError("locale must contain formatLong property");var B=(0,a.default)(w);if(!(0,i.default)(B))throw new RangeError("Invalid time value");var V=(0,l.default)(B),rt=(0,r.default)(B,V),nt={firstWeekContainsDate:et,weekStartsOn:O,locale:ft,_originalDate:B},ut=se.match(v).map(function(vt){var Dt=vt[0];if(Dt==="p"||Dt==="P"){var yt=o.default[Dt];return yt(vt,ft.formatLong)}return vt}).join("").match(g).map(function(vt){if(vt==="''")return"'";var Dt=vt[0];if(Dt==="'")return x(vt);var yt=s.default[Dt];if(yt)return!(M!=null&&M.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(vt)&&(0,c.throwProtectedError)(vt,T,String(w)),!(M!=null&&M.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(vt)&&(0,c.throwProtectedError)(vt,T,String(w)),yt(rt,vt,ft.localize,nt);if(Dt.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Dt+"`");return vt}).join("");return ut}function x(w){var T=w.match(p);return T?T[1].replace(m,"'"):w}e.exports=t.default})(Ka,Ka.exports);var $_=Ka.exports;const q_=_i($_);function ed(e,t,n){var i=K_(e,n.timeZone,n.locale);return i.formatToParts?G_(i,t):X_(i,t)}function G_(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function X_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function K_(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function Z_(e,t){var n=ew(t);return n.formatToParts?J_(n,e):tw(n,e)}var Q_={year:0,month:1,day:2,hour:3,minute:4,second:5};function J_(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var a=Q_[n[r].type];a>=0&&(i[a]=parseInt(n[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function tw(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var Os={};function ew(e){if(!Os[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Os[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Os[e]}function nd(e,t,n,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(i,r,a,s),o}var id=36e5,nw=6e4,As={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Rs(e,t,n){var i,r;if(!e||(i=As.timezoneZ.exec(e),i))return 0;var a;if(i=As.timezoneHH.exec(e),i)return a=parseInt(i[1],10),rd(a)?-(a*id):NaN;if(i=As.timezoneHHMM.exec(e),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return rd(a,s)?(r=Math.abs(a)*id+s*nw,a>0?-r:r):NaN}if(aw(e)){t=new Date(t||Date.now());var o=n?t:iw(t),l=Ls(o,e),c=n?l:rw(t,l,e);return-c}return NaN}function iw(e){return nd(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ls(e,t){var n=Z_(e,t),i=nd(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function rw(e,t,n){var i=e.getTime(),r=i-t,a=Ls(new Date(r),n);if(t===a)return t;r-=a-t;var s=Ls(new Date(r),n);return a===s?a:Math.max(a,s)}function rd(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ad={};function aw(e){if(ad[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ad[e]=!0,!0}catch{return!1}}var sw=60*1e3,ow={X:function(e,t,n,i){var r=Is(i.timeZone,i._originalDate||e);if(r===0)return"Z";switch(t){case"X":return sd(r);case"XXXX":case"XX":return Cn(r);case"XXXXX":case"XXX":default:return Cn(r,":")}},x:function(e,t,n,i){var r=Is(i.timeZone,i._originalDate||e);switch(t){case"x":return sd(r);case"xxxx":case"xx":return Cn(r);case"xxxxx":case"xxx":default:return Cn(r,":")}},O:function(e,t,n,i){var r=Is(i.timeZone,i._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+lw(r,":");case"OOOO":default:return"GMT"+Cn(r,":")}},z:function(e,t,n,i){var r=i._originalDate||e;switch(t){case"z":case"zz":case"zzz":return ed("short",r,i);case"zzzz":default:return ed("long",r,i)}}};function Is(e,t){var n=e?Rs(e,t,!0)/sw:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Mr(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function Cn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=Mr(Math.floor(r/60),2),s=Mr(Math.floor(r%60),2);return i+a+n+s}function sd(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Mr(Math.abs(e)/60,2)}return Cn(e,t)}function lw(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+Mr(a,2)}const cw=ow;var uw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Ns=36e5,od=6e4,dw=2,Vt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:uw};function ld(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},i=n.additionalDigits==null?dw:b_(n.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=hw(e),a=fw(r.date,i),s=a.year,o=a.restDateString,l=gw(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=mw(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=Rs(r.timeZone||n.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=td(new Date(c+u)),d=td(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function hw(e){var t={},n=Vt.dateTimePattern.exec(e),i;if(n?(t.date=n[1],i=n[3]):(n=Vt.datePattern.exec(e),n?(t.date=n[1],i=n[2]):(t.date=null,i=e)),i){var r=Vt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function fw(e,t){var n=Vt.YYY[t],i=Vt.YYYYY[t],r;if(r=Vt.YYYY.exec(e)||i.exec(e),r){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=Vt.YY.exec(e)||n.exec(e),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:e.slice(s.length)}}return{year:null}}function gw(e,t){if(t===null)return null;var n,i,r,a;if(e.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(n=Vt.MM.exec(e),n)return i=new Date(0),r=parseInt(n[1],10)-1,dd(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Vt.DDD.exec(e),n){i=new Date(0);var s=parseInt(n[1],10);return vw(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(n=Vt.MMDD.exec(e),n){i=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return dd(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(n=Vt.Www.exec(e),n)return a=parseInt(n[1],10)-1,hd(t,a)?cd(t,a):new Date(NaN);if(n=Vt.WwwD.exec(e),n){a=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return hd(t,a,l)?cd(t,a,l):new Date(NaN)}return null}function mw(e){var t,n,i;if(t=Vt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),Bs(n)?n%24*Ns:NaN;if(t=Vt.HHMM.exec(e),t)return n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Bs(n,i)?n%24*Ns+i*od:NaN;if(t=Vt.HHMMSS.exec(e),t){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Bs(n,i,r)?n%24*Ns+i*od+r*1e3:NaN}return null}function cd(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=t*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var pw=[31,28,31,30,31,30,31,31,30,31,30,31],bw=[31,29,31,30,31,30,31,31,30,31,30,31];function ud(e){return e%400===0||e%4===0&&e%100!==0}function dd(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var i=ud(e);if(i&&n>bw[t]||!i&&n>pw[t])return!1}return!0}function vw(e,t){if(t<1)return!1;var n=ud(e);return!(n&&t>366||!n&&t>365)}function hd(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Bs(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var yw=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function xw(e,t,n){var i=String(t),r=n||{},a=i.match(yw);if(a){var s=ld(e,r);i=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+cw[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return q_(e,i,r)}var Hs={exports:{}},Fs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}e.exports=t.default})(Fs,Fs.exports);var _w=Fs.exports;(function(e,t){var n=St.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(_w);function r(a){return(0,i.default)({},a)}e.exports=t.default})(Hs,Hs.exports);var ww=Hs.exports;const Tw=_i(ww);function Mw(e,t,n){var i=ld(e,n),r=Rs(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Sw(e,t,n,i){var r=Tw(i);return r.timeZone=t,xw(Mw(e,t),n,r)}const Dw=2,Us=new Intl.NumberFormat(((uh=document==null?void 0:document.documentElement)==null?void 0:uh.lang)||"en-US");function Pw(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let i="MMM dd, YYY hh:mm a";t.short&&(i="MMM dd, YYY"),t.includeTZ&&(i+=" (z)");const r=new Date(e);return Sw(r,n,i)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}const Ws=10,Oe=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],Ti=(e,t)=>(t||Oe)[e%Oe.length],Mi=(e,t)=>{e[0]==="#"&&(e=e.slice(1));let n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16);n=n-t,i=i-t,r=r-t,n>255?n=255:n<0&&(n=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=n.toString(16).length===1?"0"+n.toString(16):n.toString(16),s=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length===1?"0"+r.toString(16):r.toString(16);return`#${a}${s}${o}`},fd="#6f7787",Ew={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},Ys=new Map,zs=(e,t)=>t==="bytes"?Na(e):t==="count/minute"?e.toFixed(2):Us.format(e),gd=e=>{const n=document.createElement("canvas").getContext("2d"),i=mt({});return n.font=i.string,n.measureText(e).width},Cw=()=>{const e="label_height";if(!Ys.has(e)){const t=mt({});Ys.set(e,t.lineHeight)}return Ys.get(e)},kw=e=>e.datasets.reduce((t,n)=>t+n.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),md=(e,t)=>t.datasets.reduce((n,i,r)=>e.isDatasetVisible(r)?n+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):n,0),pd=(e,t)=>t===0?" (0.0%)":` (${(e/t*100).toFixed(1)}%)`;function Ow(e){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return dr.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Xa(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},b.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:e.indexAxis,scales:{x:{border:{display:!1},stacked:e.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const g=10;return d&&d.length>g?d.slice(0,g)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="y"?!U((i=e.metricAxesTitle)==null?void 0:i.value):!U((r=e.dimensionAxesTitle)==null?void 0:r.value),text:e.indexAxis==="y"?(a=e.metricAxesTitle)==null?void 0:a.value:(s=e.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:e.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>Ws?d.slice(0,Ws)+"...":d):f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="x"?!U((o=e.metricAxesTitle)==null?void 0:o.value):!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:e.indexAxis==="x"?(c=e.metricAxesTitle)==null?void 0:c.value:(u=e.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:d=>{Ga(e.tooltipState,d)}}},onHover:{mode:"nearest",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Xt.register(...Ub);const Aw=(e,t)=>{const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])};function Rw(e,t,n,i,r){const a=b.shallowRef(null),s=(o,l)=>{if(t.value)return new Xt(t.value,{type:e,data:o,plugins:i,options:l})};return b.onMounted(()=>{a.value=s(n.value,r.value)}),b.onUnmounted(()=>{U(a.value)||a.value.destroy()}),b.watch(n,(o,l)=>{if(Aw(l,o)&&!U(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else U(a.value)||a.value.destroy(),a.value=s(o,r.value)}),b.watch(t,()=>{U(a.value)||a.value.destroy(),a.value=s(n.value,r.value)}),b.watch(r,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(U(a.value)||a.value.destroy(),a.value=s(n.value,o))}),a}var bd={exports:{}};(function(e){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(g,v){v&&v%3===0&&h.push(d),h.push(g)}),h.reverse().join("")}function n(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var i=1e3,r=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(n(c,1,u),u):c<a?d=n(c,i,u)+"k":c<s?d=n(c,a,u)+"m":c<o?d=t(n(c,s,u),u)+"b":d=t(n(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,e.exports=l})()})(bd);var Lw=bd.exports;const js=_i(Lw);function Iw(e,t,n){const{i18n:i}=Ft.useI18n();return{legendValues:b.computed(()=>e.value.datasets.reduce((a,s)=>{const o=s.total?s.total:[Rt.TIMESERIES_BAR,Rt.TIMESERIES_LINE].some(c=>c===t)?s.data.reduce((c,{y:u})=>c+(Number(u)||0),0):s.data.reduce((c,u)=>c+Number(u),0);let l;if(n.value==="bytes")l=isNaN(o)?"0":Na(o);else{l=`${js(o,{capital:!0})} ${n.value}`;const c=n.value&&i&&i.te(`chartUnits.${n.value}`)&&i.t(`chartUnits.${n.value}`)||n.value;l=i&&i.t("legend.datapointValueDisplay",{value:js(o,{capital:!0}),unit:c})||`${js(o,{capital:!0})} ${n.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Nw(e){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return dr.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Xa(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},{options:b.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Ga(e.tooltipState,i)}}}}))}}function Bw(e){const t=b.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:(c=e.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),n=b.computed(()=>{var l,c;return{title:{display:!U((l=e.metricAxesTitle)==null?void 0:l.value),text:(c=e.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,mode:"index",intersect:!1,position:"lineChartTooltipPosition"};dr.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||e.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=e.tooltipState.width||this.width,h=e.tooltipState.height||this.height,f=u.width/2,g=u.height/2,v=Xa(c,d,f);let p=g_(c,h,g);const m=c.y<g?"top":"bottom",y=c.x<f?"left":"center";return h>u.height&&(p=0),{x:v,y:p,xAlign:y,yAlign:m}};const r=b.computed(()=>{switch(e.granularity.value){case z.MINUTELY:return"minute";case z.HOURLY:return"hour";case z.DAILY:return"day";default:return"day"}}),a=b.computed(()=>e.timeRangeMs?Cx(Number(e.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm":Vx(Number(e.timeRangeSec.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=b.computed(()=>[z.DAILY,z.WEEKLY].includes(e.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:b.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:e.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:r.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...n.value,stacked:e.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{Ga(e.tooltipState,l)}}}}))}}function Hw(e,t){const{i18n:n}=Ft.useI18n();return b.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(m=>{const y=l?`${m.event[u]},${m.event[d]}`:`${u},${d}`,_=m.event[h];return[y,_]})),g=l&&a[u]||s,v=l&&a[d]||s;return!g||!v?{labels:[],datasets:[]}:{labels:l?a[u].map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m):s.map(m=>n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m),datasets:v&&Array.from(v).flatMap((m,y)=>{if(!m)return[];let{colorPalette:_}=e;U(_)&&(_=Oe);const x={},w=Array.isArray(_)?Ti(y,_):_[m]||Ti(y);return x[m]=w,{label:n&&n.te(`chartLabels.${m}`)&&n.t(`chartLabels.${m}`)||m,backgroundColor:w,data:g.map(T=>f[`${T},${m}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const Fw=(e,t,n=1)=>Array(Math.ceil((t-e)/n)).fill(e).map((i,r)=>i+r*n),Uw=e=>{if(typeof e=="string"){const t=+e;if(t)return t;try{return Yu(e).getTime()}catch(n){if(n instanceof RangeError)return 0;throw n}}return e},Ww=(e,t,n,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((e-i)/n)*n+i,l=Math.floor((s-i)/n)*n+i+n;return Fw(o,l,n)};function Yw(e,t){const{i18n:n}=Ft.useI18n();return b.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const g=Uw(o),v=Ww(o,l,f,g,r),p=new Set,m=r!=null&&r.length?r.reduce((w,T)=>{const M=new Date(T.timestamp).valueOf(),S=T.event;return p.add(u),M in w||(w[M]={}),u in w[M]||(w[M][u]={}),h.forEach(P=>{S[d]===P||d===P?w[M][u][P]=Math.round(Number(S[u])*1e3)/1e3:c.length||(w[M][u][P]=Math.round(Number(S[P])*1e3)/1e3)}),w},{}):{},y=[...p].reduce((w,T)=>(h.forEach(M=>w.push([T,M])),w),[]),_={},x=[...y].map(([w,T],M)=>{const S=v.map(W=>W in m&&w in m[W]?{x:W,y:m[W][w][T]||0}:{x:W,y:0});let{colorPalette:P,fill:D}=e;U(P)&&(P=Oe);const C=Array.isArray(P)?Ti(M,P):P[T]||Ti(M),L=Mi(C,50);return _[T]=C,{rawDimension:T,rawMetric:w,label:n&&n.te(`chartLabels.${T}`)&&n.t(`chartLabels.${T}`)||T,borderColor:L,backgroundColor:C,data:S,total:S.reduce((W,{y:at})=>W+Number(at),0),...Ew,fill:D}});return x.sort((w,T)=>Number(w.total)<Number(T.total)?-1:1),{datasets:x,colorMap:_}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Ft={useBarChartOptions:Ow,useChartJSCommon:Rw,useChartLegendValues:Iw,useExploreResultToDatasets:Hw,useExploreResultToTimeDataset:Yw,useDoughnutChartOptions:Nw,useLinechartOptions:Bw,useI18n:Bf,useReportChartDataForSynthetics:(e,t)=>{b.watch([e,t],(n,i,r)=>{const[a,s]=n;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),r(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})}};/*!
|
|
39
|
+
`):e}function ub(e,t){const{element:n,datasetIndex:i,index:r}=t,a=e.getDatasetMeta(i).controller,{label:s,value:o}=a.getLabelAndValue(r);return{chart:e,label:s,parsed:a.getParsed(r),raw:e.data.datasets[i].data[r],formattedValue:o,dataset:a.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function eu(e,t){const n=e.chart.ctx,{body:i,footer:r,title:a}=e,{boxWidth:s,boxHeight:o}=t,l=pt(t.bodyFont),c=pt(t.titleFont),u=pt(t.footerFont),d=a.length,h=r.length,f=i.length,g=kt(t.padding);let v=g.height,m=0,p=i.reduce((x,w)=>x+w.before.length+w.lines.length+w.after.length,0);if(p+=e.beforeBody.length+e.afterBody.length,d&&(v+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),p){const x=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;v+=f*x+(p-f)*l.lineHeight+(p-1)*t.bodySpacing}h&&(v+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let y=0;const _=function(x){m=Math.max(m,n.measureText(x).width+y)};return n.save(),n.font=c.string,lt(e.title,_),n.font=l.string,lt(e.beforeBody.concat(e.afterBody),_),y=t.displayColors?s+2+t.boxPadding:0,lt(i,x=>{lt(x.before,_),lt(x.lines,_),lt(x.after,_)}),y=0,n.font=u.string,lt(e.footer,_),n.restore(),m+=g.width,{width:m,height:v}}function db(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function hb(e,t,n,i){const{x:r,width:a}=i,s=n.caretSize+n.caretPadding;if(e==="left"&&r+a+s>t.width||e==="right"&&r-a-s<0)return!0}function fb(e,t,n,i){const{x:r,width:a}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return i==="center"?c=r<=(o+l)/2?"left":"right":r<=a/2?c="left":r>=s-a/2&&(c="right"),hb(c,e,t,n)&&(c="center"),c}function nu(e,t,n){const i=n.yAlign||t.yAlign||db(e,n);return{xAlign:n.xAlign||t.xAlign||fb(e,t,n,i),yAlign:i}}function gb(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function pb(e,t,n){let{y:i,height:r}=e;return t==="top"?i+=n:t==="bottom"?i-=r+n:i-=r/2,i}function iu(e,t,n,i){const{caretSize:r,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=r+a,{topLeft:u,topRight:d,bottomLeft:h,bottomRight:f}=Fe(s);let g=gb(t,o);const v=pb(t,l,c);return l==="center"?o==="left"?g+=c:o==="right"&&(g-=c):o==="left"?g-=Math.max(u,h)+r:o==="right"&&(g+=Math.max(d,f)+r),{x:It(g,0,i.width-t.width),y:It(v,0,i.height-t.height)}}function dr(e,t,n){const i=kt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function ru(e){return me([],Ee(e))}function mb(e,t,n){return Ue(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function au(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const su={beforeTitle:Se,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:Se,beforeBody:Se,beforeLabel:Se,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return U(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Se,afterBody:Se,beforeFooter:Se,footer:Se,afterFooter:Se};function Zt(e,t,n,i){const r=e[t].call(n,i);return typeof r>"u"?su[t].call(n,i):r}class Aa extends Ht{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,a=new ha(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=mb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,r=Zt(i,"beforeTitle",this,t),a=Zt(i,"title",this,t),s=Zt(i,"afterTitle",this,t);let o=[];return o=me(o,Ee(r)),o=me(o,Ee(a)),o=me(o,Ee(s)),o}getBeforeBody(t,n){return ru(Zt(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,r=[];return lt(t,a=>{const s={before:[],lines:[],after:[]},o=au(i,a);me(s.before,Ee(Zt(o,"beforeLabel",this,a))),me(s.lines,Zt(o,"label",this,a)),me(s.after,Ee(Zt(o,"afterLabel",this,a))),r.push(s)}),r}getAfterBody(t,n){return ru(Zt(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,r=Zt(i,"beforeFooter",this,t),a=Zt(i,"footer",this,t),s=Zt(i,"afterFooter",this,t);let o=[];return o=me(o,Ee(r)),o=me(o,Ee(a)),o=me(o,Ee(s)),o}_createItems(t){const n=this._active,i=this.chart.data,r=[],a=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(ub(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,h)=>t.filter(u,d,h,i))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,i))),lt(o,u=>{const d=au(t.callbacks,u);r.push(Zt(d,"labelColor",this,u)),a.push(Zt(d,"labelPointStyle",this,u)),s.push(Zt(d,"labelTextColor",this,u))}),this.labelColors=r,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const i=this.options.setContext(this.getContext()),r=this._active;let a,s=[];if(!r.length)this.opacity!==0&&(a={opacity:0});else{const o=ui[i.position].call(this,r,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const l=this._size=eu(this,i),c=Object.assign({},o,l),u=nu(this.chart,i,c),d=iu(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,r){const a=this.getCaretPosition(t,i,r);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,i){const{xAlign:r,yAlign:a}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Fe(o),{x:h,y:f}=t,{width:g,height:v}=n;let m,p,y,_,x,w;return a==="center"?(x=f+v/2,r==="left"?(m=h,p=m-s,_=x+s,w=x-s):(m=h+g,p=m+s,_=x-s,w=x+s),y=m):(r==="left"?p=h+Math.max(l,u)+s:r==="right"?p=h+g-Math.max(c,d)-s:p=this.caretX,a==="top"?(_=f,x=_-s,m=p-s,y=p+s):(_=f+v,x=_+s,m=p+s,y=p-s),w=_),{x1:m,x2:p,x3:y,y1:_,y2:x,y3:w}}drawTitle(t,n,i){const r=this.title,a=r.length;let s,o,l;if(a){const c=Mn(i.rtl,this.x,this.width);for(t.x=dr(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",s=pt(i.titleFont),o=i.titleSpacing,n.fillStyle=i.titleColor,n.font=s.string,l=0;l<a;++l)n.fillText(r[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===a&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,n,i,r,a){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:l,boxWidth:c}=a,u=pt(a.bodyFont),d=dr(this,"left",a),h=r.x(d),f=l<u.lineHeight?(u.lineHeight-l)/2:0,g=n.y+f;if(a.usePointStyle){const v={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},m=r.leftForLtr(h,c)+c/2,p=g+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,sa(t,v,m,p),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,sa(t,v,m,p)}else{t.lineWidth=$(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const v=r.leftForLtr(h,c),m=r.leftForLtr(r.xPlus(h,1),c-2),p=Fe(s.borderRadius);Object.values(p).some(y=>y!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,_n(t,{x:v,y:g,w:c,h:l,radius:p}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),_n(t,{x:m,y:g+1,w:c-2,h:l-2,radius:p}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(v,g,c,l),t.strokeRect(v,g,c,l),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:r}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=i,d=pt(i.bodyFont);let h=d.lineHeight,f=0;const g=Mn(i.rtl,this.x,this.width),v=function(S){n.fillText(S,g.x(t.x+f),t.y+h/2),t.y+=h+a},m=g.textAlign(s);let p,y,_,x,w,T,M;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=dr(this,m,i),n.fillStyle=i.bodyColor,lt(this.beforeBody,v),f=o&&m!=="right"?s==="center"?c/2+u:c+2+u:0,x=0,T=r.length;x<T;++x){for(p=r[x],y=this.labelTextColors[x],n.fillStyle=y,lt(p.before,v),_=p.lines,o&&_.length&&(this._drawColorBox(n,t,x,g,i),h=Math.max(d.lineHeight,l)),w=0,M=_.length;w<M;++w)v(_[w]),h=d.lineHeight;lt(p.after,v)}f=0,h=d.lineHeight,lt(this.afterBody,v),t.y-=a}drawFooter(t,n,i){const r=this.footer,a=r.length;let s,o;if(a){const l=Mn(i.rtl,this.x,this.width);for(t.x=dr(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",s=pt(i.footerFont),n.fillStyle=i.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(r[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,n,i,r){const{xAlign:a,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=i,{topLeft:d,topRight:h,bottomLeft:f,bottomRight:g}=Fe(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,i,r),n.lineTo(o+c-h,l),n.quadraticCurveTo(o+c,l,o+c,l+h),s==="center"&&a==="right"&&this.drawCaret(t,n,i,r),n.lineTo(o+c,l+u-g),n.quadraticCurveTo(o+c,l+u,o+c-g,l+u),s==="bottom"&&this.drawCaret(t,n,i,r),n.lineTo(o+f,l+u),n.quadraticCurveTo(o,l+u,o,l+u-f),s==="center"&&a==="left"&&this.drawCaret(t,n,i,r),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,r=i&&i.x,a=i&&i.y;if(r||a){const s=ui[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=eu(this,t),l=Object.assign({},s,this._size),c=nu(n,t,l),u=iu(t,l,c,n);(r._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},a={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=kt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(a,t,r,n),Ul(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),Wl(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,r=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),a=!Fi(i,r),s=this._positionChanged(r,n);(a||s)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,i),o=this._positionChanged(s,t),l=n||!Fi(s,a)||o;return l&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,r){const a=this.options;if(t.type==="mouseout")return[];if(!r)return n;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,i);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:i,caretY:r,options:a}=this,s=ui[a.position].call(this,t,n);return s!==!1&&(i!==s.x||r!==s.y)}}k(Aa,"positioners",ui);var hr={id:"tooltip",_element:Aa,positioners:ui,afterInit(e,t,n){n&&(e.tooltip=new Aa({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:su},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},bb=Object.freeze({__proto__:null,Colors:E0,Decimation:L0,Filler:tb,Legend:sb,SubTitle:cb,Title:lb,Tooltip:hr});const vb=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function yb(e,t,n,i){const r=e.indexOf(t);if(r===-1)return vb(e,t,n,i);const a=e.lastIndexOf(t);return r!==a?n:r}const xb=(e,t)=>e===null?null:It(Math.round(e),0,t);function ou(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Ra extends ln{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:a}of n)i[r]===a&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(U(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:yb(i,t,F(n,t),this._addedLabels),xb(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,r=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=n;s++)r.push({value:s});return r}getLabelForValue(t){return ou.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}k(Ra,"id","category"),k(Ra,"defaults",{ticks:{callback:ou}});function _b(e,t){const n=[],{bounds:r,step:a,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:h}=e,f=a||1,g=u-1,{min:v,max:m}=t,p=!U(s),y=!U(o),_=!U(c),x=(m-v)/(d+1);let w=ul((m-v)/g/f)*f,T,M,S,P;if(w<1e-14&&!p&&!y)return[{value:v},{value:m}];P=Math.ceil(m/w)-Math.floor(v/w),P>g&&(w=ul(P*w/g/f)*f),U(l)||(T=Math.pow(10,l),w=Math.ceil(w*T)/T),r==="ticks"?(M=Math.floor(v/w)*w,S=Math.ceil(m/w)*w):(M=v,S=m),p&&y&&a&&vg((o-s)/a,w/1e3)?(P=Math.round(Math.min((o-s)/w,u)),w=(o-s)/P,M=s,S=o):_?(M=p?s:M,S=y?o:S,P=c-1,w=(S-M)/P):(P=(S-M)/w,jn(P,Math.round(P),w/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(hl(w),hl(M));T=Math.pow(10,U(l)?D:l),M=Math.round(M*T)/T,S=Math.round(S*T)/T;let C=0;for(p&&(h&&M!==s?(n.push({value:s}),M<s&&C++,jn(Math.round((M+C*w)*T)/T,s,lu(s,x,e))&&C++):M<s&&C++);C<P;++C){const L=Math.round((M+C*w)*T)/T;if(y&&L>o)break;n.push({value:L})}return y&&h&&S!==o?n.length&&jn(n[n.length-1].value,o,lu(o,x,e))?n[n.length-1].value=o:n.push({value:o}):(!y||S===o)&&n.push({value:S}),n}function lu(e,t,{horizontal:n,minRotation:i}){const r=Pt(i),a=(n?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class fr extends ln{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,n){return U(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:a}=this;const s=l=>r=n?r:l,o=l=>a=i?a:l;if(t){const l=ge(r),c=ge(a);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(r===a){let l=a===0?1:Math.abs(a*.05);o(a+l),t||s(r-l)}this.min=r,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=_b(r,a);return t.bounds==="ticks"&&dl(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-n)/Math.max(t.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return qn(t,this.chart.options.locale,this.options.ticks.format)}}class La extends fr{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?t:0,this.max=vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Pt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/r))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}k(La,"id","linear"),k(La,"defaults",{ticks:{callback:$i.formatters.numeric}});const di=e=>Math.floor(Be(e)),cn=(e,t)=>Math.pow(10,di(e)+t);function cu(e){return e/Math.pow(10,di(e))===1}function uu(e,t,n){const i=Math.pow(10,n),r=Math.floor(e/i);return Math.ceil(t/i)-r}function wb(e,t){const n=t-e;let i=di(n);for(;uu(e,t,i)>10;)i++;for(;uu(e,t,i)<10;)i--;return Math.min(i,di(e))}function Tb(e,{min:t,max:n}){t=ne(e.min,t);const i=[],r=di(t);let a=wb(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),l=r>a?Math.pow(10,r):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,a)),h=ne(e.min,Math.round((l+u+d*Math.pow(10,a))*s)/s);for(;h<n;)i.push({value:h,major:cu(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(a++,d=2,s=a>=0?1:s),h=Math.round((l+u+d*Math.pow(10,a))*s)/s;const f=ne(e.max,h);return i.push({value:f,major:cu(f),significand:d}),i}class Ia extends ln{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=fr.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return vt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=vt(t)?Math.max(0,t):null,this.max=vt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!vt(this._userMin)&&(this.min=t===cn(this.min,0)?cn(this.min,-1):cn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const a=o=>i=t?i:o,s=o=>r=n?r:o;i===r&&(i<=0?(a(1),s(10)):(a(cn(i,-1)),s(cn(r,1)))),i<=0&&a(cn(r,-1)),r<=0&&s(cn(i,1)),this.min=i,this.max=r}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=Tb(n,this);return t.bounds==="ticks"&&dl(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":qn(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Be(t),this._valueRange=Be(this.max)-Be(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Be(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}k(Ia,"id","logarithmic"),k(Ia,"defaults",{ticks:{callback:$i.formatters.logarithmic,major:{enabled:!0}}});function Na(e){const t=e.ticks;if(t.display&&e.display){const n=kt(t.backdropPadding);return F(t.font&&t.font.size,xt.font.size)+n.height}return 0}function Mb(e,t,n){return n=et(n)?n:[n],{w:Ig(e,t.string,n),h:n.length*t.lineHeight}}function du(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Sb(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],r=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?G/a:0;for(let l=0;l<a;l++){const c=s.setContext(e.getPointLabelContext(l));r[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+r[l],o),d=pt(c.font),h=Mb(e.ctx,d,e._pointLabels[l]);i[l]=h;const f=ie(e.getIndexAngle(l)+o),g=Math.round(zi(f)),v=du(g,u.x,h.w,0,180),m=du(g,u.y,h.h,90,270);Db(n,t,f,v,m)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Cb(e,i,r)}function Db(e,t,n,i,r){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;i.start<t.l?(o=(t.l-i.start)/a,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),r.start<t.t?(l=(t.t-r.start)/s,e.t=Math.min(e.t,t.t-l)):r.end>t.b&&(l=(r.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function Pb(e,t,n){const i=e.drawingArea,{extra:r,additionalAngle:a,padding:s,size:o}=n,l=e.getPointPosition(t,i+r+s,a),c=Math.round(zi(ie(l.angle+ht))),u=Ab(l.y,o.h,c),d=Eb(c),h=Ob(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:h,top:u,right:h+o.w,bottom:u+o.h}}function kb(e,t){if(!t)return!0;const{left:n,top:i,right:r,bottom:a}=e;return!(ke({x:n,y:i},t)||ke({x:n,y:a},t)||ke({x:r,y:i},t)||ke({x:r,y:a},t))}function Cb(e,t,n){const i=[],r=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,l={extra:Na(a)/2,additionalAngle:s?G/r:0};let c;for(let u=0;u<r;u++){l.padding=n[u],l.size=t[u];const d=Pb(e,u,l);i.push(d),o==="auto"&&(d.visible=kb(d,c),d.visible&&(c=d))}return i}function Eb(e){return e===0||e===180?"center":e<180?"left":"right"}function Ob(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Ab(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Rb(e,t,n){const{left:i,top:r,right:a,bottom:s}=n,{backdropColor:o}=t;if(!U(o)){const l=Fe(t.borderRadius),c=kt(t.backdropPadding);e.fillStyle=o;const u=i-c.left,d=r-c.top,h=a-i+c.width,f=s-r+c.height;Object.values(l).some(g=>g!==0)?(e.beginPath(),_n(e,{x:u,y:d,w:h,h:f,radius:l}),e.fill()):e.fillRect(u,d,h,f)}}function Lb(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let r=t-1;r>=0;r--){const a=e._pointLabelItems[r];if(!a.visible)continue;const s=i.setContext(e.getPointLabelContext(r));Rb(n,s,a);const o=pt(s.font),{x:l,y:c,textAlign:u}=a;rn(n,e._pointLabels[r],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function hu(e,t,n,i){const{ctx:r}=e;if(n)r.arc(e.xCenter,e.yCenter,t,0,dt);else{let a=e.getPointPosition(0,t);r.moveTo(a.x,a.y);for(let s=1;s<i;s++)a=e.getPointPosition(s,t),r.lineTo(a.x,a.y)}}function Ib(e,t,n,i,r){const a=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!i||!o||!l||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=l,a.setLineDash(r.dash),a.lineDashOffset=r.dashOffset,a.beginPath(),hu(e,n,s,i),a.closePath(),a.stroke(),a.restore())}function Nb(e,t,n){return Ue(e,{label:n,index:t,type:"pointLabel"})}class hi extends fr{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=kt(Na(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=vt(t)&&!isNaN(t)?t:0,this.max=vt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Na(this.options))}generateTickLabels(t){fr.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const r=ot(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Sb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,r){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,r))}getIndexAngle(t){const n=dt/(this._pointLabels.length||1),i=this.options.startAngle||0;return ie(t*n+Pt(i))}getDistanceFromCenterForValue(t){if(U(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(U(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return Nb(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const r=this.getIndexAngle(t)-ht+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:r,bottom:a}=this._pointLabelItems[t];return{left:n,top:i,right:r,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),hu(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:r,border:a}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&Lb(this,s),r.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(d),f=r.setContext(h),g=a.setContext(h);Ib(this,f,l,s,g)}}),i.display){for(t.save(),o=s-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:h}=u;!h||!d||(t.lineWidth=h,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!n.reverse)return;const c=i.setContext(this.getContext(l)),u=pt(c.font);if(a=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=kt(c.backdropPadding);t.fillRect(-s/2-d.left,-a-u.size/2-d.top,s+d.width,u.size+d.height)}rn(t,o.label,0,-a,u,{color:c.color})}),t.restore()}drawTitle(){}}k(hi,"id","radialLinear"),k(hi,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$i.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),k(hi,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),k(hi,"descriptors",{angleLines:{_fallback:"grid"}});const gr={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}},Qt=Object.keys(gr);function Bb(e,t){return e-t}function fu(e,t){if(U(t))return null;const n=e._adapter,{parser:i,round:r,isoWeekday:a}=e._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),vt(s)||(s=typeof i=="string"?n.parse(s,i):n.parse(s)),s===null?null:(r&&(s=r==="week"&&(He(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,r)),+s)}function gu(e,t,n,i){const r=Qt.length;for(let a=Qt.indexOf(e);a<r-1;++a){const s=gr[Qt[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=i)return Qt[a]}return Qt[r-1]}function Hb(e,t,n,i,r){for(let a=Qt.length-1;a>=Qt.indexOf(n);a--){const s=Qt[a];if(gr[s].common&&e._adapter.diff(r,i,s)>=t-1)return s}return Qt[n?Qt.indexOf(n):0]}function Fb(e){for(let t=Qt.indexOf(e)+1,n=Qt.length;t<n;++t)if(gr[Qt[t]].common)return Qt[t]}function pu(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:r}=ta(n,t),a=n[i]>=t?n[i]:n[r];e[a]=!0}}function Ub(e,t,n,i){const r=e._adapter,a=+r.startOf(t[0].value,i),s=t[t.length-1].value;let o,l;for(o=a;o<=s;o=+r.add(o,1,i))l=n[o],l>=0&&(t[l].major=!0);return t}function mu(e,t,n){const i=[],r={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],r[o]=s,i.push({value:o,major:!1});return a===0||!n?i:Ub(e,i,r,n)}class fi extends ln{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,n={}){const i=t.time||(t.time={}),r=this._adapter=new sc._date(t.adapters.date);r.init(n),zn(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:fu(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:r,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(r=Math.min(r,c.min)),!o&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=vt(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),a=vt(a)&&!isNaN(a)?a:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,a-1),this.max=Math.max(r+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const a=this.min,s=this.max,o=wg(r,a,s);return this._unit=n.unit||(i.autoSkip?gu(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):Hb(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Fb(this._unit),this.initOffsets(r),t.reverse&&o.reverse(),mu(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,r,a;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?n=1-r:n=(this.getDecimalForValue(t[1])-r)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?i=a:i=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=It(n,0,s),i=It(i,0,s),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,r=this.options,a=r.time,s=a.unit||gu(a.minUnit,n,i,this._getLabelCapacity(n)),o=F(r.ticks.stepSize,1),l=s==="week"?a.isoWeekday:!1,c=He(l)||l===!0,u={};let d=n,h,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(i,n,s)>1e5*o)throw new Error(n+" and "+i+" are too far apart with stepSize of "+o+" "+s);const g=r.ticks.source==="data"&&this.getDataTimestamps();for(h=d,f=0;h<i;h=+t.add(h,o,s),f++)pu(u,h,g);return(h===i||r.bounds==="ticks"||f===1)&&pu(u,h,g),Object.keys(u).sort((v,m)=>v-m).map(v=>+v)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const r=this.options.time.displayFormats,a=this._unit,s=n||r[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,i,r){const a=this.options,s=a.ticks.callback;if(s)return ot(s,[t,n,i],this);const o=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],h=i[n],f=c&&d&&h&&h.major;return this._adapter.format(t,r||(f?d:u))}generateTickLabels(t){let n,i,r;for(n=0,i=t.length;n<i;++n)r=t[n],r.label=this._tickFormatFunction(r.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,r=Pt(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(r),s=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:i*a+o*s,h:i*s+o*a}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,a=this._tickFormatFunction(t,0,mu(this,[t],this._majorUnit),r),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)t=t.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)t.push(fu(this,r[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return ml(t.sort(Bb))}}k(fi,"id","time"),k(fi,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function pr(e,t,n){let i=0,r=e.length-1,a,s,o,l;n?(t>=e[i].pos&&t<=e[r].pos&&({lo:i,hi:r}=Pe(e,"pos",t)),{pos:a,time:o}=e[i],{pos:s,time:l}=e[r]):(t>=e[i].time&&t<=e[r].time&&({lo:i,hi:r}=Pe(e,"time",t)),{time:a,pos:o}=e[i],{time:s,pos:l}=e[r]);const c=s-a;return c?o+(l-o)*(t-a)/c:o}class Ba extends fi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=pr(n,this.min),this._tableRange=pr(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,r=[],a=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=i&&r.push(c);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(s=0,o=r.length;s<o;++s)u=r[s+1],l=r[s-1],c=r[s],Math.round((u+l)/2)!==c&&a.push({time:c,pos:s/(o-1)});return a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(pr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return pr(this._table,i*this._tableRange+this._minPos,!0)}}k(Ba,"id","timeseries"),k(Ba,"defaults",fi.defaults);var Wb=Object.freeze({__proto__:null,CategoryScale:Ra,LinearScale:La,LogarithmicScale:Ia,RadialLinearScale:hi,TimeScale:fi,TimeSeriesScale:Ba});const Yb=[Kp,M0,bb,Wb],zb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],jb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],$b=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Vb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bu=(e,t,n)=>{let i=e;return typeof t=="string"||Array.isArray(t)?i=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(i=e.toLocaleString(void 0,n)),i};function Ha(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?Vb:$b:t.binary?jb:zb,i=t.space?" ":"";if(t.signed&&e===0)return` 0${i}${n[0]}`;const r=e<0,a=r?"-":t.signed?"+":"";r&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=bu(e,t.locale,s);return a+u+i+n[0]}const o=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**o,s||(e=e.toPrecision(3));const l=bu(Number(e),t.locale,s),c=n[o];return a+l+i+c}function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function mt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function B(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Oe(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function vu(e,t){R(2,arguments);var n=B(e),i=mt(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Fa(e,t){R(2,arguments);var n=B(e),i=mt(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}function gi(e,t){R(2,arguments);var n=B(e).getTime(),i=mt(t);return new Date(n+i)}var qb=36e5;function Gb(e,t){R(2,arguments);var n=mt(t);return gi(e,n*qb)}var Xb={};function $e(){return Xb}function yu(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=$e(),d=mt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function mr(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Ua(e){R(1,arguments);var t=B(e);return t.setHours(0,0,0,0),t}var Kb=864e5;function Zb(e,t){R(2,arguments);var n=Ua(e),i=Ua(t),r=n.getTime()-mr(n),a=i.getTime()-mr(i);return Math.round((r-a)/Kb)}var Qb=6e4;function Jb(e,t){R(2,arguments);var n=mt(t);return gi(e,n*Qb)}function tv(e,t){R(2,arguments);var n=mt(t),i=n*3;return Fa(e,i)}function ev(e,t){R(2,arguments);var n=mt(t);return gi(e,n*1e3)}function nv(e,t){R(2,arguments);var n=mt(t),i=n*7;return vu(e,i)}function iv(e,t){R(2,arguments);var n=mt(t);return Fa(e,n*12)}function pi(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var br=6e4,mi=36e5,rv=1e3,av=3600;function sv(e){return R(1,arguments),e instanceof Date||Oe(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wa(e){if(R(1,arguments),!sv(e)&&typeof e!="number")return!1;var t=B(e);return!isNaN(Number(t))}function ov(e,t){R(2,arguments);var n=B(e),i=B(t),r=n.getFullYear()-i.getFullYear(),a=n.getMonth()-i.getMonth();return r*12+a}function lv(e,t){R(2,arguments);var n=B(e),i=B(t);return n.getFullYear()-i.getFullYear()}function xu(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function _u(e,t){R(2,arguments);var n=B(e),i=B(t),r=xu(n,i),a=Math.abs(Zb(n,i));n.setDate(n.getDate()-r*a);var s=+(xu(n,i)===-r),o=r*(a-s);return o===0?0:o}function vr(e,t){return R(2,arguments),B(e).getTime()-B(t).getTime()}var wu={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},cv="trunc";function bi(e){return e?wu[e]:wu[cv]}function uv(e,t,n){R(2,arguments);var i=vr(e,t)/mi;return bi(n==null?void 0:n.roundingMethod)(i)}function dv(e,t,n){R(2,arguments);var i=vr(e,t)/br;return bi(n==null?void 0:n.roundingMethod)(i)}function Tu(e){R(1,arguments);var t=B(e);return t.setHours(23,59,59,999),t}function Mu(e){R(1,arguments);var t=B(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function hv(e){R(1,arguments);var t=B(e);return Tu(t).getTime()===Mu(t).getTime()}function Su(e,t){R(2,arguments);var n=B(e),i=B(t),r=pi(n,i),a=Math.abs(ov(n,i)),s;if(a<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*a);var o=pi(n,i)===-r;hv(B(e))&&a===1&&pi(e,i)===1&&(o=!1),s=r*(a-Number(o))}return s===0?0:s}function fv(e,t,n){R(2,arguments);var i=Su(e,t)/3;return bi(n==null?void 0:n.roundingMethod)(i)}function gv(e,t,n){R(2,arguments);var i=vr(e,t)/1e3;return bi(n==null?void 0:n.roundingMethod)(i)}function pv(e,t,n){R(2,arguments);var i=_u(e,t)/7;return bi(n==null?void 0:n.roundingMethod)(i)}function mv(e,t){R(2,arguments);var n=B(e),i=B(t),r=pi(n,i),a=Math.abs(lv(n,i));n.setFullYear(1584),i.setFullYear(1584);var s=pi(n,i)===-r,o=r*(a-Number(s));return o===0?0:o}function bv(e){R(1,arguments);var t=B(e);return t.setSeconds(0,0),t}function vv(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function yv(e){R(1,arguments);var t=B(e);return t.setDate(1),t.setHours(0,0,0,0),t}function xv(e){R(1,arguments);var t=B(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function _v(e){R(1,arguments);var t=B(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function wv(e){R(1,arguments);var t=B(e);return t.setMinutes(59,59,999),t}function Tv(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=$e(),d=mt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getDay(),g=(f<d?-7:0)+6-(f-d);return h.setDate(h.getDate()+g),h.setHours(23,59,59,999),h}function Mv(e){R(1,arguments);var t=B(e);return t.setSeconds(59,999),t}function Sv(e){R(1,arguments);var t=B(e),n=t.getMonth(),i=n-n%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function Dv(e){R(1,arguments);var t=B(e);return t.setMilliseconds(999),t}function Du(e,t){R(2,arguments);var n=mt(t);return gi(e,-n)}var Pv=864e5;function kv(e){R(1,arguments);var t=B(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/Pv)+1}function Dn(e){R(1,arguments);var t=1,n=B(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function Pu(e){R(1,arguments);var t=B(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=Dn(i),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var s=Dn(a);return t.getTime()>=r.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Cv(e){R(1,arguments);var t=Pu(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Dn(n);return i}var Ev=6048e5;function ku(e){R(1,arguments);var t=B(e),n=Dn(t).getTime()-Cv(t).getTime();return Math.round(n/Ev)+1}function un(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=$e(),d=mt((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=B(e),f=h.getUTCDay(),g=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-g),h.setUTCHours(0,0,0,0),h}function Ya(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=B(e),d=u.getUTCFullYear(),h=$e(),f=mt((n=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(l=h.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(d+1,0,f),g.setUTCHours(0,0,0,0);var v=un(g,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var p=un(m,t);return u.getTime()>=v.getTime()?d+1:u.getTime()>=p.getTime()?d:d-1}function Ov(e,t){var n,i,r,a,s,o,l,c;R(1,arguments);var u=$e(),d=mt((n=(i=(r=(a=t==null?void 0:t.firstWeekContainsDate)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=Ya(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var g=un(f,t);return g}var Av=6048e5;function Cu(e,t){R(1,arguments);var n=B(e),i=un(n,t).getTime()-Ov(n,t).getTime();return Math.round(i/Av)+1}function ct(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Rv={y:function(t,n){var i=t.getUTCFullYear(),r=i>0?i:1-i;return ct(n==="yy"?r%100:r,n.length)},M:function(t,n){var i=t.getUTCMonth();return n==="M"?String(i+1):ct(i+1,2)},d:function(t,n){return ct(t.getUTCDate(),n.length)},a:function(t,n){var i=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h:function(t,n){return ct(t.getUTCHours()%12||12,n.length)},H:function(t,n){return ct(t.getUTCHours(),n.length)},m:function(t,n){return ct(t.getUTCMinutes(),n.length)},s:function(t,n){return ct(t.getUTCSeconds(),n.length)},S:function(t,n){var i=n.length,r=t.getUTCMilliseconds(),a=Math.floor(r*Math.pow(10,i-3));return ct(a,n.length)}};const Ve=Rv;var Pn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Lv={G:function(t,n,i){var r=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,n,i){if(n==="yo"){var r=t.getUTCFullYear(),a=r>0?r:1-r;return i.ordinalNumber(a,{unit:"year"})}return Ve.y(t,n)},Y:function(t,n,i,r){var a=Ya(t,r),s=a>0?a:1-a;if(n==="YY"){var o=s%100;return ct(o,2)}return n==="Yo"?i.ordinalNumber(s,{unit:"year"}):ct(s,n.length)},R:function(t,n){var i=Pu(t);return ct(i,n.length)},u:function(t,n){var i=t.getUTCFullYear();return ct(i,n.length)},Q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return ct(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return ct(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,i){var r=t.getUTCMonth();switch(n){case"M":case"MM":return Ve.M(t,n);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,i){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return ct(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,n,i,r){var a=Cu(t,r);return n==="wo"?i.ordinalNumber(a,{unit:"week"}):ct(a,n.length)},I:function(t,n,i){var r=ku(t);return n==="Io"?i.ordinalNumber(r,{unit:"week"}):ct(r,n.length)},d:function(t,n,i){return n==="do"?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ve.d(t,n)},D:function(t,n,i){var r=kv(t);return n==="Do"?i.ordinalNumber(r,{unit:"dayOfYear"}):ct(r,n.length)},E:function(t,n,i){var r=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return ct(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(a,{width:"short",context:"formatting"});case"eeee":default:return i.day(a,{width:"wide",context:"formatting"})}},c:function(t,n,i,r){var a=t.getUTCDay(),s=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return ct(s,n.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(a,{width:"narrow",context:"standalone"});case"cccccc":return i.day(a,{width:"short",context:"standalone"});case"cccc":default:return i.day(a,{width:"wide",context:"standalone"})}},i:function(t,n,i){var r=t.getUTCDay(),a=r===0?7:r;switch(n){case"i":return String(a);case"ii":return ct(a,n.length);case"io":return i.ordinalNumber(a,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,i){var r=t.getUTCHours(),a=r/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,n,i){var r=t.getUTCHours(),a;switch(r===12?a=Pn.noon:r===0?a=Pn.midnight:a=r/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,n,i){var r=t.getUTCHours(),a;switch(r>=17?a=Pn.evening:r>=12?a=Pn.afternoon:r>=4?a=Pn.morning:a=Pn.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,n,i){if(n==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return Ve.h(t,n)},H:function(t,n,i){return n==="Ho"?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ve.H(t,n)},K:function(t,n,i){var r=t.getUTCHours()%12;return n==="Ko"?i.ordinalNumber(r,{unit:"hour"}):ct(r,n.length)},k:function(t,n,i){var r=t.getUTCHours();return r===0&&(r=24),n==="ko"?i.ordinalNumber(r,{unit:"hour"}):ct(r,n.length)},m:function(t,n,i){return n==="mo"?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ve.m(t,n)},s:function(t,n,i){return n==="so"?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ve.s(t,n)},S:function(t,n){return Ve.S(t,n)},X:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return Ou(s);case"XXXX":case"XX":return dn(s);case"XXXXX":case"XXX":default:return dn(s,":")}},x:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"x":return Ou(s);case"xxxx":case"xx":return dn(s);case"xxxxx":case"xxx":default:return dn(s,":")}},O:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Eu(s,":");case"OOOO":default:return"GMT"+dn(s,":")}},z:function(t,n,i,r){var a=r._originalDate||t,s=a.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Eu(s,":");case"zzzz":default:return"GMT"+dn(s,":")}},t:function(t,n,i,r){var a=r._originalDate||t,s=Math.floor(a.getTime()/1e3);return ct(s,n.length)},T:function(t,n,i,r){var a=r._originalDate||t,s=a.getTime();return ct(s,n.length)}};function Eu(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+ct(a,2)}function Ou(e,t){if(e%60===0){var n=e>0?"-":"+";return n+ct(Math.abs(e)/60,2)}return dn(e,t)}function dn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=ct(Math.floor(r/60),2),s=ct(r%60,2);return i+a+n+s}const Iv=Lv;var Au=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Ru=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Nv=function(t,n){var i=t.match(/(P+)(p+)?/)||[],r=i[1],a=i[2];if(!a)return Au(t,n);var s;switch(r){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Au(r,n)).replace("{{time}}",Ru(a,n))},Bv={p:Ru,P:Nv};const za=Bv;var Hv=["D","DD"],Fv=["YY","YYYY"];function Lu(e){return Hv.indexOf(e)!==-1}function Iu(e){return Fv.indexOf(e)!==-1}function yr(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Uv={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Wv=function(t,n,i){var r,a=Uv[t];return typeof a=="string"?r=a:n===1?r=a.one:r=a.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};const Yv=Wv;function ja(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var zv={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jv={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$v={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vv={date:ja({formats:zv,defaultWidth:"full"}),time:ja({formats:jv,defaultWidth:"full"}),dateTime:ja({formats:$v,defaultWidth:"full"})};const qv=Vv;var Gv={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xv=function(t,n,i,r){return Gv[t]};const Kv=Xv;function vi(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;r=e.formattingValues[s]||e.formattingValues[a]}else{var o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}var c=e.argumentCallback?e.argumentCallback(t):t;return r[c]}}var Zv={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qv={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Jv={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ty={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ey={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ny={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},iy=function(t,n){var i=Number(t),r=i%100;if(r>20||r<10)switch(r%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},ry={ordinalNumber:iy,era:vi({values:Zv,defaultWidth:"wide"}),quarter:vi({values:Qv,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:vi({values:Jv,defaultWidth:"wide"}),day:vi({values:ty,defaultWidth:"wide"}),dayPeriod:vi({values:ey,defaultWidth:"wide",formattingValues:ny,defaultFormattingWidth:"wide"})};const ay=ry;function yi(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(r);if(!a)return null;var s=a[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?oy(o,function(d){return d.test(s)}):sy(o,function(d){return d.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(s.length);return{value:c,rest:u}}}function sy(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function oy(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function ly(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],a=t.match(e.parsePattern);if(!a)return null;var s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;var o=t.slice(r.length);return{value:s,rest:o}}}var cy=/^(\d+)(th|st|nd|rd)?/i,uy=/\d+/i,dy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hy={any:[/^b/i,/^(a|c)/i]},fy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gy={any:[/1/i,/2/i,/3/i,/4/i]},py={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},my={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},by={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},yy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xy={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_y={ordinalNumber:ly({matchPattern:cy,parsePattern:uy,valueCallback:function(t){return parseInt(t,10)}}),era:yi({matchPatterns:dy,defaultMatchWidth:"wide",parsePatterns:hy,defaultParseWidth:"any"}),quarter:yi({matchPatterns:fy,defaultMatchWidth:"wide",parsePatterns:gy,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:yi({matchPatterns:py,defaultMatchWidth:"wide",parsePatterns:my,defaultParseWidth:"any"}),day:yi({matchPatterns:by,defaultMatchWidth:"wide",parsePatterns:vy,defaultParseWidth:"any"}),dayPeriod:yi({matchPatterns:yy,defaultMatchWidth:"any",parsePatterns:xy,defaultParseWidth:"any"})},wy={code:"en-US",formatDistance:Yv,formatLong:qv,formatRelative:Kv,localize:ay,match:_y,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Nu=wy;var Ty=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,My=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sy=/^'([^]*?)'?$/,Dy=/''/g,Py=/[a-zA-Z]/;function ky(e,t,n){var i,r,a,s,o,l,c,u,d,h,f,g,v,m,p,y,_,x;R(2,arguments);var w=String(t),T=$e(),M=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:Nu,S=mt((a=(s=(o=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&s!==void 0?s:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=mt((f=(g=(v=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(p=n.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&v!==void 0?v:T.weekStartsOn)!==null&&g!==void 0?g:(_=T.locale)===null||_===void 0||(x=_.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var D=B(e);if(!Wa(D))throw new RangeError("Invalid time value");var C=mr(D),L=Du(D,C),W={firstWeekContainsDate:S,weekStartsOn:P,locale:M,_originalDate:D},st=w.match(My).map(function(N){var Y=N[0];if(Y==="p"||Y==="P"){var Q=za[Y];return Q(N,M.formatLong)}return N}).join("").match(Ty).map(function(N){if(N==="''")return"'";var Y=N[0];if(Y==="'")return Cy(N);var Q=Iv[Y];if(Q)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Iu(N)&&yr(N,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Lu(N)&&yr(N,t,String(e)),Q(L,N,M.localize,W);if(Y.match(Py))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Y+"`");return N}).join("");return st}function Cy(e){var t=e.match(Sy);return t?t[1].replace(Dy,"'"):e}function Ey(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Bu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Oy(e,t){if(e){if(typeof e=="string")return Bu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bu(e,t)}}function Hu(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Oy(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
40
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,o;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw o}}}}function O(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e,t){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},$a(e,t)}function J(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$a(e,t)}function xr(e){return xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xr(e)}function Ay(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ry(e,t){if(t&&(Oe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O(e)}function tt(e){var t=Ay();return function(){var i=xr(e),r;if(t){var a=xr(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return Ry(this,r)}}function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ly(e,t){if(Oe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(Oe(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fu(e){var t=Ly(e,"string");return Oe(t)==="symbol"?t:String(t)}function Uu(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Fu(i.key),i)}}function K(e,t,n){return t&&Uu(e.prototype,t),n&&Uu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t,n){return t=Fu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Iy=10,Wu=function(){function e(){X(this,e),E(this,"priority",void 0),E(this,"subPriority",0)}return K(e,[{key:"validate",value:function(n,i){return!0}}]),e}(),Ny=function(e){J(n,e);var t=tt(n);function n(i,r,a,s,o){var l;return X(this,n),l=t.call(this),l.value=i,l.validateValue=r,l.setValue=a,l.priority=s,o&&(l.subPriority=o),l}return K(n,[{key:"validate",value:function(r,a){return this.validateValue(r,this.value,a)}},{key:"set",value:function(r,a,s){return this.setValue(r,a,this.value,s)}}]),n}(Wu),By=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",Iy),E(O(i),"subPriority",-1),i}return K(n,[{key:"set",value:function(r,a){if(a.timestampIsSet)return r;var s=new Date(0);return s.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),s.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),s}}]),n}(Wu),rt=function(){function e(){X(this,e),E(this,"incompatibleTokens",void 0),E(this,"priority",void 0),E(this,"subPriority",void 0)}return K(e,[{key:"run",value:function(n,i,r,a){var s=this.parse(n,i,r,a);return s?{setter:new Ny(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(n,i,r){return!0}}]),e}(),Hy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",140),E(O(i),"incompatibleTokens",["R","u","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"G":case"GG":case"GGG":return s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"});case"GGGGG":return s.era(r,{width:"narrow"});case"GGGG":default:return s.era(r,{width:"wide"})||s.era(r,{width:"abbreviated"})||s.era(r,{width:"narrow"})}}},{key:"set",value:function(r,a,s){return a.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),St={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},be={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function _t(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ve(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var i=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:i*(r*mi+a*br+s*rv),rest:t.slice(n[0].length)}}function Yu(e){return _t(St.anyDigitsSigned,e)}function Mt(e,t){switch(e){case 1:return _t(St.singleDigit,t);case 2:return _t(St.twoDigits,t);case 3:return _t(St.threeDigits,t);case 4:return _t(St.fourDigits,t);default:return _t(new RegExp("^\\d{1,"+e+"}"),t)}}function _r(e,t){switch(e){case 1:return _t(St.singleDigitSigned,t);case 2:return _t(St.twoDigitsSigned,t);case 3:return _t(St.threeDigitsSigned,t);case 4:return _t(St.fourDigitsSigned,t);default:return _t(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Va(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function zu(e,t){var n=t>0,i=n?t:1-t,r;if(i<=50)r=e||100;else{var a=i+50,s=Math.floor(a/100)*100,o=e>=a%100;r=e+s-(o?100:0)}return n?r:1-r}function ju(e){return e%400===0||e%4===0&&e%100!==0}var Fy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Dt(Mt(4,r),o);case"yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s){var o=r.getUTCFullYear();if(s.isTwoDigitYear){var l=zu(s.year,o);return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}var c=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),Uy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){var o=function(c){return{year:c,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Dt(Mt(4,r),o);case"Yo":return Dt(s.ordinalNumber(r,{unit:"year"}),o);default:return Dt(Mt(a.length,r),o)}}},{key:"validate",value:function(r,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(r,a,s,o){var l=Ya(r,o);if(s.isTwoDigitYear){var c=zu(s.year,l);return r.setUTCFullYear(c,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),un(r,o)}var u=!("era"in a)||a.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,o.firstWeekContainsDate),r.setUTCHours(0,0,0,0),un(r,o)}}]),n}(rt),Wy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a){return _r(a==="R"?4:a.length,r)}},{key:"set",value:function(r,a,s){var o=new Date(0);return o.setUTCFullYear(s,0,4),o.setUTCHours(0,0,0,0),Dn(o)}}]),n}(rt),Yy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",130),E(O(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a){return _r(a==="u"?4:a.length,r)}},{key:"set",value:function(r,a,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),zy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",120),E(O(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"Q":case"QQ":return Mt(a.length,r);case"Qo":return s.ordinalNumber(r,{unit:"quarter"});case"QQQ":return s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(r,{width:"wide",context:"formatting"})||s.quarter(r,{width:"abbreviated",context:"formatting"})||s.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),jy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",120),E(O(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"q":case"qq":return Mt(a.length,r);case"qo":return s.ordinalNumber(r,{unit:"quarter"});case"qqq":return s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(r,{width:"wide",context:"standalone"})||s.quarter(r,{width:"abbreviated",context:"standalone"})||s.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=1&&a<=4}},{key:"set",value:function(r,a,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),$y=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),E(O(i),"priority",110),i}return K(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"M":return Dt(_t(St.month,r),o);case"MM":return Dt(Mt(2,r),o);case"Mo":return Dt(s.ordinalNumber(r,{unit:"month"}),o);case"MMM":return s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(r,{width:"wide",context:"formatting"})||s.month(r,{width:"abbreviated",context:"formatting"})||s.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt),Vy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",110),E(O(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c-1};switch(a){case"L":return Dt(_t(St.month,r),o);case"LL":return Dt(Mt(2,r),o);case"Lo":return Dt(s.ordinalNumber(r,{unit:"month"}),o);case"LLL":return s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(r,{width:"wide",context:"standalone"})||s.month(r,{width:"abbreviated",context:"standalone"})||s.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),n}(rt);function qy(e,t,n){R(2,arguments);var i=B(e),r=mt(t),a=Cu(i,n)-r;return i.setUTCDate(i.getUTCDate()-a*7),i}var Gy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",100),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"w":return _t(St.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s,o){return un(qy(r,s,o),o)}}]),n}(rt);function Xy(e,t){R(2,arguments);var n=B(e),i=mt(t),r=ku(n)-i;return n.setUTCDate(n.getUTCDate()-r*7),n}var Ky=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",100),E(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"I":return _t(St.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=53}},{key:"set",value:function(r,a,s){return Dn(Xy(r,s))}}]),n}(rt),Zy=[31,28,31,30,31,30,31,31,30,31,30,31],Qy=[31,29,31,30,31,30,31,31,30,31,30,31],Jy=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"subPriority",1),E(O(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"d":return _t(St.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=ju(s),l=r.getUTCMonth();return o?a>=1&&a<=Qy[l]:a>=1&&a<=Zy[l]}},{key:"set",value:function(r,a,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),n}(rt),tx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"subpriority",1),E(O(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"D":case"DD":return _t(St.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){var s=r.getUTCFullYear(),o=ju(s);return o?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(r,a,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),n}(rt);function qa(e,t,n){var i,r,a,s,o,l,c,u;R(2,arguments);var d=$e(),h=mt((i=(r=(a=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(o=n.locale)===null||o===void 0||(l=o.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&a!==void 0?a:d.weekStartsOn)!==null&&r!==void 0?r:(c=d.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=B(e),g=mt(t),v=f.getUTCDay(),m=g%7,p=(m+7)%7,y=(p<h?7:0)+g-v;return f.setUTCDate(f.getUTCDate()+y),f}var ex=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"E":case"EE":case"EEE":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(rt),nx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"e":case"ee":return Dt(Mt(a.length,r),l);case"eo":return Dt(s.ordinalNumber(r,{unit:"day"}),l);case"eee":return s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeeee":return s.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(rt),ix=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s,o){var l=function(u){var d=Math.floor((u-1)/7)*7;return(u+o.weekStartsOn+6)%7+d};switch(a){case"c":case"cc":return Dt(Mt(a.length,r),l);case"co":return Dt(s.ordinalNumber(r,{unit:"day"}),l);case"ccc":return s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"ccccc":return s.day(r,{width:"narrow",context:"standalone"});case"cccccc":return s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(r,{width:"wide",context:"standalone"})||s.day(r,{width:"abbreviated",context:"standalone"})||s.day(r,{width:"short",context:"standalone"})||s.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,a){return a>=0&&a<=6}},{key:"set",value:function(r,a,s,o){return r=qa(r,s,o),r.setUTCHours(0,0,0,0),r}}]),n}(rt);function rx(e,t){R(2,arguments);var n=mt(t);n%7===0&&(n=n-7);var i=1,r=B(e),a=r.getUTCDay(),s=n%7,o=(s+7)%7,l=(o<i?7:0)+n-a;return r.setUTCDate(r.getUTCDate()+l),r}var ax=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",90),E(O(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){var o=function(c){return c===0?7:c};switch(a){case"i":case"ii":return Mt(a.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Dt(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiii":return Dt(s.day(r,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Dt(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Dt(s.day(r,{width:"wide",context:"formatting"})||s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(r,a){return a>=1&&a<=7}},{key:"set",value:function(r,a,s){return r=rx(r,s),r.setUTCHours(0,0,0,0),r}}]),n}(rt),sx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"a":case"aa":case"aaa":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(Va(s),0,0,0),r}}]),n}(rt),ox=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"b":case"bb":case"bbb":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(Va(s),0,0,0),r}}]),n}(rt),lx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",80),E(O(i),"incompatibleTokens",["a","b","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"B":case"BB":case"BBB":return s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(r,{width:"wide",context:"formatting"})||s.dayPeriod(r,{width:"abbreviated",context:"formatting"})||s.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,a,s){return r.setUTCHours(Va(s),0,0,0),r}}]),n}(rt),cx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["H","K","k","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"h":return _t(St.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=12}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):!o&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),n}(rt),ux=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"H":return _t(St.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=23}},{key:"set",value:function(r,a,s){return r.setUTCHours(s,0,0,0),r}}]),n}(rt),dx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["h","H","k","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"K":return _t(St.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=11}},{key:"set",value:function(r,a,s){var o=r.getUTCHours()>=12;return o&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),n}(rt),hx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",70),E(O(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"k":return _t(St.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=1&&a<=24}},{key:"set",value:function(r,a,s){var o=s<=24?s%24:s;return r.setUTCHours(o,0,0,0),r}}]),n}(rt),fx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",60),E(O(i),"incompatibleTokens",["t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"m":return _t(St.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCMinutes(s,0,0),r}}]),n}(rt),gx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",50),E(O(i),"incompatibleTokens",["t","T"]),i}return K(n,[{key:"parse",value:function(r,a,s){switch(a){case"s":return _t(St.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return Mt(a.length,r)}}},{key:"validate",value:function(r,a){return a>=0&&a<=59}},{key:"set",value:function(r,a,s){return r.setUTCSeconds(s,0),r}}]),n}(rt),px=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",30),E(O(i),"incompatibleTokens",["t","T"]),i}return K(n,[{key:"parse",value:function(r,a){var s=function(l){return Math.floor(l*Math.pow(10,-a.length+3))};return Dt(Mt(a.length,r),s)}},{key:"set",value:function(r,a,s){return r.setUTCMilliseconds(s),r}}]),n}(rt),mx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",10),E(O(i),"incompatibleTokens",["t","T","x"]),i}return K(n,[{key:"parse",value:function(r,a){switch(a){case"X":return ve(be.basicOptionalMinutes,r);case"XX":return ve(be.basic,r);case"XXXX":return ve(be.basicOptionalSeconds,r);case"XXXXX":return ve(be.extendedOptionalSeconds,r);case"XXX":default:return ve(be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(rt),bx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",10),E(O(i),"incompatibleTokens",["t","T","X"]),i}return K(n,[{key:"parse",value:function(r,a){switch(a){case"x":return ve(be.basicOptionalMinutes,r);case"xx":return ve(be.basic,r);case"xxxx":return ve(be.basicOptionalSeconds,r);case"xxxxx":return ve(be.extendedOptionalSeconds,r);case"xxx":default:return ve(be.extended,r)}}},{key:"set",value:function(r,a,s){return a.timestampIsSet?r:new Date(r.getTime()-s)}}]),n}(rt),vx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",40),E(O(i),"incompatibleTokens","*"),i}return K(n,[{key:"parse",value:function(r){return Yu(r)}},{key:"set",value:function(r,a,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),n}(rt),yx=function(e){J(n,e);var t=tt(n);function n(){var i;X(this,n);for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return i=t.call.apply(t,[this].concat(a)),E(O(i),"priority",20),E(O(i),"incompatibleTokens","*"),i}return K(n,[{key:"parse",value:function(r){return Yu(r)}},{key:"set",value:function(r,a,s){return[new Date(s),{timestampIsSet:!0}]}}]),n}(rt),xx={G:new Hy,y:new Fy,Y:new Uy,R:new Wy,u:new Yy,Q:new zy,q:new jy,M:new $y,L:new Vy,w:new Gy,I:new Ky,d:new Jy,D:new tx,E:new ex,e:new nx,c:new ix,i:new ax,a:new sx,b:new ox,B:new lx,h:new cx,H:new ux,K:new dx,k:new hx,m:new fx,s:new gx,S:new px,X:new mx,x:new bx,t:new vx,T:new yx},_x=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wx=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tx=/^'([^]*?)'?$/,Mx=/''/g,Sx=/\S/,Dx=/[a-zA-Z]/;function Px(e,t,n,i){var r,a,s,o,l,c,u,d,h,f,g,v,m,p,y,_,x,w;R(3,arguments);var T=String(e),M=String(t),S=$e(),P=(r=(a=i==null?void 0:i.locale)!==null&&a!==void 0?a:S.locale)!==null&&r!==void 0?r:Nu;if(!P.match)throw new RangeError("locale must contain match property");var D=mt((s=(o=(l=(c=i==null?void 0:i.firstWeekContainsDate)!==null&&c!==void 0?c:i==null||(u=i.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&l!==void 0?l:S.firstWeekContainsDate)!==null&&o!==void 0?o:(h=S.locale)===null||h===void 0||(f=h.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=mt((g=(v=(m=(p=i==null?void 0:i.weekStartsOn)!==null&&p!==void 0?p:i==null||(y=i.locale)===null||y===void 0||(_=y.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&m!==void 0?m:S.weekStartsOn)!==null&&v!==void 0?v:(x=S.locale)===null||x===void 0||(w=x.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&g!==void 0?g:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(M==="")return T===""?B(n):new Date(NaN);var L={firstWeekContainsDate:D,weekStartsOn:C,locale:P},W=[new By],st=M.match(wx).map(function(ft){var nt=ft[0];if(nt in za){var Bt=za[nt];return Bt(ft,P.formatLong)}return ft}).join("").match(_x),N=[],Y=Hu(st),Q;try{var At=function(){var nt=Q.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Iu(nt)&&yr(nt,M,e),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Lu(nt)&&yr(nt,M,e);var Bt=nt[0],A=xx[Bt];if(A){var H=A.incompatibleTokens;if(Array.isArray(H)){var j=N.find(function(at){return H.includes(at.token)||at.token===Bt});if(j)throw new RangeError("The format string mustn't contain `".concat(j.fullToken,"` and `").concat(nt,"` at the same time"))}else if(A.incompatibleTokens==="*"&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(nt,"` and any other token at the same time"));N.push({token:Bt,fullToken:nt});var it=A.run(T,nt,P.match,L);if(!it)return{v:new Date(NaN)};W.push(it.setter),T=it.rest}else{if(Bt.match(Dx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Bt+"`");if(nt==="''"?nt="'":Bt==="'"&&(nt=kx(nt)),T.indexOf(nt)===0)T=T.slice(nt.length);else return{v:new Date(NaN)}}};for(Y.s();!(Q=Y.n()).done;){var bt=At();if(Oe(bt)==="object")return bt.v}}catch(ft){Y.e(ft)}finally{Y.f()}if(T.length>0&&Sx.test(T))return new Date(NaN);var Jt=W.map(function(ft){return ft.priority}).sort(function(ft,nt){return nt-ft}).filter(function(ft,nt,Bt){return Bt.indexOf(ft)===nt}).map(function(ft){return W.filter(function(nt){return nt.priority===ft}).sort(function(nt,Bt){return Bt.subPriority-nt.subPriority})}).map(function(ft){return ft[0]}),qt=B(n);if(isNaN(qt.getTime()))return new Date(NaN);var Nt=Du(qt,mr(qt)),te={},ut=Hu(Jt),ee;try{for(ut.s();!(ee=ut.n()).done;){var oe=ee.value;if(!oe.validate(Nt,L))return new Date(NaN);var Rt=oe.set(Nt,te,L);Array.isArray(Rt)?(Nt=Rt[0],Ey(te,Rt[1])):Nt=Rt}}catch(ft){ut.e(ft)}finally{ut.f()}return Nt}function kx(e){return e.match(Tx)[1].replace(Mx,"'")}function Cx(e){R(1,arguments);var t=B(e);return t.setMinutes(0,0,0),t}function Ex(e){R(1,arguments);var t=B(e);return t.setMilliseconds(0),t}function Ox(e){R(1,arguments);var t=e/mi;return Math.floor(t)}function $u(e,t){var n;R(1,arguments);var i=mt((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=Ix(e),a;if(r.date){var s=Nx(r.date,i);a=Bx(s.restDateString,s.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);var o=a.getTime(),l=0,c;if(r.time&&(l=Hx(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(c=Fx(r.timezone),isNaN(c))return new Date(NaN)}else{var u=new Date(o+l),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+l+c)}var wr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Ax=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Rx=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Lx=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Ix(e){var t={},n=e.split(wr.dateTimeDelimiter),i;if(n.length>2)return t;if(/:/.test(n[0])?i=n[0]:(t.date=n[0],i=n[1],wr.timeZoneDelimiter.test(t.date)&&(t.date=e.split(wr.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){var r=wr.timezone.exec(i);r?(t.time=i.replace(r[1],""),t.timezone=r[1]):t.time=i}return t}function Nx(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,a=i[2]?parseInt(i[2]):null;return{year:a===null?r:a*100,restDateString:e.slice((i[1]||i[2]).length)}}function Bx(e,t){if(t===null)return new Date(NaN);var n=e.match(Ax);if(!n)return new Date(NaN);var i=!!n[4],r=xi(n[1]),a=xi(n[2])-1,s=xi(n[3]),o=xi(n[4]),l=xi(n[5])-1;if(i)return jx(t,o,l)?Ux(t,o,l):new Date(NaN);var c=new Date(0);return!Yx(t,a,s)||!zx(t,r)?new Date(NaN):(c.setUTCFullYear(t,a,Math.max(r,s)),c)}function xi(e){return e?parseInt(e):1}function Hx(e){var t=e.match(Rx);if(!t)return NaN;var n=Ga(t[1]),i=Ga(t[2]),r=Ga(t[3]);return $x(n,i,r)?n*mi+i*br+r*1e3:NaN}function Ga(e){return e&&parseFloat(e.replace(",","."))||0}function Fx(e){if(e==="Z")return 0;var t=e.match(Lx);if(!t)return 0;var n=t[1]==="+"?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return Vx(i,r)?n*(i*mi+r*br):NaN}function Ux(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=(t-1)*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var Wx=[31,null,31,30,31,30,31,31,30,31,30,31];function Vu(e){return e%400===0||e%4===0&&e%100!==0}function Yx(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Wx[t]||(Vu(e)?29:28))}function zx(e,t){return t>=1&&t<=(Vu(e)?366:365)}function jx(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function $x(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Vx(e,t){return t>=0&&t<=59}function qx(e){R(1,arguments);var t=e/av;return Math.floor(t)}var Gx=Object.defineProperty,Xx=(e,t,n)=>t in e?Gx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ye=(e,t,n)=>(Xx(e,typeof t!="symbol"?t+"":t,n),n),z=(e=>(e.MINUTELY="Minutely",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e))(z||{}),wt=(e=>(e.FIFTEEN_MIN="15m",e.ONE_HOUR="1h",e.SIX_HOUR="6h",e.TWELVE_HOUR="12h",e.ONE_DAY="24h",e.SEVEN_DAY="7d",e.THIRTY_DAY="30d",e.CURRENT_WEEK="current_week",e.CURRENT_MONTH="current_month",e.CURRENT_QUARTER="current_quarter",e.PREVIOUS_WEEK="previous_week",e.PREVIOUS_MONTH="previous_month",e.PREVIOUS_QUARTER="previous_quarter",e))(wt||{}),Ft=(e=>(e.DOUGHNUT="Doughnut",e.HORIZONTAL_BAR="HorizontalBar",e.VERTICAL_BAR="VerticalBar",e.TIMESERIES_LINE="Line",e.TIMESERIES_BAR="TimeSeriesBar",e))(Ft||{});const Kx={[z.MINUTELY]:60*1e3,[z.HOURLY]:60*60*1e3,[z.DAILY]:60*60*24*1e3,[z.WEEKLY]:60*60*24*7*1e3};function _i(e){return e&&Object.values(z).find(t=>e<=Kx[t])||null}function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function Tr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function xe(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function kn(e){xe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Xa(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function qu(e,t){xe(2,arguments);var n=kn(e),i=Tr(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Zx(e,t){xe(2,arguments);var n=kn(e),i=Tr(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),a=new Date(n.getTime());a.setMonth(n.getMonth()+i+1,0);var s=a.getDate();return r>=s?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}var Qx={};function Jx(){return Qx}function Mr(e,t){var n,i,r,a,s,o,l,c;xe(1,arguments);var u=Jx(),d=Tr((n=(i=(r=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(s=t.locale)===null||s===void 0||(o=s.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(l=u.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=kn(e),f=h.getDay(),g=(f<d?7:0)+f-d;return h.setDate(h.getDate()-g),h.setHours(0,0,0,0),h}function Gu(e){xe(1,arguments);var t=kn(e);return t.setHours(0,0,0,0),t}var t_=60,e_=3600;function Cn(e){xe(1,arguments);var t=kn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function n_(e){xe(1,arguments);var t=kn(e),n=t.getFullYear(),i=t.getMonth(),r=new Date(0);return r.setFullYear(n,i+1,0),r.setHours(0,0,0,0),r.getDate()}function i_(e){return xe(1,arguments),Math.floor(e*e_)}function r_(e){xe(1,arguments);var t=e/t_;return Math.floor(t)}function a_(e,t){xe(2,arguments);var n=Tr(t);return Zx(e,-n)}class ue{constructor(t){ye(this,"timeframeText"),ye(this,"key"),ye(this,"display"),ye(this,"timeframeLength"),ye(this,"allowedTiers"),ye(this,"defaultResponseGranularity"),ye(this,"dataGranularity"),ye(this,"isRelative"),ye(this,"_startCustom"),ye(this,"_endCustom"),this.display=t.display,this.timeframeText=t.timeframeText,this.key=t.key,this.timeframeLength=t.timeframeLength,this.allowedTiers=t.allowedTiers,this.defaultResponseGranularity=t.defaultResponseGranularity,this.dataGranularity=t.dataGranularity,this.isRelative=t.isRelative,this._startCustom=t.startCustom,this._endCustom=t.endCustom}rawEnd(){return this._endCustom||new Date}rawStart(){return this._startCustom||new Date(this.rawEnd().getTime()-this.timeframeLengthMs())}timeframeLengthMs(){return this.timeframeLength()*1e3}maximumTimeframeLength(){return this.timeframeLength()}allowedGranularities(){const t=new Set,n=this.maximumTimeframeLength()/3600;return n<=6&&t.add(z.MINUTELY),n>=2&&n<=7*24&&t.add(z.HOURLY),n>=2*24&&t.add(z.DAILY),n>=2*24*14&&t.add(z.WEEKLY),t}}class s_ extends ue{rawStart(){return Mr(new Date,{weekStartsOn:1})}maximumTimeframeLength(){return 60*60*24*7}}class o_ extends ue{rawStart(){return Cn(new Date)}maximumTimeframeLength(){return 60*60*24*31}}class l_ extends ue{rawEnd(){return Mr(new Date,{weekStartsOn:1})}rawStart(){return Mr(new Date().setDate(new Date().getDate()-7),{weekStartsOn:1})}}class c_ extends ue{rawEnd(){return Cn(new Date)}rawStart(){return Cn(new Date().setMonth(new Date().getMonth()-1))}}wt.FIFTEEN_MIN,new ue({key:wt.FIFTEEN_MIN,display:"Last 15 minutes",timeframeText:"15 minutes",timeframeLength:()=>60*15,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_HOUR,new ue({key:wt.ONE_HOUR,display:"Last hour",timeframeText:"One hour",timeframeLength:()=>60*60*1,defaultResponseGranularity:z.MINUTELY,dataGranularity:z.MINUTELY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SIX_HOUR,new ue({key:wt.SIX_HOUR,display:"Last 6 hours",timeframeText:"6 hours",timeframeLength:()=>60*60*6,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.TWELVE_HOUR,new ue({key:wt.TWELVE_HOUR,display:"Last 12 hours",timeframeText:"12 hours",timeframeLength:()=>60*60*12,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.ONE_DAY,new ue({key:wt.ONE_DAY,display:"Last 24 hours",timeframeText:"24 hours",timeframeLength:()=>60*60*24,defaultResponseGranularity:z.HOURLY,dataGranularity:z.HOURLY,isRelative:!0,allowedTiers:["free","trial","plus","enterprise"]}),wt.SEVEN_DAY,new ue({key:wt.SEVEN_DAY,display:"Last 7 days",timeframeText:"7 days",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.THIRTY_DAY,new ue({key:wt.THIRTY_DAY,display:"Last 30 days",timeframeText:"30 days",timeframeLength:()=>60*60*24*30,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!0,allowedTiers:["trial","plus","enterprise"]}),wt.CURRENT_WEEK,new s_({key:wt.CURRENT_WEEK,display:"This week",timeframeText:"Week",timeframeLength:()=>{const e=Mr(new Date,{weekStartsOn:1});return(Gu(qu(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.CURRENT_MONTH,new o_({key:wt.CURRENT_MONTH,display:"This month",timeframeText:"Month",timeframeLength:()=>{const e=Cn(new Date);return(Gu(qu(new Date,1)).getTime()-e.getTime())/1e3},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_WEEK,new l_({key:wt.PREVIOUS_WEEK,display:"Previous week",timeframeText:"Week",timeframeLength:()=>60*60*24*7,defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]}),wt.PREVIOUS_MONTH,new c_({key:wt.PREVIOUS_MONTH,display:"Previous month",timeframeText:"Month",timeframeLength:()=>{let e=0;const t=Cn(new Date),n=Cn(a_(new Date,1));return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(e=u_(t,n)),60*60*24*n_(new Date().setMonth(new Date().getMonth()-1))+i_(e)},defaultResponseGranularity:z.DAILY,dataGranularity:z.DAILY,isRelative:!1,allowedTiers:["plus","enterprise"]});function u_(e,t){return r_(e.getTimezoneOffset()-t.getTimezoneOffset())}var Ct=(e=>(e.Hidden="hidden",e.Right="right",e.Bottom="bottom",e))(Ct||{});const Ka=(e,t)=>{var i,r;const{tooltip:n}=t;if(n.opacity===0&&!e.locked){e.showTooltip=!1;return}if(n.body&&!e.locked){const a=n.labelColors,s=((r=(i=t.chart.config)==null?void 0:i.options)==null?void 0:r.indexAxis)==="y"?"x":"y",o=[Ft.HORIZONTAL_BAR,Ft.VERTICAL_BAR].includes(e.chartType),l=e.chartType===Ft.DOUGHNUT;e.tooltipContext=n.dataPoints[0].parsed.x,e.tooltipSeries=n.dataPoints.map((c,u)=>{const d=l?c.parsed:c.parsed[s];let h;e.units==="bytes"?h=isNaN(d)?d:Ha(d):h=`${d%1===0?Ys.format(d):Ys.format(Number(d.toFixed(kw)))} ${e.units}`;const f=o&&c.dataset.label!==c.label?`${c.dataset.label} - ${c.label}`:l?c.dataset.labels[c.dataIndex]:c.dataset.label;return{backgroundColor:a[u].backgroundColor,borderColor:a[u].borderColor,label:f,value:h,rawValue:d}}).sort((c,u)=>u.rawValue-c.rawValue),e.left=`${n.x}px`,e.top=`${n.y}px`,e.showTooltip=!0}},d_=e=>e&&e.datasets&&e.datasets.length,h_=e=>d_(e)&&e.datasets.some(t=>t.data.length),f_=e=>h_(e)&&e.datasets.some(t=>t.data.length>1),g_=e=>f_(e)&&e.datasets.some(t=>t.data[0]&&Wa(t.data[0].x)),p_=e=>g_(e)&&e.datasets.some(t=>t.data[0]&&t.data[0].x.toString().length>=13),Za=(e,t,n)=>{const r=Math.min(t/1150,1),a=.15,s=1.15;return e.x<n?e.x+t*a*(1-r):e.x-t*s*(1-r)},m_=(e,t,n)=>e.y<n?e.y+t*.15:e.y-t*.5;function wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qa={exports:{}},Xu={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Xu);var Tt=Xu.exports,Ja={exports:{}},ts={exports:{}},Ku={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ku);var Zu=Ku.exports,es={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(r.length<i)throw new TypeError(i+" argument"+(i>1?"s":"")+" required, but only "+r.length+" present")}e.exports=t.default})(es,es.exports);var $t=es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Zu),r=n($t);function a(s){return(0,r.default)(1,arguments),s instanceof Date||(0,i.default)(s)==="object"&&Object.prototype.toString.call(s)==="[object Date]"}e.exports=t.default})(ts,ts.exports);var b_=ts.exports,ns={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(Zu),r=n($t);function a(s){(0,r.default)(1,arguments);var o=Object.prototype.toString.call(s);return s instanceof Date||(0,i.default)(s)==="object"&&o==="[object Date]"?new Date(s.getTime()):typeof s=="number"||o==="[object Number]"?new Date(s):((typeof s=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}e.exports=t.default})(ns,ns.exports);var _e=ns.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(b_),r=n(_e),a=n($t);function s(o){if((0,a.default)(1,arguments),!(0,i.default)(o)&&typeof o!="number")return!1;var l=(0,r.default)(o);return!isNaN(Number(l))}e.exports=t.default})(Ja,Ja.exports);var v_=Ja.exports,is={exports:{}},rs={exports:{}},as={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){if(i===null||i===!0||i===!1)return NaN;var r=Number(i);return isNaN(r)?r:r<0?Math.ceil(r):Math.floor(r)}e.exports=t.default})(as,as.exports);var hn=as.exports;const y_=wi(hn);(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(hn),r=n(_e),a=n($t);function s(o,l){(0,a.default)(2,arguments);var c=(0,r.default)(o).getTime(),u=(0,i.default)(l);return new Date(c+u)}e.exports=t.default})(rs,rs.exports);var x_=rs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(x_),r=n($t),a=n(hn);function s(o,l){(0,r.default)(2,arguments);var c=(0,a.default)(l);return(0,i.default)(o,-c)}e.exports=t.default})(is,is.exports);var __=is.exports,ss={exports:{}},os={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(_e),r=n($t),a=864e5;function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getTime();l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0);var u=l.getTime(),d=c-u;return Math.floor(d/a)+1}e.exports=t.default})(os,os.exports);var w_=os.exports,ls={exports:{}},cs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var i=n(_e),r=n($t);function a(s){(0,r.default)(1,arguments);var o=1,l=(0,i.default)(s),c=l.getUTCDay(),u=(c<o?7:0)+c-o;return l.setUTCDate(l.getUTCDate()-u),l.setUTCHours(0,0,0,0),l}e.exports=t.default})(cs,cs.exports);var us=cs.exports,ds={exports:{}},hs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(_e),r=n($t),a=n(us);function s(o){(0,r.default)(1,arguments);var l=(0,i.default)(o),c=l.getUTCFullYear(),u=new Date(0);u.setUTCFullYear(c+1,0,4),u.setUTCHours(0,0,0,0);var d=(0,a.default)(u),h=new Date(0);h.setUTCFullYear(c,0,4),h.setUTCHours(0,0,0,0);var f=(0,a.default)(h);return l.getTime()>=d.getTime()?c+1:l.getTime()>=f.getTime()?c:c-1}e.exports=t.default})(hs,hs.exports);var Qu=hs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var i=n(Qu),r=n(us),a=n($t);function s(o){(0,a.default)(1,arguments);var l=(0,i.default)(o),c=new Date(0);c.setUTCFullYear(l,0,4),c.setUTCHours(0,0,0,0);var u=(0,r.default)(c);return u}e.exports=t.default})(ds,ds.exports);var T_=ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(_e),r=n(us),a=n(T_),s=n($t),o=6048e5;function l(c){(0,s.default)(1,arguments);var u=(0,i.default)(c),d=(0,r.default)(u).getTime()-(0,a.default)(u).getTime();return Math.round(d/o)+1}e.exports=t.default})(ls,ls.exports);var M_=ls.exports,fs={exports:{}},gs={exports:{}},fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.getDefaultOptions=S_,fn.setDefaultOptions=D_;var Ju={};function S_(){return Ju}function D_(e){Ju=e}(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(_e),r=n($t),a=n(hn),s=fn;function o(l,c){var u,d,h,f,g,v,m,p;(0,r.default)(1,arguments);var y=(0,s.getDefaultOptions)(),_=(0,a.default)((u=(d=(h=(f=c==null?void 0:c.weekStartsOn)!==null&&f!==void 0?f:c==null||(g=c.locale)===null||g===void 0||(v=g.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&h!==void 0?h:y.weekStartsOn)!==null&&d!==void 0?d:(m=y.locale)===null||m===void 0||(p=m.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&u!==void 0?u:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var x=(0,i.default)(l),w=x.getUTCDay(),T=(w<_?7:0)+w-_;return x.setUTCDate(x.getUTCDate()-T),x.setUTCHours(0,0,0,0),x}e.exports=t.default})(gs,gs.exports);var ps=gs.exports,ms={exports:{}},bs={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(_e),r=n($t),a=n(ps),s=n(hn),o=fn;function l(c,u){var d,h,f,g,v,m,p,y;(0,r.default)(1,arguments);var _=(0,i.default)(c),x=_.getUTCFullYear(),w=(0,o.getDefaultOptions)(),T=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(m=v.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&f!==void 0?f:w.firstWeekContainsDate)!==null&&h!==void 0?h:(p=w.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=new Date(0);M.setUTCFullYear(x+1,0,T),M.setUTCHours(0,0,0,0);var S=(0,a.default)(M,u),P=new Date(0);P.setUTCFullYear(x,0,T),P.setUTCHours(0,0,0,0);var D=(0,a.default)(P,u);return _.getTime()>=S.getTime()?x+1:_.getTime()>=D.getTime()?x:x-1}e.exports=t.default})(bs,bs.exports);var td=bs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(td),r=n($t),a=n(ps),s=n(hn),o=fn;function l(c,u){var d,h,f,g,v,m,p,y;(0,r.default)(1,arguments);var _=(0,o.getDefaultOptions)(),x=(0,s.default)((d=(h=(f=(g=u==null?void 0:u.firstWeekContainsDate)!==null&&g!==void 0?g:u==null||(v=u.locale)===null||v===void 0||(m=v.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&f!==void 0?f:_.firstWeekContainsDate)!==null&&h!==void 0?h:(p=_.locale)===null||p===void 0||(y=p.options)===null||y===void 0?void 0:y.firstWeekContainsDate)!==null&&d!==void 0?d:1),w=(0,i.default)(c,u),T=new Date(0);T.setUTCFullYear(w,0,x),T.setUTCHours(0,0,0,0);var M=(0,a.default)(T,u);return M}e.exports=t.default})(ms,ms.exports);var P_=ms.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var i=n(_e),r=n(ps),a=n(P_),s=n($t),o=6048e5;function l(c,u){(0,s.default)(1,arguments);var d=(0,i.default)(c),h=(0,r.default)(d,u).getTime()-(0,a.default)(d,u).getTime();return Math.round(h/o)+1}e.exports=t.default})(fs,fs.exports);var k_=fs.exports,vs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){for(var a=i<0?"-":"",s=Math.abs(i).toString();s.length<r;)s="0"+s;return a+s}e.exports=t.default})(vs,vs.exports);var ed=vs.exports,ys={exports:{}};(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(ed),r={y:function(o,l){var c=o.getUTCFullYear(),u=c>0?c:1-c;return(0,i.default)(l==="yy"?u%100:u,l.length)},M:function(o,l){var c=o.getUTCMonth();return l==="M"?String(c+1):(0,i.default)(c+1,2)},d:function(o,l){return(0,i.default)(o.getUTCDate(),l.length)},a:function(o,l){var c=o.getUTCHours()/12>=1?"pm":"am";switch(l){case"a":case"aa":return c.toUpperCase();case"aaa":return c;case"aaaaa":return c[0];case"aaaa":default:return c==="am"?"a.m.":"p.m."}},h:function(o,l){return(0,i.default)(o.getUTCHours()%12||12,l.length)},H:function(o,l){return(0,i.default)(o.getUTCHours(),l.length)},m:function(o,l){return(0,i.default)(o.getUTCMinutes(),l.length)},s:function(o,l){return(0,i.default)(o.getUTCSeconds(),l.length)},S:function(o,l){var c=l.length,u=o.getUTCMilliseconds(),d=Math.floor(u*Math.pow(10,c-3));return(0,i.default)(d,l.length)}},a=r;t.default=a,e.exports=t.default})(ys,ys.exports);var C_=ys.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(w_),r=n(M_),a=n(Qu),s=n(k_),o=n(td),l=n(ed),c=n(C_),u={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},d={G:function(p,y,_){var x=p.getUTCFullYear()>0?1:0;switch(y){case"G":case"GG":case"GGG":return _.era(x,{width:"abbreviated"});case"GGGGG":return _.era(x,{width:"narrow"});case"GGGG":default:return _.era(x,{width:"wide"})}},y:function(p,y,_){if(y==="yo"){var x=p.getUTCFullYear(),w=x>0?x:1-x;return _.ordinalNumber(w,{unit:"year"})}return c.default.y(p,y)},Y:function(p,y,_,x){var w=(0,o.default)(p,x),T=w>0?w:1-w;if(y==="YY"){var M=T%100;return(0,l.default)(M,2)}return y==="Yo"?_.ordinalNumber(T,{unit:"year"}):(0,l.default)(T,y.length)},R:function(p,y){var _=(0,a.default)(p);return(0,l.default)(_,y.length)},u:function(p,y){var _=p.getUTCFullYear();return(0,l.default)(_,y.length)},Q:function(p,y,_){var x=Math.ceil((p.getUTCMonth()+1)/3);switch(y){case"Q":return String(x);case"QQ":return(0,l.default)(x,2);case"Qo":return _.ordinalNumber(x,{unit:"quarter"});case"QQQ":return _.quarter(x,{width:"abbreviated",context:"formatting"});case"QQQQQ":return _.quarter(x,{width:"narrow",context:"formatting"});case"QQQQ":default:return _.quarter(x,{width:"wide",context:"formatting"})}},q:function(p,y,_){var x=Math.ceil((p.getUTCMonth()+1)/3);switch(y){case"q":return String(x);case"qq":return(0,l.default)(x,2);case"qo":return _.ordinalNumber(x,{unit:"quarter"});case"qqq":return _.quarter(x,{width:"abbreviated",context:"standalone"});case"qqqqq":return _.quarter(x,{width:"narrow",context:"standalone"});case"qqqq":default:return _.quarter(x,{width:"wide",context:"standalone"})}},M:function(p,y,_){var x=p.getUTCMonth();switch(y){case"M":case"MM":return c.default.M(p,y);case"Mo":return _.ordinalNumber(x+1,{unit:"month"});case"MMM":return _.month(x,{width:"abbreviated",context:"formatting"});case"MMMMM":return _.month(x,{width:"narrow",context:"formatting"});case"MMMM":default:return _.month(x,{width:"wide",context:"formatting"})}},L:function(p,y,_){var x=p.getUTCMonth();switch(y){case"L":return String(x+1);case"LL":return(0,l.default)(x+1,2);case"Lo":return _.ordinalNumber(x+1,{unit:"month"});case"LLL":return _.month(x,{width:"abbreviated",context:"standalone"});case"LLLLL":return _.month(x,{width:"narrow",context:"standalone"});case"LLLL":default:return _.month(x,{width:"wide",context:"standalone"})}},w:function(p,y,_,x){var w=(0,s.default)(p,x);return y==="wo"?_.ordinalNumber(w,{unit:"week"}):(0,l.default)(w,y.length)},I:function(p,y,_){var x=(0,r.default)(p);return y==="Io"?_.ordinalNumber(x,{unit:"week"}):(0,l.default)(x,y.length)},d:function(p,y,_){return y==="do"?_.ordinalNumber(p.getUTCDate(),{unit:"date"}):c.default.d(p,y)},D:function(p,y,_){var x=(0,i.default)(p);return y==="Do"?_.ordinalNumber(x,{unit:"dayOfYear"}):(0,l.default)(x,y.length)},E:function(p,y,_){var x=p.getUTCDay();switch(y){case"E":case"EE":case"EEE":return _.day(x,{width:"abbreviated",context:"formatting"});case"EEEEE":return _.day(x,{width:"narrow",context:"formatting"});case"EEEEEE":return _.day(x,{width:"short",context:"formatting"});case"EEEE":default:return _.day(x,{width:"wide",context:"formatting"})}},e:function(p,y,_,x){var w=p.getUTCDay(),T=(w-x.weekStartsOn+8)%7||7;switch(y){case"e":return String(T);case"ee":return(0,l.default)(T,2);case"eo":return _.ordinalNumber(T,{unit:"day"});case"eee":return _.day(w,{width:"abbreviated",context:"formatting"});case"eeeee":return _.day(w,{width:"narrow",context:"formatting"});case"eeeeee":return _.day(w,{width:"short",context:"formatting"});case"eeee":default:return _.day(w,{width:"wide",context:"formatting"})}},c:function(p,y,_,x){var w=p.getUTCDay(),T=(w-x.weekStartsOn+8)%7||7;switch(y){case"c":return String(T);case"cc":return(0,l.default)(T,y.length);case"co":return _.ordinalNumber(T,{unit:"day"});case"ccc":return _.day(w,{width:"abbreviated",context:"standalone"});case"ccccc":return _.day(w,{width:"narrow",context:"standalone"});case"cccccc":return _.day(w,{width:"short",context:"standalone"});case"cccc":default:return _.day(w,{width:"wide",context:"standalone"})}},i:function(p,y,_){var x=p.getUTCDay(),w=x===0?7:x;switch(y){case"i":return String(w);case"ii":return(0,l.default)(w,y.length);case"io":return _.ordinalNumber(w,{unit:"day"});case"iii":return _.day(x,{width:"abbreviated",context:"formatting"});case"iiiii":return _.day(x,{width:"narrow",context:"formatting"});case"iiiiii":return _.day(x,{width:"short",context:"formatting"});case"iiii":default:return _.day(x,{width:"wide",context:"formatting"})}},a:function(p,y,_){var x=p.getUTCHours(),w=x/12>=1?"pm":"am";switch(y){case"a":case"aa":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"aaa":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"aaaa":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},b:function(p,y,_){var x=p.getUTCHours(),w;switch(x===12?w=u.noon:x===0?w=u.midnight:w=x/12>=1?"pm":"am",y){case"b":case"bb":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"bbb":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"bbbb":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},B:function(p,y,_){var x=p.getUTCHours(),w;switch(x>=17?w=u.evening:x>=12?w=u.afternoon:x>=4?w=u.morning:w=u.night,y){case"B":case"BB":case"BBB":return _.dayPeriod(w,{width:"abbreviated",context:"formatting"});case"BBBBB":return _.dayPeriod(w,{width:"narrow",context:"formatting"});case"BBBB":default:return _.dayPeriod(w,{width:"wide",context:"formatting"})}},h:function(p,y,_){if(y==="ho"){var x=p.getUTCHours()%12;return x===0&&(x=12),_.ordinalNumber(x,{unit:"hour"})}return c.default.h(p,y)},H:function(p,y,_){return y==="Ho"?_.ordinalNumber(p.getUTCHours(),{unit:"hour"}):c.default.H(p,y)},K:function(p,y,_){var x=p.getUTCHours()%12;return y==="Ko"?_.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},k:function(p,y,_){var x=p.getUTCHours();return x===0&&(x=24),y==="ko"?_.ordinalNumber(x,{unit:"hour"}):(0,l.default)(x,y.length)},m:function(p,y,_){return y==="mo"?_.ordinalNumber(p.getUTCMinutes(),{unit:"minute"}):c.default.m(p,y)},s:function(p,y,_){return y==="so"?_.ordinalNumber(p.getUTCSeconds(),{unit:"second"}):c.default.s(p,y)},S:function(p,y){return c.default.S(p,y)},X:function(p,y,_,x){var w=x._originalDate||p,T=w.getTimezoneOffset();if(T===0)return"Z";switch(y){case"X":return f(T);case"XXXX":case"XX":return g(T);case"XXXXX":case"XXX":default:return g(T,":")}},x:function(p,y,_,x){var w=x._originalDate||p,T=w.getTimezoneOffset();switch(y){case"x":return f(T);case"xxxx":case"xx":return g(T);case"xxxxx":case"xxx":default:return g(T,":")}},O:function(p,y,_,x){var w=x._originalDate||p,T=w.getTimezoneOffset();switch(y){case"O":case"OO":case"OOO":return"GMT"+h(T,":");case"OOOO":default:return"GMT"+g(T,":")}},z:function(p,y,_,x){var w=x._originalDate||p,T=w.getTimezoneOffset();switch(y){case"z":case"zz":case"zzz":return"GMT"+h(T,":");case"zzzz":default:return"GMT"+g(T,":")}},t:function(p,y,_,x){var w=x._originalDate||p,T=Math.floor(w.getTime()/1e3);return(0,l.default)(T,y.length)},T:function(p,y,_,x){var w=x._originalDate||p,T=w.getTime();return(0,l.default)(T,y.length)}};function h(m,p){var y=m>0?"-":"+",_=Math.abs(m),x=Math.floor(_/60),w=_%60;if(w===0)return y+String(x);var T=p||"";return y+String(x)+T+(0,l.default)(w,2)}function f(m,p){if(m%60===0){var y=m>0?"-":"+";return y+(0,l.default)(Math.abs(m)/60,2)}return g(m,p)}function g(m,p){var y=p||"",_=m>0?"-":"+",x=Math.abs(m),w=(0,l.default)(Math.floor(x/60),2),T=(0,l.default)(x%60,2);return _+w+y+T}var v=d;t.default=v,e.exports=t.default})(ss,ss.exports);var E_=ss.exports,xs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(l,c){switch(l){case"P":return c.date({width:"short"});case"PP":return c.date({width:"medium"});case"PPP":return c.date({width:"long"});case"PPPP":default:return c.date({width:"full"})}},i=function(l,c){switch(l){case"p":return c.time({width:"short"});case"pp":return c.time({width:"medium"});case"ppp":return c.time({width:"long"});case"pppp":default:return c.time({width:"full"})}},r=function(l,c){var u=l.match(/(P+)(p+)?/)||[],d=u[1],h=u[2];if(!h)return n(l,c);var f;switch(d){case"P":f=c.dateTime({width:"short"});break;case"PP":f=c.dateTime({width:"medium"});break;case"PPP":f=c.dateTime({width:"long"});break;case"PPPP":default:f=c.dateTime({width:"full"});break}return f.replace("{{date}}",n(d,c)).replace("{{time}}",i(h,c))},a={p:i,P:r},s=a;t.default=s,e.exports=t.default})(xs,xs.exports);var O_=xs.exports,_s={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){var r=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()));return r.setUTCFullYear(i.getFullYear()),i.getTime()-r.getTime()}e.exports=t.default})(_s,_s.exports);var nd=_s.exports;const id=wi(nd);var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.isProtectedDayOfYearToken=L_,Ti.isProtectedWeekYearToken=I_,Ti.throwProtectedError=N_;var A_=["D","DD"],R_=["YY","YYYY"];function L_(e){return A_.indexOf(e)!==-1}function I_(e){return R_.indexOf(e)!==-1}function N_(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ws={exports:{}},Ts={exports:{}},Ms={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i=function(s,o,l){var c,u=n[s];return typeof u=="string"?c=u:o===1?c=u.one:c=u.other.replace("{{count}}",o.toString()),l!=null&&l.addSuffix?l.comparison&&l.comparison>0?"in "+c:c+" ago":c},r=i;t.default=r,e.exports=t.default})(Ms,Ms.exports);var B_=Ms.exports,Ss={exports:{}},Ds={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.width?String(r.width):i.defaultWidth,s=i.formats[a]||i.formats[i.defaultWidth];return s}}e.exports=t.default})(Ds,Ds.exports);var H_=Ds.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(H_),r={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},a={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},s={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o={date:(0,i.default)({formats:r,defaultWidth:"full"}),time:(0,i.default)({formats:a,defaultWidth:"full"}),dateTime:(0,i.default)({formats:s,defaultWidth:"full"})},l=o;t.default=l,e.exports=t.default})(Ss,Ss.exports);var F_=Ss.exports,Ps={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},i=function(s,o,l,c){return n[s]},r=i;t.default=r,e.exports=t.default})(Ps,Ps.exports);var U_=Ps.exports,ks={exports:{}},Cs={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(r,a){var s=a!=null&&a.context?String(a.context):"standalone",o;if(s==="formatting"&&i.formattingValues){var l=i.defaultFormattingWidth||i.defaultWidth,c=a!=null&&a.width?String(a.width):l;o=i.formattingValues[c]||i.formattingValues[l]}else{var u=i.defaultWidth,d=a!=null&&a.width?String(a.width):i.defaultWidth;o=i.values[d]||i.values[u]}var h=i.argumentCallback?i.argumentCallback(r):r;return o[h]}}e.exports=t.default})(Cs,Cs.exports);var W_=Cs.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(W_),r={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},s={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},o={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},c={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},u=function(g,v){var m=Number(g),p=m%100;if(p>20||p<10)switch(p%10){case 1:return m+"st";case 2:return m+"nd";case 3:return m+"rd"}return m+"th"},d={ordinalNumber:u,era:(0,i.default)({values:r,defaultWidth:"wide"}),quarter:(0,i.default)({values:a,defaultWidth:"wide",argumentCallback:function(g){return g-1}}),month:(0,i.default)({values:s,defaultWidth:"wide"}),day:(0,i.default)({values:o,defaultWidth:"wide"}),dayPeriod:(0,i.default)({values:l,defaultWidth:"wide",formattingValues:c,defaultFormattingWidth:"wide"})},h=d;t.default=h,e.exports=t.default})(ks,ks.exports);var Y_=ks.exports,Es={exports:{}},Os={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(a){return function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.width,c=l&&a.matchPatterns[l]||a.matchPatterns[a.defaultMatchWidth],u=s.match(c);if(!u)return null;var d=u[0],h=l&&a.parsePatterns[l]||a.parsePatterns[a.defaultParseWidth],f=Array.isArray(h)?r(h,function(m){return m.test(d)}):i(h,function(m){return m.test(d)}),g;g=a.valueCallback?a.valueCallback(f):f,g=o.valueCallback?o.valueCallback(g):g;var v=s.slice(d.length);return{value:g,rest:v}}}function i(a,s){for(var o in a)if(a.hasOwnProperty(o)&&s(a[o]))return o}function r(a,s){for(var o=0;o<a.length;o++)if(s(a[o]))return o}e.exports=t.default})(Os,Os.exports);var z_=Os.exports,As={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i){return function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=r.match(i.matchPattern);if(!s)return null;var o=s[0],l=r.match(i.parsePattern);if(!l)return null;var c=i.valueCallback?i.valueCallback(l[0]):l[0];c=a.valueCallback?a.valueCallback(c):c;var u=r.slice(o.length);return{value:c,rest:u}}}e.exports=t.default})(As,As.exports);var j_=As.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(z_),r=n(j_),a=/^(\d+)(th|st|nd|rd)?/i,s=/\d+/i,o={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},l={any:[/^b/i,/^(a|c)/i]},c={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},u={any:[/1/i,/2/i,/3/i,/4/i]},d={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},h={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},g={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},v={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},m={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},p={ordinalNumber:(0,r.default)({matchPattern:a,parsePattern:s,valueCallback:function(x){return parseInt(x,10)}}),era:(0,i.default)({matchPatterns:o,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),quarter:(0,i.default)({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:function(x){return x+1}}),month:(0,i.default)({matchPatterns:d,defaultMatchWidth:"wide",parsePatterns:h,defaultParseWidth:"any"}),day:(0,i.default)({matchPatterns:f,defaultMatchWidth:"wide",parsePatterns:g,defaultParseWidth:"any"}),dayPeriod:(0,i.default)({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:m,defaultParseWidth:"any"})},y=p;t.default=y,e.exports=t.default})(Es,Es.exports);var $_=Es.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(B_),r=n(F_),a=n(U_),s=n(Y_),o=n($_),l={code:"en-US",formatDistance:i.default,formatLong:r.default,formatRelative:a.default,localize:s.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}},c=l;t.default=c,e.exports=t.default})(Ts,Ts.exports);var V_=Ts.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(V_),r=i.default;t.default=r,e.exports=t.default})(ws,ws.exports);var q_=ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=_;var i=n(v_),r=n(__),a=n(_e),s=n(E_),o=n(O_),l=n(nd),c=Ti,u=n(hn),d=n($t),h=fn,f=n(q_),g=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,v=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,p=/''/g,y=/[a-zA-Z]/;function _(w,T,M){var S,P,D,C,L,W,st,N,Y,Q,At,bt,Jt,qt,Nt,te,ut,ee;(0,d.default)(2,arguments);var oe=String(T),Rt=(0,h.getDefaultOptions)(),ft=(S=(P=M==null?void 0:M.locale)!==null&&P!==void 0?P:Rt.locale)!==null&&S!==void 0?S:f.default,nt=(0,u.default)((D=(C=(L=(W=M==null?void 0:M.firstWeekContainsDate)!==null&&W!==void 0?W:M==null||(st=M.locale)===null||st===void 0||(N=st.options)===null||N===void 0?void 0:N.firstWeekContainsDate)!==null&&L!==void 0?L:Rt.firstWeekContainsDate)!==null&&C!==void 0?C:(Y=Rt.locale)===null||Y===void 0||(Q=Y.options)===null||Q===void 0?void 0:Q.firstWeekContainsDate)!==null&&D!==void 0?D:1);if(!(nt>=1&&nt<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Bt=(0,u.default)((At=(bt=(Jt=(qt=M==null?void 0:M.weekStartsOn)!==null&&qt!==void 0?qt:M==null||(Nt=M.locale)===null||Nt===void 0||(te=Nt.options)===null||te===void 0?void 0:te.weekStartsOn)!==null&&Jt!==void 0?Jt:Rt.weekStartsOn)!==null&&bt!==void 0?bt:(ut=Rt.locale)===null||ut===void 0||(ee=ut.options)===null||ee===void 0?void 0:ee.weekStartsOn)!==null&&At!==void 0?At:0);if(!(Bt>=0&&Bt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!ft.localize)throw new RangeError("locale must contain localize property");if(!ft.formatLong)throw new RangeError("locale must contain formatLong property");var A=(0,a.default)(w);if(!(0,i.default)(A))throw new RangeError("Invalid time value");var H=(0,l.default)(A),j=(0,r.default)(A,H),it={firstWeekContainsDate:nt,weekStartsOn:Bt,locale:ft,_originalDate:A},at=oe.match(v).map(function(V){var Et=V[0];if(Et==="p"||Et==="P"){var Lt=o.default[Et];return Lt(V,ft.formatLong)}return V}).join("").match(g).map(function(V){if(V==="''")return"'";var Et=V[0];if(Et==="'")return x(V);var Lt=s.default[Et];if(Lt)return!(M!=null&&M.useAdditionalWeekYearTokens)&&(0,c.isProtectedWeekYearToken)(V)&&(0,c.throwProtectedError)(V,T,String(w)),!(M!=null&&M.useAdditionalDayOfYearTokens)&&(0,c.isProtectedDayOfYearToken)(V)&&(0,c.throwProtectedError)(V,T,String(w)),Lt(j,V,ft.localize,it);if(Et.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Et+"`");return V}).join("");return at}function x(w){var T=w.match(m);return T?T[1].replace(p,"'"):w}e.exports=t.default})(Qa,Qa.exports);var G_=Qa.exports;const X_=wi(G_);function rd(e,t,n){var i=Q_(e,n.timeZone,n.locale);return i.formatToParts?K_(i,t):Z_(i,t)}function K_(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if(n[i].type==="timeZoneName")return n[i].value}function Z_(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}function Q_(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}function J_(e,t){var n=iw(t);return n.formatToParts?ew(n,e):nw(n,e)}var tw={year:0,month:1,day:2,hour:3,minute:4,second:5};function ew(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var a=tw[n[r].type];a>=0&&(i[a]=parseInt(n[r].value,10))}return i}catch(s){if(s instanceof RangeError)return[NaN];throw s}}function nw(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}var Rs={};function iw(e){if(!Rs[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="06/25/2014 00:00:00";Rs[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Rs[e]}function ad(e,t,n,i,r,a,s){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(i,r,a,s),o}var sd=36e5,rw=6e4,Ls={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Is(e,t,n){var i,r;if(!e||(i=Ls.timezoneZ.exec(e),i))return 0;var a;if(i=Ls.timezoneHH.exec(e),i)return a=parseInt(i[1],10),od(a)?-(a*sd):NaN;if(i=Ls.timezoneHHMM.exec(e),i){a=parseInt(i[1],10);var s=parseInt(i[2],10);return od(a,s)?(r=Math.abs(a)*sd+s*rw,a>0?-r:r):NaN}if(ow(e)){t=new Date(t||Date.now());var o=n?t:aw(t),l=Ns(o,e),c=n?l:sw(t,l,e);return-c}return NaN}function aw(e){return ad(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Ns(e,t){var n=J_(e,t),i=ad(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),a=r%1e3;return r-=a>=0?a:1e3+a,i-r}function sw(e,t,n){var i=e.getTime(),r=i-t,a=Ns(new Date(r),n);if(t===a)return t;r-=a-t;var s=Ns(new Date(r),n);return a===s?a:Math.max(a,s)}function od(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var ld={};function ow(e){if(ld[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),ld[e]=!0,!0}catch{return!1}}var lw=60*1e3,cw={X:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);if(r===0)return"Z";switch(t){case"X":return cd(r);case"XXXX":case"XX":return En(r);case"XXXXX":case"XXX":default:return En(r,":")}},x:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"x":return cd(r);case"xxxx":case"xx":return En(r);case"xxxxx":case"xxx":default:return En(r,":")}},O:function(e,t,n,i){var r=Bs(i.timeZone,i._originalDate||e);switch(t){case"O":case"OO":case"OOO":return"GMT"+uw(r,":");case"OOOO":default:return"GMT"+En(r,":")}},z:function(e,t,n,i){var r=i._originalDate||e;switch(t){case"z":case"zz":case"zzz":return rd("short",r,i);case"zzzz":default:return rd("long",r,i)}}};function Bs(e,t){var n=e?Is(e,t,!0)/lw:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Sr(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function En(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),a=Sr(Math.floor(r/60),2),s=Sr(Math.floor(r%60),2);return i+a+n+s}function cd(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Sr(Math.abs(e)/60,2)}return En(e,t)}function uw(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),a=i%60;if(a===0)return n+String(r);var s=t||"";return n+String(r)+s+Sr(a,2)}const dw=cw;var hw=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Hs=36e5,ud=6e4,fw=2,Vt={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:hw};function dd(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},i=n.additionalDigits==null?fw:y_(n.additionalDigits);if(i!==2&&i!==1&&i!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var r=gw(e),a=pw(r.date,i),s=a.year,o=a.restDateString,l=mw(o,s);if(isNaN(l))return new Date(NaN);if(l){var c=l.getTime(),u=0,d;if(r.time&&(u=bw(r.time),isNaN(u)))return new Date(NaN);if(r.timeZone||n.timeZone){if(d=Is(r.timeZone||n.timeZone,new Date(c+u)),isNaN(d))return new Date(NaN)}else d=id(new Date(c+u)),d=id(new Date(c+u+d));return new Date(c+u+d)}else return new Date(NaN)}function gw(e){var t={},n=Vt.dateTimePattern.exec(e),i;if(n?(t.date=n[1],i=n[3]):(n=Vt.datePattern.exec(e),n?(t.date=n[1],i=n[2]):(t.date=null,i=e)),i){var r=Vt.timeZone.exec(i);r?(t.time=i.replace(r[1],""),t.timeZone=r[1].trim()):t.time=i}return t}function pw(e,t){var n=Vt.YYY[t],i=Vt.YYYYY[t],r;if(r=Vt.YYYY.exec(e)||i.exec(e),r){var a=r[1];return{year:parseInt(a,10),restDateString:e.slice(a.length)}}if(r=Vt.YY.exec(e)||n.exec(e),r){var s=r[1];return{year:parseInt(s,10)*100,restDateString:e.slice(s.length)}}return{year:null}}function mw(e,t){if(t===null)return null;var n,i,r,a;if(e.length===0)return i=new Date(0),i.setUTCFullYear(t),i;if(n=Vt.MM.exec(e),n)return i=new Date(0),r=parseInt(n[1],10)-1,gd(t,r)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Vt.DDD.exec(e),n){i=new Date(0);var s=parseInt(n[1],10);return xw(t,s)?(i.setUTCFullYear(t,0,s),i):new Date(NaN)}if(n=Vt.MMDD.exec(e),n){i=new Date(0),r=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return gd(t,r,o)?(i.setUTCFullYear(t,r,o),i):new Date(NaN)}if(n=Vt.Www.exec(e),n)return a=parseInt(n[1],10)-1,pd(t,a)?hd(t,a):new Date(NaN);if(n=Vt.WwwD.exec(e),n){a=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return pd(t,a,l)?hd(t,a,l):new Date(NaN)}return null}function bw(e){var t,n,i;if(t=Vt.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),Fs(n)?n%24*Hs:NaN;if(t=Vt.HHMM.exec(e),t)return n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")),Fs(n,i)?n%24*Hs+i*ud:NaN;if(t=Vt.HHMMSS.exec(e),t){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Fs(n,i,r)?n%24*Hs+i*ud+r*1e3:NaN}return null}function hd(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,a=t*7+n+1-r;return i.setUTCDate(i.getUTCDate()+a),i}var vw=[31,28,31,30,31,30,31,31,30,31,30,31],yw=[31,29,31,30,31,30,31,31,30,31,30,31];function fd(e){return e%400===0||e%4===0&&e%100!==0}function gd(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var i=fd(e);if(i&&n>yw[t]||!i&&n>vw[t])return!1}return!0}function xw(e,t){if(t<1)return!1;var n=fd(e);return!(n&&t>366||!n&&t>365)}function pd(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function Fs(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}var _w=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ww(e,t,n){var i=String(t),r=n||{},a=i.match(_w);if(a){var s=dd(e,r);i=a.reduce(function(o,l){if(l[0]==="'")return o;var c=o.indexOf(l),u=o[c-1]==="'",d=o.replace(l,"'"+dw[l[0]](s,l,null,r)+"'");return u?d.substring(0,c-1)+d.substring(c+1):d},i)}return X_(e,i,r)}var Us={exports:{}},Ws={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(i,r){if(i==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i}e.exports=t.default})(Ws,Ws.exports);var Tw=Ws.exports;(function(e,t){var n=Tt.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(Tw);function r(a){return(0,i.default)({},a)}e.exports=t.default})(Us,Us.exports);var Mw=Us.exports;const Sw=wi(Mw);function Dw(e,t,n){var i=dd(e,n),r=Is(t,i,!0),a=new Date(i.getTime()-r),s=new Date(0);return s.setFullYear(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()),s.setHours(a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds()),s}function Pw(e,t,n,i){var r=Sw(i);return r.timeZone=t,ww(Dw(e,t),n,r)}const kw=2,Ys=new Intl.NumberFormat(((fh=document==null?void 0:document.documentElement)==null?void 0:fh.lang)||"en-US");function Cw(e,t={}){if(!e)return e;const n=t.tz||Intl.DateTimeFormat().resolvedOptions().timeZone;try{let i="MMM dd, YYY hh:mm a";t.short&&(i="MMM dd, YYY"),t.includeTZ&&(i+=" (z)");const r=new Date(e);return Pw(r,n,i)}catch{return console.error("Invalid value passed to formatTime",e),"(invalid date)"}}const zs=10,Ae=["#a86cd5","#6a86d2","#00bbf9","#00c4b0","#ffdf15"],Mi=(e,t)=>(t||Ae)[e%Ae.length],Si=(e,t)=>{e[0]==="#"&&(e=e.slice(1));let n=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16);n=n-t,i=i-t,r=r-t,n>255?n=255:n<0&&(n=0),i>255?i=255:i<0&&(i=0),r>255?r=255:r<0&&(r=0);const a=n.toString(16).length===1?"0"+n.toString(16):n.toString(16),s=i.toString(16).length===1?"0"+i.toString(16):i.toString(16),o=r.toString(16).length===1?"0"+r.toString(16):r.toString(16);return`#${a}${s}${o}`},md="#6f7787",Ew={lineTension:.4,borderWidth:2,pointBorderWidth:1.2,borderJoinStyle:"round",fill:!0},js=new Map,$s=(e,t)=>t==="bytes"?Ha(e):t==="count/minute"?e.toFixed(2):Ys.format(e),bd=e=>{const n=document.createElement("canvas").getContext("2d"),i=pt({});return n.font=i.string,n.measureText(e).width},Ow=()=>{const e="label_height";if(!js.has(e)){const t=pt({});js.set(e,t.lineHeight)}return js.get(e)},Aw=e=>e.datasets.reduce((t,n)=>t+n.data.reduce((i,r)=>isNaN(r)?i:i+r,0),0),vd=(e,t)=>t.datasets.reduce((n,i,r)=>e.isDatasetVisible(r)?n+i.data.reduce((a,s)=>isNaN(s)?a:a+s,0):n,0),yd=(e,t)=>t===0?" (0.0%)":` (${(e/t*100).toFixed(1)}%)`;function Rw(e){const t={enabled:!1,position:"barChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return hr.positioners.barChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},xa.modes.customInteractionMode=function(i,r){const a=We(r,i),s=[];return xa.evaluateInteractionItems(i,i.options.indexAxis||"x",a,(o,l,c)=>{i.options.indexAxis==="y"&&o.inYRange(a.y,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c}),i.options.indexAxis==="x"&&o.inXRange(a.x,!0)&&i.data.datasets[l].data[c]&&s.push({element:o,datasetIndex:l,index:c})}),s},b.computed(()=>{var i,r,a,s,o,l,c,u;return{indexAxis:e.indexAxis,scales:{x:{border:{display:!1},stacked:e.stacked,grid:{display:!1,drawBorder:!1},ticks:{maxRotation:90,autoSkip:!1,callback:function(d,h){const f=this;if(f.chart.options.indexAxis===f.axis){d=f.getLabelForValue(h);const g=10;return d&&d.length>g?d.slice(0,g)+"...":d}return f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="y"?!U((i=e.metricAxesTitle)==null?void 0:i.value):!U((r=e.dimensionAxesTitle)==null?void 0:r.value),text:e.indexAxis==="y"?(a=e.metricAxesTitle)==null?void 0:a.value:(s=e.dimensionAxesTitle)==null?void 0:s.value,padding:{top:20},font:{weight:"bold"}}},y:{border:{display:!1},stacked:e.stacked.value,beginAtZero:!0,grid:{display:!1,drawBorder:!1},ticks:{callback:function(d,h){const f=this;return f.chart.options.indexAxis===f.axis?(d=f.getLabelForValue(h),d&&d.length>zs?d.slice(0,zs)+"...":d):f.getLabelForValue(Number(d))}},title:{display:e.indexAxis==="x"?!U((o=e.metricAxesTitle)==null?void 0:o.value):!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:e.indexAxis==="x"?(c=e.metricAxesTitle)==null?void 0:c.value:(u=e.dimensionAxesTitle)==null?void 0:u.value,padding:{bottom:20},font:{weight:"bold"}}}},plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:d=>{Ka(e.tooltipState,d)}}},interaction:{mode:"customInteractionMode",intersect:!0},maxBarThickness:60,maintainAspectRatio:!1}})}Kt.register(...Yb);const Lw=(e,t)=>{const n=t.datasets.map(r=>r.label),i=e.datasets.map(r=>r.label);return e.datasets.length===t.datasets.length&&n.every((r,a)=>r===i[a])};function Iw(e,t,n,i,r){const a=b.shallowRef(null),s=(o,l)=>{if(t.value)return new Kt(t.value,{type:e,data:o,plugins:i,options:l})};return b.onMounted(()=>{a.value=s(n.value,r.value)}),b.onUnmounted(()=>{U(a.value)||a.value.destroy()}),b.watch(n,(o,l)=>{if(Lw(l,o)&&!U(a.value)){for(const[c,u]of o.datasets.entries())Object.assign(a.value.data.datasets[c],u);a.value.data.labels=o.labels,a.value.update()}else U(a.value)||a.value.destroy(),a.value=s(o,r.value)}),b.watch(t,()=>{U(a.value)||a.value.destroy(),a.value=s(n.value,r.value)}),b.watch(r,(o,l)=>{(o.indexAxis!==l.indexAxis||JSON.stringify(o.scales.x.title)!==JSON.stringify(l.scales.x.title)||JSON.stringify(o.scales.y.title)!==JSON.stringify(l.scales.y.title))&&(U(a.value)||a.value.destroy(),a.value=s(n.value,o))}),a}var xd={exports:{}};(function(e){(function(){function t(c,u){if(u.separator===!1||c<1e3)return c.toString();var d=typeof u.separator=="string"?u.separator:",",h=[],f=Math.round(c).toString().split("");return f.reverse().forEach(function(g,v){v&&v%3===0&&h.push(d),h.push(g)}),h.reverse().join("")}function n(c,u,d){var h=c/u,f=d.round?"round":"floor";return d.decimal===!1?(c=Math[f](h),c.toString()):(d.precision?c=h:c=h<10?Math[f](h*10)/10:Math[f](h),c=c.toString(),typeof d.decimal=="string"&&(c=c.replace(".",d.decimal)),c)}var i=1e3,r=1e4,a=1e6,s=1e9,o=1e12;function l(c,u){var d;u=u||{};var h=c<0;h&&(c=Math.abs(c)),u.precision&&(c=parseFloat(c.toPrecision(u.precision)));var f=u.min10k?r:i;return c<f||u.precision&&u.precision>Math.log10(c)?d=t(n(c,1,u),u):c<a?d=n(c,i,u)+"k":c<s?d=n(c,a,u)+"m":c<o?d=t(n(c,s,u),u)+"b":d=t(n(c,o,u),u)+"t",h&&(d="-"+d),u.capital&&(d=d.toUpperCase()),u.prefix&&(d=u.prefix+d),u.suffix&&(d=d+u.suffix),d}l.addCommas=t,e.exports=l})()})(xd);var Nw=xd.exports;const Vs=wi(Nw);function Bw(e,t,n){const{i18n:i}=Ut.useI18n();return{legendValues:b.computed(()=>e.value.datasets.reduce((a,s)=>{const o=s.total?s.total:s.data.reduce((c,u)=>c+(typeof u=="number"?Number(u)||0:Number(u.y)||0),0);let l;if(n.value==="bytes")l=isNaN(o)?"0":Ha(o);else{l=`${Vs(o,{capital:!0})} ${n.value}`;const c=n.value&&i&&i.te(`chartUnits.${n.value}`)&&i.t(`chartUnits.${n.value}`)||n.value;l=i&&i.t("legend.datapointValueDisplay",{value:Vs(o,{capital:!0}),unit:c})||`${Vs(o,{capital:!0})} ${n.value}`}return{...a,[s.label]:{raw:o,formatted:l}}},{}))}}function Hw(e){const t={enabled:!1,position:"doughnutChartTooltipPosition",callbacks:{label:i=>({label:i.dataset.label,value:i.label})}};return hr.positioners.doughnutChartTooltipPosition=function(i,r){if(!i.length)return!1;const a=this.chart.canvas.getBoundingClientRect(),s=e.tooltipState.width||this.width,o=a.width/2,l=Za(r,s,o),c=r.y,u=r.x<o?"left":"center";return{x:l-e.tooltipState.offset,y:c,xAlign:u}},{options:b.computed(()=>({responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},tooltip:{...t,external:i=>{Ka(e.tooltipState,i)}}}}))}}function Fw(e){const t=b.computed(()=>{var l,c;return{type:"timeseries",display:!0,grid:{display:!0,drawOnChartArea:!1,drawTicks:!0,drawBorder:!1},ticks:{padding:10,autoSkipPadding:100,source:"auto",maxRotation:0},title:{display:!U((l=e.dimensionAxesTitle)==null?void 0:l.value),text:(c=e.dimensionAxesTitle)==null?void 0:c.value,padding:{top:20},font:{weight:"bold"}}}}),n=b.computed(()=>{var l,c;return{title:{display:!U((l=e.metricAxesTitle)==null?void 0:l.value),text:(c=e.metricAxesTitle)==null?void 0:c.value,padding:{bottom:20},font:{weight:"bold"}},ticks:{maxTicksLimit:5},grid:{drawBorder:!1},id:"main-y-axis",beginAtZero:!0}}),i={enabled:!1,position:"lineChartTooltipPosition"};hr.positioners.lineChartTooltipPosition=function(l,c){if(!l.length||e.tooltipState.locked)return!1;const u=this.chart.canvas.getBoundingClientRect(),d=e.tooltipState.width||this.width,h=e.tooltipState.height||this.height,f=u.width/2,g=u.height/2,v=Za(c,d,f);let m=m_(c,h,g);const p=c.y<g?"top":"bottom",y=c.x<f?"left":"center";return h>u.height&&(m=0),{x:v,y:m,xAlign:y,yAlign:p}};const r=b.computed(()=>{switch(e.granularity.value){case z.MINUTELY:return"minute";case z.HOURLY:return"hour";case z.DAILY:return"day";default:return"day"}}),a=b.computed(()=>e.timeRangeMs?Ox(Number(e.timeRangeMs.value))>=24?"yyyy-MM-dd h:mm":"h:mm":qx(Number(e.timeRangeSec.value))>=24?"yyyy-MM-dd h:mm":"h:mm"),s=b.computed(()=>[z.DAILY,z.WEEKLY].includes(e.granularity.value)?"yyyy-MM-dd":"yyyy-MM-dd h:mm");return{options:b.computed(()=>({hover:{mode:"index",intersect:!1},elements:{point:{radius:0,hitRadius:4,hoverRadius:4}},animation:{duration:250,easing:"linear"},scales:{x:{border:{display:!1},...t.value,stacked:e.stacked.value,time:{tooltipFormat:"h:mm:ss a",unit:r.value,displayFormats:{minute:"h:mm:ss a",hour:a.value,day:s.value}}},y:{border:{display:!1},...n.value,stacked:e.stacked.value}},responsive:!0,maintainAspectRatio:!1,plugins:{htmlLegend:{containerID:e.legendID},legend:{display:!1},streaming:!1,tooltip:{...i,external:l=>{Ka(e.tooltipState,l)}}},interaction:{mode:"index",intersect:!1}}))}}function Uw(e,t){const{i18n:n}=Ut.useI18n();return b.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o=a&&Object.keys(a),l=a&&o&&(o.length===1?o[0]!=="Organization":o.length>0);if(!r.length||!s)return{datasets:[],labels:[]};const c=l&&o||s,u=c[0],d=c.length>1?c[1]:c[0],h=s[0],f=Object.fromEntries(r.map(p=>{const y=l?`${p.event[u]},${p.event[d]}`:`${u},${d}`,_=p.event[h];return[y,_]})),g=l&&a[u]||s,v=l&&a[d]||s;return!g||!v?{labels:[],datasets:[]}:{labels:l?a[u].map(p=>n&&n.te(`chartLabels.${p}`)&&n.t(`chartLabels.${p}`)||p):s.map(p=>n&&n.te(`chartLabels.${p}`)&&n.t(`chartLabels.${p}`)||p),datasets:v&&Array.from(v).flatMap((p,y)=>{if(!p)return[];let{colorPalette:_}=e;U(_)&&(_=Ae);const x={},w=Array.isArray(_)?Mi(y,_):_[p]||Mi(y);return x[p]=w,{label:n&&n.te(`chartLabels.${p}`)&&n.t(`chartLabels.${p}`)||p,backgroundColor:w,data:g.map(T=>f[`${T},${p}`]||0)}})}}}catch(r){return console.error(r),{datasets:[],labels:[]}}return{labels:[],datasets:[]}})}const Ww=(e,t,n=1)=>Array(Math.ceil((t-e)/n)).fill(e).map((i,r)=>i+r*n),Yw=e=>{if(typeof e=="string"){const t=+e;if(t)return t;try{return $u(e).getTime()}catch(n){if(n instanceof RangeError)return 0;throw n}}return e},zw=(e,t,n,i,r)=>{const s=Math.max(t-6e4,Math.max(...(r||[]).map(c=>new Date(c.timestamp).valueOf()))),o=Math.floor((e-i)/n)*n+i,l=Math.floor((s-i)/n)*n+i+n;return Ww(o,l,n)};function jw(e,t){const{i18n:n}=Ut.useI18n();return b.computed(()=>{try{if(t.value&&"meta"in t.value&&"records"in t.value){const r=t.value.records,{dimensions:a,metricNames:s}=t.value.meta,o="startMs"in t.value.meta?t.value.meta.startMs:t.value.meta.start*1e3,l="endMs"in t.value.meta?t.value.meta.endMs:t.value.meta.end*1e3;if(!s)return console.error("Cannot build chart data from this explore result. Missing metric names."),{datasets:[]};const c=a&&Object.keys(a)||s,u=s&&s[0],d=c&&c[0]||u,h=a&&a[d]||s,f=t.value.meta.granularity;if(typeof f!="number"||isNaN(f)||!isFinite(f)||f===0)return console.error("Invalid step value:",f),{datasets:[]};if(!r.length)return{datasets:[]};const g=Yw(o),v=zw(o,l,f,g,r),m=new Set,p=r!=null&&r.length?r.reduce((w,T)=>{const M=new Date(T.timestamp).valueOf(),S=T.event;return m.add(u),M in w||(w[M]={}),u in w[M]||(w[M][u]={}),h.forEach(P=>{S[d]===P||d===P?w[M][u][P]=Math.round(Number(S[u])*1e3)/1e3:c.length||(w[M][u][P]=Math.round(Number(S[P])*1e3)/1e3)}),w},{}):{},y=[...m].reduce((w,T)=>(h.forEach(M=>w.push([T,M])),w),[]),_={},x=[...y].map(([w,T],M)=>{const S=v.map(W=>W in p&&w in p[W]?{x:W,y:p[W][w][T]||0}:{x:W,y:0});let{colorPalette:P,fill:D}=e;U(P)&&(P=Ae);const C=Array.isArray(P)?Mi(M,P):P[T]||Mi(M),L=Si(C,50);return _[T]=C,{rawDimension:T,rawMetric:w,label:n&&n.te(`chartLabels.${T}`)&&n.t(`chartLabels.${T}`)||T,borderColor:L,backgroundColor:C,data:S,total:S.reduce((W,{y:st})=>W+Number(st),0),...Ew,fill:D}});return x.sort((w,T)=>Number(w.total)<Number(T.total)?-1:1),{datasets:x,colorMap:_}}}catch(r){return console.error(r),{labels:[],datasets:[]}}return{labels:[],datasets:[]}})}const Ut={useBarChartOptions:Rw,useChartJSCommon:Iw,useChartLegendValues:Bw,useExploreResultToDatasets:Uw,useExploreResultToTimeDataset:jw,useDoughnutChartOptions:Hw,useLinechartOptions:Fw,useI18n:Uf,useReportChartDataForSynthetics:(e,t)=>{b.watch([e,t],(n,i,r)=>{const[a,s]=n;!s||!window||(window._AnalyticsChartDataInternal||(window._AnalyticsChartDataInternal=new Map),window._AnalyticsChartDataInternal.set(s,a),r(()=>{var o;(o=window._AnalyticsChartDataInternal)==null||o.delete(s)}))},{immediate:!0})}};/*!
|
|
41
41
|
* chartjs-plugin-annotation v2.2.1
|
|
42
42
|
* https://www.chartjs.org/chartjs-plugin-annotation/index
|
|
43
43
|
* (c) 2023 chartjs-plugin-annotation Contributors
|
|
44
44
|
* Released under the MIT License
|
|
45
|
-
*/const vd={modes:{point(e,t){return Sr(e,t,{intersect:!0})},nearest(e,t,n){return Vw(e,t,n)},x(e,t,n){return Sr(e,t,{intersect:n.intersect,axis:"x"})},y(e,t,n){return Sr(e,t,{intersect:n.intersect,axis:"y"})}}};function Vs(e,t,n){return(vd.modes[n.mode]||vd.modes.nearest)(e,t,n)}function zw(e,t,n){return n!=="x"&&n!=="y"?e.inRange(t.x,t.y,"x",!0)||e.inRange(t.x,t.y,"y",!0):e.inRange(t.x,t.y,n,!0)}function jw(e,t,n){return n==="x"?{x:e.x,y:t.y}:n==="y"?{x:t.x,y:e.y}:t}function Sr(e,t,n){return e.visibleElements.filter(i=>n.intersect?i.inRange(t.x,t.y):zw(i,t,n.axis))}function Vw(e,t,n){let i=Number.POSITIVE_INFINITY;return Sr(e,t,n).reduce((r,a)=>{const s=a.getCenterPoint(),o=jw(t,s,n.axis),l=yn(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const $w=(e,t)=>t>e||e.length>t.length&&e.slice(0,t.length)===t,fn=.001,Dr=(e,t,n)=>Math.min(n,Math.max(t,e));function qw(e,t,n){for(const i of Object.keys(e))e[i]=Dr(e[i],t,n);return e}function Gw(e,t,n,i){if(!e||!t||n<=0)return!1;const r=i/2;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n+r,2)}function yd(e,{x:t,y:n,x2:i,y2:r},a,s){const o=s/2,l=e.x>=t-o-fn&&e.x<=i+o+fn,c=e.y>=n-o-fn&&e.y<=r+o+fn;return a==="x"?l:(a==="y"||l)&&c}function kn(e,t){const{centerX:n,centerY:i}=e.getProps(["centerX","centerY"],t);return{x:n,y:i}}function Xw(e,t,n,i=!0){const r=n.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if($w(o,s)){if(i)throw new Error(`${e} v${n} is not supported. v${t} or newer is required.`);return!1}}return!0}const xd=e=>typeof e=="string"&&e.endsWith("%"),_d=e=>parseFloat(e)/100,wd=e=>Dr(_d(e),0,1);function $s(e,t){return t==="start"?0:t==="end"?e:xd(t)?wd(t)*e:e/2}function Ve(e,t,n=!0){return typeof t=="number"?t:xd(t)?(n?wd(t):_d(t))*e:e}function Kw(e,t){const{x:n,width:i}=e,r=t.textAlign;return r==="center"?n+i/2:r==="end"||r==="right"?n+i:n}function qs(e,t="center"){return j(e)?{x:F(e.x,t),y:F(e.y,t)}:(e=F(e,t),{x:e,y:e})}function Td(e){return e&&(qt(e.xValue)||qt(e.yValue))}function Si(e,t,n,i=!1){const r=n.init;if(r){if(r===!0)return Sd(t,i)}else return;return Zw(t,i,st(r,[{chart:e,properties:t,options:n}]))}function Md(e,t,n){let i=!1;return t.forEach(r=>{Gt(e[r])?(i=!0,n[r]=e[r]):qt(n[r])&&delete n[r]}),i}function Sd({centerX:e,centerY:t},n){return n?{centerX:e,centerY:t,radius:0,width:0,height:0}:{x:e,y:t,x2:e,y2:t,width:0,height:0}}function Zw(e,t,n){if(n===!0)return Sd(e,t);if(j(n))return n}const Gs=new Map,Qw=e=>isNaN(e)||e<=0,Jw=e=>e.reduce(function(t,n){return t+=n.string,t},"");function Pr(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Xs(e,{x:t,y:n},i){i&&(e.translate(t,n),e.rotate(kt(i)),e.translate(-t,-n))}function $e(e,t){if(t&&t.borderWidth)return e.lineCap=t.borderCapStyle,e.setLineDash(t.borderDash),e.lineDashOffset=t.borderDashOffset,e.lineJoin=t.borderJoinStyle,e.lineWidth=t.borderWidth,e.strokeStyle=t.borderColor,!0}function On(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Ks(e,t){const n=t.content;if(Pr(n))return{width:Ve(n.width,t.width),height:Ve(n.height,t.height)};const i=t.font,r=tt(i)?i.map(l=>mt(l)):[mt(i)],a=t.textStrokeWidth,s=tt(n)?n:[n],o=s.join()+Jw(r)+a+(e._measureText?"-spriting":"");return Gs.has(o)||Gs.set(o,r1(e,s,r,a)),Gs.get(o)}function Dd(e,t,n){const{x:i,y:r,width:a,height:s}=t;e.save(),On(e,n);const o=$e(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),xn(e,{x:i,y:r,w:a,h:s,radius:qw(He(n.borderRadius),0,Math.min(a,s)/2)}),e.closePath(),e.fill(),o&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function t1(e,t,n){const i=n.content;if(Pr(i)){e.save(),e.globalAlpha=o1(n.opacity,i.style.opacity),e.drawImage(i,t.x,t.y,t.width,t.height),e.restore();return}const r=tt(i)?i:[i],a=n.font,s=tt(a)?a.map(d=>mt(d)):[mt(a)],o=n.color,l=tt(o)?o:[o],c=Kw(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline="middle",e.textAlign=n.textAlign,e1(e,n)&&a1(e,{x:c,y:u},r,s),s1(e,{x:c,y:u},r,{fonts:s,colors:l}),e.restore()}function e1(e,t){if(t.textStrokeWidth>0)return e.lineJoin="round",e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function n1(e,t,n,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Qr;if(Pr(s)){e.save(),e.translate(n,i),e.rotate(l),e.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),e.restore();return}Qw(r)||i1(e,{x:n,y:i,radius:r,rotation:o,style:s,rad:l})}function i1(e,{x:t,y:n,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(e.beginPath(),a){default:e.arc(t,n,i,0,dt),e.closePath();break;case"triangle":e.moveTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Wi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Wi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),e.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+ae)*c,l=Math.sin(s+ae)*c,e.arc(t-o,n-l,u,s-q,s-ht),e.arc(t+l,n-o,u,s-ht,s),e.arc(t+o,n+l,u,s,s+ht),e.arc(t-l,n+o,u,s+ht,s+q),e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,e.rect(t-c,n-c,2*c,2*c);break}s+=ae;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+l,n-o),e.lineTo(t+o,n+l),e.lineTo(t-l,n+o),e.closePath();break;case"crossRot":s+=ae;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o),s+=ae,o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(s)*i,n+Math.sin(s)*i);break}e.fill()}function r1(e,t,n,i){e.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=n[Math.min(o,n.length-1)];e.font=l.string;const c=t[o];a=Math.max(a,e.measureText(c).width+i),s+=l.lineHeight}return e.restore(),{width:a,height:s}}function a1(e,{x:t,y:n},i,r){e.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;e.font=l.string,e.strokeText(s,t,n+c/2+a),a+=c}),e.stroke()}function s1(e,{x:t,y:n},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;e.beginPath(),e.font=u.string,e.fillStyle=c,e.fillText(o,t,n+d/2+s),s+=d,e.fill()})}function o1(e,t){const n=Be(e)?e:t;return Be(n)?Dr(n,0,1):1}const Pd={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function An(e,t,n){return t=typeof t=="number"?t:e.parse(t),xt(t)?e.getPixelForValue(t):n}function gn(e,t,n){const i=t[n];if(i||n==="scaleID")return i;const r=n.charAt(0),a=Object.values(e).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function Ed(e,t){if(e){const n=e.options.reverse,i=An(e,t.min,n?t.end:t.start),r=An(e,t.max,n?t.start:t.end);return{start:i,end:r}}}function Cd(e,t){const{chartArea:n,scales:i}=e,r=i[gn(i,t,"xScaleID")],a=i[gn(i,t,"yScaleID")];let s=n.width/2,o=n.height/2;return r&&(s=An(r,t.xValue,r.left+r.width/2)),a&&(o=An(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Zs(e,t){const n=e.scales,i=n[gn(n,t,"xScaleID")],r=n[gn(n,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||e.chartArea,{top:o,bottom:l}=r||e.chartArea;const c=Ad(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Ad(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function kd(e,t){if(!Td(t)){const n=Zs(e,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(n.width,n.height)/2,t.radius=i);const r=i*2,a=n.centerX+t.xAdjust,s=n.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return c1(e,t)}function l1(e,t){const{scales:n,chartArea:i}=e,r=n[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?u1(r,a,t):d1(n,a,t),a}function Od(e,t,n){const i=Zs(e,t);return i.initProperties=Si(e,i,t,n),i.elements=[{type:"label",optionScope:"label",properties:g1(e,i,t),initProperties:i.initProperties}],i}function c1(e,t){const n=Cd(e,t),i=t.radius*2;return{x:n.x-t.radius+t.xAdjust,y:n.y-t.radius+t.yAdjust,x2:n.x+t.radius+t.xAdjust,y2:n.y+t.radius+t.yAdjust,centerX:n.x+t.xAdjust,centerY:n.y+t.yAdjust,radius:t.radius,width:i,height:i}}function Ad(e,t){const n=Ed(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function u1(e,t,n){const i=An(e,n.value,NaN),r=An(e,n.endValue,i);e.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function d1(e,t,n){for(const i of Object.keys(Pd)){const r=e[gn(e,n,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Pd[i],d=Ed(r,{min:n[a],max:n[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function h1({properties:e,options:t},n,i,r){const{x:a,x2:s,width:o}=e;return Rd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:n.width})}function f1({properties:e,options:t},n,i,r){const{y:a,y2:s,height:o}=e;return Rd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:n.height})}function Rd(e,t){const{start:n,end:i,borderWidth:r}=e,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-n-s-o-t.size;return n+r/2+l+$s(c,a)}function g1(e,t,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const r=qs(i.position),a=Ot(i.padding),s=Ks(e.ctx,i),o=h1({properties:t,options:n},s,r,a),l=f1({properties:t,options:n},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function mn(e,t,n){const i=Math.cos(n),r=Math.sin(n),a=t.x,s=t.y;return{x:a+i*(e.x-a)-r*(e.y-s),y:s+r*(e.x-a)+i*(e.y-s)}}const Qs=["enter","leave"],Js=Qs.concat("click");function m1(e,t,n){t.listened=Md(n,Js,t.listeners),t.moveListened=!1,t._getElements=Vs,Qs.forEach(i=>{Gt(n[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&Gt(i.click)&&(t.listened=!0),t.moveListened||Qs.forEach(r=>{Gt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function p1(e,t,n){if(e.listened)switch(t.type){case"mousemove":case"mouseout":return b1(e,t,n);case"click":return v1(e,t,n)}}function b1(e,t,n){if(!e.moveListened)return;let i;t.type==="mousemove"?i=Vs(e,t,n.interaction):i=[];const r=e.hovered;e.hovered=i;const a={state:e,event:t};let s=Ld(a,"leave",r,i);return Ld(a,"enter",i,r)||s}function Ld({state:e,event:t},n,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Id(s.options[n]||e.listeners[n],s,t)||a);return a}function v1(e,t,n){const i=e.listeners,r=Vs(e,t,n.interaction);let a;for(const s of r)a=Id(s.options.click||i.click,s,t)||a;return a}function Id(e,t,n){return st(e,[t.$context,n])===!0}const Er=["afterDraw","beforeDraw"];function y1(e,t,n){const i=t.visibleElements;t.hooked=Md(n,Er,t.hooks),t.hooked||i.forEach(r=>{t.hooked||Er.forEach(a=>{Gt(r.options[a])&&(t.hooked=!0)})})}function Nd(e,t,n){if(e.hooked){const i=t.options[n]||e.hooks[n];return st(i,[t.$context])}}function x1(e,t,n){const i=S1(e.scales,t,n);let r=Bd(t,i,"min","suggestedMin");r=Bd(t,i,"max","suggestedMax")||r,r&&Gt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function _1(e,t){for(const n of e)T1(n,t)}function Bd(e,t,n,i){if(xt(t[n])&&!w1(e.options,n,i)){const r=e[n]!==t[n];return e[n]=t[n],r}}function w1(e,t,n){return qt(e[t])||qt(e[n])}function T1(e,t){for(const n of["scaleID","xScaleID","yScaleID"]){const i=gn(t,e,n);i&&!t[i]&&M1(e,n)&&console.warn(`No scale found with id '${i}' for annotation '${e.id}'`)}}function M1(e,t){if(t==="scaleID")return!0;const n=t.charAt(0);for(const i of["Min","Max","Value"])if(qt(e[n+i]))return!0;return!1}function S1(e,t,n){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:F(t.min,Number.NEGATIVE_INFINITY),max:F(t.max,Number.POSITIVE_INFINITY)};for(const o of n)o.scaleID===r?Hd(o,t,["value","endValue"],s):gn(e,o,a)===r&&Hd(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Hd(e,t,n,i){for(const r of n){const a=e[r];if(qt(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class Rn extends Ht{inRange(t,n,i,r){const{x:a,y:s}=mn({x:t,y:n},this.getCenterPoint(r),kt(-this.options.rotation));return yd({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return kn(this,t)}draw(t){t.save(),Xs(t,this.getCenterPoint(),this.options.rotation),Dd(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Od(t,n)}}Rn.id="boxAnnotation",Rn.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Rn.defaultRoutes={borderColor:"color",backgroundColor:"color"},Rn.descriptors={label:{_fallback:!0}};const Fd=["left","bottom","top","right"];class Di extends Ht{inRange(t,n,i,r){const{x:a,y:s}=mn({x:t,y:n},this.getCenterPoint(r),kt(-this.rotation));return yd({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return kn(this,t)}draw(t){const n=this.options,i=!qt(this._visible)||this._visible;!n.display||!n.content||!i||(t.save(),Xs(t,this.getCenterPoint(),this.rotation),P1(t,this),Dd(t,this,n),t1(t,L1(this),n),t.restore())}resolveElementProperties(t,n){let i;if(Td(n))i=Cd(t,n);else{const{centerX:o,centerY:l}=Zs(t,n);i={x:o,y:l}}const r=Ot(n.padding),a=Ks(t.ctx,n),s=D1(i,a,n,r);return{initProperties:Si(t,s,n),pointX:i.x,pointY:i.y,...s,rotation:n.rotation}}}Di.id="labelAnnotation",Di.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Di.defaultRoutes={borderColor:"color"};function D1(e,t,n,i){const r=t.width+i.width+n.borderWidth,a=t.height+i.height+n.borderWidth,s=qs(n.position,"center"),o=Ud(e.x,r,n.xAdjust,s.x),l=Ud(e.y,a,n.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function Ud(e,t,n=0,i){return e-$s(t,i)+n}function P1(e,t){const{pointX:n,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&A1(t,a);if(!s||I1(t,a,s))return;if(e.save(),e.beginPath(),!$e(e,a))return e.restore();const{separatorStart:l,separatorEnd:c}=E1(t,s),{sideStart:u,sideEnd:d}=k1(t,s,l);(a.margin>0||r.borderWidth===0)&&(e.moveTo(l.x,l.y),e.lineTo(c.x,c.y)),e.moveTo(u.x,u.y),e.lineTo(d.x,d.y);const h=mn({x:n,y:i},t.getCenterPoint(),kt(-t.rotation));e.lineTo(h.x,h.y),e.stroke(),e.restore()}function E1(e,t){const{x:n,y:i,x2:r,y2:a}=e,s=C1(e,t);let o,l;return t==="left"||t==="right"?(o={x:n+s,y:i},l={x:o.x,y:a}):(o={x:n,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function C1(e,t){const{width:n,height:i,options:r}=e,a=r.callout.margin+r.borderWidth/2;return t==="right"?n+a:t==="bottom"?i+a:-a}function k1(e,t,n){const{y:i,width:r,height:a,options:s}=e,o=s.callout.start,l=O1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:n.x,y:i+Ve(a,o)},u={x:c.x+l,y:c.y}):(c={x:n.x+Ve(r,o),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function O1(e,t){const n=t.side;return e==="left"||e==="top"?-n:n}function A1(e,t){const n=t.position;return Fd.includes(n)?n:R1(e,t)}function R1(e,t){const{x:n,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=e,f={x:u,y:d},g=t.start,v=Ve(s,g),p=Ve(o,g),m=[n,n+v,n+v,r],y=[i+p,a,i,a],_=[];for(let x=0;x<4;x++){const w=mn({x:m[x],y:y[x]},f,kt(h));_.push({position:Fd[x],distance:yn(w,{x:l,y:c})})}return _.sort((x,w)=>x.distance-w.distance)[0].position}function L1({x:e,y:t,width:n,height:i,options:r}){const a=r.borderWidth/2,s=Ot(r.padding);return{x:e+s.left+a,y:t+s.top+a,width:n-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function I1(e,t,n){const{pointX:i,pointY:r}=e,a=t.margin;let s=i,o=r;return n==="left"?s+=a:n==="right"?s-=a:n==="top"?o+=a:n==="bottom"&&(o-=a),e.inRange(s,o)}const to=(e,t,n)=>({x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}),eo=(e,t,n)=>to(t,n,Math.abs((e-t.y)/(n.y-t.y))).x,Wd=(e,t,n)=>to(t,n,Math.abs((e-t.x)/(n.x-t.x))).y,Pi=e=>e*e,N1=(e,t,{x:n,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(n,r),end:Math.max(n,r),value:e},Yd=(e,t,n,i)=>(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*n,no=(e,t,n,i)=>({x:Yd(e.x,t.x,n.x,i),y:Yd(e.y,t.y,n.y,i)}),zd=(e,t,n,i)=>2*(1-i)*(t-e)+2*i*(n-t),jd=(e,t,n,i)=>-Math.atan2(zd(e.x,t.x,n.x,i),zd(e.y,t.y,n.y,i))+.5*q;class Ei extends Ht{inRange(t,n,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:n},{path:o,ctx:l}=this;if(o){$e(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=n*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||io(this,s,r);return l.restore(),f}const c=Pi(a);return U1(this,s,c,r)||io(this,s,r)}return B1(this,{mouseX:t,mouseY:n},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return kn(this,t)}draw(t){const{x:n,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!$e(t,o))return t.restore();On(t,o);const l=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(o.curve&&s)return G1(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Xd(this),f=Math.atan2(a-i,r-n);t.translate(n,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),ro(t,0,d,c),ro(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){const i=l1(t,n),{x:r,y:a,x2:s,y2:o}=i,l=H1(i,t.chartArea),c=l?F1({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=Si(t,c,n),n.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=q1(c,n,yn(d,h))}const u=W1(t,c,n.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}Ei.id="lineAnnotation";const Vd={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};Ei.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Vd),fill:!1,length:12,start:Object.assign({},Vd),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Di.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ei.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ei.defaultRoutes={borderColor:"color"};function B1(e,{mouseX:t,mouseY:n},i,{hBorderWidth:r,useFinalPosition:a}){const s=N1(t,n,e.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||io(e,{mouseX:t,mouseY:n},a,i)}function H1({x:e,y:t,x2:n,y2:i},{top:r,right:a,bottom:s,left:o}){return!(e<o&&n<o||e>a&&n>a||t<r&&i<r||t>s&&i>s)}function $d({x:e,y:t},n,{top:i,right:r,bottom:a,left:s}){return e<s&&(t=Wd(s,{x:e,y:t},n),e=s),e>r&&(t=Wd(r,{x:e,y:t},n),e=r),t<i&&(e=eo(i,{x:e,y:t},n),t=i),t>a&&(e=eo(a,{x:e,y:t},n),t=a),{x:e,y:t}}function F1(e,t,n){const{x:i,y:r}=$d(e,t,n),{x:a,y:s}=$d(t,e,n);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function U1(e,{mouseX:t,mouseY:n},i=fn,r){const{x:a,y:s,x2:o,y2:l}=e.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=Pi(c)+Pi(u),h=d===0?-1:((t-a)*c+(n-s)*u)/d;let f,g;return h<0?(f=a,g=s):h>1?(f=o,g=l):(f=a+h*c,g=s+h*u),Pi(t-f)+Pi(n-g)<=i}function io(e,{mouseX:t,mouseY:n},i,r){const a=e.label;return a.options.display&&a.inRange(t,n,r,i)}function W1(e,t,n){const i=n.borderWidth,r=Ot(n.padding),a=Ks(e.ctx,n),s=a.width+r.width+i,o=a.height+r.height+i;return z1(t,n,{width:s,height:o,padding:r},e.chartArea)}function Y1(e){const{x:t,y:n,x2:i,y2:r}=e,a=Math.atan2(r-n,i-t);return a>q/2?a-q:a<q/-2?a+q:a}function z1(e,t,n,i){const{width:r,height:a,padding:s}=n,{xAdjust:o,yAdjust:l}=t,c={x:e.x,y:e.y},u={x:e.x2,y:e.y2},d=t.rotation==="auto"?Y1(e):kt(t.rotation),h=j1(r,a,d),f=V1(e,t,{labelSize:h,padding:s},i),g=e.cp?no(c,e.cp,u,f):to(c,u,f),v={size:h.w,min:i.left,max:i.right,padding:s.left},p={size:h.h,min:i.top,max:i.bottom,padding:s.top},m=Gd(g.x,v)+o,y=Gd(g.y,p)+l;return{x:m-r/2,y:y-a/2,x2:m+r/2,y2:y+a/2,centerX:m,centerY:y,pointX:g.x,pointY:g.y,width:r,height:a,rotation:Yi(d)}}function j1(e,t,n){const i=Math.cos(n),r=Math.sin(n);return{w:Math.abs(e*i)+Math.abs(t*r),h:Math.abs(e*r)+Math.abs(t*i)}}function V1(e,t,n,i){let r;const a=$1(e,i);return t.position==="start"?r=qd({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position==="end"?r=1-qd({w:e.x-e.x2,h:e.y-e.y2},n,t,a):r=$s(1,t.position),r}function qd(e,t,n,i){const{labelSize:r,padding:a}=t,s=e.w*i.dx,o=e.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return Dr(Math.max(l,c),0,.25)}function $1(e,t){const{x:n,x2:i,y:r,y2:a}=e,s=Math.min(r,a)-t.top,o=Math.min(n,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(n,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Gd(e,t){const{size:n,min:i,max:r,padding:a}=t,s=n/2;return n>r-i?(r+i)/2:(i>=e-a-s&&(e=i+a+s),r<=e+a+s&&(e=r-a-s),e)}function Xd(e){const t=e.options,n=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:Kd(e,n),endAdjust:Kd(e,i)}}function Kd(e,t){if(!t||!t.display)return 0;const{length:n,width:i}=t,r=e.options.borderWidth/2,a={x:n,y:i+r};return Math.abs(eo(0,a,{x:0,y:r}))}function ro(e,t,n,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+n;e.beginPath(),On(e,i),$e(e,i),e.moveTo(c,-a),e.lineTo(t+n,0),e.lineTo(c,a),s===!0?(e.fillStyle=o||l,e.closePath(),e.fill(),e.shadowColor="transparent"):e.shadowColor=i.borderShadowColor,e.stroke()}function q1(e,t,n){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=e,c=Math.atan2(s-r,a-i),u=qs(t.controlPoint,0),d={x:o+Ve(n,u.x,!1),y:l+Ve(n,u.y,!1)};return mn(d,{x:o,y:l},c)}function Zd(e,{x:t,y:n},{angle:i,adjust:r},a){!a||!a.display||(e.save(),e.translate(t,n),e.rotate(i),ro(e,0,-r,a),e.restore())}function G1(e,t,n,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Xd(t),f={x:r,y:a},g={x:s,y:o},v=jd(f,n,g,0),p=jd(f,n,g,1)-q,m=no(f,n,g,d/i),y=no(f,n,g,1-h/i),_=new Path2D;e.beginPath(),_.moveTo(m.x,m.y),_.quadraticCurveTo(n.x,n.y,y.x,y.y),e.shadowColor=l.borderShadowColor,e.stroke(_),t.path=_,t.ctx=e,Zd(e,m,{angle:v,adjust:d},c),Zd(e,y,{angle:p,adjust:h},u)}class Ci extends Ht{inRange(t,n,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return X1({x:t,y:n},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=mn({x:t,y:n},this.getCenterPoint(r),kt(-a));return f[i]>=h.start-d-fn&&f[i]<=h.end+d+fn}getCenterPoint(t){return kn(this,t)}draw(t){const{width:n,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Xs(t,this.getCenterPoint(),s.rotation),On(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=$e(t,s);t.ellipse(r,a,i/2,n/2,q/2,0,2*q),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Od(t,n,!0)}}Ci.id="ellipseAnnotation",Ci.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},Rn.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ci.defaultRoutes={borderColor:"color",backgroundColor:"color"},Ci.descriptors={label:{_fallback:!0}};function X1(e,t,n,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=kt(n||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),g=Math.pow(h*(e.x-s)+f*(e.y-o),2),v=Math.pow(f*(e.x-s)-h*(e.y-o),2);return g/Math.pow(l+d,2)+v/Math.pow(c+d,2)<=1.0001}class Cr extends Ht{inRange(t,n,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return Gw({x:t,y:n},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:n}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return kn(this,t)}draw(t){const n=this.options,i=n.borderWidth;if(n.radius<.1)return;t.save(),t.fillStyle=n.backgroundColor,On(t,n);const r=$e(t,n);n1(t,this,this.centerX,this.centerY),r&&!Pr(n.pointStyle)&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore(),n.borderWidth=i}resolveElementProperties(t,n){const i=kd(t,n);return i.initProperties=Si(t,i,n,!0),i}}Cr.id="pointAnnotation",Cr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Cr.defaultRoutes={borderColor:"color",backgroundColor:"color"};class kr extends Ht{inRange(t,n,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&Z1(this.elements,t,n,r);const a=mn({x:t,y:n},this.getCenterPoint(r),kt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return kn(this,t)}draw(t){const{elements:n,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,On(t,i);const r=$e(t,i);let a=!0;for(const s of n)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,n){const i=kd(t,n),{sides:r,rotation:a}=n,s=[],o=2*q/r;let l=a*Qr;for(let c=0;c<r;c++,l+=o){const u=K1(i,n,l);u.initProperties=Si(t,i,n),s.push(u)}return i.elements=s,i}}kr.id="polygonAnnotation",kr.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},kr.defaultRoutes={borderColor:"color",backgroundColor:"color"};function K1({centerX:e,centerY:t},{radius:n,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:e+s*n,y:t-o*n};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:e+s*(n+a),bY:t-o*(n+a)}}}function Z1(e,t,n,i){let r=!1,a=e[e.length-1].getProps(["bX","bY"],i);for(const s of e){const o=s.getProps(["bX","bY"],i);o.bY>n!=a.bY>n&&t<(a.bX-o.bX)*(n-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const qe={box:Rn,ellipse:Ci,label:Di,line:Ei,point:Cr,polygon:kr};Object.keys(qe).forEach(e=>{wt.describe(`elements.${qe[e].id}`,{_fallback:"plugins.annotation.common"})});const Q1={update:Object.assign},J1=Js.concat(Er),Qd=(e,t)=>j(t)?oo(e,t):e,ao=e=>e==="color"||e==="font";function so(e="line"){return qe[e]?e:(console.warn(`Unknown annotation type: '${e}', defaulting to 'line'`),"line")}function tT(e,t,n,i){const r=nT(e,n.animations,i),a=t.annotations,s=aT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=Jd(s,o,l.type),u=l.setContext(rT(e,c,l)),d=c.resolveElementProperties(e,u);d.skip=eT(d),"elements"in d&&(iT(c,d.elements,u,r),delete d.elements),qt(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=th(u),r.update(c,d)}}function eT(e){return isNaN(e.x)||isNaN(e.y)}function nT(e,t,n){return n==="reset"||n==="none"||n==="resize"?Q1:new da(e,t)}function iT(e,t,n,i){const r=e.elements||(e.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=Jd(r,a,s.type,s.initProperties),c=n[s.optionScope].override(s);o.options=th(c),i.update(l,o)}}function Jd(e,t,n,i){const r=qe[so(n)];let a=e[t];return(!a||!(a instanceof r))&&(a=e[t]=new r,Object.assign(a,i)),a}function th(e){const t=qe[so(e.type)],n={};n.id=e.id,n.type=e.type,n.drawTime=e.drawTime,Object.assign(n,oo(e,t.defaults),oo(e,t.defaultRoutes));for(const i of J1)n[i]=e[i];return n}function oo(e,t){const n={};for(const i of Object.keys(t)){const r=t[i],a=e[i];ao(i)&&tt(a)?n[i]=a.map(s=>Qd(s,r)):n[i]=Qd(a,r)}return n}function rT(e,t,n){return t.$context||(t.$context=Object.assign(Object.create(e.getContext()),{element:t,id:n.id,type:"annotation"}))}function aT(e,t){const n=t.length,i=e.length;if(i<n){const r=n-i;e.splice(i,0,...new Array(r))}else i>n&&e.splice(n,i-n);return e}var sT="2.2.1";const Ge=new Map,oT=Js.concat(Er);var Or={id:"annotation",version:sT,beforeRegister(){Xw("chart.js","3.7",Xt.version)},afterRegister(){Xt.register(qe)},afterUnregister(){Xt.unregister(qe)},beforeInit(e){Ge.set(e,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(e,t,n){const i=Ge.get(e),r=i.annotations=[];let a=n.annotations;j(a)?Object.keys(a).forEach(s=>{const o=a[s];j(o)&&(o.id=s,r.push(o))}):tt(a)&&r.push(...a),_1(r,e.scales)},afterDataLimits(e,t){const n=Ge.get(e);x1(e,t.scale,n.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(e,t,n){const i=Ge.get(e);m1(e,i,n),tT(e,i,n,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),y1(e,i,n)},beforeDatasetsDraw(e,t,n){Ar(e,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(e,t,n){Ar(e,"afterDatasetsDraw",n.clip)},beforeDraw(e,t,n){Ar(e,"beforeDraw",n.clip)},afterDraw(e,t,n){Ar(e,"afterDraw",n.clip)},beforeEvent(e,t,n){const i=Ge.get(e);p1(i,t.event,n)&&(t.changed=!0)},afterDestroy(e){Ge.delete(e)},_getState(e){return Ge.get(e)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:e=>!oT.includes(e)&&e!=="init",annotations:{_allKeys:!1,_fallback:(e,t)=>`elements.${qe[so(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:ao,_fallback:!0},_indexable:ao}},additionalOptionScopes:[""]};function Ar(e,t,n){const{ctx:i,chartArea:r}=e,a=Ge.get(e);n&&Gn(i,r);const s=lT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)cT(i,r,a,o);n&&Xn(i)}function lT(e,t){const n=[];for(const i of e)if(i.options.drawTime===t&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&n.push({element:r});return n}function cT(e,t,n,i){const r=i.element;i.main?(Nd(n,r,"beforeDraw"),r.draw(e,t),Nd(n,r,"afterDraw")):r.draw(e,t)}const uT={class:"tooltip"},dT={class:"tooltip-title"},hT={class:"title font-bold"},fT={key:1,class:"subtitle"},gT={key:0},mT={class:"display-label"},pT={class:"display-value"},bT=b.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(e,{emit:t}){const n=e,i=b.ref(null),r=b.ref(!1),a=b.ref({x:0,y:0}),s=b.ref({x:0,y:0}),o=b.ref({left:n.left,top:n.top});b.watch(i,h=>{if(h){const{width:f,height:g}=h.getBoundingClientRect();t("dimensions",{width:f,height:g})}}),b.watch(()=>n.locked,h=>{h?(o.value.left=n.left,o.value.top=n.top):h===!1&&(t("top",o.value.top),t("left",o.value.left))});function l(h){i.value&&(r.value=!0,a.value={x:i.value.offsetLeft,y:i.value.offsetTop},s.value={x:h.clientX,y:h.clientY},window.addEventListener("mousemove",u),window.addEventListener("mouseup",d))}let c=null;function u(h){h.preventDefault(),h.stopPropagation(),r.value&&(c!==null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{const f=h.clientX-s.value.x,g=h.clientY-s.value.y;o.value.left=`${a.value.x+f}px`,o.value.top=`${a.value.y+g}px`}))}function d(){r.value=!1,c!==null&&window.cancelAnimationFrame(c),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)}return(h,f)=>{const g=b.resolveComponent("KIcon");return e.showTooltip?(b.openBlock(),b.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:b.normalizeClass(["tooltip-container",{locked:e.locked}]),style:b.normalizeStyle({left:e.locked?o.value.left:e.left,top:e.locked?o.value.top:e.top,pointerEvents:e.locked?"all":"none"}),onMousedown:l},[b.createElementVNode("ul",uT,[b.createElementVNode("li",dT,[b.createElementVNode("span",hT,b.toDisplayString(e.tooltipTitle),1),e.locked?(b.openBlock(),b.createBlock(g,{key:0,class:"drag-icon",icon:"drag"})):b.createCommentVNode("",!0),e.context?(b.openBlock(),b.createElementBlock("span",fT,b.toDisplayString(e.context),1)):b.createCommentVNode("",!0)]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(e.series,({backgroundColor:v,borderColor:p,label:m,value:y})=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:m},[e.series.length?(b.openBlock(),b.createElementBlock("li",gT,[b.createElementVNode("div",{class:"tooltip-legend",style:b.normalizeStyle({background:v,"border-color":p})},null,4),b.createElementVNode("span",mT,b.toDisplayString(m),1),b.createElementVNode("span",pT,b.toDisplayString(y),1)])):b.createCommentVNode("",!0)],64))),128))])],38)):b.createCommentVNode("",!0)}}}),hM="",Ln=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},lo=Ln(bT,[["__scopeId","data-v-aff81ca2"]]),vT=["onClick"],yT={class:"label"},xT={key:0,class:"sub-label"},_T=b.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,n=b.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Xt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Xt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[At.Right]:"vertical",[At.Bottom]:"horizontal",[At.Hidden]:"hidden"})[l],s=b.inject("showLegendValues",!0),o=b.inject("legendPosition",b.ref(At.Right));return(l,c)=>b.unref(o)!==b.unref(At).Hidden?(b.openBlock(),b.createElementBlock("ul",{key:0,class:b.normalizeClass(["legend-container",a(b.unref(o))]),"data-testid":"legend"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(b.unref(n),({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:g,value:v})=>(b.openBlock(),b.createElementBlock("li",{key:h,onClick:p=>i(f,g)},[b.createElementVNode("div",{class:"legend",style:b.normalizeStyle({background:u,"border-color":d})},null,4),b.createElementVNode("div",{class:b.normalizeClass({"strike-through":!r(f,g)})},[b.createElementVNode("div",yT,b.toDisplayString(h),1),v&&b.unref(s)?(b.openBlock(),b.createElementBlock("div",xT,b.toDisplayString(v.formatted),1)):b.createCommentVNode("",!0)],2)],8,vT))),128))],2)):b.createCommentVNode("",!0)}}),fM="",co=Ln(_T,[["__scopeId","data-v-77ec0661"]]);let Rr;const wT=new Uint8Array(16);function TT(){if(!Rr&&(Rr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Rr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Rr(wT)}const Ut=[];for(let e=0;e<256;++e)Ut.push((e+256).toString(16).slice(1));function MT(e,t=0){return(Ut[e[t+0]]+Ut[e[t+1]]+Ut[e[t+2]]+Ut[e[t+3]]+"-"+Ut[e[t+4]]+Ut[e[t+5]]+"-"+Ut[e[t+6]]+Ut[e[t+7]]+"-"+Ut[e[t+8]]+Ut[e[t+9]]+"-"+Ut[e[t+10]]+Ut[e[t+11]]+Ut[e[t+12]]+Ut[e[t+13]]+Ut[e[t+14]]+Ut[e[t+15]]).toLowerCase()}const eh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function pn(e,t,n){if(eh.randomUUID&&!t&&!e)return eh.randomUUID();e=e||{};const i=e.random||(e.rng||TT)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return MT(i)}const ST=b.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""}},setup(e){const t=e,{i18n:n}=Ft.useI18n(),i=6,r=20,a=400,s="100%",o=30,l=40,c=0,u=10,d=10,h=1,f=({chart:O},B)=>{var nt;const V=O.data,rt=(nt=V.labels)==null?void 0:nt.indexOf(B);return V.datasets.reduce((ut,vt,Dt)=>{if(O.isDatasetVisible(Dt)){const yt=vt.data[rt];return isNaN(yt)?ut:ut+yt}else return ut},0)},g=(O,B,V,rt)=>{const nt=rt==="horizontal";B===null&&(B=n.t("entityNoName"));const ut={type:"label",yValue:yt=>nt?B:f(yt,B),xValue:yt=>nt?f(yt,B):B},vt={...ut,position:nt?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>nt?0:-Math.abs(Cw()),content:yt=>zs(f(yt,B),V)},Dt={...ut,content:yt=>pd(f(yt,B),md(yt.chart,O)),position:nt?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:yt=>nt?gd(zs(f(yt,B),V)):0,color:fd};return{[`${B}-value`]:vt,[`${B}-percent`]:Dt}},v=b.ref(),p=b.ref(),m=b.ref(pn()),y=pn(),_=pn(),x=b.ref([]),w=b.toRef(t,"chartData"),T=b.ref(b.inject("legendPosition",At.Right)),M=b.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),S=b.toRef(t,"metricUnit"),P=b.computed(()=>S.value&&n.t(`chartUnits.${S.value}`)),D=b.computed(()=>b.toRef(t,"orientation").value==="horizontal"),C=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:P,offset:0,width:0,height:0,chartType:D.value?Rt.HORIZONTAL_BAR:Rt.VERTICAL_BAR}),L=b.ref(0),W=()=>{var O;return t.annotations&&((O=w.value.labels)==null?void 0:O.reduce((B,V)=>Object.assign(B,g(w.value,V,S.value,t.orientation)),{}))},at={id:m.value,afterUpdate(O){L.value+=1,x.value=O.options.plugins.legend.labels.generateLabels(O).map(B=>({...B,value:t.legendValues&&t.legendValues[B.text]}))}},N={id:y,afterUpdate(O){O.options.plugins.annotation.annotations=$t.value?W():{}}},Lt=[at,{id:"axisHover",afterEvent(O,B){if(M.value.show=!1,B.event.type==="mousemove"){const V=B.event,rt=O.options.indexAxis,nt=O.scales,ut=O.scales[rt].getLabelForValue(Number(O.scales[rt].getValueForPixel(V[rt])));if((Dt=>Dt==="x"?V.y>nt.x.top:V.x<nt.y.right)(rt))if(C.showTooltip=!1,ut.length>Ws){const yt=O.canvas.getContext("2d").measureText(ut).width,dh=Math.abs(Math.round(V.x-yt*.5)),QT=Math.round(V.x+yt*.5);M.value.left=rt==="x"?`${(dh>0?dh:QT)-M.value.offset}px`:`${V.x-yt*.5-M.value.offset}px`,M.value.top=`${V.y-50}px`,M.value.show=!0,M.value.text=ut}else M.value.show=!1;else M.value.show=!1}}},{id:_,afterUpdate(O){O.options.layout.padding.right=D.value?te.value:0}},...t.annotations?[N]:[]],bt=b.computed(()=>w.value.labels&&w.value.labels.length||0),Qt=b.computed(()=>{var B,V;let O=s;if(v.value&&(O=v.value.width,v.value&&((B=w.value)!=null&&B.labels)&&((V=w.value)==null?void 0:V.labels.length)>o&&!D.value)){const rt=w.value.labels.length;O=`${v.value.offsetWidth+(rt-o)*l}px`}return O}),$t=b.toRef(t,"annotations"),Bt=b.computed(()=>{var B;let O=a;if((B=w.value)!=null&&B.labels&&D.value){const rt=w.value.labels.length*r;O=Math.max(rt,O)}return`${O}px`});Ft.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey")),b.onMounted(()=>{t.annotations&&Xt.register(Or)});const Jt=b.computed(()=>{const O=Ft.useBarChartOptions({tooltipState:C,legendID:m.value,stacked:b.toRef(t,"stacked"),metricAxesTitle:b.toRef(t,"metricAxesTitle"),dimensionAxesTitle:b.toRef(t,"dimensionAxesTitle"),indexAxis:D.value?"y":"x"});return{...O.value,plugins:{...O.value.plugins,annotation:{annotations:W(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*i}}}}),ct=Ft.useChartJSCommon("bar",v,b.toRef(t,"chartData"),Lt,Jt),te=b.computed(()=>{L.value;const O=w.value.labels,B=w.value.datasets,V=O.map((ut,vt)=>B.reduce((Dt,yt)=>isNaN(Number(yt.data[vt]))?Dt:Dt+Number(yt.data[vt]),0)),rt=ct.value?md(ct.value,w.value):kw(w.value);return V.map(ut=>gd(zs(ut,S.value)+pd(ut,rt))).reduce((ut,vt)=>Math.max(ut,vt),0)+i});b.onUnmounted(()=>{Xt.unregister(Or)});const se={[At.Right]:"legend-row",[At.Bottom]:"column"},It=b.computed(()=>{if(p.value&&ct.value){const O=window.devicePixelRatio,B=ct.value,V=B.scales.y.width*O+h,rt=(B.scales.y.height+B.scales.y.top+B.scales.x.height)*O,nt=p.value.getContext("2d");return nt.scale(O,O),nt.canvas.width=V,nt.canvas.height=rt,nt.canvas.style.width=`${V/O}px`,nt.canvas.style.height=`${rt/O}px`,{scale:O,width:V*O,height:rt*O,targetCtx:nt}}return null}),ft=O=>{if(It.value&&ct.value){const B=It.value.scale,V=It.value.targetCtx,rt=It.value.width,nt=It.value.height,ut=ct.value,vt=ut.canvas,Dt=O.target;V.fillStyle="white",Dt.scrollLeft>=c&&Dt.scrollLeft<=u?(V.globalCompositeOperation="source-over",V.clearRect(0,0,rt,nt),V.drawImage(vt,0,0,rt,nt,0,0,rt,nt),V.globalCompositeOperation="destination-over",V.fillRect(0,0,rt,nt)):(V.globalCompositeOperation="source-over",V.fillRect(0,(ut.scales.y.height+ut.scales.y.top+d)*B,rt,ut.scales.x.height*B)),C.offset=Dt.scrollLeft,M.value.offset=Dt.scrollLeft}},et=({width:O,height:B})=>{C.width=O,C.height=B};return b.watch(()=>t.orientation,()=>{var O;if(p.value&&It.value){const B=It.value.width,V=It.value.height;((O=p.value)==null?void 0:O.getContext("2d")).clearRect(0,0,B,V)}}),b.watch($t,O=>{ct.value&&(O?(ct.value.options.plugins.annotation.annotations=W(w.value),Xt.register(Or),ct.value.update()):(ct.value.options.plugins.annotation.annotations={},Xt.unregister(Or),ct.value.update()))}),(O,B)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",se[T.value]])},[b.createElementVNode("canvas",{ref_key:"axis",ref:p,class:"axis"},null,512),b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({"overflow-x":b.unref(bt)>o?"auto":"hidden"}),"on:scroll":ft},[b.createElementVNode("div",{class:"chart-body",style:b.normalizeStyle({width:b.unref(Qt),height:b.unref(Bt)})},[b.createElementVNode("canvas",{ref_key:"canvas",ref:v},null,512)],4)],36),M.value.show?(b.openBlock(),b.createElementBlock("div",{key:0,class:"axis-tooltip",style:b.normalizeStyle({top:M.value.top,left:M.value.left})},b.toDisplayString(M.value.text),5)):b.createCommentVNode("",!0),b.createVNode(lo,{left:C.left,series:C.tooltipSeries,"show-tooltip":C.showTooltip,"tooltip-title":e.tooltipTitle,top:C.top,onDimensions:et},null,8,["left","series","show-tooltip","tooltip-title","top"]),b.createVNode(co,{id:m.value,"chart-instance":b.unref(ct),items:x.value},null,8,["id","chart-instance","items"])],2))}}),mM="",DT=Ln(ST,[["__scopeId","data-v-6e7e9d47"]]);/*!
|
|
45
|
+
*/const _d={modes:{point(e,t){return Dr(e,t,{intersect:!0})},nearest(e,t,n){return qw(e,t,n)},x(e,t,n){return Dr(e,t,{intersect:n.intersect,axis:"x"})},y(e,t,n){return Dr(e,t,{intersect:n.intersect,axis:"y"})}}};function qs(e,t,n){return(_d.modes[n.mode]||_d.modes.nearest)(e,t,n)}function $w(e,t,n){return n!=="x"&&n!=="y"?e.inRange(t.x,t.y,"x",!0)||e.inRange(t.x,t.y,"y",!0):e.inRange(t.x,t.y,n,!0)}function Vw(e,t,n){return n==="x"?{x:e.x,y:t.y}:n==="y"?{x:t.x,y:e.y}:t}function Dr(e,t,n){return e.visibleElements.filter(i=>n.intersect?i.inRange(t.x,t.y):$w(i,t,n.axis))}function qw(e,t,n){let i=Number.POSITIVE_INFINITY;return Dr(e,t,n).reduce((r,a)=>{const s=a.getCenterPoint(),o=Vw(t,s,n.axis),l=xn(t,o);return l<i?(r=[a],i=l):l===i&&r.push(a),r},[]).sort((r,a)=>r._index-a._index).slice(0,1)}const Gw=(e,t)=>t>e||e.length>t.length&&e.slice(0,t.length)===t,gn=.001,Pr=(e,t,n)=>Math.min(n,Math.max(t,e));function Xw(e,t,n){for(const i of Object.keys(e))e[i]=Pr(e[i],t,n);return e}function Kw(e,t,n,i){if(!e||!t||n<=0)return!1;const r=i/2;return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<=Math.pow(n+r,2)}function wd(e,{x:t,y:n,x2:i,y2:r},a,s){const o=s/2,l=e.x>=t-o-gn&&e.x<=i+o+gn,c=e.y>=n-o-gn&&e.y<=r+o+gn;return a==="x"?l:(a==="y"||l)&&c}function On(e,t){const{centerX:n,centerY:i}=e.getProps(["centerX","centerY"],t);return{x:n,y:i}}function Zw(e,t,n,i=!0){const r=n.split(".");let a=0;for(const s of t.split(".")){const o=r[a++];if(parseInt(s,10)<parseInt(o,10))break;if(Gw(o,s)){if(i)throw new Error(`${e} v${n} is not supported. v${t} or newer is required.`);return!1}}return!0}const Td=e=>typeof e=="string"&&e.endsWith("%"),Md=e=>parseFloat(e)/100,Sd=e=>Pr(Md(e),0,1);function Gs(e,t){return t==="start"?0:t==="end"?e:Td(t)?Sd(t)*e:e/2}function qe(e,t,n=!0){return typeof t=="number"?t:Td(t)?(n?Sd(t):Md(t))*e:e}function Qw(e,t){const{x:n,width:i}=e,r=t.textAlign;return r==="center"?n+i/2:r==="end"||r==="right"?n+i:n}function Xs(e,t="center"){return $(e)?{x:F(e.x,t),y:F(e.y,t)}:(e=F(e,t),{x:e,y:e})}function Dd(e){return e&&(Gt(e.xValue)||Gt(e.yValue))}function Di(e,t,n,i=!1){const r=n.init;if(r){if(r===!0)return kd(t,i)}else return;return Jw(t,i,ot(r,[{chart:e,properties:t,options:n}]))}function Pd(e,t,n){let i=!1;return t.forEach(r=>{Xt(e[r])?(i=!0,n[r]=e[r]):Gt(n[r])&&delete n[r]}),i}function kd({centerX:e,centerY:t},n){return n?{centerX:e,centerY:t,radius:0,width:0,height:0}:{x:e,y:t,x2:e,y2:t,width:0,height:0}}function Jw(e,t,n){if(n===!0)return kd(e,t);if($(n))return n}const Ks=new Map,t1=e=>isNaN(e)||e<=0,e1=e=>e.reduce(function(t,n){return t+=n.string,t},"");function kr(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object HTMLImageElement]"||t==="[object HTMLCanvasElement]"}}function Zs(e,{x:t,y:n},i){i&&(e.translate(t,n),e.rotate(Pt(i)),e.translate(-t,-n))}function Ge(e,t){if(t&&t.borderWidth)return e.lineCap=t.borderCapStyle,e.setLineDash(t.borderDash),e.lineDashOffset=t.borderDashOffset,e.lineJoin=t.borderJoinStyle,e.lineWidth=t.borderWidth,e.strokeStyle=t.borderColor,!0}function An(e,t){e.shadowColor=t.backgroundShadowColor,e.shadowBlur=t.shadowBlur,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY}function Qs(e,t){const n=t.content;if(kr(n))return{width:qe(n.width,t.width),height:qe(n.height,t.height)};const i=t.font,r=et(i)?i.map(l=>pt(l)):[pt(i)],a=t.textStrokeWidth,s=et(n)?n:[n],o=s.join()+e1(r)+a+(e._measureText?"-spriting":"");return Ks.has(o)||Ks.set(o,s1(e,s,r,a)),Ks.get(o)}function Cd(e,t,n){const{x:i,y:r,width:a,height:s}=t;e.save(),An(e,n);const o=Ge(e,n);e.fillStyle=n.backgroundColor,e.beginPath(),_n(e,{x:i,y:r,w:a,h:s,radius:Xw(Fe(n.borderRadius),0,Math.min(a,s)/2)}),e.closePath(),e.fill(),o&&(e.shadowColor=n.borderShadowColor,e.stroke()),e.restore()}function n1(e,t,n){const i=n.content;if(kr(i)){e.save(),e.globalAlpha=c1(n.opacity,i.style.opacity),e.drawImage(i,t.x,t.y,t.width,t.height),e.restore();return}const r=et(i)?i:[i],a=n.font,s=et(a)?a.map(d=>pt(d)):[pt(a)],o=n.color,l=et(o)?o:[o],c=Qw(t,n),u=t.y+n.textStrokeWidth/2;e.save(),e.textBaseline="middle",e.textAlign=n.textAlign,i1(e,n)&&o1(e,{x:c,y:u},r,s),l1(e,{x:c,y:u},r,{fonts:s,colors:l}),e.restore()}function i1(e,t){if(t.textStrokeWidth>0)return e.lineJoin="round",e.miterLimit=2,e.lineWidth=t.textStrokeWidth,e.strokeStyle=t.textStrokeColor,!0}function r1(e,t,n,i){const{radius:r,options:a}=t,s=a.pointStyle,o=a.rotation;let l=(o||0)*Jr;if(kr(s)){e.save(),e.translate(n,i),e.rotate(l),e.drawImage(s,-s.width/2,-s.height/2,s.width,s.height),e.restore();return}t1(r)||a1(e,{x:n,y:i,radius:r,rotation:o,style:s,rad:l})}function a1(e,{x:t,y:n,radius:i,rotation:r,style:a,rad:s}){let o,l,c,u;switch(e.beginPath(),a){default:e.arc(t,n,i,0,dt),e.closePath();break;case"triangle":e.moveTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Yi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),s+=Yi,e.lineTo(t+Math.sin(s)*i,n-Math.cos(s)*i),e.closePath();break;case"rectRounded":u=i*.516,c=i-u,o=Math.cos(s+se)*c,l=Math.sin(s+se)*c,e.arc(t-o,n-l,u,s-G,s-ht),e.arc(t+l,n-o,u,s-ht,s),e.arc(t+o,n+l,u,s,s+ht),e.arc(t-l,n+o,u,s+ht,s+G),e.closePath();break;case"rect":if(!r){c=Math.SQRT1_2*i,e.rect(t-c,n-c,2*c,2*c);break}s+=se;case"rectRot":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+l,n-o),e.lineTo(t+o,n+l),e.lineTo(t-l,n+o),e.closePath();break;case"crossRot":s+=se;case"cross":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"star":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o),s+=se,o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l),e.moveTo(t+l,n-o),e.lineTo(t-l,n+o);break;case"line":o=Math.cos(s)*i,l=Math.sin(s)*i,e.moveTo(t-o,n-l),e.lineTo(t+o,n+l);break;case"dash":e.moveTo(t,n),e.lineTo(t+Math.cos(s)*i,n+Math.sin(s)*i);break}e.fill()}function s1(e,t,n,i){e.save();const r=t.length;let a=0,s=i;for(let o=0;o<r;o++){const l=n[Math.min(o,n.length-1)];e.font=l.string;const c=t[o];a=Math.max(a,e.measureText(c).width+i),s+=l.lineHeight}return e.restore(),{width:a,height:s}}function o1(e,{x:t,y:n},i,r){e.beginPath();let a=0;i.forEach(function(s,o){const l=r[Math.min(o,r.length-1)],c=l.lineHeight;e.font=l.string,e.strokeText(s,t,n+c/2+a),a+=c}),e.stroke()}function l1(e,{x:t,y:n},i,{fonts:r,colors:a}){let s=0;i.forEach(function(o,l){const c=a[Math.min(l,a.length-1)],u=r[Math.min(l,r.length-1)],d=u.lineHeight;e.beginPath(),e.font=u.string,e.fillStyle=c,e.fillText(o,t,n+d/2+s),s+=d,e.fill()})}function c1(e,t){const n=He(e)?e:t;return He(n)?Pr(n,0,1):1}const Ed={xScaleID:{min:"xMin",max:"xMax",start:"left",end:"right",startProp:"x",endProp:"x2"},yScaleID:{min:"yMin",max:"yMax",start:"bottom",end:"top",startProp:"y",endProp:"y2"}};function Rn(e,t,n){return t=typeof t=="number"?t:e.parse(t),vt(t)?e.getPixelForValue(t):n}function pn(e,t,n){const i=t[n];if(i||n==="scaleID")return i;const r=n.charAt(0),a=Object.values(e).filter(s=>s.axis&&s.axis===r);return a.length?a[0].id:r}function Od(e,t){if(e){const n=e.options.reverse,i=Rn(e,t.min,n?t.end:t.start),r=Rn(e,t.max,n?t.start:t.end);return{start:i,end:r}}}function Ad(e,t){const{chartArea:n,scales:i}=e,r=i[pn(i,t,"xScaleID")],a=i[pn(i,t,"yScaleID")];let s=n.width/2,o=n.height/2;return r&&(s=Rn(r,t.xValue,r.left+r.width/2)),a&&(o=Rn(a,t.yValue,a.top+a.height/2)),{x:s,y:o}}function Js(e,t){const n=e.scales,i=n[pn(n,t,"xScaleID")],r=n[pn(n,t,"yScaleID")];if(!i&&!r)return{};let{left:a,right:s}=i||e.chartArea,{top:o,bottom:l}=r||e.chartArea;const c=Id(i,{min:t.xMin,max:t.xMax,start:a,end:s});a=c.start,s=c.end;const u=Id(r,{min:t.yMin,max:t.yMax,start:l,end:o});return o=u.start,l=u.end,{x:a,y:o,x2:s,y2:l,width:s-a,height:l-o,centerX:a+(s-a)/2,centerY:o+(l-o)/2}}function Rd(e,t){if(!Dd(t)){const n=Js(e,t);let i=t.radius;(!i||isNaN(i))&&(i=Math.min(n.width,n.height)/2,t.radius=i);const r=i*2,a=n.centerX+t.xAdjust,s=n.centerY+t.yAdjust;return{x:a-i,y:s-i,x2:a+i,y2:s+i,centerX:a,centerY:s,width:r,height:r,radius:i}}return d1(e,t)}function u1(e,t){const{scales:n,chartArea:i}=e,r=n[t.scaleID],a={x:i.left,y:i.top,x2:i.right,y2:i.bottom};return r?h1(r,a,t):f1(n,a,t),a}function Ld(e,t,n){const i=Js(e,t);return i.initProperties=Di(e,i,t,n),i.elements=[{type:"label",optionScope:"label",properties:m1(e,i,t),initProperties:i.initProperties}],i}function d1(e,t){const n=Ad(e,t),i=t.radius*2;return{x:n.x-t.radius+t.xAdjust,y:n.y-t.radius+t.yAdjust,x2:n.x+t.radius+t.xAdjust,y2:n.y+t.radius+t.yAdjust,centerX:n.x+t.xAdjust,centerY:n.y+t.yAdjust,radius:t.radius,width:i,height:i}}function Id(e,t){const n=Od(e,t)||t;return{start:Math.min(n.start,n.end),end:Math.max(n.start,n.end)}}function h1(e,t,n){const i=Rn(e,n.value,NaN),r=Rn(e,n.endValue,i);e.isHorizontal()?(t.x=i,t.x2=r):(t.y=i,t.y2=r)}function f1(e,t,n){for(const i of Object.keys(Ed)){const r=e[pn(e,n,i)];if(r){const{min:a,max:s,start:o,end:l,startProp:c,endProp:u}=Ed[i],d=Od(r,{min:n[a],max:n[s],start:r[o],end:r[l]});t[c]=d.start,t[u]=d.end}}}function g1({properties:e,options:t},n,i,r){const{x:a,x2:s,width:o}=e;return Nd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.x,padding:{start:r.left,end:r.right},adjust:t.label.xAdjust,size:n.width})}function p1({properties:e,options:t},n,i,r){const{y:a,y2:s,height:o}=e;return Nd({start:a,end:s,size:o,borderWidth:t.borderWidth},{position:i.y,padding:{start:r.top,end:r.bottom},adjust:t.label.yAdjust,size:n.height})}function Nd(e,t){const{start:n,end:i,borderWidth:r}=e,{position:a,padding:{start:s,end:o},adjust:l}=t,c=i-r-n-s-o-t.size;return n+r/2+l+Gs(c,a)}function m1(e,t,n){const i=n.label;i.backgroundColor="transparent",i.callout.display=!1;const r=Xs(i.position),a=kt(i.padding),s=Qs(e.ctx,i),o=g1({properties:t,options:n},s,r,a),l=p1({properties:t,options:n},s,r,a),c=s.width+a.width,u=s.height+a.height;return{x:o,y:l,x2:o+c,y2:l+u,width:c,height:u,centerX:o+c/2,centerY:l+u/2,rotation:i.rotation}}function mn(e,t,n){const i=Math.cos(n),r=Math.sin(n),a=t.x,s=t.y;return{x:a+i*(e.x-a)-r*(e.y-s),y:s+r*(e.x-a)+i*(e.y-s)}}const to=["enter","leave"],eo=to.concat("click");function b1(e,t,n){t.listened=Pd(n,eo,t.listeners),t.moveListened=!1,t._getElements=qs,to.forEach(i=>{Xt(n[i])&&(t.moveListened=!0)}),(!t.listened||!t.moveListened)&&t.annotations.forEach(i=>{!t.listened&&Xt(i.click)&&(t.listened=!0),t.moveListened||to.forEach(r=>{Xt(i[r])&&(t.listened=!0,t.moveListened=!0)})})}function v1(e,t,n){if(e.listened)switch(t.type){case"mousemove":case"mouseout":return y1(e,t,n);case"click":return x1(e,t,n)}}function y1(e,t,n){if(!e.moveListened)return;let i;t.type==="mousemove"?i=qs(e,t,n.interaction):i=[];const r=e.hovered;e.hovered=i;const a={state:e,event:t};let s=Bd(a,"leave",r,i);return Bd(a,"enter",i,r)||s}function Bd({state:e,event:t},n,i,r){let a;for(const s of i)r.indexOf(s)<0&&(a=Hd(s.options[n]||e.listeners[n],s,t)||a);return a}function x1(e,t,n){const i=e.listeners,r=qs(e,t,n.interaction);let a;for(const s of r)a=Hd(s.options.click||i.click,s,t)||a;return a}function Hd(e,t,n){return ot(e,[t.$context,n])===!0}const Cr=["afterDraw","beforeDraw"];function _1(e,t,n){const i=t.visibleElements;t.hooked=Pd(n,Cr,t.hooks),t.hooked||i.forEach(r=>{t.hooked||Cr.forEach(a=>{Xt(r.options[a])&&(t.hooked=!0)})})}function Fd(e,t,n){if(e.hooked){const i=t.options[n]||e.hooks[n];return ot(i,[t.$context])}}function w1(e,t,n){const i=P1(e.scales,t,n);let r=Ud(t,i,"min","suggestedMin");r=Ud(t,i,"max","suggestedMax")||r,r&&Xt(t.handleTickRangeOptions)&&t.handleTickRangeOptions()}function T1(e,t){for(const n of e)S1(n,t)}function Ud(e,t,n,i){if(vt(t[n])&&!M1(e.options,n,i)){const r=e[n]!==t[n];return e[n]=t[n],r}}function M1(e,t,n){return Gt(e[t])||Gt(e[n])}function S1(e,t){for(const n of["scaleID","xScaleID","yScaleID"]){const i=pn(t,e,n);i&&!t[i]&&D1(e,n)&&console.warn(`No scale found with id '${i}' for annotation '${e.id}'`)}}function D1(e,t){if(t==="scaleID")return!0;const n=t.charAt(0);for(const i of["Min","Max","Value"])if(Gt(e[n+i]))return!0;return!1}function P1(e,t,n){const i=t.axis,r=t.id,a=i+"ScaleID",s={min:F(t.min,Number.NEGATIVE_INFINITY),max:F(t.max,Number.POSITIVE_INFINITY)};for(const o of n)o.scaleID===r?Wd(o,t,["value","endValue"],s):pn(e,o,a)===r&&Wd(o,t,[i+"Min",i+"Max",i+"Value"],s);return s}function Wd(e,t,n,i){for(const r of n){const a=e[r];if(Gt(a)){const s=t.parse(a);i.min=Math.min(i.min,s),i.max=Math.max(i.max,s)}}}class Ln extends Ht{inRange(t,n,i,r){const{x:a,y:s}=mn({x:t,y:n},this.getCenterPoint(r),Pt(-this.options.rotation));return wd({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return On(this,t)}draw(t){t.save(),Zs(t,this.getCenterPoint(),this.options.rotation),Cd(t,this,this.options),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Ld(t,n)}}Ln.id="boxAnnotation",Ln.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:{backgroundColor:"transparent",borderWidth:0,callout:{display:!1},color:"black",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:void 0,textAlign:"start",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ln.defaultRoutes={borderColor:"color",backgroundColor:"color"},Ln.descriptors={label:{_fallback:!0}};const Yd=["left","bottom","top","right"];class Pi extends Ht{inRange(t,n,i,r){const{x:a,y:s}=mn({x:t,y:n},this.getCenterPoint(r),Pt(-this.rotation));return wd({x:a,y:s},this.getProps(["x","y","x2","y2"],r),i,this.options.borderWidth)}getCenterPoint(t){return On(this,t)}draw(t){const n=this.options,i=!Gt(this._visible)||this._visible;!n.display||!n.content||!i||(t.save(),Zs(t,this.getCenterPoint(),this.rotation),C1(t,this),Cd(t,this,n),n1(t,N1(this),n),t.restore())}resolveElementProperties(t,n){let i;if(Dd(n))i=Ad(t,n);else{const{centerX:o,centerY:l}=Js(t,n);i={x:o,y:l}}const r=kt(n.padding),a=Qs(t.ctx,n),s=k1(i,a,n,r);return{initProperties:Di(t,s,n),pointX:i.x,pointY:i.y,...s,rotation:n.rotation}}}Pi.id="labelAnnotation",Pi.defaults={adjustScaleRange:!0,backgroundColor:"transparent",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:0,borderShadowColor:"transparent",borderWidth:0,callout:{borderCapStyle:"butt",borderColor:void 0,borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:1,display:!1,margin:5,position:"auto",side:5,start:"50%"},color:"black",content:null,display:!0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:void 0},height:void 0,init:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Pi.defaultRoutes={borderColor:"color"};function k1(e,t,n,i){const r=t.width+i.width+n.borderWidth,a=t.height+i.height+n.borderWidth,s=Xs(n.position,"center"),o=zd(e.x,r,n.xAdjust,s.x),l=zd(e.y,a,n.yAdjust,s.y);return{x:o,y:l,x2:o+r,y2:l+a,width:r,height:a,centerX:o+r/2,centerY:l+a/2}}function zd(e,t,n=0,i){return e-Gs(t,i)+n}function C1(e,t){const{pointX:n,pointY:i,options:r}=t,a=r.callout,s=a&&a.display&&L1(t,a);if(!s||B1(t,a,s))return;if(e.save(),e.beginPath(),!Ge(e,a))return e.restore();const{separatorStart:l,separatorEnd:c}=E1(t,s),{sideStart:u,sideEnd:d}=A1(t,s,l);(a.margin>0||r.borderWidth===0)&&(e.moveTo(l.x,l.y),e.lineTo(c.x,c.y)),e.moveTo(u.x,u.y),e.lineTo(d.x,d.y);const h=mn({x:n,y:i},t.getCenterPoint(),Pt(-t.rotation));e.lineTo(h.x,h.y),e.stroke(),e.restore()}function E1(e,t){const{x:n,y:i,x2:r,y2:a}=e,s=O1(e,t);let o,l;return t==="left"||t==="right"?(o={x:n+s,y:i},l={x:o.x,y:a}):(o={x:n,y:i+s},l={x:r,y:o.y}),{separatorStart:o,separatorEnd:l}}function O1(e,t){const{width:n,height:i,options:r}=e,a=r.callout.margin+r.borderWidth/2;return t==="right"?n+a:t==="bottom"?i+a:-a}function A1(e,t,n){const{y:i,width:r,height:a,options:s}=e,o=s.callout.start,l=R1(t,s.callout);let c,u;return t==="left"||t==="right"?(c={x:n.x,y:i+qe(a,o)},u={x:c.x+l,y:c.y}):(c={x:n.x+qe(r,o),y:n.y},u={x:c.x,y:c.y+l}),{sideStart:c,sideEnd:u}}function R1(e,t){const n=t.side;return e==="left"||e==="top"?-n:n}function L1(e,t){const n=t.position;return Yd.includes(n)?n:I1(e,t)}function I1(e,t){const{x:n,y:i,x2:r,y2:a,width:s,height:o,pointX:l,pointY:c,centerX:u,centerY:d,rotation:h}=e,f={x:u,y:d},g=t.start,v=qe(s,g),m=qe(o,g),p=[n,n+v,n+v,r],y=[i+m,a,i,a],_=[];for(let x=0;x<4;x++){const w=mn({x:p[x],y:y[x]},f,Pt(h));_.push({position:Yd[x],distance:xn(w,{x:l,y:c})})}return _.sort((x,w)=>x.distance-w.distance)[0].position}function N1({x:e,y:t,width:n,height:i,options:r}){const a=r.borderWidth/2,s=kt(r.padding);return{x:e+s.left+a,y:t+s.top+a,width:n-s.left-s.right-r.borderWidth,height:i-s.top-s.bottom-r.borderWidth}}function B1(e,t,n){const{pointX:i,pointY:r}=e,a=t.margin;let s=i,o=r;return n==="left"?s+=a:n==="right"?s-=a:n==="top"?o+=a:n==="bottom"&&(o-=a),e.inRange(s,o)}const no=(e,t,n)=>({x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}),io=(e,t,n)=>no(t,n,Math.abs((e-t.y)/(n.y-t.y))).x,jd=(e,t,n)=>no(t,n,Math.abs((e-t.x)/(n.x-t.x))).y,ki=e=>e*e,H1=(e,t,{x:n,y:i,x2:r,y2:a},s)=>s==="y"?{start:Math.min(i,a),end:Math.max(i,a),value:t}:{start:Math.min(n,r),end:Math.max(n,r),value:e},$d=(e,t,n,i)=>(1-i)*(1-i)*e+2*(1-i)*i*t+i*i*n,ro=(e,t,n,i)=>({x:$d(e.x,t.x,n.x,i),y:$d(e.y,t.y,n.y,i)}),Vd=(e,t,n,i)=>2*(1-i)*(t-e)+2*i*(n-t),qd=(e,t,n,i)=>-Math.atan2(Vd(e.x,t.x,n.x,i),Vd(e.y,t.y,n.y,i))+.5*G;class Ci extends Ht{inRange(t,n,i,r){const a=this.options.borderWidth/2;if(i!=="x"&&i!=="y"){const s={mouseX:t,mouseY:n},{path:o,ctx:l}=this;if(o){Ge(l,this.options);const{chart:u}=this.$context,d=t*u.currentDevicePixelRatio,h=n*u.currentDevicePixelRatio,f=l.isPointInStroke(o,d,h)||ao(this,s,r);return l.restore(),f}const c=ki(a);return Y1(this,s,c,r)||ao(this,s,r)}return F1(this,{mouseX:t,mouseY:n},i,{hBorderWidth:a,useFinalPosition:r})}getCenterPoint(t){return On(this,t)}draw(t){const{x:n,y:i,x2:r,y2:a,cp:s,options:o}=this;if(t.save(),!Ge(t,o))return t.restore();An(t,o);const l=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(o.curve&&s)return K1(t,this,s,l),t.restore();const{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Qd(this),f=Math.atan2(a-i,r-n);t.translate(n,i),t.rotate(f),t.beginPath(),t.moveTo(0+d,0),t.lineTo(l-h,0),t.shadowColor=o.borderShadowColor,t.stroke(),so(t,0,d,c),so(t,l,-h,u),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){const i=u1(t,n),{x:r,y:a,x2:s,y2:o}=i,l=U1(i,t.chartArea),c=l?W1({x:r,y:a},{x:s,y:o},t.chartArea):{x:r,y:a,x2:s,y2:o,width:Math.abs(s-r),height:Math.abs(o-a)};if(c.centerX=(s+r)/2,c.centerY=(o+a)/2,c.initProperties=Di(t,c,n),n.curve){const d={x:c.x,y:c.y},h={x:c.x2,y:c.y2};c.cp=X1(c,n,xn(d,h))}const u=z1(t,c,n.label);return u._visible=l,c.elements=[{type:"label",optionScope:"label",properties:u,initProperties:c.initProperties}],c}}Ci.id="lineAnnotation";const Gd={backgroundColor:void 0,backgroundShadowColor:void 0,borderColor:void 0,borderDash:void 0,borderDashOffset:void 0,borderShadowColor:void 0,borderWidth:void 0,display:void 0,fill:void 0,length:void 0,shadowBlur:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,width:void 0};Ci.defaults={adjustScaleRange:!0,arrowHeads:{display:!1,end:Object.assign({},Gd),fill:!1,length:12,start:Object.assign({},Gd),width:6},borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:2,curve:!1,controlPoint:{y:"-50%"},display:!0,endValue:void 0,init:void 0,label:{backgroundColor:"rgba(0,0,0,0.8)",backgroundShadowColor:"transparent",borderCapStyle:"butt",borderColor:"black",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderRadius:6,borderShadowColor:"transparent",borderWidth:0,callout:Object.assign({},Pi.defaults.callout),color:"#fff",content:null,display:!1,drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:void 0,weight:"bold"},height:void 0,opacity:void 0,padding:6,position:"center",rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,textAlign:"center",textStrokeColor:void 0,textStrokeWidth:0,width:void 0,xAdjust:0,yAdjust:0,z:void 0},scaleID:void 0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,value:void 0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ci.descriptors={arrowHeads:{start:{_fallback:!0},end:{_fallback:!0},_fallback:!0}},Ci.defaultRoutes={borderColor:"color"};function F1(e,{mouseX:t,mouseY:n},i,{hBorderWidth:r,useFinalPosition:a}){const s=H1(t,n,e.getProps(["x","y","x2","y2"],a),i);return s.value>=s.start-r&&s.value<=s.end+r||ao(e,{mouseX:t,mouseY:n},a,i)}function U1({x:e,y:t,x2:n,y2:i},{top:r,right:a,bottom:s,left:o}){return!(e<o&&n<o||e>a&&n>a||t<r&&i<r||t>s&&i>s)}function Xd({x:e,y:t},n,{top:i,right:r,bottom:a,left:s}){return e<s&&(t=jd(s,{x:e,y:t},n),e=s),e>r&&(t=jd(r,{x:e,y:t},n),e=r),t<i&&(e=io(i,{x:e,y:t},n),t=i),t>a&&(e=io(a,{x:e,y:t},n),t=a),{x:e,y:t}}function W1(e,t,n){const{x:i,y:r}=Xd(e,t,n),{x:a,y:s}=Xd(t,e,n);return{x:i,y:r,x2:a,y2:s,width:Math.abs(a-i),height:Math.abs(s-r)}}function Y1(e,{mouseX:t,mouseY:n},i=gn,r){const{x:a,y:s,x2:o,y2:l}=e.getProps(["x","y","x2","y2"],r),c=o-a,u=l-s,d=ki(c)+ki(u),h=d===0?-1:((t-a)*c+(n-s)*u)/d;let f,g;return h<0?(f=a,g=s):h>1?(f=o,g=l):(f=a+h*c,g=s+h*u),ki(t-f)+ki(n-g)<=i}function ao(e,{mouseX:t,mouseY:n},i,r){const a=e.label;return a.options.display&&a.inRange(t,n,r,i)}function z1(e,t,n){const i=n.borderWidth,r=kt(n.padding),a=Qs(e.ctx,n),s=a.width+r.width+i,o=a.height+r.height+i;return $1(t,n,{width:s,height:o,padding:r},e.chartArea)}function j1(e){const{x:t,y:n,x2:i,y2:r}=e,a=Math.atan2(r-n,i-t);return a>G/2?a-G:a<G/-2?a+G:a}function $1(e,t,n,i){const{width:r,height:a,padding:s}=n,{xAdjust:o,yAdjust:l}=t,c={x:e.x,y:e.y},u={x:e.x2,y:e.y2},d=t.rotation==="auto"?j1(e):Pt(t.rotation),h=V1(r,a,d),f=q1(e,t,{labelSize:h,padding:s},i),g=e.cp?ro(c,e.cp,u,f):no(c,u,f),v={size:h.w,min:i.left,max:i.right,padding:s.left},m={size:h.h,min:i.top,max:i.bottom,padding:s.top},p=Zd(g.x,v)+o,y=Zd(g.y,m)+l;return{x:p-r/2,y:y-a/2,x2:p+r/2,y2:y+a/2,centerX:p,centerY:y,pointX:g.x,pointY:g.y,width:r,height:a,rotation:zi(d)}}function V1(e,t,n){const i=Math.cos(n),r=Math.sin(n);return{w:Math.abs(e*i)+Math.abs(t*r),h:Math.abs(e*r)+Math.abs(t*i)}}function q1(e,t,n,i){let r;const a=G1(e,i);return t.position==="start"?r=Kd({w:e.x2-e.x,h:e.y2-e.y},n,t,a):t.position==="end"?r=1-Kd({w:e.x-e.x2,h:e.y-e.y2},n,t,a):r=Gs(1,t.position),r}function Kd(e,t,n,i){const{labelSize:r,padding:a}=t,s=e.w*i.dx,o=e.h*i.dy,l=s>0&&(r.w/2+a.left-i.x)/s,c=o>0&&(r.h/2+a.top-i.y)/o;return Pr(Math.max(l,c),0,.25)}function G1(e,t){const{x:n,x2:i,y:r,y2:a}=e,s=Math.min(r,a)-t.top,o=Math.min(n,i)-t.left,l=t.bottom-Math.max(r,a),c=t.right-Math.max(n,i);return{x:Math.min(o,c),y:Math.min(s,l),dx:o<=c?1:-1,dy:s<=l?1:-1}}function Zd(e,t){const{size:n,min:i,max:r,padding:a}=t,s=n/2;return n>r-i?(r+i)/2:(i>=e-a-s&&(e=i+a+s),r<=e+a+s&&(e=r-a-s),e)}function Qd(e){const t=e.options,n=t.arrowHeads&&t.arrowHeads.start,i=t.arrowHeads&&t.arrowHeads.end;return{startOpts:n,endOpts:i,startAdjust:Jd(e,n),endAdjust:Jd(e,i)}}function Jd(e,t){if(!t||!t.display)return 0;const{length:n,width:i}=t,r=e.options.borderWidth/2,a={x:n,y:i+r};return Math.abs(io(0,a,{x:0,y:r}))}function so(e,t,n,i){if(!i||!i.display)return;const{length:r,width:a,fill:s,backgroundColor:o,borderColor:l}=i,c=Math.abs(t-r)+n;e.beginPath(),An(e,i),Ge(e,i),e.moveTo(c,-a),e.lineTo(t+n,0),e.lineTo(c,a),s===!0?(e.fillStyle=o||l,e.closePath(),e.fill(),e.shadowColor="transparent"):e.shadowColor=i.borderShadowColor,e.stroke()}function X1(e,t,n){const{x:i,y:r,x2:a,y2:s,centerX:o,centerY:l}=e,c=Math.atan2(s-r,a-i),u=Xs(t.controlPoint,0),d={x:o+qe(n,u.x,!1),y:l+qe(n,u.y,!1)};return mn(d,{x:o,y:l},c)}function th(e,{x:t,y:n},{angle:i,adjust:r},a){!a||!a.display||(e.save(),e.translate(t,n),e.rotate(i),so(e,0,-r,a),e.restore())}function K1(e,t,n,i){const{x:r,y:a,x2:s,y2:o,options:l}=t,{startOpts:c,endOpts:u,startAdjust:d,endAdjust:h}=Qd(t),f={x:r,y:a},g={x:s,y:o},v=qd(f,n,g,0),m=qd(f,n,g,1)-G,p=ro(f,n,g,d/i),y=ro(f,n,g,1-h/i),_=new Path2D;e.beginPath(),_.moveTo(p.x,p.y),_.quadraticCurveTo(n.x,n.y,y.x,y.y),e.shadowColor=l.borderShadowColor,e.stroke(_),t.path=_,t.ctx=e,th(e,p,{angle:v,adjust:d},c),th(e,y,{angle:m,adjust:h},u)}class Ei extends Ht{inRange(t,n,i,r){const a=this.options.rotation,s=this.options.borderWidth;if(i!=="x"&&i!=="y")return Z1({x:t,y:n},this.getProps(["width","height","centerX","centerY"],r),a,s);const{x:o,y:l,x2:c,y2:u}=this.getProps(["x","y","x2","y2"],r),d=s/2,h=i==="y"?{start:l,end:u}:{start:o,end:c},f=mn({x:t,y:n},this.getCenterPoint(r),Pt(-a));return f[i]>=h.start-d-gn&&f[i]<=h.end+d+gn}getCenterPoint(t){return On(this,t)}draw(t){const{width:n,height:i,centerX:r,centerY:a,options:s}=this;t.save(),Zs(t,this.getCenterPoint(),s.rotation),An(t,this.options),t.beginPath(),t.fillStyle=s.backgroundColor;const o=Ge(t,s);t.ellipse(r,a,i/2,n/2,G/2,0,2*G),t.fill(),o&&(t.shadowColor=s.borderShadowColor,t.stroke()),t.restore()}get label(){return this.elements&&this.elements[0]}resolveElementProperties(t,n){return Ld(t,n,!0)}}Ei.id="ellipseAnnotation",Ei.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,label:Object.assign({},Ln.defaults.label),rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xMax:void 0,xMin:void 0,xScaleID:void 0,yMax:void 0,yMin:void 0,yScaleID:void 0,z:0},Ei.defaultRoutes={borderColor:"color",backgroundColor:"color"},Ei.descriptors={label:{_fallback:!0}};function Z1(e,t,n,i){const{width:r,height:a,centerX:s,centerY:o}=t,l=r/2,c=a/2;if(l<=0||c<=0)return!1;const u=Pt(n||0),d=i/2||0,h=Math.cos(u),f=Math.sin(u),g=Math.pow(h*(e.x-s)+f*(e.y-o),2),v=Math.pow(f*(e.x-s)-h*(e.y-o),2);return g/Math.pow(l+d,2)+v/Math.pow(c+d,2)<=1.0001}class Er extends Ht{inRange(t,n,i,r){const{x:a,y:s,x2:o,y2:l,width:c}=this.getProps(["x","y","x2","y2","width"],r),u=this.options.borderWidth;if(i!=="x"&&i!=="y")return Kw({x:t,y:n},this.getCenterPoint(r),c/2,u);const d=u/2,h=i==="y"?{start:s,end:l,value:n}:{start:a,end:o,value:t};return h.value>=h.start-d&&h.value<=h.end+d}getCenterPoint(t){return On(this,t)}draw(t){const n=this.options,i=n.borderWidth;if(n.radius<.1)return;t.save(),t.fillStyle=n.backgroundColor,An(t,n);const r=Ge(t,n);r1(t,this,this.centerX,this.centerY),r&&!kr(n.pointStyle)&&(t.shadowColor=n.borderShadowColor,t.stroke()),t.restore(),n.borderWidth=i}resolveElementProperties(t,n){const i=Rd(t,n);return i.initProperties=Di(t,i,n,!0),i}}Er.id="pointAnnotation",Er.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderDash:[],borderDashOffset:0,borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,pointStyle:"circle",radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Er.defaultRoutes={borderColor:"color",backgroundColor:"color"};class Or extends Ht{inRange(t,n,i,r){if(i!=="x"&&i!=="y")return this.options.radius>=.1&&this.elements.length>1&&J1(this.elements,t,n,r);const a=mn({x:t,y:n},this.getCenterPoint(r),Pt(-this.options.rotation)),s=this.elements.map(c=>i==="y"?c.bY:c.bX),o=Math.min(...s),l=Math.max(...s);return a[i]>=o&&a[i]<=l}getCenterPoint(t){return On(this,t)}draw(t){const{elements:n,options:i}=this;t.save(),t.beginPath(),t.fillStyle=i.backgroundColor,An(t,i);const r=Ge(t,i);let a=!0;for(const s of n)a?(t.moveTo(s.x,s.y),a=!1):t.lineTo(s.x,s.y);t.closePath(),t.fill(),r&&(t.shadowColor=i.borderShadowColor,t.stroke()),t.restore()}resolveElementProperties(t,n){const i=Rd(t,n),{sides:r,rotation:a}=n,s=[],o=2*G/r;let l=a*Jr;for(let c=0;c<r;c++,l+=o){const u=Q1(i,n,l);u.initProperties=Di(t,i,n),s.push(u)}return i.elements=s,i}}Or.id="polygonAnnotation",Or.defaults={adjustScaleRange:!0,backgroundShadowColor:"transparent",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderShadowColor:"transparent",borderWidth:1,display:!0,init:void 0,point:{radius:0},radius:10,rotation:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,sides:3,xAdjust:0,xMax:void 0,xMin:void 0,xScaleID:void 0,xValue:void 0,yAdjust:0,yMax:void 0,yMin:void 0,yScaleID:void 0,yValue:void 0,z:0},Or.defaultRoutes={borderColor:"color",backgroundColor:"color"};function Q1({centerX:e,centerY:t},{radius:n,borderWidth:i},r){const a=i/2,s=Math.sin(r),o=Math.cos(r),l={x:e+s*n,y:t-o*n};return{type:"point",optionScope:"point",properties:{x:l.x,y:l.y,centerX:l.x,centerY:l.y,bX:e+s*(n+a),bY:t-o*(n+a)}}}function J1(e,t,n,i){let r=!1,a=e[e.length-1].getProps(["bX","bY"],i);for(const s of e){const o=s.getProps(["bX","bY"],i);o.bY>n!=a.bY>n&&t<(a.bX-o.bX)*(n-o.bY)/(a.bY-o.bY)+o.bX&&(r=!r),a=o}return r}const Xe={box:Ln,ellipse:Ei,label:Pi,line:Ci,point:Er,polygon:Or};Object.keys(Xe).forEach(e=>{xt.describe(`elements.${Xe[e].id}`,{_fallback:"plugins.annotation.common"})});const tT={update:Object.assign},eT=eo.concat(Cr),eh=(e,t)=>$(t)?co(e,t):e,oo=e=>e==="color"||e==="font";function lo(e="line"){return Xe[e]?e:(console.warn(`Unknown annotation type: '${e}', defaulting to 'line'`),"line")}function nT(e,t,n,i){const r=rT(e,n.animations,i),a=t.annotations,s=oT(t.elements,a);for(let o=0;o<a.length;o++){const l=a[o],c=nh(s,o,l.type),u=l.setContext(sT(e,c,l)),d=c.resolveElementProperties(e,u);d.skip=iT(d),"elements"in d&&(aT(c,d.elements,u,r),delete d.elements),Gt(c.x)||Object.assign(c,d),Object.assign(c,d.initProperties),d.options=ih(u),r.update(c,d)}}function iT(e){return isNaN(e.x)||isNaN(e.y)}function rT(e,t,n){return n==="reset"||n==="none"||n==="resize"?tT:new ha(e,t)}function aT(e,t,n,i){const r=e.elements||(e.elements=[]);r.length=t.length;for(let a=0;a<t.length;a++){const s=t[a],o=s.properties,l=nh(r,a,s.type,s.initProperties),c=n[s.optionScope].override(s);o.options=ih(c),i.update(l,o)}}function nh(e,t,n,i){const r=Xe[lo(n)];let a=e[t];return(!a||!(a instanceof r))&&(a=e[t]=new r,Object.assign(a,i)),a}function ih(e){const t=Xe[lo(e.type)],n={};n.id=e.id,n.type=e.type,n.drawTime=e.drawTime,Object.assign(n,co(e,t.defaults),co(e,t.defaultRoutes));for(const i of eT)n[i]=e[i];return n}function co(e,t){const n={};for(const i of Object.keys(t)){const r=t[i],a=e[i];oo(i)&&et(a)?n[i]=a.map(s=>eh(s,r)):n[i]=eh(a,r)}return n}function sT(e,t,n){return t.$context||(t.$context=Object.assign(Object.create(e.getContext()),{element:t,id:n.id,type:"annotation"}))}function oT(e,t){const n=t.length,i=e.length;if(i<n){const r=n-i;e.splice(i,0,...new Array(r))}else i>n&&e.splice(n,i-n);return e}var lT="2.2.1";const Ke=new Map,cT=eo.concat(Cr);var Ar={id:"annotation",version:lT,beforeRegister(){Zw("chart.js","3.7",Kt.version)},afterRegister(){Kt.register(Xe)},afterUnregister(){Kt.unregister(Xe)},beforeInit(e){Ke.set(e,{annotations:[],elements:[],visibleElements:[],listeners:{},listened:!1,moveListened:!1,hooks:{},hooked:!1,hovered:[]})},beforeUpdate(e,t,n){const i=Ke.get(e),r=i.annotations=[];let a=n.annotations;$(a)?Object.keys(a).forEach(s=>{const o=a[s];$(o)&&(o.id=s,r.push(o))}):et(a)&&r.push(...a),T1(r,e.scales)},afterDataLimits(e,t){const n=Ke.get(e);w1(e,t.scale,n.annotations.filter(i=>i.display&&i.adjustScaleRange))},afterUpdate(e,t,n){const i=Ke.get(e);b1(e,i,n),nT(e,i,n,t.mode),i.visibleElements=i.elements.filter(r=>!r.skip&&r.options.display),_1(e,i,n)},beforeDatasetsDraw(e,t,n){Rr(e,"beforeDatasetsDraw",n.clip)},afterDatasetsDraw(e,t,n){Rr(e,"afterDatasetsDraw",n.clip)},beforeDraw(e,t,n){Rr(e,"beforeDraw",n.clip)},afterDraw(e,t,n){Rr(e,"afterDraw",n.clip)},beforeEvent(e,t,n){const i=Ke.get(e);v1(i,t.event,n)&&(t.changed=!0)},afterDestroy(e){Ke.delete(e)},_getState(e){return Ke.get(e)},defaults:{animations:{numbers:{properties:["x","y","x2","y2","width","height","centerX","centerY","pointX","pointY","radius"],type:"number"}},clip:!0,interaction:{mode:void 0,axis:void 0,intersect:void 0},common:{drawTime:"afterDatasetsDraw",init:!1,label:{}}},descriptors:{_indexable:!1,_scriptable:e=>!cT.includes(e)&&e!=="init",annotations:{_allKeys:!1,_fallback:(e,t)=>`elements.${Xe[lo(t.type)].id}`},interaction:{_fallback:!0},common:{label:{_indexable:oo,_fallback:!0},_indexable:oo}},additionalOptionScopes:[""]};function Rr(e,t,n){const{ctx:i,chartArea:r}=e,a=Ke.get(e);n&&Xn(i,r);const s=uT(a.visibleElements,t).sort((o,l)=>o.element.options.z-l.element.options.z);for(const o of s)dT(i,r,a,o);n&&Kn(i)}function uT(e,t){const n=[];for(const i of e)if(i.options.drawTime===t&&n.push({element:i,main:!0}),i.elements&&i.elements.length)for(const r of i.elements)r.options.display&&r.options.drawTime===t&&n.push({element:r});return n}function dT(e,t,n,i){const r=i.element;i.main?(Fd(n,r,"beforeDraw"),r.draw(e,t),Fd(n,r,"afterDraw")):r.draw(e,t)}const hT={class:"tooltip"},fT={class:"tooltip-title"},gT={class:"title font-bold"},pT={key:1,class:"subtitle"},mT={key:0},bT={class:"display-label"},vT={class:"display-value"},yT=b.defineComponent({__name:"ChartTooltip",props:{showTooltip:{type:Boolean,required:!0,default:!1},left:{type:String,required:!1,default:null},top:{type:String,required:!1,default:null},tooltipTitle:{type:String,required:!1,default:""},context:{type:[String,Number],required:!1,default:""},series:{type:Array,required:!0,default:()=>[]},locked:{type:Boolean,required:!1,default:!1}},emits:["dimensions","top","left"],setup(e,{emit:t}){const n=e,i=b.ref(null),r=b.ref(!1),a=b.ref({x:0,y:0}),s=b.ref({x:0,y:0}),o=b.ref({left:n.left,top:n.top});b.watch(i,h=>{if(h){const{width:f,height:g}=h.getBoundingClientRect();t("dimensions",{width:f,height:g})}}),b.watch(()=>n.locked,h=>{h?(o.value.left=n.left,o.value.top=n.top):h===!1&&(t("top",o.value.top),t("left",o.value.left))});function l(h){i.value&&(r.value=!0,a.value={x:i.value.offsetLeft,y:i.value.offsetTop},s.value={x:h.clientX,y:h.clientY},window.addEventListener("mousemove",u),window.addEventListener("mouseup",d))}let c=null;function u(h){h.preventDefault(),h.stopPropagation(),r.value&&(c!==null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{const f=h.clientX-s.value.x,g=h.clientY-s.value.y;o.value.left=`${a.value.x+f}px`,o.value.top=`${a.value.y+g}px`}))}function d(){r.value=!1,c!==null&&window.cancelAnimationFrame(c),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d)}return(h,f)=>{const g=b.resolveComponent("KIcon");return e.showTooltip?(b.openBlock(),b.createElementBlock("div",{key:0,ref_key:"tooltipEl",ref:i,class:b.normalizeClass(["tooltip-container",{locked:e.locked}]),style:b.normalizeStyle({left:e.locked?o.value.left:e.left,top:e.locked?o.value.top:e.top,pointerEvents:e.locked?"all":"none"}),onMousedown:l},[b.createElementVNode("ul",hT,[b.createElementVNode("li",fT,[b.createElementVNode("span",gT,b.toDisplayString(e.tooltipTitle),1),e.locked?(b.openBlock(),b.createBlock(g,{key:0,class:"drag-icon",icon:"drag"})):b.createCommentVNode("",!0),e.context?(b.openBlock(),b.createElementBlock("span",pT,b.toDisplayString(e.context),1)):b.createCommentVNode("",!0)]),(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(e.series,({backgroundColor:v,borderColor:m,label:p,value:y})=>(b.openBlock(),b.createElementBlock(b.Fragment,{key:p},[e.series.length?(b.openBlock(),b.createElementBlock("li",mT,[b.createElementVNode("div",{class:"tooltip-legend",style:b.normalizeStyle({background:v,"border-color":m})},null,4),b.createElementVNode("span",bT,b.toDisplayString(p),1),b.createElementVNode("span",vT,b.toDisplayString(y),1)])):b.createCommentVNode("",!0)],64))),128))])],38)):b.createCommentVNode("",!0)}}}),fM="",In=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},uo=In(yT,[["__scopeId","data-v-aff81ca2"]]),xT=["onClick"],_T={class:"label"},wT={key:0,class:"sub-label"},TT=b.defineComponent({__name:"ChartLegend",props:{id:{type:String,required:!0},items:{type:Array,required:!0},chartInstance:{type:Object,required:!1,default:()=>null}},setup(e){const t=e,n=b.toRef(t,"items"),i=(l=0,c)=>{if(t.chartInstance===null)return;const u=t.chartInstance instanceof Kt?t.chartInstance:t.chartInstance.chart;r(l,c)?u.hide(l,c):u.show(l,c),u.update()},r=(l=0,c)=>{if(t.chartInstance===null||t.chartInstance.chart===null)return!0;const u=t.chartInstance instanceof Kt?t.chartInstance:t.chartInstance.chart,d=u.getDatasetMeta(l);return d.dataset||c===void 0?u.isDatasetVisible(l):!(d.data.length&&d.data[c].hidden)},a=l=>({[Ct.Right]:"vertical",[Ct.Bottom]:"horizontal",[Ct.Hidden]:"hidden"})[l],s=b.inject("showLegendValues",!0),o=b.inject("legendPosition",b.ref(Ct.Right));return(l,c)=>b.unref(o)!==b.unref(Ct).Hidden?(b.openBlock(),b.createElementBlock("ul",{key:0,class:b.normalizeClass(["legend-container",a(b.unref(o))]),"data-testid":"legend"},[(b.openBlock(!0),b.createElementBlock(b.Fragment,null,b.renderList(b.unref(n),({fillStyle:u,strokeStyle:d,text:h,datasetIndex:f,index:g,value:v})=>(b.openBlock(),b.createElementBlock("li",{key:h,onClick:m=>i(f,g)},[b.createElementVNode("div",{class:"legend",style:b.normalizeStyle({background:u,"border-color":d})},null,4),b.createElementVNode("div",{class:b.normalizeClass({"strike-through":!r(f,g)})},[b.createElementVNode("div",_T,b.toDisplayString(h),1),v&&b.unref(s)?(b.openBlock(),b.createElementBlock("div",wT,b.toDisplayString(v.formatted),1)):b.createCommentVNode("",!0)],2)],8,xT))),128))],2)):b.createCommentVNode("",!0)}}),gM="",ho=In(TT,[["__scopeId","data-v-77ec0661"]]);let Lr;const MT=new Uint8Array(16);function ST(){if(!Lr&&(Lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lr(MT)}const Wt=[];for(let e=0;e<256;++e)Wt.push((e+256).toString(16).slice(1));function DT(e,t=0){return(Wt[e[t+0]]+Wt[e[t+1]]+Wt[e[t+2]]+Wt[e[t+3]]+"-"+Wt[e[t+4]]+Wt[e[t+5]]+"-"+Wt[e[t+6]]+Wt[e[t+7]]+"-"+Wt[e[t+8]]+Wt[e[t+9]]+"-"+Wt[e[t+10]]+Wt[e[t+11]]+Wt[e[t+12]]+Wt[e[t+13]]+Wt[e[t+14]]+Wt[e[t+15]]).toLowerCase()}const rh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function bn(e,t,n){if(rh.randomUUID&&!t&&!e)return rh.randomUUID();e=e||{};const i=e.random||(e.rng||ST)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=i[r];return t}return DT(i)}const ah=(e,t,n,i)=>{e.save(),e.beginPath(),e.moveTo(t,n),e.lineTo(t,i),e.lineWidth=1,e.strokeStyle="#0275d8",e.stroke(),e.restore()},fo={id:"linePlugin",afterDatasetsDraw:function(e){if(e.tooltip&&e.tooltip.getActiveElements()&&e.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=e.tooltip.dataPoints[0].element,n=e.ctx;ah(n,t,e.scales.y.top,e.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,n=e.ctx;ah(n,t,e.scales.y.top,e.scales.y.bottom)}}},sh=(e,t)=>{const n=e.ctx,i=e.scales.y,r=e.scales.x,a=t[t.length-1].element;n.save(),n.strokeStyle="rgba(100, 100, 100, 1)",n.lineWidth=3,e.options.indexAxis==="x"?n.strokeRect(a.x-a.width/2,a.y,a.width,i.bottom-a.y):n.strokeRect(r.left,a.y-a.height/2,a.x-r.left,a.height),n.restore()},oh={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(e){this.clickedElements&&this.clickedElements.length&&sh(e,this.clickedElements)},afterEvent:function(e,{event:t}){var r;if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const n=((r=e.options.interaction)==null?void 0:r.mode)||"index",i=e.getElementsAtEventForMode(t.native,n,{intersect:!1},!0);i.length&&this.clicked?(this.clickedElements=i,sh(e,this.clickedElements),this.previousHoverOption=e.options.hover,e.options.hover={mode:null}):(delete this.clickedElements,e.options.hover=this.previousHoverOption||e.options.hover,this.clicked=!1)}},PT=b.defineComponent({__name:"StackedBarChart",props:{chartData:{type:Object,required:!1,default:()=>({labels:[],datasets:[]})},tooltipTitle:{type:String,required:!1,default:""},legendValues:{type:Object,required:!1,default:null},metricUnit:{type:String,required:!1,default:""},orientation:{type:String,required:!1,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},annotations:{type:Boolean,required:!1,default:!0},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},stacked:{type:Boolean,required:!1,default:!0},syntheticsDataKey:{type:String,required:!1,default:""}},setup(e){const t=e,{i18n:n}=Ut.useI18n(),i=6,r=20,a=400,s="100%",o=30,l=40,c=0,u=10,d=10,h=1,f=({chart:A},H)=>{var at;const j=A.data,it=(at=j.labels)==null?void 0:at.indexOf(H);return j.datasets.reduce((V,Et,Lt)=>{if(A.isDatasetVisible(Lt)){const Ot=Et.data[it];return isNaN(Ot)?V:V+Ot}else return V},0)},g=(A,H,j,it)=>{const at=it==="horizontal";H===null&&(H=n.t("entityNoName"));const V={type:"label",yValue:Ot=>at?H:f(Ot,H),xValue:Ot=>at?f(Ot,H):H},Et={...V,position:at?{x:"start",y:"center"}:{x:"center",y:"end"},yAdjust:()=>at?0:-Math.abs(Ow()),content:Ot=>$s(f(Ot,H),j)},Lt={...V,content:Ot=>yd(f(Ot,H),vd(Ot.chart,A)),position:at?{x:"start",y:"center"}:{x:"center",y:"end"},xAdjust:Ot=>at?bd($s(f(Ot,H),j)):0,color:md};return{[`${H}-value`]:Et,[`${H}-percent`]:Lt}},v=b.ref(),m=b.ref(),p=b.ref(bn()),y=bn(),_=bn(),x=b.ref([]),w=b.toRef(t,"chartData"),T=b.ref(b.inject("legendPosition",Ct.Right)),M=b.ref({show:!1,top:"0px",left:"0px",text:"",offset:0}),S=b.toRef(t,"metricUnit"),P=b.computed(()=>S.value&&n.t(`chartUnits.${S.value}`)),D=b.computed(()=>b.toRef(t,"orientation").value==="horizontal"),C=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:P,offset:0,width:0,height:0,locked:!1,chartType:D.value?Ft.HORIZONTAL_BAR:Ft.VERTICAL_BAR}),L=b.ref(0),W=()=>{var A;return t.annotations&&((A=w.value.labels)==null?void 0:A.reduce((H,j)=>Object.assign(H,g(w.value,j,S.value,t.orientation)),{}))},st={id:p.value,afterUpdate(A){L.value+=1,x.value=A.options.plugins.legend.labels.generateLabels(A).map(H=>({...H,value:t.legendValues&&t.legendValues[H.text]}))}},N={id:y,afterUpdate(A){A.options.plugins.annotation.annotations=qt.value?W():{}}},At=[st,{id:"axisHover",afterEvent(A,H){if(M.value.show=!1,H.event.type==="mousemove"){const j=H.event,it=A.options.indexAxis,at=A.scales,V=A.scales[it].getLabelForValue(Number(A.scales[it].getValueForPixel(j[it])));if((Lt=>Lt==="x"?j.y>at.x.top:j.x<at.y.right)(it))if(C.showTooltip=!1,V.length>zs){const Ot=A.canvas.getContext("2d").measureText(V).width,gh=Math.abs(Math.round(j.x-Ot*.5)),JT=Math.round(j.x+Ot*.5);M.value.left=it==="x"?`${(gh>0?gh:JT)-M.value.offset}px`:`${j.x-Ot*.5-M.value.offset}px`,M.value.top=`${j.y-50}px`,M.value.show=!0,M.value.text=V}else M.value.show=!1;else M.value.show=!1}}},{id:_,afterUpdate(A){A.options.layout.padding.right=D.value?ee.value:0}},oh,...t.annotations?[N]:[]],bt=b.computed(()=>w.value.labels&&w.value.labels.length||0),Jt=b.computed(()=>{var H,j;let A=s;if(v.value&&(A=v.value.width,v.value&&((H=w.value)!=null&&H.labels)&&((j=w.value)==null?void 0:j.labels.length)>o&&!D.value)){const it=w.value.labels.length;A=`${v.value.offsetWidth+(it-o)*l}px`}return A}),qt=b.toRef(t,"annotations"),Nt=b.computed(()=>{var H;let A=a;if((H=w.value)!=null&&H.labels&&D.value){const it=w.value.labels.length*r;A=Math.max(it,A)}return`${A}px`});Ut.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey")),b.onMounted(()=>{t.annotations&&Kt.register(Ar)});const te=b.computed(()=>{const A=Ut.useBarChartOptions({tooltipState:C,legendID:p.value,stacked:b.toRef(t,"stacked"),metricAxesTitle:b.toRef(t,"metricAxesTitle"),dimensionAxesTitle:b.toRef(t,"dimensionAxesTitle"),indexAxis:D.value?"y":"x"});return{...A.value,plugins:{...A.value.plugins,annotation:{annotations:W(),clip:!1}},layout:{autoPadding:!1,padding:{right:0,top:6*i}}}}),ut=Ut.useChartJSCommon("bar",v,b.toRef(t,"chartData"),At,te),ee=b.computed(()=>{L.value;const A=w.value.labels,H=w.value.datasets,j=A.map((V,Et)=>H.reduce((Lt,Ot)=>isNaN(Number(Ot.data[Et]))?Lt:Lt+Number(Ot.data[Et]),0)),it=ut.value?vd(ut.value,w.value):Aw(w.value);return j.map(V=>bd($s(V,S.value)+yd(V,it))).reduce((V,Et)=>Math.max(V,Et),0)+i});b.onUnmounted(()=>{Kt.unregister(Ar)});const oe={[Ct.Right]:"legend-row",[Ct.Bottom]:"column"},Rt=b.computed(()=>{if(m.value&&ut.value){const A=window.devicePixelRatio,H=ut.value,j=H.scales.y.width*A+h,it=(H.scales.y.height+H.scales.y.top+H.scales.x.height)*A,at=m.value.getContext("2d");return at.scale(A,A),at.canvas.width=j,at.canvas.height=it,at.canvas.style.width=`${j/A}px`,at.canvas.style.height=`${it/A}px`,{scale:A,width:j*A,height:it*A,targetCtx:at}}return null}),ft=A=>{if(Rt.value&&ut.value){const H=Rt.value.scale,j=Rt.value.targetCtx,it=Rt.value.width,at=Rt.value.height,V=ut.value,Et=V.canvas,Lt=A.target;j.fillStyle="white",Lt.scrollLeft>=c&&Lt.scrollLeft<=u?(j.globalCompositeOperation="source-over",j.clearRect(0,0,it,at),j.drawImage(Et,0,0,it,at,0,0,it,at),j.globalCompositeOperation="destination-over",j.fillRect(0,0,it,at)):(j.globalCompositeOperation="source-over",j.fillRect(0,(V.scales.y.height+V.scales.y.top+d)*H,it,V.scales.x.height*H)),C.offset=Lt.scrollLeft,M.value.offset=Lt.scrollLeft}},nt=({width:A,height:H})=>{C.width=A,C.height=H};b.watch(()=>t.orientation,()=>{var A;if(m.value&&Rt.value){const H=Rt.value.width,j=Rt.value.height;((A=m.value)==null?void 0:A.getContext("2d")).clearRect(0,0,H,j)}}),b.watch(qt,A=>{ut.value&&(A?(ut.value.options.plugins.annotation.annotations=W(w.value),Kt.register(Ar),ut.value.update()):(ut.value.options.plugins.annotation.annotations={},Kt.unregister(Ar),ut.value.update()))});const Bt=()=>{var A;C.showTooltip&&(C.locked=!C.locked,ut.value&&(fo.clickedSegment=C.locked?(A=ut.value.tooltip)==null?void 0:A.dataPoints[0]:void 0))};return(A,H)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",oe[T.value]])},[b.createElementVNode("canvas",{ref_key:"axis",ref:m,class:"axis"},null,512),b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({"overflow-x":b.unref(bt)>o?"auto":"hidden"}),"on:scroll":ft,onClick:H[0]||(H[0]=j=>Bt())},[b.createElementVNode("div",{class:"chart-body",style:b.normalizeStyle({width:b.unref(Jt),height:b.unref(Nt)})},[b.createElementVNode("canvas",{ref_key:"canvas",ref:v},null,512)],4)],36),M.value.show?(b.openBlock(),b.createElementBlock("div",{key:0,class:"axis-tooltip",style:b.normalizeStyle({top:M.value.top,left:M.value.left})},b.toDisplayString(M.value.text),5)):b.createCommentVNode("",!0),b.createVNode(uo,{left:C.left,locked:C.locked,series:C.tooltipSeries,"show-tooltip":C.showTooltip,"tooltip-title":e.tooltipTitle,top:C.top,onDimensions:nt},null,8,["left","locked","series","show-tooltip","tooltip-title","top"]),b.createVNode(ho,{id:p.value,"chart-instance":b.unref(ut),items:x.value},null,8,["id","chart-instance","items"])],2))}}),mM="",kT=In(PT,[["__scopeId","data-v-f56d4616"]]);/*!
|
|
46
46
|
* chartjs-adapter-date-fns v3.0.0
|
|
47
47
|
* https://www.chartjs.org
|
|
48
48
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
49
49
|
* Released under the MIT license
|
|
50
|
-
*/const PT={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};ic._date.override({_id:"date-fns",formats:function(){return PT},parse:function(e,t){if(e===null||typeof e>"u")return null;const n=typeof e;return n==="number"||e instanceof Date?e=H(e):n==="string"&&(typeof t=="string"?e=Sx(e,t,new Date,this.options):e=Yu(e,this.options)),Fa(e)?e.getTime():null},format:function(e,t){return Dy(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return fi(e,t);case"second":return Jb(e,t);case"minute":return Zb(e,t);case"hour":return $b(e,t);case"day":return mu(e,t);case"week":return tv(e,t);case"month":return Ba(e,t);case"quarter":return Qb(e,t);case"year":return ev(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return br(e,t);case"second":return hv(e,t);case"minute":return cv(e,t);case"hour":return lv(e,t);case"day":return vu(e,t);case"week":return fv(e,t);case"month":return wu(e,t);case"quarter":return dv(e,t);case"year":return gv(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return Ex(e);case"minute":return mv(e);case"hour":return Px(e);case"day":return Ha(e);case"week":return pu(e);case"isoWeek":return pu(e,{weekStartsOn:+n});case"month":return bv(e);case"quarter":return pv(e);case"year":return yv(e);default:return e}},endOf:function(e,t){switch(t){case"second":return Mv(e);case"minute":return wv(e);case"hour":return xv(e);case"day":return xu(e);case"week":return _v(e);case"month":return _u(e);case"quarter":return Tv(e);case"year":return vv(e);default:return e}}});const nh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},ET={type:{type:String,required:!0},...nh},CT=b.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function In(e){return b.isProxy(e)?b.toRaw(e):e}function kT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return b.isProxy(t)?new Proxy(e,{}):e}function OT(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function ih(e,t){e.labels=t}function rh(e,t,n){const i=[];e.datasets=t.map(r=>{const a=e.datasets.find(s=>s[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function AT(e,t){const n={labels:[],datasets:[]};return ih(n,e.labels),rh(n,e.datasets,t),n}const RT=b.defineComponent({props:ET,setup(e,t){let{expose:n}=t;const i=b.ref(null),r=b.shallowRef(null);n({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=e,f=AT(c,h),g=kT(f,c);r.value=new Xt(i.value,{type:l,data:g,options:{...u},plugins:d})},s=()=>{const l=b.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(e.updateMode)};return b.onMounted(a),b.onBeforeUnmount(s),b.watch([()=>e.options,()=>e.data],(l,c)=>{let[u,d]=l,[h,f]=c;const g=b.toRaw(r.value);if(!g)return;let v=!1;if(u){const p=In(u),m=In(h);p&&p!==m&&(OT(g,p),v=!0)}if(d){const p=In(d.labels),m=In(f.labels),y=In(d.datasets),_=In(f.datasets);p!==m&&(ih(g.config.data,p),v=!0),y&&y!==_&&(rh(g.config.data,y,e.datasetIdKey),v=!0)}v&&o(g)},{deep:!0}),()=>b.h("canvas",{ref:i})}});function uo(e,t){return Xt.register(t),b.defineComponent({props:nh,setup(n,i){let{expose:r}=i;const a=b.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>b.h(RT,CT({ref:s},{type:e,...n}))}})}const LT=uo("bar",Qn),IT=uo("doughnut",Ue),NT=uo("line",Jn),BT=b.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRange:{type:Number,required:!1,default:0},legendPosition:{type:String,required:!1,default:At.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Oe},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Ft.useI18n(),i=b.ref(pn()),r=b.ref(pn()),a=b.ref([]),s=b.toRef(t,"metricUnit"),o=b.computed(()=>s.value&&n.t(`chartUnits.${s.value}`)),l=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:o,offset:0,width:0,height:0,chartType:Rt.DOUGHNUT}),c={id:i.value,afterUpdate(p){a.value=p.options.plugins.legend.labels.generateLabels(p).map(m=>({...m,value:t.legendValues&&t.legendValues[m.text],hidden:!1}))}},u=b.computed(()=>[t.chartData.datasets.reduce((m,y)=>(m.labels.push(y.label),m.backgroundColor.push(y.backgroundColor),m.borderColor.push(Mi(y.backgroundColor,50)),m.data.push(y.data.reduce((_,x)=>_+x,0)),m),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),d=b.computed(()=>({...t.chartData,datasets:u.value}));Ft.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey"));const{options:h}=Ft.useDoughnutChartOptions({tooltipState:l,timeRange:b.toRef(t,"timeRange"),legendID:i.value}),f=b.ref(),g=p=>({[At.Right]:"legend-row",[At.Bottom]:"column",[At.Hidden]:"hidden"})[p],v=({width:p,height:m})=>{l.width=p,l.height=m};return(p,m)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",g(e.legendPosition)]),"data-testid":"doughnut-chart-parent"},[b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({height:e.height,width:e.width})},[b.createVNode(b.unref(IT),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:b.unref(d),options:b.unref(h),plugins:[c]},null,8,["chart-id","data","options","plugins"]),b.createVNode(lo,{left:l.left,series:l.tooltipSeries,"show-tooltip":l.showTooltip,"tooltip-title":e.tooltipTitle,top:l.top,unit:e.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),b.createVNode(co,{id:i.value,"chart-instance":f.value,items:a.value,position:e.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),pM="",HT=Ln(BT,[["__scopeId","data-v-bfcbdf8f"]]),ah=(e,t,n,i)=>{e.save(),e.beginPath(),e.moveTo(t,n),e.lineTo(t,i),e.lineWidth=1,e.strokeStyle="#0275d8",e.stroke(),e.restore()},sh={id:"linePlugin",afterDatasetsDraw:function(e){if(e.tooltip&&e.tooltip.getActiveElements()&&e.tooltip.getActiveElements().length&&!this.clickedSegment){const{x:t}=e.tooltip.dataPoints[0].element,n=e.ctx;ah(n,t,e.scales.y.top,e.scales.y.bottom)}if(this.clickedSegment){const{x:t}=this.clickedSegment.element,n=e.ctx;ah(n,t,e.scales.y.top,e.scales.y.bottom)}}},oh=(e,t)=>{const n=e.ctx,i=e.scales.y,r=t[t.length-1].element;n.save(),n.strokeStyle="rgba(100, 100, 100, 1)",n.lineWidth=3,n.strokeRect(r.x-r.width/2,r.y,r.width,i.bottom-r.y),n.restore()},FT={id:"highlightPlugin",clicked:!1,afterDatasetsDraw:function(e){this.clickedElements&&this.clickedElements.length&&oh(e,this.clickedElements)},afterEvent:function(e,{event:t}){if(t.type!=="click"||!t.native)return;this.clicked=!this.clicked;const n=e.getElementsAtEventForMode(t.native,"index",{intersect:!1},!0);n.length&&this.clicked?(this.clickedElements=n,oh(e,this.clickedElements),this.previousHoverOption=e.options.hover,e.options.hover={mode:null}):(delete this.clickedElements,e.options.hover=this.previousHoverOption)}},UT=b.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:Rt.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Oe},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Ft.useI18n(),i=b.ref(),r=b.ref(pn()),a=b.ref(pn()),s=b.ref([]),o=b.toRef(t,"metricUnit"),l=b.ref(),c=b.ref(b.inject("legendPosition",At.Right)),u=b.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),d=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type,locked:!1}),h={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text]})).sort((w,T)=>w.value&&T.value&&T.value.raw-w.value.raw)}},f=b.computed(()=>[h,FT,...t.type===Rt.TIMESERIES_LINE?[sh]:[]]),{options:g}=Ft.useLinechartOptions({tooltipState:d,timeRangeMs:b.toRef(t,"timeRangeMs"),timeRangeSec:b.toRef(t,"timeRangeSec"),granularity:b.toRef(t,"granularity"),legendID:r.value,stacked:b.toRef(t,"stacked"),metricAxesTitle:b.toRef(t,"metricAxesTitle"),dimensionAxesTitle:b.toRef(t,"dimensionAxesTitle")}),v=b.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,w)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[w%t.datasetColors.length],x.borderColor=Mi(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=Mi(x.backgroundColor,50)),x.fill=b.toRef(t,"fill").value,x))}));Ft.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey"));const p=x=>Pw(x,{short:[z.DAILY,z.WEEKLY].includes(t.granularity)}),m=x=>({[At.Right]:"legend-row",[At.Bottom]:"column",[At.Hidden]:"hidden"})[x],y=({width:x,height:w})=>{d.width=x,d.height=w},_=()=>{var x;d.locked=!d.locked,i.value&&(sh.clickedSegment=d.locked?(x=i.value.chart.tooltip)==null?void 0:x.dataPoints[0]:void 0)};return(x,w)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",m(c.value)]),"data-testid":"line-chart-parent"},[b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({height:e.height,width:e.width}),onClick:w[0]||(w[0]=T=>_())},[e.type===b.unref(Rt).TIMESERIES_LINE?(b.openBlock(),b.createBlock(b.unref(NT),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:b.unref(v),"data-testid":"time-series-line-chart",options:b.unref(g),plugins:b.unref(f)},null,8,["chart-id","data","options","plugins"])):e.type===b.unref(Rt).TIMESERIES_BAR?(b.openBlock(),b.createBlock(b.unref(LT),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:b.unref(v),"data-testid":"time-series-bar-chart",options:b.unref(g),plugins:b.unref(f)},null,8,["chart-id","data","options","plugins"])):b.createCommentVNode("",!0)],4),b.createVNode(lo,{ref_key:"tooltipElement",ref:l,context:p(d.tooltipContext),"data-testid":"tooltip",left:d.left,locked:d.locked,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":e.tooltipTitle,top:d.top,unit:e.metricUnit,onDimensions:y,onLeft:w[1]||(w[1]=T=>d.left=T),onTop:w[2]||(w[2]=T=>d.top=T)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),b.createVNode(co,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),bM="",WT=Ln(UT,[["__scopeId","data-v-131dcb01"]]),YT={class:"analytics-chart-shell"},zT={class:"chart-header"},jT={key:0,class:"font-bold chart-title"},VT={id:"result-truncated"},$T={class:"limit-icon-wrapper"},qT={key:1,class:"analytics-chart-parent"},GT=b.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:At.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(e){const t=e,{i18n:n}=Ft.useI18n(),i=b.toRef(t,"chartData"),r=b.toRef(t,"chartOptions"),a=b.toRef(t,"legendPosition"),s=b.computed(()=>p.value?Ft.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Oe},i).value:Ft.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Oe},i).value),o=b.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"start"in i.value.meta?i.value.meta.end-i.value.meta.start:void 0:0}),l=b.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:void 0:0}),c=b.computed(()=>{var D;return(D=i.value.meta)!=null&&D.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),u=b.computed(()=>t.showLegendValues&&t.legendPosition!==At.Bottom),{legendValues:d}=Ft.useChartLegendValues(s,t.chartOptions.type,c),h=b.computed(()=>{var D,C,L;return((L=(C=(D=i.value)==null?void 0:D.meta)==null?void 0:C.limit)==null?void 0:L.toString())||null}),f=b.computed(()=>{var D,C;return((C=(D=i.value)==null?void 0:D.meta)==null?void 0:C.truncated)||!1}),g=n.t("limitedResultsShown",{maxReturned:h.value}),v=b.computed(()=>[Rt.VERTICAL_BAR.toString(),Rt.HORIZONTAL_BAR.toString()].includes(r.value.type)),p=b.computed(()=>[Rt.TIMESERIES_BAR,Rt.TIMESERIES_LINE].some(D=>D===r.value.type)),m=b.computed(()=>r.value.type===Rt.DOUGHNUT),y=b.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),_=b.computed(()=>{var L,W,at;if(!((L=i.value)!=null&&L.meta.metricNames)||!((W=i.value)!=null&&W.meta.metricUnits))return;const D=i.value.meta.metricNames[0],C=i.value.meta.metricUnits[D];return((at=r.value)==null?void 0:at.metricAxesTitle)||n.te(`metricAxisTitles.${D}`)&&n.te(`chartUnits.${C}`)&&n.t(`metricAxisTitles.${D}`,{unit:n.t(`chartUnits.${C}`)})||void 0}),x=b.computed(()=>{const D=p.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||n.te(`chartLabels.${D}`)&&n.t(`chartLabels.${D}`)||void 0}),w=b.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const D=xi(i.value.meta.granularity.duration);return n.t(`granularityAxisTitles.${D}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const D=xi(Number(i.value.meta.granularity));return n.t(`granularityAxisTitles.${D}`)}return n.t("chartlabels.Time")}),T=b.computed(()=>t.emptyStateTitle||n.t("noDataAvailableTitle")),M=b.computed(()=>t.emptyStateDescription||n.t("noDataAvailableDescription")),S=b.computed(()=>p.value?f_(s.value):i.value&&i.value.meta&&i.value.records.length),P=b.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?xi(i.value.meta.granularity)||z.HOURLY:xi(i.value.meta.granularity.duration)||z.HOURLY:xi(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||z.HOURLY);return b.provide("showLegendValues",u),b.provide("legendPosition",a),(D,C)=>{const L=b.resolveComponent("KIcon"),W=b.resolveComponent("KTooltip"),at=b.resolveComponent("KEmptyState");return b.openBlock(),b.createElementBlock("div",YT,[b.createElementVNode("div",zT,[e.chartTitle?(b.openBlock(),b.createElementBlock("div",jT,b.toDisplayString(e.chartTitle),1)):b.createCommentVNode("",!0),b.createElementVNode("div",VT,[b.unref(S)&&b.unref(f)&&b.unref(h)?(b.openBlock(),b.createBlock(W,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(g)),1)]),default:b.withCtx(()=>[b.createElementVNode("div",$T,[b.createVNode(L,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):b.createCommentVNode("",!0)])]),b.unref(S)?(b.openBlock(),b.createElementBlock("div",qT,[b.unref(p)?(b.openBlock(),b.createBlock(WT,{key:0,"chart-data":b.unref(s),"dataset-colors":e.chartOptions.chartDatasetColors,"dimension-axes-title":b.unref(w),fill:e.chartOptions.fill,granularity:b.unref(P),height:e.height,"legend-values":b.unref(d),"metric-axes-title":b.unref(_),"metric-unit":b.unref(c),stacked:e.chartOptions.stacked,"synthetics-data-key":e.syntheticsDataKey,"time-range-ms":b.unref(l),"time-range-sec":b.unref(o),"tooltip-title":e.tooltipTitle,type:e.chartOptions.type,width:e.width},null,8,["chart-data","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type","width"])):b.unref(v)?(b.openBlock(),b.createBlock(DT,{key:1,annotations:e.showAnnotations,"chart-data":b.unref(s),"data-testid":"bar-chart-container","dimension-axes-title":b.unref(x),"legend-values":b.unref(d),"metric-axes-title":b.unref(_),"metric-unit":b.unref(c),orientation:b.unref(y),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle},null,8,["annotations","chart-data","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):b.unref(m)?(b.openBlock(),b.createBlock(HT,{key:2,"chart-data":b.unref(s),"dataset-colors":e.chartOptions.chartDatasetColors,fill:e.chartOptions.fill,"legend-position":e.legendPosition,"legend-values":b.unref(d),"metric-unit":b.unref(c),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle,width:e.width},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title","width"])):b.createCommentVNode("",!0)])):(b.openBlock(),b.createBlock(at,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(T)),1)]),message:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(M)),1)]),_:1}))])}}}),vM="",XT=Ln(GT,[["__scopeId","data-v-aeb15ec5"]]),ho="#e7e7ec",KT={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},ki=(e,t)=>{let n=1;const i=KT[e],r=new Map;for(const a of t)r.set(a,i[n]),n=n%(i.length-1)+1;return r.set(-1,i[0]),r},lh=new Map([[100,ki("100",[100,101,102,103])],[200,ki("200",[200,201,202,203,204,205,206,207,208,226])],[300,ki("300",[300,301,302,303,304,305,307,308])],[400,ki("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,ki("500",[500,501,502,503,504,505,506,507,508,510,511])]]),ch=e=>{const t=parseInt(e,10),n=Math.floor(t/100)*100,i=lh.get(n);return i===void 0?ho:i.get(t)??i.get(-1)??ho},ZT=e=>{const t=ch(e);return{solid:t,light:t}};_t.AnalyticsChart=XT,_t.ChartLegendPosition=At,_t.ChartTypes=Rt,_t.accessibleGrey=fd,_t.codesInSpec=lh,_t.darkenColor=Mi,_t.datavisPalette=Oe,_t.lightGrey=ho,_t.lookupDatavisColor=Ti,_t.lookupStatusCodeCategoryColor=ZT,_t.lookupStatusCodeColor=ch,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|
|
50
|
+
*/const CT={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};sc._date.override({_id:"date-fns",formats:function(){return CT},parse:function(e,t){if(e===null||typeof e>"u")return null;const n=typeof e;return n==="number"||e instanceof Date?e=B(e):n==="string"&&(typeof t=="string"?e=Px(e,t,new Date,this.options):e=$u(e,this.options)),Wa(e)?e.getTime():null},format:function(e,t){return ky(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return gi(e,t);case"second":return ev(e,t);case"minute":return Jb(e,t);case"hour":return Gb(e,t);case"day":return vu(e,t);case"week":return nv(e,t);case"month":return Fa(e,t);case"quarter":return tv(e,t);case"year":return iv(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return vr(e,t);case"second":return gv(e,t);case"minute":return dv(e,t);case"hour":return uv(e,t);case"day":return _u(e,t);case"week":return pv(e,t);case"month":return Su(e,t);case"quarter":return fv(e,t);case"year":return mv(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return Ex(e);case"minute":return bv(e);case"hour":return Cx(e);case"day":return Ua(e);case"week":return yu(e);case"isoWeek":return yu(e,{weekStartsOn:+n});case"month":return yv(e);case"quarter":return vv(e);case"year":return _v(e);default:return e}},endOf:function(e,t){switch(t){case"second":return Dv(e);case"minute":return Mv(e);case"hour":return wv(e);case"day":return Tu(e);case"week":return Tv(e);case"month":return Mu(e);case"quarter":return Sv(e);case"year":return xv(e);default:return e}}});const lh={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},ET={type:{type:String,required:!0},...lh},OT=b.version[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function Nn(e){return b.isProxy(e)?b.toRaw(e):e}function AT(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return b.isProxy(t)?new Proxy(e,{}):e}function RT(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function ch(e,t){e.labels=t}function uh(e,t,n){const i=[];e.datasets=t.map(r=>{const a=e.datasets.find(s=>s[n]===r[n]);return!a||!r.data||i.includes(a)?{...r}:(i.push(a),Object.assign(a,r),a)})}function LT(e,t){const n={labels:[],datasets:[]};return ch(n,e.labels),uh(n,e.datasets,t),n}const IT=b.defineComponent({props:ET,setup(e,t){let{expose:n}=t;const i=b.ref(null),r=b.shallowRef(null);n({chart:r});const a=()=>{if(!i.value)return;const{type:l,data:c,options:u,plugins:d,datasetIdKey:h}=e,f=LT(c,h),g=AT(f,c);r.value=new Kt(i.value,{type:l,data:g,options:{...u},plugins:d})},s=()=>{const l=b.toRaw(r.value);l&&(l.destroy(),r.value=null)},o=l=>{l.update(e.updateMode)};return b.onMounted(a),b.onBeforeUnmount(s),b.watch([()=>e.options,()=>e.data],(l,c)=>{let[u,d]=l,[h,f]=c;const g=b.toRaw(r.value);if(!g)return;let v=!1;if(u){const m=Nn(u),p=Nn(h);m&&m!==p&&(RT(g,m),v=!0)}if(d){const m=Nn(d.labels),p=Nn(f.labels),y=Nn(d.datasets),_=Nn(f.datasets);m!==p&&(ch(g.config.data,m),v=!0),y&&y!==_&&(uh(g.config.data,y,e.datasetIdKey),v=!0)}v&&o(g)},{deep:!0}),()=>b.h("canvas",{ref:i})}});function go(e,t){return Kt.register(t),b.defineComponent({props:lh,setup(n,i){let{expose:r}=i;const a=b.shallowRef(null),s=o=>{a.value=o==null?void 0:o.chart};return r({chart:a}),()=>b.h(IT,OT({ref:s},{type:e,...n}))}})}const NT=go("bar",Jn),BT=go("doughnut",Ye),HT=go("line",ti),FT=b.defineComponent({__name:"DoughnutChart",props:{chartData:{type:Object,required:!1,default:null},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRange:{type:Number,required:!1,default:0},legendPosition:{type:String,required:!1,default:Ct.Right},legendValues:{type:Object,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ae},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Ut.useI18n(),i=b.ref(bn()),r=b.ref(bn()),a=b.ref([]),s=b.toRef(t,"metricUnit"),o=b.computed(()=>s.value&&n.t(`chartUnits.${s.value}`)),l=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:o,offset:0,width:0,height:0,chartType:Ft.DOUGHNUT}),c={id:i.value,afterUpdate(m){a.value=m.options.plugins.legend.labels.generateLabels(m).map(p=>({...p,value:t.legendValues&&t.legendValues[p.text],hidden:!1}))}},u=b.computed(()=>[t.chartData.datasets.reduce((p,y)=>(p.labels.push(y.label),p.backgroundColor.push(y.backgroundColor),p.borderColor.push(Si(y.backgroundColor,50)),p.data.push(y.data.reduce((_,x)=>_+x,0)),p),{labels:[],backgroundColor:[],borderColor:[],data:[]})]),d=b.computed(()=>({...t.chartData,datasets:u.value}));Ut.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey"));const{options:h}=Ut.useDoughnutChartOptions({tooltipState:l,timeRange:b.toRef(t,"timeRange"),legendID:i.value}),f=b.ref(),g=m=>({[Ct.Right]:"legend-row",[Ct.Bottom]:"column",[Ct.Hidden]:"hidden"})[m],v=({width:m,height:p})=>{l.width=m,l.height=p};return(m,p)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",g(e.legendPosition)]),"data-testid":"doughnut-chart-parent"},[b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({height:e.height,width:e.width})},[b.createVNode(b.unref(BT),{ref_key:"chartInstance",ref:f,"chart-id":r.value,data:b.unref(d),options:b.unref(h),plugins:[c]},null,8,["chart-id","data","options","plugins"]),b.createVNode(uo,{left:l.left,series:l.tooltipSeries,"show-tooltip":l.showTooltip,"tooltip-title":e.tooltipTitle,top:l.top,unit:e.metricUnit,onDimensions:v},null,8,["left","series","show-tooltip","tooltip-title","top","unit"])],4),b.createVNode(ho,{id:i.value,"chart-instance":f.value,items:a.value,position:e.legendPosition},null,8,["id","chart-instance","items","position"])],2))}}),bM="",UT=In(FT,[["__scopeId","data-v-bfcbdf8f"]]),WT=b.defineComponent({__name:"TimeSeriesChart",props:{chartData:{type:Object,required:!1,default:null},type:{type:String,required:!1,default:Ft.TIMESERIES_LINE},fill:{type:Boolean,required:!1,default:!1},tooltipTitle:{type:String,required:!0},metricUnit:{type:String,required:!1,default:""},timeRangeMs:{type:Number,required:!1,default:void 0},timeRangeSec:{type:Number,required:!1,default:void 0},granularity:{type:String,required:!0},stacked:{type:Boolean,required:!1,default:!0},legendValues:{type:Object,required:!1,default:null},metricAxesTitle:{type:String,required:!1,default:null},dimensionAxesTitle:{type:String,required:!1,default:null},syntheticsDataKey:{type:String,required:!1,default:""},datasetColors:{type:Object,required:!1,default:Ae},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)}},setup(e){const t=e,{i18n:n}=Ut.useI18n(),i=b.ref(),r=b.ref(bn()),a=b.ref(bn()),s=b.ref([]),o=b.toRef(t,"metricUnit"),l=b.ref(),c=b.ref(b.inject("legendPosition",Ct.Right)),u=b.computed(()=>o.value&&n.t(`chartUnits.${o.value}`)),d=b.reactive({showTooltip:!1,tooltipContext:"",tooltipSeries:[],left:"",top:"",units:u,offset:0,width:0,height:0,chartType:t.type,locked:!1}),h={id:r.value,afterUpdate(x){s.value=x.options.plugins.legend.labels.generateLabels(x).map(w=>({...w,value:t.legendValues&&t.legendValues[w.text]})).sort((w,T)=>w.value&&T.value&&T.value.raw-w.value.raw)}},f=b.computed(()=>[h,oh,...t.type===Ft.TIMESERIES_LINE?[fo]:[]]),{options:g}=Ut.useLinechartOptions({tooltipState:d,timeRangeMs:b.toRef(t,"timeRangeMs"),timeRangeSec:b.toRef(t,"timeRangeSec"),granularity:b.toRef(t,"granularity"),legendID:r.value,stacked:b.toRef(t,"stacked"),metricAxesTitle:b.toRef(t,"metricAxesTitle"),dimensionAxesTitle:b.toRef(t,"dimensionAxesTitle")}),v=b.computed(()=>({...t.chartData,datasets:t.chartData.datasets.map((x,w)=>(Array.isArray(t.datasetColors)?(x.backgroundColor=t.datasetColors[w%t.datasetColors.length],x.borderColor=Si(x.backgroundColor,50)):x.rawDimension in t.datasetColors&&(x.backgroundColor=t.datasetColors[x.rawDimension],x.borderColor=Si(x.backgroundColor,50)),x.fill=b.toRef(t,"fill").value,x))}));Ut.useReportChartDataForSynthetics(b.toRef(t,"chartData"),b.toRef(t,"syntheticsDataKey"));const m=x=>Cw(x,{short:[z.DAILY,z.WEEKLY].includes(t.granularity)}),p=x=>({[Ct.Right]:"legend-row",[Ct.Bottom]:"column",[Ct.Hidden]:"hidden"})[x],y=({width:x,height:w})=>{d.width=x,d.height=w},_=()=>{var x;d.locked=!d.locked,i.value&&(fo.clickedSegment=d.locked?(x=i.value.chart.tooltip)==null?void 0:x.dataPoints[0]:void 0)};return(x,w)=>(b.openBlock(),b.createElementBlock("div",{class:b.normalizeClass(["chart-parent",p(c.value)]),"data-testid":"line-chart-parent"},[b.createElementVNode("div",{class:"chart-container",style:b.normalizeStyle({height:e.height,width:e.width}),onClick:w[0]||(w[0]=T=>_())},[e.type===b.unref(Ft).TIMESERIES_LINE?(b.openBlock(),b.createBlock(b.unref(HT),{key:0,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:b.unref(v),"data-testid":"time-series-line-chart",options:b.unref(g),plugins:b.unref(f)},null,8,["chart-id","data","options","plugins"])):e.type===b.unref(Ft).TIMESERIES_BAR?(b.openBlock(),b.createBlock(b.unref(NT),{key:1,ref_key:"chartInstance",ref:i,"chart-id":a.value,data:b.unref(v),"data-testid":"time-series-bar-chart",options:b.unref(g),plugins:b.unref(f)},null,8,["chart-id","data","options","plugins"])):b.createCommentVNode("",!0)],4),b.createVNode(uo,{ref_key:"tooltipElement",ref:l,context:m(d.tooltipContext),"data-testid":"tooltip",left:d.left,locked:d.locked,series:d.tooltipSeries,"show-tooltip":d.showTooltip,"tooltip-title":e.tooltipTitle,top:d.top,unit:e.metricUnit,onDimensions:y,onLeft:w[1]||(w[1]=T=>d.left=T),onTop:w[2]||(w[2]=T=>d.top=T)},null,8,["context","left","locked","series","show-tooltip","tooltip-title","top","unit"]),b.createVNode(ho,{id:r.value,"chart-instance":i.value,"data-testid":"legend",items:s.value},null,8,["id","chart-instance","items"])],2))}}),vM="",YT=In(WT,[["__scopeId","data-v-131dcb01"]]),zT={class:"analytics-chart-shell"},jT={class:"chart-header"},$T={key:0,class:"font-bold chart-title"},VT={id:"result-truncated"},qT={class:"limit-icon-wrapper"},GT={key:1,class:"analytics-chart-parent"},XT=b.defineComponent({__name:"AnalyticsChart",props:{chartData:{type:Object,required:!0},chartOptions:{type:Object,required:!0},tooltipTitle:{type:String,required:!0},emptyStateTitle:{type:String,required:!1,default:""},emptyStateDescription:{type:String,required:!1,default:""},chartTitle:{type:String,required:!0},legendPosition:{type:String,required:!1,default:Ct.Right},syntheticsDataKey:{type:String,required:!1,default:""},height:{type:String,required:!1,default:"400px",validator:e=>/(\d *)(px|%)/.test(e)},width:{type:String,required:!1,default:"100%",validator:e=>/(\d *)(px|%)/.test(e)},showLegendValues:{type:Boolean,required:!1,default:!0},showAnnotations:{type:Boolean,required:!1,default:!0}},setup(e){const t=e,{i18n:n}=Ut.useI18n(),i=b.toRef(t,"chartData"),r=b.toRef(t,"chartOptions"),a=b.toRef(t,"legendPosition"),s=b.computed(()=>m.value?Ut.useExploreResultToTimeDataset({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ae},i).value:Ut.useExploreResultToDatasets({fill:t.chartOptions.fill,colorPalette:t.chartOptions.chartDatasetColors||Ae},i).value),o=b.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"start"in i.value.meta?i.value.meta.end-i.value.meta.start:void 0:0}),l=b.computed(()=>{var D;return(D=i==null?void 0:i.value)!=null&&D.meta?"startMs"in i.value.meta?i.value.meta.endMs-i.value.meta.startMs:void 0:0}),c=b.computed(()=>{var D;return(D=i.value.meta)!=null&&D.metricUnits?Object.values(i.value.meta.metricUnits)[0]:""}),u=b.computed(()=>t.showLegendValues&&t.legendPosition!==Ct.Bottom),{legendValues:d}=Ut.useChartLegendValues(s,t.chartOptions.type,c),h=b.computed(()=>{var D,C,L;return((L=(C=(D=i.value)==null?void 0:D.meta)==null?void 0:C.limit)==null?void 0:L.toString())||null}),f=b.computed(()=>{var D,C;return((C=(D=i.value)==null?void 0:D.meta)==null?void 0:C.truncated)||!1}),g=n.t("limitedResultsShown",{maxReturned:h.value}),v=b.computed(()=>[Ft.VERTICAL_BAR.toString(),Ft.HORIZONTAL_BAR.toString()].includes(r.value.type)),m=b.computed(()=>[Ft.TIMESERIES_BAR,Ft.TIMESERIES_LINE].some(D=>D===r.value.type)),p=b.computed(()=>r.value.type===Ft.DOUGHNUT),y=b.computed(()=>r.value.type.includes("Vertical")?"vertical":"horizontal"),_=b.computed(()=>{var L,W,st;if(!((L=i.value)!=null&&L.meta.metricNames)||!((W=i.value)!=null&&W.meta.metricUnits))return;const D=i.value.meta.metricNames[0],C=i.value.meta.metricUnits[D];return((st=r.value)==null?void 0:st.metricAxesTitle)||n.te(`metricAxisTitles.${D}`)&&n.te(`chartUnits.${C}`)&&n.t(`metricAxisTitles.${D}`,{unit:n.t(`chartUnits.${C}`)})||void 0}),x=b.computed(()=>{const D=m.value?"Time":Object.keys(i.value.meta.dimensions||i.value.meta.metricNames)[0];return r.value.dimensionAxesTitle||n.te(`chartLabels.${D}`)&&n.t(`chartLabels.${D}`)||void 0}),w=b.computed(()=>{if(i.value.meta.granularity&&typeof i.value.meta.granularity!="number"&&"duration"in i.value.meta.granularity){const D=_i(i.value.meta.granularity.duration);return n.t(`granularityAxisTitles.${D}`)}else if(i.value.meta.granularity&&!isNaN(Number(i.value.meta.granularity))){const D=_i(Number(i.value.meta.granularity));return n.t(`granularityAxisTitles.${D}`)}return n.t("chartlabels.Time")}),T=b.computed(()=>t.emptyStateTitle||n.t("noDataAvailableTitle")),M=b.computed(()=>t.emptyStateDescription||n.t("noDataAvailableDescription")),S=b.computed(()=>m.value?p_(s.value):i.value&&i.value.meta&&i.value.records.length),P=b.computed(()=>i.value.meta.granularity?typeof i.value.meta.granularity=="number"?_i(i.value.meta.granularity)||z.HOURLY:_i(i.value.meta.granularity.duration)||z.HOURLY:_i(new Date(i.value.records[1].timestamp).getTime()-new Date(i.value.records[0].timestamp).getTime())||z.HOURLY);return b.provide("showLegendValues",u),b.provide("legendPosition",a),(D,C)=>{const L=b.resolveComponent("KIcon"),W=b.resolveComponent("KTooltip"),st=b.resolveComponent("KEmptyState");return b.openBlock(),b.createElementBlock("div",zT,[b.createElementVNode("div",jT,[e.chartTitle?(b.openBlock(),b.createElementBlock("div",$T,b.toDisplayString(e.chartTitle),1)):b.createCommentVNode("",!0),b.createElementVNode("div",VT,[b.unref(S)&&b.unref(f)&&b.unref(h)?(b.openBlock(),b.createBlock(W,{key:0,class:"tooltip","max-width":"500",placement:"bottom"},{content:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(g)),1)]),default:b.withCtx(()=>[b.createElementVNode("div",qT,[b.createVNode(L,{class:"warning-icon",color:"var(--white, #ffffff)","hide-title":"",icon:"warning","secondary-color":"var(--yellow-400, #fabe5f)",size:"18"})])]),_:1})):b.createCommentVNode("",!0)])]),b.unref(S)?(b.openBlock(),b.createElementBlock("div",GT,[b.unref(m)?(b.openBlock(),b.createBlock(YT,{key:0,"chart-data":b.unref(s),"dataset-colors":e.chartOptions.chartDatasetColors,"dimension-axes-title":b.unref(w),fill:e.chartOptions.fill,granularity:b.unref(P),height:e.height,"legend-values":b.unref(d),"metric-axes-title":b.unref(_),"metric-unit":b.unref(c),stacked:e.chartOptions.stacked,"synthetics-data-key":e.syntheticsDataKey,"time-range-ms":b.unref(l),"time-range-sec":b.unref(o),"tooltip-title":e.tooltipTitle,type:e.chartOptions.type,width:e.width},null,8,["chart-data","dataset-colors","dimension-axes-title","fill","granularity","height","legend-values","metric-axes-title","metric-unit","stacked","synthetics-data-key","time-range-ms","time-range-sec","tooltip-title","type","width"])):b.unref(v)?(b.openBlock(),b.createBlock(kT,{key:1,annotations:e.showAnnotations,"chart-data":b.unref(s),"data-testid":"bar-chart-container","dimension-axes-title":b.unref(x),"legend-values":b.unref(d),"metric-axes-title":b.unref(_),"metric-unit":b.unref(c),orientation:b.unref(y),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle},null,8,["annotations","chart-data","dimension-axes-title","legend-values","metric-axes-title","metric-unit","orientation","synthetics-data-key","tooltip-title"])):b.unref(p)?(b.openBlock(),b.createBlock(UT,{key:2,"chart-data":b.unref(s),"dataset-colors":e.chartOptions.chartDatasetColors,fill:e.chartOptions.fill,"legend-position":e.legendPosition,"legend-values":b.unref(d),"metric-unit":b.unref(c),"synthetics-data-key":e.syntheticsDataKey,"tooltip-title":e.tooltipTitle,width:e.width},null,8,["chart-data","dataset-colors","fill","legend-position","legend-values","metric-unit","synthetics-data-key","tooltip-title","width"])):b.createCommentVNode("",!0)])):(b.openBlock(),b.createBlock(st,{key:0,class:"chart-empty-state","cta-is-hidden":!0,"data-testid":"no-data-in-report",icon:"stateNoData","icon-size":"170"},{title:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(T)),1)]),message:b.withCtx(()=>[b.createTextVNode(b.toDisplayString(b.unref(M)),1)]),_:1}))])}}}),yM="",KT=In(XT,[["__scopeId","data-v-aeb15ec5"]]),po="#e7e7ec",ZT={100:["#c8e2fd","#80bfff","#4da6ff","#1a8cff","#0072e5","#0059b2"],200:["#ceedd2","#9edca6","#89d595","#6fcc83","#44c26b","#0bb652","#0ca84a","#169643","#196e33","#1b572a"],300:["#fff4db","#ffe9b8","#ffe2a1","#ffd982","#ffd062","#fdc53b","#f4bb1e","#e8b00b","#d9a30f","#c89407"],400:["#ffead8","#ffd5b1","#ffc899","#ffba81","#ffae6b","#fe9439","#f6871d","#eb7c0c","#da700c","#cc6100"],500:["#ffd5d5","#ffb6b6","#ff9d9d","#ff8484","#ff6a6a","#ff4545","#fb1f1f","#e90b0b","#d40202","#be0202"]},Oi=(e,t)=>{let n=1;const i=ZT[e],r=new Map;for(const a of t)r.set(a,i[n]),n=n%(i.length-1)+1;return r.set(-1,i[0]),r},dh=new Map([[100,Oi("100",[100,101,102,103])],[200,Oi("200",[200,201,202,203,204,205,206,207,208,226])],[300,Oi("300",[300,301,302,303,304,305,307,308])],[400,Oi("400",[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,423,424,425,426,428,429,431,451])],[500,Oi("500",[500,501,502,503,504,505,506,507,508,510,511])]]),hh=e=>{const t=parseInt(e,10),n=Math.floor(t/100)*100,i=dh.get(n);return i===void 0?po:i.get(t)??i.get(-1)??po},QT=e=>{const t=hh(e);return{solid:t,light:t}};yt.AnalyticsChart=KT,yt.ChartLegendPosition=Ct,yt.ChartTypes=Ft,yt.accessibleGrey=md,yt.codesInSpec=dh,yt.darkenColor=Si,yt.datavisPalette=Ae,yt.lightGrey=po,yt.lookupDatavisColor=Mi,yt.lookupStatusCodeCategoryColor=QT,yt.lookupStatusCodeColor=hh,Object.defineProperty(yt,Symbol.toStringTag,{value:"Module"})});
|