@opentiny/vue-runtime 3.19.0 → 3.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1977 @@
1
+ import { defineComponent as oe, $prefix as ne, $props as ie, setup as Oe, createComponent as ae, deduplicateCssClass as Ue, stringifyCssClass as $e, hooks as Y, parseVnode as Be, isEmptyVnode as ke, mergeClass as ue, $setup as Ke, h as ze } from "@opentiny/vue-common";
2
+ function fe(o, t) {
3
+ (t == null || t > o.length) && (t = o.length);
4
+ for (var e = 0, r = Array(t); e < t; e++)
5
+ r[e] = o[e];
6
+ return r;
7
+ }
8
+ function We(o, t) {
9
+ if (!(o instanceof t))
10
+ throw new TypeError("Cannot call a class as a function");
11
+ }
12
+ function ce(o, t) {
13
+ for (var e = 0; e < t.length; e++) {
14
+ var r = t[e];
15
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(o, Ne(r.key), r);
16
+ }
17
+ }
18
+ function Je(o, t, e) {
19
+ return t && ce(o.prototype, t), e && ce(o, e), Object.defineProperty(o, "prototype", {
20
+ writable: !1
21
+ }), o;
22
+ }
23
+ function Ze(o, t) {
24
+ var e = typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
25
+ if (!e) {
26
+ if (Array.isArray(o) || (e = qe(o)) || t && o && typeof o.length == "number") {
27
+ e && (o = e);
28
+ var r = 0, n = function() {
29
+ };
30
+ return {
31
+ s: n,
32
+ n: function() {
33
+ return r >= o.length ? {
34
+ done: !0
35
+ } : {
36
+ done: !1,
37
+ value: o[r++]
38
+ };
39
+ },
40
+ e: function(l) {
41
+ throw l;
42
+ },
43
+ f: n
44
+ };
45
+ }
46
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
47
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
48
+ }
49
+ var i, a = !0, s = !1;
50
+ return {
51
+ s: function() {
52
+ e = e.call(o);
53
+ },
54
+ n: function() {
55
+ var l = e.next();
56
+ return a = l.done, l;
57
+ },
58
+ e: function(l) {
59
+ s = !0, i = l;
60
+ },
61
+ f: function() {
62
+ try {
63
+ a || e.return == null || e.return();
64
+ } finally {
65
+ if (s)
66
+ throw i;
67
+ }
68
+ }
69
+ };
70
+ }
71
+ function Xe(o, t, e) {
72
+ return (t = Ne(t)) in o ? Object.defineProperty(o, t, {
73
+ value: e,
74
+ enumerable: !0,
75
+ configurable: !0,
76
+ writable: !0
77
+ }) : o[t] = e, o;
78
+ }
79
+ function de(o, t) {
80
+ var e = Object.keys(o);
81
+ if (Object.getOwnPropertySymbols) {
82
+ var r = Object.getOwnPropertySymbols(o);
83
+ t && (r = r.filter(function(n) {
84
+ return Object.getOwnPropertyDescriptor(o, n).enumerable;
85
+ })), e.push.apply(e, r);
86
+ }
87
+ return e;
88
+ }
89
+ function A(o) {
90
+ for (var t = 1; t < arguments.length; t++) {
91
+ var e = arguments[t] != null ? arguments[t] : {};
92
+ t % 2 ? de(Object(e), !0).forEach(function(r) {
93
+ Xe(o, r, e[r]);
94
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : de(Object(e)).forEach(function(r) {
95
+ Object.defineProperty(o, r, Object.getOwnPropertyDescriptor(e, r));
96
+ });
97
+ }
98
+ return o;
99
+ }
100
+ function Qe(o, t) {
101
+ if (typeof o != "object" || !o)
102
+ return o;
103
+ var e = o[Symbol.toPrimitive];
104
+ if (e !== void 0) {
105
+ var r = e.call(o, t || "default");
106
+ if (typeof r != "object")
107
+ return r;
108
+ throw new TypeError("@@toPrimitive must return a primitive value.");
109
+ }
110
+ return (t === "string" ? String : Number)(o);
111
+ }
112
+ function Ne(o) {
113
+ var t = Qe(o, "string");
114
+ return typeof t == "symbol" ? t : t + "";
115
+ }
116
+ function G(o) {
117
+ "@babel/helpers - typeof";
118
+ return G = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
119
+ return typeof t;
120
+ } : function(t) {
121
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
122
+ }, G(o);
123
+ }
124
+ function qe(o, t) {
125
+ if (o) {
126
+ if (typeof o == "string")
127
+ return fe(o, t);
128
+ var e = {}.toString.call(o).slice(8, -1);
129
+ return e === "Object" && o.constructor && (e = o.constructor.name), e === "Map" || e === "Set" ? Array.from(o) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? fe(o, t) : void 0;
130
+ }
131
+ }
132
+ function me(o, t, e, r) {
133
+ var n, i = 0;
134
+ typeof t != "boolean" && (r = e, e = t, t = void 0);
135
+ function a() {
136
+ var l = this, u = (/* @__PURE__ */ new Date()).valueOf() - i, c = arguments;
137
+ function d() {
138
+ i = (/* @__PURE__ */ new Date()).valueOf(), e.apply(l, c);
139
+ }
140
+ function f() {
141
+ n = void 0;
142
+ }
143
+ r && !n && d(), n && clearTimeout(n);
144
+ var p = r === void 0;
145
+ p && u > o ? d() : t !== !0 && (n = setTimeout(r ? f : d, p ? o - u : o));
146
+ }
147
+ function s() {
148
+ n && (clearTimeout(n), n = null);
149
+ }
150
+ return a._cancel = s, a;
151
+ }
152
+ function Ye(o, t, e) {
153
+ return e === void 0 ? me(o, t, !1) : me(o, e, t !== !1);
154
+ }
155
+ var Ge = Object.prototype.toString, et = Object.prototype.hasOwnProperty, tt = et.toString;
156
+ tt.call(Object);
157
+ var rt = {
158
+ "[object Error]": "error",
159
+ "[object Object]": "object",
160
+ "[object RegExp]": "regExp",
161
+ "[object Date]": "date",
162
+ "[object Array]": "array",
163
+ "[object Function]": "function",
164
+ "[object AsyncFunction]": "asyncFunction",
165
+ "[object String]": "string",
166
+ "[object Number]": "number",
167
+ "[object Boolean]": "boolean"
168
+ }, ot = function(t) {
169
+ return t == null;
170
+ }, nt = function(t) {
171
+ return ot(t) ? String(t) : rt[Ge.call(t)] || "object";
172
+ }, it = {
173
+ viewportWindow: null
174
+ // 获取真实视口的window,解决在微前端中某些bug
175
+ };
176
+ const at = it;
177
+ var Te = typeof window > "u", E = function(t, e, r) {
178
+ var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
179
+ t && e && r && t.addEventListener(e, r, n);
180
+ }, B = function(t, e, r) {
181
+ var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
182
+ t && e && t.removeEventListener(e, r, n);
183
+ }, F = function(t) {
184
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
185
+ if (t) {
186
+ var r = e.split(" ").filter(function(n) {
187
+ return n;
188
+ });
189
+ r.forEach(function(n) {
190
+ return t.classList.add(n);
191
+ });
192
+ }
193
+ }, j = function(t, e) {
194
+ if (!(!t || !e)) {
195
+ var r = e.split(" ").filter(function(n) {
196
+ return n;
197
+ });
198
+ r.forEach(function(n) {
199
+ return t.classList.remove(n);
200
+ });
201
+ }
202
+ }, se = function(t) {
203
+ if (Te)
204
+ return !1;
205
+ if (t) {
206
+ var e = getComputedStyle(t);
207
+ if (e.getPropertyValue("position") === "fixed") {
208
+ if (e.getPropertyValue("display") === "none")
209
+ return !0;
210
+ if (t.parentNode !== document.body)
211
+ return se(t.parentNode);
212
+ } else
213
+ return t.offsetParent === null;
214
+ }
215
+ return !1;
216
+ }, st = function(t) {
217
+ var e = t.api, r = t.state, n = t.props;
218
+ return function(i) {
219
+ var a = 200, s = i && i.type === "mouseenter" ? a : 0;
220
+ if (n.visible === "auto") {
221
+ var l = r.referenceElm, u = l.clientWidth, c = l.scrollWidth;
222
+ if (c <= u)
223
+ return;
224
+ }
225
+ e.setExpectedState(!0), e.handleShowPopper(s);
226
+ };
227
+ }, lt = function(t) {
228
+ return function() {
229
+ t.setExpectedState(!1), t.debounceClose();
230
+ };
231
+ }, pt = function(t) {
232
+ var e = t.api, r = t.state;
233
+ return function() {
234
+ r.focusing = !0, e.show();
235
+ };
236
+ }, ut = function(t) {
237
+ var e = t.api, r = t.state;
238
+ return function() {
239
+ r.focusing = !1, e.hide();
240
+ };
241
+ }, ft = function(t) {
242
+ var e = t.api, r = t.state;
243
+ return function() {
244
+ r.focusing = !1, e.show();
245
+ };
246
+ }, ct = function(t) {
247
+ var e = t.props, r = t.state;
248
+ return function(n) {
249
+ !r.expectedState || e.manual || (clearTimeout(r.timeout), r.timeout = window.setTimeout(function() {
250
+ r.showPopper = !0;
251
+ }, e.openDelay || n), e.hideAfter > 0 && (r.timeoutPending = window.setTimeout(function() {
252
+ r.showPopper = !1;
253
+ }, e.hideAfter)));
254
+ };
255
+ }, dt = function(t) {
256
+ var e = t.api, r = t.props, n = t.state;
257
+ return function() {
258
+ r.enterable && n.expectedState || r.manual || (clearTimeout(n.timeout), n.timeoutPending && clearTimeout(n.timeoutPending), n.showPopper = !1, r.disabled && e.doDestroy());
259
+ };
260
+ }, mt = function(t) {
261
+ var e = t.props, r = t.api, n = t.state, i = t.popperVmRef;
262
+ return function(a) {
263
+ if (!e.manual) {
264
+ var s = n.referenceElm, l = i.popper;
265
+ !l || !s || l.contains(a.target) || s.contains(a.target) || n.showPopper && (r.setExpectedState(!1), r.debounceClose());
266
+ }
267
+ };
268
+ }, ht = function(t) {
269
+ var e = t.state;
270
+ return function(r) {
271
+ e.expectedState === !1 && clearTimeout(e.timeoutPending), e.expectedState = r;
272
+ };
273
+ }, vt = function(t) {
274
+ var e = t.state, r = t.api, n = t.vm;
275
+ return function() {
276
+ var i = e.referenceElm;
277
+ e.showPopper = !1, i && i.nodeType === 1 && (B(document, "click", r.handleDocumentClick), B(i, "mouseenter", r.show), B(i, "mouseleave", r.hide), B(i, "focus", r.focusHandler), B(i, "blur", r.handleBlur), B(i, "click", r.removeFocusing)), n.popperVM && (typeof n.popperVM.$destroy == "function" && n.popperVM.$destroy(), n.popperVM = null);
278
+ };
279
+ }, bt = function(t) {
280
+ var e = t.api, r = t.props;
281
+ return Ye(r.closeDelay, function() {
282
+ e.handleClosePopper();
283
+ });
284
+ }, yt = function(t) {
285
+ return function(e) {
286
+ e ? F(t.referenceElm, "focusing") : j(t.referenceElm, "focusing");
287
+ };
288
+ }, gt = function(t) {
289
+ var e = t.slots, r = t.api;
290
+ return function() {
291
+ if (!e.default || !e.default().length) {
292
+ r.handleFocus();
293
+ return;
294
+ }
295
+ var n = e.default()[0];
296
+ n = n.elm || n.el, n && n.focus ? n.focus() : r.handleFocus();
297
+ };
298
+ }, wt = function(t) {
299
+ var e = t.api, r = t.state, n = t.vm;
300
+ return function(i) {
301
+ var a = null;
302
+ n.$el.nodeType === 8 ? a = i : n.$el.nodeType === 1 && (a = n.$el), !(!a || a.nodeType === 8 || r.referenceElm) && (r.referenceElm = a, a.setAttribute("aria-describedby", r.tooltipId), a.setAttribute("tabindex", r.tabindex.toString()), E(document, "click", e.handleDocumentClick), E(a, "mouseenter", e.show), E(a, "mouseleave", e.hide), E(a, "focus", e.focusHandler), E(a, "blur", e.handleBlur), E(a, "click", e.removeFocusing));
303
+ };
304
+ }, xt = function(t) {
305
+ var e = t.state, r = t.popperVmRef;
306
+ return function(n) {
307
+ var i = Ze(n), a;
308
+ try {
309
+ for (i.s(); !(a = i.n()).done; ) {
310
+ var s = a.value;
311
+ s.type === "attributes" && s.attributeName === "x-placement" && (e.xPlacement = r.popper.getAttribute("x-placement") || "bottom");
312
+ }
313
+ } catch (l) {
314
+ i.e(l);
315
+ } finally {
316
+ i.f();
317
+ }
318
+ };
319
+ }, _t = function(t) {
320
+ var e = t.vm, r = t.nextTick, n = t.popperVmRef;
321
+ return function(i) {
322
+ r(function() {
323
+ return e.bindEvent(i);
324
+ });
325
+ var a = e.popperVM;
326
+ e.$refs.popper ? n.popper = e.$refs.popper : n.popper = a.$el, r(function() {
327
+ e.modelValue && e.updatePopper();
328
+ });
329
+ };
330
+ }, St = {
331
+ Backspace: 8,
332
+ Tab: 9,
333
+ Clear: 12,
334
+ Enter: 13,
335
+ Shift: 16,
336
+ Control: 17,
337
+ Alt: 18,
338
+ CapsLock: 20,
339
+ Escape: 27,
340
+ Space: 32,
341
+ PageUp: 33,
342
+ PageDown: 34,
343
+ End: 35,
344
+ Home: 36,
345
+ ArrowLeft: 37,
346
+ ArrowUp: 38,
347
+ ArrowRight: 39,
348
+ ArrowDown: 40,
349
+ Insert: 45,
350
+ Delete: 46,
351
+ Colon: 58,
352
+ Semicolon: 59,
353
+ LessThan: 60,
354
+ Equals: 61,
355
+ GreaterThan: 62,
356
+ QuestionMark: 63,
357
+ AtMark: 64,
358
+ KeyA: 65,
359
+ KeyB: 66,
360
+ KeyC: 67,
361
+ KeyD: 68,
362
+ KeyE: 69,
363
+ KeyF: 70,
364
+ KeyG: 71,
365
+ KeyH: 72,
366
+ KeyI: 73,
367
+ KeyJ: 74,
368
+ KeyK: 75,
369
+ KeyL: 76,
370
+ KeyM: 77,
371
+ KeyN: 78,
372
+ KeyO: 79,
373
+ KeyP: 80,
374
+ KeyQ: 81,
375
+ KeyR: 82,
376
+ KeyS: 83,
377
+ KeyT: 84,
378
+ KeyU: 85,
379
+ KeyV: 86,
380
+ KeyW: 87,
381
+ KeyX: 88,
382
+ KeyY: 89,
383
+ KeyZ: 90,
384
+ Digit0: 48,
385
+ Digit1: 49,
386
+ Digit2: 50,
387
+ Digit3: 51,
388
+ Digit4: 52,
389
+ Digit5: 53,
390
+ Digit6: 54,
391
+ Digit7: 55,
392
+ Digit8: 56,
393
+ Digit9: 57,
394
+ F1: 112,
395
+ F2: 113,
396
+ F3: 114,
397
+ F4: 115,
398
+ F5: 116,
399
+ F6: 117,
400
+ F7: 118,
401
+ F8: 119,
402
+ F9: 120,
403
+ F10: 121,
404
+ F11: 122,
405
+ F12: 123,
406
+ NumLock: 144,
407
+ Numpad0: 96,
408
+ Numpad1: 97,
409
+ Numpad2: 98,
410
+ Numpad3: 99,
411
+ Numpad4: 100,
412
+ Numpad5: 101,
413
+ Numpad6: 102,
414
+ Numpad7: 103,
415
+ Numpad8: 104,
416
+ Numpad9: 105,
417
+ NumpadMultiply: 106,
418
+ NumpadAdd: 107,
419
+ NumpadEnter: 13,
420
+ NumpadSubtract: 109,
421
+ NumpadDecimal: 110,
422
+ NumpadDivide: 111,
423
+ NumpadComma: 190
424
+ }, le = typeof window > "u", L = {}, M = {
425
+ leave: "v-modal-leave",
426
+ enter: "v-modal-enter",
427
+ modal: "v-modal"
428
+ }, Et = function(t, e) {
429
+ for (var r = t.length - 1; r >= 0; r--)
430
+ if (t[r].id === e) {
431
+ t.splice(r, 1);
432
+ break;
433
+ }
434
+ }, ee, x = {
435
+ step: 2,
436
+ zIndex: 2e3,
437
+ globalScroll: !1,
438
+ // 是否打开全局滚动监听
439
+ modalFade: !0,
440
+ modalStack: [],
441
+ modalDom: null,
442
+ // 当前model挂载的div.
443
+ hasModal: !1,
444
+ // 当前是否有Modal
445
+ popLockClass: "popup-parent--hidden",
446
+ oldBodyBorder: "",
447
+ viewportWindow: null,
448
+ fixBodyBorder: function() {
449
+ var t = window.innerWidth - document.documentElement.clientWidth;
450
+ t && (this.oldBodyBorder = document.documentElement.style.borderRight, document.body.style.borderRight = "".concat(t, "px solid transparent"));
451
+ },
452
+ resetBodyBorder: function() {
453
+ document.body.style.borderRight = this.oldBodyBorder, this.oldBodyBorder = "";
454
+ },
455
+ /** 全局反注册 */
456
+ deregister: function(t) {
457
+ t && (L[t] = null, delete L[t]);
458
+ },
459
+ /** 返回全局实例 */
460
+ getInstance: function(t) {
461
+ return L[t];
462
+ },
463
+ /** 全局注册 仅vue-popup.ts中使用,instance就是vm, 把vm注册到 vm._popupId 这个键值上 */
464
+ register: function(t, e) {
465
+ t && e && (L[t] = e);
466
+ },
467
+ nextZIndex: function() {
468
+ var t = x.zIndex;
469
+ return x.zIndex += x.step, t;
470
+ },
471
+ /** 打开遮罩层, 仅vue-popup.ts中使用。 dom = vm.$el 或者 undefined (appendtoBody时) */
472
+ openModal: function(t, e, r, n, i) {
473
+ if (!le && !(!t || e === void 0)) {
474
+ this.modalFade = i;
475
+ for (var a = 0, s = this.modalStack.length; a < s; a++) {
476
+ var l = this.modalStack[a];
477
+ if (l.id === t)
478
+ return;
479
+ }
480
+ var u = ee();
481
+ if (F(u, M.modal), this.modalFade && !x.hasModal && F(u, M.enter), n) {
482
+ var c = n.trim().split(/\s+/);
483
+ c.forEach(function(f) {
484
+ return F(u, f);
485
+ });
486
+ }
487
+ setTimeout(function() {
488
+ j(u, M.enter);
489
+ }, 200), e && (u.style.zIndex = e.toString()), u.style.display = "", u.tabIndex = 0;
490
+ var d;
491
+ r && r.parentNode && r.parentNode.nodeType !== 11 ? d = r.parentNode : d = document.body, d.appendChild(u), this.modalStack.push({
492
+ id: t,
493
+ zIndex: e,
494
+ modalClass: n
495
+ });
496
+ }
497
+ },
498
+ /** 点击背景遮罩层时,调用栈顶的popup,调用它的close() */
499
+ doOnModalClick: function() {
500
+ var t = x.modalStack, e = t[t.length - 1];
501
+ if (e) {
502
+ var r = x.getInstance(e.id);
503
+ r && r.closeOnClickModal && typeof r.close == "function" && r.close();
504
+ }
505
+ },
506
+ closeModal: function(t) {
507
+ var e = this.modalStack, r = ee();
508
+ if (e.length > 0) {
509
+ var n = e[e.length - 1];
510
+ if (n.id === t) {
511
+ if (n.modalClass) {
512
+ var i = n.modalClass.trim().split(/\s+/);
513
+ i.forEach(function(s) {
514
+ return j(r, s);
515
+ });
516
+ }
517
+ e.pop();
518
+ var a = e.length;
519
+ a > 0 && (r.style.zIndex = e[a - 1].zIndex.toString());
520
+ } else
521
+ Et(e, t);
522
+ }
523
+ e.length === 0 && (this.modalFade && F(r, M.leave), j(document.body, this.popLockClass), this.resetBodyBorder(), setTimeout(function() {
524
+ e.length === 0 && (r.parentNode && r.parentNode.removeChild(r), r.style.display = "none", x.modalDom = null), j(r, M.leave);
525
+ }, 200));
526
+ }
527
+ };
528
+ ee = function() {
529
+ if (le)
530
+ return null;
531
+ var t = x.modalDom;
532
+ return t ? x.hasModal = !0 : (x.hasModal = !1, t = document.createElement("div"), x.modalDom = t, t.addEventListener("touchmove", function(e) {
533
+ e.preventDefault(), e.stopPropagation();
534
+ }, {
535
+ passive: !0
536
+ }), E(t, "click", function() {
537
+ x.doOnModalClick();
538
+ })), t;
539
+ };
540
+ le || E(window, "keydown", function(o) {
541
+ if (o.keyCode === St.Escape) {
542
+ var t = x.modalStack;
543
+ if (t.length > 0) {
544
+ var e = t[t.length - 1];
545
+ if (!e)
546
+ return;
547
+ var r = x.getInstance(e.id);
548
+ r && r.closeOnPressEscape && (r.handleClose ? r.handleClose("esc") : r.handleAction ? r.handleAction("cancel") : r.close());
549
+ }
550
+ }
551
+ });
552
+ const H = x;
553
+ var Pt = ["left", "right", "top", "bottom"], Ae = ["shift", "offset", "preventOverflow", "keepTogether", "arrow", "flip", "applyStyle"], Ct = {
554
+ arrowOffset: 0,
555
+ arrowElement: "[x-arrow]",
556
+ boundariesElement: "viewport",
557
+ boundariesPadding: 5,
558
+ flipBehavior: "flip",
559
+ // 全局没有修改过它,所以它一直是flip
560
+ forceAbsolute: !1,
561
+ gpuAcceleration: !0,
562
+ offset: 0,
563
+ placement: "bottom",
564
+ preventOverflowOrder: Pt,
565
+ modifiers: Ae,
566
+ // 此处是string数组, 构造函数调用之后转为函数数组
567
+ updateHiddenPopperOnScroll: !1
568
+ // 滚动过程中是否更新隐藏的弹出层位置
569
+ }, U = function(t, e) {
570
+ var r = function(i) {
571
+ return i !== "" && !isNaN(parseFloat(i)) && isFinite(i);
572
+ };
573
+ Object.keys(e).forEach(function(n) {
574
+ var i = "";
575
+ ~["width", "height", "top", "right", "bottom", "left"].indexOf(n) && r(e[n]) && (i = "px"), t.style[n] = e[n] + i;
576
+ });
577
+ }, J = function(t) {
578
+ var e = t.offsetParent;
579
+ return e === window.document.body || !e ? window.document.documentElement : e;
580
+ }, R = function(t, e) {
581
+ if (!(!t || t.nodeType !== 1)) {
582
+ var r = window.getComputedStyle(t, null);
583
+ return r[e];
584
+ }
585
+ }, Me = function(t) {
586
+ return t === window.document.body ? !1 : R(t, "position") === "fixed" ? !0 : t.parentNode ? Me(t.parentNode) : !1;
587
+ }, te = function(t) {
588
+ var e = t.getBoundingClientRect();
589
+ return {
590
+ left: e.left,
591
+ top: e.top,
592
+ right: e.right,
593
+ bottom: e.bottom,
594
+ width: e.right - e.left,
595
+ height: e.bottom - e.top
596
+ };
597
+ }, De = function(t) {
598
+ var e = ["scroll", "auto"];
599
+ return e.includes(R(t, "overflow")) || e.includes(R(t, "overflow-x")) || e.includes(R(t, "overflow-y"));
600
+ }, Ot = function(t) {
601
+ var e = document.createElement("div");
602
+ U(e, {
603
+ opacity: 0,
604
+ position: "fixed",
605
+ width: 1,
606
+ height: 1,
607
+ top: 0,
608
+ left: 0,
609
+ "z-index": "-99"
610
+ }), t.appendChild(e);
611
+ var r = te(e);
612
+ return t.removeChild(e), r;
613
+ }, $ = function(t) {
614
+ var e = t.parentNode;
615
+ return e ? e === window.document ? window.document.body.scrollTop || window.document.body.scrollLeft ? window.document.body : window.document.documentElement : De(e) ? e : $(e) : t;
616
+ }, Bt = function(t, e, r, n) {
617
+ var i = te(t), a = i.top, s = i.left, l = i.width, u = i.height;
618
+ if (r) {
619
+ if (n.parentElement) {
620
+ var c = Ot(n.parentElement), d = c.top, f = c.left;
621
+ a -= d, s -= f;
622
+ }
623
+ return {
624
+ top: a,
625
+ left: s,
626
+ bottom: a + u,
627
+ right: s + l,
628
+ width: l,
629
+ height: u
630
+ };
631
+ }
632
+ var p = te(e), v = {
633
+ top: a - p.top,
634
+ left: s - p.left,
635
+ bottom: a - p.top + u,
636
+ right: s - p.left + l,
637
+ width: l,
638
+ height: u
639
+ };
640
+ return v;
641
+ }, kt = function(t) {
642
+ return t === document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : t.scrollTop;
643
+ }, Nt = function(t) {
644
+ return t === document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : t.scrollLeft;
645
+ }, Tt = function(t, e) {
646
+ var r = Math.max(t.scrollHeight, t.offsetHeight, e.clientHeight, e.scrollHeight, e.offsetHeight), n = Math.max(t.scrollWidth, t.offsetWidth, e.clientWidth, e.scrollWidth, e.offsetWidth);
647
+ return {
648
+ width: n,
649
+ height: r
650
+ };
651
+ }, Z = function(t) {
652
+ var e = t.style.display, r = t.style.visibility;
653
+ t.style.display = "block", t.style.visibility = "hidden";
654
+ var n = window.getComputedStyle(t), i = parseFloat(n.marginTop) + parseFloat(n.marginBottom), a = parseFloat(n.marginLeft) + parseFloat(n.marginRight), s = {
655
+ width: t.offsetWidth + a,
656
+ height: t.offsetHeight + i
657
+ };
658
+ return t.style.display = e, t.style.visibility = r, s;
659
+ }, he = function(t) {
660
+ var e = {
661
+ left: "right",
662
+ right: "left",
663
+ bottom: "top",
664
+ top: "bottom"
665
+ };
666
+ return t.replace(/left|right|bottom|top/g, function(r) {
667
+ return e[r];
668
+ });
669
+ }, D = function(t) {
670
+ var e = A({}, t);
671
+ return e.right = e.left + e.width, e.bottom = e.top + e.height, e;
672
+ }, Fe = function(t) {
673
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], r = t.parentNode;
674
+ return r ? (De(r) && e.push(r), R(r, "position") === "fixed" ? e : Fe(r, e)) : e;
675
+ }, ve = function(t) {
676
+ var e = {
677
+ width: t.offsetWidth,
678
+ height: t.offsetHeight,
679
+ left: t.offsetLeft,
680
+ top: t.offsetTop,
681
+ right: 0,
682
+ bottom: 0
683
+ };
684
+ return e.right = e.left + e.width, e.bottom = e.top + e.height, e;
685
+ }, be = function(t) {
686
+ t.stopPropagation();
687
+ }, re;
688
+ Te || (re = new ResizeObserver(function(o) {
689
+ o.forEach(function(t) {
690
+ t.target.popperVm && t.contentRect.height > 50 && t.target.popperVm.update();
691
+ });
692
+ }));
693
+ var At = /* @__PURE__ */ function() {
694
+ function o(t, e, r) {
695
+ var n = this;
696
+ We(this, o), this.modifiers = {}, this.popperOuterSize = null, this._reference = t, this._popper = e, this.state = {}, this._options = A(A({}, Ct), r), this._options.modifierFns = Ae.map(function(i) {
697
+ return n[i];
698
+ }), this._popper.setAttribute("x-placement", this._options.placement), this.state.position = this._getPopperPositionByRefernce(this._reference), U(this._popper, {
699
+ position: this.state.position,
700
+ top: 0
701
+ }), this._popper && (this._popper.popperVm = this, re && re.observe(this._popper)), this.update(), this._setupEventListeners();
702
+ }
703
+ return Je(o, [{
704
+ key: "destroy",
705
+ value: function() {
706
+ return this._popper.removeAttribute("x-placement"), this._popper.style.display = "none", this._removeEventListeners(), this._options.removeOnDestroy && this._popper.remove(), this;
707
+ }
708
+ }, {
709
+ key: "onUpdate",
710
+ value: function(e) {
711
+ return this.state.updateCallback = e, this;
712
+ }
713
+ }, {
714
+ key: "update",
715
+ value: function() {
716
+ var e = {
717
+ instance: this,
718
+ styles: {}
719
+ };
720
+ this.stopEventBubble(), this.popperOuterSize = null, e.placement = e._originalPlacement = this._options.placement, e.offsets = this._getRefPopOffsets(this._popper, this._reference, e.placement), e.boundaries = this._getBoundaries(e, this._options.boundariesPadding, this._options.boundariesElement), e = this.runModifiers(e, this._options.modifierFns), typeof this.state.updateCallback == "function" && this.state.updateCallback(e);
721
+ }
722
+ // 阻止popper的mousewheel等事件冒泡。 通过 onxxx 绑定,是为了避免重复绑定事件
723
+ }, {
724
+ key: "stopEventBubble",
725
+ value: function() {
726
+ this._popper && (this._popper.onmousewheel || (this._popper.onmousewheel = be), this._popper.onwheel || (this._popper.onwheel = be));
727
+ }
728
+ /** 按顺序执行Modifiers, 如果传入终点modifier,则执行到指定位置 */
729
+ }, {
730
+ key: "runModifiers",
731
+ value: function(e, r, n) {
732
+ var i = this, a = r.slice(), s = this._options;
733
+ return n !== void 0 && (a = this._options.modifierFns.slice(0, s.modifierFns.findIndex(function(l) {
734
+ return l === n;
735
+ }))), a.forEach(function(l) {
736
+ nt(l) === "function" && (e = l.call(i, e));
737
+ }), e;
738
+ }
739
+ // 此时才把offsets.popper 赋值给popper dom, offsets.array赋值给array dom
740
+ }, {
741
+ key: "applyStyle",
742
+ value: function(e) {
743
+ var r = {
744
+ position: e.offsets.popper.position
745
+ }, n = Math.round(e.offsets.popper.left), i = Math.round(e.offsets.popper.top);
746
+ return this._options.gpuAcceleration ? (r.transform = "translate3d(".concat(n, "px, ").concat(i, "px, 0)"), Object.assign(r, {
747
+ top: 0,
748
+ left: 0
749
+ })) : Object.assign(r, {
750
+ top: i,
751
+ left: n
752
+ }), Object.assign(r, e.styles), U(this._popper, r), this._popper.setAttribute("x-placement", e.placement), e.offsets.arrow && U(e.arrowElement, e.offsets.arrow), e;
753
+ }
754
+ // 判断 placement是不是2段式的,是则处理一下偏移。 修改data.offsets.popper的值
755
+ }, {
756
+ key: "shift",
757
+ value: function(e) {
758
+ var r = e.placement, n = r.split("-")[0], i = r.split("-")[1];
759
+ if (i) {
760
+ var a = e.offsets.reference, s = a.top, l = a.left, u = a.height, c = a.width, d = D(e.offsets.popper), f = {
761
+ y: {
762
+ start: {
763
+ top: s
764
+ },
765
+ end: {
766
+ top: s + u - d.height
767
+ }
768
+ },
769
+ x: {
770
+ start: {
771
+ left: l
772
+ },
773
+ end: {
774
+ left: l + c - d.width
775
+ }
776
+ }
777
+ }, p = ~["bottom", "top"].indexOf(n) ? "x" : "y";
778
+ e.offsets.popper = Object.assign(d, f[p][i]);
779
+ }
780
+ return e;
781
+ }
782
+ // 校正popper的位置在boundaries 的内部
783
+ }, {
784
+ key: "preventOverflow",
785
+ value: function(e) {
786
+ if (this._options.ignoreBoundaries)
787
+ return e;
788
+ var r = this._options.preventOverflowOrder, n = D(e.offsets.popper), i = {
789
+ top: function() {
790
+ var s = n.top;
791
+ return s < e.boundaries.top && (s = Math.max(s, e.boundaries.top)), {
792
+ top: s
793
+ };
794
+ },
795
+ right: function() {
796
+ var s = n.left;
797
+ return n.right > e.boundaries.right && (s = Math.min(s, e.boundaries.right - n.width)), {
798
+ left: s
799
+ };
800
+ },
801
+ bottom: function() {
802
+ var s = n.top;
803
+ return n.bottom > e.boundaries.bottom && (s = Math.min(s, e.boundaries.bottom - n.height)), {
804
+ top: s
805
+ };
806
+ },
807
+ left: function() {
808
+ var s = n.left;
809
+ return n.left < e.boundaries.left && (s = Math.max(s, e.boundaries.left)), {
810
+ left: s
811
+ };
812
+ }
813
+ };
814
+ return r.forEach(function(a) {
815
+ e.offsets.popper = Object.assign(n, i[a]());
816
+ }), e;
817
+ }
818
+ // 校正popper的位置在reference的边上。 如果2个分离了,重新调整popper的位置。 可能是担心 modifiers.offset 带来的副作用吧
819
+ }, {
820
+ key: "keepTogether",
821
+ value: function(e) {
822
+ var r = D(e.offsets.popper), n = e.offsets.reference;
823
+ return r.right < Math.floor(n.left) && (e.offsets.popper.left = Math.floor(n.left) - r.width), r.left > Math.floor(n.right) && (e.offsets.popper.left = Math.floor(n.right)), r.bottom < Math.floor(n.top) && (e.offsets.popper.top = Math.floor(n.top) - r.height), r.top > Math.floor(n.bottom) && (e.offsets.popper.top = Math.floor(n.bottom)), e;
824
+ }
825
+ // 根据flip的策略,计算当前应该显示的位置。 空间不够要计算出flip的位置。 可能是担心preventOverflow 时,造成pop, reference会重叠。 重叠了就要flip一下
826
+ }, {
827
+ key: "flip",
828
+ value: function(e) {
829
+ var r = this;
830
+ if (e.flipped && e.placement === e._originalPlacement)
831
+ return e;
832
+ var n = e.placement.split("-"), i = n[0], a = he(i), s = n[1] || "", l = [i, a];
833
+ return l.forEach(function(u, c) {
834
+ if (!(i !== u || l.length === c + 1)) {
835
+ i = e.placement.split("-")[0], a = he(i);
836
+ var d = D(e.offsets.popper), f = ~["right", "bottom"].indexOf(i), p = Math.floor(e.offsets.reference[i]), v = Math.floor(d[a]);
837
+ (f && p > v || !f && p < v) && (e.flipped = !0, e.placement = l[c + 1], s && (e.placement += "-".concat(s)), e.offsets.popper = r._getRefPopOffsets(r._popper, r._reference, e.placement).popper, e = r.runModifiers(e, r._options.modifierFns, r.flip));
838
+ }
839
+ }), e;
840
+ }
841
+ // 根据入参option上的offset, 给data.offset.popper进行校正
842
+ }, {
843
+ key: "offset",
844
+ value: function(e) {
845
+ var r = this._options.offset, n = e.offsets.popper;
846
+ return ~e.placement.indexOf("left") ? n.top -= r : ~e.placement.indexOf("right") ? n.top += r : ~e.placement.indexOf("top") ? n.left -= r : ~e.placement.indexOf("bottom") && (n.left += r), e;
847
+ }
848
+ // 计算arrow的位置,保存在data.offsets.arrow ={top,left}
849
+ }, {
850
+ key: "arrow",
851
+ value: function(e) {
852
+ var r = this._options.arrowElement, n = this._options.arrowOffset;
853
+ if (typeof r == "string" && (r = this._popper.querySelector(r)), !r || !this._popper.contains(r))
854
+ return e;
855
+ var i = {}, a = e.placement.split("-")[0], s = D(e.offsets.popper), l = e.offsets.reference, u = ~["left", "right"].indexOf(a), c = u ? "height" : "width", d = u ? "bottom" : "right", f = u ? "left" : "top", p = u ? "top" : "left", v = this.popperOuterSize ? this.popperOuterSize : this.popperOuterSize = Z(this._popper), b = Z(r), _ = b[c];
856
+ l[d] - _ < s[p] && (e.offsets.popper[p] -= s[p] - (l[d] - _)), l[p] + _ > s[d] && (e.offsets.popper[p] += l[p] + _ - s[d]);
857
+ var m = l[p] + (n || l[c] / 2 - _ / 2), g = m - s[p];
858
+ g = Math.max(Math.min(s[c] - _ - 8, g), 8), i[p] = g, i[f] = "";
859
+ var P = this._options.placement.split("-");
860
+ return this._options.adjustArrow && ~["top", "bottom"].indexOf(P[0]) && p === "left" && (P[1] === "start" ? i.left = 8 : P[1] || (i.left = (v.width - b.width) / 2)), e.offsets.arrow = i, e.arrowElement = r, e;
861
+ }
862
+ /** 判断 reference 的 offsetParent 元素是fix还是abs, 这个值会赋值给popper 的dom */
863
+ }, {
864
+ key: "_getPopperPositionByRefernce",
865
+ value: function(e) {
866
+ if (this._options.forceAbsolute)
867
+ return "absolute";
868
+ var r = Me(e);
869
+ return r ? "fixed" : "absolute";
870
+ }
871
+ /** 实时计算一下popper, reference的 位置信息, 用于 */
872
+ }, {
873
+ key: "_getRefPopOffsets",
874
+ value: function(e, r, n) {
875
+ n = n.split("-")[0];
876
+ var i = {
877
+ position: this.state.position
878
+ }, a = i.position === "fixed", s = Bt(r, J(e), a, e), l = this.popperOuterSize ? this.popperOuterSize : this.popperOuterSize = Z(e), u = l.width, c = l.height;
879
+ return ~["right", "left"].indexOf(n) ? (i.top = s.top + s.height / 2 - c / 2, n === "left" ? i.left = s.left - u : i.left = s.right) : (i.left = s.left + s.width / 2 - u / 2, n === "top" ? i.top = s.top - c : i.top = s.bottom), i.width = u, i.height = c, {
880
+ popper: i,
881
+ reference: s
882
+ };
883
+ }
884
+ }, {
885
+ key: "_setupEventListeners",
886
+ value: function() {
887
+ var e = this;
888
+ if (this.state.updateBoundFn = this.update.bind(this), this.state.scrollUpdate = function() {
889
+ if (e._options.updateHiddenPopperOnScroll)
890
+ e.state.updateBoundFn();
891
+ else {
892
+ if (se(e._popper))
893
+ return;
894
+ e.state.updateBoundFn();
895
+ }
896
+ }, E(window, "resize", this.state.updateBoundFn), this._options.boundariesElement !== "window") {
897
+ var r, n, i, a = this._options.scrollParent || $(this._reference), s = [];
898
+ if ((r = a) !== null && r !== void 0 && (n = r.dataset) !== null && n !== void 0 && (i = n.tag) !== null && i !== void 0 && i.includes("-form")) {
899
+ s.push(a);
900
+ var l = $(a);
901
+ (l === window.document.body || l === window.document.documentElement) && (l = window), s.push(l);
902
+ }
903
+ if ((a === window.document.body || a === window.document.documentElement) && (a = window), this.state.scrollTarget = a, this._options.bubbling || H.globalScroll) {
904
+ var u = Fe(this._reference);
905
+ this.state.scrollTargets = u || [], u.forEach(function(c) {
906
+ E(c, "scroll", e.state.scrollUpdate);
907
+ });
908
+ } else
909
+ s.length ? (this.state.scrollTargets = s, s.forEach(function(c) {
910
+ E(c, "scroll", e.state.scrollUpdate);
911
+ })) : E(a, "scroll", this.state.scrollUpdate);
912
+ }
913
+ }
914
+ }, {
915
+ key: "_removeEventListeners",
916
+ value: function() {
917
+ var e = this;
918
+ if (B(window, "resize", this.state.updateBoundFn), this._options.boundariesElement !== "window" && this.state.scrollTarget && (B(this.state.scrollTarget, "scroll", this.state.scrollUpdate), this.state.scrollTarget = null, this._options.bubbling || H.globalScroll)) {
919
+ var r = this.state.scrollTargets || [];
920
+ r.forEach(function(n) {
921
+ B(n, "scroll", e.state.scrollUpdate);
922
+ }), this.state.scrollTargets = null;
923
+ }
924
+ this.state.updateBoundFn = null, this.state.scrollUpdate = null;
925
+ }
926
+ /** 实时计算一下Boundary的位置 */
927
+ }, {
928
+ key: "_getBoundaries",
929
+ value: function(e, r, n) {
930
+ var i = {
931
+ right: 0,
932
+ left: 0,
933
+ top: 0,
934
+ bottom: 0
935
+ };
936
+ if (n === "window" || n === "body") {
937
+ var a = window.document.body, s = window.document.documentElement, l = Tt(a, s), u = l.width, c = l.height;
938
+ i = {
939
+ top: 0,
940
+ right: u,
941
+ bottom: c,
942
+ left: 0
943
+ };
944
+ } else if (n === "viewport") {
945
+ var d = J(this._popper), f = $(this._popper), p = ve(d), v = e.offsets.popper.position === "fixed", b = v || !this._options.appendToBody && ["right", "left"].includes(this._options.placement), _ = b ? 0 : kt(f), m = b ? 0 : Nt(f), g = at.viewportWindow || H.viewportWindow || window;
946
+ i = {
947
+ top: 0 - (p.top - _),
948
+ right: g.document.documentElement.clientWidth - (p.left - m),
949
+ bottom: g.document.documentElement.clientHeight - (p.top - _),
950
+ left: 0 - (p.left - m)
951
+ };
952
+ } else if (J(this._popper) === n) {
953
+ var P = n.clientWidth, S = n.clientHeight;
954
+ i = {
955
+ right: P,
956
+ bottom: S,
957
+ top: 0,
958
+ left: 0
959
+ };
960
+ } else
961
+ i = ve(n);
962
+ return i.right -= r, i.left += r, i.bottom = i.bottom - r, i.top = i.top + r, i;
963
+ }
964
+ }]);
965
+ }();
966
+ const Mt = At;
967
+ var ye = function(t) {
968
+ return t.stopPropagation();
969
+ }, Dt = typeof window > "u", ge = function(t) {
970
+ var e = t.state, r = t.props, n = t.vm, i = t.slots, a = e.referenceElm || r.reference || n.$refs.reference && n.$refs.reference.$el || n.$refs.reference;
971
+ return !a && i.reference && i.reference()[0] && (e.referenceElm = i.reference()[0].elm || i.reference()[0].el, a = e.referenceElm), a;
972
+ }, Ft = function(t) {
973
+ if (!(!t || !t.nodeType)) {
974
+ var e = function(a) {
975
+ return parseInt(window.getComputedStyle(a).zIndex, 10) || 0;
976
+ }, r = e(t), n;
977
+ do {
978
+ if (t = t.parentNode, t)
979
+ n = e(t);
980
+ else
981
+ break;
982
+ r = n > r ? n : r;
983
+ } while (t !== document.body);
984
+ return r + 1 + "";
985
+ }
986
+ };
987
+ const jt = function(o) {
988
+ var t = o.parent, e = o.emit, r = o.nextTick, n = o.onBeforeUnmount, i = o.onDeactivated, a = o.props, s = o.watch, l = o.reactive, u = o.vm, c = o.slots, d = o.toRefs, f = o.popperVmRef, p = l({
989
+ popperJS: null,
990
+ appended: !1,
991
+ // arrow 是否添加
992
+ popperElm: null,
993
+ showPopper: a.manual ? !!a.modelValue : !1,
994
+ referenceElm: null,
995
+ currentPlacement: ""
996
+ }), v = function(y) {
997
+ if (!p.appended) {
998
+ p.appended = !0;
999
+ var h = document.createElement("div");
1000
+ h.setAttribute("x-arrow", ""), h.className = "popper__arrow", y.appendChild(h);
1001
+ }
1002
+ }, b = function(y) {
1003
+ var h = (a == null ? void 0 : a.popperOptions) || {}, k = h.followReferenceHide, N = k === void 0 ? !0 : k, K = y._popper, z = y._reference;
1004
+ N && se(z) && (K.style.display = "none");
1005
+ }, _ = function(y) {
1006
+ return a.zIndex === "relative" ? Ft(y) : H.nextZIndex();
1007
+ }, m = function(y) {
1008
+ if (!Dt && (p.currentPlacement = p.currentPlacement || a.placement, !!/^(top|bottom|left|right)(-start|-end)?$/g.test(p.currentPlacement))) {
1009
+ var h = a.popperOptions || {
1010
+ gpuAcceleration: !1
1011
+ };
1012
+ p.popperElm = p.popperElm || a.popper || u.$refs.popper || f.popper || y;
1013
+ var k = p.popperElm, N = ge({
1014
+ state: p,
1015
+ props: a,
1016
+ vm: u,
1017
+ slots: c
1018
+ });
1019
+ !k || !N || N.nodeType !== Node.ELEMENT_NODE || (a.visibleArrow && v(k), a.appendToBody || a.popperAppendToBody ? document.body.appendChild(p.popperElm) : (t && t.$el && t.$el.appendChild(p.popperElm), h.forceAbsolute = !0), h.placement = p.currentPlacement, h.offset = a.offset || 0, h.arrowOffset = a.arrowOffset || 0, h.adjustArrow = a.adjustArrow || !1, h.appendToBody = a.appendToBody || a.popperAppendToBody, p.popperJS = new Mt(N, k, h), e("created", p), typeof h.onUpdate == "function" && p.popperJS.onUpdate(h.onUpdate), p.popperJS._popper.style.zIndex = _(p.popperJS._reference), b(p.popperJS), E(p.popperElm, "click", ye));
1020
+ }
1021
+ }, g = function(y) {
1022
+ y && y !== !0 && (p.popperElm = y);
1023
+ var h = p.popperJS;
1024
+ h ? (h._reference = ge({
1025
+ state: p,
1026
+ props: a,
1027
+ vm: u,
1028
+ slots: c
1029
+ }), h.update(), h._popper && y !== !0 && (h._popper.style.zIndex = _(h._reference), b(p.popperJS))) : m(y && y !== !0 ? y : void 0);
1030
+ }, P = function(y) {
1031
+ !p.popperJS || p.showPopper && !y || (p.popperJS.destroy(), p.popperJS = null);
1032
+ }, S = function(y) {
1033
+ y && p.popperElm && p.popperElm.parentNode === document.body && (B(p.popperElm, "click", ye), p.popperElm.remove());
1034
+ };
1035
+ return s(function() {
1036
+ return p.showPopper;
1037
+ }, function(C) {
1038
+ a.disabled || (C && r(g), a.trigger === "manual" && e("update:modelValue", C));
1039
+ }), n(function() {
1040
+ r(function() {
1041
+ P(!0), (a.appendToBody || a.popperAppendToBody) && S("remove");
1042
+ });
1043
+ }), i(function() {
1044
+ P(!0), (a.appendToBody || a.popperAppendToBody) && S("remove");
1045
+ }), A({
1046
+ updatePopper: g,
1047
+ destroyPopper: S,
1048
+ doDestroy: P
1049
+ }, d(p));
1050
+ };
1051
+ var Rt = function() {
1052
+ var t = 4294967296;
1053
+ return window.crypto.getRandomValues(new window.Uint32Array(1))[0] / t;
1054
+ }, Vt = function() {
1055
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
1056
+ return t + Rt().toString().substr(2, e);
1057
+ }, je = ["state", "bindEvent", "hide", "show", "doDestroy", "handleFocus", "debounceClose", "handleShowPopper", "handleClosePopper", "setExpectedState", "updatePopper", "focusHandler"], Lt = function(t) {
1058
+ var e = t.reactive, r = t.showPopper, n = t.popperElm, i = t.referenceElm, a = t.props, s = t.inject, l = t.popperJS, u = t.currentPlacement;
1059
+ return e({
1060
+ popperJS: l,
1061
+ showPopper: r,
1062
+ popperElm: n,
1063
+ referenceElm: i,
1064
+ currentPlacement: u,
1065
+ timeout: null,
1066
+ focusing: !1,
1067
+ expectedState: void 0,
1068
+ tooltipId: Vt("tiny-tooltip-", 4),
1069
+ tabindex: a.tabindex,
1070
+ xPlacement: "bottom",
1071
+ showContent: s("showContent", null),
1072
+ tipsMaxWidth: s("tips-max-width", null)
1073
+ });
1074
+ }, Re = function(t, e, r) {
1075
+ var n = e.watch, i = e.toRefs, a = e.reactive, s = e.onBeforeUnmount, l = e.onDeactivated, u = e.onMounted, c = e.onUnmounted, d = e.inject, f = r.vm, p = r.emit, v = r.slots, b = r.nextTick, _ = r.parent, m = {}, g = {}, P = {
1076
+ emit: p,
1077
+ props: t,
1078
+ nextTick: b,
1079
+ toRefs: i,
1080
+ reactive: a,
1081
+ parent: _.$parent,
1082
+ vm: f,
1083
+ popperVmRef: g
1084
+ };
1085
+ Object.assign(P, {
1086
+ slots: v,
1087
+ onBeforeUnmount: s,
1088
+ onDeactivated: l,
1089
+ watch: n
1090
+ });
1091
+ var S = jt(P), C = S.showPopper, y = S.updatePopper, h = S.popperElm, k = S.referenceElm, N = S.doDestroy, K = S.popperJS, z = S.currentPlacement, w = Lt({
1092
+ reactive: a,
1093
+ showPopper: C,
1094
+ popperElm: h,
1095
+ referenceElm: k,
1096
+ props: t,
1097
+ inject: d,
1098
+ popperJS: K,
1099
+ currentPlacement: z
1100
+ });
1101
+ return Object.assign(m, {
1102
+ state: w,
1103
+ doDestroy: N,
1104
+ updatePopper: y,
1105
+ show: st({
1106
+ api: m,
1107
+ state: w,
1108
+ props: t
1109
+ }),
1110
+ hide: lt(m),
1111
+ destroyed: vt({
1112
+ state: w,
1113
+ api: m,
1114
+ vm: f
1115
+ }),
1116
+ bindPopper: _t({
1117
+ vm: f,
1118
+ nextTick: b,
1119
+ popperVmRef: g
1120
+ }),
1121
+ watchFocusing: yt(w),
1122
+ removeFocusing: ft({
1123
+ api: m,
1124
+ state: w
1125
+ }),
1126
+ handleBlur: ut({
1127
+ api: m,
1128
+ state: w
1129
+ }),
1130
+ handleFocus: pt({
1131
+ api: m,
1132
+ state: w
1133
+ }),
1134
+ debounceClose: bt({
1135
+ api: m,
1136
+ props: t
1137
+ }),
1138
+ setExpectedState: ht({
1139
+ state: w
1140
+ }),
1141
+ handleShowPopper: ct({
1142
+ props: t,
1143
+ state: w
1144
+ }),
1145
+ handleClosePopper: dt({
1146
+ api: m,
1147
+ props: t,
1148
+ state: w
1149
+ }),
1150
+ bindEvent: wt({
1151
+ api: m,
1152
+ state: w,
1153
+ vm: f
1154
+ }),
1155
+ focusHandler: gt({
1156
+ slots: v,
1157
+ api: m
1158
+ }),
1159
+ handleDocumentClick: mt({
1160
+ props: t,
1161
+ api: m,
1162
+ state: w,
1163
+ popperVmRef: g
1164
+ }),
1165
+ observeCallback: xt({
1166
+ state: w,
1167
+ popperVmRef: g
1168
+ })
1169
+ }), n(function() {
1170
+ return w.focusing;
1171
+ }, m.watchFocusing), n(function() {
1172
+ return t.modelValue;
1173
+ }, function(W) {
1174
+ return b(function() {
1175
+ return t.manual && (w.showPopper = W);
1176
+ });
1177
+ }), u(function() {
1178
+ if (m.bindPopper(), t.genArrowByHtml) {
1179
+ var W = {
1180
+ attributes: !0,
1181
+ childList: !1,
1182
+ subtree: !1
1183
+ };
1184
+ m.observer = new MutationObserver(m.observeCallback), m.observer.observe(g.popper, W);
1185
+ }
1186
+ }), f.$on("tooltip-update", m.bindPopper), c(function() {
1187
+ m.destroyed(), m.observer && m.observer.disconnect();
1188
+ }), m;
1189
+ };
1190
+ const It = oe({
1191
+ name: ne + "Tooltip",
1192
+ componentName: "Tooltip",
1193
+ props: {
1194
+ ...ie,
1195
+ visible: {
1196
+ type: String,
1197
+ default: () => "always",
1198
+ validator: (o) => ["always", "auto"].includes(o)
1199
+ },
1200
+ adjustArrow: {
1201
+ type: Boolean,
1202
+ default: () => !1
1203
+ },
1204
+ appendToBody: {
1205
+ type: Boolean,
1206
+ default: () => !0
1207
+ },
1208
+ arrowOffset: {
1209
+ type: Number,
1210
+ default: () => 0
1211
+ },
1212
+ boundariesPadding: {
1213
+ type: Number,
1214
+ default: () => 5
1215
+ },
1216
+ closeDelay: {
1217
+ type: Number,
1218
+ default: () => 300
1219
+ },
1220
+ content: {
1221
+ type: [String, Object]
1222
+ },
1223
+ disabled: {
1224
+ type: Boolean
1225
+ },
1226
+ effect: {
1227
+ type: String,
1228
+ default: () => "dark"
1229
+ },
1230
+ enterable: {
1231
+ type: Boolean,
1232
+ default: () => !0
1233
+ },
1234
+ hideAfter: {
1235
+ type: Number,
1236
+ default: () => 0
1237
+ },
1238
+ manual: {
1239
+ type: Boolean
1240
+ },
1241
+ modelValue: {
1242
+ type: Boolean
1243
+ },
1244
+ offset: {
1245
+ default: () => 0
1246
+ },
1247
+ openDelay: {
1248
+ type: Number,
1249
+ default: () => 0
1250
+ },
1251
+ placement: {
1252
+ type: String,
1253
+ default: () => "bottom"
1254
+ },
1255
+ popper: {},
1256
+ popperClass: {
1257
+ type: String
1258
+ },
1259
+ popperOptions: {
1260
+ default: () => ({
1261
+ gpuAcceleration: !1,
1262
+ boundariesPadding: 10
1263
+ })
1264
+ },
1265
+ pre: {
1266
+ type: Boolean
1267
+ },
1268
+ reference: {},
1269
+ renderContent: {
1270
+ type: Function
1271
+ },
1272
+ tabindex: {
1273
+ type: Number,
1274
+ default: () => 0
1275
+ },
1276
+ transition: {
1277
+ type: String,
1278
+ default: () => "tiny-fade-in-linear"
1279
+ },
1280
+ type: {
1281
+ type: String,
1282
+ validator: (o) => !!~["normal", "warning", "error", "info", "success"].indexOf(o)
1283
+ },
1284
+ visibleArrow: {
1285
+ type: Boolean,
1286
+ default: () => !0
1287
+ },
1288
+ zIndex: {
1289
+ type: String,
1290
+ default: () => "next"
1291
+ },
1292
+ contentMaxHeight: {
1293
+ type: String
1294
+ }
1295
+ },
1296
+ setup(o, t) {
1297
+ return Oe({
1298
+ props: o,
1299
+ context: t,
1300
+ renderless: Re,
1301
+ api: je
1302
+ });
1303
+ },
1304
+ render() {
1305
+ const o = arguments[0], t = (i) => {
1306
+ let a = i.slots.content && i.slots.content();
1307
+ if (a && (!Y.Comment || a[0].type !== Y.Comment))
1308
+ return a;
1309
+ let s;
1310
+ return i.renderContent ? s = i.renderContent(o, i.content) : i.pre ? s = i.content ? o("pre", i.content) : null : s = i.content, s;
1311
+ };
1312
+ if (!Object.prototype.hasOwnProperty.call(this, "popperVM")) {
1313
+ const i = {
1314
+ value: null
1315
+ };
1316
+ this.d({
1317
+ popperVM: {
1318
+ get: () => (i.value || (i.value = ae({
1319
+ el: document.createElement("div"),
1320
+ propsData: null,
1321
+ component: {
1322
+ render: () => {
1323
+ const a = t(this), s = typeof a == "string", l = {
1324
+ attrs: {
1325
+ name: this.transition
1326
+ },
1327
+ on: {
1328
+ "after-leave": this.doDestroy
1329
+ }
1330
+ }, u = "is-" + (this.type || this.effect || "dark"), c = () => this.setExpectedState(!0), d = () => {
1331
+ this.setExpectedState(!1), this.debounceClose();
1332
+ };
1333
+ return this.$nextTick(() => {
1334
+ !this.disabled && this.state.showPopper && a && this.updatePopper();
1335
+ }), o("transition", l, [o("div", {
1336
+ ref: "popper",
1337
+ attrs: {
1338
+ id: this.state.tooltipId,
1339
+ role: "tooltip",
1340
+ "aria-hidden": this.disabled || !this.state.showPopper ? "true" : "false"
1341
+ },
1342
+ directives: [{
1343
+ name: "show",
1344
+ value: !this.disabled && this.state.showPopper && a
1345
+ }],
1346
+ class: ["tiny-tooltip", "tiny-tooltip__popper", u, this.popperClass, {
1347
+ "tiny-tooltip__show-tips": this.state.showContent
1348
+ }],
1349
+ style: `max-width:${this.state.tipsMaxWidth}px`,
1350
+ on: {
1351
+ mouseenter: () => c(),
1352
+ mouseleave: () => d()
1353
+ }
1354
+ }, [s ? o("div", {
1355
+ class: "tiny-tooltip__content-wrapper",
1356
+ style: `max-height:${this.contentMaxHeight}`
1357
+ }, [a]) : a])]);
1358
+ }
1359
+ }
1360
+ })), i.value),
1361
+ set: (a) => i.value = a
1362
+ }
1363
+ });
1364
+ }
1365
+ const r = (() => {
1366
+ const i = this.slots.default && this.slots.default();
1367
+ if (!Array.isArray(i))
1368
+ return null;
1369
+ let a = null;
1370
+ for (let s = 0; s < i.length; s++) {
1371
+ const l = Be(i[s]);
1372
+ if (!ke(l)) {
1373
+ a = l;
1374
+ break;
1375
+ }
1376
+ }
1377
+ return a;
1378
+ })();
1379
+ if (!r)
1380
+ return null;
1381
+ const n = r.data || r.props || (r.props = {});
1382
+ return n.class = Ue("tiny-tooltip " + $e(n.class)), r;
1383
+ }
1384
+ });
1385
+ function Ve(o, t, e, r, n, i, a, s) {
1386
+ var l = typeof o == "function" ? o.options : o;
1387
+ t && (l.render = t, l.staticRenderFns = e, l._compiled = !0), r && (l.functional = !0), i && (l._scopeId = "data-v-" + i);
1388
+ var u;
1389
+ if (a ? (u = function(f) {
1390
+ f = f || // cached call
1391
+ this.$vnode && this.$vnode.ssrContext || // stateful
1392
+ this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !f && typeof __VUE_SSR_CONTEXT__ < "u" && (f = __VUE_SSR_CONTEXT__), n && n.call(this, f), f && f._registeredComponents && f._registeredComponents.add(a);
1393
+ }, l._ssrRegister = u) : n && (u = s ? function() {
1394
+ n.call(
1395
+ this,
1396
+ (l.functional ? this.parent : this).$root.$options.shadowRoot
1397
+ );
1398
+ } : n), u)
1399
+ if (l.functional) {
1400
+ l._injectStyles = u;
1401
+ var c = l.render;
1402
+ l.render = function(p, v) {
1403
+ return u.call(v), c(p, v);
1404
+ };
1405
+ } else {
1406
+ var d = l.beforeCreate;
1407
+ l.beforeCreate = d ? [].concat(d, u) : [u];
1408
+ }
1409
+ return {
1410
+ exports: o,
1411
+ options: l
1412
+ };
1413
+ }
1414
+ let Ht, Ut;
1415
+ const we = {};
1416
+ var $t = /* @__PURE__ */ Ve(
1417
+ It,
1418
+ Ht,
1419
+ Ut,
1420
+ !1,
1421
+ Kt,
1422
+ null,
1423
+ null,
1424
+ null
1425
+ );
1426
+ function Kt(o) {
1427
+ for (let t in we)
1428
+ this[t] = we[t];
1429
+ }
1430
+ const xe = /* @__PURE__ */ function() {
1431
+ return $t.exports;
1432
+ }();
1433
+ var O = {
1434
+ tooltip: "absolute bg-color-text-primary text-color-text-inverse shadow-none -left-[9999px] py-2 px-3 sm:py-1.5 sm:px-2 text-sm sm:text-xs leading-tight min-w-[theme(spacing.12)] max-w-[theme(spacing.80)] sm:max-w-[theme(spacing.112)] z-[2000] break-words rounded [&[x-placement^=top]]:mb-2.5 [&[x-placement^=bottom]]:mt-2.5 [&[x-placement^=right]]:ml-2.5 [&[x-placement^=left]]:mr-2.5",
1435
+ "tooltip-sm": "sm:bg-color-bg-1 sm:text-color-text-primary sm:shadow-md",
1436
+ arrow: 'drop-shadow-none absolute block w-0 h-0 border-[0.375rem] border-transparent border-solid after:absolute after:block after:w-0 after:h-0 after:border-[0.3125rem] after:border-transparent after:border-solid after:content-[""]',
1437
+ "placement-top": "-bottom-3 border-t-color-text-primary border-b-w-0 after:-bottom-1 after:-ml-1.5 after:border-t-color-text-primary after:border-b-w-0",
1438
+ "placement-bottom": "-top-3 border-t-w-0 border-b-color-text-primary after:-top-1 after:-ml-1.5 after:border-t-w-0 after:border-b-color-text-primary",
1439
+ "placement-right": "-left-3 border-r-color-text-primary border-l-w-0 after:-bottom-1 after:-left-1 after:border-r-color-text-primary after:border-l-w-0",
1440
+ "placement-left": "-right-1.5 border-l-color-text-primary border-r-0 after:-bottom-1 after:right-px after:-ml-1.5 after:border-l-color-text-primary after:border-r-0",
1441
+ "placement-top-sm": "sm:drop-shadow-[0_2px_2px_rgba(0,0,0,0.08)] sm:border-t-color-bg-1 sm:after:border-t-color-bg-1",
1442
+ "placement-bottom-sm": "sm:drop-shadow-[0_-2px_2px_rgba(0,0,0,0.08)] sm:border-b-color-bg-1 sm:after:border-b-color-bg-1",
1443
+ "placement-right-sm": "sm:drop-shadow-[-2px_0px_2px_rgba(0,0,0,0.08)] sm:border-r-color-bg-1 sm:after:border-r-color-bg-1",
1444
+ "placement-left-sm": "sm:drop-shadow-[2px_0_2px_rgba(0,0,0,0.08)] sm:border-l-color-bg-1 sm:after:border-l-color-bg-1",
1445
+ "placement-top-light": "border-t-color-bg-1 drop-shadow-[0_2px_2px_rgba(0,0,0,0.08)] after:border-t-color-bg-1",
1446
+ "placement-bottom-light": "border-b-color-bg-1 drop-shadow-[0_-2px_2px_rgba(0,0,0,0.08)] after:border-b-color-bg-1",
1447
+ "placement-left-light": "border-l-color-bg-1 drop-shadow-[2px_0_2px_rgba(0,0,0,0.08)] after:border-l-color-bg-1",
1448
+ "placement-right-light": "border-r-color-bg-1 drop-shadow-[-2px_0px_2px_rgba(0,0,0,0.08)] after:border-r-color-bg-1",
1449
+ "placement-top-dark": "border-t-color-text-primary after:border-t-color-text-primary",
1450
+ "placement-bottom-dark": "border-b-color-text-primary after:border-b-color-text-primary",
1451
+ "placement-left-dark": "border-l-color-text-primary after:border-l-color-text-primary",
1452
+ "placement-right-dark": "border-r-color-text-primary after:border-r-color-text-primary",
1453
+ "effect-dark": "bg-color-text-primary text-color-text-inverse shadow-none",
1454
+ "effect-light": "bg-color-bg-1 text-color-text-primary shadow-md",
1455
+ "is-warning": "text-color-text-inverse bg-color-warning border-color-warning",
1456
+ "is-error": "text-color-text-inverse bg-color-error border-color-error",
1457
+ "is-info": "text-color-text-inverse bg-color-info-secondary border-color-info-secondary",
1458
+ "is-success": "text-color-text-inverse bg-color-success border-color-success",
1459
+ "arrow-top-warning": "border-t-color-warning after:border-t-color-warning",
1460
+ "arrow-bottom-warning": "border-b-color-warning after:border-b-color-warning",
1461
+ "arrow-left-warning": "border-l-color-warning after:border-l-color-warning",
1462
+ "arrow-right-warning": "border-r-color-warning after:border-r-color-warning",
1463
+ "arrow-top-error": "border-t-color-error after:border-t-color-error",
1464
+ "arrow-bottom-error": "border-b-color-error after:border-b-color-error",
1465
+ "arrow-left-error": "border-l-color-error after:border-l-color-error",
1466
+ "arrow-right-error": "border-r-color-error after:border-r-color-error",
1467
+ "arrow-top-info": "border-t-color-info-secondary after:border-t-color-info-secondary",
1468
+ "arrow-bottom-info": "border-b-color-info-secondary after:border-b-color-info-secondary",
1469
+ "arrow-left-info": "border-l-color-info-secondary after:border-l-color-info-secondary",
1470
+ "arrow-right-info": "border-r-color-info-secondary after:border-r-color-info-secondary",
1471
+ "arrow-top-success": "border-t-color-success after:border-t-color-success",
1472
+ "arrow-bottom-success": "border-b-color-success after:border-b-color-success",
1473
+ "arrow-left-success": "border-l-color-success after:border-l-color-success",
1474
+ "arrow-right-success": "border-r-color-success after:border-r-color-success"
1475
+ };
1476
+ const zt = oe({
1477
+ name: ne + "Tooltip",
1478
+ componentName: "Tooltip",
1479
+ props: {
1480
+ ...ie,
1481
+ adjustArrow: {
1482
+ type: Boolean,
1483
+ default: () => !1
1484
+ },
1485
+ appendToBody: {
1486
+ type: Boolean,
1487
+ default: () => !0
1488
+ },
1489
+ arrowOffset: {
1490
+ type: Number,
1491
+ default: () => 0
1492
+ },
1493
+ boundariesPadding: {
1494
+ type: Number,
1495
+ default: () => 5
1496
+ },
1497
+ closeDelay: {
1498
+ type: Number,
1499
+ default: () => 100
1500
+ },
1501
+ content: {
1502
+ type: String
1503
+ },
1504
+ disabled: {
1505
+ type: Boolean
1506
+ },
1507
+ effect: {
1508
+ type: String,
1509
+ default: () => ""
1510
+ },
1511
+ enterable: {
1512
+ type: Boolean,
1513
+ default: () => !0
1514
+ },
1515
+ hideAfter: {
1516
+ type: Number,
1517
+ default: () => 0
1518
+ },
1519
+ manual: {
1520
+ type: Boolean
1521
+ },
1522
+ modelValue: {
1523
+ type: Boolean
1524
+ },
1525
+ offset: {
1526
+ default: () => 0
1527
+ },
1528
+ openDelay: {
1529
+ type: Number,
1530
+ default: () => 0
1531
+ },
1532
+ placement: {
1533
+ type: String,
1534
+ default: () => "bottom"
1535
+ },
1536
+ popper: {},
1537
+ popperClass: {
1538
+ type: String
1539
+ },
1540
+ popperOptions: {
1541
+ default: () => ({
1542
+ gpuAcceleration: !1,
1543
+ boundariesPadding: 10
1544
+ })
1545
+ },
1546
+ pre: {
1547
+ type: Boolean
1548
+ },
1549
+ reference: {},
1550
+ renderContent: {
1551
+ type: Function
1552
+ },
1553
+ tabindex: {
1554
+ type: Number,
1555
+ default: () => 0
1556
+ },
1557
+ transformOrigin: {
1558
+ type: [Boolean, String],
1559
+ default: () => !0
1560
+ },
1561
+ type: {
1562
+ type: String,
1563
+ validator: (o) => ~["normal", "warning", "error", "info", "success"].indexOf(o)
1564
+ },
1565
+ visibleArrow: {
1566
+ type: Boolean,
1567
+ default: () => !0
1568
+ },
1569
+ genArrowByHtml: {
1570
+ type: Boolean,
1571
+ default: () => !0
1572
+ },
1573
+ zIndex: {
1574
+ type: String,
1575
+ default: () => "next"
1576
+ }
1577
+ },
1578
+ setup(o, t) {
1579
+ return Oe({
1580
+ props: o,
1581
+ context: t,
1582
+ renderless: Re,
1583
+ api: je
1584
+ });
1585
+ },
1586
+ render() {
1587
+ const o = arguments[0], t = (s) => {
1588
+ let l = s.slots.content && s.slots.content();
1589
+ if (l)
1590
+ return l;
1591
+ let u;
1592
+ return s.renderContent ? u = s.renderContent(o, s.content) : s.pre ? u = s.content ? o("pre", {
1593
+ class: "whitespace-pre-wrap"
1594
+ }, s.content) : null : u = s.content, u;
1595
+ };
1596
+ if (!Object.hasOwnProperty.call(this, "popperVM")) {
1597
+ const s = {
1598
+ value: null
1599
+ };
1600
+ this.d({
1601
+ popperVM: {
1602
+ get: () => (s.value || (s.value = ae({
1603
+ el: document.createElement("div"),
1604
+ component: {
1605
+ render: () => {
1606
+ let l = t(this), u = {
1607
+ on: {
1608
+ "after-leave": this.doDestroy
1609
+ }
1610
+ }, c = () => this.setExpectedState(!0), d = () => {
1611
+ this.setExpectedState(!1), this.debounceClose();
1612
+ };
1613
+ const f = this.state.xPlacement || "";
1614
+ return o("transition", u, [o("div", {
1615
+ attrs: {
1616
+ "data-tag": "tiny-tooltip",
1617
+ id: this.state.tooltipId,
1618
+ appendToBody: this.appendToBody,
1619
+ role: "tooltip",
1620
+ "aria-hidden": this.disabled || !this.state.showPopper ? "true" : "false"
1621
+ },
1622
+ ref: "popper",
1623
+ directives: [{
1624
+ name: "show",
1625
+ value: !this.disabled && this.state.showPopper && l
1626
+ }],
1627
+ class: ue([O.tooltip, !this.effect && !this.type && O["tooltip-sm"], this.effect && O[`effect-${this.effect}`], this.type && O[`is-${this.type}`], this.disabled || !this.state.showPopper ? "hidden" : "", this.popperClass]),
1628
+ on: {
1629
+ mouseenter: () => c(),
1630
+ mouseleave: () => d()
1631
+ }
1632
+ }, [l, this.visibleArrow ? o("div", {
1633
+ attrs: {
1634
+ "x-arrow": !0
1635
+ },
1636
+ class: ue([O.arrow, O["placement-" + f.split("-")[0]], !this.effect && !this.type && O["placement-" + f.split("-")[0] + "-sm"], this.effect === "light" ? O["placement-" + f.split("-")[0] + "-light"] : "", this.effect === "dark" ? O["placement-" + f.split("-")[0] + "-dark"] : "", this.type ? O[`arrow-${f.split("-")[0]}-${this.type}`] : ""])
1637
+ }) : ""])]);
1638
+ }
1639
+ }
1640
+ })), s.value),
1641
+ set: (l) => s.value = l
1642
+ }
1643
+ });
1644
+ }
1645
+ const e = (s, l) => {
1646
+ const u = (p) => p && p.trim(), c = (p) => {
1647
+ const v = [];
1648
+ return p.forEach((b) => {
1649
+ b && typeof b == "string" ? v.push(u(b)) : b && typeof b == "object" && v.push(d(b));
1650
+ }), v.join(" ");
1651
+ }, d = (p) => {
1652
+ const v = [];
1653
+ return Object.keys(p).forEach((b) => {
1654
+ p[b] && v.push(b);
1655
+ }), v.join(" ");
1656
+ };
1657
+ let f = "";
1658
+ return s && (typeof s == "string" ? f = f + u(s) : Array.isArray(s) ? f = f + c(s) : typeof s == "object" && (f = f + d(s))), u(f.replace(l, ""));
1659
+ }, r = (s) => "tiny-tooltip " + e(s, /\btiny-tooltip\b/g), i = (() => {
1660
+ const s = this.slots.default && this.slots.default();
1661
+ if (!Array.isArray(s))
1662
+ return null;
1663
+ let l = null;
1664
+ for (let u = 0; u < s.length; u++) {
1665
+ const c = Be(s[u]);
1666
+ if (!ke(c)) {
1667
+ l = c;
1668
+ break;
1669
+ }
1670
+ }
1671
+ return l;
1672
+ })();
1673
+ if (!i)
1674
+ return null;
1675
+ const a = i.data || i.props || (i.props = {});
1676
+ return a.class = r(a.class), i;
1677
+ }
1678
+ });
1679
+ let Wt, Jt;
1680
+ const _e = {};
1681
+ var Zt = /* @__PURE__ */ Ve(
1682
+ zt,
1683
+ Wt,
1684
+ Jt,
1685
+ !1,
1686
+ Xt,
1687
+ null,
1688
+ null,
1689
+ null
1690
+ );
1691
+ function Xt(o) {
1692
+ for (let t in _e)
1693
+ this[t] = _e[t];
1694
+ }
1695
+ const Qt = /* @__PURE__ */ function() {
1696
+ return Zt.exports;
1697
+ }();
1698
+ var qt = function(t) {
1699
+ var e, r = (typeof process > "u" ? "undefined" : G(process)) === "object" ? (e = process.env) === null || e === void 0 ? void 0 : e.TINY_MODE : null;
1700
+ return (r || t) === "pc" ? xe : (r || t) === "mobile-first" ? Qt : xe;
1701
+ }, Yt = A(A({}, ie), {}, {
1702
+ visible: {
1703
+ type: String,
1704
+ default: function() {
1705
+ return "always";
1706
+ },
1707
+ validator: function(t) {
1708
+ return ["always", "auto"].includes(t);
1709
+ }
1710
+ },
1711
+ adjustArrow: {
1712
+ type: Boolean,
1713
+ default: function() {
1714
+ return !1;
1715
+ }
1716
+ },
1717
+ appendToBody: {
1718
+ type: Boolean,
1719
+ default: function() {
1720
+ return !0;
1721
+ }
1722
+ },
1723
+ arrowOffset: {
1724
+ type: Number,
1725
+ default: function() {
1726
+ return 0;
1727
+ }
1728
+ },
1729
+ content: {
1730
+ type: [String, Object]
1731
+ },
1732
+ disabled: {
1733
+ type: Boolean
1734
+ },
1735
+ enterable: {
1736
+ type: Boolean,
1737
+ default: function() {
1738
+ return !0;
1739
+ }
1740
+ },
1741
+ hideAfter: {
1742
+ type: Number,
1743
+ default: function() {
1744
+ return 0;
1745
+ }
1746
+ },
1747
+ manual: {
1748
+ type: Boolean
1749
+ },
1750
+ modelValue: {
1751
+ type: Boolean
1752
+ },
1753
+ offset: {
1754
+ default: function() {
1755
+ return 0;
1756
+ }
1757
+ },
1758
+ effect: {
1759
+ type: String,
1760
+ default: function() {
1761
+ return "";
1762
+ }
1763
+ },
1764
+ openDelay: {
1765
+ type: Number,
1766
+ default: function() {
1767
+ return 0;
1768
+ }
1769
+ },
1770
+ closeDelay: {
1771
+ type: Number,
1772
+ default: function() {
1773
+ return 100;
1774
+ }
1775
+ },
1776
+ placement: {
1777
+ type: String,
1778
+ default: function() {
1779
+ return "bottom";
1780
+ }
1781
+ },
1782
+ popper: {},
1783
+ popperClass: {
1784
+ type: String
1785
+ },
1786
+ popperOptions: {
1787
+ default: function() {
1788
+ return {};
1789
+ }
1790
+ },
1791
+ pre: {
1792
+ type: Boolean
1793
+ },
1794
+ reference: {},
1795
+ renderContent: {
1796
+ type: Function
1797
+ },
1798
+ tabindex: {
1799
+ type: Number,
1800
+ default: function() {
1801
+ return 0;
1802
+ }
1803
+ },
1804
+ transition: {
1805
+ type: String,
1806
+ default: function() {
1807
+ return "tiny-fade-in-linear";
1808
+ }
1809
+ },
1810
+ type: {
1811
+ type: String,
1812
+ validator: function(t) {
1813
+ return !!~["normal", "warning", "error", "info", "success"].indexOf(t);
1814
+ }
1815
+ },
1816
+ visibleArrow: {
1817
+ type: Boolean,
1818
+ default: function() {
1819
+ return !0;
1820
+ }
1821
+ },
1822
+ genArrowByHtml: {
1823
+ type: Boolean,
1824
+ default: function() {
1825
+ return !0;
1826
+ }
1827
+ },
1828
+ zIndex: {
1829
+ type: String,
1830
+ default: function() {
1831
+ return "next";
1832
+ }
1833
+ },
1834
+ contentMaxHeight: {
1835
+ type: String
1836
+ }
1837
+ });
1838
+ const T = oe({
1839
+ name: ne + "Tooltip",
1840
+ componentName: "Tooltip",
1841
+ props: Yt,
1842
+ setup: function(t, e) {
1843
+ return Ke({
1844
+ props: t,
1845
+ context: e,
1846
+ template: qt
1847
+ });
1848
+ }
1849
+ }), Gt = "3.19.0";
1850
+ T.model = {
1851
+ prop: "modelValue",
1852
+ event: "update:modelValue"
1853
+ };
1854
+ T.install = function(o) {
1855
+ o.component(T.name, T);
1856
+ };
1857
+ T.version = Gt;
1858
+ typeof window < "u" && window.Vue && T.install(window.Vue);
1859
+ var er = 2, V = {
1860
+ value: null
1861
+ }, X = Y.ref(""), tr = function(t) {
1862
+ return (t == null ? void 0 : t.textContent) && (t.scrollWidth > t.clientWidth || t.scrollHeight - t.clientHeight > er);
1863
+ }, rr = function(t) {
1864
+ var e;
1865
+ return !!(!(t == null || (e = t.boundingValue) === null || e === void 0) && e.always);
1866
+ }, Q = function(t) {
1867
+ var e;
1868
+ return (t == null || (e = t.boundingValue) === null || e === void 0 ? void 0 : e.effect) === "dark";
1869
+ }, q = function(t) {
1870
+ var e;
1871
+ return ((e = t.boundingValue) === null || e === void 0 ? void 0 : e.placement) || "top";
1872
+ }, Le = function(t) {
1873
+ var e = t.currentTarget;
1874
+ if (e.boundingValue && (rr(e) || tr(e))) {
1875
+ var r, n;
1876
+ if (!V.value) {
1877
+ var i;
1878
+ X.value = ((i = e.boundingValue) === null || i === void 0 ? void 0 : i.content) || e.textContent, V.value = ae({
1879
+ el: document.createElement("div"),
1880
+ propsData: {
1881
+ renderContent: function() {
1882
+ return ze("span", {
1883
+ class: "tiny-directive-tip__content"
1884
+ }, X.value);
1885
+ },
1886
+ placement: q(e),
1887
+ effect: Q(e) ? "dark" : "light"
1888
+ },
1889
+ component: T
1890
+ });
1891
+ }
1892
+ var a = V.value, s = a.state.popperElm;
1893
+ X.value = ((r = e.boundingValue) === null || r === void 0 ? void 0 : r.content) || e.textContent, a.state.referenceElm = e, a.state.currentPlacement = q(e), s && s.classList.replace("is-".concat(Q(e) ? "light" : "dark"), "is-".concat(Q(e) ? "dark" : "light")), a.show(), (n = a.state.popperJS) !== null && n !== void 0 && n._options && (a.state.popperJS._options.placement = q(e)), a.updatePopper();
1894
+ }
1895
+ }, Ie = function() {
1896
+ V.value && V.value.hide();
1897
+ }, I = function(t, e) {
1898
+ var r, n = e.value, i = n === void 0 ? {} : n;
1899
+ t.boundingValue = i, i && !((r = t.boundingValue) !== null && r !== void 0 && r.listened) && (t.addEventListener("mouseenter", Le), t.addEventListener("mouseleave", Ie), t.boundingValue.listened = !0);
1900
+ }, Se = function(t) {
1901
+ var e;
1902
+ (e = t.boundingValue) !== null && e !== void 0 && e.listened && (t.removeEventListener("mouseenter", Le), t.removeEventListener("mouseleave", Ie));
1903
+ };
1904
+ const sr = {
1905
+ bind: I,
1906
+ unbind: Se,
1907
+ update: I,
1908
+ beforeMount: I,
1909
+ unmounted: Se,
1910
+ updated: I
1911
+ };
1912
+ function He(o, t) {
1913
+ for (var e = document.createTreeWalker(o, NodeFilter.SHOW_TEXT), r = []; e.nextNode(); ) {
1914
+ var n = e.currentNode;
1915
+ t(n) && r.push(n);
1916
+ }
1917
+ return r;
1918
+ }
1919
+ function or(o, t, e) {
1920
+ t.forEach(function(r) {
1921
+ var n = r.textContent, i = n.toLowerCase().indexOf(e.toLowerCase()), a = n.substring(0, i), s = n.substring(i + e.length);
1922
+ r.textContent = a;
1923
+ var l = document.createElement("span");
1924
+ l.classList.add("tiny-hl-query-node"), l.textContent = e;
1925
+ var u = document.createTextNode(s);
1926
+ r.after(l, u);
1927
+ }), t.length && pe(o, e);
1928
+ }
1929
+ function nr(o) {
1930
+ var t = /* @__PURE__ */ new Set();
1931
+ o.forEach(function(e) {
1932
+ var r;
1933
+ return t.add((r = e.parentElement) === null || r === void 0 ? void 0 : r.parentElement);
1934
+ }), t.forEach(function(e) {
1935
+ e.innerText = e.textContent;
1936
+ });
1937
+ }
1938
+ function pe(o, t) {
1939
+ if (t) {
1940
+ var e = He(o, function(r) {
1941
+ if (r.parentElement.classList.contains("tiny-hl-query-node"))
1942
+ return !1;
1943
+ var n = r.textContent || "";
1944
+ return n.toLowerCase().includes(t.toLowerCase());
1945
+ });
1946
+ or(o, e, t);
1947
+ }
1948
+ }
1949
+ function ir(o) {
1950
+ var t = He(o, function(e) {
1951
+ return e.parentElement.classList.contains("tiny-hl-query-node");
1952
+ });
1953
+ nr(t);
1954
+ }
1955
+ var Ee = function(t, e) {
1956
+ t.classList.toggle("tiny-hl-query", !0);
1957
+ var r = e.value;
1958
+ pe(t, r);
1959
+ }, Pe = function(t) {
1960
+ ir(t);
1961
+ }, Ce = function(t, e) {
1962
+ var r = e.value;
1963
+ pe(t, r);
1964
+ };
1965
+ const lr = {
1966
+ mounted: Ee,
1967
+ beforeUpdate: Pe,
1968
+ updated: Ce,
1969
+ // vue2周期
1970
+ inserted: Ee,
1971
+ update: Pe,
1972
+ componentUpdated: Ce
1973
+ };
1974
+ export {
1975
+ sr as AutoTip,
1976
+ lr as HighlightQuery
1977
+ };