@astrato-io/visualizations 0.6.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/THIRD_PARTY_NOTICES.md +2 -229
- package/VISUALIZATION_DEFINITIONS.md +68 -114
- package/chunks/Button-BrGKp9Nm.js +110 -0
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
- package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
- package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
- package/chunks/MenuOption-ByRqhRdX.js +3934 -0
- package/chunks/Title-CO5dP1ma.js +1691 -0
- package/chunks/ToggleButton-KOBAimC1.js +112 -0
- package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
- package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
- package/chunks/builder-DEDvNq1k.js +201 -0
- package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
- package/chunks/color-settings-3VRlf_Vw.js +6 -0
- package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
- package/chunks/coloring-CncX_JRX.js +278 -0
- package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
- package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
- package/chunks/event-bus-CrLB-Y8z.js +3 -0
- package/chunks/extend-preset-CUFNpmPe.js +4398 -0
- package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
- package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
- package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
- package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
- package/chunks/isEqual-B8loyPsC.js +12 -0
- package/chunks/label-format-type-weq1XfcX.js +8 -0
- package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
- package/chunks/logger-DpQtYQnX.js +1163 -0
- package/chunks/lookup-BWllin0q.js +36 -0
- package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
- package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
- package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
- package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
- package/chunks/render-wrappers-OEmtaM8g.js +2 -0
- package/chunks/{registry-CsQQzukD.js → requirements-Dvd8jqYF.js} +218 -222
- package/chunks/responsive.styles-DSiOGD7u.js +82 -0
- package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
- package/chunks/src-77e3mC7i.js +391 -0
- package/chunks/standalone-B55oyW6c.js +689 -0
- package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
- package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
- package/chunks/standalone-BMTCb10X.js +179 -0
- package/chunks/standalone-BXKRE_Se.js +468 -0
- package/chunks/standalone-Bes8srx1.js +354 -0
- package/chunks/standalone-BjZp0QMe.js +2 -0
- package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
- package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
- package/chunks/standalone-C8qAelL4.js +2 -0
- package/chunks/standalone-CJvIXsQE.js +743 -0
- package/chunks/standalone-CLmGb7nn2.js +355 -0
- package/chunks/standalone-CM5XcAN5.js +52327 -0
- package/chunks/standalone-CXNP6-xD.js +420 -0
- package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
- package/chunks/standalone-DLlyRIE6.js +287 -0
- package/chunks/standalone-DMcI1afI.js +396 -0
- package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
- package/chunks/standalone-DT0wKji7.js +6 -0
- package/chunks/standalone-DW6NT205.js +518 -0
- package/chunks/standalone-DYQIQH4c.js +2095 -0
- package/chunks/standalone-D__XCp-h.js +1003 -0
- package/chunks/standalone-XTgSsTAa.js +354 -0
- package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
- package/chunks/{standalone-0M4HlmDW2.js → standalone-vBnBS2YC.js} +1047 -964
- package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
- package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
- package/chunks/useFieldName-Cjn9KCVp.js +7 -0
- package/chunks/useSlotProps-DLbQp4lc.js +166 -0
- package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
- package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
- package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
- package/chunks/with-html-element-D0uY2zjI.js +7328 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +31 -14
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +3 -3
- package/docs/operations/distribution-gauge.md +13 -13
- package/docs/operations/dot.md +13 -13
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +13 -13
- package/docs/operations/heatMap.md +13 -13
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +3 -3
- package/docs/operations/line.md +7 -7
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +13 -13
- package/docs/operations/radar.md +7 -7
- package/docs/operations/sankey.md +13 -13
- package/docs/operations/scatter.md +13 -13
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +18 -1
- package/docs/operations/tree.md +51 -37
- package/docs/operations/treemap.md +63 -49
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +13 -13
- package/getters.js +7 -7
- package/index.js +419 -417
- package/metadata.js +17 -18
- package/operations.js +13 -13
- package/package.json +70 -55
- package/src/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
- package/src/definitions/model/definitions/index.d.ts +1 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
- package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/getters/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +1 -0
- package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
- package/chunks/builder-B6dWSIdD.js +0 -12289
- package/chunks/coloring-B1XAfg6b.js +0 -664
- package/chunks/events-WZut5Ow6.js +0 -4
- package/chunks/grouping-type-On4s9Thj.js +0 -3
- package/chunks/requirements-DYjZCFyf.js +0 -6
- package/chunks/standalone-0ashe9w1.js +0 -411
- package/chunks/standalone-B7jax8wa.js +0 -339
- package/chunks/standalone-BK0VYU-l.js +0 -463
- package/chunks/standalone-BZV5vOwA.js +0 -6
- package/chunks/standalone-BhDrWj4p.js +0 -1980
- package/chunks/standalone-BvaKdky9.js +0 -344
- package/chunks/standalone-BwtM31-f.js +0 -2
- package/chunks/standalone-CC1VUjO32.js +0 -299
- package/chunks/standalone-CoLrAxRV.js +0 -13198
- package/chunks/standalone-DCtRoTWg.js +0 -675
- package/chunks/standalone-DUDFTBqL.js +0 -833
- package/chunks/standalone-DhZkX9Td.js +0 -2
- package/chunks/standalone-DtLElfuM.js +0 -512
- package/chunks/standalone-G9Q4Uczu.js +0 -726
- package/chunks/standalone-_DeX21JJ.js +0 -383
- package/chunks/standalone-gFhKZh8m.js +0 -179
- package/chunks/standalone-tDNy-SFH.js +0 -281
- package/chunks/ui-DQWtv2iM.js +0 -63551
- package/chunks/useFieldName-BvdcoJRl.js +0 -7
|
@@ -0,0 +1,3934 @@
|
|
|
1
|
+
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
+
import { Hi as n } from "./visualization-filters-Cc4KU-l-.js";
|
|
3
|
+
import { $r as r, An as i, B as a, Bt as o, Di as s, Ei as c, G as l, Q as u, Qr as d, Ti as f, Vt as p, W as m, Y as h, Yr as g, br as _, ln as v, lr as y, qr as b, r as x, ri as S, rt as C, tr as w, un as T, wi as E } from "./utils-vdmi_2PK.js";
|
|
4
|
+
import "./logger-DpQtYQnX.js";
|
|
5
|
+
import { c as D, d as O, i as k, l as A, r as j, t as M, u as N } from "./DefaultPropsProvider-BsfB7QTn.js";
|
|
6
|
+
import { c as P, f as F, i as ee, l as I, n as L, t as R } from "./useSlotProps-DLbQp4lc.js";
|
|
7
|
+
import { a as z, c as B, g as V, l as H, m as U, n as W, s as te, t as G, u as ne } from "./Title-CO5dP1ma.js";
|
|
8
|
+
import "./coloring-CncX_JRX.js";
|
|
9
|
+
import { a as re, d as ie, f as K } from "./responsive.styles-DSiOGD7u.js";
|
|
10
|
+
var ae = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.left = "left", e.right = "right", e;
|
|
12
|
+
}({}), oe = /* @__PURE__ */ t(((e, t) => {
|
|
13
|
+
t.exports = {
|
|
14
|
+
aliceblue: [
|
|
15
|
+
240,
|
|
16
|
+
248,
|
|
17
|
+
255
|
|
18
|
+
],
|
|
19
|
+
antiquewhite: [
|
|
20
|
+
250,
|
|
21
|
+
235,
|
|
22
|
+
215
|
|
23
|
+
],
|
|
24
|
+
aqua: [
|
|
25
|
+
0,
|
|
26
|
+
255,
|
|
27
|
+
255
|
|
28
|
+
],
|
|
29
|
+
aquamarine: [
|
|
30
|
+
127,
|
|
31
|
+
255,
|
|
32
|
+
212
|
|
33
|
+
],
|
|
34
|
+
azure: [
|
|
35
|
+
240,
|
|
36
|
+
255,
|
|
37
|
+
255
|
|
38
|
+
],
|
|
39
|
+
beige: [
|
|
40
|
+
245,
|
|
41
|
+
245,
|
|
42
|
+
220
|
|
43
|
+
],
|
|
44
|
+
bisque: [
|
|
45
|
+
255,
|
|
46
|
+
228,
|
|
47
|
+
196
|
|
48
|
+
],
|
|
49
|
+
black: [
|
|
50
|
+
0,
|
|
51
|
+
0,
|
|
52
|
+
0
|
|
53
|
+
],
|
|
54
|
+
blanchedalmond: [
|
|
55
|
+
255,
|
|
56
|
+
235,
|
|
57
|
+
205
|
|
58
|
+
],
|
|
59
|
+
blue: [
|
|
60
|
+
0,
|
|
61
|
+
0,
|
|
62
|
+
255
|
|
63
|
+
],
|
|
64
|
+
blueviolet: [
|
|
65
|
+
138,
|
|
66
|
+
43,
|
|
67
|
+
226
|
|
68
|
+
],
|
|
69
|
+
brown: [
|
|
70
|
+
165,
|
|
71
|
+
42,
|
|
72
|
+
42
|
|
73
|
+
],
|
|
74
|
+
burlywood: [
|
|
75
|
+
222,
|
|
76
|
+
184,
|
|
77
|
+
135
|
|
78
|
+
],
|
|
79
|
+
cadetblue: [
|
|
80
|
+
95,
|
|
81
|
+
158,
|
|
82
|
+
160
|
|
83
|
+
],
|
|
84
|
+
chartreuse: [
|
|
85
|
+
127,
|
|
86
|
+
255,
|
|
87
|
+
0
|
|
88
|
+
],
|
|
89
|
+
chocolate: [
|
|
90
|
+
210,
|
|
91
|
+
105,
|
|
92
|
+
30
|
|
93
|
+
],
|
|
94
|
+
coral: [
|
|
95
|
+
255,
|
|
96
|
+
127,
|
|
97
|
+
80
|
|
98
|
+
],
|
|
99
|
+
cornflowerblue: [
|
|
100
|
+
100,
|
|
101
|
+
149,
|
|
102
|
+
237
|
|
103
|
+
],
|
|
104
|
+
cornsilk: [
|
|
105
|
+
255,
|
|
106
|
+
248,
|
|
107
|
+
220
|
|
108
|
+
],
|
|
109
|
+
crimson: [
|
|
110
|
+
220,
|
|
111
|
+
20,
|
|
112
|
+
60
|
|
113
|
+
],
|
|
114
|
+
cyan: [
|
|
115
|
+
0,
|
|
116
|
+
255,
|
|
117
|
+
255
|
|
118
|
+
],
|
|
119
|
+
darkblue: [
|
|
120
|
+
0,
|
|
121
|
+
0,
|
|
122
|
+
139
|
|
123
|
+
],
|
|
124
|
+
darkcyan: [
|
|
125
|
+
0,
|
|
126
|
+
139,
|
|
127
|
+
139
|
|
128
|
+
],
|
|
129
|
+
darkgoldenrod: [
|
|
130
|
+
184,
|
|
131
|
+
134,
|
|
132
|
+
11
|
|
133
|
+
],
|
|
134
|
+
darkgray: [
|
|
135
|
+
169,
|
|
136
|
+
169,
|
|
137
|
+
169
|
|
138
|
+
],
|
|
139
|
+
darkgreen: [
|
|
140
|
+
0,
|
|
141
|
+
100,
|
|
142
|
+
0
|
|
143
|
+
],
|
|
144
|
+
darkgrey: [
|
|
145
|
+
169,
|
|
146
|
+
169,
|
|
147
|
+
169
|
|
148
|
+
],
|
|
149
|
+
darkkhaki: [
|
|
150
|
+
189,
|
|
151
|
+
183,
|
|
152
|
+
107
|
|
153
|
+
],
|
|
154
|
+
darkmagenta: [
|
|
155
|
+
139,
|
|
156
|
+
0,
|
|
157
|
+
139
|
|
158
|
+
],
|
|
159
|
+
darkolivegreen: [
|
|
160
|
+
85,
|
|
161
|
+
107,
|
|
162
|
+
47
|
|
163
|
+
],
|
|
164
|
+
darkorange: [
|
|
165
|
+
255,
|
|
166
|
+
140,
|
|
167
|
+
0
|
|
168
|
+
],
|
|
169
|
+
darkorchid: [
|
|
170
|
+
153,
|
|
171
|
+
50,
|
|
172
|
+
204
|
|
173
|
+
],
|
|
174
|
+
darkred: [
|
|
175
|
+
139,
|
|
176
|
+
0,
|
|
177
|
+
0
|
|
178
|
+
],
|
|
179
|
+
darksalmon: [
|
|
180
|
+
233,
|
|
181
|
+
150,
|
|
182
|
+
122
|
|
183
|
+
],
|
|
184
|
+
darkseagreen: [
|
|
185
|
+
143,
|
|
186
|
+
188,
|
|
187
|
+
143
|
|
188
|
+
],
|
|
189
|
+
darkslateblue: [
|
|
190
|
+
72,
|
|
191
|
+
61,
|
|
192
|
+
139
|
|
193
|
+
],
|
|
194
|
+
darkslategray: [
|
|
195
|
+
47,
|
|
196
|
+
79,
|
|
197
|
+
79
|
|
198
|
+
],
|
|
199
|
+
darkslategrey: [
|
|
200
|
+
47,
|
|
201
|
+
79,
|
|
202
|
+
79
|
|
203
|
+
],
|
|
204
|
+
darkturquoise: [
|
|
205
|
+
0,
|
|
206
|
+
206,
|
|
207
|
+
209
|
|
208
|
+
],
|
|
209
|
+
darkviolet: [
|
|
210
|
+
148,
|
|
211
|
+
0,
|
|
212
|
+
211
|
|
213
|
+
],
|
|
214
|
+
deeppink: [
|
|
215
|
+
255,
|
|
216
|
+
20,
|
|
217
|
+
147
|
|
218
|
+
],
|
|
219
|
+
deepskyblue: [
|
|
220
|
+
0,
|
|
221
|
+
191,
|
|
222
|
+
255
|
|
223
|
+
],
|
|
224
|
+
dimgray: [
|
|
225
|
+
105,
|
|
226
|
+
105,
|
|
227
|
+
105
|
|
228
|
+
],
|
|
229
|
+
dimgrey: [
|
|
230
|
+
105,
|
|
231
|
+
105,
|
|
232
|
+
105
|
|
233
|
+
],
|
|
234
|
+
dodgerblue: [
|
|
235
|
+
30,
|
|
236
|
+
144,
|
|
237
|
+
255
|
|
238
|
+
],
|
|
239
|
+
firebrick: [
|
|
240
|
+
178,
|
|
241
|
+
34,
|
|
242
|
+
34
|
|
243
|
+
],
|
|
244
|
+
floralwhite: [
|
|
245
|
+
255,
|
|
246
|
+
250,
|
|
247
|
+
240
|
|
248
|
+
],
|
|
249
|
+
forestgreen: [
|
|
250
|
+
34,
|
|
251
|
+
139,
|
|
252
|
+
34
|
|
253
|
+
],
|
|
254
|
+
fuchsia: [
|
|
255
|
+
255,
|
|
256
|
+
0,
|
|
257
|
+
255
|
|
258
|
+
],
|
|
259
|
+
gainsboro: [
|
|
260
|
+
220,
|
|
261
|
+
220,
|
|
262
|
+
220
|
|
263
|
+
],
|
|
264
|
+
ghostwhite: [
|
|
265
|
+
248,
|
|
266
|
+
248,
|
|
267
|
+
255
|
|
268
|
+
],
|
|
269
|
+
gold: [
|
|
270
|
+
255,
|
|
271
|
+
215,
|
|
272
|
+
0
|
|
273
|
+
],
|
|
274
|
+
goldenrod: [
|
|
275
|
+
218,
|
|
276
|
+
165,
|
|
277
|
+
32
|
|
278
|
+
],
|
|
279
|
+
gray: [
|
|
280
|
+
128,
|
|
281
|
+
128,
|
|
282
|
+
128
|
|
283
|
+
],
|
|
284
|
+
green: [
|
|
285
|
+
0,
|
|
286
|
+
128,
|
|
287
|
+
0
|
|
288
|
+
],
|
|
289
|
+
greenyellow: [
|
|
290
|
+
173,
|
|
291
|
+
255,
|
|
292
|
+
47
|
|
293
|
+
],
|
|
294
|
+
grey: [
|
|
295
|
+
128,
|
|
296
|
+
128,
|
|
297
|
+
128
|
|
298
|
+
],
|
|
299
|
+
honeydew: [
|
|
300
|
+
240,
|
|
301
|
+
255,
|
|
302
|
+
240
|
|
303
|
+
],
|
|
304
|
+
hotpink: [
|
|
305
|
+
255,
|
|
306
|
+
105,
|
|
307
|
+
180
|
|
308
|
+
],
|
|
309
|
+
indianred: [
|
|
310
|
+
205,
|
|
311
|
+
92,
|
|
312
|
+
92
|
|
313
|
+
],
|
|
314
|
+
indigo: [
|
|
315
|
+
75,
|
|
316
|
+
0,
|
|
317
|
+
130
|
|
318
|
+
],
|
|
319
|
+
ivory: [
|
|
320
|
+
255,
|
|
321
|
+
255,
|
|
322
|
+
240
|
|
323
|
+
],
|
|
324
|
+
khaki: [
|
|
325
|
+
240,
|
|
326
|
+
230,
|
|
327
|
+
140
|
|
328
|
+
],
|
|
329
|
+
lavender: [
|
|
330
|
+
230,
|
|
331
|
+
230,
|
|
332
|
+
250
|
|
333
|
+
],
|
|
334
|
+
lavenderblush: [
|
|
335
|
+
255,
|
|
336
|
+
240,
|
|
337
|
+
245
|
|
338
|
+
],
|
|
339
|
+
lawngreen: [
|
|
340
|
+
124,
|
|
341
|
+
252,
|
|
342
|
+
0
|
|
343
|
+
],
|
|
344
|
+
lemonchiffon: [
|
|
345
|
+
255,
|
|
346
|
+
250,
|
|
347
|
+
205
|
|
348
|
+
],
|
|
349
|
+
lightblue: [
|
|
350
|
+
173,
|
|
351
|
+
216,
|
|
352
|
+
230
|
|
353
|
+
],
|
|
354
|
+
lightcoral: [
|
|
355
|
+
240,
|
|
356
|
+
128,
|
|
357
|
+
128
|
|
358
|
+
],
|
|
359
|
+
lightcyan: [
|
|
360
|
+
224,
|
|
361
|
+
255,
|
|
362
|
+
255
|
|
363
|
+
],
|
|
364
|
+
lightgoldenrodyellow: [
|
|
365
|
+
250,
|
|
366
|
+
250,
|
|
367
|
+
210
|
|
368
|
+
],
|
|
369
|
+
lightgray: [
|
|
370
|
+
211,
|
|
371
|
+
211,
|
|
372
|
+
211
|
|
373
|
+
],
|
|
374
|
+
lightgreen: [
|
|
375
|
+
144,
|
|
376
|
+
238,
|
|
377
|
+
144
|
|
378
|
+
],
|
|
379
|
+
lightgrey: [
|
|
380
|
+
211,
|
|
381
|
+
211,
|
|
382
|
+
211
|
|
383
|
+
],
|
|
384
|
+
lightpink: [
|
|
385
|
+
255,
|
|
386
|
+
182,
|
|
387
|
+
193
|
|
388
|
+
],
|
|
389
|
+
lightsalmon: [
|
|
390
|
+
255,
|
|
391
|
+
160,
|
|
392
|
+
122
|
|
393
|
+
],
|
|
394
|
+
lightseagreen: [
|
|
395
|
+
32,
|
|
396
|
+
178,
|
|
397
|
+
170
|
|
398
|
+
],
|
|
399
|
+
lightskyblue: [
|
|
400
|
+
135,
|
|
401
|
+
206,
|
|
402
|
+
250
|
|
403
|
+
],
|
|
404
|
+
lightslategray: [
|
|
405
|
+
119,
|
|
406
|
+
136,
|
|
407
|
+
153
|
|
408
|
+
],
|
|
409
|
+
lightslategrey: [
|
|
410
|
+
119,
|
|
411
|
+
136,
|
|
412
|
+
153
|
|
413
|
+
],
|
|
414
|
+
lightsteelblue: [
|
|
415
|
+
176,
|
|
416
|
+
196,
|
|
417
|
+
222
|
|
418
|
+
],
|
|
419
|
+
lightyellow: [
|
|
420
|
+
255,
|
|
421
|
+
255,
|
|
422
|
+
224
|
|
423
|
+
],
|
|
424
|
+
lime: [
|
|
425
|
+
0,
|
|
426
|
+
255,
|
|
427
|
+
0
|
|
428
|
+
],
|
|
429
|
+
limegreen: [
|
|
430
|
+
50,
|
|
431
|
+
205,
|
|
432
|
+
50
|
|
433
|
+
],
|
|
434
|
+
linen: [
|
|
435
|
+
250,
|
|
436
|
+
240,
|
|
437
|
+
230
|
|
438
|
+
],
|
|
439
|
+
magenta: [
|
|
440
|
+
255,
|
|
441
|
+
0,
|
|
442
|
+
255
|
|
443
|
+
],
|
|
444
|
+
maroon: [
|
|
445
|
+
128,
|
|
446
|
+
0,
|
|
447
|
+
0
|
|
448
|
+
],
|
|
449
|
+
mediumaquamarine: [
|
|
450
|
+
102,
|
|
451
|
+
205,
|
|
452
|
+
170
|
|
453
|
+
],
|
|
454
|
+
mediumblue: [
|
|
455
|
+
0,
|
|
456
|
+
0,
|
|
457
|
+
205
|
|
458
|
+
],
|
|
459
|
+
mediumorchid: [
|
|
460
|
+
186,
|
|
461
|
+
85,
|
|
462
|
+
211
|
|
463
|
+
],
|
|
464
|
+
mediumpurple: [
|
|
465
|
+
147,
|
|
466
|
+
112,
|
|
467
|
+
219
|
|
468
|
+
],
|
|
469
|
+
mediumseagreen: [
|
|
470
|
+
60,
|
|
471
|
+
179,
|
|
472
|
+
113
|
|
473
|
+
],
|
|
474
|
+
mediumslateblue: [
|
|
475
|
+
123,
|
|
476
|
+
104,
|
|
477
|
+
238
|
|
478
|
+
],
|
|
479
|
+
mediumspringgreen: [
|
|
480
|
+
0,
|
|
481
|
+
250,
|
|
482
|
+
154
|
|
483
|
+
],
|
|
484
|
+
mediumturquoise: [
|
|
485
|
+
72,
|
|
486
|
+
209,
|
|
487
|
+
204
|
|
488
|
+
],
|
|
489
|
+
mediumvioletred: [
|
|
490
|
+
199,
|
|
491
|
+
21,
|
|
492
|
+
133
|
|
493
|
+
],
|
|
494
|
+
midnightblue: [
|
|
495
|
+
25,
|
|
496
|
+
25,
|
|
497
|
+
112
|
|
498
|
+
],
|
|
499
|
+
mintcream: [
|
|
500
|
+
245,
|
|
501
|
+
255,
|
|
502
|
+
250
|
|
503
|
+
],
|
|
504
|
+
mistyrose: [
|
|
505
|
+
255,
|
|
506
|
+
228,
|
|
507
|
+
225
|
|
508
|
+
],
|
|
509
|
+
moccasin: [
|
|
510
|
+
255,
|
|
511
|
+
228,
|
|
512
|
+
181
|
|
513
|
+
],
|
|
514
|
+
navajowhite: [
|
|
515
|
+
255,
|
|
516
|
+
222,
|
|
517
|
+
173
|
|
518
|
+
],
|
|
519
|
+
navy: [
|
|
520
|
+
0,
|
|
521
|
+
0,
|
|
522
|
+
128
|
|
523
|
+
],
|
|
524
|
+
oldlace: [
|
|
525
|
+
253,
|
|
526
|
+
245,
|
|
527
|
+
230
|
|
528
|
+
],
|
|
529
|
+
olive: [
|
|
530
|
+
128,
|
|
531
|
+
128,
|
|
532
|
+
0
|
|
533
|
+
],
|
|
534
|
+
olivedrab: [
|
|
535
|
+
107,
|
|
536
|
+
142,
|
|
537
|
+
35
|
|
538
|
+
],
|
|
539
|
+
orange: [
|
|
540
|
+
255,
|
|
541
|
+
165,
|
|
542
|
+
0
|
|
543
|
+
],
|
|
544
|
+
orangered: [
|
|
545
|
+
255,
|
|
546
|
+
69,
|
|
547
|
+
0
|
|
548
|
+
],
|
|
549
|
+
orchid: [
|
|
550
|
+
218,
|
|
551
|
+
112,
|
|
552
|
+
214
|
|
553
|
+
],
|
|
554
|
+
palegoldenrod: [
|
|
555
|
+
238,
|
|
556
|
+
232,
|
|
557
|
+
170
|
|
558
|
+
],
|
|
559
|
+
palegreen: [
|
|
560
|
+
152,
|
|
561
|
+
251,
|
|
562
|
+
152
|
|
563
|
+
],
|
|
564
|
+
paleturquoise: [
|
|
565
|
+
175,
|
|
566
|
+
238,
|
|
567
|
+
238
|
|
568
|
+
],
|
|
569
|
+
palevioletred: [
|
|
570
|
+
219,
|
|
571
|
+
112,
|
|
572
|
+
147
|
|
573
|
+
],
|
|
574
|
+
papayawhip: [
|
|
575
|
+
255,
|
|
576
|
+
239,
|
|
577
|
+
213
|
|
578
|
+
],
|
|
579
|
+
peachpuff: [
|
|
580
|
+
255,
|
|
581
|
+
218,
|
|
582
|
+
185
|
|
583
|
+
],
|
|
584
|
+
peru: [
|
|
585
|
+
205,
|
|
586
|
+
133,
|
|
587
|
+
63
|
|
588
|
+
],
|
|
589
|
+
pink: [
|
|
590
|
+
255,
|
|
591
|
+
192,
|
|
592
|
+
203
|
|
593
|
+
],
|
|
594
|
+
plum: [
|
|
595
|
+
221,
|
|
596
|
+
160,
|
|
597
|
+
221
|
|
598
|
+
],
|
|
599
|
+
powderblue: [
|
|
600
|
+
176,
|
|
601
|
+
224,
|
|
602
|
+
230
|
|
603
|
+
],
|
|
604
|
+
purple: [
|
|
605
|
+
128,
|
|
606
|
+
0,
|
|
607
|
+
128
|
|
608
|
+
],
|
|
609
|
+
rebeccapurple: [
|
|
610
|
+
102,
|
|
611
|
+
51,
|
|
612
|
+
153
|
|
613
|
+
],
|
|
614
|
+
red: [
|
|
615
|
+
255,
|
|
616
|
+
0,
|
|
617
|
+
0
|
|
618
|
+
],
|
|
619
|
+
rosybrown: [
|
|
620
|
+
188,
|
|
621
|
+
143,
|
|
622
|
+
143
|
|
623
|
+
],
|
|
624
|
+
royalblue: [
|
|
625
|
+
65,
|
|
626
|
+
105,
|
|
627
|
+
225
|
|
628
|
+
],
|
|
629
|
+
saddlebrown: [
|
|
630
|
+
139,
|
|
631
|
+
69,
|
|
632
|
+
19
|
|
633
|
+
],
|
|
634
|
+
salmon: [
|
|
635
|
+
250,
|
|
636
|
+
128,
|
|
637
|
+
114
|
|
638
|
+
],
|
|
639
|
+
sandybrown: [
|
|
640
|
+
244,
|
|
641
|
+
164,
|
|
642
|
+
96
|
|
643
|
+
],
|
|
644
|
+
seagreen: [
|
|
645
|
+
46,
|
|
646
|
+
139,
|
|
647
|
+
87
|
|
648
|
+
],
|
|
649
|
+
seashell: [
|
|
650
|
+
255,
|
|
651
|
+
245,
|
|
652
|
+
238
|
|
653
|
+
],
|
|
654
|
+
sienna: [
|
|
655
|
+
160,
|
|
656
|
+
82,
|
|
657
|
+
45
|
|
658
|
+
],
|
|
659
|
+
silver: [
|
|
660
|
+
192,
|
|
661
|
+
192,
|
|
662
|
+
192
|
|
663
|
+
],
|
|
664
|
+
skyblue: [
|
|
665
|
+
135,
|
|
666
|
+
206,
|
|
667
|
+
235
|
|
668
|
+
],
|
|
669
|
+
slateblue: [
|
|
670
|
+
106,
|
|
671
|
+
90,
|
|
672
|
+
205
|
|
673
|
+
],
|
|
674
|
+
slategray: [
|
|
675
|
+
112,
|
|
676
|
+
128,
|
|
677
|
+
144
|
|
678
|
+
],
|
|
679
|
+
slategrey: [
|
|
680
|
+
112,
|
|
681
|
+
128,
|
|
682
|
+
144
|
|
683
|
+
],
|
|
684
|
+
snow: [
|
|
685
|
+
255,
|
|
686
|
+
250,
|
|
687
|
+
250
|
|
688
|
+
],
|
|
689
|
+
springgreen: [
|
|
690
|
+
0,
|
|
691
|
+
255,
|
|
692
|
+
127
|
|
693
|
+
],
|
|
694
|
+
steelblue: [
|
|
695
|
+
70,
|
|
696
|
+
130,
|
|
697
|
+
180
|
|
698
|
+
],
|
|
699
|
+
tan: [
|
|
700
|
+
210,
|
|
701
|
+
180,
|
|
702
|
+
140
|
|
703
|
+
],
|
|
704
|
+
teal: [
|
|
705
|
+
0,
|
|
706
|
+
128,
|
|
707
|
+
128
|
|
708
|
+
],
|
|
709
|
+
thistle: [
|
|
710
|
+
216,
|
|
711
|
+
191,
|
|
712
|
+
216
|
|
713
|
+
],
|
|
714
|
+
tomato: [
|
|
715
|
+
255,
|
|
716
|
+
99,
|
|
717
|
+
71
|
|
718
|
+
],
|
|
719
|
+
turquoise: [
|
|
720
|
+
64,
|
|
721
|
+
224,
|
|
722
|
+
208
|
|
723
|
+
],
|
|
724
|
+
violet: [
|
|
725
|
+
238,
|
|
726
|
+
130,
|
|
727
|
+
238
|
|
728
|
+
],
|
|
729
|
+
wheat: [
|
|
730
|
+
245,
|
|
731
|
+
222,
|
|
732
|
+
179
|
|
733
|
+
],
|
|
734
|
+
white: [
|
|
735
|
+
255,
|
|
736
|
+
255,
|
|
737
|
+
255
|
|
738
|
+
],
|
|
739
|
+
whitesmoke: [
|
|
740
|
+
245,
|
|
741
|
+
245,
|
|
742
|
+
245
|
|
743
|
+
],
|
|
744
|
+
yellow: [
|
|
745
|
+
255,
|
|
746
|
+
255,
|
|
747
|
+
0
|
|
748
|
+
],
|
|
749
|
+
yellowgreen: [
|
|
750
|
+
154,
|
|
751
|
+
205,
|
|
752
|
+
50
|
|
753
|
+
]
|
|
754
|
+
};
|
|
755
|
+
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
756
|
+
t.exports = function(e) {
|
|
757
|
+
return !e || typeof e == "string" ? !1 : e instanceof Array || Array.isArray(e) || e.length >= 0 && (e.splice instanceof Function || Object.getOwnPropertyDescriptor(e, e.length - 1) && e.constructor.name !== "String");
|
|
758
|
+
};
|
|
759
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
760
|
+
var n = se(), r = Array.prototype.concat, i = Array.prototype.slice, a = t.exports = function(e) {
|
|
761
|
+
for (var t = [], a = 0, o = e.length; a < o; a++) {
|
|
762
|
+
var s = e[a];
|
|
763
|
+
n(s) ? t = r.call(t, i.call(s)) : t.push(s);
|
|
764
|
+
}
|
|
765
|
+
return t;
|
|
766
|
+
};
|
|
767
|
+
a.wrap = function(e) {
|
|
768
|
+
return function() {
|
|
769
|
+
return e(a(arguments));
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
773
|
+
var n = oe(), r = ce(), i = Object.hasOwnProperty, a = Object.create(null);
|
|
774
|
+
for (var o in n) i.call(n, o) && (a[n[o]] = o);
|
|
775
|
+
var s = t.exports = {
|
|
776
|
+
to: {},
|
|
777
|
+
get: {}
|
|
778
|
+
};
|
|
779
|
+
s.get = function(e) {
|
|
780
|
+
var t = e.substring(0, 3).toLowerCase(), n, r;
|
|
781
|
+
switch (t) {
|
|
782
|
+
case "hsl":
|
|
783
|
+
n = s.get.hsl(e), r = "hsl";
|
|
784
|
+
break;
|
|
785
|
+
case "hwb":
|
|
786
|
+
n = s.get.hwb(e), r = "hwb";
|
|
787
|
+
break;
|
|
788
|
+
default:
|
|
789
|
+
n = s.get.rgb(e), r = "rgb";
|
|
790
|
+
break;
|
|
791
|
+
}
|
|
792
|
+
return n ? {
|
|
793
|
+
model: r,
|
|
794
|
+
value: n
|
|
795
|
+
} : null;
|
|
796
|
+
}, s.get.rgb = function(e) {
|
|
797
|
+
if (!e) return null;
|
|
798
|
+
var t = /^#([a-f0-9]{3,4})$/i, r = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, a = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, o = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, s = /^(\w+)$/, l = [
|
|
799
|
+
0,
|
|
800
|
+
0,
|
|
801
|
+
0,
|
|
802
|
+
1
|
|
803
|
+
], u, d, f;
|
|
804
|
+
if (u = e.match(r)) {
|
|
805
|
+
for (f = u[2], u = u[1], d = 0; d < 3; d++) {
|
|
806
|
+
var p = d * 2;
|
|
807
|
+
l[d] = parseInt(u.slice(p, p + 2), 16);
|
|
808
|
+
}
|
|
809
|
+
f && (l[3] = parseInt(f, 16) / 255);
|
|
810
|
+
} else if (u = e.match(t)) {
|
|
811
|
+
for (u = u[1], f = u[3], d = 0; d < 3; d++) l[d] = parseInt(u[d] + u[d], 16);
|
|
812
|
+
f && (l[3] = parseInt(f + f, 16) / 255);
|
|
813
|
+
} else if (u = e.match(a)) {
|
|
814
|
+
for (d = 0; d < 3; d++) l[d] = parseInt(u[d + 1], 0);
|
|
815
|
+
u[4] && (u[5] ? l[3] = parseFloat(u[4]) * .01 : l[3] = parseFloat(u[4]));
|
|
816
|
+
} else if (u = e.match(o)) {
|
|
817
|
+
for (d = 0; d < 3; d++) l[d] = Math.round(parseFloat(u[d + 1]) * 2.55);
|
|
818
|
+
u[4] && (u[5] ? l[3] = parseFloat(u[4]) * .01 : l[3] = parseFloat(u[4]));
|
|
819
|
+
} else if (u = e.match(s)) return u[1] === "transparent" ? [
|
|
820
|
+
0,
|
|
821
|
+
0,
|
|
822
|
+
0,
|
|
823
|
+
0
|
|
824
|
+
] : i.call(n, u[1]) ? (l = n[u[1]], l[3] = 1, l) : null;
|
|
825
|
+
else return null;
|
|
826
|
+
for (d = 0; d < 3; d++) l[d] = c(l[d], 0, 255);
|
|
827
|
+
return l[3] = c(l[3], 0, 1), l;
|
|
828
|
+
}, s.get.hsl = function(e) {
|
|
829
|
+
if (!e) return null;
|
|
830
|
+
var t = e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
|
|
831
|
+
if (t) {
|
|
832
|
+
var n = parseFloat(t[4]);
|
|
833
|
+
return [
|
|
834
|
+
(parseFloat(t[1]) % 360 + 360) % 360,
|
|
835
|
+
c(parseFloat(t[2]), 0, 100),
|
|
836
|
+
c(parseFloat(t[3]), 0, 100),
|
|
837
|
+
c(isNaN(n) ? 1 : n, 0, 1)
|
|
838
|
+
];
|
|
839
|
+
}
|
|
840
|
+
return null;
|
|
841
|
+
}, s.get.hwb = function(e) {
|
|
842
|
+
if (!e) return null;
|
|
843
|
+
var t = e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
|
|
844
|
+
if (t) {
|
|
845
|
+
var n = parseFloat(t[4]);
|
|
846
|
+
return [
|
|
847
|
+
(parseFloat(t[1]) % 360 + 360) % 360,
|
|
848
|
+
c(parseFloat(t[2]), 0, 100),
|
|
849
|
+
c(parseFloat(t[3]), 0, 100),
|
|
850
|
+
c(isNaN(n) ? 1 : n, 0, 1)
|
|
851
|
+
];
|
|
852
|
+
}
|
|
853
|
+
return null;
|
|
854
|
+
}, s.to.hex = function() {
|
|
855
|
+
var e = r(arguments);
|
|
856
|
+
return "#" + l(e[0]) + l(e[1]) + l(e[2]) + (e[3] < 1 ? l(Math.round(e[3] * 255)) : "");
|
|
857
|
+
}, s.to.rgb = function() {
|
|
858
|
+
var e = r(arguments);
|
|
859
|
+
return e.length < 4 || e[3] === 1 ? "rgb(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ")" : "rgba(" + Math.round(e[0]) + ", " + Math.round(e[1]) + ", " + Math.round(e[2]) + ", " + e[3] + ")";
|
|
860
|
+
}, s.to.rgb.percent = function() {
|
|
861
|
+
var e = r(arguments), t = Math.round(e[0] / 255 * 100), n = Math.round(e[1] / 255 * 100), i = Math.round(e[2] / 255 * 100);
|
|
862
|
+
return e.length < 4 || e[3] === 1 ? "rgb(" + t + "%, " + n + "%, " + i + "%)" : "rgba(" + t + "%, " + n + "%, " + i + "%, " + e[3] + ")";
|
|
863
|
+
}, s.to.hsl = function() {
|
|
864
|
+
var e = r(arguments);
|
|
865
|
+
return e.length < 4 || e[3] === 1 ? "hsl(" + e[0] + ", " + e[1] + "%, " + e[2] + "%)" : "hsla(" + e[0] + ", " + e[1] + "%, " + e[2] + "%, " + e[3] + ")";
|
|
866
|
+
}, s.to.hwb = function() {
|
|
867
|
+
var e = r(arguments), t = "";
|
|
868
|
+
return e.length >= 4 && e[3] !== 1 && (t = ", " + e[3]), "hwb(" + e[0] + ", " + e[1] + "%, " + e[2] + "%" + t + ")";
|
|
869
|
+
}, s.to.keyword = function(e) {
|
|
870
|
+
return a[e.slice(0, 3)];
|
|
871
|
+
};
|
|
872
|
+
function c(e, t, n) {
|
|
873
|
+
return Math.min(Math.max(t, e), n);
|
|
874
|
+
}
|
|
875
|
+
function l(e) {
|
|
876
|
+
var t = Math.round(e).toString(16).toUpperCase();
|
|
877
|
+
return t.length < 2 ? "0" + t : t;
|
|
878
|
+
}
|
|
879
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
880
|
+
var n = oe(), r = {};
|
|
881
|
+
for (let e of Object.keys(n)) r[n[e]] = e;
|
|
882
|
+
var i = {
|
|
883
|
+
rgb: {
|
|
884
|
+
channels: 3,
|
|
885
|
+
labels: "rgb"
|
|
886
|
+
},
|
|
887
|
+
hsl: {
|
|
888
|
+
channels: 3,
|
|
889
|
+
labels: "hsl"
|
|
890
|
+
},
|
|
891
|
+
hsv: {
|
|
892
|
+
channels: 3,
|
|
893
|
+
labels: "hsv"
|
|
894
|
+
},
|
|
895
|
+
hwb: {
|
|
896
|
+
channels: 3,
|
|
897
|
+
labels: "hwb"
|
|
898
|
+
},
|
|
899
|
+
cmyk: {
|
|
900
|
+
channels: 4,
|
|
901
|
+
labels: "cmyk"
|
|
902
|
+
},
|
|
903
|
+
xyz: {
|
|
904
|
+
channels: 3,
|
|
905
|
+
labels: "xyz"
|
|
906
|
+
},
|
|
907
|
+
lab: {
|
|
908
|
+
channels: 3,
|
|
909
|
+
labels: "lab"
|
|
910
|
+
},
|
|
911
|
+
lch: {
|
|
912
|
+
channels: 3,
|
|
913
|
+
labels: "lch"
|
|
914
|
+
},
|
|
915
|
+
hex: {
|
|
916
|
+
channels: 1,
|
|
917
|
+
labels: ["hex"]
|
|
918
|
+
},
|
|
919
|
+
keyword: {
|
|
920
|
+
channels: 1,
|
|
921
|
+
labels: ["keyword"]
|
|
922
|
+
},
|
|
923
|
+
ansi16: {
|
|
924
|
+
channels: 1,
|
|
925
|
+
labels: ["ansi16"]
|
|
926
|
+
},
|
|
927
|
+
ansi256: {
|
|
928
|
+
channels: 1,
|
|
929
|
+
labels: ["ansi256"]
|
|
930
|
+
},
|
|
931
|
+
hcg: {
|
|
932
|
+
channels: 3,
|
|
933
|
+
labels: [
|
|
934
|
+
"h",
|
|
935
|
+
"c",
|
|
936
|
+
"g"
|
|
937
|
+
]
|
|
938
|
+
},
|
|
939
|
+
apple: {
|
|
940
|
+
channels: 3,
|
|
941
|
+
labels: [
|
|
942
|
+
"r16",
|
|
943
|
+
"g16",
|
|
944
|
+
"b16"
|
|
945
|
+
]
|
|
946
|
+
},
|
|
947
|
+
gray: {
|
|
948
|
+
channels: 1,
|
|
949
|
+
labels: ["gray"]
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
t.exports = i;
|
|
953
|
+
for (let e of Object.keys(i)) {
|
|
954
|
+
if (!("channels" in i[e])) throw Error("missing channels property: " + e);
|
|
955
|
+
if (!("labels" in i[e])) throw Error("missing channel labels property: " + e);
|
|
956
|
+
if (i[e].labels.length !== i[e].channels) throw Error("channel and label counts mismatch: " + e);
|
|
957
|
+
let { channels: t, labels: n } = i[e];
|
|
958
|
+
delete i[e].channels, delete i[e].labels, Object.defineProperty(i[e], "channels", { value: t }), Object.defineProperty(i[e], "labels", { value: n });
|
|
959
|
+
}
|
|
960
|
+
i.rgb.hsl = function(e) {
|
|
961
|
+
let t = e[0] / 255, n = e[1] / 255, r = e[2] / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = a - i, s, c;
|
|
962
|
+
a === i ? s = 0 : t === a ? s = (n - r) / o : n === a ? s = 2 + (r - t) / o : r === a && (s = 4 + (t - n) / o), s = Math.min(s * 60, 360), s < 0 && (s += 360);
|
|
963
|
+
let l = (i + a) / 2;
|
|
964
|
+
return c = a === i ? 0 : l <= .5 ? o / (a + i) : o / (2 - a - i), [
|
|
965
|
+
s,
|
|
966
|
+
c * 100,
|
|
967
|
+
l * 100
|
|
968
|
+
];
|
|
969
|
+
}, i.rgb.hsv = function(e) {
|
|
970
|
+
let t, n, r, i, a, o = e[0] / 255, s = e[1] / 255, c = e[2] / 255, l = Math.max(o, s, c), u = l - Math.min(o, s, c), d = function(e) {
|
|
971
|
+
return (l - e) / 6 / u + 1 / 2;
|
|
972
|
+
};
|
|
973
|
+
return u === 0 ? (i = 0, a = 0) : (a = u / l, t = d(o), n = d(s), r = d(c), o === l ? i = r - n : s === l ? i = 1 / 3 + t - r : c === l && (i = 2 / 3 + n - t), i < 0 ? i += 1 : i > 1 && --i), [
|
|
974
|
+
i * 360,
|
|
975
|
+
a * 100,
|
|
976
|
+
l * 100
|
|
977
|
+
];
|
|
978
|
+
}, i.rgb.hwb = function(e) {
|
|
979
|
+
let t = e[0], n = e[1], r = e[2], a = i.rgb.hsl(e)[0], o = 1 / 255 * Math.min(t, Math.min(n, r));
|
|
980
|
+
return r = 1 - 1 / 255 * Math.max(t, Math.max(n, r)), [
|
|
981
|
+
a,
|
|
982
|
+
o * 100,
|
|
983
|
+
r * 100
|
|
984
|
+
];
|
|
985
|
+
}, i.rgb.cmyk = function(e) {
|
|
986
|
+
let t = e[0] / 255, n = e[1] / 255, r = e[2] / 255, i = Math.min(1 - t, 1 - n, 1 - r), a = (1 - t - i) / (1 - i) || 0, o = (1 - n - i) / (1 - i) || 0, s = (1 - r - i) / (1 - i) || 0;
|
|
987
|
+
return [
|
|
988
|
+
a * 100,
|
|
989
|
+
o * 100,
|
|
990
|
+
s * 100,
|
|
991
|
+
i * 100
|
|
992
|
+
];
|
|
993
|
+
};
|
|
994
|
+
function a(e, t) {
|
|
995
|
+
return (e[0] - t[0]) ** 2 + (e[1] - t[1]) ** 2 + (e[2] - t[2]) ** 2;
|
|
996
|
+
}
|
|
997
|
+
i.rgb.keyword = function(e) {
|
|
998
|
+
let t = r[e];
|
|
999
|
+
if (t) return t;
|
|
1000
|
+
let i = Infinity, o;
|
|
1001
|
+
for (let t of Object.keys(n)) {
|
|
1002
|
+
let r = n[t], s = a(e, r);
|
|
1003
|
+
s < i && (i = s, o = t);
|
|
1004
|
+
}
|
|
1005
|
+
return o;
|
|
1006
|
+
}, i.keyword.rgb = function(e) {
|
|
1007
|
+
return n[e];
|
|
1008
|
+
}, i.rgb.xyz = function(e) {
|
|
1009
|
+
let t = e[0] / 255, n = e[1] / 255, r = e[2] / 255;
|
|
1010
|
+
t = t > .04045 ? ((t + .055) / 1.055) ** 2.4 : t / 12.92, n = n > .04045 ? ((n + .055) / 1.055) ** 2.4 : n / 12.92, r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
|
|
1011
|
+
let i = t * .4124 + n * .3576 + r * .1805, a = t * .2126 + n * .7152 + r * .0722, o = t * .0193 + n * .1192 + r * .9505;
|
|
1012
|
+
return [
|
|
1013
|
+
i * 100,
|
|
1014
|
+
a * 100,
|
|
1015
|
+
o * 100
|
|
1016
|
+
];
|
|
1017
|
+
}, i.rgb.lab = function(e) {
|
|
1018
|
+
let t = i.rgb.xyz(e), n = t[0], r = t[1], a = t[2];
|
|
1019
|
+
return n /= 95.047, r /= 100, a /= 108.883, n = n > .008856 ? n ** (1 / 3) : 7.787 * n + 16 / 116, r = r > .008856 ? r ** (1 / 3) : 7.787 * r + 16 / 116, a = a > .008856 ? a ** (1 / 3) : 7.787 * a + 16 / 116, [
|
|
1020
|
+
116 * r - 16,
|
|
1021
|
+
500 * (n - r),
|
|
1022
|
+
200 * (r - a)
|
|
1023
|
+
];
|
|
1024
|
+
}, i.hsl.rgb = function(e) {
|
|
1025
|
+
let t = e[0] / 360, n = e[1] / 100, r = e[2] / 100, i, a, o;
|
|
1026
|
+
if (n === 0) return o = r * 255, [
|
|
1027
|
+
o,
|
|
1028
|
+
o,
|
|
1029
|
+
o
|
|
1030
|
+
];
|
|
1031
|
+
i = r < .5 ? r * (1 + n) : r + n - r * n;
|
|
1032
|
+
let s = 2 * r - i, c = [
|
|
1033
|
+
0,
|
|
1034
|
+
0,
|
|
1035
|
+
0
|
|
1036
|
+
];
|
|
1037
|
+
for (let e = 0; e < 3; e++) a = t + 1 / 3 * -(e - 1), a < 0 && a++, a > 1 && a--, o = 6 * a < 1 ? s + (i - s) * 6 * a : 2 * a < 1 ? i : 3 * a < 2 ? s + (i - s) * (2 / 3 - a) * 6 : s, c[e] = o * 255;
|
|
1038
|
+
return c;
|
|
1039
|
+
}, i.hsl.hsv = function(e) {
|
|
1040
|
+
let t = e[0], n = e[1] / 100, r = e[2] / 100, i = n, a = Math.max(r, .01);
|
|
1041
|
+
r *= 2, n *= r <= 1 ? r : 2 - r, i *= a <= 1 ? a : 2 - a;
|
|
1042
|
+
let o = (r + n) / 2;
|
|
1043
|
+
return [
|
|
1044
|
+
t,
|
|
1045
|
+
(r === 0 ? 2 * i / (a + i) : 2 * n / (r + n)) * 100,
|
|
1046
|
+
o * 100
|
|
1047
|
+
];
|
|
1048
|
+
}, i.hsv.rgb = function(e) {
|
|
1049
|
+
let t = e[0] / 60, n = e[1] / 100, r = e[2] / 100, i = Math.floor(t) % 6, a = t - Math.floor(t), o = 255 * r * (1 - n), s = 255 * r * (1 - n * a), c = 255 * r * (1 - n * (1 - a));
|
|
1050
|
+
switch (r *= 255, i) {
|
|
1051
|
+
case 0: return [
|
|
1052
|
+
r,
|
|
1053
|
+
c,
|
|
1054
|
+
o
|
|
1055
|
+
];
|
|
1056
|
+
case 1: return [
|
|
1057
|
+
s,
|
|
1058
|
+
r,
|
|
1059
|
+
o
|
|
1060
|
+
];
|
|
1061
|
+
case 2: return [
|
|
1062
|
+
o,
|
|
1063
|
+
r,
|
|
1064
|
+
c
|
|
1065
|
+
];
|
|
1066
|
+
case 3: return [
|
|
1067
|
+
o,
|
|
1068
|
+
s,
|
|
1069
|
+
r
|
|
1070
|
+
];
|
|
1071
|
+
case 4: return [
|
|
1072
|
+
c,
|
|
1073
|
+
o,
|
|
1074
|
+
r
|
|
1075
|
+
];
|
|
1076
|
+
case 5: return [
|
|
1077
|
+
r,
|
|
1078
|
+
o,
|
|
1079
|
+
s
|
|
1080
|
+
];
|
|
1081
|
+
}
|
|
1082
|
+
}, i.hsv.hsl = function(e) {
|
|
1083
|
+
let t = e[0], n = e[1] / 100, r = e[2] / 100, i = Math.max(r, .01), a, o;
|
|
1084
|
+
o = (2 - n) * r;
|
|
1085
|
+
let s = (2 - n) * i;
|
|
1086
|
+
return a = n * i, a /= s <= 1 ? s : 2 - s, a ||= 0, o /= 2, [
|
|
1087
|
+
t,
|
|
1088
|
+
a * 100,
|
|
1089
|
+
o * 100
|
|
1090
|
+
];
|
|
1091
|
+
}, i.hwb.rgb = function(e) {
|
|
1092
|
+
let t = e[0] / 360, n = e[1] / 100, r = e[2] / 100, i = n + r, a;
|
|
1093
|
+
i > 1 && (n /= i, r /= i);
|
|
1094
|
+
let o = Math.floor(6 * t), s = 1 - r;
|
|
1095
|
+
a = 6 * t - o, o & 1 && (a = 1 - a);
|
|
1096
|
+
let c = n + a * (s - n), l, u, d;
|
|
1097
|
+
switch (o) {
|
|
1098
|
+
default:
|
|
1099
|
+
case 6:
|
|
1100
|
+
case 0:
|
|
1101
|
+
l = s, u = c, d = n;
|
|
1102
|
+
break;
|
|
1103
|
+
case 1:
|
|
1104
|
+
l = c, u = s, d = n;
|
|
1105
|
+
break;
|
|
1106
|
+
case 2:
|
|
1107
|
+
l = n, u = s, d = c;
|
|
1108
|
+
break;
|
|
1109
|
+
case 3:
|
|
1110
|
+
l = n, u = c, d = s;
|
|
1111
|
+
break;
|
|
1112
|
+
case 4:
|
|
1113
|
+
l = c, u = n, d = s;
|
|
1114
|
+
break;
|
|
1115
|
+
case 5:
|
|
1116
|
+
l = s, u = n, d = c;
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
1119
|
+
return [
|
|
1120
|
+
l * 255,
|
|
1121
|
+
u * 255,
|
|
1122
|
+
d * 255
|
|
1123
|
+
];
|
|
1124
|
+
}, i.cmyk.rgb = function(e) {
|
|
1125
|
+
let t = e[0] / 100, n = e[1] / 100, r = e[2] / 100, i = e[3] / 100, a = 1 - Math.min(1, t * (1 - i) + i), o = 1 - Math.min(1, n * (1 - i) + i), s = 1 - Math.min(1, r * (1 - i) + i);
|
|
1126
|
+
return [
|
|
1127
|
+
a * 255,
|
|
1128
|
+
o * 255,
|
|
1129
|
+
s * 255
|
|
1130
|
+
];
|
|
1131
|
+
}, i.xyz.rgb = function(e) {
|
|
1132
|
+
let t = e[0] / 100, n = e[1] / 100, r = e[2] / 100, i, a, o;
|
|
1133
|
+
return i = t * 3.2406 + n * -1.5372 + r * -.4986, a = t * -.9689 + n * 1.8758 + r * .0415, o = t * .0557 + n * -.204 + r * 1.057, i = i > .0031308 ? 1.055 * i ** (1 / 2.4) - .055 : i * 12.92, a = a > .0031308 ? 1.055 * a ** (1 / 2.4) - .055 : a * 12.92, o = o > .0031308 ? 1.055 * o ** (1 / 2.4) - .055 : o * 12.92, i = Math.min(Math.max(0, i), 1), a = Math.min(Math.max(0, a), 1), o = Math.min(Math.max(0, o), 1), [
|
|
1134
|
+
i * 255,
|
|
1135
|
+
a * 255,
|
|
1136
|
+
o * 255
|
|
1137
|
+
];
|
|
1138
|
+
}, i.xyz.lab = function(e) {
|
|
1139
|
+
let t = e[0], n = e[1], r = e[2];
|
|
1140
|
+
return t /= 95.047, n /= 100, r /= 108.883, t = t > .008856 ? t ** (1 / 3) : 7.787 * t + 16 / 116, n = n > .008856 ? n ** (1 / 3) : 7.787 * n + 16 / 116, r = r > .008856 ? r ** (1 / 3) : 7.787 * r + 16 / 116, [
|
|
1141
|
+
116 * n - 16,
|
|
1142
|
+
500 * (t - n),
|
|
1143
|
+
200 * (n - r)
|
|
1144
|
+
];
|
|
1145
|
+
}, i.lab.xyz = function(e) {
|
|
1146
|
+
let t = e[0], n = e[1], r = e[2], i, a, o;
|
|
1147
|
+
a = (t + 16) / 116, i = n / 500 + a, o = a - r / 200;
|
|
1148
|
+
let s = a ** 3, c = i ** 3, l = o ** 3;
|
|
1149
|
+
return a = s > .008856 ? s : (a - 16 / 116) / 7.787, i = c > .008856 ? c : (i - 16 / 116) / 7.787, o = l > .008856 ? l : (o - 16 / 116) / 7.787, i *= 95.047, a *= 100, o *= 108.883, [
|
|
1150
|
+
i,
|
|
1151
|
+
a,
|
|
1152
|
+
o
|
|
1153
|
+
];
|
|
1154
|
+
}, i.lab.lch = function(e) {
|
|
1155
|
+
let t = e[0], n = e[1], r = e[2], i;
|
|
1156
|
+
return i = Math.atan2(r, n) * 360 / 2 / Math.PI, i < 0 && (i += 360), [
|
|
1157
|
+
t,
|
|
1158
|
+
Math.sqrt(n * n + r * r),
|
|
1159
|
+
i
|
|
1160
|
+
];
|
|
1161
|
+
}, i.lch.lab = function(e) {
|
|
1162
|
+
let t = e[0], n = e[1], r = e[2] / 360 * 2 * Math.PI;
|
|
1163
|
+
return [
|
|
1164
|
+
t,
|
|
1165
|
+
n * Math.cos(r),
|
|
1166
|
+
n * Math.sin(r)
|
|
1167
|
+
];
|
|
1168
|
+
}, i.rgb.ansi16 = function(e, t = null) {
|
|
1169
|
+
let [n, r, a] = e, o = t === null ? i.rgb.hsv(e)[2] : t;
|
|
1170
|
+
if (o = Math.round(o / 50), o === 0) return 30;
|
|
1171
|
+
let s = 30 + (Math.round(a / 255) << 2 | Math.round(r / 255) << 1 | Math.round(n / 255));
|
|
1172
|
+
return o === 2 && (s += 60), s;
|
|
1173
|
+
}, i.hsv.ansi16 = function(e) {
|
|
1174
|
+
return i.rgb.ansi16(i.hsv.rgb(e), e[2]);
|
|
1175
|
+
}, i.rgb.ansi256 = function(e) {
|
|
1176
|
+
let t = e[0], n = e[1], r = e[2];
|
|
1177
|
+
return t === n && n === r ? t < 8 ? 16 : t > 248 ? 231 : Math.round((t - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(t / 255 * 5) + 6 * Math.round(n / 255 * 5) + Math.round(r / 255 * 5);
|
|
1178
|
+
}, i.ansi16.rgb = function(e) {
|
|
1179
|
+
let t = e % 10;
|
|
1180
|
+
if (t === 0 || t === 7) return e > 50 && (t += 3.5), t = t / 10.5 * 255, [
|
|
1181
|
+
t,
|
|
1182
|
+
t,
|
|
1183
|
+
t
|
|
1184
|
+
];
|
|
1185
|
+
let n = (~~(e > 50) + 1) * .5;
|
|
1186
|
+
return [
|
|
1187
|
+
(t & 1) * n * 255,
|
|
1188
|
+
(t >> 1 & 1) * n * 255,
|
|
1189
|
+
(t >> 2 & 1) * n * 255
|
|
1190
|
+
];
|
|
1191
|
+
}, i.ansi256.rgb = function(e) {
|
|
1192
|
+
if (e >= 232) {
|
|
1193
|
+
let t = (e - 232) * 10 + 8;
|
|
1194
|
+
return [
|
|
1195
|
+
t,
|
|
1196
|
+
t,
|
|
1197
|
+
t
|
|
1198
|
+
];
|
|
1199
|
+
}
|
|
1200
|
+
e -= 16;
|
|
1201
|
+
let t;
|
|
1202
|
+
return [
|
|
1203
|
+
Math.floor(e / 36) / 5 * 255,
|
|
1204
|
+
Math.floor((t = e % 36) / 6) / 5 * 255,
|
|
1205
|
+
t % 6 / 5 * 255
|
|
1206
|
+
];
|
|
1207
|
+
}, i.rgb.hex = function(e) {
|
|
1208
|
+
let t = (((Math.round(e[0]) & 255) << 16) + ((Math.round(e[1]) & 255) << 8) + (Math.round(e[2]) & 255)).toString(16).toUpperCase();
|
|
1209
|
+
return "000000".substring(t.length) + t;
|
|
1210
|
+
}, i.hex.rgb = function(e) {
|
|
1211
|
+
let t = e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
1212
|
+
if (!t) return [
|
|
1213
|
+
0,
|
|
1214
|
+
0,
|
|
1215
|
+
0
|
|
1216
|
+
];
|
|
1217
|
+
let n = t[0];
|
|
1218
|
+
t[0].length === 3 && (n = n.split("").map((e) => e + e).join(""));
|
|
1219
|
+
let r = parseInt(n, 16);
|
|
1220
|
+
return [
|
|
1221
|
+
r >> 16 & 255,
|
|
1222
|
+
r >> 8 & 255,
|
|
1223
|
+
r & 255
|
|
1224
|
+
];
|
|
1225
|
+
}, i.rgb.hcg = function(e) {
|
|
1226
|
+
let t = e[0] / 255, n = e[1] / 255, r = e[2] / 255, i = Math.max(Math.max(t, n), r), a = Math.min(Math.min(t, n), r), o = i - a, s, c;
|
|
1227
|
+
return s = o < 1 ? a / (1 - o) : 0, c = o <= 0 ? 0 : i === t ? (n - r) / o % 6 : i === n ? 2 + (r - t) / o : 4 + (t - n) / o, c /= 6, c %= 1, [
|
|
1228
|
+
c * 360,
|
|
1229
|
+
o * 100,
|
|
1230
|
+
s * 100
|
|
1231
|
+
];
|
|
1232
|
+
}, i.hsl.hcg = function(e) {
|
|
1233
|
+
let t = e[1] / 100, n = e[2] / 100, r = n < .5 ? 2 * t * n : 2 * t * (1 - n), i = 0;
|
|
1234
|
+
return r < 1 && (i = (n - .5 * r) / (1 - r)), [
|
|
1235
|
+
e[0],
|
|
1236
|
+
r * 100,
|
|
1237
|
+
i * 100
|
|
1238
|
+
];
|
|
1239
|
+
}, i.hsv.hcg = function(e) {
|
|
1240
|
+
let t = e[1] / 100, n = e[2] / 100, r = t * n, i = 0;
|
|
1241
|
+
return r < 1 && (i = (n - r) / (1 - r)), [
|
|
1242
|
+
e[0],
|
|
1243
|
+
r * 100,
|
|
1244
|
+
i * 100
|
|
1245
|
+
];
|
|
1246
|
+
}, i.hcg.rgb = function(e) {
|
|
1247
|
+
let t = e[0] / 360, n = e[1] / 100, r = e[2] / 100;
|
|
1248
|
+
if (n === 0) return [
|
|
1249
|
+
r * 255,
|
|
1250
|
+
r * 255,
|
|
1251
|
+
r * 255
|
|
1252
|
+
];
|
|
1253
|
+
let i = [
|
|
1254
|
+
0,
|
|
1255
|
+
0,
|
|
1256
|
+
0
|
|
1257
|
+
], a = t % 1 * 6, o = a % 1, s = 1 - o, c = 0;
|
|
1258
|
+
switch (Math.floor(a)) {
|
|
1259
|
+
case 0:
|
|
1260
|
+
i[0] = 1, i[1] = o, i[2] = 0;
|
|
1261
|
+
break;
|
|
1262
|
+
case 1:
|
|
1263
|
+
i[0] = s, i[1] = 1, i[2] = 0;
|
|
1264
|
+
break;
|
|
1265
|
+
case 2:
|
|
1266
|
+
i[0] = 0, i[1] = 1, i[2] = o;
|
|
1267
|
+
break;
|
|
1268
|
+
case 3:
|
|
1269
|
+
i[0] = 0, i[1] = s, i[2] = 1;
|
|
1270
|
+
break;
|
|
1271
|
+
case 4:
|
|
1272
|
+
i[0] = o, i[1] = 0, i[2] = 1;
|
|
1273
|
+
break;
|
|
1274
|
+
default: i[0] = 1, i[1] = 0, i[2] = s;
|
|
1275
|
+
}
|
|
1276
|
+
return c = (1 - n) * r, [
|
|
1277
|
+
(n * i[0] + c) * 255,
|
|
1278
|
+
(n * i[1] + c) * 255,
|
|
1279
|
+
(n * i[2] + c) * 255
|
|
1280
|
+
];
|
|
1281
|
+
}, i.hcg.hsv = function(e) {
|
|
1282
|
+
let t = e[1] / 100, n = t + e[2] / 100 * (1 - t), r = 0;
|
|
1283
|
+
return n > 0 && (r = t / n), [
|
|
1284
|
+
e[0],
|
|
1285
|
+
r * 100,
|
|
1286
|
+
n * 100
|
|
1287
|
+
];
|
|
1288
|
+
}, i.hcg.hsl = function(e) {
|
|
1289
|
+
let t = e[1] / 100, n = e[2] / 100 * (1 - t) + .5 * t, r = 0;
|
|
1290
|
+
return n > 0 && n < .5 ? r = t / (2 * n) : n >= .5 && n < 1 && (r = t / (2 * (1 - n))), [
|
|
1291
|
+
e[0],
|
|
1292
|
+
r * 100,
|
|
1293
|
+
n * 100
|
|
1294
|
+
];
|
|
1295
|
+
}, i.hcg.hwb = function(e) {
|
|
1296
|
+
let t = e[1] / 100, n = t + e[2] / 100 * (1 - t);
|
|
1297
|
+
return [
|
|
1298
|
+
e[0],
|
|
1299
|
+
(n - t) * 100,
|
|
1300
|
+
(1 - n) * 100
|
|
1301
|
+
];
|
|
1302
|
+
}, i.hwb.hcg = function(e) {
|
|
1303
|
+
let t = e[1] / 100, n = 1 - e[2] / 100, r = n - t, i = 0;
|
|
1304
|
+
return r < 1 && (i = (n - r) / (1 - r)), [
|
|
1305
|
+
e[0],
|
|
1306
|
+
r * 100,
|
|
1307
|
+
i * 100
|
|
1308
|
+
];
|
|
1309
|
+
}, i.apple.rgb = function(e) {
|
|
1310
|
+
return [
|
|
1311
|
+
e[0] / 65535 * 255,
|
|
1312
|
+
e[1] / 65535 * 255,
|
|
1313
|
+
e[2] / 65535 * 255
|
|
1314
|
+
];
|
|
1315
|
+
}, i.rgb.apple = function(e) {
|
|
1316
|
+
return [
|
|
1317
|
+
e[0] / 255 * 65535,
|
|
1318
|
+
e[1] / 255 * 65535,
|
|
1319
|
+
e[2] / 255 * 65535
|
|
1320
|
+
];
|
|
1321
|
+
}, i.gray.rgb = function(e) {
|
|
1322
|
+
return [
|
|
1323
|
+
e[0] / 100 * 255,
|
|
1324
|
+
e[0] / 100 * 255,
|
|
1325
|
+
e[0] / 100 * 255
|
|
1326
|
+
];
|
|
1327
|
+
}, i.gray.hsl = function(e) {
|
|
1328
|
+
return [
|
|
1329
|
+
0,
|
|
1330
|
+
0,
|
|
1331
|
+
e[0]
|
|
1332
|
+
];
|
|
1333
|
+
}, i.gray.hsv = i.gray.hsl, i.gray.hwb = function(e) {
|
|
1334
|
+
return [
|
|
1335
|
+
0,
|
|
1336
|
+
100,
|
|
1337
|
+
e[0]
|
|
1338
|
+
];
|
|
1339
|
+
}, i.gray.cmyk = function(e) {
|
|
1340
|
+
return [
|
|
1341
|
+
0,
|
|
1342
|
+
0,
|
|
1343
|
+
0,
|
|
1344
|
+
e[0]
|
|
1345
|
+
];
|
|
1346
|
+
}, i.gray.lab = function(e) {
|
|
1347
|
+
return [
|
|
1348
|
+
e[0],
|
|
1349
|
+
0,
|
|
1350
|
+
0
|
|
1351
|
+
];
|
|
1352
|
+
}, i.gray.hex = function(e) {
|
|
1353
|
+
let t = Math.round(e[0] / 100 * 255) & 255, n = ((t << 16) + (t << 8) + t).toString(16).toUpperCase();
|
|
1354
|
+
return "000000".substring(n.length) + n;
|
|
1355
|
+
}, i.rgb.gray = function(e) {
|
|
1356
|
+
return [(e[0] + e[1] + e[2]) / 3 / 255 * 100];
|
|
1357
|
+
};
|
|
1358
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
1359
|
+
var n = ue();
|
|
1360
|
+
function r() {
|
|
1361
|
+
let e = {}, t = Object.keys(n);
|
|
1362
|
+
for (let n = t.length, r = 0; r < n; r++) e[t[r]] = {
|
|
1363
|
+
distance: -1,
|
|
1364
|
+
parent: null
|
|
1365
|
+
};
|
|
1366
|
+
return e;
|
|
1367
|
+
}
|
|
1368
|
+
function i(e) {
|
|
1369
|
+
let t = r(), i = [e];
|
|
1370
|
+
for (t[e].distance = 0; i.length;) {
|
|
1371
|
+
let e = i.pop(), r = Object.keys(n[e]);
|
|
1372
|
+
for (let n = r.length, a = 0; a < n; a++) {
|
|
1373
|
+
let n = r[a], o = t[n];
|
|
1374
|
+
o.distance === -1 && (o.distance = t[e].distance + 1, o.parent = e, i.unshift(n));
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
return t;
|
|
1378
|
+
}
|
|
1379
|
+
function a(e, t) {
|
|
1380
|
+
return function(n) {
|
|
1381
|
+
return t(e(n));
|
|
1382
|
+
};
|
|
1383
|
+
}
|
|
1384
|
+
function o(e, t) {
|
|
1385
|
+
let r = [t[e].parent, e], i = n[t[e].parent][e], o = t[e].parent;
|
|
1386
|
+
for (; t[o].parent;) r.unshift(t[o].parent), i = a(n[t[o].parent][o], i), o = t[o].parent;
|
|
1387
|
+
return i.conversion = r, i;
|
|
1388
|
+
}
|
|
1389
|
+
t.exports = function(e) {
|
|
1390
|
+
let t = i(e), n = {}, r = Object.keys(t);
|
|
1391
|
+
for (let e = r.length, i = 0; i < e; i++) {
|
|
1392
|
+
let e = r[i];
|
|
1393
|
+
t[e].parent !== null && (n[e] = o(e, t));
|
|
1394
|
+
}
|
|
1395
|
+
return n;
|
|
1396
|
+
};
|
|
1397
|
+
})), fe = /* @__PURE__ */ t(((e, t) => {
|
|
1398
|
+
var n = ue(), r = de(), i = {}, a = Object.keys(n);
|
|
1399
|
+
function o(e) {
|
|
1400
|
+
let t = function(...t) {
|
|
1401
|
+
let n = t[0];
|
|
1402
|
+
return n == null ? n : (n.length > 1 && (t = n), e(t));
|
|
1403
|
+
};
|
|
1404
|
+
return "conversion" in e && (t.conversion = e.conversion), t;
|
|
1405
|
+
}
|
|
1406
|
+
function s(e) {
|
|
1407
|
+
let t = function(...t) {
|
|
1408
|
+
let n = t[0];
|
|
1409
|
+
if (n == null) return n;
|
|
1410
|
+
n.length > 1 && (t = n);
|
|
1411
|
+
let r = e(t);
|
|
1412
|
+
if (typeof r == "object") for (let e = r.length, t = 0; t < e; t++) r[t] = Math.round(r[t]);
|
|
1413
|
+
return r;
|
|
1414
|
+
};
|
|
1415
|
+
return "conversion" in e && (t.conversion = e.conversion), t;
|
|
1416
|
+
}
|
|
1417
|
+
a.forEach((e) => {
|
|
1418
|
+
i[e] = {}, Object.defineProperty(i[e], "channels", { value: n[e].channels }), Object.defineProperty(i[e], "labels", { value: n[e].labels });
|
|
1419
|
+
let t = r(e);
|
|
1420
|
+
Object.keys(t).forEach((n) => {
|
|
1421
|
+
let r = t[n];
|
|
1422
|
+
i[e][n] = s(r), i[e][n].raw = o(r);
|
|
1423
|
+
});
|
|
1424
|
+
}), t.exports = i;
|
|
1425
|
+
})), pe = /* @__PURE__ */ t(((e, t) => {
|
|
1426
|
+
var n = le(), r = fe(), i = [
|
|
1427
|
+
"keyword",
|
|
1428
|
+
"gray",
|
|
1429
|
+
"hex"
|
|
1430
|
+
], a = {};
|
|
1431
|
+
for (let e of Object.keys(r)) a[[...r[e].labels].sort().join("")] = e;
|
|
1432
|
+
var o = {};
|
|
1433
|
+
function s(e, t) {
|
|
1434
|
+
if (!(this instanceof s)) return new s(e, t);
|
|
1435
|
+
if (t && t in i && (t = null), t && !(t in r)) throw Error("Unknown model: " + t);
|
|
1436
|
+
let c, l;
|
|
1437
|
+
if (e == null) this.model = "rgb", this.color = [
|
|
1438
|
+
0,
|
|
1439
|
+
0,
|
|
1440
|
+
0
|
|
1441
|
+
], this.valpha = 1;
|
|
1442
|
+
else if (e instanceof s) this.model = e.model, this.color = [...e.color], this.valpha = e.valpha;
|
|
1443
|
+
else if (typeof e == "string") {
|
|
1444
|
+
let t = n.get(e);
|
|
1445
|
+
if (t === null) throw Error("Unable to parse color from string: " + e);
|
|
1446
|
+
this.model = t.model, l = r[this.model].channels, this.color = t.value.slice(0, l), this.valpha = typeof t.value[l] == "number" ? t.value[l] : 1;
|
|
1447
|
+
} else if (e.length > 0) {
|
|
1448
|
+
this.model = t || "rgb", l = r[this.model].channels;
|
|
1449
|
+
let n = Array.prototype.slice.call(e, 0, l);
|
|
1450
|
+
this.color = p(n, l), this.valpha = typeof e[l] == "number" ? e[l] : 1;
|
|
1451
|
+
} else if (typeof e == "number") this.model = "rgb", this.color = [
|
|
1452
|
+
e >> 16 & 255,
|
|
1453
|
+
e >> 8 & 255,
|
|
1454
|
+
e & 255
|
|
1455
|
+
], this.valpha = 1;
|
|
1456
|
+
else {
|
|
1457
|
+
this.valpha = 1;
|
|
1458
|
+
let t = Object.keys(e);
|
|
1459
|
+
"alpha" in e && (t.splice(t.indexOf("alpha"), 1), this.valpha = typeof e.alpha == "number" ? e.alpha : 0);
|
|
1460
|
+
let n = t.sort().join("");
|
|
1461
|
+
if (!(n in a)) throw Error("Unable to parse color from object: " + JSON.stringify(e));
|
|
1462
|
+
this.model = a[n];
|
|
1463
|
+
let { labels: i } = r[this.model], o = [];
|
|
1464
|
+
for (c = 0; c < i.length; c++) o.push(e[i[c]]);
|
|
1465
|
+
this.color = p(o);
|
|
1466
|
+
}
|
|
1467
|
+
if (o[this.model]) for (l = r[this.model].channels, c = 0; c < l; c++) {
|
|
1468
|
+
let e = o[this.model][c];
|
|
1469
|
+
e && (this.color[c] = e(this.color[c]));
|
|
1470
|
+
}
|
|
1471
|
+
this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
|
|
1472
|
+
}
|
|
1473
|
+
s.prototype = {
|
|
1474
|
+
toString() {
|
|
1475
|
+
return this.string();
|
|
1476
|
+
},
|
|
1477
|
+
toJSON() {
|
|
1478
|
+
return this[this.model]();
|
|
1479
|
+
},
|
|
1480
|
+
string(e) {
|
|
1481
|
+
let t = this.model in n.to ? this : this.rgb();
|
|
1482
|
+
t = t.round(typeof e == "number" ? e : 1);
|
|
1483
|
+
let r = t.valpha === 1 ? t.color : [...t.color, this.valpha];
|
|
1484
|
+
return n.to[t.model](r);
|
|
1485
|
+
},
|
|
1486
|
+
percentString(e) {
|
|
1487
|
+
let t = this.rgb().round(typeof e == "number" ? e : 1), r = t.valpha === 1 ? t.color : [...t.color, this.valpha];
|
|
1488
|
+
return n.to.rgb.percent(r);
|
|
1489
|
+
},
|
|
1490
|
+
array() {
|
|
1491
|
+
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
1492
|
+
},
|
|
1493
|
+
object() {
|
|
1494
|
+
let e = {}, { channels: t } = r[this.model], { labels: n } = r[this.model];
|
|
1495
|
+
for (let r = 0; r < t; r++) e[n[r]] = this.color[r];
|
|
1496
|
+
return this.valpha !== 1 && (e.alpha = this.valpha), e;
|
|
1497
|
+
},
|
|
1498
|
+
unitArray() {
|
|
1499
|
+
let e = this.rgb().color;
|
|
1500
|
+
return e[0] /= 255, e[1] /= 255, e[2] /= 255, this.valpha !== 1 && e.push(this.valpha), e;
|
|
1501
|
+
},
|
|
1502
|
+
unitObject() {
|
|
1503
|
+
let e = this.rgb().object();
|
|
1504
|
+
return e.r /= 255, e.g /= 255, e.b /= 255, this.valpha !== 1 && (e.alpha = this.valpha), e;
|
|
1505
|
+
},
|
|
1506
|
+
round(e) {
|
|
1507
|
+
return e = Math.max(e || 0, 0), new s([...this.color.map(l(e)), this.valpha], this.model);
|
|
1508
|
+
},
|
|
1509
|
+
alpha(e) {
|
|
1510
|
+
return e === void 0 ? this.valpha : new s([...this.color, Math.max(0, Math.min(1, e))], this.model);
|
|
1511
|
+
},
|
|
1512
|
+
red: u("rgb", 0, d(255)),
|
|
1513
|
+
green: u("rgb", 1, d(255)),
|
|
1514
|
+
blue: u("rgb", 2, d(255)),
|
|
1515
|
+
hue: u([
|
|
1516
|
+
"hsl",
|
|
1517
|
+
"hsv",
|
|
1518
|
+
"hsl",
|
|
1519
|
+
"hwb",
|
|
1520
|
+
"hcg"
|
|
1521
|
+
], 0, (e) => (e % 360 + 360) % 360),
|
|
1522
|
+
saturationl: u("hsl", 1, d(100)),
|
|
1523
|
+
lightness: u("hsl", 2, d(100)),
|
|
1524
|
+
saturationv: u("hsv", 1, d(100)),
|
|
1525
|
+
value: u("hsv", 2, d(100)),
|
|
1526
|
+
chroma: u("hcg", 1, d(100)),
|
|
1527
|
+
gray: u("hcg", 2, d(100)),
|
|
1528
|
+
white: u("hwb", 1, d(100)),
|
|
1529
|
+
wblack: u("hwb", 2, d(100)),
|
|
1530
|
+
cyan: u("cmyk", 0, d(100)),
|
|
1531
|
+
magenta: u("cmyk", 1, d(100)),
|
|
1532
|
+
yellow: u("cmyk", 2, d(100)),
|
|
1533
|
+
black: u("cmyk", 3, d(100)),
|
|
1534
|
+
x: u("xyz", 0, d(95.047)),
|
|
1535
|
+
y: u("xyz", 1, d(100)),
|
|
1536
|
+
z: u("xyz", 2, d(108.833)),
|
|
1537
|
+
l: u("lab", 0, d(100)),
|
|
1538
|
+
a: u("lab", 1),
|
|
1539
|
+
b: u("lab", 2),
|
|
1540
|
+
keyword(e) {
|
|
1541
|
+
return e === void 0 ? r[this.model].keyword(this.color) : new s(e);
|
|
1542
|
+
},
|
|
1543
|
+
hex(e) {
|
|
1544
|
+
return e === void 0 ? n.to.hex(this.rgb().round().color) : new s(e);
|
|
1545
|
+
},
|
|
1546
|
+
hexa(e) {
|
|
1547
|
+
if (e !== void 0) return new s(e);
|
|
1548
|
+
let t = this.rgb().round().color, r = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
|
1549
|
+
return r.length === 1 && (r = "0" + r), n.to.hex(t) + r;
|
|
1550
|
+
},
|
|
1551
|
+
rgbNumber() {
|
|
1552
|
+
let e = this.rgb().color;
|
|
1553
|
+
return (e[0] & 255) << 16 | (e[1] & 255) << 8 | e[2] & 255;
|
|
1554
|
+
},
|
|
1555
|
+
luminosity() {
|
|
1556
|
+
let e = this.rgb().color, t = [];
|
|
1557
|
+
for (let [n, r] of e.entries()) {
|
|
1558
|
+
let e = r / 255;
|
|
1559
|
+
t[n] = e <= .04045 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4;
|
|
1560
|
+
}
|
|
1561
|
+
return .2126 * t[0] + .7152 * t[1] + .0722 * t[2];
|
|
1562
|
+
},
|
|
1563
|
+
contrast(e) {
|
|
1564
|
+
let t = this.luminosity(), n = e.luminosity();
|
|
1565
|
+
return t > n ? (t + .05) / (n + .05) : (n + .05) / (t + .05);
|
|
1566
|
+
},
|
|
1567
|
+
level(e) {
|
|
1568
|
+
let t = this.contrast(e);
|
|
1569
|
+
return t >= 7 ? "AAA" : t >= 4.5 ? "AA" : "";
|
|
1570
|
+
},
|
|
1571
|
+
isDark() {
|
|
1572
|
+
let e = this.rgb().color;
|
|
1573
|
+
return (e[0] * 2126 + e[1] * 7152 + e[2] * 722) / 1e4 < 128;
|
|
1574
|
+
},
|
|
1575
|
+
isLight() {
|
|
1576
|
+
return !this.isDark();
|
|
1577
|
+
},
|
|
1578
|
+
negate() {
|
|
1579
|
+
let e = this.rgb();
|
|
1580
|
+
for (let t = 0; t < 3; t++) e.color[t] = 255 - e.color[t];
|
|
1581
|
+
return e;
|
|
1582
|
+
},
|
|
1583
|
+
lighten(e) {
|
|
1584
|
+
let t = this.hsl();
|
|
1585
|
+
return t.color[2] += t.color[2] * e, t;
|
|
1586
|
+
},
|
|
1587
|
+
darken(e) {
|
|
1588
|
+
let t = this.hsl();
|
|
1589
|
+
return t.color[2] -= t.color[2] * e, t;
|
|
1590
|
+
},
|
|
1591
|
+
saturate(e) {
|
|
1592
|
+
let t = this.hsl();
|
|
1593
|
+
return t.color[1] += t.color[1] * e, t;
|
|
1594
|
+
},
|
|
1595
|
+
desaturate(e) {
|
|
1596
|
+
let t = this.hsl();
|
|
1597
|
+
return t.color[1] -= t.color[1] * e, t;
|
|
1598
|
+
},
|
|
1599
|
+
whiten(e) {
|
|
1600
|
+
let t = this.hwb();
|
|
1601
|
+
return t.color[1] += t.color[1] * e, t;
|
|
1602
|
+
},
|
|
1603
|
+
blacken(e) {
|
|
1604
|
+
let t = this.hwb();
|
|
1605
|
+
return t.color[2] += t.color[2] * e, t;
|
|
1606
|
+
},
|
|
1607
|
+
grayscale() {
|
|
1608
|
+
let e = this.rgb().color, t = e[0] * .3 + e[1] * .59 + e[2] * .11;
|
|
1609
|
+
return s.rgb(t, t, t);
|
|
1610
|
+
},
|
|
1611
|
+
fade(e) {
|
|
1612
|
+
return this.alpha(this.valpha - this.valpha * e);
|
|
1613
|
+
},
|
|
1614
|
+
opaquer(e) {
|
|
1615
|
+
return this.alpha(this.valpha + this.valpha * e);
|
|
1616
|
+
},
|
|
1617
|
+
rotate(e) {
|
|
1618
|
+
let t = this.hsl(), n = t.color[0];
|
|
1619
|
+
return n = (n + e) % 360, n = n < 0 ? 360 + n : n, t.color[0] = n, t;
|
|
1620
|
+
},
|
|
1621
|
+
mix(e, t) {
|
|
1622
|
+
if (!e || !e.rgb) throw Error("Argument to \"mix\" was not a Color instance, but rather an instance of " + typeof e);
|
|
1623
|
+
let n = e.rgb(), r = this.rgb(), i = t === void 0 ? .5 : t, a = 2 * i - 1, o = n.alpha() - r.alpha(), c = ((a * o === -1 ? a : (a + o) / (1 + a * o)) + 1) / 2, l = 1 - c;
|
|
1624
|
+
return s.rgb(c * n.red() + l * r.red(), c * n.green() + l * r.green(), c * n.blue() + l * r.blue(), n.alpha() * i + r.alpha() * (1 - i));
|
|
1625
|
+
}
|
|
1626
|
+
};
|
|
1627
|
+
for (let e of Object.keys(r)) {
|
|
1628
|
+
if (i.includes(e)) continue;
|
|
1629
|
+
let { channels: t } = r[e];
|
|
1630
|
+
s.prototype[e] = function(...t) {
|
|
1631
|
+
return this.model === e ? new s(this) : t.length > 0 ? new s(t, e) : new s([...f(r[this.model][e].raw(this.color)), this.valpha], e);
|
|
1632
|
+
}, s[e] = function(...n) {
|
|
1633
|
+
let r = n[0];
|
|
1634
|
+
return typeof r == "number" && (r = p(n, t)), new s(r, e);
|
|
1635
|
+
};
|
|
1636
|
+
}
|
|
1637
|
+
function c(e, t) {
|
|
1638
|
+
return Number(e.toFixed(t));
|
|
1639
|
+
}
|
|
1640
|
+
function l(e) {
|
|
1641
|
+
return function(t) {
|
|
1642
|
+
return c(t, e);
|
|
1643
|
+
};
|
|
1644
|
+
}
|
|
1645
|
+
function u(e, t, n) {
|
|
1646
|
+
e = Array.isArray(e) ? e : [e];
|
|
1647
|
+
for (let r of e) (o[r] || (o[r] = []))[t] = n;
|
|
1648
|
+
return e = e[0], function(r) {
|
|
1649
|
+
let i;
|
|
1650
|
+
return r === void 0 ? (i = this[e]().color[t], n && (i = n(i)), i) : (n && (r = n(r)), i = this[e](), i.color[t] = r, i);
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1653
|
+
function d(e) {
|
|
1654
|
+
return function(t) {
|
|
1655
|
+
return Math.max(0, Math.min(e, t));
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
function f(e) {
|
|
1659
|
+
return Array.isArray(e) ? e : [e];
|
|
1660
|
+
}
|
|
1661
|
+
function p(e, t) {
|
|
1662
|
+
for (let n = 0; n < t; n++) typeof e[n] != "number" && (e[n] = 0);
|
|
1663
|
+
return e;
|
|
1664
|
+
}
|
|
1665
|
+
t.exports = s;
|
|
1666
|
+
}));
|
|
1667
|
+
function me(...e) {
|
|
1668
|
+
return e.reduce((e, t) => t == null ? e : function(...n) {
|
|
1669
|
+
e.apply(this, n), t.apply(this, n);
|
|
1670
|
+
}, () => {});
|
|
1671
|
+
}
|
|
1672
|
+
function he(e, t = 166) {
|
|
1673
|
+
let n;
|
|
1674
|
+
function r(...r) {
|
|
1675
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
1676
|
+
e.apply(this, r);
|
|
1677
|
+
}, t);
|
|
1678
|
+
}
|
|
1679
|
+
return r.clear = () => {
|
|
1680
|
+
clearTimeout(n);
|
|
1681
|
+
}, r;
|
|
1682
|
+
}
|
|
1683
|
+
function q(e) {
|
|
1684
|
+
return F(e).defaultView || window;
|
|
1685
|
+
}
|
|
1686
|
+
function ge(e) {
|
|
1687
|
+
let t = e.documentElement.clientWidth;
|
|
1688
|
+
return Math.abs(window.innerWidth - t);
|
|
1689
|
+
}
|
|
1690
|
+
var J = /* @__PURE__ */ e(c());
|
|
1691
|
+
T(), p();
|
|
1692
|
+
var _e = h(), ve = (e) => {
|
|
1693
|
+
let t;
|
|
1694
|
+
return t = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, (t / 100).toFixed(2);
|
|
1695
|
+
}, Y = S(), ye = he, be = F, xe = q, Se = C;
|
|
1696
|
+
function Ce(e) {
|
|
1697
|
+
return N("MuiPaper", e);
|
|
1698
|
+
}
|
|
1699
|
+
A("MuiPaper", /* @__PURE__ */ "root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24".split("."));
|
|
1700
|
+
var we = [
|
|
1701
|
+
"className",
|
|
1702
|
+
"component",
|
|
1703
|
+
"elevation",
|
|
1704
|
+
"square",
|
|
1705
|
+
"variant"
|
|
1706
|
+
], Te = (e) => {
|
|
1707
|
+
let { square: t, elevation: n, variant: r, classes: i } = e;
|
|
1708
|
+
return D({ root: [
|
|
1709
|
+
"root",
|
|
1710
|
+
r,
|
|
1711
|
+
!t && "rounded",
|
|
1712
|
+
r === "elevation" && `elevation${n}`
|
|
1713
|
+
] }, Ce, i);
|
|
1714
|
+
}, Ee = j("div", {
|
|
1715
|
+
name: "MuiPaper",
|
|
1716
|
+
slot: "Root",
|
|
1717
|
+
overridesResolver: (e, t) => {
|
|
1718
|
+
let { ownerState: n } = e;
|
|
1719
|
+
return [
|
|
1720
|
+
t.root,
|
|
1721
|
+
t[n.variant],
|
|
1722
|
+
!n.square && t.rounded,
|
|
1723
|
+
n.variant === "elevation" && t[`elevation${n.elevation}`]
|
|
1724
|
+
];
|
|
1725
|
+
}
|
|
1726
|
+
})(({ theme: e, ownerState: t }) => v({
|
|
1727
|
+
backgroundColor: (e.vars || e).palette.background.paper,
|
|
1728
|
+
color: (e.vars || e).palette.text.primary,
|
|
1729
|
+
transition: e.transitions.create("box-shadow")
|
|
1730
|
+
}, !t.square && { borderRadius: e.shape.borderRadius }, t.variant === "outlined" && { border: `1px solid ${(e.vars || e).palette.divider}` }, t.variant === "elevation" && v({ boxShadow: (e.vars || e).shadows[t.elevation] }, !e.vars && e.palette.mode === "dark" && { backgroundImage: `linear-gradient(${(0, _e.alpha)("#fff", ve(t.elevation))}, ${(0, _e.alpha)("#fff", ve(t.elevation))})` }, e.vars && { backgroundImage: e.vars.overlays?.[t.elevation] }))), De = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
1731
|
+
let n = M({
|
|
1732
|
+
props: e,
|
|
1733
|
+
name: "MuiPaper"
|
|
1734
|
+
}), { className: r, component: i = "div", elevation: a = 1, square: s = !1, variant: c = "elevation" } = n, l = o(n, we), u = v({}, n, {
|
|
1735
|
+
component: i,
|
|
1736
|
+
elevation: a,
|
|
1737
|
+
square: s,
|
|
1738
|
+
variant: c
|
|
1739
|
+
}), d = Te(u);
|
|
1740
|
+
return /*#__PURE__*/ (0, Y.jsx)(Ee, v({
|
|
1741
|
+
as: i,
|
|
1742
|
+
ownerState: u,
|
|
1743
|
+
className: O(d.root, r),
|
|
1744
|
+
ref: t
|
|
1745
|
+
}, l));
|
|
1746
|
+
});
|
|
1747
|
+
T(), p();
|
|
1748
|
+
var Oe = [
|
|
1749
|
+
"addEndListener",
|
|
1750
|
+
"appear",
|
|
1751
|
+
"children",
|
|
1752
|
+
"easing",
|
|
1753
|
+
"in",
|
|
1754
|
+
"onEnter",
|
|
1755
|
+
"onEntered",
|
|
1756
|
+
"onEntering",
|
|
1757
|
+
"onExit",
|
|
1758
|
+
"onExited",
|
|
1759
|
+
"onExiting",
|
|
1760
|
+
"style",
|
|
1761
|
+
"timeout",
|
|
1762
|
+
"TransitionComponent"
|
|
1763
|
+
], ke = {
|
|
1764
|
+
entering: { opacity: 1 },
|
|
1765
|
+
entered: { opacity: 1 }
|
|
1766
|
+
}, Ae = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
1767
|
+
let n = l(), r = {
|
|
1768
|
+
enter: n.transitions.duration.enteringScreen,
|
|
1769
|
+
exit: n.transitions.duration.leavingScreen
|
|
1770
|
+
}, { addEndListener: i, appear: a = !0, children: s, easing: c, in: u, onEnter: d, onEntered: f, onEntering: p, onExit: m, onExited: h, onExiting: g, style: _, timeout: y = r, TransitionComponent: b = ne } = e, x = o(e, Oe), S = J.useRef(null), C = U(S, V(s), t), w = (e) => (t) => {
|
|
1771
|
+
if (e) {
|
|
1772
|
+
let n = S.current;
|
|
1773
|
+
t === void 0 ? e(n) : e(n, t);
|
|
1774
|
+
}
|
|
1775
|
+
}, T = w(p), E = w((e, t) => {
|
|
1776
|
+
H(e);
|
|
1777
|
+
let r = B({
|
|
1778
|
+
style: _,
|
|
1779
|
+
timeout: y,
|
|
1780
|
+
easing: c
|
|
1781
|
+
}, { mode: "enter" });
|
|
1782
|
+
e.style.webkitTransition = n.transitions.create("opacity", r), e.style.transition = n.transitions.create("opacity", r), d && d(e, t);
|
|
1783
|
+
}), D = w(f), O = w(g), k = w((e) => {
|
|
1784
|
+
let t = B({
|
|
1785
|
+
style: _,
|
|
1786
|
+
timeout: y,
|
|
1787
|
+
easing: c
|
|
1788
|
+
}, { mode: "exit" });
|
|
1789
|
+
e.style.webkitTransition = n.transitions.create("opacity", t), e.style.transition = n.transitions.create("opacity", t), m && m(e);
|
|
1790
|
+
}), A = w(h);
|
|
1791
|
+
return /*#__PURE__*/ (0, Y.jsx)(b, v({
|
|
1792
|
+
appear: a,
|
|
1793
|
+
in: u,
|
|
1794
|
+
nodeRef: S,
|
|
1795
|
+
onEnter: E,
|
|
1796
|
+
onEntered: D,
|
|
1797
|
+
onEntering: T,
|
|
1798
|
+
onExit: k,
|
|
1799
|
+
onExited: A,
|
|
1800
|
+
onExiting: O,
|
|
1801
|
+
addEndListener: (e) => {
|
|
1802
|
+
i && i(S.current, e);
|
|
1803
|
+
},
|
|
1804
|
+
timeout: y
|
|
1805
|
+
}, x, { children: (e, t) => /*#__PURE__*/ J.cloneElement(s, v({
|
|
1806
|
+
style: v({
|
|
1807
|
+
opacity: 0,
|
|
1808
|
+
visibility: e === "exited" && !u ? "hidden" : void 0
|
|
1809
|
+
}, ke[e], _, s.props.style),
|
|
1810
|
+
ref: C
|
|
1811
|
+
}, t)) }));
|
|
1812
|
+
});
|
|
1813
|
+
function je(e) {
|
|
1814
|
+
return N("MuiBackdrop", e);
|
|
1815
|
+
}
|
|
1816
|
+
A("MuiBackdrop", ["root", "invisible"]), p(), T();
|
|
1817
|
+
var Me = [
|
|
1818
|
+
"children",
|
|
1819
|
+
"className",
|
|
1820
|
+
"component",
|
|
1821
|
+
"components",
|
|
1822
|
+
"componentsProps",
|
|
1823
|
+
"invisible",
|
|
1824
|
+
"open",
|
|
1825
|
+
"slotProps",
|
|
1826
|
+
"slots",
|
|
1827
|
+
"TransitionComponent",
|
|
1828
|
+
"transitionDuration"
|
|
1829
|
+
], Ne = (e) => {
|
|
1830
|
+
let { classes: t, invisible: n } = e;
|
|
1831
|
+
return D({ root: ["root", n && "invisible"] }, je, t);
|
|
1832
|
+
}, Pe = j("div", {
|
|
1833
|
+
name: "MuiBackdrop",
|
|
1834
|
+
slot: "Root",
|
|
1835
|
+
overridesResolver: (e, t) => {
|
|
1836
|
+
let { ownerState: n } = e;
|
|
1837
|
+
return [t.root, n.invisible && t.invisible];
|
|
1838
|
+
}
|
|
1839
|
+
})(({ ownerState: e }) => v({
|
|
1840
|
+
position: "fixed",
|
|
1841
|
+
display: "flex",
|
|
1842
|
+
alignItems: "center",
|
|
1843
|
+
justifyContent: "center",
|
|
1844
|
+
right: 0,
|
|
1845
|
+
bottom: 0,
|
|
1846
|
+
top: 0,
|
|
1847
|
+
left: 0,
|
|
1848
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1849
|
+
WebkitTapHighlightColor: "transparent"
|
|
1850
|
+
}, e.invisible && { backgroundColor: "transparent" })), Fe = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
1851
|
+
let n = M({
|
|
1852
|
+
props: e,
|
|
1853
|
+
name: "MuiBackdrop"
|
|
1854
|
+
}), { children: r, className: i, component: a = "div", components: s = {}, componentsProps: c = {}, invisible: l = !1, open: u, slotProps: d = {}, slots: f = {}, TransitionComponent: p = Ae, transitionDuration: m } = n, h = o(n, Me), g = v({}, n, {
|
|
1855
|
+
component: a,
|
|
1856
|
+
invisible: l
|
|
1857
|
+
}), _ = Ne(g), y = d.root ?? c.root;
|
|
1858
|
+
return /*#__PURE__*/ (0, Y.jsx)(p, v({
|
|
1859
|
+
in: u,
|
|
1860
|
+
timeout: m
|
|
1861
|
+
}, h, { children: /*#__PURE__*/ (0, Y.jsx)(Pe, v({ "aria-hidden": !0 }, y, {
|
|
1862
|
+
as: f.root ?? s.Root ?? a,
|
|
1863
|
+
className: O(_.root, i, y?.className),
|
|
1864
|
+
ownerState: v({}, g, y?.ownerState),
|
|
1865
|
+
classes: _,
|
|
1866
|
+
ref: t,
|
|
1867
|
+
children: r
|
|
1868
|
+
})) }));
|
|
1869
|
+
});
|
|
1870
|
+
function Ie(e) {
|
|
1871
|
+
return e.substring(2).toLowerCase();
|
|
1872
|
+
}
|
|
1873
|
+
function Le(e, t) {
|
|
1874
|
+
return t.documentElement.clientWidth < e.clientX || t.documentElement.clientHeight < e.clientY;
|
|
1875
|
+
}
|
|
1876
|
+
function Re(e) {
|
|
1877
|
+
let { children: t, disableReactTree: n = !1, mouseEvent: r = "onClick", onClickAway: i, touchEvent: a = "onTouchEnd" } = e, o = J.useRef(!1), s = J.useRef(null), c = J.useRef(!1), l = J.useRef(!1);
|
|
1878
|
+
J.useEffect(() => (setTimeout(() => {
|
|
1879
|
+
c.current = !0;
|
|
1880
|
+
}, 0), () => {
|
|
1881
|
+
c.current = !1;
|
|
1882
|
+
}), []);
|
|
1883
|
+
let u = P(V(t), s), d = I((e) => {
|
|
1884
|
+
let t = l.current;
|
|
1885
|
+
l.current = !1;
|
|
1886
|
+
let r = F(s.current);
|
|
1887
|
+
if (!c.current || !s.current || "clientX" in e && Le(e, r)) return;
|
|
1888
|
+
if (o.current) {
|
|
1889
|
+
o.current = !1;
|
|
1890
|
+
return;
|
|
1891
|
+
}
|
|
1892
|
+
let a;
|
|
1893
|
+
a = e.composedPath ? e.composedPath().indexOf(s.current) > -1 : !r.documentElement.contains(e.target) || s.current.contains(e.target), !a && (n || !t) && i(e);
|
|
1894
|
+
}), f = (e) => (n) => {
|
|
1895
|
+
l.current = !0;
|
|
1896
|
+
let r = t.props[e];
|
|
1897
|
+
r && r(n);
|
|
1898
|
+
}, p = { ref: u };
|
|
1899
|
+
return a !== !1 && (p[a] = f(a)), J.useEffect(() => {
|
|
1900
|
+
if (a !== !1) {
|
|
1901
|
+
let e = Ie(a), t = F(s.current), n = () => {
|
|
1902
|
+
o.current = !0;
|
|
1903
|
+
};
|
|
1904
|
+
return t.addEventListener(e, d), t.addEventListener("touchmove", n), () => {
|
|
1905
|
+
t.removeEventListener(e, d), t.removeEventListener("touchmove", n);
|
|
1906
|
+
};
|
|
1907
|
+
}
|
|
1908
|
+
}, [d, a]), r !== !1 && (p[r] = f(r)), J.useEffect(() => {
|
|
1909
|
+
if (r !== !1) {
|
|
1910
|
+
let e = Ie(r), t = F(s.current);
|
|
1911
|
+
return t.addEventListener(e, d), () => {
|
|
1912
|
+
t.removeEventListener(e, d);
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
}, [d, r]), /*#__PURE__*/ (0, Y.jsx)(J.Fragment, { children: /*#__PURE__*/ J.cloneElement(t, p) });
|
|
1916
|
+
}
|
|
1917
|
+
function ze(e) {
|
|
1918
|
+
let t = F(e);
|
|
1919
|
+
return t.body === e ? q(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
|
|
1920
|
+
}
|
|
1921
|
+
function X(e, t) {
|
|
1922
|
+
t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
|
|
1923
|
+
}
|
|
1924
|
+
function Be(e) {
|
|
1925
|
+
return parseInt(q(e).getComputedStyle(e).paddingRight, 10) || 0;
|
|
1926
|
+
}
|
|
1927
|
+
function Ve(e) {
|
|
1928
|
+
let t = [
|
|
1929
|
+
"TEMPLATE",
|
|
1930
|
+
"SCRIPT",
|
|
1931
|
+
"STYLE",
|
|
1932
|
+
"LINK",
|
|
1933
|
+
"MAP",
|
|
1934
|
+
"META",
|
|
1935
|
+
"NOSCRIPT",
|
|
1936
|
+
"PICTURE",
|
|
1937
|
+
"COL",
|
|
1938
|
+
"COLGROUP",
|
|
1939
|
+
"PARAM",
|
|
1940
|
+
"SLOT",
|
|
1941
|
+
"SOURCE",
|
|
1942
|
+
"TRACK"
|
|
1943
|
+
].indexOf(e.tagName) !== -1, n = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
|
|
1944
|
+
return t || n;
|
|
1945
|
+
}
|
|
1946
|
+
function He(e, t, n, r, i) {
|
|
1947
|
+
let a = [
|
|
1948
|
+
t,
|
|
1949
|
+
n,
|
|
1950
|
+
...r
|
|
1951
|
+
];
|
|
1952
|
+
[].forEach.call(e.children, (e) => {
|
|
1953
|
+
let t = a.indexOf(e) === -1, n = !Ve(e);
|
|
1954
|
+
t && n && X(e, i);
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
function Ue(e, t) {
|
|
1958
|
+
let n = -1;
|
|
1959
|
+
return e.some((e, r) => t(e) ? (n = r, !0) : !1), n;
|
|
1960
|
+
}
|
|
1961
|
+
function We(e, t) {
|
|
1962
|
+
let n = [], r = e.container;
|
|
1963
|
+
if (!t.disableScrollLock) {
|
|
1964
|
+
if (ze(r)) {
|
|
1965
|
+
let e = ge(F(r));
|
|
1966
|
+
n.push({
|
|
1967
|
+
value: r.style.paddingRight,
|
|
1968
|
+
property: "padding-right",
|
|
1969
|
+
el: r
|
|
1970
|
+
}), r.style.paddingRight = `${Be(r) + e}px`;
|
|
1971
|
+
let t = F(r).querySelectorAll(".mui-fixed");
|
|
1972
|
+
[].forEach.call(t, (t) => {
|
|
1973
|
+
n.push({
|
|
1974
|
+
value: t.style.paddingRight,
|
|
1975
|
+
property: "padding-right",
|
|
1976
|
+
el: t
|
|
1977
|
+
}), t.style.paddingRight = `${Be(t) + e}px`;
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
let e;
|
|
1981
|
+
if (r.parentNode instanceof DocumentFragment) e = F(r).body;
|
|
1982
|
+
else {
|
|
1983
|
+
let t = r.parentElement, n = q(r);
|
|
1984
|
+
e = t?.nodeName === "HTML" && n.getComputedStyle(t).overflowY === "scroll" ? t : r;
|
|
1985
|
+
}
|
|
1986
|
+
n.push({
|
|
1987
|
+
value: e.style.overflow,
|
|
1988
|
+
property: "overflow",
|
|
1989
|
+
el: e
|
|
1990
|
+
}, {
|
|
1991
|
+
value: e.style.overflowX,
|
|
1992
|
+
property: "overflow-x",
|
|
1993
|
+
el: e
|
|
1994
|
+
}, {
|
|
1995
|
+
value: e.style.overflowY,
|
|
1996
|
+
property: "overflow-y",
|
|
1997
|
+
el: e
|
|
1998
|
+
}), e.style.overflow = "hidden";
|
|
1999
|
+
}
|
|
2000
|
+
return () => {
|
|
2001
|
+
n.forEach(({ value: e, el: t, property: n }) => {
|
|
2002
|
+
e ? t.style.setProperty(n, e) : t.style.removeProperty(n);
|
|
2003
|
+
});
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
function Ge(e) {
|
|
2007
|
+
let t = [];
|
|
2008
|
+
return [].forEach.call(e.children, (e) => {
|
|
2009
|
+
e.getAttribute("aria-hidden") === "true" && t.push(e);
|
|
2010
|
+
}), t;
|
|
2011
|
+
}
|
|
2012
|
+
var Ke = class {
|
|
2013
|
+
constructor() {
|
|
2014
|
+
this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
|
|
2015
|
+
}
|
|
2016
|
+
add(e, t) {
|
|
2017
|
+
let n = this.modals.indexOf(e);
|
|
2018
|
+
if (n !== -1) return n;
|
|
2019
|
+
n = this.modals.length, this.modals.push(e), e.modalRef && X(e.modalRef, !1);
|
|
2020
|
+
let r = Ge(t);
|
|
2021
|
+
He(t, e.mount, e.modalRef, r, !0);
|
|
2022
|
+
let i = Ue(this.containers, (e) => e.container === t);
|
|
2023
|
+
return i === -1 ? (this.containers.push({
|
|
2024
|
+
modals: [e],
|
|
2025
|
+
container: t,
|
|
2026
|
+
restore: null,
|
|
2027
|
+
hiddenSiblings: r
|
|
2028
|
+
}), n) : (this.containers[i].modals.push(e), n);
|
|
2029
|
+
}
|
|
2030
|
+
mount(e, t) {
|
|
2031
|
+
let n = Ue(this.containers, (t) => t.modals.indexOf(e) !== -1), r = this.containers[n];
|
|
2032
|
+
r.restore ||= We(r, t);
|
|
2033
|
+
}
|
|
2034
|
+
remove(e, t = !0) {
|
|
2035
|
+
let n = this.modals.indexOf(e);
|
|
2036
|
+
if (n === -1) return n;
|
|
2037
|
+
let r = Ue(this.containers, (t) => t.modals.indexOf(e) !== -1), i = this.containers[r];
|
|
2038
|
+
if (i.modals.splice(i.modals.indexOf(e), 1), this.modals.splice(n, 1), i.modals.length === 0) i.restore && i.restore(), e.modalRef && X(e.modalRef, t), He(i.container, e.mount, e.modalRef, i.hiddenSiblings, !1), this.containers.splice(r, 1);
|
|
2039
|
+
else {
|
|
2040
|
+
let e = i.modals[i.modals.length - 1];
|
|
2041
|
+
e.modalRef && X(e.modalRef, !1);
|
|
2042
|
+
}
|
|
2043
|
+
return n;
|
|
2044
|
+
}
|
|
2045
|
+
isTopModal(e) {
|
|
2046
|
+
return this.modals.length > 0 && this.modals[this.modals.length - 1] === e;
|
|
2047
|
+
}
|
|
2048
|
+
}, qe = [
|
|
2049
|
+
"input",
|
|
2050
|
+
"select",
|
|
2051
|
+
"textarea",
|
|
2052
|
+
"a[href]",
|
|
2053
|
+
"button",
|
|
2054
|
+
"[tabindex]",
|
|
2055
|
+
"audio[controls]",
|
|
2056
|
+
"video[controls]",
|
|
2057
|
+
"[contenteditable]:not([contenteditable=\"false\"])"
|
|
2058
|
+
].join(",");
|
|
2059
|
+
function Je(e) {
|
|
2060
|
+
let t = parseInt(e.getAttribute("tabindex") || "", 10);
|
|
2061
|
+
return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
|
|
2062
|
+
}
|
|
2063
|
+
function Ye(e) {
|
|
2064
|
+
if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name) return !1;
|
|
2065
|
+
let t = (t) => e.ownerDocument.querySelector(`input[type="radio"]${t}`), n = t(`[name="${e.name}"]:checked`);
|
|
2066
|
+
return n ||= t(`[name="${e.name}"]`), n !== e;
|
|
2067
|
+
}
|
|
2068
|
+
function Xe(e) {
|
|
2069
|
+
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Ye(e));
|
|
2070
|
+
}
|
|
2071
|
+
function Ze(e) {
|
|
2072
|
+
let t = [], n = [];
|
|
2073
|
+
return Array.from(e.querySelectorAll(qe)).forEach((e, r) => {
|
|
2074
|
+
let i = Je(e);
|
|
2075
|
+
i === -1 || !Xe(e) || (i === 0 ? t.push(e) : n.push({
|
|
2076
|
+
documentOrder: r,
|
|
2077
|
+
tabIndex: i,
|
|
2078
|
+
node: e
|
|
2079
|
+
}));
|
|
2080
|
+
}), n.sort((e, t) => e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex).map((e) => e.node).concat(t);
|
|
2081
|
+
}
|
|
2082
|
+
function Qe() {
|
|
2083
|
+
return !0;
|
|
2084
|
+
}
|
|
2085
|
+
function $e(e) {
|
|
2086
|
+
let { children: t, disableAutoFocus: n = !1, disableEnforceFocus: r = !1, disableRestoreFocus: i = !1, getTabbable: a = Ze, isEnabled: o = Qe, open: s } = e, c = J.useRef(!1), l = J.useRef(null), u = J.useRef(null), d = J.useRef(null), f = J.useRef(null), p = J.useRef(!1), m = J.useRef(null), h = P(V(t), m), g = J.useRef(null);
|
|
2087
|
+
J.useEffect(() => {
|
|
2088
|
+
!s || !m.current || (p.current = !n);
|
|
2089
|
+
}, [n, s]), J.useEffect(() => {
|
|
2090
|
+
if (!s || !m.current) return;
|
|
2091
|
+
let e = F(m.current);
|
|
2092
|
+
return m.current.contains(e.activeElement) || (m.current.hasAttribute("tabIndex") || m.current.setAttribute("tabIndex", "-1"), p.current && m.current.focus()), () => {
|
|
2093
|
+
i || (d.current && d.current.focus && (c.current = !0, d.current.focus()), d.current = null);
|
|
2094
|
+
};
|
|
2095
|
+
}, [s]), J.useEffect(() => {
|
|
2096
|
+
if (!s || !m.current) return;
|
|
2097
|
+
let e = F(m.current), t = (t) => {
|
|
2098
|
+
g.current = t, !(r || !o() || t.key !== "Tab") && e.activeElement === m.current && t.shiftKey && (c.current = !0, u.current && u.current.focus());
|
|
2099
|
+
}, n = () => {
|
|
2100
|
+
let t = m.current;
|
|
2101
|
+
if (t === null) return;
|
|
2102
|
+
if (!e.hasFocus() || !o() || c.current) {
|
|
2103
|
+
c.current = !1;
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
if (t.contains(e.activeElement) || r && e.activeElement !== l.current && e.activeElement !== u.current) return;
|
|
2107
|
+
if (e.activeElement !== f.current) f.current = null;
|
|
2108
|
+
else if (f.current !== null) return;
|
|
2109
|
+
if (!p.current) return;
|
|
2110
|
+
let n = [];
|
|
2111
|
+
if ((e.activeElement === l.current || e.activeElement === u.current) && (n = a(m.current)), n.length > 0) {
|
|
2112
|
+
let e = !!(g.current?.shiftKey && g.current?.key === "Tab"), t = n[0], r = n[n.length - 1];
|
|
2113
|
+
typeof t != "string" && typeof r != "string" && (e ? r.focus() : t.focus());
|
|
2114
|
+
} else t.focus();
|
|
2115
|
+
};
|
|
2116
|
+
e.addEventListener("focusin", n), e.addEventListener("keydown", t, !0);
|
|
2117
|
+
let i = setInterval(() => {
|
|
2118
|
+
e.activeElement && e.activeElement.tagName === "BODY" && n();
|
|
2119
|
+
}, 50);
|
|
2120
|
+
return () => {
|
|
2121
|
+
clearInterval(i), e.removeEventListener("focusin", n), e.removeEventListener("keydown", t, !0);
|
|
2122
|
+
};
|
|
2123
|
+
}, [
|
|
2124
|
+
n,
|
|
2125
|
+
r,
|
|
2126
|
+
i,
|
|
2127
|
+
o,
|
|
2128
|
+
s,
|
|
2129
|
+
a
|
|
2130
|
+
]);
|
|
2131
|
+
let _ = (e) => {
|
|
2132
|
+
d.current === null && (d.current = e.relatedTarget), p.current = !0, f.current = e.target;
|
|
2133
|
+
let n = t.props.onFocus;
|
|
2134
|
+
n && n(e);
|
|
2135
|
+
}, v = (e) => {
|
|
2136
|
+
d.current === null && (d.current = e.relatedTarget), p.current = !0;
|
|
2137
|
+
};
|
|
2138
|
+
return /*#__PURE__*/ (0, Y.jsxs)(J.Fragment, { children: [
|
|
2139
|
+
/*#__PURE__*/ (0, Y.jsx)("div", {
|
|
2140
|
+
tabIndex: s ? 0 : -1,
|
|
2141
|
+
onFocus: v,
|
|
2142
|
+
ref: l,
|
|
2143
|
+
"data-testid": "sentinelStart"
|
|
2144
|
+
}),
|
|
2145
|
+
/*#__PURE__*/ J.cloneElement(t, {
|
|
2146
|
+
ref: h,
|
|
2147
|
+
onFocus: _
|
|
2148
|
+
}),
|
|
2149
|
+
/*#__PURE__*/ (0, Y.jsx)("div", {
|
|
2150
|
+
tabIndex: s ? 0 : -1,
|
|
2151
|
+
onFocus: v,
|
|
2152
|
+
ref: u,
|
|
2153
|
+
"data-testid": "sentinelEnd"
|
|
2154
|
+
})
|
|
2155
|
+
] });
|
|
2156
|
+
}
|
|
2157
|
+
T();
|
|
2158
|
+
function et(e) {
|
|
2159
|
+
return typeof e == "function" ? e() : e;
|
|
2160
|
+
}
|
|
2161
|
+
function tt(e) {
|
|
2162
|
+
return e ? e.props.hasOwnProperty("in") : !1;
|
|
2163
|
+
}
|
|
2164
|
+
var nt = new Ke();
|
|
2165
|
+
function rt(e) {
|
|
2166
|
+
let { container: t, disableEscapeKeyDown: n = !1, disableScrollLock: r = !1, manager: i = nt, closeAfterTransition: a = !1, onTransitionEnter: o, onTransitionExited: s, children: c, onClose: l, open: u, rootRef: d } = e, f = J.useRef({}), p = J.useRef(null), m = J.useRef(null), h = P(m, d), [g, _] = J.useState(!u), y = tt(c), b = !0;
|
|
2167
|
+
(e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (b = !1);
|
|
2168
|
+
let x = () => F(p.current), S = () => (f.current.modalRef = m.current, f.current.mount = p.current, f.current), C = () => {
|
|
2169
|
+
i.mount(S(), { disableScrollLock: r }), m.current && (m.current.scrollTop = 0);
|
|
2170
|
+
}, w = I(() => {
|
|
2171
|
+
let e = et(t) || x().body;
|
|
2172
|
+
i.add(S(), e), m.current && C();
|
|
2173
|
+
}), T = J.useCallback(() => i.isTopModal(S()), [i]), E = I((e) => {
|
|
2174
|
+
p.current = e, e && (u && T() ? C() : m.current && X(m.current, b));
|
|
2175
|
+
}), D = J.useCallback(() => {
|
|
2176
|
+
i.remove(S(), b);
|
|
2177
|
+
}, [b, i]);
|
|
2178
|
+
J.useEffect(() => () => {
|
|
2179
|
+
D();
|
|
2180
|
+
}, [D]), J.useEffect(() => {
|
|
2181
|
+
u ? w() : (!y || !a) && D();
|
|
2182
|
+
}, [
|
|
2183
|
+
u,
|
|
2184
|
+
D,
|
|
2185
|
+
y,
|
|
2186
|
+
a,
|
|
2187
|
+
w
|
|
2188
|
+
]);
|
|
2189
|
+
let O = (e) => (t) => {
|
|
2190
|
+
var r;
|
|
2191
|
+
(r = e.onKeyDown) == null || r.call(e, t), !(t.key !== "Escape" || t.which === 229 || !T()) && (n || (t.stopPropagation(), l && l(t, "escapeKeyDown")));
|
|
2192
|
+
}, k = (e) => (t) => {
|
|
2193
|
+
var n;
|
|
2194
|
+
(n = e.onClick) == null || n.call(e, t), t.target === t.currentTarget && l && l(t, "backdropClick");
|
|
2195
|
+
};
|
|
2196
|
+
return {
|
|
2197
|
+
getRootProps: (t = {}) => {
|
|
2198
|
+
let n = L(e);
|
|
2199
|
+
delete n.onTransitionEnter, delete n.onTransitionExited;
|
|
2200
|
+
let r = v({}, n, t);
|
|
2201
|
+
return v({ role: "presentation" }, r, {
|
|
2202
|
+
onKeyDown: O(r),
|
|
2203
|
+
ref: h
|
|
2204
|
+
});
|
|
2205
|
+
},
|
|
2206
|
+
getBackdropProps: (e = {}) => {
|
|
2207
|
+
let t = e;
|
|
2208
|
+
return v({ "aria-hidden": !0 }, t, {
|
|
2209
|
+
onClick: k(t),
|
|
2210
|
+
open: u
|
|
2211
|
+
});
|
|
2212
|
+
},
|
|
2213
|
+
getTransitionProps: () => ({
|
|
2214
|
+
onEnter: me(() => {
|
|
2215
|
+
_(!1), o && o();
|
|
2216
|
+
}, c?.props.onEnter),
|
|
2217
|
+
onExited: me(() => {
|
|
2218
|
+
_(!0), s && s(), a && D();
|
|
2219
|
+
}, c?.props.onExited)
|
|
2220
|
+
}),
|
|
2221
|
+
rootRef: h,
|
|
2222
|
+
portalRef: E,
|
|
2223
|
+
isTopModal: T,
|
|
2224
|
+
exited: g,
|
|
2225
|
+
hasTransition: y
|
|
2226
|
+
};
|
|
2227
|
+
}
|
|
2228
|
+
function it(e) {
|
|
2229
|
+
return N("MuiModal", e);
|
|
2230
|
+
}
|
|
2231
|
+
A("MuiModal", [
|
|
2232
|
+
"root",
|
|
2233
|
+
"hidden",
|
|
2234
|
+
"backdrop"
|
|
2235
|
+
]), p(), T();
|
|
2236
|
+
var at = /* @__PURE__ */ "BackdropComponent.BackdropProps.classes.className.closeAfterTransition.children.container.component.components.componentsProps.disableAutoFocus.disableEnforceFocus.disableEscapeKeyDown.disablePortal.disableRestoreFocus.disableScrollLock.hideBackdrop.keepMounted.onBackdropClick.onClose.onTransitionEnter.onTransitionExited.open.slotProps.slots.theme".split("."), ot = (e) => {
|
|
2237
|
+
let { open: t, exited: n, classes: r } = e;
|
|
2238
|
+
return D({
|
|
2239
|
+
root: ["root", !t && n && "hidden"],
|
|
2240
|
+
backdrop: ["backdrop"]
|
|
2241
|
+
}, it, r);
|
|
2242
|
+
}, st = j("div", {
|
|
2243
|
+
name: "MuiModal",
|
|
2244
|
+
slot: "Root",
|
|
2245
|
+
overridesResolver: (e, t) => {
|
|
2246
|
+
let { ownerState: n } = e;
|
|
2247
|
+
return [t.root, !n.open && n.exited && t.hidden];
|
|
2248
|
+
}
|
|
2249
|
+
})(({ theme: e, ownerState: t }) => v({
|
|
2250
|
+
position: "fixed",
|
|
2251
|
+
zIndex: (e.vars || e).zIndex.modal,
|
|
2252
|
+
right: 0,
|
|
2253
|
+
bottom: 0,
|
|
2254
|
+
top: 0,
|
|
2255
|
+
left: 0
|
|
2256
|
+
}, !t.open && t.exited && { visibility: "hidden" })), ct = j(Fe, {
|
|
2257
|
+
name: "MuiModal",
|
|
2258
|
+
slot: "Backdrop",
|
|
2259
|
+
overridesResolver: (e, t) => t.backdrop
|
|
2260
|
+
})({ zIndex: -1 }), lt = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
2261
|
+
let n = M({
|
|
2262
|
+
name: "MuiModal",
|
|
2263
|
+
props: e
|
|
2264
|
+
}), { BackdropComponent: r = ct, BackdropProps: i, className: a, closeAfterTransition: s = !1, children: c, container: l, component: u, components: d = {}, componentsProps: f = {}, disableAutoFocus: p = !1, disableEnforceFocus: m = !1, disableEscapeKeyDown: h = !1, disablePortal: g = !1, disableRestoreFocus: _ = !1, disableScrollLock: y = !1, hideBackdrop: b = !1, keepMounted: x = !1, onBackdropClick: S, open: C, slotProps: w, slots: T } = n, E = o(n, at), D = v({}, n, {
|
|
2265
|
+
closeAfterTransition: s,
|
|
2266
|
+
disableAutoFocus: p,
|
|
2267
|
+
disableEnforceFocus: m,
|
|
2268
|
+
disableEscapeKeyDown: h,
|
|
2269
|
+
disablePortal: g,
|
|
2270
|
+
disableRestoreFocus: _,
|
|
2271
|
+
disableScrollLock: y,
|
|
2272
|
+
hideBackdrop: b,
|
|
2273
|
+
keepMounted: x
|
|
2274
|
+
}), { getRootProps: k, getBackdropProps: A, getTransitionProps: j, portalRef: N, isTopModal: P, exited: F, hasTransition: ee } = rt(v({}, D, { rootRef: t })), I = v({}, D, { exited: F }), L = ot(I), z = {};
|
|
2275
|
+
if (c.props.tabIndex === void 0 && (z.tabIndex = "-1"), ee) {
|
|
2276
|
+
let { onEnter: e, onExited: t } = j();
|
|
2277
|
+
z.onEnter = e, z.onExited = t;
|
|
2278
|
+
}
|
|
2279
|
+
let B = T?.root ?? d.Root ?? st, V = T?.backdrop ?? d.Backdrop ?? r, H = w?.root ?? f.root, U = w?.backdrop ?? f.backdrop, W = R({
|
|
2280
|
+
elementType: B,
|
|
2281
|
+
externalSlotProps: H,
|
|
2282
|
+
externalForwardedProps: E,
|
|
2283
|
+
getSlotProps: k,
|
|
2284
|
+
additionalProps: {
|
|
2285
|
+
ref: t,
|
|
2286
|
+
as: u
|
|
2287
|
+
},
|
|
2288
|
+
ownerState: I,
|
|
2289
|
+
className: O(a, H?.className, L?.root, !I.open && I.exited && L?.hidden)
|
|
2290
|
+
}), G = R({
|
|
2291
|
+
elementType: V,
|
|
2292
|
+
externalSlotProps: U,
|
|
2293
|
+
additionalProps: i,
|
|
2294
|
+
getSlotProps: (e) => A(v({}, e, { onClick: (t) => {
|
|
2295
|
+
S && S(t), e != null && e.onClick && e.onClick(t);
|
|
2296
|
+
} })),
|
|
2297
|
+
className: O(U?.className, i?.className, L?.backdrop),
|
|
2298
|
+
ownerState: I
|
|
2299
|
+
});
|
|
2300
|
+
return !x && !C && (!ee || F) ? null : /*#__PURE__*/ (0, Y.jsx)(te, {
|
|
2301
|
+
ref: N,
|
|
2302
|
+
container: l,
|
|
2303
|
+
disablePortal: g,
|
|
2304
|
+
children: /*#__PURE__*/ (0, Y.jsxs)(B, v({}, W, { children: [!b && r ? /*#__PURE__*/ (0, Y.jsx)(V, v({}, G)) : null, /*#__PURE__*/ (0, Y.jsx)($e, {
|
|
2305
|
+
disableEnforceFocus: m,
|
|
2306
|
+
disableAutoFocus: p,
|
|
2307
|
+
disableRestoreFocus: _,
|
|
2308
|
+
isEnabled: P,
|
|
2309
|
+
open: C,
|
|
2310
|
+
children: /*#__PURE__*/ J.cloneElement(c, z)
|
|
2311
|
+
})] }))
|
|
2312
|
+
});
|
|
2313
|
+
}), ut = /*#__PURE__*/ J.createContext({});
|
|
2314
|
+
function dt(e) {
|
|
2315
|
+
return N("MuiList", e);
|
|
2316
|
+
}
|
|
2317
|
+
A("MuiList", [
|
|
2318
|
+
"root",
|
|
2319
|
+
"padding",
|
|
2320
|
+
"dense",
|
|
2321
|
+
"subheader"
|
|
2322
|
+
]), p(), T();
|
|
2323
|
+
var ft = [
|
|
2324
|
+
"children",
|
|
2325
|
+
"className",
|
|
2326
|
+
"component",
|
|
2327
|
+
"dense",
|
|
2328
|
+
"disablePadding",
|
|
2329
|
+
"subheader"
|
|
2330
|
+
], pt = (e) => {
|
|
2331
|
+
let { classes: t, disablePadding: n, dense: r, subheader: i } = e;
|
|
2332
|
+
return D({ root: [
|
|
2333
|
+
"root",
|
|
2334
|
+
!n && "padding",
|
|
2335
|
+
r && "dense",
|
|
2336
|
+
i && "subheader"
|
|
2337
|
+
] }, dt, t);
|
|
2338
|
+
}, mt = j("ul", {
|
|
2339
|
+
name: "MuiList",
|
|
2340
|
+
slot: "Root",
|
|
2341
|
+
overridesResolver: (e, t) => {
|
|
2342
|
+
let { ownerState: n } = e;
|
|
2343
|
+
return [
|
|
2344
|
+
t.root,
|
|
2345
|
+
!n.disablePadding && t.padding,
|
|
2346
|
+
n.dense && t.dense,
|
|
2347
|
+
n.subheader && t.subheader
|
|
2348
|
+
];
|
|
2349
|
+
}
|
|
2350
|
+
})(({ ownerState: e }) => v({
|
|
2351
|
+
listStyle: "none",
|
|
2352
|
+
margin: 0,
|
|
2353
|
+
padding: 0,
|
|
2354
|
+
position: "relative"
|
|
2355
|
+
}, !e.disablePadding && {
|
|
2356
|
+
paddingTop: 8,
|
|
2357
|
+
paddingBottom: 8
|
|
2358
|
+
}, e.subheader && { paddingTop: 0 })), ht = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
2359
|
+
let n = M({
|
|
2360
|
+
props: e,
|
|
2361
|
+
name: "MuiList"
|
|
2362
|
+
}), { children: r, className: i, component: a = "ul", dense: s = !1, disablePadding: c = !1, subheader: l } = n, u = o(n, ft), d = J.useMemo(() => ({ dense: s }), [s]), f = v({}, n, {
|
|
2363
|
+
component: a,
|
|
2364
|
+
dense: s,
|
|
2365
|
+
disablePadding: c
|
|
2366
|
+
}), p = pt(f);
|
|
2367
|
+
return /*#__PURE__*/ (0, Y.jsx)(ut.Provider, {
|
|
2368
|
+
value: d,
|
|
2369
|
+
children: /*#__PURE__*/ (0, Y.jsxs)(mt, v({
|
|
2370
|
+
as: a,
|
|
2371
|
+
className: O(p.root, i),
|
|
2372
|
+
ref: t,
|
|
2373
|
+
ownerState: f
|
|
2374
|
+
}, u, { children: [l, r] }))
|
|
2375
|
+
});
|
|
2376
|
+
}), gt = ge;
|
|
2377
|
+
T(), p();
|
|
2378
|
+
var _t = [
|
|
2379
|
+
"actions",
|
|
2380
|
+
"autoFocus",
|
|
2381
|
+
"autoFocusItem",
|
|
2382
|
+
"children",
|
|
2383
|
+
"className",
|
|
2384
|
+
"disabledItemsFocusable",
|
|
2385
|
+
"disableListWrap",
|
|
2386
|
+
"onKeyDown",
|
|
2387
|
+
"variant"
|
|
2388
|
+
];
|
|
2389
|
+
function vt(e, t, n) {
|
|
2390
|
+
return e === t ? e.firstChild : t && t.nextElementSibling ? t.nextElementSibling : n ? null : e.firstChild;
|
|
2391
|
+
}
|
|
2392
|
+
function yt(e, t, n) {
|
|
2393
|
+
return e === t ? n ? e.firstChild : e.lastChild : t && t.previousElementSibling ? t.previousElementSibling : n ? null : e.lastChild;
|
|
2394
|
+
}
|
|
2395
|
+
function bt(e, t) {
|
|
2396
|
+
if (t === void 0) return !0;
|
|
2397
|
+
let n = e.innerText;
|
|
2398
|
+
return n === void 0 && (n = e.textContent), n = n.trim().toLowerCase(), n.length === 0 ? !1 : t.repeating ? n[0] === t.keys[0] : n.indexOf(t.keys.join("")) === 0;
|
|
2399
|
+
}
|
|
2400
|
+
function Z(e, t, n, r, i, a) {
|
|
2401
|
+
let o = !1, s = i(e, t, t ? n : !1);
|
|
2402
|
+
for (; s;) {
|
|
2403
|
+
if (s === e.firstChild) {
|
|
2404
|
+
if (o) return !1;
|
|
2405
|
+
o = !0;
|
|
2406
|
+
}
|
|
2407
|
+
let t = r ? !1 : s.disabled || s.getAttribute("aria-disabled") === "true";
|
|
2408
|
+
if (!s.hasAttribute("tabindex") || !bt(s, a) || t) s = i(e, s, n);
|
|
2409
|
+
else return s.focus(), !0;
|
|
2410
|
+
}
|
|
2411
|
+
return !1;
|
|
2412
|
+
}
|
|
2413
|
+
var xt = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
2414
|
+
let { actions: n, autoFocus: r = !1, autoFocusItem: i = !1, children: a, className: s, disabledItemsFocusable: c = !1, disableListWrap: l = !1, onKeyDown: u, variant: d = "selectedMenu" } = e, f = o(e, _t), p = J.useRef(null), m = J.useRef({
|
|
2415
|
+
keys: [],
|
|
2416
|
+
repeating: !0,
|
|
2417
|
+
previousKeyMatched: !0,
|
|
2418
|
+
lastTime: null
|
|
2419
|
+
});
|
|
2420
|
+
Se(() => {
|
|
2421
|
+
r && p.current.focus();
|
|
2422
|
+
}, [r]), J.useImperativeHandle(n, () => ({ adjustStyleForScrollbar: (e, { direction: t }) => {
|
|
2423
|
+
let n = !p.current.style.width;
|
|
2424
|
+
if (e.clientHeight < p.current.clientHeight && n) {
|
|
2425
|
+
let n = `${gt(be(e))}px`;
|
|
2426
|
+
p.current.style[t === "rtl" ? "paddingLeft" : "paddingRight"] = n, p.current.style.width = `calc(100% + ${n})`;
|
|
2427
|
+
}
|
|
2428
|
+
return p.current;
|
|
2429
|
+
} }), []);
|
|
2430
|
+
let h = (e) => {
|
|
2431
|
+
let t = p.current, n = e.key, r = be(t).activeElement;
|
|
2432
|
+
if (n === "ArrowDown") e.preventDefault(), Z(t, r, l, c, vt);
|
|
2433
|
+
else if (n === "ArrowUp") e.preventDefault(), Z(t, r, l, c, yt);
|
|
2434
|
+
else if (n === "Home") e.preventDefault(), Z(t, null, l, c, vt);
|
|
2435
|
+
else if (n === "End") e.preventDefault(), Z(t, null, l, c, yt);
|
|
2436
|
+
else if (n.length === 1) {
|
|
2437
|
+
let i = m.current, a = n.toLowerCase(), o = performance.now();
|
|
2438
|
+
i.keys.length > 0 && (o - i.lastTime > 500 ? (i.keys = [], i.repeating = !0, i.previousKeyMatched = !0) : i.repeating && a !== i.keys[0] && (i.repeating = !1)), i.lastTime = o, i.keys.push(a);
|
|
2439
|
+
let s = r && !i.repeating && bt(r, i);
|
|
2440
|
+
i.previousKeyMatched && (s || Z(t, r, !1, c, vt, i)) ? e.preventDefault() : i.previousKeyMatched = !1;
|
|
2441
|
+
}
|
|
2442
|
+
u && u(e);
|
|
2443
|
+
}, g = U(p, t), _ = -1;
|
|
2444
|
+
J.Children.forEach(a, (e, t) => {
|
|
2445
|
+
if (!/*#__PURE__*/ J.isValidElement(e)) {
|
|
2446
|
+
_ === t && (_ += 1, _ >= a.length && (_ = -1));
|
|
2447
|
+
return;
|
|
2448
|
+
}
|
|
2449
|
+
e.props.disabled || (d === "selectedMenu" && e.props.selected || _ === -1) && (_ = t), _ === t && (e.props.disabled || e.props.muiSkipListHighlight || e.type.muiSkipListHighlight) && (_ += 1, _ >= a.length && (_ = -1));
|
|
2450
|
+
});
|
|
2451
|
+
let y = J.Children.map(a, (e, t) => {
|
|
2452
|
+
if (t === _) {
|
|
2453
|
+
let t = {};
|
|
2454
|
+
return i && (t.autoFocus = !0), e.props.tabIndex === void 0 && d === "selectedMenu" && (t.tabIndex = 0), /*#__PURE__*/ J.cloneElement(e, t);
|
|
2455
|
+
}
|
|
2456
|
+
return e;
|
|
2457
|
+
});
|
|
2458
|
+
return /*#__PURE__*/ (0, Y.jsx)(ht, v({
|
|
2459
|
+
role: "menu",
|
|
2460
|
+
ref: g,
|
|
2461
|
+
className: s,
|
|
2462
|
+
onKeyDown: h,
|
|
2463
|
+
tabIndex: r ? 0 : -1
|
|
2464
|
+
}, f, { children: y }));
|
|
2465
|
+
});
|
|
2466
|
+
function St(e) {
|
|
2467
|
+
return N("MuiPopover", e);
|
|
2468
|
+
}
|
|
2469
|
+
A("MuiPopover", ["root", "paper"]), T(), p();
|
|
2470
|
+
var Ct = ["onEntering"], wt = [
|
|
2471
|
+
"action",
|
|
2472
|
+
"anchorEl",
|
|
2473
|
+
"anchorOrigin",
|
|
2474
|
+
"anchorPosition",
|
|
2475
|
+
"anchorReference",
|
|
2476
|
+
"children",
|
|
2477
|
+
"className",
|
|
2478
|
+
"container",
|
|
2479
|
+
"elevation",
|
|
2480
|
+
"marginThreshold",
|
|
2481
|
+
"open",
|
|
2482
|
+
"PaperProps",
|
|
2483
|
+
"slots",
|
|
2484
|
+
"slotProps",
|
|
2485
|
+
"transformOrigin",
|
|
2486
|
+
"TransitionComponent",
|
|
2487
|
+
"transitionDuration",
|
|
2488
|
+
"TransitionProps",
|
|
2489
|
+
"disableScrollLock"
|
|
2490
|
+
], Tt = ["slotProps"];
|
|
2491
|
+
function Et(e, t) {
|
|
2492
|
+
let n = 0;
|
|
2493
|
+
return typeof t == "number" ? n = t : t === "center" ? n = e.height / 2 : t === "bottom" && (n = e.height), n;
|
|
2494
|
+
}
|
|
2495
|
+
function Dt(e, t) {
|
|
2496
|
+
let n = 0;
|
|
2497
|
+
return typeof t == "number" ? n = t : t === "center" ? n = e.width / 2 : t === "right" && (n = e.width), n;
|
|
2498
|
+
}
|
|
2499
|
+
function Ot(e) {
|
|
2500
|
+
return [e.horizontal, e.vertical].map((e) => typeof e == "number" ? `${e}px` : e).join(" ");
|
|
2501
|
+
}
|
|
2502
|
+
function kt(e) {
|
|
2503
|
+
return typeof e == "function" ? e() : e;
|
|
2504
|
+
}
|
|
2505
|
+
var At = (e) => {
|
|
2506
|
+
let { classes: t } = e;
|
|
2507
|
+
return D({
|
|
2508
|
+
root: ["root"],
|
|
2509
|
+
paper: ["paper"]
|
|
2510
|
+
}, St, t);
|
|
2511
|
+
}, jt = j(lt, {
|
|
2512
|
+
name: "MuiPopover",
|
|
2513
|
+
slot: "Root",
|
|
2514
|
+
overridesResolver: (e, t) => t.root
|
|
2515
|
+
})({}), Mt = j(De, {
|
|
2516
|
+
name: "MuiPopover",
|
|
2517
|
+
slot: "Paper",
|
|
2518
|
+
overridesResolver: (e, t) => t.paper
|
|
2519
|
+
})({
|
|
2520
|
+
position: "absolute",
|
|
2521
|
+
overflowY: "auto",
|
|
2522
|
+
overflowX: "hidden",
|
|
2523
|
+
minWidth: 16,
|
|
2524
|
+
minHeight: 16,
|
|
2525
|
+
maxWidth: "calc(100% - 32px)",
|
|
2526
|
+
maxHeight: "calc(100% - 32px)",
|
|
2527
|
+
outline: 0
|
|
2528
|
+
}), Nt = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
2529
|
+
let n = M({
|
|
2530
|
+
props: e,
|
|
2531
|
+
name: "MuiPopover"
|
|
2532
|
+
}), { action: r, anchorEl: i, anchorOrigin: a = {
|
|
2533
|
+
vertical: "top",
|
|
2534
|
+
horizontal: "left"
|
|
2535
|
+
}, anchorPosition: s, anchorReference: c = "anchorEl", children: l, className: u, container: d, elevation: f = 8, marginThreshold: p = 16, open: m, PaperProps: h = {}, slots: g, slotProps: _, transformOrigin: y = {
|
|
2536
|
+
vertical: "top",
|
|
2537
|
+
horizontal: "left"
|
|
2538
|
+
}, TransitionComponent: b = z, transitionDuration: x = "auto", TransitionProps: { onEntering: S } = {}, disableScrollLock: C = !1 } = n, w = o(n.TransitionProps, Ct), T = o(n, wt), E = _?.paper ?? h, D = J.useRef(), k = U(D, E.ref), A = v({}, n, {
|
|
2539
|
+
anchorOrigin: a,
|
|
2540
|
+
anchorReference: c,
|
|
2541
|
+
elevation: f,
|
|
2542
|
+
marginThreshold: p,
|
|
2543
|
+
externalPaperSlotProps: E,
|
|
2544
|
+
transformOrigin: y,
|
|
2545
|
+
TransitionComponent: b,
|
|
2546
|
+
transitionDuration: x,
|
|
2547
|
+
TransitionProps: w
|
|
2548
|
+
}), j = At(A), N = J.useCallback(() => {
|
|
2549
|
+
if (c === "anchorPosition") return s;
|
|
2550
|
+
let e = kt(i), t = (e && e.nodeType === 1 ? e : be(D.current).body).getBoundingClientRect();
|
|
2551
|
+
return {
|
|
2552
|
+
top: t.top + Et(t, a.vertical),
|
|
2553
|
+
left: t.left + Dt(t, a.horizontal)
|
|
2554
|
+
};
|
|
2555
|
+
}, [
|
|
2556
|
+
i,
|
|
2557
|
+
a.horizontal,
|
|
2558
|
+
a.vertical,
|
|
2559
|
+
s,
|
|
2560
|
+
c
|
|
2561
|
+
]), P = J.useCallback((e) => ({
|
|
2562
|
+
vertical: Et(e, y.vertical),
|
|
2563
|
+
horizontal: Dt(e, y.horizontal)
|
|
2564
|
+
}), [y.horizontal, y.vertical]), F = J.useCallback((e) => {
|
|
2565
|
+
let t = {
|
|
2566
|
+
width: e.offsetWidth,
|
|
2567
|
+
height: e.offsetHeight
|
|
2568
|
+
}, n = P(t);
|
|
2569
|
+
if (c === "none") return {
|
|
2570
|
+
top: null,
|
|
2571
|
+
left: null,
|
|
2572
|
+
transformOrigin: Ot(n)
|
|
2573
|
+
};
|
|
2574
|
+
let r = N(), a = r.top - n.vertical, o = r.left - n.horizontal, s = a + t.height, l = o + t.width, u = xe(kt(i)), d = u.innerHeight - p, f = u.innerWidth - p;
|
|
2575
|
+
if (p !== null && a < p) {
|
|
2576
|
+
let e = a - p;
|
|
2577
|
+
a -= e, n.vertical += e;
|
|
2578
|
+
} else if (p !== null && s > d) {
|
|
2579
|
+
let e = s - d;
|
|
2580
|
+
a -= e, n.vertical += e;
|
|
2581
|
+
}
|
|
2582
|
+
if (p !== null && o < p) {
|
|
2583
|
+
let e = o - p;
|
|
2584
|
+
o -= e, n.horizontal += e;
|
|
2585
|
+
} else if (l > f) {
|
|
2586
|
+
let e = l - f;
|
|
2587
|
+
o -= e, n.horizontal += e;
|
|
2588
|
+
}
|
|
2589
|
+
return {
|
|
2590
|
+
top: `${Math.round(a)}px`,
|
|
2591
|
+
left: `${Math.round(o)}px`,
|
|
2592
|
+
transformOrigin: Ot(n)
|
|
2593
|
+
};
|
|
2594
|
+
}, [
|
|
2595
|
+
i,
|
|
2596
|
+
c,
|
|
2597
|
+
N,
|
|
2598
|
+
P,
|
|
2599
|
+
p
|
|
2600
|
+
]), [I, L] = J.useState(m), B = J.useCallback(() => {
|
|
2601
|
+
let e = D.current;
|
|
2602
|
+
if (!e) return;
|
|
2603
|
+
let t = F(e);
|
|
2604
|
+
t.top !== null && (e.style.top = t.top), t.left !== null && (e.style.left = t.left), e.style.transformOrigin = t.transformOrigin, L(!0);
|
|
2605
|
+
}, [F]);
|
|
2606
|
+
J.useEffect(() => (C && window.addEventListener("scroll", B), () => window.removeEventListener("scroll", B)), [
|
|
2607
|
+
i,
|
|
2608
|
+
C,
|
|
2609
|
+
B
|
|
2610
|
+
]);
|
|
2611
|
+
let V = (e, t) => {
|
|
2612
|
+
S && S(e, t), B();
|
|
2613
|
+
}, H = () => {
|
|
2614
|
+
L(!1);
|
|
2615
|
+
};
|
|
2616
|
+
J.useEffect(() => {
|
|
2617
|
+
m && B();
|
|
2618
|
+
}), J.useImperativeHandle(r, () => m ? { updatePosition: () => {
|
|
2619
|
+
B();
|
|
2620
|
+
} } : null, [m, B]), J.useEffect(() => {
|
|
2621
|
+
if (!m) return;
|
|
2622
|
+
let e = ye(() => {
|
|
2623
|
+
B();
|
|
2624
|
+
}), t = xe(i);
|
|
2625
|
+
return t.addEventListener("resize", e), () => {
|
|
2626
|
+
e.clear(), t.removeEventListener("resize", e);
|
|
2627
|
+
};
|
|
2628
|
+
}, [
|
|
2629
|
+
i,
|
|
2630
|
+
m,
|
|
2631
|
+
B
|
|
2632
|
+
]);
|
|
2633
|
+
let W = x;
|
|
2634
|
+
x === "auto" && !b.muiSupportAuto && (W = void 0);
|
|
2635
|
+
let te = d || (i ? be(kt(i)).body : void 0), G = g?.root ?? jt, ne = g?.paper ?? Mt, re = R({
|
|
2636
|
+
elementType: ne,
|
|
2637
|
+
externalSlotProps: v({}, E, { style: I ? E.style : v({}, E.style, { opacity: 0 }) }),
|
|
2638
|
+
additionalProps: {
|
|
2639
|
+
elevation: f,
|
|
2640
|
+
ref: k
|
|
2641
|
+
},
|
|
2642
|
+
ownerState: A,
|
|
2643
|
+
className: O(j.paper, E?.className)
|
|
2644
|
+
}), ie = R({
|
|
2645
|
+
elementType: G,
|
|
2646
|
+
externalSlotProps: _?.root || {},
|
|
2647
|
+
externalForwardedProps: T,
|
|
2648
|
+
additionalProps: {
|
|
2649
|
+
ref: t,
|
|
2650
|
+
slotProps: { backdrop: { invisible: !0 } },
|
|
2651
|
+
container: te,
|
|
2652
|
+
open: m
|
|
2653
|
+
},
|
|
2654
|
+
ownerState: A,
|
|
2655
|
+
className: O(j.root, u)
|
|
2656
|
+
}), { slotProps: K } = ie;
|
|
2657
|
+
return /*#__PURE__*/ (0, Y.jsx)(G, v({}, o(ie, Tt), !ee(G) && {
|
|
2658
|
+
slotProps: K,
|
|
2659
|
+
disableScrollLock: C
|
|
2660
|
+
}, { children: /*#__PURE__*/ (0, Y.jsx)(b, v({
|
|
2661
|
+
appear: !0,
|
|
2662
|
+
in: m,
|
|
2663
|
+
onEntering: V,
|
|
2664
|
+
onExited: H,
|
|
2665
|
+
timeout: W
|
|
2666
|
+
}, w, { children: /*#__PURE__*/ (0, Y.jsx)(ne, v({}, re, { children: l })) })) }));
|
|
2667
|
+
});
|
|
2668
|
+
function Pt(e) {
|
|
2669
|
+
return N("MuiMenu", e);
|
|
2670
|
+
}
|
|
2671
|
+
A("MuiMenu", [
|
|
2672
|
+
"root",
|
|
2673
|
+
"paper",
|
|
2674
|
+
"list"
|
|
2675
|
+
]), T(), p();
|
|
2676
|
+
var Ft = ["onEntering"], It = [
|
|
2677
|
+
"autoFocus",
|
|
2678
|
+
"children",
|
|
2679
|
+
"className",
|
|
2680
|
+
"disableAutoFocusItem",
|
|
2681
|
+
"MenuListProps",
|
|
2682
|
+
"onClose",
|
|
2683
|
+
"open",
|
|
2684
|
+
"PaperProps",
|
|
2685
|
+
"PopoverClasses",
|
|
2686
|
+
"transitionDuration",
|
|
2687
|
+
"TransitionProps",
|
|
2688
|
+
"variant",
|
|
2689
|
+
"slots",
|
|
2690
|
+
"slotProps"
|
|
2691
|
+
], Lt = {
|
|
2692
|
+
vertical: "top",
|
|
2693
|
+
horizontal: "right"
|
|
2694
|
+
}, Rt = {
|
|
2695
|
+
vertical: "top",
|
|
2696
|
+
horizontal: "left"
|
|
2697
|
+
}, zt = (e) => {
|
|
2698
|
+
let { classes: t } = e;
|
|
2699
|
+
return D({
|
|
2700
|
+
root: ["root"],
|
|
2701
|
+
paper: ["paper"],
|
|
2702
|
+
list: ["list"]
|
|
2703
|
+
}, Pt, t);
|
|
2704
|
+
}, Bt = j(Nt, {
|
|
2705
|
+
shouldForwardProp: (e) => k(e) || e === "classes",
|
|
2706
|
+
name: "MuiMenu",
|
|
2707
|
+
slot: "Root",
|
|
2708
|
+
overridesResolver: (e, t) => t.root
|
|
2709
|
+
})({}), Vt = j(Mt, {
|
|
2710
|
+
name: "MuiMenu",
|
|
2711
|
+
slot: "Paper",
|
|
2712
|
+
overridesResolver: (e, t) => t.paper
|
|
2713
|
+
})({
|
|
2714
|
+
maxHeight: "calc(100% - 96px)",
|
|
2715
|
+
WebkitOverflowScrolling: "touch"
|
|
2716
|
+
}), Ht = j(xt, {
|
|
2717
|
+
name: "MuiMenu",
|
|
2718
|
+
slot: "List",
|
|
2719
|
+
overridesResolver: (e, t) => t.list
|
|
2720
|
+
})({ outline: 0 }), Ut = /*#__PURE__*/ J.forwardRef(function(e, t) {
|
|
2721
|
+
let n = M({
|
|
2722
|
+
props: e,
|
|
2723
|
+
name: "MuiMenu"
|
|
2724
|
+
}), { autoFocus: r = !0, children: i, className: a, disableAutoFocusItem: s = !1, MenuListProps: c = {}, onClose: l, open: d, PaperProps: f = {}, PopoverClasses: p, transitionDuration: m = "auto", TransitionProps: { onEntering: h } = {}, variant: g = "selectedMenu", slots: _ = {}, slotProps: y = {} } = n, b = o(n.TransitionProps, Ft), x = o(n, It), S = u(), C = v({}, n, {
|
|
2725
|
+
autoFocus: r,
|
|
2726
|
+
disableAutoFocusItem: s,
|
|
2727
|
+
MenuListProps: c,
|
|
2728
|
+
onEntering: h,
|
|
2729
|
+
PaperProps: f,
|
|
2730
|
+
transitionDuration: m,
|
|
2731
|
+
TransitionProps: b,
|
|
2732
|
+
variant: g
|
|
2733
|
+
}), w = zt(C), T = r && !s && d, E = J.useRef(null), D = (e, t) => {
|
|
2734
|
+
E.current && E.current.adjustStyleForScrollbar(e, { direction: S ? "rtl" : "ltr" }), h && h(e, t);
|
|
2735
|
+
}, k = (e) => {
|
|
2736
|
+
e.key === "Tab" && (e.preventDefault(), l && l(e, "tabKeyDown"));
|
|
2737
|
+
}, A = -1;
|
|
2738
|
+
J.Children.map(i, (e, t) => {
|
|
2739
|
+
/*#__PURE__*/ J.isValidElement(e) && (e.props.disabled || (g === "selectedMenu" && e.props.selected || A === -1) && (A = t));
|
|
2740
|
+
});
|
|
2741
|
+
let j = _.paper ?? Vt, N = y.paper ?? f, P = R({
|
|
2742
|
+
elementType: _.root,
|
|
2743
|
+
externalSlotProps: y.root,
|
|
2744
|
+
ownerState: C,
|
|
2745
|
+
className: [w.root, a]
|
|
2746
|
+
}), F = R({
|
|
2747
|
+
elementType: j,
|
|
2748
|
+
externalSlotProps: N,
|
|
2749
|
+
ownerState: C,
|
|
2750
|
+
className: w.paper
|
|
2751
|
+
});
|
|
2752
|
+
return /*#__PURE__*/ (0, Y.jsx)(Bt, v({
|
|
2753
|
+
onClose: l,
|
|
2754
|
+
anchorOrigin: {
|
|
2755
|
+
vertical: "bottom",
|
|
2756
|
+
horizontal: S ? "right" : "left"
|
|
2757
|
+
},
|
|
2758
|
+
transformOrigin: S ? Lt : Rt,
|
|
2759
|
+
slots: {
|
|
2760
|
+
paper: j,
|
|
2761
|
+
root: _.root
|
|
2762
|
+
},
|
|
2763
|
+
slotProps: {
|
|
2764
|
+
root: P,
|
|
2765
|
+
paper: F
|
|
2766
|
+
},
|
|
2767
|
+
open: d,
|
|
2768
|
+
ref: t,
|
|
2769
|
+
transitionDuration: m,
|
|
2770
|
+
TransitionProps: v({ onEntering: D }, b),
|
|
2771
|
+
ownerState: C
|
|
2772
|
+
}, x, {
|
|
2773
|
+
classes: p,
|
|
2774
|
+
children: /*#__PURE__*/ (0, Y.jsx)(Ht, v({
|
|
2775
|
+
onKeyDown: k,
|
|
2776
|
+
actions: E,
|
|
2777
|
+
autoFocus: r && (A === -1 || s),
|
|
2778
|
+
autoFocusItem: T,
|
|
2779
|
+
variant: g
|
|
2780
|
+
}, c, {
|
|
2781
|
+
className: O(w.list, c.className),
|
|
2782
|
+
children: i
|
|
2783
|
+
}))
|
|
2784
|
+
}));
|
|
2785
|
+
}), Wt = (e) => {
|
|
2786
|
+
switch (e.key) {
|
|
2787
|
+
case " ":
|
|
2788
|
+
case "Enter":
|
|
2789
|
+
e.preventDefault(), e.target.click();
|
|
2790
|
+
break;
|
|
2791
|
+
}
|
|
2792
|
+
}, Gt = (e) => {
|
|
2793
|
+
switch (e.key) {
|
|
2794
|
+
case "ArrowDown": {
|
|
2795
|
+
let t = e.currentTarget.getAttribute("role");
|
|
2796
|
+
if (t) {
|
|
2797
|
+
e.preventDefault(), e.stopPropagation();
|
|
2798
|
+
let n = Array.from(e.currentTarget.querySelectorAll(`[role="${t}item"][tabindex]`));
|
|
2799
|
+
n[n.findIndex((t) => t === e.target) + 1]?.focus();
|
|
2800
|
+
}
|
|
2801
|
+
break;
|
|
2802
|
+
}
|
|
2803
|
+
case "ArrowUp": {
|
|
2804
|
+
let t = e.currentTarget.getAttribute("role");
|
|
2805
|
+
if (t) {
|
|
2806
|
+
e.preventDefault(), e.stopPropagation();
|
|
2807
|
+
let n = Array.from(e.currentTarget.querySelectorAll(`[role="${t}item"][tabindex]`));
|
|
2808
|
+
n[n.findIndex((t) => t === e.target) - 1]?.focus();
|
|
2809
|
+
}
|
|
2810
|
+
break;
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
}, Q = /* @__PURE__ */ e(pe()), Kt = class e {
|
|
2814
|
+
qixColor;
|
|
2815
|
+
constructor(t) {
|
|
2816
|
+
if (t instanceof e) this.qixColor = new Q.default(t.qixColor);
|
|
2817
|
+
else if (typeof t == "string") this.qixColor = new Q.default(t.trim());
|
|
2818
|
+
else if (typeof t == "object") this.qixColor = new Q.default({
|
|
2819
|
+
r: t.r,
|
|
2820
|
+
g: t.g,
|
|
2821
|
+
b: t.b,
|
|
2822
|
+
alpha: t.a || 1
|
|
2823
|
+
});
|
|
2824
|
+
else throw Error("Color: Unknown color parameter");
|
|
2825
|
+
}
|
|
2826
|
+
newInstanceFromQixColor(t) {
|
|
2827
|
+
let n = new e("#FFFFFF");
|
|
2828
|
+
return n.qixColor = t, n;
|
|
2829
|
+
}
|
|
2830
|
+
isLight = () => this.qixColor.isLight();
|
|
2831
|
+
isDark = () => this.qixColor.isDark();
|
|
2832
|
+
contrast = (e) => this.qixColor.contrast(e.qixColor);
|
|
2833
|
+
hex = () => this.qixColor.hex();
|
|
2834
|
+
rgb = () => this.qixColor.rgb().string();
|
|
2835
|
+
lighten = (e) => {
|
|
2836
|
+
let t = this.qixColor.lightness(), n = this.qixColor.lightness(t + (100 - t) * e);
|
|
2837
|
+
return this.newInstanceFromQixColor(n);
|
|
2838
|
+
};
|
|
2839
|
+
darken = (e) => {
|
|
2840
|
+
let t = this.qixColor.lightness(), n = this.qixColor.lightness(t - t * e);
|
|
2841
|
+
return this.newInstanceFromQixColor(n);
|
|
2842
|
+
};
|
|
2843
|
+
luminosity = () => this.qixColor.luminosity();
|
|
2844
|
+
red = () => this.qixColor.red();
|
|
2845
|
+
green = () => this.qixColor.green();
|
|
2846
|
+
blue = () => this.qixColor.blue();
|
|
2847
|
+
alpha(e) {
|
|
2848
|
+
return typeof e == "number" ? this.newInstanceFromQixColor(this.qixColor.alpha(e)) : this.qixColor.alpha();
|
|
2849
|
+
}
|
|
2850
|
+
addTint = (t) => {
|
|
2851
|
+
let n = (e) => Math.round(e + (255 - e) * t), r = n(this.red()), i = n(this.green()), a = n(this.blue());
|
|
2852
|
+
return new e({
|
|
2853
|
+
r,
|
|
2854
|
+
g: i,
|
|
2855
|
+
b: a,
|
|
2856
|
+
a: this.alpha()
|
|
2857
|
+
});
|
|
2858
|
+
};
|
|
2859
|
+
addShade = (t) => {
|
|
2860
|
+
let n = (e) => Math.round(e * (1 - t)), r = n(this.red()), i = n(this.green()), a = n(this.blue());
|
|
2861
|
+
return new e({
|
|
2862
|
+
r,
|
|
2863
|
+
g: i,
|
|
2864
|
+
b: a,
|
|
2865
|
+
a: this.alpha()
|
|
2866
|
+
});
|
|
2867
|
+
};
|
|
2868
|
+
overlayBlend = (...t) => {
|
|
2869
|
+
if (t.length === 0) throw Error("Color: A minimum of one color is required to blend");
|
|
2870
|
+
return t.reduce((t, n) => {
|
|
2871
|
+
let r = t, i = n, a = i.alpha() + r.alpha() * (1 - i.alpha());
|
|
2872
|
+
return i.alpha() === 1 ? i : new e({
|
|
2873
|
+
r: (i.red() * i.alpha() + r.red() * r.alpha() * (1 - i.alpha())) / a,
|
|
2874
|
+
g: (i.green() * i.alpha() + r.green() * r.alpha() * (1 - i.alpha())) / a,
|
|
2875
|
+
b: (i.blue() * i.alpha() + r.blue() * r.alpha() * (1 - i.alpha())) / a,
|
|
2876
|
+
a
|
|
2877
|
+
});
|
|
2878
|
+
}, this);
|
|
2879
|
+
};
|
|
2880
|
+
luminanceWithAlpha() {
|
|
2881
|
+
let e = [
|
|
2882
|
+
this.red(),
|
|
2883
|
+
this.green(),
|
|
2884
|
+
this.blue()
|
|
2885
|
+
], t = this.alpha(), n = e.map((e) => {
|
|
2886
|
+
let t = e / 255;
|
|
2887
|
+
return t <= .04045 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
2888
|
+
}), r = .2126 * n[0] + .7152 * n[1] + .0722 * n[2];
|
|
2889
|
+
if (t === 1) return r;
|
|
2890
|
+
let i = 1 - r;
|
|
2891
|
+
return r + (1 - t) ** 2 * i;
|
|
2892
|
+
}
|
|
2893
|
+
contrastWithAlpha(e) {
|
|
2894
|
+
let t = this.luminanceWithAlpha(), n = e.luminanceWithAlpha();
|
|
2895
|
+
return t > n ? (t + .05) / (n + .05) : (n + .05) / (t + .05);
|
|
2896
|
+
}
|
|
2897
|
+
adjustContrast = (t, n) => {
|
|
2898
|
+
let r = .02, i = r, a = new e(this), o = t.isLight();
|
|
2899
|
+
for (; a.contrast(t) < n && i <= 1;) a = o ? a.darken(i) : a.lighten(i), i += r;
|
|
2900
|
+
return a;
|
|
2901
|
+
};
|
|
2902
|
+
betterContrast = (...e) => {
|
|
2903
|
+
if (e.length < 2) throw Error("Color: A minimum of two colors is required to determine best contrast");
|
|
2904
|
+
let t = e.reduce((e, t) => {
|
|
2905
|
+
let n = this.contrastWithAlpha(t);
|
|
2906
|
+
return n > e.contrast ? {
|
|
2907
|
+
color: t,
|
|
2908
|
+
contrast: n
|
|
2909
|
+
} : e;
|
|
2910
|
+
}, {
|
|
2911
|
+
color: null,
|
|
2912
|
+
contrast: 0
|
|
2913
|
+
});
|
|
2914
|
+
return t.color === null ? e[0] : t.color;
|
|
2915
|
+
};
|
|
2916
|
+
}, qt = (e, t) => {
|
|
2917
|
+
try {
|
|
2918
|
+
let n = t?.targetContrast ?? 5.2, r = (0, Q.default)(e), i = r.hsl().object(), a = i.h, o = i.s, s = r.luminosity() < .45, c = 0, l = 1;
|
|
2919
|
+
for (let e = 0; e < 28; e++) {
|
|
2920
|
+
let e = (c + l) / 2, t = Q.default.hsl({
|
|
2921
|
+
h: a,
|
|
2922
|
+
s: o,
|
|
2923
|
+
l: e * 100
|
|
2924
|
+
});
|
|
2925
|
+
r.contrast(t) >= n ? s ? l = e : c = e : s ? c = e : l = e;
|
|
2926
|
+
}
|
|
2927
|
+
let u = s ? l : c;
|
|
2928
|
+
return Q.default.hsl({
|
|
2929
|
+
h: a,
|
|
2930
|
+
s: o,
|
|
2931
|
+
l: u * 100
|
|
2932
|
+
}).hex().toUpperCase();
|
|
2933
|
+
} catch (t) {
|
|
2934
|
+
return console.error(`[getReadableTextColor] Invalid color input: ${e}`, t), null;
|
|
2935
|
+
}
|
|
2936
|
+
}, Jt = {
|
|
2937
|
+
"--background-color": n.white,
|
|
2938
|
+
"--color": n.mainDarkNavy,
|
|
2939
|
+
"--font-family": "Roboto",
|
|
2940
|
+
"--font-weight": "normal",
|
|
2941
|
+
"--font-style": "normal",
|
|
2942
|
+
"--text-decoration": "none",
|
|
2943
|
+
"--text-align": "left",
|
|
2944
|
+
"--align-items": "center"
|
|
2945
|
+
}, Yt = (e, { appearance: t = "default" } = {}) => {
|
|
2946
|
+
let n = e["--background-color"], r = Zt(n), { searchFontColor: i, searchBorderColor: a } = Xt(n, t === "legacy" ? e["--color"] : void 0);
|
|
2947
|
+
return {
|
|
2948
|
+
"--background-color-hover": r,
|
|
2949
|
+
"--search-font-color": i,
|
|
2950
|
+
"--search-border-color": a
|
|
2951
|
+
};
|
|
2952
|
+
}, Xt = (e, t) => t ? {
|
|
2953
|
+
searchFontColor: t,
|
|
2954
|
+
searchBorderColor: t
|
|
2955
|
+
} : !e || e === "transparent" ? {
|
|
2956
|
+
searchFontColor: n.grey2,
|
|
2957
|
+
searchBorderColor: n.grey3
|
|
2958
|
+
} : new Kt(e).luminanceWithAlpha() < .5 ? {
|
|
2959
|
+
searchFontColor: n.white,
|
|
2960
|
+
searchBorderColor: n.white
|
|
2961
|
+
} : {
|
|
2962
|
+
searchFontColor: n.grey2,
|
|
2963
|
+
searchBorderColor: n.grey3
|
|
2964
|
+
}, Zt = (e) => {
|
|
2965
|
+
if (!e || e === "transparent") return n.grey3;
|
|
2966
|
+
let t = new Kt(e);
|
|
2967
|
+
return t.luminanceWithAlpha() < .5 ? t.addTint(.2).hex() : t.addShade(.1).hex();
|
|
2968
|
+
}, Qt = (e) => {
|
|
2969
|
+
let t = e === "legacy", r = {
|
|
2970
|
+
[K.md]: {
|
|
2971
|
+
fontSize: "11px",
|
|
2972
|
+
lineHeight: "12px"
|
|
2973
|
+
},
|
|
2974
|
+
[K.sm]: {
|
|
2975
|
+
fontSize: "9px",
|
|
2976
|
+
lineHeight: "10px"
|
|
2977
|
+
},
|
|
2978
|
+
[K.xs]: {
|
|
2979
|
+
fontSize: "8px",
|
|
2980
|
+
lineHeight: "8px"
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
return {
|
|
2984
|
+
container: (e) => ({
|
|
2985
|
+
backgroundColor: "var(--background-color)",
|
|
2986
|
+
fontFamily: "var(--font-family)",
|
|
2987
|
+
padding: "8px 0",
|
|
2988
|
+
...e && {
|
|
2989
|
+
[K.md]: { padding: "6px 0" },
|
|
2990
|
+
[K.sm]: { padding: "4px 0" },
|
|
2991
|
+
[K.xs]: { padding: "2px 0" }
|
|
2992
|
+
}
|
|
2993
|
+
}),
|
|
2994
|
+
divActions: {
|
|
2995
|
+
boxShadow: `0 0 8px ${n.grey4}`,
|
|
2996
|
+
display: "flex",
|
|
2997
|
+
flexWrap: "wrap",
|
|
2998
|
+
gap: 8,
|
|
2999
|
+
marginBottom: -8,
|
|
3000
|
+
marginTop: 8,
|
|
3001
|
+
padding: 8
|
|
3002
|
+
},
|
|
3003
|
+
divActionsAction: {
|
|
3004
|
+
...f.normal14,
|
|
3005
|
+
borderRadius: 4,
|
|
3006
|
+
cursor: "pointer",
|
|
3007
|
+
textAlign: "center",
|
|
3008
|
+
width: "100%",
|
|
3009
|
+
"&[aria-disabled=\"true\"]": {
|
|
3010
|
+
cursor: "not-allowed",
|
|
3011
|
+
opacity: .6
|
|
3012
|
+
}
|
|
3013
|
+
},
|
|
3014
|
+
divActionsAction__primary: {
|
|
3015
|
+
background: n.mainDarkNavy,
|
|
3016
|
+
color: n.white,
|
|
3017
|
+
padding: "2px 1px"
|
|
3018
|
+
},
|
|
3019
|
+
divActionsAction__secondary: {
|
|
3020
|
+
border: `1px solid ${n.grey3}`,
|
|
3021
|
+
color: n.mainDarkNavy,
|
|
3022
|
+
padding: "1px 0"
|
|
3023
|
+
},
|
|
3024
|
+
divOptions: (e) => ({
|
|
3025
|
+
...E.propertiesPanel,
|
|
3026
|
+
scrollbarGutter: "initial",
|
|
3027
|
+
maxHeight: 400,
|
|
3028
|
+
padding: "0 8px",
|
|
3029
|
+
...e && {
|
|
3030
|
+
[K.md]: {
|
|
3031
|
+
padding: "0 6px",
|
|
3032
|
+
...!t && { maxHeight: 300 }
|
|
3033
|
+
},
|
|
3034
|
+
[K.sm]: {
|
|
3035
|
+
padding: "0 4px",
|
|
3036
|
+
...!t && { maxHeight: 250 }
|
|
3037
|
+
},
|
|
3038
|
+
[K.xs]: {
|
|
3039
|
+
padding: "0 2px",
|
|
3040
|
+
...!t && { maxHeight: 200 }
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
}),
|
|
3044
|
+
header: (e) => ({
|
|
3045
|
+
...f.bold13,
|
|
3046
|
+
gap: 8,
|
|
3047
|
+
padding: "10px 16px",
|
|
3048
|
+
display: "flex",
|
|
3049
|
+
textAlign: "var(--text-align)",
|
|
3050
|
+
color: "var(--color)",
|
|
3051
|
+
...e && {
|
|
3052
|
+
[K.md]: {
|
|
3053
|
+
...r[K.md],
|
|
3054
|
+
...!t && { padding: "8px 12px" }
|
|
3055
|
+
},
|
|
3056
|
+
[K.sm]: {
|
|
3057
|
+
...r[K.sm],
|
|
3058
|
+
...!t && { padding: "6px 8px" }
|
|
3059
|
+
},
|
|
3060
|
+
[K.xs]: {
|
|
3061
|
+
...r[K.xs],
|
|
3062
|
+
...!t && { padding: "4px 6px" }
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
}),
|
|
3066
|
+
divOptionsOption: (e) => ({
|
|
3067
|
+
alignItems: t ? "center" : "var(--align-items)",
|
|
3068
|
+
borderRadius: t ? 4 : "var(--menu-content-border-radius, 4px)",
|
|
3069
|
+
color: "var(--color)",
|
|
3070
|
+
cursor: "pointer",
|
|
3071
|
+
display: "flex",
|
|
3072
|
+
textAlign: "var(--text-align)",
|
|
3073
|
+
gap: 8,
|
|
3074
|
+
padding: t ? "0px 8px" : "10px 8px",
|
|
3075
|
+
...t ? { height: 32 } : { margin: "var(--menu-content-margin, initial)" },
|
|
3076
|
+
"&:hover": { background: "var(--background-color-hover)" },
|
|
3077
|
+
"&[aria-disabled=\"true\"]": { color: n.grey3 },
|
|
3078
|
+
"& > div": { display: "flex" },
|
|
3079
|
+
...e && {
|
|
3080
|
+
...ie,
|
|
3081
|
+
[K.md]: {
|
|
3082
|
+
padding: t ? "0px 8px" : "8px",
|
|
3083
|
+
...t && { height: 24 },
|
|
3084
|
+
gap: 4
|
|
3085
|
+
},
|
|
3086
|
+
[K.sm]: {
|
|
3087
|
+
padding: t ? "0px 6px" : "6px",
|
|
3088
|
+
...t && { height: 20 },
|
|
3089
|
+
gap: 2
|
|
3090
|
+
},
|
|
3091
|
+
[K.xs]: {
|
|
3092
|
+
padding: t ? "0px 4px" : "4px",
|
|
3093
|
+
...t && { height: 16 },
|
|
3094
|
+
gap: 1
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
}),
|
|
3098
|
+
divOptionsOptionCategory: (e) => ({
|
|
3099
|
+
...f.bold13,
|
|
3100
|
+
fontStyle: "var(--font-style)",
|
|
3101
|
+
textDecoration: "var(--text-decoration)",
|
|
3102
|
+
background: "var(--background-color)",
|
|
3103
|
+
position: "sticky",
|
|
3104
|
+
top: 0,
|
|
3105
|
+
zIndex: 1,
|
|
3106
|
+
...e && r
|
|
3107
|
+
}),
|
|
3108
|
+
divOptionsOptionDivider: (e) => ({
|
|
3109
|
+
borderRadius: t ? "0px" : "initial",
|
|
3110
|
+
cursor: "initial",
|
|
3111
|
+
padding: t ? "0px" : "initial",
|
|
3112
|
+
"&:hover": { background: "initial" },
|
|
3113
|
+
borderBottom: `1px solid ${n.grey4}`,
|
|
3114
|
+
...t && {
|
|
3115
|
+
margin: "10px 8px",
|
|
3116
|
+
height: 0,
|
|
3117
|
+
...e && {
|
|
3118
|
+
[K.md]: { margin: "8px" },
|
|
3119
|
+
[K.sm]: { margin: "6px" },
|
|
3120
|
+
[K.xs]: { margin: "4px" }
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
}),
|
|
3124
|
+
divOptionsOptionOption: (e) => ({
|
|
3125
|
+
...f.normal13,
|
|
3126
|
+
fontStyle: "var(--font-style)",
|
|
3127
|
+
lineHeight: f.normal13.lineHeight,
|
|
3128
|
+
textDecoration: "var(--text-decoration)",
|
|
3129
|
+
"&[aria-disabled=\"true\"]": { cursor: "not-allowed" },
|
|
3130
|
+
"&[aria-expanded=\"true\"]": { background: n.grey5 },
|
|
3131
|
+
...e && r
|
|
3132
|
+
}),
|
|
3133
|
+
divOptionsOptionOptionLabel: {
|
|
3134
|
+
...f.overflowEllipsis,
|
|
3135
|
+
display: "initial !important",
|
|
3136
|
+
...t && {
|
|
3137
|
+
height: "100%",
|
|
3138
|
+
alignContent: "center"
|
|
3139
|
+
},
|
|
3140
|
+
flexGrow: 1
|
|
3141
|
+
},
|
|
3142
|
+
divSearch: (e) => ({
|
|
3143
|
+
padding: "8px",
|
|
3144
|
+
display: "flex",
|
|
3145
|
+
"& > div": { flexGrow: 1 },
|
|
3146
|
+
...e && {
|
|
3147
|
+
[K.md]: { padding: t ? "8px" : "6px 8px" },
|
|
3148
|
+
[K.sm]: { padding: t ? "8px" : "4px 6px" },
|
|
3149
|
+
[K.xs]: { padding: t ? "8px" : "2px 4px" }
|
|
3150
|
+
}
|
|
3151
|
+
})
|
|
3152
|
+
};
|
|
3153
|
+
}, $t = m(Qt("default")), en = m(Qt("legacy")), tn = (e, { appearance: t = "default" } = {}) => (t === "legacy" ? en : $t)(e), nn = ({ tooltip: e, children: t }) => e ? /* @__PURE__ */ (0, Y.jsx)(W, {
|
|
3154
|
+
title: e,
|
|
3155
|
+
children: t
|
|
3156
|
+
}) : t, rn = ({ action: e, classNames: t }) => {
|
|
3157
|
+
let { color: n = "primary", disabled: r = !1, key: a, label: o, onClick: s, style: c = {} } = e;
|
|
3158
|
+
return /* @__PURE__ */ (0, Y.jsx)(nn, {
|
|
3159
|
+
tooltip: e.tooltip,
|
|
3160
|
+
children: /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3161
|
+
"aria-disabled": r,
|
|
3162
|
+
className: i({
|
|
3163
|
+
[t.divActionsAction]: !0,
|
|
3164
|
+
[t.divActionsAction__primary]: n === "primary",
|
|
3165
|
+
[t.divActionsAction__secondary]: n === "secondary"
|
|
3166
|
+
}),
|
|
3167
|
+
onClick: r ? void 0 : s,
|
|
3168
|
+
onKeyDown: Wt,
|
|
3169
|
+
role: "button",
|
|
3170
|
+
style: c,
|
|
3171
|
+
tabIndex: r ? void 0 : 0,
|
|
3172
|
+
children: o
|
|
3173
|
+
}, a)
|
|
3174
|
+
});
|
|
3175
|
+
}, an = ({ actions: e, classNames: t }) => e.length ? /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3176
|
+
className: t.divActions,
|
|
3177
|
+
children: e.map((e) => /* @__PURE__ */ (0, Y.jsx)(rn, {
|
|
3178
|
+
classNames: t,
|
|
3179
|
+
action: e
|
|
3180
|
+
}, e.key))
|
|
3181
|
+
}) : null, on = m({ button: {
|
|
3182
|
+
background: "initial",
|
|
3183
|
+
border: "initial",
|
|
3184
|
+
padding: "initial",
|
|
3185
|
+
borderRadius: 4,
|
|
3186
|
+
cursor: "pointer",
|
|
3187
|
+
display: "block"
|
|
3188
|
+
} }), sn = (0, J.forwardRef)(function({ children: e, className: t, ...n }, r) {
|
|
3189
|
+
let a = on();
|
|
3190
|
+
return /* @__PURE__ */ (0, Y.jsx)("button", {
|
|
3191
|
+
...n,
|
|
3192
|
+
className: i({
|
|
3193
|
+
[String(t)]: !0,
|
|
3194
|
+
[a.button]: !0
|
|
3195
|
+
}),
|
|
3196
|
+
ref: r,
|
|
3197
|
+
children: e
|
|
3198
|
+
});
|
|
3199
|
+
}), cn = m({
|
|
3200
|
+
button: (e) => ({
|
|
3201
|
+
position: "absolute",
|
|
3202
|
+
right: 4,
|
|
3203
|
+
top: 4,
|
|
3204
|
+
...e && {
|
|
3205
|
+
[K.md]: { top: 2 },
|
|
3206
|
+
"& svg": {
|
|
3207
|
+
[K.sm]: {
|
|
3208
|
+
width: 12,
|
|
3209
|
+
height: 12
|
|
3210
|
+
},
|
|
3211
|
+
[K.xs]: {
|
|
3212
|
+
width: 8,
|
|
3213
|
+
height: 8
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
}),
|
|
3218
|
+
div: {
|
|
3219
|
+
display: "flex",
|
|
3220
|
+
position: "relative"
|
|
3221
|
+
},
|
|
3222
|
+
input: (e) => ({
|
|
3223
|
+
...f.normal13,
|
|
3224
|
+
background: "initial",
|
|
3225
|
+
border: `1px solid ${n.grey3}`,
|
|
3226
|
+
borderRadius: 4,
|
|
3227
|
+
boxSizing: "border-box",
|
|
3228
|
+
color: n.mainDarkNavy,
|
|
3229
|
+
flexGrow: 1,
|
|
3230
|
+
height: 24,
|
|
3231
|
+
padding: "3px 23px",
|
|
3232
|
+
...e && {
|
|
3233
|
+
[K.md]: {
|
|
3234
|
+
height: 20,
|
|
3235
|
+
...f.normal12
|
|
3236
|
+
},
|
|
3237
|
+
[K.sm]: {
|
|
3238
|
+
height: 16,
|
|
3239
|
+
...f.normal11,
|
|
3240
|
+
padding: "3px 16px"
|
|
3241
|
+
},
|
|
3242
|
+
[K.xs]: {
|
|
3243
|
+
height: 12,
|
|
3244
|
+
...f.normal10,
|
|
3245
|
+
padding: "0px 12px"
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
"&::placeholder": { color: "inherit" }
|
|
3249
|
+
}),
|
|
3250
|
+
svg: (e) => ({
|
|
3251
|
+
left: 4,
|
|
3252
|
+
pointerEvents: "none",
|
|
3253
|
+
position: "absolute",
|
|
3254
|
+
top: 4,
|
|
3255
|
+
...e && {
|
|
3256
|
+
[K.md]: { top: 2 },
|
|
3257
|
+
[K.sm]: {
|
|
3258
|
+
width: 12,
|
|
3259
|
+
height: 12,
|
|
3260
|
+
top: 2
|
|
3261
|
+
},
|
|
3262
|
+
[K.xs]: {
|
|
3263
|
+
width: 8,
|
|
3264
|
+
height: 8,
|
|
3265
|
+
top: 2
|
|
3266
|
+
}
|
|
3267
|
+
}
|
|
3268
|
+
})
|
|
3269
|
+
}), ln = (0, J.forwardRef)(function({ autoFocus: e, className: t, onChange: n, value: r, placeholder: a, style: o, responsive: s, ...c }, l) {
|
|
3270
|
+
let u = (0, J.useRef)(null), d = (0, J.useCallback)((e) => {
|
|
3271
|
+
u.current = e, typeof l == "function" ? l(e) : l && (l.current = e);
|
|
3272
|
+
}, [l]), f = cn(s);
|
|
3273
|
+
return (0, J.useEffect)(() => {
|
|
3274
|
+
e && u.current?.focus();
|
|
3275
|
+
}, [e]), /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3276
|
+
className: i({
|
|
3277
|
+
[String(t)]: !0,
|
|
3278
|
+
[f.div]: !0
|
|
3279
|
+
}),
|
|
3280
|
+
children: [
|
|
3281
|
+
/* @__PURE__ */ (0, Y.jsx)(w, {
|
|
3282
|
+
className: f.svg,
|
|
3283
|
+
fill: o?.color
|
|
3284
|
+
}),
|
|
3285
|
+
/* @__PURE__ */ (0, Y.jsx)("input", {
|
|
3286
|
+
...c,
|
|
3287
|
+
style: { ...o },
|
|
3288
|
+
className: f.input,
|
|
3289
|
+
onChange: n,
|
|
3290
|
+
placeholder: a ?? "Search...",
|
|
3291
|
+
ref: d,
|
|
3292
|
+
size: 1,
|
|
3293
|
+
value: r
|
|
3294
|
+
}),
|
|
3295
|
+
/* @__PURE__ */ (0, Y.jsx)(sn, {
|
|
3296
|
+
className: f.button,
|
|
3297
|
+
"data-testid": "input-search-clear",
|
|
3298
|
+
onClick: () => {
|
|
3299
|
+
u.current?.focus(), n?.({ target: { value: "" } });
|
|
3300
|
+
},
|
|
3301
|
+
style: { display: r ? void 0 : "none" },
|
|
3302
|
+
children: /* @__PURE__ */ (0, Y.jsx)(b, { fill: o?.color })
|
|
3303
|
+
})
|
|
3304
|
+
]
|
|
3305
|
+
});
|
|
3306
|
+
}), un = m({ button: {
|
|
3307
|
+
paddingLeft: 4,
|
|
3308
|
+
paddingRight: 4
|
|
3309
|
+
} }), dn = ({ isAllCollapsed: e, clickCallback: t }) => {
|
|
3310
|
+
let n = un(), r = e ? d : g;
|
|
3311
|
+
return /* @__PURE__ */ (0, Y.jsx)(G, {
|
|
3312
|
+
title: e ? "Expand all" : "Collapse all",
|
|
3313
|
+
children: /* @__PURE__ */ (0, Y.jsx)(sn, {
|
|
3314
|
+
onClick: () => t?.(!e),
|
|
3315
|
+
className: n.button,
|
|
3316
|
+
children: /* @__PURE__ */ (0, Y.jsx)(r, {})
|
|
3317
|
+
})
|
|
3318
|
+
});
|
|
3319
|
+
}, fn = ({ classNames: e, searchEnabled: t, searchPhrase: n, onChange: r, options: i, collapsed: a, onCollapseChange: o, responsive: s }) => {
|
|
3320
|
+
if (!t) return null;
|
|
3321
|
+
let c = i.filter((e) => e.type === "category"), l = c.length > 0, u = c.every((e) => a[e.key]);
|
|
3322
|
+
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3323
|
+
className: e.divSearch,
|
|
3324
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(ln, {
|
|
3325
|
+
onChange: (e) => r(e.target.value),
|
|
3326
|
+
value: n,
|
|
3327
|
+
responsive: s,
|
|
3328
|
+
style: {
|
|
3329
|
+
borderColor: "var(--search-border-color)",
|
|
3330
|
+
color: "var(--search-font-color)"
|
|
3331
|
+
}
|
|
3332
|
+
}), l && /* @__PURE__ */ (0, Y.jsx)(dn, {
|
|
3333
|
+
isAllCollapsed: u,
|
|
3334
|
+
clickCallback: o
|
|
3335
|
+
})]
|
|
3336
|
+
});
|
|
3337
|
+
}, pn = (e, t) => {
|
|
3338
|
+
let { type: n } = e;
|
|
3339
|
+
return n === "category" && e.children ? {
|
|
3340
|
+
...e,
|
|
3341
|
+
children: e.children.filter((e) => t(e))
|
|
3342
|
+
} : e;
|
|
3343
|
+
}, mn = (e, t) => {
|
|
3344
|
+
let { type: n } = e;
|
|
3345
|
+
switch (n) {
|
|
3346
|
+
case "category": {
|
|
3347
|
+
let { children: t } = e;
|
|
3348
|
+
return !!t?.length;
|
|
3349
|
+
}
|
|
3350
|
+
case "divider": return !0;
|
|
3351
|
+
default: {
|
|
3352
|
+
let { label: n, description: r } = e;
|
|
3353
|
+
if (!n || typeof n != "string") return !0;
|
|
3354
|
+
let i = n.toLocaleLowerCase(), a = r?.toLocaleLowerCase();
|
|
3355
|
+
return i.includes(t) || !!a?.includes(t);
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
}, hn = (e, t) => {
|
|
3359
|
+
let n = (e) => mn(e, t);
|
|
3360
|
+
return e.map((e) => pn(e, n)).filter(n);
|
|
3361
|
+
}, gn = (e) => {
|
|
3362
|
+
let t = e.reduce((e, t) => e + Number("isChecked" in t && t.isChecked === !0), 0);
|
|
3363
|
+
switch (!0) {
|
|
3364
|
+
case t === e.length: return "full";
|
|
3365
|
+
case t > 0: return "partial";
|
|
3366
|
+
default: return "none";
|
|
3367
|
+
}
|
|
3368
|
+
}, _n = m({
|
|
3369
|
+
container: {
|
|
3370
|
+
position: "relative",
|
|
3371
|
+
display: "flex",
|
|
3372
|
+
alignItems: "center",
|
|
3373
|
+
flexDirection: "row",
|
|
3374
|
+
height: 16
|
|
3375
|
+
},
|
|
3376
|
+
checkboxWithLabel: { height: 28 },
|
|
3377
|
+
checkboxContainer: {
|
|
3378
|
+
display: "flex",
|
|
3379
|
+
alignItems: "center",
|
|
3380
|
+
height: 16
|
|
3381
|
+
},
|
|
3382
|
+
checkbox: {
|
|
3383
|
+
WebkitAppearance: "none",
|
|
3384
|
+
appearance: "none",
|
|
3385
|
+
margin: 0,
|
|
3386
|
+
backgroundColor: n.white,
|
|
3387
|
+
border: `1px solid ${n.grey3}`,
|
|
3388
|
+
borderRadius: 4,
|
|
3389
|
+
cursor: "pointer",
|
|
3390
|
+
"&[aria-disabled=\"true\"]": { cursor: "default" },
|
|
3391
|
+
"&[aria-readonly=\"true\"]": { cursor: "default" },
|
|
3392
|
+
"&:focus": { boxShadow: `0px 0px 1px 1px ${n.mainDarkNavy}40` }
|
|
3393
|
+
},
|
|
3394
|
+
checkboxChecked: {
|
|
3395
|
+
border: `1px solid ${n.grey2} !important`,
|
|
3396
|
+
"&[aria-disabled=\"true\"]": { borderColor: `${n.grey4} !important` }
|
|
3397
|
+
},
|
|
3398
|
+
checkboxUnchecked: {
|
|
3399
|
+
border: `1px solid ${n.grey3}`,
|
|
3400
|
+
"&[aria-disabled=\"true\"]": { borderColor: n.grey4 }
|
|
3401
|
+
},
|
|
3402
|
+
checkmark: {
|
|
3403
|
+
left: 0,
|
|
3404
|
+
position: "absolute",
|
|
3405
|
+
cursor: "pointer",
|
|
3406
|
+
"&[aria-disabled=\"true\"]": { cursor: "default" }
|
|
3407
|
+
},
|
|
3408
|
+
label: {
|
|
3409
|
+
...f.normal13,
|
|
3410
|
+
color: n.grey1,
|
|
3411
|
+
cursor: "pointer",
|
|
3412
|
+
marginLeft: 8,
|
|
3413
|
+
overflow: "hidden",
|
|
3414
|
+
textOverflow: "ellipsis",
|
|
3415
|
+
whiteSpace: "nowrap",
|
|
3416
|
+
"&.disabled": {
|
|
3417
|
+
color: n.grey3,
|
|
3418
|
+
cursor: "default"
|
|
3419
|
+
}
|
|
3420
|
+
}
|
|
3421
|
+
}), vn = {
|
|
3422
|
+
checkMarkColor: n.mainBrightPink,
|
|
3423
|
+
disabled: !1,
|
|
3424
|
+
readOnly: !1,
|
|
3425
|
+
size: 16,
|
|
3426
|
+
styles: {},
|
|
3427
|
+
tabIndex: 0
|
|
3428
|
+
}, yn = ({ value: e, size: t, fill: i = n.mainBrightPink }) => {
|
|
3429
|
+
switch (e) {
|
|
3430
|
+
case "full": return /* @__PURE__ */ (0, Y.jsx)(r, {
|
|
3431
|
+
fill: i,
|
|
3432
|
+
size: t
|
|
3433
|
+
});
|
|
3434
|
+
case "partial": return /* @__PURE__ */ (0, Y.jsx)(y, {
|
|
3435
|
+
fill: i,
|
|
3436
|
+
size: t
|
|
3437
|
+
});
|
|
3438
|
+
default: return null;
|
|
3439
|
+
}
|
|
3440
|
+
}, bn = (e) => {
|
|
3441
|
+
switch (e) {
|
|
3442
|
+
case "full": return "none";
|
|
3443
|
+
case "partial": return "none";
|
|
3444
|
+
case "none": return "full";
|
|
3445
|
+
}
|
|
3446
|
+
}, xn = (e) => {
|
|
3447
|
+
let { value: t, onChange: n, checkMarkColor: r, disabled: a, readOnly: o, size: s, styles: c, tabIndex: l, label: u, testId: d } = {
|
|
3448
|
+
...vn,
|
|
3449
|
+
...e
|
|
3450
|
+
}, f = (e) => {
|
|
3451
|
+
e.stopPropagation();
|
|
3452
|
+
let r = bn(t);
|
|
3453
|
+
!a && !o && n(r);
|
|
3454
|
+
}, p = (e) => {
|
|
3455
|
+
e.key === "Enter" && (e.preventDefault(), f(e));
|
|
3456
|
+
}, m = _n();
|
|
3457
|
+
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3458
|
+
onClick: f,
|
|
3459
|
+
className: i({
|
|
3460
|
+
[m.container]: !0,
|
|
3461
|
+
[m.checkboxWithLabel]: !!u
|
|
3462
|
+
}),
|
|
3463
|
+
"data-testid": d,
|
|
3464
|
+
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3465
|
+
className: i({
|
|
3466
|
+
[m.checkboxContainer]: !0,
|
|
3467
|
+
[m.checkboxWithLabel]: !!u
|
|
3468
|
+
}),
|
|
3469
|
+
children: [/* @__PURE__ */ (0, Y.jsx)("input", {
|
|
3470
|
+
type: "checkbox",
|
|
3471
|
+
"aria-disabled": a,
|
|
3472
|
+
"aria-readonly": o,
|
|
3473
|
+
"aria-checked": t === "full" ? "true" : t === "partial" ? "mixed" : "false",
|
|
3474
|
+
style: {
|
|
3475
|
+
...c,
|
|
3476
|
+
height: s,
|
|
3477
|
+
width: s
|
|
3478
|
+
},
|
|
3479
|
+
tabIndex: l,
|
|
3480
|
+
onKeyDown: p,
|
|
3481
|
+
className: i({
|
|
3482
|
+
[m.checkbox]: !0,
|
|
3483
|
+
[m.checkboxUnchecked]: t === "none",
|
|
3484
|
+
[m.checkboxChecked]: t === "full" || t === "partial"
|
|
3485
|
+
})
|
|
3486
|
+
}), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3487
|
+
"aria-disabled": a,
|
|
3488
|
+
className: m.checkmark,
|
|
3489
|
+
children: /* @__PURE__ */ (0, Y.jsx)(yn, {
|
|
3490
|
+
value: t,
|
|
3491
|
+
size: s,
|
|
3492
|
+
fill: r
|
|
3493
|
+
})
|
|
3494
|
+
})]
|
|
3495
|
+
}), u ? /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
3496
|
+
className: i({
|
|
3497
|
+
[m.label]: !0,
|
|
3498
|
+
disabled: a
|
|
3499
|
+
}),
|
|
3500
|
+
"data-testid": "checkbox-label",
|
|
3501
|
+
onClick: f,
|
|
3502
|
+
children: u
|
|
3503
|
+
}) : null]
|
|
3504
|
+
});
|
|
3505
|
+
}, Sn = ({ classNames: e, options: t, searchPhrase: n, autoFocus: r, renderOption: i }) => {
|
|
3506
|
+
let a = n.toLocaleLowerCase(), o = hn(t, a);
|
|
3507
|
+
return /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3508
|
+
className: e.divOptions,
|
|
3509
|
+
onKeyDown: Gt,
|
|
3510
|
+
ref: r,
|
|
3511
|
+
role: "menu",
|
|
3512
|
+
children: o.map((e) => /* @__PURE__ */ (0, Y.jsx)(J.Fragment, { children: i(e, a) }, e.key))
|
|
3513
|
+
});
|
|
3514
|
+
}, Cn = (e) => /* @__PURE__ */ (0, Y.jsx)(Sn, {
|
|
3515
|
+
classNames: e.classNames,
|
|
3516
|
+
options: e.options,
|
|
3517
|
+
searchPhrase: e.searchPhrase,
|
|
3518
|
+
autoFocus: e.autoFocus,
|
|
3519
|
+
renderOption: (t, n) => /* @__PURE__ */ (0, Y.jsx)(Un, {
|
|
3520
|
+
...e,
|
|
3521
|
+
option: t,
|
|
3522
|
+
searchPhrase: n
|
|
3523
|
+
})
|
|
3524
|
+
}), wn = m({
|
|
3525
|
+
container: {
|
|
3526
|
+
position: "relative",
|
|
3527
|
+
display: "flex",
|
|
3528
|
+
justifyContent: "center"
|
|
3529
|
+
},
|
|
3530
|
+
checkbox: {
|
|
3531
|
+
WebkitAppearance: "none",
|
|
3532
|
+
appearance: "none",
|
|
3533
|
+
margin: 0,
|
|
3534
|
+
backgroundColor: n.white,
|
|
3535
|
+
border: `1px solid ${n.grey3}`,
|
|
3536
|
+
borderRadius: 4,
|
|
3537
|
+
cursor: "pointer",
|
|
3538
|
+
"&[aria-disabled=\"true\"]": { cursor: "default" },
|
|
3539
|
+
"&[aria-readonly=\"true\"]": { cursor: "default" },
|
|
3540
|
+
"&:focus": { boxShadow: `0px 0px 1px 1px ${n.mainDarkNavy}40` }
|
|
3541
|
+
},
|
|
3542
|
+
checkboxChecked: { border: `1px solid ${n.grey2} !important` },
|
|
3543
|
+
checkboxUnchecked: { border: `1px solid ${n.grey3}` },
|
|
3544
|
+
checkmark: {
|
|
3545
|
+
top: 0,
|
|
3546
|
+
position: "absolute",
|
|
3547
|
+
cursor: "pointer"
|
|
3548
|
+
}
|
|
3549
|
+
}), Tn = {
|
|
3550
|
+
onClick: null,
|
|
3551
|
+
checkedType: "none",
|
|
3552
|
+
checkMarkColor: n.mainBrightPink,
|
|
3553
|
+
disabled: !1,
|
|
3554
|
+
readOnly: !1,
|
|
3555
|
+
size: 16,
|
|
3556
|
+
styles: {},
|
|
3557
|
+
tabIndex: 0
|
|
3558
|
+
}, En = ({ checkedType: e, size: t, fill: i = n.mainBrightPink }) => {
|
|
3559
|
+
switch (e) {
|
|
3560
|
+
case "full": return /* @__PURE__ */ (0, Y.jsx)(r, {
|
|
3561
|
+
fill: i,
|
|
3562
|
+
size: t
|
|
3563
|
+
});
|
|
3564
|
+
case "partial": return /* @__PURE__ */ (0, Y.jsx)(y, {
|
|
3565
|
+
fill: i,
|
|
3566
|
+
size: t
|
|
3567
|
+
});
|
|
3568
|
+
default: return null;
|
|
3569
|
+
}
|
|
3570
|
+
}, Dn = (e) => {
|
|
3571
|
+
let { onClick: t, checkedType: n, checkMarkColor: r, disabled: a, readOnly: o, size: s, styles: c, tabIndex: l } = {
|
|
3572
|
+
...Tn,
|
|
3573
|
+
...e
|
|
3574
|
+
}, u = n !== "none", d = (e) => {
|
|
3575
|
+
t && (e.stopPropagation(), !a && !o && t(e));
|
|
3576
|
+
}, f = (e) => {
|
|
3577
|
+
e.key === "Enter" && (e.preventDefault(), d(e));
|
|
3578
|
+
}, p = wn(), m = c?.borderWidth !== void 0 && !!c?.borderColor && !!c?.borderStyle;
|
|
3579
|
+
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3580
|
+
className: p.container,
|
|
3581
|
+
style: { height: s },
|
|
3582
|
+
onClick: d,
|
|
3583
|
+
children: [/* @__PURE__ */ (0, Y.jsx)("input", {
|
|
3584
|
+
type: "checkbox",
|
|
3585
|
+
"aria-disabled": a,
|
|
3586
|
+
"aria-readonly": o,
|
|
3587
|
+
"aria-checked": u,
|
|
3588
|
+
style: {
|
|
3589
|
+
...c,
|
|
3590
|
+
height: s,
|
|
3591
|
+
width: s
|
|
3592
|
+
},
|
|
3593
|
+
tabIndex: l,
|
|
3594
|
+
onKeyDown: f,
|
|
3595
|
+
className: i({
|
|
3596
|
+
[p.checkbox]: !0,
|
|
3597
|
+
[p.checkboxUnchecked]: !u,
|
|
3598
|
+
[p.checkboxChecked]: !m && u
|
|
3599
|
+
})
|
|
3600
|
+
}), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3601
|
+
className: p.checkmark,
|
|
3602
|
+
children: /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
3603
|
+
checkedType: n,
|
|
3604
|
+
size: s,
|
|
3605
|
+
fill: r
|
|
3606
|
+
})
|
|
3607
|
+
})]
|
|
3608
|
+
});
|
|
3609
|
+
}, On = ({ onCheck: e, checked: t, disabled: n, size: r }) => e ? /* @__PURE__ */ (0, Y.jsx)(Dn, {
|
|
3610
|
+
onClick: e,
|
|
3611
|
+
checkedType: t,
|
|
3612
|
+
disabled: n,
|
|
3613
|
+
size: r
|
|
3614
|
+
}) : null, kn = ({ multiSelect: e = !1, ...t }) => {
|
|
3615
|
+
let n = x(), r = t.responsive ? re(16, n.height, n.width) : 16;
|
|
3616
|
+
return /* @__PURE__ */ (0, Y.jsx)(An, {
|
|
3617
|
+
...t,
|
|
3618
|
+
appearance: "legacy",
|
|
3619
|
+
pickedOptionsIds: void 0,
|
|
3620
|
+
renderOptions: (t, n) => /* @__PURE__ */ (0, Y.jsx)(Sn, {
|
|
3621
|
+
...t,
|
|
3622
|
+
renderOption: (i, a) => /* @__PURE__ */ (0, Y.jsx)(Hn, {
|
|
3623
|
+
...t,
|
|
3624
|
+
option: i,
|
|
3625
|
+
searchPhrase: a,
|
|
3626
|
+
multiSelect: !n && e,
|
|
3627
|
+
appearance: "legacy",
|
|
3628
|
+
renderCheckbox: (e, t) => e.type !== "divider" && e.onCheck ? /* @__PURE__ */ (0, Y.jsx)(On, {
|
|
3629
|
+
onCheck: e.onCheck,
|
|
3630
|
+
checked: t,
|
|
3631
|
+
disabled: e.disabled ?? !1,
|
|
3632
|
+
size: r
|
|
3633
|
+
}) : null,
|
|
3634
|
+
renderSubmenu: (e) => /* @__PURE__ */ (0, Y.jsx)(Mn, {
|
|
3635
|
+
...e,
|
|
3636
|
+
appearance: "legacy"
|
|
3637
|
+
})
|
|
3638
|
+
})
|
|
3639
|
+
})
|
|
3640
|
+
});
|
|
3641
|
+
}, An = ({ actions: e = [], onClose: t, onCloseClick: n = t, options: r, stickyOptions: i, searchEnabled: o = !1, style: s = {}, cssVariables: c, header: l, pickedOptionsIds: u, responsive: d, appearance: f = "default", renderOptions: p }) => {
|
|
3642
|
+
let m = a(), h = tn(d, { appearance: f }), [g, _] = (0, J.useState)({}), [v, y] = (0, J.useState)({}), [b, x] = (0, J.useState)(""), S = (e) => {
|
|
3643
|
+
x(e), y({});
|
|
3644
|
+
}, C = {
|
|
3645
|
+
...Jt,
|
|
3646
|
+
...c
|
|
3647
|
+
}, w = Yt(C, { appearance: f }), T = {
|
|
3648
|
+
...C,
|
|
3649
|
+
...w
|
|
3650
|
+
}, E = (e) => {
|
|
3651
|
+
let t = r.map((e) => e.key).reduce((t, n) => (t[n] = e, t), {});
|
|
3652
|
+
_(t);
|
|
3653
|
+
}, D = (e) => {
|
|
3654
|
+
switch (e.stopPropagation(), e.key) {
|
|
3655
|
+
case "ArrowDown":
|
|
3656
|
+
e.target.tagName === "INPUT" && (e.preventDefault(), e.currentTarget.querySelector("[role=\"menuitem\"][tabindex]")?.focus());
|
|
3657
|
+
break;
|
|
3658
|
+
case "Escape":
|
|
3659
|
+
t(e);
|
|
3660
|
+
break;
|
|
3661
|
+
case "Shift":
|
|
3662
|
+
case "Tab": break;
|
|
3663
|
+
default: e.currentTarget.querySelector("input")?.focus();
|
|
3664
|
+
}
|
|
3665
|
+
};
|
|
3666
|
+
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3667
|
+
style: {
|
|
3668
|
+
...T,
|
|
3669
|
+
...s
|
|
3670
|
+
},
|
|
3671
|
+
className: h.container,
|
|
3672
|
+
onClick: (e) => {
|
|
3673
|
+
e.stopPropagation();
|
|
3674
|
+
},
|
|
3675
|
+
onKeyDown: D,
|
|
3676
|
+
children: [
|
|
3677
|
+
l ? /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3678
|
+
className: h.header,
|
|
3679
|
+
children: [
|
|
3680
|
+
" ",
|
|
3681
|
+
l,
|
|
3682
|
+
" "
|
|
3683
|
+
]
|
|
3684
|
+
}) : null,
|
|
3685
|
+
i?.length ? p({
|
|
3686
|
+
classNames: h,
|
|
3687
|
+
options: i,
|
|
3688
|
+
searchPhrase: "",
|
|
3689
|
+
collapsed: g,
|
|
3690
|
+
setCollapsed: _,
|
|
3691
|
+
openedElement: v,
|
|
3692
|
+
setOpenedElement: y,
|
|
3693
|
+
onCloseClick: n,
|
|
3694
|
+
autoFocus: m
|
|
3695
|
+
}, !0) : null,
|
|
3696
|
+
/* @__PURE__ */ (0, Y.jsx)(fn, {
|
|
3697
|
+
searchEnabled: o,
|
|
3698
|
+
searchPhrase: b,
|
|
3699
|
+
onChange: S,
|
|
3700
|
+
classNames: h,
|
|
3701
|
+
cssVariables: T,
|
|
3702
|
+
options: r,
|
|
3703
|
+
collapsed: g,
|
|
3704
|
+
onCollapseChange: E,
|
|
3705
|
+
responsive: d
|
|
3706
|
+
}),
|
|
3707
|
+
p({
|
|
3708
|
+
classNames: h,
|
|
3709
|
+
options: r,
|
|
3710
|
+
autoFocus: m,
|
|
3711
|
+
searchPhrase: b,
|
|
3712
|
+
collapsed: g,
|
|
3713
|
+
setCollapsed: _,
|
|
3714
|
+
openedElement: v,
|
|
3715
|
+
setOpenedElement: y,
|
|
3716
|
+
onCloseClick: n,
|
|
3717
|
+
pickedOptionsIds: u
|
|
3718
|
+
}, !1),
|
|
3719
|
+
/* @__PURE__ */ (0, Y.jsx)(an, {
|
|
3720
|
+
actions: e,
|
|
3721
|
+
classNames: h
|
|
3722
|
+
})
|
|
3723
|
+
]
|
|
3724
|
+
});
|
|
3725
|
+
}, jn = (e) => e.appearance === "legacy" ? /* @__PURE__ */ (0, Y.jsx)(kn, { ...e }) : /* @__PURE__ */ (0, Y.jsx)(An, {
|
|
3726
|
+
...e,
|
|
3727
|
+
renderOptions: (e) => /* @__PURE__ */ (0, Y.jsx)(Cn, { ...e })
|
|
3728
|
+
}), Mn = ({ actions: e = [], anchorEl: t, anchorPosition: n, cssVariables: r, onClose: i, onCloseClick: a, options: o, searchEnabled: s = !1, style: c = {}, pickedOptionsIds: l, header: u, menuStyle: d, responsive: f, appearance: p, ...m }) => {
|
|
3729
|
+
let h = {
|
|
3730
|
+
header: u,
|
|
3731
|
+
actions: e,
|
|
3732
|
+
onClose: i,
|
|
3733
|
+
onCloseClick: a,
|
|
3734
|
+
pickedOptionsIds: l,
|
|
3735
|
+
searchEnabled: s,
|
|
3736
|
+
style: c,
|
|
3737
|
+
cssVariables: r,
|
|
3738
|
+
responsive: f
|
|
3739
|
+
};
|
|
3740
|
+
return /* @__PURE__ */ (0, Y.jsx)(Ut, {
|
|
3741
|
+
...m,
|
|
3742
|
+
anchorEl: t,
|
|
3743
|
+
anchorPosition: n,
|
|
3744
|
+
MenuListProps: {
|
|
3745
|
+
role: void 0,
|
|
3746
|
+
tabIndex: void 0
|
|
3747
|
+
},
|
|
3748
|
+
onClose: i,
|
|
3749
|
+
open: !!t || !!n,
|
|
3750
|
+
style: d,
|
|
3751
|
+
children: p === "legacy" ? /* @__PURE__ */ (0, Y.jsx)(jn, {
|
|
3752
|
+
...h,
|
|
3753
|
+
options: o,
|
|
3754
|
+
appearance: "legacy"
|
|
3755
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(jn, {
|
|
3756
|
+
...h,
|
|
3757
|
+
options: o
|
|
3758
|
+
})
|
|
3759
|
+
});
|
|
3760
|
+
}, $ = ({ icon: e }) => e ? /* @__PURE__ */ (0, Y.jsx)("div", { children: e }) : null, Nn = m({ span: { fontWeight: "bold" } }), Pn = (e, t) => {
|
|
3761
|
+
let n = Nn();
|
|
3762
|
+
if (!e) return [{ children: t }];
|
|
3763
|
+
let r = e.toLocaleLowerCase(), i = t.toLocaleLowerCase(), a = [], o = 0;
|
|
3764
|
+
for (; o < t.length;) {
|
|
3765
|
+
let s = i.indexOf(r, o);
|
|
3766
|
+
switch (s) {
|
|
3767
|
+
case -1:
|
|
3768
|
+
a.push({ children: t.substring(o) }), o = t.length;
|
|
3769
|
+
break;
|
|
3770
|
+
default: a.push({ children: t.substring(o, s) }), a.push({
|
|
3771
|
+
children: t.substring(s, s + e.length),
|
|
3772
|
+
className: n.span
|
|
3773
|
+
}), o = s + e.length;
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
return a;
|
|
3777
|
+
}, Fn = ({ children: e, phrase: t }) => /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: Pn(t, e).map((e, t) => /* @__PURE__ */ (0, Y.jsx)("span", { ...e }, t)) }), In = ({ classNames: e, label: t, searchPhrase: n, color: r }) => {
|
|
3778
|
+
let i = r ? { color: qt(r) ?? void 0 } : {};
|
|
3779
|
+
return /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3780
|
+
"data-ellipsis": !0,
|
|
3781
|
+
className: e.divOptionsOptionOptionLabel,
|
|
3782
|
+
style: i,
|
|
3783
|
+
children: typeof t == "string" ? /* @__PURE__ */ (0, Y.jsx)(Fn, {
|
|
3784
|
+
phrase: n,
|
|
3785
|
+
children: t
|
|
3786
|
+
}) : t
|
|
3787
|
+
});
|
|
3788
|
+
}, Ln = ({ tooltipTitle: e }) => e ? /* @__PURE__ */ (0, Y.jsx)(W, {
|
|
3789
|
+
title: e,
|
|
3790
|
+
children: /* @__PURE__ */ (0, Y.jsx)("div", { children: /* @__PURE__ */ (0, Y.jsx)(_, {}) })
|
|
3791
|
+
}) : null, Rn = ({ classNames: e, option: t, setOpenedElement: n, collapsed: r, setCollapsed: a, searchPhrase: o, checkbox: s, renderOption: c }) => {
|
|
3792
|
+
let { children: l, disabled: u = !1, label: f, tooltip: p, key: m } = t;
|
|
3793
|
+
return /* @__PURE__ */ (0, Y.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(G, {
|
|
3794
|
+
title: f,
|
|
3795
|
+
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
3796
|
+
"aria-disabled": u,
|
|
3797
|
+
"aria-expanded": !r[m],
|
|
3798
|
+
className: i({
|
|
3799
|
+
[e.divOptionsOption]: !0,
|
|
3800
|
+
[e.divOptionsOptionCategory]: !0
|
|
3801
|
+
}),
|
|
3802
|
+
onClick: () => {
|
|
3803
|
+
a({
|
|
3804
|
+
...r,
|
|
3805
|
+
[m]: !r[m]
|
|
3806
|
+
}), n({});
|
|
3807
|
+
},
|
|
3808
|
+
onKeyDown: Wt,
|
|
3809
|
+
role: "menuitem",
|
|
3810
|
+
tabIndex: u ? void 0 : 0,
|
|
3811
|
+
children: [
|
|
3812
|
+
s,
|
|
3813
|
+
/* @__PURE__ */ (0, Y.jsx)(In, {
|
|
3814
|
+
label: f,
|
|
3815
|
+
searchPhrase: o,
|
|
3816
|
+
classNames: e
|
|
3817
|
+
}),
|
|
3818
|
+
/* @__PURE__ */ (0, Y.jsx)(Ln, { tooltipTitle: p }),
|
|
3819
|
+
/* @__PURE__ */ (0, Y.jsx)($, { icon: r[m] ? /* @__PURE__ */ (0, Y.jsx)(d, {}) : /* @__PURE__ */ (0, Y.jsx)(g, {}) })
|
|
3820
|
+
]
|
|
3821
|
+
})
|
|
3822
|
+
}), r[m] ? null : l.map(c)] }, m);
|
|
3823
|
+
}, zn = ({ classNames: e, option: t }) => /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3824
|
+
className: i({
|
|
3825
|
+
[e.divOptionsOption]: !0,
|
|
3826
|
+
[e.divOptionsOptionDivider]: !0
|
|
3827
|
+
}),
|
|
3828
|
+
role: "separator"
|
|
3829
|
+
}, t.key), Bn = ({ children: e, classNames: t, option: n, onClick: r }) => {
|
|
3830
|
+
let { disabled: a = !1, label: o, key: s, color: c } = n;
|
|
3831
|
+
return /* @__PURE__ */ (0, Y.jsx)(G, {
|
|
3832
|
+
title: o,
|
|
3833
|
+
children: /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3834
|
+
style: { backgroundColor: c || void 0 },
|
|
3835
|
+
"aria-disabled": a,
|
|
3836
|
+
className: i({
|
|
3837
|
+
[t.divOptionsOption]: !0,
|
|
3838
|
+
[t.divOptionsOptionOption]: !0
|
|
3839
|
+
}),
|
|
3840
|
+
onClick: r,
|
|
3841
|
+
onKeyDown: Wt,
|
|
3842
|
+
role: "menuitem",
|
|
3843
|
+
tabIndex: a ? void 0 : 0,
|
|
3844
|
+
children: e
|
|
3845
|
+
})
|
|
3846
|
+
}, s);
|
|
3847
|
+
}, Vn = (e) => {
|
|
3848
|
+
let t = e.option, n = e.classNames, { openedElement: i, setOpenedElement: a, onCloseClick: o, pickedOptionsIds: c, checkbox: l, multiSelect: u = !1, appearance: d = "default", renderSubmenu: f } = e, { children: p = [], disabled: m = !1, icon: h = {}, label: g, onClick: _, tooltip: v, key: y, color: b } = t, x = c?.includes(y), S = b ? qt(b) : s.fill, C = h.right ?? (x ? /* @__PURE__ */ (0, Y.jsx)(r, { fill: S ?? void 0 }) : null), w = s.size, T = !!C, E;
|
|
3849
|
+
return p.length ? (E = (e) => {
|
|
3850
|
+
m || a({ [y]: e.currentTarget });
|
|
3851
|
+
}, /* @__PURE__ */ (0, Y.jsxs)(J.Fragment, { children: [/* @__PURE__ */ (0, Y.jsxs)(Bn, {
|
|
3852
|
+
...e,
|
|
3853
|
+
onClick: E,
|
|
3854
|
+
children: [
|
|
3855
|
+
/* @__PURE__ */ (0, Y.jsx)($, { icon: h.left }),
|
|
3856
|
+
/* @__PURE__ */ (0, Y.jsx)(In, {
|
|
3857
|
+
label: g,
|
|
3858
|
+
classNames: n,
|
|
3859
|
+
color: b
|
|
3860
|
+
}),
|
|
3861
|
+
/* @__PURE__ */ (0, Y.jsx)(Ln, { tooltipTitle: v }),
|
|
3862
|
+
/* @__PURE__ */ (0, Y.jsx)($, { icon: C })
|
|
3863
|
+
]
|
|
3864
|
+
}), f({
|
|
3865
|
+
anchorEl: i[y],
|
|
3866
|
+
anchorOrigin: {
|
|
3867
|
+
horizontal: "left",
|
|
3868
|
+
vertical: "top"
|
|
3869
|
+
},
|
|
3870
|
+
onClose: () => {
|
|
3871
|
+
a({});
|
|
3872
|
+
},
|
|
3873
|
+
onCloseClick: (e) => {
|
|
3874
|
+
o(e), a({});
|
|
3875
|
+
},
|
|
3876
|
+
options: p,
|
|
3877
|
+
transformOrigin: {
|
|
3878
|
+
horizontal: "right",
|
|
3879
|
+
vertical: "top"
|
|
3880
|
+
}
|
|
3881
|
+
})] }, y)) : (E = (e) => {
|
|
3882
|
+
m || (_?.(e), !u && !l && o(e));
|
|
3883
|
+
}, /* @__PURE__ */ (0, Y.jsxs)(Bn, {
|
|
3884
|
+
...e,
|
|
3885
|
+
onClick: E,
|
|
3886
|
+
children: [
|
|
3887
|
+
t.checkboxPosition !== ae.right && l,
|
|
3888
|
+
/* @__PURE__ */ (0, Y.jsx)($, { icon: h.left }),
|
|
3889
|
+
/* @__PURE__ */ (0, Y.jsx)(In, {
|
|
3890
|
+
label: g,
|
|
3891
|
+
classNames: n,
|
|
3892
|
+
color: b
|
|
3893
|
+
}),
|
|
3894
|
+
/* @__PURE__ */ (0, Y.jsx)(Ln, { tooltipTitle: v }),
|
|
3895
|
+
T ? /* @__PURE__ */ (0, Y.jsx)($, { icon: C }) : d === "default" ? /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
3896
|
+
style: { width: w },
|
|
3897
|
+
"aria-hidden": !0
|
|
3898
|
+
}) : null,
|
|
3899
|
+
t.checkboxPosition === ae.right && l
|
|
3900
|
+
]
|
|
3901
|
+
}));
|
|
3902
|
+
}, Hn = (e) => {
|
|
3903
|
+
let { option: t, renderCheckbox: n, renderSubmenu: r } = e;
|
|
3904
|
+
switch (t.type) {
|
|
3905
|
+
case "category": return /* @__PURE__ */ (0, Y.jsx)(Rn, {
|
|
3906
|
+
...e,
|
|
3907
|
+
option: t,
|
|
3908
|
+
checkbox: t.onCheck ? n(t, gn(t.children)) : null,
|
|
3909
|
+
renderOption: (t) => /* @__PURE__ */ (0, J.createElement)(Hn, {
|
|
3910
|
+
...e,
|
|
3911
|
+
key: t.key,
|
|
3912
|
+
option: t,
|
|
3913
|
+
multiSelect: void 0
|
|
3914
|
+
})
|
|
3915
|
+
});
|
|
3916
|
+
case "divider": return /* @__PURE__ */ (0, Y.jsx)(zn, { ...e });
|
|
3917
|
+
case "option": return /* @__PURE__ */ (0, Y.jsx)(Vn, {
|
|
3918
|
+
...e,
|
|
3919
|
+
option: t,
|
|
3920
|
+
checkbox: t.onCheck ? n(t, t.isChecked ? "full" : "none") : null,
|
|
3921
|
+
renderSubmenu: r
|
|
3922
|
+
});
|
|
3923
|
+
default: return null;
|
|
3924
|
+
}
|
|
3925
|
+
}, Un = (e) => /* @__PURE__ */ (0, Y.jsx)(Hn, {
|
|
3926
|
+
...e,
|
|
3927
|
+
renderCheckbox: (e, t) => e.type !== "divider" && e.onCheck ? /* @__PURE__ */ (0, Y.jsx)(xn, {
|
|
3928
|
+
onChange: e.onCheck,
|
|
3929
|
+
value: t,
|
|
3930
|
+
disabled: e.disabled ?? !1
|
|
3931
|
+
}) : null,
|
|
3932
|
+
renderSubmenu: (e) => /* @__PURE__ */ (0, Y.jsx)(Mn, { ...e })
|
|
3933
|
+
});
|
|
3934
|
+
export { q as A, ut as C, Ae as D, Fe as E, pe as M, De as O, ht as S, Re as T, Kt as _, jn as a, Ut as b, hn as c, sn as d, an as f, qt as g, Jt as h, Mn as i, he as j, Se as k, fn as l, Yt as m, zn as n, Dn as o, tn as p, Fn as r, xn as s, Un as t, ln as u, Gt as v, lt as w, Nt as x, Wt as y };
|