unleash-server 4.22.0-beta.2 → 4.22.0-beta.21
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/lib/addons/feature-event-formatter-md.d.ts +12 -3
- package/dist/lib/addons/feature-event-formatter-md.js +135 -31
- package/dist/lib/addons/feature-event-formatter-md.js.map +1 -1
- package/dist/lib/addons/feature-event-formatter-md.test.d.ts +1 -0
- package/dist/lib/addons/feature-event-formatter-md.test.js +483 -0
- package/dist/lib/addons/feature-event-formatter-md.test.js.map +1 -0
- package/dist/lib/app.js +1 -1
- package/dist/lib/app.js.map +1 -1
- package/dist/lib/features/export-import-toggles/export-import-permissions.e2e.test.js +1 -1
- package/dist/lib/features/export-import-toggles/export-import-permissions.e2e.test.js.map +1 -1
- package/dist/lib/openapi/index.d.ts +46 -6
- package/dist/lib/openapi/spec/bulk-metrics-schema.d.ts +23 -3
- package/dist/lib/openapi/spec/bulk-registration-schema.d.ts +23 -3
- package/dist/lib/openapi/spec/bulk-registration-schema.js +15 -3
- package/dist/lib/openapi/spec/bulk-registration-schema.js.map +1 -1
- package/dist/lib/routes/admin-api/maintenance.d.ts +0 -1
- package/dist/lib/routes/admin-api/maintenance.js +0 -8
- package/dist/lib/routes/admin-api/maintenance.js.map +1 -1
- package/dist/lib/routes/admin-api/project/variants.js +29 -0
- package/dist/lib/routes/admin-api/project/variants.js.map +1 -1
- package/dist/lib/services/access-service.d.ts +2 -2
- package/dist/lib/services/access-service.js.map +1 -1
- package/dist/lib/types/experimental.d.ts +1 -2
- package/dist/lib/types/experimental.js +1 -2
- package/dist/lib/types/experimental.js.map +1 -1
- package/dist/migrations/20201216140726-add-last-seen-to-features.js +1 -0
- package/dist/migrations/20201216140726-add-last-seen-to-features.js.map +1 -1
- package/dist/migrations/20210105083014-add-tag-and-tag-types.js +1 -0
- package/dist/migrations/20210105083014-add-tag-and-tag-types.js.map +1 -1
- package/dist/migrations/20210119084617-add-addon-table.js +1 -0
- package/dist/migrations/20210119084617-add-addon-table.js.map +1 -1
- package/dist/migrations/20210212114759-add-session-table.js +1 -0
- package/dist/migrations/20210212114759-add-session-table.js.map +1 -1
- package/dist/migrations/20210217195834-rbac-tables.js +1 -0
- package/dist/migrations/20210217195834-rbac-tables.js.map +1 -1
- package/dist/migrations/20210409120136-create-reset-token-table.js +1 -0
- package/dist/migrations/20210409120136-create-reset-token-table.js.map +1 -1
- package/dist/migrations/20210414141220-fix-misspellings-in-role-descriptions.js +1 -0
- package/dist/migrations/20210414141220-fix-misspellings-in-role-descriptions.js.map +1 -1
- package/dist/migrations/20210423103647-lowercase-all-emails.js +1 -0
- package/dist/migrations/20210423103647-lowercase-all-emails.js.map +1 -1
- package/dist/migrations/20210428103923-onboard-projects-to-rbac.js +1 -0
- package/dist/migrations/20210428103923-onboard-projects-to-rbac.js.map +1 -1
- package/dist/migrations/20210504101429-deprecate-strategies.js +1 -0
- package/dist/migrations/20210504101429-deprecate-strategies.js.map +1 -1
- package/dist/migrations/20210615115226-migrate-strategies-to-feature-strategies.js +1 -0
- package/dist/migrations/20210615115226-migrate-strategies-to-feature-strategies.js.map +1 -1
- package/dist/migrations/20210618091331-project-environments-table.js +1 -0
- package/dist/migrations/20210618091331-project-environments-table.js.map +1 -1
- package/dist/migrations/20210618100913-add-cascade-for-user-feedback.js +1 -0
- package/dist/migrations/20210618100913-add-cascade-for-user-feedback.js.map +1 -1
- package/dist/migrations/20210624114855-drop-strategies-column-from-features.js +1 -0
- package/dist/migrations/20210624114855-drop-strategies-column-from-features.js.map +1 -1
- package/dist/migrations/20210624115109-drop-enabled-column-from-features.js +1 -0
- package/dist/migrations/20210624115109-drop-enabled-column-from-features.js.map +1 -1
- package/dist/migrations/20210625102126-connect-default-project-to-global-environment.js +1 -0
- package/dist/migrations/20210625102126-connect-default-project-to-global-environment.js.map +1 -1
- package/dist/migrations/20210629130734-add-health-rating-to-project.js +1 -0
- package/dist/migrations/20210629130734-add-health-rating-to-project.js.map +1 -1
- package/dist/migrations/20210830113948-connect-projects-to-global-envrionments.js +1 -0
- package/dist/migrations/20210830113948-connect-projects-to-global-envrionments.js.map +1 -1
- package/dist/migrations/20210831072631-add-sort-order-and-type-to-env.js +1 -0
- package/dist/migrations/20210831072631-add-sort-order-and-type-to-env.js.map +1 -1
- package/dist/migrations/20210907124058-add-dbcritic-indices.js +1 -0
- package/dist/migrations/20210907124058-add-dbcritic-indices.js.map +1 -1
- package/dist/migrations/20210907124850-add-dbcritic-primary-keys.js +1 -0
- package/dist/migrations/20210907124850-add-dbcritic-primary-keys.js.map +1 -1
- package/dist/migrations/20210908100701-add-enabled-to-environments.js +1 -0
- package/dist/migrations/20210908100701-add-enabled-to-environments.js.map +1 -1
- package/dist/migrations/20210909085651-add-protected-field-to-environments.js +1 -0
- package/dist/migrations/20210909085651-add-protected-field-to-environments.js.map +1 -1
- package/dist/migrations/20210913103159-api-keys-scoping.js +1 -0
- package/dist/migrations/20210913103159-api-keys-scoping.js.map +1 -1
- package/dist/migrations/20210928082228-connect-default-environment-to-all-existing-projects.js +1 -0
- package/dist/migrations/20210928082228-connect-default-environment-to-all-existing-projects.js.map +1 -1
- package/dist/migrations/20211004104917-client-metrics-env.js +1 -0
- package/dist/migrations/20211004104917-client-metrics-env.js.map +1 -1
- package/dist/migrations/20211109103930-add-splash-entry-for-users.js +1 -0
- package/dist/migrations/20211109103930-add-splash-entry-for-users.js.map +1 -1
- package/dist/migrations/20211126112551-disable-default-environment.js +1 -0
- package/dist/migrations/20211126112551-disable-default-environment.js.map +1 -1
- package/dist/migrations/20211202120808-add-custom-roles.js +1 -0
- package/dist/migrations/20211202120808-add-custom-roles.js.map +1 -1
- package/dist/migrations/20220103134659-add-permissions-to-project-roles.js +1 -0
- package/dist/migrations/20220103134659-add-permissions-to-project-roles.js.map +1 -1
- package/dist/migrations/20220103143843-add-permissions-to-editor-role.js +1 -0
- package/dist/migrations/20220103143843-add-permissions-to-editor-role.js.map +1 -1
- package/dist/migrations/20220111112804-update-permission-descriptions.js +1 -0
- package/dist/migrations/20220111112804-update-permission-descriptions.js.map +1 -1
- package/dist/migrations/20220111115613-move-feature-toggle-permission.js +1 -0
- package/dist/migrations/20220111115613-move-feature-toggle-permission.js.map +1 -1
- package/dist/migrations/20220111120346-roles-unique-name.js +1 -0
- package/dist/migrations/20220111120346-roles-unique-name.js.map +1 -1
- package/dist/migrations/20220111121010-update-project-for-editor-role.js +1 -0
- package/dist/migrations/20220111121010-update-project-for-editor-role.js.map +1 -1
- package/dist/migrations/20220111125620-role-permission-empty-string-for-non-environment-type.js +1 -0
- package/dist/migrations/20220111125620-role-permission-empty-string-for-non-environment-type.js.map +1 -1
- package/dist/migrations/20220224081422-remove-project-column-from-roles.js +1 -0
- package/dist/migrations/20220224081422-remove-project-column-from-roles.js.map +1 -1
- package/dist/migrations/20220408081222-clean-up-duplicate-foreign-key-role-permission.js +1 -0
- package/dist/migrations/20220408081222-clean-up-duplicate-foreign-key-role-permission.js.map +1 -1
- package/dist/migrations/20220711084613-add-projects-and-environments-for-addons.js +1 -0
- package/dist/migrations/20220711084613-add-projects-and-environments-for-addons.js.map +1 -1
- package/dist/migrations/20220808110415-add-projects-foreign-key.js +1 -0
- package/dist/migrations/20220808110415-add-projects-foreign-key.js.map +1 -1
- package/dist/migrations/20221108114358-add-change-request-permissions.js +1 -0
- package/dist/migrations/20221108114358-add-change-request-permissions.js.map +1 -1
- package/dist/migrations/20221125185244-change-request-unique-approvals.js +1 -0
- package/dist/migrations/20221125185244-change-request-unique-approvals.js.map +1 -1
- package/dist/migrations/20221128165141-change-request-min-approvals.js +1 -0
- package/dist/migrations/20221128165141-change-request-min-approvals.js.map +1 -1
- package/dist/migrations/20221205122253-skip-change-request.js +1 -0
- package/dist/migrations/20221205122253-skip-change-request.js.map +1 -1
- package/dist/migrations/20221220160345-user-pat-permissions.js +1 -0
- package/dist/migrations/20221220160345-user-pat-permissions.js.map +1 -1
- package/dist/migrations/20221221144132-service-account-users.js +1 -0
- package/dist/migrations/20221221144132-service-account-users.js.map +1 -1
- package/dist/migrations/20230125065315-project-stats-table.js +1 -0
- package/dist/migrations/20230125065315-project-stats-table.js.map +1 -1
- package/dist/migrations/20230127111638-new-project-stats-field.js +1 -0
- package/dist/migrations/20230127111638-new-project-stats-field.js.map +1 -1
- package/dist/migrations/20230130113337-revert-user-pat-permissions.js +1 -0
- package/dist/migrations/20230130113337-revert-user-pat-permissions.js.map +1 -1
- package/dist/migrations/20230208084046-project-api-token-permissions.js +1 -0
- package/dist/migrations/20230208084046-project-api-token-permissions.js.map +1 -1
- package/dist/migrations/20230208093627-assign-project-api-token-permissions-editor.js +1 -0
- package/dist/migrations/20230208093627-assign-project-api-token-permissions-editor.js.map +1 -1
- package/dist/migrations/20230208093750-assign-project-api-token-permissions-owner.js +1 -0
- package/dist/migrations/20230208093750-assign-project-api-token-permissions-owner.js.map +1 -1
- package/dist/migrations/20230208093942-assign-project-api-token-permissions-member.js +1 -0
- package/dist/migrations/20230208093942-assign-project-api-token-permissions-member.js.map +1 -1
- package/dist/migrations/20230222084211-add-login-events-table.js +1 -0
- package/dist/migrations/20230222084211-add-login-events-table.js.map +1 -1
- package/dist/migrations/20230222154915-create-notiications-table.js +4 -4
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.d.ts +2 -0
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.js +14 -0
- package/dist/migrations/20230224093446-drop-createdBy-from-notifications-table.js.map +1 -0
- package/dist/migrations/20230227115320-rename-login-events-table-to-sign-on-log.d.ts +2 -0
- package/dist/migrations/20230227115320-rename-login-events-table-to-sign-on-log.js +8 -0
- package/dist/migrations/20230227115320-rename-login-events-table-to-sign-on-log.js.map +1 -0
- package/dist/migrations/20230227120500-change-display-name-for-variants-per-env-permission.d.ts +2 -0
- package/dist/migrations/20230227120500-change-display-name-for-variants-per-env-permission.js +15 -0
- package/dist/migrations/20230227120500-change-display-name-for-variants-per-env-permission.js.map +1 -0
- package/dist/migrations/20230227123106-add-setting-for-sign-on-log-retention.d.ts +2 -0
- package/dist/migrations/20230227123106-add-setting-for-sign-on-log-retention.js +8 -0
- package/dist/migrations/20230227123106-add-setting-for-sign-on-log-retention.js.map +1 -0
- package/dist/server-dev.js +0 -1
- package/dist/server-dev.js.map +1 -1
- package/dist/test/e2e/api/admin/maintenance.e2e.test.js +2 -49
- package/dist/test/e2e/api/admin/maintenance.e2e.test.js.map +1 -1
- package/dist/test/e2e/stores/setting-store.e2e.test.js +1 -1
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/{CreateProject-b852657c.js → CreateProject-f7ca75e0.js} +1 -1
- package/frontend/build/static/{Error-29ef2974.js → Error-2a87926a.js} +1 -1
- package/frontend/build/static/{ExpandMore-4b3cbf87.js → ExpandMore-e298a9a3.js} +1 -1
- package/frontend/build/static/{FeatureArchiveDialog-f9d8c71d.js → FeatureArchiveDialog-31430c0e.js} +1 -1
- package/frontend/build/static/{FeatureMetricsChart-86cc2280.js → FeatureMetricsChart-bcb36dbc.js} +1 -1
- package/frontend/build/static/{FeatureViewLazyExport-1366d6bf.js → FeatureViewLazyExport-fe2a9be7.js} +2 -2
- package/frontend/build/static/{LazyAdminExport-d9800386.js → LazyAdminExport-9ff8d442.js} +13 -13
- package/frontend/build/static/{LazyProjectExport-ef4471a8.js → LazyProjectExport-644ec52e.js} +8 -8
- package/frontend/build/static/{NetworkOverview-4b90dc34.js → NetworkOverview-cecb7bdc.js} +1 -1
- package/frontend/build/static/{NetworkTraffic-c9de9d5f.js → NetworkTraffic-953679ab.js} +1 -1
- package/frontend/build/static/{Playground-ee072216.js → Playground-f8d65d33.js} +1 -1
- package/frontend/build/static/{StrategyItemContainer-b65caaa6.js → StrategyItemContainer-b3595995.js} +1 -1
- package/frontend/build/static/{chartjs-adapter-date-fns.esm-5c47f5e0.js → chartjs-adapter-date-fns.esm-ad422152.js} +7 -7
- package/frontend/build/static/{index-bbbae9a8.js → index-19ee2080.js} +1 -1
- package/frontend/build/static/index-1d8518d6.js +392 -0
- package/frontend/build/static/{index-031b8ec3.js → index-c5afb04d.js} +1 -1
- package/frontend/build/static/{unknownify-88f06eea.js → unknownify-21e26f46.js} +1 -1
- package/frontend/build/static/{useProjectRole-d8edb83e.js → useProjectRole-9a28ceaf.js} +1 -1
- package/frontend/package.json +3 -3
- package/package.json +2 -2
- package/frontend/build/static/index-193ec8c2.js +0 -392
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import{cK as T,e_ as pi,cL as rt,cM as E,e$ as gi,f0 as cc,f1 as lc,f2 as de,ej as uc,f3 as Pl,f4 as Sl,f5 as Ni,f6 as fc,f7 as Ml,f8 as kl,f9 as Rl,fa as zo,fb as Tl,fc as No,fd as Dl,fe as Cl,ff as $l,fg as El,r as bt,c9 as hc,bw as Al,fh as Il,fi as Ll,fj as Fl}from"./index-193ec8c2.js";import{a as co}from"./index-bbbae9a8.js";import{a as dc}from"./index-031b8ec3.js";var Bl=36e5;function zl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*Bl)}function Ho(n,t){var e,i,r,o,s,a,c,l;T(1,arguments);var u=gi(),f=rt((e=(i=(r=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&e!==void 0?e:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=E(n),d=h.getDay(),p=(d<f?7:0)+d-f;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}var Nl=6e4;function Hl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*Nl)}function Wl(n,t){T(2,arguments);var e=rt(t),i=e*3;return co(n,i)}function jl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*1e3)}function Vl(n,t){T(2,arguments);var e=rt(t),i=e*7;return dc(n,i)}function Yl(n,t){T(2,arguments);var e=rt(t);return co(n,e*12)}function Ul(n,t){T(2,arguments);var e=E(n),i=E(t),r=e.getFullYear()-i.getFullYear(),o=e.getMonth()-i.getMonth();return r*12+o}function ql(n,t){T(2,arguments);var e=E(n),i=E(t);return e.getFullYear()-i.getFullYear()}function yi(n,t){return T(2,arguments),E(n).getTime()-E(t).getTime()}var Wo={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Xl="trunc";function Pe(n){return n?Wo[n]:Wo[Xl]}function Kl(n,t,e){T(2,arguments);var i=yi(n,t)/cc;return Pe(e==null?void 0:e.roundingMethod)(i)}function Ql(n,t,e){T(2,arguments);var i=yi(n,t)/lc;return Pe(e==null?void 0:e.roundingMethod)(i)}function pc(n){T(1,arguments);var t=E(n);return t.setHours(23,59,59,999),t}function gc(n){T(1,arguments);var t=E(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Gl(n){T(1,arguments);var t=E(n);return pc(t).getTime()===gc(t).getTime()}function yc(n,t){T(2,arguments);var e=E(n),i=E(t),r=de(e,i),o=Math.abs(Ul(e,i)),s;if(o<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*o);var a=de(e,i)===-r;Gl(E(n))&&o===1&&de(n,i)===1&&(a=!1),s=r*(o-Number(a))}return s===0?0:s}function Zl(n,t,e){T(2,arguments);var i=yc(n,t)/3;return Pe(e==null?void 0:e.roundingMethod)(i)}function Jl(n,t,e){T(2,arguments);var i=yi(n,t)/1e3;return Pe(e==null?void 0:e.roundingMethod)(i)}function tu(n,t,e){T(2,arguments);var i=uc(n,t)/7;return Pe(e==null?void 0:e.roundingMethod)(i)}function eu(n,t){T(2,arguments);var e=E(n),i=E(t),r=de(e,i),o=Math.abs(ql(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=de(e,i)===-r,a=r*(o-Number(s));return a===0?0:a}function nu(n){T(1,arguments);var t=E(n);return t.setSeconds(0,0),t}function iu(n){T(1,arguments);var t=E(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function ru(n){T(1,arguments);var t=E(n);return t.setDate(1),t.setHours(0,0,0,0),t}function ou(n){T(1,arguments);var t=E(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function su(n){T(1,arguments);var t=E(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function au(n){T(1,arguments);var t=E(n);return t.setMinutes(59,59,999),t}function cu(n,t){var e,i,r,o,s,a,c,l;T(1,arguments);var u=gi(),f=rt((e=(i=(r=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&e!==void 0?e:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=E(n),d=h.getDay(),p=(d<f?-7:0)+6-(d-f);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function lu(n){T(1,arguments);var t=E(n);return t.setSeconds(59,999),t}function uu(n){T(1,arguments);var t=E(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function fu(n){T(1,arguments);var t=E(n);return t.setMilliseconds(999),t}function je(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(e){return typeof e}:je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(n)}function mc(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Hi(n,t)}function Hi(n,t){return Hi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Hi(n,t)}function bc(n){var t=du();return function(){var i=Mn(n),r;if(t){var o=Mn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return hu(this,r)}}function hu(n,t){return t&&(je(t)==="object"||typeof t=="function")?t:Wi(n)}function Wi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function du(){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 Mn(n){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(n)}function lo(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function uo(n,t,e){return t&&jo(n.prototype,t),e&&jo(n,e),n}function ji(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var pu=10,_c=function(){function n(){lo(this,n),ji(this,"subPriority",0)}return uo(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),gu=function(n){mc(e,n);var t=bc(e);function e(i,r,o,s,a){var c;return lo(this,e),c=t.call(this),c.value=i,c.validateValue=r,c.setValue=o,c.priority=s,a&&(c.subPriority=a),c}return uo(e,[{key:"validate",value:function(r,o){return this.validateValue(r,this.value,o)}},{key:"set",value:function(r,o,s){return this.setValue(r,o,this.value,s)}}]),e}(_c),yu=function(n){mc(e,n);var t=bc(e);function e(){var i;lo(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ji(Wi(i),"priority",pu),ji(Wi(i),"subPriority",-1),i}return uo(e,[{key:"set",value:function(r,o){if(o.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}}]),e}(_c);function mu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Vo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function bu(n,t,e){return t&&Vo(n.prototype,t),e&&Vo(n,e),n}var I=function(){function n(){mu(this,n)}return bu(n,[{key:"run",value:function(e,i,r,o){var s=this.parse(e,i,r,o);return s?{setter:new gu(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}();function Ve(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ve=function(e){return typeof e}:Ve=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(n)}function _u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Yo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function vu(n,t,e){return t&&Yo(n.prototype,t),e&&Yo(n,e),n}function xu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Vi(n,t)}function Vi(n,t){return Vi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Vi(n,t)}function wu(n){var t=Pu();return function(){var i=kn(n),r;if(t){var o=kn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Ou(this,r)}}function Ou(n,t){return t&&(Ve(t)==="object"||typeof t=="function")?t:Yi(n)}function Yi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Pu(){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 kn(n){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(n)}function Uo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Su=function(n){xu(e,n);var t=wu(e);function e(){var i;_u(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Uo(Yi(i),"priority",140),Uo(Yi(i),"incompatibleTokens",["R","u","t","T"]),i}return vu(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return o.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I),K={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}/},_t={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 Q(n,t){return n&&{value:t(n.value),rest:n.rest}}function U(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function vt(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var i=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,o=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(r*cc+o*lc+s*Pl),rest:t.slice(e[0].length)}}function vc(n){return U(K.anyDigitsSigned,n)}function X(n,t){switch(n){case 1:return U(K.singleDigit,t);case 2:return U(K.twoDigits,t);case 3:return U(K.threeDigits,t);case 4:return U(K.fourDigits,t);default:return U(new RegExp("^\\d{1,"+n+"}"),t)}}function Rn(n,t){switch(n){case 1:return U(K.singleDigitSigned,t);case 2:return U(K.twoDigitsSigned,t);case 3:return U(K.threeDigitsSigned,t);case 4:return U(K.fourDigitsSigned,t);default:return U(new RegExp("^-?\\d{1,"+n+"}"),t)}}function fo(n){switch(n){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 xc(n,t){var e=t>0,i=e?t:1-t,r;if(i<=50)r=n||100;else{var o=i+50,s=Math.floor(o/100)*100,a=n>=o%100;r=n+s-(a?100:0)}return e?r:1-r}function wc(n){return n%400===0||n%4===0&&n%100!==0}function Ye(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ye=function(e){return typeof e}:Ye=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(n)}function Mu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ku(n,t,e){return t&&qo(n.prototype,t),e&&qo(n,e),n}function Ru(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ui(n,t)}function Ui(n,t){return Ui=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ui(n,t)}function Tu(n){var t=Cu();return function(){var i=Tn(n),r;if(t){var o=Tn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Du(this,r)}}function Du(n,t){return t&&(Ye(t)==="object"||typeof t=="function")?t:qi(n)}function qi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Cu(){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 Tn(n){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(n)}function Xo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var $u=function(n){Ru(e,n);var t=Tu(e);function e(){var i;Mu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Xo(qi(i),"priority",130),Xo(qi(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return ku(e,[{key:"parse",value:function(r,o,s){var a=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Q(X(4,r),a);case"yo":return Q(s.ordinalNumber(r,{unit:"year"}),a);default:return Q(X(o.length,r),a)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,s){var a=r.getUTCFullYear();if(s.isTwoDigitYear){var c=xc(s.year,a);return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in o)||o.era===1?s.year:1-s.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ue(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ue=function(e){return typeof e}:Ue=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(n)}function Eu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Au(n,t,e){return t&&Ko(n.prototype,t),e&&Ko(n,e),n}function Iu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Xi(n,t)}function Xi(n,t){return Xi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Xi(n,t)}function Lu(n){var t=Bu();return function(){var i=Dn(n),r;if(t){var o=Dn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Fu(this,r)}}function Fu(n,t){return t&&(Ue(t)==="object"||typeof t=="function")?t:Ki(n)}function Ki(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Bu(){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 Dn(n){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dn(n)}function Qo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var zu=function(n){Iu(e,n);var t=Lu(e);function e(){var i;Eu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Qo(Ki(i),"priority",130),Qo(Ki(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Au(e,[{key:"parse",value:function(r,o,s){var a=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Q(X(4,r),a);case"Yo":return Q(s.ordinalNumber(r,{unit:"year"}),a);default:return Q(X(o.length,r),a)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,s,a){var c=Sl(r,a);if(s.isTwoDigitYear){var l=xc(s.year,c);return r.setUTCFullYear(l,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ni(r,a)}var u=!("era"in o)||o.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ni(r,a)}}]),e}(I);function qe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(e){return typeof e}:qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(n)}function Nu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Go(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Hu(n,t,e){return t&&Go(n.prototype,t),e&&Go(n,e),n}function Wu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Qi(n,t)}function Qi(n,t){return Qi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Qi(n,t)}function ju(n){var t=Yu();return function(){var i=Cn(n),r;if(t){var o=Cn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Vu(this,r)}}function Vu(n,t){return t&&(qe(t)==="object"||typeof t=="function")?t:Gi(n)}function Gi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Yu(){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 Cn(n){return Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cn(n)}function Zo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Uu=function(n){Wu(e,n);var t=ju(e);function e(){var i;Nu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Zo(Gi(i),"priority",130),Zo(Gi(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Hu(e,[{key:"parse",value:function(r,o){return Rn(o==="R"?4:o.length,r)}},{key:"set",value:function(r,o,s){var a=new Date(0);return a.setUTCFullYear(s,0,4),a.setUTCHours(0,0,0,0),fc(a)}}]),e}(I);function Xe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xe=function(e){return typeof e}:Xe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(n)}function qu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Jo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Xu(n,t,e){return t&&Jo(n.prototype,t),e&&Jo(n,e),n}function Ku(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Zi(n,t)}function Zi(n,t){return Zi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Zi(n,t)}function Qu(n){var t=Zu();return function(){var i=$n(n),r;if(t){var o=$n(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Gu(this,r)}}function Gu(n,t){return t&&(Xe(t)==="object"||typeof t=="function")?t:Ji(n)}function Ji(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Zu(){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 $n(n){return $n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(n)}function ts(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Ju=function(n){Ku(e,n);var t=Qu(e);function e(){var i;qu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ts(Ji(i),"priority",130),ts(Ji(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Xu(e,[{key:"parse",value:function(r,o){return Rn(o==="u"?4:o.length,r)}},{key:"set",value:function(r,o,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ke(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ke=function(e){return typeof e}:Ke=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(n)}function tf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function es(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ef(n,t,e){return t&&es(n.prototype,t),e&&es(n,e),n}function nf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&tr(n,t)}function tr(n,t){return tr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},tr(n,t)}function rf(n){var t=sf();return function(){var i=En(n),r;if(t){var o=En(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return of(this,r)}}function of(n,t){return t&&(Ke(t)==="object"||typeof t=="function")?t:er(n)}function er(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function sf(){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 En(n){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},En(n)}function ns(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var af=function(n){nf(e,n);var t=rf(e);function e(){var i;tf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ns(er(i),"priority",120),ns(er(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return ef(e,[{key:"parse",value:function(r,o,s){switch(o){case"Q":case"QQ":return X(o.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,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Qe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qe=function(e){return typeof e}:Qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(n)}function cf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function is(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function lf(n,t,e){return t&&is(n.prototype,t),e&&is(n,e),n}function uf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&nr(n,t)}function nr(n,t){return nr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},nr(n,t)}function ff(n){var t=df();return function(){var i=An(n),r;if(t){var o=An(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return hf(this,r)}}function hf(n,t){return t&&(Qe(t)==="object"||typeof t=="function")?t:ir(n)}function ir(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function df(){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 An(n){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},An(n)}function rs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var pf=function(n){uf(e,n);var t=ff(e);function e(){var i;cf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),rs(ir(i),"priority",120),rs(ir(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return lf(e,[{key:"parse",value:function(r,o,s){switch(o){case"q":case"qq":return X(o.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,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ge(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ge=function(e){return typeof e}:Ge=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(n)}function gf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function os(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function yf(n,t,e){return t&&os(n.prototype,t),e&&os(n,e),n}function mf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&rr(n,t)}function rr(n,t){return rr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},rr(n,t)}function bf(n){var t=vf();return function(){var i=In(n),r;if(t){var o=In(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return _f(this,r)}}function _f(n,t){return t&&(Ge(t)==="object"||typeof t=="function")?t:or(n)}function or(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function vf(){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 In(n){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},In(n)}function ss(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var xf=function(n){mf(e,n);var t=bf(e);function e(){var i;gf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ss(or(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ss(or(i),"priority",110),i}return yf(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l-1};switch(o){case"M":return Q(U(K.month,r),a);case"MM":return Q(X(2,r),a);case"Mo":return Q(s.ordinalNumber(r,{unit:"month"}),a);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,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ze(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(e){return typeof e}:Ze=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(n)}function wf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function as(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Of(n,t,e){return t&&as(n.prototype,t),e&&as(n,e),n}function Pf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&sr(n,t)}function sr(n,t){return sr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},sr(n,t)}function Sf(n){var t=kf();return function(){var i=Ln(n),r;if(t){var o=Ln(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mf(this,r)}}function Mf(n,t){return t&&(Ze(t)==="object"||typeof t=="function")?t:ar(n)}function ar(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function kf(){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 Ln(n){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(n)}function cs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Rf=function(n){Pf(e,n);var t=Sf(e);function e(){var i;wf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),cs(ar(i),"priority",110),cs(ar(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Of(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l-1};switch(o){case"L":return Q(U(K.month,r),a);case"LL":return Q(X(2,r),a);case"Lo":return Q(s.ordinalNumber(r,{unit:"month"}),a);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,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Tf(n,t,e){T(2,arguments);var i=E(n),r=rt(t),o=Ml(i,e)-r;return i.setUTCDate(i.getUTCDate()-o*7),i}function Je(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Je=function(e){return typeof e}:Je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(n)}function Df(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ls(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Cf(n,t,e){return t&&ls(n.prototype,t),e&&ls(n,e),n}function $f(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&cr(n,t)}function cr(n,t){return cr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},cr(n,t)}function Ef(n){var t=If();return function(){var i=Fn(n),r;if(t){var o=Fn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Af(this,r)}}function Af(n,t){return t&&(Je(t)==="object"||typeof t=="function")?t:lr(n)}function lr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function If(){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 Fn(n){return Fn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(n)}function us(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Lf=function(n){$f(e,n);var t=Ef(e);function e(){var i;Df(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),us(lr(i),"priority",100),us(lr(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Cf(e,[{key:"parse",value:function(r,o,s){switch(o){case"w":return U(K.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,s,a){return Ni(Tf(r,s,a),a)}}]),e}(I);function Ff(n,t){T(2,arguments);var e=E(n),i=rt(t),r=kl(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}function tn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tn=function(e){return typeof e}:tn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(n)}function Bf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function fs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function zf(n,t,e){return t&&fs(n.prototype,t),e&&fs(n,e),n}function Nf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&ur(n,t)}function ur(n,t){return ur=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},ur(n,t)}function Hf(n){var t=jf();return function(){var i=Bn(n),r;if(t){var o=Bn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Wf(this,r)}}function Wf(n,t){return t&&(tn(t)==="object"||typeof t=="function")?t:fr(n)}function fr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jf(){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 Bn(n){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(n)}function hs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Vf=function(n){Nf(e,n);var t=Hf(e);function e(){var i;Bf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),hs(fr(i),"priority",100),hs(fr(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return zf(e,[{key:"parse",value:function(r,o,s){switch(o){case"I":return U(K.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,s){return fc(Ff(r,s))}}]),e}(I);function en(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?en=function(e){return typeof e}:en=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(n)}function Yf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ds(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Uf(n,t,e){return t&&ds(n.prototype,t),e&&ds(n,e),n}function qf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&hr(n,t)}function hr(n,t){return hr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},hr(n,t)}function Xf(n){var t=Qf();return function(){var i=zn(n),r;if(t){var o=zn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Kf(this,r)}}function Kf(n,t){return t&&(en(t)==="object"||typeof t=="function")?t:nn(n)}function nn(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qf(){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 zn(n){return zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zn(n)}function Mi(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Gf=[31,28,31,30,31,30,31,31,30,31,30,31],Zf=[31,29,31,30,31,30,31,31,30,31,30,31],Jf=function(n){qf(e,n);var t=Xf(e);function e(){var i;Yf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Mi(nn(i),"priority",90),Mi(nn(i),"subPriority",1),Mi(nn(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Uf(e,[{key:"parse",value:function(r,o,s){switch(o){case"d":return U(K.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){var s=r.getUTCFullYear(),a=wc(s),c=r.getUTCMonth();return a?o>=1&&o<=Zf[c]:o>=1&&o<=Gf[c]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function rn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rn=function(e){return typeof e}:rn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(n)}function th(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ps(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function eh(n,t,e){return t&&ps(n.prototype,t),e&&ps(n,e),n}function nh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&dr(n,t)}function dr(n,t){return dr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},dr(n,t)}function ih(n){var t=oh();return function(){var i=Nn(n),r;if(t){var o=Nn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return rh(this,r)}}function rh(n,t){return t&&(rn(t)==="object"||typeof t=="function")?t:on(n)}function on(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function oh(){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 Nn(n){return Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Nn(n)}function ki(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var sh=function(n){nh(e,n);var t=ih(e);function e(){var i;th(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ki(on(i),"priority",90),ki(on(i),"subpriority",1),ki(on(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return eh(e,[{key:"parse",value:function(r,o,s){switch(o){case"D":case"DD":return U(K.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){var s=r.getUTCFullYear(),a=wc(s);return a?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function ho(n,t,e){var i,r,o,s,a,c,l,u;T(2,arguments);var f=gi(),h=rt((i=(r=(o=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.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 d=E(n),p=rt(t),g=d.getUTCDay(),y=p%7,m=(y+7)%7,b=(m<h?7:0)+p-g;return d.setUTCDate(d.getUTCDate()+b),d}function sn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sn=function(e){return typeof e}:sn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(n)}function ah(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ch(n,t,e){return t&&gs(n.prototype,t),e&&gs(n,e),n}function lh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&pr(n,t)}function pr(n,t){return pr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},pr(n,t)}function uh(n){var t=hh();return function(){var i=Hn(n),r;if(t){var o=Hn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return fh(this,r)}}function fh(n,t){return t&&(sn(t)==="object"||typeof t=="function")?t:gr(n)}function gr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function hh(){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 Hn(n){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hn(n)}function ys(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var dh=function(n){lh(e,n);var t=uh(e);function e(){var i;ah(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ys(gr(i),"priority",90),ys(gr(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return ch(e,[{key:"parse",value:function(r,o,s){switch(o){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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function an(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?an=function(e){return typeof e}:an=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(n)}function ph(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function gh(n,t,e){return t&&ms(n.prototype,t),e&&ms(n,e),n}function yh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&yr(n,t)}function yr(n,t){return yr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},yr(n,t)}function mh(n){var t=_h();return function(){var i=Wn(n),r;if(t){var o=Wn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return bh(this,r)}}function bh(n,t){return t&&(an(t)==="object"||typeof t=="function")?t:mr(n)}function mr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _h(){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 Wn(n){return Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wn(n)}function bs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var vh=function(n){yh(e,n);var t=mh(e);function e(){var i;ph(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),bs(mr(i),"priority",90),bs(mr(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return gh(e,[{key:"parse",value:function(r,o,s,a){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+a.weekStartsOn+6)%7+f};switch(o){case"e":case"ee":return Q(X(o.length,r),c);case"eo":return Q(s.ordinalNumber(r,{unit:"day"}),c);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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function cn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cn=function(e){return typeof e}:cn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(n)}function xh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function _s(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function wh(n,t,e){return t&&_s(n.prototype,t),e&&_s(n,e),n}function Oh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&br(n,t)}function br(n,t){return br=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},br(n,t)}function Ph(n){var t=Mh();return function(){var i=jn(n),r;if(t){var o=jn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Sh(this,r)}}function Sh(n,t){return t&&(cn(t)==="object"||typeof t=="function")?t:_r(n)}function _r(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Mh(){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 jn(n){return jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(n)}function vs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var kh=function(n){Oh(e,n);var t=Ph(e);function e(){var i;xh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),vs(_r(i),"priority",90),vs(_r(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return wh(e,[{key:"parse",value:function(r,o,s,a){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+a.weekStartsOn+6)%7+f};switch(o){case"c":case"cc":return Q(X(o.length,r),c);case"co":return Q(s.ordinalNumber(r,{unit:"day"}),c);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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Rh(n,t){T(2,arguments);var e=rt(t);e%7===0&&(e=e-7);var i=1,r=E(n),o=r.getUTCDay(),s=e%7,a=(s+7)%7,c=(a<i?7:0)+e-o;return r.setUTCDate(r.getUTCDate()+c),r}function ln(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ln=function(e){return typeof e}:ln=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(n)}function Th(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function xs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Dh(n,t,e){return t&&xs(n.prototype,t),e&&xs(n,e),n}function Ch(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&vr(n,t)}function vr(n,t){return vr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},vr(n,t)}function $h(n){var t=Ah();return function(){var i=Vn(n),r;if(t){var o=Vn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Eh(this,r)}}function Eh(n,t){return t&&(ln(t)==="object"||typeof t=="function")?t:xr(n)}function xr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ah(){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 Vn(n){return Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vn(n)}function ws(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Ih=function(n){Ch(e,n);var t=$h(e);function e(){var i;Th(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ws(xr(i),"priority",90),ws(xr(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l===0?7:l};switch(o){case"i":case"ii":return X(o.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Q(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiii":return Q(s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Q(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Q(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"}),a)}}},{key:"validate",value:function(r,o){return o>=1&&o<=7}},{key:"set",value:function(r,o,s){return r=Rh(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function un(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?un=function(e){return typeof e}:un=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(n)}function Lh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Fh(n,t,e){return t&&Os(n.prototype,t),e&&Os(n,e),n}function Bh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&wr(n,t)}function wr(n,t){return wr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},wr(n,t)}function zh(n){var t=Hh();return function(){var i=Yn(n),r;if(t){var o=Yn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Nh(this,r)}}function Nh(n,t){return t&&(un(t)==="object"||typeof t=="function")?t:Or(n)}function Or(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Hh(){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 Yn(n){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yn(n)}function Ps(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Wh=function(n){Bh(e,n);var t=zh(e);function e(){var i;Lh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ps(Or(i),"priority",80),Ps(Or(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Fh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function fn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fn=function(e){return typeof e}:fn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(n)}function jh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ss(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Vh(n,t,e){return t&&Ss(n.prototype,t),e&&Ss(n,e),n}function Yh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Pr(n,t)}function Pr(n,t){return Pr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Pr(n,t)}function Uh(n){var t=Xh();return function(){var i=Un(n),r;if(t){var o=Un(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return qh(this,r)}}function qh(n,t){return t&&(fn(t)==="object"||typeof t=="function")?t:Sr(n)}function Sr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Xh(){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 Un(n){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Un(n)}function Ms(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Kh=function(n){Yh(e,n);var t=Uh(e);function e(){var i;jh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ms(Sr(i),"priority",80),Ms(Sr(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Vh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function hn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hn=function(e){return typeof e}:hn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(n)}function Qh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ks(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Gh(n,t,e){return t&&ks(n.prototype,t),e&&ks(n,e),n}function Zh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Mr(n,t)}function Mr(n,t){return Mr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Mr(n,t)}function Jh(n){var t=ed();return function(){var i=qn(n),r;if(t){var o=qn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return td(this,r)}}function td(n,t){return t&&(hn(t)==="object"||typeof t=="function")?t:kr(n)}function kr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ed(){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 qn(n){return qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qn(n)}function Rs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var nd=function(n){Zh(e,n);var t=Jh(e);function e(){var i;Qh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Rs(kr(i),"priority",80),Rs(kr(i),"incompatibleTokens",["a","b","t","T"]),i}return Gh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function dn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dn=function(e){return typeof e}:dn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(n)}function id(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ts(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function rd(n,t,e){return t&&Ts(n.prototype,t),e&&Ts(n,e),n}function od(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Rr(n,t)}function Rr(n,t){return Rr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Rr(n,t)}function sd(n){var t=cd();return function(){var i=Xn(n),r;if(t){var o=Xn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return ad(this,r)}}function ad(n,t){return t&&(dn(t)==="object"||typeof t=="function")?t:Tr(n)}function Tr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function cd(){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 Xn(n){return Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xn(n)}function Ds(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var ld=function(n){od(e,n);var t=sd(e);function e(){var i;id(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ds(Tr(i),"priority",70),Ds(Tr(i),"incompatibleTokens",["H","K","k","t","T"]),i}return rd(e,[{key:"parse",value:function(r,o,s){switch(o){case"h":return U(K.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=12}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return a&&s<12?r.setUTCHours(s+12,0,0,0):!a&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(I);function pn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pn=function(e){return typeof e}:pn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(n)}function ud(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Cs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function fd(n,t,e){return t&&Cs(n.prototype,t),e&&Cs(n,e),n}function hd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Dr(n,t)}function Dr(n,t){return Dr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Dr(n,t)}function dd(n){var t=gd();return function(){var i=Kn(n),r;if(t){var o=Kn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return pd(this,r)}}function pd(n,t){return t&&(pn(t)==="object"||typeof t=="function")?t:Cr(n)}function Cr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function gd(){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 Kn(n){return Kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kn(n)}function $s(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var yd=function(n){hd(e,n);var t=dd(e);function e(){var i;ud(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),$s(Cr(i),"priority",70),$s(Cr(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return fd(e,[{key:"parse",value:function(r,o,s){switch(o){case"H":return U(K.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=23}},{key:"set",value:function(r,o,s){return r.setUTCHours(s,0,0,0),r}}]),e}(I);function gn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gn=function(e){return typeof e}:gn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(n)}function md(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Es(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function bd(n,t,e){return t&&Es(n.prototype,t),e&&Es(n,e),n}function _d(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&$r(n,t)}function $r(n,t){return $r=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},$r(n,t)}function vd(n){var t=wd();return function(){var i=Qn(n),r;if(t){var o=Qn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return xd(this,r)}}function xd(n,t){return t&&(gn(t)==="object"||typeof t=="function")?t:Er(n)}function Er(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function wd(){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 Qn(n){return Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qn(n)}function As(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Od=function(n){_d(e,n);var t=vd(e);function e(){var i;md(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),As(Er(i),"priority",70),As(Er(i),"incompatibleTokens",["h","H","k","t","T"]),i}return bd(e,[{key:"parse",value:function(r,o,s){switch(o){case"K":return U(K.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return a&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(I);function yn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yn=function(e){return typeof e}:yn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yn(n)}function Pd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Sd(n,t,e){return t&&Is(n.prototype,t),e&&Is(n,e),n}function Md(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ar(n,t)}function Ar(n,t){return Ar=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ar(n,t)}function kd(n){var t=Td();return function(){var i=Gn(n),r;if(t){var o=Gn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Rd(this,r)}}function Rd(n,t){return t&&(yn(t)==="object"||typeof t=="function")?t:Ir(n)}function Ir(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Td(){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 Gn(n){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gn(n)}function Ls(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Dd=function(n){Md(e,n);var t=kd(e);function e(){var i;Pd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ls(Ir(i),"priority",70),Ls(Ir(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Sd(e,[{key:"parse",value:function(r,o,s){switch(o){case"k":return U(K.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=24}},{key:"set",value:function(r,o,s){var a=s<=24?s%24:s;return r.setUTCHours(a,0,0,0),r}}]),e}(I);function mn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mn=function(e){return typeof e}:mn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(n)}function Cd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Fs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function $d(n,t,e){return t&&Fs(n.prototype,t),e&&Fs(n,e),n}function Ed(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Lr(n,t)}function Lr(n,t){return Lr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Lr(n,t)}function Ad(n){var t=Ld();return function(){var i=Zn(n),r;if(t){var o=Zn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Id(this,r)}}function Id(n,t){return t&&(mn(t)==="object"||typeof t=="function")?t:Fr(n)}function Fr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ld(){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 Zn(n){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zn(n)}function Bs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Fd=function(n){Ed(e,n);var t=Ad(e);function e(){var i;Cd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Bs(Fr(i),"priority",60),Bs(Fr(i),"incompatibleTokens",["t","T"]),i}return $d(e,[{key:"parse",value:function(r,o,s){switch(o){case"m":return U(K.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCMinutes(s,0,0),r}}]),e}(I);function bn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bn=function(e){return typeof e}:bn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(n)}function Bd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function zd(n,t,e){return t&&zs(n.prototype,t),e&&zs(n,e),n}function Nd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Br(n,t)}function Br(n,t){return Br=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Br(n,t)}function Hd(n){var t=jd();return function(){var i=Jn(n),r;if(t){var o=Jn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Wd(this,r)}}function Wd(n,t){return t&&(bn(t)==="object"||typeof t=="function")?t:zr(n)}function zr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jd(){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 Jn(n){return Jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jn(n)}function Ns(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Vd=function(n){Nd(e,n);var t=Hd(e);function e(){var i;Bd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ns(zr(i),"priority",50),Ns(zr(i),"incompatibleTokens",["t","T"]),i}return zd(e,[{key:"parse",value:function(r,o,s){switch(o){case"s":return U(K.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCSeconds(s,0),r}}]),e}(I);function _n(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_n=function(e){return typeof e}:_n=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_n(n)}function Yd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Hs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Ud(n,t,e){return t&&Hs(n.prototype,t),e&&Hs(n,e),n}function qd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Nr(n,t)}function Nr(n,t){return Nr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Nr(n,t)}function Xd(n){var t=Qd();return function(){var i=ti(n),r;if(t){var o=ti(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Kd(this,r)}}function Kd(n,t){return t&&(_n(t)==="object"||typeof t=="function")?t:Hr(n)}function Hr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qd(){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 ti(n){return ti=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ti(n)}function Ws(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Gd=function(n){qd(e,n);var t=Xd(e);function e(){var i;Yd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ws(Hr(i),"priority",30),Ws(Hr(i),"incompatibleTokens",["t","T"]),i}return Ud(e,[{key:"parse",value:function(r,o){var s=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Q(X(o.length,r),s)}},{key:"set",value:function(r,o,s){return r.setUTCMilliseconds(s),r}}]),e}(I);function vn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vn=function(e){return typeof e}:vn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(n)}function Zd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function js(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Jd(n,t,e){return t&&js(n.prototype,t),e&&js(n,e),n}function tp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Wr(n,t)}function Wr(n,t){return Wr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Wr(n,t)}function ep(n){var t=ip();return function(){var i=ei(n),r;if(t){var o=ei(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return np(this,r)}}function np(n,t){return t&&(vn(t)==="object"||typeof t=="function")?t:jr(n)}function jr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ip(){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 ei(n){return ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ei(n)}function Vs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var rp=function(n){tp(e,n);var t=ep(e);function e(){var i;Zd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Vs(jr(i),"priority",10),Vs(jr(i),"incompatibleTokens",["t","T","x"]),i}return Jd(e,[{key:"parse",value:function(r,o){switch(o){case"X":return vt(_t.basicOptionalMinutes,r);case"XX":return vt(_t.basic,r);case"XXXX":return vt(_t.basicOptionalSeconds,r);case"XXXXX":return vt(_t.extendedOptionalSeconds,r);case"XXX":default:return vt(_t.extended,r)}}},{key:"set",value:function(r,o,s){return o.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(I);function xn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xn=function(e){return typeof e}:xn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(n)}function op(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ys(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function sp(n,t,e){return t&&Ys(n.prototype,t),e&&Ys(n,e),n}function ap(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Vr(n,t)}function Vr(n,t){return Vr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Vr(n,t)}function cp(n){var t=up();return function(){var i=ni(n),r;if(t){var o=ni(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return lp(this,r)}}function lp(n,t){return t&&(xn(t)==="object"||typeof t=="function")?t:Yr(n)}function Yr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function up(){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 ni(n){return ni=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ni(n)}function Us(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var fp=function(n){ap(e,n);var t=cp(e);function e(){var i;op(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Us(Yr(i),"priority",10),Us(Yr(i),"incompatibleTokens",["t","T","X"]),i}return sp(e,[{key:"parse",value:function(r,o){switch(o){case"x":return vt(_t.basicOptionalMinutes,r);case"xx":return vt(_t.basic,r);case"xxxx":return vt(_t.basicOptionalSeconds,r);case"xxxxx":return vt(_t.extendedOptionalSeconds,r);case"xxx":default:return vt(_t.extended,r)}}},{key:"set",value:function(r,o,s){return o.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(I);function wn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wn=function(e){return typeof e}:wn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(n)}function hp(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function qs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function dp(n,t,e){return t&&qs(n.prototype,t),e&&qs(n,e),n}function pp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ur(n,t)}function Ur(n,t){return Ur=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ur(n,t)}function gp(n){var t=mp();return function(){var i=ii(n),r;if(t){var o=ii(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return yp(this,r)}}function yp(n,t){return t&&(wn(t)==="object"||typeof t=="function")?t:qr(n)}function qr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function mp(){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 ii(n){return ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ii(n)}function Xs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var bp=function(n){pp(e,n);var t=gp(e);function e(){var i;hp(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Xs(qr(i),"priority",40),Xs(qr(i),"incompatibleTokens","*"),i}return dp(e,[{key:"parse",value:function(r){return vc(r)}},{key:"set",value:function(r,o,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(I);function On(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(e){return typeof e}:On=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(n)}function _p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ks(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function vp(n,t,e){return t&&Ks(n.prototype,t),e&&Ks(n,e),n}function xp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Xr(n,t)}function Xr(n,t){return Xr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Xr(n,t)}function wp(n){var t=Pp();return function(){var i=ri(n),r;if(t){var o=ri(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Op(this,r)}}function Op(n,t){return t&&(On(t)==="object"||typeof t=="function")?t:Kr(n)}function Kr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Pp(){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 ri(n){return ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ri(n)}function Qs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Sp=function(n){xp(e,n);var t=wp(e);function e(){var i;_p(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Qs(Kr(i),"priority",20),Qs(Kr(i),"incompatibleTokens","*"),i}return vp(e,[{key:"parse",value:function(r){return vc(r)}},{key:"set",value:function(r,o,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(I),Mp={G:new Su,y:new $u,Y:new zu,R:new Uu,u:new Ju,Q:new af,q:new pf,M:new xf,L:new Rf,w:new Lf,I:new Vf,d:new Jf,D:new sh,E:new dh,e:new vh,c:new kh,i:new Ih,a:new Wh,b:new Kh,B:new nd,h:new ld,H:new yd,K:new Od,k:new Dd,m:new Fd,s:new Vd,S:new Gd,X:new rp,x:new fp,t:new bp,T:new Sp};function Pn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pn=function(e){return typeof e}:Pn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(n)}function Gs(n,t){var e;if(typeof Symbol>"u"||n[Symbol.iterator]==null){if(Array.isArray(n)||(e=kp(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){e=n[Symbol.iterator]()},n:function(){var l=e.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(s)throw a}}}}function kp(n,t){if(n){if(typeof n=="string")return Zs(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Zs(n,t)}}function Zs(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}var Rp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dp=/^'([^]*?)'?$/,Cp=/''/g
|
|
1
|
+
import{cK as T,f0 as pi,cL as rt,cM as $,f1 as gi,f2 as cc,f3 as lc,f4 as de,ek as uc,f5 as Pl,f6 as Sl,f7 as Ni,f8 as fc,f9 as Ml,fa as kl,fb as Rl,fc as zo,fd as Tl,fe as No,ff as Dl,fg as Cl,fh as El,fi as $l,r as bt,c9 as hc,bw as Al,fj as Il,fk as Ll,fl as Fl}from"./index-1d8518d6.js";import{a as co}from"./index-19ee2080.js";import{a as dc}from"./index-c5afb04d.js";var Bl=36e5;function zl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*Bl)}function Ho(n,t){var e,i,r,o,s,a,c,l;T(1,arguments);var u=gi(),f=rt((e=(i=(r=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&e!==void 0?e:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$(n),d=h.getDay(),p=(d<f?7:0)+d-f;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}var Nl=6e4;function Hl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*Nl)}function Wl(n,t){T(2,arguments);var e=rt(t),i=e*3;return co(n,i)}function jl(n,t){T(2,arguments);var e=rt(t);return pi(n,e*1e3)}function Vl(n,t){T(2,arguments);var e=rt(t),i=e*7;return dc(n,i)}function Yl(n,t){T(2,arguments);var e=rt(t);return co(n,e*12)}function Ul(n,t){T(2,arguments);var e=$(n),i=$(t),r=e.getFullYear()-i.getFullYear(),o=e.getMonth()-i.getMonth();return r*12+o}function ql(n,t){T(2,arguments);var e=$(n),i=$(t);return e.getFullYear()-i.getFullYear()}function yi(n,t){return T(2,arguments),$(n).getTime()-$(t).getTime()}var Wo={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Xl="trunc";function Pe(n){return n?Wo[n]:Wo[Xl]}function Kl(n,t,e){T(2,arguments);var i=yi(n,t)/cc;return Pe(e==null?void 0:e.roundingMethod)(i)}function Ql(n,t,e){T(2,arguments);var i=yi(n,t)/lc;return Pe(e==null?void 0:e.roundingMethod)(i)}function pc(n){T(1,arguments);var t=$(n);return t.setHours(23,59,59,999),t}function gc(n){T(1,arguments);var t=$(n),e=t.getMonth();return t.setFullYear(t.getFullYear(),e+1,0),t.setHours(23,59,59,999),t}function Gl(n){T(1,arguments);var t=$(n);return pc(t).getTime()===gc(t).getTime()}function yc(n,t){T(2,arguments);var e=$(n),i=$(t),r=de(e,i),o=Math.abs(Ul(e,i)),s;if(o<1)s=0;else{e.getMonth()===1&&e.getDate()>27&&e.setDate(30),e.setMonth(e.getMonth()-r*o);var a=de(e,i)===-r;Gl($(n))&&o===1&&de(n,i)===1&&(a=!1),s=r*(o-Number(a))}return s===0?0:s}function Zl(n,t,e){T(2,arguments);var i=yc(n,t)/3;return Pe(e==null?void 0:e.roundingMethod)(i)}function Jl(n,t,e){T(2,arguments);var i=yi(n,t)/1e3;return Pe(e==null?void 0:e.roundingMethod)(i)}function tu(n,t,e){T(2,arguments);var i=uc(n,t)/7;return Pe(e==null?void 0:e.roundingMethod)(i)}function eu(n,t){T(2,arguments);var e=$(n),i=$(t),r=de(e,i),o=Math.abs(ql(e,i));e.setFullYear(1584),i.setFullYear(1584);var s=de(e,i)===-r,a=r*(o-Number(s));return a===0?0:a}function nu(n){T(1,arguments);var t=$(n);return t.setSeconds(0,0),t}function iu(n){T(1,arguments);var t=$(n),e=t.getMonth(),i=e-e%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function ru(n){T(1,arguments);var t=$(n);return t.setDate(1),t.setHours(0,0,0,0),t}function ou(n){T(1,arguments);var t=$(n),e=t.getFullYear();return t.setFullYear(e+1,0,0),t.setHours(23,59,59,999),t}function su(n){T(1,arguments);var t=$(n),e=new Date(0);return e.setFullYear(t.getFullYear(),0,1),e.setHours(0,0,0,0),e}function au(n){T(1,arguments);var t=$(n);return t.setMinutes(59,59,999),t}function cu(n,t){var e,i,r,o,s,a,c,l;T(1,arguments);var u=gi(),f=rt((e=(i=(r=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&e!==void 0?e:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=$(n),d=h.getDay(),p=(d<f?-7:0)+6-(d-f);return h.setDate(h.getDate()+p),h.setHours(23,59,59,999),h}function lu(n){T(1,arguments);var t=$(n);return t.setSeconds(59,999),t}function uu(n){T(1,arguments);var t=$(n),e=t.getMonth(),i=e-e%3+3;return t.setMonth(i,0),t.setHours(23,59,59,999),t}function fu(n){T(1,arguments);var t=$(n);return t.setMilliseconds(999),t}function je(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(e){return typeof e}:je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(n)}function mc(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Hi(n,t)}function Hi(n,t){return Hi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Hi(n,t)}function bc(n){var t=du();return function(){var i=Mn(n),r;if(t){var o=Mn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return hu(this,r)}}function hu(n,t){return t&&(je(t)==="object"||typeof t=="function")?t:Wi(n)}function Wi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function du(){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 Mn(n){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(n)}function lo(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function jo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function uo(n,t,e){return t&&jo(n.prototype,t),e&&jo(n,e),n}function ji(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var pu=10,_c=function(){function n(){lo(this,n),ji(this,"subPriority",0)}return uo(n,[{key:"validate",value:function(e,i){return!0}}]),n}(),gu=function(n){mc(e,n);var t=bc(e);function e(i,r,o,s,a){var c;return lo(this,e),c=t.call(this),c.value=i,c.validateValue=r,c.setValue=o,c.priority=s,a&&(c.subPriority=a),c}return uo(e,[{key:"validate",value:function(r,o){return this.validateValue(r,this.value,o)}},{key:"set",value:function(r,o,s){return this.setValue(r,o,this.value,s)}}]),e}(_c),yu=function(n){mc(e,n);var t=bc(e);function e(){var i;lo(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ji(Wi(i),"priority",pu),ji(Wi(i),"subPriority",-1),i}return uo(e,[{key:"set",value:function(r,o){if(o.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}}]),e}(_c);function mu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Vo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function bu(n,t,e){return t&&Vo(n.prototype,t),e&&Vo(n,e),n}var I=function(){function n(){mu(this,n)}return bu(n,[{key:"run",value:function(e,i,r,o){var s=this.parse(e,i,r,o);return s?{setter:new gu(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(e,i,r){return!0}}]),n}();function Ve(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ve=function(e){return typeof e}:Ve=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(n)}function _u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Yo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function vu(n,t,e){return t&&Yo(n.prototype,t),e&&Yo(n,e),n}function xu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Vi(n,t)}function Vi(n,t){return Vi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Vi(n,t)}function wu(n){var t=Pu();return function(){var i=kn(n),r;if(t){var o=kn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Ou(this,r)}}function Ou(n,t){return t&&(Ve(t)==="object"||typeof t=="function")?t:Yi(n)}function Yi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Pu(){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 kn(n){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(n)}function Uo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Su=function(n){xu(e,n);var t=wu(e);function e(){var i;_u(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Uo(Yi(i),"priority",140),Uo(Yi(i),"incompatibleTokens",["R","u","t","T"]),i}return vu(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return o.era=s,r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I),K={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}/},_t={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 Q(n,t){return n&&{value:t(n.value),rest:n.rest}}function U(n,t){var e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function vt(n,t){var e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};var i=e[1]==="+"?1:-1,r=e[2]?parseInt(e[2],10):0,o=e[3]?parseInt(e[3],10):0,s=e[5]?parseInt(e[5],10):0;return{value:i*(r*cc+o*lc+s*Pl),rest:t.slice(e[0].length)}}function vc(n){return U(K.anyDigitsSigned,n)}function X(n,t){switch(n){case 1:return U(K.singleDigit,t);case 2:return U(K.twoDigits,t);case 3:return U(K.threeDigits,t);case 4:return U(K.fourDigits,t);default:return U(new RegExp("^\\d{1,"+n+"}"),t)}}function Rn(n,t){switch(n){case 1:return U(K.singleDigitSigned,t);case 2:return U(K.twoDigitsSigned,t);case 3:return U(K.threeDigitsSigned,t);case 4:return U(K.fourDigitsSigned,t);default:return U(new RegExp("^-?\\d{1,"+n+"}"),t)}}function fo(n){switch(n){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 xc(n,t){var e=t>0,i=e?t:1-t,r;if(i<=50)r=n||100;else{var o=i+50,s=Math.floor(o/100)*100,a=n>=o%100;r=n+s-(a?100:0)}return e?r:1-r}function wc(n){return n%400===0||n%4===0&&n%100!==0}function Ye(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ye=function(e){return typeof e}:Ye=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(n)}function Mu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function qo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ku(n,t,e){return t&&qo(n.prototype,t),e&&qo(n,e),n}function Ru(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ui(n,t)}function Ui(n,t){return Ui=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ui(n,t)}function Tu(n){var t=Cu();return function(){var i=Tn(n),r;if(t){var o=Tn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Du(this,r)}}function Du(n,t){return t&&(Ye(t)==="object"||typeof t=="function")?t:qi(n)}function qi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Cu(){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 Tn(n){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(n)}function Xo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Eu=function(n){Ru(e,n);var t=Tu(e);function e(){var i;Mu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Xo(qi(i),"priority",130),Xo(qi(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return ku(e,[{key:"parse",value:function(r,o,s){var a=function(l){return{year:l,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Q(X(4,r),a);case"yo":return Q(s.ordinalNumber(r,{unit:"year"}),a);default:return Q(X(o.length,r),a)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,s){var a=r.getUTCFullYear();if(s.isTwoDigitYear){var c=xc(s.year,a);return r.setUTCFullYear(c,0,1),r.setUTCHours(0,0,0,0),r}var l=!("era"in o)||o.era===1?s.year:1-s.year;return r.setUTCFullYear(l,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ue(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ue=function(e){return typeof e}:Ue=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(n)}function $u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ko(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Au(n,t,e){return t&&Ko(n.prototype,t),e&&Ko(n,e),n}function Iu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Xi(n,t)}function Xi(n,t){return Xi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Xi(n,t)}function Lu(n){var t=Bu();return function(){var i=Dn(n),r;if(t){var o=Dn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Fu(this,r)}}function Fu(n,t){return t&&(Ue(t)==="object"||typeof t=="function")?t:Ki(n)}function Ki(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Bu(){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 Dn(n){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dn(n)}function Qo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var zu=function(n){Iu(e,n);var t=Lu(e);function e(){var i;$u(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Qo(Ki(i),"priority",130),Qo(Ki(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Au(e,[{key:"parse",value:function(r,o,s){var a=function(l){return{year:l,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Q(X(4,r),a);case"Yo":return Q(s.ordinalNumber(r,{unit:"year"}),a);default:return Q(X(o.length,r),a)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,s,a){var c=Sl(r,a);if(s.isTwoDigitYear){var l=xc(s.year,c);return r.setUTCFullYear(l,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ni(r,a)}var u=!("era"in o)||o.era===1?s.year:1-s.year;return r.setUTCFullYear(u,0,a.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ni(r,a)}}]),e}(I);function qe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qe=function(e){return typeof e}:qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(n)}function Nu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Go(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Hu(n,t,e){return t&&Go(n.prototype,t),e&&Go(n,e),n}function Wu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Qi(n,t)}function Qi(n,t){return Qi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Qi(n,t)}function ju(n){var t=Yu();return function(){var i=Cn(n),r;if(t){var o=Cn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Vu(this,r)}}function Vu(n,t){return t&&(qe(t)==="object"||typeof t=="function")?t:Gi(n)}function Gi(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Yu(){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 Cn(n){return Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Cn(n)}function Zo(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Uu=function(n){Wu(e,n);var t=ju(e);function e(){var i;Nu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Zo(Gi(i),"priority",130),Zo(Gi(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Hu(e,[{key:"parse",value:function(r,o){return Rn(o==="R"?4:o.length,r)}},{key:"set",value:function(r,o,s){var a=new Date(0);return a.setUTCFullYear(s,0,4),a.setUTCHours(0,0,0,0),fc(a)}}]),e}(I);function Xe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xe=function(e){return typeof e}:Xe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(n)}function qu(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Jo(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Xu(n,t,e){return t&&Jo(n.prototype,t),e&&Jo(n,e),n}function Ku(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Zi(n,t)}function Zi(n,t){return Zi=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Zi(n,t)}function Qu(n){var t=Zu();return function(){var i=En(n),r;if(t){var o=En(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Gu(this,r)}}function Gu(n,t){return t&&(Xe(t)==="object"||typeof t=="function")?t:Ji(n)}function Ji(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Zu(){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 En(n){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},En(n)}function ts(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Ju=function(n){Ku(e,n);var t=Qu(e);function e(){var i;qu(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ts(Ji(i),"priority",130),ts(Ji(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Xu(e,[{key:"parse",value:function(r,o){return Rn(o==="u"?4:o.length,r)}},{key:"set",value:function(r,o,s){return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ke(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ke=function(e){return typeof e}:Ke=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(n)}function tf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function es(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ef(n,t,e){return t&&es(n.prototype,t),e&&es(n,e),n}function nf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&tr(n,t)}function tr(n,t){return tr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},tr(n,t)}function rf(n){var t=sf();return function(){var i=$n(n),r;if(t){var o=$n(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return of(this,r)}}function of(n,t){return t&&(Ke(t)==="object"||typeof t=="function")?t:er(n)}function er(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function sf(){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 $n(n){return $n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(n)}function ns(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var af=function(n){nf(e,n);var t=rf(e);function e(){var i;tf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ns(er(i),"priority",120),ns(er(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return ef(e,[{key:"parse",value:function(r,o,s){switch(o){case"Q":case"QQ":return X(o.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,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Qe(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qe=function(e){return typeof e}:Qe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(n)}function cf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function is(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function lf(n,t,e){return t&&is(n.prototype,t),e&&is(n,e),n}function uf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&nr(n,t)}function nr(n,t){return nr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},nr(n,t)}function ff(n){var t=df();return function(){var i=An(n),r;if(t){var o=An(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return hf(this,r)}}function hf(n,t){return t&&(Qe(t)==="object"||typeof t=="function")?t:ir(n)}function ir(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function df(){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 An(n){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},An(n)}function rs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var pf=function(n){uf(e,n);var t=ff(e);function e(){var i;cf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),rs(ir(i),"priority",120),rs(ir(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return lf(e,[{key:"parse",value:function(r,o,s){switch(o){case"q":case"qq":return X(o.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,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,s){return r.setUTCMonth((s-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ge(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ge=function(e){return typeof e}:Ge=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(n)}function gf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function os(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function yf(n,t,e){return t&&os(n.prototype,t),e&&os(n,e),n}function mf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&rr(n,t)}function rr(n,t){return rr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},rr(n,t)}function bf(n){var t=vf();return function(){var i=In(n),r;if(t){var o=In(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return _f(this,r)}}function _f(n,t){return t&&(Ge(t)==="object"||typeof t=="function")?t:or(n)}function or(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function vf(){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 In(n){return In=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},In(n)}function ss(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var xf=function(n){mf(e,n);var t=bf(e);function e(){var i;gf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ss(or(i),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ss(or(i),"priority",110),i}return yf(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l-1};switch(o){case"M":return Q(U(K.month,r),a);case"MM":return Q(X(2,r),a);case"Mo":return Q(s.ordinalNumber(r,{unit:"month"}),a);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,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Ze(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(e){return typeof e}:Ze=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(n)}function wf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function as(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Of(n,t,e){return t&&as(n.prototype,t),e&&as(n,e),n}function Pf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&sr(n,t)}function sr(n,t){return sr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},sr(n,t)}function Sf(n){var t=kf();return function(){var i=Ln(n),r;if(t){var o=Ln(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Mf(this,r)}}function Mf(n,t){return t&&(Ze(t)==="object"||typeof t=="function")?t:ar(n)}function ar(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function kf(){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 Ln(n){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(n)}function cs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Rf=function(n){Pf(e,n);var t=Sf(e);function e(){var i;wf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),cs(ar(i),"priority",110),cs(ar(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Of(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l-1};switch(o){case"L":return Q(U(K.month,r),a);case"LL":return Q(X(2,r),a);case"Lo":return Q(s.ordinalNumber(r,{unit:"month"}),a);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,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){return r.setUTCMonth(s,1),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Tf(n,t,e){T(2,arguments);var i=$(n),r=rt(t),o=Ml(i,e)-r;return i.setUTCDate(i.getUTCDate()-o*7),i}function Je(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Je=function(e){return typeof e}:Je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(n)}function Df(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ls(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Cf(n,t,e){return t&&ls(n.prototype,t),e&&ls(n,e),n}function Ef(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&cr(n,t)}function cr(n,t){return cr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},cr(n,t)}function $f(n){var t=If();return function(){var i=Fn(n),r;if(t){var o=Fn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Af(this,r)}}function Af(n,t){return t&&(Je(t)==="object"||typeof t=="function")?t:lr(n)}function lr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function If(){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 Fn(n){return Fn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Fn(n)}function us(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Lf=function(n){Ef(e,n);var t=$f(e);function e(){var i;Df(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),us(lr(i),"priority",100),us(lr(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Cf(e,[{key:"parse",value:function(r,o,s){switch(o){case"w":return U(K.week,r);case"wo":return s.ordinalNumber(r,{unit:"week"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,s,a){return Ni(Tf(r,s,a),a)}}]),e}(I);function Ff(n,t){T(2,arguments);var e=$(n),i=rt(t),r=kl(e)-i;return e.setUTCDate(e.getUTCDate()-r*7),e}function tn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tn=function(e){return typeof e}:tn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(n)}function Bf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function fs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function zf(n,t,e){return t&&fs(n.prototype,t),e&&fs(n,e),n}function Nf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&ur(n,t)}function ur(n,t){return ur=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},ur(n,t)}function Hf(n){var t=jf();return function(){var i=Bn(n),r;if(t){var o=Bn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Wf(this,r)}}function Wf(n,t){return t&&(tn(t)==="object"||typeof t=="function")?t:fr(n)}function fr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jf(){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 Bn(n){return Bn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Bn(n)}function hs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Vf=function(n){Nf(e,n);var t=Hf(e);function e(){var i;Bf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),hs(fr(i),"priority",100),hs(fr(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return zf(e,[{key:"parse",value:function(r,o,s){switch(o){case"I":return U(K.week,r);case"Io":return s.ordinalNumber(r,{unit:"week"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,s){return fc(Ff(r,s))}}]),e}(I);function en(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?en=function(e){return typeof e}:en=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},en(n)}function Yf(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ds(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Uf(n,t,e){return t&&ds(n.prototype,t),e&&ds(n,e),n}function qf(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&hr(n,t)}function hr(n,t){return hr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},hr(n,t)}function Xf(n){var t=Qf();return function(){var i=zn(n),r;if(t){var o=zn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Kf(this,r)}}function Kf(n,t){return t&&(en(t)==="object"||typeof t=="function")?t:nn(n)}function nn(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qf(){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 zn(n){return zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zn(n)}function Mi(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Gf=[31,28,31,30,31,30,31,31,30,31,30,31],Zf=[31,29,31,30,31,30,31,31,30,31,30,31],Jf=function(n){qf(e,n);var t=Xf(e);function e(){var i;Yf(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Mi(nn(i),"priority",90),Mi(nn(i),"subPriority",1),Mi(nn(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Uf(e,[{key:"parse",value:function(r,o,s){switch(o){case"d":return U(K.date,r);case"do":return s.ordinalNumber(r,{unit:"date"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){var s=r.getUTCFullYear(),a=wc(s),c=r.getUTCMonth();return a?o>=1&&o<=Zf[c]:o>=1&&o<=Gf[c]}},{key:"set",value:function(r,o,s){return r.setUTCDate(s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function rn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rn=function(e){return typeof e}:rn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(n)}function th(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ps(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function eh(n,t,e){return t&&ps(n.prototype,t),e&&ps(n,e),n}function nh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&dr(n,t)}function dr(n,t){return dr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},dr(n,t)}function ih(n){var t=oh();return function(){var i=Nn(n),r;if(t){var o=Nn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return rh(this,r)}}function rh(n,t){return t&&(rn(t)==="object"||typeof t=="function")?t:on(n)}function on(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function oh(){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 Nn(n){return Nn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Nn(n)}function ki(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var sh=function(n){nh(e,n);var t=ih(e);function e(){var i;th(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ki(on(i),"priority",90),ki(on(i),"subpriority",1),ki(on(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return eh(e,[{key:"parse",value:function(r,o,s){switch(o){case"D":case"DD":return U(K.dayOfYear,r);case"Do":return s.ordinalNumber(r,{unit:"date"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){var s=r.getUTCFullYear(),a=wc(s);return a?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,s){return r.setUTCMonth(0,s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function ho(n,t,e){var i,r,o,s,a,c,l,u;T(2,arguments);var f=gi(),h=rt((i=(r=(o=(s=e==null?void 0:e.weekStartsOn)!==null&&s!==void 0?s:e==null||(a=e.locale)===null||a===void 0||(c=a.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.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 d=$(n),p=rt(t),g=d.getUTCDay(),y=p%7,m=(y+7)%7,b=(m<h?7:0)+p-g;return d.setUTCDate(d.getUTCDate()+b),d}function sn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sn=function(e){return typeof e}:sn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(n)}function ah(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function gs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function ch(n,t,e){return t&&gs(n.prototype,t),e&&gs(n,e),n}function lh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&pr(n,t)}function pr(n,t){return pr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},pr(n,t)}function uh(n){var t=hh();return function(){var i=Hn(n),r;if(t){var o=Hn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return fh(this,r)}}function fh(n,t){return t&&(sn(t)==="object"||typeof t=="function")?t:gr(n)}function gr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function hh(){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 Hn(n){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Hn(n)}function ys(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var dh=function(n){lh(e,n);var t=uh(e);function e(){var i;ah(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ys(gr(i),"priority",90),ys(gr(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return ch(e,[{key:"parse",value:function(r,o,s){switch(o){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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function an(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?an=function(e){return typeof e}:an=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(n)}function ph(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function gh(n,t,e){return t&&ms(n.prototype,t),e&&ms(n,e),n}function yh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&yr(n,t)}function yr(n,t){return yr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},yr(n,t)}function mh(n){var t=_h();return function(){var i=Wn(n),r;if(t){var o=Wn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return bh(this,r)}}function bh(n,t){return t&&(an(t)==="object"||typeof t=="function")?t:mr(n)}function mr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _h(){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 Wn(n){return Wn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wn(n)}function bs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var vh=function(n){yh(e,n);var t=mh(e);function e(){var i;ph(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),bs(mr(i),"priority",90),bs(mr(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return gh(e,[{key:"parse",value:function(r,o,s,a){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+a.weekStartsOn+6)%7+f};switch(o){case"e":case"ee":return Q(X(o.length,r),c);case"eo":return Q(s.ordinalNumber(r,{unit:"day"}),c);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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function cn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cn=function(e){return typeof e}:cn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(n)}function xh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function _s(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function wh(n,t,e){return t&&_s(n.prototype,t),e&&_s(n,e),n}function Oh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&br(n,t)}function br(n,t){return br=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},br(n,t)}function Ph(n){var t=Mh();return function(){var i=jn(n),r;if(t){var o=jn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Sh(this,r)}}function Sh(n,t){return t&&(cn(t)==="object"||typeof t=="function")?t:_r(n)}function _r(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Mh(){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 jn(n){return jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jn(n)}function vs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var kh=function(n){Oh(e,n);var t=Ph(e);function e(){var i;xh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),vs(_r(i),"priority",90),vs(_r(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return wh(e,[{key:"parse",value:function(r,o,s,a){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+a.weekStartsOn+6)%7+f};switch(o){case"c":case"cc":return Q(X(o.length,r),c);case"co":return Q(s.ordinalNumber(r,{unit:"day"}),c);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,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,s,a){return r=ho(r,s,a),r.setUTCHours(0,0,0,0),r}}]),e}(I);function Rh(n,t){T(2,arguments);var e=rt(t);e%7===0&&(e=e-7);var i=1,r=$(n),o=r.getUTCDay(),s=e%7,a=(s+7)%7,c=(a<i?7:0)+e-o;return r.setUTCDate(r.getUTCDate()+c),r}function ln(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ln=function(e){return typeof e}:ln=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(n)}function Th(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function xs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Dh(n,t,e){return t&&xs(n.prototype,t),e&&xs(n,e),n}function Ch(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&vr(n,t)}function vr(n,t){return vr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},vr(n,t)}function Eh(n){var t=Ah();return function(){var i=Vn(n),r;if(t){var o=Vn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return $h(this,r)}}function $h(n,t){return t&&(ln(t)==="object"||typeof t=="function")?t:xr(n)}function xr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ah(){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 Vn(n){return Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vn(n)}function ws(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Ih=function(n){Ch(e,n);var t=Eh(e);function e(){var i;Th(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),ws(xr(i),"priority",90),ws(xr(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Dh(e,[{key:"parse",value:function(r,o,s){var a=function(l){return l===0?7:l};switch(o){case"i":case"ii":return X(o.length,r);case"io":return s.ordinalNumber(r,{unit:"day"});case"iii":return Q(s.day(r,{width:"abbreviated",context:"formatting"})||s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiii":return Q(s.day(r,{width:"narrow",context:"formatting"}),a);case"iiiiii":return Q(s.day(r,{width:"short",context:"formatting"})||s.day(r,{width:"narrow",context:"formatting"}),a);case"iiii":default:return Q(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"}),a)}}},{key:"validate",value:function(r,o){return o>=1&&o<=7}},{key:"set",value:function(r,o,s){return r=Rh(r,s),r.setUTCHours(0,0,0,0),r}}]),e}(I);function un(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?un=function(e){return typeof e}:un=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(n)}function Lh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Os(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Fh(n,t,e){return t&&Os(n.prototype,t),e&&Os(n,e),n}function Bh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&wr(n,t)}function wr(n,t){return wr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},wr(n,t)}function zh(n){var t=Hh();return function(){var i=Yn(n),r;if(t){var o=Yn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Nh(this,r)}}function Nh(n,t){return t&&(un(t)==="object"||typeof t=="function")?t:Or(n)}function Or(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Hh(){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 Yn(n){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yn(n)}function Ps(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Wh=function(n){Bh(e,n);var t=zh(e);function e(){var i;Lh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ps(Or(i),"priority",80),Ps(Or(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Fh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function fn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fn=function(e){return typeof e}:fn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fn(n)}function jh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ss(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Vh(n,t,e){return t&&Ss(n.prototype,t),e&&Ss(n,e),n}function Yh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Pr(n,t)}function Pr(n,t){return Pr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Pr(n,t)}function Uh(n){var t=Xh();return function(){var i=Un(n),r;if(t){var o=Un(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return qh(this,r)}}function qh(n,t){return t&&(fn(t)==="object"||typeof t=="function")?t:Sr(n)}function Sr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Xh(){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 Un(n){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Un(n)}function Ms(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Kh=function(n){Yh(e,n);var t=Uh(e);function e(){var i;jh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ms(Sr(i),"priority",80),Ms(Sr(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Vh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function hn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hn=function(e){return typeof e}:hn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(n)}function Qh(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function ks(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Gh(n,t,e){return t&&ks(n.prototype,t),e&&ks(n,e),n}function Zh(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Mr(n,t)}function Mr(n,t){return Mr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Mr(n,t)}function Jh(n){var t=ed();return function(){var i=qn(n),r;if(t){var o=qn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return td(this,r)}}function td(n,t){return t&&(hn(t)==="object"||typeof t=="function")?t:kr(n)}function kr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ed(){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 qn(n){return qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qn(n)}function Rs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var nd=function(n){Zh(e,n);var t=Jh(e);function e(){var i;Qh(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Rs(kr(i),"priority",80),Rs(kr(i),"incompatibleTokens",["a","b","t","T"]),i}return Gh(e,[{key:"parse",value:function(r,o,s){switch(o){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,o,s){return r.setUTCHours(fo(s),0,0,0),r}}]),e}(I);function dn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dn=function(e){return typeof e}:dn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(n)}function id(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ts(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function rd(n,t,e){return t&&Ts(n.prototype,t),e&&Ts(n,e),n}function od(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Rr(n,t)}function Rr(n,t){return Rr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Rr(n,t)}function sd(n){var t=cd();return function(){var i=Xn(n),r;if(t){var o=Xn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return ad(this,r)}}function ad(n,t){return t&&(dn(t)==="object"||typeof t=="function")?t:Tr(n)}function Tr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function cd(){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 Xn(n){return Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xn(n)}function Ds(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var ld=function(n){od(e,n);var t=sd(e);function e(){var i;id(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ds(Tr(i),"priority",70),Ds(Tr(i),"incompatibleTokens",["H","K","k","t","T"]),i}return rd(e,[{key:"parse",value:function(r,o,s){switch(o){case"h":return U(K.hour12h,r);case"ho":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=12}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return a&&s<12?r.setUTCHours(s+12,0,0,0):!a&&s===12?r.setUTCHours(0,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(I);function pn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pn=function(e){return typeof e}:pn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(n)}function ud(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Cs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function fd(n,t,e){return t&&Cs(n.prototype,t),e&&Cs(n,e),n}function hd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Dr(n,t)}function Dr(n,t){return Dr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Dr(n,t)}function dd(n){var t=gd();return function(){var i=Kn(n),r;if(t){var o=Kn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return pd(this,r)}}function pd(n,t){return t&&(pn(t)==="object"||typeof t=="function")?t:Cr(n)}function Cr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function gd(){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 Kn(n){return Kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kn(n)}function Es(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var yd=function(n){hd(e,n);var t=dd(e);function e(){var i;ud(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Es(Cr(i),"priority",70),Es(Cr(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return fd(e,[{key:"parse",value:function(r,o,s){switch(o){case"H":return U(K.hour23h,r);case"Ho":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=23}},{key:"set",value:function(r,o,s){return r.setUTCHours(s,0,0,0),r}}]),e}(I);function gn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gn=function(e){return typeof e}:gn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(n)}function md(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function $s(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function bd(n,t,e){return t&&$s(n.prototype,t),e&&$s(n,e),n}function _d(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Er(n,t)}function Er(n,t){return Er=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Er(n,t)}function vd(n){var t=wd();return function(){var i=Qn(n),r;if(t){var o=Qn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return xd(this,r)}}function xd(n,t){return t&&(gn(t)==="object"||typeof t=="function")?t:$r(n)}function $r(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function wd(){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 Qn(n){return Qn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qn(n)}function As(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Od=function(n){_d(e,n);var t=vd(e);function e(){var i;md(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),As($r(i),"priority",70),As($r(i),"incompatibleTokens",["h","H","k","t","T"]),i}return bd(e,[{key:"parse",value:function(r,o,s){switch(o){case"K":return U(K.hour11h,r);case"Ko":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,s){var a=r.getUTCHours()>=12;return a&&s<12?r.setUTCHours(s+12,0,0,0):r.setUTCHours(s,0,0,0),r}}]),e}(I);function yn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?yn=function(e){return typeof e}:yn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yn(n)}function Pd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Sd(n,t,e){return t&&Is(n.prototype,t),e&&Is(n,e),n}function Md(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ar(n,t)}function Ar(n,t){return Ar=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ar(n,t)}function kd(n){var t=Td();return function(){var i=Gn(n),r;if(t){var o=Gn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Rd(this,r)}}function Rd(n,t){return t&&(yn(t)==="object"||typeof t=="function")?t:Ir(n)}function Ir(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Td(){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 Gn(n){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gn(n)}function Ls(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Dd=function(n){Md(e,n);var t=kd(e);function e(){var i;Pd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ls(Ir(i),"priority",70),Ls(Ir(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Sd(e,[{key:"parse",value:function(r,o,s){switch(o){case"k":return U(K.hour24h,r);case"ko":return s.ordinalNumber(r,{unit:"hour"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=24}},{key:"set",value:function(r,o,s){var a=s<=24?s%24:s;return r.setUTCHours(a,0,0,0),r}}]),e}(I);function mn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mn=function(e){return typeof e}:mn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(n)}function Cd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Fs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Ed(n,t,e){return t&&Fs(n.prototype,t),e&&Fs(n,e),n}function $d(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Lr(n,t)}function Lr(n,t){return Lr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Lr(n,t)}function Ad(n){var t=Ld();return function(){var i=Zn(n),r;if(t){var o=Zn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Id(this,r)}}function Id(n,t){return t&&(mn(t)==="object"||typeof t=="function")?t:Fr(n)}function Fr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Ld(){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 Zn(n){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zn(n)}function Bs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Fd=function(n){$d(e,n);var t=Ad(e);function e(){var i;Cd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Bs(Fr(i),"priority",60),Bs(Fr(i),"incompatibleTokens",["t","T"]),i}return Ed(e,[{key:"parse",value:function(r,o,s){switch(o){case"m":return U(K.minute,r);case"mo":return s.ordinalNumber(r,{unit:"minute"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCMinutes(s,0,0),r}}]),e}(I);function bn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bn=function(e){return typeof e}:bn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(n)}function Bd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function zs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function zd(n,t,e){return t&&zs(n.prototype,t),e&&zs(n,e),n}function Nd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Br(n,t)}function Br(n,t){return Br=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Br(n,t)}function Hd(n){var t=jd();return function(){var i=Jn(n),r;if(t){var o=Jn(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Wd(this,r)}}function Wd(n,t){return t&&(bn(t)==="object"||typeof t=="function")?t:zr(n)}function zr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function jd(){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 Jn(n){return Jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jn(n)}function Ns(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Vd=function(n){Nd(e,n);var t=Hd(e);function e(){var i;Bd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ns(zr(i),"priority",50),Ns(zr(i),"incompatibleTokens",["t","T"]),i}return zd(e,[{key:"parse",value:function(r,o,s){switch(o){case"s":return U(K.second,r);case"so":return s.ordinalNumber(r,{unit:"second"});default:return X(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,s){return r.setUTCSeconds(s,0),r}}]),e}(I);function _n(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_n=function(e){return typeof e}:_n=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_n(n)}function Yd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Hs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Ud(n,t,e){return t&&Hs(n.prototype,t),e&&Hs(n,e),n}function qd(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Nr(n,t)}function Nr(n,t){return Nr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Nr(n,t)}function Xd(n){var t=Qd();return function(){var i=ti(n),r;if(t){var o=ti(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Kd(this,r)}}function Kd(n,t){return t&&(_n(t)==="object"||typeof t=="function")?t:Hr(n)}function Hr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qd(){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 ti(n){return ti=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ti(n)}function Ws(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Gd=function(n){qd(e,n);var t=Xd(e);function e(){var i;Yd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Ws(Hr(i),"priority",30),Ws(Hr(i),"incompatibleTokens",["t","T"]),i}return Ud(e,[{key:"parse",value:function(r,o){var s=function(c){return Math.floor(c*Math.pow(10,-o.length+3))};return Q(X(o.length,r),s)}},{key:"set",value:function(r,o,s){return r.setUTCMilliseconds(s),r}}]),e}(I);function vn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vn=function(e){return typeof e}:vn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(n)}function Zd(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function js(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function Jd(n,t,e){return t&&js(n.prototype,t),e&&js(n,e),n}function tp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Wr(n,t)}function Wr(n,t){return Wr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Wr(n,t)}function ep(n){var t=ip();return function(){var i=ei(n),r;if(t){var o=ei(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return np(this,r)}}function np(n,t){return t&&(vn(t)==="object"||typeof t=="function")?t:jr(n)}function jr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function ip(){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 ei(n){return ei=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ei(n)}function Vs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var rp=function(n){tp(e,n);var t=ep(e);function e(){var i;Zd(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Vs(jr(i),"priority",10),Vs(jr(i),"incompatibleTokens",["t","T","x"]),i}return Jd(e,[{key:"parse",value:function(r,o){switch(o){case"X":return vt(_t.basicOptionalMinutes,r);case"XX":return vt(_t.basic,r);case"XXXX":return vt(_t.basicOptionalSeconds,r);case"XXXXX":return vt(_t.extendedOptionalSeconds,r);case"XXX":default:return vt(_t.extended,r)}}},{key:"set",value:function(r,o,s){return o.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(I);function xn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xn=function(e){return typeof e}:xn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(n)}function op(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ys(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function sp(n,t,e){return t&&Ys(n.prototype,t),e&&Ys(n,e),n}function ap(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Vr(n,t)}function Vr(n,t){return Vr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Vr(n,t)}function cp(n){var t=up();return function(){var i=ni(n),r;if(t){var o=ni(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return lp(this,r)}}function lp(n,t){return t&&(xn(t)==="object"||typeof t=="function")?t:Yr(n)}function Yr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function up(){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 ni(n){return ni=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ni(n)}function Us(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var fp=function(n){ap(e,n);var t=cp(e);function e(){var i;op(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Us(Yr(i),"priority",10),Us(Yr(i),"incompatibleTokens",["t","T","X"]),i}return sp(e,[{key:"parse",value:function(r,o){switch(o){case"x":return vt(_t.basicOptionalMinutes,r);case"xx":return vt(_t.basic,r);case"xxxx":return vt(_t.basicOptionalSeconds,r);case"xxxxx":return vt(_t.extendedOptionalSeconds,r);case"xxx":default:return vt(_t.extended,r)}}},{key:"set",value:function(r,o,s){return o.timestampIsSet?r:new Date(r.getTime()-s)}}]),e}(I);function wn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wn=function(e){return typeof e}:wn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wn(n)}function hp(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function qs(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function dp(n,t,e){return t&&qs(n.prototype,t),e&&qs(n,e),n}function pp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Ur(n,t)}function Ur(n,t){return Ur=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Ur(n,t)}function gp(n){var t=mp();return function(){var i=ii(n),r;if(t){var o=ii(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return yp(this,r)}}function yp(n,t){return t&&(wn(t)==="object"||typeof t=="function")?t:qr(n)}function qr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function mp(){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 ii(n){return ii=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ii(n)}function Xs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var bp=function(n){pp(e,n);var t=gp(e);function e(){var i;hp(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Xs(qr(i),"priority",40),Xs(qr(i),"incompatibleTokens","*"),i}return dp(e,[{key:"parse",value:function(r){return vc(r)}},{key:"set",value:function(r,o,s){return[new Date(s*1e3),{timestampIsSet:!0}]}}]),e}(I);function On(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?On=function(e){return typeof e}:On=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},On(n)}function _p(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Ks(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function vp(n,t,e){return t&&Ks(n.prototype,t),e&&Ks(n,e),n}function xp(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&Xr(n,t)}function Xr(n,t){return Xr=Object.setPrototypeOf||function(i,r){return i.__proto__=r,i},Xr(n,t)}function wp(n){var t=Pp();return function(){var i=ri(n),r;if(t){var o=ri(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return Op(this,r)}}function Op(n,t){return t&&(On(t)==="object"||typeof t=="function")?t:Kr(n)}function Kr(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Pp(){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 ri(n){return ri=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ri(n)}function Qs(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}var Sp=function(n){xp(e,n);var t=wp(e);function e(){var i;_p(this,e);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i=t.call.apply(t,[this].concat(o)),Qs(Kr(i),"priority",20),Qs(Kr(i),"incompatibleTokens","*"),i}return vp(e,[{key:"parse",value:function(r){return vc(r)}},{key:"set",value:function(r,o,s){return[new Date(s),{timestampIsSet:!0}]}}]),e}(I),Mp={G:new Su,y:new Eu,Y:new zu,R:new Uu,u:new Ju,Q:new af,q:new pf,M:new xf,L:new Rf,w:new Lf,I:new Vf,d:new Jf,D:new sh,E:new dh,e:new vh,c:new kh,i:new Ih,a:new Wh,b:new Kh,B:new nd,h:new ld,H:new yd,K:new Od,k:new Dd,m:new Fd,s:new Vd,S:new Gd,X:new rp,x:new fp,t:new bp,T:new Sp};function Pn(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pn=function(e){return typeof e}:Pn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(n)}function Gs(n,t){var e;if(typeof Symbol>"u"||n[Symbol.iterator]==null){if(Array.isArray(n)||(e=kp(n))||t&&n&&typeof n.length=="number"){e&&(n=e);var i=0,r=function(){};return{s:r,n:function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){e=n[Symbol.iterator]()},n:function(){var l=e.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(s)throw a}}}}function kp(n,t){if(n){if(typeof n=="string")return Zs(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);if(e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set")return Array.from(n);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Zs(n,t)}}function Zs(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}var Rp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Tp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dp=/^'([^]*?)'?$/,Cp=/''/g,Ep=/\S/,$p=/[a-zA-Z]/;function Ap(n,t,e,i){var r,o,s,a,c,l,u,f,h,d,p,g,y,m,b,v,x,_;T(3,arguments);var w=String(n),O=String(t),S=gi(),P=(r=(o=i==null?void 0:i.locale)!==null&&o!==void 0?o:S.locale)!==null&&r!==void 0?r:Rl;if(!P.match)throw new RangeError("locale must contain match property");var D=rt((s=(a=(c=(l=i==null?void 0:i.firstWeekContainsDate)!==null&&l!==void 0?l:i==null||(u=i.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&c!==void 0?c:S.firstWeekContainsDate)!==null&&a!==void 0?a:(h=S.locale)===null||h===void 0||(d=h.options)===null||d===void 0?void 0:d.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=rt((p=(g=(y=(m=i==null?void 0:i.weekStartsOn)!==null&&m!==void 0?m:i==null||(b=i.locale)===null||b===void 0||(v=b.options)===null||v===void 0?void 0:v.weekStartsOn)!==null&&y!==void 0?y:S.weekStartsOn)!==null&&g!==void 0?g:(x=S.locale)===null||x===void 0||(_=x.options)===null||_===void 0?void 0:_.weekStartsOn)!==null&&p!==void 0?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return w===""?$(e):new Date(NaN);var R={firstWeekContainsDate:D,weekStartsOn:C,locale:P},j=[new yu],J=O.match(Tp).map(function(Z){var z=Z[0];if(z in zo){var at=zo[z];return at(Z,P.formatLong)}return Z}).join("").match(Rp),M=[],H=Gs(J),V;try{var Ot=function(){var z=V.value;!(i!=null&&i.useAdditionalWeekYearTokens)&&Tl(z)&&No(z,O,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&Dl(z)&&No(z,O,n);var at=z[0],De=Mp[at];if(De){var Lo=De.incompatibleTokens;if(Array.isArray(Lo)){var Fo=M.find(function(Bo){return Lo.includes(Bo.token)||Bo.token===at});if(Fo)throw new RangeError("The format string mustn't contain `".concat(Fo.fullToken,"` and `").concat(z,"` at the same time"))}else if(De.incompatibleTokens==="*"&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(z,"` and any other token at the same time"));M.push({token:at,fullToken:z});var Si=De.run(w,z,P.match,R);if(!Si)return{v:new Date(NaN)};j.push(Si.setter),w=Si.rest}else{if(at.match($p))throw new RangeError("Format string contains an unescaped latin alphabet character `"+at+"`");if(z==="''"?z="'":at==="'"&&(z=Ip(z)),w.indexOf(z)===0)w=w.slice(z.length);else return{v:new Date(NaN)}}};for(H.s();!(V=H.n()).done;){var Qt=Ot();if(Pn(Qt)==="object")return Qt.v}}catch(Z){H.e(Z)}finally{H.f()}if(w.length>0&&Ep.test(w))return new Date(NaN);var Rt=j.map(function(Z){return Z.priority}).sort(function(Z,z){return z-Z}).filter(function(Z,z,at){return at.indexOf(Z)===z}).map(function(Z){return j.filter(function(z){return z.priority===Z}).sort(function(z,at){return at.subPriority-z.subPriority})}).map(function(Z){return Z[0]}),Tt=$(e);if(isNaN(Tt.getTime()))return new Date(NaN);var st=Cl(Tt,El(Tt)),Dt={},Ct=Gs(Rt),Gt;try{for(Ct.s();!(Gt=Ct.n()).done;){var Zt=Gt.value;if(!Zt.validate(st,R))return new Date(NaN);var Te=Zt.set(st,Dt,R);Array.isArray(Te)?(st=Te[0],$l(Dt,Te[1])):st=Te}}catch(Z){Ct.e(Z)}finally{Ct.f()}return st}function Ip(n){return n.match(Dp)[1].replace(Cp,"'")}function Lp(n){T(1,arguments);var t=$(n);return t.setMinutes(0,0,0),t}function Fp(n){T(1,arguments);var t=$(n);return t.setMilliseconds(0),t}/*!
|
|
3
3
|
* Chart.js v3.9.1
|
|
4
4
|
* https://www.chartjs.org
|
|
5
5
|
* (c) 2022 Chart.js Contributors
|
|
6
6
|
* Released under the MIT License
|
|
7
|
-
*/function Pt(){}const Bp=function(){let n=0;return function(){return n++}}();function L(n){return n===null||typeof n>"u"}function W(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const tt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function lt(n,t){return tt(n)?n:t}function k(n,t){return typeof n>"u"?t:n}const zp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/t,Oc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function N(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function F(n,t,e,i){let r,o,s;if(W(n))if(o=n.length,i)for(r=o-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<o;r++)t.call(e,n[r],r);else if(A(n))for(s=Object.keys(n),o=s.length,r=0;r<o;r++)t.call(e,n[s[r]],s[r])}function oi(n,t){let e,i,r,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],o=t[e],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function si(n){if(W(n))return n.map(si);if(A(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=si(n[e[r]]);return t}return n}function Pc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Np(n,t,e,i){if(!Pc(n))return;const r=t[n],o=e[n];A(r)&&A(o)?_e(r,o,i):t[n]=si(o)}function _e(n,t,e){const i=W(t)?t:[t],r=i.length;if(!A(n))return n;e=e||{};const o=e.merger||Np;for(let s=0;s<r;++s){if(t=i[s],!A(t))continue;const a=Object.keys(t);for(let c=0,l=a.length;c<l;++c)o(a[c],n,t,e)}return n}function pe(n,t){return _e(n,t,{merger:Hp})}function Hp(n,t,e){if(!Pc(n))return;const i=t[n],r=e[n];A(i)&&A(r)?pe(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=si(r))}const Js={"":n=>n,x:n=>n.x,y:n=>n.y};function Ft(n,t){return(Js[t]||(Js[t]=Wp(t)))(n)}function Wp(n){const t=jp(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function jp(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function po(n){return n.charAt(0).toUpperCase()+n.slice(1)}const ht=n=>typeof n<"u",Bt=n=>typeof n=="function",ta=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Vp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Y=Math.PI,B=2*Y,Yp=B+Y,ai=Number.POSITIVE_INFINITY,Up=Y/180,q=Y/2,oe=Y/4,ea=Y*2/3,ut=Math.log10,wt=Math.sign;function na(n){const t=Math.round(n);n=ge(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(ut(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function qp(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,o)=>r-o).pop(),t}function ne(n){return!isNaN(parseFloat(n))&&isFinite(n)}function ge(n,t,e){return Math.abs(n-t)<e}function Xp(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Sc(n,t,e){let i,r,o;for(i=0,r=n.length;i<r;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function pt(n){return n*(Y/180)}function go(n){return n*(180/Y)}function ia(n){if(!tt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Mc(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*Y&&(o+=B),{angle:o,distance:r}}function Qr(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Kp(n,t){return(n-t+Yp)%B-Y}function dt(n){return(n%B+B)%B}function ve(n,t,e,i){const r=dt(n),o=dt(t),s=dt(e),a=dt(o-r),c=dt(s-r),l=dt(r-o),u=dt(r-s);return r===o||r===s||i&&o===s||a>c&&l<u}function nt(n,t,e){return Math.max(t,Math.min(e,n))}function Qp(n){return nt(n,-32768,32767)}function
|
|
7
|
+
*/function Pt(){}const Bp=function(){let n=0;return function(){return n++}}();function L(n){return n===null||typeof n>"u"}function W(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const tt=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function lt(n,t){return tt(n)?n:t}function k(n,t){return typeof n>"u"?t:n}const zp=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/t,Oc=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function N(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function F(n,t,e,i){let r,o,s;if(W(n))if(o=n.length,i)for(r=o-1;r>=0;r--)t.call(e,n[r],r);else for(r=0;r<o;r++)t.call(e,n[r],r);else if(A(n))for(s=Object.keys(n),o=s.length,r=0;r<o;r++)t.call(e,n[s[r]],s[r])}function oi(n,t){let e,i,r,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(r=n[e],o=t[e],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function si(n){if(W(n))return n.map(si);if(A(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let r=0;for(;r<i;++r)t[e[r]]=si(n[e[r]]);return t}return n}function Pc(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Np(n,t,e,i){if(!Pc(n))return;const r=t[n],o=e[n];A(r)&&A(o)?_e(r,o,i):t[n]=si(o)}function _e(n,t,e){const i=W(t)?t:[t],r=i.length;if(!A(n))return n;e=e||{};const o=e.merger||Np;for(let s=0;s<r;++s){if(t=i[s],!A(t))continue;const a=Object.keys(t);for(let c=0,l=a.length;c<l;++c)o(a[c],n,t,e)}return n}function pe(n,t){return _e(n,t,{merger:Hp})}function Hp(n,t,e){if(!Pc(n))return;const i=t[n],r=e[n];A(i)&&A(r)?pe(i,r):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=si(r))}const Js={"":n=>n,x:n=>n.x,y:n=>n.y};function Ft(n,t){return(Js[t]||(Js[t]=Wp(t)))(n)}function Wp(n){const t=jp(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function jp(n){const t=n.split("."),e=[];let i="";for(const r of t)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function po(n){return n.charAt(0).toUpperCase()+n.slice(1)}const ht=n=>typeof n<"u",Bt=n=>typeof n=="function",ta=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function Vp(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Y=Math.PI,B=2*Y,Yp=B+Y,ai=Number.POSITIVE_INFINITY,Up=Y/180,q=Y/2,oe=Y/4,ea=Y*2/3,ut=Math.log10,wt=Math.sign;function na(n){const t=Math.round(n);n=ge(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(ut(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function qp(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((r,o)=>r-o).pop(),t}function ne(n){return!isNaN(parseFloat(n))&&isFinite(n)}function ge(n,t,e){return Math.abs(n-t)<e}function Xp(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Sc(n,t,e){let i,r,o;for(i=0,r=n.length;i<r;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function pt(n){return n*(Y/180)}function go(n){return n*(180/Y)}function ia(n){if(!tt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Mc(n,t){const e=t.x-n.x,i=t.y-n.y,r=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*Y&&(o+=B),{angle:o,distance:r}}function Qr(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Kp(n,t){return(n-t+Yp)%B-Y}function dt(n){return(n%B+B)%B}function ve(n,t,e,i){const r=dt(n),o=dt(t),s=dt(e),a=dt(o-r),c=dt(s-r),l=dt(r-o),u=dt(r-s);return r===o||r===s||i&&o===s||a>c&&l<u}function nt(n,t,e){return Math.max(t,Math.min(e,n))}function Qp(n){return nt(n,-32768,32767)}function $t(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function yo(n,t,e){e=e||(s=>n[s]<t);let i=n.length-1,r=0,o;for(;i-r>1;)o=r+i>>1,e(o)?r=o:i=o;return{lo:r,hi:i}}const Vt=(n,t,e,i)=>yo(n,e,i?r=>n[r][t]<=e:r=>n[r][t]<e),Gp=(n,t,e)=>yo(n,e,i=>n[i][t]>=e);function Zp(n,t,e){let i=0,r=n.length;for(;i<r&&n[i]<t;)i++;for(;r>i&&n[r-1]>e;)r--;return i>0||r<n.length?n.slice(i,r):n}const kc=["push","pop","shift","splice","unshift"];function Jp(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),kc.forEach(e=>{const i="_onData"+po(e),r=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const s=r.apply(this,o);return n._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),s}})})}function ra(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,r=i.indexOf(t);r!==-1&&i.splice(r,1),!(i.length>0)&&(kc.forEach(o=>{delete n[o]}),delete n._chartjs)}function Rc(n){const t=new Set;let e,i;for(e=0,i=n.length;e<i;++e)t.add(n[e]);return t.size===i?n:Array.from(t)}const Tc=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Dc(n,t,e){const i=e||(s=>Array.prototype.slice.call(s));let r=!1,o=[];return function(...s){o=i(s),r||(r=!0,Tc.call(window,()=>{r=!1,n.apply(t,o)}))}}function tg(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const mo=n=>n==="start"?"left":n==="end"?"right":"center",et=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,eg=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Cc(n,t,e){const i=t.length;let r=0,o=i;if(n._sorted){const{iScale:s,_parsed:a}=n,c=s.axis,{min:l,max:u,minDefined:f,maxDefined:h}=s.getUserBounds();f&&(r=nt(Math.min(Vt(a,s.axis,l).lo,e?i:Vt(t,c,s.getPixelForValue(l)).lo),0,i-1)),h?o=nt(Math.max(Vt(a,s.axis,u,!0).hi+1,e?0:Vt(t,c,s.getPixelForValue(u),!0).hi+1),r,i)-r:o=i-r}return{start:r,count:o}}function Ec(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,r={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=r,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,r),o}const Ce=n=>n===0||n===1,oa=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*B/e)),sa=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*B/e)+1,ye={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*q)+1,easeOutSine:n=>Math.sin(n*q),easeInOutSine:n=>-.5*(Math.cos(Y*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ce(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ce(n)?n:oa(n,.075,.3),easeOutElastic:n=>Ce(n)?n:sa(n,.075,.3),easeInOutElastic(n){return Ce(n)?n:n<.5?.5*oa(n*2,.1125,.45):.5+.5*sa(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-ye.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ye.easeInBounce(n*2)*.5:ye.easeOutBounce(n*2-1)*.5+.5};/*!
|
|
8
8
|
* @kurkle/color v0.2.1
|
|
9
9
|
* https://github.com/kurkle/color#readme
|
|
10
10
|
* (c) 2022 Jukka Kurkela
|
|
11
11
|
* Released under the MIT License
|
|
12
|
-
*/function Se(n){return n+.5|0}const At=(n,t,e)=>Math.max(Math.min(n,e),t);function fe(n){return At(Se(n*2.55),0,255)}function Lt(n){return At(Se(n*255),0,255)}function kt(n){return At(Se(n/2.55)/100,0,1)}function aa(n){return At(Se(n*100),0,100)}const ct={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},Gr=[..."0123456789ABCDEF"],ng=n=>Gr[n&15],ig=n=>Gr[(n&240)>>4]+Gr[n&15],$e=n=>(n&240)>>4===(n&15),rg=n=>$e(n.r)&&$e(n.g)&&$e(n.b)&&$e(n.a);function og(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&ct[n[1]]*17,g:255&ct[n[2]]*17,b:255&ct[n[3]]*17,a:t===5?ct[n[4]]*17:255}:(t===7||t===9)&&(e={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:t===9?ct[n[7]]<<4|ct[n[8]]:255})),e}const sg=(n,t)=>n<255?t(n):"";function ag(n){var t=rg(n)?ng:ig;return n?"#"+t(n.r)+t(n.g)+t(n.b)+sg(n.a,t):void 0}const cg=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ec(n,t,e){const i=t*Math.min(e,1-e),r=(o,s=(o+n/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function lg(n,t,e){const i=(r,o=(r+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function ug(n,t,e){const i=Ec(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function fg(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function bo(n){const e=n.r/255,i=n.g/255,r=n.b/255,o=Math.max(e,i,r),s=Math.min(e,i,r),a=(o+s)/2;let c,l,u;return o!==s&&(u=o-s,l=a>.5?u/(2-o-s):u/(o+s),c=fg(e,i,r,u,o),c=c*60+.5),[c|0,l||0,a]}function _o(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Lt)}function vo(n,t,e){return _o(Ec,n,t,e)}function hg(n,t,e){return _o(ug,n,t,e)}function dg(n,t,e){return _o(lg,n,t,e)}function Ac(n){return(n%360+360)%360}function pg(n){const t=cg.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?fe(+t[5]):Lt(+t[5]));const r=Ac(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=hg(r,o,s):t[1]==="hsv"?i=dg(r,o,s):i=vo(r,o,s),{r:i[0],g:i[1],b:i[2],a:e}}function gg(n,t){var e=bo(n);e[0]=Ac(e[0]+t),e=vo(e),n.r=e[0],n.g=e[1],n.b=e[2]}function yg(n){if(!n)return;const t=bo(n),e=t[0],i=aa(t[1]),r=aa(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${kt(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const ca={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"},la={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 mg(){const n={},t=Object.keys(la),e=Object.keys(ca);let i,r,o,s,a;for(i=0;i<t.length;i++){for(s=a=t[i],r=0;r<e.length;r++)o=e[r],a=a.replace(o,ca[o]);o=parseInt(la[s],16),n[a]=[o>>16&255,o>>8&255,o&255]}return n}let Ee;function bg(n){Ee||(Ee=mg(),Ee.transparent=[0,0,0,0]);const t=Ee[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const _g=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function vg(n){const t=_g.exec(n);let e=255,i,r,o;if(t){if(t[7]!==i){const s=+t[7];e=t[8]?fe(s):At(s*255,0,255)}return i=+t[1],r=+t[3],o=+t[5],i=255&(t[2]?fe(i):At(i,0,255)),r=255&(t[4]?fe(r):At(r,0,255)),o=255&(t[6]?fe(o):At(o,0,255)),{r:i,g:r,b:o,a:e}}}function xg(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${kt(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Ri=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Jt=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function wg(n,t,e){const i=Jt(kt(n.r)),r=Jt(kt(n.g)),o=Jt(kt(n.b));return{r:Lt(Ri(i+e*(Jt(kt(t.r))-i))),g:Lt(Ri(r+e*(Jt(kt(t.g))-r))),b:Lt(Ri(o+e*(Jt(kt(t.b))-o))),a:n.a+e*(t.a-n.a)}}function Ae(n,t,e){if(n){let i=bo(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=vo(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ic(n,t){return n&&Object.assign(t||{},n)}function ua(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Lt(n[3]))):(t=Ic(n,{r:0,g:0,b:0,a:1}),t.a=Lt(t.a)),t}function Og(n){return n.charAt(0)==="r"?vg(n):pg(n)}class ci{constructor(t){if(t instanceof ci)return t;const e=typeof t;let i;e==="object"?i=ua(t):e==="string"&&(i=og(t)||bg(t)||Og(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Ic(this._rgb);return t&&(t.a=kt(t.a)),t}set rgb(t){this._rgb=ua(t)}rgbString(){return this._valid?xg(this._rgb):void 0}hexString(){return this._valid?ag(this._rgb):void 0}hslString(){return this._valid?yg(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,c=i.a-r.a,l=((a*c===-1?a:(a+c)/(1+a*c))+1)/2;o=1-l,i.r=255&l*i.r+o*r.r+.5,i.g=255&l*i.g+o*r.g+.5,i.b=255&l*i.b+o*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=wg(this._rgb,t._rgb,e)),this}clone(){return new ci(this.rgb)}alpha(t){return this._rgb.a=Lt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Se(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.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 Ae(this._rgb,2,t),this}darken(t){return Ae(this._rgb,2,-t),this}saturate(t){return Ae(this._rgb,1,t),this}desaturate(t){return Ae(this._rgb,1,-t),this}rotate(t){return gg(this._rgb,t),this}}function Lc(n){return new ci(n)}function Fc(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function fa(n){return Fc(n)?n:Lc(n)}function Ti(n){return Fc(n)?n:Lc(n).saturate(.5).darken(.1).hexString()}const qt=Object.create(null),Zr=Object.create(null);function me(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function Di(n,t,e){return typeof t=="string"?_e(me(n,t),e):_e(me(n,""),t)}class Pg{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.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=(e,i)=>Ti(i.backgroundColor),this.hoverBorderColor=(e,i)=>Ti(i.borderColor),this.hoverColor=(e,i)=>Ti(i.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)}set(t,e){return Di(this,t,e)}get(t){return me(this,t)}describe(t,e){return Di(Zr,t,e)}override(t,e){return Di(qt,t,e)}route(t,e,i,r){const o=me(this,t),s=me(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[a],l=s[r];return A(c)?Object.assign({},l,c):k(c,l)},set(c){this[a]=c}}})}}var $=new Pg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Sg(n){return!n||L(n.size)||L(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function li(n,t,e,i,r){let o=t[r];return o||(o=t[r]=n.measureText(r).width,e.push(r)),o>i&&(i=o),i}function Mg(n,t,e,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let s=0;const a=e.length;let c,l,u,f,h;for(c=0;c<a;c++)if(f=e[c],f!=null&&W(f)!==!0)s=li(n,r,o,s,f);else if(W(f))for(l=0,u=f.length;l<u;l++)h=f[l],h!=null&&!W(h)&&(s=li(n,r,o,s,h));n.restore();const d=o.length/2;if(d>e.length){for(c=0;c<d;c++)delete r[o[c]];o.splice(0,d)}return s}function Nt(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function ha(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Jr(n,t,e,i){Bc(n,t,e,i,null)}function Bc(n,t,e,i,r){let o,s,a,c,l,u;const f=t.pointStyle,h=t.rotation,d=t.radius;let p=(h||0)*Up;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(p),n.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),n.restore();return}if(!(isNaN(d)||d<=0)){switch(n.beginPath(),f){default:r?n.ellipse(e,i,r/2,d,0,0,B):n.arc(e,i,d,0,B),n.closePath();break;case"triangle":n.moveTo(e+Math.sin(p)*d,i-Math.cos(p)*d),p+=ea,n.lineTo(e+Math.sin(p)*d,i-Math.cos(p)*d),p+=ea,n.lineTo(e+Math.sin(p)*d,i-Math.cos(p)*d),n.closePath();break;case"rectRounded":l=d*.516,c=d-l,s=Math.cos(p+oe)*c,a=Math.sin(p+oe)*c,n.arc(e-s,i-a,l,p-Y,p-q),n.arc(e+a,i-s,l,p-q,p),n.arc(e+s,i+a,l,p,p+q),n.arc(e-a,i+s,l,p+q,p+Y),n.closePath();break;case"rect":if(!h){c=Math.SQRT1_2*d,u=r?r/2:c,n.rect(e-u,i-c,2*u,2*c);break}p+=oe;case"rectRot":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+a,i-s),n.lineTo(e+s,i+a),n.lineTo(e-a,i+s),n.closePath();break;case"crossRot":p+=oe;case"cross":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s);break;case"star":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s),p+=oe,s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s);break;case"line":s=r?r/2:Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(p)*d,i+Math.sin(p)*d);break}n.fill(),t.borderWidth>0&&n.stroke()}}function xe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function xo(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function wo(n){n.restore()}function kg(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function Rg(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function Xt(n,t,e,i,r,o={}){const s=W(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let c,l;for(n.save(),n.font=r.string,Tg(n,o),c=0;c<s.length;++c)l=s[c],a&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),L(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(l,e,i,o.maxWidth)),n.fillText(l,e,i,o.maxWidth),Dg(n,e,i,l,o),i+=r.lineHeight;n.restore()}function Tg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),L(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function Dg(n,t,e,i,r){if(r.strikethrough||r.underline){const o=n.measureText(i),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,c=e-o.actualBoundingBoxAscent,l=e+o.actualBoundingBoxDescent,u=r.strikethrough?(c+l)/2:l;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(s,u),n.lineTo(a,u),n.stroke()}}function we(n,t){const{x:e,y:i,w:r,h:o,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,-q,Y,!0),n.lineTo(e,i+o-s.bottomLeft),n.arc(e+s.bottomLeft,i+o-s.bottomLeft,s.bottomLeft,Y,q,!0),n.lineTo(e+r-s.bottomRight,i+o),n.arc(e+r-s.bottomRight,i+o-s.bottomRight,s.bottomRight,q,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-q,!0),n.lineTo(e+s.topLeft,i)}const Cg=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),$g=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Eg(n,t){const e=(""+n).match(Cg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Ag=n=>+n||0;function Oo(n,t){const e={},i=A(t),r=i?Object.keys(t):t,o=A(n)?i?s=>k(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=Ag(o(s));return e}function zc(n){return Oo(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Yt(n){return Oo(n,["topLeft","topRight","bottomLeft","bottomRight"])}function it(n){const t=zc(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function G(n,t){n=n||{},t=t||$.font;let e=k(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=k(n.style,t.style);i&&!(""+i).match($g)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const r={family:k(n.family,t.family),lineHeight:Eg(k(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:k(n.weight,t.weight),string:""};return r.string=Sg(r),r}function Ie(n,t,e,i){let r=!0,o,s,a;for(o=0,s=n.length;o<s;++o)if(a=n[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),r=!1),e!==void 0&&W(a)&&(a=a[e%a.length],r=!1),a!==void 0))return i&&!r&&(i.cacheable=!1),a}function Ig(n,t,e){const{min:i,max:r}=n,o=Oc(t,(r-i)/2),s=(a,c)=>e&&a===0?0:a+c;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function zt(n,t){return Object.assign(Object.create(n),t)}function Po(n,t=[""],e=n,i,r=()=>n[0]){ht(i)||(i=jc("_fallback",n));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:e,_fallback:i,_getTarget:r,override:s=>Po([s,...n],t,e,i)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete n[0][a],!0},get(s,a){return Hc(s,a,()=>jg(a,t,n,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(s,a){return pa(s).includes(a)},ownKeys(s){return pa(s)},set(s,a,c){const l=s._storage||(s._storage=r());return s[a]=l[a]=c,delete s._keys,!0}})}function ie(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Nc(n,i),setContext:o=>ie(n,o,e,i),override:o=>ie(n.override(o),t,e,i)};return new Proxy(r,{deleteProperty(o,s){return delete o[s],delete n[s],!0},get(o,s,a){return Hc(o,s,()=>Fg(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(o,s,a){return n[s]=a,delete o[s],!0}})}function Nc(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:Bt(e)?e:()=>e,isIndexable:Bt(i)?i:()=>i}}const Lg=(n,t)=>n?n+po(t):t,So=(n,t)=>A(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Hc(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Fg(n,t,e){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=n;let a=i[t];return Bt(a)&&s.isScriptable(t)&&(a=Bg(t,a,n,e)),W(a)&&a.length&&(a=zg(t,a,n,s.isIndexable)),So(t,a)&&(a=ie(a,r,o&&o[t],s)),a}function Bg(n,t,e,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=e;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);return a.add(n),t=t(o,s||i),a.delete(n),So(n,t)&&(t=Mo(r._scopes,r,n,t)),t}function zg(n,t,e,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=e;if(ht(o.index)&&i(n))t=t[o.index%t.length];else if(A(t[0])){const c=t,l=r._scopes.filter(u=>u!==c);t=[];for(const u of c){const f=Mo(l,r,n,u);t.push(ie(f,o,s&&s[n],a))}}return t}function Wc(n,t,e){return Bt(n)?n(t,e):n}const Ng=(n,t)=>n===!0?t:typeof n=="string"?Ft(t,n):void 0;function Hg(n,t,e,i,r){for(const o of t){const s=Ng(e,o);if(s){n.add(s);const a=Wc(s._fallback,e,r);if(ht(a)&&a!==e&&a!==i)return a}else if(s===!1&&ht(i)&&e!==i)return null}return!1}function Mo(n,t,e,i){const r=t._rootScopes,o=Wc(t._fallback,e,i),s=[...n,...r],a=new Set;a.add(i);let c=da(a,s,e,o||e,i);return c===null||ht(o)&&o!==e&&(c=da(a,s,o,c,i),c===null)?!1:Po(Array.from(a),[""],r,o,()=>Wg(t,e,i))}function da(n,t,e,i,r){for(;e;)e=Hg(n,t,e,i,r);return e}function Wg(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return W(r)&&A(e)?e:r}function jg(n,t,e,i){let r;for(const o of t)if(r=jc(Lg(o,n),e),ht(r))return So(n,r)?Mo(e,i,n,r):r}function jc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(ht(i))return i}}function pa(n){let t=n._keys;return t||(t=n._keys=Vg(n._scopes)),t}function Vg(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Vc(n,t,e,i){const{iScale:r}=n,{key:o="r"}=this._parsing,s=new Array(i);let a,c,l,u;for(a=0,c=i;a<c;++a)l=a+e,u=t[l],s[a]={r:r.parse(Ft(u,o),l)};return s}const Yg=Number.EPSILON||1e-14,re=(n,t)=>t<n.length&&!n[t].skip&&n[t],Yc=n=>n==="x"?"y":"x";function Ug(n,t,e,i){const r=n.skip?t:n,o=t,s=e.skip?t:e,a=Qr(o,r),c=Qr(s,o);let l=a/(a+c),u=c/(a+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const f=i*l,h=i*u;return{previous:{x:o.x-f*(s.x-r.x),y:o.y-f*(s.y-r.y)},next:{x:o.x+h*(s.x-r.x),y:o.y+h*(s.y-r.y)}}}function qg(n,t,e){const i=n.length;let r,o,s,a,c,l=re(n,0);for(let u=0;u<i-1;++u)if(c=l,l=re(n,u+1),!(!c||!l)){if(ge(t[u],0,Yg)){e[u]=e[u+1]=0;continue}r=e[u]/t[u],o=e[u+1]/t[u],a=Math.pow(r,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),e[u]=r*s*t[u],e[u+1]=o*s*t[u])}}function Xg(n,t,e="x"){const i=Yc(e),r=n.length;let o,s,a,c=re(n,0);for(let l=0;l<r;++l){if(s=a,a=c,c=re(n,l+1),!a)continue;const u=a[e],f=a[i];s&&(o=(u-s[e])/3,a[`cp1${e}`]=u-o,a[`cp1${i}`]=f-o*t[l]),c&&(o=(c[e]-u)/3,a[`cp2${e}`]=u+o,a[`cp2${i}`]=f+o*t[l])}}function Kg(n,t="x"){const e=Yc(t),i=n.length,r=Array(i).fill(0),o=Array(i);let s,a,c,l=re(n,0);for(s=0;s<i;++s)if(a=c,c=l,l=re(n,s+1),!!c){if(l){const u=l[t]-c[t];r[s]=u!==0?(l[e]-c[e])/u:0}o[s]=a?l?wt(r[s-1])!==wt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}qg(n,r,o),Xg(n,o,t)}function Le(n,t,e){return Math.max(Math.min(n,e),t)}function Qg(n,t){let e,i,r,o,s,a=xe(n[0],t);for(e=0,i=n.length;e<i;++e)s=o,o=a,a=e<i-1&&xe(n[e+1],t),o&&(r=n[e],s&&(r.cp1x=Le(r.cp1x,t.left,t.right),r.cp1y=Le(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=Le(r.cp2x,t.left,t.right),r.cp2y=Le(r.cp2y,t.top,t.bottom)))}function Gg(n,t,e,i,r){let o,s,a,c;if(t.spanGaps&&(n=n.filter(l=>!l.skip)),t.cubicInterpolationMode==="monotone")Kg(n,r);else{let l=i?n[n.length-1]:n[0];for(o=0,s=n.length;o<s;++o)a=n[o],c=Ug(l,a,n[Math.min(o+1,s-(i?0:1))%s],t.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,l=a}t.capBezierPoints&&Qg(n,e)}function Uc(){return typeof window<"u"&&typeof document<"u"}function ko(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ui(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const mi=n=>window.getComputedStyle(n,null);function Zg(n,t){return mi(n).getPropertyValue(t)}const Jg=["top","right","bottom","left"];function Ut(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const o=Jg[r];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ty=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function ey(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:o}=i;let s=!1,a,c;if(ty(r,o,n.target))a=r,c=o;else{const l=t.getBoundingClientRect();a=i.clientX-l.left,c=i.clientY-l.top,s=!0}return{x:a,y:c,box:s}}function Wt(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=mi(e),o=r.boxSizing==="border-box",s=Ut(r,"padding"),a=Ut(r,"border","width"),{x:c,y:l,box:u}=ey(n,e),f=s.left+(u&&a.left),h=s.top+(u&&a.top);let{width:d,height:p}=t;return o&&(d-=s.width+a.width,p-=s.height+a.height),{x:Math.round((c-f)/d*e.width/i),y:Math.round((l-h)/p*e.height/i)}}function ny(n,t,e){let i,r;if(t===void 0||e===void 0){const o=ko(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const s=o.getBoundingClientRect(),a=mi(o),c=Ut(a,"border","width"),l=Ut(a,"padding");t=s.width-l.width-c.width,e=s.height-l.height-c.height,i=ui(a.maxWidth,o,"clientWidth"),r=ui(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||ai,maxHeight:r||ai}}const Ci=n=>Math.round(n*10)/10;function iy(n,t,e,i){const r=mi(n),o=Ut(r,"margin"),s=ui(r.maxWidth,n,"clientWidth")||ai,a=ui(r.maxHeight,n,"clientHeight")||ai,c=ny(n,t,e);let{width:l,height:u}=c;if(r.boxSizing==="content-box"){const f=Ut(r,"border","width"),h=Ut(r,"padding");l-=h.width+f.width,u-=h.height+f.height}return l=Math.max(0,l-o.width),u=Math.max(0,i?Math.floor(l/i):u-o.height),l=Ci(Math.min(l,s,c.maxWidth)),u=Ci(Math.min(u,a,c.maxHeight)),l&&!u&&(u=Ci(l/2)),{width:l,height:u}}function ga(n,t,e){const i=t||1,r=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=r/i,n.width=o/i;const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||s.height!==r||s.width!==o?(n.currentDevicePixelRatio=i,s.height=r,s.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const ry=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function ya(n,t){const e=Zg(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function jt(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function oy(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function sy(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},s=jt(n,r,e),a=jt(r,o,e),c=jt(o,t,e),l=jt(s,a,e),u=jt(a,c,e);return jt(l,u,e)}const ma=new Map;function ay(n,t){t=t||{};const e=n+JSON.stringify(t);let i=ma.get(e);return i||(i=new Intl.NumberFormat(n,t),ma.set(e,i)),i}function Me(n,t,e){return ay(t,e).format(n)}const cy=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ly=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ee(n,t,e){return n?cy(t,e):ly()}function qc(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Xc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Kc(n){return n==="angle"?{between:ve,compare:Kp,normalize:dt}:{between:Et,compare:(t,e)=>t-e,normalize:t=>t}}function ba({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function uy(n,t,e){const{property:i,start:r,end:o}=e,{between:s,normalize:a}=Kc(i),c=t.length;let{start:l,end:u,loop:f}=n,h,d;if(f){for(l+=c,u+=c,h=0,d=c;h<d&&s(a(t[l%c][i]),r,o);++h)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:f,style:n.style}}function fy(n,t,e){if(!e)return[n];const{property:i,start:r,end:o}=e,s=t.length,{compare:a,between:c,normalize:l}=Kc(i),{start:u,end:f,loop:h,style:d}=uy(n,t,e),p=[];let g=!1,y=null,m,b,v;const x=()=>c(r,v,m)&&a(r,v)!==0,_=()=>a(o,m)===0||c(o,v,m),w=()=>g||x(),O=()=>!g||_();for(let S=u,P=u;S<=f;++S)b=t[S%s],!b.skip&&(m=l(b[i]),m!==v&&(g=c(m,r,o),y===null&&w()&&(y=a(m,r)===0?S:P),y!==null&&O()&&(p.push(ba({start:y,end:S,loop:h,count:s,style:d})),y=null),P=S,v=m));return y!==null&&p.push(ba({start:y,end:f,loop:h,count:s,style:d})),p}function hy(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const o=fy(i[r],n.points,t);o.length&&e.push(...o)}return e}function dy(n,t,e,i){let r=0,o=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(o+=r);o>r&&n[o%t].skip;)o--;return o%=t,{start:r,end:o}}function py(n,t,e,i){const r=n.length,o=[];let s=t,a=n[t],c;for(c=t+1;c<=e;++c){const l=n[c%r];l.skip||l.stop?a.skip||(i=!1,o.push({start:t%r,end:(c-1)%r,loop:i}),t=s=l.stop?c:null):(s=c,a.skip&&(t=c)),a=l}return s!==null&&o.push({start:t%r,end:s%r,loop:i}),o}function gy(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const o=!!n._loop,{start:s,end:a}=dy(e,r,o,i);if(i===!0)return _a(n,[{start:s,end:a,loop:o}],e,t);const c=a<s?a+r:a,l=!!n._fullLoop&&s===0&&a===r-1;return _a(n,py(e,s,c,l),e,t)}function _a(n,t,e,i){return!i||!i.setContext||!e?t:yy(n,t,e,i)}function yy(n,t,e,i){const r=n._chart.getContext(),o=va(n.options),{_datasetIndex:s,options:{spanGaps:a}}=n,c=e.length,l=[];let u=o,f=t[0].start,h=f;function d(p,g,y,m){const b=a?-1:1;if(p!==g){for(p+=c;e[p%c].skip;)p-=b;for(;e[g%c].skip;)g+=b;p%c!==g%c&&(l.push({start:p%c,end:g%c,loop:y,style:m}),u=m,f=g%c)}}for(const p of t){f=a?f:p.start;let g=e[f%c],y;for(h=f+1;h<=p.end;h++){const m=e[h%c];y=va(i.setContext(zt(r,{type:"segment",p0:g,p1:m,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:s}))),my(y,u)&&d(f,h-1,p.loop,u),g=m,u=y}f<h-1&&d(f,h-1,p.loop,u)}return l}function va(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function my(n,t){return t&&JSON.stringify(n)!==JSON.stringify(t)}/*!
|
|
12
|
+
*/function Se(n){return n+.5|0}const At=(n,t,e)=>Math.max(Math.min(n,e),t);function fe(n){return At(Se(n*2.55),0,255)}function Lt(n){return At(Se(n*255),0,255)}function kt(n){return At(Se(n/2.55)/100,0,1)}function aa(n){return At(Se(n*100),0,100)}const ct={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},Gr=[..."0123456789ABCDEF"],ng=n=>Gr[n&15],ig=n=>Gr[(n&240)>>4]+Gr[n&15],Ee=n=>(n&240)>>4===(n&15),rg=n=>Ee(n.r)&&Ee(n.g)&&Ee(n.b)&&Ee(n.a);function og(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&ct[n[1]]*17,g:255&ct[n[2]]*17,b:255&ct[n[3]]*17,a:t===5?ct[n[4]]*17:255}:(t===7||t===9)&&(e={r:ct[n[1]]<<4|ct[n[2]],g:ct[n[3]]<<4|ct[n[4]],b:ct[n[5]]<<4|ct[n[6]],a:t===9?ct[n[7]]<<4|ct[n[8]]:255})),e}const sg=(n,t)=>n<255?t(n):"";function ag(n){var t=rg(n)?ng:ig;return n?"#"+t(n.r)+t(n.g)+t(n.b)+sg(n.a,t):void 0}const cg=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function $c(n,t,e){const i=t*Math.min(e,1-e),r=(o,s=(o+n/30)%12)=>e-i*Math.max(Math.min(s-3,9-s,1),-1);return[r(0),r(8),r(4)]}function lg(n,t,e){const i=(r,o=(r+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function ug(n,t,e){const i=$c(n,1,.5);let r;for(t+e>1&&(r=1/(t+e),t*=r,e*=r),r=0;r<3;r++)i[r]*=1-t-e,i[r]+=t;return i}function fg(n,t,e,i,r){return n===r?(t-e)/i+(t<e?6:0):t===r?(e-n)/i+2:(n-t)/i+4}function bo(n){const e=n.r/255,i=n.g/255,r=n.b/255,o=Math.max(e,i,r),s=Math.min(e,i,r),a=(o+s)/2;let c,l,u;return o!==s&&(u=o-s,l=a>.5?u/(2-o-s):u/(o+s),c=fg(e,i,r,u,o),c=c*60+.5),[c|0,l||0,a]}function _o(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Lt)}function vo(n,t,e){return _o($c,n,t,e)}function hg(n,t,e){return _o(ug,n,t,e)}function dg(n,t,e){return _o(lg,n,t,e)}function Ac(n){return(n%360+360)%360}function pg(n){const t=cg.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?fe(+t[5]):Lt(+t[5]));const r=Ac(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?i=hg(r,o,s):t[1]==="hsv"?i=dg(r,o,s):i=vo(r,o,s),{r:i[0],g:i[1],b:i[2],a:e}}function gg(n,t){var e=bo(n);e[0]=Ac(e[0]+t),e=vo(e),n.r=e[0],n.g=e[1],n.b=e[2]}function yg(n){if(!n)return;const t=bo(n),e=t[0],i=aa(t[1]),r=aa(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${r}%, ${kt(n.a)})`:`hsl(${e}, ${i}%, ${r}%)`}const ca={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"},la={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 mg(){const n={},t=Object.keys(la),e=Object.keys(ca);let i,r,o,s,a;for(i=0;i<t.length;i++){for(s=a=t[i],r=0;r<e.length;r++)o=e[r],a=a.replace(o,ca[o]);o=parseInt(la[s],16),n[a]=[o>>16&255,o>>8&255,o&255]}return n}let $e;function bg(n){$e||($e=mg(),$e.transparent=[0,0,0,0]);const t=$e[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const _g=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function vg(n){const t=_g.exec(n);let e=255,i,r,o;if(t){if(t[7]!==i){const s=+t[7];e=t[8]?fe(s):At(s*255,0,255)}return i=+t[1],r=+t[3],o=+t[5],i=255&(t[2]?fe(i):At(i,0,255)),r=255&(t[4]?fe(r):At(r,0,255)),o=255&(t[6]?fe(o):At(o,0,255)),{r:i,g:r,b:o,a:e}}}function xg(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${kt(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Ri=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Jt=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function wg(n,t,e){const i=Jt(kt(n.r)),r=Jt(kt(n.g)),o=Jt(kt(n.b));return{r:Lt(Ri(i+e*(Jt(kt(t.r))-i))),g:Lt(Ri(r+e*(Jt(kt(t.g))-r))),b:Lt(Ri(o+e*(Jt(kt(t.b))-o))),a:n.a+e*(t.a-n.a)}}function Ae(n,t,e){if(n){let i=bo(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=vo(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ic(n,t){return n&&Object.assign(t||{},n)}function ua(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Lt(n[3]))):(t=Ic(n,{r:0,g:0,b:0,a:1}),t.a=Lt(t.a)),t}function Og(n){return n.charAt(0)==="r"?vg(n):pg(n)}class ci{constructor(t){if(t instanceof ci)return t;const e=typeof t;let i;e==="object"?i=ua(t):e==="string"&&(i=og(t)||bg(t)||Og(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Ic(this._rgb);return t&&(t.a=kt(t.a)),t}set rgb(t){this._rgb=ua(t)}rgbString(){return this._valid?xg(this._rgb):void 0}hexString(){return this._valid?ag(this._rgb):void 0}hslString(){return this._valid?yg(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,r=t.rgb;let o;const s=e===o?.5:e,a=2*s-1,c=i.a-r.a,l=((a*c===-1?a:(a+c)/(1+a*c))+1)/2;o=1-l,i.r=255&l*i.r+o*r.r+.5,i.g=255&l*i.g+o*r.g+.5,i.b=255&l*i.b+o*r.b+.5,i.a=s*i.a+(1-s)*r.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=wg(this._rgb,t._rgb,e)),this}clone(){return new ci(this.rgb)}alpha(t){return this._rgb.a=Lt(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Se(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.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 Ae(this._rgb,2,t),this}darken(t){return Ae(this._rgb,2,-t),this}saturate(t){return Ae(this._rgb,1,t),this}desaturate(t){return Ae(this._rgb,1,-t),this}rotate(t){return gg(this._rgb,t),this}}function Lc(n){return new ci(n)}function Fc(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function fa(n){return Fc(n)?n:Lc(n)}function Ti(n){return Fc(n)?n:Lc(n).saturate(.5).darken(.1).hexString()}const qt=Object.create(null),Zr=Object.create(null);function me(n,t){if(!t)return n;const e=t.split(".");for(let i=0,r=e.length;i<r;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function Di(n,t,e){return typeof t=="string"?_e(me(n,t),e):_e(me(n,""),t)}class Pg{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=e=>e.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=(e,i)=>Ti(i.backgroundColor),this.hoverBorderColor=(e,i)=>Ti(i.borderColor),this.hoverColor=(e,i)=>Ti(i.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)}set(t,e){return Di(this,t,e)}get(t){return me(this,t)}describe(t,e){return Di(Zr,t,e)}override(t,e){return Di(qt,t,e)}route(t,e,i,r){const o=me(this,t),s=me(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[a],l=s[r];return A(c)?Object.assign({},l,c):k(c,l)},set(c){this[a]=c}}})}}var E=new Pg({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Sg(n){return!n||L(n.size)||L(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function li(n,t,e,i,r){let o=t[r];return o||(o=t[r]=n.measureText(r).width,e.push(r)),o>i&&(i=o),i}function Mg(n,t,e,i){i=i||{};let r=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let s=0;const a=e.length;let c,l,u,f,h;for(c=0;c<a;c++)if(f=e[c],f!=null&&W(f)!==!0)s=li(n,r,o,s,f);else if(W(f))for(l=0,u=f.length;l<u;l++)h=f[l],h!=null&&!W(h)&&(s=li(n,r,o,s,h));n.restore();const d=o.length/2;if(d>e.length){for(c=0;c<d;c++)delete r[o[c]];o.splice(0,d)}return s}function Nt(n,t,e){const i=n.currentDevicePixelRatio,r=e!==0?Math.max(e/2,.5):0;return Math.round((t-r)*i)/i+r}function ha(n,t){t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore()}function Jr(n,t,e,i){Bc(n,t,e,i,null)}function Bc(n,t,e,i,r){let o,s,a,c,l,u;const f=t.pointStyle,h=t.rotation,d=t.radius;let p=(h||0)*Up;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(p),n.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),n.restore();return}if(!(isNaN(d)||d<=0)){switch(n.beginPath(),f){default:r?n.ellipse(e,i,r/2,d,0,0,B):n.arc(e,i,d,0,B),n.closePath();break;case"triangle":n.moveTo(e+Math.sin(p)*d,i-Math.cos(p)*d),p+=ea,n.lineTo(e+Math.sin(p)*d,i-Math.cos(p)*d),p+=ea,n.lineTo(e+Math.sin(p)*d,i-Math.cos(p)*d),n.closePath();break;case"rectRounded":l=d*.516,c=d-l,s=Math.cos(p+oe)*c,a=Math.sin(p+oe)*c,n.arc(e-s,i-a,l,p-Y,p-q),n.arc(e+a,i-s,l,p-q,p),n.arc(e+s,i+a,l,p,p+q),n.arc(e-a,i+s,l,p+q,p+Y),n.closePath();break;case"rect":if(!h){c=Math.SQRT1_2*d,u=r?r/2:c,n.rect(e-u,i-c,2*u,2*c);break}p+=oe;case"rectRot":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+a,i-s),n.lineTo(e+s,i+a),n.lineTo(e-a,i+s),n.closePath();break;case"crossRot":p+=oe;case"cross":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s);break;case"star":s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s),p+=oe,s=Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a),n.moveTo(e+a,i-s),n.lineTo(e-a,i+s);break;case"line":s=r?r/2:Math.cos(p)*d,a=Math.sin(p)*d,n.moveTo(e-s,i-a),n.lineTo(e+s,i+a);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(p)*d,i+Math.sin(p)*d);break}n.fill(),t.borderWidth>0&&n.stroke()}}function xe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function xo(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function wo(n){n.restore()}function kg(n,t,e,i,r){if(!t)return n.lineTo(e.x,e.y);if(r==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else r==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function Rg(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function Xt(n,t,e,i,r,o={}){const s=W(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let c,l;for(n.save(),n.font=r.string,Tg(n,o),c=0;c<s.length;++c)l=s[c],a&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),L(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(l,e,i,o.maxWidth)),n.fillText(l,e,i,o.maxWidth),Dg(n,e,i,l,o),i+=r.lineHeight;n.restore()}function Tg(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),L(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function Dg(n,t,e,i,r){if(r.strikethrough||r.underline){const o=n.measureText(i),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,c=e-o.actualBoundingBoxAscent,l=e+o.actualBoundingBoxDescent,u=r.strikethrough?(c+l)/2:l;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=r.decorationWidth||2,n.moveTo(s,u),n.lineTo(a,u),n.stroke()}}function we(n,t){const{x:e,y:i,w:r,h:o,radius:s}=t;n.arc(e+s.topLeft,i+s.topLeft,s.topLeft,-q,Y,!0),n.lineTo(e,i+o-s.bottomLeft),n.arc(e+s.bottomLeft,i+o-s.bottomLeft,s.bottomLeft,Y,q,!0),n.lineTo(e+r-s.bottomRight,i+o),n.arc(e+r-s.bottomRight,i+o-s.bottomRight,s.bottomRight,q,0,!0),n.lineTo(e+r,i+s.topRight),n.arc(e+r-s.topRight,i+s.topRight,s.topRight,0,-q,!0),n.lineTo(e+s.topLeft,i)}const Cg=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Eg=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function $g(n,t){const e=(""+n).match(Cg);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const Ag=n=>+n||0;function Oo(n,t){const e={},i=A(t),r=i?Object.keys(t):t,o=A(n)?i?s=>k(n[s],n[t[s]]):s=>n[s]:()=>n;for(const s of r)e[s]=Ag(o(s));return e}function zc(n){return Oo(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Yt(n){return Oo(n,["topLeft","topRight","bottomLeft","bottomRight"])}function it(n){const t=zc(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function G(n,t){n=n||{},t=t||E.font;let e=k(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=k(n.style,t.style);i&&!(""+i).match(Eg)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const r={family:k(n.family,t.family),lineHeight:$g(k(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:k(n.weight,t.weight),string:""};return r.string=Sg(r),r}function Ie(n,t,e,i){let r=!0,o,s,a;for(o=0,s=n.length;o<s;++o)if(a=n[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),r=!1),e!==void 0&&W(a)&&(a=a[e%a.length],r=!1),a!==void 0))return i&&!r&&(i.cacheable=!1),a}function Ig(n,t,e){const{min:i,max:r}=n,o=Oc(t,(r-i)/2),s=(a,c)=>e&&a===0?0:a+c;return{min:s(i,-Math.abs(o)),max:s(r,o)}}function zt(n,t){return Object.assign(Object.create(n),t)}function Po(n,t=[""],e=n,i,r=()=>n[0]){ht(i)||(i=jc("_fallback",n));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:e,_fallback:i,_getTarget:r,override:s=>Po([s,...n],t,e,i)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete n[0][a],!0},get(s,a){return Hc(s,a,()=>jg(a,t,n,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(s,a){return pa(s).includes(a)},ownKeys(s){return pa(s)},set(s,a,c){const l=s._storage||(s._storage=r());return s[a]=l[a]=c,delete s._keys,!0}})}function ie(n,t,e,i){const r={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:Nc(n,i),setContext:o=>ie(n,o,e,i),override:o=>ie(n.override(o),t,e,i)};return new Proxy(r,{deleteProperty(o,s){return delete o[s],delete n[s],!0},get(o,s,a){return Hc(o,s,()=>Fg(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(n,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,s)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,s){return Reflect.has(n,s)},ownKeys(){return Reflect.ownKeys(n)},set(o,s,a){return n[s]=a,delete o[s],!0}})}function Nc(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:r=t.allKeys}=n;return{allKeys:r,scriptable:e,indexable:i,isScriptable:Bt(e)?e:()=>e,isIndexable:Bt(i)?i:()=>i}}const Lg=(n,t)=>n?n+po(t):t,So=(n,t)=>A(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Hc(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t))return n[t];const i=e();return n[t]=i,i}function Fg(n,t,e){const{_proxy:i,_context:r,_subProxy:o,_descriptors:s}=n;let a=i[t];return Bt(a)&&s.isScriptable(t)&&(a=Bg(t,a,n,e)),W(a)&&a.length&&(a=zg(t,a,n,s.isIndexable)),So(t,a)&&(a=ie(a,r,o&&o[t],s)),a}function Bg(n,t,e,i){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=e;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);return a.add(n),t=t(o,s||i),a.delete(n),So(n,t)&&(t=Mo(r._scopes,r,n,t)),t}function zg(n,t,e,i){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=e;if(ht(o.index)&&i(n))t=t[o.index%t.length];else if(A(t[0])){const c=t,l=r._scopes.filter(u=>u!==c);t=[];for(const u of c){const f=Mo(l,r,n,u);t.push(ie(f,o,s&&s[n],a))}}return t}function Wc(n,t,e){return Bt(n)?n(t,e):n}const Ng=(n,t)=>n===!0?t:typeof n=="string"?Ft(t,n):void 0;function Hg(n,t,e,i,r){for(const o of t){const s=Ng(e,o);if(s){n.add(s);const a=Wc(s._fallback,e,r);if(ht(a)&&a!==e&&a!==i)return a}else if(s===!1&&ht(i)&&e!==i)return null}return!1}function Mo(n,t,e,i){const r=t._rootScopes,o=Wc(t._fallback,e,i),s=[...n,...r],a=new Set;a.add(i);let c=da(a,s,e,o||e,i);return c===null||ht(o)&&o!==e&&(c=da(a,s,o,c,i),c===null)?!1:Po(Array.from(a),[""],r,o,()=>Wg(t,e,i))}function da(n,t,e,i,r){for(;e;)e=Hg(n,t,e,i,r);return e}function Wg(n,t,e){const i=n._getTarget();t in i||(i[t]={});const r=i[t];return W(r)&&A(e)?e:r}function jg(n,t,e,i){let r;for(const o of t)if(r=jc(Lg(o,n),e),ht(r))return So(n,r)?Mo(e,i,n,r):r}function jc(n,t){for(const e of t){if(!e)continue;const i=e[n];if(ht(i))return i}}function pa(n){let t=n._keys;return t||(t=n._keys=Vg(n._scopes)),t}function Vg(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(r=>!r.startsWith("_")))t.add(i);return Array.from(t)}function Vc(n,t,e,i){const{iScale:r}=n,{key:o="r"}=this._parsing,s=new Array(i);let a,c,l,u;for(a=0,c=i;a<c;++a)l=a+e,u=t[l],s[a]={r:r.parse(Ft(u,o),l)};return s}const Yg=Number.EPSILON||1e-14,re=(n,t)=>t<n.length&&!n[t].skip&&n[t],Yc=n=>n==="x"?"y":"x";function Ug(n,t,e,i){const r=n.skip?t:n,o=t,s=e.skip?t:e,a=Qr(o,r),c=Qr(s,o);let l=a/(a+c),u=c/(a+c);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const f=i*l,h=i*u;return{previous:{x:o.x-f*(s.x-r.x),y:o.y-f*(s.y-r.y)},next:{x:o.x+h*(s.x-r.x),y:o.y+h*(s.y-r.y)}}}function qg(n,t,e){const i=n.length;let r,o,s,a,c,l=re(n,0);for(let u=0;u<i-1;++u)if(c=l,l=re(n,u+1),!(!c||!l)){if(ge(t[u],0,Yg)){e[u]=e[u+1]=0;continue}r=e[u]/t[u],o=e[u+1]/t[u],a=Math.pow(r,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),e[u]=r*s*t[u],e[u+1]=o*s*t[u])}}function Xg(n,t,e="x"){const i=Yc(e),r=n.length;let o,s,a,c=re(n,0);for(let l=0;l<r;++l){if(s=a,a=c,c=re(n,l+1),!a)continue;const u=a[e],f=a[i];s&&(o=(u-s[e])/3,a[`cp1${e}`]=u-o,a[`cp1${i}`]=f-o*t[l]),c&&(o=(c[e]-u)/3,a[`cp2${e}`]=u+o,a[`cp2${i}`]=f+o*t[l])}}function Kg(n,t="x"){const e=Yc(t),i=n.length,r=Array(i).fill(0),o=Array(i);let s,a,c,l=re(n,0);for(s=0;s<i;++s)if(a=c,c=l,l=re(n,s+1),!!c){if(l){const u=l[t]-c[t];r[s]=u!==0?(l[e]-c[e])/u:0}o[s]=a?l?wt(r[s-1])!==wt(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}qg(n,r,o),Xg(n,o,t)}function Le(n,t,e){return Math.max(Math.min(n,e),t)}function Qg(n,t){let e,i,r,o,s,a=xe(n[0],t);for(e=0,i=n.length;e<i;++e)s=o,o=a,a=e<i-1&&xe(n[e+1],t),o&&(r=n[e],s&&(r.cp1x=Le(r.cp1x,t.left,t.right),r.cp1y=Le(r.cp1y,t.top,t.bottom)),a&&(r.cp2x=Le(r.cp2x,t.left,t.right),r.cp2y=Le(r.cp2y,t.top,t.bottom)))}function Gg(n,t,e,i,r){let o,s,a,c;if(t.spanGaps&&(n=n.filter(l=>!l.skip)),t.cubicInterpolationMode==="monotone")Kg(n,r);else{let l=i?n[n.length-1]:n[0];for(o=0,s=n.length;o<s;++o)a=n[o],c=Ug(l,a,n[Math.min(o+1,s-(i?0:1))%s],t.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,l=a}t.capBezierPoints&&Qg(n,e)}function Uc(){return typeof window<"u"&&typeof document<"u"}function ko(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ui(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const mi=n=>window.getComputedStyle(n,null);function Zg(n,t){return mi(n).getPropertyValue(t)}const Jg=["top","right","bottom","left"];function Ut(n,t,e){const i={};e=e?"-"+e:"";for(let r=0;r<4;r++){const o=Jg[r];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ty=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function ey(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:r,offsetY:o}=i;let s=!1,a,c;if(ty(r,o,n.target))a=r,c=o;else{const l=t.getBoundingClientRect();a=i.clientX-l.left,c=i.clientY-l.top,s=!0}return{x:a,y:c,box:s}}function Wt(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,r=mi(e),o=r.boxSizing==="border-box",s=Ut(r,"padding"),a=Ut(r,"border","width"),{x:c,y:l,box:u}=ey(n,e),f=s.left+(u&&a.left),h=s.top+(u&&a.top);let{width:d,height:p}=t;return o&&(d-=s.width+a.width,p-=s.height+a.height),{x:Math.round((c-f)/d*e.width/i),y:Math.round((l-h)/p*e.height/i)}}function ny(n,t,e){let i,r;if(t===void 0||e===void 0){const o=ko(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const s=o.getBoundingClientRect(),a=mi(o),c=Ut(a,"border","width"),l=Ut(a,"padding");t=s.width-l.width-c.width,e=s.height-l.height-c.height,i=ui(a.maxWidth,o,"clientWidth"),r=ui(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||ai,maxHeight:r||ai}}const Ci=n=>Math.round(n*10)/10;function iy(n,t,e,i){const r=mi(n),o=Ut(r,"margin"),s=ui(r.maxWidth,n,"clientWidth")||ai,a=ui(r.maxHeight,n,"clientHeight")||ai,c=ny(n,t,e);let{width:l,height:u}=c;if(r.boxSizing==="content-box"){const f=Ut(r,"border","width"),h=Ut(r,"padding");l-=h.width+f.width,u-=h.height+f.height}return l=Math.max(0,l-o.width),u=Math.max(0,i?Math.floor(l/i):u-o.height),l=Ci(Math.min(l,s,c.maxWidth)),u=Ci(Math.min(u,a,c.maxHeight)),l&&!u&&(u=Ci(l/2)),{width:l,height:u}}function ga(n,t,e){const i=t||1,r=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=r/i,n.width=o/i;const s=n.canvas;return s.style&&(e||!s.style.height&&!s.style.width)&&(s.style.height=`${n.height}px`,s.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||s.height!==r||s.width!==o?(n.currentDevicePixelRatio=i,s.height=r,s.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const ry=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return n}();function ya(n,t){const e=Zg(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function jt(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function oy(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function sy(n,t,e,i){const r={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},s=jt(n,r,e),a=jt(r,o,e),c=jt(o,t,e),l=jt(s,a,e),u=jt(a,c,e);return jt(l,u,e)}const ma=new Map;function ay(n,t){t=t||{};const e=n+JSON.stringify(t);let i=ma.get(e);return i||(i=new Intl.NumberFormat(n,t),ma.set(e,i)),i}function Me(n,t,e){return ay(t,e).format(n)}const cy=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ly=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ee(n,t,e){return n?cy(t,e):ly()}function qc(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function Xc(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function Kc(n){return n==="angle"?{between:ve,compare:Kp,normalize:dt}:{between:$t,compare:(t,e)=>t-e,normalize:t=>t}}function ba({start:n,end:t,count:e,loop:i,style:r}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:r}}function uy(n,t,e){const{property:i,start:r,end:o}=e,{between:s,normalize:a}=Kc(i),c=t.length;let{start:l,end:u,loop:f}=n,h,d;if(f){for(l+=c,u+=c,h=0,d=c;h<d&&s(a(t[l%c][i]),r,o);++h)l--,u--;l%=c,u%=c}return u<l&&(u+=c),{start:l,end:u,loop:f,style:n.style}}function fy(n,t,e){if(!e)return[n];const{property:i,start:r,end:o}=e,s=t.length,{compare:a,between:c,normalize:l}=Kc(i),{start:u,end:f,loop:h,style:d}=uy(n,t,e),p=[];let g=!1,y=null,m,b,v;const x=()=>c(r,v,m)&&a(r,v)!==0,_=()=>a(o,m)===0||c(o,v,m),w=()=>g||x(),O=()=>!g||_();for(let S=u,P=u;S<=f;++S)b=t[S%s],!b.skip&&(m=l(b[i]),m!==v&&(g=c(m,r,o),y===null&&w()&&(y=a(m,r)===0?S:P),y!==null&&O()&&(p.push(ba({start:y,end:S,loop:h,count:s,style:d})),y=null),P=S,v=m));return y!==null&&p.push(ba({start:y,end:f,loop:h,count:s,style:d})),p}function hy(n,t){const e=[],i=n.segments;for(let r=0;r<i.length;r++){const o=fy(i[r],n.points,t);o.length&&e.push(...o)}return e}function dy(n,t,e,i){let r=0,o=t-1;if(e&&!i)for(;r<t&&!n[r].skip;)r++;for(;r<t&&n[r].skip;)r++;for(r%=t,e&&(o+=r);o>r&&n[o%t].skip;)o--;return o%=t,{start:r,end:o}}function py(n,t,e,i){const r=n.length,o=[];let s=t,a=n[t],c;for(c=t+1;c<=e;++c){const l=n[c%r];l.skip||l.stop?a.skip||(i=!1,o.push({start:t%r,end:(c-1)%r,loop:i}),t=s=l.stop?c:null):(s=c,a.skip&&(t=c)),a=l}return s!==null&&o.push({start:t%r,end:s%r,loop:i}),o}function gy(n,t){const e=n.points,i=n.options.spanGaps,r=e.length;if(!r)return[];const o=!!n._loop,{start:s,end:a}=dy(e,r,o,i);if(i===!0)return _a(n,[{start:s,end:a,loop:o}],e,t);const c=a<s?a+r:a,l=!!n._fullLoop&&s===0&&a===r-1;return _a(n,py(e,s,c,l),e,t)}function _a(n,t,e,i){return!i||!i.setContext||!e?t:yy(n,t,e,i)}function yy(n,t,e,i){const r=n._chart.getContext(),o=va(n.options),{_datasetIndex:s,options:{spanGaps:a}}=n,c=e.length,l=[];let u=o,f=t[0].start,h=f;function d(p,g,y,m){const b=a?-1:1;if(p!==g){for(p+=c;e[p%c].skip;)p-=b;for(;e[g%c].skip;)g+=b;p%c!==g%c&&(l.push({start:p%c,end:g%c,loop:y,style:m}),u=m,f=g%c)}}for(const p of t){f=a?f:p.start;let g=e[f%c],y;for(h=f+1;h<=p.end;h++){const m=e[h%c];y=va(i.setContext(zt(r,{type:"segment",p0:g,p1:m,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:s}))),my(y,u)&&d(f,h-1,p.loop,u),g=m,u=y}f<h-1&&d(f,h-1,p.loop,u)}return l}function va(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function my(n,t){return t&&JSON.stringify(n)!==JSON.stringify(t)}/*!
|
|
13
13
|
* Chart.js v3.9.1
|
|
14
14
|
* https://www.chartjs.org
|
|
15
15
|
* (c) 2022 Chart.js Contributors
|
|
16
16
|
* Released under the MIT License
|
|
17
|
-
*/class by{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const o=e.listeners[r],s=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Tc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const o=i.items;let s=o.length-1,a=!1,c;for(;s>=0;--s)c=o[s],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),o.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var St=new by;const xa="transparent",_y={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=fa(n||xa),r=i.valid&&fa(t||xa);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class vy{constructor(t,e,i,r){const o=e[i];r=Ie([t.to,r,o,t.from]);const s=Ie([t.from,o,r]);this._active=!0,this._fn=t.fn||_y[t.type||typeof s],this._easing=ye[t.easing]||ye.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ie([t.to,e,r,t.from]),this._from=Ie([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,o=this._from,s=this._loop,a=this._to;let c;if(this._active=o!==a&&(s||e<i),!this._active){this._target[r]=a,this._notify(!0);return}if(e<0){this._target[r]=o;return}c=e/i%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[r]=this._fn(o,a,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}const xy=["x","y","borderWidth","radius","tension"],wy=["color","borderColor","backgroundColor"];$.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Oy=Object.keys($.animation);$.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});$.set("animations",{colors:{type:"color",properties:wy},numbers:{type:"number",properties:xy}});$.describe("animations",{_fallback:"animation"});$.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:n=>n|0}}}});class Qc{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const r=t[i];if(!A(r))return;const o={};for(const s of Oy)o[s]=r[s];(W(r.properties)&&r.properties||[i]).forEach(s=>{(s===i||!e.has(s))&&e.set(s,o)})})}_animateOptions(t,e){const i=e.options,r=Sy(t,i);if(!r)return[];const o=this._createAnimations(r,i);return i.$shared&&Py(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,r=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let c;for(c=s.length-1;c>=0;--c){const l=s[c];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(t,e));continue}const u=e[l];let f=o[l];const h=i.get(l);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){t[l]=u;continue}o[l]=f=new vy(h,t,l,u),r.push(f)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return St.add(this._chart,i),!0}}function Py(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const o=n[i[r]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Sy(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function wa(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:r,end:i?r:o}}function My(n,t,e){if(e===!1)return!1;const i=wa(n,e),r=wa(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function ky(n){let t,e,i,r;return A(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function Gc(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,o;for(r=0,o=i.length;r<o;++r)e.push(i[r].index);return e}function Oa(n,t,e,i={}){const r=n.keys,o=i.mode==="single";let s,a,c,l;if(t!==null){for(s=0,a=r.length;s<a;++s){if(c=+r[s],c===e){if(i.all)continue;break}l=n.values[c],tt(l)&&(o||t===0||wt(t)===wt(l))&&(t+=l)}return t}}function Ry(n){const t=Object.keys(n),e=new Array(t.length);let i,r,o;for(i=0,r=t.length;i<r;++i)o=t[i],e[i]={x:o,y:n[o]};return e}function Pa(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Ty(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Dy(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function Cy(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Sa(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const o=n[r.index];if(e&&o>0||!e&&o<0)return r.index}return null}function Ma(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:o,vScale:s,index:a}=i,c=o.axis,l=s.axis,u=Ty(o,s,i),f=t.length;let h;for(let d=0;d<f;++d){const p=t[d],{[c]:g,[l]:y}=p,m=p._stacks||(p._stacks={});h=m[l]=Cy(r,u,g),h[a]=y,h._top=Sa(h,s,!0,i.type),h._bottom=Sa(h,s,!1,i.type)}}function $i(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function $y(n,t){return zt(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Ey(n,t,e){return zt(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function se(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const o=r._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e]}}}const Ei=n=>n==="reset"||n==="none",ka=(n,t)=>t?n:Object.assign({},n),Ay=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Gc(e,!0),values:null};class gt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pa(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&se(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(f,h,d,p)=>f==="x"?h:f==="r"?p:d,o=e.xAxisID=k(i.xAxisID,$i(t,"x")),s=e.yAxisID=k(i.yAxisID,$i(t,"y")),a=e.rAxisID=k(i.rAxisID,$i(t,"r")),c=e.indexAxis,l=e.iAxisID=r(c,o,s,a),u=e.vAxisID=r(c,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ra(this._data,this),t._stacked&&se(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=Ry(e);else if(i!==e){if(i){ra(i,this);const r=this._cachedMeta;se(r),r._parsed=[]}e&&Object.isExtensible(e)&&Jp(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const o=e._stacked;e._stacked=Pa(e.vScale,e),e.stack!==i.stack&&(r=!0,se(e),e.stack=i.stack),this._resyncElements(t),(r||o!==e._stacked)&&Ma(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:s}=i,a=o.axis;let c=t===0&&e===r.length?!0:i._sorted,l=t>0&&i._parsed[t-1],u,f,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{W(r[t])?h=this.parseArrayData(i,r,t,e):A(r[t])?h=this.parseObjectData(i,r,t,e):h=this.parsePrimitiveData(i,r,t,e);const d=()=>f[a]===null||l&&f[a]<l[a];for(u=0;u<e;++u)i._parsed[u+t]=f=h[u],c&&(d()&&(c=!1),l=f);i._sorted=c}s&&Ma(this,h)}parsePrimitiveData(t,e,i,r){const{iScale:o,vScale:s}=t,a=o.axis,c=s.axis,l=o.getLabels(),u=o===s,f=new Array(r);let h,d,p;for(h=0,d=r;h<d;++h)p=h+i,f[h]={[a]:u||o.parse(l[p],p),[c]:s.parse(e[p],p)};return f}parseArrayData(t,e,i,r){const{xScale:o,yScale:s}=t,a=new Array(r);let c,l,u,f;for(c=0,l=r;c<l;++c)u=c+i,f=e[u],a[c]={x:o.parse(f[0],u),y:s.parse(f[1],u)};return a}parseObjectData(t,e,i,r){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=new Array(r);let u,f,h,d;for(u=0,f=r;u<f;++u)h=u+i,d=e[h],l[u]={x:o.parse(Ft(d,a),h),y:s.parse(Ft(d,c),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,o=this._cachedMeta,s=e[t.axis],a={keys:Gc(r,!0),values:e._stacks[t.axis]};return Oa(a,s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const o=i[e.axis];let s=o===null?NaN:o;const a=r&&i._stacks[e.axis];r&&a&&(r.values=a,s=Oa(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,s=r.length,a=this._getOtherScale(t),c=Ay(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Dy(a);let h,d;function p(){d=r[h];const g=d[a.axis];return!tt(d[t.axis])||u>g||f<g}for(h=0;h<s&&!(!p()&&(this.updateRangeFromParsed(l,t,d,c),o));++h);if(o){for(h=s-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(l,t,d,c);break}}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,o,s;for(r=0,o=e.length;r<o;++r)s=e[r][t.axis],tt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=ky(k(this.options.clip,My(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],o=e.chartArea,s=[],a=this._drawStart||0,c=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,c),u=a;u<a+c;++u){const f=r[u];f.hidden||(f.active&&l?s.push(f):f.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=Ey(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=$y(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",o=this._cachedDataOpts,s=t+"-"+e,a=o[s],c=this.enableOptionSharing&&ht(i);if(a)return ka(a,c);const l=this.chart.config,u=l.datasetElementScopeKeys(this._type,t),f=r?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),u),d=Object.keys($.elements[t]),p=()=>this.getContext(i,r),g=l.resolveNamedOptions(h,d,p,f);return g.$shared&&(g.$shared=c,o[s]=Object.freeze(ka(g,c))),g}_resolveAnimations(t,e,i){const r=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,a=o[s];if(a)return a;let c;if(r.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,e),h=u.getOptionScopes(this.getDataset(),f);c=u.createResolver(h,this.getContext(t,i,e))}const l=new Qc(r,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Ei(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==r;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,r){Ei(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!Ei(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const o=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,c,l]of this._syncList)this[a](c,l);this._syncList=[];const r=i.length,o=e.length,s=Math.min(o,r);s&&this.parse(0,s),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,e,i=!0){const r=this._cachedMeta,o=r.data,s=t+e;let a;const c=l=>{for(l.length+=e,a=l.length-1;a>=s;a--)l[a]=l[a-e]};for(c(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&c(r._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&se(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](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,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}gt.defaults={};gt.prototype.datasetElementType=null;gt.prototype.dataElementType=null;function Iy(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,o=e.length;r<o;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=Rc(i.sort((r,o)=>r-o))}return n._cache.$bar}function Ly(n){const t=n.iScale,e=Iy(t,n.type);let i=t._length,r,o,s,a;const c=()=>{s===32767||s===-32768||(ht(a)&&(i=Math.min(i,Math.abs(s-a)||i)),a=s)};for(r=0,o=e.length;r<o;++r)s=t.getPixelForValue(e[r]),c();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)s=t.getPixelForTick(r),c();return i}function Fy(n,t,e,i){const r=e.barThickness;let o,s;return L(r)?(o=t.min*e.categoryPercentage,s=e.barPercentage):(o=r*i,s=1),{chunk:o/i,ratio:s,start:t.pixels[n]-o/2}}function By(n,t,e,i){const r=t.pixels,o=r[n];let s=n>0?r[n-1]:null,a=n<r.length-1?r[n+1]:null;const c=e.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const l=o-(o-Math.min(s,a))/2*c;return{chunk:Math.abs(a-s)/2*c/i,ratio:e.barPercentage,start:l}}function zy(n,t,e,i){const r=e.parse(n[0],i),o=e.parse(n[1],i),s=Math.min(r,o),a=Math.max(r,o);let c=s,l=a;Math.abs(s)>Math.abs(a)&&(c=a,l=s),t[e.axis]=l,t._custom={barStart:c,barEnd:l,start:r,end:o,min:s,max:a}}function Zc(n,t,e,i){return W(n)?zy(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Ra(n,t,e,i){const r=n.iScale,o=n.vScale,s=r.getLabels(),a=r===o,c=[];let l,u,f,h;for(l=e,u=e+i;l<u;++l)h=t[l],f={},f[r.axis]=a||r.parse(s[l],l),c.push(Zc(h,f,o,l));return c}function Ai(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Ny(n,t,e){return n!==0?wt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Hy(n){let t,e,i,r,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",o="start"):(r="start",o="end"),{start:e,end:i,reverse:t,top:r,bottom:o}}function Wy(n,t,e,i){let r=t.borderSkipped;const o={};if(!r){n.borderSkipped=o;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:c,top:l,bottom:u}=Hy(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=l:(e._bottom||0)===i?r=u:(o[Ta(u,s,a,c)]=!0,r=l)),o[Ta(r,s,a,c)]=!0,n.borderSkipped=o}function Ta(n,t,e,i){return i?(n=jy(n,t,e),n=Da(n,e,t)):n=Da(n,t,e),n}function jy(n,t,e){return n===t?e:n===e?t:n}function Da(n,t,e){return n==="start"?t:n==="end"?e:n}function Vy(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Ro extends gt{parsePrimitiveData(t,e,i,r){return Ra(t,e,i,r)}parseArrayData(t,e,i,r){return Ra(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=o.axis==="x"?a:c,u=s.axis==="x"?a:c,f=[];let h,d,p,g;for(h=i,d=i+r;h<d;++h)g=e[h],p={},p[o.axis]=o.parse(Ft(g,l),h),f.push(Zc(Ft(g,u),p,s,h));return f}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,o=this.getParsed(t),s=o._custom,a=Ai(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const o=r==="reset",{index:s,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),l=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(e,r);for(let d=e;d<e+i;d++){const p=this.getParsed(d),g=o||L(p[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(d),y=this._calculateBarIndexPixels(d,u),m=(p._stacks||{})[a.axis],b={horizontal:l,base:g.base,enableBorderRadius:!m||Ai(p._custom)||s===m._top||s===m._bottom,x:l?g.head:y.center,y:l?y.center:g.head,height:l?y.size:Math.abs(g.size),width:l?Math.abs(g.size):y.size};h&&(b.options=f||this.resolveDataElementOptions(d,t[d].active?"active":r));const v=b.options||t[d].options;Wy(b,v,m,s),Vy(b,v,u.ratio),this.updateElement(t[d],d,b,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),o=i.options.stacked,s=[],a=c=>{const l=c.controller.getParsed(e),u=l&&l[c.vScale.axis];if(L(u)||isNaN(u))return!0};for(const c of r)if(!(e!==void 0&&a(c))&&((o===!1||s.indexOf(c.stack)===-1||o===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),o=e!==void 0?r.indexOf(e):-1;return o===-1?r.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let o,s;for(o=0,s=e.data.length;o<s;++o)r.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||Ly(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:r,minBarLength:o}}=this,s=r||0,a=this.getParsed(t),c=a._custom,l=Ai(c);let u=a[e.axis],f=0,h=i?this.applyStack(e,a,i):u,d,p;h!==u&&(f=h-u,h=u),l&&(u=c.barStart,h=c.barEnd-c.barStart,u!==0&&wt(u)!==wt(c.barEnd)&&(f=0),f+=u);const g=!L(r)&&!l?r:f;let y=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?d=e.getPixelForValue(f+h):d=y,p=d-y,Math.abs(p)<o){p=Ny(p,e,s)*o,u===s&&(y-=p/2);const m=e.getPixelForDecimal(0),b=e.getPixelForDecimal(1),v=Math.min(m,b),x=Math.max(m,b);y=Math.max(Math.min(y,x),v),d=y+p}if(y===e.getPixelForValue(s)){const m=wt(p)*e.getLineWidthForValue(s)/2;y+=m,p-=m}return{size:p,base:y,head:d,center:d+p/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,o=r.skipNull,s=k(r.maxBarThickness,1/0);let a,c;if(e.grouped){const l=o?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?By(t,e,r,l):Fy(t,e,r,l),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*f+u.chunk/2,c=Math.min(s,u.chunk*u.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(s,e.min*e.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let o=0;for(;o<r;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}Ro.id="bar";Ro.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};Ro.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class To extends gt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const o=super.parsePrimitiveData(t,e,i,r);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+i).radius;return o}parseArrayData(t,e,i,r){const o=super.parseArrayData(t,e,i,r);for(let s=0;s<o.length;s++){const a=e[i+s];o[s]._custom=k(a[2],this.resolveDataElementOptions(s+i).radius)}return o}parseObjectData(t,e,i,r){const o=super.parseObjectData(t,e,i,r);for(let s=0;s<o.length;s++){const a=e[i+s];o[s]._custom=k(a&&a.r&&+a.r,this.resolveDataElementOptions(s+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:r}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=r.getLabelForValue(o.y),c=o._custom;return{label:e.label,value:"("+s+", "+a+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:c,includeOptions:l}=this._getSharedOptions(e,r),u=s.axis,f=a.axis;for(let h=e;h<e+i;h++){const d=t[h],p=!o&&this.getParsed(h),g={},y=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),m=g[f]=o?a.getBasePixel():a.getPixelForValue(p[f]);g.skip=isNaN(y)||isNaN(m),l&&(g.options=c||this.resolveDataElementOptions(h,d.active?"active":r),o&&(g.options.radius=0)),this.updateElement(d,h,g,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return e!=="active"&&(r.radius=0),r.radius+=k(i&&i._custom,o),r}}To.id="bubble";To.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};To.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Yy(n,t,e){let i=1,r=1,o=0,s=0;if(t<B){const a=n,c=a+t,l=Math.cos(a),u=Math.sin(a),f=Math.cos(c),h=Math.sin(c),d=(v,x,_)=>ve(v,a,c,!0)?1:Math.max(x,x*e,_,_*e),p=(v,x,_)=>ve(v,a,c,!0)?-1:Math.min(x,x*e,_,_*e),g=d(0,l,f),y=d(q,u,h),m=p(Y,l,f),b=p(Y+q,u,h);i=(g-m)/2,r=(y-b)/2,o=-(g+m)/2,s=-(y+b)/2}return{ratioX:i,ratioY:r,offsetX:o,offsetY:s}}class ke extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let o=c=>+i[c];if(A(i[t])){const{key:c="value"}=this._parsing;o=l=>+Ft(i[l],c)}let s,a;for(s=t,a=t+e;s<a;++s)r._parsed[s]=o(s)}}_getRotation(){return pt(this.options.rotation-90)}_getCircumference(){return pt(this.options.circumference)}_getRotationExtents(){let t=B,e=-B;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const r=this.chart.getDatasetMeta(i).controller,o=r._getRotation(),s=r._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,o=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-s)/2,0),c=Math.min(zp(this.options.cutout,a),1),l=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:p,offsetY:g}=Yy(f,u,c),y=(i.width-s)/h,m=(i.height-s)/d,b=Math.max(Math.min(y,m)/2,0),v=Oc(this.options.radius,b),x=Math.max(v*c,0),_=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=g*v,r.total=this.calculateTotal(),this.outerRadius=v-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*l,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/B)}updateElements(t,e,i,r){const o=r==="reset",s=this.chart,a=s.chartArea,l=s.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=o&&l.animateScale,d=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(e,r);let m=this._getRotation(),b;for(b=0;b<e;++b)m+=this._circumference(b,o);for(b=e;b<e+i;++b){const v=this._circumference(b,o),x=t[b],_={x:u+this.offsetX,y:f+this.offsetY,startAngle:m,endAngle:m+v,circumference:v,outerRadius:p,innerRadius:d};y&&(_.options=g||this.resolveDataElementOptions(b,x.active?"active":r)),m+=v,this.updateElement(x,b,_,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const o=t._parsed[r];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?B*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Me(e._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,o,s,a,c;if(!t){for(r=0,o=i.data.datasets.length;r<o;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,a=s.controller;break}}if(!t)return 0;for(r=0,o=t.length;r<o;++r)c=a.resolveDataElementOptions(r),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(k(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ke.id="doughnut";ke.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"};ke.descriptors={_scriptable:n=>n!=="spacing",_indexable:n=>n!=="spacing"};ke.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=n.legend.options;return t.labels.map((i,r)=>{const s=n.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:e,hidden:!n.getDataVisibility(r),index:r}})}return[]}},onClick(n,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let t=n.label;const e=": "+n.formattedValue;return W(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};class bi extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:a,count:c}=Cc(e,r,s);this._drawStart=a,this._drawCount=c,$c(e)&&(a=0,c=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(r,a,c,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(e,r),h=s.axis,d=a.axis,{spanGaps:p,segment:g}=this.options,y=ne(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||r==="none";let b=e>0&&this.getParsed(e-1);for(let v=e;v<e+i;++v){const x=t[v],_=this.getParsed(v),w=m?x:{},O=L(_[d]),S=w[h]=s.getPixelForValue(_[h],v),P=w[d]=o||O?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,_,c):_[d],v);w.skip=isNaN(S)||isNaN(P)||O,w.stop=v>0&&Math.abs(_[h]-b[h])>y,g&&(w.parsed=_,w.raw=l.data[v]),f&&(w.options=u||this.resolveDataElementOptions(v,x.active?"active":r)),m||this.updateElement(x,v,w,r),b=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}bi.id="line";bi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};bi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Do extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Me(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,i,r){return Vc.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const o=this.getParsed(r).r;!isNaN(o)&&this.chart.getDataVisibility(r)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,r){const o=r==="reset",s=this.chart,c=s.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,f=l.yCenter,h=l.getIndexAngle(0)-.5*Y;let d=h,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)d+=this._computeAngle(p,r,g);for(p=e;p<e+i;p++){const y=t[p];let m=d,b=d+this._computeAngle(p,r,g),v=s.getDataVisibility(p)?l.getDistanceFromCenterForValue(this.getParsed(p).r):0;d=b,o&&(c.animateScale&&(v=0),c.animateRotate&&(m=b=h));const x={x:u,y:f,innerRadius:0,outerRadius:v,startAngle:m,endAngle:b,options:this.resolveDataElementOptions(p,y.active?"active":r)};this.updateElement(y,p,x,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?pt(this.resolveDataElementOptions(t,e).angle||i):0}}Do.id="polarArea";Do.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Do.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=n.legend.options;return t.labels.map((i,r)=>{const s=n.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:e,hidden:!n.getDataVisibility(r),index:r}})}return[]}},onClick(n,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Jc extends ke{}Jc.id="pie";Jc.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Co extends gt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return Vc.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],o=e.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===r.length,options:s};this.updateElement(i,void 0,a,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const o=this._cachedMeta.rScale,s=r==="reset";for(let a=e;a<e+i;a++){const c=t[a],l=this.resolveDataElementOptions(a,c.active?"active":r),u=o.getPointPositionForValue(a,this.getParsed(a).r),f=s?o.xCenter:u.x,h=s?o.yCenter:u.y,d={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:l};this.updateElement(c,a,d,r)}}}Co.id="radar";Co.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};Co.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class yt{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ne(this.x)&&ne(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(o=>{r[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),r}}yt.defaults={};yt.defaultRoutes=void 0;const tl={values(n){return W(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,o=n;if(e.length>1){const l=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),o=Uy(n,e)}const s=ut(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Me(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(ut(n)));return i===1||i===2||i===5?tl.numeric.call(this,n,t,e):""}};function Uy(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var _i={formatters:tl};$.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:_i.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});$.route("scale.ticks","color","","color");$.route("scale.grid","color","","borderColor");$.route("scale.grid","borderColor","","borderColor");$.route("scale.title","color","","color");$.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});$.describe("scales",{_fallback:"scale"});$.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function qy(n,t){const e=n.options.ticks,i=e.maxTicksLimit||Xy(n),r=e.major.enabled?Qy(t):[],o=r.length,s=r[0],a=r[o-1],c=[];if(o>i)return Gy(t,c,r,o/i),c;const l=Ky(r,t,i);if(o>0){let u,f;const h=o>1?Math.round((a-s)/(o-1)):null;for(Fe(t,c,l,L(h)?0:s-h,s),u=0,f=o-1;u<f;u++)Fe(t,c,l,r[u],r[u+1]);return Fe(t,c,l,a,L(h)?t.length:a+h),c}return Fe(t,c,l),c}function Xy(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function Ky(n,t,e){const i=Zy(n),r=t.length/e;if(!i)return Math.max(r,1);const o=qp(i);for(let s=0,a=o.length-1;s<a;s++){const c=o[s];if(c>r)return c}return Math.max(r,1)}function Qy(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Gy(n,t,e,i){let r=0,o=e[0],s;for(i=Math.ceil(i),s=0;s<n.length;s++)s===o&&(t.push(n[s]),r++,o=e[r*i])}function Fe(n,t,e,i,r){const o=k(i,0),s=Math.min(k(r,n.length),n.length);let a=0,c,l,u;for(e=Math.ceil(e),r&&(c=r-i,e=c/Math.floor(c/e)),u=o;u<0;)a++,u=Math.round(o+a*e);for(l=Math.max(o,0);l<s;l++)l===u&&(t.push(n[l]),a++,u=Math.round(o+a*e))}function Zy(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const Jy=n=>n==="left"?"right":n==="right"?"left":n,Ca=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e;function $a(n,t){const e=[],i=n.length/t,r=n.length;let o=0;for(;o<r;o+=i)e.push(n[Math.floor(o)]);return e}function tm(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),o=n._startPixel,s=n._endPixel,a=1e-6;let c=n.getPixelForTick(r),l;if(!(e&&(i===1?l=Math.max(c-o,s-c):t===0?l=(n.getPixelForTick(1)-c)/2:l=(c-n.getPixelForTick(r-1))/2,c+=r<t?l:-l,c<o-a||c>s+a)))return c}function em(n,t){F(n,e=>{const i=e.gc,r=i.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[i[o]];i.splice(0,r)}})}function ae(n){return n.drawTicks?n.tickLength:0}function Ea(n,t){if(!n.display)return 0;const e=G(n.font,t),i=it(n.padding);return(W(n.text)?n.text.length:1)*e.lineHeight+i.height}function nm(n,t){return zt(n,{scale:t,type:"scale"})}function im(n,t,e){return zt(n,{tick:e,index:t,type:"tick"})}function rm(n,t,e){let i=mo(n);return(e&&t!=="right"||!e&&t==="right")&&(i=Jy(i)),i}function om(n,t,e,i){const{top:r,left:o,bottom:s,right:a,chart:c}=n,{chartArea:l,scales:u}=c;let f=0,h,d,p;const g=s-r,y=a-o;if(n.isHorizontal()){if(d=et(i,o,a),A(e)){const m=Object.keys(e)[0],b=e[m];p=u[m].getPixelForValue(b)+g-t}else e==="center"?p=(l.bottom+l.top)/2+g-t:p=Ca(n,e,t);h=a-o}else{if(A(e)){const m=Object.keys(e)[0],b=e[m];d=u[m].getPixelForValue(b)-y+t}else e==="center"?d=(l.left+l.right)/2-y+t:d=Ca(n,e,t);p=et(i,s,r),f=e==="left"?-q:q}return{titleX:d,titleY:p,maxWidth:h,rotation:f}}class Kt extends yt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=lt(t,Number.POSITIVE_INFINITY),e=lt(e,Number.NEGATIVE_INFINITY),i=lt(i,Number.POSITIVE_INFINITY),r=lt(r,Number.NEGATIVE_INFINITY),{min:lt(t,i),max:lt(e,r),minDefined:tt(t),maxDefined:tt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:o}=this.getUserBounds(),s;if(r&&o)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let c=0,l=a.length;c<l;++c)s=a[c].controller.getMinMax(this,t),r||(e=Math.min(e,s.min)),o||(i=Math.max(i,s.max));return e=o&&e>i?i:e,i=r&&e>i?e:i,{min:lt(e,lt(i,e)),max:lt(i,lt(e,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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ig(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?$a(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=qy(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){N(this.options.afterUpdate,[this])}beforeSetDimensions(){N(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(){N(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),N(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){N(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=N(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){N(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){N(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,r=e.minRotation||0,o=e.maxRotation;let s=r,a,c,l;if(!this._isVisible()||!e.display||r>=o||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,d=nt(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:d/(i-1),f+6>a&&(a=d/(i-(t.offset?.5:1)),c=this.maxHeight-ae(t.grid)-e.padding-Ea(t.title,this.chart.options.font),l=Math.sqrt(f*f+h*h),s=go(Math.min(Math.asin(nt((u.highest.height+6)/a,-1,1)),Math.asin(nt(c/l,-1,1))-Math.asin(nt(h/l,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const c=Ea(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=ae(o)+c):(t.height=this.maxHeight,t.width=ae(o)+c),i.display&&this.ticks.length){const{first:l,last:u,widest:f,highest:h}=this._getLabelSizes(),d=i.padding*2,p=pt(this.labelRotation),g=Math.cos(p),y=Math.sin(p);if(a){const m=i.mirror?0:y*f.width+g*h.height;t.height=Math.min(this.maxHeight,t.height+m+d)}else{const m=i.mirror?0:g*f.width+y*h.height;t.width=Math.min(this.maxWidth,t.width+m+d)}this._calculatePadding(l,u,y,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:o,padding:s},position:a}=this.options,c=this.labelRotation!==0,l=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;c?l?(h=r*t.width,d=i*e.height):(h=i*t.height,d=r*e.width):o==="start"?d=e.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((d-f+s)*this.width/(this.width-f),0)}else{let u=e.height/2,f=t.height/2;o==="start"?(u=0,f=t.height):o==="end"&&(u=e.height,f=0),this.paddingTop=u+s,this.paddingBottom=f+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(){N(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)L(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=$a(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:r}=this,o=[],s=[];let a=0,c=0,l,u,f,h,d,p,g,y,m,b,v;for(l=0;l<e;++l){if(h=t[l].label,d=this._resolveTickFontOptions(l),i.font=p=d.string,g=r[p]=r[p]||{data:{},gc:[]},y=d.lineHeight,m=b=0,!L(h)&&!W(h))m=li(i,g.data,g.gc,m,h),b=y;else if(W(h))for(u=0,f=h.length;u<f;++u)v=h[u],!L(v)&&!W(v)&&(m=li(i,g.data,g.gc,m,v),b+=y);o.push(m),s.push(b),a=Math.max(m,a),c=Math.max(b,c)}em(r,e);const x=o.indexOf(a),_=s.indexOf(c),w=O=>({width:o[O]||0,height:s[O]||0});return{first:w(0),last:w(e-1),widest:w(x),highest:w(_),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Qp(this._alignToPixels?Nt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=im(this.getContext(),t,i))}return this.$context||(this.$context=nm(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=pt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,c=o?o.highest.height+s:0;return this.isHorizontal()?c*i>a*r?a/i:c/r:c*r<a*i?c/i:a/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:o,position:s}=r,a=o.offset,c=this.isHorizontal(),u=this.ticks.length+(a?1:0),f=ae(o),h=[],d=o.setContext(this.getContext()),p=d.drawBorder?d.borderWidth:0,g=p/2,y=function(M){return Nt(i,M,p)};let m,b,v,x,_,w,O,S,P,D,C,R;if(s==="top")m=y(this.bottom),w=this.bottom-f,S=m-g,D=y(t.top)+g,R=t.bottom;else if(s==="bottom")m=y(this.top),D=t.top,R=y(t.bottom)-g,w=m+g,S=this.top+f;else if(s==="left")m=y(this.right),_=this.right-f,O=m-g,P=y(t.left)+g,C=t.right;else if(s==="right")m=y(this.left),P=t.left,C=y(t.right)-g,_=m+g,O=this.left+f;else if(e==="x"){if(s==="center")m=y((t.top+t.bottom)/2+.5);else if(A(s)){const M=Object.keys(s)[0],H=s[M];m=y(this.chart.scales[M].getPixelForValue(H))}D=t.top,R=t.bottom,w=m+g,S=w+f}else if(e==="y"){if(s==="center")m=y((t.left+t.right)/2);else if(A(s)){const M=Object.keys(s)[0],H=s[M];m=y(this.chart.scales[M].getPixelForValue(H))}_=m-g,O=_-f,P=t.left,C=t.right}const j=k(r.ticks.maxTicksLimit,u),J=Math.max(1,Math.ceil(u/j));for(b=0;b<u;b+=J){const M=o.setContext(this.getContext(b)),H=M.lineWidth,V=M.color,Ot=M.borderDash||[],Qt=M.borderDashOffset,Rt=M.tickWidth,Tt=M.tickColor,st=M.tickBorderDash||[],Dt=M.tickBorderDashOffset;v=tm(this,b,a),v!==void 0&&(x=Nt(i,v,H),c?_=O=P=C=x:w=S=D=R=x,h.push({tx1:_,ty1:w,tx2:O,ty2:S,x1:P,y1:D,x2:C,y2:R,width:H,color:V,borderDash:Ot,borderDashOffset:Qt,tickWidth:Rt,tickColor:Tt,tickBorderDash:st,tickBorderDashOffset:Dt}))}return this._ticksLength=u,this._borderValue=m,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:o}=i,s=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:l,padding:u,mirror:f}=o,h=ae(i.grid),d=h+u,p=f?-u:d,g=-pt(this.labelRotation),y=[];let m,b,v,x,_,w,O,S,P,D,C,R,j="middle";if(r==="top")w=this.bottom-p,O=this._getXAxisLabelAlignment();else if(r==="bottom")w=this.top+p,O=this._getXAxisLabelAlignment();else if(r==="left"){const M=this._getYAxisLabelAlignment(h);O=M.textAlign,_=M.x}else if(r==="right"){const M=this._getYAxisLabelAlignment(h);O=M.textAlign,_=M.x}else if(e==="x"){if(r==="center")w=(t.top+t.bottom)/2+d;else if(A(r)){const M=Object.keys(r)[0],H=r[M];w=this.chart.scales[M].getPixelForValue(H)+d}O=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")_=(t.left+t.right)/2-d;else if(A(r)){const M=Object.keys(r)[0],H=r[M];_=this.chart.scales[M].getPixelForValue(H)}O=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(c==="start"?j="top":c==="end"&&(j="bottom"));const J=this._getLabelSizes();for(m=0,b=a.length;m<b;++m){v=a[m],x=v.label;const M=o.setContext(this.getContext(m));S=this.getPixelForTick(m)+o.labelOffset,P=this._resolveTickFontOptions(m),D=P.lineHeight,C=W(x)?x.length:1;const H=C/2,V=M.color,Ot=M.textStrokeColor,Qt=M.textStrokeWidth;let Rt=O;s?(_=S,O==="inner"&&(m===b-1?Rt=this.options.reverse?"left":"right":m===0?Rt=this.options.reverse?"right":"left":Rt="center"),r==="top"?l==="near"||g!==0?R=-C*D+D/2:l==="center"?R=-J.highest.height/2-H*D+D:R=-J.highest.height+D/2:l==="near"||g!==0?R=D/2:l==="center"?R=J.highest.height/2-H*D:R=J.highest.height-C*D,f&&(R*=-1)):(w=S,R=(1-C)*D/2);let Tt;if(M.showLabelBackdrop){const st=it(M.backdropPadding),Dt=J.heights[m],Ct=J.widths[m];let Gt=w+R-st.top,Zt=_-st.left;switch(j){case"middle":Gt-=Dt/2;break;case"bottom":Gt-=Dt;break}switch(O){case"center":Zt-=Ct/2;break;case"right":Zt-=Ct;break}Tt={left:Zt,top:Gt,width:Ct+st.width,height:Dt+st.height,color:M.backdropColor}}y.push({rotation:g,label:x,font:P,color:V,strokeColor:Ot,strokeWidth:Qt,textOffset:R,textAlign:Rt,textBaseline:j,translation:[_,w],backdrop:Tt})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-pt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,c=s.widest.width;let l,u;return e==="left"?r?(u=this.right+o,i==="near"?l="left":i==="center"?(l="center",u+=c/2):(l="right",u+=c)):(u=this.right-a,i==="near"?l="right":i==="center"?(l="center",u-=c/2):(l="left",u=this.left)):e==="right"?r?(u=this.left+o,i==="near"?l="right":i==="center"?(l="center",u-=c/2):(l="left",u-=c)):(u=this.left+a,i==="near"?l="left":i==="center"?(l="center",u+=c/2):(l="right",u=this.right)):l="right",{textAlign:l,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,o,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(o=>o.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(c,l,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(c.x,c.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=r.length;o<s;++o){const c=r[o];e.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,r=i.setContext(this.getContext()),o=i.drawBorder?r.borderWidth:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let c,l,u,f;this.isHorizontal()?(c=Nt(t,this.left,o)-o/2,l=Nt(t,this.right,s)+s/2,u=f=a):(u=Nt(t,this.top,o)-o/2,f=Nt(t,this.bottom,s)+s/2,c=l=a),e.save(),e.lineWidth=r.borderWidth,e.strokeStyle=r.borderColor,e.beginPath(),e.moveTo(c,u),e.lineTo(l,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&xo(i,r);const o=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const c=o[s],l=c.font,u=c.label;c.backdrop&&(i.fillStyle=c.backdrop.color,i.fillRect(c.backdrop.left,c.backdrop.top,c.backdrop.width,c.backdrop.height));let f=c.textOffset;Xt(i,u,0,f,l,c)}r&&wo(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const o=G(i.font),s=it(i.padding),a=i.align;let c=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(c+=s.bottom,W(i.text)&&(c+=o.lineHeight*(i.text.length-1))):c+=s.top;const{titleX:l,titleY:u,maxWidth:f,rotation:h}=om(this,c,e,a);Xt(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:h,textAlign:rm(a,e,r),textBaseline:"middle",translation:[l,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=k(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==Kt.prototype.draw?[{z:e,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let o,s;for(o=0,s=e.length;o<s;++o){const a=e[o];a[i]===this.id&&(!t||a.type===t)&&r.push(a)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return G(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Be{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;cm(e)&&(i=this.register(e));const r=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,sm(t,s,i),this.override&&$.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in $[r]&&(delete $[r][i],this.override&&delete qt[i])}}function sm(n,t,e){const i=_e(Object.create(null),[e?$.get(e):{},$.get(t),n.defaults]);$.set(t,i),n.defaultRoutes&&am(t,n.defaultRoutes),n.descriptors&&$.describe(t,n.descriptors)}function am(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),o=[n].concat(i).join("."),s=t[e].split("."),a=s.pop(),c=s.join(".");$.route(o,r,c,a)})}function cm(n){return"id"in n&&"defaults"in n}class lm{constructor(){this.controllers=new Be(gt,"datasets",!0),this.elements=new Be(yt,"elements"),this.plugins=new Be(Object,"plugins"),this.scales=new Be(Kt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const o=i||this._getRegistryForType(r);i||o.isForType(r)||o===this.plugins&&r.id?this._exec(t,o,r):F(r,s=>{const a=i||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,e,i){const r=po(t);N(i["before"+r],[],i),e[t](i),N(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var xt=new lm;class $o extends gt{update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:o,count:s}=Cc(e,i,r);if(this._drawStart=o,this._drawCount=s,$c(e)&&(o=0,s=i.length),this.options.showLine){const{dataset:a,_dataset:c}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=i;const l=this.resolveDatasetElementOptions(t);l.segment=this.options.segment,this.updateElement(a,void 0,{animated:!r,options:l},t)}this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=xt.getElement("line")),super.addElements()}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,u=this.resolveDataElementOptions(e,r),f=this.getSharedOptions(u),h=this.includeOptions(r,f),d=s.axis,p=a.axis,{spanGaps:g,segment:y}=this.options,m=ne(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||r==="none";let v=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const _=t[x],w=this.getParsed(x),O=b?_:{},S=L(w[p]),P=O[d]=s.getPixelForValue(w[d],x),D=O[p]=o||S?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,w,c):w[p],x);O.skip=isNaN(P)||isNaN(D)||S,O.stop=x>0&&Math.abs(w[d]-v[d])>m,y&&(O.parsed=w,O.raw=l.data[x]),h&&(O.options=f||this.resolveDataElementOptions(x,_.active?"active":r)),b||this.updateElement(_,x,O,r),v=w}this.updateSharedOptions(f,r,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let c=e.length-1;c>=0;--c)a=Math.max(a,e[c].size(this.resolveDataElementOptions(c))/2);return a>0&&a}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,s)/2}}$o.id="scatter";$o.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};$o.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class to{constructor(t){this.options=t||{}}init(t){}formats(){return Ht()}parse(t,e){return Ht()}format(t,e){return Ht()}add(t,e,i){return Ht()}diff(t,e,i){return Ht()}startOf(t,e,i){return Ht()}endOf(t,e){return Ht()}}to.override=function(n){Object.assign(to.prototype,n)};var el={_date:to};function um(n,t,e,i){const{controller:r,data:o,_sorted:s}=n,a=r._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const c=a._reversePixels?Gp:Vt;if(i){if(r._sharedOptions){const l=o[0],u=typeof l.getRange=="function"&&l.getRange(t);if(u){const f=c(o,t,e-u),h=c(o,t,e+u);return{lo:f.lo,hi:h.hi}}}}else return c(o,t,e)}return{lo:0,hi:o.length-1}}function Re(n,t,e,i,r){const o=n.getSortedVisibleDatasetMetas(),s=e[t];for(let a=0,c=o.length;a<c;++a){const{index:l,data:u}=o[a],{lo:f,hi:h}=um(o[a],t,s,r);for(let d=f;d<=h;++d){const p=u[d];p.skip||i(p,l,d)}}}function fm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const o=t?Math.abs(i.x-r.x):0,s=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function Ii(n,t,e,i,r){const o=[];return!r&&!n.isPointInArea(t)||Re(n,e,t,function(a,c,l){!r&&!xe(a,n.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:c,index:l})},!0),o}function hm(n,t,e,i){let r=[];function o(s,a,c){const{startAngle:l,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:f}=Mc(s,{x:t.x,y:t.y});ve(f,l,u)&&r.push({element:s,datasetIndex:a,index:c})}return Re(n,e,t,o),r}function dm(n,t,e,i,r,o){let s=[];const a=fm(e);let c=Number.POSITIVE_INFINITY;function l(u,f,h){const d=u.inRange(t.x,t.y,r);if(i&&!d)return;const p=u.getCenterPoint(r);if(!(!!o||n.isPointInArea(p))&&!d)return;const y=a(t,p);y<c?(s=[{element:u,datasetIndex:f,index:h}],c=y):y===c&&s.push({element:u,datasetIndex:f,index:h})}return Re(n,e,t,l),s}function Li(n,t,e,i,r,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?hm(n,t,e,r):dm(n,t,e,i,r,o)}function Aa(n,t,e,i,r){const o=[],s=e==="x"?"inXRange":"inYRange";let a=!1;return Re(n,e,t,(c,l,u)=>{c[s](t[e],r)&&(o.push({element:c,datasetIndex:l,index:u}),a=a||c.inRange(t.x,t.y,r))}),i&&!a?[]:o}var pm={evaluateInteractionItems:Re,modes:{index(n,t,e,i){const r=Wt(t,n),o=e.axis||"x",s=e.includeInvisible||!1,a=e.intersect?Ii(n,r,o,i,s):Li(n,r,o,!1,i,s),c=[];return a.length?(n.getSortedVisibleDatasetMetas().forEach(l=>{const u=a[0].index,f=l.data[u];f&&!f.skip&&c.push({element:f,datasetIndex:l.index,index:u})}),c):[]},dataset(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;let a=e.intersect?Ii(n,r,o,i,s):Li(n,r,o,!1,i,s);if(a.length>0){const c=a[0].datasetIndex,l=n.getDatasetMeta(c).data;a=[];for(let u=0;u<l.length;++u)a.push({element:l[u],datasetIndex:c,index:u})}return a},point(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;return Ii(n,r,o,i,s)},nearest(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;return Li(n,r,o,e.intersect,i,s)},x(n,t,e,i){const r=Wt(t,n);return Aa(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=Wt(t,n);return Aa(n,r,"y",e.intersect,i)}}};const nl=["left","top","right","bottom"];function ce(n,t){return n.filter(e=>e.pos===t)}function Ia(n,t){return n.filter(e=>nl.indexOf(e.pos)===-1&&e.box.axis===t)}function le(n,t){return n.sort((e,i)=>{const r=t?i:e,o=t?e:i;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function gm(n){const t=[];let e,i,r,o,s,a;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:o,options:{stack:s,stackWeight:a=1}}=r,t.push({index:e,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return t}function ym(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:o}=e;if(!i||!nl.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function mm(n,t){const e=ym(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let o,s,a;for(o=0,s=n.length;o<s;++o){a=n[o];const{fullSize:c}=a.box,l=e[a.stack],u=l&&a.stackWeight/l.weight;a.horizontal?(a.width=u?u*i:c&&t.availableWidth,a.height=r):(a.width=i,a.height=u?u*r:c&&t.availableHeight)}return e}function bm(n){const t=gm(n),e=le(t.filter(l=>l.box.fullSize),!0),i=le(ce(t,"left"),!0),r=le(ce(t,"right")),o=le(ce(t,"top"),!0),s=le(ce(t,"bottom")),a=Ia(t,"x"),c=Ia(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:r.concat(c).concat(s).concat(a),chartArea:ce(t,"chartArea"),vertical:i.concat(r).concat(c),horizontal:o.concat(s).concat(a)}}function La(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function il(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function _m(n,t,e,i){const{pos:r,box:o}=e,s=n.maxPadding;if(!A(r)){e.size&&(n[r]-=e.size);const f=i[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,n[r]+=e.size}o.getPadding&&il(s,o.getPadding());const a=Math.max(0,t.outerWidth-La(s,n,"left","right")),c=Math.max(0,t.outerHeight-La(s,n,"top","bottom")),l=a!==n.w,u=c!==n.h;return n.w=a,n.h=c,e.horizontal?{same:l,other:u}:{same:u,other:l}}function vm(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function xm(n,t){const e=t.maxPadding;function i(r){const o={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{o[s]=Math.max(t[s],e[s])}),o}return i(n?["left","right"]:["top","bottom"])}function he(n,t,e,i){const r=[];let o,s,a,c,l,u;for(o=0,s=n.length,l=0;o<s;++o){a=n[o],c=a.box,c.update(a.width||t.w,a.height||t.h,xm(a.horizontal,t));const{same:f,other:h}=_m(t,e,a,i);l|=f&&r.length,u=u||h,c.fullSize||r.push(a)}return l&&he(r,t,e,i)||u}function ze(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function Fa(n,t,e,i){const r=e.padding;let{x:o,y:s}=t;for(const a of n){const c=a.box,l=i[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/l.weight||1;if(a.horizontal){const f=t.w*u,h=l.size||c.height;ht(l.start)&&(s=l.start),c.fullSize?ze(c,r.left,s,e.outerWidth-r.right-r.left,h):ze(c,t.left+l.placed,s,f,h),l.start=s,l.placed+=f,s=c.bottom}else{const f=t.h*u,h=l.size||c.width;ht(l.start)&&(o=l.start),c.fullSize?ze(c,o,r.top,h,e.outerHeight-r.bottom-r.top):ze(c,o,t.top+l.placed,h,f),l.start=o,l.placed+=f,o=c.right}}t.x=o,t.y=s}$.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ft={addBox(n,t){n.boxes||(n.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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=it(n.options.layout.padding),o=Math.max(t-r.width,0),s=Math.max(e-r.height,0),a=bm(n.boxes),c=a.vertical,l=a.horizontal;F(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=c.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);il(h,it(i));const d=Object.assign({maxPadding:h,w:o,h:s,x:r.left,y:r.top},r),p=mm(c.concat(l),f);he(a.fullSize,d,f,p),he(c,d,f,p),he(l,d,f,p)&&he(c,d,f,p),vm(d),Fa(a.leftAndTop,d,f,p),d.x+=d.w,d.y+=d.h,Fa(a.rightAndBottom,d,f,p),n.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},F(a.chartArea,g=>{const y=g.box;Object.assign(y,n.chartArea),y.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class rl{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class wm extends rl{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Sn="$chartjs",Om={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ba=n=>n===null||n==="";function Pm(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Sn]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ba(r)){const o=ya(n,"width");o!==void 0&&(n.width=o)}if(Ba(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=ya(n,"height");o!==void 0&&(n.height=o)}return n}const ol=ry?{passive:!0}:!1;function Sm(n,t,e){n.addEventListener(t,e,ol)}function Mm(n,t,e){n.canvas.removeEventListener(t,e,ol)}function km(n,t){const e=Om[n.type]||n.type,{x:i,y:r}=Wt(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function fi(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Rm(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fi(a.addedNodes,i),s=s&&!fi(a.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Tm(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fi(a.removedNodes,i),s=s&&!fi(a.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const Oe=new Map;let za=0;function sl(){const n=window.devicePixelRatio;n!==za&&(za=n,Oe.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Dm(n,t){Oe.size||window.addEventListener("resize",sl),Oe.set(n,t)}function Cm(n){Oe.delete(n),Oe.size||window.removeEventListener("resize",sl)}function $m(n,t,e){const i=n.canvas,r=i&&ko(i);if(!r)return;const o=Dc((a,c)=>{const l=r.clientWidth;e(a,c),l<r.clientWidth&&e()},window),s=new ResizeObserver(a=>{const c=a[0],l=c.contentRect.width,u=c.contentRect.height;l===0&&u===0||o(l,u)});return s.observe(r),Dm(n,o),s}function Fi(n,t,e){e&&e.disconnect(),t==="resize"&&Cm(n)}function Em(n,t,e){const i=n.canvas,r=Dc(o=>{n.ctx!==null&&e(km(o,n))},n,o=>{const s=o[0];return[s,s.offsetX,s.offsetY]});return Sm(i,t,r),r}class Am extends rl{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Pm(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Sn])return!1;const i=e[Sn].initial;["height","width"].forEach(o=>{const s=i[o];L(s)?e.removeAttribute(o):e.setAttribute(o,s)});const r=i.style||{};return Object.keys(r).forEach(o=>{e.style[o]=r[o]}),e.width=e.width,delete e[Sn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Rm,detach:Tm,resize:$m}[e]||Em;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:Fi,detach:Fi,resize:Fi}[e]||Mm)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return iy(t,e,i,r)}isAttached(t){const e=ko(t);return!!(e&&e.isConnected)}}function Im(n){return!Uc()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?wm:Am}class Lm{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,r){r=r||{};for(const o of t){const s=o.plugin,a=s[i],c=[e,r,o.options];if(N(a,c,s)===!1&&r.cancelable)return!1}return!0}invalidate(){L(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=k(i.options&&i.options.plugins,{}),o=Fm(i);return r===!1&&!e?[]:zm(t,o,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(o,s)=>o.filter(a=>!s.some(c=>a.plugin.id===c.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function Fm(n){const t={},e=[],i=Object.keys(xt.plugins.items);for(let o=0;o<i.length;o++)e.push(xt.getPlugin(i[o]));const r=n.plugins||[];for(let o=0;o<r.length;o++){const s=r[o];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function Bm(n,t){return!t&&n===!1?null:n===!0?{}:n}function zm(n,{plugins:t,localIds:e},i,r){const o=[],s=n.getContext();for(const a of t){const c=a.id,l=Bm(i[c],r);l!==null&&o.push({plugin:a,options:Nm(n.config,{plugin:a,local:e[c]},l,s)})}return o}function Nm(n,{plugin:t,local:e},i,r){const o=n.pluginScopeKeys(t),s=n.getOptionScopes(i,o);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function eo(n,t){const e=$.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Hm(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function Wm(n,t){return n===t?"_index_":"_value_"}function jm(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function no(n,t){return n==="x"||n==="y"?n:t.axis||jm(t.position)||n.charAt(0).toLowerCase()}function Vm(n,t){const e=qt[n.type]||{scales:{}},i=t.scales||{},r=eo(n.type,t),o=Object.create(null),s=Object.create(null);return Object.keys(i).forEach(a=>{const c=i[a];if(!A(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=no(a,c),u=Wm(l,r),f=e.scales||{};o[l]=o[l]||a,s[a]=pe(Object.create(null),[{axis:l},c,f[l],f[u]])}),n.data.datasets.forEach(a=>{const c=a.type||n.type,l=a.indexAxis||eo(c,t),f=(qt[c]||{}).scales||{};Object.keys(f).forEach(h=>{const d=Hm(h,l),p=a[d+"AxisID"]||o[d]||d;s[p]=s[p]||Object.create(null),pe(s[p],[{axis:d},i[p],f[h]])})}),Object.keys(s).forEach(a=>{const c=s[a];pe(c,[$.scales[c.type],$.scale])}),s}function al(n){const t=n.options||(n.options={});t.plugins=k(t.plugins,{}),t.scales=Vm(n,t)}function cl(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Ym(n){return n=n||{},n.data=cl(n.data),al(n),n}const Na=new Map,ll=new Set;function Ne(n,t){let e=Na.get(n);return e||(e=t(),Na.set(n,e),ll.add(e)),e}const ue=(n,t,e)=>{const i=Ft(t,e);i!==void 0&&n.add(i)};class Um{constructor(t){this._config=Ym(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=cl(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(),al(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ne(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ne(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ne(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Ne(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const c=new Set;e.forEach(u=>{t&&(c.add(t),u.forEach(f=>ue(c,t,f))),u.forEach(f=>ue(c,r,f)),u.forEach(f=>ue(c,qt[o]||{},f)),u.forEach(f=>ue(c,$,f)),u.forEach(f=>ue(c,Zr,f))});const l=Array.from(c);return l.length===0&&l.push(Object.create(null)),ll.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,qt[e]||{},$.datasets[e]||{},{type:e},$,Zr]}resolveNamedOptions(t,e,i,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Ha(this._resolverCache,t,r);let c=s;if(Xm(s,e)){o.$shared=!1,i=Bt(i)?i():i;const l=this.createResolver(t,i,a);c=ie(s,i,l)}for(const l of e)o[l]=c[l];return o}createResolver(t,e,i=[""],r){const{resolver:o}=Ha(this._resolverCache,t,i);return A(e)?ie(o,e,void 0,r):o}}function Ha(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let o=i.get(r);return o||(o={resolver:Po(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,o)),o}const qm=n=>A(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||Bt(n[e]),!1);function Xm(n,t){const{isScriptable:e,isIndexable:i}=Nc(n);for(const r of t){const o=e(r),s=i(r),a=(s||o)&&n[r];if(o&&(Bt(a)||qm(a))||s&&W(a))return!0}return!1}var Km="3.9.1";const Qm=["top","bottom","left","right","chartArea"];function Wa(n,t){return n==="top"||n==="bottom"||Qm.indexOf(n)===-1&&t==="x"}function ja(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Va(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),N(e&&e.onComplete,[n],t)}function Gm(n){const t=n.chart,e=t.options.animation;N(e&&e.onProgress,[n],t)}function ul(n){return Uc()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const hi={},fl=n=>{const t=ul(n);return Object.values(hi).filter(e=>e.canvas===t).pop()};function Zm(n,t,e){const i=Object.keys(n);for(const r of i){const o=+r;if(o>=t){const s=n[r];delete n[r],(e>0||o>t)&&(n[o+e]=s)}}}function Jm(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}let vi=class{constructor(t,e){const i=this.config=new Um(e),r=ul(t),o=fl(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Im(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,s.aspectRatio),c=a&&a.canvas,l=c&&c.height,u=c&&c.width;if(this.id=Bp(),this.ctx=a,this.canvas=c,this.width=u,this.height=l,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 Lm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=tg(f=>this.update(f),s.resizeDelay||0),this._dataChanges=[],hi[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}St.listen(this,"complete",Va),St.listen(this,"progress",Gm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:o}=this;return L(t)?e&&o?o: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ga(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ha(this.canvas,this.ctx),this}stop(){return St.stop(this),this}resize(t,e){St.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,ga(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),N(i.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};F(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((s,a)=>(s[a]=!1,s),{});let o=[];e&&(o=o.concat(Object.keys(e).map(s=>{const a=e[s],c=no(s,a),l=c==="r",u=c==="x";return{options:a,dposition:l?"chartArea":u?"bottom":"left",dtype:l?"radialLinear":u?"category":"linear"}}))),F(o,s=>{const a=s.options,c=a.id,l=no(c,a),u=k(a.type,s.dtype);(a.position===void 0||Wa(a.position,l)!==Wa(s.dposition))&&(a.position=s.dposition),r[c]=!0;let f=null;if(c in i&&i[c].type===u)f=i[c];else{const h=xt.getScale(u);f=new h({id:c,type:u,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),F(r,(s,a)=>{s||delete i[a]}),F(i,s=>{ft.configure(this,s,s.options),ft.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,o)=>r.index-o.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ja("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const o=e[i];let s=this.getDatasetMeta(i);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=a,s.indexAxis=o.indexAxis||eo(a,this.options),s.order=o.order||0,s.index=i,s.label=""+o.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const c=xt.getController(a),{datasetElementType:l,dataElementType:u}=$.datasets[a];Object.assign(c.prototype,{dataElementType:xt.getElement(u),datasetElementType:l&&xt.getElement(l)}),s.controller=new c(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){F(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),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 o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,u=this.data.datasets.length;l<u;l++){const{controller:f}=this.getDatasetMeta(l),h=!r&&o.indexOf(f)===-1;f.buildOrUpdateElements(h),s=Math.max(+f.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||F(o,l=>{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ja("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){F(this.scales,t=>{ft.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ta(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:o}of e){const s=i==="_removeElements"?-o:o;Zm(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),r=i(0);for(let o=1;o<e;o++)if(!ta(r,i(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ft.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],F(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Bt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(St.has(this)?this.attached&&!St.running(this)&&St.start(this):(this.draw(),Va({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 e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,o;for(r=0,o=e.length;r<o;++r){const s=e[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 e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&xo(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),r&&wo(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return xe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const o=pm.modes[e];return typeof o=="function"?o(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(o=>o&&o._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=zt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);ht(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),St.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ha(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete hi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,s)=>{e.addEventListener(this,o,s),t[o]=s},r=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};F(this.options.events,o=>i(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(c,l)=>{e.addEventListener(this,c,l),t[c]=l},r=(c,l)=>{t[c]&&(e.removeEventListener(this,c,l),delete t[c])},o=(c,l)=>{this.canvas&&this.resize(c,l)};let s;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():s()}unbindEvents(){F(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},F(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let o,s,a,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,c=t.length;a<c;++a){s=t[a];const l=s&&this.getDatasetMeta(s.datasetIndex).controller;l&&l[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!oi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const r=this.options.hover,o=(c,l)=>c.filter(u=>!l.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),s=o(e,t),a=i?t:o(t,e);s.length&&this.updateHoverStyle(s,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,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 o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,i,s),c=Vp(t),l=Jm(t,this._lastEvent,i,c);i&&(this._lastEvent=null,N(o.onHover,[t,a,this],this),c&&N(o.onClick,[t,a,this],this));const u=!oi(a,r);return(u||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=l,u}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}};const Ya=()=>F(vi.instances,n=>n._plugins.invalidate()),$t=!0;Object.defineProperties(vi,{defaults:{enumerable:$t,value:$},instances:{enumerable:$t,value:hi},overrides:{enumerable:$t,value:qt},registry:{enumerable:$t,value:xt},version:{enumerable:$t,value:Km},getChart:{enumerable:$t,value:fl},register:{enumerable:$t,value:(...n)=>{xt.add(...n),Ya()}},unregister:{enumerable:$t,value:(...n)=>{xt.remove(...n),Ya()}}});function hl(n,t,e){const{startAngle:i,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:c}=t;let l=r/a;n.beginPath(),n.arc(o,s,a,i-l,e+l),c>r?(l=r/c,n.arc(o,s,c,e+l,i-l,!0)):n.arc(o,s,r,e+q,i-q),n.closePath(),n.clip()}function tb(n){return Oo(n,["outerStart","outerEnd","innerStart","innerEnd"])}function eb(n,t,e,i){const r=tb(n.options.borderRadius),o=(e-t)/2,s=Math.min(o,i*t/2),a=c=>{const l=(e-Math.min(o,c))*i/2;return nt(c,0,Math.min(o,l))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:nt(r.innerStart,0,s),innerEnd:nt(r.innerEnd,0,s)}}function te(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function io(n,t,e,i,r,o){const{x:s,y:a,startAngle:c,pixelMargin:l,innerRadius:u}=t,f=Math.max(t.outerRadius+i+e-l,0),h=u>0?u+i+e+l:0;let d=0;const p=r-c;if(i){const M=u>0?u-i:0,H=f>0?f-i:0,V=(M+H)/2,Ot=V!==0?p*V/(V+i):p;d=(p-Ot)/2}const g=Math.max(.001,p*f-e/Y)/f,y=(p-g)/2,m=c+y+d,b=r-y-d,{outerStart:v,outerEnd:x,innerStart:_,innerEnd:w}=eb(t,h,f,b-m),O=f-v,S=f-x,P=m+v/O,D=b-x/S,C=h+_,R=h+w,j=m+_/C,J=b-w/R;if(n.beginPath(),o){if(n.arc(s,a,f,P,D),x>0){const V=te(S,D,s,a);n.arc(V.x,V.y,x,D,b+q)}const M=te(R,b,s,a);if(n.lineTo(M.x,M.y),w>0){const V=te(R,J,s,a);n.arc(V.x,V.y,w,b+q,J+Math.PI)}if(n.arc(s,a,h,b-w/h,m+_/h,!0),_>0){const V=te(C,j,s,a);n.arc(V.x,V.y,_,j+Math.PI,m-q)}const H=te(O,m,s,a);if(n.lineTo(H.x,H.y),v>0){const V=te(O,P,s,a);n.arc(V.x,V.y,v,m-q,P)}}else{n.moveTo(s,a);const M=Math.cos(P)*f+s,H=Math.sin(P)*f+a;n.lineTo(M,H);const V=Math.cos(D)*f+s,Ot=Math.sin(D)*f+a;n.lineTo(V,Ot)}n.closePath()}function nb(n,t,e,i,r){const{fullCircles:o,startAngle:s,circumference:a}=t;let c=t.endAngle;if(o){io(n,t,e,i,s+B,r);for(let l=0;l<o;++l)n.fill();isNaN(a)||(c=s+a%B,a%B===0&&(c+=B))}return io(n,t,e,i,c,r),n.fill(),c}function ib(n,t,e){const{x:i,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=t,c=Math.max(t.outerRadius-s,0),l=t.innerRadius+s;let u;for(e&&hl(n,t,o+B),n.beginPath(),n.arc(i,r,l,o+B,o,!0),u=0;u<a;++u)n.stroke();for(n.beginPath(),n.arc(i,r,c,o,o+B),u=0;u<a;++u)n.stroke()}function rb(n,t,e,i,r,o){const{options:s}=t,{borderWidth:a,borderJoinStyle:c}=s,l=s.borderAlign==="inner";a&&(l?(n.lineWidth=a*2,n.lineJoin=c||"round"):(n.lineWidth=a,n.lineJoin=c||"bevel"),t.fullCircles&&ib(n,t,l),l&&hl(n,t,r),io(n,t,e,i,r,o),n.stroke())}class Eo extends yt{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.getProps(["x","y"],i),{angle:o,distance:s}=Mc(r,{x:t,y:e}),{startAngle:a,endAngle:c,innerRadius:l,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=this.options.spacing/2,p=k(f,c-a)>=B||ve(o,a,c),g=Et(s,l+h,u+h);return p&&g}getCenterPoint(t){const{x:e,y:i,startAngle:r,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:c,spacing:l}=this.options,u=(r+o)/2,f=(s+a+l+c)/2;return{x:e+Math.cos(u)*f,y:i+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,r=(e.offset||0)/2,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>B?Math.floor(i/B):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(r){a=r/2;const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*a,Math.sin(l)*a),this.circumference>=Y&&(a=r)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const c=nb(t,this,a,o,s);rb(t,this,a,o,c,s),t.restore()}}Eo.id="arc";Eo.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Eo.defaultRoutes={backgroundColor:"backgroundColor"};function dl(n,t,e=t){n.lineCap=k(e.borderCapStyle,t.borderCapStyle),n.setLineDash(k(e.borderDash,t.borderDash)),n.lineDashOffset=k(e.borderDashOffset,t.borderDashOffset),n.lineJoin=k(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=k(e.borderWidth,t.borderWidth),n.strokeStyle=k(e.borderColor,t.borderColor)}function ob(n,t,e){n.lineTo(e.x,e.y)}function sb(n){return n.stepped?kg:n.tension||n.cubicInterpolationMode==="monotone"?Rg:ob}function pl(n,t,e={}){const i=n.length,{start:r=0,end:o=i-1}=e,{start:s,end:a}=t,c=Math.max(r,s),l=Math.min(o,a),u=r<s&&o<s||r>a&&o>a;return{count:i,start:c,loop:t.loop,ilen:l<c&&!u?i+l-c:l-c}}function ab(n,t,e,i){const{points:r,options:o}=t,{count:s,start:a,loop:c,ilen:l}=pl(r,e,i),u=sb(o);let{move:f=!0,reverse:h}=i||{},d,p,g;for(d=0;d<=l;++d)p=r[(a+(h?l-d:d))%s],!p.skip&&(f?(n.moveTo(p.x,p.y),f=!1):u(n,g,p,h,o.stepped),g=p);return c&&(p=r[(a+(h?l:0))%s],u(n,g,p,h,o.stepped)),!!c}function cb(n,t,e,i){const r=t.points,{count:o,start:s,ilen:a}=pl(r,e,i),{move:c=!0,reverse:l}=i||{};let u=0,f=0,h,d,p,g,y,m;const b=x=>(s+(l?a-x:x))%o,v=()=>{g!==y&&(n.lineTo(u,y),n.lineTo(u,g),n.lineTo(u,m))};for(c&&(d=r[b(0)],n.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=r[b(h)],d.skip)continue;const x=d.x,_=d.y,w=x|0;w===p?(_<g?g=_:_>y&&(y=_),u=(f*u+x)/++f):(v(),n.lineTo(x,_),p=w,f=0,g=y=_),m=_}v()}function ro(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?cb:ab}function lb(n){return n.stepped?oy:n.tension||n.cubicInterpolationMode==="monotone"?sy:jt}function ub(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),dl(n,t.options),n.stroke(r)}function fb(n,t,e,i){const{segments:r,options:o}=t,s=ro(t);for(const a of r)dl(n,o,a.style),n.beginPath(),s(n,t,a,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const hb=typeof Path2D=="function";function db(n,t,e,i){hb&&!t.options.segment?ub(n,t,e,i):fb(n,t,e,i)}class xi extends yt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Gg(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gy(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],o=this.points,s=hy(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],c=lb(i);let l,u;for(l=0,u=s.length;l<u;++l){const{start:f,end:h}=s[l],d=o[f],p=o[h];if(d===p){a.push(d);continue}const g=Math.abs((r-d[e])/(p[e]-d[e])),y=c(d,p,g,i.stepped);y[e]=t[e],a.push(y)}return a.length===1?a[0]:a}pathSegment(t,e,i){return ro(this)(t,this,e,i)}path(t,e,i){const r=this.segments,o=ro(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const a of r)s&=o(t,this,a,{start:e,end:e+i-1});return!!s}draw(t,e,i,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),db(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}xi.id="line";xi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};xi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};xi.descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"};function Ua(n,t,e,i){const r=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<r.radius+r.hitRadius}class Ao extends yt{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,e){return Ua(this,t,"x",e)}inYRange(t,e){return Ua(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){const i=this.options;this.skip||i.radius<.1||!xe(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Jr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}Ao.id="point";Ao.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};Ao.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function gl(n,t){const{x:e,y:i,base:r,width:o,height:s}=n.getProps(["x","y","base","width","height"],t);let a,c,l,u,f;return n.horizontal?(f=s/2,a=Math.min(e,r),c=Math.max(e,r),l=i-f,u=i+f):(f=o/2,a=e-f,c=e+f,l=Math.min(i,r),u=Math.max(i,r)),{left:a,top:l,right:c,bottom:u}}function It(n,t,e,i){return n?0:nt(t,e,i)}function pb(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,o=zc(i);return{t:It(r.top,o.top,0,e),r:It(r.right,o.right,0,t),b:It(r.bottom,o.bottom,0,e),l:It(r.left,o.left,0,t)}}function gb(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,o=Yt(r),s=Math.min(t,e),a=n.borderSkipped,c=i||A(r);return{topLeft:It(!c||a.top||a.left,o.topLeft,0,s),topRight:It(!c||a.top||a.right,o.topRight,0,s),bottomLeft:It(!c||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:It(!c||a.bottom||a.right,o.bottomRight,0,s)}}function yb(n){const t=gl(n),e=t.right-t.left,i=t.bottom-t.top,r=pb(n,e/2,i/2),o=gb(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Bi(n,t,e,i){const r=t===null,o=e===null,a=n&&!(r&&o)&&gl(n,i);return a&&(r||Et(t,a.left,a.right))&&(o||Et(e,a.top,a.bottom))}function mb(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function bb(n,t){n.rect(t.x,t.y,t.w,t.h)}function zi(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,s=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+o,h:n.h+s,radius:n.radius}}class Io extends yt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:s}=yb(this),a=mb(s.radius)?we:bb;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,zi(s,e,o)),t.clip(),a(t,zi(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,zi(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Bi(this,t,e,i)}inXRange(t,e){return Bi(this,t,null,e)}inYRange(t,e){return Bi(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+r)/2:e,y:o?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Io.id="bar";Io.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};Io.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const qa=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},_b=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Xa extends yt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=N(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=G(i.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=qa(i,o);let l,u;e.font=r.string,this.isHorizontal()?(l=this.maxWidth,u=this._fitRows(s,o,a,c)+10):(u=this.maxHeight,l=this._fitCols(s,o,a,c)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.lineWidths=[0],u=r+a;let f=t;o.textAlign="left",o.textBaseline="middle";let h=-1,d=-u;return this.legendItems.forEach((p,g)=>{const y=i+e/2+o.measureText(p.text).width;(g===0||l[l.length-1]+y+2*a>s)&&(f+=u,l[l.length-(g>0?0:1)]=0,d+=u,h++),c[g]={left:0,top:d,row:h,width:y,height:r},l[l.length-1]+=y+a}),f}_fitCols(t,e,i,r){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.columnSizes=[],u=s-t;let f=a,h=0,d=0,p=0,g=0;return this.legendItems.forEach((y,m)=>{const b=i+e/2+o.measureText(y.text).width;m>0&&d+r+2*a>u&&(f+=h+a,l.push({width:h,height:d}),p+=h+a,g++,h=d=0),c[m]={left:p,top:d,col:g,width:b,height:r},h=Math.max(h,b),d+=r+a}),f+=h,l.push({width:h,height:d}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:o}}=this,s=ee(o,this.left,this.width);if(this.isHorizontal()){let a=0,c=et(i,this.left+r,this.right-this.lineWidths[a]);for(const l of e)a!==l.row&&(a=l.row,c=et(i,this.left+r,this.right-this.lineWidths[a])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(c),l.width),c+=l.width+r}else{let a=0,c=et(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(const l of e)l.col!==a&&(a=l.col,c=et(i,this.top+t+r,this.bottom-this.columnSizes[a].height)),l.top=c,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),c+=l.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;xo(t,this),this._draw(),wo(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:o,labels:s}=t,a=$.color,c=ee(t.rtl,this.left,this.width),l=G(s.font),{color:u,padding:f}=s,h=l.size,d=h/2;let p;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:g,boxHeight:y,itemHeight:m}=qa(s,h),b=function(O,S,P){if(isNaN(g)||g<=0||isNaN(y)||y<0)return;r.save();const D=k(P.lineWidth,1);if(r.fillStyle=k(P.fillStyle,a),r.lineCap=k(P.lineCap,"butt"),r.lineDashOffset=k(P.lineDashOffset,0),r.lineJoin=k(P.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=k(P.strokeStyle,a),r.setLineDash(k(P.lineDash,[])),s.usePointStyle){const C={radius:y*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:D},R=c.xPlus(O,g/2),j=S+d;Bc(r,C,R,j,s.pointStyleWidth&&g)}else{const C=S+Math.max((h-y)/2,0),R=c.leftForLtr(O,g),j=Yt(P.borderRadius);r.beginPath(),Object.values(j).some(J=>J!==0)?we(r,{x:R,y:C,w:g,h:y,radius:j}):r.rect(R,C,g,y),r.fill(),D!==0&&r.stroke()}r.restore()},v=function(O,S,P){Xt(r,P.text,O,S+m/2,l,{strikethrough:P.hidden,textAlign:c.textAlign(P.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();x?p={x:et(o,this.left+f,this.right-i[0]),y:this.top+f+_,line:0}:p={x:this.left+f,y:et(o,this.top+_+f,this.bottom-e[0].height),line:0},qc(this.ctx,t.textDirection);const w=m+f;this.legendItems.forEach((O,S)=>{r.strokeStyle=O.fontColor||u,r.fillStyle=O.fontColor||u;const P=r.measureText(O.text).width,D=c.textAlign(O.textAlign||(O.textAlign=s.textAlign)),C=g+d+P;let R=p.x,j=p.y;c.setWidth(this.width),x?S>0&&R+C+f>this.right&&(j=p.y+=w,p.line++,R=p.x=et(o,this.left+f,this.right-i[p.line])):S>0&&j+w>this.bottom&&(R=p.x=R+e[p.line].width+f,p.line++,j=p.y=et(o,this.top+_+f,this.bottom-e[p.line].height));const J=c.x(R);b(J,j,O),R=eg(D,R+g+d,x?R+C:this.right,t.rtl),v(c.x(R),j,O),x?p.x+=C+f:p.y+=w}),Xc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=G(e.font),r=it(e.padding);if(!e.display)return;const o=ee(t.rtl,this.left,this.width),s=this.ctx,a=e.position,c=i.size/2,l=r.top+c;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+l,f=et(t.align,f,this.right-h);else{const p=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=l+et(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const d=et(a,f,f+h);s.textAlign=o.textAlign(mo(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Xt(s,e.text,d,u,i)}_computeTitleHeight(){const t=this.options.title,e=G(t.font),i=it(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,o;if(Et(t,this.left,this.right)&&Et(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],Et(t,r.left,r.left+r.width)&&Et(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!vb(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,o=_b(r,i);r&&!o&&N(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&N(e.onHover,[t,i,this],this)}else i&&N(e.onClick,[t,i,this],this)}}function vb(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var r_={id:"legend",_element:Xa,start(n,t,e){const i=n.legend=new Xa({ctx:n.ctx,options:e,chart:n});ft.configure(n,i,e),ft.addBox(n,i)},stop(n){ft.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;ft.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:o}}=n.legend.options;return n._getSortedDatasetMetas().map(s=>{const a=s.controller.getStyle(e?0:void 0),c=it(a.borderWidth);return{text:t[s.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:a.borderColor,pointStyle:i||a.pointStyle,rotation:a.rotation,textAlign:r||a.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class yl extends yt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=W(i.text)?i.text.length:1;this._padding=it(i.padding);const o=r*G(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:o,options:s}=this,a=s.align;let c=0,l,u,f;return this.isHorizontal()?(u=et(a,i,o),f=e+t,l=o-i):(s.position==="left"?(u=i+t,f=et(a,r,e),c=Y*-.5):(u=o-t,f=et(a,e,r),c=Y*.5),l=r-e),{titleX:u,titleY:f,maxWidth:l,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=G(e.font),o=i.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:c,rotation:l}=this._drawArgs(o);Xt(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:l,textAlign:mo(e.align),textBaseline:"middle",translation:[s,a]})}}function xb(n,t){const e=new yl({ctx:n.ctx,options:t,chart:n});ft.configure(n,e,t),ft.addBox(n,e),n.titleBlock=e}var o_={id:"title",_element:yl,start(n,t,e){xb(n,e)},stop(n){const t=n.titleBlock;ft.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;ft.configure(n,i,e),i.options=e},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 be={average(n){if(!n.length)return!1;let t,e,i=0,r=0,o=0;for(t=0,e=n.length;t<e;++t){const s=n[t].element;if(s&&s.hasValue()){const a=s.tooltipPosition();i+=a.x,r+=a.y,++o}}return{x:i/o,y:r/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=n.length;o<s;++o){const c=n[o].element;if(c&&c.hasValue()){const l=c.getCenterPoint(),u=Qr(t,l);u<r&&(r=u,a=c)}}if(a){const c=a.tooltipPosition();e=c.x,i=c.y}return{x:e,y:i}}};function mt(n,t){return t&&(W(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Mt(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
17
|
+
*/class by{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,r){const o=e.listeners[r],s=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Tc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const o=i.items;let s=o.length-1,a=!1,c;for(;s>=0;--s)c=o[s],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(r.draw(),this._notify(r,i,t,"progress")),o.length||(i.running=!1,this._notify(r,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var St=new by;const xa="transparent",_y={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=fa(n||xa),r=i.valid&&fa(t||xa);return r&&r.valid?r.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class vy{constructor(t,e,i,r){const o=e[i];r=Ie([t.to,r,o,t.from]);const s=Ie([t.from,o,r]);this._active=!0,this._fn=t.fn||_y[t.type||typeof s],this._easing=ye[t.easing]||ye.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=r,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const r=this._target[this._prop],o=i-this._start,s=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Ie([t.to,e,r,t.from]),this._from=Ie([t.from,r,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,r=this._prop,o=this._from,s=this._loop,a=this._to;let c;if(this._active=o!==a&&(s||e<i),!this._active){this._target[r]=a,this._notify(!0);return}if(e<0){this._target[r]=o;return}c=e/i%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[r]=this._fn(o,a,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][e]()}}const xy=["x","y","borderWidth","radius","tension"],wy=["color","borderColor","backgroundColor"];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});const Oy=Object.keys(E.animation);E.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});E.set("animations",{colors:{type:"color",properties:wy},numbers:{type:"number",properties:xy}});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:n=>n|0}}}});class Qc{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const r=t[i];if(!A(r))return;const o={};for(const s of Oy)o[s]=r[s];(W(r.properties)&&r.properties||[i]).forEach(s=>{(s===i||!e.has(s))&&e.set(s,o)})})}_animateOptions(t,e){const i=e.options,r=Sy(t,i);if(!r)return[];const o=this._createAnimations(r,i);return i.$shared&&Py(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,r=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let c;for(c=s.length-1;c>=0;--c){const l=s[c];if(l.charAt(0)==="$")continue;if(l==="options"){r.push(...this._animateOptions(t,e));continue}const u=e[l];let f=o[l];const h=i.get(l);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){t[l]=u;continue}o[l]=f=new vy(h,t,l,u),r.push(f)}return r}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return St.add(this._chart,i),!0}}function Py(n,t){const e=[],i=Object.keys(t);for(let r=0;r<i.length;r++){const o=n[i[r]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Sy(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function wa(n,t){const e=n&&n.options||{},i=e.reverse,r=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:r,end:i?r:o}}function My(n,t,e){if(e===!1)return!1;const i=wa(n,e),r=wa(t,e);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function ky(n){let t,e,i,r;return A(n)?(t=n.top,e=n.right,i=n.bottom,r=n.left):t=e=i=r=n,{top:t,right:e,bottom:i,left:r,disabled:n===!1}}function Gc(n,t){const e=[],i=n._getSortedDatasetMetas(t);let r,o;for(r=0,o=i.length;r<o;++r)e.push(i[r].index);return e}function Oa(n,t,e,i={}){const r=n.keys,o=i.mode==="single";let s,a,c,l;if(t!==null){for(s=0,a=r.length;s<a;++s){if(c=+r[s],c===e){if(i.all)continue;break}l=n.values[c],tt(l)&&(o||t===0||wt(t)===wt(l))&&(t+=l)}return t}}function Ry(n){const t=Object.keys(n),e=new Array(t.length);let i,r,o;for(i=0,r=t.length;i<r;++i)o=t[i],e[i]={x:o,y:n[o]};return e}function Pa(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Ty(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Dy(n){const{min:t,max:e,minDefined:i,maxDefined:r}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:r?e:Number.POSITIVE_INFINITY}}function Cy(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Sa(n,t,e,i){for(const r of t.getMatchingVisibleMetas(i).reverse()){const o=n[r.index];if(e&&o>0||!e&&o<0)return r.index}return null}function Ma(n,t){const{chart:e,_cachedMeta:i}=n,r=e._stacks||(e._stacks={}),{iScale:o,vScale:s,index:a}=i,c=o.axis,l=s.axis,u=Ty(o,s,i),f=t.length;let h;for(let d=0;d<f;++d){const p=t[d],{[c]:g,[l]:y}=p,m=p._stacks||(p._stacks={});h=m[l]=Cy(r,u,g),h[a]=y,h._top=Sa(h,s,!0,i.type),h._bottom=Sa(h,s,!1,i.type)}}function Ei(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function Ey(n,t){return zt(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function $y(n,t,e){return zt(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function se(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const r of t){const o=r._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e]}}}const $i=n=>n==="reset"||n==="none",ka=(n,t)=>t?n:Object.assign({},n),Ay=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Gc(e,!0),values:null};class gt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pa(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&se(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),r=(f,h,d,p)=>f==="x"?h:f==="r"?p:d,o=e.xAxisID=k(i.xAxisID,Ei(t,"x")),s=e.yAxisID=k(i.yAxisID,Ei(t,"y")),a=e.rAxisID=k(i.rAxisID,Ei(t,"r")),c=e.indexAxis,l=e.iAxisID=r(c,o,s,a),u=e.vAxisID=r(c,s,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ra(this._data,this),t._stacked&&se(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(A(e))this._data=Ry(e);else if(i!==e){if(i){ra(i,this);const r=this._cachedMeta;se(r),r._parsed=[]}e&&Object.isExtensible(e)&&Jp(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const o=e._stacked;e._stacked=Pa(e.vScale,e),e.stack!==i.stack&&(r=!0,se(e),e.stack=i.stack),this._resyncElements(t),(r||o!==e._stacked)&&Ma(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:r}=this,{iScale:o,_stacked:s}=i,a=o.axis;let c=t===0&&e===r.length?!0:i._sorted,l=t>0&&i._parsed[t-1],u,f,h;if(this._parsing===!1)i._parsed=r,i._sorted=!0,h=r;else{W(r[t])?h=this.parseArrayData(i,r,t,e):A(r[t])?h=this.parseObjectData(i,r,t,e):h=this.parsePrimitiveData(i,r,t,e);const d=()=>f[a]===null||l&&f[a]<l[a];for(u=0;u<e;++u)i._parsed[u+t]=f=h[u],c&&(d()&&(c=!1),l=f);i._sorted=c}s&&Ma(this,h)}parsePrimitiveData(t,e,i,r){const{iScale:o,vScale:s}=t,a=o.axis,c=s.axis,l=o.getLabels(),u=o===s,f=new Array(r);let h,d,p;for(h=0,d=r;h<d;++h)p=h+i,f[h]={[a]:u||o.parse(l[p],p),[c]:s.parse(e[p],p)};return f}parseArrayData(t,e,i,r){const{xScale:o,yScale:s}=t,a=new Array(r);let c,l,u,f;for(c=0,l=r;c<l;++c)u=c+i,f=e[u],a[c]={x:o.parse(f[0],u),y:s.parse(f[1],u)};return a}parseObjectData(t,e,i,r){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=new Array(r);let u,f,h,d;for(u=0,f=r;u<f;++u)h=u+i,d=e[h],l[u]={x:o.parse(Ft(d,a),h),y:s.parse(Ft(d,c),h)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const r=this.chart,o=this._cachedMeta,s=e[t.axis],a={keys:Gc(r,!0),values:e._stacks[t.axis]};return Oa(a,s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,r){const o=i[e.axis];let s=o===null?NaN:o;const a=r&&i._stacks[e.axis];r&&a&&(r.values=a,s=Oa(r,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,r=i._parsed,o=i._sorted&&t===i.iScale,s=r.length,a=this._getOtherScale(t),c=Ay(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Dy(a);let h,d;function p(){d=r[h];const g=d[a.axis];return!tt(d[t.axis])||u>g||f<g}for(h=0;h<s&&!(!p()&&(this.updateRangeFromParsed(l,t,d,c),o));++h);if(o){for(h=s-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(l,t,d,c);break}}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let r,o,s;for(r=0,o=e.length;r<o;++r)s=e[r][t.axis],tt(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,r=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:r?""+r.getLabelForValue(o[r.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=ky(k(this.options.clip,My(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,r=i.data||[],o=e.chartArea,s=[],a=this._drawStart||0,c=this._drawCount||r.length-a,l=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,c),u=a;u<a+c;++u){const f=r[u];f.hidden||(f.active&&l?s.push(f):f.draw(t,o))}for(u=0;u<s.length;++u)s[u].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const r=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=$y(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=r.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Ey(this.chart.getContext(),this.index)),o.dataset=r,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const r=e==="active",o=this._cachedDataOpts,s=t+"-"+e,a=o[s],c=this.enableOptionSharing&&ht(i);if(a)return ka(a,c);const l=this.chart.config,u=l.datasetElementScopeKeys(this._type,t),f=r?[`${t}Hover`,"hover",t,""]:[t,""],h=l.getOptionScopes(this.getDataset(),u),d=Object.keys(E.elements[t]),p=()=>this.getContext(i,r),g=l.resolveNamedOptions(h,d,p,f);return g.$shared&&(g.$shared=c,o[s]=Object.freeze(ka(g,c))),g}_resolveAnimations(t,e,i){const r=this.chart,o=this._cachedDataOpts,s=`animation-${e}`,a=o[s];if(a)return a;let c;if(r.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,e),h=u.getOptionScopes(this.getDataset(),f);c=u.createResolver(h,this.getContext(t,i,e))}const l=new Qc(r,c&&c.animations);return c&&c._cacheable&&(o[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||$i(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),r=this._sharedOptions,o=this.getSharedOptions(i),s=this.includeOptions(e,o)||o!==r;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:s}}updateElement(t,e,i,r){$i(r)?Object.assign(t,i):this._resolveAnimations(e,r).update(t,i)}updateSharedOptions(t,e,i){t&&!$i(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,r){t.active=r;const o=this.getStyle(e,r);this._resolveAnimations(e,i,r).update(t,{options:!r&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,c,l]of this._syncList)this[a](c,l);this._syncList=[];const r=i.length,o=e.length,s=Math.min(o,r);s&&this.parse(0,s),o>r?this._insertElements(r,o-r,t):o<r&&this._removeElements(o,r-o)}_insertElements(t,e,i=!0){const r=this._cachedMeta,o=r.data,s=t+e;let a;const c=l=>{for(l.length+=e,a=l.length-1;a>=s;a--)l[a]=l[a-e]};for(c(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&c(r._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,r){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(t,e);i._stacked&&se(i,r)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,r]=t;this[e](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,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}gt.defaults={};gt.prototype.datasetElementType=null;gt.prototype.dataElementType=null;function Iy(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let r=0,o=e.length;r<o;r++)i=i.concat(e[r].controller.getAllParsedValues(n));n._cache.$bar=Rc(i.sort((r,o)=>r-o))}return n._cache.$bar}function Ly(n){const t=n.iScale,e=Iy(t,n.type);let i=t._length,r,o,s,a;const c=()=>{s===32767||s===-32768||(ht(a)&&(i=Math.min(i,Math.abs(s-a)||i)),a=s)};for(r=0,o=e.length;r<o;++r)s=t.getPixelForValue(e[r]),c();for(a=void 0,r=0,o=t.ticks.length;r<o;++r)s=t.getPixelForTick(r),c();return i}function Fy(n,t,e,i){const r=e.barThickness;let o,s;return L(r)?(o=t.min*e.categoryPercentage,s=e.barPercentage):(o=r*i,s=1),{chunk:o/i,ratio:s,start:t.pixels[n]-o/2}}function By(n,t,e,i){const r=t.pixels,o=r[n];let s=n>0?r[n-1]:null,a=n<r.length-1?r[n+1]:null;const c=e.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const l=o-(o-Math.min(s,a))/2*c;return{chunk:Math.abs(a-s)/2*c/i,ratio:e.barPercentage,start:l}}function zy(n,t,e,i){const r=e.parse(n[0],i),o=e.parse(n[1],i),s=Math.min(r,o),a=Math.max(r,o);let c=s,l=a;Math.abs(s)>Math.abs(a)&&(c=a,l=s),t[e.axis]=l,t._custom={barStart:c,barEnd:l,start:r,end:o,min:s,max:a}}function Zc(n,t,e,i){return W(n)?zy(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Ra(n,t,e,i){const r=n.iScale,o=n.vScale,s=r.getLabels(),a=r===o,c=[];let l,u,f,h;for(l=e,u=e+i;l<u;++l)h=t[l],f={},f[r.axis]=a||r.parse(s[l],l),c.push(Zc(h,f,o,l));return c}function Ai(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Ny(n,t,e){return n!==0?wt(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Hy(n){let t,e,i,r,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(r="end",o="start"):(r="start",o="end"),{start:e,end:i,reverse:t,top:r,bottom:o}}function Wy(n,t,e,i){let r=t.borderSkipped;const o={};if(!r){n.borderSkipped=o;return}if(r===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:c,top:l,bottom:u}=Hy(n);r==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?r=l:(e._bottom||0)===i?r=u:(o[Ta(u,s,a,c)]=!0,r=l)),o[Ta(r,s,a,c)]=!0,n.borderSkipped=o}function Ta(n,t,e,i){return i?(n=jy(n,t,e),n=Da(n,e,t)):n=Da(n,t,e),n}function jy(n,t,e){return n===t?e:n===e?t:n}function Da(n,t,e){return n==="start"?t:n==="end"?e:n}function Vy(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class Ro extends gt{parsePrimitiveData(t,e,i,r){return Ra(t,e,i,r)}parseArrayData(t,e,i,r){return Ra(t,e,i,r)}parseObjectData(t,e,i,r){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,l=o.axis==="x"?a:c,u=s.axis==="x"?a:c,f=[];let h,d,p,g;for(h=i,d=i+r;h<d;++h)g=e[h],p={},p[o.axis]=o.parse(Ft(g,l),h),f.push(Zc(Ft(g,u),p,s,h));return f}updateRangeFromParsed(t,e,i,r){super.updateRangeFromParsed(t,e,i,r);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:r}=e,o=this.getParsed(t),s=o._custom,a=Ai(s)?"["+s.start+", "+s.end+"]":""+r.getLabelForValue(o[r.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,r){const o=r==="reset",{index:s,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),l=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(e,r);for(let d=e;d<e+i;d++){const p=this.getParsed(d),g=o||L(p[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(d),y=this._calculateBarIndexPixels(d,u),m=(p._stacks||{})[a.axis],b={horizontal:l,base:g.base,enableBorderRadius:!m||Ai(p._custom)||s===m._top||s===m._bottom,x:l?g.head:y.center,y:l?y.center:g.head,height:l?y.size:Math.abs(g.size),width:l?Math.abs(g.size):y.size};h&&(b.options=f||this.resolveDataElementOptions(d,t[d].active?"active":r));const v=b.options||t[d].options;Wy(b,v,m,s),Vy(b,v,u.ratio),this.updateElement(t[d],d,b,r)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,r=i.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),o=i.options.stacked,s=[],a=c=>{const l=c.controller.getParsed(e),u=l&&l[c.vScale.axis];if(L(u)||isNaN(u))return!0};for(const c of r)if(!(e!==void 0&&a(c))&&((o===!1||s.indexOf(c.stack)===-1||o===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const r=this._getStacks(t,i),o=e!==void 0?r.indexOf(e):-1;return o===-1?r.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,r=[];let o,s;for(o=0,s=e.data.length;o<s;++o)r.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||Ly(e),pixels:r,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:r,minBarLength:o}}=this,s=r||0,a=this.getParsed(t),c=a._custom,l=Ai(c);let u=a[e.axis],f=0,h=i?this.applyStack(e,a,i):u,d,p;h!==u&&(f=h-u,h=u),l&&(u=c.barStart,h=c.barEnd-c.barStart,u!==0&&wt(u)!==wt(c.barEnd)&&(f=0),f+=u);const g=!L(r)&&!l?r:f;let y=e.getPixelForValue(g);if(this.chart.getDataVisibility(t)?d=e.getPixelForValue(f+h):d=y,p=d-y,Math.abs(p)<o){p=Ny(p,e,s)*o,u===s&&(y-=p/2);const m=e.getPixelForDecimal(0),b=e.getPixelForDecimal(1),v=Math.min(m,b),x=Math.max(m,b);y=Math.max(Math.min(y,x),v),d=y+p}if(y===e.getPixelForValue(s)){const m=wt(p)*e.getLineWidthForValue(s)/2;y+=m,p-=m}return{size:p,base:y,head:d,center:d+p/2}}_calculateBarIndexPixels(t,e){const i=e.scale,r=this.options,o=r.skipNull,s=k(r.maxBarThickness,1/0);let a,c;if(e.grouped){const l=o?this._getStackCount(t):e.stackCount,u=r.barThickness==="flex"?By(t,e,r,l):Fy(t,e,r,l),f=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*f+u.chunk/2,c=Math.min(s,u.chunk*u.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(s,e.min*e.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,r=i.length;let o=0;for(;o<r;++o)this.getParsed(o)[e.axis]!==null&&i[o].draw(this._ctx)}}Ro.id="bar";Ro.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};Ro.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class To extends gt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,r){const o=super.parsePrimitiveData(t,e,i,r);for(let s=0;s<o.length;s++)o[s]._custom=this.resolveDataElementOptions(s+i).radius;return o}parseArrayData(t,e,i,r){const o=super.parseArrayData(t,e,i,r);for(let s=0;s<o.length;s++){const a=e[i+s];o[s]._custom=k(a[2],this.resolveDataElementOptions(s+i).radius)}return o}parseObjectData(t,e,i,r){const o=super.parseObjectData(t,e,i,r);for(let s=0;s<o.length;s++){const a=e[i+s];o[s]._custom=k(a&&a.r&&+a.r,this.resolveDataElementOptions(s+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:r}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=r.getLabelForValue(o.y),c=o._custom;return{label:e.label,value:"("+s+", "+a+(c?", "+c:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:c,includeOptions:l}=this._getSharedOptions(e,r),u=s.axis,f=a.axis;for(let h=e;h<e+i;h++){const d=t[h],p=!o&&this.getParsed(h),g={},y=g[u]=o?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),m=g[f]=o?a.getBasePixel():a.getPixelForValue(p[f]);g.skip=isNaN(y)||isNaN(m),l&&(g.options=c||this.resolveDataElementOptions(h,d.active?"active":r),o&&(g.options.radius=0)),this.updateElement(d,h,g,r)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let r=super.resolveDataElementOptions(t,e);r.$shared&&(r=Object.assign({},r,{$shared:!1}));const o=r.radius;return e!=="active"&&(r.radius=0),r.radius+=k(i&&i._custom,o),r}}To.id="bubble";To.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};To.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Yy(n,t,e){let i=1,r=1,o=0,s=0;if(t<B){const a=n,c=a+t,l=Math.cos(a),u=Math.sin(a),f=Math.cos(c),h=Math.sin(c),d=(v,x,_)=>ve(v,a,c,!0)?1:Math.max(x,x*e,_,_*e),p=(v,x,_)=>ve(v,a,c,!0)?-1:Math.min(x,x*e,_,_*e),g=d(0,l,f),y=d(q,u,h),m=p(Y,l,f),b=p(Y+q,u,h);i=(g-m)/2,r=(y-b)/2,o=-(g+m)/2,s=-(y+b)/2}return{ratioX:i,ratioY:r,offsetX:o,offsetY:s}}class ke extends gt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,r=this._cachedMeta;if(this._parsing===!1)r._parsed=i;else{let o=c=>+i[c];if(A(i[t])){const{key:c="value"}=this._parsing;o=l=>+Ft(i[l],c)}let s,a;for(s=t,a=t+e;s<a;++s)r._parsed[s]=o(s)}}_getRotation(){return pt(this.options.rotation-90)}_getCircumference(){return pt(this.options.circumference)}_getRotationExtents(){let t=B,e=-B;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const r=this.chart.getDatasetMeta(i).controller,o=r._getRotation(),s=r._getCircumference();t=Math.min(t,o),e=Math.max(e,o+s)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,r=this._cachedMeta,o=r.data,s=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-s)/2,0),c=Math.min(zp(this.options.cutout,a),1),l=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:d,offsetX:p,offsetY:g}=Yy(f,u,c),y=(i.width-s)/h,m=(i.height-s)/d,b=Math.max(Math.min(y,m)/2,0),v=Oc(this.options.radius,b),x=Math.max(v*c,0),_=(v-x)/this._getVisibleDatasetWeightTotal();this.offsetX=p*v,this.offsetY=g*v,r.total=this.calculateTotal(),this.outerRadius=v-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*l,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,r=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||r._parsed[t]===null||r.data[t].hidden?0:this.calculateCircumference(r._parsed[t]*o/B)}updateElements(t,e,i,r){const o=r==="reset",s=this.chart,a=s.chartArea,l=s.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=o&&l.animateScale,d=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(e,r);let m=this._getRotation(),b;for(b=0;b<e;++b)m+=this._circumference(b,o);for(b=e;b<e+i;++b){const v=this._circumference(b,o),x=t[b],_={x:u+this.offsetX,y:f+this.offsetY,startAngle:m,endAngle:m+v,circumference:v,outerRadius:p,innerRadius:d};y&&(_.options=g||this.resolveDataElementOptions(b,x.active?"active":r)),m+=v,this.updateElement(x,b,_,r)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,r;for(r=0;r<e.length;r++){const o=t._parsed[r];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(r)&&!e[r].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?B*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Me(e._parsed[t],i.options.locale);return{label:r[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let r,o,s,a,c;if(!t){for(r=0,o=i.data.datasets.length;r<o;++r)if(i.isDatasetVisible(r)){s=i.getDatasetMeta(r),t=s.data,a=s.controller;break}}if(!t)return 0;for(r=0,o=t.length;r<o;++r)c=a.resolveDataElementOptions(r),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,r=t.length;i<r;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(k(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ke.id="doughnut";ke.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"};ke.descriptors={_scriptable:n=>n!=="spacing",_indexable:n=>n!=="spacing"};ke.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=n.legend.options;return t.labels.map((i,r)=>{const s=n.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:e,hidden:!n.getDataVisibility(r),index:r}})}return[]}},onClick(n,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let t=n.label;const e=": "+n.formattedValue;return W(t)?(t=t.slice(),t[0]+=e):t+=e,t}}}}};class bi extends gt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:r=[],_dataset:o}=e,s=this.chart._animationsDisabled;let{start:a,count:c}=Cc(e,r,s);this._drawStart=a,this._drawCount=c,Ec(e)&&(a=0,c=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=r;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(r,a,c,t)}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(e,r),h=s.axis,d=a.axis,{spanGaps:p,segment:g}=this.options,y=ne(p)?p:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||o||r==="none";let b=e>0&&this.getParsed(e-1);for(let v=e;v<e+i;++v){const x=t[v],_=this.getParsed(v),w=m?x:{},O=L(_[d]),S=w[h]=s.getPixelForValue(_[h],v),P=w[d]=o||O?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,_,c):_[d],v);w.skip=isNaN(S)||isNaN(P)||O,w.stop=v>0&&Math.abs(_[h]-b[h])>y,g&&(w.parsed=_,w.raw=l.data[v]),f&&(w.options=u||this.resolveDataElementOptions(v,x.active?"active":r)),m||this.updateElement(x,v,w,r),b=_}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,r=t.data||[];if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),s=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}bi.id="line";bi.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};bi.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Do extends gt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,r=i.data.labels||[],o=Me(e._parsed[t].r,i.options.locale);return{label:r[t]||"",value:o}}parseObjectData(t,e,i,r){return Vc.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,r)=>{const o=this.getParsed(r).r;!isNaN(o)&&this.chart.getDataVisibility(r)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,r=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(r/2,0),s=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,r){const o=r==="reset",s=this.chart,c=s.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,f=l.yCenter,h=l.getIndexAngle(0)-.5*Y;let d=h,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)d+=this._computeAngle(p,r,g);for(p=e;p<e+i;p++){const y=t[p];let m=d,b=d+this._computeAngle(p,r,g),v=s.getDataVisibility(p)?l.getDistanceFromCenterForValue(this.getParsed(p).r):0;d=b,o&&(c.animateScale&&(v=0),c.animateRotate&&(m=b=h));const x={x:u,y:f,innerRadius:0,outerRadius:v,startAngle:m,endAngle:b,options:this.resolveDataElementOptions(p,y.active?"active":r)};this.updateElement(y,p,x,r)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,r)=>{!isNaN(this.getParsed(r).r)&&this.chart.getDataVisibility(r)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?pt(this.resolveDataElementOptions(t,e).angle||i):0}}Do.id="polarArea";Do.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};Do.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const t=n.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:e}}=n.legend.options;return t.labels.map((i,r)=>{const s=n.getDatasetMeta(0).controller.getStyle(r);return{text:i,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,pointStyle:e,hidden:!n.getDataVisibility(r),index:r}})}return[]}},onClick(n,t,e){e.chart.toggleDataVisibility(t.index),e.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Jc extends ke{}Jc.id="pie";Jc.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Co extends gt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,r){return Vc.bind(this)(t,e,i,r)}update(t){const e=this._cachedMeta,i=e.dataset,r=e.data||[],o=e.iScale.getLabels();if(i.points=r,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===r.length,options:s};this.updateElement(i,void 0,a,t)}this.updateElements(r,0,r.length,t)}updateElements(t,e,i,r){const o=this._cachedMeta.rScale,s=r==="reset";for(let a=e;a<e+i;a++){const c=t[a],l=this.resolveDataElementOptions(a,c.active?"active":r),u=o.getPointPositionForValue(a,this.getParsed(a).r),f=s?o.xCenter:u.x,h=s?o.yCenter:u.y,d={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:l};this.updateElement(c,a,d,r)}}}Co.id="radar";Co.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};Co.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class yt{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ne(this.x)&&ne(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const r={};return t.forEach(o=>{r[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),r}}yt.defaults={};yt.defaultRoutes=void 0;const tl={values(n){return W(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let r,o=n;if(e.length>1){const l=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(l<1e-4||l>1e15)&&(r="scientific"),o=Uy(n,e)}const s=ut(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),Me(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(ut(n)));return i===1||i===2||i===5?tl.numeric.call(this,n,t,e):""}};function Uy(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var _i={formatters:tl};E.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,t)=>t.lineWidth,tickColor:(n,t)=>t.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:_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.grid","borderColor","","borderColor");E.route("scale.title","color","","color");E.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});E.describe("scales",{_fallback:"scale"});E.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function qy(n,t){const e=n.options.ticks,i=e.maxTicksLimit||Xy(n),r=e.major.enabled?Qy(t):[],o=r.length,s=r[0],a=r[o-1],c=[];if(o>i)return Gy(t,c,r,o/i),c;const l=Ky(r,t,i);if(o>0){let u,f;const h=o>1?Math.round((a-s)/(o-1)):null;for(Fe(t,c,l,L(h)?0:s-h,s),u=0,f=o-1;u<f;u++)Fe(t,c,l,r[u],r[u+1]);return Fe(t,c,l,a,L(h)?t.length:a+h),c}return Fe(t,c,l),c}function Xy(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),r=n._maxLength/e;return Math.floor(Math.min(i,r))}function Ky(n,t,e){const i=Zy(n),r=t.length/e;if(!i)return Math.max(r,1);const o=qp(i);for(let s=0,a=o.length-1;s<a;s++){const c=o[s];if(c>r)return c}return Math.max(r,1)}function Qy(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Gy(n,t,e,i){let r=0,o=e[0],s;for(i=Math.ceil(i),s=0;s<n.length;s++)s===o&&(t.push(n[s]),r++,o=e[r*i])}function Fe(n,t,e,i,r){const o=k(i,0),s=Math.min(k(r,n.length),n.length);let a=0,c,l,u;for(e=Math.ceil(e),r&&(c=r-i,e=c/Math.floor(c/e)),u=o;u<0;)a++,u=Math.round(o+a*e);for(l=Math.max(o,0);l<s;l++)l===u&&(t.push(n[l]),a++,u=Math.round(o+a*e))}function Zy(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const Jy=n=>n==="left"?"right":n==="right"?"left":n,Ca=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e;function Ea(n,t){const e=[],i=n.length/t,r=n.length;let o=0;for(;o<r;o+=i)e.push(n[Math.floor(o)]);return e}function tm(n,t,e){const i=n.ticks.length,r=Math.min(t,i-1),o=n._startPixel,s=n._endPixel,a=1e-6;let c=n.getPixelForTick(r),l;if(!(e&&(i===1?l=Math.max(c-o,s-c):t===0?l=(n.getPixelForTick(1)-c)/2:l=(c-n.getPixelForTick(r-1))/2,c+=r<t?l:-l,c<o-a||c>s+a)))return c}function em(n,t){F(n,e=>{const i=e.gc,r=i.length/2;let o;if(r>t){for(o=0;o<r;++o)delete e.data[i[o]];i.splice(0,r)}})}function ae(n){return n.drawTicks?n.tickLength:0}function $a(n,t){if(!n.display)return 0;const e=G(n.font,t),i=it(n.padding);return(W(n.text)?n.text.length:1)*e.lineHeight+i.height}function nm(n,t){return zt(n,{scale:t,type:"scale"})}function im(n,t,e){return zt(n,{tick:e,index:t,type:"tick"})}function rm(n,t,e){let i=mo(n);return(e&&t!=="right"||!e&&t==="right")&&(i=Jy(i)),i}function om(n,t,e,i){const{top:r,left:o,bottom:s,right:a,chart:c}=n,{chartArea:l,scales:u}=c;let f=0,h,d,p;const g=s-r,y=a-o;if(n.isHorizontal()){if(d=et(i,o,a),A(e)){const m=Object.keys(e)[0],b=e[m];p=u[m].getPixelForValue(b)+g-t}else e==="center"?p=(l.bottom+l.top)/2+g-t:p=Ca(n,e,t);h=a-o}else{if(A(e)){const m=Object.keys(e)[0],b=e[m];d=u[m].getPixelForValue(b)-y+t}else e==="center"?d=(l.left+l.right)/2-y+t:d=Ca(n,e,t);p=et(i,s,r),f=e==="left"?-q:q}return{titleX:d,titleY:p,maxWidth:h,rotation:f}}class Kt extends yt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:r}=this;return t=lt(t,Number.POSITIVE_INFINITY),e=lt(e,Number.NEGATIVE_INFINITY),i=lt(i,Number.POSITIVE_INFINITY),r=lt(r,Number.NEGATIVE_INFINITY),{min:lt(t,i),max:lt(e,r),minDefined:tt(t),maxDefined:tt(e)}}getMinMax(t){let{min:e,max:i,minDefined:r,maxDefined:o}=this.getUserBounds(),s;if(r&&o)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let c=0,l=a.length;c<l;++c)s=a[c].controller.getMinMax(this,t),r||(e=Math.min(e,s.min)),o||(i=Math.max(i,s.max));return e=o&&e>i?i:e,i=r&&e>i?e:i,{min:lt(e,lt(i,e)),max:lt(i,lt(e,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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){N(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:r,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ig(this,o,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?Ea(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=qy(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){N(this.options.afterUpdate,[this])}beforeSetDimensions(){N(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(){N(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),N(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){N(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,r,o;for(i=0,r=t.length;i<r;i++)o=t[i],o.label=N(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){N(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){N(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,r=e.minRotation||0,o=e.maxRotation;let s=r,a,c,l;if(!this._isVisible()||!e.display||r>=o||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,d=nt(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:d/(i-1),f+6>a&&(a=d/(i-(t.offset?.5:1)),c=this.maxHeight-ae(t.grid)-e.padding-$a(t.title,this.chart.options.font),l=Math.sqrt(f*f+h*h),s=go(Math.min(Math.asin(nt((u.highest.height+6)/a,-1,1)),Math.asin(nt(c/l,-1,1))-Math.asin(nt(h/l,-1,1)))),s=Math.max(r,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){N(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){N(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:r,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const c=$a(r,e.options.font);if(a?(t.width=this.maxWidth,t.height=ae(o)+c):(t.height=this.maxHeight,t.width=ae(o)+c),i.display&&this.ticks.length){const{first:l,last:u,widest:f,highest:h}=this._getLabelSizes(),d=i.padding*2,p=pt(this.labelRotation),g=Math.cos(p),y=Math.sin(p);if(a){const m=i.mirror?0:y*f.width+g*h.height;t.height=Math.min(this.maxHeight,t.height+m+d)}else{const m=i.mirror?0:g*f.width+y*h.height;t.width=Math.min(this.maxWidth,t.width+m+d)}this._calculatePadding(l,u,y,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,r){const{ticks:{align:o,padding:s},position:a}=this.options,c=this.labelRotation!==0,l=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,d=0;c?l?(h=r*t.width,d=i*e.height):(h=i*t.height,d=r*e.width):o==="start"?d=e.width:o==="end"?h=t.width:o!=="inner"&&(h=t.width/2,d=e.width/2),this.paddingLeft=Math.max((h-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((d-f+s)*this.width/(this.width-f),0)}else{let u=e.height/2,f=t.height/2;o==="start"?(u=0,f=t.height):o==="end"&&(u=e.height,f=0),this.paddingTop=u+s,this.paddingBottom=f+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(){N(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)L(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ea(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:r}=this,o=[],s=[];let a=0,c=0,l,u,f,h,d,p,g,y,m,b,v;for(l=0;l<e;++l){if(h=t[l].label,d=this._resolveTickFontOptions(l),i.font=p=d.string,g=r[p]=r[p]||{data:{},gc:[]},y=d.lineHeight,m=b=0,!L(h)&&!W(h))m=li(i,g.data,g.gc,m,h),b=y;else if(W(h))for(u=0,f=h.length;u<f;++u)v=h[u],!L(v)&&!W(v)&&(m=li(i,g.data,g.gc,m,v),b+=y);o.push(m),s.push(b),a=Math.max(m,a),c=Math.max(b,c)}em(r,e);const x=o.indexOf(a),_=s.indexOf(c),w=O=>({width:o[O]||0,height:s[O]||0});return{first:w(0),last:w(e-1),widest:w(x),highest:w(_),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Qp(this._alignToPixels?Nt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=im(this.getContext(),t,i))}return this.$context||(this.$context=nm(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=pt(this.labelRotation),i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,c=o?o.highest.height+s:0;return this.isHorizontal()?c*i>a*r?a/i:c/r:c*r<a*i?c/i:a/r}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,r=this.options,{grid:o,position:s}=r,a=o.offset,c=this.isHorizontal(),u=this.ticks.length+(a?1:0),f=ae(o),h=[],d=o.setContext(this.getContext()),p=d.drawBorder?d.borderWidth:0,g=p/2,y=function(M){return Nt(i,M,p)};let m,b,v,x,_,w,O,S,P,D,C,R;if(s==="top")m=y(this.bottom),w=this.bottom-f,S=m-g,D=y(t.top)+g,R=t.bottom;else if(s==="bottom")m=y(this.top),D=t.top,R=y(t.bottom)-g,w=m+g,S=this.top+f;else if(s==="left")m=y(this.right),_=this.right-f,O=m-g,P=y(t.left)+g,C=t.right;else if(s==="right")m=y(this.left),P=t.left,C=y(t.right)-g,_=m+g,O=this.left+f;else if(e==="x"){if(s==="center")m=y((t.top+t.bottom)/2+.5);else if(A(s)){const M=Object.keys(s)[0],H=s[M];m=y(this.chart.scales[M].getPixelForValue(H))}D=t.top,R=t.bottom,w=m+g,S=w+f}else if(e==="y"){if(s==="center")m=y((t.left+t.right)/2);else if(A(s)){const M=Object.keys(s)[0],H=s[M];m=y(this.chart.scales[M].getPixelForValue(H))}_=m-g,O=_-f,P=t.left,C=t.right}const j=k(r.ticks.maxTicksLimit,u),J=Math.max(1,Math.ceil(u/j));for(b=0;b<u;b+=J){const M=o.setContext(this.getContext(b)),H=M.lineWidth,V=M.color,Ot=M.borderDash||[],Qt=M.borderDashOffset,Rt=M.tickWidth,Tt=M.tickColor,st=M.tickBorderDash||[],Dt=M.tickBorderDashOffset;v=tm(this,b,a),v!==void 0&&(x=Nt(i,v,H),c?_=O=P=C=x:w=S=D=R=x,h.push({tx1:_,ty1:w,tx2:O,ty2:S,x1:P,y1:D,x2:C,y2:R,width:H,color:V,borderDash:Ot,borderDashOffset:Qt,tickWidth:Rt,tickColor:Tt,tickBorderDash:st,tickBorderDashOffset:Dt}))}return this._ticksLength=u,this._borderValue=m,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:r,ticks:o}=i,s=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:l,padding:u,mirror:f}=o,h=ae(i.grid),d=h+u,p=f?-u:d,g=-pt(this.labelRotation),y=[];let m,b,v,x,_,w,O,S,P,D,C,R,j="middle";if(r==="top")w=this.bottom-p,O=this._getXAxisLabelAlignment();else if(r==="bottom")w=this.top+p,O=this._getXAxisLabelAlignment();else if(r==="left"){const M=this._getYAxisLabelAlignment(h);O=M.textAlign,_=M.x}else if(r==="right"){const M=this._getYAxisLabelAlignment(h);O=M.textAlign,_=M.x}else if(e==="x"){if(r==="center")w=(t.top+t.bottom)/2+d;else if(A(r)){const M=Object.keys(r)[0],H=r[M];w=this.chart.scales[M].getPixelForValue(H)+d}O=this._getXAxisLabelAlignment()}else if(e==="y"){if(r==="center")_=(t.left+t.right)/2-d;else if(A(r)){const M=Object.keys(r)[0],H=r[M];_=this.chart.scales[M].getPixelForValue(H)}O=this._getYAxisLabelAlignment(h).textAlign}e==="y"&&(c==="start"?j="top":c==="end"&&(j="bottom"));const J=this._getLabelSizes();for(m=0,b=a.length;m<b;++m){v=a[m],x=v.label;const M=o.setContext(this.getContext(m));S=this.getPixelForTick(m)+o.labelOffset,P=this._resolveTickFontOptions(m),D=P.lineHeight,C=W(x)?x.length:1;const H=C/2,V=M.color,Ot=M.textStrokeColor,Qt=M.textStrokeWidth;let Rt=O;s?(_=S,O==="inner"&&(m===b-1?Rt=this.options.reverse?"left":"right":m===0?Rt=this.options.reverse?"right":"left":Rt="center"),r==="top"?l==="near"||g!==0?R=-C*D+D/2:l==="center"?R=-J.highest.height/2-H*D+D:R=-J.highest.height+D/2:l==="near"||g!==0?R=D/2:l==="center"?R=J.highest.height/2-H*D:R=J.highest.height-C*D,f&&(R*=-1)):(w=S,R=(1-C)*D/2);let Tt;if(M.showLabelBackdrop){const st=it(M.backdropPadding),Dt=J.heights[m],Ct=J.widths[m];let Gt=w+R-st.top,Zt=_-st.left;switch(j){case"middle":Gt-=Dt/2;break;case"bottom":Gt-=Dt;break}switch(O){case"center":Zt-=Ct/2;break;case"right":Zt-=Ct;break}Tt={left:Zt,top:Gt,width:Ct+st.width,height:Dt+st.height,color:M.backdropColor}}y.push({rotation:g,label:x,font:P,color:V,strokeColor:Ot,strokeWidth:Qt,textOffset:R,textAlign:Rt,textBaseline:j,translation:[_,w],backdrop:Tt})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-pt(this.labelRotation))return t==="top"?"left":"right";let r="center";return e.align==="start"?r="left":e.align==="end"?r="right":e.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:r,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,c=s.widest.width;let l,u;return e==="left"?r?(u=this.right+o,i==="near"?l="left":i==="center"?(l="center",u+=c/2):(l="right",u+=c)):(u=this.right-a,i==="near"?l="right":i==="center"?(l="center",u-=c/2):(l="left",u=this.left)):e==="right"?r?(u=this.left+o,i==="near"?l="right":i==="center"?(l="center",u-=c/2):(l="left",u-=c)):(u=this.left+a,i==="near"?l="left":i==="center"?(l="center",u+=c/2):(l="right",u=this.right)):l="right",{textAlign:l,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:r,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,r,o,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const r=this.ticks.findIndex(o=>o.value===t);return r>=0?e.setContext(this.getContext(r)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(c,l,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(c.x,c.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())};if(e.display)for(o=0,s=r.length;o<s;++o){const c=r[o];e.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,r=i.setContext(this.getContext()),o=i.drawBorder?r.borderWidth:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let c,l,u,f;this.isHorizontal()?(c=Nt(t,this.left,o)-o/2,l=Nt(t,this.right,s)+s/2,u=f=a):(u=Nt(t,this.top,o)-o/2,f=Nt(t,this.bottom,s)+s/2,c=l=a),e.save(),e.lineWidth=r.borderWidth,e.strokeStyle=r.borderColor,e.beginPath(),e.moveTo(c,u),e.lineTo(l,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&xo(i,r);const o=this._labelItems||(this._labelItems=this._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const c=o[s],l=c.font,u=c.label;c.backdrop&&(i.fillStyle=c.backdrop.color,i.fillRect(c.backdrop.left,c.backdrop.top,c.backdrop.width,c.backdrop.height));let f=c.textOffset;Xt(i,u,0,f,l,c)}r&&wo(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:r}}=this;if(!i.display)return;const o=G(i.font),s=it(i.padding),a=i.align;let c=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(c+=s.bottom,W(i.text)&&(c+=o.lineHeight*(i.text.length-1))):c+=s.top;const{titleX:l,titleY:u,maxWidth:f,rotation:h}=om(this,c,e,a);Xt(t,i.text,0,0,o,{color:i.color,maxWidth:f,rotation:h,textAlign:rm(a,e,r),textBaseline:"middle",translation:[l,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=k(t.grid&&t.grid.z,-1);return!this._isVisible()||this.draw!==Kt.prototype.draw?[{z:e,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let o,s;for(o=0,s=e.length;o<s;++o){const a=e[o];a[i]===this.id&&(!t||a.type===t)&&r.push(a)}return r}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return G(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Be{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;cm(e)&&(i=this.register(e));const r=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in r||(r[o]=t,sm(t,s,i),this.override&&E.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,r=this.scope;i in e&&delete e[i],r&&i in E[r]&&(delete E[r][i],this.override&&delete qt[i])}}function sm(n,t,e){const i=_e(Object.create(null),[e?E.get(e):{},E.get(t),n.defaults]);E.set(t,i),n.defaultRoutes&&am(t,n.defaultRoutes),n.descriptors&&E.describe(t,n.descriptors)}function am(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),r=i.pop(),o=[n].concat(i).join("."),s=t[e].split("."),a=s.pop(),c=s.join(".");E.route(o,r,c,a)})}function cm(n){return"id"in n&&"defaults"in n}class lm{constructor(){this.controllers=new Be(gt,"datasets",!0),this.elements=new Be(yt,"elements"),this.plugins=new Be(Object,"plugins"),this.scales=new Be(Kt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(r=>{const o=i||this._getRegistryForType(r);i||o.isForType(r)||o===this.plugins&&r.id?this._exec(t,o,r):F(r,s=>{const a=i||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,e,i){const r=po(t);N(i["before"+r],[],i),e[t](i),N(i["after"+r],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const r=e.get(t);if(r===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return r}}var xt=new lm;class Eo extends gt{update(t){const e=this._cachedMeta,{data:i=[]}=e,r=this.chart._animationsDisabled;let{start:o,count:s}=Cc(e,i,r);if(this._drawStart=o,this._drawCount=s,Ec(e)&&(o=0,s=i.length),this.options.showLine){const{dataset:a,_dataset:c}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=i;const l=this.resolveDatasetElementOptions(t);l.segment=this.options.segment,this.updateElement(a,void 0,{animated:!r,options:l},t)}this.updateElements(i,o,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=xt.getElement("line")),super.addElements()}updateElements(t,e,i,r){const o=r==="reset",{iScale:s,vScale:a,_stacked:c,_dataset:l}=this._cachedMeta,u=this.resolveDataElementOptions(e,r),f=this.getSharedOptions(u),h=this.includeOptions(r,f),d=s.axis,p=a.axis,{spanGaps:g,segment:y}=this.options,m=ne(g)?g:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||r==="none";let v=e>0&&this.getParsed(e-1);for(let x=e;x<e+i;++x){const _=t[x],w=this.getParsed(x),O=b?_:{},S=L(w[p]),P=O[d]=s.getPixelForValue(w[d],x),D=O[p]=o||S?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,w,c):w[p],x);O.skip=isNaN(P)||isNaN(D)||S,O.stop=x>0&&Math.abs(w[d]-v[d])>m,y&&(O.parsed=w,O.raw=l.data[x]),h&&(O.options=f||this.resolveDataElementOptions(x,_.active?"active":r)),b||this.updateElement(_,x,O,r),v=w}this.updateSharedOptions(f,r,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let c=e.length-1;c>=0;--c)a=Math.max(a,e[c].size(this.resolveDataElementOptions(c))/2);return a>0&&a}const i=t.dataset,r=i.options&&i.options.borderWidth||0;if(!e.length)return r;const o=e[0].size(this.resolveDataElementOptions(0)),s=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(r,o,s)/2}}Eo.id="scatter";Eo.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Eo.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ht(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class to{constructor(t){this.options=t||{}}init(t){}formats(){return Ht()}parse(t,e){return Ht()}format(t,e){return Ht()}add(t,e,i){return Ht()}diff(t,e,i){return Ht()}startOf(t,e,i){return Ht()}endOf(t,e){return Ht()}}to.override=function(n){Object.assign(to.prototype,n)};var el={_date:to};function um(n,t,e,i){const{controller:r,data:o,_sorted:s}=n,a=r._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const c=a._reversePixels?Gp:Vt;if(i){if(r._sharedOptions){const l=o[0],u=typeof l.getRange=="function"&&l.getRange(t);if(u){const f=c(o,t,e-u),h=c(o,t,e+u);return{lo:f.lo,hi:h.hi}}}}else return c(o,t,e)}return{lo:0,hi:o.length-1}}function Re(n,t,e,i,r){const o=n.getSortedVisibleDatasetMetas(),s=e[t];for(let a=0,c=o.length;a<c;++a){const{index:l,data:u}=o[a],{lo:f,hi:h}=um(o[a],t,s,r);for(let d=f;d<=h;++d){const p=u[d];p.skip||i(p,l,d)}}}function fm(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,r){const o=t?Math.abs(i.x-r.x):0,s=e?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function Ii(n,t,e,i,r){const o=[];return!r&&!n.isPointInArea(t)||Re(n,e,t,function(a,c,l){!r&&!xe(a,n.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:c,index:l})},!0),o}function hm(n,t,e,i){let r=[];function o(s,a,c){const{startAngle:l,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:f}=Mc(s,{x:t.x,y:t.y});ve(f,l,u)&&r.push({element:s,datasetIndex:a,index:c})}return Re(n,e,t,o),r}function dm(n,t,e,i,r,o){let s=[];const a=fm(e);let c=Number.POSITIVE_INFINITY;function l(u,f,h){const d=u.inRange(t.x,t.y,r);if(i&&!d)return;const p=u.getCenterPoint(r);if(!(!!o||n.isPointInArea(p))&&!d)return;const y=a(t,p);y<c?(s=[{element:u,datasetIndex:f,index:h}],c=y):y===c&&s.push({element:u,datasetIndex:f,index:h})}return Re(n,e,t,l),s}function Li(n,t,e,i,r,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?hm(n,t,e,r):dm(n,t,e,i,r,o)}function Aa(n,t,e,i,r){const o=[],s=e==="x"?"inXRange":"inYRange";let a=!1;return Re(n,e,t,(c,l,u)=>{c[s](t[e],r)&&(o.push({element:c,datasetIndex:l,index:u}),a=a||c.inRange(t.x,t.y,r))}),i&&!a?[]:o}var pm={evaluateInteractionItems:Re,modes:{index(n,t,e,i){const r=Wt(t,n),o=e.axis||"x",s=e.includeInvisible||!1,a=e.intersect?Ii(n,r,o,i,s):Li(n,r,o,!1,i,s),c=[];return a.length?(n.getSortedVisibleDatasetMetas().forEach(l=>{const u=a[0].index,f=l.data[u];f&&!f.skip&&c.push({element:f,datasetIndex:l.index,index:u})}),c):[]},dataset(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;let a=e.intersect?Ii(n,r,o,i,s):Li(n,r,o,!1,i,s);if(a.length>0){const c=a[0].datasetIndex,l=n.getDatasetMeta(c).data;a=[];for(let u=0;u<l.length;++u)a.push({element:l[u],datasetIndex:c,index:u})}return a},point(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;return Ii(n,r,o,i,s)},nearest(n,t,e,i){const r=Wt(t,n),o=e.axis||"xy",s=e.includeInvisible||!1;return Li(n,r,o,e.intersect,i,s)},x(n,t,e,i){const r=Wt(t,n);return Aa(n,r,"x",e.intersect,i)},y(n,t,e,i){const r=Wt(t,n);return Aa(n,r,"y",e.intersect,i)}}};const nl=["left","top","right","bottom"];function ce(n,t){return n.filter(e=>e.pos===t)}function Ia(n,t){return n.filter(e=>nl.indexOf(e.pos)===-1&&e.box.axis===t)}function le(n,t){return n.sort((e,i)=>{const r=t?i:e,o=t?e:i;return r.weight===o.weight?r.index-o.index:r.weight-o.weight})}function gm(n){const t=[];let e,i,r,o,s,a;for(e=0,i=(n||[]).length;e<i;++e)r=n[e],{position:o,options:{stack:s,stackWeight:a=1}}=r,t.push({index:e,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return t}function ym(n){const t={};for(const e of n){const{stack:i,pos:r,stackWeight:o}=e;if(!i||!nl.includes(r))continue;const s=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function mm(n,t){const e=ym(n),{vBoxMaxWidth:i,hBoxMaxHeight:r}=t;let o,s,a;for(o=0,s=n.length;o<s;++o){a=n[o];const{fullSize:c}=a.box,l=e[a.stack],u=l&&a.stackWeight/l.weight;a.horizontal?(a.width=u?u*i:c&&t.availableWidth,a.height=r):(a.width=i,a.height=u?u*r:c&&t.availableHeight)}return e}function bm(n){const t=gm(n),e=le(t.filter(l=>l.box.fullSize),!0),i=le(ce(t,"left"),!0),r=le(ce(t,"right")),o=le(ce(t,"top"),!0),s=le(ce(t,"bottom")),a=Ia(t,"x"),c=Ia(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:r.concat(c).concat(s).concat(a),chartArea:ce(t,"chartArea"),vertical:i.concat(r).concat(c),horizontal:o.concat(s).concat(a)}}function La(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function il(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function _m(n,t,e,i){const{pos:r,box:o}=e,s=n.maxPadding;if(!A(r)){e.size&&(n[r]-=e.size);const f=i[e.stack]||{size:0,count:1};f.size=Math.max(f.size,e.horizontal?o.height:o.width),e.size=f.size/f.count,n[r]+=e.size}o.getPadding&&il(s,o.getPadding());const a=Math.max(0,t.outerWidth-La(s,n,"left","right")),c=Math.max(0,t.outerHeight-La(s,n,"top","bottom")),l=a!==n.w,u=c!==n.h;return n.w=a,n.h=c,e.horizontal?{same:l,other:u}:{same:u,other:l}}function vm(n){const t=n.maxPadding;function e(i){const r=Math.max(t[i]-n[i],0);return n[i]+=r,r}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function xm(n,t){const e=t.maxPadding;function i(r){const o={left:0,top:0,right:0,bottom:0};return r.forEach(s=>{o[s]=Math.max(t[s],e[s])}),o}return i(n?["left","right"]:["top","bottom"])}function he(n,t,e,i){const r=[];let o,s,a,c,l,u;for(o=0,s=n.length,l=0;o<s;++o){a=n[o],c=a.box,c.update(a.width||t.w,a.height||t.h,xm(a.horizontal,t));const{same:f,other:h}=_m(t,e,a,i);l|=f&&r.length,u=u||h,c.fullSize||r.push(a)}return l&&he(r,t,e,i)||u}function ze(n,t,e,i,r){n.top=e,n.left=t,n.right=t+i,n.bottom=e+r,n.width=i,n.height=r}function Fa(n,t,e,i){const r=e.padding;let{x:o,y:s}=t;for(const a of n){const c=a.box,l=i[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/l.weight||1;if(a.horizontal){const f=t.w*u,h=l.size||c.height;ht(l.start)&&(s=l.start),c.fullSize?ze(c,r.left,s,e.outerWidth-r.right-r.left,h):ze(c,t.left+l.placed,s,f,h),l.start=s,l.placed+=f,s=c.bottom}else{const f=t.h*u,h=l.size||c.width;ht(l.start)&&(o=l.start),c.fullSize?ze(c,o,r.top,h,e.outerHeight-r.bottom-r.top):ze(c,o,t.top+l.placed,h,f),l.start=o,l.placed+=f,o=c.right}}t.x=o,t.y=s}E.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var ft={addBox(n,t){n.boxes||(n.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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const r=it(n.options.layout.padding),o=Math.max(t-r.width,0),s=Math.max(e-r.height,0),a=bm(n.boxes),c=a.vertical,l=a.horizontal;F(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=c.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/u,hBoxMaxHeight:s/2}),h=Object.assign({},r);il(h,it(i));const d=Object.assign({maxPadding:h,w:o,h:s,x:r.left,y:r.top},r),p=mm(c.concat(l),f);he(a.fullSize,d,f,p),he(c,d,f,p),he(l,d,f,p)&&he(c,d,f,p),vm(d),Fa(a.leftAndTop,d,f,p),d.x+=d.w,d.y+=d.h,Fa(a.rightAndBottom,d,f,p),n.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},F(a.chartArea,g=>{const y=g.box;Object.assign(y,n.chartArea),y.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})})}};class rl{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,r){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,r?Math.floor(e/r):i)}}isAttached(t){return!0}updateConfig(t){}}class wm extends rl{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Sn="$chartjs",Om={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ba=n=>n===null||n==="";function Pm(n,t){const e=n.style,i=n.getAttribute("height"),r=n.getAttribute("width");if(n[Sn]={initial:{height:i,width:r,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Ba(r)){const o=ya(n,"width");o!==void 0&&(n.width=o)}if(Ba(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=ya(n,"height");o!==void 0&&(n.height=o)}return n}const ol=ry?{passive:!0}:!1;function Sm(n,t,e){n.addEventListener(t,e,ol)}function Mm(n,t,e){n.canvas.removeEventListener(t,e,ol)}function km(n,t){const e=Om[n.type]||n.type,{x:i,y:r}=Wt(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:r!==void 0?r:null}}function fi(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function Rm(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fi(a.addedNodes,i),s=s&&!fi(a.removedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}function Tm(n,t,e){const i=n.canvas,r=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||fi(a.removedNodes,i),s=s&&!fi(a.addedNodes,i);s&&e()});return r.observe(document,{childList:!0,subtree:!0}),r}const Oe=new Map;let za=0;function sl(){const n=window.devicePixelRatio;n!==za&&(za=n,Oe.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function Dm(n,t){Oe.size||window.addEventListener("resize",sl),Oe.set(n,t)}function Cm(n){Oe.delete(n),Oe.size||window.removeEventListener("resize",sl)}function Em(n,t,e){const i=n.canvas,r=i&&ko(i);if(!r)return;const o=Dc((a,c)=>{const l=r.clientWidth;e(a,c),l<r.clientWidth&&e()},window),s=new ResizeObserver(a=>{const c=a[0],l=c.contentRect.width,u=c.contentRect.height;l===0&&u===0||o(l,u)});return s.observe(r),Dm(n,o),s}function Fi(n,t,e){e&&e.disconnect(),t==="resize"&&Cm(n)}function $m(n,t,e){const i=n.canvas,r=Dc(o=>{n.ctx!==null&&e(km(o,n))},n,o=>{const s=o[0];return[s,s.offsetX,s.offsetY]});return Sm(i,t,r),r}class Am extends rl{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(Pm(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Sn])return!1;const i=e[Sn].initial;["height","width"].forEach(o=>{const s=i[o];L(s)?e.removeAttribute(o):e.setAttribute(o,s)});const r=i.style||{};return Object.keys(r).forEach(o=>{e.style[o]=r[o]}),e.width=e.width,delete e[Sn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const r=t.$proxies||(t.$proxies={}),s={attach:Rm,detach:Tm,resize:Em}[e]||$m;r[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),r=i[e];if(!r)return;({attach:Fi,detach:Fi,resize:Fi}[e]||Mm)(t,e,r),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,r){return iy(t,e,i,r)}isAttached(t){const e=ko(t);return!!(e&&e.isConnected)}}function Im(n){return!Uc()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?wm:Am}class Lm{constructor(){this._init=[]}notify(t,e,i,r){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=r?this._descriptors(t).filter(r):this._descriptors(t),s=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,e,i,r){r=r||{};for(const o of t){const s=o.plugin,a=s[i],c=[e,r,o.options];if(N(a,c,s)===!1&&r.cancelable)return!1}return!0}invalidate(){L(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,r=k(i.options&&i.options.plugins,{}),o=Fm(i);return r===!1&&!e?[]:zm(t,o,r,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,r=(o,s)=>o.filter(a=>!s.some(c=>a.plugin.id===c.plugin.id));this._notify(r(e,i),t,"stop"),this._notify(r(i,e),t,"start")}}function Fm(n){const t={},e=[],i=Object.keys(xt.plugins.items);for(let o=0;o<i.length;o++)e.push(xt.getPlugin(i[o]));const r=n.plugins||[];for(let o=0;o<r.length;o++){const s=r[o];e.indexOf(s)===-1&&(e.push(s),t[s.id]=!0)}return{plugins:e,localIds:t}}function Bm(n,t){return!t&&n===!1?null:n===!0?{}:n}function zm(n,{plugins:t,localIds:e},i,r){const o=[],s=n.getContext();for(const a of t){const c=a.id,l=Bm(i[c],r);l!==null&&o.push({plugin:a,options:Nm(n.config,{plugin:a,local:e[c]},l,s)})}return o}function Nm(n,{plugin:t,local:e},i,r){const o=n.pluginScopeKeys(t),s=n.getOptionScopes(i,o);return e&&t.defaults&&s.push(t.defaults),n.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function eo(n,t){const e=E.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Hm(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function Wm(n,t){return n===t?"_index_":"_value_"}function jm(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function no(n,t){return n==="x"||n==="y"?n:t.axis||jm(t.position)||n.charAt(0).toLowerCase()}function Vm(n,t){const e=qt[n.type]||{scales:{}},i=t.scales||{},r=eo(n.type,t),o=Object.create(null),s=Object.create(null);return Object.keys(i).forEach(a=>{const c=i[a];if(!A(c))return console.error(`Invalid scale configuration for scale: ${a}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=no(a,c),u=Wm(l,r),f=e.scales||{};o[l]=o[l]||a,s[a]=pe(Object.create(null),[{axis:l},c,f[l],f[u]])}),n.data.datasets.forEach(a=>{const c=a.type||n.type,l=a.indexAxis||eo(c,t),f=(qt[c]||{}).scales||{};Object.keys(f).forEach(h=>{const d=Hm(h,l),p=a[d+"AxisID"]||o[d]||d;s[p]=s[p]||Object.create(null),pe(s[p],[{axis:d},i[p],f[h]])})}),Object.keys(s).forEach(a=>{const c=s[a];pe(c,[E.scales[c.type],E.scale])}),s}function al(n){const t=n.options||(n.options={});t.plugins=k(t.plugins,{}),t.scales=Vm(n,t)}function cl(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Ym(n){return n=n||{},n.data=cl(n.data),al(n),n}const Na=new Map,ll=new Set;function Ne(n,t){let e=Na.get(n);return e||(e=t(),Na.set(n,e),ll.add(e)),e}const ue=(n,t,e)=>{const i=Ft(t,e);i!==void 0&&n.add(i)};class Um{constructor(t){this._config=Ym(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=cl(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(),al(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ne(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ne(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ne(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return Ne(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let r=i.get(t);return(!r||e)&&(r=new Map,i.set(t,r)),r}getOptionScopes(t,e,i){const{options:r,type:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const c=new Set;e.forEach(u=>{t&&(c.add(t),u.forEach(f=>ue(c,t,f))),u.forEach(f=>ue(c,r,f)),u.forEach(f=>ue(c,qt[o]||{},f)),u.forEach(f=>ue(c,E,f)),u.forEach(f=>ue(c,Zr,f))});const l=Array.from(c);return l.length===0&&l.push(Object.create(null)),ll.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,qt[e]||{},E.datasets[e]||{},{type:e},E,Zr]}resolveNamedOptions(t,e,i,r=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Ha(this._resolverCache,t,r);let c=s;if(Xm(s,e)){o.$shared=!1,i=Bt(i)?i():i;const l=this.createResolver(t,i,a);c=ie(s,i,l)}for(const l of e)o[l]=c[l];return o}createResolver(t,e,i=[""],r){const{resolver:o}=Ha(this._resolverCache,t,i);return A(e)?ie(o,e,void 0,r):o}}function Ha(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const r=e.join();let o=i.get(r);return o||(o={resolver:Po(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,o)),o}const qm=n=>A(n)&&Object.getOwnPropertyNames(n).reduce((t,e)=>t||Bt(n[e]),!1);function Xm(n,t){const{isScriptable:e,isIndexable:i}=Nc(n);for(const r of t){const o=e(r),s=i(r),a=(s||o)&&n[r];if(o&&(Bt(a)||qm(a))||s&&W(a))return!0}return!1}var Km="3.9.1";const Qm=["top","bottom","left","right","chartArea"];function Wa(n,t){return n==="top"||n==="bottom"||Qm.indexOf(n)===-1&&t==="x"}function ja(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Va(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),N(e&&e.onComplete,[n],t)}function Gm(n){const t=n.chart,e=t.options.animation;N(e&&e.onProgress,[n],t)}function ul(n){return Uc()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const hi={},fl=n=>{const t=ul(n);return Object.values(hi).filter(e=>e.canvas===t).pop()};function Zm(n,t,e){const i=Object.keys(n);for(const r of i){const o=+r;if(o>=t){const s=n[r];delete n[r],(e>0||o>t)&&(n[o+e]=s)}}}function Jm(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}let vi=class{constructor(t,e){const i=this.config=new Um(e),r=ul(t),o=fl(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Im(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,s.aspectRatio),c=a&&a.canvas,l=c&&c.height,u=c&&c.width;if(this.id=Bp(),this.ctx=a,this.canvas=c,this.width=u,this.height=l,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 Lm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=tg(f=>this.update(f),s.resizeDelay||0),this._dataChanges=[],hi[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}St.listen(this,"complete",Va),St.listen(this,"progress",Gm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:r,_aspectRatio:o}=this;return L(t)?e&&o?o: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ga(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ha(this.canvas,this.ctx),this}stop(){return St.stop(this),this}resize(t,e){St.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,r=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(r,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,ga(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),N(i.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};F(e,(i,r)=>{i.id=r})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,r=Object.keys(i).reduce((s,a)=>(s[a]=!1,s),{});let o=[];e&&(o=o.concat(Object.keys(e).map(s=>{const a=e[s],c=no(s,a),l=c==="r",u=c==="x";return{options:a,dposition:l?"chartArea":u?"bottom":"left",dtype:l?"radialLinear":u?"category":"linear"}}))),F(o,s=>{const a=s.options,c=a.id,l=no(c,a),u=k(a.type,s.dtype);(a.position===void 0||Wa(a.position,l)!==Wa(s.dposition))&&(a.position=s.dposition),r[c]=!0;let f=null;if(c in i&&i[c].type===u)f=i[c];else{const h=xt.getScale(u);f=new h({id:c,type:u,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),F(r,(s,a)=>{s||delete i[a]}),F(i,s=>{ft.configure(this,s,s.options),ft.addBox(this,s)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((r,o)=>r.index-o.index),i>e){for(let r=e;r<i;++r)this._destroyDatasetMeta(r);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ja("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,r)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=e.length;i<r;i++){const o=e[i];let s=this.getDatasetMeta(i);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=a,s.indexAxis=o.indexAxis||eo(a,this.options),s.order=o.order||0,s.index=i,s.label=""+o.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const c=xt.getController(a),{datasetElementType:l,dataElementType:u}=E.datasets[a];Object.assign(c.prototype,{dataElementType:xt.getElement(u),datasetElementType:l&&xt.getElement(l)}),s.controller=new c(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){F(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),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 o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,u=this.data.datasets.length;l<u;l++){const{controller:f}=this.getDatasetMeta(l),h=!r&&o.indexOf(f)===-1;f.buildOrUpdateElements(h),s=Math.max(+f.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),r||F(o,l=>{l.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ja("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){F(this.scales,t=>{ft.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!ta(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:o}of e){const s=i==="_removeElements"?-o:o;Zm(t,r,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),r=i(0);for(let o=1;o<e;o++)if(!ta(r,i(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ft.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],F(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Bt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),r={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(St.has(this)?this.attached&&!St.running(this)&&St.start(this):(this.draw(),Va({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 e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let r,o;for(r=0,o=e.length;r<o;++r){const s=e[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 e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,r=!i.disabled,o=this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(r&&xo(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),r&&wo(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return xe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,r){const o=pm.modes[e];return typeof o=="function"?o(this,t,i,r):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let r=i.filter(o=>o&&o._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=zt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const r=i?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,r);ht(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),St.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ha(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete hi[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,s)=>{e.addEventListener(this,o,s),t[o]=s},r=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};F(this.options.events,o=>i(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(c,l)=>{e.addEventListener(this,c,l),t[c]=l},r=(c,l)=>{t[c]&&(e.removeEventListener(this,c,l),delete t[c])},o=(c,l)=>{this.canvas&&this.resize(c,l)};let s;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",s)};s=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():s()}unbindEvents(){F(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},F(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const r=i?"set":"remove";let o,s,a,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),a=0,c=t.length;a<c;++a){s=t[a];const l=s&&this.getDatasetMeta(s.datasetIndex).controller;l&&l[r+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!oi(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const r=this.options.hover,o=(c,l)=>c.filter(u=>!l.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),s=o(e,t),a=i?t:o(t,e);s.length&&this.updateHoverStyle(s,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,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 o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:r=[],options:o}=this,s=e,a=this._getActiveElements(t,r,i,s),c=Vp(t),l=Jm(t,this._lastEvent,i,c);i&&(this._lastEvent=null,N(o.onHover,[t,a,this],this),c&&N(o.onClick,[t,a,this],this));const u=!oi(a,r);return(u||e)&&(this._active=a,this._updateHoverStyles(a,r,e)),this._lastEvent=l,u}_getActiveElements(t,e,i,r){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}};const Ya=()=>F(vi.instances,n=>n._plugins.invalidate()),Et=!0;Object.defineProperties(vi,{defaults:{enumerable:Et,value:E},instances:{enumerable:Et,value:hi},overrides:{enumerable:Et,value:qt},registry:{enumerable:Et,value:xt},version:{enumerable:Et,value:Km},getChart:{enumerable:Et,value:fl},register:{enumerable:Et,value:(...n)=>{xt.add(...n),Ya()}},unregister:{enumerable:Et,value:(...n)=>{xt.remove(...n),Ya()}}});function hl(n,t,e){const{startAngle:i,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:c}=t;let l=r/a;n.beginPath(),n.arc(o,s,a,i-l,e+l),c>r?(l=r/c,n.arc(o,s,c,e+l,i-l,!0)):n.arc(o,s,r,e+q,i-q),n.closePath(),n.clip()}function tb(n){return Oo(n,["outerStart","outerEnd","innerStart","innerEnd"])}function eb(n,t,e,i){const r=tb(n.options.borderRadius),o=(e-t)/2,s=Math.min(o,i*t/2),a=c=>{const l=(e-Math.min(o,c))*i/2;return nt(c,0,Math.min(o,l))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:nt(r.innerStart,0,s),innerEnd:nt(r.innerEnd,0,s)}}function te(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function io(n,t,e,i,r,o){const{x:s,y:a,startAngle:c,pixelMargin:l,innerRadius:u}=t,f=Math.max(t.outerRadius+i+e-l,0),h=u>0?u+i+e+l:0;let d=0;const p=r-c;if(i){const M=u>0?u-i:0,H=f>0?f-i:0,V=(M+H)/2,Ot=V!==0?p*V/(V+i):p;d=(p-Ot)/2}const g=Math.max(.001,p*f-e/Y)/f,y=(p-g)/2,m=c+y+d,b=r-y-d,{outerStart:v,outerEnd:x,innerStart:_,innerEnd:w}=eb(t,h,f,b-m),O=f-v,S=f-x,P=m+v/O,D=b-x/S,C=h+_,R=h+w,j=m+_/C,J=b-w/R;if(n.beginPath(),o){if(n.arc(s,a,f,P,D),x>0){const V=te(S,D,s,a);n.arc(V.x,V.y,x,D,b+q)}const M=te(R,b,s,a);if(n.lineTo(M.x,M.y),w>0){const V=te(R,J,s,a);n.arc(V.x,V.y,w,b+q,J+Math.PI)}if(n.arc(s,a,h,b-w/h,m+_/h,!0),_>0){const V=te(C,j,s,a);n.arc(V.x,V.y,_,j+Math.PI,m-q)}const H=te(O,m,s,a);if(n.lineTo(H.x,H.y),v>0){const V=te(O,P,s,a);n.arc(V.x,V.y,v,m-q,P)}}else{n.moveTo(s,a);const M=Math.cos(P)*f+s,H=Math.sin(P)*f+a;n.lineTo(M,H);const V=Math.cos(D)*f+s,Ot=Math.sin(D)*f+a;n.lineTo(V,Ot)}n.closePath()}function nb(n,t,e,i,r){const{fullCircles:o,startAngle:s,circumference:a}=t;let c=t.endAngle;if(o){io(n,t,e,i,s+B,r);for(let l=0;l<o;++l)n.fill();isNaN(a)||(c=s+a%B,a%B===0&&(c+=B))}return io(n,t,e,i,c,r),n.fill(),c}function ib(n,t,e){const{x:i,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=t,c=Math.max(t.outerRadius-s,0),l=t.innerRadius+s;let u;for(e&&hl(n,t,o+B),n.beginPath(),n.arc(i,r,l,o+B,o,!0),u=0;u<a;++u)n.stroke();for(n.beginPath(),n.arc(i,r,c,o,o+B),u=0;u<a;++u)n.stroke()}function rb(n,t,e,i,r,o){const{options:s}=t,{borderWidth:a,borderJoinStyle:c}=s,l=s.borderAlign==="inner";a&&(l?(n.lineWidth=a*2,n.lineJoin=c||"round"):(n.lineWidth=a,n.lineJoin=c||"bevel"),t.fullCircles&&ib(n,t,l),l&&hl(n,t,r),io(n,t,e,i,r,o),n.stroke())}class $o extends yt{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.getProps(["x","y"],i),{angle:o,distance:s}=Mc(r,{x:t,y:e}),{startAngle:a,endAngle:c,innerRadius:l,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=this.options.spacing/2,p=k(f,c-a)>=B||ve(o,a,c),g=$t(s,l+h,u+h);return p&&g}getCenterPoint(t){const{x:e,y:i,startAngle:r,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:c,spacing:l}=this.options,u=(r+o)/2,f=(s+a+l+c)/2;return{x:e+Math.cos(u)*f,y:i+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,r=(e.offset||0)/2,o=(e.spacing||0)/2,s=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=i>B?Math.floor(i/B):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(r){a=r/2;const l=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(l)*a,Math.sin(l)*a),this.circumference>=Y&&(a=r)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const c=nb(t,this,a,o,s);rb(t,this,a,o,c,s),t.restore()}}$o.id="arc";$o.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};$o.defaultRoutes={backgroundColor:"backgroundColor"};function dl(n,t,e=t){n.lineCap=k(e.borderCapStyle,t.borderCapStyle),n.setLineDash(k(e.borderDash,t.borderDash)),n.lineDashOffset=k(e.borderDashOffset,t.borderDashOffset),n.lineJoin=k(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=k(e.borderWidth,t.borderWidth),n.strokeStyle=k(e.borderColor,t.borderColor)}function ob(n,t,e){n.lineTo(e.x,e.y)}function sb(n){return n.stepped?kg:n.tension||n.cubicInterpolationMode==="monotone"?Rg:ob}function pl(n,t,e={}){const i=n.length,{start:r=0,end:o=i-1}=e,{start:s,end:a}=t,c=Math.max(r,s),l=Math.min(o,a),u=r<s&&o<s||r>a&&o>a;return{count:i,start:c,loop:t.loop,ilen:l<c&&!u?i+l-c:l-c}}function ab(n,t,e,i){const{points:r,options:o}=t,{count:s,start:a,loop:c,ilen:l}=pl(r,e,i),u=sb(o);let{move:f=!0,reverse:h}=i||{},d,p,g;for(d=0;d<=l;++d)p=r[(a+(h?l-d:d))%s],!p.skip&&(f?(n.moveTo(p.x,p.y),f=!1):u(n,g,p,h,o.stepped),g=p);return c&&(p=r[(a+(h?l:0))%s],u(n,g,p,h,o.stepped)),!!c}function cb(n,t,e,i){const r=t.points,{count:o,start:s,ilen:a}=pl(r,e,i),{move:c=!0,reverse:l}=i||{};let u=0,f=0,h,d,p,g,y,m;const b=x=>(s+(l?a-x:x))%o,v=()=>{g!==y&&(n.lineTo(u,y),n.lineTo(u,g),n.lineTo(u,m))};for(c&&(d=r[b(0)],n.moveTo(d.x,d.y)),h=0;h<=a;++h){if(d=r[b(h)],d.skip)continue;const x=d.x,_=d.y,w=x|0;w===p?(_<g?g=_:_>y&&(y=_),u=(f*u+x)/++f):(v(),n.lineTo(x,_),p=w,f=0,g=y=_),m=_}v()}function ro(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?cb:ab}function lb(n){return n.stepped?oy:n.tension||n.cubicInterpolationMode==="monotone"?sy:jt}function ub(n,t,e,i){let r=t._path;r||(r=t._path=new Path2D,t.path(r,e,i)&&r.closePath()),dl(n,t.options),n.stroke(r)}function fb(n,t,e,i){const{segments:r,options:o}=t,s=ro(t);for(const a of r)dl(n,o,a.style),n.beginPath(),s(n,t,a,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const hb=typeof Path2D=="function";function db(n,t,e,i){hb&&!t.options.segment?ub(n,t,e,i):fb(n,t,e,i)}class xi extends yt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;Gg(this._points,i,t,r,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=gy(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,r=t[e],o=this.points,s=hy(this,{property:e,start:r,end:r});if(!s.length)return;const a=[],c=lb(i);let l,u;for(l=0,u=s.length;l<u;++l){const{start:f,end:h}=s[l],d=o[f],p=o[h];if(d===p){a.push(d);continue}const g=Math.abs((r-d[e])/(p[e]-d[e])),y=c(d,p,g,i.stepped);y[e]=t[e],a.push(y)}return a.length===1?a[0]:a}pathSegment(t,e,i){return ro(this)(t,this,e,i)}path(t,e,i){const r=this.segments,o=ro(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const a of r)s&=o(t,this,a,{start:e,end:e+i-1});return!!s}draw(t,e,i,r){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),db(t,this,i,r),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}xi.id="line";xi.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};xi.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};xi.descriptors={_scriptable:!0,_indexable:n=>n!=="borderDash"&&n!=="fill"};function Ua(n,t,e,i){const r=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<r.radius+r.hitRadius}class Ao extends yt{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const r=this.options,{x:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(t,e){return Ua(this,t,"x",e)}inYRange(t,e){return Ua(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const i=e&&t.borderWidth||0;return(e+i)*2}draw(t,e){const i=this.options;this.skip||i.radius<.1||!xe(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Jr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}Ao.id="point";Ao.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};Ao.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function gl(n,t){const{x:e,y:i,base:r,width:o,height:s}=n.getProps(["x","y","base","width","height"],t);let a,c,l,u,f;return n.horizontal?(f=s/2,a=Math.min(e,r),c=Math.max(e,r),l=i-f,u=i+f):(f=o/2,a=e-f,c=e+f,l=Math.min(i,r),u=Math.max(i,r)),{left:a,top:l,right:c,bottom:u}}function It(n,t,e,i){return n?0:nt(t,e,i)}function pb(n,t,e){const i=n.options.borderWidth,r=n.borderSkipped,o=zc(i);return{t:It(r.top,o.top,0,e),r:It(r.right,o.right,0,t),b:It(r.bottom,o.bottom,0,e),l:It(r.left,o.left,0,t)}}function gb(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),r=n.options.borderRadius,o=Yt(r),s=Math.min(t,e),a=n.borderSkipped,c=i||A(r);return{topLeft:It(!c||a.top||a.left,o.topLeft,0,s),topRight:It(!c||a.top||a.right,o.topRight,0,s),bottomLeft:It(!c||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:It(!c||a.bottom||a.right,o.bottomRight,0,s)}}function yb(n){const t=gl(n),e=t.right-t.left,i=t.bottom-t.top,r=pb(n,e/2,i/2),o=gb(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+r.l,y:t.top+r.t,w:e-r.l-r.r,h:i-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Bi(n,t,e,i){const r=t===null,o=e===null,a=n&&!(r&&o)&&gl(n,i);return a&&(r||$t(t,a.left,a.right))&&(o||$t(e,a.top,a.bottom))}function mb(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function bb(n,t){n.rect(t.x,t.y,t.w,t.h)}function zi(n,t,e={}){const i=n.x!==e.x?-t:0,r=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,s=(n.y+n.h!==e.y+e.h?t:0)-r;return{x:n.x+i,y:n.y+r,w:n.w+o,h:n.h+s,radius:n.radius}}class Io extends yt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:r}}=this,{inner:o,outer:s}=yb(this),a=mb(s.radius)?we:bb;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,zi(s,e,o)),t.clip(),a(t,zi(o,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,zi(o,e)),t.fillStyle=r,t.fill(),t.restore()}inRange(t,e,i){return Bi(this,t,e,i)}inXRange(t,e){return Bi(this,t,null,e)}inYRange(t,e){return Bi(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:r,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+r)/2:e,y:o?i:(i+r)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Io.id="bar";Io.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};Io.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};const qa=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},_b=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Xa extends yt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=N(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,r)=>t.sort(i,r,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,r=G(i.font),o=r.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=qa(i,o);let l,u;e.font=r.string,this.isHorizontal()?(l=this.maxWidth,u=this._fitRows(s,o,a,c)+10):(u=this.maxHeight,l=this._fitCols(s,o,a,c)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,r){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.lineWidths=[0],u=r+a;let f=t;o.textAlign="left",o.textBaseline="middle";let h=-1,d=-u;return this.legendItems.forEach((p,g)=>{const y=i+e/2+o.measureText(p.text).width;(g===0||l[l.length-1]+y+2*a>s)&&(f+=u,l[l.length-(g>0?0:1)]=0,d+=u,h++),c[g]={left:0,top:d,row:h,width:y,height:r},l[l.length-1]+=y+a}),f}_fitCols(t,e,i,r){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],l=this.columnSizes=[],u=s-t;let f=a,h=0,d=0,p=0,g=0;return this.legendItems.forEach((y,m)=>{const b=i+e/2+o.measureText(y.text).width;m>0&&d+r+2*a>u&&(f+=h+a,l.push({width:h,height:d}),p+=h+a,g++,h=d=0),c[m]={left:p,top:d,col:g,width:b,height:r},h=Math.max(h,b),d+=r+a}),f+=h,l.push({width:h,height:d}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:r},rtl:o}}=this,s=ee(o,this.left,this.width);if(this.isHorizontal()){let a=0,c=et(i,this.left+r,this.right-this.lineWidths[a]);for(const l of e)a!==l.row&&(a=l.row,c=et(i,this.left+r,this.right-this.lineWidths[a])),l.top+=this.top+t+r,l.left=s.leftForLtr(s.x(c),l.width),c+=l.width+r}else{let a=0,c=et(i,this.top+t+r,this.bottom-this.columnSizes[a].height);for(const l of e)l.col!==a&&(a=l.col,c=et(i,this.top+t+r,this.bottom-this.columnSizes[a].height)),l.top=c,l.left+=this.left+r,l.left=s.leftForLtr(s.x(l.left),l.width),c+=l.height+r}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;xo(t,this),this._draw(),wo(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:r}=this,{align:o,labels:s}=t,a=E.color,c=ee(t.rtl,this.left,this.width),l=G(s.font),{color:u,padding:f}=s,h=l.size,d=h/2;let p;this.drawTitle(),r.textAlign=c.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=l.string;const{boxWidth:g,boxHeight:y,itemHeight:m}=qa(s,h),b=function(O,S,P){if(isNaN(g)||g<=0||isNaN(y)||y<0)return;r.save();const D=k(P.lineWidth,1);if(r.fillStyle=k(P.fillStyle,a),r.lineCap=k(P.lineCap,"butt"),r.lineDashOffset=k(P.lineDashOffset,0),r.lineJoin=k(P.lineJoin,"miter"),r.lineWidth=D,r.strokeStyle=k(P.strokeStyle,a),r.setLineDash(k(P.lineDash,[])),s.usePointStyle){const C={radius:y*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:D},R=c.xPlus(O,g/2),j=S+d;Bc(r,C,R,j,s.pointStyleWidth&&g)}else{const C=S+Math.max((h-y)/2,0),R=c.leftForLtr(O,g),j=Yt(P.borderRadius);r.beginPath(),Object.values(j).some(J=>J!==0)?we(r,{x:R,y:C,w:g,h:y,radius:j}):r.rect(R,C,g,y),r.fill(),D!==0&&r.stroke()}r.restore()},v=function(O,S,P){Xt(r,P.text,O,S+m/2,l,{strikethrough:P.hidden,textAlign:c.textAlign(P.textAlign)})},x=this.isHorizontal(),_=this._computeTitleHeight();x?p={x:et(o,this.left+f,this.right-i[0]),y:this.top+f+_,line:0}:p={x:this.left+f,y:et(o,this.top+_+f,this.bottom-e[0].height),line:0},qc(this.ctx,t.textDirection);const w=m+f;this.legendItems.forEach((O,S)=>{r.strokeStyle=O.fontColor||u,r.fillStyle=O.fontColor||u;const P=r.measureText(O.text).width,D=c.textAlign(O.textAlign||(O.textAlign=s.textAlign)),C=g+d+P;let R=p.x,j=p.y;c.setWidth(this.width),x?S>0&&R+C+f>this.right&&(j=p.y+=w,p.line++,R=p.x=et(o,this.left+f,this.right-i[p.line])):S>0&&j+w>this.bottom&&(R=p.x=R+e[p.line].width+f,p.line++,j=p.y=et(o,this.top+_+f,this.bottom-e[p.line].height));const J=c.x(R);b(J,j,O),R=eg(D,R+g+d,x?R+C:this.right,t.rtl),v(c.x(R),j,O),x?p.x+=C+f:p.y+=w}),Xc(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=G(e.font),r=it(e.padding);if(!e.display)return;const o=ee(t.rtl,this.left,this.width),s=this.ctx,a=e.position,c=i.size/2,l=r.top+c;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+l,f=et(t.align,f,this.right-h);else{const p=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=l+et(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const d=et(a,f,f+h);s.textAlign=o.textAlign(mo(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Xt(s,e.text,d,u,i)}_computeTitleHeight(){const t=this.options.title,e=G(t.font),i=it(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,r,o;if($t(t,this.left,this.right)&&$t(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(r=o[i],$t(t,r.left,r.left+r.width)&&$t(e,r.top,r.top+r.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!vb(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const r=this._hoveredItem,o=_b(r,i);r&&!o&&N(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&N(e.onHover,[t,i,this],this)}else i&&N(e.onClick,[t,i,this],this)}}function vb(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var r_={id:"legend",_element:Xa,start(n,t,e){const i=n.legend=new Xa({ctx:n.ctx,options:e,chart:n});ft.configure(n,i,e),ft.addBox(n,i)},stop(n){ft.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;ft.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,r=e.chart;r.isDatasetVisible(i)?(r.hide(i),t.hidden=!0):(r.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:r,color:o}}=n.legend.options;return n._getSortedDatasetMetas().map(s=>{const a=s.controller.getStyle(e?0:void 0),c=it(a.borderWidth);return{text:t[s.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!s.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:a.borderColor,pointStyle:i||a.pointStyle,rotation:a.rotation,textAlign:r||a.textAlign,borderRadius:0,datasetIndex:s.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class yl extends yt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const r=W(i.text)?i.text.length:1;this._padding=it(i.padding);const o=r*G(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:r,right:o,options:s}=this,a=s.align;let c=0,l,u,f;return this.isHorizontal()?(u=et(a,i,o),f=e+t,l=o-i):(s.position==="left"?(u=i+t,f=et(a,r,e),c=Y*-.5):(u=o-t,f=et(a,e,r),c=Y*.5),l=r-e),{titleX:u,titleY:f,maxWidth:l,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=G(e.font),o=i.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:c,rotation:l}=this._drawArgs(o);Xt(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:l,textAlign:mo(e.align),textBaseline:"middle",translation:[s,a]})}}function xb(n,t){const e=new yl({ctx:n.ctx,options:t,chart:n});ft.configure(n,e,t),ft.addBox(n,e),n.titleBlock=e}var o_={id:"title",_element:yl,start(n,t,e){xb(n,e)},stop(n){const t=n.titleBlock;ft.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;ft.configure(n,i,e),i.options=e},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 be={average(n){if(!n.length)return!1;let t,e,i=0,r=0,o=0;for(t=0,e=n.length;t<e;++t){const s=n[t].element;if(s&&s.hasValue()){const a=s.tooltipPosition();i+=a.x,r+=a.y,++o}}return{x:i/o,y:r/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,r=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=n.length;o<s;++o){const c=n[o].element;if(c&&c.hasValue()){const l=c.getCenterPoint(),u=Qr(t,l);u<r&&(r=u,a=c)}}if(a){const c=a.tooltipPosition();e=c.x,i=c.y}return{x:e,y:i}}};function mt(n,t){return t&&(W(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Mt(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
18
18
|
`)>-1?n.split(`
|
|
19
|
-
`):n}function wb(n,t){const{element:e,datasetIndex:i,index:r}=t,o=n.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:n,label:s,parsed:o.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Ka(n,t){const e=n.chart.ctx,{body:i,footer:r,title:o}=n,{boxWidth:s,boxHeight:a}=t,c=G(t.bodyFont),l=G(t.titleFont),u=G(t.footerFont),f=o.length,h=r.length,d=i.length,p=it(t.padding);let g=p.height,y=0,m=i.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,f&&(g+=f*l.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(a,c.lineHeight):c.lineHeight;g+=d*x+(m-d)*c.lineHeight+(m-1)*t.bodySpacing}h&&(g+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let b=0;const v=function(x){y=Math.max(y,e.measureText(x).width+b)};return e.save(),e.font=l.string,F(n.title,v),e.font=c.string,F(n.beforeBody.concat(n.afterBody),v),b=t.displayColors?s+2+t.boxPadding:0,F(i,x=>{F(x.before,v),F(x.lines,v),F(x.after,v)}),b=0,e.font=u.string,F(n.footer,v),e.restore(),y+=p.width,{width:y,height:g}}function Ob(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Pb(n,t,e,i){const{x:r,width:o}=i,s=e.caretSize+e.caretPadding;if(n==="left"&&r+o+s>t.width||n==="right"&&r-o-s<0)return!0}function Sb(n,t,e,i){const{x:r,width:o}=e,{width:s,chartArea:{left:a,right:c}}=n;let l="center";return i==="center"?l=r<=(a+c)/2?"left":"right":r<=o/2?l="left":r>=s-o/2&&(l="right"),Pb(l,n,t,e)&&(l="center"),l}function Qa(n,t,e){const i=e.yAlign||t.yAlign||Ob(n,e);return{xAlign:e.xAlign||t.xAlign||Sb(n,t,e,i),yAlign:i}}function Mb(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function kb(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Ga(n,t,e,i){const{caretSize:r,caretPadding:o,cornerRadius:s}=n,{xAlign:a,yAlign:c}=e,l=r+o,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:d}=Yt(s);let p=Mb(t,a);const g=kb(t,c,l);return c==="center"?a==="left"?p+=l:a==="right"&&(p-=l):a==="left"?p-=Math.max(u,h)+r:a==="right"&&(p+=Math.max(f,d)+r),{x:nt(p,0,i.width-t.width),y:nt(g,0,i.height-t.height)}}function He(n,t,e){const i=it(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Za(n){return mt([],Mt(n))}function Rb(n,t,e){return zt(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ja(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}class oo extends yt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,o=new Qc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Rb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=i.beforeTitle.apply(this,[t]),o=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let a=[];return a=mt(a,Mt(r)),a=mt(a,Mt(o)),a=mt(a,Mt(s)),a}getBeforeBody(t,e){return Za(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,r=[];return F(t,o=>{const s={before:[],lines:[],after:[]},a=Ja(i,o);mt(s.before,Mt(a.beforeLabel.call(this,o))),mt(s.lines,a.label.call(this,o)),mt(s.after,Mt(a.afterLabel.call(this,o))),r.push(s)}),r}getAfterBody(t,e){return Za(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,r=i.beforeFooter.apply(this,[t]),o=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let a=[];return a=mt(a,Mt(r)),a=mt(a,Mt(o)),a=mt(a,Mt(s)),a}_createItems(t){const e=this._active,i=this.chart.data,r=[],o=[],s=[];let a=[],c,l;for(c=0,l=e.length;c<l;++c)a.push(wb(this.chart,e[c]));return t.filter&&(a=a.filter((u,f,h)=>t.filter(u,f,h,i))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,i))),F(a,u=>{const f=Ja(t.callbacks,u);r.push(f.labelColor.call(this,u)),o.push(f.labelPointStyle.call(this,u)),s.push(f.labelTextColor.call(this,u))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let o,s=[];if(!r.length)this.opacity!==0&&(o={opacity:0});else{const a=be[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 c=this._size=Ka(this,i),l=Object.assign({},a,c),u=Qa(this.chart,i,l),f=Ga(i,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const o=this.getCaretPosition(t,i,r);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:c,topRight:l,bottomLeft:u,bottomRight:f}=Yt(a),{x:h,y:d}=t,{width:p,height:g}=e;let y,m,b,v,x,_;return o==="center"?(x=d+g/2,r==="left"?(y=h,m=y-s,v=x+s,_=x-s):(y=h+p,m=y+s,v=x-s,_=x+s),b=y):(r==="left"?m=h+Math.max(c,u)+s:r==="right"?m=h+p-Math.max(l,f)-s:m=this.caretX,o==="top"?(v=d,x=v-s,y=m-s,b=m+s):(v=d+g,x=v+s,y=m+s,b=m-s),_=v),{x1:y,x2:m,x3:b,y1:v,y2:x,y3:_}}drawTitle(t,e,i){const r=this.title,o=r.length;let s,a,c;if(o){const l=ee(i.rtl,this.x,this.width);for(t.x=He(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=G(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,c=0;c<o;++c)e.fillText(r[c],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,c+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,r,o){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:c,boxWidth:l,boxPadding:u}=o,f=G(o.bodyFont),h=He(this,"left",o),d=r.x(h),p=c<f.lineHeight?(f.lineHeight-c)/2:0,g=e.y+p;if(o.usePointStyle){const y={radius:Math.min(l,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=r.leftForLtr(d,l)+l/2,b=g+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Jr(t,y,m,b),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Jr(t,y,m,b)}else{t.lineWidth=A(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 y=r.leftForLtr(d,l-u),m=r.leftForLtr(r.xPlus(d,1),l-u-2),b=Yt(s.borderRadius);Object.values(b).some(v=>v!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,we(t,{x:y,y:g,w:l,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),we(t,{x:m,y:g+1,w:l-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,g,l,c),t.strokeRect(y,g,l,c),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,l-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:c,boxWidth:l,boxPadding:u}=i,f=G(i.bodyFont);let h=f.lineHeight,d=0;const p=ee(i.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+d),t.y+h/2),t.y+=h+o},y=p.textAlign(s);let m,b,v,x,_,w,O;for(e.textAlign=s,e.textBaseline="middle",e.font=f.string,t.x=He(this,y,i),e.fillStyle=i.bodyColor,F(this.beforeBody,g),d=a&&y!=="right"?s==="center"?l/2+u:l+2+u:0,x=0,w=r.length;x<w;++x){for(m=r[x],b=this.labelTextColors[x],e.fillStyle=b,F(m.before,g),v=m.lines,a&&v.length&&(this._drawColorBox(e,t,x,p,i),h=Math.max(f.lineHeight,c)),_=0,O=v.length;_<O;++_)g(v[_]),h=f.lineHeight;F(m.after,g)}d=0,h=f.lineHeight,F(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const r=this.footer,o=r.length;let s,a;if(o){const c=ee(i.rtl,this.x,this.width);for(t.x=He(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=c.textAlign(i.footerAlign),e.textBaseline="middle",s=G(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<o;++a)e.fillText(r[a],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:o,yAlign:s}=this,{x:a,y:c}=t,{width:l,height:u}=i,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:p}=Yt(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+f,c),s==="top"&&this.drawCaret(t,e,i,r),e.lineTo(a+l-h,c),e.quadraticCurveTo(a+l,c,a+l,c+h),s==="center"&&o==="right"&&this.drawCaret(t,e,i,r),e.lineTo(a+l,c+u-p),e.quadraticCurveTo(a+l,c+u,a+l-p,c+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(a+d,c+u),e.quadraticCurveTo(a,c+u,a,c+u-d),s==="center"&&o==="left"&&this.drawCaret(t,e,i,r),e.lineTo(a,c+f),e.quadraticCurveTo(a,c,a+f,c),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,o=i&&i.y;if(r||o){const s=be[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Ka(this,t),c=Object.assign({},s,this._size),l=Qa(e,t,c),u=Ga(t,c,l,e);(r._to!==u.x||o._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=it(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,e),qc(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Xc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:a,index:c})=>{const l=this.chart.getDatasetMeta(a);if(!l)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:l.data[c],index:c}}),o=!oi(i,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),a=this._positionChanged(s,t),c=e||!oi(s,o)||a;return c&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,r){const o=this.options;if(t.type==="mouseout")return[];if(!r)return e;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:r,options:o}=this,s=be[o.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}oo.positioners=be;var s_={id:"tooltip",_element:oo,positioners:be,afterInit(n,t,e){e&&(n.tooltip=new oo({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:{beforeTitle:Pt,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.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 e[t.dataIndex]}return""},afterTitle:Pt,beforeBody:Pt,beforeLabel:Pt,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return L(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Pt,afterBody:Pt,beforeFooter:Pt,footer:Pt,afterFooter:Pt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Tb=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Db(n,t,e,i){const r=n.indexOf(t);if(r===-1)return Tb(n,t,e,i);const o=n.lastIndexOf(t);return r!==o?e:r}const Cb=(n,t)=>n===null?null:nt(Math.round(n),0,t);class so extends Kt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:o}of e)i[r]===o&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(L(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Db(i,t,k(e,t),this._addedLabels),Cb(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=e;s++)r.push({value:s});return r}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}so.id="category";so.defaults={ticks:{callback:so.prototype.getLabelForValue}};function $b(n,t){const e=[],{bounds:r,step:o,min:s,max:a,precision:c,count:l,maxTicks:u,maxDigits:f,includeBounds:h}=n,d=o||1,p=u-1,{min:g,max:y}=t,m=!L(s),b=!L(a),v=!L(l),x=(y-g)/(f+1);let _=na((y-g)/p/d)*d,w,O,S,P;if(_<1e-14&&!m&&!b)return[{value:g},{value:y}];P=Math.ceil(y/_)-Math.floor(g/_),P>p&&(_=na(P*_/p/d)*d),L(c)||(w=Math.pow(10,c),_=Math.ceil(_*w)/w),r==="ticks"?(O=Math.floor(g/_)*_,S=Math.ceil(y/_)*_):(O=g,S=y),m&&b&&o&&Xp((a-s)/o,_/1e3)?(P=Math.round(Math.min((a-s)/_,u)),_=(a-s)/P,O=s,S=a):v?(O=m?s:O,S=b?a:S,P=l-1,_=(S-O)/P):(P=(S-O)/_,ge(P,Math.round(P),_/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(ia(_),ia(O));w=Math.pow(10,L(c)?D:c),O=Math.round(O*w)/w,S=Math.round(S*w)/w;let C=0;for(m&&(h&&O!==s?(e.push({value:s}),O<s&&C++,ge(Math.round((O+C*_)*w)/w,s,tc(s,x,n))&&C++):O<s&&C++);C<P;++C)e.push({value:Math.round((O+C*_)*w)/w});return b&&h&&S!==a?e.length&&ge(e[e.length-1].value,a,tc(a,x,n))?e[e.length-1].value=a:e.push({value:a}):(!b||S===a)&&e.push({value:S}),e}function tc(n,t,{horizontal:e,minRotation:i}){const r=pt(i),o=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/o,s)}class di extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return L(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const s=c=>r=e?r:c,a=c=>o=i?o:c;if(t){const c=wt(r),l=wt(o);c<0&&l<0?a(0):c>0&&l>0&&s(0)}if(r===o){let c=1;(o>=Number.MAX_SAFE_INTEGER||r<=Number.MIN_SAFE_INTEGER)&&(c=Math.abs(o*.05)),a(o+c),t||s(r-c)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,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(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=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:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,s=$b(r,o);return t.bounds==="ticks"&&Sc(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 e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Me(t,this.chart.options.locale,this.options.ticks.format)}}class ml extends di{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=tt(t)?t:0,this.max=tt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=pt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.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}}ml.id="linear";ml.defaults={ticks:{callback:_i.formatters.numeric}};function ec(n){return n/Math.pow(10,Math.floor(ut(n)))===1}function Eb(n,t){const e=Math.floor(ut(t.max)),i=Math.ceil(t.max/Math.pow(10,e)),r=[];let o=lt(n.min,Math.pow(10,Math.floor(ut(t.min)))),s=Math.floor(ut(o)),a=Math.floor(o/Math.pow(10,s)),c=s<0?Math.pow(10,Math.abs(s)):1;do r.push({value:o,major:ec(o)}),++a,a===10&&(a=1,++s,c=s>=0?1:c),o=Math.round(a*Math.pow(10,s)*c)/c;while(s<e||s===e&&a<i);const l=lt(n.max,o);return r.push({value:l,major:ec(o)}),r}class bl extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=di.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return tt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=tt(t)?Math.max(0,t):null,this.max=tt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const o=c=>i=t?i:c,s=c=>r=e?r:c,a=(c,l)=>Math.pow(10,Math.floor(ut(c))+l);i===r&&(i<=0?(o(1),s(10)):(o(a(i,-1)),s(a(r,1)))),i<=0&&o(a(r,-1)),r<=0&&s(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&o(a(i,-1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Eb(e,this);return t.bounds==="ticks"&&Sc(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":Me(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ut(t),this._valueRange=ut(this.max)-ut(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ut(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}bl.id="logarithmic";bl.defaults={ticks:{callback:_i.formatters.logarithmic,major:{enabled:!0}}};function ao(n){const t=n.ticks;if(t.display&&n.display){const e=it(t.backdropPadding);return k(t.font&&t.font.size,$.font.size)+e.height}return 0}function Ab(n,t,e){return e=W(e)?e:[e],{w:Mg(n,t.string,e),h:e.length*t.lineHeight}}function nc(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function Ib(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],o=n._pointLabels.length,s=n.options.pointLabels,a=s.centerPointLabels?Y/o:0;for(let c=0;c<o;c++){const l=s.setContext(n.getPointLabelContext(c));r[c]=l.padding;const u=n.getPointPosition(c,n.drawingArea+r[c],a),f=G(l.font),h=Ab(n.ctx,f,n._pointLabels[c]);i[c]=h;const d=dt(n.getIndexAngle(c)+a),p=Math.round(go(d)),g=nc(p,u.x,h.w,0,180),y=nc(p,u.y,h.h,90,270);Lb(e,t,d,g,y)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Fb(n,i,r)}function Lb(n,t,e,i,r){const o=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let a=0,c=0;i.start<t.l?(a=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+a)),r.start<t.t?(c=(t.t-r.start)/s,n.t=Math.min(n.t,t.t-c)):r.end>t.b&&(c=(r.end-t.b)/s,n.b=Math.max(n.b,t.b+c))}function Fb(n,t,e){const i=[],r=n._pointLabels.length,o=n.options,s=ao(o)/2,a=n.drawingArea,c=o.pointLabels.centerPointLabels?Y/r:0;for(let l=0;l<r;l++){const u=n.getPointPosition(l,a+s+e[l],c),f=Math.round(go(dt(u.angle+q))),h=t[l],d=Nb(u.y,h.h,f),p=Bb(f),g=zb(u.x,h.w,p);i.push({x:u.x,y:d,textAlign:p,left:g,top:d,right:g+h.w,bottom:d+h.h})}return i}function Bb(n){return n===0||n===180?"center":n<180?"left":"right"}function zb(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Nb(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Hb(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const o=i.setContext(n.getPointLabelContext(r)),s=G(o.font),{x:a,y:c,textAlign:l,left:u,top:f,right:h,bottom:d}=n._pointLabelItems[r],{backdropColor:p}=o;if(!L(p)){const g=Yt(o.borderRadius),y=it(o.backdropPadding);e.fillStyle=p;const m=u-y.left,b=f-y.top,v=h-u+y.width,x=d-f+y.height;Object.values(g).some(_=>_!==0)?(e.beginPath(),we(e,{x:m,y:b,w:v,h:x,radius:g}),e.fill()):e.fillRect(m,b,v,x)}Xt(e,n._pointLabels[r],a,c+s.lineHeight/2,s,{color:o.color,textAlign:l,textBaseline:"middle"})}}function _l(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,B);else{let o=n.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let s=1;s<i;s++)o=n.getPointPosition(s,t),r.lineTo(o.x,o.y)}}function Wb(n,t,e,i){const r=n.ctx,o=t.circular,{color:s,lineWidth:a}=t;!o&&!i||!s||!a||e<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(t.borderDash),r.lineDashOffset=t.borderDashOffset,r.beginPath(),_l(n,e,o,i),r.closePath(),r.stroke(),r.restore())}function jb(n,t,e){return zt(n,{label:e,index:t,type:"pointLabel"})}class wi extends di{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=it(ao(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=tt(t)&&!isNaN(t)?t:0,this.max=tt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ao(this.options))}generateTickLabels(t){di.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=N(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ib(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=B/(this._pointLabels.length||1),i=this.options.startAngle||0;return dt(t*e+pt(i))}getDistanceFromCenterForValue(t){if(L(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(L(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return jb(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-q+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),_l(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r}=e,o=this._pointLabels.length;let s,a,c;if(e.pointLabels.display&&Hb(this,o),r.display&&this.ticks.forEach((l,u)=>{if(u!==0){a=this.getDistanceFromCenterForValue(l.value);const f=r.setContext(this.getContext(u-1));Wb(this,f,a,o)}}),i.display){for(t.save(),s=o-1;s>=0;s--){const l=i.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:f}=l;!f||!u||(t.lineWidth=f,t.strokeStyle=u,t.setLineDash(l.borderDash),t.lineDashOffset=l.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,c)=>{if(c===0&&!e.reverse)return;const l=i.setContext(this.getContext(c)),u=G(l.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),l.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=l.backdropColor;const f=it(l.backdropPadding);t.fillRect(-s/2-f.left,-o-u.size/2-f.top,s+f.width,u.size+f.height)}Xt(t,a.label,0,-o,u,{color:l.color})}),t.restore()}drawTitle(){}}wi.id="radialLinear";wi.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(n){return n},padding:5,centerPointLabels:!1}};wi.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};wi.descriptors={angleLines:{_fallback:"grid"}};const Oi={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}},ot=Object.keys(Oi);function Vb(n,t){return n-t}function ic(n,t){if(L(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:o}=n._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),tt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(ne(o)||o===!0)?e.startOf(s,"isoWeek",o):e.startOf(s,r)),+s)}function rc(n,t,e,i){const r=ot.length;for(let o=ot.indexOf(n);o<r-1;++o){const s=Oi[ot[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(a*s.size))<=i)return ot[o]}return ot[r-1]}function Yb(n,t,e,i,r){for(let o=ot.length-1;o>=ot.indexOf(e);o--){const s=ot[o];if(Oi[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return ot[e?ot.indexOf(e):0]}function Ub(n){for(let t=ot.indexOf(n)+1,e=ot.length;t<e;++t)if(Oi[ot[t]].common)return ot[t]}function oc(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=yo(e,t),o=e[i]>=t?e[i]:e[r];n[o]=!0}}function qb(n,t,e,i){const r=n._adapter,o=+r.startOf(t[0].value,i),s=t[t.length-1].value;let a,c;for(a=o;a<=s;a=+r.add(a,1,i))c=e[a],c>=0&&(t[c].major=!0);return t}function sc(n,t,e){const i=[],r={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],r[a]=s,i.push({value:a,major:!1});return o===0||!e?i:qb(n,i,r,e)}class Pi extends Kt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),r=this._adapter=new el._date(t.adapters.date);r.init(e),pe(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ic(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function c(l){!s&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!a&&!isNaN(l.max)&&(o=Math.max(o,l.max))}(!s||!a)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),r=tt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),o=tt(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,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 o=this.min,s=this.max,a=Zp(r,o,s);return this._unit=e.unit||(i.autoSkip?rc(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Yb(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ub(this._unit),this.initOffsets(r),t.reverse&&a.reverse(),sc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e=0,i=0,r,o;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=nt(e,0,s),i=nt(i,0,s),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,o=r.time,s=o.unit||rc(o.minUnit,e,i,this._getLabelCapacity(e)),a=k(o.stepSize,1),c=s==="week"?o.isoWeekday:!1,l=ne(c)||c===!0,u={};let f=e,h,d;if(l&&(f=+t.startOf(f,"isoWeek",c)),f=+t.startOf(f,l?"day":s),t.diff(i,e,s)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+s);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<i;h=+t.add(h,a,s),d++)oc(u,h,p);return(h===i||r.bounds==="ticks"||d===1)&&oc(u,h,p),Object.keys(u).sort((g,y)=>g-y).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,r){const o=this.options,s=o.time.displayFormats,a=this._unit,c=this._majorUnit,l=a&&s[a],u=c&&s[c],f=i[e],h=c&&u&&f&&f.major,d=this._adapter.format(t,r||(h?u:l)),p=o.ticks.callback;return p?N(p,[d,e,i],this):d}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=pt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*s,h:i*s+a*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,sc(this,[t],this._majorUnit),r),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,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(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(ic(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Rc(t.sort(Vb))}}Pi.id="time";Pi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function We(n,t,e){let i=0,r=n.length-1,o,s,a,c;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=Vt(n,"pos",t)),{pos:o,time:a}=n[i],{pos:s,time:c}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=Vt(n,"time",t)),{time:o,pos:a}=n[i],{time:s,pos:c}=n[r]);const l=s-o;return l?a+(c-a)*(t-o)/l:a}class vl extends Pi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=We(e,this.min),this._tableRange=We(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],o=[];let s,a,c,l,u;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&r.push(l);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=r.length;s<a;++s)u=r[s+1],c=r[s-1],l=r[s],Math.round((u+c)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(We(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return We(this._table,i*this._tableRange+this._minPos,!0)}}vl.id="timeseries";vl.defaults=Pi.defaults;const xl="label";function ac(n,t){typeof n=="function"?n(t):n&&(n.current=t)}function Xb(n,t){Object.assign(n.options,t)}function wl(n,t){n.labels=t}function Ol(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xl;const i=[];n.datasets=t.map(r=>{const o=n.datasets.find(s=>s[e]===r[e]);return!o||!r.data||i.includes(o)?{...r}:(i.push(o),Object.assign(o,r),o)})}function Kb(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xl;const e={labels:[],datasets:[]};return wl(e,n.labels),Ol(e,n.datasets,t),e}function Qb(n,t){let{height:e=150,width:i=300,redraw:r=!1,datasetIdKey:o,type:s,data:a,options:c,plugins:l=[],fallbackContent:u,updateMode:f,...h}=n;const d=bt.useRef(null),p=bt.useRef(),g=()=>{d.current&&(p.current=new vi(d.current,{type:s,data:Kb(a,o),options:c&&{...c},plugins:l}),ac(t,p.current))},y=()=>{ac(t,null),p.current&&(p.current.destroy(),p.current=null)};return bt.useEffect(()=>{!r&&p.current&&c&&Xb(p.current,c)},[r,c]),bt.useEffect(()=>{!r&&p.current&&wl(p.current.config.data,a.labels)},[r,a.labels]),bt.useEffect(()=>{!r&&p.current&&a.datasets&&Ol(p.current.config.data,a.datasets,o)},[r,a.datasets]),bt.useEffect(()=>{p.current&&(r?(y(),setTimeout(g)):p.current.update(f))},[r,c,a.labels,a.datasets,f]),bt.useEffect(()=>{p.current&&(y(),setTimeout(g))},[s]),bt.useEffect(()=>(g(),()=>y()),[]),hc.createElement("canvas",Object.assign({ref:d,role:"img",height:e,width:i},h),u)}const Gb=bt.forwardRef(Qb);function Zb(n,t){return vi.register(t),bt.forwardRef((e,i)=>hc.createElement(Gb,Object.assign({},e,{ref:i,type:n})))}const a_=Zb("line",bi);/*!
|
|
19
|
+
`):n}function wb(n,t){const{element:e,datasetIndex:i,index:r}=t,o=n.getDatasetMeta(i).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:n,label:s,parsed:o.getParsed(r),raw:n.data.datasets[i].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:i,element:e}}function Ka(n,t){const e=n.chart.ctx,{body:i,footer:r,title:o}=n,{boxWidth:s,boxHeight:a}=t,c=G(t.bodyFont),l=G(t.titleFont),u=G(t.footerFont),f=o.length,h=r.length,d=i.length,p=it(t.padding);let g=p.height,y=0,m=i.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(m+=n.beforeBody.length+n.afterBody.length,f&&(g+=f*l.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),m){const x=t.displayColors?Math.max(a,c.lineHeight):c.lineHeight;g+=d*x+(m-d)*c.lineHeight+(m-1)*t.bodySpacing}h&&(g+=t.footerMarginTop+h*u.lineHeight+(h-1)*t.footerSpacing);let b=0;const v=function(x){y=Math.max(y,e.measureText(x).width+b)};return e.save(),e.font=l.string,F(n.title,v),e.font=c.string,F(n.beforeBody.concat(n.afterBody),v),b=t.displayColors?s+2+t.boxPadding:0,F(i,x=>{F(x.before,v),F(x.lines,v),F(x.after,v)}),b=0,e.font=u.string,F(n.footer,v),e.restore(),y+=p.width,{width:y,height:g}}function Ob(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Pb(n,t,e,i){const{x:r,width:o}=i,s=e.caretSize+e.caretPadding;if(n==="left"&&r+o+s>t.width||n==="right"&&r-o-s<0)return!0}function Sb(n,t,e,i){const{x:r,width:o}=e,{width:s,chartArea:{left:a,right:c}}=n;let l="center";return i==="center"?l=r<=(a+c)/2?"left":"right":r<=o/2?l="left":r>=s-o/2&&(l="right"),Pb(l,n,t,e)&&(l="center"),l}function Qa(n,t,e){const i=e.yAlign||t.yAlign||Ob(n,e);return{xAlign:e.xAlign||t.xAlign||Sb(n,t,e,i),yAlign:i}}function Mb(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function kb(n,t,e){let{y:i,height:r}=n;return t==="top"?i+=e:t==="bottom"?i-=r+e:i-=r/2,i}function Ga(n,t,e,i){const{caretSize:r,caretPadding:o,cornerRadius:s}=n,{xAlign:a,yAlign:c}=e,l=r+o,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:d}=Yt(s);let p=Mb(t,a);const g=kb(t,c,l);return c==="center"?a==="left"?p+=l:a==="right"&&(p-=l):a==="left"?p-=Math.max(u,h)+r:a==="right"&&(p+=Math.max(f,d)+r),{x:nt(p,0,i.width-t.width),y:nt(g,0,i.height-t.height)}}function He(n,t,e){const i=it(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Za(n){return mt([],Mt(n))}function Rb(n,t,e){return zt(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Ja(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}class oo extends yt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&e.options.animation&&i.animations,o=new Qc(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Rb(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,r=i.beforeTitle.apply(this,[t]),o=i.title.apply(this,[t]),s=i.afterTitle.apply(this,[t]);let a=[];return a=mt(a,Mt(r)),a=mt(a,Mt(o)),a=mt(a,Mt(s)),a}getBeforeBody(t,e){return Za(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,r=[];return F(t,o=>{const s={before:[],lines:[],after:[]},a=Ja(i,o);mt(s.before,Mt(a.beforeLabel.call(this,o))),mt(s.lines,a.label.call(this,o)),mt(s.after,Mt(a.afterLabel.call(this,o))),r.push(s)}),r}getAfterBody(t,e){return Za(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,r=i.beforeFooter.apply(this,[t]),o=i.footer.apply(this,[t]),s=i.afterFooter.apply(this,[t]);let a=[];return a=mt(a,Mt(r)),a=mt(a,Mt(o)),a=mt(a,Mt(s)),a}_createItems(t){const e=this._active,i=this.chart.data,r=[],o=[],s=[];let a=[],c,l;for(c=0,l=e.length;c<l;++c)a.push(wb(this.chart,e[c]));return t.filter&&(a=a.filter((u,f,h)=>t.filter(u,f,h,i))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,i))),F(a,u=>{const f=Ja(t.callbacks,u);r.push(f.labelColor.call(this,u)),o.push(f.labelPointStyle.call(this,u)),s.push(f.labelTextColor.call(this,u))}),this.labelColors=r,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),r=this._active;let o,s=[];if(!r.length)this.opacity!==0&&(o={opacity:0});else{const a=be[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 c=this._size=Ka(this,i),l=Object.assign({},a,c),u=Qa(this.chart,i,l),f=Ga(i,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:f.x,y:f.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,r){const o=this.getCaretPosition(t,i,r);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:r,yAlign:o}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:c,topRight:l,bottomLeft:u,bottomRight:f}=Yt(a),{x:h,y:d}=t,{width:p,height:g}=e;let y,m,b,v,x,_;return o==="center"?(x=d+g/2,r==="left"?(y=h,m=y-s,v=x+s,_=x-s):(y=h+p,m=y+s,v=x-s,_=x+s),b=y):(r==="left"?m=h+Math.max(c,u)+s:r==="right"?m=h+p-Math.max(l,f)-s:m=this.caretX,o==="top"?(v=d,x=v-s,y=m-s,b=m+s):(v=d+g,x=v+s,y=m+s,b=m-s),_=v),{x1:y,x2:m,x3:b,y1:v,y2:x,y3:_}}drawTitle(t,e,i){const r=this.title,o=r.length;let s,a,c;if(o){const l=ee(i.rtl,this.x,this.width);for(t.x=He(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=G(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,c=0;c<o;++c)e.fillText(r[c],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,c+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,r,o){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:c,boxWidth:l,boxPadding:u}=o,f=G(o.bodyFont),h=He(this,"left",o),d=r.x(h),p=c<f.lineHeight?(f.lineHeight-c)/2:0,g=e.y+p;if(o.usePointStyle){const y={radius:Math.min(l,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=r.leftForLtr(d,l)+l/2,b=g+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Jr(t,y,m,b),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Jr(t,y,m,b)}else{t.lineWidth=A(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 y=r.leftForLtr(d,l-u),m=r.leftForLtr(r.xPlus(d,1),l-u-2),b=Yt(s.borderRadius);Object.values(b).some(v=>v!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,we(t,{x:y,y:g,w:l,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),we(t,{x:m,y:g+1,w:l-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(y,g,l,c),t.strokeRect(y,g,l,c),t.fillStyle=s.backgroundColor,t.fillRect(m,g+1,l-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:r}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:c,boxWidth:l,boxPadding:u}=i,f=G(i.bodyFont);let h=f.lineHeight,d=0;const p=ee(i.rtl,this.x,this.width),g=function(S){e.fillText(S,p.x(t.x+d),t.y+h/2),t.y+=h+o},y=p.textAlign(s);let m,b,v,x,_,w,O;for(e.textAlign=s,e.textBaseline="middle",e.font=f.string,t.x=He(this,y,i),e.fillStyle=i.bodyColor,F(this.beforeBody,g),d=a&&y!=="right"?s==="center"?l/2+u:l+2+u:0,x=0,w=r.length;x<w;++x){for(m=r[x],b=this.labelTextColors[x],e.fillStyle=b,F(m.before,g),v=m.lines,a&&v.length&&(this._drawColorBox(e,t,x,p,i),h=Math.max(f.lineHeight,c)),_=0,O=v.length;_<O;++_)g(v[_]),h=f.lineHeight;F(m.after,g)}d=0,h=f.lineHeight,F(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const r=this.footer,o=r.length;let s,a;if(o){const c=ee(i.rtl,this.x,this.width);for(t.x=He(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=c.textAlign(i.footerAlign),e.textBaseline="middle",s=G(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<o;++a)e.fillText(r[a],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,r){const{xAlign:o,yAlign:s}=this,{x:a,y:c}=t,{width:l,height:u}=i,{topLeft:f,topRight:h,bottomLeft:d,bottomRight:p}=Yt(r.cornerRadius);e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.beginPath(),e.moveTo(a+f,c),s==="top"&&this.drawCaret(t,e,i,r),e.lineTo(a+l-h,c),e.quadraticCurveTo(a+l,c,a+l,c+h),s==="center"&&o==="right"&&this.drawCaret(t,e,i,r),e.lineTo(a+l,c+u-p),e.quadraticCurveTo(a+l,c+u,a+l-p,c+u),s==="bottom"&&this.drawCaret(t,e,i,r),e.lineTo(a+d,c+u),e.quadraticCurveTo(a,c+u,a,c+u-d),s==="center"&&o==="left"&&this.drawCaret(t,e,i,r),e.lineTo(a,c+f),e.quadraticCurveTo(a,c,a+f,c),e.closePath(),e.fill(),r.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,r=i&&i.x,o=i&&i.y;if(r||o){const s=be[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=Ka(this,t),c=Object.assign({},s,this._size),l=Qa(e,t,c),u=Ga(t,c,l,e);(r._to!==u.x||o._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const r={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=it(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,r,e),qc(t,e.textDirection),o.y+=s.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Xc(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,r=t.map(({datasetIndex:a,index:c})=>{const l=this.chart.getDatasetMeta(a);if(!l)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:l.data[c],index:c}}),o=!oi(i,r),s=this._positionChanged(r,e);(o||s)&&(this._active=r,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,o=this._active||[],s=this._getActiveElements(t,o,e,i),a=this._positionChanged(s,t),c=e||!oi(s,o)||a;return c&&(this._active=s,(r.enabled||r.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,r){const o=this.options;if(t.type==="mouseout")return[];if(!r)return e;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:r,options:o}=this,s=be[o.position].call(this,t,e);return s!==!1&&(i!==s.x||r!==s.y)}}oo.positioners=be;var s_={id:"tooltip",_element:oo,positioners:be,afterInit(n,t,e){e&&(n.tooltip=new oo({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",e)===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:{beforeTitle:Pt,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.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 e[t.dataIndex]}return""},afterTitle:Pt,beforeBody:Pt,beforeLabel:Pt,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return L(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Pt,afterBody:Pt,beforeFooter:Pt,footer:Pt,afterFooter:Pt}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Tb=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Db(n,t,e,i){const r=n.indexOf(t);if(r===-1)return Tb(n,t,e,i);const o=n.lastIndexOf(t);return r!==o?e:r}const Cb=(n,t)=>n===null?null:nt(Math.round(n),0,t);class so extends Kt{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:r,label:o}of e)i[r]===o&&i.splice(r,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(L(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Db(i,t,k(e,t),this._addedLabels),Cb(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,r=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=t;s<=e;s++)r.push({value:s});return r}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}so.id="category";so.defaults={ticks:{callback:so.prototype.getLabelForValue}};function Eb(n,t){const e=[],{bounds:r,step:o,min:s,max:a,precision:c,count:l,maxTicks:u,maxDigits:f,includeBounds:h}=n,d=o||1,p=u-1,{min:g,max:y}=t,m=!L(s),b=!L(a),v=!L(l),x=(y-g)/(f+1);let _=na((y-g)/p/d)*d,w,O,S,P;if(_<1e-14&&!m&&!b)return[{value:g},{value:y}];P=Math.ceil(y/_)-Math.floor(g/_),P>p&&(_=na(P*_/p/d)*d),L(c)||(w=Math.pow(10,c),_=Math.ceil(_*w)/w),r==="ticks"?(O=Math.floor(g/_)*_,S=Math.ceil(y/_)*_):(O=g,S=y),m&&b&&o&&Xp((a-s)/o,_/1e3)?(P=Math.round(Math.min((a-s)/_,u)),_=(a-s)/P,O=s,S=a):v?(O=m?s:O,S=b?a:S,P=l-1,_=(S-O)/P):(P=(S-O)/_,ge(P,Math.round(P),_/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(ia(_),ia(O));w=Math.pow(10,L(c)?D:c),O=Math.round(O*w)/w,S=Math.round(S*w)/w;let C=0;for(m&&(h&&O!==s?(e.push({value:s}),O<s&&C++,ge(Math.round((O+C*_)*w)/w,s,tc(s,x,n))&&C++):O<s&&C++);C<P;++C)e.push({value:Math.round((O+C*_)*w)/w});return b&&h&&S!==a?e.length&&ge(e[e.length-1].value,a,tc(a,x,n))?e[e.length-1].value=a:e.push({value:a}):(!b||S===a)&&e.push({value:S}),e}function tc(n,t,{horizontal:e,minRotation:i}){const r=pt(i),o=(e?Math.sin(r):Math.cos(r))||.001,s=.75*t*(""+n).length;return Math.min(t/o,s)}class di extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return L(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:r,max:o}=this;const s=c=>r=e?r:c,a=c=>o=i?o:c;if(t){const c=wt(r),l=wt(o);c<0&&l<0?a(0):c>0&&l>0&&s(0)}if(r===o){let c=1;(o>=Number.MAX_SAFE_INTEGER||r<=Number.MIN_SAFE_INTEGER)&&(c=Math.abs(o*.05)),a(o+c),t||s(r-c)}this.min=r,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,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(),e=e||11),e&&(r=Math.min(e,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=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:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,s=Eb(r,o);return t.bounds==="ticks"&&Sc(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 e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const r=(i-e)/Math.max(t.length-1,1)/2;e-=r,i+=r}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Me(t,this.chart.options.locale,this.options.ticks.format)}}class ml extends di{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=tt(t)?t:0,this.max=tt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=pt(this.options.ticks.minRotation),r=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.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}}ml.id="linear";ml.defaults={ticks:{callback:_i.formatters.numeric}};function ec(n){return n/Math.pow(10,Math.floor(ut(n)))===1}function $b(n,t){const e=Math.floor(ut(t.max)),i=Math.ceil(t.max/Math.pow(10,e)),r=[];let o=lt(n.min,Math.pow(10,Math.floor(ut(t.min)))),s=Math.floor(ut(o)),a=Math.floor(o/Math.pow(10,s)),c=s<0?Math.pow(10,Math.abs(s)):1;do r.push({value:o,major:ec(o)}),++a,a===10&&(a=1,++s,c=s>=0?1:c),o=Math.round(a*Math.pow(10,s)*c)/c;while(s<e||s===e&&a<i);const l=lt(n.max,o);return r.push({value:l,major:ec(o)}),r}class bl extends Kt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=di.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return tt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=tt(t)?Math.max(0,t):null,this.max=tt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,r=this.max;const o=c=>i=t?i:c,s=c=>r=e?r:c,a=(c,l)=>Math.pow(10,Math.floor(ut(c))+l);i===r&&(i<=0?(o(1),s(10)):(o(a(i,-1)),s(a(r,1)))),i<=0&&o(a(r,-1)),r<=0&&s(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&o(a(i,-1)),this.min=i,this.max=r}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=$b(e,this);return t.bounds==="ticks"&&Sc(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":Me(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ut(t),this._valueRange=ut(this.max)-ut(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ut(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}bl.id="logarithmic";bl.defaults={ticks:{callback:_i.formatters.logarithmic,major:{enabled:!0}}};function ao(n){const t=n.ticks;if(t.display&&n.display){const e=it(t.backdropPadding);return k(t.font&&t.font.size,E.font.size)+e.height}return 0}function Ab(n,t,e){return e=W(e)?e:[e],{w:Mg(n,t.string,e),h:e.length*t.lineHeight}}function nc(n,t,e,i,r){return n===i||n===r?{start:t-e/2,end:t+e/2}:n<i||n>r?{start:t-e,end:t}:{start:t,end:t+e}}function Ib(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],r=[],o=n._pointLabels.length,s=n.options.pointLabels,a=s.centerPointLabels?Y/o:0;for(let c=0;c<o;c++){const l=s.setContext(n.getPointLabelContext(c));r[c]=l.padding;const u=n.getPointPosition(c,n.drawingArea+r[c],a),f=G(l.font),h=Ab(n.ctx,f,n._pointLabels[c]);i[c]=h;const d=dt(n.getIndexAngle(c)+a),p=Math.round(go(d)),g=nc(p,u.x,h.w,0,180),y=nc(p,u.y,h.h,90,270);Lb(e,t,d,g,y)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Fb(n,i,r)}function Lb(n,t,e,i,r){const o=Math.abs(Math.sin(e)),s=Math.abs(Math.cos(e));let a=0,c=0;i.start<t.l?(a=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+a)),r.start<t.t?(c=(t.t-r.start)/s,n.t=Math.min(n.t,t.t-c)):r.end>t.b&&(c=(r.end-t.b)/s,n.b=Math.max(n.b,t.b+c))}function Fb(n,t,e){const i=[],r=n._pointLabels.length,o=n.options,s=ao(o)/2,a=n.drawingArea,c=o.pointLabels.centerPointLabels?Y/r:0;for(let l=0;l<r;l++){const u=n.getPointPosition(l,a+s+e[l],c),f=Math.round(go(dt(u.angle+q))),h=t[l],d=Nb(u.y,h.h,f),p=Bb(f),g=zb(u.x,h.w,p);i.push({x:u.x,y:d,textAlign:p,left:g,top:d,right:g+h.w,bottom:d+h.h})}return i}function Bb(n){return n===0||n===180?"center":n<180?"left":"right"}function zb(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Nb(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Hb(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let r=t-1;r>=0;r--){const o=i.setContext(n.getPointLabelContext(r)),s=G(o.font),{x:a,y:c,textAlign:l,left:u,top:f,right:h,bottom:d}=n._pointLabelItems[r],{backdropColor:p}=o;if(!L(p)){const g=Yt(o.borderRadius),y=it(o.backdropPadding);e.fillStyle=p;const m=u-y.left,b=f-y.top,v=h-u+y.width,x=d-f+y.height;Object.values(g).some(_=>_!==0)?(e.beginPath(),we(e,{x:m,y:b,w:v,h:x,radius:g}),e.fill()):e.fillRect(m,b,v,x)}Xt(e,n._pointLabels[r],a,c+s.lineHeight/2,s,{color:o.color,textAlign:l,textBaseline:"middle"})}}function _l(n,t,e,i){const{ctx:r}=n;if(e)r.arc(n.xCenter,n.yCenter,t,0,B);else{let o=n.getPointPosition(0,t);r.moveTo(o.x,o.y);for(let s=1;s<i;s++)o=n.getPointPosition(s,t),r.lineTo(o.x,o.y)}}function Wb(n,t,e,i){const r=n.ctx,o=t.circular,{color:s,lineWidth:a}=t;!o&&!i||!s||!a||e<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(t.borderDash),r.lineDashOffset=t.borderDashOffset,r.beginPath(),_l(n,e,o,i),r.closePath(),r.stroke(),r.restore())}function jb(n,t,e){return zt(n,{label:e,index:t,type:"pointLabel"})}class wi extends di{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=it(ao(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=tt(t)&&!isNaN(t)?t:0,this.max=tt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ao(this.options))}generateTickLabels(t){di.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const r=N(this.options.pointLabels.callback,[e,i],this);return r||r===0?r:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ib(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,r){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,r))}getIndexAngle(t){const e=B/(this._pointLabels.length||1),i=this.options.startAngle||0;return dt(t*e+pt(i))}getDistanceFromCenterForValue(t){if(L(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(L(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return jb(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const r=this.getIndexAngle(t)-q+i;return{x:Math.cos(r)*e+this.xCenter,y:Math.sin(r)*e+this.yCenter,angle:r}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:r,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:r,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),_l(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:r}=e,o=this._pointLabels.length;let s,a,c;if(e.pointLabels.display&&Hb(this,o),r.display&&this.ticks.forEach((l,u)=>{if(u!==0){a=this.getDistanceFromCenterForValue(l.value);const f=r.setContext(this.getContext(u-1));Wb(this,f,a,o)}}),i.display){for(t.save(),s=o-1;s>=0;s--){const l=i.setContext(this.getPointLabelContext(s)),{color:u,lineWidth:f}=l;!f||!u||(t.lineWidth=f,t.strokeStyle=u,t.setLineDash(l.borderDash),t.lineDashOffset=l.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),c=this.getPointPosition(s,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,c)=>{if(c===0&&!e.reverse)return;const l=i.setContext(this.getContext(c)),u=G(l.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),l.showLabelBackdrop){t.font=u.string,s=t.measureText(a.label).width,t.fillStyle=l.backdropColor;const f=it(l.backdropPadding);t.fillRect(-s/2-f.left,-o-u.size/2-f.top,s+f.width,u.size+f.height)}Xt(t,a.label,0,-o,u,{color:l.color})}),t.restore()}drawTitle(){}}wi.id="radialLinear";wi.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(n){return n},padding:5,centerPointLabels:!1}};wi.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};wi.descriptors={angleLines:{_fallback:"grid"}};const Oi={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}},ot=Object.keys(Oi);function Vb(n,t){return n-t}function ic(n,t){if(L(t))return null;const e=n._adapter,{parser:i,round:r,isoWeekday:o}=n._parseOpts;let s=t;return typeof i=="function"&&(s=i(s)),tt(s)||(s=typeof i=="string"?e.parse(s,i):e.parse(s)),s===null?null:(r&&(s=r==="week"&&(ne(o)||o===!0)?e.startOf(s,"isoWeek",o):e.startOf(s,r)),+s)}function rc(n,t,e,i){const r=ot.length;for(let o=ot.indexOf(n);o<r-1;++o){const s=Oi[ot[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((e-t)/(a*s.size))<=i)return ot[o]}return ot[r-1]}function Yb(n,t,e,i,r){for(let o=ot.length-1;o>=ot.indexOf(e);o--){const s=ot[o];if(Oi[s].common&&n._adapter.diff(r,i,s)>=t-1)return s}return ot[e?ot.indexOf(e):0]}function Ub(n){for(let t=ot.indexOf(n)+1,e=ot.length;t<e;++t)if(Oi[ot[t]].common)return ot[t]}function oc(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:r}=yo(e,t),o=e[i]>=t?e[i]:e[r];n[o]=!0}}function qb(n,t,e,i){const r=n._adapter,o=+r.startOf(t[0].value,i),s=t[t.length-1].value;let a,c;for(a=o;a<=s;a=+r.add(a,1,i))c=e[a],c>=0&&(t[c].major=!0);return t}function sc(n,t,e){const i=[],r={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],r[a]=s,i.push({value:a,major:!1});return o===0||!e?i:qb(n,i,r,e)}class Pi extends Kt{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),r=this._adapter=new el._date(t.adapters.date);r.init(e),pe(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ic(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:r,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function c(l){!s&&!isNaN(l.min)&&(r=Math.min(r,l.min)),!a&&!isNaN(l.max)&&(o=Math.max(o,l.max))}(!s||!a)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),r=tt(r)&&!isNaN(r)?r:+e.startOf(Date.now(),i),o=tt(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(r,o-1),this.max=Math.max(r+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,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 o=this.min,s=this.max,a=Zp(r,o,s);return this._unit=e.unit||(i.autoSkip?rc(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Yb(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ub(this._unit),this.initOffsets(r),t.reverse&&a.reverse(),sc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e=0,i=0,r,o;this.options.offset&&t.length&&(r=this.getDecimalForValue(t[0]),t.length===1?e=1-r:e=(this.getDecimalForValue(t[1])-r)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;e=nt(e,0,s),i=nt(i,0,s),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,r=this.options,o=r.time,s=o.unit||rc(o.minUnit,e,i,this._getLabelCapacity(e)),a=k(o.stepSize,1),c=s==="week"?o.isoWeekday:!1,l=ne(c)||c===!0,u={};let f=e,h,d;if(l&&(f=+t.startOf(f,"isoWeek",c)),f=+t.startOf(f,l?"day":s),t.diff(i,e,s)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+s);const p=r.ticks.source==="data"&&this.getDataTimestamps();for(h=f,d=0;h<i;h=+t.add(h,a,s),d++)oc(u,h,p);return(h===i||r.bounds==="ticks"||d===1)&&oc(u,h,p),Object.keys(u).sort((g,y)=>g-y).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,r){const o=this.options,s=o.time.displayFormats,a=this._unit,c=this._majorUnit,l=a&&s[a],u=c&&s[c],f=i[e],h=c&&u&&f&&f.major,d=this._adapter.format(t,r||(h?u:l)),p=o.ticks.callback;return p?N(p,[d,e,i],this):d}generateTickLabels(t){let e,i,r;for(e=0,i=t.length;e<i;++e)r=t[e],r.label=this._tickFormatFunction(r.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,r=pt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(r),s=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*s,h:i*s+a*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,r=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,sc(this,[t],this._majorUnit),r),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,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(e=0,i=r.length;e<i;++e)t=t.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const r=this.getLabels();for(e=0,i=r.length;e<i;++e)t.push(ic(this,r[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Rc(t.sort(Vb))}}Pi.id="time";Pi.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function We(n,t,e){let i=0,r=n.length-1,o,s,a,c;e?(t>=n[i].pos&&t<=n[r].pos&&({lo:i,hi:r}=Vt(n,"pos",t)),{pos:o,time:a}=n[i],{pos:s,time:c}=n[r]):(t>=n[i].time&&t<=n[r].time&&({lo:i,hi:r}=Vt(n,"time",t)),{time:o,pos:a}=n[i],{time:s,pos:c}=n[r]);const l=s-o;return l?a+(c-a)*(t-o)/l:a}class vl extends Pi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=We(e,this.min),this._tableRange=We(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,r=[],o=[];let s,a,c,l,u;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&r.push(l);if(r.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=r.length;s<a;++s)u=r[s+1],c=r[s-1],l=r[s],Math.round((u+c)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(We(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return We(this._table,i*this._tableRange+this._minPos,!0)}}vl.id="timeseries";vl.defaults=Pi.defaults;const xl="label";function ac(n,t){typeof n=="function"?n(t):n&&(n.current=t)}function Xb(n,t){Object.assign(n.options,t)}function wl(n,t){n.labels=t}function Ol(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xl;const i=[];n.datasets=t.map(r=>{const o=n.datasets.find(s=>s[e]===r[e]);return!o||!r.data||i.includes(o)?{...r}:(i.push(o),Object.assign(o,r),o)})}function Kb(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xl;const e={labels:[],datasets:[]};return wl(e,n.labels),Ol(e,n.datasets,t),e}function Qb(n,t){let{height:e=150,width:i=300,redraw:r=!1,datasetIdKey:o,type:s,data:a,options:c,plugins:l=[],fallbackContent:u,updateMode:f,...h}=n;const d=bt.useRef(null),p=bt.useRef(),g=()=>{d.current&&(p.current=new vi(d.current,{type:s,data:Kb(a,o),options:c&&{...c},plugins:l}),ac(t,p.current))},y=()=>{ac(t,null),p.current&&(p.current.destroy(),p.current=null)};return bt.useEffect(()=>{!r&&p.current&&c&&Xb(p.current,c)},[r,c]),bt.useEffect(()=>{!r&&p.current&&wl(p.current.config.data,a.labels)},[r,a.labels]),bt.useEffect(()=>{!r&&p.current&&a.datasets&&Ol(p.current.config.data,a.datasets,o)},[r,a.datasets]),bt.useEffect(()=>{p.current&&(r?(y(),setTimeout(g)):p.current.update(f))},[r,c,a.labels,a.datasets,f]),bt.useEffect(()=>{p.current&&(y(),setTimeout(g))},[s]),bt.useEffect(()=>(g(),()=>y()),[]),hc.createElement("canvas",Object.assign({ref:d,role:"img",height:e,width:i},h),u)}const Gb=bt.forwardRef(Qb);function Zb(n,t){return vi.register(t),bt.forwardRef((e,i)=>hc.createElement(Gb,Object.assign({},e,{ref:i,type:n})))}const a_=Zb("line",bi);/*!
|
|
20
20
|
* chartjs-adapter-date-fns v3.0.0
|
|
21
21
|
* https://www.chartjs.org
|
|
22
22
|
* (c) 2022 chartjs-adapter-date-fns Contributors
|
|
23
23
|
* Released under the MIT license
|
|
24
|
-
*/const Jb={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"};el._date.override({_id:"date-fns",formats:function(){return Jb},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n
|
|
24
|
+
*/const Jb={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"};el._date.override({_id:"date-fns",formats:function(){return Jb},parse:function(n,t){if(n===null||typeof n>"u")return null;const e=typeof n;return e==="number"||n instanceof Date?n=$(n):e==="string"&&(typeof t=="string"?n=Ap(n,t,new Date,this.options):n=Al(n,this.options)),Il(n)?n.getTime():null},format:function(n,t){return Ll(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return pi(n,t);case"second":return jl(n,t);case"minute":return Hl(n,t);case"hour":return zl(n,t);case"day":return dc(n,t);case"week":return Vl(n,t);case"month":return co(n,t);case"quarter":return Wl(n,t);case"year":return Yl(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return yi(n,t);case"second":return Jl(n,t);case"minute":return Ql(n,t);case"hour":return Kl(n,t);case"day":return uc(n,t);case"week":return tu(n,t);case"month":return yc(n,t);case"quarter":return Zl(n,t);case"year":return eu(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return Fp(n);case"minute":return nu(n);case"hour":return Lp(n);case"day":return Fl(n);case"week":return Ho(n);case"isoWeek":return Ho(n,{weekStartsOn:+e});case"month":return ru(n);case"quarter":return iu(n);case"year":return su(n);default:return n}},endOf:function(n,t){switch(t){case"second":return fu(n);case"minute":return lu(n);case"hour":return au(n);case"day":return pc(n);case"week":return cu(n);case"month":return gc(n);case"quarter":return uu(n);case"year":return ou(n);default:return n}}});export{vi as C,a_ as L,Ao as P,Pi as T,so as a,ml as b,xi as c,E as d,s_ as e,o_ as f,r_ as p};
|