PageSourceSearch

https://agence-tribu.fr/assets/Admin-DFUo1DCV.js

js agence-tribu.fr collected 2026-09-30 06:37:28 UTC 611,339 bytes, 370 lines download raw bytes

1import{j as l,P as w1,S as Ni,b as j1,w as Vv,s as S1,O as O1,u as Wv,W as _1,n as A1,g as N1,p as P1,D as C1,o as Hv,r as $1,x as E1,q as T1,L as Gv,y as Kv,z as Xv,A as M1,E as Yv,I as k1,F as Jv,G as Zv,H as D1,J as Qv,V as I1,K as eg,M as tg,N as R1,Q as L1,U as rg,X as B1,Y as q1}from"./ui-vendor-BqP7nUKl.js";import{r as O,R as C,a as Ca,i as Vi,d as we,e as z1,N as F1,j as U1,u as V1}from"./react-vendor-DKmRkCg0.js";import{c as ae,b as W,T as W1,S as H1,d as G1,e as K1,f as X1,g as Y1,h as J1,s as Ne,N as Q,X as ac,V as Du,i as We,j as Iu,k as ce,U as Ru,t as mn,l as Z1,u as Q1}from"./index-B70RwDyr.js";import{a as ew,b as ng,c as tw,d as ag}from"./useVideos-CmoUL71w.js";import{B as zr,b as ig}from"./button-DqIdunGb.js";import{I as Z}from"./input-DXQ0J_JV.js";import{L as Y}from"./label-hXh--SCA.js";import{D as kt,b as Dt,d as It,c as Rt,a as rw,e as tn}from"./dialog-D6HUuE-a.js";import{C as nw,B as aw}from"./BriefForm-B-53OPjt.js";import{u as og,a as iw,b as ow,c as sw}from"./useCategories-BeeVQN5w.js";import{u as qt,b as zt,c as rn}from"./query-CrneLqUN.js";import{C as ne,a as Lu,b as Bu,c as lw,d as lo}from"./card-Dv0SWS47.js";import{B as Ce,H as cw,P as wt,W as qu,E as sg,u as uw,a as dw,b as zu,V as $a,F as yf,c as fw,d as pw,e as hw,f as mw,g as vw,h as lg,i as gw,j as yw,k as bw,I as bf,l as xw,p as ww,m as jw,L as xf}from"./useClientPortal-DXO1iA8H.js";import{F as Fu,S as ic,R as Sw}from"./switch-DEKu-PsM.js";import{E as Uu}from"./external-link-Ds8ourVZ.js";import{L as $t}from"./loader-circle-k8IP8IIL.js";import{C as Pi}from"./check-DCIR9CW8.js";import{u as Ow,a as _w,b as Aw,c as Nw}from"./useCaseStudies-DgdUCEqQ.js";import{u as Pw,a as Cw}from"./useCaseStudyVideos-Cu0bHaHx.js";import{T as Xr,C as cg}from"./textarea-DSYCTm_A.js";import{g as $w}from"./youtube-5uC0EreT.js";import{C as Vu}from"./chevron-down-kbo1wQFU.js";import{C as Ew,M as Tw,a as Mw}from"./mic-CUbPJpkU.js";import{A as ug,a as dg,b as fg,c as pg}from"./accordion-B-UzeCIZ.js";import{P as vs}from"./phone-DXpewElP.js";import{S as kw}from"./star-Bdl3oeG0.js";import{E as hg}from"./eye-bOCRCH6J.js";import{C as mg,a as Dw}from"./chevron-right-D7C5VI-Q.js";import{M as Wu}from"./mail-CfrXEUXr.js";import{F as Iw}from"./file-text-Dp1jh5TW.js";import"./supabase-Bd53hCCy.js";import"./motion-wteJqCuK.js";import"./arrow-left-BsEmW9mD.js";import"./arrow-right-5ZvL8dHM.js";import"./types-Brh0Yyyl.js";import"./portalClient-DFmoCVER.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Rw=ae("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Lw=ae("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const wf=ae("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const Bw=ae("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const qw=ae("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
27 * @license lucide-react v0.462.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const zw=ae("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
32 * @license lucide-react v0.462.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const oc=ae("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
37 * @license lucide-react v0.462.0 - ISC
38 *
39 * This source code is licensed under the ISC license.
40 * See the LICENSE file in the root directory of this source tree.
41 */const vg=ae("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const Fw=ae("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */const Hu=ae("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const Uw=ae("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
57 * @license lucide-react v0.462.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const gg=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
62 * @license lucide-react v0.462.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const Vw=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
67 * @license lucide-react v0.462.0 - ISC
68 *
69 * This source code is licensed under the ISC license.
70 * See the LICENSE file in the root directory of this source tree.
71 */const Ww=ae("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
72 * @license lucide-react v0.462.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const Hw=ae("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
77 * @license lucide-react v0.462.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */const Gw=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
82 * @license lucide-react v0.462.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const Kw=ae("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
87 * @license lucide-react v0.462.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const Xw=ae("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
92 * @license lucide-react v0.462.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const Yw=ae("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
97 * @license lucide-react v0.462.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const Jw=ae("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
102 * @license lucide-react v0.462.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const Gu=ae("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
107 * @license lucide-react v0.462.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */const Zw=ae("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
112 * @license lucide-react v0.462.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const Qw=ae("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
117 * @license lucide-react v0.462.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const ej=ae("MessageSquareMore",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M16 10h.01",key:"1m94wz"}]]);/**
122 * @license lucide-react v0.462.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const tj=ae("MessageSquarePlus",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]);/**
127 * @license lucide-react v0.462.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const rj=ae("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
132 * @license lucide-react v0.462.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const nj=ae("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
137 * @license lucide-react v0.462.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const aj=ae("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
142 * @license lucide-react v0.462.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
146 */const Ci=ae("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
147 * @license lucide-react v0.462.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const ij=ae("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/**
152 * @license lucide-react v0.462.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const yg=ae("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
157 * @license lucide-react v0.462.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const oj=ae("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/**
162 * @license lucide-react v0.462.0 - ISC
163 *
164 * This source code is licensed under the ISC license.
165 * See the LICENSE file in the root directory of this source tree.
166 */const Ku=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
167 * @license lucide-react v0.462.0 - ISC
168 *
169 * This source code is licensed under the ISC license.
170 * See the LICENSE file in the root directory of this source tree.
171 */const sc=ae("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
171y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
172 * @license lucide-react v0.462.0 - ISC
173 *
174 * This source code is licensed under the ISC license.
175 * See the LICENSE file in the root directory of this source tree.
176 */const bg=ae("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
177 * @license lucide-react v0.462.0 - ISC
178 *
179 * This source code is licensed under the ISC license.
180 * See the LICENSE file in the root directory of this source tree.
181 */const xg=ae("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/**
182 * @license lucide-react v0.462.0 - ISC
183 *
184 * This source code is licensed under the ISC license.
185 * See the LICENSE file in the root directory of this source tree.
186 */const Zt=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
187 * @license lucide-react v0.462.0 - ISC
188 *
189 * This source code is licensed under the ISC license.
190 * See the LICENSE file in the root directory of this source tree.
191 */const wg=ae("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
192 * @license lucide-react v0.462.0 - ISC
193 *
194 * This source code is licensed under the ISC license.
195 * See the LICENSE file in the root directory of this source tree.
196 */const sj=ae("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
197 * @license lucide-react v0.462.0 - ISC
198 *
199 * This source code is licensed under the ISC license.
200 * See the LICENSE file in the root directory of this source tree.
201 */const lj=ae("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]),xl=768;function cj(){const[e,t]=O.useState(void 0);return O.useEffect(()=>{const r=window.matchMedia(`(max-width: ${xl-1}px)`),n=()=>{t(window.innerWidth<xl)};return r.addEventListener("change",n),t(window.innerWidth<xl),()=>r.removeEventListener("change",n)},[]),!!e}var uj="Separator",jf="horizontal",dj=["horizontal","vertical"],jg=O.forwardRef((e,t)=>{const{decorative:r,orientation:n=jf,...a}=e,i=fj(n)?n:jf,s=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return l.jsx(w1.div,{"data-orientation":i,...s,...a,ref:t})});jg.displayName=uj;function fj(e){return dj.includes(e)}var Sg=jg;const Og=O.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},a)=>l.jsx(Sg,{ref:a,decorative:r,orientation:t,className:W("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Og.displayName=Sg.displayName;function Sf({className:e,...t}){return l.jsx("div",{className:W("animate-pulse rounded-md bg-muted",e),...t})}const pj="sidebar:state",hj=60*60*24*7,mj="16rem",vj="18rem",gj="3rem",yj="b",_g=O.createContext(null);function $i(){const e=O.useContext(_g);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Ag=O.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:a,children:i,...o},s)=>{const c=cj(),[u,f]=O.useState(!1),[d,p]=O.useState(e),h=t??d,g=O.useCallback(S=>{const j=typeof S=="function"?S(h):S;r?r(j):p(j),document.cookie=`${pj}=${j}; path=/; max-age=${hj}`},[r,h]),m=O.useCallback(()=>c?f(S=>!S):g(S=>!S),[c,g,f]);O.useEffect(()=>{const S=j=>
201{j.key===yj&&(j.metaKey||j.ctrlKey)&&(j.preventDefault(),m())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[m]);const v=h?"expanded":"collapsed",w=O.useMemo(()=>({state:v,open:h,setOpen:g,isMobile:c,openMobile:u,setOpenMobile:f,toggleSidebar:m}),[v,h,g,c,u,f,m]);return l.jsx(_g.Provider,{value:w,children:l.jsx(W1,{delayDuration:0,children:l.jsx("div",{style:{"--sidebar-width":mj,"--sidebar-width-icon":gj,...a},className:W("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",n),ref:s,...o,children:i})})})});Ag.displayName="SidebarProvider";const Ng=O.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:a,...i},o)=>{const{isMobile:s,state:c,openMobile:u,setOpenMobile:f}=$i();return r==="none"?l.jsx("div",{className:W("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",n),ref:o,...i,children:a}):s?l.jsx(H1,{open:u,onOpenChange:f,...i,children:l.jsx(G1,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":vj},side:e,children:l.jsx("div",{className:"flex h-full w-full flex-col",children:a})})}):l.jsxs("div",{ref:o,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?r:"","data-variant":t,"data-side":e,children:[l.jsx("div",{className:W("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),l.jsx("div",{className:W("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...i,children:l.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});Ng.displayName="Sidebar";const Pg=O.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:a}=$i();return l.jsxs(zr,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:W("h-7 w-7",e),onClick:i=>{t?.(i),a()},...r,children:[l.jsx(aj,{}),l.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Pg.displayName="SidebarTrigger";const bj=O.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=$i();return l.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:W("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});bj.displayName="SidebarRail";const xj=O.forwardRef(({className:e,...t},r)=>l.jsx("main",{ref:r,className:W("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-
201h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));xj.displayName="SidebarInset";const wj=O.forwardRef(({className:e,...t},r)=>l.jsx(Z,{ref:r,"data-sidebar":"input",className:W("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));wj.displayName="SidebarInput";const jj=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"header",className:W("flex flex-col gap-2 p-2",e),...t}));jj.displayName="SidebarHeader";const Sj=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"footer",className:W("flex flex-col gap-2 p-2",e),...t}));Sj.displayName="SidebarFooter";const Oj=O.forwardRef(({className:e,...t},r)=>l.jsx(Og,{ref:r,"data-sidebar":"separator",className:W("mx-2 w-auto bg-sidebar-border",e),...t}));Oj.displayName="SidebarSeparator";const Cg=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"content",className:W("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Cg.displayName="SidebarContent";const $g=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"group",className:W("relative flex w-full min-w-0 flex-col p-2",e),...t}));$g.displayName="SidebarGroup";const Eg=O.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?Ni:"div";return l.jsx(a,{ref:n,"data-sidebar":"group-label",className:W("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Eg.displayName="SidebarGroupLabel";const _j=O.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const a=t?Ni:"button";return l.jsx(a,{ref:n,"data-sidebar":"group-action",className:W("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});_j.displayName="SidebarGroupAction";const Tg=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"group-content",className:W("w-full text-sm",e),...t}));Tg.displayName="SidebarGroupContent";const Mg=O.forwardRef(({className:e,...t},r)=>l.jsx("ul",{ref:r,"data-sidebar":"menu",className:W("flex w-full min-w-0 flex-col gap-1",e),...t}));Mg.displayName="SidebarMenu";const kg=O.forwardRef(({className:e,...t},r)=>l.jsx("li",{ref:r,"data-sidebar":"menu-item",className:W("group/menu-item relative",e),...t}));kg.displayName="SidebarMenuItem";const Aj=J1("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Dg=O.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:a,className:i,...o},s)=>{const c=e?Ni:"button",{isMobile:u,state:f}=$i(),d=l.jsx(c,{ref:s,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:W(Aj({variant:r,size:n}),i),...o});
201return a?(typeof a=="string"&&(a={children:a}),l.jsxs(K1,{children:[l.jsx(X1,{asChild:!0,children:d}),l.jsx(Y1,{side:"right",align:"center",hidden:f!=="collapsed"||u,...a})]})):d});Dg.displayName="SidebarMenuButton";const Nj=O.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},a)=>{const i=t?Ni:"button";return l.jsx(i,{ref:a,"data-sidebar":"menu-action",className:W("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});Nj.displayName="SidebarMenuAction";const Pj=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:W("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Pj.displayName="SidebarMenuBadge";const Cj=O.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const a=O.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return l.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:W("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[t&&l.jsx(Sf,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),l.jsx(Sf,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Cj.displayName="SidebarMenuSkeleton";const $j=O.forwardRef(({className:e,...t},r)=>l.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:W("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));$j.displayName="SidebarMenuSub";const Ej=O.forwardRef(({...e},t)=>l.jsx("li",{ref:t,...e}));Ej.displayName="SidebarMenuSubItem";const Tj=O.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...a},i)=>{const o=e?Ni:"a";return l.jsx(o,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:W("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...a})});Tj.displayName="SidebarMenuSubButton";const Mj=()=>{const e=qt();return zt({mutationFn:async({videoId:t,categoryIds:r})=>{const{error:n}=await Ne.from("video_categories").delete().eq("video_id",t);if(n)throw n;if(r.length>0){const{error:a}=await Ne.from("video_categories").insert(r.map(i=>({video_id:t,category_id:i})));if(a)throw a}},onSuccess:()=>{e.invalidateQueries({queryKey:["video_categories"]}),e.invalidateQueries({queryKey:["videos"]})}})},kj=({open:e,onOpenChange:t,video:r})=>{const[n,a]=O.useState(""),[i,o]=O.useState(""),[s,c]=O.useState([]),u=ew(),f=ng(),d=Mj(),{data:p=[]}=og();O.useEffect(()=>{if(r){a(r.titre),o(r.url_video);const v=r.video_categories?.map(w=>w.category_id)||[];c(v)}else h()},[r,e]);const h=()=>{a(""),o(""),c([])},g=v=>{c(w=>w.includes(v)?w.filter(S=>S!==v):[...w,v])},m=async v=>{v.preventDefault();const w={titre:n,url_video:i,est_portfolio:!0};let S;r?(await f.mutateAsync({id:r.id,updates:w}),S=r.id):S=(await u.mutateAsync(w)).id,await d.mutateAsync({videoId:S,categoryIds:s}),t(!1),h()};return l.jsx(kt,{open:e,onOpenChange:t,children:l.jsxs(Dt,{className:"max-w-md",children:[l.jsx(It,{children:l.jsx(Rt,{children:r?"Modifier la vidéo":"Ajouter une vidéo"})}),l.jsxs("form",{onSubmit:m,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"titre",children:"Titre (pour identification) *"}),l.jsx(Z,{id:"titre",value:n,onChange:v=>a(v.target.value),placeholder:"Nom de la vidéo",required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"urlVideo",children:"URL de la vidéo *"}),l.jsx(Z,{id:"urlVideo",value:i,onChange:v=>{const w=v.target.value,S=w.match(/src=["']([^"']+)["']/i);o(S?S[1]:w)},placeholder:"YouTube ou Bunny (https://iframe.mediadelivery.net/embed/...) - colle l'URL ou l'iframe",required:!0}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Supporte YouTube (youtu.be, /shorts/...) et Bunny Stream (mediadelivery.net)."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{children:"Catégories"}),l.jsxs("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto border rounded-md p-3",children:[p.map(v=>l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx(nw,{id:`cat-${v.id}`,checked:s.includes(v.id),onCheckedChange:()=>g(v.id)}),l.jsx("label",{htmlFor:`cat-${v.id}`,className:"text-sm cursor-pointer",children:v.name})]},v.id)),p.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground col-span-2",children:"Aucune catégorie disponible. Créez-en dans la section Catégories."})]})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"L'ordre d'affichage se gère par glisser-déposer dans les zones."}),l.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[l.jsx(Q,{type:"button",variant:"outline",neon:!1,onClick:()=>t(!1),children:"Annuler"}),l.jsx(Q,{type:"submit",variant:"solid",disabled:u.isPending||f.isPending||d.isPending,children:u.isPending||f.isPending?"Enregistrement...":r?"Modifier":"Ajouter"})]})]})]})})};function Dj(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>n=>{t.forEach(a=>a(n))},t)}const gs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zn(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Xu(e){return"nodeType"in e}function Je(e){var t,r;return e?Zn(e)?e:Xu(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function Yu(e){const{Document:t}=Je(e);return e instanceof t}function Ei(e){return Zn(e)?!1:e instanceof Je(e).HTMLElement}function Ig(e){return e instanceof Je(e).SVGElement}function Qn(e){return e?Zn(e)?e.document:Xu(e)?Yu(e)?e:Ei(e)||Ig(e)?e.ownerDocument:document:document:document}const Lt=gs?O.useLayoutEffect:O.useEffect;function ys(e){const t=O.useRef(e);return Lt(()=>{t.current=e}),O.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.current==null?void 0:t.current(...n)},[])}function Ij(){const e=O.useRef(null),t=O.useCallback((n,a)=>{e.current=setInterval(n,a)},[]),r=O.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function qa(e,t){t===void 0&&(t=[e]);const r=O.useRef(e);return Lt(()=>{r.current!==e&&(r.current=e)},t),r}function Ti(e,t){const r=O.useRef();return O.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function co(e){const t=ys(e),r=O.useRef(null),n=O.useCallback(a=>{a!==r.current&&t?.(a,r.current),r.current=a},[]);return[r,n]}function uo(e){const t=O.useRef();return O.useEffect(()=>{t.current=e},[e]),t.current}let wl={};function Mi(e,t){return O.useMemo(()=>
201{if(t)return t;const r=wl[e]==null?0:wl[e]+1;return wl[e]=r,e+"-"+r},[e,t])}function Rg(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return n.reduce((i,o)=>{const s=Object.entries(o);for(const[c,u]of s){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const wn=Rg(1),za=Rg(-1);function Rj(e){return"clientX"in e&&"clientY"in e}function bs(e){if(!e)return!1;const{KeyboardEvent:t}=Je(e.target);return t&&e instanceof t}function Lj(e){if(!e)return!1;const{TouchEvent:t}=Je(e.target);return t&&e instanceof t}function fo(e){if(Lj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return Rj(e)?{x:e.clientX,y:e.clientY}:null}const $r=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[$r.Translate.toString(e),$r.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),Of="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Bj(e){return e.matches(Of)?e:e.querySelector(Of)}const qj={display:"none"};function zj(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:qj},r)}function Fj(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return C.createElement("div",{id:t,style:a,role:"status","aria-live":n,"aria-atomic":!0},r)}function Uj(){const[e,t]=O.useState("");return{announce:O.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const Lg=O.createContext(null);function Vj(e){const t=O.useContext(Lg);O.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Wj(){const[e]=O.useState(()=>new Set),t=O.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[O.useCallback(n=>{let{type:a,event:i}=n;e.forEach(o=>{var s;return(s=o[a])==null?void 0:s.call(o,i)})},[e]),t]}const Hj={draggable:`
202    To pick up a draggable item, press the space bar.
203    While dragging, use the arrow keys to move the item.
204    Press space again to drop the item in its new position, or press escape to cancel.
205  `},Gj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kj(e){let{announcements:t=Gj,container:r,hiddenTextDescribedById:n,screenReaderInstructions:a=Hj}=e;const{announce:i,announcement:o}=Uj(),s=Mi("DndLiveRegion"),[c,u]=O.useState(!1);if(O.useEffect(()=>{u(!0)},[]),Vj(O.useMemo(()=>({onDragStart(d){let{active:p}=d;i(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:h}=d;t.onDragMove&&i(t.onDragMove({active:p,over:h}))},onDragOver(d){let{active:p,over:h}=d;i(t.onDragOver({active:p,over:h}))},onDragEnd(d){let{active:p,over:h}=d;i(t.onDragEnd({active:p,over:h}))},onDragCancel(d){let{active:p,over:h}=d;i(t.onDragCancel({active:p,over:h}))}}),[i,t])),!c)return null;const f=C.createElement(C.Fragment,null,C.createElement(zj,{id:n,value:a.draggable}),C.createElement(Fj,{id:s,announcement:o}));return r?Ca.createPortal(f,r):f}var De;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(De||(De={}));function po(){}function _f(e,t){return O.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Xj(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return O.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const Bt=Object.freeze({x:0,y:0});function Bg(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Yj(e,t){const r=fo(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function qg(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function Jj(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function Af(e){let{left:t,top:r,height:n,width:a}=e;return[{x:t,y:r},{x:t+a,y:r},{x:t,y:r+n},{x:t+a,y:r+n}]}function zg(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function Nf(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const Zj=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=Nf(t,t.left,t.top),i=[];for(const o of n){const{id:s}=o,c=r.get(s);
205if(c){const u=Bg(Nf(c),a);i.push({id:s,data:{droppableContainer:o,value:u}})}}return i.sort(qg)},Qj=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=Af(t),i=[];for(const o of n){const{id:s}=o,c=r.get(s);if(c){const u=Af(c),f=a.reduce((p,h,g)=>p+Bg(u[g],h),0),d=Number((f/4).toFixed(4));i.push({id:s,data:{droppableContainer:o,value:d}})}}return i.sort(qg)};function eS(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),o=a-n,s=i-r;if(n<a&&r<i){const c=t.width*t.height,u=e.width*e.height,f=o*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const tS=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const a=[];for(const i of n){const{id:o}=i,s=r.get(o);if(s){const c=eS(s,t);c>0&&a.push({id:o,data:{droppableContainer:i,value:c}})}}return a.sort(Jj)};function rS(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Fg(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Bt}function nS(e){return function(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return a.reduce((o,s)=>({...o,top:o.top+e*s.y,bottom:o.bottom+e*s.y,left:o.left+e*s.x,right:o.right+e*s.x}),{...r})}}const aS=nS(1);function Ug(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function iS(e,t,r){const n=Ug(t);if(!n)return e;const{scaleX:a,scaleY:i,x:o,y:s}=n,c=e.left-o-(1-a)*parseFloat(r),u=e.top-s-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),f=a?e.width/a:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const oS={ignoreTransform:!1};function ea(e,t){t===void 0&&(t=oS);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=Je(e).getComputedStyle(e);u&&(r=iS(r,u,f))}const{top:n,left:a,width:i,height:o,bottom:s,right:c}=r;return{top:n,left:a,width:i,height:o,bottom:s,right:c}}function Pf(e){return ea(e,{ignoreTransform:!0})}function sS(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function lS(e,t){return t===void 0&&(t=Je(e).getComputedStyle(e)),t.position==="fixed"}function cS(e,t){t===void 0&&(t=Je(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const i=t[a];return typeof i=="string"?r.test(i):!1})}function xs(e,t){const r=[];function n(a){if(t!=null&&r.length>=t||!a)return r;if(Yu(a)&&a.scrollingElement!=null&&!r.includes(a.scrollingElement))return r.push(a.scrollingElement),r;if(!Ei(a)||Ig(a)||r.includes(a))return r;const i=Je(e).getComputedStyle(a);return a!==e&&cS(a,i)&&r.push(a),lS(a,i)?r:n(a.parentNode)}return e?n(e):r}function Vg(e){const[t]=xs(e,1);return t??null}function jl(e){return!gs||!e?null:Zn(e)?e:Xu(e)?Yu(e)||e===Qn(e).scrollingElement?window:Ei(e)?e:null:null}function Wg(e){return Zn(e)?e.scrollX:e.scrollLeft}function Hg(e){return Zn(e)?e.scrollY:e.scrollTop}function lc(e){return{x:Wg(e),y:Hg(e)}}var Be;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Be||(Be={}));function Gg(e){return!gs||!e?!1:e===document.scrollingElement}function Kg(e){const t={x:0,y:0},r=Gg(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},a=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,o=e.scrollTop>=n.y,s=e.scrollLeft>=n.x;return{isTop:a,isLeft:i,isBottom:o,isRight:s,maxScroll:n,minScroll:t}}const uS={x:.2,y:.2};function dS(e,t,r,n,a){let{top:i,left:o,right:s,bottom:c}=r;n===void 0&&(n=10),a===void 0&&(a=uS);const{isTop:u,isBottom:f,isLeft:d,isRight:p}=Kg(e),h={x:0,y:0},g={x:0,y:0},m={height:t.height*a.y,width:t.width*a.x};return!u&&i<=t.top+m.height?(h.y=Be.Backward,g.y=n*Math.abs((t.top+m.height-i)/m.height)):!f&&c>=t.bottom-m.height&&(h.y=Be.Forward,g.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!p&&s>=t.right-m.width?(h.x=Be.Forward,g.x=n*Math.abs((t.right-m.width-s)/m.width)):!d&&o<=t.left+m.width&&(h.x=Be.Backward,g.x=n*Math.abs((t.left+m.width-o)/m.width)),{direction:h,speed:g}}function fS(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:o}=window;return{top:0,left:0,right:i,bottom:o,width:i,height:o}}const{top:t,left:r,right:n,bottom:a}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Xg(e){return e.reduce((t,r)=>wn(t,lc(r)),Bt)}function pS(e){return e.reduce((t,r)=>t+Wg(r),0)}function hS(e){return e.reduce((t,r)=>t+Hg(r),0)}function Yg(e,t){if(t===void 0&&(t=ea),!e)return;const{top:r,left:n,bottom:a,right:i}=t(e);Vg(e)&&(a<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const mS=[["x",["left","right"],pS],["y",["top","bottom"],hS]];class Ju{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=xs(r),a=Xg(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,o,s]of mS)for(const c of o)Object.defineProperty(this,c,{get:()=>{const u=s(n),f=a[i]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ta{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>
205{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var a;(a=this.target)==null||a.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function vS(e){const{EventTarget:t}=Je(e);return e instanceof t?e:Qn(e)}function Sl(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var mt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(mt||(mt={}));function Cf(e){e.preventDefault()}function gS(e){e.stopPropagation()}var le;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(le||(le={}));const Jg={start:[le.Space,le.Enter],cancel:[le.Esc],end:[le.Space,le.Enter,le.Tab]},yS=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case le.Right:return{...r,x:r.x+25};case le.Left:return{...r,x:r.x-25};case le.Down:return{...r,y:r.y+25};case le.Up:return{...r,y:r.y-25}}};class Zu{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Ta(Qn(r)),this.windowListeners=new Ta(Je(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(mt.Resize,this.handleCancel),this.windowListeners.add(mt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(mt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Yg(n),r(Bt)}handleKeyDown(t){if(bs(t)){const{active:r,context:n,options:a}=this.props,{keyboardCodes:i=Jg,coordinateGetter:o=yS,scrollBehavior:s="smooth"}=a,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=n.current,f=u?{x:u.left,y:u.top}:Bt;this.referenceCoordinates||(this.referenceCoordinates=f);const d=o(t,{active:r,context:n.current,currentCoordinates:f});if(d){const p=za(d,f),h={x:0,y:0},{scrollableAncestors:g}=n.current;for(const m of g){const v=t.code,{isTop:w,isRight:S,isLeft:j,isBottom:_,maxScroll:y,minScroll:b}=Kg(m),x=fS(m),A={x:Math.min(v===le.Right?x.right-x.width/2:x.right,Math.max(v===le.Right?x.left:x.left+x.width/2,d.x)),y:Math.min(v===le.Down?x.bottom-x.height/2:x.bottom,Math.max(v===le.Down?x.top:x.top+x.height/2,d.y))},N=v===le.Right&&!S||v===le.Left&&!j,E=v===le.Down&&!_||v===le.Up&&!w;if(N&&A.x!==d.x){const P=m.scrollLeft+p.x,$=v===le.Right&&P<=y.x||v===le.Left&&P>=b.x;if($&&!p.y){m.scrollTo({left:P,behavior:s});return}$?h.x=m.scrollLeft-P:h.x=v===le.Right?m.scrollLeft-y.x:m.scrollLeft-b.x,h.x&&m.scrollBy({left:-h.x,behavior:s});break}else if(E&&A.y!==d.y){const P=m.scrollTop+p.y,$=v===le.Down&&P<=y.y||v===le.Up&&P>=b.y;if($&&!p.x){m.scrollTo({top:P,behavior:s});return}$?h.y=m.scrollTop-P:h.y=v===le.Down?m.scrollTop-y.y:m.scrollTop-b.y,h.y&&m.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,wn(za(d,this.referenceCoordinates),h))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Zu.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=Jg,onActivation:a}=t,{active:i}=r;const{code:o}=e.nativeEvent;if(n.start.includes(o)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];function $f(e){return!!(e&&"distance"in e)}function Ef(e){return!!(e&&"delay"in e)}class Qu{constructor(t,r,n){var a;n===void 0&&(n=vS(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:o}=i;this.props=t,this.events=r,this.document=Qn(o),this.documentListeners=new Ta(this.document),this.listeners=new Ta(n),this.windowListeners=new Ta(Je(o)),this.initialCoordinates=(a=fo(i))!=null?a:Bt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(mt.Resize,this.handleCancel),this.windowListeners.add(mt.DragStart,Cf),this.windowListeners.add(mt.VisibilityChange,this.handleCancel),this.windowListeners.add(mt.ContextMenu,Cf),this.documentListeners.add(mt.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ef(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if($f(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:a}=this.props;a(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(mt.Click,gS,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(mt.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:a,props:i}=this,{onMove:o,options:{activationConstraint:s}}=i;if(!a)return;const c=(r=fo(t))!=null?r:Bt,u=za(a,c);
205if(!n&&s){if($f(s)){if(s.tolerance!=null&&Sl(u,s.tolerance))return this.handleCancel();if(Sl(u,s.distance))return this.handleStart()}if(Ef(s)&&Sl(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),o(c)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===le.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const bS={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ed extends Qu{constructor(t){const{event:r}=t,n=Qn(r.target);super(t,bS,n)}}ed.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n?.({event:r}),!0)}}];const xS={move:{name:"mousemove"},end:{name:"mouseup"}};var cc;(function(e){e[e.RightClick=2]="RightClick"})(cc||(cc={}));class wS extends Qu{constructor(t){super(t,xS,Qn(t.event.target))}}wS.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===cc.RightClick?!1:(n?.({event:r}),!0)}}];const Ol={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class jS extends Qu{constructor(t){super(t,Ol)}static setup(){return window.addEventListener(Ol.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Ol.move.name,t)};function t(){}}}jS.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:a}=r;return a.length>1?!1:(n?.({event:r}),!0)}}];var Ma;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ma||(Ma={}));var ho;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ho||(ho={}));function SS(e){let{acceleration:t,activator:r=Ma.Pointer,canScroll:n,draggingRect:a,enabled:i,interval:o=5,order:s=ho.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:p}=e;const h=_S({delta:d,disabled:!i}),[g,m]=Ij(),v=O.useRef({x:0,y:0}),w=O.useRef({x:0,y:0}),S=O.useMemo(()=>{switch(r){case Ma.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ma.DraggableRect:return a}},[r,a,c]),j=O.useRef(null),_=O.useCallback(()=>{const b=j.current;if(!b)return;const x=v.current.x*w.current.x,A=v.current.y*w.current.y;b.scrollBy(x,A)},[]),y=O.useMemo(()=>s===ho.TreeOrder?[...u].reverse():u,[s,u]);O.useEffect(()=>{if(!i||!u.length||!S){m();return}for(const b of y){if(n?.(b)===!1)continue;const x=u.indexOf(b),A=f[x];if(!A)continue;const{direction:N,speed:E}=dS(b,A,S,t,p);for(const P of["x","y"])h[P][N[P]]||(E[P]=0,N[P]=0);if(E.x>0||E.y>0){m(),j.current=b,g(_,o),v.current=E,w.current=N;return}}v.current={x:0,y:0},w.current={x:0,y:0},m()},[t,_,n,m,i,o,JSON.stringify(S),JSON.stringify(h),g,u,y,f,JSON.stringify(p)])}const OS={x:{[Be.Backward]:!1,[Be.Forward]:!1},y:{[Be.Backward]:!1,[Be.Forward]:!1}};function _S(e){let{delta:t,disabled:r}=e;const n=uo(t);return Ti(a=>{if(r||!n||!a)return OS;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Be.Backward]:a.x[Be.Backward]||i.x===-1,[Be.Forward]:a.x[Be.Forward]||i.x===1},y:{[Be.Backward]:a.y[Be.Backward]||i.y===-1,[Be.Forward]:a.y[Be.Forward]||i.y===1}}},[r,t,n])}function AS(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return Ti(a=>{var i;return t==null?null:(i=n??a)!=null?i:null},[n,t])}function NS(e,t){return O.useMemo(()=>e.reduce((r,n)=>{const{sensor:a}=n,i=a.activators.map(o=>({eventName:o.eventName,handler:t(o.handler,n)}));return[...r,...i]},[]),[e,t])}var Fa;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Fa||(Fa={}));var uc;(function(e){e.Optimized="optimized"})(uc||(uc={}));const Tf=new Map;function PS(e,t){let{dragging:r,dependencies:n,config:a}=t;const[i,o]=O.useState(null),{frequency:s,measure:c,strategy:u}
205=a,f=O.useRef(e),d=v(),p=qa(d),h=O.useCallback(function(w){w===void 0&&(w=[]),!p.current&&o(S=>S===null?w:S.concat(w.filter(j=>!S.includes(j))))},[p]),g=O.useRef(null),m=Ti(w=>{if(d&&!r)return Tf;if(!w||w===Tf||f.current!==e||i!=null){const S=new Map;for(let j of e){if(!j)continue;if(i&&i.length>0&&!i.includes(j.id)&&j.rect.current){S.set(j.id,j.rect.current);continue}const _=j.node.current,y=_?new Ju(c(_),_):null;j.rect.current=y,y&&S.set(j.id,y)}return S}return w},[e,i,r,d,c]);return O.useEffect(()=>{f.current=e},[e]),O.useEffect(()=>{d||h()},[r,d]),O.useEffect(()=>{i&&i.length>0&&o(null)},[JSON.stringify(i)]),O.useEffect(()=>{d||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{h(),g.current=null},s))},[s,d,h,...n]),{droppableRects:m,measureDroppableContainers:h,measuringScheduled:i!=null};function v(){switch(u){case Fa.Always:return!1;case Fa.BeforeDragging:return r;default:return!r}}}function td(e,t){return Ti(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function CS(e,t){return td(e,t)}function $S(e){let{callback:t,disabled:r}=e;const n=ys(t),a=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return O.useEffect(()=>()=>a?.disconnect(),[a]),a}function ws(e){let{callback:t,disabled:r}=e;const n=ys(t),a=O.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return O.useEffect(()=>()=>a?.disconnect(),[a]),a}function ES(e){return new Ju(ea(e),e)}function Mf(e,t,r){t===void 0&&(t=ES);const[n,a]=O.useState(null);function i(){a(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??r)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const o=$S({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),s=ws({callback:i});return Lt(()=>{i(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),n}function TS(e){const t=td(e);return Fg(e,t)}const kf=[];function MS(e){const t=O.useRef(e),r=Ti(n=>e?n&&n!==kf&&e&&t.current&&e.parentNode===t.current.parentNode?n:xs(e):kf,[e]);return O.useEffect(()=>{t.current=e},[e]),r}function kS(e){const[t,r]=O.useState(null),n=O.useRef(e),a=O.useCallback(i=>{const o=jl(i.target);o&&r(s=>s?(s.set(o,lc(o)),new Map(s)):null)},[]);return O.useEffect(()=>{const i=n.current;if(e!==i){o(i);const s=e.map(c=>{const u=jl(c);return u?(u.addEventListener("scroll",a,{passive:!0}),[u,lc(u)]):null}).filter(c=>c!=null);r(s.length?new Map(s):null),n.current=e}return()=>{o(e),o(i)};function o(s){s.forEach(c=>{const u=jl(c);u?.removeEventListener("scroll",a)})}},[a,e]),O.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,o)=>wn(i,o),Bt):Xg(e):Bt,[e,t])}function Df(e,t){t===void 0&&(t=[]);const r=O.useRef(null);return O.useEffect(()=>{r.current=null},t),O.useEffect(()=>{const n=e!==Bt;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?za(e,r.current):Bt}function DS(e){O.useEffect(()=>{if(!gs)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function IS(e,t){return O.useMemo(()=>e.reduce((r,n)=>{let{eventName:a,handler:i}=n;return r[a]=o=>{i(o,t)},r},{}),[e,t])}function Zg(e){return O.useMemo(()=>e?sS(e):null,[e])}const If=[];function RS(e,t){t===void 0&&(t=ea);const[r]=e,n=Zg(r?Je(r):null),[a,i]=O.useState(If);function o(){i(()=>e.length?e.map(c=>Gg(c)?n:new Ju(t(c),c)):If)}const s=ws({callback:o});return Lt(()=>{s?.disconnect(),o(),e.forEach(c=>s?.observe(c))},[e]),a}function Qg(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ei(t)?t:e}function LS(e){let{measure:t}=e;const[r,n]=O.useState(null),a=O.useCallback(u=>{for(const{target:f}of u)if(Ei(f)){n(d=>{const p=t(f);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),i=ws({callback:a}),o=O.useCallback(u=>{const f=Qg(u);i?.disconnect(),f&&i?.observe(f),n(f?t(f):null)},[t,i]),[s,c]=co(o);return O.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const BS=[{sensor:ed,options:{}},{sensor:Zu,options:{}}],qS={current:{}},so={draggable:{measure:Pf},droppable:{measure:Pf,strategy:Fa.WhileDragging,frequency:uc.Optimized},dragOverlay:{measure:ea}};class ka extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const zS={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ka,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:po},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:so,measureDroppableContainers:po,windowRect:null,measuringScheduled:!1},ey={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:po,draggableNodes:new Map,over:null,measureDroppableContainers:po},ki=O.createContext(ey),ty=O.createContext(zS);function FS(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ka}}}function US(e,t){switch(t.type){case De.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case De.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case De.DragEnd:case De.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case De.RegisterDroppable:{const{element:r}=t,{id:n}
205=r,a=new ka(e.droppable.containers);return a.set(n,r),{...e,droppable:{...e.droppable,containers:a}}}case De.SetDroppableDisabled:{const{id:r,key:n,disabled:a}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new ka(e.droppable.containers);return o.set(r,{...i,disabled:a}),{...e,droppable:{...e.droppable,containers:o}}}case De.UnregisterDroppable:{const{id:r,key:n}=t,a=e.droppable.containers.get(r);if(!a||n!==a.key)return e;const i=new ka(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function VS(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:a}=O.useContext(ki),i=uo(n),o=uo(r?.id);return O.useEffect(()=>{if(!t&&!n&&i&&o!=null){if(!bs(i)||document.activeElement===i.target)return;const s=a.get(o);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=Bj(f);if(d){d.focus();break}}})}},[n,t,a,o,i]),null}function ry(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((a,i)=>i({transform:a,...n}),r):r}function WS(e){return O.useMemo(()=>({draggable:{...so.draggable,...e?.draggable},droppable:{...so.droppable,...e?.droppable},dragOverlay:{...so.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function HS(e){let{activeNode:t,measure:r,initialRect:n,config:a=!0}=e;const i=O.useRef(!1),{x:o,y:s}=typeof a=="boolean"?{x:a,y:a}:a;Lt(()=>{if(!o&&!s||!t){i.current=!1;return}if(i.current||!n)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=r(u),d=Fg(f,n);if(o||(d.x=0),s||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=Vg(u);p&&p.scrollBy({top:d.y,left:d.x})}},[t,o,s,n,r])}const js=O.createContext({...Bt,scaleX:1,scaleY:1});var Sr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Sr||(Sr={}));const GS=O.memo(function(t){var r,n,a,i;let{id:o,accessibility:s,autoScroll:c=!0,children:u,sensors:f=BS,collisionDetection:d=tS,measuring:p,modifiers:h,...g}=t;const m=O.useReducer(US,void 0,FS),[v,w]=m,[S,j]=Wj(),[_,y]=O.useState(Sr.Uninitialized),b=_===Sr.Initialized,{draggable:{active:x,nodes:A,translate:N},droppable:{containers:E}}=v,P=x!=null?A.get(x):null,$=O.useRef({initial:null,translated:null}),T=O.useMemo(()=>{var He;return x!=null?{id:x,data:(He=P?.data)!=null?He:qS,rect:$}:null},[x,P]),k=O.useRef(null),[M,I]=O.useState(null),[R,z]=O.useState(null),q=qa(g,Object.values(g)),K=Mi("DndDescribedBy",o),X=O.useMemo(()=>E.getEnabled(),[E]),L=WS(p),{droppableRects:V,measureDroppableContainers:se,measuringScheduled:he}=PS(X,{dragging:b,dependencies:[N.x,N.y],config:L.droppable}),ge=AS(A,x),lt=O.useMemo(()=>R?fo(R):null,[R]),_e=x1(),U=CS(ge,L.draggable.measure);HS({activeNode:x!=null?A.get(x):null,config:_e.layoutShiftCompensation,initialRect:U,measure:L.draggable.measure});const H=Mf(ge,L.draggable.measure,U),ee=Mf(ge?ge.parentElement:null),B=O.useRef({activatorEvent:null,active:null,activeNode:ge,collisionRect:null,collisions:null,droppableRects:V,draggableNodes:A,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=E.getNodeFor((r=B.current.over)==null?void 0:r.id),te=LS({measure:L.dragOverlay.measure}),ye=(n=te.nodeRef.current)!=null?n:ge,be=b?(a=te.rect)!=null?a:H:null,ze=!!(te.nodeRef.current&&te.rect),_t=TS(ze?null:H),Ut=Zg(ye?Je(ye):null),et=MS(b?fe??ge:null),ct=RS(et),ut=ry(h,{transform:{x:N.x-_t.x,y:N.y-_t.y,scaleX:1,scaleY:1},activatorEvent:R,active:T,activeNodeRect:H,containerNodeRect:ee,draggingNodeRect:be,over:B.current.over,overlayNodeRect:te.rect,scrollableAncestors:et,scrollableAncestorRects:ct,windowRect:Ut}),ln=lt?wn(lt,N):null,ha=kS(et),Ui=Df(ha),h1=Df(ha,[H]),cn=wn(ut,Ui),un=be?aS(be,ut):null,ma=T&&un?d({active:T,collisionRect:un,droppableRects:V,droppableContainers:X,pointerCoordinates:ln}):null,hf=zg(ma,"id"),[yr,mf]=O.useState(null),m1=ze?ut:wn(ut,h1),v1=rS(m1,(i=yr?.rect)!=null?i:null,H),yl=O.useRef(null),vf=O.useCallback((He,tt)=>{let{sensor:rt,options:br}=tt;
205if(k.current==null)return;const dt=A.get(k.current);if(!dt)return;const nt=He.nativeEvent,Vt=new rt({active:k.current,activeNode:dt,event:nt,options:br,context:B,onAbort(Fe){if(!A.get(Fe))return;const{onDragAbort:Wt}=q.current,er={id:Fe};Wt?.(er),S({type:"onDragAbort",event:er})},onPending(Fe,xr,Wt,er){if(!A.get(Fe))return;const{onDragPending:ga}=q.current,wr={id:Fe,constraint:xr,initialCoordinates:Wt,offset:er};ga?.(wr),S({type:"onDragPending",event:wr})},onStart(Fe){const xr=k.current;if(xr==null)return;const Wt=A.get(xr);if(!Wt)return;const{onDragStart:er}=q.current,va={activatorEvent:nt,active:{id:xr,data:Wt.data,rect:$}};Ca.unstable_batchedUpdates(()=>{er?.(va),y(Sr.Initializing),w({type:De.DragStart,initialCoordinates:Fe,active:xr}),S({type:"onDragStart",event:va}),I(yl.current),z(nt)})},onMove(Fe){w({type:De.DragMove,coordinates:Fe})},onEnd:dn(De.DragEnd),onCancel:dn(De.DragCancel)});yl.current=Vt;function dn(Fe){return async function(){const{active:Wt,collisions:er,over:va,scrollAdjustedTranslate:ga}=B.current;let wr=null;if(Wt&&ga){const{cancelDrop:ya}=q.current;wr={activatorEvent:nt,active:Wt,collisions:er,delta:ga,over:va},Fe===De.DragEnd&&typeof ya=="function"&&await Promise.resolve(ya(wr))&&(Fe=De.DragCancel)}k.current=null,Ca.unstable_batchedUpdates(()=>{w({type:Fe}),y(Sr.Uninitialized),mf(null),I(null),z(null),yl.current=null;const ya=Fe===De.DragEnd?"onDragEnd":"onDragCancel";if(wr){const bl=q.current[ya];bl?.(wr),S({type:ya,event:wr})}})}}},[A]),g1=O.useCallback((He,tt)=>(rt,br)=>{const dt=rt.nativeEvent,nt=A.get(br);if(k.current!==null||!nt||dt.dndKit||dt.defaultPrevented)return;const Vt={active:nt};He(rt,tt.options,Vt)===!0&&(dt.dndKit={capturedBy:tt.sensor},k.current=br,vf(rt,tt))},[A,vf]),gf=NS(f,g1);DS(f),Lt(()=>{H&&_===Sr.Initializing&&y(Sr.Initialized)},[H,_]),O.useEffect(()=>{const{onDragMove:He}=q.current,{active:tt,activatorEvent:rt,collisions:br,over:dt}=B.current;if(!tt||!rt)return;const nt={active:tt,activatorEvent:rt,collisions:br,delta:{x:cn.x,y:cn.y},over:dt};Ca.unstable_batchedUpdates(()=>{He?.(nt),S({type:"onDragMove",event:nt})})},[cn.x,cn.y]),O.useEffect(()=>{const{active:He,activatorEvent:tt,collisions:rt,droppableContainers:br,scrollAdjustedTranslate:dt}=B.current;if(!He||k.current==null||!tt||!dt)return;const{onDragOver:nt}=q.current,Vt=br.get(hf),dn=Vt&&Vt.rect.current?{id:Vt.id,rect:Vt.rect.current,data:Vt.data,disabled:Vt.disabled}:null,Fe={active:He,activatorEvent:tt,collisions:rt,delta:{x:dt.x,y:dt.y},over:dn};Ca.unstable_batchedUpdates(()=>{mf(dn),nt?.(Fe),S({type:"onDragOver",event:Fe})})},[hf]),Lt(()=>{B.current={activatorEvent:R,active:T,activeNode:ge,collisionRect:un,collisions:ma,droppableRects:V,draggableNodes:A,draggingNode:ye,draggingNodeRect:be,droppableContainers:E,over:yr,scrollableAncestors:et,scrollAdjustedTranslate:cn},$.current={initial:be,translated:un}},[T,ge,ma,un,A,ye,be,V,E,yr,et,cn]),SS({..._e,delta:N,draggingRect:un,pointerCoordinates:ln,scrollableAncestors:et,scrollableAncestorRects:ct});const y1=O.useMemo(()=>({active:T,activeNode:ge,activeNodeRect:H,activatorEvent:R,collisions:ma,containerNodeRect:ee,dragOverlay:te,draggableNodes:A,droppableContainers:E,droppableRects:V,over:yr,measureDroppableContainers:se,scrollableAncestors:et,scrollableAncestorRects:ct,measuringConfiguration:L,measuringScheduled:he,windowRect:Ut}),[T,ge,H,R,ma,ee,te,A,E,V,yr,se,et,ct,L,he,Ut]),b1=O.useMemo(()=>({activatorEvent:R,activators:gf,active:T,activeNodeRect:H,ariaDescribedById:{draggable:K},dispatch:w,draggableNodes:A,over:yr,measureDroppableContainers:se}),[R,gf,T,H,w,K,A,yr,se]);return C.createElement(Lg.Provider,{value:j},C.createElement(ki.Provider,{value:b1},C.createElement(ty.Provider,{value:y1},C.createElement(js.Provider,{value:v1},u)),C.createElement(VS,{disabled:s?.restoreFocus===!1})),C.createElement(Kj,{...s,hiddenTextDescribedById:K}));function x1(){const He=M?.autoScrollEnabled===!1,tt=typeof c=="object"?c.enabled===!1:c===!1,rt=b&&!He&&!tt;return typeof c=="object"?{...c,enabled:rt}:{enabled:rt}}}),KS=O.createContext(null),Rf="button",XS="Draggable";function YS(e){let{id:t,data:r,disabled:n=!1,attributes:a}=e;const i=Mi(XS),{activators:o,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:p}=O.useContext(ki),{role:h=Rf,roleDescription:g="draggable",tabIndex:m=0}=a??{},v=c?.id===t,w=O.useContext(v?js:KS),[S,j]=co(),[_,y]=co(),b=IS(o,t),x=qa(r);Lt(()=>(d.set(t,{id:t,key:i,node:S,activatorNode:_,data:x}),()=>{const N=d.get(t);N&&N.key===i&&d.delete(t)}),[d,t]);const A=O.useMemo(()=>({role:h,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&h===Rf?!0:void 0,"aria-roledescription":g,"aria-describedby":f.draggable}),[n,h,m,v,g,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:A,isDragging:v,listeners:n?void 0:b,node:S,over:p,setNodeRef:j,setActivatorNodeRef:y,transform:w}}function ny(){return O.useContext(ty)}const JS="Droppable",ZS={timeout:25};function ay(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:a}=e;const i=Mi(JS),{active:o,dispatch:s,over:c,measureDroppableContainers:u}=O.useContext(ki),f=O.useRef({disabled:r}),d=O.useRef(!1),p=O.useRef(null),h=O.useRef(null),{disabled:g,updateMeasurementsFor:m,timeout:v}={...ZS,...a},w=qa(m??n),S=O.useCallback(()=>
205{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(w.current)?w.current:[w.current]),h.current=null},v)},[v]),j=ws({callback:S,disabled:g||!o}),_=O.useCallback((A,N)=>{j&&(N&&(j.unobserve(N),d.current=!1),A&&j.observe(A))},[j]),[y,b]=co(_),x=qa(t);return O.useEffect(()=>{!j||!y.current||(j.disconnect(),d.current=!1,j.observe(y.current))},[y,j]),O.useEffect(()=>(s({type:De.RegisterDroppable,element:{id:n,key:i,disabled:r,node:y,rect:p,data:x}}),()=>s({type:De.UnregisterDroppable,key:i,id:n})),[n]),O.useEffect(()=>{r!==f.current.disabled&&(s({type:De.SetDroppableDisabled,id:n,key:i,disabled:r}),f.current.disabled=r)},[n,i,r,s]),{active:o,rect:p,isOver:c?.id===n,node:y,over:c,setNodeRef:b}}function QS(e){let{animation:t,children:r}=e;const[n,a]=O.useState(null),[i,o]=O.useState(null),s=uo(r);return!r&&!n&&s&&a(s),Lt(()=>{if(!i)return;const c=n?.key,u=n?.props.id;if(c==null||u==null){a(null);return}Promise.resolve(t(u,i)).then(()=>{a(null)})},[t,n,i]),C.createElement(C.Fragment,null,r,n?O.cloneElement(n,{ref:o}):null)}const eO={x:0,y:0,scaleX:1,scaleY:1};function tO(e){let{children:t}=e;return C.createElement(ki.Provider,{value:ey},C.createElement(js.Provider,{value:eO},t))}const rO={position:"fixed",touchAction:"none"},nO=e=>bs(e)?"transform 250ms ease":void 0,aO=O.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:a,children:i,className:o,rect:s,style:c,transform:u,transition:f=nO}=e;if(!s)return null;const d=a?u:{...u,scaleX:1,scaleY:1},p={...rO,width:s.width,height:s.height,top:s.top,left:s.left,transform:$r.Transform.toString(d),transformOrigin:a&&n?Yj(n,s):void 0,transition:typeof f=="function"?f(n):f,...c};return C.createElement(r,{className:o,style:p,ref:t},i)}),iO=e=>t=>{let{active:r,dragOverlay:n}=t;const a={},{styles:i,className:o}=e;if(i!=null&&i.active)for(const[s,c]of Object.entries(i.active))c!==void 0&&(a[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,c));if(i!=null&&i.dragOverlay)for(const[s,c]of Object.entries(i.dragOverlay))c!==void 0&&n.node.style.setProperty(s,c);return o!=null&&o.active&&r.node.classList.add(o.active),o!=null&&o.dragOverlay&&n.node.classList.add(o.dragOverlay),function(){for(const[c,u]of Object.entries(a))r.node.style.setProperty(c,u);o!=null&&o.active&&r.node.classList.remove(o.active)}},oO=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:$r.Transform.toString(t)},{transform:$r.Transform.toString(r)}]},sO={duration:250,easing:"ease",keyframes:oO,sideEffects:iO({styles:{active:{opacity:"0"}}})};function lO(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:a}=e;return ys((i,o)=>{if(t===null)return;const s=r.get(i);if(!s)return;const c=s.node.current;if(!c)return;const u=Qg(o);if(!u)return;const{transform:f}=Je(o).getComputedStyle(o),d=Ug(f);if(!d)return;const p=typeof t=="function"?t:cO(t);return Yg(c,a.draggable.measure),p({active:{id:i,data:s.data,node:c,rect:a.draggable.measure(c)},draggableNodes:r,dragOverlay:{node:o,rect:a.dragOverlay.measure(u)},droppableContainers:n,measuringConfiguration:a,transform:d})})}function cO(e){const{duration:t,easing:r,sideEffects:n,keyframes:a}={...sO,...e};return i=>{let{active:o,dragOverlay:s,transform:c,...u}=i;if(!t)return;const f={x:s.rect.left-o.rect.left,y:s.rect.top-o.rect.top},d={scaleX:c.scaleX!==1?o.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?o.rect.height*c.scaleY/s.rect.height:1},p={x:c.x-f.x,y:c.y-f.y,...d},h=a({...u,active:o,dragOverlay:s,transform:{initial:c,final:p}}),[g]=h,m=h[h.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;const v=n?.({active:o,dragOverlay:s,...u}),w=s.node.animate(h,{duration:t,easing:r,fill:"forwards"});return new Promise(S=>{w.onfinish=()=>{v?.(),S()}})}}let Lf=0;function uO(e){return O.useMemo(()=>{if(e!=null)return Lf++,Lf},[e])}const dO=C.memo(e=>
205{let{adjustScale:t=!1,children:r,dropAnimation:n,style:a,transition:i,modifiers:o,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:h,draggableNodes:g,droppableContainers:m,dragOverlay:v,over:w,measuringConfiguration:S,scrollableAncestors:j,scrollableAncestorRects:_,windowRect:y}=ny(),b=O.useContext(js),x=uO(d?.id),A=ry(o,{activatorEvent:f,active:d,activeNodeRect:p,containerNodeRect:h,draggingNodeRect:v.rect,over:w,overlayNodeRect:v.rect,scrollableAncestors:j,scrollableAncestorRects:_,transform:b,windowRect:y}),N=td(p),E=lO({config:n,draggableNodes:g,droppableContainers:m,measuringConfiguration:S}),P=N?v.setRef:void 0;return C.createElement(tO,null,C.createElement(QS,{animation:E},d&&x?C.createElement(aO,{key:x,id:d.id,ref:P,as:s,activatorEvent:f,adjustScale:t,className:c,transition:i,rect:N,style:{zIndex:u,...a},transform:A},r):null))});function rd(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function fO(e,t){return e.reduce((r,n,a)=>{const i=t.get(n);return i&&(r[a]=i),r},Array(e.length))}function Wi(e){return e!==null&&e>=0}function pO(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function hO(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const iy=e=>{let{rects:t,activeIndex:r,overIndex:n,index:a}=e;const i=rd(t,n,r),o=t[a],s=i[a];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Hi={scaleX:1,scaleY:1},mO=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:a,rects:i,overIndex:o}=e;const s=(t=i[r])!=null?t:n;if(!s)return null;if(a===r){const u=i[o];return u?{x:0,y:r<o?u.top+u.height-(s.top+s.height):u.top-s.top,...Hi}:null}const c=vO(i,a,r);return a>r&&a<=o?{x:0,y:-s.height-c,...Hi}:a<r&&a>=o?{x:0,y:s.height+c,...Hi}:{x:0,y:0,...Hi}};function vO(e,t,r){const n=e[t],a=e[t-1],i=e[t+1];return n?r<t?a?n.top-(a.top+a.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):a?n.top-(a.top+a.height):0:0}const oy="Sortable",sy=C.createContext({activeIndex:-1,containerId:oy,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:iy,disabled:{draggable:!1,droppable:!1}});function gO(e){let{children:t,id:r,items:n,strategy:a=iy,disabled:i=!1}=e;const{active:o,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:f}=ny(),d=Mi(oy,r),p=s.rect!==null,h=O.useMemo(()=>n.map(b=>typeof b=="object"&&"id"in b?b.id:b),[n]),g=o!=null,m=o?h.indexOf(o.id):-1,v=u?h.indexOf(u.id):-1,w=O.useRef(h),S=!pO(h,w.current),j=v!==-1&&m===-1||S,_=hO(i);Lt(()=>{S&&g&&f(h)},[S,h,g,f]),O.useEffect(()=>{w.current=h},[h]);const y=O.useMemo(()=>({activeIndex:m,containerId:d,disabled:_,disableTransforms:j,items:h,overIndex:v,useDragOverlay:p,sortedRects:fO(h,c),strategy:a}),[m,d,_.draggable,_.droppable,j,h,v,c,p,a]);return C.createElement(sy.Provider,{value:y},t)}const yO=e=>{let{id:t,items:r,activeIndex:n,overIndex:a}=e;return rd(r,n,a).indexOf(t)},bO=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:a,items:i,newIndex:o,previousItems:s,previousContainerId:c,transition:u}=e;return!u||!n||s!==i&&a===o?!1:r?!0:o!==a&&t===c},xO={duration:200,easing:"ease"},ly="transform",wO=$r.Transition.toString({property:ly,duration:0,easing:"linear"}),jO={roleDescription:"sortable"};function SO(e){let{disabled:t,index:r,node:n,rect:a}=e;const[i,o]=O.useState(null),s=O.useRef(r);return Lt(()=>{if(!t&&r!==s.current&&n.current){const c=a.current;if(c){const u=ea(n.current,{ignoreTransform:!0}),f={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(f.x||f.y)&&o(f)}}r!==s.current&&(s.current=r)},[t,r,n,a]),O.useEffect(()=>{i&&o(null)},[i]),i}function OO(e){let{animateLayoutChanges:t=bO,attributes:r,disabled:n,data:a,getNewIndex:i=yO,id:o,strategy:s,resizeObserverConfig:c,transition:u=xO}=e;const{items:f,containerId:d,activeIndex:p,disabled:h,disableTransforms:g,sortedRects:m,overIndex:v,useDragOverlay:w,strategy:S}=O.useContext(sy),j=_O(n,h),_=f.indexOf(o),y=O.useMemo(()=>({sortable:{containerId:d,index:_,items:f},...a}),[d,a,_,f]),b=O.useMemo(()=>f.slice(f.indexOf(o)),[f,o]),{rect:x,node:A,isOver:N,setNodeRef:E}=ay({id:o,data:y,disabled:j.droppable,resizeObserverConfig:{updateMeasurementsFor:b,...c}}),{active:P,activatorEvent:$,activeNodeRect:T,attributes:k,setNodeRef:M,listeners:I,isDragging:R,over:z,setActivatorNodeRef:q,transform:K}=YS({id:o,data:y,attributes:{...jO,...r},disabled:j.draggable}),X=Dj(E,M),L=!!P,V=L&&!g&&Wi(p)&&Wi(v),se=!w&&R,he=se&&V?K:null,lt=V?he??(s??S)({rects:m,activeNodeRect:T,activeIndex:p,overIndex:v,index:_}):null,_e=Wi(p)&&Wi(v)?i({id:o,items:f,activeIndex:p,overIndex:v}):_,U=P?.id,H=O.useRef({activeId:U,items:f,newIndex:_e,containerId:d}),ee=f!==H.current.items,B=t({active:P,containerId:d,isDragging:R,isSorting:L,id:o,index:_,items:f,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:u,wasDragging:H.current.activeId!=null}),fe=SO({disabled:!B,index:_,node:A,rect:x});return O.useEffect(()=>{L&&H.current.newIndex!==_e&&(H.current.newIndex=_e),d!==H.current.containerId&&(H.current.containerId=d),f!==H.current.items&&(H.current.items=f)},[L,_e,d,f]),O.useEffect(()=>{if(U===H.current.activeId)return;if(U!=null&&H.current.activeId==null){H.current.activeId=U;return}const ye=setTimeout(()=>{H.current.activeId=U},50);return()=>clearTimeout(ye)},[U]),{active:P,activeIndex:p,attributes:k,data:y,rect:x,index:_,newIndex:_e,items:f,isOver:N,isSorting:L,isDragging:R,listeners:I,node:A,overIndex:v,over:z,setNodeRef:X,setActivatorNodeRef:q,setDroppableNodeRef:E,setDraggableNodeRef:M,transform:fe??lt,transition:te()};function te(){if(fe||ee&&H.current.newIndex===_)return wO;if(!(se&&!bs($)||!u)&&(L||B))return $r.Transition.toString({...u,property:ly})}}function _O(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(n=e?.droppable)!=null?n:t.droppable}}function mo(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const AO=[le.Down,le.Right,le.Up,le.Left],NO=(e,t)=>
205{let{context:{active:r,collisionRect:n,droppableRects:a,droppableContainers:i,over:o,scrollableAncestors:s}}=t;if(AO.includes(e.code)){if(e.preventDefault(),!r||!n)return;const c=[];i.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=a.get(d.id);if(p)switch(e.code){case le.Down:n.top<p.top&&c.push(d);break;case le.Up:n.top>p.top&&c.push(d);break;case le.Left:n.left>p.left&&c.push(d);break;case le.Right:n.left<p.left&&c.push(d);break}});const u=Qj({active:r,collisionRect:n,droppableRects:a,droppableContainers:c,pointerCoordinates:null});let f=zg(u,"id");if(f===o?.id&&u.length>1&&(f=u[1].id),f!=null){const d=i.get(r.id),p=i.get(f),h=p?a.get(p.id):null,g=p?.node.current;if(g&&h&&d&&p){const v=xs(g).some((b,x)=>s[x]!==b),w=cy(d,p),S=PO(d,p),j=v||!w?{x:0,y:0}:{x:S?n.width-h.width:0,y:S?n.height-h.height:0},_={x:h.left,y:h.top};return j.x&&j.y?_:za(_,j)}}}};function cy(e,t){return!mo(e)||!mo(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function PO(e,t){return!mo(e)||!mo(t)||!cy(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const uy=({video:e,onEdit:t,onDelete:r,isDragging:n,isOverlay:a})=>{const{attributes:i,listeners:o,setNodeRef:s,transform:c,transition:u,isDragging:f}=OO({id:e.id}),d={transform:$r.Transform.toString(c),transition:u},h=(g=>{if(g.url_vignette)return g.url_vignette;const m=[/(?:youtube\.com\/(?:embed\/|shorts\/|watch\?v=)|youtu\.be\/)([a-zA-Z0-9_-]+)/];for(const v of m){const w=g.url_video.match(v);if(w)return`https://img.youtube.com/vi/${w[1]}/mqdefault.jpg`}return null})(e);return l.jsxs("div",{ref:s,style:d,className:W("flex items-center gap-3 p-3 bg-card border rounded-lg transition-all",(f||n)&&"opacity-50 shadow-lg scale-105 z-50",a&&"shadow-2xl ring-2 ring-primary bg-card"),children:[l.jsx("button",{...i,...o,className:"cursor-grab active:cursor-grabbing touch-none p-1 hover:bg-muted rounded",children:l.jsx(Kw,{className:"h-5 w-5 text-muted-foreground"})}),h?l.jsx("img",{src:h,alt:e.titre,className:"w-16 h-10 object-cover rounded shrink-0"}):l.jsx("div",{className:"w-16 h-10 bg-muted rounded flex items-center justify-center shrink-0",children:l.jsx(Fu,{className:"h-4 w-4 text-muted-foreground"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"font-medium truncate text-sm",children:e.titre}),e.video_categories&&e.video_categories.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1 mt-0.5",children:e.video_categories.map(g=>l.jsx(Ce,{variant:"outline",className:"text-xs",children:g.categories?.name},g.id))})]}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[l.jsx(Q,{size:"sm",variant:"ghost",neon:!1,onClick:()=>window.open(e.url_video,"_blank"),className:"h-8 w-8 p-0",children:l.jsx(Uu,{className:"h-4 w-4"})}),l.jsx(Q,{size:"sm",variant:"ghost",neon:!1,onClick:()=>t(e),className:"h-8 w-8 p-0",children:l.jsx(Ci,{className:"h-4 w-4"})}),l.jsx(Q,{size:"sm",variant:"ghost",neon:!1,onClick:()=>r(e),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",children:l.jsx(Zt,{className:"h-4 w-4"})})]})]})},_l=({id:e,title:t,description:r,videos:n,icon:a,maxItems:i,onEdit:o,onDelete:s,isOver:c})=>{const{setNodeRef:u,isOver:f}=ay({id:e}),d=a==="home"?cw:Fu,p=i?n.length>=i:!1,h=c||f;return l.jsxs(ne,{ref:u,className:W("transition-all duration-200",h&&!p&&"ring-2 ring-primary border-primary bg-primary/5",h&&p&&"ring-2 ring-destructive border-destructive bg-destructive/5"),children:[l.jsxs(Lu,{className:"pb-3",children:[l.jsxs(Bu,{className:"flex items-center gap-2 text-lg",children:[l.jsx(d,{className:W("h-5 w-5",a==="home"?"text-primary":"text-muted-foreground")}),t,l.jsxs(Ce,{variant:"secondary",className:"ml-auto",children:[n.length,i?`/${i}`:""]})]}),r&&l.jsx(lw,{children:r}),h&&p&&l.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive mt-2",children:[l.jsx(oc,{className:"h-4 w-4"}),"Maximum atteint (",i," vidéos)"]})]}),l.jsx(lo,{children:l.jsx(gO,{items:n.map(g=>g.id),strategy:mO,children:l.jsx("div",{className:"space-y-2 min-h-[100px]",children:n.length===0?l.jsx("div",{className:W("border-2 border-dashed rounded-lg p-8 text-center transition-colors",h?"border-primary bg-primary/5":"border-muted"),children:l.jsx("p",{className:"text-muted-foreground text-sm",children:h?"Déposez ici":"Glissez des vidéos ici"})}):n.map(g=>l.jsx(uy,{video:g,onEdit:o,onDelete:s},g.id))})})})]})};var dy="AlertDialog",[CO,NH]=j1(dy,[Vv]),hr=Vv(),fy=e=>{const{__scopeAlertDialog:t,...r}=e,n=hr(t);return l.jsx(T1,{...n,...r,modal:!0})};fy.displayName=dy;var $O="AlertDialogTrigger",py=O.forwardRef((e,t)=>
205{const{__scopeAlertDialog:r,...n}=e,a=hr(r);return l.jsx(S1,{...a,...n,ref:t})});py.displayName=$O;var EO="AlertDialogPortal",hy=e=>{const{__scopeAlertDialog:t,...r}=e,n=hr(t);return l.jsx($1,{...n,...r})};hy.displayName=EO;var TO="AlertDialogOverlay",my=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=hr(r);return l.jsx(O1,{...a,...n,ref:t})});my.displayName=TO;var jn="AlertDialogContent",[MO,kO]=CO(jn),DO=E1("AlertDialogContent"),vy=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...a}=e,i=hr(r),o=O.useRef(null),s=Wv(t,o),c=O.useRef(null);return l.jsx(_1,{contentName:jn,titleName:gy,docsSlug:"alert-dialog",children:l.jsx(MO,{scope:r,cancelRef:c,children:l.jsxs(A1,{role:"alertdialog",...i,...a,ref:s,onOpenAutoFocus:N1(a.onOpenAutoFocus,u=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[l.jsx(DO,{children:n}),l.jsx(RO,{contentRef:o})]})})})});vy.displayName=jn;var gy="AlertDialogTitle",yy=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=hr(r);return l.jsx(P1,{...a,...n,ref:t})});yy.displayName=gy;var by="AlertDialogDescription",xy=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=hr(r);return l.jsx(C1,{...a,...n,ref:t})});xy.displayName=by;var IO="AlertDialogAction",wy=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,a=hr(r);return l.jsx(Hv,{...a,...n,ref:t})});wy.displayName=IO;var jy="AlertDialogCancel",Sy=O.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:a}=kO(jy,r),i=hr(r),o=Wv(t,a);return l.jsx(Hv,{...i,...n,ref:o})});Sy.displayName=jy;var RO=({contentRef:e})=>{const t=`\`${jn}\` requires a description for the component to be accessible for screen reader users.
206
207You can add a description to the \`${jn}\` by passing a \`${by}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
208
209Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${jn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
210
211For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return O.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},LO=fy,BO=py,qO=hy,Oy=my,_y=vy,Ay=wy,Ny=Sy,Py=yy,Cy=xy;const nd=LO,$y=BO,zO=qO,Ey=O.forwardRef(({className:e,...t},r)=>l.jsx(Oy,{className:W("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Ey.displayName=Oy.displayName;const Ss=O.forwardRef(({className:e,...t},r)=>l.jsxs(zO,{children:[l.jsx(Ey,{}),l.jsx(_y,{ref:r,className:W("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ss.displayName=_y.displayName;const Os=({className:e,...t})=>l.jsx("div",{className:W("flex flex-col space-y-2 text-center sm:text-left",e),...t});Os.displayName="AlertDialogHeader";const _s=({className:e,...t})=>l.jsx("div",{className:W("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});_s.displayName="AlertDialogFooter";const As=O.forwardRef(({className:e,...t},r)=>l.jsx(Py,{ref:r,className:W("text-lg font-semibold",e),...t}));As.displayName=Py.displayName;const Ns=O.forwardRef(({className:e,...t},r)=>l.jsx(Cy,{ref:r,className:W("text-sm text-muted-foreground",e),...t}));Ns.displayName=Cy.displayName;const Ps=O.forwardRef(({className:e,...t},r)=>l.jsx(Ay,{ref:r,className:W(ig(),e),...t}));Ps.displayName=Ay.displayName;const Cs=O.forwardRef(({className:e,...t},r)=>l.jsx(Ny,{ref:r,className:W(ig({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Cs.displayName=Ny.displayName;const Al=8,FO=({videos:e,onEdit:t})=>{const r=ng(),n=tw(),[a,i]=O.useState(null),[o,s]=O.useState(null),[c,u]=O.useState(null),f=Xj(_f(ed,{activationConstraint:{distance:8}}),_f(Zu,{coordinateGetter:NO})),{homepageVideos:d,portfolioVideos:p,availableVideos:h}=O.useMemo(()=>{const y=e.filter(A=>A.est_homepage).sort((A,N)=>(A.ordre_homepage||0)-(N.ordre_homepage||0)),b=e.filter(A=>A.est_portfolio&&!A.est_homepage).sort((A,N)=>(A.ordre_portfolio||0)-(N.ordre_portfolio||0)),x=e.filter(A=>!A.est_portfolio&&!A.est_homepage);return{homepageVideos:y,portfolioVideos:b,availableVideos:x}},[e]),g=a?e.find(y=>y.id===a):null,m=y=>d.some(b=>b.id===y)?"homepage":p.some(b=>b.id===y)?"portfolio":h.some(b=>b.id===y)?"available":null,v=y=>{i(y.active.id)},w=y=>{const{over:b}=y;if(b)if(["homepage","portfolio","available"].includes(b.id))u(b.id);else{const x=m(b.id);u(x)}else u(null)},S=async y=>{const{active:b,over:x}=y;if(i(null),u(null),!x)return;const A=b.id,N=x.id,E=m(A);let P;if(["homepage","portfolio","available"].includes(N)?P=N:P=m(N)||E||"available",!!E&&!(P==="homepage"&&E!=="homepage"&&d.length>=Al))if(E===P){const $=E==="homepage"?d:E==="portfolio"?p:h,T=$.findIndex(M=>M.id===A),k=$.findIndex(M=>M.id===N);if(T!==-1&&k!==-1&&T!==k){const M=rd($,T,k);for(let I=0;I<M.length;I++){const R=E==="homepage"?"ordre_homepage":"ordre_portfolio";M[I][R]!==I+1&&await r.mutateAsync({id:M[I].id,updates:{[R]:I+1}})}}}else{const $={};E==="homepage"&&($.est_homepage=!1,$.ordre_homepage=null),E==="portfolio"&&($.est_portfolio=!1,$.ordre_portfolio=null),P==="homepage"&&($.est_homepage=!0,$.est_portfolio=!0,$.ordre_homepage=d.length+1),P==="portfolio"&&($.est_portfolio=!0,$.ordre_portfolio=p.length+1),P==="available"&&($.est_portfolio=!1,$.est_homepage=!1,$.ordre_portfolio=null,$.ordre_homepage=null),await r.mutateAsync({id:A,updates:$})}},j=y=>{s(y)},_=()=>{o&&(n.mutate(o.id),s(null))};return l.jsxs(l.Fragment,{children:[l.jsxs(GS,{sensors:f,collisionDetection:Zj,onDragStart:v,onDragOver:w,onDragEnd:S,children:[l.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[l.jsx(_l,{id:"homepage",title:"Page d'accueil",description:`Maximum ${Al} vidéos affichées sur la page d'accueil`,videos:d,icon:"home",maxItems:Al,onEdit:t,onDelete:j,isOver:c==="homepage"}),l.jsx(_l,{id:"portfolio",title:"Portfolio",description:"Toutes les vidéos visibles dans la section portfolio",videos:p,icon:"film",onEdit:t,onDelete:j,isOver:c==="portfolio"})]}),h.length>0&&l.jsx("div",{className:"mt-6",children:l.jsx(_l,{id:"available",title:"Vidéos non publiées",description:"Ces vidéos ne sont pas visibles sur le site",videos:h,icon:"film",onEdit:t,onDelete:j,isOver:c==="available"})}),l.jsx(dO,{children:g&&l.jsx(uy,{video:g,onEdit:()=>{},onDelete:()=>{},isOverlay:!0})})]}),l.jsx(nd,{open:!!o,onOpenChange:()=>s(null),children:l.jsxs(Ss,{children:[l.jsxs(Os,{children:[l.jsx(As,{children:"Supprimer cette vidéo ?"}),l.jsxs(Ns,{children:['Cette action est irréversible. La vidéo "',o?.titre,'" sera définitivement supprimée.']})]}),l.jsxs(_s,{children:[l.jsx(Cs,{children:"Annuler"}),l.jsx(Ps,{onClick:_,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Supprimer"})]})]})})]})},UO=()=>{const[e,t]=O.useState(""),[r,n]=O.useState(null),[a,i]=O.useState(""),{data:o=[],isLoading:s}=og(),c=iw(),u=ow(),f=sw(),d=async m=>{m.preventDefault(),e.trim()&&(await c.mutateAsync(e.trim()),t(""))},p=(m,v)=>{n(m),i(v)},h=async()=>{!r||!a.trim()||(await f.mutateAsync({id:r,name:a.trim()}),n(null),i(""))},g=()=>{n(null),i("")};return s?l.jsx(ne,{children:l.jsx(lo,{className:"flex items-center justify-center py-8",children:l.jsx($t,{className:"h-6 w-6 animate-spin text-primary"})})}):l.jsxs(ne,{children:[l.jsx(Lu,{children:l.jsxs(Bu,{className:"flex items-center gap-2",children:[l.jsx(xg,{className:"h-5 w-5"}),"Gestion des catégories"]})}),l.jsxs(lo,{className:"space-y-4",children:[l.jsxs("form",{onSubmit:d,className:"flex gap-2",children:[l.jsx(Z,{placeholder:"Nouvelle catégorie...",value:e,onCh
211ange:m=>t(m.target.value),className:"flex-1"}),l.jsx(zr,{type:"submit",disabled:!e.trim()||c.isPending,children:c.isPending?l.jsx($t,{className:"h-4 w-4 animate-spin"}):l.jsx(wt,{className:"h-4 w-4"})})]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.map(m=>l.jsx("div",{children:r===m.id?l.jsxs("div",{className:"flex items-center gap-1 bg-secondary rounded-full px-2 py-1",children:[l.jsx(Z,{value:a,onChange:v=>i(v.target.value),className:"h-6 w-24 text-sm px-2",autoFocus:!0,onKeyDown:v=>{v.key==="Enter"&&h(),v.key==="Escape"&&g()}}),l.jsx("button",{onClick:h,disabled:f.isPending,className:"hover:text-primary transition-colors p-0.5",children:f.isPending?l.jsx($t,{className:"h-3 w-3 animate-spin"}):l.jsx(Pi,{className:"h-3 w-3"})}),l.jsx("button",{onClick:g,className:"hover:text-destructive transition-colors p-0.5",children:l.jsx(ac,{className:"h-3 w-3"})})]}):l.jsxs(Ce,{variant:"secondary",className:"px-3 py-1.5 text-sm flex items-center gap-2",children:[m.name,l.jsx("button",{onClick:()=>p(m.id,m.name),className:"hover:text-primary transition-colors",children:l.jsx(Ci,{className:"h-3 w-3"})}),l.jsxs(nd,{children:[l.jsx($y,{asChild:!0,children:l.jsx("button",{className:"hover:text-destructive transition-colors",children:l.jsx(ac,{className:"h-3 w-3"})})}),l.jsxs(Ss,{children:[l.jsxs(Os,{children:[l.jsx(As,{children:"Supprimer la catégorie ?"}),l.jsxs(Ns,{children:['Êtes-vous sûr de vouloir supprimer la catégorie "',m.name,'" ? Les vidéos utilisant cette catégorie ne seront pas affectées.']})]}),l.jsxs(_s,{children:[l.jsx(Cs,{children:"Annuler"}),l.jsx(Ps,{onClick:()=>u.mutate(m.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Supprimer"})]})]})]})]})},m.id)),o.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucune catégorie créée"})]})]})]})},VO=({videos:e,selectedVideoIds:t,onChange:r})=>{const n=(a,i)=>{r(i?[...t,a]:t.filter(o=>o!==a))};return l.jsxs("div",{className:"space-y-3",children:[l.jsx(Y,{className:"text-sm font-medium",children:"Vidéos associées"}),l.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3 max-h-64 overflow-y-auto p-1",children:e.map(a=>{const i=t.includes(a.id),o=a.url_vignette||$w(a.url_video);return l.jsxs("label",{className:`relative cursor-pointer rounded-lg overflow-hidden border-2 transition-all ${i?"border-primary ring-2 ring-primary/20":"border-border hover:border-muted-foreground/50"}`,children:[l.jsx("input",{type:"checkbox",checked:i,onChange:s=>n(a.id,s.target.checked),className:"sr-only"}),l.jsxs("div",{className:"aspect-[9/16] relative",children:[o?l.jsx("img",{src:o,alt:a.titre,className:"w-full h-full object-cover"}):l.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:l.jsx(Du,{className:"h-6 w-6 text-muted-foreground"})}),l.jsx("div",{className:`absolute inset-0 transition-colors ${i?"bg-primary/20":"bg-black/0 hover:bg-black/10"}`}),i&&l.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center",children:l.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]}),l.jsx("div",{className:"p-2 bg-background",children:l.jsx("p",{className:"text-xs font-medium truncate",children:a.titre})})]},a.id)})}),e.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground italic",children:"Aucune vidéo dans le portfolio"})]})},WO=()=>{const{data:e=[],isLoading:t}=Ow(),{data:r=[]}=ag(),n=_w(),a=Aw(),i=Nw(),o=Pw(),[s,c]=O.useState(!1),[u,f]=O.useState(null),[d,p]=O.useState([]),[h,g]=O.useState({title:"",description:"",image_url:"",content:"",external_link:"",display_order:0}),{data:m=[]}=Cw(u?.id);O.useEffect(()=>{m&&m.length>0&&p(m.map(y=>y.video_id))},[m]);const v=()=>{g({title:"",description:"",image_url:"",content:"",external_link:"",display_order:e.length+1}),p([]),f(null)},w=()=>{v(),c(!0)},S=y=>{f(y),g({title:y.title,description:y.description,image_url:y.image_url||"",content:y.content||"",external_link:y.external_link||"",dis
211play_order:y.display_order}),p([]),c(!0)},j=async y=>{y.preventDefault();const b={title:h.title,description:h.description,display_order:h.display_order,image_url:h.image_url||null,content:h.content||null,external_link:h.external_link||null,video_id:null,context:null,solution:null,results:null};let x;u?(await a.mutateAsync({id:u.id,...b}),x=u.id):x=(await n.mutateAsync(b)).id,await o.mutateAsync({caseStudyId:x,videoIds:d}),c(!1),v()},_=async y=>{await i.mutateAsync(y)};return t?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx($t,{className:"h-6 w-6 animate-spin text-primary"})}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("h2",{className:"text-xl font-semibold",children:["Études de cas (",e.length,")"]}),l.jsxs(kt,{open:s,onOpenChange:c,children:[l.jsx(rw,{asChild:!0,children:l.jsxs(Q,{onClick:w,variant:"solid",size:"sm",children:[l.jsx(wt,{className:"h-4 w-4 mr-2"}),"Ajouter"]})}),l.jsxs(Dt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsx(It,{children:l.jsx(Rt,{children:u?"Modifier l'étude de cas":"Nouvelle étude de cas"})}),l.jsxs("form",{onSubmit:j,className:"space-y-4",children:[l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"title",children:"Titre *"}),l.jsx(Z,{id:"title",value:h.title,onChange:y=>g({...h,title:y.target.value}),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"display_order",children:"Ordre d'affichage"}),l.jsx(Z,{id:"display_order",type:"number",value:h.display_order,onChange:y=>g({...h,display_order:parseInt(y.target.value)||0})})]})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"description",children:"Description courte *"}),l.jsx(Xr,{id:"description",value:h.description,onChange:y=>g({...h,description:y.target.value}),rows:2,required:!0})]}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"image_url",children:"URL de l'image"}),l.jsx(Z,{id:"image_url",value:h.image_url,onChange:y=>g({...h,image_url:y.target.value}),placeholder:"https://..."})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"external_link",children:"Lien externe"}),l.jsx(Z,{id:"external_link",value:h.external_link,onChange:y=>g({...h,external_link:y.target.value}),placeholder:"https://..."})]})]}),l.jsx(VO,{videos:r,selectedVideoIds:d,onChange:p}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(Y,{htmlFor:"content",children:"Contenu de la page"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Utilisez ## pour les titres de section. Le texte sera affiché tel quel."}),l.jsx(Xr,{id:"content",value:h.content,onChange:y=>g({...h,content:y.target.value}),rows:12,placeholder:`## Contexte
212
213Décrivez le contexte du projet...
214
215## Solution
216
217Décrivez la solution apportée...
218
219## Résultats
220
221- Résultat 1
222- Résultat 2`,className:"font-mono text-sm"})]}),l.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[l.jsx(Q,{type:"button",variant:"outline",neon:!1,onClick:()=>c(!1),children:"Annuler"}),l.jsxs(Q,{type:"submit",variant:"solid",disabled:n.isPending||a.isPending,children:[(n.isPending||a.isPending)&&l.jsx($t,{className:"h-4 w-4 mr-2 animate-spin"}),u?"Mettre à jour":"Créer"]})]})]})]})]})]}),l.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(y=>l.jsxs(ne,{className:"group relative",children:[l.jsx(Lu,{className:"pb-2",children:l.jsxs(Bu,{className:"text-base flex items-center justify-between",children:[l.jsx("span",{className:"truncate pr-2",children:y.title}),l.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["#",y.display_order]})]})}),l.jsxs(lo,{className:"space-y-3",children:[y.image_url&&l.jsx("img",{src:y.image_url,alt:y.title,className:"w-full h-24 object-cover rounded-md"}),l.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:y.description}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs(Q,{variant:"outline",size:"sm",neon:!1,onClick:()=>S(y),children:[l.jsx(Ci,{className:"h-3 w-3 mr-1"}),"Modifier"]}),y.external_link&&l.jsx(Q,{variant:"ghost",size:"sm",neon:!1,onClick:()=>window.open(y.external_link,"_blank"),children:l.jsx(Uu,{className:"h-3 w-3"})}),l.jsxs(nd,{children:[l.jsx($y,{asChild:!0,children:l.jsx(Q,{variant:"ghost",size:"sm",neon:!1,className:"text-destructive hover:text-destructive ml-auto",children:l.jsx(Zt,{className:"h-3 w-3"})})}),l.jsxs(Ss,{children:[l.jsxs(Os,{children:[l.jsx(As,{children:"Supprimer cette étude de cas ?"}),l.jsxs(Ns,{children:[`Cette action est irréversible. L'étude de cas "`,y.title,'" sera définitivement supprimée.']})]}),l.jsxs(_s,{children:[l.jsx(Cs,{children:"Annuler"}),l.jsx(Ps,{onClick:()=>_(y.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Supprimer"})]})]})]})]})]})]},y.id))}),e.length===0&&l.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[l.jsx("p",{children:"Aucune étude de cas pour le moment."}),l.jsx("p",{className:"text-sm",children:'Cliquez sur "Ajouter" pour en créer une.'})]})]})},Ty=M1,ad=O.forwardRef(({className:e,...t},r)=>l.jsx(Gv,{ref:r,className:W("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ad.displayName=Gv.displayName;const Sn=O.forwardRef(({className:e,...t},r)=>l.jsx(Kv,{ref:r,className:W("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));Sn.displayName=Kv.displayName;const On=O.forwardRef(({className:e,...t},r)=>l.jsx(Xv,{ref:r,className:W("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));On.displayName=Xv.displayName;const Bf=e=>rn({queryKey:["finance_entries",e],queryFn:async()=>{let t=Ne.from("finance_entries").select("*").order("entry_date",{ascending:!1});e&&(t=t.gte("entry_date",e.from).lte("entry_date",e.to));const{data:r,error:n}=await t;if(n)throw n;return r||[]}}),My=()=>rn({queryKey:["fixed_costs"],queryFn:async()=>{const{data:e,error:t}=await Ne.from("fixed_costs").select("*").order("created_at");if(t)throw t;return e||[]}}),HO=()=>{const e=qt();return zt({mutationFn:async t=>{if(t.id){const{error:r}=await Ne.from("finance_entries").update(t).eq("id",t.id);if(r)throw r}else{const{error:r}=await Ne.from("finance_entries").insert(t);if(r)throw r}},onSuccess:()=>
222{e.invalidateQueries({queryKey:["finance_entries"]}),We.success("Entrée enregistrée")},onError:t=>We.error(t.message)})},GO=()=>{const e=qt();return zt({mutationFn:async t=>{const{error:r}=await Ne.from("finance_entries").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["finance_entries"]}),We.success("Supprimé")}})},KO=()=>{const e=qt();return zt({mutationFn:async t=>{if(t.id){const{error:r}=await Ne.from("fixed_costs").update(t).eq("id",t.id);if(r)throw r}else{const{error:r}=await Ne.from("fixed_costs").insert(t);if(r)throw r}},onSuccess:()=>{e.invalidateQueries({queryKey:["fixed_costs"]}),We.success("Coût fixe enregistré")},onError:t=>We.error(t.message)})},XO=()=>{const e=qt();return zt({mutationFn:async t=>{const{error:r}=await Ne.from("fixed_costs").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["fixed_costs"]}),We.success("Supprimé")}})},Nl=({label:e,value:t,sub:r,trend:n,trendInverse:a})=>{const i=n!=null&&Number.isFinite(n),o=(n??0)>=0,s=a?!o:o;return l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl flex flex-col gap-2 min-h-[140px]",children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsx("span",{className:"text-xs uppercase tracking-widest text-muted-foreground font-medium",children:e}),i&&l.jsxs("span",{className:W("flex items-center gap-1 text-xs font-semibold px-2 py-1 rounded-full",s?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"),children:[o?l.jsx(Iu,{className:"h-3 w-3"}):l.jsx(wg,{className:"h-3 w-3"}),Math.abs(n).toFixed(0),"%"]})]}),l.jsx("div",{className:"text-3xl md:text-4xl font-bold tracking-tight text-foreground",children:t}),r&&l.jsx("div",{className:"text-sm text-muted-foreground",children:r})]})};var YO=Array.isArray,Qe=YO,JO=typeof Vi=="object"&&Vi&&Vi.Object===Object&&Vi,ky=JO,ZO=ky,QO=typeof self=="object"&&self&&self.Object===Object&&self,e_=ZO||QO||Function("return this")(),Qt=e_,t_=Qt,r_=t_.Symbol,Di=r_,qf=Di,Dy=Object.prototype,n_=Dy.hasOwnProperty,a_=Dy.toString,ba=qf?qf.toStringTag:void 0;function i_(e){var t=n_.call(e,ba),r=e[ba];try{e[ba]=void 0;var n=!0}catch{}var a=a_.call(e);return n&&(t?e[ba]=r:delete e[ba]),a}var o_=i_,s_=Object.prototype,l_=s_.toString;function c_(e){return l_.call(e)}var u_=c_,zf=Di,d_=o_,f_=u_,p_="[object Null]",h_="[object Undefined]",Ff=zf?zf.toStringTag:void 0;function m_(e){return e==null?e===void 0?h_:p_:Ff&&Ff in Object(e)?d_(e):f_(e)}var mr=m_;function v_(e){return e!=null&&typeof e=="object"}var vr=v_,g_=mr,y_=vr,b_="[object Symbol]";function x_(e){return typeof e=="symbol"||y_(e)&&g_(e)==b_}var ta=x_,w_=Qe,j_=ta,S_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O_=/^\w*$/;function __(e,t){if(w_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||j_(e)?!0:O_.test(e)||!S_.test(e)||t!=null&&e in Object(t)}var id=__;function A_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Er=A_;const ra=we(Er);var N_=mr,P_=Er,C_="[object AsyncFunction]",$_="[object Function]",E_="[object GeneratorFunction]",T_="[object Proxy]";function M_(e){if(!P_(e))return!1;var t=N_(e);return t==$_||t==E_||t==C_||t==T_}var od=M_;const re=we(od);var k_=Qt,D_=k_["__core-js_shared__"],I_=D_,Pl=I_,Uf=function(){var e=/[^.]+$/.exec(Pl&&Pl.keys&&Pl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function R_(e){return!!Uf&&Uf in e}var L_=R_,B_=Function.prototype,q_=B_.toString;function z_(e){if(e!=null){try{return q_.call(e)}catch{}try{return e+""}catch{}}return""}var Iy=z_,F_=od,U_=L_,V_=Er,W_=Iy,H_=/[\\^$.*+?()[\]{}|]/g,G_=/^\[object .+?Constructor\]$/,K_=Function.prototype,X_=Object.prototype,Y_=K_.toString,J_=X_.hasOwnProperty,Z_=RegExp("^"+Y_.call(J_).replace(H_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Q_(e){if(!V_(e)||U_(e))return!1;var t=F_(e)?Z_:G_;return t.test(W_(e))}var eA=Q_;function tA(e,t){return e?.[t]}var rA=tA,nA=eA,aA=rA;function iA(e,t){var r=aA(e,t);return nA(r)?r:void 0}var nn=iA,oA=nn,sA=oA(Object,"create"),$s=sA,Vf=$s;function lA(){this.__data__=Vf?Vf(null):{},this.size=0}var cA=lA;function uA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dA=uA,fA=$s,pA="__lodash_hash_undefined__",hA=Object.prototype,mA=hA.hasOwnProperty;function vA(e){var t=this.__data__;if(fA){var r=t[e];return r===pA?void 0:r}return mA.call(t,e)?t[e]:void 0}var gA=vA,yA=$s,bA=Object.prototype,xA=bA.hasOwnProperty;function wA(e){var t=this.__data__;return yA?t[e]!==void 0:xA.call(t,e)}var jA=wA,SA=$s,OA="__lodash_hash_undefined__";function _A(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=SA&&t===void 0?OA:t,this}var AA=_A,NA=cA,PA=dA,CA=gA,$A=jA,EA=AA;function na(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}na.prototype.clear=NA;na.prototype.delete=PA;na.prototype.get=CA;na.prototype.has=$A;na.prototype.set=EA;var TA=na;function MA(){this.__data__=[],this.size=0}var kA=MA;function DA(e,t){return e===t||e!==e&&t!==t}var sd=DA,IA=sd;function RA(e,t){for(var r=e.length;r--;)if(IA(e[r][0],t))return r;return-1}
vendor: 2,062 bytes, line 222
222var Es=RA,LA=Es,BA=Array.prototype,qA=BA.splice;function zA(e){var t=this.__data__,r=LA(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():qA.call(t,r,1),--this.size,!0}var FA=zA,UA=Es;function VA(e){var t=this.__data__,r=UA(t,e);return r<0?void 0:t[r][1]}var WA=VA,HA=Es;function GA(e){return HA(this.__data__,e)>-1}var KA=GA,XA=Es;function YA(e,t){var r=this.__data__,n=XA(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var JA=YA,ZA=kA,QA=FA,eN=WA,tN=KA,rN=JA;function aa(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}aa.prototype.clear=ZA;aa.prototype.delete=QA;aa.prototype.get=eN;aa.prototype.has=tN;aa.prototype.set=rN;var Ts=aa,nN=nn,aN=Qt,iN=nN(aN,"Map"),ld=iN,Wf=TA,oN=Ts,sN=ld;function lN(){this.size=0,this.__data__={hash:new Wf,map:new(sN||oN),string:new Wf}}var cN=lN;function uN(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dN=uN,fN=dN;function pN(e,t){var r=e.__data__;return fN(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ms=pN,hN=Ms;function mN(e){var t=hN(this,e).delete(e);return this.size-=t?1:0,t}var vN=mN,gN=Ms;function yN(e){return gN(this,e).get(e)}var bN=yN,xN=Ms;function wN(e){return xN(this,e).has(e)}var jN=wN,SN=Ms;function ON(e,t){var r=SN(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var _N=ON,AN=cN,NN=vN,PN=bN,CN=jN,$N=_N;function ia(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ia.prototype.clear=AN;ia.prototype.delete=NN;ia.prototype.get=PN;ia.prototype.has=CN;ia.prototype.set=$N;var cd=ia,Ry=cd,EN="Expected a function";function ud(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(EN);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o)||i,o};return r.cache=new(ud.Cache||Ry),r}ud.Cache=Ry;var Ly=ud;const TN=we(Ly);var MN=Ly,kN=500;function DN(e){var t=MN(e,function(n){return r.size===kN&&r.clear(),n}
vendor: 6,644 bytes, lines 222-230
222),r=t.cache;return t}var IN=DN,RN=IN,LN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BN=/\\(\\)?/g,qN=RN(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(LN,function(r,n,a,i){t.push(a?i.replace(BN,"$1"):n||r)}),t}),zN=qN;function FN(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var dd=FN,Hf=Di,UN=dd,VN=Qe,WN=ta,HN=1/0,Gf=Hf?Hf.prototype:void 0,Kf=Gf?Gf.toString:void 0;function By(e){if(typeof e=="string")return e;if(VN(e))return UN(e,By)+"";if(WN(e))return Kf?Kf.call(e):"";var t=e+"";return t=="0"&&1/e==-HN?"-0":t}var GN=By,KN=GN;function XN(e){return e==null?"":KN(e)}var qy=XN,YN=Qe,JN=id,ZN=zN,QN=qy;function eP(e,t){return YN(e)?e:JN(e,t)?[e]:ZN(QN(e))}var zy=eP,tP=ta,rP=1/0;function nP(e){if(typeof e=="string"||tP(e))return e;var t=e+"";return t=="0"&&1/e==-rP?"-0":t}var ks=nP,aP=zy,iP=ks;function oP(e,t){t=aP(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[iP(t[r++])];return r&&r==n?e:void 0}var fd=oP,sP=fd;function lP(e,t,r){var n=e==null?void 0:sP(e,t);return n===void 0?r:n}var Fy=lP;const yt=we(Fy);function cP(e){return e==null}var uP=cP;const oe=we(uP);var dP=mr,fP=Qe,pP=vr,hP="[object String]";function mP(e){return typeof e=="string"||!fP(e)&&pP(e)&&dP(e)==hP}var vP=mP;const Yr=we(vP);var Uy={exports:{}},pe={};/**
223 * @license React
224 * react-is.production.min.js
225 *
226 * Copyright (c) Facebook, Inc. and its affiliates.
227 *
228 * This source code is licensed under the MIT license found in the
229 * LICENSE file in the root directory of this source tree.
230 */var pd=Symbol.for("react.element"),hd=Symbol.for("react.portal"),Ds=Symbol.for("react.fragment"),Is=Symbol.for("react.strict_mode"),Rs=Symbol.for("react.profiler"),Ls=Symbol.for("react.provider"),Bs=Symbol.for("react.context"),gP=Symbol.for("react.server_context"),qs=Symbol.for("react.forward_ref"),zs=Symbol.for("react.suspense"),Fs=Symbol.for("react.suspense_list"),Us=Symbol.for("react.memo"),Vs=Symbol.for("react.lazy"),yP=Symbol.for("react.offscreen"),Vy;Vy=Symbol.for("react.module.reference");function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pd:switch(e=e.type,e){case Ds:case Rs:case Is:case zs:case Fs:return e;default:switch(e=e&&e.$$typeof,e){case gP:case Bs:case qs:case Vs:case Us:case Ls:return e;default:return t}}case hd:return t}}}pe.ContextConsumer=Bs;pe.ContextProvider=Ls;pe.Element=pd;pe.ForwardRef=qs;pe.Fragment=Ds;pe.Lazy=Vs;pe.Memo=Us;pe.Portal=hd;pe.Profiler=Rs;pe.StrictMode=Is;pe.Suspense=zs;pe.SuspenseList=Fs;pe.isAsyncMode=function(){return!1};pe.isConcurrentMode=function(){return!1};pe.isContextConsumer=function(e){return St(e)===Bs};pe.isContextProvider=function(e){return St(e)===Ls};pe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pd};pe.isForwardRef=function(e){return St(e)===qs};pe.isFragment=function(e){return St(e)===Ds};pe.isLazy=function(e){return St(e)===Vs};pe.isMemo=function(e){return St(e)===Us};pe.isPortal=function(e){return St(e)===hd};pe.isProfiler=function(e){return St(e)===Rs};pe.isStrictMode=function(e){return St(e)===Is};pe.isSuspense=function(e){return St(e)===zs};pe.isSuspenseList=function(e){return St(e)===Fs};pe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ds||e===Rs||e===Is||e===zs||e===Fs||e===yP||typeof e=="object"&&e!==null&&(e.$$typeof===Vs||e.$$typeof===Us||e.$$typeof===Ls||e.$$typeof===Bs||e.$$typeof===qs||e.$$typeof===Vy||e.getModuleId!==void 0)};pe.typeOf=St;Uy.exports=pe;var bP=Uy.exports,xP=mr,wP=vr,jP="[object Number]";function SP(e){return typeof e=="number"||wP(e)&&xP(e)==jP}var Wy=SP;const OP=we(Wy);var _P=Wy;function AP(e){return _P(e)&&e!=+e}var NP=AP;const oa=we(NP);var Ct=function(t){return t===0?0:t>0?1:-1},Fr=function(t){return Yr(t)&&t.indexOf("%")===t.length-1},F=function(t){return OP(t)&&!oa(t)},PP=function(t){return oe(t)},Ie=function(t){return F(t)||Yr(t)},CP=0,Ii=function(t){var r=++CP;return"".concat(t||"").concat(r)},Jr=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!F(t)&&!Yr(t))return n;var i;if(Fr(t)){var o=t.indexOf("%");i=r*parseFloat(t.slice(0,o))/100}else i=+t;return oa(i)&&(i=n),a&&i>r&&(i=r),i},_r=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},$P=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},vt=function(t,r){return F(t)&&F(r)?function(n){return t+n*(r-t)}:function(){return r}};function vo(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):yt(n,t))===r})}var EP=function(t,r){return F(t)&&F(r)?t-r:Yr(t)&&Yr(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function _n(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function dc(e){"@babel/helpers - typeof";return dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dc(e)}var TP=["viewBox","children"],MP=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
230dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Xf=["points","pathLength"],Cl={svg:TP,polygon:Xf,polyline:Xf},md=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
230Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],go=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(O.isValidElement(t)&&(n=t.props),!ra(n))return null;var a={};return Object.keys(n).forEach(function(i){md.includes(i)&&(a[i]=r||function(o){return n[i](n,o)})}),a},kP=function(t,r,n){return function(a){return t(r,n,a),null}},yo=function(t,r,n){if(!ra(t)||dc(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];md.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=kP(o,r,n))}),a},DP=["children"],IP=["children"];function Yf(e,t){if(e==null)return{};var r=RP(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RP(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fc(e){"@babel/helpers - typeof";return fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}var Jf={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},or=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Zf=null,$l=null,vd=function e(t){if(t===Zf&&Array.isArray($l))return $l;var r=[];return O.Children.forEach(t,function(n){oe(n)||(bP.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),$l=r,Zf=t,r};function Et(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return or(a)}):n=[or(t)],vd(e).forEach(function(a){var i=yt(a,"type.displayName")||yt(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function it(e,t){var r=Et(e,t);return r&&r[0]}var Qf=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!F(n)||n<=0||!F(a)||a<=0)},LP=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],BP=function(t){return t&&t.type&&Yr(t.type)&&LP.indexOf(t.type)>=0},qP=function(t){return t&&fc(t)==="object"&&"clipDot"in t}
230,zP=function(t,r,n,a){var i,o=(i=Cl?.[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!re(t)&&(a&&o.includes(r)||MP.includes(r))||n&&md.includes(r)},ie=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(O.isValidElement(t)&&(a=t.props),!ra(a))return null;var i={};return Object.keys(a).forEach(function(o){var s;zP((s=a)===null||s===void 0?void 0:s[o],o,r,n)&&(i[o]=a[o])}),i},pc=function e(t,r){if(t===r)return!0;var n=O.Children.count(t);if(n!==O.Children.count(r))return!1;if(n===0)return!0;if(n===1)return ep(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],o=r[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!ep(i,o))return!1}return!0},ep=function(t,r){if(oe(t)&&oe(r))return!0;if(!oe(t)&&!oe(r)){var n=t.props||{},a=n.children,i=Yf(n,DP),o=r.props||{},s=o.children,c=Yf(o,IP);return a&&s?_n(i,c)&&pc(a,s):!a&&!s?_n(i,c):!1}return!1},tp=function(t,r){var n=[],a={};return vd(t).forEach(function(i,o){if(BP(i))n.push(i);else if(i){var s=or(i.type),c=r[s]||{},u=c.handler,f=c.once;if(u&&(!f||!a[s])){var d=u(i,s,o);n.push(d),a[s]=!0}}}),n},FP=function(t){var r=t&&t.type;return r&&Jf[r]?Jf[r]:null},UP=function(t,r){return vd(r).indexOf(t)},VP=["children","width","height","viewBox","className","style","title","desc"];function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hc.apply(this,arguments)}function WP(e,t){if(e==null)return{};var r=HP(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function HP(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mc(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,o=e.style,s=e.title,c=e.desc,u=WP(e,VP),f=a||{width:r,height:n,x:0,y:0},d=ce("recharts-surface",i);return C.createElement("svg",hc({},ie(u,!0,"svg"),{className:d,width:r,height:n,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),C.createElement("title",null,s),C.createElement("desc",null,c),t)}var GP=["children","className"];function vc(){return vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vc.apply(this,arguments)}function KP(e,t){if(e==null)return{};var r=XP(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XP(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ae=C.forwardRef(function(e,t){var r=e.children,n=e.className,a=KP(e,GP),i=ce("recharts-layer",n);return C.createElement("g",vc({className:i},ie(a,!0),{ref:t}),r)}),sr=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]};function YP(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var JP=YP,ZP=JP;function QP(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:ZP(e,t,r)}var e2=QP,t2="\\ud800-\\udfff",r2="\\u0300-\\u036f",n2="\\ufe20-\\ufe2f",a2="\\u20d0-\\u20ff",i2=r2+n2+a2,o2="\\ufe0e\\ufe0f",s2="\\u200d",l2=RegExp("["+s2+t2+i2+o2+"]");function c2(e){return l2.test(e)}var Hy=c2;function u2(e){return e.split("")}var d2=u2,Gy="\\ud800-\\udfff",f2="\\u0300-\\u036f",p2="\\ufe20-\\ufe2f",h2="\\u20d0-\\u20ff",m2=f2+p2+h2,v2="\\ufe0e\\ufe0f",g2="["+Gy+"]",gc="["+m2+"]",yc="\\ud83c[\\udffb-\\udfff]",y2="(?:"+gc+"|"+yc+")",Ky="[^"+Gy+"]",Xy="(?:\\ud83c[\\udde6-\\uddff]){2}",Yy="[\\ud800-\\udbff][\\udc00-\\udfff]",b2="\\u200d",Jy=y2+"?",Zy="["+v2+"]?",x2="(?:"+b2+"(?:"+[Ky,Xy,Yy].join("|")+")"+Zy+Jy+")*",w2=Zy+Jy+x2,j2="(?:"+[Ky+gc+"?",gc,Xy,Yy,g2].join("|")+")",S2=RegExp(yc+"(?="+yc+")|"+j2+w2,"g");function O2(e){return e.match(S2)||[]}var _2=O2,A2=d2,N2=Hy,P2=_2;function C2(e){return N2(e)?P2(e):A2(e)}var $2=C2,E2=e2,T2=Hy,M2=$2,k2=qy;function D2(e){return function(t){t=k2(t);var r=T2(t)?M2(t):void 0,n=r?r[0]:t.charAt(0),a=r?E2(r,1).join(""):t.slice(1);return n[e]()+a}}var I2=D2,R2=I2,L2=R2("toUpperCase"),B2=L2;const Ws=we(B2);function xe(e){return function(){return e}}const Qy=Math.cos,bo=Math.sin,Ft=Math.sqrt,xo=Math.PI,Hs=2*xo,bc=Math.PI,xc=2*bc,Lr=1e-6,q2=xc-Lr;function eb(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function z2(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return eb;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class F2{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?eb:z2(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,o){this._append`C${+t},${+r},${+n}
230,${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,s=this._y1,c=n-t,u=a-r,f=o-t,d=s-r,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>Lr)if(!(Math.abs(d*c-u*f)>Lr)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,g=a-s,m=c*c+u*u,v=h*h+g*g,w=Math.sqrt(m),S=Math.sqrt(p),j=i*Math.tan((bc-Math.acos((m+p-v)/(2*w*S)))/2),_=j/S,y=j/w;Math.abs(_-1)>Lr&&this._append`L${t+_*f},${r+_*d}`,this._append`A${i},${i},0,0,${+(d*h>f*g)},${this._x1=t+y*c},${this._y1=r+y*u}`}}arc(t,r,n,a,i,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(a),c=n*Math.sin(a),u=t+s,f=r+c,d=1^o,p=o?a-i:i-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Lr||Math.abs(this._y1-f)>Lr)&&this._append`L${u},${f}`,n&&(p<0&&(p=p%xc+xc),p>q2?this._append`A${n},${n},0,1,${d},${t-s},${r-c}A${n},${n},0,1,${d},${this._x1=u},${this._y1=f}`:p>Lr&&this._append`A${n},${n},0,${+(p>=bc)},${d},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function gd(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new F2(t)}function yd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tb(e){this._context=e}tb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Gs(e){return new tb(e)}function rb(e){return e[0]}function nb(e){return e[1]}function ab(e,t){var r=xe(!0),n=null,a=Gs,i=null,o=gd(s);e=typeof e=="function"?e:e===void 0?rb:xe(e),t=typeof t=="function"?t:t===void 0?nb:xe(t);function s(c){var u,f=(c=yd(c)).length,d,p=!1,h;for(n==null&&(i=a(h=o())),u=0;u<=f;++u)!(u<f&&r(d=c[u],u,c))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(d,u,c),+t(d,u,c));if(h)return i=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:xe(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:xe(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:xe(!!c),s):r},s.curve=function(c){return arguments.length?(a=c,n!=null&&(i=a(n)),s):a},s.context=function(c){return arguments.length?(c==null?n=i=null:i=a(n=c),s):n},s}function Gi(e,t,r){var n=null,a=xe(!0),i=null,o=Gs,s=null,c=gd(u);e=typeof e=="function"?e:e===void 0?rb:xe(+e),t=typeof t=="function"?t:xe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?nb:xe(+r);function u(d){var p,h,g,m=(d=yd(d)).length,v,w=!1,S,j=new Array(m),_=new Array(m);for(i==null&&(s=o(S=c())),p=0;p<=m;++p){if(!(p<m&&a(v=d[p],p,d))===w)if(w=!w)h=p,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=p-1;g>=h;--g)s.point(j[g],_[g]);s.lineEnd(),s.areaEnd()}w&&(j[p]=+e(v,p,d),_[p]=+t(v,p,d),s.point(n?+n(v,p,d):j[p],r?+r(v,p,d):_[p]))}if(S)return s=null,S+""||null}function f(){return ab().defined(a).curve(o).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:xe(+d),n=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:xe(+d),u):e},u.x1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:xe(+d),u):n},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:xe(+d),r=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:xe(+d),u):t},u.y1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:xe(+d),u):r},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(r)},u.lineX1=function(){return f().x(n).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:xe(!!d),u):a},u.curve=function(d){return arguments.length?(o=d,i!=null&&(s=o(i)),u):o},u.context=function(d){return arguments.length?(d==null?i=s=null:s=o(i=d),u):i},u}class ib{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function U2(e){return new ib(e,!0)}function V2(e){return new ib(e,!1)}
vendor: 7,993 bytes, line 230
230const bd={draw(e,t){const r=Ft(t/xo);e.moveTo(r,0),e.arc(0,0,r,0,Hs)}},W2={draw(e,t){const r=Ft(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ob=Ft(1/3),H2=ob*2,G2={draw(e,t){const r=Ft(t/H2),n=r*ob;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},K2={draw(e,t){const r=Ft(t),n=-r/2;e.rect(n,n,r,r)}},X2=.8908130915292852,sb=bo(xo/10)/bo(7*xo/10),Y2=bo(Hs/10)*sb,J2=-Qy(Hs/10)*sb,Z2={draw(e,t){const r=Ft(t*X2),n=Y2*r,a=J2*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const o=Hs*i/5,s=Qy(o),c=bo(o);e.lineTo(c*r,-s*r),e.lineTo(s*n-c*a,c*n+s*a)}e.closePath()}},El=Ft(3),Q2={draw(e,t){const r=-Ft(t/(El*3));e.moveTo(0,r*2),e.lineTo(-El*r,-r),e.lineTo(El*r,-r),e.closePath()}},ft=-.5,pt=Ft(3)/2,wc=1/Ft(12),eC=(wc/2+1)*3,tC={draw(e,t){const r=Ft(t/eC),n=r/2,a=r*wc,i=n,o=r*wc+r,s=-i,c=o;e.moveTo(n,a),e.lineTo(i,o),e.lineTo(s,c),e.lineTo(ft*n-pt*a,pt*n+ft*a),e.lineTo(ft*i-pt*o,pt*i+ft*o),e.lineTo(ft*s-pt*c,pt*s+ft*c),e.lineTo(ft*n+pt*a,ft*a-pt*n),e.lineTo(ft*i+pt*o,ft*o-pt*i),e.lineTo(ft*s+pt*c,ft*c-pt*s),e.closePath()}};function rC(e,t){let r=null,n=gd(a);e=typeof e=="function"?e:xe(e||bd),t=typeof t=="function"?t:xe(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:xe(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:xe(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function wo(){}function jo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function lb(e){this._context=e}lb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:jo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:jo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nC(e){return new lb(e)}function cb(e){this._context=e}cb.prototype={areaStart:wo,areaEnd:wo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:jo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aC(e){return new cb(e)}function ub(e){this._context=e}ub.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:jo(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iC(e){return new ub(e)}function db(e){this._context=e}db.prototype={areaStart:wo,areaEnd:wo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function oC(e){return new db(e)}function rp(e){return e<0?-1:1}function np(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),o=(r-e._y1)/(a||n<0&&-0),s=(i*a+o*n)/(n+a);return(rp(i)+rp(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(s))||0}function ap(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tl(e,t,r){var n=e._x0,a=e._y0,i=e._x1,o=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,a+s*t,i-s,o-s*r,i,o)}function So(e){this._context=e}So.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Tl(this,this._t0,ap(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Tl(this,ap(this,r=np(this,e,t)),r);break;default:Tl(this,this._t0,r=np(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function fb(e){this._context=new pb(e)}(fb.prototype=Object.create(So.prototype)).point=function(e,t){So.prototype.point.call(this,t,e)};function pb(e){this._context=e}pb.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function sC(e){return new So(e)}function lC(e){return new fb(e)}function hb(e){this._context=e}hb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=ip(e),a=ip(t),i=0,o=1;o<r;++i,++o)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function ip(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),o=new Array(r);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,o[t]-=n*o[t-1];for(a[r-1]=o[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function cC(e){return new hb(e)}function Ks(e,t){this._context=e,this._t=t}Ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 11,873 bytes, lines 230-233
230default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function uC(e){return new Ks(e,.5)}function dC(e){return new Ks(e,0)}function fC(e){return new Ks(e,1)}function $n(e,t){if((o=e.length)>1)for(var r=1,n,a,i=e[t[0]],o,s=i.length;r<o;++r)for(a=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function jc(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function pC(e,t){return e[t]}function hC(e){const t=[];return t.key=e,t}function mC(){var e=xe([]),t=jc,r=$n,n=pC;function a(i){var o=Array.from(e.apply(this,arguments),hC),s,c=o.length,u=-1,f;for(const d of i)for(s=0,++u;s<c;++s)(o[s][u]=[0,+n(d,o[s].key,u,i)]).data=d;for(s=0,f=yd(t(o));s<c;++s)o[f[s]].index=s;return r(o,f),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:xe(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:xe(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?jc:typeof i=="function"?i:xe(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??$n,a):r},a}function vC(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,o;a<i;++a){for(o=r=0;r<n;++r)o+=e[r][a][1]||0;if(o)for(r=0;r<n;++r)e[r][a][1]/=o}$n(e,t)}}function gC(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var o=0,s=0;o<a;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}$n(e,t)}}function yC(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,o;n<i;++n){for(var s=0,c=0,u=0;s<o;++s){for(var f=e[t[s]],d=f[n][1]||0,p=f[n-1][1]||0,h=(d-p)/2,g=0;g<s;++g){var m=e[t[g]],v=m[n][1]||0,w=m[n-1][1]||0;h+=v-w}c+=d,u+=h*d}a[n-1][1]+=a[n-1][0]=r,c&&(r-=u/c)}a[n-1][1]+=a[n-1][0]=r,$n(e,t)}}function Ua(e){"@babel/helpers - typeof";return Ua=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ua(e)}var bC=["type","size","sizeType"];function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sc.apply(this,arguments)}function op(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function sp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?op(Object(r),!0).forEach(function(n){xC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xC(e,t,r){return t=wC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wC(e){var t=jC(e,"string");return Ua(t)=="symbol"?t:t+""}function jC(e,t){if(Ua(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ua(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SC(e,t){if(e==null)return{};var r=OC(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function OC(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var mb={symbolCircle:bd,symbolCross:W2,symbolDiamond:G2,symbolSquare:K2,symbolStar:Z2,symbolTriangle:Q2,symbolWye:tC},_C=Math.PI/180,AC=function(t){var r="symbol".concat(Ws(t));return mb[r]||bd},NC=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*_C;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},PC=function(t,r){mb["symbol".concat(Ws(t))]=r},xd=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,o=t.sizeType,s=o===void 0?"area":o,c=SC(t,bC),u=sp(sp({},c),{},{type:n,size:i,sizeType:s}),f=function(){var v=AC(n),w=rC().type(v).size(NC(i,s,n));return w()},d=u.className,p=u.cx,h=u.cy,g=ie(u,!0);return p===+p&&h===+h&&i===+i?C.createElement("path",Sc({},g,{className:ce("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(h,")"),d:f()})):null};xd.registerSymbol=PC;function En(e){"@babel/helpers - typeof";return En=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(e)}function Oc(){return Oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oc.apply(this,arguments)}function lp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function CC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){Va(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,gb(n.key),n)}}function TC(e,t,r){return t&&EC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MC(e,t,r){return t=Oo(t),kC(e,vb()?Reflect.construct(t,r||[],Oo(e).constructor):t.apply(e,r))}function kC(e,t){if(t&&(En(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DC(e)}function DC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vb=function(){return!!e})()}function Oo(e){return Oo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Oo(e)}function IC(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_c(e,t)}function Va(e,t,r){return t=gb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gb(e){var t=RC(e,"string");return En(t)=="symbol"?t:t+""}function RC(e,t){if(En(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(En(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ht=32,wd=function(e){function t(){return $C(this,t),MC(this,t,arguments)}return IC(t,e),TC(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=ht/2,o=ht/6,s=ht/3,c=n.inactive?a:n.color;if(n.type==="plainline")return C.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:ht,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return C.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(s,`
231            A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(i,`
232            H`).concat(ht,"M").concat(2*s,",").concat(i,`
233            A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return C.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ht/8,"h").concat(ht,"v").concat(ht*3/4,"h").concat(-ht,"z"),className:"recharts-legend-icon"});if(C.isValidElement(n.legendIcon)){var u=CC({},n);return delete u.legendIcon,C.cloneElement(n.legendIcon,u)}return C.createElement(xd,{fill:c,cx:i,cy:i,size:ht,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,o=a.iconSize,s=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:ht,height:ht},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(h,g){var m=h.formatter||c,v=ce(Va(Va({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",h.inactive));if(h.type==="none")return null;var w=re(h.value)?null:h.value;sr(!re(h.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var S=h.inactive?u:h.color;return C.createElement("li",Oc({className:v,style:d,key:"legend-item-".concat(g)},yo(n.props,h,g)),C.createElement(mc,{width:o,height:o,viewBox:f,style:p},n.renderIcon(h)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},m?m(w,h,g):w))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,o=n.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);Va(wd,"displayName","Legend");Va(wd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var LC=Ts;function BC(){this.__data__=new LC,this.size=0}var qC=BC;function zC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var FC=zC;function UC(e){return this.__data__.get(e)}var VC=UC;function WC(e){return this.__data__.has(e)}var HC=WC,GC=Ts,KC=ld,XC=cd,YC=200;function JC(e,t){var r=this.__data__;if(r instanceof GC){var n=r.__data__;if(!KC||n.length<YC-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new XC(n)}return r.set(e,t),this.size=r.size,this}var ZC=JC,QC=Ts,e$=qC,t$=FC,r$=VC,n$=HC,a$=ZC;function sa(e){var t=this.__data__=new QC(e);this.size=t.size}sa.prototype.clear=e$;sa.prototype.delete=t$;sa.prototype.get=r$;sa.prototype.has=n$;sa.prototype.set=a$;var yb=sa,i$="__lodash_hash_undefined__";function o$(e){return this.__data__.set(e,i$),this}var s$=o$;function l$(e){return this.__data__.has(e)}var c$=l$,u$=cd,d$=s$,f$=c$;function _o(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new u$;++t<r;)this.add(e[t])}_o.prototype.add=_o.prototype.push=d$;_o.prototype.has=f$;var bb=_o;function p$(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var xb=p$;function h$(e,t){return e.has(t)}var wb=h$,m$=bb,v$=xb,g$=wb,y$=1,b$=2;function x$(e,t,r,n,a,i){var o=r&y$,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,h=r&b$?new m$:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var g=e[d],m=t[d];if(n)var v=o?n(m,g,d,t,e,i):n(g,m,d,e,t,i);if(v!==void 0){if(v)continue;p=!1;break}
vendor: 4,700 bytes, line 233
233if(h){if(!v$(t,function(w,S){if(!g$(h,S)&&(g===w||a(g,w,r,n,i)))return h.push(S)})){p=!1;break}}else if(!(g===m||a(g,m,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var jb=x$,w$=Qt,j$=w$.Uint8Array,S$=j$;function O$(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var _$=O$;function A$(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var jd=A$,cp=Di,up=S$,N$=sd,P$=jb,C$=_$,$$=jd,E$=1,T$=2,M$="[object Boolean]",k$="[object Date]",D$="[object Error]",I$="[object Map]",R$="[object Number]",L$="[object RegExp]",B$="[object Set]",q$="[object String]",z$="[object Symbol]",F$="[object ArrayBuffer]",U$="[object DataView]",dp=cp?cp.prototype:void 0,Ml=dp?dp.valueOf:void 0;function V$(e,t,r,n,a,i,o){switch(r){case U$:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case F$:return!(e.byteLength!=t.byteLength||!i(new up(e),new up(t)));case M$:case k$:case R$:return N$(+e,+t);case D$:return e.name==t.name&&e.message==t.message;case L$:case q$:return e==t+"";case I$:var s=C$;case B$:var c=n&E$;if(s||(s=$$),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=T$,o.set(e,t);var f=P$(s(e),s(t),n,a,i,o);return o.delete(e),f;case z$:if(Ml)return Ml.call(e)==Ml.call(t)}return!1}var W$=V$;function H$(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Sb=H$,G$=Sb,K$=Qe;function X$(e,t,r){var n=t(e);return K$(e)?n:G$(n,r(e))}var Y$=X$;function J$(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var o=e[r];t(o,r,e)&&(i[a++]=o)}return i}var Z$=J$;function Q$(){return[]}var eE=Q$,tE=Z$,rE=eE,nE=Object.prototype,aE=nE.propertyIsEnumerable,fp=Object.getOwnPropertySymbols,iE=fp?function(e){return e==null?[]:(e=Object(e),tE(fp(e),function(t){return aE.call(e,t)}))}:rE,oE=iE;function sE(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var lE=sE,cE=mr,uE=vr,dE="[object Arguments]";function fE(e){return uE(e)&&cE(e)==dE}var pE=fE,pp=pE,hE=vr,Ob=Object.prototype,mE=Ob.hasOwnProperty,vE=Ob.propertyIsEnumerable,gE=pp(function(){return arguments}())?pp:function(e){return hE(e)&&mE.call(e,"callee")&&!vE.call(e,"callee")},Sd=gE,Ao={exports:{}};function yE(){return!1}var bE=yE;Ao.exports;(function(e,t){var r=Qt,n=bE,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,s=o?r.Buffer:void 0,c=s?s.isBuffer:void 0,u=c||n;e.exports=u})(Ao,Ao.exports);var _b=Ao.exports,xE=9007199254740991,wE=/^(?:0|[1-9]\d*)$/;function jE(e,t){var r=typeof e;return t=t??xE,!!t&&(r=="number"||r!="symbol"&&wE.test(e))&&e>-1&&e%1==0&&e<t}var Od=jE,SE=9007199254740991;function OE(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SE}var _d=OE,_E=mr,AE=_d,NE=vr,PE="[object Arguments]",CE="[object Array]",$E="[object Boolean]",EE="[object Date]",TE="[object Error]",ME="[object Function]",kE="[object Map]",DE="[object Number]",IE="[object Object]",RE="[object RegExp]",LE="[object Set]",BE="[object String]",qE="[object WeakMap]",zE="[object ArrayBuffer]",FE="[object DataView]",UE="[object Float32Array]",VE="[object Float64Array]",WE="[object Int8Array]",HE="[object Int16Array]",GE="[object Int32Array]",KE="[object Uint8Array]",XE="[object Uint8ClampedArray]",YE="[object Uint16Array]",JE="[object Uint32Array]",je={};je[UE]=je[VE]=je[WE]=je[HE]=je[GE]=je[KE]=je[XE]=je[YE]=je[JE]=!0;je[PE]=je[CE]=je[zE]=je[$E]=je[FE]=je[EE]=je[TE]=je[ME]=je[kE]=je[DE]=je[IE]=je[RE]=je[LE]=je[BE]=je[qE]=!1;function ZE(e){return NE(e)&&AE(e.length)&&!!je[_E(e)]}var QE=ZE;function eT(e){return function(t){return e(t)}}var Ab=eT,No={exports:{}};No.exports;(function(e,t){var r=ky,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(No,No.exports);var tT=No.exports,rT=QE,nT=Ab,hp=tT,mp=hp&&hp.isTypedArray,aT=mp?nT(mp):rT,Nb=aT,iT=lE,oT=Sd,sT=Qe,lT=_b,cT=Od,uT=Nb,dT=Object.prototype,fT=dT.hasOwnProperty;function pT(e,t){var r=sT(e),n=!r&&oT(e),a=!r&&!n&&lT(e),i=!r&&!n&&!a&&uT(e),o=r||n||a||i,s=o?iT(e.length,String):[],c=s.length;for(var u in e)(t||fT.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cT(u,c)))&&s.push(u);return s}var hT=pT,mT=Object.prototype;function vT(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mT;return e===r}var gT=vT;function yT(e,t){return function(r){return e(t(r))}}var Pb=yT,bT=Pb,xT=bT(Object.keys,Object),wT=xT,jT=gT,ST=wT,OT=Object.prototype,_T=OT.hasOwnProperty;function AT(e){if(!jT(e))return ST(e);var t=[];for(var r in Object(e))_T.call(e,r)&&r!="constructor"&&t.push(r);return t}var NT=AT,PT=od,CT=_d;
vendor: 6,954 bytes, line 233
233function $T(e){return e!=null&&CT(e.length)&&!PT(e)}var Ri=$T,ET=hT,TT=NT,MT=Ri;function kT(e){return MT(e)?ET(e):TT(e)}var Xs=kT,DT=Y$,IT=oE,RT=Xs;function LT(e){return DT(e,RT,IT)}var BT=LT,vp=BT,qT=1,zT=Object.prototype,FT=zT.hasOwnProperty;function UT(e,t,r,n,a,i){var o=r&qT,s=vp(e),c=s.length,u=vp(t),f=u.length;if(c!=f&&!o)return!1;for(var d=c;d--;){var p=s[d];if(!(o?p in t:FT.call(t,p)))return!1}var h=i.get(e),g=i.get(t);if(h&&g)return h==t&&g==e;var m=!0;i.set(e,t),i.set(t,e);for(var v=o;++d<c;){p=s[d];var w=e[p],S=t[p];if(n)var j=o?n(S,w,p,t,e,i):n(w,S,p,e,t,i);if(!(j===void 0?w===S||a(w,S,r,n,i):j)){m=!1;break}v||(v=p=="constructor")}if(m&&!v){var _=e.constructor,y=t.constructor;_!=y&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof y=="function"&&y instanceof y)&&(m=!1)}return i.delete(e),i.delete(t),m}var VT=UT,WT=nn,HT=Qt,GT=WT(HT,"DataView"),KT=GT,XT=nn,YT=Qt,JT=XT(YT,"Promise"),ZT=JT,QT=nn,eM=Qt,tM=QT(eM,"Set"),Cb=tM,rM=nn,nM=Qt,aM=rM(nM,"WeakMap"),iM=aM,Ac=KT,Nc=ld,Pc=ZT,Cc=Cb,$c=iM,$b=mr,la=Iy,gp="[object Map]",oM="[object Object]",yp="[object Promise]",bp="[object Set]",xp="[object WeakMap]",wp="[object DataView]",sM=la(Ac),lM=la(Nc),cM=la(Pc),uM=la(Cc),dM=la($c),Br=$b;(Ac&&Br(new Ac(new ArrayBuffer(1)))!=wp||Nc&&Br(new Nc)!=gp||Pc&&Br(Pc.resolve())!=yp||Cc&&Br(new Cc)!=bp||$c&&Br(new $c)!=xp)&&(Br=function(e){var t=$b(e),r=t==oM?e.constructor:void 0,n=r?la(r):"";if(n)switch(n){case sM:return wp;case lM:return gp;case cM:return yp;case uM:return bp;case dM:return xp}return t});var fM=Br,kl=yb,pM=jb,hM=W$,mM=VT,jp=fM,Sp=Qe,Op=_b,vM=Nb,gM=1,_p="[object Arguments]",Ap="[object Array]",Ki="[object Object]",yM=Object.prototype,Np=yM.hasOwnProperty;function bM(e,t,r,n,a,i){var o=Sp(e),s=Sp(t),c=o?Ap:jp(e),u=s?Ap:jp(t);c=c==_p?Ki:c,u=u==_p?Ki:u;var f=c==Ki,d=u==Ki,p=c==u;if(p&&Op(e)){if(!Op(t))return!1;o=!0,f=!1}if(p&&!f)return i||(i=new kl),o||vM(e)?pM(e,t,r,n,a,i):hM(e,t,c,r,n,a,i);if(!(r&gM)){var h=f&&Np.call(e,"__wrapped__"),g=d&&Np.call(t,"__wrapped__");if(h||g){var m=h?e.value():e,v=g?t.value():t;return i||(i=new kl),a(m,v,r,n,i)}}return p?(i||(i=new kl),mM(e,t,r,n,a,i)):!1}var xM=bM,wM=xM,Pp=vr;function Eb(e,t,r,n,a){return e===t?!0:e==null||t==null||!Pp(e)&&!Pp(t)?e!==e&&t!==t:wM(e,t,r,n,Eb,a)}var Ad=Eb,jM=yb,SM=Ad,OM=1,_M=2;function AM(e,t,r,n){var a=r.length,i=a,o=!n;if(e==null)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=r[a];var c=s[0],u=e[c],f=s[1];if(o&&s[2]){if(u===void 0&&!(c in e))return!1}else{var d=new jM;if(n)var p=n(u,f,c,e,t,d);if(!(p===void 0?SM(f,u,OM|_M,n,d):p))return!1}}return!0}var NM=AM,PM=Er;function CM(e){return e===e&&!PM(e)}var Tb=CM,$M=Tb,EM=Xs;function TM(e){for(var t=EM(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,$M(a)]}return t}var MM=TM;function kM(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Mb=kM,DM=NM,IM=MM,RM=Mb;function LM(e){var t=IM(e);return t.length==1&&t[0][2]?RM(t[0][0],t[0][1]):function(r){return r===e||DM(r,e,t)}}var BM=LM;function qM(e,t){return e!=null&&t in Object(e)}var zM=qM,FM=zy,UM=Sd,VM=Qe,WM=Od,HM=_d,GM=ks;function KM(e,t,r){t=FM(t,e);for(var n=-1,a=t.length,i=!1;++n<a;){var o=GM(t[n]);if(!(i=e!=null&&r(e,o)))break;e=e[o]}return i||++n!=a?i:(a=e==null?0:e.length,!!a&&HM(a)&&WM(o,a)&&(VM(e)||UM(e)))}var XM=KM,YM=zM,JM=XM;function ZM(e,t){return e!=null&&JM(e,t,YM)}var QM=ZM,ek=Ad,tk=Fy,rk=QM,nk=id,ak=Tb,ik=Mb,ok=ks,sk=1,lk=2;function ck(e,t){return nk(e)&&ak(t)?ik(ok(e),t):function(r){var n=tk(r,e);return n===void 0&&n===t?rk(r,e):ek(t,n,sk|lk)}}var uk=ck;function dk(e){return e}var ca=dk;function fk(e){return function(t){return t?.[e]}}var pk=fk,hk=fd;function mk(e){return function(t){return hk(t,e)}}var vk=mk,gk=pk,yk=vk,bk=id,xk=ks;function wk(e){return bk(e)?gk(xk(e)):yk(e)}var jk=wk,Sk=BM,Ok=uk,_k=ca,Ak=Qe,Nk=jk;function Pk(e){return typeof e=="function"?e:e==null?_k:typeof e=="object"?Ak(e)?Ok(e[0],e[1]):Sk(e):Nk(e)}var Tr=Pk;function Ck(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var kb=Ck;function $k(e){return e!==e}var Ek=$k;function Tk(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var Mk=Tk,kk=kb,Dk=Ek,Ik=Mk;function Rk(e,t,r){return t===t?Ik(e,t,r):kk(e,Dk,r)}var Lk=Rk,Bk=Lk;function qk(e,t){var r=e==null?0:e.length;return!!r&&Bk(e,t,0)>-1}var zk=qk;function Fk(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var Uk=Fk;function Vk(){}var Wk=Vk,Dl=Cb,Hk=Wk,Gk=jd,Kk=1/0,Xk=Dl&&1/Gk(new Dl([,-0]))[1]==Kk?function(e){return new Dl(e)}:Hk,Yk=Xk,Jk=bb,Zk=zk,Qk=Uk,eD=wb,tD=Yk,rD=jd,nD=200;function aD(e,t,r){var n=-1,a=Zk,i=e.length,o=!0,s=[],c=s;if(r)o=!1,a=Qk;else if(i>=nD){var u=t?null:tD(e);if(u)return rD(u);o=!1,a=eD,c=new Jk}else c=t?[]:s;e:for(;++n<i;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var p=c.length;p--;)if(c[p]===d)continue e;t&&c.push(d),s.push(f)}else a(c,d,r)||(c!==s&&c.push(d),s.push(f))}return s}var iD=aD,oD=Tr,sD=iD;function lD(e,t){return e&&e.length?sD(e,oD(t)):[]}var cD=lD;const Cp=we(cD);function Db(e,t,r){return t===!0?Cp(e,r):re(t)?Cp(e,t):e}function Tn(e){"@babel/helpers - typeof";return Tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tn(e)}var uD=["ref"];function $p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$p(Object(r),!0).forEach(function(n){Ys(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ep(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rb(n.key),n)}}function fD(e,t,r){return t&&Ep(e.prototype,t),r&&Ep(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function pD(e,t,r){return t=Po(t),hD(e,Ib()?Reflect.construct(t,r||[],Po(e).constructor):t.apply(e,r))}function hD(e,t){if(t&&(Tn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mD(e)}function mD(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ib(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ib=function(){return!!e})()}
vendor: 4,244 bytes, line 233
233function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Po(e)}function vD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ec(e,t)}function Ec(e,t){return Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ec(e,t)}function Ys(e,t,r){return t=Rb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rb(e){var t=gD(e,"string");return Tn(t)=="symbol"?t:t+""}function gD(e,t){if(Tn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yD(e,t){if(e==null)return{};var r=bD(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bD(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function xD(e){return e.value}function wD(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var r=yD(t,uD);return C.createElement(wd,r)}var Tp=1,An=function(e){function t(){var r;dD(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=pD(this,t,[].concat(a)),Ys(r,"lastBoundingBox",{width:-1,height:-1}),r}return vD(t,e),fD(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>Tp||Math.abs(a.height-this.lastBoundingBox.height)>Tp)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?tr({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,o=a.align,s=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,d,p;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(o==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();d={left:((u||0)-h.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return tr(tr({},d),p)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,o=a.width,s=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,d=tr(tr({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return C.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){n.wrapperNode=h}},wD(i,tr(tr({},this.props),{},{payload:Db(f,u,xD)})))}}],[{key:"getWithHeight",value:function(n,a){var i=tr(tr({},this.defaultProps),n.props),o=i.layout;return o==="vertical"&&F(n.props.height)?{height:n.props.height}:o==="horizontal"?{width:n.props.width||a}:null}}])}(O.PureComponent);Ys(An,"displayName","Legend");Ys(An,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Mp=Di,jD=Sd,SD=Qe,kp=Mp?Mp.isConcatSpreadable:void 0;function OD(e){return SD(e)||jD(e)||!!(kp&&e&&e[kp])}var _D=OD,AD=Sb,ND=_D;
vendor: 4,363 bytes, lines 233-234
233function Lb(e,t,r,n,a){var i=-1,o=e.length;for(r||(r=ND),a||(a=[]);++i<o;){var s=e[i];t>0&&r(s)?t>1?Lb(s,t-1,r,n,a):AD(a,s):n||(a[a.length]=s)}return a}var Bb=Lb;function PD(e){return function(t,r,n){for(var a=-1,i=Object(t),o=n(t),s=o.length;s--;){var c=o[e?s:++a];if(r(i[c],c,i)===!1)break}return t}}var CD=PD,$D=CD,ED=$D(),TD=ED,MD=TD,kD=Xs;function DD(e,t){return e&&MD(e,t,kD)}var qb=DD,ID=Ri;function RD(e,t){return function(r,n){if(r==null)return r;if(!ID(r))return e(r,n);for(var a=r.length,i=t?a:-1,o=Object(r);(t?i--:++i<a)&&n(o[i],i,o)!==!1;);return r}}var LD=RD,BD=qb,qD=LD,zD=qD(BD),Nd=zD,FD=Nd,UD=Ri;function VD(e,t){var r=-1,n=UD(e)?Array(e.length):[];return FD(e,function(a,i,o){n[++r]=t(a,i,o)}),n}var zb=VD;function WD(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var HD=WD,Dp=ta;function GD(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=Dp(e),o=t!==void 0,s=t===null,c=t===t,u=Dp(t);if(!s&&!u&&!i&&e>t||i&&o&&c&&!s&&!u||n&&o&&c||!r&&c||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||s&&r&&a||!o&&a||!c)return-1}return 0}var KD=GD,XD=KD;function YD(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,o=a.length,s=r.length;++n<o;){var c=XD(a[n],i[n]);if(c){if(n>=s)return c;var u=r[n];return c*(u=="desc"?-1:1)}}return e.index-t.index}var JD=YD,Il=dd,ZD=fd,QD=Tr,eI=zb,tI=HD,rI=Ab,nI=JD,aI=ca,iI=Qe;function oI(e,t,r){t.length?t=Il(t,function(i){return iI(i)?function(o){return ZD(o,i.length===1?i[0]:i)}:i}):t=[aI];var n=-1;t=Il(t,rI(QD));var a=eI(e,function(i,o,s){var c=Il(t,function(u){return u(i)});return{criteria:c,index:++n,value:i}});return tI(a,function(i,o){return nI(i,o,r)})}var sI=oI;function lI(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var cI=lI,uI=cI,Ip=Math.max;function dI(e,t,r){return t=Ip(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=Ip(n.length-t,0),o=Array(i);++a<i;)o[a]=n[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=n[a];return s[t]=r(o),uI(e,this,s)}}var fI=dI;function pI(e){return function(){return e}}var hI=pI,mI=nn,vI=function(){try{var e=mI(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Fb=vI,gI=hI,Rp=Fb,yI=ca,bI=Rp?function(e,t){return Rp(e,"toString",{configurable:!0,enumerable:!1,value:gI(t),writable:!0})}:yI,xI=bI,wI=800,jI=16,SI=Date.now;function OI(e){var t=0,r=0;return function(){var n=SI(),a=jI-(n-r);if(r=n,a>0){if(++t>=wI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var _I=OI,AI=xI,NI=_I,PI=NI(AI),CI=PI,$I=ca,EI=fI,TI=CI;function MI(e,t){return TI(EI(e,t,$I),e+"")}var kI=MI,DI=sd,II=Ri,RI=Od,LI=Er;function BI(e,t,r){if(!LI(r))return!1;var n=typeof t;return(n=="number"?II(r)&&RI(t,r.length):n=="string"&&t in r)?DI(r[t],e):!1}var Js=BI,qI=Bb,zI=sI,FI=kI,Lp=Js,UI=FI(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Lp(e,t[0],t[1])?t=[]:r>2&&Lp(t[0],t[1],t[2])&&(t=[t[0]]),zI(e,qI(t,1),[])}),VI=UI;const Pd=we(VI);function Wa(e){"@babel/helpers - typeof";return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(e)}function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tc.apply(this,arguments)}function WI(e,t){return XI(e)||KI(e,t)||GI(e,t)||HI()}function HI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
234In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GI(e,t){if(e){if(typeof e=="string")return Bp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bp(e,t)}}function Bp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function KI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}
vendor: 27,967 bytes, lines 234-240
234finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function XI(e){if(Array.isArray(e))return e}function qp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qp(Object(r),!0).forEach(function(n){YI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YI(e,t,r){return t=JI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JI(e){var t=ZI(e,"string");return Wa(t)=="symbol"?t:t+""}function ZI(e,t){if(Wa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QI(e){return Array.isArray(e)&&Ie(e[0])&&Ie(e[1])?e.join(" ~ "):e}var eR=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,s=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,p=t.itemSorter,h=t.wrapperClassName,g=t.labelClassName,m=t.label,v=t.labelFormatter,w=t.accessibilityLayer,S=w===void 0?!1:w,j=function(){if(f&&f.length){var $={padding:0,margin:0},T=(p?Pd(f,p):f).map(function(k,M){if(k.type==="none")return null;var I=Rl({display:"block",paddingTop:4,paddingBottom:4,color:k.color||"#000"},s),R=k.formatter||d||QI,z=k.value,q=k.name,K=z,X=q;if(R&&K!=null&&X!=null){var L=R(z,q,k,M,f);if(Array.isArray(L)){var V=WI(L,2);K=V[0],X=V[1]}else K=L}return C.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(M),style:I},Ie(X)?C.createElement("span",{className:"recharts-tooltip-item-name"},X):null,Ie(X)?C.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,C.createElement("span",{className:"recharts-tooltip-item-value"},K),C.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:$},T)}return null},_=Rl({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),y=Rl({margin:0},u),b=!oe(m),x=b?m:"",A=ce("recharts-default-tooltip",h),N=ce("recharts-tooltip-label",g);b&&v&&f!==void 0&&f!==null&&(x=v(m,f));var E=S?{role:"status","aria-live":"assertive"}:{};return C.createElement("div",Tc({className:A,style:_},E),C.createElement("p",{className:N,style:y},C.isValidElement(x)?x:"".concat(x)),j())};function Ha(e){"@babel/helpers - typeof";return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ha(e)}function Xi(e,t,r){return t=tR(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tR(e){var t=rR(e,"string");return Ha(t)=="symbol"?t:t+""}function rR(e,t){if(Ha(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ha(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xa="recharts-tooltip-wrapper",nR={visibility:"hidden"};function aR(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return ce(xa,Xi(Xi(Xi(Xi({},"".concat(xa,"-right"),F(r)&&t&&F(t.x)&&r>=t.x),"".concat(xa,"-left"),F(r)&&t&&F(t.x)&&r<t.x),"".concat(xa,"-bottom"),F(n)&&t&&F(t.y)&&n>=t.y),"".concat(xa,"-top"),F(n)&&t&&F(t.y)&&n<t.y))}function zp(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&F(i[n]))return i[n];var f=r[n]-s-a,d=r[n]+a;if(t[n])return o[n]?f:d;if(o[n]){var p=f,h=c[n];return p<h?Math.max(d,c[n]):Math.max(f,c[n])}var g=d+s,m=c[n]+u;return g>m?Math.max(f,c[n]):Math.max(d,c[n])}function iR(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function oR(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,u,f,d;return o.height>0&&o.width>0&&r?(f=zp({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=zp({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=iR({translateX:f,translateY:d,useTranslate3d:s})):u=nR,{cssProperties:u,cssClasses:aR({translateX:f,translateY:d,coordinate:r})}}function Mn(e){"@babel/helpers - typeof";return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mn(e)}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Up(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fp(Object(r),!0).forEach(function(n){kc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vb(n.key),n)}}function cR(e,t,r){return t&&lR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uR(e,t,r){return t=Co(t),dR(e,Ub()?Reflect.construct(t,r||[],Co(e).constructor):t.apply(e,r))}function dR(e,t){if(t&&(Mn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fR(e)}function fR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ub(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ub=function(){return!!e})()}function Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Co(e)}function pR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mc(e,t)}function Mc(e,t){return Mc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Mc(e,t)}function kc(e,t,r){return t=Vb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vb(e){var t=hR(e,"string");return Mn(t)=="symbol"?t:t+""}function hR(e,t){if(Mn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Mn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Vp=1,mR=function(e){function t(){var r;sR(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=uR(this,t,[].concat(a)),kc(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),kc(r,"handleKeyDown",function(o){if(o.key==="Escape"){var s,c,u,f;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=r.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(u=(f=r.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),r}return pR(t,e),cR(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>Vp||Math.abs(n.height-this.state.lastBoundingBox.height)>Vp)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,d=a.hasPayload,p=a.isAnimationActive,h=a.offset,g=a.position,m=a.reverseDirection,v=a.useTranslate3d,w=a.viewBox,S=a.wrapperStyle,j=oR({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:h,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),_=j.cssClasses,y=j.cssProperties,b=Up(Up({transition:p&&i?"transform ".concat(s,"ms ").concat(c):void 0},y),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},S);return C.createElement("div",{tabIndex:-1,className:_,style:b,ref:function(A){n.wrapperNode=A}},u)}}])}(O.PureComponent),vR=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},lr={isSsr:vR(),get:function(t){return lr[t]},set:function(t,r){if(typeof t=="string")lr[t]=r;else{var n=Object.keys(t);n&&n.length&&n.forEach(function(a){lr[a]=t[a]})}}};function kn(e){"@babel/helpers - typeof";return kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function Wp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(r),!0).forEach(function(n){Cd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yR(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hb(n.key),n)}}function bR(e,t,r){return t&&yR(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xR(e,t,r){return t=$o(t),wR(e,Wb()?Reflect.construct(t,r||[],$o(e).constructor):t.apply(e,r))}function wR(e,t){if(t&&(kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jR(e)}function jR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wb=function(){return!!e})()}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$o(e)}function SR(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dc(e,t)}function Dc(e,t){return Dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Dc(e,t)}function Cd(e,t,r){return t=Hb(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hb(e){var t=OR(e,"string");return kn(t)=="symbol"?t:t+""}function OR(e,t){if(kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _R(e){return e.dataKey}function AR(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(eR,t)}var Ht=function(e){function t(){return gR(this,t),xR(this,t,arguments)}return SR(t,e),bR(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,d=a.filterNull,p=a.isAnimationActive,h=a.offset,g=a.payload,m=a.payloadUniqBy,v=a.position,w=a.reverseDirection,S=a.useTranslate3d,j=a.viewBox,_=a.wrapperStyle,y=g??[];d&&y.length&&(y=Db(g.filter(function(x){return x.value!=null&&(x.hide!==!0||n.props.includeHidden)}),m,_R));var b=y.length>0;return C.createElement(mR,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:p,active:i,coordinate:f,hasPayload:b,offset:h,position:v,reverseDirection:w,useTranslate3d:S,viewBox:j,wrapperStyle:_},AR(u,Hp(Hp({},this.props),{},{payload:y})))}}])}(O.PureComponent);Cd(Ht,"displayName","Tooltip");Cd(Ht,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!lr.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var NR=Qt,PR=function(){return NR.Date.now()},CR=PR,$R=/\s/;function ER(e){for(var t=e.length;t--&&$R.test(e.charAt(t)););return t}var TR=ER,MR=TR,kR=/^\s+/;function DR(e){return e&&e.slice(0,MR(e)+1).replace(kR,"")}var IR=DR,RR=IR,Gp=Er,LR=ta,Kp=NaN,BR=/^[-+]0x[0-9a-f]+$/i,qR=/^0b[01]+$/i,zR=/^0o[0-7]+$/i,FR=parseInt;function UR(e){if(typeof e=="number")return e;if(LR(e))return Kp;if(Gp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Gp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RR(e);var r=qR.test(e);return r||zR.test(e)?FR(e.slice(2),r?2:8):BR.test(e)?Kp:+e}var Gb=UR,VR=Er,Ll=CR,Xp=Gb,WR="Expected a function",HR=Math.max,GR=Math.min;function KR(e,t,r){var n,a,i,o,s,c,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(WR);t=Xp(t)||0,VR(r)&&(f=!!r.leading,d="maxWait"in r,i=d?HR(Xp(r.maxWait)||0,t):i,p="trailing"in r?!!r.trailing:p);function h(b){var x=n,A=a;return n=a=void 0,u=b,o=e.apply(A,x),o}function g(b){return u=b,s=setTimeout(w,t),f?h(b):o}function m(b){var x=b-c,A=b-u,N=t-x;return d?GR(N,i-A):N}function v(b){var x=b-c,A=b-u;return c===void 0||x>=t||x<0||d&&A>=i}function w(){var b=Ll();if(v(b))return S(b);s=setTimeout(w,m(b))}function S(b){return s=void 0,p&&n?h(b):(n=a=void 0,o)}function j(){s!==void 0&&clearTimeout(s),u=0,n=c=a=s=void 0}function _(){return s===void 0?o:S(Ll())}function y(){var b=Ll(),x=v(b);if(n=arguments,a=this,c=b,x){if(s===void 0)return g(c);if(d)return clearTimeout(s),s=setTimeout(w,t),h(c)}return s===void 0&&(s=setTimeout(w,t)),o}return y.cancel=j,y.flush=_,y}var XR=KR,YR=XR,JR=Er,ZR="Expected a function";function QR(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(ZR);return JR(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),YR(e,t,{leading:n,maxWait:t,trailing:a})}var e3=QR;const Kb=we(e3);function Ga(e){"@babel/helpers - typeof";return Ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ga(e)}function Yp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yp(Object(r),!0).forEach(function(n){t3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t3(e,t,r){return t=r3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r3(e){var t=n3(e,"string");return Ga(t)=="symbol"?t:t+""}function n3(e,t){if(Ga(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ga(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a3(e,t){return l3(e)||s3(e,t)||o3(e,t)||i3()}function i3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
235In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o3(e,t){if(e){if(typeof e=="string")return Jp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jp(e,t)}}function Jp(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function l3(e){if(Array.isArray(e))return e}var c3=O.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,o=i===void 0?"100%":i,s=e.height,c=s===void 0?"100%":s,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,p=e.maxHeight,h=e.children,g=e.debounce,m=g===void 0?0:g,v=e.id,w=e.className,S=e.onResize,j=e.style,_=j===void 0?{}:j,y=O.useRef(null),b=O.useRef();b.current=S,O.useImperativeHandle(t,function(){return Object.defineProperty(y.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),y.current},configurable:!0})});var x=O.useState({containerWidth:a.width,containerHeight:a.height}),A=a3(x,2),N=A[0],E=A[1],P=O.useCallback(function(T,k){E(function(M){var I=Math.round(T),R=Math.round(k);return M.containerWidth===I&&M.containerHeight===R?M:{containerWidth:I,containerHeight:R}})},[]);O.useEffect(function(){var T=function(q){var K,X=q[0].contentRect,L=X.width,V=X.height;P(L,V),(K=b.current)===null||K===void 0||K.call(b,L,V)};m>0&&(T=Kb(T,m,{trailing:!0,leading:!1}));var k=new ResizeObserver(T),M=y.current.getBoundingClientRect(),I=M.width,R=M.height;return P(I,R),k.observe(y.current),function(){k.disconnect()}},[P,m]);var $=O.useMemo(function(){var T=N.containerWidth,k=N.containerHeight;if(T<0||k<0)return null;sr(Fr(o)||Fr(c),`The width(%s) and height(%s) are both fixed numbers,
236       maybe you don't need to use a ResponsiveContainer.`,o,c),sr(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Fr(o)?T:o,I=Fr(c)?k:c;r&&r>0&&(M?I=M/r:I&&(M=I*r),p&&I>p&&(I=p)),sr(M>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0,
237       please check the style of container, or the props width(%s) and height(%s),
238       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
239       height and width.`,M,I,o,c,f,d,r);var R=!Array.isArray(h)&&or(h.type).endsWith("Chart");return C.Children.map(h,function(z){return C.isValidElement(z)?O.cloneElement(z,Yi({width:M,height:I},R?{style:Yi({height:"100%",width:"100%",maxHeight:I,maxWidth:M},z.props.style)}:{})):z})},[r,h,c,p,d,f,N,o]);return C.createElement("div",{id:v?"".concat(v):void 0,className:ce("recharts-responsive-container",w),style:Yi(Yi({},_),{},{width:o,height:c,minWidth:f,minHeight:d,maxHeight:p}),ref:y},$)}),Xb=function(t){return null};Xb.displayName="Cell";function Ka(e){"@babel/helpers - typeof";return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ka(e)}function Zp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ic(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zp(Object(r),!0).forEach(function(n){u3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function u3(e,t,r){return t=d3(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d3(e){var t=f3(e,"string");return Ka(t)=="symbol"?t:t+""}function f3(e,t){if(Ka(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ka(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fn={widthCache:{},cacheCount:0},p3=2e3,h3={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Qp="recharts_measurement_span";function m3(e){var t=Ic({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var Da=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||lr.isSsr)return{width:0,height:0};var n=m3(r),a=JSON.stringify({text:t,copyStyle:n});if(fn.widthCache[a])return fn.widthCache[a];try{var i=document.getElementById(Qp);i||(i=document.createElement("span"),i.setAttribute("id",Qp),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Ic(Ic({},h3),n);Object.assign(i.style,o),i.textContent="".concat(t);var s=i.getBoundingClientRect(),c={width:s.width,height:s.height};return fn.widthCache[a]=c,++fn.cacheCount>p3&&(fn.cacheCount=0,fn.widthCache={}),c}catch{return{width:0,height:0}}},v3=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function Eo(e,t){return x3(e)||b3(e,t)||y3(e,t)||g3()}function g3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
240In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y3(e,t){if(e){if(typeof e=="string")return eh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eh(e,t)}}function eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function b3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function x3(e){if(Array.isArray(e))return e}function w3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function th(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S3(n.key),n)}}function j3(e,t,r){return t&&th(e.prototype,t),r&&th(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function S3(e){var t=O3(e,"string");return Xa(t)=="symbol"?t:t+""}function O3(e,t){if(Xa(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Xa(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nh=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_3=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,A3=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Yb={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},N3=Object.keys(Yb),yn="NaN";function P3(e,t){return e*Yb[t]}var Ji=function(){function e(t,r){w3(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!_3.test(r)&&(this.num=NaN,this.unit=""),N3.includes(r)&&(this.num=P3(t,r),this.unit="px")}return j3(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(r){var n,a=(n=A3.exec(r))!==null&&n!==void 0?n:[],i=Eo(a,3),o=i[1],s=i[2];return new e(parseFloat(o),s??"")}}])}();function Jb(e){if(e.includes(yn))return yn;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=rh.exec(t))!==null&&r!==void 0?r:[],a=Eo(n,4),i=a[1],o=a[2],s=a[3],c=Ji.parse(i??""),u=Ji.parse(s??""),f=o==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return yn;t=t.replace(rh,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,p=(d=nh.exec(t))!==null&&d!==void 0?d:[],h=Eo(p,4),g=h[1],m=h[2],v=h[3],w=Ji.parse(g??""),S=Ji.parse(v??""),j=m==="+"?w.add(S):w.subtract(S);if(j.isNaN())return yn;t=t.replace(nh,j.toString())}return t}var ah=/\(([^()]*)\)/;function C3(e){for(var t=e;t.includes("(");){var r=ah.exec(t),n=Eo(r,2),a=n[1];t=t.replace(ah,Jb(a))}return t}function $3(e){var t=e.replace(/\s+/g,"");return t=C3(t),t=Jb(t),t}function E3(e){try{return $3(e)}catch{return yn}}function Bl(e){var t=E3(e.slice(5,-1));return t===yn?"":t}var T3=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],M3=["dx","dy","angle","className","breakAll"];function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
240for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rc.apply(this,arguments)}function ih(e,t){if(e==null)return{};var r=k3(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function k3(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function oh(e,t){return L3(e)||R3(e,t)||I3(e,t)||D3()}function D3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
241In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I3(e,t){if(e){if(typeof e=="string")return sh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sh(e,t)}}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R3(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function L3(e){if(Array.isArray(e))return e}var Zb=/[ \f\n\r\t\v\u2028\u2029]+/,Qb=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];oe(r)||(n?i=r.toString().split(""):i=r.toString().split(Zb));var o=i.map(function(c){return{word:c,width:Da(c,a).width}}),s=n?0:Da(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},B3=function(t,r,n,a,i){var o=t.maxLines,s=t.children,c=t.style,u=t.breakAll,f=F(o),d=s,p=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return M.reduce(function(I,R){var z=R.word,q=R.width,K=I[I.length-1];if(K&&(a==null||i||K.width+q+n<Number(a)))K.words.push(z),K.width+=q+n;else{var X={words:[z],width:q};I.push(X)}return I},[])},h=p(r),g=function(M){return M.reduce(function(I,R){return I.width>R.width?I:R})};if(!f)return h;for(var m="…",v=function(M){var I=d.slice(0,M),R=Qb({breakAll:u,style:c,children:I+m}).wordsWithComputedWidth,z=p(R),q=z.length>o||g(z).width>Number(a);return[q,z]},w=0,S=d.length-1,j=0,_;w<=S&&j<=d.length-1;){var y=Math.floor((w+S)/2),b=y-1,x=v(b),A=oh(x,2),N=A[0],E=A[1],P=v(y),$=oh(P,1),T=$[0];if(!N&&!T&&(w=y+1),N&&T&&(S=y-1),!N&&T){_=E;break}j++}return _||h},lh=function(t){var r=oe(t)?[]:t.toString().split(Zb);return[{words:r}]},q3=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,s=t.maxLines;if((r||n)&&!lr.isSsr){var c,u,f=Qb({breakAll:o,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;c=d,u=p}else return lh(a);return B3({breakAll:o,children:a,maxLines:s,style:i},c,u,r,n)}return lh(a)},ch="#808080",To=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,h=p===void 0?"start":p,g=t.verticalAnchor,m=g===void 0?"end":g,v=t.fill,w=v===void 0?ch:v,S=ih(t,T3),j=O.useMemo(function(){return q3({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:d,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,d,S.style,S.width]),_=S.dx,y=S.dy,b=S.angle,x=S.className,A=S.breakAll,N=ih(S,M3);if(!Ie(n)||!Ie(i))return null;var E=n+(F(_)?_:0),P=i+(F(y)?y:0),$;switch(m){case"start":$=Bl("calc(".concat(u,")"));break;case"middle":$=Bl("calc(".concat((j.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:$=Bl("calc(".concat(j.length-1," * -").concat(s,")"));break}var T=[];if(d){var k=j[0].width,M=S.width;T.push("scale(".concat((F(M)?M/k:1)/k,")"))}return b&&T.push("rotate(".concat(b,", ").concat(E,", ").concat(P,")")),T.length&&(N.transform=T.join(" ")),C.createElement("text",Rc({},ie(N,!0),{x:E,y:P,className:ce("recharts-text",x),textAnchor:h,fill:w.includes("url")?ch:w}),j.map(function(I,R){var z=I.words.join(A?"":" ");return C.createElement("tspan",{x:E,dy:R===0?$:s,key:"".concat(z,"-").concat(R)},z)}))};function Pr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function z3(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $d(e){let t,r,n;e.length!==2?(t=Pr,r=(s,c)=>Pr(e(s),c),n=(s,c)=>e(s)-c):(t=e===Pr||e===z3?e:F3,r=e,n=e);function a(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<0?u=d+1:f=d}while(u<f)}return u}function i(s,c,u=0,f=s.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;r(s[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(s,c,u=0,f=s.length){const d=a(s,c,u,f-1);return d>u&&n(s[d-1],c)>-n(s[d],c)?d-1:d}return{left:a,center:o,right:i}}function F3(){return 0}function ex(e){return e===null?NaN:+e}function*U3(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const V3=$d(Pr),Li=V3.right;$d(ex).center;class uh extends Map{constructor(t,r=G3){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(dh(this,t))}has(t){return super.has(dh(this,t))}set(t,r){return super.set(W3(this,t),r)}delete(t){return super.delete(H3(this,t))}}function dh({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function W3({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function H3({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function G3(e){return e!==null&&typeof e=="object"?e.valueOf():e}function K3(e=Pr){if(e===Pr)return tx;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function tx(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}
241const X3=Math.sqrt(50),Y3=Math.sqrt(10),J3=Math.sqrt(2);function Mo(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=X3?10:i>=Y3?5:i>=J3?2:1;let s,c,u;return a<0?(u=Math.pow(10,-a)/o,s=Math.round(e*u),c=Math.round(t*u),s/u<e&&++s,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*o,s=Math.round(e/u),c=Math.round(t/u),s*u<e&&++s,c*u>t&&--c),c<s&&.5<=r&&r<2?Mo(e,t,r*2):[s,c,u]}function Lc(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,o]=n?Mo(t,e,r):Mo(e,t,r);if(!(i>=a))return[];const s=i-a+1,c=new Array(s);if(n)if(o<0)for(let u=0;u<s;++u)c[u]=(i-u)/-o;else for(let u=0;u<s;++u)c[u]=(i-u)*o;else if(o<0)for(let u=0;u<s;++u)c[u]=(a+u)/-o;else for(let u=0;u<s;++u)c[u]=(a+u)*o;return c}function Bc(e,t,r){return t=+t,e=+e,r=+r,Mo(e,t,r)[2]}function qc(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Bc(t,e,r):Bc(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function fh(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function ph(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function rx(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?tx:K3(a);n>r;){if(n-r>600){const c=n-r+1,u=t-r+1,f=Math.log(c),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),h=Math.max(r,Math.floor(t-u*d/c+p)),g=Math.min(n,Math.floor(t+(c-u)*d/c+p));rx(e,t,h,g,a)}const i=e[t];let o=r,s=n;for(wa(e,r,t),a(e[n],i)>0&&wa(e,r,n);o<s;){for(wa(e,o,s),++o,--s;a(e[o],i)<0;)++o;for(;a(e[s],i)>0;)--s}a(e[r],i)===0?wa(e,r,s):(++s,wa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function wa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function Z3(e,t,r){if(e=Float64Array.from(U3(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return ph(e);if(t>=1)return fh(e);var n,a=(n-1)*t,i=Math.floor(a),o=fh(rx(e,i).subarray(0,i+1)),s=ph(e.subarray(i+1));return o+(s-o)*(a-i)}}function Q3(e,t,r=ex){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),o=+r(e[i],i,e),s=+r(e[i+1],i+1,e);return o+(s-o)*(a-i)}}function eL(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function Ot(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function gr(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 zc=Symbol("implicit");function Ed(){var e=new uh,t=[],r=[],n=zc;function a(i){let o=e.get(i);if(o===void 0){if(n!==zc)return n;e.set(i,o=t.push(i)-1)}return r[o%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new uh;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Ed(t,r).unknown(n)},Ot.apply(a,arguments),a}function Ya(){var e=Ed().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,o,s=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var p=t().length,h=a<n,g=h?a:n,m=h?n:a;i=(m-g)/Math.max(1,p-c+u*2),s&&(i=Math.floor(i)),g+=(m-g-i*(p-c))*f,o=i*(1-c),s&&(g=Math.round(g),o=Math.round(o));var v=eL(p).map(function(w){return g+i*w});return r(h?v.reverse():v)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([n,a]=p,n=+n,a=+a,d()):[n,a]},e.rangeRound=function(p){return[n,a]=p,n=+n,a=+a,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(p){return arguments.length?(s=!!p,d()):s},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),d()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),d()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,d()):u},e.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},e.copy=function(){return Ya(t(),[n,a]).round(s).paddingInner(c).paddingOuter(u).align(f)},Ot.apply(d(),arguments)}function nx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return nx(t())},e}function Ia(){return nx(Ya.apply(null,arguments).paddingInner(1))}function Td(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ax(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Bi(){}var Ja=.7,ko=1/Ja,Nn="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tL=/^#([0-9a-f]{3,8})$/,rL=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),nL=new RegExp(`^rgb\\(${Xt},${Xt},${Xt}\\)$`),aL=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${Za}\\)$`),iL=new RegExp(`^rgba\\(${Xt},${Xt},${Xt},${Za}\\)$`),oL=new RegExp(`^hsl\\(${Za},${Xt},${Xt}\\)$`),sL=new RegExp(`^hsla\\(${Za},${Xt},${Xt},${Za}\\)$`),hh={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};Td(Bi,Qa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:mh,formatHex:mh,formatHex8:lL,formatHsl:cL,formatRgb:vh,toString:vh});function mh(){return this.rgb().formatHex()}function lL(){return this.rgb().formatHex8()}function cL(){return ix(this).formatHsl()}function vh(){return this.rgb().formatRgb()}function Qa(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=tL.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?gh(t):r===3?new Ze(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Zi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Zi(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=rL.exec(e))?new Ze(t[1],t[2],t[3],1):(t=nL.exec(e))?new Ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=aL.exec(e))?Zi(t[1],t[2],t[3],t[4]):(t=iL.exec(e))?Zi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oL.exec(e))?xh(t[1],t[2]/100,t[3]/100,1):(t=sL.exec(e))?xh(t[1],t[2]/100,t[3]/100,t[4]):hh.hasOwnProperty(e)?gh(hh[e]):e==="transparent"?new Ze(NaN,NaN,NaN,0):null}function gh(e){return new Ze(e>>16&255,e>>8&255,e&255,1)}function Zi(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ze(e,t,r,n)}function uL(e){return e instanceof Bi||(e=Qa(e)),e?(e=e.rgb(),new Ze(e.r,e.g,e.b,e.opacity)):new Ze}function Fc(e,t,r,n){return arguments.length===1?uL(e):new Ze(e,t,r,n??1)}function Ze(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}
vendor: 2,971 bytes, line 241
241Td(Ze,Fc,ax(Bi,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ja:Math.pow(Ja,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(Gr(this.r),Gr(this.g),Gr(this.b),Do(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:yh,formatHex:yh,formatHex8:dL,formatRgb:bh,toString:bh}));function yh(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}`}function dL(){return`#${Ur(this.r)}${Ur(this.g)}${Ur(this.b)}${Ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function bh(){const e=Do(this.opacity);return`${e===1?"rgb(":"rgba("}${Gr(this.r)}, ${Gr(this.g)}, ${Gr(this.b)}${e===1?")":`, ${e})`}`}function Do(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Gr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ur(e){return e=Gr(e),(e<16?"0":"")+e.toString(16)}function xh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Pt(e,t,r,n)}function ix(e){if(e instanceof Pt)return new Pt(e.h,e.s,e.l,e.opacity);if(e instanceof Bi||(e=Qa(e)),!e)return new Pt;if(e instanceof Pt)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,c=(i+a)/2;return s?(t===i?o=(r-n)/s+(r<n)*6:r===i?o=(n-t)/s+2:o=(t-r)/s+4,s/=c<.5?i+a:2-i-a,o*=60):s=c>0&&c<1?0:o,new Pt(o,s,c,e.opacity)}function fL(e,t,r,n){return arguments.length===1?ix(e):new Pt(e,t,r,n??1)}function Pt(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Td(Pt,fL,ax(Bi,{brighter(e){return e=e==null?ko:Math.pow(ko,e),new Pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ja:Math.pow(Ja,e),new Pt(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Ze(ql(e>=240?e-240:e+120,a,n),ql(e,a,n),ql(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Pt(wh(this.h),Qi(this.s),Qi(this.l),Do(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=Do(this.opacity);return`${e===1?"hsl(":"hsla("}${wh(this.h)}, ${Qi(this.s)*100}%, ${Qi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function wh(e){return e=(e||0)%360,e<0?e+360:e}function Qi(e){return Math.max(0,Math.min(1,e||0))}function ql(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Md=e=>()=>e;function pL(e,t){return function(r){return e+r*t}}function hL(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function mL(e){return(e=+e)==1?ox:function(t,r){return r-t?hL(t,r,e):Md(isNaN(t)?r:t)}}function ox(e,t){var r=t-e;return r?pL(e,r):Md(isNaN(e)?t:e)}const jh=function e(t){var r=mL(t);function n(a,i){var o=r((a=Fc(a)).r,(i=Fc(i)).r),s=r(a.g,i.g),c=r(a.b,i.b),u=ox(a.opacity,i.opacity);
vendor: 5,640 bytes, line 241
241return function(f){return a.r=o(f),a.g=s(f),a.b=c(f),a.opacity=u(f),a+""}}return n.gamma=e,n}(1);function vL(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function gL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yL(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o<n;++o)a[o]=ua(e[o],t[o]);for(;o<r;++o)i[o]=t[o];return function(s){for(o=0;o<n;++o)i[o]=a[o](s);return i}}function bL(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Io(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function xL(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=ua(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var Uc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zl=new RegExp(Uc.source,"g");function wL(e){return function(){return e}}function jL(e){return function(t){return e(t)+""}}function SL(e,t){var r=Uc.lastIndex=zl.lastIndex=0,n,a,i,o=-1,s=[],c=[];for(e=e+"",t=t+"";(n=Uc.exec(e))&&(a=zl.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,c.push({i:o,x:Io(n,a)})),r=zl.lastIndex;return r<t.length&&(i=t.slice(r),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?jL(c[0].x):wL(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)s[(d=c[f]).i]=d.x(u);return s.join("")})}function ua(e,t){var r=typeof t,n;return t==null||r==="boolean"?Md(t):(r==="number"?Io:r==="string"?(n=Qa(t))?(t=n,jh):SL:t instanceof Qa?jh:t instanceof Date?bL:gL(t)?vL:Array.isArray(t)?yL:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xL:Io)(e,t)}function kd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function OL(e,t){t===void 0&&(t=e,e=ua);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return i[s](o-s)}}function _L(e){return function(){return e}}function Ro(e){return+e}var Sh=[0,1];function Ye(e){return e}function Vc(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:_L(isNaN(t)?NaN:.5)}function AL(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function NL(e,t,r){var n=e[0],a=e[1],i=t[0],o=t[1];return a<n?(n=Vc(a,n),i=r(o,i)):(n=Vc(n,a),i=r(i,o)),function(s){return i(n(s))}}function PL(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)a[o]=Vc(e[o],e[o+1]),i[o]=r(t[o],t[o+1]);return function(s){var c=Li(e,s,1,n)-1;return i[c](a[c](s))}}function qi(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zs(){var e=Sh,t=Sh,r=ua,n,a,i,o=Ye,s,c,u;function f(){var p=Math.min(e.length,t.length);return o!==Ye&&(o=AL(e[0],e[p-1])),s=p>2?PL:NL,c=u=null,d}function d(p){return p==null||isNaN(p=+p)?i:(c||(c=s(e.map(n),t,r)))(n(o(p)))}return d.invert=function(p){return o(a((u||(u=s(t,e.map(n),Io)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Ro),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),r=kd,f()},d.clamp=function(p){return arguments.length?(o=p?!0:Ye,f()):o!==Ye},d.interpolate=function(p){return arguments.length?(r=p,f()):r},d.unknown=function(p){return arguments.length?(i=p,d):i},function(p,h){return n=p,a=h,f()}}function Dd(){return Zs()(Ye,Ye)}function CL(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Lo(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Dn(e){return e=Lo(Math.abs(e)),e?e[1]:NaN}function $L(e,t){return function(r,n){for(var a=r.length,i=[],o=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),i.push(r.substring(a-=s,a+s)),!((c+=s+1)>n));)s=e[o=(o+1)%e.length];return i.reverse().join(t)}}function EL(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var TL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ei(e){if(!(t=TL.exec(e)))throw new Error("invalid format: "+e);var t;return new Id({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]})}ei.prototype=Id.prototype;function Id(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+""}Id.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 ML(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var sx;function kL(e,t){var r=Lo(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(sx=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>
vendor: 5,881 bytes, line 241
2410?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Lo(e,Math.max(0,t+i-1))[0]}function Oh(e,t){var r=Lo(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const _h={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:CL,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)=>Oh(e*100,t),r:Oh,s:kL,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ah(e){return e}var Nh=Array.prototype.map,Ph=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DL(e){var t=e.grouping===void 0||e.thousands===void 0?Ah:$L(Nh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?Ah:EL(Nh.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=ei(d);var p=d.fill,h=d.align,g=d.sign,m=d.symbol,v=d.zero,w=d.width,S=d.comma,j=d.precision,_=d.trim,y=d.type;y==="n"?(S=!0,y="g"):_h[y]||(j===void 0&&(j=12),_=!0,y="g"),(v||p==="0"&&h==="=")&&(v=!0,p="0",h="=");var b=m==="$"?r:m==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x=m==="$"?n:/[%p]/.test(y)?o:"",A=_h[y],N=/[defgprs%]/.test(y);j=j===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function E(P){var $=b,T=x,k,M,I;if(y==="c")T=A(P)+T,P="";else{P=+P;var R=P<0||1/P<0;if(P=isNaN(P)?c:A(Math.abs(P),j),_&&(P=ML(P)),R&&+P==0&&g!=="+"&&(R=!1),$=(R?g==="("?g:s:g==="-"||g==="("?"":g)+$,T=(y==="s"?Ph[8+sx/3]:"")+T+(R&&g==="("?")":""),N){for(k=-1,M=P.length;++k<M;)if(I=P.charCodeAt(k),48>I||I>57){T=(I===46?a+P.slice(k+1):P.slice(k))+T,P=P.slice(0,k);break}}}S&&!v&&(P=t(P,1/0));var z=$.length+P.length+T.length,q=z<w?new Array(w-z+1).join(p):"";switch(S&&v&&(P=t(q+P,q.length?w-T.length:1/0),q=""),h){case"<":P=$+P+T+q;break;case"=":P=$+q+P+T;break;case"^":P=q.slice(0,z=q.length>>1)+$+P+T+q.slice(z);break;default:P=q+$+P+T;break}return i(P)}return E.toString=function(){return d+""},E}function f(d,p){var h=u((d=ei(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Dn(p)/3)))*3,m=Math.pow(10,-g),v=Ph[8+g/3];return function(w){return h(m*w)+v}}return{format:u,formatPrefix:f}}var eo,Rd,lx;IL({thousands:",",grouping:[3],currency:["$",""]});function IL(e){return eo=DL(e),Rd=eo.format,lx=eo.formatPrefix,eo}function RL(e){return Math.max(0,-Dn(Math.abs(e)))}function LL(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dn(t)/3)))*3-Dn(Math.abs(e)))}function BL(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dn(t)-Dn(e))+1}function cx(e,t,r,n){var a=qc(e,t,r),i;switch(n=ei(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=LL(a,o))&&(n.precision=i),lx(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=BL(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=RL(a))&&(n.precision=i-(n.type==="%")*2);break}}return Rd(n)}function Mr(e){var t=e.domain;return e.ticks=function(r){var n=t();return Lc(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return cx(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,o=n[a],s=n[i],c,u,f=10;for(s<o&&(u=o,o=s,s=u,u=a,a=i,i=u);f-- >0;){if(u=Bc(o,s,r),u===c)return n[a]=o,n[i]=s,t(n);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;c=u}return e},e}function Bo(){var e=Dd();return e.copy=function(){return qi(e,Bo())},Ot.apply(e,arguments),Mr(e)}function ux(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ro),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return ux(e).unknown(t)},e=arguments.length?Array.from(e,Ro):[0,1],Mr(r)}function dx(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],o;return i<a&&(o=r,r=n,n=o,o=a,a=i,i=o),e[r]=t.floor(a),e[n]=t.ceil(i),e}function Ch(e){return Math.log(e)}function $h(e){return Math.exp(e)}function qL(e){return-Math.log(-e)}function zL(e){return-Math.exp(-e)}function FL(e){return isFinite(e)?+("1e"+e):e<0?0:e}function UL(e){return e===10?FL:e===Math.E?Math.exp:t=>Math.pow(e,t)}function VL(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 Eh(e){return(t,r)=>-e(-t,r)}function Ld(e){const t=e(Ch,$h),r=t.domain;let n=10,a,i;function o(){return a=VL(n),i=UL(n),r()[0]<0?(a=Eh(a),i=Eh(i),e(qL,zL)):e(Ch,$h),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const c=r();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let p=a(u),h=a(f),g,m;const v=s==null?10:+s;let w=[];if(!(n%1)&&h-p<v){if(p=Math.floor(p),h=Math.ceil(h),u>0){for(;p<=h;++p)for(g=1;g<n;++g)if(m=p<0?g/i(-p):g*i(p),!(m<u)){if(m>f)break;w.push(m)}}else for(;p<=h;++p)for(g=n-1;g>=1;--g)if(m=p>0?g/i(-p):g*i(p),!(m<u)){if(m>f)break;w.push(m)}w.length*2<v&&(w=Lc(u,f,v))}else w=Lc(p,h,Math.min(h-p,v)).map(i);return d?w.reverse():w},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=ei(c)).precision==null&&(c.trim=!0),c=Rd(c)),s===1/0)return c;const u=Math.max(1,n*s/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*n<n-.5&&(d*=n),d<=u?c(f):""}},t.nice=()=>r(dx(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),t}function fx(){const e=Ld(Zs()).domain([1,10]);return e.copy=()=>qi(e,fx()).base(e.base()),Ot.apply(e,arguments),e}
241function Th(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mh(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Bd(e){var t=1,r=e(Th(t),Mh(t));return r.constant=function(n){return arguments.length?e(Th(t=+n),Mh(t)):t},Mr(r)}function px(){var e=Bd(Zs());return e.copy=function(){return qi(e,px()).constant(e.constant())},Ot.apply(e,arguments)}function kh(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function WL(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function HL(e){return e<0?-e*e:e*e}function qd(e){var t=e(Ye,Ye),r=1;function n(){return r===1?e(Ye,Ye):r===.5?e(WL,HL):e(kh(r),kh(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Mr(t)}function zd(){var e=qd(Zs());return e.copy=function(){return qi(e,zd()).exponent(e.exponent())},Ot.apply(e,arguments),e}function GL(){return zd.apply(null,arguments).exponent(.5)}function Dh(e){return Math.sign(e)*e*e}function KL(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function hx(){var e=Dd(),t=[0,1],r=!1,n;function a(i){var o=KL(e(i));return isNaN(o)?n:r?Math.round(o):o}return a.invert=function(i){return e.invert(Dh(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Ro)).map(Dh)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return hx(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Ot.apply(a,arguments),Mr(a)}function mx(){var e=[],t=[],r=[],n;function a(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=Q3(e,o/s);return i}function i(o){return o==null||isNaN(o=+o)?n:t[Li(r,o)]}return i.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Pr),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return mx().domain(e).range(t).unknown(n)},Ot.apply(i,arguments)}function vx(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[Li(n,c,0,r)]:i}function s(){var c=-1;for(n=new Array(r);++c<r;)n[c]=((c+1)*t-(c-r)*e)/(r+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},o.range=function(c){return arguments.length?(r=(a=Array.from(c)).length-1,s()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return n.slice()},o.copy=function(){return vx().domain([e,t]).range(a).unknown(i)},Ot.apply(Mr(o),arguments)}function gx(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[Li(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return gx().domain(e).range(t).unknown(r)},Ot.apply(a,arguments)}const Fl=new Date,Ul=new Date;function Re(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),s=a.ceil(i);return i-o<s-i?o:s},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,s)=>{const c=[];if(i=a.ceil(i),s=s==null?1:Math.floor(s),!(i<o)||!(s>0))return c;let u;do c.push(u=new Date(+i)),t(i,s),e(i);while(u<i&&i<o);return c},a.filter=i=>Re(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!i(o););else for(;--s>=0;)for(;t(o,1),!i(o););}),r&&(a.count=(i,o)=>(Fl.setTime(+i),Ul.setTime(+o),e(Fl),e(Ul),Math.floor(r(Fl,Ul))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?o=>n(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const qo=Re(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qo.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Re(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):qo);qo.range;const nr=1e3,gt=nr*60,ar=gt*60,ur=ar*24,Fd=ur*7,Ih=ur*30,Vl=ur*365,Vr=Re(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCSeconds());Vr.range;const Ud=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr)}
vendor: 4,964 bytes, line 241
241,(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getMinutes());Ud.range;const Vd=Re(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*gt)},(e,t)=>(t-e)/gt,e=>e.getUTCMinutes());Vd.range;const Wd=Re(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*nr-e.getMinutes()*gt)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getHours());Wd.range;const Hd=Re(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ar)},(e,t)=>(t-e)/ar,e=>e.getUTCHours());Hd.range;const zi=Re(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*gt)/ur,e=>e.getDate()-1);zi.range;const Qs=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ur,e=>e.getUTCDate()-1);Qs.range;const yx=Re(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ur,e=>Math.floor(e/ur));yx.range;function an(e){return Re(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*gt)/Fd)}const el=an(0),zo=an(1),XL=an(2),YL=an(3),In=an(4),JL=an(5),ZL=an(6);el.range;zo.range;XL.range;YL.range;In.range;JL.range;ZL.range;function on(e){return Re(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Fd)}const tl=on(0),Fo=on(1),QL=on(2),e4=on(3),Rn=on(4),t4=on(5),r4=on(6);tl.range;Fo.range;QL.range;e4.range;Rn.range;t4.range;r4.range;const Gd=Re(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());Gd.range;const Kd=Re(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());Kd.range;const dr=Re(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());dr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});dr.range;const fr=Re(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());fr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Re(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});fr.range;function bx(e,t,r,n,a,i){const o=[[Vr,1,nr],[Vr,5,5*nr],[Vr,15,15*nr],[Vr,30,30*nr],[i,1,gt],[i,5,5*gt],[i,15,15*gt],[i,30,30*gt],[a,1,ar],[a,3,3*ar],[a,6,6*ar],[a,12,12*ar],[n,1,ur],[n,2,2*ur],[r,1,Fd],[t,1,Ih],[t,3,3*Ih],[e,1,Vl]];function s(u,f,d){const p=f<u;p&&([u,f]=[f,u]);const h=d&&typeof d.range=="function"?d:c(u,f,d),g=h?h.range(u,+f+1):[];return p?g.reverse():g}function c(u,f,d){const p=Math.abs(f-u)/d,h=$d(([,,v])=>v).right(o,p);if(h===o.length)return e.every(qc(u/Vl,f/Vl,d));if(h===0)return qo.every(Math.max(qc(u,f,d),1));const[g,m]=o[p/o[h-1][2]<o[h][2]/p?h-1:h];return g.every(m)}return[s,c]}const[n4,a4]=bx(fr,Kd,tl,yx,Hd,Vd),[i4,o4]=bx(dr,Gd,el,zi,Wd,Ud);function Wl(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 Hl(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 ja(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function s4(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,u=Sa(a),f=Oa(a),d=Sa(i),p=Oa(i),h=Sa(o),g=Oa(o),m=Sa(s),v=Oa(s),w=Sa(c),S=Oa(c),j={a:R,A:z,b:q,B:K,c:null,d:Fh,e:Fh,f:$4,g:q4,G:F4,H:N4,I:P4,j:C4,L:xx,m:E4,M:T4,p:X,q:L,Q:Wh,s:Hh,S:M4,u:k4,U:D4,V:I4,w:R4,W:L4,x:null,X:null,y:B4,Y:z4,Z:U4,"%":Vh},_={a:V,A:se,b:he,B:ge,c:null,d:Uh,e:Uh,f:G4,g:n5,G:i5,H:V4,I:W4,j:H4,L:jx,m:K4,M:X4,p:lt,q:_e,Q:Wh,s:Hh,S:Y4,u:J4,U:Z4,V:Q4,w:e5,W:t5,x:null,X:null,y:r5,Y:a5,Z:o5,"%":Vh},y={a:E,A:P,b:$,B:T,c:k,d:qh,e:qh,f:S4,g:Bh,G:Lh,H:zh,I:zh,j:b4,L:j4,m:y4,M:x4,p:N,q:g4,Q:_4,s:A4,S:w4,u:f4,U:p4,V:h4,w:d4,W:m4,x:M,X:I,y:Bh,Y:Lh,Z:v4,"%":O4};j.x=b(r,j),j.X=b(n,j),j.c=b(t,j),_.x=b(r,_),_.X=b(n,_),_.c=b(t,_);function b(U,H){return function(ee){var B=[],fe=-1,te=0,ye=U.length,be,ze,_t;for(ee instanceof Date||(ee=new Date(+ee));++fe<ye;)U.charCodeAt(fe)===37&&(B.push(U.slice(te,fe)),(ze=Rh[be=U.charAt(++fe)])!=null?be=U.charAt(++fe):ze=be==="e"?" ":"0",(_t=H[be])&&(be=_t(ee,ze)),B.push(be),te=fe+1);return B.push(U.slice(te,fe)),B.join("")}}function x(U,H){return function(ee){var B=ja(1900,void 0,1),fe=A(B,U,ee+="",0),te,ye;if(fe!=ee.length)return null;if("Q"in B)return new Date(B.Q);if("s"in B)return new Date(B.s*1e3+("L"in B?B.L:0));
vendor: 5,536 bytes, line 241
241if(H&&!("Z"in B)&&(B.Z=0),"p"in B&&(B.H=B.H%12+B.p*12),B.m===void 0&&(B.m="q"in B?B.q:0),"V"in B){if(B.V<1||B.V>53)return null;"w"in B||(B.w=1),"Z"in B?(te=Hl(ja(B.y,0,1)),ye=te.getUTCDay(),te=ye>4||ye===0?Fo.ceil(te):Fo(te),te=Qs.offset(te,(B.V-1)*7),B.y=te.getUTCFullYear(),B.m=te.getUTCMonth(),B.d=te.getUTCDate()+(B.w+6)%7):(te=Wl(ja(B.y,0,1)),ye=te.getDay(),te=ye>4||ye===0?zo.ceil(te):zo(te),te=zi.offset(te,(B.V-1)*7),B.y=te.getFullYear(),B.m=te.getMonth(),B.d=te.getDate()+(B.w+6)%7)}else("W"in B||"U"in B)&&("w"in B||(B.w="u"in B?B.u%7:"W"in B?1:0),ye="Z"in B?Hl(ja(B.y,0,1)).getUTCDay():Wl(ja(B.y,0,1)).getDay(),B.m=0,B.d="W"in B?(B.w+6)%7+B.W*7-(ye+5)%7:B.w+B.U*7-(ye+6)%7);return"Z"in B?(B.H+=B.Z/100|0,B.M+=B.Z%100,Hl(B)):Wl(B)}}function A(U,H,ee,B){for(var fe=0,te=H.length,ye=ee.length,be,ze;fe<te;){if(B>=ye)return-1;if(be=H.charCodeAt(fe++),be===37){if(be=H.charAt(fe++),ze=y[be in Rh?H.charAt(fe++):be],!ze||(B=ze(U,ee,B))<0)return-1}else if(be!=ee.charCodeAt(B++))return-1}return B}function N(U,H,ee){var B=u.exec(H.slice(ee));return B?(U.p=f.get(B[0].toLowerCase()),ee+B[0].length):-1}function E(U,H,ee){var B=h.exec(H.slice(ee));return B?(U.w=g.get(B[0].toLowerCase()),ee+B[0].length):-1}function P(U,H,ee){var B=d.exec(H.slice(ee));return B?(U.w=p.get(B[0].toLowerCase()),ee+B[0].length):-1}function $(U,H,ee){var B=w.exec(H.slice(ee));return B?(U.m=S.get(B[0].toLowerCase()),ee+B[0].length):-1}function T(U,H,ee){var B=m.exec(H.slice(ee));return B?(U.m=v.get(B[0].toLowerCase()),ee+B[0].length):-1}function k(U,H,ee){return A(U,t,H,ee)}function M(U,H,ee){return A(U,r,H,ee)}function I(U,H,ee){return A(U,n,H,ee)}function R(U){return o[U.getDay()]}function z(U){return i[U.getDay()]}function q(U){return c[U.getMonth()]}function K(U){return s[U.getMonth()]}function X(U){return a[+(U.getHours()>=12)]}function L(U){return 1+~~(U.getMonth()/3)}function V(U){return o[U.getUTCDay()]}function se(U){return i[U.getUTCDay()]}function he(U){return c[U.getUTCMonth()]}function ge(U){return s[U.getUTCMonth()]}function lt(U){return a[+(U.getUTCHours()>=12)]}function _e(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var H=b(U+="",j);return H.toString=function(){return U},H},parse:function(U){var H=x(U+="",!1);return H.toString=function(){return U},H},utcFormat:function(U){var H=b(U+="",_);return H.toString=function(){return U},H},utcParse:function(U){var H=x(U+="",!0);return H.toString=function(){return U},H}}}var Rh={"-":"",_:" ",0:"0"},qe=/^\s*\d+/,l4=/^%/,c4=/[\\^$*+?|[\]().{}]/g;function ue(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function u4(e){return e.replace(c4,"\\$&")}function Sa(e){return new RegExp("^(?:"+e.map(u4).join("|")+")","i")}function Oa(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function d4(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function f4(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function p4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function h4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function m4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Lh(e,t,r){var n=qe.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Bh(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function v4(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function g4(e,t,r){var n=qe.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function y4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qh(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function b4(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function zh(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function x4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function w4(e,t,r){var n=qe.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function j4(e,t,r){var n=qe.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function S4(e,t,r){var n=qe.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function O4(e,t,r){var n=l4.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _4(e,t,r){var n=qe.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function A4(e,t,r){var n=qe.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Fh(e,t){return ue(e.getDate(),t,2)}function N4(e,t){return ue(e.getHours(),t,2)}function P4(e,t){return ue(e.getHours()%12||12,t,2)}function C4(e,t){return ue(1+zi.count(dr(e),e),t,3)}function xx(e,t){return ue(e.getMilliseconds(),t,3)}function $4(e,t){return xx(e,t)+"000"}function E4(e,t){return ue(e.getMonth()+1,t,2)}function T4(e,t){return ue(e.getMinutes(),t,2)}function M4(e,t){return ue(e.getSeconds(),t,2)}function k4(e){var t=e.getDay();return t===0?7:t}function D4(e,t){return ue(el.count(dr(e)-1,e),t,2)}function wx(e){var t=e.getDay();return t>=4||t===0?In(e):In.ceil(e)}function I4(e,t){return e=wx(e),ue(In.count(dr(e),e)+(dr(e).getDay()===4),t,2)}function R4(e){return e.getDay()}function L4(e,t){return ue(zo.count(dr(e)-1,e),t,2)}function B4(e,t){return ue(e.getFullYear()%100,t,2)}function q4(e,t){return e=wx(e),ue(e.getFullYear()%100,t,2)}function z4(e,t){return ue(e.getFullYear()%1e4,t,4)}
vendor: 2,156 bytes, line 241
241function F4(e,t){var r=e.getDay();return e=r>=4||r===0?In(e):In.ceil(e),ue(e.getFullYear()%1e4,t,4)}function U4(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ue(t/60|0,"0",2)+ue(t%60,"0",2)}function Uh(e,t){return ue(e.getUTCDate(),t,2)}function V4(e,t){return ue(e.getUTCHours(),t,2)}function W4(e,t){return ue(e.getUTCHours()%12||12,t,2)}function H4(e,t){return ue(1+Qs.count(fr(e),e),t,3)}function jx(e,t){return ue(e.getUTCMilliseconds(),t,3)}function G4(e,t){return jx(e,t)+"000"}function K4(e,t){return ue(e.getUTCMonth()+1,t,2)}function X4(e,t){return ue(e.getUTCMinutes(),t,2)}function Y4(e,t){return ue(e.getUTCSeconds(),t,2)}function J4(e){var t=e.getUTCDay();return t===0?7:t}function Z4(e,t){return ue(tl.count(fr(e)-1,e),t,2)}function Sx(e){var t=e.getUTCDay();return t>=4||t===0?Rn(e):Rn.ceil(e)}function Q4(e,t){return e=Sx(e),ue(Rn.count(fr(e),e)+(fr(e).getUTCDay()===4),t,2)}function e5(e){return e.getUTCDay()}function t5(e,t){return ue(Fo.count(fr(e)-1,e),t,2)}function r5(e,t){return ue(e.getUTCFullYear()%100,t,2)}function n5(e,t){return e=Sx(e),ue(e.getUTCFullYear()%100,t,2)}function a5(e,t){return ue(e.getUTCFullYear()%1e4,t,4)}function i5(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Rn(e):Rn.ceil(e),ue(e.getUTCFullYear()%1e4,t,4)}function o5(){return"+0000"}function Vh(){return"%"}function Wh(e){return+e}function Hh(e){return Math.floor(+e/1e3)}var pn,Ox,_x;s5({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 s5(e){return pn=s4(e),Ox=pn.format,pn.parse,_x=pn.utcFormat,pn.utcParse,pn}function l5(e){return new Date(e)}function c5(e){return e instanceof Date?+e:+new Date(+e)}function Xd(e,t,r,n,a,i,o,s,c,u){var f=Dd(),d=f.invert,p=f.domain,h=u(".%L"),g=u(":%S"),m=u("%I:%M"),v=u("%I %p"),w=u("%a %d"),S=u("%b %d"),j=u("%B"),_=u("%Y");
241function y(b){return(c(b)<b?h:s(b)<b?g:o(b)<b?m:i(b)<b?v:n(b)<b?a(b)<b?w:S:r(b)<b?j:_)(b)}return f.invert=function(b){return new Date(d(b))},f.domain=function(b){return arguments.length?p(Array.from(b,c5)):p().map(l5)},f.ticks=function(b){var x=p();return e(x[0],x[x.length-1],b??10)},f.tickFormat=function(b,x){return x==null?y:u(x)},f.nice=function(b){var x=p();return(!b||typeof b.range!="function")&&(b=t(x[0],x[x.length-1],b??10)),b?p(dx(x,b)):f},f.copy=function(){return qi(f,Xd(e,t,r,n,a,i,o,s,c,u))},f}function u5(){return Ot.apply(Xd(i4,o4,dr,Gd,el,zi,Wd,Ud,Vr,Ox).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function d5(){return Ot.apply(Xd(n4,a4,fr,Kd,tl,Qs,Hd,Vd,Vr,_x).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function rl(){var e=0,t=1,r,n,a,i,o=Ye,s=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(a===0?.5:(d=(i(d)-r)*a,s?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(d){return arguments.length?(s=!!d,u):s},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(p){var h,g;return arguments.length?([h,g]=p,o=d(h,g),u):[o(0),o(1)]}}return u.range=f(ua),u.rangeRound=f(kd),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,r=d(e),n=d(t),a=r===n?0:1/(n-r),u}}function kr(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ax(){var e=Mr(rl()(Ye));return e.copy=function(){return kr(e,Ax())},gr.apply(e,arguments)}function Nx(){var e=Ld(rl()).domain([1,10]);return e.copy=function(){return kr(e,Nx()).base(e.base())},gr.apply(e,arguments)}function Px(){var e=Bd(rl());return e.copy=function(){return kr(e,Px()).constant(e.constant())},gr.apply(e,arguments)}function Yd(){var e=qd(rl());return e.copy=function(){return kr(e,Yd()).exponent(e.exponent())},gr.apply(e,arguments)}function f5(){return Yd.apply(null,arguments).exponent(.5)}function Cx(){var e=[],t=Ye;function r(n){if(n!=null&&!isNaN(n=+n))return t((Li(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Pr),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>Z3(e,i/n))},r.copy=function(){return Cx(t).domain(e)},gr.apply(r,arguments)}function nl(){var e=0,t=.5,r=1,n=1,a,i,o,s,c,u=Ye,f,d=!1,p;function h(m){return isNaN(m=+m)?p:(m=.5+((m=+f(m))-i)*(n*m<n*i?s:c),u(d?Math.max(0,Math.min(1,m)):m))}h.domain=function(m){return arguments.length?([e,t,r]=m,a=f(e=+e),i=f(t=+t),o=f(r=+r),s=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),n=i<a?-1:1,h):[e,t,r]},h.clamp=function(m){return arguments.length?(d=!!m,h):d},h.interpolator=function(m){return arguments.length?(u=m,h):u};function g(m){return function(v){var w,S,j;return arguments.length?([w,S,j]=v,u=OL(m,[w,S,j]),h):[u(0),u(.5),u(1)]}}return h.range=g(ua),h.rangeRound=g(kd),h.unknown=function(m){return arguments.length?(p=m,h):p},function(m){return f=m,a=m(e),i=m(t),o=m(r),s=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),n=i<a?-1:1,h}}function $x(){var e=Mr(nl()(Ye));return e.copy=function(){return kr(e,$x())},gr.apply(e,arguments)}function Ex(){var e=Ld(nl()).domain([.1,1,10]);return e.copy=function(){return kr(e,Ex()).base(e.base())},gr.apply(e,arguments)}function Tx(){var e=Bd(nl());return e.copy=function(){return kr(e,Tx()).constant(e.constant())},gr.apply(e,arguments)}function Jd(){var e=qd(nl());return e.copy=function(){return kr(e,Jd()).exponent(e.exponent())},gr.apply(e,arguments)}function p5(){return Jd.apply(null,arguments).exponent(.5)}const Gh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ya,scaleDiverging:$x,scaleDivergingLog:Ex,scaleDivergingPow:Jd,scaleDivergingSqrt:p5,scaleDivergingSymlog:Tx,scaleIdentity:ux,scaleImplicit:zc,scaleLinear:Bo,scaleLog:fx,scaleOrdinal:Ed,scalePoint:Ia,scalePow:zd,scaleQuantile:mx,scaleQuantize:vx,scaleRadial:hx,scaleSequential:Ax,scaleSequentialLog:Nx,scaleSequentialPow:Yd,scaleSequentialQuantile:Cx,scaleSequentialSqrt:f5,scaleSequentialSymlog:Px,scaleSqrt:GL,scaleSymlog:px,scaleThreshold:gx,scaleTime:u5,scaleUtc:d5,tickFormat:cx},Symbol.toStringTag,{value:"Module"}));var h5=ta;function m5(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],o=t(i);if(o!=null&&(s===void 0?o===o&&!h5(o):r(o,s)))var s=o,c=i}return c}var Mx=m5;function v5(e,t){return e>t}
241var g5=v5,y5=Mx,b5=g5,x5=ca;function w5(e){return e&&e.length?y5(e,x5,b5):void 0}var j5=w5;const Ar=we(j5);function S5(e,t){return e<t}var O5=S5,_5=Mx,A5=O5,N5=ca;function P5(e){return e&&e.length?_5(e,N5,A5):void 0}var C5=P5;const al=we(C5);var $5=dd,E5=Tr,T5=zb,M5=Qe;function k5(e,t){var r=M5(e)?$5:T5;return r(e,E5(t))}var D5=k5,I5=Bb,R5=D5;function L5(e,t){return I5(R5(e,t),1)}var B5=L5;const q5=we(B5);var z5=Ad;function F5(e,t){return z5(e,t)}var U5=F5;const ti=we(U5);var da=1e9,V5={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Qd,Oe=!0,jt="[DecimalError] ",Kr=jt+"Invalid argument: ",Zd=jt+"Exponent out of range: ",fa=Math.floor,qr=Math.pow,W5=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ot,Le=1e7,Se=7,kx=9007199254740991,Uo=fa(kx/Se),G={};G.absoluteValue=G.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};G.comparedTo=G.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};G.decimalPlaces=G.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Se;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};G.dividedBy=G.div=function(e){return cr(this,new this.constructor(e))};
vendor: 58,997 bytes, lines 241-267
241G.dividedToIntegerBy=G.idiv=function(e){var t=this,r=t.constructor;return ve(cr(t,new r(e),0,1),r.precision)};G.equals=G.eq=function(e){return!this.cmp(e)};G.exponent=function(){return Ee(this)};G.greaterThan=G.gt=function(e){return this.cmp(e)>0};G.greaterThanOrEqualTo=G.gte=function(e){return this.cmp(e)>=0};G.isInteger=G.isint=function(){return this.e>this.d.length-2};G.isNegative=G.isneg=function(){return this.s<0};G.isPositive=G.ispos=function(){return this.s>0};G.isZero=function(){return this.s===0};G.lessThan=G.lt=function(e){return this.cmp(e)<0};G.lessThanOrEqualTo=G.lte=function(e){return this.cmp(e)<1};G.logarithm=G.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(ot))throw Error(jt+"NaN");if(r.s<1)throw Error(jt+(r.s?"NaN":"-Infinity"));return r.eq(ot)?new n(0):(Oe=!1,t=cr(ri(r,i),ri(e,i),i),Oe=!0,ve(t,a))};G.minus=G.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Rx(t,e):Dx(t,(e.s=-e.s,e))};G.modulo=G.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(jt+"NaN");return r.s?(Oe=!1,t=cr(r,e,0,1).times(e),Oe=!0,r.minus(t)):ve(new n(r),a)};G.naturalExponential=G.exp=function(){return Ix(this)};G.naturalLogarithm=G.ln=function(){return ri(this)};G.negated=G.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};G.plus=G.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Dx(t,e):Rx(t,(e.s=-e.s,e))};G.precision=G.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Kr+e);if(t=Ee(a)+1,n=a.d.length-1,r=n*Se+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};G.squareRoot=G.sqrt=function(){var e,t,r,n,a,i,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(jt+"NaN")}for(e=Ee(s),Oe=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=Gt(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=fa((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new c(t)):n=new c(a.toString()),r=c.precision,a=o=r+3;;)if(i=n,n=i.plus(cr(s,i,o+2)).times(.5),Gt(i.d).slice(0,o)===(t=Gt(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(ve(i,r+1,0),i.times(i).eq(s)){n=i;break}}else if(t!="9999")break;o+=4}return Oe=!0,ve(n,r)};G.times=G.mul=function(e){var t,r,n,a,i,o,s,c,u,f=this,d=f.constructor,p=f.d,h=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,r=f.e+e.e,c=p.length,u=h.length,c<u&&(i=p,p=h,h=i,o=c,c=u,u=o),i=[],o=c+u,n=o;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=c+n;a>n;)s=i[a]+h[n]*p[a-n-1]+t,i[a--]=s%Le|0,t=s/Le|0;i[a]=(i[a]+t)%Le|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Oe?ve(e,d.precision):e};G.toDecimalPlaces=G.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jt(e,0,da),t===void 0?t=n.rounding:Jt(t,0,8),ve(r,e+Ee(r)+1,t))};G.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Zr(n,!0):(Jt(e,0,da),t===void 0?t=a.rounding:Jt(t,0,8),n=ve(new a(n),e+1,t),r=Zr(n,!0,e+1)),r};G.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Zr(a):(Jt(e,0,da),t===void 0?t=i.rounding:Jt(t,0,8),n=ve(new i(a),e+Ee(a)+1,t),r=Zr(n.abs(),!1,e+Ee(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};G.toInteger=G.toint=function(){var e=this,t=e.constructor;return ve(new t(e),Ee(e)+1,t.rounding)};G.toNumber=function(){return+this};G.toPower=G.pow=function(e){var t,r,n,a,i,o,s=this,c=s.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(ot);if(s=new c(s),!s.s){if(e.s<1)throw Error(jt+"Infinity");return s}if(s.eq(ot))return s;if(n=c.precision,e.eq(ot))return ve(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,i=s.s,o){if((r=f<0?-f:f)<=kx){for(a=new c(ot),t=Math.ceil(n/Se+4),Oe=!1;r%2&&(a=a.times(s),Xh(a.d,t)),r=fa(r/2),r!==0;)s=s.times(s),Xh(s.d,t);return Oe=!0,e.s<0?new c(ot).div(a):ve(a,n)}}else if(i<0)throw Error(jt+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Oe=!1,a=e.times(ri(s,n+u)),Oe=!0,a=Ix(a),a.s=i,a};G.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Ee(a),n=Zr(a,r<=i.toExpNeg||r>=i.toExpPos)):(Jt(e,1,da),t===void 0?t=i.rounding:Jt(t,0,8),a=ve(new i(a),e,t),r=Ee(a),n=Zr(a,e<=r||r<=i.toExpNeg,e)),n};G.toSignificantDigits=G.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jt(e,1,da),t===void 0?t=n.rounding:Jt(t,0,8)),ve(new n(r),e,t)};G.toString=G.valueOf=G.val=G.toJSON=G[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ee(e),r=e.constructor;return Zr(e,t<=r.toExpNeg||t>=r.toExpPos)};function Dx(e,t){var r,n,a,i,o,s,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Oe?ve(t,d):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(n=c,i=-i,s=u.length):(n=u,a=o,s=c.length),o=Math.ceil(d/Se),s=o>s?o+1:s+1,i>s&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(s=c.length,i=u.length,s-i<0&&(i=s,n=u,u=c,c=n),r=0;i;)r=(c[--i]=c[i]+u[i]+r)/Le|0,c[i]%=Le;for(r&&(c.unshift(r),++a),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=a,Oe?ve(t,d):t}function Jt(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Kr+e)}function Gt(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Se-n.length,r&&(i+=Or(r)),i+=n;o=e[t],n=o+"",r=Se-n.length,r&&(i+=Or(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var cr=function(){function e(n,a){var i,o=0,s=n.length;for(n=n.slice();s--;)i=n[s]*a+o,n[s]=i%Le|0,o=i/Le|0;return o&&n.unshift(o),n}function t(n,a,i,o){var s,c;if(i!=o)c=i>o?1:-1;else for(s=c=0;s<i;s++)if(n[s]!=a[s]){c=n[s]>a[s]?1:-1;break}return c}function r(n,a,i){for(var o=0;i--;)n[i]-=o,o=n[i]<a[i]?1:0,n[i]=o*Le+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o){var s,c,u,f,d,p,h,g,m,v,w,S,j,_,y,b,x,A,N=n.constructor,E=n.s==a.s?1:-1,P=n.d,$=a.d;if(!n.s)return new N(n);if(!a.s)throw Error(jt+"Division by zero");for(c=n.e-a.e,x=$.length,y=P.length,h=new N(E),g=h.d=[],u=0;$[u]==(P[u]||0);)++u;if($[u]>(P[u]||0)&&--c,i==null?S=i=N.precision:o?S=i+(Ee(n)-Ee(a))+1:S=i,S<0)return new N(0);if(S=S/Se+2|0,u=0,x==1)for(f=0,$=$[0],S++;(u<y||f)&&S--;u++)j=f*Le+(P[u]||0),g[u]=j/$|0,f=j%$|0;else{for(f=Le/($[0]+1)|0,f>1&&($=e($,f),P=e(P,f),x=$.length,y=P.length),_=x,m=P.slice(0,x),v=m.length;v<x;)m[v++]=0;A=$.slice(),A.unshift(0),b=$[0],$[1]>=Le/2&&++b;do f=0,s=t($,m,x,v),s<0?(w=m[0],x!=v&&(w=w*Le+(m[1]||0)),f=w/b|0,f>1?(f>=Le&&(f=Le-1),d=e($,f),p=d.length,v=m.length,s=t(d,m,p,v),s==1&&(f--,r(d,x<p?A:$,p))):(f==0&&(s=f=1),d=$.slice()),p=d.length,p<v&&d.unshift(0),r(m,d,v),s==-1&&(v=m.length,s=t($,m,x,v),s<1&&(f++,r(m,x<v?A:$,v))),v=m.length):s===0&&(f++,m=[0]),g[u++]=f,s&&m[0]?m[v++]=P[_]||0:(m=[P[_]],v=1);while((_++<y||m[0]!==void 0)&&S--)}return g[0]||g.shift(),h.e=c,ve(h,o?i+Ee(h)+1:i)}}();function Ix(e,t){var r,n,a,i,o,s,c=0,u=0,f=e.constructor,d=f.precision;if(Ee(e)>16)throw Error(Zd+Ee(e));if(!e.s)return new f(ot);for(t==null?(Oe=!1,s=d):s=t,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(n=Math.log(qr(2,u))/Math.LN10*2+5|0,s+=n,r=a=i=new f(ot),f.precision=s;;){if(a=ve(a.times(e),s),r=r.times(++c),o=i.plus(cr(a,r,s)),Gt(o.d).slice(0,s)===Gt(i.d).slice(0,s)){for(;u--;)i=ve(i.times(i),s);return f.precision=d,t==null?(Oe=!0,ve(i,d)):i}i=o}}function Ee(e){for(var t=e.e*Se,r=e.d[0];r>=10;r/=10)t++;return t}function Gl(e,t,r){if(t>e.LN10.sd())throw Oe=!0,r&&(e.precision=r),Error(jt+"LN10 precision limit exceeded");return ve(new e(e.LN10),t)}function Or(e){for(var t="";e--;)t+="0";return t}function ri(e,t){var r,n,a,i,o,s,c,u,f,d=1,p=10,h=e,g=h.d,m=h.constructor,v=m.precision;if(h.s<1)throw Error(jt+(h.s?"NaN":"-Infinity"));if(h.eq(ot))return new m(0);if(t==null?(Oe=!1,u=v):u=t,h.eq(10))return t==null&&(Oe=!0),Gl(m,u);if(u+=p,m.precision=u,r=Gt(g),n=r.charAt(0),i=Ee(h),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Gt(h.d),n=r.charAt(0),d++;i=Ee(h),n>1?(h=new m("0."+r),i++):h=new m(n+"."+r.slice(1))}else return c=Gl(m,u+2,v).times(i+""),h=ri(new m(n+"."+r.slice(1)),u-p).plus(c),m.precision=v,t==null?(Oe=!0,ve(h,v)):h;for(s=o=h=cr(h.minus(ot),h.plus(ot),u),f=ve(h.times(h),u),a=3;;){if(o=ve(o.times(f),u),c=s.plus(cr(o,new m(a),u)),Gt(c.d).slice(0,u)===Gt(s.d).slice(0,u))return s=s.times(2),i!==0&&(s=s.plus(Gl(m,u+2,v).times(i+""))),s=cr(s,new m(d),u),m.precision=v,t==null?(Oe=!0,ve(s,v)):s;s=c,a+=2}}function Kh(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=fa(r/Se),e.d=[],n=(r+1)%Se,r<0&&(n+=Se),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Se;n<a;)e.d.push(+t.slice(n,n+=Se));t=t.slice(n),n=Se-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Oe&&(e.e>Uo||e.e<-Uo))throw Error(Zd+r)}else e.s=0,e.e=0,e.d=[0];return e}function ve(e,t,r){var n,a,i,o,s,c,u,f,d=e.d;for(o=1,i=d[0];i>=10;i/=10)o++;if(n=t-o,n<0)n+=Se,a=t,u=d[f=0];else{if(f=Math.ceil((n+1)/Se),i=d.length,f>=i)return e;for(u=i=d[f],o=1;i>=10;i/=10)o++;n%=Se,a=n-Se+o}if(r!==void 0&&(i=qr(10,o-a-1),s=u/i%10|0,c=t<0||d[f+1]!==void 0||u%i,c=r<4?(s||c)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||c||r==6&&(n>0?a>0?u/qr(10,o-a):0:d[f-1])%10&1||r==(e.s<0?8:7))),t<1||!d[0])return c?(i=Ee(e),d.length=1,t=t-i-1,d[0]=qr(10,(Se-t%Se)%Se),e.e=fa(-t/Se)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(n==0?(d.length=f,i=1,f--):(d.length=f+1,i=qr(10,Se-n),d[f]=a>0?(u/qr(10,o-a)%qr(10,a)|0)*i:0),c)for(;;)if(f==0){(d[0]+=i)==Le&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Le)break;d[f--]=0,i=1}for(n=d.length;d[--n]===0;)d.pop();if(Oe&&(e.e>Uo||e.e<-Uo))throw Error(Zd+Ee(e));return e}function Rx(e,t){var r,n,a,i,o,s,c,u,f,d,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Oe?ve(t,h):t;if(c=e.d,d=t.d,n=t.e,u=e.e,c=c.slice(),o=u-n,o){for(f=o<0,f?(r=c,o=-o,s=d.length):(r=d,n=u,s=c.length),a=Math.max(Math.ceil(h/Se),s)+2,o>a&&(o=a,r.length=1),r.reverse(),a=o;a--;)r.push(0);r.reverse()}else{for(a=c.length,s=d.length,f=a<s,f&&(s=a),a=0;a<s;a++)if(c[a]!=d[a]){f=c[a]<d[a];break}o=0}for(f&&(r=c,c=d,d=r,t.s=-t.s),s=c.length,a=d.length-s;a>0;--a)c[s++]=0;for(a=d.length;a>o;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=Le-1;--c[i],c[a]+=Le}c[a]-=d[a]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(t.d=c,t.e=n,Oe?ve(t,h):t):new p(0)}function Zr(e,t,r){var n,a=Ee(e),i=Gt(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Or(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Or(-a-1)+i,r&&(n=r-o)>0&&(i+=Or(n))):a>=o?(i+=Or(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Or(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Or(n))),e.s<0?"-"+i:i}function Xh(e,t){if(e.length>t)return e.length=t,!0}function Lx(e){var t,r,n;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Kr+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Kh(o,i.toString())}else if(typeof i!="string")throw Error(Kr+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,W5.test(i))Kh(o,i);else throw Error(Kr+i)}if(a.prototype=G,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Lx,a.config=a.set=H5,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function H5(e){if(!e||typeof e!="object")throw Error(jt+"Object expected");var t,r,n,a=["precision",1,da,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(fa(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(Kr+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Kr+r+": "+n);return this}var Qd=Lx(V5);ot=new Qd(1);const me=Qd;function G5(e){return J5(e)||Y5(e)||X5(e)||K5()}function K5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
242In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X5(e,t){if(e){if(typeof e=="string")return Wc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wc(e,t)}}function Y5(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function J5(e){if(Array.isArray(e))return Wc(e)}function Wc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Z5=function(t){return t},Bx={"@@functional/placeholder":!0},qx=function(t){return t===Bx},Yh=function(t){return function r(){return arguments.length===0||arguments.length===1&&qx(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},Q5=function e(t,r){return t===1?r:Yh(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.filter(function(s){return s!==Bx}).length;return o>=t?r.apply(void 0,a):e(t-o,Yh(function(){for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];var f=a.map(function(d){return qx(d)?c.shift():d});return r.apply(void 0,G5(f).concat(c))}))})},il=function(t){return Q5(t.length,t)},Hc=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},eB=il(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),tB=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return Z5;var a=r.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(s,c){return c(s)},i.apply(void 0,arguments))}},Gc=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},zx=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return r&&i.every(function(s,c){return s===r[c]})||(r=i,n=t.apply(void 0,i)),n}};function rB(e){var t;return e===0?t=1:t=Math.floor(new me(e).abs().log(10).toNumber())+1,t}function nB(e,t,r){for(var n=new me(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var aB=il(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),iB=il(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),oB=il(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const ol={rangeStep:nB,getDigitCount:rB,interpolateNumber:aB,uninterpolateNumber:iB,uninterpolateTruncation:oB};function Kc(e){return cB(e)||lB(e)||Fx(e)||sB()}function sB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
243In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lB(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function cB(e){if(Array.isArray(e))return Xc(e)}function ni(e,t){return fB(e)||dB(e,t)||Fx(e,t)||uB()}function uB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
244In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fx(e,t){if(e){if(typeof e=="string")return Xc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xc(e,t)}}function Xc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function dB(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),s;!(n=(s=o.next()).done)&&(r.push(s.value),!(t&&r.length===t));n=!0);}catch(c){a=!0,i=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(a)throw i}}return r}}function fB(e){if(Array.isArray(e))return e}function Ux(e){var t=ni(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function Vx(e,t,r){if(e.lte(0))return new me(0);var n=ol.getDigitCount(e.toNumber()),a=new me(10).pow(n),i=e.div(a),o=n!==1?.05:.1,s=new me(Math.ceil(i.div(o).toNumber())).add(r).mul(o),c=s.mul(a);return t?c:new me(Math.ceil(c))}function pB(e,t,r){var n=1,a=new me(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new me(10).pow(ol.getDigitCount(e)-1),a=new me(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new me(Math.floor(e)))}else e===0?a=new me(Math.floor((t-1)/2)):r||(a=new me(Math.floor(e)));var o=Math.floor((t-1)/2),s=tB(eB(function(c){return a.add(new me(c-o).mul(n)).toNumber()}),Hc);return s(0,t)}function Wx(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new me(0),tickMin:new me(0),tickMax:new me(0)};var i=Vx(new me(t).sub(e).div(r-1),n,a),o;e<=0&&t>=0?o=new me(0):(o=new me(e).add(t).div(2),o=o.sub(new me(o).mod(i)));var s=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new me(t).sub(o).div(i).toNumber()),u=s+c+1;return u>r?Wx(e,t,r,n,a+1):(u<r&&(c=t>0?c+(r-u):c,s=t>0?s:s+(r-u)),{step:i,tickMin:o.sub(new me(s).mul(i)),tickMax:o.add(new me(c).mul(i))})}function hB(e){var t=ni(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),s=Ux([r,n]),c=ni(s,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(Kc(Hc(0,a-1).map(function(){return 1/0}))):[].concat(Kc(Hc(0,a-1).map(function(){return-1/0})),[f]);return r>n?Gc(d):d}if(u===f)return pB(u,a,i);var p=Wx(u,f,o,i),h=p.step,g=p.tickMin,m=p.tickMax,v=ol.rangeStep(g,m.add(new me(.1).mul(h)),h);return r>n?Gc(v):v}function mB(e,t){var r=ni(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Ux([n,a]),s=ni(o,2),c=s[0],u=s[1];if(c===-1/0||u===1/0)return[n,a];if(c===u)return[c];var f=Math.max(t,2),d=Vx(new me(u).sub(c).div(f-1),i,0),p=[].concat(Kc(ol.rangeStep(new me(c),new me(u).sub(new me(.99).mul(d)),d)),[u]);return n>a?Gc(p):p}var vB=zx(hB),gB=zx(mB),yB="Invariant failed";function Qr(e,t){throw new Error(yB)}var bB=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Ln(e){"@babel/helpers - typeof";return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(e)}function Vo(){return Vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo.apply(this,arguments)}function xB(e,t){return OB(e)||SB(e,t)||jB(e,t)||wB()}function wB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
245In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jB(e,t){if(e){if(typeof e=="string")return Jh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jh(e,t)}}function Jh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function SB(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function OB(e){if(Array.isArray(e))return e}function _B(e,t){if(e==null)return{};var r=AB(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function AB(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function NB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kx(n.key),n)}}function CB(e,t,r){return t&&PB(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $B(e,t,r){return t=Wo(t),EB(e,Hx()?Reflect.construct(t,r||[],Wo(e).constructor):t.apply(e,r))}function EB(e,t){if(t&&(Ln(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TB(e)}function TB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hx=function(){return!!e})()}function Wo(e){return Wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Wo(e)}function MB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yc(e,t)}function Yc(e,t){return Yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Yc(e,t)}function Gx(e,t,r){return t=Kx(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kx(e){var t=kB(e,"string");return Ln(t)=="symbol"?t:t+""}function kB(e,t){if(Ln(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ln(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sl=function(e){function t(){return NB(this,t),$B(this,t,arguments)}return MB(t,e),CB(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,o=n.width,s=n.dataKey,c=n.data,u=n.dataPointFormatter,f=n.xAxis,d=n.yAxis,p=_B(n,bB),h=ie(p,!1);this.props.direction==="x"&&f.type!=="number"&&Qr();var g=c.map(function(m){var v=u(m,s),w=v.x,S=v.y,j=v.value,_=v.errorVal;if(!_)return null;var y=[],b,x;if(Array.isArray(_)){var A=xB(_,2);b=A[0],x=A[1]}else b=x=_;if(i==="vertical"){var N=f.scale,E=S+a,P=E+o,$=E-o,T=N(j-b),k=N(j+x);y.push({x1:k,y1:P,x2:k,y2:$}),y.push({x1:T,y1:E,x2:k,y2:E}),y.push({x1:T,y1:P,x2:T,y2:$})}else if(i==="horizontal"){var M=d.scale,I=w+a,R=I-o,z=I+o,q=M(j-b),K=M(j+x);y.push({x1:R,y1:K,x2:z,y2:K}),y.push({x1:I,y1:q,x2:I,y2:K}),y.push({x1:R,y1:q,x2:z,y2:q})}return C.createElement(Ae,Vo({className:"recharts-errorBar",key:"bar-".concat(y.map(function(X){return"".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))},h),y.map(function(X){return C.createElement("line",Vo({},X,{key:"line-".concat(X.x1,"-").concat(X.x2,"-").concat(X.y1,"-").concat(X.y2)}))}))});return C.createElement(Ae,{className:"recharts-errorBars"},g)}}])}(C.Component);Gx(sl,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Gx(sl,"displayName","ErrorBar");function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}function Zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zh(Object(r),!0).forEach(function(n){DB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DB(e,t,r){return t=IB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IB(e){var t=RB(e,"string");return ai(t)=="symbol"?t:t+""}function RB(e,t){if(ai(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ai(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Xx=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=it(r,An);if(!o)return null;var s=An.defaultProps,c=s!==void 0?Rr(Rr({},s),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(n||[]).reduce(function(f,d){var p=d.item,h=d.props,g=h.sectors||h.data||[];return f.concat(g.map(function(m){return{type:o.props.iconType||p.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(n||[]).map(function(f){var d=f.item,p=d.type.defaultProps,h=p!==void 0?Rr(Rr({},p),d.props):{},g=h.dataKey,m=h.name,v=h.legendType,w=h.hide;return{inactive:w,dataKey:g,type:c.iconType||v||"square",color:ef(d),value:m||g,payload:h}}),Rr(Rr(Rr({},c),An.getWithHeight(o,a)),{},{payload:u,item:o})};function ii(e){"@babel/helpers - typeof";return ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ii(e)}function Qh(e){return zB(e)||qB(e)||BB(e)||LB()}function LB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
246In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BB(e,t){if(e){if(typeof e=="string")return Jc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jc(e,t)}}function qB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zB(e){if(Array.isArray(e))return Jc(e)}function Jc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function em(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?em(Object(r),!0).forEach(function(n){Pn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):em(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pn(e,t,r){return t=FB(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FB(e){var t=UB(e,"string");return ii(t)=="symbol"?t:t+""}function UB(e,t){if(ii(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ii(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function st(e,t,r){return oe(e)||oe(t)?r:Ie(t)?yt(e,t,r):re(t)?t(e):r}function Ra(e,t,r,n){var a=q5(e,function(s){return st(s,t)});if(r==="number"){var i=a.filter(function(s){return F(s)||parseFloat(s)});return i.length?[al(i),Ar(i)]:[1/0,-1/0]}var o=n?a.filter(function(s){return!oe(s)}):a;return o.map(function(s){return Ie(s)||s instanceof Date?s:""})}var VB=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,s=(r=n?.length)!==null&&r!==void 0?r:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<s;u++){var f=u>0?a[u-1].coordinate:a[s-1].coordinate,d=a[u].coordinate,p=u>=s-1?a[0].coordinate:a[u+1].coordinate,h=void 0;if(Ct(d-f)!==Ct(p-d)){var g=[];if(Ct(p-d)===Ct(c[1]-c[0])){h=p;var m=d+c[1]-c[0];g[0]=Math.min(m,(m+f)/2),g[1]=Math.max(m,(m+f)/2)}else{h=f;var v=p+c[1]-c[0];g[0]=Math.min(d,(v+d)/2),g[1]=Math.max(d,(v+d)/2)}var w=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>w[0]&&t<=w[1]||t>=g[0]&&t<=g[1]){o=a[u].index;break}}else{var S=Math.min(f,p),j=Math.max(f,p);if(t>(S+d)/2&&t<=(j+d)/2){o=a[u].index;break}}}else for(var _=0;_<s;_++)if(_===0&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_>0&&_<s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2&&t<=(n[_].coordinate+n[_+1].coordinate)/2||_===s-1&&t>(n[_].coordinate+n[_-1].coordinate)/2){o=n[_].index;break}return o},ef=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Pe(Pe({},t.type.defaultProps),t.props):t.props,o=i.stroke,s=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},WB=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},s=Object.keys(i),c=0,u=s.length;c<u;c++)for(var f=i[s[c]].stackGroups,d=Object.keys(f),p=0,h=d.length;p<h;p++){var g=f[d[p]],m=g.items,v=g.cateAxisId,w=m.filter(function(x){return or(x.type).indexOf("Bar")>=0});if(w&&w.length){var S=w[0].type.defaultProps,j=S!==void 0?Pe(Pe({},S),w[0].props):w[0].props,_=j.barSize,y=j[v];o[y]||(o[y]=[]);var b=oe(_)?r:_;o[y].push({item:w[0],stackList:w.slice(1),barSize:oe(b)?void 0:Jr(b,n,0)})}}return o},HB=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,s=t.maxBarSize,c=o.length;if(c<1)return null;var u=Jr(r,a,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,h=a/c,g=o.reduce(function(_,y){return _+y.barSize||0},0);g+=(c-1)*u,g>=a&&(g-=(c-1)*u,u=0),g>=a&&h>0&&(p=!0,h*=.9,g=c*h);var m=(a-g)/2>>0,v={offset:m-u,size:0};f=o.reduce(function(_,y){var b={item:y.item,position:{offset:v.offset+v.size+u,size:p?h:y.barSize}},x=[].concat(Qh(_),[b]);return v=x[x.length-1].position,y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){x.push({item:A,position:v})}),x},d)}else{var w=Jr(n,a,0,!0);a-2*w-(c-1)*u<=0&&(u=0);var S=(a-2*w-(c-1)*u)/c;S>1&&(S>>=0);var j=s===+s?Math.min(S,s):S;f=o.reduce(function(_,y,b){var x=[].concat(Qh(_),[{item:y.item,position:{offset:w+(S+u)*b+(S-j)/2,size:j}}]);return y.stackList&&y.stackList.length&&y.stackList.forEach(function(A){x.push({item:A,position:x[x.length-1].position})}),x},d)}return f},GB=function(t,r,n,a){var i=n.children,o=n.width,s=n.margin,c=o-(s.left||0)-(s.right||0),u=Xx({children:i,legendWidth:c});if(u){var f=a||{},d=f.width,p=f.height,h=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&h!=="center"&&F(t[h]))return Pe(Pe({},t),{},Pn({},h,t[h]+(d||0)));if((m==="horizontal"||m==="vertical"&&h==="center")&&g!=="middle"&&F(t[g]))return Pe(Pe({},t),{},Pn({},g,t[g]+(p||0)))}return t},KB=function(t,r,n){return oe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},Yx=function(t,r,n,a,i){var o=r.props.children,s=Et(o,sl).filter(function(u){return KB(a,i,u.props.direction)});if(s&&s.length){var c=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=st(f,n);if(oe(d))return u;var p=Array.isArray(d)?[al(d),Ar(d)]:[d,d],h=c.reduce(function(g,m){var v=st(f,m,0),w=p[0]-Math.abs(Array.isArray(v)?v[0]:v),S=p[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,g[0]),Math.max(S,g[1])]},[1/0,-1/0]);return[Math.min(h[0],u[0]),Math.max(h[1],u[1])]},[1/0,-1/0])}return null},XB=function(t,r,n,a,i){var o=r.map(function(s){return Yx(t,s,n,i,a)}).filter(function(s){return!oe(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},Jx=function(t,r,n,a,i){var o=r.map(function(c){var u=c.props.dataKey;return n==="number"&&u&&Yx(t,c,u,a)||Ra(t,u,n,i)});if(n==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)s[u[f]]||(s[u[f]]=!0,c.push(u[f]));return c},[])},Zx=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},Qx=function(t,r,n,a){if(a)return t.map(function(c){return c.coordinate});var i,o,s=t.map(function(c){return c.coordinate===r&&(i=!0),c.coordinate===n&&(o=!0),c.coordinate});return i||s.push(r),o||s.push(n),s},ir=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,s=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&s?.length>=2?Ct(s[0]-s[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=i?i.indexOf(d):d;return{coordinate:a(p)+u,value:d,offset:u}});return f.filter(function(d){return!oa(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:a(d)+u,value:d,index:p,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,p){return{coordinate:a(d)+u,value:i?i[d]:d,index:p,offset:u}})},Kl=new WeakMap,to=function(t,r){if(typeof r!="function")return t;Kl.has(t)||Kl.set(t,new WeakMap);var n=Kl.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},YB=function(t,r,n){var a=t.scale,i=t.type,o=t.layout,s=t.axisType;if(a==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Ya(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Bo(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:Ia(),realScaleType:"point"}:i==="category"?{scale:Ya(),realScaleType:"band"}:{scale:Bo(),realScaleType:"linear"};if(Yr(a)){var c="scale".concat(Ws(a));return{scale:(Gh[c]||Ia)(),realScaleType:Gh[c]?c:"point"}}return re(a)?{scale:a}:{scale:Ia(),realScaleType:"point"}},tm=1e-4,JB=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-tm,o=Math.max(a[0],a[1])+tm,s=t(r[0]),c=t(r[n-1]);(s<i||s>o||c<i||c>o)&&t.domain([r[0],r[n-1]])}},ZB=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},QB=function(t,r){if(!r||r.length!==2||!F(r[0])||!F(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!F(t[0])||t[0]<n)&&(i[0]=n),(!F(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},eq=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0,s=0;s<r;++s){var c=oa(t[s][n][1])?t[s][n][0]:t[s][n][1];c>=0?(t[s][n][0]=i,t[s][n][1]=i+c,i=t[s][n][1]):(t[s][n][0]=o,t[s][n][1]=o+c,o=t[s][n][1])}},tq=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,o=0;o<r;++o){var s=oa(t[o][n][1])?t[o][n][0]:t[o][n][1];s>=0?(t[o][n][0]=i,t[o][n][1]=i+s,i=t[o][n][1]):(t[o][n][0]=0,t[o][n][1]=0)}},rq={sign:eq,expand:vC,none:$n,silhouette:gC,wiggle:yC,positive:tq},nq=function(t,r,n){var a=r.map(function(s){return s.props.dataKey}),i=rq[n],o=mC().keys(a).value(function(s,c){return+st(s,c,0)}).order(jc).offset(i);return o(t)},aq=function(t,r,n,a,i,o){if(!t)return null;var s=o?r.reverse():r,c={},u=s.reduce(function(d,p){var h,g=(h=p.type)!==null&&h!==void 0&&h.defaultProps?Pe(Pe({},p.type.defaultProps),p.props):p.props,m=g.stackId,v=g.hide;if(v)return d;var w=g[n],S=d[w]||{hasStack:!1,stackGroups:{}};if(Ie(m)){var j=S.stackGroups[m]||{numericAxisId:n,cateAxisId:a,items:[]};j.items.push(p),S.hasStack=!0,S.stackGroups[m]=j}else S.stackGroups[Ii("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[p]};return Pe(Pe({},d),{},Pn({},w,S))},c),f={};return Object.keys(u).reduce(function(d,p){var h=u[p];if(h.hasStack){var g={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(m,v){var w=h.stackGroups[v];return Pe(Pe({},m),{},Pn({},v,{numericAxisId:n,cateAxisId:a,items:w.items,stackedData:nq(t,w.items,i)}))},g)}return Pe(Pe({},d),{},Pn({},p,h))},f)},iq=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,o=r.originalDomain,s=r.allowDecimals,c=n||r.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=vB(u,i,s);return t.domain([al(f),Ar(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),p=gB(d,i,s);return{niceTicks:p}}return null};function rm(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!oe(a[t.dataKey])){var s=vo(r,"value",a[t.dataKey]);if(s)return s.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var c=st(a,oe(o)?t.dataKey:o);return oe(c)?null:t.scale(c)}var nm=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,s=t.index;if(r.type==="category")return n[s]?n[s].coordinate+a:null;var c=st(o,r.dataKey,r.domain[s]);return oe(c)?null:r.scale(c)-i/2+a},oq=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},sq=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Pe(Pe({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Ie(i)){var o=r[i];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},lq=function(t){return t.reduce(function(r,n){return[al(n.concat([r[0]]).filter(F)),Ar(n.concat([r[1]]).filter(F))]},[1/0,-1/0])},e0=function(t,r,n){return Object.keys(t).reduce(function(a,i){var o=t[i],s=o.stackedData,c=s.reduce(function(u,f){var d=lq(f.slice(r,n+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},am=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,im=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Zc=function(t,r,n){if(re(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(F(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(am.test(t[0])){var i=+am.exec(t[0])[1];a[0]=r[0]-i}else re(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(F(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(im.test(t[1])){var o=+im.exec(t[1])[1];a[1]=r[1]+o}else re(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},Ho=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=Pd(r,function(d){return d.coordinate}),o=1/0,s=1,c=i.length;s<c;s++){var u=i[s],f=i[s-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0},om=function(t,r,n){return!t||!t.length||ti(t,yt(n,"type.defaultProps.domain"))?r:t},t0=function(t,r){var n=t.type.defaultProps?Pe(Pe({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,o=n.unit,s=n.formatter,c=n.tooltipType,u=n.chartType,f=n.hide;return Pe(Pe({},ie(t,!1)),{},{dataKey:a,unit:o,formatter:s,name:i||a,color:ef(t),value:st(r,a),type:c,payload:r,chartType:u,hide:f})};function oi(e){"@babel/helpers - typeof";return oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(e)}function sm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function lm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sm(Object(r),!0).forEach(function(n){cq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cq(e,t,r){return t=uq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uq(e){var t=dq(e,"string");return oi(t)=="symbol"?t:t+""}function dq(e,t){if(oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Go=Math.PI/180,fq=function(t){return t*180/Math.PI},Ve=function(t,r,n,a){return{x:t+Math.cos(-Go*a)*n,y:r+Math.sin(-Go*a)*n}},pq=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-o,2))},hq=function(t,r){var n=t.x,a=t.y,i=r.cx,o=r.cy,s=pq({x:n,y:a},{x:i,y:o});if(s<=0)return{radius:s};var c=(n-i)/s,u=Math.acos(c);return a>o&&(u=2*Math.PI-u),{radius:s,angle:fq(u),angleInRadian:u}},mq=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),o=Math.min(a,i);return{startAngle:r-o*360,endAngle:n-o*360}},vq=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),o=Math.floor(a/360),s=Math.min(i,o);return t+s*360},cm=function(t,r){var n=t.x,a=t.y,i=hq({x:n,y:a},r),o=i.radius,s=i.angle,c=r.innerRadius,u=r.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var f=mq(r),d=f.startAngle,p=f.endAngle,h=s,g;if(d<=p){for(;h>p;)h-=360;for(;h<d;)h+=360;g=h>=d&&h<=p}else{for(;h>d;)h-=360;for(;h<p;)h+=360;g=h>=p&&h<=d}return g?lm(lm({},r),{},{radius:o,angle:vq(h,r)}):null};function si(e){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},si(e)}var gq=["offset"];function yq(e){return jq(e)||wq(e)||xq(e)||bq()}function bq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
247In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xq(e,t){if(e){if(typeof e=="string")return Qc(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qc(e,t)}}function wq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jq(e){if(Array.isArray(e))return Qc(e)}function Qc(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sq(e,t){if(e==null)return{};var r=Oq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Oq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?um(Object(r),!0).forEach(function(n){_q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _q(e,t,r){return t=Aq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Aq(e){var t=Nq(e,"string");return si(t)=="symbol"?t:t+""}function Nq(e,t){if(si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},li.apply(this,arguments)}var Pq=function(t){var r=t.value,n=t.formatter,a=oe(t.children)?r:t.children;return re(n)?n(a):a},Cq=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),360);return n*a},$q=function(t,r,n){var a=t.position,i=t.viewBox,o=t.offset,s=t.className,c=i,u=c.cx,f=c.cy,d=c.innerRadius,p=c.outerRadius,h=c.startAngle,g=c.endAngle,m=c.clockWise,v=(d+p)/2,w=Cq(h,g),S=w>=0?1:-1,j,_;a==="insideStart"?(j=h+S*o,_=m):a==="insideEnd"?(j=g-S*o,_=!m):a==="end"&&(j=g+S*o,_=m),_=w<=0?_:!_;var y=Ve(u,f,v,j),b=Ve(u,f,v,j+(_?1:-1)*359),x="M".concat(y.x,",").concat(y.y,`
248    A`).concat(v,",").concat(v,",0,1,").concat(_?0:1,`,
249    `).concat(b.x,",").concat(b.y),A=oe(t.id)?Ii("recharts-radial-line-"):t.id;return C.createElement("text",li({},n,{dominantBaseline:"central",className:ce("recharts-radial-bar-label",s)}),C.createElement("defs",null,C.createElement("path",{id:A,d:x})),C.createElement("textPath",{xlinkHref:"#".concat(A)},r))},Eq=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,o=i.cx,s=i.cy,c=i.innerRadius,u=i.outerRadius,f=i.startAngle,d=i.endAngle,p=(f+d)/2;if(a==="outside"){var h=Ve(o,s,u+n,p),g=h.x,m=h.y;return{x:g,y:m,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,w=Ve(o,s,v,p),S=w.x,j=w.y;return{x:S,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Tq=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,o=r,s=o.x,c=o.y,u=o.width,f=o.height,d=f>=0?1:-1,p=d*a,h=d>0?"end":"start",g=d>0?"start":"end",m=u>=0?1:-1,v=m*a,w=m>0?"end":"start",S=m>0?"start":"end";if(i==="top"){var j={x:s+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:h};return Me(Me({},j),n?{height:Math.max(c-n.y,0),width:u}:{})}if(i==="bottom"){var _={x:s+u/2,y:c+f+p,textAnchor:"middle",verticalAnchor:g};return Me(Me({},_),n?{height:Math.max(n.y+n.height-(c+f),0),width:u}:{})}if(i==="left"){var y={x:s-v,y:c+f/2,textAnchor:w,verticalAnchor:"middle"};return Me(Me({},y),n?{width:Math.max(y.x-n.x,0),height:f}:{})}if(i==="right"){var b={x:s+u+v,y:c+f/2,textAnchor:S,verticalAnchor:"middle"};return Me(Me({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:f}:{})}var x=n?{width:u,height:f}:{};return i==="insideLeft"?Me({x:s+v,y:c+f/2,textAnchor:S,verticalAnchor:"middle"},x):i==="insideRight"?Me({x:s+u-v,y:c+f/2,textAnchor:w,verticalAnchor:"middle"},x):i==="insideTop"?Me({x:s+u/2,y:c+p,textAnchor:"middle",verticalAnchor:g},x):i==="insideBottom"?Me({x:s+u/2,y:c+f-p,textAnchor:"middle",verticalAnchor:h},x):i==="insideTopLeft"?Me({x:s+v,y:c+p,textAnchor:S,verticalAnchor:g},x):i==="insideTopRight"?Me({x:s+u-v,y:c+p,textAnchor:w,verticalAnchor:g},x):i==="insideBottomLeft"?Me({x:s+v,y:c+f-p,textAnchor:S,verticalAnchor:h},x):i==="insideBottomRight"?Me({x:s+u-v,y:c+f-p,textAnchor:w,verticalAnchor:h},x):ra(i)&&(F(i.x)||Fr(i.x))&&(F(i.y)||Fr(i.y))?Me({x:s+Jr(i.x,u),y:c+Jr(i.y,f),textAnchor:"end",verticalAnchor:"end"},x):Me({x:s+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},x)},Mq=function(t){return"cx"in t&&F(t.cx)};function Ke(e){var t=e.offset,r=t===void 0?5:t,n=Sq(e,gq),a=Me({offset:r},n),i=a.viewBox,o=a.position,s=a.value,c=a.children,u=a.content,f=a.className,d=f===void 0?"":f,p=a.textBreakAll;if(!i||oe(s)&&oe(c)&&!O.isValidElement(u)&&!re(u))return null;if(O.isValidElement(u))return O.cloneElement(u,a);var h;if(re(u)){if(h=O.createElement(u,a),O.isValidElement(h))return h}else h=Pq(a);var g=Mq(i),m=ie(a,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return $q(a,h,m);var v=g?Eq(a):Tq(a);return C.createElement(To,li({className:ce("recharts-label",d)},m,v,{breakAll:p}),h)}Ke.displayName="Label";var r0=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,h=t.top,g=t.left,m=t.width,v=t.height,w=t.clockWise,S=t.labelViewBox;if(S)return S;if(F(m)&&F(v)){if(F(d)&&F(p))return{x:d,y:p,width:m,height:v};if(F(h)&&F(g))return{x:h,y:g,width:m,height:v}}return F(d)&&F(p)?{x:d,y:p,width:0,height:0}:F(r)&&F(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:f||c||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},kq=function(t,r){return t?t===!0?C.createElement(Ke,{key:"label-implicit",viewBox:r}):Ie(t)?C.createElement(Ke,{key:"label-implicit",viewBox:r,value:t}):O.isValidElement(t)?t.type===Ke?O.cloneElement(t,{key:"label-implicit",viewBox:r}):C.createElement(Ke,{key:"label-implicit",content:t,viewBox:r}):re(t)?C.createElement(Ke,{key:"label-implicit",content:t,viewBox:r}):ra(t)?C.createElement(Ke,li({viewBox:r},t,{key:"label-implicit"})):null:null},Dq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=r0(t),o=Et(a,Ke).map(function(c,u){return O.cloneElement(c,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return o;var s=kq(t.label,r||i);return[s].concat(yq(o))};Ke.parseViewBox=r0;Ke.renderCallByParent=Dq;function Iq(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Rq=Iq;const Lq=we(Rq);function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}var Bq=["valueAccessor"],qq=["data","dataKey","clockWise","id","textBreakAll"];function zq(e){return Wq(e)||Vq(e)||Uq(e)||Fq()}function Fq(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
250In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uq(e,t){if(e){if(typeof e=="string")return eu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eu(e,t)}}function Vq(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wq(e){if(Array.isArray(e))return eu(e)}function eu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ko.apply(this,arguments)}function dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dm(Object(r),!0).forEach(function(n){Hq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hq(e,t,r){return t=Gq(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gq(e){var t=Kq(e,"string");return ci(t)=="symbol"?t:t+""}function Kq(e,t){if(ci(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ci(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pm(e,t){if(e==null)return{};var r=Xq(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Xq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Yq=function(t){return Array.isArray(t.value)?Lq(t.value):t.value};function Cr(e){var t=e.valueAccessor,r=t===void 0?Yq:t,n=pm(e,Bq),a=n.data,i=n.dataKey,o=n.clockWise,s=n.id,c=n.textBreakAll,u=pm(n,qq);return!a||!a.length?null:C.createElement(Ae,{className:"recharts-label-list"},a.map(function(f,d){var p=oe(i)?r(f,d):st(f&&f.payload,i),h=oe(s)?{}:{id:"".concat(s,"-").concat(d)};return C.createElement(Ke,Ko({},ie(f,!0),u,h,{parentViewBox:f.parentViewBox,value:p,textBreakAll:c,viewBox:Ke.parseViewBox(oe(o)?f:fm(fm({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}Cr.displayName="LabelList";function Jq(e,t){return e?e===!0?C.createElement(Cr,{key:"labelList-implicit",data:t}):C.isValidElement(e)||re(e)?C.createElement(Cr,{key:"labelList-implicit",data:t,content:e}):ra(e)?C.createElement(Cr,Ko({data:t},e,{key:"labelList-implicit"})):null:null}function Zq(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Et(n,Cr).map(function(o,s){return O.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!r)return a;var i=Jq(e.label,t);return[i].concat(zq(a))}Cr.renderCallByParent=Zq;function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tu.apply(this,arguments)}function hm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function mm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hm(Object(r),!0).forEach(function(n){Qq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qq(e,t,r){return t=ez(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ez(e){var t=tz(e,"string");return ui(t)=="symbol"?t:t+""}function tz(e,t){if(ui(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rz=function(t,r){var n=Ct(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},ro=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,o=t.sign,s=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(s?1:-1)+a,d=Math.asin(c/f)/Go,p=u?i:i+o*d,h=Ve(r,n,f,p),g=Ve(r,n,a,p),m=u?i-o*d:i,v=Ve(r,n,f*Math.cos(d*Go),m);return{center:h,circleTangency:g,lineTangency:v,theta:d}},n0=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,s=t.endAngle,c=rz(o,s),u=o+c,f=Ve(r,n,i,o),d=Ve(r,n,i,u),p="M ".concat(f.x,",").concat(f.y,`
251    A `).concat(i,",").concat(i,`,0,
252    `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`,
253    `).concat(d.x,",").concat(d.y,`
254  `);if(a>0){var h=Ve(r,n,a,o),g=Ve(r,n,a,u);p+="L ".concat(g.x,",").concat(g.y,`
255            A `).concat(a,",").concat(a,`,0,
256            `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`,
257            `).concat(h.x,",").concat(h.y," Z")}else p+="L ".concat(r,",").concat(n," Z");return p},nz=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Ct(f-u),p=ro({cx:r,cy:n,radius:i,angle:u,sign:d,cornerRadius:o,cornerIsExternal:c}),h=p.circleTangency,g=p.lineTangency,m=p.theta,v=ro({cx:r,cy:n,radius:i,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:c}),w=v.circleTangency,S=v.lineTangency,j=v.theta,_=c?Math.abs(u-f):Math.abs(u-f)-m-j;if(_<0)return s?"M ".concat(g.x,",").concat(g.y,`
258        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
259        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
260      `):n0({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:f});var y="M ".concat(g.x,",").concat(g.y,`
261    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,`
262    A`).concat(i,",").concat(i,",0,").concat(+(_>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,`
263    A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(S.x,",").concat(S.y,`
264  `);if(a>0){var b=ro({cx:r,cy:n,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),x=b.circleTangency,A=b.lineTangency,N=b.theta,E=ro({cx:r,cy:n,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),P=E.circleTangency,$=E.lineTangency,T=E.theta,k=c?Math.abs(u-f):Math.abs(u-f)-N-T;if(k<0&&o===0)return"".concat(y,"L").concat(r,",").concat(n,"Z");y+="L".concat($.x,",").concat($.y,`
265      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,`
266      A`).concat(a,",").concat(a,",0,").concat(+(k>180),",").concat(+(d>0),",").concat(x.x,",").concat(x.y,`
267      A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else y+="L".concat(r,",").concat(n,"Z");return y},az={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},a0=function(t){var r=mm(mm({},az),t),n=r.cx,a=r.cy,i=r.innerRadius,o=r.outerRadius,s=r.cornerRadius,c=r.forceCornerRadius,u=r.cornerIsExternal,f=r.startAngle,d=r.endAngle,p=r.className;if(o<i||f===d)return null;var h=ce("recharts-sector",p),g=o-i,m=Jr(s,g,0,!0),v;return m>0&&Math.abs(f-d)<360?v=nz({cx:n,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):v=n0({cx:n,cy:a,innerRadius:i,outerRadius:o,startAngle:f,endAngle:d}),C.createElement("path",tu({},ie(r,!0),{className:h,d:v,role:"img"}))};function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
267for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ru.apply(this,arguments)}function vm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vm(Object(r),!0).forEach(function(n){iz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iz(e,t,r){return t=oz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oz(e){var t=sz(e,"string");return di(t)=="symbol"?t:t+""}function sz(e,t){if(di(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(di(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ym={curveBasisClosed:aC,curveBasisOpen:iC,curveBasis:nC,curveBumpX:U2,curveBumpY:V2,curveLinearClosed:oC,curveLinear:Gs,curveMonotoneX:sC,curveMonotoneY:lC,curveNatural:cC,curveStep:uC,curveStepAfter:fC,curveStepBefore:dC},no=function(t){return t.x===+t.x&&t.y===+t.y},_a=function(t){return t.x},Aa=function(t){return t.y},lz=function(t,r){if(re(t))return t;var n="curve".concat(Ws(t));return(n==="curveMonotone"||n==="curveBump")&&r?ym["".concat(n).concat(r==="vertical"?"Y":"X")]:ym[n]||Gs},cz=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,o=t.baseLine,s=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=lz(n,s),d=u?i.filter(function(m){return no(m)}):i,p;if(Array.isArray(o)){var h=u?o.filter(function(m){return no(m)}):o,g=d.map(function(m,v){return gm(gm({},m),{},{base:h[v]})});return s==="vertical"?p=Gi().y(Aa).x1(_a).x0(function(m){return m.base.x}):p=Gi().x(_a).y1(Aa).y0(function(m){return m.base.y}),p.defined(no).curve(f),p(g)}return s==="vertical"&&F(o)?p=Gi().y(Aa).x1(_a).x0(o):F(o)?p=Gi().x(_a).y1(Aa).y0(o):p=ab().x(_a).y(Aa),p.defined(no).curve(f),p(d)},La=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var o=n&&n.length?cz(t):a;return O.createElement("path",ru({},ie(t,!1),go(t),{className:ce("recharts-curve",r),d:o,ref:i}))},i0={exports:{}},uz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",dz=uz,fz=dz;function o0(){}function s0(){}s0.resetWarningCache=o0;var pz=function(){function e(n,a,i,o,s,c){if(c!==fz){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s0,resetWarningCache:o0};return r.PropTypes=r,r};i0.exports=pz();var hz=i0.exports;const de=we(hz);var mz=Object.getOwnPropertyNames,vz=Object.getOwnPropertySymbols,gz=Object.prototype.hasOwnProperty;function bm(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function ao(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,o=i.get(r),s=i.get(n);if(o&&s)return o===n&&s===r;i.set(r,n),i.set(n,r);var c=e(r,n,a);return i.delete(r),i.delete(n),c}}function xm(e){return mz(e).concat(vz(e))}var yz=Object.hasOwn||function(e,t){return gz.call(e,t)};function sn(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var bz="__v",xz="__o",wz="_owner",wm=Object.getOwnPropertyDescriptor,jm=Object.keys;function jz(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Sz(e,t){return sn(e.getTime(),t.getTime())}function Oz(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function _z(e,t){return e===t}function Sm(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),o,s,c=0;(o=i.next())&&!o.done;){for(var u=t.entries(),f=!1,d=0;(s=u.next())&&!s.done;){if(a[d]){d++;continue}var p=o.value,h=s.value;if(r.equals(p[0],h[0],c,d,e,t,r)&&r.equals(p[1],h[1],p[0],h[0],e,t,r)){f=a[d]=!0;break}d++}if(!f)return!1;c++}return!0}var Az=sn;function Nz(e,t,r){var n=jm(e),a=n.length;if(jm(t).length!==a)return!1;for(;a-- >0;)if(!l0(e,t,r,n[a]))return!1;return!0}function Na(e,t,r){var n=xm(e),a=n.length;if(xm(t).length!==a)return!1;for(var i,o,s;a-- >0;
267)if(i=n[a],!l0(e,t,r,i)||(o=wm(e,i),s=wm(t,i),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Pz(e,t){return sn(e.valueOf(),t.valueOf())}function Cz(e,t){return e.source===t.source&&e.flags===t.flags}function Om(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),o,s;(o=i.next())&&!o.done;){for(var c=t.values(),u=!1,f=0;(s=c.next())&&!s.done;){if(!a[f]&&r.equals(o.value,s.value,o.value,s.value,e,t,r)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function $z(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function Ez(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function l0(e,t,r,n){return(n===wz||n===xz||n===bz)&&(e.$$typeof||t.$$typeof)?!0:yz(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var Tz="[object Arguments]",Mz="[object Boolean]",kz="[object Date]",Dz="[object Error]",Iz="[object Map]",Rz="[object Number]",Lz="[object Object]",Bz="[object RegExp]",qz="[object Set]",zz="[object String]",Fz="[object URL]",Uz=Array.isArray,_m=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Am=Object.assign,Vz=Object.prototype.toString.call.bind(Object.prototype.toString);function Wz(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,d=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(g,m,v){if(g===m)return!0;if(g==null||m==null)return!1;var w=typeof g;if(w!==typeof m)return!1;if(w!=="object")return w==="number"?o(g,m,v):w==="function"?a(g,m,v):!1;var S=g.constructor;if(S!==m.constructor)return!1;if(S===Object)return s(g,m,v);if(Uz(g))return t(g,m,v);if(_m!=null&&_m(g))return d(g,m,v);if(S===Date)return r(g,m,v);if(S===RegExp)return u(g,m,v);if(S===Map)return i(g,m,v);if(S===Set)return f(g,m,v);var j=Vz(g);return j===kz?r(g,m,v):j===Bz?u(g,m,v):j===Iz?i(g,m,v):j===qz?f(g,m,v):j===Lz?typeof g.then!="function"&&typeof m.then!="function"&&s(g,m,v):j===Fz?p(g,m,v):j===Dz?n(g,m,v):j===Tz?s(g,m,v):j===Mz||j===Rz||j===zz?c(g,m,v):!1}}function Hz(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?Na:jz,areDatesEqual:Sz,areErrorsEqual:Oz,areFunctionsEqual:_z,areMapsEqual:n?bm(Sm,Na):Sm,areNumbersEqual:Az,areObjectsEqual:n?Na:Nz,arePrimitiveWrappersEqual:Pz,areRegExpsEqual:Cz,areSetsEqual:n?bm(Om,Na):Om,areTypedArraysEqual:n?Na:$z,areUrlsEqual:Ez};
vendor: 161,384 bytes, lines 267-289
267if(r&&(a=Am({},a,r(a))),t){var i=ao(a.areArraysEqual),o=ao(a.areMapsEqual),s=ao(a.areObjectsEqual),c=ao(a.areSetsEqual);a=Am({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:c})}return a}function Gz(e){return function(t,r,n,a,i,o,s){return e(t,r,s)}}function Kz(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(c,u){var f=n(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,h=f.meta;return r(c,u,{cache:p,equals:a,meta:h,strict:i})};if(t)return function(c,u){return r(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return r(c,u,o)}}var Xz=Dr();Dr({strict:!0});Dr({circular:!0});Dr({circular:!0,strict:!0});Dr({createInternalComparator:function(){return sn}});Dr({strict:!0,createInternalComparator:function(){return sn}});Dr({circular:!0,createInternalComparator:function(){return sn}});Dr({circular:!0,createInternalComparator:function(){return sn},strict:!0});function Dr(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,s=Hz(e),c=Wz(s),u=n?n(c):Gz(c);return Kz({circular:r,comparator:c,createState:a,equals:u,strict:o})}function Yz(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Nm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):Yz(a)};requestAnimationFrame(n)}function nu(e){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nu(e)}function Jz(e){return tF(e)||eF(e)||Qz(e)||Zz()}function Zz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
268In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qz(e,t){if(e){if(typeof e=="string")return Pm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pm(e,t)}}function Pm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tF(e){if(Array.isArray(e))return e}function rF(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var o=i,s=Jz(o),c=s[0],u=s.slice(1);if(typeof c=="number"){Nm(a.bind(null,u),c);return}a(c),Nm(a.bind(null,u));return}nu(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}function Cm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $m(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cm(Object(r),!0).forEach(function(n){c0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function c0(e,t,r){return t=nF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nF(e){var t=aF(e,"string");return fi(t)==="symbol"?t:String(t)}function aF(e,t){if(fi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iF=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},oF=function(t){return t},sF=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},Ba=function(t,r){return Object.keys(r).reduce(function(n,a){return $m($m({},n),{},c0({},a,t(a,r[a])))},{})},Em=function(t,r,n){return t.map(function(a){return"".concat(sF(a)," ").concat(r,"ms ").concat(n)}).join(",")};function lF(e,t){return dF(e)||uF(e,t)||u0(e,t)||cF()}function cF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
269In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function dF(e){if(Array.isArray(e))return e}function fF(e){return mF(e)||hF(e)||u0(e)||pF()}function pF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
270In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u0(e,t){if(e){if(typeof e=="string")return au(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return au(e,t)}}function hF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mF(e){if(Array.isArray(e))return au(e)}function au(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Xo=1e-4,d0=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},f0=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},Tm=function(t,r){return function(n){var a=d0(t,r);return f0(a,n)}},vF=function(t,r){return function(n){var a=d0(t,r),i=[].concat(fF(a.map(function(o,s){return o*s}).slice(1)),[0]);return f0(i,n)}},Mm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],o=r[2],s=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,o=1,s=1;break;case"ease":a=.25,i=.1,o=.25,s=1;break;case"ease-in":a=.42,i=0,o=1,s=1;break;case"ease-out":a=.42,i=0,o=.58,s=1;break;case"ease-in-out":a=0,i=0,o=.58,s=1;break;default:{var c=r[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),f=lF(u,4);a=f[0],i=f[1],o=f[2],s=f[3]}}}var d=Tm(a,o),p=Tm(i,s),h=vF(a,o),g=function(w){return w>1?1:w<0?0:w},m=function(w){for(var S=w>1?1:w,j=S,_=0;_<8;++_){var y=d(j)-S,b=h(j);if(Math.abs(y-S)<Xo||b<Xo)return p(j);j=g(j-y/b)}return p(j)};return m.isStepper=!1,m},gF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,o=t.dt,s=o===void 0?17:o,c=function(f,d,p){var h=-(f-d)*n,g=p*i,m=p+(h-g)*s/1e3,v=p*s/1e3+f;return Math.abs(v-d)<Xo&&Math.abs(m)<Xo?[d,0]:[v,m]};return c.isStepper=!0,c.dt=s,c},yF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Mm(a);case"spring":return gF();default:if(a.split("(")[0]==="cubic-bezier")return Mm(a)}return typeof a=="function"?a:null};function pi(e){"@babel/helpers - typeof";return pi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(e)}function km(e){return wF(e)||xF(e)||p0(e)||bF()}function bF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
271In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wF(e){if(Array.isArray(e))return ou(e)}function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dm(Object(r),!0).forEach(function(n){iu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iu(e,t,r){return t=jF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jF(e){var t=SF(e,"string");return pi(t)==="symbol"?t:String(t)}function SF(e,t){if(pi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function OF(e,t){return NF(e)||AF(e,t)||p0(e,t)||_F()}function _F(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
272In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p0(e,t){if(e){if(typeof e=="string")return ou(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ou(e,t)}}function ou(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function AF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function NF(e){if(Array.isArray(e))return e}var Yo=function(t,r,n){return t+(r-t)*n},su=function(t){var r=t.from,n=t.to;return r!==n},PF=function e(t,r,n){var a=Ba(function(i,o){if(su(o)){var s=t(o.from,o.to,o.velocity),c=OF(s,2),u=c[0],f=c[1];return Ue(Ue({},o),{},{from:u,velocity:f})}return o},r);return n<1?Ba(function(i,o){return su(o)?Ue(Ue({},o),{},{velocity:Yo(o.velocity,a[i].velocity,n),from:Yo(o.from,a[i].from,n)}):o},r):e(t,a,n-1)};const CF=function(e,t,r,n,a){var i=iF(e,t),o=i.reduce(function(v,w){return Ue(Ue({},v),{},iu({},w,[e[w],t[w]]))},{}),s=i.reduce(function(v,w){return Ue(Ue({},v),{},iu({},w,{from:e[w],velocity:0,to:t[w]}))},{}),c=-1,u,f,d=function(){return null},p=function(){return Ba(function(w,S){return S.from},s)},h=function(){return!Object.values(s).filter(su).length},g=function(w){u||(u=w);var S=w-u,j=S/r.dt;s=PF(r,s,j),a(Ue(Ue(Ue({},e),t),p())),u=w,h()||(c=requestAnimationFrame(d))},m=function(w){f||(f=w);var S=(w-f)/n,j=Ba(function(y,b){return Yo.apply(void 0,km(b).concat([r(S)]))},o);if(a(Ue(Ue(Ue({},e),t),j)),S<1)c=requestAnimationFrame(d);else{var _=Ba(function(y,b){return Yo.apply(void 0,km(b).concat([r(1)]))},o);a(Ue(Ue(Ue({},e),t),_))}};return d=r.isStepper?g:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function Bn(e){"@babel/helpers - typeof";return Bn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(e)}var $F=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function EF(e,t){if(e==null)return{};var r=TF(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TF(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Xl(e){return IF(e)||DF(e)||kF(e)||MF()}function MF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
273In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kF(e,t){if(e){if(typeof e=="string")return lu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lu(e,t)}}function DF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IF(e){if(Array.isArray(e))return lu(e)}function lu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Im(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Im(Object(r),!0).forEach(function(n){Ea(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Im(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ea(e,t,r){return t=h0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RF(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LF(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,h0(n.key),n)}}function BF(e,t,r){return t&&LF(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h0(e){var t=qF(e,"string");return Bn(t)==="symbol"?t:String(t)}function qF(e,t){if(Bn(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bn(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zF(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cu(e,t)}function cu(e,t){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},cu(e,t)}function FF(e){var t=UF();return function(){var n=Jo(e),a;if(t){var i=Jo(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return uu(this,a)}}function uu(e,t){if(t&&(Bn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return du(e)}function du(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UF(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jo(e){return Jo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jo(e)}var pr=function(e){zF(r,e);var t=FF(r);function r(n,a){var i;RF(this,r),i=t.call(this,n,a);var o=i.props,s=o.isActive,c=o.attributeName,u=o.from,f=o.to,d=o.steps,p=o.children,h=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(du(i)),i.changeStyle=i.changeStyle.bind(du(i)),!s||h<=0)return i.state={style:{}},typeof p=="function"&&(i.state={style:f}),uu(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof p=="function")return i.state={style:u},uu(i);i.state={style:c?Ea({},c,u):u}}else i.state={style:{}};return i}return BF(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,s=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,f=i.to,d=i.from,p=this.state.style;if(s){if(!o){var h={style:c?Ea({},c,f):f};this.state&&p&&(c&&p[c]!==f||!c&&p!==f)&&this.setState(h);return}if(!(Xz(a.to,f)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?d:a.to;if(this.state&&p){var v={style:c?Ea({},c,m):m};(c&&p[c]!==m||!c&&p!==m)&&this.setState(v)}this.runAnimation(At(At({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,s=a.to,c=a.duration,u=a.easing,f=a.begin,d=a.onAnimationEnd,p=a.onAnimationStart,h=CF(o,s,yF(u),c,this.changeStyle),g=function(){i.stopJSAnimation=h()};this.manager.start([p,f,g,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,s=a.begin,c=a.onAnimationStart,u=o[0],f=u.style,d=u.duration,p=d===void 0?0:d,h=function(m,v,w){if(w===0)return m;var S=v.duration,j=v.easing,_=j===void 0?"ease":j,y=v.style,b=v.properties,x=v.onAnimationEnd,A=w>0?o[w-1]:v,N=b||Object.keys(y);if(typeof _=="function"||_==="spring")return[].concat(Xl(m),[i.runJSAnimation.bind(i,{from:A.style,to:y,duration:S,easing:_}),S]);var E=Em(N,S,_),P=At(At(At({},A.style),y),{},{transition:E});return[].concat(Xl(m),[P,S,x]).filter(oF)};return this.manager.start([c].concat(Xl(o.reduce(h,[f,Math.max(p,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=rF());var i=a.begin,o=a.duration,s=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,p=a.steps,h=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof h=="function"||u==="spring"){this.runJSAnimation(a);return}if(p.length>1){this.runStepAnimation(a);return}var m=s?Ea({},s,c):c,v=Em(Object.keys(m),o,u);g.start([f,i,At(At({},m),{},{transition:v}),o,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=EF(a,$F),u=O.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!s||u===0||o<=0)return i;var d=function(h){var g=h.props,m=g.style,v=m===void 0?{}:m,w=g.className,S=O.cloneElement(h,At(At({},c),{},{style:At(At({},v),f),className:w}));return S};return u===1?d(O.Children.only(i)):C.createElement("div",null,O.Children.map(i,function(p){return d(p)}))}}]),r}(O.PureComponent);pr.displayName="Animate";pr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};pr.propTypes={from:de.oneOfType([de.object,de.string]),to:de.oneOfType([de.object,de.string]),attributeName:de.string,duration:de.number,begin:de.number,easing:de.oneOfType([de.string,de.func]),steps:de.arrayOf(de.shape({duration:de.number.isRequired,style:de.object.isRequired,easing:de.oneOfType([de.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),de.func]),properties:de.arrayOf("string"),onAnimationEnd:de.func})),children:de.oneOfType([de.node,de.func]),isActive:de.bool,canBegin:de.bool,onAnimationEnd:de.func,shouldReAnimate:de.bool,onAnimationStart:de.func,onAnimationReStart:de.func};function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zo.apply(this,arguments)}function VF(e,t){return KF(e)||GF(e,t)||HF(e,t)||WF()}function WF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
274In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HF(e,t){if(e){if(typeof e=="string")return Rm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rm(e,t)}}function Rm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function GF(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function KF(e){if(Array.isArray(e))return e}function Lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lm(Object(r),!0).forEach(function(n){XF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XF(e,t,r){return t=YF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YF(e){var t=JF(e,"string");return hi(t)=="symbol"?t:t+""}function JF(e,t){if(hi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qm=function(t,r,n,a,i){var o=Math.min(Math.abs(n)/2,Math.abs(a)/2),s=a>=0?1:-1,c=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,f;if(o>0&&i instanceof Array){for(var d=[0,0,0,0],p=0,h=4;p<h;p++)d[p]=i[p]>o?o:i[p];f="M".concat(t,",").concat(r+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(r)),f+="L ".concat(t+n-c*d[1],",").concat(r),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
275        `).concat(t+n,",").concat(r+s*d[1])),f+="L ".concat(t+n,",").concat(r+a-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
276        `).concat(t+n-c*d[2],",").concat(r+a)),f+="L ".concat(t+c*d[3],",").concat(r+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
277        `).concat(t,",").concat(r+a-s*d[3])),f+="Z"}else if(o>0&&i===+i&&i>0){var g=Math.min(o,i);f="M ".concat(t,",").concat(r+s*g,`
278            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(r,`
279            L `).concat(t+n-c*g,",").concat(r,`
280            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n,",").concat(r+s*g,`
281            L `).concat(t+n,",").concat(r+a-s*g,`
282            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+n-c*g,",").concat(r+a,`
283            L `).concat(t+c*g,",").concat(r+a,`
284            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(r+a-s*g," Z")}else f="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return f},ZF=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,o=r.y,s=r.width,c=r.height;if(Math.abs(s)>0&&Math.abs(c)>0){var u=Math.min(i,i+s),f=Math.max(i,i+s),d=Math.min(o,o+c),p=Math.max(o,o+c);return n>=u&&n<=f&&a>=d&&a<=p}return!1},QF={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tf=function(t){var r=Bm(Bm({},QF),t),n=O.useRef(),a=O.useState(-1),i=VF(a,2),o=i[0],s=i[1];O.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var _=n.current.getTotalLength();_&&s(_)}catch{}},[]);var c=r.x,u=r.y,f=r.width,d=r.height,p=r.radius,h=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,w=r.isAnimationActive,S=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var j=ce("recharts-rectangle",h);return S?C.createElement(pr,{canBegin:o>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:m,animationEasing:g,isActive:S},function(_){var y=_.width,b=_.height,x=_.x,A=_.y;return C.createElement(pr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,isActive:w,easing:g},C.createElement("path",Zo({},ie(r,!0),{className:j,d:qm(x,A,y,b,p),ref:n})))}):C.createElement("path",Zo({},ie(r,!0),{className:j,d:qm(c,u,f,d,p)}))};function fu(){return fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fu.apply(this,arguments)}var rf=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,o=ce("recharts-dot",i);return r===+r&&n===+n&&a===+a?O.createElement("circle",fu({},ie(t,!1),go(t),{className:o,cx:r,cy:n,r:a})):null};function mi(e){"@babel/helpers - typeof";return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(e)}var e6=["x","y","top","left","width","height","className"];function pu(){return pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pu.apply(this,arguments)}function zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function t6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zm(Object(r),!0).forEach(function(n){r6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r6(e,t,r){return t=n6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n6(e){var t=a6(e,"string");return mi(t)=="symbol"?t:t+""}function a6(e,t){if(mi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i6(e,t){if(e==null)return{};var r=o6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function o6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var s6=function(t,r,n,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(r,"h").concat(n)},l6=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,o=t.top,s=o===void 0?0:o,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,p=t.height,h=p===void 0?0:p,g=t.className,m=i6(t,e6),v=t6({x:n,y:i,top:s,left:u,width:d,height:h},m);return!F(n)||!F(i)||!F(d)||!F(h)||!F(s)||!F(u)?null:C.createElement("path",pu({},ie(v,!0),{className:ce("recharts-cross",g),d:s6(n,i,d,h,s,u)}))},c6=Pb,u6=c6(Object.getPrototypeOf,Object),d6=u6,f6=mr,p6=d6,h6=vr,m6="[object Object]",v6=Function.prototype,g6=Object.prototype,m0=v6.toString,y6=g6.hasOwnProperty,b6=m0.call(Object);function x6(e){if(!h6(e)||f6(e)!=m6)return!1;var t=p6(e);if(t===null)return!0;var r=y6.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&m0.call(r)==b6}var w6=x6;const j6=we(w6);var S6=mr,O6=vr,_6="[object Boolean]";function A6(e){return e===!0||e===!1||O6(e)&&S6(e)==_6}var N6=A6;const P6=we(N6);function vi(e){"@babel/helpers - typeof";return vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vi(e)}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qo.apply(this,arguments)}function C6(e,t){return M6(e)||T6(e,t)||E6(e,t)||$6()}function $6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
285In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E6(e,t){if(e){if(typeof e=="string")return Fm(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fm(e,t)}}function Fm(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function M6(e){if(Array.isArray(e))return e}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Vm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(r),!0).forEach(function(n){k6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function k6(e,t,r){return t=D6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D6(e){var t=I6(e,"string");return vi(t)=="symbol"?t:t+""}function I6(e,t){if(vi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wm=function(t,r,n,a,i){var o=n-a,s;return s="M ".concat(t,",").concat(r),s+="L ".concat(t+n,",").concat(r),s+="L ".concat(t+n-o/2,",").concat(r+i),s+="L ".concat(t+n-o/2-a,",").concat(r+i),s+="L ".concat(t,",").concat(r," Z"),s},R6={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},L6=function(t){var r=Vm(Vm({},R6),t),n=O.useRef(),a=O.useState(-1),i=C6(a,2),o=i[0],s=i[1];O.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&s(j)}catch{}},[]);var c=r.x,u=r.y,f=r.upperWidth,d=r.lowerWidth,p=r.height,h=r.className,g=r.animationEasing,m=r.animationDuration,v=r.animationBegin,w=r.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||p!==+p||f===0&&d===0||p===0)return null;var S=ce("recharts-trapezoid",h);return w?C.createElement(pr,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:c,y:u},duration:m,animationEasing:g,isActive:w},function(j){var _=j.upperWidth,y=j.lowerWidth,b=j.height,x=j.x,A=j.y;return C.createElement(pr,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:m,easing:g},C.createElement("path",Qo({},ie(r,!0),{className:S,d:Wm(x,A,_,y,b),ref:n})))}):C.createElement("g",null,C.createElement("path",Qo({},ie(r,!0),{className:S,d:Wm(c,u,f,d,p)})))},B6=["option","shapeType","propTransformer","activeClassName","isActive"];function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gi(e)}function q6(e,t){if(e==null)return{};var r=z6(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function z6(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(r),!0).forEach(function(n){F6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F6(e,t,r){return t=U6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U6(e){var t=V6(e,"string");return gi(t)=="symbol"?t:t+""}function V6(e,t){if(gi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W6(e,t){return es(es({},t),e)}function H6(e,t){return e==="symbols"}function Gm(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return C.createElement(tf,r);case"trapezoid":return C.createElement(L6,r);case"sector":return C.createElement(a0,r);case"symbols":if(H6(t))return C.createElement(xd,r);break;default:return null}}function G6(e){return O.isValidElement(e)?e.props:e}function K6(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?W6:n,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,s=e.isActive,c=q6(e,B6),u;if(O.isValidElement(t))u=O.cloneElement(t,es(es({},c),G6(t)));else if(re(t))u=t(c);else if(j6(t)&&!P6(t)){var f=a(t,c);u=C.createElement(Gm,{shapeType:r,elementProps:f})}else{var d=c;u=C.createElement(Gm,{shapeType:r,elementProps:d})}return s?C.createElement(Ae,{className:o},u):u}function ll(e,t){return t!=null&&"trapezoids"in e.props}function cl(e,t){return t!=null&&"sectors"in e.props}function yi(e,t){return t!=null&&"points"in e.props}function X6(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function Y6(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function J6(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function Z6(e,t){var r;return ll(e,t)?r=X6:cl(e,t)?r=Y6:yi(e,t)&&(r=J6),r}function Q6(e,t){var r;return ll(e,t)?r="trapezoids":cl(e,t)?r="sectors":yi(e,t)&&(r="points"),r}function e8(e,t){if(ll(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}if(cl(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}return yi(e,t)?t.payload:{}}function t8(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=Q6(r,t),i=e8(r,t),o=n.filter(function(c,u){var f=ti(i,c),d=r.props[a].filter(function(g){var m=Z6(r,t);return m(g,t)}),p=r.props[a].indexOf(d[d.length-1]),h=u===p;return f&&h}),s=n.indexOf(o[o.length-1]);return s}var r8=Math.ceil,n8=Math.max;function a8(e,t,r,n){for(var a=-1,i=n8(r8((t-e)/(r||1)),0),o=Array(i);i--;)o[n?i:++a]=e,e+=r;return o}var i8=a8,o8=Gb,Km=1/0,s8=17976931348623157e292;function l8(e){if(!e)return e===0?e:0;if(e=o8(e),e===Km||e===-Km){var t=e<0?-1:1;return t*s8}return e===e?e:0}var v0=l8,c8=i8,u8=Js,Yl=v0;function d8(e){return function(t,r,n){return n&&typeof n!="number"&&u8(t,r,n)&&(r=n=void 0),t=Yl(t),r===void 0?(r=t,t=0):r=Yl(r),n=n===void 0?t<r?1:-1:Yl(n),c8(t,r,n,e)}}var f8=d8,p8=f8,h8=p8(),m8=h8;const ts=we(m8);function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function Xm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ym(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xm(Object(r),!0).forEach(function(n){g0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g0(e,t,r){return t=v8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v8(e){var t=g8(e,"string");return bi(t)=="symbol"?t:t+""}function g8(e,t){if(bi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var y8=["Webkit","Moz","O","ms"],b8=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=y8.reduce(function(i,o){return Ym(Ym({},i),{},g0({},o+n,r))},{});return a[t]=r,a};function qn(e){"@babel/helpers - typeof";return qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qn(e)}function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(this,arguments)}function Jm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jm(Object(r),!0).forEach(function(n){at(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x8(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b0(n.key),n)}}function w8(e,t,r){return t&&Zm(e.prototype,t),r&&Zm(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function j8(e,t,r){return t=ns(t),S8(e,y0()?Reflect.construct(t,r||[],ns(e).constructor):t.apply(e,r))}function S8(e,t){if(t&&(qn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O8(e)}function O8(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y0=function(){return!!e})()}function ns(e){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ns(e)}function _8(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hu(e,t)}function hu(e,t){return hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},hu(e,t)}function at(e,t,r){return t=b0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b0(e){var t=A8(e,"string");return qn(t)=="symbol"?t:t+""}function A8(e,t){if(qn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N8=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,o=t.width,s=t.travellerWidth;if(!r||!r.length)return{};var c=r.length,u=Ia().domain(ts(0,c)).range([i,i+o-s]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:f}},Qm=function(t){return t.changedTouches&&!!t.changedTouches.length},zn=function(e){function t(r){var n;return x8(this,t),n=j8(this,t,[r]),at(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),at(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),at(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,o=a.onDragEnd,s=a.startIndex;o?.({endIndex:i,startIndex:s})}),n.detachDragEndListener()}),at(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),at(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),at(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),at(n,"handleSlideDragStart",function(a){var i=Qm(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return _8(t,e),w8(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,o=this.state.scaleValues,s=this.props,c=s.gap,u=s.data,f=u.length-1,d=Math.min(a,i),p=Math.max(a,i),h=t.getIndexInRange(o,d),g=t.getIndexInRange(o,p);return{startIndex:h-h%c,endIndex:g===f?f:g-g%c}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,o=a.tickFormatter,s=a.dataKey,c=st(i[n],s,n);return re(o)?o(c,n):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(n){var a=this.state,i=a.slideMoveStartX,o=a.startX,s=a.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,p=c.startIndex,h=c.endIndex,g=c.onChange,m=n.pageX-i;m>0?m=Math.min(m,u+f-d-s,u+f-d-o):m<0&&(m=Math.max(m,u-o,u-s));var v=this.getIndex({startX:o+m,endX:s+m});(v.startIndex!==p||v.endIndex!==h)&&g&&g(v),this.setState({startX:o+m,endX:s+m,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=Qm(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,s=a.endX,c=a.startX,u=this.state[o],f=this.props,d=f.x,p=f.width,h=f.travellerWidth,g=f.onChange,m=f.gap,v=f.data,w={startX:this.state.startX,endX:this.state.endX},S=n.pageX-i;S>0?S=Math.min(S,d+p-h-u):S<0&&(S=Math.max(S,d-u)),w[o]=u+S;var j=this.getIndex(w),_=j.startIndex,y=j.endIndex,b=function(){var A=v.length-1;return o==="startX"&&(s>c?_%m===0:y%m===0)||s<c&&y===A||o==="endX"&&(s>c?y%m===0:_%m===0)||s>c&&y===A};this.setState(at(at({},o,u+S),"brushMoveStartX",n.pageX),function(){g&&b()&&g(j)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,o=this.state,s=o.scaleValues,c=o.startX,u=o.endX,f=this.state[a],d=s.indexOf(f);if(d!==-1){var p=d+n;if(!(p===-1||p>=s.length)){var h=s[p];a==="startX"&&h>=u||a==="endX"&&h<=c||this.setState(at({},a,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,c=n.fill,u=n.stroke;return C.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:o,height:s})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,c=n.data,u=n.children,f=n.padding,d=O.Children.only(u);return d?C.cloneElement(d,{x:a,y:i,width:o,height:s,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,o,s=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,p=c.traveller,h=c.ariaLabel,g=c.data,m=c.startIndex,v=c.endIndex,w=Math.max(n,this.props.x),S=Jl(Jl({},ie(this.props,!1)),{},{x:w,y:u,width:f,height:d}),j=h||"Min value: ".concat((i=g[m])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=g[v])===null||o===void 0?void 0:o.name);return C.createElement(Ae,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(y){["ArrowLeft","ArrowRight"].includes(y.key)&&(y.preventDefault(),y.stopPropagation(),s.handleTravellerMoveKeyboard(y.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,S))}},{key:"renderSlide",value:function(n,a){var i=this.props,o=i.y,s=i.height,c=i.stroke,u=i.travellerWidth,f=Math.min(n,a)+u,d=Math.max(Math.abs(a-n)-u,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:o,width:d,height:s})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,o=n.y,s=n.height,c=n.travellerWidth,u=n.stroke,f=this.state,d=f.startX,p=f.endX,h=5,g={pointerEvents:"none",fill:u};return C.createElement(Ae,{className:"recharts-brush-texts"},C.createElement(To,rs({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-h,y:o+s/2},g),this.getTextOfTick(a)),C.createElement(To,rs({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+c+h,y:o+s/2},g),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,o=n.children,s=n.x,c=n.y,u=n.width,f=n.height,d=n.alwaysShowText,p=this.state,h=p.startX,g=p.endX,m=p.isTextActive,v=p.isSlideMoving,w=p.isTravellerMoving,S=p.isTravellerFocused;if(!a||!a.length||!F(s)||!F(c)||!F(u)||!F(f)||u<=0||f<=0)return null;var j=ce("recharts-brush",i),_=C.Children.count(o)===1,y=b8("userSelect","none");return C.createElement(Ae,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:y},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(h,g),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(g,"endX"),(m||v||w||S||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,o=n.width,s=n.height,c=n.stroke,u=Math.floor(i+s/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:a,y:i,width:o,height:s,fill:c,stroke:"none"}),C.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return C.isValidElement(n)?i=C.cloneElement(n,a):re(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,o=n.width,s=n.x,c=n.travellerWidth,u=n.updateId,f=n.startIndex,d=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return Jl({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o},i&&i.length?N8({data:i,width:o,x:s,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||s!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([s,s+o-c]);var p=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:s,prevWidth:o,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,o=0,s=i-1;s-o>1;){var c=Math.floor((o+s)/2);n[c]>a?s=c:o=c}return a>=n[s]?s:o}}])}(O.PureComponent);at(zn,"displayName","Brush");at(zn,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var P8=Nd;function C8(e,t){var r;return P8(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var $8=C8,E8=xb,T8=Tr,M8=$8,k8=Qe,D8=Js;function I8(e,t,r){var n=k8(e)?E8:M8;return r&&D8(e,t,r)&&(t=void 0),n(e,T8(t))}var R8=I8;const L8=we(R8);var Yt=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},ev=Fb;function B8(e,t,r){t=="__proto__"&&ev?ev(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var q8=B8,z8=q8,F8=qb,U8=Tr;function V8(e,t){var r={};return t=U8(t),F8(e,function(n,a,i){z8(r,a,t(n,a,i))}),r}var W8=V8;const H8=we(W8);function G8(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var K8=G8,X8=Nd;function Y8(e,t){var r=!0;return X8(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var J8=Y8,Z8=K8,Q8=J8,eU=Tr,tU=Qe,rU=Js;function nU(e,t,r){var n=tU(e)?Z8:Q8;return r&&rU(e,t,r)&&(t=void 0),n(e,eU(t))}var aU=nU;const x0=we(aU);var iU=["x","y"];function xi(e){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(e)}function mu(){return mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mu.apply(this,arguments)}function tv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Pa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tv(Object(r),!0).forEach(function(n){oU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oU(e,t,r){return t=sU(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sU(e){var t=lU(e,"string");return xi(t)=="symbol"?t:t+""}function lU(e,t){if(xi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cU(e,t){if(e==null)return{};var r=uU(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function dU(e,t){var r=e.x,n=e.y,a=cU(e,iU),i="".concat(r),o=parseInt(i,10),s="".concat(n),c=parseInt(s,10),u="".concat(t.height||a.height),f=parseInt(u,10),d="".concat(t.width||a.width),p=parseInt(d,10);return Pa(Pa(Pa(Pa(Pa({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function rv(e){return C.createElement(K6,mu({shapeType:"rectangle",propTransformer:dU,activeClassName:"recharts-active-bar"},e))}var fU=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=F(n)||PP(n);return i?t(n,a):(i||Qr(),r)}},pU=["value","background"],w0;function Fn(e){"@babel/helpers - typeof";return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function hU(e,t){if(e==null)return{};var r=mU(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function as(){return as=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},as.apply(this,arguments)}function nv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nv(Object(r),!0).forEach(function(n){Nr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function av(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S0(n.key),n)}}function gU(e,t,r){return t&&av(e.prototype,t),r&&av(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function yU(e,t,r){return t=is(t),bU(e,j0()?Reflect.construct(t,r||[],is(e).constructor):t.apply(e,r))}function bU(e,t){if(t&&(Fn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xU(e)}function xU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(j0=function(){return!!e})()}function is(e){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},is(e)}function wU(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vu(e,t)}function vu(e,t){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vu(e,t)}function Nr(e,t,r){return t=S0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S0(e){var t=jU(e,"string");return Fn(t)=="symbol"?t:t+""}function jU(e,t){if(Fn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Fn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fi=function(e){function t(){var r;vU(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=yU(this,t,[].concat(a)),Nr(r,"state",{isAnimationFinished:!1}),Nr(r,"id",Ii("recharts-bar-")),Nr(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),o&&o()}),Nr(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),o&&o()}),r}return wU(t,e),gU(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,o=i.shape,s=i.dataKey,c=i.activeIndex,u=i.activeBar,f=ie(this.props,!1);return n&&n.map(function(d,p){var h=p===c,g=h?u:o,m=$e($e($e({},f),d),{},{isActive:h,option:g,index:p,dataKey:s,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return C.createElement(Ae,as({className:"recharts-bar-rectangle"},yo(a.props,d,p),{key:"rectangle-".concat(d?.x,"-").concat(d?.y,"-").concat(d?.value,"-").concat(p)}),C.createElement(rv,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,o=a.layout,s=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,d=a.animationId,p=this.state.prevData;return C.createElement(pr,{begin:c,duration:u,isActive:s,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var g=h.t,m=i.map(function(v,w){var S=p&&p[w];if(S){var j=vt(S.x,v.x),_=vt(S.y,v.y),y=vt(S.width,v.width),b=vt(S.height,v.height);return $e($e({},v),{},{x:j(g),y:_(g),width:y(g),height:b(g)})}if(o==="horizontal"){var x=vt(0,v.height),A=x(g);return $e($e({},v),{},{y:v.y+v.height-A,height:A})}var N=vt(0,v.width),E=N(g);return $e($e({},v),{},{width:E})});return C.createElement(Ae,null,n.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!ti(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,o=a.dataKey,s=a.activeIndex,c=ie(this.props.background,!1);return i.map(function(u,f){u.value;var d=u.background,p=hU(u,pU);if(!d)return null;var h=$e($e($e($e($e({},p),{},{fill:"#eee"},d),c),yo(n.props,u,f)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return C.createElement(rv,as({key:"background-bar-".concat(f),option:n.props.background,isActive:f===s},h))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,s=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=Et(f,sl);if(!d)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,h=function(v,w){var S=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:S,errorVal:st(v,w)}},g={clipPath:n?"url(#clipPath-".concat(a,")"):null};return C.createElement(Ae,g,d.map(function(m){return C.cloneElement(m,{key:"error-bar-".concat(a,"-").concat(m.props.dataKey),data:o,xAxis:s,yAxis:c,layout:u,offset:p,dataPointFormatter:h})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,o=n.className,s=n.xAxis,c=n.yAxis,u=n.left,f=n.top,d=n.width,p=n.height,h=n.isAnimationActive,g=n.background,m=n.id;if(a||!i||!i.length)return null;var v=this.state.isAnimationFinished,w=ce("recharts-bar",o),S=s&&s.allowDataOverflow,j=c&&c.allowDataOverflow,_=S||j,y=oe(m)?this.id:m;return C.createElement(Ae,{className:w},S||j?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(y)},C.createElement("rect",{x:S?u:u-d/2,y:j?f:f-p/2,width:S?d:d*2,height:j?p:p*2}))):null,C.createElement(Ae,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(y,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,y),(!h||v)&&Cr.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(O.PureComponent);w0=Fi;Nr(Fi,"displayName","Bar");Nr(Fi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!lr.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Nr(Fi,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=ZB(n,r);if(!h)return null;var g=t.layout,m=r.type.defaultProps,v=m!==void 0?$e($e({},m),r.props):r.props,w=v.dataKey,S=v.children,j=v.minPointSize,_=g==="horizontal"?o:i,y=u?_.scale.domain():null,b=oq({numericAxis:_}),x=Et(S,Xb),A=d.map(function(N,E){var P,$,T,k,M,I;u?P=QB(u[f+E],y):(P=st(N,w),Array.isArray(P)||(P=[b,P]));var R=fU(j,w0.defaultProps.minPointSize)(P[1],E);if(g==="horizontal"){var z,q=[o.scale(P[0]),o.scale(P[1])],K=q[0],X=q[1];$=nm({axis:i,ticks:s,bandSize:a,offset:h.offset,entry:N,index:E}),T=(z=X??K)!==null&&z!==void 0?z:void 0,k=h.size;var L=K-X;if(M=Number.isNaN(L)?0:L,I={x:$,y:o.y,width:k,height:o.height},Math.abs(R)>0&&Math.abs(M)<Math.abs(R)){var V=Ct(M||R)*(Math.abs(R)-Math.abs(M));T-=V,M+=V}}else{var se=[i.scale(P[0]),i.scale(P[1])],he=se[0],ge=se[1];if($=he,T=nm({axis:o,ticks:c,bandSize:a,offset:h.offset,entry:N,index:E}),k=ge-he,M=h.size,I={x:i.x,y:T,width:i.width,height:M},Math.abs(R)>0&&Math.abs(k)<Math.abs(R)){var lt=Ct(k||R)*(Math.abs(R)-Math.abs(k));k+=lt}}return $e($e($e({},N),{},{x:$,y:T,width:k,height:M,value:u?P:P[1],payload:N,background:I},x&&x[E]&&x[E].props),{},{tooltipPayload:[t0(r,N)],tooltipPosition:{x:$+k/2,y:T+M/2}})});return $e({data:A,layout:g},p)});function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}function SU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O0(n.key),n)}}function OU(e,t,r){return t&&iv(e.prototype,t),r&&iv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ov(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ov(Object(r),!0).forEach(function(n){ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ov(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ul(e,t,r){return t=O0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O0(e){var t=_U(e,"string");return wi(t)=="symbol"?t:t+""}function _U(e,t){if(wi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AU=function(t,r,n,a,i){var o=t.width,s=t.height,c=t.layout,u=t.children,f=Object.keys(r),d={left:n.left,leftMirror:n.left,right:o-n.right,rightMirror:o-n.right,top:n.top,topMirror:n.top,bottom:s-n.bottom,bottomMirror:s-n.bottom},p=!!it(u,Fi);return f.reduce(function(h,g){var m=r[g],v=m.orientation,w=m.domain,S=m.padding,j=S===void 0?{}:S,_=m.mirror,y=m.reversed,b="".concat(v).concat(_?"Mirror":""),x,A,N,E,P;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var $=w[1]-w[0],T=1/0,k=m.categoricalDomain.sort(EP);if(k.forEach(function(se,he){he>0&&(T=Math.min((se||0)-(k[he-1]||0),T))}),Number.isFinite(T)){var M=T/$,I=m.layout==="vertical"?n.height:n.width;if(m.padding==="gap"&&(x=M*I/2),m.padding==="no-gap"){var R=Jr(t.barCategoryGap,M*I),z=M*I/2;x=z-R-(z-R)/I*R}}}a==="xAxis"?A=[n.left+(j.left||0)+(x||0),n.left+n.width-(j.right||0)-(x||0)]:a==="yAxis"?A=c==="horizontal"?[n.top+n.height-(j.bottom||0),n.top+(j.top||0)]:[n.top+(j.top||0)+(x||0),n.top+n.height-(j.bottom||0)-(x||0)]:A=m.range,y&&(A=[A[1],A[0]]);var q=YB(m,i,p),K=q.scale,X=q.realScaleType;K.domain(w).range(A),JB(K);var L=iq(K,Nt(Nt({},m),{},{realScaleType:X}));a==="xAxis"?(P=v==="top"&&!_||v==="bottom"&&_,N=n.left,E=d[b]-P*m.height):a==="yAxis"&&(P=v==="left"&&!_||v==="right"&&_,N=d[b]-P*m.width,E=n.top);var V=Nt(Nt(Nt({},m),L),{},{realScaleType:X,x:N,y:E,scale:K,width:a==="xAxis"?n.width:m.width,height:a==="yAxis"?n.height:m.height});return V.bandSize=Ho(V,L),!m.hide&&a==="xAxis"?d[b]+=(P?-1:1)*V.height:m.hide||(d[b]+=(P?-1:1)*V.width),Nt(Nt({},h),{},ul({},g,V))},{})},_0=function(t,r){var n=t.x,a=t.y,i=r.x,o=r.y;return{x:Math.min(n,i),y:Math.min(a,o),width:Math.abs(i-n),height:Math.abs(o-a)}},NU=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return _0({x:r,y:n},{x:a,y:i})},A0=function(){function e(t){SU(this,e),this.scale=t}return OU(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(r)+s}default:return this.scale(r)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+c}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();ul(A0,"EPS",1e-4);var nf=function(t){var r=Object.keys(t).reduce(function(n,a){return Nt(Nt({},n),{},ul({},a,A0.create(t[a])))},{});return Nt(Nt({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,s=i.position;return H8(a,function(c,u){return r[u].apply(c,{bandAware:o,position:s})})},isInRange:function(a){return x0(a,function(i,o){return r[o].isInRange(i)})}})};function PU(e){return(e%180+180)%180}var CU=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=PU(a),o=i*Math.PI/180,s=Math.atan(n/r),c=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(c)},$U=Tr,EU=Ri,TU=Xs;function MU(e){return function(t,r,n){var a=Object(t);if(!EU(t)){var i=$U(r);t=TU(t),r=function(s){return i(a[s],s,a)}}var o=e(t,r,n);return o>-1?a[i?t[o]:o]:void 0}}var kU=MU,DU=v0;function IU(e){var t=DU(e),r=t%1;return t===t?r?t-r:t:0}var RU=IU,LU=kb,BU=Tr,qU=RU,zU=Math.max;function FU(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:qU(r);return a<0&&(a=zU(n+a,0)),LU(e,BU(t),a)}var UU=FU,VU=kU,WU=UU,HU=VU(WU),GU=HU;const KU=we(GU);var XU=TN(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),af=O.createContext(void 0),of=O.createContext(void 0),N0=O.createContext(void 0),P0=O.createContext({}),C0=O.createContext(void 0),$0=O.createContext(0),E0=O.createContext(0),sv=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,o=t.clipPathId,s=t.children,c=t.width,u=t.height,f=XU(i);return C.createElement(af.Provider,{value:n},C.createElement(of.Provider,{value:a},C.createElement(P0.Provider,{value:i},C.createElement(N0.Provider,{value:f},C.createElement(C0.Provider,{value:o},C.createElement($0.Provider,{value:u},C.createElement(E0.Provider,{value:c},s)))))))},YU=function(){return O.useContext(C0)},T0=function(t){var r=O.useContext(af);r==null&&Qr();var n=r[t];return n==null&&Qr(),n},JU=function(){var t=O.useContext(af);return _r(t)},ZU=function(){var t=O.useContext(of),r=KU(t,function(n){return x0(n.domain,Number.isFinite)});return r||_r(t)},M0=function(t){var r=O.useContext(of);r==null&&Qr();var n=r[t];return n==null&&Qr(),n},QU=function(){var t=O.useContext(N0);return t},e7=function(){return O.useContext(P0)},sf=function(){return O.useContext(E0)},lf=function(){return O.useContext($0)};function Un(e){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Un(e)}function t7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,D0(n.key),n)}}function n7(e,t,r){return t&&r7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a7(e,t,r){return t=os(t),i7(e,k0()?Reflect.construct(t,r||[],os(e).constructor):t.apply(e,r))}function i7(e,t){if(t&&(Un(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o7(e)}function o7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k0=function(){return!!e})()}function os(e){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},os(e)}function s7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gu(e,t)}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},gu(e,t)}function lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function cv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lv(Object(r),!0).forEach(function(n){cf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cf(e,t,r){return t=D0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D0(e){var t=l7(e,"string");return Un(t)=="symbol"?t:t+""}function l7(e,t){if(Un(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function c7(e,t){return p7(e)||f7(e,t)||d7(e,t)||u7()}function u7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
286In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d7(e,t){if(e){if(typeof e=="string")return uv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uv(e,t)}}function uv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f7(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function p7(e){if(Array.isArray(e))return e}function yu(){return yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yu.apply(this,arguments)}var h7=function(t,r){var n;return C.isValidElement(t)?n=C.cloneElement(t,r):re(t)?n=t(r):n=C.createElement("line",yu({},r,{className:"recharts-reference-line-line"})),n},m7=function(t,r,n,a,i,o,s,c,u){var f=i.x,d=i.y,p=i.width,h=i.height;if(n){var g=u.y,m=t.y.apply(g,{position:o});if(Yt(u,"discard")&&!t.y.isInRange(m))return null;var v=[{x:f+p,y:m},{x:f,y:m}];return c==="left"?v.reverse():v}if(r){var w=u.x,S=t.x.apply(w,{position:o});if(Yt(u,"discard")&&!t.x.isInRange(S))return null;var j=[{x:S,y:d+h},{x:S,y:d}];return s==="top"?j.reverse():j}if(a){var _=u.segment,y=_.map(function(b){return t.apply(b,{position:o})});return Yt(u,"discard")&&L8(y,function(b){return!t.isInRange(b)})?null:y}return null};function v7(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,s=e.className,c=e.alwaysShow,u=YU(),f=T0(a),d=M0(i),p=QU();if(!u||!p)return null;sr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=nf({x:f.scale,y:d.scale}),g=Ie(t),m=Ie(r),v=n&&n.length===2,w=m7(h,g,m,v,p,e.position,f.orientation,d.orientation,e);if(!w)return null;var S=c7(w,2),j=S[0],_=j.x,y=j.y,b=S[1],x=b.x,A=b.y,N=Yt(e,"hidden")?"url(#".concat(u,")"):void 0,E=cv(cv({clipPath:N},ie(e,!0)),{},{x1:_,y1:y,x2:x,y2:A});return C.createElement(Ae,{className:ce("recharts-reference-line",s)},h7(o,E),Ke.renderCallByParent(e,NU({x1:_,y1:y,x2:x,y2:A})))}var uf=function(e){function t(){return t7(this,t),a7(this,t,arguments)}return s7(t,e),n7(t,[{key:"render",value:function(){return C.createElement(v7,this.props)}}])}(C.Component);cf(uf,"displayName","ReferenceLine");cf(uf,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bu.apply(this,arguments)}function Vn(e){"@babel/helpers - typeof";return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vn(e)}function dv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dv(Object(r),!0).forEach(function(n){dl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function g7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R0(n.key),n)}}function b7(e,t,r){return t&&y7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function x7(e,t,r){return t=ss(t),w7(e,I0()?Reflect.construct(t,r||[],ss(e).constructor):t.apply(e,r))}function w7(e,t){if(t&&(Vn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j7(e)}function j7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I0=function(){return!!e})()}function ss(e){return ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ss(e)}function S7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)}function xu(e,t){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},xu(e,t)}function dl(e,t,r){return t=R0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R0(e){var t=O7(e,"string");return Vn(t)=="symbol"?t:t+""}function O7(e,t){if(Vn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Vn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _7=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,o=nf({x:a.scale,y:i.scale}),s=o.apply({x:r,y:n},{bandAware:!0});return Yt(t,"discard")&&!o.isInRange(s)?null:s},fl=function(e){function t(){return g7(this,t),x7(this,t,arguments)}return S7(t,e),b7(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,o=n.r,s=n.alwaysShow,c=n.clipPathId,u=Ie(a),f=Ie(i);if(sr(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=_7(this.props);if(!d)return null;var p=d.x,h=d.y,g=this.props,m=g.shape,v=g.className,w=Yt(this.props,"hidden")?"url(#".concat(c,")"):void 0,S=fv(fv({clipPath:w},ie(this.props,!0)),{},{cx:p,cy:h});return C.createElement(Ae,{className:ce("recharts-reference-dot",v)},t.renderDot(m,S),Ke.renderCallByParent(this.props,{x:p-o,y:h-o,width:2*o,height:2*o}))}}])}(C.Component);dl(fl,"displayName","ReferenceDot");dl(fl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});dl(fl,"renderDot",function(e,t){var r;return C.isValidElement(e)?r=C.cloneElement(e,t):re(e)?r=e(t):r=C.createElement(rf,bu({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wu.apply(this,arguments)}function Wn(e){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(e)}function pv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pv(Object(r),!0).forEach(function(n){pl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function A7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N7(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,B0(n.key),n)}}function P7(e,t,r){return t&&N7(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function C7(e,t,r){return t=ls(t),$7(e,L0()?Reflect.construct(t,r||[],ls(e).constructor):t.apply(e,r))}function $7(e,t){if(t&&(Wn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return E7(e)}function E7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(L0=function(){return!!e})()}function ls(e){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ls(e)}function T7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ju(e,t)}function ju(e,t){return ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},ju(e,t)}function pl(e,t,r){return t=B0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B0(e){var t=M7(e,"string");return Wn(t)=="symbol"?t:t+""}function M7(e,t){if(Wn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Wn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k7=function(t,r,n,a,i){var o=i.x1,s=i.x2,c=i.y1,u=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var p=nf({x:f.scale,y:d.scale}),h={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:n?p.y.apply(c,{position:"start"}):p.y.rangeMin},g={x:r?p.x.apply(s,{position:"end"}):p.x.rangeMax,y:a?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Yt(i,"discard")&&(!p.isInRange(h)||!p.isInRange(g))?null:_0(h,g)},hl=function(e){function t(){return A7(this,t),C7(this,t,arguments)}return T7(t,e),P7(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,o=n.y1,s=n.y2,c=n.className,u=n.alwaysShow,f=n.clipPathId;sr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Ie(a),p=Ie(i),h=Ie(o),g=Ie(s),m=this.props.shape;if(!d&&!p&&!h&&!g&&!m)return null;var v=k7(d,p,h,g,this.props);if(!v&&!m)return null;var w=Yt(this.props,"hidden")?"url(#".concat(f,")"):void 0;return C.createElement(Ae,{className:ce("recharts-reference-area",c)},t.renderRect(m,hv(hv({clipPath:w},ie(this.props,!0)),v)),Ke.renderCallByParent(this.props,v))}}])}(C.Component);pl(hl,"displayName","ReferenceArea");pl(hl,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});pl(hl,"renderRect",function(e,t){var r;return C.isValidElement(e)?r=C.cloneElement(e,t):re(e)?r=e(t):r=C.createElement(tf,wu({},t,{className:"recharts-reference-area-rect"})),r});function q0(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function D7(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return CU(n,r)}function I7(e,t,r){var n=r==="width",a=e.x,i=e.y,o=e.width,s=e.height;return t===1?{start:n?a:i,end:n?a+o:i+s}:{start:n?a+o:i+s,end:n?a:i}}function cs(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function R7(e,t){return q0(e,t+1)}function L7(e,t,r,n,a){for(var i=(n||[]).slice(),o=t.start,s=t.end,c=0,u=1,f=o,d=function(){var g=n?.[c];if(g===void 0)return{v:q0(n,u)};var m=c,v,w=function(){return v===void 0&&(v=r(g,m)),v},S=g.coordinate,j=c===0||cs(e,S,w,f,s);j||(c=0,f=o,u+=1),j&&(f=S+e*(w()/2+a),c+=u)},p;u<=i.length;)if(p=d(),p)return p.v;return[]}function ji(e){"@babel/helpers - typeof";return ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ji(e)}function mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mv(Object(r),!0).forEach(function(n){B7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B7(e,t,r){return t=q7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q7(e){var t=z7(e,"string");return ji(t)=="symbol"?t:t+""}function z7(e,t){if(ji(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ji(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F7(e,t,r,n,a){for(var i=(n||[]).slice(),o=i.length,s=t.start,c=t.end,u=function(p){var h=i[p],g,m=function(){return g===void 0&&(g=r(h,p)),g};if(p===o-1){var v=e*(h.coordinate+e*m()/2-c);i[p]=h=Ge(Ge({},h),{},{tickCoord:v>0?h.coordinate-v*e:h.coordinate})}else i[p]=h=Ge(Ge({},h),{},{tickCoord:h.coordinate});var w=cs(e,h.tickCoord,m,s,c);w&&(c=h.tickCoord-e*(m()/2+a),i[p]=Ge(Ge({},h),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return i}function U7(e,t,r,n,a,i){var o=(n||[]).slice(),s=o.length,c=t.start,u=t.end;if(i){var f=n[s-1],d=r(f,s-1),p=e*(f.coordinate+e*d/2-u);o[s-1]=f=Ge(Ge({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var h=cs(e,f.tickCoord,function(){return d},c,u);h&&(u=f.tickCoord-e*(d/2+a),o[s-1]=Ge(Ge({},f),{},{isShow:!0}))}for(var g=i?s-1:s,m=function(S){var j=o[S],_,y=function(){return _===void 0&&(_=r(j,S)),_};if(S===0){var b=e*(j.coordinate-e*y()/2-c);o[S]=j=Ge(Ge({},j),{},{tickCoord:b<0?j.coordinate-b*e:j.coordinate})}else o[S]=j=Ge(Ge({},j),{},{tickCoord:j.coordinate});var x=cs(e,j.tickCoord,y,c,u);x&&(c=j.tickCoord+e*(y()/2+a),o[S]=Ge(Ge({},j),{},{isShow:!0}))},v=0;v<g;v++)m(v);return o}function df(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!n)return[];if(F(c)||lr.isSsr)return R7(a,typeof c=="number"&&F(c)?c:0);var p=[],h=s==="top"||s==="bottom"?"width":"height",g=f&&h==="width"?Da(f,{fontSize:t,letterSpacing:r}):{width:0,height:0},m=function(j,_){var y=re(u)?u(j.value,_):j.value;return h==="width"?D7(Da(y,{fontSize:t,letterSpacing:r}),g,d):Da(y,{fontSize:t,letterSpacing:r})[h]},v=a.length>=2?Ct(a[1].coordinate-a[0].coordinate):1,w=I7(i,v,h);return c==="equidistantPreserveStart"?L7(v,w,m,a,o):(c==="preserveStart"||c==="preserveStartEnd"?p=U7(v,w,m,a,o,c==="preserveStartEnd"):p=F7(v,w,m,a,o),p.filter(function(S){return S.isShow}))}var V7=["viewBox"],W7=["viewBox"],H7=["ticks"];function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function bn(){return bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bn.apply(this,arguments)}function vv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vv(Object(r),!0).forEach(function(n){ff(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zl(e,t){if(e==null)return{};var r=G7(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function G7(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function K7(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,F0(n.key),n)}}function X7(e,t,r){return t&&gv(e.prototype,t),r&&gv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y7(e,t,r){return t=us(t),J7(e,z0()?Reflect.construct(t,r||[],us(e).constructor):t.apply(e,r))}function J7(e,t){if(t&&(Hn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z7(e)}function Z7(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z0=function(){return!!e})()}function us(e){return us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},us(e)}function Q7(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Su(e,t)}function Su(e,t){return Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Su(e,t)}function ff(e,t,r){return t=F0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F0(e){var t=eV(e,"string");return Hn(t)=="symbol"?t:t+""}function eV(e,t){if(Hn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Hn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pa=function(e){function t(r){var n;return K7(this,t),n=Y7(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return Q7(t,e),X7(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,o=Zl(n,V7),s=this.props,c=s.viewBox,u=Zl(s,W7);return!_n(i,c)||!_n(o,u)||!_n(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,o=a.y,s=a.width,c=a.height,u=a.orientation,f=a.tickSize,d=a.mirror,p=a.tickMargin,h,g,m,v,w,S,j=d?-1:1,_=n.tickSize||f,y=F(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":h=g=n.coordinate,v=o+ +!d*c,m=v-j*_,S=m-j*p,w=y;break;case"left":m=v=n.coordinate,g=i+ +!d*s,h=g-j*_,w=h-j*p,S=y;break;case"right":m=v=n.coordinate,g=i+ +d*s,h=g+j*_,w=h+j*p,S=y;break;default:h=g=n.coordinate,v=o+ +d*c,m=v+j*_,S=m+j*p,w=y;break}return{line:{x1:h,y1:m,x2:g,y2:v},tick:{x:w,y:S}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,o=n.width,s=n.height,c=n.orientation,u=n.mirror,f=n.axisLine,d=Te(Te(Te({},ie(this.props,!1)),ie(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);d=Te(Te({},d),{},{x1:a,y1:i+p*s,x2:a+o,y2:i+p*s})}else{var h=+(c==="left"&&!u||c==="right"&&u);d=Te(Te({},d),{},{x1:a+h*o,y1:i,x2:a+h*o,y2:i+s})}return C.createElement("line",bn({},d,{className:ce("recharts-cartesian-axis-line",yt(f,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var o=this,s=this.props,c=s.tickLine,u=s.stroke,f=s.tick,d=s.tickFormatter,p=s.unit,h=df(Te(Te({},this.props),{},{ticks:n}),a,i),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),v=ie(this.props,!1),w=ie(f,!1),S=Te(Te({},v),{},{fill:"none"},ie(c,!1)),j=h.map(function(_,y){var b=o.getTickLineCoord(_),x=b.line,A=b.tick,N=Te(Te(Te(Te({textAnchor:g,verticalAnchor:m},v),{},{stroke:"none",fill:u},w),A),{},{index:y,payload:_,visibleTicksCount:h.length,tickFormatter:d});return C.createElement(Ae,bn({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},yo(o.props,_,y)),c&&C.createElement("line",bn({},S,x,{className:ce("recharts-cartesian-axis-tick-line",yt(c,"className"))})),f&&t.renderTickItem(f,N,"".concat(re(d)?d(_.value,y):_.value).concat(p||"")))});return C.createElement("g",{className:"recharts-cartesian-axis-ticks"},j)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,o=a.width,s=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var d=this.props,p=d.ticks,h=Zl(d,H7),g=p;return re(c)&&(g=p&&p.length>0?c(this.props):c(h)),o<=0||s<=0||!g||!g.length?null:C.createElement(Ae,{className:ce("recharts-cartesian-axis",u),ref:function(v){n.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Ke.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var o,s=ce(a.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(n)?o=C.cloneElement(n,Te(Te({},a),{},{className:s})):re(n)?o=n(Te(Te({},a),{},{className:s})):o=C.createElement(To,bn({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])}(O.Component);ff(pa,"displayName","CartesianAxis");ff(pa,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var tV=["x1","y1","x2","y2","key"],rV=["offset"];function en(e){"@babel/helpers - typeof";return en=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},en(e)}function yv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yv(Object(r),!0).forEach(function(n){nV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nV(e,t,r){return t=aV(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aV(e){var t=iV(e,"string");return en(t)=="symbol"?t:t+""}function iV(e,t){if(en(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(en(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wr.apply(this,arguments)}function bv(e,t){if(e==null)return{};var r=oV(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var sV=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,o=t.width,s=t.height,c=t.ry;return C.createElement("rect",{x:a,y:i,ry:c,width:o,height:s,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function U0(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(re(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,o=t.y2,s=t.key,c=bv(t,tV),u=ie(c,!1);u.offset;var f=bv(u,rV);r=C.createElement("line",Wr({},f,{x1:n,y1:a,x2:i,y2:o,fill:"none",key:s}))}return r}function lV(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,c){var u=Xe(Xe({},e),{},{x1:t,y1:s,x2:t+r,y2:s,key:"line-".concat(c),index:c});return U0(a,u)});return C.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function cV(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(s,c){var u=Xe(Xe({},e),{},{x1:s,y1:t,x2:s,y2:t+r,key:"line-".concat(c),index:c});return U0(a,u)});return C.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function uV(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+a-a)}).sort(function(p,h){return p-h});a!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var g=!f[h+1],m=g?a+o-p:f[h+1]-p;if(m<=0)return null;var v=h%t.length;return C.createElement("rect",{key:"react-".concat(h),y:p,x:n,height:m,width:i,stroke:"none",fill:t[v],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function dV(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,s=e.width,c=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var f=u.map(function(p){return Math.round(p+i-i)}).sort(function(p,h){return p-h});i!==f[0]&&f.unshift(0);var d=f.map(function(p,h){var g=!f[h+1],m=g?i+s-p:f[h+1]-p;if(m<=0)return null;var v=h%n.length;return C.createElement("rect",{key:"react-".concat(h),x:p,y:o,width:m,height:c,stroke:"none",fill:n[v],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return C.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var fV=function(t,r){var n=t.xAxis,a=t.width,i=t.height,o=t.offset;return Qx(df(Xe(Xe(Xe({},pa.defaultProps),n),{},{ticks:ir(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,r)},pV=function(t,r){var n=t.yAxis,a=t.width,i=t.height,o=t.offset;return Qx(df(Xe(Xe(Xe({},pa.defaultProps),n),{},{ticks:ir(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,r)},hn={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function V0(e){var t,r,n,a,i,o,s=sf(),c=lf(),u=e7(),f=Xe(Xe({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:hn.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:hn.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:hn.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:hn.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:hn.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:hn.verticalFill,x:F(e.x)?e.x:u.left,y:F(e.y)?e.y:u.top,width:F(e.width)?e.width:u.width,height:F(e.height)?e.height:u.height}),d=f.x,p=f.y,h=f.width,g=f.height,m=f.syncWithTicks,v=f.horizontalValues,w=f.verticalValues,S=JU(),j=ZU();if(!F(h)||h<=0||!F(g)||g<=0||!F(d)||d!==+d||!F(p)||p!==+p)return null;var _=f.verticalCoordinatesGenerator||fV,y=f.horizontalCoordinatesGenerator||pV,b=f.horizontalPoints,x=f.verticalPoints;if((!b||!b.length)&&re(y)){var A=v&&v.length,N=y({yAxis:j?Xe(Xe({},j),{},{ticks:A?v:j.ticks}):void 0,width:s,height:c,offset:u},A?!0:m);sr(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(en(N),"]")),Array.isArray(N)&&(b=N)}if((!x||!x.length)&&re(_)){var E=w&&w.length,P=_({xAxis:S?Xe(Xe({},S),{},{ticks:E?w:S.ticks}):void 0,width:s,height:c,offset:u},E?!0:m);sr(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(en(P),"]")),Array.isArray(P)&&(x=P)}return C.createElement("g",{className:"recharts-cartesian-grid"},C.createElement(sV,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),C.createElement(lV,Wr({},f,{offset:u,horizontalPoints:b,xAxis:S,yAxis:j})),C.createElement(cV,Wr({},f,{offset:u,verticalPoints:x,xAxis:S,yAxis:j})),C.createElement(uV,Wr({},f,{horizontalPoints:b})),C.createElement(dV,Wr({},f,{verticalPoints:x})))}V0.displayName="CartesianGrid";var hV=["layout","type","stroke","connectNulls","isRange","ref"],mV=["key"],W0;function Gn(e){"@babel/helpers - typeof";return Gn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gn(e)}function H0(e,t){if(e==null)return{};var r=vV(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vV(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function xv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xv(Object(r),!0).forEach(function(n){Kt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,K0(n.key),n)}}function yV(e,t,r){return t&&wv(e.prototype,t),r&&wv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function bV(e,t,r){return t=ds(t),xV(e,G0()?Reflect.construct(t,r||[],ds(e).constructor):t.apply(e,r))}function xV(e,t){if(t&&(Gn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wV(e)}function wV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(G0=function(){return!!e})()}function ds(e){return ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ds(e)}function jV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ou(e,t)}function Ou(e,t){return Ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ou(e,t)}function Kt(e,t,r){return t=K0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K0(e){var t=SV(e,"string");return Gn(t)=="symbol"?t:t+""}function SV(e,t){if(Gn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Gn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ir=function(e){function t(){var r;gV(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=bV(this,t,[].concat(a)),Kt(r,"state",{isAnimationFinished:!0}),Kt(r,"id",Ii("recharts-area-")),Kt(r,"handleAnimationEnd",function(){var o=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),re(o)&&o()}),Kt(r,"handleAnimationStart",function(){var o=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),re(o)&&o()}),r}return jV(t,e),yV(t,[{key:"renderDots",value:function(n,a,i){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var c=this.props,u=c.dot,f=c.points,d=c.dataKey,p=ie(this.props,!1),h=ie(u,!0),g=f.map(function(v,w){var S=jr(jr(jr({key:"dot-".concat(w),r:3},p),h),{},{index:w,cx:v.x,cy:v.y,dataKey:d,value:v.value,payload:v.payload,points:f});return t.renderDotItem(u,S)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return C.createElement(Ae,Hr({className:"recharts-area-dots"},m),g)}},{key:"renderHorizontalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,c=o[0].x,u=o[o.length-1].x,f=n*Math.abs(c-u),d=Ar(o.map(function(p){return p.y||0}));return F(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Ar(i.map(function(p){return p.y||0})),d)),F(d)?C.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(n){var a=this.props,i=a.baseLine,o=a.points,s=a.strokeWidth,c=o[0].y,u=o[o.length-1].y,f=n*Math.abs(c-u),d=Ar(o.map(function(p){return p.x||0}));return F(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(Ar(i.map(function(p){return p.x||0})),d)),F(d)?C.createElement("rect",{x:0,y:c<u?c:c-f,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(n){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(n):this.renderHorizontalRect(n)}},{key:"renderAreaStatically",value:function(n,a,i,o){var s=this.props,c=s.layout,u=s.type,f=s.stroke,d=s.connectNulls,p=s.isRange;s.ref;var h=H0(s,hV);return C.createElement(Ae,{clipPath:i?"url(#clipPath-".concat(o,")"):null},C.createElement(La,Hr({},ie(h,!0),{points:n,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&C.createElement(La,Hr({},ie(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:n})),f!=="none"&&p&&C.createElement(La,Hr({},ie(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(n,a){var i=this,o=this.props,s=o.points,c=o.baseLine,u=o.isAnimationActive,f=o.animationBegin,d=o.animationDuration,p=o.animationEasing,h=o.animationId,g=this.state,m=g.prevPoints,v=g.prevBaseLine;return C.createElement(pr,{begin:f,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"area-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(w){var S=w.t;if(m){var j=m.length/s.length,_=s.map(function(A,N){var E=Math.floor(N*j);if(m[E]){var P=m[E],$=vt(P.x,A.x),T=vt(P.y,A.y);return jr(jr({},A),{},{x:$(S),y:T(S)})}return A}),y;if(F(c)&&typeof c=="number"){var b=vt(v,c);y=b(S)}else if(oe(c)||oa(c)){var x=vt(v,0);y=x(S)}else y=c.map(function(A,N){var E=Math.floor(N*j);if(v[E]){var P=v[E],$=vt(P.x,A.x),T=vt(P.y,A.y);return jr(jr({},A),{},{x:$(S),y:T(S)})}return A});return i.renderAreaStatically(_,y,n,a)}return C.createElement(Ae,null,C.createElement("defs",null,C.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(S))),C.createElement(Ae,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(s,c,n,a)))})}},{key:"renderArea",value:function(n,a){var i=this.props,o=i.points,s=i.baseLine,c=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,p=u.totalLength;return c&&o&&o.length&&(!f&&p>0||!ti(f,o)||!ti(d,s))?this.renderAreaWithAnimation(n,a):this.renderAreaStatically(o,s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,o=a.dot,s=a.points,c=a.className,u=a.top,f=a.left,d=a.xAxis,p=a.yAxis,h=a.width,g=a.height,m=a.isAnimationActive,v=a.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,S=s.length===1,j=ce("recharts-area",c),_=d&&d.allowDataOverflow,y=p&&p.allowDataOverflow,b=_||y,x=oe(v)?this.id:v,A=(n=ie(o,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},N=A.r,E=N===void 0?3:N,P=A.strokeWidth,$=P===void 0?2:P,T=qP(o)?o:{},k=T.clipDot,M=k===void 0?!0:k,I=E*2+$;return C.createElement(Ae,{className:j},_||y?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(x)},C.createElement("rect",{x:_?f:f-h/2,y:y?u:u-g/2,width:_?h:h*2,height:y?g:g*2})),!M&&C.createElement("clipPath",{id:"clipPath-dots-".concat(x)},C.createElement("rect",{x:f-I/2,y:u-I/2,width:h+I,height:g+I}))):null,S?null:this.renderArea(b,x),(o||S)&&this.renderDots(b,M,x),(!m||w)&&Cr.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,curBaseLine:n.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:n.points!==a.curPoints||n.baseLine!==a.curBaseLine?{curPoints:n.points,curBaseLine:n.baseLine}:null}}])}(O.PureComponent);W0=Ir;Kt(Ir,"displayName","Area");Kt(Ir,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!lr.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Kt(Ir,"getBaseValue",function(e,t,r,n){var a=e.layout,i=e.baseValue,o=t.props.baseValue,s=o??i;if(F(s)&&typeof s=="number")return s;var c=a==="horizontal"?n:r,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Kt(Ir,"getComposedData",function(e){var t=e.props,r=e.item,n=e.xAxis,a=e.yAxis,i=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=t.layout,g=u&&u.length,m=W0.getBaseValue(t,r,n,a),v=h==="horizontal",w=!1,S=d.map(function(_,y){var b;g?b=u[f+y]:(b=st(_,c),Array.isArray(b)?w=!0:b=[m,b]);var x=b[1]==null||g&&st(_,c)==null;return v?{x:rm({axis:n,ticks:i,bandSize:s,entry:_,index:y}),y:x?null:a.scale(b[1]),value:b,payload:_}:{x:x?null:n.scale(b[1]),y:rm({axis:a,ticks:o,bandSize:s,entry:_,index:y}),value:b,payload:_}}),j;return g||w?j=S.map(function(_){var y=Array.isArray(_.value)?_.value[0]:null;return v?{x:_.x,y:y!=null&&_.y!=null?a.scale(y):null}:{x:y!=null?n.scale(y):null,y:_.y}}):j=v?a.scale(m):n.scale(m),jr({points:S,baseLine:j,layout:h,isRange:w},p)});Kt(Ir,"renderDotItem",function(e,t){var r;if(C.isValidElement(e))r=C.cloneElement(e,t);else if(re(e))r=e(t);else{var n=ce("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=H0(t,mV);r=C.createElement(rf,Hr({},i,{key:a,className:n}))}return r});function Kn(e){"@babel/helpers - typeof";return Kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(e)}function OV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _V(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,J0(n.key),n)}}function AV(e,t,r){return t&&_V(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NV(e,t,r){return t=fs(t),PV(e,X0()?Reflect.construct(t,r||[],fs(e).constructor):t.apply(e,r))}function PV(e,t){if(t&&(Kn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CV(e)}function CV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X0=function(){return!!e})()}function fs(e){return fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fs(e)}function $V(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_u(e,t)}function _u(e,t){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_u(e,t)}function Y0(e,t,r){return t=J0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J0(e){var t=EV(e,"string");return Kn(t)=="symbol"?t:t+""}function EV(e,t){if(Kn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Kn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Au(){return Au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Au.apply(this,arguments)}function TV(e){var t=e.xAxisId,r=sf(),n=lf(),a=T0(t);return a==null?null:O.createElement(pa,Au({},a,{className:ce("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(o){return ir(o,!0)}}))}var ml=function(e){function t(){return OV(this,t),NV(this,t,arguments)}return $V(t,e),AV(t,[{key:"render",value:function(){return O.createElement(TV,this.props)}}])}(O.Component);Y0(ml,"displayName","XAxis");Y0(ml,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function MV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kV(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,e1(n.key),n)}}function DV(e,t,r){return t&&kV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function IV(e,t,r){return t=ps(t),RV(e,Z0()?Reflect.construct(t,r||[],ps(e).constructor):t.apply(e,r))}function RV(e,t){if(t&&(Xn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LV(e)}function LV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z0=function(){return!!e})()}function ps(e){return ps=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ps(e)}function BV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nu(e,t)}function Nu(e,t){return Nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Nu(e,t)}function Q0(e,t,r){return t=e1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function e1(e){var t=qV(e,"string");return Xn(t)=="symbol"?t:t+""}function qV(e,t){if(Xn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pu(){return Pu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pu.apply(this,arguments)}var zV=function(t){var r=t.yAxisId,n=sf(),a=lf(),i=M0(r);return i==null?null:O.createElement(pa,Pu({},i,{className:ce("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(s){return ir(s,!0)}}))},vl=function(e){function t(){return MV(this,t),IV(this,t,arguments)}return BV(t,e),DV(t,[{key:"render",value:function(){return O.createElement(zV,this.props)}}])}(O.Component);Q0(vl,"displayName","YAxis");Q0(vl,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function jv(e){return WV(e)||VV(e)||UV(e)||FV()}function FV(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
287In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UV(e,t){if(e){if(typeof e=="string")return Cu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cu(e,t)}}function VV(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WV(e){if(Array.isArray(e))return Cu(e)}function Cu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $u=function(t,r,n,a,i){var o=Et(t,uf),s=Et(t,fl),c=[].concat(jv(o),jv(s)),u=Et(t,hl),f="".concat(a,"Id"),d=a[0],p=r;if(c.length&&(p=c.reduce(function(m,v){if(v.props[f]===n&&Yt(v.props,"extendDomain")&&F(v.props[d])){var w=v.props[d];return[Math.min(m[0],w),Math.max(m[1],w)]}return m},p)),u.length){var h="".concat(d,"1"),g="".concat(d,"2");p=u.reduce(function(m,v){if(v.props[f]===n&&Yt(v.props,"extendDomain")&&F(v.props[h])&&F(v.props[g])){var w=v.props[h],S=v.props[g];return[Math.min(m[0],w,S),Math.max(m[1],w,S)]}return m},p)}return i&&i.length&&(p=i.reduce(function(m,v){return F(v)?[Math.min(m[0],v),Math.max(m[1],v)]:m},p)),p},t1={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function i(c,u,f,d,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new a(f,d||c,p),g=r?r+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},s.prototype.listeners=function(u){var f=r?r+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,h=d.length,g=new Array(h);p<h;p++)g[p]=d[p].fn;return g},s.prototype.listenerCount=function(u){var f=r?r+u:u,d=this._events[f];return d?d.fn?1:d.length:0},s.prototype.emit=function(u,f,d,p,h,g){var m=r?r+u:u;if(!this._events[m])return!1;var v=this._events[m],w=arguments.length,S,j;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),w){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,f),!0;case 3:return v.fn.call(v.context,f,d),!0;case 4:return v.fn.call(v.context,f,d,p),!0;case 5:return v.fn.call(v.context,f,d,p,h),!0;case 6:return v.fn.call(v.context,f,d,p,h,g),!0}for(j=1,S=new Array(w-1);j<w;j++)S[j-1]=arguments[j];v.fn.apply(v.context,S)}else{var _=v.length,y;for(j=0;j<_;j++)switch(v[j].once&&this.removeListener(u,v[j].fn,void 0,!0),w){case 1:v[j].fn.call(v[j].context);break;case 2:v[j].fn.call(v[j].context,f);break;case 3:v[j].fn.call(v[j].context,f,d);break;case 4:v[j].fn.call(v[j].context,f,d,p);break;default:if(!S)for(y=1,S=new Array(w-1);y<w;y++)S[y-1]=arguments[y];v[j].fn.apply(v[j].context,S)}}return!0},s.prototype.on=function(u,f,d){return i(this,u,f,d,!1)},s.prototype.once=function(u,f,d){return i(this,u,f,d,!0)},s.prototype.removeListener=function(u,f,d,p){var h=r?r+u:u;if(!this._events[h])return this;if(!f)return o(this,h),this;var g=this._events[h];if(g.fn)g.fn===f&&(!p||g.once)&&(!d||g.context===d)&&o(this,h);else{for(var m=0,v=[],w=g.length;m<w;m++)(g[m].fn!==f||p&&!g[m].once||d&&g[m].context!==d)&&v.push(g[m]);v.length?this._events[h]=v.length===1?v[0]:v:o(this,h)}return this},s.prototype.removeAllListeners=function(u){var f;return u?(f=r?r+u:u,this._events[f]&&o(this,f)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(t1);var HV=t1.exports;const GV=we(HV);var Ql=new GV,ec="recharts.syncMouseEvents";function Si(e){"@babel/helpers - typeof";return Si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Si(e)}function KV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XV(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r1(n.key),n)}}function YV(e,t,r){return t&&XV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tc(e,t,r){return t=r1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r1(e){var t=JV(e,"string");return Si(t)=="symbol"?t:t+""}function JV(e,t){if(Si(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Si(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZV=function(){function e(){KV(this,e),tc(this,"activeIndex",0),tc(this,"coordinateList",[]),tc(this,"layout","horizontal")}return YV(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,o=r.container,s=o===void 0?null:o,c=r.layout,u=c===void 0?null:c,f=r.offset,d=f===void 0?null:f,p=r.mouseHandlerCallback,h=p===void 0?null:p;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=s??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=h??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(r){if(this.coordinateList.length!==0)switch(r.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,s=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,f=((n=window)===null||n===void 0?void 0:n.scrollY)||0,d=i+c+u,p=o+this.offset.top+s/2+f;this.mouseHandlerCallback({pageX:d,pageY:p})}}}])}();function QV(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e?.[0],a=e?.[1];if(n&&a&&F(n)&&F(a))return!0}return!1}function eW(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function n1(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,o=Ve(t,r,n,a),s=Ve(t,r,n,i);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function tW(e,t,r){var n,a,i,o;if(e==="horizontal")n=t.x,i=n,a=r.top,o=r.top+r.height;else if(e==="vertical")a=t.y,o=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,p=Ve(s,c,u,d),h=Ve(s,c,f,d);n=p.x,a=p.y,i=h.x,o=h.y}else return n1(t);return[{x:n,y:a},{x:i,y:o}]}function Oi(e){"@babel/helpers - typeof";return Oi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oi(e)}function Sv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function io(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sv(Object(r),!0).forEach(function(n){rW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rW(e,t,r){return t=nW(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nW(e){var t=aW(e,"string");return Oi(t)=="symbol"?t:t+""}function aW(e,t){if(Oi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Oi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iW(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,s=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,h=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!h||!i||!o||p!=="ScatterChart"&&a!=="axis")return null;var g,m=La;if(p==="ScatterChart")g=o,m=l6;else if(p==="BarChart")g=eW(d,o,c,f),m=tf;else if(d==="radial"){var v=n1(o),w=v.cx,S=v.cy,j=v.radius,_=v.startAngle,y=v.endAngle;g={cx:w,cy:S,startAngle:_,endAngle:y,innerRadius:j,outerRadius:j},m=a0}else g={points:tW(d,o,c)},m=La;var b=io(io(io(io({stroke:"#ccc",pointerEvents:"none"},c),g),ie(h,!1)),{},{payload:s,payloadIndex:u,className:ce("recharts-tooltip-cursor",h.className)});return O.isValidElement(h)?O.cloneElement(h,b):O.createElement(m,b)}var oW=["item"],sW=["children","className","width","height","style","compact","title","desc"];function Yn(e){"@babel/helpers - typeof";return Yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yn(e)}function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xn.apply(this,arguments)}function Ov(e,t){return uW(e)||cW(e,t)||i1(e,t)||lW()}function lW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
288In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cW(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function uW(e){if(Array.isArray(e))return e}function _v(e,t){if(e==null)return{};var r=dW(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dW(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pW(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o1(n.key),n)}}function hW(e,t,r){return t&&pW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mW(e,t,r){return t=hs(t),vW(e,a1()?Reflect.construct(t,r||[],hs(e).constructor):t.apply(e,r))}function vW(e,t){if(t&&(Yn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gW(e)}function gW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a1(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a1=function(){return!!e})()}function hs(e){return hs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hs(e)}function yW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eu(e,t)}function Eu(e,t){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Eu(e,t)}function Jn(e){return wW(e)||xW(e)||i1(e)||bW()}function bW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
289In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i1(e,t){if(e){if(typeof e=="string")return Tu(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tu(e,t)}}function xW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wW(e){if(Array.isArray(e))return Tu(e)}function Tu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Av(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Av(Object(r),!0).forEach(function(n){J(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Av(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J(e,t,r){return t=o1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o1(e){var t=jW(e,"string");return Yn(t)=="symbol"?t:t+""}function jW(e,t){if(Yn(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Yn(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SW={xAxis:["bottom","top"],yAxis:["left","right"]},OW={width:"100%",height:"100%"},s1={x:0,y:0};function oo(e){return e}var _W=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},AW=function(t,r,n,a){var i=r.find(function(f){return f&&f.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,s=a.radius;return D(D(D({},a),Ve(a.cx,a.cy,s,o)),{},{angle:o,radius:s})}var c=i.coordinate,u=a.angle;return D(D(D({},a),Ve(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return s1},gl=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,o=(n??[]).reduce(function(s,c){var u=c.props.data;return u&&u.length?[].concat(Jn(s),Jn(u)):s},[]);return o.length>0?o:t&&t.length&&F(a)&&F(i)?t.slice(a,i+1):[]};function l1(e){return e==="number"?[0,"auto"]:void 0}var Mu=function(t,r,n,a){var i=t.graphicalItems,o=t.tooltipAxis,s=gl(r,t);return n<0||!i||!i.length||n>=s.length?null:i.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:r;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var h=d===void 0?s:d;p=vo(h,o.dataKey,a)}else p=d&&d[n]||s[n];return p?[].concat(Jn(c),[t0(u,p)]):c},[])},Nv=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},o=_W(i,n),s=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=VB(o,s,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,p=Mu(t,r,f,d),h=AW(n,s,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:h}}return null},NW=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,h=Zx(f,i);return n.reduce(function(g,m){var v,w=m.type.defaultProps!==void 0?D(D({},m.type.defaultProps),m.props):m.props,S=w.type,j=w.dataKey,_=w.allowDataOverflow,y=w.allowDuplicatedCategory,b=w.scale,x=w.ticks,A=w.includeHidden,N=w[o];if(g[N])return g;var E=gl(t.data,{graphicalItems:a.filter(function(L){var V,se=o in L.props?L.props[o]:(V=L.type.defaultProps)===null||V===void 0?void 0:V[o];return se===N}),dataStartIndex:c,dataEndIndex:u}),P=E.length,$,T,k;QV(w.domain,_,S)&&($=Zc(w.domain,null,_),h&&(S==="number"||b!=="auto")&&(k=Ra(E,j,"category")));var M=l1(S);if(!$||$.length===0){var I,R=(I=w.domain)!==null&&I!==void 0?I:M;if(j){if($=Ra(E,j,S),S==="category"&&h){var z=$P($);y&&z?(T=$,$=ts(0,P)):y||($=om(R,$,m).reduce(function(L,V){return L.indexOf(V)>=0?L:[].concat(Jn(L),[V])},[]))}else if(S==="category")y?$=$.filter(function(L){return L!==""&&!oe(L)}):$=om(R,$,m).reduce(function(L,V){return L.indexOf(V)>=0||V===""||oe(V)?L:[].concat(Jn(L),[V])},[]);else if(S==="number"){var q=XB(E,a.filter(function(L){var V,se,he=o in L.props?L.props[o]:(V=L.type.defaultProps)===null||V===void 0?void 0:V[o],ge="hide"in L.props?L.props.hide:(se=L.type.defaultProps)===null||se===void 0?void 0:se.hide;return he===N&&(A||!ge)}),j,i,f);q&&($=q)}h&&(S==="number"||b!=="auto")&&(k=Ra(E,j,"category"))}else h?$=ts(0,P):s&&s[N]&&s[N].hasStack&&S==="number"?$=p==="expand"?[0,1]:e0(s[N].stackGroups,c,u):$=Jx(E,a.filter(function(L){var V=o in L.props?L.props[o]:L.type.defaultProps[o],se="hide"in L.props?L.props.hide:L.type.defaultProps.hide;return V===N&&(A||!se)}),S,f,!0);if(S==="number")$=$u(d,$,N,i,x),R&&($=Zc(R,$,_));else if(S==="category"&&R){var K=R,X=$.every(function(L){return K.indexOf(L)>=0});X&&($=K)}}return D(D({},g),{},J({},N,D(D({},w),{},{axisType:i,domain:$,categoricalDomain:k,duplicateDomain:T,originalDomain:(v=w.domain)!==null&&v!==void 0?v:M,isCategorical:h,layout:f})))},{})},PW=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,o=r.axisIdKey,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.layout,d=t.children,p=gl(t.data,{graphicalItems:n,dataStartIndex:c,dataEndIndex:u}),h=p.length,g=Zx(f,i),m=-1;return n.reduce(function(v,w){var S=w.type.defaultProps!==void 0?D(D({},w.type.defaultProps),w.props):w.props,j=S[o],_=l1("number");if(!v[j]){m++;var y;return g?y=ts(0,h):s&&s[j]&&s[j].hasStack?(y=e0(s[j].stackGroups,c,u),y=$u(d,y,j,i)):(y=Zc(_,Jx(p,n.filter(function(b){var x,A,N=o in b.props?b.props[o]:(x=b.type.defaultProps)===null||x===void 0?void 0:x[o],E="hide"in b.props?b.props.hide:(A=b.type.defaultProps)===null||A===void 0?void 0:A.hide;return N===j&&!E}),"number",f),a.defaultProps.allowDataOverflow),y=$u(d,y,j,i)),D(D({},v),{},J({},j,D(D({axisType:i},a.defaultProps),{},{hide:!0,orientation:yt(SW,"".concat(i,".").concat(m%2),null),domain:y,originalDomain:_,isCategorical:g,layout:f})))}return v},{})},CW=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,o=r.graphicalItems,s=r.stackGroups,c=r.dataStartIndex,u=r.dataEndIndex,f=t.children,d="".concat(a,"Id"),p=Et(f,i),h={};return p&&p.length?h=NW(t,{axes:p,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(h=PW(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:u})),h},$W=function(t){var r=_r(t),n=ir(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Pd(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:Ho(r,n)}},Pv=function(t){var r=t.children,n=t.defaultShowTooltip,a=it(r,zn),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!n}},EW=function(t){return!t||!t.length?!1:t.some(function(r){var n=or(r&&r.type);return n&&n.indexOf("Bar")>=0})},Cv=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},TW=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,s=t.yAxisMap,c=s===void 0?{}:s,u=n.width,f=n.height,d=n.children,p=n.margin||{},h=it(d,zn),g=it(d,An),m=Object.keys(c).reduce(function(y,b){var x=c[b],A=x.orientation;return!x.mirror&&!x.hide?D(D({},y),{},J({},A,y[A]+x.width)):y},{left:p.left||0,right:p.right||0}),v=Object.keys(o).reduce(function(y,b){var x=o[b],A=x.orientation;return!x.mirror&&!x.hide?D(D({},y),{},J({},A,yt(y,"".concat(A))+x.height)):y},{top:p.top||0,bottom:p.bottom||0}),w=D(D({},v),m),S=w.bottom;h&&(w.bottom+=h.props.height||zn.defaultProps.height),g&&r&&(w=GB(w,a,n,r));var j=u-w.left-w.right,_=f-w.top-w.bottom;return D(D({brushBottom:S},w),{},{width:Math.max(j,0),height:Math.max(_,0)})},MW=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},kW=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(w,S){var j=S.graphicalItems,_=S.stackGroups,y=S.offset,b=S.updateId,x=S.dataStartIndex,A=S.dataEndIndex,N=w.barSize,E=w.layout,P=w.barGap,$=w.barCategoryGap,T=w.maxBarSize,k=Cv(E),M=k.numericAxisName,I=k.cateAxisName,R=EW(j),z=[];return j.forEach(function(q,K){var X=gl(w.data,{graphicalItems:[q],dataStartIndex:x,dataEndIndex:A}),L=q.type.defaultProps!==void 0?D(D({},q.type.defaultProps),q.props):q.props,V=L.dataKey,se=L.maxBarSize,he=L["".concat(M,"Id")],ge=L["".concat(I,"Id")],lt={},_e=c.reduce(function(ct,ut){var ln=S["".concat(ut.axisType,"Map")],ha=L["".concat(ut.axisType,"Id")];ln&&ln[ha]||ut.axisType==="zAxis"||Qr();var Ui=ln[ha];return D(D({},ct),{},J(J({},ut.axisType,Ui),"".concat(ut.axisType,"Ticks"),ir(Ui)))},lt),U=_e[I],H=_e["".concat(I,"Ticks")],ee=_&&_[he]&&_[he].hasStack&&sq(q,_[he].stackGroups),B=or(q.type).indexOf("Bar")>=0,fe=Ho(U,H),te=[],ye=R&&WB({barSize:N,stackGroups:_,totalSize:MW(_e,I)});if(B){var be,ze,_t=oe(se)?T:se,Ut=(be=(ze=Ho(U,H,!0))!==null&&ze!==void 0?ze:_t)!==null&&be!==void 0?be:0;te=HB({barGap:P,barCategoryGap:$,bandSize:Ut!==fe?Ut:fe,sizeList:ye[ge],maxBarSize:_t}),Ut!==fe&&(te=te.map(function(ct){return D(D({},ct),{},{position:D(D({},ct.position),{},{offset:ct.position.offset-Ut/2})})}))}var et=q&&q.type&&q.type.getComposedData;et&&z.push({props:D(D({},et(D(D({},_e),{},{displayedData:X,props:w,dataKey:V,item:q,bandSize:fe,barPosition:te,offset:y,stackedData:ee,layout:E,dataStartIndex:x,dataEndIndex:A}))),{},J(J(J({key:q.key||"item-".concat(K)},M,_e[M]),I,_e[I]),"animationId",b)),childIndex:UP(q,w.children),item:q})}),z},h=function(w,S){var j=w.props,_=w.dataStartIndex,y=w.dataEndIndex,b=w.updateId;if(!Qf({props:j}))return null;var x=j.children,A=j.layout,N=j.stackOffset,E=j.data,P=j.reverseStackOrder,$=Cv(A),T=$.numericAxisName,k=$.cateAxisName,M=Et(x,n),I=aq(E,M,"".concat(T,"Id"),"".concat(k,"Id"),N,P),R=c.reduce(function(L,V){var se="".concat(V.axisType,"Map");return D(D({},L),{},J({},se,CW(j,D(D({},V),{},{graphicalItems:M,stackGroups:V.axisType===T&&I,dataStartIndex:_,dataEndIndex:y}))))},{}),z=TW(D(D({},R),{},{props:j,graphicalItems:M}),S?.legendBBox);Object.keys(R).forEach(function(L){R[L]=f(j,R[L],z,L.replace("Map",""),r)});var q=R["".concat(k,"Map")],K=$W(q),X=p(j,D(D({},R),{},{dataStartIndex:_,dataEndIndex:y,updateId:b,graphicalItems:M,stackGroups:I,offset:z}));return D(D({formattedGraphicalItems:X,graphicalItems:M,offset:z,stackGroups:I},K),R)},g=function(v){function w(S){var j,_,y;return fW(this,w),y=mW(this,w,[S]),J(y,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),J(y,"accessibilityManager",new ZV),J(y,"handleLegendBBoxUpdate",function(b){if(b){var x=y.state,A=x.dataStartIndex,N=x.dataEndIndex,E=x.updateId;y.setState(D({legendBBox:b},h({props:y.props,dataStartIndex:A,dataEndIndex:N,updateId:E},D(D({},y.state),{},{legendBBox:b}))))}}),J(y,"handleReceiveSyncEvent",function(b,x,A){if(y.props.syncId===b){if(A===y.eventEmitterSymbol&&typeof y.props.syncMethod!="function")return;y.applySyncEvent(x)}}),J(y,"handleBrushChange",function(b){var x=b.startIndex,A=b.endIndex;if(x!==y.state.dataStartIndex||A!==y.state.dataEndIndex){var N=y.state.updateId;y.setState(function(){return D({dataStartIndex:x,dataEndIndex:A},h({props:y.props,dataStartIndex:x,dataEndIndex:A,updateId:N},y.state))}),y.triggerSyncEvent({dataStartIndex:x,dataEndIndex:A})}}),J(y,"handleMouseEnter",function(b){var x=y.getMouseInfo(b);if(x){var A=D(D({},x),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var N=y.props.onMouseEnter;re(N)&&N(A,b)}}),J(y,"triggeredAfterMouseMove",function(b){var x=y.getMouseInfo(b),A=x?D(D({},x),{},{isTooltipActive:!0}):{isTooltipActive:!1};y.setState(A),y.triggerSyncEvent(A);var N=y.props.onMouseMove;re(N)&&N(A,b)}),J(y,"handleItemMouseEnter",function(b){y.setState(function(){return{isTooltipActive:!0,activeItem:b,activePayload:b.tooltipPayload,activeCoordinate:b.tooltipPosition||{x:b.cx,y:b.cy}}})}),J(y,"handleItemMouseLeave",function(){y.setState(function(){return{isTooltipActive:!1}})}),J(y,"handleMouseMove",function(b){b.persist(),y.throttleTriggeredAfterMouseMove(b)}),J(y,"handleMouseLeave",function(b){y.throttleTriggeredAfterMouseMove.cancel();var x={isTooltipActive:!1};y.setState(x),y.triggerSyncEvent(x);var A=y.props.onMouseLeave;re(A)&&A(x,b)}),J(y,"handleOuterEvent",function(b){var x=FP(b),A=yt(y.props,"".concat(x));if(x&&re(A)){var N,E;/.*touch.*/i.test(x)?E=y.getMouseInfo(b.changedTouches[0]):E=y.getMouseInfo(b),A((N=E)!==null&&N!==void 0?N:{},b)}}),J(y,"handleClick",function(b){var x=y.getMouseInfo(b);if(x){var A=D(D({},x),{},{isTooltipActive:!0});y.setState(A),y.triggerSyncEvent(A);var N=y.props.onClick;re(N)&&N(A,b)}}),J(y,"handleMouseDown",function(b){var x=y.props.onMouseDown;if(re(x)){var A=y.getMouseInfo(b);x(A,b)}}),J(y,"handleMouseUp",function(b){var x=y.props.onMouseUp;if(re(x)){var A=y.getMouseInfo(b);x(A,b)}}),J(y,"handleTouchMove",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.throttleTriggeredAfterMouseMove(b.changedTouches[0])}),J(y,"handleTouchStart",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.handleMouseDown(b.changedTouches[0])}),J(y,"handleTouchEnd",function(b){b.changedTouches!=null&&b.changedTouches.length>0&&y.handleMouseUp(b.changedTouches[0])}),J(y,"handleDoubleClick",function(b){var x=y.props.onDoubleClick;if(re(x)){var A=y.getMouseInfo(b);x(A,b)}}),J(y,"handleContextMenu",function(b){var x=y.props.onContextMenu;if(re(x)){var A=y.getMouseInfo(b);x(A,b)}}),J(y,"triggerSyncEvent",function(b){y.props.syncId!==void 0&&Ql.emit(ec,y.props.syncId,b,y.eventEmitterSymbol)}),J(y,"applySyncEvent",function(b){var x=y.props,A=x.layout,N=x.syncMethod,E=y.state.updateId,P=b.dataStartIndex,$=b.dataEndIndex;if(b.dataStartIndex!==void 0||b.dataEndIndex!==void 0)y.setState(D({dataStartIndex:P,dataEndIndex:$},h({props:y.props,dataStartIndex:P,dataEndIndex:$,updateId:E},y.state)));else if(b.activeTooltipIndex!==void 0){var T=b.chartX,k=b.chartY,M=b.activeTooltipIndex,I=y.state,R=I.offset,z=I.tooltipTicks;if(!R)return;if(typeof N=="function")M=N(z,b);else if(N==="value"){M=-1;for(var q=0;q<z.length;q++)if(z[q].value===b.activeLabel){M=q;break}}var K=D(D({},R),{},{x:R.left,y:R.top}),X=Math.min(T,K.x+K.width),L=Math.min(k,K.y+K.height),V=z[M]&&z[M].value,se=Mu(y.state,y.props.data,M),he=z[M]?{x:A==="horizontal"?z[M].coordinate:X,y:A==="horizontal"?L:z[M].coordinate}:s1;y.setState(D(D({},b),{},{activeLabel:V,activeCoordinate:he,activePayload:se,activeTooltipIndex:M}))}else y.setState(b)}),J(y,"renderCursor",function(b){var x,A=y.state,N=A.isTooltipActive,E=A.activeCoordinate,P=A.activePayload,$=A.offset,T=A.activeTooltipIndex,k=A.tooltipAxisBandSize,M=y.getTooltipEventType(),I=(x=b.props.active)!==null&&x!==void 0?x:N,R=y.props.layout,z=b.key||"_recharts-cursor";return C.createElement(iW,{key:z,activeCoordinate:E,activePayload:P,activeTooltipIndex:T,chartName:r,element:b,isActive:I,layout:R,offset:$,tooltipAxisBandSize:k,tooltipEventType:M})}),J(y,"renderPolarAxis",function(b,x,A){var N=yt(b,"type.axisType"),E=yt(y.state,"".concat(N,"Map")),P=b.type.defaultProps,$=P!==void 0?D(D({},P),b.props):b.props,T=E&&E[$["".concat(N,"Id")]];return O.cloneElement(b,D(D({},T),{},{className:ce(N,T.className),key:b.key||"".concat(x,"-").concat(A),ticks:ir(T,!0)}))}),J(y,"renderPolarGrid",function(b){var x=b.props,A=x.radialLines,N=x.polarAngles,E=x.polarRadius,P=y.state,$=P.radiusAxisMap,T=P.angleAxisMap,k=_r($),M=_r(T),I=M.cx,R=M.cy,z=M.innerRadius,q=M.outerRadius;return O.cloneElement(b,{polarAngles:Array.isArray(N)?N:ir(M,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(E)?E:ir(k,!0).map(function(K){return K.coordinate}),cx:I,cy:R,innerRadius:z,outerRadius:q,key:b.key||"polar-grid",radialLines:A})}),J(y,"renderLegend",function(){var b=y.state.formattedGraphicalItems,x=y.props,A=x.children,N=x.width,E=x.height,P=y.props.margin||{},$=N-(P.left||0)-(P.right||0),T=Xx({children:A,formattedGraphicalItems:b,legendWidth:$,legendContent:u});if(!T)return null;var k=T.item,M=_v(T,oW);return O.cloneElement(k,D(D({},M),{},{chartWidth:N,chartHeight:E,margin:P,onBBoxUpdate:y.handleLegendBBoxUpdate}))}),J(y,"renderTooltip",function(){var b,x=y.props,A=x.children,N=x.accessibilityLayer,E=it(A,Ht);if(!E)return null;var P=y.state,$=P.isTooltipActive,T=P.activeCoordinate,k=P.activePayload,M=P.activeLabel,I=P.offset,R=(b=E.props.active)!==null&&b!==void 0?b:$;return O.cloneElement(E,{viewBox:D(D({},I),{},{x:I.left,y:I.top}),active:R,label:M,payload:R?k:[],coordinate:T,accessibilityLayer:N})}),J(y,"renderBrush",function(b){var x=y.props,A=x.margin,N=x.data,E=y.state,P=E.offset,$=E.dataStartIndex,T=E.dataEndIndex,k=E.updateId;return O.cloneElement(b,{key:b.key||"_recharts-brush",onChange:to(y.handleBrushChange,b.props.onChange),data:N,x:F(b.props.x)?b.props.x:P.left,y:F(b.props.y)?b.props.y:P.top+P.height+P.brushBottom-(A.bottom||0),width:F(b.props.width)?b.props.width:P.width,startIndex:$,endIndex:T,updateId:"brush-".concat(k)})}),J(y,"renderReferenceElement",function(b,x,A){if(!b)return null;var N=y,E=N.clipPathId,P=y.state,$=P.xAxisMap,T=P.yAxisMap,k=P.offset,M=b.type.defaultProps||{},I=b.props,R=I.xAxisId,z=R===void 0?M.xAxisId:R,q=I.yAxisId,K=q===void 0?M.yAxisId:q;return O.cloneElement(b,{key:b.key||"".concat(x,"-").concat(A),xAxis:$[z],yAxis:T[K],viewBox:{x:k.left,y:k.top,width:k.width,height:k.height},clipPathId:E})}),J(y,"renderActivePoints",function(b){var x=b.item,A=b.activePoint,N=b.basePoint,E=b.childIndex,P=b.isRange,$=[],T=x.props.key,k=x.item.type.defaultProps!==void 0?D(D({},x.item.type.defaultProps),x.item.props):x.item.props,M=k.activeDot,I=k.dataKey,R=D(D({index:E,dataKey:I,cx:A.x,cy:A.y,r:4,fill:ef(x.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},ie(M,!1)),go(M));return $.push(w.renderActiveDot(M,R,"".concat(T,"-activePoint-").concat(E))),N?$.push(w.renderActiveDot(M,D(D({},R),{},{cx:N.x,cy:N.y}),"".concat(T,"-basePoint-").concat(E))):P&&$.push(null),$}),J(y,"renderGraphicChild",function(b,x,A){var N=y.filterFormatItem(b,x,A);if(!N)return null;var E=y.getTooltipEventType(),P=y.state,$=P.isTooltipActive,T=P.tooltipAxis,k=P.activeTooltipIndex,M=P.activeLabel,I=y.props.children,R=it(I,Ht),z=N.props,q=z.points,K=z.isRange,X=z.baseLine,L=N.item.type.defaultProps!==void 0?D(D({},N.item.type.defaultProps),N.item.props):N.item.props,V=L.activeDot,se=L.hide,he=L.activeBar,ge=L.activeShape,lt=!!(!se&&$&&R&&(V||he||ge)),_e={};E!=="axis"&&R&&R.props.trigger==="click"?_e={onClick:to(y.handleItemMouseEnter,b.props.onClick)}:E!=="axis"&&(_e={onMouseLeave:to(y.handleItemMouseLeave,b.props.onMouseLeave),onMouseEnter:to(y.handleItemMouseEnter,b.props.onMouseEnter)});var U=O.cloneElement(b,D(D({},N.props),_e));function H(ut){return typeof T.dataKey=="function"?T.dataKey(ut.payload):null}if(lt)if(k>=0){var ee,B;if(T.dataKey&&!T.allowDuplicatedCategory){var fe=typeof T.dataKey=="function"?H:"payload.".concat(T.dataKey.toString());ee=vo(q,fe,M),B=K&&X&&vo(X,fe,M)}else ee=q?.[k],B=K&&X&&X[k];if(ge||he){var te=b.props.activeIndex!==void 0?b.props.activeIndex:k;return[O.cloneElement(b,D(D(D({},N.props),_e),{},{activeIndex:te})),null,null]}if(!oe(ee))return[U].concat(Jn(y.renderActivePoints({item:N,activePoint:ee,basePoint:B,childIndex:k,isRange:K})))}else{var ye,be=(ye=y.getItemByXY(y.state.activeCoordinate))!==null&&ye!==void 0?ye:{graphicalItem:U},ze=be.graphicalItem,_t=ze.item,Ut=_t===void 0?b:_t,et=ze.childIndex,ct=D(D(D({},N.props),_e),{},{activeIndex:et});return[O.cloneElement(Ut,ct),null,null]}return K?[U,null,null]:[U,null]}),J(y,"renderCustomized",function(b,x,A){return O.cloneElement(b,D(D({key:"recharts-customized-".concat(A)},y.props),y.state))}),J(y,"renderMap",{CartesianGrid:{handler:oo,once:!0},ReferenceArea:{handler:y.renderReferenceElement},ReferenceLine:{handler:oo},ReferenceDot:{handler:y.renderReferenceElement},XAxis:{handler:oo},YAxis:{handler:oo},Brush:{handler:y.renderBrush,once:!0},Bar:{handler:y.renderGraphicChild},Line:{handler:y.renderGraphicChild},Area:{handler:y.renderGraphicChild},Radar:{handler:y.renderGraphicChild},RadialBar:{handler:y.renderGraphicChild},Scatter:{handler:y.renderGraphicChild},Pie:{handler:y.renderGraphicChild},Funnel:{handler:y.renderGraphicChild},Tooltip:{handler:y.renderCursor,once:!0},PolarGrid:{handler:y.renderPolarGrid,once:!0},PolarAngleAxis:{handler:y.renderPolarAxis},PolarRadiusAxis:{handler:y.renderPolarAxis},Customized:{handler:y.renderCustomized}}),y.clipPathId="".concat((j=S.id)!==null&&j!==void 0?j:Ii("recharts"),"-clip"),y.throttleTriggeredAfterMouseMove=Kb(y.triggeredAfterMouseMove,(_=S.throttleDelay)!==null&&_!==void 0?_:1e3/60),y.state={},y}return yW(w,v),hW(w,[{key:"componentDidMount",value:function(){var j,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,_=j.children,y=j.data,b=j.height,x=j.layout,A=it(_,Ht);if(A){var N=A.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var E=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,P=Mu(this.state,y,N,E),$=this.state.tooltipTicks[N].coordinate,T=(this.state.offset.top+b)/2,k=x==="horizontal",M=k?{x:$,y:T}:{y:$,x:T},I=this.state.formattedGraphicalItems.find(function(z){var q=z.item;return q.type.name==="Scatter"});I&&(M=D(D({},M),I.props.points[N].tooltipPosition),P=I.props.points[N].tooltipPayload);var R={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:E,activePayload:P,activeCoordinate:M};this.setState(R),this.renderCursor(A),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var y,b;this.accessibilityManager.setDetails({offset:{left:(y=this.props.margin.left)!==null&&y!==void 0?y:0,top:(b=this.props.margin.top)!==null&&b!==void 0?b:0}})}return null}},{key:"componentDidUpdate",value:function(j){pc([it(j.children,Ht)],[it(this.props.children,Ht)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=it(this.props.children,Ht);if(j&&typeof j.props.shared=="boolean"){var _=j.props.shared?"axis":"item";return s.indexOf(_)>=0?_:i}return i}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var _=this.container,y=_.getBoundingClientRect(),b=v3(y),x={chartX:Math.round(j.pageX-b.left),chartY:Math.round(j.pageY-b.top)},A=y.width/_.offsetWidth||1,N=this.inRange(x.chartX,x.chartY,A);if(!N)return null;var E=this.state,P=E.xAxisMap,$=E.yAxisMap,T=this.getTooltipEventType(),k=Nv(this.state,this.props.data,this.props.layout,N);if(T!=="axis"&&P&&$){var M=_r(P).scale,I=_r($).scale,R=M&&M.invert?M.invert(x.chartX):null,z=I&&I.invert?I.invert(x.chartY):null;return D(D({},x),{},{xValue:R,yValue:z},k)}return k?D(D({},x),k):null}},{key:"inRange",value:function(j,_){var y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,b=this.props.layout,x=j/y,A=_/y;if(b==="horizontal"||b==="vertical"){var N=this.state.offset,E=x>=N.left&&x<=N.left+N.width&&A>=N.top&&A<=N.top+N.height;return E?{x,y:A}:null}var P=this.state,$=P.angleAxisMap,T=P.radiusAxisMap;if($&&T){var k=_r($);return cm({x,y:A},k)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,_=this.getTooltipEventType(),y=it(j,Ht),b={};y&&_==="axis"&&(y.props.trigger==="click"?b={onClick:this.handleClick}:b={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var x=go(this.props,this.handleOuterEvent);return D(D({},x),b)}},{key:"addListener",value:function(){Ql.on(ec,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Ql.removeListener(ec,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,_,y){for(var b=this.state.formattedGraphicalItems,x=0,A=b.length;x<A;x++){var N=b[x];if(N.item===j||N.props.key===j.key||_===or(N.item.type)&&y===N.childIndex)return N}return null}},{key:"renderClipPath",value:function(){var j=this.clipPathId,_=this.state.offset,y=_.left,b=_.top,x=_.height,A=_.width;return C.createElement("defs",null,C.createElement("clipPath",{id:j},C.createElement("rect",{x:y,y:b,height:x,width:A})))}},{key:"getXScales",value:function(){var j=this.state.xAxisMap;return j?Object.entries(j).reduce(function(_,y){var b=Ov(y,2),x=b[0],A=b[1];return D(D({},_),{},J({},x,A.scale))},{}):null}},{key:"getYScales",value:function(){var j=this.state.yAxisMap;return j?Object.entries(j).reduce(function(_,y){var b=Ov(y,2),x=b[0],A=b[1];return D(D({},_),{},J({},x,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(j){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[j])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(j){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[j])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(j){var _=this.state,y=_.formattedGraphicalItems,b=_.activeItem;if(y&&y.length)for(var x=0,A=y.length;x<A;x++){var N=y[x],E=N.props,P=N.item,$=P.type.defaultProps!==void 0?D(D({},P.type.defaultProps),P.props):P.props,T=or(P.type);if(T==="Bar"){var k=(E.data||[]).find(function(z){return ZF(j,z)});if(k)return{graphicalItem:N,payload:k}}else if(T==="RadialBar"){var M=(E.data||[]).find(function(z){return cm(j,z)});if(M)return{graphicalItem:N,payload:M}}else if(ll(N,b)||cl(N,b)||yi(N,b)){var I=t8({graphicalItem:N,activeTooltipItem:b,itemData:$.data}),R=$.activeIndex===void 0?I:$.activeIndex;return{graphicalItem:D(D({},N),{},{childIndex:R}),payload:yi(N,b)?$.data[I]:N.props.data[I]}}}return null}},{key:"render",value:function(){var j=this;if(!Qf(this))return null;var _=this.props,y=_.children,b=_.className,x=_.width,A=_.height,N=_.style,E=_.compact,P=_.title,$=_.desc,T=_v(_,sW),k=ie(T,!1);if(E)return C.createElement(sv,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement(mc,xn({},k,{width:x,height:A,title:P,desc:$}),this.renderClipPath(),tp(y,this.renderMap)));if(this.props.accessibilityLayer){var M,I;k.tabIndex=(M=this.props.tabIndex)!==null&&M!==void 0?M:0,k.role=(I=this.props.role)!==null&&I!==void 0?I:"application",k.onKeyDown=function(z){j.accessibilityManager.keyboardEvent(z)},k.onFocus=function(){j.accessibilityManager.focus()}}var R=this.parseEventsOfWrapper();return C.createElement(sv,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement("div",xn({className:ce("recharts-wrapper",b),style:D({position:"relative",curs
289or:"default",width:x,height:A},N)},R,{ref:function(q){j.container=q}}),C.createElement(mc,xn({},k,{width:x,height:A,title:P,desc:$,style:OW}),this.renderClipPath(),tp(y,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(O.Component);J(g,"displayName",r),J(g,"defaultProps",D({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),J(g,"getDerivedStateFromProps",function(v,w){var S=v.dataKey,j=v.data,_=v.children,y=v.width,b=v.height,x=v.layout,A=v.stackOffset,N=v.margin,E=w.dataStartIndex,P=w.dataEndIndex;if(w.updateId===void 0){var $=Pv(v);return D(D(D({},$),{},{updateId:0},h(D(D({props:v},$),{},{updateId:0}),w)),{},{prevDataKey:S,prevData:j,prevWidth:y,prevHeight:b,prevLayout:x,prevStackOffset:A,prevMargin:N,prevChildren:_})}if(S!==w.prevDataKey||j!==w.prevData||y!==w.prevWidth||b!==w.prevHeight||x!==w.prevLayout||A!==w.prevStackOffset||!_n(N,w.prevMargin)){var T=Pv(v),k={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},M=D(D({},Nv(w,j,x)),{},{updateId:w.updateId+1}),I=D(D(D({},T),k),M);return D(D(D({},I),h(D({props:v},I),w)),{},{prevDataKey:S,prevData:j,prevWidth:y,prevHeight:b,prevLayout:x,prevStackOffset:A,prevMargin:N,prevChildren:_})}if(!pc(_,w.prevChildren)){var R,z,q,K,X=it(_,zn),L=X&&(R=(z=X.props)===null||z===void 0?void 0:z.startIndex)!==null&&R!==void 0?R:E,V=X&&(q=(K=X.props)===null||K===void 0?void 0:K.endIndex)!==null&&q!==void 0?q:P,se=L!==E||V!==P,he=!oe(j),ge=he&&!se?w.updateId:w.updateId+1;return D(D({updateId:ge},h(D(D({props:v},w),{},{updateId:ge,dataStartIndex:L,dataEndIndex:V}),w)),{},{prevChildren:_,dataStartIndex:L,dataEndIndex:V})}return null}),J(g,"renderActiveDot",function(v,w,S){var j;return O.isValidElement(v)?j=O.cloneElement(v,w):re(v)?j=v(w):j=C.createElement(rf,w),C.createElement(Ae,{className:"recharts-active-dot",key:S},j)});var m=O.forwardRef(function(w,S){return C.createElement(g,xn({},w,{ref:S}))});return m.displayName=g.displayName,m},DW=kW({chartName:"AreaChart",GraphicalChild:Ir,axisComponents:[{axisType:"xAxis",AxisComp:ml},{axisType:"yAxis",AxisComp:vl}],formatAxisMap:AU});const rc=[{key:"ca",label:"CA",color:"hsl(210 100% 60%)"},{key:"expenses",label:"Dépenses",color:"hsl(0 80% 65%)"},{key:"benefice",label:"Bénéfice Net",color:"hsl(142 70% 50%)"},{key:"commandes",label:"Commandes",color:"hsl(280 70% 65%)"}],IW=({entries:e,days:t,fixedMonthly:r})=>{const[n,a]=O.useState(["ca","benefice"]),i=d=>a(p=>p.includes(d)?p.filter(h=>h!==d):[...p,d]),o=new Date,s=[];for(let d=t-1;d>=0;d--){const p=new Date(o);p.setDate(p.getDate()-d);const h=p.toISOString().slice(0,10);s.push({date:h,ca:0,commandes:0,expenses:0})}const c=new Map(s.map((d,p)=>[d.date,p]));for(const d of e){const p=c.get(d.entry_date);if(p===void 0)continue;const h=Number(d.amount_ht)||0;d.type==="revenue"?(s[p].ca+=h,s[p].commandes+=1):s[p].expenses+=h}const u=r/30,f=s.map(d=>({...d,benefice:d.ca-d.expenses-u,label:d.date.slice(5)}));return l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl",children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-xs uppercase tracking-widest text-muted-foreground font-medium",children:"Évolution"}),l.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[t," derniers jours · ",t,"j"]})]}),l.jsx("div",{className:"grid grid-cols-2 gap-2 mb-6",children:rc.map(d=>{const p=n.includes(d.key);return l.jsxs("button",{onClick:()=>i(d.key),className:W("flex items-center gap-2 px-4 py-3 rounded-xl border text-sm font-medium transition-all",p?"border-2 bg-card":"border-border/40 bg-card/30 text-muted-foreground hover:bg-card/60"),style:p?{borderColor:d.color}:void 0,children:[l.jsx("span",{className:W("h-2.5 w-2.5 rounded-full",!p&&"ring-1 ring-border bg-transparent"),style:p?{backgroundColor:d.color}:void 0}),d.label]},d.key)})}),l.jsx("div",{className:"h-[300px] w-full",children:l.jsx(c3,{width:"100%",height:"100%",children:l.jsxs(DW,{data:f,margin:{top:10,right:10,left:0,bottom:0},children:[l.jsx("defs",{children:rc.map(d=>l.jsxs("linearGradient",{id:`grad-${d.key}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[l.jsx("stop",{offset:"0%",stopColor:d.color,stopOpacity:.35}),l.jsx("stop",{offset:"100%",stopColor:d.color,stopOpacity:0})]},d.key))}),l.jsx(V0,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",opacity:.3}),l.jsx(ml,{dataKey:"label",stroke:"hsl(var(--muted-foreground))",fontSize:11}),l.jsx(vl,{stroke:"hsl(var(--muted-foreground))",fontSize:11,tickFormatter:d=>`${(d/1e3).toFixed(0)}k€`}),l.jsx(Ht,{contentStyle:{backgroundColor:"hsl(var(--card))",border:"1px solid hsl(var(--border))",borderRadius:8},formatter:d=>
289`${d.toLocaleString("fr-FR")} €`}),rc.filter(d=>n.includes(d.key)).map(d=>l.jsx(Ir,{type:"monotone",dataKey:d.key,stroke:d.color,strokeWidth:2.5,fill:`url(#grad-${d.key})`},d.key))]})})})]})},Tt=B1,Mt=q1,bt=O.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(Yv,{ref:n,className:W("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,l.jsx(k1,{asChild:!0,children:l.jsx(Vu,{className:"h-4 w-4 opacity-50"})})]}));bt.displayName=Yv.displayName;const c1=O.forwardRef(({className:e,...t},r)=>l.jsx(Jv,{ref:r,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(zw,{className:"h-4 w-4"})}));c1.displayName=Jv.displayName;const u1=O.forwardRef(({className:e,...t},r)=>l.jsx(Zv,{ref:r,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Vu,{className:"h-4 w-4"})}));u1.displayName=Zv.displayName;const xt=O.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>l.jsx(D1,{children:l.jsxs(Qv,{ref:a,className:W("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[l.jsx(c1,{}),l.jsx(I1,{className:W("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(u1,{})]})}));xt.displayName=Qv.displayName;const RW=O.forwardRef(({className:e,...t},r)=>l.jsx(eg,{ref:r,className:W("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));RW.displayName=eg.displayName;const ke=O.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(tg,{ref:n,className:W("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(R1,{children:l.jsx(Pi,{className:"h-4 w-4"})})}),l.jsx(L1,{children:t})]}));ke.displayName=tg.displayName;const LW=O.forwardRef(({className:e,...t},r)=>l.jsx(rg,{ref:r,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));LW.displayName=rg.displayName;const BW=[{v:"video_unit",l:"Vidéo seule"},{v:"pack_3",l:"Pack 3 vidéos"},{v:"pack_6",l:"Pack 6 vidéos"},{v:"pack_12",l:"Pack 12 vidéos"},{v:"subscription",l:"Abonnement"},{v:"other_revenue",l:"Autre revenu"}],qW=[{v:"freelance",l:"Freelance / Sous-traitance"},{v:"tools",l:"Outils / SaaS"},{v:"equipment",l:"Matériel"},{v:"travel",l:"Déplacement"},{v:"other_expense",l:"Autre dépense"}],zW=({open:e,onOpenChange:t,entry:r,defaultType:n="revenue"})=>{const a=HO(),[i,o]=O.useState({type:n,category:"video_unit",label:"",amount_ht:"",vat_rate:"20",client_name:"",video_count:"0",entry_date:new Date().toISOString().slice(0,10),notes:""});O.useEffect(()=>{o(r?{type:r.type,category:r.category,label:r.label,amount_ht:String(r.amount_ht),vat_rate:String(r.vat_rate),client_name:r.client_name??"",video_count:String(r.video_count??0),entry_date:r.entry_date,notes:r.notes??""}:u=>({...u,type:n,label:"",amount_ht:"",client_name:"",notes:""}))},[r,n,e]);const s=i.type==="revenue"?BW:qW,c=async()=>{await a.mutateAsync({id:r?.id,type:i.type,category:i.category,label:i.label||s.find(u=>u.v===i.category)?.l||"Entrée",amount_ht:parseFloat(i.amount_ht)||0,vat_rate:parseFloat(i.vat_rate)||0,client_name:i.client_name||null,video_count:parseInt(i.video_count)||0,entry_date:i.entry_date,notes:i.notes||null}),t(!1)};return l.jsx(kt,{open:e,onOpenChange:t,children:l.jsxs(Dt,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[l.jsx(It,{children:l.jsxs(Rt,{children:[r?"Modifier":"Nouvelle"," ",i.type==="revenue"?"vente":"dépense"]})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsx("button",{onClick:()=>o(u=>({...u,type:"revenue",category:"video_unit"})),className:`px-4 py-2 rounded-lg border-2 text-sm font-medium ${i.type==="revenue"?"border-emerald-500 bg-emerald-500/10 text-emerald-400":"border-border/40"}`,children:"Revenu"}),l.jsx("button",{onClick:()=>o(u=>({...u,type:"expense",category:"freelance"})),className:`px-4 py-2 rounded-lg border-2 text-sm font-medium ${i.type==="expense"?"border-red-500 bg-red-500/10 text-red-400":"border-border/40"}`,children:"Dépense"})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Catégorie"}),l.jsxs(Tt,{value:i.category,onValueChange:u=>o({...i,category:u}),children:[l.jsx(bt,{children:l.jsx(Mt,{})}),l.jsx(xt,{children:s.map(u=>l.jsx(ke,{value:u.v,children:u.l},u.v))})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Libellé"}),l.jsx(Z,{value:i.label,onChange:u=>o({...i,label:u.target.value}),placeholder:"ex: Pack 3 - Marque X"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Montant HT (€)"}),l.jsx(Z,{type:"number",step:"0.01",value:i.amount_ht,onChange:u=>o({...i,amount_ht:u.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"TVA (%)"}),l.jsx(Z,{type:"number",step:"0.01",value:i.vat_rate,onChange:u=>o({...i,vat_rate:u.target.value})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Date"}),l.jsx(Z,{type:"date",value:i.entry_date,onChange:u=>o({...i,entry_date:u.target.value})})]}),i.type==="revenue"&&l.jsxs("div",{children:[l.jsx(Y,{children:"Nb vidéos"}),l.jsx(Z,{type:"number",value:i.video_count,onChange:u=>o({...i,video_count:u.target.value})})]})]}),i.type==="revenue"&&l.jsxs("div",{children:[l.jsx(Y,{children:"Client"}),l.jsx(Z,{value:i.client_name,onChange:u=>o({...i,client_name:u.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Notes"}),l.jsx(Xr,{value:i.notes,onChange:u=>o({...i,notes:u.target.value}),rows:2})]})]}),l.jsxs(tn,{children:[l.jsx(Q,{variant:"ghost",neon:!1,onClick:()=>t(!1),children:"Annuler"}),l.jsx(Q,{variant:"solid",onClick:c,disabled:a.isPending,children:a.isPending?"...":"Enregistrer"})]})]})})},FW=()=>{const{data:e=[]}=My(),t=KO(),r=XO(),[n,a]=O.useState(""),[i,o]=O.useState(""),s=e.filter(c=>c.active).reduce((c,u)=>c+Number(u.monthly_amount),0);return l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl",children:[l.jsx("div",{className:"flex items-center justify-between mb-4",children:l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold",children:"Coûts fixes mensuels"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["Total : ",l.jsxs("span",{className:"font-semibold text-foreground",children:[s.toLocaleStr
289ing("fr-FR")," €/mois"]})]})]})}),l.jsxs("div",{className:"space-y-2 mb-4 max-h-[300px] overflow-y-auto",children:[e.map(c=>l.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-background/50 border border-border/40",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium text-sm",children:c.label}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[Number(c.monthly_amount).toLocaleString("fr-FR")," €/mois"]})]}),l.jsx("button",{onClick:()=>r.mutate(c.id),className:"p-2 text-muted-foreground hover:text-red-400",children:l.jsx(Zt,{className:"h-4 w-4"})})]},c.id)),e.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"Aucun coût fixe enregistré"})]}),l.jsxs("div",{className:"grid grid-cols-[1fr,140px,auto] gap-2 items-end",children:[l.jsxs("div",{children:[l.jsx(Y,{className:"text-xs",children:"Libellé"}),l.jsx(Z,{value:n,onChange:c=>a(c.target.value),placeholder:"ex: Loyer studio"})]}),l.jsxs("div",{children:[l.jsx(Y,{className:"text-xs",children:"Montant €/mois"}),l.jsx(Z,{type:"number",value:i,onChange:c=>o(c.target.value)})]}),l.jsx(Q,{variant:"solid",onClick:async()=>{!n||!i||(await t.mutateAsync({label:n,monthly_amount:parseFloat(i),active:!0,category:"other"}),a(""),o(""))},children:l.jsx(wt,{className:"h-4 w-4"})})]})]})},UW={video_unit:"Vidéo seule",pack_3:"Pack 3",pack_6:"Pack 6",pack_12:"Pack 12",subscription:"Abonnement",other_revenue:"Autre",freelance:"Freelance",tools:"Outils",equipment:"Matériel",travel:"Déplacement",other_expense:"Autre"},VW=({entries:e,onEdit:t})=>{const r=GO();return l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 rounded-2xl overflow-hidden",children:[l.jsxs("div",{className:"p-5 border-b border-border/40",children:[l.jsx("h3",{className:"font-semibold",children:"Dernières opérations"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," entrées"]})]}),l.jsx("div",{className:"max-h-[500px] overflow-y-auto",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-background/40 sticky top-0",children:l.jsxs("tr",{className:"text-left text-xs text-muted-foreground uppercase tracking-wider",children:[l.jsx("th",{className:"p-3",children:"Date"}),l.jsx("th",{className:"p-3",children:"Type"}),l.jsx("th",{className:"p-3",children:"Libellé"}),l.jsx("th",{className:"p-3 text-right",children:"Montant HT"}),l.jsx("th",{className:"p-3 w-20"})]})}),l.jsxs("tbody",{children:[e.map(n=>l.jsxs("tr",{className:"border-t border-border/30 hover:bg-background/40",children:[l.jsx("td",{className:"p-3 text-muted-foreground whitespace-nowrap",children:new Date(n.entry_date).toLocaleDateString("fr-FR")}),l.jsx("td",{className:"p-3",children:l.jsx(Ce,{variant:"outline",className:n.type==="revenue"?"border-emerald-500/40 text-emerald-400":"border-red-500/40 text-red-400",children:UW[n.category]??n.category})}),l.jsxs("td",{className:"p-3",children:[l.jsx("div",{className:"font-medium",children:n.label}),n.client_name&&l.jsx("div",{className:"text-xs text-muted-foreground",children:n.client_name})]}),l.jsxs("td",{className:`p-3 text-right font-mono font-semibold ${n.type==="revenue"?"text-emerald-400":"text-red-400"}`,children:[n.type==="revenue"?"+":"-",Number(n.amount_ht).toLocaleString("fr-FR")," €"]}),l.jsx("td",{className:"p-3",children:l.jsxs("div",{className:"flex gap-1 justify-end",children:[l.jsx("button",{onClick:()=>t(n),className:"p-1.5 text-muted-foreground hover:text-foreground",children:l.jsx(Ci,{className:"h-3.5 w-3.5"})}),l.jsx("button",{onClick:()=>r.mutate(n.id),className:"p-1.5 text-muted-foreground hover:text-red-400",children:l.jsx(Zt,{className:"h-3.5 w-3.5"})})]})})]},n.id)),e.length===0&&l.jsx("tr",{children:l.jsx("td",{colSpan:5,className:"p-8 text-center text-muted-foreground",children:"Aucune opération sur cette période"})})]})]})})]})},WW={video_unit:"Vidéo seule",pack_3:"Pack 3",pack_6:"Pack 6",pack_12:"Pack 12",subscription:"Abonnement",other_revenue:"Autre"},HW={freelance:"Freelance",tools:"Outils",equipment:"Matériel",travel:"Déplacement",other_expense:"Autre"},$v=({label:e,amount:t,total:r,color:n})=>{const a=r>0?t/r*100:0;return l.jsxs("div",{className:"space-y-1",children:[l.jsxs("div",{className:"flex justify-between text-xs",children:[l.jsx("span",{className:"text-muted-foreground",children:e}),l.jsxs("span",{className:"font-mono font-semibold",children:[Math.round(t).toLocaleStr
289ing("fr-FR"),"€ ",l.jsxs("span",{className:"text-muted-foreground font-normal",children:["(",a.toFixed(0),"%)"]})]})]}),l.jsx("div",{className:"h-2 rounded-full bg-background/60 overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${a}%`,backgroundColor:n}})})]})},GW=({entries:e})=>{const t=o=>{const s=new Map;for(const c of e)c.type===o&&s.set(c.category,(s.get(c.category)||0)+Number(c.amount_ht));return Array.from(s.entries()).sort((c,u)=>u[1]-c[1])},r=t("revenue"),n=t("expense"),a=r.reduce((o,[,s])=>o+s,0),i=n.reduce((o,[,s])=>o+s,0);return l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl",children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-xs uppercase tracking-widest text-muted-foreground font-medium",children:"Répartition CA"}),l.jsxs("div",{className:"text-2xl font-bold mt-1",children:[Math.round(a).toLocaleString("fr-FR"),"€"]})]}),l.jsxs("div",{className:"space-y-3",children:[r.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucune vente"}),r.map(([o,s])=>l.jsx($v,{label:WW[o]??o,amount:s,total:a,color:"hsl(142 70% 50%)"},o))]})]}),l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl",children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("div",{className:"text-xs uppercase tracking-widest text-muted-foreground font-medium",children:"Répartition dépenses"}),l.jsxs("div",{className:"text-2xl font-bold mt-1",children:[Math.round(i).toLocaleString("fr-FR"),"€"]})]}),l.jsxs("div",{className:"space-y-3",children:[n.length===0&&l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucune dépense"}),n.map(([o,s])=>l.jsx($v,{label:HW[o]??o,amount:s,total:i,color:"hsl(0 80% 65%)"},o))]})]})]})},KW=[{k:"7",l:"7j"},{k:"30",l:"30j"},{k:"90",l:"90j"},{k:"mtd",l:"Mois"},{k:"ytd",l:"Année"},{k:"all",l:"Total"}],Cn=e=>e.toISOString().slice(0,10),XW=e=>{const t=new Date;return t.setDate(t.getDate()-e),Cn(t)},YW=e=>{const t=new Date,r=Cn(t);if(e==="7"||e==="30"||e==="90"){const n=parseInt(e);return{from:XW(n-1),to:r,days:n}}if(e==="mtd"){const n=new Date(t.getFullYear(),t.getMonth(),1);return{from:Cn(n),to:r,days:t.getDate()}}if(e==="ytd"){const n=new Date(t.getFullYear(),0,1),a=Math.floor((t.getTime()-n.getTime())/864e5)+1;return{from:Cn(n),to:r,days:a}}return{from:"2020-01-01",to:r,days:Math.floor((t.getTime()-new Date("2020-01-01").getTime())/864e5)+1}},JW=()=>{const[e,t]=O.useState("30"),[r,n]=O.useState(!1),[a,i]=O.useState(null),[o,s]=O.useState("revenue"),c=O.useMemo(()=>YW(e),[e]),u=c.days,f=O.useMemo(()=>{const b=new Date(c.from),x=new Date(b);x.setDate(x.getDate()-1);const A=new Date(x);return A.setDate(A.getDate()-u+1),{from:Cn(A),to:Cn(x)}},[c,u]),{data:d=[]}=Bf({from:c.from,to:c.to}),{data:p=[]}=Bf(f),{data:h=[]}=My(),g=h.filter(b=>b.active).reduce((b,x)=>b+Number(x.monthly_amount),0),m=g/30*u,v=O.useMemo(()=>{const b=(L,V)=>L.filter(V).reduce((se,he)=>se+Number(he.amount_ht),0),x=b(d,L=>L.type==="revenue"),A=b(d,L=>L.type==="expense"),N=d.filter(L=>L.type==="revenue").reduce((L,V)=>L+Number(V.amount_ht)*Number(V.vat_rate)/100,0),E=x+N,P=x-A-m,$=x>0?P/x*100:0,T=d.filter(L=>L.type==="revenue").length,k=T>0?x/T:0,M=u>0?x/u:0,I=new Map;for(const L of d){if(L.type!=="revenue"||!L.client_name)continue;const V=I.get(L.client_name)||{total:0,count:0};V.total+=Number(L.amount_ht),V.count+=1,I.set(L.client_name,V)}const R=Array.from(I.entries()).map(([L,V])=>({name:L,...V})).sort((L,V)=>V.total-L.total).slice(0,5),z=b(p,L=>L.type==="revenue"),q=b(p,L=>L.type==="expense"),K=z-q-m,X=(L,V)=>V===0?null:(L-V)/Math.abs(V)*100;return{ca_ht:x,ca_ttc:E,tva:N,expenses:A,benefice:P,margin:$,orders:T,aov:k,dailyAvg:M,topClients:R,trend_ca:X(x,z),trend_ben:X(P,K),trend_exp:X(A,q)}},[d,p,m,u]),w=b=>`${Math.round(b).toLocaleString("fr-FR")} €`,S=b=>{i(null),s(b),n(!0)},j=b=>{i(b),s(b.type),n(!0)},_=()=>{const b=["Date","Type","Catégorie","Libellé","Client","Montant HT","TVA %","Notes"],x=d.map($=>[$.entry_date,$.type,$.category,$.label,$.client_name??"",String($.amount_ht),String($.vat_rate),($.notes??"").replace(/[\r\n]+/g," ")]),A=[b,...x].map($=>$.map(T=>`"${String(T).replace(/"/g,'""')}"`).join(",")).join(`
290`),N=new Blob([`\uFEFF${A}`],{type:"text/csv;charset=utf-8;"}),E=URL.createObjectURL(N),P=document.createElement("a");P.href=E,P.download=`finance_${c.from}_${c.to}.csv`,P.click(),URL.revokeObjectURL(E)},y=(b,x=!1)=>
290{if(b===null||!Number.isFinite(b))return null;const A=b>=0,N=x?!A:A;return l.jsxs("span",{className:W("inline-flex items-center gap-1 text-xs font-semibold px-2 py-1 rounded-full backdrop-blur",N?"bg-emerald-500/20 text-emerald-300":"bg-red-500/20 text-red-300"),children:[A?l.jsx(Lw,{className:"h-3 w-3"}):l.jsx(Rw,{className:"h-3 w-3"}),Math.abs(b).toFixed(0),"%"]})};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[l.jsx("div",{className:"flex flex-wrap gap-1.5 p-1 rounded-xl bg-card/40 border border-border/40 w-fit",children:KW.map(b=>l.jsx("button",{onClick:()=>t(b.k),className:W("px-3.5 py-1.5 rounded-lg text-sm font-medium transition-all",e===b.k?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-card/60"),children:b.l},b.k))}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(Q,{variant:"ghost",neon:!1,onClick:_,children:[l.jsx(Vw,{className:"h-4 w-4 mr-1"})," CSV"]}),l.jsxs(Q,{variant:"outline",neon:!1,onClick:()=>S("expense"),children:[l.jsx(wt,{className:"h-4 w-4 mr-1"})," Dépense"]}),l.jsxs(Q,{variant:"solid",onClick:()=>S("revenue"),children:[l.jsx(wt,{className:"h-4 w-4 mr-1"})," Vente"]})]})]}),l.jsxs(Ty,{defaultValue:"general",className:"space-y-6",children:[l.jsxs(ad,{className:"grid w-full max-w-md grid-cols-3",children:[l.jsxs(Sn,{value:"general",className:"gap-2",children:[l.jsx(Ew,{className:"h-4 w-4"}),"Général"]}),l.jsxs(Sn,{value:"finances",className:"gap-2",children:[l.jsx(ij,{className:"h-4 w-4"}),"Finances"]}),l.jsxs(Sn,{value:"costs",className:"gap-2",children:[l.jsx(nj,{className:"h-4 w-4"}),"Coûts fixes"]})]}),l.jsxs(On,{value:"general",className:"space-y-6",children:[l.jsxs(ne,{className:"relative overflow-hidden border-border/50 rounded-3xl p-6 sm:p-8 bg-gradient-to-br from-[#e879b9] via-[#d77ac6] to-[#c77dce] text-white shadow-xl",children:[l.jsx("div",{className:"absolute inset-0 opacity-20 bg-[radial-gradient(circle_at_top_right,white,transparent_60%)]"}),l.jsxs("div",{className:"relative flex flex-col sm:flex-row sm:items-end justify-between gap-6",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 text-white/80 text-xs uppercase tracking-widest font-medium",children:[l.jsx(qu,{className:"h-3.5 w-3.5"})," Bénéfice net · ",u," jour",u>1?"s":""]}),l.jsxs("div",{className:"mt-2 flex items-baseline gap-3 flex-wrap",children:[l.jsx("div",{className:"text-5xl sm:text-6xl font-bold tracking-tight",children:w(v.benefice)}),y(v.trend_ben)]}),l.jsxs("div",{className:"mt-2 text-white/85 text-sm",children:["Marge ",l.jsxs("span",{className:"font-semibold",children:[v.margin.toFixed(1),"%"]})," · Moyenne ",l.jsx("span",{className:"font-semibold",children:w(v.dailyAvg)})," / jour"]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:min-w-[320px]",children:[l.jsxs("div",{className:"rounded-2xl bg-white/15 backdrop-blur p-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-white/80 text-xs",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(Iu,{className:"h-3 w-3"})," CA HT"]}),y(v.trend_ca)]}),l.jsx("div",{className:"text-2xl font-bold mt-1",children:w(v.ca_ht)}),l.jsxs("div",{className:"text-[10px] text-white/70 mt-0.5",children:["TTC ",w(v.ca_ttc)]})]}),l.jsxs("div",{className:"rounded-2xl bg-white/15 backdrop-blur p-4",children:[l.jsxs("div",{className:"flex items-center justify-between text-white/80 text-xs",children:[l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(wg,{className:"h-3 w-3"})," Dépenses"]}),y(v.trend_exp,!0)]}),l.jsx("div",{className:"text-2xl font-bold mt-1",children:w(v.expenses+m)}),l.jsxs("div",{className:"text-[10px] text-white/70 mt-0.5",children:["dont fixes ",w(m)]})]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[l.jsx(Nl,{label:"Commandes",value:String(v.orders),sub:`${u} jour${u>1?"s":""}`}),l.jsx(Nl,{label:"Panier moyen",value:w(v.aov),sub:"CA / commandes"}),l.jsx(Nl,{label:"TVA collectée",value:w(v.tva),sub:"À reverser"})]}),l.jsx(GW,{entries:d}),l.jsxs(ne,{className:"bg-card/60 backdrop-blur border-border/50 p-5 rounded-2xl",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(sj,{className:"h-4 w-4 text-primary"}),l.jsx("h3",{className:"font-semibold",children:"Top clients"})]}),v.topClients.length===0?l.jsx("p",{className:"text-sm text-muted-foreground",children:"Aucun client renseigné sur cette période."}):l.jsx("div",{className:"space-y-2",children:v.topClients.map((b,x)=>l.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl bg-background/50 border border-border/40",children:[l.jsx("div",{className:W("text-xs font-bold w-7 h-7 rounded-full flex items-center justify-center shrink-0",x===0?"bg-gradient-to-br from-[#e879b9] to-[#c77dce] text-white":"bg-primary/10 text-primary"),children:x+1}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-medium text-sm truncate",children:b.name}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[b.count," commande",b.count>1?"s":""]})]}),l.jsx("div",{className:"font-mono font-semibold text-emerald-400",children:w(b.total)})]},b.name))})]}),l.jsx(IW,{entries:d,days:Math.min(u,90),fixedMonthly:g})]}),l.jsx(On,{value:"finances",className:"space-y-4",children:l.jsx(VW,{entr
290ies:d,onEdit:j})}),l.jsx(On,{value:"costs",children:l.jsx(FW,{})})]}),l.jsx(zW,{open:r,onOpenChange:n,entry:a,defaultType:o})]})},Ev=()=>{const[e,t]=O.useState(new Date);return O.useEffect(()=>{const r=setInterval(()=>t(new Date),1e3);return()=>clearInterval(r)},[]),l.jsxs("div",{className:"flex flex-col items-end leading-tight",children:[l.jsx("span",{className:"font-mono text-base font-semibold tabular-nums",children:e.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),l.jsx("span",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:e.toLocaleDateString("fr-FR",{weekday:"long",day:"numeric",month:"short"})})]})},_i=({text:e,className:t,label:r="Copier"})=>{const[n,a]=O.useState(!1),i=async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),a(!0),We.success("Copié !"),setTimeout(()=>a(!1),1500)}catch{We.error("Impossible de copier")}};return l.jsxs("button",{onClick:i,className:W("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border border-border/60 bg-background/60 hover:bg-accent/40 hover:border-accent transition-colors",t),children:[n?l.jsx(Pi,{className:"h-3 w-3 text-emerald-500"}):l.jsx(gg,{className:"h-3 w-3"}),r]})},ZW=e=>{const t=e.split(/(\*\*[^*]+\*\*)/g);return l.jsx("div",{className:"whitespace-pre-wrap text-[15px] leading-relaxed text-foreground/90",children:t.map((r,n)=>r.startsWith("**")&&r.endsWith("**")?l.jsx("strong",{className:"text-foreground font-semibold",children:r.slice(2,-2)},n):l.jsx("span",{children:r},n))})},Ai=({items:e,level:t=0})=>l.jsx(ug,{type:"multiple",className:"space-y-2",children:e.map(r=>l.jsxs(dg,{value:r.id,className:`border rounded-xl overflow-hidden ${t===0?"bg-card/60 border-border/50":"bg-background/40 border-border/30"}`,children:[l.jsx(fg,{className:"px-4 py-3 hover:no-underline hover:bg-accent/20 group",children:l.jsxs("div",{className:"flex items-center gap-3 flex-1 text-left",children:[l.jsx("span",{className:`font-medium ${t===0?"text-base":"text-sm"}`,children:r.title}),r.badge&&l.jsx(Ce,{variant:"outline",className:"text-[10px] font-medium border-primary/40 text-primary",children:r.badge})]})}),l.jsx(pg,{className:"px-4 pb-4 pt-0",children:l.jsxs("div",{className:"space-y-3",children:[r.body&&l.jsxs("div",{className:"relative bg-background/60 border border-border/40 rounded-lg p-4",children:[r.copyable&&l.jsx("div",{className:"absolute top-2 right-2",children:l.jsx(_i,{text:r.body.replace(/\*\*/g,"")})}),ZW(r.body)]}),r.children&&r.children.length>0&&l.jsx("div",{className:"pl-2 border-l-2 border-border/30",children:l.jsx(Ai,{items:r.children,level:t+1})})]})})]},r.id))}),QW=[{id:"ouverture",title:"Ouverture de l'appel",badge:"Étape 1",copyable:!0,body:`Bonjour [Prénom], c'est [Mon prénom] de l'agence TRIBU. Je vous appelle suite à [contexte : formulaire / message LinkedIn / recommandation]. Vous avez quelques minutes ?
291
292**Si occupé :** Aucun souci, quel serait le meilleur moment pour vous rappeler ?
293**Si disponible :** enchaîner sur la découverte.`},{id:"decouverte",title:"Phase Découverte (questions SPIN)",badge:"Étape 2",body:"4 catégories de questions à poser dans l'ordre.",children:[{id:"situation",title:"Situation",copyable:!0,body:`• Aujourd'hui, comment est-ce que vous gérez votre communication sur les réseaux sociaux ?
294• Vous publiez à quelle fréquence environ ?
295• Vous avez une personne dédiée en interne ou c'est vous qui gérez ?
296• Quels réseaux vous utilisez principalement ?`},{id:"probleme",title:"Problème",copyable:!0,body:`• Qu'est-ce qui vous prend le plus de temps dans la création de contenu ?
297• Vous êtes satisfait des résultats que vous obtenez actuellement ?
298• C'est quoi votre plus gros frein aujourd'hui pour publier plus régulièrement ?`},{id:"implication",title:"Implication",copyable:!0,body:`• Si vous ne changez rien dans les 6 prochains mois, quel impact ça aurait sur votre visibilité ?
299• Vos concurrents, ils sont actifs sur TikTok / Instagram Reels ?
300• Le fait de ne pas avoir de contenu vidéo régulier, ça vous fait perdre des opportunités ?`},{id:"need-payoff",title:"Need-payoff",copyable:!0,body:`• Si vous pouviez avoir 4 à 8 vidéos virales par mois, prêtes à poster, sans rien faire, ça changerait quoi pour vous ?
301• L'idéal pour vous ce serait quoi comme résultat dans 3 mois ?`}]},{id:"transition",title:"Transition vers le RDV",badge:"Étape 3",copyable:!0,body:`Écoutez [Prénom], je pense qu'on peut vraiment vou
301s aider. Ce que je vous propose, c'est qu'on se cale un créneau de 20-30 minutes en visio pour que je vous montre concrètement ce qu'on ferait pour [nom de l'entreprise].
302
303Je vous prépare des idées de vidéos personnalisées pour que vous voyiez le potentiel.
304
305Est-ce que [proposer 2 créneaux précis] vous conviendrait ?`},{id:"objections-quali",title:"Objections fréquentes en quali",badge:"Étape 4",body:"6 objections classiques avec leur réponse.",children:[{id:"obj-temps",title:"« Je n'ai pas le temps »",copyable:!0,body:"Justement, c'est exactement pour ça qu'on existe. On s'occupe de tout : les idées, le tournage, le montage. Vous, vous n'avez rien à faire. 20 minutes en visio pour que je vous montre, ça vaut le coup non ?"},{id:"obj-mail",title:"« Envoyez-moi un mail »",copyable:!0,body:"Bien sûr, je vous envoie ça. Mais pour que ce soit pertinent, j'aurais besoin de 2 minutes pour comprendre votre situation. Comme ça je vous envoie quelque chose de personnalisé et pas un mail générique."},{id:"obj-interne",title:"« On gère déjà en interne »",copyable:!0,body:"Top, c'est bien que vous soyez déjà actifs ! Nous on intervient en complément : on produit du contenu natif, format viral, pensé pour l'algorithme. Ça libère votre équipe pour le reste."},{id:"obj-pasinteresse",title:"« Ça ne m'intéresse pas »",copyable:!0,body:"Je comprends. Par curiosité, c'est la vidéo en général qui ne vous parle pas, ou c'est que vous avez déjà eu une mauvaise expérience ?"},{id:"obj-prix",title:"« Combien ça coûte ? »",copyable:!0,body:"Ça dépend du volume de vidéos. On est entre 399€ et 1199€/mois selon la formule. Mais le mieux c'est qu'on en parle en visio, je vous montre exactement ce que ça inclut."},{id:"obj-reflechir",title:"« Je vais réfléchir »",copyable:!0,body:"Bien sûr, c'est normal de prendre le temps. Mais concrètement, qu'est-ce qui vous ferait hésiter ? Comme ça je peux vous donner les infos qu'il vous manque."}]},{id:"cloture",title:"Clôture de l'appel",badge:"Étape 5",copyable:!0,body:`Parfait [Prénom], c'est noté pour [jour + heure]. Je vous envoie une invitation par mail avec le lien visio.
306
307D'ici là, je vous prépare des idées de vidéos personnalisées pour [entreprise].
308
309À [jour] alors, bonne journée !`}],e9=({filter:e})=>{const t=ms(QW,e);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(vs,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Appel Quali"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Script complet de l'appel de qualification"})]})]}),l.jsx(Ai,{items:t})]})};function ms(e,t){if(!t)return e;const r=t.toLowerCase(),n=a=>{const i=(a.title+" "+(a.body??"")+" "+(a.badge??"")).toLowerCase().includes(r),o=a.children?.map(n).filter(Boolean);return i||o&&o.length>0?{...a,children:o}:null};return e.map(n).filter(Boolean)}const t9=[{id:"clarifier",title:"C - Clarifier la situation",badge:"Objectif : remettre dans l'émotion",copyable:!0,body:`Avant de commencer, je voulais revenir sur ce qu'on s'était dit lors de notre premier échange. Vous m'aviez parlé de [rappeler les pain points identifiés en quali]. C'est toujours d'actualité ?
310
311**Objectif :** faire reparler le prospect de ses problèmes, le remettre dans l'émotion.`},{id:"labelliser",title:"L - Labelliser le problème",badge:"Objectif : effet miroir",copyable:!0,body:`Si je résume, aujourd'hui votre problème principal c'est [reformuler]. Et concrètement, ça vous coûte [temps / argent / opportunités]. C'est bien ça ?
312
313**Objectif :** montrer qu'on a compris. Créer un effet miroir.`},{id:"overview",title:"O - Overview de la solution",copyable:!0,body:`Ce qu'on fait chez TRIBU, c'est simple : on produit des vidéos courtes, en format natif - style POV, micro-trottoir, UGC - optimisées pour TikTok et les Reels. Ce sont les formats qui performent le mieux sur l'algorithme en ce moment.
314
315**Les 3 piliers TRIBU :**
316• **Idéation** - On trouve les concepts et les angles viraux
317• **Production** - Tournage + montage pro, format vertical natif
318• **Stratégie** - Calendrier de publication, hashtags, tendances`},{id:"sell",title:"S - Sell the result (vendre le résultat)",badge:"Moment du PDF perso",copyable:!0,body:`Concrètement, en 3 mois avec nous, voici ce que nos clients obtiennent en moyenne :
319
320📈 **+300% de vues** en moyenne sur les 3 premiers mois
321🎯 **Des leads qualifiés** qui viennent directement des réseaux
322⏱️ **0 temps passé** par le client sur la création de contenu
323
324Et là, je vous ai préparé des idées de vidéos spécifiquement pour [entreprise]…
325→ **C'est le moment de montrer le PDF de scripts personnalisé.**`},{id:"expliquer",title:"E - Expliquer la suite (l'offre)",badge:"Sortir le pricing",body:`Présenter le tableau de pricing (voir onglet PRICING).
326
327**Note clé :** Engagement 3 mois minimum. Toutes les vidéos sont livrées prêtes à poster. Tournage inclus dans un rayon de 50 km, au-delà frais de déplacement.`},{id:"resoudre",title:"R - Résoudre les objections (méthode SURF)",badge:"Objectif : closing",body:`**Méthode SURF :**
328**S** - Silence : laisser le prospect parler, ne pas interrompre
329**U** - Understand : reformuler "Si je comprends bien, ce qui vous bloque c'est…"
330**R** - Répondre : apporter la réponse adaptée
331**F** - Fermer : "Est-ce que ça répond à votre interrogation ?"`,children:[{id:"obj-cher",title:"« C'est trop cher »",copyable:!0,body:"Je comprends que c'est un investissement. Mais comparé à un vidéaste freelance (500-1500€/vidéo), on est à partir de 75€/vidéo avec la formule Premium. Et surtout, le ROI est mesurable : nos clients voient des résultats concrets dès le premier mois."},{id:"obj-reflechir-c",title:"« Je veux réfléchir »",copyable:!0,body:"Bien sûr. Qu'est-ce qui vous ferait pencher dans un sens ou dans l'autre ? Je préfère qu'on en parle maintenant pour que vous ayez toutes les cartes en main."},{id:"obj-deja-essaye",title:"« J'ai déjà essayé la vidéo et ça n'a pas marché »",copyable:!0,body:"C'est justement pour ça qu'on existe. La différence entre une vidéo corporate classique et ce qu'on fait, c'est le format natif. On crée du contenu qui ressemble à ce que les gens consomment naturellement sur TikTok. C'est ça qui fait la différence."},{id:"obj-associe",title:"« Je vais en parler à mon associé »",copyable:!0,body:"Bien sûr, c'est normal. Pour l'aider à prendre la décision, qu'est-ce qui serait le plus utile ? Je peux vous envoyer un récap par mail avec les idées de vidéos qu'on a vues ensemble."},{id:"obj-budget",title:"« Je n'ai pas de budget pour ça »",copyable:!0,body:"Je comprends. Mais si cette stratégie vous rapporte ne serait-ce que 2-3 clients supplémentaires par mois, est-ce que ça ne vaut pas l'investissement de 399€ ?"},{id:"obj-secteur",title:"« Les réseaux sociaux ça ne marche pas pour mon secteur »",copyable:!0,body:"C'est ce que pensent beaucoup de nos clients avant de commencer. En réalité, il y a une audience pour chaque secteur sur TikTok et Instagram. Le tout c'est de trouver le bon angle, et c'est exactement notre métier."}]},{id:"closing-final",title:"Closing final",badge:"On y va ?",copyable:!0,body:`Quelle formule correspond le mieux à vos objectifs ? [laisser choisir]
332
333Pour démarrer, voici comment ça se passe :
3341. On signe ensemble aujourd'hui
3352. On planifie un call de brief de 30 min cette semaine
3363. On vous propose les premiers concepts sous 48h
3374. Premier tournage dans les 2 semaines
3385. Premières vidéos livrées sous 3 semaines
339
340**On y va ?**`}],Tv=({filter:e})=>{const t=ms(t9,e);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(Du,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Visio Closing"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Méthode CLOSER pour conclure"})]})]}),l.jsxs(ne,{className:"p-4 bg-primary/5 border-primary/30",children:[l.jsx("div",{className:"text-sm font-semibold text-primary mb-2",children:"Méthode CLOSER"}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-6 gap-2 text-xs",children:[["C","Clarifier"],["L","Labelliser"],["O","Overview"],["S","Sell"],["E","Expliquer"],["R","Résoudre"]].map(([r,n])=>l.jsxs("div",{className:"text-center p-2 rounded-md bg-background/50 border border-border/40",children:[l.jsx("div",{className:"font-bold text-primary text-base",children:r}),l.jsx("div",{className:"text-muted-foreground",children:n})]},r))})]}),l.jsx(Ai,{items:t})]})},r9=[{id:"j1",title:"Relance J+1 (mail)",badge:"J+1",copyable:!0,body:`**Objet :** Les idées qu'on a vues ensemble, [Prénom]
341
342Bonjour [Prénom],
343
344Merci encore pour notre échange d'hier, c'était vraiment intéressant de voir le potentiel pour [entreprise].
345
346Je vous remets ici les idées de vidéos qu'on a travaillées ensemble [joindre le PDF].
347
348Si vous avez des questions ou si vous souhaitez qu'on ajuste quelque chose, je suis disponible.
349
350Belle journée,
351[Signature]`},{id:"j3",title:"Relance J+3 (SMS ou appel)",badge:"J+3",body:"Deux options selon le canal préféré.",children:[{id:"j3-appel",title:"Script appel",copyable:!0,body:"Bonjour [Prénom], c'est [Prénom] de TRIBU. Je me permets de vous rappeler suite à notre visio de lundi. Vous avez eu le temps de réfléchir ? Est-ce que vous avez des questions ?"},{id:"j3-sms",title:"Script SMS",copyable:!0,body:"Bonjour [Prénom], c'est [Prénom] de TRIBU 👋 Je voulais savoir si vous aviez eu le temps de réfléchir à notre échange ? Je reste dispo si vous avez des questions."}]},{id:"j7",title:"Relance J+7 (mail)",badge:"J+7",copyable:!0,body:`**Objet :** On garde le créneau pour [entreprise] ?
352
353Bonjour [Prénom],
354
355Je reviens vers vous car on a quelques créneaux de tournage qui se libèrent pour [mois]. Si vous souhaitez démarrer rapidement, c'est le bon moment.
356
357Qu'en pensez-vous ?
358
359[Signature]`},{id:"j14",title:"Relance J+14 (dernier mail)",badge:"J+14 · Dernier",copyable:!0,body:`**Objet :** Dernière question [Prénom]
360
361Bonjour [Prénom],
362
363Je ne veux pas être insistant, donc ce sera mon dernier message.
364
365Si le timing n'est pas le bon, aucun souci. Gardez mes coordonnées, et n'hésitez pas à revenir vers moi quand vous serez prêt.
366
367En attendant, je vous souhaite une belle continuation avec [entreprise].
368
369À bientôt,
370[Signature]`}],n9=[{id:"tent1",title:"Tentative 1 - Appel + vocale si pas de réponse",badge:"J+0",body:"Premier contact. Privilégier la vocale courte si pas de réponse."},{id:"tent2",title:"Tentative 2 - Appel + SMS",badge:"J+2",body:"Réessayer + envoyer un SMS de relance."},{id:"tent3",title:"Tentative 3 - Appel + mail personnalisé",badge:"J+5",body:"Personnaliser avec une info trouvée sur l'entreprise."},{id:"tent4",title:"Tentative 4 - Dernier appel + mail de clôture",badge:"J+10 · Dernier",body:"Mail de clôture courtois pour garder la porte ouverte."},{id:"vocale-courte",title:"Vocale courte",copyable:!0,body:"Bonjour [Prénom], c'est [Prénom] de TRIBU, l'agence de vidéos virales. Je vous appelais pour échanger sur la visibilité de [entreprise] sur les réseaux. Rappelez-moi quand vous avez un moment, bonne journée !"},{id:"vocale-valeur",title:"Vocale avec valeur",copyable:!0,body:"Bonjour [Prénom], c'est [Prénom] de TRIBU. Je vous appelle parce qu'on travaille avec des entreprises comme la vôtre sur des formats vidéo courts qui génèrent beaucoup de visibilité sur TikTok et Instagram. J'aurais aimé vous montrer ce qu'on pourrait faire pour [entreprise]. N'hésitez pas à me rappeler, bonne journée !"}],a9=({filter:e})=>{const t=ms(r9,e),r=ms(n9,e);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(yg,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Relances"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Séquences de follow-up par scénario"})]})]}),t.length>0&&l.jsxs("section",{className:"space-y-3",children:[l.jsxs(ne,{className:"p-4 bg-card/40 border-border/40",children:[l.jsx("h3",{className:"font-semibold mb-1",children:"Scénario A - Prospect avec RDV visio non signé"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"Séquence sur 14 jours, 4 touches"})]}),l.jsx(Ai,{items:t})]}),r.length>0&&l.jsxs("section",{className:"space-y-3",children:[l.jsxs(ne,{className:"p-4 bg-card/40 border-border/40",children:[l.jsx("h3",{className:"font-semibold mb-1",children:"Scénario B - Prospect injoignable / pas de RDV"}),l.jsx("p",{className:"text-xs text-muted-foreground",children:"4 tentatives sur 10 jours + scripts vocaux"})]}),l.jsx(Ai,{items:r})]})]})},Mv=[{name:"Starter",videos:3,pricePerMonth:399,pricePerVideo:133,features:[{label:"Tournage inclus",included:!0},{label:"Montage pro",included:!0},{label:"Sous-titres",included:!0}
370,{label:"Stratégie éditoriale",included:!1},{label:"Account manager dédié",included:!1},{label:"Rapport mensuel",included:!1}],argument:"Idéal pour tester, zéro risque, 3 vidéos pour voir les résultats."},{name:"Boost",videos:5,pricePerMonth:599,pricePerVideo:120,popular:!0,features:[{label:"Tournage inclus",included:!0},{label:"Montage pro",included:!0},{label:"Sous-titres",included:!0},{label:"Stratégie éditoriale",included:!0},{label:"Account manager dédié",included:!1},{label:"Rapport mensuel",included:!1}],argument:"Notre formule la plus populaire. 5 vidéos = plus d'1 par semaine, le minimum pour être visible."},{name:"Growth",videos:8,pricePerMonth:799,pricePerVideo:100,features:[{label:"Tournage inclus",included:!0},{label:"Montage pro",included:!0},{label:"Sous-titres",included:!0},{label:"Stratégie éditoriale",included:!0},{label:"Account manager dédié",included:!0},{label:"Rapport mensuel",included:!1}],argument:"Pour les entreprises sérieuses sur le digital. 8 vidéos = 2 par semaine, account manager dédié."},{name:"Scale",videos:12,pricePerMonth:999,pricePerVideo:83,features:[{label:"Tournage inclus",included:!0},{label:"Montage pro",included:!0},{label:"Sous-titres",included:!0},{label:"Stratégie éditoriale",included:!0},{label:"Account manager dédié",included:!0},{label:"Rapport mensuel",included:!0}],argument:"Pour dominer son marché local. 12 vidéos = 3 par semaine, rapport mensuel inclus."},{name:"Premium",videos:16,pricePerMonth:1199,pricePerVideo:75,features:[{label:"Tournage inclus",included:!0},{label:"Montage pro",included:!0},{label:"Sous-titres",included:!0},{label:"Stratégie éditoriale",included:!0},{label:"Account manager dédié",included:!0},{label:"Rapport mensuel",included:!0}],argument:"L'offre complète. 16 vidéos = quasi quotidien. Le prix par vidéo le plus bas du marché."}],i9=[{name:"Freelance vidéaste",price:"500 - 1 500 €/vidéo",note:"Variable, qualité hétérogène"},{name:"Agence traditionnelle",price:"2 000 - 5 000 €/vidéo",note:"Format corporate, peu adapté au social"},{name:"Agence Short",price:"~150 - 200 €/vidéo",note:"Concurrent direct"},{name:"TRIBU",price:"à partir de 75 €/vidéo",note:"Format natif, viralité optimisée",highlight:!0}],o9=({filter:e})=>{const t=e.toLowerCase(),r=t?Mv.filter(n=>n.name.toLowerCase().includes(t)||n.argument.toLowerCase().includes(t)||String(n.pricePerMonth).includes(t)||String(n.pricePerVideo).includes(t)):Mv;return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(qu,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Pricing"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Grille tarifaire détaillée"})]})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-3",children:r.map(n=>l.jsxs(ne,{className:W("p-4 rounded-2xl border-2 flex flex-col gap-3 relative",n.popular?"border-primary bg-primary/5":"border-border/40 bg-card/60"),children:[n.popular&&l.jsxs(Ce,{className:"absolute -top-2 left-1/2 -translate-x-1/2 bg-primary text-primary-foreground gap-1",children:[l.jsx(kw,{className:"h-3 w-3"})," Populaire"]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-lg font-bold",children:n.name}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[n.videos," vidéos / mois"]})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"text-2xl font-bold tracking-tight",children:[n.pricePerMonth,"€",l.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:"/mois"})]}),l.jsxs("div",{className:"text-xs text-primary font-medium",children:[n.pricePerVideo,"€ / vidéo"]})]}),l.jsx("ul",{className:"space-y-1 text-xs",children:n.features.map(a=>l.jsxs("li",{className:W("flex items-center gap-2",!a.included&&"text-muted-foreground/60 line-through"),children:[a.included?l.jsx(Pi,{className:"h-3 w-3 text-emerald-500 shrink-0"}):l.jsx(ac,{className:"h-3 w-3 text-muted-foreground shrink-0"}),a.label]},a.label))}),l.jsx("div",{className:"pt-2 border-t border-border/40 text-xs text-muted-foreground",children:n.argument}),l.jsx(_i,{text:`${n.name} - ${n.videos} vidéos/mois - ${n.pricePerMonth}€/mois (${n.pricePerVideo}€/vidéo)`,className:"self-start"})]},n.name))}),l.jsx(ne,{className:"p-4 bg-amber-500/5 border-amber-500/30",children:l.jsxs("p",{className:"text-sm",children:[l.jsx("strong",{children:"Engagement 3 mois minimum."})," Toutes les vidéos sont livrées prêtes à poster. Tournage inclus dans un rayon de 50 km, au-delà frais de déplacement."]})}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:"Comparaison concurrence"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:i9.map(n=>l.jsxs(ne,{className:W("p-4 rounded-xl border",n.highlight?"bg-primary/10 border-primary":"bg-card/40 border-border/40"),children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"font-semibold",children:n.name}),l.jsx("div",{className:W("font-mono font-bold",n.highlight&&"text-primary"),children:n.price})]}),l.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:n.note})]},n.name))})]})]})}
370,s9=[{category:"Prix",title:"C'est trop cher",difficulty:"medium",understand:"Si je comprends bien, le tarif vous semble élevé par rapport à ce que vous aviez en tête ?",answer:"Comparé à un vidéaste freelance (500-1500€/vidéo), on est à partir de 75€/vidéo avec la formule Premium. Et surtout, on inclut tout : idéation, tournage, montage, stratégie. Le ROI est mesurable dès le premier mois.",close:"Est-ce que c'est plutôt le ticket mensuel qui vous bloque, ou le ROI que vous remettez en question ?"},{category:"Prix",title:"Je n'ai pas de budget",difficulty:"hard",understand:"OK donc le budget n'est pas alloué pour ce trimestre, c'est ça ?",answer:"Si cette stratégie vous rapporte ne serait-ce que 2-3 clients supplémentaires par mois, l'investissement de 399€ est rentabilisé. On peut commencer en Starter pour valider, puis upgrader.",close:"Si je vous montre noir sur blanc le ROI attendu, ça pourrait débloquer un budget ?"},{category:"Prix",title:"Mon concurrent fait moins cher",difficulty:"medium",understand:"Vous avez comparé avec quel type de prestataire ?",answer:"Le prix nu ne dit rien. Ce qui compte c'est le format (natif vs corporate), la régularité, et l'optimisation algorithme. Beaucoup de nos clients viennent justement après avoir testé moins cher sans résultat.",close:"Vous voulez qu'on compare point par point ce qui est inclus ?"},{category:"Prix",title:"Je veux un essai gratuit",difficulty:"medium",understand:"Vous voulez voir le rendu avant de vous engager, c'est ça ?",answer:"On ne fait pas d'essai gratuit, mais on a la formule Starter à 399€ pour 3 vidéos. C'est exactement ça : un test grandeur nature sans engagement long.",close:"On part sur Starter pour valider la qualité ?"},{category:"Timing",title:"Ce n'est pas le bon moment",difficulty:"easy",understand:"Qu'est-ce qui se passe en ce moment qui rend ça difficile ?",answer:"Je comprends. Le truc, c'est que la visibilité ça se construit dans la durée. Plus on attend, plus les concurrents prennent de l'avance sur l'algorithme.",close:"Si on démarrait dans 30 jours pour vous laisser le temps de vous organiser, ça fonctionnerait ?"},{category:"Timing",title:"On verra en septembre / janvier",difficulty:"easy",understand:"Donc l'idée vous intéresse, c'est juste une question de calendrier ?",answer:"Top. Sachez qu'on a des créneaux de tournage qui se réservent à l'avance. Si on bloque déjà votre démarrage pour [date], vous êtes prioritaire.",close:"On pose une option dès maintenant ?"},{category:"Timing",title:"Je vais réfléchir",difficulty:"medium",understand:"Bien sûr. Concrètement, qu'est-ce qui vous fait hésiter ?",answer:"Je préfère qu'on en parle maintenant pour que vous ayez toutes les cartes. Si je peux lever le doute, on avance ; sinon on s'arrête là proprement.",close:"Qu'est-ce qui vous ferait dire oui ou non ?"}
370,{category:"Confiance",title:"J'ai déjà essayé et ça n'a pas marché",difficulty:"medium",understand:"Vous aviez essayé avec qui, et c'était quel format ?",answer:"C'est typique. La différence avec ce qu'on fait, c'est le format natif (POV, micro-trottoir, UGC). On crée du contenu qui ressemble à ce que les gens consomment spontanément, pas de la pub déguisée.",close:"Vous voulez voir des exemples concrets de ce qu'on a fait pour des secteurs proches du vôtre ?"},{category:"Confiance",title:"Je ne connais pas votre agence",difficulty:"easy",understand:"Légitime. Vous voulez voir notre portfolio et nos références ?",answer:"On est basés en Bourgogne-Franche-Comté, on bosse avec des entreprises locales et nationales. Tout est visible sur agence-tribu.fr avec les études de cas détaillées.",close:"Je vous envoie le lien des études de cas tout de suite ?"},{category:"Confiance",title:"Vous avez des références ?",difficulty:"easy",understand:"Vous voulez voir des exemples dans votre secteur en particulier ?",answer:"Oui, on a des cas concrets sur le site dans la section études de cas, avec les KPI avant/après. Je peux aussi vous envoyer un client en référence à appeler directement.",close:"Quel secteur vous intéresse en priorité ?"},{category:"Décision",title:"Je dois en parler à mon associé / ma direction",difficulty:"medium",understand:"Bien sûr. Qu'est-ce qui serait le plus utile pour l'aider à décider ?",answer:"Je peux vous préparer un récap clair par mail avec l'offre, les exemples et le ROI estimé. Ou mieux, on cale un call à 3 directement pour répondre à toutes les questions en une fois.",close:"On organise un call à 3 cette semaine ?"},{category:"Décision",title:"Envoyez-moi un mail / une proposition",difficulty:"medium",understand:"OK, vous préférez prendre le temps d'analyser au calme ?",answer:"Je vous envoie ça. Pour que ce soit pertinent et pas générique, donnez-moi 2 min pour valider l'offre qui colle à vos objectifs.",close:"Vous préférez recevoir Starter, Boost, ou un comparatif des 3 ?"},{category:"Besoin",title:"Ça ne m'intéresse pas",difficulty:"hard",understand:"Je comprends. C'est la vidéo en général qui ne vous parle pas, ou c'est le timing ?",answer:"Beaucoup de nos clients pensaient pareil avant de voir les chiffres. La vidéo courte représente +70% du temps passé sur les réseaux. Ne pas y être, c'est laisser ses concurrents prendre 100% de la visibilité.",close:"Si on regardait juste 2 minutes ce que ça donnerait pour [entreprise], par curiosité ?"},{category:"Besoin",title:"Les réseaux ça ne marche pas pour mon secteur",difficulty:"medium",understand:"Vous avez testé, ou c'est une intuition ?",answer:"Il y a une audience pour chaque secteur sur TikTok et Instagram, même B2B, même technique, même artisanat. Le tout c'est de trouver le bon angle, et c'est exactement notre métier.",close:"Je vous montre 2-3 exemples sur des secteurs improbables ?"},{category:"Besoin",title:"On gère déjà en interne",difficulty:"medium",understand:"Top, vous avez quelqu'un dédié ou c'est en plus de ses missions ?",answer:"On intervient en complément : on produit du contenu natif optimisé algorithme. Ça libère votre équipe pour le stratégique et la communauté.",close:"Et si on prenait juste la production pour soulager votre équipe ?"}],kv={easy:{label:"🟢 Facile",cls:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"},medium:{label:"🟡 Moyen",cls:"bg-amber-500/15 text-amber-400 border-amber-500/30"},hard:{label:"🔴 Difficile",cls:"bg-red-500/15 text-red-400 border-red-500/30"}},l9=({d:e})=>l.jsx("span",{className:W("text-[10px] font-semibold px-2 py-0.5 rounded-full border",kv[e].cls),children:kv[e].label}),c9=["Toutes","Prix","Timing","Confiance","Décision","Besoin"],u9=({filter:e})=>{const[t,r]=O.useState("Toutes"),n=O.useMemo(()=>{const a=e.toLowerCase();return s9.filter(i=>t!=="Toutes"&&i.category!==t?!1:a?`${i.title} ${i.answer} ${i.understand??""} ${i.close??""} ${i.category??""}`.toLowerCase().includes(a):!0)},[t,e]);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(bg,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Objections"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Base complète, méthode SURF"})]})]}),l.jsx("div",{className:"flex gap-2 flex-wrap",children:c9.map(a=>l.jsx("button",{onClick:()=>r(a),className:W("px-3 py-1.5 rounded-full text-xs font-medium border transition-colors",t===a?"bg-primary text-primary-foreground border-primary":"border-border/50 hover:bg-accent/30"),children:a},a))}),l.jsx(ug,{type:"multiple",className:"space-y-2",children:n.map((a,i)=>l.jsxs(dg,{value:`o-${i}`,className:"border bg-card/60 border-border/50 rounded-xl overflow-hidden",children:[l.jsx(fg,{className:"px-4 py-3 hover:no-underline hover:bg-accent/20",children:l.jsxs("div",{className:"flex items-center gap-3 flex-1 text-left",children:[l.jsxs("span",{className:"font-medium",children:["« ",a.title," »"]}),a.difficulty&&l.jsx(l9,{d:a.difficulty}),a.category&&l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted-foreground ml-auto mr-2",children:a.category})]})}),l.jsxs(pg,{className:"px-4 pb-4 pt-0 space-y-3",children:[a.understand&&l.jsxs("div",{className:"p-3 rounded-lg bg-background/60 border border-border/40",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mb-1",children:"U - Understand"}),l.jsx("div",{className:"text-sm italic",children:a.understand})]}),l.jsxs("div",{className:"p-3 rounded-lg bg-primary/5 border border-primary/30 relative",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-widest text-primary mb-1",children:"R - Répondre"}),l.jsx("div",{className:"text-sm",children:a.answer}),l.jsx("div",{className:"absolute top-2 right-2",children:l.jsx(_i,{text:a.answer})})]}),a.close&&l.jsxs("div",{className:"p-3 rounded-lg bg-background/60 border border-border/40",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mb-1",children:"F - Fermer"}),l.jsx("div",{className:"text-sm italic",children:a.close})]})]})]},i))}),n.length===0&&l.jsx(ne,{className:"p-8 text-center text-muted-foreground bg-card/40",children:"Aucune objection ne correspond à votre recherche."})]})},d9=["Vérifier le profil LinkedIn / site web du prospect","Préparer le PDF de scripts personnalisés","Vérifier le créneau dans l'agenda","Ouvrir le CRM sur la fiche prospect","Avoir la grille tarifaire ouverte"],f9=["Mettre à jour le CRM (statut + notes)","Envoyer le mail de suivi","Programmer la relance","Préparer le devis si accord","Remplir le compte-rendu Noota"],p9=["On aide les entreprises comme la vôtre à devenir virales sur TikTok","On produit des vidéos qui génèrent en moyenne 300% de vues en plus","Nos clients n'ont rien à faire, on gère de A à Z","On est les spécialistes du format natif, le contenu qui performe sur l'algorithme","À partir de 75€ la vidéo, c'est l'investissement le plus rentable en marketing digital"],h9=["Agence de vidéos virales, format natif (POV, micro-trottoir, UGC)","Spécialisée TikTok + Meta (Reels, Stories)","Basée en Bourgogne-Franche-Comté","Tournage dans un rayon de 50 km inclus","Engagement 3 mois minimum","Site : agence-tribu.fr"],Dv=({id:e,items:t,title:r})=>{const[n,a]=O.useState({}),i=()=>a({}
370),o=Object.values(n).filter(Boolean).length;return l.jsxs(ne,{className:"p-5 bg-card/60 border-border/50 rounded-2xl",children:[l.jsxs("div",{className:"flex items-center justify-between mb-3",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Hu,{className:"h-4 w-4 text-primary"}),l.jsx("h3",{className:"font-semibold",children:r})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,"/",t.length]}),l.jsx("button",{onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Reset"})]})]}),l.jsx("ul",{className:"space-y-2",children:t.map((s,c)=>l.jsx("li",{children:l.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-2 rounded-md hover:bg-accent/20 transition-colors",children:[l.jsx("input",{type:"checkbox",checked:!!n[c],onChange:u=>a({...n,[c]:u.target.checked}),className:"mt-1 h-4 w-4 rounded border-border accent-primary"}),l.jsx("span",{className:W("text-sm",n[c]&&"line-through text-muted-foreground"),children:s})]})},c))})]})},m9=({filter:e})=>{const t=e.toLowerCase(),r=i=>!t||i.toLowerCase().includes(t),n=p9.filter(r),a=h9.filter(r);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("header",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary/15 text-primary flex items-center justify-center",children:l.jsx(Hu,{className:"h-5 w-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"text-2xl font-bold",children:"Outils"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Ressources rapides pour vos appels"})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsx(Dv,{id:"avant",items:d9,title:"Checklist pré-appel"}),l.jsx(Dv,{id:"apres",items:f9,title:"Checklist post-appel"})]}),l.jsxs(ne,{className:"p-5 bg-card/60 border-border/50 rounded-2xl",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(Tw,{className:"h-4 w-4 text-primary"}),l.jsx("h3",{className:"font-semibold",children:"Phrases d'accroche"})]}),l.jsx("div",{className:"space-y-2",children:n.map((i,o)=>l.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-background/60 border border-border/40",children:[l.jsx("p",{className:"text-sm flex-1",children:i}),l.jsx(_i,{text:i})]},o))})]}),l.jsxs(ne,{className:"p-5 bg-card/60 border-border/50 rounded-2xl",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(Mw,{className:"h-4 w-4 text-primary"}),l.jsx("h3",{className:"font-semibold",children:"Vocaux pré-rédigés"})]}),l.jsx("div",{className:"space-y-3",children:[{t:"Vocale courte",v:"Bonjour [Prénom], c'est [Prénom] de TRIBU, l'agence de vidéos virales. Je vous appelais pour échanger sur la visibilité de [entreprise] sur les réseaux. Rappelez-moi quand vous avez un moment, bonne journée !"},{t:"Vocale avec valeur",v:"Bonjour [Prénom], c'est [Prénom] de TRIBU. Je vous appelle parce qu'on travaille avec des entreprises comme la vôtre sur des formats vidéo courts qui génèrent beaucoup de visibilité sur TikTok et Instagram. J'aurais aimé vous montrer ce qu'on pourrait faire pour [entreprise]. N'hésitez pas à me rappeler, bonne journée !"}].filter(i=>r(i.t)||r(i.v)).map(i=>l.jsxs("div",{className:"p-3 rounded-lg bg-background/60 border border-border/40 relative",children:[l.jsx("div",{className:"text-xs font-semibold text-primary mb-1",children:i.t}),l.jsx("div",{className:"text-sm pr-20",children:i.v}),l.jsx("div",{className:"absolute top-2 right-2",children:l.jsx(_i,{text:i.v})})]},i.t))})]}),l.jsxs(ne,{className:"p-5 bg-card/60 border-border/50 rounded-2xl",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[l.jsx(Jw,{className:"h-4 w-4 text-primary"}),l.jsx("h3",{className:"font-semibold",children:"Info rapide TRIBU"})]}),l.jsx("ul",{className:"space-y-1.5 text-sm",children:a.map((i,o)=>l.jsxs("li",{className:"flex items-start gap-2",children:[l.jsx("span",{className:"text-primary mt-1",children:"•"}),l.jsx("span",{children:i})]},o))})]})]})},v9=[{key:"quali",label:"Appel Quali",icon:vs},{key:"closing",label:"Visio Closing",icon:Du},{key:"relances",label:"Relances",icon:yg},{key:"pricing",label:"Pricing",icon:qu},{key:"objections",label:"Objections",icon:bg},{key:"outils",label:"Outils",icon:Hu}],g9=()=>{const[e,t]=O.useState("quali"),[r,n]=O.useState(""),[a,i]=O.useState(!1),[o,s]=O.useState(!1),c=()=>{switch(e){case"quali":return l.jsx(e9,{filter:r});case"closing":return l.jsx(Tv,{filter:r});case"relances":return l.jsx(a9,{filter:r});case"pricing":return l.jsx(o9,{filter:r});case"objections":return l.jsx(u9,{filter:r});case"outils":return l.jsx(m9,{filter:r})}};return o?l.jsxs("div",{className:"fixed inset-0 z-[100] bg-background overflow-y-auto",children:[l.jsxs("div",{className:"sticky top-0 z-10 bg-background/95 backdrop-blur border-b border-border/50 px-6 py-3 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-xl font-black tracking-tight text-primary",children:"TRIBU"}),l.jsx("span",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Mode Visio"})]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(Ev,{}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Y,{htmlFor:"visio-mode-2",className:"text-xs",children:"Mode Visio"}),l.jsx(ic,{id:"visio-mode-2",checked:o,onCheckedChange:s})]})]})]}),l.jsx("div",{className:"max-w-4xl mx-auto px-6 py-8 text-[17px] leading-relaxed",children:l.jsx(Tv,{filter:""})})]}):l.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/40 overflow-hidden",children:[l.jsxs("div",{className:"border-b border-border/50 bg-card/40 px-4 py-3 flex flex-col md:flex-row md:items-center gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-lg font-black tracking-tight text-primary leading-none",children:"TRIBU"}),l.jsx("div",{className:"hidden md:flex flex-col leading-none",children:l.jsx("span",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Agence Vidéo Virale"})})]}),l.jsxs("div",{className:"flex-1 relative md:max-w-md md:mx-auto",children:[l.jsx(Ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),l.jsx(Z,{placeholder:"Rechercher un script, une objection, un prix…",value:r,onChange:u=>n(u.target.value),className:"pl-9 bg-background/60 border-border/50"})]}),l.jsxs("div",{className:"flex items-center gap-4",children:[l.jsx(Ev,{}),l.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 border border-primary/30",children:[o?l.jsx(hg,{className:"h-3.5 w-3.5 text-primary"}):l.jsx(Ww,{className:"h-3.5 w-3.5 text-muted-foreground"}),l.jsx(Y,{htmlFor:"visio-mode",className:"text-xs cursor-pointer",children:"Mode Visio"}),l.jsx(ic,{id:"visio-mode",checked:o,onCheckedChange:s})]})]})]}),l.jsxs("div",{className:"flex min-h-[600px]",children:[l.jsxs("aside",{className:W("border-r border-border/50 bg-card/30 transition-all duration-200 shrink-0",a?"w-16":"w-56"),children:[l.jsx("div",{className:"p-2 space-y-1",children:v9.map(u=>{const f=u.icon,d=e===u.key;return l.jsxs("button",{onClick:()=>t(u.key),className:W("w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors text-left",d?"bg-primary text-primary-foreground":"text-foreground
370/70 hover:bg-accent/30 hover:text-foreground"),title:a?u.label:void 0,children:[l.jsx(f,{className:"h-4 w-4 shrink-0"}),!a&&l.jsx("span",{className:"truncate",children:u.label})]},u.key)})}),l.jsx("button",{onClick:()=>i(!a),className:"w-full mt-2 px-3 py-2 text-xs text-muted-foreground hover:text-foreground border-t border-border/40 flex items-center justify-center gap-1",children:a?l.jsx(mg,{className:"h-3.5 w-3.5"}):l.jsxs(l.Fragment,{children:[l.jsx(Dw,{className:"h-3.5 w-3.5"})," Réduire"]})})]}),l.jsx("main",{className:"flex-1 p-5 md:p-6 overflow-x-auto animate-fade-in",children:c()})]})]})},d1=O.forwardRef(({className:e,...t},r)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:r,className:W("w-full caption-bottom text-sm",e),...t})}));d1.displayName="Table";const f1=O.forwardRef(({className:e,...t},r)=>l.jsx("thead",{ref:r,className:W("[&_tr]:border-b",e),...t}));f1.displayName="TableHeader";const p1=O.forwardRef(({className:e,...t},r)=>l.jsx("tbody",{ref:r,className:W("[&_tr:last-child]:border-0",e),...t}));p1.displayName="TableBody";const y9=O.forwardRef(({className:e,...t},r)=>l.jsx("tfoot",{ref:r,className:W("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));y9.displayName="TableFooter";const ku=O.forwardRef(({className:e,...t},r)=>l.jsx("tr",{ref:r,className:W("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));ku.displayName="TableRow";const vn=O.forwardRef(({className:e,...t},r)=>l.jsx("th",{ref:r,className:W("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));vn.displayName="TableHead";const gn=O.forwardRef(({className:e,...t},r)=>l.jsx("td",{ref:r,className:W("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));gn.displayName="TableCell";const b9=O.forwardRef(({className:e,...t},r)=>l.jsx("caption",{ref:r,className:W("mt-4 text-sm text-muted-foreground",e),...t}));b9.displayName="TableCaption";const Iv={nouveau:"Nouveau",en_cours:"En cours",envoye:"Scripts envoyés"},Rv={nouveau:"default",en_cours:"secondary",envoye:"outline"},nc={"marque-ecommerce":"Marque / E-commerce",service:"Service / Prestation",saas:"Application / SaaS",evenement:"Événement",institution:"Institution",autre:"Autre"},x9=()=>{const e=qt(),[t,r]=O.useState("all"),[n,a]=O.useState("all"),[i,o]=O.useState(null),[s,c]=O.useState(!1),{data:u=[],isLoading:f}=rn({queryKey:["script_briefs"],queryFn:async()=>{const{data:h,error:g}=await Ne.from("script_briefs").select("*").order("created_at",{ascending:!1});if(g)throw g;return h}}),d=zt({mutationFn:async({id:h,status:g})=>{const{error:m}=await Ne.from("script_briefs").update({status:g}).eq("id",h);if(m)throw m},onSuccess:()=>{e.invalidateQueries({queryKey:["script_briefs"]}),We.success("Statut mis à jour")}}),p=u.filter(h=>!(t!=="all"&&h.status!==t||n!=="all"&&h.project_type!==n));return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 sm:items-center justify-between",children:[l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsxs(Tt,{value:t,onValueChange:r,children:[l.jsx(bt,{className:"w-44",children:l.jsx(Mt,{placeholder:"Statut"})}),l.jsxs(xt,{children:[l.jsx(ke,{value:"all",children:"Tous statuts"}),l.jsx(ke,{value:"nouveau",children:"Nouveau"}),l.jsx(ke,{value:"en_cours",children:"En cours"}),l.jsx(ke,{value:"envoye",children:"Scripts envoyés"})]})]}),l.jsxs(Tt,{value:n,onValueChange:a,children:[l.jsx(bt,{className:"w-56",children:l.jsx(Mt,{placeholder:"Type"})}),l.jsxs(xt,{children:[l.jsx(ke,{value:"all",children:"Tous types"}),Object.entries(nc).map(([h,g])=>l.jsx(ke,{value:h,children:g},h))]})]})]}),l.jsxs(Q,{variant:"solid",onClick:()=>c(!0),children:[l.jsx(wt,{className:"w-4 h-4 mr-1"})," Nouveau brief client"]})]}),l.jsx(ne,{className:"overflow-hidden",children:f?l.jsx("div",{className:"flex items-center justify-center py-16",children:l.jsx($t,{className:"h-8 w-8 animate-spin text-primary"})}):p.length===0?l.jsx("div",{className:"py-16 text-center text-muted-foreground text-sm",children:"Aucun brief"}):l.jsxs(d1,{children:[l.jsx(f1,{children:l.jsxs(ku,{children:[l.jsx(vn,{children:"Date"}),l.jsx(vn,{children:"Nom"}),l.jsx(vn,{className:"hidden md:table-cell",children:"Email"}),l.jsx(vn,{className:"hidden sm:table-cell",children:"Type"}),l.jsx(vn,{children:"Statut"})]})}),l.jsx(p1,{children:p.map(h=>l.jsxs(ku,{className:"cursor-pointer",onClick:()=>o(h),children:[l.jsx(gn,{className:"text-xs text-muted-foreground",children:new Date(h.created_at).toLocaleDateString("fr-FR")}),l.jsxs(gn,{className:"font-medium",children:[h.first_name," ",h.last_name]}),l.jsx(gn,{className:"hidden md:table-cell text-sm",children:h.email}),l.jsx(gn,{className:"hidden sm:table-cell text-sm",children:nc[h.project_type]??h.project_type}),l.jsx(gn,{children:l.jsx(Ce,{variant:Rv[h.status],children:Iv[h.status]})})]}
370,h.id))})]})}),l.jsx(kt,{open:!!i,onOpenChange:h=>!h&&o(null),children:l.jsx(Dt,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:i&&l.jsxs(l.Fragment,{children:[l.jsx(It,{children:l.jsx(Rt,{children:i.brand_name})}),l.jsxs("div",{className:"space-y-4 text-sm",children:[l.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[l.jsx(Ce,{variant:Rv[i.status],children:Iv[i.status]}),l.jsx(Ce,{variant:"outline",children:nc[i.project_type]??i.project_type}),l.jsxs(Ce,{variant:"outline",children:["Source: ",i.source]})]}),l.jsx(rr,{label:"Contact",value:`${i.first_name} ${i.last_name} - ${i.email}${i.phone?" - "+i.phone:""}`}),i.website&&l.jsx(rr,{label:"Site web",value:i.website}),l.jsx(rr,{label:"Offre",value:i.offer}),l.jsx(rr,{label:"Problème résolu",value:i.problem}),l.jsx(rr,{label:"Différenciation",value:i.uniqueness}),l.jsx(rr,{label:"Audience cible",value:i.audience}),l.jsx(rr,{label:"Objections",value:i.objections}),l.jsx(rr,{label:"Objectif",value:i.goal}),i.internal_notes&&l.jsx(rr,{label:"Notes internes",value:i.internal_notes})]}),l.jsxs("div",{className:"flex flex-wrap gap-2 pt-4 border-t",children:[l.jsxs(Tt,{value:i.status,onValueChange:h=>d.mutate({id:i.id,status:h}),children:[l.jsx(bt,{className:"w-48",children:l.jsx(Mt,{})}),l.jsxs(xt,{children:[l.jsx(ke,{value:"nouveau",children:"Nouveau"}),l.jsx(ke,{value:"en_cours",children:"En cours"}),l.jsx(ke,{value:"envoye",children:"Scripts envoyés"})]})]}),l.jsxs(Q,{variant:"solid",onClick:()=>d.mutate({id:i.id,status:"envoye"}),children:[l.jsx(Pi,{className:"w-4 h-4 mr-1"}),"Marquer comme traité"]})]})]})})}),l.jsx(kt,{open:s,onOpenChange:c,children:l.jsxs(Dt,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[l.jsx(It,{children:l.jsx(Rt,{children:"Nouveau brief client (interne)"})}),l.jsx(aw,{variant:"internal",onSuccess:()=>{c(!1),e.invalidateQueries({queryKey:["script_briefs"]})}})]})})]})},rr=({label:e,value:t})=>l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground tracking-wide",children:e}),l.jsx("div",{className:"mt-1 whitespace-pre-wrap",children:t})]}),pf=()=>rn({queryKey:["clients"],queryFn:async()=>{const{data:e,error:t}=await Ne.from("clients").select("*").order("created_at",{ascending:!1});if(t)throw t;return e||[]}}),w9=()=>{const e=qt();return zt({mutationFn:async t=>{if(t.id){const{error:r}=await Ne.from("clients").update(t).eq("id",t.id);if(r)throw r}else{const{error:r}=await Ne.from("clients").insert(t);if(r)throw r}},onSuccess:()=>{e.invalidateQueries({queryKey:["clients"]}),We.success("Client enregistré")},onError:t=>We.error(t.message)})},j9=()=>{const e=qt();return zt({mutationFn:async t=>{const{error:r}=await Ne.from("clients").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["clients"]}),We.success("Client supprimé")}})},S9=()=>rn({queryKey:["deals"],queryFn:async()=>{const{data:e,error:t}=await Ne.from("deals").select("*").order("created_at",{ascending:!1});if(t)throw t;return e||[]}}),O9=()=>{const e=qt();return zt({mutationFn:async t=>{if(t.id){const{error:r}=await Ne.from("deals").update(t).eq("id",t.id);if(r)throw r}else{const{error:r}=await Ne.from("deals").insert(t);if(r)throw r}},onSuccess:()=>{e.invalidateQueries({queryKey:["deals"]}),We.success("Deal enregistré")},onError:t=>We.error(t.message)})},_9=()=>{const e=qt();return zt({mutationFn:async t=>{const{error:r}=await Ne.from("deals").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["deals"]}),We.success("Supprimé")}})},A9=e=>rn({queryKey:["interactions",e],enabled:!!e,queryFn:async()=>{const{data:t,error:r}=await Ne.from("client_interactions").select("*").eq("client_id",e).order("occurred_at",{ascending:!1});if(r)throw r;return t||[]}}),N9=()=>{const e=qt();return zt({mutationFn:async t=>{const{error:r}=await Ne.from("client_interactions").insert(t);if(r)throw r},onSuccess:(t,r)=>{e.invalidateQueries({queryKey:["interactions",r.client_id]}),We.success("Interaction ajoutée")},onError:t=>We.error(t.message)})},P9=()=>rn({queryKey:["client_revenue"],queryFn:async()=>{const{data:e,error:t}=await Ne.from("finance_entries").select("client_id,amount_ht,type").eq("type","revenue");if(t)throw t;const r={};for(const n of e||[])n.client_id&&(r[n.client_id]=(r[n.client_id]||0)+Number(n.amount_ht||0));return r}}
370),C9={first_name:"",last_name:"",email:"",phone:"",company:"",website:"",tags:[],notes:"",source:""},Lv={appel:"Appel",email:"Email",rdv:"RDV",note:"Note",autre:"Autre"},$9=()=>{const{data:e=[],isLoading:t}=pf(),{data:r={}}=P9(),n=w9(),a=j9(),[i,o]=O.useState(""),[s,c]=O.useState(null),[u,f]=O.useState(null),d=e.filter(h=>{const g=i.toLowerCase();return!g||`${h.first_name} ${h.last_name} ${h.email} ${h.company}`.toLowerCase().includes(g)}),p=Object.values(r).reduce((h,g)=>h+g,0);return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsx(ne,{className:"p-4 bg-gradient-to-br from-pink-500/10 to-purple-500/10 border-pink-500/20",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-pink-500 to-purple-500 text-white",children:l.jsx(Ru,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"Clients"}),l.jsx("div",{className:"text-2xl font-bold",children:e.length})]})]})}),l.jsxs(ne,{className:"p-4",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"CA total (HT)"}),l.jsxs("div",{className:"text-2xl font-bold flex items-center gap-1",children:[l.jsx(sg,{className:"w-5 h-5"}),p.toLocaleString("fr-FR")]})]}),l.jsxs(ne,{className:"p-4",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"CA moyen / client"}),l.jsxs("div",{className:"text-2xl font-bold",children:[e.length?Math.round(p/e.length).toLocaleString("fr-FR"):0," €"]})]})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 sm:items-center justify-between",children:[l.jsxs("div",{className:"relative w-full sm:w-80",children:[l.jsx(Ku,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),l.jsx(Z,{value:i,onChange:h=>o(h.target.value),placeholder:"Rechercher un client...",className:"pl-9"})]}),l.jsxs(Q,{variant:"solid",onClick:()=>c(C9),children:[l.jsx(wt,{className:"w-4 h-4 mr-1"})," Nouveau client"]})]}),t?l.jsx(ne,{className:"p-8 text-center text-muted-foreground",children:"Chargement..."}):d.length===0?l.jsx(ne,{className:"p-8 text-center text-muted-foreground",children:"Aucun client"}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:d.map(h=>l.jsxs(ne,{className:"p-4 hover:shadow-md transition cursor-pointer group",onClick:()=>f(h),children:[l.jsxs("div",{className:"flex items-start justify-between gap-2",children:[l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsxs("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-pink-500 to-purple-500 text-white flex items-center justify-center font-semibold text-sm shrink-0",children:[h.first_name[0],h.last_name[0]]}),l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"font-semibold truncate",children:[h.first_name," ",h.last_name]}),h.company&&l.jsxs("div",{className:"text-xs text-muted-foreground truncate flex items-center gap-1",children:[l.jsx(Bw,{className:"w-3 h-3"}),h.company]})]})]}),l.jsxs("div",{className:"text-right",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"CA"}),l.jsxs("div",{className:"font-semibold text-sm",children:[(r[h.id]||0).toLocaleString("fr-FR")," €"]})]})]}),l.jsxs("div",{className:"mt-3 space-y-1 text-xs text-muted-foreground",children:[h.email&&l.jsxs("div",{className:"flex items-center gap-1 truncate",children:[l.jsx(Wu,{className:"w-3 h-3"}),h.email]}),h.phone&&l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(vs,{className:"w-3 h-3"}),h.phone]})]}),h.tags&&h.tags.length>0&&l.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:h.tags.slice(0,3).map(g=>l.jsx(Ce,{variant:"secondary",className:"text-xs",children:g},g))})]},h.id))}),l.jsx(kt,{open:!!s,onOpenChange:h=>!h&&c(null),children:l.jsxs(Dt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[l.jsx(It,{children:l.jsx(Rt,{children:s?.id?"Modifier le client":"Nouveau client"})}),s&&l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Prénom *"}),l.jsx(Z,{value:s.first_name||"",onChange:h=>c({...s,first_name:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Nom *"}),l.jsx(Z,{value:s.last_name||"",onChange:h=>c({...s,last_name:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Email"}),l.jsx(Z,{type:"email",value:s.email||"",onChange:h=>c({...s,email:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Téléphone"}),l.jsx(Z,{value:s.phone||"",onChange:h=>c({...s,phone:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Société"}),l.jsx(Z,{value:s.company||"",onChange:h=>c({...s,company:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Site web"}),l.jsx(Z,{value:s.website||"",onChange:h=>c({...s,website:h.target.value})})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(Y,{children:"Tags (séparés par virgule)"}),l.jsx(Z,{value:(s.tags||[]).join(", "),onChange:h=>c({...s,tags:h.target.value.split(",").map(g=>
370g.trim()).filter(Boolean)})})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(Y,{children:"Source"}),l.jsx(Z,{value:s.source||"",onChange:h=>c({...s,source:h.target.value}),placeholder:"Instagram, Bouche à oreille, Site..."})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(Y,{children:"Notes"}),l.jsx(Xr,{value:s.notes||"",onChange:h=>c({...s,notes:h.target.value}),rows:4})]})]}),l.jsxs(tn,{children:[s?.id&&l.jsxs(Q,{variant:"outline",neon:!1,onClick:()=>{a.mutate(s.id),c(null)},children:[l.jsx(Zt,{className:"w-4 h-4 mr-1"})," Supprimer"]}),l.jsx(Q,{variant:"solid",onClick:()=>{!s?.first_name||!s?.last_name||n.mutate(s,{onSuccess:()=>c(null)})},children:"Enregistrer"})]})]})}),l.jsx(kt,{open:!!u,onOpenChange:h=>!h&&f(null),children:l.jsx(Dt,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:u&&l.jsx(E9,{client:u,revenue:r[u.id]||0,onEdit:()=>{c(u),f(null)}})})})]})},E9=({client:e,revenue:t,onEdit:r})=>{const{data:n=[]}=A9(e.id),a=N9(),[i,o]=O.useState({type:"note",subject:"",content:""});return l.jsxs(l.Fragment,{children:[l.jsx(It,{children:l.jsxs(Rt,{className:"flex items-center gap-3",children:[l.jsxs("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-pink-500 to-purple-500 text-white flex items-center justify-center font-semibold text-sm",children:[e.first_name[0],e.last_name[0]]}),l.jsxs("div",{children:[l.jsxs("div",{children:[e.first_name," ",e.last_name]}),e.company&&l.jsx("div",{className:"text-xs font-normal text-muted-foreground",children:e.company})]})]})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.email&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Wu,{className:"w-4 h-4 text-muted-foreground"}),e.email]}),e.phone&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(vs,{className:"w-4 h-4 text-muted-foreground"}),e.phone]}),e.website&&l.jsxs("div",{className:"flex items-center gap-2 col-span-2",children:[l.jsx(Gw,{className:"w-4 h-4 text-muted-foreground"}),l.jsx("a",{href:e.website,target:"_blank",rel:"noreferrer",className:"underline",children:e.website})]})]}),l.jsxs(ne,{className:"p-3 bg-gradient-to-br from-pink-500/10 to-purple-500/10 border-pink-500/20",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"CA généré (HT)"}),l.jsxs("div",{className:"text-2xl font-bold",children:[t.toLocaleString("fr-FR")," €"]})]}),e.tags&&e.tags.length>0&&l.jsx("div",{className:"flex flex-wrap gap-1",children:e.tags.map(s=>l.jsx(Ce,{variant:"secondary",children:s},s))}),e.notes&&l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground mb-1",children:"Notes"}),l.jsx("div",{className:"text-sm whitespace-pre-wrap",children:e.notes})]}),l.jsxs(ne,{className:"p-3 space-y-2",children:[l.jsxs("div",{className:"text-sm font-semibold flex items-center gap-1",children:[l.jsx(tj,{className:"w-4 h-4"}),"Ajouter une interaction"]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[l.jsxs(Tt,{value:i.type,onValueChange:s=>o({...i,type:s}),children:[l.jsx(bt,{children:l.jsx(Mt,{})}),l.jsx(xt,{children:Object.entries(Lv).map(([s,c])=>l.jsx(ke,{value:s,children:c},s))})]}),l.jsx(Z,{placeholder:"Sujet",className:"sm:col-span-2",value:i.subject,onChange:s=>o({...i,subject:s.target.value})})]}),l.jsx(Xr,{placeholder:"Détails...",rows:2,value:i.content,onChange:s=>o({...i,content:s.target.value})}),l.jsx(Q,{variant:"solid",size:"sm",onClick:()=>{a.mutate({client_id:e.id,...i},{onSuccess:()=>o({type:"note",subject:"",content:""})})},children:"Ajouter"})]}),l.jsxs("div",{children:[l.jsx("div",{className:"text-xs font-medium uppercase text-muted-foreground mb-2",children:"Historique"}),n.length===0?l.jsx("div",{className:"text-sm text-muted-foreground",children:"Aucune interaction"}):l.jsx("div",{className:"space-y-2",children:n.map(s=>l.jsxs("div",{className:"border-l-2 border-primary/40 pl-3 pb-2",children:[l.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[l.jsx(Ce,{variant:"outline",children:Lv[s.type]}),l.jsx("span",{className:"text-muted-foreground",children:new Date(s.occurred_at).toLocaleStr
370ing("fr-FR")})]}),s.subject&&l.jsx("div",{className:"font-medium text-sm mt-1",children:s.subject}),s.content&&l.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:s.content})]},s.id))})]})]}),l.jsx(tn,{children:l.jsxs(Q,{variant:"outline",neon:!1,onClick:r,children:[l.jsx(Ci,{className:"w-4 h-4 mr-1"}),"Modifier"]})})]})},Bv=[{key:"lead",label:"Lead",color:"from-slate-500 to-slate-600"},{key:"contacte",label:"Contacté",color:"from-blue-500 to-blue-600"},{key:"devis",label:"Devis envoyé",color:"from-amber-500 to-orange-500"},{key:"negociation",label:"Négociation",color:"from-purple-500 to-fuchsia-500"},{key:"gagne",label:"Gagné",color:"from-emerald-500 to-green-600"},{key:"perdu",label:"Perdu",color:"from-red-500 to-rose-600"}],T9={title:"",stage:"lead",value_ht:0,probability:50},M9=()=>{const{data:e=[]}=S9(),{data:t=[]}=pf(),r=O9(),n=_9(),[a,i]=O.useState(null),o=e.filter(d=>d.stage!=="perdu"&&d.stage!=="gagne").reduce((d,p)=>d+Number(p.value_ht||0),0),s=e.filter(d=>d.stage==="gagne").reduce((d,p)=>d+Number(p.value_ht||0),0),c=e.filter(d=>d.stage!=="perdu"&&d.stage!=="gagne").reduce((d,p)=>d+Number(p.value_ht||0)*(p.probability||0)/100,0),u=d=>{if(!d)return"—";const p=t.find(h=>h.id===d);return p?`${p.first_name} ${p.last_name}`:"—"},f=(d,p)=>{d.preventDefault();const h=d.dataTransfer.getData("dealId");h&&r.mutate({id:h,stage:p})};return l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsxs(ne,{className:"p-4 bg-gradient-to-br from-pink-500/10 to-purple-500/10 border-pink-500/20",children:[l.jsxs("div",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[l.jsx(Iu,{className:"w-3 h-3"}),"Pipeline actif"]}),l.jsxs("div",{className:"text-2xl font-bold",children:[o.toLocaleString("fr-FR")," €"]})]}),l.jsxs(ne,{className:"p-4",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"Pondéré (proba)"}),l.jsxs("div",{className:"text-2xl font-bold",children:[Math.round(c).toLocaleString("fr-FR")," €"]})]}),l.jsxs(ne,{className:"p-4",children:[l.jsx("div",{className:"text-xs text-muted-foreground",children:"Gagné (cumulé)"}),l.jsxs("div",{className:"text-2xl font-bold text-emerald-600",children:[s.toLocaleString("fr-FR")," €"]})]})]}),l.jsx("div",{className:"flex justify-end",children:l.jsxs(Q,{variant:"solid",onClick:()=>i(T9),children:[l.jsx(wt,{className:"w-4 h-4 mr-1"})," Nouveau deal"]})}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:Bv.map(d=>{const p=e.filter(g=>g.stage===d.key),h=p.reduce((g,m)=>g+Number(m.value_ht||0),0);return l.jsxs("div",{className:"min-h-[300px] rounded-lg bg-muted/30 p-2 flex flex-col",onDragOver:g=>g.preventDefault(),onDrop:g=>f(g,d.key),children:[l.jsxs("div",{className:`rounded-md px-2 py-1.5 mb-2 bg-gradient-to-r ${d.color} text-white`,children:[l.jsxs("div",{className:"flex items-center justify-between text-xs font-semibold",children:[l.jsx("span",{children:d.label}),l.jsx("span",{children:p.length})]}),l.jsxs("div",{className:"text-[10px] opacity-90",children:[h.toLocaleString("fr-FR")," €"]})]}),l.jsx("div",{className:"space-y-2 flex-1",children:p.map(g=>l.jsxs(ne,{draggable:!0,onDragStart:m=>m.dataTransfer.setData("dealId",g.id),className:"p-2 cursor-pointer hover:shadow-md transition text-xs",onClick:()=>i(g),children:[l.jsx("div",{className:"font-semibold truncate",children:g.title}),l.jsx("div",{className:"text-muted-foreground truncate",children:u(g.client_id)}),l.jsxs("div",{className:"mt-1 flex items-center justify-between",children:[l.jsxs("span",{className:"font-medium flex items-center gap-0.5",children:[l.jsx(sg,{className:"w-3 h-3"}),Number(g.value_ht||0).toLocaleString("fr-FR")]}),l.jsxs("span",{className:"text-muted-foreground",children:[g.probability,"%"]})]})]},g.id))})]},d.key)})}),l.jsx(kt,{open:!!a,onOpenChange:d=>!d&&i(null),children:l.jsxs(Dt,{children:[l.jsx(It,{children:l.jsx(Rt,{children:a?.id?"Modifier le deal":"Nouveau deal"})}),a&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Titre *"}),l.jsx(Z,{value:a.title||"",onChange:d=>i({...a,title:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Client"}),l.jsxs(Tt,{value:a.client_id||"none",onValueChange:d=>i({...a,client_id:d==="none"?null:d}),children:[l.jsx(bt,{children:l.jsx(Mt,{placeholder:"Aucun"})}),l.jsxs(xt,{children:[l.jsx(ke,{value:"none",children:"— Aucun —"}),t.map(d=>l.jsxs(ke,{value:d.id,children:[d.first_name," ",d.last_name,d.company?` (${d.company})`:""]},d.id))]})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Étape"}),l.jsxs(Tt,{value:a.stage,onValueChange:d=>i({...a,stage:d}),children:[l.jsx(bt,{children:l.jsx(Mt,{})}),l.jsx(xt,{children:Bv.map(d=>l.jsx(ke,{value:d.key,children:d.label},d.key))})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Valeur HT (€)"}),l.jsx(Z,{type:"number",value:a.value_ht??0,onChange:d=>i({...a,value_ht:Number(d.target.value)})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Probabilité (%)"}),l.jsx(Z,{type:"number",min:0,max:100,value:a.probability??50,onChange:d=>i({...a,probability:Number(d.target.value)})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Clôture prévue"}),l.jsx(Z,{type:"date",value:a.expected_close_date||"",onChange:d=>i({...a,expected_close_date:d.target.value})})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Notes"}),l.jsx(Xr,{rows:3,value:a.notes||"",onChange:d=>i({...a,notes:d.target.value})})]})]}),l.jsxs(tn,{children:[a?.id&&l.jsxs(Q,{variant:"outline",neon:!1,onClick:()=>{n.mutate(a.id),i(null)},children:[l.jsx(Zt,{className:"w-4 h-4 mr-1"})," Supprimer"]}),l.jsx(Q,{variant:"solid",onClick:()=>{a?.title&&r.mutate(a,{onSuccess:()=>i(null)})},children:"Enregistrer"})]})]})})]})},k9=()=>{const[e,t]=O.useState("clients");return l.jsxs(Ty,{value:e,onValueChange:t,className:"space-y-4",children:[l.jsxs(ad,{children:[l.jsxs(Sn,{value:"clients",className:"gap-2",children:[l.jsx(Ru,{className:"w-4 h-4"}),"Clients"]}),l.jsxs(Sn,{value:"pipeline",className:"gap-2",children:[l.jsx(Hw,{className:"w-4 h-4"}),"Pipeline"]})]}),l.jsx(On,{value:"clients",children:l.jsx($9,{})}),l.jsx(On,{value:"pipeline",children:l.jsx(M9,{})})]})},qv=()=>Array.from(crypto.getRandomValues(new Uint8Array(10))).map(e=>"abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"[e%56]).join(""),zv=e=>
370e?new Date(e).toLocaleString("fr-FR"):"jamais",D9=()=>{const{data:e=[],isLoading:t}=pf(),[r,n]=O.useState(""),[a,i]=O.useState(null),[o,s]=O.useState(""),c=e.find(d=>d.id===r),u=o.toLowerCase(),f=u?e.filter(d=>`${d.first_name} ${d.last_name} ${d.company??""} ${d.email??""}`.toLowerCase().includes(u)):e;return l.jsxs("div",{className:"space-y-4",children:[l.jsx(I9,{clients:e,onManageClient:n,onAccessClient:i}),l.jsxs(ne,{className:"p-4 space-y-3",children:[l.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2 justify-between",children:[l.jsxs("div",{className:"text-sm font-semibold",children:["Accès des clients (",e.length,")"]}),l.jsx(Z,{placeholder:"Rechercher un client...",value:o,onChange:d=>s(d.target.value),className:"sm:max-w-xs"})]}),t?l.jsx("div",{className:"text-sm text-muted-foreground",children:"Chargement..."}):f.length===0?l.jsx("div",{className:"text-sm text-muted-foreground",children:"Aucun client. Créez-le d'abord dans le CRM."}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2",children:f.map(d=>l.jsxs("div",{className:"border rounded-lg p-3 flex items-center justify-between gap-2",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsxs("div",{className:"font-medium text-sm truncate",children:[d.first_name," ",d.last_name]}),l.jsx("div",{className:"text-xs text-muted-foreground truncate",children:d.company||d.email||"-"}),l.jsx("div",{className:"mt-1",children:d.user_id?l.jsxs(Ce,{variant:"secondary",className:"text-xs gap-1",children:[l.jsx(cg,{className:"w-3 h-3"}),"Accès actif"]}):l.jsxs(Ce,{variant:"outline",className:"text-xs gap-1",children:[l.jsx(vg,{className:"w-3 h-3"}),"Pas d'accès"]})})]}),l.jsxs("div",{className:"flex flex-col gap-1 shrink-0",children:[l.jsxs(Q,{size:"sm",variant:"outline",neon:!1,onClick:()=>i(d),children:[l.jsx(Gu,{className:"w-3 h-3 mr-1"}),"Accès"]}),l.jsxs(Q,{size:"sm",variant:"outline",neon:!1,onClick:()=>window.open(`/espace?preview=${d.id}`,"_blank","noopener,noreferrer"),children:[l.jsx(hg,{className:"w-3 h-3 mr-1"}),"Voir son espace"]}),l.jsx(Q,{size:"sm",variant:"ghost",neon:!1,onClick:()=>n(d.id),children:"Gérer"})]})]},d.id))})]}),c&&l.jsxs(ne,{className:"p-4 space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"font-semibold",children:[c.first_name," ",c.last_name]}),l.jsx("button",{className:"text-xs text-muted-foreground underline",onClick:()=>n(""),children:"Fermer"})]}),l.jsx(L9,{clientId:c.id}),l.jsx(B9,{clientId:c.id})]}),l.jsx(R9,{client:a,onClose:()=>i(null)})]})},I9=({clients:e,onManageClient:t,onAccessClient:r})=>{const{data:n=[],isLoading:a}=uw(),i=O.useMemo(()=>n.map(x=>x.id),[n]),{data:o=[],isLoading:s}=dw(i,!0),c=zu(),[u,f]=O.useState("all"),[d,p]=O.useState(""),h=O.useMemo(()=>new Map(e.map(x=>[x.id,x])),[e]),g=O.useMemo(()=>new Map(n.map(x=>[x.id,x])),[n]),m=O.useMemo(()=>{const x=new Map;return o.forEach(A=>x.set(A.project_id,(x.get(A.project_id)??0)+1)),x},[o]),v=o.filter(x=>x.stage!=="livre").length,w=n.reduce((x,A)=>x+Math.max(A.video_count-(m.get(A.id)??0),0),0),S=x=>o.filter(A=>A.stage===x).length,j=o.map(x=>{const A=g.get(x.project_id),N=A?h.get(A.client_id):void 0;return{video:x,project:A,client:N}}).filter(({video:x,project:A,client:N})=>u==="a_creer"||u==="all"&&x.stage==="livre"||u!=="all"&&x.stage!==u?!1:`${x.title} ${A?.title??""} ${N?.first_name??""} ${N?.last_name??""} ${N?.company??""}`.toLowerCase().includes(d.trim().toLowerCase())).sort((x,A)=>$a[x.video.stage].percent-$a[A.video.stage].percent),_=n.filter(x=>{if((m.get(x.id)??0)>=x.video_count)return!1;const N=h.get(x.client_id);return`${x.title} ${N?.first_name??""} ${N?.last_name??""} ${N?.company??""}`.toLowerCase().includes(d.trim().toLowerCase())}),y=[{label:"À livrer",value:v+w,icon:Uw},{label:"À créer",value:w,icon:oc},{label:"En tournage",value:S("en_tournage"),icon:Fw},{label:"En montage",value:S("en_montage"),icon:oj},{label:"En révision",value:S("en_revision"),icon:ej},{label:"Livrées",value:S("livre"),icon:rj}],b=[{value:"all",label:"Toutes à livrer",count:v+w},{value:"a_creer",label:"À créer",count:w},{value:"en_attente",label:"En attente",count:S("en_attente")},{value:"en_tournage",label:"Tournage",count:S("en_tournage")},{value:"en_montage",label:"Montage",count:S("en_montage")},{value:"en_revision",label:"Révision",count:S("en_revision")},{value:"livre",label:"Livrées",count:S("livre")}];return l.jsxs("section",{className:"space-y-4","aria-label":"Pilotage des livraisons",children:[l.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-6",children:y.map(({label:x,value:A,icon:N},E)=>l.jsxs(ne,{className:`p-4 ${E===0?"border-primary/40 bg-primary/5":""}`,children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x}),l.jsx(N,{className:`h-4 w-4 ${E===0?"text-primary":"text-muted-foreground"}`})]}),l.jsx("div",{className:"mt-2 text-2xl font-bold tabular-nums",children:A})]},x))}),l.jsxs(ne,{className:"overflow-hidden",children:[l.jsxs("div",{className:"border-b p-4",children:[l.jsxs("div",{className:"flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[l.jsx(Fu,{className:"h-4 w-4 text-primary"}),"Suivi des vidéos"]}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"L’avancement de toutes les livraisons, client par client."})]}),l.jsxs("div",{className:"relative w-full xl:max-w-xs",children:[l.jsx(Ku,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),l.jsx(Z,{value:d,onChange:x=>p(x.target.value),placeholder:"Client, projet ou vidéo...",className:"pl-9"})]})]}),l.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-1",children:b.map(x=>l.jsxs(zr,{type:"button",size:"sm",variant:u===x.value?"default":"outline",onClick:()=>
370f(x.value),className:"shrink-0",children:[x.label,l.jsx("span",{className:"tabular-nums opacity-70",children:x.count})]},x.value))})]}),a||s?l.jsx("div",{className:"flex justify-center py-12",children:l.jsx($t,{className:"h-5 w-5 animate-spin text-primary"})}):l.jsxs("div",{className:"divide-y",children:[(u==="a_creer"||u==="all")&&_.map(x=>{const A=h.get(x.client_id),N=m.get(x.id)??0,E=x.video_count-N;return l.jsxs("div",{className:"grid gap-3 p-4 md:grid-cols-[minmax(180px,1fr)_minmax(180px,1fr)_140px_auto] md:items-center",children:[l.jsx(Fv,{client:A}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-sm font-medium",children:x.title}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[N,"/",x.video_count," vidéos créées"]})]}),l.jsxs(Ce,{variant:"outline",className:"w-fit gap-1 border-destructive/30 text-destructive",children:[l.jsx(oc,{className:"h-3 w-3"}),E," à créer"]}),l.jsxs(zr,{size:"sm",variant:"outline",onClick:()=>t(x.client_id),children:[l.jsx(yf,{className:"h-4 w-4"}),"Ouvrir"]})]},x.id)}),u!=="a_creer"&&j.map(({video:x,project:A,client:N})=>{const E=$a[x.stage];return l.jsxs("div",{className:"grid gap-3 p-4 md:grid-cols-[minmax(180px,1fr)_minmax(220px,1.4fr)_190px_80px_auto] md:items-center",children:[l.jsx(Fv,{client:N}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-sm font-semibold",children:x.title}),l.jsx("div",{className:"truncate text-xs text-muted-foreground",children:A?.title??"Projet introuvable"})]}),l.jsxs(Tt,{value:x.stage,onValueChange:P=>c.mutate({id:x.id,stage:P}),children:[l.jsx(bt,{className:"h-9",children:l.jsx(Mt,{})}),l.jsx(xt,{children:Object.entries($a).map(([P,$])=>l.jsx(ke,{value:P,children:$.label},P))})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:`h-full rounded-full ${E.color}`,style:{width:`${E.percent}%`}})}),l.jsxs("span",{className:"w-8 text-right text-xs font-semibold tabular-nums",children:[E.percent,"%"]})]}),l.jsxs("div",{className:"flex justify-end gap-1",children:[x.video_url&&l.jsx(zr,{size:"icon",variant:"ghost",asChild:!0,title:"Ouvrir la vidéo",children:l.jsx("a",{href:x.video_url,target:"_blank",rel:"noreferrer",children:l.jsx(Uu,{className:"h-4 w-4"})})}),A&&l.jsx(zr,{size:"icon",variant:"ghost",title:"Gérer le projet",onClick:()=>t(A.client_id),children:l.jsx(yf,{className:"h-4 w-4"})}),N&&l.jsx(zr,{size:"icon",variant:"ghost",title:"Gérer l’accès",onClick:()=>r(N),children:l.jsx(Gu,{className:"h-4 w-4"})})]})]},x.id)}),(u==="a_creer"&&_.length===0||u==="all"&&j.length===0&&_.length===0||u!=="a_creer"&&u!=="all"&&j.length===0)&&l.jsx("div",{className:"p-10 text-center text-sm text-muted-foreground",children:"Aucune vidéo dans cette vue."})]})]})]})},Fv=({client:e})=>l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-sm font-medium",children:e?`${e.first_name} ${e.last_name}`:"Client introuvable"}),l.jsx("div",{className:"truncate text-xs text-muted-foreground",children:e?.company||e?.email||"-"})]}),R9=({client:e,onClose:t})=>{const{data:r,isLoading:n}=fw(e?.id),a=pw(),[i,o]=O.useState(""),[s,c]=O.useState(""),[u,f]=O.useState(!0),[d,p]=O.useState(!1);O.useEffect(()=>{e&&(o(r?.email||e.email||""),c(qv()),f(!0),p(!1))},[e,r?.email]);const h=(m,v,w)=>a.mutate(m,{onSuccess:()=>mn({title:v,description:w})}),g=(m,v)=>{navigator.clipboard.writeText(m),mn({title:`${v} copié`})};return l.jsx(kt,{open:!!e,onOpenChange:m=>!m&&t(),children:l.jsxs(Dt,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[l.jsx(It,{children:l.jsxs(Rt,{children:["Accès espace client · ",e?.first_name," ",e?.last_name]})}),n?l.jsx("div",{className:"py-8 flex justify-center",children:l.jsx($t,{className:"w-5 h-5 animate-spin text-primary"})}):l.jsxs("div",{className:"space-y-5",children:[l.jsxs("div",{className:"rounded-xl border p-3 space-y-1 text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r?.has_access?l.jsxs(Ce,{variant:"secondary",className:"gap-1",children:[l.jsx(cg,{className:"w-3 h-3"}),"Accès actif"]}):l.jsxs(Ce,{variant:"outline",className:"gap-1",children:[l.jsx(vg,{className:"w-3 h-3"}),"Pas d'accès"]}
370),r?.blocked&&l.jsxs(Ce,{variant:"destructive",className:"gap-1",children:[l.jsx(wf,{className:"w-3 h-3"}),"Bloqué"]}),r?.must_change_password&&l.jsxs(Ce,{variant:"outline",className:"gap-1",children:[l.jsx(sc,{className:"w-3 h-3"}),"Mot de passe temporaire"]})]}),r?.has_access&&l.jsxs("div",{className:"text-xs text-muted-foreground space-y-0.5 pt-1",children:[l.jsxs("div",{children:["Email de connexion : ",l.jsx("span",{className:"text-foreground",children:r.email})]}),l.jsxs("div",{children:["Dernière connexion : ",zv(r.last_sign_in_at)]}),l.jsxs("div",{children:["Compte créé le : ",zv(r.created_at)]})]})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("div",{className:"text-sm font-semibold",children:r?.has_access?"Réinitialiser le mot de passe":"Créer l'accès"}),l.jsxs("div",{children:[l.jsx(Y,{children:"Email de connexion"}),l.jsx(Z,{type:"email",value:i,onChange:m=>o(m.target.value)})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Mot de passe"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Z,{value:s,onChange:m=>c(m.target.value)}),l.jsx(Q,{variant:"outline",neon:!1,size:"sm",onClick:()=>c(qv()),children:l.jsx(Sw,{className:"w-4 h-4"})}),l.jsx(Q,{variant:"ghost",neon:!1,size:"sm",onClick:()=>g(`${i} / ${s}`,"Identifiants"),children:l.jsx(gg,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3",children:[l.jsxs("div",{className:"pr-3",children:[l.jsx("div",{className:"text-sm font-medium",children:"Mot de passe temporaire"}),l.jsx("div",{className:"text-xs text-muted-foreground",children:"Le client devra choisir son propre mot de passe à la première connexion."})]}),l.jsx(ic,{checked:u,onCheckedChange:f})]}),l.jsx(Q,{variant:"solid",className:"w-full",disabled:a.isPending,onClick:()=>{if(!e||!i||s.length<8){mn({title:"Email et mot de passe (8 caractères min.) requis",variant:"destructive"});return}h({action:"set_password",client_id:e.id,email:i,password:s,temporary:u},r?.has_access?"Mot de passe réinitialisé":"Accès créé",`${i} / ${s}`)},children:a.isPending?"Enregistrement...":r?.has_access?"Réinitialiser l'accès":"Créer l'accès"})]}),r?.has_access&&e&&l.jsxs("div",{className:"space-y-2 border-t pt-4",children:[l.jsx("div",{className:"text-sm font-semibold",children:"Autres options"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[l.jsxs(Q,{variant:"outline",neon:!1,size:"sm",disabled:a.isPending,onClick:()=>{i&&h({action:"update_email",client_id:e.id,email:i},"Email de connexion mis à jour")},children:[l.jsx(Wu,{className:"w-3 h-3 mr-1"}),"Changer l'email"]}),l.jsxs(Q,{variant:"outline",neon:!1,size:"sm",disabled:a.isPending,onClick:()=>a.mutate({action:"reset_link",client_id:e.id,redirect_to:`${window.location.origin}/espace/reset-password`},{onSuccess:m=>{const v=m.link;v&&(navigator.clipboard.writeText(v),mn({title:"Lien de réinitialisation copié",description:"Envoyez-le au client."}))}}),children:[l.jsx(Qw,{className:"w-3 h-3 mr-1"}),"Lien de réinitialisation"]}),l.jsxs(Q,{variant:"outline",neon:!1,size:"sm",disabled:a.isPending,onClick:()=>h({action:"force_password_change",client_id:e.id,value:!r.must_change_password},r.must_change_password?"Changement de mot de passe non obligatoire":"Changement de mot de passe imposé"),children:[l.jsx(sc,{className:"w-3 h-3 mr-1"}),r.must_change_password?"Ne plus imposer":"Imposer un nouveau mdp"]}),l.jsxs(Q,{variant:"outline",neon:!1,size:"sm",disabled:a.isPending,onClick:()=>h({action:"set_blocked",client_id:e.id,value:!r.blocked},r.blocked?"Accès débloqué":"Accès bloqué"),children:[l.jsx(wf,{className:"w-3 h-3 mr-1"}),r.blocked?"Débloquer":"Bloquer l'accès"]}),l.jsxs(Q,{variant:"outline",neon:!1,size:"sm",disabled:a.isPending,onClick:()=>h({action:"unlink",client_id:e.id},"Compte détaché de la fiche client"),children:[l.jsx(lj,{className:"w-3 h-3 mr-1"}),"Détacher le compte"]}),l.jsxs(Q,{variant:"ghost",neon:!1,size:"sm",className:"text-destructive",disabled:a.isPending,onClick:()=>{if(!d){p(!0),mn({title:"Cliquez à nouveau pour confirmer la suppression"});return}h({action:"delete_access",client_id:e.id},"Accès supprimé"),p(!1)},children:[l.jsx(Zt,{className:"w-3 h-3 mr-1"}),d?"Confirmer":"Supprimer l'accès"]}
370)]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Connexion client : ",window.location.origin,"/espace/connexion"]})]})]}),l.jsx(tn,{children:l.jsx(Q,{variant:"ghost",neon:!1,onClick:t,children:"Fermer"})})]})})},L9=({clientId:e})=>{const{data:t=[]}=hw(e),r=mw(),n=vw(),[a,i]=O.useState(null);return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"text-sm font-semibold",children:["Projets (",t.length,")"]}),l.jsxs(Q,{size:"sm",variant:"solid",onClick:()=>i({client_id:e,title:"",video_count:1,status:"en_cours",project_date:new Date().toISOString().slice(0,10)}),children:[l.jsx(wt,{className:"w-3 h-3 mr-1"}),"Projet"]})]}),t.map(o=>l.jsx(q9,{project:o,onEdit:()=>i(o),onDelete:()=>n.mutate(o.id)},o.id)),l.jsx(kt,{open:!!a,onOpenChange:o=>!o&&i(null),children:l.jsxs(Dt,{children:[l.jsx(It,{children:l.jsx(Rt,{children:a?.id?"Modifier le projet":"Nouveau projet"})}),a&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Titre *"}),l.jsx(Z,{value:a.title||"",onChange:o=>i({...a,title:o.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Nombre de vidéos"}),l.jsx(Z,{type:"number",min:1,value:a.video_count??1,onChange:o=>i({...a,video_count:Number(o.target.value)})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Date"}),l.jsx(Z,{type:"date",value:a.project_date||"",onChange:o=>i({...a,project_date:o.target.value})})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Statut"}),l.jsxs(Tt,{value:a.status||"en_cours",onValueChange:o=>i({...a,status:o}),children:[l.jsx(bt,{children:l.jsx(Mt,{})}),l.jsx(xt,{children:Object.entries(lg).map(([o,s])=>l.jsx(ke,{value:o,children:s},o))})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Lien de livraison"}),l.jsx(Z,{value:a.delivery_url||"",onChange:o=>i({...a,delivery_url:o.target.value}),placeholder:"https://..."})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Notes (visibles par le client)"}),l.jsx(Xr,{rows:3,value:a.notes||"",onChange:o=>i({...a,notes:o.target.value})})]})]}),l.jsx(tn,{children:l.jsx(Q,{variant:"solid",onClick:()=>{a?.title&&r.mutate({...a,client_id:e},{onSuccess:()=>i(null)})},children:"Enregistrer"})})]})})]})},B9=({clientId:e})=>{const{data:t=[]}=gw(e),r=yw(),n=bw(),[a,i]=O.useState(null);return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"text-sm font-semibold",children:["Factures (",t.length,")"]}),l.jsxs(Q,{size:"sm",variant:"solid",onClick:()=>i({client_id:e,number:"",label:"",amount_ht:0,vat_rate:20,status:"envoyee",issue_date:new Date().toISOString().slice(0,10)}),children:[l.jsx(wt,{className:"w-3 h-3 mr-1"}),"Facture"]})]}),t.map(o=>l.jsxs("div",{className:"border rounded-lg p-3 flex items-center gap-2 text-sm",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"font-medium truncate",children:[o.number," · ",o.label]}),l.jsxs("div",{className:"text-xs text-muted-foreground",children:[new Date(o.issue_date).toLocaleDateString("fr-FR")," · ",Number(o.amount_ht).toLocaleString("fr-FR")," € HT"]})]}),l.jsx(Ce,{variant:"outline",children:bf[o.status]}),l.jsx("button",{className:"text-xs underline",onClick:()=>i(o),children:"Modifier"}),l.jsx("button",{className:"text-destructive",onClick:()=>n.mutate(o.id),children:l.jsx(Zt,{className:"w-4 h-4"})})]},o.id)),l.jsx(kt,{open:!!a,onOpenChange:o=>!o&&i(null),children:l.jsxs(Dt,{children:[l.jsx(It,{children:l.jsx(Rt,{children:a?.id?"Modifier la facture":"Nouvelle facture"})}),a&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Numéro *"}),l.jsx(Z,{value:a.number||"",onChange:o=>i({...a,number:o.target.value}),placeholder:"F-2026-001"})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Date d'émission"}),l.jsx(Z,{type:"date",value:a.issue_date||"",onChange:o=>i({...a,issue_date:o.target.value})})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Libellé *"}),l.jsx(Z,{value:a.label||"",onChange:o=>i({...a,label:o.target.value}),placeholder:"Pack 6 vidéos"})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Montant HT"}),l.jsx(Z,{type:"number",step:"0.01",value:a.amount_ht??0,onChange:o=>i({...a,amount_ht:Number(o.target.value)})})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"TVA (%)"}),l.jsx(Z,{type:"number",step:"0.01",value:a.vat_rate??20,onChange:o=>i({...a,vat_rate:Number(o.target.value)})})]})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(Y,{children:"Statut"}),l.jsxs(Tt,{value:a.status||"envoyee",onValueChange:o=>i({...a,status:o}),children:[l.jsx(bt,{children:l.jsx(Mt,{})}),l.jsx(xt,{children:Object.entries(bf).map(([o,s])=>l.jsx(ke,{value:o,children:s},o))})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Échéance"}),l.jsx(Z,{type:"date",value:a.due_date||"",onChange:o=>i({...a,due_date:o.target.value})})]})]}),l.jsxs("div",{children:[l.jsx(Y,{children:"Lien du PDF"}),l.jsx(Z,{value:a.pdf_url||"",onChange:o=>i({...a,pdf_url:o.target.value}),placeholder:"https://..."})]})]}),l.jsx(tn,{children:l.jsx(Q,{variant:"solid",onClick:()=>{!a?.number||!a?.label||r.mutate({...a,client_id:e,due_date:a.due_date||null},{onSuccess:()=>i(null)})},children:"Enregistrer"})})]})})]})},q9=({project:e,onEdit:t,onDelete:r})=>{const[n,a]=O.useState(!1),{data:i=[]}=xw(e.id,!0),o=ww(i,e.status);return l.jsxs("div",{className:"border rounded-lg text-sm",children:[l.jsxs("div",{className:"p-3 flex items-center gap-2",children:[l.jsx("button",{className:"text-muted-foreground",onClick:()=>a(s=>!s),children:n?l.jsx(Vu,{className:"w-4 h-4"}):l.jsx(mg,{className:"w-4 h-4"})}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"font-medium truncate",children:[e.title," · ",e.video_count," vidéo(s)"]}),l.jsx("div",{className:"text-xs text-muted-foreground",children:new Date(e.project_date).toLocaleDateString("fr-FR")}),l.jsx("div",{className:"mt-1.5 h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-muted",children:l.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-primary to-accent",style:{width:`${o}%`}})})]}),l.jsxs("span",{className:"text-xs font-semibold",children:[o,"%"]}),l.jsx(Ce,{variant:"outline",children:lg[e.status]}),l.jsx("button",{className:"text-xs underline",onClick:t,children:"Modifier"}),l.jsx("button",{className:"text-destructive",onClick:r,children:l.jsx(Zt,{className:"w-4 h-4"})})]}),n&&l.jsx(F9,{projectId:e.id,videos:i})]})},z9=({video:e,onDelete:t})=>{const r=zu(),[n,a]=O.useState(e.title),[i,o]=O.useState(e.video_url||"");O.useEffect(()=>{a(e.title),o(e.video_url||"")},[e.id,e.title,e.video_url]);const s=n!==e.title||i!==(e.video_url||""),c=(u={})=>r.mutate({id:e.id,title:n.trim()||e.title,video_url:i.trim()||null,...u},{onSuccess:()=>mn({title:"Vidéo enregistrée"})});return l.jsxs("div",{className:"rounded-lg border bg-background p-2 flex flex-col sm:flex-row sm:items-center gap-2",children:[l.jsx(Z,{className:"h-8 flex-1",value:n,onChange:u=>a(u.target.value)}),l.jsxs(Tt,{value:e.stage,onValueChange:u=>c({stage:u}),children:[l.jsx(bt,{className:"h-8 sm:w-44",children:l.jsx(Mt,{})}),l.jsx(xt,{children:Object.entries($a).map(([u,f])=>l.jsxs(ke,{value:u,children:[f.label," · ",f.percent,"%"]},u))})]}),l.jsx(Z,{className:"h-8 sm:w-48",placeholder:"Lien de la vidéo",value:i,onChange:u=>o(u.target.value)}),l.jsx(Q,{size:"sm",variant:s?"solid":"ghost",neon:!1,disabled:!s||r.isPending,onClick:()=>c(),children:r.isPending?l.jsx($t,{className:"w-3 h-3 animate-spin"}):"Enregistrer"}),l.jsx("button",{className:"text-destructive self-end sm:self-auto",onClick:t,children:l.jsx(Zt,{className:"w-4 h-4"})})]})},F9=({projectId:e,videos:t})=>{const r=zu(),n=jw(),[a,i]=O.useState("");return l.jsxs("div",{className:"border-t p-3 space-y-2 bg-muted/30",children:[l.jsxs("div",{className:"text-xs font-semibold text-muted-foreground",children:["Suivi des vidéos (",t.length,")"]}),t.map(o=>l.jsx(z9,{video:o,onDelete:()=>n.mutate(o.id)},o.id)),l.jsxs("div",{className:"flex gap-2",children:[l.jsx(Z,{className:"h-8",placeholder:"Nom de la vidéo (ex: Micro-trottoir #1)",value:a,onChange:o=>i(o.target.value)}),l.jsxs(Q,{size:"sm",variant:"outline",neon:!1,onClick:()=>{a.trim()&&r.mutate({project_id:e,title:a.trim(),stage:"en_attente",display_order:t.length},{onSuccess:()=>i("")})},children:[l.jsx(wt,{className:"w-3 h-3 mr-1"}),"Ajouter"]})]})]})},U9=[{title:"Vidéos",url:"/admin/videos",icon:Zw},{title:"Catégories",url:"/admin/categories",icon:xg},{title:"Études de cas",url:"/admin/case-studies",icon:Iw},{title:"Briefs",url:"/admin/briefs",icon:Yw},{title:"CRM",url:"/admin/crm",icon:Ru},{title:"Livraisons clients",url:"/admin/espace-client",icon:Gu},{title:"Finance",url:"/admin/finance",icon:qw},{title:"Sales",url:"/admin/sales",icon:Xw}],V9=()=>{const{state:e}=$i(),t=e==="collapsed",{pathname:r}=z1(),n=a=>r===a||r==="/admin"&&a==="/admin/videos";return l.jsx(Ng,{collapsible:"icon",children:l.jsxs(Cg,{children:[l.jsxs("div",{className:"p-3 flex items-center gap-2 border-b",children:[l.jsx("img",{src:Z1,alt:"Tribu",className:"h-7"}),!t&&l.jsx("span",{className:"font-semibold",children:"Admin"})]}),l.jsxs($g,{children:[l.jsx(Eg,{children:"Gestion"}),l.jsx(Tg,{children:l.jsx(Mg,{children:U9.map(a=>l.jsx(kg,{children:l.jsx(Dg,{asChild:!0,isActive:n(a.url),children:l.jsxs(F1,{to:a.url,className:"flex items-center gap-2",children:[l.jsx(a.icon,{className:"h-4 w-4"}),!t&&l.jsx("span",{children:a.title})]})})},a.title))})})]})]})})},Uv={videos:{title:"Gestion des vidéos",subtitle:"Glissez-déposez les vidéos pour les organiser"},categories:{title:"Catégories",subtitle:"Organisez vos vidéos par catégories"}
370,"case-studies":{title:"Études de cas",subtitle:"Gérez vos études de cas clients"},briefs:{title:"Briefs créatifs",subtitle:"Réponses au questionnaire client"},crm:{title:"CRM",subtitle:"Base clients et pipeline commercial"},"espace-client":{title:"Livraisons clients",subtitle:"Vidéos à produire, avancement et espaces clients"},finance:{title:"Finance",subtitle:"Suivi de la trésorerie et de la rentabilité"},sales:{title:"Sales",subtitle:"Outils de vente et argumentaires"}},PH=()=>{const{user:e,isAdmin:t,loading:r,signOut:n}=Q1(),{tab:a}=U1(),i=a&&Uv[a]?a:"videos",o=V1(),{data:s=[],isLoading:c}=ag(),[u,f]=O.useState(!1),[d,p]=O.useState(null);if(O.useEffect(()=>{!r&&!e&&o("/auth")},[e,r,o]),r)return l.jsx("div",{className:"min-h-screen flex items-center justify-center",children:l.jsx($t,{className:"h-8 w-8 animate-spin text-primary"})});if(!e)return null;if(!t)return l.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center gap-4 p-4",children:[l.jsx(sc,{className:"h-16 w-16 text-destructive"}),l.jsx("h1",{className:"text-2xl font-bold",children:"Accès refusé"}),l.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Vous n'avez pas les droits d'administration."}),l.jsxs(Q,{onClick:async()=>{await n(),o("/")},variant:"outline",neon:!1,children:[l.jsx(xf,{className:"h-4 w-4 mr-2"})," Se déconnecter"]})]});const h=Uv[i];return l.jsx(Ag,{children:l.jsxs("div",{className:"min-h-screen flex w-full bg-background",children:[l.jsx(V9,{}),l.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[l.jsxs("header",{className:"sticky top-0 z-40 h-14 border-b bg-background/95 backdrop-blur flex items-center justify-between px-4",children:[l.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[l.jsx(Pg,{}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h1",{className:"text-sm font-semibold truncate",children:h.title}),l.jsx("p",{className:"text-xs text-muted-foreground truncate hidden sm:block",children:h.subtitle})]})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-xs text-muted-foreground hidden md:inline",children:e.email}),l.jsxs(Q,{variant:"ghost",size:"sm",neon:!1,onClick:async()=>{await n(),o("/")},children:[l.jsx(xf,{className:"h-4 w-4 sm:mr-2"}),l.jsx("span",{className:"hidden sm:inline",children:"Déconnexion"})]})]})]}),l.jsxs("main",{className:"flex-1 p-4 md:p-6 overflow-x-hidden",children:[i==="videos"&&l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex justify-end",children:l.jsxs(Q,{onClick:()=>{p(null),f(!0)},variant:"solid",children:[l.jsx(wt,{className:"h-4 w-4 mr-2"})," Ajouter une vidéo"]})}),c?l.jsx("div",{className:"flex items-center justify-center py-16",children:l.jsx($t,{className:"h-8 w-8 animate-spin text-primary"})}):l.jsx(FO,{videos:s,onEdit:g=>{p(g),f(!0)}})]}),i==="categories"&&l.jsx(UO,{}),i==="case-studies"&&l.jsx(WO,{}),i==="briefs"&&l.jsx(x9,{}),i==="crm"&&l.jsx(k9,{}),i==="espace-client"&&l.jsx(D9,{}),i==="finance"&&l.jsx(JW,{}),i==="sales"&&l.jsx(g9,{})]})]}),l.jsx(kj,{open:u,onOpenChange:f,video:d})]})})};export{PH as default};

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