@deot/vc 1.0.25 → 1.0.26

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.
@@ -6370,388 +6370,6 @@
6370
6370
  }
6371
6371
  }
6372
6372
 
6373
- class ACache {
6374
- options;
6375
- constructor() {
6376
- this.options = {
6377
- version: "",
6378
- get: (v) => flattenJSONParse(v),
6379
- set: (v) => v
6380
- };
6381
- }
6382
- configure(options) {
6383
- if (typeof window === "undefined")
6384
- return;
6385
- this.options = {
6386
- ...this.options,
6387
- ...options
6388
- };
6389
- }
6390
- }
6391
-
6392
- (() => {
6393
- try {
6394
- document.cookie = "test";
6395
- return true;
6396
- } catch (_) {
6397
- return false;
6398
- }
6399
- })();
6400
-
6401
- class MemoryStorage {
6402
- store = {};
6403
- getItem(key) {
6404
- return this.store[key] || null;
6405
- }
6406
- setItem(key, val) {
6407
- this.store[key] = val;
6408
- }
6409
- removeItem(key) {
6410
- delete this.store[key];
6411
- }
6412
- }
6413
-
6414
- const PREFIX_NAME = "@deot/helper/";
6415
- const formatKey = (key, version) => {
6416
- return `${version ? `${PREFIX_NAME}${version}:` : ""}${key}`;
6417
- };
6418
- const ALLOW$1 = (() => {
6419
- const test = "test";
6420
- try {
6421
- window.localStorage.setItem(test, test);
6422
- window.localStorage.removeItem(test);
6423
- return true;
6424
- } catch (_) {
6425
- return false;
6426
- }
6427
- })();
6428
- class StorageStore extends ACache {
6429
- sessionStorage = new MemoryStorage();
6430
- localStorage = new MemoryStorage();
6431
- getInvoke(options) {
6432
- return options?.session ? "sessionStorage" : "localStorage";
6433
- }
6434
- configure(options) {
6435
- super.configure(options);
6436
- if (!ALLOW$1)
6437
- return;
6438
- const { version } = this.options;
6439
- Object.keys(window.localStorage).forEach((item) => {
6440
- /* istanbul ignore else -- @preserve */
6441
- if (item.includes(PREFIX_NAME) && !item.includes(`${PREFIX_NAME}${version}`)) {
6442
- window.localStorage.removeItem(item);
6443
- }
6444
- });
6445
- }
6446
- /**
6447
- * 设置缓存
6448
- * @param key 保存的键值
6449
- * @param value 保存的内容
6450
- * @param options ~
6451
- */
6452
- set(key, value, options) {
6453
- if (!ALLOW$1)
6454
- return;
6455
- const invoke = this.getInvoke(options);
6456
- key = formatKey(key, this.options.version);
6457
- value = this.options.set(typeof value === "string" ? value : JSON.stringify(value));
6458
- try {
6459
- window[invoke].setItem(key, value);
6460
- } catch (error) {
6461
- this[invoke].setItem(key, value);
6462
- }
6463
- }
6464
- /**
6465
- * 获取缓存
6466
- * @param key 保存的键值
6467
- * @param options ~
6468
- * @returns ~
6469
- */
6470
- get(key, options) {
6471
- if (!ALLOW$1)
6472
- return null;
6473
- const invoke = this.getInvoke(options);
6474
- key = formatKey(key, this.options.version);
6475
- const value = this[invoke].getItem(key) || window[invoke].getItem(key);
6476
- return this.options.get(value);
6477
- }
6478
- /**
6479
- * 删除缓存
6480
- * @param key 键值
6481
- * @param options ~
6482
- */
6483
- remove(key, options) {
6484
- if (!ALLOW$1)
6485
- return;
6486
- const invoke = this.getInvoke(options);
6487
- key = formatKey(key, this.options.version);
6488
- this[invoke].removeItem(key);
6489
- window[invoke].removeItem(key);
6490
- }
6491
- }
6492
- const Storage$1 = new StorageStore();
6493
-
6494
- const ALLOW = (() => {
6495
- try {
6496
- window.indexedDB.open;
6497
- return true;
6498
- } catch (_) {
6499
- return false;
6500
- }
6501
- })();
6502
- class IndexedDBStore extends ACache {
6503
- timestramp = (/* @__PURE__ */ new Date()).getTime();
6504
- count = 0;
6505
- db = null;
6506
- pending = [];
6507
- constructor(options) {
6508
- super();
6509
- this.options = {
6510
- ...this.options,
6511
- keyPath: "__id",
6512
- name: "default-db",
6513
- storeName: "default-store",
6514
- version: 1
6515
- };
6516
- options && this.configure(options);
6517
- }
6518
- getUid() {
6519
- return `${this.timestramp}${this.count++}`;
6520
- }
6521
- configure(options) {
6522
- super.configure(options);
6523
- if (typeof this.options.version === "string") {
6524
- this.options.version = parseInt(this.options.version, 10);
6525
- }
6526
- }
6527
- /**
6528
- * 每次操作完要关闭
6529
- * 1. 浏览器上不关闭的话,删库操作会卡一会
6530
- * 2. fake-indexeddb不关闭会卡死
6531
- * @param fn ~
6532
- * @returns ~
6533
- */
6534
- concurrent(fn) {
6535
- const target = new Promise((resolve, reject) => {
6536
- fn().then(resolve).catch(reject);
6537
- });
6538
- this.pending.push(target);
6539
- target.finally(() => this.close(target));
6540
- return target;
6541
- }
6542
- /**
6543
- * 统一处理
6544
- * @param request ~
6545
- * @returns ~
6546
- */
6547
- async task(request) {
6548
- return new Promise((resolve, reject) => {
6549
- request.onsuccess = resolve;
6550
- request.onerror = reject;
6551
- });
6552
- }
6553
- /**
6554
- * @param target ~
6555
- */
6556
- async close(target) {
6557
- if (target) {
6558
- this.pending = this.pending.filter((i) => i !== target);
6559
- } else {
6560
- const done = async (pending) => {
6561
- if (pending.length) {
6562
- await Promise.allSettled(pending);
6563
- await done(this.pending);
6564
- }
6565
- };
6566
- await done(this.pending);
6567
- }
6568
- if (!this.pending.length && this.db) {
6569
- const db = this.db;
6570
- this.db = null;
6571
- (await db).close();
6572
- }
6573
- }
6574
- /**
6575
- * 打开数据库。变更时候更新表
6576
- * @returns ~
6577
- */
6578
- openDatabase() {
6579
- this.db = this.db || (async () => {
6580
- const { name, version, keyPath, storeName } = this.options;
6581
- const poll = () => new Promise((resolve, reject) => {
6582
- const request = window.indexedDB.open(name, version);
6583
- request.onsuccess = () => {
6584
- resolve(request.result);
6585
- };
6586
- request.onerror = /* istanbul ignore next */
6587
- () => {
6588
- reject(new Error("IndexedDB Open Failed. DeleteDatabase first!"));
6589
- };
6590
- request.onupgradeneeded = () => {
6591
- const db2 = request.result;
6592
- if (db2.objectStoreNames.contains(storeName)) {
6593
- db2.deleteObjectStore(storeName);
6594
- }
6595
- db2.createObjectStore(storeName, { keyPath });
6596
- };
6597
- });
6598
- const maxTries = 3;
6599
- let db;
6600
- for (let tries = 0; tries < maxTries; tries++) {
6601
- try {
6602
- db = await poll();
6603
- } catch (_) {
6604
- }
6605
- /* istanbul ignore next -- @preserve */
6606
- if (db || tries === maxTries - 1) {
6607
- break;
6608
- }
6609
- }
6610
- /* istanbul ignore next -- @preserve */
6611
- if (!db) {
6612
- await this.deleteDatabase();
6613
- db = await poll();
6614
- }
6615
- return db;
6616
- })();
6617
- return this.db;
6618
- }
6619
- /**
6620
- * 打开表
6621
- * tip: db.close() 执行后
6622
- * db打开后的表os对象仍可写入(浏览器支持,fake-indexeddb不支持)
6623
- * 不过正常理解也应该操作所有后再关闭,这里不修改`this.db -> this.os`的逻辑
6624
- * @param mode ~
6625
- * @returns ~
6626
- */
6627
- async openObjectStore(mode) {
6628
- const { storeName } = this.options;
6629
- const db = await this.openDatabase();
6630
- const os = db.transaction([storeName], mode || "readwrite").objectStore(storeName);
6631
- return os;
6632
- }
6633
- /**
6634
- * 删库
6635
- */
6636
- async deleteDatabase() {
6637
- const { name } = this.options;
6638
- const request = window.indexedDB.deleteDatabase(name);
6639
- await new Promise((resolve, reject) => {
6640
- request.onsuccess = resolve;
6641
- request.onerror = reject;
6642
- });
6643
- }
6644
- /**
6645
- * 新增数据,通过事务完成。
6646
- * @param data ~
6647
- * @returns ~
6648
- */
6649
- write(data) {
6650
- return this.concurrent(async () => {
6651
- const { keyPath } = this.options;
6652
- const os = await this.openObjectStore();
6653
- const state = {
6654
- [keyPath]: this.getUid(),
6655
- ...data
6656
- };
6657
- const request = os.add(state);
6658
- await new Promise((resolve, reject) => {
6659
- request.onsuccess = resolve;
6660
- request.onerror = reject;
6661
- });
6662
- return state;
6663
- });
6664
- }
6665
- /**
6666
- * 读取数据,通过事务完成。
6667
- * @param id ~
6668
- * @returns ~
6669
- */
6670
- read(id) {
6671
- return this.concurrent(async () => {
6672
- const os = await this.openObjectStore();
6673
- const request = os.get(id);
6674
- await this.task(request);
6675
- return request.result;
6676
- });
6677
- }
6678
- /**
6679
- * 更新数据,通过事务完成。
6680
- * @param id ~
6681
- * @param data ~
6682
- * @returns ~
6683
- */
6684
- update(id, data) {
6685
- return this.concurrent(async () => {
6686
- const { keyPath } = this.options;
6687
- const os = await this.openObjectStore();
6688
- const state = {
6689
- [keyPath]: id,
6690
- ...data
6691
- };
6692
- const request = os.put(state);
6693
- await this.task(request);
6694
- return state;
6695
- });
6696
- }
6697
- /**
6698
- * 删除数据也是通过事务完成。
6699
- * @param id ~
6700
- * @returns ~
6701
- */
6702
- async delete(id) {
6703
- return this.concurrent(async () => {
6704
- const os = await this.openObjectStore();
6705
- const request = os.delete(id);
6706
- await this.task(request);
6707
- });
6708
- }
6709
- /**
6710
- * 搜索数据,通过事务完成。
6711
- * @returns ~
6712
- */
6713
- search() {
6714
- return this.concurrent(async () => {
6715
- const os = await this.openObjectStore();
6716
- const request = os.openCursor();
6717
- const rowData = [];
6718
- await new Promise((resolve, reject) => {
6719
- request.onsuccess = () => {
6720
- const cursor = request.result;
6721
- if (cursor) {
6722
- rowData.push(cursor.value);
6723
- cursor.continue();
6724
- } else {
6725
- resolve(rowData);
6726
- }
6727
- };
6728
- request.onerror = reject;
6729
- });
6730
- return rowData;
6731
- });
6732
- }
6733
- // 同Stoage / Cookie使用api
6734
- async get(key) {
6735
- if (!ALLOW)
6736
- return null;
6737
- const v = await this.read(key);
6738
- return this.options.get(!v ? null : v.data);
6739
- }
6740
- async set(key, value) {
6741
- if (!ALLOW)
6742
- return;
6743
- await this.update(key, {
6744
- data: this.options.set(typeof value === "string" ? value : JSON.stringify(value))
6745
- });
6746
- }
6747
- async remove(key) {
6748
- if (!ALLOW)
6749
- return;
6750
- await this.delete(key);
6751
- }
6752
- }
6753
- new IndexedDBStore();
6754
-
6755
6373
  /*!
6756
6374
  * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
6757
6375
  * (c) 2024 Dmytro Semenov
@@ -8710,6 +8328,388 @@
8710
8328
 
8711
8329
  }
8712
8330
 
8331
+ class ACache {
8332
+ options;
8333
+ constructor() {
8334
+ this.options = {
8335
+ version: "",
8336
+ get: (v) => flattenJSONParse(v),
8337
+ set: (v) => v
8338
+ };
8339
+ }
8340
+ configure(options) {
8341
+ if (typeof window === "undefined")
8342
+ return;
8343
+ this.options = {
8344
+ ...this.options,
8345
+ ...options
8346
+ };
8347
+ }
8348
+ }
8349
+
8350
+ (() => {
8351
+ try {
8352
+ document.cookie = "test";
8353
+ return true;
8354
+ } catch (_) {
8355
+ return false;
8356
+ }
8357
+ })();
8358
+
8359
+ class MemoryStorage {
8360
+ store = {};
8361
+ getItem(key) {
8362
+ return this.store[key] || null;
8363
+ }
8364
+ setItem(key, val) {
8365
+ this.store[key] = val;
8366
+ }
8367
+ removeItem(key) {
8368
+ delete this.store[key];
8369
+ }
8370
+ }
8371
+
8372
+ const PREFIX_NAME = "@deot/helper/";
8373
+ const formatKey = (key, version) => {
8374
+ return `${version ? `${PREFIX_NAME}${version}:` : ""}${key}`;
8375
+ };
8376
+ const ALLOW$1 = (() => {
8377
+ const test = "test";
8378
+ try {
8379
+ window.localStorage.setItem(test, test);
8380
+ window.localStorage.removeItem(test);
8381
+ return true;
8382
+ } catch (_) {
8383
+ return false;
8384
+ }
8385
+ })();
8386
+ class StorageStore extends ACache {
8387
+ sessionStorage = new MemoryStorage();
8388
+ localStorage = new MemoryStorage();
8389
+ getInvoke(options) {
8390
+ return options?.session ? "sessionStorage" : "localStorage";
8391
+ }
8392
+ configure(options) {
8393
+ super.configure(options);
8394
+ if (!ALLOW$1)
8395
+ return;
8396
+ const { version } = this.options;
8397
+ Object.keys(window.localStorage).forEach((item) => {
8398
+ /* istanbul ignore else -- @preserve */
8399
+ if (item.includes(PREFIX_NAME) && !item.includes(`${PREFIX_NAME}${version}`)) {
8400
+ window.localStorage.removeItem(item);
8401
+ }
8402
+ });
8403
+ }
8404
+ /**
8405
+ * 设置缓存
8406
+ * @param key 保存的键值
8407
+ * @param value 保存的内容
8408
+ * @param options ~
8409
+ */
8410
+ set(key, value, options) {
8411
+ if (!ALLOW$1)
8412
+ return;
8413
+ const invoke = this.getInvoke(options);
8414
+ key = formatKey(key, this.options.version);
8415
+ value = this.options.set(typeof value === "string" ? value : JSON.stringify(value));
8416
+ try {
8417
+ window[invoke].setItem(key, value);
8418
+ } catch (error) {
8419
+ this[invoke].setItem(key, value);
8420
+ }
8421
+ }
8422
+ /**
8423
+ * 获取缓存
8424
+ * @param key 保存的键值
8425
+ * @param options ~
8426
+ * @returns ~
8427
+ */
8428
+ get(key, options) {
8429
+ if (!ALLOW$1)
8430
+ return null;
8431
+ const invoke = this.getInvoke(options);
8432
+ key = formatKey(key, this.options.version);
8433
+ const value = this[invoke].getItem(key) || window[invoke].getItem(key);
8434
+ return this.options.get(value);
8435
+ }
8436
+ /**
8437
+ * 删除缓存
8438
+ * @param key 键值
8439
+ * @param options ~
8440
+ */
8441
+ remove(key, options) {
8442
+ if (!ALLOW$1)
8443
+ return;
8444
+ const invoke = this.getInvoke(options);
8445
+ key = formatKey(key, this.options.version);
8446
+ this[invoke].removeItem(key);
8447
+ window[invoke].removeItem(key);
8448
+ }
8449
+ }
8450
+ const Storage$1 = new StorageStore();
8451
+
8452
+ const ALLOW = (() => {
8453
+ try {
8454
+ window.indexedDB.open;
8455
+ return true;
8456
+ } catch (_) {
8457
+ return false;
8458
+ }
8459
+ })();
8460
+ class IndexedDBStore extends ACache {
8461
+ timestramp = (/* @__PURE__ */ new Date()).getTime();
8462
+ count = 0;
8463
+ db = null;
8464
+ pending = [];
8465
+ constructor(options) {
8466
+ super();
8467
+ this.options = {
8468
+ ...this.options,
8469
+ keyPath: "__id",
8470
+ name: "default-db",
8471
+ storeName: "default-store",
8472
+ version: 1
8473
+ };
8474
+ options && this.configure(options);
8475
+ }
8476
+ getUid() {
8477
+ return `${this.timestramp}${this.count++}`;
8478
+ }
8479
+ configure(options) {
8480
+ super.configure(options);
8481
+ if (typeof this.options.version === "string") {
8482
+ this.options.version = parseInt(this.options.version, 10);
8483
+ }
8484
+ }
8485
+ /**
8486
+ * 每次操作完要关闭
8487
+ * 1. 浏览器上不关闭的话,删库操作会卡一会
8488
+ * 2. fake-indexeddb不关闭会卡死
8489
+ * @param fn ~
8490
+ * @returns ~
8491
+ */
8492
+ concurrent(fn) {
8493
+ const target = new Promise((resolve, reject) => {
8494
+ fn().then(resolve).catch(reject);
8495
+ });
8496
+ this.pending.push(target);
8497
+ target.finally(() => this.close(target));
8498
+ return target;
8499
+ }
8500
+ /**
8501
+ * 统一处理
8502
+ * @param request ~
8503
+ * @returns ~
8504
+ */
8505
+ async task(request) {
8506
+ return new Promise((resolve, reject) => {
8507
+ request.onsuccess = resolve;
8508
+ request.onerror = reject;
8509
+ });
8510
+ }
8511
+ /**
8512
+ * @param target ~
8513
+ */
8514
+ async close(target) {
8515
+ if (target) {
8516
+ this.pending = this.pending.filter((i) => i !== target);
8517
+ } else {
8518
+ const done = async (pending) => {
8519
+ if (pending.length) {
8520
+ await Promise.allSettled(pending);
8521
+ await done(this.pending);
8522
+ }
8523
+ };
8524
+ await done(this.pending);
8525
+ }
8526
+ if (!this.pending.length && this.db) {
8527
+ const db = this.db;
8528
+ this.db = null;
8529
+ (await db).close();
8530
+ }
8531
+ }
8532
+ /**
8533
+ * 打开数据库。变更时候更新表
8534
+ * @returns ~
8535
+ */
8536
+ openDatabase() {
8537
+ this.db = this.db || (async () => {
8538
+ const { name, version, keyPath, storeName } = this.options;
8539
+ const poll = () => new Promise((resolve, reject) => {
8540
+ const request = window.indexedDB.open(name, version);
8541
+ request.onsuccess = () => {
8542
+ resolve(request.result);
8543
+ };
8544
+ request.onerror = /* istanbul ignore next */
8545
+ () => {
8546
+ reject(new Error("IndexedDB Open Failed. DeleteDatabase first!"));
8547
+ };
8548
+ request.onupgradeneeded = () => {
8549
+ const db2 = request.result;
8550
+ if (db2.objectStoreNames.contains(storeName)) {
8551
+ db2.deleteObjectStore(storeName);
8552
+ }
8553
+ db2.createObjectStore(storeName, { keyPath });
8554
+ };
8555
+ });
8556
+ const maxTries = 3;
8557
+ let db;
8558
+ for (let tries = 0; tries < maxTries; tries++) {
8559
+ try {
8560
+ db = await poll();
8561
+ } catch (_) {
8562
+ }
8563
+ /* istanbul ignore next -- @preserve */
8564
+ if (db || tries === maxTries - 1) {
8565
+ break;
8566
+ }
8567
+ }
8568
+ /* istanbul ignore next -- @preserve */
8569
+ if (!db) {
8570
+ await this.deleteDatabase();
8571
+ db = await poll();
8572
+ }
8573
+ return db;
8574
+ })();
8575
+ return this.db;
8576
+ }
8577
+ /**
8578
+ * 打开表
8579
+ * tip: db.close() 执行后
8580
+ * db打开后的表os对象仍可写入(浏览器支持,fake-indexeddb不支持)
8581
+ * 不过正常理解也应该操作所有后再关闭,这里不修改`this.db -> this.os`的逻辑
8582
+ * @param mode ~
8583
+ * @returns ~
8584
+ */
8585
+ async openObjectStore(mode) {
8586
+ const { storeName } = this.options;
8587
+ const db = await this.openDatabase();
8588
+ const os = db.transaction([storeName], mode || "readwrite").objectStore(storeName);
8589
+ return os;
8590
+ }
8591
+ /**
8592
+ * 删库
8593
+ */
8594
+ async deleteDatabase() {
8595
+ const { name } = this.options;
8596
+ const request = window.indexedDB.deleteDatabase(name);
8597
+ await new Promise((resolve, reject) => {
8598
+ request.onsuccess = resolve;
8599
+ request.onerror = reject;
8600
+ });
8601
+ }
8602
+ /**
8603
+ * 新增数据,通过事务完成。
8604
+ * @param data ~
8605
+ * @returns ~
8606
+ */
8607
+ write(data) {
8608
+ return this.concurrent(async () => {
8609
+ const { keyPath } = this.options;
8610
+ const os = await this.openObjectStore();
8611
+ const state = {
8612
+ [keyPath]: this.getUid(),
8613
+ ...data
8614
+ };
8615
+ const request = os.add(state);
8616
+ await new Promise((resolve, reject) => {
8617
+ request.onsuccess = resolve;
8618
+ request.onerror = reject;
8619
+ });
8620
+ return state;
8621
+ });
8622
+ }
8623
+ /**
8624
+ * 读取数据,通过事务完成。
8625
+ * @param id ~
8626
+ * @returns ~
8627
+ */
8628
+ read(id) {
8629
+ return this.concurrent(async () => {
8630
+ const os = await this.openObjectStore();
8631
+ const request = os.get(id);
8632
+ await this.task(request);
8633
+ return request.result;
8634
+ });
8635
+ }
8636
+ /**
8637
+ * 更新数据,通过事务完成。
8638
+ * @param id ~
8639
+ * @param data ~
8640
+ * @returns ~
8641
+ */
8642
+ update(id, data) {
8643
+ return this.concurrent(async () => {
8644
+ const { keyPath } = this.options;
8645
+ const os = await this.openObjectStore();
8646
+ const state = {
8647
+ [keyPath]: id,
8648
+ ...data
8649
+ };
8650
+ const request = os.put(state);
8651
+ await this.task(request);
8652
+ return state;
8653
+ });
8654
+ }
8655
+ /**
8656
+ * 删除数据也是通过事务完成。
8657
+ * @param id ~
8658
+ * @returns ~
8659
+ */
8660
+ async delete(id) {
8661
+ return this.concurrent(async () => {
8662
+ const os = await this.openObjectStore();
8663
+ const request = os.delete(id);
8664
+ await this.task(request);
8665
+ });
8666
+ }
8667
+ /**
8668
+ * 搜索数据,通过事务完成。
8669
+ * @returns ~
8670
+ */
8671
+ search() {
8672
+ return this.concurrent(async () => {
8673
+ const os = await this.openObjectStore();
8674
+ const request = os.openCursor();
8675
+ const rowData = [];
8676
+ await new Promise((resolve, reject) => {
8677
+ request.onsuccess = () => {
8678
+ const cursor = request.result;
8679
+ if (cursor) {
8680
+ rowData.push(cursor.value);
8681
+ cursor.continue();
8682
+ } else {
8683
+ resolve(rowData);
8684
+ }
8685
+ };
8686
+ request.onerror = reject;
8687
+ });
8688
+ return rowData;
8689
+ });
8690
+ }
8691
+ // 同Stoage / Cookie使用api
8692
+ async get(key) {
8693
+ if (!ALLOW)
8694
+ return null;
8695
+ const v = await this.read(key);
8696
+ return this.options.get(!v ? null : v.data);
8697
+ }
8698
+ async set(key, value) {
8699
+ if (!ALLOW)
8700
+ return;
8701
+ await this.update(key, {
8702
+ data: this.options.set(typeof value === "string" ? value : JSON.stringify(value))
8703
+ });
8704
+ }
8705
+ async remove(key) {
8706
+ if (!ALLOW)
8707
+ return;
8708
+ await this.delete(key);
8709
+ }
8710
+ }
8711
+ new IndexedDBStore();
8712
+
8713
8713
  const IS_SERVER$1 = typeof window === "undefined";
8714
8714
 
8715
8715
  const style = (value, options) => {
@@ -26130,9 +26130,9 @@
26130
26130
  default: "div"
26131
26131
  }
26132
26132
  };
26133
- const COMPONENT_NAME$1$ = "vc-action-sheet";
26133
+ const COMPONENT_NAME$20 = "vc-action-sheet";
26134
26134
  const ActionSheet = /* @__PURE__ */ vue.defineComponent({
26135
- name: COMPONENT_NAME$1$,
26135
+ name: COMPONENT_NAME$20,
26136
26136
  props: props$1q,
26137
26137
  setup(props2, {
26138
26138
  slots
@@ -26312,9 +26312,9 @@
26312
26312
  }
26313
26313
  }
26314
26314
  const IconManager = new Manager();
26315
- const COMPONENT_NAME$1_ = "vc-icon";
26315
+ const COMPONENT_NAME$1$ = "vc-icon";
26316
26316
  const Icon = /* @__PURE__ */ vue.defineComponent({
26317
- name: COMPONENT_NAME$1_,
26317
+ name: COMPONENT_NAME$1$,
26318
26318
  props: props$1o,
26319
26319
  setup(props2) {
26320
26320
  const viewBox = vue.ref("0 0 1024 1024");
@@ -26510,9 +26510,9 @@
26510
26510
  }
26511
26511
  };
26512
26512
  };
26513
- const COMPONENT_NAME$1Z = "vc-transition";
26513
+ const COMPONENT_NAME$1_ = "vc-transition";
26514
26514
  const Transition = vue.defineComponent({
26515
- name: COMPONENT_NAME$1Z,
26515
+ name: COMPONENT_NAME$1_,
26516
26516
  props: props$1n,
26517
26517
  // 当不声明emits的情况下,事件存在于attrs中
26518
26518
  inheritAttrs: false,
@@ -26532,9 +26532,9 @@
26532
26532
  };
26533
26533
  }
26534
26534
  });
26535
- const COMPONENT_NAME$1Y = "vc-transition-collapse";
26535
+ const COMPONENT_NAME$1Z = "vc-transition-collapse";
26536
26536
  const TransitionCollapse = vue.defineComponent({
26537
- name: COMPONENT_NAME$1Y,
26537
+ name: COMPONENT_NAME$1Z,
26538
26538
  props: props$1n,
26539
26539
  // 当不声明emits的情况下,事件存在于attrs中
26540
26540
  inheritAttrs: false,
@@ -26652,9 +26652,9 @@
26652
26652
  };
26653
26653
  }
26654
26654
  });
26655
- const COMPONENT_NAME$1X = "vc-transition-fade";
26655
+ const COMPONENT_NAME$1Y = "vc-transition-fade";
26656
26656
  const TransitionFade = vue.defineComponent({
26657
- name: COMPONENT_NAME$1X,
26657
+ name: COMPONENT_NAME$1Y,
26658
26658
  props: {
26659
26659
  ...props$1n,
26660
26660
  // inheritAttrs必须是false
@@ -26688,9 +26688,9 @@
26688
26688
  };
26689
26689
  }
26690
26690
  });
26691
- const COMPONENT_NAME$1W = "vc-transition-scale";
26691
+ const COMPONENT_NAME$1X = "vc-transition-scale";
26692
26692
  const TransitionScale = vue.defineComponent({
26693
- name: COMPONENT_NAME$1W,
26693
+ name: COMPONENT_NAME$1X,
26694
26694
  props: {
26695
26695
  ...props$1n,
26696
26696
  mode: {
@@ -26729,9 +26729,9 @@
26729
26729
  };
26730
26730
  }
26731
26731
  });
26732
- const COMPONENT_NAME$1V = "vc-transition-slide";
26732
+ const COMPONENT_NAME$1W = "vc-transition-slide";
26733
26733
  const TransitionSlide = vue.defineComponent({
26734
- name: COMPONENT_NAME$1V,
26734
+ name: COMPONENT_NAME$1W,
26735
26735
  props: {
26736
26736
  ...props$1n,
26737
26737
  mode: {
@@ -26770,9 +26770,9 @@
26770
26770
  };
26771
26771
  }
26772
26772
  });
26773
- const COMPONENT_NAME$1U = "vc-transition-zoom";
26773
+ const COMPONENT_NAME$1V = "vc-transition-zoom";
26774
26774
  const TransitionZoom = vue.defineComponent({
26775
- name: COMPONENT_NAME$1U,
26775
+ name: COMPONENT_NAME$1V,
26776
26776
  props: {
26777
26777
  ...props$1n,
26778
26778
  mode: {
@@ -26811,7 +26811,7 @@
26811
26811
  };
26812
26812
  }
26813
26813
  });
26814
- const COMPONENT_NAME$1T = "vc-alert";
26814
+ const COMPONENT_NAME$1U = "vc-alert";
26815
26815
  const THEME_MAP = {
26816
26816
  info: ["#2B72FD", "#91d5ff", "#e6f7ff"],
26817
26817
  success: ["#52c41a", "#b7eb8f", "#f6ffed"],
@@ -26819,7 +26819,7 @@
26819
26819
  warning: ["#ffbf00", "#ffe58f", "#fffbe6"]
26820
26820
  };
26821
26821
  const Alert = /* @__PURE__ */ vue.defineComponent({
26822
- name: COMPONENT_NAME$1T,
26822
+ name: COMPONENT_NAME$1U,
26823
26823
  props: props$1p,
26824
26824
  setup(props2, {
26825
26825
  slots,
@@ -26912,9 +26912,9 @@
26912
26912
  default: "div"
26913
26913
  }
26914
26914
  };
26915
- const COMPONENT_NAME$1S = "vc-artboard";
26915
+ const COMPONENT_NAME$1T = "vc-artboard";
26916
26916
  const Artboard = /* @__PURE__ */ vue.defineComponent({
26917
- name: COMPONENT_NAME$1S,
26917
+ name: COMPONENT_NAME$1T,
26918
26918
  props: props$1m,
26919
26919
  setup(props2, {
26920
26920
  slots
@@ -26948,9 +26948,9 @@
26948
26948
  default: false
26949
26949
  }
26950
26950
  };
26951
- const COMPONENT_NAME$1R = "vc-spin";
26951
+ const COMPONENT_NAME$1S = "vc-spin";
26952
26952
  const Spin = /* @__PURE__ */ vue.defineComponent({
26953
- name: COMPONENT_NAME$1R,
26953
+ name: COMPONENT_NAME$1S,
26954
26954
  props: props$1l,
26955
26955
  setup(props2, {
26956
26956
  slots
@@ -26999,9 +26999,9 @@
26999
26999
  },
27000
27000
  exclude: RegExp
27001
27001
  };
27002
- const COMPONENT_NAME$1Q = "vc-debounce";
27002
+ const COMPONENT_NAME$1R = "vc-debounce";
27003
27003
  const Debounce = vue.defineComponent({
27004
- name: COMPONENT_NAME$1Q,
27004
+ name: COMPONENT_NAME$1R,
27005
27005
  props: props$1k,
27006
27006
  /**
27007
27007
  * 不声明emits使得事件被透传放入attrs中, 这样可以让所有的事件透传
@@ -27069,9 +27069,9 @@
27069
27069
  default: "button"
27070
27070
  }
27071
27071
  };
27072
- const COMPONENT_NAME$1P = "vc-button";
27072
+ const COMPONENT_NAME$1Q = "vc-button";
27073
27073
  const Button = /* @__PURE__ */ vue.defineComponent({
27074
- name: COMPONENT_NAME$1P,
27074
+ name: COMPONENT_NAME$1Q,
27075
27075
  emits: ["click"],
27076
27076
  props: props$1j,
27077
27077
  setup(props2, {
@@ -27149,9 +27149,9 @@
27149
27149
  default: false
27150
27150
  }
27151
27151
  };
27152
- const COMPONENT_NAME$1O = "vc-button-group";
27152
+ const COMPONENT_NAME$1P = "vc-button-group";
27153
27153
  const ButtonGroup = /* @__PURE__ */ vue.defineComponent({
27154
- name: COMPONENT_NAME$1O,
27154
+ name: COMPONENT_NAME$1P,
27155
27155
  props: props$1i,
27156
27156
  setup(props2, {
27157
27157
  slots
@@ -27180,9 +27180,9 @@
27180
27180
  default: "div"
27181
27181
  }
27182
27182
  };
27183
- const COMPONENT_NAME$1N = "vc-calendar";
27183
+ const COMPONENT_NAME$1O = "vc-calendar";
27184
27184
  const Calendar$1 = /* @__PURE__ */ vue.defineComponent({
27185
- name: COMPONENT_NAME$1N,
27185
+ name: COMPONENT_NAME$1O,
27186
27186
  props: props$1h,
27187
27187
  setup(props2, {
27188
27188
  slots
@@ -27215,9 +27215,9 @@
27215
27215
  type: String
27216
27216
  }
27217
27217
  };
27218
- const COMPONENT_NAME$1M = "vc-card";
27218
+ const COMPONENT_NAME$1N = "vc-card";
27219
27219
  const Card = /* @__PURE__ */ vue.defineComponent({
27220
- name: COMPONENT_NAME$1M,
27220
+ name: COMPONENT_NAME$1N,
27221
27221
  props: props$1g,
27222
27222
  setup(props2, {
27223
27223
  slots
@@ -27248,9 +27248,9 @@
27248
27248
  default: "div"
27249
27249
  }
27250
27250
  };
27251
- const COMPONENT_NAME$1L = "vc-carousel";
27251
+ const COMPONENT_NAME$1M = "vc-carousel";
27252
27252
  const Carousel = /* @__PURE__ */ vue.defineComponent({
27253
- name: COMPONENT_NAME$1L,
27253
+ name: COMPONENT_NAME$1M,
27254
27254
  props: props$1f,
27255
27255
  setup(props2, {
27256
27256
  slots
@@ -27269,9 +27269,9 @@
27269
27269
  default: "div"
27270
27270
  }
27271
27271
  };
27272
- const COMPONENT_NAME$1K = "vc-cascader";
27272
+ const COMPONENT_NAME$1L = "vc-cascader";
27273
27273
  const Cascader = /* @__PURE__ */ vue.defineComponent({
27274
- name: COMPONENT_NAME$1K,
27274
+ name: COMPONENT_NAME$1L,
27275
27275
  props: props$1e,
27276
27276
  setup(props2, {
27277
27277
  slots
@@ -27334,9 +27334,9 @@
27334
27334
  watchShallow: Boolean,
27335
27335
  manualUpdate: Boolean
27336
27336
  };
27337
- const COMPONENT_NAME$1J = "vc-chart";
27337
+ const COMPONENT_NAME$1K = "vc-chart";
27338
27338
  const Chart = /* @__PURE__ */ vue.defineComponent({
27339
- name: COMPONENT_NAME$1J,
27339
+ name: COMPONENT_NAME$1K,
27340
27340
  props: props$1d,
27341
27341
  emits: [...EVENTS, "ready"],
27342
27342
  setup(props2, {
@@ -27558,9 +27558,9 @@
27558
27558
  computedLabel
27559
27559
  };
27560
27560
  };
27561
- const COMPONENT_NAME$1I = "vc-checkbox";
27561
+ const COMPONENT_NAME$1J = "vc-checkbox";
27562
27562
  const Checkbox = /* @__PURE__ */ vue.defineComponent({
27563
- name: COMPONENT_NAME$1I,
27563
+ name: COMPONENT_NAME$1J,
27564
27564
  props: props$1c,
27565
27565
  emits: ["update:modelValue", "change"],
27566
27566
  setup(props2, {
@@ -27642,9 +27642,9 @@
27642
27642
  reset
27643
27643
  };
27644
27644
  };
27645
- const COMPONENT_NAME$1H = "vc-checkbox-group";
27645
+ const COMPONENT_NAME$1I = "vc-checkbox-group";
27646
27646
  const CheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27647
- name: COMPONENT_NAME$1H,
27647
+ name: COMPONENT_NAME$1I,
27648
27648
  props: props$1b,
27649
27649
  emits: ["update:modelValue", "change"],
27650
27650
  setup(props2, {
@@ -27659,9 +27659,9 @@
27659
27659
  };
27660
27660
  }
27661
27661
  });
27662
- const COMPONENT_NAME$1G = "vcm-checkbox";
27662
+ const COMPONENT_NAME$1H = "vcm-checkbox";
27663
27663
  const MCheckbox = /* @__PURE__ */ vue.defineComponent({
27664
- name: COMPONENT_NAME$1G,
27664
+ name: COMPONENT_NAME$1H,
27665
27665
  props: props$1c,
27666
27666
  emits: ["update:modelValue", "change"],
27667
27667
  setup(props2, {
@@ -27698,9 +27698,9 @@
27698
27698
  };
27699
27699
  }
27700
27700
  });
27701
- const COMPONENT_NAME$1F = "vcm-checkbox-group";
27701
+ const COMPONENT_NAME$1G = "vcm-checkbox-group";
27702
27702
  const MCheckboxGroup = /* @__PURE__ */ vue.defineComponent({
27703
- name: COMPONENT_NAME$1F,
27703
+ name: COMPONENT_NAME$1G,
27704
27704
  props: props$1b,
27705
27705
  emits: ["update:modelValue", "change"],
27706
27706
  setup(props2, {
@@ -27756,9 +27756,9 @@
27756
27756
  default: () => null
27757
27757
  }
27758
27758
  };
27759
- const COMPONENT_NAME$1E = "vc-customer";
27759
+ const COMPONENT_NAME$1F = "vc-customer";
27760
27760
  const Customer = vue.defineComponent({
27761
- name: COMPONENT_NAME$1E,
27761
+ name: COMPONENT_NAME$1F,
27762
27762
  props: props$19,
27763
27763
  setup(props2, context) {
27764
27764
  return () => vue.h(() => {
@@ -27766,9 +27766,9 @@
27766
27766
  });
27767
27767
  }
27768
27768
  });
27769
- const COMPONENT_NAME$1D = "vc-message";
27769
+ const COMPONENT_NAME$1E = "vc-message";
27770
27770
  const MessageView = /* @__PURE__ */ vue.defineComponent({
27771
- name: COMPONENT_NAME$1D,
27771
+ name: COMPONENT_NAME$1E,
27772
27772
  emits: ["before-close", "close", "portal-fulfilled"],
27773
27773
  props: props$1a,
27774
27774
  setup(props2, {
@@ -27911,7 +27911,7 @@
27911
27911
  return this.target.finally(callback);
27912
27912
  }
27913
27913
  }
27914
- const COMPONENT_NAME$1C = "vc-portal";
27914
+ const COMPONENT_NAME$1D = "vc-portal";
27915
27915
  class Portal {
27916
27916
  /**
27917
27917
  * 清理Portals类型组件
@@ -27963,7 +27963,7 @@
27963
27963
  this.wrapper = wrapper;
27964
27964
  this.globalOptions = {
27965
27965
  ...options,
27966
- name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1C)
27966
+ name: options?.name || wrapper.name || getUid(COMPONENT_NAME$1D)
27967
27967
  };
27968
27968
  }
27969
27969
  popup(propsData, options) {
@@ -28062,7 +28062,7 @@
28062
28062
  ...rest
28063
28063
  } = options;
28064
28064
  let useAllNodes = fragment;
28065
- const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1C)}` : name$;
28065
+ const name = multiple ? `${name$}__${getUid(COMPONENT_NAME$1D)}` : name$;
28066
28066
  const container = document.createElement(tag);
28067
28067
  const root = typeof el2 === "object" ? el2 : document.querySelector(el2 || "body");
28068
28068
  !alive && Portal.leafs.get(name)?.destroy();
@@ -28096,7 +28096,7 @@
28096
28096
  } else {
28097
28097
  const wrapper = this.wrapper;
28098
28098
  const app = vue.createApp({
28099
- name: COMPONENT_NAME$1C,
28099
+ name: COMPONENT_NAME$1D,
28100
28100
  parent,
28101
28101
  setup() {
28102
28102
  if (alive) {
@@ -28206,9 +28206,9 @@
28206
28206
  default: "div"
28207
28207
  }
28208
28208
  };
28209
- const COMPONENT_NAME$1B = "vc-portal-view";
28209
+ const COMPONENT_NAME$1C = "vc-portal-view";
28210
28210
  const PortalView = /* @__PURE__ */ vue.defineComponent({
28211
- name: COMPONENT_NAME$1B,
28211
+ name: COMPONENT_NAME$1C,
28212
28212
  props: props$18,
28213
28213
  setup(props2, {
28214
28214
  slots
@@ -28371,9 +28371,9 @@
28371
28371
  };
28372
28372
  return () => vue.h(props2.tag, { onClick: handleClick, class: "vc-clipboard" }, slots?.default?.());
28373
28373
  };
28374
- const COMPONENT_NAME$1A = "vc-clipboard";
28374
+ const COMPONENT_NAME$1B = "vc-clipboard";
28375
28375
  const Clipboard$1 = vue.defineComponent({
28376
- name: COMPONENT_NAME$1A,
28376
+ name: COMPONENT_NAME$1B,
28377
28377
  props: props$17,
28378
28378
  setup() {
28379
28379
  return useClipboard((content) => Message.success({ content }));
@@ -28405,9 +28405,9 @@
28405
28405
  const MTransitionScale = TransitionScale;
28406
28406
  const MTransitionSlide = TransitionSlide;
28407
28407
  const MTransitionZoom = TransitionZoom;
28408
- const COMPONENT_NAME$1z = "vcm-toast";
28408
+ const COMPONENT_NAME$1A = "vcm-toast";
28409
28409
  const MToastView = /* @__PURE__ */ vue.defineComponent({
28410
- name: COMPONENT_NAME$1z,
28410
+ name: COMPONENT_NAME$1A,
28411
28411
  emits: ["close", "portal-fulfilled"],
28412
28412
  props: props$16,
28413
28413
  setup(props2, {
@@ -28506,9 +28506,9 @@
28506
28506
  const warning$2 = create$3({ mode: "warning" });
28507
28507
  const error$2 = create$3({ mode: "error" });
28508
28508
  const MToast = Object.assign(MToastView, { destroy: destroy$4, info: info$2, success: success$2, loading, warning: warning$2, error: error$2 });
28509
- const COMPONENT_NAME$1y = "vcm-clipboard";
28509
+ const COMPONENT_NAME$1z = "vcm-clipboard";
28510
28510
  const MClipboard$1 = vue.defineComponent({
28511
- name: COMPONENT_NAME$1y,
28511
+ name: COMPONENT_NAME$1z,
28512
28512
  props: props$17,
28513
28513
  setup() {
28514
28514
  return useClipboard((content) => MToast.info({ content }));
@@ -28537,9 +28537,9 @@
28537
28537
  default: false
28538
28538
  }
28539
28539
  };
28540
- const COMPONENT_NAME$1x = "vc-collapse";
28540
+ const COMPONENT_NAME$1y = "vc-collapse";
28541
28541
  const Collapse = vue.defineComponent({
28542
- name: COMPONENT_NAME$1x,
28542
+ name: COMPONENT_NAME$1y,
28543
28543
  props: props$15,
28544
28544
  emits: ["update:moodelValue", "change"],
28545
28545
  setup(props2, { slots, emit }) {
@@ -28651,9 +28651,9 @@
28651
28651
  function _isSlot$3(s) {
28652
28652
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
28653
28653
  }
28654
- const COMPONENT_NAME$1w = "vc-expand";
28654
+ const COMPONENT_NAME$1x = "vc-expand";
28655
28655
  const Expand$1 = /* @__PURE__ */ vue.defineComponent({
28656
- name: COMPONENT_NAME$1w,
28656
+ name: COMPONENT_NAME$1x,
28657
28657
  props: props$13,
28658
28658
  setup(props2, {
28659
28659
  slots
@@ -28680,9 +28680,9 @@
28680
28680
  };
28681
28681
  }
28682
28682
  });
28683
- const COMPONENT_NAME$1v = "vc-collapse-item";
28683
+ const COMPONENT_NAME$1w = "vc-collapse-item";
28684
28684
  const CollapseItem = /* @__PURE__ */ vue.defineComponent({
28685
- name: COMPONENT_NAME$1v,
28685
+ name: COMPONENT_NAME$1w,
28686
28686
  props: props$14,
28687
28687
  setup(props2, {
28688
28688
  slots,
@@ -28752,9 +28752,9 @@
28752
28752
  default: "div"
28753
28753
  }
28754
28754
  };
28755
- const COMPONENT_NAME$1u = "vc-color-picker";
28755
+ const COMPONENT_NAME$1v = "vc-color-picker";
28756
28756
  const ColorPicker = /* @__PURE__ */ vue.defineComponent({
28757
- name: COMPONENT_NAME$1u,
28757
+ name: COMPONENT_NAME$1v,
28758
28758
  props: props$12,
28759
28759
  setup(props2, {
28760
28760
  slots
@@ -28773,9 +28773,9 @@
28773
28773
  default: "div"
28774
28774
  }
28775
28775
  };
28776
- const COMPONENT_NAME$1t = "vc-countdown";
28776
+ const COMPONENT_NAME$1u = "vc-countdown";
28777
28777
  const Countdown = /* @__PURE__ */ vue.defineComponent({
28778
- name: COMPONENT_NAME$1t,
28778
+ name: COMPONENT_NAME$1u,
28779
28779
  props: props$11,
28780
28780
  setup(props2, {
28781
28781
  slots
@@ -29213,9 +29213,9 @@
29213
29213
  expose?.(exposed);
29214
29214
  return exposed;
29215
29215
  };
29216
- const COMPONENT_NAME$1s = "vc-input";
29216
+ const COMPONENT_NAME$1t = "vc-input";
29217
29217
  const Input = /* @__PURE__ */ vue.defineComponent({
29218
- name: COMPONENT_NAME$1s,
29218
+ name: COMPONENT_NAME$1t,
29219
29219
  inheritAttrs: false,
29220
29220
  props: {
29221
29221
  ...props$$,
@@ -29545,9 +29545,9 @@
29545
29545
  handleStepper
29546
29546
  };
29547
29547
  };
29548
- const COMPONENT_NAME$1r = "vc-input-number";
29548
+ const COMPONENT_NAME$1s = "vc-input-number";
29549
29549
  const InputNumber = /* @__PURE__ */ vue.defineComponent({
29550
- name: COMPONENT_NAME$1r,
29550
+ name: COMPONENT_NAME$1s,
29551
29551
  props: props$X,
29552
29552
  inheritAttrs: false,
29553
29553
  setup(props2, {
@@ -29607,9 +29607,9 @@
29607
29607
  default: true
29608
29608
  }
29609
29609
  };
29610
- const COMPONENT_NAME$1q = "vc-input-search";
29610
+ const COMPONENT_NAME$1r = "vc-input-search";
29611
29611
  const InputSearch = /* @__PURE__ */ vue.defineComponent({
29612
- name: COMPONENT_NAME$1q,
29612
+ name: COMPONENT_NAME$1r,
29613
29613
  props: props$W,
29614
29614
  inheritAttrs: false,
29615
29615
  setup(props2, {
@@ -29896,9 +29896,9 @@
29896
29896
  function _isSlot$2(s) {
29897
29897
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
29898
29898
  }
29899
- const COMPONENT_NAME$1p = "vc-popover-wrapper";
29899
+ const COMPONENT_NAME$1q = "vc-popover-wrapper";
29900
29900
  const PopoverWrapper = /* @__PURE__ */ vue.defineComponent({
29901
- name: COMPONENT_NAME$1p,
29901
+ name: COMPONENT_NAME$1q,
29902
29902
  props: props$_,
29903
29903
  emits: ["portal-fulfilled", "close"],
29904
29904
  setup(props2, {
@@ -30116,9 +30116,9 @@
30116
30116
  }
30117
30117
  });
30118
30118
  const PopoverPortal = new Portal(PopoverWrapper);
30119
- const COMPONENT_NAME$1o = "vc-popover";
30119
+ const COMPONENT_NAME$1p = "vc-popover";
30120
30120
  const Popover$1 = /* @__PURE__ */ vue.defineComponent({
30121
- name: COMPONENT_NAME$1o,
30121
+ name: COMPONENT_NAME$1p,
30122
30122
  props: props$Z,
30123
30123
  emits: ["update:modelValue", "visible-change", "ready", "close"],
30124
30124
  setup(props2, {
@@ -31194,9 +31194,9 @@
31194
31194
  }
31195
31195
  return view;
31196
31196
  };
31197
- const COMPONENT_NAME$1n = "vc-date-confirm";
31197
+ const COMPONENT_NAME$1o = "vc-date-confirm";
31198
31198
  const Confirm = /* @__PURE__ */ vue.defineComponent({
31199
- name: COMPONENT_NAME$1n,
31199
+ name: COMPONENT_NAME$1o,
31200
31200
  props: {
31201
31201
  showTime: {
31202
31202
  type: Boolean,
@@ -31257,9 +31257,9 @@
31257
31257
  };
31258
31258
  }
31259
31259
  });
31260
- const COMPONENT_NAME$1m = "vc-date-header";
31260
+ const COMPONENT_NAME$1n = "vc-date-header";
31261
31261
  const DateHeader = /* @__PURE__ */ vue.defineComponent({
31262
- name: COMPONENT_NAME$1m,
31262
+ name: COMPONENT_NAME$1n,
31263
31263
  props: {
31264
31264
  panelDate: Date,
31265
31265
  showNext: {
@@ -31340,9 +31340,9 @@
31340
31340
  };
31341
31341
  }
31342
31342
  });
31343
- const COMPONENT_NAME$1l = "vc-date-table";
31343
+ const COMPONENT_NAME$1m = "vc-date-table";
31344
31344
  const DateTable = /* @__PURE__ */ vue.defineComponent({
31345
- name: COMPONENT_NAME$1l,
31345
+ name: COMPONENT_NAME$1m,
31346
31346
  props: {
31347
31347
  value: Array,
31348
31348
  firstDayOfWeek: {
@@ -31542,9 +31542,9 @@
31542
31542
  };
31543
31543
  }
31544
31544
  });
31545
- const COMPONENT_NAME$1k = "vc-month-table";
31545
+ const COMPONENT_NAME$1l = "vc-month-table";
31546
31546
  const MonthTable = /* @__PURE__ */ vue.defineComponent({
31547
- name: COMPONENT_NAME$1k,
31547
+ name: COMPONENT_NAME$1l,
31548
31548
  props: {
31549
31549
  value: Array,
31550
31550
  panelDate: Date,
@@ -31670,7 +31670,7 @@
31670
31670
  };
31671
31671
  }
31672
31672
  });
31673
- const COMPONENT_NAME$1j = "vc-quarter-table";
31673
+ const COMPONENT_NAME$1k = "vc-quarter-table";
31674
31674
  const getMonthRange = (panelDate, quarter) => {
31675
31675
  const year = panelDate.getFullYear();
31676
31676
  const [startMonth, endMonth] = [quarter * 3, quarter * 3 + 2];
@@ -31697,7 +31697,7 @@
31697
31697
  }
31698
31698
  };
31699
31699
  const QuarterTable = /* @__PURE__ */ vue.defineComponent({
31700
- name: COMPONENT_NAME$1j,
31700
+ name: COMPONENT_NAME$1k,
31701
31701
  props: {
31702
31702
  value: Array,
31703
31703
  panelDate: Date,
@@ -31815,9 +31815,9 @@
31815
31815
  };
31816
31816
  }
31817
31817
  });
31818
- const COMPONENT_NAME$1i = "vc-shortcuts-select";
31818
+ const COMPONENT_NAME$1j = "vc-shortcuts-select";
31819
31819
  const ShortcutsSelect = /* @__PURE__ */ vue.defineComponent({
31820
- name: COMPONENT_NAME$1i,
31820
+ name: COMPONENT_NAME$1j,
31821
31821
  props: {
31822
31822
  panelDate: Date,
31823
31823
  config: Array,
@@ -31854,9 +31854,9 @@
31854
31854
  };
31855
31855
  }
31856
31856
  });
31857
- const COMPONENT_NAME$1h = "vc-time-select";
31857
+ const COMPONENT_NAME$1i = "vc-time-select";
31858
31858
  const TimeSelect = /* @__PURE__ */ vue.defineComponent({
31859
- name: COMPONENT_NAME$1h,
31859
+ name: COMPONENT_NAME$1i,
31860
31860
  props: {
31861
31861
  hours: {
31862
31862
  type: [Number, String],
@@ -32131,9 +32131,9 @@
32131
32131
  };
32132
32132
  }
32133
32133
  });
32134
- const COMPONENT_NAME$1g = "vc-year-table";
32134
+ const COMPONENT_NAME$1h = "vc-year-table";
32135
32135
  const YearTable = /* @__PURE__ */ vue.defineComponent({
32136
- name: COMPONENT_NAME$1g,
32136
+ name: COMPONENT_NAME$1h,
32137
32137
  props: {
32138
32138
  value: Array,
32139
32139
  panelDate: Date,
@@ -32249,9 +32249,9 @@
32249
32249
  }
32250
32250
  return true;
32251
32251
  };
32252
- const COMPONENT_NAME$1f = "vc-date-range-panel";
32252
+ const COMPONENT_NAME$1g = "vc-date-range-panel";
32253
32253
  const DateRangePanel = /* @__PURE__ */ vue.defineComponent({
32254
- name: COMPONENT_NAME$1f,
32254
+ name: COMPONENT_NAME$1g,
32255
32255
  props: {
32256
32256
  ...props$V,
32257
32257
  confirm: {
@@ -32612,9 +32612,9 @@
32612
32612
  };
32613
32613
  }
32614
32614
  });
32615
- const COMPONENT_NAME$1e = "vc-date-panel";
32615
+ const COMPONENT_NAME$1f = "vc-date-panel";
32616
32616
  const DatePanel = /* @__PURE__ */ vue.defineComponent({
32617
- name: COMPONENT_NAME$1e,
32617
+ name: COMPONENT_NAME$1f,
32618
32618
  props: {
32619
32619
  ...props$V,
32620
32620
  type: String,
@@ -32813,9 +32813,9 @@
32813
32813
  const endYear = value[1].getFullYear();
32814
32814
  return startYear === endYear;
32815
32815
  };
32816
- const COMPONENT_NAME$1d = "vc-monthrange-panel";
32816
+ const COMPONENT_NAME$1e = "vc-monthrange-panel";
32817
32817
  const MonthRangePanel = /* @__PURE__ */ vue.defineComponent({
32818
- name: COMPONENT_NAME$1d,
32818
+ name: COMPONENT_NAME$1e,
32819
32819
  props: {
32820
32820
  ...props$V,
32821
32821
  confirm: {
@@ -32985,9 +32985,9 @@
32985
32985
  const endYear = value[1].getFullYear();
32986
32986
  return startYear === endYear;
32987
32987
  };
32988
- const COMPONENT_NAME$1c = "vc-quarterrange-panel";
32988
+ const COMPONENT_NAME$1d = "vc-quarterrange-panel";
32989
32989
  const QuarterRangePanel = /* @__PURE__ */ vue.defineComponent({
32990
- name: COMPONENT_NAME$1c,
32990
+ name: COMPONENT_NAME$1d,
32991
32991
  props: {
32992
32992
  ...props$V,
32993
32993
  confirm: {
@@ -33218,9 +33218,9 @@
33218
33218
  seconds
33219
33219
  };
33220
33220
  };
33221
- const COMPONENT_NAME$1b = "vc-timerange-panel";
33221
+ const COMPONENT_NAME$1c = "vc-timerange-panel";
33222
33222
  const TimeRangePanel = /* @__PURE__ */ vue.defineComponent({
33223
- name: COMPONENT_NAME$1b,
33223
+ name: COMPONENT_NAME$1c,
33224
33224
  props: props$U,
33225
33225
  emits: ["pick", "clear", "ok"],
33226
33226
  setup(props2, {
@@ -33316,9 +33316,9 @@
33316
33316
  };
33317
33317
  }
33318
33318
  });
33319
- const COMPONENT_NAME$1a = "vc-time-panel";
33319
+ const COMPONENT_NAME$1b = "vc-time-panel";
33320
33320
  const TimePanel = /* @__PURE__ */ vue.defineComponent({
33321
- name: COMPONENT_NAME$1a,
33321
+ name: COMPONENT_NAME$1b,
33322
33322
  props: props$U,
33323
33323
  emits: ["pick", "clear", "ok"],
33324
33324
  setup(props2, {
@@ -33369,7 +33369,7 @@
33369
33369
  };
33370
33370
  }
33371
33371
  });
33372
- const COMPONENT_NAME$19 = "vc-date-picker";
33372
+ const COMPONENT_NAME$1a = "vc-date-picker";
33373
33373
  const getPanel$1 = (type) => {
33374
33374
  if (["daterange", "datetimerange"].includes(type)) {
33375
33375
  return DateRangePanel;
@@ -33380,7 +33380,7 @@
33380
33380
  }
33381
33381
  return DatePanel;
33382
33382
  };
33383
- const DatePicker = createPicker(COMPONENT_NAME$19, props$10, () => {
33383
+ const DatePicker = createPicker(COMPONENT_NAME$1a, props$10, () => {
33384
33384
  const props2 = vue.getCurrentInstance().props;
33385
33385
  const icon = vue.ref("date");
33386
33386
  const panel = vue.shallowRef({});
@@ -33408,9 +33408,9 @@
33408
33408
  default: "div"
33409
33409
  }
33410
33410
  };
33411
- const COMPONENT_NAME$18 = "vc-divider";
33411
+ const COMPONENT_NAME$19 = "vc-divider";
33412
33412
  const Divider = /* @__PURE__ */ vue.defineComponent({
33413
- name: COMPONENT_NAME$18,
33413
+ name: COMPONENT_NAME$19,
33414
33414
  props: props$T,
33415
33415
  setup(props2, {
33416
33416
  slots
@@ -33557,7 +33557,7 @@
33557
33557
  barTo: props$R.to,
33558
33558
  ...pick(props$R, barKeys)
33559
33559
  };
33560
- const COMPONENT_NAME$17 = "vc-scroller-track";
33560
+ const COMPONENT_NAME$18 = "vc-scroller-track";
33561
33561
  const BAR_MAP = {
33562
33562
  vertical: {
33563
33563
  scroll: "scrollTop",
@@ -33577,7 +33577,7 @@
33577
33577
  }
33578
33578
  };
33579
33579
  const Track$1 = /* @__PURE__ */ vue.defineComponent({
33580
- name: COMPONENT_NAME$17,
33580
+ name: COMPONENT_NAME$18,
33581
33581
  props: props$S,
33582
33582
  emits: ["change"],
33583
33583
  inheritAttrs: false,
@@ -33739,9 +33739,9 @@
33739
33739
  };
33740
33740
  }
33741
33741
  });
33742
- const COMPONENT_NAME$16 = "vc-scroller-bar";
33742
+ const COMPONENT_NAME$17 = "vc-scroller-bar";
33743
33743
  const Bar = /* @__PURE__ */ vue.defineComponent({
33744
- name: COMPONENT_NAME$16,
33744
+ name: COMPONENT_NAME$17,
33745
33745
  props: props$R,
33746
33746
  emits: ["change"],
33747
33747
  setup(props2, {
@@ -33952,9 +33952,9 @@
33952
33952
  refreshPosition
33953
33953
  };
33954
33954
  };
33955
- const COMPONENT_NAME$15 = "vc-scroller";
33955
+ const COMPONENT_NAME$16 = "vc-scroller";
33956
33956
  const Scroller = /* @__PURE__ */ vue.defineComponent({
33957
- name: COMPONENT_NAME$15,
33957
+ name: COMPONENT_NAME$16,
33958
33958
  props: props$Q,
33959
33959
  emits: ["scroll"],
33960
33960
  setup(props2, {
@@ -34012,9 +34012,9 @@
34012
34012
  };
34013
34013
  }
34014
34014
  });
34015
- const COMPONENT_NAME$14 = "vc-scroller-wheel";
34015
+ const COMPONENT_NAME$15 = "vc-scroller-wheel";
34016
34016
  const ScrollerWheel = /* @__PURE__ */ vue.defineComponent({
34017
- name: COMPONENT_NAME$14,
34017
+ name: COMPONENT_NAME$15,
34018
34018
  props: Object.assign(props$Q, {
34019
34019
  stopPropagation: {
34020
34020
  type: Boolean,
@@ -34195,9 +34195,9 @@
34195
34195
  type: Function
34196
34196
  }
34197
34197
  };
34198
- const COMPONENT_NAME$13 = "vc-drawer";
34198
+ const COMPONENT_NAME$14 = "vc-drawer";
34199
34199
  const DrawerView = /* @__PURE__ */ vue.defineComponent({
34200
- name: COMPONENT_NAME$13,
34200
+ name: COMPONENT_NAME$14,
34201
34201
  props: props$P,
34202
34202
  emits: ["close", "update:modelValue", "visible-change"],
34203
34203
  setup(props2, {
@@ -34356,9 +34356,9 @@
34356
34356
  default: "div"
34357
34357
  }
34358
34358
  };
34359
- const COMPONENT_NAME$12 = "vc-dropdown";
34359
+ const COMPONENT_NAME$13 = "vc-dropdown";
34360
34360
  const Dropdown = /* @__PURE__ */ vue.defineComponent({
34361
- name: COMPONENT_NAME$12,
34361
+ name: COMPONENT_NAME$13,
34362
34362
  props: props$O,
34363
34363
  setup(props2, {
34364
34364
  slots
@@ -34377,9 +34377,9 @@
34377
34377
  default: "div"
34378
34378
  }
34379
34379
  };
34380
- const COMPONENT_NAME$11 = "vc-editor";
34380
+ const COMPONENT_NAME$12 = "vc-editor";
34381
34381
  const Editor = /* @__PURE__ */ vue.defineComponent({
34382
- name: COMPONENT_NAME$11,
34382
+ name: COMPONENT_NAME$12,
34383
34383
  props: props$N,
34384
34384
  setup(props2, {
34385
34385
  slots
@@ -34518,9 +34518,9 @@
34518
34518
  validateField
34519
34519
  });
34520
34520
  };
34521
- const COMPONENT_NAME$10 = "vc-form";
34521
+ const COMPONENT_NAME$11 = "vc-form";
34522
34522
  const Form = vue.defineComponent({
34523
- name: COMPONENT_NAME$10,
34523
+ name: COMPONENT_NAME$11,
34524
34524
  props: props$M,
34525
34525
  setup(props2, { slots, expose }) {
34526
34526
  useForm(expose);
@@ -34840,9 +34840,9 @@
34840
34840
  labelPosition
34841
34841
  };
34842
34842
  };
34843
- const COMPONENT_NAME$$ = "vc-form-item";
34843
+ const COMPONENT_NAME$10 = "vc-form-item";
34844
34844
  const FormItem = /* @__PURE__ */ vue.defineComponent({
34845
- name: COMPONENT_NAME$$,
34845
+ name: COMPONENT_NAME$10,
34846
34846
  props: props$L,
34847
34847
  setup(props2, {
34848
34848
  slots,
@@ -34905,9 +34905,9 @@
34905
34905
  default: false
34906
34906
  }
34907
34907
  };
34908
- const COMPONENT_NAME$_ = "vcm-form";
34908
+ const COMPONENT_NAME$$ = "vcm-form";
34909
34909
  const MForm = vue.defineComponent({
34910
- name: COMPONENT_NAME$_,
34910
+ name: COMPONENT_NAME$$,
34911
34911
  props: props$K,
34912
34912
  setup(props2, { slots, expose }) {
34913
34913
  useForm(expose, {
@@ -34934,9 +34934,9 @@
34934
34934
  default: 12
34935
34935
  }
34936
34936
  };
34937
- const COMPONENT_NAME$Z = "vcm-form-item";
34937
+ const COMPONENT_NAME$_ = "vcm-form-item";
34938
34938
  const MFormItem = /* @__PURE__ */ vue.defineComponent({
34939
- name: COMPONENT_NAME$Z,
34939
+ name: COMPONENT_NAME$_,
34940
34940
  props: props$J,
34941
34941
  setup(props2, {
34942
34942
  slots,
@@ -34989,9 +34989,9 @@
34989
34989
  };
34990
34990
  }
34991
34991
  });
34992
- const COMPONENT_NAME$Y = "vc-fragment";
34992
+ const COMPONENT_NAME$Z = "vc-fragment";
34993
34993
  const Fragment = vue.defineComponent({
34994
- name: COMPONENT_NAME$Y,
34994
+ name: COMPONENT_NAME$Z,
34995
34995
  setup(_, { slots }) {
34996
34996
  return () => vue.h(vue.Fragment, slots.default?.());
34997
34997
  }
@@ -35003,9 +35003,9 @@
35003
35003
  default: "div"
35004
35004
  }
35005
35005
  };
35006
- const COMPONENT_NAME$X = "vc-html-to-image";
35006
+ const COMPONENT_NAME$Y = "vc-html-to-image";
35007
35007
  const HTMLToImage = /* @__PURE__ */ vue.defineComponent({
35008
- name: COMPONENT_NAME$X,
35008
+ name: COMPONENT_NAME$Y,
35009
35009
  props: props$I,
35010
35010
  setup(props2, {
35011
35011
  slots
@@ -35020,10 +35020,107 @@
35020
35020
  const MHTMLToImage = HTMLToImage;
35021
35021
  const MIcon = Icon;
35022
35022
  const props$H = {
35023
+ tag: {
35024
+ type: String,
35025
+ default: "div"
35026
+ }
35027
+ };
35028
+ const COMPONENT_NAME$X = "vc-image-preview";
35029
+ const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
35030
+ name: COMPONENT_NAME$X,
35031
+ props: props$H,
35032
+ setup(props2, {
35033
+ slots
35034
+ }) {
35035
+ return () => {
35036
+ return vue.createVNode("div", {
35037
+ "class": "vc-image-preview"
35038
+ }, [slots?.default?.()]);
35039
+ };
35040
+ }
35041
+ });
35042
+ const MAX_WIDTH = window.innerWidth;
35043
+ const MAX_HEIGHT = window.innerHeight;
35044
+ const getFitSize = (src) => {
35045
+ return new Promise((resolve) => {
35046
+ const img = new Image();
35047
+ let width;
35048
+ let height;
35049
+ img.onload = () => {
35050
+ const owidth = img.naturalWidth || img.width;
35051
+ const oheight = img.naturalHeight || img.height;
35052
+ if (owidth > oheight) {
35053
+ width = Math.min(MAX_WIDTH, owidth);
35054
+ height = width / owidth * oheight;
35055
+ resolve({
35056
+ width,
35057
+ height
35058
+ });
35059
+ } else {
35060
+ height = Math.min(MAX_HEIGHT, oheight);
35061
+ width = height / oheight * owidth;
35062
+ resolve({
35063
+ width,
35064
+ height
35065
+ });
35066
+ }
35067
+ };
35068
+ img.onerror = () => resolve({});
35069
+ img.src = src;
35070
+ });
35071
+ };
35072
+ const open$1 = async (options) => {
35073
+ const e = VcInstance.globalEvent;
35074
+ const data = options.data.map((i) => {
35075
+ if (typeof i === "string") {
35076
+ return {
35077
+ src: i
35078
+ };
35079
+ }
35080
+ return {
35081
+ ...i,
35082
+ src: i.source || i.src
35083
+ };
35084
+ });
35085
+ for (let i = 0; i < data.length; i++) {
35086
+ if (!data[i].width) {
35087
+ data[i] = {
35088
+ ...data[i],
35089
+ ...await getFitSize(data[i].src)
35090
+ };
35091
+ }
35092
+ }
35093
+ const lightbox = new PhotoSwipeLightbox({
35094
+ pswpModule: () => Promise.resolve().then(() => photoswipe_esm),
35095
+ closeTitle: "关闭(Esc)",
35096
+ zoomTitle: "缩放",
35097
+ arrowPrevTitle: "上一张",
35098
+ arrowNextTitle: "下一张",
35099
+ errorMsg: "网络异常 图片加载失败",
35100
+ indexIndicatorSep: " / ",
35101
+ initialZoomLevel: "fit"
35102
+ });
35103
+ lightbox.init();
35104
+ lightbox.loadAndOpen(
35105
+ options.current || 0,
35106
+ data,
35107
+ // 下面无效,需要给官方支持
35108
+ {
35109
+ x: e?.clientX,
35110
+ y: e?.clientY
35111
+ }
35112
+ );
35113
+ };
35114
+ const ImagePreview = Object.assign(ImagePreview$1, { open: open$1 });
35115
+ const props$G = {
35023
35116
  src: String,
35024
35117
  fit: String,
35025
35118
  lazy: Boolean,
35026
- wrapper: [Object, String]
35119
+ wrapper: [Object, String],
35120
+ previewable: {
35121
+ type: Boolean,
35122
+ default: true
35123
+ }
35027
35124
  };
35028
35125
  class IMGStore {
35029
35126
  map;
@@ -35089,7 +35186,7 @@
35089
35186
  const Image$1 = /* @__PURE__ */ vue.defineComponent({
35090
35187
  name: COMPONENT_NAME$W,
35091
35188
  inheritAttrs: false,
35092
- props: props$H,
35189
+ props: props$G,
35093
35190
  setup(props2, {
35094
35191
  slots,
35095
35192
  emit
@@ -35233,6 +35330,15 @@
35233
35330
  const alignCenter = vue.computed(() => {
35234
35331
  return !isSupportObjectFit && props2.fit !== ObjectFit.FILL;
35235
35332
  });
35333
+ const handlePreview = () => {
35334
+ if (!props2.previewable) return;
35335
+ ImagePreview.open({
35336
+ current: 0,
35337
+ data: [props2.src],
35338
+ onClose() {
35339
+ }
35340
+ });
35341
+ };
35236
35342
  vue.watch(() => props2.src, (v) => {
35237
35343
  if (!v && !isLoading.value) {
35238
35344
  isLoading.value = true;
@@ -35253,7 +35359,9 @@
35253
35359
  return () => {
35254
35360
  return vue.createVNode("div", {
35255
35361
  "style": its.value.style,
35256
- "class": [its.value.class, "vc-image"]
35362
+ "class": [its.value.class, {
35363
+ "is-allow-preview": props2.previewable
35364
+ }, "vc-image"]
35257
35365
  }, [isLoading.value && (slots.placeholder ? slots.placeholder() : vue.createVNode("div", {
35258
35366
  "class": [{
35259
35367
  "is-auto": isAuto.value
@@ -35271,12 +35379,14 @@
35271
35379
  // 包含所有on*都会被绑定, 且listeners中覆盖将由listener内触发(inheritAttrs: false)
35272
35380
  ...its.value.attrs,
35273
35381
  ...its.value.listeners
35382
+ }, {
35383
+ "onClick": handlePreview
35274
35384
  }), null)]);
35275
35385
  };
35276
35386
  }
35277
35387
  });
35278
35388
  const MImage = Image$1;
35279
- const props$G = {
35389
+ const props$F = {
35280
35390
  tag: {
35281
35391
  type: String,
35282
35392
  default: "div"
@@ -35285,7 +35395,7 @@
35285
35395
  const COMPONENT_NAME$V = "vc-image-crop";
35286
35396
  const ImageCrop = /* @__PURE__ */ vue.defineComponent({
35287
35397
  name: COMPONENT_NAME$V,
35288
- props: props$G,
35398
+ props: props$F,
35289
35399
  setup(props2, {
35290
35400
  slots
35291
35401
  }) {
@@ -35297,99 +35407,6 @@
35297
35407
  }
35298
35408
  });
35299
35409
  const MImageCrop = ImageCrop;
35300
- const props$F = {
35301
- tag: {
35302
- type: String,
35303
- default: "div"
35304
- }
35305
- };
35306
- const COMPONENT_NAME$U = "vc-image-preview";
35307
- const ImagePreview$1 = /* @__PURE__ */ vue.defineComponent({
35308
- name: COMPONENT_NAME$U,
35309
- props: props$F,
35310
- setup(props2, {
35311
- slots
35312
- }) {
35313
- return () => {
35314
- return vue.createVNode("div", {
35315
- "class": "vc-image-preview"
35316
- }, [slots?.default?.()]);
35317
- };
35318
- }
35319
- });
35320
- const MAX_WIDTH = window.innerWidth;
35321
- const MAX_HEIGHT = window.innerHeight;
35322
- const getFitSize = (src) => {
35323
- return new Promise((resolve) => {
35324
- const img = new Image();
35325
- let width;
35326
- let height;
35327
- img.onload = () => {
35328
- const owidth = img.naturalWidth || img.width;
35329
- const oheight = img.naturalHeight || img.height;
35330
- if (owidth > oheight) {
35331
- width = Math.min(MAX_WIDTH, owidth);
35332
- height = width / owidth * oheight;
35333
- resolve({
35334
- width,
35335
- height
35336
- });
35337
- } else {
35338
- height = Math.min(MAX_HEIGHT, oheight);
35339
- width = height / oheight * owidth;
35340
- resolve({
35341
- width,
35342
- height
35343
- });
35344
- }
35345
- };
35346
- img.onerror = () => resolve({});
35347
- img.src = src;
35348
- });
35349
- };
35350
- const open$1 = async (options) => {
35351
- const e = VcInstance.globalEvent;
35352
- const data = options.data.map((i) => {
35353
- if (typeof i === "string") {
35354
- return {
35355
- src: i
35356
- };
35357
- }
35358
- return {
35359
- ...i,
35360
- src: i.source || i.src
35361
- };
35362
- });
35363
- for (let i = 0; i < data.length; i++) {
35364
- if (!data[i].width) {
35365
- data[i] = {
35366
- ...data[i],
35367
- ...await getFitSize(data[i].src)
35368
- };
35369
- }
35370
- }
35371
- const lightbox = new PhotoSwipeLightbox({
35372
- pswpModule: () => Promise.resolve().then(() => photoswipe_esm),
35373
- closeTitle: "关闭(Esc)",
35374
- zoomTitle: "缩放",
35375
- arrowPrevTitle: "上一张",
35376
- arrowNextTitle: "下一张",
35377
- errorMsg: "网络异常 图片加载失败",
35378
- indexIndicatorSep: " / ",
35379
- initialZoomLevel: "fit"
35380
- });
35381
- lightbox.init();
35382
- lightbox.loadAndOpen(
35383
- options.current || 0,
35384
- data,
35385
- // 下面无效,需要给官方支持
35386
- {
35387
- x: e?.clientX,
35388
- y: e?.clientY
35389
- }
35390
- );
35391
- };
35392
- const ImagePreview = Object.assign(ImagePreview$1, { open: open$1 });
35393
35410
  const MImagePreview = ImagePreview;
35394
35411
  const props$E = {
35395
35412
  tag: {
@@ -35397,9 +35414,9 @@
35397
35414
  default: "div"
35398
35415
  }
35399
35416
  };
35400
- const COMPONENT_NAME$T = "vc-image-processing";
35417
+ const COMPONENT_NAME$U = "vc-image-processing";
35401
35418
  const ImageProcessing = /* @__PURE__ */ vue.defineComponent({
35402
- name: COMPONENT_NAME$T,
35419
+ name: COMPONENT_NAME$U,
35403
35420
  props: props$E,
35404
35421
  setup(props2, {
35405
35422
  slots
@@ -35412,9 +35429,9 @@
35412
35429
  }
35413
35430
  });
35414
35431
  const MImageProcessing = ImageProcessing;
35415
- const COMPONENT_NAME$S = "vcm-input";
35432
+ const COMPONENT_NAME$T = "vcm-input";
35416
35433
  const MInput = /* @__PURE__ */ vue.defineComponent({
35417
- name: COMPONENT_NAME$S,
35434
+ name: COMPONENT_NAME$T,
35418
35435
  inheritAttrs: false,
35419
35436
  props: {
35420
35437
  ...props$$,
@@ -35501,9 +35518,9 @@
35501
35518
  };
35502
35519
  }
35503
35520
  });
35504
- const COMPONENT_NAME$R = "vcm-input-number";
35521
+ const COMPONENT_NAME$S = "vcm-input-number";
35505
35522
  const MInputNumber = /* @__PURE__ */ vue.defineComponent({
35506
- name: COMPONENT_NAME$R,
35523
+ name: COMPONENT_NAME$S,
35507
35524
  props: props$X,
35508
35525
  inheritAttrs: false,
35509
35526
  setup(props2, {
@@ -35549,9 +35566,9 @@
35549
35566
  };
35550
35567
  }
35551
35568
  });
35552
- const COMPONENT_NAME$Q = "vcm-input-search";
35569
+ const COMPONENT_NAME$R = "vcm-input-search";
35553
35570
  const MInputSearch = /* @__PURE__ */ vue.defineComponent({
35554
- name: COMPONENT_NAME$Q,
35571
+ name: COMPONENT_NAME$R,
35555
35572
  props: {
35556
35573
  ...props$W,
35557
35574
  cancelText: {
@@ -35625,9 +35642,9 @@
35625
35642
  default: true
35626
35643
  }
35627
35644
  };
35628
- const COMPONENT_NAME$P = "vcm-list";
35645
+ const COMPONENT_NAME$Q = "vcm-list";
35629
35646
  const MList = vue.defineComponent({
35630
- name: COMPONENT_NAME$P,
35647
+ name: COMPONENT_NAME$Q,
35631
35648
  props: props$D,
35632
35649
  setup(props2, { slots }) {
35633
35650
  vue.provide("vc-list", { props: props2 });
@@ -35678,10 +35695,10 @@
35678
35695
  // MListItem是否独立存在
35679
35696
  alone: Boolean
35680
35697
  };
35681
- const COMPONENT_NAME$O = "vcm-list-item";
35698
+ const COMPONENT_NAME$P = "vcm-list-item";
35682
35699
  const HTTP_REGEX = /[a-zA-z]+:\/\/[^\s]*/;
35683
35700
  const MListItem = /* @__PURE__ */ vue.defineComponent({
35684
- name: COMPONENT_NAME$O,
35701
+ name: COMPONENT_NAME$P,
35685
35702
  props: props$C,
35686
35703
  emits: ["click"],
35687
35704
  setup(props2, {
@@ -35765,11 +35782,11 @@
35765
35782
  default: false
35766
35783
  }
35767
35784
  };
35768
- const COMPONENT_NAME$N = "vc-marquee";
35785
+ const COMPONENT_NAME$O = "vc-marquee";
35769
35786
  const ANIMATION = prefixStyle("animation").camel;
35770
35787
  const TRANSFORM_KEBAB = prefixStyle("transform").kebab;
35771
35788
  const Marquee = /* @__PURE__ */ vue.defineComponent({
35772
- name: COMPONENT_NAME$N,
35789
+ name: COMPONENT_NAME$O,
35773
35790
  props: props$B,
35774
35791
  setup(props2, {
35775
35792
  slots
@@ -35830,9 +35847,9 @@
35830
35847
  default: true
35831
35848
  }
35832
35849
  };
35833
- const COMPONENT_NAME$M = "vc-resizer";
35850
+ const COMPONENT_NAME$N = "vc-resizer";
35834
35851
  const Resizer = vue.defineComponent({
35835
- name: COMPONENT_NAME$M,
35852
+ name: COMPONENT_NAME$N,
35836
35853
  props: props$A,
35837
35854
  emit: ["resize", "change"],
35838
35855
  setup(props2, { emit, slots, expose }) {
@@ -35986,10 +36003,10 @@
35986
36003
  type: Function
35987
36004
  }
35988
36005
  };
35989
- const COMPONENT_NAME$L = "vc-modal";
36006
+ const COMPONENT_NAME$M = "vc-modal";
35990
36007
  let zIndexNumber = 1002;
35991
36008
  const ModalView = /* @__PURE__ */ vue.defineComponent({
35992
- name: COMPONENT_NAME$L,
36009
+ name: COMPONENT_NAME$M,
35993
36010
  emits: ["update:modelValue", "close", "portal-fulfilled", "visible-change", "ok", "cancel"],
35994
36011
  props: props$z,
35995
36012
  setup(props2, {
@@ -36379,9 +36396,9 @@
36379
36396
  type: Function
36380
36397
  }
36381
36398
  };
36382
- const COMPONENT_NAME$K = "vc-modal";
36399
+ const COMPONENT_NAME$L = "vc-modal";
36383
36400
  const MModalView = /* @__PURE__ */ vue.defineComponent({
36384
- name: COMPONENT_NAME$K,
36401
+ name: COMPONENT_NAME$L,
36385
36402
  emits: ["update:modelValue", "portal-fulfilled", "close", "ok", "cancel"],
36386
36403
  props: props$y,
36387
36404
  setup(props2, {
@@ -36576,9 +36593,9 @@
36576
36593
  // 这个相当于Modal中的onCancel,支持Promise
36577
36594
  onBeforeClose: Function
36578
36595
  };
36579
- const COMPONENT_NAME$J = "vc-notice";
36596
+ const COMPONENT_NAME$K = "vc-notice";
36580
36597
  const NoticeView = /* @__PURE__ */ vue.defineComponent({
36581
- name: COMPONENT_NAME$J,
36598
+ name: COMPONENT_NAME$K,
36582
36599
  props: props$x,
36583
36600
  emits: ["portal-fulfilled", "close", "before-close"],
36584
36601
  setup(props2, {
@@ -36744,9 +36761,9 @@
36744
36761
  default: "div"
36745
36762
  }
36746
36763
  };
36747
- const COMPONENT_NAME$I = "vc-option";
36764
+ const COMPONENT_NAME$J = "vc-option";
36748
36765
  const Option$1 = /* @__PURE__ */ vue.defineComponent({
36749
- name: COMPONENT_NAME$I,
36766
+ name: COMPONENT_NAME$J,
36750
36767
  props: props$w,
36751
36768
  setup(props2, {
36752
36769
  slots
@@ -36852,9 +36869,9 @@
36852
36869
  type: [String, Number]
36853
36870
  }
36854
36871
  };
36855
- const COMPONENT_NAME$H = "vc-tag";
36872
+ const COMPONENT_NAME$I = "vc-tag";
36856
36873
  const Tag = /* @__PURE__ */ vue.defineComponent({
36857
- name: COMPONENT_NAME$H,
36874
+ name: COMPONENT_NAME$I,
36858
36875
  props: props$u,
36859
36876
  emits: ["close", "change"],
36860
36877
  setup(props2, {
@@ -36919,9 +36936,9 @@
36919
36936
  default: true
36920
36937
  }
36921
36938
  };
36922
- const COMPONENT_NAME$G = "vc-select-option";
36939
+ const COMPONENT_NAME$H = "vc-select-option";
36923
36940
  const Option = /* @__PURE__ */ vue.defineComponent({
36924
- name: COMPONENT_NAME$G,
36941
+ name: COMPONENT_NAME$H,
36925
36942
  props: props$t,
36926
36943
  setup(props2, {
36927
36944
  slots
@@ -36988,9 +37005,9 @@
36988
37005
  type: [String, Number]
36989
37006
  }
36990
37007
  };
36991
- const COMPONENT_NAME$F = "vc-select-option-group";
37008
+ const COMPONENT_NAME$G = "vc-select-option-group";
36992
37009
  const OptionGroup = /* @__PURE__ */ vue.defineComponent({
36993
- name: COMPONENT_NAME$F,
37010
+ name: COMPONENT_NAME$G,
36994
37011
  props: props$s,
36995
37012
  setup(props2, {
36996
37013
  slots
@@ -37084,9 +37101,9 @@
37084
37101
  function _isSlot$1(s) {
37085
37102
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
37086
37103
  }
37087
- const COMPONENT_NAME$E = "vc-select";
37104
+ const COMPONENT_NAME$F = "vc-select";
37088
37105
  const Select = /* @__PURE__ */ vue.defineComponent({
37089
- name: COMPONENT_NAME$E,
37106
+ name: COMPONENT_NAME$F,
37090
37107
  props: props$r,
37091
37108
  emits: ["ready", "close", "visible-change", "clear", "change", "update:modelValue"],
37092
37109
  setup(props2, {
@@ -37319,9 +37336,9 @@
37319
37336
  };
37320
37337
  }
37321
37338
  });
37322
- const COMPONENT_NAME$D = "vc-pagination";
37339
+ const COMPONENT_NAME$E = "vc-pagination";
37323
37340
  const Pagination = /* @__PURE__ */ vue.defineComponent({
37324
- name: COMPONENT_NAME$D,
37341
+ name: COMPONENT_NAME$E,
37325
37342
  props: props$v,
37326
37343
  emits: ["update:current", "change", "page-size-change"],
37327
37344
  setup(props2, {
@@ -37512,9 +37529,9 @@
37512
37529
  default: "div"
37513
37530
  }
37514
37531
  };
37515
- const COMPONENT_NAME$C = "vc-picker";
37532
+ const COMPONENT_NAME$D = "vc-picker";
37516
37533
  const Picker = /* @__PURE__ */ vue.defineComponent({
37517
- name: COMPONENT_NAME$C,
37534
+ name: COMPONENT_NAME$D,
37518
37535
  props: props$q,
37519
37536
  setup(props2, {
37520
37537
  slots
@@ -37533,9 +37550,9 @@
37533
37550
  default: "div"
37534
37551
  }
37535
37552
  };
37536
- const COMPONENT_NAME$B = "vc-popconfirm";
37553
+ const COMPONENT_NAME$C = "vc-popconfirm";
37537
37554
  const Popconfirm = /* @__PURE__ */ vue.defineComponent({
37538
- name: COMPONENT_NAME$B,
37555
+ name: COMPONENT_NAME$C,
37539
37556
  props: props$p,
37540
37557
  setup(props2, {
37541
37558
  slots
@@ -37555,9 +37572,9 @@
37555
37572
  default: "div"
37556
37573
  }
37557
37574
  };
37558
- const COMPONENT_NAME$A = "vc-popup";
37575
+ const COMPONENT_NAME$B = "vc-popup";
37559
37576
  const Popup = /* @__PURE__ */ vue.defineComponent({
37560
- name: COMPONENT_NAME$A,
37577
+ name: COMPONENT_NAME$B,
37561
37578
  props: props$o,
37562
37579
  setup(props2, {
37563
37580
  slots
@@ -37578,9 +37595,9 @@
37578
37595
  default: "div"
37579
37596
  }
37580
37597
  };
37581
- const COMPONENT_NAME$z = "vc-print";
37598
+ const COMPONENT_NAME$A = "vc-print";
37582
37599
  const Print = /* @__PURE__ */ vue.defineComponent({
37583
- name: COMPONENT_NAME$z,
37600
+ name: COMPONENT_NAME$A,
37584
37601
  props: props$n,
37585
37602
  setup(props2, {
37586
37603
  expose,
@@ -37670,9 +37687,9 @@
37670
37687
  })
37671
37688
  }
37672
37689
  };
37673
- const COMPONENT_NAME$y = "vc-progress-circle";
37690
+ const COMPONENT_NAME$z = "vc-progress-circle";
37674
37691
  const Circle$1 = /* @__PURE__ */ vue.defineComponent({
37675
- name: COMPONENT_NAME$y,
37692
+ name: COMPONENT_NAME$z,
37676
37693
  props: props$m,
37677
37694
  setup(props2, {
37678
37695
  slots
@@ -37729,9 +37746,9 @@
37729
37746
  };
37730
37747
  }
37731
37748
  });
37732
- const COMPONENT_NAME$x = "vc-progress-line";
37749
+ const COMPONENT_NAME$y = "vc-progress-line";
37733
37750
  const Line$2 = /* @__PURE__ */ vue.defineComponent({
37734
- name: COMPONENT_NAME$x,
37751
+ name: COMPONENT_NAME$y,
37735
37752
  props: props$m,
37736
37753
  setup(props2) {
37737
37754
  const colorStyle = vue.computed(() => {
@@ -37775,9 +37792,9 @@
37775
37792
  function _isSlot(s) {
37776
37793
  return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
37777
37794
  }
37778
- const COMPONENT_NAME$w = "vc-progress";
37795
+ const COMPONENT_NAME$x = "vc-progress";
37779
37796
  const Progress = /* @__PURE__ */ vue.defineComponent({
37780
- name: COMPONENT_NAME$w,
37797
+ name: COMPONENT_NAME$x,
37781
37798
  props: props$m,
37782
37799
  setup(props2, {
37783
37800
  slots
@@ -37929,9 +37946,9 @@
37929
37946
  computedLabel
37930
37947
  };
37931
37948
  };
37932
- const COMPONENT_NAME$v = "vc-radio";
37949
+ const COMPONENT_NAME$w = "vc-radio";
37933
37950
  const Radio = /* @__PURE__ */ vue.defineComponent({
37934
- name: COMPONENT_NAME$v,
37951
+ name: COMPONENT_NAME$w,
37935
37952
  props: props$l,
37936
37953
  emits: ["update:modelValue", "change"],
37937
37954
  setup(props2, {
@@ -38037,9 +38054,9 @@
38037
38054
  reset
38038
38055
  };
38039
38056
  };
38040
- const COMPONENT_NAME$u = "vc-radio-group";
38057
+ const COMPONENT_NAME$v = "vc-radio-group";
38041
38058
  const RadioGroup = /* @__PURE__ */ vue.defineComponent({
38042
- name: COMPONENT_NAME$u,
38059
+ name: COMPONENT_NAME$v,
38043
38060
  props: props$k,
38044
38061
  emits: ["update:modelValue", "change"],
38045
38062
  setup(props2, {
@@ -38057,9 +38074,9 @@
38057
38074
  };
38058
38075
  }
38059
38076
  });
38060
- const COMPONENT_NAME$t = "vcm-radio";
38077
+ const COMPONENT_NAME$u = "vcm-radio";
38061
38078
  const MRadio = /* @__PURE__ */ vue.defineComponent({
38062
- name: COMPONENT_NAME$t,
38079
+ name: COMPONENT_NAME$u,
38063
38080
  props: props$l,
38064
38081
  emits: ["update:modelValue", "change"],
38065
38082
  setup(props2, {
@@ -38097,9 +38114,9 @@
38097
38114
  };
38098
38115
  }
38099
38116
  });
38100
- const COMPONENT_NAME$s = "vcm-radio-group";
38117
+ const COMPONENT_NAME$t = "vcm-radio-group";
38101
38118
  const MRadioGroup = /* @__PURE__ */ vue.defineComponent({
38102
- name: COMPONENT_NAME$s,
38119
+ name: COMPONENT_NAME$t,
38103
38120
  props: props$k,
38104
38121
  emits: ["update:modelValue", "change"],
38105
38122
  setup(props2, {
@@ -38124,9 +38141,9 @@
38124
38141
  default: "div"
38125
38142
  }
38126
38143
  };
38127
- const COMPONENT_NAME$r = "vc-rate";
38144
+ const COMPONENT_NAME$s = "vc-rate";
38128
38145
  const Rate = /* @__PURE__ */ vue.defineComponent({
38129
- name: COMPONENT_NAME$r,
38146
+ name: COMPONENT_NAME$s,
38130
38147
  props: props$j,
38131
38148
  setup(props2, {
38132
38149
  slots
@@ -38189,9 +38206,9 @@
38189
38206
  renderPlaceholder: Function,
38190
38207
  renderRefresh: Function
38191
38208
  };
38192
- const COMPONENT_NAME$q = "vc-recycle-list-scroll-state";
38209
+ const COMPONENT_NAME$r = "vc-recycle-list-scroll-state";
38193
38210
  const ScrollState = /* @__PURE__ */ vue.defineComponent({
38194
- name: COMPONENT_NAME$q,
38211
+ name: COMPONENT_NAME$r,
38195
38212
  setup(_, {
38196
38213
  slots
38197
38214
  }) {
@@ -38315,10 +38332,10 @@
38315
38332
  );
38316
38333
  return keys;
38317
38334
  };
38318
- const COMPONENT_NAME$p = "vc-recycle-list-container";
38335
+ const COMPONENT_NAME$q = "vc-recycle-list-container";
38319
38336
  const transformKey = prefixStyle("transform").camel;
38320
38337
  const Container = /* @__PURE__ */ vue.defineComponent({
38321
- name: COMPONENT_NAME$p,
38338
+ name: COMPONENT_NAME$q,
38322
38339
  props: props$h,
38323
38340
  emits: ["refresh"],
38324
38341
  setup(props2, {
@@ -38411,9 +38428,9 @@
38411
38428
  };
38412
38429
  }
38413
38430
  });
38414
- const COMPONENT_NAME$o = "vc-recycle-list";
38431
+ const COMPONENT_NAME$p = "vc-recycle-list";
38415
38432
  const RecycleList = /* @__PURE__ */ vue.defineComponent({
38416
- name: COMPONENT_NAME$o,
38433
+ name: COMPONENT_NAME$p,
38417
38434
  props: props$i,
38418
38435
  emits: ["scroll", "row-resize"],
38419
38436
  setup(props2, {
@@ -38934,9 +38951,9 @@
38934
38951
  default: "div"
38935
38952
  }
38936
38953
  };
38937
- const COMPONENT_NAME$n = "vc-slider";
38954
+ const COMPONENT_NAME$o = "vc-slider";
38938
38955
  const Slider = /* @__PURE__ */ vue.defineComponent({
38939
- name: COMPONENT_NAME$n,
38956
+ name: COMPONENT_NAME$o,
38940
38957
  props: props$g,
38941
38958
  setup(props2, {
38942
38959
  slots
@@ -38955,9 +38972,9 @@
38955
38972
  default: "div"
38956
38973
  }
38957
38974
  };
38958
- const COMPONENT_NAME$m = "vc-sort-list";
38975
+ const COMPONENT_NAME$n = "vc-sort-list";
38959
38976
  const SortList = /* @__PURE__ */ vue.defineComponent({
38960
- name: COMPONENT_NAME$m,
38977
+ name: COMPONENT_NAME$n,
38961
38978
  props: props$f,
38962
38979
  setup(props2, {
38963
38980
  slots
@@ -38976,9 +38993,9 @@
38976
38993
  default: "div"
38977
38994
  }
38978
38995
  };
38979
- const COMPONENT_NAME$l = "vc-steps";
38996
+ const COMPONENT_NAME$m = "vc-steps";
38980
38997
  const Steps = /* @__PURE__ */ vue.defineComponent({
38981
- name: COMPONENT_NAME$l,
38998
+ name: COMPONENT_NAME$m,
38982
38999
  props: props$e,
38983
39000
  setup(props2, {
38984
39001
  slots
@@ -39085,9 +39102,9 @@
39085
39102
  reset
39086
39103
  };
39087
39104
  };
39088
- const COMPONENT_NAME$k = "vc-switch";
39105
+ const COMPONENT_NAME$l = "vc-switch";
39089
39106
  const Switch = /* @__PURE__ */ vue.defineComponent({
39090
- name: COMPONENT_NAME$k,
39107
+ name: COMPONENT_NAME$l,
39091
39108
  props: props$d,
39092
39109
  // click -> onClick要被拦截,此处不能放置
39093
39110
  emits: ["update:modelValue", "change", "click"],
@@ -39121,9 +39138,9 @@
39121
39138
  };
39122
39139
  }
39123
39140
  });
39124
- const COMPONENT_NAME$j = "vcm-switch";
39141
+ const COMPONENT_NAME$k = "vcm-switch";
39125
39142
  const MSwitch = /* @__PURE__ */ vue.defineComponent({
39126
- name: COMPONENT_NAME$j,
39143
+ name: COMPONENT_NAME$k,
39127
39144
  props: props$d,
39128
39145
  // click -> onClick要被拦截,此处不能放置
39129
39146
  emits: ["update:modelValue", "change", "click"],
@@ -40224,9 +40241,9 @@
40224
40241
  });
40225
40242
  return states;
40226
40243
  };
40227
- const COMPONENT_NAME$i = "vc-table-normal-list";
40244
+ const COMPONENT_NAME$j = "vc-table-normal-list";
40228
40245
  const NormalList = /* @__PURE__ */ vue.defineComponent({
40229
- name: COMPONENT_NAME$i,
40246
+ name: COMPONENT_NAME$j,
40230
40247
  props: {
40231
40248
  data: {
40232
40249
  type: Array,
@@ -41062,9 +41079,9 @@
41062
41079
  // 用于延迟渲染,用于计算高度
41063
41080
  delay: Number
41064
41081
  };
41065
- const COMPONENT_NAME$h = "vc-table";
41082
+ const COMPONENT_NAME$i = "vc-table";
41066
41083
  const Table = /* @__PURE__ */ vue.defineComponent({
41067
- name: COMPONENT_NAME$h,
41084
+ name: COMPONENT_NAME$i,
41068
41085
  props: props$c,
41069
41086
  emits: ["select", "select-all", "selection-change", "cell-mouse-enter", "cell-mouse-leave", "cell-click", "cell-dblclick", "row-click", "row-contextmenu", "row-dblclick", "header-click", "header-contextmenu", "current-change", "header-dragend ", "expand-change", "sort-change"],
41070
41087
  setup(props2, {
@@ -41671,9 +41688,9 @@
41671
41688
  });
41672
41689
  return endIndex;
41673
41690
  };
41674
- const COMPONENT_NAME$g = "vc-text";
41691
+ const COMPONENT_NAME$h = "vc-text";
41675
41692
  const Text = /* @__PURE__ */ vue.defineComponent({
41676
- name: COMPONENT_NAME$g,
41693
+ name: COMPONENT_NAME$h,
41677
41694
  props: props$b,
41678
41695
  setup(props2, {
41679
41696
  emit
@@ -42302,9 +42319,9 @@
42302
42319
  handleChange
42303
42320
  };
42304
42321
  };
42305
- const COMPONENT_NAME$f = "vc-tabs";
42322
+ const COMPONENT_NAME$g = "vc-tabs";
42306
42323
  const Tabs = /* @__PURE__ */ vue.defineComponent({
42307
- name: COMPONENT_NAME$f,
42324
+ name: COMPONENT_NAME$g,
42308
42325
  props: props$a,
42309
42326
  emits: ["update:modelValue", "change", "click"],
42310
42327
  setup(props2, {
@@ -42528,9 +42545,9 @@
42528
42545
  currentValue
42529
42546
  };
42530
42547
  };
42531
- const COMPONENT_NAME$e = "vc-tabs-pane";
42548
+ const COMPONENT_NAME$f = "vc-tabs-pane";
42532
42549
  const TabsPane = /* @__PURE__ */ vue.defineComponent({
42533
- name: COMPONENT_NAME$e,
42550
+ name: COMPONENT_NAME$f,
42534
42551
  props: props$9,
42535
42552
  setup(_, {
42536
42553
  slots
@@ -42581,9 +42598,9 @@
42581
42598
  default: false
42582
42599
  }
42583
42600
  };
42584
- const COMPONENT_NAME$d = "vcm-tabs";
42601
+ const COMPONENT_NAME$e = "vcm-tabs";
42585
42602
  const MTabs = /* @__PURE__ */ vue.defineComponent({
42586
- name: COMPONENT_NAME$d,
42603
+ name: COMPONENT_NAME$e,
42587
42604
  props: props$8,
42588
42605
  emits: ["update:modelValue", "change", "click"],
42589
42606
  setup(props2, {
@@ -42811,9 +42828,9 @@
42811
42828
  };
42812
42829
  }
42813
42830
  });
42814
- const COMPONENT_NAME$c = "vcm-tabs-pane";
42831
+ const COMPONENT_NAME$d = "vcm-tabs-pane";
42815
42832
  const MTabsPane = /* @__PURE__ */ vue.defineComponent({
42816
- name: COMPONENT_NAME$c,
42833
+ name: COMPONENT_NAME$d,
42817
42834
  props: props$9,
42818
42835
  setup(_, {
42819
42836
  slots
@@ -43106,9 +43123,9 @@
43106
43123
  type: [Object, Array]
43107
43124
  }
43108
43125
  };
43109
- const COMPONENT_NAME$b = "vc-textarea";
43126
+ const COMPONENT_NAME$c = "vc-textarea";
43110
43127
  const Textarea = /* @__PURE__ */ vue.defineComponent({
43111
- name: COMPONENT_NAME$b,
43128
+ name: COMPONENT_NAME$c,
43112
43129
  props: Object.assign(props$7, {
43113
43130
  indicator: {
43114
43131
  type: [Boolean, Object],
@@ -43161,9 +43178,9 @@
43161
43178
  };
43162
43179
  }
43163
43180
  });
43164
- const COMPONENT_NAME$a = "vcm-textarea";
43181
+ const COMPONENT_NAME$b = "vcm-textarea";
43165
43182
  const MTextarea = /* @__PURE__ */ vue.defineComponent({
43166
- name: COMPONENT_NAME$a,
43183
+ name: COMPONENT_NAME$b,
43167
43184
  props: Object.assign(props$7, {
43168
43185
  align: {
43169
43186
  type: String,
@@ -43244,9 +43261,9 @@
43244
43261
  type: [String, Object]
43245
43262
  }
43246
43263
  };
43247
- const COMPONENT_NAME$9 = "vc-theme";
43264
+ const COMPONENT_NAME$a = "vc-theme";
43248
43265
  const Theme = vue.defineComponent({
43249
- name: COMPONENT_NAME$9,
43266
+ name: COMPONENT_NAME$a,
43250
43267
  props: props$6,
43251
43268
  setup(props2, { slots }) {
43252
43269
  const themeId = getUid("vc-theme");
@@ -43331,9 +43348,9 @@
43331
43348
  };
43332
43349
  }
43333
43350
  });
43334
- const COMPONENT_NAME$8 = "vc-theme-view";
43351
+ const COMPONENT_NAME$9 = "vc-theme-view";
43335
43352
  const ThemeView = vue.defineComponent({
43336
- name: COMPONENT_NAME$8,
43353
+ name: COMPONENT_NAME$9,
43337
43354
  props: props$6,
43338
43355
  setup(props2, { slots }) {
43339
43356
  return () => {
@@ -43348,9 +43365,9 @@
43348
43365
  };
43349
43366
  }
43350
43367
  });
43351
- const COMPONENT_NAME$7 = "vc-theme-text";
43368
+ const COMPONENT_NAME$8 = "vc-theme-text";
43352
43369
  const ThemeText = vue.defineComponent({
43353
- name: COMPONENT_NAME$7,
43370
+ name: COMPONENT_NAME$8,
43354
43371
  props: props$6,
43355
43372
  setup(props2, { slots }) {
43356
43373
  return () => {
@@ -43365,9 +43382,9 @@
43365
43382
  };
43366
43383
  }
43367
43384
  });
43368
- const COMPONENT_NAME$6 = "vc-theme-image";
43385
+ const COMPONENT_NAME$7 = "vc-theme-image";
43369
43386
  const ThemeImage = vue.defineComponent({
43370
- name: COMPONENT_NAME$6,
43387
+ name: COMPONENT_NAME$7,
43371
43388
  props: props$6,
43372
43389
  setup(props2, { slots }) {
43373
43390
  return () => {
@@ -43411,12 +43428,12 @@
43411
43428
  default: false
43412
43429
  }
43413
43430
  };
43414
- const COMPONENT_NAME$5 = "vc-time-picker";
43431
+ const COMPONENT_NAME$6 = "vc-time-picker";
43415
43432
  const getPanel = (type) => {
43416
43433
  const isRange = type === "timerange";
43417
43434
  return isRange ? TimeRangePanel : TimePanel;
43418
43435
  };
43419
- const TimePicker = createPicker(COMPONENT_NAME$5, props$5, () => {
43436
+ const TimePicker = createPicker(COMPONENT_NAME$6, props$5, () => {
43420
43437
  const props2 = vue.getCurrentInstance().props;
43421
43438
  const icon = vue.ref("icon");
43422
43439
  const panel = vue.shallowRef({});
@@ -43446,9 +43463,9 @@
43446
43463
  default: "div"
43447
43464
  }
43448
43465
  };
43449
- const COMPONENT_NAME$4 = "vc-timeline";
43466
+ const COMPONENT_NAME$5 = "vc-timeline";
43450
43467
  const Timeline = /* @__PURE__ */ vue.defineComponent({
43451
- name: COMPONENT_NAME$4,
43468
+ name: COMPONENT_NAME$5,
43452
43469
  props: props$4,
43453
43470
  setup(props2, {
43454
43471
  slots
@@ -43469,9 +43486,9 @@
43469
43486
  default: "div"
43470
43487
  }
43471
43488
  };
43472
- const COMPONENT_NAME$3 = "vc-touch";
43489
+ const COMPONENT_NAME$4 = "vc-touch";
43473
43490
  const Touch = /* @__PURE__ */ vue.defineComponent({
43474
- name: COMPONENT_NAME$3,
43491
+ name: COMPONENT_NAME$4,
43475
43492
  props: props$3,
43476
43493
  setup(props2, {
43477
43494
  slots
@@ -43490,9 +43507,9 @@
43490
43507
  default: "div"
43491
43508
  }
43492
43509
  };
43493
- const COMPONENT_NAME$2 = "vc-tree";
43510
+ const COMPONENT_NAME$3 = "vc-tree";
43494
43511
  const Tree2 = /* @__PURE__ */ vue.defineComponent({
43495
- name: COMPONENT_NAME$2,
43512
+ name: COMPONENT_NAME$3,
43496
43513
  props: props$2,
43497
43514
  setup(props2, {
43498
43515
  slots
@@ -43598,9 +43615,9 @@
43598
43615
  default: false
43599
43616
  }
43600
43617
  };
43601
- const COMPONENT_NAME$1 = "vc-upload";
43618
+ const COMPONENT_NAME$2 = "vc-upload";
43602
43619
  const Upload = vue.defineComponent({
43603
- name: COMPONENT_NAME$1,
43620
+ name: COMPONENT_NAME$2,
43604
43621
  props: props$1,
43605
43622
  emits: [
43606
43623
  "message",
@@ -43983,6 +44000,97 @@
43983
44000
  showMessage: Boolean,
43984
44001
  gallery: Boolean
43985
44002
  };
44003
+ const COMPONENT_NAME$1 = "vc-steps";
44004
+ const ImageItem = /* @__PURE__ */ vue.defineComponent({
44005
+ name: COMPONENT_NAME$1,
44006
+ props: {
44007
+ imageClass: [String, Object, Array],
44008
+ disabled: Boolean,
44009
+ row: Object,
44010
+ imagePreviewOptions: {
44011
+ type: Object,
44012
+ default: () => ({})
44013
+ },
44014
+ index: [String, Number],
44015
+ data: {
44016
+ type: Array,
44017
+ default: () => []
44018
+ },
44019
+ keyValue: Object
44020
+ },
44021
+ emits: ["open", "close", "delete"],
44022
+ setup(props2, {
44023
+ slots,
44024
+ emit
44025
+ }) {
44026
+ const instance = vue.getCurrentInstance();
44027
+ const current = vue.computed(() => {
44028
+ if (props2.row?.status === 0) return -1;
44029
+ const v = props2.data.filter((i) => i.status !== 0);
44030
+ return v.findIndex((i) => {
44031
+ const a = i[props2.keyValue.value] || i;
44032
+ const b = props2.row?.[props2.keyValue.value] || props2.row;
44033
+ return a === b;
44034
+ });
44035
+ });
44036
+ const getPreviewData = () => {
44037
+ return props2.data.map((i) => i?.[props2.keyValue.value]);
44038
+ };
44039
+ const previewByPS = (e, index) => {
44040
+ emit("open");
44041
+ ImagePreview.open({
44042
+ current: index,
44043
+ data: getPreviewData(),
44044
+ onClose: () => emit("close")
44045
+ });
44046
+ };
44047
+ const handlePreview = (e) => {
44048
+ let {
44049
+ enhancer
44050
+ } = VcInstance.options.ImagePreview || {};
44051
+ enhancer = props2.imagePreviewOptions.enhancer || enhancer || (() => false);
44052
+ const images = getPreviewData().map((item) => ({
44053
+ src: item
44054
+ }));
44055
+ enhancer(current.value, images, instance) || previewByPS(e, current.value);
44056
+ };
44057
+ const handleDel = () => {
44058
+ emit("delete");
44059
+ };
44060
+ return () => {
44061
+ const row = props2.row;
44062
+ return vue.createVNode("div", {
44063
+ "class": [{
44064
+ "is-error": row.status == 0
44065
+ }, "vc-upload-image-item"]
44066
+ }, [slots.default ? slots.default({
44067
+ it: row,
44068
+ current: current.value
44069
+ }) : vue.createVNode(vue.Fragment, null, [!row.errorFlag && typeof row[props2.keyValue.value] === "string" ? vue.createVNode(Image$1, {
44070
+ "src": row[props2.keyValue.value],
44071
+ "class": [props2.imageClass, "vc-upload-image-item__content"],
44072
+ "fit": "cover",
44073
+ "previewable": false,
44074
+ "onClick": handlePreview
44075
+ }, null) : vue.createVNode("div", {
44076
+ "class": [props2.imageClass, "vc-upload-image-item__content"]
44077
+ }, [row.percent && row.percent != 100 ? vue.createVNode(Progress, {
44078
+ "percent": row.percent,
44079
+ "show-text": false,
44080
+ "status": "normal",
44081
+ "style": "width: 100%;padding: 0 5px"
44082
+ }, null) : !row[props2.keyValue.value] && row.percent === 100 && !row.errorFlag ? vue.createVNode("p", {
44083
+ "style": "line-height: 1; padding: 5px"
44084
+ }, [vue.createTextVNode("服务器正在接收...")]) : row.status == 0 ? vue.createVNode("div", {
44085
+ "style": "padding: 5px"
44086
+ }, [vue.createTextVNode("上传失败")]) : null]), (!props2.disabled || row.errorFlag) && vue.createVNode(Icon, {
44087
+ "type": "close-small",
44088
+ "class": "vc-upload-picker__delete",
44089
+ "onClick": handleDel
44090
+ }, null)])]);
44091
+ };
44092
+ }
44093
+ });
43986
44094
  const recognizer = (url) => {
43987
44095
  const reg = /\.(jpe?g|png|gif|bmp|webp|image|heic|mp4|mov|avi|mpg|mpeg|rmvb)/ig;
43988
44096
  const result = url.match(reg);
@@ -44230,7 +44338,7 @@
44230
44338
  const UploadPicker = /* @__PURE__ */ vue.defineComponent({
44231
44339
  name: COMPONENT_NAME,
44232
44340
  props,
44233
- emits: ["update:modelValue", "file-success", "file-start", "success", "error", "complete", "change", "remove-before"],
44341
+ emits: ["update:modelValue", "file-success", "file-start", "file-before", "file-error", "success", "error", "complete", "change", "remove-before"],
44234
44342
  setup(props2, {
44235
44343
  slots,
44236
44344
  expose
@@ -44242,8 +44350,7 @@
44242
44350
  case "image":
44243
44351
  pre.push({
44244
44352
  type: cur,
44245
- item: "div"
44246
- // item: ImageItem
44353
+ item: ImageItem
44247
44354
  });
44248
44355
  return pre;
44249
44356
  case "video":
@@ -44290,7 +44397,7 @@
44290
44397
  const Item = picker.item;
44291
44398
  return vue.createVNode(Item, {
44292
44399
  "key": typeof item === "object" ? item.uid : item,
44293
- "it": item,
44400
+ "row": item,
44294
44401
  "disabled": props2.disabled,
44295
44402
  "image-preview-options": props2.imagePreviewOptions,
44296
44403
  "imageClass": props2.imageClass,
@@ -44298,18 +44405,19 @@
44298
44405
  "audioClass": props2.audioClass,
44299
44406
  "fileClass": props2.fileClass,
44300
44407
  "index": index,
44301
- "data": item,
44408
+ "keyValue": props2.keyValue,
44409
+ "data": base.currentValue.value[picker.type],
44302
44410
  "class": "vc-upload-picker__item",
44303
44411
  "onDelete": () => base.handleDelete(index, picker.type)
44304
44412
  }, {
44305
- default: (scopeData) => {
44306
- return slots.default ? slots.default({
44413
+ default: slots.default ? (scopeData) => {
44414
+ return slots?.default?.({
44307
44415
  it: scopeData?.it,
44308
44416
  current: scopeData?.current,
44309
44417
  index,
44310
44418
  name: picker.type
44311
- }) : scopeData;
44312
- }
44419
+ });
44420
+ } : null
44313
44421
  });
44314
44422
  }), vue.withDirectives(vue.createVNode(Upload, vue.mergeProps(base.currentUploadOptions.value[picker.type], {
44315
44423
  "max": base.dynamicMax[picker.type],