@efficiency-point/design-system 0.1.47 → 0.1.48
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
|
+
}), V = ({ 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
|
+
}), H = (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
|
+
}), U = (e) => /* @__PURE__ */ t(P, {
|
|
200
200
|
...e,
|
|
201
201
|
children: /* @__PURE__ */ t("path", { d: "M4 20h4L19 9l-4-4L4 16v4z" })
|
|
202
|
-
}),
|
|
202
|
+
}), W = (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
|
+
}), te = (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
|
+
}), ne = (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
|
+
}), re = (e) => /* @__PURE__ */ t(P, {
|
|
220
220
|
...e,
|
|
221
221
|
children: /* @__PURE__ */ t("path", { d: "M12 10v7m0-10v.01" })
|
|
222
|
-
}),
|
|
222
|
+
}), ie = (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
|
+
}), ae = (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
|
+
}), oe = (e) => /* @__PURE__ */ t(P, {
|
|
239
239
|
...e,
|
|
240
240
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
241
|
-
}),
|
|
241
|
+
}), se = (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
|
+
}), ce = (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
|
+
}), le = (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
|
+
}), ue = ({ 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
|
+
}), G = (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
|
+
}), de = (e) => /* @__PURE__ */ t(P, {
|
|
272
272
|
...e,
|
|
273
273
|
children: /* @__PURE__ */ t("path", { d: "M3 5h18v14H3V5Zm10 7h6v5h-6v-5Z" })
|
|
274
|
-
}),
|
|
274
|
+
}), fe = (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
|
+
}), pe = (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
|
+
}), me = (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
|
+
}), K = (e) => /* @__PURE__ */ t(P, {
|
|
288
288
|
...e,
|
|
289
289
|
children: /* @__PURE__ */ t("path", { d: "M9 4H4v5m11-5h5v5M9 20H4v-5m11 5h5v-5" })
|
|
290
|
-
}),
|
|
290
|
+
}), he = (e) => /* @__PURE__ */ t(P, {
|
|
291
291
|
...e,
|
|
292
292
|
children: /* @__PURE__ */ t("path", { d: "M4 9h5V4m6 5h5V4M4 15h5v5m6-5h5v5" })
|
|
293
|
-
}),
|
|
293
|
+
}), ge = (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
|
+
}), _e = (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
|
+
}), ve = (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
|
+
}), ye = (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
|
+
}), be = (e) => /* @__PURE__ */ t(P, {
|
|
306
306
|
...e,
|
|
307
307
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
308
|
-
}),
|
|
308
|
+
}), xe = (e) => /* @__PURE__ */ t(P, {
|
|
309
309
|
...e,
|
|
310
310
|
children: /* @__PURE__ */ t("path", { d: "M12 5v14m-5-5 5 5 5-5" })
|
|
311
|
-
}),
|
|
311
|
+
}), Se = (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
|
+
}), Ce = (e) => /* @__PURE__ */ t(P, {
|
|
319
319
|
...e,
|
|
320
320
|
children: /* @__PURE__ */ t("path", { d: "M12 19V5m-5 5 5-5 5 5" })
|
|
321
|
-
}),
|
|
321
|
+
}), we = (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
|
+
}), Te = (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
|
+
}), Ee = (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
|
+
}), De = (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
|
+
}), Oe = (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
|
+
}), ke = (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
|
+
}), Ae = (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
|
+
}), q = (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
|
+
}), je = {
|
|
409
|
+
IconAppsGrid: Ae,
|
|
410
|
+
IconActivity: q([["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: q([
|
|
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: q([["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: q([["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: q([["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: q([["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: q([["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: q([
|
|
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: q([["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: q([
|
|
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: q([
|
|
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: q([["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: q([
|
|
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: q([["path", {
|
|
578
578
|
d: "m9 18 6-6-6-6",
|
|
579
579
|
key: "mthhwq"
|
|
580
580
|
}]]),
|
|
581
|
-
IconCircleAlert:
|
|
581
|
+
IconCircleAlert: q([
|
|
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: q([["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: H,
|
|
613
|
+
IconDownload: q([
|
|
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: q([
|
|
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: q([
|
|
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: ae,
|
|
660
|
+
IconGauge: q([["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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([
|
|
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: q([["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: q([["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: q([
|
|
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: q([
|
|
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: q([["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: q([["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: q([
|
|
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: q([["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: q([["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: q([["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: q([
|
|
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: q([["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: q([
|
|
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: q([
|
|
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: q([["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: q([
|
|
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: q([
|
|
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: q([["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: V,
|
|
1072
|
+
IconEdit: U,
|
|
1073
|
+
IconErrorCircle: W,
|
|
1074
|
+
IconEye: te,
|
|
1075
|
+
IconEyeOff: ne,
|
|
1076
|
+
IconInfo: re,
|
|
1077
|
+
IconInfoCircle: ie,
|
|
1078
|
+
IconMinus: oe,
|
|
1079
|
+
IconMoreVertical: ke,
|
|
1080
|
+
IconList: se,
|
|
1081
|
+
IconPanelsTopLeft: ce,
|
|
1082
|
+
IconPause: le,
|
|
1083
|
+
IconPaperclip: Ee,
|
|
1084
|
+
IconPlus: ue,
|
|
1085
|
+
IconPlug: G,
|
|
1086
|
+
IconPictureInPicture: de,
|
|
1087
|
+
IconPlay: fe,
|
|
1088
|
+
IconReplay: pe,
|
|
1089
|
+
IconSettings: me,
|
|
1090
|
+
IconSend: De,
|
|
1091
|
+
IconSmile: Oe,
|
|
1092
|
+
IconFullscreen: K,
|
|
1093
|
+
IconFullscreenExit: he,
|
|
1094
|
+
IconCaptions: ge,
|
|
1095
|
+
IconVolume: _e,
|
|
1096
|
+
IconVolumeMuted: ve,
|
|
1097
|
+
IconSort: ye,
|
|
1098
|
+
IconSortAscending: be,
|
|
1099
|
+
IconSortDescending: xe,
|
|
1100
|
+
IconSuccessCircle: Se,
|
|
1101
|
+
IconUpload: Ce,
|
|
1102
|
+
IconWarning: we,
|
|
1103
|
+
IconTrash2: Te
|
|
1104
|
+
}, Me = Object.freeze(Object.keys(je)), J = ({ name: e, ...n }) => {
|
|
1105
|
+
let r = je[e];
|
|
1106
1106
|
return /* @__PURE__ */ t(r, { ...n });
|
|
1107
|
-
},
|
|
1107
|
+
}, Ne = {
|
|
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
|
+
}, Pe = ({ 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: `${Ne.wrapper} ${l}`,
|
|
1120
1120
|
children: [
|
|
1121
1121
|
/* @__PURE__ */ n("label", {
|
|
1122
|
-
className: `${
|
|
1122
|
+
className: `${Ne.label} ${s ? Ne.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: Ne.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: `${Ne.control} ${o ? Ne.controlError : ""}`,
|
|
1144
1144
|
"aria-hidden": "true",
|
|
1145
|
-
children: [m && !e && /* @__PURE__ */ t(
|
|
1145
|
+
children: [m && !e && /* @__PURE__ */ t(J, {
|
|
1146
1146
|
name: "IconMinus",
|
|
1147
1147
|
width: 16,
|
|
1148
1148
|
height: 16
|
|
1149
|
-
}), e && /* @__PURE__ */ t(
|
|
1149
|
+
}), e && /* @__PURE__ */ t(J, {
|
|
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
|
+
}, Y = {
|
|
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
|
+
}, Fe = [
|
|
1201
1201
|
"Пн",
|
|
1202
1202
|
"Вт",
|
|
1203
1203
|
"Ср",
|
|
@@ -1205,7 +1205,7 @@ var M = {
|
|
|
1205
1205
|
"Пт",
|
|
1206
1206
|
"Сб",
|
|
1207
1207
|
"Вс"
|
|
1208
|
-
],
|
|
1208
|
+
], Ie = [
|
|
1209
1209
|
"Январь",
|
|
1210
1210
|
"Февраль",
|
|
1211
1211
|
"Март",
|
|
@@ -1218,7 +1218,7 @@ var M = {
|
|
|
1218
1218
|
"Октябрь",
|
|
1219
1219
|
"Ноябрь",
|
|
1220
1220
|
"Декабрь"
|
|
1221
|
-
],
|
|
1221
|
+
], Le = (e) => String(e).padStart(2, "0"), Re = 8, ze = "Некорректная дата", X = (e) => e ? `${Le(e.getDate())}.${Le(e.getMonth() + 1)}.${e.getFullYear()}` : "", Be = (e) => {
|
|
1222
1222
|
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1223
1223
|
return [
|
|
1224
1224
|
t.slice(0, 2),
|
|
@@ -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()}-${Le(e.getMonth() + 1)}-${Le(e.getDate())}`, r = `${Le(e.getHours())}:${Le(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 = `${Le(e.getDate())}.${Le(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${Le(e.getHours())}:${Le(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, V] = g(Ge(r, "time")), [H, U] = g(X(r)), [W, te] = g(""), [ne, re] = g(0), [ie, ae] = g(null), oe = m(() => Je(R), [R]), se = a !== "time", ce = a !== "date";
|
|
1280
1280
|
d(() => {
|
|
1281
|
-
r && z(r),
|
|
1281
|
+
r && z(r), V(Ge(r, "time")), U(X(r));
|
|
1282
1282
|
}, [r]), d(() => () => {
|
|
1283
1283
|
F.current && clearTimeout(F.current);
|
|
1284
1284
|
}, []);
|
|
1285
|
-
let
|
|
1285
|
+
let le = 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
|
+
ae({
|
|
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
|
+
ae(null);
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
1300
|
-
return
|
|
1301
|
-
window.removeEventListener("resize",
|
|
1300
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
1301
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
1302
1302
|
};
|
|
1303
1303
|
}, [
|
|
1304
1304
|
I,
|
|
1305
|
-
|
|
1305
|
+
le,
|
|
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 ue = (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), U(X(t)), a === "date" && L(!1));
|
|
1324
|
+
}, G = () => {
|
|
1325
|
+
te(ze), re((e) => e + 1), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
|
|
1326
|
+
te(""), F.current = null;
|
|
1327
1327
|
}, 3e3);
|
|
1328
|
-
},
|
|
1328
|
+
}, de = (e) => {
|
|
1329
1329
|
let t = e.replace(/\D/g, "").slice(0, Re);
|
|
1330
1330
|
if (!He(t)) {
|
|
1331
|
-
|
|
1331
|
+
G();
|
|
1332
1332
|
return;
|
|
1333
1333
|
}
|
|
1334
|
-
let n =
|
|
1335
|
-
if (
|
|
1334
|
+
let n = Be(t);
|
|
1335
|
+
if (U(n), !t) {
|
|
1336
1336
|
i?.(null);
|
|
1337
1337
|
return;
|
|
1338
1338
|
}
|
|
1339
1339
|
if (t.length < Re) return;
|
|
1340
1340
|
let o = Ue(n);
|
|
1341
1341
|
if (!o || Xe(o, x, S)) {
|
|
1342
|
-
|
|
1342
|
+
G();
|
|
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
|
+
}, fe = (e) => {
|
|
1347
|
+
if (V(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
|
+
}, pe = s ?? (a === "date" ? "ДД.ММ.ГГГГ" : a === "time" ? "ЧЧ:ММ" : "ДД.ММ.ГГГГ ЧЧ:ММ"), me = W ? `${O}-validation` : void 0, K = [
|
|
1356
1356
|
k,
|
|
1357
1357
|
A,
|
|
1358
|
-
|
|
1359
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1358
|
+
me
|
|
1359
|
+
].filter(Boolean).join(" ") || void 0, he = I && !y ? /* @__PURE__ */ n("div", {
|
|
1360
1360
|
ref: P,
|
|
1361
|
-
className:
|
|
1361
|
+
className: Y.panel,
|
|
1362
1362
|
role: "dialog",
|
|
1363
|
-
"aria-label": o ??
|
|
1364
|
-
style:
|
|
1365
|
-
top:
|
|
1366
|
-
left:
|
|
1367
|
-
maxHeight:
|
|
1363
|
+
"aria-label": o ?? pe,
|
|
1364
|
+
style: ie ? {
|
|
1365
|
+
top: ie.top,
|
|
1366
|
+
left: ie.left,
|
|
1367
|
+
maxHeight: ie.maxHeight
|
|
1368
1368
|
} : {
|
|
1369
1369
|
visibility: "hidden",
|
|
1370
1370
|
top: 0,
|
|
1371
1371
|
left: 0
|
|
1372
1372
|
},
|
|
1373
|
-
children: [
|
|
1373
|
+
children: [se && /* @__PURE__ */ n(e, { children: [
|
|
1374
1374
|
/* @__PURE__ */ n("div", {
|
|
1375
|
-
className:
|
|
1375
|
+
className: Y.calendarHeader,
|
|
1376
1376
|
children: [
|
|
1377
1377
|
/* @__PURE__ */ t("button", {
|
|
1378
1378
|
type: "button",
|
|
1379
|
-
className:
|
|
1379
|
+
className: Y.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(J, {
|
|
1383
1383
|
name: "IconChevron",
|
|
1384
1384
|
width: 20,
|
|
1385
1385
|
height: 20,
|
|
1386
|
-
className:
|
|
1386
|
+
className: Y.previousMonth
|
|
1387
1387
|
})
|
|
1388
1388
|
}),
|
|
1389
1389
|
/* @__PURE__ */ t("select", {
|
|
1390
|
-
className:
|
|
1390
|
+
className: Y.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: Ie.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: Y.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: Y.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(J, {
|
|
1412
1412
|
name: "IconChevron",
|
|
1413
1413
|
width: 20,
|
|
1414
1414
|
height: 20,
|
|
1415
|
-
className:
|
|
1415
|
+
className: Y.nextMonth
|
|
1416
1416
|
})
|
|
1417
1417
|
})
|
|
1418
1418
|
]
|
|
1419
1419
|
}),
|
|
1420
1420
|
/* @__PURE__ */ t("div", {
|
|
1421
|
-
className:
|
|
1422
|
-
children:
|
|
1421
|
+
className: Y.weekdays,
|
|
1422
|
+
children: Fe.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
|
|
1423
1423
|
}),
|
|
1424
1424
|
/* @__PURE__ */ t("div", {
|
|
1425
|
-
className:
|
|
1426
|
-
children:
|
|
1425
|
+
className: Y.days,
|
|
1426
|
+
children: oe.map((e) => {
|
|
1427
1427
|
let n = Ye(r, e);
|
|
1428
1428
|
return /* @__PURE__ */ t("button", {
|
|
1429
1429
|
type: "button",
|
|
1430
|
-
className: `${
|
|
1430
|
+
className: `${Y.day} ${e.getMonth() === R.getMonth() ? "" : Y.outside} ${n ? Y.selected : ""}`,
|
|
1431
1431
|
disabled: Xe(e, x, S),
|
|
1432
1432
|
"aria-pressed": n,
|
|
1433
|
-
onClick: () =>
|
|
1433
|
+
onClick: () => ue(e),
|
|
1434
1434
|
children: e.getDate()
|
|
1435
1435
|
}, e.toISOString());
|
|
1436
1436
|
})
|
|
1437
1437
|
})
|
|
1438
|
-
] }),
|
|
1439
|
-
className:
|
|
1438
|
+
] }), ce && /* @__PURE__ */ n("label", {
|
|
1439
|
+
className: Y.timeLabel,
|
|
1440
1440
|
children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
|
|
1441
|
-
className:
|
|
1441
|
+
className: Y.timeInput,
|
|
1442
1442
|
type: "time",
|
|
1443
1443
|
value: B,
|
|
1444
|
-
onChange: (e) =>
|
|
1444
|
+
onChange: (e) => fe(e.target.value)
|
|
1445
1445
|
})]
|
|
1446
1446
|
})]
|
|
1447
1447
|
}) : null;
|
|
1448
1448
|
return /* @__PURE__ */ n("div", {
|
|
1449
1449
|
ref: j,
|
|
1450
|
-
className: `${
|
|
1450
|
+
className: `${Y.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
|
+
se ? /* @__PURE__ */ n("div", {
|
|
1459
|
+
className: `${Y.trigger} ${Y[C]} ${u ? Y.error : ""} ${v ? Y.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: Y.dateInput,
|
|
1466
|
+
value: H,
|
|
1467
|
+
placeholder: pe.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": K,
|
|
1476
|
+
"aria-invalid": !!(u || W) || 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) => de(e.target.value)
|
|
1484
1484
|
}),
|
|
1485
1485
|
a === "datetime" && B && /* @__PURE__ */ t("span", {
|
|
1486
|
-
className:
|
|
1486
|
+
className: Y.timeValue,
|
|
1487
1487
|
children: B
|
|
1488
1488
|
}),
|
|
1489
1489
|
/* @__PURE__ */ t("button", {
|
|
1490
1490
|
type: "button",
|
|
1491
|
-
className:
|
|
1491
|
+
className: Y.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: `${Y.chevron} ${he ? Y.chevronOpen : ""}`,
|
|
1501
1501
|
"aria-hidden": "true",
|
|
1502
|
-
children: /* @__PURE__ */ t(
|
|
1502
|
+
children: /* @__PURE__ */ t(J, {
|
|
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: `${Y.trigger} ${Y[C]} ${u ? Y.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": K,
|
|
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 ? Y.value : Y.placeholder,
|
|
1526
|
+
children: qe(r, a) || pe
|
|
1527
1527
|
}), /* @__PURE__ */ t("span", {
|
|
1528
|
-
className: `${
|
|
1528
|
+
className: `${Y.chevron} ${he ? Y.chevronOpen : ""}`,
|
|
1529
1529
|
"aria-hidden": "true",
|
|
1530
|
-
children: /* @__PURE__ */ t(
|
|
1530
|
+
children: /* @__PURE__ */ t(J, {
|
|
1531
1531
|
name: "IconChevron",
|
|
1532
1532
|
width: 20,
|
|
1533
1533
|
height: 20
|
|
1534
1534
|
})
|
|
1535
1535
|
})]
|
|
1536
1536
|
}),
|
|
1537
|
-
|
|
1538
|
-
id:
|
|
1539
|
-
className:
|
|
1537
|
+
W && /* @__PURE__ */ t("span", {
|
|
1538
|
+
id: me,
|
|
1539
|
+
className: Y.validationTooltip,
|
|
1540
1540
|
role: "status",
|
|
1541
1541
|
"aria-live": "polite",
|
|
1542
|
-
children:
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1542
|
+
children: W
|
|
1543
|
+
}, ne),
|
|
1544
|
+
he && _(he, 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, V = o && s, H = 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 H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
1668
|
+
window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
1669
1669
|
};
|
|
1670
1670
|
}, [
|
|
1671
1671
|
k,
|
|
1672
|
-
|
|
1672
|
+
H,
|
|
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 U = (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
|
+
}, W = (e) => {
|
|
1692
1692
|
e.disabled || (i?.(e.value, e), A(!1), P.current?.focus());
|
|
1693
|
-
},
|
|
1693
|
+
}, te = 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: () => W(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
|
+
U(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
|
+
U(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(), W(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(J, {
|
|
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: V ? void 0 : D,
|
|
1766
1766
|
children: c
|
|
1767
1767
|
}),
|
|
1768
1768
|
/* @__PURE__ */ t("div", {
|
|
1769
1769
|
className: Z.container,
|
|
1770
|
-
children:
|
|
1770
|
+
children: V ? /* @__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
|
+
U(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
|
+
U(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(J, {
|
|
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 && _(te, 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(J, {
|
|
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(J, {
|
|
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, V = [z, B].filter(Boolean).join(" ") || void 0, H = o && s, U = 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 U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
|
|
1983
|
+
window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
|
|
1984
1984
|
};
|
|
1985
1985
|
}, [
|
|
1986
1986
|
A,
|
|
1987
1987
|
e.length,
|
|
1988
|
-
|
|
1988
|
+
U
|
|
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 W = (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
|
+
}, te = (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
|
+
}, ne = 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: () => te(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
|
+
W(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
|
+
W(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(), te(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(J, {
|
|
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: H ? 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: H ? /* @__PURE__ */ t("div", {
|
|
2087
2087
|
id: O,
|
|
2088
2088
|
className: `${Z.disabledText} ${Z[v]}`,
|
|
2089
|
-
"aria-describedby":
|
|
2089
|
+
"aria-describedby": V,
|
|
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": V,
|
|
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(() => W(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(J, {
|
|
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 && _(ne, document.body),
|
|
2126
2126
|
b && !u && /* @__PURE__ */ t("span", {
|
|
2127
2127
|
id: z,
|
|
2128
2128
|
className: Z.message,
|
|
@@ -2240,14 +2240,14 @@ var M = {
|
|
|
2240
2240
|
30,
|
|
2241
2241
|
50,
|
|
2242
2242
|
-1
|
|
2243
|
-
], wt = 30;
|
|
2244
|
-
function
|
|
2243
|
+
], wt = 30, Tt = 8;
|
|
2244
|
+
function Et(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
|
-
function
|
|
2247
|
+
function Dt(e) {
|
|
2248
2248
|
return e === void 0 || !Number.isFinite(e) || e <= 0 ? wt : Math.max(1, Math.floor(e));
|
|
2249
2249
|
}
|
|
2250
|
-
var
|
|
2250
|
+
var Ot = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2251
2251
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2252
2252
|
return d(() => {
|
|
2253
2253
|
if (o === void 0) return;
|
|
@@ -2290,20 +2290,20 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2290
2290
|
error: a,
|
|
2291
2291
|
onChange: (e) => r(e)
|
|
2292
2292
|
});
|
|
2293
|
-
},
|
|
2293
|
+
}, kt = (e, t, n) => {
|
|
2294
2294
|
let r = new Set(e);
|
|
2295
2295
|
return t.forEach((e) => {
|
|
2296
2296
|
n ? r.add(e) : r.delete(e);
|
|
2297
2297
|
}), Array.from(r);
|
|
2298
|
-
},
|
|
2298
|
+
}, At = (e) => {
|
|
2299
2299
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2300
2300
|
width: e.width,
|
|
2301
2301
|
minWidth: e.minWidth,
|
|
2302
2302
|
maxWidth: e.maxWidth
|
|
2303
2303
|
};
|
|
2304
|
-
},
|
|
2304
|
+
}, jt = (e) => {
|
|
2305
2305
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2306
|
-
},
|
|
2306
|
+
}, Mt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2307
2307
|
0,
|
|
2308
2308
|
1,
|
|
2309
2309
|
2,
|
|
@@ -2327,7 +2327,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2327
2327
|
e + 1,
|
|
2328
2328
|
"ellipsis-end",
|
|
2329
2329
|
t - 1
|
|
2330
|
-
],
|
|
2330
|
+
], Nt = (e, t) => {
|
|
2331
2331
|
let n = /* @__PURE__ */ new Set();
|
|
2332
2332
|
for (let t of e) {
|
|
2333
2333
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2339,36 +2339,36 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2339
2339
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2340
2340
|
}
|
|
2341
2341
|
return null;
|
|
2342
|
-
},
|
|
2342
|
+
}, Pt = (e, t) => typeof e == "function" ? e(t) : t[e], Ft = (e) => {
|
|
2343
2343
|
if (e == null || e === "") return null;
|
|
2344
2344
|
let t = Date.parse(String(e));
|
|
2345
2345
|
return Number.isNaN(t) ? null : t;
|
|
2346
|
-
}, Ft = (e, t, n) => {
|
|
2347
|
-
let r = Pt(e.getValue(n)), i = Pt(t.getValue(n));
|
|
2348
|
-
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2349
2346
|
}, It = (e, t, n) => {
|
|
2347
|
+
let r = Ft(e.getValue(n)), i = Ft(t.getValue(n));
|
|
2348
|
+
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2349
|
+
}, Lt = (e, t, n) => {
|
|
2350
2350
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2351
2351
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2352
|
-
},
|
|
2352
|
+
}, Rt = (e, t, n) => {
|
|
2353
2353
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2354
2354
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2355
|
-
},
|
|
2355
|
+
}, zt = (e, t, n) => {
|
|
2356
2356
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2357
2357
|
return r.localeCompare(i, void 0, {
|
|
2358
2358
|
numeric: !0,
|
|
2359
2359
|
sensitivity: "base"
|
|
2360
2360
|
});
|
|
2361
|
-
},
|
|
2361
|
+
}, Bt = (e) => {
|
|
2362
2362
|
switch (e) {
|
|
2363
|
-
case "date": return
|
|
2364
|
-
case "number": return
|
|
2365
|
-
case "boolean": return
|
|
2363
|
+
case "date": return It;
|
|
2364
|
+
case "number": return Lt;
|
|
2365
|
+
case "boolean": return Rt;
|
|
2366
2366
|
case "text":
|
|
2367
|
-
case void 0: return
|
|
2367
|
+
case void 0: return zt;
|
|
2368
2368
|
case "custom": return;
|
|
2369
2369
|
}
|
|
2370
|
-
},
|
|
2371
|
-
let t = (t) =>
|
|
2370
|
+
}, Vt = (e) => {
|
|
2371
|
+
let t = (t) => Pt(e.accessor, t), n = e.sortFn ?? Bt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2372
2372
|
id: e.id,
|
|
2373
2373
|
accessorFn: t,
|
|
2374
2374
|
header: () => e.header,
|
|
@@ -2380,84 +2380,94 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2380
2380
|
sortDescFirst: e.sortDescFirst
|
|
2381
2381
|
};
|
|
2382
2382
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2383
|
-
},
|
|
2384
|
-
let [
|
|
2385
|
-
if (
|
|
2386
|
-
let e = new Set(
|
|
2383
|
+
}, Ht = ({ columns: i, data: a, virtualizationThreshold: o = wt, tableOnMobile: s = !1, mobileView: c, breakpoint: l = "default", sorting: u, onSortingChange: f, renderMobileCard: p, getRowId: _, getRowClassName: v, getRowStyle: y, toolbarContent: b, totalCountVariant: S = "default", totalCountLabel: C = "Всего", caption: w, ariaLabel: T, loading: E = !1, error: D, emptyState: O = "Нет данных", stickyHeader: k = !1, maxHeight: A, className: M = "", onRowClick: ee, selectable: N = !1, selectedRowIds: P, onSelectedRowIdsChange: F, onRowDoubleClick: I, getRowSelectionLabel: L, selectAllRowsLabel: R = "Выбрать все строки на этой странице", resetSelectionLabel: z = "Сбросить выбор", openRowLabel: B = "Открыть строку", pagination: V = !1, paginationMode: H = "client", page: U = 1, pageSize: W = 30, onPageSizeChange: te, pageSizeOptions: ne = Ct, pageSizeDraft: re, onPageSizeDraftChange: ie, pageSizeApplyMode: ae = "table", totalCount: oe, onPageChange: se, visibleColumnIds: ce, density: le = "comfortable", renderBulkActions: ue, renderExpandedRow: G, expandedRowIds: de, onExpandedRowIdsChange: fe, getRowExpansionLabel: pe, resultsAnnouncement: me, filterBar: K }) => {
|
|
2384
|
+
let [he, ge] = g([]), [_e, ve] = g([]), [ye, be] = g([]), [xe, Se] = g(0), [Ce, we] = g(() => Et(W, ne)), Te = Dt(o), Ee = u ?? he, De = Ee.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Oe = W === -1, ke = Oe ? Math.max(1, (H === "server" ? Number(oe) : a.length) || a.length || 1) : Number.isFinite(W) && W > 0 ? Math.floor(W) : 30, Ae = V && H === "server", q = m(() => {
|
|
2385
|
+
if (ce === void 0) return i;
|
|
2386
|
+
let e = new Set(ce);
|
|
2387
2387
|
return i.filter((t) => e.has(t.id));
|
|
2388
|
-
}, [i,
|
|
2388
|
+
}, [i, ce]), je = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" : Nt(q, a), [a, q]), Me = m(() => q.map(Vt), [q]), Ne = q.some((e) => At(e) !== void 0), Y = x({
|
|
2389
2389
|
features: St,
|
|
2390
|
-
columns:
|
|
2390
|
+
columns: Me,
|
|
2391
2391
|
data: a,
|
|
2392
|
-
state: { sorting:
|
|
2392
|
+
state: { sorting: Ee },
|
|
2393
2393
|
onSortingChange: (e) => {
|
|
2394
|
-
let t = typeof e == "function" ? e(
|
|
2395
|
-
|
|
2394
|
+
let t = typeof e == "function" ? e(Ee) : e;
|
|
2395
|
+
u === void 0 && ge(t), Se(0), f?.(t);
|
|
2396
2396
|
},
|
|
2397
|
-
getRowId:
|
|
2398
|
-
}),
|
|
2399
|
-
|
|
2400
|
-
|
|
2397
|
+
getRowId: _
|
|
2398
|
+
}), Fe = Y.getRowModel().rows, Ie = Ae && Number.isFinite(oe) && Number(oe) >= 0 ? Math.floor(Number(oe)) : Fe.length, Le = V ? Math.max(1, Math.ceil(Ie / ke)) : 1, Re = Number.isFinite(U) && U > 0 ? Math.floor(U) - 1 : 0, ze = Math.min(Ae ? Re : xe, Le - 1), X = m(() => V && !Ae ? Fe.slice(ze * ke, (ze + 1) * ke) : Fe, [
|
|
2399
|
+
Ae,
|
|
2400
|
+
ke,
|
|
2401
2401
|
V,
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
]),
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2402
|
+
ze,
|
|
2403
|
+
Fe
|
|
2404
|
+
]), Be = X.length > Te, Ve = m(() => ({
|
|
2405
|
+
data: a,
|
|
2406
|
+
sortingKey: De,
|
|
2407
|
+
safePageIndex: ze,
|
|
2408
|
+
normalizedPageSize: ke,
|
|
2409
|
+
pagination: V,
|
|
2410
|
+
isServerPagination: Ae,
|
|
2411
|
+
normalizedVirtualizationThreshold: Te
|
|
2412
|
+
}), [
|
|
2408
2413
|
a,
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2414
|
+
De,
|
|
2415
|
+
ze,
|
|
2416
|
+
ke,
|
|
2412
2417
|
V,
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
]), Ge = h(null), Ke = h(null), qe = h(null);
|
|
2418
|
+
Ae,
|
|
2419
|
+
Te
|
|
2420
|
+
]), [He, Ue] = g({
|
|
2421
|
+
context: Ve,
|
|
2422
|
+
count: Te
|
|
2423
|
+
}), We = He.context === Ve ? He.count : Te;
|
|
2424
|
+
He.context !== Ve && Ue({
|
|
2425
|
+
context: Ve,
|
|
2426
|
+
count: Te
|
|
2427
|
+
});
|
|
2428
|
+
let Ge = m(() => X.slice(0, We), [X, We]), Ke = Be && We < X.length, qe = Ke ? Math.max(0, Ge.length - Tt) : -1, Je = h(/* @__PURE__ */ new Map()), Ye = h(/* @__PURE__ */ new Map());
|
|
2425
2429
|
d(() => {
|
|
2426
|
-
if (!
|
|
2427
|
-
let e =
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2430
|
+
if (!Ke || E || je || D) return;
|
|
2431
|
+
let e = [...Je.current.values(), ...Ye.current.values()], t = !0, n = new IntersectionObserver((e) => {
|
|
2432
|
+
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(), Ue((e) => e.context === Ve ? {
|
|
2433
|
+
context: Ve,
|
|
2434
|
+
count: Math.min(e.count + Te, X.length)
|
|
2435
|
+
} : e));
|
|
2431
2436
|
}, {
|
|
2432
|
-
root:
|
|
2433
|
-
rootMargin: "0px 0px 200px 0px",
|
|
2437
|
+
root: null,
|
|
2434
2438
|
threshold: 0
|
|
2435
2439
|
});
|
|
2436
|
-
return e
|
|
2437
|
-
|
|
2440
|
+
return e.forEach((e) => {
|
|
2441
|
+
e && n.observe(e);
|
|
2442
|
+
}), () => {
|
|
2443
|
+
t = !1, n.disconnect();
|
|
2438
2444
|
};
|
|
2439
2445
|
}, [
|
|
2446
|
+
Ve,
|
|
2440
2447
|
We,
|
|
2441
|
-
|
|
2442
|
-
|
|
2448
|
+
Te,
|
|
2449
|
+
X.length,
|
|
2450
|
+
Ke,
|
|
2451
|
+
E,
|
|
2452
|
+
je,
|
|
2453
|
+
D,
|
|
2454
|
+
c,
|
|
2455
|
+
s,
|
|
2456
|
+
p
|
|
2443
2457
|
]);
|
|
2444
|
-
let
|
|
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) => ({
|
|
2458
|
+
let Xe = P ?? _e, Ze = m(() => new Set(Xe), [Xe]), Qe = de ?? ye, $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(() => q.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2449
2459
|
id: e.id,
|
|
2450
2460
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2451
|
-
})), [
|
|
2461
|
+
})), [q]), at = m(() => Mt(ze, Le), [Le, ze]), ot = c === void 0 ? s : c === "table", st = [
|
|
2452
2462
|
Q.root,
|
|
2453
|
-
|
|
2463
|
+
l === "wide" ? Q.wide : Q.default,
|
|
2454
2464
|
ot ? Q.tableOnMobile : "",
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
].filter(Boolean).join(" "), ct =
|
|
2458
|
-
dt !==
|
|
2465
|
+
le === "compact" ? Q.compact : "",
|
|
2466
|
+
M
|
|
2467
|
+
].filter(Boolean).join(" "), ct = je ?? D, lt = V && !Oe && !ct && Ie > ke && (!E || Ae), ut = V && !!(te || ie || K), dt = re ?? Ce, pt = K ? (typeof K.validation == "function" ? K.validation(K.draftValues) : K.validation) ?? {} : {}, mt = K ? JSON.stringify(K.draftValues) !== JSON.stringify(K.appliedValues) || dt !== W : !1, ht = Object.values(pt).some(Boolean), gt = Ie === 0 ? 0 : ze * ke + 1, _t = Math.min((ze + 1) * ke, Ie), vt = () => {
|
|
2468
|
+
dt !== W && (Se(0), se?.(1), te?.(dt));
|
|
2459
2469
|
}, yt = (e, r = !1) => {
|
|
2460
|
-
let i = dt !==
|
|
2470
|
+
let i = dt !== W, a = `ds-data-table-page-size-warning-${e}`;
|
|
2461
2471
|
return /* @__PURE__ */ n("div", {
|
|
2462
2472
|
className: `${Q.pageSizePanel} ${Q[e]} ${r ? Q.embedded : ""}`,
|
|
2463
2473
|
children: [
|
|
@@ -2465,22 +2475,22 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2465
2475
|
className: Q.pageSizeMain,
|
|
2466
2476
|
children: [/* @__PURE__ */ n("fieldset", {
|
|
2467
2477
|
className: Q.pageSizeFieldset,
|
|
2468
|
-
disabled:
|
|
2478
|
+
disabled: E || K?.applying,
|
|
2469
2479
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2470
2480
|
className: Q.pageSizeOptions,
|
|
2471
|
-
children:
|
|
2481
|
+
children: ne.map((e) => /* @__PURE__ */ t("button", {
|
|
2472
2482
|
type: "button",
|
|
2473
2483
|
className: `${Q.pageSizeOption} ${dt === e ? Q.pageSizeOptionActive : ""}`,
|
|
2474
2484
|
"aria-pressed": dt === e,
|
|
2475
2485
|
onClick: () => {
|
|
2476
|
-
|
|
2486
|
+
re === void 0 && we(e), ie?.(e);
|
|
2477
2487
|
},
|
|
2478
2488
|
children: e === -1 ? "Все" : e
|
|
2479
2489
|
}, e))
|
|
2480
2490
|
})]
|
|
2481
|
-
}),
|
|
2491
|
+
}), ae === "table" && !K && /* @__PURE__ */ t(j, {
|
|
2482
2492
|
size: "sm",
|
|
2483
|
-
disabled:
|
|
2493
|
+
disabled: E || !i,
|
|
2484
2494
|
"aria-describedby": dt === -1 && i && e === "top" ? a : void 0,
|
|
2485
2495
|
onClick: vt,
|
|
2486
2496
|
children: "Применить"
|
|
@@ -2495,7 +2505,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2495
2505
|
_t,
|
|
2496
2506
|
" из",
|
|
2497
2507
|
" ",
|
|
2498
|
-
|
|
2508
|
+
Ie
|
|
2499
2509
|
]
|
|
2500
2510
|
}),
|
|
2501
2511
|
mt && e === "top" && /* @__PURE__ */ t("span", {
|
|
@@ -2503,14 +2513,14 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2503
2513
|
role: "status",
|
|
2504
2514
|
children: "Есть неприменённые изменения"
|
|
2505
2515
|
}),
|
|
2506
|
-
|
|
2516
|
+
Ae && dt === -1 && i && /* @__PURE__ */ n("span", {
|
|
2507
2517
|
id: a,
|
|
2508
2518
|
className: Q.pageSizeWarning,
|
|
2509
2519
|
"aria-hidden": e === "bottom" || void 0,
|
|
2510
2520
|
children: [
|
|
2511
2521
|
"Будут загружены все",
|
|
2512
2522
|
" ",
|
|
2513
|
-
|
|
2523
|
+
Ie,
|
|
2514
2524
|
" ",
|
|
2515
2525
|
"записей"
|
|
2516
2526
|
]
|
|
@@ -2518,87 +2528,87 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2518
2528
|
]
|
|
2519
2529
|
});
|
|
2520
2530
|
}, bt = (e) => {
|
|
2521
|
-
let t = Math.max(0, Math.min(
|
|
2522
|
-
if (
|
|
2523
|
-
t !==
|
|
2531
|
+
let t = Math.max(0, Math.min(Le - 1, e));
|
|
2532
|
+
if (Ae) {
|
|
2533
|
+
t !== ze && se?.(t + 1);
|
|
2524
2534
|
return;
|
|
2525
2535
|
}
|
|
2526
|
-
|
|
2536
|
+
Se(t);
|
|
2527
2537
|
}, xt = (e) => {
|
|
2528
2538
|
let t = Array.from(e);
|
|
2529
|
-
|
|
2530
|
-
},
|
|
2539
|
+
P === void 0 && ve(t), F?.(t);
|
|
2540
|
+
}, Ft = (e) => {
|
|
2531
2541
|
let t = new Set(Ze);
|
|
2532
2542
|
t.has(e) ? t.delete(e) : t.add(e), xt(t);
|
|
2533
|
-
},
|
|
2534
|
-
let e =
|
|
2535
|
-
|
|
2536
|
-
},
|
|
2543
|
+
}, It = () => {
|
|
2544
|
+
let e = kt(Ze, et, !nt);
|
|
2545
|
+
P === void 0 && ve(e), F?.(e);
|
|
2546
|
+
}, Lt = () => xt(/* @__PURE__ */ new Set()), Rt = (e) => {
|
|
2537
2547
|
let t = new Set($e);
|
|
2538
2548
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2539
2549
|
let n = Array.from(t);
|
|
2540
|
-
|
|
2541
|
-
},
|
|
2550
|
+
de === void 0 && be(n), fe?.(n);
|
|
2551
|
+
}, zt = a.filter((e, t) => Ze.has(_?.(e, t) ?? String(t))), Bt = me?.({
|
|
2542
2552
|
visibleCount: X.length,
|
|
2543
|
-
totalCount:
|
|
2553
|
+
totalCount: Ie,
|
|
2544
2554
|
selectedCount: Ze.size
|
|
2545
|
-
}) ?? `Показано строк: ${X.length} из ${
|
|
2555
|
+
}) ?? `Показано строк: ${X.length} из ${Ie}. Выбрано: ${Ze.size}.`;
|
|
2546
2556
|
return d(() => {
|
|
2547
|
-
|
|
2557
|
+
Ae || Se(0);
|
|
2548
2558
|
}, [
|
|
2549
2559
|
a,
|
|
2550
|
-
|
|
2551
|
-
|
|
2560
|
+
Ae,
|
|
2561
|
+
ke,
|
|
2552
2562
|
V,
|
|
2553
|
-
|
|
2563
|
+
De
|
|
2554
2564
|
]), d(() => {
|
|
2555
|
-
!
|
|
2565
|
+
!Ae && xe >= Le && Se(Le - 1);
|
|
2556
2566
|
}, [
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2567
|
+
Ae,
|
|
2568
|
+
Le,
|
|
2569
|
+
xe
|
|
2560
2570
|
]), d(() => {
|
|
2561
|
-
|
|
2562
|
-
}, [
|
|
2571
|
+
we(Et(W, ne));
|
|
2572
|
+
}, [W, ne]), /* @__PURE__ */ n("section", {
|
|
2563
2573
|
className: st,
|
|
2564
|
-
"aria-busy":
|
|
2574
|
+
"aria-busy": E,
|
|
2565
2575
|
children: [
|
|
2566
2576
|
/* @__PURE__ */ t("div", {
|
|
2567
2577
|
className: Q.srOnly,
|
|
2568
2578
|
"aria-live": "polite",
|
|
2569
2579
|
"aria-atomic": "true",
|
|
2570
|
-
children:
|
|
2580
|
+
children: Bt
|
|
2571
2581
|
}),
|
|
2572
|
-
|
|
2582
|
+
ue && Ze.size > 0 && /* @__PURE__ */ t("div", {
|
|
2573
2583
|
className: Q.bulkActions,
|
|
2574
2584
|
role: "region",
|
|
2575
2585
|
"aria-label": "Действия с выбранными строками",
|
|
2576
|
-
children:
|
|
2586
|
+
children: ue({
|
|
2577
2587
|
selectedRowIds: Array.from(Ze),
|
|
2578
|
-
selectedRows:
|
|
2579
|
-
clearSelection:
|
|
2588
|
+
selectedRows: zt,
|
|
2589
|
+
clearSelection: Lt
|
|
2580
2590
|
})
|
|
2581
2591
|
}),
|
|
2582
|
-
|
|
2592
|
+
K && /* @__PURE__ */ n("form", {
|
|
2583
2593
|
className: Q.filterBar,
|
|
2584
2594
|
role: "search",
|
|
2585
2595
|
"aria-label": "Фильтры таблицы",
|
|
2586
2596
|
onSubmit: (e) => {
|
|
2587
|
-
e.preventDefault(), !(!mt || ht ||
|
|
2588
|
-
filters:
|
|
2597
|
+
e.preventDefault(), !(!mt || ht || K.applying || E) && (Se(0), se?.(1), K.onApply({
|
|
2598
|
+
filters: K.draftValues,
|
|
2589
2599
|
pageSize: dt
|
|
2590
2600
|
}));
|
|
2591
2601
|
},
|
|
2592
2602
|
children: [
|
|
2593
2603
|
/* @__PURE__ */ t("div", {
|
|
2594
2604
|
className: Q.filterFields,
|
|
2595
|
-
children:
|
|
2605
|
+
children: K.fields.map((e) => /* @__PURE__ */ t(Ot, {
|
|
2596
2606
|
field: e,
|
|
2597
|
-
value:
|
|
2598
|
-
disabled: !!(e.disabled ||
|
|
2607
|
+
value: K.draftValues[e.key],
|
|
2608
|
+
disabled: !!(e.disabled || K.applying || E),
|
|
2599
2609
|
error: pt[e.key],
|
|
2600
|
-
setValue: (t) =>
|
|
2601
|
-
...
|
|
2610
|
+
setValue: (t) => K.onDraftValuesChange({
|
|
2611
|
+
...K.draftValues,
|
|
2602
2612
|
[e.key]: t
|
|
2603
2613
|
})
|
|
2604
2614
|
}, e.key))
|
|
@@ -2608,71 +2618,70 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2608
2618
|
className: Q.filterActions,
|
|
2609
2619
|
children: [/* @__PURE__ */ t(j, {
|
|
2610
2620
|
variant: "empty",
|
|
2611
|
-
disabled:
|
|
2621
|
+
disabled: K.applying || E,
|
|
2612
2622
|
onClick: () => {
|
|
2613
|
-
let e =
|
|
2614
|
-
|
|
2615
|
-
let t =
|
|
2616
|
-
|
|
2623
|
+
let e = K.resetValues ?? K.appliedValues;
|
|
2624
|
+
K.onDraftValuesChange(e);
|
|
2625
|
+
let t = K.resetPageSize ?? ne[0] ?? 30;
|
|
2626
|
+
re === void 0 && we(t), ie?.(t), K.onReset?.({
|
|
2617
2627
|
filters: e,
|
|
2618
2628
|
pageSize: t
|
|
2619
2629
|
});
|
|
2620
2630
|
},
|
|
2621
|
-
children:
|
|
2631
|
+
children: K.resetLabel ?? "Сбросить"
|
|
2622
2632
|
}), /* @__PURE__ */ t(j, {
|
|
2623
2633
|
type: "submit",
|
|
2624
|
-
isLoading:
|
|
2625
|
-
disabled: !mt || ht ||
|
|
2626
|
-
children:
|
|
2634
|
+
isLoading: K.applying,
|
|
2635
|
+
disabled: !mt || ht || E,
|
|
2636
|
+
children: K.applyLabel ?? "Применить"
|
|
2627
2637
|
})]
|
|
2628
2638
|
})
|
|
2629
2639
|
]
|
|
2630
2640
|
}),
|
|
2631
|
-
ut && !
|
|
2632
|
-
(
|
|
2641
|
+
ut && !K && yt("top"),
|
|
2642
|
+
(S === "highlighted" || b != null) && /* @__PURE__ */ n("div", {
|
|
2633
2643
|
className: Q.toolbar,
|
|
2634
|
-
children: [
|
|
2644
|
+
children: [S === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2635
2645
|
className: Q.totalWidget,
|
|
2636
|
-
"aria-label": `${
|
|
2646
|
+
"aria-label": `${C}: ${Ie}`,
|
|
2637
2647
|
children: [/* @__PURE__ */ t("span", {
|
|
2638
2648
|
className: Q.totalLabel,
|
|
2639
|
-
children:
|
|
2649
|
+
children: C
|
|
2640
2650
|
}), /* @__PURE__ */ t("strong", {
|
|
2641
2651
|
className: Q.totalValue,
|
|
2642
|
-
children:
|
|
2652
|
+
children: Ie
|
|
2643
2653
|
})]
|
|
2644
|
-
}),
|
|
2654
|
+
}), b]
|
|
2645
2655
|
}),
|
|
2646
|
-
!ot && !
|
|
2656
|
+
!ot && !E && !ct && X.length > 0 && Z.length > 0 && /* @__PURE__ */ t(ft, {
|
|
2647
2657
|
className: Q.mobileSort,
|
|
2648
2658
|
options: Z,
|
|
2649
|
-
value:
|
|
2650
|
-
id:
|
|
2651
|
-
direction:
|
|
2659
|
+
value: Ee[0] ? {
|
|
2660
|
+
id: Ee[0].id,
|
|
2661
|
+
direction: Ee[0].desc ? "desc" : "asc"
|
|
2652
2662
|
} : null,
|
|
2653
|
-
onChange: (e) =>
|
|
2663
|
+
onChange: (e) => Y.setSorting([{
|
|
2654
2664
|
id: e.id,
|
|
2655
2665
|
desc: e.direction === "desc"
|
|
2656
2666
|
}])
|
|
2657
2667
|
}),
|
|
2658
2668
|
/* @__PURE__ */ t("div", {
|
|
2659
|
-
ref: Ge,
|
|
2660
2669
|
className: Q.tableWrap,
|
|
2661
|
-
style: { maxHeight:
|
|
2670
|
+
style: { maxHeight: A },
|
|
2662
2671
|
children: /* @__PURE__ */ n("table", {
|
|
2663
2672
|
className: Q.table,
|
|
2664
|
-
"aria-label":
|
|
2673
|
+
"aria-label": T,
|
|
2665
2674
|
children: [
|
|
2666
|
-
|
|
2667
|
-
(
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2675
|
+
w && /* @__PURE__ */ t("caption", { children: w }),
|
|
2676
|
+
(Ne || N || !!G) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2677
|
+
G && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
|
|
2678
|
+
N && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
|
|
2679
|
+
q.map((e) => /* @__PURE__ */ t("col", { style: At(e) }, e.id))
|
|
2671
2680
|
] }),
|
|
2672
2681
|
/* @__PURE__ */ t("thead", {
|
|
2673
|
-
className:
|
|
2674
|
-
children:
|
|
2675
|
-
|
|
2682
|
+
className: k ? Q.sticky : "",
|
|
2683
|
+
children: Y.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2684
|
+
G && /* @__PURE__ */ t("th", {
|
|
2676
2685
|
className: Q.expansionCell,
|
|
2677
2686
|
scope: "col",
|
|
2678
2687
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2680,25 +2689,25 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2680
2689
|
children: "Подробности"
|
|
2681
2690
|
})
|
|
2682
2691
|
}),
|
|
2683
|
-
|
|
2692
|
+
N && /* @__PURE__ */ t("th", {
|
|
2684
2693
|
className: Q.selectionHeaderCell,
|
|
2685
2694
|
scope: "col",
|
|
2686
2695
|
children: /* @__PURE__ */ n("div", {
|
|
2687
2696
|
className: Q.selectionHeaderControls,
|
|
2688
|
-
children: [/* @__PURE__ */ t(
|
|
2697
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2689
2698
|
checked: nt,
|
|
2690
2699
|
indeterminate: rt,
|
|
2691
|
-
disabled:
|
|
2692
|
-
ariaLabel:
|
|
2693
|
-
onChange:
|
|
2700
|
+
disabled: E || et.length === 0,
|
|
2701
|
+
ariaLabel: R,
|
|
2702
|
+
onChange: It
|
|
2694
2703
|
}), /* @__PURE__ */ t(j, {
|
|
2695
2704
|
size: "sm",
|
|
2696
2705
|
variant: "empty",
|
|
2697
2706
|
disabled: Ze.size === 0,
|
|
2698
|
-
"aria-label":
|
|
2699
|
-
title:
|
|
2700
|
-
onClick:
|
|
2701
|
-
children: /* @__PURE__ */ t(
|
|
2707
|
+
"aria-label": z,
|
|
2708
|
+
title: z,
|
|
2709
|
+
onClick: Lt,
|
|
2710
|
+
children: /* @__PURE__ */ t(J, {
|
|
2702
2711
|
name: "IconX",
|
|
2703
2712
|
width: 16,
|
|
2704
2713
|
height: 16
|
|
@@ -2707,21 +2716,21 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2707
2716
|
})
|
|
2708
2717
|
}),
|
|
2709
2718
|
e.headers.map((e) => {
|
|
2710
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o =
|
|
2719
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o = q.find((t) => t.id === e.column.id);
|
|
2711
2720
|
return /* @__PURE__ */ t("th", {
|
|
2712
2721
|
scope: "col",
|
|
2713
2722
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2714
2723
|
className: o?.sticky ? Q.stickyColumn : void 0,
|
|
2715
2724
|
style: {
|
|
2716
|
-
...
|
|
2717
|
-
...
|
|
2725
|
+
...At(o),
|
|
2726
|
+
...jt(o)
|
|
2718
2727
|
},
|
|
2719
2728
|
children: /* @__PURE__ */ n("button", {
|
|
2720
2729
|
type: "button",
|
|
2721
2730
|
className: Q.sortButton,
|
|
2722
2731
|
disabled: !i,
|
|
2723
2732
|
onClick: a,
|
|
2724
|
-
children: [/* @__PURE__ */ t(
|
|
2733
|
+
children: [/* @__PURE__ */ t(Y.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
|
|
2725
2734
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2726
2735
|
width: 16,
|
|
2727
2736
|
height: 16
|
|
@@ -2731,128 +2740,120 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2731
2740
|
})
|
|
2732
2741
|
] }, e.id))
|
|
2733
2742
|
}),
|
|
2734
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2735
|
-
colSpan:
|
|
2743
|
+
/* @__PURE__ */ t("tbody", { children: E ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2744
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2736
2745
|
children: /* @__PURE__ */ t(it, {
|
|
2737
2746
|
lines: 3,
|
|
2738
2747
|
height: 65
|
|
2739
2748
|
})
|
|
2740
2749
|
}) }) : ct ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2741
2750
|
className: Q.state,
|
|
2742
|
-
colSpan:
|
|
2751
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2743
2752
|
children: ct
|
|
2744
2753
|
}) }) : X.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2745
2754
|
className: Q.state,
|
|
2746
|
-
colSpan:
|
|
2747
|
-
children:
|
|
2748
|
-
}) }) : /* @__PURE__ */
|
|
2749
|
-
let
|
|
2755
|
+
colSpan: q.length + +!!N + +!!G,
|
|
2756
|
+
children: O
|
|
2757
|
+
}) }) : /* @__PURE__ */ t(e, { children: Ge.map((e, i) => {
|
|
2758
|
+
let a = Ze.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = $e.has(e.id);
|
|
2750
2759
|
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ n("tr", {
|
|
2760
|
+
ref: qe >= 0 && i >= qe ? (e) => {
|
|
2761
|
+
e ? Je.current.set(i, e) : Je.current.delete(i);
|
|
2762
|
+
} : void 0,
|
|
2751
2763
|
className: [
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2764
|
+
ee || N ? Q.clickableRow : "",
|
|
2765
|
+
a ? Q.selectedRow : "",
|
|
2766
|
+
v?.(e.original)
|
|
2755
2767
|
].filter(Boolean).join(" "),
|
|
2756
|
-
style:
|
|
2757
|
-
"aria-selected":
|
|
2768
|
+
style: y?.(e.original),
|
|
2769
|
+
"aria-selected": N ? a : void 0,
|
|
2758
2770
|
onClick: () => {
|
|
2759
|
-
|
|
2771
|
+
N ? Ft(e.id) : ee?.(e.original);
|
|
2760
2772
|
},
|
|
2761
2773
|
onDoubleClick: () => {
|
|
2762
|
-
|
|
2774
|
+
N && I?.(e.original);
|
|
2763
2775
|
},
|
|
2764
2776
|
onKeyDown: (t) => {
|
|
2765
|
-
t.key === "Enter" ? (t.preventDefault(),
|
|
2777
|
+
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : ee?.(e.original)) : t.key === " " && N && (t.preventDefault(), Ft(e.id));
|
|
2766
2778
|
},
|
|
2767
|
-
tabIndex:
|
|
2768
|
-
role: !
|
|
2779
|
+
tabIndex: ee || N || I ? 0 : void 0,
|
|
2780
|
+
role: !N && ee ? "button" : void 0,
|
|
2769
2781
|
children: [
|
|
2770
|
-
|
|
2782
|
+
G && /* @__PURE__ */ t("td", {
|
|
2771
2783
|
className: Q.expansionCell,
|
|
2772
2784
|
onClick: (e) => e.stopPropagation(),
|
|
2773
2785
|
children: /* @__PURE__ */ t(j, {
|
|
2774
2786
|
size: "sm",
|
|
2775
2787
|
variant: "empty",
|
|
2776
|
-
"aria-expanded":
|
|
2777
|
-
"aria-label":
|
|
2778
|
-
onClick: () =>
|
|
2779
|
-
children: /* @__PURE__ */ t(
|
|
2788
|
+
"aria-expanded": s,
|
|
2789
|
+
"aria-label": pe?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2790
|
+
onClick: () => Rt(e.id),
|
|
2791
|
+
children: /* @__PURE__ */ t(J, {
|
|
2780
2792
|
name: "IconChevron",
|
|
2781
2793
|
width: 16,
|
|
2782
2794
|
height: 16,
|
|
2783
|
-
className:
|
|
2795
|
+
className: s ? Q.expansionIconOpen : Q.expansionIcon
|
|
2784
2796
|
})
|
|
2785
2797
|
})
|
|
2786
2798
|
}),
|
|
2787
|
-
|
|
2799
|
+
N && /* @__PURE__ */ t("td", {
|
|
2788
2800
|
className: Q.selectionCell,
|
|
2789
2801
|
children: /* @__PURE__ */ t("div", {
|
|
2790
2802
|
onClick: (e) => e.stopPropagation(),
|
|
2791
|
-
children: /* @__PURE__ */ t(
|
|
2792
|
-
checked:
|
|
2793
|
-
ariaLabel:
|
|
2794
|
-
onChange: () =>
|
|
2803
|
+
children: /* @__PURE__ */ t(Pe, {
|
|
2804
|
+
checked: a,
|
|
2805
|
+
ariaLabel: o,
|
|
2806
|
+
onChange: () => Ft(e.id)
|
|
2795
2807
|
})
|
|
2796
2808
|
})
|
|
2797
2809
|
}),
|
|
2798
2810
|
e.getAllCells().map((e) => {
|
|
2799
|
-
let n =
|
|
2811
|
+
let n = q.find((t) => t.id === e.column.id);
|
|
2800
2812
|
return /* @__PURE__ */ t("td", {
|
|
2801
2813
|
className: n?.sticky ? Q.stickyColumn : void 0,
|
|
2802
2814
|
style: {
|
|
2803
|
-
...
|
|
2804
|
-
...
|
|
2815
|
+
...At(n),
|
|
2816
|
+
...jt(n)
|
|
2805
2817
|
},
|
|
2806
|
-
children: /* @__PURE__ */ t(
|
|
2818
|
+
children: /* @__PURE__ */ t(Y.FlexRender, { cell: e })
|
|
2807
2819
|
}, e.id);
|
|
2808
2820
|
})
|
|
2809
2821
|
]
|
|
2810
|
-
}),
|
|
2822
|
+
}), s && G && /* @__PURE__ */ t("tr", {
|
|
2811
2823
|
className: Q.detailRow,
|
|
2812
2824
|
children: /* @__PURE__ */ t("td", {
|
|
2813
|
-
colSpan:
|
|
2814
|
-
children:
|
|
2825
|
+
colSpan: q.length + +!!N + 1,
|
|
2826
|
+
children: G({
|
|
2815
2827
|
row: e.original,
|
|
2816
2828
|
rowId: e.id,
|
|
2817
|
-
collapse: () =>
|
|
2829
|
+
collapse: () => Rt(e.id)
|
|
2818
2830
|
})
|
|
2819
2831
|
})
|
|
2820
2832
|
})] }, e.id);
|
|
2821
|
-
})
|
|
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
|
-
})] }) })
|
|
2833
|
+
}) }) })
|
|
2833
2834
|
]
|
|
2834
2835
|
})
|
|
2835
2836
|
}),
|
|
2836
2837
|
!ot && /* @__PURE__ */ n("div", {
|
|
2837
2838
|
className: Q.cards,
|
|
2838
2839
|
role: "list",
|
|
2839
|
-
"aria-label":
|
|
2840
|
-
children: [
|
|
2840
|
+
"aria-label": T ?? w,
|
|
2841
|
+
children: [N && !E && !ct && X.length > 0 && /* @__PURE__ */ n("div", {
|
|
2841
2842
|
className: Q.mobileSelectionControls,
|
|
2842
|
-
children: [/* @__PURE__ */ t(
|
|
2843
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2843
2844
|
checked: nt,
|
|
2844
2845
|
indeterminate: rt,
|
|
2845
|
-
ariaLabel:
|
|
2846
|
-
label:
|
|
2847
|
-
onChange:
|
|
2846
|
+
ariaLabel: R,
|
|
2847
|
+
label: R,
|
|
2848
|
+
onChange: It
|
|
2848
2849
|
}), /* @__PURE__ */ t(j, {
|
|
2849
2850
|
size: "sm",
|
|
2850
2851
|
variant: "empty",
|
|
2851
2852
|
disabled: Ze.size === 0,
|
|
2852
|
-
onClick:
|
|
2853
|
-
children:
|
|
2853
|
+
onClick: Lt,
|
|
2854
|
+
children: z
|
|
2854
2855
|
})]
|
|
2855
|
-
}),
|
|
2856
|
+
}), E ? /* @__PURE__ */ t(it, {
|
|
2856
2857
|
lines: 4,
|
|
2857
2858
|
height: 65
|
|
2858
2859
|
}) : ct ? /* @__PURE__ */ t("div", {
|
|
@@ -2860,104 +2861,106 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2860
2861
|
children: ct
|
|
2861
2862
|
}) : X.length === 0 ? /* @__PURE__ */ t("div", {
|
|
2862
2863
|
className: Q.state,
|
|
2863
|
-
children:
|
|
2864
|
-
}) : /* @__PURE__ */
|
|
2865
|
-
let
|
|
2864
|
+
children: O
|
|
2865
|
+
}) : /* @__PURE__ */ t(e, { children: Ge.map((e, r) => {
|
|
2866
|
+
let i = Ze.has(e.id), a = $e.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = N && /* @__PURE__ */ n("div", {
|
|
2866
2867
|
className: Q.cardSelectionControls,
|
|
2867
2868
|
onClick: (e) => e.stopPropagation(),
|
|
2868
|
-
children: [/* @__PURE__ */ t(
|
|
2869
|
-
checked:
|
|
2870
|
-
ariaLabel:
|
|
2871
|
-
onChange: () =>
|
|
2872
|
-
}),
|
|
2869
|
+
children: [/* @__PURE__ */ t(Pe, {
|
|
2870
|
+
checked: i,
|
|
2871
|
+
ariaLabel: o,
|
|
2872
|
+
onChange: () => Ft(e.id)
|
|
2873
|
+
}), I && /* @__PURE__ */ t(j, {
|
|
2873
2874
|
size: "sm",
|
|
2874
2875
|
variant: "empty",
|
|
2875
|
-
onClick: () =>
|
|
2876
|
-
children:
|
|
2876
|
+
onClick: () => I(e.original),
|
|
2877
|
+
children: B
|
|
2877
2878
|
})]
|
|
2878
|
-
}),
|
|
2879
|
+
}), c = G && /* @__PURE__ */ t(j, {
|
|
2879
2880
|
size: "sm",
|
|
2880
2881
|
variant: "empty",
|
|
2881
|
-
"aria-expanded":
|
|
2882
|
-
"aria-label":
|
|
2882
|
+
"aria-expanded": a,
|
|
2883
|
+
"aria-label": pe?.(e.original, a) ?? (a ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2883
2884
|
onClick: (t) => {
|
|
2884
|
-
t.stopPropagation(),
|
|
2885
|
+
t.stopPropagation(), Rt(e.id);
|
|
2885
2886
|
},
|
|
2886
|
-
children: /* @__PURE__ */ t(
|
|
2887
|
+
children: /* @__PURE__ */ t(J, {
|
|
2887
2888
|
name: "IconChevron",
|
|
2888
2889
|
width: 16,
|
|
2889
2890
|
height: 16,
|
|
2890
|
-
className:
|
|
2891
|
+
className: a ? Q.expansionIconOpen : Q.expansionIcon
|
|
2891
2892
|
})
|
|
2892
2893
|
});
|
|
2893
|
-
if (
|
|
2894
|
+
if (p) return /* @__PURE__ */ n("div", {
|
|
2895
|
+
ref: qe >= 0 && r >= qe ? (e) => {
|
|
2896
|
+
e ? Ye.current.set(r, e) : Ye.current.delete(r);
|
|
2897
|
+
} : void 0,
|
|
2894
2898
|
role: "listitem",
|
|
2895
2899
|
className: [
|
|
2896
2900
|
Q.customCardShell,
|
|
2897
|
-
|
|
2898
|
-
|
|
2901
|
+
i ? Q.selectedCard : "",
|
|
2902
|
+
v?.(e.original)
|
|
2899
2903
|
].filter(Boolean).join(" "),
|
|
2900
|
-
style:
|
|
2901
|
-
"aria-selected":
|
|
2904
|
+
style: y?.(e.original),
|
|
2905
|
+
"aria-selected": N ? i : void 0,
|
|
2902
2906
|
onClick: () => {
|
|
2903
|
-
|
|
2907
|
+
N && Ft(e.id);
|
|
2904
2908
|
},
|
|
2905
2909
|
children: [
|
|
2906
|
-
|
|
2907
|
-
|
|
2910
|
+
s,
|
|
2911
|
+
p({
|
|
2908
2912
|
row: e.original,
|
|
2909
|
-
columns:
|
|
2913
|
+
columns: q
|
|
2910
2914
|
}),
|
|
2911
|
-
|
|
2912
|
-
|
|
2915
|
+
c,
|
|
2916
|
+
a && /* @__PURE__ */ t("div", {
|
|
2913
2917
|
className: Q.cardDetail,
|
|
2914
|
-
children:
|
|
2918
|
+
children: G?.({
|
|
2915
2919
|
row: e.original,
|
|
2916
2920
|
rowId: e.id,
|
|
2917
|
-
collapse: () =>
|
|
2921
|
+
collapse: () => Rt(e.id)
|
|
2918
2922
|
})
|
|
2919
2923
|
})
|
|
2920
2924
|
]
|
|
2921
2925
|
}, e.id);
|
|
2922
|
-
let
|
|
2926
|
+
let l = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => Pt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
2923
2927
|
return /* @__PURE__ */ n("article", {
|
|
2928
|
+
ref: qe >= 0 && r >= qe ? (e) => {
|
|
2929
|
+
e ? Ye.current.set(r, e) : Ye.current.delete(r);
|
|
2930
|
+
} : void 0,
|
|
2924
2931
|
role: "listitem",
|
|
2925
2932
|
className: [
|
|
2926
2933
|
Q.card,
|
|
2927
|
-
|
|
2928
|
-
|
|
2934
|
+
i ? Q.selectedCard : "",
|
|
2935
|
+
v?.(e.original)
|
|
2929
2936
|
].filter(Boolean).join(" "),
|
|
2930
|
-
style:
|
|
2931
|
-
"aria-selected":
|
|
2937
|
+
style: y?.(e.original),
|
|
2938
|
+
"aria-selected": N ? i : void 0,
|
|
2932
2939
|
onClick: () => {
|
|
2933
|
-
|
|
2940
|
+
N && Ft(e.id);
|
|
2934
2941
|
},
|
|
2935
2942
|
children: [
|
|
2936
|
-
o,
|
|
2937
2943
|
s,
|
|
2938
|
-
|
|
2939
|
-
/* @__PURE__ */ t("
|
|
2944
|
+
c,
|
|
2945
|
+
/* @__PURE__ */ t("h3", { children: u ? f(u) : `Строка ${e.index + 1}` }),
|
|
2946
|
+
/* @__PURE__ */ t("dl", { children: l.filter((e) => e !== u && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
|
|
2940
2947
|
className: e.mobile?.mobileSpan === 2 ? Q.spanTwo : "",
|
|
2941
|
-
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children:
|
|
2948
|
+
children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: f(e) })]
|
|
2942
2949
|
}, e.id)) }),
|
|
2943
|
-
|
|
2944
|
-
|
|
2950
|
+
l.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
2951
|
+
a && /* @__PURE__ */ t("div", {
|
|
2945
2952
|
className: Q.cardDetail,
|
|
2946
|
-
children:
|
|
2953
|
+
children: G?.({
|
|
2947
2954
|
row: e.original,
|
|
2948
2955
|
rowId: e.id,
|
|
2949
|
-
collapse: () =>
|
|
2956
|
+
collapse: () => Rt(e.id)
|
|
2950
2957
|
})
|
|
2951
2958
|
})
|
|
2952
2959
|
]
|
|
2953
2960
|
}, e.id);
|
|
2954
|
-
})
|
|
2955
|
-
ref: qe,
|
|
2956
|
-
"aria-hidden": "true",
|
|
2957
|
-
style: { height: 1 }
|
|
2958
|
-
})] })]
|
|
2961
|
+
}) })]
|
|
2959
2962
|
}),
|
|
2960
|
-
(lt || ut && !
|
|
2963
|
+
(lt || ut && !E && !ct && X.length > 0) && /* @__PURE__ */ n("nav", {
|
|
2961
2964
|
className: Q.pagination,
|
|
2962
2965
|
"aria-label": "Пагинация таблицы",
|
|
2963
2966
|
children: [ut ? yt("bottom") : /* @__PURE__ */ n("span", {
|
|
@@ -2969,7 +2972,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2969
2972
|
_t,
|
|
2970
2973
|
" из",
|
|
2971
2974
|
" ",
|
|
2972
|
-
|
|
2975
|
+
Ie
|
|
2973
2976
|
]
|
|
2974
2977
|
}), lt && /* @__PURE__ */ n("div", {
|
|
2975
2978
|
className: Q.paginationControls,
|
|
@@ -2977,12 +2980,12 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2977
2980
|
/* @__PURE__ */ n(j, {
|
|
2978
2981
|
variant: "empty",
|
|
2979
2982
|
size: "md",
|
|
2980
|
-
disabled:
|
|
2983
|
+
disabled: E || ze === 0,
|
|
2981
2984
|
"aria-label": "Предыдущая страница",
|
|
2982
2985
|
onClick: () => {
|
|
2983
|
-
bt(
|
|
2986
|
+
bt(ze - 1);
|
|
2984
2987
|
},
|
|
2985
|
-
children: [/* @__PURE__ */ t(
|
|
2988
|
+
children: [/* @__PURE__ */ t(J, {
|
|
2986
2989
|
name: "IconChevron",
|
|
2987
2990
|
width: 18,
|
|
2988
2991
|
height: 18,
|
|
@@ -2995,12 +2998,12 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2995
2998
|
/* @__PURE__ */ t("div", {
|
|
2996
2999
|
className: Q.pageNumbers,
|
|
2997
3000
|
children: at.map((e) => typeof e == "number" ? /* @__PURE__ */ t(j, {
|
|
2998
|
-
variant: e ===
|
|
3001
|
+
variant: e === ze ? "secondary" : "empty",
|
|
2999
3002
|
size: "md",
|
|
3000
3003
|
className: Q.pageButton,
|
|
3001
3004
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
3002
|
-
"aria-current": e ===
|
|
3003
|
-
disabled:
|
|
3005
|
+
"aria-current": e === ze ? "page" : void 0,
|
|
3006
|
+
disabled: E,
|
|
3004
3007
|
onClick: () => {
|
|
3005
3008
|
bt(e);
|
|
3006
3009
|
},
|
|
@@ -3014,15 +3017,15 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3014
3017
|
/* @__PURE__ */ n(j, {
|
|
3015
3018
|
variant: "empty",
|
|
3016
3019
|
size: "md",
|
|
3017
|
-
disabled:
|
|
3020
|
+
disabled: E || ze === Le - 1,
|
|
3018
3021
|
"aria-label": "Следующая страница",
|
|
3019
3022
|
onClick: () => {
|
|
3020
|
-
bt(
|
|
3023
|
+
bt(ze + 1);
|
|
3021
3024
|
},
|
|
3022
3025
|
children: [/* @__PURE__ */ t("span", {
|
|
3023
3026
|
className: Q.paginationButtonLabel,
|
|
3024
3027
|
children: "Вперёд"
|
|
3025
|
-
}), /* @__PURE__ */ t(
|
|
3028
|
+
}), /* @__PURE__ */ t(J, {
|
|
3026
3029
|
name: "IconChevron",
|
|
3027
3030
|
width: 18,
|
|
3028
3031
|
height: 18,
|
|
@@ -3034,17 +3037,17 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3034
3037
|
})
|
|
3035
3038
|
]
|
|
3036
3039
|
});
|
|
3037
|
-
},
|
|
3040
|
+
}, Ut = (e, t) => {
|
|
3038
3041
|
let n = t.trim().toLocaleLowerCase();
|
|
3039
3042
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
3040
|
-
},
|
|
3043
|
+
}, Wt = (e, t, n) => {
|
|
3041
3044
|
if (!e.length) return -1;
|
|
3042
3045
|
for (let r = 0; r < e.length; r += 1) {
|
|
3043
3046
|
let i = (t + r * n + e.length) % e.length;
|
|
3044
3047
|
if (!e[i]?.disabled) return i;
|
|
3045
3048
|
}
|
|
3046
3049
|
return -1;
|
|
3047
|
-
},
|
|
3050
|
+
}, Gt = {
|
|
3048
3051
|
wrapper: "_wrapper_1os84_1",
|
|
3049
3052
|
control: "_control_1os84_17",
|
|
3050
3053
|
inputHost: "_inputHost_1os84_25",
|
|
@@ -3063,76 +3066,76 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3063
3066
|
active: "_active_1os84_321",
|
|
3064
3067
|
actionOption: "_actionOption_1os84_341",
|
|
3065
3068
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
3066
|
-
},
|
|
3069
|
+
}, Kt = 8, qt = 6, Jt = 5, Yt = 10, Xt = {
|
|
3067
3070
|
sm: 30,
|
|
3068
3071
|
md: 40,
|
|
3069
3072
|
lg: 50
|
|
3070
|
-
},
|
|
3073
|
+
}, Zt = ({ 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 }) => {
|
|
3071
3074
|
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 = [
|
|
3072
3075
|
A,
|
|
3073
3076
|
j,
|
|
3074
3077
|
M
|
|
3075
|
-
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B,
|
|
3076
|
-
d(() =>
|
|
3077
|
-
let
|
|
3078
|
-
|
|
3079
|
-
}, []),
|
|
3080
|
-
let e =
|
|
3078
|
+
].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(-1), [W, te] = g(null), ne = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => Ut(e, B), [e, B]), ie = s && u, ae = H >= 0 ? re[H] : void 0;
|
|
3079
|
+
d(() => V(ne?.label ?? ""), [ne?.label, r]);
|
|
3080
|
+
let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => Wt(re, e, t), [re]), ce = l((e) => {
|
|
3081
|
+
U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3082
|
+
}, []), le = l(() => {
|
|
3083
|
+
let e = oe();
|
|
3081
3084
|
if (!e) return;
|
|
3082
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
3083
|
-
|
|
3085
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Jt)) * Xt[x] + Yt, r = window.innerHeight - t.bottom - Kt, i = t.top - Kt, a = r < n && i > r, o = a ? i : r, s = Math.max(Xt[x] + Yt, Math.min(n, o)), c = window.innerWidth - t.width - Kt, l = Math.max(Kt, Math.min(t.left, c)), u = a ? Math.max(Kt, t.top - s - qt) : t.bottom + qt;
|
|
3086
|
+
te({
|
|
3084
3087
|
top: u,
|
|
3085
3088
|
left: l,
|
|
3086
3089
|
width: t.width,
|
|
3087
3090
|
maxHeight: s
|
|
3088
3091
|
});
|
|
3089
3092
|
}, [
|
|
3090
|
-
|
|
3091
|
-
|
|
3093
|
+
re.length,
|
|
3094
|
+
oe,
|
|
3092
3095
|
x
|
|
3093
3096
|
]);
|
|
3094
3097
|
p(() => {
|
|
3095
3098
|
if (!R) {
|
|
3096
|
-
|
|
3099
|
+
te(null);
|
|
3097
3100
|
return;
|
|
3098
3101
|
}
|
|
3099
|
-
return
|
|
3100
|
-
window.removeEventListener("resize",
|
|
3102
|
+
return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
|
|
3103
|
+
window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
|
|
3101
3104
|
};
|
|
3102
|
-
}, [R,
|
|
3105
|
+
}, [R, le]), d(() => {
|
|
3103
3106
|
if (!R) return;
|
|
3104
3107
|
let e = (e) => {
|
|
3105
3108
|
let t = e.target;
|
|
3106
|
-
!F.current?.contains(t) && !I.current?.contains(t) && (z(!1),
|
|
3109
|
+
!F.current?.contains(t) && !I.current?.contains(t) && (z(!1), U(-1));
|
|
3107
3110
|
};
|
|
3108
3111
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
3109
3112
|
}, [R]);
|
|
3110
|
-
let
|
|
3111
|
-
s || c || (z(!0),
|
|
3112
|
-
},
|
|
3113
|
-
e.disabled || (
|
|
3114
|
-
},
|
|
3113
|
+
let ue = () => {
|
|
3114
|
+
s || c || (z(!0), U(se(0, 1)));
|
|
3115
|
+
}, G = (e) => {
|
|
3116
|
+
e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), oe()?.focus());
|
|
3117
|
+
}, de = R ? /* @__PURE__ */ t("ul", {
|
|
3115
3118
|
ref: I,
|
|
3116
3119
|
id: k,
|
|
3117
|
-
className: `${
|
|
3120
|
+
className: `${Gt.menu} ${re.length === 0 ? Gt.menuEmpty : ""}`,
|
|
3118
3121
|
role: "listbox",
|
|
3119
3122
|
"aria-label": v,
|
|
3120
|
-
style:
|
|
3121
|
-
top:
|
|
3122
|
-
left:
|
|
3123
|
-
width:
|
|
3124
|
-
maxHeight:
|
|
3123
|
+
style: W ? {
|
|
3124
|
+
top: W.top,
|
|
3125
|
+
left: W.left,
|
|
3126
|
+
width: W.width,
|
|
3127
|
+
maxHeight: W.maxHeight
|
|
3125
3128
|
} : {
|
|
3126
3129
|
top: 0,
|
|
3127
3130
|
left: 0,
|
|
3128
3131
|
visibility: "hidden",
|
|
3129
3132
|
maxHeight: 0
|
|
3130
3133
|
},
|
|
3131
|
-
children:
|
|
3132
|
-
className: `${
|
|
3134
|
+
children: re.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3135
|
+
className: `${Gt.empty} ${Gt[x]}`,
|
|
3133
3136
|
children: o
|
|
3134
|
-
}) :
|
|
3135
|
-
let a = e.value === r, o = i ===
|
|
3137
|
+
}) : re.map((e, i) => {
|
|
3138
|
+
let a = e.value === r, o = i === H;
|
|
3136
3139
|
return /* @__PURE__ */ t("li", {
|
|
3137
3140
|
role: "presentation",
|
|
3138
3141
|
children: /* @__PURE__ */ n("button", {
|
|
@@ -3148,17 +3151,17 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3148
3151
|
"aria-selected": a,
|
|
3149
3152
|
"data-option-variant": e.variant ?? "default",
|
|
3150
3153
|
className: [
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
e.variant === "action" ?
|
|
3154
|
-
a ?
|
|
3155
|
-
o ?
|
|
3154
|
+
Gt.option,
|
|
3155
|
+
Gt[x],
|
|
3156
|
+
e.variant === "action" ? Gt.actionOption : "",
|
|
3157
|
+
a ? Gt.selected : "",
|
|
3158
|
+
o ? Gt.active : ""
|
|
3156
3159
|
].filter(Boolean).join(" "),
|
|
3157
3160
|
onPointerMove: () => {
|
|
3158
|
-
e.disabled ||
|
|
3161
|
+
e.disabled || U(i);
|
|
3159
3162
|
},
|
|
3160
|
-
onClick: () =>
|
|
3161
|
-
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(
|
|
3163
|
+
onClick: () => G(e),
|
|
3164
|
+
children: [/* @__PURE__ */ t("span", { children: e.label }), a && E && /* @__PURE__ */ t(J, {
|
|
3162
3165
|
name: "IconCheck",
|
|
3163
3166
|
width: 16,
|
|
3164
3167
|
height: 16
|
|
@@ -3170,22 +3173,22 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3170
3173
|
return /* @__PURE__ */ n("div", {
|
|
3171
3174
|
ref: F,
|
|
3172
3175
|
className: [
|
|
3173
|
-
|
|
3174
|
-
y ?
|
|
3176
|
+
Gt.wrapper,
|
|
3177
|
+
y ? Gt.errorState : "",
|
|
3175
3178
|
C
|
|
3176
3179
|
].filter(Boolean).join(" "),
|
|
3177
3180
|
children: [
|
|
3178
3181
|
v && /* @__PURE__ */ t(ee, {
|
|
3179
|
-
htmlFor:
|
|
3182
|
+
htmlFor: ie ? void 0 : O,
|
|
3180
3183
|
required: S,
|
|
3181
3184
|
disabled: s,
|
|
3182
3185
|
children: v
|
|
3183
3186
|
}),
|
|
3184
|
-
|
|
3185
|
-
className: `${
|
|
3186
|
-
children:
|
|
3187
|
+
ie ? /* @__PURE__ */ t("div", {
|
|
3188
|
+
className: `${Gt.disabledText} ${Gt[x]}`,
|
|
3189
|
+
children: ne?.label ?? a
|
|
3187
3190
|
}) : /* @__PURE__ */ n("div", {
|
|
3188
|
-
className:
|
|
3191
|
+
className: Gt.control,
|
|
3189
3192
|
children: [/* @__PURE__ */ t(mt, {
|
|
3190
3193
|
id: O,
|
|
3191
3194
|
name: w,
|
|
@@ -3197,50 +3200,50 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3197
3200
|
size: x,
|
|
3198
3201
|
clearable: !1,
|
|
3199
3202
|
autoComplete: "off",
|
|
3200
|
-
className: `${
|
|
3201
|
-
onFocus:
|
|
3203
|
+
className: `${Gt.inputHost} ${Gt[x]}`,
|
|
3204
|
+
onFocus: ue,
|
|
3202
3205
|
onChange: (t) => {
|
|
3203
|
-
let n = String(t), r =
|
|
3204
|
-
|
|
3206
|
+
let n = String(t), r = Ut(e, n);
|
|
3207
|
+
V(n), z(!0), U(Wt(r, 0, 1));
|
|
3205
3208
|
},
|
|
3206
3209
|
role: "combobox",
|
|
3207
3210
|
"aria-autocomplete": "list",
|
|
3208
3211
|
"aria-expanded": R,
|
|
3209
3212
|
"aria-controls": k,
|
|
3210
|
-
"aria-activedescendant":
|
|
3213
|
+
"aria-activedescendant": ae ? `${O}-option-${H}` : void 0,
|
|
3211
3214
|
"aria-invalid": !!y,
|
|
3212
3215
|
"aria-describedby": P,
|
|
3213
|
-
onClick:
|
|
3216
|
+
onClick: ue,
|
|
3214
3217
|
onKeyDown: (e) => {
|
|
3215
3218
|
if (!(s || c)) {
|
|
3216
3219
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3217
3220
|
e.preventDefault();
|
|
3218
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n =
|
|
3219
|
-
z(!0),
|
|
3221
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = H >= 0 ? H + t : t === 1 ? 0 : re.length - 1;
|
|
3222
|
+
z(!0), ce(se(n, t));
|
|
3220
3223
|
} else if (e.key === "Home" || e.key === "End") {
|
|
3221
3224
|
if (!R) return;
|
|
3222
3225
|
e.preventDefault();
|
|
3223
3226
|
let t = e.key === "Home" ? 1 : -1;
|
|
3224
|
-
|
|
3225
|
-
} else e.key === "Enter" && R &&
|
|
3227
|
+
ce(se(e.key === "Home" ? 0 : re.length - 1, t));
|
|
3228
|
+
} else e.key === "Enter" && R && ae ? (e.preventDefault(), G(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
|
|
3226
3229
|
}
|
|
3227
3230
|
}
|
|
3228
3231
|
}), /* @__PURE__ */ t("span", {
|
|
3229
|
-
className: `${
|
|
3232
|
+
className: `${Gt.chevron} ${R ? Gt.chevronOpen : ""}`,
|
|
3230
3233
|
"aria-hidden": "true",
|
|
3231
|
-
children: /* @__PURE__ */ t(
|
|
3234
|
+
children: /* @__PURE__ */ t(J, {
|
|
3232
3235
|
name: "IconChevron",
|
|
3233
3236
|
width: 20,
|
|
3234
3237
|
height: 20
|
|
3235
3238
|
})
|
|
3236
3239
|
})]
|
|
3237
3240
|
}),
|
|
3238
|
-
R && typeof document < "u" && _(
|
|
3241
|
+
R && typeof document < "u" && _(de, document.body),
|
|
3239
3242
|
/* @__PURE__ */ n("span", {
|
|
3240
3243
|
id: A,
|
|
3241
|
-
className:
|
|
3244
|
+
className: Gt.visuallyHidden,
|
|
3242
3245
|
"aria-live": "polite",
|
|
3243
|
-
children: ["Найдено вариантов: ",
|
|
3246
|
+
children: ["Найдено вариантов: ", re.length]
|
|
3244
3247
|
}),
|
|
3245
3248
|
b && !y && /* @__PURE__ */ t(N, {
|
|
3246
3249
|
id: j,
|
|
@@ -3253,44 +3256,44 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3253
3256
|
})
|
|
3254
3257
|
]
|
|
3255
3258
|
});
|
|
3256
|
-
},
|
|
3259
|
+
}, Qt = {
|
|
3257
3260
|
root: "_root_11adi_1",
|
|
3258
3261
|
header: "_header_11adi_21",
|
|
3259
3262
|
title: "_title_11adi_41",
|
|
3260
3263
|
dismiss: "_dismiss_11adi_55",
|
|
3261
3264
|
content: "_content_11adi_65"
|
|
3262
|
-
},
|
|
3265
|
+
}, $t = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3263
3266
|
let l = `ds-info-block-${f()}`;
|
|
3264
3267
|
return /* @__PURE__ */ n("section", {
|
|
3265
|
-
className: `${
|
|
3268
|
+
className: `${Qt.root} ${c}`,
|
|
3266
3269
|
"aria-labelledby": l,
|
|
3267
3270
|
children: [/* @__PURE__ */ n("header", {
|
|
3268
|
-
className:
|
|
3271
|
+
className: Qt.header,
|
|
3269
3272
|
children: [/* @__PURE__ */ t(s, {
|
|
3270
3273
|
id: l,
|
|
3271
|
-
className:
|
|
3274
|
+
className: Qt.title,
|
|
3272
3275
|
children: e
|
|
3273
3276
|
}), i && /* @__PURE__ */ t(j, {
|
|
3274
|
-
className:
|
|
3277
|
+
className: Qt.dismiss,
|
|
3275
3278
|
variant: "empty",
|
|
3276
3279
|
onClick: a,
|
|
3277
3280
|
"aria-label": o,
|
|
3278
|
-
children: /* @__PURE__ */ t(
|
|
3281
|
+
children: /* @__PURE__ */ t(J, {
|
|
3279
3282
|
name: "IconCross",
|
|
3280
3283
|
width: 20,
|
|
3281
3284
|
height: 20
|
|
3282
3285
|
})
|
|
3283
3286
|
})]
|
|
3284
3287
|
}), /* @__PURE__ */ t("div", {
|
|
3285
|
-
className:
|
|
3288
|
+
className: Qt.content,
|
|
3286
3289
|
children: r
|
|
3287
3290
|
})]
|
|
3288
3291
|
});
|
|
3289
|
-
},
|
|
3292
|
+
}, en = {
|
|
3290
3293
|
root: "_root_1ecm3_1",
|
|
3291
3294
|
grid: "_grid_1ecm3_13",
|
|
3292
3295
|
actions: "_actions_1ecm3_27"
|
|
3293
|
-
},
|
|
3296
|
+
}, tn = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3294
3297
|
let d = (e, t) => {
|
|
3295
3298
|
let n = {
|
|
3296
3299
|
...r,
|
|
@@ -3299,11 +3302,11 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3299
3302
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3300
3303
|
};
|
|
3301
3304
|
return /* @__PURE__ */ n("section", {
|
|
3302
|
-
className: `${
|
|
3305
|
+
className: `${en.root} ${u}`,
|
|
3303
3306
|
"aria-label": "Фильтры",
|
|
3304
3307
|
"aria-busy": c,
|
|
3305
3308
|
children: [/* @__PURE__ */ t("div", {
|
|
3306
|
-
className:
|
|
3309
|
+
className: en.grid,
|
|
3307
3310
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3308
3311
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3309
3312
|
if (e.type === "input") {
|
|
@@ -3343,7 +3346,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3343
3346
|
disabled: n,
|
|
3344
3347
|
onChange: (t) => d(e.id, t)
|
|
3345
3348
|
}, e.id);
|
|
3346
|
-
if (e.type === "checkbox") return /* @__PURE__ */ t(
|
|
3349
|
+
if (e.type === "checkbox") return /* @__PURE__ */ t(Pe, {
|
|
3347
3350
|
label: e.label,
|
|
3348
3351
|
hint: e.hint,
|
|
3349
3352
|
checked: !!i,
|
|
@@ -3371,7 +3374,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3371
3374
|
}, e.id);
|
|
3372
3375
|
})
|
|
3373
3376
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3374
|
-
className:
|
|
3377
|
+
className: en.actions,
|
|
3375
3378
|
children: [o && /* @__PURE__ */ t(j, {
|
|
3376
3379
|
variant: "destructiveOutline",
|
|
3377
3380
|
disabled: l || c,
|
|
@@ -3385,7 +3388,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3385
3388
|
})]
|
|
3386
3389
|
})]
|
|
3387
3390
|
});
|
|
3388
|
-
},
|
|
3391
|
+
}, nn = {
|
|
3389
3392
|
grid: "_grid_1q540_1",
|
|
3390
3393
|
comfortable: "_comfortable_1q540_11",
|
|
3391
3394
|
compact: "_compact_1q540_19",
|
|
@@ -3402,23 +3405,23 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3402
3405
|
summary: "_summary_1q540_101",
|
|
3403
3406
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3404
3407
|
summaryList: "_summaryList_1q540_145"
|
|
3405
|
-
},
|
|
3408
|
+
}, rn = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3406
3409
|
...i,
|
|
3407
|
-
className: `${
|
|
3408
|
-
}),
|
|
3410
|
+
className: `${nn.grid} ${nn[`columns${e}`]} ${nn[n]} ${r}`
|
|
3411
|
+
}), an = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3409
3412
|
...r,
|
|
3410
|
-
className: `${
|
|
3411
|
-
}),
|
|
3413
|
+
className: `${nn.item} ${nn[`span${e}`]} ${n}`
|
|
3414
|
+
}), on = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3412
3415
|
...o,
|
|
3413
|
-
className: `${
|
|
3416
|
+
className: `${nn.summary} ${a}`,
|
|
3414
3417
|
role: "alert",
|
|
3415
3418
|
"aria-atomic": "true",
|
|
3416
3419
|
tabIndex: -1,
|
|
3417
3420
|
children: [/* @__PURE__ */ t("strong", {
|
|
3418
|
-
className:
|
|
3421
|
+
className: nn.summaryTitle,
|
|
3419
3422
|
children: e
|
|
3420
3423
|
}), /* @__PURE__ */ t("ul", {
|
|
3421
|
-
className:
|
|
3424
|
+
className: nn.summaryList,
|
|
3422
3425
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3423
3426
|
href: `#${e.fieldId}`,
|
|
3424
3427
|
onClick: (t) => {
|
|
@@ -3427,7 +3430,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3427
3430
|
children: e.message
|
|
3428
3431
|
}) : e.message }, e.id))
|
|
3429
3432
|
})]
|
|
3430
|
-
}),
|
|
3433
|
+
}), sn = {
|
|
3431
3434
|
wrapper: "_wrapper_i20hz_1",
|
|
3432
3435
|
dropzone: "_dropzone_i20hz_15",
|
|
3433
3436
|
dragActive: "_dragActive_i20hz_45",
|
|
@@ -3440,12 +3443,12 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3440
3443
|
file: "_file_i20hz_133",
|
|
3441
3444
|
fileName: "_fileName_i20hz_175",
|
|
3442
3445
|
fileSize: "_fileSize_i20hz_187"
|
|
3443
|
-
},
|
|
3446
|
+
}, cn = (e) => `${e.name}:${e.size}:${e.lastModified}`, ln = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, un = (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), dn = ({ 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 }) => {
|
|
3444
3447
|
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) => {
|
|
3445
|
-
let t = [], n = new Set(r.map(
|
|
3448
|
+
let t = [], n = new Set(r.map(cn)), l = e.filter((e) => un(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3446
3449
|
file: e,
|
|
3447
3450
|
reason: "maxSize"
|
|
3448
|
-
}), !1) : !n.has(
|
|
3451
|
+
}), !1) : !n.has(cn(e)) && (n.add(cn(e)), !0) : (t.push({
|
|
3449
3452
|
file: e,
|
|
3450
3453
|
reason: "accept"
|
|
3451
3454
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3455,7 +3458,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3455
3458
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3456
3459
|
};
|
|
3457
3460
|
return /* @__PURE__ */ n("div", {
|
|
3458
|
-
className: `${
|
|
3461
|
+
className: `${sn.wrapper} ${b}`,
|
|
3459
3462
|
children: [
|
|
3460
3463
|
l && /* @__PURE__ */ t(ee, {
|
|
3461
3464
|
htmlFor: E,
|
|
@@ -3464,7 +3467,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3464
3467
|
children: l
|
|
3465
3468
|
}),
|
|
3466
3469
|
/* @__PURE__ */ n("div", {
|
|
3467
|
-
className: `${
|
|
3470
|
+
className: `${sn.dropzone} ${k ? sn.dragActive : ""} ${m ? sn.disabled : ""} ${d ? sn.error : ""}`,
|
|
3468
3471
|
onDragEnter: (e) => {
|
|
3469
3472
|
e.preventDefault(), I && ++O.current === 1 && A(!0);
|
|
3470
3473
|
},
|
|
@@ -3479,7 +3482,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3479
3482
|
ref: D,
|
|
3480
3483
|
id: E,
|
|
3481
3484
|
name: v,
|
|
3482
|
-
className:
|
|
3485
|
+
className: sn.nativeInput,
|
|
3483
3486
|
type: "file",
|
|
3484
3487
|
multiple: a,
|
|
3485
3488
|
accept: o,
|
|
@@ -3490,53 +3493,53 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3490
3493
|
onChange: (e) => L(Array.from(e.target.files ?? []))
|
|
3491
3494
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3492
3495
|
/* @__PURE__ */ t("ul", {
|
|
3493
|
-
className:
|
|
3496
|
+
className: sn.files,
|
|
3494
3497
|
"aria-live": "polite",
|
|
3495
3498
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3496
|
-
className:
|
|
3499
|
+
className: sn.file,
|
|
3497
3500
|
children: [
|
|
3498
3501
|
/* @__PURE__ */ t("span", {
|
|
3499
|
-
className:
|
|
3502
|
+
className: sn.fileName,
|
|
3500
3503
|
title: e.name,
|
|
3501
3504
|
children: e.name
|
|
3502
3505
|
}),
|
|
3503
3506
|
/* @__PURE__ */ t("span", {
|
|
3504
|
-
className:
|
|
3505
|
-
children:
|
|
3507
|
+
className: sn.fileSize,
|
|
3508
|
+
children: ln(e.size)
|
|
3506
3509
|
}),
|
|
3507
3510
|
I && /* @__PURE__ */ t(j, {
|
|
3508
3511
|
variant: "empty",
|
|
3509
3512
|
size: "sm",
|
|
3510
3513
|
"aria-label": `Удалить файл ${e.name}`,
|
|
3511
3514
|
onClick: () => i?.(r.filter((e, t) => t !== a)),
|
|
3512
|
-
children: /* @__PURE__ */ t(
|
|
3515
|
+
children: /* @__PURE__ */ t(J, {
|
|
3513
3516
|
name: "IconCross",
|
|
3514
3517
|
width: 16,
|
|
3515
3518
|
height: 16
|
|
3516
3519
|
})
|
|
3517
3520
|
})
|
|
3518
3521
|
]
|
|
3519
|
-
},
|
|
3522
|
+
}, cn(e)))
|
|
3520
3523
|
}),
|
|
3521
3524
|
I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
|
|
3522
|
-
className:
|
|
3525
|
+
className: sn.browseButton,
|
|
3523
3526
|
size: "sm",
|
|
3524
3527
|
onClick: () => D.current?.click(),
|
|
3525
3528
|
children: C
|
|
3526
3529
|
}),
|
|
3527
3530
|
I && !a && /* @__PURE__ */ t(j, {
|
|
3528
|
-
className:
|
|
3531
|
+
className: sn.browseButton,
|
|
3529
3532
|
size: "sm",
|
|
3530
3533
|
onClick: () => D.current?.click(),
|
|
3531
3534
|
children: S
|
|
3532
3535
|
})
|
|
3533
3536
|
] }) : /* @__PURE__ */ n("div", {
|
|
3534
|
-
className:
|
|
3537
|
+
className: sn.empty,
|
|
3535
3538
|
children: [
|
|
3536
3539
|
/* @__PURE__ */ t("span", {
|
|
3537
|
-
className:
|
|
3540
|
+
className: sn.uploadIcon,
|
|
3538
3541
|
"aria-hidden": "true",
|
|
3539
|
-
children: /* @__PURE__ */ t(
|
|
3542
|
+
children: /* @__PURE__ */ t(J, {
|
|
3540
3543
|
name: "IconUpload",
|
|
3541
3544
|
width: 24,
|
|
3542
3545
|
height: 24
|
|
@@ -3562,7 +3565,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3562
3565
|
})
|
|
3563
3566
|
]
|
|
3564
3567
|
});
|
|
3565
|
-
},
|
|
3568
|
+
}, fn = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
3566
3569
|
let [n, r] = g(null);
|
|
3567
3570
|
return d(() => {
|
|
3568
3571
|
let e = document.getElementById(t);
|
|
@@ -3575,7 +3578,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3575
3578
|
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3576
3579
|
};
|
|
3577
3580
|
}, [t]), n ? _(e, n) : null;
|
|
3578
|
-
},
|
|
3581
|
+
}, pn = typeof window > "u" ? d : p, mn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3579
3582
|
let [o, s] = g(null), [c, u] = g({
|
|
3580
3583
|
position: "fixed",
|
|
3581
3584
|
visibility: "hidden",
|
|
@@ -3598,7 +3601,7 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3598
3601
|
o,
|
|
3599
3602
|
i
|
|
3600
3603
|
]);
|
|
3601
|
-
return
|
|
3604
|
+
return pn(() => {
|
|
3602
3605
|
if (!o) return;
|
|
3603
3606
|
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3604
3607
|
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
@@ -3609,13 +3612,13 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3609
3612
|
e,
|
|
3610
3613
|
o,
|
|
3611
3614
|
d
|
|
3612
|
-
]), /* @__PURE__ */ t(
|
|
3615
|
+
]), /* @__PURE__ */ t(fn, { children: /* @__PURE__ */ t("div", {
|
|
3613
3616
|
ref: s,
|
|
3614
3617
|
className: a,
|
|
3615
3618
|
style: c,
|
|
3616
3619
|
children: n
|
|
3617
3620
|
}) });
|
|
3618
|
-
},
|
|
3621
|
+
}, hn = {
|
|
3619
3622
|
wrapper: "_wrapper_x2gki_1",
|
|
3620
3623
|
control: "_control_x2gki_15",
|
|
3621
3624
|
textarea: "_textarea_x2gki_25",
|
|
@@ -3629,12 +3632,12 @@ var Dt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3629
3632
|
clearAction: "_clearAction_x2gki_171",
|
|
3630
3633
|
messages: "_messages_x2gki_251",
|
|
3631
3634
|
counter: "_counter_x2gki_265"
|
|
3632
|
-
},
|
|
3633
|
-
function
|
|
3635
|
+
}, gn = 2;
|
|
3636
|
+
function _n(e) {
|
|
3634
3637
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3635
3638
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3636
3639
|
}
|
|
3637
|
-
function
|
|
3640
|
+
function vn({ 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 = gn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3638
3641
|
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 = [
|
|
3639
3642
|
A,
|
|
3640
3643
|
j,
|
|
@@ -3642,7 +3645,7 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3642
3645
|
].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
|
|
3643
3646
|
let e = k.current;
|
|
3644
3647
|
if (!e || !T) return;
|
|
3645
|
-
let t = window.getComputedStyle(e), n =
|
|
3648
|
+
let t = window.getComputedStyle(e), n = _n(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;
|
|
3646
3649
|
e.style.height = "auto";
|
|
3647
3650
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3648
3651
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3674,7 +3677,7 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3674
3677
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
|
|
3675
3678
|
}, B = { "--ds-textarea-min-rows": F };
|
|
3676
3679
|
return /* @__PURE__ */ n("div", {
|
|
3677
|
-
className: `${
|
|
3680
|
+
className: `${hn.wrapper} ${m}`,
|
|
3678
3681
|
children: [
|
|
3679
3682
|
c && /* @__PURE__ */ t(ee, {
|
|
3680
3683
|
htmlFor: O,
|
|
@@ -3684,12 +3687,12 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3684
3687
|
}),
|
|
3685
3688
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3686
3689
|
id: O,
|
|
3687
|
-
className: `${
|
|
3690
|
+
className: `${hn.disabledText} ${hn[v]}`,
|
|
3688
3691
|
style: B,
|
|
3689
3692
|
"aria-describedby": P,
|
|
3690
3693
|
children: e || i
|
|
3691
3694
|
}) : /* @__PURE__ */ n("div", {
|
|
3692
|
-
className:
|
|
3695
|
+
className: hn.control,
|
|
3693
3696
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3694
3697
|
ref: k,
|
|
3695
3698
|
id: O,
|
|
@@ -3704,15 +3707,15 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3704
3707
|
style: B,
|
|
3705
3708
|
"aria-invalid": !!u,
|
|
3706
3709
|
"aria-describedby": P,
|
|
3707
|
-
className: `${
|
|
3710
|
+
className: `${hn.textarea} ${hn[v]} ${T ? hn.autoResize : hn.manualResize} ${u ? hn.textareaError : ""}`,
|
|
3708
3711
|
onChange: R,
|
|
3709
3712
|
...E
|
|
3710
3713
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3711
3714
|
type: "button",
|
|
3712
|
-
className:
|
|
3715
|
+
className: hn.clearAction,
|
|
3713
3716
|
"aria-label": "Очистить поле",
|
|
3714
3717
|
onClick: z,
|
|
3715
|
-
children: /* @__PURE__ */ t(
|
|
3718
|
+
children: /* @__PURE__ */ t(J, {
|
|
3716
3719
|
name: "IconCross",
|
|
3717
3720
|
width: 20,
|
|
3718
3721
|
height: 20
|
|
@@ -3720,7 +3723,7 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3720
3723
|
})]
|
|
3721
3724
|
}),
|
|
3722
3725
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3723
|
-
className:
|
|
3726
|
+
className: hn.messages,
|
|
3724
3727
|
children: [
|
|
3725
3728
|
p && !u && /* @__PURE__ */ t(N, {
|
|
3726
3729
|
id: A,
|
|
@@ -3733,7 +3736,7 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3733
3736
|
}),
|
|
3734
3737
|
M && /* @__PURE__ */ n("span", {
|
|
3735
3738
|
id: M,
|
|
3736
|
-
className:
|
|
3739
|
+
className: hn.counter,
|
|
3737
3740
|
children: [
|
|
3738
3741
|
e.length,
|
|
3739
3742
|
" / ",
|
|
@@ -3747,11 +3750,11 @@ function _n({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3747
3750
|
}
|
|
3748
3751
|
//#endregion
|
|
3749
3752
|
//#region src/components/DSModal/modal.store.ts
|
|
3750
|
-
var
|
|
3753
|
+
var yn = 0, bn = S((e, t) => ({
|
|
3751
3754
|
modals: [],
|
|
3752
3755
|
openModal: (t, n = {}, r = {}) => {
|
|
3753
|
-
|
|
3754
|
-
let i = `ds-modal-${
|
|
3756
|
+
yn += 1;
|
|
3757
|
+
let i = `ds-modal-${yn}`;
|
|
3755
3758
|
return e((e) => ({ modals: [...e.modals, {
|
|
3756
3759
|
id: i,
|
|
3757
3760
|
name: t,
|
|
@@ -3775,10 +3778,10 @@ var vn = 0, yn = S((e, t) => ({
|
|
|
3775
3778
|
let n = t().modals;
|
|
3776
3779
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3777
3780
|
}
|
|
3778
|
-
})),
|
|
3779
|
-
|
|
3780
|
-
},
|
|
3781
|
-
function
|
|
3781
|
+
})), xn = () => {
|
|
3782
|
+
bn.getState().closeAllModals(), yn = 0;
|
|
3783
|
+
}, Sn = 8, Cn = 96, wn = .55;
|
|
3784
|
+
function Tn(e, t, n) {
|
|
3782
3785
|
return {
|
|
3783
3786
|
startX: e,
|
|
3784
3787
|
startY: t,
|
|
@@ -3786,16 +3789,16 @@ function wn(e, t, n) {
|
|
|
3786
3789
|
intent: "pending"
|
|
3787
3790
|
};
|
|
3788
3791
|
}
|
|
3789
|
-
function
|
|
3792
|
+
function En(e, t, n) {
|
|
3790
3793
|
let r = t - e.startX, i = n - e.startY;
|
|
3791
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
3794
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= Sn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3792
3795
|
}
|
|
3793
|
-
function
|
|
3796
|
+
function Dn(e, t, n) {
|
|
3794
3797
|
if (e.intent !== "vertical") return !1;
|
|
3795
3798
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3796
|
-
return r >=
|
|
3799
|
+
return r >= Cn || r >= 32 && r / i >= wn;
|
|
3797
3800
|
}
|
|
3798
|
-
var
|
|
3801
|
+
var On = {
|
|
3799
3802
|
layer: "_layer_w9isk_1",
|
|
3800
3803
|
backdrop: "_backdrop_w9isk_15",
|
|
3801
3804
|
"backdrop-enter": "_backdrop-enter_w9isk_1",
|
|
@@ -3808,10 +3811,10 @@ var Dn = {
|
|
|
3808
3811
|
close: "_close_w9isk_141",
|
|
3809
3812
|
dragHandle: "_dragHandle_w9isk_149",
|
|
3810
3813
|
"sheet-enter": "_sheet-enter_w9isk_1"
|
|
3811
|
-
},
|
|
3812
|
-
function
|
|
3814
|
+
}, kn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", An = a({});
|
|
3815
|
+
function jn(e) {
|
|
3813
3816
|
if (e.key !== "Tab") return;
|
|
3814
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
3817
|
+
let t = Array.from(e.currentTarget.querySelectorAll(kn));
|
|
3815
3818
|
if (!t.length) {
|
|
3816
3819
|
e.preventDefault();
|
|
3817
3820
|
return;
|
|
@@ -3819,18 +3822,18 @@ function An(e) {
|
|
|
3819
3822
|
let n = t[0], r = t.at(-1);
|
|
3820
3823
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3821
3824
|
}
|
|
3822
|
-
var
|
|
3823
|
-
let l = u(
|
|
3825
|
+
var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
3826
|
+
let l = u(An), 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 = bn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3824
3827
|
d(() => {
|
|
3825
3828
|
let e = document.activeElement, t = y.current;
|
|
3826
|
-
return (t?.querySelector(
|
|
3829
|
+
return (t?.querySelector(kn) ?? t)?.focus(), () => e?.focus();
|
|
3827
3830
|
}, []);
|
|
3828
3831
|
let A = (e) => {
|
|
3829
3832
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3830
3833
|
};
|
|
3831
3834
|
return /* @__PURE__ */ n("div", {
|
|
3832
3835
|
ref: y,
|
|
3833
|
-
className: `${
|
|
3836
|
+
className: `${On.panel} ${s}`,
|
|
3834
3837
|
"data-closing": l.closing || void 0,
|
|
3835
3838
|
"data-dragging": w || void 0,
|
|
3836
3839
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3839,41 +3842,41 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3839
3842
|
"aria-labelledby": O ? _ : void 0,
|
|
3840
3843
|
"aria-describedby": k ? v : void 0,
|
|
3841
3844
|
tabIndex: -1,
|
|
3842
|
-
onKeyDown:
|
|
3845
|
+
onKeyDown: jn,
|
|
3843
3846
|
children: [
|
|
3844
3847
|
/* @__PURE__ */ t("button", {
|
|
3845
3848
|
type: "button",
|
|
3846
|
-
className:
|
|
3849
|
+
className: On.dragHandle,
|
|
3847
3850
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
3848
3851
|
onPointerDown: (e) => {
|
|
3849
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
3852
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = Tn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
3850
3853
|
},
|
|
3851
3854
|
onPointerMove: (e) => {
|
|
3852
3855
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3853
|
-
let t =
|
|
3856
|
+
let t = En(b.current, e.clientX, e.clientY);
|
|
3854
3857
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
3855
3858
|
},
|
|
3856
3859
|
onPointerUp: (e) => {
|
|
3857
3860
|
if (e.pointerId !== x.current || !b.current) return;
|
|
3858
|
-
let t =
|
|
3861
|
+
let t = Dn(b.current, e.clientY, e.timeStamp);
|
|
3859
3862
|
A(e.currentTarget), t && D();
|
|
3860
3863
|
},
|
|
3861
3864
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
3862
3865
|
children: /* @__PURE__ */ t("span", {})
|
|
3863
3866
|
}),
|
|
3864
3867
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
3865
|
-
className:
|
|
3868
|
+
className: On.header,
|
|
3866
3869
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
3867
3870
|
id: _,
|
|
3868
|
-
className:
|
|
3871
|
+
className: On.title,
|
|
3869
3872
|
children: p
|
|
3870
3873
|
}), /* @__PURE__ */ t(j, {
|
|
3871
|
-
className:
|
|
3874
|
+
className: On.close,
|
|
3872
3875
|
variant: "empty",
|
|
3873
3876
|
size: "sm",
|
|
3874
3877
|
"aria-label": o,
|
|
3875
3878
|
onClick: D,
|
|
3876
|
-
children: /* @__PURE__ */ t(
|
|
3879
|
+
children: /* @__PURE__ */ t(J, {
|
|
3877
3880
|
name: "IconCross",
|
|
3878
3881
|
width: 24,
|
|
3879
3882
|
height: 24
|
|
@@ -3882,17 +3885,17 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3882
3885
|
}),
|
|
3883
3886
|
k && /* @__PURE__ */ t("p", {
|
|
3884
3887
|
id: v,
|
|
3885
|
-
className:
|
|
3888
|
+
className: On.description,
|
|
3886
3889
|
children: m
|
|
3887
3890
|
}),
|
|
3888
3891
|
/* @__PURE__ */ t("div", {
|
|
3889
|
-
className:
|
|
3892
|
+
className: On.content,
|
|
3890
3893
|
children: e
|
|
3891
3894
|
})
|
|
3892
3895
|
]
|
|
3893
3896
|
});
|
|
3894
|
-
},
|
|
3895
|
-
let n =
|
|
3897
|
+
}, Nn = ({ registry: e }) => {
|
|
3898
|
+
let n = bn((e) => e.modals), r = bn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
3896
3899
|
if (o.current.has(e)) return;
|
|
3897
3900
|
a((t) => new Set(t).add(e));
|
|
3898
3901
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -3908,7 +3911,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3908
3911
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
3909
3912
|
}, []), d(() => {
|
|
3910
3913
|
let e = (e) => {
|
|
3911
|
-
let t =
|
|
3914
|
+
let t = bn.getState().modals.at(-1);
|
|
3912
3915
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
3913
3916
|
};
|
|
3914
3917
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -3921,21 +3924,21 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3921
3924
|
n,
|
|
3922
3925
|
e
|
|
3923
3926
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
3924
|
-
className:
|
|
3927
|
+
className: On.layer,
|
|
3925
3928
|
"aria-label": "Модальные окна",
|
|
3926
3929
|
children: n.map((r, a) => {
|
|
3927
3930
|
let o = e[r.name];
|
|
3928
3931
|
if (!o) return null;
|
|
3929
3932
|
let c = i.has(r.id);
|
|
3930
3933
|
return /* @__PURE__ */ t("div", {
|
|
3931
|
-
className:
|
|
3934
|
+
className: On.backdrop,
|
|
3932
3935
|
"data-closing": c || void 0,
|
|
3933
3936
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
3934
3937
|
inert: a !== n.length - 1 || void 0,
|
|
3935
3938
|
onMouseDown: (e) => {
|
|
3936
3939
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
3937
3940
|
},
|
|
3938
|
-
children: /* @__PURE__ */ t(
|
|
3941
|
+
children: /* @__PURE__ */ t(An.Provider, {
|
|
3939
3942
|
value: {
|
|
3940
3943
|
title: r.title ?? r.payload.title,
|
|
3941
3944
|
description: r.description ?? r.payload.description,
|
|
@@ -3952,31 +3955,31 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3952
3955
|
}, r.id);
|
|
3953
3956
|
})
|
|
3954
3957
|
}), document.body);
|
|
3955
|
-
},
|
|
3956
|
-
let o =
|
|
3958
|
+
}, Pn = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
3959
|
+
let o = bn((e) => e.modals.length);
|
|
3957
3960
|
return d(() => {
|
|
3958
3961
|
if (!a || o === 0) return;
|
|
3959
3962
|
let e = document.body.style.overflow;
|
|
3960
3963
|
return document.body.style.overflow = "hidden", () => {
|
|
3961
3964
|
document.body.style.overflow = e;
|
|
3962
3965
|
};
|
|
3963
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
3964
|
-
},
|
|
3966
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Nn, { registry: r })] });
|
|
3967
|
+
}, Fn = (e) => e, In = {
|
|
3965
3968
|
message: "_message_c23ie_1",
|
|
3966
3969
|
actions: "_actions_c23ie_13"
|
|
3967
|
-
},
|
|
3970
|
+
}, Ln = /* @__PURE__ */ new Map(), Rn = 0, zn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
3968
3971
|
let u = (e) => {
|
|
3969
|
-
|
|
3972
|
+
Ln.get(l)?.(e), Ln.delete(l), r();
|
|
3970
3973
|
};
|
|
3971
|
-
return /* @__PURE__ */ n(
|
|
3974
|
+
return /* @__PURE__ */ n(Mn, {
|
|
3972
3975
|
modalId: e,
|
|
3973
3976
|
title: i,
|
|
3974
3977
|
role: "alertdialog",
|
|
3975
3978
|
children: [/* @__PURE__ */ t("p", {
|
|
3976
|
-
className:
|
|
3979
|
+
className: In.message,
|
|
3977
3980
|
children: a
|
|
3978
3981
|
}), /* @__PURE__ */ n("div", {
|
|
3979
|
-
className:
|
|
3982
|
+
className: In.actions,
|
|
3980
3983
|
children: [/* @__PURE__ */ t(j, {
|
|
3981
3984
|
variant: "outline",
|
|
3982
3985
|
onClick: () => u(!1),
|
|
@@ -3988,46 +3991,46 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3988
3991
|
})]
|
|
3989
3992
|
})]
|
|
3990
3993
|
});
|
|
3991
|
-
},
|
|
3994
|
+
}, Bn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Mn, {
|
|
3992
3995
|
modalId: e,
|
|
3993
3996
|
title: i,
|
|
3994
3997
|
role: "alertdialog",
|
|
3995
3998
|
children: [/* @__PURE__ */ t("p", {
|
|
3996
|
-
className:
|
|
3999
|
+
className: In.message,
|
|
3997
4000
|
children: a
|
|
3998
4001
|
}), /* @__PURE__ */ t("div", {
|
|
3999
|
-
className:
|
|
4002
|
+
className: In.actions,
|
|
4000
4003
|
children: /* @__PURE__ */ t(j, {
|
|
4001
4004
|
onClick: r,
|
|
4002
4005
|
children: o
|
|
4003
4006
|
})
|
|
4004
4007
|
})]
|
|
4005
|
-
}),
|
|
4006
|
-
ConfirmModal:
|
|
4007
|
-
ErrorModal:
|
|
4008
|
-
}),
|
|
4009
|
-
let e =
|
|
4008
|
+
}), Vn = Fn({
|
|
4009
|
+
ConfirmModal: zn,
|
|
4010
|
+
ErrorModal: Bn
|
|
4011
|
+
}), Hn = () => {
|
|
4012
|
+
let e = bn((e) => e.openModal);
|
|
4010
4013
|
return (t = {}) => new Promise((n) => {
|
|
4011
|
-
|
|
4012
|
-
let r = `confirm-${
|
|
4013
|
-
|
|
4014
|
+
Rn += 1;
|
|
4015
|
+
let r = `confirm-${Rn}`;
|
|
4016
|
+
Ln.set(r, n), e("ConfirmModal", {
|
|
4014
4017
|
...t,
|
|
4015
4018
|
requestId: r
|
|
4016
4019
|
}, {
|
|
4017
4020
|
closeOnEscape: !1,
|
|
4018
4021
|
onClose: () => {
|
|
4019
|
-
|
|
4022
|
+
Ln.get(r)?.(!1), Ln.delete(r);
|
|
4020
4023
|
}
|
|
4021
4024
|
});
|
|
4022
4025
|
});
|
|
4023
|
-
},
|
|
4024
|
-
let e =
|
|
4026
|
+
}, Un = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Wn = () => {
|
|
4027
|
+
let e = bn((e) => e.openModal);
|
|
4025
4028
|
return { showError: (t, n) => e("ErrorModal", {
|
|
4026
4029
|
title: n,
|
|
4027
|
-
message:
|
|
4030
|
+
message: Un(t)
|
|
4028
4031
|
}) };
|
|
4029
|
-
},
|
|
4030
|
-
let e =
|
|
4032
|
+
}, Gn = S(() => ({})), Kn = S(() => ({})), qn = () => {
|
|
4033
|
+
let e = bn((e) => e.modals), t = bn((e) => e.openModal), n = bn((e) => e.closeModal), r = bn((e) => e.closeTopModal), i = bn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
4031
4034
|
return m(() => ({
|
|
4032
4035
|
openModal: a,
|
|
4033
4036
|
closeModal: n,
|
|
@@ -4043,7 +4046,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4043
4046
|
e.length,
|
|
4044
4047
|
a
|
|
4045
4048
|
]);
|
|
4046
|
-
},
|
|
4049
|
+
}, Jn = {
|
|
4047
4050
|
layer: "_layer_ct7yp_1",
|
|
4048
4051
|
backdrop: "_backdrop_ct7yp_13",
|
|
4049
4052
|
panel: "_panel_ct7yp_27",
|
|
@@ -4063,16 +4066,16 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4063
4066
|
"enter-right": "_enter-right_ct7yp_1",
|
|
4064
4067
|
"enter-left": "_enter-left_ct7yp_1",
|
|
4065
4068
|
"enter-bottom": "_enter-bottom_ct7yp_1"
|
|
4066
|
-
},
|
|
4069
|
+
}, Yn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Xn = a(null), Zn = (e) => {
|
|
4067
4070
|
if (e.key !== "Tab") return;
|
|
4068
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4071
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Yn));
|
|
4069
4072
|
if (!t.length) {
|
|
4070
4073
|
e.preventDefault();
|
|
4071
4074
|
return;
|
|
4072
4075
|
}
|
|
4073
4076
|
let n = t[0], r = t.at(-1);
|
|
4074
4077
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
4075
|
-
},
|
|
4078
|
+
}, Qn = () => u(Xn), $n = ({ 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 = "" }) => {
|
|
4076
4079
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
4077
4080
|
g || r(e);
|
|
4078
4081
|
};
|
|
@@ -4081,7 +4084,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4081
4084
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4082
4085
|
document.body.style.overflow = "hidden";
|
|
4083
4086
|
let a = S.current;
|
|
4084
|
-
(y?.current ?? a?.querySelector(
|
|
4087
|
+
(y?.current ?? a?.querySelector(Yn) ?? a)?.focus();
|
|
4085
4088
|
let o = (e) => {
|
|
4086
4089
|
e.key === "Escape" && p && !g && r("escape");
|
|
4087
4090
|
};
|
|
@@ -4096,29 +4099,29 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4096
4099
|
g,
|
|
4097
4100
|
b
|
|
4098
4101
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4099
|
-
className:
|
|
4102
|
+
className: Jn.layer,
|
|
4100
4103
|
children: /* @__PURE__ */ t("div", {
|
|
4101
|
-
className:
|
|
4104
|
+
className: Jn.backdrop,
|
|
4102
4105
|
onMouseDown: (e) => {
|
|
4103
4106
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4104
4107
|
},
|
|
4105
|
-
children: /* @__PURE__ */ t(
|
|
4108
|
+
children: /* @__PURE__ */ t(Xn.Provider, {
|
|
4106
4109
|
value: { requestClose: T },
|
|
4107
4110
|
children: /* @__PURE__ */ n("section", {
|
|
4108
4111
|
ref: S,
|
|
4109
|
-
className: `${
|
|
4112
|
+
className: `${Jn.panel} ${Jn[l]} ${Jn[u]} ${x}`,
|
|
4110
4113
|
role: "dialog",
|
|
4111
4114
|
"aria-modal": "true",
|
|
4112
4115
|
"aria-labelledby": a ? C : void 0,
|
|
4113
4116
|
"aria-describedby": o ? w : void 0,
|
|
4114
4117
|
tabIndex: -1,
|
|
4115
|
-
onKeyDown:
|
|
4118
|
+
onKeyDown: Zn,
|
|
4116
4119
|
children: [
|
|
4117
4120
|
/* @__PURE__ */ n("header", {
|
|
4118
|
-
className:
|
|
4121
|
+
className: Jn.header,
|
|
4119
4122
|
children: [
|
|
4120
4123
|
/* @__PURE__ */ n("div", {
|
|
4121
|
-
className:
|
|
4124
|
+
className: Jn.heading,
|
|
4122
4125
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4123
4126
|
id: C,
|
|
4124
4127
|
children: a
|
|
@@ -4128,7 +4131,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4128
4131
|
})]
|
|
4129
4132
|
}),
|
|
4130
4133
|
s && /* @__PURE__ */ t("div", {
|
|
4131
|
-
className:
|
|
4134
|
+
className: Jn.headerActions,
|
|
4132
4135
|
children: s
|
|
4133
4136
|
}),
|
|
4134
4137
|
/* @__PURE__ */ t(j, {
|
|
@@ -4137,7 +4140,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4137
4140
|
"aria-label": v,
|
|
4138
4141
|
disabled: g,
|
|
4139
4142
|
onClick: () => T("close-button"),
|
|
4140
|
-
children: /* @__PURE__ */ t(
|
|
4143
|
+
children: /* @__PURE__ */ t(J, {
|
|
4141
4144
|
name: "IconCross",
|
|
4142
4145
|
width: 20,
|
|
4143
4146
|
height: 20
|
|
@@ -4146,11 +4149,11 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4146
4149
|
]
|
|
4147
4150
|
}),
|
|
4148
4151
|
/* @__PURE__ */ t("div", {
|
|
4149
|
-
className:
|
|
4152
|
+
className: Jn.content,
|
|
4150
4153
|
children: i
|
|
4151
4154
|
}),
|
|
4152
4155
|
c && /* @__PURE__ */ t("footer", {
|
|
4153
|
-
className:
|
|
4156
|
+
className: Jn.footer,
|
|
4154
4157
|
children: c
|
|
4155
4158
|
})
|
|
4156
4159
|
]
|
|
@@ -4158,17 +4161,17 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4158
4161
|
})
|
|
4159
4162
|
})
|
|
4160
4163
|
}), document.body);
|
|
4161
|
-
},
|
|
4164
|
+
}, er = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t($n, {
|
|
4162
4165
|
...n,
|
|
4163
4166
|
placement: e
|
|
4164
|
-
}),
|
|
4167
|
+
}), tr = (e) => /* @__PURE__ */ t($n, {
|
|
4165
4168
|
...e,
|
|
4166
4169
|
placement: "bottom"
|
|
4167
|
-
}),
|
|
4170
|
+
}), nr = (e) => /* @__PURE__ */ t($n, {
|
|
4168
4171
|
...e,
|
|
4169
4172
|
placement: "fullscreen",
|
|
4170
4173
|
size: "xl"
|
|
4171
|
-
}),
|
|
4174
|
+
}), rr = {
|
|
4172
4175
|
wrapper: "_wrapper_1hyyy_1",
|
|
4173
4176
|
container: "_container_1hyyy_15",
|
|
4174
4177
|
inner: "_inner_1hyyy_35",
|
|
@@ -4183,29 +4186,29 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4183
4186
|
empty: "_empty_1hyyy_153",
|
|
4184
4187
|
destructive: "_destructive_1hyyy_161",
|
|
4185
4188
|
destructiveOutline: "_destructiveOutline_1hyyy_169"
|
|
4186
|
-
},
|
|
4187
|
-
className:
|
|
4189
|
+
}, ir = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4190
|
+
className: rr.wrapper,
|
|
4188
4191
|
children: /* @__PURE__ */ t("div", {
|
|
4189
|
-
className:
|
|
4192
|
+
className: rr.container,
|
|
4190
4193
|
children: /* @__PURE__ */ n("div", {
|
|
4191
|
-
className:
|
|
4194
|
+
className: rr.inner,
|
|
4192
4195
|
children: [
|
|
4193
4196
|
/* @__PURE__ */ t("div", {
|
|
4194
|
-
className:
|
|
4195
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4197
|
+
className: rr.cube,
|
|
4198
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4196
4199
|
}),
|
|
4197
4200
|
/* @__PURE__ */ t("div", {
|
|
4198
|
-
className:
|
|
4199
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4201
|
+
className: rr.cube,
|
|
4202
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4200
4203
|
}),
|
|
4201
4204
|
/* @__PURE__ */ t("div", {
|
|
4202
|
-
className:
|
|
4203
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4205
|
+
className: rr.cube,
|
|
4206
|
+
children: /* @__PURE__ */ t("div", { className: `${rr.cube__inner} ${rr[e]}` })
|
|
4204
4207
|
})
|
|
4205
4208
|
]
|
|
4206
4209
|
})
|
|
4207
4210
|
})
|
|
4208
|
-
}),
|
|
4211
|
+
}), ar = {
|
|
4209
4212
|
viewport: "_viewport_bu4eh_1",
|
|
4210
4213
|
"top-right": "_top-right_bu4eh_21",
|
|
4211
4214
|
"top-left": "_top-left_bu4eh_31",
|
|
@@ -4221,12 +4224,12 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4221
4224
|
success: "_success_bu4eh_195",
|
|
4222
4225
|
warning: "_warning_bu4eh_203",
|
|
4223
4226
|
error: "_error_bu4eh_211"
|
|
4224
|
-
},
|
|
4227
|
+
}, or = {
|
|
4225
4228
|
info: "IconInfoCircle",
|
|
4226
4229
|
success: "IconSuccessCircle",
|
|
4227
4230
|
warning: "IconWarning",
|
|
4228
4231
|
error: "IconWarning"
|
|
4229
|
-
},
|
|
4232
|
+
}, sr = ({ toast: e, onClose: r }) => {
|
|
4230
4233
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4231
4234
|
return d(() => {
|
|
4232
4235
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4246,7 +4249,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4246
4249
|
let e = () => s(document.hidden);
|
|
4247
4250
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4248
4251
|
}, []), /* @__PURE__ */ n("article", {
|
|
4249
|
-
className: `${
|
|
4252
|
+
className: `${ar.toast} ${ar[e.variant]}`,
|
|
4250
4253
|
role: e.variant === "error" ? "alert" : "status",
|
|
4251
4254
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4252
4255
|
onMouseEnter: () => a(!0),
|
|
@@ -4255,24 +4258,24 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4255
4258
|
onBlur: () => a(!1),
|
|
4256
4259
|
children: [
|
|
4257
4260
|
/* @__PURE__ */ t("div", {
|
|
4258
|
-
className:
|
|
4261
|
+
className: ar.icon,
|
|
4259
4262
|
"aria-hidden": "true",
|
|
4260
|
-
children: /* @__PURE__ */ t(
|
|
4261
|
-
name:
|
|
4263
|
+
children: /* @__PURE__ */ t(J, {
|
|
4264
|
+
name: or[e.variant],
|
|
4262
4265
|
color: "var(--ds-toast-accent)",
|
|
4263
4266
|
width: 20,
|
|
4264
4267
|
height: 20
|
|
4265
4268
|
})
|
|
4266
4269
|
}),
|
|
4267
4270
|
/* @__PURE__ */ n("div", {
|
|
4268
|
-
className:
|
|
4271
|
+
className: ar.body,
|
|
4269
4272
|
children: [
|
|
4270
4273
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4271
|
-
className:
|
|
4274
|
+
className: ar.title,
|
|
4272
4275
|
children: e.title
|
|
4273
4276
|
}),
|
|
4274
4277
|
/* @__PURE__ */ t("div", {
|
|
4275
|
-
className:
|
|
4278
|
+
className: ar.message,
|
|
4276
4279
|
children: e.message
|
|
4277
4280
|
}),
|
|
4278
4281
|
e.action && /* @__PURE__ */ t(j, {
|
|
@@ -4290,7 +4293,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4290
4293
|
size: "sm",
|
|
4291
4294
|
"aria-label": "Закрыть уведомление",
|
|
4292
4295
|
onClick: () => r(e.id),
|
|
4293
|
-
children: /* @__PURE__ */ t(
|
|
4296
|
+
children: /* @__PURE__ */ t(J, {
|
|
4294
4297
|
name: "IconCross",
|
|
4295
4298
|
width: 20,
|
|
4296
4299
|
height: 20
|
|
@@ -4298,15 +4301,15 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4298
4301
|
})
|
|
4299
4302
|
]
|
|
4300
4303
|
});
|
|
4301
|
-
},
|
|
4304
|
+
}, cr = 0, lr = S((e, t) => ({
|
|
4302
4305
|
toasts: [],
|
|
4303
4306
|
showToast: (n) => {
|
|
4304
4307
|
if (n.dedupeKey) {
|
|
4305
4308
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4306
4309
|
if (e) return e.id;
|
|
4307
4310
|
}
|
|
4308
|
-
|
|
4309
|
-
let r = `ds-toast-${
|
|
4311
|
+
cr += 1;
|
|
4312
|
+
let r = `ds-toast-${cr}`;
|
|
4310
4313
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4311
4314
|
variant: "info",
|
|
4312
4315
|
duration: 5e3,
|
|
@@ -4317,18 +4320,18 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4317
4320
|
},
|
|
4318
4321
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4319
4322
|
clearToasts: () => e({ toasts: [] })
|
|
4320
|
-
})),
|
|
4321
|
-
let r =
|
|
4323
|
+
})), ur = () => lr.setState({ toasts: [] }), dr = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4324
|
+
let r = lr((e) => e.toasts), i = lr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4322
4325
|
return /* @__PURE__ */ t("div", {
|
|
4323
|
-
className: `${
|
|
4326
|
+
className: `${ar.viewport} ${ar[e]}`,
|
|
4324
4327
|
"aria-label": "Уведомления",
|
|
4325
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4328
|
+
children: a.map((e) => /* @__PURE__ */ t(sr, {
|
|
4326
4329
|
toast: e,
|
|
4327
4330
|
onClose: i
|
|
4328
4331
|
}, e.id))
|
|
4329
4332
|
});
|
|
4330
|
-
},
|
|
4331
|
-
let e =
|
|
4333
|
+
}, fr = () => {
|
|
4334
|
+
let e = lr((e) => e.showToast), t = lr((e) => e.removeToast), n = lr((e) => e.clearToasts), r = l((t) => e({
|
|
4332
4335
|
...t,
|
|
4333
4336
|
variant: "info"
|
|
4334
4337
|
}), [e]), i = l((t) => e({
|
|
@@ -4358,24 +4361,24 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4358
4361
|
i,
|
|
4359
4362
|
a
|
|
4360
4363
|
]);
|
|
4361
|
-
},
|
|
4364
|
+
}, pr = {
|
|
4362
4365
|
root: "_root_ncmxp_1",
|
|
4363
4366
|
tooltip: "_tooltip_ncmxp_11",
|
|
4364
4367
|
"ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
|
|
4365
|
-
},
|
|
4368
|
+
}, mr = 8, hr = 16, gr = {
|
|
4366
4369
|
top: "bottom",
|
|
4367
4370
|
right: "left",
|
|
4368
4371
|
bottom: "top",
|
|
4369
4372
|
left: "right"
|
|
4370
|
-
},
|
|
4373
|
+
}, _r = (e, t, n) => e === "top" ? t.top >= n.height + mr + hr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + mr + hr : e === "left" ? t.left >= n.width + mr + hr : window.innerWidth - t.right >= n.width + mr + hr, vr = (e, t, n) => {
|
|
4371
4374
|
if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
|
|
4372
|
-
let r =
|
|
4373
|
-
return r === "top" && (a = t.top - n.height -
|
|
4375
|
+
let r = _r(e, t, n) ? e : _r(gr[e], t, n) ? gr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
|
|
4376
|
+
return r === "top" && (a = t.top - n.height - mr), r === "bottom" && (a = t.bottom + mr), r === "left" && (i = t.left - n.width - mr), r === "right" && (i = t.right + mr), i = Math.min(Math.max(i, hr), Math.max(hr, window.innerWidth - n.width - hr)), a = Math.min(Math.max(a, hr), Math.max(hr, window.innerHeight - n.height - hr)), {
|
|
4374
4377
|
left: i,
|
|
4375
4378
|
top: a,
|
|
4376
4379
|
visibility: "visible"
|
|
4377
4380
|
};
|
|
4378
|
-
},
|
|
4381
|
+
}, yr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
|
|
4379
4382
|
let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
|
|
4380
4383
|
C.current && clearTimeout(C.current), C.current = null, v(!1);
|
|
4381
4384
|
}, []), E = l(() => {
|
|
@@ -4393,7 +4396,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4393
4396
|
let e = () => {
|
|
4394
4397
|
let e = w.current;
|
|
4395
4398
|
if (!e || !x) return;
|
|
4396
|
-
let t =
|
|
4399
|
+
let t = vr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
|
|
4397
4400
|
if (!t) {
|
|
4398
4401
|
T();
|
|
4399
4402
|
return;
|
|
@@ -4430,24 +4433,24 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4430
4433
|
});
|
|
4431
4434
|
return /* @__PURE__ */ n("span", {
|
|
4432
4435
|
ref: w,
|
|
4433
|
-
className: `${
|
|
4436
|
+
className: `${pr.root} ${p}`,
|
|
4434
4437
|
onPointerDown: _ ? T : E,
|
|
4435
|
-
children: [O, _ && /* @__PURE__ */ t(
|
|
4438
|
+
children: [O, _ && /* @__PURE__ */ t(fn, { children: /* @__PURE__ */ t("span", {
|
|
4436
4439
|
ref: S,
|
|
4437
4440
|
id: m,
|
|
4438
4441
|
role: "tooltip",
|
|
4439
|
-
className:
|
|
4442
|
+
className: pr.tooltip,
|
|
4440
4443
|
style: D,
|
|
4441
4444
|
children: e
|
|
4442
4445
|
}) })]
|
|
4443
4446
|
});
|
|
4444
|
-
},
|
|
4447
|
+
}, br = {
|
|
4445
4448
|
root: "_root_bs28m_1",
|
|
4446
4449
|
tabList: "_tabList_bs28m_11",
|
|
4447
4450
|
tab: "_tab_bs28m_11",
|
|
4448
4451
|
panels: "_panels_bs28m_127",
|
|
4449
4452
|
panel: "_panel_bs28m_127"
|
|
4450
|
-
},
|
|
4453
|
+
}, xr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4451
4454
|
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) => {
|
|
4452
4455
|
let n = e[t];
|
|
4453
4456
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4477,10 +4480,10 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4477
4480
|
t.preventDefault(), _(a);
|
|
4478
4481
|
};
|
|
4479
4482
|
return /* @__PURE__ */ n("div", {
|
|
4480
|
-
className: `${
|
|
4483
|
+
className: `${br.root} ${c}`,
|
|
4481
4484
|
"aria-busy": s || void 0,
|
|
4482
4485
|
children: [/* @__PURE__ */ t("div", {
|
|
4483
|
-
className:
|
|
4486
|
+
className: br.tabList,
|
|
4484
4487
|
role: "tablist",
|
|
4485
4488
|
"aria-label": a,
|
|
4486
4489
|
"aria-orientation": "horizontal",
|
|
@@ -4492,7 +4495,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4492
4495
|
u.current[n] = e;
|
|
4493
4496
|
},
|
|
4494
4497
|
id: a,
|
|
4495
|
-
className:
|
|
4498
|
+
className: br.tab,
|
|
4496
4499
|
type: "button",
|
|
4497
4500
|
role: "tab",
|
|
4498
4501
|
"aria-selected": i,
|
|
@@ -4505,12 +4508,12 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4505
4508
|
}, e.id);
|
|
4506
4509
|
})
|
|
4507
4510
|
}), /* @__PURE__ */ t("div", {
|
|
4508
|
-
className:
|
|
4511
|
+
className: br.panels,
|
|
4509
4512
|
children: e.map((e, n) => {
|
|
4510
4513
|
let i = e.id === r;
|
|
4511
4514
|
return /* @__PURE__ */ t("div", {
|
|
4512
4515
|
id: `${l}-panel-${n}`,
|
|
4513
|
-
className:
|
|
4516
|
+
className: br.panel,
|
|
4514
4517
|
role: "tabpanel",
|
|
4515
4518
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4516
4519
|
tabIndex: 0,
|
|
@@ -4520,7 +4523,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4520
4523
|
})
|
|
4521
4524
|
})]
|
|
4522
4525
|
});
|
|
4523
|
-
},
|
|
4526
|
+
}, Sr = (e) => {
|
|
4524
4527
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4525
4528
|
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")}`;
|
|
4526
4529
|
return n ? `${n}:${a}` : a;
|
|
@@ -4553,37 +4556,37 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4553
4556
|
settingsActionLabel: "_settingsActionLabel_14cqp_693",
|
|
4554
4557
|
caption: "_caption_14cqp_705",
|
|
4555
4558
|
fullscreen: "_fullscreen_14cqp_719"
|
|
4556
|
-
},
|
|
4559
|
+
}, Cr = 2500, wr = 5, Tr = .05, Er = [
|
|
4557
4560
|
.5,
|
|
4558
4561
|
.75,
|
|
4559
4562
|
1,
|
|
4560
4563
|
1.25,
|
|
4561
4564
|
1.5,
|
|
4562
4565
|
2
|
|
4563
|
-
],
|
|
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,
|
|
4566
|
+
], Dr = ({ 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 }) => {
|
|
4567
|
+
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, V] = g(1), [H, U] = g(!!v.muted), [W, te] = g(1), [ne, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, le] = g(!0), [ue, G] = g(!1), [de, fe] = g(!1), pe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), me = i.map((e, t) => ({
|
|
4565
4568
|
track: e,
|
|
4566
4569
|
index: t
|
|
4567
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"),
|
|
4568
|
-
|
|
4569
|
-
}, [A,
|
|
4570
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), K = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !K && r.length > 0, ge = !he && !K && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4571
|
+
le(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => le(!1), Cr));
|
|
4572
|
+
}, [A, oe]);
|
|
4570
4573
|
d(() => {
|
|
4571
4574
|
w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
|
|
4572
|
-
}, [
|
|
4573
|
-
let e = () =>
|
|
4575
|
+
}, [pe, r.length]), d(() => (ve(), () => window.clearTimeout(S.current)), [ve]), d(() => {
|
|
4576
|
+
let e = () => G(document.fullscreenElement === b.current), t = () => fe(document.pictureInPictureElement === x.current);
|
|
4574
4577
|
return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
|
|
4575
4578
|
document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
|
|
4576
4579
|
};
|
|
4577
4580
|
}, []), d(() => {
|
|
4578
|
-
if (!
|
|
4581
|
+
if (!oe) return;
|
|
4579
4582
|
let e = (e) => {
|
|
4580
|
-
y.current?.contains(e.target) ||
|
|
4583
|
+
y.current?.contains(e.target) || se(!1);
|
|
4581
4584
|
};
|
|
4582
4585
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
4583
|
-
}, [
|
|
4584
|
-
let
|
|
4586
|
+
}, [oe]);
|
|
4587
|
+
let ye = async () => {
|
|
4585
4588
|
let e = x.current;
|
|
4586
|
-
if (!(!e ||
|
|
4589
|
+
if (!(!e || K || he)) {
|
|
4587
4590
|
if (e.paused || e.ended) {
|
|
4588
4591
|
e.ended && (e.currentTime = 0);
|
|
4589
4592
|
try {
|
|
@@ -4593,60 +4596,60 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4593
4596
|
}
|
|
4594
4597
|
} else e.pause();
|
|
4595
4598
|
}
|
|
4596
|
-
},
|
|
4599
|
+
}, be = () => {
|
|
4597
4600
|
let e = x.current;
|
|
4598
4601
|
e && (e.muted = !e.muted);
|
|
4599
|
-
},
|
|
4602
|
+
}, xe = (e) => {
|
|
4600
4603
|
let t = x.current;
|
|
4601
4604
|
t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
|
|
4602
|
-
},
|
|
4605
|
+
}, Se = (e) => {
|
|
4603
4606
|
let t = x.current;
|
|
4604
4607
|
!t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
|
|
4605
|
-
},
|
|
4608
|
+
}, Ce = async () => {
|
|
4606
4609
|
if (b.current) try {
|
|
4607
4610
|
document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
|
|
4608
4611
|
} catch {
|
|
4609
|
-
|
|
4612
|
+
G(!1);
|
|
4610
4613
|
}
|
|
4611
|
-
},
|
|
4614
|
+
}, we = async () => {
|
|
4612
4615
|
let e = x.current;
|
|
4613
|
-
if (!(!e || !
|
|
4616
|
+
if (!(!e || !_e)) try {
|
|
4614
4617
|
document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
|
|
4615
4618
|
} catch {
|
|
4616
|
-
|
|
4619
|
+
fe(!1);
|
|
4617
4620
|
}
|
|
4618
|
-
},
|
|
4621
|
+
}, Te = (e) => {
|
|
4619
4622
|
let t = x.current;
|
|
4620
4623
|
t && (Array.from(t.textTracks).forEach((t, n) => {
|
|
4621
4624
|
t.mode = n === e ? "showing" : "disabled";
|
|
4622
|
-
}),
|
|
4623
|
-
},
|
|
4625
|
+
}), ae(e));
|
|
4626
|
+
}, Ee = (e) => {
|
|
4624
4627
|
let t = e.target;
|
|
4625
4628
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4626
4629
|
let n = e.key.toLowerCase();
|
|
4627
|
-
n === " " || n === "k" ? (e.preventDefault(),
|
|
4628
|
-
},
|
|
4630
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? wr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? Tr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4631
|
+
}, De = () => {
|
|
4629
4632
|
let e = x.current;
|
|
4630
4633
|
w(!1), E(!0), e?.load();
|
|
4631
|
-
},
|
|
4634
|
+
}, Oe = {
|
|
4632
4635
|
"--video-progress": `${I ? P / I * 100 : 0}%`,
|
|
4633
4636
|
"--video-buffered": `${R * 100}%`
|
|
4634
4637
|
};
|
|
4635
4638
|
return /* @__PURE__ */ n("figure", {
|
|
4636
4639
|
ref: y,
|
|
4637
4640
|
className: `${$.root} ${p}`,
|
|
4638
|
-
onKeyDown:
|
|
4641
|
+
onKeyDown: Ee,
|
|
4639
4642
|
children: [/* @__PURE__ */ n("div", {
|
|
4640
4643
|
ref: b,
|
|
4641
|
-
className: `${$.frame} ${
|
|
4644
|
+
className: `${$.frame} ${ue ? $.fullscreen : ""}`,
|
|
4642
4645
|
style: { aspectRatio: o },
|
|
4643
|
-
"aria-busy":
|
|
4646
|
+
"aria-busy": he || void 0,
|
|
4644
4647
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4645
|
-
onPointerMove:
|
|
4646
|
-
onPointerDown:
|
|
4647
|
-
onFocusCapture:
|
|
4648
|
+
onPointerMove: ve,
|
|
4649
|
+
onPointerDown: ve,
|
|
4650
|
+
onFocusCapture: ve,
|
|
4648
4651
|
onMouseLeave: () => {
|
|
4649
|
-
A && !
|
|
4652
|
+
A && !oe && le(!1);
|
|
4650
4653
|
},
|
|
4651
4654
|
children: [
|
|
4652
4655
|
r.length > 0 && /* @__PURE__ */ n("video", {
|
|
@@ -4655,22 +4658,22 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4655
4658
|
"aria-label": a,
|
|
4656
4659
|
controls: !1,
|
|
4657
4660
|
playsInline: _,
|
|
4658
|
-
loop:
|
|
4661
|
+
loop: ne,
|
|
4659
4662
|
className: $.video,
|
|
4660
4663
|
style: { objectFit: s },
|
|
4661
4664
|
onClick: (e) => {
|
|
4662
|
-
v.onClick?.(e),
|
|
4665
|
+
v.onClick?.(e), ye();
|
|
4663
4666
|
},
|
|
4664
4667
|
onDoubleClick: (e) => {
|
|
4665
|
-
v.onDoubleClick?.(e),
|
|
4668
|
+
v.onDoubleClick?.(e), Ce();
|
|
4666
4669
|
},
|
|
4667
4670
|
onLoadStart: (e) => {
|
|
4668
4671
|
E(!0), v.onLoadStart?.(e);
|
|
4669
4672
|
},
|
|
4670
4673
|
onLoadedMetadata: (e) => {
|
|
4671
4674
|
L(e.currentTarget.duration || 0);
|
|
4672
|
-
let t =
|
|
4673
|
-
|
|
4675
|
+
let t = me.find(({ track: e }) => e.default);
|
|
4676
|
+
Te(t?.index ?? -1), v.onLoadedMetadata?.(e);
|
|
4674
4677
|
},
|
|
4675
4678
|
onDurationChange: (e) => {
|
|
4676
4679
|
L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
|
|
@@ -4701,20 +4704,20 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4701
4704
|
M(!1), v.onPause?.(e);
|
|
4702
4705
|
},
|
|
4703
4706
|
onEnded: (e) => {
|
|
4704
|
-
M(!1), N(!0),
|
|
4707
|
+
M(!1), N(!0), le(!0), v.onEnded?.(e);
|
|
4705
4708
|
},
|
|
4706
4709
|
onVolumeChange: (e) => {
|
|
4707
|
-
|
|
4710
|
+
V(e.currentTarget.volume), U(e.currentTarget.muted), v.onVolumeChange?.(e);
|
|
4708
4711
|
},
|
|
4709
4712
|
onRateChange: (e) => {
|
|
4710
|
-
|
|
4713
|
+
te(e.currentTarget.playbackRate), v.onRateChange?.(e);
|
|
4711
4714
|
},
|
|
4712
4715
|
onError: (e) => {
|
|
4713
4716
|
E(!1), O(!1), w(!0), v.onError?.(e);
|
|
4714
4717
|
},
|
|
4715
4718
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4716
4719
|
}),
|
|
4717
|
-
|
|
4720
|
+
he && /* @__PURE__ */ n("div", {
|
|
4718
4721
|
className: $.overlay,
|
|
4719
4722
|
role: "status",
|
|
4720
4723
|
"aria-live": "polite",
|
|
@@ -4723,21 +4726,21 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4723
4726
|
"aria-hidden": "true",
|
|
4724
4727
|
children: /* @__PURE__ */ t("div", {
|
|
4725
4728
|
className: $.loaderScale,
|
|
4726
|
-
children: /* @__PURE__ */ t(
|
|
4729
|
+
children: /* @__PURE__ */ t(ir, {})
|
|
4727
4730
|
})
|
|
4728
4731
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4729
4732
|
}),
|
|
4730
|
-
!
|
|
4733
|
+
!he && D && !K && /* @__PURE__ */ t("div", {
|
|
4731
4734
|
className: $.buffering,
|
|
4732
4735
|
role: "status",
|
|
4733
4736
|
"aria-label": "Буферизация видео",
|
|
4734
4737
|
children: /* @__PURE__ */ t(k, { variant: "primary" })
|
|
4735
4738
|
}),
|
|
4736
|
-
|
|
4739
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4737
4740
|
className: `${$.state} ${$.empty}`,
|
|
4738
4741
|
role: "status",
|
|
4739
4742
|
children: [
|
|
4740
|
-
/* @__PURE__ */ t(
|
|
4743
|
+
/* @__PURE__ */ t(J, {
|
|
4741
4744
|
name: "IconInfoCircle",
|
|
4742
4745
|
className: $.stateIcon,
|
|
4743
4746
|
width: 40,
|
|
@@ -4747,62 +4750,62 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4747
4750
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4748
4751
|
]
|
|
4749
4752
|
}),
|
|
4750
|
-
!
|
|
4753
|
+
!he && K && /* @__PURE__ */ n("div", {
|
|
4751
4754
|
className: `${$.state} ${$.error}`,
|
|
4752
4755
|
role: "alert",
|
|
4753
4756
|
children: [
|
|
4754
|
-
/* @__PURE__ */ t(
|
|
4757
|
+
/* @__PURE__ */ t(J, {
|
|
4755
4758
|
name: "IconWarning",
|
|
4756
4759
|
className: $.stateIcon,
|
|
4757
4760
|
width: 40,
|
|
4758
4761
|
height: 40
|
|
4759
4762
|
}),
|
|
4760
|
-
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children:
|
|
4763
|
+
f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: K })] }),
|
|
4761
4764
|
r.length > 0 && /* @__PURE__ */ t(j, {
|
|
4762
4765
|
size: "sm",
|
|
4763
4766
|
variant: "secondary",
|
|
4764
|
-
onClick:
|
|
4767
|
+
onClick: De,
|
|
4765
4768
|
children: "Повторить"
|
|
4766
4769
|
})
|
|
4767
4770
|
]
|
|
4768
4771
|
}),
|
|
4769
|
-
!
|
|
4772
|
+
!he && !K && ee && /* @__PURE__ */ t("button", {
|
|
4770
4773
|
type: "button",
|
|
4771
4774
|
className: $.replay,
|
|
4772
4775
|
"aria-label": "Воспроизвести заново",
|
|
4773
|
-
onClick: () => void
|
|
4774
|
-
children: /* @__PURE__ */ t(
|
|
4776
|
+
onClick: () => void ye(),
|
|
4777
|
+
children: /* @__PURE__ */ t(J, {
|
|
4775
4778
|
name: "IconReplay",
|
|
4776
4779
|
width: 28,
|
|
4777
4780
|
height: 28
|
|
4778
4781
|
})
|
|
4779
4782
|
}),
|
|
4780
|
-
m && r.length > 0 && !
|
|
4781
|
-
className: `${$.controlsLayer} ${
|
|
4783
|
+
m && r.length > 0 && !he && !K && /* @__PURE__ */ n("div", {
|
|
4784
|
+
className: `${$.controlsLayer} ${ce || !A ? $.controlsVisible : ""}`,
|
|
4782
4785
|
onClick: (e) => e.stopPropagation(),
|
|
4783
|
-
children: [
|
|
4786
|
+
children: [oe && /* @__PURE__ */ n("div", {
|
|
4784
4787
|
className: $.settings,
|
|
4785
4788
|
role: "dialog",
|
|
4786
4789
|
"aria-label": "Настройки видео",
|
|
4787
4790
|
children: [
|
|
4788
4791
|
/* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
|
|
4789
|
-
value:
|
|
4792
|
+
value: W,
|
|
4790
4793
|
onChange: (e) => {
|
|
4791
4794
|
let t = Number(e.target.value);
|
|
4792
4795
|
x.current && (x.current.playbackRate = t);
|
|
4793
4796
|
},
|
|
4794
|
-
children:
|
|
4797
|
+
children: Er.map((e) => /* @__PURE__ */ n("option", {
|
|
4795
4798
|
value: e,
|
|
4796
4799
|
children: [e, "×"]
|
|
4797
4800
|
}, e))
|
|
4798
4801
|
})] }),
|
|
4799
|
-
|
|
4800
|
-
value:
|
|
4801
|
-
onChange: (e) =>
|
|
4802
|
+
me.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
|
|
4803
|
+
value: ie,
|
|
4804
|
+
onChange: (e) => Te(Number(e.target.value)),
|
|
4802
4805
|
children: [/* @__PURE__ */ t("option", {
|
|
4803
4806
|
value: -1,
|
|
4804
4807
|
children: "Выключены"
|
|
4805
|
-
}),
|
|
4808
|
+
}), me.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
|
|
4806
4809
|
value: n,
|
|
4807
4810
|
children: e.label
|
|
4808
4811
|
}, `${e.srcLang}-${e.label}`))]
|
|
@@ -4810,18 +4813,18 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4810
4813
|
/* @__PURE__ */ n("button", {
|
|
4811
4814
|
type: "button",
|
|
4812
4815
|
className: $.settingsAction,
|
|
4813
|
-
"aria-pressed":
|
|
4814
|
-
onClick: () =>
|
|
4815
|
-
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children:
|
|
4816
|
+
"aria-pressed": ne,
|
|
4817
|
+
onClick: () => re((e) => !e),
|
|
4818
|
+
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ne ? "Вкл." : "Выкл." })]
|
|
4816
4819
|
}),
|
|
4817
|
-
|
|
4820
|
+
_e && /* @__PURE__ */ t("button", {
|
|
4818
4821
|
type: "button",
|
|
4819
4822
|
className: $.settingsAction,
|
|
4820
|
-
"aria-pressed":
|
|
4821
|
-
onClick: () => void
|
|
4823
|
+
"aria-pressed": de,
|
|
4824
|
+
onClick: () => void we(),
|
|
4822
4825
|
children: /* @__PURE__ */ n("span", {
|
|
4823
4826
|
className: $.settingsActionLabel,
|
|
4824
|
-
children: [/* @__PURE__ */ t(
|
|
4827
|
+
children: [/* @__PURE__ */ t(J, {
|
|
4825
4828
|
name: "IconPictureInPicture",
|
|
4826
4829
|
width: 18,
|
|
4827
4830
|
height: 18
|
|
@@ -4839,8 +4842,8 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4839
4842
|
className: `${$.controlButton} ${$.playButton}`,
|
|
4840
4843
|
"aria-label": A ? "Пауза" : "Воспроизвести",
|
|
4841
4844
|
title: A ? "Пауза (K)" : "Воспроизвести (K)",
|
|
4842
|
-
onClick: () => void
|
|
4843
|
-
children: /* @__PURE__ */ t(
|
|
4845
|
+
onClick: () => void ye(),
|
|
4846
|
+
children: /* @__PURE__ */ t(J, {
|
|
4844
4847
|
name: A ? "IconPause" : "IconPlay",
|
|
4845
4848
|
width: 24,
|
|
4846
4849
|
height: 24
|
|
@@ -4852,12 +4855,12 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4852
4855
|
children: [/* @__PURE__ */ t("button", {
|
|
4853
4856
|
type: "button",
|
|
4854
4857
|
className: $.controlButton,
|
|
4855
|
-
"aria-label":
|
|
4856
|
-
"aria-pressed":
|
|
4858
|
+
"aria-label": H ? "Включить звук" : "Выключить звук",
|
|
4859
|
+
"aria-pressed": H,
|
|
4857
4860
|
title: "Звук (M)",
|
|
4858
|
-
onClick:
|
|
4859
|
-
children: /* @__PURE__ */ t(
|
|
4860
|
-
name:
|
|
4861
|
+
onClick: be,
|
|
4862
|
+
children: /* @__PURE__ */ t(J, {
|
|
4863
|
+
name: H || B === 0 ? "IconVolumeMuted" : "IconVolume",
|
|
4861
4864
|
width: 22,
|
|
4862
4865
|
height: 22
|
|
4863
4866
|
})
|
|
@@ -4867,10 +4870,10 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4867
4870
|
min: 0,
|
|
4868
4871
|
max: 1,
|
|
4869
4872
|
step: .05,
|
|
4870
|
-
value:
|
|
4873
|
+
value: H ? 0 : B,
|
|
4871
4874
|
"aria-label": "Громкость",
|
|
4872
|
-
"aria-valuetext": `${Math.round((
|
|
4873
|
-
onChange: (e) =>
|
|
4875
|
+
"aria-valuetext": `${Math.round((H ? 0 : B) * 100)}%`,
|
|
4876
|
+
onChange: (e) => xe(Number(e.target.value))
|
|
4874
4877
|
})]
|
|
4875
4878
|
}),
|
|
4876
4879
|
/* @__PURE__ */ n("div", {
|
|
@@ -4878,23 +4881,23 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4878
4881
|
children: [
|
|
4879
4882
|
/* @__PURE__ */ t("span", {
|
|
4880
4883
|
className: $.time,
|
|
4881
|
-
children:
|
|
4884
|
+
children: Sr(P)
|
|
4882
4885
|
}),
|
|
4883
4886
|
/* @__PURE__ */ t("input", {
|
|
4884
4887
|
className: $.timeline,
|
|
4885
|
-
style:
|
|
4888
|
+
style: Oe,
|
|
4886
4889
|
type: "range",
|
|
4887
4890
|
min: 0,
|
|
4888
4891
|
max: I || 0,
|
|
4889
4892
|
step: .01,
|
|
4890
4893
|
value: Math.min(P, I || 0),
|
|
4891
4894
|
"aria-label": "Позиция воспроизведения",
|
|
4892
|
-
"aria-valuetext": `${
|
|
4893
|
-
onChange: (e) =>
|
|
4895
|
+
"aria-valuetext": `${Sr(P)} из ${Sr(I)}`,
|
|
4896
|
+
onChange: (e) => Se(Number(e.target.value))
|
|
4894
4897
|
}),
|
|
4895
4898
|
/* @__PURE__ */ t("span", {
|
|
4896
4899
|
className: $.time,
|
|
4897
|
-
children:
|
|
4900
|
+
children: Sr(I)
|
|
4898
4901
|
})
|
|
4899
4902
|
]
|
|
4900
4903
|
}),
|
|
@@ -4904,10 +4907,10 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4904
4907
|
type: "button",
|
|
4905
4908
|
className: $.controlButton,
|
|
4906
4909
|
"aria-label": "Настройки",
|
|
4907
|
-
"aria-expanded":
|
|
4910
|
+
"aria-expanded": oe,
|
|
4908
4911
|
title: "Настройки",
|
|
4909
|
-
onClick: () =>
|
|
4910
|
-
children: /* @__PURE__ */ t(
|
|
4912
|
+
onClick: () => se((e) => !e),
|
|
4913
|
+
children: /* @__PURE__ */ t(J, {
|
|
4911
4914
|
name: "IconSettings",
|
|
4912
4915
|
width: 22,
|
|
4913
4916
|
height: 22
|
|
@@ -4915,11 +4918,11 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4915
4918
|
}), /* @__PURE__ */ t("button", {
|
|
4916
4919
|
type: "button",
|
|
4917
4920
|
className: $.controlButton,
|
|
4918
|
-
"aria-label":
|
|
4921
|
+
"aria-label": ue ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
|
|
4919
4922
|
title: "Полноэкранный режим (F)",
|
|
4920
|
-
onClick: () => void
|
|
4921
|
-
children: /* @__PURE__ */ t(
|
|
4922
|
-
name:
|
|
4923
|
+
onClick: () => void Ce(),
|
|
4924
|
+
children: /* @__PURE__ */ t(J, {
|
|
4925
|
+
name: ue ? "IconFullscreenExit" : "IconFullscreen",
|
|
4923
4926
|
width: 22,
|
|
4924
4927
|
height: 22
|
|
4925
4928
|
})
|
|
@@ -4934,7 +4937,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4934
4937
|
children: a
|
|
4935
4938
|
})]
|
|
4936
4939
|
});
|
|
4937
|
-
},
|
|
4940
|
+
}, Or = {
|
|
4938
4941
|
root: "_root_ymidq_1",
|
|
4939
4942
|
trigger: "_trigger_ymidq_15",
|
|
4940
4943
|
heading: "_heading_ymidq_41",
|
|
@@ -4944,7 +4947,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4944
4947
|
open: "_open_ymidq_91",
|
|
4945
4948
|
content: "_content_ymidq_99",
|
|
4946
4949
|
contentInner: "_contentInner_ymidq_119"
|
|
4947
|
-
},
|
|
4950
|
+
}, kr = (e, t, n, r = 16) => {
|
|
4948
4951
|
if (t > Math.max(0, n - r * 2)) {
|
|
4949
4952
|
let t = e - r;
|
|
4950
4953
|
return Math.abs(t) <= 1 ? {
|
|
@@ -4966,7 +4969,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4966
4969
|
alignment: "none",
|
|
4967
4970
|
delta: 0
|
|
4968
4971
|
};
|
|
4969
|
-
},
|
|
4972
|
+
}, Ar = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
|
|
4970
4973
|
let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
|
|
4971
4974
|
return d(() => {
|
|
4972
4975
|
let e = x.current;
|
|
@@ -4976,7 +4979,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4976
4979
|
let r = !1, i = () => {
|
|
4977
4980
|
if (r) return;
|
|
4978
4981
|
r = !0;
|
|
4979
|
-
let e = t.getBoundingClientRect(), n =
|
|
4982
|
+
let e = t.getBoundingClientRect(), n = kr(e.top, e.height, window.innerHeight, l);
|
|
4980
4983
|
if (n.alignment === "none") return;
|
|
4981
4984
|
let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
4982
4985
|
window.scrollBy({
|
|
@@ -4997,10 +5000,10 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4997
5000
|
l
|
|
4998
5001
|
]), /* @__PURE__ */ n("section", {
|
|
4999
5002
|
ref: y,
|
|
5000
|
-
className: `${
|
|
5003
|
+
className: `${Or.root} ${v ? Or.open : ""} ${u}`,
|
|
5001
5004
|
children: [/* @__PURE__ */ n("button", {
|
|
5002
5005
|
type: "button",
|
|
5003
|
-
className:
|
|
5006
|
+
className: Or.trigger,
|
|
5004
5007
|
"aria-expanded": v,
|
|
5005
5008
|
"aria-controls": p,
|
|
5006
5009
|
onClick: () => {
|
|
@@ -5008,18 +5011,18 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5008
5011
|
o === void 0 && _(e), s?.(e);
|
|
5009
5012
|
},
|
|
5010
5013
|
children: [/* @__PURE__ */ n("span", {
|
|
5011
|
-
className:
|
|
5014
|
+
className: Or.heading,
|
|
5012
5015
|
children: [/* @__PURE__ */ t("span", {
|
|
5013
|
-
className:
|
|
5016
|
+
className: Or.title,
|
|
5014
5017
|
children: e
|
|
5015
5018
|
}), r && /* @__PURE__ */ t("span", {
|
|
5016
|
-
className:
|
|
5019
|
+
className: Or.subtitle,
|
|
5017
5020
|
children: r
|
|
5018
5021
|
})]
|
|
5019
5022
|
}), /* @__PURE__ */ t("span", {
|
|
5020
|
-
className:
|
|
5023
|
+
className: Or.icon,
|
|
5021
5024
|
"aria-hidden": "true",
|
|
5022
|
-
children: /* @__PURE__ */ t(
|
|
5025
|
+
children: /* @__PURE__ */ t(J, {
|
|
5023
5026
|
name: "IconChevron",
|
|
5024
5027
|
width: 20,
|
|
5025
5028
|
height: 20
|
|
@@ -5028,15 +5031,15 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5028
5031
|
}), /* @__PURE__ */ t("div", {
|
|
5029
5032
|
ref: b,
|
|
5030
5033
|
id: p,
|
|
5031
|
-
className:
|
|
5034
|
+
className: Or.content,
|
|
5032
5035
|
"aria-hidden": !v,
|
|
5033
5036
|
children: /* @__PURE__ */ t("div", {
|
|
5034
|
-
className:
|
|
5037
|
+
className: Or.contentInner,
|
|
5035
5038
|
children: i
|
|
5036
5039
|
})
|
|
5037
5040
|
})]
|
|
5038
5041
|
});
|
|
5039
|
-
},
|
|
5042
|
+
}, jr = {
|
|
5040
5043
|
root: "_root_14ewt_1",
|
|
5041
5044
|
topSlot: "_topSlot_14ewt_29",
|
|
5042
5045
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -5054,14 +5057,14 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5054
5057
|
description: "_description_14ewt_235",
|
|
5055
5058
|
badge: "_badge_14ewt_269",
|
|
5056
5059
|
empty: "_empty_14ewt_281"
|
|
5057
|
-
},
|
|
5060
|
+
}, Mr = (e, t, n) => {
|
|
5058
5061
|
if (e.length === 0) return -1;
|
|
5059
5062
|
for (let r = 1; r <= e.length; r += 1) {
|
|
5060
5063
|
let i = (t + n * r + e.length) % e.length;
|
|
5061
5064
|
if (!e[i]?.disabled) return i;
|
|
5062
5065
|
}
|
|
5063
5066
|
return -1;
|
|
5064
|
-
},
|
|
5067
|
+
}, Nr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
5065
5068
|
let m = f(), g = h(null), _ = h({
|
|
5066
5069
|
value: "",
|
|
5067
5070
|
time: 0
|
|
@@ -5073,7 +5076,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5073
5076
|
let n = v.findIndex((e) => e.id === t.id);
|
|
5074
5077
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
5075
5078
|
e.preventDefault();
|
|
5076
|
-
let t =
|
|
5079
|
+
let t = Mr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
5077
5080
|
x(v[t]);
|
|
5078
5081
|
return;
|
|
5079
5082
|
}
|
|
@@ -5093,26 +5096,26 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5093
5096
|
let a = r.id === i, o = {
|
|
5094
5097
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5095
5098
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5096
|
-
className:
|
|
5099
|
+
className: jr.icon,
|
|
5097
5100
|
"aria-hidden": "true",
|
|
5098
5101
|
children: r.icon
|
|
5099
5102
|
}),
|
|
5100
5103
|
/* @__PURE__ */ n("span", {
|
|
5101
|
-
className:
|
|
5104
|
+
className: jr.copy,
|
|
5102
5105
|
children: [/* @__PURE__ */ t("span", {
|
|
5103
|
-
className:
|
|
5106
|
+
className: jr.label,
|
|
5104
5107
|
children: r.label
|
|
5105
5108
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5106
|
-
className:
|
|
5109
|
+
className: jr.description,
|
|
5107
5110
|
children: r.description
|
|
5108
5111
|
})]
|
|
5109
5112
|
}),
|
|
5110
5113
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5111
|
-
className:
|
|
5114
|
+
className: jr.badge,
|
|
5112
5115
|
children: r.badge
|
|
5113
5116
|
})
|
|
5114
5117
|
] }),
|
|
5115
|
-
className: `${
|
|
5118
|
+
className: `${jr.link} ${a ? jr.current : ""}`,
|
|
5116
5119
|
tabIndex: r.id === b ? 0 : -1,
|
|
5117
5120
|
"aria-current": a ? "page" : void 0,
|
|
5118
5121
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5128,7 +5131,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5128
5131
|
onKeyDown: (e) => S(e, r)
|
|
5129
5132
|
};
|
|
5130
5133
|
return /* @__PURE__ */ t("li", {
|
|
5131
|
-
className:
|
|
5134
|
+
className: jr.item,
|
|
5132
5135
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5133
5136
|
href: r.href,
|
|
5134
5137
|
...o,
|
|
@@ -5143,45 +5146,45 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5143
5146
|
};
|
|
5144
5147
|
return /* @__PURE__ */ n("nav", {
|
|
5145
5148
|
ref: g,
|
|
5146
|
-
className: `${
|
|
5149
|
+
className: `${jr.root} ${p}`,
|
|
5147
5150
|
"aria-label": a,
|
|
5148
5151
|
children: [
|
|
5149
5152
|
s && /* @__PURE__ */ t("div", {
|
|
5150
|
-
className:
|
|
5153
|
+
className: jr.topSlot,
|
|
5151
5154
|
children: s
|
|
5152
5155
|
}),
|
|
5153
5156
|
o && /* @__PURE__ */ t("div", {
|
|
5154
|
-
className:
|
|
5157
|
+
className: jr.searchSlot,
|
|
5155
5158
|
children: o
|
|
5156
5159
|
}),
|
|
5157
5160
|
/* @__PURE__ */ n("div", {
|
|
5158
|
-
className:
|
|
5161
|
+
className: jr.groups,
|
|
5159
5162
|
children: [r.map((e) => {
|
|
5160
5163
|
let r = `${m}-${e.id}`;
|
|
5161
5164
|
return /* @__PURE__ */ n("section", {
|
|
5162
|
-
className:
|
|
5165
|
+
className: jr.group,
|
|
5163
5166
|
"aria-labelledby": e.label ? r : void 0,
|
|
5164
5167
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5165
5168
|
id: r,
|
|
5166
|
-
className:
|
|
5169
|
+
className: jr.groupLabel,
|
|
5167
5170
|
children: e.label
|
|
5168
5171
|
}), /* @__PURE__ */ t("ul", {
|
|
5169
|
-
className:
|
|
5172
|
+
className: jr.list,
|
|
5170
5173
|
children: e.items.map(C)
|
|
5171
5174
|
})]
|
|
5172
5175
|
}, e.id);
|
|
5173
5176
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5174
|
-
className:
|
|
5177
|
+
className: jr.empty,
|
|
5175
5178
|
children: l
|
|
5176
5179
|
})]
|
|
5177
5180
|
}),
|
|
5178
5181
|
c && /* @__PURE__ */ t("div", {
|
|
5179
|
-
className:
|
|
5182
|
+
className: jr.bottomSlot,
|
|
5180
5183
|
children: c
|
|
5181
5184
|
})
|
|
5182
5185
|
]
|
|
5183
5186
|
});
|
|
5184
|
-
},
|
|
5187
|
+
}, Pr = {
|
|
5185
5188
|
root: "_root_2mdgb_1",
|
|
5186
5189
|
list: "_list_2mdgb_19",
|
|
5187
5190
|
item: "_item_2mdgb_37",
|
|
@@ -5191,7 +5194,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5191
5194
|
icon: "_icon_2mdgb_141",
|
|
5192
5195
|
badge: "_badge_2mdgb_149",
|
|
5193
5196
|
label: "_label_2mdgb_163"
|
|
5194
|
-
},
|
|
5197
|
+
}, Fr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5195
5198
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5196
5199
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5197
5200
|
}, p = (e, t) => {
|
|
@@ -5208,27 +5211,27 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5208
5211
|
};
|
|
5209
5212
|
return /* @__PURE__ */ t("nav", {
|
|
5210
5213
|
ref: l,
|
|
5211
|
-
className: `${
|
|
5214
|
+
className: `${Pr.root} ${c}`,
|
|
5212
5215
|
"aria-label": a,
|
|
5213
5216
|
children: /* @__PURE__ */ t("ul", {
|
|
5214
|
-
className:
|
|
5217
|
+
className: Pr.list,
|
|
5215
5218
|
children: r.map((r) => {
|
|
5216
5219
|
let a = r.id === i, c = {
|
|
5217
5220
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5218
|
-
className:
|
|
5221
|
+
className: Pr.visual,
|
|
5219
5222
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5220
|
-
className:
|
|
5223
|
+
className: Pr.icon,
|
|
5221
5224
|
"aria-hidden": "true",
|
|
5222
5225
|
children: r.icon
|
|
5223
5226
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5224
|
-
className:
|
|
5227
|
+
className: Pr.badge,
|
|
5225
5228
|
children: r.badge
|
|
5226
5229
|
})]
|
|
5227
5230
|
}), /* @__PURE__ */ t("span", {
|
|
5228
|
-
className:
|
|
5231
|
+
className: Pr.label,
|
|
5229
5232
|
children: r.label
|
|
5230
5233
|
})] }),
|
|
5231
|
-
className: `${
|
|
5234
|
+
className: `${Pr.link} ${a ? Pr.current : ""}`,
|
|
5232
5235
|
tabIndex: r.id === d ? 0 : -1,
|
|
5233
5236
|
"aria-current": a ? "page" : void 0,
|
|
5234
5237
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5244,7 +5247,7 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5244
5247
|
onKeyDown: (e) => p(e, r)
|
|
5245
5248
|
};
|
|
5246
5249
|
return /* @__PURE__ */ t("li", {
|
|
5247
|
-
className:
|
|
5250
|
+
className: Pr.item,
|
|
5248
5251
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5249
5252
|
href: r.href,
|
|
5250
5253
|
...c,
|
|
@@ -5261,4 +5264,4 @@ var jn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5261
5264
|
});
|
|
5262
5265
|
};
|
|
5263
5266
|
//#endregion
|
|
5264
|
-
export {
|
|
5267
|
+
export { zn as ConfirmModal, Ar as DSAccordion, w as DSBadge, Fr as DSBottomNavigation, tr as DSBottomSheet, j as DSButton, Pe as DSCheckbox, D as DSCounterBadge, Ht as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, er as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, dn as DSFileInput, tn as DSFilters, mn as DSFloatingMenu, rn as DSFormGrid, an as DSFormGridItem, nr as DSFullscreenDialog, J as DSIcon, Me as DSIconNames, $t as DSInfoBlock, mt as DSInput, k as DSLoader, Nn as DSModal, Mn as DSModalFrame, Nr as DSNavigationSurface, $n as DSOverlay, ir as DSPageLoader, fn as DSPortal, xt as DSRadioButton, Zt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, xr as DSTabs, vn as DSTextarea, sr as DSToast, dr as DSToastProvider, yr as DSTooltip, on as DSValidationSummary, Dr as DSVideoPlayerFrame, Bn as ErrorModal, Pn as ModalSystemProvider, Vn as builtInModalRegistry, Fn as defineModalRegistry, E as formatDSCounterValue, X as formatDateInputValue, Ge as formatDateTimeLocalValue, kr as getDSAccordionScrollTarget, At as getDSDataTableColumnStyle, Mt as getDSDataTablePaginationItems, jt as getDSDataTableStickyColumnStyle, Un as getErrorMessage, kt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, xn as resetModalStore, ur as resetToastStore, Hn as useConfirmModal, Gn as useConfirmModalStore, Qn as useDSOverlay, Wn as useErrorModal, Kn as useErrorModalStore, qn as useModals, bn as useModalsStore, fr as useToast, lr as useToastStore, Nt as validateDSDataTableData };
|