maz-ui 3.23.4 → 3.24.0
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/components/MazAvatar.mjs +1 -1
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.d.ts +3 -3
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazCheckbox.mjs +9 -9
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.d.ts +6 -6
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.d.ts +4 -0
- package/components/MazDropdown.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.d.ts +1 -0
- package/components/MazInputTags.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadioButtons.mjs +49 -38
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBtn.css +1 -1
- package/components/assets/MazCard.css +1 -1
- package/components/assets/MazCheckbox.css +1 -1
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazPickerCalendar.css +1 -1
- package/components/assets/MazRadioButtons.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazSlider.css +1 -1
- package/components/chunks/{MazAvatar-1636f58b.mjs → MazAvatar-a0310614.mjs} +7 -7
- package/components/chunks/{MazBottomSheet-c24f92f8.mjs → MazBottomSheet-656778f3.mjs} +1 -1
- package/components/chunks/{MazBtn-2d1d1ba5.mjs → MazBtn-1abd74e1.mjs} +3 -3
- package/components/chunks/{MazBtn-683effc1.mjs → MazBtn-1b5325b4.mjs} +3 -3
- package/components/chunks/{MazBtn-5e426592.mjs → MazBtn-28eb4f51.mjs} +3 -3
- package/components/chunks/{MazBtn-1e61862b.mjs → MazBtn-4242d8bf.mjs} +3 -3
- package/components/chunks/MazBtn-54c46d7a.mjs +153 -0
- package/components/chunks/MazBtn-55bdce06.mjs +153 -0
- package/components/chunks/MazBtn-5b3c390b.mjs +153 -0
- package/components/chunks/{MazBtn-3d74f737.mjs → MazBtn-5c7f35e9.mjs} +3 -3
- package/components/chunks/{MazBtn-4a447126.mjs → MazBtn-6df3ecd9.mjs} +3 -3
- package/components/chunks/{MazBtn-7706b2da.mjs → MazBtn-7313b190.mjs} +9 -9
- package/components/chunks/{MazBtn-555928ed.mjs → MazBtn-8d15228e.mjs} +3 -3
- package/components/chunks/{MazBtn-6ce4cfd3.mjs → MazBtn-ab3967b5.mjs} +1 -1
- package/components/chunks/{MazBtn-124f3700.mjs → MazBtn-edeb8105.mjs} +3 -3
- package/components/chunks/MazBtn-fbc2b2c9.mjs +153 -0
- package/components/chunks/{MazCard-bcc36489.mjs → MazCard-cb88998a.mjs} +3 -3
- package/components/chunks/{MazCarousel-6da75122.mjs → MazCarousel-4a1f2f1b.mjs} +1 -1
- package/components/chunks/{MazCheckbox-3a2b48b4.mjs → MazCheckbox-0df95780.mjs} +6 -6
- package/components/chunks/{MazCheckbox-040dc2c4.mjs → MazCheckbox-4ccd0b53.mjs} +6 -6
- package/components/chunks/{MazDialog-44eda544.mjs → MazDialog-e80585a6.mjs} +1 -1
- package/components/chunks/{MazDialogPromise-eec5acde.mjs → MazDialogPromise-0769de39.mjs} +2 -2
- package/components/chunks/{MazDrawer-b628b37e.mjs → MazDrawer-ff505fb8.mjs} +1 -1
- package/components/chunks/MazDropdown-0dea4e44.mjs +352 -0
- package/components/chunks/{MazGallery-6b8ecedf.mjs → MazGallery-eb620533.mjs} +1 -1
- package/components/chunks/{MazIcon-95e31ff8.mjs → MazIcon-b0ad5b4c.mjs} +1 -1
- package/components/chunks/{MazInput-1ed4f946.mjs → MazInput-14d96bc3.mjs} +2 -2
- package/components/chunks/{MazInput-c51881ea.mjs → MazInput-a4884812.mjs} +2 -2
- package/components/chunks/{MazInput-8a217995.mjs → MazInput-d0d28579.mjs} +3 -3
- package/components/chunks/{MazInputPrice-cd348d46.mjs → MazInputPrice-a94b17c3.mjs} +2 -2
- package/components/chunks/MazInputTags-d8514b7b.mjs +595 -0
- package/components/chunks/{MazLazyImg-47d3449a.mjs → MazLazyImg-632c3f0c.mjs} +2 -2
- package/components/chunks/{MazPhoneNumberInput-e1bf46f9.mjs → MazPhoneNumberInput-b32334b7.mjs} +138 -135
- package/components/chunks/{MazPicker-e4620d8b.mjs → MazPicker-9b2f5212.mjs} +49 -49
- package/components/chunks/{MazPickerCalendar-da62262c.mjs → MazPickerCalendar-fd08a0bd.mjs} +7 -7
- package/components/chunks/{MazPickerHeader-a2e041eb.mjs → MazPickerHeader-b353cef2.mjs} +1 -1
- package/components/chunks/{MazPickerMonthSwitcher-5bf8bd08.mjs → MazPickerMonthSwitcher-ec404758.mjs} +2 -2
- package/components/chunks/{MazPickerShortcuts-7f95430e.mjs → MazPickerShortcuts-e9c8b46e.mjs} +2 -2
- package/components/chunks/{MazPickerTime-717402ae.mjs → MazPickerTime-a94a2ad1.mjs} +2 -2
- package/components/chunks/{MazPickerYearSwitcher-85f97b6d.mjs → MazPickerYearSwitcher-4ab742f7.mjs} +3 -3
- package/components/chunks/{MazSelect-6ff6bb96.mjs → MazSelect-a0d29d46.mjs} +3 -3
- package/components/chunks/{MazSpinner-51aa73ca.mjs → MazSpinner-05b867f0.mjs} +1 -1
- package/components/chunks/MazSpinner-151ca8af.mjs +39 -0
- package/components/chunks/{MazSpinner-059ee1d2.mjs → MazSpinner-37cda5f1.mjs} +1 -1
- package/components/chunks/{MazSpinner-6d1d24d5.mjs → MazSpinner-38548063.mjs} +1 -1
- package/components/chunks/MazSpinner-3b9cd6bd.mjs +39 -0
- package/components/chunks/MazSpinner-691d6fe4.mjs +39 -0
- package/components/chunks/MazSpinner-70afb16b.mjs +39 -0
- package/components/chunks/MazSpinner-8ecee924.mjs +39 -0
- package/components/chunks/MazSpinner-9fc0d858.mjs +39 -0
- package/components/chunks/{MazSpinner-13403729.mjs → MazSpinner-a936fb87.mjs} +1 -1
- package/components/chunks/MazSpinner-d37b29f0.mjs +39 -0
- package/components/chunks/{MazSpinner-054f948c.mjs → MazSpinner-ea39af30.mjs} +1 -1
- package/components/chunks/{MazSpinner-452a1534.mjs → MazSpinner-ef90ca5e.mjs} +1 -1
- package/components/chunks/{MazSpinner-4c02cfd2.mjs → MazSpinner-f54688d1.mjs} +1 -1
- package/components/chunks/MazSpinner-fa0d644a.mjs +39 -0
- package/components/chunks/{MazSpinner-d9ef329f.mjs → MazSpinner-fa796159.mjs} +1 -1
- package/components/chunks/{MazTabsBar-27965f16.mjs → MazTabsBar-3fc93e3c.mjs} +1 -1
- package/components/chunks/{MazTransitionExpand-cd24498f.mjs → MazTransitionExpand-9d45da0e.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/MazBtn.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-760c3b29.mjs → MazBtn-6d482774.mjs} +3 -3
- package/modules/chunks/{MazBtn-2f302422.cjs → MazBtn-9e80b611.cjs} +1 -1
- package/modules/chunks/{MazIcon-599a907f.cjs → MazIcon-84d2e299.cjs} +1 -1
- package/modules/chunks/{MazIcon-0bd6b78e.mjs → MazIcon-c59e858b.mjs} +1 -1
- package/modules/chunks/{MazSpinner-6ffa8db1.cjs → MazSpinner-108d3dc0.cjs} +1 -1
- package/modules/chunks/{MazSpinner-03bd76bd.mjs → MazSpinner-dcb0164b.mjs} +1 -1
- package/modules/chunks/check-circle-59c383ed.mjs +30 -0
- package/modules/chunks/check-circle-8c27a70a.cjs +1 -0
- package/modules/chunks/exclamation-circle-a33311d2.cjs +1 -0
- package/modules/chunks/exclamation-circle-e2620aab.mjs +30 -0
- package/modules/chunks/exclamation-triangle-21bf116a.mjs +30 -0
- package/modules/chunks/exclamation-triangle-df9f85b0.cjs +1 -0
- package/modules/chunks/index-4ffeaf8e.cjs +124 -0
- package/modules/chunks/{index-6a90ef88.mjs → index-67003347.mjs} +598 -508
- package/modules/chunks/information-circle-9fe4430a.cjs +1 -0
- package/modules/chunks/information-circle-b8051b19.mjs +30 -0
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +18 -17
- package/nuxt/index.d.mts +5 -0
- package/nuxt/index.d.ts +5 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +14 -0
- package/nuxt/runtime/plugins/maz-icon-path.mjs +2 -1
- package/package.json +4 -4
- package/tailwindcss/tailwind.config.ts +0 -1
- package/types/components/MazBtn.vue.d.ts +3 -3
- package/types/components/MazDialogPromise.vue.d.ts +6 -6
- package/types/components/MazDropdown.vue.d.ts +4 -0
- package/types/components/MazInputTags.vue.d.ts +1 -0
- package/types/modules/composables/index.d.ts +1 -0
- package/types/modules/composables/use-timer.d.ts +12 -0
- package/types/modules/plugins/aos/index.d.ts +12 -12
- package/types/modules/plugins/toaster/MazToast.vue.d.ts +6 -6
- package/types/modules/plugins/toaster/toaster-handler.d.ts +2 -1
- package/components/chunks/MazBtn-571454f6.mjs +0 -153
- package/components/chunks/MazBtn-6905cc39.mjs +0 -153
- package/components/chunks/MazBtn-74656d5b.mjs +0 -153
- package/components/chunks/MazBtn-a7a913dd.mjs +0 -153
- package/components/chunks/MazBtn-fb3c7af8.mjs +0 -153
- package/components/chunks/MazDropdown-6f2248b0.mjs +0 -345
- package/components/chunks/MazInputTags-aa95fae7.mjs +0 -446
- package/components/chunks/MazSpinner-6e7c4705.mjs +0 -39
- package/components/chunks/MazSpinner-7895f54f.mjs +0 -39
- package/components/chunks/MazSpinner-7eee202e.mjs +0 -39
- package/components/chunks/MazSpinner-805e14a6.mjs +0 -39
- package/components/chunks/MazSpinner-85080b43.mjs +0 -39
- package/components/chunks/MazSpinner-c67b05bb.mjs +0 -39
- package/components/chunks/MazSpinner-caa33afc.mjs +0 -39
- package/components/chunks/MazSpinner-cb8fbe9a.mjs +0 -39
- package/modules/chunks/index-794680d2.cjs +0 -124
- package/types/modules/plugins/toaster/timer.d.ts +0 -11
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var Qe = Object.defineProperty;
|
|
2
|
+
var Je = (s, e, t) => e in s ? Qe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var a = (s, e, t) => (Je(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import "../assets/index.css";
|
|
5
|
-
import { inject as
|
|
6
|
-
function
|
|
7
|
-
const t =
|
|
5
|
+
import { inject as et, createVNode as P, render as ee, nextTick as He, defineComponent as _e, defineAsyncComponent as w, onBeforeMount as tt, ref as h, computed as g, onMounted as Ee, onBeforeUnmount as $e, openBlock as z, createElementBlock as Z, normalizeClass as re, withModifiers as _, withKeys as st, withDirectives as be, unref as L, vShow as we, createCommentVNode as H, createElementVNode as E, Transition as Me, withCtx as ne, watch as it, createBlock as U, resolveDynamicComponent as ot, toDisplayString as pe, createTextVNode as nt, normalizeStyle as rt } from "vue";
|
|
6
|
+
function Le(s, e) {
|
|
7
|
+
const t = et(s, e);
|
|
8
8
|
if (!t)
|
|
9
9
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${s}`);
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ns(s, e) {
|
|
13
13
|
let t;
|
|
14
14
|
return function(...i) {
|
|
15
15
|
clearTimeout(t), t = setTimeout(() => {
|
|
@@ -17,42 +17,42 @@ function es(s, e) {
|
|
|
17
17
|
}, e);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function at(s) {
|
|
21
21
|
return !!s;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function De(s, e) {
|
|
24
24
|
let t = e == null ? void 0 : e.element;
|
|
25
25
|
function i() {
|
|
26
|
-
t &&
|
|
26
|
+
t && ee(null, t);
|
|
27
27
|
}
|
|
28
|
-
const o =
|
|
28
|
+
const o = P(
|
|
29
29
|
s,
|
|
30
30
|
{ ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: i } : {} },
|
|
31
31
|
e == null ? void 0 : e.children
|
|
32
32
|
);
|
|
33
|
-
return e != null && e.app ? (o.appContext = e.app._context, t ?
|
|
33
|
+
return e != null && e.app ? (o.appContext = e.app._context, t ? ee(o, t) : typeof document < "u" && (t = document.createElement("div"), ee(o, t))) : (t = t ?? document.body, ee(o, t)), { vNode: o, destroy: i, el: t };
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function $() {
|
|
36
36
|
return typeof document < "u";
|
|
37
37
|
}
|
|
38
|
-
class
|
|
38
|
+
class lt {
|
|
39
39
|
constructor(e, t) {
|
|
40
|
-
|
|
40
|
+
a(this, "defaultOptions", {
|
|
41
41
|
element: void 0,
|
|
42
42
|
timeout: 60 * 1e3 * 5,
|
|
43
43
|
// 5 minutes
|
|
44
44
|
once: !1,
|
|
45
45
|
immediate: !0
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
a(this, "options");
|
|
48
|
+
a(this, "timeoutHandler");
|
|
49
|
+
a(this, "isIdle", !1);
|
|
50
|
+
a(this, "isDestroy", !1);
|
|
51
|
+
a(this, "startTime", 0);
|
|
52
|
+
a(this, "remainingTime", 0);
|
|
53
|
+
a(this, "lastClientX", -1);
|
|
54
|
+
a(this, "lastClientY", -1);
|
|
55
|
+
a(this, "eventNames", [
|
|
56
56
|
"DOMMouseScroll",
|
|
57
57
|
"mousedown",
|
|
58
58
|
"mousemove",
|
|
@@ -65,7 +65,7 @@ class ot {
|
|
|
65
65
|
"wheel",
|
|
66
66
|
"click"
|
|
67
67
|
]);
|
|
68
|
-
|
|
68
|
+
a(this, "handleEvent", (e) => {
|
|
69
69
|
try {
|
|
70
70
|
if (this.remainingTime > 0)
|
|
71
71
|
return;
|
|
@@ -83,13 +83,13 @@ class ot {
|
|
|
83
83
|
this.callback = e, this.options = {
|
|
84
84
|
...this.defaultOptions,
|
|
85
85
|
...t
|
|
86
|
-
},
|
|
86
|
+
}, $() && this.start();
|
|
87
87
|
}
|
|
88
88
|
get element() {
|
|
89
89
|
return this.options.element ?? document.body;
|
|
90
90
|
}
|
|
91
91
|
start() {
|
|
92
|
-
if (
|
|
92
|
+
if (!$()) {
|
|
93
93
|
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -108,7 +108,7 @@ class ot {
|
|
|
108
108
|
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle });
|
|
109
109
|
}
|
|
110
110
|
destroy() {
|
|
111
|
-
if (
|
|
111
|
+
if (!$()) {
|
|
112
112
|
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -142,25 +142,25 @@ class ot {
|
|
|
142
142
|
e ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle });
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
class
|
|
145
|
+
class ct {
|
|
146
146
|
constructor(e, t) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
a(this, "eventHandlerFunction");
|
|
148
|
+
a(this, "event", "visibilitychange");
|
|
149
|
+
a(this, "timeoutHandler");
|
|
150
|
+
a(this, "options");
|
|
151
|
+
a(this, "defaultOptions", {
|
|
152
152
|
timeout: 5e3,
|
|
153
153
|
once: !1,
|
|
154
154
|
immediate: !0
|
|
155
155
|
});
|
|
156
|
-
|
|
156
|
+
a(this, "isVisible", !1);
|
|
157
157
|
this.callback = e, this.options = {
|
|
158
158
|
...this.defaultOptions,
|
|
159
159
|
...t
|
|
160
|
-
}, this.eventHandlerFunction = this.eventHandler.bind(this),
|
|
160
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), $() && this.start();
|
|
161
161
|
}
|
|
162
162
|
start() {
|
|
163
|
-
if (
|
|
163
|
+
if (!$()) {
|
|
164
164
|
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
@@ -191,21 +191,21 @@ class nt {
|
|
|
191
191
|
const X = (s) => new Promise((e) => {
|
|
192
192
|
setTimeout(e, s);
|
|
193
193
|
});
|
|
194
|
-
class
|
|
195
|
-
constructor({ src: e, identifier: t, once: i = !0, async: o = !0, defer:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
class rs {
|
|
195
|
+
constructor({ src: e, identifier: t, once: i = !0, async: o = !0, defer: m = !0 }) {
|
|
196
|
+
a(this, "src");
|
|
197
|
+
a(this, "script");
|
|
198
|
+
a(this, "once");
|
|
199
|
+
a(this, "async");
|
|
200
|
+
a(this, "defer");
|
|
201
|
+
a(this, "identifier");
|
|
202
202
|
if (typeof window > "u")
|
|
203
203
|
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
204
204
|
if (!e)
|
|
205
205
|
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
206
206
|
if (!t)
|
|
207
207
|
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
208
|
-
this.src = e, this.identifier = t, this.once = i, this.async = o, this.defer =
|
|
208
|
+
this.src = e, this.identifier = t, this.once = i, this.async = o, this.defer = m;
|
|
209
209
|
}
|
|
210
210
|
removeTag(e) {
|
|
211
211
|
var t;
|
|
@@ -225,68 +225,71 @@ class ss {
|
|
|
225
225
|
return new Promise((t, i) => {
|
|
226
226
|
try {
|
|
227
227
|
const o = document.createElement("script");
|
|
228
|
-
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (
|
|
228
|
+
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (m) => i(new Error(`[ScriptLoader](injectScript) ${m.message}`))), o.addEventListener("load", (m) => (this.script = m, e[this.identifier] = m, t(m))), document.head.append(o);
|
|
229
229
|
} catch (o) {
|
|
230
230
|
throw new Error(`[ScriptLoader](init) ${o}`);
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return [...s].map((
|
|
235
|
+
function as(s) {
|
|
236
|
+
return [...s].map((e) => {
|
|
237
|
+
const t = e.codePointAt(0);
|
|
238
|
+
return t ? t % 32 + 127461 : void 0;
|
|
239
|
+
}).filter(at).map((e) => String.fromCodePoint(e)).join("");
|
|
237
240
|
}
|
|
238
|
-
const
|
|
239
|
-
|
|
241
|
+
const ae = "__vue_click_away__", Be = () => document.ontouchstart === null ? "touchstart" : "click", Fe = async (s, e) => {
|
|
242
|
+
Ne(s);
|
|
240
243
|
const t = e.instance, i = e.value, o = typeof i == "function";
|
|
241
244
|
if (!o)
|
|
242
245
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
243
|
-
await
|
|
246
|
+
await He(), s[ae] = (d) => {
|
|
244
247
|
if ((!s || !s.contains(d.target)) && i && o)
|
|
245
248
|
return i.call(t, d);
|
|
246
249
|
};
|
|
247
|
-
const
|
|
248
|
-
document.addEventListener(
|
|
249
|
-
},
|
|
250
|
-
const e =
|
|
251
|
-
document.removeEventListener(e, s[
|
|
252
|
-
},
|
|
253
|
-
e.value !== e.oldValue &&
|
|
254
|
-
},
|
|
255
|
-
mounted:
|
|
256
|
-
updated:
|
|
257
|
-
unmounted:
|
|
258
|
-
},
|
|
250
|
+
const m = Be();
|
|
251
|
+
document.addEventListener(m, s[ae], !1);
|
|
252
|
+
}, Ne = (s) => {
|
|
253
|
+
const e = Be();
|
|
254
|
+
document.removeEventListener(e, s[ae], !1), delete s[ae];
|
|
255
|
+
}, ut = (s, e) => {
|
|
256
|
+
e.value !== e.oldValue && Fe(s, e);
|
|
257
|
+
}, qe = {
|
|
258
|
+
mounted: Fe,
|
|
259
|
+
updated: ut,
|
|
260
|
+
unmounted: Ne
|
|
261
|
+
}, ls = {
|
|
259
262
|
install: (s) => {
|
|
260
|
-
s.directive("click-outside",
|
|
263
|
+
s.directive("click-outside", qe);
|
|
261
264
|
}
|
|
262
|
-
},
|
|
265
|
+
}, Ue = (s, e, t, i) => {
|
|
263
266
|
s.stopPropagation();
|
|
264
|
-
const { handler: o, exclude:
|
|
267
|
+
const { handler: o, exclude: m } = t.value;
|
|
265
268
|
let d = !1;
|
|
266
|
-
if (
|
|
267
|
-
for (const
|
|
268
|
-
d || (d = i.context.$refs[
|
|
269
|
+
if (m && m.length > 0)
|
|
270
|
+
for (const l of m)
|
|
271
|
+
d || (d = i.context.$refs[l].contains(s.target));
|
|
269
272
|
!e.contains(s.target) && !d && i.context[o]();
|
|
270
|
-
},
|
|
271
|
-
const i =
|
|
273
|
+
}, Ve = () => document.ontouchstart === null ? "touchstart" : "click", mt = (s, e, t) => {
|
|
274
|
+
const i = Ve();
|
|
272
275
|
document.removeEventListener(
|
|
273
276
|
i,
|
|
274
|
-
(o) =>
|
|
277
|
+
(o) => Ue(o, s, e, t)
|
|
275
278
|
);
|
|
276
|
-
},
|
|
277
|
-
const i =
|
|
279
|
+
}, dt = (s, e, t) => {
|
|
280
|
+
const i = Ve();
|
|
278
281
|
document.addEventListener(
|
|
279
282
|
i,
|
|
280
|
-
(o) =>
|
|
283
|
+
(o) => Ue(o, s, e, t)
|
|
281
284
|
);
|
|
282
|
-
},
|
|
283
|
-
mounted:
|
|
284
|
-
unmounted:
|
|
285
|
-
},
|
|
285
|
+
}, je = {
|
|
286
|
+
mounted: dt,
|
|
287
|
+
unmounted: mt
|
|
288
|
+
}, cs = {
|
|
286
289
|
install: (s) => {
|
|
287
|
-
s.directive("closable",
|
|
290
|
+
s.directive("closable", je);
|
|
288
291
|
}
|
|
289
|
-
},
|
|
292
|
+
}, ht = `
|
|
290
293
|
.maz-zoom-img {
|
|
291
294
|
position: fixed;
|
|
292
295
|
top: 0;
|
|
@@ -409,29 +412,29 @@ const ne = "__vue_click_away__", Se = () => document.ontouchstart === null ? "to
|
|
|
409
412
|
|
|
410
413
|
.maz-zoom-img .maz-zoom-btn:hover {
|
|
411
414
|
background-color: hsl(0, 0%, 0%);
|
|
412
|
-
}`,
|
|
415
|
+
}`, ke = {
|
|
413
416
|
close: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',
|
|
414
417
|
next: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',
|
|
415
418
|
previous: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',
|
|
416
419
|
spinner: '<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'
|
|
417
420
|
};
|
|
418
|
-
class
|
|
421
|
+
class vt {
|
|
419
422
|
constructor(e) {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
423
|
+
a(this, "options");
|
|
424
|
+
a(this, "loader");
|
|
425
|
+
a(this, "wrapper");
|
|
426
|
+
a(this, "img");
|
|
427
|
+
a(this, "keydownHandler");
|
|
428
|
+
a(this, "onImgLoadedCallback");
|
|
429
|
+
a(this, "buttonsAdded");
|
|
430
|
+
a(this, "defaultOptions", {
|
|
428
431
|
scale: !0,
|
|
429
432
|
blur: !0,
|
|
430
433
|
disabled: !1
|
|
431
434
|
});
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
a(this, "mouseEnterListener");
|
|
436
|
+
a(this, "mouseLeaveListener");
|
|
437
|
+
a(this, "renderPreviewListener");
|
|
435
438
|
if (!e.value)
|
|
436
439
|
throw new Error(
|
|
437
440
|
'[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`'
|
|
@@ -462,7 +465,7 @@ class ut {
|
|
|
462
465
|
e.classList.add(
|
|
463
466
|
"maz-is-open"
|
|
464
467
|
/* OPEN */
|
|
465
|
-
), this.addStyle(
|
|
468
|
+
), this.addStyle(ht);
|
|
466
469
|
const i = document.createElement("div");
|
|
467
470
|
i.classList.add("maz-zoom-img"), i.setAttribute("id", "MazImgPreviewFullsize"), i.addEventListener("click", (o) => {
|
|
468
471
|
i.isEqualNode(o.target) && this.closePreview();
|
|
@@ -475,15 +478,15 @@ class ut {
|
|
|
475
478
|
const e = this.getButton(), t = [], i = this.allInstances.length > 1;
|
|
476
479
|
if (!this.buttonsAdded) {
|
|
477
480
|
if (this.buttonsAdded = !0, i) {
|
|
478
|
-
const o = this.getButton("previous"),
|
|
479
|
-
t.push(o,
|
|
481
|
+
const o = this.getButton("previous"), m = this.getButton("next");
|
|
482
|
+
t.push(o, m);
|
|
480
483
|
}
|
|
481
484
|
this.wrapper.append(e), i && (this.wrapper.prepend(t[0]), this.wrapper.append(t[1]));
|
|
482
485
|
}
|
|
483
486
|
}
|
|
484
487
|
getLoader() {
|
|
485
488
|
const e = document.createElement("div");
|
|
486
|
-
return e.classList.add("maz-zoom-img__loader"), e.innerHTML =
|
|
489
|
+
return e.classList.add("maz-zoom-img__loader"), e.innerHTML = ke.spinner, e;
|
|
487
490
|
}
|
|
488
491
|
mouseLeave(e) {
|
|
489
492
|
this.options.scale && (e.style.transform = ""), this.options.blur && (e.style.filter = ""), e.style.zIndex = "";
|
|
@@ -496,7 +499,7 @@ class ut {
|
|
|
496
499
|
}
|
|
497
500
|
getButton(e = "close") {
|
|
498
501
|
const t = document.createElement("button");
|
|
499
|
-
return t.innerHTML =
|
|
502
|
+
return t.innerHTML = ke[e], t.addEventListener("click", () => {
|
|
500
503
|
e === "close" ? this.closePreview() : this.allInstances && this.nextPreviousImage(e === "next");
|
|
501
504
|
}), t.classList.add("maz-zoom-btn"), t.classList.add(`maz-zoom-btn--${e}`), t;
|
|
502
505
|
}
|
|
@@ -519,7 +522,7 @@ class ut {
|
|
|
519
522
|
".maz-zoom-img-instance.maz-is-open"
|
|
520
523
|
);
|
|
521
524
|
if (i) {
|
|
522
|
-
const o = this.allInstances.indexOf(i),
|
|
525
|
+
const o = this.allInstances.indexOf(i), m = t ? o + 1 : o - 1, d = this.allInstances[this.getNewInstanceIndex(m)];
|
|
523
526
|
d && this.useNextInstance(i, d);
|
|
524
527
|
}
|
|
525
528
|
}
|
|
@@ -549,22 +552,22 @@ class ut {
|
|
|
549
552
|
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
550
553
|
}
|
|
551
554
|
}
|
|
552
|
-
let
|
|
553
|
-
const
|
|
555
|
+
let te;
|
|
556
|
+
const Re = {
|
|
554
557
|
created(s, e) {
|
|
555
|
-
|
|
558
|
+
te = new vt(e), te.create(s);
|
|
556
559
|
},
|
|
557
560
|
updated(s, e) {
|
|
558
|
-
|
|
561
|
+
te.update(e);
|
|
559
562
|
},
|
|
560
563
|
unmounted(s) {
|
|
561
|
-
|
|
564
|
+
te.remove(s);
|
|
562
565
|
}
|
|
563
|
-
},
|
|
566
|
+
}, us = {
|
|
564
567
|
install(s) {
|
|
565
|
-
s.directive("zoom-img",
|
|
568
|
+
s.directive("zoom-img", Re);
|
|
566
569
|
}
|
|
567
|
-
},
|
|
570
|
+
}, ft = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", ze = {
|
|
568
571
|
baseClass: "m-lazy-img",
|
|
569
572
|
loadedClass: "m-lazy-loaded",
|
|
570
573
|
loadingClass: "m-lazy-loading",
|
|
@@ -578,14 +581,14 @@ const De = {
|
|
|
578
581
|
threshold: 0.1
|
|
579
582
|
}
|
|
580
583
|
};
|
|
581
|
-
class
|
|
584
|
+
class We {
|
|
582
585
|
constructor(e = {}) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
a(this, "observers", []);
|
|
587
|
+
a(this, "defaultOptions", ze);
|
|
588
|
+
a(this, "options");
|
|
589
|
+
a(this, "onImgLoadedCallback");
|
|
590
|
+
a(this, "onImgErrorCallback");
|
|
591
|
+
a(this, "hasImgLoaded", !1);
|
|
589
592
|
this.options = this.buildOptions(e), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
590
593
|
}
|
|
591
594
|
async loadErrorPhoto() {
|
|
@@ -691,18 +694,18 @@ class Fe {
|
|
|
691
694
|
i.src = t;
|
|
692
695
|
}
|
|
693
696
|
handleIntersectionObserver(e, t, i, o) {
|
|
694
|
-
var
|
|
697
|
+
var m, d;
|
|
695
698
|
this.observers.push(o);
|
|
696
|
-
for (const
|
|
697
|
-
if (
|
|
698
|
-
if ((d = (
|
|
699
|
+
for (const l of i)
|
|
700
|
+
if (l.isIntersecting) {
|
|
701
|
+
if ((d = (m = this.options).onIntersecting) == null || d.call(m, l.target), this.options.observerOnce && o.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
|
|
699
702
|
return;
|
|
700
703
|
this.loadImage(e, t);
|
|
701
704
|
}
|
|
702
705
|
}
|
|
703
706
|
createObserver(e, t) {
|
|
704
|
-
const i = (d,
|
|
705
|
-
this.handleIntersectionObserver(e, t, d,
|
|
707
|
+
const i = (d, l) => {
|
|
708
|
+
this.handleIntersectionObserver(e, t, d, l);
|
|
706
709
|
}, o = this.options.observerOptions;
|
|
707
710
|
new IntersectionObserver(i, o).observe(e);
|
|
708
711
|
}
|
|
@@ -720,7 +723,7 @@ class Fe {
|
|
|
720
723
|
async add(e, t) {
|
|
721
724
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
722
725
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
723
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
726
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, ft), await this.bindUpdateHandler(e, t, "bind");
|
|
724
727
|
}
|
|
725
728
|
async update(e, t) {
|
|
726
729
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -732,35 +735,35 @@ class Fe {
|
|
|
732
735
|
this.observers = [];
|
|
733
736
|
}
|
|
734
737
|
}
|
|
735
|
-
let
|
|
736
|
-
const
|
|
738
|
+
let se;
|
|
739
|
+
const gt = {
|
|
737
740
|
created(s, e) {
|
|
738
741
|
const t = typeof e.value == "object" ? e.value : {};
|
|
739
|
-
|
|
742
|
+
se = new We(t), se.add(s, e);
|
|
740
743
|
},
|
|
741
744
|
updated(s, e) {
|
|
742
|
-
|
|
745
|
+
se.update(s, e);
|
|
743
746
|
},
|
|
744
747
|
unmounted(s, e) {
|
|
745
|
-
|
|
748
|
+
se.remove(s, e);
|
|
746
749
|
}
|
|
747
|
-
},
|
|
750
|
+
}, pt = "lazy-img", ms = {
|
|
748
751
|
install(s, e = {}) {
|
|
749
752
|
const t = {
|
|
750
|
-
...
|
|
753
|
+
...ze,
|
|
751
754
|
...e,
|
|
752
755
|
observerOptions: {
|
|
753
|
-
...
|
|
756
|
+
...ze.observerOptions,
|
|
754
757
|
...e.observerOptions
|
|
755
758
|
}
|
|
756
|
-
}, i = new
|
|
757
|
-
s.directive(
|
|
759
|
+
}, i = new We(t);
|
|
760
|
+
s.directive(pt, {
|
|
758
761
|
created: i.add.bind(i),
|
|
759
762
|
updated: i.update.bind(i),
|
|
760
763
|
unmounted: i.remove.bind(i)
|
|
761
764
|
});
|
|
762
765
|
}
|
|
763
|
-
},
|
|
766
|
+
}, yt = ["onClick", "onKeypress"], bt = { class: "m-fullscreen-img-scroller" }, wt = ["src", "alt"], zt = /* @__PURE__ */ _e({
|
|
764
767
|
__name: "MazFullscreenImg",
|
|
765
768
|
props: {
|
|
766
769
|
destroy: { type: Function, default: void 0 },
|
|
@@ -776,181 +779,181 @@ const dt = {
|
|
|
776
779
|
},
|
|
777
780
|
emits: ["close", "previous", "next", "before-close"],
|
|
778
781
|
setup(s, { emit: e }) {
|
|
779
|
-
const t = e, i =
|
|
782
|
+
const t = e, i = w(() => import("./MazSpinner-dcb0164b.mjs")), o = w(() => import("./x-mark-35f2f1e7.mjs")), m = w(() => import("./chevron-left-39b4621e.mjs"));
|
|
780
783
|
let d;
|
|
781
|
-
|
|
784
|
+
tt(async () => {
|
|
782
785
|
d = await import("vue-scrollto");
|
|
783
786
|
});
|
|
784
|
-
const
|
|
785
|
-
() =>
|
|
786
|
-
),
|
|
787
|
-
() => (
|
|
788
|
-
), N = h(!1),
|
|
789
|
-
function
|
|
790
|
-
|
|
787
|
+
const l = s, f = h(!1), p = h(!1), y = h(!1), v = h(!1), M = h(!1), I = h(!1), T = h(!1), C = h(l.clickedElement instanceof HTMLImageElement), G = h(l.src), D = h(l.alt), B = h(), c = h(), k = g(
|
|
788
|
+
() => C.value && l.animated && !l.scaleAnimation
|
|
789
|
+
), F = g(
|
|
790
|
+
() => (C.value || !l.animated) && !l.scaleAnimation
|
|
791
|
+
), N = h(!1), le = g(() => I.value ? `--is-zoomed maz-cursor-zoom-in maz-max-w-[none] ${N.value ? "maz-h-screen maz-w-auto" : "maz-h-auto maz-w-screen"}` : `cursor-zoom-out ${N.value ? "maz-w-screen maz-h-screen --is-landscape" : "maz-h-screen maz-w-auto"}`);
|
|
792
|
+
function ce() {
|
|
793
|
+
p.value = !0, y.value = !1, v.value = !0;
|
|
791
794
|
}
|
|
792
|
-
function
|
|
793
|
-
t("before-close"),
|
|
795
|
+
function q() {
|
|
796
|
+
t("before-close"), f.value = !1;
|
|
794
797
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
798
|
+
function Q(r) {
|
|
799
|
+
r.key === "Escape" && (r.preventDefault(), q()), (r.key === "ArrowLeft" || r.key === "ArrowRight") && (r.preventDefault(), S(r.key === "ArrowRight"));
|
|
797
800
|
}
|
|
798
|
-
function
|
|
801
|
+
function ue() {
|
|
799
802
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
800
803
|
}
|
|
801
|
-
function
|
|
804
|
+
function me() {
|
|
802
805
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
803
806
|
}
|
|
804
807
|
function W() {
|
|
805
808
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
806
809
|
}
|
|
807
|
-
function
|
|
808
|
-
return
|
|
810
|
+
function J(r, n) {
|
|
811
|
+
return n < 0 ? r.length - 1 : n >= r.length ? 0 : n;
|
|
809
812
|
}
|
|
810
|
-
async function
|
|
811
|
-
|
|
812
|
-
const
|
|
813
|
-
|
|
813
|
+
async function de(r, n) {
|
|
814
|
+
r.classList.remove(l.openInstanceClass), n.classList.add(l.openInstanceClass);
|
|
815
|
+
const u = n.getAttribute("data-src"), b = n.getAttribute("data-alt");
|
|
816
|
+
D.value = b ?? void 0, u && (G.value = u), p.value = !1, await X(300), p.value || (y.value = !0);
|
|
814
817
|
}
|
|
815
|
-
function
|
|
816
|
-
const
|
|
817
|
-
`.m-fullscreen-img-instance.${
|
|
818
|
+
function S(r) {
|
|
819
|
+
const n = document.querySelector(
|
|
820
|
+
`.m-fullscreen-img-instance.${l.openInstanceClass}`
|
|
818
821
|
);
|
|
819
|
-
if (
|
|
820
|
-
const
|
|
821
|
-
A &&
|
|
822
|
+
if (n) {
|
|
823
|
+
const u = W(), b = u.indexOf(n), O = r ? b + 1 : b - 1, A = u[J(u, O)];
|
|
824
|
+
A && de(n, A), t(r ? "next" : "previous");
|
|
822
825
|
}
|
|
823
826
|
}
|
|
824
|
-
async function
|
|
825
|
-
const
|
|
826
|
-
|
|
827
|
-
const
|
|
828
|
-
d.scrollTo(
|
|
829
|
-
container:
|
|
827
|
+
async function he(r) {
|
|
828
|
+
const n = r.target;
|
|
829
|
+
n.style.width = `${n.clientWidth}px`, n.style.height = `${n.clientHeight}px`, await X(0), I.value = !I.value, n.style.removeProperty("width"), n.style.removeProperty("height"), await X(0);
|
|
830
|
+
const u = n.clientWidth / r.clientY, O = window.innerWidth / u - window.innerHeight / 2;
|
|
831
|
+
d.scrollTo(n, 200, {
|
|
832
|
+
container: n.parentElement,
|
|
830
833
|
easing: "linear",
|
|
831
|
-
offset: I.value ?
|
|
834
|
+
offset: I.value ? O : 0
|
|
832
835
|
});
|
|
833
836
|
}
|
|
834
|
-
|
|
835
|
-
await
|
|
837
|
+
Ee(async () => {
|
|
838
|
+
await He(), document.addEventListener("keydown", Q), f.value = !0, y.value = !0, ue(), M.value = W().length > 1, c.value && (N.value = l.clickedElementBounds.height < l.clickedElementBounds.width);
|
|
836
839
|
});
|
|
837
|
-
function
|
|
838
|
-
c.value && (
|
|
840
|
+
function K() {
|
|
841
|
+
c.value && (T.value = !0, c.value.style.removeProperty("margin-left"), c.value.style.removeProperty("margin-right"), c.value.style.opacity = "0.5", c.value.style.width = `${l.clickedElementBounds.width}px`, c.value.style.height = `${l.clickedElementBounds.height}px`, c.value.style.top = `${l.clickedElementBounds.top}px`, c.value.style.left = `${l.clickedElementBounds.left}px`);
|
|
839
842
|
}
|
|
840
|
-
async function
|
|
843
|
+
async function ve() {
|
|
841
844
|
if (await X(0), c.value) {
|
|
842
845
|
c.value.style.opacity = "1", c.value.style.removeProperty("height"), c.value.style.removeProperty("width"), c.value.style.removeProperty("transform");
|
|
843
|
-
const
|
|
846
|
+
const r = window.innerWidth, n = window.innerHeight, u = l.clickedElementBounds.height, b = l.clickedElementBounds.width;
|
|
844
847
|
if (N.value) {
|
|
845
848
|
c.value.style.left = "0px";
|
|
846
|
-
const
|
|
849
|
+
const O = u * r / b, A = (n - O) / 2;
|
|
847
850
|
c.value.style.top = `${A <= 0 ? 0 : A}px`;
|
|
848
851
|
} else {
|
|
849
852
|
c.value.style.top = "0px";
|
|
850
|
-
const
|
|
853
|
+
const O = b * n / u, A = (r - O) / 2;
|
|
851
854
|
c.value.style.left = `${A <= 0 ? 0 : A}px`;
|
|
852
855
|
}
|
|
853
856
|
}
|
|
854
857
|
}
|
|
855
|
-
function
|
|
856
|
-
c.value && (c.value.style.removeProperty("top"), c.value.style.removeProperty("left"), c.value.style.marginLeft = "auto", c.value.style.marginRight = "auto", c.value.style.removeProperty("opacity")),
|
|
858
|
+
function Y() {
|
|
859
|
+
c.value && (c.value.style.removeProperty("top"), c.value.style.removeProperty("left"), c.value.style.marginLeft = "auto", c.value.style.marginRight = "auto", c.value.style.removeProperty("opacity")), T.value = !1;
|
|
857
860
|
}
|
|
858
|
-
function
|
|
861
|
+
function fe() {
|
|
859
862
|
if (c.value) {
|
|
860
|
-
const { left:
|
|
861
|
-
c.value.style.left = `${
|
|
863
|
+
const { left: r, top: n } = c.value.getBoundingClientRect();
|
|
864
|
+
c.value.style.left = `${r}px`, c.value.style.top = `${n}px`, c.value.style.width = `${c.value.width}px`, c.value.style.height = `${c.value.height}px`, T.value = !0;
|
|
862
865
|
}
|
|
863
866
|
}
|
|
864
|
-
function
|
|
865
|
-
var
|
|
866
|
-
t("close"), (
|
|
867
|
+
function ge() {
|
|
868
|
+
var r, n;
|
|
869
|
+
t("close"), (r = B.value) == null || r.remove(), (n = l.destroy) == null || n.call(l);
|
|
867
870
|
}
|
|
868
|
-
return
|
|
869
|
-
document.removeEventListener("keydown",
|
|
870
|
-
}), (
|
|
871
|
+
return $e(() => {
|
|
872
|
+
document.removeEventListener("keydown", Q), me();
|
|
873
|
+
}), (r, n) => (z(), Z("div", {
|
|
871
874
|
ref_key: "FullscreenImgElement",
|
|
872
|
-
ref:
|
|
875
|
+
ref: B,
|
|
873
876
|
role: "button",
|
|
874
|
-
class:
|
|
877
|
+
class: re(["m-fullscreen-img", { "--animation-active": T.value }]),
|
|
875
878
|
tabindex: "0",
|
|
876
|
-
onClick:
|
|
877
|
-
onKeypress: st(
|
|
879
|
+
onClick: _(q, ["self"]),
|
|
880
|
+
onKeypress: st(_(q, ["prevent"]), ["esc"])
|
|
878
881
|
}, [
|
|
879
|
-
|
|
882
|
+
be(P(
|
|
880
883
|
L(i),
|
|
881
884
|
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
882
885
|
null,
|
|
883
886
|
512
|
|
884
887
|
/* NEED_PATCH */
|
|
885
888
|
), [
|
|
886
|
-
[
|
|
889
|
+
[we, y.value]
|
|
887
890
|
]),
|
|
888
|
-
|
|
891
|
+
v.value && M.value ? (z(), Z("button", {
|
|
889
892
|
key: 0,
|
|
890
893
|
type: "button",
|
|
891
894
|
class: "m-fullscreen-btn --next",
|
|
892
|
-
onClick:
|
|
895
|
+
onClick: n[0] || (n[0] = _((u) => S(!0), ["stop"]))
|
|
893
896
|
}, [
|
|
894
|
-
|
|
895
|
-
])) :
|
|
896
|
-
|
|
897
|
+
P(L(m), { class: "maz-rotate-90 maz-text-2xl" })
|
|
898
|
+
])) : H("v-if", !0),
|
|
899
|
+
f.value && v.value && M.value ? (z(), Z("button", {
|
|
897
900
|
key: 1,
|
|
898
901
|
type: "button",
|
|
899
902
|
class: "m-fullscreen-btn --previous",
|
|
900
|
-
onClick:
|
|
903
|
+
onClick: n[1] || (n[1] = _((u) => S(!1), ["stop"]))
|
|
901
904
|
}, [
|
|
902
|
-
|
|
903
|
-
])) :
|
|
904
|
-
|
|
905
|
+
P(L(m), { class: "maz-text-2xl" })
|
|
906
|
+
])) : H("v-if", !0),
|
|
907
|
+
E("button", {
|
|
905
908
|
type: "button",
|
|
906
909
|
class: "m-fullscreen-btn --close",
|
|
907
|
-
onClick:
|
|
910
|
+
onClick: q
|
|
908
911
|
}, [
|
|
909
|
-
|
|
912
|
+
P(L(o), { class: "maz-text-2xl" })
|
|
910
913
|
]),
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
name:
|
|
914
|
-
onBeforeEnter:
|
|
915
|
-
onEnter:
|
|
916
|
-
onAfterEnter:
|
|
917
|
-
onBeforeLeave:
|
|
918
|
-
onLeave:
|
|
919
|
-
onAfterLeave:
|
|
914
|
+
E("div", bt, [
|
|
915
|
+
P(Me, {
|
|
916
|
+
name: F.value ? void 0 : "maz-scale-fade",
|
|
917
|
+
onBeforeEnter: n[3] || (n[3] = (u) => k.value && K()),
|
|
918
|
+
onEnter: n[4] || (n[4] = (u) => k.value && ve()),
|
|
919
|
+
onAfterEnter: n[5] || (n[5] = (u) => k.value && Y()),
|
|
920
|
+
onBeforeLeave: n[6] || (n[6] = (u) => k.value && fe()),
|
|
921
|
+
onLeave: n[7] || (n[7] = (u) => k.value && K()),
|
|
922
|
+
onAfterLeave: ge,
|
|
920
923
|
persisted: ""
|
|
921
924
|
}, {
|
|
922
|
-
default:
|
|
923
|
-
|
|
925
|
+
default: ne(() => [
|
|
926
|
+
be(E("img", {
|
|
924
927
|
id: "ZvImgElement",
|
|
925
928
|
ref_key: "ImgElement",
|
|
926
929
|
ref: c,
|
|
927
|
-
src:
|
|
928
|
-
alt:
|
|
930
|
+
src: G.value,
|
|
931
|
+
alt: D.value,
|
|
929
932
|
tabindex: "0",
|
|
930
|
-
class:
|
|
931
|
-
onLoad:
|
|
932
|
-
onClick:
|
|
933
|
-
}, null, 42,
|
|
934
|
-
[
|
|
933
|
+
class: re([{ zoomable: r.zoom }, le.value]),
|
|
934
|
+
onLoad: ce,
|
|
935
|
+
onClick: n[2] || (n[2] = (u) => r.zoom ? he(u) : void 0)
|
|
936
|
+
}, null, 42, wt), [
|
|
937
|
+
[we, f.value]
|
|
935
938
|
])
|
|
936
939
|
]),
|
|
937
940
|
_: 1
|
|
938
941
|
/* STABLE */
|
|
939
942
|
}, 8, ["name"])
|
|
940
943
|
])
|
|
941
|
-
], 42,
|
|
944
|
+
], 42, yt));
|
|
942
945
|
}
|
|
943
946
|
});
|
|
944
|
-
const
|
|
947
|
+
const Ke = (s, e) => {
|
|
945
948
|
const t = s.__vccOpts || s;
|
|
946
949
|
for (const [i, o] of e)
|
|
947
950
|
t[i] = o;
|
|
948
951
|
return t;
|
|
949
|
-
},
|
|
950
|
-
class
|
|
952
|
+
}, Et = /* @__PURE__ */ Ke(zt, [["__scopeId", "data-v-d0c959c7"]]), Ae = "m-fullscreen-is-open";
|
|
953
|
+
class Lt {
|
|
951
954
|
constructor() {
|
|
952
|
-
|
|
953
|
-
|
|
955
|
+
a(this, "options");
|
|
956
|
+
a(this, "defaultOptions", {
|
|
954
957
|
scaleOnHover: !1,
|
|
955
958
|
blurOnHover: !1,
|
|
956
959
|
disabled: !1,
|
|
@@ -958,17 +961,17 @@ class bt {
|
|
|
958
961
|
zoom: !0,
|
|
959
962
|
scaleAnimation: !1
|
|
960
963
|
});
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
+
a(this, "mouseEnterListener");
|
|
965
|
+
a(this, "mouseLeaveListener");
|
|
966
|
+
a(this, "renderPreviewListener");
|
|
964
967
|
}
|
|
965
968
|
buildOptions(e, t) {
|
|
966
|
-
const i = typeof t.value == "object" ? t.value : { src: t.value, alt: void 0 }, o = (i == null ? void 0 : i.src) ?? this.getImgSrc(e),
|
|
969
|
+
const i = typeof t.value == "object" ? t.value : { src: t.value, alt: void 0 }, o = (i == null ? void 0 : i.src) ?? this.getImgSrc(e), m = (i == null ? void 0 : i.alt) ?? this.getImgAlt(e);
|
|
967
970
|
return {
|
|
968
971
|
...this.defaultOptions,
|
|
969
972
|
...i,
|
|
970
973
|
src: o,
|
|
971
|
-
alt:
|
|
974
|
+
alt: m
|
|
972
975
|
};
|
|
973
976
|
}
|
|
974
977
|
get allInstances() {
|
|
@@ -1001,10 +1004,10 @@ class bt {
|
|
|
1001
1004
|
e.removeEventListener("mouseenter", this.mouseEnterListener), e.removeEventListener("mouseleave", this.mouseLeaveListener), e.removeEventListener("click", this.renderPreviewListener), e.classList.remove("m-fullscreen-img-instance"), e.style.cursor = "";
|
|
1002
1005
|
}
|
|
1003
1006
|
renderPreview(e) {
|
|
1004
|
-
return e.classList.add(
|
|
1007
|
+
return e.classList.add(Ae), De(Et, {
|
|
1005
1008
|
props: {
|
|
1006
1009
|
...this.options,
|
|
1007
|
-
openInstanceClass:
|
|
1010
|
+
openInstanceClass: Ae,
|
|
1008
1011
|
clickedElement: e,
|
|
1009
1012
|
clickedElementBounds: e.getBoundingClientRect()
|
|
1010
1013
|
},
|
|
@@ -1018,55 +1021,55 @@ class bt {
|
|
|
1018
1021
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.05)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
1019
1022
|
}
|
|
1020
1023
|
}
|
|
1021
|
-
let
|
|
1022
|
-
const
|
|
1024
|
+
let ie;
|
|
1025
|
+
const Ye = {
|
|
1023
1026
|
mounted(s, e) {
|
|
1024
|
-
return
|
|
1027
|
+
return ie = new Lt(), ie.create(s, e);
|
|
1025
1028
|
},
|
|
1026
1029
|
updated(s, e) {
|
|
1027
|
-
return
|
|
1030
|
+
return ie.update(s, e);
|
|
1028
1031
|
},
|
|
1029
1032
|
unmounted(s) {
|
|
1030
|
-
return
|
|
1033
|
+
return ie.remove(s);
|
|
1031
1034
|
}
|
|
1032
|
-
},
|
|
1035
|
+
}, ds = {
|
|
1033
1036
|
install(s) {
|
|
1034
|
-
s.directive("fullscreen-img",
|
|
1037
|
+
s.directive("fullscreen-img", Ye);
|
|
1035
1038
|
}
|
|
1036
|
-
},
|
|
1039
|
+
}, It = [
|
|
1037
1040
|
{
|
|
1038
1041
|
name: "click-outside",
|
|
1039
|
-
directive:
|
|
1042
|
+
directive: qe
|
|
1040
1043
|
},
|
|
1041
1044
|
{
|
|
1042
1045
|
name: "closable",
|
|
1043
|
-
directive:
|
|
1046
|
+
directive: je
|
|
1044
1047
|
},
|
|
1045
1048
|
{
|
|
1046
1049
|
name: "zoom-img",
|
|
1047
|
-
directive:
|
|
1050
|
+
directive: Re
|
|
1048
1051
|
},
|
|
1049
1052
|
{
|
|
1050
1053
|
name: "lazy-img",
|
|
1051
|
-
directive:
|
|
1054
|
+
directive: gt
|
|
1052
1055
|
},
|
|
1053
1056
|
{
|
|
1054
1057
|
name: "fullscreen-img",
|
|
1055
|
-
directive:
|
|
1058
|
+
directive: Ye
|
|
1056
1059
|
}
|
|
1057
|
-
],
|
|
1060
|
+
], hs = {
|
|
1058
1061
|
install(s) {
|
|
1059
|
-
for (const { name: e, directive: t } of
|
|
1062
|
+
for (const { name: e, directive: t } of It)
|
|
1060
1063
|
s.directive(e, t);
|
|
1061
1064
|
}
|
|
1062
|
-
},
|
|
1065
|
+
}, Tt = (s) => s ? (s = s.toString(), s.charAt(0).toUpperCase() + s.slice(1)) : "", kt = {
|
|
1063
1066
|
style: "currency",
|
|
1064
1067
|
minimumFractionDigits: 2,
|
|
1065
1068
|
round: !1
|
|
1066
|
-
},
|
|
1069
|
+
}, At = (s, e, t) => {
|
|
1067
1070
|
let i = Number(s);
|
|
1068
1071
|
return t.round && (i = Math.floor(i), t.minimumFractionDigits = 0), new Intl.NumberFormat(e, t).format(i);
|
|
1069
|
-
},
|
|
1072
|
+
}, xt = (s, e, t) => {
|
|
1070
1073
|
if (s === void 0)
|
|
1071
1074
|
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
1072
1075
|
if (e === void 0)
|
|
@@ -1075,38 +1078,38 @@ const Ne = {
|
|
|
1075
1078
|
throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");
|
|
1076
1079
|
if (t.currency === void 0)
|
|
1077
1080
|
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
1078
|
-
},
|
|
1081
|
+
}, Ct = (s, e, t) => {
|
|
1079
1082
|
const i = {
|
|
1080
|
-
...
|
|
1083
|
+
...kt,
|
|
1081
1084
|
...t
|
|
1082
1085
|
};
|
|
1083
|
-
|
|
1086
|
+
xt(s, e, i);
|
|
1084
1087
|
try {
|
|
1085
|
-
return
|
|
1088
|
+
return At(s, e, i);
|
|
1086
1089
|
} catch (o) {
|
|
1087
1090
|
throw new Error(`[maz-ui](FilterCurrency) ${o}`);
|
|
1088
1091
|
}
|
|
1089
|
-
},
|
|
1092
|
+
}, St = {
|
|
1090
1093
|
month: "short",
|
|
1091
1094
|
day: "numeric",
|
|
1092
1095
|
year: "numeric"
|
|
1093
|
-
},
|
|
1096
|
+
}, Ot = (s, e, t) => {
|
|
1094
1097
|
if (e === void 0)
|
|
1095
1098
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
1096
1099
|
if (typeof e != "string")
|
|
1097
1100
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
1098
|
-
const i = t ??
|
|
1101
|
+
const i = t ?? St;
|
|
1099
1102
|
try {
|
|
1100
1103
|
const o = s instanceof Date ? s : new Date(s);
|
|
1101
1104
|
return new Intl.DateTimeFormat(e, i).format(o);
|
|
1102
1105
|
} catch (o) {
|
|
1103
1106
|
throw new Error(`[maz-ui](FilterDate) ${o}`);
|
|
1104
1107
|
}
|
|
1105
|
-
},
|
|
1108
|
+
}, Pt = {
|
|
1106
1109
|
minimumFractionDigits: 2
|
|
1107
|
-
},
|
|
1110
|
+
}, Ht = (s, e, t) => {
|
|
1108
1111
|
const i = {
|
|
1109
|
-
...
|
|
1112
|
+
...Pt,
|
|
1110
1113
|
...t
|
|
1111
1114
|
};
|
|
1112
1115
|
if (s === void 0)
|
|
@@ -1120,38 +1123,45 @@ const Ne = {
|
|
|
1120
1123
|
} catch (o) {
|
|
1121
1124
|
throw new Error(`[maz-ui](FilterNumber) ${o}`);
|
|
1122
1125
|
}
|
|
1123
|
-
},
|
|
1124
|
-
capitalize:
|
|
1125
|
-
currency:
|
|
1126
|
-
date:
|
|
1127
|
-
number:
|
|
1128
|
-
},
|
|
1126
|
+
}, _t = {
|
|
1127
|
+
capitalize: Tt,
|
|
1128
|
+
currency: Ct,
|
|
1129
|
+
date: Ot,
|
|
1130
|
+
number: Ht
|
|
1131
|
+
}, vs = {
|
|
1129
1132
|
install(s) {
|
|
1130
|
-
s.provide("filters",
|
|
1133
|
+
s.provide("filters", _t);
|
|
1131
1134
|
}
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
r(this, "timer");
|
|
1138
|
-
r(this, "startedAt");
|
|
1139
|
-
this.startedAt = Date.now(), this.callback = e, this.delay = t, this.start();
|
|
1135
|
+
}, $t = ({ timeout: s, callback: e, remainingTimeUpdate: t = 200 }) => {
|
|
1136
|
+
const i = h(s);
|
|
1137
|
+
let o;
|
|
1138
|
+
function m() {
|
|
1139
|
+
i.value = s, d();
|
|
1140
1140
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1141
|
+
function d() {
|
|
1142
|
+
o || (o = setInterval(() => {
|
|
1143
|
+
i.value -= t, i.value <= 0 && (p(), e == null || e());
|
|
1144
|
+
}, t));
|
|
1143
1145
|
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
+
function l() {
|
|
1147
|
+
o && (clearInterval(o), o = void 0);
|
|
1146
1148
|
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
+
function f() {
|
|
1150
|
+
!o && i.value > 0 && d();
|
|
1149
1151
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
+
function p() {
|
|
1153
|
+
l();
|
|
1152
1154
|
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
+
return $e(() => {
|
|
1156
|
+
p();
|
|
1157
|
+
}), {
|
|
1158
|
+
remainingTime: i,
|
|
1159
|
+
start: m,
|
|
1160
|
+
pause: l,
|
|
1161
|
+
resume: f,
|
|
1162
|
+
stop: p
|
|
1163
|
+
};
|
|
1164
|
+
}, Mt = { class: "m-toast__message-wrapper" }, Dt = { class: "m-toast__message" }, Bt = { class: "maz-flex maz-items-center maz-gap-2" }, Ft = { key: 0 }, Nt = { class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1" }, qt = /* @__PURE__ */ _e({
|
|
1155
1165
|
__name: "MazToast",
|
|
1156
1166
|
props: {
|
|
1157
1167
|
position: {
|
|
@@ -1164,126 +1174,188 @@ const Pt = { class: "m-toast__message-wrapper" }, Ht = { class: "m-toast__messag
|
|
|
1164
1174
|
noPauseOnHover: { type: Boolean, default: !1 },
|
|
1165
1175
|
type: {
|
|
1166
1176
|
type: String,
|
|
1167
|
-
default: "info"
|
|
1168
|
-
validator: (s) => ["info", "success", "warning", "danger"].includes(s)
|
|
1177
|
+
default: "info"
|
|
1169
1178
|
},
|
|
1170
1179
|
message: { type: String, required: !0 },
|
|
1171
1180
|
link: { type: Object, default: void 0 },
|
|
1172
1181
|
action: { type: Object, default: void 0 },
|
|
1173
1182
|
persistent: { type: Boolean, default: !1 }
|
|
1174
1183
|
},
|
|
1175
|
-
emits: ["close", "click"],
|
|
1184
|
+
emits: ["close", "click", "open"],
|
|
1176
1185
|
setup(s, { emit: e }) {
|
|
1177
|
-
const t =
|
|
1186
|
+
const t = w(() => import("./MazBtn-6d482774.mjs")), i = w(() => import("./x-mark-35f2f1e7.mjs")), o = w(
|
|
1178
1187
|
() => import("./arrow-top-right-on-square-15191934.mjs")
|
|
1179
|
-
),
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1188
|
+
), m = w(
|
|
1189
|
+
() => import("./exclamation-triangle-21bf116a.mjs")
|
|
1190
|
+
), d = w(
|
|
1191
|
+
() => import("./exclamation-circle-e2620aab.mjs")
|
|
1192
|
+
), l = w(
|
|
1193
|
+
() => import("./information-circle-b8051b19.mjs")
|
|
1194
|
+
), f = w(() => import("./check-circle-59c383ed.mjs")), p = w(() => import("./link-bb14441d.mjs")), y = h(), v = s, M = g(() => {
|
|
1195
|
+
switch (v.type) {
|
|
1196
|
+
case "danger":
|
|
1197
|
+
return m;
|
|
1198
|
+
case "info":
|
|
1199
|
+
return l;
|
|
1200
|
+
case "success":
|
|
1201
|
+
return f;
|
|
1202
|
+
case "warning":
|
|
1203
|
+
return d;
|
|
1204
|
+
default:
|
|
1205
|
+
return;
|
|
1206
|
+
}
|
|
1207
|
+
}), I = e, T = g(() => v.position.includes("top") ? "top" : "bottom"), C = g(() => v.position.includes("left") ? "left" : v.position.includes("right") ? "right" : "center"), G = g(() => C.value !== "center" ? C.value === "right" ? "m-slide-right" : "m-slide-left" : T.value === "top" ? "m-slide-top" : "m-slide-bottom"), D = h(!1), B = h(!1), c = h(), k = `m-toast-container --${T.value} --${C.value}`, F = `.${k.replaceAll(" ", ".")}`, { start: N, stop: le, pause: ce, resume: q, remainingTime: Q } = $t({
|
|
1208
|
+
callback: Y,
|
|
1209
|
+
timeout: v.timeout
|
|
1210
|
+
});
|
|
1211
|
+
function ue() {
|
|
1212
|
+
const r = document.querySelector(F);
|
|
1213
|
+
if (!r && !r) {
|
|
1214
|
+
const n = document.body, u = document.createElement("div");
|
|
1215
|
+
u.className = k, n.append(u);
|
|
1184
1216
|
}
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1217
|
+
}
|
|
1218
|
+
function me() {
|
|
1219
|
+
const r = document.querySelector(F);
|
|
1220
|
+
return !v.queue && v.maxToasts === !1 ? !1 : typeof v.maxToasts == "number" && r ? v.maxToasts <= r.childElementCount : r && r.childElementCount > 0;
|
|
1221
|
+
}
|
|
1222
|
+
function W() {
|
|
1223
|
+
if (me()) {
|
|
1224
|
+
c.value = setTimeout(W, 250);
|
|
1191
1225
|
return;
|
|
1192
1226
|
}
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
};
|
|
1196
|
-
function K(m) {
|
|
1197
|
-
p("click", m), n.persistent || P();
|
|
1227
|
+
const r = document.querySelector(F);
|
|
1228
|
+
y.value && r && r.prepend(y.value), B.value = !0, N();
|
|
1198
1229
|
}
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1230
|
+
const J = h("100%");
|
|
1231
|
+
function de() {
|
|
1232
|
+
switch (v.type) {
|
|
1233
|
+
case "danger":
|
|
1234
|
+
return "maz-bg-danger-700";
|
|
1235
|
+
case "info":
|
|
1236
|
+
return "maz-bg-info-700";
|
|
1237
|
+
case "success":
|
|
1238
|
+
return "maz-bg-success-700";
|
|
1239
|
+
case "warning":
|
|
1240
|
+
return "maz-bg-warning-700";
|
|
1241
|
+
default:
|
|
1242
|
+
return "maz-bg-secondary";
|
|
1243
|
+
}
|
|
1202
1244
|
}
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1245
|
+
it(
|
|
1246
|
+
() => Q.value,
|
|
1247
|
+
(r) => {
|
|
1248
|
+
if (typeof r == "number") {
|
|
1249
|
+
const n = 100 * r / v.timeout;
|
|
1250
|
+
J.value = `${n}%`, r <= 0 && Y();
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
);
|
|
1254
|
+
function S(r) {
|
|
1255
|
+
I("click", r), v.persistent || Y();
|
|
1256
|
+
}
|
|
1257
|
+
async function he(r, n) {
|
|
1258
|
+
var u;
|
|
1259
|
+
D.value = !0, await r(), D.value = !1, (u = v.action) != null && u.closeToast && S(n);
|
|
1260
|
+
}
|
|
1261
|
+
function K(r) {
|
|
1262
|
+
v.noPauseOnHover || (r ? ce() : q());
|
|
1263
|
+
}
|
|
1264
|
+
function ve() {
|
|
1265
|
+
le(), c.value && clearTimeout(c.value);
|
|
1266
|
+
}
|
|
1267
|
+
function Y() {
|
|
1268
|
+
ve(), B.value = !1;
|
|
1269
|
+
}
|
|
1270
|
+
function fe() {
|
|
1271
|
+
I("open");
|
|
1272
|
+
}
|
|
1273
|
+
function ge() {
|
|
1274
|
+
var n;
|
|
1275
|
+
I("close"), (n = y.value) == null || n.remove();
|
|
1276
|
+
const r = document.querySelector(F);
|
|
1277
|
+
r && !(r != null && r.hasChildNodes()) && r.remove();
|
|
1278
|
+
}
|
|
1279
|
+
return Ee(() => {
|
|
1280
|
+
ue(), W();
|
|
1281
|
+
}), (r, n) => (z(), U(Me, {
|
|
1282
|
+
name: G.value,
|
|
1283
|
+
onAfterLeave: ge,
|
|
1284
|
+
onAfterEnter: fe,
|
|
1219
1285
|
persisted: ""
|
|
1220
1286
|
}, {
|
|
1221
|
-
default:
|
|
1222
|
-
|
|
1287
|
+
default: ne(() => [
|
|
1288
|
+
be(E(
|
|
1223
1289
|
"button",
|
|
1224
1290
|
{
|
|
1225
1291
|
ref_key: "Toaster",
|
|
1226
|
-
ref:
|
|
1227
|
-
class:
|
|
1292
|
+
ref: y,
|
|
1293
|
+
class: re(["m-toast", [`--${s.type}`, `--${T.value}`, `--${C.value}`, { "maz-pb-1": s.timeout }]]),
|
|
1228
1294
|
role: "alert",
|
|
1229
|
-
onMouseover:
|
|
1230
|
-
onMouseleave:
|
|
1231
|
-
onClick:
|
|
1232
|
-
var
|
|
1233
|
-
return s.link && !((
|
|
1295
|
+
onMouseover: n[2] || (n[2] = (u) => K(!0)),
|
|
1296
|
+
onMouseleave: n[3] || (n[3] = (u) => K(!1)),
|
|
1297
|
+
onClick: n[4] || (n[4] = _((u) => {
|
|
1298
|
+
var b;
|
|
1299
|
+
return s.link && !((b = s.link) != null && b.closeToast) ? void 0 : S(u);
|
|
1234
1300
|
}, ["stop"]))
|
|
1235
1301
|
},
|
|
1236
1302
|
[
|
|
1237
|
-
|
|
1238
|
-
|
|
1303
|
+
M.value ? (z(), U(ot(M.value), {
|
|
1304
|
+
key: 0,
|
|
1305
|
+
class: "maz-text-2xl"
|
|
1306
|
+
})) : H("v-if", !0),
|
|
1307
|
+
E("div", Mt, [
|
|
1308
|
+
E(
|
|
1239
1309
|
"p",
|
|
1240
|
-
|
|
1241
|
-
|
|
1310
|
+
Dt,
|
|
1311
|
+
pe(s.message),
|
|
1242
1312
|
1
|
|
1243
1313
|
/* TEXT */
|
|
1244
1314
|
)
|
|
1245
1315
|
]),
|
|
1246
|
-
s.action ? (z(),
|
|
1247
|
-
key:
|
|
1316
|
+
s.action ? (z(), U(L(t), {
|
|
1317
|
+
key: 1,
|
|
1318
|
+
"data-test": "action-btn",
|
|
1248
1319
|
color: s.type,
|
|
1249
1320
|
pastel: "",
|
|
1250
|
-
loading:
|
|
1321
|
+
loading: D.value,
|
|
1251
1322
|
size: "sm",
|
|
1252
|
-
onClick:
|
|
1323
|
+
onClick: n[0] || (n[0] = _((u) => he(s.action.func, u), ["stop"]))
|
|
1253
1324
|
}, {
|
|
1254
|
-
default:
|
|
1255
|
-
|
|
1256
|
-
|
|
1325
|
+
default: ne(() => [
|
|
1326
|
+
nt(
|
|
1327
|
+
pe(s.action.text),
|
|
1257
1328
|
1
|
|
1258
1329
|
/* TEXT */
|
|
1259
1330
|
)
|
|
1260
1331
|
]),
|
|
1261
1332
|
_: 1
|
|
1262
1333
|
/* STABLE */
|
|
1263
|
-
}, 8, ["color", "loading"])) :
|
|
1264
|
-
s.link ? (z(),
|
|
1265
|
-
key:
|
|
1334
|
+
}, 8, ["color", "loading"])) : H("v-if", !0),
|
|
1335
|
+
s.link ? (z(), U(L(t), {
|
|
1336
|
+
key: 2,
|
|
1337
|
+
"data-test": "link-btn",
|
|
1266
1338
|
color: s.type,
|
|
1267
1339
|
pastel: "",
|
|
1268
1340
|
size: "xs",
|
|
1269
1341
|
href: s.link.href,
|
|
1270
1342
|
target: s.link.target ?? "_self"
|
|
1271
1343
|
}, {
|
|
1272
|
-
default:
|
|
1273
|
-
var
|
|
1344
|
+
default: ne(() => {
|
|
1345
|
+
var u;
|
|
1274
1346
|
return [
|
|
1275
|
-
|
|
1347
|
+
E("div", Bt, [
|
|
1276
1348
|
s.link.text ? (z(), Z(
|
|
1277
1349
|
"span",
|
|
1278
|
-
|
|
1279
|
-
|
|
1350
|
+
Ft,
|
|
1351
|
+
pe(s.link.text),
|
|
1280
1352
|
1
|
|
1281
1353
|
/* TEXT */
|
|
1282
|
-
)) :
|
|
1283
|
-
((
|
|
1354
|
+
)) : H("v-if", !0),
|
|
1355
|
+
((u = s.link) == null ? void 0 : u.target) == "_blank" ? (z(), U(L(o), {
|
|
1284
1356
|
key: 1,
|
|
1285
1357
|
class: "maz-text-xl"
|
|
1286
|
-
})) : (z(),
|
|
1358
|
+
})) : (z(), U(L(p), {
|
|
1287
1359
|
key: 2,
|
|
1288
1360
|
class: "maz-text-xl"
|
|
1289
1361
|
}))
|
|
@@ -1292,19 +1364,33 @@ const Pt = { class: "m-toast__message-wrapper" }, Ht = { class: "m-toast__messag
|
|
|
1292
1364
|
}),
|
|
1293
1365
|
_: 1
|
|
1294
1366
|
/* STABLE */
|
|
1295
|
-
}, 8, ["color", "href", "target"])) :
|
|
1296
|
-
s.persistent ?
|
|
1297
|
-
key:
|
|
1367
|
+
}, 8, ["color", "href", "target"])) : H("v-if", !0),
|
|
1368
|
+
s.persistent ? H("v-if", !0) : (z(), Z("button", {
|
|
1369
|
+
key: 3,
|
|
1298
1370
|
class: "--close",
|
|
1299
|
-
onClick:
|
|
1371
|
+
onClick: n[1] || (n[1] = _((u) => S(u), ["stop"]))
|
|
1300
1372
|
}, [
|
|
1301
|
-
|
|
1302
|
-
]))
|
|
1373
|
+
P(L(i), { class: "--icon maz-text-xl" })
|
|
1374
|
+
])),
|
|
1375
|
+
E("div", Nt, [
|
|
1376
|
+
E(
|
|
1377
|
+
"div",
|
|
1378
|
+
{
|
|
1379
|
+
style: rt({
|
|
1380
|
+
width: J.value
|
|
1381
|
+
}),
|
|
1382
|
+
class: re(["maz-h-full maz-transition-all maz-duration-200 maz-ease-linear", de()])
|
|
1383
|
+
},
|
|
1384
|
+
null,
|
|
1385
|
+
6
|
|
1386
|
+
/* CLASS, STYLE */
|
|
1387
|
+
)
|
|
1388
|
+
])
|
|
1303
1389
|
],
|
|
1304
1390
|
34
|
|
1305
1391
|
/* CLASS, HYDRATE_EVENTS */
|
|
1306
1392
|
), [
|
|
1307
|
-
[
|
|
1393
|
+
[we, B.value]
|
|
1308
1394
|
])
|
|
1309
1395
|
]),
|
|
1310
1396
|
_: 1
|
|
@@ -1312,23 +1398,23 @@ const Pt = { class: "m-toast__message-wrapper" }, Ht = { class: "m-toast__messag
|
|
|
1312
1398
|
}, 8, ["name"]));
|
|
1313
1399
|
}
|
|
1314
1400
|
});
|
|
1315
|
-
const
|
|
1401
|
+
const Ut = /* @__PURE__ */ Ke(qt, [["__scopeId", "data-v-ee210f61"]]), Vt = {
|
|
1316
1402
|
position: "bottom-right",
|
|
1317
1403
|
timeout: 1e4,
|
|
1318
1404
|
persistent: !1
|
|
1319
1405
|
};
|
|
1320
|
-
class
|
|
1406
|
+
class jt {
|
|
1321
1407
|
constructor(e, t) {
|
|
1322
1408
|
this.app = e, this.globalOptions = t;
|
|
1323
1409
|
}
|
|
1324
1410
|
show(e, t) {
|
|
1325
1411
|
const i = { message: e, ...t }, o = {
|
|
1326
|
-
...
|
|
1412
|
+
...Vt,
|
|
1327
1413
|
...i,
|
|
1328
1414
|
...this.globalOptions,
|
|
1329
1415
|
...t
|
|
1330
1416
|
};
|
|
1331
|
-
|
|
1417
|
+
De(Ut, {
|
|
1332
1418
|
props: o,
|
|
1333
1419
|
app: this.app
|
|
1334
1420
|
});
|
|
@@ -1339,6 +1425,9 @@ class Bt {
|
|
|
1339
1425
|
...t
|
|
1340
1426
|
};
|
|
1341
1427
|
}
|
|
1428
|
+
message(e, t) {
|
|
1429
|
+
return this.show(e, this.getLocalOptions("theme", t));
|
|
1430
|
+
}
|
|
1342
1431
|
success(e, t) {
|
|
1343
1432
|
return this.show(e, this.getLocalOptions("success", t));
|
|
1344
1433
|
}
|
|
@@ -1352,37 +1441,37 @@ class Bt {
|
|
|
1352
1441
|
return this.show(e, this.getLocalOptions("warning", t));
|
|
1353
1442
|
}
|
|
1354
1443
|
}
|
|
1355
|
-
let
|
|
1356
|
-
const
|
|
1444
|
+
let xe;
|
|
1445
|
+
const fs = {
|
|
1357
1446
|
install(s, e) {
|
|
1358
|
-
|
|
1447
|
+
xe = new jt(s, e), s.provide("toast", xe);
|
|
1359
1448
|
}
|
|
1360
|
-
},
|
|
1361
|
-
class
|
|
1449
|
+
}, V = "", Rt = (s) => s.filter((e, t, i) => t === i.indexOf(e)), Wt = (s) => (e = V) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e), Kt = (s) => s.length > 0, Yt = (s) => (e = V) => Rt([...s, e]), Xt = (s) => (e = V) => s.filter((t) => t !== e);
|
|
1450
|
+
class Zt {
|
|
1362
1451
|
constructor() {
|
|
1363
|
-
|
|
1452
|
+
a(this, "_loaders", h([]));
|
|
1364
1453
|
}
|
|
1365
1454
|
get loaders() {
|
|
1366
|
-
return
|
|
1455
|
+
return g(() => this._loaders.value);
|
|
1367
1456
|
}
|
|
1368
|
-
stop(e =
|
|
1369
|
-
this._loaders.value =
|
|
1457
|
+
stop(e = V) {
|
|
1458
|
+
this._loaders.value = Xt(this._loaders.value)(e);
|
|
1370
1459
|
}
|
|
1371
|
-
start(e =
|
|
1372
|
-
return this._loaders.value =
|
|
1460
|
+
start(e = V) {
|
|
1461
|
+
return this._loaders.value = Yt(this._loaders.value)(e), () => this.stop(e);
|
|
1373
1462
|
}
|
|
1374
1463
|
get anyLoading() {
|
|
1375
|
-
return
|
|
1464
|
+
return g(() => Kt(this._loaders.value));
|
|
1376
1465
|
}
|
|
1377
|
-
isLoading(e =
|
|
1378
|
-
return
|
|
1466
|
+
isLoading(e = V) {
|
|
1467
|
+
return g(() => Wt(this._loaders.value)(e)).value;
|
|
1379
1468
|
}
|
|
1380
1469
|
}
|
|
1381
|
-
const
|
|
1470
|
+
const Gt = new Zt(), gs = {
|
|
1382
1471
|
install: (s) => {
|
|
1383
|
-
s.provide("wait",
|
|
1472
|
+
s.provide("wait", Gt);
|
|
1384
1473
|
}
|
|
1385
|
-
},
|
|
1474
|
+
}, ye = {
|
|
1386
1475
|
delay: 100,
|
|
1387
1476
|
observer: {
|
|
1388
1477
|
root: void 0,
|
|
@@ -1395,21 +1484,45 @@ const Kt = new Rt(), ds = {
|
|
|
1395
1484
|
delay: 0
|
|
1396
1485
|
}
|
|
1397
1486
|
};
|
|
1398
|
-
class
|
|
1487
|
+
class Qt {
|
|
1399
1488
|
constructor(e) {
|
|
1400
|
-
|
|
1489
|
+
a(this, "options");
|
|
1401
1490
|
this.options = {
|
|
1402
|
-
delay: (e == null ? void 0 : e.delay) ??
|
|
1491
|
+
delay: (e == null ? void 0 : e.delay) ?? ye.delay,
|
|
1403
1492
|
observer: {
|
|
1404
|
-
...
|
|
1493
|
+
...ye.observer,
|
|
1405
1494
|
...e == null ? void 0 : e.observer
|
|
1406
1495
|
},
|
|
1407
1496
|
animation: {
|
|
1408
|
-
...
|
|
1497
|
+
...ye.animation,
|
|
1409
1498
|
...e == null ? void 0 : e.animation
|
|
1410
1499
|
}
|
|
1411
1500
|
};
|
|
1412
1501
|
}
|
|
1502
|
+
handleIntersect(e, t) {
|
|
1503
|
+
for (const i of e) {
|
|
1504
|
+
const m = i.target.getAttribute("data-maz-aos-children") === "true", d = i.target.getAttribute("data-maz-aos") ? [i.target] : [];
|
|
1505
|
+
if (m) {
|
|
1506
|
+
const l = [...document.querySelectorAll("[data-maz-aos-anchor]")].map(
|
|
1507
|
+
(f) => f.getAttribute("data-maz-aos-anchor") === `#${i.target.id}` ? f : void 0
|
|
1508
|
+
);
|
|
1509
|
+
for (const f of l)
|
|
1510
|
+
f && d.push(f);
|
|
1511
|
+
}
|
|
1512
|
+
for (const l of d) {
|
|
1513
|
+
const f = l.getAttribute("data-maz-aos-once"), p = typeof f == "string" ? f === "true" : this.options.animation.once;
|
|
1514
|
+
if (typeof this.options.observer.threshold == "number" && i.intersectionRatio > this.options.observer.threshold) {
|
|
1515
|
+
const y = l.getAttribute("data-maz-aos-duration"), v = l.getAttribute("data-maz-aos-delay");
|
|
1516
|
+
y || (l.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
1517
|
+
l.style.transitionDuration = "0";
|
|
1518
|
+
}, 1e3)), v || (l.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
1519
|
+
l.style.transitionDelay = "0";
|
|
1520
|
+
}, 1e3)), l.classList.add("maz-aos-animate"), p && t.unobserve(l);
|
|
1521
|
+
} else
|
|
1522
|
+
l.classList.remove("maz-aos-animate");
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1413
1526
|
async handleObserver() {
|
|
1414
1527
|
await X(this.options.delay);
|
|
1415
1528
|
const e = new IntersectionObserver(this.handleIntersect.bind(this), {
|
|
@@ -1425,129 +1538,105 @@ class Wt {
|
|
|
1425
1538
|
}
|
|
1426
1539
|
}
|
|
1427
1540
|
runAnimations() {
|
|
1428
|
-
if (
|
|
1541
|
+
if ($())
|
|
1429
1542
|
return this.handleObserver();
|
|
1430
1543
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
1431
1544
|
}
|
|
1432
|
-
handleIntersect(e, t) {
|
|
1433
|
-
for (const i of e) {
|
|
1434
|
-
const l = i.target.getAttribute("data-maz-aos-children") === "true", d = i.target.getAttribute("data-maz-aos") ? [i.target] : [];
|
|
1435
|
-
if (l) {
|
|
1436
|
-
const n = [...document.querySelectorAll("[data-maz-aos-anchor]")].map(
|
|
1437
|
-
(p) => p.getAttribute("data-maz-aos-anchor") === `#${i.target.id}` ? p : void 0
|
|
1438
|
-
);
|
|
1439
|
-
for (const p of n)
|
|
1440
|
-
p && d.push(p);
|
|
1441
|
-
}
|
|
1442
|
-
for (const n of d) {
|
|
1443
|
-
const p = n.getAttribute("data-maz-aos-once"), E = typeof p == "string" ? p === "true" : this.options.animation.once;
|
|
1444
|
-
if (typeof this.options.observer.threshold == "number" && i.intersectionRatio > this.options.observer.threshold) {
|
|
1445
|
-
const b = n.getAttribute("data-maz-aos-duration"), C = n.getAttribute("data-maz-aos-delay");
|
|
1446
|
-
b || (n.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
1447
|
-
n.style.transitionDuration = "0";
|
|
1448
|
-
}, 1e3)), C || (n.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
1449
|
-
n.style.transitionDelay = "0";
|
|
1450
|
-
}, 1e3)), n.classList.add("maz-aos-animate"), E && t.unobserve(n);
|
|
1451
|
-
} else
|
|
1452
|
-
n.classList.remove("maz-aos-animate");
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
}
|
|
1456
1545
|
}
|
|
1457
|
-
let
|
|
1458
|
-
const
|
|
1546
|
+
let oe;
|
|
1547
|
+
const ps = {
|
|
1459
1548
|
install: (s, e) => {
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
}) :
|
|
1549
|
+
oe = new Qt(e), s.provide("aos", oe), $() && (e != null && e.router ? e.router.afterEach(async () => {
|
|
1550
|
+
oe.runAnimations();
|
|
1551
|
+
}) : oe.runAnimations());
|
|
1463
1552
|
}
|
|
1464
|
-
},
|
|
1553
|
+
}, Ce = {
|
|
1465
1554
|
darkClass: "dark",
|
|
1466
1555
|
lightClass: "light",
|
|
1467
1556
|
storageThemeKey: "theme",
|
|
1468
1557
|
storageThemeValueDark: "dark",
|
|
1469
1558
|
storageThemeValueLight: "light",
|
|
1470
1559
|
storageThemeValueSystem: "system"
|
|
1471
|
-
},
|
|
1472
|
-
function
|
|
1560
|
+
}, R = h("system"), x = h("system");
|
|
1561
|
+
function Ie({
|
|
1473
1562
|
darkClass: s,
|
|
1474
1563
|
lightClass: e,
|
|
1475
1564
|
storageThemeKey: t,
|
|
1476
1565
|
storageThemeValueDark: i,
|
|
1477
1566
|
setLocalStorageValue: o = !0,
|
|
1478
|
-
setSelectedTheme:
|
|
1567
|
+
setSelectedTheme: m = !0
|
|
1479
1568
|
}) {
|
|
1480
|
-
document.documentElement.classList.remove(e), document.documentElement.classList.add(s),
|
|
1569
|
+
document.documentElement.classList.remove(e), document.documentElement.classList.add(s), R.value = i, m && (x.value = i), o && (localStorage[t] = i);
|
|
1481
1570
|
}
|
|
1482
|
-
function
|
|
1571
|
+
function Te({
|
|
1483
1572
|
darkClass: s,
|
|
1484
1573
|
lightClass: e,
|
|
1485
1574
|
storageThemeKey: t,
|
|
1486
1575
|
storageThemeValueLight: i,
|
|
1487
1576
|
setLocalStorageValue: o = !0,
|
|
1488
|
-
setSelectedTheme:
|
|
1577
|
+
setSelectedTheme: m = !0
|
|
1489
1578
|
}) {
|
|
1490
|
-
document.documentElement.classList.remove(s), document.documentElement.classList.add(e),
|
|
1579
|
+
document.documentElement.classList.remove(s), document.documentElement.classList.add(e), R.value = i, m && (x.value = i), o && (localStorage[t] = i);
|
|
1491
1580
|
}
|
|
1492
|
-
function
|
|
1493
|
-
document.documentElement.classList.remove(s.darkClass), document.documentElement.classList.remove(s.lightClass),
|
|
1581
|
+
function Xe(s) {
|
|
1582
|
+
document.documentElement.classList.remove(s.darkClass), document.documentElement.classList.remove(s.lightClass), R.value = s.storageThemeValueSystem, x.value = s.storageThemeValueSystem, s.setLocalStorageValue && (localStorage[s.storageThemeKey] = s.storageThemeValueSystem), Ze({ ...s, setSelectedTheme: !1 });
|
|
1494
1583
|
}
|
|
1495
|
-
function
|
|
1584
|
+
function Se() {
|
|
1496
1585
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1497
1586
|
}
|
|
1498
|
-
function
|
|
1499
|
-
localStorage[s.storageThemeKey] === s.storageThemeValueDark || !(s.storageThemeKey in localStorage) &&
|
|
1587
|
+
function Ze(s) {
|
|
1588
|
+
localStorage[s.storageThemeKey] === s.storageThemeValueDark || !(s.storageThemeKey in localStorage) && Se() || localStorage[s.storageThemeKey] === s.storageThemeValueSystem && Se() ? Ie({
|
|
1500
1589
|
...s,
|
|
1501
1590
|
setLocalStorageValue: !1,
|
|
1502
1591
|
setSelectedTheme: !1
|
|
1503
|
-
}) :
|
|
1592
|
+
}) : Te({
|
|
1504
1593
|
...s,
|
|
1505
1594
|
setLocalStorageValue: !1,
|
|
1506
1595
|
setSelectedTheme: !1
|
|
1507
1596
|
});
|
|
1508
1597
|
}
|
|
1509
|
-
function
|
|
1598
|
+
function Oe({
|
|
1510
1599
|
shouldSetDarkMode: s,
|
|
1511
1600
|
...e
|
|
1512
1601
|
}) {
|
|
1513
|
-
return typeof s != "boolean" ?
|
|
1602
|
+
return typeof s != "boolean" ? Xe(e) : s ? Ie(e) : Te(e);
|
|
1514
1603
|
}
|
|
1515
|
-
function
|
|
1516
|
-
return
|
|
1604
|
+
function Jt(s) {
|
|
1605
|
+
return R.value === s.storageThemeValueDark ? Te(s) : Ie(s);
|
|
1517
1606
|
}
|
|
1518
|
-
function
|
|
1607
|
+
function ys(s = Ce) {
|
|
1519
1608
|
const e = {
|
|
1520
|
-
...
|
|
1609
|
+
...Ce,
|
|
1521
1610
|
...s
|
|
1522
|
-
}, t =
|
|
1523
|
-
return
|
|
1524
|
-
localStorage[e.storageThemeKey] && (
|
|
1611
|
+
}, t = g(() => x.value === e.storageThemeValueDark), i = g(() => x.value === e.storageThemeValueLight), o = g(() => x.value === e.storageThemeValueSystem);
|
|
1612
|
+
return Ee(() => {
|
|
1613
|
+
localStorage[e.storageThemeKey] && (R.value = localStorage[e.storageThemeKey], x.value = localStorage[e.storageThemeKey]);
|
|
1525
1614
|
}), {
|
|
1526
|
-
autoSetTheme: () =>
|
|
1527
|
-
toggleTheme: () =>
|
|
1528
|
-
setSystemTheme: () =>
|
|
1529
|
-
setDarkTheme: () =>
|
|
1530
|
-
setLightTheme: () =>
|
|
1615
|
+
autoSetTheme: () => Ze(e),
|
|
1616
|
+
toggleTheme: () => Jt(e),
|
|
1617
|
+
setSystemTheme: () => Xe({ ...e, setLocalStorageValue: !0 }),
|
|
1618
|
+
setDarkTheme: () => Oe({ ...e, shouldSetDarkMode: !0 }),
|
|
1619
|
+
setLightTheme: () => Oe({ ...e, shouldSetDarkMode: !1 }),
|
|
1531
1620
|
hasDarkTheme: t,
|
|
1532
1621
|
hasLightTheme: i,
|
|
1533
1622
|
hasSystemTheme: o,
|
|
1534
|
-
theme:
|
|
1623
|
+
theme: R,
|
|
1535
1624
|
selectedTheme: x
|
|
1536
1625
|
};
|
|
1537
1626
|
}
|
|
1538
|
-
const
|
|
1627
|
+
const bs = ({
|
|
1539
1628
|
componentName: s,
|
|
1540
1629
|
instance: e,
|
|
1541
1630
|
providedId: t
|
|
1542
|
-
}) =>
|
|
1631
|
+
}) => g(() => t ?? `${s}-${e == null ? void 0 : e.uid}`), ws = () => Le("aos"), zs = () => Le("wait"), Es = () => Le("toast"), Ls = ({
|
|
1543
1632
|
callback: s,
|
|
1544
1633
|
options: e
|
|
1545
|
-
}) => new
|
|
1634
|
+
}) => new lt(s, e), Is = ({
|
|
1546
1635
|
callback: s,
|
|
1547
1636
|
options: e
|
|
1548
|
-
}) => new
|
|
1549
|
-
|
|
1550
|
-
...
|
|
1637
|
+
}) => new ct(s, e), es = h(), j = h([]), ts = (s, e) => new Promise((t, i) => {
|
|
1638
|
+
j.value = [
|
|
1639
|
+
...j.value,
|
|
1551
1640
|
{
|
|
1552
1641
|
id: s,
|
|
1553
1642
|
isActive: !0,
|
|
@@ -1557,62 +1646,63 @@ const fs = ({
|
|
|
1557
1646
|
reject: i
|
|
1558
1647
|
}
|
|
1559
1648
|
];
|
|
1560
|
-
}),
|
|
1649
|
+
}), Ge = (s) => (j.value = j.value.filter(({ id: e }) => e !== s), j.value), Pe = (s, e, t = !1) => {
|
|
1561
1650
|
var i;
|
|
1562
1651
|
e && ((i = e[s]) == null || i.call(e, t), e.isActive = !1, setTimeout(() => {
|
|
1563
|
-
|
|
1652
|
+
Ge(e.id);
|
|
1564
1653
|
}, 500));
|
|
1565
|
-
},
|
|
1566
|
-
confirmDialogData:
|
|
1567
|
-
dialogState:
|
|
1568
|
-
showDialogAndWaitChoice:
|
|
1569
|
-
removeDialogFromState:
|
|
1570
|
-
rejectDialog: (s, e = !1) =>
|
|
1571
|
-
resolveDialog: (s, e = !1) =>
|
|
1654
|
+
}, Ts = () => ({
|
|
1655
|
+
confirmDialogData: es,
|
|
1656
|
+
dialogState: j,
|
|
1657
|
+
showDialogAndWaitChoice: ts,
|
|
1658
|
+
removeDialogFromState: Ge,
|
|
1659
|
+
rejectDialog: (s, e = !1) => Pe("reject", s, e),
|
|
1660
|
+
resolveDialog: (s, e = !1) => Pe("resolve", s, e)
|
|
1572
1661
|
});
|
|
1573
1662
|
export {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
Tt as
|
|
1663
|
+
Gt as A,
|
|
1664
|
+
Qt as B,
|
|
1665
|
+
ps as C,
|
|
1666
|
+
oe as D,
|
|
1667
|
+
ys as E,
|
|
1668
|
+
bs as F,
|
|
1669
|
+
ws as G,
|
|
1670
|
+
zs as H,
|
|
1671
|
+
lt as I,
|
|
1672
|
+
Es as J,
|
|
1673
|
+
Ls as K,
|
|
1674
|
+
Is as L,
|
|
1675
|
+
Ts as M,
|
|
1676
|
+
$t as N,
|
|
1677
|
+
rs as S,
|
|
1678
|
+
jt as T,
|
|
1679
|
+
ct as U,
|
|
1680
|
+
Zt as W,
|
|
1681
|
+
Ke as _,
|
|
1682
|
+
$ as a,
|
|
1683
|
+
hs as b,
|
|
1684
|
+
as as c,
|
|
1685
|
+
ns as d,
|
|
1686
|
+
qe as e,
|
|
1687
|
+
ms as f,
|
|
1688
|
+
Re as g,
|
|
1689
|
+
us as h,
|
|
1690
|
+
Le as i,
|
|
1691
|
+
Ye as j,
|
|
1692
|
+
ds as k,
|
|
1693
|
+
je as l,
|
|
1694
|
+
De as m,
|
|
1695
|
+
cs as n,
|
|
1696
|
+
vs as o,
|
|
1697
|
+
ls as p,
|
|
1698
|
+
Tt as q,
|
|
1699
|
+
Ct as r,
|
|
1610
1700
|
X as s,
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1701
|
+
at as t,
|
|
1702
|
+
Ot as u,
|
|
1703
|
+
gt as v,
|
|
1704
|
+
Ht as w,
|
|
1705
|
+
fs as x,
|
|
1706
|
+
xe as y,
|
|
1707
|
+
gs as z
|
|
1618
1708
|
};
|