dynamic-mui 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +142 -5
  2. package/dist/accordion-DqBdGRim.mjs +23 -0
  3. package/dist/accordion-lvbD_BpX.js +1 -0
  4. package/dist/addressfield-CGX3UppE.mjs +152 -0
  5. package/dist/addressfield-DDG15fqJ.js +1 -0
  6. package/dist/asyncautocomplete-BAfBR9P7.mjs +89 -0
  7. package/dist/asyncautocomplete-w9q_1DWt.js +1 -0
  8. package/dist/bar-BzO7tvYJ.mjs +20 -0
  9. package/dist/bar-DEVxyUVS.js +1 -0
  10. package/dist/cascadeselect-C3QVfoig.mjs +64 -0
  11. package/dist/cascadeselect-DzbhK9en.js +1 -0
  12. package/dist/colorpicker-5qmEq7ZI.js +1 -0
  13. package/dist/colorpicker-DhNZulJY.mjs +98 -0
  14. package/dist/components/DynamicComponent.d.ts +2 -0
  15. package/dist/components/FormGenerator.d.ts +99 -10
  16. package/dist/components/controls/index.d.ts +45 -79
  17. package/dist/consentfield-B7Rm8d3U.js +1 -0
  18. package/dist/consentfield-CBQUR4J5.mjs +78 -0
  19. package/dist/datatable-BIQznwQe.mjs +20 -0
  20. package/dist/datatable-BWlcUP0M.js +1 -0
  21. package/dist/dynamic-mui.cjs +1 -0
  22. package/dist/dynamic-mui.mjs +32 -0
  23. package/dist/editabletable-DCoRmsEO.js +1 -0
  24. package/dist/editabletable-DRlBV8lk.mjs +126 -0
  25. package/dist/fileupload-ByBv1UjT.mjs +172 -0
  26. package/dist/fileupload-Cze3Oc_2.js +1 -0
  27. package/dist/formrepeater-BBkKGLFJ.mjs +71 -0
  28. package/dist/formrepeater-BxJzXoHx.js +1 -0
  29. package/dist/formwizard-BDZE1UDD.js +1 -0
  30. package/dist/formwizard-D2u1bMvK.mjs +83 -0
  31. package/dist/geofield-8WTeZk0Z.mjs +104 -0
  32. package/dist/geofield-Bw3p4NLJ.js +1 -0
  33. package/dist/group-B2mSylHd.mjs +23 -0
  34. package/dist/group-BlfO3ZZf.js +1 -0
  35. package/dist/imagelist-Bn9QhIv7.js +1 -0
  36. package/dist/imagelist-rqmJajHt.mjs +18 -0
  37. package/dist/index-CddjLTWF.mjs +12499 -0
  38. package/dist/index-D08GIfqF.js +43 -0
  39. package/dist/index.d.ts +9 -1
  40. package/dist/intlphone-B_Xn98pU.js +1 -0
  41. package/dist/intlphone-DtQZ12xk.mjs +140 -0
  42. package/dist/keyvaluefield-B_1NeGuP.mjs +125 -0
  43. package/dist/keyvaluefield-DyKCGd32.js +1 -0
  44. package/dist/line-B-DwR1hm.mjs +20 -0
  45. package/dist/line-BkymZu31.js +1 -0
  46. package/dist/lineitemlist-DGo8UOZC.js +1 -0
  47. package/dist/lineitemlist-vGKzJlQx.mjs +166 -0
  48. package/dist/list-7uNWrepS.mjs +20 -0
  49. package/dist/list-C0FgmtQw.js +1 -0
  50. package/dist/locationfield-CeUgxLkQ.mjs +119 -0
  51. package/dist/locationfield-Duyw1ZEz.js +1 -0
  52. package/dist/markdowneditor-B1y-hfny.mjs +90 -0
  53. package/dist/markdowneditor-Db0Un1_Z.js +2 -0
  54. package/dist/matrixfield-C7Sc-YpI.mjs +117 -0
  55. package/dist/matrixfield-CckODuPn.js +1 -0
  56. package/dist/mixChart-C3o184UT.js +1 -0
  57. package/dist/mixChart-ISf3Kbr-.mjs +75 -0
  58. package/dist/multitextbox-BYazIAeG.js +1 -0
  59. package/dist/multitextbox-ide2lvJ6.mjs +78 -0
  60. package/dist/npsscale-C2e88qk_.js +1 -0
  61. package/dist/npsscale-lndz7GEq.mjs +87 -0
  62. package/dist/numberstepper-DitbcvV9.mjs +128 -0
  63. package/dist/numberstepper-DyRjQM_K.js +1 -0
  64. package/dist/pie-CJSL8Sv5.js +1 -0
  65. package/dist/pie-CL29dlh5.mjs +20 -0
  66. package/dist/richtexteditor-CVg-MnKp.js +1 -0
  67. package/dist/richtexteditor-DsC1XC7h.mjs +141 -0
  68. package/dist/s3Upload-B0JeoLkS.js +1 -0
  69. package/dist/s3Upload-dpioZ2c8.mjs +51 -0
  70. package/dist/signature-14OrZriO.mjs +1225 -0
  71. package/dist/signature-D582X6tB.js +2 -0
  72. package/dist/stepper-B-FpcZvT.js +1 -0
  73. package/dist/stepper-CDfEy_C6.mjs +140 -0
  74. package/dist/summaryfield-B08ZmVHh.js +1 -0
  75. package/dist/summaryfield-CTpPlZBG.mjs +96 -0
  76. package/dist/tabs-BIliqFOs.js +1 -0
  77. package/dist/tabs-DDeJCFt8.mjs +39 -0
  78. package/dist/tagsinput-D-q6rRZS.mjs +58 -0
  79. package/dist/tagsinput-qh_lhdFb.js +1 -0
  80. package/dist/util/registry.d.ts +29 -0
  81. package/dist/util/resolvers.d.ts +45 -0
  82. package/dist/util/useFormEngine.d.ts +74 -0
  83. package/dist/util/validateSchema.d.ts +23 -0
  84. package/dist/v4-BysszJq8.mjs +30 -0
  85. package/dist/v4-CqdK_b8Y.js +1 -0
  86. package/package.json +36 -11
  87. package/dist/AxisSharedComponents-BbsKw1BT.js +0 -3
  88. package/dist/AxisSharedComponents-xLtpOLH_.mjs +0 -605
  89. package/dist/ChartsAxis-CANvBdY9.mjs +0 -47
  90. package/dist/ChartsAxis-EZ7m_KrU.js +0 -1
  91. package/dist/ChartsGrid-BCRTvNTr.js +0 -3
  92. package/dist/ChartsGrid-C_HT7qpL.mjs +0 -381
  93. package/dist/ChartsWrapper-CM7EDyAK.js +0 -5
  94. package/dist/ChartsWrapper-CO5_Z6BD.mjs +0 -1878
  95. package/dist/ChartsXAxis-CPmuCRhq.mjs +0 -487
  96. package/dist/ChartsXAxis-DFFY1sPg.js +0 -3
  97. package/dist/ChartsYAxis-DLUMr9vG.mjs +0 -392
  98. package/dist/ChartsYAxis-fpevi1sP.js +0 -1
  99. package/dist/XmlShapeDeserializer-3yQdm0b0.mjs +0 -237
  100. package/dist/XmlShapeDeserializer-XKJAoqLc.js +0 -1
  101. package/dist/clampAngle-BvZjnf53.mjs +0 -11
  102. package/dist/clampAngle-DpAsDoeT.js +0 -1
  103. package/dist/createSelector-B-9FwV16.mjs +0 -430
  104. package/dist/createSelector-f0oqn8Lr.js +0 -7
  105. package/dist/date-utils-CFUUt6NL.js +0 -4
  106. package/dist/date-utils-pGzaKb0p.mjs +0 -477
  107. package/dist/dynamic-mui.cjs.js +0 -1
  108. package/dist/dynamic-mui.es.js +0 -22
  109. package/dist/index--8Zky9Oh.js +0 -299
  110. package/dist/index-6WTs1Xy_.js +0 -1
  111. package/dist/index-B1R1akM2.js +0 -1
  112. package/dist/index-BW8_rRff.js +0 -7
  113. package/dist/index-BXFVK_GX.js +0 -1
  114. package/dist/index-B_KNUTjy.js +0 -1
  115. package/dist/index-BhaKvHkU.mjs +0 -62051
  116. package/dist/index-Bif92ima.js +0 -1
  117. package/dist/index-BnZOu8CL.js +0 -1
  118. package/dist/index-CDxpgRlR.mjs +0 -7
  119. package/dist/index-CThMfvtJ.mjs +0 -2555
  120. package/dist/index-CVqLvm8B.js +0 -1
  121. package/dist/index-CodJBIn6.mjs +0 -1665
  122. package/dist/index-Cr6Wp_S-.mjs +0 -3141
  123. package/dist/index-CslPwsrf.mjs +0 -4
  124. package/dist/index-CuV0MQzZ.mjs +0 -1173
  125. package/dist/index-DA0XouZs.mjs +0 -153
  126. package/dist/index-DKS5Sz9e.js +0 -14
  127. package/dist/index-DSkYYZuW.mjs +0 -4
  128. package/dist/index-DU78_FiA.js +0 -1
  129. package/dist/index-D_mYhgJ0.js +0 -10
  130. package/dist/index-DcWfyXJp.mjs +0 -92
  131. package/dist/index-Dlimbnxj.mjs +0 -2965
  132. package/dist/index-MllWgTJ5.mjs +0 -9372
  133. package/dist/index-in5z9hUb.js +0 -133
  134. package/dist/index-qUW7FnZ-.mjs +0 -20540
  135. package/dist/index.browser-BSu11T_q.mjs +0 -363
  136. package/dist/index.browser-By7-GABP.js +0 -4
  137. package/dist/isDeepEqual-BHfPvf9U.mjs +0 -393
  138. package/dist/isDeepEqual-CqxZGVRk.js +0 -1
  139. package/dist/loadCognitoIdentity-DtYTy-DW.js +0 -1
  140. package/dist/loadCognitoIdentity-DzdR91GB.mjs +0 -872
  141. package/dist/loadSts-Cic6UToN.mjs +0 -593
  142. package/dist/loadSts-csbFP6zX.js +0 -1
  143. package/dist/main.d.ts +0 -1
  144. package/dist/noAuth-B8ui2kBg.mjs +0 -71
  145. package/dist/noAuth-JPA2o4dt.js +0 -1
  146. package/dist/playground/AIContext.d.ts +0 -18
  147. package/dist/playground/AIPanel.d.ts +0 -10
  148. package/dist/playground/Builder.d.ts +0 -1
  149. package/dist/playground/Canvas.d.ts +0 -9
  150. package/dist/playground/DemoGallery.d.ts +0 -6
  151. package/dist/playground/PropertiesEditor.d.ts +0 -10
  152. package/dist/playground/Sidebar.d.ts +0 -9
  153. package/dist/playground/demoForms.d.ts +0 -3
  154. package/dist/playground/demoRecipes.d.ts +0 -15
  155. package/dist/playground/demoVariants.d.ts +0 -11
  156. package/dist/playground/documentation.d.ts +0 -6
  157. package/dist/playground/templates.d.ts +0 -7
  158. package/dist/playground/testData.d.ts +0 -2
  159. package/dist/test/setup.d.ts +0 -0
  160. package/dist/theme/theme.d.ts +0 -6
  161. package/dist/useAxis-DSbfEtO7.js +0 -3
  162. package/dist/useAxis-SiNBMMWq.mjs +0 -3010
  163. package/dist/useChartContainerProps-Bl3hO-r1.mjs +0 -5418
  164. package/dist/useChartContainerProps-C_C_PZoi.js +0 -12
  165. package/dist/useItemHighlightedGetter-9CIwqsGj.js +0 -1
  166. package/dist/useItemHighlightedGetter-CTISrNdV.mjs +0 -88
@@ -1,71 +0,0 @@
1
- import { H as g, N as y, c as b } from "./index-Cr6Wp_S-.mjs";
2
- import { H as z } from "./date-utils-pGzaKb0p.mjs";
3
- class q extends g {
4
- async serializeRequest(i, r, e) {
5
- const s = this.serializer, n = {}, a = {}, d = await e.endpoint(), t = y.of(i?.input), m = t.getSchema();
6
- let f;
7
- const o = new z({
8
- protocol: "",
9
- hostname: "",
10
- port: void 0,
11
- path: "/",
12
- fragment: void 0,
13
- query: n,
14
- headers: a,
15
- body: void 0
16
- });
17
- d && (this.updateServiceEndpoint(o, d), this.setHostPrefix(o, i, r));
18
- const c = {
19
- ...r
20
- };
21
- if (r) {
22
- const h = t.getEventStreamMember();
23
- if (h) {
24
- if (c[h]) {
25
- const u = {};
26
- for (const [l, S] of t.structIterator())
27
- l !== h && c[l] && (s.write(S, c[l]), u[l] = s.flush());
28
- f = await this.serializeEventStream({
29
- eventStream: c[h],
30
- requestSchema: t,
31
- initialRequest: u
32
- });
33
- }
34
- } else
35
- s.write(m, c), f = s.flush();
36
- }
37
- return o.headers = a, o.query = n, o.body = f, o.method = "POST", o;
38
- }
39
- async deserializeResponse(i, r, e) {
40
- const s = this.deserializer, n = y.of(i.output), a = {};
41
- if (e.statusCode >= 300) {
42
- const t = await b(e.body, r);
43
- throw t.byteLength > 0 && Object.assign(a, await s.read(15, t)), await this.handleError(i, r, e, a, this.deserializeMetadata(e)), new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
44
- }
45
- for (const t in e.headers) {
46
- const m = e.headers[t];
47
- delete e.headers[t], e.headers[t.toLowerCase()] = m;
48
- }
49
- const d = n.getEventStreamMember();
50
- if (d)
51
- a[d] = await this.deserializeEventStream({
52
- response: e,
53
- responseSchema: n,
54
- initialResponseContainer: a
55
- });
56
- else {
57
- const t = await b(e.body, r);
58
- t.byteLength > 0 && Object.assign(a, await s.read(n, t));
59
- }
60
- return a.$metadata = this.deserializeMetadata(e), a;
61
- }
62
- }
63
- class R {
64
- async sign(i, r, e) {
65
- return i;
66
- }
67
- }
68
- export {
69
- R as N,
70
- q as R
71
- };
@@ -1 +0,0 @@
1
- "use strict";const l=require("./index-DKS5Sz9e.js"),S=require("./date-utils-CFUUt6NL.js");class g extends l.HttpProtocol{async serializeRequest(r,i,e){const s=this.serializer,n={},a={},d=await e.endpoint(),t=l.NormalizedSchema.of(r?.input),u=t.getSchema();let f;const o=new S.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:a,body:void 0});d&&(this.updateServiceEndpoint(o,d),this.setHostPrefix(o,r,i));const c={...i};if(i){const h=t.getEventStreamMember();if(h){if(c[h]){const y={};for(const[m,w]of t.structIterator())m!==h&&c[m]&&(s.write(w,c[m]),y[m]=s.flush());f=await this.serializeEventStream({eventStream:c[h],requestSchema:t,initialRequest:y})}}else s.write(u,c),f=s.flush()}return o.headers=a,o.query=n,o.body=f,o.method="POST",o}async deserializeResponse(r,i,e){const s=this.deserializer,n=l.NormalizedSchema.of(r.output),a={};if(e.statusCode>=300){const t=await l.collectBody(e.body,i);throw t.byteLength>0&&Object.assign(a,await s.read(15,t)),await this.handleError(r,i,e,a,this.deserializeMetadata(e)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const t in e.headers){const u=e.headers[t];delete e.headers[t],e.headers[t.toLowerCase()]=u}const d=n.getEventStreamMember();if(d)a[d]=await this.deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:a});else{const t=await l.collectBody(e.body,i);t.byteLength>0&&Object.assign(a,await s.read(n,t))}return a.$metadata=this.deserializeMetadata(e),a}}class z{async sign(r,i,e){return r}}exports.NoAuthSigner=z;exports.RpcProtocol=g;
@@ -1,18 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { AIClient } from '../ai';
3
- interface AICtx {
4
- endpoint: string;
5
- apiKey: string;
6
- setEndpoint: (v: string) => void;
7
- setApiKey: (v: string) => void;
8
- client: AIClient | null;
9
- configured: boolean;
10
- }
11
- /** Holds the AI config (URL + key) once, shared by every AI feature in the builder. */
12
- export declare const AIProvider: ({ children }: {
13
- children: ReactNode;
14
- }) => import("react/jsx-runtime").JSX.Element;
15
- export declare const useAI: () => AICtx;
16
- /** Reusable URL + key inputs bound to the shared config. */
17
- export declare const AIConfigFields: () => import("react/jsx-runtime").JSX.Element;
18
- export {};
@@ -1,10 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- interface AIPanelProps {
3
- open: boolean;
4
- onClose: () => void;
5
- currentFields: FormField[];
6
- onApply: (fields: FormField[]) => void;
7
- }
8
- /** Playground-only panel: generate / digitize / review a form with AI. */
9
- export declare const AIPanel: ({ open, onClose, currentFields, onApply }: AIPanelProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1 +0,0 @@
1
- export declare const Builder: () => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- interface CanvasProps {
3
- fields: FormField[];
4
- onSelectField: (id: string) => void;
5
- selectedId: string | null;
6
- onDeleteField: (id: string) => void;
7
- }
8
- export declare const Canvas: ({ fields, onSelectField, selectedId: _selectedId, onDeleteField: _onDeleteField }: CanvasProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,6 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- /** Full-width live gallery: patterns + every component in multiple config variants, with props, code, and add-to-builder. */
3
- export declare const DemoGallery: ({ onAddField, onAddFields }: {
4
- onAddField: (field: FormField) => void;
5
- onAddFields: (fields: FormField[]) => void;
6
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- interface PropertiesEditorProps {
3
- field: FormField | null;
4
- onUpdate: (field: FormField) => void;
5
- onDelete: (id: string) => void;
6
- allFields?: FormField[];
7
- onAllFieldsChange?: (fields: FormField[]) => void;
8
- }
9
- export declare const PropertiesEditor: ({ field, onUpdate, onDelete, allFields, onAllFieldsChange }: PropertiesEditorProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,9 +0,0 @@
1
- export declare const CATEGORIES: Record<string, string[]>;
2
- export declare const CATEGORY_META: Record<string, {
3
- color: string;
4
- icon: string;
5
- grad: [string, string];
6
- }>;
7
- export declare const Sidebar: ({ onAdd }: {
8
- onAdd?: (type: string) => void;
9
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,3 +0,0 @@
1
- import { DemoRecipe } from './demoRecipes';
2
- /** Forms with every input normalized to a consistent "label on top" style. */
3
- export declare const DEMO_FORMS: DemoRecipe[];
@@ -1,15 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- export interface DemoRecipe {
3
- id: string;
4
- title: string;
5
- description: string;
6
- icon: string;
7
- data: FormField[];
8
- }
9
- /**
10
- * Practical, multi-field examples that show the DYNAMIC engine at work —
11
- * live formulas, conditional visibility, dependent selects (subforms),
12
- * required-when, disabled-when, and cross-field validation. These are the
13
- * real-world patterns single-component demos can't show.
14
- */
15
- export declare const DEMO_RECIPES: DemoRecipe[];
@@ -1,11 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- export type DemoVariant = {
3
- label: string;
4
- field: FormField;
5
- };
6
- /**
7
- * Curated config variants per component so the Demo gallery shows "what this
8
- * component can do". Any component NOT listed here falls back to its single
9
- * playground template (see DemoCard).
10
- */
11
- export declare const DEMO_VARIANTS: Record<string, DemoVariant[]>;
@@ -1,6 +0,0 @@
1
- export declare const COMPONENT_DOCS: Record<string, {
2
- title: string;
3
- description: string;
4
- usage: string;
5
- props: Record<string, string>;
6
- }>;
@@ -1,7 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- export declare const TEMPLATES: Record<string, FormField[]>;
3
- export declare const TOOLBOX_ITEMS: {
4
- type: string;
5
- label: string;
6
- icon: string;
7
- }[];
@@ -1,2 +0,0 @@
1
- import { FormField } from '../util/helper';
2
- export declare const ALL_CONTROLS_TEST_DATA: FormField[];
File without changes
@@ -1,6 +0,0 @@
1
- export declare const GRADIENTS: {
2
- primary: string;
3
- brand: string;
4
- surface: string;
5
- };
6
- export declare const theme: import('@mui/material').Theme;
@@ -1,3 +0,0 @@
1
- "use strict";const O=require("./index--8Zky9Oh.js"),b=require("./createSelector-f0oqn8Lr.js"),no=require("react");function ro(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Vn=ro(no),oe=e=>e.cartesianAxis?.x,ae=e=>e.cartesianAxis?.y,oo=b.createSelector(ae,function(t){return(t??[]).reduce((n,r)=>r.position==="left"?n+(r.width||0)+(r.zoom?.slider.enabled?r.zoom.slider.size:0):n,0)}),io=b.createSelector(ae,function(t){return(t??[]).reduce((n,r)=>r.position==="right"?n+(r.width||0)+(r.zoom?.slider.enabled?r.zoom.slider.size:0):n,0)}),ao=b.createSelector(oe,function(t){return(t??[]).reduce((n,r)=>r.position==="top"?n+(r.height||0)+(r.zoom?.slider.enabled?r.zoom.slider.size:0):n,0)}),so=b.createSelector(oe,function(t){return(t??[]).reduce((n,r)=>r.position==="bottom"?n+(r.height||0)+(r.zoom?.slider.enabled?r.zoom.slider.size:0):n,0)}),co=b.createSelectorMemoized(oo,io,ao,so,function(t,n,r,o){return{left:t,right:n,top:r,bottom:o}}),ze=e=>e.dimensions,uo=e=>e.dimensions.margin,G=b.createSelectorMemoized(ze,uo,co,function({width:t,height:n},{top:r,right:o,bottom:i,left:a},{left:c,right:l,top:s,bottom:f}){return{width:t-a-o-c-l,left:a+c,right:o+l,height:n-r-i-s-f,top:r+s,bottom:i+f}}),lo=b.createSelector(ze,e=>e.width),fo=b.createSelector(ze,e=>e.height),ho=b.createSelector(ze,e=>e.propsWidth),mo=b.createSelector(ze,e=>e.propsHeight),go=e=>e.experimentalFeatures,it=b.createSelector(go,e=>!!e?.preferStrictDomainInLineCharts),po=({series:e,colors:t,seriesConfig:n})=>{const r={};return e.forEach((o,i)=>{const a=n[o.type].getSeriesWithDefaultValues(o,i,t),c=a.id;if(r[o.type]===void 0&&(r[o.type]={series:{},seriesOrder:[]}),r[o.type]?.series[c]!==void 0)throw new Error(`MUI X Charts: series' id "${c}" is not unique.`);r[o.type].series[c]=a,r[o.type].seriesOrder.push(c)}),r},xo=(e,t,n,r)=>{const o={};return Object.keys(t).forEach(i=>{const a=e[i];a!==void 0&&(o[i]=t[i]?.seriesProcessor?.(a,n,r)??a)}),o},yo=(e,t,n)=>{let r=!1;const o={};return Object.keys(e).forEach(i=>{const a=t[i]?.seriesLayout,c=e[i];if(a!==void 0&&c!==void 0){const l=a(c,n);l&&l!==e[i]&&(r=!0,o[i]=l)}}),r?o:{}},Bn=(e,t)=>{const n=e[t.type]?.identifierSerializer;if(!n)throw new Error(`MUI X Charts: No identifier serializer found for series type "${t.type}".`);return n(t)},Mo=(e,t,n)=>{const r=Bn(n,t);return!e.has(r)},wo=e=>e.visibilityManager,Qn=new Map,bo=b.createSelector(wo,e=>e?.visibilityMap??Qn),Jn=b.createSelectorMemoized(bo,e=>(t,n)=>Mo(e,n,t)),Ot=e=>e.series,Kn=b.createSelector(Ot,e=>e.defaultizedSeries),j=b.createSelector(Ot,e=>e.seriesConfig),So=b.createSelector(Ot,e=>e.dataset),V=b.createSelectorMemoized(Kn,j,So,Jn,function(t,n,r,o){return xo(t,n,r,i=>o(n,i))}),To=b.createSelectorMemoized(V,j,G,function(t,n,r){return yo(t,n,r)}),Lt=Vn.createContext(null);process.env.NODE_ENV!=="production"&&(Lt.displayName="ChartContext");const er=4,tr=20+2*er,Co=40+2*er,vo="hover",ko={top:5,bottom:5,left:5,right:5},We={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:"keep",reverse:!1,slider:{enabled:!1,preview:!1,size:tr,showTooltip:vo}},nr=(e,t,n,r)=>{if(e)return e===!0?O._extends({axisId:t,axisDirection:n},We,{reverse:r??!1}):O._extends({axisId:t,axisDirection:n},We,{reverse:r??!1},e,{slider:O._extends({},We.slider,{size:e.slider?.preview??We.slider.preview?Co:tr},e.slider)})};function Ao(e,t){return function(r,o){if(o.location==="tick"){const i=o.scale.domain();return i[0]===i[1]?o.scale.tickFormat(1)(r):o.scale.tickFormat(e)(r)}return o.location==="zoom-slider-tooltip"?t.tickFormat(2)(r):`${r}`}}function me(e){return e.scaleType==="band"}function ge(e){return e.scaleType==="point"}function Do(e){return e.scaleType!=="point"&&e.scaleType!=="band"}function Io(e){return e.scaleType==="symlog"}function qe(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function No(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $t(e){let t,n,r;e.length!==2?(t=qe,n=(c,l)=>qe(e(c),l),r=(c,l)=>e(c)-l):(t=e===qe||e===No?e:Uo,n=e,r=e);function o(c,l,s=0,f=c.length){if(s<f){if(t(l,l)!==0)return f;do{const u=s+f>>>1;n(c[u],l)<0?s=u+1:f=u}while(s<f)}return s}function i(c,l,s=0,f=c.length){if(s<f){if(t(l,l)!==0)return f;do{const u=s+f>>>1;n(c[u],l)<=0?s=u+1:f=u}while(s<f)}return s}function a(c,l,s=0,f=c.length){const u=o(c,l,s,f-1);return u>s&&r(c[u-1],l)>-r(c[u],l)?u-1:u}return{left:o,center:a,right:i}}function Uo(){return 0}function _o(e){return e===null?NaN:+e}const Fo=$t(qe),rr=Fo.right;$t(_o).center;class je extends Map{constructor(t,n=Yo){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(un(this,t))}has(t){return super.has(un(this,t))}set(t,n){return super.set(Eo(this,t),n)}delete(t){return super.delete(Ro(this,t))}}function un({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Eo({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Ro({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Yo(e){return e!==null&&typeof e=="object"?e.valueOf():e}const zo=Math.sqrt(50),Oo=Math.sqrt(10),Lo=Math.sqrt(2);function Ve(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=zo?10:i>=Oo?5:i>=Lo?2:1;let c,l,s;return o<0?(s=Math.pow(10,-o)/a,c=Math.round(e*s),l=Math.round(t*s),c/s<e&&++c,l/s>t&&--l,s=-s):(s=Math.pow(10,o)*a,c=Math.round(e/s),l=Math.round(t/s),c*s<e&&++c,l*s>t&&--l),l<c&&.5<=n&&n<2?Ve(e,t,n*2):[c,l,s]}function It(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[o,i,a]=r?Ve(t,e,n):Ve(e,t,n);if(!(i>=o))return[];const c=i-o+1,l=new Array(c);if(r)if(a<0)for(let s=0;s<c;++s)l[s]=(i-s)/-a;else for(let s=0;s<c;++s)l[s]=(i-s)*a;else if(a<0)for(let s=0;s<c;++s)l[s]=(o+s)/-a;else for(let s=0;s<c;++s)l[s]=(o+s)*a;return l}function Nt(e,t,n){return t=+t,e=+e,n=+n,Ve(e,t,n)[2]}function Ut(e,t,n){t=+t,e=+e,n=+n;const r=t<e,o=r?Nt(t,e,n):Nt(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function $o(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r<o;)i[r]=e+r*n;return i}function se(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Po(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ln=Symbol("implicit");function _t(){var e=new je,t=[],n=[],r=ln;function o(i){let a=e.get(i);if(a===void 0){if(r!==ln)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new je;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(n=Array.from(i),o):n.slice()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return _t(t,n).unknown(r)},se.apply(o,arguments),o}function Pt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function or(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Oe(){}var _e=.7,Be=1/_e,Se="\\s*([+-]?\\d+)\\s*",Fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ho=/^#([0-9a-f]{3,8})$/,Wo=new RegExp(`^rgb\\(${Se},${Se},${Se}\\)$`),Go=new RegExp(`^rgb\\(${Q},${Q},${Q}\\)$`),Xo=new RegExp(`^rgba\\(${Se},${Se},${Se},${Fe}\\)$`),Zo=new RegExp(`^rgba\\(${Q},${Q},${Q},${Fe}\\)$`),qo=new RegExp(`^hsl\\(${Fe},${Q},${Q}\\)$`),jo=new RegExp(`^hsla\\(${Fe},${Q},${Q},${Fe}\\)$`),fn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pt(Oe,Ee,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hn,formatHex:hn,formatHex8:Vo,formatHsl:Bo,formatRgb:dn,toString:dn});function hn(){return this.rgb().formatHex()}function Vo(){return this.rgb().formatHex8()}function Bo(){return ir(this).formatHsl()}function dn(){return this.rgb().formatRgb()}function Ee(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ho.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?mn(t):n===3?new L(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ge(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ge(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Wo.exec(e))?new L(t[1],t[2],t[3],1):(t=Go.exec(e))?new L(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xo.exec(e))?Ge(t[1],t[2],t[3],t[4]):(t=Zo.exec(e))?Ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qo.exec(e))?xn(t[1],t[2]/100,t[3]/100,1):(t=jo.exec(e))?xn(t[1],t[2]/100,t[3]/100,t[4]):fn.hasOwnProperty(e)?mn(fn[e]):e==="transparent"?new L(NaN,NaN,NaN,0):null}function mn(e){return new L(e>>16&255,e>>8&255,e&255,1)}function Ge(e,t,n,r){return r<=0&&(e=t=n=NaN),new L(e,t,n,r)}function Qo(e){return e instanceof Oe||(e=Ee(e)),e?(e=e.rgb(),new L(e.r,e.g,e.b,e.opacity)):new L}function Ft(e,t,n,r){return arguments.length===1?Qo(e):new L(e,t,n,r??1)}function L(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pt(L,Ft,or(Oe,{brighter(e){return e=e==null?Be:Math.pow(Be,e),new L(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new L(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new L(de(this.r),de(this.g),de(this.b),Qe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:gn,formatHex:gn,formatHex8:Jo,formatRgb:pn,toString:pn}));function gn(){return`#${fe(this.r)}${fe(this.g)}${fe(this.b)}`}function Jo(){return`#${fe(this.r)}${fe(this.g)}${fe(this.b)}${fe((isNaN(this.opacity)?1:this.opacity)*255)}`}function pn(){const e=Qe(this.opacity);return`${e===1?"rgb(":"rgba("}${de(this.r)}, ${de(this.g)}, ${de(this.b)}${e===1?")":`, ${e})`}`}function Qe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function de(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fe(e){return e=de(e),(e<16?"0":"")+e.toString(16)}function xn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new q(e,t,n,r)}function ir(e){if(e instanceof q)return new q(e.h,e.s,e.l,e.opacity);if(e instanceof Oe||(e=Ee(e)),!e)return new q;if(e instanceof q)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,c=i-o,l=(i+o)/2;return c?(t===i?a=(n-r)/c+(n<r)*6:n===i?a=(r-t)/c+2:a=(t-n)/c+4,c/=l<.5?i+o:2-i-o,a*=60):c=l>0&&l<1?0:a,new q(a,c,l,e.opacity)}function Ko(e,t,n,r){return arguments.length===1?ir(e):new q(e,t,n,r??1)}function q(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pt(q,Ko,or(Oe,{brighter(e){return e=e==null?Be:Math.pow(Be,e),new q(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_e:Math.pow(_e,e),new q(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new L(bt(e>=240?e-240:e+120,o,r),bt(e,o,r),bt(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new q(yn(this.h),Xe(this.s),Xe(this.l),Qe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qe(this.opacity);return`${e===1?"hsl(":"hsla("}${yn(this.h)}, ${Xe(this.s)*100}%, ${Xe(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yn(e){return e=(e||0)%360,e<0?e+360:e}function Xe(e){return Math.max(0,Math.min(1,e||0))}function bt(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Ht=e=>()=>e;function ei(e,t){return function(n){return e+n*t}}function ti(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ni(e){return(e=+e)==1?ar:function(t,n){return n-t?ti(t,n,e):Ht(isNaN(t)?n:t)}}function ar(e,t){var n=t-e;return n?ei(e,n):Ht(isNaN(e)?t:e)}const Mn=(function e(t){var n=ni(t);function r(o,i){var a=n((o=Ft(o)).r,(i=Ft(i)).r),c=n(o.g,i.g),l=n(o.b,i.b),s=ar(o.opacity,i.opacity);return function(f){return o.r=a(f),o.g=c(f),o.b=l(f),o.opacity=s(f),o+""}}return r.gamma=e,r})(1);function ri(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function oi(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ii(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),a;for(a=0;a<r;++a)o[a]=at(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(c){for(a=0;a<r;++a)i[a]=o[a](c);return i}}function sr(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Re(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ai(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=at(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Et=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,St=new RegExp(Et.source,"g");function si(e){return function(){return e}}function ci(e){return function(t){return e(t)+""}}function cr(e,t){var n=Et.lastIndex=St.lastIndex=0,r,o,i,a=-1,c=[],l=[];for(e=e+"",t=t+"";(r=Et.exec(e))&&(o=St.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),c[a]?c[a]+=i:c[++a]=i),(r=r[0])===(o=o[0])?c[a]?c[a]+=o:c[++a]=o:(c[++a]=null,l.push({i:a,x:Re(r,o)})),n=St.lastIndex;return n<t.length&&(i=t.slice(n),c[a]?c[a]+=i:c[++a]=i),c.length<2?l[0]?ci(l[0].x):si(t):(t=l.length,function(s){for(var f=0,u;f<t;++f)c[(u=l[f]).i]=u.x(s);return c.join("")})}function at(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ht(t):(n==="number"?Re:n==="string"?(r=Ee(t))?(t=r,Mn):cr:t instanceof Ee?Mn:t instanceof Date?sr:oi(t)?ri:Array.isArray(t)?ii:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ai:Re)(e,t)}function ur(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function ui(e){return function(){return e}}function li(e){return+e}var wn=[0,1];function H(e){return e}function Rt(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:ui(isNaN(t)?NaN:.5)}function fi(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function hi(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=Rt(o,r),i=n(a,i)):(r=Rt(r,o),i=n(i,a)),function(c){return i(r(c))}}function di(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=Rt(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(c){var l=rr(e,c,1,r)-1;return i[l](o[l](c))}}function Le(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function st(){var e=wn,t=wn,n=at,r,o,i,a=H,c,l,s;function f(){var h=Math.min(e.length,t.length);return a!==H&&(a=fi(e[0],e[h-1])),c=h>2?di:hi,l=s=null,u}function u(h){return h==null||isNaN(h=+h)?i:(l||(l=c(e.map(r),t,n)))(r(a(h)))}return u.invert=function(h){return a(o((s||(s=c(t,e.map(r),Re)))(h)))},u.domain=function(h){return arguments.length?(e=Array.from(h,li),f()):e.slice()},u.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},u.rangeRound=function(h){return t=Array.from(h),n=ur,f()},u.clamp=function(h){return arguments.length?(a=h?!0:H,f()):a!==H},u.interpolate=function(h){return arguments.length?(n=h,f()):n},u.unknown=function(h){return arguments.length?(i=h,u):i},function(h,m){return r=h,o=m,f()}}function lr(){return st()(H,H)}function mi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Je(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ce(e){return e=Je(Math.abs(e)),e?e[1]:NaN}function gi(e,t){return function(n,r){for(var o=n.length,i=[],a=0,c=e[0],l=0;o>0&&c>0&&(l+c+1>r&&(c=Math.max(1,r-l)),i.push(n.substring(o-=c,o+c)),!((l+=c+1)>r));)c=e[a=(a+1)%e.length];return i.reverse().join(t)}}function pi(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var xi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ye(e){if(!(t=xi.exec(e)))throw new Error("invalid format: "+e);var t;return new Wt({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ye.prototype=Wt.prototype;function Wt(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Wt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function yi(e){e:for(var t=e.length,n=1,r=-1,o;n<t;++n)switch(e[n]){case".":r=o=n;break;case"0":r===0&&(r=n),o=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var Ke;function Mi(e,t){var n=Je(e,t);if(!n)return Ke=void 0,e.toPrecision(t);var r=n[0],o=n[1],i=o-(Ke=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Je(e,Math.max(0,t+i-1))[0]}function bn(e,t){var n=Je(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const Sn={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mi,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bn(e*100,t),r:bn,s:Mi,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Tn(e){return e}var Cn=Array.prototype.map,vn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wi(e){var t=e.grouping===void 0||e.thousands===void 0?Tn:gi(Cn.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Tn:pi(Cn.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function s(u,h){u=Ye(u);var m=u.fill,y=u.align,M=u.sign,x=u.symbol,w=u.zero,I=u.width,A=u.comma,k=u.precision,F=u.trim,p=u.type;p==="n"?(A=!0,p="g"):Sn[p]||(k===void 0&&(k=12),F=!0,p="g"),(w||m==="0"&&y==="=")&&(w=!0,m="0",y="=");var D=(h&&h.prefix!==void 0?h.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(p)?"0"+p.toLowerCase():""),E=(x==="$"?r:/[%p]/.test(p)?a:"")+(h&&h.suffix!==void 0?h.suffix:""),R=Sn[p],X=/[defgprs%]/.test(p);k=k===void 0?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function B(S){var J=D,Y=E,ie,He,ye;if(p==="c")Y=R(S)+Y,S="";else{S=+S;var Me=S<0||1/S<0;if(S=isNaN(S)?l:R(Math.abs(S),k),F&&(S=yi(S)),Me&&+S==0&&M!=="+"&&(Me=!1),J=(Me?M==="("?M:c:M==="-"||M==="("?"":M)+J,Y=(p==="s"&&!isNaN(S)&&Ke!==void 0?vn[8+Ke/3]:"")+Y+(Me&&M==="("?")":""),X){for(ie=-1,He=S.length;++ie<He;)if(ye=S.charCodeAt(ie),48>ye||ye>57){Y=(ye===46?o+S.slice(ie+1):S.slice(ie))+Y,S=S.slice(0,ie);break}}}A&&!w&&(S=t(S,1/0));var we=J.length+S.length+Y.length,Z=we<I?new Array(I-we+1).join(m):"";switch(A&&w&&(S=t(Z+S,Z.length?I-Y.length:1/0),Z=""),y){case"<":S=J+S+Y+Z;break;case"=":S=J+Z+S+Y;break;case"^":S=Z.slice(0,we=Z.length>>1)+J+S+Y+Z.slice(we);break;default:S=Z+J+S+Y;break}return i(S)}return B.toString=function(){return u+""},B}function f(u,h){var m=Math.max(-8,Math.min(8,Math.floor(Ce(h)/3)))*3,y=Math.pow(10,-m),M=s((u=Ye(u),u.type="f",u),{suffix:vn[8+m/3]});return function(x){return M(y*x)}}return{format:s,formatPrefix:f}}var Ze,Gt,fr;bi({thousands:",",grouping:[3],currency:["$",""]});function bi(e){return Ze=wi(e),Gt=Ze.format,fr=Ze.formatPrefix,Ze}function Si(e){return Math.max(0,-Ce(Math.abs(e)))}function Ti(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ce(t)/3)))*3-Ce(Math.abs(e)))}function Ci(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ce(t)-Ce(e))+1}function vi(e,t,n,r){var o=Ut(e,t,n),i;switch(r=Ye(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Ti(o,a))&&(r.precision=i),fr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Ci(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Si(o))&&(r.precision=i-(r.type==="%")*2);break}}return Gt(r)}function ct(e){var t=e.domain;return e.ticks=function(n){var r=t();return It(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return vi(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],c=r[i],l,s,f=10;for(c<a&&(s=a,a=c,c=s,s=o,o=i,i=s);f-- >0;){if(s=Nt(a,c,n),s===l)return r[o]=a,r[i]=c,t(r);if(s>0)a=Math.floor(a/s)*s,c=Math.ceil(c/s)*s;else if(s<0)a=Math.ceil(a*s)/s,c=Math.floor(c*s)/s;else break;l=s}return e},e}function Xt(){var e=lr();return e.copy=function(){return Le(e,Xt())},se.apply(e,arguments),ct(e)}function hr(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return i<o&&(a=n,n=r,r=a,a=o,o=i,i=a),e[n]=t.floor(o),e[r]=t.ceil(i),e}function kn(e){return Math.log(e)}function An(e){return Math.exp(e)}function ki(e){return-Math.log(-e)}function Ai(e){return-Math.exp(-e)}function Di(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ii(e){return e===10?Di:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ni(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Dn(e){return(t,n)=>-e(-t,n)}function Ui(e){const t=e(kn,An),n=t.domain;let r=10,o,i;function a(){return o=Ni(r),i=Ii(r),n()[0]<0?(o=Dn(o),i=Dn(i),e(ki,Ai)):e(kn,An),t}return t.base=function(c){return arguments.length?(r=+c,a()):r},t.domain=function(c){return arguments.length?(n(c),a()):n()},t.ticks=c=>{const l=n();let s=l[0],f=l[l.length-1];const u=f<s;u&&([s,f]=[f,s]);let h=o(s),m=o(f),y,M;const x=c==null?10:+c;let w=[];if(!(r%1)&&m-h<x){if(h=Math.floor(h),m=Math.ceil(m),s>0){for(;h<=m;++h)for(y=1;y<r;++y)if(M=h<0?y/i(-h):y*i(h),!(M<s)){if(M>f)break;w.push(M)}}else for(;h<=m;++h)for(y=r-1;y>=1;--y)if(M=h>0?y/i(-h):y*i(h),!(M<s)){if(M>f)break;w.push(M)}w.length*2<x&&(w=It(s,f,x))}else w=It(h,m,Math.min(m-h,x)).map(i);return u?w.reverse():w},t.tickFormat=(c,l)=>{if(c==null&&(c=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ye(l)).precision==null&&(l.trim=!0),l=Gt(l)),c===1/0)return l;const s=Math.max(1,r*c/t.ticks().length);return f=>{let u=f/i(Math.round(o(f)));return u*r<r-.5&&(u*=r),u<=s?l(f):""}},t.nice=()=>n(hr(n(),{floor:c=>i(Math.floor(o(c))),ceil:c=>i(Math.ceil(o(c)))})),t}function et(){const e=Ui(st()).domain([1,10]);return e.copy=()=>Le(e,et()).base(e.base()),se.apply(e,arguments),e}function In(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Nn(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _i(e){var t=1,n=e(In(t),Nn(t));return n.constant=function(r){return arguments.length?e(In(t=+r),Nn(t)):t},ct(n)}function dr(){var e=_i(st());return e.copy=function(){return Le(e,dr()).constant(e.constant())},se.apply(e,arguments)}function Un(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Fi(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ei(e){return e<0?-e*e:e*e}function Ri(e){var t=e(H,H),n=1;function r(){return n===1?e(H,H):n===.5?e(Fi,Ei):e(Un(n),Un(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},ct(t)}function Zt(){var e=Ri(st());return e.copy=function(){return Le(e,Zt()).exponent(e.exponent())},se.apply(e,arguments),e}function Yi(){return Zt.apply(null,arguments).exponent(.5)}function mr(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[rr(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return mr().domain(e).range(t).unknown(n)},se.apply(o,arguments)}const Tt=new Date,Ct=new Date;function U(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),c=o.ceil(i);return i-a<c-i?a:c},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,c)=>{const l=[];if(i=o.ceil(i),c=c==null?1:Math.floor(c),!(i<a)||!(c>0))return l;let s;do l.push(s=new Date(+i)),t(i,c),e(i);while(s<i&&i<a);return l},o.filter=i=>U(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,c)=>{if(a>=a)if(c<0)for(;++c<=0;)for(;t(a,-1),!i(a););else for(;--c>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(Tt.setTime(+i),Ct.setTime(+a),e(Tt),e(Ct),Math.floor(n(Tt,Ct))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const tt=U(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);tt.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?U(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):tt);tt.range;const K=1e3,W=K*60,ee=W*60,te=ee*24,qt=te*7,_n=te*30,vt=te*365,he=U(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*K)},(e,t)=>(t-e)/K,e=>e.getUTCSeconds());he.range;const jt=U(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*K)},(e,t)=>{e.setTime(+e+t*W)},(e,t)=>(t-e)/W,e=>e.getMinutes());jt.range;const Vt=U(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*W)},(e,t)=>(t-e)/W,e=>e.getUTCMinutes());Vt.range;const Bt=U(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*K-e.getMinutes()*W)},(e,t)=>{e.setTime(+e+t*ee)},(e,t)=>(t-e)/ee,e=>e.getHours());Bt.range;const Qt=U(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ee)},(e,t)=>(t-e)/ee,e=>e.getUTCHours());Qt.range;const $e=U(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*W)/te,e=>e.getDate()-1);$e.range;const ut=U(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/te,e=>e.getUTCDate()-1);ut.range;const gr=U(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/te,e=>Math.floor(e/te));gr.range;function pe(e){return U(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*W)/qt)}const lt=pe(0),nt=pe(1),zi=pe(2),Oi=pe(3),ve=pe(4),Li=pe(5),$i=pe(6);lt.range;nt.range;zi.range;Oi.range;ve.range;Li.range;$i.range;function xe(e){return U(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/qt)}const ft=xe(0),rt=xe(1),Pi=xe(2),Hi=xe(3),ke=xe(4),Wi=xe(5),Gi=xe(6);ft.range;rt.range;Pi.range;Hi.range;ke.range;Wi.range;Gi.range;const Jt=U(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Jt.range;const Kt=U(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Kt.range;const ne=U(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ne.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:U(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ne.range;const re=U(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());re.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:U(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});re.range;function pr(e,t,n,r,o,i){const a=[[he,1,K],[he,5,5*K],[he,15,15*K],[he,30,30*K],[i,1,W],[i,5,5*W],[i,15,15*W],[i,30,30*W],[o,1,ee],[o,3,3*ee],[o,6,6*ee],[o,12,12*ee],[r,1,te],[r,2,2*te],[n,1,qt],[t,1,_n],[t,3,3*_n],[e,1,vt]];function c(s,f,u){const h=f<s;h&&([s,f]=[f,s]);const m=u&&typeof u.range=="function"?u:l(s,f,u),y=m?m.range(s,+f+1):[];return h?y.reverse():y}function l(s,f,u){const h=Math.abs(f-s)/u,m=$t(([,,x])=>x).right(a,h);if(m===a.length)return e.every(Ut(s/vt,f/vt,u));if(m===0)return tt.every(Math.max(Ut(s,f,u),1));const[y,M]=a[h/a[m-1][2]<a[m][2]/h?m-1:m];return y.every(M)}return[c,l]}const[Xi,Zi]=pr(re,Kt,ft,gr,Qt,Vt),[qi,ji]=pr(ne,Jt,lt,$e,Bt,jt);function kt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function At(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function De(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Vi(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,c=e.months,l=e.shortMonths,s=Ie(o),f=Ne(o),u=Ie(i),h=Ne(i),m=Ie(a),y=Ne(a),M=Ie(c),x=Ne(c),w=Ie(l),I=Ne(l),A={a:ye,A:Me,b:we,B:Z,c:null,d:On,e:On,f:ya,g:Da,G:Na,H:ga,I:pa,j:xa,L:xr,m:Ma,M:wa,p:jr,q:Vr,Q:Pn,s:Hn,S:ba,u:Sa,U:Ta,V:Ca,w:va,W:ka,x:null,X:null,y:Aa,Y:Ia,Z:Ua,"%":$n},k={a:Br,A:Qr,b:Jr,B:Kr,c:null,d:Ln,e:Ln,f:Ra,g:Xa,G:qa,H:_a,I:Fa,j:Ea,L:Mr,m:Ya,M:za,p:eo,q:to,Q:Pn,s:Hn,S:Oa,u:La,U:$a,V:Pa,w:Ha,W:Wa,x:null,X:null,y:Ga,Y:Za,Z:ja,"%":$n},F={a:X,A:B,b:S,B:J,c:Y,d:Yn,e:Yn,f:fa,g:Rn,G:En,H:zn,I:zn,j:sa,L:la,m:aa,M:ca,p:R,q:ia,Q:da,s:ma,S:ua,u:ea,U:ta,V:na,w:Ki,W:ra,x:ie,X:He,y:Rn,Y:En,Z:oa,"%":ha};A.x=p(n,A),A.X=p(r,A),A.c=p(t,A),k.x=p(n,k),k.X=p(r,k),k.c=p(t,k);function p(g,T){return function(C){var d=[],z=-1,N=0,$=g.length,P,le,cn;for(C instanceof Date||(C=new Date(+C));++z<$;)g.charCodeAt(z)===37&&(d.push(g.slice(N,z)),(le=Fn[P=g.charAt(++z)])!=null?P=g.charAt(++z):le=P==="e"?" ":"0",(cn=T[P])&&(P=cn(C,le)),d.push(P),N=z+1);return d.push(g.slice(N,z)),d.join("")}}function D(g,T){return function(C){var d=De(1900,void 0,1),z=E(d,g,C+="",0),N,$;if(z!=C.length)return null;if("Q"in d)return new Date(d.Q);if("s"in d)return new Date(d.s*1e3+("L"in d?d.L:0));if(T&&!("Z"in d)&&(d.Z=0),"p"in d&&(d.H=d.H%12+d.p*12),d.m===void 0&&(d.m="q"in d?d.q:0),"V"in d){if(d.V<1||d.V>53)return null;"w"in d||(d.w=1),"Z"in d?(N=At(De(d.y,0,1)),$=N.getUTCDay(),N=$>4||$===0?rt.ceil(N):rt(N),N=ut.offset(N,(d.V-1)*7),d.y=N.getUTCFullYear(),d.m=N.getUTCMonth(),d.d=N.getUTCDate()+(d.w+6)%7):(N=kt(De(d.y,0,1)),$=N.getDay(),N=$>4||$===0?nt.ceil(N):nt(N),N=$e.offset(N,(d.V-1)*7),d.y=N.getFullYear(),d.m=N.getMonth(),d.d=N.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),$="Z"in d?At(De(d.y,0,1)).getUTCDay():kt(De(d.y,0,1)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+d.W*7-($+5)%7:d.w+d.U*7-($+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,At(d)):kt(d)}}function E(g,T,C,d){for(var z=0,N=T.length,$=C.length,P,le;z<N;){if(d>=$)return-1;if(P=T.charCodeAt(z++),P===37){if(P=T.charAt(z++),le=F[P in Fn?T.charAt(z++):P],!le||(d=le(g,C,d))<0)return-1}else if(P!=C.charCodeAt(d++))return-1}return d}function R(g,T,C){var d=s.exec(T.slice(C));return d?(g.p=f.get(d[0].toLowerCase()),C+d[0].length):-1}function X(g,T,C){var d=m.exec(T.slice(C));return d?(g.w=y.get(d[0].toLowerCase()),C+d[0].length):-1}function B(g,T,C){var d=u.exec(T.slice(C));return d?(g.w=h.get(d[0].toLowerCase()),C+d[0].length):-1}function S(g,T,C){var d=w.exec(T.slice(C));return d?(g.m=I.get(d[0].toLowerCase()),C+d[0].length):-1}function J(g,T,C){var d=M.exec(T.slice(C));return d?(g.m=x.get(d[0].toLowerCase()),C+d[0].length):-1}function Y(g,T,C){return E(g,t,T,C)}function ie(g,T,C){return E(g,n,T,C)}function He(g,T,C){return E(g,r,T,C)}function ye(g){return a[g.getDay()]}function Me(g){return i[g.getDay()]}function we(g){return l[g.getMonth()]}function Z(g){return c[g.getMonth()]}function jr(g){return o[+(g.getHours()>=12)]}function Vr(g){return 1+~~(g.getMonth()/3)}function Br(g){return a[g.getUTCDay()]}function Qr(g){return i[g.getUTCDay()]}function Jr(g){return l[g.getUTCMonth()]}function Kr(g){return c[g.getUTCMonth()]}function eo(g){return o[+(g.getUTCHours()>=12)]}function to(g){return 1+~~(g.getUTCMonth()/3)}return{format:function(g){var T=p(g+="",A);return T.toString=function(){return g},T},parse:function(g){var T=D(g+="",!1);return T.toString=function(){return g},T},utcFormat:function(g){var T=p(g+="",k);return T.toString=function(){return g},T},utcParse:function(g){var T=D(g+="",!0);return T.toString=function(){return g},T}}}var Fn={"-":"",_:" ",0:"0"},_=/^\s*\d+/,Bi=/^%/,Qi=/[\\^$*+?|[\]().{}]/g;function v(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function Ji(e){return e.replace(Qi,"\\$&")}function Ie(e){return new RegExp("^(?:"+e.map(Ji).join("|")+")","i")}function Ne(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Ki(e,t,n){var r=_.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ea(e,t,n){var r=_.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ta(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function na(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ra(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function En(e,t,n){var r=_.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Rn(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function oa(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ia(e,t,n){var r=_.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function aa(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Yn(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sa(e,t,n){var r=_.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function zn(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ca(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ua(e,t,n){var r=_.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function la(e,t,n){var r=_.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fa(e,t,n){var r=_.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ha(e,t,n){var r=Bi.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function da(e,t,n){var r=_.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ma(e,t,n){var r=_.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function On(e,t){return v(e.getDate(),t,2)}function ga(e,t){return v(e.getHours(),t,2)}function pa(e,t){return v(e.getHours()%12||12,t,2)}function xa(e,t){return v(1+$e.count(ne(e),e),t,3)}function xr(e,t){return v(e.getMilliseconds(),t,3)}function ya(e,t){return xr(e,t)+"000"}function Ma(e,t){return v(e.getMonth()+1,t,2)}function wa(e,t){return v(e.getMinutes(),t,2)}function ba(e,t){return v(e.getSeconds(),t,2)}function Sa(e){var t=e.getDay();return t===0?7:t}function Ta(e,t){return v(lt.count(ne(e)-1,e),t,2)}function yr(e){var t=e.getDay();return t>=4||t===0?ve(e):ve.ceil(e)}function Ca(e,t){return e=yr(e),v(ve.count(ne(e),e)+(ne(e).getDay()===4),t,2)}function va(e){return e.getDay()}function ka(e,t){return v(nt.count(ne(e)-1,e),t,2)}function Aa(e,t){return v(e.getFullYear()%100,t,2)}function Da(e,t){return e=yr(e),v(e.getFullYear()%100,t,2)}function Ia(e,t){return v(e.getFullYear()%1e4,t,4)}function Na(e,t){var n=e.getDay();return e=n>=4||n===0?ve(e):ve.ceil(e),v(e.getFullYear()%1e4,t,4)}function Ua(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+v(t/60|0,"0",2)+v(t%60,"0",2)}function Ln(e,t){return v(e.getUTCDate(),t,2)}function _a(e,t){return v(e.getUTCHours(),t,2)}function Fa(e,t){return v(e.getUTCHours()%12||12,t,2)}function Ea(e,t){return v(1+ut.count(re(e),e),t,3)}function Mr(e,t){return v(e.getUTCMilliseconds(),t,3)}function Ra(e,t){return Mr(e,t)+"000"}function Ya(e,t){return v(e.getUTCMonth()+1,t,2)}function za(e,t){return v(e.getUTCMinutes(),t,2)}function Oa(e,t){return v(e.getUTCSeconds(),t,2)}function La(e){var t=e.getUTCDay();return t===0?7:t}function $a(e,t){return v(ft.count(re(e)-1,e),t,2)}function wr(e){var t=e.getUTCDay();return t>=4||t===0?ke(e):ke.ceil(e)}function Pa(e,t){return e=wr(e),v(ke.count(re(e),e)+(re(e).getUTCDay()===4),t,2)}function Ha(e){return e.getUTCDay()}function Wa(e,t){return v(rt.count(re(e)-1,e),t,2)}function Ga(e,t){return v(e.getUTCFullYear()%100,t,2)}function Xa(e,t){return e=wr(e),v(e.getUTCFullYear()%100,t,2)}function Za(e,t){return v(e.getUTCFullYear()%1e4,t,4)}function qa(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ke(e):ke.ceil(e),v(e.getUTCFullYear()%1e4,t,4)}function ja(){return"+0000"}function $n(){return"%"}function Pn(e){return+e}function Hn(e){return Math.floor(+e/1e3)}var be,br,Sr;Va({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Va(e){return be=Vi(e),br=be.format,be.parse,Sr=be.utcFormat,be.utcParse,be}function Ba(e){return new Date(e)}function Qa(e){return e instanceof Date?+e:+new Date(+e)}function en(e,t,n,r,o,i,a,c,l,s){var f=lr(),u=f.invert,h=f.domain,m=s(".%L"),y=s(":%S"),M=s("%I:%M"),x=s("%I %p"),w=s("%a %d"),I=s("%b %d"),A=s("%B"),k=s("%Y");function F(p){return(l(p)<p?m:c(p)<p?y:a(p)<p?M:i(p)<p?x:r(p)<p?o(p)<p?w:I:n(p)<p?A:k)(p)}return f.invert=function(p){return new Date(u(p))},f.domain=function(p){return arguments.length?h(Array.from(p,Qa)):h().map(Ba)},f.ticks=function(p){var D=h();return e(D[0],D[D.length-1],p??10)},f.tickFormat=function(p,D){return D==null?F:s(D)},f.nice=function(p){var D=h();return(!p||typeof p.range!="function")&&(p=t(D[0],D[D.length-1],p??10)),p?h(hr(D,p)):f},f.copy=function(){return Le(f,en(e,t,n,r,o,i,a,c,l,s))},f}function Tr(){return se.apply(en(qi,ji,ne,Jt,lt,$e,Bt,jt,he,br).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ja(){return se.apply(en(Xi,Zi,re,Kt,ft,ut,Qt,Vt,he,Sr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ka(){var e=0,t=1,n,r,o,i,a=H,c=!1,l;function s(u){return u==null||isNaN(u=+u)?l:a(o===0?.5:(u=(i(u)-n)*o,c?Math.max(0,Math.min(1,u)):u))}s.domain=function(u){return arguments.length?([e,t]=u,n=i(e=+e),r=i(t=+t),o=n===r?0:1/(r-n),s):[e,t]},s.clamp=function(u){return arguments.length?(c=!!u,s):c},s.interpolator=function(u){return arguments.length?(a=u,s):a};function f(u){return function(h){var m,y;return arguments.length?([m,y]=h,a=u(m,y),s):[a(0),a(1)]}}return s.range=f(at),s.rangeRound=f(ur),s.unknown=function(u){return arguments.length?(l=u,s):l},function(u){return i=u,n=u(e),r=u(t),o=n===r?0:1/(r-n),s}}function es(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Cr(){var e=ct(Ka()(H));return e.copy=function(){return es(e,Cr())},Po.apply(e,arguments)}function vr(e){return e.type==="piecewise"?mr(e.thresholds,e.colors):Cr([e.min??0,e.max??100],e.color)}function Ae(e){return e.values?_t(e.values,e.colors).unknown(e.unknownColor??null):_t(e.colors.map((t,n)=>n),e.colors).unknown(e.unknownColor??null)}function Te(e){return e.type==="ordinal"?Ae(e):vr(e)}function ht(e,t,n){const{tickMaxStep:r,tickMinStep:o,tickNumber:i}=e,a=o===void 0?999:Math.floor(Math.abs(t[1]-t[0])/o),c=r===void 0?2:Math.ceil(Math.abs(t[1]-t[0])/r);return Math.min(a,Math.max(c,i??n))}function kr(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function tn(e){return Math.floor(Math.abs(e)/50)}function Wn(e){return Array.isArray(e)?JSON.stringify(e):typeof e=="object"&&e!==null?e.valueOf():e}function dt(...e){let t=new je(void 0,Wn),n=[],r=[],o=0,i=1,a,c,l=!1,s=0,f=0,u=.5;const h=x=>{const w=t.get(x);if(w!==void 0)return r[w%r.length]},m=()=>{const x=n.length,w=i<o,I=w?i:o,A=w?o:i;a=(A-I)/Math.max(1,x-s+f*2),l&&(a=Math.floor(a));const k=I+(A-I-a*(x-s))*u;c=a*(1-s);const F=l?Math.round(k):k;c=l?Math.round(c):c;const D=$o(x).map(E=>F+a*E);return r=w?D.reverse():D,h};h.domain=function(x){if(!arguments.length)return n.slice();n=[],t=new je(void 0,Wn);for(const w of x)t.has(w)||t.set(w,n.push(w)-1);return m()},h.range=function(x){if(!arguments.length)return[o,i];const[w,I]=x;return o=+w,i=+I,m()},h.rangeRound=function(x){const[w,I]=x;return o=+w,i=+I,l=!0,m()},h.bandwidth=function(){return c},h.step=function(){return a},h.round=function(x){return arguments.length?(l=!!x,m()):l},h.padding=function(x){return arguments.length?(s=Math.min(1,f=+x),m()):s},h.paddingInner=function(x){return arguments.length?(s=Math.min(1,x),m()):s},h.paddingOuter=function(x){return arguments.length?(f=+x,m()):f},h.align=function(x){return arguments.length?(u=Math.max(0,Math.min(1,x)),m()):u},h.copy=()=>dt(n,[o,i]).round(l).paddingInner(s).paddingOuter(f).align(u);const[y,M]=e;return e.length>1?(h.domain(y),h.range(M)):y?h.range(y):m(),h}function Ar(...e){const t=dt(...e).paddingInner(1),n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{const r=n();return r.padding=r.paddingOuter,delete r.paddingInner,delete r.paddingOuter,r.copy=t.copy,r},t}function Dr(...e){const t=dr(...e),n=t.ticks,{negativeScale:r,linearScale:o,positiveScale:i}=ts(t);return t.ticks=a=>{const c=n(a),l=t.constant();let s=0,f=0,u=0;c.forEach(m=>{m>-l&&m<l&&(f+=1),m<=-l&&(s+=1),m>=l&&(u+=1)});const h=[];if(s>0&&h.push(...r.ticks(s)),f>0){const m=o.ticks(f);h.at(-1)===m[0]?h.push(...m.slice(1)):h.push(...m)}if(u>0){const m=i.ticks(u);h.at(-1)===m[0]?h.push(...m.slice(1)):h.push(...m)}return h},t.tickFormat=(a=10,c)=>{const l=t.constant(),[s,f]=t.domain(),u=f-s,h=r.domain(),m=h[1]-h[0],M=(u===0?0:m/u)*a,x=o.domain(),w=x[1]-x[0],A=(u===0?0:w/u)*a,k=i.domain(),F=k[1]-k[0],D=(u===0?0:F/u)*a,E=r.tickFormat(M,c),R=o.tickFormat(A,c),X=i.tickFormat(D,c);return B=>(B.valueOf()<=-l?E:B.valueOf()>=l?X:R)(B)},t.copy=()=>Dr(t.domain(),t.range()).constant(t.constant()),t}function ts(e){const t=e.constant(),n=e.domain(),r=[n[0],Math.min(n[1],-t)],o=et(r,e.range()),i=[Math.max(n[0],-t),Math.min(n[1],t)],a=Xt(i,e.range()),c=[Math.max(n[0],t),n[1]],l=et(c,e.range());return{negativeScale:o,linearScale:a,positiveScale:l}}function mt(e,t,n){switch(e){case"log":return et(t,n);case"pow":return Zt(t,n);case"sqrt":return Yi(t,n);case"time":return Tr(t,n);case"utc":return Ja(t,n);case"symlog":return Dr(t,n);default:return Xt(t,n)}}const ot=e=>e?.[0]instanceof Date;function Yt(e,t,n){const r=Tr(e,t);return(o,{location:i})=>i==="tick"?r.tickFormat(n)(o):`${o.toLocaleString()}`}let Gn,Xn;class ns{types=new Set;constructor(){if(Gn)throw new Error("You can only create one instance!");Gn=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}class rs{types=new Set;constructor(){if(Xn)throw new Error("You can only create one instance!");Xn=this.types}addType(t){this.types.add(t)}getTypes(){return this.types}}const gt=new ns;gt.addType("bar");gt.addType("line");gt.addType("scatter");const Ir=new rs;Ir.addType("radar");function pt(e){return gt.getTypes().has(e)}function os(e){return pt(e.type)}const is=(e,t,n,r)=>{const o=new Set;return Object.keys(t).filter(pt).forEach(a=>{const c=n[a]?.series??{},l=t[a].axisTooltipGetter?.(c);l!==void 0&&l.forEach(({axisId:s,direction:f})=>{f===e&&o.add(s??r)})}),o};function xt(e){return e.bandwidth!==void 0}function Nr(e){return xt(e)&&e.paddingOuter!==void 0}function as(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n?[r[1],r[0]]:r}function ss(e,t){return e.step()*t<.1}const cs=.2,us=.1;function Ur({scales:e,drawingArea:t,formattedSeries:n,axis:r,seriesConfig:o,axisDirection:i,zoomMap:a,domains:c}){if(r===void 0)return{axis:{},axisIds:[]};const l=is(i,o,n,r[0].id),s={};return r.forEach(f=>{const u=f,h=e[u.id],m=a?.get(u.id),y=m?[m.start,m.end]:[0,100],M=as(t,i,u.reverse??!1),x=c[u.id].tickNumber,w=!u.ignoreTooltip&&l.has(u.id),I=kr(x,y),A=u.data??[];if(xt(h)){const p=i==="y"?[M[1],M[0]]:M;if(Nr(h)&&me(u)){const D=u.categoryGapRatio??cs,E=ss(h,D),R=E?0:D,X=E?0:u.barGapRatio??us;s[u.id]=O._extends({offset:0,height:0,categoryGapRatio:R,barGapRatio:X,triggerTooltip:w},u,{data:A,scale:E?h.copy().padding(0):h,tickNumber:I,colorScale:u.colorMap&&(u.colorMap.type==="ordinal"?Ae(O._extends({values:u.data},u.colorMap)):Te(u.colorMap))})}if(ge(u)&&(s[u.id]=O._extends({offset:0,height:0,triggerTooltip:w},u,{data:A,scale:h,tickNumber:I,colorScale:u.colorMap&&(u.colorMap.type==="ordinal"?Ae(O._extends({values:u.data},u.colorMap)):Te(u.colorMap))})),ot(u.data)){const D=Yt(u.data,p,u.tickNumber);s[u.id].valueFormatter=u.valueFormatter??D}return}if(u.scaleType==="band"||u.scaleType==="point")return;const k=u,F=k.scaleType??"linear";s[u.id]=O._extends({offset:0,height:0,triggerTooltip:w},k,{data:A,scaleType:F,scale:h,tickNumber:I,colorScale:k.colorMap&&vr(k.colorMap),valueFormatter:u.valueFormatter??Ao(I,mt(F,M.map(p=>h.invert(p)),M))})}),{axis:s,axisIds:r.map(({id:f})=>f)}}function ls(e){return e!=null}function fs(e,t,n,r){const o=e?.length??0,i=Math.floor(t*o/100),a=Math.ceil(n*o/100);return function(l,s){return(l[r]??e?.[s])==null?!0:s>=i&&s<a}}function hs(e,t,n,r,o){const i=e[0].valueOf(),a=e[1].valueOf(),c=i+t*(a-i)/100,l=i+n*(a-i)/100;return function(f,u){const h=f[r]??o?.[u];return h==null?!0:h>=c&&h<=l}}const ds=e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:o})=>(i,a)=>!(t===n?r:n)||o?Object.values(e??{})[0]?.(i,a)??!0:[r,n].filter(s=>s!==t).map(s=>e[s??""]).filter(ls).every(s=>s(i,a)),Zn=e=>(t=[])=>t.reduce((n,r)=>{const{zoom:o,id:i,reverse:a}=r,c=nr(o,i,e,a);return c&&(n[i]=c),n},{}),ms=.2;function _r(e,t,n){const r=t==="x"?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}function Fr(e,t){const n=[0,1];if(me(e)){const i=e.categoryGapRatio??ms;return dt(t,n).paddingInner(i).paddingOuter(i/2)}if(ge(e))return Ar(t,n);const r=e.scaleType??"linear",o=mt(r,t,n);return Io(e)&&e.constant!=null&&o.constant(e.constant),o}const Er=(e,t)=>{const n=e[1]-e[0],r=t[1]-t[0],o=e[0]-t[0]*n/r,i=e[1]+(100-t[1])*n/r;return[o,i]},gs=(e,t,n,r,o,i,a)=>{const c=n==="x"?r[e].xExtremumGetter:r[e].yExtremumGetter,l=i[e]?.series??{};return c?.({series:l,axis:t,axisIndex:o,isDefaultAxis:o===0,getFilters:a})??[1/0,-1/0]};function yt(e,t,n,r,o,i){const a=Object.keys(n).filter(pt);let c=[1/0,-1/0];for(const l of a){const[s,f]=gs(l,e,t,n,r,o,i);c=[Math.min(c[0],s),Math.max(c[1],f)]}return Number.isNaN(c[0])||Number.isNaN(c[1])?[1/0,-1/0]:c}const ps=(e,t,n,r)=>{if(e.domainLimit!==void 0)return e.domainLimit;if(t==="x")for(const o of r.line?.seriesOrder??[]){const i=r.line.series[o];if(i.xAxisId===e.id||i.xAxisId===void 0&&n===0)return"strict"}return"nice"};function Rr(e,t,n){return mt(e??"linear",t,[0,1]).nice(n).domain()}function Yr(e,t,n,r,[o,i],a,c){const l=Or(e,t,n,r,c);let s=Lr(e,o,i);if(typeof l=="function"){const{min:u,max:h}=l(o.valueOf(),i.valueOf());s[0]=u,s[1]=h}const f=ht(e,s,a);return l==="nice"&&(s=Rr(e.scaleType,s,f)),s=["min"in e?e.min??s[0]:s[0],"max"in e?e.max??s[1]:s[1]],{domain:s,tickNumber:f}}function zr(e,t,n,r,[o,i],a,c){const l=Or(e,t,n,r,c);let s=Lr(e,o,i);if(typeof l=="function"){const{min:f,max:u}=l(o.valueOf(),i.valueOf());s[0]=f,s[1]=u}return l==="nice"&&(s=Rr(e.scaleType,s,a)),[e.min??s[0],e.max??s[1]]}function Or(e,t,n,r,o){return o?ps(e,t,n,r):e.domainLimit??"nice"}function Lr(e,t,n){let r=t,o=n;return"max"in e&&e.max!=null&&e.max<t&&(r=e.max),"min"in e&&e.min!=null&&e.min>t&&(o=e.min),!("min"in e)&&!("max"in e)?[r,o]:[e.min??r,e.max??o]}class xs{constructor(){this.ids=[],this.values=[],this.length=0}clear(){this.length=0}push(t,n){let r=this.length++;for(;r>0;){const o=r-1>>1,i=this.values[o];if(n>=i)break;this.ids[r]=this.ids[o],this.values[r]=i,r=o}this.ids[r]=t,this.values[r]=n}pop(){if(this.length===0)return;const t=this.ids,n=this.values,r=t[0],o=--this.length;if(o>0){const i=t[o],a=n[o];let c=0;const l=o>>1;for(;c<l;){const s=(c<<1)+1,f=s+1,u=s+(+(f<o)&+(n[f]<n[s]));if(n[u]>=a)break;t[c]=t[u],n[c]=n[u],c=u}t[c]=i,n[c]=a}return r}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){this.ids.length=this.values.length=this.length}}const qn=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Dt=3;class nn{static from(t,n=0){if(n%8!==0)throw new Error("byteOffset must be 8-byte aligned.");if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[r,o]=new Uint8Array(t,n+0,2);if(r!==251)throw new Error("Data does not appear to be in a Flatbush format.");const i=o>>4;if(i!==Dt)throw new Error(`Got v${i} data when expected v${Dt}.`);const a=qn[o&15];if(!a)throw new Error("Unrecognized array type.");const[c]=new Uint16Array(t,n+2,1),[l]=new Uint32Array(t,n+4,1);return new nn(l,c,a,void 0,t,n)}constructor(t,n=16,r=Float64Array,o=ArrayBuffer,i,a=0){if(t===void 0)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.byteOffset=a;let c=t,l=c;this._levelBounds=[c*4];do c=Math.ceil(c/this.nodeSize),l+=c,this._levelBounds.push(l*4);while(c!==1);this.ArrayType=r,this.IndexArrayType=l<16384?Uint16Array:Uint32Array;const s=qn.indexOf(r),f=l*4*r.BYTES_PER_ELEMENT;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);if(i)this.data=i,this._boxes=new r(i,a+8,l*4),this._indices=new this.IndexArrayType(i,a+8+f,l),this._pos=l*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{const u=this.data=new o(8+f+l*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new r(u,8,l*4),this._indices=new this.IndexArrayType(u,8+f,l),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(u,0,2).set([251,(Dt<<4)+s]),new Uint16Array(u,2,1)[0]=n,new Uint32Array(u,4,1)[0]=t}this._queue=new xs}add(t,n,r=t,o=n){const i=this._pos>>2,a=this._boxes;return this._indices[i]=i,a[this._pos++]=t,a[this._pos++]=n,a[this._pos++]=r,a[this._pos++]=o,t<this.minX&&(this.minX=t),n<this.minY&&(this.minY=n),r>this.maxX&&(this.maxX=r),o>this.maxY&&(this.maxY=o),i}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);const t=this._boxes;if(this.numItems<=this.nodeSize){t[this._pos++]=this.minX,t[this._pos++]=this.minY,t[this._pos++]=this.maxX,t[this._pos++]=this.maxY;return}const n=this.maxX-this.minX||1,r=this.maxY-this.minY||1,o=new Uint32Array(this.numItems),i=65535;for(let a=0,c=0;a<this.numItems;a++){const l=t[c++],s=t[c++],f=t[c++],u=t[c++],h=Math.floor(i*((l+f)/2-this.minX)/n),m=Math.floor(i*((s+u)/2-this.minY)/r);o[a]=ws(h,m)}zt(o,t,this._indices,0,this.numItems-1,this.nodeSize);for(let a=0,c=0;a<this._levelBounds.length-1;a++){const l=this._levelBounds[a];for(;c<l;){const s=c;let f=t[c++],u=t[c++],h=t[c++],m=t[c++];for(let y=1;y<this.nodeSize&&c<l;y++)f=Math.min(f,t[c++]),u=Math.min(u,t[c++]),h=Math.max(h,t[c++]),m=Math.max(m,t[c++]);this._indices[this._pos>>2]=s,t[this._pos++]=f,t[this._pos++]=u,t[this._pos++]=h,t[this._pos++]=m}}}search(t,n,r,o,i){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let a=this._boxes.length-4;const c=[],l=[];for(;a!==void 0;){const s=Math.min(a+this.nodeSize*4,jn(a,this._levelBounds));for(let f=a;f<s;f+=4){if(r<this._boxes[f]||o<this._boxes[f+1]||t>this._boxes[f+2]||n>this._boxes[f+3])continue;const u=this._indices[f>>2]|0;a>=this.numItems*4?c.push(u):(i===void 0||i(u))&&(l.push(u),l.push(this._boxes[f]),l.push(this._boxes[f+1]))}a=c.pop()}return l}neighbors(t,n,r=1/0,o=1/0,i,a=ys){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let c=this._boxes.length-4;const l=this._queue,s=[];e:for(;c!==void 0;){const f=Math.min(c+this.nodeSize*4,jn(c,this._levelBounds));for(let u=c;u<f;u+=4){const h=this._indices[u>>2]|0,m=this._boxes[u],y=this._boxes[u+1],M=this._boxes[u+2],x=this._boxes[u+3],w=t<m?m-t:t>M?t-M:0,I=n<y?y-n:n>x?n-x:0,A=a(w,I);A>o||(c>=this.numItems*4?l.push(h<<1,A):(i===void 0||i(h))&&l.push((h<<1)+1,A))}for(;l.length&&l.peek()&1;)if(l.peekValue()>o||(s.push(l.pop()>>1),s.length===r))break e;c=l.length?l.pop()>>1:void 0}return l.clear(),s}}function ys(e,t){return e*e+t*t}function jn(e,t){let n=0,r=t.length-1;for(;n<r;){const o=n+r>>1;t[o]>e?r=o:n=o+1}return t[n]}function zt(e,t,n,r,o,i){if(Math.floor(r/i)>=Math.floor(o/i))return;const a=e[r],c=e[r+o>>1],l=e[o];let s=l;const f=Math.max(a,c);l>f?s=f:f===a?s=Math.max(c,l):f===c&&(s=Math.max(a,l));let u=r-1,h=o+1;for(;;){do u++;while(e[u]<s);do h--;while(e[h]>s);if(u>=h)break;Ms(e,t,n,u,h)}zt(e,t,n,r,h,i),zt(e,t,n,h+1,o,i)}function Ms(e,t,n,r,o){const i=e[r];e[r]=e[o],e[o]=i;const a=4*r,c=4*o,l=t[a],s=t[a+1],f=t[a+2],u=t[a+3];t[a]=t[c],t[a+1]=t[c+1],t[a+2]=t[c+2],t[a+3]=t[c+3],t[c]=l,t[c+1]=s,t[c+2]=f,t[c+3]=u;const h=n[r];n[r]=n[o],n[o]=h}function ws(e,t){let n=e^t,r=65535^n,o=65535^(e|t),i=e&(t^65535),a=n|r>>1,c=n>>1^n,l=o>>1^r&i>>1^o,s=n&o>>1^i>>1^i;n=a,r=c,o=l,i=s,a=n&n>>2^r&r>>2,c=n&r>>2^r&(n^r)>>2,l^=n&o>>2^r&i>>2,s^=r&o>>2^(n^r)&i>>2,n=a,r=c,o=l,i=s,a=n&n>>4^r&r>>4,c=n&r>>4^r&(n^r)>>4,l^=n&o>>4^r&i>>4,s^=r&o>>4^(n^r)&i>>4,n=a,r=c,o=l,i=s,l^=n&o>>8^r&i>>8,s^=r&o>>8^(n^r)&i>>8,n=l^l>>1,r=s^s>>1;let f=e^t,u=r|65535^(f|n);return f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,(u<<1|f)>>>0}const bs=e=>{const t=new Map;return e.forEach(n=>{t.set(n.axisId,n)}),t},$r=e=>e.zoom,Ss=b.createSelector($r,e=>e?.isInteracting),ce=b.createSelectorMemoized($r,function(t){return t?.zoomData&&bs(t?.zoomData)}),Ts=b.createSelector(ce,(e,t)=>e?.get(t)),Pe=b.createSelectorMemoized(oe,ae,function(t,n){return O._extends({},Zn("x")(t),Zn("y")(n))});b.createSelector(Pe,(e,t)=>e[t]);const Cs=b.createSelector(G,function(t){return tn(t.width)}),vs=b.createSelector(G,function(t){return tn(t.height)}),rn=b.createSelectorMemoized(oe,V,j,it,Cs,function(t,n,r,o,i){const c={};return t?.forEach((l,s)=>{const f=l;if(me(f)||ge(f)){c[f.id]={domain:f.data},f.ordinalTimeTicks!==void 0&&(c[f.id].tickNumber=ht(f,[f.data?.find(h=>h!==null),f.data?.findLast(h=>h!==null)],i));return}const u=yt(f,"x",r,s,n);c[f.id]=Yr(f,"x",s,n,u,i,o)}),{axes:t,domains:c}}),on=b.createSelectorMemoized(ae,V,j,it,vs,function(t,n,r,o,i){const c={};return t?.forEach((l,s)=>{const f=l;if(me(f)||ge(f)){c[f.id]={domain:f.data},f.ordinalTimeTicks!==void 0&&(c[f.id].tickNumber=ht(f,[f.data?.find(h=>h!==null),f.data?.findLast(h=>h!==null)],i));return}const u=yt(f,"y",r,s,n);c[f.id]=Yr(f,"y",s,n,u,i,o)}),{axes:t,domains:c}}),Pr=b.createSelectorMemoized(ce,Pe,rn,on,function(t,n,{axes:r,domains:o},{axes:i,domains:a}){if(!t||!n)return;let c=!1;const l={},s=[...r??[],...i??[]];for(let f=0;f<s.length;f+=1){const u=s[f];if(!n[u.id]||n[u.id].filterMode!=="discard")continue;const h=t.get(u.id);if(h===void 0||h.start<=0&&h.end>=100)continue;const m=f<(r?.length??0)?"x":"y";if(u.scaleType==="band"||u.scaleType==="point")l[u.id]=fs(u.data,h.start,h.end,m);else{const{domain:y}=m==="x"?o[u.id]:a[u.id];l[u.id]=hs(y,h.start,h.end,m,u.data)}c=!0}if(c)return ds(l)}),ks=b.createSelectorMemoized(V,j,ce,Pe,Pr,it,rn,function(t,n,r,o,i,a,{axes:c,domains:l}){const s={};return c?.forEach((f,u)=>{const h=l[f.id].domain;if(me(f)||ge(f)){s[f.id]=h;return}const m=r?.get(f.id),y=o?.[f.id],M=m===void 0&&!y?i:void 0;if(!M){s[f.id]=h;return}const x=l[f.id].tickNumber,w=yt(f,"x",n,u,t,M);s[f.id]=zr(f,"x",u,t,w,x,a)}),s}),As=b.createSelectorMemoized(V,j,ce,Pe,Pr,it,on,function(t,n,r,o,i,a,{axes:c,domains:l}){const s={};return c?.forEach((f,u)=>{const h=l[f.id].domain;if(me(f)||ge(f)){s[f.id]=h;return}const m=r?.get(f.id),y=o?.[f.id],M=m===void 0&&!y?i:void 0;if(!M){s[f.id]=h;return}const x=l[f.id].tickNumber,w=yt(f,"y",n,u,t,M);s[f.id]=zr(f,"y",u,t,w,x,a)}),s}),Hr=b.createSelectorMemoized(oe,ks,function(t,n){const r={};return t?.forEach(o=>{const i=o,a=n[i.id];r[i.id]=Fr(i,a)}),r}),Wr=b.createSelectorMemoized(ae,As,function(t,n){const r={};return t?.forEach(o=>{const i=o,a=n[i.id];r[i.id]=Fr(i,a)}),r}),Ds=b.createSelectorMemoized(oe,Hr,G,ce,function(t,n,r,o){const i={};return t?.forEach(a=>{const c=a,l=o?.get(c.id),s=l?[l.start,l.end]:[0,100],f=_r(r,"x",c),u=n[c.id].copy(),h=Er(f,s);u.range(h),i[c.id]=u}),i}),Is=b.createSelectorMemoized(ae,Wr,G,ce,function(t,n,r,o){const i={};return t?.forEach(a=>{const c=a,l=o?.get(c.id),s=l?[l.start,l.end]:[0,100],f=_r(r,"y",c),u=n[c.id].copy(),h=xt(u)?f.reverse():f,m=Er(h,s);u.range(m),i[c.id]=u}),i}),Mt=b.createSelectorMemoized(G,V,j,ce,rn,Ds,function(t,n,r,o,{axes:i,domains:a},c){return Ur({scales:c,drawingArea:t,formattedSeries:n,axis:i,seriesConfig:r,axisDirection:"x",zoomMap:o,domains:a})}),wt=b.createSelectorMemoized(G,V,j,ce,on,Is,function(t,n,r,o,{axes:i,domains:a},c){return Ur({scales:c,drawingArea:t,formattedSeries:n,axis:i,seriesConfig:r,axisDirection:"y",zoomMap:o,domains:a})});b.createSelector(Mt,wt,(e,t,n)=>e?.axis[n]??t?.axis[n]);b.createSelector(oe,ae,(e,t,n)=>{const r=e?.find(o=>o.id===n)??t?.find(o=>o.id===n)??null;if(r)return r});const Ns=b.createSelector(oe,e=>e[0].id),Us=b.createSelector(ae,e=>e[0].id),_s=new Map,Fs=()=>_s,Es=b.createSelectorMemoized(V,Hr,Wr,Ns,Us,function(t,n,r,o,i){const a=t.scatter,c=new Map;return a&&a.seriesOrder.forEach(l=>{const{data:s,xAxisId:f=o,yAxisId:u=i}=a.series[l],h=new nn(s.length),m=n[f],y=r[u];for(const M of s)h.add(m(M.x),y(M.y));h.finish(),c.set(l,h)}),c});function an(e){return Ir.getTypes().has(e)}const Rs=(e,t,n,r,o,i,a)=>{const c=r==="rotation"?o[t].rotationExtremumGetter:o[t].radiusExtremumGetter,l=a[t]?.series??{},[s,f]=c?.({series:l,axis:n,axisIndex:i,isDefaultAxis:i===0})??[1/0,-1/0],[u,h]=e;return[Math.min(s,u),Math.max(f,h)]},Ys=(e,t,n,r,o)=>{const a=Object.keys(n).filter(an).reduce((c,l)=>Rs(c,l,e,t,n,r,o),[1/0,-1/0]);return Number.isNaN(a[0])||Number.isNaN(a[1])?[1/0,-1/0]:a},Ue=(e,t)=>e===void 0?t:Math.PI*e/180,zs=(e,t,n,r)=>{const o=new Set;return Object.keys(t).filter(an).forEach(a=>{const c=n[a]?.series??{},l=t[a].axisTooltipGetter?.(c);l!==void 0&&l.forEach(({axisId:s,direction:f})=>{f===e&&o.add(s??r)})}),o};function Os(e,t,n){if(t==="rotation"){if(n.scaleType==="point"){const r=[Ue(n.startAngle,0),Ue(n.endAngle,2*Math.PI)],o=r[1]-r[0];return o>Math.PI*2-.1&&(r[1]-=o/n.data.length),r}return[Ue(n.startAngle,0),Ue(n.endAngle,2*Math.PI)]}return[0,Math.min(e.height,e.width)/2]}const Ls=.2,$s=.1;function Gr({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:o}){if(n===void 0)return{axis:{},axisIds:[]};const i=zs(o,r,t,n[0].id),a={};return n.forEach((c,l)=>{const s=c,f=Os(e,o,s),[u,h]=Ys(s,o,r,l,t),m=!s.ignoreTooltip&&i.has(s.id),y=s.data??[];if(me(s)){const R=s.categoryGapRatio??Ls,X=s.barGapRatio??$s;if(a[s.id]=O._extends({offset:0,categoryGapRatio:R,barGapRatio:X,triggerTooltip:m},s,{data:y,scale:dt(s.data,f).paddingInner(R).paddingOuter(R/2),tickNumber:s.data.length,colorScale:s.colorMap&&(s.colorMap.type==="ordinal"?Ae(O._extends({values:s.data},s.colorMap)):Te(s.colorMap))}),ot(s.data)){const B=Yt(s.data,f,s.tickNumber);a[s.id].valueFormatter=s.valueFormatter??B}}if(ge(s)&&(a[s.id]=O._extends({offset:0,triggerTooltip:m},s,{data:y,scale:Ar(s.data,f),tickNumber:s.data.length,colorScale:s.colorMap&&(s.colorMap.type==="ordinal"?Ae(O._extends({values:s.data},s.colorMap)):Te(s.colorMap))}),ot(s.data))){const R=Yt(s.data,f,s.tickNumber);a[s.id].valueFormatter=s.valueFormatter??R}if(!Do(s))return;const M=s.scaleType??"linear",x=s.domainLimit??"nice",w=[s.min??u,s.max??h];if(typeof x=="function"){const{min:R,max:X}=x(u,h);w[0]=R,w[1]=X}const I=ht(s,w,tn(Math.abs(f[1]-f[0]))),A=kr(I,f),k=mt(M,w,f),F=x==="nice"?k.nice(I):k,[p,D]=F.domain(),E=[s.min??p,s.max??D];a[s.id]=O._extends({offset:0,triggerTooltip:m},s,{data:y,scaleType:M,scale:F.domain(E),tickNumber:A,colorScale:s.colorMap&&Te(s.colorMap)})}),{axis:a,axisIds:n.map(({id:c})=>c)}}const Xr=e=>e.polarAxis,Zr=b.createSelector(Xr,e=>e?.rotation),Ps=b.createSelector(Xr,e=>e?.radius),sn=b.createSelectorMemoized(Zr,G,V,j,(e,t,n,r)=>Gr({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"rotation"})),Hs=b.createSelectorMemoized(Ps,G,V,j,(e,t,n,r)=>Gr({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:"radius"}));function Ws(e){return{cx:e.left+e.width/2,cy:e.top+e.height/2}}const Gs=b.createSelectorMemoized(G,Ws),qr=()=>{const e=Vn.useContext(Lt);if(e==null)throw new Error(["MUI X Charts: Could not find the Chart context.","It looks like you rendered your component outside of a ChartDataProvider.","This can also happen if you are bundling multiple versions of the library."].join(`
2
- `));return e};function ue(){const e=qr();if(!e)throw new Error(["MUI X Charts: Could not find the charts context.","It looks like you rendered your component outside of a ChartContainer parent component."].join(`
3
- `));return e.store}function Xs(){return ue().use(G)}function Zs(){const e=ue(),{axis:t,axisIds:n}=e.use(Mt);return{xAxis:t,xAxisIds:n}}function qs(){const e=ue(),{axis:t,axisIds:n}=e.use(wt);return{yAxis:t,yAxisIds:n}}function js(e){const t=ue(),{axis:n,axisIds:r}=t.use(Mt),o=r[0];return n[o]}function Vs(e){const t=ue(),{axis:n,axisIds:r}=t.use(wt),o=r[0];return n[o]}function Bs(){const e=ue(),{axis:t,axisIds:n}=e.use(sn);return{rotationAxis:t,rotationAxisIds:n}}function Qs(e){const t=ue(),{axis:n,axisIds:r}=t.use(sn),o=r[0];return n[o]}exports.ChartContext=Lt;exports.DEFAULT_PIE_CHART_MARGIN=ko;exports.EMPTY_VISIBILITY_MAP=Qn;exports.defaultizeSeries=po;exports.defaultizeZoom=nr;exports.deg2rad=Ue;exports.getColorScale=Te;exports.getOrdinalColorScale=Ae;exports.interpolateDate=sr;exports.interpolateNumber=Re;exports.interpolateString=cr;exports.isBandScale=Nr;exports.isCartesianSeries=os;exports.isCartesianSeriesType=pt;exports.isDateData=ot;exports.isOrdinalScale=xt;exports.isPolarSeriesType=an;exports.selectorChartAxisZoomData=Ts;exports.selectorChartDefaultizedSeries=Kn;exports.selectorChartDrawingArea=G;exports.selectorChartPolarCenter=Gs;exports.selectorChartPropsHeight=mo;exports.selectorChartPropsWidth=ho;exports.selectorChartRadiusAxis=Hs;exports.selectorChartRawRotationAxis=Zr;exports.selectorChartRawXAxis=oe;exports.selectorChartRotationAxis=sn;exports.selectorChartSeriesConfig=j;exports.selectorChartSeriesEmptyFlatbushMap=Fs;exports.selectorChartSeriesFlatbushMap=Es;exports.selectorChartSeriesLayout=To;exports.selectorChartSeriesProcessed=V;exports.selectorChartSvgHeight=fo;exports.selectorChartSvgWidth=lo;exports.selectorChartXAxis=Mt;exports.selectorChartYAxis=wt;exports.selectorChartZoomIsInteracting=Ss;exports.selectorChartZoomOptionsLookup=Pe;exports.selectorIsItemVisibleGetter=Jn;exports.serializeIdentifier=Bn;exports.useChartContext=qr;exports.useDrawingArea=Xs;exports.useRotationAxes=Bs;exports.useRotationAxis=Qs;exports.useStore=ue;exports.useXAxes=Zs;exports.useXAxis=js;exports.useYAxes=qs;exports.useYAxis=Vs;