@cubejs-backend/server-core 1.7.39 → 1.7.41
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/package.json +13 -13
- package/playground/assets/index-C6co9ASN.js +2138 -0
- package/playground/index.html +2 -10
- package/playground/vizard/assets/abap-CRCWOmpq.js +1 -0
- package/playground/vizard/assets/apex-DnsZk_dE.js +1 -0
- package/playground/vizard/assets/azcli-1IWB1ccx.js +1 -0
- package/playground/vizard/assets/bat-DPkNLes8.js +1 -0
- package/playground/vizard/assets/{bicep-DJPqIr_M.js → bicep-Corcdgou.js} +1 -6
- package/playground/vizard/assets/cameligo-CGrWLZr3.js +1 -0
- package/playground/vizard/assets/clients-CxGQtFsu.js +1 -0
- package/playground/vizard/assets/clojure-D9WOWImG.js +1 -0
- package/playground/vizard/assets/coffee-B7EJu28W.js +1 -0
- package/playground/vizard/assets/cpp-BaF-TIV3.js +1 -0
- package/playground/vizard/assets/csharp-BoL64M5l.js +1 -0
- package/playground/vizard/assets/csp-C46ZqvIl.js +1 -0
- package/playground/vizard/assets/{css-CkCHETKw.js → css-DQU6DXDx.js} +1 -6
- package/playground/vizard/assets/{css.worker-CJ81phlL.js → css.worker-C3oFsChe.js} +23 -28
- package/playground/vizard/assets/cssMode-DtHNIdrr.js +4 -0
- package/playground/vizard/assets/cypher-D84EuPTj.js +1 -0
- package/playground/vizard/assets/dart-D8lhlL1r.js +1 -0
- package/playground/vizard/assets/dockerfile-DLk6rpji.js +1 -0
- package/playground/vizard/assets/ecl-BO6FnfXk.js +1 -0
- package/playground/vizard/assets/editor.worker-CHAQ398o.js +11 -0
- package/playground/vizard/assets/elixir-BRjLKONM.js +1 -0
- package/playground/vizard/assets/flow9-Cac8vKd7.js +1 -0
- package/playground/vizard/assets/{freemarker2-BjRjUUgK.js → freemarker2-D3hRPg66.js} +3 -8
- package/playground/vizard/assets/fsharp-fd1GTHhf.js +1 -0
- package/playground/vizard/assets/go-O9LJTZXk.js +1 -0
- package/playground/vizard/assets/graphql-LQdxqEYJ.js +1 -0
- package/playground/vizard/assets/handlebars-CmzyTLHM.js +1 -0
- package/playground/vizard/assets/hcl-DxDQ3s82.js +1 -0
- package/playground/vizard/assets/html-BQlDvTLO.js +1 -0
- package/playground/vizard/assets/htmlMode-B5vyN_yh.js +4 -0
- package/playground/vizard/assets/icons-CwVYGRlZ.js +57 -0
- package/playground/vizard/assets/{index-B0u8YO_h.css → index-9LlxgSLj.css} +1 -1
- package/playground/vizard/assets/index-DONzDWNC.js +7 -0
- package/playground/vizard/assets/ini-BvajGCUy.js +1 -0
- package/playground/vizard/assets/java-SYsfObOQ.js +1 -0
- package/playground/vizard/assets/javascript-Cqq1UmLD.js +1 -0
- package/playground/vizard/assets/json.worker-CH1C3E3z.js +37 -0
- package/playground/vizard/assets/jsonMode-CZ-xTnh0.js +6 -0
- package/playground/vizard/assets/julia-DQXNmw_w.js +1 -0
- package/playground/vizard/assets/kotlin-qQ0MG-9I.js +1 -0
- package/playground/vizard/assets/less-GGFNNJHn.js +2 -0
- package/playground/vizard/assets/lexon-Canl7DCW.js +1 -0
- package/playground/vizard/assets/liquid-BwaniY5x.js +1 -0
- package/playground/vizard/assets/lua-D28Ae8-K.js +1 -0
- package/playground/vizard/assets/m3-DPitgjJI.js +1 -0
- package/playground/vizard/assets/markdown-B811l8j2.js +1 -0
- package/playground/vizard/assets/mdx-FYEkmf7B.js +1 -0
- package/playground/vizard/assets/mips-CdjsipkG.js +1 -0
- package/playground/vizard/assets/{monaco-QpZRkR_O.js → monaco-CYdCgY0W.js} +151 -181
- package/playground/vizard/assets/msdax-CYqgjx_P.js +1 -0
- package/playground/vizard/assets/mysql-BHd6q0vd.js +1 -0
- package/playground/vizard/assets/objective-c-B1aVtJYH.js +1 -0
- package/playground/vizard/assets/other-DNLijWhD.js +2 -0
- package/playground/vizard/assets/pascal-BhNW15KB.js +1 -0
- package/playground/vizard/assets/pascaligo-5jv8CcQD.js +1 -0
- package/playground/vizard/assets/perl-DlYyT36c.js +1 -0
- package/playground/vizard/assets/pgsql-Dy0bjov7.js +1 -0
- package/playground/vizard/assets/php-120yhfDK.js +1 -0
- package/playground/vizard/assets/pla-CjnFlu4u.js +1 -0
- package/playground/vizard/assets/postiats-CQpG440k.js +1 -0
- package/playground/vizard/assets/powerquery-DdJtto1Z.js +1 -0
- package/playground/vizard/assets/powershell-Bu_VLpJB.js +1 -0
- package/playground/vizard/assets/{protobuf-Dzs34GPr.js → protobuf-IBS6jZEB.js} +1 -6
- package/playground/vizard/assets/pug-kFxLfcjb.js +1 -0
- package/playground/vizard/assets/python-CjR2h7KU.js +1 -0
- package/playground/vizard/assets/qsharp-gaqVKiJ_.js +1 -0
- package/playground/vizard/assets/r-BIFz-_sK.js +1 -0
- package/playground/vizard/assets/razor-D4Y0dbDk.js +1 -0
- package/playground/vizard/assets/react-l0sNRNKZ.js +1 -0
- package/playground/vizard/assets/redis-CHOsPHWR.js +1 -0
- package/playground/vizard/assets/redshift-CBifECDb.js +1 -0
- package/playground/vizard/assets/restructuredtext-CghPJEOS.js +1 -0
- package/playground/vizard/assets/ruby-CYWGW-b1.js +1 -0
- package/playground/vizard/assets/rust-DMDD0SHb.js +1 -0
- package/playground/vizard/assets/sb-BYAiYHFx.js +1 -0
- package/playground/vizard/assets/scala-Bqvq8jcR.js +1 -0
- package/playground/vizard/assets/scheme-Dhb-2j9p.js +1 -0
- package/playground/vizard/assets/{scss-Rf_ppwBg.js → scss-CTwUZ5N7.js} +1 -6
- package/playground/vizard/assets/shell-CsDZo4DB.js +1 -0
- package/playground/vizard/assets/solidity-CME5AdoB.js +1 -0
- package/playground/vizard/assets/sophia-RYC1BQQz.js +1 -0
- package/playground/vizard/assets/sparql-KEyrF7De.js +1 -0
- package/playground/vizard/assets/sql-BdTr02Mf.js +1 -0
- package/playground/vizard/assets/st-C7iG7M4S.js +1 -0
- package/playground/vizard/assets/swift-D7IUmUK8.js +1 -0
- package/playground/vizard/assets/systemverilog-DgMryOEJ.js +1 -0
- package/playground/vizard/assets/tcl-PloMZuKG.js +1 -0
- package/playground/vizard/assets/{ts.worker-VACfgpbU.js → ts.worker-CqkOEKjO.js} +75 -93
- package/playground/vizard/assets/{tsMode-DeCT_7_p.js → tsMode-Cvjisfey.js} +3 -8
- package/playground/vizard/assets/twig-BfRIq3la.js +1 -0
- package/playground/vizard/assets/typescript-DwgdF-Pj.js +1 -0
- package/playground/vizard/assets/uikit-Bx93IdUi.js +446 -0
- package/playground/vizard/assets/vb-BwAE3J76.js +1 -0
- package/playground/vizard/assets/{wgsl-DlxrJ_uh.js → wgsl-B_1kOXbF.js} +1 -6
- package/playground/vizard/assets/xml-xRWrYvkC.js +1 -0
- package/playground/vizard/assets/yaml-W6T5Qjhq.js +1 -0
- package/playground/vizard/download/react-typescript-antd-table.zip +0 -0
- package/playground/vizard/download/react-typescript-chartjs-area+bar+doughnut+line+pie.zip +0 -0
- package/playground/vizard/index.html +7 -8
- package/playground/vizard/preview/react-typescript-antd-table/assets/index-ChyDO9dl.js +313 -0
- package/playground/vizard/preview/react-typescript-antd-table/index.html +2 -2
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-D9jKufPU.js +12 -0
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/index.html +2 -2
- package/playground/assets/index-BLNumV43.js +0 -2138
- package/playground/vizard/assets/abap-Bs-KDgo-.js +0 -6
- package/playground/vizard/assets/apex-BB8ijgrA.js +0 -6
- package/playground/vizard/assets/azcli-CM0y7Ame.js +0 -6
- package/playground/vizard/assets/bat-Bfxf8Mzl.js +0 -6
- package/playground/vizard/assets/cameligo-PnszTm2c.js +0 -6
- package/playground/vizard/assets/clients-CzhsrDwG.js +0 -1
- package/playground/vizard/assets/clojure-B3cFVYI-.js +0 -6
- package/playground/vizard/assets/coffee-D8tSzcLH.js +0 -6
- package/playground/vizard/assets/cpp-CP-cATHl.js +0 -6
- package/playground/vizard/assets/csharp-Dfj4WFqy.js +0 -6
- package/playground/vizard/assets/csp-D9HxVpWn.js +0 -6
- package/playground/vizard/assets/cssMode-EIMeoZ0D.js +0 -9
- package/playground/vizard/assets/cypher-B50w5pq9.js +0 -6
- package/playground/vizard/assets/dart-DvROnYA_.js +0 -6
- package/playground/vizard/assets/dockerfile-C4f37Dvd.js +0 -6
- package/playground/vizard/assets/ecl-DW46Dzft.js +0 -6
- package/playground/vizard/assets/editor.worker-DnhKYsI_.js +0 -11
- package/playground/vizard/assets/elixir-BIa5JtGe.js +0 -6
- package/playground/vizard/assets/flow9-ByI4Scwv.js +0 -6
- package/playground/vizard/assets/fsharp-Cgf6u04w.js +0 -6
- package/playground/vizard/assets/go-CJfxPkej.js +0 -6
- package/playground/vizard/assets/graphql-CGlhcY2-.js +0 -6
- package/playground/vizard/assets/handlebars-Cp-Otq7z.js +0 -6
- package/playground/vizard/assets/hcl-CTI7WNlW.js +0 -6
- package/playground/vizard/assets/html-9X_QuFNV.js +0 -6
- package/playground/vizard/assets/htmlMode-BVz_CiVZ.js +0 -9
- package/playground/vizard/assets/icons-D8fX1_2-.js +0 -61
- package/playground/vizard/assets/index-Cn46wccg.js +0 -4723
- package/playground/vizard/assets/ini-qJXHXiTY.js +0 -6
- package/playground/vizard/assets/java-Dnrl9822.js +0 -6
- package/playground/vizard/assets/javascript-BrlNfx48.js +0 -6
- package/playground/vizard/assets/json.worker-DY5adJme.js +0 -42
- package/playground/vizard/assets/jsonMode-CAwYRRV9.js +0 -11
- package/playground/vizard/assets/julia-pqMLycLG.js +0 -6
- package/playground/vizard/assets/kotlin-DLX697jv.js +0 -6
- package/playground/vizard/assets/less-2ExdFhZM.js +0 -7
- package/playground/vizard/assets/lexon-ABKfEwhw.js +0 -6
- package/playground/vizard/assets/liquid-B5u8u5ff.js +0 -6
- package/playground/vizard/assets/lua-CI0blgFs.js +0 -6
- package/playground/vizard/assets/m3-yVPEHiu4.js +0 -6
- package/playground/vizard/assets/markdown-CjOKAnMy.js +0 -6
- package/playground/vizard/assets/mdx-BGfI80Xw.js +0 -6
- package/playground/vizard/assets/mips-B7KWClFm.js +0 -6
- package/playground/vizard/assets/msdax-N_40gjXO.js +0 -6
- package/playground/vizard/assets/mysql-CzgTwwi2.js +0 -6
- package/playground/vizard/assets/objective-c-CwAIQX-6.js +0 -6
- package/playground/vizard/assets/other-HgnFgCOO.js +0 -2
- package/playground/vizard/assets/pascal-3SrKWnFX.js +0 -6
- package/playground/vizard/assets/pascaligo-Cv9Y0fbC.js +0 -6
- package/playground/vizard/assets/perl-DHxnJL0_.js +0 -6
- package/playground/vizard/assets/pgsql-DGJFw0qd.js +0 -6
- package/playground/vizard/assets/php-BA3Rqjpx.js +0 -6
- package/playground/vizard/assets/pla-DKf5_u7N.js +0 -6
- package/playground/vizard/assets/postiats-Bup1kUyj.js +0 -6
- package/playground/vizard/assets/powerquery-BfbPeLER.js +0 -6
- package/playground/vizard/assets/powershell-DAsS7BG8.js +0 -6
- package/playground/vizard/assets/pug-CVuUMJ1K.js +0 -6
- package/playground/vizard/assets/python-eaj7SXr6.js +0 -6
- package/playground/vizard/assets/qsharp-BgY1GbL_.js +0 -6
- package/playground/vizard/assets/r-C2Iz-cGs.js +0 -6
- package/playground/vizard/assets/razor-mSmpvSb7.js +0 -6
- package/playground/vizard/assets/react-CJahmRYQ.js +0 -32
- package/playground/vizard/assets/redis-F7UxdB6U.js +0 -6
- package/playground/vizard/assets/redshift-CDF44XVS.js +0 -6
- package/playground/vizard/assets/restructuredtext-C_dzeD_4.js +0 -6
- package/playground/vizard/assets/ruby-BdxlVRg3.js +0 -6
- package/playground/vizard/assets/rust-gU8692nP.js +0 -6
- package/playground/vizard/assets/sb-CsAkPjmq.js +0 -6
- package/playground/vizard/assets/scala-D_TH4Qyk.js +0 -6
- package/playground/vizard/assets/scheme-CTXRt_ZJ.js +0 -6
- package/playground/vizard/assets/shell-osqRiq1b.js +0 -6
- package/playground/vizard/assets/solidity-BTHmi1CB.js +0 -6
- package/playground/vizard/assets/sophia-BRe4RArb.js +0 -6
- package/playground/vizard/assets/sparql-CaSv-uNl.js +0 -6
- package/playground/vizard/assets/sql-CHiRcria.js +0 -6
- package/playground/vizard/assets/st-CCGZ7KTi.js +0 -6
- package/playground/vizard/assets/swift-DeyDsJzf.js +0 -8
- package/playground/vizard/assets/systemverilog-RSGMMa-l.js +0 -6
- package/playground/vizard/assets/tcl-B28K5YOH.js +0 -6
- package/playground/vizard/assets/twig-ChoE7Tfw.js +0 -6
- package/playground/vizard/assets/typescript-DHPJO5zk.js +0 -6
- package/playground/vizard/assets/uikit-B7SaluUF.js +0 -1352
- package/playground/vizard/assets/vb-BCnlgLOU.js +0 -6
- package/playground/vizard/assets/xml-BzVPTsY-.js +0 -6
- package/playground/vizard/assets/yaml-BQjIkRBM.js +0 -6
- package/playground/vizard/preview/react-typescript-antd-table/assets/index-BUeSoip0.js +0 -355
- package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/index-CqgSyhTK.js +0 -57
- /package/playground/vizard/assets/{monaco-ZJDocGaF.css → monaco-DubZzIGg.css} +0 -0
- /package/playground/vizard/preview/react-typescript-antd-table/assets/{index-D47x4Gho.css → index-DMzrXVau.css} +0 -0
- /package/playground/vizard/preview/react-typescript-chartjs-area+bar+doughnut+line+pie/assets/{index-D47x4Gho.css → index-DMzrXVau.css} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();var Wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function br(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var tc={exports:{}},xs={},nc={exports:{}},_e={};var zm;function Yw(){if(zm)return _e;zm=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function y(C){return C===null||typeof C!="object"?null:(C=m&&C[m]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function k(C,q,J){this.props=C,this.context=q,this.refs=S,this.updater=J||_}k.prototype.isReactComponent={},k.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,q,"setState")},k.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function R(){}R.prototype=k.prototype;function w(C,q,J){this.props=C,this.context=q,this.refs=S,this.updater=J||_}var E=w.prototype=new R;E.constructor=w,b(E,k.prototype),E.isPureReactComponent=!0;var O=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function I(C,q,J){var ae,te={},se=null,ue=null;if(q!=null)for(ae in q.ref!==void 0&&(ue=q.ref),q.key!==void 0&&(se=""+q.key),q)P.call(q,ae)&&!D.hasOwnProperty(ae)&&(te[ae]=q[ae]);var ve=arguments.length-2;if(ve===1)te.children=J;else if(1<ve){for(var ge=Array(ve),ke=0;ke<ve;ke++)ge[ke]=arguments[ke+2];te.children=ge}if(C&&C.defaultProps)for(ae in ve=C.defaultProps,ve)te[ae]===void 0&&(te[ae]=ve[ae]);return{$$typeof:n,type:C,key:se,ref:ue,props:te,_owner:T.current}}function W(C,q){return{$$typeof:n,type:C.type,key:q,ref:C.ref,props:C.props,_owner:C._owner}}function H(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Y(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(J){return q[J]})}var ee=/\/+/g;function ne(C,q){return typeof C=="object"&&C!==null&&C.key!=null?Y(""+C.key):q.toString(36)}function G(C,q,J,ae,te){var se=typeof C;(se==="undefined"||se==="boolean")&&(C=null);var ue=!1;if(C===null)ue=!0;else switch(se){case"string":case"number":ue=!0;break;case"object":switch(C.$$typeof){case n:case e:ue=!0}}if(ue)return ue=C,te=te(ue),C=ae===""?"."+ne(ue,0):ae,O(te)?(J="",C!=null&&(J=C.replace(ee,"$&/")+"/"),G(te,q,J,"",function(ke){return ke})):te!=null&&(H(te)&&(te=W(te,J+(!te.key||ue&&ue.key===te.key?"":(""+te.key).replace(ee,"$&/")+"/")+C)),q.push(te)),1;if(ue=0,ae=ae===""?".":ae+":",O(C))for(var ve=0;ve<C.length;ve++){se=C[ve];var ge=ae+ne(se,ve);ue+=G(se,q,J,ge,te)}else if(ge=y(C),typeof ge=="function")for(C=ge.call(C),ve=0;!(se=C.next()).done;)se=se.value,ge=ae+ne(se,ve++),ue+=G(se,q,J,ge,te);else if(se==="object")throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return ue}function B(C,q,J){if(C==null)return C;var ae=[],te=0;return G(C,ae,"","",function(se){return q.call(J,se,te++)}),ae}function L(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(J){(C._status===0||C._status===-1)&&(C._status=1,C._result=J)},function(J){(C._status===0||C._status===-1)&&(C._status=2,C._result=J)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var V={current:null},j={transition:null},U={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:j,ReactCurrentOwner:T};return _e.Children={map:B,forEach:function(C,q,J){B(C,function(){q.apply(this,arguments)},J)},count:function(C){var q=0;return B(C,function(){q++}),q},toArray:function(C){return B(C,function(q){return q})||[]},only:function(C){if(!H(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},_e.Component=k,_e.Fragment=t,_e.Profiler=s,_e.PureComponent=w,_e.StrictMode=r,_e.Suspense=f,_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,_e.cloneElement=function(C,q,J){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var ae=b({},C.props),te=C.key,se=C.ref,ue=C._owner;if(q!=null){if(q.ref!==void 0&&(se=q.ref,ue=T.current),q.key!==void 0&&(te=""+q.key),C.type&&C.type.defaultProps)var ve=C.type.defaultProps;for(ge in q)P.call(q,ge)&&!D.hasOwnProperty(ge)&&(ae[ge]=q[ge]===void 0&&ve!==void 0?ve[ge]:q[ge])}var ge=arguments.length-2;if(ge===1)ae.children=J;else if(1<ge){ve=Array(ge);for(var ke=0;ke<ge;ke++)ve[ke]=arguments[ke+2];ae.children=ve}return{$$typeof:n,type:C.type,key:te,ref:se,props:ae,_owner:ue}},_e.createContext=function(C){return C={$$typeof:l,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},C.Provider={$$typeof:a,_context:C},C.Consumer=C},_e.createElement=I,_e.createFactory=function(C){var q=I.bind(null,C);return q.type=C,q},_e.createRef=function(){return{current:null}},_e.forwardRef=function(C){return{$$typeof:c,render:C}},_e.isValidElement=H,_e.lazy=function(C){return{$$typeof:p,_payload:{_status:-1,_result:C},_init:L}},_e.memo=function(C,q){return{$$typeof:h,type:C,compare:q===void 0?null:q}},_e.startTransition=function(C){var q=j.transition;j.transition={};try{C()}finally{j.transition=q}},_e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},_e.useCallback=function(C,q){return V.current.useCallback(C,q)},_e.useContext=function(C){return V.current.useContext(C)},_e.useDebugValue=function(){},_e.useDeferredValue=function(C){return V.current.useDeferredValue(C)},_e.useEffect=function(C,q){return V.current.useEffect(C,q)},_e.useId=function(){return V.current.useId()},_e.useImperativeHandle=function(C,q,J){return V.current.useImperativeHandle(C,q,J)},_e.useInsertionEffect=function(C,q){return V.current.useInsertionEffect(C,q)},_e.useLayoutEffect=function(C,q){return V.current.useLayoutEffect(C,q)},_e.useMemo=function(C,q){return V.current.useMemo(C,q)},_e.useReducer=function(C,q,J){return V.current.useReducer(C,q,J)},_e.useRef=function(C){return V.current.useRef(C)},_e.useState=function(C){return V.current.useState(C)},_e.useSyncExternalStore=function(C,q,J){return V.current.useSyncExternalStore(C,q,J)},_e.useTransition=function(){return V.current.useTransition()},_e.version="18.2.0",_e}var qm;function fh(){return qm||(qm=1,nc.exports=Yw()),nc.exports}var Bm;function Gw(){if(Bm)return xs;Bm=1;var n=fh(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,h){var p,m={},y=null,_=null;h!==void 0&&(y=""+h),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(_=f.ref);for(p in f)r.call(f,p)&&!a.hasOwnProperty(p)&&(m[p]=f[p]);if(c&&c.defaultProps)for(p in f=c.defaultProps,f)m[p]===void 0&&(m[p]=f[p]);return{$$typeof:e,type:c,key:y,ref:_,props:m,_owner:s.current}}return xs.Fragment=t,xs.jsx=l,xs.jsxs=l,xs}var $m;function Qw(){return $m||($m=1,tc.exports=Gw()),tc.exports}var Lt=Qw(),Je=fh();const Gr=br(Je);var da={},rc={exports:{}},Dt={},ic={exports:{}},sc={};var Vm;function Kw(){return Vm||(Vm=1,(function(n){function e(j,U){var C=j.length;j.push(U);e:for(;0<C;){var q=C-1>>>1,J=j[q];if(0<s(J,U))j[q]=U,j[C]=J,C=q;else break e}}function t(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var U=j[0],C=j.pop();if(C!==U){j[0]=C;e:for(var q=0,J=j.length,ae=J>>>1;q<ae;){var te=2*(q+1)-1,se=j[te],ue=te+1,ve=j[ue];if(0>s(se,C))ue<J&&0>s(ve,se)?(j[q]=ve,j[ue]=C,q=ue):(j[q]=se,j[te]=C,q=te);else if(ue<J&&0>s(ve,C))j[q]=ve,j[ue]=C,q=ue;else break e}}return U}function s(j,U){var C=j.sortIndex-U.sortIndex;return C!==0?C:j.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;n.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();n.unstable_now=function(){return l.now()-c}}var f=[],h=[],p=1,m=null,y=3,_=!1,b=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(j){for(var U=t(h);U!==null;){if(U.callback===null)r(h);else if(U.startTime<=j)r(h),U.sortIndex=U.expirationTime,e(f,U);else break;U=t(h)}}function O(j){if(S=!1,E(j),!b)if(t(f)!==null)b=!0,L(P);else{var U=t(h);U!==null&&V(O,U.startTime-j)}}function P(j,U){b=!1,S&&(S=!1,R(I),I=-1),_=!0;var C=y;try{for(E(U),m=t(f);m!==null&&(!(m.expirationTime>U)||j&&!Y());){var q=m.callback;if(typeof q=="function"){m.callback=null,y=m.priorityLevel;var J=q(m.expirationTime<=U);U=n.unstable_now(),typeof J=="function"?m.callback=J:m===t(f)&&r(f),E(U)}else r(f);m=t(f)}if(m!==null)var ae=!0;else{var te=t(h);te!==null&&V(O,te.startTime-U),ae=!1}return ae}finally{m=null,y=C,_=!1}}var T=!1,D=null,I=-1,W=5,H=-1;function Y(){return!(n.unstable_now()-H<W)}function ee(){if(D!==null){var j=n.unstable_now();H=j;var U=!0;try{U=D(!0,j)}finally{U?ne():(T=!1,D=null)}}else T=!1}var ne;if(typeof w=="function")ne=function(){w(ee)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,B=G.port2;G.port1.onmessage=ee,ne=function(){B.postMessage(null)}}else ne=function(){k(ee,0)};function L(j){D=j,T||(T=!0,ne())}function V(j,U){I=k(function(){j(n.unstable_now())},U)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_continueExecution=function(){b||_||(b=!0,L(P))},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return y},n.unstable_getFirstCallbackNode=function(){return t(f)},n.unstable_next=function(j){switch(y){case 1:case 2:case 3:var U=3;break;default:U=y}var C=y;y=U;try{return j()}finally{y=C}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(j,U){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var C=y;y=j;try{return U()}finally{y=C}},n.unstable_scheduleCallback=function(j,U,C){var q=n.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?q+C:q):C=q,j){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=C+J,j={id:p++,callback:U,priorityLevel:j,startTime:C,expirationTime:J,sortIndex:-1},C>q?(j.sortIndex=C,e(h,j),t(f)===null&&j===t(h)&&(S?(R(I),I=-1):S=!0,V(O,C-q))):(j.sortIndex=J,e(f,j),b||_||(b=!0,L(P))),j},n.unstable_shouldYield=Y,n.unstable_wrapCallback=function(j){var U=y;return function(){var C=y;y=U;try{return j.apply(this,arguments)}finally{y=C}}}})(sc)),sc}var Wm;function Xw(){return Wm||(Wm=1,ic.exports=Kw()),ic.exports}var Um;function Jw(){if(Um)return Dt;Um=1;var n=fh(),e=Xw();function t(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){l(i,o),l(i+"Capture",o)}function l(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function y(i){return f.call(m,i)?!0:f.call(p,i)?!1:h.test(i)?m[i]=!0:(p[i]=!0,!1)}function _(i,o,u,d){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function b(i,o,u,d){if(o===null||typeof o>"u"||_(i,o,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function S(i,o,u,d,g,v,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=i,this.type=o,this.sanitizeURL=v,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){k[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];k[o]=new S(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){k[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){k[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){k[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){k[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){k[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){k[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){k[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function w(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(R,w);k[o]=new S(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(R,w);k[o]=new S(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(R,w);k[o]=new S(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),k.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function E(i,o,u,d){var g=k.hasOwnProperty(o)?k[o]:null;(g!==null?g.type!==0:d||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(b(o,u,g,d)&&(u=null),d||g===null?y(o)&&(u===null?i.removeAttribute(o):i.setAttribute(o,""+u)):g.mustUseProperty?i[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,d=g.attributeNamespace,u===null?i.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,d?i.setAttributeNS(d,o,u):i.setAttribute(o,u))))}var O=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),Y=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),j=Symbol.iterator;function U(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var C=Object.assign,q;function J(i){if(q===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);q=o&&o[1]||""}return`
|
|
2
|
+
`+q+i}var ae=!1;function te(i,o){if(!i||ae)return"";ae=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch($){var d=$}Reflect.construct(i,[],o)}else{try{o.call()}catch($){d=$}i.call(o.prototype)}else{try{throw Error()}catch($){d=$}i()}}catch($){if($&&d&&typeof $.stack=="string"){for(var g=$.stack.split(`
|
|
3
|
+
`),v=d.stack.split(`
|
|
4
|
+
`),x=g.length-1,M=v.length-1;1<=x&&0<=M&&g[x]!==v[M];)M--;for(;1<=x&&0<=M;x--,M--)if(g[x]!==v[M]){if(x!==1||M!==1)do if(x--,M--,0>M||g[x]!==v[M]){var A=`
|
|
5
|
+
`+g[x].replace(" at new "," at ");return i.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",i.displayName)),A}while(1<=x&&0<=M);break}}}finally{ae=!1,Error.prepareStackTrace=u}return(i=i?i.displayName||i.name:"")?J(i):""}function se(i){switch(i.tag){case 5:return J(i.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return i=te(i.type,!1),i;case 11:return i=te(i.type.render,!1),i;case 1:return i=te(i.type,!0),i;default:return""}}function ue(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case D:return"Fragment";case T:return"Portal";case W:return"Profiler";case I:return"StrictMode";case ne:return"Suspense";case G:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case Y:return(i.displayName||"Context")+".Consumer";case H:return(i._context.displayName||"Context")+".Provider";case ee:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case B:return o=i.displayName||null,o!==null?o:ue(i.type)||"Memo";case L:o=i._payload,i=i._init;try{return ue(i(o))}catch{}}return null}function ve(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(o);case 8:return o===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ge(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ke(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Ee(i){var o=ke(i)?"checked":"value",u=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),d=""+i[o];if(!i.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,v=u.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,v.call(this,x)}}),Object.defineProperty(i,o,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Qe(i){i._valueTracker||(i._valueTracker=Ee(i))}function qe(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),d="";return i&&(d=ke(i)?i.checked?"true":"false":i.value),i=d,i!==u?(o.setValue(i),!0):!1}function Te(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function wt(i,o){var u=o.checked;return C({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??i._wrapperState.initialChecked})}function tt(i,o){var u=o.defaultValue==null?"":o.defaultValue,d=o.checked!=null?o.checked:o.defaultChecked;u=ge(o.value!=null?o.value:u),i._wrapperState={initialChecked:d,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Cn(i,o){o=o.checked,o!=null&&E(i,"checked",o,!1)}function nn(i,o){Cn(i,o);var u=ge(o.value),d=o.type;if(u!=null)d==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+u):i.value!==""+u&&(i.value=""+u);else if(d==="submit"||d==="reset"){i.removeAttribute("value");return}o.hasOwnProperty("value")?ei(i,o.type,u):o.hasOwnProperty("defaultValue")&&ei(i,o.type,ge(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function ro(i,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var d=o.type;if(!(d!=="submit"&&d!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,u||o===i.value||(i.value=o),i.defaultValue=o}u=i.name,u!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,u!==""&&(i.name=u)}function ei(i,o,u){(o!=="number"||Te(i.ownerDocument)!==i)&&(u==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+u&&(i.defaultValue=""+u))}var kr=Array.isArray;function Ft(i,o,u,d){if(i=i.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<i.length;u++)g=o.hasOwnProperty("$"+i[u].value),i[u].selected!==g&&(i[u].selected=g),g&&d&&(i[u].defaultSelected=!0)}else{for(u=""+ge(u),o=null,g=0;g<i.length;g++){if(i[g].value===u){i[g].selected=!0,d&&(i[g].defaultSelected=!0);return}o!==null||i[g].disabled||(o=i[g])}o!==null&&(o.selected=!0)}}function mn(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return C({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ti(i,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(t(92));if(kr(u)){if(1<u.length)throw Error(t(93));u=u[0]}o=u}o==null&&(o=""),u=o}i._wrapperState={initialValue:ge(u)}}function re(i,o){var u=ge(o.value),d=ge(o.defaultValue);u!=null&&(u=""+u,u!==i.value&&(i.value=u),o.defaultValue==null&&i.defaultValue!==u&&(i.defaultValue=u)),d!=null&&(i.defaultValue=""+d)}function me(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function Oe(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?Oe(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Mn=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,d,g){MSApp.execUnsafeLocalFunction(function(){return i(o,u,d,g)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function vn(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var Yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yn=["Webkit","ms","Moz","O"];Object.keys(Yt).forEach(function(i){Yn.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),Yt[o]=Yt[i]})});function ji(i,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||Yt.hasOwnProperty(i)&&Yt[i]?(""+o).trim():o+"px"}function Fi(i,o){i=i.style;for(var u in o)if(o.hasOwnProperty(u)){var d=u.indexOf("--")===0,g=ji(u,o[u],d);u==="float"&&(u="cssFloat"),d?i.setProperty(u,g):i[u]=g}}var dl=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hl(i,o){if(o){if(dl[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function pl(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gl=null;function ml(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var vl=null,ni=null,ri=null;function tp(i){if(i=os(i)){if(typeof vl!="function")throw Error(t(280));var o=i.stateNode;o&&(o=Po(o),vl(i.stateNode,i.type,o))}}function np(i){ni?ri?ri.push(i):ri=[i]:ni=i}function rp(){if(ni){var i=ni,o=ri;if(ri=ni=null,tp(i),o)for(i=0;i<o.length;i++)tp(o[i])}}function ip(i,o){return i(o)}function sp(){}var yl=!1;function op(i,o,u){if(yl)return i(o,u);yl=!0;try{return ip(i,o,u)}finally{yl=!1,(ni!==null||ri!==null)&&(sp(),rp())}}function zi(i,o){var u=i.stateNode;if(u===null)return null;var d=Po(u);if(d===null)return null;u=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(i=i.type,d=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!d;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(t(231,o,typeof u));return u}var _l=!1;if(c)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){_l=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{_l=!1}function ZS(i,o,u,d,g,v,x,M,A){var $=Array.prototype.slice.call(arguments,3);try{o.apply(u,$)}catch(K){this.onError(K)}}var Bi=!1,io=null,so=!1,bl=null,e1={onError:function(i){Bi=!0,io=i}};function t1(i,o,u,d,g,v,x,M,A){Bi=!1,io=null,ZS.apply(e1,arguments)}function n1(i,o,u,d,g,v,x,M,A){if(t1.apply(this,arguments),Bi){if(Bi){var $=io;Bi=!1,io=null}else throw Error(t(198));so||(so=!0,bl=$)}}function Er(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function ap(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function lp(i){if(Er(i)!==i)throw Error(t(188))}function r1(i){var o=i.alternate;if(!o){if(o=Er(i),o===null)throw Error(t(188));return o!==i?null:i}for(var u=i,d=o;;){var g=u.return;if(g===null)break;var v=g.alternate;if(v===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===u)return lp(g),i;if(v===d)return lp(g),o;v=v.sibling}throw Error(t(188))}if(u.return!==d.return)u=g,d=v;else{for(var x=!1,M=g.child;M;){if(M===u){x=!0,u=g,d=v;break}if(M===d){x=!0,d=g,u=v;break}M=M.sibling}if(!x){for(M=v.child;M;){if(M===u){x=!0,u=v,d=g;break}if(M===d){x=!0,d=v,u=g;break}M=M.sibling}if(!x)throw Error(t(189))}}if(u.alternate!==d)throw Error(t(190))}if(u.tag!==3)throw Error(t(188));return u.stateNode.current===u?i:o}function up(i){return i=r1(i),i!==null?cp(i):null}function cp(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=cp(i);if(o!==null)return o;i=i.sibling}return null}var fp=e.unstable_scheduleCallback,dp=e.unstable_cancelCallback,i1=e.unstable_shouldYield,s1=e.unstable_requestPaint,Ke=e.unstable_now,o1=e.unstable_getCurrentPriorityLevel,xl=e.unstable_ImmediatePriority,hp=e.unstable_UserBlockingPriority,oo=e.unstable_NormalPriority,a1=e.unstable_LowPriority,pp=e.unstable_IdlePriority,ao=null,yn=null;function l1(i){if(yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(ao,i,void 0,(i.current.flags&128)===128)}catch{}}var rn=Math.clz32?Math.clz32:f1,u1=Math.log,c1=Math.LN2;function f1(i){return i>>>=0,i===0?32:31-(u1(i)/c1|0)|0}var lo=64,uo=4194304;function $i(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function co(i,o){var u=i.pendingLanes;if(u===0)return 0;var d=0,g=i.suspendedLanes,v=i.pingedLanes,x=u&268435455;if(x!==0){var M=x&~g;M!==0?d=$i(M):(v&=x,v!==0&&(d=$i(v)))}else x=u&~g,x!==0?d=$i(x):v!==0&&(d=$i(v));if(d===0)return 0;if(o!==0&&o!==d&&(o&g)===0&&(g=d&-d,v=o&-o,g>=v||g===16&&(v&4194240)!==0))return o;if((d&4)!==0&&(d|=u&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=d;0<o;)u=31-rn(o),g=1<<u,d|=i[u],o&=~g;return d}function d1(i,o){switch(i){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function h1(i,o){for(var u=i.suspendedLanes,d=i.pingedLanes,g=i.expirationTimes,v=i.pendingLanes;0<v;){var x=31-rn(v),M=1<<x,A=g[x];A===-1?((M&u)===0||(M&d)!==0)&&(g[x]=d1(M,o)):A<=o&&(i.expiredLanes|=M),v&=~M}}function Sl(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function gp(){var i=lo;return lo<<=1,(lo&4194240)===0&&(lo=64),i}function wl(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function Vi(i,o,u){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-rn(o),i[o]=u}function p1(i,o){var u=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var d=i.eventTimes;for(i=i.expirationTimes;0<u;){var g=31-rn(u),v=1<<g;o[g]=0,d[g]=-1,i[g]=-1,u&=~v}}function kl(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var d=31-rn(u),g=1<<d;g&o|i[d]&o&&(i[d]|=o),u&=~g}}var Me=0;function mp(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var vp,El,yp,_p,bp,Ol=!1,fo=[],Gn=null,Qn=null,Kn=null,Wi=new Map,Ui=new Map,Xn=[],g1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function xp(i,o){switch(i){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":Wi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(o.pointerId)}}function Hi(i,o,u,d,g,v){return i===null||i.nativeEvent!==v?(i={blockedOn:o,domEventName:u,eventSystemFlags:d,nativeEvent:v,targetContainers:[g]},o!==null&&(o=os(o),o!==null&&El(o)),i):(i.eventSystemFlags|=d,o=i.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),i)}function m1(i,o,u,d,g){switch(o){case"focusin":return Gn=Hi(Gn,i,o,u,d,g),!0;case"dragenter":return Qn=Hi(Qn,i,o,u,d,g),!0;case"mouseover":return Kn=Hi(Kn,i,o,u,d,g),!0;case"pointerover":var v=g.pointerId;return Wi.set(v,Hi(Wi.get(v)||null,i,o,u,d,g)),!0;case"gotpointercapture":return v=g.pointerId,Ui.set(v,Hi(Ui.get(v)||null,i,o,u,d,g)),!0}return!1}function Sp(i){var o=Or(i.target);if(o!==null){var u=Er(o);if(u!==null){if(o=u.tag,o===13){if(o=ap(u),o!==null){i.blockedOn=o,bp(i.priority,function(){yp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function ho(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Cl(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(u===null){u=i.nativeEvent;var d=new u.constructor(u.type,u);gl=d,u.target.dispatchEvent(d),gl=null}else return o=os(u),o!==null&&El(o),i.blockedOn=u,!1;o.shift()}return!0}function wp(i,o,u){ho(i)&&u.delete(o)}function v1(){Ol=!1,Gn!==null&&ho(Gn)&&(Gn=null),Qn!==null&&ho(Qn)&&(Qn=null),Kn!==null&&ho(Kn)&&(Kn=null),Wi.forEach(wp),Ui.forEach(wp)}function Yi(i,o){i.blockedOn===o&&(i.blockedOn=null,Ol||(Ol=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,v1)))}function Gi(i){function o(g){return Yi(g,i)}if(0<fo.length){Yi(fo[0],i);for(var u=1;u<fo.length;u++){var d=fo[u];d.blockedOn===i&&(d.blockedOn=null)}}for(Gn!==null&&Yi(Gn,i),Qn!==null&&Yi(Qn,i),Kn!==null&&Yi(Kn,i),Wi.forEach(o),Ui.forEach(o),u=0;u<Xn.length;u++)d=Xn[u],d.blockedOn===i&&(d.blockedOn=null);for(;0<Xn.length&&(u=Xn[0],u.blockedOn===null);)Sp(u),u.blockedOn===null&&Xn.shift()}var ii=O.ReactCurrentBatchConfig,po=!0;function y1(i,o,u,d){var g=Me,v=ii.transition;ii.transition=null;try{Me=1,Pl(i,o,u,d)}finally{Me=g,ii.transition=v}}function _1(i,o,u,d){var g=Me,v=ii.transition;ii.transition=null;try{Me=4,Pl(i,o,u,d)}finally{Me=g,ii.transition=v}}function Pl(i,o,u,d){if(po){var g=Cl(i,o,u,d);if(g===null)Ul(i,o,d,go,u),xp(i,d);else if(m1(g,i,o,u,d))d.stopPropagation();else if(xp(i,d),o&4&&-1<g1.indexOf(i)){for(;g!==null;){var v=os(g);if(v!==null&&vp(v),v=Cl(i,o,u,d),v===null&&Ul(i,o,d,go,u),v===g)break;g=v}g!==null&&d.stopPropagation()}else Ul(i,o,d,null,u)}}var go=null;function Cl(i,o,u,d){if(go=null,i=ml(d),i=Or(i),i!==null)if(o=Er(i),o===null)i=null;else if(u=o.tag,u===13){if(i=ap(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return go=i,null}function kp(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(o1()){case xl:return 1;case hp:return 4;case oo:case a1:return 16;case pp:return 536870912;default:return 16}default:return 16}}var Jn=null,Ml=null,mo=null;function Ep(){if(mo)return mo;var i,o=Ml,u=o.length,d,g="value"in Jn?Jn.value:Jn.textContent,v=g.length;for(i=0;i<u&&o[i]===g[i];i++);var x=u-i;for(d=1;d<=x&&o[u-d]===g[v-d];d++);return mo=g.slice(i,1<d?1-d:void 0)}function vo(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function yo(){return!0}function Op(){return!1}function zt(i){function o(u,d,g,v,x){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var M in i)i.hasOwnProperty(M)&&(u=i[M],this[M]=u?u(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?yo:Op,this.isPropagationStopped=Op,this}return C(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=yo)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),o}var si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rl=zt(si),Qi=C({},si,{view:0,detail:0}),b1=zt(Qi),Tl,Dl,Ki,_o=C({},Qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Al,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ki&&(Ki&&i.type==="mousemove"?(Tl=i.screenX-Ki.screenX,Dl=i.screenY-Ki.screenY):Dl=Tl=0,Ki=i),Tl)},movementY:function(i){return"movementY"in i?i.movementY:Dl}}),Pp=zt(_o),x1=C({},_o,{dataTransfer:0}),S1=zt(x1),w1=C({},Qi,{relatedTarget:0}),Il=zt(w1),k1=C({},si,{animationName:0,elapsedTime:0,pseudoElement:0}),E1=zt(k1),O1=C({},si,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),P1=zt(O1),C1=C({},si,{data:0}),Cp=zt(C1),M1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},T1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D1(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=T1[i])?!!o[i]:!1}function Al(){return D1}var I1=C({},Qi,{key:function(i){if(i.key){var o=M1[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=vo(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?R1[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Al,charCode:function(i){return i.type==="keypress"?vo(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?vo(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),A1=zt(I1),L1=C({},_o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=zt(L1),N1=C({},Qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Al}),j1=zt(N1),F1=C({},si,{propertyName:0,elapsedTime:0,pseudoElement:0}),z1=zt(F1),q1=C({},_o,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),B1=zt(q1),$1=[9,13,27,32],Ll=c&&"CompositionEvent"in window,Xi=null;c&&"documentMode"in document&&(Xi=document.documentMode);var V1=c&&"TextEvent"in window&&!Xi,Rp=c&&(!Ll||Xi&&8<Xi&&11>=Xi),Tp=" ",Dp=!1;function Ip(i,o){switch(i){case"keyup":return $1.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ap(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var oi=!1;function W1(i,o){switch(i){case"compositionend":return Ap(o);case"keypress":return o.which!==32?null:(Dp=!0,Tp);case"textInput":return i=o.data,i===Tp&&Dp?null:i;default:return null}}function U1(i,o){if(oi)return i==="compositionend"||!Ll&&Ip(i,o)?(i=Ep(),mo=Ml=Jn=null,oi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Rp&&o.locale!=="ko"?null:o.data;default:return null}}var H1={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!H1[i.type]:o==="textarea"}function Np(i,o,u,d){np(d),o=ko(o,"onChange"),0<o.length&&(u=new Rl("onChange","change",null,u,d),i.push({event:u,listeners:o}))}var Ji=null,Zi=null;function Y1(i){eg(i,0)}function bo(i){var o=fi(i);if(qe(o))return i}function G1(i,o){if(i==="change")return o}var jp=!1;if(c){var Nl;if(c){var jl="oninput"in document;if(!jl){var Fp=document.createElement("div");Fp.setAttribute("oninput","return;"),jl=typeof Fp.oninput=="function"}Nl=jl}else Nl=!1;jp=Nl&&(!document.documentMode||9<document.documentMode)}function zp(){Ji&&(Ji.detachEvent("onpropertychange",qp),Zi=Ji=null)}function qp(i){if(i.propertyName==="value"&&bo(Zi)){var o=[];Np(o,Zi,i,ml(i)),op(Y1,o)}}function Q1(i,o,u){i==="focusin"?(zp(),Ji=o,Zi=u,Ji.attachEvent("onpropertychange",qp)):i==="focusout"&&zp()}function K1(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return bo(Zi)}function X1(i,o){if(i==="click")return bo(o)}function J1(i,o){if(i==="input"||i==="change")return bo(o)}function Z1(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var sn=typeof Object.is=="function"?Object.is:Z1;function es(i,o){if(sn(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),d=Object.keys(o);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!f.call(o,g)||!sn(i[g],o[g]))return!1}return!0}function Bp(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function $p(i,o){var u=Bp(i);i=0;for(var d;u;){if(u.nodeType===3){if(d=i+u.textContent.length,i<=o&&d>=o)return{node:u,offset:o-i};i=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Bp(u)}}function Vp(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?Vp(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function Wp(){for(var i=window,o=Te();o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=Te(i.document)}return o}function Fl(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function ew(i){var o=Wp(),u=i.focusedElem,d=i.selectionRange;if(o!==u&&u&&u.ownerDocument&&Vp(u.ownerDocument.documentElement,u)){if(d!==null&&Fl(u)){if(o=d.start,i=d.end,i===void 0&&(i=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(i,u.value.length);else if(i=(o=u.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var g=u.textContent.length,v=Math.min(d.start,g);d=d.end===void 0?v:Math.min(d.end,g),!i.extend&&v>d&&(g=d,d=v,v=g),g=$p(u,v);var x=$p(u,d);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),i.removeAllRanges(),v>d?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=u;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)i=o[u],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var tw=c&&"documentMode"in document&&11>=document.documentMode,ai=null,zl=null,ts=null,ql=!1;function Up(i,o,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ql||ai==null||ai!==Te(d)||(d=ai,"selectionStart"in d&&Fl(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),ts&&es(ts,d)||(ts=d,d=ko(zl,"onSelect"),0<d.length&&(o=new Rl("onSelect","select",null,o,u),i.push({event:o,listeners:d}),o.target=ai)))}function xo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var li={animationend:xo("Animation","AnimationEnd"),animationiteration:xo("Animation","AnimationIteration"),animationstart:xo("Animation","AnimationStart"),transitionend:xo("Transition","TransitionEnd")},Bl={},Hp={};c&&(Hp=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function So(i){if(Bl[i])return Bl[i];if(!li[i])return i;var o=li[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in Hp)return Bl[i]=o[u];return i}var Yp=So("animationend"),Gp=So("animationiteration"),Qp=So("animationstart"),Kp=So("transitionend"),Xp=new Map,Jp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Zn(i,o){Xp.set(i,o),a(o,[i])}for(var $l=0;$l<Jp.length;$l++){var Vl=Jp[$l],nw=Vl.toLowerCase(),rw=Vl[0].toUpperCase()+Vl.slice(1);Zn(nw,"on"+rw)}Zn(Yp,"onAnimationEnd"),Zn(Gp,"onAnimationIteration"),Zn(Qp,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(Kp,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ns="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),iw=new Set("cancel close invalid load scroll toggle".split(" ").concat(ns));function Zp(i,o,u){var d=i.type||"unknown-event";i.currentTarget=u,n1(d,o,void 0,i),i.currentTarget=null}function eg(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var d=i[u],g=d.event;d=d.listeners;e:{var v=void 0;if(o)for(var x=d.length-1;0<=x;x--){var M=d[x],A=M.instance,$=M.currentTarget;if(M=M.listener,A!==v&&g.isPropagationStopped())break e;Zp(g,M,$),v=A}else for(x=0;x<d.length;x++){if(M=d[x],A=M.instance,$=M.currentTarget,M=M.listener,A!==v&&g.isPropagationStopped())break e;Zp(g,M,$),v=A}}}if(so)throw i=bl,so=!1,bl=null,i}function Ae(i,o){var u=o[Xl];u===void 0&&(u=o[Xl]=new Set);var d=i+"__bubble";u.has(d)||(tg(o,i,2,!1),u.add(d))}function Wl(i,o,u){var d=0;o&&(d|=4),tg(u,i,d,o)}var wo="_reactListening"+Math.random().toString(36).slice(2);function rs(i){if(!i[wo]){i[wo]=!0,r.forEach(function(u){u!=="selectionchange"&&(iw.has(u)||Wl(u,!1,i),Wl(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[wo]||(o[wo]=!0,Wl("selectionchange",!1,o))}}function tg(i,o,u,d){switch(kp(o)){case 1:var g=y1;break;case 4:g=_1;break;default:g=Pl}u=g.bind(null,o,u,i),g=void 0,!_l||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),d?g!==void 0?i.addEventListener(o,u,{capture:!0,passive:g}):i.addEventListener(o,u,!0):g!==void 0?i.addEventListener(o,u,{passive:g}):i.addEventListener(o,u,!1)}function Ul(i,o,u,d,g){var v=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var M=d.stateNode.containerInfo;if(M===g||M.nodeType===8&&M.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var A=x.tag;if((A===3||A===4)&&(A=x.stateNode.containerInfo,A===g||A.nodeType===8&&A.parentNode===g))return;x=x.return}for(;M!==null;){if(x=Or(M),x===null)return;if(A=x.tag,A===5||A===6){d=v=x;continue e}M=M.parentNode}}d=d.return}op(function(){var $=v,K=ml(u),X=[];e:{var Q=Xp.get(i);if(Q!==void 0){var ie=Rl,le=i;switch(i){case"keypress":if(vo(u)===0)break e;case"keydown":case"keyup":ie=A1;break;case"focusin":le="focus",ie=Il;break;case"focusout":le="blur",ie=Il;break;case"beforeblur":case"afterblur":ie=Il;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=Pp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=S1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=j1;break;case Yp:case Gp:case Qp:ie=E1;break;case Kp:ie=z1;break;case"scroll":ie=b1;break;case"wheel":ie=B1;break;case"copy":case"cut":case"paste":ie=P1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=Mp}var ce=(o&4)!==0,Xe=!ce&&i==="scroll",F=ce?Q!==null?Q+"Capture":null:Q;ce=[];for(var N=$,z;N!==null;){z=N;var Z=z.stateNode;if(z.tag===5&&Z!==null&&(z=Z,F!==null&&(Z=zi(N,F),Z!=null&&ce.push(is(N,Z,z)))),Xe)break;N=N.return}0<ce.length&&(Q=new ie(Q,le,null,u,K),X.push({event:Q,listeners:ce}))}}if((o&7)===0){e:{if(Q=i==="mouseover"||i==="pointerover",ie=i==="mouseout"||i==="pointerout",Q&&u!==gl&&(le=u.relatedTarget||u.fromElement)&&(Or(le)||le[Rn]))break e;if((ie||Q)&&(Q=K.window===K?K:(Q=K.ownerDocument)?Q.defaultView||Q.parentWindow:window,ie?(le=u.relatedTarget||u.toElement,ie=$,le=le?Or(le):null,le!==null&&(Xe=Er(le),le!==Xe||le.tag!==5&&le.tag!==6)&&(le=null)):(ie=null,le=$),ie!==le)){if(ce=Pp,Z="onMouseLeave",F="onMouseEnter",N="mouse",(i==="pointerout"||i==="pointerover")&&(ce=Mp,Z="onPointerLeave",F="onPointerEnter",N="pointer"),Xe=ie==null?Q:fi(ie),z=le==null?Q:fi(le),Q=new ce(Z,N+"leave",ie,u,K),Q.target=Xe,Q.relatedTarget=z,Z=null,Or(K)===$&&(ce=new ce(F,N+"enter",le,u,K),ce.target=z,ce.relatedTarget=Xe,Z=ce),Xe=Z,ie&&le)t:{for(ce=ie,F=le,N=0,z=ce;z;z=ui(z))N++;for(z=0,Z=F;Z;Z=ui(Z))z++;for(;0<N-z;)ce=ui(ce),N--;for(;0<z-N;)F=ui(F),z--;for(;N--;){if(ce===F||F!==null&&ce===F.alternate)break t;ce=ui(ce),F=ui(F)}ce=null}else ce=null;ie!==null&&ng(X,Q,ie,ce,!1),le!==null&&Xe!==null&&ng(X,Xe,le,ce,!0)}}e:{if(Q=$?fi($):window,ie=Q.nodeName&&Q.nodeName.toLowerCase(),ie==="select"||ie==="input"&&Q.type==="file")var fe=G1;else if(Lp(Q))if(jp)fe=J1;else{fe=K1;var de=Q1}else(ie=Q.nodeName)&&ie.toLowerCase()==="input"&&(Q.type==="checkbox"||Q.type==="radio")&&(fe=X1);if(fe&&(fe=fe(i,$))){Np(X,fe,u,K);break e}de&&de(i,Q,$),i==="focusout"&&(de=Q._wrapperState)&&de.controlled&&Q.type==="number"&&ei(Q,"number",Q.value)}switch(de=$?fi($):window,i){case"focusin":(Lp(de)||de.contentEditable==="true")&&(ai=de,zl=$,ts=null);break;case"focusout":ts=zl=ai=null;break;case"mousedown":ql=!0;break;case"contextmenu":case"mouseup":case"dragend":ql=!1,Up(X,u,K);break;case"selectionchange":if(tw)break;case"keydown":case"keyup":Up(X,u,K)}var he;if(Ll)e:{switch(i){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else oi?Ip(i,u)&&(pe="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(pe="onCompositionStart");pe&&(Rp&&u.locale!=="ko"&&(oi||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&oi&&(he=Ep()):(Jn=K,Ml="value"in Jn?Jn.value:Jn.textContent,oi=!0)),de=ko($,pe),0<de.length&&(pe=new Cp(pe,i,null,u,K),X.push({event:pe,listeners:de}),he?pe.data=he:(he=Ap(u),he!==null&&(pe.data=he)))),(he=V1?W1(i,u):U1(i,u))&&($=ko($,"onBeforeInput"),0<$.length&&(K=new Cp("onBeforeInput","beforeinput",null,u,K),X.push({event:K,listeners:$}),K.data=he))}eg(X,o)})}function is(i,o,u){return{instance:i,listener:o,currentTarget:u}}function ko(i,o){for(var u=o+"Capture",d=[];i!==null;){var g=i,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=zi(i,u),v!=null&&d.unshift(is(i,v,g)),v=zi(i,o),v!=null&&d.push(is(i,v,g))),i=i.return}return d}function ui(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function ng(i,o,u,d,g){for(var v=o._reactName,x=[];u!==null&&u!==d;){var M=u,A=M.alternate,$=M.stateNode;if(A!==null&&A===d)break;M.tag===5&&$!==null&&(M=$,g?(A=zi(u,v),A!=null&&x.unshift(is(u,A,M))):g||(A=zi(u,v),A!=null&&x.push(is(u,A,M)))),u=u.return}x.length!==0&&i.push({event:o,listeners:x})}var sw=/\r\n?/g,ow=/\u0000|\uFFFD/g;function rg(i){return(typeof i=="string"?i:""+i).replace(sw,`
|
|
6
|
+
`).replace(ow,"")}function Eo(i,o,u){if(o=rg(o),rg(i)!==o&&u)throw Error(t(425))}function Oo(){}var Hl=null,Yl=null;function Gl(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Ql=typeof setTimeout=="function"?setTimeout:void 0,aw=typeof clearTimeout=="function"?clearTimeout:void 0,ig=typeof Promise=="function"?Promise:void 0,lw=typeof queueMicrotask=="function"?queueMicrotask:typeof ig<"u"?function(i){return ig.resolve(null).then(i).catch(uw)}:Ql;function uw(i){setTimeout(function(){throw i})}function Kl(i,o){var u=o,d=0;do{var g=u.nextSibling;if(i.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(d===0){i.removeChild(g),Gi(o);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=g}while(u);Gi(o)}function er(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function sg(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return i;o--}else u==="/$"&&o++}i=i.previousSibling}return null}var ci=Math.random().toString(36).slice(2),_n="__reactFiber$"+ci,ss="__reactProps$"+ci,Rn="__reactContainer$"+ci,Xl="__reactEvents$"+ci,cw="__reactListeners$"+ci,fw="__reactHandles$"+ci;function Or(i){var o=i[_n];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Rn]||u[_n]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=sg(i);i!==null;){if(u=i[_n])return u;i=sg(i)}return o}i=u,u=i.parentNode}return null}function os(i){return i=i[_n]||i[Rn],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function fi(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(t(33))}function Po(i){return i[ss]||null}var Jl=[],di=-1;function tr(i){return{current:i}}function Le(i){0>di||(i.current=Jl[di],Jl[di]=null,di--)}function De(i,o){di++,Jl[di]=i.current,i.current=o}var nr={},mt=tr(nr),Pt=tr(!1),Pr=nr;function hi(i,o){var u=i.type.contextTypes;if(!u)return nr;var d=i.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===o)return d.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in u)g[v]=o[v];return d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=g),g}function Ct(i){return i=i.childContextTypes,i!=null}function Co(){Le(Pt),Le(mt)}function og(i,o,u){if(mt.current!==nr)throw Error(t(168));De(mt,o),De(Pt,u)}function ag(i,o,u){var d=i.stateNode;if(o=o.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var g in d)if(!(g in o))throw Error(t(108,ve(i)||"Unknown",g));return C({},u,d)}function Mo(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||nr,Pr=mt.current,De(mt,i),De(Pt,Pt.current),!0}function lg(i,o,u){var d=i.stateNode;if(!d)throw Error(t(169));u?(i=ag(i,o,Pr),d.__reactInternalMemoizedMergedChildContext=i,Le(Pt),Le(mt),De(mt,i)):Le(Pt),De(Pt,u)}var Tn=null,Ro=!1,Zl=!1;function ug(i){Tn===null?Tn=[i]:Tn.push(i)}function dw(i){Ro=!0,ug(i)}function rr(){if(!Zl&&Tn!==null){Zl=!0;var i=0,o=Me;try{var u=Tn;for(Me=1;i<u.length;i++){var d=u[i];do d=d(!0);while(d!==null)}Tn=null,Ro=!1}catch(g){throw Tn!==null&&(Tn=Tn.slice(i+1)),fp(xl,rr),g}finally{Me=o,Zl=!1}}return null}var pi=[],gi=0,To=null,Do=0,Gt=[],Qt=0,Cr=null,Dn=1,In="";function Mr(i,o){pi[gi++]=Do,pi[gi++]=To,To=i,Do=o}function cg(i,o,u){Gt[Qt++]=Dn,Gt[Qt++]=In,Gt[Qt++]=Cr,Cr=i;var d=Dn;i=In;var g=32-rn(d)-1;d&=~(1<<g),u+=1;var v=32-rn(o)+g;if(30<v){var x=g-g%5;v=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Dn=1<<32-rn(o)+g|u<<g|d,In=v+i}else Dn=1<<v|u<<g|d,In=i}function eu(i){i.return!==null&&(Mr(i,1),cg(i,1,0))}function tu(i){for(;i===To;)To=pi[--gi],pi[gi]=null,Do=pi[--gi],pi[gi]=null;for(;i===Cr;)Cr=Gt[--Qt],Gt[Qt]=null,In=Gt[--Qt],Gt[Qt]=null,Dn=Gt[--Qt],Gt[Qt]=null}var qt=null,Bt=null,Be=!1,on=null;function fg(i,o){var u=Zt(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=i,o=i.deletions,o===null?(i.deletions=[u],i.flags|=16):o.push(u)}function dg(i,o){switch(i.tag){case 5:var u=i.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,qt=i,Bt=er(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,qt=i,Bt=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Cr!==null?{id:Dn,overflow:In}:null,i.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=Zt(18,null,null,0),u.stateNode=o,u.return=i,i.child=u,qt=i,Bt=null,!0):!1;default:return!1}}function nu(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ru(i){if(Be){var o=Bt;if(o){var u=o;if(!dg(i,o)){if(nu(i))throw Error(t(418));o=er(u.nextSibling);var d=qt;o&&dg(i,o)?fg(d,u):(i.flags=i.flags&-4097|2,Be=!1,qt=i)}}else{if(nu(i))throw Error(t(418));i.flags=i.flags&-4097|2,Be=!1,qt=i}}}function hg(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;qt=i}function Io(i){if(i!==qt)return!1;if(!Be)return hg(i),Be=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Gl(i.type,i.memoizedProps)),o&&(o=Bt)){if(nu(i))throw pg(),Error(t(418));for(;o;)fg(i,o),o=er(o.nextSibling)}if(hg(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(t(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"){if(o===0){Bt=er(i.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}i=i.nextSibling}Bt=null}}else Bt=qt?er(i.stateNode.nextSibling):null;return!0}function pg(){for(var i=Bt;i;)i=er(i.nextSibling)}function mi(){Bt=qt=null,Be=!1}function iu(i){on===null?on=[i]:on.push(i)}var hw=O.ReactCurrentBatchConfig;function an(i,o){if(i&&i.defaultProps){o=C({},o),i=i.defaultProps;for(var u in i)o[u]===void 0&&(o[u]=i[u]);return o}return o}var Ao=tr(null),Lo=null,vi=null,su=null;function ou(){su=vi=Lo=null}function au(i){var o=Ao.current;Le(Ao),i._currentValue=o}function lu(i,o,u){for(;i!==null;){var d=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),i===u)break;i=i.return}}function yi(i,o){Lo=i,su=vi=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Mt=!0),i.firstContext=null)}function Kt(i){var o=i._currentValue;if(su!==i)if(i={context:i,memoizedValue:o,next:null},vi===null){if(Lo===null)throw Error(t(308));vi=i,Lo.dependencies={lanes:0,firstContext:i}}else vi=vi.next=i;return o}var Rr=null;function uu(i){Rr===null?Rr=[i]:Rr.push(i)}function gg(i,o,u,d){var g=o.interleaved;return g===null?(u.next=u,uu(o)):(u.next=g.next,g.next=u),o.interleaved=u,An(i,d)}function An(i,o){i.lanes|=o;var u=i.alternate;for(u!==null&&(u.lanes|=o),u=i,i=i.return;i!==null;)i.childLanes|=o,u=i.alternate,u!==null&&(u.childLanes|=o),u=i,i=i.return;return u.tag===3?u.stateNode:null}var ir=!1;function cu(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mg(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ln(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function sr(i,o,u){var d=i.updateQueue;if(d===null)return null;if(d=d.shared,(Se&2)!==0){var g=d.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),d.pending=o,An(i,u)}return g=d.interleaved,g===null?(o.next=o,uu(d)):(o.next=g.next,g.next=o),d.interleaved=o,An(i,u)}function No(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var d=o.lanes;d&=i.pendingLanes,u|=d,o.lanes=u,kl(i,u)}}function vg(i,o){var u=i.updateQueue,d=i.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var x={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};v===null?g=v=x:v=v.next=x,u=u.next}while(u!==null);v===null?g=v=o:v=v.next=o}else g=v=o;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:d.shared,effects:d.effects},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}function jo(i,o,u,d){var g=i.updateQueue;ir=!1;var v=g.firstBaseUpdate,x=g.lastBaseUpdate,M=g.shared.pending;if(M!==null){g.shared.pending=null;var A=M,$=A.next;A.next=null,x===null?v=$:x.next=$,x=A;var K=i.alternate;K!==null&&(K=K.updateQueue,M=K.lastBaseUpdate,M!==x&&(M===null?K.firstBaseUpdate=$:M.next=$,K.lastBaseUpdate=A))}if(v!==null){var X=g.baseState;x=0,K=$=A=null,M=v;do{var Q=M.lane,ie=M.eventTime;if((d&Q)===Q){K!==null&&(K=K.next={eventTime:ie,lane:0,tag:M.tag,payload:M.payload,callback:M.callback,next:null});e:{var le=i,ce=M;switch(Q=o,ie=u,ce.tag){case 1:if(le=ce.payload,typeof le=="function"){X=le.call(ie,X,Q);break e}X=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ce.payload,Q=typeof le=="function"?le.call(ie,X,Q):le,Q==null)break e;X=C({},X,Q);break e;case 2:ir=!0}}M.callback!==null&&M.lane!==0&&(i.flags|=64,Q=g.effects,Q===null?g.effects=[M]:Q.push(M))}else ie={eventTime:ie,lane:Q,tag:M.tag,payload:M.payload,callback:M.callback,next:null},K===null?($=K=ie,A=X):K=K.next=ie,x|=Q;if(M=M.next,M===null){if(M=g.shared.pending,M===null)break;Q=M,M=Q.next,Q.next=null,g.lastBaseUpdate=Q,g.shared.pending=null}}while(!0);if(K===null&&(A=X),g.baseState=A,g.firstBaseUpdate=$,g.lastBaseUpdate=K,o=g.shared.interleaved,o!==null){g=o;do x|=g.lane,g=g.next;while(g!==o)}else v===null&&(g.shared.lanes=0);Ir|=x,i.lanes=x,i.memoizedState=X}}function yg(i,o,u){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var d=i[o],g=d.callback;if(g!==null){if(d.callback=null,d=u,typeof g!="function")throw Error(t(191,g));g.call(d)}}}var _g=new n.Component().refs;function fu(i,o,u,d){o=i.memoizedState,u=u(d,o),u=u==null?o:C({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Fo={isMounted:function(i){return(i=i._reactInternals)?Er(i)===i:!1},enqueueSetState:function(i,o,u){i=i._reactInternals;var d=Et(),g=ur(i),v=Ln(d,g);v.payload=o,u!=null&&(v.callback=u),o=sr(i,v,g),o!==null&&(cn(o,i,g,d),No(o,i,g))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var d=Et(),g=ur(i),v=Ln(d,g);v.tag=1,v.payload=o,u!=null&&(v.callback=u),o=sr(i,v,g),o!==null&&(cn(o,i,g,d),No(o,i,g))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Et(),d=ur(i),g=Ln(u,d);g.tag=2,o!=null&&(g.callback=o),o=sr(i,g,d),o!==null&&(cn(o,i,d,u),No(o,i,d))}};function bg(i,o,u,d,g,v,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(d,v,x):o.prototype&&o.prototype.isPureReactComponent?!es(u,d)||!es(g,v):!0}function xg(i,o,u){var d=!1,g=nr,v=o.contextType;return typeof v=="object"&&v!==null?v=Kt(v):(g=Ct(o)?Pr:mt.current,d=o.contextTypes,v=(d=d!=null)?hi(i,g):nr),o=new o(u,v),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Fo,i.stateNode=o,o._reactInternals=i,d&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=v),o}function Sg(i,o,u,d){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,d),o.state!==i&&Fo.enqueueReplaceState(o,o.state,null)}function du(i,o,u,d){var g=i.stateNode;g.props=u,g.state=i.memoizedState,g.refs=_g,cu(i);var v=o.contextType;typeof v=="object"&&v!==null?g.context=Kt(v):(v=Ct(o)?Pr:mt.current,g.context=hi(i,v)),g.state=i.memoizedState,v=o.getDerivedStateFromProps,typeof v=="function"&&(fu(i,o,v,u),g.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&Fo.enqueueReplaceState(g,g.state,null),jo(i,u,g,d),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function as(i,o,u){if(i=u.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(t(309));var d=u.stateNode}if(!d)throw Error(t(147,i));var g=d,v=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===v?o.ref:(o=function(x){var M=g.refs;M===_g&&(M=g.refs={}),x===null?delete M[v]:M[v]=x},o._stringRef=v,o)}if(typeof i!="string")throw Error(t(284));if(!u._owner)throw Error(t(290,i))}return i}function zo(i,o){throw i=Object.prototype.toString.call(o),Error(t(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function wg(i){var o=i._init;return o(i._payload)}function kg(i){function o(F,N){if(i){var z=F.deletions;z===null?(F.deletions=[N],F.flags|=16):z.push(N)}}function u(F,N){if(!i)return null;for(;N!==null;)o(F,N),N=N.sibling;return null}function d(F,N){for(F=new Map;N!==null;)N.key!==null?F.set(N.key,N):F.set(N.index,N),N=N.sibling;return F}function g(F,N){return F=fr(F,N),F.index=0,F.sibling=null,F}function v(F,N,z){return F.index=z,i?(z=F.alternate,z!==null?(z=z.index,z<N?(F.flags|=2,N):z):(F.flags|=2,N)):(F.flags|=1048576,N)}function x(F){return i&&F.alternate===null&&(F.flags|=2),F}function M(F,N,z,Z){return N===null||N.tag!==6?(N=Qu(z,F.mode,Z),N.return=F,N):(N=g(N,z),N.return=F,N)}function A(F,N,z,Z){var fe=z.type;return fe===D?K(F,N,z.props.children,Z,z.key):N!==null&&(N.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===L&&wg(fe)===N.type)?(Z=g(N,z.props),Z.ref=as(F,N,z),Z.return=F,Z):(Z=ia(z.type,z.key,z.props,null,F.mode,Z),Z.ref=as(F,N,z),Z.return=F,Z)}function $(F,N,z,Z){return N===null||N.tag!==4||N.stateNode.containerInfo!==z.containerInfo||N.stateNode.implementation!==z.implementation?(N=Ku(z,F.mode,Z),N.return=F,N):(N=g(N,z.children||[]),N.return=F,N)}function K(F,N,z,Z,fe){return N===null||N.tag!==7?(N=jr(z,F.mode,Z,fe),N.return=F,N):(N=g(N,z),N.return=F,N)}function X(F,N,z){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Qu(""+N,F.mode,z),N.return=F,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case P:return z=ia(N.type,N.key,N.props,null,F.mode,z),z.ref=as(F,null,N),z.return=F,z;case T:return N=Ku(N,F.mode,z),N.return=F,N;case L:var Z=N._init;return X(F,Z(N._payload),z)}if(kr(N)||U(N))return N=jr(N,F.mode,z,null),N.return=F,N;zo(F,N)}return null}function Q(F,N,z,Z){var fe=N!==null?N.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return fe!==null?null:M(F,N,""+z,Z);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case P:return z.key===fe?A(F,N,z,Z):null;case T:return z.key===fe?$(F,N,z,Z):null;case L:return fe=z._init,Q(F,N,fe(z._payload),Z)}if(kr(z)||U(z))return fe!==null?null:K(F,N,z,Z,null);zo(F,z)}return null}function ie(F,N,z,Z,fe){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return F=F.get(z)||null,M(N,F,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case P:return F=F.get(Z.key===null?z:Z.key)||null,A(N,F,Z,fe);case T:return F=F.get(Z.key===null?z:Z.key)||null,$(N,F,Z,fe);case L:var de=Z._init;return ie(F,N,z,de(Z._payload),fe)}if(kr(Z)||U(Z))return F=F.get(z)||null,K(N,F,Z,fe,null);zo(N,Z)}return null}function le(F,N,z,Z){for(var fe=null,de=null,he=N,pe=N=0,lt=null;he!==null&&pe<z.length;pe++){he.index>pe?(lt=he,he=null):lt=he.sibling;var Pe=Q(F,he,z[pe],Z);if(Pe===null){he===null&&(he=lt);break}i&&he&&Pe.alternate===null&&o(F,he),N=v(Pe,N,pe),de===null?fe=Pe:de.sibling=Pe,de=Pe,he=lt}if(pe===z.length)return u(F,he),Be&&Mr(F,pe),fe;if(he===null){for(;pe<z.length;pe++)he=X(F,z[pe],Z),he!==null&&(N=v(he,N,pe),de===null?fe=he:de.sibling=he,de=he);return Be&&Mr(F,pe),fe}for(he=d(F,he);pe<z.length;pe++)lt=ie(he,F,pe,z[pe],Z),lt!==null&&(i&<.alternate!==null&&he.delete(lt.key===null?pe:lt.key),N=v(lt,N,pe),de===null?fe=lt:de.sibling=lt,de=lt);return i&&he.forEach(function(dr){return o(F,dr)}),Be&&Mr(F,pe),fe}function ce(F,N,z,Z){var fe=U(z);if(typeof fe!="function")throw Error(t(150));if(z=fe.call(z),z==null)throw Error(t(151));for(var de=fe=null,he=N,pe=N=0,lt=null,Pe=z.next();he!==null&&!Pe.done;pe++,Pe=z.next()){he.index>pe?(lt=he,he=null):lt=he.sibling;var dr=Q(F,he,Pe.value,Z);if(dr===null){he===null&&(he=lt);break}i&&he&&dr.alternate===null&&o(F,he),N=v(dr,N,pe),de===null?fe=dr:de.sibling=dr,de=dr,he=lt}if(Pe.done)return u(F,he),Be&&Mr(F,pe),fe;if(he===null){for(;!Pe.done;pe++,Pe=z.next())Pe=X(F,Pe.value,Z),Pe!==null&&(N=v(Pe,N,pe),de===null?fe=Pe:de.sibling=Pe,de=Pe);return Be&&Mr(F,pe),fe}for(he=d(F,he);!Pe.done;pe++,Pe=z.next())Pe=ie(he,F,pe,Pe.value,Z),Pe!==null&&(i&&Pe.alternate!==null&&he.delete(Pe.key===null?pe:Pe.key),N=v(Pe,N,pe),de===null?fe=Pe:de.sibling=Pe,de=Pe);return i&&he.forEach(function(Hw){return o(F,Hw)}),Be&&Mr(F,pe),fe}function Xe(F,N,z,Z){if(typeof z=="object"&&z!==null&&z.type===D&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case P:e:{for(var fe=z.key,de=N;de!==null;){if(de.key===fe){if(fe=z.type,fe===D){if(de.tag===7){u(F,de.sibling),N=g(de,z.props.children),N.return=F,F=N;break e}}else if(de.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===L&&wg(fe)===de.type){u(F,de.sibling),N=g(de,z.props),N.ref=as(F,de,z),N.return=F,F=N;break e}u(F,de);break}else o(F,de);de=de.sibling}z.type===D?(N=jr(z.props.children,F.mode,Z,z.key),N.return=F,F=N):(Z=ia(z.type,z.key,z.props,null,F.mode,Z),Z.ref=as(F,N,z),Z.return=F,F=Z)}return x(F);case T:e:{for(de=z.key;N!==null;){if(N.key===de)if(N.tag===4&&N.stateNode.containerInfo===z.containerInfo&&N.stateNode.implementation===z.implementation){u(F,N.sibling),N=g(N,z.children||[]),N.return=F,F=N;break e}else{u(F,N);break}else o(F,N);N=N.sibling}N=Ku(z,F.mode,Z),N.return=F,F=N}return x(F);case L:return de=z._init,Xe(F,N,de(z._payload),Z)}if(kr(z))return le(F,N,z,Z);if(U(z))return ce(F,N,z,Z);zo(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,N!==null&&N.tag===6?(u(F,N.sibling),N=g(N,z),N.return=F,F=N):(u(F,N),N=Qu(z,F.mode,Z),N.return=F,F=N),x(F)):u(F,N)}return Xe}var _i=kg(!0),Eg=kg(!1),ls={},bn=tr(ls),us=tr(ls),cs=tr(ls);function Tr(i){if(i===ls)throw Error(t(174));return i}function hu(i,o){switch(De(cs,o),De(us,i),De(bn,ls),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:xe(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=xe(o,i)}Le(bn),De(bn,o)}function bi(){Le(bn),Le(us),Le(cs)}function Og(i){Tr(cs.current);var o=Tr(bn.current),u=xe(o,i.type);o!==u&&(De(us,i),De(bn,u))}function pu(i){us.current===i&&(Le(bn),Le(us))}var We=tr(0);function qo(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var gu=[];function mu(){for(var i=0;i<gu.length;i++)gu[i]._workInProgressVersionPrimary=null;gu.length=0}var Bo=O.ReactCurrentDispatcher,vu=O.ReactCurrentBatchConfig,Dr=0,Ue=null,nt=null,ot=null,$o=!1,fs=!1,ds=0,pw=0;function vt(){throw Error(t(321))}function yu(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!sn(i[u],o[u]))return!1;return!0}function _u(i,o,u,d,g,v){if(Dr=v,Ue=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Bo.current=i===null||i.memoizedState===null?yw:_w,i=u(d,g),fs){v=0;do{if(fs=!1,ds=0,25<=v)throw Error(t(301));v+=1,ot=nt=null,o.updateQueue=null,Bo.current=bw,i=u(d,g)}while(fs)}if(Bo.current=Uo,o=nt!==null&&nt.next!==null,Dr=0,ot=nt=Ue=null,$o=!1,o)throw Error(t(300));return i}function bu(){var i=ds!==0;return ds=0,i}function xn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Ue.memoizedState=ot=i:ot=ot.next=i,ot}function Xt(){if(nt===null){var i=Ue.alternate;i=i!==null?i.memoizedState:null}else i=nt.next;var o=ot===null?Ue.memoizedState:ot.next;if(o!==null)ot=o,nt=i;else{if(i===null)throw Error(t(310));nt=i,i={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},ot===null?Ue.memoizedState=ot=i:ot=ot.next=i}return ot}function hs(i,o){return typeof o=="function"?o(i):o}function xu(i){var o=Xt(),u=o.queue;if(u===null)throw Error(t(311));u.lastRenderedReducer=i;var d=nt,g=d.baseQueue,v=u.pending;if(v!==null){if(g!==null){var x=g.next;g.next=v.next,v.next=x}d.baseQueue=g=v,u.pending=null}if(g!==null){v=g.next,d=d.baseState;var M=x=null,A=null,$=v;do{var K=$.lane;if((Dr&K)===K)A!==null&&(A=A.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),d=$.hasEagerState?$.eagerState:i(d,$.action);else{var X={lane:K,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};A===null?(M=A=X,x=d):A=A.next=X,Ue.lanes|=K,Ir|=K}$=$.next}while($!==null&&$!==v);A===null?x=d:A.next=M,sn(d,o.memoizedState)||(Mt=!0),o.memoizedState=d,o.baseState=x,o.baseQueue=A,u.lastRenderedState=d}if(i=u.interleaved,i!==null){g=i;do v=g.lane,Ue.lanes|=v,Ir|=v,g=g.next;while(g!==i)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function Su(i){var o=Xt(),u=o.queue;if(u===null)throw Error(t(311));u.lastRenderedReducer=i;var d=u.dispatch,g=u.pending,v=o.memoizedState;if(g!==null){u.pending=null;var x=g=g.next;do v=i(v,x.action),x=x.next;while(x!==g);sn(v,o.memoizedState)||(Mt=!0),o.memoizedState=v,o.baseQueue===null&&(o.baseState=v),u.lastRenderedState=v}return[v,d]}function Pg(){}function Cg(i,o){var u=Ue,d=Xt(),g=o(),v=!sn(d.memoizedState,g);if(v&&(d.memoizedState=g,Mt=!0),d=d.queue,wu(Tg.bind(null,u,d,i),[i]),d.getSnapshot!==o||v||ot!==null&&ot.memoizedState.tag&1){if(u.flags|=2048,ps(9,Rg.bind(null,u,d,g,o),void 0,null),at===null)throw Error(t(349));(Dr&30)!==0||Mg(u,o,g)}return g}function Mg(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Ue.updateQueue,o===null?(o={lastEffect:null,stores:null},Ue.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function Rg(i,o,u,d){o.value=u,o.getSnapshot=d,Dg(o)&&Ig(i)}function Tg(i,o,u){return u(function(){Dg(o)&&Ig(i)})}function Dg(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!sn(i,u)}catch{return!0}}function Ig(i){var o=An(i,1);o!==null&&cn(o,i,1,-1)}function Ag(i){var o=xn();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:i},o.queue=i,i=i.dispatch=vw.bind(null,Ue,i),[o.memoizedState,i]}function ps(i,o,u,d){return i={tag:i,create:o,destroy:u,deps:d,next:null},o=Ue.updateQueue,o===null?(o={lastEffect:null,stores:null},Ue.updateQueue=o,o.lastEffect=i.next=i):(u=o.lastEffect,u===null?o.lastEffect=i.next=i:(d=u.next,u.next=i,i.next=d,o.lastEffect=i)),i}function Lg(){return Xt().memoizedState}function Vo(i,o,u,d){var g=xn();Ue.flags|=i,g.memoizedState=ps(1|o,u,void 0,d===void 0?null:d)}function Wo(i,o,u,d){var g=Xt();d=d===void 0?null:d;var v=void 0;if(nt!==null){var x=nt.memoizedState;if(v=x.destroy,d!==null&&yu(d,x.deps)){g.memoizedState=ps(o,u,v,d);return}}Ue.flags|=i,g.memoizedState=ps(1|o,u,v,d)}function Ng(i,o){return Vo(8390656,8,i,o)}function wu(i,o){return Wo(2048,8,i,o)}function jg(i,o){return Wo(4,2,i,o)}function Fg(i,o){return Wo(4,4,i,o)}function zg(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function qg(i,o,u){return u=u!=null?u.concat([i]):null,Wo(4,4,zg.bind(null,o,i),u)}function ku(){}function Bg(i,o){var u=Xt();o=o===void 0?null:o;var d=u.memoizedState;return d!==null&&o!==null&&yu(o,d[1])?d[0]:(u.memoizedState=[i,o],i)}function $g(i,o){var u=Xt();o=o===void 0?null:o;var d=u.memoizedState;return d!==null&&o!==null&&yu(o,d[1])?d[0]:(i=i(),u.memoizedState=[i,o],i)}function Vg(i,o,u){return(Dr&21)===0?(i.baseState&&(i.baseState=!1,Mt=!0),i.memoizedState=u):(sn(u,o)||(u=gp(),Ue.lanes|=u,Ir|=u,i.baseState=!0),o)}function gw(i,o){var u=Me;Me=u!==0&&4>u?u:4,i(!0);var d=vu.transition;vu.transition={};try{i(!1),o()}finally{Me=u,vu.transition=d}}function Wg(){return Xt().memoizedState}function mw(i,o,u){var d=ur(i);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},Ug(i))Hg(o,u);else if(u=gg(i,o,u,d),u!==null){var g=Et();cn(u,i,d,g),Yg(u,o,d)}}function vw(i,o,u){var d=ur(i),g={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(Ug(i))Hg(o,g);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=o.lastRenderedReducer,v!==null))try{var x=o.lastRenderedState,M=v(x,u);if(g.hasEagerState=!0,g.eagerState=M,sn(M,x)){var A=o.interleaved;A===null?(g.next=g,uu(o)):(g.next=A.next,A.next=g),o.interleaved=g;return}}catch{}u=gg(i,o,g,d),u!==null&&(g=Et(),cn(u,i,d,g),Yg(u,o,d))}}function Ug(i){var o=i.alternate;return i===Ue||o!==null&&o===Ue}function Hg(i,o){fs=$o=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function Yg(i,o,u){if((u&4194240)!==0){var d=o.lanes;d&=i.pendingLanes,u|=d,o.lanes=u,kl(i,u)}}var Uo={readContext:Kt,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},yw={readContext:Kt,useCallback:function(i,o){return xn().memoizedState=[i,o===void 0?null:o],i},useContext:Kt,useEffect:Ng,useImperativeHandle:function(i,o,u){return u=u!=null?u.concat([i]):null,Vo(4194308,4,zg.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Vo(4194308,4,i,o)},useInsertionEffect:function(i,o){return Vo(4,2,i,o)},useMemo:function(i,o){var u=xn();return o=o===void 0?null:o,i=i(),u.memoizedState=[i,o],i},useReducer:function(i,o,u){var d=xn();return o=u!==void 0?u(o):o,d.memoizedState=d.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},d.queue=i,i=i.dispatch=mw.bind(null,Ue,i),[d.memoizedState,i]},useRef:function(i){var o=xn();return i={current:i},o.memoizedState=i},useState:Ag,useDebugValue:ku,useDeferredValue:function(i){return xn().memoizedState=i},useTransition:function(){var i=Ag(!1),o=i[0];return i=gw.bind(null,i[1]),xn().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,u){var d=Ue,g=xn();if(Be){if(u===void 0)throw Error(t(407));u=u()}else{if(u=o(),at===null)throw Error(t(349));(Dr&30)!==0||Mg(d,o,u)}g.memoizedState=u;var v={value:u,getSnapshot:o};return g.queue=v,Ng(Tg.bind(null,d,v,i),[i]),d.flags|=2048,ps(9,Rg.bind(null,d,v,u,o),void 0,null),u},useId:function(){var i=xn(),o=at.identifierPrefix;if(Be){var u=In,d=Dn;u=(d&~(1<<32-rn(d)-1)).toString(32)+u,o=":"+o+"R"+u,u=ds++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=pw++,o=":"+o+"r"+u.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},_w={readContext:Kt,useCallback:Bg,useContext:Kt,useEffect:wu,useImperativeHandle:qg,useInsertionEffect:jg,useLayoutEffect:Fg,useMemo:$g,useReducer:xu,useRef:Lg,useState:function(){return xu(hs)},useDebugValue:ku,useDeferredValue:function(i){var o=Xt();return Vg(o,nt.memoizedState,i)},useTransition:function(){var i=xu(hs)[0],o=Xt().memoizedState;return[i,o]},useMutableSource:Pg,useSyncExternalStore:Cg,useId:Wg,unstable_isNewReconciler:!1},bw={readContext:Kt,useCallback:Bg,useContext:Kt,useEffect:wu,useImperativeHandle:qg,useInsertionEffect:jg,useLayoutEffect:Fg,useMemo:$g,useReducer:Su,useRef:Lg,useState:function(){return Su(hs)},useDebugValue:ku,useDeferredValue:function(i){var o=Xt();return nt===null?o.memoizedState=i:Vg(o,nt.memoizedState,i)},useTransition:function(){var i=Su(hs)[0],o=Xt().memoizedState;return[i,o]},useMutableSource:Pg,useSyncExternalStore:Cg,useId:Wg,unstable_isNewReconciler:!1};function xi(i,o){try{var u="",d=o;do u+=se(d),d=d.return;while(d);var g=u}catch(v){g=`
|
|
7
|
+
Error generating stack: `+v.message+`
|
|
8
|
+
`+v.stack}return{value:i,source:o,stack:g,digest:null}}function Eu(i,o,u){return{value:i,source:null,stack:u??null,digest:o??null}}function Ou(i,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var xw=typeof WeakMap=="function"?WeakMap:Map;function Gg(i,o,u){u=Ln(-1,u),u.tag=3,u.payload={element:null};var d=o.value;return u.callback=function(){Jo||(Jo=!0,Bu=d),Ou(i,o)},u}function Qg(i,o,u){u=Ln(-1,u),u.tag=3;var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;u.payload=function(){return d(g)},u.callback=function(){Ou(i,o)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(u.callback=function(){Ou(i,o),typeof d!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),u}function Kg(i,o,u){var d=i.pingCache;if(d===null){d=i.pingCache=new xw;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(u)||(g.add(u),i=Lw.bind(null,i,o,u),o.then(i,i))}function Xg(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function Jg(i,o,u,d,g){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Ln(-1,1),o.tag=2,sr(u,o,1))),u.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var Sw=O.ReactCurrentOwner,Mt=!1;function kt(i,o,u,d){o.child=i===null?Eg(o,null,u,d):_i(o,i.child,u,d)}function Zg(i,o,u,d,g){u=u.render;var v=o.ref;return yi(o,g),d=_u(i,o,u,d,v,g),u=bu(),i!==null&&!Mt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~g,Nn(i,o,g)):(Be&&u&&eu(o),o.flags|=1,kt(i,o,d,g),o.child)}function em(i,o,u,d,g){if(i===null){var v=u.type;return typeof v=="function"&&!Gu(v)&&v.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=v,tm(i,o,v,d,g)):(i=ia(u.type,null,d,o,o.mode,g),i.ref=o.ref,i.return=o,o.child=i)}if(v=i.child,(i.lanes&g)===0){var x=v.memoizedProps;if(u=u.compare,u=u!==null?u:es,u(x,d)&&i.ref===o.ref)return Nn(i,o,g)}return o.flags|=1,i=fr(v,d),i.ref=o.ref,i.return=o,o.child=i}function tm(i,o,u,d,g){if(i!==null){var v=i.memoizedProps;if(es(v,d)&&i.ref===o.ref)if(Mt=!1,o.pendingProps=d=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Mt=!0);else return o.lanes=i.lanes,Nn(i,o,g)}return Pu(i,o,u,d,g)}function nm(i,o,u){var d=o.pendingProps,g=d.children,v=i!==null?i.memoizedState:null;if(d.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(wi,$t),$t|=u;else{if((u&1073741824)===0)return i=v!==null?v.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,De(wi,$t),$t|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=v!==null?v.baseLanes:u,De(wi,$t),$t|=d}else v!==null?(d=v.baseLanes|u,o.memoizedState=null):d=u,De(wi,$t),$t|=d;return kt(i,o,g,u),o.child}function rm(i,o){var u=o.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function Pu(i,o,u,d,g){var v=Ct(u)?Pr:mt.current;return v=hi(o,v),yi(o,g),u=_u(i,o,u,d,v,g),d=bu(),i!==null&&!Mt?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~g,Nn(i,o,g)):(Be&&d&&eu(o),o.flags|=1,kt(i,o,u,g),o.child)}function im(i,o,u,d,g){if(Ct(u)){var v=!0;Mo(o)}else v=!1;if(yi(o,g),o.stateNode===null)Yo(i,o),xg(o,u,d),du(o,u,d,g),d=!0;else if(i===null){var x=o.stateNode,M=o.memoizedProps;x.props=M;var A=x.context,$=u.contextType;typeof $=="object"&&$!==null?$=Kt($):($=Ct(u)?Pr:mt.current,$=hi(o,$));var K=u.getDerivedStateFromProps,X=typeof K=="function"||typeof x.getSnapshotBeforeUpdate=="function";X||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==d||A!==$)&&Sg(o,x,d,$),ir=!1;var Q=o.memoizedState;x.state=Q,jo(o,d,x,g),A=o.memoizedState,M!==d||Q!==A||Pt.current||ir?(typeof K=="function"&&(fu(o,u,K,d),A=o.memoizedState),(M=ir||bg(o,u,M,d,Q,A,$))?(X||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=A),x.props=d,x.state=A,x.context=$,d=M):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{x=o.stateNode,mg(i,o),M=o.memoizedProps,$=o.type===o.elementType?M:an(o.type,M),x.props=$,X=o.pendingProps,Q=x.context,A=u.contextType,typeof A=="object"&&A!==null?A=Kt(A):(A=Ct(u)?Pr:mt.current,A=hi(o,A));var ie=u.getDerivedStateFromProps;(K=typeof ie=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(M!==X||Q!==A)&&Sg(o,x,d,A),ir=!1,Q=o.memoizedState,x.state=Q,jo(o,d,x,g);var le=o.memoizedState;M!==X||Q!==le||Pt.current||ir?(typeof ie=="function"&&(fu(o,u,ie,d),le=o.memoizedState),($=ir||bg(o,u,$,d,Q,le,A)||!1)?(K||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,le,A),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,le,A)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&Q===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&Q===i.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=le),x.props=d,x.state=le,x.context=A,d=$):(typeof x.componentDidUpdate!="function"||M===i.memoizedProps&&Q===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&Q===i.memoizedState||(o.flags|=1024),d=!1)}return Cu(i,o,u,d,v,g)}function Cu(i,o,u,d,g,v){rm(i,o);var x=(o.flags&128)!==0;if(!d&&!x)return g&&lg(o,u,!1),Nn(i,o,v);d=o.stateNode,Sw.current=o;var M=x&&typeof u.getDerivedStateFromError!="function"?null:d.render();return o.flags|=1,i!==null&&x?(o.child=_i(o,i.child,null,v),o.child=_i(o,null,M,v)):kt(i,o,M,v),o.memoizedState=d.state,g&&lg(o,u,!0),o.child}function sm(i){var o=i.stateNode;o.pendingContext?og(i,o.pendingContext,o.pendingContext!==o.context):o.context&&og(i,o.context,!1),hu(i,o.containerInfo)}function om(i,o,u,d,g){return mi(),iu(g),o.flags|=256,kt(i,o,u,d),o.child}var Mu={dehydrated:null,treeContext:null,retryLane:0};function Ru(i){return{baseLanes:i,cachePool:null,transitions:null}}function am(i,o,u){var d=o.pendingProps,g=We.current,v=!1,x=(o.flags&128)!==0,M;if((M=x)||(M=i!==null&&i.memoizedState===null?!1:(g&2)!==0),M?(v=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),De(We,g&1),i===null)return ru(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=d.children,i=d.fallback,v?(d=o.mode,v=o.child,x={mode:"hidden",children:x},(d&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=x):v=sa(x,d,0,null),i=jr(i,d,u,null),v.return=o,i.return=o,v.sibling=i,o.child=v,o.child.memoizedState=Ru(u),o.memoizedState=Mu,i):Tu(o,x));if(g=i.memoizedState,g!==null&&(M=g.dehydrated,M!==null))return ww(i,o,x,d,M,g,u);if(v){v=d.fallback,x=o.mode,g=i.child,M=g.sibling;var A={mode:"hidden",children:d.children};return(x&1)===0&&o.child!==g?(d=o.child,d.childLanes=0,d.pendingProps=A,o.deletions=null):(d=fr(g,A),d.subtreeFlags=g.subtreeFlags&14680064),M!==null?v=fr(M,v):(v=jr(v,x,u,null),v.flags|=2),v.return=o,d.return=o,d.sibling=v,o.child=d,d=v,v=o.child,x=i.child.memoizedState,x=x===null?Ru(u):{baseLanes:x.baseLanes|u,cachePool:null,transitions:x.transitions},v.memoizedState=x,v.childLanes=i.childLanes&~u,o.memoizedState=Mu,d}return v=i.child,i=v.sibling,d=fr(v,{mode:"visible",children:d.children}),(o.mode&1)===0&&(d.lanes=u),d.return=o,d.sibling=null,i!==null&&(u=o.deletions,u===null?(o.deletions=[i],o.flags|=16):u.push(i)),o.child=d,o.memoizedState=null,d}function Tu(i,o){return o=sa({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function Ho(i,o,u,d){return d!==null&&iu(d),_i(o,i.child,null,u),i=Tu(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function ww(i,o,u,d,g,v,x){if(u)return o.flags&256?(o.flags&=-257,d=Eu(Error(t(422))),Ho(i,o,x,d)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(v=d.fallback,g=o.mode,d=sa({mode:"visible",children:d.children},g,0,null),v=jr(v,g,x,null),v.flags|=2,d.return=o,v.return=o,d.sibling=v,o.child=d,(o.mode&1)!==0&&_i(o,i.child,null,x),o.child.memoizedState=Ru(x),o.memoizedState=Mu,v);if((o.mode&1)===0)return Ho(i,o,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var M=d.dgst;return d=M,v=Error(t(419)),d=Eu(v,d,void 0),Ho(i,o,x,d)}if(M=(x&i.childLanes)!==0,Mt||M){if(d=at,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,An(i,g),cn(d,i,g,-1))}return Yu(),d=Eu(Error(t(421))),Ho(i,o,x,d)}return g.data==="$?"?(o.flags|=128,o.child=i.child,o=Nw.bind(null,i),g._reactRetry=o,null):(i=v.treeContext,Bt=er(g.nextSibling),qt=o,Be=!0,on=null,i!==null&&(Gt[Qt++]=Dn,Gt[Qt++]=In,Gt[Qt++]=Cr,Dn=i.id,In=i.overflow,Cr=o),o=Tu(o,d.children),o.flags|=4096,o)}function lm(i,o,u){i.lanes|=o;var d=i.alternate;d!==null&&(d.lanes|=o),lu(i.return,o,u)}function Du(i,o,u,d,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g}:(v.isBackwards=o,v.rendering=null,v.renderingStartTime=0,v.last=d,v.tail=u,v.tailMode=g)}function um(i,o,u){var d=o.pendingProps,g=d.revealOrder,v=d.tail;if(kt(i,o,d.children,u),d=We.current,(d&2)!==0)d=d&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&lm(i,u,o);else if(i.tag===19)lm(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}d&=1}if(De(We,d),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)i=u.alternate,i!==null&&qo(i)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),Du(o,!1,g,u,v);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(i=g.alternate,i!==null&&qo(i)===null){o.child=g;break}i=g.sibling,g.sibling=u,u=g,g=i}Du(o,!0,u,null,v);break;case"together":Du(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Yo(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function Nn(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Ir|=o.lanes,(u&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(t(153));if(o.child!==null){for(i=o.child,u=fr(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=fr(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function kw(i,o,u){switch(o.tag){case 3:sm(o),mi();break;case 5:Og(o);break;case 1:Ct(o.type)&&Mo(o);break;case 4:hu(o,o.stateNode.containerInfo);break;case 10:var d=o.type._context,g=o.memoizedProps.value;De(Ao,d._currentValue),d._currentValue=g;break;case 13:if(d=o.memoizedState,d!==null)return d.dehydrated!==null?(De(We,We.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?am(i,o,u):(De(We,We.current&1),i=Nn(i,o,u),i!==null?i.sibling:null);De(We,We.current&1);break;case 19:if(d=(u&o.childLanes)!==0,(i.flags&128)!==0){if(d)return um(i,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),De(We,We.current),d)break;return null;case 22:case 23:return o.lanes=0,nm(i,o,u)}return Nn(i,o,u)}var cm,Iu,fm,dm;cm=function(i,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Iu=function(){},fm=function(i,o,u,d){var g=i.memoizedProps;if(g!==d){i=o.stateNode,Tr(bn.current);var v=null;switch(u){case"input":g=wt(i,g),d=wt(i,d),v=[];break;case"select":g=C({},g,{value:void 0}),d=C({},d,{value:void 0}),v=[];break;case"textarea":g=mn(i,g),d=mn(i,d),v=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(i.onclick=Oo)}hl(u,d);var x;u=null;for($ in g)if(!d.hasOwnProperty($)&&g.hasOwnProperty($)&&g[$]!=null)if($==="style"){var M=g[$];for(x in M)M.hasOwnProperty(x)&&(u||(u={}),u[x]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(s.hasOwnProperty($)?v||(v=[]):(v=v||[]).push($,null));for($ in d){var A=d[$];if(M=g?.[$],d.hasOwnProperty($)&&A!==M&&(A!=null||M!=null))if($==="style")if(M){for(x in M)!M.hasOwnProperty(x)||A&&A.hasOwnProperty(x)||(u||(u={}),u[x]="");for(x in A)A.hasOwnProperty(x)&&M[x]!==A[x]&&(u||(u={}),u[x]=A[x])}else u||(v||(v=[]),v.push($,u)),u=A;else $==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,M=M?M.__html:void 0,A!=null&&M!==A&&(v=v||[]).push($,A)):$==="children"?typeof A!="string"&&typeof A!="number"||(v=v||[]).push($,""+A):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(s.hasOwnProperty($)?(A!=null&&$==="onScroll"&&Ae("scroll",i),v||M===A||(v=[])):(v=v||[]).push($,A))}u&&(v=v||[]).push("style",u);var $=v;(o.updateQueue=$)&&(o.flags|=4)}},dm=function(i,o,u,d){u!==d&&(o.flags|=4)};function gs(i,o){if(!Be)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:d.sibling=null}}function yt(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,d=0;if(o)for(var g=i.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=d,i.childLanes=u,o}function Ew(i,o,u){var d=o.pendingProps;switch(tu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(o),null;case 1:return Ct(o.type)&&Co(),yt(o),null;case 3:return d=o.stateNode,bi(),Le(Pt),Le(mt),mu(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(i===null||i.child===null)&&(Io(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,on!==null&&(Wu(on),on=null))),Iu(i,o),yt(o),null;case 5:pu(o);var g=Tr(cs.current);if(u=o.type,i!==null&&o.stateNode!=null)fm(i,o,u,d,g),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!d){if(o.stateNode===null)throw Error(t(166));return yt(o),null}if(i=Tr(bn.current),Io(o)){d=o.stateNode,u=o.type;var v=o.memoizedProps;switch(d[_n]=o,d[ss]=v,i=(o.mode&1)!==0,u){case"dialog":Ae("cancel",d),Ae("close",d);break;case"iframe":case"object":case"embed":Ae("load",d);break;case"video":case"audio":for(g=0;g<ns.length;g++)Ae(ns[g],d);break;case"source":Ae("error",d);break;case"img":case"image":case"link":Ae("error",d),Ae("load",d);break;case"details":Ae("toggle",d);break;case"input":tt(d,v),Ae("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!v.multiple},Ae("invalid",d);break;case"textarea":ti(d,v),Ae("invalid",d)}hl(u,v),g=null;for(var x in v)if(v.hasOwnProperty(x)){var M=v[x];x==="children"?typeof M=="string"?d.textContent!==M&&(v.suppressHydrationWarning!==!0&&Eo(d.textContent,M,i),g=["children",M]):typeof M=="number"&&d.textContent!==""+M&&(v.suppressHydrationWarning!==!0&&Eo(d.textContent,M,i),g=["children",""+M]):s.hasOwnProperty(x)&&M!=null&&x==="onScroll"&&Ae("scroll",d)}switch(u){case"input":Qe(d),ro(d,v,!0);break;case"textarea":Qe(d),me(d);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(d.onclick=Oo)}d=g,o.updateQueue=d,d!==null&&(o.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Oe(u)),i==="http://www.w3.org/1999/xhtml"?u==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof d.is=="string"?i=x.createElement(u,{is:d.is}):(i=x.createElement(u),u==="select"&&(x=i,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):i=x.createElementNS(i,u),i[_n]=o,i[ss]=d,cm(i,o,!1,!1),o.stateNode=i;e:{switch(x=pl(u,d),u){case"dialog":Ae("cancel",i),Ae("close",i),g=d;break;case"iframe":case"object":case"embed":Ae("load",i),g=d;break;case"video":case"audio":for(g=0;g<ns.length;g++)Ae(ns[g],i);g=d;break;case"source":Ae("error",i),g=d;break;case"img":case"image":case"link":Ae("error",i),Ae("load",i),g=d;break;case"details":Ae("toggle",i),g=d;break;case"input":tt(i,d),g=wt(i,d),Ae("invalid",i);break;case"option":g=d;break;case"select":i._wrapperState={wasMultiple:!!d.multiple},g=C({},d,{value:void 0}),Ae("invalid",i);break;case"textarea":ti(i,d),g=mn(i,d),Ae("invalid",i);break;default:g=d}hl(u,g),M=g;for(v in M)if(M.hasOwnProperty(v)){var A=M[v];v==="style"?Fi(i,A):v==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&Mn(i,A)):v==="children"?typeof A=="string"?(u!=="textarea"||A!=="")&&vn(i,A):typeof A=="number"&&vn(i,""+A):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(s.hasOwnProperty(v)?A!=null&&v==="onScroll"&&Ae("scroll",i):A!=null&&E(i,v,A,x))}switch(u){case"input":Qe(i),ro(i,d,!1);break;case"textarea":Qe(i),me(i);break;case"option":d.value!=null&&i.setAttribute("value",""+ge(d.value));break;case"select":i.multiple=!!d.multiple,v=d.value,v!=null?Ft(i,!!d.multiple,v,!1):d.defaultValue!=null&&Ft(i,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Oo)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return yt(o),null;case 6:if(i&&o.stateNode!=null)dm(i,o,i.memoizedProps,d);else{if(typeof d!="string"&&o.stateNode===null)throw Error(t(166));if(u=Tr(cs.current),Tr(bn.current),Io(o)){if(d=o.stateNode,u=o.memoizedProps,d[_n]=o,(v=d.nodeValue!==u)&&(i=qt,i!==null))switch(i.tag){case 3:Eo(d.nodeValue,u,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Eo(d.nodeValue,u,(i.mode&1)!==0)}v&&(o.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[_n]=o,o.stateNode=d}return yt(o),null;case 13:if(Le(We),d=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Be&&Bt!==null&&(o.mode&1)!==0&&(o.flags&128)===0)pg(),mi(),o.flags|=98560,v=!1;else if(v=Io(o),d!==null&&d.dehydrated!==null){if(i===null){if(!v)throw Error(t(318));if(v=o.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(t(317));v[_n]=o}else mi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;yt(o),v=!1}else on!==null&&(Wu(on),on=null),v=!0;if(!v)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(d=d!==null,d!==(i!==null&&i.memoizedState!==null)&&d&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(We.current&1)!==0?rt===0&&(rt=3):Yu())),o.updateQueue!==null&&(o.flags|=4),yt(o),null);case 4:return bi(),Iu(i,o),i===null&&rs(o.stateNode.containerInfo),yt(o),null;case 10:return au(o.type._context),yt(o),null;case 17:return Ct(o.type)&&Co(),yt(o),null;case 19:if(Le(We),v=o.memoizedState,v===null)return yt(o),null;if(d=(o.flags&128)!==0,x=v.rendering,x===null)if(d)gs(v,!1);else{if(rt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=qo(i),x!==null){for(o.flags|=128,gs(v,!1),d=x.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),o.subtreeFlags=0,d=u,u=o.child;u!==null;)v=u,i=d,v.flags&=14680066,x=v.alternate,x===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=x.childLanes,v.lanes=x.lanes,v.child=x.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=x.memoizedProps,v.memoizedState=x.memoizedState,v.updateQueue=x.updateQueue,v.type=x.type,i=x.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),u=u.sibling;return De(We,We.current&1|2),o.child}i=i.sibling}v.tail!==null&&Ke()>ki&&(o.flags|=128,d=!0,gs(v,!1),o.lanes=4194304)}else{if(!d)if(i=qo(x),i!==null){if(o.flags|=128,d=!0,u=i.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),gs(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!Be)return yt(o),null}else 2*Ke()-v.renderingStartTime>ki&&u!==1073741824&&(o.flags|=128,d=!0,gs(v,!1),o.lanes=4194304);v.isBackwards?(x.sibling=o.child,o.child=x):(u=v.last,u!==null?u.sibling=x:o.child=x,v.last=x)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=Ke(),o.sibling=null,u=We.current,De(We,d?u&1|2:u&1),o):(yt(o),null);case 22:case 23:return Hu(),d=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==d&&(o.flags|=8192),d&&(o.mode&1)!==0?($t&1073741824)!==0&&(yt(o),o.subtreeFlags&6&&(o.flags|=8192)):yt(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function Ow(i,o){switch(tu(o),o.tag){case 1:return Ct(o.type)&&Co(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return bi(),Le(Pt),Le(mt),mu(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return pu(o),null;case 13:if(Le(We),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(t(340));mi()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return Le(We),null;case 4:return bi(),null;case 10:return au(o.type._context),null;case 22:case 23:return Hu(),null;case 24:return null;default:return null}}var Go=!1,_t=!1,Pw=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Si(i,o){var u=i.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){He(i,o,d)}else u.current=null}function Au(i,o,u){try{u()}catch(d){He(i,o,d)}}var hm=!1;function Cw(i,o){if(Hl=po,i=Wp(),Fl(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var x=0,M=-1,A=-1,$=0,K=0,X=i,Q=null;t:for(;;){for(var ie;X!==u||g!==0&&X.nodeType!==3||(M=x+g),X!==v||d!==0&&X.nodeType!==3||(A=x+d),X.nodeType===3&&(x+=X.nodeValue.length),(ie=X.firstChild)!==null;)Q=X,X=ie;for(;;){if(X===i)break t;if(Q===u&&++$===g&&(M=x),Q===v&&++K===d&&(A=x),(ie=X.nextSibling)!==null)break;X=Q,Q=X.parentNode}X=ie}u=M===-1||A===-1?null:{start:M,end:A}}else u=null}u=u||{start:0,end:0}}else u=null;for(Yl={focusedElem:i,selectionRange:u},po=!1,oe=o;oe!==null;)if(o=oe,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,oe=i;else for(;oe!==null;){o=oe;try{var le=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(le!==null){var ce=le.memoizedProps,Xe=le.memoizedState,F=o.stateNode,N=F.getSnapshotBeforeUpdate(o.elementType===o.type?ce:an(o.type,ce),Xe);F.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var z=o.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Z){He(o,o.return,Z)}if(i=o.sibling,i!==null){i.return=o.return,oe=i;break}oe=o.return}return le=hm,hm=!1,le}function ms(i,o,u){var d=o.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&Au(o,u,v)}g=g.next}while(g!==d)}}function Qo(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&i)===i){var d=u.create;u.destroy=d()}u=u.next}while(u!==o)}}function Lu(i){var o=i.ref;if(o!==null){var u=i.stateNode;i.tag,i=u,typeof o=="function"?o(i):o.current=i}}function pm(i){var o=i.alternate;o!==null&&(i.alternate=null,pm(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[_n],delete o[ss],delete o[Xl],delete o[cw],delete o[fw])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function gm(i){return i.tag===5||i.tag===3||i.tag===4}function mm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||gm(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Nu(i,o,u){var d=i.tag;if(d===5||d===6)i=i.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(i,o):u.insertBefore(i,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(i,u)):(o=u,o.appendChild(i)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Oo));else if(d!==4&&(i=i.child,i!==null))for(Nu(i,o,u),i=i.sibling;i!==null;)Nu(i,o,u),i=i.sibling}function ju(i,o,u){var d=i.tag;if(d===5||d===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(d!==4&&(i=i.child,i!==null))for(ju(i,o,u),i=i.sibling;i!==null;)ju(i,o,u),i=i.sibling}var ht=null,ln=!1;function or(i,o,u){for(u=u.child;u!==null;)vm(i,o,u),u=u.sibling}function vm(i,o,u){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(ao,u)}catch{}switch(u.tag){case 5:_t||Si(u,o);case 6:var d=ht,g=ln;ht=null,or(i,o,u),ht=d,ln=g,ht!==null&&(ln?(i=ht,u=u.stateNode,i.nodeType===8?i.parentNode.removeChild(u):i.removeChild(u)):ht.removeChild(u.stateNode));break;case 18:ht!==null&&(ln?(i=ht,u=u.stateNode,i.nodeType===8?Kl(i.parentNode,u):i.nodeType===1&&Kl(i,u),Gi(i)):Kl(ht,u.stateNode));break;case 4:d=ht,g=ln,ht=u.stateNode.containerInfo,ln=!0,or(i,o,u),ht=d,ln=g;break;case 0:case 11:case 14:case 15:if(!_t&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var v=g,x=v.destroy;v=v.tag,x!==void 0&&((v&2)!==0||(v&4)!==0)&&Au(u,o,x),g=g.next}while(g!==d)}or(i,o,u);break;case 1:if(!_t&&(Si(u,o),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(M){He(u,o,M)}or(i,o,u);break;case 21:or(i,o,u);break;case 22:u.mode&1?(_t=(d=_t)||u.memoizedState!==null,or(i,o,u),_t=d):or(i,o,u);break;default:or(i,o,u)}}function ym(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new Pw),o.forEach(function(d){var g=jw.bind(null,i,d);u.has(d)||(u.add(d),d.then(g,g))})}}function un(i,o){var u=o.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{var v=i,x=o,M=x;e:for(;M!==null;){switch(M.tag){case 5:ht=M.stateNode,ln=!1;break e;case 3:ht=M.stateNode.containerInfo,ln=!0;break e;case 4:ht=M.stateNode.containerInfo,ln=!0;break e}M=M.return}if(ht===null)throw Error(t(160));vm(v,x,g),ht=null,ln=!1;var A=g.alternate;A!==null&&(A.return=null),g.return=null}catch($){He(g,o,$)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)_m(o,i),o=o.sibling}function _m(i,o){var u=i.alternate,d=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(un(o,i),Sn(i),d&4){try{ms(3,i,i.return),Qo(3,i)}catch(ce){He(i,i.return,ce)}try{ms(5,i,i.return)}catch(ce){He(i,i.return,ce)}}break;case 1:un(o,i),Sn(i),d&512&&u!==null&&Si(u,u.return);break;case 5:if(un(o,i),Sn(i),d&512&&u!==null&&Si(u,u.return),i.flags&32){var g=i.stateNode;try{vn(g,"")}catch(ce){He(i,i.return,ce)}}if(d&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,x=u!==null?u.memoizedProps:v,M=i.type,A=i.updateQueue;if(i.updateQueue=null,A!==null)try{M==="input"&&v.type==="radio"&&v.name!=null&&Cn(g,v),pl(M,x);var $=pl(M,v);for(x=0;x<A.length;x+=2){var K=A[x],X=A[x+1];K==="style"?Fi(g,X):K==="dangerouslySetInnerHTML"?Mn(g,X):K==="children"?vn(g,X):E(g,K,X,$)}switch(M){case"input":nn(g,v);break;case"textarea":re(g,v);break;case"select":var Q=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var ie=v.value;ie!=null?Ft(g,!!v.multiple,ie,!1):Q!==!!v.multiple&&(v.defaultValue!=null?Ft(g,!!v.multiple,v.defaultValue,!0):Ft(g,!!v.multiple,v.multiple?[]:"",!1))}g[ss]=v}catch(ce){He(i,i.return,ce)}}break;case 6:if(un(o,i),Sn(i),d&4){if(i.stateNode===null)throw Error(t(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(ce){He(i,i.return,ce)}}break;case 3:if(un(o,i),Sn(i),d&4&&u!==null&&u.memoizedState.isDehydrated)try{Gi(o.containerInfo)}catch(ce){He(i,i.return,ce)}break;case 4:un(o,i),Sn(i);break;case 13:un(o,i),Sn(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(qu=Ke())),d&4&&ym(i);break;case 22:if(K=u!==null&&u.memoizedState!==null,i.mode&1?(_t=($=_t)||K,un(o,i),_t=$):un(o,i),Sn(i),d&8192){if($=i.memoizedState!==null,(i.stateNode.isHidden=$)&&!K&&(i.mode&1)!==0)for(oe=i,K=i.child;K!==null;){for(X=oe=K;oe!==null;){switch(Q=oe,ie=Q.child,Q.tag){case 0:case 11:case 14:case 15:ms(4,Q,Q.return);break;case 1:Si(Q,Q.return);var le=Q.stateNode;if(typeof le.componentWillUnmount=="function"){d=Q,u=Q.return;try{o=d,le.props=o.memoizedProps,le.state=o.memoizedState,le.componentWillUnmount()}catch(ce){He(d,u,ce)}}break;case 5:Si(Q,Q.return);break;case 22:if(Q.memoizedState!==null){Sm(X);continue}}ie!==null?(ie.return=Q,oe=ie):Sm(X)}K=K.sibling}e:for(K=null,X=i;;){if(X.tag===5){if(K===null){K=X;try{g=X.stateNode,$?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(M=X.stateNode,A=X.memoizedProps.style,x=A!=null&&A.hasOwnProperty("display")?A.display:null,M.style.display=ji("display",x))}catch(ce){He(i,i.return,ce)}}}else if(X.tag===6){if(K===null)try{X.stateNode.nodeValue=$?"":X.memoizedProps}catch(ce){He(i,i.return,ce)}}else if((X.tag!==22&&X.tag!==23||X.memoizedState===null||X===i)&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===i)break e;for(;X.sibling===null;){if(X.return===null||X.return===i)break e;K===X&&(K=null),X=X.return}K===X&&(K=null),X.sibling.return=X.return,X=X.sibling}}break;case 19:un(o,i),Sn(i),d&4&&ym(i);break;case 21:break;default:un(o,i),Sn(i)}}function Sn(i){var o=i.flags;if(o&2){try{e:{for(var u=i.return;u!==null;){if(gm(u)){var d=u;break e}u=u.return}throw Error(t(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(vn(g,""),d.flags&=-33);var v=mm(i);ju(i,v,g);break;case 3:case 4:var x=d.stateNode.containerInfo,M=mm(i);Nu(i,M,x);break;default:throw Error(t(161))}}catch(A){He(i,i.return,A)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function Mw(i,o,u){oe=i,bm(i)}function bm(i,o,u){for(var d=(i.mode&1)!==0;oe!==null;){var g=oe,v=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Go;if(!x){var M=g.alternate,A=M!==null&&M.memoizedState!==null||_t;M=Go;var $=_t;if(Go=x,(_t=A)&&!$)for(oe=g;oe!==null;)x=oe,A=x.child,x.tag===22&&x.memoizedState!==null?wm(g):A!==null?(A.return=x,oe=A):wm(g);for(;v!==null;)oe=v,bm(v),v=v.sibling;oe=g,Go=M,_t=$}xm(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,oe=v):xm(i)}}function xm(i){for(;oe!==null;){var o=oe;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:_t||Qo(5,o);break;case 1:var d=o.stateNode;if(o.flags&4&&!_t)if(u===null)d.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:an(o.type,u.memoizedProps);d.componentDidUpdate(g,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var v=o.updateQueue;v!==null&&yg(o,v,d);break;case 3:var x=o.updateQueue;if(x!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}yg(o,x,u)}break;case 5:var M=o.stateNode;if(u===null&&o.flags&4){u=M;var A=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&u.focus();break;case"img":A.src&&(u.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var $=o.alternate;if($!==null){var K=$.memoizedState;if(K!==null){var X=K.dehydrated;X!==null&&Gi(X)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}_t||o.flags&512&&Lu(o)}catch(Q){He(o,o.return,Q)}}if(o===i){oe=null;break}if(u=o.sibling,u!==null){u.return=o.return,oe=u;break}oe=o.return}}function Sm(i){for(;oe!==null;){var o=oe;if(o===i){oe=null;break}var u=o.sibling;if(u!==null){u.return=o.return,oe=u;break}oe=o.return}}function wm(i){for(;oe!==null;){var o=oe;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Qo(4,o)}catch(A){He(o,u,A)}break;case 1:var d=o.stateNode;if(typeof d.componentDidMount=="function"){var g=o.return;try{d.componentDidMount()}catch(A){He(o,g,A)}}var v=o.return;try{Lu(o)}catch(A){He(o,v,A)}break;case 5:var x=o.return;try{Lu(o)}catch(A){He(o,x,A)}}}catch(A){He(o,o.return,A)}if(o===i){oe=null;break}var M=o.sibling;if(M!==null){M.return=o.return,oe=M;break}oe=o.return}}var Rw=Math.ceil,Ko=O.ReactCurrentDispatcher,Fu=O.ReactCurrentOwner,Jt=O.ReactCurrentBatchConfig,Se=0,at=null,et=null,pt=0,$t=0,wi=tr(0),rt=0,vs=null,Ir=0,Xo=0,zu=0,ys=null,Rt=null,qu=0,ki=1/0,jn=null,Jo=!1,Bu=null,ar=null,Zo=!1,lr=null,ea=0,_s=0,$u=null,ta=-1,na=0;function Et(){return(Se&6)!==0?Ke():ta!==-1?ta:ta=Ke()}function ur(i){return(i.mode&1)===0?1:(Se&2)!==0&&pt!==0?pt&-pt:hw.transition!==null?(na===0&&(na=gp()),na):(i=Me,i!==0||(i=window.event,i=i===void 0?16:kp(i.type)),i)}function cn(i,o,u,d){if(50<_s)throw _s=0,$u=null,Error(t(185));Vi(i,u,d),((Se&2)===0||i!==at)&&(i===at&&((Se&2)===0&&(Xo|=u),rt===4&&cr(i,pt)),Tt(i,d),u===1&&Se===0&&(o.mode&1)===0&&(ki=Ke()+500,Ro&&rr()))}function Tt(i,o){var u=i.callbackNode;h1(i,o);var d=co(i,i===at?pt:0);if(d===0)u!==null&&dp(u),i.callbackNode=null,i.callbackPriority=0;else if(o=d&-d,i.callbackPriority!==o){if(u!=null&&dp(u),o===1)i.tag===0?dw(Em.bind(null,i)):ug(Em.bind(null,i)),lw(function(){(Se&6)===0&&rr()}),u=null;else{switch(mp(d)){case 1:u=xl;break;case 4:u=hp;break;case 16:u=oo;break;case 536870912:u=pp;break;default:u=oo}u=Im(u,km.bind(null,i))}i.callbackPriority=o,i.callbackNode=u}}function km(i,o){if(ta=-1,na=0,(Se&6)!==0)throw Error(t(327));var u=i.callbackNode;if(Ei()&&i.callbackNode!==u)return null;var d=co(i,i===at?pt:0);if(d===0)return null;if((d&30)!==0||(d&i.expiredLanes)!==0||o)o=ra(i,d);else{o=d;var g=Se;Se|=2;var v=Pm();(at!==i||pt!==o)&&(jn=null,ki=Ke()+500,Lr(i,o));do try{Iw();break}catch(M){Om(i,M)}while(!0);ou(),Ko.current=v,Se=g,et!==null?o=0:(at=null,pt=0,o=rt)}if(o!==0){if(o===2&&(g=Sl(i),g!==0&&(d=g,o=Vu(i,g))),o===1)throw u=vs,Lr(i,0),cr(i,d),Tt(i,Ke()),u;if(o===6)cr(i,d);else{if(g=i.current.alternate,(d&30)===0&&!Tw(g)&&(o=ra(i,d),o===2&&(v=Sl(i),v!==0&&(d=v,o=Vu(i,v))),o===1))throw u=vs,Lr(i,0),cr(i,d),Tt(i,Ke()),u;switch(i.finishedWork=g,i.finishedLanes=d,o){case 0:case 1:throw Error(t(345));case 2:Nr(i,Rt,jn);break;case 3:if(cr(i,d),(d&130023424)===d&&(o=qu+500-Ke(),10<o)){if(co(i,0)!==0)break;if(g=i.suspendedLanes,(g&d)!==d){Et(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Ql(Nr.bind(null,i,Rt,jn),o);break}Nr(i,Rt,jn);break;case 4:if(cr(i,d),(d&4194240)===d)break;for(o=i.eventTimes,g=-1;0<d;){var x=31-rn(d);v=1<<x,x=o[x],x>g&&(g=x),d&=~v}if(d=g,d=Ke()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Rw(d/1960))-d,10<d){i.timeoutHandle=Ql(Nr.bind(null,i,Rt,jn),d);break}Nr(i,Rt,jn);break;case 5:Nr(i,Rt,jn);break;default:throw Error(t(329))}}}return Tt(i,Ke()),i.callbackNode===u?km.bind(null,i):null}function Vu(i,o){var u=ys;return i.current.memoizedState.isDehydrated&&(Lr(i,o).flags|=256),i=ra(i,o),i!==2&&(o=Rt,Rt=u,o!==null&&Wu(o)),i}function Wu(i){Rt===null?Rt=i:Rt.push.apply(Rt,i)}function Tw(i){for(var o=i;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var g=u[d],v=g.getSnapshot;g=g.value;try{if(!sn(v(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function cr(i,o){for(o&=~zu,o&=~Xo,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var u=31-rn(o),d=1<<u;i[u]=-1,o&=~d}}function Em(i){if((Se&6)!==0)throw Error(t(327));Ei();var o=co(i,0);if((o&1)===0)return Tt(i,Ke()),null;var u=ra(i,o);if(i.tag!==0&&u===2){var d=Sl(i);d!==0&&(o=d,u=Vu(i,d))}if(u===1)throw u=vs,Lr(i,0),cr(i,o),Tt(i,Ke()),u;if(u===6)throw Error(t(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Nr(i,Rt,jn),Tt(i,Ke()),null}function Uu(i,o){var u=Se;Se|=1;try{return i(o)}finally{Se=u,Se===0&&(ki=Ke()+500,Ro&&rr())}}function Ar(i){lr!==null&&lr.tag===0&&(Se&6)===0&&Ei();var o=Se;Se|=1;var u=Jt.transition,d=Me;try{if(Jt.transition=null,Me=1,i)return i()}finally{Me=d,Jt.transition=u,Se=o,(Se&6)===0&&rr()}}function Hu(){$t=wi.current,Le(wi)}function Lr(i,o){i.finishedWork=null,i.finishedLanes=0;var u=i.timeoutHandle;if(u!==-1&&(i.timeoutHandle=-1,aw(u)),et!==null)for(u=et.return;u!==null;){var d=u;switch(tu(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Co();break;case 3:bi(),Le(Pt),Le(mt),mu();break;case 5:pu(d);break;case 4:bi();break;case 13:Le(We);break;case 19:Le(We);break;case 10:au(d.type._context);break;case 22:case 23:Hu()}u=u.return}if(at=i,et=i=fr(i.current,null),pt=$t=o,rt=0,vs=null,zu=Xo=Ir=0,Rt=ys=null,Rr!==null){for(o=0;o<Rr.length;o++)if(u=Rr[o],d=u.interleaved,d!==null){u.interleaved=null;var g=d.next,v=u.pending;if(v!==null){var x=v.next;v.next=g,d.next=x}u.pending=d}Rr=null}return i}function Om(i,o){do{var u=et;try{if(ou(),Bo.current=Uo,$o){for(var d=Ue.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}$o=!1}if(Dr=0,ot=nt=Ue=null,fs=!1,ds=0,Fu.current=null,u===null||u.return===null){rt=1,vs=o,et=null;break}e:{var v=i,x=u.return,M=u,A=o;if(o=pt,M.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var $=A,K=M,X=K.tag;if((K.mode&1)===0&&(X===0||X===11||X===15)){var Q=K.alternate;Q?(K.updateQueue=Q.updateQueue,K.memoizedState=Q.memoizedState,K.lanes=Q.lanes):(K.updateQueue=null,K.memoizedState=null)}var ie=Xg(x);if(ie!==null){ie.flags&=-257,Jg(ie,x,M,v,o),ie.mode&1&&Kg(v,$,o),o=ie,A=$;var le=o.updateQueue;if(le===null){var ce=new Set;ce.add(A),o.updateQueue=ce}else le.add(A);break e}else{if((o&1)===0){Kg(v,$,o),Yu();break e}A=Error(t(426))}}else if(Be&&M.mode&1){var Xe=Xg(x);if(Xe!==null){(Xe.flags&65536)===0&&(Xe.flags|=256),Jg(Xe,x,M,v,o),iu(xi(A,M));break e}}v=A=xi(A,M),rt!==4&&(rt=2),ys===null?ys=[v]:ys.push(v),v=x;do{switch(v.tag){case 3:v.flags|=65536,o&=-o,v.lanes|=o;var F=Gg(v,A,o);vg(v,F);break e;case 1:M=A;var N=v.type,z=v.stateNode;if((v.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(ar===null||!ar.has(z)))){v.flags|=65536,o&=-o,v.lanes|=o;var Z=Qg(v,M,o);vg(v,Z);break e}}v=v.return}while(v!==null)}Mm(u)}catch(fe){o=fe,et===u&&u!==null&&(et=u=u.return);continue}break}while(!0)}function Pm(){var i=Ko.current;return Ko.current=Uo,i===null?Uo:i}function Yu(){(rt===0||rt===3||rt===2)&&(rt=4),at===null||(Ir&268435455)===0&&(Xo&268435455)===0||cr(at,pt)}function ra(i,o){var u=Se;Se|=2;var d=Pm();(at!==i||pt!==o)&&(jn=null,Lr(i,o));do try{Dw();break}catch(g){Om(i,g)}while(!0);if(ou(),Se=u,Ko.current=d,et!==null)throw Error(t(261));return at=null,pt=0,rt}function Dw(){for(;et!==null;)Cm(et)}function Iw(){for(;et!==null&&!i1();)Cm(et)}function Cm(i){var o=Dm(i.alternate,i,$t);i.memoizedProps=i.pendingProps,o===null?Mm(i):et=o,Fu.current=null}function Mm(i){var o=i;do{var u=o.alternate;if(i=o.return,(o.flags&32768)===0){if(u=Ew(u,o,$t),u!==null){et=u;return}}else{if(u=Ow(u,o),u!==null){u.flags&=32767,et=u;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{rt=6,et=null;return}}if(o=o.sibling,o!==null){et=o;return}et=o=i}while(o!==null);rt===0&&(rt=5)}function Nr(i,o,u){var d=Me,g=Jt.transition;try{Jt.transition=null,Me=1,Aw(i,o,u,d)}finally{Jt.transition=g,Me=d}return null}function Aw(i,o,u,d){do Ei();while(lr!==null);if((Se&6)!==0)throw Error(t(327));u=i.finishedWork;var g=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=0,u===i.current)throw Error(t(177));i.callbackNode=null,i.callbackPriority=0;var v=u.lanes|u.childLanes;if(p1(i,v),i===at&&(et=at=null,pt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Zo||(Zo=!0,Im(oo,function(){return Ei(),null})),v=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||v){v=Jt.transition,Jt.transition=null;var x=Me;Me=1;var M=Se;Se|=4,Fu.current=null,Cw(i,u),_m(u,i),ew(Yl),po=!!Hl,Yl=Hl=null,i.current=u,Mw(u),s1(),Se=M,Me=x,Jt.transition=v}else i.current=u;if(Zo&&(Zo=!1,lr=i,ea=g),v=i.pendingLanes,v===0&&(ar=null),l1(u.stateNode),Tt(i,Ke()),o!==null)for(d=i.onRecoverableError,u=0;u<o.length;u++)g=o[u],d(g.value,{componentStack:g.stack,digest:g.digest});if(Jo)throw Jo=!1,i=Bu,Bu=null,i;return(ea&1)!==0&&i.tag!==0&&Ei(),v=i.pendingLanes,(v&1)!==0?i===$u?_s++:(_s=0,$u=i):_s=0,rr(),null}function Ei(){if(lr!==null){var i=mp(ea),o=Jt.transition,u=Me;try{if(Jt.transition=null,Me=16>i?16:i,lr===null)var d=!1;else{if(i=lr,lr=null,ea=0,(Se&6)!==0)throw Error(t(331));var g=Se;for(Se|=4,oe=i.current;oe!==null;){var v=oe,x=v.child;if((oe.flags&16)!==0){var M=v.deletions;if(M!==null){for(var A=0;A<M.length;A++){var $=M[A];for(oe=$;oe!==null;){var K=oe;switch(K.tag){case 0:case 11:case 15:ms(8,K,v)}var X=K.child;if(X!==null)X.return=K,oe=X;else for(;oe!==null;){K=oe;var Q=K.sibling,ie=K.return;if(pm(K),K===$){oe=null;break}if(Q!==null){Q.return=ie,oe=Q;break}oe=ie}}}var le=v.alternate;if(le!==null){var ce=le.child;if(ce!==null){le.child=null;do{var Xe=ce.sibling;ce.sibling=null,ce=Xe}while(ce!==null)}}oe=v}}if((v.subtreeFlags&2064)!==0&&x!==null)x.return=v,oe=x;else e:for(;oe!==null;){if(v=oe,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:ms(9,v,v.return)}var F=v.sibling;if(F!==null){F.return=v.return,oe=F;break e}oe=v.return}}var N=i.current;for(oe=N;oe!==null;){x=oe;var z=x.child;if((x.subtreeFlags&2064)!==0&&z!==null)z.return=x,oe=z;else e:for(x=N;oe!==null;){if(M=oe,(M.flags&2048)!==0)try{switch(M.tag){case 0:case 11:case 15:Qo(9,M)}}catch(fe){He(M,M.return,fe)}if(M===x){oe=null;break e}var Z=M.sibling;if(Z!==null){Z.return=M.return,oe=Z;break e}oe=M.return}}if(Se=g,rr(),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(ao,i)}catch{}d=!0}return d}finally{Me=u,Jt.transition=o}}return!1}function Rm(i,o,u){o=xi(u,o),o=Gg(i,o,1),i=sr(i,o,1),o=Et(),i!==null&&(Vi(i,1,o),Tt(i,o))}function He(i,o,u){if(i.tag===3)Rm(i,i,u);else for(;o!==null;){if(o.tag===3){Rm(o,i,u);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ar===null||!ar.has(d))){i=xi(u,i),i=Qg(o,i,1),o=sr(o,i,1),i=Et(),o!==null&&(Vi(o,1,i),Tt(o,i));break}}o=o.return}}function Lw(i,o,u){var d=i.pingCache;d!==null&&d.delete(o),o=Et(),i.pingedLanes|=i.suspendedLanes&u,at===i&&(pt&u)===u&&(rt===4||rt===3&&(pt&130023424)===pt&&500>Ke()-qu?Lr(i,0):zu|=u),Tt(i,o)}function Tm(i,o){o===0&&((i.mode&1)===0?o=1:(o=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var u=Et();i=An(i,o),i!==null&&(Vi(i,o,u),Tt(i,u))}function Nw(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),Tm(i,u)}function jw(i,o){var u=0;switch(i.tag){case 13:var d=i.stateNode,g=i.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=i.stateNode;break;default:throw Error(t(314))}d!==null&&d.delete(o),Tm(i,u)}var Dm;Dm=function(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps||Pt.current)Mt=!0;else{if((i.lanes&u)===0&&(o.flags&128)===0)return Mt=!1,kw(i,o,u);Mt=(i.flags&131072)!==0}else Mt=!1,Be&&(o.flags&1048576)!==0&&cg(o,Do,o.index);switch(o.lanes=0,o.tag){case 2:var d=o.type;Yo(i,o),i=o.pendingProps;var g=hi(o,mt.current);yi(o,u),g=_u(null,o,d,i,g,u);var v=bu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Ct(d)?(v=!0,Mo(o)):v=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,cu(o),g.updater=Fo,o.stateNode=g,g._reactInternals=o,du(o,d,i,u),o=Cu(null,o,d,!0,v,u)):(o.tag=0,Be&&v&&eu(o),kt(null,o,g,u),o=o.child),o;case 16:d=o.elementType;e:{switch(Yo(i,o),i=o.pendingProps,g=d._init,d=g(d._payload),o.type=d,g=o.tag=zw(d),i=an(d,i),g){case 0:o=Pu(null,o,d,i,u);break e;case 1:o=im(null,o,d,i,u);break e;case 11:o=Zg(null,o,d,i,u);break e;case 14:o=em(null,o,d,an(d.type,i),u);break e}throw Error(t(306,d,""))}return o;case 0:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:an(d,g),Pu(i,o,d,g,u);case 1:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:an(d,g),im(i,o,d,g,u);case 3:e:{if(sm(o),i===null)throw Error(t(387));d=o.pendingProps,v=o.memoizedState,g=v.element,mg(i,o),jo(o,d,null,u);var x=o.memoizedState;if(d=x.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=v,o.memoizedState=v,o.flags&256){g=xi(Error(t(423)),o),o=om(i,o,d,u,g);break e}else if(d!==g){g=xi(Error(t(424)),o),o=om(i,o,d,u,g);break e}else for(Bt=er(o.stateNode.containerInfo.firstChild),qt=o,Be=!0,on=null,u=Eg(o,null,d,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(mi(),d===g){o=Nn(i,o,u);break e}kt(i,o,d,u)}o=o.child}return o;case 5:return Og(o),i===null&&ru(o),d=o.type,g=o.pendingProps,v=i!==null?i.memoizedProps:null,x=g.children,Gl(d,g)?x=null:v!==null&&Gl(d,v)&&(o.flags|=32),rm(i,o),kt(i,o,x,u),o.child;case 6:return i===null&&ru(o),null;case 13:return am(i,o,u);case 4:return hu(o,o.stateNode.containerInfo),d=o.pendingProps,i===null?o.child=_i(o,null,d,u):kt(i,o,d,u),o.child;case 11:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:an(d,g),Zg(i,o,d,g,u);case 7:return kt(i,o,o.pendingProps,u),o.child;case 8:return kt(i,o,o.pendingProps.children,u),o.child;case 12:return kt(i,o,o.pendingProps.children,u),o.child;case 10:e:{if(d=o.type._context,g=o.pendingProps,v=o.memoizedProps,x=g.value,De(Ao,d._currentValue),d._currentValue=x,v!==null)if(sn(v.value,x)){if(v.children===g.children&&!Pt.current){o=Nn(i,o,u);break e}}else for(v=o.child,v!==null&&(v.return=o);v!==null;){var M=v.dependencies;if(M!==null){x=v.child;for(var A=M.firstContext;A!==null;){if(A.context===d){if(v.tag===1){A=Ln(-1,u&-u),A.tag=2;var $=v.updateQueue;if($!==null){$=$.shared;var K=$.pending;K===null?A.next=A:(A.next=K.next,K.next=A),$.pending=A}}v.lanes|=u,A=v.alternate,A!==null&&(A.lanes|=u),lu(v.return,u,o),M.lanes|=u;break}A=A.next}}else if(v.tag===10)x=v.type===o.type?null:v.child;else if(v.tag===18){if(x=v.return,x===null)throw Error(t(341));x.lanes|=u,M=x.alternate,M!==null&&(M.lanes|=u),lu(x,u,o),x=v.sibling}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===o){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}kt(i,o,g.children,u),o=o.child}return o;case 9:return g=o.type,d=o.pendingProps.children,yi(o,u),g=Kt(g),d=d(g),o.flags|=1,kt(i,o,d,u),o.child;case 14:return d=o.type,g=an(d,o.pendingProps),g=an(d.type,g),em(i,o,d,g,u);case 15:return tm(i,o,o.type,o.pendingProps,u);case 17:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:an(d,g),Yo(i,o),o.tag=1,Ct(d)?(i=!0,Mo(o)):i=!1,yi(o,u),xg(o,d,g),du(o,d,g,u),Cu(null,o,d,!0,i,u);case 19:return um(i,o,u);case 22:return nm(i,o,u)}throw Error(t(156,o.tag))};function Im(i,o){return fp(i,o)}function Fw(i,o,u,d){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(i,o,u,d){return new Fw(i,o,u,d)}function Gu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zw(i){if(typeof i=="function")return Gu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ee)return 11;if(i===B)return 14}return 2}function fr(i,o){var u=i.alternate;return u===null?(u=Zt(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&14680064,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u}function ia(i,o,u,d,g,v){var x=2;if(d=i,typeof i=="function")Gu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case D:return jr(u.children,g,v,o);case I:x=8,g|=8;break;case W:return i=Zt(12,u,o,g|2),i.elementType=W,i.lanes=v,i;case ne:return i=Zt(13,u,o,g),i.elementType=ne,i.lanes=v,i;case G:return i=Zt(19,u,o,g),i.elementType=G,i.lanes=v,i;case V:return sa(u,g,v,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case Y:x=9;break e;case ee:x=11;break e;case B:x=14;break e;case L:x=16,d=null;break e}throw Error(t(130,i==null?i:typeof i,""))}return o=Zt(x,u,o,g),o.elementType=i,o.type=d,o.lanes=v,o}function jr(i,o,u,d){return i=Zt(7,i,d,o),i.lanes=u,i}function sa(i,o,u,d){return i=Zt(22,i,d,o),i.elementType=V,i.lanes=u,i.stateNode={isHidden:!1},i}function Qu(i,o,u){return i=Zt(6,i,null,o),i.lanes=u,i}function Ku(i,o,u){return o=Zt(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function qw(i,o,u,d,g){this.tag=o,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wl(0),this.expirationTimes=wl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wl(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Xu(i,o,u,d,g,v,x,M,A){return i=new qw(i,o,u,M,A),o===1?(o=1,v===!0&&(o|=8)):o=0,v=Zt(3,null,null,o),i.current=v,v.stateNode=i,v.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(v),i}function Bw(i,o,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:d==null?null:""+d,children:i,containerInfo:o,implementation:u}}function Am(i){if(!i)return nr;i=i._reactInternals;e:{if(Er(i)!==i||i.tag!==1)throw Error(t(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Ct(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(i.tag===1){var u=i.type;if(Ct(u))return ag(i,u,o)}return o}function Lm(i,o,u,d,g,v,x,M,A){return i=Xu(u,d,!0,i,g,v,x,M,A),i.context=Am(null),u=i.current,d=Et(),g=ur(u),v=Ln(d,g),v.callback=o??null,sr(u,v,g),i.current.lanes=g,Vi(i,g,d),Tt(i,d),i}function oa(i,o,u,d){var g=o.current,v=Et(),x=ur(g);return u=Am(u),o.context===null?o.context=u:o.pendingContext=u,o=Ln(v,x),o.payload={element:i},d=d===void 0?null:d,d!==null&&(o.callback=d),i=sr(g,o,x),i!==null&&(cn(i,g,x,v),No(i,g,x)),x}function aa(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function Nm(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Ju(i,o){Nm(i,o),(i=i.alternate)&&Nm(i,o)}function $w(){return null}var jm=typeof reportError=="function"?reportError:function(i){console.error(i)};function Zu(i){this._internalRoot=i}la.prototype.render=Zu.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(t(409));oa(i,o,null,null)},la.prototype.unmount=Zu.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Ar(function(){oa(null,i,null,null)}),o[Rn]=null}};function la(i){this._internalRoot=i}la.prototype.unstable_scheduleHydration=function(i){if(i){var o=_p();i={blockedOn:null,target:i,priority:o};for(var u=0;u<Xn.length&&o!==0&&o<Xn[u].priority;u++);Xn.splice(u,0,i),u===0&&Sp(i)}};function ec(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function ua(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Fm(){}function Vw(i,o,u,d,g){if(g){if(typeof d=="function"){var v=d;d=function(){var $=aa(x);v.call($)}}var x=Lm(o,d,i,0,null,!1,!1,"",Fm);return i._reactRootContainer=x,i[Rn]=x.current,rs(i.nodeType===8?i.parentNode:i),Ar(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof d=="function"){var M=d;d=function(){var $=aa(A);M.call($)}}var A=Xu(i,0,!1,null,null,!1,!1,"",Fm);return i._reactRootContainer=A,i[Rn]=A.current,rs(i.nodeType===8?i.parentNode:i),Ar(function(){oa(o,A,u,d)}),A}function ca(i,o,u,d,g){var v=u._reactRootContainer;if(v){var x=v;if(typeof g=="function"){var M=g;g=function(){var A=aa(x);M.call(A)}}oa(o,x,i,g)}else x=Vw(u,o,i,g,d);return aa(x)}vp=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var u=$i(o.pendingLanes);u!==0&&(kl(o,u|1),Tt(o,Ke()),(Se&6)===0&&(ki=Ke()+500,rr()))}break;case 13:Ar(function(){var d=An(i,1);if(d!==null){var g=Et();cn(d,i,1,g)}}),Ju(i,1)}},El=function(i){if(i.tag===13){var o=An(i,134217728);if(o!==null){var u=Et();cn(o,i,134217728,u)}Ju(i,134217728)}},yp=function(i){if(i.tag===13){var o=ur(i),u=An(i,o);if(u!==null){var d=Et();cn(u,i,o,d)}Ju(i,o)}},_p=function(){return Me},bp=function(i,o){var u=Me;try{return Me=i,o()}finally{Me=u}},vl=function(i,o,u){switch(o){case"input":if(nn(i,u),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var d=u[o];if(d!==i&&d.form===i.form){var g=Po(d);if(!g)throw Error(t(90));qe(d),nn(d,g)}}}break;case"textarea":re(i,u);break;case"select":o=u.value,o!=null&&Ft(i,!!u.multiple,o,!1)}},ip=Uu,sp=Ar;var Ww={usingClientEntryPoint:!1,Events:[os,fi,Po,np,rp,Uu]},bs={findFiberByHostInstance:Or,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Uw={bundleType:bs.bundleType,version:bs.version,rendererPackageName:bs.rendererPackageName,rendererConfig:bs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=up(i),i===null?null:i.stateNode},findFiberByHostInstance:bs.findFiberByHostInstance||$w,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fa.isDisabled&&fa.supportsFiber)try{ao=fa.inject(Uw),yn=fa}catch{}}return Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ww,Dt.createPortal=function(i,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ec(o))throw Error(t(200));return Bw(i,o,null,u)},Dt.createRoot=function(i,o){if(!ec(i))throw Error(t(299));var u=!1,d="",g=jm;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Xu(i,1,!1,null,null,u,!1,d,g),i[Rn]=o.current,rs(i.nodeType===8?i.parentNode:i),new Zu(o)},Dt.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(t(188)):(i=Object.keys(i).join(","),Error(t(268,i)));return i=up(o),i=i===null?null:i.stateNode,i},Dt.flushSync=function(i){return Ar(i)},Dt.hydrate=function(i,o,u){if(!ua(o))throw Error(t(200));return ca(null,i,o,!0,u)},Dt.hydrateRoot=function(i,o,u){if(!ec(i))throw Error(t(405));var d=u!=null&&u.hydratedSources||null,g=!1,v="",x=jm;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),o=Lm(o,null,i,1,u??null,g,!1,v,x),i[Rn]=o.current,rs(i),d)for(i=0;i<d.length;i++)u=d[i],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new la(o)},Dt.render=function(i,o,u){if(!ua(o))throw Error(t(200));return ca(null,i,o,!1,u)},Dt.unmountComponentAtNode=function(i){if(!ua(i))throw Error(t(40));return i._reactRootContainer?(Ar(function(){ca(null,null,i,!1,function(){i._reactRootContainer=null,i[Rn]=null})}),!0):!1},Dt.unstable_batchedUpdates=Uu,Dt.unstable_renderSubtreeIntoContainer=function(i,o,u,d){if(!ua(u))throw Error(t(200));if(i==null||i._reactInternals===void 0)throw Error(t(38));return ca(i,o,u,!1,d)},Dt.version="18.2.0-next-9e3b772b8-20220608",Dt}var Hm;function Zw(){if(Hm)return rc.exports;Hm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),rc.exports=Jw(),rc.exports}var Ym;function ek(){if(Ym)return da;Ym=1;var n=Zw();return da.createRoot=n.createRoot,da.hydrateRoot=n.hydrateRoot,da}var tk=ek();const nk=br(tk),gt=[];for(let n=0;n<256;++n)gt.push((n+256).toString(16).slice(1));function rk(n,e=0){return(gt[n[e+0]]+gt[n[e+1]]+gt[n[e+2]]+gt[n[e+3]]+"-"+gt[n[e+4]]+gt[n[e+5]]+"-"+gt[n[e+6]]+gt[n[e+7]]+"-"+gt[n[e+8]]+gt[n[e+9]]+"-"+gt[n[e+10]]+gt[n[e+11]]+gt[n[e+12]]+gt[n[e+13]]+gt[n[e+14]]+gt[n[e+15]]).toLowerCase()}let oc;const ik=new Uint8Array(16);function sk(){if(!oc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");oc=crypto.getRandomValues.bind(crypto)}return oc(ik)}const ok=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gm={randomUUID:ok};function Qm(n,e,t){if(Gm.randomUUID&&!n)return Gm.randomUUID();n=n||{};const r=n.random??n.rng?.()??sk();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,rk(r)}var Ca={exports:{}},ak=Ca.exports,Km;function lk(){return Km||(Km=1,(function(n,e){(function(t,r){n.exports=r()})(ak,(function(){var t=1e3,r=6e4,s=36e5,a="millisecond",l="second",c="minute",f="hour",h="day",p="week",m="month",y="quarter",_="year",b="date",S="Invalid Date",k=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(G){var B=["th","st","nd","rd"],L=G%100;return"["+G+(B[(L-20)%10]||B[L]||B[0])+"]"}},E=function(G,B,L){var V=String(G);return!V||V.length>=B?G:""+Array(B+1-V.length).join(L)+G},O={s:E,z:function(G){var B=-G.utcOffset(),L=Math.abs(B),V=Math.floor(L/60),j=L%60;return(B<=0?"+":"-")+E(V,2,"0")+":"+E(j,2,"0")},m:function G(B,L){if(B.date()<L.date())return-G(L,B);var V=12*(L.year()-B.year())+(L.month()-B.month()),j=B.clone().add(V,m),U=L-j<0,C=B.clone().add(V+(U?-1:1),m);return+(-(V+(L-j)/(U?j-C:C-j))||0)},a:function(G){return G<0?Math.ceil(G)||0:Math.floor(G)},p:function(G){return{M:m,y:_,w:p,d:h,D:b,h:f,m:c,s:l,ms:a,Q:y}[G]||String(G||"").toLowerCase().replace(/s$/,"")},u:function(G){return G===void 0}},P="en",T={};T[P]=w;var D="$isDayjsObject",I=function(G){return G instanceof ee||!(!G||!G[D])},W=function G(B,L,V){var j;if(!B)return P;if(typeof B=="string"){var U=B.toLowerCase();T[U]&&(j=U),L&&(T[U]=L,j=U);var C=B.split("-");if(!j&&C.length>1)return G(C[0])}else{var q=B.name;T[q]=B,j=q}return!V&&j&&(P=j),j||!V&&P},H=function(G,B){if(I(G))return G.clone();var L=typeof B=="object"?B:{};return L.date=G,L.args=arguments,new ee(L)},Y=O;Y.l=W,Y.i=I,Y.w=function(G,B){return H(G,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var ee=(function(){function G(L){this.$L=W(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[D]=!0}var B=G.prototype;return B.parse=function(L){this.$d=(function(V){var j=V.date,U=V.utc;if(j===null)return new Date(NaN);if(Y.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var C=j.match(k);if(C){var q=C[2]-1||0,J=(C[7]||"0").substring(0,3);return U?new Date(Date.UTC(C[1],q,C[3]||1,C[4]||0,C[5]||0,C[6]||0,J)):new Date(C[1],q,C[3]||1,C[4]||0,C[5]||0,C[6]||0,J)}}return new Date(j)})(L),this.init()},B.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},B.$utils=function(){return Y},B.isValid=function(){return this.$d.toString()!==S},B.isSame=function(L,V){var j=H(L);return this.startOf(V)<=j&&j<=this.endOf(V)},B.isAfter=function(L,V){return H(L)<this.startOf(V)},B.isBefore=function(L,V){return this.endOf(V)<H(L)},B.$g=function(L,V,j){return Y.u(L)?this[V]:this.set(j,L)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(L,V){var j=this,U=!!Y.u(V)||V,C=Y.p(L),q=function(ke,Ee){var Qe=Y.w(j.$u?Date.UTC(j.$y,Ee,ke):new Date(j.$y,Ee,ke),j);return U?Qe:Qe.endOf(h)},J=function(ke,Ee){return Y.w(j.toDate()[ke].apply(j.toDate("s"),(U?[0,0,0,0]:[23,59,59,999]).slice(Ee)),j)},ae=this.$W,te=this.$M,se=this.$D,ue="set"+(this.$u?"UTC":"");switch(C){case _:return U?q(1,0):q(31,11);case m:return U?q(1,te):q(0,te+1);case p:var ve=this.$locale().weekStart||0,ge=(ae<ve?ae+7:ae)-ve;return q(U?se-ge:se+(6-ge),te);case h:case b:return J(ue+"Hours",0);case f:return J(ue+"Minutes",1);case c:return J(ue+"Seconds",2);case l:return J(ue+"Milliseconds",3);default:return this.clone()}},B.endOf=function(L){return this.startOf(L,!1)},B.$set=function(L,V){var j,U=Y.p(L),C="set"+(this.$u?"UTC":""),q=(j={},j[h]=C+"Date",j[b]=C+"Date",j[m]=C+"Month",j[_]=C+"FullYear",j[f]=C+"Hours",j[c]=C+"Minutes",j[l]=C+"Seconds",j[a]=C+"Milliseconds",j)[U],J=U===h?this.$D+(V-this.$W):V;if(U===m||U===_){var ae=this.clone().set(b,1);ae.$d[q](J),ae.init(),this.$d=ae.set(b,Math.min(this.$D,ae.daysInMonth())).$d}else q&&this.$d[q](J);return this.init(),this},B.set=function(L,V){return this.clone().$set(L,V)},B.get=function(L){return this[Y.p(L)]()},B.add=function(L,V){var j,U=this;L=Number(L);var C=Y.p(V),q=function(te){var se=H(U);return Y.w(se.date(se.date()+Math.round(te*L)),U)};if(C===m)return this.set(m,this.$M+L);if(C===_)return this.set(_,this.$y+L);if(C===h)return q(1);if(C===p)return q(7);var J=(j={},j[c]=r,j[f]=s,j[l]=t,j)[C]||1,ae=this.$d.getTime()+L*J;return Y.w(ae,this)},B.subtract=function(L,V){return this.add(-1*L,V)},B.format=function(L){var V=this,j=this.$locale();if(!this.isValid())return j.invalidDate||S;var U=L||"YYYY-MM-DDTHH:mm:ssZ",C=Y.z(this),q=this.$H,J=this.$m,ae=this.$M,te=j.weekdays,se=j.months,ue=j.meridiem,ve=function(Ee,Qe,qe,Te){return Ee&&(Ee[Qe]||Ee(V,U))||qe[Qe].slice(0,Te)},ge=function(Ee){return Y.s(q%12||12,Ee,"0")},ke=ue||function(Ee,Qe,qe){var Te=Ee<12?"AM":"PM";return qe?Te.toLowerCase():Te};return U.replace(R,(function(Ee,Qe){return Qe||(function(qe){switch(qe){case"YY":return String(V.$y).slice(-2);case"YYYY":return Y.s(V.$y,4,"0");case"M":return ae+1;case"MM":return Y.s(ae+1,2,"0");case"MMM":return ve(j.monthsShort,ae,se,3);case"MMMM":return ve(se,ae);case"D":return V.$D;case"DD":return Y.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ve(j.weekdaysMin,V.$W,te,2);case"ddd":return ve(j.weekdaysShort,V.$W,te,3);case"dddd":return te[V.$W];case"H":return String(q);case"HH":return Y.s(q,2,"0");case"h":return ge(1);case"hh":return ge(2);case"a":return ke(q,J,!0);case"A":return ke(q,J,!1);case"m":return String(J);case"mm":return Y.s(J,2,"0");case"s":return String(V.$s);case"ss":return Y.s(V.$s,2,"0");case"SSS":return Y.s(V.$ms,3,"0");case"Z":return C}return null})(Ee)||C.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(L,V,j){var U,C=this,q=Y.p(V),J=H(L),ae=(J.utcOffset()-this.utcOffset())*r,te=this-J,se=function(){return Y.m(C,J)};switch(q){case _:U=se()/12;break;case m:U=se();break;case y:U=se()/3;break;case p:U=(te-ae)/6048e5;break;case h:U=(te-ae)/864e5;break;case f:U=te/s;break;case c:U=te/r;break;case l:U=te/t;break;default:U=te}return j?U:Y.a(U)},B.daysInMonth=function(){return this.endOf(m).$D},B.$locale=function(){return T[this.$L]},B.locale=function(L,V){if(!L)return this.$L;var j=this.clone(),U=W(L,V,!0);return U&&(j.$L=U),j},B.clone=function(){return Y.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},G})(),ne=ee.prototype;return H.prototype=ne,[["$ms",a],["$s",l],["$m",c],["$H",f],["$W",h],["$M",m],["$y",_],["$D",b]].forEach((function(G){ne[G[1]]=function(B){return this.$g(B,G[0],G[1])}})),H.extend=function(G,B){return G.$i||(G(B,ee,H),G.$i=!0),H},H.locale=W,H.isDayjs=I,H.unix=function(G){return H(1e3*G)},H.en=T[P],H.Ls=T,H.p={},H}))})(Ca)),Ca.exports}var uk=lk();const $n=br(uk);function Ne(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function ct(n){return function e(t){return arguments.length===0||Ne(t)?e:n.apply(this,arguments)}}function je(n){return function e(t,r){switch(arguments.length){case 0:return e;case 1:return Ne(t)?e:ct(function(s){return n(t,s)});default:return Ne(t)&&Ne(r)?e:Ne(t)?ct(function(s){return n(s,r)}):Ne(r)?ct(function(s){return n(t,s)}):n(t,r)}}}function Ya(n,e){switch(n){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,r){return e.apply(this,arguments)};case 3:return function(t,r,s){return e.apply(this,arguments)};case 4:return function(t,r,s,a){return e.apply(this,arguments)};case 5:return function(t,r,s,a,l){return e.apply(this,arguments)};case 6:return function(t,r,s,a,l,c){return e.apply(this,arguments)};case 7:return function(t,r,s,a,l,c,f){return e.apply(this,arguments)};case 8:return function(t,r,s,a,l,c,f,h){return e.apply(this,arguments)};case 9:return function(t,r,s,a,l,c,f,h,p){return e.apply(this,arguments)};case 10:return function(t,r,s,a,l,c,f,h,p,m){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Ga(n,e,t){return function(){for(var r=[],s=0,a=n,l=0;l<e.length||s<arguments.length;){var c;l<e.length&&(!Ne(e[l])||s>=arguments.length)?c=e[l]:(c=arguments[s],s+=1),r[l]=c,Ne(c)||(a-=1),l+=1}return a<=0?t.apply(this,r):Ya(a,Ga(n,r,t))}}var ck=je(function(e,t){return e===1?ct(t):Ya(e,Ga(e,[],t))});function Ii(n){return function e(t,r,s){switch(arguments.length){case 0:return e;case 1:return Ne(t)?e:je(function(a,l){return n(t,a,l)});case 2:return Ne(t)&&Ne(r)?e:Ne(t)?je(function(a,l){return n(a,r,l)}):Ne(r)?je(function(a,l){return n(t,a,l)}):ct(function(a){return n(t,r,a)});default:return Ne(t)&&Ne(r)&&Ne(s)?e:Ne(t)&&Ne(r)?je(function(a,l){return n(a,l,s)}):Ne(t)&&Ne(s)?je(function(a,l){return n(a,r,l)}):Ne(r)&&Ne(s)?je(function(a,l){return n(t,a,l)}):Ne(t)?ct(function(a){return n(a,r,s)}):Ne(r)?ct(function(a){return n(t,a,s)}):Ne(s)?ct(function(a){return n(t,r,a)}):n(t,r,s)}}}const dh=Array.isArray||function(e){return e!=null&&e.length>=0&&Object.prototype.toString.call(e)==="[object Array]"};function fk(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function Gs(n,e,t){return function(){if(arguments.length===0)return t();var r=Array.prototype.slice.call(arguments,0),s=r.pop();if(!dh(s)){for(var a=0;a<n.length;){if(typeof s[n[a]]=="function")return s[n[a]].apply(s,r);a+=1}if(fk(s)){var l=e.apply(null,r);return l(s)}}return t.apply(this,arguments)}}function dk(n){return n&&n["@@transducer/reduced"]?n:{"@@transducer/value":n,"@@transducer/reduced":!0}}const vr={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function hk(n,e){for(var t=0,r=e.length,s=Array(r);t<r;)s[t]=n(e[t]),t+=1;return s}function ox(n){return Object.prototype.toString.call(n)==="[object String]"}var hh=ct(function(e){return dh(e)?!0:!e||typeof e!="object"||ox(e)?!1:e.nodeType===1?!!e.length:e.length===0?!0:e.length>0?e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1):!1}),pk=(function(){function n(e){this.f=e}return n.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},n.prototype["@@transducer/result"]=function(e){return e},n.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},n})();function gk(n){return new pk(n)}var mk=je(function(e,t){return Ya(e.length,function(){return e.apply(t,arguments)})});function vk(n,e,t){for(var r=0,s=t.length;r<s;){if(e=n["@@transducer/step"](e,t[r]),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return n["@@transducer/result"](e)}function Xm(n,e,t){for(var r=t.next();!r.done;){if(e=n["@@transducer/step"](e,r.value),e&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=t.next()}return n["@@transducer/result"](e)}function Jm(n,e,t,r){return n["@@transducer/result"](t[r](mk(n["@@transducer/step"],n),e))}var Zm=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function zs(n,e,t){if(typeof n=="function"&&(n=gk(n)),hh(t))return vk(n,e,t);if(typeof t["fantasy-land/reduce"]=="function")return Jm(n,e,t,"fantasy-land/reduce");if(t[Zm]!=null)return Xm(n,e,t[Zm]());if(typeof t.next=="function")return Xm(n,e,t);if(typeof t.reduce=="function")return Jm(n,e,t,"reduce");throw new TypeError("reduce: list must be array or iterable")}var yk=(function(){function n(e,t){this.xf=t,this.f=e}return n.prototype["@@transducer/init"]=vr.init,n.prototype["@@transducer/result"]=vr.result,n.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},n})(),_k=je(function(e,t){return new yk(e,t)});function dn(n,e){return Object.prototype.hasOwnProperty.call(e,n)}var ev=Object.prototype.toString,bk=(function(){return ev.call(arguments)==="[object Arguments]"?function(e){return ev.call(e)==="[object Arguments]"}:function(e){return dn("callee",e)}})(),xk=!{toString:null}.propertyIsEnumerable("toString"),tv=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],nv=(function(){return arguments.propertyIsEnumerable("length")})(),Sk=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},Qd=ct(typeof Object.keys=="function"&&!nv?function(e){return Object(e)!==e?[]:Object.keys(e)}:function(e){if(Object(e)!==e)return[];var t,r,s=[],a=nv&&bk(e);for(t in e)dn(t,e)&&(!a||t!=="length")&&(s[s.length]=t);if(xk)for(r=tv.length-1;r>=0;)t=tv[r],dn(t,e)&&!Sk(s,t)&&(s[s.length]=t),r-=1;return s}),La=je(Gs(["fantasy-land/map","map"],_k,function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return ck(t.length,function(){return e.call(this,t.apply(this,arguments))});case"[object Object]":return zs(function(r,s){return r[s]=e(t[s]),r},{},Qd(t));default:return hk(e,t)}}));const wk=Number.isInteger||function(e){return e<<0===e};var kk=je(function(e,t){var r=e<0?t.length+e:e;return ox(t)?t.charAt(r):t[r]}),Ek=je(function(e,t){return e.map(function(r){for(var s=t,a=0,l;a<r.length;){if(s==null)return;l=r[a],s=wk(l)?kk(l,s):s[l],a+=1}return s})}),Ok=je(function(e,t){return Ek([e],t)[0]}),Ss=je(function(e,t){return Ok([e],t)}),Kd=Ii(zs);function ax(n){return function e(t){for(var r,s,a,l=[],c=0,f=t.length;c<f;){if(hh(t[c]))for(r=n?e(t[c]):t[c],a=0,s=r.length;a<s;)l[l.length]=r[a],a+=1;else l[l.length]=t[c];c+=1}return l}}function Pk(n){return{"@@transducer/value":n,"@@transducer/reduced":!0}}var Ck=function(n){return{"@@transducer/init":vr.init,"@@transducer/result":function(e){return n["@@transducer/result"](e)},"@@transducer/step":function(e,t){var r=n["@@transducer/step"](e,t);return r["@@transducer/reduced"]?Pk(r):r}}},Mk=function(e){var t=Ck(e);return{"@@transducer/init":vr.init,"@@transducer/result":function(r){return t["@@transducer/result"](r)},"@@transducer/step":function(r,s){return hh(s)?zs(t,r,s):zs(t,r,[s])}}},Rk=je(function(e,t){return La(e,Mk(t))}),Tk=je(Gs(["fantasy-land/chain","chain"],Rk,function(e,t){return typeof t=="function"?function(r){return e(t(r))(r)}:ax(!1)(La(e,t))}));function Dk(n){return new RegExp(n.source,(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":""))}var Xd=ct(function(e){return e===null?"Null":e===void 0?"Undefined":Object.prototype.toString.call(e).slice(8,-1)});function ph(n,e,t,r){var s=function(l){for(var c=e.length,f=0;f<c;){if(n===e[f])return t[f];f+=1}e[f+1]=n,t[f+1]=l;for(var h in n)l[h]=r?ph(n[h],e,t,!0):n[h];return l};switch(Xd(n)){case"Object":return s({});case"Array":return s([]);case"Date":return new Date(n.valueOf());case"RegExp":return Dk(n);default:return n}}var gh=ct(function(e){return e!=null&&typeof e.clone=="function"?e.clone():ph(e,[],[],!0)});function Ik(n,e){return function(){return e.call(this,n.apply(this,arguments))}}function mh(n,e){return function(){var t=arguments.length;if(t===0)return e();var r=arguments[t-1];return dh(r)||typeof r[n]!="function"?e.apply(this,arguments):r[n].apply(r,Array.prototype.slice.call(arguments,0,t-1))}}var lx=Ii(mh("slice",function(e,t,r){return Array.prototype.slice.call(r,e,t)})),Ak=ct(mh("tail",lx(1,1/0)));function rv(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Ya(arguments[0].length,Kd(Ik,arguments[0],Ak(arguments)))}function ux(n){return n}var Lk=ct(ux);function iv(n){for(var e=[],t;!(t=n.next()).done;)e.push(t.value);return e}function sv(n,e,t){for(var r=0,s=t.length;r<s;){if(n(e,t[r]))return!0;r+=1}return!1}function Nk(n){var e=String(n).match(/^function (\w*)/);return e==null?"":e[1]}function jk(n,e){return n===e?n!==0||1/n===1/e:n!==n&&e!==e}const ac=typeof Object.is=="function"?Object.is:jk;function ov(n,e,t,r){var s=iv(n),a=iv(e);function l(c,f){return vh(c,f,t.slice(),r.slice())}return!sv(function(c,f){return!sv(l,f,c)},a,s)}function vh(n,e,t,r){if(ac(n,e))return!0;var s=Xd(n);if(s!==Xd(e)||n==null||e==null)return!1;if(typeof n["fantasy-land/equals"]=="function"||typeof e["fantasy-land/equals"]=="function")return typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](e)&&typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](n);if(typeof n.equals=="function"||typeof e.equals=="function")return typeof n.equals=="function"&&n.equals(e)&&typeof e.equals=="function"&&e.equals(n);switch(s){case"Arguments":case"Array":case"Object":if(typeof n.constructor=="function"&&Nk(n.constructor)==="Promise")return n===e;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof e&&ac(n.valueOf(),e.valueOf())))return!1;break;case"Date":if(!ac(n.valueOf(),e.valueOf()))return!1;break;case"Error":return n.name===e.name&&n.message===e.message;case"RegExp":if(!(n.source===e.source&&n.global===e.global&&n.ignoreCase===e.ignoreCase&&n.multiline===e.multiline&&n.sticky===e.sticky&&n.unicode===e.unicode))return!1;break}for(var a=t.length-1;a>=0;){if(t[a]===n)return r[a]===e;a-=1}switch(s){case"Map":return n.size!==e.size?!1:ov(n.entries(),e.entries(),t.concat([n]),r.concat([e]));case"Set":return n.size!==e.size?!1:ov(n.values(),e.values(),t.concat([n]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var l=Qd(n);if(l.length!==Qd(e).length)return!1;var c=t.concat([n]),f=r.concat([e]);for(a=l.length-1;a>=0;){var h=l[a];if(!(dn(h,e)&&vh(e[h],n[h],c,f)))return!1;a-=1}return!0}var Ut=je(function(e,t){return vh(e,t,[],[])});function Fk(n,e,t){var r,s;if(typeof n.indexOf=="function")switch(typeof e){case"number":if(e===0){for(r=1/e;t<n.length;){if(s=n[t],s===0&&1/s===r)return t;t+=1}return-1}else if(e!==e){for(;t<n.length;){if(s=n[t],typeof s=="number"&&s!==s)return t;t+=1}return-1}return n.indexOf(e,t);case"string":case"boolean":case"function":case"undefined":return n.indexOf(e,t);case"object":if(e===null)return n.indexOf(e,t)}for(;t<n.length;){if(Ut(n[t],e))return t;t+=1}return-1}function av(n,e){return Fk(e,n,0)>=0}function lv(n){return Object.prototype.toString.call(n)==="[object Object]"}var zk=(function(){function n(e,t,r,s){this.valueFn=e,this.valueAcc=t,this.keyFn=r,this.xf=s,this.inputs={}}return n.prototype["@@transducer/init"]=vr.init,n.prototype["@@transducer/result"]=function(e){var t;for(t in this.inputs)if(dn(t,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[t]),e["@@transducer/reduced"])){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},n.prototype["@@transducer/step"]=function(e,t){var r=this.keyFn(t);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],t),e},n})(),qk=Ga(4,[],function(e,t,r,s){return new zk(e,t,r,s)}),cx=Ga(4,[],Gs([],qk,function(e,t,r,s){return zs(function(a,l){var c=r(l);return a[c]=e(dn(c,a)?a[c]:ph(t,[],[],!1),l),a},{},s)})),Bk=(function(){function n(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return n.prototype.add=function(e){return!uv(e,!0,this)},n.prototype.has=function(e){return uv(e,!1,this)},n})();function uv(n,e,t){var r=typeof n,s,a;switch(r){case"string":case"number":return n===0&&1/n===-1/0?t._items["-0"]?!0:(e&&(t._items["-0"]=!0),!1):t._nativeSet!==null?e?(s=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===s):t._nativeSet.has(n):r in t._items?n in t._items[r]?!0:(e&&(t._items[r][n]=!0),!1):(e&&(t._items[r]={},t._items[r][n]=!0),!1);case"boolean":if(r in t._items){var l=n?1:0;return t._items[r][l]?!0:(e&&(t._items[r][l]=!0),!1)}else return e&&(t._items[r]=n?[!1,!0]:[!0,!1]),!1;case"function":return t._nativeSet!==null?e?(s=t._nativeSet.size,t._nativeSet.add(n),a=t._nativeSet.size,a===s):t._nativeSet.has(n):r in t._items?av(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1);case"undefined":return t._items[r]?!0:(e&&(t._items[r]=!0),!1);case"object":if(n===null)return t._items.null?!0:(e&&(t._items.null=!0),!1);default:return r=Object.prototype.toString.call(n),r in t._items?av(n,t._items[r])?!0:(e&&t._items[r].push(n),!1):(e&&(t._items[r]=[n]),!1)}}var $k=(function(){function n(e,t){this.xf=t,this.n=e,this.i=0}return n.prototype["@@transducer/init"]=vr.init,n.prototype["@@transducer/result"]=vr.result,n.prototype["@@transducer/step"]=function(e,t){this.i+=1;var r=this.n===0?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?dk(r):r},n})(),Vk=je(function(e,t){return new $k(e,t)}),Wk=je(Gs(["take"],Vk,function(e,t){return lx(0,e<0?1/0:e,t)}));function Uk(n,e){return Wk(n<e.length?e.length-n:0,e)}var Hk=(function(){function n(e,t){this.xf=t,this.pos=0,this.full=!1,this.acc=new Array(e)}return n.prototype["@@transducer/init"]=vr.init,n.prototype["@@transducer/result"]=function(e){return this.acc=null,this.xf["@@transducer/result"](e)},n.prototype["@@transducer/step"]=function(e,t){return this.full&&(e=this.xf["@@transducer/step"](e,this.acc[this.pos])),this.store(t),e},n.prototype.store=function(e){this.acc[this.pos]=e,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},n})(),Yk=je(function(e,t){return new Hk(e,t)}),cv=je(Gs([],Yk,Uk)),fv=ct(ax(!0)),Mi=ct(function(e){for(var t={},r=0;r<e.length;)t[e[r][0]]=e[r][1],r+=1;return t}),Gk=je(mh("groupBy",cx(function(n,e){return n==null&&(n=[]),n.push(e),n},null))),dv=cx(function(n,e){return e},null),Jd=je(function(e,t){for(var r=new Bk,s=[],a=0,l,c;a<t.length;)c=t[a],l=e(c),r.add(l)&&s.push(c),a+=1;return s}),fx=Jd(Lk),Qk=Ii(function(e,t,r){return e(r)>e(t)?r:t}),Kk=Ii(function(e,t,r){var s={},a;for(a in t)dn(a,t)&&(s[a]=dn(a,r)?e(a,t[a],r[a]):t[a]);for(a in r)dn(a,r)&&!dn(a,s)&&(s[a]=r[a]);return s}),Xk=Ii(function n(e,t,r){return Kk(function(s,a,l){return lv(a)&&lv(l)?n(e,a,l):e(s,a,l)},t,r)}),hv=je(function(e,t){return Xk(function(r,s,a){return s},e,t)}),Jk=Ii(function(e,t,r){return e(r)<e(t)?r:t}),ha=je(function(e,t){for(var r={},s=0;s<e.length;)e[s]in t&&(r[e[s]]=t[e[s]]),s+=1;return r}),dx=ct(function(e){var t=[];for(var r in e)dn(r,e)&&(t[t.length]=[r,e[r]]);return t}),Zk=Tk(ux),Ma={exports:{}},eE=Ma.exports,pv;function tE(){return pv||(pv=1,(function(n,e){(function(t,r){n.exports=r()})(eE,(function(){var t="month",r="quarter";return function(s,a){var l=a.prototype;l.quarter=function(h){return this.$utils().u(h)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(h-1))};var c=l.add;l.add=function(h,p){return h=Number(h),this.$utils().p(p)===r?this.add(3*h,t):c.bind(this)(h,p)};var f=l.startOf;l.startOf=function(h,p){var m=this.$utils(),y=!!m.u(p)||p;if(m.p(h)===r){var _=this.quarter()-1;return y?this.month(3*_).startOf(t).startOf("day"):this.month(3*_+2).endOf(t).endOf("day")}return f.bind(this)(h,p)}}}))})(Ma)),Ma.exports}var nE=tE();const rE=br(nE);var Ra={exports:{}},iE=Ra.exports,gv;function sE(){return gv||(gv=1,(function(n,e){(function(t,r){n.exports=r()})(iE,(function(){var t,r,s=1e3,a=6e4,l=36e5,c=864e5,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=31536e6,p=2628e6,m=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,y={years:h,months:p,days:c,hours:l,minutes:a,seconds:s,milliseconds:1,weeks:6048e5},_=function(T){return T instanceof O},b=function(T,D,I){return new O(T,I,D.$l)},S=function(T){return r.p(T)+"s"},k=function(T){return T<0},R=function(T){return k(T)?Math.ceil(T):Math.floor(T)},w=function(T){return Math.abs(T)},E=function(T,D){return T?k(T)?{negative:!0,format:""+w(T)+D}:{negative:!1,format:""+T+D}:{negative:!1,format:""}},O=(function(){function T(I,W,H){var Y=this;if(this.$d={},this.$l=H,I===void 0&&(this.$ms=0,this.parseFromMilliseconds()),W)return b(I*y[S(W)],this);if(typeof I=="number")return this.$ms=I,this.parseFromMilliseconds(),this;if(typeof I=="object")return Object.keys(I).forEach((function(G){Y.$d[S(G)]=I[G]})),this.calMilliseconds(),this;if(typeof I=="string"){var ee=I.match(m);if(ee){var ne=ee.slice(2).map((function(G){return G!=null?Number(G):0}));return this.$d.years=ne[0],this.$d.months=ne[1],this.$d.weeks=ne[2],this.$d.days=ne[3],this.$d.hours=ne[4],this.$d.minutes=ne[5],this.$d.seconds=ne[6],this.calMilliseconds(),this}}return this}var D=T.prototype;return D.calMilliseconds=function(){var I=this;this.$ms=Object.keys(this.$d).reduce((function(W,H){return W+(I.$d[H]||0)*y[H]}),0)},D.parseFromMilliseconds=function(){var I=this.$ms;this.$d.years=R(I/h),I%=h,this.$d.months=R(I/p),I%=p,this.$d.days=R(I/c),I%=c,this.$d.hours=R(I/l),I%=l,this.$d.minutes=R(I/a),I%=a,this.$d.seconds=R(I/s),I%=s,this.$d.milliseconds=I},D.toISOString=function(){var I=E(this.$d.years,"Y"),W=E(this.$d.months,"M"),H=+this.$d.days||0;this.$d.weeks&&(H+=7*this.$d.weeks);var Y=E(H,"D"),ee=E(this.$d.hours,"H"),ne=E(this.$d.minutes,"M"),G=this.$d.seconds||0;this.$d.milliseconds&&(G+=this.$d.milliseconds/1e3,G=Math.round(1e3*G)/1e3);var B=E(G,"S"),L=I.negative||W.negative||Y.negative||ee.negative||ne.negative||B.negative,V=ee.format||ne.format||B.format?"T":"",j=(L?"-":"")+"P"+I.format+W.format+Y.format+V+ee.format+ne.format+B.format;return j==="P"||j==="-P"?"P0D":j},D.toJSON=function(){return this.toISOString()},D.format=function(I){var W=I||"YYYY-MM-DDTHH:mm:ss",H={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return W.replace(f,(function(Y,ee){return ee||String(H[Y])}))},D.as=function(I){return this.$ms/y[S(I)]},D.get=function(I){var W=this.$ms,H=S(I);return H==="milliseconds"?W%=1e3:W=H==="weeks"?R(W/y[H]):this.$d[H],W||0},D.add=function(I,W,H){var Y;return Y=W?I*y[S(W)]:_(I)?I.$ms:b(I,this).$ms,b(this.$ms+Y*(H?-1:1),this)},D.subtract=function(I,W){return this.add(I,W,!0)},D.locale=function(I){var W=this.clone();return W.$l=I,W},D.clone=function(){return b(this.$ms,this)},D.humanize=function(I){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!I)},D.valueOf=function(){return this.asMilliseconds()},D.milliseconds=function(){return this.get("milliseconds")},D.asMilliseconds=function(){return this.as("milliseconds")},D.seconds=function(){return this.get("seconds")},D.asSeconds=function(){return this.as("seconds")},D.minutes=function(){return this.get("minutes")},D.asMinutes=function(){return this.as("minutes")},D.hours=function(){return this.get("hours")},D.asHours=function(){return this.as("hours")},D.days=function(){return this.get("days")},D.asDays=function(){return this.as("days")},D.weeks=function(){return this.get("weeks")},D.asWeeks=function(){return this.as("weeks")},D.months=function(){return this.get("months")},D.asMonths=function(){return this.as("months")},D.years=function(){return this.get("years")},D.asYears=function(){return this.as("years")},T})(),P=function(T,D,I){return T.add(D.years()*I,"y").add(D.months()*I,"M").add(D.days()*I,"d").add(D.hours()*I,"h").add(D.minutes()*I,"m").add(D.seconds()*I,"s").add(D.milliseconds()*I,"ms")};return function(T,D,I){t=I,r=I().$utils(),I.duration=function(Y,ee){var ne=I.locale();return b(Y,{$l:ne},ee)},I.isDuration=_;var W=D.prototype.add,H=D.prototype.subtract;D.prototype.add=function(Y,ee){return _(Y)?P(this,Y,1):W.bind(this)(Y,ee)},D.prototype.subtract=function(Y,ee){return _(Y)?P(this,Y,-1):H.bind(this)(Y,ee)}}}))})(Ra)),Ra.exports}var oE=sE();const aE=br(oE);var Ta={exports:{}},lE=Ta.exports,mv;function uE(){return mv||(mv=1,(function(n,e){(function(t,r){n.exports=r()})(lE,(function(){var t="day";return function(r,s,a){var l=function(h){return h.add(4-h.isoWeekday(),t)},c=s.prototype;c.isoWeekYear=function(){return l(this).year()},c.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),t);var p,m,y,_,b=l(this),S=(p=this.isoWeekYear(),m=this.$u,y=(m?a.utc:a)().year(p).startOf("year"),_=4-y.isoWeekday(),y.isoWeekday()>4&&(_+=7),y.add(_,t));return b.diff(S,"week")+1},c.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var f=c.startOf;c.startOf=function(h,p){var m=this.$utils(),y=!!m.u(p)||p;return m.p(h)==="isoweek"?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(h,p)}}}))})(Ta)),Ta.exports}var cE=uE();const fE=br(cE);var Da={exports:{}},dE=Da.exports,vv;function hE(){return vv||(vv=1,(function(n,e){(function(t,r){n.exports=r()})(dE,(function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var r=["th","st","nd","rd"],s=t%100;return"["+t+(r[(s-20)%10]||r[s]||r[0])+"]"}}}))})(Da)),Da.exports}var pE=hE();const gE=br(pE);$n.extend(rE);$n.extend(aE);$n.extend(fE);const yh="cube-internal-en",mE={...gE,name:yh,weekStart:1};$n.Ls[yh]=mE;const vE="day",At=(...n)=>$n(...n).locale(yh),hx={day:n=>n.by("d").map(e=>e.format("YYYY-MM-DDT00:00:00.000")),month:n=>n.snapTo("month").by("M").map(e=>e.format("YYYY-MM-01T00:00:00.000")),year:n=>n.snapTo("year").by("y").map(e=>e.format("YYYY-01-01T00:00:00.000")),hour:n=>n.by("h").map(e=>e.format("YYYY-MM-DDTHH:00:00.000")),minute:n=>n.by("m").map(e=>e.format("YYYY-MM-DDTHH:mm:00.000")),second:n=>n.by("s").map(e=>e.format("YYYY-MM-DDTHH:mm:ss.000")),week:n=>n.snapTo("week").by("w").map(e=>e.startOf("week").format("YYYY-MM-DDT00:00:00.000")),quarter:n=>n.snapTo("quarter").by("quarter").map(e=>e.startOf("quarter").format("YYYY-MM-DDT00:00:00.000"))},px=n=>!!hx[n],yE=/^\d\d\d\d-\d\d-\d\d$/,_E=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z?$/;function Na(n){const e={},t=n.split(/\s+/);for(let r=0;r<t.length;r+=2){const s=parseInt(t[r],10),a=t[r+1],l=a.endsWith("s")?a.slice(0,-1):a;e[l]=s}return e}function Ur(n,e){let t=n.clone();return Object.entries(e).forEach(([r,s])=>{t=t.add(s,r)}),t}function yv(n,e){let t=n.clone();return Object.entries(e).forEach(([r,s])=>{t=t.subtract(s,r)}),t}function gx(n,e,t){let r=n.clone(),s,a=!1,l=Ur(t,e);if(l.isBefore(t)&&(a=!0),l=t.clone(),n.isBefore(t)){for(s=a?Ur:yv;l.isAfter(n);)l=s(l,e);r=l}else{for(s=a?yv:Ur;l.isBefore(n);)r=l.clone(),l=s(l,e);l.isSame(n)&&(r=l)}return r}const ja=(n,e,t)=>({by:r=>{const s=[];let a=At(n);const l=At(e);for(;a.startOf(r).isBefore(l)||a.isSame(l);)s.push(a),a=a.add(1,r);return s},snapTo:r=>{if(!px(r)&&t){let s;for(const a of Object.keys(t))if(a.endsWith(`.${r}`)&&t[a].granularity){s=t[a].granularity;break}if(s?.interval){const a=Na(s.interval);let l=At(n);if(s.origin||s.offset){let f;s.origin?f=At(s.origin):f=Ur(At().startOf("year"),Na(s.offset)),l=gx(l,a,f)}const c=Ur(l,a).subtract(1,"millisecond");return ja(l,c,t)}}return ja(At(n).startOf(r),At(e).endOf(r),t)},start:At(n),end:At(e)}),bE=(n,e,t)=>{const r=Na(t.interval),s=At(n),a=At(e);let l=t.origin?At(t.origin):At().startOf("year");t.offset&&(l=Ur(l,Na(t.offset)));let c=gx(s,r,l);const f=[];for(;c.isBefore(a)||c.isSame(a);)f.push(c.format("YYYY-MM-DDTHH:mm:ss.000")),c=Ur(c,r);return f};function mx(n){return Mi(dx(n||{}).flatMap(([t,r])=>{if(["measures","dimensions","segments","timeDimensions","filters"].includes(t)&&Array.isArray(r)&&r.length===0)return[];if(t==="order"&&r){if(Array.isArray(r)&&r.length===0)return[];if(!Object.keys(r).length)return[]}return[[t,r]]}))}function xE(n){const e=n||{};return mx({...e,filters:(e.filters||[]).filter(t=>"operator"in t),timeDimensions:(e.timeDimensions||[]).filter(t=>!(!t.dateRange&&!t.granularity))})}function vx(n,e){return Ut(Object.entries(n?.order||{}),Object.entries(e?.order||{}))&&Ut(n,e)}function SE(n){const e=(n.timeDimensions||[]).find(t=>t.granularity);return e?{[e.dimension]:"asc"}:(n.measures||[]).length>0&&(n.dimensions||[]).length>0?{[n.measures[0]]:"desc"}:(n.dimensions||[]).length>0?{[n.dimensions[0]]:"asc"}:{}}function wE(n,e,t){const{query:r,...s}=gh(n),{meta:a,sessionGranularity:l}=t,c=l||vE;let f={shouldApplyHeuristicOrder:!1,pivotConfig:null,query:r,...s},h=null;if(vx(r,e)||(h=r),Array.isArray(h)||Array.isArray(e))return{shouldApplyHeuristicOrder:!1,pivotConfig:null,...n};if(h){if((e.timeDimensions||[]).length===1&&(h.timeDimensions||[]).length===1&&h.timeDimensions[0].granularity&&e.timeDimensions[0].granularity!==h.timeDimensions[0].granularity&&(f={...f,sessionGranularity:h.timeDimensions[0].granularity}),(e.measures||[]).length===0&&(h.measures||[]).length>0||(e.measures||[]).length===1&&(h.measures||[]).length===1&&e.measures[0]!==h.measures[0]){const[p]=h.timeDimensions||[],m=a.defaultTimeDimensionNameFor(h.measures[0]);return h={...h,timeDimensions:m?[{dimension:m,granularity:p?.granularity||c,dateRange:p?.dateRange}]:[]},{...f,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:h,chartType:m?"line":"number"}}return(e.dimensions||[]).length===0&&(h.dimensions||[]).length>0?(h={...h,timeDimensions:(h.timeDimensions||[]).map(p=>({...p,granularity:void 0}))},{...f,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:h,chartType:"table"}):(e.dimensions||[]).length>0&&(h.dimensions||[]).length===0?(h={...h,timeDimensions:(h.timeDimensions||[]).map(p=>({...p,granularity:p.granularity||c}))},{...f,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:h,chartType:(h.timeDimensions||[]).length?"line":"number"}):((e.dimensions||[]).length>0||(e.measures||[]).length>0)&&(h.dimensions||[]).length===0&&(h.measures||[]).length===0?(h={...h,timeDimensions:[],filters:[]},{...f,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:h,sessionGranularity:null}):f}if(f.chartType){const p=f.chartType;if((p==="line"||p==="area")&&(e.timeDimensions||[]).length===1&&!e.timeDimensions[0].granularity){const[m]=e.timeDimensions;return{...f,pivotConfig:null,query:{...e,timeDimensions:[{...m,granularity:c}]}}}if((p==="pie"||p==="table"||p==="number")&&(e.timeDimensions||[]).length===1&&e.timeDimensions[0].granularity){const[m]=e.timeDimensions;return{...f,pivotConfig:null,shouldApplyHeuristicOrder:!0,query:{...e,timeDimensions:[{...m,granularity:void 0}]}}}}return f}function qs(n){return n?(Array.isArray(n)?n:[n]).every(e=>e.measures?.length||e.dimensions?.length||e.timeDimensions?.length):!1}function kE(n,e,t,r,s){const a={...n,x:[...n.x||[]],y:[...n.y||[]]},l=n[r][e],c=a[s].length-1;return l==="measures"?t=c+1:r===s&&t>=c&&a[s][c]==="measures"?t=c-1:r!==s&&t>c&&a[s][c]==="measures"&&(t=c),a[r].splice(e,1),a[s].splice(t,0,l),a}function EE(n,e,t){const r=[...n],[s]=r.splice(e,1);return r.splice(t,0,s),r}function Fa(n=[]){return n.reduce((e,t)=>"or"in t?[...e,...Fa(t.or)]:"and"in t?[...e,...Fa(t.and)]:[...e,t],[])}function OE(n={}){const e=["measures","dimensions","segments"],t=new Set;return e.forEach(s=>(n[s]||[]).forEach(a=>t.add(a))),(n.timeDimensions||[]).forEach(s=>t.add(s.dimension)),Fa(n.filters).forEach(s=>{const a=s.dimension||s.member;typeof a=="string"&&t.add(a)}),[...t]}function _v(n,e,t,r=new Set){const s=n.filter(a=>a!=null);return t?.aliasSeries?.[e]?[t.aliasSeries[e],...s]:r.has(s[0])?[e,...s]:s}const PE=function(e){const t=new Map;return r=>(r.forEach(s=>{const a=e(s);t.has(a)||t.set(a,[]),t.get(a).push(s)}),Array.from(t.entries()))},ws=n=>{const e=[];return n.forEach(t=>{t.forEach(r=>e.push(r))}),e},fn={REGULAR_QUERY:"regularQuery",COMPARE_DATE_RANGE_QUERY:"compareDateRangeQuery",BLENDING_QUERY:"blendingQuery"};class ut{static measureFromAxis(e){return e[e.length-1]}static timeDimensionMember(e){return`${e.dimension}.${e.granularity}`}static deserialize(e,t){return new ut(e.loadResponse,t)}constructor(e,t={}){if("queryType"in e&&e.queryType!=null?(this.loadResponse=e,this.queryType=e.queryType,this.loadResponses=e.results):(this.queryType=fn.REGULAR_QUERY,this.loadResponse={...e,pivotQuery:{...e.query,queryType:this.queryType}},this.loadResponses=[e]),!Object.values(fn).includes(this.queryType))throw new Error("Unknown query type");this.parseDateMeasures=t.parseDateMeasures,this.options=t,this.backwardCompatibleData=[]}drillDown(e,t){if(this.queryType===fn.COMPARE_DATE_RANGE_QUERY)throw new Error("compareDateRange drillDown query is not currently supported");if(this.queryType===fn.BLENDING_QUERY)throw new Error("Data blending drillDown query is not currently supported");const{query:r}=this.loadResponses[0],s=e?.xValues??[],a=e?.yValues??[],l=this.normalizePivotConfig(t),c=[];l?.x.forEach((S,k)=>c.push([S,s[k]])),l?.y.forEach((S,k)=>c.push([S,a[k]]));const{filters:f=[],segments:h=[]}=this.query(),{measures:p,timeDimensions:m}=this.loadResponses[0].annotation;let[,y]=c.find(([S])=>S==="measures")||[];if(y===void 0&&([y]=Object.keys(p)),!(p[y]?.drillMembers?.length??0))return null;const _=[{member:y,operator:"measureFilter"},...f],b=[];return c.filter(([S])=>S!=="measures").forEach(([S,k])=>{const[R,w,E]=S.split(".");if(E!==void 0){const O=ja(k,k,m).snapTo(E),P=r.timeDimensions?.find(D=>D.dimension);let T=[O.start,O.end];if(P?.dateRange){const[D,I]=P.dateRange;T=[$n(D)>O.start?$n(D):O.start,$n(I)<O.end?$n(I):O.end]}b.push({dimension:[R,w].join("."),dateRange:T.map(D=>D.format("YYYY-MM-DDTHH:mm:ss.SSS"))})}else k==null?_.push({member:S,operator:"notSet"}):_.push({member:S,operator:"equals",values:[k.toString()]})}),b.length===0&&Array.isArray(r.timeDimensions)&&r.timeDimensions.length>0&&r.timeDimensions[0].granularity==null&&b.push(r.timeDimensions[0]),{...p[y].drillMembersGrouped,filters:_,...h.length>0?{segments:h}:{},timeDimensions:b,segments:h,timezone:r.timezone}}series(e){return this.seriesNames(e).map(({title:t,shortTitle:r,key:s})=>({title:t,shortTitle:r,key:s,series:this.chartPivot(e).map(({x:a,...l})=>({value:l[s],x:a}))}))}axisValues(e,t=0){const{query:r}=this.loadResponses[t],s=e.filter(l=>l!=="measures"),a=e.includes("measures")?r.measures||[]:[];return l=>{const c=f=>{const h=s.map(p=>{const m=l[p];return m??null});return f&&h.push(f),h};return a.length>0?a.map(c):[c()]}}axisValuesString(e,t=", "){const r=s=>s==null?"∅":s===""?"[Empty string]":s;return e.map(r).join(t)}static getNormalizedPivotConfig(e,t){const r={x:[],y:[],fillMissingDates:!0,joinDateRange:!1},{measures:s=[],dimensions:a=[]}=e||{},l=(e?.timeDimensions||[]).filter(y=>!!y.granularity);t=t||(l.length?{x:l.map(y=>ut.timeDimensionMember(y)),y:a}:{x:a,y:[]});const c=hv(t,r),f=y=>y.map(_=>l.find(b=>b.dimension===_)&&!a.find(b=>b===_)?ut.timeDimensionMember((e?.timeDimensions||[]).find(b=>b.dimension===_)):_);c.x=f(c.x),c.y=f(c.y);const h=c.x.concat(c.y),p=l.map(y=>ut.timeDimensionMember(y)).concat(a),m=y=>p.includes(y)||y==="measures";return c.x=c.x.concat(p.filter(y=>!h.includes(y)&&y!=="compareDateRange")).filter(m),c.y=c.y.filter(m),c.x.concat(c.y).find(y=>y==="measures")||c.y.push("measures"),a.includes("compareDateRange")&&!c.y.concat(c.x).includes("compareDateRange")&&c.y.unshift("compareDateRange"),s.length||(c.x=c.x.filter(y=>y!=="measures"),c.y=c.y.filter(y=>y!=="measures")),c}normalizePivotConfig(e){return ut.getNormalizedPivotConfig(this.loadResponse.pivotQuery,e)}timeSeries(e,t,r){if(!e.granularity)return null;let s;if(s=e.dateRange,!s){const h=ut.timeDimensionMember(e),m=this.timeDimensionBackwardCompatibleData(t||0).map(y=>{const _=y[h];return _?At(_):null}).filter(y=>!!y);s=m.length&&[Kd(Jk(y=>y.toDate()),m[0],m).toString(),Kd(Qk(y=>y.toDate()),m[0],m).toString()]||null}if(!s)return null;const a=e.dateRange?e.dateRange.find(h=>h.match(yE)):!["hour","minute","second"].includes(e.granularity),[l,c]=s,f=ja(l,c,r);if(px(e.granularity))return hx[e.granularity](a?f.snapTo("d"):f);if(!r?.[`${e.dimension}.${e.granularity}`])throw new Error(`Granularity "${e.granularity}" not found in time dimension "${e.dimension}"`);return bE(l,c,r[`${e.dimension}.${e.granularity}`].granularity)}pivot(e){const t=this.normalizePivotConfig(e),{pivotQuery:r}=this.loadResponse,s=(l=0)=>{let c=PE(({xValues:S})=>this.axisValuesString(S));const f=(S,k)=>S[k]??t.fillWithValue??0;if(t.fillMissingDates&&t.x.length===1&&Ut(t.x,(r.timeDimensions||[]).filter(S=>!!S.granularity).map(S=>ut.timeDimensionMember(S)))){const S=this.loadResponses.map(k=>this.timeSeries(k.query.timeDimensions[0],l,k.annotation.timeDimensions));S[0]&&(c=k=>{const R=Gk(({xValues:w})=>w[0],k);return S[l]?.map(w=>[w,R[w]||[{xValues:[w],row:{}}]])??[]})}const h=this.axisValues(t.x,l),p=this.axisValues(t.y,l),m=rv(La(S=>h(S).map(k=>({xValues:k,row:S}))),ws,c)(this.timeDimensionBackwardCompatibleData(l)),y={};m.forEach(([,S])=>{S.forEach(({row:k})=>{p(k).forEach(R=>{Object.keys(k).length>0&&(y[R.join()]=R)})})});const _=Object.values(y),b=t.x.includes("measures");return m.map(([,S])=>{const{xValues:k}=S[0],R={};return S.forEach(({row:w})=>{p(w).map(O=>({yValues:O,row:w})).forEach(O=>{R[this.axisValuesString(O.yValues)]=O})}),{xValues:k,yValuesArray:ws(_.map(w=>{const E=b?ut.measureFromAxis(k):ut.measureFromAxis(w);return[[w,f((R[this.axisValuesString(w)]||{row:{}}).row,E)]]}))}})},a=this.loadResponses.length>1?this.loadResponses.map((l,c)=>s(c)):[];return a.length?this.mergePivots(a,t.joinDateRange||!1):s()}mergePivots(e,t){const r=e.reduce((s,a)=>s!=null&&a.length>=s.length?s:a,null)||[];return r.map((s,a)=>({xValues:t?[e.map(c=>c[a]?.xValues||[]).join(", ")]:r[a].xValues,yValuesArray:ws(e.map(c=>c[a].yValuesArray))}))}chartPivot(e){const t=s=>this.parseDateMeasures&&_E.test(s)?new Date(s):Number.isNaN(Number.parseFloat(s))?s:Number.parseFloat(s),r=new Set;return this.queryType===fn.BLENDING_QUERY&&fv(this.loadResponses.map(({query:a})=>a.measures??[])).filter((a,l,c)=>c.indexOf(a)!==l).forEach(a=>r.add(a)),this.pivot(e).map(({xValues:s,yValuesArray:a})=>{const l={};return a.forEach(([c,f],h)=>{l[this.axisValuesString(_v(c,h,e,r),",")]=f&&t(f)}),{x:this.axisValuesString(s,","),xValues:s,...l}})}tablePivot(e){const t=this.normalizePivotConfig(e||{}),r=t.x.concat(t.y).includes("measures");return this.pivot(t).map(({xValues:s,yValuesArray:a})=>Mi([...t.x.map((l,c)=>[l,s[c]]),...r?a.map(([l,c])=>[l.length?l.join():"value",c]):[]]))}tableColumns(e){const t=this.normalizePivotConfig(e||{}),r=this.loadResponses.map(p=>p.annotation).reduce((p,m)=>hv(p,m),{dimensions:{},measures:{},timeDimensions:{},segments:{}}),s=Object.values(r).reduce((p,m)=>({...p,...m}),{}),a={},l=p=>{const{title:m,shortTitle:y,type:_,format:b,meta:S,currency:k,granularity:R}=s[p]||{};return{key:p,title:m,shortTitle:y,type:_,format:b,meta:S,currency:k,granularity:R?.name}},c=this.pivot(t);(c[0]?.yValuesArray||[]).forEach(([p])=>{if(p.length>0){let m=a;p.forEach((y,_)=>{m[`_${y}`]={key:y,memberId:t.y[_]==="measures"?y:t.y[_],children:m[`_${y}`]?.children||{}},m=m[`_${y}`].children})}});const f=(p={},m=[])=>Object.keys(p).length===0?[]:Object.values(p).map(({key:y,..._})=>{const b=f(_.children,[...m,y]),{title:S,shortTitle:k,...R}=l(_.memberId),w=y!==_.memberId||S==null?y:"";return b.length?{...R,key:y,title:[S,w].join(" ").trim(),shortTitle:w||k,children:b}:{...R,key:y,dataIndex:[...m,y].join(),title:[S,w].join(" ").trim(),shortTitle:w||k}});let h=[];return!c.length&&t.y.includes("measures")&&(h=(this.loadResponses[0].query.measures||[]).map(p=>({...l(p),dataIndex:p}))),!t.y.length&&t.x.includes("measures")&&h.push({key:"value",dataIndex:"value",title:"Value",shortTitle:"Value",type:"string"}),t.x.map(p=>p==="measures"?{key:"measures",dataIndex:"measures",title:"Measures",shortTitle:"Measures",type:"string"}:{...l(p),dataIndex:p}).concat(f(a)).concat(h)}totalRow(e){return this.chartPivot(e)[0]}categories(e){return this.chartPivot(e)}seriesNames(e){const t=this.normalizePivotConfig(e),r=this.loadResponses.map(l=>l.annotation.measures).reduce((l,c)=>({...l,...c}),{}),s=ws(this.loadResponses.map((l,c)=>rv(La(this.axisValues(t.y,c)),ws,fx)(this.timeDimensionBackwardCompatibleData(c)))),a=new Set;return this.queryType===fn.BLENDING_QUERY&&fv(this.loadResponses.map(({query:c})=>c.measures??[])).filter((c,f,h)=>h.indexOf(c)!==f).forEach(c=>a.add(c)),s.map((l,c)=>{const f=_v(l,c,t,a);return{title:this.axisValuesString(t.y.find(h=>h==="measures")?cv(1,f).concat(r[ut.measureFromAxis(l)].title):f,", "),shortTitle:this.axisValuesString(t.y.find(h=>h==="measures")?cv(1,f).concat(r[ut.measureFromAxis(l)].shortTitle):f,", "),key:this.axisValuesString(f,","),yValues:l}})}query(){if(this.queryType!==fn.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].query}pivotQuery(){return this.loadResponse.pivotQuery||null}totalRows(){return this.loadResponses[0].total}rawData(){if(this.queryType!==fn.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].data}annotation(){if(this.queryType!==fn.REGULAR_QUERY)throw new Error(`Method is not supported for a '${this.queryType}' query type. Please use decompose`);return this.loadResponses[0].annotation}timeDimensionBackwardCompatibleData(e){if(e===void 0)throw new Error("resultIndex is required");if(!this.backwardCompatibleData[e]){const{data:t,query:r}=this.loadResponses[e],s=(r.timeDimensions||[]).filter(a=>!!a.granularity);this.backwardCompatibleData[e]=t.map(a=>({...a,...Mi(Object.keys(a).filter(l=>{const c=s.find(f=>f.dimension===l);return c&&!a[ut.timeDimensionMember(c)]}).map(l=>[ut.timeDimensionMember(s.find(c=>c.dimension===l)),a[l]]))}))}return this.backwardCompatibleData[e]}decompose(){return this.loadResponses.map(e=>new ut({queryType:fn.REGULAR_QUERY,pivotQuery:{...e.query,queryType:fn.REGULAR_QUERY},results:[e]},this.options))}serialize(){return{loadResponse:gh(this.loadResponse)}}}class bv{constructor(e){this.sqlQuery=e}rawQuery(){return this.sqlQuery.sql}sql(){return this.rawQuery().sql[0]}}const lc=n=>Mi(n.map(e=>[e.name,e])),uc={string:[{name:"contains",title:"contains"},{name:"notContains",title:"does not contain"},{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"startsWith",title:"starts with"},{name:"notStartsWith",title:"does not start with"},{name:"endsWith",title:"ends with"},{name:"notEndsWith",title:"does not end with"}],number:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"set",title:"is set"},{name:"notSet",title:"is not set"},{name:"gt",title:">"},{name:"gte",title:">="},{name:"lt",title:"<"},{name:"lte",title:"<="}],time:[{name:"equals",title:"equals"},{name:"notEquals",title:"does not equal"},{name:"inDateRange",title:"in date range"},{name:"notInDateRange",title:"not in date range"},{name:"afterDate",title:"after date"},{name:"afterOrOnDate",title:"after or on date"},{name:"beforeDate",title:"before date"},{name:"beforeOrOnDate",title:"before or on date"}]};class CE{constructor(e){this.meta=e;const{cubes:t}=this.meta;this.cubes=t,this.cubesMap=Mi(t.map(r=>[r.name,{measures:lc(r.measures),dimensions:lc(r.dimensions),segments:lc(r.segments)}]))}membersForQuery(e,t){return Zk(this.cubes.map(r=>r[t])).sort((r,s)=>r.title>s.title?1:-1)}membersGroupedByCube(){const e=["measures","dimensions","segments","timeDimensions"];return this.cubes.reduce((t,r)=>(e.forEach(s=>{let a=[];switch(s){case"measures":a=r.measures||[];break;case"dimensions":a=r.dimensions||[];break;case"segments":a=r.segments||[];break;case"timeDimensions":a=r.dimensions.filter(l=>l.type==="time")||[];break}t[s].push({cubeName:r.name,cubeTitle:r.title,type:r.type,public:r.public,members:a})}),t),{measures:[],dimensions:[],segments:[],timeDimensions:[]})}resolveMember(e,t){const[r]=e.split(".");if(!this.cubesMap[r])return{title:e,error:`Cube not found ${r} for path '${e}'`};const a=(Array.isArray(t)?t:[t]).map(l=>this.cubesMap[r][l]&&this.cubesMap[r][l][e]).find(l=>l);return a||{title:e,error:`Path not found '${e}'`}}defaultTimeDimensionNameFor(e){const[t]=e.split(".");return this.cubesMap[t]?Object.keys(this.cubesMap[t].dimensions||{}).find(r=>this.cubesMap[t].dimensions[r].type==="time"):null}filterOperatorsForMember(e,t){const r=this.resolveMember(e,t);return"error"in r||!("type"in r)||r.type==="boolean"?uc.string:uc[r.type]||uc.string}}class ME{constructor(e){this.progressResponse=e}stage(){return this.progressResponse.stage}timeElapsed(){return this.progressResponse.timeElapsed}}var cc={},xv;function RE(){return xv||(xv=1,(function(n){var e=n.URLSearchParams&&n.URLSearchParams.prototype.get?n.URLSearchParams:null,t=e&&new e({a:1}).toString()==="a=1",r=e&&new e("s=%2B").get("s")==="+",s="__URLSearchParams__",a=e?(function(){var w=new e;return w.append("s"," &"),w.toString()==="s=+%26"})():!0,l=f.prototype,c=!!(n.Symbol&&n.Symbol.iterator);if(e&&t&&r&&a)return;function f(w){w=w||"",(w instanceof URLSearchParams||w instanceof f)&&(w=w.toString()),this[s]=S(w)}l.append=function(w,E){k(this[s],w,E)},l.delete=function(w){delete this[s][w]},l.get=function(w){var E=this[s];return w in E?E[w][0]:null},l.getAll=function(w){var E=this[s];return w in E?E[w].slice(0):[]},l.has=function(w){return w in this[s]},l.set=function(E,O){this[s][E]=[""+O]},l.toString=function(){var w=this[s],E=[],O,P,T,D;for(P in w)for(T=y(P),O=0,D=w[P];O<D.length;O++)E.push(T+"="+y(D[O]));return E.join("&")};var h=!r,p=!h&&e&&!t&&n.Proxy;Object.defineProperty(n,"URLSearchParams",{value:p?new Proxy(e,{construct:function(w,E){return new w(new f(E[0]).toString())}}):f});var m=n.URLSearchParams.prototype;m.polyfill=!0,m.forEach=m.forEach||function(w,E){var O=S(this.toString());Object.getOwnPropertyNames(O).forEach(function(P){O[P].forEach(function(T){w.call(E,T,P,this)},this)},this)},m.sort=m.sort||function(){var w=S(this.toString()),E=[],O,P,T;for(O in w)E.push(O);for(E.sort(),P=0;P<E.length;P++)this.delete(E[P]);for(P=0;P<E.length;P++){var D=E[P],I=w[D];for(T=0;T<I.length;T++)this.append(D,I[T])}},m.keys=m.keys||function(){var w=[];return this.forEach(function(E,O){w.push(O)}),b(w)},m.values=m.values||function(){var w=[];return this.forEach(function(E){w.push(E)}),b(w)},m.entries=m.entries||function(){var w=[];return this.forEach(function(E,O){w.push([O,E])}),b(w)},c&&(m[n.Symbol.iterator]=m[n.Symbol.iterator]||m.entries);function y(w){var E={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(w).replace(/[!'\(\)~]|%20|%00/g,function(O){return E[O]})}function _(w){return w.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/ig,function(E){return decodeURIComponent(E)})}function b(w){var E={next:function(){var O=w.shift();return{done:O===void 0,value:O}}};return c&&(E[n.Symbol.iterator]=function(){return E}),E}function S(w){var E={};if(typeof w=="object")if(R(w))for(var O=0;O<w.length;O++){var P=w[O];if(R(P)&&P.length===2)k(E,P[0],P[1]);else throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements")}else for(var T in w)w.hasOwnProperty(T)&&k(E,T,w[T]);else{w.indexOf("?")===0&&(w=w.slice(1));for(var D=w.split("&"),I=0;I<D.length;I++){var W=D[I],H=W.indexOf("=");-1<H?k(E,_(W.slice(0,H)),_(W.slice(H+1))):W&&k(E,_(W),"")}}return E}function k(w,E,O){var P=typeof O=="string"?O:O!=null&&typeof O.toString=="function"?O.toString():JSON.stringify(O);E in w?w[E].push(P):w[E]=[P]}function R(w){return!!w&&Object.prototype.toString.call(w)==="[object Array]"}})(typeof Wr<"u"?Wr:typeof window<"u"?window:cc)),cc}RE();async function*TE(n){if(!n.body)throw new Error("Unsupported response body type for streaming");const e=n.body.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;r&&(yield r)}}finally{e.releaseLock()}}class DE{constructor({authorization:e,apiUrl:t,method:r,headers:s={},credentials:a,fetchTimeout:l,signal:c}){this.authorization=e,this.apiUrl=t,this.method=r,this.headers=s,this.credentials=a,this.fetchTimeout=l,this.signal=c}request(e,{method:t,fetchTimeout:r,baseRequestId:s,signal:a,...l}){let c=1;const f=new URLSearchParams(l&&Object.keys(l).map(b=>({[b]:typeof l[b]=="object"?JSON.stringify(l[b]):l[b]})).reduce((b,S)=>({...b,...S}),{}));let h=`${this.apiUrl}/${e}${f.toString().length?`?${f}`:""}`;const p=t??this.method??(h.length<2e3?"GET":"POST");p==="POST"&&(h=`${this.apiUrl}/${e}`,this.headers["Content-Type"]="application/json");const m=r??this.fetchTimeout,y=a||this.signal||(m?AbortSignal.timeout(m):void 0),_=()=>fetch(h,{method:p,headers:{Authorization:this.authorization,"x-request-id":s&&`${s}-span-${c++}`,...this.headers},credentials:this.credentials,body:p==="POST"?JSON.stringify(l):null,signal:y});return{async subscribe(b){try{const S=await _();return b(S,()=>this.subscribe(b))}catch(S){let k="network Error";return S.name==="AbortError"&&(y?.reason==="TimeoutError"||y?.reason?.name==="TimeoutError"?k="timeout":k="aborted"),b({error:k},()=>this.subscribe(b))}}}}requestStream(e,{method:t,fetchTimeout:r,baseRequestId:s,signal:a,params:l}){const c={};l&&Object.keys(l).forEach(b=>{const S=l[b];S!==void 0&&(c[b]=typeof S=="object"?JSON.stringify(S):String(S))});const f=new URLSearchParams(c);let h=`${this.apiUrl}/${e}${f.toString().length?`?${f}`:""}`;const p=t??this.method??"POST";p==="POST"&&(h=`${this.apiUrl}/${e}`,this.headers["Content-Type"]="application/json");const m=r??this.fetchTimeout;let y,_=a||this.signal;return!_&&m&&(y=new AbortController,_=y.signal,setTimeout(()=>y?.abort(),m)),{stream:async()=>{const b=await fetch(h,{method:p,headers:{Authorization:this.authorization,"x-request-id":s||"stream-request",...this.headers},credentials:this.credentials,body:p==="POST"?JSON.stringify(l||{}):null,signal:_});if(!b.ok)throw new Error(`HTTP ${b.status}: ${b.statusText}`);if(!b.body)throw new Error("No response body available for streaming");return TE(b)},unsubscribe:async()=>{y&&y.abort()}}}}class IE extends Error{constructor(e,t,r){super(e),this.response=t,this.status=r}}function fc(n){return{...n.lastRefreshTime?{lastRefreshTime:n.lastRefreshTime}:{},...n.external?{external:n.external}:{},...n.usedPreAggregations?{usedPreAggregations:n.usedPreAggregations}:{}}}let AE=0;const yx="Mutex has been changed";function LE(n){return n.then(e=>e).catch(e=>{if(e!==yx)throw e;return null})}class NE{constructor(e,t){if(e&&!Array.isArray(e)&&typeof e=="object"&&(t=e,e=void 0),!t||!t.transport&&!t.apiUrl)throw new Error("The `apiUrl` option is required");this.apiToken=e,this.apiUrl=t.apiUrl,this.method=t.method,this.headers=t.headers||{},this.credentials=t.credentials,this.transport=t.transport||new DE({authorization:typeof e=="string"?e:void 0,apiUrl:this.apiUrl,method:this.method,headers:this.headers,credentials:this.credentials,fetchTimeout:t.fetchTimeout,signal:t.signal}),this.pollInterval=t.pollInterval||5,this.parseDateMeasures=t.parseDateMeasures,this.castNumerics=typeof t.castNumerics=="boolean"?t.castNumerics:!1,this.networkErrorRetries=t.networkErrorRetries||0,this.updateAuthorizationPromise=null}request(e,t){return this.transport.request(e,{...t,baseRequestId:t?.baseRequestId||Qm()})}loadMethod(e,t,r,s){const a=++AE;typeof r=="function"&&!s&&(s=r,r=void 0),r=r||{};const l=r.mutexKey||"default";r.mutexObj&&(r.mutexObj[l]=a);const c=this.updateTransportAuthorization().then(()=>e());let f=!0,h=!1;const p=async()=>{const b=await c;if(r&&r.mutexObj&&r.mutexObj[l]!==a)throw h=!0,b.unsubscribe&&await b.unsubscribe(),yx};let m=this.networkErrorRetries;const y=async(b,S)=>{const k=await c,R=async()=>r?.subscribe&&!h?(k.unsubscribe||await new Promise(T=>setTimeout(()=>T(),this.pollInterval*1e3)),S()):null,w=async(T=!1)=>h?null:(T&&await new Promise(D=>setTimeout(()=>D(),this.pollInterval*1e3)),S());if(r?.subscribe&&!f&&await this.updateTransportAuthorization(),f=!1,"status"in b&&b.status===502||"error"in b&&b.error?.toLowerCase()==="network error"&&--m>=0)return await p(),w(!0);b=b;let E={},O="";try{O=await b.text(),E=JSON.parse(O)}catch{E.error=O}if(E.error?.includes("Continue wait"))return await p(),r?.progressCallback&&r.progressCallback(new ME(E)),w();if(b.status!==200){await p(),!r?.subscribe&&k.unsubscribe&&await k.unsubscribe();const T=new IE(E.error||b.error||"",E,b.status);if(s)s(T);else throw T;return R()}await p(),!r?.subscribe&&k.unsubscribe&&await k.unsubscribe();const P=t(E);if(s)s(null,P);else return P;return R()},_=c.then(b=>LE(b.subscribe(y)));return s?{unsubscribe:async()=>{const b=await c;return h=!0,b.unsubscribe?b.unsubscribe():null}}:_}async updateTransportAuthorization(){if(this.updateAuthorizationPromise){await this.updateAuthorizationPromise;return}const e=this.apiToken;if(typeof e=="function"){const t=(async()=>{try{const r=await e();this.transport.authorization!==r&&(this.transport.authorization=r)}finally{this.updateAuthorizationPromise=null}})();this.updateAuthorizationPromise=t,await t}}patchQueryInternal(e,t){return(t==="compact"||t==="columnar")&&e.responseFormat!==t?{...e,responseFormat:t}:e}loadResponseInternal(e,t={}){return e.results.length&&(t?.castNumerics&&e.results.forEach(r=>{const s=Object.entries({...r.annotation.measures,...r.annotation.dimensions}).reduce((a,[l,c])=>(c.type==="number"&&a.push(l),a),[]);r.data=r.data.map(a=>(s.forEach(l=>{a[l]!=null&&(a[l]=Number(a[l]))}),a))}),e.results[0].query.responseFormat&&e.results[0].query.responseFormat==="compact"?e.results.forEach((r,s)=>{const a=[],{dataset:l,members:c}=r.data;l.forEach(f=>{const h={};c.forEach((p,m)=>{h[p]=f[m]}),a.push(h)}),e.results[s].data=a}):e.results[0].query.responseFormat&&e.results[0].query.responseFormat==="columnar"&&e.results.forEach((r,s)=>{const{columns:a,members:l}=r.data,c=a[0]?.length??0,f=[];for(let h=0;h<c;h++){const p={};l.forEach((m,y)=>{p[m]=a[y][h]}),f.push(p)}e.results[s].data=f})),new ut(e,{parseDateMeasures:this.parseDateMeasures})}load(e,t,r,s="default"){[e,t]=this.prepareQueryOptions(e,t,s);const a={query:e,queryType:"multi",signal:t?.signal,baseRequestId:t?.baseRequestId};return t?.cache&&(a.cache=t.cache),this.loadMethod(()=>this.request("load",a),l=>this.loadResponseInternal(l,t),t,r)}prepareQueryOptions(e,t,r="default"){return t={castNumerics:this.castNumerics,...t},r==="compact"||r==="columnar"?Array.isArray(e)?[e.map(a=>this.patchQueryInternal(a,r)),t]:[this.patchQueryInternal(e,r),t]:[e,t]}subscribe(e,t,r,s="default"){return[e,t]=this.prepareQueryOptions(e,t,s),this.loadMethod(()=>this.request("subscribe",{query:e,queryType:"multi",signal:t?.signal,baseRequestId:t?.baseRequestId}),a=>this.loadResponseInternal(a,t),{...t,subscribe:!0},r)}sql(e,t,r){return this.loadMethod(()=>this.request("sql",{query:e,signal:t?.signal,baseRequestId:t?.baseRequestId}),s=>Array.isArray(s)?s.map(a=>new bv(a)):new bv(s),t,r)}meta(e,t){return this.loadMethod(()=>this.request("meta",{signal:e?.signal,baseRequestId:e?.baseRequestId,...e?.onlyViews?{onlyViews:!0}:{}}),r=>new CE(r),e,t)}dryRun(e,t,r){return this.loadMethod(()=>this.request("dry-run",{query:e,signal:t?.signal,baseRequestId:t?.baseRequestId}),s=>s,t,r)}cubeSql(e,t,r){return this.loadMethod(()=>{const s={query:e,method:"POST",signal:t?.signal,fetchTimeout:t?.timeout,baseRequestId:t?.baseRequestId,throwContinueWait:!0};return t?.cache&&(s.cache=t.cache),t?.timezone&&(s.timezone=t.timezone),this.request("cubesql",s)},s=>{if(!s||!s.error)throw new Error("Invalid response format");if(s.error==="timeout"){const h=t?.timeout||3e5;throw new Error(`CubeSQL query timed out after ${h}ms`)}if(s.error==="aborted")throw new Error("CubeSQL query was aborted");const[a,...l]=s.error.split(`
|
|
9
|
+
`);let c;try{c=JSON.parse(a)}catch{throw new Error(s.error)}const f=[];for(const h of l)if(h.trim().length){let p;try{p=JSON.parse(h)}catch{throw new Error(s.error)}if(p.error)throw new Error(p.error);if(p.data)for(let m=0;m<p.data.length;m++)f.push(p.data[m])}return{schema:c.schema,data:f,...fc(c)}},t,r)}async*cubeSqlStream(e,t){if(!this.transport.requestStream)throw new Error("Transport does not support streaming");const r=this.transport.requestStream("cubesql",{method:"POST",signal:t?.signal,fetchTimeout:t?.timeout,baseRequestId:Qm(),params:{query:e,cache:t?.cache,timezone:t?.timezone}}),s=new TextDecoder;let a="";try{const l=await r.stream();for await(const c of l){a+=s.decode(c,{stream:!0});const f=a.split(`
|
|
10
|
+
`);a=f.pop()||"";for(const h of f)if(h.trim())try{const p=JSON.parse(h);p.schema?yield{type:"schema",schema:p.schema,...fc(p)}:p.data?yield{type:"data",data:p.data}:p.error&&(yield{type:"error",error:p.error})}catch{yield{type:"error",error:`Failed to parse JSON line: ${h}`}}}if(a.trim())try{const c=JSON.parse(a);c.schema?yield{type:"schema",schema:c.schema,...fc(c)}:c.data?yield{type:"data",data:c.data}:c.error&&(yield{type:"error",error:c.error})}catch{yield{type:"error",error:`Failed to parse remaining JSON: ${a}`}}}catch(l){throw l.name==="AbortError"?new Error("aborted"):l}finally{r.unsubscribe&&await r.unsubscribe()}}}const jE=(n,e)=>new NE(n,e);var Qa=Je.createContext(null);let Sv=class extends Gr.Component{static contextType=Qa;static defaultProps={cubeApi:null,query:null,render:null,queries:null,loadSql:null,updateOnlyOnStateChange:!1,resetResultSetOnChange:!0,cache:null};static isQueryPresent(e){return qs(e)}constructor(e){super(e),this.state={},this.mutexObj={}}componentDidMount(){const{query:e,queries:t}=this.props;e&&this.load(e),t&&this.loadQueries(t)}shouldComponentUpdate(e,t){const{query:r,queries:s,render:a,cubeApi:l,loadSql:c,updateOnlyOnStateChange:f}=this.props;return f?!Ut(e.query,r)||!Ut(e.queries,s)||(e.render==null||a==null)&&e.render!==a||e.cubeApi!==l||e.loadSql!==c||!Ut(t,this.state)||e.updateOnlyOnStateChange!==f:!0}componentDidUpdate(e){const{query:t,queries:r}=this.props;Ut(e.query,t)||this.load(t),Ut(e.queries,r)||this.loadQueries(r)}cubeApi(){return this.props.cubeApi||this.context&&this.context.cubeApi}load(e){const{resetResultSetOnChange:t,cache:r}=this.props;this.setState({isLoading:!0,error:null,sqlQuery:null,...t?{resultSet:null}:{}});const{loadSql:s}=this.props,a=this.cubeApi(),l={mutexObj:this.mutexObj,mutexKey:"query",...r?{cache:r}:{}};e&&qs(e)&&(s==="only"?a.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}).then(c=>this.setState({sqlQuery:c,error:null,isLoading:!1})).catch(c=>this.setState({...t?{resultSet:null}:{},error:c,isLoading:!1})):s?Promise.all([a.sql(e,{mutexObj:this.mutexObj,mutexKey:"sql"}),a.load(e,l)]).then(([c,f])=>this.setState({sqlQuery:c,resultSet:f,error:null,isLoading:!1})).catch(c=>this.setState({...t?{resultSet:null}:{},error:c,isLoading:!1})):a.load(e,l).then(c=>this.setState({resultSet:c,error:null,isLoading:!1})).catch(c=>this.setState({...t?{resultSet:null}:{},error:c,isLoading:!1})))}loadQueries(e){const t=this.cubeApi(),{resetResultSetOnChange:r,cache:s}=this.props;this.setState({isLoading:!0,...r?{resultSet:null}:{},error:null}),Promise.all(dx(e).map(([l,c])=>t.load(c,{mutexObj:this.mutexObj,mutexKey:l,...s?{cache:s}:{}}).then(f=>[l,f]))).then(l=>this.setState({resultSet:Mi(l),error:null,isLoading:!1})).catch(l=>this.setState({...r?{resultSet:null}:{},error:l,isLoading:!1}))}render(){const{error:e,queries:t,resultSet:r,isLoading:s,sqlQuery:a}=this.state,{render:l}=this.props,c={error:e?new Error(e.response?.plainError||e.message||e.toString()):null,resultSet:t?r||{}:r,loadingState:{isLoading:s},sqlQuery:a};return l?l(c):null}};function Zd(n){return Array.isArray(n)||typeof n!="object"?n:Object.fromEntries(Object.entries(n).filter(([,e])=>e!=null).map(([e,t])=>Array.isArray(t)?[e,t.map(Zd)]:[e,typeof t=="object"?Zd(t):t]))}const FE=[{name:void 0,title:"w/o grouping"},{name:"second",title:"Second"},{name:"minute",title:"Minute"},{name:"hour",title:"Hour"},{name:"day",title:"Day"},{name:"week",title:"Week"},{name:"month",title:"Month"},{name:"quarter",title:"Quarter"},{name:"year",title:"Year"}];class Rs extends Gr.Component{static contextType=Qa;static defaultProps={cubeApi:null,stateChangeHeuristics:null,disableHeuristics:!1,render:null,wrapWithQueryRenderer:!0,defaultChartType:"line",defaultQuery:{},initialVizState:null,onVizStateChanged:null,query:null,setQuery:null,vizState:null,setVizState:null};static getDerivedStateFromProps(e,t){if(e.query||e.vizState){const r={...t,...e.vizState||{}};if(Array.isArray(e.query))throw new Error("Array of queries is not supported.");return{...r,query:{...r.query,...e.query||{}}}}return null}static resolveMember(e,{meta:t,query:r}){return t?Array.isArray(r)?r.reduce((s,a)=>s.concat(Rs.resolveMember(e,{meta:t,query:a})),[]):e==="timeDimensions"?(r.timeDimensions||[]).map((s,a)=>({...s,dimension:{...t.resolveMember(s.dimension,"dimensions"),granularities:FE},index:a})):(r[e]||[]).map((s,a)=>({index:a,...t.resolveMember(s,e)})):[]}constructor(e){super(e),this.state={query:e.defaultQuery||e.query,chartType:e.defaultChartType,validatedQuery:e.query,missingMembers:[],isFetchingMeta:!0,dryRunResponse:null,...e.vizState,...e.initialVizState},this.mutexObj={},this.orderMembersOrderKeys=[]}async componentDidMount(){this.prevContext=this.context,await this.fetchMeta()}async componentDidUpdate(e){const{schemaVersion:t,onSchemaChange:r}=this.props,{meta:s}=this.state;if(this.prevContext?.cubeApi!==this.context?.cubeApi&&(this.prevContext=this.context,await this.fetchMeta()),e.schemaVersion!==t)try{const a=await this.cubeApi().meta();!Ut(a,s)&&typeof r=="function"&&r({schemaVersion:t,refresh:async()=>{await this.fetchMeta()}})}catch(a){this.setState({metaError:a})}}fetchMeta=async()=>{if(!this.cubeApi())return;let e,t=null,r=null,s=null;try{this.setState({isFetchingMeta:!0}),e=await this.cubeApi().meta()}catch(a){const l=a;t=l.response?.plainError||l,r=l,s=l.response?.stack?.replace(l.message||"","")||""}this.setState({meta:e,metaError:t?new Error(t.message||t.toString()):null,richMetaError:r,metaErrorStack:s,isFetchingMeta:!1},()=>{this.updateQuery({})})};cubeApi(){const{cubeApi:e}=this.props;return e||this.context&&this.context.cubeApi}getMissingMembers(e,t){return t?OE(e).map(r=>t.resolveMember(r,["measures","dimensions","segments"]).error?r:!1).filter(Boolean):[]}isQueryPresent(){const{query:e}=this.state;return Sv.isQueryPresent(e)}prepareRenderProps(e){const t=L=>L.name,r=L=>{const V=L.compareDateRange?{compareDateRange:L.compareDateRange}:{dateRange:L.dateRange};return Zd({dimension:L.dimension.name,granularity:L.granularity,...V})},s=L=>({member:L.member?.name||L.dimension?.name,operator:L.operator,...["set","notSet"].includes(L.operator)?{}:{values:L.values}}),a=(L,V=t)=>({add:j=>{const{query:U}=this.state;this.updateQuery({[L]:(U[L]||[]).concat(V(j))})},remove:j=>{const{query:U}=this.state;return this.updateQuery({[L]:(U[L]||[]).filter((C,q)=>q!==j.index)})},update:(j,U)=>{const{query:C}=this.state,q=(C[L]||[]).concat([]);return q.splice(j.index,1,V(U)),this.updateQuery({[L]:q})}}),{meta:l,metaError:c,richMetaError:f,query:h,queryError:p,chartType:m,pivotConfig:y,validatedQuery:_,missingMembers:b,isFetchingMeta:S,dryRunResponse:k,metaErrorStack:R}=this.state,E=Jd(L=>`${Ss("member",L)}${Ss("operator",L)}`,Fa(l&&h.filters||[]).map(L=>({...L,member:L.member||L.dimension}))).map((L,V)=>({...L,dimension:l.resolveMember(L.member||L.dimension,["dimensions","measures"]),operators:l.filterOperatorsForMember(L.member||L.dimension,["dimensions","measures"]),index:V})),O=Rs.resolveMember("measures",this.state),P=Rs.resolveMember("dimensions",this.state),T=Rs.resolveMember("timeDimensions",this.state),D=(l&&h.segments||[]).map((L,V)=>({index:V,...l.resolveMember(L,"segments")}));let I=[],W=[],H=[],Y=[];const ee=l?.membersGroupedByCube()||{measures:[],dimensions:[],segments:[],timeDimensions:[]};if(l){I=l.membersForQuery(h,"measures"),W=l.membersForQuery(h,"dimensions"),H=l.membersForQuery(h,"segments");const L=dv(Ss("cubeName"),ee.measures),V=dv(Ss("cubeName"),ee.dimensions);Y=fx([...Object.keys(L),...Object.keys(V)]).sort().map(U=>({...L[U]||V[U],members:[...L[U]?.members,...V[U]?.members].sort((q,J)=>q.shortTitle>J.shortTitle?1:-1)}))}const ne=Array.isArray(h.order)?Object.fromEntries(h.order):h.order,G=[...O,...P,...T.map(({dimension:L})=>L)];let B=Jd(Ss("id"),[...G.map(({name:L,title:V})=>({id:L,title:V,order:ne?.[L]||"none"}))]);return this.orderMembersOrderKeys.length!==B.length&&(this.orderMembersOrderKeys=B.map(({id:L})=>L)),this.orderMembersOrderKeys.length&&(B=(this.orderMembersOrderKeys||[]).map(L=>B.find(V=>V.id===L)).filter(Boolean)),{meta:l,metaError:c,richMetaError:f,metaErrorStack:R,query:h,error:p,validatedQuery:_,isQueryPresent:this.isQueryPresent(),chartType:m,measures:O,dimensions:P,timeDimensions:T,segments:D,filters:E,orderMembers:B,availableMeasures:I,availableDimensions:W,availableTimeDimensions:W.filter(L=>L.type==="time"),availableSegments:H,availableMembers:ee,availableFilterMembers:Y,updateQuery:L=>this.updateQuery(L),updateMeasures:a("measures"),updateDimensions:a("dimensions"),updateSegments:a("segments"),updateTimeDimensions:a("timeDimensions",r),updateFilters:a("filters",s),updateChartType:L=>this.updateVizState({chartType:L}),updateOrder:{set:(L,V="asc")=>{this.updateQuery({order:B.map(j=>({...j,order:j.id===L?V:j.order})).reduce((j,{id:U,order:C})=>C!=="none"?[...j,[U,C]]:j,[])})},update:L=>{this.updateQuery({order:L})},reorder:(L,V)=>{if(L==null||V==null)return;const j=EE(B,L,V);this.orderMembersOrderKeys=j.map(({id:U})=>U),this.updateQuery({order:j.reduce((U,{id:C,order:q})=>q!=="none"?[...U,[C,q]]:U,[])})}},pivotConfig:y,updatePivotConfig:{moveItem:({sourceIndex:L,destinationIndex:V,sourceAxis:j,destinationAxis:U})=>{this.updateVizState({pivotConfig:kE(y,L,V,j,U)})},update:L=>{const{limit:V}=L;this.updateVizState({pivotConfig:{...y,...L},...V?{query:{...h,limit:V}}:null})}},missingMembers:b,refresh:this.fetchMeta,isFetchingMeta:S,dryRunResponse:k,...e}}updateQuery(e){const{query:t}=this.state;this.updateVizState({query:mx({...t,...e})})}async updateVizState(e){const{setQuery:t,setVizState:r}=this.props,{query:s,pivotConfig:a,chartType:l,meta:c}=this.state,f=this.applyStateChangeHeuristics(e);f.query||(f.query={...s});let h=null;const p=_=>{const{onVizStateChanged:b}=this.props;if(b){const S=ha(["chartType","pivotConfig","query"],_);(!h||!Ut(h,S))&&(b(S),h=gh(S))}},m=_=>{r&&r(ha(["chartType","pivotConfig","query"],_)),_.query&&t&&t(_.query)};if(f.shouldApplyHeuristicOrder&&(f.query.order=SE(f.query)),f.pivotConfig=ut.getNormalizedPivotConfig(f.query,f.pivotConfig!==void 0?f.pivotConfig:a),f.missingMembers=this.getMissingMembers(f.query,c),f.chartType=f.chartType||e.chartType||l,m({...e,query:f.query}),this.setState({...f,queryError:null}),p(f),!Ut(ha(["measures","dimensions","timeDimensions"],s),ha(["measures","dimensions","timeDimensions"],f.query))&&qs(f.query)&&f.missingMembers.length===0)try{const _=await this.cubeApi().dryRun(f.query,{mutexObj:this.mutexObj});f.shouldApplyHeuristicOrder&&(f.query.order=(_.queryOrder||[]).reduce((b,S)=>({...b,...S}),{})),f.pivotConfig=ut.getNormalizedPivotConfig(_.pivotQuery,f.pivotConfig),f.validatedQuery=this.validatedQuery(f),f.dryRunResponse=_,qs(s)&&m({...this.state,...f})}catch(_){const b=_;this.setState({queryError:new Error(b.response?.plainError||b.message),richQueryError:new Error(b.message||b.toString())})}this.setState(f,()=>p(this.state))}validatedQuery(e){const{query:t}=e||this.state;return xE(t)}defaultHeuristics(e){const{query:t,sessionGranularity:r,meta:s}=this.state;return wE(e,t,{meta:s,sessionGranularity:r||"day"})}applyStateChangeHeuristics(e){const{stateChangeHeuristics:t,disableHeuristics:r}=this.props;return r?e:t&&t(this.state,e)||this.defaultHeuristics(e)}render(){const{query:e}=this.state,{cubeApi:t,render:r,wrapWithQueryRenderer:s}=this.props;return s?Gr.createElement(Sv,{query:e,cubeApi:t,resetResultSetOnChange:!1,render:a=>r?r(this.prepareRenderProps(a)):null}):r?r(this.prepareRenderProps()):null}}const zE=({cubeApi:n,children:e,options:t={}})=>Gr.createElement(Qa.Provider,{value:{cubeApi:n,options:t}},e);function qE(n){const e=Je.useRef([]);return Ut(n,e.current)||(e.current=n),e.current}function BE(n,e={}){const t=Je.useRef({}),[r,s]=Je.useState(null),[a,l]=Je.useState(!e.skip),[c,f]=Je.useState(null),[h,p]=Je.useState(null),[m,y]=Je.useState(null),_=Je.useContext(Qa);let b=null;const S=R=>p(R.progressResponse);async function k(){const{resetResultSetOnChange:R}=e,w=e.cubeApi||_?.cubeApi;if(!w)throw new Error("Cube API client is not provided");R&&f(null),y(null),l(!0);try{const E=await w.load(n,{mutexObj:t.current,mutexKey:"query",progressCallback:S,castNumerics:!!(typeof e.castNumerics=="boolean"?e.castNumerics:_?.options?.castNumerics),...e.cache?{cache:e.cache}:{}});f(E),p(null)}catch(E){y(E),f(null),p(null)}l(!1)}return Je.useEffect(()=>{const{skip:R=!1,resetResultSetOnChange:w}=e,E=e.cubeApi||_?.cubeApi;if(!E)throw new Error("Cube API client is not provided");async function O(){if(!R&&qs(n)){vx(r,n)||((w==null||w)&&f(null),s(n)),y(null),l(!0);try{b&&(await b.unsubscribe(),b=null),e.subscribe?b=E.subscribe(n,{mutexObj:t.current,mutexKey:"query",progressCallback:S,...e.cache?{cache:e.cache}:{}},(T,D)=>{T?y(T):f(D),l(!1),p(null)}):await k()}catch(T){y(T),f(null),l(!1),p(null)}}}return O(),()=>{b&&(b.unsubscribe(),b=null)}},qE([n,Object.keys(n?.order||{}),e,_])),{isLoading:a,resultSet:c,error:m,progress:h,previousQuery:r,refetch:k}}var wv={},ks,kv;function Ve(){if(kv)return ks;kv=1;var n=function(e){return e&&e.Math===Math&&e};return ks=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof Wr=="object"&&Wr)||n(typeof ks=="object"&&ks)||(function(){return this})()||Function("return this")(),ks}var dc={},hc,Ev;function dt(){return Ev||(Ev=1,hc=function(n){try{return!!n()}catch{return!0}}),hc}var pc,Ov;function tn(){if(Ov)return pc;Ov=1;var n=dt();return pc=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),pc}var gc,Pv;function Ka(){if(Pv)return gc;Pv=1;var n=dt();return gc=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),gc}var mc,Cv;function On(){if(Cv)return mc;Cv=1;var n=Ka(),e=Function.prototype.call;return mc=n?e.bind(e):function(){return e.apply(e,arguments)},mc}var vc={},Mv;function _x(){if(Mv)return vc;Mv=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return vc.f=t?function(s){var a=e(this,s);return!!a&&a.enumerable}:n,vc}var yc,Rv;function _h(){return Rv||(Rv=1,yc=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),yc}var _c,Tv;function Ot(){if(Tv)return _c;Tv=1;var n=Ka(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return _c=n?r:function(s){return function(){return t.apply(s,arguments)}},_c}var bc,Dv;function Ai(){if(Dv)return bc;Dv=1;var n=Ot(),e=n({}.toString),t=n("".slice);return bc=function(r){return t(e(r),8,-1)},bc}var xc,Iv;function bx(){if(Iv)return xc;Iv=1;var n=Ot(),e=dt(),t=Ai(),r=Object,s=n("".split);return xc=e(function(){return!r("z").propertyIsEnumerable(0)})?function(a){return t(a)==="String"?s(a,""):r(a)}:r,xc}var Sc,Av;function Xa(){return Av||(Av=1,Sc=function(n){return n==null}),Sc}var wc,Lv;function bh(){if(Lv)return wc;Lv=1;var n=Xa(),e=TypeError;return wc=function(t){if(n(t))throw new e("Can't call method on "+t);return t},wc}var kc,Nv;function Qs(){if(Nv)return kc;Nv=1;var n=bx(),e=bh();return kc=function(t){return n(e(t))},kc}var Ec,jv;function st(){if(jv)return Ec;jv=1;var n=typeof document=="object"&&document.all;return Ec=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},Ec}var Oc,Fv;function Pn(){if(Fv)return Oc;Fv=1;var n=st();return Oc=function(e){return typeof e=="object"?e!==null:n(e)},Oc}var Pc,zv;function Xr(){if(zv)return Pc;zv=1;var n=Ve(),e=st(),t=function(r){return e(r)?r:void 0};return Pc=function(r,s){return arguments.length<2?t(n[r]):n[r]&&n[r][s]},Pc}var Cc,qv;function Ja(){if(qv)return Cc;qv=1;var n=Ot();return Cc=n({}.isPrototypeOf),Cc}var Mc,Bv;function Li(){if(Bv)return Mc;Bv=1;var n=Ve(),e=n.navigator,t=e&&e.userAgent;return Mc=t?String(t):"",Mc}var Rc,$v;function xh(){if($v)return Rc;$v=1;var n=Ve(),e=Li(),t=n.process,r=n.Deno,s=t&&t.versions||r&&r.version,a=s&&s.v8,l,c;return a&&(l=a.split("."),c=l[0]>0&&l[0]<4?1:+(l[0]+l[1])),!c&&e&&(l=e.match(/Edge\/(\d+)/),(!l||l[1]>=74)&&(l=e.match(/Chrome\/(\d+)/),l&&(c=+l[1]))),Rc=c,Rc}var Tc,Vv;function xx(){if(Vv)return Tc;Vv=1;var n=xh(),e=dt(),t=Ve(),r=t.String;return Tc=!!Object.getOwnPropertySymbols&&!e(function(){var s=Symbol("symbol detection");return!r(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&n&&n<41}),Tc}var Dc,Wv;function Sx(){if(Wv)return Dc;Wv=1;var n=xx();return Dc=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Dc}var Ic,Uv;function wx(){if(Uv)return Ic;Uv=1;var n=Xr(),e=st(),t=Ja(),r=Sx(),s=Object;return Ic=r?function(a){return typeof a=="symbol"}:function(a){var l=n("Symbol");return e(l)&&t(l.prototype,s(a))},Ic}var Ac,Hv;function Za(){if(Hv)return Ac;Hv=1;var n=String;return Ac=function(e){try{return n(e)}catch{return"Object"}},Ac}var Lc,Yv;function Jr(){if(Yv)return Lc;Yv=1;var n=st(),e=Za(),t=TypeError;return Lc=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},Lc}var Nc,Gv;function Sh(){if(Gv)return Nc;Gv=1;var n=Jr(),e=Xa();return Nc=function(t,r){var s=t[r];return e(s)?void 0:n(s)},Nc}var jc,Qv;function $E(){if(Qv)return jc;Qv=1;var n=On(),e=st(),t=Pn(),r=TypeError;return jc=function(s,a){var l,c;if(a==="string"&&e(l=s.toString)&&!t(c=n(l,s))||e(l=s.valueOf)&&!t(c=n(l,s))||a!=="string"&&e(l=s.toString)&&!t(c=n(l,s)))return c;throw new r("Can't convert object to primitive value")},jc}var Fc={exports:{}},zc,Kv;function Ks(){return Kv||(Kv=1,zc=!1),zc}var qc,Xv;function wh(){if(Xv)return qc;Xv=1;var n=Ve(),e=Object.defineProperty;return qc=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},qc}var Jv;function kh(){if(Jv)return Fc.exports;Jv=1;var n=Ks(),e=Ve(),t=wh(),r="__core-js_shared__",s=Fc.exports=e[r]||t(r,{});return(s.versions||(s.versions=[])).push({version:"3.50.0",mode:n?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Fc.exports}var Bc,Zv;function kx(){if(Zv)return Bc;Zv=1;var n=kh(),e=Object.create||Object;return Bc=function(t,r){return n[t]||(n[t]=r||e(null))},Bc}var $c,ey;function Xs(){if(ey)return $c;ey=1;var n=bh(),e=Object;return $c=function(t){return e(n(t))},$c}var Vc,ty;function pn(){if(ty)return Vc;ty=1;var n=Ot(),e=Xs(),t=n({}.hasOwnProperty);return Vc=Object.hasOwn||function(s,a){return t(e(s),a)},Vc}var Wc,ny;function Ex(){if(ny)return Wc;ny=1;var n=Ot(),e=0,t=Math.random(),r=n(1.1.toString);return Wc=function(s){return"Symbol("+(s===void 0?"":s)+")_"+r(++e+t,36)},Wc}var Uc,ry;function Ht(){if(ry)return Uc;ry=1;var n=Ve(),e=kx(),t=pn(),r=Ex(),s=xx(),a=Sx(),l=n.Symbol,c=e("wks"),f=a?l.for||l:l&&l.withoutSetter||r;return Uc=function(h){return t(c,h)||(c[h]=s&&t(l,h)?l[h]:f("Symbol."+h)),c[h]},Uc}var Hc,iy;function Ox(){if(iy)return Hc;iy=1;var n=On(),e=Pn(),t=wx(),r=Sh(),s=$E(),a=Ht(),l=TypeError,c=a("toPrimitive");return Hc=function(f,h){if(!e(f)||t(f))return f;var p=r(f,c),m;if(p){if(h===void 0&&(h="default"),m=n(p,f,h),!e(m)||t(m))return m;throw new l("Can't convert object to primitive value")}return h===void 0&&(h="number"),s(f,h)},Hc}var Yc,sy;function Px(){if(sy)return Yc;sy=1;var n=Ox(),e=wx();return Yc=function(t){var r=n(t,"string");return e(r)?r:r+""},Yc}var Gc,oy;function el(){if(oy)return Gc;oy=1;var n=Ve(),e=Pn(),t=n.document,r=e(t)&&e(t.createElement);return Gc=function(s){return r?t.createElement(s):{}},Gc}var Qc,ay;function Cx(){if(ay)return Qc;ay=1;var n=tn(),e=dt(),t=el();return Qc=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Qc}var ly;function Mx(){if(ly)return dc;ly=1;var n=tn(),e=On(),t=_x(),r=_h(),s=Qs(),a=Px(),l=pn(),c=Cx(),f=Object.getOwnPropertyDescriptor;return dc.f=n?f:function(p,m){if(p=s(p),m=a(m),c)try{return f(p,m)}catch{}if(l(p,m))return r(!e(t.f,p,m),p[m])},dc}var Kc={},Xc,uy;function Rx(){if(uy)return Xc;uy=1;var n=tn(),e=dt();return Xc=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Xc}var Jc,cy;function gn(){if(cy)return Jc;cy=1;var n=Pn(),e=String,t=TypeError;return Jc=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},Jc}var fy;function xr(){if(fy)return Kc;fy=1;var n=tn(),e=Cx(),t=Rx(),r=gn(),s=Px(),a=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",p="writable";return Kc.f=n?t?function(y,_,b){if(r(y),_=s(_),r(b),typeof y=="function"&&_==="prototype"&&"value"in b&&p in b&&!b[p]){var S=c(y,_);S&&S[p]&&(y[_]=b.value,b={configurable:h in b?b[h]:S[h],enumerable:f in b?b[f]:S[f],writable:!1})}return l(y,_,b)}:l:function(y,_,b){if(r(y),_=s(_),r(b),e)try{return l(y,_,b)}catch{}if("get"in b||"set"in b)throw new a("Accessors not supported");return"value"in b&&(y[_]=b.value),y},Kc}var Zc,dy;function Eh(){if(dy)return Zc;dy=1;var n=tn(),e=xr(),t=_h();return Zc=n?function(r,s,a){return e.f(r,s,t(1,a))}:function(r,s,a){return r[s]=a,r},Zc}var ef={exports:{}},tf,hy;function Tx(){if(hy)return tf;hy=1;var n=tn(),e=pn(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,s=e(t,"name"),a=s&&(function(){}).name==="something",l=s&&(!n||n&&r(t,"name").configurable);return tf={EXISTS:s,PROPER:a,CONFIGURABLE:l},tf}var nf,py;function Oh(){if(py)return nf;py=1;var n=Ot(),e=st(),t=kh(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(s){return r(s)}),nf=t.inspectSource,nf}var rf,gy;function VE(){if(gy)return rf;gy=1;var n=Ve(),e=st(),t=n.WeakMap;return rf=e(t)&&/native code/.test(String(t)),rf}var sf,my;function Ph(){if(my)return sf;my=1;var n=kx(),e=Ex(),t=n("keys");return sf=function(r){return t[r]||(t[r]=e(r))},sf}var of,vy;function Ch(){return vy||(vy=1,of={}),of}var af,yy;function Dx(){if(yy)return af;yy=1;var n=VE(),e=Ve(),t=Pn(),r=Eh(),s=pn(),a=kh(),l=Ph(),c=Ch(),f="Object already initialized",h=e.TypeError,p=e.WeakMap,m,y,_,b=function(w){return _(w)?y(w):m(w,{})},S=function(w){return function(E){var O;if(!t(E)||(O=y(E)).type!==w)throw new h("Incompatible receiver, "+w+" required");return O}};if(n||a.state){var k=a.state||(a.state=new p);k.get=k.get,k.has=k.has,k.set=k.set,m=function(w,E){if(k.has(w))throw new h(f);return E.facade=w,k.set(w,E),E},y=function(w){return k.get(w)||{}},_=function(w){return k.has(w)}}else{var R=l("state");c[R]=!0,m=function(w,E){if(s(w,R))throw new h(f);return E.facade=w,r(w,R,E),E},y=function(w){return s(w,R)?w[R]:{}},_=function(w){return s(w,R)}}return af={set:m,get:y,has:_,enforce:b,getterFor:S},af}var _y;function Ix(){if(_y)return ef.exports;_y=1;var n=Ot(),e=dt(),t=st(),r=pn(),s=tn(),a=Tx().CONFIGURABLE,l=Oh(),c=Dx(),f=c.enforce,h=c.get,p=String,m=Object.defineProperty,y=n("".slice),_=n("".replace),b=n([].join),S=s&&!e(function(){return m(function(){},"length",{value:8}).length!==8}),k=String(String).split("String"),R=ef.exports=function(w,E,O){y(p(E),0,7)==="Symbol("&&(E="["+_(p(E),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),O&&O.getter&&(E="get "+E),O&&O.setter&&(E="set "+E),(!r(w,"name")||a&&w.name!==E)&&(s?m(w,"name",{value:E,configurable:!0}):w.name=E),S&&O&&r(O,"arity")&&w.length!==O.arity&&m(w,"length",{value:O.arity});try{O&&r(O,"constructor")&&O.constructor?s&&m(w,"prototype",{writable:!1}):w.prototype&&(w.prototype=void 0)}catch{}var P=f(w);return r(P,"source")||(P.source=b(k,typeof E=="string"?E:"")),w};return Function.prototype.toString=R(function(){return t(this)&&h(this).source||l(this)},"toString"),ef.exports}var lf,by;function Ni(){if(by)return lf;by=1;var n=st(),e=xr(),t=Ix(),r=wh();return lf=function(s,a,l,c){c||(c={});var f=c.enumerable,h=c.name!==void 0?c.name:a;if(n(l)&&t(l,h,c),c.global)f?s[a]=l:r(a,l);else{try{c.unsafe?s[a]&&(f=!0):delete s[a]}catch{}f?s[a]=l:e.f(s,a,{value:l,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return s},lf}var uf={},cf,xy;function WE(){if(xy)return cf;xy=1;var n=Math.ceil,e=Math.floor;return cf=Math.trunc||function(r){var s=+r;return(s>0?e:n)(s)},cf}var ff,Sy;function Ax(){if(Sy)return ff;Sy=1;var n=WE();return ff=function(e){var t=+e;return t!==t||t===0?0:n(t)},ff}var df,wy;function UE(){if(wy)return df;wy=1;var n=Ax(),e=Math.max,t=Math.min;return df=function(r,s){var a=n(r);return a<0?e(a+s,0):t(a,s)},df}var hf,ky;function HE(){if(ky)return hf;ky=1;var n=Ax(),e=Math.min;return hf=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},hf}var pf,Ey;function Mh(){if(Ey)return pf;Ey=1;var n=HE();return pf=function(e){return n(e.length)},pf}var gf,Oy;function YE(){if(Oy)return gf;Oy=1;var n=Qs(),e=UE(),t=Mh(),r=function(s){return function(a,l,c){var f=n(a),h=t(f);if(h===0)return!s&&-1;var p=e(c,h),m;if(s&&l!==l){for(;h>p;)if(m=f[p++],m!==m)return!0}else for(;h>p;p++)if((s||p in f)&&f[p]===l)return s||p||0;return!s&&-1}};return gf={includes:r(!0),indexOf:r(!1)},gf}var mf,Py;function Lx(){if(Py)return mf;Py=1;var n=Ot(),e=pn(),t=Qs(),r=YE().indexOf,s=Ch(),a=n([].push);return mf=function(l,c){var f=t(l),h=0,p=[],m;for(m in f)!e(s,m)&&e(f,m)&&a(p,m);for(;c.length>h;)e(f,m=c[h++])&&(~r(p,m)||a(p,m));return p},mf}var vf,Cy;function Rh(){return Cy||(Cy=1,vf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),vf}var My;function GE(){if(My)return uf;My=1;var n=Lx(),e=Rh(),t=e.concat("length","prototype");return uf.f=Object.getOwnPropertyNames||function(s){return n(s,t)},uf}var yf={},Ry;function QE(){return Ry||(Ry=1,yf.f=Object.getOwnPropertySymbols),yf}var _f,Ty;function KE(){if(Ty)return _f;Ty=1;var n=Xr(),e=Ot(),t=GE(),r=QE(),s=gn(),a=e([].concat);return _f=n("Reflect","ownKeys")||function(c){var f=t.f(s(c)),h=r.f;return h?a(f,h(c)):f},_f}var bf,Dy;function XE(){if(Dy)return bf;Dy=1;var n=pn(),e=KE(),t=Mx(),r=xr();return bf=function(s,a,l){for(var c=e(a),f=r.f,h=t.f,p=0;p<c.length;p++){var m=c[p];!n(s,m)&&!(l&&n(l,m))&&f(s,m,h(a,m))}},bf}var xf,Iy;function Nx(){if(Iy)return xf;Iy=1;var n=dt(),e=st(),t=/#|\.prototype\./,r=function(f,h){var p=a[s(f)];return p===c?!0:p===l?!1:e(h)?n(h):!!h},s=r.normalize=function(f){return String(f).replace(t,".").toLowerCase()},a=r.data={},l=r.NATIVE="N",c=r.POLYFILL="P";return xf=r,xf}var Sf,Ay;function jt(){if(Ay)return Sf;Ay=1;var n=Ve(),e=Mx().f,t=Eh(),r=Ni(),s=wh(),a=XE(),l=Nx();return Sf=function(c,f){var h=c.target,p=c.global,m=c.stat,y,_,b,S,k,R;if(p?_=n:m?_=n[h]||s(h,{}):_=n[h]&&n[h].prototype,_)for(b in f){if(k=f[b],c.dontCallGetSet?(R=e(_,b),S=R&&R.value):S=_[b],y=l(p?b:h+(m?".":"#")+b,c.forced),!y&&S!==void 0){if(typeof k==typeof S)continue;a(k,S)}(c.sham||S&&S.sham)&&t(k,"sham",!0),r(_,b,k,c)}},Sf}var wf,Ly;function JE(){if(Ly)return wf;Ly=1;var n=Ai(),e=Ot();return wf=function(t){if(n(t)==="Function")return e(t)},wf}var kf,Ny;function tl(){if(Ny)return kf;Ny=1;var n=JE(),e=Jr(),t=Ka(),r=n(n.bind);return kf=function(s,a){return e(s),a===void 0?s:t?r(s,a):function(){return s.apply(a,arguments)}},kf}var Ef,jy;function ZE(){if(jy)return Ef;jy=1;var n=Ai();return Ef=Array.isArray||function(t){return n(t)==="Array"},Ef}var Of,Fy;function Th(){if(Fy)return Of;Fy=1;var n=Ht(),e=n("toStringTag"),t={};return t[e]="z",Of=String(t)==="[object z]",Of}var Pf,zy;function Dh(){if(zy)return Pf;zy=1;var n=Th(),e=st(),t=Ai(),r=Ht(),s=r("toStringTag"),a=Object,l=t((function(){return arguments})())==="Arguments",c=function(f,h){try{return f[h]}catch{}};return Pf=n?t:function(f){var h,p,m;return f===void 0?"Undefined":f===null?"Null":typeof(p=c(h=a(f),s))=="string"?p:l?t(h):(m=t(h))==="Object"&&e(h.callee)?"Arguments":m},Pf}var Cf,qy;function jx(){if(qy)return Cf;qy=1;var n=Ot(),e=dt(),t=st(),r=Dh(),s=Xr(),a=Oh(),l=function(){},c=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,h=n(f.exec),p=!f.test(l),m=function(b){if(!t(b))return!1;try{return c(l,[],b),!0}catch{return!1}},y=function(b){if(!t(b))return!1;switch(r(b)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(f,a(b))}catch{return!0}};return y.sham=!0,Cf=!c||e(function(){var _;return m(m.call)||!m(Object)||!m(function(){_=!0})||_})?y:m,Cf}var Mf,By;function eO(){if(By)return Mf;By=1;var n=ZE(),e=jx(),t=Pn(),r=Ht(),s=r("species"),a=Array;return Mf=function(l){var c;return n(l)&&(c=l.constructor,e(c)&&(c===a||n(c.prototype))?c=void 0:t(c)&&(c=c[s],c===null&&(c=void 0))),c===void 0?a:c},Mf}var Rf,$y;function tO(){if($y)return Rf;$y=1;var n=eO();return Rf=function(e,t){return new(n(e))(t===0?0:t)},Rf}var Tf,Vy;function nO(){if(Vy)return Tf;Vy=1;var n=tn(),e=xr(),t=_h();return Tf=function(r,s,a){n?e.f(r,s,t(0,a)):r[s]=a},Tf}var Df,Wy;function Ih(){if(Wy)return Df;Wy=1;var n=tl(),e=bx(),t=Xs(),r=Mh(),s=tO(),a=nO(),l=function(c){var f=c===1,h=c===2,p=c===3,m=c===4,y=c===6,_=c===7,b=c===5||y;return function(S,k,R){for(var w=t(S),E=e(w),O=r(E),P=n(k,R),T=0,D=0,I=f?s(S,O):h||_?s(S,0):void 0,W,H;O>T;T++)if((b||T in E)&&(W=E[T],H=P(W,T,w),c))if(f)a(I,T,H);else if(H)switch(c){case 3:return!0;case 5:return W;case 6:return T;case 2:a(I,D++,W)}else switch(c){case 4:return!1;case 7:a(I,D++,W)}return y?-1:p||m?m:I}};return Df={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)},Df}var If,Uy;function rO(){if(Uy)return If;Uy=1;var n=dt(),e=Ht(),t=xh(),r=e("species");return If=function(s){return t>=51||!n(function(){var a=[],l=a.constructor={};return l[r]=function(){return{foo:1}},a[s](Boolean).foo!==1})},If}var Hy;function iO(){if(Hy)return wv;Hy=1;var n=jt(),e=Ih().filter,t=rO(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(a){return e(this,a,arguments.length>1?arguments[1]:void 0)}}),wv}var Yy={},Af={},Lf,Gy;function Ah(){if(Gy)return Lf;Gy=1;var n=Lx(),e=Rh();return Lf=Object.keys||function(r){return n(r,e)},Lf}var Qy;function sO(){if(Qy)return Af;Qy=1;var n=tn(),e=Rx(),t=xr(),r=gn(),s=Qs(),a=Ah();return Af.f=n&&!e?Object.defineProperties:function(c,f){r(c);for(var h=s(f),p=a(f),m=p.length,y=0,_;m>y;)t.f(c,_=p[y++],h[_]);return c},Af}var Nf,Ky;function Fx(){if(Ky)return Nf;Ky=1;var n=Xr();return Nf=n("document","documentElement"),Nf}var jf,Xy;function oO(){if(Xy)return jf;Xy=1;var n=gn(),e=sO(),t=Rh(),r=Ch(),s=Fx(),a=el(),l=Ph(),c=">",f="<",h="prototype",p="script",m=l("IE_PROTO"),y=function(){},_=function(w){return f+p+c+w+f+"/"+p+c},b=function(w){w.write(_("")),w.close();var E=w.parentWindow.Object;return w=null,E},S=function(){var w=a("iframe"),E="java"+p+":",O;return w.style.display="none",s.appendChild(w),w.src=String(E),O=w.contentWindow.document,O.open(),O.write(_("document.F=Object")),O.close(),O.F},k,R=function(){try{k=new ActiveXObject("htmlfile")}catch{}R=typeof document<"u"?document.domain&&k?b(k):S():b(k);for(var w=t.length;w--;)delete R[h][t[w]];return R()};return r[m]=!0,jf=Object.create||function(E,O){var P;return E!==null?(y[h]=n(E),P=new y,y[h]=null,P[m]=E):P=R(),O===void 0?P:e.f(P,O)},jf}var Ff,Jy;function aO(){if(Jy)return Ff;Jy=1;var n=Ht(),e=oO(),t=xr().f,r=n("unscopables"),s=Array.prototype;return s[r]===void 0&&t(s,r,{configurable:!0,value:e(null)}),Ff=function(a){s[r][a]=!0},Ff}var Zy;function lO(){if(Zy)return Yy;Zy=1;var n=jt(),e=Ih().find,t=aO(),r="find",s=!0;return r in[]&&Array(1)[r](function(){s=!1}),n({target:"Array",proto:!0,forced:s},{find:function(l){return e(this,l,arguments.length>1?arguments[1]:void 0)}}),t(r),Yy}var e0={},zf,t0;function uO(){if(t0)return zf;t0=1;var n=dt();return zf=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},zf}var qf,n0;function zx(){if(n0)return qf;n0=1;var n=Ih().forEach,e=uO(),t=e("forEach");return qf=t?[].forEach:function(s){return n(this,s,arguments.length>1?arguments[1]:void 0)},qf}var r0;function cO(){if(r0)return e0;r0=1;var n=jt(),e=zx();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),e0}var i0={},s0;function fO(){if(s0)return i0;s0=1;var n=jt(),e=dt(),t=Xs(),r=Ox(),s=e(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});return n({target:"Date",proto:!0,forced:s},{toJSON:function(l){var c=t(this),f=r(c,"number");return typeof f=="number"&&!isFinite(f)?null:c.toISOString()}}),i0}var o0={},a0;function dO(){if(a0)return o0;a0=1;var n=Ot(),e=Ni(),t=Date.prototype,r="Invalid Date",s="toString",a=n(t[s]),l=n(t.getTime);return String(new Date(NaN))!==r&&e(t,s,function(){var f=l(this);return f===f?a(this):r}),o0}var l0={},u0;function hO(){if(u0)return l0;u0=1;var n=jt(),e=Xs(),t=Ah(),r=dt(),s=r(function(){t(1)});return n({target:"Object",stat:!0,forced:s},{keys:function(l){return t(e(l))}}),l0}var c0={},Bf,f0;function pO(){if(f0)return Bf;f0=1;var n=Th(),e=Dh();return Bf=n?{}.toString:function(){return"[object "+e(this)+"]"},Bf}var d0;function gO(){if(d0)return c0;d0=1;var n=Th(),e=Ni(),t=pO();return n||e(Object.prototype,"toString",t,{unsafe:!0}),c0}var h0={},$f,p0;function mO(){if(p0)return $f;p0=1;var n=dt();return $f=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),$f}var Vf,g0;function vO(){if(g0)return Vf;g0=1;var n=pn(),e=st(),t=Xs(),r=Ph(),s=mO(),a=r("IE_PROTO"),l=Object,c=l.prototype;return Vf=s?l.getPrototypeOf:function(f){var h=t(f);if(n(h,a))return h[a];var p=h.constructor;return e(p)&&h instanceof p?p.prototype:h instanceof l?c:null},Vf}var Wf,m0;function yO(){if(m0)return Wf;m0=1;var n=tn(),e=dt(),t=Ot(),r=vO(),s=Ah(),a=Qs(),l=_x().f,c=t(l),f=t([].push),h=n&&e(function(){var m=Object.create(null);return m[2]=2,!c(m,2)}),p=function(m){return function(y){for(var _=a(y),b=s(_),S=h&&r(_)===null,k=b.length,R=0,w=[],E;k>R;)E=b[R++],(!n||(S?E in _:c(_,E)))&&f(w,m?[E,_[E]]:_[E]);return w}};return Wf={entries:p(!0),values:p(!1)},Wf}var v0;function _O(){if(v0)return h0;v0=1;var n=jt(),e=yO().values;return n({target:"Object",stat:!0},{values:function(r){return e(r)}}),h0}var y0={},_0={},Uf,b0;function Lh(){if(b0)return Uf;b0=1;var n=Ve(),e=Li(),t=Ai(),r=function(s){return e.slice(0,s.length)===s};return Uf=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":t(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),Uf}var Hf,x0;function Nh(){if(x0)return Hf;x0=1;var n=Lh();return Hf=n==="NODE",Hf}var Yf,S0;function bO(){if(S0)return Yf;S0=1;var n=Ve();return Yf=n,Yf}var Gf,w0;function xO(){if(w0)return Gf;w0=1;var n=Ot(),e=Jr();return Gf=function(t,r,s){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[s]))}catch{}},Gf}var Qf,k0;function SO(){if(k0)return Qf;k0=1;var n=Pn();return Qf=function(e){return n(e)||e===null},Qf}var Kf,E0;function wO(){if(E0)return Kf;E0=1;var n=SO(),e=String,t=TypeError;return Kf=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},Kf}var Xf,O0;function kO(){if(O0)return Xf;O0=1;var n=xO(),e=Pn(),t=bh(),r=wO();return Xf=Object.setPrototypeOf||("__proto__"in{}?(function(){var s=!1,a={},l;try{l=n(Object.prototype,"__proto__","set"),l(a,[]),s=a instanceof Array}catch{}return function(f,h){return t(f),r(h),e(f)&&(s?l(f,h):f.__proto__=h),f}})():void 0),Xf}var Jf,P0;function EO(){if(P0)return Jf;P0=1;var n=xr().f,e=pn(),t=Ht(),r=t("toStringTag");return Jf=function(s,a,l){s&&!l&&(s=s.prototype),s&&!e(s,r)&&n(s,r,{configurable:!0,value:a})},Jf}var Zf,C0;function OO(){if(C0)return Zf;C0=1;var n=Ix(),e=xr();return Zf=function(t,r,s){return s.get&&n(s.get,r,{getter:!0}),s.set&&n(s.set,r,{setter:!0}),e.f(t,r,s)},Zf}var ed,M0;function PO(){if(M0)return ed;M0=1;var n=Xr(),e=OO(),t=Ht(),r=tn(),s=t("species");return ed=function(a){var l=n(a);r&&l&&!l[s]&&e(l,s,{configurable:!0,get:function(){return this}})},ed}var td,R0;function CO(){if(R0)return td;R0=1;var n=Ja(),e=TypeError;return td=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},td}var nd,T0;function MO(){if(T0)return nd;T0=1;var n=jx(),e=Za(),t=TypeError;return nd=function(r){if(n(r))return r;throw new t(e(r)+" is not a constructor")},nd}var rd,D0;function RO(){if(D0)return rd;D0=1;var n=gn(),e=MO(),t=Xa(),r=Ht(),s=r("species");return rd=function(a,l){var c=n(a).constructor,f;return c===void 0||t(f=n(c)[s])?l:e(f)},rd}var id,I0;function qx(){if(I0)return id;I0=1;var n=Ka(),e=Function.prototype,t=e.apply,r=e.call;return id=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),id}var sd,A0;function Bx(){if(A0)return sd;A0=1;var n=Ot();return sd=n([].slice),sd}var od,L0;function $x(){if(L0)return od;L0=1;var n=TypeError;return od=function(e,t){if(e<t)throw new n("Not enough arguments");return e},od}var ad,N0;function Vx(){if(N0)return ad;N0=1;var n=Li();return ad=/ipad|iphone|ipod/i.test(n)&&/applewebkit/i.test(n),ad}var ld,j0;function Wx(){if(j0)return ld;j0=1;var n=Ve(),e=qx(),t=tl(),r=st(),s=pn(),a=dt(),l=Fx(),c=Bx(),f=el(),h=$x(),p=Vx(),m=Nh(),y=n.setImmediate,_=n.clearImmediate,b=n.process,S=n.Dispatch,k=n.Function,R=n.MessageChannel,w=n.String,E=0,O={},P="onreadystatechange",T,D,I,W;a(function(){T=n.location});var H=function(G){if(s(O,G)){var B=O[G];delete O[G],B()}},Y=function(G){return function(){H(G)}},ee=function(G){H(G.data)},ne=function(G){n.postMessage(w(G),T.protocol+"//"+T.host)};return(!y||!_)&&(y=function(B){h(arguments.length,1);var L=r(B)?B:k(B),V=c(arguments,1);return O[++E]=function(){e(L,void 0,V)},D(E),E},_=function(B){delete O[B]},m?D=function(G){b.nextTick(Y(G))}:S&&S.now?D=function(G){S.now(Y(G))}:R&&!p?(I=new R,W=I.port2,I.port1.onmessage=ee,D=t(W.postMessage,W)):n.addEventListener&&r(n.postMessage)&&!n.importScripts&&T&&T.protocol!=="file:"&&!a(ne)?(D=ne,n.addEventListener("message",ee,!1)):P in f("script")?D=function(G){l.appendChild(f("script"))[P]=function(){l.removeChild(this),H(G)}}:D=function(G){setTimeout(Y(G),0)}),ld={set:y,clear:_},ld}var ud,F0;function TO(){if(F0)return ud;F0=1;var n=Ve(),e=tn(),t=Object.getOwnPropertyDescriptor;return ud=function(r){if(!e)return n[r];var s=t(n,r);return s&&s.value},ud}var cd,z0;function Ux(){if(z0)return cd;z0=1;var n=function(){this.head=null,this.tail=null};return n.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return t===null&&(this.tail=null),e.item}}},cd=n,cd}var fd,q0;function DO(){if(q0)return fd;q0=1;var n=Li();return fd=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<"u",fd}var dd,B0;function IO(){if(B0)return dd;B0=1;var n=Li();return dd=/web0s(?!.*chrome)/i.test(n),dd}var hd,$0;function AO(){if($0)return hd;$0=1;var n=Ve(),e=TO(),t=tl(),r=Wx().set,s=Ux(),a=Vx(),l=DO(),c=IO(),f=Nh(),h=n.MutationObserver||n.WebKitMutationObserver,p=n.document,m=n.process,y=n.Promise,_=e("queueMicrotask"),b,S,k,R,w;if(!_){var E=new s,O=function(){var P,T;for(f&&(P=m.domain)&&P.exit();T=E.get();)try{T()}catch(D){throw E.head&&b(),D}P&&P.enter()};!a&&!f&&!c&&h&&p?(S=!0,k=p.createTextNode(""),new h(O).observe(k,{characterData:!0}),b=function(){k.data=S=!S}):!l&&y&&y.resolve?(R=y.resolve(void 0),R.constructor=y,w=t(R.then,R),b=function(){w(O)}):f?b=function(){m.nextTick(O)}:(r=t(r,n),b=function(){r(O)}),_=function(P){E.head||b(),E.add(P)}}return hd=_,hd}var pd,V0;function LO(){return V0||(V0=1,pd=function(n,e){try{arguments.length===1?console.error(n):console.error(n,e)}catch{}}),pd}var gd,W0;function jh(){return W0||(W0=1,gd=function(n){try{return{error:!1,value:n()}}catch(e){return{error:!0,value:e}}}),gd}var md,U0;function Js(){if(U0)return md;U0=1;var n=Ve();return md=n.Promise,md}var vd,H0;function Zs(){if(H0)return vd;H0=1;var n=Ve(),e=Js(),t=st(),r=Nx(),s=Oh(),a=Ht(),l=Lh(),c=Ks(),f=xh(),h=e&&e.prototype,p=a("species"),m=!1,y=t(n.PromiseRejectionEvent),_=r("Promise",function(){var b=s(e),S=b!==String(e);if(!S&&f===66||c&&!(h.catch&&h.finally))return!0;if(!f||f<51||!/native code/.test(b)){var k=new e(function(E){E(1)}),R=function(E){E(function(){},function(){})},w=k.constructor={};if(w[p]=R,m=k.then(function(){})instanceof R,!m)return!0}return!S&&(l==="BROWSER"||l==="DENO")&&!y});return vd={CONSTRUCTOR:_,REJECTION_EVENT:y,SUBCLASSING:m},vd}var yd={},Y0;function eo(){if(Y0)return yd;Y0=1;var n=Jr(),e=TypeError,t=function(r){var s,a;this.promise=new r(function(l,c){if(s!==void 0||a!==void 0)throw new e("Bad Promise constructor");s=l,a=c}),this.resolve=n(s),this.reject=n(a)};return yd.f=function(r){return new t(r)},yd}var G0;function NO(){if(G0)return _0;G0=1;var n=jt(),e=Ks(),t=Nh(),r=Ve(),s=bO(),a=On(),l=Ni(),c=kO(),f=EO(),h=PO(),p=Jr(),m=st(),y=Pn(),_=CO(),b=RO(),S=Wx().set,k=AO(),R=LO(),w=jh(),E=Ux(),O=Dx(),P=Js(),T=Zs(),D=eo(),I="Promise",W=T.CONSTRUCTOR,H=T.REJECTION_EVENT,Y=T.SUBCLASSING,ee=O.getterFor(I),ne=O.set,G=P&&P.prototype,B=P,L=G,V=r.TypeError,j=r.document,U=r.process,C=D.f,q=C,J=!!(j&&j.createEvent&&r.dispatchEvent),ae="unhandledrejection",te="rejectionhandled",se=0,ue=1,ve=2,ge=1,ke=2,Ee,Qe,qe,Te,wt=function(re){var me;return y(re)&&m(me=re.then)?me:!1},tt=function(re,me){var Oe=me.value,xe=me.state===ue,Ce=xe?re.ok:re.fail,Mn=re.resolve,vn=re.reject,Yt=re.domain,Yn,ji,Fi;try{Ce?(xe||(me.rejection===ke&&kr(me),me.rejection=ge),Ce===!0?Yn=Oe:(Yt&&Yt.enter(),Yn=Ce(Oe),Yt&&(Yt.exit(),Fi=!0)),Yn===re.promise?vn(new V("Promise-chain cycle")):(ji=wt(Yn))?a(ji,Yn,Mn,vn):Mn(Yn)):vn(Oe)}catch(dl){Yt&&!Fi&&Yt.exit(),vn(dl)}},Cn=function(re,me){re.notified||(re.notified=!0,k(function(){for(var Oe=re.reactions,xe;xe=Oe.get();)tt(xe,re);re.notified=!1,me&&!re.rejection&&ro(re)}))},nn=function(re,me,Oe){var xe,Ce;J?(xe=j.createEvent("Event"),xe.promise=me,xe.reason=Oe,xe.initEvent(re,!1,!0),r.dispatchEvent(xe)):xe={promise:me,reason:Oe},!H&&(Ce=r["on"+re])?Ce(xe):re===ae&&R("Unhandled promise rejection",Oe)},ro=function(re){a(S,r,function(){var me=re.facade,Oe=re.value,xe=ei(re),Ce;if(xe&&(Ce=w(function(){t?U.emit("unhandledRejection",Oe,me):nn(ae,me,Oe)}),re.rejection=t||ei(re)?ke:ge,Ce.error))throw Ce.value})},ei=function(re){return re.rejection!==ge&&!re.parent},kr=function(re){a(S,r,function(){var me=re.facade;t?U.emit("rejectionHandled",me):nn(te,me,re.value)})},Ft=function(re,me,Oe){return function(xe){re(me,xe,Oe)}},mn=function(re,me,Oe){re.done||(re.done=!0,Oe&&(re=Oe),re.value=me,re.state=ve,Cn(re,!0))},ti=function(re,me,Oe){if(!re.done){re.done=!0,Oe&&(re=Oe);try{if(re.facade===me)throw new V("Promise can't be resolved itself");var xe=wt(me);xe?k(function(){var Ce={done:!1};try{a(xe,me,Ft(ti,Ce,re),Ft(mn,Ce,re))}catch(Mn){mn(Ce,Mn,re)}}):(re.value=me,re.state=ue,Cn(re,!1))}catch(Ce){mn({done:!1},Ce,re)}}};if(W&&(B=function(me){_(this,L),p(me),a(Ee,this);var Oe=ee(this);try{me(Ft(ti,Oe),Ft(mn,Oe))}catch(xe){mn(Oe,xe)}},L=B.prototype,Ee=function(me){ne(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:se,value:null})},Ee.prototype=l(L,"then",function(me,Oe){var xe=ee(this),Ce=C(b(this,B));return xe.parent=!0,Ce.ok=m(me)?me:!0,Ce.fail=m(Oe)&&Oe,Ce.domain=t?U.domain:void 0,xe.state===se?xe.reactions.add(Ce):k(function(){tt(Ce,xe)}),Ce.promise}),Qe=function(){var re=new Ee,me=ee(re);this.promise=re,this.resolve=Ft(ti,me),this.reject=Ft(mn,me)},D.f=C=function(re){return re===B||re===qe?new Qe(re):q(re)},!e&&m(P)&&G!==Object.prototype)){Te=G.then,Y||l(G,"then",function(me,Oe){var xe=this;return new B(function(Ce,Mn){a(Te,xe,Ce,Mn)}).then(me,Oe)},{unsafe:!0});try{delete G.constructor}catch{}c&&c(G,L)}return n({global:!0,constructor:!0,wrap:!0,forced:W},{Promise:B}),qe=s.Promise,f(B,I,!1,!0),h(I),_0}var Q0={},_d,K0;function jO(){return K0||(K0=1,_d=Object.create?Object.create(null):{}),_d}var bd,X0;function FO(){if(X0)return bd;X0=1;var n=Ht(),e=jO(),t=n("iterator"),r=Array.prototype;return bd=function(s){return s!==void 0&&(e.Array===s||r[t]===s)},bd}var xd,J0;function Hx(){if(J0)return xd;J0=1;var n=Ai(),e=Xa(),t=Sh(),r=Ht(),s=r("iterator"),a=Array.prototype;return xd=function(l){if(!e(l))return t(l,s)||t(l,"@@iterator")||(n(l)==="Arguments"?a[s]:void 0)},xd}var Sd,Z0;function zO(){if(Z0)return Sd;Z0=1;var n=On(),e=st(),t=gn(),r=Za(),s=Hx(),a=TypeError;return Sd=function(l,c){var f=arguments.length<2?s(l):c;if(e(f))return t(n(f,l));throw new a(r(l)+" is not iterable")},Sd}var wd,e_;function qO(){if(e_)return wd;e_=1;var n=On(),e=gn(),t=Sh();return wd=function(r,s,a){var l,c;e(r);try{if(l=t(r,"return"),!l){if(s==="throw")throw a;return a}l=n(l,r)}catch(f){c=!0,l=f}if(s==="throw")throw a;if(c)throw l;return e(l),a},wd}var kd,t_;function Yx(){if(t_)return kd;t_=1;var n=tl(),e=On(),t=gn(),r=Za(),s=FO(),a=Mh(),l=Ja(),c=zO(),f=Hx(),h=qO(),p=TypeError,m=function(_,b){this.stopped=_,this.result=b},y=m.prototype;return kd=function(_,b,S){var k=S&&S.that,R=!!(S&&S.AS_ENTRIES),w=!!(S&&S.IS_RECORD),E=!!(S&&S.IS_ITERATOR),O=!!(S&&S.INTERRUPTED),P=n(b,k),T,D,I,W,H,Y,ee,ne=function(L){var V=T;return T=void 0,V&&h(V,"normal"),new m(!0,L)},G=function(L){return R?(t(L),O?P(L[0],L[1],ne):P(L[0],L[1])):O?P(L,ne):P(L)};if(w)T=_.iterator;else if(E)T=_;else{if(D=f(_),!D)throw new p(r(_)+" is not iterable");if(s(D)){for(I=0,W=a(_);W>I;I++)if(H=G(_[I]),H&&l(y,H))return H;return new m(!1)}T=c(_,D)}for(Y=w?_.next:T.next;!(ee=e(Y,T)).done;){var B=ee.value;try{H=G(B)}catch(L){if(T)h(T,"throw",L);else throw L}if(typeof H=="object"&&H&&l(y,H))return H}return new m(!1)},kd}var Ed,n_;function BO(){if(n_)return Ed;n_=1;var n=Ht(),e=n("iterator"),t=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){t=!0}};s[e]=function(){return this},Array.from(s,function(){throw 2})}catch{}return Ed=function(a,l){try{if(!l&&!t)return!1}catch{return!1}var c=!1;try{var f={};f[e]=function(){return{next:function(){return{done:c=!0}}}},a(f)}catch{}return c},Ed}var Od,r_;function Gx(){if(r_)return Od;r_=1;var n=Js(),e=BO(),t=Zs().CONSTRUCTOR;return Od=t||!e(function(r){n.all(r).then(void 0,function(){})}),Od}var i_;function $O(){if(i_)return Q0;i_=1;var n=jt(),e=On(),t=Jr(),r=eo(),s=jh(),a=Yx(),l=Gx();return n({target:"Promise",stat:!0,forced:l},{all:function(f){var h=this,p=r.f(h),m=p.resolve,y=p.reject,_=s(function(){var b=t(h.resolve),S=[],k=0,R=1;a(f,function(w){var E=k++,O=!1;R++,e(b,h,w).then(function(P){O||(O=!0,S[E]=P,--R||m(S))},y)}),--R||m(S)});return _.error&&y(_.value),p.promise}}),Q0}var s_={},o_;function VO(){if(o_)return s_;o_=1;var n=jt(),e=Ks(),t=Zs().CONSTRUCTOR,r=Js(),s=Xr(),a=st(),l=Ni(),c=r&&r.prototype;if(n({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(h){return this.then(void 0,h)}}),!e&&a(r)){var f=s("Promise").prototype.catch;c.catch!==f&&l(c,"catch",f,{unsafe:!0})}return s_}var a_={},l_;function WO(){if(l_)return a_;l_=1;var n=jt(),e=On(),t=Jr(),r=eo(),s=jh(),a=Yx(),l=Gx();return n({target:"Promise",stat:!0,forced:l},{race:function(f){var h=this,p=r.f(h),m=p.reject,y=s(function(){var _=t(h.resolve);a(f,function(b){e(_,h,b).then(p.resolve,m)})});return y.error&&m(y.value),p.promise}}),a_}var u_={},c_;function UO(){if(c_)return u_;c_=1;var n=jt(),e=eo(),t=Zs().CONSTRUCTOR;return n({target:"Promise",stat:!0,forced:t},{reject:function(s){var a=e.f(this),l=a.reject;return l(s),a.promise}}),u_}var f_={},Pd,d_;function HO(){if(d_)return Pd;d_=1;var n=gn(),e=Pn(),t=eo();return Pd=function(r,s){if(n(r),e(s)&&s.constructor===r)return s;var a=t.f(r),l=a.resolve;return l(s),a.promise},Pd}var h_;function YO(){if(h_)return f_;h_=1;var n=jt(),e=Xr(),t=Ks(),r=Js(),s=Zs().CONSTRUCTOR,a=HO(),l=e("Promise"),c=t&&!s;return n({target:"Promise",stat:!0,forced:t||s},{resolve:function(h){return a(c&&this===l?r:this,h)}}),f_}var p_;function GO(){return p_||(p_=1,NO(),$O(),VO(),WO(),UO(),YO()),y0}var g_={},Cd,m_;function QO(){if(m_)return Cd;m_=1;var n=Dh(),e=String;return Cd=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Cd}var Md,v_;function KO(){if(v_)return Md;v_=1;var n=Ve(),e=dt(),t=n.RegExp,r=!e(function(){var s=!0;try{t(".","d")}catch{s=!1}var a={},l="",c=s?"dgimsy":"gimsy",f=function(y,_){Object.defineProperty(a,y,{get:function(){return l+=_,!0}})},h={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};s&&(h.hasIndices="d");for(var p in h)f(p,h[p]);var m=Object.getOwnPropertyDescriptor(t.prototype,"flags").get.call(a);return m!==c||l!==c});return Md={correct:r},Md}var Rd,y_;function XO(){if(y_)return Rd;y_=1;var n=gn();return Rd=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Rd}var Td,__;function JO(){if(__)return Td;__=1;var n=On(),e=pn(),t=Ja(),r=KO(),s=XO(),a=RegExp.prototype;return Td=r.correct?function(l){return l.flags}:function(l){return!r.correct&&t(a,l)&&!e(l,"flags")?n(s,l):l.flags},Td}var b_;function ZO(){if(b_)return g_;b_=1;var n=Tx().PROPER,e=Ni(),t=gn(),r=QO(),s=dt(),a=JO(),l="toString",c=RegExp.prototype,f=c[l],h=s(function(){return f.call({source:"a",flags:"b"})!=="/a/b"}),p=n&&f.name!==l;return(h||p)&&e(c,l,function(){var y=t(this),_=r(y.source),b=r(a(y));return"/"+_+"/"+b},{unsafe:!0}),g_}var x_={},Dd,S_;function eP(){return S_||(S_=1,Dd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Dd}var Id,w_;function tP(){if(w_)return Id;w_=1;var n=el(),e=n("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Id=t===Object.prototype?void 0:t,Id}var k_;function nP(){if(k_)return x_;k_=1;var n=Ve(),e=eP(),t=tP(),r=zx(),s=Eh(),a=function(c){if(c&&c.forEach!==r)try{s(c,"forEach",r)}catch{c.forEach=r}};for(var l in e)e[l]&&a(n[l]&&n[l].prototype);return a(t),x_}var E_={},O_={},Ad,P_;function Qx(){if(P_)return Ad;P_=1;var n=Ve(),e=qx(),t=st(),r=Lh(),s=Li(),a=Bx(),l=$x(),c=n.Function,f=/MSIE .\./.test(s)||r==="BUN"&&(function(){var h=n.Bun.version.split(".");return h.length<3||h[0]==="0"&&(h[1]<3||h[1]==="3"&&h[2]==="0")})();return Ad=function(h,p){var m=p?2:1;return f?function(y,_){var b=l(arguments.length,1)>m,S=t(y)?y:c(y),k=b?a(arguments,m):[],R=b?function(){e(S,this,k)}:S;return p?h(R,_):h(R)}:h},Ad}var C_;function rP(){if(C_)return O_;C_=1;var n=jt(),e=Ve(),t=Qx(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),O_}var M_={},R_;function iP(){if(R_)return M_;R_=1;var n=jt(),e=Ve(),t=Qx(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),M_}var T_;function sP(){return T_||(T_=1,rP(),iP()),E_}var Ld,D_;function oP(){if(D_)return Ld;D_=1;var n=null;return typeof WebSocket<"u"?n=WebSocket:typeof MozWebSocket<"u"?n=MozWebSocket:typeof Wr<"u"?n=Wr.WebSocket||Wr.MozWebSocket:typeof window<"u"?n=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(n=self.WebSocket||self.MozWebSocket),Ld=n,Ld}var Nd,I_;function aP(){if(I_)return Nd;I_=1,iO(),lO(),cO(),fO(),dO(),hO(),gO(),_O(),GO(),ZO(),nP(),sP();var n=oP();function e(w){return w&&typeof w=="object"&&"default"in w?w:{default:w}}var t=e(n);function r(w,E,O,P,T,D,I){try{var W=w[D](I),H=W.value}catch(Y){return void O(Y)}W.done?E(H):Promise.resolve(H).then(P,T)}function s(w){return function(){var E=this,O=arguments;return new Promise(function(P,T){var D=w.apply(E,O);function I(H){r(D,P,T,I,W,"next",H)}function W(H){r(D,P,T,I,W,"throw",H)}I(void 0)})}}function a(w,E){if(!(w instanceof E))throw new TypeError("Cannot call a class as a function")}function l(w,E){for(var O=0;O<E.length;O++){var P=E[O];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(w,b(P.key),P)}}function c(w,E,O){return E&&l(w.prototype,E),Object.defineProperty(w,"prototype",{writable:!1}),w}function f(w,E,O){return(E=b(E))in w?Object.defineProperty(w,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):w[E]=O,w}function h(w,E){if(w==null)return{};var O,P,T=p(w,E);if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(w);for(P=0;P<D.length;P++)O=D[P],E.indexOf(O)===-1&&{}.propertyIsEnumerable.call(w,O)&&(T[O]=w[O])}return T}function p(w,E){if(w==null)return{};var O={};for(var P in w)if({}.hasOwnProperty.call(w,P)){if(E.indexOf(P)!==-1)continue;O[P]=w[P]}return O}function m(){var w,E,O=typeof Symbol=="function"?Symbol:{},P=O.iterator||"@@iterator",T=O.toStringTag||"@@toStringTag";function D(B,L,V,j){var U=L&&L.prototype instanceof W?L:W,C=Object.create(U.prototype);return y(C,"_invoke",(function(q,J,ae){var te,se,ue,ve=0,ge=ae||[],ke=!1,Ee={p:0,n:0,v:w,a:Qe,f:Qe.bind(w,4),d:function(qe,Te){return te=qe,se=0,ue=w,Ee.n=Te,I}};function Qe(qe,Te){for(se=qe,ue=Te,E=0;!ke&&ve&&!wt&&E<ge.length;E++){var wt,tt=ge[E],Cn=Ee.p,nn=tt[2];qe>3?(wt=nn===Te)&&(ue=tt[(se=tt[4])?5:(se=3,3)],tt[4]=tt[5]=w):tt[0]<=Cn&&((wt=qe<2&&Cn<tt[1])?(se=0,Ee.v=Te,Ee.n=tt[1]):Cn<nn&&(wt=qe<3||tt[0]>Te||Te>nn)&&(tt[4]=qe,tt[5]=Te,Ee.n=nn,se=0))}if(wt||qe>1)return I;throw ke=!0,Te}return function(qe,Te,wt){if(ve>1)throw TypeError("Generator is already running");for(ke&&Te===1&&Qe(Te,wt),se=Te,ue=wt;(E=se<2?w:ue)||!ke;){te||(se?se<3?(se>1&&(Ee.n=-1),Qe(se,ue)):Ee.n=ue:Ee.v=ue);try{if(ve=2,te){if(se||(qe="next"),E=te[qe]){if(!(E=E.call(te,ue)))throw TypeError("iterator result is not an object");if(!E.done)return E;ue=E.value,se<2&&(se=0)}else se===1&&(E=te.return)&&E.call(te),se<2&&(ue=TypeError("The iterator does not provide a '"+qe+"' method"),se=1);te=w}else if((E=(ke=Ee.n<0)?ue:q.call(J,Ee))!==I)break}catch(tt){te=w,se=1,ue=tt}finally{ve=1}}return{value:E,done:ke}}})(B,V,j),!0),C}var I={};function W(){}function H(){}function Y(){}E=Object.getPrototypeOf;var ee=[][P]?E(E([][P]())):(y(E={},P,function(){return this}),E),ne=Y.prototype=W.prototype=Object.create(ee);function G(B){return Object.setPrototypeOf?Object.setPrototypeOf(B,Y):(B.__proto__=Y,y(B,T,"GeneratorFunction")),B.prototype=Object.create(ne),B}return H.prototype=Y,y(ne,"constructor",Y),y(Y,"constructor",H),H.displayName="GeneratorFunction",y(Y,T,"GeneratorFunction"),y(ne),y(ne,T,"Generator"),y(ne,P,function(){return this}),y(ne,"toString",function(){return"[object Generator]"}),(m=function(){return{w:D,m:G}})()}function y(w,E,O,P){var T=Object.defineProperty;try{T({},"",{})}catch{T=0}y=function(D,I,W,H){function Y(ee,ne){y(D,ee,function(G){return this._invoke(ee,ne,G)})}I?T?T(D,I,{value:W,enumerable:!H,configurable:!H,writable:!H}):D[I]=W:(Y("next",0),Y("throw",1),Y("return",2))},y(w,E,O,P)}function _(w,E){if(typeof w!="object"||!w)return w;var O=w[Symbol.toPrimitive];if(O!==void 0){var P=O.call(w,E);if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(w)}function b(w){var E=_(w,"string");return typeof E=="symbol"?E:E+""}var S=["baseRequestId"],k=(function(){function w(E){var O=E.status,P=E.message;a(this,w),f(this,"status",void 0),f(this,"result",void 0),this.status=O,this.result=P}return c(w,[{key:"json",value:(function(){var E=s(m().m(function P(){return m().w(function(T){for(;;)if(T.n===0)return T.a(2,this.result)},P,this)}));function O(){return E.apply(this,arguments)}return O})()},{key:"clone",value:function(){return this}},{key:"text",value:(function(){var E=s(m().m(function P(){return m().w(function(T){for(;;)if(T.n===0)return T.a(2,typeof this.result=="string"?this.result:JSON.stringify(this.result))},P,this)}));function O(){return E.apply(this,arguments)}return O})()}])})(),R=(function(){function w(E){var O=E.authorization,P=E.apiUrl,T=E.heartBeatInterval,D=E.hearBeatInterval;a(this,w),f(this,"apiUrl",void 0),f(this,"heartBeatInterval",60),f(this,"token",void 0),f(this,"ws",null),f(this,"messageCounter",1),f(this,"messageIdToSubscription",{}),f(this,"messageQueue",[]),this.token=O,this.apiUrl=P,T?this.heartBeatInterval=T:D&&(console.warn("Option hearBeatInterval is deprecated. It was replaced by heartBeatInterval."),this.heartBeatInterval=D)}return c(w,[{key:"authorization",get:function(){return this.token},set:function(O){this.token=O,this.ws&&this.ws.close()}},{key:"close",value:(function(){var E=s(m().m(function P(){return m().w(function(T){for(;;)switch(T.n){case 0:this.ws&&(this.ws.sendQueue(),this.ws.close());case 1:return T.a(2)}},P,this)}));function O(){return E.apply(this,arguments)}return O})()},{key:"initSocket",value:function(){var O=this;if(this.ws)return this.ws.initPromise;var P=new t.default(this.apiUrl);return P.messageIdSent={},P.sendMessage=function(T){(!T.messageId||T.messageId&&!P.messageIdSent[T.messageId])&&(P.send(JSON.stringify(T)),P.messageIdSent[T.messageId]=!0)},P.sendQueue=function(){O.messageQueue.forEach(function(T){return P.sendMessage(T)}),O.messageQueue=[]},P.reconcile=function(){new Date().getTime()-P.lastMessageTimestamp.getTime()>4*O.heartBeatInterval*1e3?P.close():Object.keys(O.messageIdToSubscription).forEach(function(T){P.sendMessage(O.messageIdToSubscription[T].message)})},P.lastMessageTimestamp=new Date,P.initPromise=new Promise(function(T){P.onopen=function(){P.sendMessage({authorization:O.authorization})},P.onmessage=function(D){P.lastMessageTimestamp=new Date;var I=JSON.parse(D.data.toString());I.handshake&&(P.reconcile(),P.reconcileTimer=setInterval(function(){P.messageIdSent={},P.reconcile()},O.heartBeatInterval*1e3),T()),O.messageIdToSubscription[I.messageId]&&O.messageIdToSubscription[I.messageId].callback(new k(I)),P.sendQueue()},P.onclose=function(D){if(P&&P.readyState!==t.default.CLOSED&&P.readyState!==t.default.CLOSING&&P.close(),P.reconcileTimer&&(clearInterval(P.reconcileTimer),P.reconcileTimer=null),O.ws===P){if(O.ws=null,D?.code===1009){var I=new k({status:413,message:{error:D?.reason||"WebSocket message too big"}});Object.values(O.messageIdToSubscription).forEach(function(W){W.callback(I)}),O.messageIdToSubscription={};return}Object.keys(O.messageIdToSubscription).length&&O.initSocket()}},P.onerror=P.onclose}),this.ws=P,this.ws.initPromise}},{key:"sendMessage",value:function(O){var P=this;O.unsubscribe&&this.messageQueue.find(function(T){return T.messageId===O.unsubscribe})?this.messageQueue=this.messageQueue.filter(function(T){return T.messageId!==O.unsubscribe}):this.messageQueue.push(O),setTimeout(s(m().m(function T(){return m().w(function(D){for(;;)switch(D.n){case 0:return D.n=1,P.initSocket();case 1:P.ws.sendQueue();case 2:return D.a(2)}},T)})),100)}},{key:"request",value:function(O,P){var T=P.baseRequestId,D=h(P,S),I={messageId:this.messageCounter++,requestId:T,method:O,params:D},W=[],H=null,Y=function(){H&&(H(W.pop()),H=null)};this.messageIdToSubscription[I.messageId]={message:I,callback:function(G){W.push(G),Y()}};var ee=this;return{subscribe:function(G){var B=this;return s(m().m(function L(){var V;return m().w(function(j){for(;;)switch(j.n){case 0:return ee.sendMessage(I),j.n=1,new Promise(function(U){H=U,W.length&&Y()});case 1:return V=j.v,j.a(2,G(V,function(){return B.subscribe(G)}))}},L)}))()},unsubscribe:function(){return s(m().m(function G(){return m().w(function(B){for(;;)switch(B.n){case 0:ee.sendMessage({unsubscribe:I.messageId}),delete ee.messageIdToSubscription[I.messageId];case 1:return B.a(2)}},G)}))()}}}}])})();return Nd=R,Nd}var lP=aP();const uP=br(lP);function to(n){return n+.5|0}const hr=(n,e,t)=>Math.max(Math.min(n,t),e);function Ts(n){return hr(to(n*2.55),0,255)}function mr(n){return hr(to(n*255),0,255)}function Bn(n){return hr(to(n/2.55)/100,0,1)}function A_(n){return hr(to(n*100),0,100)}const en={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},eh=[..."0123456789ABCDEF"],cP=n=>eh[n&15],fP=n=>eh[(n&240)>>4]+eh[n&15],pa=n=>(n&240)>>4===(n&15),dP=n=>pa(n.r)&&pa(n.g)&&pa(n.b)&&pa(n.a);function hP(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&en[n[1]]*17,g:255&en[n[2]]*17,b:255&en[n[3]]*17,a:e===5?en[n[4]]*17:255}:(e===7||e===9)&&(t={r:en[n[1]]<<4|en[n[2]],g:en[n[3]]<<4|en[n[4]],b:en[n[5]]<<4|en[n[6]],a:e===9?en[n[7]]<<4|en[n[8]]:255})),t}const pP=(n,e)=>n<255?e(n):"";function gP(n){var e=dP(n)?cP:fP;return n?"#"+e(n.r)+e(n.g)+e(n.b)+pP(n.a,e):void 0}const mP=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kx(n,e,t){const r=e*Math.min(t,1-t),s=(a,l=(a+n/30)%12)=>t-r*Math.max(Math.min(l-3,9-l,1),-1);return[s(0),s(8),s(4)]}function vP(n,e,t){const r=(s,a=(s+n/60)%6)=>t-t*e*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function yP(n,e,t){const r=Kx(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)r[s]*=1-e-t,r[s]+=e;return r}function _P(n,e,t,r,s){return n===s?(e-t)/r+(e<t?6:0):e===s?(t-n)/r+2:(n-e)/r+4}function Fh(n){const t=n.r/255,r=n.g/255,s=n.b/255,a=Math.max(t,r,s),l=Math.min(t,r,s),c=(a+l)/2;let f,h,p;return a!==l&&(p=a-l,h=c>.5?p/(2-a-l):p/(a+l),f=_P(t,r,s,p,a),f=f*60+.5),[f|0,h||0,c]}function zh(n,e,t,r){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,r)).map(mr)}function qh(n,e,t){return zh(Kx,n,e,t)}function bP(n,e,t){return zh(yP,n,e,t)}function xP(n,e,t){return zh(vP,n,e,t)}function Xx(n){return(n%360+360)%360}function SP(n){const e=mP.exec(n);let t=255,r;if(!e)return;e[5]!==r&&(t=e[6]?Ts(+e[5]):mr(+e[5]));const s=Xx(+e[2]),a=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?r=bP(s,a,l):e[1]==="hsv"?r=xP(s,a,l):r=qh(s,a,l),{r:r[0],g:r[1],b:r[2],a:t}}function wP(n,e){var t=Fh(n);t[0]=Xx(t[0]+e),t=qh(t),n.r=t[0],n.g=t[1],n.b=t[2]}function kP(n){if(!n)return;const e=Fh(n),t=e[0],r=A_(e[1]),s=A_(e[2]);return n.a<255?`hsla(${t}, ${r}%, ${s}%, ${Bn(n.a)})`:`hsl(${t}, ${r}%, ${s}%)`}const L_={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"},N_={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 EP(){const n={},e=Object.keys(N_),t=Object.keys(L_);let r,s,a,l,c;for(r=0;r<e.length;r++){for(l=c=e[r],s=0;s<t.length;s++)a=t[s],c=c.replace(a,L_[a]);a=parseInt(N_[l],16),n[c]=[a>>16&255,a>>8&255,a&255]}return n}let ga;function OP(n){ga||(ga=EP(),ga.transparent=[0,0,0,0]);const e=ga[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const PP=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function CP(n){const e=PP.exec(n);let t=255,r,s,a;if(e){if(e[7]!==r){const l=+e[7];t=e[8]?Ts(l):hr(l*255,0,255)}return r=+e[1],s=+e[3],a=+e[5],r=255&(e[2]?Ts(r):hr(r,0,255)),s=255&(e[4]?Ts(s):hr(s,0,255)),a=255&(e[6]?Ts(a):hr(a,0,255)),{r,g:s,b:a,a:t}}}function MP(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${Bn(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const jd=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Oi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function RP(n,e,t){const r=Oi(Bn(n.r)),s=Oi(Bn(n.g)),a=Oi(Bn(n.b));return{r:mr(jd(r+t*(Oi(Bn(e.r))-r))),g:mr(jd(s+t*(Oi(Bn(e.g))-s))),b:mr(jd(a+t*(Oi(Bn(e.b))-a))),a:n.a+t*(e.a-n.a)}}function ma(n,e,t){if(n){let r=Fh(n);r[e]=Math.max(0,Math.min(r[e]+r[e]*t,e===0?360:1)),r=qh(r),n.r=r[0],n.g=r[1],n.b=r[2]}}function Jx(n,e){return n&&Object.assign(e||{},n)}function j_(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=mr(n[3]))):(e=Jx(n,{r:0,g:0,b:0,a:1}),e.a=mr(e.a)),e}function TP(n){return n.charAt(0)==="r"?CP(n):SP(n)}class Bs{constructor(e){if(e instanceof Bs)return e;const t=typeof e;let r;t==="object"?r=j_(e):t==="string"&&(r=hP(e)||OP(e)||TP(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=Jx(this._rgb);return e&&(e.a=Bn(e.a)),e}set rgb(e){this._rgb=j_(e)}rgbString(){return this._valid?MP(this._rgb):void 0}hexString(){return this._valid?gP(this._rgb):void 0}hslString(){return this._valid?kP(this._rgb):void 0}mix(e,t){if(e){const r=this.rgb,s=e.rgb;let a;const l=t===a?.5:t,c=2*l-1,f=r.a-s.a,h=((c*f===-1?c:(c+f)/(1+c*f))+1)/2;a=1-h,r.r=255&h*r.r+a*s.r+.5,r.g=255&h*r.g+a*s.g+.5,r.b=255&h*r.b+a*s.b+.5,r.a=l*r.a+(1-l)*s.a,this.rgb=r}return this}interpolate(e,t){return e&&(this._rgb=RP(this._rgb,e._rgb,t)),this}clone(){return new Bs(this.rgb)}alpha(e){return this._rgb.a=mr(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=to(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ma(this._rgb,2,e),this}darken(e){return ma(this._rgb,2,-e),this}saturate(e){return ma(this._rgb,1,e),this}desaturate(e){return ma(this._rgb,1,-e),this}rotate(e){return wP(this._rgb,e),this}}function Fn(){}const DP=(()=>{let n=0;return()=>n++})();function we(n){return n===null||typeof n>"u"}function $e(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function be(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Ye(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Vt(n,e){return Ye(n)?n:e}function ye(n,e){return typeof n>"u"?e:n}const IP=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/e,Zx=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Ie(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function Re(n,e,t,r){let s,a,l;if($e(n))for(a=n.length,s=0;s<a;s++)e.call(t,n[s],s);else if(be(n))for(l=Object.keys(n),a=l.length,s=0;s<a;s++)e.call(t,n[l[s]],l[s])}function za(n,e){let t,r,s,a;if(!n||!e||n.length!==e.length)return!1;for(t=0,r=n.length;t<r;++t)if(s=n[t],a=e[t],s.datasetIndex!==a.datasetIndex||s.index!==a.index)return!1;return!0}function qa(n){if($e(n))return n.map(qa);if(be(n)){const e=Object.create(null),t=Object.keys(n),r=t.length;let s=0;for(;s<r;++s)e[t[s]]=qa(n[t[s]]);return e}return n}function eS(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function AP(n,e,t,r){if(!eS(n))return;const s=e[n],a=t[n];be(s)&&be(a)?$s(s,a,r):e[n]=qa(a)}function $s(n,e,t){const r=$e(e)?e:[e],s=r.length;if(!be(n))return n;t=t||{};const a=t.merger||AP;let l;for(let c=0;c<s;++c){if(l=r[c],!be(l))continue;const f=Object.keys(l);for(let h=0,p=f.length;h<p;++h)a(f[h],n,l,t)}return n}function Ls(n,e){return $s(n,e,{merger:LP})}function LP(n,e,t){if(!eS(n))return;const r=e[n],s=t[n];be(r)&&be(s)?Ls(r,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=qa(s))}const F_={"":n=>n,x:n=>n.x,y:n=>n.y};function NP(n){const e=n.split("."),t=[];let r="";for(const s of e)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(t.push(r),r="");return t}function jP(n){const e=NP(n);return t=>{for(const r of e){if(r==="")break;t=t&&t[r]}return t}}function yr(n,e){return(F_[e]||(F_[e]=jP(e)))(n)}function Bh(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Vs=n=>typeof n<"u",_r=n=>typeof n=="function",z_=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function FP(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const ze=Math.PI,Fe=2*ze,zP=Fe+ze,Ba=Number.POSITIVE_INFINITY,qP=ze/180,Ze=ze/2,Fr=ze/4,q_=ze*2/3,pr=Math.log10,En=Math.sign;function Ns(n,e,t){return Math.abs(n-e)<t}function B_(n){const e=Math.round(n);n=Ns(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(pr(n))),r=n/t;return(r<=1?1:r<=2?2:r<=5?5:10)*t}function BP(n){const e=[],t=Math.sqrt(n);let r;for(r=1;r<t;r++)n%r===0&&(e.push(r),e.push(n/r));return t===(t|0)&&e.push(t),e.sort((s,a)=>s-a).pop(),e}function Ri(n){return!isNaN(parseFloat(n))&&isFinite(n)}function $P(n,e){const t=Math.round(n);return t-e<=n&&t+e>=n}function tS(n,e,t){let r,s,a;for(r=0,s=n.length;r<s;r++)a=n[r][t],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function hn(n){return n*(ze/180)}function $h(n){return n*(180/ze)}function $_(n){if(!Ye(n))return;let e=1,t=0;for(;Math.round(n*e)/e!==n;)e*=10,t++;return t}function nS(n,e){const t=e.x-n.x,r=e.y-n.y,s=Math.sqrt(t*t+r*r);let a=Math.atan2(r,t);return a<-.5*ze&&(a+=Fe),{angle:a,distance:s}}function th(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function VP(n,e){return(n-e+zP)%Fe-ze}function Wt(n){return(n%Fe+Fe)%Fe}function Ws(n,e,t,r){const s=Wt(n),a=Wt(e),l=Wt(t),c=Wt(a-s),f=Wt(l-s),h=Wt(s-a),p=Wt(s-l);return s===a||s===l||r&&a===l||c>f&&h<p}function ft(n,e,t){return Math.max(e,Math.min(t,n))}function WP(n){return ft(n,-32768,32767)}function Vn(n,e,t,r=1e-6){return n>=Math.min(e,t)-r&&n<=Math.max(e,t)+r}function Vh(n,e,t){t=t||(l=>n[l]<e);let r=n.length-1,s=0,a;for(;r-s>1;)a=s+r>>1,t(a)?s=a:r=a;return{lo:s,hi:r}}const Wn=(n,e,t,r)=>Vh(n,t,r?s=>{const a=n[s][e];return a<t||a===t&&n[s+1][e]===t}:s=>n[s][e]<t),UP=(n,e,t)=>Vh(n,t,r=>n[r][e]>=t);function HP(n,e,t){let r=0,s=n.length;for(;r<s&&n[r]<e;)r++;for(;s>r&&n[s-1]>t;)s--;return r>0||s<n.length?n.slice(r,s):n}const rS=["push","pop","shift","splice","unshift"];function YP(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),rS.forEach(t=>{const r="_onData"+Bh(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...a){const l=s.apply(this,a);return n._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...a)}),l}})})}function V_(n,e){const t=n._chartjs;if(!t)return;const r=t.listeners,s=r.indexOf(e);s!==-1&&r.splice(s,1),!(r.length>0)&&(rS.forEach(a=>{delete n[a]}),delete n._chartjs)}function iS(n){const e=new Set(n);return e.size===n.length?n:Array.from(e)}const sS=(function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame})();function oS(n,e){let t=[],r=!1;return function(...s){t=s,r||(r=!0,sS.call(window,()=>{r=!1,n.apply(e,t)}))}}function GP(n,e){let t;return function(...r){return e?(clearTimeout(t),t=setTimeout(n,e,r)):n.apply(this,r),e}}const Wh=n=>n==="start"?"left":n==="end"?"right":"center",bt=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2,QP=(n,e,t,r)=>n===(r?"left":"right")?t:n==="center"?(e+t)/2:e;function aS(n,e,t){const r=e.length;let s=0,a=r;if(n._sorted){const{iScale:l,_parsed:c}=n,f=l.axis,{min:h,max:p,minDefined:m,maxDefined:y}=l.getUserBounds();m&&(s=ft(Math.min(Wn(c,f,h).lo,t?r:Wn(e,f,l.getPixelForValue(h)).lo),0,r-1)),y?a=ft(Math.max(Wn(c,l.axis,p,!0).hi+1,t?0:Wn(e,f,l.getPixelForValue(p),!0).hi+1),s,r)-s:a=r-s}return{start:s,count:a}}function lS(n){const{xScale:e,yScale:t,_scaleRanges:r}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!r)return n._scaleRanges=s,!0;const a=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==t.min||r.ymax!==t.max;return Object.assign(r,s),a}const va=n=>n===0||n===1,W_=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*Fe/t)),U_=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*Fe/t)+1,js={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*Ze)+1,easeOutSine:n=>Math.sin(n*Ze),easeInOutSine:n=>-.5*(Math.cos(ze*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=>va(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=>va(n)?n:W_(n,.075,.3),easeOutElastic:n=>va(n)?n:U_(n,.075,.3),easeInOutElastic(n){return va(n)?n:n<.5?.5*W_(n*2,.1125,.45):.5+.5*U_(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 e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-js.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?js.easeInBounce(n*2)*.5:js.easeOutBounce(n*2-1)*.5+.5};function Uh(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function H_(n){return Uh(n)?n:new Bs(n)}function Fd(n){return Uh(n)?n:new Bs(n).saturate(.5).darken(.1).hexString()}const KP=["x","y","borderWidth","radius","tension"],XP=["color","borderColor","backgroundColor"];function JP(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),n.set("animations",{colors:{type:"color",properties:XP},numbers:{type:"number",properties:KP}}),n.describe("animations",{_fallback:"animation"}),n.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:e=>e|0}}}})}function ZP(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Y_=new Map;function eC(n,e){e=e||{};const t=n+JSON.stringify(e);let r=Y_.get(t);return r||(r=new Intl.NumberFormat(n,e),Y_.set(t,r)),r}function no(n,e,t){return eC(e,t).format(n)}const uS={values(n){return $e(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const r=this.chart.options.locale;let s,a=n;if(t.length>1){const h=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(h<1e-4||h>1e15)&&(s="scientific"),a=tC(n,t)}const l=pr(Math.abs(a)),c=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),f={notation:s,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(f,this.options.ticks.format),no(n,r,f)},logarithmic(n,e,t){if(n===0)return"0";const r=t[e].significand||n/Math.pow(10,Math.floor(pr(n)));return[1,2,3,5,10,15].includes(r)||e>.8*t.length?uS.numeric.call(this,n,e,t):""}};function tC(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var nl={formatters:uS};function nC(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:nl.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Qr=Object.create(null),nh=Object.create(null);function Fs(n,e){if(!e)return n;const t=e.split(".");for(let r=0,s=t.length;r<s;++r){const a=t[r];n=n[a]||(n[a]=Object.create(null))}return n}function zd(n,e,t){return typeof e=="string"?$s(Fs(n,e),t):$s(Fs(n,""),e)}class rC{constructor(e,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=r=>r.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=(r,s)=>Fd(s.backgroundColor),this.hoverBorderColor=(r,s)=>Fd(s.borderColor),this.hoverColor=(r,s)=>Fd(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return zd(this,e,t)}get(e){return Fs(this,e)}describe(e,t){return zd(nh,e,t)}override(e,t){return zd(Qr,e,t)}route(e,t,r,s){const a=Fs(this,e),l=Fs(this,r),c="_"+t;Object.defineProperties(a,{[c]:{value:a[t],writable:!0},[t]:{enumerable:!0,get(){const f=this[c],h=l[s];return be(f)?Object.assign({},h,f):ye(f,h)},set(f){this[c]=f}}})}apply(e){e.forEach(t=>t(this))}}var Ge=new rC({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[JP,ZP,nC]);function iC(n){return!n||we(n.size)||we(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function $a(n,e,t,r,s){let a=e[s];return a||(a=e[s]=n.measureText(s).width,t.push(s)),a>r&&(r=a),r}function sC(n,e,t,r){r=r||{};let s=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(s=r.data={},a=r.garbageCollect=[],r.font=e),n.save(),n.font=e;let l=0;const c=t.length;let f,h,p,m,y;for(f=0;f<c;f++)if(m=t[f],m!=null&&!$e(m))l=$a(n,s,a,l,m);else if($e(m))for(h=0,p=m.length;h<p;h++)y=m[h],y!=null&&!$e(y)&&(l=$a(n,s,a,l,y));n.restore();const _=a.length/2;if(_>t.length){for(f=0;f<_;f++)delete s[a[f]];a.splice(0,_)}return l}function zr(n,e,t){const r=n.currentDevicePixelRatio,s=t!==0?Math.max(t/2,.5):0;return Math.round((e-s)*r)/r+s}function G_(n,e){e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore()}function rh(n,e,t,r){cS(n,e,t,r,null)}function cS(n,e,t,r,s){let a,l,c,f,h,p,m,y;const _=e.pointStyle,b=e.rotation,S=e.radius;let k=(b||0)*qP;if(_&&typeof _=="object"&&(a=_.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){n.save(),n.translate(t,r),n.rotate(k),n.drawImage(_,-_.width/2,-_.height/2,_.width,_.height),n.restore();return}if(!(isNaN(S)||S<=0)){switch(n.beginPath(),_){default:s?n.ellipse(t,r,s/2,S,0,0,Fe):n.arc(t,r,S,0,Fe),n.closePath();break;case"triangle":p=s?s/2:S,n.moveTo(t+Math.sin(k)*p,r-Math.cos(k)*S),k+=q_,n.lineTo(t+Math.sin(k)*p,r-Math.cos(k)*S),k+=q_,n.lineTo(t+Math.sin(k)*p,r-Math.cos(k)*S),n.closePath();break;case"rectRounded":h=S*.516,f=S-h,l=Math.cos(k+Fr)*f,m=Math.cos(k+Fr)*(s?s/2-h:f),c=Math.sin(k+Fr)*f,y=Math.sin(k+Fr)*(s?s/2-h:f),n.arc(t-m,r-c,h,k-ze,k-Ze),n.arc(t+y,r-l,h,k-Ze,k),n.arc(t+m,r+c,h,k,k+Ze),n.arc(t-y,r+l,h,k+Ze,k+ze),n.closePath();break;case"rect":if(!b){f=Math.SQRT1_2*S,p=s?s/2:f,n.rect(t-p,r-f,2*p,2*f);break}k+=Fr;case"rectRot":m=Math.cos(k)*(s?s/2:S),l=Math.cos(k)*S,c=Math.sin(k)*S,y=Math.sin(k)*(s?s/2:S),n.moveTo(t-m,r-c),n.lineTo(t+y,r-l),n.lineTo(t+m,r+c),n.lineTo(t-y,r+l),n.closePath();break;case"crossRot":k+=Fr;case"cross":m=Math.cos(k)*(s?s/2:S),l=Math.cos(k)*S,c=Math.sin(k)*S,y=Math.sin(k)*(s?s/2:S),n.moveTo(t-m,r-c),n.lineTo(t+m,r+c),n.moveTo(t+y,r-l),n.lineTo(t-y,r+l);break;case"star":m=Math.cos(k)*(s?s/2:S),l=Math.cos(k)*S,c=Math.sin(k)*S,y=Math.sin(k)*(s?s/2:S),n.moveTo(t-m,r-c),n.lineTo(t+m,r+c),n.moveTo(t+y,r-l),n.lineTo(t-y,r+l),k+=Fr,m=Math.cos(k)*(s?s/2:S),l=Math.cos(k)*S,c=Math.sin(k)*S,y=Math.sin(k)*(s?s/2:S),n.moveTo(t-m,r-c),n.lineTo(t+m,r+c),n.moveTo(t+y,r-l),n.lineTo(t-y,r+l);break;case"line":l=s?s/2:Math.cos(k)*S,c=Math.sin(k)*S,n.moveTo(t-l,r-c),n.lineTo(t+l,r+c);break;case"dash":n.moveTo(t,r),n.lineTo(t+Math.cos(k)*(s?s/2:S),r+Math.sin(k)*S);break;case!1:n.closePath();break}n.fill(),e.borderWidth>0&&n.stroke()}}function Un(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.x<e.right+t&&n.y>e.top-t&&n.y<e.bottom+t}function rl(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function il(n){n.restore()}function oC(n,e,t,r,s){if(!e)return n.lineTo(t.x,t.y);if(s==="middle"){const a=(e.x+t.x)/2;n.lineTo(a,e.y),n.lineTo(a,t.y)}else s==="after"!=!!r?n.lineTo(e.x,t.y):n.lineTo(t.x,e.y);n.lineTo(t.x,t.y)}function aC(n,e,t,r){if(!e)return n.lineTo(t.x,t.y);n.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?t.cp2x:t.cp1x,r?t.cp2y:t.cp1y,t.x,t.y)}function lC(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),we(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function uC(n,e,t,r,s){if(s.strikethrough||s.underline){const a=n.measureText(r),l=e-a.actualBoundingBoxLeft,c=e+a.actualBoundingBoxRight,f=t-a.actualBoundingBoxAscent,h=t+a.actualBoundingBoxDescent,p=s.strikethrough?(f+h)/2:h;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(l,p),n.lineTo(c,p),n.stroke()}}function cC(n,e){const t=n.fillStyle;n.fillStyle=e.color,n.fillRect(e.left,e.top,e.width,e.height),n.fillStyle=t}function Kr(n,e,t,r,s,a={}){const l=$e(e)?e:[e],c=a.strokeWidth>0&&a.strokeColor!=="";let f,h;for(n.save(),n.font=s.string,lC(n,a),f=0;f<l.length;++f)h=l[f],a.backdrop&&cC(n,a.backdrop),c&&(a.strokeColor&&(n.strokeStyle=a.strokeColor),we(a.strokeWidth)||(n.lineWidth=a.strokeWidth),n.strokeText(h,t,r,a.maxWidth)),n.fillText(h,t,r,a.maxWidth),uC(n,t,r,h,a),r+=Number(s.lineHeight);n.restore()}function Us(n,e){const{x:t,y:r,w:s,h:a,radius:l}=e;n.arc(t+l.topLeft,r+l.topLeft,l.topLeft,1.5*ze,ze,!0),n.lineTo(t,r+a-l.bottomLeft),n.arc(t+l.bottomLeft,r+a-l.bottomLeft,l.bottomLeft,ze,Ze,!0),n.lineTo(t+s-l.bottomRight,r+a),n.arc(t+s-l.bottomRight,r+a-l.bottomRight,l.bottomRight,Ze,0,!0),n.lineTo(t+s,r+l.topRight),n.arc(t+s-l.topRight,r+l.topRight,l.topRight,0,-Ze,!0),n.lineTo(t+l.topLeft,r)}const fC=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,dC=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function hC(n,e){const t=(""+n).match(fC);if(!t||t[1]==="normal")return e*1.2;switch(n=+t[2],t[3]){case"px":return n;case"%":n/=100;break}return e*n}const pC=n=>+n||0;function Hh(n,e){const t={},r=be(e),s=r?Object.keys(e):e,a=be(n)?r?l=>ye(n[l],n[e[l]]):l=>n[l]:()=>n;for(const l of s)t[l]=pC(a(l));return t}function fS(n){return Hh(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Hr(n){return Hh(n,["topLeft","topRight","bottomLeft","bottomRight"])}function St(n){const e=fS(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function it(n,e){n=n||{},e=e||Ge.font;let t=ye(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let r=ye(n.style,e.style);r&&!(""+r).match(dC)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const s={family:ye(n.family,e.family),lineHeight:hC(ye(n.lineHeight,e.lineHeight),t),size:t,style:r,weight:ye(n.weight,e.weight),string:""};return s.string=iC(s),s}function Ds(n,e,t,r){let s,a,l;for(s=0,a=n.length;s<a;++s)if(l=n[s],l!==void 0&&l!==void 0)return l}function gC(n,e,t){const{min:r,max:s}=n,a=Zx(e,(s-r)/2),l=(c,f)=>t&&c===0?0:c+f;return{min:l(r,-Math.abs(a)),max:l(s,a)}}function Sr(n,e){return Object.assign(Object.create(n),e)}function Yh(n,e=[""],t,r,s=()=>n[0]){const a=t||n;typeof r>"u"&&(r=gS("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:a,_fallback:r,_getTarget:s,override:c=>Yh([c,...n],e,a,r)};return new Proxy(l,{deleteProperty(c,f){return delete c[f],delete c._keys,delete n[0][f],!0},get(c,f){return hS(c,f,()=>wC(f,e,n,c))},getOwnPropertyDescriptor(c,f){return Reflect.getOwnPropertyDescriptor(c._scopes[0],f)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(c,f){return K_(c).includes(f)},ownKeys(c){return K_(c)},set(c,f,h){const p=c._storage||(c._storage=s());return c[f]=p[f]=h,delete c._keys,!0}})}function Ti(n,e,t,r){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:dS(n,r),setContext:a=>Ti(n,a,t,r),override:a=>Ti(n.override(a),e,t,r)};return new Proxy(s,{deleteProperty(a,l){return delete a[l],delete n[l],!0},get(a,l,c){return hS(a,l,()=>vC(a,l,c))},getOwnPropertyDescriptor(a,l){return a._descriptors.allKeys?Reflect.has(n,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,l)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(a,l){return Reflect.has(n,l)},ownKeys(){return Reflect.ownKeys(n)},set(a,l,c){return n[l]=c,delete a[l],!0}})}function dS(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:r=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:r,isScriptable:_r(t)?t:()=>t,isIndexable:_r(r)?r:()=>r}}const mC=(n,e)=>n?n+Bh(e):e,Gh=(n,e)=>be(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function hS(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const r=t();return n[e]=r,r}function vC(n,e,t){const{_proxy:r,_context:s,_subProxy:a,_descriptors:l}=n;let c=r[e];return _r(c)&&l.isScriptable(e)&&(c=yC(e,c,n,t)),$e(c)&&c.length&&(c=_C(e,c,n,l.isIndexable)),Gh(e,c)&&(c=Ti(c,s,a&&a[e],l)),c}function yC(n,e,t,r){const{_proxy:s,_context:a,_subProxy:l,_stack:c}=t;if(c.has(n))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+n);c.add(n);let f=e(a,l||r);return c.delete(n),Gh(n,f)&&(f=Qh(s._scopes,s,n,f)),f}function _C(n,e,t,r){const{_proxy:s,_context:a,_subProxy:l,_descriptors:c}=t;if(typeof a.index<"u"&&r(n))return e[a.index%e.length];if(be(e[0])){const f=e,h=s._scopes.filter(p=>p!==f);e=[];for(const p of f){const m=Qh(h,s,n,p);e.push(Ti(m,a,l&&l[n],c))}}return e}function pS(n,e,t){return _r(n)?n(e,t):n}const bC=(n,e)=>n===!0?e:typeof n=="string"?yr(e,n):void 0;function xC(n,e,t,r,s){for(const a of e){const l=bC(t,a);if(l){n.add(l);const c=pS(l._fallback,t,s);if(typeof c<"u"&&c!==t&&c!==r)return c}else if(l===!1&&typeof r<"u"&&t!==r)return null}return!1}function Qh(n,e,t,r){const s=e._rootScopes,a=pS(e._fallback,t,r),l=[...n,...s],c=new Set;c.add(r);let f=Q_(c,l,t,a||t,r);return f===null||typeof a<"u"&&a!==t&&(f=Q_(c,l,a,f,r),f===null)?!1:Yh(Array.from(c),[""],s,a,()=>SC(e,t,r))}function Q_(n,e,t,r,s){for(;t;)t=xC(n,e,t,r,s);return t}function SC(n,e,t){const r=n._getTarget();e in r||(r[e]={});const s=r[e];return $e(s)&&be(t)?t:s||{}}function wC(n,e,t,r){let s;for(const a of e)if(s=gS(mC(a,n),t),typeof s<"u")return Gh(n,s)?Qh(t,r,n,s):s}function gS(n,e){for(const t of e){if(!t)continue;const r=t[n];if(typeof r<"u")return r}}function K_(n){let e=n._keys;return e||(e=n._keys=kC(n._scopes)),e}function kC(n){const e=new Set;for(const t of n)for(const r of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(r);return Array.from(e)}function mS(n,e,t,r){const{iScale:s}=n,{key:a="r"}=this._parsing,l=new Array(r);let c,f,h,p;for(c=0,f=r;c<f;++c)h=c+t,p=e[h],l[c]={r:s.parse(yr(p,a),h)};return l}const EC=Number.EPSILON||1e-14,Di=(n,e)=>e<n.length&&!n[e].skip&&n[e],vS=n=>n==="x"?"y":"x";function OC(n,e,t,r){const s=n.skip?e:n,a=e,l=t.skip?e:t,c=th(a,s),f=th(l,a);let h=c/(c+f),p=f/(c+f);h=isNaN(h)?0:h,p=isNaN(p)?0:p;const m=r*h,y=r*p;return{previous:{x:a.x-m*(l.x-s.x),y:a.y-m*(l.y-s.y)},next:{x:a.x+y*(l.x-s.x),y:a.y+y*(l.y-s.y)}}}function PC(n,e,t){const r=n.length;let s,a,l,c,f,h=Di(n,0);for(let p=0;p<r-1;++p)if(f=h,h=Di(n,p+1),!(!f||!h)){if(Ns(e[p],0,EC)){t[p]=t[p+1]=0;continue}s=t[p]/e[p],a=t[p+1]/e[p],c=Math.pow(s,2)+Math.pow(a,2),!(c<=9)&&(l=3/Math.sqrt(c),t[p]=s*l*e[p],t[p+1]=a*l*e[p])}}function CC(n,e,t="x"){const r=vS(t),s=n.length;let a,l,c,f=Di(n,0);for(let h=0;h<s;++h){if(l=c,c=f,f=Di(n,h+1),!c)continue;const p=c[t],m=c[r];l&&(a=(p-l[t])/3,c[`cp1${t}`]=p-a,c[`cp1${r}`]=m-a*e[h]),f&&(a=(f[t]-p)/3,c[`cp2${t}`]=p+a,c[`cp2${r}`]=m+a*e[h])}}function MC(n,e="x"){const t=vS(e),r=n.length,s=Array(r).fill(0),a=Array(r);let l,c,f,h=Di(n,0);for(l=0;l<r;++l)if(c=f,f=h,h=Di(n,l+1),!!f){if(h){const p=h[e]-f[e];s[l]=p!==0?(h[t]-f[t])/p:0}a[l]=c?h?En(s[l-1])!==En(s[l])?0:(s[l-1]+s[l])/2:s[l-1]:s[l]}PC(n,s,a),CC(n,a,e)}function ya(n,e,t){return Math.max(Math.min(n,t),e)}function RC(n,e){let t,r,s,a,l,c=Un(n[0],e);for(t=0,r=n.length;t<r;++t)l=a,a=c,c=t<r-1&&Un(n[t+1],e),a&&(s=n[t],l&&(s.cp1x=ya(s.cp1x,e.left,e.right),s.cp1y=ya(s.cp1y,e.top,e.bottom)),c&&(s.cp2x=ya(s.cp2x,e.left,e.right),s.cp2y=ya(s.cp2y,e.top,e.bottom)))}function TC(n,e,t,r,s){let a,l,c,f;if(e.spanGaps&&(n=n.filter(h=>!h.skip)),e.cubicInterpolationMode==="monotone")MC(n,s);else{let h=r?n[n.length-1]:n[0];for(a=0,l=n.length;a<l;++a)c=n[a],f=OC(h,c,n[Math.min(a+1,l-(r?0:1))%l],e.tension),c.cp1x=f.previous.x,c.cp1y=f.previous.y,c.cp2x=f.next.x,c.cp2y=f.next.y,h=c}e.capBezierPoints&&RC(n,t)}function Kh(){return typeof window<"u"&&typeof document<"u"}function Xh(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Va(n,e,t){let r;return typeof n=="string"?(r=parseInt(n,10),n.indexOf("%")!==-1&&(r=r/100*e.parentNode[t])):r=n,r}const sl=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function DC(n,e){return sl(n).getPropertyValue(e)}const IC=["top","right","bottom","left"];function Yr(n,e,t){const r={};t=t?"-"+t:"";for(let s=0;s<4;s++){const a=IC[s];r[a]=parseFloat(n[e+"-"+a+t])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const AC=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function LC(n,e){const t=n.touches,r=t&&t.length?t[0]:n,{offsetX:s,offsetY:a}=r;let l=!1,c,f;if(AC(s,a,n.target))c=s,f=a;else{const h=e.getBoundingClientRect();c=r.clientX-h.left,f=r.clientY-h.top,l=!0}return{x:c,y:f,box:l}}function $r(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:r}=e,s=sl(t),a=s.boxSizing==="border-box",l=Yr(s,"padding"),c=Yr(s,"border","width"),{x:f,y:h,box:p}=LC(n,t),m=l.left+(p&&c.left),y=l.top+(p&&c.top);let{width:_,height:b}=e;return a&&(_-=l.width+c.width,b-=l.height+c.height),{x:Math.round((f-m)/_*t.width/r),y:Math.round((h-y)/b*t.height/r)}}function NC(n,e,t){let r,s;if(e===void 0||t===void 0){const a=Xh(n);if(!a)e=n.clientWidth,t=n.clientHeight;else{const l=a.getBoundingClientRect(),c=sl(a),f=Yr(c,"border","width"),h=Yr(c,"padding");e=l.width-h.width-f.width,t=l.height-h.height-f.height,r=Va(c.maxWidth,a,"clientWidth"),s=Va(c.maxHeight,a,"clientHeight")}}return{width:e,height:t,maxWidth:r||Ba,maxHeight:s||Ba}}const _a=n=>Math.round(n*10)/10;function jC(n,e,t,r){const s=sl(n),a=Yr(s,"margin"),l=Va(s.maxWidth,n,"clientWidth")||Ba,c=Va(s.maxHeight,n,"clientHeight")||Ba,f=NC(n,e,t);let{width:h,height:p}=f;if(s.boxSizing==="content-box"){const y=Yr(s,"border","width"),_=Yr(s,"padding");h-=_.width+y.width,p-=_.height+y.height}return h=Math.max(0,h-a.width),p=Math.max(0,r?h/r:p-a.height),h=_a(Math.min(h,l,f.maxWidth)),p=_a(Math.min(p,c,f.maxHeight)),h&&!p&&(p=_a(h/2)),(e!==void 0||t!==void 0)&&r&&f.height&&p>f.height&&(p=f.height,h=_a(Math.floor(p*r))),{width:h,height:p}}function X_(n,e,t){const r=e||1,s=Math.floor(n.height*r),a=Math.floor(n.width*r);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const l=n.canvas;return l.style&&(t||!l.style.height&&!l.style.width)&&(l.style.height=`${n.height}px`,l.style.width=`${n.width}px`),n.currentDevicePixelRatio!==r||l.height!==s||l.width!==a?(n.currentDevicePixelRatio=r,l.height=s,l.width=a,n.ctx.setTransform(r,0,0,r,0,0),!0):!1}const FC=(function(){let n=!1;try{const e={get passive(){return n=!0,!1}};Kh()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return n})();function J_(n,e){const t=DC(n,e),r=t&&t.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Vr(n,e,t,r){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function zC(n,e,t,r){return{x:n.x+t*(e.x-n.x),y:r==="middle"?t<.5?n.y:e.y:r==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function qC(n,e,t,r){const s={x:n.cp2x,y:n.cp2y},a={x:e.cp1x,y:e.cp1y},l=Vr(n,s,t),c=Vr(s,a,t),f=Vr(a,e,t),h=Vr(l,c,t),p=Vr(c,f,t);return Vr(h,p,t)}const BC=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,r){return t-r},leftForLtr(t,r){return t-r}}},$C=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function Ci(n,e,t){return n?BC(e,t):$C()}function yS(n,e){let t,r;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,r=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=r)}function _S(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function bS(n){return n==="angle"?{between:Ws,compare:VP,normalize:Wt}:{between:Vn,compare:(e,t)=>e-t,normalize:e=>e}}function Z_({start:n,end:e,count:t,loop:r,style:s}){return{start:n%t,end:e%t,loop:r&&(e-n+1)%t===0,style:s}}function VC(n,e,t){const{property:r,start:s,end:a}=t,{between:l,normalize:c}=bS(r),f=e.length;let{start:h,end:p,loop:m}=n,y,_;if(m){for(h+=f,p+=f,y=0,_=f;y<_&&l(c(e[h%f][r]),s,a);++y)h--,p--;h%=f,p%=f}return p<h&&(p+=f),{start:h,end:p,loop:m,style:n.style}}function xS(n,e,t){if(!t)return[n];const{property:r,start:s,end:a}=t,l=e.length,{compare:c,between:f,normalize:h}=bS(r),{start:p,end:m,loop:y,style:_}=VC(n,e,t),b=[];let S=!1,k=null,R,w,E;const O=()=>f(s,E,R)&&c(s,E)!==0,P=()=>c(a,R)===0||f(a,E,R),T=()=>S||O(),D=()=>!S||P();for(let I=p,W=p;I<=m;++I)w=e[I%l],!w.skip&&(R=h(w[r]),R!==E&&(S=f(R,s,a),k===null&&T()&&(k=c(R,s)===0?I:W),k!==null&&D()&&(b.push(Z_({start:k,end:I,loop:y,count:l,style:_})),k=null),W=I,E=R));return k!==null&&b.push(Z_({start:k,end:m,loop:y,count:l,style:_})),b}function SS(n,e){const t=[],r=n.segments;for(let s=0;s<r.length;s++){const a=xS(r[s],n.points,e);a.length&&t.push(...a)}return t}function WC(n,e,t,r){let s=0,a=e-1;if(t&&!r)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,t&&(a+=s);a>s&&n[a%e].skip;)a--;return a%=e,{start:s,end:a}}function UC(n,e,t,r){const s=n.length,a=[];let l=e,c=n[e],f;for(f=e+1;f<=t;++f){const h=n[f%s];h.skip||h.stop?c.skip||(r=!1,a.push({start:e%s,end:(f-1)%s,loop:r}),e=l=h.stop?f:null):(l=f,c.skip&&(e=f)),c=h}return l!==null&&a.push({start:e%s,end:l%s,loop:r}),a}function HC(n,e){const t=n.points,r=n.options.spanGaps,s=t.length;if(!s)return[];const a=!!n._loop,{start:l,end:c}=WC(t,s,a,r);if(r===!0)return eb(n,[{start:l,end:c,loop:a}],t,e);const f=c<l?c+s:c,h=!!n._fullLoop&&l===0&&c===s-1;return eb(n,UC(t,l,f,h),t,e)}function eb(n,e,t,r){return!r||!r.setContext||!t?e:YC(n,e,t,r)}function YC(n,e,t,r){const s=n._chart.getContext(),a=tb(n.options),{_datasetIndex:l,options:{spanGaps:c}}=n,f=t.length,h=[];let p=a,m=e[0].start,y=m;function _(b,S,k,R){const w=c?-1:1;if(b!==S){for(b+=f;t[b%f].skip;)b-=w;for(;t[S%f].skip;)S+=w;b%f!==S%f&&(h.push({start:b%f,end:S%f,loop:k,style:R}),p=R,m=S%f)}}for(const b of e){m=c?m:b.start;let S=t[m%f],k;for(y=m+1;y<=b.end;y++){const R=t[y%f];k=tb(r.setContext(Sr(s,{type:"segment",p0:S,p1:R,p0DataIndex:(y-1)%f,p1DataIndex:y%f,datasetIndex:l}))),GC(k,p)&&_(m,y-1,b.loop,p),S=R,p=k}m<y-1&&_(m,y-1,b.loop,p)}return h}function tb(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function GC(n,e){if(!e)return!1;const t=[],r=function(s,a){return Uh(a)?(t.includes(a)||t.push(a),t.indexOf(a)):a};return JSON.stringify(n,r)!==JSON.stringify(e,r)}class QC{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,r,s){const a=t.listeners[s],l=t.duration;a.forEach(c=>c({chart:e,initial:t.initial,numSteps:l,currentStep:Math.min(r-t.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=sS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const a=r.items;let l=a.length-1,c=!1,f;for(;l>=0;--l)f=a[l],f._active?(f._total>r.duration&&(r.duration=f._total),f.tick(e),c=!0):(a[l]=a[a.length-1],a.pop());c&&(s.draw(),this._notify(s,r,e,"progress")),a.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),t+=a.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let r=t.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,r)),r}listen(e,t,r){this._getAnims(e).listeners[t].push(r)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const r=t.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var zn=new QC;const nb="transparent",KC={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const r=H_(n||nb),s=r.valid&&H_(e||nb);return s&&s.valid?s.mix(r,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class XC{constructor(e,t,r,s){const a=t[r];s=Ds([e.to,s,a,e.from]);const l=Ds([e.from,a,s]);this._active=!0,this._fn=e.fn||KC[e.type||typeof l],this._easing=js[e.easing]||js.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=r,this._from=l,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,r){if(this._active){this._notify(!1);const s=this._target[this._prop],a=r-this._start,l=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=Ds([e.to,t,s,e.from]),this._from=Ds([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,r=this._duration,s=this._prop,a=this._from,l=this._loop,c=this._to;let f;if(this._active=a!==c&&(l||t<r),!this._active){this._target[s]=c,this._notify(!0);return}if(t<0){this._target[s]=a;return}f=t/r%2,f=l&&f>1?2-f:f,f=this._easing(Math.min(1,Math.max(0,f))),this._target[s]=this._fn(a,c,f)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,r)=>{e.push({res:t,rej:r})})}_notify(e){const t=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][t]()}}class wS{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!be(e))return;const t=Object.keys(Ge.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const a=e[s];if(!be(a))return;const l={};for(const c of t)l[c]=a[c];($e(a.properties)&&a.properties||[s]).forEach(c=>{(c===s||!r.has(c))&&r.set(c,l)})})}_animateOptions(e,t){const r=t.options,s=ZC(e,r);if(!s)return[];const a=this._createAnimations(s,r);return r.$shared&&JC(e.options.$animations,r).then(()=>{e.options=r},()=>{}),a}_createAnimations(e,t){const r=this._properties,s=[],a=e.$animations||(e.$animations={}),l=Object.keys(t),c=Date.now();let f;for(f=l.length-1;f>=0;--f){const h=l[f];if(h.charAt(0)==="$")continue;if(h==="options"){s.push(...this._animateOptions(e,t));continue}const p=t[h];let m=a[h];const y=r.get(h);if(m)if(y&&m.active()){m.update(y,p,c);continue}else m.cancel();if(!y||!y.duration){e[h]=p;continue}a[h]=m=new XC(y,e,h,p),s.push(m)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const r=this._createAnimations(e,t);if(r.length)return zn.add(this._chart,r),!0}}function JC(n,e){const t=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const a=n[r[s]];a&&a.active()&&t.push(a.wait())}return Promise.all(t)}function ZC(n,e){if(!e)return;let t=n.options;if(!t){n.options=e;return}return t.$shared&&(n.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t}function rb(n,e){const t=n&&n.options||{},r=t.reverse,s=t.min===void 0?e:0,a=t.max===void 0?e:0;return{start:r?a:s,end:r?s:a}}function eM(n,e,t){if(t===!1)return!1;const r=rb(n,t),s=rb(e,t);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function tM(n){let e,t,r,s;return be(n)?(e=n.top,t=n.right,r=n.bottom,s=n.left):e=t=r=s=n,{top:e,right:t,bottom:r,left:s,disabled:n===!1}}function kS(n,e){const t=[],r=n._getSortedDatasetMetas(e);let s,a;for(s=0,a=r.length;s<a;++s)t.push(r[s].index);return t}function ib(n,e,t,r={}){const s=n.keys,a=r.mode==="single";let l,c,f,h;if(e!==null){for(l=0,c=s.length;l<c;++l){if(f=+s[l],f===t){if(r.all)continue;break}h=n.values[f],Ye(h)&&(a||e===0||En(e)===En(h))&&(e+=h)}return e}}function nM(n){const e=Object.keys(n),t=new Array(e.length);let r,s,a;for(r=0,s=e.length;r<s;++r)a=e[r],t[r]={x:a,y:n[a]};return t}function sb(n,e){const t=n&&n.options.stacked;return t||t===void 0&&e.stack!==void 0}function rM(n,e,t){return`${n.id}.${e.id}.${t.stack||t.type}`}function iM(n){const{min:e,max:t,minDefined:r,maxDefined:s}=n.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:s?t:Number.POSITIVE_INFINITY}}function sM(n,e,t){const r=n[e]||(n[e]={});return r[t]||(r[t]={})}function ob(n,e,t,r){for(const s of e.getMatchingVisibleMetas(r).reverse()){const a=n[s.index];if(t&&a>0||!t&&a<0)return s.index}return null}function ab(n,e){const{chart:t,_cachedMeta:r}=n,s=t._stacks||(t._stacks={}),{iScale:a,vScale:l,index:c}=r,f=a.axis,h=l.axis,p=rM(a,l,r),m=e.length;let y;for(let _=0;_<m;++_){const b=e[_],{[f]:S,[h]:k}=b,R=b._stacks||(b._stacks={});y=R[h]=sM(s,p,S),y[c]=k,y._top=ob(y,l,!0,r.type),y._bottom=ob(y,l,!1,r.type);const w=y._visualValues||(y._visualValues={});w[c]=k}}function qd(n,e){const t=n.scales;return Object.keys(t).filter(r=>t[r].axis===e).shift()}function oM(n,e){return Sr(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function aM(n,e,t){return Sr(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Es(n,e){const t=n.controller.index,r=n.vScale&&n.vScale.axis;if(r){e=e||n._parsed;for(const s of e){const a=s._stacks;if(!a||a[r]===void 0||a[r][t]===void 0)return;delete a[r][t],a[r]._visualValues!==void 0&&a[r]._visualValues[t]!==void 0&&delete a[r]._visualValues[t]}}}const Bd=n=>n==="reset"||n==="none",lb=(n,e)=>e?n:Object.assign({},n),lM=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:kS(t,!0),values:null};class wr{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=sb(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Es(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,r=this.getDataset(),s=(m,y,_,b)=>m==="x"?y:m==="r"?b:_,a=t.xAxisID=ye(r.xAxisID,qd(e,"x")),l=t.yAxisID=ye(r.yAxisID,qd(e,"y")),c=t.rAxisID=ye(r.rAxisID,qd(e,"r")),f=t.indexAxis,h=t.iAxisID=s(f,a,l,c),p=t.vAxisID=s(f,l,a,c);t.xScale=this.getScaleForId(a),t.yScale=this.getScaleForId(l),t.rScale=this.getScaleForId(c),t.iScale=this.getScaleForId(h),t.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&V_(this._data,this),e._stacked&&Es(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),r=this._data;if(be(t))this._data=nM(t);else if(r!==t){if(r){V_(r,this);const s=this._cachedMeta;Es(s),s._parsed=[]}t&&Object.isExtensible(t)&&YP(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const a=t._stacked;t._stacked=sb(t.vScale,t),t.stack!==r.stack&&(s=!0,Es(t),t.stack=r.stack),this._resyncElements(e),(s||a!==t._stacked)&&ab(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:r,_data:s}=this,{iScale:a,_stacked:l}=r,c=a.axis;let f=e===0&&t===s.length?!0:r._sorted,h=e>0&&r._parsed[e-1],p,m,y;if(this._parsing===!1)r._parsed=s,r._sorted=!0,y=s;else{$e(s[e])?y=this.parseArrayData(r,s,e,t):be(s[e])?y=this.parseObjectData(r,s,e,t):y=this.parsePrimitiveData(r,s,e,t);const _=()=>m[c]===null||h&&m[c]<h[c];for(p=0;p<t;++p)r._parsed[p+e]=m=y[p],f&&(_()&&(f=!1),h=m);r._sorted=f}l&&ab(this,y)}parsePrimitiveData(e,t,r,s){const{iScale:a,vScale:l}=e,c=a.axis,f=l.axis,h=a.getLabels(),p=a===l,m=new Array(s);let y,_,b;for(y=0,_=s;y<_;++y)b=y+r,m[y]={[c]:p||a.parse(h[b],b),[f]:l.parse(t[b],b)};return m}parseArrayData(e,t,r,s){const{xScale:a,yScale:l}=e,c=new Array(s);let f,h,p,m;for(f=0,h=s;f<h;++f)p=f+r,m=t[p],c[f]={x:a.parse(m[0],p),y:l.parse(m[1],p)};return c}parseObjectData(e,t,r,s){const{xScale:a,yScale:l}=e,{xAxisKey:c="x",yAxisKey:f="y"}=this._parsing,h=new Array(s);let p,m,y,_;for(p=0,m=s;p<m;++p)y=p+r,_=t[y],h[p]={x:a.parse(yr(_,c),y),y:l.parse(yr(_,f),y)};return h}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,t,r){const s=this.chart,a=this._cachedMeta,l=t[e.axis],c={keys:kS(s,!0),values:t._stacks[e.axis]._visualValues};return ib(c,l,a.index,{mode:r})}updateRangeFromParsed(e,t,r,s){const a=r[t.axis];let l=a===null?NaN:a;const c=s&&r._stacks[t.axis];s&&c&&(s.values=c,l=ib(s,a,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,t){const r=this._cachedMeta,s=r._parsed,a=r._sorted&&e===r.iScale,l=s.length,c=this._getOtherScale(e),f=lM(t,r,this.chart),h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:m}=iM(c);let y,_;function b(){_=s[y];const S=_[c.axis];return!Ye(_[e.axis])||p>S||m<S}for(y=0;y<l&&!(!b()&&(this.updateRangeFromParsed(h,e,_,f),a));++y);if(a){for(y=l-1;y>=0;--y)if(!b()){this.updateRangeFromParsed(h,e,_,f);break}}return h}getAllParsedValues(e){const t=this._cachedMeta._parsed,r=[];let s,a,l;for(s=0,a=t.length;s<a;++s)l=t[s][e.axis],Ye(l)&&r.push(l);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const t=this._cachedMeta,r=t.iScale,s=t.vScale,a=this.getParsed(e);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:s?""+s.getLabelForValue(a[s.axis]):""}}_update(e){const t=this._cachedMeta;this.update(e||"default"),t._clip=tM(ye(this.options.clip,eM(t.xScale,t.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,t=this.chart,r=this._cachedMeta,s=r.data||[],a=t.chartArea,l=[],c=this._drawStart||0,f=this._drawCount||s.length-c,h=this.options.drawActiveElementsOnTop;let p;for(r.dataset&&r.dataset.draw(e,a,c,f),p=c;p<c+f;++p){const m=s[p];m.hidden||(m.active&&h?l.push(m):m.draw(e,a))}for(p=0;p<l.length;++p)l[p].draw(e,a)}getStyle(e,t){const r=t?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,t,r){const s=this.getDataset();let a;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];a=l.$context||(l.$context=aM(this.getContext(),e,l)),a.parsed=this.getParsed(e),a.raw=s.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=oM(this.chart.getContext(),this.index)),a.dataset=s,a.index=a.datasetIndex=this.index;return a.active=!!t,a.mode=r,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}_resolveElementOptions(e,t="default",r){const s=t==="active",a=this._cachedDataOpts,l=e+"-"+t,c=a[l],f=this.enableOptionSharing&&Vs(r);if(c)return lb(c,f);const h=this.chart.config,p=h.datasetElementScopeKeys(this._type,e),m=s?[`${e}Hover`,"hover",e,""]:[e,""],y=h.getOptionScopes(this.getDataset(),p),_=Object.keys(Ge.elements[e]),b=()=>this.getContext(r,s,t),S=h.resolveNamedOptions(y,_,b,m);return S.$shared&&(S.$shared=f,a[l]=Object.freeze(lb(S,f))),S}_resolveAnimations(e,t,r){const s=this.chart,a=this._cachedDataOpts,l=`animation-${t}`,c=a[l];if(c)return c;let f;if(s.options.animation!==!1){const p=this.chart.config,m=p.datasetAnimationScopeKeys(this._type,t),y=p.getOptionScopes(this.getDataset(),m);f=p.createResolver(y,this.getContext(e,r,t))}const h=new wS(s,f&&f.animations);return f&&f._cacheable&&(a[l]=Object.freeze(h)),h}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||Bd(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const r=this.resolveDataElementOptions(e,t),s=this._sharedOptions,a=this.getSharedOptions(r),l=this.includeOptions(t,a)||a!==s;return this.updateSharedOptions(a,t,r),{sharedOptions:a,includeOptions:l}}updateElement(e,t,r,s){Bd(s)?Object.assign(e,r):this._resolveAnimations(t,s).update(e,r)}updateSharedOptions(e,t,r){e&&!Bd(t)&&this._resolveAnimations(void 0,t).update(e,r)}_setStyle(e,t,r,s){e.active=s;const a=this.getStyle(t,s);this._resolveAnimations(t,r,s).update(e,{options:!s&&this.getSharedOptions(a)||a})}removeHoverStyle(e,t,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,t,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,r=this._cachedMeta.data;for(const[c,f,h]of this._syncList)this[c](f,h);this._syncList=[];const s=r.length,a=t.length,l=Math.min(a,s);l&&this.parse(0,l),a>s?this._insertElements(s,a-s,e):a<s&&this._removeElements(a,s-a)}_insertElements(e,t,r=!0){const s=this._cachedMeta,a=s.data,l=e+t;let c;const f=h=>{for(h.length+=t,c=h.length-1;c>=l;c--)h[c]=h[c-t]};for(f(a),c=e;c<l;++c)a[c]=new this.dataElementType;this._parsing&&f(s._parsed),this.parse(e,t),r&&this.updateElements(a,e,t,"reset")}updateElements(e,t,r,s){}_removeElements(e,t){const r=this._cachedMeta;if(this._parsing){const s=r._parsed.splice(e,t);r._stacked&&Es(r,s)}r.data.splice(e,t)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[t,r,s]=e;this[t](r,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,t){t&&this._sync(["_removeElements",e,t]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function uM(n,e){if(!n._cache.$bar){const t=n.getMatchingVisibleMetas(e);let r=[];for(let s=0,a=t.length;s<a;s++)r=r.concat(t[s].controller.getAllParsedValues(n));n._cache.$bar=iS(r.sort((s,a)=>s-a))}return n._cache.$bar}function cM(n){const e=n.iScale,t=uM(e,n.type);let r=e._length,s,a,l,c;const f=()=>{l===32767||l===-32768||(Vs(c)&&(r=Math.min(r,Math.abs(l-c)||r)),c=l)};for(s=0,a=t.length;s<a;++s)l=e.getPixelForValue(t[s]),f();for(c=void 0,s=0,a=e.ticks.length;s<a;++s)l=e.getPixelForTick(s),f();return r}function fM(n,e,t,r){const s=t.barThickness;let a,l;return we(s)?(a=e.min*t.categoryPercentage,l=t.barPercentage):(a=s*r,l=1),{chunk:a/r,ratio:l,start:e.pixels[n]-a/2}}function dM(n,e,t,r){const s=e.pixels,a=s[n];let l=n>0?s[n-1]:null,c=n<s.length-1?s[n+1]:null;const f=t.categoryPercentage;l===null&&(l=a-(c===null?e.end-e.start:c-a)),c===null&&(c=a+a-l);const h=a-(a-Math.min(l,c))/2*f;return{chunk:Math.abs(c-l)/2*f/r,ratio:t.barPercentage,start:h}}function hM(n,e,t,r){const s=t.parse(n[0],r),a=t.parse(n[1],r),l=Math.min(s,a),c=Math.max(s,a);let f=l,h=c;Math.abs(l)>Math.abs(c)&&(f=c,h=l),e[t.axis]=h,e._custom={barStart:f,barEnd:h,start:s,end:a,min:l,max:c}}function ES(n,e,t,r){return $e(n)?hM(n,e,t,r):e[t.axis]=t.parse(n,r),e}function ub(n,e,t,r){const s=n.iScale,a=n.vScale,l=s.getLabels(),c=s===a,f=[];let h,p,m,y;for(h=t,p=t+r;h<p;++h)y=e[h],m={},m[s.axis]=c||s.parse(l[h],h),f.push(ES(y,m,a,h));return f}function $d(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function pM(n,e,t){return n!==0?En(n):(e.isHorizontal()?1:-1)*(e.min>=t?1:-1)}function gM(n){let e,t,r,s,a;return n.horizontal?(e=n.base>n.x,t="left",r="right"):(e=n.base<n.y,t="bottom",r="top"),e?(s="end",a="start"):(s="start",a="end"),{start:t,end:r,reverse:e,top:s,bottom:a}}function mM(n,e,t,r){let s=e.borderSkipped;const a={};if(!s){n.borderSkipped=a;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:c,reverse:f,top:h,bottom:p}=gM(n);s==="middle"&&t&&(n.enableBorderRadius=!0,(t._top||0)===r?s=h:(t._bottom||0)===r?s=p:(a[cb(p,l,c,f)]=!0,s=h)),a[cb(s,l,c,f)]=!0,n.borderSkipped=a}function cb(n,e,t,r){return r?(n=vM(n,e,t),n=fb(n,t,e)):n=fb(n,e,t),n}function vM(n,e,t){return n===e?t:n===t?e:n}function fb(n,e,t){return n==="start"?e:n==="end"?t:n}function yM(n,{inflateAmount:e},t){n.inflateAmount=e==="auto"?t===1?.33:0:e}class OS extends wr{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,t,r,s){return ub(e,t,r,s)}parseArrayData(e,t,r,s){return ub(e,t,r,s)}parseObjectData(e,t,r,s){const{iScale:a,vScale:l}=e,{xAxisKey:c="x",yAxisKey:f="y"}=this._parsing,h=a.axis==="x"?c:f,p=l.axis==="x"?c:f,m=[];let y,_,b,S;for(y=r,_=r+s;y<_;++y)S=t[y],b={},b[a.axis]=a.parse(yr(S,h),y),m.push(ES(yr(S,p),b,l,y));return m}updateRangeFromParsed(e,t,r,s){super.updateRangeFromParsed(e,t,r,s);const a=r._custom;a&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const t=this._cachedMeta,{iScale:r,vScale:s}=t,a=this.getParsed(e),l=a._custom,c=$d(l)?"["+l.start+", "+l.end+"]":""+s.getLabelForValue(a[s.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}updateElements(e,t,r,s){const a=s==="reset",{index:l,_cachedMeta:{vScale:c}}=this,f=c.getBasePixel(),h=c.isHorizontal(),p=this._getRuler(),{sharedOptions:m,includeOptions:y}=this._getSharedOptions(t,s);for(let _=t;_<t+r;_++){const b=this.getParsed(_),S=a||we(b[c.axis])?{base:f,head:f}:this._calculateBarValuePixels(_),k=this._calculateBarIndexPixels(_,p),R=(b._stacks||{})[c.axis],w={horizontal:h,base:S.base,enableBorderRadius:!R||$d(b._custom)||l===R._top||l===R._bottom,x:h?S.head:k.center,y:h?k.center:S.head,height:h?k.size:Math.abs(S.size),width:h?Math.abs(S.size):k.size};y&&(w.options=m||this.resolveDataElementOptions(_,e[_].active?"active":s));const E=w.options||e[_].options;mM(w,E,R,l),yM(w,E,p.ratio),this.updateElement(e[_],_,w,s)}}_getStacks(e,t){const{iScale:r}=this._cachedMeta,s=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),a=r.options.stacked,l=[],c=f=>{const h=f.controller.getParsed(t),p=h&&h[f.vScale.axis];if(we(p)||isNaN(p))return!0};for(const f of s)if(!(t!==void 0&&c(f))&&((a===!1||l.indexOf(f.stack)===-1||a===void 0&&f.stack===void 0)&&l.push(f.stack),f.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,r){const s=this._getStacks(e,r),a=t!==void 0?s.indexOf(t):-1;return a===-1?s.length-1:a}_getRuler(){const e=this.options,t=this._cachedMeta,r=t.iScale,s=[];let a,l;for(a=0,l=t.data.length;a<l;++a)s.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const c=e.barThickness;return{min:c||cM(t),pixels:s,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:t,_stacked:r,index:s},options:{base:a,minBarLength:l}}=this,c=a||0,f=this.getParsed(e),h=f._custom,p=$d(h);let m=f[t.axis],y=0,_=r?this.applyStack(t,f,r):m,b,S;_!==m&&(y=_-m,_=m),p&&(m=h.barStart,_=h.barEnd-h.barStart,m!==0&&En(m)!==En(h.barEnd)&&(y=0),y+=m);const k=!we(a)&&!p?a:y;let R=t.getPixelForValue(k);if(this.chart.getDataVisibility(e)?b=t.getPixelForValue(y+_):b=R,S=b-R,Math.abs(S)<l){S=pM(S,t,c)*l,m===c&&(R-=S/2);const w=t.getPixelForDecimal(0),E=t.getPixelForDecimal(1),O=Math.min(w,E),P=Math.max(w,E);R=Math.max(Math.min(R,P),O),b=R+S,r&&!p&&(f._stacks[t.axis]._visualValues[s]=t.getValueForPixel(b)-t.getValueForPixel(R))}if(R===t.getPixelForValue(c)){const w=En(S)*t.getLineWidthForValue(c)/2;R+=w,S-=w}return{size:S,base:R,head:b,center:b+S/2}}_calculateBarIndexPixels(e,t){const r=t.scale,s=this.options,a=s.skipNull,l=ye(s.maxBarThickness,1/0);let c,f;if(t.grouped){const h=a?this._getStackCount(e):t.stackCount,p=s.barThickness==="flex"?dM(e,t,s,h):fM(e,t,s,h),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0);c=p.start+p.chunk*m+p.chunk/2,f=Math.min(l,p.chunk*p.ratio)}else c=r.getPixelForValue(this.getParsed(e)[r.axis],e),f=Math.min(l,t.min*t.ratio);return{base:c-f/2,head:c+f/2,center:c,size:f}}draw(){const e=this._cachedMeta,t=e.vScale,r=e.data,s=r.length;let a=0;for(;a<s;++a)this.getParsed(a)[t.axis]!==null&&r[a].draw(this._ctx)}}class _M extends wr{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,t,r,s){const a=super.parsePrimitiveData(e,t,r,s);for(let l=0;l<a.length;l++)a[l]._custom=this.resolveDataElementOptions(l+r).radius;return a}parseArrayData(e,t,r,s){const a=super.parseArrayData(e,t,r,s);for(let l=0;l<a.length;l++){const c=t[r+l];a[l]._custom=ye(c[2],this.resolveDataElementOptions(l+r).radius)}return a}parseObjectData(e,t,r,s){const a=super.parseObjectData(e,t,r,s);for(let l=0;l<a.length;l++){const c=t[r+l];a[l]._custom=ye(c&&c.r&&+c.r,this.resolveDataElementOptions(l+r).radius)}return a}getMaxOverflow(){const e=this._cachedMeta.data;let t=0;for(let r=e.length-1;r>=0;--r)t=Math.max(t,e[r].size(this.resolveDataElementOptions(r))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:a}=t,l=this.getParsed(e),c=s.getLabelForValue(l.x),f=a.getLabelForValue(l.y),h=l._custom;return{label:r[e]||"",value:"("+c+", "+f+(h?", "+h:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,r,s){const a=s==="reset",{iScale:l,vScale:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(t,s),p=l.axis,m=c.axis;for(let y=t;y<t+r;y++){const _=e[y],b=!a&&this.getParsed(y),S={},k=S[p]=a?l.getPixelForDecimal(.5):l.getPixelForValue(b[p]),R=S[m]=a?c.getBasePixel():c.getPixelForValue(b[m]);S.skip=isNaN(k)||isNaN(R),h&&(S.options=f||this.resolveDataElementOptions(y,_.active?"active":s),a&&(S.options.radius=0)),this.updateElement(_,y,S,s)}}resolveDataElementOptions(e,t){const r=this.getParsed(e);let s=super.resolveDataElementOptions(e,t);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const a=s.radius;return t!=="active"&&(s.radius=0),s.radius+=ye(r&&r._custom,a),s}}function bM(n,e,t){let r=1,s=1,a=0,l=0;if(e<Fe){const c=n,f=c+e,h=Math.cos(c),p=Math.sin(c),m=Math.cos(f),y=Math.sin(f),_=(E,O,P)=>Ws(E,c,f,!0)?1:Math.max(O,O*t,P,P*t),b=(E,O,P)=>Ws(E,c,f,!0)?-1:Math.min(O,O*t,P,P*t),S=_(0,h,m),k=_(Ze,p,y),R=b(ze,h,m),w=b(ze+Ze,p,y);r=(S-R)/2,s=(k-w)/2,a=-(S+R)/2,l=-(k+w)/2}return{ratioX:r,ratioY:s,offsetX:a,offsetY:l}}class ol extends wr{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return t.labels.map((a,l)=>{const f=e.getDatasetMeta(0).controller.getStyle(l);return{text:a,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,fontColor:s,lineWidth:f.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,t,r){r.chart.toggleDataVisibility(t.index),r.chart.update()}}}};constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const r=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=r;else{let a=f=>+r[f];if(be(r[e])){const{key:f="value"}=this._parsing;a=h=>+yr(r[h],f)}let l,c;for(l=e,c=e+t;l<c;++l)s._parsed[l]=a(l)}}_getRotation(){return hn(this.options.rotation-90)}_getCircumference(){return hn(this.options.circumference)}_getRotationExtents(){let e=Fe,t=-Fe;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const s=this.chart.getDatasetMeta(r).controller,a=s._getRotation(),l=s._getCircumference();e=Math.min(e,a),t=Math.max(t,a+l)}return{rotation:e,circumference:t-e}}update(e){const t=this.chart,{chartArea:r}=t,s=this._cachedMeta,a=s.data,l=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-l)/2,0),f=Math.min(IP(this.options.cutout,c),1),h=this._getRingWeight(this.index),{circumference:p,rotation:m}=this._getRotationExtents(),{ratioX:y,ratioY:_,offsetX:b,offsetY:S}=bM(m,p,f),k=(r.width-l)/y,R=(r.height-l)/_,w=Math.max(Math.min(k,R)/2,0),E=Zx(this.options.radius,w),O=Math.max(E*f,0),P=(E-O)/this._getVisibleDatasetWeightTotal();this.offsetX=b*E,this.offsetY=S*E,s.total=this.calculateTotal(),this.outerRadius=E-P*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-P*h,0),this.updateElements(a,0,a.length,e)}_circumference(e,t){const r=this.options,s=this._cachedMeta,a=this._getCircumference();return t&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*a/Fe)}updateElements(e,t,r,s){const a=s==="reset",l=this.chart,c=l.chartArea,h=l.options.animation,p=(c.left+c.right)/2,m=(c.top+c.bottom)/2,y=a&&h.animateScale,_=y?0:this.innerRadius,b=y?0:this.outerRadius,{sharedOptions:S,includeOptions:k}=this._getSharedOptions(t,s);let R=this._getRotation(),w;for(w=0;w<t;++w)R+=this._circumference(w,a);for(w=t;w<t+r;++w){const E=this._circumference(w,a),O=e[w],P={x:p+this.offsetX,y:m+this.offsetY,startAngle:R,endAngle:R+E,circumference:E,outerRadius:b,innerRadius:_};k&&(P.options=S||this.resolveDataElementOptions(w,O.active?"active":s)),R+=E,this.updateElement(O,w,P,s)}}calculateTotal(){const e=this._cachedMeta,t=e.data;let r=0,s;for(s=0;s<t.length;s++){const a=e._parsed[s];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(s)&&!t[s].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(e){const t=this._cachedMeta.total;return t>0&&!isNaN(e)?Fe*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,r=this.chart,s=r.data.labels||[],a=no(t._parsed[e],r.options.locale);return{label:s[e]||"",value:a}}getMaxBorderWidth(e){let t=0;const r=this.chart;let s,a,l,c,f;if(!e){for(s=0,a=r.data.datasets.length;s<a;++s)if(r.isDatasetVisible(s)){l=r.getDatasetMeta(s),e=l.data,c=l.controller;break}}if(!e)return 0;for(s=0,a=e.length;s<a;++s)f=c.resolveDataElementOptions(s),f.borderAlign!=="inner"&&(t=Math.max(t,f.borderWidth||0,f.hoverBorderWidth||0));return t}getMaxOffset(e){let t=0;for(let r=0,s=e.length;r<s;++r){const a=this.resolveDataElementOptions(r);t=Math.max(t,a.offset||0,a.hoverOffset||0)}return t}_getRingWeightOffset(e){let t=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t}_getRingWeight(e){return Math.max(ye(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class PS extends wr{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:r,data:s=[],_dataset:a}=t,l=this.chart._animationsDisabled;let{start:c,count:f}=aS(t,s,l);this._drawStart=c,this._drawCount=f,lS(t)&&(c=0,f=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=s;const h=this.resolveDatasetElementOptions(e);this.options.showLine||(h.borderWidth=0),h.segment=this.options.segment,this.updateElement(r,void 0,{animated:!l,options:h},e),this.updateElements(s,c,f,e)}updateElements(e,t,r,s){const a=s==="reset",{iScale:l,vScale:c,_stacked:f,_dataset:h}=this._cachedMeta,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(t,s),y=l.axis,_=c.axis,{spanGaps:b,segment:S}=this.options,k=Ri(b)?b:Number.POSITIVE_INFINITY,R=this.chart._animationsDisabled||a||s==="none",w=t+r,E=e.length;let O=t>0&&this.getParsed(t-1);for(let P=0;P<E;++P){const T=e[P],D=R?T:{};if(P<t||P>=w){D.skip=!0;continue}const I=this.getParsed(P),W=we(I[_]),H=D[y]=l.getPixelForValue(I[y],P),Y=D[_]=a||W?c.getBasePixel():c.getPixelForValue(f?this.applyStack(c,I,f):I[_],P);D.skip=isNaN(H)||isNaN(Y)||W,D.stop=P>0&&Math.abs(I[y]-O[y])>k,S&&(D.parsed=I,D.raw=h.data[P]),m&&(D.options=p||this.resolveDataElementOptions(P,T.active?"active":s)),R||this.updateElement(T,P,D,s),O=I}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,r=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return r;const a=s[0].size(this.resolveDataElementOptions(0)),l=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,a,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}class CS extends wr{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const t=e.data;if(t.labels.length&&t.datasets.length){const{labels:{pointStyle:r,color:s}}=e.legend.options;return t.labels.map((a,l)=>{const f=e.getDatasetMeta(0).controller.getStyle(l);return{text:a,fillStyle:f.backgroundColor,strokeStyle:f.borderColor,fontColor:s,lineWidth:f.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,t,r){r.chart.toggleDataVisibility(t.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,r=this.chart,s=r.data.labels||[],a=no(t._parsed[e].r,r.options.locale);return{label:s[e]||"",value:a}}parseObjectData(e,t,r,s){return mS.bind(this)(e,t,r,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,s)=>{const a=this.getParsed(s).r;!isNaN(a)&&this.chart.getDataVisibility(s)&&(a<t.min&&(t.min=a),a>t.max&&(t.max=a))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,r=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),a=Math.max(s/2,0),l=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),c=(a-l)/e.getVisibleDatasetCount();this.outerRadius=a-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(e,t,r,s){const a=s==="reset",l=this.chart,f=l.options.animation,h=this._cachedMeta.rScale,p=h.xCenter,m=h.yCenter,y=h.getIndexAngle(0)-.5*ze;let _=y,b;const S=360/this.countVisibleElements();for(b=0;b<t;++b)_+=this._computeAngle(b,s,S);for(b=t;b<t+r;b++){const k=e[b];let R=_,w=_+this._computeAngle(b,s,S),E=l.getDataVisibility(b)?h.getDistanceFromCenterForValue(this.getParsed(b).r):0;_=w,a&&(f.animateScale&&(E=0),f.animateRotate&&(R=w=y));const O={x:p,y:m,innerRadius:0,outerRadius:E,startAngle:R,endAngle:w,options:this.resolveDataElementOptions(b,k.active?"active":s)};this.updateElement(k,b,O,s)}}countVisibleElements(){const e=this._cachedMeta;let t=0;return e.data.forEach((r,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,r){return this.chart.getDataVisibility(e)?hn(this.resolveDataElementOptions(e,t).angle||r):0}}class MS extends ol{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}class xM extends wr{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(e){const t=this._cachedMeta.vScale,r=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(r[t.axis])}}parseObjectData(e,t,r,s){return mS.bind(this)(e,t,r,s)}update(e){const t=this._cachedMeta,r=t.dataset,s=t.data||[],a=t.iScale.getLabels();if(r.points=s,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const c={_loop:!0,_fullLoop:a.length===s.length,options:l};this.updateElement(r,void 0,c,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,r,s){const a=this._cachedMeta.rScale,l=s==="reset";for(let c=t;c<t+r;c++){const f=e[c],h=this.resolveDataElementOptions(c,f.active?"active":s),p=a.getPointPositionForValue(c,this.getParsed(c).r),m=l?a.xCenter:p.x,y=l?a.yCenter:p.y,_={x:m,y,angle:p.angle,skip:isNaN(m)||isNaN(y),options:h};this.updateElement(f,c,_,s)}}}class SM extends wr{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(e){const t=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:a}=t,l=this.getParsed(e),c=s.getLabelForValue(l.x),f=a.getLabelForValue(l.y);return{label:r[e]||"",value:"("+c+", "+f+")"}}update(e){const t=this._cachedMeta,{data:r=[]}=t,s=this.chart._animationsDisabled;let{start:a,count:l}=aS(t,r,s);if(this._drawStart=a,this._drawCount=l,lS(t)&&(a=0,l=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:c,_dataset:f}=t;c._chart=this.chart,c._datasetIndex=this.index,c._decimated=!!f._decimated,c.points=r;const h=this.resolveDatasetElementOptions(e);h.segment=this.options.segment,this.updateElement(c,void 0,{animated:!s,options:h},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(r,a,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,t,r,s){const a=s==="reset",{iScale:l,vScale:c,_stacked:f,_dataset:h}=this._cachedMeta,p=this.resolveDataElementOptions(t,s),m=this.getSharedOptions(p),y=this.includeOptions(s,m),_=l.axis,b=c.axis,{spanGaps:S,segment:k}=this.options,R=Ri(S)?S:Number.POSITIVE_INFINITY,w=this.chart._animationsDisabled||a||s==="none";let E=t>0&&this.getParsed(t-1);for(let O=t;O<t+r;++O){const P=e[O],T=this.getParsed(O),D=w?P:{},I=we(T[b]),W=D[_]=l.getPixelForValue(T[_],O),H=D[b]=a||I?c.getBasePixel():c.getPixelForValue(f?this.applyStack(c,T,f):T[b],O);D.skip=isNaN(W)||isNaN(H)||I,D.stop=O>0&&Math.abs(T[_]-E[_])>R,k&&(D.parsed=T,D.raw=h.data[O]),y&&(D.options=m||this.resolveDataElementOptions(O,P.active?"active":s)),w||this.updateElement(P,O,D,s),E=T}this.updateSharedOptions(m,s,p)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let c=0;for(let f=t.length-1;f>=0;--f)c=Math.max(c,t[f].size(this.resolveDataElementOptions(f))/2);return c>0&&c}const r=e.dataset,s=r.options&&r.options.borderWidth||0;if(!t.length)return s;const a=t[0].size(this.resolveDataElementOptions(0)),l=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,a,l)/2}}var wM=Object.freeze({__proto__:null,BarController:OS,BubbleController:_M,DoughnutController:ol,LineController:PS,PieController:MS,PolarAreaController:CS,RadarController:xM,ScatterController:SM});function qr(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Jh{static override(e){Object.assign(Jh.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return qr()}parse(){return qr()}format(){return qr()}add(){return qr()}diff(){return qr()}startOf(){return qr()}endOf(){return qr()}}var kM={_date:Jh};function EM(n,e,t,r){const{controller:s,data:a,_sorted:l}=n,c=s._cachedMeta.iScale;if(c&&e===c.axis&&e!=="r"&&l&&a.length){const f=c._reversePixels?UP:Wn;if(r){if(s._sharedOptions){const h=a[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const m=f(a,e,t-p),y=f(a,e,t+p);return{lo:m.lo,hi:y.hi}}}}else return f(a,e,t)}return{lo:0,hi:a.length-1}}function al(n,e,t,r,s){const a=n.getSortedVisibleDatasetMetas(),l=t[e];for(let c=0,f=a.length;c<f;++c){const{index:h,data:p}=a[c],{lo:m,hi:y}=EM(a[c],e,l,s);for(let _=m;_<=y;++_){const b=p[_];b.skip||r(b,h,_)}}}function OM(n){const e=n.indexOf("x")!==-1,t=n.indexOf("y")!==-1;return function(r,s){const a=e?Math.abs(r.x-s.x):0,l=t?Math.abs(r.y-s.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(l,2))}}function Vd(n,e,t,r,s){const a=[];return!s&&!n.isPointInArea(e)||al(n,t,e,function(c,f,h){!s&&!Un(c,n.chartArea,0)||c.inRange(e.x,e.y,r)&&a.push({element:c,datasetIndex:f,index:h})},!0),a}function PM(n,e,t,r){let s=[];function a(l,c,f){const{startAngle:h,endAngle:p}=l.getProps(["startAngle","endAngle"],r),{angle:m}=nS(l,{x:e.x,y:e.y});Ws(m,h,p)&&s.push({element:l,datasetIndex:c,index:f})}return al(n,t,e,a),s}function CM(n,e,t,r,s,a){let l=[];const c=OM(t);let f=Number.POSITIVE_INFINITY;function h(p,m,y){const _=p.inRange(e.x,e.y,s);if(r&&!_)return;const b=p.getCenterPoint(s);if(!(!!a||n.isPointInArea(b))&&!_)return;const k=c(e,b);k<f?(l=[{element:p,datasetIndex:m,index:y}],f=k):k===f&&l.push({element:p,datasetIndex:m,index:y})}return al(n,t,e,h),l}function Wd(n,e,t,r,s,a){return!a&&!n.isPointInArea(e)?[]:t==="r"&&!r?PM(n,e,t,s):CM(n,e,t,r,s,a)}function db(n,e,t,r,s){const a=[],l=t==="x"?"inXRange":"inYRange";let c=!1;return al(n,t,e,(f,h,p)=>{f[l](e[t],s)&&(a.push({element:f,datasetIndex:h,index:p}),c=c||f.inRange(e.x,e.y,s))}),r&&!c?[]:a}var MM={modes:{index(n,e,t,r){const s=$r(e,n),a=t.axis||"x",l=t.includeInvisible||!1,c=t.intersect?Vd(n,s,a,r,l):Wd(n,s,a,!1,r,l),f=[];return c.length?(n.getSortedVisibleDatasetMetas().forEach(h=>{const p=c[0].index,m=h.data[p];m&&!m.skip&&f.push({element:m,datasetIndex:h.index,index:p})}),f):[]},dataset(n,e,t,r){const s=$r(e,n),a=t.axis||"xy",l=t.includeInvisible||!1;let c=t.intersect?Vd(n,s,a,r,l):Wd(n,s,a,!1,r,l);if(c.length>0){const f=c[0].datasetIndex,h=n.getDatasetMeta(f).data;c=[];for(let p=0;p<h.length;++p)c.push({element:h[p],datasetIndex:f,index:p})}return c},point(n,e,t,r){const s=$r(e,n),a=t.axis||"xy",l=t.includeInvisible||!1;return Vd(n,s,a,r,l)},nearest(n,e,t,r){const s=$r(e,n),a=t.axis||"xy",l=t.includeInvisible||!1;return Wd(n,s,a,t.intersect,r,l)},x(n,e,t,r){const s=$r(e,n);return db(n,s,"x",t.intersect,r)},y(n,e,t,r){const s=$r(e,n);return db(n,s,"y",t.intersect,r)}}};const RS=["left","top","right","bottom"];function Os(n,e){return n.filter(t=>t.pos===e)}function hb(n,e){return n.filter(t=>RS.indexOf(t.pos)===-1&&t.box.axis===e)}function Ps(n,e){return n.sort((t,r)=>{const s=e?r:t,a=e?t:r;return s.weight===a.weight?s.index-a.index:s.weight-a.weight})}function RM(n){const e=[];let t,r,s,a,l,c;for(t=0,r=(n||[]).length;t<r;++t)s=n[t],{position:a,options:{stack:l,stackWeight:c=1}}=s,e.push({index:t,box:s,pos:a,horizontal:s.isHorizontal(),weight:s.weight,stack:l&&a+l,stackWeight:c});return e}function TM(n){const e={};for(const t of n){const{stack:r,pos:s,stackWeight:a}=t;if(!r||!RS.includes(s))continue;const l=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=a}return e}function DM(n,e){const t=TM(n),{vBoxMaxWidth:r,hBoxMaxHeight:s}=e;let a,l,c;for(a=0,l=n.length;a<l;++a){c=n[a];const{fullSize:f}=c.box,h=t[c.stack],p=h&&c.stackWeight/h.weight;c.horizontal?(c.width=p?p*r:f&&e.availableWidth,c.height=s):(c.width=r,c.height=p?p*s:f&&e.availableHeight)}return t}function IM(n){const e=RM(n),t=Ps(e.filter(h=>h.box.fullSize),!0),r=Ps(Os(e,"left"),!0),s=Ps(Os(e,"right")),a=Ps(Os(e,"top"),!0),l=Ps(Os(e,"bottom")),c=hb(e,"x"),f=hb(e,"y");return{fullSize:t,leftAndTop:r.concat(a),rightAndBottom:s.concat(f).concat(l).concat(c),chartArea:Os(e,"chartArea"),vertical:r.concat(s).concat(f),horizontal:a.concat(l).concat(c)}}function pb(n,e,t,r){return Math.max(n[t],e[t])+Math.max(n[r],e[r])}function TS(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function AM(n,e,t,r){const{pos:s,box:a}=t,l=n.maxPadding;if(!be(s)){t.size&&(n[s]-=t.size);const m=r[t.stack]||{size:0,count:1};m.size=Math.max(m.size,t.horizontal?a.height:a.width),t.size=m.size/m.count,n[s]+=t.size}a.getPadding&&TS(l,a.getPadding());const c=Math.max(0,e.outerWidth-pb(l,n,"left","right")),f=Math.max(0,e.outerHeight-pb(l,n,"top","bottom")),h=c!==n.w,p=f!==n.h;return n.w=c,n.h=f,t.horizontal?{same:h,other:p}:{same:p,other:h}}function LM(n){const e=n.maxPadding;function t(r){const s=Math.max(e[r]-n[r],0);return n[r]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function NM(n,e){const t=e.maxPadding;function r(s){const a={left:0,top:0,right:0,bottom:0};return s.forEach(l=>{a[l]=Math.max(e[l],t[l])}),a}return r(n?["left","right"]:["top","bottom"])}function Is(n,e,t,r){const s=[];let a,l,c,f,h,p;for(a=0,l=n.length,h=0;a<l;++a){c=n[a],f=c.box,f.update(c.width||e.w,c.height||e.h,NM(c.horizontal,e));const{same:m,other:y}=AM(e,t,c,r);h|=m&&s.length,p=p||y,f.fullSize||s.push(c)}return h&&Is(s,e,t,r)||p}function ba(n,e,t,r,s){n.top=t,n.left=e,n.right=e+r,n.bottom=t+s,n.width=r,n.height=s}function gb(n,e,t,r){const s=t.padding;let{x:a,y:l}=e;for(const c of n){const f=c.box,h=r[c.stack]||{placed:0,weight:1},p=c.stackWeight/h.weight||1;if(c.horizontal){const m=e.w*p,y=h.size||f.height;Vs(h.start)&&(l=h.start),f.fullSize?ba(f,s.left,l,t.outerWidth-s.right-s.left,y):ba(f,e.left+h.placed,l,m,y),h.start=l,h.placed+=m,l=f.bottom}else{const m=e.h*p,y=h.size||f.width;Vs(h.start)&&(a=h.start),f.fullSize?ba(f,a,s.top,y,t.outerHeight-s.bottom-s.top):ba(f,a,e.top+h.placed,y,m),h.start=a,h.placed+=m,a=f.right}}e.x=a,e.y=l}var xt={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},n.boxes.push(e)},removeBox(n,e){const t=n.boxes?n.boxes.indexOf(e):-1;t!==-1&&n.boxes.splice(t,1)},configure(n,e,t){e.fullSize=t.fullSize,e.position=t.position,e.weight=t.weight},update(n,e,t,r){if(!n)return;const s=St(n.options.layout.padding),a=Math.max(e-s.width,0),l=Math.max(t-s.height,0),c=IM(n.boxes),f=c.vertical,h=c.horizontal;Re(n.boxes,S=>{typeof S.beforeLayout=="function"&&S.beforeLayout()});const p=f.reduce((S,k)=>k.box.options&&k.box.options.display===!1?S:S+1,0)||1,m=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:a,availableHeight:l,vBoxMaxWidth:a/2/p,hBoxMaxHeight:l/2}),y=Object.assign({},s);TS(y,St(r));const _=Object.assign({maxPadding:y,w:a,h:l,x:s.left,y:s.top},s),b=DM(f.concat(h),m);Is(c.fullSize,_,m,b),Is(f,_,m,b),Is(h,_,m,b)&&Is(f,_,m,b),LM(_),gb(c.leftAndTop,_,m,b),_.x+=_.w,_.y+=_.h,gb(c.rightAndBottom,_,m,b),n.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h,height:_.h,width:_.w},Re(c.chartArea,S=>{const k=S.box;Object.assign(k,n.chartArea),k.update(_.w,_.h,{left:0,top:0,right:0,bottom:0})})}};class DS{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,r){}removeEventListener(e,t,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,r,s){return t=Math.max(0,t||e.width),r=r||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):r)}}isAttached(e){return!0}updateConfig(e){}}class jM extends DS{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ia="$chartjs",FM={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mb=n=>n===null||n==="";function zM(n,e){const t=n.style,r=n.getAttribute("height"),s=n.getAttribute("width");if(n[Ia]={initial:{height:r,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",mb(s)){const a=J_(n,"width");a!==void 0&&(n.width=a)}if(mb(r))if(n.style.height==="")n.height=n.width/(e||2);else{const a=J_(n,"height");a!==void 0&&(n.height=a)}return n}const IS=FC?{passive:!0}:!1;function qM(n,e,t){n&&n.addEventListener(e,t,IS)}function BM(n,e,t){n&&n.canvas&&n.canvas.removeEventListener(e,t,IS)}function $M(n,e){const t=FM[n.type]||n.type,{x:r,y:s}=$r(n,e);return{type:t,chart:e,native:n,x:r!==void 0?r:null,y:s!==void 0?s:null}}function Wa(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function VM(n,e,t){const r=n.canvas,s=new MutationObserver(a=>{let l=!1;for(const c of a)l=l||Wa(c.addedNodes,r),l=l&&!Wa(c.removedNodes,r);l&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function WM(n,e,t){const r=n.canvas,s=new MutationObserver(a=>{let l=!1;for(const c of a)l=l||Wa(c.removedNodes,r),l=l&&!Wa(c.addedNodes,r);l&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const Hs=new Map;let vb=0;function AS(){const n=window.devicePixelRatio;n!==vb&&(vb=n,Hs.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function UM(n,e){Hs.size||window.addEventListener("resize",AS),Hs.set(n,e)}function HM(n){Hs.delete(n),Hs.size||window.removeEventListener("resize",AS)}function YM(n,e,t){const r=n.canvas,s=r&&Xh(r);if(!s)return;const a=oS((c,f)=>{const h=s.clientWidth;t(c,f),h<s.clientWidth&&t()},window),l=new ResizeObserver(c=>{const f=c[0],h=f.contentRect.width,p=f.contentRect.height;h===0&&p===0||a(h,p)});return l.observe(s),UM(n,a),l}function Ud(n,e,t){t&&t.disconnect(),e==="resize"&&HM(n)}function GM(n,e,t){const r=n.canvas,s=oS(a=>{n.ctx!==null&&t($M(a,n))},n);return qM(r,e,s),s}class QM extends DS{acquireContext(e,t){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(zM(e,t),r):null}releaseContext(e){const t=e.canvas;if(!t[Ia])return!1;const r=t[Ia].initial;["height","width"].forEach(a=>{const l=r[a];we(l)?t.removeAttribute(a):t.setAttribute(a,l)});const s=r.style||{};return Object.keys(s).forEach(a=>{t.style[a]=s[a]}),t.width=t.width,delete t[Ia],!0}addEventListener(e,t,r){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),l={attach:VM,detach:WM,resize:YM}[t]||GM;s[t]=l(e,t,r)}removeEventListener(e,t){const r=e.$proxies||(e.$proxies={}),s=r[t];if(!s)return;({attach:Ud,detach:Ud,resize:Ud}[t]||BM)(e,t,s),r[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,r,s){return jC(e,t,r,s)}isAttached(e){const t=Xh(e);return!!(t&&t.isConnected)}}function KM(n){return!Kh()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?jM:QM}class Hn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:t,y:r}=this.getProps(["x","y"],e);return{x:t,y:r}}hasValue(){return Ri(this.x)&&Ri(this.y)}getProps(e,t){const r=this.$animations;if(!t||!r)return this;const s={};return e.forEach(a=>{s[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),s}}function XM(n,e){const t=n.options.ticks,r=JM(n),s=Math.min(t.maxTicksLimit||r,r),a=t.major.enabled?eR(e):[],l=a.length,c=a[0],f=a[l-1],h=[];if(l>s)return tR(e,h,a,l/s),h;const p=ZM(a,e,s);if(l>0){let m,y;const _=l>1?Math.round((f-c)/(l-1)):null;for(xa(e,h,p,we(_)?0:c-_,c),m=0,y=l-1;m<y;m++)xa(e,h,p,a[m],a[m+1]);return xa(e,h,p,f,we(_)?e.length:f+_),h}return xa(e,h,p),h}function JM(n){const e=n.options.offset,t=n._tickSize(),r=n._length/t+(e?0:1),s=n._maxLength/t;return Math.floor(Math.min(r,s))}function ZM(n,e,t){const r=nR(n),s=e.length/t;if(!r)return Math.max(s,1);const a=BP(r);for(let l=0,c=a.length-1;l<c;l++){const f=a[l];if(f>s)return f}return Math.max(s,1)}function eR(n){const e=[];let t,r;for(t=0,r=n.length;t<r;t++)n[t].major&&e.push(t);return e}function tR(n,e,t,r){let s=0,a=t[0],l;for(r=Math.ceil(r),l=0;l<n.length;l++)l===a&&(e.push(n[l]),s++,a=t[s*r])}function xa(n,e,t,r,s){const a=ye(r,0),l=Math.min(ye(s,n.length),n.length);let c=0,f,h,p;for(t=Math.ceil(t),s&&(f=s-r,t=f/Math.floor(f/t)),p=a;p<0;)c++,p=Math.round(a+c*t);for(h=Math.max(a,0);h<l;h++)h===p&&(e.push(n[h]),c++,p=Math.round(a+c*t))}function nR(n){const e=n.length;let t,r;if(e<2)return!1;for(r=n[0],t=1;t<e;++t)if(n[t]-n[t-1]!==r)return!1;return r}const rR=n=>n==="left"?"right":n==="right"?"left":n,yb=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t,_b=(n,e)=>Math.min(e||n,n);function bb(n,e){const t=[],r=n.length/e,s=n.length;let a=0;for(;a<s;a+=r)t.push(n[Math.floor(a)]);return t}function iR(n,e,t){const r=n.ticks.length,s=Math.min(e,r-1),a=n._startPixel,l=n._endPixel,c=1e-6;let f=n.getPixelForTick(s),h;if(!(t&&(r===1?h=Math.max(f-a,l-f):e===0?h=(n.getPixelForTick(1)-f)/2:h=(f-n.getPixelForTick(s-1))/2,f+=s<e?h:-h,f<a-c||f>l+c)))return f}function sR(n,e){Re(n,t=>{const r=t.gc,s=r.length/2;let a;if(s>e){for(a=0;a<s;++a)delete t.data[r[a]];r.splice(0,s)}})}function Cs(n){return n.drawTicks?n.tickLength:0}function xb(n,e){if(!n.display)return 0;const t=it(n.font,e),r=St(n.padding);return($e(n.text)?n.text.length:1)*t.lineHeight+r.height}function oR(n,e){return Sr(n,{scale:e,type:"scale"})}function aR(n,e,t){return Sr(n,{tick:t,index:e,type:"tick"})}function lR(n,e,t){let r=Wh(n);return(t&&e!=="right"||!t&&e==="right")&&(r=rR(r)),r}function uR(n,e,t,r){const{top:s,left:a,bottom:l,right:c,chart:f}=n,{chartArea:h,scales:p}=f;let m=0,y,_,b;const S=l-s,k=c-a;if(n.isHorizontal()){if(_=bt(r,a,c),be(t)){const R=Object.keys(t)[0],w=t[R];b=p[R].getPixelForValue(w)+S-e}else t==="center"?b=(h.bottom+h.top)/2+S-e:b=yb(n,t,e);y=c-a}else{if(be(t)){const R=Object.keys(t)[0],w=t[R];_=p[R].getPixelForValue(w)-k+e}else t==="center"?_=(h.left+h.right)/2-k+e:_=yb(n,t,e);b=bt(r,l,s),m=t==="left"?-Ze:Ze}return{titleX:_,titleY:b,maxWidth:y,rotation:m}}class Zr extends Hn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,t){return e}getUserBounds(){let{_userMin:e,_userMax:t,_suggestedMin:r,_suggestedMax:s}=this;return e=Vt(e,Number.POSITIVE_INFINITY),t=Vt(t,Number.NEGATIVE_INFINITY),r=Vt(r,Number.POSITIVE_INFINITY),s=Vt(s,Number.NEGATIVE_INFINITY),{min:Vt(e,r),max:Vt(t,s),minDefined:Ye(e),maxDefined:Ye(t)}}getMinMax(e){let{min:t,max:r,minDefined:s,maxDefined:a}=this.getUserBounds(),l;if(s&&a)return{min:t,max:r};const c=this.getMatchingVisibleMetas();for(let f=0,h=c.length;f<h;++f)l=c[f].controller.getMinMax(this,e),s||(t=Math.min(t,l.min)),a||(r=Math.max(r,l.max));return t=a&&t>r?r:t,r=s&&t>r?t:r,{min:Vt(t,Vt(r,t)),max:Vt(r,Vt(t,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ie(this.options.beforeUpdate,[this])}update(e,t,r){const{beginAtZero:s,grace:a,ticks:l}=this.options,c=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=gC(this,a,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const f=c<this.ticks.length;this._convertTicksToLabels(f?bb(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=XM(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),f&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,t,r;this.isHorizontal()?(t=this.left,r=this.right):(t=this.top,r=this.bottom,e=!e),this._startPixel=t,this._endPixel=r,this._reversePixels=e,this._length=r-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ie(this.options.afterUpdate,[this])}beforeSetDimensions(){Ie(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(){Ie(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Ie(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ie(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const t=this.options.ticks;let r,s,a;for(r=0,s=e.length;r<s;r++)a=e[r],a.label=Ie(t.callback,[a.value,r,e],this)}afterTickToLabelConversion(){Ie(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ie(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,t=e.ticks,r=_b(this.ticks.length,e.ticks.maxTicksLimit),s=t.minRotation||0,a=t.maxRotation;let l=s,c,f,h;if(!this._isVisible()||!t.display||s>=a||r<=1||!this.isHorizontal()){this.labelRotation=s;return}const p=this._getLabelSizes(),m=p.widest.width,y=p.highest.height,_=ft(this.chart.width-m,0,this.maxWidth);c=e.offset?this.maxWidth/r:_/(r-1),m+6>c&&(c=_/(r-(e.offset?.5:1)),f=this.maxHeight-Cs(e.grid)-t.padding-xb(e.title,this.chart.options.font),h=Math.sqrt(m*m+y*y),l=$h(Math.min(Math.asin(ft((p.highest.height+6)/c,-1,1)),Math.asin(ft(f/h,-1,1))-Math.asin(ft(y/h,-1,1)))),l=Math.max(s,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){Ie(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ie(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:r,title:s,grid:a}}=this,l=this._isVisible(),c=this.isHorizontal();if(l){const f=xb(s,t.options.font);if(c?(e.width=this.maxWidth,e.height=Cs(a)+f):(e.height=this.maxHeight,e.width=Cs(a)+f),r.display&&this.ticks.length){const{first:h,last:p,widest:m,highest:y}=this._getLabelSizes(),_=r.padding*2,b=hn(this.labelRotation),S=Math.cos(b),k=Math.sin(b);if(c){const R=r.mirror?0:k*m.width+S*y.height;e.height=Math.min(this.maxHeight,e.height+R+_)}else{const R=r.mirror?0:S*m.width+k*y.height;e.width=Math.min(this.maxWidth,e.width+R+_)}this._calculatePadding(h,p,k,S)}}this._handleMargins(),c?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,r,s){const{ticks:{align:a,padding:l},position:c}=this.options,f=this.labelRotation!==0,h=c!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,_=0;f?h?(y=s*e.width,_=r*t.height):(y=r*e.height,_=s*t.width):a==="start"?_=t.width:a==="end"?y=e.width:a!=="inner"&&(y=e.width/2,_=t.width/2),this.paddingLeft=Math.max((y-p+l)*this.width/(this.width-p),0),this.paddingRight=Math.max((_-m+l)*this.width/(this.width-m),0)}else{let p=t.height/2,m=e.height/2;a==="start"?(p=0,m=e.height):a==="end"&&(p=t.height,m=0),this.paddingTop=p+l,this.paddingBottom=m+l}}_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(){Ie(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,r;for(t=0,r=e.length;t<r;t++)we(e[t].label)&&(e.splice(t,1),r--,t--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const t=this.options.ticks.sampleSize;let r=this.ticks;t<r.length&&(r=bb(r,t)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,t,r){const{ctx:s,_longestTextCache:a}=this,l=[],c=[],f=Math.floor(t/_b(t,r));let h=0,p=0,m,y,_,b,S,k,R,w,E,O,P;for(m=0;m<t;m+=f){if(b=e[m].label,S=this._resolveTickFontOptions(m),s.font=k=S.string,R=a[k]=a[k]||{data:{},gc:[]},w=S.lineHeight,E=O=0,!we(b)&&!$e(b))E=$a(s,R.data,R.gc,E,b),O=w;else if($e(b))for(y=0,_=b.length;y<_;++y)P=b[y],!we(P)&&!$e(P)&&(E=$a(s,R.data,R.gc,E,P),O+=w);l.push(E),c.push(O),h=Math.max(E,h),p=Math.max(O,p)}sR(a,t);const T=l.indexOf(h),D=c.indexOf(p),I=W=>({width:l[W]||0,height:c[W]||0});return{first:I(0),last:I(t-1),widest:I(T),highest:I(D),widths:l,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return WP(this._alignToPixels?zr(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&e<t.length){const r=t[e];return r.$context||(r.$context=aR(this.getContext(),e,r))}return this.$context||(this.$context=oR(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,t=hn(this.labelRotation),r=Math.abs(Math.cos(t)),s=Math.abs(Math.sin(t)),a=this._getLabelSizes(),l=e.autoSkipPadding||0,c=a?a.widest.width+l:0,f=a?a.highest.height+l:0;return this.isHorizontal()?f*r>c*s?c/r:f/s:f*s<c*r?f/r:c/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const t=this.axis,r=this.chart,s=this.options,{grid:a,position:l,border:c}=s,f=a.offset,h=this.isHorizontal(),m=this.ticks.length+(f?1:0),y=Cs(a),_=[],b=c.setContext(this.getContext()),S=b.display?b.width:0,k=S/2,R=function(L){return zr(r,L,S)};let w,E,O,P,T,D,I,W,H,Y,ee,ne;if(l==="top")w=R(this.bottom),D=this.bottom-y,W=w-k,Y=R(e.top)+k,ne=e.bottom;else if(l==="bottom")w=R(this.top),Y=e.top,ne=R(e.bottom)-k,D=w+k,W=this.top+y;else if(l==="left")w=R(this.right),T=this.right-y,I=w-k,H=R(e.left)+k,ee=e.right;else if(l==="right")w=R(this.left),H=e.left,ee=R(e.right)-k,T=w+k,I=this.left+y;else if(t==="x"){if(l==="center")w=R((e.top+e.bottom)/2+.5);else if(be(l)){const L=Object.keys(l)[0],V=l[L];w=R(this.chart.scales[L].getPixelForValue(V))}Y=e.top,ne=e.bottom,D=w+k,W=D+y}else if(t==="y"){if(l==="center")w=R((e.left+e.right)/2);else if(be(l)){const L=Object.keys(l)[0],V=l[L];w=R(this.chart.scales[L].getPixelForValue(V))}T=w-k,I=T-y,H=e.left,ee=e.right}const G=ye(s.ticks.maxTicksLimit,m),B=Math.max(1,Math.ceil(m/G));for(E=0;E<m;E+=B){const L=this.getContext(E),V=a.setContext(L),j=c.setContext(L),U=V.lineWidth,C=V.color,q=j.dash||[],J=j.dashOffset,ae=V.tickWidth,te=V.tickColor,se=V.tickBorderDash||[],ue=V.tickBorderDashOffset;O=iR(this,E,f),O!==void 0&&(P=zr(r,O,U),h?T=I=H=ee=P:D=W=Y=ne=P,_.push({tx1:T,ty1:D,tx2:I,ty2:W,x1:H,y1:Y,x2:ee,y2:ne,width:U,color:C,borderDash:q,borderDashOffset:J,tickWidth:ae,tickColor:te,tickBorderDash:se,tickBorderDashOffset:ue}))}return this._ticksLength=m,this._borderValue=w,_}_computeLabelItems(e){const t=this.axis,r=this.options,{position:s,ticks:a}=r,l=this.isHorizontal(),c=this.ticks,{align:f,crossAlign:h,padding:p,mirror:m}=a,y=Cs(r.grid),_=y+p,b=m?-p:_,S=-hn(this.labelRotation),k=[];let R,w,E,O,P,T,D,I,W,H,Y,ee,ne="middle";if(s==="top")T=this.bottom-b,D=this._getXAxisLabelAlignment();else if(s==="bottom")T=this.top+b,D=this._getXAxisLabelAlignment();else if(s==="left"){const B=this._getYAxisLabelAlignment(y);D=B.textAlign,P=B.x}else if(s==="right"){const B=this._getYAxisLabelAlignment(y);D=B.textAlign,P=B.x}else if(t==="x"){if(s==="center")T=(e.top+e.bottom)/2+_;else if(be(s)){const B=Object.keys(s)[0],L=s[B];T=this.chart.scales[B].getPixelForValue(L)+_}D=this._getXAxisLabelAlignment()}else if(t==="y"){if(s==="center")P=(e.left+e.right)/2-_;else if(be(s)){const B=Object.keys(s)[0],L=s[B];P=this.chart.scales[B].getPixelForValue(L)}D=this._getYAxisLabelAlignment(y).textAlign}t==="y"&&(f==="start"?ne="top":f==="end"&&(ne="bottom"));const G=this._getLabelSizes();for(R=0,w=c.length;R<w;++R){E=c[R],O=E.label;const B=a.setContext(this.getContext(R));I=this.getPixelForTick(R)+a.labelOffset,W=this._resolveTickFontOptions(R),H=W.lineHeight,Y=$e(O)?O.length:1;const L=Y/2,V=B.color,j=B.textStrokeColor,U=B.textStrokeWidth;let C=D;l?(P=I,D==="inner"&&(R===w-1?C=this.options.reverse?"left":"right":R===0?C=this.options.reverse?"right":"left":C="center"),s==="top"?h==="near"||S!==0?ee=-Y*H+H/2:h==="center"?ee=-G.highest.height/2-L*H+H:ee=-G.highest.height+H/2:h==="near"||S!==0?ee=H/2:h==="center"?ee=G.highest.height/2-L*H:ee=G.highest.height-Y*H,m&&(ee*=-1),S!==0&&!B.showLabelBackdrop&&(P+=H/2*Math.sin(S))):(T=I,ee=(1-Y)*H/2);let q;if(B.showLabelBackdrop){const J=St(B.backdropPadding),ae=G.heights[R],te=G.widths[R];let se=ee-J.top,ue=0-J.left;switch(ne){case"middle":se-=ae/2;break;case"bottom":se-=ae;break}switch(D){case"center":ue-=te/2;break;case"right":ue-=te;break;case"inner":R===w-1?ue-=te:R>0&&(ue-=te/2);break}q={left:ue,top:se,width:te+J.width,height:ae+J.height,color:B.backdropColor}}k.push({label:O,font:W,textOffset:ee,options:{rotation:S,color:V,strokeColor:j,strokeWidth:U,textAlign:C,textBaseline:ne,translation:[P,T],backdrop:q}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:t}=this.options;if(-hn(this.labelRotation))return e==="top"?"left":"right";let s="center";return t.align==="start"?s="left":t.align==="end"?s="right":t.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:t,ticks:{crossAlign:r,mirror:s,padding:a}}=this.options,l=this._getLabelSizes(),c=e+a,f=l.widest.width;let h,p;return t==="left"?s?(p=this.right+a,r==="near"?h="left":r==="center"?(h="center",p+=f/2):(h="right",p+=f)):(p=this.right-c,r==="near"?h="right":r==="center"?(h="center",p-=f/2):(h="left",p=this.left)):t==="right"?s?(p=this.left+a,r==="near"?h="right":r==="center"?(h="center",p-=f/2):(h="left",p-=f)):(p=this.left+c,r==="near"?h="left":r==="center"?(h="center",p+=f/2):(h="right",p=this.right)):h="right",{textAlign:h,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,t=this.options.position;if(t==="left"||t==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(t==="top"||t==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:t},left:r,top:s,width:a,height:l}=this;t&&(e.save(),e.fillStyle=t,e.fillRect(r,s,a,l),e.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const s=this.ticks.findIndex(a=>a.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,r=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let a,l;const c=(f,h,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(f.x,f.y),r.lineTo(h.x,h.y),r.stroke(),r.restore())};if(t.display)for(a=0,l=s.length;a<l;++a){const f=s[a];t.drawOnChartArea&&c({x:f.x1,y:f.y1},{x:f.x2,y:f.y2},f),t.drawTicks&&c({x:f.tx1,y:f.ty1},{x:f.tx2,y:f.ty2},{color:f.tickColor,width:f.tickWidth,borderDash:f.tickBorderDash,borderDashOffset:f.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:t,options:{border:r,grid:s}}=this,a=r.setContext(this.getContext()),l=r.display?a.width:0;if(!l)return;const c=s.setContext(this.getContext(0)).lineWidth,f=this._borderValue;let h,p,m,y;this.isHorizontal()?(h=zr(e,this.left,l)-l/2,p=zr(e,this.right,c)+c/2,m=y=f):(m=zr(e,this.top,l)-l/2,y=zr(e,this.bottom,c)+c/2,h=p=f),t.save(),t.lineWidth=a.width,t.strokeStyle=a.color,t.beginPath(),t.moveTo(h,m),t.lineTo(p,y),t.stroke(),t.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,s=this._computeLabelArea();s&&rl(r,s);const a=this.getLabelItems(e);for(const l of a){const c=l.options,f=l.font,h=l.label,p=l.textOffset;Kr(r,h,0,p,f,c)}s&&il(r)}drawTitle(){const{ctx:e,options:{position:t,title:r,reverse:s}}=this;if(!r.display)return;const a=it(r.font),l=St(r.padding),c=r.align;let f=a.lineHeight/2;t==="bottom"||t==="center"||be(t)?(f+=l.bottom,$e(r.text)&&(f+=a.lineHeight*(r.text.length-1))):f+=l.top;const{titleX:h,titleY:p,maxWidth:m,rotation:y}=uR(this,f,t,c);Kr(e,r.text,0,0,a,{color:r.color,maxWidth:m,rotation:y,textAlign:lR(c,t,s),textBaseline:"middle",translation:[h,p]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,t=e.ticks&&e.ticks.z||0,r=ye(e.grid&&e.grid.z,-1),s=ye(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Zr.prototype.draw?[{z:t,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:t,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",s=[];let a,l;for(a=0,l=t.length;a<l;++a){const c=t[a];c[r]===this.id&&(!e||c.type===e)&&s.push(c)}return s}_resolveTickFontOptions(e){const t=this.options.ticks.setContext(this.getContext(e));return it(t.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Sa{constructor(e,t,r){this.type=e,this.scope=t,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const t=Object.getPrototypeOf(e);let r;dR(t)&&(r=this.register(t));const s=this.items,a=e.id,l=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in s||(s[a]=e,cR(e,l,r),this.override&&Ge.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const t=this.items,r=e.id,s=this.scope;r in t&&delete t[r],s&&r in Ge[s]&&(delete Ge[s][r],this.override&&delete Qr[r])}}function cR(n,e,t){const r=$s(Object.create(null),[t?Ge.get(t):{},Ge.get(e),n.defaults]);Ge.set(e,r),n.defaultRoutes&&fR(e,n.defaultRoutes),n.descriptors&&Ge.describe(e,n.descriptors)}function fR(n,e){Object.keys(e).forEach(t=>{const r=t.split("."),s=r.pop(),a=[n].concat(r).join("."),l=e[t].split("."),c=l.pop(),f=l.join(".");Ge.route(a,s,f,c)})}function dR(n){return"id"in n&&"defaults"in n}class hR{constructor(){this.controllers=new Sa(wr,"datasets",!0),this.elements=new Sa(Hn,"elements"),this.plugins=new Sa(Object,"plugins"),this.scales=new Sa(Zr,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,r){[...t].forEach(s=>{const a=r||this._getRegistryForType(s);r||a.isForType(s)||a===this.plugins&&s.id?this._exec(e,a,s):Re(s,l=>{const c=r||this._getRegistryForType(l);this._exec(e,c,l)})})}_exec(e,t,r){const s=Bh(e);Ie(r["before"+s],[],r),t[e](r),Ie(r["after"+s],[],r)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const r=this._typedRegistries[t];if(r.isForType(e))return r}return this.plugins}_get(e,t,r){const s=t.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return s}}var kn=new hR;class pR{constructor(){this._init=[]}notify(e,t,r,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const a=s?this._descriptors(e).filter(s):this._descriptors(e),l=this._notify(a,e,t,r);return t==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,t,r,s){s=s||{};for(const a of e){const l=a.plugin,c=l[r],f=[t,s,a.options];if(Ie(c,f,l)===!1&&s.cancelable)return!1}return!0}invalidate(){we(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const r=e&&e.config,s=ye(r.options&&r.options.plugins,{}),a=gR(r);return s===!1&&!t?[]:vR(e,a,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],r=this._cache,s=(a,l)=>a.filter(c=>!l.some(f=>c.plugin.id===f.plugin.id));this._notify(s(t,r),e,"stop"),this._notify(s(r,t),e,"start")}}function gR(n){const e={},t=[],r=Object.keys(kn.plugins.items);for(let a=0;a<r.length;a++)t.push(kn.getPlugin(r[a]));const s=n.plugins||[];for(let a=0;a<s.length;a++){const l=s[a];t.indexOf(l)===-1&&(t.push(l),e[l.id]=!0)}return{plugins:t,localIds:e}}function mR(n,e){return!e&&n===!1?null:n===!0?{}:n}function vR(n,{plugins:e,localIds:t},r,s){const a=[],l=n.getContext();for(const c of e){const f=c.id,h=mR(r[f],s);h!==null&&a.push({plugin:c,options:yR(n.config,{plugin:c,local:t[f]},h,l)})}return a}function yR(n,{plugin:e,local:t},r,s){const a=n.pluginScopeKeys(e),l=n.getOptionScopes(r,a);return t&&e.defaults&&l.push(e.defaults),n.createResolver(l,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ih(n,e){const t=Ge.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||t.indexAxis||"x"}function _R(n,e){let t=n;return n==="_index_"?t=e:n==="_value_"&&(t=e==="x"?"y":"x"),t}function bR(n,e){return n===e?"_index_":"_value_"}function Sb(n){if(n==="x"||n==="y"||n==="r")return n}function xR(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function sh(n,...e){if(Sb(n))return n;for(const t of e){const r=t.axis||xR(t.position)||n.length>1&&Sb(n[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function wb(n,e,t){if(t[e+"AxisID"]===n)return{axis:e}}function SR(n,e){if(e.data&&e.data.datasets){const t=e.data.datasets.filter(r=>r.xAxisID===n||r.yAxisID===n);if(t.length)return wb(n,"x",t[0])||wb(n,"y",t[0])}return{}}function wR(n,e){const t=Qr[n.type]||{scales:{}},r=e.scales||{},s=ih(n.type,e),a=Object.create(null);return Object.keys(r).forEach(l=>{const c=r[l];if(!be(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const f=sh(l,c,SR(l,n),Ge.scales[c.type]),h=bR(f,s),p=t.scales||{};a[l]=Ls(Object.create(null),[{axis:f},c,p[f],p[h]])}),n.data.datasets.forEach(l=>{const c=l.type||n.type,f=l.indexAxis||ih(c,e),p=(Qr[c]||{}).scales||{};Object.keys(p).forEach(m=>{const y=_R(m,f),_=l[y+"AxisID"]||y;a[_]=a[_]||Object.create(null),Ls(a[_],[{axis:y},r[_],p[m]])})}),Object.keys(a).forEach(l=>{const c=a[l];Ls(c,[Ge.scales[c.type],Ge.scale])}),a}function LS(n){const e=n.options||(n.options={});e.plugins=ye(e.plugins,{}),e.scales=wR(n,e)}function NS(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function kR(n){return n=n||{},n.data=NS(n.data),LS(n),n}const kb=new Map,jS=new Set;function wa(n,e){let t=kb.get(n);return t||(t=e(),kb.set(n,t),jS.add(t)),t}const Ms=(n,e,t)=>{const r=yr(e,t);r!==void 0&&n.add(r)};class ER{constructor(e){this._config=kR(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=NS(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),LS(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return wa(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return wa(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return wa(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,r=this.type;return wa(`${r}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const r=this._scopeCache;let s=r.get(e);return(!s||t)&&(s=new Map,r.set(e,s)),s}getOptionScopes(e,t,r){const{options:s,type:a}=this,l=this._cachedScopes(e,r),c=l.get(t);if(c)return c;const f=new Set;t.forEach(p=>{e&&(f.add(e),p.forEach(m=>Ms(f,e,m))),p.forEach(m=>Ms(f,s,m)),p.forEach(m=>Ms(f,Qr[a]||{},m)),p.forEach(m=>Ms(f,Ge,m)),p.forEach(m=>Ms(f,nh,m))});const h=Array.from(f);return h.length===0&&h.push(Object.create(null)),jS.has(t)&&l.set(t,h),h}chartOptionScopes(){const{options:e,type:t}=this;return[e,Qr[t]||{},Ge.datasets[t]||{},{type:t},Ge,nh]}resolveNamedOptions(e,t,r,s=[""]){const a={$shared:!0},{resolver:l,subPrefixes:c}=Eb(this._resolverCache,e,s);let f=l;if(PR(l,t)){a.$shared=!1,r=_r(r)?r():r;const h=this.createResolver(e,r,c);f=Ti(l,r,h)}for(const h of t)a[h]=f[h];return a}createResolver(e,t,r=[""],s){const{resolver:a}=Eb(this._resolverCache,e,r);return be(t)?Ti(a,t,void 0,s):a}}function Eb(n,e,t){let r=n.get(e);r||(r=new Map,n.set(e,r));const s=t.join();let a=r.get(s);return a||(a={resolver:Yh(e,t),subPrefixes:t.filter(c=>!c.toLowerCase().includes("hover"))},r.set(s,a)),a}const OR=n=>be(n)&&Object.getOwnPropertyNames(n).some(e=>_r(n[e]));function PR(n,e){const{isScriptable:t,isIndexable:r}=dS(n);for(const s of e){const a=t(s),l=r(s),c=(l||a)&&n[s];if(a&&(_r(c)||OR(c))||l&&$e(c))return!0}return!1}var CR="4.4.2";const MR=["top","bottom","left","right","chartArea"];function Ob(n,e){return n==="top"||n==="bottom"||MR.indexOf(n)===-1&&e==="x"}function Pb(n,e){return function(t,r){return t[n]===r[n]?t[e]-r[e]:t[n]-r[n]}}function Cb(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Ie(t&&t.onComplete,[n],e)}function RR(n){const e=n.chart,t=e.options.animation;Ie(t&&t.onProgress,[n],e)}function FS(n){return Kh()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Aa={},Mb=n=>{const e=FS(n);return Object.values(Aa).filter(t=>t.canvas===e).pop()};function TR(n,e,t){const r=Object.keys(n);for(const s of r){const a=+s;if(a>=e){const l=n[s];delete n[s],(t>0||a>e)&&(n[a+t]=l)}}}function DR(n,e,t,r){return!t||n.type==="mouseout"?null:r?e:n}function ka(n,e,t){return n.options.clip?n[t]:e[t]}function IR(n,e){const{xScale:t,yScale:r}=n;return t&&r?{left:ka(t,e,"left"),right:ka(t,e,"right"),top:ka(r,e,"top"),bottom:ka(r,e,"bottom")}:e}let ll=class{static defaults=Ge;static instances=Aa;static overrides=Qr;static registry=kn;static version=CR;static getChart=Mb;static register(...e){kn.add(...e),Rb()}static unregister(...e){kn.remove(...e),Rb()}constructor(e,t){const r=this.config=new ER(t),s=FS(e),a=Mb(s);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||KM(s)),this.platform.updateConfig(r);const c=this.platform.acquireContext(s,l.aspectRatio),f=c&&c.canvas,h=f&&f.height,p=f&&f.width;if(this.id=DP(),this.ctx=c,this.canvas=f,this.width=p,this.height=h,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new pR,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=GP(m=>this.update(m),l.resizeDelay||0),this._dataChanges=[],Aa[this.id]=this,!c||!f){console.error("Failed to create chart: can't acquire context from the given item");return}zn.listen(this,"complete",Cb),zn.listen(this,"progress",RR),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:r,height:s,_aspectRatio:a}=this;return we(e)?t&&a?a:s?r/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return kn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():X_(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return G_(this.canvas,this.ctx),this}stop(){return zn.stop(this),this}resize(e,t){zn.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const r=this.options,s=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(s,e,t,a),c=r.devicePixelRatio||this.platform.getDevicePixelRatio(),f=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,X_(this,c,!0)&&(this.notifyPlugins("resize",{size:l}),Ie(r.onResize,[this,l],this),this.attached&&this._doResize(f)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};Re(t,(r,s)=>{r.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,r=this.scales,s=Object.keys(r).reduce((l,c)=>(l[c]=!1,l),{});let a=[];t&&(a=a.concat(Object.keys(t).map(l=>{const c=t[l],f=sh(l,c),h=f==="r",p=f==="x";return{options:c,dposition:h?"chartArea":p?"bottom":"left",dtype:h?"radialLinear":p?"category":"linear"}}))),Re(a,l=>{const c=l.options,f=c.id,h=sh(f,c),p=ye(c.type,l.dtype);(c.position===void 0||Ob(c.position,h)!==Ob(l.dposition))&&(c.position=l.dposition),s[f]=!0;let m=null;if(f in r&&r[f].type===p)m=r[f];else{const y=kn.getScale(p);m=new y({id:f,type:p,ctx:this.ctx,chart:this}),r[m.id]=m}m.init(c,e)}),Re(s,(l,c)=>{l||delete r[c]}),Re(r,l=>{xt.configure(this,l,l.options),xt.addBox(this,l)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,r=e.length;if(e.sort((s,a)=>s.index-a.index),r>t){for(let s=t;s<r;++s)this._destroyDatasetMeta(s);e.splice(t,r-t)}this._sortedMetasets=e.slice(0).sort(Pb("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:t}}=this;e.length>t.length&&delete this._stacks,e.forEach((r,s)=>{t.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=t.length;r<s;r++){const a=t[r];let l=this.getDatasetMeta(r);const c=a.type||this.config.type;if(l.type&&l.type!==c&&(this._destroyDatasetMeta(r),l=this.getDatasetMeta(r)),l.type=c,l.indexAxis=a.indexAxis||ih(c,this.options),l.order=a.order||0,l.index=r,l.label=""+a.label,l.visible=this.isDatasetVisible(r),l.controller)l.controller.updateIndex(r),l.controller.linkScales();else{const f=kn.getController(c),{datasetElementType:h,dataElementType:p}=Ge.datasets[c];Object.assign(f,{dataElementType:kn.getElement(p),datasetElementType:h&&kn.getElement(h)}),l.controller=new f(this,r),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){Re(this.data.datasets,(e,t)=>{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const r=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let h=0,p=this.data.datasets.length;h<p;h++){const{controller:m}=this.getDatasetMeta(h),y=!s&&a.indexOf(m)===-1;m.buildOrUpdateElements(y),l=Math.max(+m.getMaxOverflow(),l)}l=this._minPadding=r.layout.autoPadding?l:0,this._updateLayout(l),s||Re(a,h=>{h.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Pb("z","_idx"));const{_active:c,_lastEvent:f}=this;f?this._eventHandler(f,!0):c.length&&this._updateHoverStyles(c,c,!0),this.render()}_updateScales(){Re(this.scales,e=>{xt.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!z_(t,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:a}of t){const l=r==="_removeElements"?-a:a;TR(e,s,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,r=a=>new Set(e.filter(l=>l[0]===a).map((l,c)=>c+","+l.splice(1).join(","))),s=r(0);for(let a=1;a<t;a++)if(!z_(s,r(a)))return;return Array.from(s).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xt.update(this,this.width,this.height,e);const t=this.chartArea,r=t.width<=0||t.height<=0;this._layers=[],Re(this.boxes,s=>{r&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,a)=>{s._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,r=this.data.datasets.length;t<r;++t)this.getDatasetMeta(t).controller.configure();for(let t=0,r=this.data.datasets.length;t<r;++t)this._updateDataset(t,_r(e)?e({datasetIndex:t}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,t){const r=this.getDatasetMeta(e),s={meta:r,index:e,mode:t,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(r.controller._update(t),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(zn.has(this)?this.attached&&!zn.running(this)&&zn.start(this):(this.draw(),Cb({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:s}=this._resizeBeforeDraw;this._resize(r,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const t=this._layers;for(e=0;e<t.length&&t[e].z<=0;++e)t[e].draw(this.chartArea);for(this._drawDatasets();e<t.length;++e)t[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const t=this._sortedMetasets,r=[];let s,a;for(s=0,a=t.length;s<a;++s){const l=t[s];(!e||l.visible)&&r.push(l)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,r=e._clip,s=!r.disabled,a=IR(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(s&&rl(t,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),e.controller.draw(),s&&il(t),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return Un(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,r,s){const a=MM.modes[t];return typeof a=="function"?a(this,e,r,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],r=this._metasets;let s=r.filter(a=>a&&a._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=Sr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!t.hidden}setDatasetVisibility(e,t){const r=this.getDatasetMeta(e);r.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,r){const s=r?"show":"hide",a=this.getDatasetMeta(e),l=a.controller._resolveAnimations(void 0,s);Vs(t)?(a.data[t].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),l.update(a,{visible:r}),this.update(c=>c.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),zn.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:t}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),G_(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete Aa[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,t=this.platform,r=(a,l)=>{t.addEventListener(this,a,l),e[a]=l},s=(a,l,c)=>{a.offsetX=l,a.offsetY=c,this._eventHandler(a)};Re(this.options.events,a=>r(a,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,r=(f,h)=>{t.addEventListener(this,f,h),e[f]=h},s=(f,h)=>{e[f]&&(t.removeEventListener(this,f,h),delete e[f])},a=(f,h)=>{this.canvas&&this.resize(f,h)};let l;const c=()=>{s("attach",c),this.attached=!0,this.resize(),r("resize",a),r("detach",l)};l=()=>{this.attached=!1,s("resize",a),this._stop(),this._resize(0,0),r("attach",c)},t.isAttached(this.canvas)?c():l()}unbindEvents(){Re(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},Re(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,r){const s=r?"set":"remove";let a,l,c,f;for(t==="dataset"&&(a=this.getDatasetMeta(e[0].datasetIndex),a.controller["_"+s+"DatasetHoverStyle"]()),c=0,f=e.length;c<f;++c){l=e[c];const h=l&&this.getDatasetMeta(l.datasetIndex).controller;h&&h[s+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const t=this._active||[],r=e.map(({datasetIndex:a,index:l})=>{const c=this.getDatasetMeta(a);if(!c)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:c.data[l],index:l}});!za(r,t)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,t))}notifyPlugins(e,t,r){return this._plugins.notify(this,e,t,r)}isPluginEnabled(e){return this._plugins._cache.filter(t=>t.plugin.id===e).length===1}_updateHoverStyles(e,t,r){const s=this.options.hover,a=(f,h)=>f.filter(p=>!h.some(m=>p.datasetIndex===m.datasetIndex&&p.index===m.index)),l=a(t,e),c=r?e:a(e,t);l.length&&this.updateHoverStyle(l,s.mode,!1),c.length&&s.mode&&this.updateHoverStyle(c,s.mode,!0)}_eventHandler(e,t){const r={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,s)===!1)return;const a=this._handleEvent(e,t,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(a||r.changed)&&this.render(),this}_handleEvent(e,t,r){const{_active:s=[],options:a}=this,l=t,c=this._getActiveElements(e,s,r,l),f=FP(e),h=DR(e,this._lastEvent,r,f);r&&(this._lastEvent=null,Ie(a.onHover,[e,c,this],this),f&&Ie(a.onClick,[e,c,this],this));const p=!za(c,s);return(p||t)&&(this._active=c,this._updateHoverStyles(c,s,t)),this._lastEvent=h,p}_getActiveElements(e,t,r,s){if(e.type==="mouseout")return[];if(!r)return t;const a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,s)}};function Rb(){return Re(ll.instances,n=>n._plugins.invalidate())}function AR(n,e,t){const{startAngle:r,pixelMargin:s,x:a,y:l,outerRadius:c,innerRadius:f}=e;let h=s/c;n.beginPath(),n.arc(a,l,c,r-h,t+h),f>s?(h=s/f,n.arc(a,l,f,t+h,r-h,!0)):n.arc(a,l,s,t+Ze,r-Ze),n.closePath(),n.clip()}function LR(n){return Hh(n,["outerStart","outerEnd","innerStart","innerEnd"])}function NR(n,e,t,r){const s=LR(n.options.borderRadius),a=(t-e)/2,l=Math.min(a,r*e/2),c=f=>{const h=(t-Math.min(a,f))*r/2;return ft(f,0,Math.min(a,h))};return{outerStart:c(s.outerStart),outerEnd:c(s.outerEnd),innerStart:ft(s.innerStart,0,l),innerEnd:ft(s.innerEnd,0,l)}}function Pi(n,e,t,r){return{x:t+n*Math.cos(e),y:r+n*Math.sin(e)}}function Ua(n,e,t,r,s,a){const{x:l,y:c,startAngle:f,pixelMargin:h,innerRadius:p}=e,m=Math.max(e.outerRadius+r+t-h,0),y=p>0?p+r+t+h:0;let _=0;const b=s-f;if(r){const B=p>0?p-r:0,L=m>0?m-r:0,V=(B+L)/2,j=V!==0?b*V/(V+r):b;_=(b-j)/2}const S=Math.max(.001,b*m-t/ze)/m,k=(b-S)/2,R=f+k+_,w=s-k-_,{outerStart:E,outerEnd:O,innerStart:P,innerEnd:T}=NR(e,y,m,w-R),D=m-E,I=m-O,W=R+E/D,H=w-O/I,Y=y+P,ee=y+T,ne=R+P/Y,G=w-T/ee;if(n.beginPath(),a){const B=(W+H)/2;if(n.arc(l,c,m,W,B),n.arc(l,c,m,B,H),O>0){const U=Pi(I,H,l,c);n.arc(U.x,U.y,O,H,w+Ze)}const L=Pi(ee,w,l,c);if(n.lineTo(L.x,L.y),T>0){const U=Pi(ee,G,l,c);n.arc(U.x,U.y,T,w+Ze,G+Math.PI)}const V=(w-T/y+(R+P/y))/2;if(n.arc(l,c,y,w-T/y,V,!0),n.arc(l,c,y,V,R+P/y,!0),P>0){const U=Pi(Y,ne,l,c);n.arc(U.x,U.y,P,ne+Math.PI,R-Ze)}const j=Pi(D,R,l,c);if(n.lineTo(j.x,j.y),E>0){const U=Pi(D,W,l,c);n.arc(U.x,U.y,E,R-Ze,W)}}else{n.moveTo(l,c);const B=Math.cos(W)*m+l,L=Math.sin(W)*m+c;n.lineTo(B,L);const V=Math.cos(H)*m+l,j=Math.sin(H)*m+c;n.lineTo(V,j)}n.closePath()}function jR(n,e,t,r,s){const{fullCircles:a,startAngle:l,circumference:c}=e;let f=e.endAngle;if(a){Ua(n,e,t,r,f,s);for(let h=0;h<a;++h)n.fill();isNaN(c)||(f=l+(c%Fe||Fe))}return Ua(n,e,t,r,f,s),n.fill(),f}function FR(n,e,t,r,s){const{fullCircles:a,startAngle:l,circumference:c,options:f}=e,{borderWidth:h,borderJoinStyle:p,borderDash:m,borderDashOffset:y}=f,_=f.borderAlign==="inner";if(!h)return;n.setLineDash(m||[]),n.lineDashOffset=y,_?(n.lineWidth=h*2,n.lineJoin=p||"round"):(n.lineWidth=h,n.lineJoin=p||"bevel");let b=e.endAngle;if(a){Ua(n,e,t,r,b,s);for(let S=0;S<a;++S)n.stroke();isNaN(c)||(b=l+(c%Fe||Fe))}_&&AR(n,e,b),a||(Ua(n,e,t,r,b,s),n.stroke())}class zR extends Hn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){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,e&&Object.assign(this,e)}inRange(e,t,r){const s=this.getProps(["x","y"],r),{angle:a,distance:l}=nS(s,{x:e,y:t}),{startAngle:c,endAngle:f,innerRadius:h,outerRadius:p,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),y=(this.options.spacing+this.options.borderWidth)/2,b=ye(m,f-c)>=Fe||Ws(a,c,f),S=Vn(l,h+y,p+y);return b&&S}getCenterPoint(e){const{x:t,y:r,startAngle:s,endAngle:a,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:f,spacing:h}=this.options,p=(s+a)/2,m=(l+c+h+f)/2;return{x:t+Math.cos(p)*m,y:r+Math.sin(p)*m}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:r}=this,s=(t.offset||0)/4,a=(t.spacing||0)/2,l=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=r>Fe?Math.floor(r/Fe):0,r===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*s,Math.sin(c)*s);const f=1-Math.sin(Math.min(ze,r||0)),h=s*f;e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,jR(e,this,h,a,l),FR(e,this,h,a,l),e.restore()}}function zS(n,e,t=e){n.lineCap=ye(t.borderCapStyle,e.borderCapStyle),n.setLineDash(ye(t.borderDash,e.borderDash)),n.lineDashOffset=ye(t.borderDashOffset,e.borderDashOffset),n.lineJoin=ye(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=ye(t.borderWidth,e.borderWidth),n.strokeStyle=ye(t.borderColor,e.borderColor)}function qR(n,e,t){n.lineTo(t.x,t.y)}function BR(n){return n.stepped?oC:n.tension||n.cubicInterpolationMode==="monotone"?aC:qR}function qS(n,e,t={}){const r=n.length,{start:s=0,end:a=r-1}=t,{start:l,end:c}=e,f=Math.max(s,l),h=Math.min(a,c),p=s<l&&a<l||s>c&&a>c;return{count:r,start:f,loop:e.loop,ilen:h<f&&!p?r+h-f:h-f}}function $R(n,e,t,r){const{points:s,options:a}=e,{count:l,start:c,loop:f,ilen:h}=qS(s,t,r),p=BR(a);let{move:m=!0,reverse:y}=r||{},_,b,S;for(_=0;_<=h;++_)b=s[(c+(y?h-_:_))%l],!b.skip&&(m?(n.moveTo(b.x,b.y),m=!1):p(n,S,b,y,a.stepped),S=b);return f&&(b=s[(c+(y?h:0))%l],p(n,S,b,y,a.stepped)),!!f}function VR(n,e,t,r){const s=e.points,{count:a,start:l,ilen:c}=qS(s,t,r),{move:f=!0,reverse:h}=r||{};let p=0,m=0,y,_,b,S,k,R;const w=O=>(l+(h?c-O:O))%a,E=()=>{S!==k&&(n.lineTo(p,k),n.lineTo(p,S),n.lineTo(p,R))};for(f&&(_=s[w(0)],n.moveTo(_.x,_.y)),y=0;y<=c;++y){if(_=s[w(y)],_.skip)continue;const O=_.x,P=_.y,T=O|0;T===b?(P<S?S=P:P>k&&(k=P),p=(m*p+O)/++m):(E(),n.lineTo(O,P),b=T,m=0,S=k=P),R=P}E()}function oh(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?VR:$R}function WR(n){return n.stepped?zC:n.tension||n.cubicInterpolationMode==="monotone"?qC:Vr}function UR(n,e,t,r){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,r)&&s.closePath()),zS(n,e.options),n.stroke(s)}function HR(n,e,t,r){const{segments:s,options:a}=e,l=oh(e);for(const c of s)zS(n,a,c.style),n.beginPath(),l(n,e,c,{start:t,end:t+r-1})&&n.closePath(),n.stroke()}const YR=typeof Path2D=="function";function GR(n,e,t,r){YR&&!e.options.segment?UR(n,e,t,r):HR(n,e,t,r)}class ul extends Hn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,t){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const s=r.spanGaps?this._loop:this._fullLoop;TC(this._points,r,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=HC(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,r=e.length;return r&&t[e[r-1].end]}interpolate(e,t){const r=this.options,s=e[t],a=this.points,l=SS(this,{property:t,start:s,end:s});if(!l.length)return;const c=[],f=WR(r);let h,p;for(h=0,p=l.length;h<p;++h){const{start:m,end:y}=l[h],_=a[m],b=a[y];if(_===b){c.push(_);continue}const S=Math.abs((s-_[t])/(b[t]-_[t])),k=f(_,b,S,r.stepped);k[t]=e[t],c.push(k)}return c.length===1?c[0]:c}pathSegment(e,t,r){return oh(this)(e,this,t,r)}path(e,t,r){const s=this.segments,a=oh(this);let l=this._loop;t=t||0,r=r||this.points.length-t;for(const c of s)l&=a(e,this,c,{start:t,end:t+r-1});return!!l}draw(e,t,r,s){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),GR(e,this,r,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Tb(n,e,t,r){const s=n.options,{[t]:a}=n.getProps([t],r);return Math.abs(e-a)<s.radius+s.hitRadius}class QR extends Hn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,t,r){const s=this.options,{x:a,y:l}=this.getProps(["x","y"],r);return Math.pow(e-a,2)+Math.pow(t-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,t){return Tb(this,e,"x",t)}inYRange(e,t){return Tb(this,e,"y",t)}getCenterPoint(e){const{x:t,y:r}=this.getProps(["x","y"],e);return{x:t,y:r}}size(e){e=e||this.options||{};let t=e.radius||0;t=Math.max(t,t&&e.hoverRadius||0);const r=t&&e.borderWidth||0;return(t+r)*2}draw(e,t){const r=this.options;this.skip||r.radius<.1||!Un(this,t,this.size(r)/2)||(e.strokeStyle=r.borderColor,e.lineWidth=r.borderWidth,e.fillStyle=r.backgroundColor,rh(e,r,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function BS(n,e){const{x:t,y:r,base:s,width:a,height:l}=n.getProps(["x","y","base","width","height"],e);let c,f,h,p,m;return n.horizontal?(m=l/2,c=Math.min(t,s),f=Math.max(t,s),h=r-m,p=r+m):(m=a/2,c=t-m,f=t+m,h=Math.min(r,s),p=Math.max(r,s)),{left:c,top:h,right:f,bottom:p}}function gr(n,e,t,r){return n?0:ft(e,t,r)}function KR(n,e,t){const r=n.options.borderWidth,s=n.borderSkipped,a=fS(r);return{t:gr(s.top,a.top,0,t),r:gr(s.right,a.right,0,e),b:gr(s.bottom,a.bottom,0,t),l:gr(s.left,a.left,0,e)}}function XR(n,e,t){const{enableBorderRadius:r}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,a=Hr(s),l=Math.min(e,t),c=n.borderSkipped,f=r||be(s);return{topLeft:gr(!f||c.top||c.left,a.topLeft,0,l),topRight:gr(!f||c.top||c.right,a.topRight,0,l),bottomLeft:gr(!f||c.bottom||c.left,a.bottomLeft,0,l),bottomRight:gr(!f||c.bottom||c.right,a.bottomRight,0,l)}}function JR(n){const e=BS(n),t=e.right-e.left,r=e.bottom-e.top,s=KR(n,t/2,r/2),a=XR(n,t/2,r/2);return{outer:{x:e.left,y:e.top,w:t,h:r,radius:a},inner:{x:e.left+s.l,y:e.top+s.t,w:t-s.l-s.r,h:r-s.t-s.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,a.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(s.b,s.r))}}}}function Hd(n,e,t,r){const s=e===null,a=t===null,c=n&&!(s&&a)&&BS(n,r);return c&&(s||Vn(e,c.left,c.right))&&(a||Vn(t,c.top,c.bottom))}function ZR(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function eT(n,e){n.rect(e.x,e.y,e.w,e.h)}function Yd(n,e,t={}){const r=n.x!==t.x?-e:0,s=n.y!==t.y?-e:0,a=(n.x+n.w!==t.x+t.w?e:0)-r,l=(n.y+n.h!==t.y+t.h?e:0)-s;return{x:n.x+r,y:n.y+s,w:n.w+a,h:n.h+l,radius:n.radius}}class tT extends Hn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:t,options:{borderColor:r,backgroundColor:s}}=this,{inner:a,outer:l}=JR(this),c=ZR(l.radius)?Us:eT;e.save(),(l.w!==a.w||l.h!==a.h)&&(e.beginPath(),c(e,Yd(l,t,a)),e.clip(),c(e,Yd(a,-t,l)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),c(e,Yd(a,t)),e.fillStyle=s,e.fill(),e.restore()}inRange(e,t,r){return Hd(this,e,t,r)}inXRange(e,t){return Hd(this,e,null,t)}inYRange(e,t){return Hd(this,null,e,t)}getCenterPoint(e){const{x:t,y:r,base:s,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(t+s)/2:t,y:a?r:(r+s)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}var nT=Object.freeze({__proto__:null,ArcElement:zR,BarElement:tT,LineElement:ul,PointElement:QR});const ah=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Db=ah.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function $S(n){return ah[n%ah.length]}function VS(n){return Db[n%Db.length]}function rT(n,e){return n.borderColor=$S(e),n.backgroundColor=VS(e),++e}function iT(n,e){return n.backgroundColor=n.data.map(()=>$S(e++)),e}function sT(n,e){return n.backgroundColor=n.data.map(()=>VS(e++)),e}function oT(n){let e=0;return(t,r)=>{const s=n.getDatasetMeta(r).controller;s instanceof ol?e=iT(t,e):s instanceof CS?e=sT(t,e):s&&(e=rT(t,e))}}function Ib(n){let e;for(e in n)if(n[e].borderColor||n[e].backgroundColor)return!0;return!1}function aT(n){return n&&(n.borderColor||n.backgroundColor)}var lT={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,e,t){if(!t.enabled)return;const{data:{datasets:r},options:s}=n.config,{elements:a}=s;if(!t.forceOverride&&(Ib(r)||aT(s)||a&&Ib(a)))return;const l=oT(n);r.forEach(l)}};function uT(n,e,t,r,s){const a=s.samples||r;if(a>=t)return n.slice(e,e+t);const l=[],c=(t-2)/(a-2);let f=0;const h=e+t-1;let p=e,m,y,_,b,S;for(l[f++]=n[p],m=0;m<a-2;m++){let k=0,R=0,w;const E=Math.floor((m+1)*c)+1+e,O=Math.min(Math.floor((m+2)*c)+1,t)+e,P=O-E;for(w=E;w<O;w++)k+=n[w].x,R+=n[w].y;k/=P,R/=P;const T=Math.floor(m*c)+1+e,D=Math.min(Math.floor((m+1)*c)+1,t)+e,{x:I,y:W}=n[p];for(_=b=-1,w=T;w<D;w++)b=.5*Math.abs((I-k)*(n[w].y-W)-(I-n[w].x)*(R-W)),b>_&&(_=b,y=n[w],S=w);l[f++]=y,p=S}return l[f++]=n[h],l}function cT(n,e,t,r){let s=0,a=0,l,c,f,h,p,m,y,_,b,S;const k=[],R=e+t-1,w=n[e].x,O=n[R].x-w;for(l=e;l<e+t;++l){c=n[l],f=(c.x-w)/O*r,h=c.y;const P=f|0;if(P===p)h<b?(b=h,m=l):h>S&&(S=h,y=l),s=(a*s+c.x)/++a;else{const T=l-1;if(!we(m)&&!we(y)){const D=Math.min(m,y),I=Math.max(m,y);D!==_&&D!==T&&k.push({...n[D],x:s}),I!==_&&I!==T&&k.push({...n[I],x:s})}l>0&&T!==_&&k.push(n[T]),k.push(c),p=P,a=0,b=S=h,m=y=_=l}}return k}function WS(n){if(n._decimated){const e=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Ab(n){n.data.datasets.forEach(e=>{WS(e)})}function fT(n,e){const t=e.length;let r=0,s;const{iScale:a}=n,{min:l,max:c,minDefined:f,maxDefined:h}=a.getUserBounds();return f&&(r=ft(Wn(e,a.axis,l).lo,0,t-1)),h?s=ft(Wn(e,a.axis,c).hi+1,r,t)-r:s=t-r,{start:r,count:s}}var dT={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,e,t)=>{if(!t.enabled){Ab(n);return}const r=n.width;n.data.datasets.forEach((s,a)=>{const{_data:l,indexAxis:c}=s,f=n.getDatasetMeta(a),h=l||s.data;if(Ds([c,n.options.indexAxis])==="y"||!f.controller.supportsDecimation)return;const p=n.scales[f.xAxisID];if(p.type!=="linear"&&p.type!=="time"||n.options.parsing)return;let{start:m,count:y}=fT(f,h);const _=t.threshold||4*r;if(y<=_){WS(s);return}we(l)&&(s._data=h,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(S){this._data=S}}));let b;switch(t.algorithm){case"lttb":b=uT(h,m,y,r,t);break;case"min-max":b=cT(h,m,y,r);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}s._decimated=b})},destroy(n){Ab(n)}};function hT(n,e,t){const r=n.segments,s=n.points,a=e.points,l=[];for(const c of r){let{start:f,end:h}=c;h=Zh(f,h,s);const p=lh(t,s[f],s[h],c.loop);if(!e.segments){l.push({source:c,target:p,start:s[f],end:s[h]});continue}const m=SS(e,p);for(const y of m){const _=lh(t,a[y.start],a[y.end],y.loop),b=xS(c,s,_);for(const S of b)l.push({source:S,target:y,start:{[t]:Lb(p,_,"start",Math.max)},end:{[t]:Lb(p,_,"end",Math.min)}})}}return l}function lh(n,e,t,r){if(r)return;let s=e[n],a=t[n];return n==="angle"&&(s=Wt(s),a=Wt(a)),{property:n,start:s,end:a}}function pT(n,e){const{x:t=null,y:r=null}=n||{},s=e.points,a=[];return e.segments.forEach(({start:l,end:c})=>{c=Zh(l,c,s);const f=s[l],h=s[c];r!==null?(a.push({x:f.x,y:r}),a.push({x:h.x,y:r})):t!==null&&(a.push({x:t,y:f.y}),a.push({x:t,y:h.y}))}),a}function Zh(n,e,t){for(;e>n;e--){const r=t[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function Lb(n,e,t,r){return n&&e?r(n[t],e[t]):n?n[t]:e?e[t]:0}function US(n,e){let t=[],r=!1;return $e(n)?(r=!0,t=n):t=pT(n,e),t.length?new ul({points:t,options:{tension:0},_loop:r,_fullLoop:r}):null}function Nb(n){return n&&n.fill!==!1}function gT(n,e,t){let s=n[e].fill;const a=[e];let l;if(!t)return s;for(;s!==!1&&a.indexOf(s)===-1;){if(!Ye(s))return s;if(l=n[s],!l)return!1;if(l.visible)return s;a.push(s),s=l.fill}return!1}function mT(n,e,t){const r=bT(n);if(be(r))return isNaN(r.value)?!1:r;let s=parseFloat(r);return Ye(s)&&Math.floor(s)===s?vT(r[0],e,s,t):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function vT(n,e,t,r){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=r?!1:t}function yT(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:be(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function _T(n,e,t){let r;return n==="start"?r=t:n==="end"?r=e.options.reverse?e.min:e.max:be(n)?r=n.value:r=e.getBaseValue(),r}function bT(n){const e=n.options,t=e.fill;let r=ye(t&&t.target,t);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function xT(n){const{scale:e,index:t,line:r}=n,s=[],a=r.segments,l=r.points,c=ST(e,t);c.push(US({x:null,y:e.bottom},r));for(let f=0;f<a.length;f++){const h=a[f];for(let p=h.start;p<=h.end;p++)wT(s,l[p],c)}return new ul({points:s,options:{}})}function ST(n,e){const t=[],r=n.getMatchingVisibleMetas("line");for(let s=0;s<r.length;s++){const a=r[s];if(a.index===e)break;a.hidden||t.unshift(a.dataset)}return t}function wT(n,e,t){const r=[];for(let s=0;s<t.length;s++){const a=t[s],{first:l,last:c,point:f}=kT(a,e,"x");if(!(!f||l&&c)){if(l)r.unshift(f);else if(n.push(f),!c)break}}n.push(...r)}function kT(n,e,t){const r=n.interpolate(e,t);if(!r)return{};const s=r[t],a=n.segments,l=n.points;let c=!1,f=!1;for(let h=0;h<a.length;h++){const p=a[h],m=l[p.start][t],y=l[p.end][t];if(Vn(s,m,y)){c=s===m,f=s===y;break}}return{first:c,last:f,point:r}}class HS{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,t,r){const{x:s,y:a,radius:l}=this;return t=t||{start:0,end:Fe},e.arc(s,a,l,t.end,t.start,!0),!r.bounds}interpolate(e){const{x:t,y:r,radius:s}=this,a=e.angle;return{x:t+Math.cos(a)*s,y:r+Math.sin(a)*s,angle:a}}}function ET(n){const{chart:e,fill:t,line:r}=n;if(Ye(t))return OT(e,t);if(t==="stack")return xT(n);if(t==="shape")return!0;const s=PT(n);return s instanceof HS?s:US(s,r)}function OT(n,e){const t=n.getDatasetMeta(e);return t&&n.isDatasetVisible(e)?t.dataset:null}function PT(n){return(n.scale||{}).getPointPositionForValue?MT(n):CT(n)}function CT(n){const{scale:e={},fill:t}=n,r=yT(t,e);if(Ye(r)){const s=e.isHorizontal();return{x:s?r:null,y:s?null:r}}return null}function MT(n){const{scale:e,fill:t}=n,r=e.options,s=e.getLabels().length,a=r.reverse?e.max:e.min,l=_T(t,e,a),c=[];if(r.grid.circular){const f=e.getPointPositionForValue(0,a);return new HS({x:f.x,y:f.y,radius:e.getDistanceFromCenterForValue(l)})}for(let f=0;f<s;++f)c.push(e.getPointPositionForValue(f,l));return c}function Gd(n,e,t){const r=ET(e),{line:s,scale:a,axis:l}=e,c=s.options,f=c.fill,h=c.backgroundColor,{above:p=h,below:m=h}=f||{};r&&s.points.length&&(rl(n,t),RT(n,{line:s,target:r,above:p,below:m,area:t,scale:a,axis:l}),il(n))}function RT(n,e){const{line:t,target:r,above:s,below:a,area:l,scale:c}=e,f=t._loop?"angle":e.axis;n.save(),f==="x"&&a!==s&&(jb(n,r,l.top),Fb(n,{line:t,target:r,color:s,scale:c,property:f}),n.restore(),n.save(),jb(n,r,l.bottom)),Fb(n,{line:t,target:r,color:a,scale:c,property:f}),n.restore()}function jb(n,e,t){const{segments:r,points:s}=e;let a=!0,l=!1;n.beginPath();for(const c of r){const{start:f,end:h}=c,p=s[f],m=s[Zh(f,h,s)];a?(n.moveTo(p.x,p.y),a=!1):(n.lineTo(p.x,t),n.lineTo(p.x,p.y)),l=!!e.pathSegment(n,c,{move:l}),l?n.closePath():n.lineTo(m.x,t)}n.lineTo(e.first().x,t),n.closePath(),n.clip()}function Fb(n,e){const{line:t,target:r,property:s,color:a,scale:l}=e,c=hT(t,r,s);for(const{source:f,target:h,start:p,end:m}of c){const{style:{backgroundColor:y=a}={}}=f,_=r!==!0;n.save(),n.fillStyle=y,TT(n,l,_&&lh(s,p,m)),n.beginPath();const b=!!t.pathSegment(n,f);let S;if(_){b?n.closePath():zb(n,r,m,s);const k=!!r.pathSegment(n,h,{move:b,reverse:!0});S=b&&k,S||zb(n,r,p,s)}n.closePath(),n.fill(S?"evenodd":"nonzero"),n.restore()}}function TT(n,e,t){const{top:r,bottom:s}=e.chart.chartArea,{property:a,start:l,end:c}=t||{};a==="x"&&(n.beginPath(),n.rect(l,r,c-l,s-r),n.clip())}function zb(n,e,t,r){const s=e.interpolate(t,r);s&&n.lineTo(s.x,s.y)}var DT={id:"filler",afterDatasetsUpdate(n,e,t){const r=(n.data.datasets||[]).length,s=[];let a,l,c,f;for(l=0;l<r;++l)a=n.getDatasetMeta(l),c=a.dataset,f=null,c&&c.options&&c instanceof ul&&(f={visible:n.isDatasetVisible(l),index:l,fill:mT(c,l,r),chart:n,axis:a.controller.options.indexAxis,scale:a.vScale,line:c}),a.$filler=f,s.push(f);for(l=0;l<r;++l)f=s[l],!(!f||f.fill===!1)&&(f.fill=gT(s,l,t.propagate))},beforeDraw(n,e,t){const r=t.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),a=n.chartArea;for(let l=s.length-1;l>=0;--l){const c=s[l].$filler;c&&(c.line.updateControlPoints(a,c.axis),r&&c.fill&&Gd(n.ctx,c,a))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const r=n.getSortedVisibleDatasetMetas();for(let s=r.length-1;s>=0;--s){const a=r[s].$filler;Nb(a)&&Gd(n.ctx,a,n.chartArea)}},beforeDatasetDraw(n,e,t){const r=e.meta.$filler;!Nb(r)||t.drawTime!=="beforeDatasetDraw"||Gd(n.ctx,r,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const qb=(n,e)=>{let{boxHeight:t=e,boxWidth:r=e}=n;return n.usePointStyle&&(t=Math.min(t,e),r=n.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:t,itemHeight:Math.max(e,t)}},IT=(n,e)=>n!==null&&e!==null&&n.datasetIndex===e.datasetIndex&&n.index===e.index;class Bb extends Hn{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,t,r){this.maxWidth=e,this.maxHeight=t,this._margins=r,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 e=this.options.labels||{};let t=Ie(e.generateLabels,[this.chart],this)||[];e.filter&&(t=t.filter(r=>e.filter(r,this.chart.data))),e.sort&&(t=t.sort((r,s)=>e.sort(r,s,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:e,ctx:t}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,s=it(r.font),a=s.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:f}=qb(r,a);let h,p;t.font=s.string,this.isHorizontal()?(h=this.maxWidth,p=this._fitRows(l,a,c,f)+10):(p=this.maxHeight,h=this._fitCols(l,s,c,f)+10),this.width=Math.min(h,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,t,r,s){const{ctx:a,maxWidth:l,options:{labels:{padding:c}}}=this,f=this.legendHitBoxes=[],h=this.lineWidths=[0],p=s+c;let m=e;a.textAlign="left",a.textBaseline="middle";let y=-1,_=-p;return this.legendItems.forEach((b,S)=>{const k=r+t/2+a.measureText(b.text).width;(S===0||h[h.length-1]+k+2*c>l)&&(m+=p,h[h.length-(S>0?0:1)]=0,_+=p,y++),f[S]={left:0,top:_,row:y,width:k,height:s},h[h.length-1]+=k+c}),m}_fitCols(e,t,r,s){const{ctx:a,maxHeight:l,options:{labels:{padding:c}}}=this,f=this.legendHitBoxes=[],h=this.columnSizes=[],p=l-e;let m=c,y=0,_=0,b=0,S=0;return this.legendItems.forEach((k,R)=>{const{itemWidth:w,itemHeight:E}=AT(r,t,a,k,s);R>0&&_+E+2*c>p&&(m+=y+c,h.push({width:y,height:_}),b+=y+c,S++,y=_=0),f[R]={left:b,top:_,col:S,width:w,height:E},y=Math.max(y,w),_+=E+c}),m+=y,h.push({width:y,height:_}),m}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:r,labels:{padding:s},rtl:a}}=this,l=Ci(a,this.left,this.width);if(this.isHorizontal()){let c=0,f=bt(r,this.left+s,this.right-this.lineWidths[c]);for(const h of t)c!==h.row&&(c=h.row,f=bt(r,this.left+s,this.right-this.lineWidths[c])),h.top+=this.top+e+s,h.left=l.leftForLtr(l.x(f),h.width),f+=h.width+s}else{let c=0,f=bt(r,this.top+e+s,this.bottom-this.columnSizes[c].height);for(const h of t)h.col!==c&&(c=h.col,f=bt(r,this.top+e+s,this.bottom-this.columnSizes[c].height)),h.top=f,h.left+=this.left+s,h.left=l.leftForLtr(l.x(h.left),h.width),f+=h.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;rl(e,this),this._draw(),il(e)}}_draw(){const{options:e,columnSizes:t,lineWidths:r,ctx:s}=this,{align:a,labels:l}=e,c=Ge.color,f=Ci(e.rtl,this.left,this.width),h=it(l.font),{padding:p}=l,m=h.size,y=m/2;let _;this.drawTitle(),s.textAlign=f.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=h.string;const{boxWidth:b,boxHeight:S,itemHeight:k}=qb(l,m),R=function(T,D,I){if(isNaN(b)||b<=0||isNaN(S)||S<0)return;s.save();const W=ye(I.lineWidth,1);if(s.fillStyle=ye(I.fillStyle,c),s.lineCap=ye(I.lineCap,"butt"),s.lineDashOffset=ye(I.lineDashOffset,0),s.lineJoin=ye(I.lineJoin,"miter"),s.lineWidth=W,s.strokeStyle=ye(I.strokeStyle,c),s.setLineDash(ye(I.lineDash,[])),l.usePointStyle){const H={radius:S*Math.SQRT2/2,pointStyle:I.pointStyle,rotation:I.rotation,borderWidth:W},Y=f.xPlus(T,b/2),ee=D+y;cS(s,H,Y,ee,l.pointStyleWidth&&b)}else{const H=D+Math.max((m-S)/2,0),Y=f.leftForLtr(T,b),ee=Hr(I.borderRadius);s.beginPath(),Object.values(ee).some(ne=>ne!==0)?Us(s,{x:Y,y:H,w:b,h:S,radius:ee}):s.rect(Y,H,b,S),s.fill(),W!==0&&s.stroke()}s.restore()},w=function(T,D,I){Kr(s,I.text,T,D+k/2,h,{strikethrough:I.hidden,textAlign:f.textAlign(I.textAlign)})},E=this.isHorizontal(),O=this._computeTitleHeight();E?_={x:bt(a,this.left+p,this.right-r[0]),y:this.top+p+O,line:0}:_={x:this.left+p,y:bt(a,this.top+O+p,this.bottom-t[0].height),line:0},yS(this.ctx,e.textDirection);const P=k+p;this.legendItems.forEach((T,D)=>{s.strokeStyle=T.fontColor,s.fillStyle=T.fontColor;const I=s.measureText(T.text).width,W=f.textAlign(T.textAlign||(T.textAlign=l.textAlign)),H=b+y+I;let Y=_.x,ee=_.y;f.setWidth(this.width),E?D>0&&Y+H+p>this.right&&(ee=_.y+=P,_.line++,Y=_.x=bt(a,this.left+p,this.right-r[_.line])):D>0&&ee+P>this.bottom&&(Y=_.x=Y+t[_.line].width+p,_.line++,ee=_.y=bt(a,this.top+O+p,this.bottom-t[_.line].height));const ne=f.x(Y);if(R(ne,ee,T),Y=QP(W,Y+b+y,E?Y+H:this.right,e.rtl),w(f.x(Y),ee,T),E)_.x+=H+p;else if(typeof T.text!="string"){const G=h.lineHeight;_.y+=YS(T,G)+p}else _.y+=P}),_S(this.ctx,e.textDirection)}drawTitle(){const e=this.options,t=e.title,r=it(t.font),s=St(t.padding);if(!t.display)return;const a=Ci(e.rtl,this.left,this.width),l=this.ctx,c=t.position,f=r.size/2,h=s.top+f;let p,m=this.left,y=this.width;if(this.isHorizontal())y=Math.max(...this.lineWidths),p=this.top+h,m=bt(e.align,m,this.right-y);else{const b=this.columnSizes.reduce((S,k)=>Math.max(S,k.height),0);p=h+bt(e.align,this.top,this.bottom-b-e.labels.padding-this._computeTitleHeight())}const _=bt(c,m,m+y);l.textAlign=a.textAlign(Wh(c)),l.textBaseline="middle",l.strokeStyle=t.color,l.fillStyle=t.color,l.font=r.string,Kr(l,t.text,_,p,r)}_computeTitleHeight(){const e=this.options.title,t=it(e.font),r=St(e.padding);return e.display?t.lineHeight+r.height:0}_getLegendItemAt(e,t){let r,s,a;if(Vn(e,this.left,this.right)&&Vn(t,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(s=a[r],Vn(e,s.left,s.left+s.width)&&Vn(t,s.top,s.top+s.height))return this.legendItems[r]}return null}handleEvent(e){const t=this.options;if(!jT(e.type,t))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,a=IT(s,r);s&&!a&&Ie(t.onLeave,[e,s,this],this),this._hoveredItem=r,r&&!a&&Ie(t.onHover,[e,r,this],this)}else r&&Ie(t.onClick,[e,r,this],this)}}function AT(n,e,t,r,s){const a=LT(r,n,e,t),l=NT(s,r,e.lineHeight);return{itemWidth:a,itemHeight:l}}function LT(n,e,t,r){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((a,l)=>a.length>l.length?a:l)),e+t.size/2+r.measureText(s).width}function NT(n,e,t){let r=n;return typeof e.text!="string"&&(r=YS(e,t)),r}function YS(n,e){const t=n.text?n.text.length:0;return e*t}function jT(n,e){return!!((n==="mousemove"||n==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(n==="click"||n==="mouseup"))}var FT={id:"legend",_element:Bb,start(n,e,t){const r=n.legend=new Bb({ctx:n.ctx,options:t,chart:n});xt.configure(n,r,t),xt.addBox(n,r)},stop(n){xt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,e,t){const r=n.legend;xt.configure(n,r,t),r.options=t},afterUpdate(n){const e=n.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(n,e){e.replay||n.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,e,t){const r=e.datasetIndex,s=t.chart;s.isDatasetVisible(r)?(s.hide(r),e.hidden=!0):(s.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const e=n.data.datasets,{labels:{usePointStyle:t,pointStyle:r,textAlign:s,color:a,useBorderRadius:l,borderRadius:c}}=n.legend.options;return n._getSortedDatasetMetas().map(f=>{const h=f.controller.getStyle(t?0:void 0),p=St(h.borderWidth);return{text:e[f.index].label,fillStyle:h.backgroundColor,fontColor:a,hidden:!f.visible,lineCap:h.borderCapStyle,lineDash:h.borderDash,lineDashOffset:h.borderDashOffset,lineJoin:h.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:h.borderColor,pointStyle:r||h.pointStyle,rotation:h.rotation,textAlign:s||h.textAlign,borderRadius:l&&(c||h.borderRadius),datasetIndex:f.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 ep extends Hn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,t){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=t;const s=$e(r.text)?r.text.length:1;this._padding=St(r.padding);const a=s*it(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:t,left:r,bottom:s,right:a,options:l}=this,c=l.align;let f=0,h,p,m;return this.isHorizontal()?(p=bt(c,r,a),m=t+e,h=a-r):(l.position==="left"?(p=r+e,m=bt(c,s,t),f=ze*-.5):(p=a-e,m=bt(c,t,s),f=ze*.5),h=s-t),{titleX:p,titleY:m,maxWidth:h,rotation:f}}draw(){const e=this.ctx,t=this.options;if(!t.display)return;const r=it(t.font),a=r.lineHeight/2+this._padding.top,{titleX:l,titleY:c,maxWidth:f,rotation:h}=this._drawArgs(a);Kr(e,t.text,0,0,r,{color:t.color,maxWidth:f,rotation:h,textAlign:Wh(t.align),textBaseline:"middle",translation:[l,c]})}}function zT(n,e){const t=new ep({ctx:n.ctx,options:e,chart:n});xt.configure(n,t,e),xt.addBox(n,t),n.titleBlock=t}var qT={id:"title",_element:ep,start(n,e,t){zT(n,t)},stop(n){const e=n.titleBlock;xt.removeBox(n,e),delete n.titleBlock},beforeUpdate(n,e,t){const r=n.titleBlock;xt.configure(n,r,t),r.options=t},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 Ea=new WeakMap;var BT={id:"subtitle",start(n,e,t){const r=new ep({ctx:n.ctx,options:t,chart:n});xt.configure(n,r,t),xt.addBox(n,r),Ea.set(n,r)},stop(n){xt.removeBox(n,Ea.get(n)),Ea.delete(n)},beforeUpdate(n,e,t){const r=Ea.get(n);xt.configure(n,r,t),r.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const As={average(n){if(!n.length)return!1;let e,t,r=new Set,s=0,a=0;for(e=0,t=n.length;e<t;++e){const c=n[e].element;if(c&&c.hasValue()){const f=c.tooltipPosition();r.add(f.x),s+=f.y,++a}}return{x:[...r].reduce((c,f)=>c+f)/r.size,y:s/a}},nearest(n,e){if(!n.length)return!1;let t=e.x,r=e.y,s=Number.POSITIVE_INFINITY,a,l,c;for(a=0,l=n.length;a<l;++a){const f=n[a].element;if(f&&f.hasValue()){const h=f.getCenterPoint(),p=th(e,h);p<s&&(s=p,c=f)}}if(c){const f=c.tooltipPosition();t=f.x,r=f.y}return{x:t,y:r}}};function wn(n,e){return e&&($e(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function qn(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
|
|
11
|
+
`)>-1?n.split(`
|
|
12
|
+
`):n}function $T(n,e){const{element:t,datasetIndex:r,index:s}=e,a=n.getDatasetMeta(r).controller,{label:l,value:c}=a.getLabelAndValue(s);return{chart:n,label:l,parsed:a.getParsed(s),raw:n.data.datasets[r].data[s],formattedValue:c,dataset:a.getDataset(),dataIndex:s,datasetIndex:r,element:t}}function $b(n,e){const t=n.chart.ctx,{body:r,footer:s,title:a}=n,{boxWidth:l,boxHeight:c}=e,f=it(e.bodyFont),h=it(e.titleFont),p=it(e.footerFont),m=a.length,y=s.length,_=r.length,b=St(e.padding);let S=b.height,k=0,R=r.reduce((O,P)=>O+P.before.length+P.lines.length+P.after.length,0);if(R+=n.beforeBody.length+n.afterBody.length,m&&(S+=m*h.lineHeight+(m-1)*e.titleSpacing+e.titleMarginBottom),R){const O=e.displayColors?Math.max(c,f.lineHeight):f.lineHeight;S+=_*O+(R-_)*f.lineHeight+(R-1)*e.bodySpacing}y&&(S+=e.footerMarginTop+y*p.lineHeight+(y-1)*e.footerSpacing);let w=0;const E=function(O){k=Math.max(k,t.measureText(O).width+w)};return t.save(),t.font=h.string,Re(n.title,E),t.font=f.string,Re(n.beforeBody.concat(n.afterBody),E),w=e.displayColors?l+2+e.boxPadding:0,Re(r,O=>{Re(O.before,E),Re(O.lines,E),Re(O.after,E)}),w=0,t.font=p.string,Re(n.footer,E),t.restore(),k+=b.width,{width:k,height:S}}function VT(n,e){const{y:t,height:r}=e;return t<r/2?"top":t>n.height-r/2?"bottom":"center"}function WT(n,e,t,r){const{x:s,width:a}=r,l=t.caretSize+t.caretPadding;if(n==="left"&&s+a+l>e.width||n==="right"&&s-a-l<0)return!0}function UT(n,e,t,r){const{x:s,width:a}=t,{width:l,chartArea:{left:c,right:f}}=n;let h="center";return r==="center"?h=s<=(c+f)/2?"left":"right":s<=a/2?h="left":s>=l-a/2&&(h="right"),WT(h,n,e,t)&&(h="center"),h}function Vb(n,e,t){const r=t.yAlign||e.yAlign||VT(n,t);return{xAlign:t.xAlign||e.xAlign||UT(n,e,t,r),yAlign:r}}function HT(n,e){let{x:t,width:r}=n;return e==="right"?t-=r:e==="center"&&(t-=r/2),t}function YT(n,e,t){let{y:r,height:s}=n;return e==="top"?r+=t:e==="bottom"?r-=s+t:r-=s/2,r}function Wb(n,e,t,r){const{caretSize:s,caretPadding:a,cornerRadius:l}=n,{xAlign:c,yAlign:f}=t,h=s+a,{topLeft:p,topRight:m,bottomLeft:y,bottomRight:_}=Hr(l);let b=HT(e,c);const S=YT(e,f,h);return f==="center"?c==="left"?b+=h:c==="right"&&(b-=h):c==="left"?b-=Math.max(p,y)+s:c==="right"&&(b+=Math.max(m,_)+s),{x:ft(b,0,r.width-e.width),y:ft(S,0,r.height-e.height)}}function Oa(n,e,t){const r=St(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-r.right:n.x+r.left}function Ub(n){return wn([],qn(n))}function GT(n,e,t){return Sr(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function Hb(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}const GS={beforeTitle:Fn,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,r=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return t[e.dataIndex]}return""},afterTitle:Fn,beforeBody:Fn,beforeLabel:Fn,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const t=n.formattedValue;return we(t)||(e+=t),e},labelColor(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const t=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:Fn,afterBody:Fn,beforeFooter:Fn,footer:Fn,afterFooter:Fn};function It(n,e,t,r){const s=n[e].call(t,r);return typeof s>"u"?GS[e].call(t,r):s}class Yb extends Hn{static positioners=As;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&t.options.animation&&r.animations,a=new wS(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=GT(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:r}=t,s=It(r,"beforeTitle",this,e),a=It(r,"title",this,e),l=It(r,"afterTitle",this,e);let c=[];return c=wn(c,qn(s)),c=wn(c,qn(a)),c=wn(c,qn(l)),c}getBeforeBody(e,t){return Ub(It(t.callbacks,"beforeBody",this,e))}getBody(e,t){const{callbacks:r}=t,s=[];return Re(e,a=>{const l={before:[],lines:[],after:[]},c=Hb(r,a);wn(l.before,qn(It(c,"beforeLabel",this,a))),wn(l.lines,It(c,"label",this,a)),wn(l.after,qn(It(c,"afterLabel",this,a))),s.push(l)}),s}getAfterBody(e,t){return Ub(It(t.callbacks,"afterBody",this,e))}getFooter(e,t){const{callbacks:r}=t,s=It(r,"beforeFooter",this,e),a=It(r,"footer",this,e),l=It(r,"afterFooter",this,e);let c=[];return c=wn(c,qn(s)),c=wn(c,qn(a)),c=wn(c,qn(l)),c}_createItems(e){const t=this._active,r=this.chart.data,s=[],a=[],l=[];let c=[],f,h;for(f=0,h=t.length;f<h;++f)c.push($T(this.chart,t[f]));return e.filter&&(c=c.filter((p,m,y)=>e.filter(p,m,y,r))),e.itemSort&&(c=c.sort((p,m)=>e.itemSort(p,m,r))),Re(c,p=>{const m=Hb(e.callbacks,p);s.push(It(m,"labelColor",this,p)),a.push(It(m,"labelPointStyle",this,p)),l.push(It(m,"labelTextColor",this,p))}),this.labelColors=s,this.labelPointStyles=a,this.labelTextColors=l,this.dataPoints=c,c}update(e,t){const r=this.options.setContext(this.getContext()),s=this._active;let a,l=[];if(!s.length)this.opacity!==0&&(a={opacity:0});else{const c=As[r.position].call(this,s,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);const f=this._size=$b(this,r),h=Object.assign({},c,f),p=Vb(this.chart,r,h),m=Wb(r,h,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,a={opacity:1,x:m.x,y:m.y,width:f.width,height:f.height,caretX:c.x,caretY:c.y}}this._tooltipItems=l,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,r,s){const a=this.getCaretPosition(e,r,s);t.lineTo(a.x1,a.y1),t.lineTo(a.x2,a.y2),t.lineTo(a.x3,a.y3)}getCaretPosition(e,t,r){const{xAlign:s,yAlign:a}=this,{caretSize:l,cornerRadius:c}=r,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Hr(c),{x:y,y:_}=e,{width:b,height:S}=t;let k,R,w,E,O,P;return a==="center"?(O=_+S/2,s==="left"?(k=y,R=k-l,E=O+l,P=O-l):(k=y+b,R=k+l,E=O-l,P=O+l),w=k):(s==="left"?R=y+Math.max(f,p)+l:s==="right"?R=y+b-Math.max(h,m)-l:R=this.caretX,a==="top"?(E=_,O=E-l,k=R-l,w=R+l):(E=_+S,O=E+l,k=R+l,w=R-l),P=E),{x1:k,x2:R,x3:w,y1:E,y2:O,y3:P}}drawTitle(e,t,r){const s=this.title,a=s.length;let l,c,f;if(a){const h=Ci(r.rtl,this.x,this.width);for(e.x=Oa(this,r.titleAlign,r),t.textAlign=h.textAlign(r.titleAlign),t.textBaseline="middle",l=it(r.titleFont),c=r.titleSpacing,t.fillStyle=r.titleColor,t.font=l.string,f=0;f<a;++f)t.fillText(s[f],h.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+c,f+1===a&&(e.y+=r.titleMarginBottom-c)}}_drawColorBox(e,t,r,s,a){const l=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:f,boxWidth:h}=a,p=it(a.bodyFont),m=Oa(this,"left",a),y=s.x(m),_=f<p.lineHeight?(p.lineHeight-f)/2:0,b=t.y+_;if(a.usePointStyle){const S={radius:Math.min(h,f)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},k=s.leftForLtr(y,h)+h/2,R=b+f/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,rh(e,S,k,R),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,rh(e,S,k,R)}else{e.lineWidth=be(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const S=s.leftForLtr(y,h),k=s.leftForLtr(s.xPlus(y,1),h-2),R=Hr(l.borderRadius);Object.values(R).some(w=>w!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Us(e,{x:S,y:b,w:h,h:f,radius:R}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),Us(e,{x:k,y:b+1,w:h-2,h:f-2,radius:R}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(S,b,h,f),e.strokeRect(S,b,h,f),e.fillStyle=l.backgroundColor,e.fillRect(k,b+1,h-2,f-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,t,r){const{body:s}=this,{bodySpacing:a,bodyAlign:l,displayColors:c,boxHeight:f,boxWidth:h,boxPadding:p}=r,m=it(r.bodyFont);let y=m.lineHeight,_=0;const b=Ci(r.rtl,this.x,this.width),S=function(I){t.fillText(I,b.x(e.x+_),e.y+y/2),e.y+=y+a},k=b.textAlign(l);let R,w,E,O,P,T,D;for(t.textAlign=l,t.textBaseline="middle",t.font=m.string,e.x=Oa(this,k,r),t.fillStyle=r.bodyColor,Re(this.beforeBody,S),_=c&&k!=="right"?l==="center"?h/2+p:h+2+p:0,O=0,T=s.length;O<T;++O){for(R=s[O],w=this.labelTextColors[O],t.fillStyle=w,Re(R.before,S),E=R.lines,c&&E.length&&(this._drawColorBox(t,e,O,b,r),y=Math.max(m.lineHeight,f)),P=0,D=E.length;P<D;++P)S(E[P]),y=m.lineHeight;Re(R.after,S)}_=0,y=m.lineHeight,Re(this.afterBody,S),e.y-=a}drawFooter(e,t,r){const s=this.footer,a=s.length;let l,c;if(a){const f=Ci(r.rtl,this.x,this.width);for(e.x=Oa(this,r.footerAlign,r),e.y+=r.footerMarginTop,t.textAlign=f.textAlign(r.footerAlign),t.textBaseline="middle",l=it(r.footerFont),t.fillStyle=r.footerColor,t.font=l.string,c=0;c<a;++c)t.fillText(s[c],f.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+r.footerSpacing}}drawBackground(e,t,r,s){const{xAlign:a,yAlign:l}=this,{x:c,y:f}=e,{width:h,height:p}=r,{topLeft:m,topRight:y,bottomLeft:_,bottomRight:b}=Hr(s.cornerRadius);t.fillStyle=s.backgroundColor,t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.beginPath(),t.moveTo(c+m,f),l==="top"&&this.drawCaret(e,t,r,s),t.lineTo(c+h-y,f),t.quadraticCurveTo(c+h,f,c+h,f+y),l==="center"&&a==="right"&&this.drawCaret(e,t,r,s),t.lineTo(c+h,f+p-b),t.quadraticCurveTo(c+h,f+p,c+h-b,f+p),l==="bottom"&&this.drawCaret(e,t,r,s),t.lineTo(c+_,f+p),t.quadraticCurveTo(c,f+p,c,f+p-_),l==="center"&&a==="left"&&this.drawCaret(e,t,r,s),t.lineTo(c,f+m),t.quadraticCurveTo(c,f,c+m,f),t.closePath(),t.fill(),s.borderWidth>0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,r=this.$animations,s=r&&r.x,a=r&&r.y;if(s||a){const l=As[e.position].call(this,this._active,this._eventPosition);if(!l)return;const c=this._size=$b(this,e),f=Object.assign({},l,this._size),h=Vb(t,e,f),p=Wb(e,f,h,t);(s._to!==p.x||a._to!==p.y)&&(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const l=St(t.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(a,e,s,t),yS(e,t.textDirection),a.y+=l.top,this.drawTitle(a,e,t),this.drawBody(a,e,t),this.drawFooter(a,e,t),_S(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const r=this._active,s=e.map(({datasetIndex:c,index:f})=>{const h=this.chart.getDatasetMeta(c);if(!h)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:h.data[f],index:f}}),a=!za(r,s),l=this._positionChanged(s,t);(a||l)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,r=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,a=this._active||[],l=this._getActiveElements(e,a,t,r),c=this._positionChanged(l,e),f=t||!za(l,a)||c;return f&&(this._active=l,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),f}_getActiveElements(e,t,r,s){const a=this.options;if(e.type==="mouseout")return[];if(!s)return t.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,a.mode,a,r);return a.reverse&&l.reverse(),l}_positionChanged(e,t){const{caretX:r,caretY:s,options:a}=this,l=As[a.position].call(this,e,t);return l!==!1&&(r!==l.x||s!==l.y)}}var QT={id:"tooltip",_element:Yb,positioners:As,afterInit(n,e,t){t&&(n.tooltip=new Yb({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0})===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:GS},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"]},KT=Object.freeze({__proto__:null,Colors:lT,Decimation:dT,Filler:DT,Legend:FT,SubTitle:BT,Title:qT,Tooltip:QT});const XT=(n,e,t,r)=>(typeof e=="string"?(t=n.push(e)-1,r.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function JT(n,e,t,r){const s=n.indexOf(e);if(s===-1)return XT(n,e,t,r);const a=n.lastIndexOf(e);return s!==a?t:s}const ZT=(n,e)=>n===null?null:ft(Math.round(n),0,e);function Gb(n){const e=this.getLabels();return n>=0&&n<e.length?e[n]:n}class eD extends Zr{static id="category";static defaults={ticks:{callback:Gb}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const r=this.getLabels();for(const{index:s,label:a}of t)r[s]===a&&r.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(we(e))return null;const r=this.getLabels();return t=isFinite(t)&&r[t]===e?t:JT(r,e,ye(t,e),this._addedLabels),ZT(t,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),t||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const e=this.min,t=this.max,r=this.options.offset,s=[];let a=this.getLabels();a=e===0&&t===a.length-1?a:a.slice(e,t+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=e;l<=t;l++)s.push({value:l});return s}getLabelForValue(e){return Gb.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function tD(n,e){const t=[],{bounds:s,step:a,min:l,max:c,precision:f,count:h,maxTicks:p,maxDigits:m,includeBounds:y}=n,_=a||1,b=p-1,{min:S,max:k}=e,R=!we(l),w=!we(c),E=!we(h),O=(k-S)/(m+1);let P=B_((k-S)/b/_)*_,T,D,I,W;if(P<1e-14&&!R&&!w)return[{value:S},{value:k}];W=Math.ceil(k/P)-Math.floor(S/P),W>b&&(P=B_(W*P/b/_)*_),we(f)||(T=Math.pow(10,f),P=Math.ceil(P*T)/T),s==="ticks"?(D=Math.floor(S/P)*P,I=Math.ceil(k/P)*P):(D=S,I=k),R&&w&&a&&$P((c-l)/a,P/1e3)?(W=Math.round(Math.min((c-l)/P,p)),P=(c-l)/W,D=l,I=c):E?(D=R?l:D,I=w?c:I,W=h-1,P=(I-D)/W):(W=(I-D)/P,Ns(W,Math.round(W),P/1e3)?W=Math.round(W):W=Math.ceil(W));const H=Math.max($_(P),$_(D));T=Math.pow(10,we(f)?H:f),D=Math.round(D*T)/T,I=Math.round(I*T)/T;let Y=0;for(R&&(y&&D!==l?(t.push({value:l}),D<l&&Y++,Ns(Math.round((D+Y*P)*T)/T,l,Qb(l,O,n))&&Y++):D<l&&Y++);Y<W;++Y){const ee=Math.round((D+Y*P)*T)/T;if(w&&ee>c)break;t.push({value:ee})}return w&&y&&I!==c?t.length&&Ns(t[t.length-1].value,c,Qb(c,O,n))?t[t.length-1].value=c:t.push({value:c}):(!w||I===c)&&t.push({value:I}),t}function Qb(n,e,{horizontal:t,minRotation:r}){const s=hn(r),a=(t?Math.sin(s):Math.cos(s))||.001,l=.75*e*(""+n).length;return Math.min(e/a,l)}class Ha extends Zr{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,t){return we(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:s,max:a}=this;const l=f=>s=t?s:f,c=f=>a=r?a:f;if(e){const f=En(s),h=En(a);f<0&&h<0?c(0):f>0&&h>0&&l(0)}if(s===a){let f=a===0?1:Math.abs(a*.05);c(a+f),e||l(s-f)}this.min=s,this.max=a}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:r}=e,s;return r?(s=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const s={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},a=this._range||this,l=tD(s,a);return e.bounds==="ticks"&&tS(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let t=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const s=(r-t)/Math.max(e.length-1,1)/2;t-=s,r+=s}this._startValue=t,this._endValue=r,this._valueRange=r-t}getLabelForValue(e){return no(e,this.chart.options.locale,this.options.ticks.format)}}class nD extends Ha{static id="linear";static defaults={ticks:{callback:nl.formatters.numeric}};determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ye(e)?e:0,this.max=Ye(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,r=hn(this.options.ticks.minRotation),s=(e?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,a.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Ys=n=>Math.floor(pr(n)),Br=(n,e)=>Math.pow(10,Ys(n)+e);function Kb(n){return n/Math.pow(10,Ys(n))===1}function Xb(n,e,t){const r=Math.pow(10,t),s=Math.floor(n/r);return Math.ceil(e/r)-s}function rD(n,e){const t=e-n;let r=Ys(t);for(;Xb(n,e,r)>10;)r++;for(;Xb(n,e,r)<10;)r--;return Math.min(r,Ys(n))}function iD(n,{min:e,max:t}){e=Vt(n.min,e);const r=[],s=Ys(e);let a=rD(e,t),l=a<0?Math.pow(10,Math.abs(a)):1;const c=Math.pow(10,a),f=s>a?Math.pow(10,s):0,h=Math.round((e-f)*l)/l,p=Math.floor((e-f)/c/10)*c*10;let m=Math.floor((h-p)/Math.pow(10,a)),y=Vt(n.min,Math.round((f+p+m*Math.pow(10,a))*l)/l);for(;y<t;)r.push({value:y,major:Kb(y),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(a++,m=2,l=a>=0?1:l),y=Math.round((f+p+m*Math.pow(10,a))*l)/l;const _=Vt(n.max,y);return r.push({value:_,major:Kb(_),significand:m}),r}class sD extends Zr{static id="logarithmic";static defaults={ticks:{callback:nl.formatters.logarithmic,major:{enabled:!0}}};constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,t){const r=Ha.prototype.parse.apply(this,[e,t]);if(r===0){this._zero=!0;return}return Ye(r)&&r>0?r:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ye(e)?Math.max(0,e):null,this.max=Ye(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Ye(this._userMin)&&(this.min=e===Br(this.min,0)?Br(this.min,-1):Br(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let r=this.min,s=this.max;const a=c=>r=e?r:c,l=c=>s=t?s:c;r===s&&(r<=0?(a(1),l(10)):(a(Br(r,-1)),l(Br(s,1)))),r<=0&&a(Br(s,-1)),s<=0&&l(Br(r,1)),this.min=r,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},r=iD(t,this);return e.bounds==="ticks"&&tS(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(e){return e===void 0?"0":no(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=pr(e),this._valueRange=pr(this.max)-pr(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(pr(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}function uh(n){const e=n.ticks;if(e.display&&n.display){const t=St(e.backdropPadding);return ye(e.font&&e.font.size,Ge.font.size)+t.height}return 0}function oD(n,e,t){return t=$e(t)?t:[t],{w:sC(n,e.string,t),h:t.length*e.lineHeight}}function Jb(n,e,t,r,s){return n===r||n===s?{start:e-t/2,end:e+t/2}:n<r||n>s?{start:e-t,end:e}:{start:e,end:e+t}}function aD(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),r=[],s=[],a=n._pointLabels.length,l=n.options.pointLabels,c=l.centerPointLabels?ze/a:0;for(let f=0;f<a;f++){const h=l.setContext(n.getPointLabelContext(f));s[f]=h.padding;const p=n.getPointPosition(f,n.drawingArea+s[f],c),m=it(h.font),y=oD(n.ctx,m,n._pointLabels[f]);r[f]=y;const _=Wt(n.getIndexAngle(f)+c),b=Math.round($h(_)),S=Jb(b,p.x,y.w,0,180),k=Jb(b,p.y,y.h,90,270);lD(t,e,_,S,k)}n.setCenterPoint(e.l-t.l,t.r-e.r,e.t-t.t,t.b-e.b),n._pointLabelItems=fD(n,r,s)}function lD(n,e,t,r,s){const a=Math.abs(Math.sin(t)),l=Math.abs(Math.cos(t));let c=0,f=0;r.start<e.l?(c=(e.l-r.start)/a,n.l=Math.min(n.l,e.l-c)):r.end>e.r&&(c=(r.end-e.r)/a,n.r=Math.max(n.r,e.r+c)),s.start<e.t?(f=(e.t-s.start)/l,n.t=Math.min(n.t,e.t-f)):s.end>e.b&&(f=(s.end-e.b)/l,n.b=Math.max(n.b,e.b+f))}function uD(n,e,t){const r=n.drawingArea,{extra:s,additionalAngle:a,padding:l,size:c}=t,f=n.getPointPosition(e,r+s+l,a),h=Math.round($h(Wt(f.angle+Ze))),p=pD(f.y,c.h,h),m=dD(h),y=hD(f.x,c.w,m);return{visible:!0,x:f.x,y:p,textAlign:m,left:y,top:p,right:y+c.w,bottom:p+c.h}}function cD(n,e){if(!e)return!0;const{left:t,top:r,right:s,bottom:a}=n;return!(Un({x:t,y:r},e)||Un({x:t,y:a},e)||Un({x:s,y:r},e)||Un({x:s,y:a},e))}function fD(n,e,t){const r=[],s=n._pointLabels.length,a=n.options,{centerPointLabels:l,display:c}=a.pointLabels,f={extra:uh(a)/2,additionalAngle:l?ze/s:0};let h;for(let p=0;p<s;p++){f.padding=t[p],f.size=e[p];const m=uD(n,p,f);r.push(m),c==="auto"&&(m.visible=cD(m,h),m.visible&&(h=m))}return r}function dD(n){return n===0||n===180?"center":n<180?"left":"right"}function hD(n,e,t){return t==="right"?n-=e:t==="center"&&(n-=e/2),n}function pD(n,e,t){return t===90||t===270?n-=e/2:(t>270||t<90)&&(n-=e),n}function gD(n,e,t){const{left:r,top:s,right:a,bottom:l}=t,{backdropColor:c}=e;if(!we(c)){const f=Hr(e.borderRadius),h=St(e.backdropPadding);n.fillStyle=c;const p=r-h.left,m=s-h.top,y=a-r+h.width,_=l-s+h.height;Object.values(f).some(b=>b!==0)?(n.beginPath(),Us(n,{x:p,y:m,w:y,h:_,radius:f}),n.fill()):n.fillRect(p,m,y,_)}}function mD(n,e){const{ctx:t,options:{pointLabels:r}}=n;for(let s=e-1;s>=0;s--){const a=n._pointLabelItems[s];if(!a.visible)continue;const l=r.setContext(n.getPointLabelContext(s));gD(t,l,a);const c=it(l.font),{x:f,y:h,textAlign:p}=a;Kr(t,n._pointLabels[s],f,h+c.lineHeight/2,c,{color:l.color,textAlign:p,textBaseline:"middle"})}}function QS(n,e,t,r){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,Fe);else{let a=n.getPointPosition(0,e);s.moveTo(a.x,a.y);for(let l=1;l<r;l++)a=n.getPointPosition(l,e),s.lineTo(a.x,a.y)}}function vD(n,e,t,r,s){const a=n.ctx,l=e.circular,{color:c,lineWidth:f}=e;!l&&!r||!c||!f||t<0||(a.save(),a.strokeStyle=c,a.lineWidth=f,a.setLineDash(s.dash),a.lineDashOffset=s.dashOffset,a.beginPath(),QS(n,t,l,r),a.closePath(),a.stroke(),a.restore())}function yD(n,e,t){return Sr(n,{label:t,index:e,type:"pointLabel"})}class _D extends Ha{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:nl.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=St(uh(this.options)/2),t=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(t,r)/2)}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!1);this.min=Ye(e)&&!isNaN(e)?e:0,this.max=Ye(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/uh(this.options))}generateTickLabels(e){Ha.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((t,r)=>{const s=Ie(this.options.pointLabels.callback,[t,r],this);return s||s===0?s:""}).filter((t,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?aD(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,r,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((r-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,r,s))}getIndexAngle(e){const t=Fe/(this._pointLabels.length||1),r=this.options.startAngle||0;return Wt(e*t+hn(r))}getDistanceFromCenterForValue(e){if(we(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(we(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e<t.length){const r=t[e];return yD(this.getContext(),e,r)}}getPointPosition(e,t,r=0){const s=this.getIndexAngle(e)-Ze+r;return{x:Math.cos(s)*t+this.xCenter,y:Math.sin(s)*t+this.yCenter,angle:s}}getPointPositionForValue(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:t,top:r,right:s,bottom:a}=this._pointLabelItems[e];return{left:t,top:r,right:s,bottom:a}}drawBackground(){const{backgroundColor:e,grid:{circular:t}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),QS(this,this.getDistanceFromCenterForValue(this._endValue),t,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,t=this.options,{angleLines:r,grid:s,border:a}=t,l=this._pointLabels.length;let c,f,h;if(t.pointLabels.display&&mD(this,l),s.display&&this.ticks.forEach((p,m)=>{if(m!==0||m===0&&this.min<0){f=this.getDistanceFromCenterForValue(p.value);const y=this.getContext(m),_=s.setContext(y),b=a.setContext(y);vD(this,_,f,l,b)}}),r.display){for(e.save(),c=l-1;c>=0;c--){const p=r.setContext(this.getPointLabelContext(c)),{color:m,lineWidth:y}=p;!y||!m||(e.lineWidth=y,e.strokeStyle=m,e.setLineDash(p.borderDash),e.lineDashOffset=p.borderDashOffset,f=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),h=this.getPointPosition(c,f),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(h.x,h.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,r=t.ticks;if(!r.display)return;const s=this.getIndexAngle(0);let a,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((c,f)=>{if(f===0&&this.min>=0&&!t.reverse)return;const h=r.setContext(this.getContext(f)),p=it(h.font);if(a=this.getDistanceFromCenterForValue(this.ticks[f].value),h.showLabelBackdrop){e.font=p.string,l=e.measureText(c.label).width,e.fillStyle=h.backdropColor;const m=St(h.backdropPadding);e.fillRect(-l/2-m.left,-a-p.size/2-m.top,l+m.width,p.size+m.height)}Kr(e,c.label,0,-a,p,{color:h.color,strokeColor:h.textStrokeColor,strokeWidth:h.textStrokeWidth})}),e.restore()}drawTitle(){}}const cl={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}},Nt=Object.keys(cl);function Zb(n,e){return n-e}function ex(n,e){if(we(e))return null;const t=n._adapter,{parser:r,round:s,isoWeekday:a}=n._parseOpts;let l=e;return typeof r=="function"&&(l=r(l)),Ye(l)||(l=typeof r=="string"?t.parse(l,r):t.parse(l)),l===null?null:(s&&(l=s==="week"&&(Ri(a)||a===!0)?t.startOf(l,"isoWeek",a):t.startOf(l,s)),+l)}function tx(n,e,t,r){const s=Nt.length;for(let a=Nt.indexOf(n);a<s-1;++a){const l=cl[Nt[a]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((t-e)/(c*l.size))<=r)return Nt[a]}return Nt[s-1]}function bD(n,e,t,r,s){for(let a=Nt.length-1;a>=Nt.indexOf(t);a--){const l=Nt[a];if(cl[l].common&&n._adapter.diff(s,r,l)>=e-1)return l}return Nt[t?Nt.indexOf(t):0]}function xD(n){for(let e=Nt.indexOf(n)+1,t=Nt.length;e<t;++e)if(cl[Nt[e]].common)return Nt[e]}function nx(n,e,t){if(!t)n[e]=!0;else if(t.length){const{lo:r,hi:s}=Vh(t,e),a=t[r]>=e?t[r]:t[s];n[a]=!0}}function SD(n,e,t,r){const s=n._adapter,a=+s.startOf(e[0].value,r),l=e[e.length-1].value;let c,f;for(c=a;c<=l;c=+s.add(c,1,r))f=t[c],f>=0&&(e[f].major=!0);return e}function rx(n,e,t){const r=[],s={},a=e.length;let l,c;for(l=0;l<a;++l)c=e[l],s[c]=l,r.push({value:c,major:!1});return a===0||!t?r:SD(n,r,s,t)}class ch extends Zr{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,t={}){const r=e.time||(e.time={}),s=this._adapter=new kM._date(e.adapters.date);s.init(t),Ls(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=t.normalized}parse(e,t){return e===void 0?null:ex(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,t=this._adapter,r=e.time.unit||"day";let{min:s,max:a,minDefined:l,maxDefined:c}=this.getUserBounds();function f(h){!l&&!isNaN(h.min)&&(s=Math.min(s,h.min)),!c&&!isNaN(h.max)&&(a=Math.max(a,h.max))}(!l||!c)&&(f(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&f(this.getMinMax(!1))),s=Ye(s)&&!isNaN(s)?s:+t.startOf(Date.now(),r),a=Ye(a)&&!isNaN(a)?a:+t.endOf(Date.now(),r)+1,this.min=Math.min(s,a-1),this.max=Math.max(s+1,a)}_getLabelBounds(){const e=this.getLabelTimestamps();let t=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],r=e[e.length-1]),{min:t,max:r}}buildTicks(){const e=this.options,t=e.time,r=e.ticks,s=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const a=this.min,l=this.max,c=HP(s,a,l);return this._unit=t.unit||(r.autoSkip?tx(t.minUnit,this.min,this.max,this._getLabelCapacity(a)):bD(this,c.length,t.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:xD(this._unit),this.initOffsets(s),e.reverse&&c.reverse(),rx(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let t=0,r=0,s,a;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?r=a:r=(a-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;t=ft(t,0,l),r=ft(r,0,l),this._offsets={start:t,end:r,factor:1/(t+1+r)}}_generate(){const e=this._adapter,t=this.min,r=this.max,s=this.options,a=s.time,l=a.unit||tx(a.minUnit,t,r,this._getLabelCapacity(t)),c=ye(s.ticks.stepSize,1),f=l==="week"?a.isoWeekday:!1,h=Ri(f)||f===!0,p={};let m=t,y,_;if(h&&(m=+e.startOf(m,"isoWeek",f)),m=+e.startOf(m,h?"day":l),e.diff(r,t,l)>1e5*c)throw new Error(t+" and "+r+" are too far apart with stepSize of "+c+" "+l);const b=s.ticks.source==="data"&&this.getDataTimestamps();for(y=m,_=0;y<r;y=+e.add(y,c,l),_++)nx(p,y,b);return(y===r||s.bounds==="ticks"||_===1)&&nx(p,y,b),Object.keys(p).sort(Zb).map(S=>+S)}getLabelForValue(e){const t=this._adapter,r=this.options.time;return r.tooltipFormat?t.format(e,r.tooltipFormat):t.format(e,r.displayFormats.datetime)}format(e,t){const s=this.options.time.displayFormats,a=this._unit,l=t||s[a];return this._adapter.format(e,l)}_tickFormatFunction(e,t,r,s){const a=this.options,l=a.ticks.callback;if(l)return Ie(l,[e,t,r],this);const c=a.time.displayFormats,f=this._unit,h=this._majorUnit,p=f&&c[f],m=h&&c[h],y=r[t],_=h&&m&&y&&y.major;return this._adapter.format(e,s||(_?m:p))}generateTickLabels(e){let t,r,s;for(t=0,r=e.length;t<r;++t)s=e[t],s.label=this._tickFormatFunction(s.value,t,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const t=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+r)*t.factor)}getValueForPixel(e){const t=this._offsets,r=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const t=this.options.ticks,r=this.ctx.measureText(e).width,s=hn(this.isHorizontal()?t.maxRotation:t.minRotation),a=Math.cos(s),l=Math.sin(s),c=this._resolveTickFontOptions(0).size;return{w:r*a+c*l,h:r*l+c*a}}_getLabelCapacity(e){const t=this.options.time,r=t.displayFormats,s=r[t.unit]||r.millisecond,a=this._tickFormatFunction(e,0,rx(this,[e],this._majorUnit),s),l=this._getLabelSize(a),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],t,r;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,r=s.length;t<r;++t)e=e.concat(s[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let t,r;if(e.length)return e;const s=this.getLabels();for(t=0,r=s.length;t<r;++t)e.push(ex(this,s[t]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return iS(e.sort(Zb))}}function Pa(n,e,t){let r=0,s=n.length-1,a,l,c,f;t?(e>=n[r].pos&&e<=n[s].pos&&({lo:r,hi:s}=Wn(n,"pos",e)),{pos:a,time:c}=n[r],{pos:l,time:f}=n[s]):(e>=n[r].time&&e<=n[s].time&&({lo:r,hi:s}=Wn(n,"time",e)),{time:a,pos:c}=n[r],{time:l,pos:f}=n[s]);const h=l-a;return h?c+(f-c)*(e-a)/h:c}class wD extends ch{static id="timeseries";static defaults=ch.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=Pa(t,this.min),this._tableRange=Pa(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:r}=this,s=[],a=[];let l,c,f,h,p;for(l=0,c=e.length;l<c;++l)h=e[l],h>=t&&h<=r&&s.push(h);if(s.length<2)return[{time:t,pos:0},{time:r,pos:1}];for(l=0,c=s.length;l<c;++l)p=s[l+1],f=s[l-1],h=s[l],Math.round((p+f)/2)!==h&&a.push({time:h,pos:l/(c-1)});return a}_generate(){const e=this.min,t=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(t)||r.length===1)&&r.push(t),r.sort((s,a)=>s-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const t=this.getDataTimestamps(),r=this.getLabelTimestamps();return t.length&&r.length?e=this.normalize(t.concat(r)):e=t.length?t:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Pa(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const t=this._offsets,r=this.getDecimalForPixel(e)/t.factor-t.end;return Pa(this._table,r*this._tableRange+this._minPos,!0)}}var kD=Object.freeze({__proto__:null,CategoryScale:eD,LinearScale:nD,LogarithmicScale:sD,RadialLinearScale:_D,TimeScale:ch,TimeSeriesScale:wD});const ED=[wM,nT,KT,kD];ll.register(...ED);const KS="label";function ix(n,e){typeof n=="function"?n(e):n&&(n.current=e)}function OD(n,e){const t=n.options;t&&e&&Object.assign(t,e)}function XS(n,e){n.labels=e}function JS(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:KS;const r=[];n.datasets=e.map(s=>{const a=n.datasets.find(l=>l[t]===s[t]);return!a||!s.data||r.includes(a)?{...s}:(r.push(a),Object.assign(a,s),a)})}function PD(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:KS;const t={labels:[],datasets:[]};return XS(t,n.labels),JS(t,n.datasets,e),t}function CD(n,e){const{height:t=150,width:r=300,redraw:s=!1,datasetIdKey:a,type:l,data:c,options:f,plugins:h=[],fallbackContent:p,updateMode:m,...y}=n,_=Je.useRef(null),b=Je.useRef(),S=()=>{_.current&&(b.current=new ll(_.current,{type:l,data:PD(c,a),options:f&&{...f},plugins:h}),ix(e,b.current))},k=()=>{ix(e,null),b.current&&(b.current.destroy(),b.current=null)};return Je.useEffect(()=>{!s&&b.current&&f&&OD(b.current,f)},[s,f]),Je.useEffect(()=>{!s&&b.current&&XS(b.current.config.data,c.labels)},[s,c.labels]),Je.useEffect(()=>{!s&&b.current&&c.datasets&&JS(b.current.config.data,c.datasets,a)},[s,c.datasets]),Je.useEffect(()=>{b.current&&(s?(k(),setTimeout(S)):b.current.update(m))},[s,f,c.labels,c.datasets,m]),Je.useEffect(()=>{b.current&&(k(),setTimeout(S))},[l]),Je.useEffect(()=>(S(),()=>k()),[]),Gr.createElement("canvas",Object.assign({ref:_,role:"img",height:t,width:r},y),p)}const MD=Je.forwardRef(CD);function fl(n,e){return ll.register(e),Je.forwardRef((t,r)=>Gr.createElement(MD,Object.assign({},t,{ref:r,type:n})))}const sx=fl("line",PS),RD=fl("bar",OS),TD=fl("doughnut",ol),DD=fl("pie",MS);function ID(n){const{resultSet:e,pivotConfig:t,chartType:r}=n,s={labels:e.chartPivot(t).map(l=>l.x),datasets:e.series(t).map(l=>({fill:r==="area",label:l.title,data:l.series.map(({value:c})=>c)}))},a={area:sx,bar:RD,doughnut:TD,line:sx,pie:DD}[r];return Lt.jsx(a,{data:s})}function AD(n){const e=location.hash.slice(1);if(e)try{return{...n,...JSON.parse(atob(decodeURIComponent(e)))}}catch{console.error("Invalid hash",e)}return{...n}}function LD(n){const{children:e,query:t,subscribe:r}=n,{resultSet:s,isLoading:a,error:l}=BE(t??{},{subscribe:r,skip:!t});return a?Lt.jsx(Lt.Fragment,{children:"Loading..."}):l?Lt.jsx(Lt.Fragment,{children:l.toString()}):s?e?.({resultSet:s})||null:Lt.jsx(Lt.Fragment,{children:"Empty result set"})}function ND(){const{apiUrl:n,apiToken:e,query:t,pivotConfig:r,chartType:s,useWebSockets:a,useSubscription:l}=AD({apiUrl:"",apiToken:"",query:JSON.parse("{}"),pivotConfig:JSON.parse("{}"),chartType:void 0,websockets:!1,subscription:!1});let c;a&&(c=new uP({authorization:e,apiUrl:n}));const f=jE(e,{apiUrl:n,transport:c});return Lt.jsx(Lt.Fragment,{children:Lt.jsx(zE,{cubeApi:f,children:Lt.jsx(LD,{query:t,subscribe:l,children:({resultSet:h})=>Lt.jsx(ID,{chartType:s,resultSet:h,pivotConfig:r})})})})}nk.createRoot(document.getElementById("root")).render(Lt.jsx(Gr.StrictMode,{children:Lt.jsx(ND,{})}));
|