@tmagic/element-plus-adapter 1.7.0-beta.4 → 1.7.0-beta.5

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.
@@ -1,2279 +1,10 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('element-plus')) :
3
- typeof define === 'function' && define.amd ? define(['element-plus'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TMagicElementPlusAdapter = factory(global.ElementPlus));
5
- })(this, (function (elementPlus) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('element-plus'), require('vue')) :
3
+ typeof define === 'function' && define.amd ? define(['element-plus', 'vue'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.TMagicElementPlusAdapter = factory(global.ElementPlus, global.Vue));
5
+ })(this, (function (elementPlus, vue) { 'use strict';
6
6
 
7
- /**
8
- * @vue/shared v3.5.24
9
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
10
- * @license MIT
11
- **/
12
- // @__NO_SIDE_EFFECTS__
13
- function makeMap(str) {
14
- const map = /* @__PURE__ */ Object.create(null);
15
- for (const key of str.split(",")) map[key] = 1;
16
- return (val) => val in map;
17
- }
18
-
19
- const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
20
- const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
21
- const NOOP = () => {
22
- };
23
- const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
24
- (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
25
- const extend = Object.assign;
26
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
27
- const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
28
- const isArray = Array.isArray;
29
- const isMap = (val) => toTypeString(val) === "[object Map]";
30
- const isFunction = (val) => typeof val === "function";
31
- const isString = (val) => typeof val === "string";
32
- const isSymbol = (val) => typeof val === "symbol";
33
- const isObject = (val) => val !== null && typeof val === "object";
34
- const objectToString = Object.prototype.toString;
35
- const toTypeString = (value) => objectToString.call(value);
36
- const toRawType = (value) => {
37
- return toTypeString(value).slice(8, -1);
38
- };
39
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
40
- const cacheStringFunction = (fn) => {
41
- const cache = /* @__PURE__ */ Object.create(null);
42
- return ((str) => {
43
- const hit = cache[str];
44
- return hit || (cache[str] = fn(str));
45
- });
46
- };
47
- const camelizeRE = /-\w/g;
48
- const camelize = cacheStringFunction(
49
- (str) => {
50
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
51
- }
52
- );
53
- const capitalize = cacheStringFunction((str) => {
54
- return str.charAt(0).toUpperCase() + str.slice(1);
55
- });
56
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
57
- let _globalThis;
58
- const getGlobalThis = () => {
59
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
60
- };
61
-
62
- function normalizeStyle(value) {
63
- if (isArray(value)) {
64
- const res = {};
65
- for (let i = 0; i < value.length; i++) {
66
- const item = value[i];
67
- const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
68
- if (normalized) {
69
- for (const key in normalized) {
70
- res[key] = normalized[key];
71
- }
72
- }
73
- }
74
- return res;
75
- } else if (isString(value) || isObject(value)) {
76
- return value;
77
- }
78
- }
79
- const listDelimiterRE = /;(?![^(]*\))/g;
80
- const propertyDelimiterRE = /:([^]+)/;
81
- const styleCommentRE = /\/\*[^]*?\*\//g;
82
- function parseStringStyle(cssText) {
83
- const ret = {};
84
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
85
- if (item) {
86
- const tmp = item.split(propertyDelimiterRE);
87
- tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
88
- }
89
- });
90
- return ret;
91
- }
92
- function normalizeClass(value) {
93
- let res = "";
94
- if (isString(value)) {
95
- res = value;
96
- } else if (isArray(value)) {
97
- for (let i = 0; i < value.length; i++) {
98
- const normalized = normalizeClass(value[i]);
99
- if (normalized) {
100
- res += normalized + " ";
101
- }
102
- }
103
- } else if (isObject(value)) {
104
- for (const name in value) {
105
- if (value[name]) {
106
- res += name + " ";
107
- }
108
- }
109
- }
110
- return res.trim();
111
- }
112
-
113
- /**
114
- * @vue/reactivity v3.5.24
115
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
116
- * @license MIT
117
- **/
118
-
119
- function warn(msg, ...args) {
120
- console.warn(`[Vue warn] ${msg}`, ...args);
121
- }
122
- let batchDepth = 0;
123
- let batchedSub;
124
- function startBatch() {
125
- batchDepth++;
126
- }
127
- function endBatch() {
128
- if (--batchDepth > 0) {
129
- return;
130
- }
131
- let error;
132
- while (batchedSub) {
133
- let e = batchedSub;
134
- batchedSub = void 0;
135
- while (e) {
136
- const next = e.next;
137
- e.next = void 0;
138
- e.flags &= -9;
139
- if (e.flags & 1) {
140
- try {
141
- ;
142
- e.trigger();
143
- } catch (err) {
144
- if (!error) error = err;
145
- }
146
- }
147
- e = next;
148
- }
149
- }
150
- if (error) throw error;
151
- }
152
- class Dep {
153
- // TODO isolatedDeclarations "__v_skip"
154
- constructor(computed) {
155
- this.computed = computed;
156
- this.version = 0;
157
- /**
158
- * Link between this dep and the current active effect
159
- */
160
- this.activeLink = void 0;
161
- /**
162
- * Doubly linked list representing the subscribing effects (tail)
163
- */
164
- this.subs = void 0;
165
- /**
166
- * For object property deps cleanup
167
- */
168
- this.map = void 0;
169
- this.key = void 0;
170
- /**
171
- * Subscriber counter
172
- */
173
- this.sc = 0;
174
- /**
175
- * @internal
176
- */
177
- this.__v_skip = true;
178
- if (!!(process.env.NODE_ENV !== "production")) {
179
- this.subsHead = void 0;
180
- }
181
- }
182
- track(debugInfo) {
183
- {
184
- return;
185
- }
186
- }
187
- trigger(debugInfo) {
188
- this.version++;
189
- this.notify(debugInfo);
190
- }
191
- notify(debugInfo) {
192
- startBatch();
193
- try {
194
- if (!!(process.env.NODE_ENV !== "production")) {
195
- for (let head = this.subsHead; head; head = head.nextSub) {
196
- if (head.sub.onTrigger && !(head.sub.flags & 8)) {
197
- head.sub.onTrigger(
198
- extend(
199
- {
200
- effect: head.sub
201
- },
202
- debugInfo
203
- )
204
- );
205
- }
206
- }
207
- }
208
- for (let link = this.subs; link; link = link.prevSub) {
209
- if (link.sub.notify()) {
210
- ;
211
- link.sub.dep.notify();
212
- }
213
- }
214
- } finally {
215
- endBatch();
216
- }
217
- }
218
- }
219
- const targetMap = /* @__PURE__ */ new WeakMap();
220
- const ITERATE_KEY = Symbol(
221
- !!(process.env.NODE_ENV !== "production") ? "Object iterate" : ""
222
- );
223
- const MAP_KEY_ITERATE_KEY = Symbol(
224
- !!(process.env.NODE_ENV !== "production") ? "Map keys iterate" : ""
225
- );
226
- const ARRAY_ITERATE_KEY = Symbol(
227
- !!(process.env.NODE_ENV !== "production") ? "Array iterate" : ""
228
- );
229
- function track(target, type, key) {
230
- }
231
- function trigger(target, type, key, newValue, oldValue, oldTarget) {
232
- const depsMap = targetMap.get(target);
233
- if (!depsMap) {
234
- return;
235
- }
236
- const run = (dep) => {
237
- if (dep) {
238
- if (!!(process.env.NODE_ENV !== "production")) {
239
- dep.trigger({
240
- target,
241
- type,
242
- key,
243
- newValue,
244
- oldValue,
245
- oldTarget
246
- });
247
- } else {
248
- dep.trigger();
249
- }
250
- }
251
- };
252
- startBatch();
253
- if (type === "clear") {
254
- depsMap.forEach(run);
255
- } else {
256
- const targetIsArray = isArray(target);
257
- const isArrayIndex = targetIsArray && isIntegerKey(key);
258
- if (targetIsArray && key === "length") {
259
- const newLength = Number(newValue);
260
- depsMap.forEach((dep, key2) => {
261
- if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
262
- run(dep);
263
- }
264
- });
265
- } else {
266
- if (key !== void 0 || depsMap.has(void 0)) {
267
- run(depsMap.get(key));
268
- }
269
- if (isArrayIndex) {
270
- run(depsMap.get(ARRAY_ITERATE_KEY));
271
- }
272
- switch (type) {
273
- case "add":
274
- if (!targetIsArray) {
275
- run(depsMap.get(ITERATE_KEY));
276
- if (isMap(target)) {
277
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
278
- }
279
- } else if (isArrayIndex) {
280
- run(depsMap.get("length"));
281
- }
282
- break;
283
- case "delete":
284
- if (!targetIsArray) {
285
- run(depsMap.get(ITERATE_KEY));
286
- if (isMap(target)) {
287
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
288
- }
289
- }
290
- break;
291
- case "set":
292
- if (isMap(target)) {
293
- run(depsMap.get(ITERATE_KEY));
294
- }
295
- break;
296
- }
297
- }
298
- }
299
- endBatch();
300
- }
301
-
302
- function reactiveReadArray(array) {
303
- const raw = toRaw(array);
304
- if (raw === array) return raw;
305
- return isShallow(array) ? raw : raw.map(toReactive);
306
- }
307
- function shallowReadArray(arr) {
308
- track(arr = toRaw(arr));
309
- return arr;
310
- }
311
- const arrayInstrumentations = {
312
- __proto__: null,
313
- [Symbol.iterator]() {
314
- return iterator(this, Symbol.iterator, toReactive);
315
- },
316
- concat(...args) {
317
- return reactiveReadArray(this).concat(
318
- ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
319
- );
320
- },
321
- entries() {
322
- return iterator(this, "entries", (value) => {
323
- value[1] = toReactive(value[1]);
324
- return value;
325
- });
326
- },
327
- every(fn, thisArg) {
328
- return apply(this, "every", fn, thisArg, void 0, arguments);
329
- },
330
- filter(fn, thisArg) {
331
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
332
- },
333
- find(fn, thisArg) {
334
- return apply(this, "find", fn, thisArg, toReactive, arguments);
335
- },
336
- findIndex(fn, thisArg) {
337
- return apply(this, "findIndex", fn, thisArg, void 0, arguments);
338
- },
339
- findLast(fn, thisArg) {
340
- return apply(this, "findLast", fn, thisArg, toReactive, arguments);
341
- },
342
- findLastIndex(fn, thisArg) {
343
- return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
344
- },
345
- // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
346
- forEach(fn, thisArg) {
347
- return apply(this, "forEach", fn, thisArg, void 0, arguments);
348
- },
349
- includes(...args) {
350
- return searchProxy(this, "includes", args);
351
- },
352
- indexOf(...args) {
353
- return searchProxy(this, "indexOf", args);
354
- },
355
- join(separator) {
356
- return reactiveReadArray(this).join(separator);
357
- },
358
- // keys() iterator only reads `length`, no optimization required
359
- lastIndexOf(...args) {
360
- return searchProxy(this, "lastIndexOf", args);
361
- },
362
- map(fn, thisArg) {
363
- return apply(this, "map", fn, thisArg, void 0, arguments);
364
- },
365
- pop() {
366
- return noTracking(this, "pop");
367
- },
368
- push(...args) {
369
- return noTracking(this, "push", args);
370
- },
371
- reduce(fn, ...args) {
372
- return reduce(this, "reduce", fn, args);
373
- },
374
- reduceRight(fn, ...args) {
375
- return reduce(this, "reduceRight", fn, args);
376
- },
377
- shift() {
378
- return noTracking(this, "shift");
379
- },
380
- // slice could use ARRAY_ITERATE but also seems to beg for range tracking
381
- some(fn, thisArg) {
382
- return apply(this, "some", fn, thisArg, void 0, arguments);
383
- },
384
- splice(...args) {
385
- return noTracking(this, "splice", args);
386
- },
387
- toReversed() {
388
- return reactiveReadArray(this).toReversed();
389
- },
390
- toSorted(comparer) {
391
- return reactiveReadArray(this).toSorted(comparer);
392
- },
393
- toSpliced(...args) {
394
- return reactiveReadArray(this).toSpliced(...args);
395
- },
396
- unshift(...args) {
397
- return noTracking(this, "unshift", args);
398
- },
399
- values() {
400
- return iterator(this, "values", toReactive);
401
- }
402
- };
403
- function iterator(self, method, wrapValue) {
404
- const arr = shallowReadArray(self);
405
- const iter = arr[method]();
406
- if (arr !== self && !isShallow(self)) {
407
- iter._next = iter.next;
408
- iter.next = () => {
409
- const result = iter._next();
410
- if (!result.done) {
411
- result.value = wrapValue(result.value);
412
- }
413
- return result;
414
- };
415
- }
416
- return iter;
417
- }
418
- const arrayProto = Array.prototype;
419
- function apply(self, method, fn, thisArg, wrappedRetFn, args) {
420
- const arr = shallowReadArray(self);
421
- const needsWrap = arr !== self && !isShallow(self);
422
- const methodFn = arr[method];
423
- if (methodFn !== arrayProto[method]) {
424
- const result2 = methodFn.apply(self, args);
425
- return needsWrap ? toReactive(result2) : result2;
426
- }
427
- let wrappedFn = fn;
428
- if (arr !== self) {
429
- if (needsWrap) {
430
- wrappedFn = function(item, index) {
431
- return fn.call(this, toReactive(item), index, self);
432
- };
433
- } else if (fn.length > 2) {
434
- wrappedFn = function(item, index) {
435
- return fn.call(this, item, index, self);
436
- };
437
- }
438
- }
439
- const result = methodFn.call(arr, wrappedFn, thisArg);
440
- return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
441
- }
442
- function reduce(self, method, fn, args) {
443
- const arr = shallowReadArray(self);
444
- let wrappedFn = fn;
445
- if (arr !== self) {
446
- if (!isShallow(self)) {
447
- wrappedFn = function(acc, item, index) {
448
- return fn.call(this, acc, toReactive(item), index, self);
449
- };
450
- } else if (fn.length > 3) {
451
- wrappedFn = function(acc, item, index) {
452
- return fn.call(this, acc, item, index, self);
453
- };
454
- }
455
- }
456
- return arr[method](wrappedFn, ...args);
457
- }
458
- function searchProxy(self, method, args) {
459
- const arr = toRaw(self);
460
- const res = arr[method](...args);
461
- if ((res === -1 || res === false) && isProxy(args[0])) {
462
- args[0] = toRaw(args[0]);
463
- return arr[method](...args);
464
- }
465
- return res;
466
- }
467
- function noTracking(self, method, args = []) {
468
- startBatch();
469
- const res = toRaw(self)[method].apply(self, args);
470
- endBatch();
471
- return res;
472
- }
473
-
474
- const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
475
- const builtInSymbols = new Set(
476
- /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
477
- );
478
- function hasOwnProperty(key) {
479
- if (!isSymbol(key)) key = String(key);
480
- const obj = toRaw(this);
481
- return obj.hasOwnProperty(key);
482
- }
483
- class BaseReactiveHandler {
484
- constructor(_isReadonly = false, _isShallow = false) {
485
- this._isReadonly = _isReadonly;
486
- this._isShallow = _isShallow;
487
- }
488
- get(target, key, receiver) {
489
- if (key === "__v_skip") return target["__v_skip"];
490
- const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
491
- if (key === "__v_isReactive") {
492
- return !isReadonly2;
493
- } else if (key === "__v_isReadonly") {
494
- return isReadonly2;
495
- } else if (key === "__v_isShallow") {
496
- return isShallow2;
497
- } else if (key === "__v_raw") {
498
- if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
499
- // this means the receiver is a user proxy of the reactive proxy
500
- Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
501
- return target;
502
- }
503
- return;
504
- }
505
- const targetIsArray = isArray(target);
506
- if (!isReadonly2) {
507
- let fn;
508
- if (targetIsArray && (fn = arrayInstrumentations[key])) {
509
- return fn;
510
- }
511
- if (key === "hasOwnProperty") {
512
- return hasOwnProperty;
513
- }
514
- }
515
- const res = Reflect.get(
516
- target,
517
- key,
518
- // if this is a proxy wrapping a ref, return methods using the raw ref
519
- // as receiver so that we don't have to call `toRaw` on the ref in all
520
- // its class methods
521
- isRef(target) ? target : receiver
522
- );
523
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
524
- return res;
525
- }
526
- if (isShallow2) {
527
- return res;
528
- }
529
- if (isRef(res)) {
530
- const value = targetIsArray && isIntegerKey(key) ? res : res.value;
531
- return isReadonly2 && isObject(value) ? readonly(value) : value;
532
- }
533
- if (isObject(res)) {
534
- return isReadonly2 ? readonly(res) : reactive(res);
535
- }
536
- return res;
537
- }
538
- }
539
- class MutableReactiveHandler extends BaseReactiveHandler {
540
- constructor(isShallow2 = false) {
541
- super(false, isShallow2);
542
- }
543
- set(target, key, value, receiver) {
544
- let oldValue = target[key];
545
- if (!this._isShallow) {
546
- const isOldValueReadonly = isReadonly(oldValue);
547
- if (!isShallow(value) && !isReadonly(value)) {
548
- oldValue = toRaw(oldValue);
549
- value = toRaw(value);
550
- }
551
- if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
552
- if (isOldValueReadonly) {
553
- if (!!(process.env.NODE_ENV !== "production")) {
554
- warn(
555
- `Set operation on key "${String(key)}" failed: target is readonly.`,
556
- target[key]
557
- );
558
- }
559
- return true;
560
- } else {
561
- oldValue.value = value;
562
- return true;
563
- }
564
- }
565
- }
566
- const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
567
- const result = Reflect.set(
568
- target,
569
- key,
570
- value,
571
- isRef(target) ? target : receiver
572
- );
573
- if (target === toRaw(receiver)) {
574
- if (!hadKey) {
575
- trigger(target, "add", key, value);
576
- } else if (hasChanged(value, oldValue)) {
577
- trigger(target, "set", key, value, oldValue);
578
- }
579
- }
580
- return result;
581
- }
582
- deleteProperty(target, key) {
583
- const hadKey = hasOwn(target, key);
584
- const oldValue = target[key];
585
- const result = Reflect.deleteProperty(target, key);
586
- if (result && hadKey) {
587
- trigger(target, "delete", key, void 0, oldValue);
588
- }
589
- return result;
590
- }
591
- has(target, key) {
592
- const result = Reflect.has(target, key);
593
- if (!isSymbol(key) || !builtInSymbols.has(key)) ;
594
- return result;
595
- }
596
- ownKeys(target) {
597
- return Reflect.ownKeys(target);
598
- }
599
- }
600
- class ReadonlyReactiveHandler extends BaseReactiveHandler {
601
- constructor(isShallow2 = false) {
602
- super(true, isShallow2);
603
- }
604
- set(target, key) {
605
- if (!!(process.env.NODE_ENV !== "production")) {
606
- warn(
607
- `Set operation on key "${String(key)}" failed: target is readonly.`,
608
- target
609
- );
610
- }
611
- return true;
612
- }
613
- deleteProperty(target, key) {
614
- if (!!(process.env.NODE_ENV !== "production")) {
615
- warn(
616
- `Delete operation on key "${String(key)}" failed: target is readonly.`,
617
- target
618
- );
619
- }
620
- return true;
621
- }
622
- }
623
- const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
624
- const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
625
-
626
- const toShallow = (value) => value;
627
- const getProto = (v) => Reflect.getPrototypeOf(v);
628
- function createIterableMethod(method, isReadonly2, isShallow2) {
629
- return function(...args) {
630
- const target = this["__v_raw"];
631
- const rawTarget = toRaw(target);
632
- const targetIsMap = isMap(rawTarget);
633
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
634
- const innerIterator = target[method](...args);
635
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
636
- return {
637
- // iterator protocol
638
- next() {
639
- const { value, done } = innerIterator.next();
640
- return done ? { value, done } : {
641
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
642
- done
643
- };
644
- },
645
- // iterable protocol
646
- [Symbol.iterator]() {
647
- return this;
648
- }
649
- };
650
- };
651
- }
652
- function createReadonlyMethod(type) {
653
- return function(...args) {
654
- if (!!(process.env.NODE_ENV !== "production")) {
655
- const key = args[0] ? `on key "${args[0]}" ` : ``;
656
- warn(
657
- `${capitalize(type)} operation ${key}failed: target is readonly.`,
658
- toRaw(this)
659
- );
660
- }
661
- return type === "delete" ? false : type === "clear" ? void 0 : this;
662
- };
663
- }
664
- function createInstrumentations(readonly, shallow) {
665
- const instrumentations = {
666
- get(key) {
667
- const target = this["__v_raw"];
668
- const rawTarget = toRaw(target);
669
- const rawKey = toRaw(key);
670
- const { has } = getProto(rawTarget);
671
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
672
- if (has.call(rawTarget, key)) {
673
- return wrap(target.get(key));
674
- } else if (has.call(rawTarget, rawKey)) {
675
- return wrap(target.get(rawKey));
676
- } else if (target !== rawTarget) {
677
- target.get(key);
678
- }
679
- },
680
- get size() {
681
- const target = this["__v_raw"];
682
- !readonly && track(toRaw(target));
683
- return target.size;
684
- },
685
- has(key) {
686
- const target = this["__v_raw"];
687
- toRaw(target);
688
- const rawKey = toRaw(key);
689
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
690
- },
691
- forEach(callback, thisArg) {
692
- const observed = this;
693
- const target = observed["__v_raw"];
694
- toRaw(target);
695
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
696
- return target.forEach((value, key) => {
697
- return callback.call(thisArg, wrap(value), wrap(key), observed);
698
- });
699
- }
700
- };
701
- extend(
702
- instrumentations,
703
- readonly ? {
704
- add: createReadonlyMethod("add"),
705
- set: createReadonlyMethod("set"),
706
- delete: createReadonlyMethod("delete"),
707
- clear: createReadonlyMethod("clear")
708
- } : {
709
- add(value) {
710
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
711
- value = toRaw(value);
712
- }
713
- const target = toRaw(this);
714
- const proto = getProto(target);
715
- const hadKey = proto.has.call(target, value);
716
- if (!hadKey) {
717
- target.add(value);
718
- trigger(target, "add", value, value);
719
- }
720
- return this;
721
- },
722
- set(key, value) {
723
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
724
- value = toRaw(value);
725
- }
726
- const target = toRaw(this);
727
- const { has, get } = getProto(target);
728
- let hadKey = has.call(target, key);
729
- if (!hadKey) {
730
- key = toRaw(key);
731
- hadKey = has.call(target, key);
732
- } else if (!!(process.env.NODE_ENV !== "production")) {
733
- checkIdentityKeys(target, has, key);
734
- }
735
- const oldValue = get.call(target, key);
736
- target.set(key, value);
737
- if (!hadKey) {
738
- trigger(target, "add", key, value);
739
- } else if (hasChanged(value, oldValue)) {
740
- trigger(target, "set", key, value, oldValue);
741
- }
742
- return this;
743
- },
744
- delete(key) {
745
- const target = toRaw(this);
746
- const { has, get } = getProto(target);
747
- let hadKey = has.call(target, key);
748
- if (!hadKey) {
749
- key = toRaw(key);
750
- hadKey = has.call(target, key);
751
- } else if (!!(process.env.NODE_ENV !== "production")) {
752
- checkIdentityKeys(target, has, key);
753
- }
754
- const oldValue = get ? get.call(target, key) : void 0;
755
- const result = target.delete(key);
756
- if (hadKey) {
757
- trigger(target, "delete", key, void 0, oldValue);
758
- }
759
- return result;
760
- },
761
- clear() {
762
- const target = toRaw(this);
763
- const hadItems = target.size !== 0;
764
- const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0;
765
- const result = target.clear();
766
- if (hadItems) {
767
- trigger(
768
- target,
769
- "clear",
770
- void 0,
771
- void 0,
772
- oldTarget
773
- );
774
- }
775
- return result;
776
- }
777
- }
778
- );
779
- const iteratorMethods = [
780
- "keys",
781
- "values",
782
- "entries",
783
- Symbol.iterator
784
- ];
785
- iteratorMethods.forEach((method) => {
786
- instrumentations[method] = createIterableMethod(method, readonly, shallow);
787
- });
788
- return instrumentations;
789
- }
790
- function createInstrumentationGetter(isReadonly2, shallow) {
791
- const instrumentations = createInstrumentations(isReadonly2, shallow);
792
- return (target, key, receiver) => {
793
- if (key === "__v_isReactive") {
794
- return !isReadonly2;
795
- } else if (key === "__v_isReadonly") {
796
- return isReadonly2;
797
- } else if (key === "__v_raw") {
798
- return target;
799
- }
800
- return Reflect.get(
801
- hasOwn(instrumentations, key) && key in target ? instrumentations : target,
802
- key,
803
- receiver
804
- );
805
- };
806
- }
807
- const mutableCollectionHandlers = {
808
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
809
- };
810
- const readonlyCollectionHandlers = {
811
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
812
- };
813
- function checkIdentityKeys(target, has, key) {
814
- const rawKey = toRaw(key);
815
- if (rawKey !== key && has.call(target, rawKey)) {
816
- const type = toRawType(target);
817
- warn(
818
- `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
819
- );
820
- }
821
- }
822
-
823
- const reactiveMap = /* @__PURE__ */ new WeakMap();
824
- const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
825
- const readonlyMap = /* @__PURE__ */ new WeakMap();
826
- const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
827
- function targetTypeMap(rawType) {
828
- switch (rawType) {
829
- case "Object":
830
- case "Array":
831
- return 1 /* COMMON */;
832
- case "Map":
833
- case "Set":
834
- case "WeakMap":
835
- case "WeakSet":
836
- return 2 /* COLLECTION */;
837
- default:
838
- return 0 /* INVALID */;
839
- }
840
- }
841
- function getTargetType(value) {
842
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
843
- }
844
- function reactive(target) {
845
- if (isReadonly(target)) {
846
- return target;
847
- }
848
- return createReactiveObject(
849
- target,
850
- false,
851
- mutableHandlers,
852
- mutableCollectionHandlers,
853
- reactiveMap
854
- );
855
- }
856
- function readonly(target) {
857
- return createReactiveObject(
858
- target,
859
- true,
860
- readonlyHandlers,
861
- readonlyCollectionHandlers,
862
- readonlyMap
863
- );
864
- }
865
- function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
866
- if (!isObject(target)) {
867
- if (!!(process.env.NODE_ENV !== "production")) {
868
- warn(
869
- `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
870
- target
871
- )}`
872
- );
873
- }
874
- return target;
875
- }
876
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
877
- return target;
878
- }
879
- const targetType = getTargetType(target);
880
- if (targetType === 0 /* INVALID */) {
881
- return target;
882
- }
883
- const existingProxy = proxyMap.get(target);
884
- if (existingProxy) {
885
- return existingProxy;
886
- }
887
- const proxy = new Proxy(
888
- target,
889
- targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
890
- );
891
- proxyMap.set(target, proxy);
892
- return proxy;
893
- }
894
- function isReactive(value) {
895
- if (isReadonly(value)) {
896
- return isReactive(value["__v_raw"]);
897
- }
898
- return !!(value && value["__v_isReactive"]);
899
- }
900
- function isReadonly(value) {
901
- return !!(value && value["__v_isReadonly"]);
902
- }
903
- function isShallow(value) {
904
- return !!(value && value["__v_isShallow"]);
905
- }
906
- function isProxy(value) {
907
- return value ? !!value["__v_raw"] : false;
908
- }
909
- function toRaw(observed) {
910
- const raw = observed && observed["__v_raw"];
911
- return raw ? toRaw(raw) : observed;
912
- }
913
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
914
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
915
-
916
- function isRef(r) {
917
- return r ? r["__v_isRef"] === true : false;
918
- }
919
- function shallowRef(value) {
920
- return createRef(value, true);
921
- }
922
- function createRef(rawValue, shallow) {
923
- if (isRef(rawValue)) {
924
- return rawValue;
925
- }
926
- return new RefImpl(rawValue, shallow);
927
- }
928
- class RefImpl {
929
- constructor(value, isShallow2) {
930
- this.dep = new Dep();
931
- this["__v_isRef"] = true;
932
- this["__v_isShallow"] = false;
933
- this._rawValue = isShallow2 ? value : toRaw(value);
934
- this._value = isShallow2 ? value : toReactive(value);
935
- this["__v_isShallow"] = isShallow2;
936
- }
937
- get value() {
938
- if (!!(process.env.NODE_ENV !== "production")) {
939
- this.dep.track({
940
- target: this,
941
- type: "get",
942
- key: "value"
943
- });
944
- } else {
945
- this.dep.track();
946
- }
947
- return this._value;
948
- }
949
- set value(newValue) {
950
- const oldValue = this._rawValue;
951
- const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
952
- newValue = useDirectValue ? newValue : toRaw(newValue);
953
- if (hasChanged(newValue, oldValue)) {
954
- this._rawValue = newValue;
955
- this._value = useDirectValue ? newValue : toReactive(newValue);
956
- if (!!(process.env.NODE_ENV !== "production")) {
957
- this.dep.trigger({
958
- target: this,
959
- type: "set",
960
- key: "value",
961
- newValue,
962
- oldValue
963
- });
964
- } else {
965
- this.dep.trigger();
966
- }
967
- }
968
- }
969
- }
970
- function unref(ref2) {
971
- return isRef(ref2) ? ref2.value : ref2;
972
- }
973
-
974
- /**
975
- * @vue/runtime-core v3.5.24
976
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
977
- * @license MIT
978
- **/
979
- const stack = [];
980
- function pushWarningContext(vnode) {
981
- stack.push(vnode);
982
- }
983
- function popWarningContext() {
984
- stack.pop();
985
- }
986
- let isWarning = false;
987
- function warn$1(msg, ...args) {
988
- if (isWarning) return;
989
- isWarning = true;
990
- const instance = stack.length ? stack[stack.length - 1].component : null;
991
- const appWarnHandler = instance && instance.appContext.config.warnHandler;
992
- const trace = getComponentTrace();
993
- if (appWarnHandler) {
994
- callWithErrorHandling(
995
- appWarnHandler,
996
- instance,
997
- 11,
998
- [
999
- // eslint-disable-next-line no-restricted-syntax
1000
- msg + args.map((a) => {
1001
- var _a, _b;
1002
- return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
1003
- }).join(""),
1004
- instance && instance.proxy,
1005
- trace.map(
1006
- ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
1007
- ).join("\n"),
1008
- trace
1009
- ]
1010
- );
1011
- } else {
1012
- const warnArgs = [`[Vue warn]: ${msg}`, ...args];
1013
- if (trace.length && // avoid spamming console during tests
1014
- true) {
1015
- warnArgs.push(`
1016
- `, ...formatTrace(trace));
1017
- }
1018
- console.warn(...warnArgs);
1019
- }
1020
- isWarning = false;
1021
- }
1022
- function getComponentTrace() {
1023
- let currentVNode = stack[stack.length - 1];
1024
- if (!currentVNode) {
1025
- return [];
1026
- }
1027
- const normalizedStack = [];
1028
- while (currentVNode) {
1029
- const last = normalizedStack[0];
1030
- if (last && last.vnode === currentVNode) {
1031
- last.recurseCount++;
1032
- } else {
1033
- normalizedStack.push({
1034
- vnode: currentVNode,
1035
- recurseCount: 0
1036
- });
1037
- }
1038
- const parentInstance = currentVNode.component && currentVNode.component.parent;
1039
- currentVNode = parentInstance && parentInstance.vnode;
1040
- }
1041
- return normalizedStack;
1042
- }
1043
- function formatTrace(trace) {
1044
- const logs = [];
1045
- trace.forEach((entry, i) => {
1046
- logs.push(...i === 0 ? [] : [`
1047
- `], ...formatTraceEntry(entry));
1048
- });
1049
- return logs;
1050
- }
1051
- function formatTraceEntry({ vnode, recurseCount }) {
1052
- const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
1053
- const isRoot = vnode.component ? vnode.component.parent == null : false;
1054
- const open = ` at <${formatComponentName(
1055
- vnode.component,
1056
- vnode.type,
1057
- isRoot
1058
- )}`;
1059
- const close = `>` + postfix;
1060
- return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
1061
- }
1062
- function formatProps(props) {
1063
- const res = [];
1064
- const keys = Object.keys(props);
1065
- keys.slice(0, 3).forEach((key) => {
1066
- res.push(...formatProp(key, props[key]));
1067
- });
1068
- if (keys.length > 3) {
1069
- res.push(` ...`);
1070
- }
1071
- return res;
1072
- }
1073
- function formatProp(key, value, raw) {
1074
- if (isString(value)) {
1075
- value = JSON.stringify(value);
1076
- return raw ? value : [`${key}=${value}`];
1077
- } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
1078
- return raw ? value : [`${key}=${value}`];
1079
- } else if (isRef(value)) {
1080
- value = formatProp(key, toRaw(value.value), true);
1081
- return raw ? value : [`${key}=Ref<`, value, `>`];
1082
- } else if (isFunction(value)) {
1083
- return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
1084
- } else {
1085
- value = toRaw(value);
1086
- return raw ? value : [`${key}=`, value];
1087
- }
1088
- }
1089
- const ErrorTypeStrings$1 = {
1090
- ["sp"]: "serverPrefetch hook",
1091
- ["bc"]: "beforeCreate hook",
1092
- ["c"]: "created hook",
1093
- ["bm"]: "beforeMount hook",
1094
- ["m"]: "mounted hook",
1095
- ["bu"]: "beforeUpdate hook",
1096
- ["u"]: "updated",
1097
- ["bum"]: "beforeUnmount hook",
1098
- ["um"]: "unmounted hook",
1099
- ["a"]: "activated hook",
1100
- ["da"]: "deactivated hook",
1101
- ["ec"]: "errorCaptured hook",
1102
- ["rtc"]: "renderTracked hook",
1103
- ["rtg"]: "renderTriggered hook",
1104
- [0]: "setup function",
1105
- [1]: "render function",
1106
- [2]: "watcher getter",
1107
- [3]: "watcher callback",
1108
- [4]: "watcher cleanup function",
1109
- [5]: "native event handler",
1110
- [6]: "component event handler",
1111
- [7]: "vnode hook",
1112
- [8]: "directive hook",
1113
- [9]: "transition hook",
1114
- [10]: "app errorHandler",
1115
- [11]: "app warnHandler",
1116
- [12]: "ref function",
1117
- [13]: "async component loader",
1118
- [14]: "scheduler flush",
1119
- [15]: "component update",
1120
- [16]: "app unmount cleanup function"
1121
- };
1122
- function callWithErrorHandling(fn, instance, type, args) {
1123
- try {
1124
- return args ? fn(...args) : fn();
1125
- } catch (err) {
1126
- handleError(err, instance, type);
1127
- }
1128
- }
1129
- function handleError(err, instance, type, throwInDev = true) {
1130
- const contextVNode = instance ? instance.vnode : null;
1131
- const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
1132
- if (instance) {
1133
- let cur = instance.parent;
1134
- const exposedInstance = instance.proxy;
1135
- const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
1136
- while (cur) {
1137
- const errorCapturedHooks = cur.ec;
1138
- if (errorCapturedHooks) {
1139
- for (let i = 0; i < errorCapturedHooks.length; i++) {
1140
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
1141
- return;
1142
- }
1143
- }
1144
- }
1145
- cur = cur.parent;
1146
- }
1147
- if (errorHandler) {
1148
- callWithErrorHandling(errorHandler, null, 10, [
1149
- err,
1150
- exposedInstance,
1151
- errorInfo
1152
- ]);
1153
- return;
1154
- }
1155
- }
1156
- logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
1157
- }
1158
- function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
1159
- if (!!(process.env.NODE_ENV !== "production")) {
1160
- const info = ErrorTypeStrings$1[type];
1161
- if (contextVNode) {
1162
- pushWarningContext(contextVNode);
1163
- }
1164
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1165
- if (contextVNode) {
1166
- popWarningContext();
1167
- }
1168
- if (throwInDev) {
1169
- throw err;
1170
- } else {
1171
- console.error(err);
1172
- }
1173
- } else if (throwInProd) {
1174
- throw err;
1175
- } else {
1176
- console.error(err);
1177
- }
1178
- }
1179
- const queue = [];
1180
- let flushIndex = -1;
1181
- const pendingPostFlushCbs = [];
1182
- let activePostFlushCbs = null;
1183
- let postFlushIndex = 0;
1184
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
1185
- let currentFlushPromise = null;
1186
- const RECURSION_LIMIT = 100;
1187
- function findInsertionIndex(id) {
1188
- let start = flushIndex + 1;
1189
- let end = queue.length;
1190
- while (start < end) {
1191
- const middle = start + end >>> 1;
1192
- const middleJob = queue[middle];
1193
- const middleJobId = getId(middleJob);
1194
- if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
1195
- start = middle + 1;
1196
- } else {
1197
- end = middle;
1198
- }
1199
- }
1200
- return start;
1201
- }
1202
- function queueJob(job) {
1203
- if (!(job.flags & 1)) {
1204
- const jobId = getId(job);
1205
- const lastJob = queue[queue.length - 1];
1206
- if (!lastJob || // fast path when the job id is larger than the tail
1207
- !(job.flags & 2) && jobId >= getId(lastJob)) {
1208
- queue.push(job);
1209
- } else {
1210
- queue.splice(findInsertionIndex(jobId), 0, job);
1211
- }
1212
- job.flags |= 1;
1213
- queueFlush();
1214
- }
1215
- }
1216
- function queueFlush() {
1217
- if (!currentFlushPromise) {
1218
- currentFlushPromise = resolvedPromise.then(flushJobs);
1219
- }
1220
- }
1221
- function queuePostFlushCb(cb) {
1222
- if (!isArray(cb)) {
1223
- if (activePostFlushCbs && cb.id === -1) {
1224
- activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
1225
- } else if (!(cb.flags & 1)) {
1226
- pendingPostFlushCbs.push(cb);
1227
- cb.flags |= 1;
1228
- }
1229
- } else {
1230
- pendingPostFlushCbs.push(...cb);
1231
- }
1232
- queueFlush();
1233
- }
1234
- function flushPostFlushCbs(seen) {
1235
- if (pendingPostFlushCbs.length) {
1236
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
1237
- (a, b) => getId(a) - getId(b)
1238
- );
1239
- pendingPostFlushCbs.length = 0;
1240
- if (activePostFlushCbs) {
1241
- activePostFlushCbs.push(...deduped);
1242
- return;
1243
- }
1244
- activePostFlushCbs = deduped;
1245
- if (!!(process.env.NODE_ENV !== "production")) {
1246
- seen = seen || /* @__PURE__ */ new Map();
1247
- }
1248
- for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
1249
- const cb = activePostFlushCbs[postFlushIndex];
1250
- if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
1251
- continue;
1252
- }
1253
- if (cb.flags & 4) {
1254
- cb.flags &= -2;
1255
- }
1256
- if (!(cb.flags & 8)) cb();
1257
- cb.flags &= -2;
1258
- }
1259
- activePostFlushCbs = null;
1260
- postFlushIndex = 0;
1261
- }
1262
- }
1263
- const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
1264
- function flushJobs(seen) {
1265
- if (!!(process.env.NODE_ENV !== "production")) {
1266
- seen = seen || /* @__PURE__ */ new Map();
1267
- }
1268
- const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
1269
- try {
1270
- for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
1271
- const job = queue[flushIndex];
1272
- if (job && !(job.flags & 8)) {
1273
- if (!!(process.env.NODE_ENV !== "production") && check(job)) {
1274
- continue;
1275
- }
1276
- if (job.flags & 4) {
1277
- job.flags &= ~1;
1278
- }
1279
- callWithErrorHandling(
1280
- job,
1281
- job.i,
1282
- job.i ? 15 : 14
1283
- );
1284
- if (!(job.flags & 4)) {
1285
- job.flags &= ~1;
1286
- }
1287
- }
1288
- }
1289
- } finally {
1290
- for (; flushIndex < queue.length; flushIndex++) {
1291
- const job = queue[flushIndex];
1292
- if (job) {
1293
- job.flags &= -2;
1294
- }
1295
- }
1296
- flushIndex = -1;
1297
- queue.length = 0;
1298
- flushPostFlushCbs(seen);
1299
- currentFlushPromise = null;
1300
- if (queue.length || pendingPostFlushCbs.length) {
1301
- flushJobs(seen);
1302
- }
1303
- }
1304
- }
1305
- function checkRecursiveUpdates(seen, fn) {
1306
- const count = seen.get(fn) || 0;
1307
- if (count > RECURSION_LIMIT) {
1308
- const instance = fn.i;
1309
- const componentName = instance && getComponentName(instance.type);
1310
- handleError(
1311
- `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
1312
- null,
1313
- 10
1314
- );
1315
- return true;
1316
- }
1317
- seen.set(fn, count + 1);
1318
- return false;
1319
- }
1320
- const hmrDirtyComponents = /* @__PURE__ */ new Map();
1321
- if (!!(process.env.NODE_ENV !== "production")) {
1322
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
1323
- createRecord: tryWrap(createRecord),
1324
- rerender: tryWrap(rerender),
1325
- reload: tryWrap(reload)
1326
- };
1327
- }
1328
- const map = /* @__PURE__ */ new Map();
1329
- function createRecord(id, initialDef) {
1330
- if (map.has(id)) {
1331
- return false;
1332
- }
1333
- map.set(id, {
1334
- initialDef: normalizeClassComponent(initialDef),
1335
- instances: /* @__PURE__ */ new Set()
1336
- });
1337
- return true;
1338
- }
1339
- function normalizeClassComponent(component) {
1340
- return isClassComponent(component) ? component.__vccOpts : component;
1341
- }
1342
- function rerender(id, newRender) {
1343
- const record = map.get(id);
1344
- if (!record) {
1345
- return;
1346
- }
1347
- record.initialDef.render = newRender;
1348
- [...record.instances].forEach((instance) => {
1349
- if (newRender) {
1350
- instance.render = newRender;
1351
- normalizeClassComponent(instance.type).render = newRender;
1352
- }
1353
- instance.renderCache = [];
1354
- if (!(instance.job.flags & 8)) {
1355
- instance.update();
1356
- }
1357
- });
1358
- }
1359
- function reload(id, newComp) {
1360
- const record = map.get(id);
1361
- if (!record) return;
1362
- newComp = normalizeClassComponent(newComp);
1363
- updateComponentDef(record.initialDef, newComp);
1364
- const instances = [...record.instances];
1365
- for (let i = 0; i < instances.length; i++) {
1366
- const instance = instances[i];
1367
- const oldComp = normalizeClassComponent(instance.type);
1368
- let dirtyInstances = hmrDirtyComponents.get(oldComp);
1369
- if (!dirtyInstances) {
1370
- if (oldComp !== record.initialDef) {
1371
- updateComponentDef(oldComp, newComp);
1372
- }
1373
- hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
1374
- }
1375
- dirtyInstances.add(instance);
1376
- instance.appContext.propsCache.delete(instance.type);
1377
- instance.appContext.emitsCache.delete(instance.type);
1378
- instance.appContext.optionsCache.delete(instance.type);
1379
- if (instance.ceReload) {
1380
- dirtyInstances.add(instance);
1381
- instance.ceReload(newComp.styles);
1382
- dirtyInstances.delete(instance);
1383
- } else if (instance.parent) {
1384
- queueJob(() => {
1385
- if (!(instance.job.flags & 8)) {
1386
- instance.parent.update();
1387
- dirtyInstances.delete(instance);
1388
- }
1389
- });
1390
- } else if (instance.appContext.reload) {
1391
- instance.appContext.reload();
1392
- } else if (typeof window !== "undefined") {
1393
- window.location.reload();
1394
- } else {
1395
- console.warn(
1396
- "[HMR] Root or manually mounted instance modified. Full reload required."
1397
- );
1398
- }
1399
- if (instance.root.ce && instance !== instance.root) {
1400
- instance.root.ce._removeChildStyle(oldComp);
1401
- }
1402
- }
1403
- queuePostFlushCb(() => {
1404
- hmrDirtyComponents.clear();
1405
- });
1406
- }
1407
- function updateComponentDef(oldComp, newComp) {
1408
- extend(oldComp, newComp);
1409
- for (const key in oldComp) {
1410
- if (key !== "__file" && !(key in newComp)) {
1411
- delete oldComp[key];
1412
- }
1413
- }
1414
- }
1415
- function tryWrap(fn) {
1416
- return (id, arg) => {
1417
- try {
1418
- return fn(id, arg);
1419
- } catch (e) {
1420
- console.error(e);
1421
- console.warn(
1422
- `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
1423
- );
1424
- }
1425
- };
1426
- }
1427
- let devtools$1;
1428
- let buffer = [];
1429
- let devtoolsNotInstalled = false;
1430
- function emit$1(event, ...args) {
1431
- if (devtools$1) {
1432
- devtools$1.emit(event, ...args);
1433
- } else if (!devtoolsNotInstalled) {
1434
- buffer.push({ event, args });
1435
- }
1436
- }
1437
- function setDevtoolsHook$1(hook, target) {
1438
- var _a, _b;
1439
- devtools$1 = hook;
1440
- if (devtools$1) {
1441
- devtools$1.enabled = true;
1442
- buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
1443
- buffer = [];
1444
- } else if (
1445
- // handle late devtools injection - only do this if we are in an actual
1446
- // browser environment to avoid the timer handle stalling test runner exit
1447
- // (#4815)
1448
- typeof window !== "undefined" && // some envs mock window but not fully
1449
- window.HTMLElement && // also exclude jsdom
1450
- // eslint-disable-next-line no-restricted-syntax
1451
- !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
1452
- ) {
1453
- const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
1454
- replay.push((newHook) => {
1455
- setDevtoolsHook$1(newHook, target);
1456
- });
1457
- setTimeout(() => {
1458
- if (!devtools$1) {
1459
- target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
1460
- devtoolsNotInstalled = true;
1461
- buffer = [];
1462
- }
1463
- }, 3e3);
1464
- } else {
1465
- devtoolsNotInstalled = true;
1466
- buffer = [];
1467
- }
1468
- }
1469
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(
1470
- "component:updated"
1471
- /* COMPONENT_UPDATED */
1472
- );
1473
- // @__NO_SIDE_EFFECTS__
1474
- function createDevtoolsComponentHook(hook) {
1475
- return (component) => {
1476
- emit$1(
1477
- hook,
1478
- component.appContext.app,
1479
- component.uid,
1480
- component.parent ? component.parent.uid : void 0,
1481
- component
1482
- );
1483
- };
1484
- }
1485
- let currentRenderingInstance = null;
1486
- let currentScopeId = null;
1487
- function setCurrentRenderingInstance(instance) {
1488
- const prev = currentRenderingInstance;
1489
- currentRenderingInstance = instance;
1490
- currentScopeId = instance && instance.type.__scopeId || null;
1491
- return prev;
1492
- }
1493
- function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
1494
- if (!ctx) return fn;
1495
- if (fn._n) {
1496
- return fn;
1497
- }
1498
- const renderFnWithContext = (...args) => {
1499
- if (renderFnWithContext._d) {
1500
- setBlockTracking(-1);
1501
- }
1502
- const prevInstance = setCurrentRenderingInstance(ctx);
1503
- let res;
1504
- try {
1505
- res = fn(...args);
1506
- } finally {
1507
- setCurrentRenderingInstance(prevInstance);
1508
- if (renderFnWithContext._d) {
1509
- setBlockTracking(1);
1510
- }
1511
- }
1512
- if (!!(process.env.NODE_ENV !== "production") || false) {
1513
- devtoolsComponentUpdated(ctx);
1514
- }
1515
- return res;
1516
- };
1517
- renderFnWithContext._n = true;
1518
- renderFnWithContext._c = true;
1519
- renderFnWithContext._d = true;
1520
- return renderFnWithContext;
1521
- }
1522
- const isTeleport = (type) => type.__isTeleport;
1523
- function setTransitionHooks(vnode, hooks) {
1524
- if (vnode.shapeFlag & 6 && vnode.component) {
1525
- vnode.transition = hooks;
1526
- setTransitionHooks(vnode.component.subTree, hooks);
1527
- } else if (vnode.shapeFlag & 128) {
1528
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
1529
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
1530
- } else {
1531
- vnode.transition = hooks;
1532
- }
1533
- }
1534
- // @__NO_SIDE_EFFECTS__
1535
- function defineComponent(options, extraOptions) {
1536
- return isFunction(options) ? (
1537
- // #8236: extend call and options.name access are considered side-effects
1538
- // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1539
- /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
1540
- ) : options;
1541
- }
1542
- const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
1543
- function useTemplateRef(key) {
1544
- const i = getCurrentInstance();
1545
- const r = shallowRef(null);
1546
- if (i) {
1547
- const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
1548
- let desc;
1549
- if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
1550
- warn$1(`useTemplateRef('${key}') already exists.`);
1551
- } else {
1552
- Object.defineProperty(refs, key, {
1553
- enumerable: true,
1554
- get: () => r.value,
1555
- set: (val) => r.value = val
1556
- });
1557
- }
1558
- } else if (!!(process.env.NODE_ENV !== "production")) {
1559
- warn$1(
1560
- `useTemplateRef() is called when there is no active component instance to be associated with.`
1561
- );
1562
- }
1563
- const ret = !!(process.env.NODE_ENV !== "production") ? readonly(r) : r;
1564
- if (!!(process.env.NODE_ENV !== "production")) {
1565
- knownTemplateRefs.add(ret);
1566
- }
1567
- return ret;
1568
- }
1569
- getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
1570
- getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
1571
- const COMPONENTS = "components";
1572
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
1573
- function resolveDynamicComponent(component) {
1574
- if (isString(component)) {
1575
- return resolveAsset(COMPONENTS, component, false) || component;
1576
- } else {
1577
- return component || NULL_DYNAMIC_COMPONENT;
1578
- }
1579
- }
1580
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
1581
- const instance = currentRenderingInstance || currentInstance;
1582
- if (instance) {
1583
- const Component = instance.type;
1584
- {
1585
- const selfName = getComponentName(
1586
- Component,
1587
- false
1588
- );
1589
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
1590
- return Component;
1591
- }
1592
- }
1593
- const res = (
1594
- // local registration
1595
- // check instance[type] first which is resolved for options API
1596
- resolve(instance[type] || Component[type], name) || // global registration
1597
- resolve(instance.appContext[type], name)
1598
- );
1599
- if (!res && maybeSelfReference) {
1600
- return Component;
1601
- }
1602
- if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
1603
- const extra = `
1604
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` ;
1605
- warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
1606
- }
1607
- return res;
1608
- } else if (!!(process.env.NODE_ENV !== "production")) {
1609
- warn$1(
1610
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
1611
- );
1612
- }
1613
- }
1614
- function resolve(registry, name) {
1615
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
1616
- }
1617
- function renderList(source, renderItem, cache, index) {
1618
- let ret;
1619
- const cached = cache;
1620
- const sourceIsArray = isArray(source);
1621
- if (sourceIsArray || isString(source)) {
1622
- const sourceIsReactiveArray = sourceIsArray && isReactive(source);
1623
- let needsWrap = false;
1624
- let isReadonlySource = false;
1625
- if (sourceIsReactiveArray) {
1626
- needsWrap = !isShallow(source);
1627
- isReadonlySource = isReadonly(source);
1628
- source = shallowReadArray(source);
1629
- }
1630
- ret = new Array(source.length);
1631
- for (let i = 0, l = source.length; i < l; i++) {
1632
- ret[i] = renderItem(
1633
- needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
1634
- i,
1635
- void 0,
1636
- cached
1637
- );
1638
- }
1639
- } else if (typeof source === "number") {
1640
- if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
1641
- warn$1(`The v-for range expect an integer value but got ${source}.`);
1642
- }
1643
- ret = new Array(source);
1644
- for (let i = 0; i < source; i++) {
1645
- ret[i] = renderItem(i + 1, i, void 0, cached);
1646
- }
1647
- } else if (isObject(source)) {
1648
- if (source[Symbol.iterator]) {
1649
- ret = Array.from(
1650
- source,
1651
- (item, i) => renderItem(item, i, void 0, cached)
1652
- );
1653
- } else {
1654
- const keys = Object.keys(source);
1655
- ret = new Array(keys.length);
1656
- for (let i = 0, l = keys.length; i < l; i++) {
1657
- const key = keys[i];
1658
- ret[i] = renderItem(source[key], key, i, cached);
1659
- }
1660
- }
1661
- } else {
1662
- ret = [];
1663
- }
1664
- return ret;
1665
- }
1666
- function createSlots(slots, dynamicSlots) {
1667
- for (let i = 0; i < dynamicSlots.length; i++) {
1668
- const slot = dynamicSlots[i];
1669
- if (isArray(slot)) {
1670
- for (let j = 0; j < slot.length; j++) {
1671
- slots[slot[j].name] = slot[j].fn;
1672
- }
1673
- } else if (slot) {
1674
- slots[slot.name] = slot.key ? (...args) => {
1675
- const res = slot.fn(...args);
1676
- if (res) res.key = slot.key;
1677
- return res;
1678
- } : slot.fn;
1679
- }
1680
- }
1681
- return slots;
1682
- }
1683
- const PublicInstanceProxyHandlers = {
1684
- };
1685
- if (!!(process.env.NODE_ENV !== "production") && true) {
1686
- PublicInstanceProxyHandlers.ownKeys = (target) => {
1687
- warn$1(
1688
- `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
1689
- );
1690
- return Reflect.ownKeys(target);
1691
- };
1692
- }
1693
- const internalObjectProto = {};
1694
- const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
1695
- const isSuspense = (type) => type.__isSuspense;
1696
- const Fragment = Symbol.for("v-fgt");
1697
- const Text = Symbol.for("v-txt");
1698
- const Comment = Symbol.for("v-cmt");
1699
- const blockStack = [];
1700
- let currentBlock = null;
1701
- function openBlock(disableTracking = false) {
1702
- blockStack.push(currentBlock = disableTracking ? null : []);
1703
- }
1704
- function closeBlock() {
1705
- blockStack.pop();
1706
- currentBlock = blockStack[blockStack.length - 1] || null;
1707
- }
1708
- let isBlockTreeEnabled = 1;
1709
- function setBlockTracking(value, inVOnce = false) {
1710
- isBlockTreeEnabled += value;
1711
- if (value < 0 && currentBlock && inVOnce) {
1712
- currentBlock.hasOnce = true;
1713
- }
1714
- }
1715
- function setupBlock(vnode) {
1716
- vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;
1717
- closeBlock();
1718
- if (isBlockTreeEnabled > 0 && currentBlock) {
1719
- currentBlock.push(vnode);
1720
- }
1721
- return vnode;
1722
- }
1723
- function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
1724
- return setupBlock(
1725
- createBaseVNode(
1726
- type,
1727
- props,
1728
- children,
1729
- patchFlag,
1730
- dynamicProps,
1731
- shapeFlag,
1732
- true
1733
- )
1734
- );
1735
- }
1736
- function createBlock(type, props, children, patchFlag, dynamicProps) {
1737
- return setupBlock(
1738
- createVNode(
1739
- type,
1740
- props,
1741
- children,
1742
- patchFlag,
1743
- dynamicProps,
1744
- true
1745
- )
1746
- );
1747
- }
1748
- function isVNode(value) {
1749
- return value ? value.__v_isVNode === true : false;
1750
- }
1751
- const createVNodeWithArgsTransform = (...args) => {
1752
- return _createVNode(
1753
- ...args
1754
- );
1755
- };
1756
- const normalizeKey = ({ key }) => key != null ? key : null;
1757
- const normalizeRef = ({
1758
- ref: ref3,
1759
- ref_key,
1760
- ref_for
1761
- }) => {
1762
- if (typeof ref3 === "number") {
1763
- ref3 = "" + ref3;
1764
- }
1765
- return ref3 != null ? isString(ref3) || isRef(ref3) || isFunction(ref3) ? { i: currentRenderingInstance, r: ref3, k: ref_key, f: !!ref_for } : ref3 : null;
1766
- };
1767
- function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {
1768
- const vnode = {
1769
- __v_isVNode: true,
1770
- __v_skip: true,
1771
- type,
1772
- props,
1773
- key: props && normalizeKey(props),
1774
- ref: props && normalizeRef(props),
1775
- scopeId: currentScopeId,
1776
- slotScopeIds: null,
1777
- children,
1778
- component: null,
1779
- suspense: null,
1780
- ssContent: null,
1781
- ssFallback: null,
1782
- dirs: null,
1783
- transition: null,
1784
- el: null,
1785
- anchor: null,
1786
- target: null,
1787
- targetStart: null,
1788
- targetAnchor: null,
1789
- staticCount: 0,
1790
- shapeFlag,
1791
- patchFlag,
1792
- dynamicProps,
1793
- dynamicChildren: null,
1794
- appContext: null,
1795
- ctx: currentRenderingInstance
1796
- };
1797
- if (needFullChildrenNormalization) {
1798
- normalizeChildren(vnode, children);
1799
- if (shapeFlag & 128) {
1800
- type.normalize(vnode);
1801
- }
1802
- } else if (children) {
1803
- vnode.shapeFlag |= isString(children) ? 8 : 16;
1804
- }
1805
- if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
1806
- warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
1807
- }
1808
- if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
1809
- !isBlockNode && // has current parent block
1810
- currentBlock && // presence of a patch flag indicates this node needs patching on updates.
1811
- // component nodes also should always be patched, because even if the
1812
- // component doesn't need to update, it needs to persist the instance on to
1813
- // the next vnode so that it can be properly unmounted later.
1814
- (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
1815
- // vnode should not be considered dynamic due to handler caching.
1816
- vnode.patchFlag !== 32) {
1817
- currentBlock.push(vnode);
1818
- }
1819
- return vnode;
1820
- }
1821
- const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
1822
- function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
1823
- if (!type || type === NULL_DYNAMIC_COMPONENT) {
1824
- if (!!(process.env.NODE_ENV !== "production") && !type) {
1825
- warn$1(`Invalid vnode type when creating vnode: ${type}.`);
1826
- }
1827
- type = Comment;
1828
- }
1829
- if (isVNode(type)) {
1830
- const cloned = cloneVNode(
1831
- type,
1832
- props,
1833
- true
1834
- /* mergeRef: true */
1835
- );
1836
- if (children) {
1837
- normalizeChildren(cloned, children);
1838
- }
1839
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
1840
- if (cloned.shapeFlag & 6) {
1841
- currentBlock[currentBlock.indexOf(type)] = cloned;
1842
- } else {
1843
- currentBlock.push(cloned);
1844
- }
1845
- }
1846
- cloned.patchFlag = -2;
1847
- return cloned;
1848
- }
1849
- if (isClassComponent(type)) {
1850
- type = type.__vccOpts;
1851
- }
1852
- if (props) {
1853
- props = guardReactiveProps(props);
1854
- let { class: klass, style } = props;
1855
- if (klass && !isString(klass)) {
1856
- props.class = normalizeClass(klass);
1857
- }
1858
- if (isObject(style)) {
1859
- if (isProxy(style) && !isArray(style)) {
1860
- style = extend({}, style);
1861
- }
1862
- props.style = normalizeStyle(style);
1863
- }
1864
- }
1865
- const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
1866
- if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
1867
- type = toRaw(type);
1868
- warn$1(
1869
- `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
1870
- `
1871
- Component that was made reactive: `,
1872
- type
1873
- );
1874
- }
1875
- return createBaseVNode(
1876
- type,
1877
- props,
1878
- children,
1879
- patchFlag,
1880
- dynamicProps,
1881
- shapeFlag,
1882
- isBlockNode,
1883
- true
1884
- );
1885
- }
1886
- function guardReactiveProps(props) {
1887
- if (!props) return null;
1888
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
1889
- }
1890
- function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
1891
- const { props, ref: ref3, patchFlag, children, transition } = vnode;
1892
- const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
1893
- const cloned = {
1894
- __v_isVNode: true,
1895
- __v_skip: true,
1896
- type: vnode.type,
1897
- props: mergedProps,
1898
- key: mergedProps && normalizeKey(mergedProps),
1899
- ref: extraProps && extraProps.ref ? (
1900
- // #2078 in the case of <component :is="vnode" ref="extra"/>
1901
- // if the vnode itself already has a ref, cloneVNode will need to merge
1902
- // the refs so the single vnode can be set on multiple refs
1903
- mergeRef && ref3 ? isArray(ref3) ? ref3.concat(normalizeRef(extraProps)) : [ref3, normalizeRef(extraProps)] : normalizeRef(extraProps)
1904
- ) : ref3,
1905
- scopeId: vnode.scopeId,
1906
- slotScopeIds: vnode.slotScopeIds,
1907
- children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,
1908
- target: vnode.target,
1909
- targetStart: vnode.targetStart,
1910
- targetAnchor: vnode.targetAnchor,
1911
- staticCount: vnode.staticCount,
1912
- shapeFlag: vnode.shapeFlag,
1913
- // if the vnode is cloned with extra props, we can no longer assume its
1914
- // existing patch flag to be reliable and need to add the FULL_PROPS flag.
1915
- // note: preserve flag for fragments since they use the flag for children
1916
- // fast paths only.
1917
- patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,
1918
- dynamicProps: vnode.dynamicProps,
1919
- dynamicChildren: vnode.dynamicChildren,
1920
- appContext: vnode.appContext,
1921
- dirs: vnode.dirs,
1922
- transition,
1923
- // These should technically only be non-null on mounted VNodes. However,
1924
- // they *should* be copied for kept-alive vnodes. So we just always copy
1925
- // them since them being non-null during a mount doesn't affect the logic as
1926
- // they will simply be overwritten.
1927
- component: vnode.component,
1928
- suspense: vnode.suspense,
1929
- ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
1930
- ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
1931
- placeholder: vnode.placeholder,
1932
- el: vnode.el,
1933
- anchor: vnode.anchor,
1934
- ctx: vnode.ctx,
1935
- ce: vnode.ce
1936
- };
1937
- if (transition && cloneTransition) {
1938
- setTransitionHooks(
1939
- cloned,
1940
- transition.clone(cloned)
1941
- );
1942
- }
1943
- return cloned;
1944
- }
1945
- function deepCloneVNode(vnode) {
1946
- const cloned = cloneVNode(vnode);
1947
- if (isArray(vnode.children)) {
1948
- cloned.children = vnode.children.map(deepCloneVNode);
1949
- }
1950
- return cloned;
1951
- }
1952
- function createTextVNode(text = " ", flag = 0) {
1953
- return createVNode(Text, null, text, flag);
1954
- }
1955
- function normalizeChildren(vnode, children) {
1956
- let type = 0;
1957
- const { shapeFlag } = vnode;
1958
- if (children == null) {
1959
- children = null;
1960
- } else if (isArray(children)) {
1961
- type = 16;
1962
- } else if (typeof children === "object") {
1963
- if (shapeFlag & (1 | 64)) {
1964
- const slot = children.default;
1965
- if (slot) {
1966
- slot._c && (slot._d = false);
1967
- normalizeChildren(vnode, slot());
1968
- slot._c && (slot._d = true);
1969
- }
1970
- return;
1971
- } else {
1972
- type = 32;
1973
- const slotFlag = children._;
1974
- if (!slotFlag && !isInternalObject(children)) {
1975
- children._ctx = currentRenderingInstance;
1976
- } else if (slotFlag === 3 && currentRenderingInstance) {
1977
- if (currentRenderingInstance.slots._ === 1) {
1978
- children._ = 1;
1979
- } else {
1980
- children._ = 2;
1981
- vnode.patchFlag |= 1024;
1982
- }
1983
- }
1984
- }
1985
- } else if (isFunction(children)) {
1986
- children = { default: children, _ctx: currentRenderingInstance };
1987
- type = 32;
1988
- } else {
1989
- children = String(children);
1990
- if (shapeFlag & 64) {
1991
- type = 16;
1992
- children = [createTextVNode(children)];
1993
- } else {
1994
- type = 8;
1995
- }
1996
- }
1997
- vnode.children = children;
1998
- vnode.shapeFlag |= type;
1999
- }
2000
- function mergeProps(...args) {
2001
- const ret = {};
2002
- for (let i = 0; i < args.length; i++) {
2003
- const toMerge = args[i];
2004
- for (const key in toMerge) {
2005
- if (key === "class") {
2006
- if (ret.class !== toMerge.class) {
2007
- ret.class = normalizeClass([ret.class, toMerge.class]);
2008
- }
2009
- } else if (key === "style") {
2010
- ret.style = normalizeStyle([ret.style, toMerge.style]);
2011
- } else if (isOn(key)) {
2012
- const existing = ret[key];
2013
- const incoming = toMerge[key];
2014
- if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
2015
- ret[key] = existing ? [].concat(existing, incoming) : incoming;
2016
- }
2017
- } else if (key !== "") {
2018
- ret[key] = toMerge[key];
2019
- }
2020
- }
2021
- }
2022
- return ret;
2023
- }
2024
- let currentInstance = null;
2025
- const getCurrentInstance = () => currentInstance || currentRenderingInstance;
2026
- {
2027
- const g = getGlobalThis();
2028
- const registerGlobalSetter = (key, setter) => {
2029
- let setters;
2030
- if (!(setters = g[key])) setters = g[key] = [];
2031
- setters.push(setter);
2032
- return (v) => {
2033
- if (setters.length > 1) setters.forEach((set) => set(v));
2034
- else setters[0](v);
2035
- };
2036
- };
2037
- registerGlobalSetter(
2038
- `__VUE_INSTANCE_SETTERS__`,
2039
- (v) => currentInstance = v
2040
- );
2041
- registerGlobalSetter(
2042
- `__VUE_SSR_SETTERS__`,
2043
- (v) => v
2044
- );
2045
- }
2046
- !!(process.env.NODE_ENV !== "production") ? {
2047
- } : {
2048
- };
2049
- const classifyRE = /(?:^|[-_])\w/g;
2050
- const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
2051
- function getComponentName(Component, includeInferred = true) {
2052
- return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
2053
- }
2054
- function formatComponentName(instance, Component, isRoot = false) {
2055
- let name = getComponentName(Component);
2056
- if (!name && Component.__file) {
2057
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
2058
- if (match) {
2059
- name = match[1];
2060
- }
2061
- }
2062
- if (!name && instance && instance.parent) {
2063
- const inferFromRegistry = (registry) => {
2064
- for (const key in registry) {
2065
- if (registry[key] === Component) {
2066
- return key;
2067
- }
2068
- }
2069
- };
2070
- name = inferFromRegistry(
2071
- instance.components || instance.parent.type.components
2072
- ) || inferFromRegistry(instance.appContext.components);
2073
- }
2074
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
2075
- }
2076
- function isClassComponent(value) {
2077
- return isFunction(value) && "__vccOpts" in value;
2078
- }
2079
- function initCustomFormatter() {
2080
- if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
2081
- return;
2082
- }
2083
- const vueStyle = { style: "color:#3ba776" };
2084
- const numberStyle = { style: "color:#1677ff" };
2085
- const stringStyle = { style: "color:#f5222d" };
2086
- const keywordStyle = { style: "color:#eb2f96" };
2087
- const formatter = {
2088
- __vue_custom_formatter: true,
2089
- header(obj) {
2090
- if (!isObject(obj)) {
2091
- return null;
2092
- }
2093
- if (obj.__isVue) {
2094
- return ["div", vueStyle, `VueInstance`];
2095
- } else if (isRef(obj)) {
2096
- const value = obj.value;
2097
- return [
2098
- "div",
2099
- {},
2100
- ["span", vueStyle, genRefFlag(obj)],
2101
- "<",
2102
- formatValue(value),
2103
- `>`
2104
- ];
2105
- } else if (isReactive(obj)) {
2106
- return [
2107
- "div",
2108
- {},
2109
- ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
2110
- "<",
2111
- formatValue(obj),
2112
- `>${isReadonly(obj) ? ` (readonly)` : ``}`
2113
- ];
2114
- } else if (isReadonly(obj)) {
2115
- return [
2116
- "div",
2117
- {},
2118
- ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
2119
- "<",
2120
- formatValue(obj),
2121
- ">"
2122
- ];
2123
- }
2124
- return null;
2125
- },
2126
- hasBody(obj) {
2127
- return obj && obj.__isVue;
2128
- },
2129
- body(obj) {
2130
- if (obj && obj.__isVue) {
2131
- return [
2132
- "div",
2133
- {},
2134
- ...formatInstance(obj.$)
2135
- ];
2136
- }
2137
- }
2138
- };
2139
- function formatInstance(instance) {
2140
- const blocks = [];
2141
- if (instance.type.props && instance.props) {
2142
- blocks.push(createInstanceBlock("props", toRaw(instance.props)));
2143
- }
2144
- if (instance.setupState !== EMPTY_OBJ) {
2145
- blocks.push(createInstanceBlock("setup", instance.setupState));
2146
- }
2147
- if (instance.data !== EMPTY_OBJ) {
2148
- blocks.push(createInstanceBlock("data", toRaw(instance.data)));
2149
- }
2150
- const computed2 = extractKeys(instance, "computed");
2151
- if (computed2) {
2152
- blocks.push(createInstanceBlock("computed", computed2));
2153
- }
2154
- const injected = extractKeys(instance, "inject");
2155
- if (injected) {
2156
- blocks.push(createInstanceBlock("injected", injected));
2157
- }
2158
- blocks.push([
2159
- "div",
2160
- {},
2161
- [
2162
- "span",
2163
- {
2164
- style: keywordStyle.style + ";opacity:0.66"
2165
- },
2166
- "$ (internal): "
2167
- ],
2168
- ["object", { object: instance }]
2169
- ]);
2170
- return blocks;
2171
- }
2172
- function createInstanceBlock(type, target) {
2173
- target = extend({}, target);
2174
- if (!Object.keys(target).length) {
2175
- return ["span", {}];
2176
- }
2177
- return [
2178
- "div",
2179
- { style: "line-height:1.25em;margin-bottom:0.6em" },
2180
- [
2181
- "div",
2182
- {
2183
- style: "color:#476582"
2184
- },
2185
- type
2186
- ],
2187
- [
2188
- "div",
2189
- {
2190
- style: "padding-left:1.25em"
2191
- },
2192
- ...Object.keys(target).map((key) => {
2193
- return [
2194
- "div",
2195
- {},
2196
- ["span", keywordStyle, key + ": "],
2197
- formatValue(target[key], false)
2198
- ];
2199
- })
2200
- ]
2201
- ];
2202
- }
2203
- function formatValue(v, asRaw = true) {
2204
- if (typeof v === "number") {
2205
- return ["span", numberStyle, v];
2206
- } else if (typeof v === "string") {
2207
- return ["span", stringStyle, JSON.stringify(v)];
2208
- } else if (typeof v === "boolean") {
2209
- return ["span", keywordStyle, v];
2210
- } else if (isObject(v)) {
2211
- return ["object", { object: asRaw ? toRaw(v) : v }];
2212
- } else {
2213
- return ["span", stringStyle, String(v)];
2214
- }
2215
- }
2216
- function extractKeys(instance, type) {
2217
- const Comp = instance.type;
2218
- if (isFunction(Comp)) {
2219
- return;
2220
- }
2221
- const extracted = {};
2222
- for (const key in instance.ctx) {
2223
- if (isKeyOfType(Comp, key, type)) {
2224
- extracted[key] = instance.ctx[key];
2225
- }
2226
- }
2227
- return extracted;
2228
- }
2229
- function isKeyOfType(Comp, key, type) {
2230
- const opts = Comp[type];
2231
- if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
2232
- return true;
2233
- }
2234
- if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
2235
- return true;
2236
- }
2237
- if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
2238
- return true;
2239
- }
2240
- }
2241
- function genRefFlag(v) {
2242
- if (isShallow(v)) {
2243
- return `ShallowRef`;
2244
- }
2245
- if (v.effect) {
2246
- return `ComputedRef`;
2247
- }
2248
- return `Ref`;
2249
- }
2250
- if (window.devtoolsFormatters) {
2251
- window.devtoolsFormatters.push(formatter);
2252
- } else {
2253
- window.devtoolsFormatters = [formatter];
2254
- }
2255
- }
2256
- !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
2257
- !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
2258
- !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
2259
-
2260
- /**
2261
- * vue v3.5.24
2262
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
2263
- * @license MIT
2264
- **/
2265
-
2266
- function initDev() {
2267
- {
2268
- initCustomFormatter();
2269
- }
2270
- }
2271
-
2272
- if (!!(process.env.NODE_ENV !== "production")) {
2273
- initDev();
2274
- }
2275
-
2276
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2277
8
  ...{
2278
9
  name: "TElAdapterTable"
2279
10
  },
@@ -2296,7 +27,7 @@ Component that was made reactive: `,
2296
27
  emits: ["sort-change", "select", "select-all", "selection-change", "expand-change", "cell-click"],
2297
28
  setup(__props, { expose: __expose, emit: __emit }) {
2298
29
  const emit = __emit;
2299
- const tableRef = useTemplateRef("table");
30
+ const tableRef = vue.useTemplateRef("table");
2300
31
  const sortChange = (data) => {
2301
32
  emit("sort-change", data);
2302
33
  };
@@ -2332,7 +63,7 @@ Component that was made reactive: `,
2332
63
  toggleRowExpansion
2333
64
  });
2334
65
  return (_ctx, _cache) => {
2335
- return openBlock(), createBlock(unref(elementPlus.ElTable), {
66
+ return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTable), {
2336
67
  ref: "table",
2337
68
  data: __props.data,
2338
69
  border: __props.border,
@@ -2353,32 +84,32 @@ Component that was made reactive: `,
2353
84
  onCellClick: cellClickHandler,
2354
85
  onExpandChange: expandChange
2355
86
  }, {
2356
- default: withCtx(() => [
2357
- (openBlock(true), createElementBlock(
2358
- Fragment,
87
+ default: vue.withCtx(() => [
88
+ (vue.openBlock(true), vue.createElementBlock(
89
+ vue.Fragment,
2359
90
  null,
2360
- renderList(__props.columns, (item, columnIndex) => {
2361
- return openBlock(), createBlock(
2362
- unref(elementPlus.ElTableColumn),
2363
- mergeProps({
91
+ vue.renderList(__props.columns, (item, columnIndex) => {
92
+ return vue.openBlock(), vue.createBlock(
93
+ vue.unref(elementPlus.ElTableColumn),
94
+ vue.mergeProps({
2364
95
  key: columnIndex,
2365
96
  ref_for: true
2366
97
  }, item.props || {}),
2367
- createSlots({
98
+ vue.createSlots({
2368
99
  _: 2
2369
100
  /* DYNAMIC */
2370
101
  }, [
2371
102
  item.title ? {
2372
103
  name: "header",
2373
- fn: withCtx((scope) => [
2374
- (openBlock(), createBlock(resolveDynamicComponent(item.title(scope))))
104
+ fn: vue.withCtx((scope) => [
105
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.title(scope))))
2375
106
  ]),
2376
107
  key: "0"
2377
108
  } : void 0,
2378
109
  item.cell ? {
2379
110
  name: "default",
2380
- fn: withCtx((scope) => [
2381
- (openBlock(), createBlock(resolveDynamicComponent(item.cell(scope))))
111
+ fn: vue.withCtx((scope) => [
112
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.cell(scope))))
2382
113
  ]),
2383
114
  key: "1"
2384
115
  } : void 0