bitboss-ui 1.0.26 → 1.0.27
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.
- package/dist/index103.js +2 -2
- package/dist/index111.js +1 -1
- package/dist/index113.js +4 -4
- package/dist/index115.js +1 -1
- package/dist/index119.js +1 -1
- package/dist/index12.js +3 -3
- package/dist/index120.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index133.js +2 -2
- package/dist/index16.js +8 -8
- package/dist/index18.js +11 -11
- package/dist/index199.js +2 -79
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +5 -5
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +4 -295
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -16
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +235 -16
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +3 -19
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +3 -20
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +119 -27
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +134 -8
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +5 -2
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +19 -3
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +2 -35
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +2 -6
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +35 -7
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +174 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +6 -3
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +368 -2
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +373 -4
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +79 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +3 -121
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +7 -134
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +16 -2
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +2 -2
- package/dist/index220.js +14 -172
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +18 -366
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +27 -371
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +8 -2
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +2 -235
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +2 -2
- package/dist/index225.js.map +1 -1
- package/dist/index227.js +79 -6
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +6 -17
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +16 -8
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +9 -23
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +23 -79
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +2 -435
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +5 -89
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +68 -199
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +4 -6
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +224 -2
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +258 -2
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +6 -2
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +2 -2
- package/dist/index240.js +295 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -2
- package/dist/index242.js +2 -224
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +94 -246
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +434 -3
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +89 -2
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +116 -68
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +200 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +2 -106
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +2 -5
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +2 -117
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -15
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +2 -4
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +15 -4
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +4 -61
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +4 -2
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +61 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +5 -0
- package/dist/index257.js.map +1 -0
- package/dist/index26.js +2 -2
- package/dist/index30.js +3 -3
- package/dist/index32.js +7 -7
- package/dist/index34.js +2 -2
- package/dist/index36.js +2 -2
- package/dist/index40.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index68.js +5 -5
- package/dist/index72.js +2 -2
- package/dist/index74.js +1 -1
- package/dist/index77.js +1 -1
- package/dist/index79.js +1 -1
- package/dist/index81.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index103.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as de, ref as O, computed as p, onMounted as be, watch as q, openBlock as n, createBlock as re, resolveDynamicComponent as ue, normalizeClass as f, withCtx as pe, createElementBlock as d, toDisplayString as m, createCommentVNode as v, createElementVNode as o, renderSlot as y, createVNode as J, unref as C, Fragment as N, renderList as T, createTextVNode as fe, mergeProps as me } from "vue";
|
|
2
|
-
import { add as ye } from "./
|
|
2
|
+
import { add as ye } from "./index232.js";
|
|
3
3
|
import { clamp as he } from "./index198.js";
|
|
4
4
|
import { deepEqual as G } from "./index125.js";
|
|
5
5
|
import { isNil as j } from "./index122.js";
|
|
6
6
|
import { isNotNil as _e } from "./index126.js";
|
|
7
7
|
import { useId as ke } from "./index8.js";
|
|
8
8
|
import { useItemValue as ge } from "./index128.js";
|
|
9
|
-
import { when as ve } from "./
|
|
9
|
+
import { when as ve } from "./index200.js";
|
|
10
10
|
import K from "./index12.js";
|
|
11
11
|
import "./index13.js";
|
|
12
12
|
import Ce from "./index26.js";
|
package/dist/index111.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as d, Fragment as f, renderList as _, unref as r, mergeProps as b } from "vue";
|
|
2
2
|
import { state as k, useToast as C } from "./index6.js";
|
|
3
|
-
import B from "./
|
|
3
|
+
import B from "./index234.js";
|
|
4
4
|
const N = /* @__PURE__ */ s({
|
|
5
5
|
__name: "BbToast",
|
|
6
6
|
props: {
|
package/dist/index113.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as A, ref as o, computed as E, openBlock as b, createElementBlock as $, mergeProps as D, createElementVNode as i, renderSlot as L, normalizeProps as H, guardReactiveProps as I, unref as s, createBlock as M, Teleport as R, normalizeClass as U, normalizeStyle as j, withCtx as q, createCommentVNode as O } from "vue";
|
|
2
|
-
import { useFloating as G, arrow as J } from "./
|
|
2
|
+
import { useFloating as G, arrow as J } from "./index205.js";
|
|
3
3
|
import { useId as K } from "./index8.js";
|
|
4
4
|
import { wait as P } from "./index124.js";
|
|
5
5
|
import Q from "./index10.js";
|
|
6
6
|
import "./index11.js";
|
|
7
|
-
import { throttle as v } from "./
|
|
8
|
-
import { waitFor as W } from "./
|
|
9
|
-
import { autoUpdate as X, flip as Y, shift as Z } from "./
|
|
7
|
+
import { throttle as v } from "./index217.js";
|
|
8
|
+
import { waitFor as W } from "./index213.js";
|
|
9
|
+
import { autoUpdate as X, flip as Y, shift as Z } from "./index214.js";
|
|
10
10
|
const ee = { class: "bb-tooltip__bubble" }, te = /* @__PURE__ */ i("svg", {
|
|
11
11
|
fill: "none",
|
|
12
12
|
viewBox: "0 0 24 24",
|
package/dist/index115.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as $, computed as g, resolveComponent as y, openBlock as f, createElementBlock as i, Fragment as v, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as p, createVNode as k, createSlots as B, withCtx as C, normalizeProps as T, guardReactiveProps as _ } from "vue";
|
|
2
|
-
import { flattenTree as P } from "./
|
|
2
|
+
import { flattenTree as P } from "./index233.js";
|
|
3
3
|
const w = { class: "bb-tree-row" }, z = { class: "bb-tree-main-content" }, I = /* @__PURE__ */ $({
|
|
4
4
|
__name: "BbTree",
|
|
5
5
|
props: {
|
package/dist/index119.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, getCurrentInstance as d, inject as x, computed as l, ref as y, watchEffect as _, openBlock as b, createElementBlock as h, mergeProps as w } from "vue";
|
|
2
|
-
import { isCssColor as z } from "./
|
|
2
|
+
import { isCssColor as z } from "./index199.js";
|
|
3
3
|
const g = ["innerHTML"], $ = /* @__PURE__ */ m({
|
|
4
4
|
__name: "BbIcon",
|
|
5
5
|
props: {
|
package/dist/index12.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as C, ref as b, computed as n, watch as E, openBlock as m, createElementBlock as p, normalizeProps as c, guardReactiveProps as h, mergeProps as f, createCommentVNode as I, createElementVNode as r, renderSlot as F } from "vue";
|
|
2
|
-
import { isCssColor as k } from "./
|
|
3
|
-
import { when as N } from "./
|
|
4
|
-
import { booleanishToBoolean as S } from "./
|
|
2
|
+
import { isCssColor as k } from "./index199.js";
|
|
3
|
+
import { when as N } from "./index200.js";
|
|
4
|
+
import { booleanishToBoolean as S } from "./index201.js";
|
|
5
5
|
const A = {
|
|
6
6
|
"aria-hidden": "true",
|
|
7
7
|
class: "bb-base-checkbox-container"
|
package/dist/index120.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as v, ref as r, onMounted as p, onBeforeUnmount as h, openBlock as i, createBlock as l, resolveDynamicComponent as u, normalizeStyle as m, withCtx as f, renderSlot as d } from "vue";
|
|
2
|
-
import { throttle as g } from "./
|
|
2
|
+
import { throttle as g } from "./index217.js";
|
|
3
3
|
const O = /* @__PURE__ */ v({
|
|
4
4
|
__name: "BbSmoothHeight",
|
|
5
5
|
props: {
|
package/dist/index121.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as m, computed as r, openBlock as a, createElementBlock as d, normalizeProps as u, guardReactiveProps as z, createElementVNode as c } from "vue";
|
|
2
|
-
import { isCssColor as f } from "./
|
|
2
|
+
import { isCssColor as f } from "./index199.js";
|
|
3
3
|
const _ = /* @__PURE__ */ c("svg", {
|
|
4
4
|
viewBox: "0 0 512 512",
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg"
|
package/dist/index127.js
CHANGED
package/dist/index128.js
CHANGED
package/dist/index129.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isArray as b, isPlainObject as m } from "./
|
|
1
|
+
import { isArray as b, isPlainObject as m } from "./index253.js";
|
|
2
2
|
function i(e, n, l, o, r) {
|
|
3
3
|
const u = {}.propertyIsEnumerable.call(o, n) ? "enumerable" : "nonenumerable";
|
|
4
4
|
u === "enumerable" && (e[n] = l), r && u === "nonenumerable" && Object.defineProperty(e, n, {
|
package/dist/index133.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { toValue as b, useDebounceFn as I, useThrottleFn as V, tryOnMounted as X, noop as C, isObject as Y, tryOnScopeDispose as $, isClient as q } from "./
|
|
2
|
-
import { createFilterWrapper as te, debounceFilter as ne, getLifeCycleTarget as oe, throttleFilter as re } from "./
|
|
1
|
+
import { toValue as b, useDebounceFn as I, useThrottleFn as V, tryOnMounted as X, noop as C, isObject as Y, tryOnScopeDispose as $, isClient as q } from "./index216.js";
|
|
2
|
+
import { createFilterWrapper as te, debounceFilter as ne, getLifeCycleTarget as oe, throttleFilter as re } from "./index216.js";
|
|
3
3
|
import { ref as D, computed as g, reactive as P, watch as z } from "vue";
|
|
4
4
|
function G(u) {
|
|
5
5
|
var a;
|
package/dist/index16.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as Ve, ref as k, computed as p, watch as F, nextTick as U, openBlock as d, createElementBlock as u, mergeProps as Se, createElementVNode as r, createTextVNode as De, toDisplayString as f, unref as y, withDirectives as q, createVNode as V, Transition as S, withCtx as D, vShow as j, createCommentVNode as Y, normalizeClass as g, Fragment as w, renderList as O, renderSlot as G } from "vue";
|
|
2
|
-
import i from "./
|
|
3
|
-
import Me from "./
|
|
4
|
-
import Ae from "./
|
|
5
|
-
import xe from "./
|
|
6
|
-
import Ce from "./
|
|
7
|
-
import Ye from "./
|
|
8
|
-
import { groupBy as J } from "./
|
|
2
|
+
import i from "./index207.js";
|
|
3
|
+
import Me from "./index219.js";
|
|
4
|
+
import Ae from "./index220.js";
|
|
5
|
+
import xe from "./index208.js";
|
|
6
|
+
import Ce from "./index221.js";
|
|
7
|
+
import Ye from "./index222.js";
|
|
8
|
+
import { groupBy as J } from "./index223.js";
|
|
9
9
|
import { isNil as Be } from "./index122.js";
|
|
10
|
-
import { last as Q } from "./
|
|
10
|
+
import { last as Q } from "./index210.js";
|
|
11
11
|
const Ie = { class: "bb-base-date-picker__header" }, Ee = ["disabled"], Ne = /* @__PURE__ */ r("span", null, null, -1), Te = {
|
|
12
12
|
"aria-live": "polite",
|
|
13
13
|
class: "bb-base-date-picker__selected-day-label"
|
package/dist/index18.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as n, computed as k, watch as x, openBlock as E, createElementBlock as ee, normalizeClass as z, renderSlot as c, createElementVNode as o, withDirectives as ae, mergeProps as B, unref as p, toDisplayString as L, createBlock as te, Teleport as ne, normalizeStyle as re, createVNode as oe, createSlots as le, renderList as se, withCtx as ie, normalizeProps as ue, guardReactiveProps as de, createCommentVNode as ce } from "vue";
|
|
2
|
-
import { useFloating as pe } from "./
|
|
3
|
-
import me from "./
|
|
4
|
-
import r from "./
|
|
5
|
-
import fe from "./
|
|
6
|
-
import { identity as be } from "./
|
|
7
|
-
import { last as ve } from "./
|
|
8
|
-
import { useFocusTrap as ye } from "./
|
|
2
|
+
import { useFloating as pe } from "./index205.js";
|
|
3
|
+
import me from "./index206.js";
|
|
4
|
+
import r from "./index207.js";
|
|
5
|
+
import fe from "./index208.js";
|
|
6
|
+
import { identity as be } from "./index209.js";
|
|
7
|
+
import { last as ve } from "./index210.js";
|
|
8
|
+
import { useFocusTrap as ye } from "./index211.js";
|
|
9
9
|
import { useId as ge } from "./index8.js";
|
|
10
|
-
import { vMaska as he } from "./
|
|
10
|
+
import { vMaska as he } from "./index212.js";
|
|
11
11
|
import { wait as Y } from "./index124.js";
|
|
12
|
-
import { waitFor as ke } from "./
|
|
12
|
+
import { waitFor as ke } from "./index213.js";
|
|
13
13
|
import Me from "./index16.js";
|
|
14
14
|
import "./index17.js";
|
|
15
|
-
import { autoUpdate as we, flip as Ve, shift as _e } from "./
|
|
16
|
-
import { offset as Ye } from "./
|
|
15
|
+
import { autoUpdate as we, flip as Ve, shift as _e } from "./index214.js";
|
|
16
|
+
import { offset as Ye } from "./index215.js";
|
|
17
17
|
const De = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "name", "placeholder", "readonly", "value"], Ae = ["disabled"], Ce = /* @__PURE__ */ o("svg", {
|
|
18
18
|
viewBox: "-2 -3 24 24",
|
|
19
19
|
xmlns: "http://www.w3.org/2000/svg"
|
package/dist/index199.js
CHANGED
|
@@ -1,82 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
function k(e) {
|
|
3
|
-
return D() ? (g(e), !0) : !1;
|
|
4
|
-
}
|
|
5
|
-
function T(e) {
|
|
6
|
-
return typeof e == "function" ? e() : j(e);
|
|
7
|
-
}
|
|
8
|
-
const G = typeof window < "u" && typeof document < "u";
|
|
9
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
10
|
-
const C = Object.prototype.toString, L = (e) => C.call(e) === "[object Object]", m = () => {
|
|
11
|
-
};
|
|
12
|
-
function h(e, r) {
|
|
13
|
-
function n(...t) {
|
|
14
|
-
return new Promise((i, o) => {
|
|
15
|
-
Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(i).catch(o);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
function F(e, r = {}) {
|
|
21
|
-
let n, t, i = m;
|
|
22
|
-
const o = (u) => {
|
|
23
|
-
clearTimeout(u), i(), i = m;
|
|
24
|
-
};
|
|
25
|
-
return (u) => {
|
|
26
|
-
const l = T(e), c = T(r.maxWait);
|
|
27
|
-
return n && o(n), l <= 0 || c !== void 0 && c <= 0 ? (t && (o(t), t = null), Promise.resolve(u())) : new Promise((a, p) => {
|
|
28
|
-
i = r.rejectOnCancel ? p : a, c && !t && (t = setTimeout(() => {
|
|
29
|
-
n && o(n), t = null, a(u());
|
|
30
|
-
}, c)), n = setTimeout(() => {
|
|
31
|
-
t && o(t), t = null, a(u());
|
|
32
|
-
}, l);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function P(e, r = !0, n = !0, t = !1) {
|
|
37
|
-
let i = 0, o, s = !0, u = m, l;
|
|
38
|
-
const c = () => {
|
|
39
|
-
o && (clearTimeout(o), o = void 0, u(), u = m);
|
|
40
|
-
};
|
|
41
|
-
return (p) => {
|
|
42
|
-
const f = T(e), w = Date.now() - i, d = () => l = p();
|
|
43
|
-
return c(), f <= 0 ? (i = Date.now(), d()) : (w > f && (n || !s) ? (i = Date.now(), d()) : r && (l = new Promise((b, y) => {
|
|
44
|
-
u = t ? y : b, o = setTimeout(() => {
|
|
45
|
-
i = Date.now(), s = !0, b(d()), c();
|
|
46
|
-
}, Math.max(0, f - w));
|
|
47
|
-
})), !n && !o && (o = setTimeout(() => s = !0, f)), s = !1, l);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function W(e) {
|
|
51
|
-
return e || O();
|
|
52
|
-
}
|
|
53
|
-
function R(e, r = 200, n = {}) {
|
|
54
|
-
return h(
|
|
55
|
-
F(r, n),
|
|
56
|
-
e
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
function V(e, r = 200, n = !1, t = !0, i = !1) {
|
|
60
|
-
return h(
|
|
61
|
-
P(r, n, t, i),
|
|
62
|
-
e
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
function A(e, r = !0, n) {
|
|
66
|
-
W() ? x(e, n) : r ? e() : S(e);
|
|
67
|
-
}
|
|
1
|
+
const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
|
|
68
2
|
export {
|
|
69
|
-
|
|
70
|
-
F as debounceFilter,
|
|
71
|
-
W as getLifeCycleTarget,
|
|
72
|
-
G as isClient,
|
|
73
|
-
L as isObject,
|
|
74
|
-
m as noop,
|
|
75
|
-
P as throttleFilter,
|
|
76
|
-
T as toValue,
|
|
77
|
-
A as tryOnMounted,
|
|
78
|
-
k as tryOnScopeDispose,
|
|
79
|
-
R as useDebounceFn,
|
|
80
|
-
V as useThrottleFn
|
|
3
|
+
s as isCssColor
|
|
81
4
|
};
|
|
82
5
|
//# sourceMappingURL=index199.js.map
|
package/dist/index199.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index199.js","sources":["../node_modules/@vueuse/shared/index.mjs"],"sourcesContent":["import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n"],"names":["tryOnScopeDispose","fn","getCurrentScope","onScopeDispose","toValue","r","unref","isClient","toString","isObject","val","noop","createFilterWrapper","filter","wrapper","args","resolve","reject","debounceFilter","ms","options","timer","maxTimer","lastRejector","_clearTimeout","timer2","invoke","duration","maxDuration","throttleFilter","trailing","leading","rejectOnCancel","lastExec","isLeading","lastValue","clear","_invoke","elapsed","getLifeCycleTarget","target","getCurrentInstance","useDebounceFn","useThrottleFn","tryOnMounted","sync","onMounted","nextTick"],"mappings":";AAgDA,SAASA,EAAkBC,GAAI;AAC7B,SAAIC,EAAe,KACjBC,EAAeF,CAAE,GACV,MAEF;AACT;AA0JA,SAASG,EAAQC,GAAG;AAClB,SAAO,OAAOA,KAAM,aAAaA,EAAC,IAAKC,EAAMD,CAAC;AAChD;AA4EK,MAACE,IAAW,OAAO,SAAW,OAAe,OAAO,WAAa;AACrD,OAAO,oBAAsB,OAAe,sBAAsB;AAOnF,MAAMC,IAAW,OAAO,UAAU,UAC5BC,IAAW,CAACC,MAAQF,EAAS,KAAKE,CAAG,MAAM,mBAI3CC,IAAO,MAAM;AACnB;AAaA,SAASC,EAAoBC,GAAQZ,GAAI;AACvC,WAASa,KAAWC,GAAM;AACxB,WAAO,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,cAAQ,QAAQJ,EAAO,MAAMZ,EAAG,MAAM,MAAMc,CAAI,GAAG,EAAE,IAAAd,GAAI,SAAS,MAAM,MAAAc,EAAI,CAAE,CAAC,EAAE,KAAKC,CAAO,EAAE,MAAMC,CAAM;AAAA,IACjH,CAAK;AAAA,EACF;AACD,SAAOH;AACT;AAIA,SAASI,EAAeC,GAAIC,IAAU,IAAI;AACxC,MAAIC,GACAC,GACAC,IAAeZ;AACnB,QAAMa,IAAgB,CAACC,MAAW;AAChC,iBAAaA,CAAM,GACnBF,KACAA,IAAeZ;AAAA,EACnB;AA+BE,SA9Be,CAACe,MAAW;AACzB,UAAMC,IAAWvB,EAAQe,CAAE,GACrBS,IAAcxB,EAAQgB,EAAQ,OAAO;AAG3C,WAFIC,KACFG,EAAcH,CAAK,GACjBM,KAAY,KAAKC,MAAgB,UAAUA,KAAe,KACxDN,MACFE,EAAcF,CAAQ,GACtBA,IAAW,OAEN,QAAQ,QAAQI,E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A,SAASI,EAAmBC,GAAQ;AAClC,SAAOA,KAAUC;AACnB;AA0CA,SAASC,EAAczC,GAAIkB,IAAK,KAAKC,IAAU,CAAA,GAAI;AACjD,SAAOR;AAAA,IACLM,EAAeC,GAAIC,CAAO;AAAA,IAC1BnB;AAAA,EACJ;AACA;AAuBA,SAAS0C,EAAc1C,GAAIkB,IAAK,KAAKW,IAAW,IAAOC,IAAU,IAAMC,IAAiB,IAAO;AAC7F,SAAOpB;AAAA,IACLiB,EAAeV,GAAIW,GAAUC,GAASC,CAAc;AAAA,IACpD/B;AAAA,EACJ;AACA;AAqNA,SAAS2C,EAAa3C,GAAI4C,IAAO,IAAML,GAAQ;AAE7C,EADiBD,MAEfO,EAAU7C,GAAIuC,CAAM,IACbK,IACP5C,MAEA8C,EAAS9C,CAAE;AACf;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index199.js","sources":["../src/utilities/functions/isCssColor.ts"],"sourcesContent":["/**\n * Taken from vuetify colorable mixin\n * https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/mixins/colorable/index.ts\n */\nexport const isCssColor = (color: string): boolean => {\n\treturn !!color && !!color.match(/^(#|var\\(--|(rgb|hsl)a?\\()/);\n};\n"],"names":["isCssColor","color"],"mappings":"AAIa,MAAAA,IAAa,CAACC,MACnB,CAAC,CAACA,KAAS,CAAC,CAACA,EAAM,MAAM,4BAA4B;"}
|
package/dist/index20.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as te, ref as l, getCurrentInstance as le, nextTick as I, useAttrs as oe, computed as h, onMounted as ae, onBeforeUnmount as N, watchPostEffect as se, openBlock as _, createBlock as ne, Teleport as ie, createElementVNode as o, mergeProps as F, createElementBlock as V, renderSlot as i, createTextVNode as re, toDisplayString as D, createCommentVNode as H } from "vue";
|
|
2
|
-
import { throttle as ue } from "./
|
|
3
|
-
import { useFocusTrap as de } from "./
|
|
2
|
+
import { throttle as ue } from "./index217.js";
|
|
3
|
+
import { useFocusTrap as de } from "./index211.js";
|
|
4
4
|
import { useId as R } from "./index8.js";
|
|
5
5
|
import { wait as $ } from "./index124.js";
|
|
6
|
-
import { waitFor as ce } from "./
|
|
7
|
-
import { useModalsState as L } from "./
|
|
6
|
+
import { waitFor as ce } from "./index213.js";
|
|
7
|
+
import { useModalsState as L } from "./index218.js";
|
|
8
8
|
const be = { class: "bb-base-dialog-close" }, ve = { class: "bb-base-dialog-close__content" }, fe = { class: "bb-base-dialog-close__label" }, pe = /* @__PURE__ */ o("span", { class: "bb-base-dialog-close__icon" }, [
|
|
9
9
|
/* @__PURE__ */ o("svg", {
|
|
10
10
|
"aria-hidden": "true",
|
|
@@ -67,7 +67,7 @@ const be = { class: "bb-base-dialog-close" }, ve = { class: "bb-base-dialog-clos
|
|
|
67
67
|
N(() => {
|
|
68
68
|
if (t.modelValue) {
|
|
69
69
|
const { openedModals: e, modalHasClosed: a } = L();
|
|
70
|
-
e.value
|
|
70
|
+
e.value && (a(), O());
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
const Q = async () => {
|
package/dist/index20.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index20.js","sources":["../src/components/BaseDialog/BaseDialog.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-base-dialog__content\"\n\t\t\t\t>\n\t\t\t\t\t<div ref=\"header\" class=\"bb-base-dialog__header\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-base-dialog__title\">\n\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close\">\n\t\t\t\t\t\t\t\t<button v-if=\"showClose\" type=\"button\" @click=\"onCloseClick\">\n\t\t\t\t\t\t\t\t\t<slot name=\"close\" :text=\"closeLabel\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__content\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__label\">{{\n\t\t\t\t\t\t\t\t\t\t\t\tcloseLabel\n\t\t\t\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div ref=\"body\" class=\"bb-base-dialog__body\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\tclass=\"bb-base-dialog__description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t<div ref=\"footer\" class=\"bb-base-dialog__footer\">\n\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\tnextTick,\n\twatchPostEffect,\n\tgetCurrentInstance,\n} from 'vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport type { CommonProps, Size } from '@/types/CommonProps';\nimport { useModalsState } from '@/composables/useModalsState';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BaseDialogProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Elements that obtains focus immediately after opening the dialog.\n\t\t * By default it's the first tabbable item.\n\t\t */\n\t\tfocusTarget?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t};\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tcloseLabel: 'Chiudi modale',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BaseDialogSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BaseDialogProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BaseDialogProps['title'] }) => any;\n\tclose?: (props: { text: BaseDialogProps['closeLabel'] }) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BaseDialogProps['description'];\n\t}) => any;\n\tdefault?: (props: object) => any;\n\tfooter?: (props: object) => any;\n};\n\ndefineSlots<BaseDialogSlots>();\n\nexport type BaseDialogEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BaseDialogEvents>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<MutationObserver | null>(null);\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst height = ref<number | null>(null);\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tinitialFocus: props.focusTarget ?? undefined,\n\tclickOutsideDeactivates: (event) => {\n\t\t// This is used when other teleports are running.\n\t\t// eg if you have a select inside a modal it will be in fact outside of the modal because of teleport\n\t\treturn event.target === overlay.value;\n\t},\n\tallowOutsideClick: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n\tif (body.value) {\n\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\tobserver.value.observe(body.value, { childList: true, subtree: true });\n\t}\n\twindow.addEventListener('resize', onContentGrow);\n});\nonBeforeUnmount(() => {\n\twindow.removeEventListener('resize', onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\n\nconst busy = computed(() => opening.value || closing.value);\n\nconst restrictBody = () => {\n\tif (!globalThis.document) return;\n\tconst scrollBarWidth =\n\t\twindow.innerWidth - document.documentElement.clientWidth;\n\tdocument.body.style.overflow = 'hidden';\n\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n};\nconst releaseBody = () => {\n\tif (!globalThis.document) return;\n\tdocument.body.style.overflow = 'auto';\n\tdocument.body.style.paddingRight = '0px';\n};\n\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (!openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t\tawait waitFor(() => !!body.value);\n\t\t\tawait nextTick();\n\t\t\tif (body.value) {\n\t\t\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(body.value, { childList: true, subtree: true });\n\t\t\t}\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n\t\tconst { modalHasOpened } = useModalsState();\n\t\tmodalHasOpened();\n\t\trestrictBody();\n\n\t\tawait wait(props.transitionDuration);\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tconst { modalHasClosed, openedModals } = useModalsState();\n\t\tmodalHasClosed();\n\t\tif (!openedModals.value) {\n\t\t\treleaseBody();\n\t\t}\n\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\temit('hidden');\n\t}\n};\n/**\n * Every time modelValue changes align the display to it\n */\nwatchPostEffect(() => {\n\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\tif (isNuxt && !globalThis.document) return;\n\talignToModelValue();\n});\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled || busy.value) return;\n\tdeactivate();\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog bb-base-dialog__overlay': true,\n\t\t\t'bb-base-dialog--fullscreen': props.fullscreen,\n\t\t\t'bb-base-dialog--open': open.value,\n\t\t\t'bb-base-dialog--opening': opening.value,\n\t\t\t'bb-base-dialog--closed': closed.value,\n\t\t\t'bb-base-dialog--closing': closing.value,\n\t\t\t[`bb-base-dialog--transition-${props.transition}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog__panel': true,\n\t\t\t'bb-base-dialog__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\tif (props.title) {\n\t\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\t\t}\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.fullscreen) maxWidth = '100%';\n\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\telse if (props.size in sizes)\n\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\telse maxWidth = props.size + 'px';\n\n\tconst style = {\n\t\tmaxWidth,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(async () => {\n\tif (props.fullscreen) {\n\t\theight.value = window.innerHeight;\n\t\treturn;\n\t}\n\tif (header.value && body.value && footer.value) {\n\t\tconst contentHeight =\n\t\t\theader.value.scrollHeight +\n\t\t\tbody.value.scrollHeight +\n\t\t\tfooter.value.scrollHeight +\n\t\t\t2;\n\t\t/* Add two so renderless elements at the bottom are not cut off */\n\t\tif (content.value) {\n\t\t\tcontent.value.style.height = '0px';\n\t\t\tcontent.value.style.height = `${contentHeight + 10}px`;\n\t\t\t/**\n\t\t\t * Run until all transitions inside have completed\n\t\t\t */\n\t\t\tawait wait(30);\n\t\t\tif (header.value && body.value && footer.value) {\n\t\t\t\tconst contentHeight2 =\n\t\t\t\t\theader.value.scrollHeight +\n\t\t\t\t\tbody.value.scrollHeight +\n\t\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t\t20;\n\t\t\t\tif (contentHeight !== contentHeight2) onContentGrow();\n\t\t\t}\n\t\t}\n\t}\n}, 200);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDialog';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","observer","ref","overlay","panel","content","header","body","footer","height","isNuxt","_b","_a","getCurrentInstance","activate","deactivate","useFocusTrap","event","nextTick","attrs","useAttrs","closeLabel","computed","onMounted","onContentGrow","onBeforeUnmount","open","opening","closed","closing","hasRenderedAtLeastOnce","busy","restrictBody","scrollBarWidth","releaseBody","openedModals","modalHasClosed","useModalsState","alignToModelValue","waitFor","modalHasOpened","wait","watchPostEffect","onOverlayScroll","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","throttle","contentHeight","contentHeight2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,UAAMA,IAAQC,GAkCRC,IAAOC,GAEPC,IAAU,SAASC,EAAM,EAAE,GAAG,KAAK,IACnCC,IAAgB,eAAeD,EAAM,EAAE,GAAG,KAAK,IAE/CE,IAAWC,EAA6B,IAAI,GAC5CC,IAAUD,EAAwB,IAAI,GACtCE,IAAQF,EAAwB,IAAI,GACpCG,IAAUH,EAAwB,IAAI,GACtCI,IAASJ,EAAwB,IAAI,GACrCK,IAAOL,EAAwB,IAAI,GACnCM,IAASN,EAAwB,IAAI,GACrCO,IAASP,EAAmB,IAAI,GAGhCQ,IAAS,CAAC,GAACC,KAAAC,IAAAC,GAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,QAExC,EAAE,UAAAG,GAAU,YAAAC,MAAeC,GAAaZ,GAAO;AAAA,MACpD,cAAcV,EAAM,eAAe;AAAA,MACnC,yBAAyB,CAACuB,MAGlBA,EAAM,WAAWd,EAAQ;AAAA,MAEjC,mBAAmB;AAAA;AAAA,MAEnB,mBAAmB,OAClBe,EAAS,MAAM;AACd,QAAAtB,EAAK,qBAAqB,EAAK;AAAA,MAAA,CAC/B,GACM;AAAA,IACR,CACA,GAEKuB,IAAQC,MAERC,IAAaC,EAAS,MAAM5B,EAAM,UAAU;AAElD,IAAA6B,GAAU,YAAY;AACrB,MAAIhB,EAAK,UACCN,EAAA,QAAQ,IAAI,iBAAiBuB,CAAa,GAC1CvB,EAAA,MAAM,QAAQM,EAAK,OAAO,EAAE,WAAW,IAAM,SAAS,GAAA,CAAM,IAE/D,OAAA,iBAAiB,UAAUiB,CAAa;AAAA,IAAA,CAC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AM,eACbC,EAAK,MAAM,eACXC,EAAO,MAAM,eACb;AAED,YAAIH,EAAQ,UACHA,EAAA,MAAM,MAAM,SAAS,OAC7BA,EAAQ,MAAM,MAAM,SAAS,GAAGkD,IAAgB,EAAE,MAIlD,MAAMd,EAAK,EAAE,GACTnC,EAAO,SAASC,EAAK,SAASC,EAAO,QAAO;AACzC,gBAAAgD,IACLlD,EAAO,MAAM,eACbC,EAAK,MAAM,eACXC,EAAO,MAAM,eACb;AACD,UAAI+C,MAAkBC,KAA8BhC;QACrD;AAAA,MAEF;AAAA,OACE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index20.js","sources":["../src/components/BaseDialog/BaseDialog.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-base-dialog__content\"\n\t\t\t\t>\n\t\t\t\t\t<div ref=\"header\" class=\"bb-base-dialog__header\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-base-dialog__title\">\n\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close\">\n\t\t\t\t\t\t\t\t<button v-if=\"showClose\" type=\"button\" @click=\"onCloseClick\">\n\t\t\t\t\t\t\t\t\t<slot name=\"close\" :text=\"closeLabel\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__content\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__label\">{{\n\t\t\t\t\t\t\t\t\t\t\t\tcloseLabel\n\t\t\t\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-base-dialog-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div ref=\"body\" class=\"bb-base-dialog__body\">\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\tclass=\"bb-base-dialog__description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t<div ref=\"footer\" class=\"bb-base-dialog__footer\">\n\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\tnextTick,\n\twatchPostEffect,\n\tgetCurrentInstance,\n} from 'vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport type { CommonProps, Size } from '@/types/CommonProps';\nimport { useModalsState } from '@/composables/useModalsState';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BaseDialogProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Elements that obtains focus immediately after opening the dialog.\n\t\t * By default it's the first tabbable item.\n\t\t */\n\t\tfocusTarget?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t};\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tcloseLabel: 'Chiudi modale',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BaseDialogSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BaseDialogProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BaseDialogProps['title'] }) => any;\n\tclose?: (props: { text: BaseDialogProps['closeLabel'] }) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BaseDialogProps['description'];\n\t}) => any;\n\tdefault?: (props: object) => any;\n\tfooter?: (props: object) => any;\n};\n\ndefineSlots<BaseDialogSlots>();\n\nexport type BaseDialogEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BaseDialogEvents>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst observer = ref<MutationObserver | null>(null);\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst height = ref<number | null>(null);\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tinitialFocus: props.focusTarget ?? undefined,\n\tclickOutsideDeactivates: (event) => {\n\t\t// This is used when other teleports are running.\n\t\t// eg if you have a select inside a modal it will be in fact outside of the modal because of teleport\n\t\treturn event.target === overlay.value;\n\t},\n\tallowOutsideClick: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst attrs = useAttrs();\n\nconst closeLabel = computed(() => props.closeLabel);\n\nonMounted(async () => {\n\tif (body.value) {\n\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\tobserver.value.observe(body.value, { childList: true, subtree: true });\n\t}\n\twindow.addEventListener('resize', onContentGrow);\n});\nonBeforeUnmount(() => {\n\twindow.removeEventListener('resize', onContentGrow);\n});\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\n\nconst busy = computed(() => opening.value || closing.value);\n\nconst restrictBody = () => {\n\tif (!globalThis.document) return;\n\tconst scrollBarWidth =\n\t\twindow.innerWidth - document.documentElement.clientWidth;\n\tdocument.body.style.overflow = 'hidden';\n\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n};\nconst releaseBody = () => {\n\tif (!globalThis.document) return;\n\tdocument.body.style.overflow = 'auto';\n\tdocument.body.style.paddingRight = '0px';\n};\n\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t\tawait waitFor(() => !!body.value);\n\t\t\tawait nextTick();\n\t\t\tif (body.value) {\n\t\t\t\tobserver.value = new MutationObserver(onContentGrow);\n\t\t\t\tobserver.value.observe(body.value, { childList: true, subtree: true });\n\t\t\t}\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\n\t\tconst { modalHasOpened } = useModalsState();\n\t\tmodalHasOpened();\n\t\trestrictBody();\n\n\t\tawait wait(props.transitionDuration);\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tawait wait(props.transitionDuration);\n\n\t\tconst { modalHasClosed, openedModals } = useModalsState();\n\t\tmodalHasClosed();\n\t\tif (!openedModals.value) {\n\t\t\treleaseBody();\n\t\t}\n\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\temit('hidden');\n\t}\n};\n/**\n * Every time modelValue changes align the display to it\n */\nwatchPostEffect(() => {\n\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\tif (isNuxt && !globalThis.document) return;\n\talignToModelValue();\n});\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: UIEvent) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled || busy.value) return;\n\tdeactivate();\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog bb-base-dialog__overlay': true,\n\t\t\t'bb-base-dialog--fullscreen': props.fullscreen,\n\t\t\t'bb-base-dialog--open': open.value,\n\t\t\t'bb-base-dialog--opening': opening.value,\n\t\t\t'bb-base-dialog--closed': closed.value,\n\t\t\t'bb-base-dialog--closing': closing.value,\n\t\t\t[`bb-base-dialog--transition-${props.transition}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-base-dialog__panel': true,\n\t\t\t'bb-base-dialog__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\tif (props.title) {\n\t\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\t\t}\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.fullscreen) maxWidth = '100%';\n\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\telse if (props.size in sizes)\n\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\telse maxWidth = props.size + 'px';\n\n\tconst style = {\n\t\tmaxWidth,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n\n/**\n * This is called when content inside body changes.\n * Gets the total height the panel needs to be\n * It could be called numerous times so throttle every 300ms\n */\nconst onContentGrow = throttle(async () => {\n\tif (props.fullscreen) {\n\t\theight.value = window.innerHeight;\n\t\treturn;\n\t}\n\tif (header.value && body.value && footer.value) {\n\t\tconst contentHeight =\n\t\t\theader.value.scrollHeight +\n\t\t\tbody.value.scrollHeight +\n\t\t\tfooter.value.scrollHeight +\n\t\t\t2;\n\t\t/* Add two so renderless elements at the bottom are not cut off */\n\t\tif (content.value) {\n\t\t\tcontent.value.style.height = '0px';\n\t\t\tcontent.value.style.height = `${contentHeight + 10}px`;\n\t\t\t/**\n\t\t\t * Run until all transitions inside have completed\n\t\t\t */\n\t\t\tawait wait(30);\n\t\t\tif (header.value && body.value && footer.value) {\n\t\t\t\tconst contentHeight2 =\n\t\t\t\t\theader.value.scrollHeight +\n\t\t\t\t\tbody.value.scrollHeight +\n\t\t\t\t\tfooter.value.scrollHeight +\n\t\t\t\t\t20;\n\t\t\t\tif (contentHeight !== contentHeight2) onContentGrow();\n\t\t\t}\n\t\t}\n\t}\n}, 200);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseDialog';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","observer","ref","overlay","panel","content","header","body","footer","height","isNuxt","_b","_a","getCurrentInstance","activate","deactivate","useFocusTrap","event","nextTick","attrs","useAttrs","closeLabel","computed","onMounted","onContentGrow","onBeforeUnmount","open","opening","closed","closing","hasRenderedAtLeastOnce","busy","restrictBody","scrollBarWidth","releaseBody","openedModals","modalHasClosed","useModalsState","alignToModelValue","waitFor","modalHasOpened","wait","watchPostEffect","onOverlayScroll","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","sizes","throttle","contentHeight","contentHeight2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,UAAMA,IAAQ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