@validol4ik/uikit 0.7.4 → 0.7.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,10 +1,10 @@
1
- import { ref as T, onMounted as te, watch as S, computed as E, getCurrentInstance as R, nextTick as I, onBeforeUnmount as z, onUnmounted as Oe, h as K, Teleport as Ie, onDeactivated as Te, Transition as Ke } from "vue";
2
- import { i as Ne, P as Qe, b as _e, c as Se, r as je, a as Ue } from "./focusout-DjvPXP_b.js";
3
- import { p as se, D as ce, k as Ce, E as Ge, m as J, F as Xe, c as He, G as B, H as ke, I as Ye, J as de, u as Je, a as Ze, K as et, L as tt, h as ot, o as nt, s as lt } from "./index-B8rGKrFf.js";
4
- let X, V = 0;
5
- const w = new Array(256);
1
+ import { ref as T, onMounted as oe, watch as S, computed as E, getCurrentInstance as R, nextTick as I, onBeforeUnmount as z, onUnmounted as Ie, h as Q, Teleport as Qe, onDeactivated as Se, Transition as _e } from "vue";
2
+ import { i as Ke, P as Ne, b as je, c as Ce, r as Ue, a as Ge } from "./focusout-DjvPXP_b.js";
3
+ import { p as ce, D as de, k as Pe, E as Xe, m as Z, F as Ye, G as X, c as He, H as ke, I as Je, J as fe, u as Ze, a as et, K as tt, h as ot, o as nt, s as lt } from "./index-DgY0kstn.js";
4
+ let Y, V = 0;
5
+ const y = new Array(256);
6
6
  for (let e = 0; e < 256; e++)
7
- w[e] = (e + 256).toString(16).substring(1);
7
+ y[e] = (e + 256).toString(16).substring(1);
8
8
  const it = (() => {
9
9
  const e = typeof crypto < "u" ? crypto : typeof window < "u" ? window.crypto || window.msCrypto : void 0;
10
10
  if (e !== void 0) {
@@ -22,49 +22,49 @@ const it = (() => {
22
22
  o.push(Math.floor(Math.random() * 256));
23
23
  return o;
24
24
  };
25
- })(), fe = 4096;
26
- function Z() {
27
- (X === void 0 || V + 16 > fe) && (V = 0, X = it(fe));
28
- const e = Array.prototype.slice.call(X, V, V += 16);
29
- return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, w[e[0]] + w[e[1]] + w[e[2]] + w[e[3]] + "-" + w[e[4]] + w[e[5]] + "-" + w[e[6]] + w[e[7]] + "-" + w[e[8]] + w[e[9]] + "-" + w[e[10]] + w[e[11]] + w[e[12]] + w[e[13]] + w[e[14]] + w[e[15]];
25
+ })(), me = 4096;
26
+ function ee() {
27
+ (Y === void 0 || V + 16 > me) && (V = 0, Y = it(me));
28
+ const e = Array.prototype.slice.call(Y, V, V += 16);
29
+ return e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128, y[e[0]] + y[e[1]] + y[e[2]] + y[e[3]] + "-" + y[e[4]] + y[e[5]] + "-" + y[e[6]] + y[e[7]] + "-" + y[e[8]] + y[e[9]] + "-" + y[e[10]] + y[e[11]] + y[e[12]] + y[e[13]] + y[e[14]] + y[e[15]];
30
30
  }
31
- function at(e) {
31
+ function ut(e) {
32
32
  return e ?? null;
33
33
  }
34
- function me(e, t) {
35
- return e ?? (t === !0 ? `f_${Z()}` : null);
34
+ function he(e, t) {
35
+ return e ?? (t === !0 ? `f_${ee()}` : null);
36
36
  }
37
- function Nt({ getValue: e, required: t = !0 } = {}) {
38
- if (Ne.value === !0) {
39
- const o = e !== void 0 ? T(at(e())) : T(null);
40
- return t === !0 && o.value === null && te(() => {
41
- o.value = `f_${Z()}`;
37
+ function Kt({ getValue: e, required: t = !0 } = {}) {
38
+ if (Ke.value === !0) {
39
+ const o = e !== void 0 ? T(ut(e())) : T(null);
40
+ return t === !0 && o.value === null && oe(() => {
41
+ o.value = `f_${ee()}`;
42
42
  }), e !== void 0 && S(e, (n) => {
43
- o.value = me(n, t);
43
+ o.value = he(n, t);
44
44
  }), o;
45
45
  }
46
- return e !== void 0 ? E(() => me(e(), t)) : T(`f_${Z()}`);
46
+ return e !== void 0 ? E(() => he(e(), t)) : T(`f_${ee()}`);
47
47
  }
48
48
  let W = [], D = [];
49
- function Pe(e) {
49
+ function Me(e) {
50
50
  D = D.filter((t) => t !== e);
51
51
  }
52
- function ut(e) {
53
- Pe(e), D.push(e);
52
+ function at(e) {
53
+ Me(e), D.push(e);
54
54
  }
55
- function he(e) {
56
- Pe(e), D.length === 0 && W.length !== 0 && (W[W.length - 1](), W = []);
55
+ function ve(e) {
56
+ Me(e), D.length === 0 && W.length !== 0 && (W[W.length - 1](), W = []);
57
57
  }
58
58
  function rt(e) {
59
59
  D.length === 0 ? e() : W.push(e);
60
60
  }
61
- function Qt(e) {
61
+ function Nt(e) {
62
62
  W = W.filter((t) => t !== e);
63
63
  }
64
64
  function st() {
65
65
  if (window.getSelection !== void 0) {
66
66
  const e = window.getSelection();
67
- e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), Qe.is.mobile !== !0 && e.addRange(document.createRange()));
67
+ e.empty !== void 0 ? e.empty() : e.removeAllRanges !== void 0 && (e.removeAllRanges(), Ne.is.mobile !== !0 && e.addRange(document.createRange()));
68
68
  } else document.selection !== void 0 && document.selection.empty();
69
69
  }
70
70
  const ct = {
@@ -86,47 +86,47 @@ function ft({
86
86
  // optional
87
87
  }) {
88
88
  const { props: n, proxy: l, emit: f } = R(), i = T(null);
89
- let u = null;
90
- function m(a) {
91
- return i.value === null ? !1 : a === void 0 || a.touches === void 0 || a.touches.length <= 1;
89
+ let a = null;
90
+ function m(u) {
91
+ return i.value === null ? !1 : u === void 0 || u.touches === void 0 || u.touches.length <= 1;
92
92
  }
93
93
  const c = {};
94
94
  o === void 0 && (Object.assign(c, {
95
- hide(a) {
96
- l.hide(a);
95
+ hide(u) {
96
+ l.hide(u);
97
97
  },
98
- toggle(a) {
99
- l.toggle(a), a.qAnchorHandled = !0;
98
+ toggle(u) {
99
+ l.toggle(u), u.qAnchorHandled = !0;
100
100
  },
101
- toggleKey(a) {
102
- Ce(a, 13) === !0 && c.toggle(a);
101
+ toggleKey(u) {
102
+ Pe(u, 13) === !0 && c.toggle(u);
103
103
  },
104
- contextClick(a) {
105
- l.hide(a), se(a), I(() => {
106
- l.show(a), a.qAnchorHandled = !0;
104
+ contextClick(u) {
105
+ l.hide(u), ce(u), I(() => {
106
+ l.show(u), u.qAnchorHandled = !0;
107
107
  });
108
108
  },
109
- prevent: se,
110
- mobileTouch(a) {
111
- if (c.mobileCleanup(a), m(a) !== !0) return;
112
- l.hide(a), i.value.classList.add("non-selectable");
113
- const d = a.target;
114
- ce(c, "anchor", [
109
+ prevent: ce,
110
+ mobileTouch(u) {
111
+ if (c.mobileCleanup(u), m(u) !== !0) return;
112
+ l.hide(u), i.value.classList.add("non-selectable");
113
+ const d = u.target;
114
+ de(c, "anchor", [
115
115
  [d, "touchmove", "mobileCleanup", "passive"],
116
116
  [d, "touchend", "mobileCleanup", "passive"],
117
117
  [d, "touchcancel", "mobileCleanup", "passive"],
118
118
  [i.value, "contextmenu", "prevent", "notPassive"]
119
- ]), u = setTimeout(() => {
120
- u = null, l.show(a), a.qAnchorHandled = !0;
119
+ ]), a = setTimeout(() => {
120
+ a = null, l.show(u), u.qAnchorHandled = !0;
121
121
  }, 300);
122
122
  },
123
- mobileCleanup(a) {
124
- i.value.classList.remove("non-selectable"), u !== null && (clearTimeout(u), u = null), e.value === !0 && a !== void 0 && st();
123
+ mobileCleanup(u) {
124
+ i.value.classList.remove("non-selectable"), a !== null && (clearTimeout(a), a = null), e.value === !0 && u !== void 0 && st();
125
125
  }
126
- }), o = function(a = n.contextMenu) {
126
+ }), o = function(u = n.contextMenu) {
127
127
  if (n.noParentEvent === !0 || i.value === null) return;
128
128
  let d;
129
- a === !0 ? l.$q.platform.is.mobile === !0 ? d = [
129
+ u === !0 ? l.$q.platform.is.mobile === !0 ? d = [
130
130
  [i.value, "touchstart", "mobileTouch", "passive"]
131
131
  ] : d = [
132
132
  [i.value, "mousedown", "hide", "passive"],
@@ -134,13 +134,13 @@ function ft({
134
134
  ] : d = [
135
135
  [i.value, "click", "toggle", "passive"],
136
136
  [i.value, "keyup", "toggleKey", "passive"]
137
- ], ce(c, "anchor", d);
137
+ ], de(c, "anchor", d);
138
138
  });
139
139
  function s() {
140
- Ge(c, "anchor");
140
+ Xe(c, "anchor");
141
141
  }
142
- function g(a) {
143
- for (i.value = a; i.value.classList.contains("q-anchor--skip"); )
142
+ function g(u) {
143
+ for (i.value = u; i.value.classList.contains("q-anchor--skip"); )
144
144
  i.value = i.value.parentNode;
145
145
  o();
146
146
  }
@@ -150,26 +150,26 @@ function ft({
150
150
  else if (n.target === !0)
151
151
  g(l.$el.parentNode);
152
152
  else {
153
- let a = n.target;
153
+ let u = n.target;
154
154
  if (typeof n.target == "string")
155
155
  try {
156
- a = document.querySelector(n.target);
156
+ u = document.querySelector(n.target);
157
157
  } catch {
158
- a = void 0;
158
+ u = void 0;
159
159
  }
160
- a != null ? (i.value = a.$el || a, o()) : (i.value = null, console.error(`Anchor: target "${n.target}" not found`));
160
+ u != null ? (i.value = u.$el || u, o()) : (i.value = null, console.error(`Anchor: target "${n.target}" not found`));
161
161
  }
162
162
  }
163
- return S(() => n.contextMenu, (a) => {
164
- i.value !== null && (s(), o(a));
163
+ return S(() => n.contextMenu, (u) => {
164
+ i.value !== null && (s(), o(u));
165
165
  }), S(() => n.target, () => {
166
166
  i.value !== null && s(), p();
167
- }), S(() => n.noParentEvent, (a) => {
168
- i.value !== null && (a === !0 ? s() : o());
169
- }), te(() => {
167
+ }), S(() => n.noParentEvent, (u) => {
168
+ i.value !== null && (u === !0 ? s() : o());
169
+ }), oe(() => {
170
170
  p(), t !== !0 && n.modelValue === !0 && i.value === null && f("update:modelValue", !1);
171
171
  }), z(() => {
172
- u !== null && clearTimeout(u), s();
172
+ a !== null && clearTimeout(a), s();
173
173
  }), {
174
174
  anchorEl: i,
175
175
  canShow: m,
@@ -179,9 +179,9 @@ function ft({
179
179
  function mt(e, t) {
180
180
  const o = T(null);
181
181
  let n;
182
- function l(u, m) {
182
+ function l(a, m) {
183
183
  const c = `${m !== void 0 ? "add" : "remove"}EventListener`, s = m !== void 0 ? m : n;
184
- u !== window && u[c]("scroll", s, J.passive), window[c]("scroll", s, J.passive), n = m;
184
+ a !== window && a[c]("scroll", s, Z.passive), window[c]("scroll", s, Z.passive), n = m;
185
185
  }
186
186
  function f() {
187
187
  o.value !== null && (l(o.value), o.value = null);
@@ -220,62 +220,75 @@ function gt({
220
220
  processOnMount: f
221
221
  // optional
222
222
  }) {
223
- const i = R(), { props: u, emit: m, proxy: c } = i;
223
+ const i = R(), { props: a, emit: m, proxy: c } = i;
224
224
  let s;
225
225
  function g(h) {
226
226
  e.value === !0 ? d(h) : p(h);
227
227
  }
228
228
  function p(h) {
229
- if (u.disable === !0 || (h == null ? void 0 : h.qAnchorHandled) === !0 || t !== void 0 && t(h) !== !0) return;
230
- const v = u["onUpdate:modelValue"] !== void 0;
229
+ if (a.disable === !0 || (h == null ? void 0 : h.qAnchorHandled) === !0 || t !== void 0 && t(h) !== !0) return;
230
+ const v = a["onUpdate:modelValue"] !== void 0;
231
231
  v === !0 && (m("update:modelValue", !0), s = h, I(() => {
232
232
  s === h && (s = void 0);
233
- })), (u.modelValue === null || v === !1) && a(h);
233
+ })), (a.modelValue === null || v === !1) && u(h);
234
234
  }
235
- function a(h) {
235
+ function u(h) {
236
236
  e.value !== !0 && (e.value = !0, m("beforeShow", h), n !== void 0 ? n(h) : m("show", h));
237
237
  }
238
238
  function d(h) {
239
- if (u.disable === !0) return;
240
- const v = u["onUpdate:modelValue"] !== void 0;
239
+ if (a.disable === !0) return;
240
+ const v = a["onUpdate:modelValue"] !== void 0;
241
241
  v === !0 && (m("update:modelValue", !1), s = h, I(() => {
242
242
  s === h && (s = void 0);
243
- })), (u.modelValue === null || v === !1) && P(h);
243
+ })), (a.modelValue === null || v === !1) && k(h);
244
244
  }
245
- function P(h) {
245
+ function k(h) {
246
246
  e.value !== !1 && (e.value = !1, m("beforeHide", h), l !== void 0 ? l(h) : m("hide", h));
247
247
  }
248
248
  function C(h) {
249
- u.disable === !0 && h === !0 ? u["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? a : P)(s);
249
+ a.disable === !0 && h === !0 ? a["onUpdate:modelValue"] !== void 0 && m("update:modelValue", !1) : h === !0 !== e.value && (h === !0 ? u : k)(s);
250
250
  }
251
- S(() => u.modelValue, C), o !== void 0 && Xe(i) === !0 && S(() => c.$route.fullPath, () => {
251
+ S(() => a.modelValue, C), o !== void 0 && Ye(i) === !0 && S(() => c.$route.fullPath, () => {
252
252
  o.value === !0 && e.value === !0 && d();
253
- }), te(() => {
254
- C(u.modelValue);
253
+ }), oe(() => {
254
+ C(a.modelValue);
255
255
  });
256
256
  const M = { show: p, hide: d, toggle: g };
257
257
  return Object.assign(c, M), M;
258
258
  }
259
- const ve = {};
260
- let pt = 1, yt = document.body;
261
- function wt(e, t) {
259
+ const ge = {};
260
+ let pt = 1, wt = document.body;
261
+ function yt(e, t) {
262
262
  const o = document.createElement("div");
263
- if (o.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ve.globalNodes !== void 0) {
264
- const n = ve.globalNodes.class;
263
+ if (o.id = t !== void 0 ? `q-portal--${t}--${pt++}` : e, ge.globalNodes !== void 0) {
264
+ const n = ge.globalNodes.class;
265
265
  n !== void 0 && (o.className = n);
266
266
  }
267
- return yt.appendChild(o), o;
267
+ return wt.appendChild(o), o;
268
268
  }
269
- function xt(e) {
269
+ function bt(e) {
270
270
  e.remove();
271
271
  }
272
- const bt = He({
272
+ const B = [];
273
+ function xt(e, t) {
274
+ do {
275
+ if (e.$options.name === "QMenu") {
276
+ if (e.hide(t), e.$props.separateClosePopup === !0)
277
+ return X(e);
278
+ } else if (e.__qPortal === !0) {
279
+ const o = X(e);
280
+ return (o == null ? void 0 : o.$options.name) === "QPopupProxy" ? (e.hide(t), o) : e;
281
+ }
282
+ e = X(e);
283
+ } while (e != null);
284
+ }
285
+ const Et = He({
273
286
  name: "QPortal",
274
287
  setup(e, { slots: t }) {
275
288
  return () => t.default();
276
289
  }
277
290
  });
278
- function Et(e) {
291
+ function Tt(e) {
279
292
  for (e = e.parent; e != null; ) {
280
293
  if (e.type.name === "QGlobalDialog")
281
294
  return !0;
@@ -285,34 +298,34 @@ function Et(e) {
285
298
  }
286
299
  return !1;
287
300
  }
288
- function Tt(e, t, o, n) {
301
+ function St(e, t, o, n) {
289
302
  const l = T(!1), f = T(!1);
290
303
  let i = null;
291
- const u = {}, m = n === "dialog" && Et(e);
304
+ const a = {}, m = n === "dialog" && Tt(e);
292
305
  function c(g) {
293
306
  if (g === !0) {
294
- he(u), f.value = !0;
307
+ ve(a), f.value = !0;
295
308
  return;
296
309
  }
297
- f.value = !1, l.value === !1 && (m === !1 && i === null && (i = wt(!1, n)), l.value = !0, B.push(e.proxy), ut(u));
310
+ f.value = !1, l.value === !1 && (m === !1 && i === null && (i = yt(!1, n)), l.value = !0, B.push(e.proxy), at(a));
298
311
  }
299
312
  function s(g) {
300
313
  if (f.value = !1, g !== !0) return;
301
- he(u), l.value = !1;
314
+ ve(a), l.value = !1;
302
315
  const p = B.indexOf(e.proxy);
303
- p !== -1 && B.splice(p, 1), i !== null && (xt(i), i = null);
316
+ p !== -1 && B.splice(p, 1), i !== null && (bt(i), i = null);
304
317
  }
305
- return Oe(() => {
318
+ return Ie(() => {
306
319
  s(!0);
307
- }), e.proxy.__qPortal = !0, _e(e.proxy, "contentEl", () => t.value), {
320
+ }), e.proxy.__qPortal = !0, je(e.proxy, "contentEl", () => t.value), {
308
321
  showPortal: c,
309
322
  hidePortal: s,
310
323
  portalIsActive: l,
311
324
  portalIsAccessible: f,
312
- renderPortal: () => m === !0 ? o() : l.value === !0 ? [K(Ie, { to: i }, K(bt, o))] : void 0
325
+ renderPortal: () => m === !0 ? o() : l.value === !0 ? [Q(Qe, { to: i }, Q(Et, o))] : void 0
313
326
  };
314
327
  }
315
- const St = {
328
+ const Ct = {
316
329
  transitionShow: {
317
330
  type: String,
318
331
  default: "fade"
@@ -326,7 +339,7 @@ const St = {
326
339
  default: 300
327
340
  }
328
341
  };
329
- function Ct(e, t = () => {
342
+ function Pt(e, t = () => {
330
343
  }, o = () => {
331
344
  }) {
332
345
  return {
@@ -351,7 +364,7 @@ function Ht() {
351
364
  function o() {
352
365
  e = void 0;
353
366
  }
354
- return Te(o), z(o), {
367
+ return Se(o), z(o), {
355
368
  removeTick: o,
356
369
  registerTick(n) {
357
370
  e = n, I(() => {
@@ -366,7 +379,7 @@ function kt() {
366
379
  function o() {
367
380
  e !== null && (clearTimeout(e), e = null);
368
381
  }
369
- return Te(o), z(o), {
382
+ return Se(o), z(o), {
370
383
  removeTimeout: o,
371
384
  registerTimeout(n, l) {
372
385
  o(), ke(t) === !1 && (e = setTimeout(() => {
@@ -375,20 +388,20 @@ function kt() {
375
388
  }
376
389
  };
377
390
  }
378
- const Pt = [Element, String], Mt = [null, document, document.body, document.scrollingElement, document.documentElement];
379
- function Wt(e, t) {
380
- let o = Ye(t);
391
+ const Mt = [Element, String], Wt = [null, document, document.body, document.scrollingElement, document.documentElement];
392
+ function $t(e, t) {
393
+ let o = Je(t);
381
394
  if (o === void 0) {
382
395
  if (e == null)
383
396
  return window;
384
397
  o = e.closest(".scroll,.scroll-y,.overflow-auto");
385
398
  }
386
- return Mt.includes(o) ? window : o;
399
+ return Wt.includes(o) ? window : o;
387
400
  }
388
- function _t(e) {
401
+ function jt(e) {
389
402
  return e === window ? window.pageYOffset || window.scrollY || document.body.scrollTop || 0 : e.scrollTop;
390
403
  }
391
- function jt(e) {
404
+ function Ut(e) {
392
405
  return e === window ? window.pageXOffset || window.scrollX || document.body.scrollLeft || 0 : e.scrollLeft;
393
406
  }
394
407
  let O;
@@ -396,10 +409,10 @@ function qt() {
396
409
  if (O !== void 0)
397
410
  return O;
398
411
  const e = document.createElement("p"), t = document.createElement("div");
399
- de(e, {
412
+ fe(e, {
400
413
  width: "100%",
401
414
  height: "200px"
402
- }), de(t, {
415
+ }), fe(t, {
403
416
  position: "absolute",
404
417
  top: "0px",
405
418
  left: "0px",
@@ -413,32 +426,32 @@ function qt() {
413
426
  let n = e.offsetWidth;
414
427
  return o === n && (n = t.clientWidth), t.remove(), O = o - n, O;
415
428
  }
416
- function Ut(e, t = !0) {
429
+ function Gt(e, t = !0) {
417
430
  return !e || e.nodeType !== Node.ELEMENT_NODE ? !1 : t ? e.scrollHeight > e.clientHeight && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-y"])) : e.scrollWidth > e.clientWidth && (e.classList.contains("scroll") || e.classList.contains("overflow-auto") || ["auto", "scroll"].includes(window.getComputedStyle(e)["overflow-x"]));
418
431
  }
419
- const q = [];
420
- let $;
421
- function Lt(e) {
422
- $ = e.keyCode === 27;
432
+ const $ = [];
433
+ let L;
434
+ function Ft(e) {
435
+ L = e.keyCode === 27;
423
436
  }
424
- function Ft() {
425
- $ === !0 && ($ = !1);
437
+ function Lt() {
438
+ L === !0 && (L = !1);
426
439
  }
427
- function $t(e) {
428
- $ === !0 && ($ = !1, Ce(e, 27) === !0 && q[q.length - 1](e));
440
+ function At(e) {
441
+ L === !0 && (L = !1, Pe(e, 27) === !0 && $[$.length - 1](e));
429
442
  }
430
- function Me(e) {
431
- window[e]("keydown", Lt), window[e]("blur", Ft), window[e]("keyup", $t), $ = !1;
443
+ function We(e) {
444
+ window[e]("keydown", Ft), window[e]("blur", Lt), window[e]("keyup", At), L = !1;
432
445
  }
433
- function At(e) {
434
- Se.is.desktop === !0 && (q.push(e), q.length === 1 && Me("addEventListener"));
446
+ function Bt(e) {
447
+ Ce.is.desktop === !0 && ($.push(e), $.length === 1 && We("addEventListener"));
435
448
  }
436
- function ge(e) {
437
- const t = q.indexOf(e);
438
- t !== -1 && (q.splice(t, 1), q.length === 0 && Me("removeEventListener"));
449
+ function pe(e) {
450
+ const t = $.indexOf(e);
451
+ t !== -1 && ($.splice(t, 1), $.length === 0 && We("removeEventListener"));
439
452
  }
440
- const { notPassiveCapture: N } = J, L = [];
441
- function Q(e) {
453
+ const { notPassiveCapture: _ } = Z, q = [];
454
+ function K(e) {
442
455
  const t = e.target;
443
456
  if (t === void 0 || t.nodeType === 8 || t.classList.contains("no-pointer-events") === !0) return;
444
457
  let o = B.length - 1;
@@ -453,51 +466,51 @@ function Q(e) {
453
466
  if (n.props.seamless !== !0) return;
454
467
  o--;
455
468
  }
456
- for (let n = L.length - 1; n >= 0; n--) {
457
- const l = L[n];
469
+ for (let n = q.length - 1; n >= 0; n--) {
470
+ const l = q[n];
458
471
  if ((l.anchorEl.value === null || l.anchorEl.value.contains(t) === !1) && (t === document.body || l.innerRef.value !== null && l.innerRef.value.contains(t) === !1))
459
472
  e.qClickOutside = !0, l.onClickOutside(e);
460
473
  else
461
474
  return;
462
475
  }
463
476
  }
464
- function Bt(e) {
465
- L.push(e), L.length === 1 && (document.addEventListener("mousedown", Q, N), document.addEventListener("touchstart", Q, N));
477
+ function Dt(e) {
478
+ q.push(e), q.length === 1 && (document.addEventListener("mousedown", K, _), document.addEventListener("touchstart", K, _));
466
479
  }
467
- function pe(e) {
468
- const t = L.findIndex((o) => o === e);
469
- t !== -1 && (L.splice(t, 1), L.length === 0 && (document.removeEventListener("mousedown", Q, N), document.removeEventListener("touchstart", Q, N)));
480
+ function we(e) {
481
+ const t = q.findIndex((o) => o === e);
482
+ t !== -1 && (q.splice(t, 1), q.length === 0 && (document.removeEventListener("mousedown", K, _), document.removeEventListener("touchstart", K, _)));
470
483
  }
471
- let ye, we;
484
+ let ye, be;
472
485
  function xe(e) {
473
486
  const t = e.split(" ");
474
487
  return t.length !== 2 ? !1 : ["top", "center", "bottom"].includes(t[0]) !== !0 ? (console.error("Anchor/Self position must start with one of top/center/bottom"), !1) : ["left", "middle", "right", "start", "end"].includes(t[1]) !== !0 ? (console.error("Anchor/Self position must end with one of left/middle/right/start/end"), !1) : !0;
475
488
  }
476
- function Dt(e) {
489
+ function Rt(e) {
477
490
  return e ? !(e.length !== 2 || typeof e[0] != "number" || typeof e[1] != "number") : !0;
478
491
  }
479
- const ee = {
492
+ const te = {
480
493
  "start#ltr": "left",
481
494
  "start#rtl": "right",
482
495
  "end#ltr": "right",
483
496
  "end#rtl": "left"
484
497
  };
485
498
  ["left", "middle", "right"].forEach((e) => {
486
- ee[`${e}#ltr`] = e, ee[`${e}#rtl`] = e;
499
+ te[`${e}#ltr`] = e, te[`${e}#rtl`] = e;
487
500
  });
488
- function be(e, t) {
501
+ function Ee(e, t) {
489
502
  const o = e.split(" ");
490
503
  return {
491
504
  vertical: o[0],
492
- horizontal: ee[`${o[1]}#${t === !0 ? "rtl" : "ltr"}`]
505
+ horizontal: te[`${o[1]}#${t === !0 ? "rtl" : "ltr"}`]
493
506
  };
494
507
  }
495
- function Rt(e, t) {
496
- let { top: o, left: n, right: l, bottom: f, width: i, height: u } = e.getBoundingClientRect();
497
- return t !== void 0 && (o -= t[1], n -= t[0], f += t[1], l += t[0], i += t[0], u += t[1]), {
508
+ function zt(e, t) {
509
+ let { top: o, left: n, right: l, bottom: f, width: i, height: a } = e.getBoundingClientRect();
510
+ return t !== void 0 && (o -= t[1], n -= t[0], f += t[1], l += t[0], i += t[0], a += t[1]), {
498
511
  top: o,
499
512
  bottom: f,
500
- height: u,
513
+ height: a,
501
514
  left: n,
502
515
  right: l,
503
516
  width: i,
@@ -505,7 +518,7 @@ function Rt(e, t) {
505
518
  center: o + (f - o) / 2
506
519
  };
507
520
  }
508
- function zt(e, t, o) {
521
+ function Vt(e, t, o) {
509
522
  let { top: n, left: l } = e.getBoundingClientRect();
510
523
  return n += t.top, l += t.left, o !== void 0 && (n += o[1], l += o[0]), {
511
524
  top: n,
@@ -518,7 +531,7 @@ function zt(e, t, o) {
518
531
  center: n
519
532
  };
520
533
  }
521
- function Vt(e, t) {
534
+ function Ot(e, t) {
522
535
  return {
523
536
  top: 0,
524
537
  center: t / 2,
@@ -528,17 +541,17 @@ function Vt(e, t) {
528
541
  right: e
529
542
  };
530
543
  }
531
- function Ee(e, t, o, n) {
544
+ function Te(e, t, o, n) {
532
545
  return {
533
546
  top: e[o.vertical] - t[n.vertical],
534
547
  left: e[o.horizontal] - t[n.horizontal]
535
548
  };
536
549
  }
537
- function We(e, t = 0) {
550
+ function $e(e, t = 0) {
538
551
  if (e.targetEl === null || e.anchorEl === null || t > 5) return;
539
552
  if (e.targetEl.offsetHeight === 0 || e.targetEl.offsetWidth === 0) {
540
553
  setTimeout(() => {
541
- We(e, t + 1);
554
+ $e(e, t + 1);
542
555
  }, 10);
543
556
  return;
544
557
  }
@@ -548,17 +561,17 @@ function We(e, t = 0) {
548
561
  anchorEl: l,
549
562
  anchorOrigin: f,
550
563
  selfOrigin: i,
551
- absoluteOffset: u,
564
+ absoluteOffset: a,
552
565
  fit: m,
553
566
  cover: c,
554
567
  maxHeight: s,
555
568
  maxWidth: g
556
569
  } = e;
557
- if (Se.is.ios === !0 && window.visualViewport !== void 0) {
558
- const F = document.body.style, { offsetLeft: x, offsetTop: b } = window.visualViewport;
559
- x !== ye && (F.setProperty("--q-pe-left", x + "px"), ye = x), b !== we && (F.setProperty("--q-pe-top", b + "px"), we = b);
570
+ if (Ce.is.ios === !0 && window.visualViewport !== void 0) {
571
+ const F = document.body.style, { offsetLeft: b, offsetTop: x } = window.visualViewport;
572
+ b !== ye && (F.setProperty("--q-pe-left", b + "px"), ye = b), x !== be && (F.setProperty("--q-pe-top", x + "px"), be = x);
560
573
  }
561
- const { scrollLeft: p, scrollTop: a } = o, d = u === void 0 ? Rt(l, c === !0 ? [0, 0] : n) : zt(l, u, n);
574
+ const { scrollLeft: p, scrollTop: u } = o, d = a === void 0 ? zt(l, c === !0 ? [0, 0] : n) : Vt(l, a, n);
562
575
  Object.assign(o.style, {
563
576
  top: 0,
564
577
  left: 0,
@@ -568,36 +581,36 @@ function We(e, t = 0) {
568
581
  maxHeight: s,
569
582
  visibility: "visible"
570
583
  });
571
- const { offsetWidth: P, offsetHeight: C } = o, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, P), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: P, elHeight: C };
584
+ const { offsetWidth: k, offsetHeight: C } = o, { elWidth: M, elHeight: h } = m === !0 || c === !0 ? { elWidth: Math.max(d.width, k), elHeight: c === !0 ? Math.max(d.height, C) : C } : { elWidth: k, elHeight: C };
572
585
  let v = { maxWidth: g, maxHeight: s };
573
586
  (m === !0 || c === !0) && (v.minWidth = d.width + "px", c === !0 && (v.minHeight = d.height + "px")), Object.assign(o.style, v);
574
- const H = Vt(M, h);
575
- let y = Ee(d, H, f, i);
576
- if (u === void 0 || n === void 0)
577
- Y(y, d, H, f, i);
587
+ const P = Ot(M, h);
588
+ let w = Te(d, P, f, i);
589
+ if (a === void 0 || n === void 0)
590
+ J(w, d, P, f, i);
578
591
  else {
579
- const { top: F, left: x } = y;
580
- Y(y, d, H, f, i);
581
- let b = !1;
582
- if (y.top !== F) {
583
- b = !0;
584
- const k = 2 * n[1];
585
- d.center = d.top -= k, d.bottom -= k + 2;
592
+ const { top: F, left: b } = w;
593
+ J(w, d, P, f, i);
594
+ let x = !1;
595
+ if (w.top !== F) {
596
+ x = !0;
597
+ const H = 2 * n[1];
598
+ d.center = d.top -= H, d.bottom -= H + 2;
586
599
  }
587
- if (y.left !== x) {
588
- b = !0;
589
- const k = 2 * n[0];
590
- d.middle = d.left -= k, d.right -= k + 2;
600
+ if (w.left !== b) {
601
+ x = !0;
602
+ const H = 2 * n[0];
603
+ d.middle = d.left -= H, d.right -= H + 2;
591
604
  }
592
- b === !0 && (y = Ee(d, H, f, i), Y(y, d, H, f, i));
605
+ x === !0 && (w = Te(d, P, f, i), J(w, d, P, f, i));
593
606
  }
594
607
  v = {
595
- top: y.top + "px",
596
- left: y.left + "px"
597
- }, y.maxHeight !== void 0 && (v.maxHeight = y.maxHeight + "px", d.height > y.maxHeight && (v.minHeight = v.maxHeight)), y.maxWidth !== void 0 && (v.maxWidth = y.maxWidth + "px", d.width > y.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(o.style, v), o.scrollTop !== a && (o.scrollTop = a), o.scrollLeft !== p && (o.scrollLeft = p);
608
+ top: w.top + "px",
609
+ left: w.left + "px"
610
+ }, w.maxHeight !== void 0 && (v.maxHeight = w.maxHeight + "px", d.height > w.maxHeight && (v.minHeight = v.maxHeight)), w.maxWidth !== void 0 && (v.maxWidth = w.maxWidth + "px", d.width > w.maxWidth && (v.minWidth = v.maxWidth)), Object.assign(o.style, v), o.scrollTop !== u && (o.scrollTop = u), o.scrollLeft !== p && (o.scrollLeft = p);
598
611
  }
599
- function Y(e, t, o, n, l) {
600
- const f = o.bottom, i = o.right, u = qt(), m = window.innerHeight - u, c = document.body.clientWidth;
612
+ function J(e, t, o, n, l) {
613
+ const f = o.bottom, i = o.right, a = qt(), m = window.innerHeight - a, c = document.body.clientWidth;
601
614
  if (e.top < 0 || e.top + f > m)
602
615
  if (l.vertical === "center")
603
616
  e.top = t[n.vertical] > m / 2 ? Math.max(0, m - f) : 0, e.maxHeight = Math.min(f, m);
@@ -627,14 +640,14 @@ function Y(e, t, o, n, l) {
627
640
  n.horizontal === "middle" ? t.middle : n.horizontal === l.horizontal ? t.left : t.right
628
641
  ), e.maxWidth = Math.min(i, c - e.left);
629
642
  }
630
- const Gt = He({
643
+ const Xt = He({
631
644
  name: "QMenu",
632
645
  inheritAttrs: !1,
633
646
  props: {
634
647
  ...dt,
635
648
  ...ht,
636
- ...Je,
637
- ...St,
649
+ ...Ze,
650
+ ...Ct,
638
651
  persistent: Boolean,
639
652
  autoClose: Boolean,
640
653
  separateClosePopup: Boolean,
@@ -655,9 +668,9 @@ const Gt = He({
655
668
  },
656
669
  offset: {
657
670
  type: Array,
658
- validator: Dt
671
+ validator: Rt
659
672
  },
660
- scrollTarget: Pt,
673
+ scrollTarget: Mt,
661
674
  touchPosition: Boolean,
662
675
  maxHeight: {
663
676
  type: String,
@@ -674,36 +687,36 @@ const Gt = He({
674
687
  "escapeKey"
675
688
  ],
676
689
  setup(e, { slots: t, emit: o, attrs: n }) {
677
- let l = null, f, i, u;
678
- const m = R(), { proxy: c } = m, { $q: s } = c, g = T(null), p = T(!1), a = E(
690
+ let l = null, f, i, a;
691
+ const m = R(), { proxy: c } = m, { $q: s } = c, g = T(null), p = T(!1), u = E(
679
692
  () => e.persistent !== !0 && e.noRouteDismiss !== !0
680
- ), d = Ze(e, s), { registerTick: P, removeTick: C } = Ht(), { registerTimeout: M } = kt(), { transitionProps: h, transitionStyle: v } = Ct(e), { localScrollTarget: H, changeScrollEvent: y, unconfigureScrollTarget: F } = mt(e, ue), { anchorEl: x, canShow: b } = ft({ showing: p }), { hide: k } = gt({
693
+ ), d = et(e, s), { registerTick: k, removeTick: C } = Ht(), { registerTimeout: M } = kt(), { transitionProps: h, transitionStyle: v } = Pt(e), { localScrollTarget: P, changeScrollEvent: w, unconfigureScrollTarget: F } = mt(e, re), { anchorEl: b, canShow: x } = ft({ showing: p }), { hide: H } = gt({
681
694
  showing: p,
682
- canShow: b,
683
- handleShow: Ae,
684
- handleHide: Be,
685
- hideOnRouteChange: a,
695
+ canShow: x,
696
+ handleShow: Be,
697
+ handleHide: De,
698
+ hideOnRouteChange: u,
686
699
  processOnMount: !0
687
- }), { showPortal: oe, hidePortal: ne, renderPortal: qe } = Tt(m, g, Re, "menu"), _ = {
688
- anchorEl: x,
700
+ }), { showPortal: ne, hidePortal: le, renderPortal: qe } = St(m, g, ze, "menu"), N = {
701
+ anchorEl: b,
689
702
  innerRef: g,
690
703
  onClickOutside(r) {
691
704
  if (e.persistent !== !0 && p.value === !0)
692
- return k(r), // always prevent touch event
705
+ return H(r), // always prevent touch event
693
706
  (r.type === "touchstart" || r.target.classList.contains("q-dialog__backdrop")) && lt(r), !0;
694
707
  }
695
- }, le = E(
696
- () => be(
708
+ }, ie = E(
709
+ () => Ee(
697
710
  e.anchor || (e.cover === !0 ? "center middle" : "bottom start"),
698
711
  s.lang.rtl
699
712
  )
700
- ), Le = E(() => e.cover === !0 ? le.value : be(e.self || "top start", s.lang.rtl)), Fe = E(
713
+ ), Fe = E(() => e.cover === !0 ? ie.value : Ee(e.self || "top start", s.lang.rtl)), Le = E(
701
714
  () => (e.square === !0 ? " q-menu--square" : "") + (d.value === !0 ? " q-menu--dark q-dark" : "")
702
- ), $e = E(() => e.autoClose === !0 ? { onClick: De } : {}), ie = E(
715
+ ), Ae = E(() => e.autoClose === !0 ? { onClick: Re } : {}), ue = E(
703
716
  () => p.value === !0 && e.persistent !== !0
704
717
  );
705
- S(ie, (r) => {
706
- r === !0 ? (At(U), Bt(_)) : (ge(U), pe(_));
718
+ S(ue, (r) => {
719
+ r === !0 ? (Bt(U), Dt(N)) : (pe(U), we(N));
707
720
  });
708
721
  function j() {
709
722
  rt(() => {
@@ -711,51 +724,51 @@ const Gt = He({
711
724
  r && r.contains(document.activeElement) !== !0 && (r = r.querySelector("[autofocus][tabindex], [data-autofocus][tabindex]") || r.querySelector("[autofocus] [tabindex], [data-autofocus] [tabindex]") || r.querySelector("[autofocus], [data-autofocus]") || r, r.focus({ preventScroll: !0 }));
712
725
  });
713
726
  }
714
- function Ae(r) {
715
- if (l = e.noRefocus === !1 ? document.activeElement : null, Ue(re), oe(), ue(), f = void 0, r !== void 0 && (e.touchPosition || e.contextMenu)) {
716
- const G = et(r);
727
+ function Be(r) {
728
+ if (l = e.noRefocus === !1 ? document.activeElement : null, Ge(se), ne(), re(), f = void 0, r !== void 0 && (e.touchPosition || e.contextMenu)) {
729
+ const G = tt(r);
717
730
  if (G.left !== void 0) {
718
- const { top: ze, left: Ve } = x.value.getBoundingClientRect();
719
- f = { left: G.left - Ve, top: G.top - ze };
731
+ const { top: Ve, left: Oe } = b.value.getBoundingClientRect();
732
+ f = { left: G.left - Oe, top: G.top - Ve };
720
733
  }
721
734
  }
722
735
  i === void 0 && (i = S(
723
736
  () => s.screen.width + "|" + s.screen.height + "|" + e.self + "|" + e.anchor + "|" + s.lang.rtl,
724
737
  A
725
- )), e.noFocus !== !0 && document.activeElement.blur(), P(() => {
738
+ )), e.noFocus !== !0 && document.activeElement.blur(), k(() => {
726
739
  A(), e.noFocus !== !0 && j();
727
740
  }), M(() => {
728
- s.platform.is.ios === !0 && (u = e.autoClose, g.value.click()), A(), oe(!0), o("show", r);
741
+ s.platform.is.ios === !0 && (a = e.autoClose, g.value.click()), A(), ne(!0), o("show", r);
729
742
  }, e.transitionDuration);
730
743
  }
731
- function Be(r) {
732
- C(), ne(), ae(!0), l !== null && // menu was hidden from code or ESC plugin
744
+ function De(r) {
745
+ C(), le(), ae(!0), l !== null && // menu was hidden from code or ESC plugin
733
746
  (r === void 0 || r.qClickOutside !== !0) && ((((r == null ? void 0 : r.type.indexOf("key")) === 0 ? l.closest('[tabindex]:not([tabindex^="-"])') : void 0) || l).focus(), l = null), M(() => {
734
- ne(!0), o("hide", r);
747
+ le(!0), o("hide", r);
735
748
  }, e.transitionDuration);
736
749
  }
737
750
  function ae(r) {
738
- f = void 0, i !== void 0 && (i(), i = void 0), (r === !0 || p.value === !0) && (je(re), F(), pe(_), ge(U)), r !== !0 && (l = null);
751
+ f = void 0, i !== void 0 && (i(), i = void 0), (r === !0 || p.value === !0) && (Ue(se), F(), we(N), pe(U)), r !== !0 && (l = null);
739
752
  }
740
- function ue() {
741
- (x.value !== null || e.scrollTarget !== void 0) && (H.value = Wt(x.value, e.scrollTarget), y(H.value, A));
753
+ function re() {
754
+ (b.value !== null || e.scrollTarget !== void 0) && (P.value = $t(b.value, e.scrollTarget), w(P.value, A));
742
755
  }
743
- function De(r) {
744
- u !== !0 ? (tt(c, r), o("click", r)) : u = !1;
756
+ function Re(r) {
757
+ a !== !0 ? (xt(c, r), o("click", r)) : a = !1;
745
758
  }
746
- function re(r) {
747
- ie.value === !0 && e.noFocus !== !0 && nt(g.value, r.target) !== !0 && j();
759
+ function se(r) {
760
+ ue.value === !0 && e.noFocus !== !0 && nt(g.value, r.target) !== !0 && j();
748
761
  }
749
762
  function U(r) {
750
- e.noEscDismiss !== !0 && (o("escapeKey"), k(r));
763
+ e.noEscDismiss !== !0 && (o("escapeKey"), H(r));
751
764
  }
752
765
  function A() {
753
- We({
766
+ $e({
754
767
  targetEl: g.value,
755
768
  offset: e.offset,
756
- anchorEl: x.value,
757
- anchorOrigin: le.value,
758
- selfOrigin: Le.value,
769
+ anchorEl: b.value,
770
+ anchorOrigin: ie.value,
771
+ selfOrigin: Fe.value,
759
772
  absoluteOffset: f,
760
773
  fit: e.fit,
761
774
  cover: e.cover,
@@ -763,24 +776,24 @@ const Gt = He({
763
776
  maxWidth: e.maxWidth
764
777
  });
765
778
  }
766
- function Re() {
767
- return K(
768
- Ke,
779
+ function ze() {
780
+ return Q(
781
+ _e,
769
782
  h.value,
770
- () => p.value === !0 ? K("div", {
783
+ () => p.value === !0 ? Q("div", {
771
784
  role: "menu",
772
785
  ...n,
773
786
  ref: g,
774
787
  tabindex: -1,
775
788
  class: [
776
- "q-menu q-position-engine scroll" + Fe.value,
789
+ "q-menu q-position-engine scroll" + Le.value,
777
790
  n.class
778
791
  ],
779
792
  style: [
780
793
  n.style,
781
794
  v.value
782
795
  ],
783
- ...$e.value
796
+ ...Ae.value
784
797
  }, ot(t.default)) : null
785
798
  );
786
799
  }
@@ -788,21 +801,21 @@ const Gt = He({
788
801
  }
789
802
  });
790
803
  export {
791
- Gt as Q,
804
+ Xt as Q,
792
805
  rt as a,
793
- _t as b,
806
+ jt as b,
794
807
  vt as c,
795
- St as d,
808
+ Ct as d,
796
809
  ht as e,
797
810
  kt as f,
798
- jt as g,
799
- Ut as h,
811
+ Ut as g,
812
+ Gt as h,
800
813
  Ht as i,
801
- Ct as j,
802
- Tt as k,
814
+ Pt as j,
815
+ St as k,
803
816
  gt as l,
804
- ge as m,
805
- At as n,
806
- Qt as r,
807
- Nt as u
817
+ pe as m,
818
+ Bt as n,
819
+ Nt as r,
820
+ Kt as u
808
821
  };