@sl-material/sl-import 1.1.0 → 1.1.1

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.
@@ -28,7 +28,7 @@
28
28
  .icon-xiazai:before { content: "\\e629"; }
29
29
  .icon-tishi:before { content: "\\e62a"; }
30
30
 
31
- .import-dialog-vanilla-wrapper {
31
+ .sl-import-dialog-vanilla-wrapper {
32
32
  position: fixed;
33
33
  top: 0;
34
34
  left: 0;
@@ -37,7 +37,7 @@
37
37
  z-index: 1000;
38
38
  }
39
39
 
40
- .import-dialog-vanilla-overlay {
40
+ .sl-import-dialog-vanilla-overlay {
41
41
  position: fixed;
42
42
  top: 0;
43
43
  left: 0;
@@ -51,7 +51,7 @@
51
51
  overflow: auto;
52
52
  }
53
53
 
54
- .import-dialog-vanilla-modal {
54
+ .sl-import-dialog-vanilla-modal {
55
55
  padding: 20px 16px;
56
56
  position: relative;
57
57
  background-color: var(--sl-color-white);
@@ -64,7 +64,7 @@
64
64
  pointer-events: auto;
65
65
  }
66
66
 
67
- .import-dialog-vanilla-header {
67
+ .sl-import-dialog-vanilla-header {
68
68
  display: flex;
69
69
  justify-content: space-between;
70
70
  align-items: center;
@@ -76,13 +76,13 @@
76
76
  padding: 0px;
77
77
  }
78
78
 
79
- .import-dialog-vanilla-title {
79
+ .sl-import-dialog-vanilla-title {
80
80
  font-size: 16px;
81
81
  font-weight: 500;
82
82
  color: var(--sl-text-color);
83
83
  }
84
84
 
85
- .import-dialog-vanilla-close {
85
+ .sl-import-dialog-vanilla-close {
86
86
  font-size: 20px;
87
87
  color: var(--sl-text-color-thridary);
88
88
  cursor: pointer;
@@ -94,14 +94,14 @@
94
94
 
95
95
 
96
96
 
97
- .import-dialog-vanilla-tabs {
97
+ .sl-import-dialog-vanilla-tabs {
98
98
  display: flex;
99
99
  margin-bottom: 8px;
100
100
  gap: 4px;
101
101
  border-bottom: 1px solid var(--sl-border-color);
102
102
  }
103
103
 
104
- .import-dialog-vanilla-tab {
104
+ .sl-import-dialog-vanilla-tab {
105
105
  padding: 0 16px;
106
106
  height: 32px;
107
107
  display: flex;
@@ -116,24 +116,24 @@
116
116
  transition: all 0.3s;
117
117
  }
118
118
 
119
- .import-dialog-vanilla-tab:hover {
119
+ .sl-import-dialog-vanilla-tab:hover {
120
120
  color: var(--sl-color-primary);
121
121
  }
122
122
 
123
- .import-dialog-vanilla-tab.active {
123
+ .sl-import-dialog-vanilla-tab.active {
124
124
  background: var(--sl-color-primary);
125
125
  border-color: var(--sl-color-primary);
126
126
  color: var(--sl-color-white);
127
127
  }
128
128
 
129
- .import-dialog-vanilla-section {
129
+ .sl-import-dialog-vanilla-section {
130
130
  background: var(--slm-card-bg-color4);
131
131
  border-radius: 8px;
132
132
  padding: 8px 12px;
133
133
  margin-bottom: 8px;
134
134
  }
135
135
 
136
- .import-dialog-vanilla-section-title {
136
+ .sl-import-dialog-vanilla-section-title {
137
137
  font-size: 14px;
138
138
  font-weight: 500;
139
139
  color: var(--sl-text-color);
@@ -142,7 +142,7 @@
142
142
  align-items: center;
143
143
  }
144
144
 
145
- .import-dialog-vanilla-tips-icon {
145
+ .sl-import-dialog-vanilla-tips-icon {
146
146
  width: 18px;
147
147
  height: 18px;
148
148
  background: #ECECEC;
@@ -151,28 +151,28 @@
151
151
  align-items: center;
152
152
  justify-content: center;
153
153
  }
154
- .import-dialog-vanilla-tips-icon>i {
154
+ .sl-import-dialog-vanilla-tips-icon>i {
155
155
  font-size: 12px;
156
156
  font-weight:600;
157
157
  }
158
158
 
159
- .import-dialog-vanilla-tips-title {
159
+ .sl-import-dialog-vanilla-tips-title {
160
160
  font-size: 16px;
161
161
  margin-left:12px;
162
162
  }
163
163
 
164
- .import-dialog-vanilla-tips-content {
164
+ .sl-import-dialog-vanilla-tips-content {
165
165
  padding-left: 30px;
166
166
  }
167
167
 
168
- .import-dialog-vanilla-tip-item {
168
+ .sl-import-dialog-vanilla-tip-item {
169
169
  font-size: 14px;
170
170
  color: var(--sl-text-color-secondary);
171
171
  margin: 4px 0;
172
172
  line-height: 1.4;
173
173
  }
174
174
 
175
- .import-dialog-vanilla-btn {
175
+ .sl-import-dialog-vanilla-btn {
176
176
  display: inline-flex;
177
177
  align-items: center;
178
178
  justify-content: center;
@@ -188,17 +188,17 @@
188
188
  transition: all 0.3s;
189
189
  }
190
190
 
191
- .import-dialog-vanilla-btn:hover {
191
+ .sl-import-dialog-vanilla-btn:hover {
192
192
  border-color: var(--sl-color-primary);
193
193
  color: var(--sl-color-primary);
194
194
  }
195
195
 
196
- .import-dialog-vanilla-btn:disabled {
196
+ .sl-import-dialog-vanilla-btn:disabled {
197
197
  opacity: 0.6;
198
198
  cursor: not-allowed;
199
199
  }
200
200
 
201
- .import-dialog-vanilla-btn-primary {
201
+ .sl-import-dialog-vanilla-btn-primary {
202
202
  background: var(--sl-color-primary);
203
203
  border-color: var(--sl-color-primary);
204
204
  color: var(--sl-color-white);
@@ -208,7 +208,7 @@
208
208
  font-weight:500;
209
209
  }
210
210
 
211
- .import-dialog-vanilla-btn-primary:hover {
211
+ .sl-import-dialog-vanilla-btn-primary:hover {
212
212
  background: var(--slm-primary-color-hover);
213
213
  border-color: var(--slm-primary-color-hover);
214
214
  color: var(--sl-color-white);
@@ -216,35 +216,35 @@
216
216
  }
217
217
 
218
218
 
219
- .import-dialog-vanilla-icon {
219
+ .sl-import-dialog-vanilla-icon {
220
220
  font-size: 14px;
221
221
  }
222
222
 
223
- .import-dialog-vanilla-setting-content {
223
+ .sl-import-dialog-vanilla-setting-content {
224
224
  display: flex;
225
225
  flex-direction: column;
226
226
  gap: 12px;
227
227
  }
228
228
 
229
- .import-dialog-vanilla-setting-item {
229
+ .sl-import-dialog-vanilla-setting-item {
230
230
  display: flex;
231
231
  align-items: center;
232
232
  justify-content: space-between;
233
233
  }
234
234
 
235
- .import-dialog-vanilla-setting-label {
235
+ .sl-import-dialog-vanilla-setting-label {
236
236
  min-width: 100px;
237
237
  color: var(--sl-text-color-primary);
238
238
  font-size: 14px;
239
239
  }
240
240
 
241
- .import-dialog-vanilla-setting-label.required::before {
241
+ .sl-import-dialog-vanilla-setting-label.required::before {
242
242
  content: "*";
243
243
  color: var(--sl-color-error);
244
244
  margin-right: 4px;
245
245
  }
246
246
 
247
- .import-dialog-vanilla-select {
247
+ .sl-import-dialog-vanilla-select {
248
248
  width: 200px;
249
249
  height: 28px;
250
250
  padding: 0 8px;
@@ -256,20 +256,20 @@
256
256
  cursor: pointer;
257
257
  }
258
258
 
259
- .import-dialog-vanilla-select:focus {
259
+ .sl-import-dialog-vanilla-select:focus {
260
260
  border-color: var(--sl-color-primary);
261
261
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
262
262
  }
263
263
 
264
264
  /* Custom Select Component Styles */
265
- .import-dialog-vanilla-custom-select {
265
+ .sl-import-dialog-vanilla-custom-select {
266
266
  position: relative;
267
267
  width: 200px;
268
268
  height: 28px;
269
269
  font-size: 14px;
270
270
  }
271
271
 
272
- .import-dialog-vanilla-select-trigger {
272
+ .sl-import-dialog-vanilla-select-trigger {
273
273
  width: 100%;
274
274
  height: 100%;
275
275
  padding: 0 8px;
@@ -283,22 +283,22 @@
283
283
  transition: all 0.3s;
284
284
  }
285
285
 
286
- .import-dialog-vanilla-select-trigger:hover {
286
+ .sl-import-dialog-vanilla-select-trigger:hover {
287
287
  border-color: var(--sl-color-primary);
288
288
  }
289
289
 
290
- .import-dialog-vanilla-select-trigger.active {
290
+ .sl-import-dialog-vanilla-select-trigger.active {
291
291
  border-color: var(--sl-color-primary);
292
292
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
293
293
  }
294
294
 
295
- .import-dialog-vanilla-select-trigger.disabled {
295
+ .sl-import-dialog-vanilla-select-trigger.disabled {
296
296
  background: #f5f5f5;
297
297
  cursor: not-allowed;
298
298
  opacity: 0.6;
299
299
  }
300
300
 
301
- .import-dialog-vanilla-select-value {
301
+ .sl-import-dialog-vanilla-select-value {
302
302
  flex: 1;
303
303
  overflow: hidden;
304
304
  text-overflow: ellipsis;
@@ -306,11 +306,11 @@
306
306
  color: var(--sl-text-color-primary);
307
307
  }
308
308
 
309
- .import-dialog-vanilla-select-placeholder {
309
+ .sl-import-dialog-vanilla-select-placeholder {
310
310
  color: var(--sl-text-color-placeholder);
311
311
  }
312
312
 
313
- .import-dialog-vanilla-select-arrow {
313
+ .sl-import-dialog-vanilla-select-arrow {
314
314
  width: 0;
315
315
  height: 0;
316
316
  border-left: 4px solid transparent;
@@ -320,11 +320,11 @@
320
320
  margin-left: 8px;
321
321
  }
322
322
 
323
- .import-dialog-vanilla-select-trigger.active .import-dialog-vanilla-select-arrow {
323
+ .sl-import-dialog-vanilla-select-trigger.active .sl-import-dialog-vanilla-select-arrow {
324
324
  transform: rotate(180deg);
325
325
  }
326
326
 
327
- .import-dialog-vanilla-select-dropdown {
327
+ .sl-import-dialog-vanilla-select-dropdown {
328
328
  position: absolute;
329
329
  top: 100%;
330
330
  left: 0;
@@ -343,13 +343,13 @@
343
343
  padding: 4px 0;
344
344
  }
345
345
 
346
- .import-dialog-vanilla-select-dropdown.show {
346
+ .sl-import-dialog-vanilla-select-dropdown.show {
347
347
  opacity: 1;
348
348
  transform: translateY(0);
349
349
  pointer-events: auto;
350
350
  }
351
351
 
352
- .import-dialog-vanilla-select-option {
352
+ .sl-import-dialog-vanilla-select-option {
353
353
  padding: 0px 8px;
354
354
  cursor: pointer;
355
355
  transition: background-color 0.3s;
@@ -361,23 +361,23 @@
361
361
  line-height: 34px;
362
362
  }
363
363
 
364
- .import-dialog-vanilla-select-option:hover {
364
+ .sl-import-dialog-vanilla-select-option:hover {
365
365
  background: var(--sl-fill-color-light);
366
366
  }
367
367
 
368
- .import-dialog-vanilla-select-option.selected {
368
+ .sl-import-dialog-vanilla-select-option.selected {
369
369
  background: var(--sl-color-primary-light-9);
370
370
  color: var(--sl-color-primary);
371
371
  font-weight: 500;
372
372
  }
373
373
 
374
- .import-dialog-vanilla-radio-group {
374
+ .sl-import-dialog-vanilla-radio-group {
375
375
  display: flex;
376
376
  gap: 20px;
377
377
  flex-wrap: wrap;
378
378
  }
379
379
 
380
- .import-dialog-vanilla-radio {
380
+ .sl-import-dialog-vanilla-radio {
381
381
  display: flex;
382
382
  align-items: center;
383
383
  gap: 8px;
@@ -386,7 +386,7 @@
386
386
  color: var(--sl-text-color-secondary);
387
387
  }
388
388
 
389
- .import-dialog-vanilla-radio input[type="radio"] {
389
+ .sl-import-dialog-vanilla-radio input[type="radio"] {
390
390
  appearance: none;
391
391
  width: 16px;
392
392
  height: 16px;
@@ -397,15 +397,15 @@
397
397
  cursor: pointer;
398
398
  margin: 0;
399
399
  }
400
- .import-dialog-vanilla-radio input[type="radio"]:hover {
400
+ .sl-import-dialog-vanilla-radio input[type="radio"]:hover {
401
401
  border-color: var(--sl-color-primary);
402
402
  }
403
- .import-dialog-vanilla-radio input[type="radio"]:checked {
403
+ .sl-import-dialog-vanilla-radio input[type="radio"]:checked {
404
404
  border-color: var(--sl-color-primary);
405
405
  border-width: 5px;
406
406
  }
407
407
 
408
- .import-dialog-vanilla-radio input[type="radio"]:checked::before {
408
+ .sl-import-dialog-vanilla-radio input[type="radio"]:checked::before {
409
409
  content: '';
410
410
  width: 6px;
411
411
  height: 6px;
@@ -416,18 +416,18 @@
416
416
  transform: translate(-50%, -50%);
417
417
  }
418
418
 
419
- .import-dialog-vanilla-radio span {
419
+ .sl-import-dialog-vanilla-radio span {
420
420
  color: var(--sl-text-color-primary);
421
421
  font-size: 14px;
422
422
  }
423
423
 
424
- .import-dialog-vanilla-date-range {
424
+ .sl-import-dialog-vanilla-date-range {
425
425
  display: flex;
426
426
  align-items: center;
427
427
  gap: 8px;
428
428
  }
429
429
 
430
- .import-dialog-vanilla-date-input {
430
+ .sl-import-dialog-vanilla-date-input {
431
431
  width: 150px;
432
432
  height: 28px;
433
433
  padding: 0 8px;
@@ -437,22 +437,22 @@
437
437
  outline: none;
438
438
  }
439
439
 
440
- .import-dialog-vanilla-date-input:focus {
440
+ .sl-import-dialog-vanilla-date-input:focus {
441
441
  border-color: var(--sl-color-primary);
442
442
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
443
443
  }
444
444
 
445
- .import-dialog-vanilla-date-separator {
445
+ .sl-import-dialog-vanilla-date-separator {
446
446
  color: #999;
447
447
  }
448
448
 
449
449
  /* 上传区域包装器 - 文件列表和上传区域横向排列 */
450
- .import-dialog-vanilla-upload-wrapper {
450
+ .sl-import-dialog-vanilla-upload-wrapper {
451
451
  display: flex;
452
452
  flex-direction: column;
453
453
  }
454
454
 
455
- .import-dialog-vanilla-upload-area {
455
+ .sl-import-dialog-vanilla-upload-area {
456
456
  min-height: 176px;
457
457
  cursor: pointer;
458
458
  transition: all 0.3s;
@@ -462,21 +462,21 @@
462
462
  position: relative;
463
463
  }
464
464
 
465
- .import-dialog-vanilla-upload-area:hover {
465
+ .sl-import-dialog-vanilla-upload-area:hover {
466
466
  border-color: var(--sl-color-primary);
467
467
  }
468
468
 
469
- .import-dialog-vanilla-upload-area.dragover {
469
+ .sl-import-dialog-vanilla-upload-area.dragover {
470
470
  border-color: var(--sl-color-primary);
471
471
  background: rgba(24, 144, 255, 0.05);
472
472
  }
473
473
 
474
- .import-dialog-vanilla-upload-area.disabled {
474
+ .sl-import-dialog-vanilla-upload-area.disabled {
475
475
  cursor: not-allowed;
476
476
  opacity: 0.6;
477
477
  }
478
478
 
479
- .import-dialog-vanilla-file-input {
479
+ .sl-import-dialog-vanilla-file-input {
480
480
  position: absolute;
481
481
  width: 0;
482
482
  height: 0;
@@ -484,12 +484,12 @@
484
484
  pointer-events: none;
485
485
  }
486
486
 
487
- .import-dialog-vanilla-upload-content {
487
+ .sl-import-dialog-vanilla-upload-content {
488
488
  text-align: center;
489
489
  padding: 20px;
490
490
  }
491
491
 
492
- .import-dialog-vanilla-upload-icon {
492
+ .sl-import-dialog-vanilla-upload-icon {
493
493
  // font-size: 48px;
494
494
  width:88px;
495
495
  height:74px;
@@ -497,32 +497,32 @@
497
497
  margin-bottom: 16px;
498
498
  }
499
499
 
500
- .import-dialog-vanilla-upload-text {
500
+ .sl-import-dialog-vanilla-upload-text {
501
501
  color: var(--sl-text-color-secondary);
502
502
  font-size: 14px;
503
503
  margin-bottom: 8px;
504
504
  }
505
505
 
506
- .import-dialog-vanilla-upload-link {
506
+ .sl-import-dialog-vanilla-upload-link {
507
507
  color: var(--sl-color-primary);
508
508
  cursor: pointer;
509
509
  }
510
510
 
511
- .import-dialog-vanilla-upload-link:hover {
511
+ .sl-import-dialog-vanilla-upload-link:hover {
512
512
  text-decoration: underline;
513
513
  }
514
514
 
515
- .import-dialog-vanilla-upload-hint {
515
+ .sl-import-dialog-vanilla-upload-hint {
516
516
  color: var(--sl-text-color-secondary);
517
517
  font-size: 12px;
518
518
  margin: 0;
519
519
  }
520
520
 
521
- .import-dialog-vanilla-file-info {
521
+ .sl-import-dialog-vanilla-file-info {
522
522
  display: flex;
523
523
  }
524
524
 
525
- .import-dialog-vanilla-file-name {
525
+ .sl-import-dialog-vanilla-file-name {
526
526
  flex: 1;
527
527
  font-size: 14px;
528
528
  color: var(--sl-text-color-primary);
@@ -531,23 +531,23 @@
531
531
  white-space: nowrap;
532
532
  }
533
533
 
534
- .import-dialog-vanilla-file-remove {
534
+ .sl-import-dialog-vanilla-file-remove {
535
535
  font-size: 18px;
536
536
  color: #999;
537
537
  cursor: pointer;
538
538
  line-height: 1;
539
539
  }
540
540
 
541
- .import-dialog-vanilla-file-remove:hover {
541
+ .sl-import-dialog-vanilla-file-remove:hover {
542
542
  color: #ff4d4f;
543
543
  }
544
544
 
545
- .import-dialog-vanilla-upload-progress {
545
+ .sl-import-dialog-vanilla-upload-progress {
546
546
  margin-top: 12px;
547
547
  padding: 8px 0;
548
548
  }
549
549
 
550
- .import-dialog-vanilla-progress-bar {
550
+ .sl-import-dialog-vanilla-progress-bar {
551
551
  height: 8px;
552
552
  background: #f0f0f0;
553
553
  border-radius: 4px;
@@ -555,59 +555,59 @@
555
555
  margin-bottom: 8px;
556
556
  }
557
557
 
558
- .import-dialog-vanilla-progress-inner {
558
+ .sl-import-dialog-vanilla-progress-inner {
559
559
  height: 100%;
560
560
  border-radius: 4px;
561
561
  transition: width 0.3s;
562
562
  }
563
563
 
564
- .import-dialog-vanilla-progress-inner.active {
564
+ .sl-import-dialog-vanilla-progress-inner.active {
565
565
  background: var(--sl-color-primary);
566
566
  }
567
567
 
568
- .import-dialog-vanilla-progress-inner.success {
568
+ .sl-import-dialog-vanilla-progress-inner.success {
569
569
  background: #52c41a;
570
570
  }
571
571
 
572
- .import-dialog-vanilla-progress-inner.error {
572
+ .sl-import-dialog-vanilla-progress-inner.error {
573
573
  background: #ff4d4f;
574
574
  }
575
575
 
576
- .import-dialog-vanilla-progress-text {
576
+ .sl-import-dialog-vanilla-progress-text {
577
577
  font-size: 12px;
578
578
  color: var(--sl-text-color-secondary);
579
579
  }
580
580
 
581
- .import-dialog-vanilla-upload-message {
581
+ .sl-import-dialog-vanilla-upload-message {
582
582
  font-size: 14px;
583
583
  padding: 6px 12px;
584
584
  border-radius: 4px;
585
585
  margin-top: 8px;
586
586
  }
587
587
 
588
- .import-dialog-vanilla-upload-message.info {
588
+ .sl-import-dialog-vanilla-upload-message.info {
589
589
  color: var(--sl-color-primary);
590
590
  background: rgba(24, 144, 255, 0.1);
591
591
  }
592
592
 
593
- .import-dialog-vanilla-upload-message.success {
593
+ .sl-import-dialog-vanilla-upload-message.success {
594
594
  color: #52c41a;
595
595
  background: rgba(82, 196, 26, 0.1);
596
596
  }
597
597
 
598
- .import-dialog-vanilla-upload-message.error {
598
+ .sl-import-dialog-vanilla-upload-message.error {
599
599
  color: #ff4d4f;
600
600
  background: rgba(255, 77, 79, 0.1);
601
601
  }
602
602
 
603
- .import-dialog-vanilla-footer {
603
+ .sl-import-dialog-vanilla-footer {
604
604
  display: flex;
605
605
  justify-content: flex-end;
606
606
  gap: 12px;
607
607
  padding-top: 8px;
608
608
  }
609
609
 
610
- .import-dialog-vanilla-toast {
610
+ .sl-import-dialog-vanilla-toast {
611
611
  position: fixed;
612
612
  top: 16px;
613
613
  left: 50%;
@@ -617,30 +617,30 @@
617
617
  font-size: 14px;
618
618
  z-index: 1100;
619
619
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
620
- animation: import-dialog-toast-in 0.3s ease;
620
+ animation: sl-import-dialog-toast-in 0.3s ease;
621
621
  display: flex;
622
622
  align-items: center;
623
623
  padding: 8px 15px;
624
624
  box-sizing: content-box;
625
625
  }
626
626
 
627
- .import-dialog-vanilla-toast-content {
627
+ .sl-import-dialog-vanilla-toast-content {
628
628
  display: flex;
629
629
  align-items: center;
630
630
  flex: 1;
631
631
  gap:8px;
632
632
  }
633
633
 
634
- .import-dialog-vanilla-toast-icon {
634
+ .sl-import-dialog-vanilla-toast-icon {
635
635
  font-size: 16px;
636
636
  flex-shrink: 0;
637
637
  }
638
638
 
639
- .import-dialog-vanilla-toast-message {
639
+ .sl-import-dialog-vanilla-toast-message {
640
640
  flex: 1;
641
641
  }
642
642
 
643
- .import-dialog-vanilla-toast-close {
643
+ .sl-import-dialog-vanilla-toast-close {
644
644
  background: none;
645
645
  border: none;
646
646
  padding: 11px 15px;
@@ -653,43 +653,43 @@
653
653
  flex-shrink: 0;
654
654
  }
655
655
 
656
- .import-dialog-vanilla-toast-close:hover {
656
+ .sl-import-dialog-vanilla-toast-close:hover {
657
657
  opacity: 1;
658
658
  }
659
659
 
660
- .import-dialog-vanilla-toast-close i {
660
+ .sl-import-dialog-vanilla-toast-close i {
661
661
  font-size: 14px;
662
662
  }
663
663
 
664
- .import-dialog-vanilla-toast.info {
664
+ .sl-import-dialog-vanilla-toast.info {
665
665
  background-color: var(--sl-color-primary-light-9);
666
666
  color: var(--sl-color-primary);
667
667
  border: 1px solid var(--sl-color-primary-light-8);
668
668
  }
669
669
 
670
- .import-dialog-vanilla-toast.success {
670
+ .sl-import-dialog-vanilla-toast.success {
671
671
  background-color: var(--sl-color-success-light-9);
672
672
  color: var(--sl-color-success);
673
673
  border: 1px solid var(--sl-color-success-light-8);
674
674
  }
675
675
 
676
- .import-dialog-vanilla-toast.warning {
676
+ .sl-import-dialog-vanilla-toast.warning {
677
677
  background-color: var(--sl-color-warning-light-9);
678
678
  color: var(--sl-color-warning);
679
679
  border: 1px solid var(--sl-color-warning-light-8);
680
680
  }
681
681
 
682
- .import-dialog-vanilla-toast.error {
682
+ .sl-import-dialog-vanilla-toast.error {
683
683
  background-color: var(--sl-color-error-light-9);
684
684
  color: var(--sl-color-error);
685
685
  border: 1px solid var(--sl-color-error-light-8);
686
686
  }
687
687
 
688
- .import-dialog-vanilla-toast.fade-out {
689
- animation: import-dialog-toast-out 0.3s ease forwards;
688
+ .sl-import-dialog-vanilla-toast.fade-out {
689
+ animation: sl-import-dialog-toast-out 0.3s ease forwards;
690
690
  }
691
691
 
692
- @keyframes import-dialog-toast-in {
692
+ @keyframes sl-import-dialog-toast-in {
693
693
  from {
694
694
  opacity: 0;
695
695
  transform: translateX(-50%) translateY(-20px);
@@ -700,7 +700,7 @@
700
700
  }
701
701
  }
702
702
 
703
- @keyframes import-dialog-toast-out {
703
+ @keyframes sl-import-dialog-toast-out {
704
704
  from {
705
705
  opacity: 1;
706
706
  transform: translateX(-50%) translateY(0);
@@ -712,7 +712,7 @@
712
712
  }
713
713
 
714
714
  /* DateRangePicker */
715
- .sl-date-range-picker {
715
+ .sl-import-date-range-picker {
716
716
  position: relative;
717
717
  display: inline-flex;
718
718
  align-items: center;
@@ -726,16 +726,16 @@
726
726
  transition: border-color 0.3s;
727
727
  }
728
728
 
729
- .sl-date-range-picker:hover {
729
+ .sl-import-date-range-picker:hover {
730
730
  border-color: var(--sl-color-primary);
731
731
  }
732
732
 
733
- .sl-date-range-picker:focus-within {
733
+ .sl-import-date-range-picker:focus-within {
734
734
  border-color: var(--sl-color-primary);
735
735
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
736
736
  }
737
737
 
738
- .sl-date-range-input {
738
+ .sl-import-date-range-input {
739
739
  border: none;
740
740
  outline: none;
741
741
  background: transparent;
@@ -748,17 +748,17 @@
748
748
  height: 100%;
749
749
  }
750
750
 
751
- .sl-date-range-input::placeholder {
751
+ .sl-import-date-range-input::placeholder {
752
752
  color: var(--sl-text-color-placeholder);
753
753
  }
754
754
 
755
- .sl-date-range-separator {
755
+ .sl-import-date-range-separator {
756
756
  color: var(--sl-text-color);
757
757
  font-size: 13px;
758
758
  flex-shrink: 0;
759
759
  }
760
760
 
761
- .sl-date-range-icon {
761
+ .sl-import-date-range-icon {
762
762
  display: flex;
763
763
  align-items: center;
764
764
  color: var(--sl-text-color-placeholder);
@@ -766,7 +766,7 @@
766
766
  }
767
767
 
768
768
  /* 日期范围选择器日历样式覆盖 */
769
- .sl-date-range-calendar {
769
+ .sl-import-date-range-calendar {
770
770
  border: 1px solid var(--sl-border-color-light);
771
771
  box-shadow: var(--sl-box-shadow-light);
772
772
  border-radius: 8px;
@@ -776,13 +776,13 @@
776
776
  }
777
777
 
778
778
  /* 隐藏 flatpickr 自带的箭头 */
779
- .sl-date-range-calendar::before,
780
- .sl-date-range-calendar::after {
779
+ .sl-import-date-range-calendar::before,
780
+ .sl-import-date-range-calendar::after {
781
781
  display: none !important;
782
782
  }
783
783
 
784
784
  /* 自定义箭头元素 — 基础样式 */
785
- .sl-calendar-arrow {
785
+ .sl-import-calendar-arrow {
786
786
  position: absolute;
787
787
  transform: translateX(-50%);
788
788
  width: 0;
@@ -793,11 +793,11 @@
793
793
  }
794
794
 
795
795
  /* 箭头朝上(日历在输入框下方) */
796
- .sl-calendar-arrow-top {
796
+ .sl-import-calendar-arrow-top {
797
797
  top: -8px;
798
798
  border-bottom: 8px solid #e4e7ed;
799
799
  }
800
- .sl-calendar-arrow-top::after {
800
+ .sl-import-calendar-arrow-top::after {
801
801
  content: "";
802
802
  position: absolute;
803
803
  top: 1px;
@@ -808,11 +808,11 @@
808
808
  }
809
809
 
810
810
  /* 箭头朝下(日历在输入框上方) */
811
- .sl-calendar-arrow-bottom {
811
+ .sl-import-calendar-arrow-bottom {
812
812
  bottom: -8px;
813
813
  border-top: 8px solid #e4e7ed;
814
814
  }
815
- .sl-calendar-arrow-bottom::after {
815
+ .sl-import-calendar-arrow-bottom::after {
816
816
  content: "";
817
817
  position: absolute;
818
818
  bottom: 1px;
@@ -823,17 +823,17 @@
823
823
  }
824
824
 
825
825
  /* 日历整体固定宽度 */
826
- .sl-date-range-calendar {
826
+ .sl-import-date-range-calendar {
827
827
  width: 646px !important;
828
828
  }
829
829
 
830
- .sl-date-range-calendar.has-shortcuts {
830
+ .sl-import-date-range-calendar.has-shortcuts {
831
831
  display: flex !important;
832
832
  flex-direction: row !important;
833
833
  width: 756px !important; /* 646 + 110 快捷方式面板 */
834
834
  }
835
835
 
836
- .sl-date-range-calendar-content {
836
+ .sl-import-date-range-calendar-content {
837
837
  width: 646px;
838
838
  flex-shrink: 0;
839
839
  padding: 12px;
@@ -842,7 +842,7 @@
842
842
  }
843
843
 
844
844
  /* 两个月份之间的连续分割线 */
845
- .sl-date-range-calendar-content::after {
845
+ .sl-import-date-range-calendar-content::after {
846
846
  content: '';
847
847
  position: absolute;
848
848
  top: 12px;
@@ -854,20 +854,20 @@
854
854
  pointer-events: none;
855
855
  }
856
856
 
857
- .sl-date-range-calendar-content .flatpickr-months,
858
- .sl-date-range-calendar-content .flatpickr-innerContainer {
857
+ .sl-import-date-range-calendar-content .flatpickr-months,
858
+ .sl-import-date-range-calendar-content .flatpickr-innerContainer {
859
859
  width: 100%;
860
860
  }
861
861
 
862
862
  /* 覆盖 flatpickr 固定宽度,让两个月份并排 */
863
- .sl-date-range-calendar .flatpickr-innerContainer {
863
+ .sl-import-date-range-calendar .flatpickr-innerContainer {
864
864
  overflow: visible !important;
865
865
  width: 622px !important; /* 311px * 2 */
866
866
  position: relative;
867
867
  }
868
868
 
869
869
  /* 没有快捷方式时的分割线(直接在 innerContainer 上) */
870
- .sl-date-range-calendar:not(.has-shortcuts) .flatpickr-innerContainer::after {
870
+ .sl-import-date-range-calendar:not(.has-shortcuts) .flatpickr-innerContainer::after {
871
871
  content: '';
872
872
  position: absolute;
873
873
  top: 0;
@@ -880,7 +880,7 @@
880
880
  }
881
881
 
882
882
  /* 没有快捷方式时月份头部的分割线 */
883
- .sl-date-range-calendar:not(.has-shortcuts) .flatpickr-months::after {
883
+ .sl-import-date-range-calendar:not(.has-shortcuts) .flatpickr-months::after {
884
884
  content: '';
885
885
  position: absolute;
886
886
  top: 0;
@@ -892,16 +892,16 @@
892
892
  pointer-events: none;
893
893
  }
894
894
 
895
- .sl-date-range-calendar .flatpickr-rContainer {
895
+ .sl-import-date-range-calendar .flatpickr-rContainer {
896
896
  width: 622px !important; /* 311px * 2 */
897
897
  }
898
898
 
899
- .sl-date-range-calendar .flatpickr-days .dayContainer + .dayContainer {
899
+ .sl-import-date-range-calendar .flatpickr-days .dayContainer + .dayContainer {
900
900
  box-shadow: none !important;
901
901
  }
902
902
 
903
903
  /* 快捷方式面板 */
904
- .sl-date-range-shortcuts {
904
+ .sl-import-date-range-shortcuts {
905
905
  display: flex;
906
906
  flex-direction: column;
907
907
  padding: 12px 0;
@@ -910,7 +910,7 @@
910
910
  flex-shrink: 0;
911
911
  }
912
912
 
913
- .sl-date-range-shortcut-item {
913
+ .sl-import-date-range-shortcut-item {
914
914
  padding: 0px 12px;
915
915
  font-size: 14px;
916
916
  color: var(--sl-text-color-regular);
@@ -921,24 +921,24 @@
921
921
  text-align: start;
922
922
  }
923
923
 
924
- .sl-date-range-shortcut-item:hover {
924
+ .sl-import-date-range-shortcut-item:hover {
925
925
  color: var(--sl-color-primary);
926
926
  }
927
927
 
928
- .sl-date-range-shortcut-item.active {
928
+ .sl-import-date-range-shortcut-item.active {
929
929
  color: var(--sl-color-primary);
930
930
  font-weight: 500;
931
931
  }
932
932
 
933
933
  /* 月份头部区域 */
934
- .sl-date-range-calendar .flatpickr-months {
934
+ .sl-import-date-range-calendar .flatpickr-months {
935
935
  padding: 0 4px !important;
936
936
  align-items: center;
937
937
  width: 622px !important; /* 311px * 2 */
938
938
  position: relative !important;
939
939
  }
940
940
 
941
- .sl-date-range-calendar .flatpickr-months .flatpickr-month {
941
+ .sl-import-date-range-calendar .flatpickr-months .flatpickr-month {
942
942
  height: 30px;
943
943
  display: flex;
944
944
  align-items: center;
@@ -947,10 +947,10 @@
947
947
  }
948
948
 
949
949
  /* 箭头样式 */
950
- .sl-date-range-calendar .flatpickr-prev-year,
951
- .sl-date-range-calendar .flatpickr-next-year,
952
- .sl-date-range-calendar .flatpickr-prev-month,
953
- .sl-date-range-calendar .flatpickr-next-month {
950
+ .sl-import-date-range-calendar .flatpickr-prev-year,
951
+ .sl-import-date-range-calendar .flatpickr-next-year,
952
+ .sl-import-date-range-calendar .flatpickr-prev-month,
953
+ .sl-import-date-range-calendar .flatpickr-next-month {
954
954
  position: absolute !important;
955
955
  top: 0;
956
956
  height: 34px;
@@ -958,31 +958,31 @@
958
958
  z-index: 3;
959
959
  }
960
960
 
961
- .sl-date-range-calendar .flatpickr-prev-year,
962
- .sl-date-range-calendar .flatpickr-prev-month {
961
+ .sl-import-date-range-calendar .flatpickr-prev-year,
962
+ .sl-import-date-range-calendar .flatpickr-prev-month {
963
963
  left: 0;
964
964
  }
965
965
 
966
- .sl-date-range-calendar .flatpickr-next-year,
967
- .sl-date-range-calendar .flatpickr-next-month {
966
+ .sl-import-date-range-calendar .flatpickr-next-year,
967
+ .sl-import-date-range-calendar .flatpickr-next-month {
968
968
  right: 0;
969
969
  }
970
970
 
971
- .sl-date-range-calendar .flatpickr-current-month {
971
+ .sl-import-date-range-calendar .flatpickr-current-month {
972
972
  font-size: 14px;
973
973
  font-weight: 500;
974
974
  padding-top: 8px;
975
975
  }
976
976
 
977
- .sl-date-range-calendar .flatpickr-current-month .cur-month {
977
+ .sl-import-date-range-calendar .flatpickr-current-month .cur-month {
978
978
  font-weight: 500;
979
979
  font-size: 16px;
980
980
  color:var(--sl-text-color)
981
981
  }
982
982
 
983
983
  /* 年份和月份导航箭头 */
984
- .sl-date-range-calendar .flatpickr-prev-year,
985
- .sl-date-range-calendar .flatpickr-next-year {
984
+ .sl-import-date-range-calendar .flatpickr-prev-year,
985
+ .sl-import-date-range-calendar .flatpickr-next-year {
986
986
  display: inline-flex;
987
987
  align-items: center;
988
988
  justify-content: center;
@@ -999,13 +999,13 @@
999
999
  z-index: 1;
1000
1000
  }
1001
1001
 
1002
- .sl-date-range-calendar .flatpickr-prev-year:hover,
1003
- .sl-date-range-calendar .flatpickr-next-year:hover {
1002
+ .sl-import-date-range-calendar .flatpickr-prev-year:hover,
1003
+ .sl-import-date-range-calendar .flatpickr-next-year:hover {
1004
1004
  color: var(--sl-color-primary);
1005
1005
  }
1006
1006
 
1007
- .sl-date-range-calendar .flatpickr-prev-month,
1008
- .sl-date-range-calendar .flatpickr-next-month {
1007
+ .sl-import-date-range-calendar .flatpickr-prev-month,
1008
+ .sl-import-date-range-calendar .flatpickr-next-month {
1009
1009
  padding: 0 !important;
1010
1010
  width: 28px;
1011
1011
  height: 28px;
@@ -1020,22 +1020,22 @@
1020
1020
  overflow: visible !important;
1021
1021
  }
1022
1022
 
1023
- .sl-date-range-calendar .flatpickr-prev-month {
1023
+ .sl-import-date-range-calendar .flatpickr-prev-month {
1024
1024
  left: 12px !important;
1025
1025
  }
1026
1026
 
1027
- .sl-date-range-calendar .flatpickr-next-month {
1027
+ .sl-import-date-range-calendar .flatpickr-next-month {
1028
1028
  right: 12px !important;
1029
1029
  }
1030
1030
 
1031
- .sl-date-range-calendar .flatpickr-prev-month:hover,
1032
- .sl-date-range-calendar .flatpickr-next-month:hover {
1031
+ .sl-import-date-range-calendar .flatpickr-prev-month:hover,
1032
+ .sl-import-date-range-calendar .flatpickr-next-month:hover {
1033
1033
  color: var(--sl-color-primary);
1034
1034
  }
1035
1035
 
1036
1036
  /* 隐藏 flatpickr 原始 SVG 箭头(已替换为 iconfont) */
1037
- .sl-date-range-calendar .flatpickr-prev-month svg,
1038
- .sl-date-range-calendar .flatpickr-next-month svg {
1037
+ .sl-import-date-range-calendar .flatpickr-prev-month svg,
1038
+ .sl-import-date-range-calendar .flatpickr-next-month svg {
1039
1039
  display: none !important;
1040
1040
  }
1041
1041
  .flatpickr-prev-month .iconfont,
@@ -1047,32 +1047,32 @@
1047
1047
  }
1048
1048
 
1049
1049
  /* 星期标题 */
1050
- .sl-date-range-calendar .flatpickr-weekdays {
1050
+ .sl-import-date-range-calendar .flatpickr-weekdays {
1051
1051
  padding: 0 4px;
1052
1052
  height: 36px;
1053
1053
  width: 622px !important; /* 311px * 2 */
1054
1054
  }
1055
1055
 
1056
- .sl-date-range-calendar .flatpickr-weekdaycontainer {
1056
+ .sl-import-date-range-calendar .flatpickr-weekdaycontainer {
1057
1057
  width: 311px !important;
1058
1058
  min-width: 311px !important;
1059
1059
  flex: none !important;
1060
1060
  }
1061
1061
 
1062
- .sl-date-range-calendar span.flatpickr-weekday {
1062
+ .sl-import-date-range-calendar span.flatpickr-weekday {
1063
1063
  font-size: var(--sl-font-size-base);
1064
1064
  color: var(--sl-text-color);
1065
1065
  font-weight:400;
1066
1066
  }
1067
1067
 
1068
1068
  /* 日期单元格 */
1069
- .sl-date-range-calendar .flatpickr-days {
1069
+ .sl-import-date-range-calendar .flatpickr-days {
1070
1070
  padding: 0 4px;
1071
1071
  width: 622px !important; /* 311px * 2 */
1072
1072
  overflow: visible !important;
1073
1073
  }
1074
1074
 
1075
- .sl-date-range-calendar .dayContainer {
1075
+ .sl-import-date-range-calendar .dayContainer {
1076
1076
  padding: 0 4px;
1077
1077
  width: 311px !important; /* (646 - 24px padding - 1px border) / 2 */
1078
1078
  min-width: 311px !important;
@@ -1085,7 +1085,7 @@
1085
1085
  }
1086
1086
 
1087
1087
  /* 外层包裹:占满一格宽度,提供 inRange 选中区间的背景色 */
1088
- .sl-day-cell {
1088
+ .sl-import-day-cell {
1089
1089
  display: flex;
1090
1090
  align-items: center;
1091
1091
  justify-content: center;
@@ -1096,7 +1096,7 @@
1096
1096
  }
1097
1097
 
1098
1098
  /* 内层 span:日期数字,选中时显示为圆形高亮 */
1099
- .sl-day-cell .flatpickr-day {
1099
+ .sl-import-day-cell .flatpickr-day {
1100
1100
  font-size: 14px;
1101
1101
  color: var(--sl-text-color);
1102
1102
  width: 24px;
@@ -1111,7 +1111,7 @@
1111
1111
  background:transparent;
1112
1112
  }
1113
1113
 
1114
- .sl-day-cell .flatpickr-day:hover {
1114
+ .sl-import-day-cell .flatpickr-day:hover {
1115
1115
  background: transparent !important;
1116
1116
  border-color: transparent !important;
1117
1117
  border: none !important;
@@ -1119,9 +1119,9 @@
1119
1119
  }
1120
1120
 
1121
1121
  /* 未确认范围时,去掉 flatpickr 默认给 startRange/endRange/inRange 加的背景和边框 */
1122
- .sl-date-range-calendar:not(.sl-range-confirmed) .sl-day-cell .flatpickr-day.startRange,
1123
- .sl-date-range-calendar:not(.sl-range-confirmed) .sl-day-cell .flatpickr-day.endRange,
1124
- .sl-date-range-calendar:not(.sl-range-confirmed) .sl-day-cell .flatpickr-day.inRange {
1122
+ .sl-import-date-range-calendar:not(.sl-import-range-confirmed) .sl-import-day-cell .flatpickr-day.startRange,
1123
+ .sl-import-date-range-calendar:not(.sl-import-range-confirmed) .sl-import-day-cell .flatpickr-day.endRange,
1124
+ .sl-import-date-range-calendar:not(.sl-import-range-confirmed) .sl-import-day-cell .flatpickr-day.inRange {
1125
1125
  background: transparent !important;
1126
1126
  border: none !important;
1127
1127
  box-shadow: none !important;
@@ -1129,64 +1129,64 @@
1129
1129
  }
1130
1130
 
1131
1131
  /* 未确认范围时,鼠标悬停在单元格上才显示主题色 */
1132
- .sl-date-range-calendar:not(.sl-range-confirmed) .sl-day-cell:hover .flatpickr-day {
1132
+ .sl-import-date-range-calendar:not(.sl-import-range-confirmed) .sl-import-day-cell:hover .flatpickr-day {
1133
1133
  color: var(--sl-color-primary) !important;
1134
1134
  }
1135
1135
 
1136
1136
  /* 未确认范围时,仅第一个选中的日期保留蓝色圆 */
1137
- .sl-date-range-calendar:not(.sl-range-confirmed) .sl-day-cell .flatpickr-day.selected {
1137
+ .sl-import-date-range-calendar:not(.sl-import-range-confirmed) .sl-import-day-cell .flatpickr-day.selected {
1138
1138
  background: var(--sl-color-primary) !important;
1139
1139
  color: var(--sl-color-white) !important;
1140
1140
  border-radius: 50% !important;
1141
1141
  }
1142
1142
 
1143
1143
  /* 今天:蓝色文字 */
1144
- .sl-day-cell .flatpickr-day.today {
1144
+ .sl-import-day-cell .flatpickr-day.today {
1145
1145
  border: none;
1146
1146
  color: var(--sl-color-primary);
1147
1147
  font-weight: 600;
1148
1148
  }
1149
1149
 
1150
- .sl-day-cell .flatpickr-day.today:not(.selected):not(.startRange):not(.endRange) {
1150
+ .sl-import-day-cell .flatpickr-day.today:not(.selected):not(.startRange):not(.endRange) {
1151
1151
  color: var(--sl-color-primary);
1152
1152
  font-weight: 600;
1153
1153
  }
1154
1154
  /* 悬停时的 inRange(未确认范围):仅改变字体颜色,不显示灰色背景带 */
1155
- .sl-day-cell:has(.flatpickr-day.inRange) .flatpickr-day {
1155
+ .sl-import-day-cell:has(.flatpickr-day.inRange) .flatpickr-day {
1156
1156
  box-shadow: none ;
1157
1157
  }
1158
1158
 
1159
1159
  /* 已确认范围:显示灰色背景带 */
1160
- .sl-range-confirmed .sl-day-cell:has(.flatpickr-day.inRange) {
1160
+ .sl-import-range-confirmed .sl-import-day-cell:has(.flatpickr-day.inRange) {
1161
1161
  background: var(--sl-border-color-light);
1162
1162
  }
1163
1163
 
1164
- .sl-range-confirmed .sl-day-cell:has(.flatpickr-day.inRange) .flatpickr-day:hover {
1164
+ .sl-import-range-confirmed .sl-import-day-cell:has(.flatpickr-day.inRange) .flatpickr-day:hover {
1165
1165
  color: var(--sl-color-primary) !important;
1166
1166
  }
1167
1167
 
1168
1168
  /* 开始日期:仅在范围确认后显示灰色背景带 */
1169
- .sl-range-confirmed .sl-day-cell:has(.flatpickr-day.startRange) {
1169
+ .sl-import-range-confirmed .sl-import-day-cell:has(.flatpickr-day.startRange) {
1170
1170
  background: var(--sl-border-color-light);
1171
1171
  border-top-left-radius: 50%;
1172
1172
  border-bottom-left-radius: 50%;
1173
1173
  }
1174
1174
 
1175
- .sl-range-confirmed .sl-day-cell:has(.flatpickr-day.startRange.endRange) {
1175
+ .sl-import-range-confirmed .sl-import-day-cell:has(.flatpickr-day.startRange.endRange) {
1176
1176
  background: transparent;
1177
1177
  }
1178
1178
 
1179
1179
  /* 结束日期:仅在范围确认后显示灰色背景带 */
1180
- .sl-range-confirmed .sl-day-cell:has(.flatpickr-day.endRange) {
1180
+ .sl-import-range-confirmed .sl-import-day-cell:has(.flatpickr-day.endRange) {
1181
1181
  background: var(--sl-border-color-light);
1182
1182
  border-top-right-radius: 50%;
1183
1183
  border-bottom-right-radius: 50%;
1184
1184
  }
1185
1185
 
1186
1186
  /* 选中的开始和结束日期:蓝色实心圆 */
1187
- .sl-day-cell .flatpickr-day.selected,
1188
- .sl-day-cell .flatpickr-day.startRange,
1189
- .sl-day-cell .flatpickr-day.endRange {
1187
+ .sl-import-day-cell .flatpickr-day.selected,
1188
+ .sl-import-day-cell .flatpickr-day.startRange,
1189
+ .sl-import-day-cell .flatpickr-day.endRange {
1190
1190
  background: var(--sl-color-primary) !important;
1191
1191
  border-color: var(--sl-color-primary) !important;
1192
1192
  color: var(--sl-color-white) !important;
@@ -1194,20 +1194,20 @@
1194
1194
  box-shadow: none !important;
1195
1195
  }
1196
1196
  /* 禁用日期 */
1197
- .sl-day-cell .flatpickr-day.flatpickr-disabled {
1197
+ .sl-import-day-cell .flatpickr-day.flatpickr-disabled {
1198
1198
  color: var(--sl-text-color-disabled);
1199
1199
  cursor: not-allowed;
1200
1200
  opacity: 1;
1201
1201
  }
1202
1202
 
1203
- .sl-day-cell .flatpickr-day.flatpickr-disabled:hover {
1203
+ .sl-import-day-cell .flatpickr-day.flatpickr-disabled:hover {
1204
1204
  background: transparent !important;
1205
1205
  border-color: transparent !important;
1206
1206
  cursor: not-allowed;
1207
1207
  }
1208
1208
 
1209
- .sl-day-cell .flatpickr-day.prevMonthDay,
1210
- .sl-day-cell .flatpickr-day.nextMonthDay {
1209
+ .sl-import-day-cell .flatpickr-day.prevMonthDay,
1210
+ .sl-import-day-cell .flatpickr-day.nextMonthDay {
1211
1211
  color: #c0c4cc;
1212
1212
  }
1213
1213
  .flatpickr-day.nextMonthDay.inRange,.flatpickr-day.preMonthDay.inRange{
@@ -1216,7 +1216,7 @@
1216
1216
  }
1217
1217
 
1218
1218
  /* ============ 多文件上传列表样式 - 横向滚动 ============ */
1219
- .import-dialog-vanilla-file-list {
1219
+ .sl-import-dialog-vanilla-file-list {
1220
1220
  display: flex;
1221
1221
  flex-direction: row;
1222
1222
  gap: 12px;
@@ -1226,24 +1226,24 @@
1226
1226
  scrollbar-width: thin;
1227
1227
  }
1228
1228
 
1229
- .import-dialog-vanilla-file-list::-webkit-scrollbar {
1229
+ .sl-import-dialog-vanilla-file-list::-webkit-scrollbar {
1230
1230
  height: 6px;
1231
1231
  }
1232
1232
 
1233
- .import-dialog-vanilla-file-list::-webkit-scrollbar-track {
1233
+ .sl-import-dialog-vanilla-file-list::-webkit-scrollbar-track {
1234
1234
  background: transparent;
1235
1235
  }
1236
1236
 
1237
- .import-dialog-vanilla-file-list::-webkit-scrollbar-thumb {
1237
+ .sl-import-dialog-vanilla-file-list::-webkit-scrollbar-thumb {
1238
1238
  background: #d9d9d9;
1239
1239
  border-radius: 3px;
1240
1240
  }
1241
1241
 
1242
- .import-dialog-vanilla-file-list::-webkit-scrollbar-thumb:hover {
1242
+ .sl-import-dialog-vanilla-file-list::-webkit-scrollbar-thumb:hover {
1243
1243
  background: #bfbfbf;
1244
1244
  }
1245
1245
 
1246
- .import-dialog-vanilla-file-item {
1246
+ .sl-import-dialog-vanilla-file-item {
1247
1247
  position: relative;
1248
1248
  display: flex;
1249
1249
  flex-direction: row;
@@ -1259,27 +1259,27 @@
1259
1259
  cursor: default;
1260
1260
  transition: all 0.2s;
1261
1261
  }
1262
- .import-dialog-vanilla-file-item.width-100{
1262
+ .sl-import-dialog-vanilla-file-item.width-100{
1263
1263
  width:100%;
1264
1264
  }
1265
1265
 
1266
- .import-dialog-vanilla-file-item.status-error {
1266
+ .sl-import-dialog-vanilla-file-item.status-error {
1267
1267
  background: var(--sl-color-danger-light-9);
1268
1268
  border:1px solid var(--sl-color-error);
1269
1269
  }
1270
- .import-dialog-vanilla-file-icon {
1270
+ .sl-import-dialog-vanilla-file-icon {
1271
1271
  width: 18px;
1272
1272
  height: 18px;
1273
1273
  display: flex;
1274
1274
  align-items: center;
1275
1275
  }
1276
1276
 
1277
- .import-dialog-vanilla-file-icon svg {
1277
+ .sl-import-dialog-vanilla-file-icon svg {
1278
1278
  width: 32px;
1279
1279
  height: 32px;
1280
1280
  }
1281
1281
 
1282
- .import-dialog-vanilla-file-info {
1282
+ .sl-import-dialog-vanilla-file-info {
1283
1283
  flex: 1;
1284
1284
  min-width: 0;
1285
1285
  display: flex;
@@ -1287,7 +1287,7 @@
1287
1287
  gap: 2px;
1288
1288
  }
1289
1289
 
1290
- .import-dialog-vanilla-file-name {
1290
+ .sl-import-dialog-vanilla-file-name {
1291
1291
  font-size: 13px;
1292
1292
  color: var(--sl-text-color);
1293
1293
  white-space: nowrap;
@@ -1297,7 +1297,7 @@
1297
1297
  width:144px;
1298
1298
  }
1299
1299
 
1300
- .import-dialog-vanilla-file-meta {
1300
+ .sl-import-dialog-vanilla-file-meta {
1301
1301
  display: flex;
1302
1302
  align-items: center;
1303
1303
  gap: 4px;
@@ -1306,13 +1306,13 @@
1306
1306
  }
1307
1307
 
1308
1308
 
1309
- .import-dialog-vanilla-file-error-text {
1309
+ .sl-import-dialog-vanilla-file-error-text {
1310
1310
  font-size: 12px;
1311
1311
  color: var(--sl-color-error);
1312
1312
  }
1313
1313
 
1314
1314
  /* 上传中状态的 loading 图标 */
1315
- .import-dialog-vanilla-file-loading-icon {
1315
+ .sl-import-dialog-vanilla-file-loading-icon {
1316
1316
  position: absolute;
1317
1317
  top: 8px;
1318
1318
  left: 8px;
@@ -1323,7 +1323,7 @@
1323
1323
  justify-content: center;
1324
1324
  }
1325
1325
 
1326
- .loading-spinner {
1326
+ .sl-loading-spinner {
1327
1327
  width: 24px;
1328
1328
  height: 24px;
1329
1329
  border-radius: 50%;
@@ -1335,7 +1335,7 @@
1335
1335
  position: relative;
1336
1336
  }
1337
1337
 
1338
- .loading-spinner::before {
1338
+ .sl-loading-spinner::before {
1339
1339
  content: '';
1340
1340
  width: 18px;
1341
1341
  height: 18px;
@@ -1350,12 +1350,12 @@
1350
1350
  }
1351
1351
 
1352
1352
  /* 上传中状态的文件信息向右偏移 */
1353
- .import-dialog-vanilla-file-item.status-uploading .import-dialog-vanilla-file-info {
1353
+ .sl-import-dialog-vanilla-file-item.status-uploading .sl-import-dialog-vanilla-file-info {
1354
1354
  margin-left: 32px;
1355
1355
  }
1356
1356
 
1357
1357
  /* 删除按钮 - 默认隐藏,hover时显示 */
1358
- .import-dialog-vanilla-file-remove-btn {
1358
+ .sl-import-dialog-vanilla-file-remove-btn {
1359
1359
  position: absolute;
1360
1360
  top: 2px;
1361
1361
  right: 2px;
@@ -1371,17 +1371,17 @@
1371
1371
  z-index: 1;
1372
1372
  }
1373
1373
 
1374
- .import-dialog-vanilla-file-item:hover .import-dialog-vanilla-file-remove-btn {
1374
+ .sl-import-dialog-vanilla-file-item:hover .sl-import-dialog-vanilla-file-remove-btn {
1375
1375
  opacity: 1;
1376
1376
  }
1377
1377
 
1378
- .import-dialog-vanilla-file-remove-btn svg {
1378
+ .sl-import-dialog-vanilla-file-remove-btn svg {
1379
1379
  width: 14px;
1380
1380
  height: 14px;
1381
1381
  }
1382
1382
 
1383
1383
  /* 全局遮罩 Loading */
1384
- .import-dialog-vanilla-loading-overlay {
1384
+ .sl-import-dialog-vanilla-loading-overlay {
1385
1385
  position: absolute;
1386
1386
  top: 0;
1387
1387
  left: 0;
@@ -1394,7 +1394,7 @@
1394
1394
  z-index: 1000;
1395
1395
  }
1396
1396
 
1397
- .import-dialog-vanilla-loading-spinner {
1397
+ .sl-import-dialog-vanilla-loading-spinner {
1398
1398
  width: 32px;
1399
1399
  height: 32px;
1400
1400
  border-radius: 50%;
@@ -1406,7 +1406,7 @@
1406
1406
  position: relative;
1407
1407
  }
1408
1408
 
1409
- .import-dialog-vanilla-loading-spinner::before {
1409
+ .sl-import-dialog-vanilla-loading-spinner::before {
1410
1410
  content: '';
1411
1411
  width: 24px;
1412
1412
  height: 24px;
@@ -1419,17 +1419,17 @@
1419
1419
  <span class='flatpickr-weekday'>
1420
1420
  `+i.join("</span><span class='flatpickr-weekday'>")+`
1421
1421
  </span>
1422
- `}}function Vt(){e.calendarContainer.classList.add("hasWeeks");var n=U("div","flatpickr-weekwrapper");n.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));var i=U("div","flatpickr-weeks");return n.appendChild(i),{weekWrapper:n,weekNumbers:i}}function Ke(n,i){i===void 0&&(i=!0);var d=i?n:n-e.currentMonth;d<0&&e._hidePrevMonthArrow===!0||d>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=d,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,j("onYearChange"),Z()),Q(),j("onMonthChange"),Le())}function _t(n,i){if(n===void 0&&(n=!0),i===void 0&&(i=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,i===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var d=je(e.config),f=d.hours,v=d.minutes,x=d.seconds;I(f,v,x)}e.redraw(),n&&j("onChange")}function Zt(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),j("onClose")}function Xt(){e.config!==void 0&&j("onDestroy");for(var n=e._handlers.length;n--;)e._handlers[n].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var i=e.calendarContainer.parentNode;if(i.lastChild&&i.removeChild(i.lastChild),i.parentNode){for(;i.firstChild;)i.parentNode.insertBefore(i.firstChild,i);i.parentNode.removeChild(i)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(d){try{delete e[d]}catch{}})}function ye(n){return e.calendarContainer.contains(n)}function We(n){if(e.isOpen&&!e.config.inline){var i=ee(n),d=ye(i),f=i===e.input||i===e.altInput||e.element.contains(i)||n.path&&n.path.indexOf&&(~n.path.indexOf(e.input)||~n.path.indexOf(e.altInput)),v=!f&&!d&&!ye(n.relatedTarget),x=!e.config.ignoredFocusElements.some(function(A){return A.contains(i)});v&&x&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&b(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function Se(n){if(!(!n||e.config.minDate&&n<e.config.minDate.getFullYear()||e.config.maxDate&&n>e.config.maxDate.getFullYear())){var i=n,d=e.currentYear!==i;e.currentYear=i||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),d&&(e.redraw(),j("onYearChange"),Z())}}function ue(n,i){var d;i===void 0&&(i=!0);var f=e.parseDate(n,void 0,i);if(e.config.minDate&&f&&te(f,e.config.minDate,i!==void 0?i:!e.minDateHasTime)<0||e.config.maxDate&&f&&te(f,e.config.maxDate,i!==void 0?i:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(f===void 0)return!1;for(var v=!!e.config.enable,x=(d=e.config.enable)!==null&&d!==void 0?d:e.config.disable,A=0,k=void 0;A<x.length;A++){if(k=x[A],typeof k=="function"&&k(f))return v;if(k instanceof Date&&f!==void 0&&k.getTime()===f.getTime())return v;if(typeof k=="string"){var O=e.parseDate(k,void 0,!0);return O&&O.getTime()===f.getTime()?v:!v}else if(typeof k=="object"&&f!==void 0&&k.from&&k.to&&f.getTime()>=k.from.getTime()&&f.getTime()<=k.to.getTime())return v}return!v}function Ee(n){return e.daysContainer!==void 0?n.className.indexOf("hidden")===-1&&n.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(n):!1}function Qt(n){var i=n.target===e._input,d=e._input.value.trimEnd()!==_e();i&&d&&!(n.relatedTarget&&ye(n.relatedTarget))&&e.setDate(e._input.value,!0,n.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function dt(n){var i=ee(n),d=e.config.wrap?o.contains(i):i===e._input,f=e.config.allowInput,v=e.isOpen&&(!f||!d),x=e.config.inline&&d&&!f;if(n.keyCode===13&&d){if(f)return e.setDate(e._input.value,!0,i===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),i.blur();e.open()}else if(ye(i)||v||x){var A=!!e.timeContainer&&e.timeContainer.contains(i);switch(n.keyCode){case 13:A?(n.preventDefault(),b(),Je()):mt(n);break;case 27:n.preventDefault(),Je();break;case 8:case 46:d&&!e.config.allowInput&&(n.preventDefault(),e.clear());break;case 37:case 39:if(!A&&!d){n.preventDefault();var k=c();if(e.daysContainer!==void 0&&(f===!1||k&&Ee(k))){var O=n.keyCode===39?1:-1;n.ctrlKey?(n.stopPropagation(),Ke(O),N(_(1),0)):N(void 0,O)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:n.preventDefault();var w=n.keyCode===40?1:-1;e.daysContainer&&i.$i!==void 0||i===e.input||i===e.altInput?n.ctrlKey?(n.stopPropagation(),Se(e.currentYear-w),N(_(1),0)):A||N(void 0,w*7):i===e.currentYearElement?Se(e.currentYear-w):e.config.enableTime&&(!A&&e.hourElement&&e.hourElement.focus(),b(n),e._debouncedChange());break;case 9:if(A){var E=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(ae){return ae}),z=E.indexOf(i);if(z!==-1){var ie=E[z+(n.shiftKey?-1:1)];n.preventDefault(),(ie||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(i)&&n.shiftKey&&(n.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&i===e.amPM)switch(n.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],D(),oe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],D(),oe();break}(d||ye(i))&&j("onKeyDown",n)}function Fe(n,i){if(i===void 0&&(i="flatpickr-day"),!(e.selectedDates.length!==1||n&&(!n.classList.contains(i)||n.classList.contains("flatpickr-disabled")))){for(var d=n?n.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),f=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),v=Math.min(d,e.selectedDates[0].getTime()),x=Math.max(d,e.selectedDates[0].getTime()),A=!1,k=0,O=0,w=v;w<x;w+=Mt.DAY)ue(new Date(w),!0)||(A=A||w>v&&w<x,w<f&&(!k||w>k)?k=w:w>f&&(!O||w<O)&&(O=w));var E=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+i));E.forEach(function(z){var ie=z.dateObj,ae=ie.getTime(),we=k>0&&ae<k||O>0&&ae>O;if(we){z.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(he){z.classList.remove(he)});return}else if(A&&!we)return;["startRange","inRange","endRange","notAllowed"].forEach(function(he){z.classList.remove(he)}),n!==void 0&&(n.classList.add(d<=e.selectedDates[0].getTime()?"startRange":"endRange"),f<d&&ae===f?z.classList.add("startRange"):f>d&&ae===f&&z.classList.add("endRange"),ae>=k&&(O===0||ae<=O)&&Dt(ae,f,d)&&z.classList.add("inRange"))})}}function $t(){e.isOpen&&!e.config.static&&!e.config.inline&&Ie()}function ea(n,i){if(i===void 0&&(i=e._positionElement),e.isMobile===!0){if(n){n.preventDefault();var d=ee(n);d&&d.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),j("onOpen");return}else if(e._input.disabled||e.config.inline)return;var f=e.isOpen;e.isOpen=!0,f||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),j("onOpen"),Ie(i)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(n===void 0||!e.timeContainer.contains(n.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function ct(n){return function(i){var d=e.config["_"+n+"Date"]=e.parseDate(i,e.config.dateFormat),f=e.config["_"+(n==="min"?"max":"min")+"Date"];d!==void 0&&(e[n==="min"?"minDateHasTime":"maxDateHasTime"]=d.getHours()>0||d.getMinutes()>0||d.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(v){return ue(v)}),!e.selectedDates.length&&n==="min"&&C(d),oe()),e.daysContainer&&(ft(),d!==void 0?e.currentYearElement[n]=d.getFullYear().toString():e.currentYearElement.removeAttribute(n),e.currentYearElement.disabled=!!f&&d!==void 0&&f.getFullYear()===d.getFullYear())}}function ta(){var n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=V(V({},JSON.parse(JSON.stringify(o.dataset||{}))),t),d={};e.config.parseDate=i.parseDate,e.config.formatDate=i.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(E){e.config._enable=ht(E)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(E){e.config._disable=ht(E)}});var f=i.mode==="time";if(!i.dateFormat&&(i.enableTime||f)){var v=B.defaultConfig.dateFormat||fe.dateFormat;d.dateFormat=i.noCalendar||f?"H:i"+(i.enableSeconds?":S":""):v+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||f)&&!i.altFormat){var x=B.defaultConfig.altFormat||fe.altFormat;d.altFormat=i.noCalendar||f?"h:i"+(i.enableSeconds?":S K":" K"):x+(" h:i"+(i.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:ct("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:ct("max")});var A=function(E){return function(z){e.config[E==="min"?"_minTime":"_maxTime"]=e.parseDate(z,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:A("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:A("max")}),i.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,d,i);for(var k=0;k<n.length;k++)e.config[n[k]]=e.config[n[k]]===!0||e.config[n[k]]==="true";Pe.filter(function(E){return e.config[E]!==void 0}).forEach(function(E){e.config[E]=Ue(e.config[E]||[]).map(h)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var k=0;k<e.config.plugins.length;k++){var O=e.config.plugins[k](e)||{};for(var w in O)Pe.indexOf(w)>-1?e.config[w]=Ue(O[w]).map(h).concat(e.config[w]):typeof i[w]>"u"&&(e.config[w]=O[w])}i.altInputClass||(e.config.altInputClass=pt().className+" "+e.config.altInputClass),j("onParseConfig")}function pt(){return e.config.wrap?o.querySelector("[data-input]"):o}function ut(){typeof e.config.locale!="object"&&typeof B.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=V(V({},B.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?B.l10ns[e.config.locale]:void 0),pe.D="("+e.l10n.weekdays.shorthand.join("|")+")",pe.l="("+e.l10n.weekdays.longhand.join("|")+")",pe.M="("+e.l10n.months.shorthand.join("|")+")",pe.F="("+e.l10n.months.longhand.join("|")+")",pe.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var n=V(V({},t),JSON.parse(JSON.stringify(o.dataset||{})));n.time_24hr===void 0&&B.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=tt(e),e.parseDate=ze({config:e.config,l10n:e.l10n})}function Ie(n){if(typeof e.config.position=="function")return void e.config.position(e,n);if(e.calendarContainer!==void 0){j("onPreCalendarPosition");var i=n||e._positionElement,d=Array.prototype.reduce.call(e.calendarContainer.children,function(ya,wa){return ya+wa.offsetHeight},0),f=e.calendarContainer.offsetWidth,v=e.config.position.split(" "),x=v[0],A=v.length>1?v[1]:null,k=i.getBoundingClientRect(),O=window.innerHeight-k.bottom,w=x==="above"||x!=="below"&&O<d&&k.top>d,E=window.pageYOffset+k.top+(w?-d-2:i.offsetHeight+2);if(X(e.calendarContainer,"arrowTop",!w),X(e.calendarContainer,"arrowBottom",w),!e.config.inline){var z=window.pageXOffset+k.left,ie=!1,ae=!1;A==="center"?(z-=(f-k.width)/2,ie=!0):A==="right"&&(z-=f-k.width,ae=!0),X(e.calendarContainer,"arrowLeft",!ie&&!ae),X(e.calendarContainer,"arrowCenter",ie),X(e.calendarContainer,"arrowRight",ae);var we=window.document.body.offsetWidth-(window.pageXOffset+k.right),he=z+f>window.document.body.offsetWidth,fa=we+f>window.document.body.offsetWidth;if(X(e.calendarContainer,"rightMost",he),!e.config.static)if(e.calendarContainer.style.top=E+"px",!he)e.calendarContainer.style.left=z+"px",e.calendarContainer.style.right="auto";else if(!fa)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=we+"px";else{var Ze=aa();if(Ze===void 0)return;var ma=window.document.body.offsetWidth,ga=Math.max(0,ma/2-f/2),ha=".flatpickr-calendar.centerMost:before",va=".flatpickr-calendar.centerMost:after",ba=Ze.cssRules.length,xa="{left:"+k.left+"px;right:auto;}";X(e.calendarContainer,"rightMost",!1),X(e.calendarContainer,"centerMost",!0),Ze.insertRule(ha+","+va+xa,ba),e.calendarContainer.style.left=ga+"px",e.calendarContainer.style.right="auto"}}}}function aa(){for(var n=null,i=0;i<document.styleSheets.length;i++){var d=document.styleSheets[i];if(d.cssRules){try{d.cssRules}catch{continue}n=d;break}}return n??na()}function na(){var n=document.createElement("style");return document.head.appendChild(n),n.sheet}function ft(){e.config.noCalendar||e.isMobile||(Z(),Le(),Q())}function Je(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function mt(n){n.preventDefault(),n.stopPropagation();var i=function(E){return E.classList&&E.classList.contains("flatpickr-day")&&!E.classList.contains("flatpickr-disabled")&&!E.classList.contains("notAllowed")},d=et(ee(n),i);if(d!==void 0){var f=d,v=e.latestSelectedDateObj=new Date(f.dateObj.getTime()),x=(v.getMonth()<e.currentMonth||v.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=f,e.config.mode==="single")e.selectedDates=[v];else if(e.config.mode==="multiple"){var A=Ve(v);A?e.selectedDates.splice(parseInt(A),1):e.selectedDates.push(v)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=v,e.selectedDates.push(v),te(v,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(E,z){return E.getTime()-z.getTime()}));if(D(),x){var k=e.currentYear!==v.getFullYear();e.currentYear=v.getFullYear(),e.currentMonth=v.getMonth(),k&&(j("onYearChange"),Z()),j("onMonthChange")}if(Le(),Q(),oe(),!x&&e.config.mode!=="range"&&e.config.showMonths===1?Y(f):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var O=e.config.mode==="single"&&!e.config.enableTime,w=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(O||w)&&Je()}g()}}var Ae={locale:[ut,xe],showMonths:[Me,m,J],minDate:[l],maxDate:[l],positionElement:[vt],clickOpens:[function(){e.config.clickOpens===!0?(p(e._input,"focus",e.open),p(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function ia(n,i){if(n!==null&&typeof n=="object"){Object.assign(e.config,n);for(var d in n)Ae[d]!==void 0&&Ae[d].forEach(function(f){return f()})}else e.config[n]=i,Ae[n]!==void 0?Ae[n].forEach(function(f){return f()}):Pe.indexOf(n)>-1&&(e.config[n]=Ue(i));e.redraw(),oe(!0)}function gt(n,i){var d=[];if(n instanceof Array)d=n.map(function(f){return e.parseDate(f,i)});else if(n instanceof Date||typeof n=="number")d=[e.parseDate(n,i)];else if(typeof n=="string")switch(e.config.mode){case"single":case"time":d=[e.parseDate(n,i)];break;case"multiple":d=n.split(e.config.conjunction).map(function(f){return e.parseDate(f,i)});break;case"range":d=n.split(e.l10n.rangeSeparator).map(function(f){return e.parseDate(f,i)});break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(n)));e.selectedDates=e.config.allowInvalidPreload?d:d.filter(function(f){return f instanceof Date&&ue(f,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(f,v){return f.getTime()-v.getTime()})}function oa(n,i,d){if(i===void 0&&(i=!1),d===void 0&&(d=e.config.dateFormat),n!==0&&!n||n instanceof Array&&n.length===0)return e.clear(i);gt(n,d),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),l(void 0,i),C(),e.selectedDates.length===0&&e.clear(!1),oe(i),i&&j("onChange")}function ht(n){return n.slice().map(function(i){return typeof i=="string"||typeof i=="number"||i instanceof Date?e.parseDate(i,void 0,!0):i&&typeof i=="object"&&i.from&&i.to?{from:e.parseDate(i.from,void 0),to:e.parseDate(i.to,void 0)}:i}).filter(function(i){return i})}function ra(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var n=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);n&&gt(n,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function la(){if(e.input=pt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=U(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),vt()}function vt(){e._positionElement=e.config.positionElement||e._input}function sa(){var n=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=U("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=n,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=n==="datetime-local"?"Y-m-d\\TH:i:S":n==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}p(e.mobileInput,"change",function(i){e.setDate(ee(i).value,!1,e.mobileFormatStr),j("onChange"),j("onClose")})}function da(n){if(e.isOpen===!0)return e.close();e.open(n)}function j(n,i){if(e.config!==void 0){var d=e.config[n];if(d!==void 0&&d.length>0)for(var f=0;d[f]&&f<d.length;f++)d[f](e.selectedDates,e.input.value,e,i);n==="onChange"&&(e.input.dispatchEvent(Ge("change")),e.input.dispatchEvent(Ge("input")))}}function Ge(n){var i=document.createEvent("Event");return i.initEvent(n,!0,!0),i}function Ve(n){for(var i=0;i<e.selectedDates.length;i++){var d=e.selectedDates[i];if(d instanceof Date&&te(d,n)===0)return""+i}return!1}function ca(n){return e.config.mode!=="range"||e.selectedDates.length<2?!1:te(n,e.selectedDates[0])>=0&&te(n,e.selectedDates[1])<=0}function Le(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(n,i){var d=new Date(e.currentYear,e.currentMonth,1);d.setMonth(e.currentMonth+i),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[i].textContent=De(d.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=d.getMonth().toString(),n.value=d.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function _e(n){var i=n||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(d){return e.formatDate(d,i)}).filter(function(d,f,v){return e.config.mode!=="range"||e.config.enableTime||v.indexOf(d)===f}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function oe(n){n===void 0&&(n=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=_e(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=_e(e.config.altFormat)),n!==!1&&j("onValueUpdate")}function pa(n){var i=ee(n),d=e.prevMonthNav.contains(i),f=e.nextMonthNav.contains(i);d||f?Ke(d?-1:1):e.yearElements.indexOf(i)>=0?i.select():i.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):i.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function ua(n){n.preventDefault();var i=n.type==="keydown",d=ee(n),f=d;e.amPM!==void 0&&d===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ne(e.amPM.textContent===e.l10n.amPM[0])]);var v=parseFloat(f.getAttribute("min")),x=parseFloat(f.getAttribute("max")),A=parseFloat(f.getAttribute("step")),k=parseInt(f.value,10),O=n.delta||(i?n.which===38?1:-1:0),w=k+A*O;if(typeof f.value<"u"&&f.value.length===2){var E=f===e.hourElement,z=f===e.minuteElement;w<v?(w=x+w+ne(!E)+(ne(E)&&ne(!e.amPM)),z&&T(void 0,-1,e.hourElement)):w>x&&(w=f===e.hourElement?w-x-ne(!e.amPM):v,z&&T(void 0,1,e.hourElement)),e.amPM&&E&&(A===1?w+k===23:Math.abs(w-k)>A)&&(e.amPM.textContent=e.l10n.amPM[ne(e.amPM.textContent===e.l10n.amPM[0])]),f.value=$(w)}}return r(),e}function me(o,t){for(var e=Array.prototype.slice.call(o).filter(function(h){return h instanceof HTMLElement}),a=[],r=0;r<e.length;r++){var c=e[r];try{if(c.getAttribute("data-fp-omit")!==null)continue;c._flatpickr!==void 0&&(c._flatpickr.destroy(),c._flatpickr=void 0),c._flatpickr=Et(c,t||{}),a.push(c._flatpickr)}catch(h){console.error(h)}}return a.length===1?a[0]:a}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(o){return me(this,o)},HTMLElement.prototype.flatpickr=function(o){return me([this],o)});var B=function(o,t){return typeof o=="string"?me(window.document.querySelectorAll(o),t):o instanceof Node?me([o],t):me(o,t)};B.defaultConfig={},B.l10ns={en:V({},ve),default:V({},ve)},B.localize=function(o){B.l10ns.default=V(V({},B.l10ns.default),o)},B.setDefaults=function(o){B.defaultConfig=V(V({},B.defaultConfig),o)},B.parseDate=ze({}),B.formatDate=tt({}),B.compareDates=te,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(o){return me(this,o)}),Date.prototype.fp_incr=function(o){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof o=="string"?parseInt(o,10):o))},typeof window<"u"&&(window.flatpickr=B);var Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function It(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var He={exports:{}};(function(o,t){(function(e,a){a(t)})(Ft,function(e){var a=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["周日","周一","周二","周三","周四","周五","周六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"周",scrollTitle:"滚动切换",toggleTitle:"点击切换 12/24 小时时制"};a.l10ns.zh=r;var c=a.l10ns;e.Mandarin=r,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})})})(He,He.exports);var At=He.exports;const Lt={...At.Mandarin,weekdays:{shorthand:["日","一","二","三","四","五","六"],longhand:["日","一","二","三","四","五","六"]}};class Ot{constructor(t){S(this,"container");S(this,"startInput");S(this,"endInput");S(this,"fpInstance",null);S(this,"selectedDates",[null,null]);S(this,"onChange");S(this,"placeholder");S(this,"shortcuts");S(this,"disabledDate");S(this,"activeShortcutIndex",-1);S(this,"isShortcutTriggered",!1);S(this,"scrollHandler",null);S(this,"scrollParents",[]);this.container=t.container,this.selectedDates=t.defaultDates||[null,null],this.onChange=t.onChange,this.placeholder=t.placeholder||["Start date","End date"],this.shortcuts=t.shortcuts||[],this.disabledDate=t.disabledDate,this.render(),this.initFlatpickr()}render(){this.container.innerHTML="",this.container.className="sl-date-range-picker",this.startInput=document.createElement("input"),this.startInput.type="text",this.startInput.className="sl-date-range-input",this.startInput.placeholder=this.placeholder[0],this.startInput.readOnly=!0,this.selectedDates[0]&&(this.startInput.value=this.formatDate(this.selectedDates[0]));const t=document.createElement("span");t.className="sl-date-range-separator",t.textContent="To",this.endInput=document.createElement("input"),this.endInput.type="text",this.endInput.className="sl-date-range-input",this.endInput.placeholder=this.placeholder[1],this.endInput.readOnly=!0,this.selectedDates[1]&&(this.endInput.value=this.formatDate(this.selectedDates[1]));const e=document.createElement("span");e.className="sl-date-range-icon",e.innerHTML=`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1422
+ `}}function Vt(){e.calendarContainer.classList.add("hasWeeks");var n=U("div","flatpickr-weekwrapper");n.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));var i=U("div","flatpickr-weeks");return n.appendChild(i),{weekWrapper:n,weekNumbers:i}}function Ke(n,i){i===void 0&&(i=!0);var d=i?n:n-e.currentMonth;d<0&&e._hidePrevMonthArrow===!0||d>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=d,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,j("onYearChange"),Z()),Q(),j("onMonthChange"),Le())}function _t(n,i){if(n===void 0&&(n=!0),i===void 0&&(i=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,i===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var d=je(e.config),f=d.hours,v=d.minutes,x=d.seconds;I(f,v,x)}e.redraw(),n&&j("onChange")}function Zt(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),j("onClose")}function Xt(){e.config!==void 0&&j("onDestroy");for(var n=e._handlers.length;n--;)e._handlers[n].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var i=e.calendarContainer.parentNode;if(i.lastChild&&i.removeChild(i.lastChild),i.parentNode){for(;i.firstChild;)i.parentNode.insertBefore(i.firstChild,i);i.parentNode.removeChild(i)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(d){try{delete e[d]}catch{}})}function ye(n){return e.calendarContainer.contains(n)}function We(n){if(e.isOpen&&!e.config.inline){var i=ee(n),d=ye(i),f=i===e.input||i===e.altInput||e.element.contains(i)||n.path&&n.path.indexOf&&(~n.path.indexOf(e.input)||~n.path.indexOf(e.altInput)),v=!f&&!d&&!ye(n.relatedTarget),x=!e.config.ignoredFocusElements.some(function(A){return A.contains(i)});v&&x&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&b(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function Se(n){if(!(!n||e.config.minDate&&n<e.config.minDate.getFullYear()||e.config.maxDate&&n>e.config.maxDate.getFullYear())){var i=n,d=e.currentYear!==i;e.currentYear=i||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),d&&(e.redraw(),j("onYearChange"),Z())}}function ue(n,i){var d;i===void 0&&(i=!0);var f=e.parseDate(n,void 0,i);if(e.config.minDate&&f&&te(f,e.config.minDate,i!==void 0?i:!e.minDateHasTime)<0||e.config.maxDate&&f&&te(f,e.config.maxDate,i!==void 0?i:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(f===void 0)return!1;for(var v=!!e.config.enable,x=(d=e.config.enable)!==null&&d!==void 0?d:e.config.disable,A=0,k=void 0;A<x.length;A++){if(k=x[A],typeof k=="function"&&k(f))return v;if(k instanceof Date&&f!==void 0&&k.getTime()===f.getTime())return v;if(typeof k=="string"){var O=e.parseDate(k,void 0,!0);return O&&O.getTime()===f.getTime()?v:!v}else if(typeof k=="object"&&f!==void 0&&k.from&&k.to&&f.getTime()>=k.from.getTime()&&f.getTime()<=k.to.getTime())return v}return!v}function Ee(n){return e.daysContainer!==void 0?n.className.indexOf("hidden")===-1&&n.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(n):!1}function Qt(n){var i=n.target===e._input,d=e._input.value.trimEnd()!==_e();i&&d&&!(n.relatedTarget&&ye(n.relatedTarget))&&e.setDate(e._input.value,!0,n.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function dt(n){var i=ee(n),d=e.config.wrap?o.contains(i):i===e._input,f=e.config.allowInput,v=e.isOpen&&(!f||!d),x=e.config.inline&&d&&!f;if(n.keyCode===13&&d){if(f)return e.setDate(e._input.value,!0,i===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),i.blur();e.open()}else if(ye(i)||v||x){var A=!!e.timeContainer&&e.timeContainer.contains(i);switch(n.keyCode){case 13:A?(n.preventDefault(),b(),Je()):mt(n);break;case 27:n.preventDefault(),Je();break;case 8:case 46:d&&!e.config.allowInput&&(n.preventDefault(),e.clear());break;case 37:case 39:if(!A&&!d){n.preventDefault();var k=c();if(e.daysContainer!==void 0&&(f===!1||k&&Ee(k))){var O=n.keyCode===39?1:-1;n.ctrlKey?(n.stopPropagation(),Ke(O),N(_(1),0)):N(void 0,O)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:n.preventDefault();var w=n.keyCode===40?1:-1;e.daysContainer&&i.$i!==void 0||i===e.input||i===e.altInput?n.ctrlKey?(n.stopPropagation(),Se(e.currentYear-w),N(_(1),0)):A||N(void 0,w*7):i===e.currentYearElement?Se(e.currentYear-w):e.config.enableTime&&(!A&&e.hourElement&&e.hourElement.focus(),b(n),e._debouncedChange());break;case 9:if(A){var E=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(ae){return ae}),z=E.indexOf(i);if(z!==-1){var ie=E[z+(n.shiftKey?-1:1)];n.preventDefault(),(ie||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(i)&&n.shiftKey&&(n.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&i===e.amPM)switch(n.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],D(),oe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],D(),oe();break}(d||ye(i))&&j("onKeyDown",n)}function Fe(n,i){if(i===void 0&&(i="flatpickr-day"),!(e.selectedDates.length!==1||n&&(!n.classList.contains(i)||n.classList.contains("flatpickr-disabled")))){for(var d=n?n.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),f=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),v=Math.min(d,e.selectedDates[0].getTime()),x=Math.max(d,e.selectedDates[0].getTime()),A=!1,k=0,O=0,w=v;w<x;w+=Mt.DAY)ue(new Date(w),!0)||(A=A||w>v&&w<x,w<f&&(!k||w>k)?k=w:w>f&&(!O||w<O)&&(O=w));var E=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+i));E.forEach(function(z){var ie=z.dateObj,ae=ie.getTime(),we=k>0&&ae<k||O>0&&ae>O;if(we){z.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(he){z.classList.remove(he)});return}else if(A&&!we)return;["startRange","inRange","endRange","notAllowed"].forEach(function(he){z.classList.remove(he)}),n!==void 0&&(n.classList.add(d<=e.selectedDates[0].getTime()?"startRange":"endRange"),f<d&&ae===f?z.classList.add("startRange"):f>d&&ae===f&&z.classList.add("endRange"),ae>=k&&(O===0||ae<=O)&&Dt(ae,f,d)&&z.classList.add("inRange"))})}}function $t(){e.isOpen&&!e.config.static&&!e.config.inline&&Ie()}function ea(n,i){if(i===void 0&&(i=e._positionElement),e.isMobile===!0){if(n){n.preventDefault();var d=ee(n);d&&d.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),j("onOpen");return}else if(e._input.disabled||e.config.inline)return;var f=e.isOpen;e.isOpen=!0,f||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),j("onOpen"),Ie(i)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(n===void 0||!e.timeContainer.contains(n.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function ct(n){return function(i){var d=e.config["_"+n+"Date"]=e.parseDate(i,e.config.dateFormat),f=e.config["_"+(n==="min"?"max":"min")+"Date"];d!==void 0&&(e[n==="min"?"minDateHasTime":"maxDateHasTime"]=d.getHours()>0||d.getMinutes()>0||d.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(v){return ue(v)}),!e.selectedDates.length&&n==="min"&&C(d),oe()),e.daysContainer&&(ft(),d!==void 0?e.currentYearElement[n]=d.getFullYear().toString():e.currentYearElement.removeAttribute(n),e.currentYearElement.disabled=!!f&&d!==void 0&&f.getFullYear()===d.getFullYear())}}function ta(){var n=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=V(V({},JSON.parse(JSON.stringify(o.dataset||{}))),t),d={};e.config.parseDate=i.parseDate,e.config.formatDate=i.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(E){e.config._enable=ht(E)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(E){e.config._disable=ht(E)}});var f=i.mode==="time";if(!i.dateFormat&&(i.enableTime||f)){var v=B.defaultConfig.dateFormat||fe.dateFormat;d.dateFormat=i.noCalendar||f?"H:i"+(i.enableSeconds?":S":""):v+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||f)&&!i.altFormat){var x=B.defaultConfig.altFormat||fe.altFormat;d.altFormat=i.noCalendar||f?"h:i"+(i.enableSeconds?":S K":" K"):x+(" h:i"+(i.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:ct("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:ct("max")});var A=function(E){return function(z){e.config[E==="min"?"_minTime":"_maxTime"]=e.parseDate(z,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:A("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:A("max")}),i.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,d,i);for(var k=0;k<n.length;k++)e.config[n[k]]=e.config[n[k]]===!0||e.config[n[k]]==="true";Pe.filter(function(E){return e.config[E]!==void 0}).forEach(function(E){e.config[E]=Ue(e.config[E]||[]).map(h)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var k=0;k<e.config.plugins.length;k++){var O=e.config.plugins[k](e)||{};for(var w in O)Pe.indexOf(w)>-1?e.config[w]=Ue(O[w]).map(h).concat(e.config[w]):typeof i[w]>"u"&&(e.config[w]=O[w])}i.altInputClass||(e.config.altInputClass=pt().className+" "+e.config.altInputClass),j("onParseConfig")}function pt(){return e.config.wrap?o.querySelector("[data-input]"):o}function ut(){typeof e.config.locale!="object"&&typeof B.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=V(V({},B.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?B.l10ns[e.config.locale]:void 0),pe.D="("+e.l10n.weekdays.shorthand.join("|")+")",pe.l="("+e.l10n.weekdays.longhand.join("|")+")",pe.M="("+e.l10n.months.shorthand.join("|")+")",pe.F="("+e.l10n.months.longhand.join("|")+")",pe.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var n=V(V({},t),JSON.parse(JSON.stringify(o.dataset||{})));n.time_24hr===void 0&&B.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=tt(e),e.parseDate=ze({config:e.config,l10n:e.l10n})}function Ie(n){if(typeof e.config.position=="function")return void e.config.position(e,n);if(e.calendarContainer!==void 0){j("onPreCalendarPosition");var i=n||e._positionElement,d=Array.prototype.reduce.call(e.calendarContainer.children,function(ya,wa){return ya+wa.offsetHeight},0),f=e.calendarContainer.offsetWidth,v=e.config.position.split(" "),x=v[0],A=v.length>1?v[1]:null,k=i.getBoundingClientRect(),O=window.innerHeight-k.bottom,w=x==="above"||x!=="below"&&O<d&&k.top>d,E=window.pageYOffset+k.top+(w?-d-2:i.offsetHeight+2);if(X(e.calendarContainer,"arrowTop",!w),X(e.calendarContainer,"arrowBottom",w),!e.config.inline){var z=window.pageXOffset+k.left,ie=!1,ae=!1;A==="center"?(z-=(f-k.width)/2,ie=!0):A==="right"&&(z-=f-k.width,ae=!0),X(e.calendarContainer,"arrowLeft",!ie&&!ae),X(e.calendarContainer,"arrowCenter",ie),X(e.calendarContainer,"arrowRight",ae);var we=window.document.body.offsetWidth-(window.pageXOffset+k.right),he=z+f>window.document.body.offsetWidth,fa=we+f>window.document.body.offsetWidth;if(X(e.calendarContainer,"rightMost",he),!e.config.static)if(e.calendarContainer.style.top=E+"px",!he)e.calendarContainer.style.left=z+"px",e.calendarContainer.style.right="auto";else if(!fa)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=we+"px";else{var Ze=aa();if(Ze===void 0)return;var ma=window.document.body.offsetWidth,ga=Math.max(0,ma/2-f/2),ha=".flatpickr-calendar.centerMost:before",va=".flatpickr-calendar.centerMost:after",ba=Ze.cssRules.length,xa="{left:"+k.left+"px;right:auto;}";X(e.calendarContainer,"rightMost",!1),X(e.calendarContainer,"centerMost",!0),Ze.insertRule(ha+","+va+xa,ba),e.calendarContainer.style.left=ga+"px",e.calendarContainer.style.right="auto"}}}}function aa(){for(var n=null,i=0;i<document.styleSheets.length;i++){var d=document.styleSheets[i];if(d.cssRules){try{d.cssRules}catch{continue}n=d;break}}return n??na()}function na(){var n=document.createElement("style");return document.head.appendChild(n),n.sheet}function ft(){e.config.noCalendar||e.isMobile||(Z(),Le(),Q())}function Je(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function mt(n){n.preventDefault(),n.stopPropagation();var i=function(E){return E.classList&&E.classList.contains("flatpickr-day")&&!E.classList.contains("flatpickr-disabled")&&!E.classList.contains("notAllowed")},d=et(ee(n),i);if(d!==void 0){var f=d,v=e.latestSelectedDateObj=new Date(f.dateObj.getTime()),x=(v.getMonth()<e.currentMonth||v.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=f,e.config.mode==="single")e.selectedDates=[v];else if(e.config.mode==="multiple"){var A=Ve(v);A?e.selectedDates.splice(parseInt(A),1):e.selectedDates.push(v)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=v,e.selectedDates.push(v),te(v,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(E,z){return E.getTime()-z.getTime()}));if(D(),x){var k=e.currentYear!==v.getFullYear();e.currentYear=v.getFullYear(),e.currentMonth=v.getMonth(),k&&(j("onYearChange"),Z()),j("onMonthChange")}if(Le(),Q(),oe(),!x&&e.config.mode!=="range"&&e.config.showMonths===1?Y(f):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var O=e.config.mode==="single"&&!e.config.enableTime,w=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(O||w)&&Je()}g()}}var Ae={locale:[ut,xe],showMonths:[Me,m,J],minDate:[l],maxDate:[l],positionElement:[vt],clickOpens:[function(){e.config.clickOpens===!0?(p(e._input,"focus",e.open),p(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function ia(n,i){if(n!==null&&typeof n=="object"){Object.assign(e.config,n);for(var d in n)Ae[d]!==void 0&&Ae[d].forEach(function(f){return f()})}else e.config[n]=i,Ae[n]!==void 0?Ae[n].forEach(function(f){return f()}):Pe.indexOf(n)>-1&&(e.config[n]=Ue(i));e.redraw(),oe(!0)}function gt(n,i){var d=[];if(n instanceof Array)d=n.map(function(f){return e.parseDate(f,i)});else if(n instanceof Date||typeof n=="number")d=[e.parseDate(n,i)];else if(typeof n=="string")switch(e.config.mode){case"single":case"time":d=[e.parseDate(n,i)];break;case"multiple":d=n.split(e.config.conjunction).map(function(f){return e.parseDate(f,i)});break;case"range":d=n.split(e.l10n.rangeSeparator).map(function(f){return e.parseDate(f,i)});break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(n)));e.selectedDates=e.config.allowInvalidPreload?d:d.filter(function(f){return f instanceof Date&&ue(f,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(f,v){return f.getTime()-v.getTime()})}function oa(n,i,d){if(i===void 0&&(i=!1),d===void 0&&(d=e.config.dateFormat),n!==0&&!n||n instanceof Array&&n.length===0)return e.clear(i);gt(n,d),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),l(void 0,i),C(),e.selectedDates.length===0&&e.clear(!1),oe(i),i&&j("onChange")}function ht(n){return n.slice().map(function(i){return typeof i=="string"||typeof i=="number"||i instanceof Date?e.parseDate(i,void 0,!0):i&&typeof i=="object"&&i.from&&i.to?{from:e.parseDate(i.from,void 0),to:e.parseDate(i.to,void 0)}:i}).filter(function(i){return i})}function ra(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var n=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);n&&gt(n,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function la(){if(e.input=pt(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=U(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),vt()}function vt(){e._positionElement=e.config.positionElement||e._input}function sa(){var n=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=U("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=n,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=n==="datetime-local"?"Y-m-d\\TH:i:S":n==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}p(e.mobileInput,"change",function(i){e.setDate(ee(i).value,!1,e.mobileFormatStr),j("onChange"),j("onClose")})}function da(n){if(e.isOpen===!0)return e.close();e.open(n)}function j(n,i){if(e.config!==void 0){var d=e.config[n];if(d!==void 0&&d.length>0)for(var f=0;d[f]&&f<d.length;f++)d[f](e.selectedDates,e.input.value,e,i);n==="onChange"&&(e.input.dispatchEvent(Ge("change")),e.input.dispatchEvent(Ge("input")))}}function Ge(n){var i=document.createEvent("Event");return i.initEvent(n,!0,!0),i}function Ve(n){for(var i=0;i<e.selectedDates.length;i++){var d=e.selectedDates[i];if(d instanceof Date&&te(d,n)===0)return""+i}return!1}function ca(n){return e.config.mode!=="range"||e.selectedDates.length<2?!1:te(n,e.selectedDates[0])>=0&&te(n,e.selectedDates[1])<=0}function Le(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(n,i){var d=new Date(e.currentYear,e.currentMonth,1);d.setMonth(e.currentMonth+i),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[i].textContent=De(d.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=d.getMonth().toString(),n.value=d.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function _e(n){var i=n||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(d){return e.formatDate(d,i)}).filter(function(d,f,v){return e.config.mode!=="range"||e.config.enableTime||v.indexOf(d)===f}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function oe(n){n===void 0&&(n=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=_e(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=_e(e.config.altFormat)),n!==!1&&j("onValueUpdate")}function pa(n){var i=ee(n),d=e.prevMonthNav.contains(i),f=e.nextMonthNav.contains(i);d||f?Ke(d?-1:1):e.yearElements.indexOf(i)>=0?i.select():i.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):i.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function ua(n){n.preventDefault();var i=n.type==="keydown",d=ee(n),f=d;e.amPM!==void 0&&d===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ne(e.amPM.textContent===e.l10n.amPM[0])]);var v=parseFloat(f.getAttribute("min")),x=parseFloat(f.getAttribute("max")),A=parseFloat(f.getAttribute("step")),k=parseInt(f.value,10),O=n.delta||(i?n.which===38?1:-1:0),w=k+A*O;if(typeof f.value<"u"&&f.value.length===2){var E=f===e.hourElement,z=f===e.minuteElement;w<v?(w=x+w+ne(!E)+(ne(E)&&ne(!e.amPM)),z&&T(void 0,-1,e.hourElement)):w>x&&(w=f===e.hourElement?w-x-ne(!e.amPM):v,z&&T(void 0,1,e.hourElement)),e.amPM&&E&&(A===1?w+k===23:Math.abs(w-k)>A)&&(e.amPM.textContent=e.l10n.amPM[ne(e.amPM.textContent===e.l10n.amPM[0])]),f.value=$(w)}}return r(),e}function me(o,t){for(var e=Array.prototype.slice.call(o).filter(function(h){return h instanceof HTMLElement}),a=[],r=0;r<e.length;r++){var c=e[r];try{if(c.getAttribute("data-fp-omit")!==null)continue;c._flatpickr!==void 0&&(c._flatpickr.destroy(),c._flatpickr=void 0),c._flatpickr=Et(c,t||{}),a.push(c._flatpickr)}catch(h){console.error(h)}}return a.length===1?a[0]:a}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(o){return me(this,o)},HTMLElement.prototype.flatpickr=function(o){return me([this],o)});var B=function(o,t){return typeof o=="string"?me(window.document.querySelectorAll(o),t):o instanceof Node?me([o],t):me(o,t)};B.defaultConfig={},B.l10ns={en:V({},ve),default:V({},ve)},B.localize=function(o){B.l10ns.default=V(V({},B.l10ns.default),o)},B.setDefaults=function(o){B.defaultConfig=V(V({},B.defaultConfig),o)},B.parseDate=ze({}),B.formatDate=tt({}),B.compareDates=te,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(o){return me(this,o)}),Date.prototype.fp_incr=function(o){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof o=="string"?parseInt(o,10):o))},typeof window<"u"&&(window.flatpickr=B);var Ft=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function It(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var He={exports:{}};(function(o,t){(function(e,a){a(t)})(Ft,function(e){var a=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["周日","周一","周二","周三","周四","周五","周六"],longhand:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},months:{shorthand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],longhand:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},rangeSeparator:" 至 ",weekAbbreviation:"周",scrollTitle:"滚动切换",toggleTitle:"点击切换 12/24 小时时制"};a.l10ns.zh=r;var c=a.l10ns;e.Mandarin=r,e.default=c,Object.defineProperty(e,"__esModule",{value:!0})})})(He,He.exports);var At=He.exports;const Lt={...At.Mandarin,weekdays:{shorthand:["日","一","二","三","四","五","六"],longhand:["日","一","二","三","四","五","六"]}};class Ot{constructor(t){S(this,"container");S(this,"startInput");S(this,"endInput");S(this,"fpInstance",null);S(this,"selectedDates",[null,null]);S(this,"onChange");S(this,"placeholder");S(this,"shortcuts");S(this,"disabledDate");S(this,"activeShortcutIndex",-1);S(this,"isShortcutTriggered",!1);S(this,"scrollHandler",null);S(this,"scrollParents",[]);this.container=t.container,this.selectedDates=t.defaultDates||[null,null],this.onChange=t.onChange,this.placeholder=t.placeholder||["Start date","End date"],this.shortcuts=t.shortcuts||[],this.disabledDate=t.disabledDate,this.render(),this.initFlatpickr()}render(){this.container.innerHTML="",this.container.className="sl-import-date-range-picker",this.startInput=document.createElement("input"),this.startInput.type="text",this.startInput.className="sl-import-date-range-input",this.startInput.placeholder=this.placeholder[0],this.startInput.readOnly=!0,this.selectedDates[0]&&(this.startInput.value=this.formatDate(this.selectedDates[0]));const t=document.createElement("span");t.className="sl-import-date-range-separator",t.textContent="To",this.endInput=document.createElement("input"),this.endInput.type="text",this.endInput.className="sl-import-date-range-input",this.endInput.placeholder=this.placeholder[1],this.endInput.readOnly=!0,this.selectedDates[1]&&(this.endInput.value=this.formatDate(this.selectedDates[1]));const e=document.createElement("span");e.className="sl-import-date-range-icon",e.innerHTML=`<svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1423
1423
  <path d="M5 1v2M11 1v2M1.5 6h13M3 2.5h10a1.5 1.5 0 011.5 1.5v10a1.5 1.5 0 01-1.5 1.5H3a1.5 1.5 0 01-1.5-1.5V4A1.5 1.5 0 013 2.5z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
1424
- </svg>`,this.container.appendChild(this.startInput),this.container.appendChild(t),this.container.appendChild(this.endInput),this.container.appendChild(e),this.container.addEventListener("click",a=>{var r;a.stopPropagation(),(r=this.fpInstance)==null||r.open()})}buildShortcutsPanel(){const t=document.createElement("div");return t.className="sl-date-range-shortcuts",this.shortcuts.forEach((e,a)=>{const r=document.createElement("div");r.className="sl-date-range-shortcut-item",a===this.activeShortcutIndex&&r.classList.add("active"),r.textContent=e.text,r.addEventListener("click",c=>{c.stopPropagation(),this.handleShortcutClick(a)}),t.appendChild(r)}),t}handleShortcutClick(t){var c,h,m,b;const e=this.shortcuts[t];if(!e)return;const[a,r]=e.value();this.isShortcutTriggered=!0,this.activeShortcutIndex=t,this.selectedDates=[a,r],this.startInput.value=this.formatDate(a),this.endInput.value=this.formatDate(r),(c=this.fpInstance)==null||c.setDate([a,r],!1),(h=this.onChange)==null||h.call(this,[a,r]),(m=this.fpInstance)==null||m.calendarContainer.classList.add("sl-range-confirmed"),this.fpInstance&&(this.updateMonthHeaders(this.fpInstance),this.unwrapDayCells(this.fpInstance),this.padDayContainers(this.fpInstance),this.wrapDayCells(this.fpInstance)),this.updateShortcutActiveState(),this.isShortcutTriggered=!1,(b=this.fpInstance)==null||b.close()}updateShortcutActiveState(){var a;const t=(a=this.fpInstance)==null?void 0:a.calendarContainer.querySelector(".sl-date-range-shortcuts");if(!t)return;t.querySelectorAll(".sl-date-range-shortcut-item").forEach((r,c)=>{c===this.activeShortcutIndex?r.classList.add("active"):r.classList.remove("active")})}initFlatpickr(){const t=document.createElement("input");t.type="text",t.style.cssText="position:absolute;width:0;height:0;opacity:0;pointer-events:none;",this.container.appendChild(t);const e=[];this.selectedDates[0]&&e.push(this.selectedDates[0]),this.selectedDates[1]&&e.push(this.selectedDates[1]);const a=this.disabledDate,r=a?[c=>a(c)]:[];this.fpInstance=B(t,{mode:"range",showMonths:2,locale:Lt,dateFormat:"Y-m-d",defaultDate:e.length===2?e:void 0,positionElement:this.container,static:!1,position:"below",disable:r,onReady:(c,h,m)=>{if(m.calendarContainer.classList.add("sl-date-range-calendar"),c.length===2&&m.calendarContainer.classList.add("sl-range-confirmed"),m.calendarContainer.addEventListener("mouseleave",()=>{!m.calendarContainer.classList.contains("sl-range-confirmed")&&m.selectedDates.length===1&&m.calendarContainer.querySelectorAll(".flatpickr-day.inRange, .flatpickr-day.endRange").forEach(b=>{b.classList.remove("inRange","endRange")})}),this.customizeCalendarHeader(m),this.padDayContainers(m),this.wrapDayCells(m),this.shortcuts.length>0){m.calendarContainer.classList.add("has-shortcuts");const b=document.createElement("div");for(b.className="sl-date-range-calendar-content";m.calendarContainer.firstChild;)b.appendChild(m.calendarContainer.firstChild);const M=this.buildShortcutsPanel();m.calendarContainer.appendChild(M),m.calendarContainer.appendChild(b)}},onOpen:(c,h,m)=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m),requestAnimationFrame(()=>{this.positionCalendar(m)}),this.bindScrollListeners(m)},onClose:()=>{this.unbindScrollListeners()},onMonthChange:(c,h,m)=>{requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})},onYearChange:(c,h,m)=>{requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})},onChange:(c,h,m)=>{var b;this.isShortcutTriggered||(this.activeShortcutIndex=-1,this.updateShortcutActiveState()),c.length===2?(this.selectedDates=[c[0],c[1]],this.startInput.value=this.formatDate(c[0]),this.endInput.value=this.formatDate(c[1]),(b=this.onChange)==null||b.call(this,this.selectedDates),m.calendarContainer.classList.add("sl-range-confirmed")):c.length===1&&(this.selectedDates=[c[0],null],this.startInput.value=this.formatDate(c[0]),this.endInput.value="",m.calendarContainer.classList.remove("sl-range-confirmed")),requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})}})}customizeCalendarHeader(t){const e=t.calendarContainer.querySelector(".flatpickr-months");if(!e)return;const a=document.createElement("span");a.className="flatpickr-prev-year",a.innerHTML='<i class="iconfont icon-prev2"></i>',a.addEventListener("click",m=>{m.stopPropagation(),t.changeYear(t.currentYear-1)});const r=document.createElement("span");r.className="flatpickr-next-year",r.innerHTML='<i class="iconfont icon-next1"></i>',r.addEventListener("click",m=>{m.stopPropagation(),t.changeYear(t.currentYear+1)});const c=e.querySelector(".flatpickr-prev-month"),h=e.querySelector(".flatpickr-next-month");c&&(c.innerHTML='<i class="iconfont icon-prev3"></i>',e.insertBefore(a,c)),h&&(h.innerHTML='<i class="iconfont icon-next"></i>',h.after(r)),this.updateMonthHeaders(t)}updateMonthHeaders(t){const e=["1","2","3","4","5","6","7","8","9","10","11","12"];t.calendarContainer.querySelectorAll(".flatpickr-current-month").forEach((r,c)=>{const h=r.querySelector(".cur-month"),m=r.querySelector(".numInputWrapper");if(!h||!m)return;const b=(t.currentMonth+c)%12,M=t.currentYear+Math.floor((t.currentMonth+c)/12);m.style.display="none",h.textContent=`${M} 年 ${e[b]} 月`})}padDayContainers(t){t.calendarContainer.querySelectorAll(".dayContainer").forEach((a,r)=>{a.querySelectorAll(".sl-pad-day").forEach(C=>C.remove()),a.querySelectorAll(".flatpickr-day.hidden").forEach(C=>C.classList.remove("hidden"));const c=42,h=(t.currentMonth+r)%12,m=t.currentYear+Math.floor((t.currentMonth+r)/12),b=a.querySelectorAll(".flatpickr-day.prevMonthDay"),y=new Date(m,h,1).getDay()-b.length;if(y>0){const C=h===0?11:h-1,I=h===0?m-1:m,s=new Date(I,C+1,0).getDate(),p=a.firstChild;for(let g=y-1;g>=0;g--){const u=s-g,l=document.createElement("span");l.className="flatpickr-day prevMonthDay sl-pad-day",l.textContent=String(u),l.tabIndex=-1,a.insertBefore(l,p)}}const D=a.querySelectorAll(".flatpickr-day").length;if(D<c){const C=a.querySelectorAll(".nextMonthDay");let I=1;if(C.length>0){const p=C[C.length-1];I=parseInt(p.textContent||"0",10)+1}const s=c-D;for(let p=0;p<s;p++){const g=document.createElement("span");g.className="flatpickr-day nextMonthDay sl-pad-day",g.textContent=String(I+p),g.tabIndex=-1,a.appendChild(g)}}})}wrapDayCells(t){t.calendarContainer.querySelectorAll(".dayContainer").forEach(a=>{a.querySelectorAll(".flatpickr-day:not(.sl-day-wrapped)").forEach(c=>{var m;if(c.parentElement&&c.parentElement.classList.contains("sl-day-cell"))return;const h=document.createElement("div");h.className="sl-day-cell",c.classList.add("sl-day-wrapped"),(m=c.parentNode)==null||m.insertBefore(h,c),h.appendChild(c)})})}unwrapDayCells(t){t.calendarContainer.querySelectorAll(".sl-day-cell").forEach(a=>{var c;const r=a.firstElementChild;r&&(r.classList.remove("sl-day-wrapped"),(c=a.parentNode)==null||c.insertBefore(r,a)),a.remove()})}positionCalendar(t){const e=t.calendarContainer,a=this.container.getBoundingClientRect(),r=4,c=8,h=e.offsetHeight,m=e.offsetWidth,b=a.left+a.width/2,M=b-m/2,y=window.innerWidth-m-8,D=Math.max(8,Math.min(M,y)),C=window.innerHeight-a.bottom-r-c,I=a.top-r-c,s=C<h&&I>C;s?e.style.top=`${a.top+window.scrollY-h-r-c}px`:e.style.top=`${a.bottom+window.scrollY+r+c}px`,e.style.left=`${D}px`;let p=e.querySelector(".sl-calendar-arrow");p||(p=document.createElement("div"),p.className="sl-calendar-arrow",e.appendChild(p));const g=b-D;p.style.left=`${g}px`,s?p.className="sl-calendar-arrow sl-calendar-arrow-bottom":p.className="sl-calendar-arrow sl-calendar-arrow-top"}formatDate(t){const e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${e}-${a}-${r}`}getDates(){return[...this.selectedDates]}setDates(t){var a;this.selectedDates=t,t[0]?this.startInput.value=this.formatDate(t[0]):this.startInput.value="",t[1]?this.endInput.value=this.formatDate(t[1]):this.endInput.value="";const e=[];t[0]&&e.push(t[0]),t[1]&&e.push(t[1]),(a=this.fpInstance)==null||a.setDate(e,!1)}getScrollParents(t){const e=[];let a=t.parentElement;for(;a;){const r=getComputedStyle(a),c=r.overflow+r.overflowY+r.overflowX;/auto|scroll/.test(c)&&e.push(a),a=a.parentElement}return e.push(window),e}bindScrollListeners(t){this.unbindScrollListeners(),this.scrollHandler=()=>{this.positionCalendar(t)},this.scrollParents=this.getScrollParents(this.container),this.scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollHandler,{passive:!0})})}unbindScrollListeners(){this.scrollHandler&&(this.scrollParents.forEach(t=>{t.removeEventListener("scroll",this.scrollHandler)}),this.scrollHandler=null,this.scrollParents=[])}destroy(){var t;this.unbindScrollListeners(),(t=this.fpInstance)==null||t.destroy(),this.fpInstance=null}}const Pt={loadingText:"加载中...",cancel:"取消",confirm:"确认",download:"下载",select:"选择",required:"必填",batchImport:"批量导入",downloadTemplateTitle:"1.下载模版,根据提示信息完善表格内容",downloadTemplateText:"下载模板",importSettingsTitle:"2.导入设置",selectBrand:"选择所属品牌",defaultBrand:"默认品牌",selectImageRatio:"选择图片比例",selectMonth:"选择月份",selectDate:"选择日期",uploadTitle:"3.上传文件",dragFileHere:"将文件拖到此处,",or:"或",uploadLinkText:"点击上传",uploadHint:"文件仅支持扩展名:.xls,.xlsx",tipsTitle:"提示信息",month:"月",startDate:"开始日期",endDate:"结束日期",to:"至",pleaseSelectFile:"请选择文件",maxFilesLimit:"最多只能上传 {max} 个文件",fileFormatNotSupported:"文件 {name} 格式不支持,仅支持 {types}",fileSizeExceeded:"文件 {name} 超过最大限制 {size}{unit}",fileTypeError:"请上传文件",fileSizeError:"文件大小超出限制",uploadFailed:"上传失败",uploadFailedRetry:"上传失败,请重试",uploadSuccess:"上传成功",uploading:"上传中...",processingFailed:"处理失败",fileUploadingCannotDelete:"文件正在上传中,无法删除",filesUploadingCannotClear:"有文件正在上传中,无法清空",filesUploading:"有文件正在上传中,请等待上传完成",filesUploadFailed:"有 {count} 个文件上传失败,请重新上传",waitForUploadComplete:"请等待所有文件上传完成",chunkedUploadConfigRequired:"分片上传需要配置 chunkedUpload",uploadTitleBase:"上传文件",uploadTitleTemplate1:"上传编辑好的文件",uploadTitleTemplate2:"导入菜品图片文件",uploadTitleTemplate3:"导入菜品信息文件",uploadTitleTemplate4:"导入菜谱方案文件",uploadTitleTemplate5:"导入价格调整文件",uploadLinkTextDefault:"点击上传",uploadLinkTextImport:"点击导入",uploadHintExcel:"文件仅支持扩展名:.xls,.xlsx",uploadHintImage:"文件仅支持扩展名:.rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["图片名称需要与菜品名称一致","上传文件仅支持ZIP、RAR压缩包文件(暂不支持win11自带工具压缩的文件),文件大小不超过100M","图片支持jpg、png、jpeg格式,单张大小不超过2M"],tipsTemplate3:["菜品以代码为唯一标识进行集团菜品的匹配,请仔细核对菜品代码","模版支持导入名称、价格、自定义分类,其余菜品的属性获取集团菜品库"],tipsTemplate4:["最多支持导入五个菜谱方案","菜品以代码为唯一标识进行集团菜品的匹配,请仔细核对菜品代码","模版支持导入名称、线上可点分类、价格和自定义分类,其余菜品的属性获取集团菜品库"],tipsTemplate5:["价格调整将覆盖现有价格,请谨慎操作","支持批量调整入库价格和出库价格"],tabCoverImport:"覆盖导入数据",tabIncrementImport:"增量导入数据",tabInPrice:"合批修改入库价格",tabOutPrice:"合批修改出库价格",imageRatioOriginal:"原图",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},nt={loadingText:"載入中...",cancel:"取消",confirm:"確認",download:"下載",select:"選擇",required:"必填",batchImport:"批量匯入",downloadTemplateTitle:"1.下載模板,根據提示資訊完善表格內容",downloadTemplateText:"下載模板",importSettingsTitle:"2.匯入設置",selectBrand:"選擇所屬品牌",defaultBrand:"預設品牌",selectImageRatio:"選擇圖片比例",selectMonth:"選擇月份",selectDate:"選擇日期",uploadTitle:"3.上傳檔案",dragFileHere:"將檔案拖到此處,",or:"或",uploadLinkText:"點擊上傳",uploadHint:"檔案僅支援副檔名:.xls,.xlsx",tipsTitle:"提示資訊",month:"月",startDate:"開始日期",endDate:"結束日期",to:"至",pleaseSelectFile:"請選擇文件",maxFilesLimit:"最多只能上傳 {max} 個文件",fileFormatNotSupported:"文件 {name} 格式不支持,僅支持 {types}",fileSizeExceeded:"文件 {name} 超過最大限制 {size}{unit}",fileTypeError:"請上傳文件",fileSizeError:"文件大小超出限制",uploadFailed:"上傳失敗",uploadFailedRetry:"上傳失敗,請重試",uploadSuccess:"上傳成功",uploading:"上傳中...",processingFailed:"處理失敗",fileUploadingCannotDelete:"文件正在上傳中,無法刪除",filesUploadingCannotClear:"有文件正在上傳中,無法清空",filesUploading:"有文件正在上傳中,請等待上傳完成",filesUploadFailed:"有 {count} 個文件上傳失敗,請重新上傳",waitForUploadComplete:"請等待所有文件上傳完成",chunkedUploadConfigRequired:"分片上傳需要配置 chunkedUpload",uploadTitleBase:"上傳檔案",uploadTitleTemplate1:"上傳編輯好的檔案",uploadTitleTemplate2:"匯入菜品圖片檔案",uploadTitleTemplate3:"匯入菜品資訊檔案",uploadTitleTemplate4:"匯入食譜方案檔案",uploadTitleTemplate5:"匯入價格調整檔案",uploadLinkTextDefault:"點擊上傳",uploadLinkTextImport:"點擊匯入",uploadHintExcel:"檔案僅支援副檔名:.xls,.xlsx",uploadHintImage:"檔案僅支援副檔名:.rar .zip .jpg .png .jpeg",tipsDefault:["這裡寫一些提示資訊"],tipsTemplate1:["這裡寫一些提示資訊"],tipsTemplate2:["圖片名稱需要與菜品名稱一致","上傳檔案僅支援ZIP、RAR壓縮包檔案(暫不支援win11自帶工具壓縮的檔案),檔案大小不超過100M","圖片支援jpg、png、jpeg格式,單張大小不超過2M"],tipsTemplate3:["菜品以代碼為唯一標識進行集團菜品的匹配,請仔細核對菜品代碼","模板支援匯入名稱、價格、自定義分類,其餘菜品的屬性獲取集團菜品庫"],tipsTemplate4:["最多支援匯入五個食譜方案","菜品以代碼為唯一標識進行集團菜品的匹配,請仔細核對菜品代碼","模板支援匯入名稱、線上可點分類、價格和自定義分類,其餘菜品的屬性獲取集團菜品庫"],tipsTemplate5:["價格調整將覆蓋現有價格,請謹慎操作","支援批量調整入庫價格和出庫價格"],tabCoverImport:"覆蓋匯入資料",tabIncrementImport:"增量匯入資料",tabInPrice:"合批修改入庫價格",tabOutPrice:"合批修改出庫價格",imageRatioOriginal:"原圖",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Ut={loadingText:"読み込み中...",cancel:"キャンセル",confirm:"確認",download:"ダウンロード",select:"選択",required:"必須",batchImport:"一括インポート",downloadTemplateTitle:"1.テンプレートをダウンロードし、指示に従ってスプレッドシートを完成させる",downloadTemplateText:"テンプレートをダウンロード",importSettingsTitle:"2.インポート設定",selectBrand:"ブランドを選択",defaultBrand:"デフォルトブランド",selectImageRatio:"画像比率を選択",selectMonth:"月を選択",selectDate:"日付を選択",uploadTitle:"3.ファイルをアップロード",dragFileHere:"ファイルをここにドラッグ、",or:"または",uploadLinkText:"クリックしてアップロード",uploadHint:"ファイルは拡張子のみサポート:.xls,.xlsx",tipsTitle:"ヒント",month:"月",startDate:"開始日",endDate:"終了日",to:"から",pleaseSelectFile:"ファイルを選択してください",maxFilesLimit:"最大 {max} ファイルまでアップロード可能",fileFormatNotSupported:"ファイル {name} の形式はサポートされていません。{types} のみ対応",fileSizeExceeded:"ファイル {name} が最大サイズ {size}{unit} を超えています",fileTypeError:"ファイルをアップロードしてください",fileSizeError:"ファイルサイズが制限を超えています",uploadFailed:"アップロード失敗",uploadFailedRetry:"アップロードに失敗しました。再試行してください",uploadSuccess:"アップロード成功",uploading:"アップロード中...",processingFailed:"処理に失敗しました",fileUploadingCannotDelete:"ファイルをアップロード中のため削除できません",filesUploadingCannotClear:"ファイルをアップロード中のためクリアできません",filesUploading:"ファイルをアップロード中です。完了までお待ちください",filesUploadFailed:"{count} 個のファイルのアップロードに失敗しました。再アップロードしてください",waitForUploadComplete:"すべてのファイルのアップロードが完了するまでお待ちください",chunkedUploadConfigRequired:"チャンクアップロードには chunkedUpload の設定が必要です",uploadTitleBase:"ファイルをアップロード",uploadTitleTemplate1:"編集済みファイルをアップロード",uploadTitleTemplate2:"料理画像ファイルをインポート",uploadTitleTemplate3:"料理情報ファイルをインポート",uploadTitleTemplate4:"レシプトプランファイルをインポート",uploadTitleTemplate5:"価格調整ファイルをインポート",uploadLinkTextDefault:"クリックしてアップロード",uploadLinkTextImport:"クリックしてインポート",uploadHintExcel:"ファイルは拡張子のみサポート:.xls,.xlsx",uploadHintImage:"ファイルは拡張子のみサポート:.rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["画像名は料理名と一致する必要があります","アップロードファイルはZIP、RAR圧縮ファイルのみサポート(Windows11付属ツールで圧縮されたファイルはサポートされません)、ファイルサイズは100Mを超えないでください","画像はjpg、png、jpeg形式をサポート、単一サイズは2Mを超えないでください"],tipsTemplate3:["料理はコードを唯一の識別子としてグループ料理と一致させ、料理コードを慎重に確認してください","テンプレートは名前、価格、カスタム分類のインポートをサポート、その他の料理属性はグループ料理データベースから取得"],tipsTemplate4:["最大5つのレシピプランのインポートをサポート","料理はコードを唯一の識別子としてグループ料理と一致させ、料理コードを慎重に確認してください","テンプレートは名前、オンライン注文可能分類、価格とカスタム分類のインポートをサポート、その他の料理属性はグループ料理データベースから取得"],tipsTemplate5:["価格調整は既存価格を上書きします、慎重に操作してください","仕入価格と販売価格の一括調整をサポート"],tabCoverImport:"上書きインポートデータ",tabIncrementImport:"増分インポートデータ",tabInPrice:"一括仕入価格修正",tabOutPrice:"一括販売価格修正",imageRatioOriginal:"元画像",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Rt={loadingText:"Memuat...",cancel:"Batal",confirm:"Konfirmasi",download:"Unduh",select:"Pilih",required:"Wajib",batchImport:"Impor Batch",downloadTemplateTitle:"1. Unduh template dan lengkapi spreadsheet sesuai petunjuk",downloadTemplateText:"Unduh Template",importSettingsTitle:"2. Pengaturan Impor",selectBrand:"Pilih Merek",defaultBrand:"Merek Default",selectImageRatio:"Pilih Rasio Gambar",selectMonth:"Pilih Bulan",selectDate:"Pilih Tanggal",uploadTitle:"3. Unggah File",dragFileHere:"Seret file di sini, ",or:"atau",uploadLinkText:"klik untuk mengunggah",uploadHint:"Hanya mendukung ekstensi file: .xls,.xlsx",tipsTitle:"Tips",month:"Bulan",startDate:"Tanggal mulai",endDate:"Tanggal akhir",to:"hingga",pleaseSelectFile:"Silakan pilih file",maxFilesLimit:"Maksimal {max} file yang diizinkan",fileFormatNotSupported:"Format file {name} tidak didukung, hanya {types} yang diizinkan",fileSizeExceeded:"File {name} melebihi ukuran maksimal {size}{unit}",fileTypeError:"Silakan unggah file",fileSizeError:"Ukuran file melebihi batas",uploadFailed:"Unggah gagal",uploadFailedRetry:"Unggah gagal, silakan coba lagi",uploadSuccess:"Unggah berhasil",uploading:"Mengunggah...",processingFailed:"Pemrosesan gagal",fileUploadingCannotDelete:"File sedang diunggah, tidak dapat dihapus",filesUploadingCannotClear:"File sedang diunggah, tidak dapat dikosongkan",filesUploading:"File sedang diunggah, harap tunggu hingga selesai",filesUploadFailed:"{count} file gagal diunggah, silakan unggah ulang",waitForUploadComplete:"Harap tunggu semua file selesai diunggah",chunkedUploadConfigRequired:"Unggah chunk memerlukan konfigurasi chunkedUpload",uploadTitleBase:"Unggah File",uploadTitleTemplate1:"Unggah File yang Diedit",uploadTitleTemplate2:"Impor File Gambar Menu",uploadTitleTemplate3:"Impor File Informasi Menu",uploadTitleTemplate4:"Impor File Rencana Resep",uploadTitleTemplate5:"Impor File Penyesuaian Harga",uploadLinkTextDefault:"klik untuk mengunggah",uploadLinkTextImport:"klik untuk mengimpor",uploadHintExcel:"Hanya mendukung ekstensi file: .xls,.xlsx",uploadHintImage:"Hanya mendukung ekstensi file: .rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["Nama gambar harus sesuai dengan nama menu","File unggah hanya mendukung file terkompresi ZIP, RAR (file yang dikompresi dengan tools bawaan Windows11 tidak didukung), ukuran file tidak melebihi 100M","Gambar mendukung format jpg, png, jpeg, ukuran tunggal tidak melebihi 2M"],tipsTemplate3:["Menu dicocokkan dengan menu grup menggunakan kode sebagai identifier unik, harap periksa kode menu dengan cermat","Template mendukung impor nama, harga, kategori kustom, atribut menu lainnya diperoleh dari database menu grup"],tipsTemplate4:["Mendukung impor hingga lima rencana resep","Menu dicocokkan dengan menu grup menggunakan kode sebagai identifier unik, harap periksa kode menu dengan cermat","Template mendukung impor nama, kategori dapat dipesan online, harga dan kategori kustom, atribut menu lainnya diperoleh dari database menu grup"],tipsTemplate5:["Penyesuaian harga akan menimpa harga yang ada, harap beroperasi dengan hati-hati","Mendukung penyesuaian harga pembelian dan harga jual secara batch"],tabCoverImport:"Timpa Data Impor",tabIncrementImport:"Data Impor Incremental",tabInPrice:"Modifikasi Harga Pembelian Batch",tabOutPrice:"Modifikasi Harga Penjualan Batch",imageRatioOriginal:"Asli",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},zt={loadingText:"Loading...",cancel:"Cancel",confirm:"Confirm",download:"Download",select:"Select",required:"Required",batchImport:"Batch Import",downloadTemplateTitle:"1. Download template and complete the spreadsheet according to the instructions",downloadTemplateText:"Download Template",importSettingsTitle:"2. Import Settings",selectBrand:"Select Brand",defaultBrand:"Default Brand",selectImageRatio:"Select Image Ratio",selectMonth:"Select Month",selectDate:"Select Date",uploadTitle:"3. Upload File",dragFileHere:"Drag files here, ",or:"or",uploadLinkText:"click to upload",uploadHint:"Supports batch import, file size not exceeding 10MB",tipsTitle:"Tips",month:"Month",startDate:"Start date",endDate:"End date",to:"to",pleaseSelectFile:"Please select a file",maxFilesLimit:"Maximum {max} files allowed",fileFormatNotSupported:"File {name} format not supported, only {types} allowed",fileSizeExceeded:"File {name} exceeds maximum size {size}{unit}",fileTypeError:"Please upload file",fileSizeError:"File size exceeds limit",uploadFailed:"Upload failed",uploadFailedRetry:"Upload failed, please retry",uploadSuccess:"Upload successful",uploading:"Uploading...",processingFailed:"Processing failed",fileUploadingCannotDelete:"File is uploading, cannot delete",filesUploadingCannotClear:"Files are uploading, cannot clear",filesUploading:"Files are uploading, please wait for completion",filesUploadFailed:"{count} file(s) failed to upload, please re-upload",waitForUploadComplete:"Please wait for all files to complete uploading",chunkedUploadConfigRequired:"Chunked upload requires chunkedUpload configuration",uploadTitleBase:"Upload File",uploadTitleTemplate1:"Upload Edited File",uploadTitleTemplate2:"Import Dish Image File",uploadTitleTemplate3:"Import Dish Information File",uploadTitleTemplate4:"Import Recipe Plan File",uploadTitleTemplate5:"Import Price Adjustment File",uploadLinkTextDefault:"click to upload",uploadLinkTextImport:"click to import",uploadHintExcel:"File only supports extensions: .xls,.xlsx",uploadHintImage:"File only supports extensions: .rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["Image name must match dish name","Upload files only support ZIP, RAR compressed files (files compressed with Win11 built-in tools are not supported), file size not exceeding 100M","Images support jpg, png, jpeg formats, single size not exceeding 2M"],tipsTemplate3:["Dishes are matched with group dishes by code as unique identifier, please carefully check dish codes","Template supports importing name, price, custom category, other dish attributes are obtained from group dish database"],tipsTemplate4:["Support importing up to five recipe plans","Dishes are matched with group dishes by code as unique identifier, please carefully check dish codes","Template supports importing name, online orderable category, price and custom category, other dish attributes are obtained from group dish database"],tipsTemplate5:["Price adjustment will overwrite existing prices, please operate with caution","Support batch adjustment of purchase price and sale price"],tabCoverImport:"Overwrite Import Data",tabIncrementImport:"Increment Import Data",tabInPrice:"Batch Modify Purchase Price",tabOutPrice:"Batch Modify Sale Price",imageRatioOriginal:"Original",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Ye=bt,Be={zh_CN:Pt,en_US:zt,ja_JP:Ut,zh_HK:nt,zh_TW:nt,id:Rt};class Nt{constructor(){S(this,"currentLocale",Ye);S(this,"messages",Be[Ye])}setLocale(t){this.currentLocale=t,this.messages=Be[t]||Be[Ye]}getLocale(){return this.currentLocale}t(t,e){const a=this.messages[t]||t;return Array.isArray(a)?a.join(`
1424
+ </svg>`,this.container.appendChild(this.startInput),this.container.appendChild(t),this.container.appendChild(this.endInput),this.container.appendChild(e),this.container.addEventListener("click",a=>{var r;a.stopPropagation(),(r=this.fpInstance)==null||r.open()})}buildShortcutsPanel(){const t=document.createElement("div");return t.className="sl-import-date-range-shortcuts",this.shortcuts.forEach((e,a)=>{const r=document.createElement("div");r.className="sl-import-date-range-shortcut-item",a===this.activeShortcutIndex&&r.classList.add("active"),r.textContent=e.text,r.addEventListener("click",c=>{c.stopPropagation(),this.handleShortcutClick(a)}),t.appendChild(r)}),t}handleShortcutClick(t){var c,h,m,b;const e=this.shortcuts[t];if(!e)return;const[a,r]=e.value();this.isShortcutTriggered=!0,this.activeShortcutIndex=t,this.selectedDates=[a,r],this.startInput.value=this.formatDate(a),this.endInput.value=this.formatDate(r),(c=this.fpInstance)==null||c.setDate([a,r],!1),(h=this.onChange)==null||h.call(this,[a,r]),(m=this.fpInstance)==null||m.calendarContainer.classList.add("sl-import-range-confirmed"),this.fpInstance&&(this.updateMonthHeaders(this.fpInstance),this.unwrapDayCells(this.fpInstance),this.padDayContainers(this.fpInstance),this.wrapDayCells(this.fpInstance)),this.updateShortcutActiveState(),this.isShortcutTriggered=!1,(b=this.fpInstance)==null||b.close()}updateShortcutActiveState(){var a;const t=(a=this.fpInstance)==null?void 0:a.calendarContainer.querySelector(".sl-import-date-range-shortcuts");if(!t)return;t.querySelectorAll(".sl-import-date-range-shortcut-item").forEach((r,c)=>{c===this.activeShortcutIndex?r.classList.add("active"):r.classList.remove("active")})}initFlatpickr(){const t=document.createElement("input");t.type="text",t.style.cssText="position:absolute;width:0;height:0;opacity:0;pointer-events:none;",this.container.appendChild(t);const e=[];this.selectedDates[0]&&e.push(this.selectedDates[0]),this.selectedDates[1]&&e.push(this.selectedDates[1]);const a=this.disabledDate,r=a?[c=>a(c)]:[];this.fpInstance=B(t,{mode:"range",showMonths:2,locale:Lt,dateFormat:"Y-m-d",defaultDate:e.length===2?e:void 0,positionElement:this.container,static:!1,position:"below",disable:r,onReady:(c,h,m)=>{if(m.calendarContainer.classList.add("sl-import-date-range-calendar"),c.length===2&&m.calendarContainer.classList.add("sl-import-range-confirmed"),m.calendarContainer.addEventListener("mouseleave",()=>{!m.calendarContainer.classList.contains("sl-import-range-confirmed")&&m.selectedDates.length===1&&m.calendarContainer.querySelectorAll(".flatpickr-day.inRange, .flatpickr-day.endRange").forEach(b=>{b.classList.remove("inRange","endRange")})}),this.customizeCalendarHeader(m),this.padDayContainers(m),this.wrapDayCells(m),this.shortcuts.length>0){m.calendarContainer.classList.add("has-shortcuts");const b=document.createElement("div");for(b.className="sl-import-date-range-calendar-content";m.calendarContainer.firstChild;)b.appendChild(m.calendarContainer.firstChild);const M=this.buildShortcutsPanel();m.calendarContainer.appendChild(M),m.calendarContainer.appendChild(b)}},onOpen:(c,h,m)=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m),requestAnimationFrame(()=>{this.positionCalendar(m)}),this.bindScrollListeners(m)},onClose:()=>{this.unbindScrollListeners()},onMonthChange:(c,h,m)=>{requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})},onYearChange:(c,h,m)=>{requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})},onChange:(c,h,m)=>{var b;this.isShortcutTriggered||(this.activeShortcutIndex=-1,this.updateShortcutActiveState()),c.length===2?(this.selectedDates=[c[0],c[1]],this.startInput.value=this.formatDate(c[0]),this.endInput.value=this.formatDate(c[1]),(b=this.onChange)==null||b.call(this,this.selectedDates),m.calendarContainer.classList.add("sl-import-range-confirmed")):c.length===1&&(this.selectedDates=[c[0],null],this.startInput.value=this.formatDate(c[0]),this.endInput.value="",m.calendarContainer.classList.remove("sl-import-range-confirmed")),requestAnimationFrame(()=>{this.updateMonthHeaders(m),this.unwrapDayCells(m),this.padDayContainers(m),this.wrapDayCells(m)})}})}customizeCalendarHeader(t){const e=t.calendarContainer.querySelector(".flatpickr-months");if(!e)return;const a=document.createElement("span");a.className="flatpickr-prev-year",a.innerHTML='<i class="iconfont icon-prev2"></i>',a.addEventListener("click",m=>{m.stopPropagation(),t.changeYear(t.currentYear-1)});const r=document.createElement("span");r.className="flatpickr-next-year",r.innerHTML='<i class="iconfont icon-next1"></i>',r.addEventListener("click",m=>{m.stopPropagation(),t.changeYear(t.currentYear+1)});const c=e.querySelector(".flatpickr-prev-month"),h=e.querySelector(".flatpickr-next-month");c&&(c.innerHTML='<i class="iconfont icon-prev3"></i>',e.insertBefore(a,c)),h&&(h.innerHTML='<i class="iconfont icon-next"></i>',h.after(r)),this.updateMonthHeaders(t)}updateMonthHeaders(t){const e=["1","2","3","4","5","6","7","8","9","10","11","12"];t.calendarContainer.querySelectorAll(".flatpickr-current-month").forEach((r,c)=>{const h=r.querySelector(".cur-month"),m=r.querySelector(".numInputWrapper");if(!h||!m)return;const b=(t.currentMonth+c)%12,M=t.currentYear+Math.floor((t.currentMonth+c)/12);m.style.display="none",h.textContent=`${M} 年 ${e[b]} 月`})}padDayContainers(t){t.calendarContainer.querySelectorAll(".dayContainer").forEach((a,r)=>{a.querySelectorAll(".sl-pad-day").forEach(C=>C.remove()),a.querySelectorAll(".flatpickr-day.hidden").forEach(C=>C.classList.remove("hidden"));const c=42,h=(t.currentMonth+r)%12,m=t.currentYear+Math.floor((t.currentMonth+r)/12),b=a.querySelectorAll(".flatpickr-day.prevMonthDay"),y=new Date(m,h,1).getDay()-b.length;if(y>0){const C=h===0?11:h-1,I=h===0?m-1:m,s=new Date(I,C+1,0).getDate(),p=a.firstChild;for(let g=y-1;g>=0;g--){const u=s-g,l=document.createElement("span");l.className="flatpickr-day prevMonthDay sl-pad-day",l.textContent=String(u),l.tabIndex=-1,a.insertBefore(l,p)}}const D=a.querySelectorAll(".flatpickr-day").length;if(D<c){const C=a.querySelectorAll(".nextMonthDay");let I=1;if(C.length>0){const p=C[C.length-1];I=parseInt(p.textContent||"0",10)+1}const s=c-D;for(let p=0;p<s;p++){const g=document.createElement("span");g.className="flatpickr-day nextMonthDay sl-pad-day",g.textContent=String(I+p),g.tabIndex=-1,a.appendChild(g)}}})}wrapDayCells(t){t.calendarContainer.querySelectorAll(".dayContainer").forEach(a=>{a.querySelectorAll(".flatpickr-day:not(.sl-import-day-wrapped)").forEach(c=>{var m;if(c.parentElement&&c.parentElement.classList.contains("sl-import-day-cell"))return;const h=document.createElement("div");h.className="sl-import-day-cell",c.classList.add("sl-import-day-wrapped"),(m=c.parentNode)==null||m.insertBefore(h,c),h.appendChild(c)})})}unwrapDayCells(t){t.calendarContainer.querySelectorAll(".sl-import-day-cell").forEach(a=>{var c;const r=a.firstElementChild;r&&(r.classList.remove("sl-import-day-wrapped"),(c=a.parentNode)==null||c.insertBefore(r,a)),a.remove()})}positionCalendar(t){const e=t.calendarContainer,a=this.container.getBoundingClientRect(),r=4,c=8,h=e.offsetHeight,m=e.offsetWidth,b=a.left+a.width/2,M=b-m/2,y=window.innerWidth-m-8,D=Math.max(8,Math.min(M,y)),C=window.innerHeight-a.bottom-r-c,I=a.top-r-c,s=C<h&&I>C;s?e.style.top=`${a.top+window.scrollY-h-r-c}px`:e.style.top=`${a.bottom+window.scrollY+r+c}px`,e.style.left=`${D}px`;let p=e.querySelector(".sl-import-calendar-arrow");p||(p=document.createElement("div"),p.className="sl-import-calendar-arrow",e.appendChild(p));const g=b-D;p.style.left=`${g}px`,s?p.className="sl-import-calendar-arrow sl-import-calendar-arrow-bottom":p.className="sl-import-calendar-arrow sl-import-calendar-arrow-top"}formatDate(t){const e=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${e}-${a}-${r}`}getDates(){return[...this.selectedDates]}setDates(t){var a;this.selectedDates=t,t[0]?this.startInput.value=this.formatDate(t[0]):this.startInput.value="",t[1]?this.endInput.value=this.formatDate(t[1]):this.endInput.value="";const e=[];t[0]&&e.push(t[0]),t[1]&&e.push(t[1]),(a=this.fpInstance)==null||a.setDate(e,!1)}getScrollParents(t){const e=[];let a=t.parentElement;for(;a;){const r=getComputedStyle(a),c=r.overflow+r.overflowY+r.overflowX;/auto|scroll/.test(c)&&e.push(a),a=a.parentElement}return e.push(window),e}bindScrollListeners(t){this.unbindScrollListeners(),this.scrollHandler=()=>{this.positionCalendar(t)},this.scrollParents=this.getScrollParents(this.container),this.scrollParents.forEach(e=>{e.addEventListener("scroll",this.scrollHandler,{passive:!0})})}unbindScrollListeners(){this.scrollHandler&&(this.scrollParents.forEach(t=>{t.removeEventListener("scroll",this.scrollHandler)}),this.scrollHandler=null,this.scrollParents=[])}destroy(){var t;this.unbindScrollListeners(),(t=this.fpInstance)==null||t.destroy(),this.fpInstance=null}}const Pt={loadingText:"加载中...",cancel:"取消",confirm:"确认",download:"下载",select:"选择",required:"必填",batchImport:"批量导入",downloadTemplateTitle:"1.下载模版,根据提示信息完善表格内容",downloadTemplateText:"下载模板",importSettingsTitle:"2.导入设置",selectBrand:"选择所属品牌",defaultBrand:"默认品牌",selectImageRatio:"选择图片比例",selectMonth:"选择月份",selectDate:"选择日期",uploadTitle:"3.上传文件",dragFileHere:"将文件拖到此处,",or:"或",uploadLinkText:"点击上传",uploadHint:"文件仅支持扩展名:.xls,.xlsx",tipsTitle:"提示信息",month:"月",startDate:"开始日期",endDate:"结束日期",to:"至",pleaseSelectFile:"请选择文件",maxFilesLimit:"最多只能上传 {max} 个文件",fileFormatNotSupported:"文件 {name} 格式不支持,仅支持 {types}",fileSizeExceeded:"文件 {name} 超过最大限制 {size}{unit}",fileTypeError:"请上传文件",fileSizeError:"文件大小超出限制",uploadFailed:"上传失败",uploadFailedRetry:"上传失败,请重试",uploadSuccess:"上传成功",uploading:"上传中...",processingFailed:"处理失败",fileUploadingCannotDelete:"文件正在上传中,无法删除",filesUploadingCannotClear:"有文件正在上传中,无法清空",filesUploading:"有文件正在上传中,请等待上传完成",filesUploadFailed:"有 {count} 个文件上传失败,请重新上传",waitForUploadComplete:"请等待所有文件上传完成",chunkedUploadConfigRequired:"分片上传需要配置 chunkedUpload",uploadTitleBase:"上传文件",uploadTitleTemplate1:"上传编辑好的文件",uploadTitleTemplate2:"导入菜品图片文件",uploadTitleTemplate3:"导入菜品信息文件",uploadTitleTemplate4:"导入菜谱方案文件",uploadTitleTemplate5:"导入价格调整文件",uploadLinkTextDefault:"点击上传",uploadLinkTextImport:"点击导入",uploadHintExcel:"文件仅支持扩展名:.xls,.xlsx",uploadHintImage:"文件仅支持扩展名:.rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["图片名称需要与菜品名称一致","上传文件仅支持ZIP、RAR压缩包文件(暂不支持win11自带工具压缩的文件),文件大小不超过100M","图片支持jpg、png、jpeg格式,单张大小不超过2M"],tipsTemplate3:["菜品以代码为唯一标识进行集团菜品的匹配,请仔细核对菜品代码","模版支持导入名称、价格、自定义分类,其余菜品的属性获取集团菜品库"],tipsTemplate4:["最多支持导入五个菜谱方案","菜品以代码为唯一标识进行集团菜品的匹配,请仔细核对菜品代码","模版支持导入名称、线上可点分类、价格和自定义分类,其余菜品的属性获取集团菜品库"],tipsTemplate5:["价格调整将覆盖现有价格,请谨慎操作","支持批量调整入库价格和出库价格"],tabCoverImport:"覆盖导入数据",tabIncrementImport:"增量导入数据",tabInPrice:"合批修改入库价格",tabOutPrice:"合批修改出库价格",imageRatioOriginal:"原图",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},nt={loadingText:"載入中...",cancel:"取消",confirm:"確認",download:"下載",select:"選擇",required:"必填",batchImport:"批量匯入",downloadTemplateTitle:"1.下載模板,根據提示資訊完善表格內容",downloadTemplateText:"下載模板",importSettingsTitle:"2.匯入設置",selectBrand:"選擇所屬品牌",defaultBrand:"預設品牌",selectImageRatio:"選擇圖片比例",selectMonth:"選擇月份",selectDate:"選擇日期",uploadTitle:"3.上傳檔案",dragFileHere:"將檔案拖到此處,",or:"或",uploadLinkText:"點擊上傳",uploadHint:"檔案僅支援副檔名:.xls,.xlsx",tipsTitle:"提示資訊",month:"月",startDate:"開始日期",endDate:"結束日期",to:"至",pleaseSelectFile:"請選擇文件",maxFilesLimit:"最多只能上傳 {max} 個文件",fileFormatNotSupported:"文件 {name} 格式不支持,僅支持 {types}",fileSizeExceeded:"文件 {name} 超過最大限制 {size}{unit}",fileTypeError:"請上傳文件",fileSizeError:"文件大小超出限制",uploadFailed:"上傳失敗",uploadFailedRetry:"上傳失敗,請重試",uploadSuccess:"上傳成功",uploading:"上傳中...",processingFailed:"處理失敗",fileUploadingCannotDelete:"文件正在上傳中,無法刪除",filesUploadingCannotClear:"有文件正在上傳中,無法清空",filesUploading:"有文件正在上傳中,請等待上傳完成",filesUploadFailed:"有 {count} 個文件上傳失敗,請重新上傳",waitForUploadComplete:"請等待所有文件上傳完成",chunkedUploadConfigRequired:"分片上傳需要配置 chunkedUpload",uploadTitleBase:"上傳檔案",uploadTitleTemplate1:"上傳編輯好的檔案",uploadTitleTemplate2:"匯入菜品圖片檔案",uploadTitleTemplate3:"匯入菜品資訊檔案",uploadTitleTemplate4:"匯入食譜方案檔案",uploadTitleTemplate5:"匯入價格調整檔案",uploadLinkTextDefault:"點擊上傳",uploadLinkTextImport:"點擊匯入",uploadHintExcel:"檔案僅支援副檔名:.xls,.xlsx",uploadHintImage:"檔案僅支援副檔名:.rar .zip .jpg .png .jpeg",tipsDefault:["這裡寫一些提示資訊"],tipsTemplate1:["這裡寫一些提示資訊"],tipsTemplate2:["圖片名稱需要與菜品名稱一致","上傳檔案僅支援ZIP、RAR壓縮包檔案(暫不支援win11自帶工具壓縮的檔案),檔案大小不超過100M","圖片支援jpg、png、jpeg格式,單張大小不超過2M"],tipsTemplate3:["菜品以代碼為唯一標識進行集團菜品的匹配,請仔細核對菜品代碼","模板支援匯入名稱、價格、自定義分類,其餘菜品的屬性獲取集團菜品庫"],tipsTemplate4:["最多支援匯入五個食譜方案","菜品以代碼為唯一標識進行集團菜品的匹配,請仔細核對菜品代碼","模板支援匯入名稱、線上可點分類、價格和自定義分類,其餘菜品的屬性獲取集團菜品庫"],tipsTemplate5:["價格調整將覆蓋現有價格,請謹慎操作","支援批量調整入庫價格和出庫價格"],tabCoverImport:"覆蓋匯入資料",tabIncrementImport:"增量匯入資料",tabInPrice:"合批修改入庫價格",tabOutPrice:"合批修改出庫價格",imageRatioOriginal:"原圖",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Ut={loadingText:"読み込み中...",cancel:"キャンセル",confirm:"確認",download:"ダウンロード",select:"選択",required:"必須",batchImport:"一括インポート",downloadTemplateTitle:"1.テンプレートをダウンロードし、指示に従ってスプレッドシートを完成させる",downloadTemplateText:"テンプレートをダウンロード",importSettingsTitle:"2.インポート設定",selectBrand:"ブランドを選択",defaultBrand:"デフォルトブランド",selectImageRatio:"画像比率を選択",selectMonth:"月を選択",selectDate:"日付を選択",uploadTitle:"3.ファイルをアップロード",dragFileHere:"ファイルをここにドラッグ、",or:"または",uploadLinkText:"クリックしてアップロード",uploadHint:"ファイルは拡張子のみサポート:.xls,.xlsx",tipsTitle:"ヒント",month:"月",startDate:"開始日",endDate:"終了日",to:"から",pleaseSelectFile:"ファイルを選択してください",maxFilesLimit:"最大 {max} ファイルまでアップロード可能",fileFormatNotSupported:"ファイル {name} の形式はサポートされていません。{types} のみ対応",fileSizeExceeded:"ファイル {name} が最大サイズ {size}{unit} を超えています",fileTypeError:"ファイルをアップロードしてください",fileSizeError:"ファイルサイズが制限を超えています",uploadFailed:"アップロード失敗",uploadFailedRetry:"アップロードに失敗しました。再試行してください",uploadSuccess:"アップロード成功",uploading:"アップロード中...",processingFailed:"処理に失敗しました",fileUploadingCannotDelete:"ファイルをアップロード中のため削除できません",filesUploadingCannotClear:"ファイルをアップロード中のためクリアできません",filesUploading:"ファイルをアップロード中です。完了までお待ちください",filesUploadFailed:"{count} 個のファイルのアップロードに失敗しました。再アップロードしてください",waitForUploadComplete:"すべてのファイルのアップロードが完了するまでお待ちください",chunkedUploadConfigRequired:"チャンクアップロードには chunkedUpload の設定が必要です",uploadTitleBase:"ファイルをアップロード",uploadTitleTemplate1:"編集済みファイルをアップロード",uploadTitleTemplate2:"料理画像ファイルをインポート",uploadTitleTemplate3:"料理情報ファイルをインポート",uploadTitleTemplate4:"レシプトプランファイルをインポート",uploadTitleTemplate5:"価格調整ファイルをインポート",uploadLinkTextDefault:"クリックしてアップロード",uploadLinkTextImport:"クリックしてインポート",uploadHintExcel:"ファイルは拡張子のみサポート:.xls,.xlsx",uploadHintImage:"ファイルは拡張子のみサポート:.rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["画像名は料理名と一致する必要があります","アップロードファイルはZIP、RAR圧縮ファイルのみサポート(Windows11付属ツールで圧縮されたファイルはサポートされません)、ファイルサイズは100Mを超えないでください","画像はjpg、png、jpeg形式をサポート、単一サイズは2Mを超えないでください"],tipsTemplate3:["料理はコードを唯一の識別子としてグループ料理と一致させ、料理コードを慎重に確認してください","テンプレートは名前、価格、カスタム分類のインポートをサポート、その他の料理属性はグループ料理データベースから取得"],tipsTemplate4:["最大5つのレシピプランのインポートをサポート","料理はコードを唯一の識別子としてグループ料理と一致させ、料理コードを慎重に確認してください","テンプレートは名前、オンライン注文可能分類、価格とカスタム分類のインポートをサポート、その他の料理属性はグループ料理データベースから取得"],tipsTemplate5:["価格調整は既存価格を上書きします、慎重に操作してください","仕入価格と販売価格の一括調整をサポート"],tabCoverImport:"上書きインポートデータ",tabIncrementImport:"増分インポートデータ",tabInPrice:"一括仕入価格修正",tabOutPrice:"一括販売価格修正",imageRatioOriginal:"元画像",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Rt={loadingText:"Memuat...",cancel:"Batal",confirm:"Konfirmasi",download:"Unduh",select:"Pilih",required:"Wajib",batchImport:"Impor Batch",downloadTemplateTitle:"1. Unduh template dan lengkapi spreadsheet sesuai petunjuk",downloadTemplateText:"Unduh Template",importSettingsTitle:"2. Pengaturan Impor",selectBrand:"Pilih Merek",defaultBrand:"Merek Default",selectImageRatio:"Pilih Rasio Gambar",selectMonth:"Pilih Bulan",selectDate:"Pilih Tanggal",uploadTitle:"3. Unggah File",dragFileHere:"Seret file di sini, ",or:"atau",uploadLinkText:"klik untuk mengunggah",uploadHint:"Hanya mendukung ekstensi file: .xls,.xlsx",tipsTitle:"Tips",month:"Bulan",startDate:"Tanggal mulai",endDate:"Tanggal akhir",to:"hingga",pleaseSelectFile:"Silakan pilih file",maxFilesLimit:"Maksimal {max} file yang diizinkan",fileFormatNotSupported:"Format file {name} tidak didukung, hanya {types} yang diizinkan",fileSizeExceeded:"File {name} melebihi ukuran maksimal {size}{unit}",fileTypeError:"Silakan unggah file",fileSizeError:"Ukuran file melebihi batas",uploadFailed:"Unggah gagal",uploadFailedRetry:"Unggah gagal, silakan coba lagi",uploadSuccess:"Unggah berhasil",uploading:"Mengunggah...",processingFailed:"Pemrosesan gagal",fileUploadingCannotDelete:"File sedang diunggah, tidak dapat dihapus",filesUploadingCannotClear:"File sedang diunggah, tidak dapat dikosongkan",filesUploading:"File sedang diunggah, harap tunggu hingga selesai",filesUploadFailed:"{count} file gagal diunggah, silakan unggah ulang",waitForUploadComplete:"Harap tunggu semua file selesai diunggah",chunkedUploadConfigRequired:"Unggah chunk memerlukan konfigurasi chunkedUpload",uploadTitleBase:"Unggah File",uploadTitleTemplate1:"Unggah File yang Diedit",uploadTitleTemplate2:"Impor File Gambar Menu",uploadTitleTemplate3:"Impor File Informasi Menu",uploadTitleTemplate4:"Impor File Rencana Resep",uploadTitleTemplate5:"Impor File Penyesuaian Harga",uploadLinkTextDefault:"klik untuk mengunggah",uploadLinkTextImport:"klik untuk mengimpor",uploadHintExcel:"Hanya mendukung ekstensi file: .xls,.xlsx",uploadHintImage:"Hanya mendukung ekstensi file: .rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["Nama gambar harus sesuai dengan nama menu","File unggah hanya mendukung file terkompresi ZIP, RAR (file yang dikompresi dengan tools bawaan Windows11 tidak didukung), ukuran file tidak melebihi 100M","Gambar mendukung format jpg, png, jpeg, ukuran tunggal tidak melebihi 2M"],tipsTemplate3:["Menu dicocokkan dengan menu grup menggunakan kode sebagai identifier unik, harap periksa kode menu dengan cermat","Template mendukung impor nama, harga, kategori kustom, atribut menu lainnya diperoleh dari database menu grup"],tipsTemplate4:["Mendukung impor hingga lima rencana resep","Menu dicocokkan dengan menu grup menggunakan kode sebagai identifier unik, harap periksa kode menu dengan cermat","Template mendukung impor nama, kategori dapat dipesan online, harga dan kategori kustom, atribut menu lainnya diperoleh dari database menu grup"],tipsTemplate5:["Penyesuaian harga akan menimpa harga yang ada, harap beroperasi dengan hati-hati","Mendukung penyesuaian harga pembelian dan harga jual secara batch"],tabCoverImport:"Timpa Data Impor",tabIncrementImport:"Data Impor Incremental",tabInPrice:"Modifikasi Harga Pembelian Batch",tabOutPrice:"Modifikasi Harga Penjualan Batch",imageRatioOriginal:"Asli",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},zt={loadingText:"Loading...",cancel:"Cancel",confirm:"Confirm",download:"Download",select:"Select",required:"Required",batchImport:"Batch Import",downloadTemplateTitle:"1. Download template and complete the spreadsheet according to the instructions",downloadTemplateText:"Download Template",importSettingsTitle:"2. Import Settings",selectBrand:"Select Brand",defaultBrand:"Default Brand",selectImageRatio:"Select Image Ratio",selectMonth:"Select Month",selectDate:"Select Date",uploadTitle:"3. Upload File",dragFileHere:"Drag files here, ",or:"or",uploadLinkText:"click to upload",uploadHint:"Supports batch import, file size not exceeding 10MB",tipsTitle:"Tips",month:"Month",startDate:"Start date",endDate:"End date",to:"to",pleaseSelectFile:"Please select a file",maxFilesLimit:"Maximum {max} files allowed",fileFormatNotSupported:"File {name} format not supported, only {types} allowed",fileSizeExceeded:"File {name} exceeds maximum size {size}{unit}",fileTypeError:"Please upload file",fileSizeError:"File size exceeds limit",uploadFailed:"Upload failed",uploadFailedRetry:"Upload failed, please retry",uploadSuccess:"Upload successful",uploading:"Uploading...",processingFailed:"Processing failed",fileUploadingCannotDelete:"File is uploading, cannot delete",filesUploadingCannotClear:"Files are uploading, cannot clear",filesUploading:"Files are uploading, please wait for completion",filesUploadFailed:"{count} file(s) failed to upload, please re-upload",waitForUploadComplete:"Please wait for all files to complete uploading",chunkedUploadConfigRequired:"Chunked upload requires chunkedUpload configuration",uploadTitleBase:"Upload File",uploadTitleTemplate1:"Upload Edited File",uploadTitleTemplate2:"Import Dish Image File",uploadTitleTemplate3:"Import Dish Information File",uploadTitleTemplate4:"Import Recipe Plan File",uploadTitleTemplate5:"Import Price Adjustment File",uploadLinkTextDefault:"click to upload",uploadLinkTextImport:"click to import",uploadHintExcel:"File only supports extensions: .xls,.xlsx",uploadHintImage:"File only supports extensions: .rar .zip .jpg .png .jpeg",tipsDefault:[],tipsTemplate1:[],tipsTemplate2:["Image name must match dish name","Upload files only support ZIP, RAR compressed files (files compressed with Win11 built-in tools are not supported), file size not exceeding 100M","Images support jpg, png, jpeg formats, single size not exceeding 2M"],tipsTemplate3:["Dishes are matched with group dishes by code as unique identifier, please carefully check dish codes","Template supports importing name, price, custom category, other dish attributes are obtained from group dish database"],tipsTemplate4:["Support importing up to five recipe plans","Dishes are matched with group dishes by code as unique identifier, please carefully check dish codes","Template supports importing name, online orderable category, price and custom category, other dish attributes are obtained from group dish database"],tipsTemplate5:["Price adjustment will overwrite existing prices, please operate with caution","Support batch adjustment of purchase price and sale price"],tabCoverImport:"Overwrite Import Data",tabIncrementImport:"Increment Import Data",tabInPrice:"Batch Modify Purchase Price",tabOutPrice:"Batch Modify Sale Price",imageRatioOriginal:"Original",imageRatio4to3:"4:3",imageRatio3to4:"3:4",imageRatio1to1:"1:1",imageRatio16to9:"16:9"},Ye=bt,Be={zh_CN:Pt,en_US:zt,ja_JP:Ut,zh_HK:nt,zh_TW:nt,id:Rt};class Nt{constructor(){S(this,"currentLocale",Ye);S(this,"messages",Be[Ye])}setLocale(t){this.currentLocale=t,this.messages=Be[t]||Be[Ye]}getLocale(){return this.currentLocale}t(t,e){const a=this.messages[t]||t;return Array.isArray(a)?a.join(`
1425
1425
  `):e?a.replace(/\{(\w+)\}/g,(r,c)=>String(e[c]||r)):a}tBatch(t){const e={};return t.forEach(a=>{e[a]=this.t(a)}),e}}const qe=new Nt,L=(o,t)=>qe.t(o,t),it=o=>qe.setLocale(o),jt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACUCAYAAADlL3kbAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAABa9SURBVHic7Z1bb9xGloDPqSre+qK7HFmxE8fwSEFmBpuFNpiZeLArYGcWyMM85v/o/+hpn/KQBBAW2JldzArwQ5yMvR7HWDttO9HVlNjdZNWpfei0TLX6QrJJNrvFDzDgbpHFYvfpw1PnVgglkdje3hbh1y9eOLz3GM8Tl97z60dXjgEAqDRR9Hu/i7RF3/MAAJjXJsa4vnJtR8ve9/DI0IZRp6RzIlJIFYtdmV/AL41BsnXxmglb9RtftJVq3F89ht3dvn9PAqY1UH922Nq9r5dlmwxgTANR4usN+lCGIQwV+ZzwF0Lks3HmWhIi9L1Lbngnz/ZOUhs6rYH6sb29x2SbDKiAW9G6Nc5YJFv80j/y+86dcZ+EodQowZUB5+F/48ytZAg2nVUQmwAAFROGPnHikupgveztbdPK7S/B1IYlV11v4fSGN+jYW7eafYVtb2/vyuNwUvSaDtDHfOg1HYLAZXopGEuLq8Bhddm6+LG6wiZuNAl6TINKRSoAgPn5H6ler2uI+fn1u79+uK6Lp6c3hio+zxO8UpHqBN6Y0hYc2uqKqTMumT8aV27fXwcAWLDmDp88+aKd9fVKisXK5v06eFAHADAdw2883jtIa+xMzYYw8/M/UoTDSmYY5rVTlYHchLf7GCu5vvTzXIxDbsJbcj0Z5RYch1J4S6aW3IS3SF6DktkgU1fZ9WOHbW/vXVIIUdxKYcKuNtN0SQhn4FphkHuxS78oYBgpm+j79UQKrNHYagHsTHQRXijhfe+93y8OCklOkn5BjHBI9C1fwjd/733PBoA30S8WGtVXAKCCgYeeXLlWL4PPfXu9o+hzC7FwZ887eQYjo2VECgGz+ToLJbxSCg43m57/I1u48kfGNGNm3186437feH8X0ZKJ4undH5IwlCJSSMq8+BaYsNWkwsjhUPmoew/Tew9JqCG2zrRrVwxDRInzUsVi0Oz8iNKOZBZLeC3O6UdawNZxX1U16BtSP/8bRAT9M5ghYZV+Uqu1QjVXS1XVCPeyeRD+HEbde9q41WoNpKpJADfHy/alUMILAIBckNbeVCfF8DdnqdqCOodIaGQ0IUIxkpYKZVuWzB5ZJj2VwlsytZTCWzK15Ca8UdPtSkqikpvwuq5bCCO/JF8Y9zMLZGRcSfFW28aJMpUUF0sGsRZgUX3QSSicQKHXLFMnSyKRm/D2lscMgjGjTFqfUdI2IXIT3iBwC6flS/IlbRMiU4EKZzWNW4RYUtJL4bQhUVC4OZUkJ+26tUtjZzVwL1HLQXTFKTX0DBE2FZJm9w0cO83Beom6SOsyqJFIyfTSrw1VWuQW9SJSozUqEZIWrFS9xaWFqJNqGFfY0+ltKFp1REkykIvEAtjt8pMWpUCVJILx/lUtuc4hy8HD7TQjmQ0AoEmWP6gpIInP1nSXpmfBFmZU7VQ3D8IuSJZ+SfHJVHjxyHjrJonRK7dkdsiyY06m3gbDqJMPndLqqD4+ZXAOfpazml2EqNiMMUcZASfVcVMyLpWQEAD4zXZbp/bJmj5MvIlMbq6ytN0kJW/h3HLAsmqKAq5AASgGAJ2PmxQTPoIAsB1eJSmk/2YcIeatQJFRjGVJprPoNjsGABDucM1bJqsnpFqrkcHmiUbn2XYE2V6Caq2Wz+SG768xLrn9hHo39igZH23bc6hUbEFEpWp5CnBW5JfbUBmuebv9e7Htl8noERCiYjPAStLzUamaZaEZ9zyK6cqM6iJNQqbCG+6GPqop3MWEGC81dASUwPlxx5C8HnuMuIlT47aXGkamwpukG3oLWKl5R9DRmOP7w4kCblnzsbVvHLJ0kWYqvEkWYciSx86vC1pXq2mN1YSWk9ZYeZOp8CapGGYi3ZzPWUQJlpqL0zKndw+6YjjsSmJBpFL73mSARlpj5U3ZdKQHy0ITazy1x3I2pJf/kfUCeSbKgKal6QiRUwNp1oWo2JOeyyAYp/RCs9jOdIEczj4b5S6NPXaag/USLgOSshlJW5DMLiIzCqUCJrk24WdXlKwN39NhUqSpLTt5D9NJbtpw1MYdRdgtiM8thpz+hBYZS0UUYPJUM73R/Fhj8VZQmAV1fsIbSkwvIkoFDJW+ZOsSBbyIAqxUu8mYMbYQMU4yzUyzvMlUeKepS07HWX91IUQUcEvTolIF6yfRbp+NO4SQfoxtipIxteHhcJec0UnJOxMVDkQYmCdAignHWRw7HJsmSrWbmvPEAqw5P0uidWPnNmRYeFsYbdK7+V6eWBaa3YXaIAKmLG3bc/nNKgLnZ2cE2ot7mub8DM7PEgn+OE1hoi7ao5JtPm9I20bN67TIz92+bKEVyS3GACtFSyXEVusNl3gCEXJCGDOUqVtHSQU3CWGzIelum4MQAAD37n1meZ7gUbfkvHNn2xbC0U+efDFkl7LpQKmACag63cqDUaBSNahxrc/UeeaTi4iUXgsktCwLTa2r1XAZkDB00PaVcsButr1TP29XQSerrJXJ2GJl8379xHtTBw6wvrHnNx7DwbAT1te3V85UYIIKYPHuH86Pn351GuVCWW5pNA58brECKuaiQpp1IVBJ6WXzrSSkY8Oe+Z0awI5eCVqdx2t72G6IUwqDFrt4DPrNwBy+cNphPg8ubEMeNKvDjvccXfiMJQ5BokiaEjhv22Jq8wKSEretf5Ywifytk5oxPdxs2KFw1pepDH/Y8UKxyNGbUTuUZ4FloUkqaYYWYcAqC0XzAV8n2Mmz7TdQAVdyw3t/xRtqMgAA3F6SR8pwziU3vMb91eOhg2e4mUYaEDljLb6KGsS4LgiAHTp41NkEef/Z6BP29/cDAOjYuRGOj0tefRuUChjaw91jUSAKuIW06KvgiPNyP408KYyfN28u5zGMRxGDGNeBwghv2g7sYfTLYxiXQgYxZpzchHfUNkZpO7CHYZo1K82E7i5FDGKkTQuxMOuY/IS3QIs3xnhmLjxUqlb8SozkjNNcOm0KYzbkRZQ8hrEpeCVGnmRf+v755/zevc+srC5SJKLmMYzLdQ1i5Alb/Wi7tvJfjXdO2m+W33vv94uTnlCWKBUwBtmZDJdJP4ghaw4ny5rn3Cp85DIPmD5X9e4LT2tna2srE22RZRVpVDrusfw6r6cZxODcciwyljgyByyrNqnASKHKgHrDw/v7f8pkckVYsHHNctdY41ZidLVtuI1p90eR+mRjcGZFE+JwU/HUq4dPPll1oQKu6Rh+Jzw8OiVyGrEsNKP0sM2CpEGMS9q2d0wK+Ky75UYhYHdXHQC4AOA2Jj2bDCFyajBB5d8NYmCrNbJuTNYczgKqITIHaHBuEypVY9xSSrVTrCaeHq6Fqyzcj2GSRAliDNO2fcnZ/kWMpwGy3M6hcMLLg/T9gmnmMYzLoCBGP9s2Cl2bOvWJDiBu8lHau16GKZzwpk0WeQxj0xPEsCw0Y2nbHkgxMQ32b9QG41HJbTegSWGaNYsKuDGhEjhvcaQWWrYPWBlm20YBlaqZFvp5NRHhJ+7EF/Yzr3mzzGMYD0If7aVx9pXoRfJ6bv3VODci2b7hjSTTZqbDw7nkMRQIooA77fH3qkiTLHeBuhQeXrz7h0Ld+LjklcdQJCTX5jTYv2lwKTzMg2a1u4H1tJNvHkOxQKVqRUwKSrsT6JXw8N7edmpqPk6vhrS7SOadx1A0rkNlMzv5ZNVVhnM+a+HhSeQxFAmigFd8PtNlSQJ2d9UxwOkxAMxKeNiy0PQnlMdQJAKmLKjWann2JsuT/DZUyXHX93H7McwSqNTE0iezJjfhzTJMGKYoeQxFYpKNUbLsiD9zQYoi5TEUBaKAs4Bm7mk0U8JbyDyGgsCRObNW1TxTwptVP4aZQZr1WbJ/L8LDk94TokubmYkzj4qbx1AcLDKW8twcJtPchm54eOX2l2vTHB6+bnkMSSEKOFZq9QiHpkKmuQ294eGOFp4+rmMeQ1Jmxf5lpsXfJpIypmH3lxOv8o3Ldc5jSIy0p97/yxr/sHpsa2oJiwU15MfTGB6+7nkMyehsT5v1VUwzu6R1Abu76gXAUVYXiIrpLimfHwFiK7bm55o5BIXphTE1EAU8akVzF8RzDRA9YU0IR4PKZm/uwqU/IhcUV3qV9+anjKYz88R9XHm6XUHUS02pnOW1DUszZhCBwbCzeQ4Sk5prj5B5TEFw4v0gCSyP8eRepEEUTnhLiocy+SLXtEoAK1oKUwMBIAJpBFCdH4DWnZ+BBm2AAgeBljUAKOUDgA8ksbW09tFiwOmV+8PfDtOYVym8JX1B5FqiuosC10CRNa7a1Kht0PqukHB36eZmwBC+P7hZewqdPU4SUYjAREmxQGRrxPRvAfF9rSD12kZNaCiFG0uNs39dWv/V7aTjFEbz+vUjDrG3gC5JE23qd7XGO5p0LiVEmtAAkB8vrH14V3H4Jq45kVt4OMswYcn4KAYfKIUbHYHKF9QwJyR8urK+uRnnPLb60Xbtxv/830oW4eHwJipRw4RaydKUyZGgYgpi+GtAfB9hspulKIUbC6sffQwRe0Qz7iuHZGeH8LTDw+GevFF7s2ptl8GGnBBC2bwl/0kjLE96Ll2Q0e3lF96/rK9vjczLZpeaPmcYHo7apyq8t3FJdnAuHZ+MjzXqwuWEEGinrbxPRwkwu1l3T01l+ExIlXZ4uAit/Euu4tvCCJjxj0UU3C5dAR5mQoif9xIeuWF2oglULAbNjhvPdd3SHCgITKpfaw2FTx8l0M7yD+7HhwB/7ff33BZHp6c3yoVYETBwAzVMTT8H0mxtkBciU4GK0zGnJHuUyRcl6XezGh+5eKCJPU97XKVwo18wo9SG1wRErlHqzazcYcjFg6PGN89Pfvo2EwFGpa5o38IJL3rNMpiRAWTwW1kt0LqC232dhQATaKdX+2YqvER+7PEZi7fnQclofFsYRPJuFmP3Cm6Xk5++fQCA36d6rR7tGxKuDMLD9La6wfPEUPu3DB9nB/OD26B16uuPQYLb5fj1d99wrh+ndT0C7YQXb+zOnW37xge/eWfl/a/fWf1oe2JdVbKsMr3uIOO3Uh9zhOB2OWg8epSmAGvFLkwH5vtQIyk4EKF2g7lprR4u6Y802BJonepTNargdklTgAm0s76+sQIAIKAGAN320hfh4d00rpOINmOOXa9MTb8xIsVAW4kCMIwPD4Uzf/CedFobTFuji0518/wGpbS0QaYDLvmDn15/8yruuQeNR49W1jdBKdwYdx4tEu8AwIGokOOCgrq0mly0pZtV9fCoKtLGfbt96y/UajLTAWhdyjMmNdxevjgupZ68jBkx8iuSpUQPEtx+AttC1MhF7+engDpCqZVkdrcOpwcCfgNg/OUEMh3oVvCXn44fnV7549aWcaUios97aQkwan0TAB5mGrJduX1/vfv/BWvu8MmTL9pR5gawk+G8HuLW1lMGALC/f5cApq9PRVTW1v59ua2bvx13nK7gHh8/vSK4S+u/us0gqBw0Hj269P6NDz+1RfVBo7F/pcRgZX1zc2wNXPX/ozCVFCE0wE6mArW/362T34dJmkhZ09S/qDMY/2HEEL4/GCC4WsmPgcMVexYRKz9nhv25V4APGo8eLax9uDZOmJrO+XLhghQl6cHRSKWL0MHN2tPe9y4EdwjDUhu1VmMFMTgaTim8MwzxGN1BhrD0sr126XUEwb2YwwABFohjJcAjyEpuZsP8/I+lHzdvFKVS1oVKbc6/8wuDVdWhbtsfaCljVfwSaKelz/55ZX3ze2UHr3Tb/kCTWh5nHakZMzIVXiZsRbLFAQDq9frMLoyKCtdoUAqeBgLtMOC/hHMOCMl0kCY0FMAGnJsbCAQ6dq+enjkRGNmGh0smCoGe2c6ZDLXD7t37zMojPJzmzpolJQAAzPOa9XzCw9PXOnXaYYDNCIdNJUhMZhoeFoZSPjFW0bq1vv6nimm6JIRTKNv31q2mcl0XR5UphbPigsBleikYy2hTQYtx4+3GivykSpxbF5/NqM+qXzX2ixeXm0Ufed97oGAmTQfNtXcpPEym8FLXkEToVUCCd7TgK4CserUm5eTvAAA2AIxoUct7/j9mayo0q1w01ZxCMjXn58o8P1NwfvH3UZ9VZ969XD5eA2OQcIFVdAiZJ34O2UYJ28bGx6ANACZ4kNsGHtMC85WSAMegGUDsjsQ/jyHsgTkYRD7jkrXUjAovUxBk6io7ePSf7tbWVitu5XC/xPV+24CqwGF12boyNpFCqlh9r8m8NoUbrXiOlqPmY7pLqvf6g6595V76jG+6S5eErp+J0GsW7O3tjZxnLyvrm3MAeDPuedOA0kEz8yDF/hj9V6NwnOXgE7z2kyfjj6Hs4BWcm2OnIBaRKp97Vfp2Z5jjp09PZ9HjwACbjca+VwrvjKMEZtINaZJoxJdQxNL3knSpaPli0nNIm4DTKyiFtwhkG5ZvNB4fzJLpgEwH3Q7q4t69z6w36miByGRY5e5P3+6dTXqC14Mdtr6xt+S3vzZs9bv2ixd/yWwvPOT0HFKoHSsCDOGiF0SO4eGSMCubX1b9ZmACEbaQ2VGaKSfFhNrzWdC+yHQQToxnVFGXw5xTuPfwNCLbxiUlUancyKypdqOx72nOH0U4tNig8TBc1MlsyV1hsYAJqaACmVUPl1zm5JNV11SGDwAgueE9efKbTP3hR41vplr7aoQ3vb0iQlp3h5WCOwny+9zjlO/EgQE2D19/91X3df3dD5eFhE/TvIYU8Ofera7KbuXXjFTKzvuC30O1/dxpCaMl2Uaam7Rwrh/3ltZDKbzXk+W1jU9Is7UIh04cTex5p+PkVUo/7zXk8N36g2mwfxlg8+Q95+Ggv5dusevIy5e0OP/+K9LypoZ0yuPThgE2LV75s/t4f2C6bim81xTXfRkUVYC7gtuvVVSYUnivMa77Mmh++P7zymmwCAiF6MzJkF4d3qr99zCN2wW3traM50diKWp4+M6dbdvD5rxoO6pScdxRzfNWNu/XmS8rou2oxv3VY9jdHeKM32ELd/bmhFaOreTokOnnn/OFv/5UF1o5UebeDYUD1EA76jzte128+4d5HjSrpjL8kfcamrvilnf89Kur3RdzJDsvRHQGeRUGHo+4uSQBDNAaQYLp/dtvmvDttwOibDtMzP99RStkihH38dw6P/nhvP+xHWFptdoLmhhTjLj5ssVaJ89ag45fXYUq40ENtEaJKBZqN5TrvhzovF9src8J2a6C1gg+Wes3fuUfHT0ZKDC2fWtRAhiaJGPki/M/ftpK8159/3weACDKvb53trSgSFVAa2QkzVFzzxrPPTw0FlYOBeFK3mYEA2wCFw8PG99d6Yk29DxpNd+aDkQ4Mjwc2meCyIzlraj4w5vZGsblHr5+3R5q1jhCxvqQw/dKZLKh9/r5QwzfK+NmrEACMjH0cyS6HJaXsjlxt6X7w98OD19/9xWBeohMZ14pywCbyMWDw9fffRWn0/rF+RXtnAJjGhjTo8PDO4R14w0wppmQCqvcHTb4kydftLshUCakunnTHfpobNy/e3G86Rj+waM/DtR0AAAVctxuEWInxDr8sX5xrwAANp0NvdfdXRW+V1vGu9e7i8dDFxsvfnfrNHyvz57tDdTSeXP6+n+fHq3XvuZcP85CiBlgk3P9OKnQdkkYHu7moMY5PnoIdHt7W8QrOIwbYo17r1mNneT4/Km/++Gyodgaan0zaQspBtjUiC9tJl83Go9Tqe6Y+KOqZLpYvHt3ns75MkfDIQ4G01RBhRXNSAAAkMYmYxAgUaBBeEoHTVZVh8dPrzanHpf/BzTmoK+dHmeiAAAAAElFTkSuQmCC";class Ht{constructor(t){S(this,"context");this.context=t}updateContext(t){this.context={...this.context,...t}}get showSettingSection(){const t=this.context.currentConfig;return t.showBrand||t.showImageRatio||t.showMonth||t.showDateRange}get uploadSectionIndex(){return this.showSettingSection?3:2}get tipsList(){return this.context.currentConfig.tips}get imageRatioOptions(){return Xe(L)}get monthOptions(){return Array.from({length:12},(t,e)=>e+1)}render(){const t=this.context.currentConfig,e=t.tabs&&t.tabs.length>0;return`
1426
- <div class="import-dialog-vanilla-overlay">
1427
- <div class="import-dialog-vanilla-modal" style="width: ${this.context.width}">
1428
- <div class="import-dialog-vanilla-header">
1429
- <span class="import-dialog-vanilla-title">${this.context.dialogTitle}</span>
1430
- <span id="import-dialog-close-btn" class="import-dialog-vanilla-close">&times;</span>
1426
+ <div class="sl-import-dialog-vanilla-overlay">
1427
+ <div class="sl-import-dialog-vanilla-modal" style="width: ${this.context.width}">
1428
+ <div class="sl-import-dialog-vanilla-header">
1429
+ <span class="sl-import-dialog-vanilla-title">${this.context.dialogTitle}</span>
1430
+ <span id="sl-import-dialog-close-btn" class="sl-import-dialog-vanilla-close">&times;</span>
1431
1431
  </div>
1432
- <div class="import-dialog-vanilla-content">
1432
+ <div class="sl-import-dialog-vanilla-content">
1433
1433
  ${e?this.renderTabs():""}
1434
1434
  ${this.renderDownloadSection()}
1435
1435
  ${this.showSettingSection?this.renderSettingSection():""}
@@ -1440,48 +1440,48 @@
1440
1440
  </div>
1441
1441
  </div>
1442
1442
  `}renderTabs(){return`
1443
- <div class="import-dialog-vanilla-tabs">
1443
+ <div class="sl-import-dialog-vanilla-tabs">
1444
1444
  ${this.context.currentConfig.tabs.map((e,a)=>`
1445
- <div class="import-dialog-vanilla-tab ${this.context.activeTabIndex===a?"active":""}"
1445
+ <div class="sl-import-dialog-vanilla-tab ${this.context.activeTabIndex===a?"active":""}"
1446
1446
  data-tab-index="${a}">
1447
1447
  ${e.label}
1448
1448
  </div>
1449
1449
  `).join("")}
1450
1450
  </div>
1451
1451
  `}renderDownloadSection(){const t=!!this.context.currentConfig.templateUrl;return this.context.modalOptions.onDownloadTemplate?`
1452
- <div class="import-dialog-vanilla-section">
1453
- <div class="import-dialog-vanilla-section-title">${L("downloadTemplateTitle")}</div>
1454
- <button id="import-dialog-download-btn" class="import-dialog-vanilla-btn download-template-btn import-dialog-vanilla-btn-primary">
1452
+ <div class="sl-import-dialog-vanilla-section">
1453
+ <div class="sl-import-dialog-vanilla-section-title">${L("downloadTemplateTitle")}</div>
1454
+ <button id="sl-import-dialog-download-btn" class="sl-import-dialog-vanilla-btn download-template-btn sl-import-dialog-vanilla-btn-primary">
1455
1455
  <i class="iconfont icon-xiazai"></i>
1456
1456
  ${L("downloadTemplateText")}
1457
1457
  </button>
1458
1458
  </div>
1459
1459
  `:t?`
1460
- <div class="import-dialog-vanilla-section">
1461
- <div class="import-dialog-vanilla-section-title">${L("downloadTemplateTitle")}</div>
1462
- <a id="import-dialog-download-btn" class="import-dialog-vanilla-btn download-template-btn import-dialog-vanilla-btn-primary" href="${this.context.currentConfig.templateUrl}">
1460
+ <div class="sl-import-dialog-vanilla-section">
1461
+ <div class="sl-import-dialog-vanilla-section-title">${L("downloadTemplateTitle")}</div>
1462
+ <a id="sl-import-dialog-download-btn" class="sl-import-dialog-vanilla-btn download-template-btn sl-import-dialog-vanilla-btn-primary" href="${this.context.currentConfig.templateUrl}">
1463
1463
  <i class="iconfont icon-xiazai"></i>
1464
1464
  ${L("downloadTemplateText")}
1465
1465
  </a>
1466
1466
  </div>
1467
1467
  `:""}renderSettingSection(){const t=this.context.currentConfig;let e="";return t.showBrand&&(e+=this.renderBrandSelect()),t.showImageRatio&&(e+=this.renderImageRatioSelect()),t.showMonth&&(e+=this.renderMonthSelect()),t.showDateRange&&(e+=this.renderDateRangeSelect()),`
1468
- <div class="import-dialog-vanilla-section">
1469
- <div class="import-dialog-vanilla-section-title">${L("importSettingsTitle")}</div>
1470
- <div class="import-dialog-vanilla-setting-content">
1468
+ <div class="sl-import-dialog-vanilla-section">
1469
+ <div class="sl-import-dialog-vanilla-section-title">${L("importSettingsTitle")}</div>
1470
+ <div class="sl-import-dialog-vanilla-setting-content">
1471
1471
  ${e}
1472
1472
  </div>
1473
1473
  </div>
1474
1474
  `}renderBrandSelect(){const t=this.context.brandPlaceholder,e=this.context.brandList.find(r=>r.value===this.context.formData.brandId),a=e?e.label:this.context.brandLoading?L("loadingText"):t;return`
1475
- <div class="import-dialog-vanilla-setting-item">
1476
- <span class="import-dialog-vanilla-setting-label required">${L("selectBrand")}</span>
1477
- <div class="import-dialog-vanilla-custom-select" data-field="brandId">
1478
- <div class="import-dialog-vanilla-select-trigger ${this.context.brandLoading?"disabled":""}">
1479
- <span class="import-dialog-vanilla-select-value ${!e&&!this.context.brandLoading?"import-dialog-vanilla-select-placeholder":""}">${a}</span>
1480
- <span class="import-dialog-vanilla-select-arrow"></span>
1475
+ <div class="sl-import-dialog-vanilla-setting-item">
1476
+ <span class="sl-import-dialog-vanilla-setting-label required">${L("selectBrand")}</span>
1477
+ <div class="sl-import-dialog-vanilla-custom-select" data-field="brandId">
1478
+ <div class="sl-import-dialog-vanilla-select-trigger ${this.context.brandLoading?"disabled":""}">
1479
+ <span class="sl-import-dialog-vanilla-select-value ${!e&&!this.context.brandLoading?"sl-import-dialog-vanilla-select-placeholder":""}">${a}</span>
1480
+ <span class="sl-import-dialog-vanilla-select-arrow"></span>
1481
1481
  </div>
1482
- <div class="import-dialog-vanilla-select-dropdown">
1482
+ <div class="sl-import-dialog-vanilla-select-dropdown">
1483
1483
  ${this.context.brandList.map(r=>`
1484
- <div class="import-dialog-vanilla-select-option ${this.context.formData.brandId===r.value?"selected":""}"
1484
+ <div class="sl-import-dialog-vanilla-select-option ${this.context.formData.brandId===r.value?"selected":""}"
1485
1485
  data-value="${r.value}">
1486
1486
  ${r.label}
1487
1487
  </div>
@@ -1490,11 +1490,11 @@
1490
1490
  </div>
1491
1491
  </div>
1492
1492
  `}renderImageRatioSelect(){const t=this.imageRatioOptions;return`
1493
- <div class="import-dialog-vanilla-setting-item">
1494
- <span class="import-dialog-vanilla-setting-label required">${L("selectImageRatio")}</span>
1495
- <div class="import-dialog-vanilla-radio-group">
1493
+ <div class="sl-import-dialog-vanilla-setting-item">
1494
+ <span class="sl-import-dialog-vanilla-setting-label required">${L("selectImageRatio")}</span>
1495
+ <div class="sl-import-dialog-vanilla-radio-group">
1496
1496
  ${t.map(e=>`
1497
- <label class="import-dialog-vanilla-radio">
1497
+ <label class="sl-import-dialog-vanilla-radio">
1498
1498
  <input type="radio" name="imageRatio" value="${e.value}"
1499
1499
  ${this.context.formData.imageRatio===e.value?"checked":""} data-field="imageRatio">
1500
1500
  <span>${e.label}</span>
@@ -1503,16 +1503,16 @@
1503
1503
  </div>
1504
1504
  </div>
1505
1505
  `}renderMonthSelect(){const t=this.monthOptions.find(a=>a===this.context.formData.month),e=t?`${t}${L("month")}`:L("selectMonth");return`
1506
- <div class="import-dialog-vanilla-setting-item">
1507
- <span class="import-dialog-vanilla-setting-label required">${L("selectMonth")}</span>
1508
- <div class="import-dialog-vanilla-custom-select" data-field="month">
1509
- <div class="import-dialog-vanilla-select-trigger">
1510
- <span class="import-dialog-vanilla-select-value ${t?"":"import-dialog-vanilla-select-placeholder"}">${e}</span>
1511
- <span class="import-dialog-vanilla-select-arrow"></span>
1506
+ <div class="sl-import-dialog-vanilla-setting-item">
1507
+ <span class="sl-import-dialog-vanilla-setting-label required">${L("selectMonth")}</span>
1508
+ <div class="sl-import-dialog-vanilla-custom-select" data-field="month">
1509
+ <div class="sl-import-dialog-vanilla-select-trigger">
1510
+ <span class="sl-import-dialog-vanilla-select-value ${t?"":"sl-import-dialog-vanilla-select-placeholder"}">${e}</span>
1511
+ <span class="sl-import-dialog-vanilla-select-arrow"></span>
1512
1512
  </div>
1513
- <div class="import-dialog-vanilla-select-dropdown">
1513
+ <div class="sl-import-dialog-vanilla-select-dropdown">
1514
1514
  ${this.monthOptions.map(a=>`
1515
- <div class="import-dialog-vanilla-select-option ${this.context.formData.month===a?"selected":""}"
1515
+ <div class="sl-import-dialog-vanilla-select-option ${this.context.formData.month===a?"selected":""}"
1516
1516
  data-value="${a}">
1517
1517
  ${a}${L("month")}
1518
1518
  </div>
@@ -1521,115 +1521,115 @@
1521
1521
  </div>
1522
1522
  </div>
1523
1523
  `}renderDateRangeSelect(){return`
1524
- <div class="import-dialog-vanilla-setting-item">
1525
- <span class="import-dialog-vanilla-setting-label required">${L("selectDate")}</span>
1526
- <div class="import-dialog-vanilla-date-range-container" data-field="dateRange"></div>
1524
+ <div class="sl-import-dialog-vanilla-setting-item">
1525
+ <span class="sl-import-dialog-vanilla-setting-label required">${L("selectDate")}</span>
1526
+ <div class="sl-import-dialog-vanilla-date-range-container" data-field="dateRange"></div>
1527
1527
  </div>
1528
1528
  `}renderUploadSection(){const t=this.context.currentConfig,e=this.context.uploadFileList.length>0,a=this.context.uploadFileList.some(c=>c.status==="uploading"),r=this.context.multiple&&this.context.maxFiles!=null&&this.context.uploadFileList.length>=this.context.maxFiles;return`
1529
- <div class="import-dialog-vanilla-section">
1530
- <div class="import-dialog-vanilla-section-title">${this.uploadSectionIndex}.${t.uploadTitle}</div>
1531
- <div class="import-dialog-vanilla-upload-wrapper">
1529
+ <div class="sl-import-dialog-vanilla-section">
1530
+ <div class="sl-import-dialog-vanilla-section-title">${this.uploadSectionIndex}.${t.uploadTitle}</div>
1531
+ <div class="sl-import-dialog-vanilla-upload-wrapper">
1532
1532
  ${e?this.renderFileList():""}
1533
1533
  ${r?"":`
1534
- <div id="import-dialog-upload-area" class="import-dialog-vanilla-upload-area ${a?"disabled":""}">
1535
- <input type="file" class="import-dialog-vanilla-file-input" accept="${t.acceptTypes}" ${this.context.multiple?"multiple":""} ${a?"disabled":""}>
1536
- <div class="import-dialog-vanilla-upload-content">
1537
- <img class="import-dialog-vanilla-upload-icon" src="${jt}" alt="">
1538
- <p class="import-dialog-vanilla-upload-text">
1534
+ <div id="sl-import-dialog-upload-area" class="sl-import-dialog-vanilla-upload-area ${a?"disabled":""}">
1535
+ <input type="file" class="sl-import-dialog-vanilla-file-input" accept="${t.acceptTypes}" ${this.context.multiple?"multiple":""} ${a?"disabled":""}>
1536
+ <div class="sl-import-dialog-vanilla-upload-content">
1537
+ <img class="sl-import-dialog-vanilla-upload-icon" src="${jt}" alt="">
1538
+ <p class="sl-import-dialog-vanilla-upload-text">
1539
1539
  ${L("dragFileHere")}
1540
1540
  ${L("or")}
1541
- <a class="import-dialog-vanilla-upload-link">${t.uploadLinkText}</a>
1541
+ <a class="sl-import-dialog-vanilla-upload-link">${t.uploadLinkText}</a>
1542
1542
  </p>
1543
- <p class="import-dialog-vanilla-upload-hint">${t.uploadHint}</p>
1543
+ <p class="sl-import-dialog-vanilla-upload-hint">${t.uploadHint}</p>
1544
1544
  </div>
1545
1545
  </div>
1546
1546
  `}
1547
1547
  </div>
1548
1548
  </div>
1549
1549
  `}renderFileList(){return this.context.uploadFileList.length===0?"":`
1550
- <div class="import-dialog-vanilla-file-list">
1550
+ <div class="sl-import-dialog-vanilla-file-list">
1551
1551
  ${this.context.uploadFileList.map((t,e)=>this.renderFileItem(t,e)).join("")}
1552
1552
  </div>
1553
- `}renderFileItem(t,e){var D;const a=`status-${t.status}`,r=this.formatFileSize(t.size),c=t.status==="uploading",h=t.status==="error",m=((D=t.name.split(".").pop())==null?void 0:D.toUpperCase())||"FILE",b=this.context.multiple?"":"width-100",M=h?"#FF1212":"#FFD741";let y="";return h?y=`<span class="import-dialog-vanilla-file-error-text">${L("uploadFailed")}</span>`:c?y=`<span>${L("uploading")}...</span><span>·</span><span>${r}</span>`:y=`<span>${m}</span><span>·</span><span>${r}</span>`,c?`
1554
- <div class="import-dialog-vanilla-file-item ${a} ${b}" data-file-id="${t.id}">
1555
- <div class="import-dialog-vanilla-file-loading-icon">
1556
- <div class="loading-spinner"></div>
1553
+ `}renderFileItem(t,e){var D;const a=`status-${t.status}`,r=this.formatFileSize(t.size),c=t.status==="uploading",h=t.status==="error",m=((D=t.name.split(".").pop())==null?void 0:D.toUpperCase())||"FILE",b=this.context.multiple?"":"width-100",M=h?"#FF1212":"#FFD741";let y="";return h?y=`<span class="sl-import-dialog-vanilla-file-error-text">${L("uploadFailed")}</span>`:c?y=`<span>${L("uploading")}...</span><span>·</span><span>${r}</span>`:y=`<span>${m}</span><span>·</span><span>${r}</span>`,c?`
1554
+ <div class="sl-import-dialog-vanilla-file-item ${a} ${b}" data-file-id="${t.id}">
1555
+ <div class="sl-import-dialog-vanilla-file-loading-icon">
1556
+ <div class="sl-loading-spinner"></div>
1557
1557
  </div>
1558
- <div class="import-dialog-vanilla-file-remove-btn" data-file-index="${e}" title="删除">
1558
+ <div class="sl-import-dialog-vanilla-file-remove-btn" data-file-index="${e}" title="删除">
1559
1559
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1560
1560
  <circle cx="8" cy="8" r="8" fill="rgba(0,0,0)"/>
1561
1561
  <path d="M5 5L11 11M11 5L5 11" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
1562
1562
  </svg>
1563
1563
  </div>
1564
- <div class="import-dialog-vanilla-file-info">
1565
- <div class="import-dialog-vanilla-file-name" title="${t.name}">${t.name}</div>
1566
- <div class="import-dialog-vanilla-file-meta">
1564
+ <div class="sl-import-dialog-vanilla-file-info">
1565
+ <div class="sl-import-dialog-vanilla-file-name" title="${t.name}">${t.name}</div>
1566
+ <div class="sl-import-dialog-vanilla-file-meta">
1567
1567
  ${y}
1568
1568
  </div>
1569
1569
  </div>
1570
1570
  </div>
1571
1571
  `:`
1572
- <div class="import-dialog-vanilla-file-item ${a} ${b}" data-file-id="${t.id}">
1573
- <div class="import-dialog-vanilla-file-icon">
1572
+ <div class="sl-import-dialog-vanilla-file-item ${a} ${b}" data-file-id="${t.id}">
1573
+ <div class="sl-import-dialog-vanilla-file-icon">
1574
1574
  <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
1575
1575
  <path d="M4 6C4 4.89543 4.89543 4 6 4H14L18 8H26C27.1046 8 28 8.89543 28 10V26C28 27.1046 27.1046 28 26 28H6C4.89543 28 4 27.1046 4 26V6Z" fill="${M}"/>
1576
1576
  </svg>
1577
1577
  </div>
1578
- <div class="import-dialog-vanilla-file-remove-btn" data-file-index="${e}" title="删除">
1578
+ <div class="sl-import-dialog-vanilla-file-remove-btn" data-file-index="${e}" title="删除">
1579
1579
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1580
1580
  <circle cx="8" cy="8" r="8" fill="rgba(0,0,0)"/>
1581
1581
  <path d="M5 5L11 11M11 5L5 11" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
1582
1582
  </svg>
1583
1583
  </div>
1584
- <div class="import-dialog-vanilla-file-info">
1585
- <div class="import-dialog-vanilla-file-name" title="${t.name}">${t.name}</div>
1586
- <div class="import-dialog-vanilla-file-meta">
1584
+ <div class="sl-import-dialog-vanilla-file-info">
1585
+ <div class="sl-import-dialog-vanilla-file-name" title="${t.name}">${t.name}</div>
1586
+ <div class="sl-import-dialog-vanilla-file-meta">
1587
1587
  ${y}
1588
1588
  </div>
1589
1589
  </div>
1590
1590
  </div>
1591
1591
  `}formatFileSize(t){if(t===0)return"0 B";const e=1024,a=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,r)).toFixed(0))+a[r]}renderUploadProgress(){if(!this.context.isUploading&&!this.context.uploadMessage)return"";const t=this.context.uploadMessageType==="error"?"error":this.context.uploadProgress===100?"success":"active";return`
1592
- <div class="import-dialog-vanilla-upload-progress">
1592
+ <div class="sl-import-dialog-vanilla-upload-progress">
1593
1593
  ${this.context.isUploading||this.context.uploadProgress>0?`
1594
- <div class="import-dialog-vanilla-progress-bar">
1595
- <div class="import-dialog-vanilla-progress-inner ${t}" style="width: ${this.context.uploadProgress}%"></div>
1594
+ <div class="sl-import-dialog-vanilla-progress-bar">
1595
+ <div class="sl-import-dialog-vanilla-progress-inner ${t}" style="width: ${this.context.uploadProgress}%"></div>
1596
1596
  </div>
1597
- <span class="import-dialog-vanilla-progress-text">${this.context.uploadProgress}%</span>
1597
+ <span class="sl-import-dialog-vanilla-progress-text">${this.context.uploadProgress}%</span>
1598
1598
  `:""}
1599
1599
  ${this.context.uploadMessage?`
1600
- <div class="import-dialog-vanilla-upload-message ${this.context.uploadMessageType}">
1600
+ <div class="sl-import-dialog-vanilla-upload-message ${this.context.uploadMessageType}">
1601
1601
  ${this.context.uploadMessage}
1602
1602
  </div>
1603
1603
  `:""}
1604
1604
  </div>
1605
1605
  `}renderTipsSection(){return`
1606
- <div class="import-dialog-vanilla-section">
1607
- <div class="import-dialog-vanilla-section-title">
1608
- <span class="import-dialog-vanilla-tips-icon"><i class="iconfont icon-icon_tips"></i></span>
1609
- <span class="import-dialog-vanilla-tips-title">${L("tipsTitle")}</span>
1606
+ <div class="sl-import-dialog-vanilla-section">
1607
+ <div class="sl-import-dialog-vanilla-section-title">
1608
+ <span class="sl-import-dialog-vanilla-tips-icon"><i class="iconfont icon-icon_tips"></i></span>
1609
+ <span class="sl-import-dialog-vanilla-tips-title">${L("tipsTitle")}</span>
1610
1610
  </div>
1611
- <div class="import-dialog-vanilla-tips-content">
1612
- ${this.tipsList.map(t=>`<p class="import-dialog-vanilla-tip-item">${t}</p>`).join("")}
1611
+ <div class="sl-import-dialog-vanilla-tips-content">
1612
+ ${this.tipsList.map(t=>`<p class="sl-import-dialog-vanilla-tip-item">${t}</p>`).join("")}
1613
1613
  </div>
1614
1614
  </div>
1615
1615
  `}renderFooter(){return`
1616
- <div class="import-dialog-vanilla-footer">
1617
- <button id="import-dialog-cancel-btn" class="import-dialog-vanilla-btn">${L("cancel")}</button>
1618
- <button id="import-dialog-confirm-btn" class="import-dialog-vanilla-btn import-dialog-vanilla-btn-primary">
1616
+ <div class="sl-import-dialog-vanilla-footer">
1617
+ <button id="sl-import-dialog-cancel-btn" class="sl-import-dialog-vanilla-btn">${L("cancel")}</button>
1618
+ <button id="sl-import-dialog-confirm-btn" class="sl-import-dialog-vanilla-btn sl-import-dialog-vanilla-btn-primary">
1619
1619
  ${L("confirm")}
1620
1620
  </button>
1621
1621
  </div>
1622
1622
  ${this.context.confirmLoading?`
1623
- <div class="import-dialog-vanilla-loading-overlay">
1624
- <div class="import-dialog-vanilla-loading-spinner"></div>
1623
+ <div class="sl-import-dialog-vanilla-loading-overlay">
1624
+ <div class="sl-import-dialog-vanilla-loading-spinner"></div>
1625
1625
  </div>
1626
1626
  `:""}
1627
- `}}var ot={exports:{}};(function(o){(function(){var t=function(e){if(!(this instanceof t))return new t(e);if(this.version=1,this.support=typeof File<"u"&&typeof Blob<"u"&&typeof FileList<"u"&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice||!1),!this.support)return!1;var a=this;a.files=[],a.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,fileParameterName:"file",chunkNumberParameterName:"resumableChunkNumber",chunkSizeParameterName:"resumableChunkSize",currentChunkSizeParameterName:"resumableCurrentChunkSize",totalSizeParameterName:"resumableTotalSize",typeParameterName:"resumableType",identifierParameterName:"resumableIdentifier",fileNameParameterName:"resumableFilename",relativePathParameterName:"resumableRelativePath",totalChunksParameterName:"resumableTotalChunks",throttleProgressCallbacks:.5,query:{},headers:{},preprocess:null,method:"multipart",uploadMethod:"POST",testMethod:"GET",prioritizeFirstAndLastChunk:!1,target:"/",testTarget:null,parameterNamespace:"",testChunks:!0,generateUniqueIdentifier:null,getTarget:null,maxChunkRetries:100,chunkRetryInterval:void 0,permanentErrors:[400,404,415,500,501],maxFiles:void 0,withCredentials:!1,xhrTimeout:0,clearInput:!0,chunkFormat:"blob",setChunkTypeFromFile:!1,maxFilesErrorCallback:function(s,p){var g=a.getOpt("maxFiles");alert("Please upload no more than "+g+" file"+(g===1?"":"s")+" at a time.")},minFileSize:1,minFileSizeErrorCallback:function(s,p){alert(s.fileName||s.name+" is too small, please upload files larger than "+r.formatSize(a.getOpt("minFileSize"))+".")},maxFileSize:void 0,maxFileSizeErrorCallback:function(s,p){alert(s.fileName||s.name+" is too large, please upload files less than "+r.formatSize(a.getOpt("maxFileSize"))+".")},fileType:[],fileTypeErrorCallback:function(s,p){alert(s.fileName||s.name+" has type not allowed, please upload files of type "+a.getOpt("fileType")+".")}},a.opts=e||{},a.getOpt=function(s){var p=this;if(s instanceof Array){var g={};return r.each(s,function(u){g[u]=p.getOpt(u)}),g}if(p instanceof I){if(typeof p.opts[s]<"u")return p.opts[s];p=p.fileObj}if(p instanceof C){if(typeof p.opts[s]<"u")return p.opts[s];p=p.resumableObj}if(p instanceof t)return typeof p.opts[s]<"u"?p.opts[s]:p.defaults[s]},a.events=[],a.on=function(s,p){a.events.push(s.toLowerCase(),p)},a.fire=function(){for(var s=[],p=0;p<arguments.length;p++)s.push(arguments[p]);for(var g=s[0].toLowerCase(),p=0;p<=a.events.length;p+=2)a.events[p]==g&&a.events[p+1].apply(a,s.slice(1)),a.events[p]=="catchall"&&a.events[p+1].apply(null,s);g=="fileerror"&&a.fire("error",s[2],s[1]),g=="fileprogress"&&a.fire("progress")};var r={stopEvent:function(s){s.stopPropagation(),s.preventDefault()},each:function(s,p){if(typeof s.length<"u"){for(var g=0;g<s.length;g++)if(p(s[g])===!1)return}else for(g in s)if(p(g,s[g])===!1)return},generateUniqueIdentifier:function(s,p){var g=a.getOpt("generateUniqueIdentifier");if(typeof g=="function")return g(s,p);var u=s.webkitRelativePath||s.fileName||s.name,l=s.size;return l+"-"+u.replace(/[^0-9a-zA-Z_-]/img,"")},contains:function(s,p){var g=!1;return r.each(s,function(u){return u==p?(g=!0,!1):!0}),g},formatSize:function(s){return s<1024?s+" bytes":s<1024*1024?(s/1024).toFixed(0)+" KB":s<1024*1024*1024?(s/1024/1024).toFixed(1)+" MB":(s/1024/1024/1024).toFixed(1)+" GB"},getTarget:function(s,p){var g=a.getOpt("target");if(s==="test"&&a.getOpt("testTarget")&&(g=a.getOpt("testTarget")==="/"?a.getOpt("target"):a.getOpt("testTarget")),typeof g=="function")return g(p);var u=g.indexOf("?")<0?"?":"&",l=p.join("&");return g+u+l}},c=function(s){r.stopEvent(s),s.dataTransfer&&s.dataTransfer.items?y(s.dataTransfer.items,s):s.dataTransfer&&s.dataTransfer.files&&y(s.dataTransfer.files,s)},h=function(s){s.preventDefault()};function m(s,p,g,u){var l;if(s.isFile)return s.file(function(R){R.relativePath=p+R.name,g.push(R),u()});if(s.isDirectory?l=s:s instanceof File&&g.push(s),typeof s.webkitGetAsEntry=="function"&&(l=s.webkitGetAsEntry()),l&&l.isDirectory)return M(l,p+l.name+"/",g,u);typeof s.getAsFile=="function"&&(s=s.getAsFile(),s instanceof File&&(s.relativePath=p+s.name,g.push(s))),u()}function b(s,p){if(!s||s.length===0)return p();s[0](function(){b(s.slice(1),p)})}function M(s,p,g,u){var l=s.createReader();l.readEntries(function(R){if(!R.length)return u();b(R.map(function(T){return m.bind(null,T,p,g)}),u)})}function y(s,p){if(s.length){a.fire("beforeAdd");var g=[];b(Array.prototype.map.call(s,function(u){return m.bind(null,u,"",g)}),function(){g.length&&D(g,p)})}}var D=function(s,p){var g=0,u=a.getOpt(["maxFiles","minFileSize","maxFileSize","maxFilesErrorCallback","minFileSizeErrorCallback","maxFileSizeErrorCallback","fileType","fileTypeErrorCallback"]);if(typeof u.maxFiles<"u"&&u.maxFiles<s.length+a.files.length)if(u.maxFiles===1&&a.files.length===1&&s.length===1)a.removeFile(a.files[0]);else return u.maxFilesErrorCallback(s,g++),!1;var l=[],R=[],T=s.length,F=function(){if(!--T){if(!l.length&&!R.length)return;window.setTimeout(function(){a.fire("filesAdded",l,R)},0)}};r.each(s,function(P){var Y=P.name;if(u.fileType.length>0){var _=!1;for(var K in u.fileType){var N="."+u.fileType[K];if(Y.toLowerCase().indexOf(N.toLowerCase(),Y.length-N.length)!==-1){_=!0;break}}if(!_)return u.fileTypeErrorCallback(P,g++),!1}if(typeof u.minFileSize<"u"&&P.size<u.minFileSize)return u.minFileSizeErrorCallback(P,g++),!1;if(typeof u.maxFileSize<"u"&&P.size>u.maxFileSize)return u.maxFileSizeErrorCallback(P,g++),!1;function se(Z){a.getFromUniqueIdentifier(Z)?R.push(P):function(){P.uniqueIdentifier=Z;var de=new C(a,P,Z);a.files.push(de),l.push(de),de.container=typeof p<"u"?p.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",de,p)},0)}(),F()}var Q=r.generateUniqueIdentifier(P,p);Q&&typeof Q.then=="function"?Q.then(function(Z){se(Z)},function(){F()}):se(Q)})};function C(s,p,g){var u=this;u.opts={},u.getOpt=s.getOpt,u._prevProgress=0,u.resumableObj=s,u.file=p,u.fileName=p.fileName||p.name,u.size=p.size,u.relativePath=p.relativePath||p.webkitRelativePath||u.fileName,u.uniqueIdentifier=g,u._pause=!1,u.container="";var l=g!==void 0,R=function(T,F){switch(T){case"progress":u.resumableObj.fire("fileProgress",u,F);break;case"error":u.abort(),l=!0,u.chunks=[],u.resumableObj.fire("fileError",u,F);break;case"success":if(l)return;u.resumableObj.fire("fileProgress",u),u.isComplete()&&u.resumableObj.fire("fileSuccess",u,F);break;case"retry":u.resumableObj.fire("fileRetry",u);break}};return u.chunks=[],u.abort=function(){var T=0;r.each(u.chunks,function(F){F.status()=="uploading"&&(F.abort(),T++)}),T>0&&u.resumableObj.fire("fileProgress",u)},u.cancel=function(){var T=u.chunks;u.chunks=[],r.each(T,function(F){F.status()=="uploading"&&(F.abort(),u.resumableObj.uploadNextChunk())}),u.resumableObj.removeFile(u),u.resumableObj.fire("fileProgress",u)},u.retry=function(){u.bootstrap();var T=!1;u.resumableObj.on("chunkingComplete",function(){T||u.resumableObj.upload(),T=!0})},u.bootstrap=function(){u.abort(),l=!1,u.chunks=[],u._prevProgress=0;for(var T=u.getOpt("forceChunkSize")?Math.ceil:Math.floor,F=Math.max(T(u.file.size/u.getOpt("chunkSize")),1),P=0;P<F;P++)(function(Y){window.setTimeout(function(){u.chunks.push(new I(u.resumableObj,u,Y,R)),u.resumableObj.fire("chunkingProgress",u,Y/F)},0)})(P);window.setTimeout(function(){u.resumableObj.fire("chunkingComplete",u)},0)},u.progress=function(){if(l)return 1;var T=0,F=!1;return r.each(u.chunks,function(P){P.status()=="error"&&(F=!0),T+=P.progress(!0)}),T=F||T>.99999?1:T,T=Math.max(u._prevProgress,T),u._prevProgress=T,T},u.isUploading=function(){var T=!1;return r.each(u.chunks,function(F){if(F.status()=="uploading")return T=!0,!1}),T},u.isComplete=function(){var T=!1;return r.each(u.chunks,function(F){var P=F.status();if(P=="pending"||P=="uploading"||F.preprocessState===1)return T=!0,!1}),!T},u.pause=function(T){typeof T>"u"?u._pause=!u._pause:u._pause=T},u.isPaused=function(){return u._pause},u.resumableObj.fire("chunkingStart",u),u.bootstrap(),this}function I(s,p,g,u){var l=this;l.opts={},l.getOpt=s.getOpt,l.resumableObj=s,l.fileObj=p,l.fileObjSize=p.size,l.fileObjType=p.file.type,l.offset=g,l.callback=u,l.lastProgressCallback=new Date,l.tested=!1,l.retries=0,l.pendingRetry=!1,l.preprocessState=0;var R=l.getOpt("chunkSize");return l.loaded=0,l.startByte=l.offset*R,l.endByte=Math.min(l.fileObjSize,(l.offset+1)*R),l.fileObjSize-l.endByte<R&&!l.getOpt("forceChunkSize")&&(l.endByte=l.fileObjSize),l.xhr=null,l.test=function(){l.xhr=new XMLHttpRequest;var T=function(K){l.tested=!0;var N=l.status();N=="success"?(l.callback(N,l.message()),l.resumableObj.uploadNextChunk()):l.send()};l.xhr.addEventListener("load",T,!1),l.xhr.addEventListener("error",T,!1),l.xhr.addEventListener("timeout",T,!1);var F=[],P=l.getOpt("parameterNamespace"),Y=l.getOpt("query");typeof Y=="function"&&(Y=Y(l.fileObj,l)),r.each(Y,function(K,N){F.push([encodeURIComponent(P+K),encodeURIComponent(N)].join("="))}),F=F.concat([["chunkNumberParameterName",l.offset+1],["chunkSizeParameterName",l.getOpt("chunkSize")],["currentChunkSizeParameterName",l.endByte-l.startByte],["totalSizeParameterName",l.fileObjSize],["typeParameterName",l.fileObjType],["identifierParameterName",l.fileObj.uniqueIdentifier],["fileNameParameterName",l.fileObj.fileName],["relativePathParameterName",l.fileObj.relativePath],["totalChunksParameterName",l.fileObj.chunks.length]].filter(function(K){return l.getOpt(K[0])}).map(function(K){return[P+l.getOpt(K[0]),encodeURIComponent(K[1])].join("=")})),l.xhr.open(l.getOpt("testMethod"),r.getTarget("test",F)),l.xhr.timeout=l.getOpt("xhrTimeout"),l.xhr.withCredentials=l.getOpt("withCredentials");var _=l.getOpt("headers");typeof _=="function"&&(_=_(l.fileObj,l)),r.each(_,function(K,N){l.xhr.setRequestHeader(K,N)}),l.xhr.send(null)},l.preprocessFinished=function(){l.preprocessState=2,l.send()},l.send=function(){var T=l.getOpt("preprocess");if(typeof T=="function")switch(l.preprocessState){case 0:l.preprocessState=1,T(l);return;case 1:return}if(l.getOpt("testChunks")&&!l.tested){l.test();return}l.xhr=new XMLHttpRequest,l.xhr.upload.addEventListener("progress",function(W){new Date-l.lastProgressCallback>l.getOpt("throttleProgressCallbacks")*1e3&&(l.callback("progress"),l.lastProgressCallback=new Date),l.loaded=W.loaded||0},!1),l.loaded=0,l.pendingRetry=!1,l.callback("progress");var F=function(W){var J=l.status();if(J=="success"||J=="error")l.callback(J,l.message()),l.resumableObj.uploadNextChunk();else{l.callback("retry",l.message()),l.abort(),l.retries++;var xe=l.getOpt("chunkRetryInterval");xe!==void 0?(l.pendingRetry=!0,setTimeout(l.send,xe)):l.send()}};l.xhr.addEventListener("load",F,!1),l.xhr.addEventListener("error",F,!1),l.xhr.addEventListener("timeout",F,!1);var P=[["chunkNumberParameterName",l.offset+1],["chunkSizeParameterName",l.getOpt("chunkSize")],["currentChunkSizeParameterName",l.endByte-l.startByte],["totalSizeParameterName",l.fileObjSize],["typeParameterName",l.fileObjType],["identifierParameterName",l.fileObj.uniqueIdentifier],["fileNameParameterName",l.fileObj.fileName],["relativePathParameterName",l.fileObj.relativePath],["totalChunksParameterName",l.fileObj.chunks.length]].filter(function(W){return l.getOpt(W[0])}).reduce(function(W,J){return W[l.getOpt(J[0])]=J[1],W},{}),Y=l.getOpt("query");typeof Y=="function"&&(Y=Y(l.fileObj,l)),r.each(Y,function(W,J){P[W]=J});var _=l.fileObj.file.slice?"slice":l.fileObj.file.mozSlice?"mozSlice":l.fileObj.file.webkitSlice?"webkitSlice":"slice",K=l.fileObj.file[_](l.startByte,l.endByte,l.getOpt("setChunkTypeFromFile")?l.fileObj.file.type:""),N=null,se=[],Q=l.getOpt("parameterNamespace");if(l.getOpt("method")==="octet")N=K,r.each(P,function(W,J){se.push([encodeURIComponent(Q+W),encodeURIComponent(J)].join("="))});else if(N=new FormData,r.each(P,function(W,J){N.append(Q+W,J),se.push([encodeURIComponent(Q+W),encodeURIComponent(J)].join("="))}),l.getOpt("chunkFormat")=="blob")N.append(Q+l.getOpt("fileParameterName"),K,l.fileObj.fileName);else if(l.getOpt("chunkFormat")=="base64"){var Z=new FileReader;Z.onload=function(W){N.append(Q+l.getOpt("fileParameterName"),Z.result),l.xhr.send(N)},Z.readAsDataURL(K)}var de=r.getTarget("upload",se),Me=l.getOpt("uploadMethod");l.xhr.open(Me,de),l.getOpt("method")==="octet"&&l.xhr.setRequestHeader("Content-Type","application/octet-stream"),l.xhr.timeout=l.getOpt("xhrTimeout"),l.xhr.withCredentials=l.getOpt("withCredentials");var ge=l.getOpt("headers");typeof ge=="function"&&(ge=ge(l.fileObj,l)),r.each(ge,function(W,J){l.xhr.setRequestHeader(W,J)}),l.getOpt("chunkFormat")=="blob"&&l.xhr.send(N)},l.abort=function(){l.xhr&&l.xhr.abort(),l.xhr=null},l.status=function(){return l.pendingRetry?"uploading":l.xhr?l.xhr.readyState<4?"uploading":l.xhr.status==200||l.xhr.status==201?"success":r.contains(l.getOpt("permanentErrors"),l.xhr.status)||l.retries>=l.getOpt("maxChunkRetries")?"error":(l.abort(),"pending"):"pending"},l.message=function(){return l.xhr?l.xhr.responseText:""},l.progress=function(T){typeof T>"u"&&(T=!1);var F=T?(l.endByte-l.startByte)/l.fileObjSize:1;if(l.pendingRetry)return 0;(!l.xhr||!l.xhr.status)&&(F*=.95);var P=l.status();switch(P){case"success":case"error":return 1*F;case"pending":return 0*F;default:return l.loaded/(l.endByte-l.startByte)*F}},this}return a.uploadNextChunk=function(){var s=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(r.each(a.files,function(g){if(g.chunks.length&&g.chunks[0].status()=="pending"&&g.chunks[0].preprocessState===0)return g.chunks[0].send(),s=!0,!1;if(g.chunks.length>1&&g.chunks[g.chunks.length-1].status()=="pending"&&g.chunks[g.chunks.length-1].preprocessState===0)return g.chunks[g.chunks.length-1].send(),s=!0,!1}),s)||(r.each(a.files,function(g){if(g.isPaused()===!1&&r.each(g.chunks,function(u){if(u.status()=="pending"&&u.preprocessState===0)return u.send(),s=!0,!1}),s)return!1}),s))return!0;var p=!1;return r.each(a.files,function(g){if(!g.isComplete())return p=!0,!1}),p||a.fire("complete"),!1},a.assignBrowse=function(s,p){typeof s.length>"u"&&(s=[s]),r.each(s,function(g){var u;g.tagName==="INPUT"&&g.type==="file"?u=g:(u=document.createElement("input"),u.setAttribute("type","file"),u.style.display="none",g.addEventListener("click",function(){u.style.opacity=0,u.style.display="block",u.focus(),u.click(),u.style.display="none"},!1),g.appendChild(u));var l=a.getOpt("maxFiles");typeof l>"u"||l!=1?u.setAttribute("multiple","multiple"):u.removeAttribute("multiple"),p?u.setAttribute("webkitdirectory","webkitdirectory"):u.removeAttribute("webkitdirectory");var R=a.getOpt("fileType");typeof R<"u"&&R.length>=1?u.setAttribute("accept",R.map(function(T){return"."+T}).join(",")):u.removeAttribute("accept"),u.addEventListener("change",function(T){D(T.target.files,T);var F=a.getOpt("clearInput");F&&(T.target.value="")},!1)})},a.assignDrop=function(s){typeof s.length>"u"&&(s=[s]),r.each(s,function(p){p.addEventListener("dragover",h,!1),p.addEventListener("dragenter",h,!1),p.addEventListener("drop",c,!1)})},a.unAssignDrop=function(s){typeof s.length>"u"&&(s=[s]),r.each(s,function(p){p.removeEventListener("dragover",h),p.removeEventListener("dragenter",h),p.removeEventListener("drop",c)})},a.isUploading=function(){var s=!1;return r.each(a.files,function(p){if(p.isUploading())return s=!0,!1}),s},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var s=1;s<=a.getOpt("simultaneousUploads");s++)a.uploadNextChunk()}},a.pause=function(){r.each(a.files,function(s){s.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var s=a.files.length-1;s>=0;s--)a.files[s].cancel();a.fire("cancel")},a.progress=function(){var s=0,p=0;return r.each(a.files,function(g){s+=g.progress()*g.size,p+=g.size}),p>0?s/p:0},a.addFile=function(s,p){D([s],p)},a.addFiles=function(s,p){D(s,p)},a.removeFile=function(s){for(var p=a.files.length-1;p>=0;p--)a.files[p]===s&&a.files.splice(p,1)},a.getFromUniqueIdentifier=function(s){var p=!1;return r.each(a.files,function(g){g.uniqueIdentifier==s&&(p=g)}),p},a.getSize=function(){var s=0;return r.each(a.files,function(p){s+=p.size}),s},a.handleDropEvent=function(s){c(s)},a.handleChangeEvent=function(s){D(s.target.files,s),s.target.value=""},a.updateQuery=function(s){a.opts.query=s},this};o.exports=t})()})(ot);var Yt=ot.exports;const Bt=It(Yt);class qt{constructor(t,e={}){S(this,"resumable");S(this,"currentFileItem",null);S(this,"chunkedConfig");S(this,"callbacks");S(this,"uploadCompleteResolve");S(this,"uploadCompleteReject");this.chunkedConfig=t,this.callbacks=e}async upload(t){try{console.info("[ChunkedUploader] 开始分片上传流程...");const e=await this.chunkedConfig.initUpload(t.file.name,t.file.size);return console.info("[ChunkedUploader] 初始化完成:",e),t.uploadSessionId=e.uploadSessionId,this.currentFileItem=t,this.initResumable(e),this.resumable.addFile(t.file),await this.waitForUploadComplete()}catch(e){throw console.error("[ChunkedUploader] 上传失败:",e),e instanceof Error?e:new Error(String(e))}}waitForUploadComplete(){return new Promise((t,e)=>{this.uploadCompleteResolve=t,this.uploadCompleteReject=e})}initResumable(t){console.log("[ChunkedUploader] 初始化 Resumable...",t),this.resumable&&this.resumable.cancel();const e=this.chunkedConfig.getResumableConfig(t),r={...{chunkSize:t.partSize,simultaneousUploads:3,testChunks:!1,method:"multipart",chunkNumberParameterName:"partNumber",totalChunksParameterName:"totalParts",fileParameterName:"file",withCredentials:!0,maxChunkRetries:3,chunkRetryInterval:1e3,forceChunkSize:!0},...e};console.info("[ChunkedUploader] Resumable 配置:",r),this.resumable=new Bt(r),this.bindResumableEvents()}bindResumableEvents(){this.resumable.on("progress",()=>{var e,a,r,c;const t=Math.floor(this.resumable.progress()*100);console.log(`[ChunkedUploader] 上传进度: ${t}%`),this.currentFileItem&&(this.currentFileItem.progress=Math.min(t,90),(a=(e=this.callbacks).onProgress)==null||a.call(e,this.currentFileItem,this.currentFileItem.progress)),(c=(r=this.callbacks).onUpdate)==null||c.call(r)}),this.resumable.on("fileSuccess",()=>{console.log("[ChunkedUploader] 所有分片上传完成,开始合并..."),this.handleResumableComplete()}),this.resumable.on("error",t=>{console.error("[ChunkedUploader] 上传错误:",t),this.handleResumableError(t)}),this.resumable.on("fileAdded",()=>{console.info("[ChunkedUploader] 文件已添加,开始上传分片..."),this.resumable.upload()})}async handleResumableComplete(){if(!(!this.currentFileItem||!this.uploadCompleteResolve||!this.uploadCompleteReject))try{const t=await this.chunkedConfig.mergeChunks(this.currentFileItem.uploadSessionId);this.currentFileItem&&(this.currentFileItem.progress=100),this.uploadCompleteResolve(t),console.log("合并分片成功>>>uploadCompleteResolve",t),this.cleanup()}catch(t){const e=t instanceof Error?t:new Error(String(t));this.handleResumableError(e.message)}}handleResumableError(t){var e,a;this.currentFileItem&&(this.currentFileItem.status="error",this.currentFileItem.errorMessage=t),this.uploadCompleteReject&&(this.uploadCompleteReject(new Error(t)),this.cleanup()),(a=(e=this.callbacks).onUpdate)==null||a.call(e)}cleanup(){this.uploadCompleteResolve=void 0,this.uploadCompleteReject=void 0}pause(){this.resumable&&this.resumable.pause()}resume(){this.resumable&&this.resumable.upload()}cancel(){this.resumable&&(this.resumable.cancel(),this.resumable=null),this.currentFileItem=null,this.cleanup()}}const Kt=()=>`file_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;class Wt{constructor(t,e={}){S(this,"config");S(this,"callbacks");S(this,"chunkedUploader",null);S(this,"uploadFileList",[]);S(this,"fileList",[]);S(this,"uploadProgress",0);S(this,"isUploading",!1);S(this,"uploadMessage","");S(this,"uploadMessageType","info");this.config=t,this.callbacks=e,this.initUploaders()}initUploaders(){const t=this.config.uploadConfig;t!=null&&t.chunkedUpload&&!this.config.multiple&&(this.chunkedUploader=new qt(t.chunkedUpload,{onProgress:(e,a)=>{var r,c,h,m;(c=(r=this.callbacks).onUploadProgress)==null||c.call(r,e,a),(m=(h=this.callbacks).onUpdate)==null||m.call(h)},onUpdate:()=>{var e,a;(a=(e=this.callbacks).onUpdate)==null||a.call(e)}}))}shouldUseChunkedUpload(){const t=this.config.uploadConfig;return!!(t!=null&&t.chunkedUpload&&!this.config.multiple)}updateConfig(t){this.config={...this.config,...t},this.initUploaders()}updateCallbacks(t){this.callbacks={...this.callbacks,...t}}reset(){this.cancelUpload(),this.uploadFileList=[],this.fileList=[],this.uploadProgress=0,this.isUploading=!1,this.uploadMessage="",this.uploadMessageType="info"}convertToBytes(t,e="MB"){return t*{KB:1024,MB:1048576,GB:1073741824}[e]}isValidFileType(t,e){if(!e)return!0;const a=t.name.toLowerCase(),r=a.substring(a.lastIndexOf("."));return e.toLowerCase().split(",").map(h=>h.trim()).some(h=>{if(h.startsWith("."))return r===h;if(h.includes("/")){const[m,b]=h.split("/");return b==="*"?t.type.startsWith(m+"/"):t.type===h}return!1})}beforeUpload(t){var a,r,c,h,m,b,M,y,D,C,I,s;const e=Array.isArray(t)?t:[t];if(!e.length)return(r=(a=this.callbacks).onMessage)==null||r.call(a,L("pleaseSelectFile"),"warning"),!1;if(this.config.multiple&&this.config.maxFiles!=null&&this.uploadFileList.length+e.length>this.config.maxFiles)return(h=(c=this.callbacks).onMessage)==null||h.call(c,L("maxFilesLimit",{max:this.config.maxFiles}),"warning"),!1;for(const p of e)if(!this.isValidFileType(p,this.config.acceptTypes)){const g=this.config.acceptTypes||"";return(b=(m=this.callbacks).onMessage)==null||b.call(m,L("fileFormatNotSupported",{name:p.name,types:g}),"warning"),!1}if(this.config.maxFileSize!=null){const p=this.config.maxFileSizeUnit||"MB",g=this.convertToBytes(this.config.maxFileSize,p);for(const u of e)if(u.size>g)return(y=(M=this.callbacks).onMessage)==null||y.call(M,L("fileSizeExceeded",{name:u.name,size:this.config.maxFileSize,unit:p}),"warning"),!1}for(const p of e){const g={id:Kt(),file:p,name:p.name,size:p.size,progress:0,status:"pending"};this.config.multiple?(this.uploadFileList.unshift(g),this.fileList.unshift(p)):(this.uploadFileList=[g],this.fileList=[p])}return(C=(D=this.callbacks).onUpdate)==null||C.call(D),(s=(I=this.callbacks).onFileChange)==null||s.call(I,this.uploadFileList),this.shouldUseChunkedUpload()?this.processChunkedUpload():this.processFilesWithCustomUpload(),!0}async processChunkedUpload(){var t;if(((t=this.config.uploadConfig)==null?void 0:t.autoUpload)===!0){console.info("[ImportDialogUploader] 自动上传模式,立即开始分片上传");const e=this.uploadFileList.filter(a=>a.status==="pending");for(const a of e)await this.uploadSingleFile(a)}else console.info("[ImportDialogUploader] 延迟上传模式,等待用户点击确认")}async processFilesWithCustomUpload(){var a;if(!((a=this.config.uploadConfig)==null?void 0:a.customUpload))return;const e=this.uploadFileList.filter(r=>r.status==="pending");for(const r of e)await this.processFileWithCustomUpload(r)}async processFileWithCustomUpload(t){var a,r,c,h,m,b,M,y,D;const e=(a=this.config.uploadConfig)==null?void 0:a.customUpload;if(e){t.status="uploading",t.progress=0,this.isUploading=!0,(c=(r=this.callbacks).onUpdate)==null||c.call(r);try{const C={fileList:[...this.uploadFileList],removeFile:I=>{this.removeFile(I)}};t.response=await e(t.file,C,I=>{var s,p,g,u;t.progress=I,(p=(s=this.callbacks).onUploadProgress)==null||p.call(s,t,I),(u=(g=this.callbacks).onUpdate)==null||u.call(g)}),t.status="success",t.progress=100,(m=(h=this.callbacks).onUploadSuccess)==null||m.call(h,t,t.response)}catch(C){t.status="error",t.errorMessage=C instanceof Error?C.message:L("processingFailed"),(M=(b=this.callbacks).onUploadError)==null||M.call(b,t,C)}this.isUploading=this.uploadFileList.some(C=>C.status==="uploading"),(D=(y=this.callbacks).onUpdate)==null||D.call(y),this.updateOverallProgress()}}removeFile(t){var a,r,c,h,m,b,M,y,D;const e=this.shouldUseChunkedUpload()&&((a=this.config.uploadConfig)==null?void 0:a.autoUpload)!==!1;if(t!==void 0&&t>=0&&t<this.uploadFileList.length){const C=this.uploadFileList[t];if(e&&C.status==="uploading")return(c=(r=this.callbacks).onMessage)==null||c.call(r,L("fileUploadingCannotDelete"),"warning"),!1;this.uploadFileList.splice(t,1),this.fileList.splice(t,1)}else{if(e&&this.uploadFileList.some(I=>I.status==="uploading"))return(m=(h=this.callbacks).onMessage)==null||m.call(h,L("filesUploadingCannotClear"),"warning"),!1;this.uploadFileList=[],this.fileList=[]}return this.uploadProgress=0,this.uploadMessage="",this.uploadMessageType="info",this.isUploading=this.uploadFileList.some(C=>C.status==="uploading"),(M=(b=this.callbacks).onFileChange)==null||M.call(b,this.uploadFileList),(D=(y=this.callbacks).onUpdate)==null||D.call(y),!0}async uploadSingleFile(t){var e,a,r,c,h,m,b,M;t.status="uploading",t.progress=0,this.isUploading=!0,(a=(e=this.callbacks).onUpdate)==null||a.call(e);try{return t.response=await this.uploadFileChunked(t),t.status="success",t.progress=100,(c=(r=this.callbacks).onUploadSuccess)==null||c.call(r,t,t.response),t.response}catch(y){throw t.status="error",t.errorMessage=y instanceof Error?y.message:L("uploadFailed"),(m=(h=this.callbacks).onUploadError)==null||m.call(h,t,y),y}finally{this.isUploading=this.uploadFileList.some(y=>y.status==="uploading"),(M=(b=this.callbacks).onUpdate)==null||M.call(b),this.updateOverallProgress()}}async uploadFileChunked(t){if(!this.chunkedUploader)throw new Error(L("chunkedUploadConfigRequired"));return await this.chunkedUploader.upload(t)}async startUpload(){if(!this.shouldUseChunkedUpload())return;const t=this.uploadFileList.filter(a=>a.status==="pending");if(t.length===0)return;const e=[];for(const a of t)try{const r=await this.uploadSingleFile(a);r&&e.push(r)}catch(r){console.error(`文件 ${a.file.name} 上传失败:`,r)}return e}pauseUpload(){var t;(t=this.chunkedUploader)==null||t.pause()}resumeUpload(){var t;(t=this.chunkedUploader)==null||t.resume()}cancelUpload(){var t,e,a;(t=this.chunkedUploader)==null||t.cancel(),this.isUploading=!1,this.uploadMessage="上传已取消",this.uploadMessageType="info",(a=(e=this.callbacks).onUpdate)==null||a.call(e)}updateOverallProgress(){if(this.uploadFileList.length===0){this.uploadProgress=0;return}const t=this.uploadFileList.reduce((e,a)=>e+a.progress,0);this.uploadProgress=Math.round(t/this.uploadFileList.length)}hasUploadingFiles(){return this.uploadFileList.some(t=>t.status==="uploading")}hasPendingFiles(){return this.uploadFileList.some(t=>t.status==="pending")}hasAllFilesUploaded(){return this.uploadFileList.length>0&&this.uploadFileList.every(t=>t.status==="success")}getFailedFiles(){return this.uploadFileList.filter(t=>t.status==="error")}}const rt={success:"icon-success",error:"icon-cuowu",warning:"icon-warning",info:"icon-info"},Te=new Set;function Jt(o){const{message:t,type:e,duration:a=3e3,closable:r=!0}=o,c=document.createElement("div");c.className=`import-dialog-vanilla-toast ${e}`;const h=rt[e]||rt.info;c.innerHTML=`
1628
- <div class="import-dialog-vanilla-toast-content">
1629
- <i class="iconfont ${h} import-dialog-vanilla-toast-icon"></i>
1630
- <span class="import-dialog-vanilla-toast-message">${t}</span>
1627
+ `}}var ot={exports:{}};(function(o){(function(){var t=function(e){if(!(this instanceof t))return new t(e);if(this.version=1,this.support=typeof File<"u"&&typeof Blob<"u"&&typeof FileList<"u"&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice||!1),!this.support)return!1;var a=this;a.files=[],a.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,fileParameterName:"file",chunkNumberParameterName:"resumableChunkNumber",chunkSizeParameterName:"resumableChunkSize",currentChunkSizeParameterName:"resumableCurrentChunkSize",totalSizeParameterName:"resumableTotalSize",typeParameterName:"resumableType",identifierParameterName:"resumableIdentifier",fileNameParameterName:"resumableFilename",relativePathParameterName:"resumableRelativePath",totalChunksParameterName:"resumableTotalChunks",throttleProgressCallbacks:.5,query:{},headers:{},preprocess:null,method:"multipart",uploadMethod:"POST",testMethod:"GET",prioritizeFirstAndLastChunk:!1,target:"/",testTarget:null,parameterNamespace:"",testChunks:!0,generateUniqueIdentifier:null,getTarget:null,maxChunkRetries:100,chunkRetryInterval:void 0,permanentErrors:[400,404,415,500,501],maxFiles:void 0,withCredentials:!1,xhrTimeout:0,clearInput:!0,chunkFormat:"blob",setChunkTypeFromFile:!1,maxFilesErrorCallback:function(s,p){var g=a.getOpt("maxFiles");alert("Please upload no more than "+g+" file"+(g===1?"":"s")+" at a time.")},minFileSize:1,minFileSizeErrorCallback:function(s,p){alert(s.fileName||s.name+" is too small, please upload files larger than "+r.formatSize(a.getOpt("minFileSize"))+".")},maxFileSize:void 0,maxFileSizeErrorCallback:function(s,p){alert(s.fileName||s.name+" is too large, please upload files less than "+r.formatSize(a.getOpt("maxFileSize"))+".")},fileType:[],fileTypeErrorCallback:function(s,p){alert(s.fileName||s.name+" has type not allowed, please upload files of type "+a.getOpt("fileType")+".")}},a.opts=e||{},a.getOpt=function(s){var p=this;if(s instanceof Array){var g={};return r.each(s,function(u){g[u]=p.getOpt(u)}),g}if(p instanceof I){if(typeof p.opts[s]<"u")return p.opts[s];p=p.fileObj}if(p instanceof C){if(typeof p.opts[s]<"u")return p.opts[s];p=p.resumableObj}if(p instanceof t)return typeof p.opts[s]<"u"?p.opts[s]:p.defaults[s]},a.events=[],a.on=function(s,p){a.events.push(s.toLowerCase(),p)},a.fire=function(){for(var s=[],p=0;p<arguments.length;p++)s.push(arguments[p]);for(var g=s[0].toLowerCase(),p=0;p<=a.events.length;p+=2)a.events[p]==g&&a.events[p+1].apply(a,s.slice(1)),a.events[p]=="catchall"&&a.events[p+1].apply(null,s);g=="fileerror"&&a.fire("error",s[2],s[1]),g=="fileprogress"&&a.fire("progress")};var r={stopEvent:function(s){s.stopPropagation(),s.preventDefault()},each:function(s,p){if(typeof s.length<"u"){for(var g=0;g<s.length;g++)if(p(s[g])===!1)return}else for(g in s)if(p(g,s[g])===!1)return},generateUniqueIdentifier:function(s,p){var g=a.getOpt("generateUniqueIdentifier");if(typeof g=="function")return g(s,p);var u=s.webkitRelativePath||s.fileName||s.name,l=s.size;return l+"-"+u.replace(/[^0-9a-zA-Z_-]/img,"")},contains:function(s,p){var g=!1;return r.each(s,function(u){return u==p?(g=!0,!1):!0}),g},formatSize:function(s){return s<1024?s+" bytes":s<1024*1024?(s/1024).toFixed(0)+" KB":s<1024*1024*1024?(s/1024/1024).toFixed(1)+" MB":(s/1024/1024/1024).toFixed(1)+" GB"},getTarget:function(s,p){var g=a.getOpt("target");if(s==="test"&&a.getOpt("testTarget")&&(g=a.getOpt("testTarget")==="/"?a.getOpt("target"):a.getOpt("testTarget")),typeof g=="function")return g(p);var u=g.indexOf("?")<0?"?":"&",l=p.join("&");return g+u+l}},c=function(s){r.stopEvent(s),s.dataTransfer&&s.dataTransfer.items?y(s.dataTransfer.items,s):s.dataTransfer&&s.dataTransfer.files&&y(s.dataTransfer.files,s)},h=function(s){s.preventDefault()};function m(s,p,g,u){var l;if(s.isFile)return s.file(function(R){R.relativePath=p+R.name,g.push(R),u()});if(s.isDirectory?l=s:s instanceof File&&g.push(s),typeof s.webkitGetAsEntry=="function"&&(l=s.webkitGetAsEntry()),l&&l.isDirectory)return M(l,p+l.name+"/",g,u);typeof s.getAsFile=="function"&&(s=s.getAsFile(),s instanceof File&&(s.relativePath=p+s.name,g.push(s))),u()}function b(s,p){if(!s||s.length===0)return p();s[0](function(){b(s.slice(1),p)})}function M(s,p,g,u){var l=s.createReader();l.readEntries(function(R){if(!R.length)return u();b(R.map(function(T){return m.bind(null,T,p,g)}),u)})}function y(s,p){if(s.length){a.fire("beforeAdd");var g=[];b(Array.prototype.map.call(s,function(u){return m.bind(null,u,"",g)}),function(){g.length&&D(g,p)})}}var D=function(s,p){var g=0,u=a.getOpt(["maxFiles","minFileSize","maxFileSize","maxFilesErrorCallback","minFileSizeErrorCallback","maxFileSizeErrorCallback","fileType","fileTypeErrorCallback"]);if(typeof u.maxFiles<"u"&&u.maxFiles<s.length+a.files.length)if(u.maxFiles===1&&a.files.length===1&&s.length===1)a.removeFile(a.files[0]);else return u.maxFilesErrorCallback(s,g++),!1;var l=[],R=[],T=s.length,F=function(){if(!--T){if(!l.length&&!R.length)return;window.setTimeout(function(){a.fire("filesAdded",l,R)},0)}};r.each(s,function(P){var Y=P.name;if(u.fileType.length>0){var _=!1;for(var K in u.fileType){var N="."+u.fileType[K];if(Y.toLowerCase().indexOf(N.toLowerCase(),Y.length-N.length)!==-1){_=!0;break}}if(!_)return u.fileTypeErrorCallback(P,g++),!1}if(typeof u.minFileSize<"u"&&P.size<u.minFileSize)return u.minFileSizeErrorCallback(P,g++),!1;if(typeof u.maxFileSize<"u"&&P.size>u.maxFileSize)return u.maxFileSizeErrorCallback(P,g++),!1;function se(Z){a.getFromUniqueIdentifier(Z)?R.push(P):function(){P.uniqueIdentifier=Z;var de=new C(a,P,Z);a.files.push(de),l.push(de),de.container=typeof p<"u"?p.srcElement:null,window.setTimeout(function(){a.fire("fileAdded",de,p)},0)}(),F()}var Q=r.generateUniqueIdentifier(P,p);Q&&typeof Q.then=="function"?Q.then(function(Z){se(Z)},function(){F()}):se(Q)})};function C(s,p,g){var u=this;u.opts={},u.getOpt=s.getOpt,u._prevProgress=0,u.resumableObj=s,u.file=p,u.fileName=p.fileName||p.name,u.size=p.size,u.relativePath=p.relativePath||p.webkitRelativePath||u.fileName,u.uniqueIdentifier=g,u._pause=!1,u.container="";var l=g!==void 0,R=function(T,F){switch(T){case"progress":u.resumableObj.fire("fileProgress",u,F);break;case"error":u.abort(),l=!0,u.chunks=[],u.resumableObj.fire("fileError",u,F);break;case"success":if(l)return;u.resumableObj.fire("fileProgress",u),u.isComplete()&&u.resumableObj.fire("fileSuccess",u,F);break;case"retry":u.resumableObj.fire("fileRetry",u);break}};return u.chunks=[],u.abort=function(){var T=0;r.each(u.chunks,function(F){F.status()=="uploading"&&(F.abort(),T++)}),T>0&&u.resumableObj.fire("fileProgress",u)},u.cancel=function(){var T=u.chunks;u.chunks=[],r.each(T,function(F){F.status()=="uploading"&&(F.abort(),u.resumableObj.uploadNextChunk())}),u.resumableObj.removeFile(u),u.resumableObj.fire("fileProgress",u)},u.retry=function(){u.bootstrap();var T=!1;u.resumableObj.on("chunkingComplete",function(){T||u.resumableObj.upload(),T=!0})},u.bootstrap=function(){u.abort(),l=!1,u.chunks=[],u._prevProgress=0;for(var T=u.getOpt("forceChunkSize")?Math.ceil:Math.floor,F=Math.max(T(u.file.size/u.getOpt("chunkSize")),1),P=0;P<F;P++)(function(Y){window.setTimeout(function(){u.chunks.push(new I(u.resumableObj,u,Y,R)),u.resumableObj.fire("chunkingProgress",u,Y/F)},0)})(P);window.setTimeout(function(){u.resumableObj.fire("chunkingComplete",u)},0)},u.progress=function(){if(l)return 1;var T=0,F=!1;return r.each(u.chunks,function(P){P.status()=="error"&&(F=!0),T+=P.progress(!0)}),T=F||T>.99999?1:T,T=Math.max(u._prevProgress,T),u._prevProgress=T,T},u.isUploading=function(){var T=!1;return r.each(u.chunks,function(F){if(F.status()=="uploading")return T=!0,!1}),T},u.isComplete=function(){var T=!1;return r.each(u.chunks,function(F){var P=F.status();if(P=="pending"||P=="uploading"||F.preprocessState===1)return T=!0,!1}),!T},u.pause=function(T){typeof T>"u"?u._pause=!u._pause:u._pause=T},u.isPaused=function(){return u._pause},u.resumableObj.fire("chunkingStart",u),u.bootstrap(),this}function I(s,p,g,u){var l=this;l.opts={},l.getOpt=s.getOpt,l.resumableObj=s,l.fileObj=p,l.fileObjSize=p.size,l.fileObjType=p.file.type,l.offset=g,l.callback=u,l.lastProgressCallback=new Date,l.tested=!1,l.retries=0,l.pendingRetry=!1,l.preprocessState=0;var R=l.getOpt("chunkSize");return l.loaded=0,l.startByte=l.offset*R,l.endByte=Math.min(l.fileObjSize,(l.offset+1)*R),l.fileObjSize-l.endByte<R&&!l.getOpt("forceChunkSize")&&(l.endByte=l.fileObjSize),l.xhr=null,l.test=function(){l.xhr=new XMLHttpRequest;var T=function(K){l.tested=!0;var N=l.status();N=="success"?(l.callback(N,l.message()),l.resumableObj.uploadNextChunk()):l.send()};l.xhr.addEventListener("load",T,!1),l.xhr.addEventListener("error",T,!1),l.xhr.addEventListener("timeout",T,!1);var F=[],P=l.getOpt("parameterNamespace"),Y=l.getOpt("query");typeof Y=="function"&&(Y=Y(l.fileObj,l)),r.each(Y,function(K,N){F.push([encodeURIComponent(P+K),encodeURIComponent(N)].join("="))}),F=F.concat([["chunkNumberParameterName",l.offset+1],["chunkSizeParameterName",l.getOpt("chunkSize")],["currentChunkSizeParameterName",l.endByte-l.startByte],["totalSizeParameterName",l.fileObjSize],["typeParameterName",l.fileObjType],["identifierParameterName",l.fileObj.uniqueIdentifier],["fileNameParameterName",l.fileObj.fileName],["relativePathParameterName",l.fileObj.relativePath],["totalChunksParameterName",l.fileObj.chunks.length]].filter(function(K){return l.getOpt(K[0])}).map(function(K){return[P+l.getOpt(K[0]),encodeURIComponent(K[1])].join("=")})),l.xhr.open(l.getOpt("testMethod"),r.getTarget("test",F)),l.xhr.timeout=l.getOpt("xhrTimeout"),l.xhr.withCredentials=l.getOpt("withCredentials");var _=l.getOpt("headers");typeof _=="function"&&(_=_(l.fileObj,l)),r.each(_,function(K,N){l.xhr.setRequestHeader(K,N)}),l.xhr.send(null)},l.preprocessFinished=function(){l.preprocessState=2,l.send()},l.send=function(){var T=l.getOpt("preprocess");if(typeof T=="function")switch(l.preprocessState){case 0:l.preprocessState=1,T(l);return;case 1:return}if(l.getOpt("testChunks")&&!l.tested){l.test();return}l.xhr=new XMLHttpRequest,l.xhr.upload.addEventListener("progress",function(W){new Date-l.lastProgressCallback>l.getOpt("throttleProgressCallbacks")*1e3&&(l.callback("progress"),l.lastProgressCallback=new Date),l.loaded=W.loaded||0},!1),l.loaded=0,l.pendingRetry=!1,l.callback("progress");var F=function(W){var J=l.status();if(J=="success"||J=="error")l.callback(J,l.message()),l.resumableObj.uploadNextChunk();else{l.callback("retry",l.message()),l.abort(),l.retries++;var xe=l.getOpt("chunkRetryInterval");xe!==void 0?(l.pendingRetry=!0,setTimeout(l.send,xe)):l.send()}};l.xhr.addEventListener("load",F,!1),l.xhr.addEventListener("error",F,!1),l.xhr.addEventListener("timeout",F,!1);var P=[["chunkNumberParameterName",l.offset+1],["chunkSizeParameterName",l.getOpt("chunkSize")],["currentChunkSizeParameterName",l.endByte-l.startByte],["totalSizeParameterName",l.fileObjSize],["typeParameterName",l.fileObjType],["identifierParameterName",l.fileObj.uniqueIdentifier],["fileNameParameterName",l.fileObj.fileName],["relativePathParameterName",l.fileObj.relativePath],["totalChunksParameterName",l.fileObj.chunks.length]].filter(function(W){return l.getOpt(W[0])}).reduce(function(W,J){return W[l.getOpt(J[0])]=J[1],W},{}),Y=l.getOpt("query");typeof Y=="function"&&(Y=Y(l.fileObj,l)),r.each(Y,function(W,J){P[W]=J});var _=l.fileObj.file.slice?"slice":l.fileObj.file.mozSlice?"mozSlice":l.fileObj.file.webkitSlice?"webkitSlice":"slice",K=l.fileObj.file[_](l.startByte,l.endByte,l.getOpt("setChunkTypeFromFile")?l.fileObj.file.type:""),N=null,se=[],Q=l.getOpt("parameterNamespace");if(l.getOpt("method")==="octet")N=K,r.each(P,function(W,J){se.push([encodeURIComponent(Q+W),encodeURIComponent(J)].join("="))});else if(N=new FormData,r.each(P,function(W,J){N.append(Q+W,J),se.push([encodeURIComponent(Q+W),encodeURIComponent(J)].join("="))}),l.getOpt("chunkFormat")=="blob")N.append(Q+l.getOpt("fileParameterName"),K,l.fileObj.fileName);else if(l.getOpt("chunkFormat")=="base64"){var Z=new FileReader;Z.onload=function(W){N.append(Q+l.getOpt("fileParameterName"),Z.result),l.xhr.send(N)},Z.readAsDataURL(K)}var de=r.getTarget("upload",se),Me=l.getOpt("uploadMethod");l.xhr.open(Me,de),l.getOpt("method")==="octet"&&l.xhr.setRequestHeader("Content-Type","application/octet-stream"),l.xhr.timeout=l.getOpt("xhrTimeout"),l.xhr.withCredentials=l.getOpt("withCredentials");var ge=l.getOpt("headers");typeof ge=="function"&&(ge=ge(l.fileObj,l)),r.each(ge,function(W,J){l.xhr.setRequestHeader(W,J)}),l.getOpt("chunkFormat")=="blob"&&l.xhr.send(N)},l.abort=function(){l.xhr&&l.xhr.abort(),l.xhr=null},l.status=function(){return l.pendingRetry?"uploading":l.xhr?l.xhr.readyState<4?"uploading":l.xhr.status==200||l.xhr.status==201?"success":r.contains(l.getOpt("permanentErrors"),l.xhr.status)||l.retries>=l.getOpt("maxChunkRetries")?"error":(l.abort(),"pending"):"pending"},l.message=function(){return l.xhr?l.xhr.responseText:""},l.progress=function(T){typeof T>"u"&&(T=!1);var F=T?(l.endByte-l.startByte)/l.fileObjSize:1;if(l.pendingRetry)return 0;(!l.xhr||!l.xhr.status)&&(F*=.95);var P=l.status();switch(P){case"success":case"error":return 1*F;case"pending":return 0*F;default:return l.loaded/(l.endByte-l.startByte)*F}},this}return a.uploadNextChunk=function(){var s=!1;if(a.getOpt("prioritizeFirstAndLastChunk")&&(r.each(a.files,function(g){if(g.chunks.length&&g.chunks[0].status()=="pending"&&g.chunks[0].preprocessState===0)return g.chunks[0].send(),s=!0,!1;if(g.chunks.length>1&&g.chunks[g.chunks.length-1].status()=="pending"&&g.chunks[g.chunks.length-1].preprocessState===0)return g.chunks[g.chunks.length-1].send(),s=!0,!1}),s)||(r.each(a.files,function(g){if(g.isPaused()===!1&&r.each(g.chunks,function(u){if(u.status()=="pending"&&u.preprocessState===0)return u.send(),s=!0,!1}),s)return!1}),s))return!0;var p=!1;return r.each(a.files,function(g){if(!g.isComplete())return p=!0,!1}),p||a.fire("complete"),!1},a.assignBrowse=function(s,p){typeof s.length>"u"&&(s=[s]),r.each(s,function(g){var u;g.tagName==="INPUT"&&g.type==="file"?u=g:(u=document.createElement("input"),u.setAttribute("type","file"),u.style.display="none",g.addEventListener("click",function(){u.style.opacity=0,u.style.display="block",u.focus(),u.click(),u.style.display="none"},!1),g.appendChild(u));var l=a.getOpt("maxFiles");typeof l>"u"||l!=1?u.setAttribute("multiple","multiple"):u.removeAttribute("multiple"),p?u.setAttribute("webkitdirectory","webkitdirectory"):u.removeAttribute("webkitdirectory");var R=a.getOpt("fileType");typeof R<"u"&&R.length>=1?u.setAttribute("accept",R.map(function(T){return"."+T}).join(",")):u.removeAttribute("accept"),u.addEventListener("change",function(T){D(T.target.files,T);var F=a.getOpt("clearInput");F&&(T.target.value="")},!1)})},a.assignDrop=function(s){typeof s.length>"u"&&(s=[s]),r.each(s,function(p){p.addEventListener("dragover",h,!1),p.addEventListener("dragenter",h,!1),p.addEventListener("drop",c,!1)})},a.unAssignDrop=function(s){typeof s.length>"u"&&(s=[s]),r.each(s,function(p){p.removeEventListener("dragover",h),p.removeEventListener("dragenter",h),p.removeEventListener("drop",c)})},a.isUploading=function(){var s=!1;return r.each(a.files,function(p){if(p.isUploading())return s=!0,!1}),s},a.upload=function(){if(!a.isUploading()){a.fire("uploadStart");for(var s=1;s<=a.getOpt("simultaneousUploads");s++)a.uploadNextChunk()}},a.pause=function(){r.each(a.files,function(s){s.abort()}),a.fire("pause")},a.cancel=function(){a.fire("beforeCancel");for(var s=a.files.length-1;s>=0;s--)a.files[s].cancel();a.fire("cancel")},a.progress=function(){var s=0,p=0;return r.each(a.files,function(g){s+=g.progress()*g.size,p+=g.size}),p>0?s/p:0},a.addFile=function(s,p){D([s],p)},a.addFiles=function(s,p){D(s,p)},a.removeFile=function(s){for(var p=a.files.length-1;p>=0;p--)a.files[p]===s&&a.files.splice(p,1)},a.getFromUniqueIdentifier=function(s){var p=!1;return r.each(a.files,function(g){g.uniqueIdentifier==s&&(p=g)}),p},a.getSize=function(){var s=0;return r.each(a.files,function(p){s+=p.size}),s},a.handleDropEvent=function(s){c(s)},a.handleChangeEvent=function(s){D(s.target.files,s),s.target.value=""},a.updateQuery=function(s){a.opts.query=s},this};o.exports=t})()})(ot);var Yt=ot.exports;const Bt=It(Yt);class qt{constructor(t,e={}){S(this,"resumable");S(this,"currentFileItem",null);S(this,"chunkedConfig");S(this,"callbacks");S(this,"uploadCompleteResolve");S(this,"uploadCompleteReject");this.chunkedConfig=t,this.callbacks=e}async upload(t){try{console.info("[ChunkedUploader] 开始分片上传流程...");const e=await this.chunkedConfig.initUpload(t.file.name,t.file.size);return console.info("[ChunkedUploader] 初始化完成:",e),t.uploadSessionId=e.uploadSessionId,this.currentFileItem=t,this.initResumable(e),this.resumable.addFile(t.file),await this.waitForUploadComplete()}catch(e){throw console.error("[ChunkedUploader] 上传失败:",e),e instanceof Error?e:new Error(String(e))}}waitForUploadComplete(){return new Promise((t,e)=>{this.uploadCompleteResolve=t,this.uploadCompleteReject=e})}initResumable(t){console.log("[ChunkedUploader] 初始化 Resumable...",t),this.resumable&&this.resumable.cancel();const e=this.chunkedConfig.getResumableConfig(t),r={...{chunkSize:t.partSize,simultaneousUploads:3,testChunks:!1,method:"multipart",chunkNumberParameterName:"partNumber",totalChunksParameterName:"totalParts",fileParameterName:"file",withCredentials:!0,maxChunkRetries:3,chunkRetryInterval:1e3,forceChunkSize:!0},...e};console.info("[ChunkedUploader] Resumable 配置:",r),this.resumable=new Bt(r),this.bindResumableEvents()}bindResumableEvents(){this.resumable.on("progress",()=>{var e,a,r,c;const t=Math.floor(this.resumable.progress()*100);console.log(`[ChunkedUploader] 上传进度: ${t}%`),this.currentFileItem&&(this.currentFileItem.progress=Math.min(t,90),(a=(e=this.callbacks).onProgress)==null||a.call(e,this.currentFileItem,this.currentFileItem.progress)),(c=(r=this.callbacks).onUpdate)==null||c.call(r)}),this.resumable.on("fileSuccess",()=>{console.log("[ChunkedUploader] 所有分片上传完成,开始合并..."),this.handleResumableComplete()}),this.resumable.on("error",t=>{console.error("[ChunkedUploader] 上传错误:",t),this.handleResumableError(t)}),this.resumable.on("fileAdded",()=>{console.info("[ChunkedUploader] 文件已添加,开始上传分片..."),this.resumable.upload()})}async handleResumableComplete(){if(!(!this.currentFileItem||!this.uploadCompleteResolve||!this.uploadCompleteReject))try{const t=await this.chunkedConfig.mergeChunks(this.currentFileItem.uploadSessionId);this.currentFileItem&&(this.currentFileItem.progress=100),this.uploadCompleteResolve(t),console.log("合并分片成功>>>uploadCompleteResolve",t),this.cleanup()}catch(t){const e=t instanceof Error?t:new Error(String(t));this.handleResumableError(e.message)}}handleResumableError(t){var e,a;this.currentFileItem&&(this.currentFileItem.status="error",this.currentFileItem.errorMessage=t),this.uploadCompleteReject&&(this.uploadCompleteReject(new Error(t)),this.cleanup()),(a=(e=this.callbacks).onUpdate)==null||a.call(e)}cleanup(){this.uploadCompleteResolve=void 0,this.uploadCompleteReject=void 0}pause(){this.resumable&&this.resumable.pause()}resume(){this.resumable&&this.resumable.upload()}cancel(){this.resumable&&(this.resumable.cancel(),this.resumable=null),this.currentFileItem=null,this.cleanup()}}const Kt=()=>`file_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;class Wt{constructor(t,e={}){S(this,"config");S(this,"callbacks");S(this,"chunkedUploader",null);S(this,"uploadFileList",[]);S(this,"fileList",[]);S(this,"uploadProgress",0);S(this,"isUploading",!1);S(this,"uploadMessage","");S(this,"uploadMessageType","info");this.config=t,this.callbacks=e,this.initUploaders()}initUploaders(){const t=this.config.uploadConfig;t!=null&&t.chunkedUpload&&!this.config.multiple&&(this.chunkedUploader=new qt(t.chunkedUpload,{onProgress:(e,a)=>{var r,c,h,m;(c=(r=this.callbacks).onUploadProgress)==null||c.call(r,e,a),(m=(h=this.callbacks).onUpdate)==null||m.call(h)},onUpdate:()=>{var e,a;(a=(e=this.callbacks).onUpdate)==null||a.call(e)}}))}shouldUseChunkedUpload(){const t=this.config.uploadConfig;return!!(t!=null&&t.chunkedUpload&&!this.config.multiple)}updateConfig(t){this.config={...this.config,...t},this.initUploaders()}updateCallbacks(t){this.callbacks={...this.callbacks,...t}}reset(){this.cancelUpload(),this.uploadFileList=[],this.fileList=[],this.uploadProgress=0,this.isUploading=!1,this.uploadMessage="",this.uploadMessageType="info"}convertToBytes(t,e="MB"){return t*{KB:1024,MB:1048576,GB:1073741824}[e]}isValidFileType(t,e){if(!e)return!0;const a=t.name.toLowerCase(),r=a.substring(a.lastIndexOf("."));return e.toLowerCase().split(",").map(h=>h.trim()).some(h=>{if(h.startsWith("."))return r===h;if(h.includes("/")){const[m,b]=h.split("/");return b==="*"?t.type.startsWith(m+"/"):t.type===h}return!1})}beforeUpload(t){var a,r,c,h,m,b,M,y,D,C,I,s;const e=Array.isArray(t)?t:[t];if(!e.length)return(r=(a=this.callbacks).onMessage)==null||r.call(a,L("pleaseSelectFile"),"warning"),!1;if(this.config.multiple&&this.config.maxFiles!=null&&this.uploadFileList.length+e.length>this.config.maxFiles)return(h=(c=this.callbacks).onMessage)==null||h.call(c,L("maxFilesLimit",{max:this.config.maxFiles}),"warning"),!1;for(const p of e)if(!this.isValidFileType(p,this.config.acceptTypes)){const g=this.config.acceptTypes||"";return(b=(m=this.callbacks).onMessage)==null||b.call(m,L("fileFormatNotSupported",{name:p.name,types:g}),"warning"),!1}if(this.config.maxFileSize!=null){const p=this.config.maxFileSizeUnit||"MB",g=this.convertToBytes(this.config.maxFileSize,p);for(const u of e)if(u.size>g)return(y=(M=this.callbacks).onMessage)==null||y.call(M,L("fileSizeExceeded",{name:u.name,size:this.config.maxFileSize,unit:p}),"warning"),!1}for(const p of e){const g={id:Kt(),file:p,name:p.name,size:p.size,progress:0,status:"pending"};this.config.multiple?(this.uploadFileList.unshift(g),this.fileList.unshift(p)):(this.uploadFileList=[g],this.fileList=[p])}return(C=(D=this.callbacks).onUpdate)==null||C.call(D),(s=(I=this.callbacks).onFileChange)==null||s.call(I,this.uploadFileList),this.shouldUseChunkedUpload()?this.processChunkedUpload():this.processFilesWithCustomUpload(),!0}async processChunkedUpload(){var t;if(((t=this.config.uploadConfig)==null?void 0:t.autoUpload)===!0){console.info("[ImportDialogUploader] 自动上传模式,立即开始分片上传");const e=this.uploadFileList.filter(a=>a.status==="pending");for(const a of e)await this.uploadSingleFile(a)}else console.info("[ImportDialogUploader] 延迟上传模式,等待用户点击确认")}async processFilesWithCustomUpload(){var a;if(!((a=this.config.uploadConfig)==null?void 0:a.customUpload))return;const e=this.uploadFileList.filter(r=>r.status==="pending");for(const r of e)await this.processFileWithCustomUpload(r)}async processFileWithCustomUpload(t){var a,r,c,h,m,b,M,y,D;const e=(a=this.config.uploadConfig)==null?void 0:a.customUpload;if(e){t.status="uploading",t.progress=0,this.isUploading=!0,(c=(r=this.callbacks).onUpdate)==null||c.call(r);try{const C={fileList:[...this.uploadFileList],removeFile:I=>{this.removeFile(I)}};t.response=await e(t.file,C,I=>{var s,p,g,u;t.progress=I,(p=(s=this.callbacks).onUploadProgress)==null||p.call(s,t,I),(u=(g=this.callbacks).onUpdate)==null||u.call(g)}),t.status="success",t.progress=100,(m=(h=this.callbacks).onUploadSuccess)==null||m.call(h,t,t.response)}catch(C){t.status="error",t.errorMessage=C instanceof Error?C.message:L("processingFailed"),(M=(b=this.callbacks).onUploadError)==null||M.call(b,t,C)}this.isUploading=this.uploadFileList.some(C=>C.status==="uploading"),(D=(y=this.callbacks).onUpdate)==null||D.call(y),this.updateOverallProgress()}}removeFile(t){var a,r,c,h,m,b,M,y,D;const e=this.shouldUseChunkedUpload()&&((a=this.config.uploadConfig)==null?void 0:a.autoUpload)!==!1;if(t!==void 0&&t>=0&&t<this.uploadFileList.length){const C=this.uploadFileList[t];if(e&&C.status==="uploading")return(c=(r=this.callbacks).onMessage)==null||c.call(r,L("fileUploadingCannotDelete"),"warning"),!1;this.uploadFileList.splice(t,1),this.fileList.splice(t,1)}else{if(e&&this.uploadFileList.some(I=>I.status==="uploading"))return(m=(h=this.callbacks).onMessage)==null||m.call(h,L("filesUploadingCannotClear"),"warning"),!1;this.uploadFileList=[],this.fileList=[]}return this.uploadProgress=0,this.uploadMessage="",this.uploadMessageType="info",this.isUploading=this.uploadFileList.some(C=>C.status==="uploading"),(M=(b=this.callbacks).onFileChange)==null||M.call(b,this.uploadFileList),(D=(y=this.callbacks).onUpdate)==null||D.call(y),!0}async uploadSingleFile(t){var e,a,r,c,h,m,b,M;t.status="uploading",t.progress=0,this.isUploading=!0,(a=(e=this.callbacks).onUpdate)==null||a.call(e);try{return t.response=await this.uploadFileChunked(t),t.status="success",t.progress=100,(c=(r=this.callbacks).onUploadSuccess)==null||c.call(r,t,t.response),t.response}catch(y){throw t.status="error",t.errorMessage=y instanceof Error?y.message:L("uploadFailed"),(m=(h=this.callbacks).onUploadError)==null||m.call(h,t,y),y}finally{this.isUploading=this.uploadFileList.some(y=>y.status==="uploading"),(M=(b=this.callbacks).onUpdate)==null||M.call(b),this.updateOverallProgress()}}async uploadFileChunked(t){if(!this.chunkedUploader)throw new Error(L("chunkedUploadConfigRequired"));return await this.chunkedUploader.upload(t)}async startUpload(){if(!this.shouldUseChunkedUpload())return;const t=this.uploadFileList.filter(a=>a.status==="pending");if(t.length===0)return;const e=[];for(const a of t)try{const r=await this.uploadSingleFile(a);r&&e.push(r)}catch(r){console.error(`文件 ${a.file.name} 上传失败:`,r)}return e}pauseUpload(){var t;(t=this.chunkedUploader)==null||t.pause()}resumeUpload(){var t;(t=this.chunkedUploader)==null||t.resume()}cancelUpload(){var t,e,a;(t=this.chunkedUploader)==null||t.cancel(),this.isUploading=!1,this.uploadMessage="上传已取消",this.uploadMessageType="info",(a=(e=this.callbacks).onUpdate)==null||a.call(e)}updateOverallProgress(){if(this.uploadFileList.length===0){this.uploadProgress=0;return}const t=this.uploadFileList.reduce((e,a)=>e+a.progress,0);this.uploadProgress=Math.round(t/this.uploadFileList.length)}hasUploadingFiles(){return this.uploadFileList.some(t=>t.status==="uploading")}hasPendingFiles(){return this.uploadFileList.some(t=>t.status==="pending")}hasAllFilesUploaded(){return this.uploadFileList.length>0&&this.uploadFileList.every(t=>t.status==="success")}getFailedFiles(){return this.uploadFileList.filter(t=>t.status==="error")}}const rt={success:"icon-success",error:"icon-cuowu",warning:"icon-warning",info:"icon-info"},Te=new Set;function Jt(o){const{message:t,type:e,duration:a=3e3,closable:r=!0}=o,c=document.createElement("div");c.className=`sl-import-dialog-vanilla-toast ${e}`;const h=rt[e]||rt.info;c.innerHTML=`
1628
+ <div class="sl-import-dialog-vanilla-toast-content">
1629
+ <i class="iconfont ${h} sl-import-dialog-vanilla-toast-icon"></i>
1630
+ <span class="sl-import-dialog-vanilla-toast-message">${t}</span>
1631
1631
  </div>
1632
- ${r?`<button class="import-dialog-vanilla-toast-close" data-action="close-toast">
1632
+ ${r?`<button class="sl-import-dialog-vanilla-toast-close" data-action="close-toast">
1633
1633
  <i class="iconfont icon-guanbi"></i>
1634
1634
  </button>`:""}
1635
- `,document.body.appendChild(c);const m=[],b=()=>{c.classList.add("fade-out");const y=window.setTimeout(()=>{c.remove(),Te.delete(M)},3e3);m.push(y)},M={element:c,timers:m,close:b};if(Te.add(M),r){const y=c.querySelector('[data-action="close-toast"]');y&&y.addEventListener("click",b)}if(a>0){const y=window.setTimeout(b,a);m.push(y)}return M}function Gt(){Te.forEach(o=>{o.timers.forEach(t=>{window.clearTimeout(t)}),o.element.remove()}),Te.clear()}const q=class q{constructor(t){S(this,"container",null);S(this,"modalElement",null);S(this,"styleElement",null);S(this,"dateRangePicker",null);S(this,"activeTabIndex",0);S(this,"brandList",[]);S(this,"brandLoading",!1);S(this,"confirmLoading",!1);S(this,"formData",{brandId:void 0,imageRatio:"original",month:1,dateRange:[null,null]});S(this,"modalOptions",{});S(this,"renderer");S(this,"uploader");S(this,"onTabChangeCallback");S(this,"onBrandChangeCallback");S(this,"handleDocumentClick",t=>{const e=t.target;Array.from(document.querySelectorAll(".import-dialog-vanilla-custom-select")).some(r=>r.contains(e))||this.closeAllSelects()});this.container=t||document.body,this.injectStyles(),this.initUploader()}injectStyles(){document.getElementById("import-dialog-vanilla-styles")||(this.styleElement=document.createElement("style"),this.styleElement.id="import-dialog-vanilla-styles",this.styleElement.textContent=Ct(),document.head.appendChild(this.styleElement))}initUploader(){this.uploader=new Wt({multiple:!1,maxFileSizeUnit:"MB"},{onUpdate:()=>this.updateModal(),onMessage:(t,e)=>this.showMessage(t,e),onFileChange:t=>{var e,a;return(a=(e=this.modalOptions.uploadConfig)==null?void 0:e.onFileChange)==null?void 0:a.call(e,t)},onUploadProgress:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onProgress)==null?void 0:r.call(a,t,e)},onUploadSuccess:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onSuccess)==null?void 0:r.call(a,t,e)},onUploadError:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onError)==null?void 0:r.call(a,t,e)}})}get currentConfig(){const t=this.modalOptions.templateType||H.BASE,e=Oe(L),a=e[t]||e[H.BASE],r=this.modalOptions;return{...a,tabs:r.tabs||a.tabs,showBrand:r.showBrand!=null?r.showBrand:a.showBrand,showImageRatio:r.showImageRatio!=null?r.showImageRatio:a.showImageRatio,showMonth:r.showMonth!=null?r.showMonth:a.showMonth,showDateRange:r.showDateRange!=null?r.showDateRange:a.showDateRange,uploadTitle:r.uploadTitle||a.uploadTitle,uploadLinkText:r.uploadLinkText||a.uploadLinkText,uploadHint:r.uploadHint||a.uploadHint,acceptTypes:r.acceptTypes||a.acceptTypes,tips:r.tips||a.tips,templateUrl:r.templateUrl||a.templateUrl}}get dialogTitle(){return this.modalOptions.title||L("batchImport")}get dialogWidth(){return this.modalOptions.width||"480px"}getRenderContext(){var t,e;return{currentConfig:this.currentConfig,modalOptions:this.modalOptions,dialogTitle:this.dialogTitle,width:this.dialogWidth,activeTabIndex:this.activeTabIndex,brandList:this.brandList,brandLoading:this.brandLoading,brandPlaceholder:this.modalOptions.brandPlaceholder||L("defaultBrand"),formData:this.formData,uploadFileList:this.uploader.uploadFileList,multiple:((t=this.modalOptions.uploadConfig)==null?void 0:t.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1,maxFiles:(e=this.modalOptions.uploadConfig)==null?void 0:e.maxFiles,confirmLoading:this.confirmLoading,isUploading:this.uploader.isUploading,uploadProgress:this.uploader.uploadProgress,uploadMessage:this.uploader.uploadMessage,uploadMessageType:this.uploader.uploadMessageType}}createModal(){var t;this.modalElement&&this.modalElement.remove(),this.renderer=new Ht(this.getRenderContext()),this.modalElement=document.createElement("div"),this.modalElement.className="import-dialog-vanilla-wrapper",this.modalElement.innerHTML=this.renderer.render(),(t=this.container)==null||t.appendChild(this.modalElement),this.bindEvents(),this.initDateRangePicker()}updateModal(){var e;if(!this.modalElement)return;const t=(e=this.dateRangePicker)==null?void 0:e.getDates();this.renderer.updateContext(this.getRenderContext()),this.modalElement.innerHTML=this.renderer.render(),this.bindEvents(),this.currentConfig.showDateRange&&(t&&(this.formData.dateRange=t),this.initDateRangePicker())}initDateRangePicker(){var e;if(!this.modalElement)return;const t=this.modalElement.querySelector('[data-field="dateRange"]');t&&((e=this.dateRangePicker)==null||e.destroy(),this.dateRangePicker=new Ot({container:t,defaultDates:[this.formData.dateRange[0],this.formData.dateRange[1]],placeholder:[L("startDate"),L("endDate")],shortcuts:this.modalOptions.dateRangeShortcuts,disabledDate:this.modalOptions.disabledDate,onChange:a=>{this.formData.dateRange[0]=a[0],this.formData.dateRange[1]=a[1]?new Date(a[1].getFullYear(),a[1].getMonth(),a[1].getDate(),23,59,59):null}}))}bindEvents(){if(!this.modalElement)return;const t=this.modalElement.querySelector(".import-dialog-vanilla-overlay");t==null||t.addEventListener("click",D=>D.stopPropagation());const e=this.modalElement.querySelector(".import-dialog-vanilla-modal");e==null||e.addEventListener("click",D=>D.stopPropagation());const a=this.modalElement.querySelector("#import-dialog-close-btn");a==null||a.addEventListener("click",()=>this.handleCancel()),this.modalElement.querySelectorAll(".import-dialog-vanilla-tab").forEach(D=>{D.addEventListener("click",C=>{const I=parseInt(C.currentTarget.dataset.tabIndex||"0");this.handleTabChange(I)})});const c=this.modalElement.querySelector(".import-dialog-vanilla-upload-area"),h=this.modalElement.querySelector(".import-dialog-vanilla-file-input");c==null||c.addEventListener("click",()=>{this.uploader.isUploading||h==null||h.click()}),h==null||h.addEventListener("change",D=>{var I;const C=D.target.files;C&&C.length>0&&((((I=this.modalOptions.uploadConfig)==null?void 0:I.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1)?this.uploader.beforeUpload(Array.from(C)):this.uploader.beforeUpload(C[0]))}),c==null||c.addEventListener("dragover",D=>{D.preventDefault(),c.classList.add("dragover")}),c==null||c.addEventListener("dragleave",()=>{c.classList.remove("dragover")}),c==null||c.addEventListener("drop",D=>{var I,s;D.preventDefault(),c.classList.remove("dragover");const C=(I=D.dataTransfer)==null?void 0:I.files;C&&C.length>0&&!this.uploader.isUploading&&((((s=this.modalOptions.uploadConfig)==null?void 0:s.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1)?this.uploader.beforeUpload(Array.from(C)):this.uploader.beforeUpload(C[0]))}),this.modalElement.querySelectorAll(".import-dialog-vanilla-file-remove-btn").forEach(D=>{D.addEventListener("click",C=>{C.stopPropagation();const I=D.getAttribute("data-file-index");I!==null?this.uploader.removeFile(parseInt(I)):this.uploader.removeFile()})}),this.bindFormEvents();const b=this.modalElement.querySelector("#import-dialog-confirm-btn");b==null||b.addEventListener("click",()=>this.handleConfirm());const M=this.modalElement.querySelector("#import-dialog-cancel-btn");M==null||M.addEventListener("click",()=>this.handleCancel());const y=this.modalElement.querySelector("#import-dialog-download-btn");y==null||y.addEventListener("click",D=>{D.preventDefault(),this.handleDownloadTemplate()})}bindFormEvents(){if(!this.modalElement)return;this.bindCustomSelectEvents(),this.modalElement.querySelectorAll('[data-field="imageRatio"]').forEach(e=>{e.addEventListener("change",a=>{this.formData.imageRatio=a.target.value})})}bindCustomSelectEvents(){if(!this.modalElement)return;this.modalElement.querySelectorAll(".import-dialog-vanilla-custom-select").forEach(e=>{const a=e.querySelector(".import-dialog-vanilla-select-trigger"),r=e.querySelector(".import-dialog-vanilla-select-dropdown"),c=e.querySelectorAll(".import-dialog-vanilla-select-option"),h=e.getAttribute("data-field");a==null||a.addEventListener("click",m=>{m.stopPropagation(),!a.classList.contains("disabled")&&(this.closeAllSelects(e),a.classList.toggle("active"),r==null||r.classList.toggle("show"))}),c.forEach(m=>{m.addEventListener("click",b=>{var C;b.stopPropagation();const M=m.getAttribute("data-value"),y=m.textContent||"",D=a.querySelector(".import-dialog-vanilla-select-value");D&&(D.textContent=y,D.classList.remove("import-dialog-vanilla-select-placeholder")),c.forEach(I=>I.classList.remove("selected")),m.classList.add("selected"),a.classList.remove("active"),r==null||r.classList.remove("show"),h==="brandId"?(this.formData.brandId=M||void 0,(C=this.onBrandChangeCallback)==null||C.call(this,M||"")):h==="month"&&(this.formData.month=parseInt(M||"1"))})})}),document.addEventListener("click",this.handleDocumentClick)}closeAllSelects(t){if(!this.modalElement)return;this.modalElement.querySelectorAll(".import-dialog-vanilla-custom-select").forEach(a=>{if(t&&a===t)return;const r=a.querySelector(".import-dialog-vanilla-select-trigger"),c=a.querySelector(".import-dialog-vanilla-select-dropdown");r==null||r.classList.remove("active"),c==null||c.classList.remove("show")})}resetForm(){const t=new Date,e=t.getMonth()+1,a=new Date(t.getFullYear(),t.getMonth(),1),r=new Date(t.getFullYear(),t.getMonth()+1,0,23,59,59);this.formData={brandId:void 0,imageRatio:"original",month:e,dateRange:[a,r]},this.uploader.reset()}async loadBrandData(){if(!this.currentConfig.showBrand)return;const t=this.modalOptions.brandData;if(Array.isArray(t))this.brandList=t,this.updateModal();else if(typeof t=="function"){this.brandLoading=!0,this.updateModal();try{this.brandList=await t()}catch{this.brandList=[]}finally{this.brandLoading=!1,this.updateModal()}}}handleTabChange(t){var a,r,c;this.activeTabIndex=t;const e={index:t,tab:this.currentConfig.tabs[t]};(a=this.onTabChangeCallback)==null||a.call(this,e),(c=(r=this.modalOptions).onTabChange)==null||c.call(r,e),this.updateModal()}async handleCancel(){this.modalOptions.onBeforeCancel&&await this.modalOptions.onBeforeCancel(),this.hide(),this.modalOptions.onCancel&&await this.modalOptions.onCancel()}async handleConfirm(){var c,h,m,b;if(this.uploader.uploadFileList.length===0){this.showMessage(L("fileTypeError"),"warning");return}if(this.uploader.hasUploadingFiles()){this.showMessage(L("filesUploading"),"warning");return}if(this.uploader.hasPendingFiles()){const M=((c=this.modalOptions.uploadConfig)==null?void 0:c.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0;M&&(this.confirmLoading=!0,this.updateModal());try{const y=await this.uploader.startUpload();console.log("[分片上传] 分片上传结果:",y)}catch(y){console.error("[ImportDialog] 上传失败:",y),this.showMessage(L("uploadFailedRetry"),"error"),M&&(this.confirmLoading=!1,this.updateModal());return}}const t=this.uploader.getFailedFiles();if(console.log("[ImportDialog] 上传失败的文件数:",t),t.length>0){this.showMessage(L("filesUploadFailed",{count:t.length}),"warning"),(((h=this.modalOptions.uploadConfig)==null?void 0:h.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0)&&(this.confirmLoading=!1,this.updateModal());return}if(!this.uploader.hasAllFilesUploaded()){this.showMessage("请等待所有文件上传完成","warning"),(((m=this.modalOptions.uploadConfig)==null?void 0:m.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0)&&(this.confirmLoading=!1,this.updateModal());return}const a={files:this.uploader.uploadFileList.map(M=>M.response||M.file),formData:{...this.formData},activeTab:this.currentConfig.tabs[this.activeTabIndex],activeTabIndex:this.activeTabIndex},r=((b=this.modalOptions.uploadConfig)==null?void 0:b.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0;r&&(this.confirmLoading=!0,this.updateModal());try{if(this.modalOptions.onBeforeConfirm&&await this.modalOptions.onBeforeConfirm(a),this.modalOptions.onConfirm){const M=await this.modalOptions.onConfirm(a);M!=null&&M.success?this.hide():M!=null&&M.message&&this.showMessage(M.message,"error")}}finally{r&&(this.confirmLoading=!1,this.updateModal())}}showMessage(t,e){Jt({message:t,type:e,duration:3e3})}_openModalCore(t){this.modalOptions=t||{},t!=null&&t.locale&&it(t.locale);const e=t==null?void 0:t.uploadConfig;this.uploader.updateConfig({multiple:(e==null?void 0:e.multiple)!=null?e.multiple:!1,maxFiles:e==null?void 0:e.maxFiles,maxFileSize:e==null?void 0:e.maxFileSize,maxFileSizeUnit:(e==null?void 0:e.maxFileSizeUnit)!=null?e.maxFileSizeUnit:"MB",acceptTypes:this.currentConfig.acceptTypes,uploadConfig:e}),this.activeTabIndex=(t==null?void 0:t.defaultActiveTab)||0,this.resetForm(),this.createModal(),this.loadBrandData()}openModal(t){this._openModalCore(t)}closeModal(){this.handleCancel()}handleDownloadTemplate(){var t;if(this.modalOptions.onDownloadTemplate)this.modalOptions.onDownloadTemplate({url:this.currentConfig.templateUrl||"",activeTab:(t=this.modalOptions.tabs)==null?void 0:t[this.activeTabIndex]});else if(this.currentConfig.templateUrl){const e=document.createElement("a");e.href=this.currentConfig.templateUrl,e.download="",document.body.appendChild(e),e.click(),document.body.removeChild(e)}}setConfirmLoading(t){this.confirmLoading=t,this.updateModal()}hide(){var t;(t=this.dateRangePicker)==null||t.destroy(),this.dateRangePicker=null,this.modalElement&&(this.modalElement.remove(),this.modalElement=null),document.removeEventListener("click",this.handleDocumentClick)}destroy(){this.hide(),Gt(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null),document.removeEventListener("click",this.handleDocumentClick)}onTabChange(t){this.onTabChangeCallback=t}onBrandChange(t){this.onBrandChangeCallback=t}static getInstance(){return q.instance||(q.instance=new q(document.body)),q.instance}static open(t){return new Promise(e=>{const a=q.getInstance(),r={...t,onBeforeConfirm:async c=>{t!=null&&t.onBeforeConfirm&&await t.onBeforeConfirm(c)},onConfirm:async c=>{if(t!=null&&t.onConfirm){const h=await t.onConfirm(c);return h!=null&&h.success&&e(c),h}e(c)},onBeforeCancel:async()=>{t!=null&&t.onBeforeCancel&&await t.onBeforeCancel()},onCancel:()=>{t!=null&&t.onCancel&&t.onCancel(),e(null)}};a._openModalCore(r)})}static close(){var t;(t=q.instance)==null||t.closeModal()}static setLoading(t){var e;(e=q.instance)==null||e.setConfirmLoading(t)}static isReady(){return q.instance!==null}static setLocale(t){it(t),q.instance&&q.instance.updateModal()}static getLocale(){return qe.getLocale()}static destroyInstance(){q.instance&&(q.instance.destroy(),q.instance=null)}static install(){typeof window<"u"&&(window.addEventListener("message",t=>{const{type:e,data:a}=t.data||{};e==="OPEN_IMPORT_DIALOG"?q.open(a).catch(()=>{}):e==="CLOSE_IMPORT_DIALOG"&&q.close()}),window.$importDialog=q)}};S(q,"instance",null);let le=q;const lt=le,st=()=>le.install();typeof window<"u"&&(window.SlImport={ImportDialog:le,importDialogService:lt,installImportDialog:st,types:Qe,default:le}),G.ImportDialog=le,G.default=le,G.importDialogService=lt,G.installImportDialog=st,G.types=Qe,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1635
+ `,document.body.appendChild(c);const m=[],b=()=>{c.classList.add("fade-out");const y=window.setTimeout(()=>{c.remove(),Te.delete(M)},3e3);m.push(y)},M={element:c,timers:m,close:b};if(Te.add(M),r){const y=c.querySelector('[data-action="close-toast"]');y&&y.addEventListener("click",b)}if(a>0){const y=window.setTimeout(b,a);m.push(y)}return M}function Gt(){Te.forEach(o=>{o.timers.forEach(t=>{window.clearTimeout(t)}),o.element.remove()}),Te.clear()}const q=class q{constructor(t){S(this,"container",null);S(this,"modalElement",null);S(this,"styleElement",null);S(this,"dateRangePicker",null);S(this,"activeTabIndex",0);S(this,"brandList",[]);S(this,"brandLoading",!1);S(this,"confirmLoading",!1);S(this,"formData",{brandId:void 0,imageRatio:"original",month:1,dateRange:[null,null]});S(this,"modalOptions",{});S(this,"renderer");S(this,"uploader");S(this,"onTabChangeCallback");S(this,"onBrandChangeCallback");S(this,"handleDocumentClick",t=>{const e=t.target;Array.from(document.querySelectorAll(".sl-import-dialog-vanilla-custom-select")).some(r=>r.contains(e))||this.closeAllSelects()});this.container=t||document.body,this.injectStyles(),this.initUploader()}injectStyles(){document.getElementById("sl-import-dialog-vanilla-styles")||(this.styleElement=document.createElement("style"),this.styleElement.id="sl-import-dialog-vanilla-styles",this.styleElement.textContent=Ct(),document.head.appendChild(this.styleElement))}initUploader(){this.uploader=new Wt({multiple:!1,maxFileSizeUnit:"MB"},{onUpdate:()=>this.updateModal(),onMessage:(t,e)=>this.showMessage(t,e),onFileChange:t=>{var e,a;return(a=(e=this.modalOptions.uploadConfig)==null?void 0:e.onFileChange)==null?void 0:a.call(e,t)},onUploadProgress:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onProgress)==null?void 0:r.call(a,t,e)},onUploadSuccess:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onSuccess)==null?void 0:r.call(a,t,e)},onUploadError:(t,e)=>{var a,r;return(r=(a=this.modalOptions.uploadConfig)==null?void 0:a.onError)==null?void 0:r.call(a,t,e)}})}get currentConfig(){const t=this.modalOptions.templateType||H.BASE,e=Oe(L),a=e[t]||e[H.BASE],r=this.modalOptions;return{...a,tabs:r.tabs||a.tabs,showBrand:r.showBrand!=null?r.showBrand:a.showBrand,showImageRatio:r.showImageRatio!=null?r.showImageRatio:a.showImageRatio,showMonth:r.showMonth!=null?r.showMonth:a.showMonth,showDateRange:r.showDateRange!=null?r.showDateRange:a.showDateRange,uploadTitle:r.uploadTitle||a.uploadTitle,uploadLinkText:r.uploadLinkText||a.uploadLinkText,uploadHint:r.uploadHint||a.uploadHint,acceptTypes:r.acceptTypes||a.acceptTypes,tips:r.tips||a.tips,templateUrl:r.templateUrl||a.templateUrl}}get dialogTitle(){return this.modalOptions.title||L("batchImport")}get dialogWidth(){return this.modalOptions.width||"480px"}getRenderContext(){var t,e;return{currentConfig:this.currentConfig,modalOptions:this.modalOptions,dialogTitle:this.dialogTitle,width:this.dialogWidth,activeTabIndex:this.activeTabIndex,brandList:this.brandList,brandLoading:this.brandLoading,brandPlaceholder:this.modalOptions.brandPlaceholder||L("defaultBrand"),formData:this.formData,uploadFileList:this.uploader.uploadFileList,multiple:((t=this.modalOptions.uploadConfig)==null?void 0:t.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1,maxFiles:(e=this.modalOptions.uploadConfig)==null?void 0:e.maxFiles,confirmLoading:this.confirmLoading,isUploading:this.uploader.isUploading,uploadProgress:this.uploader.uploadProgress,uploadMessage:this.uploader.uploadMessage,uploadMessageType:this.uploader.uploadMessageType}}createModal(){var t;this.modalElement&&this.modalElement.remove(),this.renderer=new Ht(this.getRenderContext()),this.modalElement=document.createElement("div"),this.modalElement.className="sl-import-dialog-vanilla-wrapper",this.modalElement.innerHTML=this.renderer.render(),(t=this.container)==null||t.appendChild(this.modalElement),this.bindEvents(),this.initDateRangePicker()}updateModal(){var e;if(!this.modalElement)return;const t=(e=this.dateRangePicker)==null?void 0:e.getDates();this.renderer.updateContext(this.getRenderContext()),this.modalElement.innerHTML=this.renderer.render(),this.bindEvents(),this.currentConfig.showDateRange&&(t&&(this.formData.dateRange=t),this.initDateRangePicker())}initDateRangePicker(){var e;if(!this.modalElement)return;const t=this.modalElement.querySelector('[data-field="dateRange"]');t&&((e=this.dateRangePicker)==null||e.destroy(),this.dateRangePicker=new Ot({container:t,defaultDates:[this.formData.dateRange[0],this.formData.dateRange[1]],placeholder:[L("startDate"),L("endDate")],shortcuts:this.modalOptions.dateRangeShortcuts,disabledDate:this.modalOptions.disabledDate,onChange:a=>{this.formData.dateRange[0]=a[0],this.formData.dateRange[1]=a[1]?new Date(a[1].getFullYear(),a[1].getMonth(),a[1].getDate(),23,59,59):null}}))}bindEvents(){if(!this.modalElement)return;const t=this.modalElement.querySelector(".sl-import-dialog-vanilla-overlay");t==null||t.addEventListener("click",D=>D.stopPropagation());const e=this.modalElement.querySelector(".sl-import-dialog-vanilla-modal");e==null||e.addEventListener("click",D=>D.stopPropagation());const a=this.modalElement.querySelector("#sl-import-dialog-close-btn");a==null||a.addEventListener("click",()=>this.handleCancel()),this.modalElement.querySelectorAll(".sl-import-dialog-vanilla-tab").forEach(D=>{D.addEventListener("click",C=>{const I=parseInt(C.currentTarget.dataset.tabIndex||"0");this.handleTabChange(I)})});const c=this.modalElement.querySelector(".sl-import-dialog-vanilla-upload-area"),h=this.modalElement.querySelector(".sl-import-dialog-vanilla-file-input");c==null||c.addEventListener("click",()=>{this.uploader.isUploading||h==null||h.click()}),h==null||h.addEventListener("change",D=>{var I;const C=D.target.files;C&&C.length>0&&((((I=this.modalOptions.uploadConfig)==null?void 0:I.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1)?this.uploader.beforeUpload(Array.from(C)):this.uploader.beforeUpload(C[0]))}),c==null||c.addEventListener("dragover",D=>{D.preventDefault(),c.classList.add("dragover")}),c==null||c.addEventListener("dragleave",()=>{c.classList.remove("dragover")}),c==null||c.addEventListener("drop",D=>{var I,s;D.preventDefault(),c.classList.remove("dragover");const C=(I=D.dataTransfer)==null?void 0:I.files;C&&C.length>0&&!this.uploader.isUploading&&((((s=this.modalOptions.uploadConfig)==null?void 0:s.multiple)!=null?this.modalOptions.uploadConfig.multiple:!1)?this.uploader.beforeUpload(Array.from(C)):this.uploader.beforeUpload(C[0]))}),this.modalElement.querySelectorAll(".sl-import-dialog-vanilla-file-remove-btn").forEach(D=>{D.addEventListener("click",C=>{C.stopPropagation();const I=D.getAttribute("data-file-index");I!==null?this.uploader.removeFile(parseInt(I)):this.uploader.removeFile()})}),this.bindFormEvents();const b=this.modalElement.querySelector("#sl-import-dialog-confirm-btn");b==null||b.addEventListener("click",()=>this.handleConfirm());const M=this.modalElement.querySelector("#sl-import-dialog-cancel-btn");M==null||M.addEventListener("click",()=>this.handleCancel());const y=this.modalElement.querySelector("#sl-import-dialog-download-btn");y==null||y.addEventListener("click",D=>{D.preventDefault(),this.handleDownloadTemplate()})}bindFormEvents(){if(!this.modalElement)return;this.bindCustomSelectEvents(),this.modalElement.querySelectorAll('[data-field="imageRatio"]').forEach(e=>{e.addEventListener("change",a=>{this.formData.imageRatio=a.target.value})})}bindCustomSelectEvents(){if(!this.modalElement)return;this.modalElement.querySelectorAll(".sl-import-dialog-vanilla-custom-select").forEach(e=>{const a=e.querySelector(".sl-import-dialog-vanilla-select-trigger"),r=e.querySelector(".sl-import-dialog-vanilla-select-dropdown"),c=e.querySelectorAll(".sl-import-dialog-vanilla-select-option"),h=e.getAttribute("data-field");a==null||a.addEventListener("click",m=>{m.stopPropagation(),!a.classList.contains("disabled")&&(this.closeAllSelects(e),a.classList.toggle("active"),r==null||r.classList.toggle("show"))}),c.forEach(m=>{m.addEventListener("click",b=>{var C;b.stopPropagation();const M=m.getAttribute("data-value"),y=m.textContent||"",D=a.querySelector(".sl-import-dialog-vanilla-select-value");D&&(D.textContent=y,D.classList.remove("sl-import-dialog-vanilla-select-placeholder")),c.forEach(I=>I.classList.remove("selected")),m.classList.add("selected"),a.classList.remove("active"),r==null||r.classList.remove("show"),h==="brandId"?(this.formData.brandId=M||void 0,(C=this.onBrandChangeCallback)==null||C.call(this,M||"")):h==="month"&&(this.formData.month=parseInt(M||"1"))})})}),document.addEventListener("click",this.handleDocumentClick)}closeAllSelects(t){if(!this.modalElement)return;this.modalElement.querySelectorAll(".sl-import-dialog-vanilla-custom-select").forEach(a=>{if(t&&a===t)return;const r=a.querySelector(".sl-import-dialog-vanilla-select-trigger"),c=a.querySelector(".sl-import-dialog-vanilla-select-dropdown");r==null||r.classList.remove("active"),c==null||c.classList.remove("show")})}resetForm(){const t=new Date,e=t.getMonth()+1,a=new Date(t.getFullYear(),t.getMonth(),1),r=new Date(t.getFullYear(),t.getMonth()+1,0,23,59,59);this.formData={brandId:void 0,imageRatio:"original",month:e,dateRange:[a,r]},this.uploader.reset()}async loadBrandData(){if(!this.currentConfig.showBrand)return;const t=this.modalOptions.brandData;if(Array.isArray(t))this.brandList=t,this.updateModal();else if(typeof t=="function"){this.brandLoading=!0,this.updateModal();try{this.brandList=await t()}catch{this.brandList=[]}finally{this.brandLoading=!1,this.updateModal()}}}handleTabChange(t){var a,r,c;this.activeTabIndex=t;const e={index:t,tab:this.currentConfig.tabs[t]};(a=this.onTabChangeCallback)==null||a.call(this,e),(c=(r=this.modalOptions).onTabChange)==null||c.call(r,e),this.updateModal()}async handleCancel(){this.modalOptions.onBeforeCancel&&await this.modalOptions.onBeforeCancel(),this.hide(),this.modalOptions.onCancel&&await this.modalOptions.onCancel()}async handleConfirm(){var c,h,m,b;if(this.uploader.uploadFileList.length===0){this.showMessage(L("fileTypeError"),"warning");return}if(this.uploader.hasUploadingFiles()){this.showMessage(L("filesUploading"),"warning");return}if(this.uploader.hasPendingFiles()){const M=((c=this.modalOptions.uploadConfig)==null?void 0:c.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0;M&&(this.confirmLoading=!0,this.updateModal());try{const y=await this.uploader.startUpload();console.log("[分片上传] 分片上传结果:",y)}catch(y){console.error("[ImportDialog] 上传失败:",y),this.showMessage(L("uploadFailedRetry"),"error"),M&&(this.confirmLoading=!1,this.updateModal());return}}const t=this.uploader.getFailedFiles();if(console.log("[ImportDialog] 上传失败的文件数:",t),t.length>0){this.showMessage(L("filesUploadFailed",{count:t.length}),"warning"),(((h=this.modalOptions.uploadConfig)==null?void 0:h.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0)&&(this.confirmLoading=!1,this.updateModal());return}if(!this.uploader.hasAllFilesUploaded()){this.showMessage("请等待所有文件上传完成","warning"),(((m=this.modalOptions.uploadConfig)==null?void 0:m.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0)&&(this.confirmLoading=!1,this.updateModal());return}const a={files:this.uploader.uploadFileList.map(M=>M.response||M.file),formData:{...this.formData},activeTab:this.currentConfig.tabs[this.activeTabIndex],activeTabIndex:this.activeTabIndex},r=((b=this.modalOptions.uploadConfig)==null?void 0:b.confirmLoading)!=null?this.modalOptions.uploadConfig.confirmLoading:!0;r&&(this.confirmLoading=!0,this.updateModal());try{if(this.modalOptions.onBeforeConfirm&&await this.modalOptions.onBeforeConfirm(a),this.modalOptions.onConfirm){const M=await this.modalOptions.onConfirm(a);M!=null&&M.success?this.hide():M!=null&&M.message&&this.showMessage(M.message,"error")}}finally{r&&(this.confirmLoading=!1,this.updateModal())}}showMessage(t,e){Jt({message:t,type:e,duration:3e3})}_openModalCore(t){this.modalOptions=t||{},t!=null&&t.locale&&it(t.locale);const e=t==null?void 0:t.uploadConfig;this.uploader.updateConfig({multiple:(e==null?void 0:e.multiple)!=null?e.multiple:!1,maxFiles:e==null?void 0:e.maxFiles,maxFileSize:e==null?void 0:e.maxFileSize,maxFileSizeUnit:(e==null?void 0:e.maxFileSizeUnit)!=null?e.maxFileSizeUnit:"MB",acceptTypes:this.currentConfig.acceptTypes,uploadConfig:e}),this.activeTabIndex=(t==null?void 0:t.defaultActiveTab)||0,this.resetForm(),this.createModal(),this.loadBrandData()}openModal(t){this._openModalCore(t)}closeModal(){this.handleCancel()}handleDownloadTemplate(){var t;if(this.modalOptions.onDownloadTemplate)this.modalOptions.onDownloadTemplate({url:this.currentConfig.templateUrl||"",activeTab:(t=this.modalOptions.tabs)==null?void 0:t[this.activeTabIndex]});else if(this.currentConfig.templateUrl){const e=document.createElement("a");e.href=this.currentConfig.templateUrl,e.download="",document.body.appendChild(e),e.click(),document.body.removeChild(e)}}setConfirmLoading(t){this.confirmLoading=t,this.updateModal()}hide(){var t;(t=this.dateRangePicker)==null||t.destroy(),this.dateRangePicker=null,this.modalElement&&(this.modalElement.remove(),this.modalElement=null),document.removeEventListener("click",this.handleDocumentClick)}destroy(){this.hide(),Gt(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null),document.removeEventListener("click",this.handleDocumentClick)}onTabChange(t){this.onTabChangeCallback=t}onBrandChange(t){this.onBrandChangeCallback=t}static getInstance(){return q.instance||(q.instance=new q(document.body)),q.instance}static open(t){return new Promise(e=>{const a=q.getInstance(),r={...t,onBeforeConfirm:async c=>{t!=null&&t.onBeforeConfirm&&await t.onBeforeConfirm(c)},onConfirm:async c=>{if(t!=null&&t.onConfirm){const h=await t.onConfirm(c);return h!=null&&h.success&&e(c),h}e(c)},onBeforeCancel:async()=>{t!=null&&t.onBeforeCancel&&await t.onBeforeCancel()},onCancel:()=>{t!=null&&t.onCancel&&t.onCancel(),e(null)}};a._openModalCore(r)})}static close(){var t;(t=q.instance)==null||t.closeModal()}static setLoading(t){var e;(e=q.instance)==null||e.setConfirmLoading(t)}static isReady(){return q.instance!==null}static setLocale(t){it(t),q.instance&&q.instance.updateModal()}static getLocale(){return qe.getLocale()}static destroyInstance(){q.instance&&(q.instance.destroy(),q.instance=null)}static install(){typeof window<"u"&&(window.addEventListener("message",t=>{const{type:e,data:a}=t.data||{};e==="OPEN_IMPORT_DIALOG"?q.open(a).catch(()=>{}):e==="CLOSE_IMPORT_DIALOG"&&q.close()}),window.$importDialog=q)}};S(q,"instance",null);let le=q;const lt=le,st=()=>le.install();typeof window<"u"&&(window.SlImport={ImportDialog:le,importDialogService:lt,installImportDialog:st,types:Qe,default:le}),G.ImportDialog=le,G.default=le,G.importDialogService=lt,G.installImportDialog=st,G.types=Qe,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});