@efficiency-point/design-system 0.1.45 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -183,11 +183,11 @@ var M = {
|
|
|
183
183
|
viewBox: "0 0 20 20",
|
|
184
184
|
...e,
|
|
185
185
|
children: /* @__PURE__ */ t("path", { d: "M5 7.5L10 12.5L15 7.5" })
|
|
186
|
-
}),
|
|
186
|
+
}), te = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
|
|
187
187
|
strokeWidth: e,
|
|
188
188
|
...n,
|
|
189
189
|
children: /* @__PURE__ */ t("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
190
|
-
}),
|
|
190
|
+
}), V = (e) => /* @__PURE__ */ n(P, {
|
|
191
191
|
...e,
|
|
192
192
|
children: [/* @__PURE__ */ t("rect", {
|
|
193
193
|
width: "14",
|
|
@@ -196,37 +196,37 @@ var M = {
|
|
|
196
196
|
y: "8",
|
|
197
197
|
rx: "2"
|
|
198
198
|
}), /* @__PURE__ */ t("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })]
|
|
199
|
-
}),
|
|
199
|
+
}), H = (e) => /* @__PURE__ */ t(P, {
|
|
200
200
|
...e,
|
|
201
201
|
children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
|
|
202
|
-
}),
|
|
202
|
+
}), ne = (e) => /* @__PURE__ */ n(P, {
|
|
203
203
|
...e,
|
|
204
204
|
children: [/* @__PURE__ */ t("circle", {
|
|
205
205
|
cx: "12",
|
|
206
206
|
cy: "12",
|
|
207
207
|
r: "10"
|
|
208
208
|
}), /* @__PURE__ */ t("path", { d: "m15 9-6 6M9 9l6 6" })]
|
|
209
|
-
}),
|
|
209
|
+
}), re = (e) => /* @__PURE__ */ n(P, {
|
|
210
210
|
...e,
|
|
211
211
|
children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
|
|
212
212
|
cx: "12",
|
|
213
213
|
cy: "12",
|
|
214
214
|
r: "2.5"
|
|
215
215
|
})]
|
|
216
|
-
}),
|
|
216
|
+
}), ie = (e) => /* @__PURE__ */ t(P, {
|
|
217
217
|
...e,
|
|
218
218
|
children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
|
|
219
|
-
}),
|
|
219
|
+
}), ae = (e) => /* @__PURE__ */ t(P, {
|
|
220
220
|
...e,
|
|
221
221
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
222
|
-
}),
|
|
222
|
+
}), oe = (e) => /* @__PURE__ */ n(P, {
|
|
223
223
|
...e,
|
|
224
224
|
children: [/* @__PURE__ */ t("circle", {
|
|
225
225
|
cx: "12",
|
|
226
226
|
cy: "12",
|
|
227
227
|
r: "10"
|
|
228
228
|
}), /* @__PURE__ */ t("path", { d: "M12 16v-4M12 8v.01" })]
|
|
229
|
-
}),
|
|
229
|
+
}), se = (e) => /* @__PURE__ */ n(P, {
|
|
230
230
|
...e,
|
|
231
231
|
children: [
|
|
232
232
|
/* @__PURE__ */ t("path", { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5Z" }),
|
|
@@ -235,13 +235,13 @@ var M = {
|
|
|
235
235
|
/* @__PURE__ */ t("path", { d: "M16 17H8" }),
|
|
236
236
|
/* @__PURE__ */ t("path", { d: "M10 9H8" })
|
|
237
237
|
]
|
|
238
|
-
}),
|
|
238
|
+
}), ce = (e) => /* @__PURE__ */ t(P, {
|
|
239
239
|
...e,
|
|
240
240
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
241
|
-
}),
|
|
241
|
+
}), le = (e) => /* @__PURE__ */ t(P, {
|
|
242
242
|
...e,
|
|
243
243
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
244
|
-
}),
|
|
244
|
+
}), ue = (e) => /* @__PURE__ */ n(P, {
|
|
245
245
|
...e,
|
|
246
246
|
children: [/* @__PURE__ */ t("rect", {
|
|
247
247
|
width: "18",
|
|
@@ -250,17 +250,17 @@ var M = {
|
|
|
250
250
|
y: "3",
|
|
251
251
|
rx: "2"
|
|
252
252
|
}), /* @__PURE__ */ t("path", { d: "M3 9h18M9 21V9" })]
|
|
253
|
-
}),
|
|
253
|
+
}), U = (e) => /* @__PURE__ */ t(P, {
|
|
254
254
|
...e,
|
|
255
255
|
children: /* @__PURE__ */ t("path", {
|
|
256
256
|
d: "M8 5v14M16 5v14",
|
|
257
257
|
strokeWidth: "3"
|
|
258
258
|
})
|
|
259
|
-
}),
|
|
259
|
+
}), de = ({ strokeWidth: e = 2, ...n }) => /* @__PURE__ */ t(P, {
|
|
260
260
|
strokeWidth: e,
|
|
261
261
|
...n,
|
|
262
262
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14M5 12h14" })
|
|
263
|
-
}),
|
|
263
|
+
}), fe = (e) => /* @__PURE__ */ n(P, {
|
|
264
264
|
...e,
|
|
265
265
|
children: [
|
|
266
266
|
/* @__PURE__ */ t("path", { d: "M12 22v-5" }),
|
|
@@ -268,60 +268,60 @@ var M = {
|
|
|
268
268
|
/* @__PURE__ */ t("path", { d: "M15 8V2" }),
|
|
269
269
|
/* @__PURE__ */ t("path", { d: "M18 8v5a6 6 0 0 1-12 0V8Z" })
|
|
270
270
|
]
|
|
271
|
-
}),
|
|
271
|
+
}), pe = (e) => /* @__PURE__ */ t(P, {
|
|
272
272
|
...e,
|
|
273
273
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
274
|
-
}),
|
|
274
|
+
}), me = (e) => /* @__PURE__ */ t(P, {
|
|
275
275
|
...e,
|
|
276
276
|
children: /* @__PURE__ */ t("path", {
|
|
277
277
|
d: "m8 5 11 7-11 7V5Z",
|
|
278
278
|
fill: "currentColor",
|
|
279
279
|
stroke: "none"
|
|
280
280
|
})
|
|
281
|
-
}),
|
|
281
|
+
}), he = (e) => /* @__PURE__ */ t(P, {
|
|
282
282
|
...e,
|
|
283
283
|
children: /* @__PURE__ */ t("path", { d: "M4 7v5h5M5.5 11a7 7 0 1 1 1.3 6.3" })
|
|
284
|
-
}),
|
|
284
|
+
}), ge = (e) => /* @__PURE__ */ t(P, {
|
|
285
285
|
...e,
|
|
286
286
|
children: /* @__PURE__ */ t("path", { d: "M12 8.5a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7Zm7.4 5.2.1-1.7-.1-1.7 2-1.5-2-3.4-2.4 1a8 8 0 0 0-2.9-1.7L13.8 2h-3.9l-.4 2.7a8 8 0 0 0-2.8 1.7l-2.5-1-2 3.4 2.1 1.5-.1 1.7.1 1.7-2.1 1.5 2 3.4 2.5-1a8 8 0 0 0 2.8 1.7l.4 2.7h3.9l.3-2.7a8 8 0 0 0 2.9-1.7l2.4 1 2-3.4-2-1.5Z" })
|
|
287
|
-
}),
|
|
287
|
+
}), _e = (e) => /* @__PURE__ */ t(P, {
|
|
288
288
|
...e,
|
|
289
289
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
290
|
-
}),
|
|
290
|
+
}), W = (e) => /* @__PURE__ */ t(P, {
|
|
291
291
|
...e,
|
|
292
292
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
293
|
-
}),
|
|
293
|
+
}), ve = (e) => /* @__PURE__ */ t(P, {
|
|
294
294
|
...e,
|
|
295
295
|
children: /* @__PURE__ */ t("path", { d: "M4 6h16v12H4V6Zm7 4a2 2 0 1 0 0 4m7-4a2 2 0 1 0 0 4" })
|
|
296
|
-
}),
|
|
296
|
+
}), ye = (e) => /* @__PURE__ */ t(P, {
|
|
297
297
|
...e,
|
|
298
298
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12-1c1.3 1.5 1.3 4.5 0 6m2.5-8.5c3 3 3 8 0 11" })
|
|
299
|
-
}),
|
|
299
|
+
}), be = (e) => /* @__PURE__ */ t(P, {
|
|
300
300
|
...e,
|
|
301
301
|
children: /* @__PURE__ */ t("path", { d: "M5 10v4h4l5 4V6l-5 4H5Zm12 0 4 4m0-4-4 4" })
|
|
302
|
-
}),
|
|
302
|
+
}), xe = (e) => /* @__PURE__ */ t(P, {
|
|
303
303
|
...e,
|
|
304
304
|
children: /* @__PURE__ */ t("path", { d: "M8 17V5m-3 3 3-3 3 3M16 7v12m-3-3 3 3 3-3" })
|
|
305
|
-
}),
|
|
305
|
+
}), Se = (e) => /* @__PURE__ */ t(P, {
|
|
306
306
|
...e,
|
|
307
307
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
308
|
-
}),
|
|
308
|
+
}), Ce = (e) => /* @__PURE__ */ t(P, {
|
|
309
309
|
...e,
|
|
310
310
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
311
|
-
}),
|
|
311
|
+
}), we = (e) => /* @__PURE__ */ n(P, {
|
|
312
312
|
...e,
|
|
313
313
|
children: [/* @__PURE__ */ t("circle", {
|
|
314
314
|
cx: "12",
|
|
315
315
|
cy: "12",
|
|
316
316
|
r: "10"
|
|
317
317
|
}), /* @__PURE__ */ t("path", { d: "m9 12 2 2 4-4" })]
|
|
318
|
-
}),
|
|
318
|
+
}), Te = (e) => /* @__PURE__ */ t(P, {
|
|
319
319
|
...e,
|
|
320
320
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
321
|
-
}),
|
|
321
|
+
}), Ee = (e) => /* @__PURE__ */ n(P, {
|
|
322
322
|
...e,
|
|
323
323
|
children: [/* @__PURE__ */ t("path", { d: "M12 3.5L21 19H3L12 3.5Z" }), /* @__PURE__ */ t("path", { d: "M12 9v4.5M12 16.5v.01" })]
|
|
324
|
-
}),
|
|
324
|
+
}), De = (e) => /* @__PURE__ */ n(P, {
|
|
325
325
|
...e,
|
|
326
326
|
children: [
|
|
327
327
|
/* @__PURE__ */ t("path", { d: "M3 6h18" }),
|
|
@@ -340,13 +340,13 @@ var M = {
|
|
|
340
340
|
y2: "17"
|
|
341
341
|
})
|
|
342
342
|
]
|
|
343
|
-
}),
|
|
343
|
+
}), Oe = (e) => /* @__PURE__ */ t(P, {
|
|
344
344
|
...e,
|
|
345
345
|
children: /* @__PURE__ */ t("path", { d: "m21.4 11.6-8.9 8.9a6 6 0 0 1-8.5-8.5l9.6-9.6a4 4 0 0 1 5.7 5.7l-9.6 9.6a2 2 0 0 1-2.8-2.8l8.9-8.9" })
|
|
346
|
-
}),
|
|
346
|
+
}), ke = (e) => /* @__PURE__ */ n(P, {
|
|
347
347
|
...e,
|
|
348
348
|
children: [/* @__PURE__ */ t("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t("path", { d: "M22 2 11 13" })]
|
|
349
|
-
}),
|
|
349
|
+
}), Ae = (e) => /* @__PURE__ */ n(P, {
|
|
350
350
|
...e,
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ t("circle", {
|
|
@@ -357,7 +357,7 @@ var M = {
|
|
|
357
357
|
/* @__PURE__ */ t("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
358
358
|
/* @__PURE__ */ t("path", { d: "M9 9h.01M15 9h.01" })
|
|
359
359
|
]
|
|
360
|
-
}),
|
|
360
|
+
}), je = (e) => /* @__PURE__ */ n(P, {
|
|
361
361
|
...e,
|
|
362
362
|
children: [
|
|
363
363
|
/* @__PURE__ */ t("circle", {
|
|
@@ -382,7 +382,7 @@ var M = {
|
|
|
382
382
|
stroke: "none"
|
|
383
383
|
})
|
|
384
384
|
]
|
|
385
|
-
}),
|
|
385
|
+
}), Me = (e) => /* @__PURE__ */ t(P, {
|
|
386
386
|
...e,
|
|
387
387
|
children: [
|
|
388
388
|
5,
|
|
@@ -399,60 +399,60 @@ var M = {
|
|
|
399
399
|
fill: "currentColor",
|
|
400
400
|
stroke: "none"
|
|
401
401
|
}, `${n}-${e}`)))
|
|
402
|
-
}),
|
|
402
|
+
}), G = (e) => (n) => /* @__PURE__ */ t(P, {
|
|
403
403
|
...n,
|
|
404
404
|
children: e.map(([e, t], n) => o(e, {
|
|
405
405
|
...t,
|
|
406
406
|
key: t.key ?? `${e}-${n}`
|
|
407
407
|
}))
|
|
408
|
-
}),
|
|
409
|
-
IconAppsGrid:
|
|
410
|
-
IconActivity:
|
|
408
|
+
}), K = {
|
|
409
|
+
IconAppsGrid: Me,
|
|
410
|
+
IconActivity: G([["path", {
|
|
411
411
|
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
412
412
|
key: "169zse"
|
|
413
413
|
}]]),
|
|
414
414
|
IconArchive: R,
|
|
415
|
-
IconAlertTriangle:
|
|
415
|
+
IconAlertTriangle: G([
|
|
416
416
|
["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
|
|
417
417
|
["path", { d: "M12 9v4" }],
|
|
418
418
|
["path", { d: "M12 17h.01" }]
|
|
419
419
|
]),
|
|
420
|
-
IconArrowDown:
|
|
420
|
+
IconArrowDown: G([["path", {
|
|
421
421
|
d: "M12 5v14",
|
|
422
422
|
key: "s699le"
|
|
423
423
|
}], ["path", {
|
|
424
424
|
d: "m19 12-7 7-7-7",
|
|
425
425
|
key: "1idqje"
|
|
426
426
|
}]]),
|
|
427
|
-
IconArrowLeft:
|
|
427
|
+
IconArrowLeft: G([["path", {
|
|
428
428
|
d: "m12 19-7-7 7-7",
|
|
429
429
|
key: "1l729n"
|
|
430
430
|
}], ["path", {
|
|
431
431
|
d: "M19 12H5",
|
|
432
432
|
key: "x3x0zl"
|
|
433
433
|
}]]),
|
|
434
|
-
IconArrowRight:
|
|
434
|
+
IconArrowRight: G([["path", {
|
|
435
435
|
d: "M5 12h14",
|
|
436
436
|
key: "1ays0h"
|
|
437
437
|
}], ["path", {
|
|
438
438
|
d: "m12 5 7 7-7 7",
|
|
439
439
|
key: "xquz4c"
|
|
440
440
|
}]]),
|
|
441
|
-
IconArrowUp:
|
|
441
|
+
IconArrowUp: G([["path", {
|
|
442
442
|
d: "m5 12 7-7 7 7",
|
|
443
443
|
key: "hav0vg"
|
|
444
444
|
}], ["path", {
|
|
445
445
|
d: "M12 19V5",
|
|
446
446
|
key: "x0mq9r"
|
|
447
447
|
}]]),
|
|
448
|
-
IconArrowUpRight:
|
|
448
|
+
IconArrowUpRight: G([["path", {
|
|
449
449
|
d: "M7 7h10v10",
|
|
450
450
|
key: "1tivn9"
|
|
451
451
|
}], ["path", {
|
|
452
452
|
d: "M7 17 17 7",
|
|
453
453
|
key: "1vkiza"
|
|
454
454
|
}]]),
|
|
455
|
-
IconBarChart3:
|
|
455
|
+
IconBarChart3: G([
|
|
456
456
|
["path", { d: "M3 3v18h18" }],
|
|
457
457
|
["path", { d: "M18 17V9" }],
|
|
458
458
|
["path", { d: "M13 17V5" }],
|
|
@@ -460,14 +460,14 @@ var M = {
|
|
|
460
460
|
]),
|
|
461
461
|
IconBedDouble: I,
|
|
462
462
|
IconBookText: L,
|
|
463
|
-
IconBell:
|
|
463
|
+
IconBell: G([["path", {
|
|
464
464
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
465
465
|
key: "vwvbt9"
|
|
466
466
|
}], ["path", {
|
|
467
467
|
d: "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",
|
|
468
468
|
key: "11g9vi"
|
|
469
469
|
}]]),
|
|
470
|
-
IconBoxes:
|
|
470
|
+
IconBoxes: G([
|
|
471
471
|
["path", {
|
|
472
472
|
d: "M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",
|
|
473
473
|
key: "lc1i9w"
|
|
@@ -517,7 +517,7 @@ var M = {
|
|
|
517
517
|
key: "1io7kd"
|
|
518
518
|
}]
|
|
519
519
|
]),
|
|
520
|
-
IconBuilding2:
|
|
520
|
+
IconBuilding2: G([
|
|
521
521
|
["path", {
|
|
522
522
|
d: "M10 12h4",
|
|
523
523
|
key: "a56b0p"
|
|
@@ -539,7 +539,7 @@ var M = {
|
|
|
539
539
|
key: "16ra0t"
|
|
540
540
|
}]
|
|
541
541
|
]),
|
|
542
|
-
IconCamera:
|
|
542
|
+
IconCamera: G([["path", {
|
|
543
543
|
d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
|
|
544
544
|
key: "18u6gg"
|
|
545
545
|
}], ["circle", {
|
|
@@ -548,7 +548,7 @@ var M = {
|
|
|
548
548
|
r: "3",
|
|
549
549
|
key: "1vg3eu"
|
|
550
550
|
}]]),
|
|
551
|
-
IconChartNoAxesCombined:
|
|
551
|
+
IconChartNoAxesCombined: G([
|
|
552
552
|
["path", {
|
|
553
553
|
d: "M12 16v5",
|
|
554
554
|
key: "zza2cw"
|
|
@@ -574,11 +574,11 @@ var M = {
|
|
|
574
574
|
key: "1t2idw"
|
|
575
575
|
}]
|
|
576
576
|
]),
|
|
577
|
-
IconChevronRight:
|
|
577
|
+
IconChevronRight: G([["path", {
|
|
578
578
|
d: "m9 18 6-6-6-6",
|
|
579
579
|
key: "mthhwq"
|
|
580
580
|
}]]),
|
|
581
|
-
IconCircleAlert:
|
|
581
|
+
IconCircleAlert: G([
|
|
582
582
|
["circle", {
|
|
583
583
|
cx: "12",
|
|
584
584
|
cy: "12",
|
|
@@ -600,7 +600,7 @@ var M = {
|
|
|
600
600
|
key: "4dfq90"
|
|
601
601
|
}]
|
|
602
602
|
]),
|
|
603
|
-
IconClock3:
|
|
603
|
+
IconClock3: G([["circle", {
|
|
604
604
|
cx: "12",
|
|
605
605
|
cy: "12",
|
|
606
606
|
r: "10",
|
|
@@ -609,8 +609,8 @@ var M = {
|
|
|
609
609
|
d: "M12 6v6h4",
|
|
610
610
|
key: "135r8i"
|
|
611
611
|
}]]),
|
|
612
|
-
IconCopy:
|
|
613
|
-
IconDownload:
|
|
612
|
+
IconCopy: V,
|
|
613
|
+
IconDownload: G([
|
|
614
614
|
["path", {
|
|
615
615
|
d: "M12 15V3",
|
|
616
616
|
key: "m9g1x1"
|
|
@@ -624,7 +624,7 @@ var M = {
|
|
|
624
624
|
key: "brsn70"
|
|
625
625
|
}]
|
|
626
626
|
]),
|
|
627
|
-
IconExternalLink:
|
|
627
|
+
IconExternalLink: G([
|
|
628
628
|
["path", {
|
|
629
629
|
d: "M15 3h6v6",
|
|
630
630
|
key: "1q9fwt"
|
|
@@ -638,7 +638,7 @@ var M = {
|
|
|
638
638
|
key: "a6xqqp"
|
|
639
639
|
}]
|
|
640
640
|
]),
|
|
641
|
-
IconFactory:
|
|
641
|
+
IconFactory: G([
|
|
642
642
|
["path", {
|
|
643
643
|
d: "M12 16h.01",
|
|
644
644
|
key: "1drbdi"
|
|
@@ -656,15 +656,15 @@ var M = {
|
|
|
656
656
|
key: "18s6g9"
|
|
657
657
|
}]
|
|
658
658
|
]),
|
|
659
|
-
IconFileText:
|
|
660
|
-
IconGauge:
|
|
659
|
+
IconFileText: se,
|
|
660
|
+
IconGauge: G([["path", {
|
|
661
661
|
d: "m12 14 4-4",
|
|
662
662
|
key: "9kzdfg"
|
|
663
663
|
}], ["path", {
|
|
664
664
|
d: "M3.34 19a10 10 0 1 1 17.32 0",
|
|
665
665
|
key: "19p75a"
|
|
666
666
|
}]]),
|
|
667
|
-
IconGripVertical:
|
|
667
|
+
IconGripVertical: G([
|
|
668
668
|
["circle", {
|
|
669
669
|
cx: "9",
|
|
670
670
|
cy: "12",
|
|
@@ -702,7 +702,7 @@ var M = {
|
|
|
702
702
|
key: "f4zoj3"
|
|
703
703
|
}]
|
|
704
704
|
]),
|
|
705
|
-
IconLayoutDashboard:
|
|
705
|
+
IconLayoutDashboard: G([
|
|
706
706
|
["rect", {
|
|
707
707
|
width: "7",
|
|
708
708
|
height: "9",
|
|
@@ -736,7 +736,7 @@ var M = {
|
|
|
736
736
|
key: "ldoo1y"
|
|
737
737
|
}]
|
|
738
738
|
]),
|
|
739
|
-
IconLockKeyhole:
|
|
739
|
+
IconLockKeyhole: G([
|
|
740
740
|
["circle", {
|
|
741
741
|
cx: "12",
|
|
742
742
|
cy: "16",
|
|
@@ -756,7 +756,7 @@ var M = {
|
|
|
756
756
|
key: "1pqi11"
|
|
757
757
|
}]
|
|
758
758
|
]),
|
|
759
|
-
IconLogOut:
|
|
759
|
+
IconLogOut: G([
|
|
760
760
|
["path", {
|
|
761
761
|
d: "m16 17 5-5-5-5",
|
|
762
762
|
key: "1bji2h"
|
|
@@ -770,7 +770,7 @@ var M = {
|
|
|
770
770
|
key: "1uf3rs"
|
|
771
771
|
}]
|
|
772
772
|
]),
|
|
773
|
-
IconMaximize2:
|
|
773
|
+
IconMaximize2: G([
|
|
774
774
|
["path", {
|
|
775
775
|
d: "M15 3h6v6",
|
|
776
776
|
key: "1q9fwt"
|
|
@@ -788,7 +788,7 @@ var M = {
|
|
|
788
788
|
key: "wtvkvv"
|
|
789
789
|
}]
|
|
790
790
|
]),
|
|
791
|
-
IconMenu:
|
|
791
|
+
IconMenu: G([
|
|
792
792
|
["path", {
|
|
793
793
|
d: "M4 5h16",
|
|
794
794
|
key: "1tepv9"
|
|
@@ -802,7 +802,7 @@ var M = {
|
|
|
802
802
|
key: "1djgab"
|
|
803
803
|
}]
|
|
804
804
|
]),
|
|
805
|
-
IconPackageCheck:
|
|
805
|
+
IconPackageCheck: G([
|
|
806
806
|
["path", {
|
|
807
807
|
d: "M12 22V12",
|
|
808
808
|
key: "d0xqtd"
|
|
@@ -824,7 +824,7 @@ var M = {
|
|
|
824
824
|
key: "9yrvtv"
|
|
825
825
|
}]
|
|
826
826
|
]),
|
|
827
|
-
IconRefreshCw:
|
|
827
|
+
IconRefreshCw: G([
|
|
828
828
|
["path", {
|
|
829
829
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
830
830
|
key: "v9h5vc"
|
|
@@ -842,14 +842,14 @@ var M = {
|
|
|
842
842
|
key: "1cv678"
|
|
843
843
|
}]
|
|
844
844
|
]),
|
|
845
|
-
IconRotateCw:
|
|
845
|
+
IconRotateCw: G([["path", {
|
|
846
846
|
d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
|
|
847
847
|
key: "1p45f6"
|
|
848
848
|
}], ["path", {
|
|
849
849
|
d: "M21 3v5h-5",
|
|
850
850
|
key: "1q7to0"
|
|
851
851
|
}]]),
|
|
852
|
-
IconSearch:
|
|
852
|
+
IconSearch: G([["path", {
|
|
853
853
|
d: "m21 21-4.34-4.34",
|
|
854
854
|
key: "14j7rj"
|
|
855
855
|
}], ["circle", {
|
|
@@ -858,7 +858,7 @@ var M = {
|
|
|
858
858
|
r: "8",
|
|
859
859
|
key: "4ej97u"
|
|
860
860
|
}]]),
|
|
861
|
-
IconSettings2:
|
|
861
|
+
IconSettings2: G([
|
|
862
862
|
["path", {
|
|
863
863
|
d: "M14 17H5",
|
|
864
864
|
key: "gfn3mx"
|
|
@@ -880,7 +880,7 @@ var M = {
|
|
|
880
880
|
key: "dfmy0x"
|
|
881
881
|
}]
|
|
882
882
|
]),
|
|
883
|
-
IconShieldAlert:
|
|
883
|
+
IconShieldAlert: G([
|
|
884
884
|
["path", {
|
|
885
885
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
886
886
|
key: "oel41y"
|
|
@@ -894,14 +894,14 @@ var M = {
|
|
|
894
894
|
key: "1drbdi"
|
|
895
895
|
}]
|
|
896
896
|
]),
|
|
897
|
-
IconShieldCheck:
|
|
897
|
+
IconShieldCheck: G([["path", {
|
|
898
898
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
899
899
|
key: "oel41y"
|
|
900
900
|
}], ["path", {
|
|
901
901
|
d: "m9 12 2 2 4-4",
|
|
902
902
|
key: "dzmm74"
|
|
903
903
|
}]]),
|
|
904
|
-
IconSmartphone:
|
|
904
|
+
IconSmartphone: G([["rect", {
|
|
905
905
|
width: "14",
|
|
906
906
|
height: "20",
|
|
907
907
|
x: "5",
|
|
@@ -913,7 +913,7 @@ var M = {
|
|
|
913
913
|
d: "M12 18h.01",
|
|
914
914
|
key: "mhygvu"
|
|
915
915
|
}]]),
|
|
916
|
-
IconSparkles:
|
|
916
|
+
IconSparkles: G([
|
|
917
917
|
["path", {
|
|
918
918
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
919
919
|
key: "1s2grr"
|
|
@@ -933,22 +933,22 @@ var M = {
|
|
|
933
933
|
key: "6kqj1y"
|
|
934
934
|
}]
|
|
935
935
|
]),
|
|
936
|
-
IconTable2:
|
|
936
|
+
IconTable2: G([["path", {
|
|
937
937
|
d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",
|
|
938
938
|
key: "gugj83"
|
|
939
939
|
}]]),
|
|
940
|
-
IconThermometer:
|
|
940
|
+
IconThermometer: G([["path", {
|
|
941
941
|
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
942
942
|
key: "17jzev"
|
|
943
943
|
}]]),
|
|
944
|
-
IconTrendingUp:
|
|
944
|
+
IconTrendingUp: G([["path", {
|
|
945
945
|
d: "M16 7h6v6",
|
|
946
946
|
key: "box55l"
|
|
947
947
|
}], ["path", {
|
|
948
948
|
d: "m22 7-8.5 8.5-5-5L2 17",
|
|
949
949
|
key: "1t1m79"
|
|
950
950
|
}]]),
|
|
951
|
-
IconUserCheck:
|
|
951
|
+
IconUserCheck: G([
|
|
952
952
|
["path", {
|
|
953
953
|
d: "m16 11 2 2 4-4",
|
|
954
954
|
key: "9rsbq5"
|
|
@@ -964,7 +964,7 @@ var M = {
|
|
|
964
964
|
key: "nufk8"
|
|
965
965
|
}]
|
|
966
966
|
]),
|
|
967
|
-
IconUserRound:
|
|
967
|
+
IconUserRound: G([["circle", {
|
|
968
968
|
cx: "12",
|
|
969
969
|
cy: "8",
|
|
970
970
|
r: "5",
|
|
@@ -973,7 +973,7 @@ var M = {
|
|
|
973
973
|
d: "M20 21a8 8 0 0 0-16 0",
|
|
974
974
|
key: "rfgkzh"
|
|
975
975
|
}]]),
|
|
976
|
-
IconUsers:
|
|
976
|
+
IconUsers: G([
|
|
977
977
|
["path", {
|
|
978
978
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
979
979
|
key: "1yyitq"
|
|
@@ -993,7 +993,7 @@ var M = {
|
|
|
993
993
|
key: "nufk8"
|
|
994
994
|
}]
|
|
995
995
|
]),
|
|
996
|
-
IconUserX:
|
|
996
|
+
IconUserX: G([
|
|
997
997
|
["path", {
|
|
998
998
|
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
999
999
|
key: "1yyitq"
|
|
@@ -1019,7 +1019,7 @@ var M = {
|
|
|
1019
1019
|
key: "1swrse"
|
|
1020
1020
|
}]
|
|
1021
1021
|
]),
|
|
1022
|
-
IconVideo:
|
|
1022
|
+
IconVideo: G([["path", {
|
|
1023
1023
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1024
1024
|
key: "ftymec"
|
|
1025
1025
|
}], ["rect", {
|
|
@@ -1030,7 +1030,7 @@ var M = {
|
|
|
1030
1030
|
rx: "2",
|
|
1031
1031
|
key: "158x01"
|
|
1032
1032
|
}]]),
|
|
1033
|
-
IconVideoOff:
|
|
1033
|
+
IconVideoOff: G([
|
|
1034
1034
|
["path", {
|
|
1035
1035
|
d: "M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196",
|
|
1036
1036
|
key: "w8jjjt"
|
|
@@ -1044,7 +1044,7 @@ var M = {
|
|
|
1044
1044
|
key: "1ooewy"
|
|
1045
1045
|
}]
|
|
1046
1046
|
]),
|
|
1047
|
-
IconVolume2:
|
|
1047
|
+
IconVolume2: G([
|
|
1048
1048
|
["path", {
|
|
1049
1049
|
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1050
1050
|
key: "uqj9uw"
|
|
@@ -1058,7 +1058,7 @@ var M = {
|
|
|
1058
1058
|
key: "ijwkga"
|
|
1059
1059
|
}]
|
|
1060
1060
|
]),
|
|
1061
|
-
IconX:
|
|
1061
|
+
IconX: G([["path", {
|
|
1062
1062
|
d: "M18 6 6 18",
|
|
1063
1063
|
key: "1bl5f8"
|
|
1064
1064
|
}], ["path", {
|
|
@@ -1068,58 +1068,58 @@ var M = {
|
|
|
1068
1068
|
IconBasket: F,
|
|
1069
1069
|
IconCheck: z,
|
|
1070
1070
|
IconChevron: B,
|
|
1071
|
-
IconCross:
|
|
1072
|
-
IconEdit:
|
|
1073
|
-
IconErrorCircle:
|
|
1074
|
-
IconEye:
|
|
1075
|
-
IconEyeOff:
|
|
1076
|
-
IconInfo:
|
|
1077
|
-
IconInfoCircle:
|
|
1078
|
-
IconMinus:
|
|
1079
|
-
IconMoreVertical:
|
|
1080
|
-
IconList:
|
|
1081
|
-
IconPanelsTopLeft:
|
|
1082
|
-
IconPause:
|
|
1083
|
-
IconPaperclip:
|
|
1084
|
-
IconPlus:
|
|
1085
|
-
IconPlug:
|
|
1086
|
-
IconPictureInPicture:
|
|
1087
|
-
IconPlay:
|
|
1088
|
-
IconReplay:
|
|
1089
|
-
IconSettings:
|
|
1090
|
-
IconSend:
|
|
1091
|
-
IconSmile:
|
|
1092
|
-
IconFullscreen:
|
|
1093
|
-
IconFullscreenExit:
|
|
1094
|
-
IconCaptions:
|
|
1095
|
-
IconVolume:
|
|
1096
|
-
IconVolumeMuted:
|
|
1097
|
-
IconSort:
|
|
1098
|
-
IconSortAscending:
|
|
1099
|
-
IconSortDescending:
|
|
1100
|
-
IconSuccessCircle:
|
|
1101
|
-
IconUpload:
|
|
1102
|
-
IconWarning:
|
|
1103
|
-
IconTrash2:
|
|
1104
|
-
},
|
|
1105
|
-
let r =
|
|
1071
|
+
IconCross: te,
|
|
1072
|
+
IconEdit: H,
|
|
1073
|
+
IconErrorCircle: ne,
|
|
1074
|
+
IconEye: re,
|
|
1075
|
+
IconEyeOff: ie,
|
|
1076
|
+
IconInfo: ae,
|
|
1077
|
+
IconInfoCircle: oe,
|
|
1078
|
+
IconMinus: ce,
|
|
1079
|
+
IconMoreVertical: je,
|
|
1080
|
+
IconList: le,
|
|
1081
|
+
IconPanelsTopLeft: ue,
|
|
1082
|
+
IconPause: U,
|
|
1083
|
+
IconPaperclip: Oe,
|
|
1084
|
+
IconPlus: de,
|
|
1085
|
+
IconPlug: fe,
|
|
1086
|
+
IconPictureInPicture: pe,
|
|
1087
|
+
IconPlay: me,
|
|
1088
|
+
IconReplay: he,
|
|
1089
|
+
IconSettings: ge,
|
|
1090
|
+
IconSend: ke,
|
|
1091
|
+
IconSmile: Ae,
|
|
1092
|
+
IconFullscreen: _e,
|
|
1093
|
+
IconFullscreenExit: W,
|
|
1094
|
+
IconCaptions: ve,
|
|
1095
|
+
IconVolume: ye,
|
|
1096
|
+
IconVolumeMuted: be,
|
|
1097
|
+
IconSort: xe,
|
|
1098
|
+
IconSortAscending: Se,
|
|
1099
|
+
IconSortDescending: Ce,
|
|
1100
|
+
IconSuccessCircle: we,
|
|
1101
|
+
IconUpload: Te,
|
|
1102
|
+
IconWarning: Ee,
|
|
1103
|
+
IconTrash2: De
|
|
1104
|
+
}, Ne = Object.freeze(Object.keys(K)), q = ({ name: e, ...n }) => {
|
|
1105
|
+
let r = K[e];
|
|
1106
1106
|
return /* @__PURE__ */ t(r, { ...n });
|
|
1107
|
-
},
|
|
1107
|
+
}, Pe = {
|
|
1108
1108
|
wrapper: "_wrapper_1seon_1",
|
|
1109
1109
|
label: "_label_1seon_13",
|
|
1110
1110
|
input: "_input_1seon_35",
|
|
1111
1111
|
control: "_control_1seon_49",
|
|
1112
1112
|
disabled: "_disabled_1seon_95",
|
|
1113
1113
|
controlError: "_controlError_1seon_121"
|
|
1114
|
-
},
|
|
1114
|
+
}, Fe = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: l = "", name: u, id: p, indeterminate: m = !1, ariaLabel: g, ..._ }) => {
|
|
1115
1115
|
let v = f(), y = p ?? `ds-checkbox-${u ?? v}`, b = h(null), x = a ? `${y}-hint` : void 0, S = o ? `${y}-error` : void 0;
|
|
1116
1116
|
return d(() => {
|
|
1117
1117
|
b.current && (b.current.indeterminate = m && !e);
|
|
1118
1118
|
}, [e, m]), /* @__PURE__ */ n("div", {
|
|
1119
|
-
className: `${
|
|
1119
|
+
className: `${Pe.wrapper} ${l}`,
|
|
1120
1120
|
children: [
|
|
1121
1121
|
/* @__PURE__ */ n("label", {
|
|
1122
|
-
className: `${
|
|
1122
|
+
className: `${Pe.label} ${s ? Pe.disabled : ""}`,
|
|
1123
1123
|
htmlFor: y,
|
|
1124
1124
|
children: [
|
|
1125
1125
|
/* @__PURE__ */ t("input", {
|
|
@@ -1133,20 +1133,20 @@ var M = {
|
|
|
1133
1133
|
"aria-invalid": !!o,
|
|
1134
1134
|
"aria-describedby": [x, S].filter(Boolean).join(" ") || void 0,
|
|
1135
1135
|
"aria-label": g,
|
|
1136
|
-
className:
|
|
1136
|
+
className: Pe.input,
|
|
1137
1137
|
onChange: (e) => {
|
|
1138
1138
|
c || r?.(e.target.checked, e);
|
|
1139
1139
|
},
|
|
1140
1140
|
..._
|
|
1141
1141
|
}),
|
|
1142
1142
|
/* @__PURE__ */ n("span", {
|
|
1143
|
-
className: `${
|
|
1143
|
+
className: `${Pe.control} ${o ? Pe.controlError : ""}`,
|
|
1144
1144
|
"aria-hidden": "true",
|
|
1145
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1145
|
+
children: [m && !e && /* @__PURE__ */ t(q, {
|
|
1146
1146
|
name: "IconMinus",
|
|
1147
1147
|
width: 16,
|
|
1148
1148
|
height: 16
|
|
1149
|
-
}), e && /* @__PURE__ */ t(
|
|
1149
|
+
}), e && /* @__PURE__ */ t(q, {
|
|
1150
1150
|
name: "IconCheck",
|
|
1151
1151
|
width: 16,
|
|
1152
1152
|
height: 16
|
|
@@ -1166,7 +1166,7 @@ var M = {
|
|
|
1166
1166
|
})
|
|
1167
1167
|
]
|
|
1168
1168
|
});
|
|
1169
|
-
},
|
|
1169
|
+
}, J = {
|
|
1170
1170
|
wrapper: "_wrapper_su17c_1",
|
|
1171
1171
|
trigger: "_trigger_su17c_17",
|
|
1172
1172
|
sm: "_sm_su17c_53",
|
|
@@ -1197,7 +1197,7 @@ var M = {
|
|
|
1197
1197
|
timeLabel: "_timeLabel_su17c_533",
|
|
1198
1198
|
previousMonth: "_previousMonth_su17c_593",
|
|
1199
1199
|
nextMonth: "_nextMonth_su17c_601"
|
|
1200
|
-
},
|
|
1200
|
+
}, Ie = [
|
|
1201
1201
|
"Пн",
|
|
1202
1202
|
"Вт",
|
|
1203
1203
|
"Ср",
|
|
@@ -1205,7 +1205,7 @@ var M = {
|
|
|
1205
1205
|
"Пт",
|
|
1206
1206
|
"Сб",
|
|
1207
1207
|
"Вс"
|
|
1208
|
-
],
|
|
1208
|
+
], Le = [
|
|
1209
1209
|
"Январь",
|
|
1210
1210
|
"Февраль",
|
|
1211
1211
|
"Март",
|
|
@@ -1218,8 +1218,8 @@ var M = {
|
|
|
1218
1218
|
"Октябрь",
|
|
1219
1219
|
"Ноябрь",
|
|
1220
1220
|
"Декабрь"
|
|
1221
|
-
],
|
|
1222
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1221
|
+
], Y = (e) => String(e).padStart(2, "0"), Re = 8, ze = "Некорректная дата", Be = (e) => e ? `${Y(e.getDate())}.${Y(e.getMonth() + 1)}.${e.getFullYear()}` : "", X = (e) => {
|
|
1222
|
+
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1223
1223
|
return [
|
|
1224
1224
|
t.slice(0, 2),
|
|
1225
1225
|
t.slice(2, 4),
|
|
@@ -1242,7 +1242,7 @@ var M = {
|
|
|
1242
1242
|
return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
|
|
1243
1243
|
}, We = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Ge = (e, t) => {
|
|
1244
1244
|
if (!e) return "";
|
|
1245
|
-
let n = `${e.getFullYear()}-${
|
|
1245
|
+
let n = `${e.getFullYear()}-${Y(e.getMonth() + 1)}-${Y(e.getDate())}`, r = `${Y(e.getHours())}:${Y(e.getMinutes())}`;
|
|
1246
1246
|
return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
|
|
1247
1247
|
}, Ke = (e, t) => {
|
|
1248
1248
|
if (!e) return null;
|
|
@@ -1264,7 +1264,7 @@ var M = {
|
|
|
1264
1264
|
return Number.isNaN(n.getTime()) ? null : n;
|
|
1265
1265
|
}, qe = (e, t) => {
|
|
1266
1266
|
if (!e) return "";
|
|
1267
|
-
let n = `${
|
|
1267
|
+
let n = `${Y(e.getDate())}.${Y(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${Y(e.getHours())}:${Y(e.getMinutes())}`;
|
|
1268
1268
|
return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
|
|
1269
1269
|
}, Je = (e) => {
|
|
1270
1270
|
let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
|
|
@@ -1276,17 +1276,17 @@ var M = {
|
|
|
1276
1276
|
let r = We(e).getTime();
|
|
1277
1277
|
return !!(t && r < We(t).getTime() || n && r > We(n).getTime());
|
|
1278
1278
|
}, Ze = 8, Qe = 6, $e = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
|
|
1279
|
-
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), P = h(null), F = h(null), [I, L] = g(!1), [R, z] = g(r ?? /* @__PURE__ */ new Date()), [B,
|
|
1279
|
+
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), P = h(null), F = h(null), [I, L] = g(!1), [R, z] = g(r ?? /* @__PURE__ */ new Date()), [B, te] = g(Ge(r, "time")), [V, H] = g(Be(r)), [ne, re] = g(""), [ie, ae] = g(0), [oe, se] = g(null), ce = m(() => Je(R), [R]), le = a !== "time", ue = a !== "date";
|
|
1280
1280
|
d(() => {
|
|
1281
|
-
r && z(r),
|
|
1281
|
+
r && z(r), te(Ge(r, "time")), H(Be(r));
|
|
1282
1282
|
}, [r]), d(() => () => {
|
|
1283
1283
|
F.current && clearTimeout(F.current);
|
|
1284
1284
|
}, []);
|
|
1285
|
-
let
|
|
1285
|
+
let U = l(() => {
|
|
1286
1286
|
let e = M.current, t = P.current;
|
|
1287
1287
|
if (!e || !t) return;
|
|
1288
1288
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Ze, o = n.top - Ze, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(Ze, n.top - r.height - Qe) : n.bottom + Qe, u = n.left, d = i - r.width - Ze;
|
|
1289
|
-
|
|
1289
|
+
se({
|
|
1290
1290
|
top: l,
|
|
1291
1291
|
left: Math.max(Ze, Math.min(u, d)),
|
|
1292
1292
|
maxHeight: c
|
|
@@ -1294,15 +1294,15 @@ var M = {
|
|
|
1294
1294
|
}, []);
|
|
1295
1295
|
p(() => {
|
|
1296
1296
|
if (!I) {
|
|
1297
|
-
|
|
1297
|
+
se(null);
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
1300
|
-
return
|
|
1301
|
-
window.removeEventListener("resize",
|
|
1300
|
+
return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
1301
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
1302
1302
|
};
|
|
1303
1303
|
}, [
|
|
1304
1304
|
I,
|
|
1305
|
-
|
|
1305
|
+
U,
|
|
1306
1306
|
R,
|
|
1307
1307
|
B
|
|
1308
1308
|
]), d(() => {
|
|
@@ -1317,34 +1317,34 @@ var M = {
|
|
|
1317
1317
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1318
1318
|
};
|
|
1319
1319
|
}, [I]);
|
|
1320
|
-
let
|
|
1320
|
+
let de = (e) => {
|
|
1321
1321
|
if (Xe(e, x, S)) return;
|
|
1322
1322
|
let t = a === "date" ? Ke(Ge(e, "date"), "date") : new Date(e);
|
|
1323
|
-
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t),
|
|
1324
|
-
},
|
|
1325
|
-
|
|
1326
|
-
|
|
1323
|
+
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), H(Be(t)), a === "date" && L(!1));
|
|
1324
|
+
}, fe = () => {
|
|
1325
|
+
re(ze), ae((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
1326
|
+
re(""), F.current = null;
|
|
1327
1327
|
}, 3e3);
|
|
1328
|
-
},
|
|
1329
|
-
let t = e.replace(/\D/g, "").slice(0,
|
|
1328
|
+
}, pe = (e) => {
|
|
1329
|
+
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1330
1330
|
if (!He(t)) {
|
|
1331
|
-
|
|
1331
|
+
fe();
|
|
1332
1332
|
return;
|
|
1333
1333
|
}
|
|
1334
|
-
let n =
|
|
1335
|
-
if (
|
|
1334
|
+
let n = X(t);
|
|
1335
|
+
if (H(n), !t) {
|
|
1336
1336
|
i?.(null);
|
|
1337
1337
|
return;
|
|
1338
1338
|
}
|
|
1339
|
-
if (t.length <
|
|
1339
|
+
if (t.length < Re) return;
|
|
1340
1340
|
let o = Ue(n);
|
|
1341
1341
|
if (!o || Xe(o, x, S)) {
|
|
1342
|
-
|
|
1342
|
+
fe();
|
|
1343
1343
|
return;
|
|
1344
1344
|
}
|
|
1345
1345
|
a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), z(o), L(!1), requestAnimationFrame(() => M.current?.blur());
|
|
1346
|
-
},
|
|
1347
|
-
if (
|
|
1346
|
+
}, me = (e) => {
|
|
1347
|
+
if (te(e), !e) {
|
|
1348
1348
|
i?.(null);
|
|
1349
1349
|
return;
|
|
1350
1350
|
}
|
|
@@ -1352,52 +1352,52 @@ var M = {
|
|
|
1352
1352
|
if (!t) return;
|
|
1353
1353
|
let n = new Date(a === "datetime" ? r ?? R : /* @__PURE__ */ new Date());
|
|
1354
1354
|
n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
|
|
1355
|
-
},
|
|
1355
|
+
}, he = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), ge = ne ? `${O}-validation` : void 0, _e = [
|
|
1356
1356
|
k,
|
|
1357
1357
|
A,
|
|
1358
|
-
|
|
1359
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1358
|
+
ge
|
|
1359
|
+
].filter(Boolean).join(" ") || void 0, W = I && !y ? /* @__PURE__ */ n("div", {
|
|
1360
1360
|
ref: P,
|
|
1361
|
-
className:
|
|
1361
|
+
className: J.panel,
|
|
1362
1362
|
role: "dialog",
|
|
1363
|
-
"aria-label": o ??
|
|
1364
|
-
style:
|
|
1365
|
-
top:
|
|
1366
|
-
left:
|
|
1367
|
-
maxHeight:
|
|
1363
|
+
"aria-label": o ?? he,
|
|
1364
|
+
style: oe ? {
|
|
1365
|
+
top: oe.top,
|
|
1366
|
+
left: oe.left,
|
|
1367
|
+
maxHeight: oe.maxHeight
|
|
1368
1368
|
} : {
|
|
1369
1369
|
visibility: "hidden",
|
|
1370
1370
|
top: 0,
|
|
1371
1371
|
left: 0
|
|
1372
1372
|
},
|
|
1373
|
-
children: [
|
|
1373
|
+
children: [le && /* @__PURE__ */ n(e, { children: [
|
|
1374
1374
|
/* @__PURE__ */ n("div", {
|
|
1375
|
-
className:
|
|
1375
|
+
className: J.calendarHeader,
|
|
1376
1376
|
children: [
|
|
1377
1377
|
/* @__PURE__ */ t("button", {
|
|
1378
1378
|
type: "button",
|
|
1379
|
-
className:
|
|
1379
|
+
className: J.nav,
|
|
1380
1380
|
"aria-label": "Предыдущий месяц",
|
|
1381
1381
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() - 1, 1)),
|
|
1382
|
-
children: /* @__PURE__ */ t(
|
|
1382
|
+
children: /* @__PURE__ */ t(q, {
|
|
1383
1383
|
name: "IconChevron",
|
|
1384
1384
|
width: 20,
|
|
1385
1385
|
height: 20,
|
|
1386
|
-
className:
|
|
1386
|
+
className: J.previousMonth
|
|
1387
1387
|
})
|
|
1388
1388
|
}),
|
|
1389
1389
|
/* @__PURE__ */ t("select", {
|
|
1390
|
-
className:
|
|
1390
|
+
className: J.monthSelect,
|
|
1391
1391
|
"aria-label": "Месяц",
|
|
1392
1392
|
value: R.getMonth(),
|
|
1393
1393
|
onChange: (e) => z(new Date(R.getFullYear(), Number(e.target.value), 1)),
|
|
1394
|
-
children:
|
|
1394
|
+
children: Le.map((e, n) => /* @__PURE__ */ t("option", {
|
|
1395
1395
|
value: n,
|
|
1396
1396
|
children: e
|
|
1397
1397
|
}, e))
|
|
1398
1398
|
}),
|
|
1399
1399
|
/* @__PURE__ */ t("input", {
|
|
1400
|
-
className:
|
|
1400
|
+
className: J.yearInput,
|
|
1401
1401
|
type: "number",
|
|
1402
1402
|
"aria-label": "Год",
|
|
1403
1403
|
value: R.getFullYear(),
|
|
@@ -1405,49 +1405,49 @@ var M = {
|
|
|
1405
1405
|
}),
|
|
1406
1406
|
/* @__PURE__ */ t("button", {
|
|
1407
1407
|
type: "button",
|
|
1408
|
-
className:
|
|
1408
|
+
className: J.nav,
|
|
1409
1409
|
"aria-label": "Следующий месяц",
|
|
1410
1410
|
onClick: () => z(new Date(R.getFullYear(), R.getMonth() + 1, 1)),
|
|
1411
|
-
children: /* @__PURE__ */ t(
|
|
1411
|
+
children: /* @__PURE__ */ t(q, {
|
|
1412
1412
|
name: "IconChevron",
|
|
1413
1413
|
width: 20,
|
|
1414
1414
|
height: 20,
|
|
1415
|
-
className:
|
|
1415
|
+
className: J.nextMonth
|
|
1416
1416
|
})
|
|
1417
1417
|
})
|
|
1418
1418
|
]
|
|
1419
1419
|
}),
|
|
1420
1420
|
/* @__PURE__ */ t("div", {
|
|
1421
|
-
className:
|
|
1422
|
-
children:
|
|
1421
|
+
className: J.weekdays,
|
|
1422
|
+
children: Ie.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1423
1423
|
}),
|
|
1424
1424
|
/* @__PURE__ */ t("div", {
|
|
1425
|
-
className:
|
|
1426
|
-
children:
|
|
1425
|
+
className: J.days,
|
|
1426
|
+
children: ce.map((e) => {
|
|
1427
1427
|
let n = Ye(r, e);
|
|
1428
1428
|
return /* @__PURE__ */ t("button", {
|
|
1429
1429
|
type: "button",
|
|
1430
|
-
className: `${
|
|
1430
|
+
className: `${J.day} ${e.getMonth() === R.getMonth() ? "" : J.outside} ${n ? J.selected : ""}`,
|
|
1431
1431
|
disabled: Xe(e, x, S),
|
|
1432
1432
|
"aria-pressed": n,
|
|
1433
|
-
onClick: () =>
|
|
1433
|
+
onClick: () => de(e),
|
|
1434
1434
|
children: e.getDate()
|
|
1435
1435
|
}, e.toISOString());
|
|
1436
1436
|
})
|
|
1437
1437
|
})
|
|
1438
|
-
] }),
|
|
1439
|
-
className:
|
|
1438
|
+
] }), ue && /* @__PURE__ */ n("label", {
|
|
1439
|
+
className: J.timeLabel,
|
|
1440
1440
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1441
|
-
className:
|
|
1441
|
+
className: J.timeInput,
|
|
1442
1442
|
type: "time",
|
|
1443
1443
|
value: B,
|
|
1444
|
-
onChange: (e) =>
|
|
1444
|
+
onChange: (e) => me(e.target.value)
|
|
1445
1445
|
})]
|
|
1446
1446
|
})]
|
|
1447
1447
|
}) : null;
|
|
1448
1448
|
return /* @__PURE__ */ n("div", {
|
|
1449
1449
|
ref: j,
|
|
1450
|
-
className: `${
|
|
1450
|
+
className: `${J.wrapper} ${E}`,
|
|
1451
1451
|
children: [
|
|
1452
1452
|
o && /* @__PURE__ */ t(ee, {
|
|
1453
1453
|
htmlFor: O,
|
|
@@ -1455,16 +1455,16 @@ var M = {
|
|
|
1455
1455
|
disabled: v,
|
|
1456
1456
|
children: o
|
|
1457
1457
|
}),
|
|
1458
|
-
|
|
1459
|
-
className: `${
|
|
1458
|
+
le ? /* @__PURE__ */ n("div", {
|
|
1459
|
+
className: `${J.trigger} ${J[C]} ${u ? J.error : ""} ${v ? J.disabled : ""}`,
|
|
1460
1460
|
children: [
|
|
1461
1461
|
/* @__PURE__ */ t("input", {
|
|
1462
1462
|
ref: M,
|
|
1463
1463
|
id: O,
|
|
1464
1464
|
name: T,
|
|
1465
|
-
className:
|
|
1466
|
-
value:
|
|
1467
|
-
placeholder:
|
|
1465
|
+
className: J.dateInput,
|
|
1466
|
+
value: V,
|
|
1467
|
+
placeholder: he.split(" ")[0],
|
|
1468
1468
|
inputMode: "numeric",
|
|
1469
1469
|
autoComplete: "off",
|
|
1470
1470
|
maxLength: 10,
|
|
@@ -1472,23 +1472,23 @@ var M = {
|
|
|
1472
1472
|
readOnly: y,
|
|
1473
1473
|
"aria-expanded": I,
|
|
1474
1474
|
"aria-haspopup": "dialog",
|
|
1475
|
-
"aria-describedby":
|
|
1476
|
-
"aria-invalid": !!(u ||
|
|
1475
|
+
"aria-describedby": _e,
|
|
1476
|
+
"aria-invalid": !!(u || ne) || void 0,
|
|
1477
1477
|
onFocus: () => {
|
|
1478
1478
|
y || L(!0);
|
|
1479
1479
|
},
|
|
1480
1480
|
onClick: () => {
|
|
1481
1481
|
y || L(!0);
|
|
1482
1482
|
},
|
|
1483
|
-
onChange: (e) =>
|
|
1483
|
+
onChange: (e) => pe(e.target.value)
|
|
1484
1484
|
}),
|
|
1485
1485
|
a === "datetime" && B && /* @__PURE__ */ t("span", {
|
|
1486
|
-
className:
|
|
1486
|
+
className: J.timeValue,
|
|
1487
1487
|
children: B
|
|
1488
1488
|
}),
|
|
1489
1489
|
/* @__PURE__ */ t("button", {
|
|
1490
1490
|
type: "button",
|
|
1491
|
-
className:
|
|
1491
|
+
className: J.chevronButton,
|
|
1492
1492
|
disabled: v || y,
|
|
1493
1493
|
"aria-label": I ? "Закрыть календарь" : "Открыть календарь",
|
|
1494
1494
|
tabIndex: -1,
|
|
@@ -1497,9 +1497,9 @@ var M = {
|
|
|
1497
1497
|
L((e) => !e), M.current?.focus();
|
|
1498
1498
|
},
|
|
1499
1499
|
children: /* @__PURE__ */ t("span", {
|
|
1500
|
-
className: `${
|
|
1500
|
+
className: `${J.chevron} ${W ? J.chevronOpen : ""}`,
|
|
1501
1501
|
"aria-hidden": "true",
|
|
1502
|
-
children: /* @__PURE__ */ t(
|
|
1502
|
+
children: /* @__PURE__ */ t(q, {
|
|
1503
1503
|
name: "IconChevron",
|
|
1504
1504
|
width: 20,
|
|
1505
1505
|
height: 20
|
|
@@ -1512,36 +1512,36 @@ var M = {
|
|
|
1512
1512
|
id: O,
|
|
1513
1513
|
name: T,
|
|
1514
1514
|
type: "button",
|
|
1515
|
-
className: `${
|
|
1515
|
+
className: `${J.trigger} ${J[C]} ${u ? J.error : ""}`,
|
|
1516
1516
|
disabled: v,
|
|
1517
1517
|
"aria-readonly": y || void 0,
|
|
1518
1518
|
"aria-expanded": I,
|
|
1519
1519
|
"aria-haspopup": "dialog",
|
|
1520
|
-
"aria-describedby":
|
|
1520
|
+
"aria-describedby": _e,
|
|
1521
1521
|
onClick: () => {
|
|
1522
1522
|
y || L((e) => !e);
|
|
1523
1523
|
},
|
|
1524
1524
|
children: [/* @__PURE__ */ t("span", {
|
|
1525
|
-
className: r ?
|
|
1526
|
-
children: qe(r, a) ||
|
|
1525
|
+
className: r ? J.value : J.placeholder,
|
|
1526
|
+
children: qe(r, a) || he
|
|
1527
1527
|
}), /* @__PURE__ */ t("span", {
|
|
1528
|
-
className: `${
|
|
1528
|
+
className: `${J.chevron} ${W ? J.chevronOpen : ""}`,
|
|
1529
1529
|
"aria-hidden": "true",
|
|
1530
|
-
children: /* @__PURE__ */ t(
|
|
1530
|
+
children: /* @__PURE__ */ t(q, {
|
|
1531
1531
|
name: "IconChevron",
|
|
1532
1532
|
width: 20,
|
|
1533
1533
|
height: 20
|
|
1534
1534
|
})
|
|
1535
1535
|
})]
|
|
1536
1536
|
}),
|
|
1537
|
-
|
|
1538
|
-
id:
|
|
1539
|
-
className:
|
|
1537
|
+
ne && /* @__PURE__ */ t("span", {
|
|
1538
|
+
id: ge,
|
|
1539
|
+
className: J.validationTooltip,
|
|
1540
1540
|
role: "status",
|
|
1541
1541
|
"aria-live": "polite",
|
|
1542
|
-
children:
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1542
|
+
children: ne
|
|
1543
|
+
}, ie),
|
|
1544
|
+
W && _(W, document.body),
|
|
1545
1545
|
c && !u && /* @__PURE__ */ t(N, {
|
|
1546
1546
|
id: k,
|
|
1547
1547
|
children: c
|
|
@@ -1648,7 +1648,7 @@ var M = {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
return Infinity;
|
|
1650
1650
|
}, ut = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
|
|
1651
|
-
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0,
|
|
1651
|
+
let E = f(), D = C ?? `ds-dropdown-${S ?? E}`, O = `${D}-listbox`, [k, A] = g(!1), [j, M] = g(null), N = h(null), P = h(null), F = h(null), I = h([]), L = m(() => e.find((e) => e.value === r), [e, r]), R = y ? `${D}-hint` : void 0, z = u ? `${D}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, te = o && s, V = l(() => {
|
|
1652
1652
|
let e = P.current, t = F.current;
|
|
1653
1653
|
if (!e || !t) return;
|
|
1654
1654
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - at, o = n.top - at, s = a < r.height && o > a, c = Math.max(st, s ? o : a), l = lt(T), u = Math.min(c, l), d = n.left, f = i - n.width - at, p = Math.max(at, Math.min(d, f)), m = s ? Math.max(at, n.top - r.height - ot) : n.bottom + ot;
|
|
@@ -1664,12 +1664,12 @@ var M = {
|
|
|
1664
1664
|
M(null);
|
|
1665
1665
|
return;
|
|
1666
1666
|
}
|
|
1667
|
-
return
|
|
1668
|
-
window.removeEventListener("resize",
|
|
1667
|
+
return V(), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
|
|
1668
|
+
window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
|
|
1669
1669
|
};
|
|
1670
1670
|
}, [
|
|
1671
1671
|
k,
|
|
1672
|
-
|
|
1672
|
+
V,
|
|
1673
1673
|
e.length
|
|
1674
1674
|
]), d(() => {
|
|
1675
1675
|
if (!k) return;
|
|
@@ -1683,14 +1683,14 @@ var M = {
|
|
|
1683
1683
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1684
1684
|
};
|
|
1685
1685
|
}, [k]);
|
|
1686
|
-
let
|
|
1686
|
+
let H = (t, n) => {
|
|
1687
1687
|
let r = ct(e, t, n);
|
|
1688
1688
|
if (r === -1) return;
|
|
1689
1689
|
let i = I.current[r];
|
|
1690
1690
|
i?.focus(), i?.scrollIntoView({ block: "nearest" });
|
|
1691
|
-
},
|
|
1691
|
+
}, ne = (e) => {
|
|
1692
1692
|
e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
|
|
1693
|
-
},
|
|
1693
|
+
}, re = k ? /* @__PURE__ */ t("ul", {
|
|
1694
1694
|
ref: F,
|
|
1695
1695
|
id: O,
|
|
1696
1696
|
className: Z.menu,
|
|
@@ -1728,21 +1728,21 @@ var M = {
|
|
|
1728
1728
|
i.variant === "action" ? Z.actionOption : "",
|
|
1729
1729
|
o ? Z.selected : ""
|
|
1730
1730
|
].filter(Boolean).join(" "),
|
|
1731
|
-
onClick: () =>
|
|
1731
|
+
onClick: () => ne(i),
|
|
1732
1732
|
onKeyDown: (t) => {
|
|
1733
1733
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
1734
1734
|
t.preventDefault();
|
|
1735
1735
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
1736
|
-
|
|
1736
|
+
H(a + e, e);
|
|
1737
1737
|
}
|
|
1738
1738
|
if (t.key === "Tab" && A(!1), t.key === "Home" || t.key === "End") {
|
|
1739
1739
|
t.preventDefault();
|
|
1740
1740
|
let n = t.key === "Home" ? 1 : -1;
|
|
1741
|
-
|
|
1741
|
+
H(t.key === "Home" ? 0 : e.length - 1, n);
|
|
1742
1742
|
}
|
|
1743
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
1743
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne(i));
|
|
1744
1744
|
},
|
|
1745
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(
|
|
1745
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(q, {
|
|
1746
1746
|
name: "IconCheck",
|
|
1747
1747
|
width: 16,
|
|
1748
1748
|
height: 16
|
|
@@ -1762,12 +1762,12 @@ var M = {
|
|
|
1762
1762
|
c && /* @__PURE__ */ t(ee, {
|
|
1763
1763
|
required: x,
|
|
1764
1764
|
disabled: o,
|
|
1765
|
-
htmlFor:
|
|
1765
|
+
htmlFor: te ? void 0 : D,
|
|
1766
1766
|
children: c
|
|
1767
1767
|
}),
|
|
1768
1768
|
/* @__PURE__ */ t("div", {
|
|
1769
1769
|
className: Z.container,
|
|
1770
|
-
children:
|
|
1770
|
+
children: te ? /* @__PURE__ */ t("div", {
|
|
1771
1771
|
id: D,
|
|
1772
1772
|
className: Z.disabledText,
|
|
1773
1773
|
"aria-describedby": B,
|
|
@@ -1790,13 +1790,13 @@ var M = {
|
|
|
1790
1790
|
t.preventDefault(), A(!0);
|
|
1791
1791
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
1792
1792
|
requestAnimationFrame(() => {
|
|
1793
|
-
|
|
1793
|
+
H(t.key === "ArrowDown" ? 0 : e.length - 1, n);
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
if (t.key === "Enter" && k) {
|
|
1797
1797
|
t.preventDefault();
|
|
1798
1798
|
let n = e.findIndex((e) => e.value === r);
|
|
1799
|
-
|
|
1799
|
+
H(n >= 0 ? n : 0, 1);
|
|
1800
1800
|
}
|
|
1801
1801
|
},
|
|
1802
1802
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -1806,7 +1806,7 @@ var M = {
|
|
|
1806
1806
|
}), /* @__PURE__ */ t("span", {
|
|
1807
1807
|
className: [Z.chevron, k ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
1808
1808
|
"aria-hidden": "true",
|
|
1809
|
-
children: /* @__PURE__ */ t(
|
|
1809
|
+
children: /* @__PURE__ */ t(q, {
|
|
1810
1810
|
name: "IconChevron",
|
|
1811
1811
|
width: 20,
|
|
1812
1812
|
height: 20
|
|
@@ -1814,7 +1814,7 @@ var M = {
|
|
|
1814
1814
|
})]
|
|
1815
1815
|
})
|
|
1816
1816
|
}),
|
|
1817
|
-
k && _(
|
|
1817
|
+
k && _(re, document.body),
|
|
1818
1818
|
y && !u && /* @__PURE__ */ t("span", {
|
|
1819
1819
|
id: R,
|
|
1820
1820
|
className: Z.message,
|
|
@@ -1922,7 +1922,7 @@ var M = {
|
|
|
1922
1922
|
"aria-label": j ? w : T,
|
|
1923
1923
|
"aria-pressed": j,
|
|
1924
1924
|
onClick: () => M((e) => !e),
|
|
1925
|
-
children: /* @__PURE__ */ t(
|
|
1925
|
+
children: /* @__PURE__ */ t(q, {
|
|
1926
1926
|
name: j ? "IconEyeOff" : "IconEye",
|
|
1927
1927
|
width: 20,
|
|
1928
1928
|
height: 20
|
|
@@ -1936,7 +1936,7 @@ var M = {
|
|
|
1936
1936
|
let e = A.current;
|
|
1937
1937
|
e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
1938
1938
|
},
|
|
1939
|
-
children: /* @__PURE__ */ t(
|
|
1939
|
+
children: /* @__PURE__ */ t(q, {
|
|
1940
1940
|
name: "IconCross",
|
|
1941
1941
|
width: 20,
|
|
1942
1942
|
height: 20
|
|
@@ -1963,7 +1963,7 @@ var M = {
|
|
|
1963
1963
|
}
|
|
1964
1964
|
return Infinity;
|
|
1965
1965
|
}, yt = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: s = !1, label: c, error: u, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: w = !1, needMark: T = !0, maxMenuHeight: E }) => {
|
|
1966
|
-
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0,
|
|
1966
|
+
let D = f(), O = C ?? `ds-dropdown-multiple-${S ?? D}`, k = `${O}-listbox`, [A, j] = g(!1), [M, N] = g(null), P = h(null), F = h(null), I = h(null), L = h([]), R = m(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${O}-hint` : void 0, B = u ? `${O}-error` : void 0, te = [z, B].filter(Boolean).join(" ") || void 0, V = o && s, H = l(() => {
|
|
1967
1967
|
let e = F.current, t = I.current;
|
|
1968
1968
|
if (!e || !t) return;
|
|
1969
1969
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - ht, a = n.top - ht, o = i < r.height && a > i, s = Math.max(_t, o ? a : i), c = window.innerWidth - n.width - ht;
|
|
@@ -1979,13 +1979,13 @@ var M = {
|
|
|
1979
1979
|
N(null);
|
|
1980
1980
|
return;
|
|
1981
1981
|
}
|
|
1982
|
-
return
|
|
1983
|
-
window.removeEventListener("resize",
|
|
1982
|
+
return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
1983
|
+
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
1984
1984
|
};
|
|
1985
1985
|
}, [
|
|
1986
1986
|
A,
|
|
1987
1987
|
e.length,
|
|
1988
|
-
|
|
1988
|
+
H
|
|
1989
1989
|
]), d(() => {
|
|
1990
1990
|
if (!A) return;
|
|
1991
1991
|
let e = (e) => {
|
|
@@ -1998,14 +1998,14 @@ var M = {
|
|
|
1998
1998
|
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
1999
1999
|
};
|
|
2000
2000
|
}, [A]);
|
|
2001
|
-
let
|
|
2001
|
+
let ne = (t, n) => {
|
|
2002
2002
|
let r = ct(e, t, n);
|
|
2003
2003
|
r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
|
|
2004
|
-
},
|
|
2004
|
+
}, re = (t) => {
|
|
2005
2005
|
if (t.disabled) return;
|
|
2006
2006
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
2007
2007
|
i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
|
|
2008
|
-
},
|
|
2008
|
+
}, ie = A ? /* @__PURE__ */ t("ul", {
|
|
2009
2009
|
ref: I,
|
|
2010
2010
|
id: k,
|
|
2011
2011
|
className: Z.menu,
|
|
@@ -2044,21 +2044,21 @@ var M = {
|
|
|
2044
2044
|
i.variant === "action" ? Z.actionOption : "",
|
|
2045
2045
|
o ? Z.selected : ""
|
|
2046
2046
|
].filter(Boolean).join(" "),
|
|
2047
|
-
onClick: () =>
|
|
2047
|
+
onClick: () => re(i),
|
|
2048
2048
|
onKeyDown: (t) => {
|
|
2049
2049
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
2050
2050
|
t.preventDefault();
|
|
2051
2051
|
let e = t.key === "ArrowDown" ? 1 : -1;
|
|
2052
|
-
|
|
2052
|
+
ne(a + e, e);
|
|
2053
2053
|
}
|
|
2054
2054
|
if (t.key === "Home" || t.key === "End") {
|
|
2055
2055
|
t.preventDefault();
|
|
2056
2056
|
let n = t.key === "Home" ? 1 : -1;
|
|
2057
|
-
|
|
2057
|
+
ne(t.key === "Home" ? 0 : e.length - 1, n);
|
|
2058
2058
|
}
|
|
2059
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
2059
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), re(i)), t.key === "Tab" && j(!1);
|
|
2060
2060
|
},
|
|
2061
|
-
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(
|
|
2061
|
+
children: [/* @__PURE__ */ t("span", { children: i.label }), o && T && /* @__PURE__ */ t(q, {
|
|
2062
2062
|
name: "IconCheck",
|
|
2063
2063
|
width: 16,
|
|
2064
2064
|
height: 16
|
|
@@ -2076,17 +2076,17 @@ var M = {
|
|
|
2076
2076
|
].filter(Boolean).join(" "),
|
|
2077
2077
|
children: [
|
|
2078
2078
|
c && /* @__PURE__ */ t(ee, {
|
|
2079
|
-
htmlFor:
|
|
2079
|
+
htmlFor: V ? void 0 : O,
|
|
2080
2080
|
required: y,
|
|
2081
2081
|
disabled: o,
|
|
2082
2082
|
children: c
|
|
2083
2083
|
}),
|
|
2084
2084
|
/* @__PURE__ */ t("div", {
|
|
2085
2085
|
className: Z.container,
|
|
2086
|
-
children:
|
|
2086
|
+
children: V ? /* @__PURE__ */ t("div", {
|
|
2087
2087
|
id: O,
|
|
2088
2088
|
className: `${Z.disabledText} ${Z[v]}`,
|
|
2089
|
-
"aria-describedby":
|
|
2089
|
+
"aria-describedby": te,
|
|
2090
2090
|
children: R || a
|
|
2091
2091
|
}) : /* @__PURE__ */ n("button", {
|
|
2092
2092
|
ref: F,
|
|
@@ -2098,14 +2098,14 @@ var M = {
|
|
|
2098
2098
|
"aria-haspopup": "listbox",
|
|
2099
2099
|
"aria-expanded": A,
|
|
2100
2100
|
"aria-controls": k,
|
|
2101
|
-
"aria-describedby":
|
|
2101
|
+
"aria-describedby": te,
|
|
2102
2102
|
"aria-invalid": !!u,
|
|
2103
2103
|
onClick: () => j((e) => !e),
|
|
2104
2104
|
onKeyDown: (t) => {
|
|
2105
2105
|
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
2106
2106
|
t.preventDefault(), j(!0);
|
|
2107
2107
|
let n = t.key === "ArrowDown" ? 1 : -1;
|
|
2108
|
-
requestAnimationFrame(() =>
|
|
2108
|
+
requestAnimationFrame(() => ne(t.key === "ArrowDown" ? 0 : e.length - 1, n));
|
|
2109
2109
|
}
|
|
2110
2110
|
},
|
|
2111
2111
|
children: [/* @__PURE__ */ t("span", {
|
|
@@ -2114,7 +2114,7 @@ var M = {
|
|
|
2114
2114
|
}), /* @__PURE__ */ t("span", {
|
|
2115
2115
|
className: [Z.chevron, A ? Z.chevronOpen : ""].filter(Boolean).join(" "),
|
|
2116
2116
|
"aria-hidden": "true",
|
|
2117
|
-
children: /* @__PURE__ */ t(
|
|
2117
|
+
children: /* @__PURE__ */ t(q, {
|
|
2118
2118
|
name: "IconChevron",
|
|
2119
2119
|
width: 20,
|
|
2120
2120
|
height: 20
|
|
@@ -2122,7 +2122,7 @@ var M = {
|
|
|
2122
2122
|
})]
|
|
2123
2123
|
})
|
|
2124
2124
|
}),
|
|
2125
|
-
A && _(
|
|
2125
|
+
A && _(ie, document.body),
|
|
2126
2126
|
b && !u && /* @__PURE__ */ t("span", {
|
|
2127
2127
|
id: z,
|
|
2128
2128
|
className: Z.message,
|
|
@@ -2240,11 +2240,14 @@ var M = {
|
|
|
2240
2240
|
30,
|
|
2241
2241
|
50,
|
|
2242
2242
|
-1
|
|
2243
|
-
];
|
|
2244
|
-
function
|
|
2243
|
+
], wt = 30;
|
|
2244
|
+
function Tt(e, t) {
|
|
2245
2245
|
return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
|
|
2246
2246
|
}
|
|
2247
|
-
|
|
2247
|
+
function Et(e) {
|
|
2248
|
+
return e === void 0 || !Number.isFinite(e) || e <= 0 ? wt : Math.max(1, Math.floor(e));
|
|
2249
|
+
}
|
|
2250
|
+
var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2248
2251
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2249
2252
|
return d(() => {
|
|
2250
2253
|
if (o === void 0) return;
|
|
@@ -2287,20 +2290,20 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2287
2290
|
error: a,
|
|
2288
2291
|
onChange: (e) => r(e)
|
|
2289
2292
|
});
|
|
2290
|
-
},
|
|
2293
|
+
}, Ot = (e, t, n) => {
|
|
2291
2294
|
let r = new Set(e);
|
|
2292
2295
|
return t.forEach((e) => {
|
|
2293
2296
|
n ? r.add(e) : r.delete(e);
|
|
2294
2297
|
}), Array.from(r);
|
|
2295
|
-
},
|
|
2298
|
+
}, kt = (e) => {
|
|
2296
2299
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2297
2300
|
width: e.width,
|
|
2298
2301
|
minWidth: e.minWidth,
|
|
2299
2302
|
maxWidth: e.maxWidth
|
|
2300
2303
|
};
|
|
2301
|
-
},
|
|
2304
|
+
}, At = (e) => {
|
|
2302
2305
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2303
|
-
},
|
|
2306
|
+
}, jt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2304
2307
|
0,
|
|
2305
2308
|
1,
|
|
2306
2309
|
2,
|
|
@@ -2324,7 +2327,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2324
2327
|
e + 1,
|
|
2325
2328
|
"ellipsis-end",
|
|
2326
2329
|
t - 1
|
|
2327
|
-
],
|
|
2330
|
+
], Mt = (e, t) => {
|
|
2328
2331
|
let n = /* @__PURE__ */ new Set();
|
|
2329
2332
|
for (let t of e) {
|
|
2330
2333
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2336,36 +2339,36 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2336
2339
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2337
2340
|
}
|
|
2338
2341
|
return null;
|
|
2339
|
-
},
|
|
2342
|
+
}, Nt = (e, t) => typeof e == "function" ? e(t) : t[e], Pt = (e) => {
|
|
2340
2343
|
if (e == null || e === "") return null;
|
|
2341
2344
|
let t = Date.parse(String(e));
|
|
2342
2345
|
return Number.isNaN(t) ? null : t;
|
|
2343
|
-
},
|
|
2344
|
-
let r =
|
|
2346
|
+
}, Ft = (e, t, n) => {
|
|
2347
|
+
let r = Pt(e.getValue(n)), i = Pt(t.getValue(n));
|
|
2345
2348
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2346
|
-
},
|
|
2349
|
+
}, It = (e, t, n) => {
|
|
2347
2350
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2348
2351
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2349
|
-
},
|
|
2352
|
+
}, Lt = (e, t, n) => {
|
|
2350
2353
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2351
2354
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2352
|
-
},
|
|
2355
|
+
}, Rt = (e, t, n) => {
|
|
2353
2356
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2354
2357
|
return r.localeCompare(i, void 0, {
|
|
2355
2358
|
numeric: !0,
|
|
2356
2359
|
sensitivity: "base"
|
|
2357
2360
|
});
|
|
2358
|
-
},
|
|
2361
|
+
}, zt = (e) => {
|
|
2359
2362
|
switch (e) {
|
|
2360
|
-
case "date": return
|
|
2361
|
-
case "number": return
|
|
2362
|
-
case "boolean": return
|
|
2363
|
+
case "date": return Ft;
|
|
2364
|
+
case "number": return It;
|
|
2365
|
+
case "boolean": return Lt;
|
|
2363
2366
|
case "text":
|
|
2364
|
-
case void 0: return
|
|
2367
|
+
case void 0: return Rt;
|
|
2365
2368
|
case "custom": return;
|
|
2366
2369
|
}
|
|
2367
|
-
},
|
|
2368
|
-
let t = (t) =>
|
|
2370
|
+
}, Bt = (e) => {
|
|
2371
|
+
let t = (t) => Nt(e.accessor, t), n = e.sortFn ?? zt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2369
2372
|
id: e.id,
|
|
2370
2373
|
accessorFn: t,
|
|
2371
2374
|
header: () => e.header,
|
|
@@ -2377,40 +2380,84 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2377
2380
|
sortDescFirst: e.sortDescFirst
|
|
2378
2381
|
};
|
|
2379
2382
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2380
|
-
},
|
|
2381
|
-
let [
|
|
2382
|
-
if (
|
|
2383
|
-
let
|
|
2384
|
-
return
|
|
2385
|
-
}, [
|
|
2383
|
+
}, Vt = ({ columns: i, data: a, virtualizationThreshold: o = wt, tableOnMobile: s = !1, mobileView: c, breakpoint: u = "default", sorting: f, onSortingChange: p, renderMobileCard: _, getRowId: v, getRowClassName: y, getRowStyle: b, toolbarContent: S, totalCountVariant: C = "default", totalCountLabel: w = "Всего", caption: T, ariaLabel: E, loading: D = !1, error: O, emptyState: k = "Нет данных", stickyHeader: A = !1, maxHeight: M, className: ee = "", onRowClick: N, selectable: P = !1, selectedRowIds: F, onSelectedRowIdsChange: I, onRowDoubleClick: L, getRowSelectionLabel: R, selectAllRowsLabel: z = "Выбрать все строки на этой странице", resetSelectionLabel: B = "Сбросить выбор", openRowLabel: te = "Открыть строку", pagination: V = !1, paginationMode: H = "client", page: ne = 1, pageSize: re = 30, onPageSizeChange: ie, pageSizeOptions: ae = Ct, pageSizeDraft: oe, onPageSizeDraftChange: se, pageSizeApplyMode: ce = "table", totalCount: le, onPageChange: ue, visibleColumnIds: U, density: de = "comfortable", renderBulkActions: fe, renderExpandedRow: pe, expandedRowIds: me, onExpandedRowIdsChange: he, getRowExpansionLabel: ge, resultsAnnouncement: _e, filterBar: W }) => {
|
|
2384
|
+
let [ve, ye] = g([]), [be, xe] = g([]), [Se, Ce] = g([]), [we, Te] = g(0), [Ee, De] = g(() => Tt(re, ae)), Oe = Et(o), ke = f ?? ve, Ae = ke.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), je = re === -1, Me = je ? Math.max(1, (H === "server" ? Number(le) : a.length) || a.length || 1) : Number.isFinite(re) && re > 0 ? Math.floor(re) : 30, G = V && H === "server", K = m(() => {
|
|
2385
|
+
if (U === void 0) return i;
|
|
2386
|
+
let e = new Set(U);
|
|
2387
|
+
return i.filter((t) => e.has(t.id));
|
|
2388
|
+
}, [i, U]), Ne = m(() => K.length === 0 ? "Должна быть видима хотя бы одна колонка" : Mt(K, a), [a, K]), Pe = m(() => K.map(Bt), [K]), J = K.some((e) => kt(e) !== void 0), Ie = x({
|
|
2386
2389
|
features: St,
|
|
2387
|
-
columns:
|
|
2388
|
-
data:
|
|
2389
|
-
state: { sorting:
|
|
2390
|
+
columns: Pe,
|
|
2391
|
+
data: a,
|
|
2392
|
+
state: { sorting: ke },
|
|
2390
2393
|
onSortingChange: (e) => {
|
|
2391
|
-
let t = typeof e == "function" ? e(
|
|
2392
|
-
|
|
2394
|
+
let t = typeof e == "function" ? e(ke) : e;
|
|
2395
|
+
f === void 0 && ye(t), Te(0), p?.(t);
|
|
2393
2396
|
},
|
|
2394
|
-
getRowId:
|
|
2395
|
-
}),
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
]),
|
|
2397
|
+
getRowId: v
|
|
2398
|
+
}), Le = Ie.getRowModel().rows, Y = G && Number.isFinite(le) && Number(le) >= 0 ? Math.floor(Number(le)) : Le.length, Re = V ? Math.max(1, Math.ceil(Y / Me)) : 1, ze = Number.isFinite(ne) && ne > 0 ? Math.floor(ne) - 1 : 0, Be = Math.min(G ? ze : we, Re - 1), X = m(() => V && !G ? Le.slice(Be * Me, (Be + 1) * Me) : Le, [
|
|
2399
|
+
G,
|
|
2400
|
+
Me,
|
|
2401
|
+
V,
|
|
2402
|
+
Be,
|
|
2403
|
+
Le
|
|
2404
|
+
]), Ve = !D && !Ne && X.length > Oe, [He, Ue] = g(Ve ? Oe : X.length);
|
|
2405
|
+
d(() => {
|
|
2406
|
+
Ue(Ve ? Math.min(Oe, X.length) : X.length);
|
|
2407
|
+
}, [
|
|
2408
|
+
a,
|
|
2409
|
+
Ae,
|
|
2410
|
+
Be,
|
|
2411
|
+
Me,
|
|
2412
|
+
V,
|
|
2413
|
+
G,
|
|
2414
|
+
Oe,
|
|
2415
|
+
Ve,
|
|
2416
|
+
X.length
|
|
2417
|
+
]);
|
|
2418
|
+
let We = l(() => {
|
|
2419
|
+
Ve && Ue((e) => e >= X.length ? e : Math.min(e + Oe, X.length));
|
|
2420
|
+
}, [
|
|
2421
|
+
Oe,
|
|
2422
|
+
X.length,
|
|
2423
|
+
Ve
|
|
2424
|
+
]), Ge = h(null), Ke = h(null), qe = h(null);
|
|
2425
|
+
d(() => {
|
|
2426
|
+
if (!Ve) return;
|
|
2427
|
+
let e = Ke.current, t = qe.current;
|
|
2428
|
+
if (!e && !t) return;
|
|
2429
|
+
let n = Ge.current, r = new IntersectionObserver((e) => {
|
|
2430
|
+
e.some((e) => e.isIntersecting) && We();
|
|
2431
|
+
}, {
|
|
2432
|
+
root: n,
|
|
2433
|
+
rootMargin: "0px 0px 200px 0px",
|
|
2434
|
+
threshold: 0
|
|
2435
|
+
});
|
|
2436
|
+
return e && r.observe(e), t && r.observe(t), () => {
|
|
2437
|
+
r.disconnect();
|
|
2438
|
+
};
|
|
2439
|
+
}, [
|
|
2440
|
+
We,
|
|
2441
|
+
He,
|
|
2442
|
+
Ve
|
|
2443
|
+
]);
|
|
2444
|
+
let Je = m(() => Ve ? X.slice(0, Math.min(He, X.length)) : X, [
|
|
2445
|
+
He,
|
|
2446
|
+
X,
|
|
2447
|
+
Ve
|
|
2448
|
+
]), Ye = Ve && He < X.length, Xe = F ?? be, Ze = m(() => new Set(Xe), [Xe]), Qe = me ?? Se, $e = m(() => new Set(Qe), [Qe]), et = m(() => X.map((e) => e.id), [X]), tt = et.filter((e) => Ze.has(e)).length, nt = et.length > 0 && tt === et.length, rt = tt > 0 && !nt, Z = m(() => K.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2402
2449
|
id: e.id,
|
|
2403
2450
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2404
|
-
})), [
|
|
2451
|
+
})), [K]), at = m(() => jt(Be, Re), [Re, Be]), ot = c === void 0 ? s : c === "table", st = [
|
|
2405
2452
|
Q.root,
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
].filter(Boolean).join(" "),
|
|
2411
|
-
|
|
2412
|
-
},
|
|
2413
|
-
let i =
|
|
2453
|
+
u === "wide" ? Q.wide : Q.default,
|
|
2454
|
+
ot ? Q.tableOnMobile : "",
|
|
2455
|
+
de === "compact" ? Q.compact : "",
|
|
2456
|
+
ee
|
|
2457
|
+
].filter(Boolean).join(" "), ct = Ne ?? O, lt = V && !je && !ct && Y > Me && (!D || G), ut = V && !!(ie || se || W), dt = oe ?? Ee, pt = W ? (typeof W.validation == "function" ? W.validation(W.draftValues) : W.validation) ?? {} : {}, mt = W ? JSON.stringify(W.draftValues) !== JSON.stringify(W.appliedValues) || dt !== re : !1, ht = Object.values(pt).some(Boolean), gt = Y === 0 ? 0 : Be * Me + 1, _t = Math.min((Be + 1) * Me, Y), vt = () => {
|
|
2458
|
+
dt !== re && (Te(0), ue?.(1), ie?.(dt));
|
|
2459
|
+
}, yt = (e, r = !1) => {
|
|
2460
|
+
let i = dt !== re, a = `ds-data-table-page-size-warning-${e}`;
|
|
2414
2461
|
return /* @__PURE__ */ n("div", {
|
|
2415
2462
|
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2416
2463
|
children: [
|
|
@@ -2418,24 +2465,24 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2418
2465
|
className: Q.pageSizeMain,
|
|
2419
2466
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2420
2467
|
className: Q.pageSizeFieldset,
|
|
2421
|
-
disabled:
|
|
2468
|
+
disabled: D || W?.applying,
|
|
2422
2469
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2423
2470
|
className: Q.pageSizeOptions,
|
|
2424
|
-
children:
|
|
2471
|
+
children: ae.map((e) => /* @__PURE__ */ t("button", {
|
|
2425
2472
|
type: "button",
|
|
2426
|
-
className: `${Q.pageSizeOption} ${
|
|
2427
|
-
"aria-pressed":
|
|
2473
|
+
className: `${Q.pageSizeOption} ${dt === e ? Q.pageSizeOptionActive : ""}`,
|
|
2474
|
+
"aria-pressed": dt === e,
|
|
2428
2475
|
onClick: () => {
|
|
2429
|
-
|
|
2476
|
+
oe === void 0 && De(e), se?.(e);
|
|
2430
2477
|
},
|
|
2431
2478
|
children: e === -1 ? "Все" : e
|
|
2432
2479
|
}, e))
|
|
2433
2480
|
})]
|
|
2434
|
-
}),
|
|
2481
|
+
}), ce === "table" && !W && /* @__PURE__ */ t(j, {
|
|
2435
2482
|
size: "sm",
|
|
2436
|
-
disabled:
|
|
2437
|
-
"aria-describedby":
|
|
2438
|
-
onClick:
|
|
2483
|
+
disabled: D || !i,
|
|
2484
|
+
"aria-describedby": dt === -1 && i && e === "top" ? a : void 0,
|
|
2485
|
+
onClick: vt,
|
|
2439
2486
|
children: "Применить"
|
|
2440
2487
|
})]
|
|
2441
2488
|
}),
|
|
@@ -2443,185 +2490,189 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2443
2490
|
className: Q.paginationRange,
|
|
2444
2491
|
children: [
|
|
2445
2492
|
"Показано ",
|
|
2446
|
-
|
|
2493
|
+
gt,
|
|
2447
2494
|
"–",
|
|
2448
|
-
|
|
2449
|
-
" из
|
|
2450
|
-
|
|
2495
|
+
_t,
|
|
2496
|
+
" из",
|
|
2497
|
+
" ",
|
|
2498
|
+
Y
|
|
2451
2499
|
]
|
|
2452
2500
|
}),
|
|
2453
|
-
|
|
2501
|
+
mt && e === "top" && /* @__PURE__ */ t("span", {
|
|
2454
2502
|
className: Q.pendingChanges,
|
|
2455
2503
|
role: "status",
|
|
2456
2504
|
children: "Есть неприменённые изменения"
|
|
2457
2505
|
}),
|
|
2458
|
-
|
|
2506
|
+
G && dt === -1 && i && /* @__PURE__ */ n("span", {
|
|
2459
2507
|
id: a,
|
|
2460
2508
|
className: Q.pageSizeWarning,
|
|
2461
2509
|
"aria-hidden": e === "bottom" || void 0,
|
|
2462
2510
|
children: [
|
|
2463
|
-
"Будут загружены все
|
|
2464
|
-
|
|
2465
|
-
|
|
2511
|
+
"Будут загружены все",
|
|
2512
|
+
" ",
|
|
2513
|
+
Y,
|
|
2514
|
+
" ",
|
|
2515
|
+
"записей"
|
|
2466
2516
|
]
|
|
2467
2517
|
})
|
|
2468
2518
|
]
|
|
2469
2519
|
});
|
|
2470
|
-
},
|
|
2471
|
-
let t = Math.max(0, Math.min(
|
|
2472
|
-
if (
|
|
2473
|
-
t !==
|
|
2520
|
+
}, bt = (e) => {
|
|
2521
|
+
let t = Math.max(0, Math.min(Re - 1, e));
|
|
2522
|
+
if (G) {
|
|
2523
|
+
t !== Be && ue?.(t + 1);
|
|
2474
2524
|
return;
|
|
2475
2525
|
}
|
|
2476
|
-
|
|
2477
|
-
},
|
|
2526
|
+
Te(t);
|
|
2527
|
+
}, xt = (e) => {
|
|
2478
2528
|
let t = Array.from(e);
|
|
2479
|
-
|
|
2480
|
-
},
|
|
2481
|
-
let t = new Set(
|
|
2482
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
2483
|
-
},
|
|
2484
|
-
let e =
|
|
2485
|
-
|
|
2486
|
-
},
|
|
2487
|
-
let t = new Set(
|
|
2529
|
+
F === void 0 && xe(t), I?.(t);
|
|
2530
|
+
}, Pt = (e) => {
|
|
2531
|
+
let t = new Set(Ze);
|
|
2532
|
+
t.has(e) ? t.delete(e) : t.add(e), xt(t);
|
|
2533
|
+
}, Ft = () => {
|
|
2534
|
+
let e = Ot(Ze, et, !nt);
|
|
2535
|
+
F === void 0 && xe(e), I?.(e);
|
|
2536
|
+
}, It = () => xt(/* @__PURE__ */ new Set()), Lt = (e) => {
|
|
2537
|
+
let t = new Set($e);
|
|
2488
2538
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2489
2539
|
let n = Array.from(t);
|
|
2490
|
-
|
|
2491
|
-
},
|
|
2492
|
-
visibleCount:
|
|
2493
|
-
totalCount:
|
|
2494
|
-
selectedCount:
|
|
2495
|
-
}) ?? `Показано строк: ${
|
|
2540
|
+
me === void 0 && Ce(n), he?.(n);
|
|
2541
|
+
}, Rt = a.filter((e, t) => Ze.has(v?.(e, t) ?? String(t))), zt = _e?.({
|
|
2542
|
+
visibleCount: X.length,
|
|
2543
|
+
totalCount: Y,
|
|
2544
|
+
selectedCount: Ze.size
|
|
2545
|
+
}) ?? `Показано строк: ${X.length} из ${Y}. Выбрано: ${Ze.size}.`;
|
|
2496
2546
|
return d(() => {
|
|
2497
|
-
|
|
2547
|
+
G || Te(0);
|
|
2498
2548
|
}, [
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2549
|
+
a,
|
|
2550
|
+
G,
|
|
2551
|
+
Me,
|
|
2552
|
+
V,
|
|
2553
|
+
Ae
|
|
2504
2554
|
]), d(() => {
|
|
2505
|
-
!
|
|
2555
|
+
!G && we >= Re && Te(Re - 1);
|
|
2506
2556
|
}, [
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2557
|
+
G,
|
|
2558
|
+
Re,
|
|
2559
|
+
we
|
|
2510
2560
|
]), d(() => {
|
|
2511
|
-
|
|
2512
|
-
}, [
|
|
2513
|
-
className:
|
|
2514
|
-
"aria-busy":
|
|
2561
|
+
De(Tt(re, ae));
|
|
2562
|
+
}, [re, ae]), /* @__PURE__ */ n("section", {
|
|
2563
|
+
className: st,
|
|
2564
|
+
"aria-busy": D,
|
|
2515
2565
|
children: [
|
|
2516
2566
|
/* @__PURE__ */ t("div", {
|
|
2517
2567
|
className: Q.srOnly,
|
|
2518
2568
|
"aria-live": "polite",
|
|
2519
2569
|
"aria-atomic": "true",
|
|
2520
|
-
children:
|
|
2570
|
+
children: zt
|
|
2521
2571
|
}),
|
|
2522
|
-
|
|
2572
|
+
fe && Ze.size > 0 && /* @__PURE__ */ t("div", {
|
|
2523
2573
|
className: Q.bulkActions,
|
|
2524
2574
|
role: "region",
|
|
2525
2575
|
"aria-label": "Действия с выбранными строками",
|
|
2526
|
-
children:
|
|
2527
|
-
selectedRowIds: Array.from(
|
|
2528
|
-
selectedRows:
|
|
2529
|
-
clearSelection:
|
|
2576
|
+
children: fe({
|
|
2577
|
+
selectedRowIds: Array.from(Ze),
|
|
2578
|
+
selectedRows: Rt,
|
|
2579
|
+
clearSelection: It
|
|
2530
2580
|
})
|
|
2531
2581
|
}),
|
|
2532
|
-
|
|
2582
|
+
W && /* @__PURE__ */ n("form", {
|
|
2533
2583
|
className: Q.filterBar,
|
|
2534
2584
|
role: "search",
|
|
2535
2585
|
"aria-label": "Фильтры таблицы",
|
|
2536
2586
|
onSubmit: (e) => {
|
|
2537
|
-
e.preventDefault(), !(
|
|
2538
|
-
filters:
|
|
2539
|
-
pageSize:
|
|
2587
|
+
e.preventDefault(), !(!mt || ht || W.applying || D) && (Te(0), ue?.(1), W.onApply({
|
|
2588
|
+
filters: W.draftValues,
|
|
2589
|
+
pageSize: dt
|
|
2540
2590
|
}));
|
|
2541
2591
|
},
|
|
2542
2592
|
children: [
|
|
2543
2593
|
/* @__PURE__ */ t("div", {
|
|
2544
2594
|
className: Q.filterFields,
|
|
2545
|
-
children:
|
|
2595
|
+
children: W.fields.map((e) => /* @__PURE__ */ t(Dt, {
|
|
2546
2596
|
field: e,
|
|
2547
|
-
value:
|
|
2548
|
-
disabled: !!(e.disabled ||
|
|
2549
|
-
error:
|
|
2550
|
-
setValue: (t) =>
|
|
2551
|
-
...
|
|
2597
|
+
value: W.draftValues[e.key],
|
|
2598
|
+
disabled: !!(e.disabled || W.applying || D),
|
|
2599
|
+
error: pt[e.key],
|
|
2600
|
+
setValue: (t) => W.onDraftValuesChange({
|
|
2601
|
+
...W.draftValues,
|
|
2552
2602
|
[e.key]: t
|
|
2553
2603
|
})
|
|
2554
2604
|
}, e.key))
|
|
2555
2605
|
}),
|
|
2556
|
-
|
|
2606
|
+
ut && yt("top", !0),
|
|
2557
2607
|
/* @__PURE__ */ n("div", {
|
|
2558
2608
|
className: Q.filterActions,
|
|
2559
2609
|
children: [/* @__PURE__ */ t(j, {
|
|
2560
2610
|
variant: "empty",
|
|
2561
|
-
disabled:
|
|
2611
|
+
disabled: W.applying || D,
|
|
2562
2612
|
onClick: () => {
|
|
2563
|
-
let e =
|
|
2564
|
-
|
|
2565
|
-
let t =
|
|
2566
|
-
|
|
2613
|
+
let e = W.resetValues ?? W.appliedValues;
|
|
2614
|
+
W.onDraftValuesChange(e);
|
|
2615
|
+
let t = W.resetPageSize ?? ae[0] ?? 30;
|
|
2616
|
+
oe === void 0 && De(t), se?.(t), W.onReset?.({
|
|
2567
2617
|
filters: e,
|
|
2568
2618
|
pageSize: t
|
|
2569
2619
|
});
|
|
2570
2620
|
},
|
|
2571
|
-
children:
|
|
2621
|
+
children: W.resetLabel ?? "Сбросить"
|
|
2572
2622
|
}), /* @__PURE__ */ t(j, {
|
|
2573
2623
|
type: "submit",
|
|
2574
|
-
isLoading:
|
|
2575
|
-
disabled:
|
|
2576
|
-
children:
|
|
2624
|
+
isLoading: W.applying,
|
|
2625
|
+
disabled: !mt || ht || D,
|
|
2626
|
+
children: W.applyLabel ?? "Применить"
|
|
2577
2627
|
})]
|
|
2578
2628
|
})
|
|
2579
2629
|
]
|
|
2580
2630
|
}),
|
|
2581
|
-
|
|
2582
|
-
(
|
|
2631
|
+
ut && !W && yt("top"),
|
|
2632
|
+
(C === "highlighted" || S != null) && /* @__PURE__ */ n("div", {
|
|
2583
2633
|
className: Q.toolbar,
|
|
2584
|
-
children: [
|
|
2634
|
+
children: [C === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2585
2635
|
className: Q.totalWidget,
|
|
2586
|
-
"aria-label": `${
|
|
2636
|
+
"aria-label": `${w}: ${Y}`,
|
|
2587
2637
|
children: [/* @__PURE__ */ t("span", {
|
|
2588
2638
|
className: Q.totalLabel,
|
|
2589
|
-
children:
|
|
2639
|
+
children: w
|
|
2590
2640
|
}), /* @__PURE__ */ t("strong", {
|
|
2591
2641
|
className: Q.totalValue,
|
|
2592
|
-
children:
|
|
2642
|
+
children: Y
|
|
2593
2643
|
})]
|
|
2594
|
-
}),
|
|
2644
|
+
}), S]
|
|
2595
2645
|
}),
|
|
2596
|
-
!
|
|
2646
|
+
!ot && !D && !ct && X.length > 0 && Z.length > 0 && /* @__PURE__ */ t(ft, {
|
|
2597
2647
|
className: Q.mobileSort,
|
|
2598
|
-
options:
|
|
2599
|
-
value:
|
|
2600
|
-
id:
|
|
2601
|
-
direction:
|
|
2648
|
+
options: Z,
|
|
2649
|
+
value: ke[0] ? {
|
|
2650
|
+
id: ke[0].id,
|
|
2651
|
+
direction: ke[0].desc ? "desc" : "asc"
|
|
2602
2652
|
} : null,
|
|
2603
|
-
onChange: (e) =>
|
|
2653
|
+
onChange: (e) => Ie.setSorting([{
|
|
2604
2654
|
id: e.id,
|
|
2605
2655
|
desc: e.direction === "desc"
|
|
2606
2656
|
}])
|
|
2607
2657
|
}),
|
|
2608
2658
|
/* @__PURE__ */ t("div", {
|
|
2659
|
+
ref: Ge,
|
|
2609
2660
|
className: Q.tableWrap,
|
|
2610
|
-
style: { maxHeight:
|
|
2661
|
+
style: { maxHeight: M },
|
|
2611
2662
|
children: /* @__PURE__ */ n("table", {
|
|
2612
2663
|
className: Q.table,
|
|
2613
|
-
"aria-label":
|
|
2664
|
+
"aria-label": E,
|
|
2614
2665
|
children: [
|
|
2615
|
-
|
|
2616
|
-
(
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2666
|
+
T && /* @__PURE__ */ t("caption", { children: T }),
|
|
2667
|
+
(J || P || !!pe) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2668
|
+
pe && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2669
|
+
P && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2670
|
+
K.map((e) => /* @__PURE__ */ t("col", { style: kt(e) }, e.id))
|
|
2620
2671
|
] }),
|
|
2621
2672
|
/* @__PURE__ */ t("thead", {
|
|
2622
|
-
className:
|
|
2623
|
-
children:
|
|
2624
|
-
|
|
2673
|
+
className: A ? Q.sticky : "",
|
|
2674
|
+
children: Ie.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2675
|
+
pe && /* @__PURE__ */ t("th", {
|
|
2625
2676
|
className: Q.expansionCell,
|
|
2626
2677
|
scope: "col",
|
|
2627
2678
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2629,25 +2680,25 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2629
2680
|
children: "Подробности"
|
|
2630
2681
|
})
|
|
2631
2682
|
}),
|
|
2632
|
-
|
|
2683
|
+
P && /* @__PURE__ */ t("th", {
|
|
2633
2684
|
className: Q.selectionHeaderCell,
|
|
2634
2685
|
scope: "col",
|
|
2635
2686
|
children: /* @__PURE__ */ n("div", {
|
|
2636
2687
|
className: Q.selectionHeaderControls,
|
|
2637
|
-
children: [/* @__PURE__ */ t(
|
|
2638
|
-
checked:
|
|
2639
|
-
indeterminate:
|
|
2640
|
-
disabled:
|
|
2641
|
-
ariaLabel:
|
|
2642
|
-
onChange:
|
|
2688
|
+
children: [/* @__PURE__ */ t(Fe, {
|
|
2689
|
+
checked: nt,
|
|
2690
|
+
indeterminate: rt,
|
|
2691
|
+
disabled: D || et.length === 0,
|
|
2692
|
+
ariaLabel: z,
|
|
2693
|
+
onChange: Ft
|
|
2643
2694
|
}), /* @__PURE__ */ t(j, {
|
|
2644
2695
|
size: "sm",
|
|
2645
2696
|
variant: "empty",
|
|
2646
|
-
disabled:
|
|
2647
|
-
"aria-label":
|
|
2648
|
-
title:
|
|
2649
|
-
onClick:
|
|
2650
|
-
children: /* @__PURE__ */ t(
|
|
2697
|
+
disabled: Ze.size === 0,
|
|
2698
|
+
"aria-label": B,
|
|
2699
|
+
title: B,
|
|
2700
|
+
onClick: It,
|
|
2701
|
+
children: /* @__PURE__ */ t(q, {
|
|
2651
2702
|
name: "IconX",
|
|
2652
2703
|
width: 16,
|
|
2653
2704
|
height: 16
|
|
@@ -2656,21 +2707,21 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2656
2707
|
})
|
|
2657
2708
|
}),
|
|
2658
2709
|
e.headers.map((e) => {
|
|
2659
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
|
|
2710
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o = K.find((t) => t.id === e.column.id);
|
|
2660
2711
|
return /* @__PURE__ */ t("th", {
|
|
2661
2712
|
scope: "col",
|
|
2662
2713
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2663
|
-
className:
|
|
2714
|
+
className: o?.sticky ? Q.stickyColumn : void 0,
|
|
2664
2715
|
style: {
|
|
2665
|
-
...
|
|
2666
|
-
...
|
|
2716
|
+
...kt(o),
|
|
2717
|
+
...At(o)
|
|
2667
2718
|
},
|
|
2668
2719
|
children: /* @__PURE__ */ n("button", {
|
|
2669
2720
|
type: "button",
|
|
2670
2721
|
className: Q.sortButton,
|
|
2671
2722
|
disabled: !i,
|
|
2672
2723
|
onClick: a,
|
|
2673
|
-
children: [/* @__PURE__ */ t(
|
|
2724
|
+
children: [/* @__PURE__ */ t(Ie.FlexRender, { header: e }), /* @__PURE__ */ t(q, {
|
|
2674
2725
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2675
2726
|
width: 16,
|
|
2676
2727
|
height: 16
|
|
@@ -2680,52 +2731,52 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2680
2731
|
})
|
|
2681
2732
|
] }, e.id))
|
|
2682
2733
|
}),
|
|
2683
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2684
|
-
colSpan:
|
|
2734
|
+
/* @__PURE__ */ t("tbody", { children: D ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2735
|
+
colSpan: K.length + +!!P + +!!pe,
|
|
2685
2736
|
children: /* @__PURE__ */ t(it, {
|
|
2686
2737
|
lines: 3,
|
|
2687
2738
|
height: 65
|
|
2688
2739
|
})
|
|
2689
|
-
}) }) :
|
|
2740
|
+
}) }) : ct ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2690
2741
|
className: Q.state,
|
|
2691
|
-
colSpan:
|
|
2692
|
-
children:
|
|
2693
|
-
}) }) :
|
|
2742
|
+
colSpan: K.length + +!!P + +!!pe,
|
|
2743
|
+
children: ct
|
|
2744
|
+
}) }) : X.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2694
2745
|
className: Q.state,
|
|
2695
|
-
colSpan:
|
|
2696
|
-
children:
|
|
2697
|
-
}) }) :
|
|
2698
|
-
let i =
|
|
2746
|
+
colSpan: K.length + +!!P + +!!pe,
|
|
2747
|
+
children: k
|
|
2748
|
+
}) }) : /* @__PURE__ */ n(e, { children: [Je.map((e) => {
|
|
2749
|
+
let i = Ze.has(e.id), a = R?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = $e.has(e.id);
|
|
2699
2750
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2700
2751
|
className: [
|
|
2701
|
-
|
|
2752
|
+
N || P ? Q.clickableRow : "",
|
|
2702
2753
|
i ? Q.selectedRow : "",
|
|
2703
|
-
|
|
2754
|
+
y?.(e.original)
|
|
2704
2755
|
].filter(Boolean).join(" "),
|
|
2705
|
-
style:
|
|
2706
|
-
"aria-selected":
|
|
2756
|
+
style: b?.(e.original),
|
|
2757
|
+
"aria-selected": P ? i : void 0,
|
|
2707
2758
|
onClick: () => {
|
|
2708
|
-
|
|
2759
|
+
P ? Pt(e.id) : N?.(e.original);
|
|
2709
2760
|
},
|
|
2710
2761
|
onDoubleClick: () => {
|
|
2711
|
-
|
|
2762
|
+
P && L?.(e.original);
|
|
2712
2763
|
},
|
|
2713
2764
|
onKeyDown: (t) => {
|
|
2714
|
-
t.key === "Enter" ? (t.preventDefault(),
|
|
2765
|
+
t.key === "Enter" ? (t.preventDefault(), P ? L?.(e.original) : N?.(e.original)) : t.key === " " && P && (t.preventDefault(), Pt(e.id));
|
|
2715
2766
|
},
|
|
2716
|
-
tabIndex:
|
|
2717
|
-
role: !
|
|
2767
|
+
tabIndex: N || P || L ? 0 : void 0,
|
|
2768
|
+
role: !P && N ? "button" : void 0,
|
|
2718
2769
|
children: [
|
|
2719
|
-
|
|
2770
|
+
pe && /* @__PURE__ */ t("td", {
|
|
2720
2771
|
className: Q.expansionCell,
|
|
2721
2772
|
onClick: (e) => e.stopPropagation(),
|
|
2722
2773
|
children: /* @__PURE__ */ t(j, {
|
|
2723
2774
|
size: "sm",
|
|
2724
2775
|
variant: "empty",
|
|
2725
2776
|
"aria-expanded": o,
|
|
2726
|
-
"aria-label":
|
|
2727
|
-
onClick: () =>
|
|
2728
|
-
children: /* @__PURE__ */ t(
|
|
2777
|
+
"aria-label": ge?.(e.original, o) ?? (o ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2778
|
+
onClick: () => Lt(e.id),
|
|
2779
|
+
children: /* @__PURE__ */ t(q, {
|
|
2729
2780
|
name: "IconChevron",
|
|
2730
2781
|
width: 16,
|
|
2731
2782
|
height: 16,
|
|
@@ -2733,186 +2784,205 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2733
2784
|
})
|
|
2734
2785
|
})
|
|
2735
2786
|
}),
|
|
2736
|
-
|
|
2787
|
+
P && /* @__PURE__ */ t("td", {
|
|
2737
2788
|
className: Q.selectionCell,
|
|
2738
2789
|
children: /* @__PURE__ */ t("div", {
|
|
2739
2790
|
onClick: (e) => e.stopPropagation(),
|
|
2740
|
-
children: /* @__PURE__ */ t(
|
|
2791
|
+
children: /* @__PURE__ */ t(Fe, {
|
|
2741
2792
|
checked: i,
|
|
2742
2793
|
ariaLabel: a,
|
|
2743
|
-
onChange: () =>
|
|
2794
|
+
onChange: () => Pt(e.id)
|
|
2744
2795
|
})
|
|
2745
2796
|
})
|
|
2746
2797
|
}),
|
|
2747
|
-
e.getAllCells().map((e) =>
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2798
|
+
e.getAllCells().map((e) => {
|
|
2799
|
+
let n = K.find((t) => t.id === e.column.id);
|
|
2800
|
+
return /* @__PURE__ */ t("td", {
|
|
2801
|
+
className: n?.sticky ? Q.stickyColumn : void 0,
|
|
2802
|
+
style: {
|
|
2803
|
+
...kt(n),
|
|
2804
|
+
...At(n)
|
|
2805
|
+
},
|
|
2806
|
+
children: /* @__PURE__ */ t(Ie.FlexRender, { cell: e })
|
|
2807
|
+
}, e.id);
|
|
2808
|
+
})
|
|
2755
2809
|
]
|
|
2756
|
-
}), o &&
|
|
2810
|
+
}), o && pe && /* @__PURE__ */ t("tr", {
|
|
2757
2811
|
className: Q.detailRow,
|
|
2758
2812
|
children: /* @__PURE__ */ t("td", {
|
|
2759
|
-
colSpan:
|
|
2760
|
-
children:
|
|
2813
|
+
colSpan: K.length + +!!P + 1,
|
|
2814
|
+
children: pe({
|
|
2761
2815
|
row: e.original,
|
|
2762
2816
|
rowId: e.id,
|
|
2763
|
-
collapse: () =>
|
|
2817
|
+
collapse: () => Lt(e.id)
|
|
2764
2818
|
})
|
|
2765
2819
|
})
|
|
2766
2820
|
})] }, e.id);
|
|
2767
|
-
})
|
|
2821
|
+
}), Ye && /* @__PURE__ */ t("tr", {
|
|
2822
|
+
ref: Ke,
|
|
2823
|
+
"aria-hidden": "true",
|
|
2824
|
+
children: /* @__PURE__ */ t("td", {
|
|
2825
|
+
colSpan: K.length + +!!P + +!!pe,
|
|
2826
|
+
style: {
|
|
2827
|
+
height: 1,
|
|
2828
|
+
padding: 0,
|
|
2829
|
+
border: 0
|
|
2830
|
+
}
|
|
2831
|
+
})
|
|
2832
|
+
})] }) })
|
|
2768
2833
|
]
|
|
2769
2834
|
})
|
|
2770
2835
|
}),
|
|
2771
|
-
!
|
|
2836
|
+
!ot && /* @__PURE__ */ n("div", {
|
|
2772
2837
|
className: Q.cards,
|
|
2773
2838
|
role: "list",
|
|
2774
|
-
"aria-label":
|
|
2775
|
-
children: [
|
|
2839
|
+
"aria-label": E ?? T,
|
|
2840
|
+
children: [P && !D && !ct && X.length > 0 && /* @__PURE__ */ n("div", {
|
|
2776
2841
|
className: Q.mobileSelectionControls,
|
|
2777
|
-
children: [/* @__PURE__ */ t(
|
|
2778
|
-
checked:
|
|
2779
|
-
indeterminate:
|
|
2780
|
-
ariaLabel:
|
|
2781
|
-
label:
|
|
2782
|
-
onChange:
|
|
2842
|
+
children: [/* @__PURE__ */ t(Fe, {
|
|
2843
|
+
checked: nt,
|
|
2844
|
+
indeterminate: rt,
|
|
2845
|
+
ariaLabel: z,
|
|
2846
|
+
label: z,
|
|
2847
|
+
onChange: Ft
|
|
2783
2848
|
}), /* @__PURE__ */ t(j, {
|
|
2784
2849
|
size: "sm",
|
|
2785
2850
|
variant: "empty",
|
|
2786
|
-
disabled:
|
|
2787
|
-
onClick:
|
|
2788
|
-
children:
|
|
2851
|
+
disabled: Ze.size === 0,
|
|
2852
|
+
onClick: It,
|
|
2853
|
+
children: B
|
|
2789
2854
|
})]
|
|
2790
|
-
}),
|
|
2855
|
+
}), D ? /* @__PURE__ */ t(it, {
|
|
2791
2856
|
lines: 4,
|
|
2792
2857
|
height: 65
|
|
2793
|
-
}) :
|
|
2858
|
+
}) : ct ? /* @__PURE__ */ t("div", {
|
|
2794
2859
|
className: Q.state,
|
|
2795
|
-
children:
|
|
2796
|
-
}) :
|
|
2860
|
+
children: ct
|
|
2861
|
+
}) : X.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2797
2862
|
className: Q.state,
|
|
2798
|
-
children:
|
|
2799
|
-
}) :
|
|
2800
|
-
let r =
|
|
2863
|
+
children: k
|
|
2864
|
+
}) : /* @__PURE__ */ n(e, { children: [Je.map((e) => {
|
|
2865
|
+
let r = Ze.has(e.id), i = $e.has(e.id), a = R?.(e.original) ?? `Выбрать строку ${e.index + 1}`, o = P && /* @__PURE__ */ n("div", {
|
|
2801
2866
|
className: Q.cardSelectionControls,
|
|
2802
2867
|
onClick: (e) => e.stopPropagation(),
|
|
2803
|
-
children: [/* @__PURE__ */ t(
|
|
2868
|
+
children: [/* @__PURE__ */ t(Fe, {
|
|
2804
2869
|
checked: r,
|
|
2805
2870
|
ariaLabel: a,
|
|
2806
|
-
onChange: () =>
|
|
2807
|
-
}),
|
|
2871
|
+
onChange: () => Pt(e.id)
|
|
2872
|
+
}), L && /* @__PURE__ */ t(j, {
|
|
2808
2873
|
size: "sm",
|
|
2809
2874
|
variant: "empty",
|
|
2810
|
-
onClick: () =>
|
|
2811
|
-
children:
|
|
2875
|
+
onClick: () => L(e.original),
|
|
2876
|
+
children: te
|
|
2812
2877
|
})]
|
|
2813
|
-
}), s =
|
|
2878
|
+
}), s = pe && /* @__PURE__ */ t(j, {
|
|
2814
2879
|
size: "sm",
|
|
2815
2880
|
variant: "empty",
|
|
2816
2881
|
"aria-expanded": i,
|
|
2817
|
-
"aria-label":
|
|
2882
|
+
"aria-label": ge?.(e.original, i) ?? (i ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2818
2883
|
onClick: (t) => {
|
|
2819
|
-
t.stopPropagation(),
|
|
2884
|
+
t.stopPropagation(), Lt(e.id);
|
|
2820
2885
|
},
|
|
2821
|
-
children: /* @__PURE__ */ t(
|
|
2886
|
+
children: /* @__PURE__ */ t(q, {
|
|
2822
2887
|
name: "IconChevron",
|
|
2823
2888
|
width: 16,
|
|
2824
2889
|
height: 16,
|
|
2825
2890
|
className: i ? Q.expansionIconOpen : Q.expansionIcon
|
|
2826
2891
|
})
|
|
2827
2892
|
});
|
|
2828
|
-
if (
|
|
2893
|
+
if (_) return /* @__PURE__ */ n("div", {
|
|
2829
2894
|
role: "listitem",
|
|
2830
2895
|
className: [
|
|
2831
2896
|
Q.customCardShell,
|
|
2832
2897
|
r ? Q.selectedCard : "",
|
|
2833
|
-
|
|
2898
|
+
y?.(e.original)
|
|
2834
2899
|
].filter(Boolean).join(" "),
|
|
2835
|
-
style:
|
|
2836
|
-
"aria-selected":
|
|
2900
|
+
style: b?.(e.original),
|
|
2901
|
+
"aria-selected": P ? r : void 0,
|
|
2837
2902
|
onClick: () => {
|
|
2838
|
-
|
|
2903
|
+
P && Pt(e.id);
|
|
2839
2904
|
},
|
|
2840
2905
|
children: [
|
|
2841
2906
|
o,
|
|
2842
|
-
|
|
2907
|
+
_({
|
|
2843
2908
|
row: e.original,
|
|
2844
|
-
columns:
|
|
2909
|
+
columns: K
|
|
2845
2910
|
}),
|
|
2846
2911
|
s,
|
|
2847
2912
|
i && /* @__PURE__ */ t("div", {
|
|
2848
2913
|
className: Q.cardDetail,
|
|
2849
|
-
children:
|
|
2914
|
+
children: pe?.({
|
|
2850
2915
|
row: e.original,
|
|
2851
2916
|
rowId: e.id,
|
|
2852
|
-
collapse: () =>
|
|
2917
|
+
collapse: () => Lt(e.id)
|
|
2853
2918
|
})
|
|
2854
2919
|
})
|
|
2855
2920
|
]
|
|
2856
2921
|
}, e.id);
|
|
2857
|
-
let c =
|
|
2922
|
+
let c = K.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), u = (t) => Nt(t.accessor, e.original), d = (t) => t.mobile?.renderMobile?.(e.original, u(t)) ?? t.cell?.(e.original, u(t)) ?? String(u(t) ?? "");
|
|
2858
2923
|
return /* @__PURE__ */ n("article", {
|
|
2859
2924
|
role: "listitem",
|
|
2860
2925
|
className: [
|
|
2861
2926
|
Q.card,
|
|
2862
2927
|
r ? Q.selectedCard : "",
|
|
2863
|
-
|
|
2928
|
+
y?.(e.original)
|
|
2864
2929
|
].filter(Boolean).join(" "),
|
|
2865
|
-
style:
|
|
2866
|
-
"aria-selected":
|
|
2930
|
+
style: b?.(e.original),
|
|
2931
|
+
"aria-selected": P ? r : void 0,
|
|
2867
2932
|
onClick: () => {
|
|
2868
|
-
|
|
2933
|
+
P && Pt(e.id);
|
|
2869
2934
|
},
|
|
2870
2935
|
children: [
|
|
2871
2936
|
o,
|
|
2872
2937
|
s,
|
|
2873
|
-
/* @__PURE__ */ t("h3", { children: l ?
|
|
2938
|
+
/* @__PURE__ */ t("h3", { children: l ? d(l) : `Строка ${e.index + 1}` }),
|
|
2874
2939
|
/* @__PURE__ */ t("dl", { children: c.filter((e) => e !== l && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2875
2940
|
className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
|
|
2876
|
-
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children:
|
|
2941
|
+
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: d(e) })]
|
|
2877
2942
|
}, e.id)) }),
|
|
2878
|
-
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children:
|
|
2943
|
+
c.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: d(e) }, e.id)),
|
|
2879
2944
|
i && /* @__PURE__ */ t("div", {
|
|
2880
2945
|
className: Q.cardDetail,
|
|
2881
|
-
children:
|
|
2946
|
+
children: pe?.({
|
|
2882
2947
|
row: e.original,
|
|
2883
2948
|
rowId: e.id,
|
|
2884
|
-
collapse: () =>
|
|
2949
|
+
collapse: () => Lt(e.id)
|
|
2885
2950
|
})
|
|
2886
2951
|
})
|
|
2887
2952
|
]
|
|
2888
2953
|
}, e.id);
|
|
2889
|
-
})
|
|
2954
|
+
}), Ye && /* @__PURE__ */ t("div", {
|
|
2955
|
+
ref: qe,
|
|
2956
|
+
"aria-hidden": "true",
|
|
2957
|
+
style: { height: 1 }
|
|
2958
|
+
})] })]
|
|
2890
2959
|
}),
|
|
2891
|
-
(
|
|
2960
|
+
(lt || ut && !D && !ct && X.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2892
2961
|
className: Q.pagination,
|
|
2893
2962
|
"aria-label": "Пагинация таблицы",
|
|
2894
|
-
children: [
|
|
2963
|
+
children: [ut ? yt("bottom") : /* @__PURE__ */ n("span", {
|
|
2895
2964
|
className: Q.paginationRange,
|
|
2896
2965
|
"aria-live": "polite",
|
|
2897
2966
|
children: [
|
|
2898
|
-
|
|
2967
|
+
gt,
|
|
2899
2968
|
"–",
|
|
2900
|
-
|
|
2901
|
-
" из
|
|
2902
|
-
|
|
2969
|
+
_t,
|
|
2970
|
+
" из",
|
|
2971
|
+
" ",
|
|
2972
|
+
Y
|
|
2903
2973
|
]
|
|
2904
|
-
}),
|
|
2974
|
+
}), lt && /* @__PURE__ */ n("div", {
|
|
2905
2975
|
className: Q.paginationControls,
|
|
2906
2976
|
children: [
|
|
2907
2977
|
/* @__PURE__ */ n(j, {
|
|
2908
2978
|
variant: "empty",
|
|
2909
2979
|
size: "md",
|
|
2910
|
-
disabled:
|
|
2980
|
+
disabled: D || Be === 0,
|
|
2911
2981
|
"aria-label": "Предыдущая страница",
|
|
2912
2982
|
onClick: () => {
|
|
2913
|
-
|
|
2983
|
+
bt(Be - 1);
|
|
2914
2984
|
},
|
|
2915
|
-
children: [/* @__PURE__ */ t(
|
|
2985
|
+
children: [/* @__PURE__ */ t(q, {
|
|
2916
2986
|
name: "IconChevron",
|
|
2917
2987
|
width: 18,
|
|
2918
2988
|
height: 18,
|
|
@@ -2924,15 +2994,15 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2924
2994
|
}),
|
|
2925
2995
|
/* @__PURE__ */ t("div", {
|
|
2926
2996
|
className: Q.pageNumbers,
|
|
2927
|
-
children:
|
|
2928
|
-
variant: e ===
|
|
2997
|
+
children: at.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
2998
|
+
variant: e === Be ? "secondary" : "empty",
|
|
2929
2999
|
size: "md",
|
|
2930
3000
|
className: Q.pageButton,
|
|
2931
3001
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
2932
|
-
"aria-current": e ===
|
|
2933
|
-
disabled:
|
|
3002
|
+
"aria-current": e === Be ? "page" : void 0,
|
|
3003
|
+
disabled: D,
|
|
2934
3004
|
onClick: () => {
|
|
2935
|
-
|
|
3005
|
+
bt(e);
|
|
2936
3006
|
},
|
|
2937
3007
|
children: e + 1
|
|
2938
3008
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -2944,15 +3014,15 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2944
3014
|
/* @__PURE__ */ n(j, {
|
|
2945
3015
|
variant: "empty",
|
|
2946
3016
|
size: "md",
|
|
2947
|
-
disabled:
|
|
3017
|
+
disabled: D || Be === Re - 1,
|
|
2948
3018
|
"aria-label": "Следующая страница",
|
|
2949
3019
|
onClick: () => {
|
|
2950
|
-
|
|
3020
|
+
bt(Be + 1);
|
|
2951
3021
|
},
|
|
2952
3022
|
children: [/* @__PURE__ */ t("span", {
|
|
2953
3023
|
className: Q.paginationButtonLabel,
|
|
2954
3024
|
children: "Вперёд"
|
|
2955
|
-
}), /* @__PURE__ */ t(
|
|
3025
|
+
}), /* @__PURE__ */ t(q, {
|
|
2956
3026
|
name: "IconChevron",
|
|
2957
3027
|
width: 18,
|
|
2958
3028
|
height: 18,
|
|
@@ -2964,17 +3034,17 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2964
3034
|
})
|
|
2965
3035
|
]
|
|
2966
3036
|
});
|
|
2967
|
-
},
|
|
3037
|
+
}, Ht = (e, t) => {
|
|
2968
3038
|
let n = t.trim().toLocaleLowerCase();
|
|
2969
3039
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
2970
|
-
},
|
|
3040
|
+
}, Ut = (e, t, n) => {
|
|
2971
3041
|
if (!e.length) return -1;
|
|
2972
3042
|
for (let r = 0; r < e.length; r += 1) {
|
|
2973
3043
|
let i = (t + r * n + e.length) % e.length;
|
|
2974
3044
|
if (!e[i]?.disabled) return i;
|
|
2975
3045
|
}
|
|
2976
3046
|
return -1;
|
|
2977
|
-
},
|
|
3047
|
+
}, Wt = {
|
|
2978
3048
|
wrapper: "_wrapper_1os84_1",
|
|
2979
3049
|
control: "_control_1os84_17",
|
|
2980
3050
|
inputHost: "_inputHost_1os84_25",
|
|
@@ -2993,76 +3063,76 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2993
3063
|
active: "_active_1os84_321",
|
|
2994
3064
|
actionOption: "_actionOption_1os84_341",
|
|
2995
3065
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
2996
|
-
},
|
|
3066
|
+
}, Gt = 8, Kt = 6, qt = 5, Jt = 10, Yt = {
|
|
2997
3067
|
sm: 30,
|
|
2998
3068
|
md: 40,
|
|
2999
3069
|
lg: 50
|
|
3000
|
-
},
|
|
3070
|
+
}, Xt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
|
|
3001
3071
|
let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, P = [
|
|
3002
3072
|
A,
|
|
3003
3073
|
j,
|
|
3004
3074
|
M
|
|
3005
|
-
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B,
|
|
3006
|
-
d(() =>
|
|
3007
|
-
let
|
|
3008
|
-
|
|
3009
|
-
}, []),
|
|
3010
|
-
let e =
|
|
3075
|
+
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, te] = g(""), [V, H] = g(-1), [ne, re] = g(null), ie = m(() => e.find((e) => e.value === r), [e, r]), ae = m(() => Ht(e, B), [e, B]), oe = s && u, se = V >= 0 ? ae[V] : void 0;
|
|
3076
|
+
d(() => te(ie?.label ?? ""), [ie?.label, r]);
|
|
3077
|
+
let ce = l(() => F.current?.querySelector("input") ?? null, []), le = l((e, t) => Ut(ae, e, t), [ae]), ue = l((e) => {
|
|
3078
|
+
H(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3079
|
+
}, []), U = l(() => {
|
|
3080
|
+
let e = ce();
|
|
3011
3081
|
if (!e) return;
|
|
3012
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
3013
|
-
|
|
3082
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(ae.length, qt)) * Yt[x] + Jt, r = window.innerHeight - t.bottom - Gt, i = t.top - Gt, a = r < n && i > r, o = a ? i : r, s = Math.max(Yt[x] + Jt, Math.min(n, o)), c = window.innerWidth - t.width - Gt, l = Math.max(Gt, Math.min(t.left, c)), u = a ? Math.max(Gt, t.top - s - Kt) : t.bottom + Kt;
|
|
3083
|
+
re({
|
|
3014
3084
|
top: u,
|
|
3015
3085
|
left: l,
|
|
3016
3086
|
width: t.width,
|
|
3017
3087
|
maxHeight: s
|
|
3018
3088
|
});
|
|
3019
3089
|
}, [
|
|
3020
|
-
|
|
3021
|
-
|
|
3090
|
+
ae.length,
|
|
3091
|
+
ce,
|
|
3022
3092
|
x
|
|
3023
3093
|
]);
|
|
3024
3094
|
p(() => {
|
|
3025
3095
|
if (!R) {
|
|
3026
|
-
|
|
3096
|
+
re(null);
|
|
3027
3097
|
return;
|
|
3028
3098
|
}
|
|
3029
|
-
return
|
|
3030
|
-
window.removeEventListener("resize",
|
|
3099
|
+
return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
3100
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
3031
3101
|
};
|
|
3032
|
-
}, [R,
|
|
3102
|
+
}, [R, U]), d(() => {
|
|
3033
3103
|
if (!R) return;
|
|
3034
3104
|
let e = (e) => {
|
|
3035
3105
|
let t = e.target;
|
|
3036
|
-
!F.current?.contains(t) && !I.current?.contains(t) && (z(!1),
|
|
3106
|
+
!F.current?.contains(t) && !I.current?.contains(t) && (z(!1), H(-1));
|
|
3037
3107
|
};
|
|
3038
3108
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
3039
3109
|
}, [R]);
|
|
3040
|
-
let
|
|
3041
|
-
s || c || (z(!0),
|
|
3042
|
-
},
|
|
3043
|
-
e.disabled || (
|
|
3044
|
-
},
|
|
3110
|
+
let de = () => {
|
|
3111
|
+
s || c || (z(!0), H(le(0, 1)));
|
|
3112
|
+
}, fe = (e) => {
|
|
3113
|
+
e.disabled || (te(e.label), z(!1), H(-1), i?.(e.value, e), ce()?.focus());
|
|
3114
|
+
}, pe = R ? /* @__PURE__ */ t("ul", {
|
|
3045
3115
|
ref: I,
|
|
3046
3116
|
id: k,
|
|
3047
|
-
className: `${
|
|
3117
|
+
className: `${Wt.menu} ${ae.length === 0 ? Wt.menuEmpty : ""}`,
|
|
3048
3118
|
role: "listbox",
|
|
3049
3119
|
"aria-label": v,
|
|
3050
|
-
style:
|
|
3051
|
-
top:
|
|
3052
|
-
left:
|
|
3053
|
-
width:
|
|
3054
|
-
maxHeight:
|
|
3120
|
+
style: ne ? {
|
|
3121
|
+
top: ne.top,
|
|
3122
|
+
left: ne.left,
|
|
3123
|
+
width: ne.width,
|
|
3124
|
+
maxHeight: ne.maxHeight
|
|
3055
3125
|
} : {
|
|
3056
3126
|
top: 0,
|
|
3057
3127
|
left: 0,
|
|
3058
3128
|
visibility: "hidden",
|
|
3059
3129
|
maxHeight: 0
|
|
3060
3130
|
},
|
|
3061
|
-
children:
|
|
3062
|
-
className: `${
|
|
3131
|
+
children: ae.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3132
|
+
className: `${Wt.empty} ${Wt[x]}`,
|
|
3063
3133
|
children: o
|
|
3064
|
-
}) :
|
|
3065
|
-
let a = e.value === r, o = i ===
|
|
3134
|
+
}) : ae.map((e, i) => {
|
|
3135
|
+
let a = e.value === r, o = i === V;
|
|
3066
3136
|
return /* @__PURE__ */ t("li", {
|
|
3067
3137
|
role: "presentation",
|
|
3068
3138
|
children: /* @__PURE__ */ n("button", {
|
|
@@ -3078,17 +3148,17 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3078
3148
|
"aria-selected": a,
|
|
3079
3149
|
"data-option-variant": e.variant ?? "default",
|
|
3080
3150
|
className: [
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
e.variant === "action" ?
|
|
3084
|
-
a ?
|
|
3085
|
-
o ?
|
|
3151
|
+
Wt.option,
|
|
3152
|
+
Wt[x],
|
|
3153
|
+
e.variant === "action" ? Wt.actionOption : "",
|
|
3154
|
+
a ? Wt.selected : "",
|
|
3155
|
+
o ? Wt.active : ""
|
|
3086
3156
|
].filter(Boolean).join(" "),
|
|
3087
3157
|
onPointerMove: () => {
|
|
3088
|
-
e.disabled ||
|
|
3158
|
+
e.disabled || H(i);
|
|
3089
3159
|
},
|
|
3090
|
-
onClick: () =>
|
|
3091
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(
|
|
3160
|
+
onClick: () => fe(e),
|
|
3161
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(q, {
|
|
3092
3162
|
name: "IconCheck",
|
|
3093
3163
|
width: 16,
|
|
3094
3164
|
height: 16
|
|
@@ -3100,22 +3170,22 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3100
3170
|
return /* @__PURE__ */ n("div", {
|
|
3101
3171
|
ref: F,
|
|
3102
3172
|
className: [
|
|
3103
|
-
|
|
3104
|
-
y ?
|
|
3173
|
+
Wt.wrapper,
|
|
3174
|
+
y ? Wt.errorState : "",
|
|
3105
3175
|
C
|
|
3106
3176
|
].filter(Boolean).join(" "),
|
|
3107
3177
|
children: [
|
|
3108
3178
|
v && /* @__PURE__ */ t(ee, {
|
|
3109
|
-
htmlFor:
|
|
3179
|
+
htmlFor: oe ? void 0 : O,
|
|
3110
3180
|
required: S,
|
|
3111
3181
|
disabled: s,
|
|
3112
3182
|
children: v
|
|
3113
3183
|
}),
|
|
3114
|
-
|
|
3115
|
-
className: `${
|
|
3116
|
-
children:
|
|
3184
|
+
oe ? /* @__PURE__ */ t("div", {
|
|
3185
|
+
className: `${Wt.disabledText} ${Wt[x]}`,
|
|
3186
|
+
children: ie?.label ?? a
|
|
3117
3187
|
}) : /* @__PURE__ */ n("div", {
|
|
3118
|
-
className:
|
|
3188
|
+
className: Wt.control,
|
|
3119
3189
|
children: [/* @__PURE__ */ t(mt, {
|
|
3120
3190
|
id: O,
|
|
3121
3191
|
name: w,
|
|
@@ -3127,50 +3197,50 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3127
3197
|
size: x,
|
|
3128
3198
|
clearable: !1,
|
|
3129
3199
|
autoComplete: "off",
|
|
3130
|
-
className: `${
|
|
3131
|
-
onFocus:
|
|
3200
|
+
className: `${Wt.inputHost} ${Wt[x]}`,
|
|
3201
|
+
onFocus: de,
|
|
3132
3202
|
onChange: (t) => {
|
|
3133
|
-
let n = String(t), r =
|
|
3134
|
-
|
|
3203
|
+
let n = String(t), r = Ht(e, n);
|
|
3204
|
+
te(n), z(!0), H(Ut(r, 0, 1));
|
|
3135
3205
|
},
|
|
3136
3206
|
role: "combobox",
|
|
3137
3207
|
"aria-autocomplete": "list",
|
|
3138
3208
|
"aria-expanded": R,
|
|
3139
3209
|
"aria-controls": k,
|
|
3140
|
-
"aria-activedescendant":
|
|
3210
|
+
"aria-activedescendant": se ? `${O}-option-${V}` : void 0,
|
|
3141
3211
|
"aria-invalid": !!y,
|
|
3142
3212
|
"aria-describedby": P,
|
|
3143
|
-
onClick:
|
|
3213
|
+
onClick: de,
|
|
3144
3214
|
onKeyDown: (e) => {
|
|
3145
3215
|
if (!(s || c)) {
|
|
3146
3216
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3147
3217
|
e.preventDefault();
|
|
3148
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n =
|
|
3149
|
-
z(!0),
|
|
3218
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : ae.length - 1;
|
|
3219
|
+
z(!0), ue(le(n, t));
|
|
3150
3220
|
} else if (e.key === "Home" || e.key === "End") {
|
|
3151
3221
|
if (!R) return;
|
|
3152
3222
|
e.preventDefault();
|
|
3153
3223
|
let t = e.key === "Home" ? 1 : -1;
|
|
3154
|
-
|
|
3155
|
-
} else e.key === "Enter" && R &&
|
|
3224
|
+
ue(le(e.key === "Home" ? 0 : ae.length - 1, t));
|
|
3225
|
+
} else e.key === "Enter" && R && se ? (e.preventDefault(), fe(se)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), H(-1)) : e.key === "Tab" && (z(!1), H(-1));
|
|
3156
3226
|
}
|
|
3157
3227
|
}
|
|
3158
3228
|
}), /* @__PURE__ */ t("span", {
|
|
3159
|
-
className: `${
|
|
3229
|
+
className: `${Wt.chevron} ${R ? Wt.chevronOpen : ""}`,
|
|
3160
3230
|
"aria-hidden": "true",
|
|
3161
|
-
children: /* @__PURE__ */ t(
|
|
3231
|
+
children: /* @__PURE__ */ t(q, {
|
|
3162
3232
|
name: "IconChevron",
|
|
3163
3233
|
width: 20,
|
|
3164
3234
|
height: 20
|
|
3165
3235
|
})
|
|
3166
3236
|
})]
|
|
3167
3237
|
}),
|
|
3168
|
-
R && typeof document < "u" && _(
|
|
3238
|
+
R && typeof document < "u" && _(pe, document.body),
|
|
3169
3239
|
/* @__PURE__ */ n("span", {
|
|
3170
3240
|
id: A,
|
|
3171
|
-
className:
|
|
3241
|
+
className: Wt.visuallyHidden,
|
|
3172
3242
|
"aria-live": "polite",
|
|
3173
|
-
children: ["Найдено вариантов: ",
|
|
3243
|
+
children: ["Найдено вариантов: ", ae.length]
|
|
3174
3244
|
}),
|
|
3175
3245
|
b && !y && /* @__PURE__ */ t(N, {
|
|
3176
3246
|
id: j,
|
|
@@ -3183,44 +3253,44 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3183
3253
|
})
|
|
3184
3254
|
]
|
|
3185
3255
|
});
|
|
3186
|
-
},
|
|
3256
|
+
}, Zt = {
|
|
3187
3257
|
root: "_root_11adi_1",
|
|
3188
3258
|
header: "_header_11adi_21",
|
|
3189
3259
|
title: "_title_11adi_41",
|
|
3190
3260
|
dismiss: "_dismiss_11adi_55",
|
|
3191
3261
|
content: "_content_11adi_65"
|
|
3192
|
-
},
|
|
3262
|
+
}, Qt = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3193
3263
|
let l = `ds-info-block-${f()}`;
|
|
3194
3264
|
return /* @__PURE__ */ n("section", {
|
|
3195
|
-
className: `${
|
|
3265
|
+
className: `${Zt.root} ${c}`,
|
|
3196
3266
|
"aria-labelledby": l,
|
|
3197
3267
|
children: [/* @__PURE__ */ n("header", {
|
|
3198
|
-
className:
|
|
3268
|
+
className: Zt.header,
|
|
3199
3269
|
children: [/* @__PURE__ */ t(s, {
|
|
3200
3270
|
id: l,
|
|
3201
|
-
className:
|
|
3271
|
+
className: Zt.title,
|
|
3202
3272
|
children: e
|
|
3203
3273
|
}), i && /* @__PURE__ */ t(j, {
|
|
3204
|
-
className:
|
|
3274
|
+
className: Zt.dismiss,
|
|
3205
3275
|
variant: "empty",
|
|
3206
3276
|
onClick: a,
|
|
3207
3277
|
"aria-label": o,
|
|
3208
|
-
children: /* @__PURE__ */ t(
|
|
3278
|
+
children: /* @__PURE__ */ t(q, {
|
|
3209
3279
|
name: "IconCross",
|
|
3210
3280
|
width: 20,
|
|
3211
3281
|
height: 20
|
|
3212
3282
|
})
|
|
3213
3283
|
})]
|
|
3214
3284
|
}), /* @__PURE__ */ t("div", {
|
|
3215
|
-
className:
|
|
3285
|
+
className: Zt.content,
|
|
3216
3286
|
children: r
|
|
3217
3287
|
})]
|
|
3218
3288
|
});
|
|
3219
|
-
},
|
|
3289
|
+
}, $t = {
|
|
3220
3290
|
root: "_root_1ecm3_1",
|
|
3221
3291
|
grid: "_grid_1ecm3_13",
|
|
3222
3292
|
actions: "_actions_1ecm3_27"
|
|
3223
|
-
},
|
|
3293
|
+
}, en = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3224
3294
|
let d = (e, t) => {
|
|
3225
3295
|
let n = {
|
|
3226
3296
|
...r,
|
|
@@ -3229,11 +3299,11 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3229
3299
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3230
3300
|
};
|
|
3231
3301
|
return /* @__PURE__ */ n("section", {
|
|
3232
|
-
className: `${
|
|
3302
|
+
className: `${$t.root} ${u}`,
|
|
3233
3303
|
"aria-label": "Фильтры",
|
|
3234
3304
|
"aria-busy": c,
|
|
3235
3305
|
children: [/* @__PURE__ */ t("div", {
|
|
3236
|
-
className:
|
|
3306
|
+
className: $t.grid,
|
|
3237
3307
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3238
3308
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3239
3309
|
if (e.type === "input") {
|
|
@@ -3273,7 +3343,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3273
3343
|
disabled: n,
|
|
3274
3344
|
onChange: (t) => d(e.id, t)
|
|
3275
3345
|
}, e.id);
|
|
3276
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3346
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(Fe, {
|
|
3277
3347
|
label: e.label,
|
|
3278
3348
|
hint: e.hint,
|
|
3279
3349
|
checked: !!i,
|
|
@@ -3301,7 +3371,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3301
3371
|
}, e.id);
|
|
3302
3372
|
})
|
|
3303
3373
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3304
|
-
className:
|
|
3374
|
+
className: $t.actions,
|
|
3305
3375
|
children: [o && /* @__PURE__ */ t(j, {
|
|
3306
3376
|
variant: "destructiveOutline",
|
|
3307
3377
|
disabled: l || c,
|
|
@@ -3315,7 +3385,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3315
3385
|
})]
|
|
3316
3386
|
})]
|
|
3317
3387
|
});
|
|
3318
|
-
},
|
|
3388
|
+
}, tn = {
|
|
3319
3389
|
grid: "_grid_1q540_1",
|
|
3320
3390
|
comfortable: "_comfortable_1q540_11",
|
|
3321
3391
|
compact: "_compact_1q540_19",
|
|
@@ -3332,23 +3402,23 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3332
3402
|
summary: "_summary_1q540_101",
|
|
3333
3403
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3334
3404
|
summaryList: "_summaryList_1q540_145"
|
|
3335
|
-
},
|
|
3405
|
+
}, nn = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3336
3406
|
...i,
|
|
3337
|
-
className: `${
|
|
3338
|
-
}),
|
|
3407
|
+
className: `${tn.grid} ${tn[`columns${e}`]} ${tn[n]} ${r}`
|
|
3408
|
+
}), rn = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3339
3409
|
...r,
|
|
3340
|
-
className: `${
|
|
3341
|
-
}),
|
|
3410
|
+
className: `${tn.item} ${tn[`span${e}`]} ${n}`
|
|
3411
|
+
}), an = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3342
3412
|
...o,
|
|
3343
|
-
className: `${
|
|
3413
|
+
className: `${tn.summary} ${a}`,
|
|
3344
3414
|
role: "alert",
|
|
3345
3415
|
"aria-atomic": "true",
|
|
3346
3416
|
tabIndex: -1,
|
|
3347
3417
|
children: [/* @__PURE__ */ t("strong", {
|
|
3348
|
-
className:
|
|
3418
|
+
className: tn.summaryTitle,
|
|
3349
3419
|
children: e
|
|
3350
3420
|
}), /* @__PURE__ */ t("ul", {
|
|
3351
|
-
className:
|
|
3421
|
+
className: tn.summaryList,
|
|
3352
3422
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3353
3423
|
href: `#${e.fieldId}`,
|
|
3354
3424
|
onClick: (t) => {
|
|
@@ -3357,7 +3427,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3357
3427
|
children: e.message
|
|
3358
3428
|
}) : e.message }, e.id))
|
|
3359
3429
|
})]
|
|
3360
|
-
}),
|
|
3430
|
+
}), on = {
|
|
3361
3431
|
wrapper: "_wrapper_i20hz_1",
|
|
3362
3432
|
dropzone: "_dropzone_i20hz_15",
|
|
3363
3433
|
dragActive: "_dragActive_i20hz_45",
|
|
@@ -3370,12 +3440,12 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3370
3440
|
file: "_file_i20hz_133",
|
|
3371
3441
|
fileName: "_fileName_i20hz_175",
|
|
3372
3442
|
fileSize: "_fileSize_i20hz_187"
|
|
3373
|
-
},
|
|
3443
|
+
}, sn = (e) => `${e.name}:${e.size}:${e.lastModified}`, cn = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, ln = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), un = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
|
|
3374
3444
|
let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), M = u ? `${E}-hint` : void 0, P = d ? `${E}-error` : void 0, F = [M, P].filter(Boolean).join(" ") || void 0, I = !m && !_, L = (e) => {
|
|
3375
|
-
let t = [], n = new Set(r.map(
|
|
3445
|
+
let t = [], n = new Set(r.map(sn)), l = e.filter((e) => ln(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3376
3446
|
file: e,
|
|
3377
3447
|
reason: "maxSize"
|
|
3378
|
-
}), !1) : !n.has(
|
|
3448
|
+
}), !1) : !n.has(sn(e)) && (n.add(sn(e)), !0) : (t.push({
|
|
3379
3449
|
file: e,
|
|
3380
3450
|
reason: "accept"
|
|
3381
3451
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3385,7 +3455,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3385
3455
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3386
3456
|
};
|
|
3387
3457
|
return /* @__PURE__ */ n("div", {
|
|
3388
|
-
className: `${
|
|
3458
|
+
className: `${on.wrapper} ${b}`,
|
|
3389
3459
|
children: [
|
|
3390
3460
|
l && /* @__PURE__ */ t(ee, {
|
|
3391
3461
|
htmlFor: E,
|
|
@@ -3394,7 +3464,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3394
3464
|
children: l
|
|
3395
3465
|
}),
|
|
3396
3466
|
/* @__PURE__ */ n("div", {
|
|
3397
|
-
className: `${
|
|
3467
|
+
className: `${on.dropzone} ${k ? on.dragActive : ""} ${m ? on.disabled : ""} ${d ? on.error : ""}`,
|
|
3398
3468
|
onDragEnter: (e) => {
|
|
3399
3469
|
e.preventDefault(), I && ++O.current === 1 && A(!0);
|
|
3400
3470
|
},
|
|
@@ -3409,7 +3479,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3409
3479
|
ref: D,
|
|
3410
3480
|
id: E,
|
|
3411
3481
|
name: v,
|
|
3412
|
-
className:
|
|
3482
|
+
className: on.nativeInput,
|
|
3413
3483
|
type: "file",
|
|
3414
3484
|
multiple: a,
|
|
3415
3485
|
accept: o,
|
|
@@ -3420,53 +3490,53 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3420
3490
|
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
3421
3491
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3422
3492
|
/* @__PURE__ */ t("ul", {
|
|
3423
|
-
className:
|
|
3493
|
+
className: on.files,
|
|
3424
3494
|
"aria-live": "polite",
|
|
3425
3495
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3426
|
-
className:
|
|
3496
|
+
className: on.file,
|
|
3427
3497
|
children: [
|
|
3428
3498
|
/* @__PURE__ */ t("span", {
|
|
3429
|
-
className:
|
|
3499
|
+
className: on.fileName,
|
|
3430
3500
|
title: e.name,
|
|
3431
3501
|
children: e.name
|
|
3432
3502
|
}),
|
|
3433
3503
|
/* @__PURE__ */ t("span", {
|
|
3434
|
-
className:
|
|
3435
|
-
children:
|
|
3504
|
+
className: on.fileSize,
|
|
3505
|
+
children: cn(e.size)
|
|
3436
3506
|
}),
|
|
3437
3507
|
I && /* @__PURE__ */ t(j, {
|
|
3438
3508
|
variant: "empty",
|
|
3439
3509
|
size: "sm",
|
|
3440
3510
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3441
3511
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3442
|
-
children: /* @__PURE__ */ t(
|
|
3512
|
+
children: /* @__PURE__ */ t(q, {
|
|
3443
3513
|
name: "IconCross",
|
|
3444
3514
|
width: 16,
|
|
3445
3515
|
height: 16
|
|
3446
3516
|
})
|
|
3447
3517
|
})
|
|
3448
3518
|
]
|
|
3449
|
-
},
|
|
3519
|
+
}, sn(e)))
|
|
3450
3520
|
}),
|
|
3451
3521
|
I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
|
|
3452
|
-
className:
|
|
3522
|
+
className: on.browseButton,
|
|
3453
3523
|
size: "sm",
|
|
3454
3524
|
onClick: () => D.current?.click(),
|
|
3455
3525
|
children: C
|
|
3456
3526
|
}),
|
|
3457
3527
|
I && !a && /* @__PURE__ */ t(j, {
|
|
3458
|
-
className:
|
|
3528
|
+
className: on.browseButton,
|
|
3459
3529
|
size: "sm",
|
|
3460
3530
|
onClick: () => D.current?.click(),
|
|
3461
3531
|
children: S
|
|
3462
3532
|
})
|
|
3463
3533
|
] }) : /* @__PURE__ */ n("div", {
|
|
3464
|
-
className:
|
|
3534
|
+
className: on.empty,
|
|
3465
3535
|
children: [
|
|
3466
3536
|
/* @__PURE__ */ t("span", {
|
|
3467
|
-
className:
|
|
3537
|
+
className: on.uploadIcon,
|
|
3468
3538
|
"aria-hidden": "true",
|
|
3469
|
-
children: /* @__PURE__ */ t(
|
|
3539
|
+
children: /* @__PURE__ */ t(q, {
|
|
3470
3540
|
name: "IconUpload",
|
|
3471
3541
|
width: 24,
|
|
3472
3542
|
height: 24
|
|
@@ -3492,7 +3562,7 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3492
3562
|
})
|
|
3493
3563
|
]
|
|
3494
3564
|
});
|
|
3495
|
-
},
|
|
3565
|
+
}, dn = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
3496
3566
|
let [n, r] = g(null);
|
|
3497
3567
|
return d(() => {
|
|
3498
3568
|
let e = document.getElementById(t);
|
|
@@ -3505,37 +3575,47 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3505
3575
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3506
3576
|
};
|
|
3507
3577
|
}, [t]), n ? _(e, n) : null;
|
|
3508
|
-
},
|
|
3509
|
-
let o =
|
|
3578
|
+
}, fn = typeof window > "u" ? d : p, pn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3579
|
+
let [o, s] = g(null), [c, u] = g({
|
|
3510
3580
|
position: "fixed",
|
|
3511
3581
|
visibility: "hidden",
|
|
3512
3582
|
zIndex: 1100
|
|
3513
|
-
}),
|
|
3514
|
-
let t = e.current, n = o
|
|
3583
|
+
}), d = l(() => {
|
|
3584
|
+
let t = e.current, n = o;
|
|
3515
3585
|
if (!t || !n) return;
|
|
3516
|
-
let a = t.getBoundingClientRect(), s = n.getBoundingClientRect(),
|
|
3517
|
-
c({
|
|
3586
|
+
let a = t.getBoundingClientRect(), s = n.getBoundingClientRect(), c = window.innerHeight - a.bottom - 8, l = a.top - 8, d = (c >= s.height || c >= l ? "bottom" : "top") == "bottom" ? a.bottom + i : a.top - s.height - i, f = a.left, p = window.innerWidth - s.width - 8, m = Math.max(8, Math.min(f, p)), h = {
|
|
3518
3587
|
position: "fixed",
|
|
3519
|
-
top:
|
|
3588
|
+
top: Math.max(8, Math.min(d, window.innerHeight - s.height - 8)),
|
|
3520
3589
|
left: m,
|
|
3521
3590
|
...r ? { width: a.width } : {},
|
|
3522
3591
|
zIndex: 1100,
|
|
3523
3592
|
visibility: "visible"
|
|
3524
|
-
}
|
|
3593
|
+
};
|
|
3594
|
+
u((e) => e.top === h.top && e.left === h.left && e.width === h.width && e.visibility === h.visibility ? e : h);
|
|
3525
3595
|
}, [
|
|
3526
3596
|
e,
|
|
3527
3597
|
r,
|
|
3598
|
+
o,
|
|
3528
3599
|
i
|
|
3529
3600
|
]);
|
|
3530
|
-
return
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3601
|
+
return fn(() => {
|
|
3602
|
+
if (!o) return;
|
|
3603
|
+
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3604
|
+
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
3605
|
+
return t?.observe(o), e.current && t?.observe(e.current), () => {
|
|
3606
|
+
window.removeEventListener("resize", d), window.removeEventListener("scroll", d, !0), t?.disconnect();
|
|
3607
|
+
};
|
|
3608
|
+
}, [
|
|
3609
|
+
e,
|
|
3610
|
+
o,
|
|
3611
|
+
d
|
|
3612
|
+
]), /* @__PURE__ */ t(dn, { children: /* @__PURE__ */ t("div", {
|
|
3613
|
+
ref: s,
|
|
3534
3614
|
className: a,
|
|
3535
|
-
style:
|
|
3615
|
+
style: c,
|
|
3536
3616
|
children: n
|
|
3537
3617
|
}) });
|
|
3538
|
-
},
|
|
3618
|
+
}, mn = {
|
|
3539
3619
|
wrapper: "_wrapper_x2gki_1",
|
|
3540
3620
|
control: "_control_x2gki_15",
|
|
3541
3621
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3549,12 +3629,12 @@ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3549
3629
|
clearAction: "_clearAction_x2gki_171",
|
|
3550
3630
|
messages: "_messages_x2gki_251",
|
|
3551
3631
|
counter: "_counter_x2gki_265"
|
|
3552
|
-
},
|
|
3553
|
-
function
|
|
3632
|
+
}, hn = 2;
|
|
3633
|
+
function gn(e) {
|
|
3554
3634
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3555
3635
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3556
3636
|
}
|
|
3557
|
-
function
|
|
3637
|
+
function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = hn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3558
3638
|
let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, P = [
|
|
3559
3639
|
A,
|
|
3560
3640
|
j,
|
|
@@ -3562,7 +3642,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3562
3642
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3563
3643
|
let e = k.current;
|
|
3564
3644
|
if (!e || !T) return;
|
|
3565
|
-
let t = window.getComputedStyle(e), n =
|
|
3645
|
+
let t = window.getComputedStyle(e), n = gn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
|
|
3566
3646
|
e.style.height = "auto";
|
|
3567
3647
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3568
3648
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3594,7 +3674,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3594
3674
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3595
3675
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3596
3676
|
return /* @__PURE__ */ n("div", {
|
|
3597
|
-
className: `${
|
|
3677
|
+
className: `${mn.wrapper} ${m}`,
|
|
3598
3678
|
children: [
|
|
3599
3679
|
c && /* @__PURE__ */ t(ee, {
|
|
3600
3680
|
htmlFor: O,
|
|
@@ -3604,12 +3684,12 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3604
3684
|
}),
|
|
3605
3685
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3606
3686
|
id: O,
|
|
3607
|
-
className: `${
|
|
3687
|
+
className: `${mn.disabledText} ${mn[v]}`,
|
|
3608
3688
|
style: B,
|
|
3609
3689
|
"aria-describedby": P,
|
|
3610
3690
|
children: e || i
|
|
3611
3691
|
}) : /* @__PURE__ */ n("div", {
|
|
3612
|
-
className:
|
|
3692
|
+
className: mn.control,
|
|
3613
3693
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3614
3694
|
ref: k,
|
|
3615
3695
|
id: O,
|
|
@@ -3624,15 +3704,15 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3624
3704
|
style: B,
|
|
3625
3705
|
"aria-invalid": !!u,
|
|
3626
3706
|
"aria-describedby": P,
|
|
3627
|
-
className: `${
|
|
3707
|
+
className: `${mn.textarea} ${mn[v]} ${T ? mn.autoResize : mn.manualResize} ${u ? mn.textareaError : ""}`,
|
|
3628
3708
|
onChange: R,
|
|
3629
3709
|
...E
|
|
3630
3710
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3631
3711
|
type: "button",
|
|
3632
|
-
className:
|
|
3712
|
+
className: mn.clearAction,
|
|
3633
3713
|
"aria-label": "Очистить поле",
|
|
3634
3714
|
onClick: z,
|
|
3635
|
-
children: /* @__PURE__ */ t(
|
|
3715
|
+
children: /* @__PURE__ */ t(q, {
|
|
3636
3716
|
name: "IconCross",
|
|
3637
3717
|
width: 20,
|
|
3638
3718
|
height: 20
|
|
@@ -3640,7 +3720,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3640
3720
|
})]
|
|
3641
3721
|
}),
|
|
3642
3722
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3643
|
-
className:
|
|
3723
|
+
className: mn.messages,
|
|
3644
3724
|
children: [
|
|
3645
3725
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3646
3726
|
id: A,
|
|
@@ -3653,7 +3733,7 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3653
3733
|
}),
|
|
3654
3734
|
M && /* @__PURE__ */ n("span", {
|
|
3655
3735
|
id: M,
|
|
3656
|
-
className:
|
|
3736
|
+
className: mn.counter,
|
|
3657
3737
|
children: [
|
|
3658
3738
|
e.length,
|
|
3659
3739
|
" / ",
|
|
@@ -3667,11 +3747,11 @@ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3667
3747
|
}
|
|
3668
3748
|
//#endregion
|
|
3669
3749
|
//#region src/components/DSModal/modal.store.ts
|
|
3670
|
-
var
|
|
3750
|
+
var vn = 0, yn = S((e, t) => ({
|
|
3671
3751
|
modals: [],
|
|
3672
3752
|
openModal: (t, n = {}, r = {}) => {
|
|
3673
|
-
|
|
3674
|
-
let i = `ds-modal-${
|
|
3753
|
+
vn += 1;
|
|
3754
|
+
let i = `ds-modal-${vn}`;
|
|
3675
3755
|
return e((e) => ({ modals: [...e.modals, {
|
|
3676
3756
|
id: i,
|
|
3677
3757
|
name: t,
|
|
@@ -3695,10 +3775,10 @@ var hn = 0, gn = S((e, t) => ({
|
|
|
3695
3775
|
let n = t().modals;
|
|
3696
3776
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3697
3777
|
}
|
|
3698
|
-
})),
|
|
3699
|
-
|
|
3700
|
-
},
|
|
3701
|
-
function
|
|
3778
|
+
})), bn = () => {
|
|
3779
|
+
yn.getState().closeAllModals(), vn = 0;
|
|
3780
|
+
}, xn = 8, Sn = 96, Cn = .55;
|
|
3781
|
+
function wn(e, t, n) {
|
|
3702
3782
|
return {
|
|
3703
3783
|
startX: e,
|
|
3704
3784
|
startY: t,
|
|
@@ -3706,16 +3786,16 @@ function xn(e, t, n) {
|
|
|
3706
3786
|
intent: "pending"
|
|
3707
3787
|
};
|
|
3708
3788
|
}
|
|
3709
|
-
function
|
|
3789
|
+
function Tn(e, t, n) {
|
|
3710
3790
|
let r = t - e.startX, i = n - e.startY;
|
|
3711
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3791
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= xn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3712
3792
|
}
|
|
3713
|
-
function
|
|
3793
|
+
function En(e, t, n) {
|
|
3714
3794
|
if (e.intent !== "vertical") return !1;
|
|
3715
3795
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3716
|
-
return r >=
|
|
3796
|
+
return r >= Sn || r >= 32 && r / i >= Cn;
|
|
3717
3797
|
}
|
|
3718
|
-
var
|
|
3798
|
+
var Dn = {
|
|
3719
3799
|
layer: "_layer_w9isk_1",
|
|
3720
3800
|
backdrop: "_backdrop_w9isk_15",
|
|
3721
3801
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3728,10 +3808,10 @@ var wn = {
|
|
|
3728
3808
|
close: "_close_w9isk_141",
|
|
3729
3809
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3730
3810
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3731
|
-
},
|
|
3732
|
-
function
|
|
3811
|
+
}, On = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", kn = a({});
|
|
3812
|
+
function An(e) {
|
|
3733
3813
|
if (e.key !== "Tab") return;
|
|
3734
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3814
|
+
let t = Array.from(e.currentTarget.querySelectorAll(On));
|
|
3735
3815
|
if (!t.length) {
|
|
3736
3816
|
e.preventDefault();
|
|
3737
3817
|
return;
|
|
@@ -3739,18 +3819,18 @@ function Dn(e) {
|
|
|
3739
3819
|
let n = t[0], r = t.at(-1);
|
|
3740
3820
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3741
3821
|
}
|
|
3742
|
-
var
|
|
3743
|
-
let l = u(
|
|
3822
|
+
var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3823
|
+
let l = u(kn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = yn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3744
3824
|
d(() => {
|
|
3745
3825
|
let e = document.activeElement, t = y.current;
|
|
3746
|
-
return (t?.querySelector(
|
|
3826
|
+
return (t?.querySelector(On) ?? t)?.focus(), () => e?.focus();
|
|
3747
3827
|
}, []);
|
|
3748
3828
|
let A = (e) => {
|
|
3749
3829
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3750
3830
|
};
|
|
3751
3831
|
return /* @__PURE__ */ n("div", {
|
|
3752
3832
|
ref: y,
|
|
3753
|
-
className: `${
|
|
3833
|
+
className: `${Dn.panel} ${s}`,
|
|
3754
3834
|
"data-closing": l.closing || void 0,
|
|
3755
3835
|
"data-dragging": w || void 0,
|
|
3756
3836
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3759,41 +3839,41 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3759
3839
|
"aria-labelledby": O ? _ : void 0,
|
|
3760
3840
|
"aria-describedby": k ? v : void 0,
|
|
3761
3841
|
tabIndex: -1,
|
|
3762
|
-
onKeyDown:
|
|
3842
|
+
onKeyDown: An,
|
|
3763
3843
|
children: [
|
|
3764
3844
|
/* @__PURE__ */ t("button", {
|
|
3765
3845
|
type: "button",
|
|
3766
|
-
className:
|
|
3846
|
+
className: Dn.dragHandle,
|
|
3767
3847
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3768
3848
|
onPointerDown: (e) => {
|
|
3769
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3849
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = wn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3770
3850
|
},
|
|
3771
3851
|
onPointerMove: (e) => {
|
|
3772
3852
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3773
|
-
let t =
|
|
3853
|
+
let t = Tn(b.current, e.clientX, e.clientY);
|
|
3774
3854
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3775
3855
|
},
|
|
3776
3856
|
onPointerUp: (e) => {
|
|
3777
3857
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3778
|
-
let t =
|
|
3858
|
+
let t = En(b.current, e.clientY, e.timeStamp);
|
|
3779
3859
|
A(e.currentTarget), t && D();
|
|
3780
3860
|
},
|
|
3781
3861
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3782
3862
|
children: /* @__PURE__ */ t("span", {})
|
|
3783
3863
|
}),
|
|
3784
3864
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3785
|
-
className:
|
|
3865
|
+
className: Dn.header,
|
|
3786
3866
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3787
3867
|
id: _,
|
|
3788
|
-
className:
|
|
3868
|
+
className: Dn.title,
|
|
3789
3869
|
children: p
|
|
3790
3870
|
}), /* @__PURE__ */ t(j, {
|
|
3791
|
-
className:
|
|
3871
|
+
className: Dn.close,
|
|
3792
3872
|
variant: "empty",
|
|
3793
3873
|
size: "sm",
|
|
3794
3874
|
"aria-label": o,
|
|
3795
3875
|
onClick: D,
|
|
3796
|
-
children: /* @__PURE__ */ t(
|
|
3876
|
+
children: /* @__PURE__ */ t(q, {
|
|
3797
3877
|
name: "IconCross",
|
|
3798
3878
|
width: 24,
|
|
3799
3879
|
height: 24
|
|
@@ -3802,17 +3882,17 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3802
3882
|
}),
|
|
3803
3883
|
k && /* @__PURE__ */ t("p", {
|
|
3804
3884
|
id: v,
|
|
3805
|
-
className:
|
|
3885
|
+
className: Dn.description,
|
|
3806
3886
|
children: m
|
|
3807
3887
|
}),
|
|
3808
3888
|
/* @__PURE__ */ t("div", {
|
|
3809
|
-
className:
|
|
3889
|
+
className: Dn.content,
|
|
3810
3890
|
children: e
|
|
3811
3891
|
})
|
|
3812
3892
|
]
|
|
3813
3893
|
});
|
|
3814
|
-
},
|
|
3815
|
-
let n =
|
|
3894
|
+
}, Mn = ({ registry: e }) => {
|
|
3895
|
+
let n = yn((e) => e.modals), r = yn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3816
3896
|
if (o.current.has(e)) return;
|
|
3817
3897
|
a((t) => new Set(t).add(e));
|
|
3818
3898
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3828,7 +3908,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3828
3908
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3829
3909
|
}, []), d(() => {
|
|
3830
3910
|
let e = (e) => {
|
|
3831
|
-
let t =
|
|
3911
|
+
let t = yn.getState().modals.at(-1);
|
|
3832
3912
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3833
3913
|
};
|
|
3834
3914
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3841,21 +3921,21 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3841
3921
|
n,
|
|
3842
3922
|
e
|
|
3843
3923
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3844
|
-
className:
|
|
3924
|
+
className: Dn.layer,
|
|
3845
3925
|
"aria-label": "Модальные окна",
|
|
3846
3926
|
children: n.map((r, a) => {
|
|
3847
3927
|
let o = e[r.name];
|
|
3848
3928
|
if (!o) return null;
|
|
3849
3929
|
let c = i.has(r.id);
|
|
3850
3930
|
return /* @__PURE__ */ t("div", {
|
|
3851
|
-
className:
|
|
3931
|
+
className: Dn.backdrop,
|
|
3852
3932
|
"data-closing": c || void 0,
|
|
3853
3933
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3854
3934
|
inert: a !== n.length - 1 || void 0,
|
|
3855
3935
|
onMouseDown: (e) => {
|
|
3856
3936
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3857
3937
|
},
|
|
3858
|
-
children: /* @__PURE__ */ t(
|
|
3938
|
+
children: /* @__PURE__ */ t(kn.Provider, {
|
|
3859
3939
|
value: {
|
|
3860
3940
|
title: r.title ?? r.payload.title,
|
|
3861
3941
|
description: r.description ?? r.payload.description,
|
|
@@ -3872,31 +3952,31 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3872
3952
|
}, r.id);
|
|
3873
3953
|
})
|
|
3874
3954
|
}), document.body);
|
|
3875
|
-
},
|
|
3876
|
-
let o =
|
|
3955
|
+
}, Nn = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3956
|
+
let o = yn((e) => e.modals.length);
|
|
3877
3957
|
return d(() => {
|
|
3878
3958
|
if (!a || o === 0) return;
|
|
3879
3959
|
let e = document.body.style.overflow;
|
|
3880
3960
|
return document.body.style.overflow = "hidden", () => {
|
|
3881
3961
|
document.body.style.overflow = e;
|
|
3882
3962
|
};
|
|
3883
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3884
|
-
},
|
|
3963
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Mn, { registry: r })] });
|
|
3964
|
+
}, Pn = (e) => e, Fn = {
|
|
3885
3965
|
message: "_message_c23ie_1",
|
|
3886
3966
|
actions: "_actions_c23ie_13"
|
|
3887
|
-
},
|
|
3967
|
+
}, In = /* @__PURE__ */ new Map(), Ln = 0, Rn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3888
3968
|
let u = (e) => {
|
|
3889
|
-
|
|
3969
|
+
In.get(l)?.(e), In.delete(l), r();
|
|
3890
3970
|
};
|
|
3891
|
-
return /* @__PURE__ */ n(
|
|
3971
|
+
return /* @__PURE__ */ n(jn, {
|
|
3892
3972
|
modalId: e,
|
|
3893
3973
|
title: i,
|
|
3894
3974
|
role: "alertdialog",
|
|
3895
3975
|
children: [/* @__PURE__ */ t("p", {
|
|
3896
|
-
className:
|
|
3976
|
+
className: Fn.message,
|
|
3897
3977
|
children: a
|
|
3898
3978
|
}), /* @__PURE__ */ n("div", {
|
|
3899
|
-
className:
|
|
3979
|
+
className: Fn.actions,
|
|
3900
3980
|
children: [/* @__PURE__ */ t(j, {
|
|
3901
3981
|
variant: "outline",
|
|
3902
3982
|
onClick: () => u(!1),
|
|
@@ -3908,46 +3988,46 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3908
3988
|
})]
|
|
3909
3989
|
})]
|
|
3910
3990
|
});
|
|
3911
|
-
},
|
|
3991
|
+
}, zn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(jn, {
|
|
3912
3992
|
modalId: e,
|
|
3913
3993
|
title: i,
|
|
3914
3994
|
role: "alertdialog",
|
|
3915
3995
|
children: [/* @__PURE__ */ t("p", {
|
|
3916
|
-
className:
|
|
3996
|
+
className: Fn.message,
|
|
3917
3997
|
children: a
|
|
3918
3998
|
}), /* @__PURE__ */ t("div", {
|
|
3919
|
-
className:
|
|
3999
|
+
className: Fn.actions,
|
|
3920
4000
|
children: /* @__PURE__ */ t(j, {
|
|
3921
4001
|
onClick: r,
|
|
3922
4002
|
children: o
|
|
3923
4003
|
})
|
|
3924
4004
|
})]
|
|
3925
|
-
}),
|
|
3926
|
-
ConfirmModal:
|
|
3927
|
-
ErrorModal:
|
|
3928
|
-
}),
|
|
3929
|
-
let e =
|
|
4005
|
+
}), Bn = Pn({
|
|
4006
|
+
ConfirmModal: Rn,
|
|
4007
|
+
ErrorModal: zn
|
|
4008
|
+
}), Vn = () => {
|
|
4009
|
+
let e = yn((e) => e.openModal);
|
|
3930
4010
|
return (t = {}) => new Promise((n) => {
|
|
3931
|
-
|
|
3932
|
-
let r = `confirm-${
|
|
3933
|
-
|
|
4011
|
+
Ln += 1;
|
|
4012
|
+
let r = `confirm-${Ln}`;
|
|
4013
|
+
In.set(r, n), e("ConfirmModal", {
|
|
3934
4014
|
...t,
|
|
3935
4015
|
requestId: r
|
|
3936
4016
|
}, {
|
|
3937
4017
|
closeOnEscape: !1,
|
|
3938
4018
|
onClose: () => {
|
|
3939
|
-
|
|
4019
|
+
In.get(r)?.(!1), In.delete(r);
|
|
3940
4020
|
}
|
|
3941
4021
|
});
|
|
3942
4022
|
});
|
|
3943
|
-
},
|
|
3944
|
-
let e =
|
|
4023
|
+
}, Hn = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Un = () => {
|
|
4024
|
+
let e = yn((e) => e.openModal);
|
|
3945
4025
|
return { showError: (t, n) => e("ErrorModal", {
|
|
3946
4026
|
title: n,
|
|
3947
|
-
message:
|
|
4027
|
+
message: Hn(t)
|
|
3948
4028
|
}) };
|
|
3949
|
-
},
|
|
3950
|
-
let e =
|
|
4029
|
+
}, Wn = S(() => ({})), Gn = S(() => ({})), Kn = () => {
|
|
4030
|
+
let e = yn((e) => e.modals), t = yn((e) => e.openModal), n = yn((e) => e.closeModal), r = yn((e) => e.closeTopModal), i = yn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
3951
4031
|
return m(() => ({
|
|
3952
4032
|
openModal: a,
|
|
3953
4033
|
closeModal: n,
|
|
@@ -3963,7 +4043,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3963
4043
|
e.length,
|
|
3964
4044
|
a
|
|
3965
4045
|
]);
|
|
3966
|
-
},
|
|
4046
|
+
}, qn = {
|
|
3967
4047
|
layer: "_layer_ct7yp_1",
|
|
3968
4048
|
backdrop: "_backdrop_ct7yp_13",
|
|
3969
4049
|
panel: "_panel_ct7yp_27",
|
|
@@ -3983,16 +4063,16 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3983
4063
|
"enter-right": "_enter-right_ct7yp_1",
|
|
3984
4064
|
"enter-left": "_enter-left_ct7yp_1",
|
|
3985
4065
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
3986
|
-
},
|
|
4066
|
+
}, Jn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Yn = a(null), Xn = (e) => {
|
|
3987
4067
|
if (e.key !== "Tab") return;
|
|
3988
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4068
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Jn));
|
|
3989
4069
|
if (!t.length) {
|
|
3990
4070
|
e.preventDefault();
|
|
3991
4071
|
return;
|
|
3992
4072
|
}
|
|
3993
4073
|
let n = t[0], r = t.at(-1);
|
|
3994
4074
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
3995
|
-
},
|
|
4075
|
+
}, Zn = () => u(Yn), Qn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
|
|
3996
4076
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
3997
4077
|
g || r(e);
|
|
3998
4078
|
};
|
|
@@ -4001,7 +4081,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4001
4081
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4002
4082
|
document.body.style.overflow = "hidden";
|
|
4003
4083
|
let a = S.current;
|
|
4004
|
-
(y?.current ?? a?.querySelector(
|
|
4084
|
+
(y?.current ?? a?.querySelector(Jn) ?? a)?.focus();
|
|
4005
4085
|
let o = (e) => {
|
|
4006
4086
|
e.key === "Escape" && p && !g && r("escape");
|
|
4007
4087
|
};
|
|
@@ -4016,29 +4096,29 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4016
4096
|
g,
|
|
4017
4097
|
b
|
|
4018
4098
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4019
|
-
className:
|
|
4099
|
+
className: qn.layer,
|
|
4020
4100
|
children: /* @__PURE__ */ t("div", {
|
|
4021
|
-
className:
|
|
4101
|
+
className: qn.backdrop,
|
|
4022
4102
|
onMouseDown: (e) => {
|
|
4023
4103
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4024
4104
|
},
|
|
4025
|
-
children: /* @__PURE__ */ t(
|
|
4105
|
+
children: /* @__PURE__ */ t(Yn.Provider, {
|
|
4026
4106
|
value: { requestClose: T },
|
|
4027
4107
|
children: /* @__PURE__ */ n("section", {
|
|
4028
4108
|
ref: S,
|
|
4029
|
-
className: `${
|
|
4109
|
+
className: `${qn.panel} ${qn[l]} ${qn[u]} ${x}`,
|
|
4030
4110
|
role: "dialog",
|
|
4031
4111
|
"aria-modal": "true",
|
|
4032
4112
|
"aria-labelledby": a ? C : void 0,
|
|
4033
4113
|
"aria-describedby": o ? w : void 0,
|
|
4034
4114
|
tabIndex: -1,
|
|
4035
|
-
onKeyDown:
|
|
4115
|
+
onKeyDown: Xn,
|
|
4036
4116
|
children: [
|
|
4037
4117
|
/* @__PURE__ */ n("header", {
|
|
4038
|
-
className:
|
|
4118
|
+
className: qn.header,
|
|
4039
4119
|
children: [
|
|
4040
4120
|
/* @__PURE__ */ n("div", {
|
|
4041
|
-
className:
|
|
4121
|
+
className: qn.heading,
|
|
4042
4122
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4043
4123
|
id: C,
|
|
4044
4124
|
children: a
|
|
@@ -4048,7 +4128,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4048
4128
|
})]
|
|
4049
4129
|
}),
|
|
4050
4130
|
s && /* @__PURE__ */ t("div", {
|
|
4051
|
-
className:
|
|
4131
|
+
className: qn.headerActions,
|
|
4052
4132
|
children: s
|
|
4053
4133
|
}),
|
|
4054
4134
|
/* @__PURE__ */ t(j, {
|
|
@@ -4057,7 +4137,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4057
4137
|
"aria-label": v,
|
|
4058
4138
|
disabled: g,
|
|
4059
4139
|
onClick: () => T("close-button"),
|
|
4060
|
-
children: /* @__PURE__ */ t(
|
|
4140
|
+
children: /* @__PURE__ */ t(q, {
|
|
4061
4141
|
name: "IconCross",
|
|
4062
4142
|
width: 20,
|
|
4063
4143
|
height: 20
|
|
@@ -4066,11 +4146,11 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4066
4146
|
]
|
|
4067
4147
|
}),
|
|
4068
4148
|
/* @__PURE__ */ t("div", {
|
|
4069
|
-
className:
|
|
4149
|
+
className: qn.content,
|
|
4070
4150
|
children: i
|
|
4071
4151
|
}),
|
|
4072
4152
|
c && /* @__PURE__ */ t("footer", {
|
|
4073
|
-
className:
|
|
4153
|
+
className: qn.footer,
|
|
4074
4154
|
children: c
|
|
4075
4155
|
})
|
|
4076
4156
|
]
|
|
@@ -4078,17 +4158,17 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4078
4158
|
})
|
|
4079
4159
|
})
|
|
4080
4160
|
}), document.body);
|
|
4081
|
-
},
|
|
4161
|
+
}, $n = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Qn, {
|
|
4082
4162
|
...n,
|
|
4083
4163
|
placement: e
|
|
4084
|
-
}),
|
|
4164
|
+
}), er = (e) => /* @__PURE__ */ t(Qn, {
|
|
4085
4165
|
...e,
|
|
4086
4166
|
placement: "bottom"
|
|
4087
|
-
}),
|
|
4167
|
+
}), tr = (e) => /* @__PURE__ */ t(Qn, {
|
|
4088
4168
|
...e,
|
|
4089
4169
|
placement: "fullscreen",
|
|
4090
4170
|
size: "xl"
|
|
4091
|
-
}),
|
|
4171
|
+
}), nr = {
|
|
4092
4172
|
wrapper: "_wrapper_1hyyy_1",
|
|
4093
4173
|
container: "_container_1hyyy_15",
|
|
4094
4174
|
inner: "_inner_1hyyy_35",
|
|
@@ -4103,29 +4183,29 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4103
4183
|
empty: "_empty_1hyyy_153",
|
|
4104
4184
|
destructive: "_destructive_1hyyy_161",
|
|
4105
4185
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
4106
|
-
},
|
|
4107
|
-
className:
|
|
4186
|
+
}, rr = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4187
|
+
className: nr.wrapper,
|
|
4108
4188
|
children: /* @__PURE__ */ t("div", {
|
|
4109
|
-
className:
|
|
4189
|
+
className: nr.container,
|
|
4110
4190
|
children: /* @__PURE__ */ n("div", {
|
|
4111
|
-
className:
|
|
4191
|
+
className: nr.inner,
|
|
4112
4192
|
children: [
|
|
4113
4193
|
/* @__PURE__ */ t("div", {
|
|
4114
|
-
className:
|
|
4115
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4194
|
+
className: nr.cube,
|
|
4195
|
+
children: /* @__PURE__ */ t("div", { className: `${nr.cube__inner} ${nr[e]}` })
|
|
4116
4196
|
}),
|
|
4117
4197
|
/* @__PURE__ */ t("div", {
|
|
4118
|
-
className:
|
|
4119
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4198
|
+
className: nr.cube,
|
|
4199
|
+
children: /* @__PURE__ */ t("div", { className: `${nr.cube__inner} ${nr[e]}` })
|
|
4120
4200
|
}),
|
|
4121
4201
|
/* @__PURE__ */ t("div", {
|
|
4122
|
-
className:
|
|
4123
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4202
|
+
className: nr.cube,
|
|
4203
|
+
children: /* @__PURE__ */ t("div", { className: `${nr.cube__inner} ${nr[e]}` })
|
|
4124
4204
|
})
|
|
4125
4205
|
]
|
|
4126
4206
|
})
|
|
4127
4207
|
})
|
|
4128
|
-
}),
|
|
4208
|
+
}), ir = {
|
|
4129
4209
|
viewport: "_viewport_bu4eh_1",
|
|
4130
4210
|
"top-right": "_top-right_bu4eh_21",
|
|
4131
4211
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -4141,12 +4221,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4141
4221
|
success: "_success_bu4eh_195",
|
|
4142
4222
|
warning: "_warning_bu4eh_203",
|
|
4143
4223
|
error: "_error_bu4eh_211"
|
|
4144
|
-
},
|
|
4224
|
+
}, ar = {
|
|
4145
4225
|
info: "IconInfoCircle",
|
|
4146
4226
|
success: "IconSuccessCircle",
|
|
4147
4227
|
warning: "IconWarning",
|
|
4148
4228
|
error: "IconWarning"
|
|
4149
|
-
},
|
|
4229
|
+
}, or = ({ toast: e, onClose: r }) => {
|
|
4150
4230
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4151
4231
|
return d(() => {
|
|
4152
4232
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4166,7 +4246,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4166
4246
|
let e = () => s(document.hidden);
|
|
4167
4247
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4168
4248
|
}, []), /* @__PURE__ */ n("article", {
|
|
4169
|
-
className: `${
|
|
4249
|
+
className: `${ir.toast} ${ir[e.variant]}`,
|
|
4170
4250
|
role: e.variant === "error" ? "alert" : "status",
|
|
4171
4251
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4172
4252
|
onMouseEnter: () => a(!0),
|
|
@@ -4175,24 +4255,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4175
4255
|
onBlur: () => a(!1),
|
|
4176
4256
|
children: [
|
|
4177
4257
|
/* @__PURE__ */ t("div", {
|
|
4178
|
-
className:
|
|
4258
|
+
className: ir.icon,
|
|
4179
4259
|
"aria-hidden": "true",
|
|
4180
|
-
children: /* @__PURE__ */ t(
|
|
4181
|
-
name:
|
|
4260
|
+
children: /* @__PURE__ */ t(q, {
|
|
4261
|
+
name: ar[e.variant],
|
|
4182
4262
|
color: "var(--ds-toast-accent)",
|
|
4183
4263
|
width: 20,
|
|
4184
4264
|
height: 20
|
|
4185
4265
|
})
|
|
4186
4266
|
}),
|
|
4187
4267
|
/* @__PURE__ */ n("div", {
|
|
4188
|
-
className:
|
|
4268
|
+
className: ir.body,
|
|
4189
4269
|
children: [
|
|
4190
4270
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4191
|
-
className:
|
|
4271
|
+
className: ir.title,
|
|
4192
4272
|
children: e.title
|
|
4193
4273
|
}),
|
|
4194
4274
|
/* @__PURE__ */ t("div", {
|
|
4195
|
-
className:
|
|
4275
|
+
className: ir.message,
|
|
4196
4276
|
children: e.message
|
|
4197
4277
|
}),
|
|
4198
4278
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -4210,7 +4290,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4210
4290
|
size: "sm",
|
|
4211
4291
|
"aria-label": "Закрыть уведомление",
|
|
4212
4292
|
onClick: () => r(e.id),
|
|
4213
|
-
children: /* @__PURE__ */ t(
|
|
4293
|
+
children: /* @__PURE__ */ t(q, {
|
|
4214
4294
|
name: "IconCross",
|
|
4215
4295
|
width: 20,
|
|
4216
4296
|
height: 20
|
|
@@ -4218,15 +4298,15 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4218
4298
|
})
|
|
4219
4299
|
]
|
|
4220
4300
|
});
|
|
4221
|
-
},
|
|
4301
|
+
}, sr = 0, cr = S((e, t) => ({
|
|
4222
4302
|
toasts: [],
|
|
4223
4303
|
showToast: (n) => {
|
|
4224
4304
|
if (n.dedupeKey) {
|
|
4225
4305
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4226
4306
|
if (e) return e.id;
|
|
4227
4307
|
}
|
|
4228
|
-
|
|
4229
|
-
let r = `ds-toast-${
|
|
4308
|
+
sr += 1;
|
|
4309
|
+
let r = `ds-toast-${sr}`;
|
|
4230
4310
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4231
4311
|
variant: "info",
|
|
4232
4312
|
duration: 5e3,
|
|
@@ -4237,18 +4317,18 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4237
4317
|
},
|
|
4238
4318
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4239
4319
|
clearToasts: () => e({ toasts: [] })
|
|
4240
|
-
})),
|
|
4241
|
-
let r =
|
|
4320
|
+
})), lr = () => cr.setState({ toasts: [] }), ur = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4321
|
+
let r = cr((e) => e.toasts), i = cr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4242
4322
|
return /* @__PURE__ */ t("div", {
|
|
4243
|
-
className: `${
|
|
4323
|
+
className: `${ir.viewport} ${ir[e]}`,
|
|
4244
4324
|
"aria-label": "Уведомления",
|
|
4245
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4325
|
+
children: a.map((e) => /* @__PURE__ */ t(or, {
|
|
4246
4326
|
toast: e,
|
|
4247
4327
|
onClose: i
|
|
4248
4328
|
}, e.id))
|
|
4249
4329
|
});
|
|
4250
|
-
},
|
|
4251
|
-
let e =
|
|
4330
|
+
}, dr = () => {
|
|
4331
|
+
let e = cr((e) => e.showToast), t = cr((e) => e.removeToast), n = cr((e) => e.clearToasts), r = l((t) => e({
|
|
4252
4332
|
...t,
|
|
4253
4333
|
variant: "info"
|
|
4254
4334
|
}), [e]), i = l((t) => e({
|
|
@@ -4278,24 +4358,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4278
4358
|
i,
|
|
4279
4359
|
a
|
|
4280
4360
|
]);
|
|
4281
|
-
},
|
|
4361
|
+
}, fr = {
|
|
4282
4362
|
root: "_root_ncmxp_1",
|
|
4283
4363
|
tooltip: "_tooltip_ncmxp_11",
|
|
4284
4364
|
"ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
|
|
4285
|
-
},
|
|
4365
|
+
}, pr = 8, mr = 16, hr = {
|
|
4286
4366
|
top: "bottom",
|
|
4287
4367
|
right: "left",
|
|
4288
4368
|
bottom: "top",
|
|
4289
4369
|
left: "right"
|
|
4290
|
-
},
|
|
4370
|
+
}, gr = (e, t, n) => e === "top" ? t.top >= n.height + pr + mr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + pr + mr : e === "left" ? t.left >= n.width + pr + mr : window.innerWidth - t.right >= n.width + pr + mr, _r = (e, t, n) => {
|
|
4291
4371
|
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4292
|
-
let r =
|
|
4293
|
-
return r === "top" && (a = t.top - n.height -
|
|
4372
|
+
let r = gr(e, t, n) ? e : gr(hr[e], t, n) ? hr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4373
|
+
return r === "top" && (a = t.top - n.height - pr), r === "bottom" && (a = t.bottom + pr), r === "left" && (i = t.left - n.width - pr), r === "right" && (i = t.right + pr), i = Math.min(Math.max(i, mr), Math.max(mr, window.innerWidth - n.width - mr)), a = Math.min(Math.max(a, mr), Math.max(mr, window.innerHeight - n.height - mr)), {
|
|
4294
4374
|
left: i,
|
|
4295
4375
|
top: a,
|
|
4296
4376
|
visibility: "visible"
|
|
4297
4377
|
};
|
|
4298
|
-
},
|
|
4378
|
+
}, vr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4299
4379
|
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4300
4380
|
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4301
4381
|
}, []), E = l(() => {
|
|
@@ -4313,7 +4393,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4313
4393
|
let e = () => {
|
|
4314
4394
|
let e = w.current;
|
|
4315
4395
|
if (!e || !x) return;
|
|
4316
|
-
let t =
|
|
4396
|
+
let t = _r(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4317
4397
|
if (!t) {
|
|
4318
4398
|
T();
|
|
4319
4399
|
return;
|
|
@@ -4350,24 +4430,24 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4350
4430
|
});
|
|
4351
4431
|
return /* @__PURE__ */ n("span", {
|
|
4352
4432
|
ref: w,
|
|
4353
|
-
className: `${
|
|
4433
|
+
className: `${fr.root} ${p}`,
|
|
4354
4434
|
onPointerDown: _ ? T : E,
|
|
4355
|
-
children: [O, _ && /* @__PURE__ */ t(
|
|
4435
|
+
children: [O, _ && /* @__PURE__ */ t(dn, { children: /* @__PURE__ */ t("span", {
|
|
4356
4436
|
ref: S,
|
|
4357
4437
|
id: m,
|
|
4358
4438
|
role: "tooltip",
|
|
4359
|
-
className:
|
|
4439
|
+
className: fr.tooltip,
|
|
4360
4440
|
style: D,
|
|
4361
4441
|
children: e
|
|
4362
4442
|
}) })]
|
|
4363
4443
|
});
|
|
4364
|
-
},
|
|
4444
|
+
}, yr = {
|
|
4365
4445
|
root: "_root_bs28m_1",
|
|
4366
4446
|
tabList: "_tabList_bs28m_11",
|
|
4367
4447
|
tab: "_tab_bs28m_11",
|
|
4368
4448
|
panels: "_panels_bs28m_127",
|
|
4369
4449
|
panel: "_panel_bs28m_127"
|
|
4370
|
-
},
|
|
4450
|
+
}, br = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4371
4451
|
let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
|
|
4372
4452
|
let n = e[t];
|
|
4373
4453
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4397,10 +4477,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4397
4477
|
t.preventDefault(), _(a);
|
|
4398
4478
|
};
|
|
4399
4479
|
return /* @__PURE__ */ n("div", {
|
|
4400
|
-
className: `${
|
|
4480
|
+
className: `${yr.root} ${c}`,
|
|
4401
4481
|
"aria-busy": s || void 0,
|
|
4402
4482
|
children: [/* @__PURE__ */ t("div", {
|
|
4403
|
-
className:
|
|
4483
|
+
className: yr.tabList,
|
|
4404
4484
|
role: "tablist",
|
|
4405
4485
|
"aria-label": a,
|
|
4406
4486
|
"aria-orientation": "horizontal",
|
|
@@ -4412,7 +4492,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4412
4492
|
u.current[n] = e;
|
|
4413
4493
|
},
|
|
4414
4494
|
id: a,
|
|
4415
|
-
className:
|
|
4495
|
+
className: yr.tab,
|
|
4416
4496
|
type: "button",
|
|
4417
4497
|
role: "tab",
|
|
4418
4498
|
"aria-selected": i,
|
|
@@ -4425,12 +4505,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4425
4505
|
}, e.id);
|
|
4426
4506
|
})
|
|
4427
4507
|
}), /* @__PURE__ */ t("div", {
|
|
4428
|
-
className:
|
|
4508
|
+
className: yr.panels,
|
|
4429
4509
|
children: e.map((e, n) => {
|
|
4430
4510
|
let i = e.id === r;
|
|
4431
4511
|
return /* @__PURE__ */ t("div", {
|
|
4432
4512
|
id: `${l}-panel-${n}`,
|
|
4433
|
-
className:
|
|
4513
|
+
className: yr.panel,
|
|
4434
4514
|
role: "tabpanel",
|
|
4435
4515
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4436
4516
|
tabIndex: 0,
|
|
@@ -4440,7 +4520,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4440
4520
|
})
|
|
4441
4521
|
})]
|
|
4442
4522
|
});
|
|
4443
|
-
},
|
|
4523
|
+
}, xr = (e) => {
|
|
4444
4524
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4445
4525
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4446
4526
|
return n ? `${n}:${a}` : a;
|
|
@@ -4473,37 +4553,37 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4473
4553
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4474
4554
|
caption: "_caption_14cqp_705",
|
|
4475
4555
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4476
|
-
},
|
|
4556
|
+
}, Sr = 2500, Cr = 5, wr = .05, Tr = [
|
|
4477
4557
|
.5,
|
|
4478
4558
|
.75,
|
|
4479
4559
|
1,
|
|
4480
4560
|
1.25,
|
|
4481
4561
|
1.5,
|
|
4482
4562
|
2
|
|
4483
|
-
],
|
|
4484
|
-
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B,
|
|
4563
|
+
], Er = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
|
|
4564
|
+
let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, te] = g(1), [V, H] = g(!!v.muted), [ne, re] = g(1), [ie, ae] = g(!!v.loop), [oe, se] = g(-1), [ce, le] = g(!1), [ue, U] = g(!0), [de, fe] = g(!1), [pe, me] = g(!1), he = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), ge = i.map((e, t) => ({
|
|
4485
4565
|
track: e,
|
|
4486
4566
|
index: t
|
|
4487
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4488
|
-
|
|
4489
|
-
}, [A,
|
|
4567
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), _e = u ?? (C ? "Не удалось воспроизвести видео" : void 0), W = c || T && !_e && r.length > 0, ve = !W && !_e && r.length === 0, ye = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, be = l(() => {
|
|
4568
|
+
U(!0), window.clearTimeout(S.current), A && !ce && (S.current = window.setTimeout(() => U(!1), Sr));
|
|
4569
|
+
}, [A, ce]);
|
|
4490
4570
|
d(() => {
|
|
4491
4571
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
4492
|
-
}, [
|
|
4493
|
-
let e = () =>
|
|
4572
|
+
}, [he, r.length]), d(() => (be(), () => window.clearTimeout(S.current)), [be]), d(() => {
|
|
4573
|
+
let e = () => fe(document.fullscreenElement === b.current), t = () => me(document.pictureInPictureElement === x.current);
|
|
4494
4574
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4495
4575
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4496
4576
|
};
|
|
4497
4577
|
}, []), d(() => {
|
|
4498
|
-
if (!
|
|
4578
|
+
if (!ce) return;
|
|
4499
4579
|
let e = (e) => {
|
|
4500
|
-
y.current?.contains(e.target) ||
|
|
4580
|
+
y.current?.contains(e.target) || le(!1);
|
|
4501
4581
|
};
|
|
4502
4582
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4503
|
-
}, [
|
|
4504
|
-
let
|
|
4583
|
+
}, [ce]);
|
|
4584
|
+
let xe = async () => {
|
|
4505
4585
|
let e = x.current;
|
|
4506
|
-
if (!(!e ||
|
|
4586
|
+
if (!(!e || _e || W)) {
|
|
4507
4587
|
if (e.paused || e.ended) {
|
|
4508
4588
|
e.ended && (e.currentTime = 0);
|
|
4509
4589
|
try {
|
|
@@ -4513,60 +4593,60 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4513
4593
|
}
|
|
4514
4594
|
} else e.pause();
|
|
4515
4595
|
}
|
|
4516
|
-
},
|
|
4596
|
+
}, Se = () => {
|
|
4517
4597
|
let e = x.current;
|
|
4518
4598
|
e && (e.muted = !e.muted);
|
|
4519
|
-
},
|
|
4599
|
+
}, Ce = (e) => {
|
|
4520
4600
|
let t = x.current;
|
|
4521
4601
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4522
|
-
},
|
|
4602
|
+
}, we = (e) => {
|
|
4523
4603
|
let t = x.current;
|
|
4524
4604
|
!t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
|
|
4525
|
-
},
|
|
4605
|
+
}, Te = async () => {
|
|
4526
4606
|
if (b.current) try {
|
|
4527
4607
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4528
4608
|
} catch {
|
|
4529
|
-
|
|
4609
|
+
fe(!1);
|
|
4530
4610
|
}
|
|
4531
|
-
},
|
|
4611
|
+
}, Ee = async () => {
|
|
4532
4612
|
let e = x.current;
|
|
4533
|
-
if (!(!e || !
|
|
4613
|
+
if (!(!e || !ye)) try {
|
|
4534
4614
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4535
4615
|
} catch {
|
|
4536
|
-
|
|
4616
|
+
me(!1);
|
|
4537
4617
|
}
|
|
4538
|
-
},
|
|
4618
|
+
}, De = (e) => {
|
|
4539
4619
|
let t = x.current;
|
|
4540
4620
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4541
4621
|
t.mode = n === e ? "showing" : "disabled";
|
|
4542
|
-
}),
|
|
4543
|
-
},
|
|
4622
|
+
}), se(e));
|
|
4623
|
+
}, Oe = (e) => {
|
|
4544
4624
|
let t = e.target;
|
|
4545
4625
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4546
4626
|
let n = e.key.toLowerCase();
|
|
4547
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4548
|
-
},
|
|
4627
|
+
n === " " || n === "k" ? (e.preventDefault(), xe()) : n === "m" ? (e.preventDefault(), Se()) : n === "f" ? (e.preventDefault(), Te()) : n === "c" && ge.length ? (e.preventDefault(), De(oe === -1 ? ge[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), we(P + (e.key === "ArrowRight" ? Cr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), Ce(B + (e.key === "ArrowUp" ? wr : -.05))) : e.key === "Escape" && le(!1), be();
|
|
4628
|
+
}, ke = () => {
|
|
4549
4629
|
let e = x.current;
|
|
4550
4630
|
w(!1), E(!0), e?.load();
|
|
4551
|
-
},
|
|
4631
|
+
}, Ae = {
|
|
4552
4632
|
"--video-progress": `${I ? P / I * 100 : 0}%`,
|
|
4553
4633
|
"--video-buffered": `${R * 100}%`
|
|
4554
4634
|
};
|
|
4555
4635
|
return /* @__PURE__ */ n("figure", {
|
|
4556
4636
|
ref: y,
|
|
4557
4637
|
className: `${$.root} ${p}`,
|
|
4558
|
-
onKeyDown:
|
|
4638
|
+
onKeyDown: Oe,
|
|
4559
4639
|
children: [/* @__PURE__ */ n("div", {
|
|
4560
4640
|
ref: b,
|
|
4561
|
-
className: `${$.frame} ${
|
|
4641
|
+
className: `${$.frame} ${de ? $.fullscreen : ""}`,
|
|
4562
4642
|
style: { aspectRatio: o },
|
|
4563
|
-
"aria-busy":
|
|
4643
|
+
"aria-busy": W || void 0,
|
|
4564
4644
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4565
|
-
onPointerMove:
|
|
4566
|
-
onPointerDown:
|
|
4567
|
-
onFocusCapture:
|
|
4645
|
+
onPointerMove: be,
|
|
4646
|
+
onPointerDown: be,
|
|
4647
|
+
onFocusCapture: be,
|
|
4568
4648
|
onMouseLeave: () => {
|
|
4569
|
-
A && !
|
|
4649
|
+
A && !ce && U(!1);
|
|
4570
4650
|
},
|
|
4571
4651
|
children: [
|
|
4572
4652
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4575,22 +4655,22 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4575
4655
|
"aria-label": a,
|
|
4576
4656
|
controls: !1,
|
|
4577
4657
|
playsInline: _,
|
|
4578
|
-
loop:
|
|
4658
|
+
loop: ie,
|
|
4579
4659
|
className: $.video,
|
|
4580
4660
|
style: { objectFit: s },
|
|
4581
4661
|
onClick: (e) => {
|
|
4582
|
-
v.onClick?.(e),
|
|
4662
|
+
v.onClick?.(e), xe();
|
|
4583
4663
|
},
|
|
4584
4664
|
onDoubleClick: (e) => {
|
|
4585
|
-
v.onDoubleClick?.(e),
|
|
4665
|
+
v.onDoubleClick?.(e), Te();
|
|
4586
4666
|
},
|
|
4587
4667
|
onLoadStart: (e) => {
|
|
4588
4668
|
E(!0), v.onLoadStart?.(e);
|
|
4589
4669
|
},
|
|
4590
4670
|
onLoadedMetadata: (e) => {
|
|
4591
4671
|
L(e.currentTarget.duration || 0);
|
|
4592
|
-
let t =
|
|
4593
|
-
|
|
4672
|
+
let t = ge.find(({ track: e }) => e.default);
|
|
4673
|
+
De(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4594
4674
|
},
|
|
4595
4675
|
onDurationChange: (e) => {
|
|
4596
4676
|
L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
@@ -4621,20 +4701,20 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4621
4701
|
M(!1), v.onPause?.(e);
|
|
4622
4702
|
},
|
|
4623
4703
|
onEnded: (e) => {
|
|
4624
|
-
M(!1), N(!0),
|
|
4704
|
+
M(!1), N(!0), U(!0), v.onEnded?.(e);
|
|
4625
4705
|
},
|
|
4626
4706
|
onVolumeChange: (e) => {
|
|
4627
|
-
|
|
4707
|
+
te(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
4628
4708
|
},
|
|
4629
4709
|
onRateChange: (e) => {
|
|
4630
|
-
|
|
4710
|
+
re(e.currentTarget.playbackRate), v.onRateChange?.(e);
|
|
4631
4711
|
},
|
|
4632
4712
|
onError: (e) => {
|
|
4633
4713
|
E(!1), O(!1), w(!0), v.onError?.(e);
|
|
4634
4714
|
},
|
|
4635
4715
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4636
4716
|
}),
|
|
4637
|
-
|
|
4717
|
+
W && /* @__PURE__ */ n("div", {
|
|
4638
4718
|
className: $.overlay,
|
|
4639
4719
|
role: "status",
|
|
4640
4720
|
"aria-live": "polite",
|
|
@@ -4643,21 +4723,21 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4643
4723
|
"aria-hidden": "true",
|
|
4644
4724
|
children: /* @__PURE__ */ t("div", {
|
|
4645
4725
|
className: $.loaderScale,
|
|
4646
|
-
children: /* @__PURE__ */ t(
|
|
4726
|
+
children: /* @__PURE__ */ t(rr, {})
|
|
4647
4727
|
})
|
|
4648
4728
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4649
4729
|
}),
|
|
4650
|
-
!
|
|
4730
|
+
!W && D && !_e && /* @__PURE__ */ t("div", {
|
|
4651
4731
|
className: $.buffering,
|
|
4652
4732
|
role: "status",
|
|
4653
4733
|
"aria-label": "Буферизация видео",
|
|
4654
4734
|
children: /* @__PURE__ */ t(k, { variant: "primary" })
|
|
4655
4735
|
}),
|
|
4656
|
-
|
|
4736
|
+
ve && /* @__PURE__ */ n("div", {
|
|
4657
4737
|
className: `${$.state} ${$.empty}`,
|
|
4658
4738
|
role: "status",
|
|
4659
4739
|
children: [
|
|
4660
|
-
/* @__PURE__ */ t(
|
|
4740
|
+
/* @__PURE__ */ t(q, {
|
|
4661
4741
|
name: "IconInfoCircle",
|
|
4662
4742
|
className: $.stateIcon,
|
|
4663
4743
|
width: 40,
|
|
@@ -4667,62 +4747,62 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4667
4747
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4668
4748
|
]
|
|
4669
4749
|
}),
|
|
4670
|
-
!
|
|
4750
|
+
!W && _e && /* @__PURE__ */ n("div", {
|
|
4671
4751
|
className: `${$.state} ${$.error}`,
|
|
4672
4752
|
role: "alert",
|
|
4673
4753
|
children: [
|
|
4674
|
-
/* @__PURE__ */ t(
|
|
4754
|
+
/* @__PURE__ */ t(q, {
|
|
4675
4755
|
name: "IconWarning",
|
|
4676
4756
|
className: $.stateIcon,
|
|
4677
4757
|
width: 40,
|
|
4678
4758
|
height: 40
|
|
4679
4759
|
}),
|
|
4680
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4760
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: _e })] }),
|
|
4681
4761
|
r.length > 0 && /* @__PURE__ */ t(j, {
|
|
4682
4762
|
size: "sm",
|
|
4683
4763
|
variant: "secondary",
|
|
4684
|
-
onClick:
|
|
4764
|
+
onClick: ke,
|
|
4685
4765
|
children: "Повторить"
|
|
4686
4766
|
})
|
|
4687
4767
|
]
|
|
4688
4768
|
}),
|
|
4689
|
-
!
|
|
4769
|
+
!W && !_e && ee && /* @__PURE__ */ t("button", {
|
|
4690
4770
|
type: "button",
|
|
4691
4771
|
className: $.replay,
|
|
4692
4772
|
"aria-label": "Воспроизвести заново",
|
|
4693
|
-
onClick: () => void
|
|
4694
|
-
children: /* @__PURE__ */ t(
|
|
4773
|
+
onClick: () => void xe(),
|
|
4774
|
+
children: /* @__PURE__ */ t(q, {
|
|
4695
4775
|
name: "IconReplay",
|
|
4696
4776
|
width: 28,
|
|
4697
4777
|
height: 28
|
|
4698
4778
|
})
|
|
4699
4779
|
}),
|
|
4700
|
-
m && r.length > 0 && !
|
|
4701
|
-
className: `${$.controlsLayer} ${
|
|
4780
|
+
m && r.length > 0 && !W && !_e && /* @__PURE__ */ n("div", {
|
|
4781
|
+
className: `${$.controlsLayer} ${ue || !A ? $.controlsVisible : ""}`,
|
|
4702
4782
|
onClick: (e) => e.stopPropagation(),
|
|
4703
|
-
children: [
|
|
4783
|
+
children: [ce && /* @__PURE__ */ n("div", {
|
|
4704
4784
|
className: $.settings,
|
|
4705
4785
|
role: "dialog",
|
|
4706
4786
|
"aria-label": "Настройки видео",
|
|
4707
4787
|
children: [
|
|
4708
4788
|
/* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
|
|
4709
|
-
value:
|
|
4789
|
+
value: ne,
|
|
4710
4790
|
onChange: (e) => {
|
|
4711
4791
|
let t = Number(e.target.value);
|
|
4712
4792
|
x.current && (x.current.playbackRate = t);
|
|
4713
4793
|
},
|
|
4714
|
-
children:
|
|
4794
|
+
children: Tr.map((e) => /* @__PURE__ */ n("option", {
|
|
4715
4795
|
value: e,
|
|
4716
4796
|
children: [e, "×"]
|
|
4717
4797
|
}, e))
|
|
4718
4798
|
})] }),
|
|
4719
|
-
|
|
4720
|
-
value:
|
|
4721
|
-
onChange: (e) =>
|
|
4799
|
+
ge.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4800
|
+
value: oe,
|
|
4801
|
+
onChange: (e) => De(Number(e.target.value)),
|
|
4722
4802
|
children: [/* @__PURE__ */ t("option", {
|
|
4723
4803
|
value: -1,
|
|
4724
4804
|
children: "Выключены"
|
|
4725
|
-
}),
|
|
4805
|
+
}), ge.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4726
4806
|
value: n,
|
|
4727
4807
|
children: e.label
|
|
4728
4808
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4730,18 +4810,18 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4730
4810
|
/* @__PURE__ */ n("button", {
|
|
4731
4811
|
type: "button",
|
|
4732
4812
|
className: $.settingsAction,
|
|
4733
|
-
"aria-pressed":
|
|
4734
|
-
onClick: () =>
|
|
4735
|
-
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children:
|
|
4813
|
+
"aria-pressed": ie,
|
|
4814
|
+
onClick: () => ae((e) => !e),
|
|
4815
|
+
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ie ? "Вкл." : "Выкл." })]
|
|
4736
4816
|
}),
|
|
4737
|
-
|
|
4817
|
+
ye && /* @__PURE__ */ t("button", {
|
|
4738
4818
|
type: "button",
|
|
4739
4819
|
className: $.settingsAction,
|
|
4740
|
-
"aria-pressed":
|
|
4741
|
-
onClick: () => void
|
|
4820
|
+
"aria-pressed": pe,
|
|
4821
|
+
onClick: () => void Ee(),
|
|
4742
4822
|
children: /* @__PURE__ */ n("span", {
|
|
4743
4823
|
className: $.settingsActionLabel,
|
|
4744
|
-
children: [/* @__PURE__ */ t(
|
|
4824
|
+
children: [/* @__PURE__ */ t(q, {
|
|
4745
4825
|
name: "IconPictureInPicture",
|
|
4746
4826
|
width: 18,
|
|
4747
4827
|
height: 18
|
|
@@ -4759,8 +4839,8 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4759
4839
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4760
4840
|
"aria-label": A ? "Пауза" : "Воспроизвести",
|
|
4761
4841
|
title: A ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4762
|
-
onClick: () => void
|
|
4763
|
-
children: /* @__PURE__ */ t(
|
|
4842
|
+
onClick: () => void xe(),
|
|
4843
|
+
children: /* @__PURE__ */ t(q, {
|
|
4764
4844
|
name: A ? "IconPause" : "IconPlay",
|
|
4765
4845
|
width: 24,
|
|
4766
4846
|
height: 24
|
|
@@ -4772,12 +4852,12 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4772
4852
|
children: [/* @__PURE__ */ t("button", {
|
|
4773
4853
|
type: "button",
|
|
4774
4854
|
className: $.controlButton,
|
|
4775
|
-
"aria-label":
|
|
4776
|
-
"aria-pressed":
|
|
4855
|
+
"aria-label": V ? "Включить звук" : "Выключить звук",
|
|
4856
|
+
"aria-pressed": V,
|
|
4777
4857
|
title: "Звук (M)",
|
|
4778
|
-
onClick:
|
|
4779
|
-
children: /* @__PURE__ */ t(
|
|
4780
|
-
name:
|
|
4858
|
+
onClick: Se,
|
|
4859
|
+
children: /* @__PURE__ */ t(q, {
|
|
4860
|
+
name: V || B === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4781
4861
|
width: 22,
|
|
4782
4862
|
height: 22
|
|
4783
4863
|
})
|
|
@@ -4787,10 +4867,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4787
4867
|
min: 0,
|
|
4788
4868
|
max: 1,
|
|
4789
4869
|
step: .05,
|
|
4790
|
-
value:
|
|
4870
|
+
value: V ? 0 : B,
|
|
4791
4871
|
"aria-label": "Громкость",
|
|
4792
|
-
"aria-valuetext": `${Math.round((
|
|
4793
|
-
onChange: (e) =>
|
|
4872
|
+
"aria-valuetext": `${Math.round((V ? 0 : B) * 100)}%`,
|
|
4873
|
+
onChange: (e) => Ce(Number(e.target.value))
|
|
4794
4874
|
})]
|
|
4795
4875
|
}),
|
|
4796
4876
|
/* @__PURE__ */ n("div", {
|
|
@@ -4798,23 +4878,23 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4798
4878
|
children: [
|
|
4799
4879
|
/* @__PURE__ */ t("span", {
|
|
4800
4880
|
className: $.time,
|
|
4801
|
-
children:
|
|
4881
|
+
children: xr(P)
|
|
4802
4882
|
}),
|
|
4803
4883
|
/* @__PURE__ */ t("input", {
|
|
4804
4884
|
className: $.timeline,
|
|
4805
|
-
style:
|
|
4885
|
+
style: Ae,
|
|
4806
4886
|
type: "range",
|
|
4807
4887
|
min: 0,
|
|
4808
4888
|
max: I || 0,
|
|
4809
4889
|
step: .01,
|
|
4810
4890
|
value: Math.min(P, I || 0),
|
|
4811
4891
|
"aria-label": "Позиция воспроизведения",
|
|
4812
|
-
"aria-valuetext": `${
|
|
4813
|
-
onChange: (e) =>
|
|
4892
|
+
"aria-valuetext": `${xr(P)} из ${xr(I)}`,
|
|
4893
|
+
onChange: (e) => we(Number(e.target.value))
|
|
4814
4894
|
}),
|
|
4815
4895
|
/* @__PURE__ */ t("span", {
|
|
4816
4896
|
className: $.time,
|
|
4817
|
-
children:
|
|
4897
|
+
children: xr(I)
|
|
4818
4898
|
})
|
|
4819
4899
|
]
|
|
4820
4900
|
}),
|
|
@@ -4824,10 +4904,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4824
4904
|
type: "button",
|
|
4825
4905
|
className: $.controlButton,
|
|
4826
4906
|
"aria-label": "Настройки",
|
|
4827
|
-
"aria-expanded":
|
|
4907
|
+
"aria-expanded": ce,
|
|
4828
4908
|
title: "Настройки",
|
|
4829
|
-
onClick: () =>
|
|
4830
|
-
children: /* @__PURE__ */ t(
|
|
4909
|
+
onClick: () => le((e) => !e),
|
|
4910
|
+
children: /* @__PURE__ */ t(q, {
|
|
4831
4911
|
name: "IconSettings",
|
|
4832
4912
|
width: 22,
|
|
4833
4913
|
height: 22
|
|
@@ -4835,11 +4915,11 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4835
4915
|
}), /* @__PURE__ */ t("button", {
|
|
4836
4916
|
type: "button",
|
|
4837
4917
|
className: $.controlButton,
|
|
4838
|
-
"aria-label":
|
|
4918
|
+
"aria-label": de ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4839
4919
|
title: "Полноэкранный режим (F)",
|
|
4840
|
-
onClick: () => void
|
|
4841
|
-
children: /* @__PURE__ */ t(
|
|
4842
|
-
name:
|
|
4920
|
+
onClick: () => void Te(),
|
|
4921
|
+
children: /* @__PURE__ */ t(q, {
|
|
4922
|
+
name: de ? "IconFullscreenExit" : "IconFullscreen",
|
|
4843
4923
|
width: 22,
|
|
4844
4924
|
height: 22
|
|
4845
4925
|
})
|
|
@@ -4854,7 +4934,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4854
4934
|
children: a
|
|
4855
4935
|
})]
|
|
4856
4936
|
});
|
|
4857
|
-
},
|
|
4937
|
+
}, Dr = {
|
|
4858
4938
|
root: "_root_ymidq_1",
|
|
4859
4939
|
trigger: "_trigger_ymidq_15",
|
|
4860
4940
|
heading: "_heading_ymidq_41",
|
|
@@ -4864,7 +4944,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4864
4944
|
open: "_open_ymidq_91",
|
|
4865
4945
|
content: "_content_ymidq_99",
|
|
4866
4946
|
contentInner: "_contentInner_ymidq_119"
|
|
4867
|
-
},
|
|
4947
|
+
}, Or = (e, t, n, r = 16) => {
|
|
4868
4948
|
if (t > Math.max(0, n - r * 2)) {
|
|
4869
4949
|
let t = e - r;
|
|
4870
4950
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4886,7 +4966,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4886
4966
|
alignment: "none",
|
|
4887
4967
|
delta: 0
|
|
4888
4968
|
};
|
|
4889
|
-
},
|
|
4969
|
+
}, kr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4890
4970
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4891
4971
|
return d(() => {
|
|
4892
4972
|
let e = x.current;
|
|
@@ -4896,7 +4976,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4896
4976
|
let r = !1, i = () => {
|
|
4897
4977
|
if (r) return;
|
|
4898
4978
|
r = !0;
|
|
4899
|
-
let e = t.getBoundingClientRect(), n =
|
|
4979
|
+
let e = t.getBoundingClientRect(), n = Or(e.top, e.height, window.innerHeight, l);
|
|
4900
4980
|
if (n.alignment === "none") return;
|
|
4901
4981
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4902
4982
|
window.scrollBy({
|
|
@@ -4917,10 +4997,10 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4917
4997
|
l
|
|
4918
4998
|
]), /* @__PURE__ */ n("section", {
|
|
4919
4999
|
ref: y,
|
|
4920
|
-
className: `${
|
|
5000
|
+
className: `${Dr.root} ${v ? Dr.open : ""} ${u}`,
|
|
4921
5001
|
children: [/* @__PURE__ */ n("button", {
|
|
4922
5002
|
type: "button",
|
|
4923
|
-
className:
|
|
5003
|
+
className: Dr.trigger,
|
|
4924
5004
|
"aria-expanded": v,
|
|
4925
5005
|
"aria-controls": p,
|
|
4926
5006
|
onClick: () => {
|
|
@@ -4928,18 +5008,18 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4928
5008
|
o === void 0 && _(e), s?.(e);
|
|
4929
5009
|
},
|
|
4930
5010
|
children: [/* @__PURE__ */ n("span", {
|
|
4931
|
-
className:
|
|
5011
|
+
className: Dr.heading,
|
|
4932
5012
|
children: [/* @__PURE__ */ t("span", {
|
|
4933
|
-
className:
|
|
5013
|
+
className: Dr.title,
|
|
4934
5014
|
children: e
|
|
4935
5015
|
}), r && /* @__PURE__ */ t("span", {
|
|
4936
|
-
className:
|
|
5016
|
+
className: Dr.subtitle,
|
|
4937
5017
|
children: r
|
|
4938
5018
|
})]
|
|
4939
5019
|
}), /* @__PURE__ */ t("span", {
|
|
4940
|
-
className:
|
|
5020
|
+
className: Dr.icon,
|
|
4941
5021
|
"aria-hidden": "true",
|
|
4942
|
-
children: /* @__PURE__ */ t(
|
|
5022
|
+
children: /* @__PURE__ */ t(q, {
|
|
4943
5023
|
name: "IconChevron",
|
|
4944
5024
|
width: 20,
|
|
4945
5025
|
height: 20
|
|
@@ -4948,15 +5028,15 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4948
5028
|
}), /* @__PURE__ */ t("div", {
|
|
4949
5029
|
ref: b,
|
|
4950
5030
|
id: p,
|
|
4951
|
-
className:
|
|
5031
|
+
className: Dr.content,
|
|
4952
5032
|
"aria-hidden": !v,
|
|
4953
5033
|
children: /* @__PURE__ */ t("div", {
|
|
4954
|
-
className:
|
|
5034
|
+
className: Dr.contentInner,
|
|
4955
5035
|
children: i
|
|
4956
5036
|
})
|
|
4957
5037
|
})]
|
|
4958
5038
|
});
|
|
4959
|
-
},
|
|
5039
|
+
}, Ar = {
|
|
4960
5040
|
root: "_root_14ewt_1",
|
|
4961
5041
|
topSlot: "_topSlot_14ewt_29",
|
|
4962
5042
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -4974,14 +5054,14 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4974
5054
|
description: "_description_14ewt_235",
|
|
4975
5055
|
badge: "_badge_14ewt_269",
|
|
4976
5056
|
empty: "_empty_14ewt_281"
|
|
4977
|
-
},
|
|
5057
|
+
}, jr = (e, t, n) => {
|
|
4978
5058
|
if (e.length === 0) return -1;
|
|
4979
5059
|
for (let r = 1; r <= e.length; r += 1) {
|
|
4980
5060
|
let i = (t + n * r + e.length) % e.length;
|
|
4981
5061
|
if (!e[i]?.disabled) return i;
|
|
4982
5062
|
}
|
|
4983
5063
|
return -1;
|
|
4984
|
-
},
|
|
5064
|
+
}, Mr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
4985
5065
|
let m = f(), g = h(null), _ = h({
|
|
4986
5066
|
value: "",
|
|
4987
5067
|
time: 0
|
|
@@ -4993,7 +5073,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4993
5073
|
let n = v.findIndex((e) => e.id === t.id);
|
|
4994
5074
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
4995
5075
|
e.preventDefault();
|
|
4996
|
-
let t =
|
|
5076
|
+
let t = jr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
4997
5077
|
x(v[t]);
|
|
4998
5078
|
return;
|
|
4999
5079
|
}
|
|
@@ -5013,26 +5093,26 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5013
5093
|
let a = r.id === i, o = {
|
|
5014
5094
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5015
5095
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5016
|
-
className:
|
|
5096
|
+
className: Ar.icon,
|
|
5017
5097
|
"aria-hidden": "true",
|
|
5018
5098
|
children: r.icon
|
|
5019
5099
|
}),
|
|
5020
5100
|
/* @__PURE__ */ n("span", {
|
|
5021
|
-
className:
|
|
5101
|
+
className: Ar.copy,
|
|
5022
5102
|
children: [/* @__PURE__ */ t("span", {
|
|
5023
|
-
className:
|
|
5103
|
+
className: Ar.label,
|
|
5024
5104
|
children: r.label
|
|
5025
5105
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5026
|
-
className:
|
|
5106
|
+
className: Ar.description,
|
|
5027
5107
|
children: r.description
|
|
5028
5108
|
})]
|
|
5029
5109
|
}),
|
|
5030
5110
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5031
|
-
className:
|
|
5111
|
+
className: Ar.badge,
|
|
5032
5112
|
children: r.badge
|
|
5033
5113
|
})
|
|
5034
5114
|
] }),
|
|
5035
|
-
className: `${
|
|
5115
|
+
className: `${Ar.link} ${a ? Ar.current : ""}`,
|
|
5036
5116
|
tabIndex: r.id === b ? 0 : -1,
|
|
5037
5117
|
"aria-current": a ? "page" : void 0,
|
|
5038
5118
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5048,7 +5128,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5048
5128
|
onKeyDown: (e) => S(e, r)
|
|
5049
5129
|
};
|
|
5050
5130
|
return /* @__PURE__ */ t("li", {
|
|
5051
|
-
className:
|
|
5131
|
+
className: Ar.item,
|
|
5052
5132
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5053
5133
|
href: r.href,
|
|
5054
5134
|
...o,
|
|
@@ -5063,45 +5143,45 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5063
5143
|
};
|
|
5064
5144
|
return /* @__PURE__ */ n("nav", {
|
|
5065
5145
|
ref: g,
|
|
5066
|
-
className: `${
|
|
5146
|
+
className: `${Ar.root} ${p}`,
|
|
5067
5147
|
"aria-label": a,
|
|
5068
5148
|
children: [
|
|
5069
5149
|
s && /* @__PURE__ */ t("div", {
|
|
5070
|
-
className:
|
|
5150
|
+
className: Ar.topSlot,
|
|
5071
5151
|
children: s
|
|
5072
5152
|
}),
|
|
5073
5153
|
o && /* @__PURE__ */ t("div", {
|
|
5074
|
-
className:
|
|
5154
|
+
className: Ar.searchSlot,
|
|
5075
5155
|
children: o
|
|
5076
5156
|
}),
|
|
5077
5157
|
/* @__PURE__ */ n("div", {
|
|
5078
|
-
className:
|
|
5158
|
+
className: Ar.groups,
|
|
5079
5159
|
children: [r.map((e) => {
|
|
5080
5160
|
let r = `${m}-${e.id}`;
|
|
5081
5161
|
return /* @__PURE__ */ n("section", {
|
|
5082
|
-
className:
|
|
5162
|
+
className: Ar.group,
|
|
5083
5163
|
"aria-labelledby": e.label ? r : void 0,
|
|
5084
5164
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5085
5165
|
id: r,
|
|
5086
|
-
className:
|
|
5166
|
+
className: Ar.groupLabel,
|
|
5087
5167
|
children: e.label
|
|
5088
5168
|
}), /* @__PURE__ */ t("ul", {
|
|
5089
|
-
className:
|
|
5169
|
+
className: Ar.list,
|
|
5090
5170
|
children: e.items.map(C)
|
|
5091
5171
|
})]
|
|
5092
5172
|
}, e.id);
|
|
5093
5173
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5094
|
-
className:
|
|
5174
|
+
className: Ar.empty,
|
|
5095
5175
|
children: l
|
|
5096
5176
|
})]
|
|
5097
5177
|
}),
|
|
5098
5178
|
c && /* @__PURE__ */ t("div", {
|
|
5099
|
-
className:
|
|
5179
|
+
className: Ar.bottomSlot,
|
|
5100
5180
|
children: c
|
|
5101
5181
|
})
|
|
5102
5182
|
]
|
|
5103
5183
|
});
|
|
5104
|
-
},
|
|
5184
|
+
}, Nr = {
|
|
5105
5185
|
root: "_root_2mdgb_1",
|
|
5106
5186
|
list: "_list_2mdgb_19",
|
|
5107
5187
|
item: "_item_2mdgb_37",
|
|
@@ -5111,7 +5191,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5111
5191
|
icon: "_icon_2mdgb_141",
|
|
5112
5192
|
badge: "_badge_2mdgb_149",
|
|
5113
5193
|
label: "_label_2mdgb_163"
|
|
5114
|
-
},
|
|
5194
|
+
}, Pr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5115
5195
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5116
5196
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5117
5197
|
}, p = (e, t) => {
|
|
@@ -5128,27 +5208,27 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5128
5208
|
};
|
|
5129
5209
|
return /* @__PURE__ */ t("nav", {
|
|
5130
5210
|
ref: l,
|
|
5131
|
-
className: `${
|
|
5211
|
+
className: `${Nr.root} ${c}`,
|
|
5132
5212
|
"aria-label": a,
|
|
5133
5213
|
children: /* @__PURE__ */ t("ul", {
|
|
5134
|
-
className:
|
|
5214
|
+
className: Nr.list,
|
|
5135
5215
|
children: r.map((r) => {
|
|
5136
5216
|
let a = r.id === i, c = {
|
|
5137
5217
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5138
|
-
className:
|
|
5218
|
+
className: Nr.visual,
|
|
5139
5219
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5140
|
-
className:
|
|
5220
|
+
className: Nr.icon,
|
|
5141
5221
|
"aria-hidden": "true",
|
|
5142
5222
|
children: r.icon
|
|
5143
5223
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5144
|
-
className:
|
|
5224
|
+
className: Nr.badge,
|
|
5145
5225
|
children: r.badge
|
|
5146
5226
|
})]
|
|
5147
5227
|
}), /* @__PURE__ */ t("span", {
|
|
5148
|
-
className:
|
|
5228
|
+
className: Nr.label,
|
|
5149
5229
|
children: r.label
|
|
5150
5230
|
})] }),
|
|
5151
|
-
className: `${
|
|
5231
|
+
className: `${Nr.link} ${a ? Nr.current : ""}`,
|
|
5152
5232
|
tabIndex: r.id === d ? 0 : -1,
|
|
5153
5233
|
"aria-current": a ? "page" : void 0,
|
|
5154
5234
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5164,7 +5244,7 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5164
5244
|
onKeyDown: (e) => p(e, r)
|
|
5165
5245
|
};
|
|
5166
5246
|
return /* @__PURE__ */ t("li", {
|
|
5167
|
-
className:
|
|
5247
|
+
className: Nr.item,
|
|
5168
5248
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5169
5249
|
href: r.href,
|
|
5170
5250
|
...c,
|
|
@@ -5181,4 +5261,4 @@ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5181
5261
|
});
|
|
5182
5262
|
};
|
|
5183
5263
|
//#endregion
|
|
5184
|
-
export {
|
|
5264
|
+
export { Rn as ConfirmModal, kr as DSAccordion, w as DSBadge, Pr as DSBottomNavigation, er as DSBottomSheet, j as DSButton, Fe as DSCheckbox, D as DSCounterBadge, Vt as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, $n as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, un as DSFileInput, en as DSFilters, pn as DSFloatingMenu, nn as DSFormGrid, rn as DSFormGridItem, tr as DSFullscreenDialog, q as DSIcon, Ne as DSIconNames, Qt as DSInfoBlock, mt as DSInput, k as DSLoader, Mn as DSModal, jn as DSModalFrame, Mr as DSNavigationSurface, Qn as DSOverlay, rr as DSPageLoader, dn as DSPortal, xt as DSRadioButton, Xt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, br as DSTabs, _n as DSTextarea, or as DSToast, ur as DSToastProvider, vr as DSTooltip, an as DSValidationSummary, Er as DSVideoPlayerFrame, zn as ErrorModal, Nn as ModalSystemProvider, Bn as builtInModalRegistry, Pn as defineModalRegistry, E as formatDSCounterValue, Be as formatDateInputValue, Ge as formatDateTimeLocalValue, Or as getDSAccordionScrollTarget, kt as getDSDataTableColumnStyle, jt as getDSDataTablePaginationItems, At as getDSDataTableStickyColumnStyle, Hn as getErrorMessage, Ot as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, X as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, bn as resetModalStore, lr as resetToastStore, Vn as useConfirmModal, Wn as useConfirmModalStore, Zn as useDSOverlay, Un as useErrorModal, Gn as useErrorModalStore, Kn as useModals, yn as useModalsStore, dr as useToast, cr as useToastStore, Mt as validateDSDataTableData };
|