@roku-ui/vue 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AspectRatio.vue.d.ts +17 -15
- package/dist/components/Avatar.vue.d.ts +11 -10
- package/dist/components/Btn.vue.d.ts +33 -31
- package/dist/components/BtnGroup.vue.d.ts +37 -0
- package/dist/components/ChatContainer.vue.d.ts +4 -2
- package/dist/components/ChatMessage.vue.d.ts +19 -17
- package/dist/components/ChatSystem.vue.d.ts +16 -14
- package/dist/components/Chip.vue.d.ts +14 -12
- package/dist/components/ColorInput.vue.d.ts +4 -4
- package/dist/components/ColorSwatch.vue.d.ts +6 -6
- package/dist/components/Drawer.vue.d.ts +10 -8
- package/dist/components/Dropzone.vue.d.ts +12 -10
- package/dist/components/FullscreenOverlay.vue.d.ts +10 -8
- package/dist/components/Image.vue.d.ts +19 -18
- package/dist/components/Indicator.vue.d.ts +18 -16
- package/dist/components/Modal.vue.d.ts +10 -8
- package/dist/components/Notification.vue.d.ts +27 -25
- package/dist/components/NotificationSystem.vue.d.ts +1 -1
- package/dist/components/Overlay.vue.d.ts +17 -15
- package/dist/components/Paper.vue.d.ts +24 -22
- package/dist/components/PinInput.vue.d.ts +10 -10
- package/dist/components/Progress.vue.d.ts +18 -18
- package/dist/components/RokuProvider.vue.d.ts +26 -23
- package/dist/components/SchemeSwitch.vue.d.ts +1 -1
- package/dist/components/Select.vue.d.ts +41 -64
- package/dist/components/Slider.vue.d.ts +6 -6
- package/dist/components/Switch.vue.d.ts +7 -7
- package/dist/components/TabItem.vue.d.ts +9 -7
- package/dist/components/Tabs.vue.d.ts +9 -7
- package/dist/components/TextField.vue.d.ts +10 -8
- package/dist/components/ThemeProvider.vue.d.ts +12 -9
- package/dist/components/Tooltip.vue.d.ts +31 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/index.d.ts +9 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1296 -1127
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/theme.d.ts +2 -1
- package/package.json +24 -24
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as T, openBlock as v, createElementBlock as w, normalizeStyle as I, renderSlot as C, computed as m, ref as g, onMounted as fe, Fragment as oe, createBlock as Y, resolveDynamicComponent as Ce, mergeProps as Te, unref as c, createCommentVNode as B, watch as J, getCurrentScope as Yt, onScopeDispose as qt, nextTick as We, getCurrentInstance as _t, readonly as Qe, shallowRef as et, shallowReactive as Ut, watchEffect as be, withCtx as U, mergeModels as K, useModel as ee, renderList as Se, normalizeClass as k, createTextVNode as He, toDisplayString as ne, createElementVNode as A, inject as xe, useAttrs as xt, withDirectives as je, vModelText as Gt, createVNode as ae, Teleport as Jt, Transition as tt, useSlots as kt, vModelDynamic as Kt, withModifiers as St, withKeys as Zt, reactive as Qt, provide as Oe, vModelCheckbox as er, isRef as tr } from "vue";
|
|
2
|
+
const Ca = /* @__PURE__ */ T({
|
|
3
3
|
__name: "AspectRatio",
|
|
4
4
|
props: {
|
|
5
5
|
ratio: { default: 1 },
|
|
@@ -10,7 +10,7 @@ const ga = /* @__PURE__ */ R({
|
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
12
|
return (t, r) => (v(), w("div", {
|
|
13
|
-
style:
|
|
13
|
+
style: I({
|
|
14
14
|
"--ar-ratio": t.ratio,
|
|
15
15
|
width: t.width,
|
|
16
16
|
"max-width": t.maxWidth,
|
|
@@ -19,10 +19,10 @@ const ga = /* @__PURE__ */ R({
|
|
|
19
19
|
}),
|
|
20
20
|
class: "relative children:absolute children:top-0 before:block before:h-0 children:h-full children:w-full before:pb-[calc((1/var(--ar-ratio,1))*100%)] before:content-['']"
|
|
21
21
|
}, [
|
|
22
|
-
|
|
22
|
+
C(t.$slots, "default")
|
|
23
23
|
], 4));
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
25
|
+
}), rr = /* @__PURE__ */ T({
|
|
26
26
|
__name: "Avatar",
|
|
27
27
|
props: {
|
|
28
28
|
is: { default: "img" },
|
|
@@ -43,15 +43,15 @@ const ga = /* @__PURE__ */ R({
|
|
|
43
43
|
default:
|
|
44
44
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `--size: ${t.size}rem;` : `--size: ${t.size};`;
|
|
45
45
|
}
|
|
46
|
-
}), n =
|
|
46
|
+
}), n = g(!1), o = g(null);
|
|
47
47
|
function a() {
|
|
48
48
|
n.value = !0;
|
|
49
49
|
}
|
|
50
|
-
return
|
|
50
|
+
return fe(() => {
|
|
51
51
|
var s;
|
|
52
52
|
(s = o.value) != null && s.complete && a();
|
|
53
|
-
}), (s, i) => (v(), w(
|
|
54
|
-
s.src ? (v(),
|
|
53
|
+
}), (s, i) => (v(), w(oe, null, [
|
|
54
|
+
s.src ? (v(), Y(Ce(s.is), Te({
|
|
55
55
|
key: 0,
|
|
56
56
|
ref_key: "img",
|
|
57
57
|
ref: o,
|
|
@@ -63,17 +63,17 @@ const ga = /* @__PURE__ */ R({
|
|
|
63
63
|
c(n) ? B("", !0) : (v(), w("div", {
|
|
64
64
|
key: 1,
|
|
65
65
|
class: "h-[var(--size)] w-[var(--size)] animate-pulse border-transparent rounded-full bg-surface-high object-cover",
|
|
66
|
-
style:
|
|
66
|
+
style: I([s.style, c(r)])
|
|
67
67
|
}, null, 4))
|
|
68
68
|
], 64));
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
|
-
function
|
|
71
|
+
function ie(e) {
|
|
72
72
|
return m(
|
|
73
|
-
() => ({ style:
|
|
73
|
+
() => ({ style: nr(e.rounded), class: "rounded-[var(--r-rounded)]" })
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function nr(e) {
|
|
77
77
|
const t = /^-?\d*\.?\d+(px|em|rem|vh|vw|in|cm|mm|pt|pc|%)?$/;
|
|
78
78
|
switch (e) {
|
|
79
79
|
case "none":
|
|
@@ -90,10 +90,10 @@ function Qt(e) {
|
|
|
90
90
|
return typeof e == "string" && t.test(e) ? `--r-rounded: ${e};` : typeof e == "number" || !Number.isNaN(Number(e)) ? `--r-rounded: ${e}rem;` : "rounded-[var(--r-rounded)]";
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return
|
|
93
|
+
function ye(e) {
|
|
94
|
+
return Yt() ? (qt(e), !0) : !1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ar() {
|
|
97
97
|
const e = /* @__PURE__ */ new Set(), t = (o) => {
|
|
98
98
|
e.delete(o);
|
|
99
99
|
};
|
|
@@ -101,7 +101,7 @@ function er() {
|
|
|
101
101
|
on: (o) => {
|
|
102
102
|
e.add(o);
|
|
103
103
|
const a = () => t(o);
|
|
104
|
-
return
|
|
104
|
+
return ye(a), {
|
|
105
105
|
off: a
|
|
106
106
|
};
|
|
107
107
|
},
|
|
@@ -109,14 +109,18 @@ function er() {
|
|
|
109
109
|
trigger: (...o) => Promise.all(Array.from(e).map((a) => a(...o)))
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function se(e) {
|
|
113
113
|
return typeof e == "function" ? e() : c(e);
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const le = typeof window < "u" && typeof document < "u";
|
|
116
116
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
117
|
-
const
|
|
118
|
-
},
|
|
119
|
-
function
|
|
117
|
+
const $t = (e) => e != null, or = Object.prototype.toString, Mt = (e) => or.call(e) === "[object Object]", ke = () => {
|
|
118
|
+
}, sr = (e, t) => Object.prototype.hasOwnProperty.call(e, t), lr = /* @__PURE__ */ ir();
|
|
119
|
+
function ir() {
|
|
120
|
+
var e, t;
|
|
121
|
+
return le && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
|
|
122
|
+
}
|
|
123
|
+
function At(e, t) {
|
|
120
124
|
function r(...n) {
|
|
121
125
|
return new Promise((o, a) => {
|
|
122
126
|
Promise.resolve(e(() => t.apply(this, n), { fn: t, thisArg: this, args: n })).then(o).catch(a);
|
|
@@ -124,9 +128,25 @@ function or(e, t) {
|
|
|
124
128
|
}
|
|
125
129
|
return r;
|
|
126
130
|
}
|
|
127
|
-
const
|
|
128
|
-
function
|
|
129
|
-
|
|
131
|
+
const Ct = (e) => e();
|
|
132
|
+
function ur(e, t = {}) {
|
|
133
|
+
let r, n, o = ke;
|
|
134
|
+
const a = (i) => {
|
|
135
|
+
clearTimeout(i), o(), o = ke;
|
|
136
|
+
};
|
|
137
|
+
return (i) => {
|
|
138
|
+
const l = se(e), u = se(t.maxWait);
|
|
139
|
+
return r && a(r), l <= 0 || u !== void 0 && u <= 0 ? (n && (a(n), n = null), Promise.resolve(i())) : new Promise((d, p) => {
|
|
140
|
+
o = t.rejectOnCancel ? p : d, u && !n && (n = setTimeout(() => {
|
|
141
|
+
r && a(r), n = null, d(i());
|
|
142
|
+
}, u)), r = setTimeout(() => {
|
|
143
|
+
n && a(n), n = null, d(i());
|
|
144
|
+
}, l);
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function cr(e = Ct) {
|
|
149
|
+
const t = g(!0);
|
|
130
150
|
function r() {
|
|
131
151
|
t.value = !1;
|
|
132
152
|
}
|
|
@@ -136,34 +156,46 @@ function sr(e = wt) {
|
|
|
136
156
|
const o = (...a) => {
|
|
137
157
|
t.value && e(...a);
|
|
138
158
|
};
|
|
139
|
-
return { isActive:
|
|
159
|
+
return { isActive: Qe(t), pause: r, resume: n, eventFilter: o };
|
|
140
160
|
}
|
|
141
|
-
function
|
|
161
|
+
function dr(e, t, r = !1) {
|
|
142
162
|
return Object.fromEntries(Object.entries(e).filter(([n, o]) => (!r || o !== void 0) && !t.includes(n)));
|
|
143
163
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
164
|
+
function fr(e) {
|
|
165
|
+
return _t();
|
|
166
|
+
}
|
|
167
|
+
function pr(e, t = 200, r = {}) {
|
|
168
|
+
return At(
|
|
169
|
+
ur(t, r),
|
|
170
|
+
e
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
function hr(e, t = 200, r = {}) {
|
|
174
|
+
const n = g(e.value), o = pr(() => {
|
|
175
|
+
n.value = e.value;
|
|
176
|
+
}, t, r);
|
|
177
|
+
return J(e, () => o()), n;
|
|
146
178
|
}
|
|
147
|
-
function
|
|
179
|
+
function mr(e, t, r = {}) {
|
|
148
180
|
const {
|
|
149
|
-
eventFilter: n =
|
|
181
|
+
eventFilter: n = Ct,
|
|
150
182
|
...o
|
|
151
183
|
} = r;
|
|
152
|
-
return
|
|
184
|
+
return J(
|
|
153
185
|
e,
|
|
154
|
-
|
|
186
|
+
At(
|
|
155
187
|
n,
|
|
156
188
|
t
|
|
157
189
|
),
|
|
158
190
|
o
|
|
159
191
|
);
|
|
160
192
|
}
|
|
161
|
-
function
|
|
193
|
+
function vr(e, t, r = {}) {
|
|
162
194
|
const {
|
|
163
195
|
eventFilter: n,
|
|
164
196
|
...o
|
|
165
|
-
} = r, { eventFilter: a, pause: s, resume: i, isActive: l } =
|
|
166
|
-
return { stop:
|
|
197
|
+
} = r, { eventFilter: a, pause: s, resume: i, isActive: l } = cr(n);
|
|
198
|
+
return { stop: mr(
|
|
167
199
|
e,
|
|
168
200
|
t,
|
|
169
201
|
{
|
|
@@ -172,107 +204,170 @@ function cr(e, t, r = {}) {
|
|
|
172
204
|
}
|
|
173
205
|
), pause: s, resume: i, isActive: l };
|
|
174
206
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
207
|
+
function rt(e, t = !0, r) {
|
|
208
|
+
fr() ? fe(e, r) : t ? e() : We(e);
|
|
177
209
|
}
|
|
178
|
-
function
|
|
210
|
+
function j(e) {
|
|
179
211
|
var t;
|
|
180
|
-
const r =
|
|
212
|
+
const r = se(e);
|
|
181
213
|
return (t = r == null ? void 0 : r.$el) != null ? t : r;
|
|
182
214
|
}
|
|
183
|
-
const
|
|
184
|
-
function
|
|
215
|
+
const G = le ? window : void 0, br = le ? window.document : void 0;
|
|
216
|
+
function H(...e) {
|
|
185
217
|
let t, r, n, o;
|
|
186
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t =
|
|
187
|
-
return
|
|
218
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, o] = e, t = G) : [t, r, n, o] = e, !t)
|
|
219
|
+
return ke;
|
|
188
220
|
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
189
221
|
const a = [], s = () => {
|
|
190
222
|
a.forEach((d) => d()), a.length = 0;
|
|
191
|
-
}, i = (d,
|
|
192
|
-
() => [
|
|
193
|
-
([d,
|
|
223
|
+
}, i = (d, p, f, h) => (d.addEventListener(p, f, h), () => d.removeEventListener(p, f, h)), l = J(
|
|
224
|
+
() => [j(t), se(o)],
|
|
225
|
+
([d, p]) => {
|
|
194
226
|
if (s(), !d)
|
|
195
227
|
return;
|
|
196
|
-
const
|
|
228
|
+
const f = Mt(p) ? { ...p } : p;
|
|
197
229
|
a.push(
|
|
198
|
-
...r.flatMap((h) => n.map((
|
|
230
|
+
...r.flatMap((h) => n.map((b) => i(d, h, b, f)))
|
|
199
231
|
);
|
|
200
232
|
},
|
|
201
233
|
{ immediate: !0, flush: "post" }
|
|
202
234
|
), u = () => {
|
|
203
235
|
l(), s();
|
|
204
236
|
};
|
|
205
|
-
return
|
|
237
|
+
return ye(u), u;
|
|
238
|
+
}
|
|
239
|
+
let ct = !1;
|
|
240
|
+
function gr(e, t, r = {}) {
|
|
241
|
+
const { window: n = G, ignore: o = [], capture: a = !0, detectIframe: s = !1 } = r;
|
|
242
|
+
if (!n)
|
|
243
|
+
return ke;
|
|
244
|
+
lr && !ct && (ct = !0, Array.from(n.document.body.children).forEach((f) => f.addEventListener("click", ke)), n.document.documentElement.addEventListener("click", ke));
|
|
245
|
+
let i = !0;
|
|
246
|
+
const l = (f) => o.some((h) => {
|
|
247
|
+
if (typeof h == "string")
|
|
248
|
+
return Array.from(n.document.querySelectorAll(h)).some((b) => b === f.target || f.composedPath().includes(b));
|
|
249
|
+
{
|
|
250
|
+
const b = j(h);
|
|
251
|
+
return b && (f.target === b || f.composedPath().includes(b));
|
|
252
|
+
}
|
|
253
|
+
}), d = [
|
|
254
|
+
H(n, "click", (f) => {
|
|
255
|
+
const h = j(e);
|
|
256
|
+
if (!(!h || h === f.target || f.composedPath().includes(h))) {
|
|
257
|
+
if (f.detail === 0 && (i = !l(f)), !i) {
|
|
258
|
+
i = !0;
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
t(f);
|
|
262
|
+
}
|
|
263
|
+
}, { passive: !0, capture: a }),
|
|
264
|
+
H(n, "pointerdown", (f) => {
|
|
265
|
+
const h = j(e);
|
|
266
|
+
i = !l(f) && !!(h && !f.composedPath().includes(h));
|
|
267
|
+
}, { passive: !0 }),
|
|
268
|
+
s && H(n, "blur", (f) => {
|
|
269
|
+
setTimeout(() => {
|
|
270
|
+
var h;
|
|
271
|
+
const b = j(e);
|
|
272
|
+
((h = n.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(b != null && b.contains(n.document.activeElement)) && t(f);
|
|
273
|
+
}, 0);
|
|
274
|
+
})
|
|
275
|
+
].filter(Boolean);
|
|
276
|
+
return () => d.forEach((f) => f());
|
|
206
277
|
}
|
|
207
|
-
function
|
|
278
|
+
function yr(e) {
|
|
208
279
|
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
209
280
|
}
|
|
210
|
-
function
|
|
281
|
+
function ve(...e) {
|
|
211
282
|
let t, r, n = {};
|
|
212
283
|
e.length === 3 ? (t = e[0], r = e[1], n = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, r = e[0], n = e[1]) : (t = e[0], r = e[1]) : (t = !0, r = e[0]);
|
|
213
284
|
const {
|
|
214
|
-
target: o =
|
|
285
|
+
target: o = G,
|
|
215
286
|
eventName: a = "keydown",
|
|
216
287
|
passive: s = !1,
|
|
217
288
|
dedupe: i = !1
|
|
218
|
-
} = n, l =
|
|
219
|
-
return
|
|
220
|
-
d.repeat &&
|
|
289
|
+
} = n, l = yr(t);
|
|
290
|
+
return H(o, a, (d) => {
|
|
291
|
+
d.repeat && se(i) || l(d) && r(d);
|
|
221
292
|
}, s);
|
|
222
293
|
}
|
|
223
|
-
function
|
|
224
|
-
const e =
|
|
225
|
-
return
|
|
294
|
+
function wr() {
|
|
295
|
+
const e = g(!1), t = _t();
|
|
296
|
+
return t && fe(() => {
|
|
226
297
|
e.value = !0;
|
|
227
|
-
}), e;
|
|
298
|
+
}, t), e;
|
|
228
299
|
}
|
|
229
|
-
function
|
|
230
|
-
const t =
|
|
300
|
+
function Xe(e) {
|
|
301
|
+
const t = wr();
|
|
231
302
|
return m(() => (t.value, !!e()));
|
|
232
303
|
}
|
|
233
|
-
function
|
|
304
|
+
function _r(e, t, r = {}) {
|
|
305
|
+
const { window: n = G, ...o } = r;
|
|
306
|
+
let a;
|
|
307
|
+
const s = Xe(() => n && "MutationObserver" in n), i = () => {
|
|
308
|
+
a && (a.disconnect(), a = void 0);
|
|
309
|
+
}, l = m(() => {
|
|
310
|
+
const f = se(e), h = (Array.isArray(f) ? f : [f]).map(j).filter($t);
|
|
311
|
+
return new Set(h);
|
|
312
|
+
}), u = J(
|
|
313
|
+
() => l.value,
|
|
314
|
+
(f) => {
|
|
315
|
+
i(), s.value && f.size && (a = new MutationObserver(t), f.forEach((h) => a.observe(h, o)));
|
|
316
|
+
},
|
|
317
|
+
{ immediate: !0, flush: "post" }
|
|
318
|
+
), d = () => a == null ? void 0 : a.takeRecords(), p = () => {
|
|
319
|
+
i(), u();
|
|
320
|
+
};
|
|
321
|
+
return ye(p), {
|
|
322
|
+
isSupported: s,
|
|
323
|
+
stop: p,
|
|
324
|
+
takeRecords: d
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function xr(e, t = {}) {
|
|
234
328
|
const {
|
|
235
329
|
immediate: r = !0,
|
|
236
330
|
fpsLimit: n = void 0,
|
|
237
|
-
window: o =
|
|
238
|
-
} = t, a =
|
|
331
|
+
window: o = G
|
|
332
|
+
} = t, a = g(!1), s = n ? 1e3 / n : null;
|
|
239
333
|
let i = 0, l = null;
|
|
240
|
-
function u(
|
|
334
|
+
function u(f) {
|
|
241
335
|
if (!a.value || !o)
|
|
242
336
|
return;
|
|
243
|
-
|
|
337
|
+
i || (i = f);
|
|
338
|
+
const h = f - i;
|
|
244
339
|
if (s && h < s) {
|
|
245
340
|
l = o.requestAnimationFrame(u);
|
|
246
341
|
return;
|
|
247
342
|
}
|
|
248
|
-
e({ delta: h, timestamp:
|
|
343
|
+
i = f, e({ delta: h, timestamp: f }), l = o.requestAnimationFrame(u);
|
|
249
344
|
}
|
|
250
345
|
function d() {
|
|
251
|
-
!a.value && o && (a.value = !0, l = o.requestAnimationFrame(u));
|
|
346
|
+
!a.value && o && (a.value = !0, i = 0, l = o.requestAnimationFrame(u));
|
|
252
347
|
}
|
|
253
|
-
function
|
|
348
|
+
function p() {
|
|
254
349
|
a.value = !1, l != null && o && (o.cancelAnimationFrame(l), l = null);
|
|
255
350
|
}
|
|
256
|
-
return r && d(),
|
|
257
|
-
isActive:
|
|
258
|
-
pause:
|
|
351
|
+
return r && d(), ye(p), {
|
|
352
|
+
isActive: Qe(a),
|
|
353
|
+
pause: p,
|
|
259
354
|
resume: d
|
|
260
355
|
};
|
|
261
356
|
}
|
|
262
|
-
function
|
|
357
|
+
function kr(e, t, r) {
|
|
263
358
|
let n, o;
|
|
264
|
-
|
|
359
|
+
Mt(r) ? (n = r, o = dr(r, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"])) : (n = { duration: r }, o = r);
|
|
265
360
|
const {
|
|
266
|
-
window: a =
|
|
361
|
+
window: a = G,
|
|
267
362
|
immediate: s = !0,
|
|
268
363
|
commitStyles: i,
|
|
269
364
|
persist: l,
|
|
270
365
|
playbackRate: u = 1,
|
|
271
366
|
onReady: d,
|
|
272
|
-
onError:
|
|
273
|
-
console.error(
|
|
367
|
+
onError: p = (M) => {
|
|
368
|
+
console.error(M);
|
|
274
369
|
}
|
|
275
|
-
} = n,
|
|
370
|
+
} = n, f = Xe(() => a && HTMLElement && "animate" in HTMLElement.prototype), h = et(void 0), b = Ut({
|
|
276
371
|
startTime: null,
|
|
277
372
|
currentTime: null,
|
|
278
373
|
timeline: null,
|
|
@@ -280,142 +375,145 @@ function mr(e, t, r) {
|
|
|
280
375
|
pending: !1,
|
|
281
376
|
playState: s ? "idle" : "paused",
|
|
282
377
|
replaceState: "active"
|
|
283
|
-
}),
|
|
378
|
+
}), x = m(() => b.pending), E = m(() => b.playState), V = m(() => b.replaceState), D = m({
|
|
284
379
|
get() {
|
|
285
|
-
return
|
|
380
|
+
return b.startTime;
|
|
286
381
|
},
|
|
287
|
-
set(
|
|
288
|
-
|
|
382
|
+
set(M) {
|
|
383
|
+
b.startTime = M, h.value && (h.value.startTime = M);
|
|
289
384
|
}
|
|
290
|
-
}),
|
|
385
|
+
}), W = m({
|
|
291
386
|
get() {
|
|
292
|
-
return
|
|
387
|
+
return b.currentTime;
|
|
293
388
|
},
|
|
294
|
-
set(
|
|
295
|
-
|
|
389
|
+
set(M) {
|
|
390
|
+
b.currentTime = M, h.value && (h.value.currentTime = M, pe());
|
|
296
391
|
}
|
|
297
392
|
}), z = m({
|
|
298
393
|
get() {
|
|
299
|
-
return
|
|
394
|
+
return b.timeline;
|
|
300
395
|
},
|
|
301
|
-
set(
|
|
302
|
-
|
|
396
|
+
set(M) {
|
|
397
|
+
b.timeline = M, h.value && (h.value.timeline = M);
|
|
303
398
|
}
|
|
304
399
|
}), $ = m({
|
|
305
400
|
get() {
|
|
306
|
-
return
|
|
401
|
+
return b.playbackRate;
|
|
307
402
|
},
|
|
308
|
-
set(
|
|
309
|
-
|
|
403
|
+
set(M) {
|
|
404
|
+
b.playbackRate = M, h.value && (h.value.playbackRate = M);
|
|
310
405
|
}
|
|
311
|
-
}),
|
|
406
|
+
}), R = () => {
|
|
312
407
|
if (h.value)
|
|
313
408
|
try {
|
|
314
|
-
h.value.play(),
|
|
315
|
-
} catch (
|
|
316
|
-
|
|
409
|
+
h.value.play(), pe();
|
|
410
|
+
} catch (M) {
|
|
411
|
+
he(), p(M);
|
|
317
412
|
}
|
|
318
413
|
else
|
|
319
|
-
|
|
414
|
+
y();
|
|
320
415
|
}, F = () => {
|
|
321
|
-
var
|
|
416
|
+
var M;
|
|
322
417
|
try {
|
|
323
|
-
(
|
|
324
|
-
} catch (
|
|
325
|
-
|
|
418
|
+
(M = h.value) == null || M.pause(), he();
|
|
419
|
+
} catch (te) {
|
|
420
|
+
p(te);
|
|
326
421
|
}
|
|
327
|
-
},
|
|
328
|
-
var
|
|
329
|
-
!h.value &&
|
|
422
|
+
}, P = () => {
|
|
423
|
+
var M;
|
|
424
|
+
!h.value && y();
|
|
330
425
|
try {
|
|
331
|
-
(
|
|
332
|
-
} catch (
|
|
333
|
-
|
|
426
|
+
(M = h.value) == null || M.reverse(), pe();
|
|
427
|
+
} catch (te) {
|
|
428
|
+
he(), p(te);
|
|
334
429
|
}
|
|
335
|
-
},
|
|
336
|
-
var
|
|
430
|
+
}, L = () => {
|
|
431
|
+
var M;
|
|
337
432
|
try {
|
|
338
|
-
(
|
|
339
|
-
} catch (
|
|
340
|
-
|
|
433
|
+
(M = h.value) == null || M.finish(), he();
|
|
434
|
+
} catch (te) {
|
|
435
|
+
p(te);
|
|
341
436
|
}
|
|
342
|
-
},
|
|
343
|
-
var
|
|
437
|
+
}, S = () => {
|
|
438
|
+
var M;
|
|
344
439
|
try {
|
|
345
|
-
(
|
|
346
|
-
} catch (
|
|
347
|
-
|
|
440
|
+
(M = h.value) == null || M.cancel(), he();
|
|
441
|
+
} catch (te) {
|
|
442
|
+
p(te);
|
|
348
443
|
}
|
|
349
444
|
};
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}),
|
|
353
|
-
!h.value &&
|
|
354
|
-
|
|
355
|
-
|
|
445
|
+
J(() => j(e), (M) => {
|
|
446
|
+
M && y();
|
|
447
|
+
}), J(() => t, (M) => {
|
|
448
|
+
!h.value && y(), !j(e) && h.value && (h.value.effect = new KeyframeEffect(
|
|
449
|
+
j(e),
|
|
450
|
+
se(M),
|
|
356
451
|
o
|
|
357
452
|
));
|
|
358
|
-
}, { deep: !0 }),
|
|
359
|
-
|
|
360
|
-
}),
|
|
361
|
-
function
|
|
362
|
-
const
|
|
363
|
-
!
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
453
|
+
}, { deep: !0 }), rt(() => {
|
|
454
|
+
We(() => y(!0));
|
|
455
|
+
}), ye(S);
|
|
456
|
+
function y(M) {
|
|
457
|
+
const te = j(e);
|
|
458
|
+
!f.value || !te || (h.value || (h.value = te.animate(se(t), o)), l && h.value.persist(), u !== 1 && (h.value.playbackRate = u), M && !s ? h.value.pause() : pe(), d == null || d(h.value));
|
|
459
|
+
}
|
|
460
|
+
H(h, ["cancel", "finish", "remove"], he), H(h, "finish", () => {
|
|
461
|
+
var M;
|
|
462
|
+
i && ((M = h.value) == null || M.commitStyles());
|
|
463
|
+
});
|
|
464
|
+
const { resume: O, pause: ue } = xr(() => {
|
|
465
|
+
h.value && (b.pending = h.value.pending, b.playState = h.value.playState, b.replaceState = h.value.replaceState, b.startTime = h.value.startTime, b.currentTime = h.value.currentTime, b.timeline = h.value.timeline, b.playbackRate = h.value.playbackRate);
|
|
368
466
|
}, { immediate: !1 });
|
|
369
|
-
function
|
|
370
|
-
|
|
467
|
+
function pe() {
|
|
468
|
+
f.value && O();
|
|
371
469
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
470
|
+
function he() {
|
|
471
|
+
f.value && a && a.requestAnimationFrame(ue);
|
|
374
472
|
}
|
|
375
473
|
return {
|
|
376
|
-
isSupported:
|
|
474
|
+
isSupported: f,
|
|
377
475
|
animate: h,
|
|
378
476
|
// actions
|
|
379
|
-
play:
|
|
477
|
+
play: R,
|
|
380
478
|
pause: F,
|
|
381
|
-
reverse:
|
|
382
|
-
finish:
|
|
383
|
-
cancel:
|
|
479
|
+
reverse: P,
|
|
480
|
+
finish: L,
|
|
481
|
+
cancel: S,
|
|
384
482
|
// state
|
|
385
|
-
pending:
|
|
386
|
-
playState:
|
|
387
|
-
replaceState:
|
|
388
|
-
startTime:
|
|
389
|
-
currentTime:
|
|
483
|
+
pending: x,
|
|
484
|
+
playState: E,
|
|
485
|
+
replaceState: V,
|
|
486
|
+
startTime: D,
|
|
487
|
+
currentTime: W,
|
|
390
488
|
timeline: z,
|
|
391
489
|
playbackRate: $
|
|
392
490
|
};
|
|
393
491
|
}
|
|
394
|
-
function
|
|
395
|
-
const { window: r =
|
|
492
|
+
function dt(e, t = {}) {
|
|
493
|
+
const { window: r = G } = t, n = Xe(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
396
494
|
let o;
|
|
397
|
-
const a =
|
|
495
|
+
const a = g(!1), s = (u) => {
|
|
398
496
|
a.value = u.matches;
|
|
399
497
|
}, i = () => {
|
|
400
498
|
o && ("removeEventListener" in o ? o.removeEventListener("change", s) : o.removeListener(s));
|
|
401
|
-
}, l =
|
|
402
|
-
n.value && (i(), o = r.matchMedia(
|
|
499
|
+
}, l = be(() => {
|
|
500
|
+
n.value && (i(), o = r.matchMedia(se(e)), "addEventListener" in o ? o.addEventListener("change", s) : o.addListener(s), a.value = o.matches);
|
|
403
501
|
});
|
|
404
|
-
return
|
|
502
|
+
return ye(() => {
|
|
405
503
|
l(), i(), o = void 0;
|
|
406
504
|
}), a;
|
|
407
505
|
}
|
|
408
|
-
const
|
|
409
|
-
function
|
|
410
|
-
return
|
|
506
|
+
const Pe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ie = "__vueuse_ssr_handlers__", Sr = /* @__PURE__ */ $r();
|
|
507
|
+
function $r() {
|
|
508
|
+
return Ie in Pe || (Pe[Ie] = Pe[Ie] || {}), Pe[Ie];
|
|
411
509
|
}
|
|
412
|
-
function
|
|
413
|
-
return
|
|
510
|
+
function Mr(e, t) {
|
|
511
|
+
return Sr[e] || t;
|
|
414
512
|
}
|
|
415
|
-
function
|
|
513
|
+
function Ar(e) {
|
|
416
514
|
return e == null ? "any" : e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof Date ? "date" : typeof e == "boolean" ? "boolean" : typeof e == "string" ? "string" : typeof e == "object" ? "object" : Number.isNaN(e) ? "any" : "number";
|
|
417
515
|
}
|
|
418
|
-
const
|
|
516
|
+
const Cr = {
|
|
419
517
|
boolean: {
|
|
420
518
|
read: (e) => e === "true",
|
|
421
519
|
write: (e) => String(e)
|
|
@@ -448,8 +546,8 @@ const wr = {
|
|
|
448
546
|
read: (e) => new Date(e),
|
|
449
547
|
write: (e) => e.toISOString()
|
|
450
548
|
}
|
|
451
|
-
},
|
|
452
|
-
function
|
|
549
|
+
}, ft = "vueuse-storage";
|
|
550
|
+
function Tr(e, t, r, n = {}) {
|
|
453
551
|
var o;
|
|
454
552
|
const {
|
|
455
553
|
flush: a = "pre",
|
|
@@ -458,128 +556,112 @@ function _r(e, t, r, n = {}) {
|
|
|
458
556
|
writeDefaults: l = !0,
|
|
459
557
|
mergeDefaults: u = !1,
|
|
460
558
|
shallow: d,
|
|
461
|
-
window:
|
|
462
|
-
eventFilter:
|
|
463
|
-
onError: h = (
|
|
464
|
-
console.error(
|
|
559
|
+
window: p = G,
|
|
560
|
+
eventFilter: f,
|
|
561
|
+
onError: h = (S) => {
|
|
562
|
+
console.error(S);
|
|
465
563
|
},
|
|
466
|
-
initOnMounted:
|
|
467
|
-
} = n,
|
|
564
|
+
initOnMounted: b
|
|
565
|
+
} = n, x = (d ? et : g)(t);
|
|
468
566
|
if (!r)
|
|
469
567
|
try {
|
|
470
|
-
r =
|
|
471
|
-
var
|
|
472
|
-
return (
|
|
568
|
+
r = Mr("getDefaultStorage", () => {
|
|
569
|
+
var S;
|
|
570
|
+
return (S = G) == null ? void 0 : S.localStorage;
|
|
473
571
|
})();
|
|
474
|
-
} catch (
|
|
475
|
-
h(
|
|
572
|
+
} catch (S) {
|
|
573
|
+
h(S);
|
|
476
574
|
}
|
|
477
575
|
if (!r)
|
|
478
|
-
return
|
|
479
|
-
const
|
|
480
|
-
|
|
481
|
-
() =>
|
|
482
|
-
{ flush: a, deep: s, eventFilter:
|
|
576
|
+
return x;
|
|
577
|
+
const E = se(t), V = Ar(E), D = (o = n.serializer) != null ? o : Cr[V], { pause: W, resume: z } = vr(
|
|
578
|
+
x,
|
|
579
|
+
() => R(x.value),
|
|
580
|
+
{ flush: a, deep: s, eventFilter: f }
|
|
483
581
|
);
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}),
|
|
487
|
-
function $(
|
|
582
|
+
p && i && rt(() => {
|
|
583
|
+
H(p, "storage", P), H(p, ft, L), b && P();
|
|
584
|
+
}), b || P();
|
|
585
|
+
function $(S, y) {
|
|
586
|
+
p && p.dispatchEvent(new CustomEvent(ft, {
|
|
587
|
+
detail: {
|
|
588
|
+
key: e,
|
|
589
|
+
oldValue: S,
|
|
590
|
+
newValue: y,
|
|
591
|
+
storageArea: r
|
|
592
|
+
}
|
|
593
|
+
}));
|
|
594
|
+
}
|
|
595
|
+
function R(S) {
|
|
488
596
|
try {
|
|
489
|
-
|
|
490
|
-
|
|
597
|
+
const y = r.getItem(e);
|
|
598
|
+
if (S == null)
|
|
599
|
+
$(y, null), r.removeItem(e);
|
|
491
600
|
else {
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
detail: {
|
|
495
|
-
key: e,
|
|
496
|
-
oldValue: D,
|
|
497
|
-
newValue: T,
|
|
498
|
-
storageArea: r
|
|
499
|
-
}
|
|
500
|
-
})));
|
|
601
|
+
const O = D.write(S);
|
|
602
|
+
y !== O && (r.setItem(e, O), $(y, O));
|
|
501
603
|
}
|
|
502
|
-
} catch (
|
|
503
|
-
h(
|
|
604
|
+
} catch (y) {
|
|
605
|
+
h(y);
|
|
504
606
|
}
|
|
505
607
|
}
|
|
506
|
-
function
|
|
507
|
-
const
|
|
508
|
-
if (
|
|
509
|
-
return l &&
|
|
510
|
-
if (!
|
|
511
|
-
const
|
|
512
|
-
return typeof u == "function" ? u(
|
|
513
|
-
} else
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
function _(x) {
|
|
520
|
-
if (!(x && x.storageArea !== r)) {
|
|
521
|
-
if (x && x.key == null) {
|
|
522
|
-
S.value = A;
|
|
608
|
+
function F(S) {
|
|
609
|
+
const y = S ? S.newValue : r.getItem(e);
|
|
610
|
+
if (y == null)
|
|
611
|
+
return l && E != null && r.setItem(e, D.write(E)), E;
|
|
612
|
+
if (!S && u) {
|
|
613
|
+
const O = D.read(y);
|
|
614
|
+
return typeof u == "function" ? u(O, E) : V === "object" && !Array.isArray(O) ? { ...E, ...O } : O;
|
|
615
|
+
} else return typeof y != "string" ? y : D.read(y);
|
|
616
|
+
}
|
|
617
|
+
function P(S) {
|
|
618
|
+
if (!(S && S.storageArea !== r)) {
|
|
619
|
+
if (S && S.key == null) {
|
|
620
|
+
x.value = E;
|
|
523
621
|
return;
|
|
524
622
|
}
|
|
525
|
-
if (!(
|
|
526
|
-
|
|
623
|
+
if (!(S && S.key !== e)) {
|
|
624
|
+
W();
|
|
527
625
|
try {
|
|
528
|
-
(
|
|
529
|
-
} catch (
|
|
530
|
-
h(
|
|
626
|
+
(S == null ? void 0 : S.newValue) !== D.write(x.value) && (x.value = F(S));
|
|
627
|
+
} catch (y) {
|
|
628
|
+
h(y);
|
|
531
629
|
} finally {
|
|
532
|
-
|
|
630
|
+
S ? We(z) : z();
|
|
533
631
|
}
|
|
534
632
|
}
|
|
535
633
|
}
|
|
536
634
|
}
|
|
635
|
+
function L(S) {
|
|
636
|
+
P(S.detail);
|
|
637
|
+
}
|
|
638
|
+
return x;
|
|
537
639
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
let a;
|
|
541
|
-
const s = Le(() => n && "MutationObserver" in n), i = () => {
|
|
542
|
-
a && (a.disconnect(), a = void 0);
|
|
543
|
-
}, l = K(
|
|
544
|
-
() => q(e),
|
|
545
|
-
(f) => {
|
|
546
|
-
i(), s.value && n && f && (a = new MutationObserver(t), a.observe(f, o));
|
|
547
|
-
},
|
|
548
|
-
{ immediate: !0 }
|
|
549
|
-
), u = () => a == null ? void 0 : a.takeRecords(), d = () => {
|
|
550
|
-
i(), l();
|
|
551
|
-
};
|
|
552
|
-
return ve(d), {
|
|
553
|
-
isSupported: s,
|
|
554
|
-
stop: d,
|
|
555
|
-
takeRecords: u
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
function kr(e, t = {}) {
|
|
559
|
-
const r = b(!1), n = Je(null);
|
|
640
|
+
function Er(e, t = {}) {
|
|
641
|
+
const r = g(!1), n = et(null);
|
|
560
642
|
let o = 0, a = !0;
|
|
561
|
-
if (
|
|
643
|
+
if (le) {
|
|
562
644
|
const s = typeof t == "function" ? { onDrop: t } : t, i = (l) => {
|
|
563
645
|
var u, d;
|
|
564
|
-
const
|
|
565
|
-
return n.value =
|
|
646
|
+
const p = Array.from((d = (u = l.dataTransfer) == null ? void 0 : u.files) != null ? d : []);
|
|
647
|
+
return n.value = p.length === 0 ? null : p;
|
|
566
648
|
};
|
|
567
|
-
|
|
649
|
+
H(e, "dragenter", (l) => {
|
|
568
650
|
var u, d;
|
|
569
|
-
const
|
|
651
|
+
const p = Array.from(((u = l == null ? void 0 : l.dataTransfer) == null ? void 0 : u.items) || []).map((f) => f.kind === "file" ? f.type : null).filter($t);
|
|
570
652
|
if (s.dataTypes && l.dataTransfer) {
|
|
571
|
-
const
|
|
572
|
-
if (a = typeof
|
|
653
|
+
const f = c(s.dataTypes);
|
|
654
|
+
if (a = typeof f == "function" ? f(p) : f ? f.some((h) => p.includes(h)) : !0, !a)
|
|
573
655
|
return;
|
|
574
656
|
}
|
|
575
657
|
l.preventDefault(), o += 1, r.value = !0, (d = s.onEnter) == null || d.call(s, i(l), l);
|
|
576
|
-
}),
|
|
658
|
+
}), H(e, "dragover", (l) => {
|
|
577
659
|
var u;
|
|
578
660
|
a && (l.preventDefault(), (u = s.onOver) == null || u.call(s, i(l), l));
|
|
579
|
-
}),
|
|
661
|
+
}), H(e, "dragleave", (l) => {
|
|
580
662
|
var u;
|
|
581
663
|
a && (l.preventDefault(), o -= 1, o === 0 && (r.value = !1), (u = s.onLeave) == null || u.call(s, i(l), l));
|
|
582
|
-
}),
|
|
664
|
+
}), H(e, "drop", (l) => {
|
|
583
665
|
var u;
|
|
584
666
|
l.preventDefault(), o = 0, r.value = !1, (u = s.onDrop) == null || u.call(s, i(l), l);
|
|
585
667
|
});
|
|
@@ -589,182 +671,161 @@ function kr(e, t = {}) {
|
|
|
589
671
|
isOverDropZone: r
|
|
590
672
|
};
|
|
591
673
|
}
|
|
592
|
-
function
|
|
593
|
-
const { window: n =
|
|
674
|
+
function Rr(e, t, r = {}) {
|
|
675
|
+
const { window: n = G, ...o } = r;
|
|
594
676
|
let a;
|
|
595
|
-
const s =
|
|
677
|
+
const s = Xe(() => n && "ResizeObserver" in n), i = () => {
|
|
596
678
|
a && (a.disconnect(), a = void 0);
|
|
597
|
-
}, l = m(() => Array.isArray(e) ? e.map((
|
|
679
|
+
}, l = m(() => Array.isArray(e) ? e.map((p) => j(p)) : [j(e)]), u = J(
|
|
598
680
|
l,
|
|
599
|
-
(
|
|
681
|
+
(p) => {
|
|
600
682
|
if (i(), s.value && n) {
|
|
601
683
|
a = new ResizeObserver(t);
|
|
602
|
-
for (const
|
|
603
|
-
|
|
684
|
+
for (const f of p)
|
|
685
|
+
f && a.observe(f, o);
|
|
604
686
|
}
|
|
605
687
|
},
|
|
606
|
-
{ immediate: !0, flush: "post"
|
|
688
|
+
{ immediate: !0, flush: "post" }
|
|
607
689
|
), d = () => {
|
|
608
690
|
i(), u();
|
|
609
691
|
};
|
|
610
|
-
return
|
|
692
|
+
return ye(d), {
|
|
611
693
|
isSupported: s,
|
|
612
694
|
stop: d
|
|
613
695
|
};
|
|
614
696
|
}
|
|
615
|
-
function
|
|
697
|
+
function Ve(e, t = {}) {
|
|
616
698
|
const {
|
|
617
699
|
reset: r = !0,
|
|
618
700
|
windowResize: n = !0,
|
|
619
701
|
windowScroll: o = !0,
|
|
620
702
|
immediate: a = !0
|
|
621
|
-
} = t, s =
|
|
622
|
-
function
|
|
623
|
-
const
|
|
624
|
-
if (!
|
|
625
|
-
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0,
|
|
703
|
+
} = t, s = g(0), i = g(0), l = g(0), u = g(0), d = g(0), p = g(0), f = g(0), h = g(0);
|
|
704
|
+
function b() {
|
|
705
|
+
const x = j(e);
|
|
706
|
+
if (!x) {
|
|
707
|
+
r && (s.value = 0, i.value = 0, l.value = 0, u.value = 0, d.value = 0, p.value = 0, f.value = 0, h.value = 0);
|
|
626
708
|
return;
|
|
627
709
|
}
|
|
628
|
-
const
|
|
629
|
-
s.value =
|
|
710
|
+
const E = x.getBoundingClientRect();
|
|
711
|
+
s.value = E.height, i.value = E.bottom, l.value = E.left, u.value = E.right, d.value = E.top, p.value = E.width, f.value = E.x, h.value = E.y;
|
|
630
712
|
}
|
|
631
|
-
return
|
|
713
|
+
return Rr(e, b), J(() => j(e), (x) => !x && b()), _r(e, b, {
|
|
632
714
|
attributeFilter: ["style", "class"]
|
|
633
|
-
}), o &&
|
|
634
|
-
a &&
|
|
715
|
+
}), o && H("scroll", b, { capture: !0, passive: !0 }), n && H("resize", b, { passive: !0 }), rt(() => {
|
|
716
|
+
a && b();
|
|
635
717
|
}), {
|
|
636
718
|
height: s,
|
|
637
719
|
bottom: i,
|
|
638
720
|
left: l,
|
|
639
721
|
right: u,
|
|
640
722
|
top: d,
|
|
641
|
-
width:
|
|
642
|
-
x:
|
|
723
|
+
width: p,
|
|
724
|
+
x: f,
|
|
643
725
|
y: h,
|
|
644
|
-
update:
|
|
726
|
+
update: b
|
|
645
727
|
};
|
|
646
728
|
}
|
|
647
|
-
function
|
|
729
|
+
function Ge(e, t = {}) {
|
|
648
730
|
const {
|
|
649
731
|
delayEnter: r = 0,
|
|
650
732
|
delayLeave: n = 0,
|
|
651
|
-
window: o =
|
|
652
|
-
} = t, a =
|
|
733
|
+
window: o = G
|
|
734
|
+
} = t, a = g(!1);
|
|
653
735
|
let s;
|
|
654
736
|
const i = (l) => {
|
|
655
737
|
const u = l ? r : n;
|
|
656
738
|
s && (clearTimeout(s), s = void 0), u ? s = setTimeout(() => a.value = l, u) : a.value = l;
|
|
657
739
|
};
|
|
658
|
-
return o && (
|
|
740
|
+
return o && (H(e, "mouseenter", () => i(!0), { passive: !0 }), H(e, "mouseleave", () => i(!1), { passive: !0 })), a;
|
|
659
741
|
}
|
|
660
|
-
const
|
|
742
|
+
const zr = {
|
|
661
743
|
multiple: !0,
|
|
662
744
|
accept: "*",
|
|
663
745
|
reset: !1,
|
|
664
746
|
directory: !1
|
|
665
747
|
};
|
|
666
|
-
function
|
|
748
|
+
function Or(e = {}) {
|
|
667
749
|
const {
|
|
668
|
-
document: t =
|
|
669
|
-
} = e, r =
|
|
750
|
+
document: t = br
|
|
751
|
+
} = e, r = g(null), { on: n, trigger: o } = ar();
|
|
670
752
|
let a;
|
|
671
753
|
t && (a = t.createElement("input"), a.type = "file", a.onchange = (l) => {
|
|
672
754
|
const u = l.target;
|
|
673
755
|
r.value = u.files, o(r.value);
|
|
674
756
|
});
|
|
675
757
|
const s = () => {
|
|
676
|
-
r.value = null, a && (a.value = "", o(null));
|
|
758
|
+
r.value = null, a && a.value && (a.value = "", o(null));
|
|
677
759
|
}, i = (l) => {
|
|
678
760
|
if (!a)
|
|
679
761
|
return;
|
|
680
762
|
const u = {
|
|
681
|
-
|
|
763
|
+
...zr,
|
|
682
764
|
...e,
|
|
683
765
|
...l
|
|
684
766
|
};
|
|
685
|
-
a.multiple = u.multiple, a.accept = u.accept, a.webkitdirectory = u.directory,
|
|
767
|
+
a.multiple = u.multiple, a.accept = u.accept, a.webkitdirectory = u.directory, sr(u, "capture") && (a.capture = u.capture), u.reset && s(), a.click();
|
|
686
768
|
};
|
|
687
769
|
return {
|
|
688
|
-
files:
|
|
770
|
+
files: Qe(r),
|
|
689
771
|
open: i,
|
|
690
772
|
reset: s,
|
|
691
773
|
onChange: n
|
|
692
774
|
};
|
|
693
775
|
}
|
|
694
|
-
function
|
|
695
|
-
const {
|
|
696
|
-
|
|
697
|
-
var l, u;
|
|
698
|
-
(!n || (u = (l = i.target).matches) != null && u.call(l, ":focus-visible")) && (o.value = !0);
|
|
699
|
-
}), I(a, "blur", () => o.value = !1);
|
|
700
|
-
const s = m({
|
|
701
|
-
get: () => o.value,
|
|
702
|
-
set(i) {
|
|
703
|
-
var l, u;
|
|
704
|
-
!i && o.value ? (l = a.value) == null || l.blur() : i && !o.value && ((u = a.value) == null || u.focus());
|
|
705
|
-
}
|
|
706
|
-
});
|
|
707
|
-
return K(
|
|
708
|
-
a,
|
|
709
|
-
() => {
|
|
710
|
-
s.value = r;
|
|
711
|
-
},
|
|
712
|
-
{ immediate: !0, flush: "post" }
|
|
713
|
-
), { focused: s };
|
|
714
|
-
}
|
|
715
|
-
function xt(e, t, r = {}) {
|
|
716
|
-
const { window: n = Y } = r;
|
|
717
|
-
return _r(e, t, n == null ? void 0 : n.localStorage, r);
|
|
776
|
+
function Tt(e, t, r = {}) {
|
|
777
|
+
const { window: n = G } = r;
|
|
778
|
+
return Tr(e, t, n == null ? void 0 : n.localStorage, r);
|
|
718
779
|
}
|
|
719
|
-
const
|
|
780
|
+
const Br = {
|
|
720
781
|
page: (e) => [e.pageX, e.pageY],
|
|
721
782
|
client: (e) => [e.clientX, e.clientY],
|
|
722
783
|
screen: (e) => [e.screenX, e.screenY],
|
|
723
784
|
movement: (e) => e instanceof Touch ? null : [e.movementX, e.movementY]
|
|
724
785
|
};
|
|
725
|
-
function
|
|
786
|
+
function Et(e = {}) {
|
|
726
787
|
const {
|
|
727
788
|
type: t = "page",
|
|
728
789
|
touch: r = !0,
|
|
729
790
|
resetOnTouchEnds: n = !1,
|
|
730
791
|
initialValue: o = { x: 0, y: 0 },
|
|
731
|
-
window: a =
|
|
792
|
+
window: a = G,
|
|
732
793
|
target: s = a,
|
|
733
794
|
scroll: i = !0,
|
|
734
795
|
eventFilter: l
|
|
735
796
|
} = e;
|
|
736
797
|
let u = null;
|
|
737
|
-
const d =
|
|
738
|
-
const
|
|
739
|
-
u = $,
|
|
740
|
-
},
|
|
798
|
+
const d = g(o.x), p = g(o.y), f = g(null), h = typeof t == "function" ? t : Br[t], b = ($) => {
|
|
799
|
+
const R = h($);
|
|
800
|
+
u = $, R && ([d.value, p.value] = R, f.value = "mouse");
|
|
801
|
+
}, x = ($) => {
|
|
741
802
|
if ($.touches.length > 0) {
|
|
742
|
-
const
|
|
743
|
-
|
|
803
|
+
const R = h($.touches[0]);
|
|
804
|
+
R && ([d.value, p.value] = R, f.value = "touch");
|
|
744
805
|
}
|
|
745
|
-
},
|
|
806
|
+
}, E = () => {
|
|
746
807
|
if (!u || !a)
|
|
747
808
|
return;
|
|
748
809
|
const $ = h(u);
|
|
749
|
-
u instanceof MouseEvent && $ && (d.value = $[0] + a.scrollX,
|
|
750
|
-
},
|
|
751
|
-
d.value = o.x,
|
|
752
|
-
},
|
|
810
|
+
u instanceof MouseEvent && $ && (d.value = $[0] + a.scrollX, p.value = $[1] + a.scrollY);
|
|
811
|
+
}, V = () => {
|
|
812
|
+
d.value = o.x, p.value = o.y;
|
|
813
|
+
}, D = l ? ($) => l(() => b($), {}) : ($) => b($), W = l ? ($) => l(() => x($), {}) : ($) => x($), z = l ? () => l(() => E(), {}) : () => E();
|
|
753
814
|
if (s) {
|
|
754
815
|
const $ = { passive: !0 };
|
|
755
|
-
|
|
816
|
+
H(s, ["mousemove", "dragover"], D, $), r && t !== "movement" && (H(s, ["touchstart", "touchmove"], W, $), n && H(s, "touchend", V, $)), i && t === "page" && H(a, "scroll", z, { passive: !0 });
|
|
756
817
|
}
|
|
757
818
|
return {
|
|
758
819
|
x: d,
|
|
759
|
-
y:
|
|
760
|
-
sourceType:
|
|
820
|
+
y: p,
|
|
821
|
+
sourceType: f
|
|
761
822
|
};
|
|
762
823
|
}
|
|
763
|
-
function
|
|
764
|
-
const t =
|
|
824
|
+
function Nr(e) {
|
|
825
|
+
const t = dt("(prefers-color-scheme: light)", e), r = dt("(prefers-color-scheme: dark)", e);
|
|
765
826
|
return m(() => r.value ? "dark" : t.value ? "light" : "no-preference");
|
|
766
827
|
}
|
|
767
|
-
const
|
|
828
|
+
const nt = /* @__PURE__ */ T({
|
|
768
829
|
__name: "Btn",
|
|
769
830
|
props: {
|
|
770
831
|
type: { default: "button" },
|
|
@@ -780,25 +841,26 @@ const St = /* @__PURE__ */ R({
|
|
|
780
841
|
disabled: { type: Boolean, default: !1 }
|
|
781
842
|
},
|
|
782
843
|
setup(e) {
|
|
783
|
-
const t = e, r =
|
|
844
|
+
const t = e, r = ie(t), n = m(() => {
|
|
784
845
|
switch (t.size) {
|
|
785
846
|
case "sm":
|
|
786
847
|
return {
|
|
787
848
|
normalContent: "min-w-16 h-6 px-2 py-1 text-xs",
|
|
788
849
|
iconContent: "h-6 w-6 p-1"
|
|
789
850
|
};
|
|
790
|
-
case "md":
|
|
791
|
-
return {
|
|
792
|
-
normalContent: "min-w-20 h-8 px-3 py-1 text-sm",
|
|
793
|
-
iconContent: "h-8 w-8 p-2"
|
|
794
|
-
};
|
|
795
851
|
case "lg":
|
|
796
852
|
return {
|
|
797
853
|
normalContent: "min-w-24 h-10 px-4 py-2 text-base",
|
|
798
854
|
iconContent: "h-10 w-10 p-3"
|
|
799
855
|
};
|
|
856
|
+
case "md":
|
|
857
|
+
default:
|
|
858
|
+
return {
|
|
859
|
+
normalContent: "min-w-20 h-8 px-3 py-1 text-sm",
|
|
860
|
+
iconContent: "h-8 w-8 p-2"
|
|
861
|
+
};
|
|
800
862
|
}
|
|
801
|
-
}), o =
|
|
863
|
+
}), o = g(null), a = Ge(o), s = m(() => t.hoverVariant && a.value ? t.hoverVariant : t.variant), i = m(() => {
|
|
802
864
|
switch (s.value) {
|
|
803
865
|
case "filled":
|
|
804
866
|
switch (t.color) {
|
|
@@ -871,7 +933,7 @@ const St = /* @__PURE__ */ R({
|
|
|
871
933
|
return "btn-default";
|
|
872
934
|
}
|
|
873
935
|
});
|
|
874
|
-
return (l, u) => (v(),
|
|
936
|
+
return (l, u) => (v(), Y(Ce(l.is), Te({
|
|
875
937
|
ref_key: "btn",
|
|
876
938
|
ref: o,
|
|
877
939
|
"data-size": l.size,
|
|
@@ -892,26 +954,75 @@ const St = /* @__PURE__ */ R({
|
|
|
892
954
|
],
|
|
893
955
|
disabled: l.disabled
|
|
894
956
|
}, l.$attrs), {
|
|
895
|
-
default:
|
|
896
|
-
l.$slots.leftSection ?
|
|
897
|
-
|
|
898
|
-
l.$slots.rightSection ?
|
|
957
|
+
default: U(() => [
|
|
958
|
+
l.$slots.leftSection ? C(l.$slots, "leftSection", { key: 0 }) : B("", !0),
|
|
959
|
+
C(l.$slots, "default"),
|
|
960
|
+
l.$slots.rightSection ? C(l.$slots, "rightSection", { key: 1 }) : B("", !0)
|
|
899
961
|
]),
|
|
900
962
|
_: 3
|
|
901
963
|
}, 16, ["data-size", "type", "style", "class", "disabled"]));
|
|
902
964
|
}
|
|
903
|
-
}),
|
|
965
|
+
}), Pr = { class: "inline-flex w-auto container first-children:rounded-r-0 last-children:rounded-l-0 not-first-children:rounded-l-0 not-last-children:rounded-r-0" }, Ta = /* @__PURE__ */ T({
|
|
966
|
+
__name: "BtnGroup",
|
|
967
|
+
props: /* @__PURE__ */ K({
|
|
968
|
+
selections: {},
|
|
969
|
+
default: {},
|
|
970
|
+
color: {},
|
|
971
|
+
unselectable: { type: Boolean }
|
|
972
|
+
}, {
|
|
973
|
+
modelValue: {},
|
|
974
|
+
modelModifiers: {}
|
|
975
|
+
}),
|
|
976
|
+
emits: ["update:modelValue"],
|
|
977
|
+
setup(e) {
|
|
978
|
+
const t = e;
|
|
979
|
+
function r(i) {
|
|
980
|
+
return typeof i == "string" ? i : i.label ?? i.value;
|
|
981
|
+
}
|
|
982
|
+
function n(i) {
|
|
983
|
+
return typeof i == "string" ? i : i.value;
|
|
984
|
+
}
|
|
985
|
+
function o(i) {
|
|
986
|
+
return typeof i == "string" ? void 0 : i.icon;
|
|
987
|
+
}
|
|
988
|
+
const a = ee(e, "modelValue");
|
|
989
|
+
function s(i) {
|
|
990
|
+
n(i) === a.value && t.unselectable ? a.value = void 0 : a.value = n(i);
|
|
991
|
+
}
|
|
992
|
+
return (i, l) => {
|
|
993
|
+
const u = nt;
|
|
994
|
+
return v(), w("div", Pr, [
|
|
995
|
+
(v(!0), w(oe, null, Se(t.selections, (d) => (v(), Y(u, {
|
|
996
|
+
key: n(d),
|
|
997
|
+
model: a.value,
|
|
998
|
+
variant: n(d) === a.value ? "filled" : void 0,
|
|
999
|
+
color: t.color,
|
|
1000
|
+
onClick: (p) => s(d)
|
|
1001
|
+
}, {
|
|
1002
|
+
default: U(() => [
|
|
1003
|
+
o(d) ? (v(), w("i", {
|
|
1004
|
+
key: 0,
|
|
1005
|
+
class: k(o(d))
|
|
1006
|
+
}, null, 2)) : B("", !0),
|
|
1007
|
+
He(" " + ne(r(d)), 1)
|
|
1008
|
+
]),
|
|
1009
|
+
_: 2
|
|
1010
|
+
}, 1032, ["model", "variant", "color", "onClick"]))), 128))
|
|
1011
|
+
]);
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
}), Ir = (e, t) => {
|
|
904
1015
|
const r = e.__vccOpts || e;
|
|
905
1016
|
for (const [n, o] of t)
|
|
906
1017
|
r[n] = o;
|
|
907
1018
|
return r;
|
|
908
|
-
},
|
|
909
|
-
function
|
|
910
|
-
return v(), w("div",
|
|
911
|
-
|
|
1019
|
+
}, Hr = {}, Vr = { class: "flex flex-col gap-4 container" };
|
|
1020
|
+
function Dr(e, t) {
|
|
1021
|
+
return v(), w("div", Vr, [
|
|
1022
|
+
C(e.$slots, "default")
|
|
912
1023
|
]);
|
|
913
1024
|
}
|
|
914
|
-
const
|
|
1025
|
+
const Ea = /* @__PURE__ */ Ir(Hr, [["render", Dr]]), Ra = /* @__PURE__ */ T({
|
|
915
1026
|
__name: "ChatMessage",
|
|
916
1027
|
props: {
|
|
917
1028
|
avatar: {},
|
|
@@ -941,7 +1052,7 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
941
1052
|
}
|
|
942
1053
|
});
|
|
943
1054
|
return (n, o) => {
|
|
944
|
-
const a =
|
|
1055
|
+
const a = rr;
|
|
945
1056
|
return v(), w("div", {
|
|
946
1057
|
class: k(["flex gap-2", [
|
|
947
1058
|
{
|
|
@@ -950,11 +1061,11 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
950
1061
|
}
|
|
951
1062
|
]])
|
|
952
1063
|
}, [
|
|
953
|
-
n.$slots.avatar ?
|
|
1064
|
+
n.$slots.avatar ? C(n.$slots, "avatar", { key: 0 }) : n.avatar ? (v(), Y(a, {
|
|
954
1065
|
key: 1,
|
|
955
1066
|
src: n.avatar
|
|
956
1067
|
}, null, 8, ["src"])) : B("", !0),
|
|
957
|
-
|
|
1068
|
+
A("div", {
|
|
958
1069
|
class: k(["rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
959
1070
|
{
|
|
960
1071
|
"rounded-tr": n.position === "right",
|
|
@@ -964,12 +1075,12 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
964
1075
|
c(r)
|
|
965
1076
|
]])
|
|
966
1077
|
}, [
|
|
967
|
-
|
|
1078
|
+
C(n.$slots, "default")
|
|
968
1079
|
], 2)
|
|
969
1080
|
], 2);
|
|
970
1081
|
};
|
|
971
1082
|
}
|
|
972
|
-
}),
|
|
1083
|
+
}), Fr = { class: "w-full flex self-center gap-2 text-center" }, za = /* @__PURE__ */ T({
|
|
973
1084
|
__name: "ChatSystem",
|
|
974
1085
|
props: {
|
|
975
1086
|
position: {},
|
|
@@ -997,19 +1108,19 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
997
1108
|
return "bg-transparent";
|
|
998
1109
|
}
|
|
999
1110
|
});
|
|
1000
|
-
return (n, o) => (v(), w("div",
|
|
1001
|
-
|
|
1111
|
+
return (n, o) => (v(), w("div", Fr, [
|
|
1112
|
+
A("div", {
|
|
1002
1113
|
class: k(["w-full rounded-xl px-3 py-2 transition-background-color,border-color", [
|
|
1003
1114
|
c(r)
|
|
1004
1115
|
]])
|
|
1005
1116
|
}, [
|
|
1006
|
-
|
|
1117
|
+
C(n.$slots, "default")
|
|
1007
1118
|
], 2)
|
|
1008
1119
|
]));
|
|
1009
1120
|
}
|
|
1010
|
-
}),
|
|
1121
|
+
}), Oa = /* @__PURE__ */ T({
|
|
1011
1122
|
__name: "Chip",
|
|
1012
|
-
props: /* @__PURE__ */
|
|
1123
|
+
props: /* @__PURE__ */ K({
|
|
1013
1124
|
is: { default: "img" },
|
|
1014
1125
|
src: {},
|
|
1015
1126
|
size: { default: "md" },
|
|
@@ -1022,27 +1133,28 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
1022
1133
|
}),
|
|
1023
1134
|
emits: ["update:modelValue"],
|
|
1024
1135
|
setup(e) {
|
|
1025
|
-
const t = e, r =
|
|
1136
|
+
const t = e, r = ee(e, "modelValue"), n = ie(t), o = m(() => {
|
|
1026
1137
|
switch (t.size) {
|
|
1027
1138
|
case "sm":
|
|
1028
1139
|
return "px-3 text-sm h-6";
|
|
1029
|
-
case "md":
|
|
1030
|
-
return "px-6 h-8 text-base";
|
|
1031
1140
|
case "lg":
|
|
1032
1141
|
return "px-8 h-10 text-lg";
|
|
1142
|
+
case "md":
|
|
1143
|
+
default:
|
|
1144
|
+
return "px-6 h-8 text-base";
|
|
1033
1145
|
}
|
|
1034
1146
|
}), a = m(() => r.value ? "container-filled-primary border-transparent text-white" : "container-base"), s = m(() => r.value !== void 0), i = m(() => s.value ? "cursor-pointer" : "");
|
|
1035
1147
|
return (l, u) => (v(), w("span", {
|
|
1036
1148
|
class: k(["inline-flex items-center gap-1", [c(n).class, c(o), c(a), c(i)]]),
|
|
1037
|
-
style:
|
|
1149
|
+
style: I([c(n).style]),
|
|
1038
1150
|
onPointerup: u[0] || (u[0] = (d) => c(s) && (r.value = !r.value))
|
|
1039
1151
|
}, [
|
|
1040
|
-
l.$slots.leftSection ?
|
|
1041
|
-
|
|
1042
|
-
l.$slots.rightSection ?
|
|
1152
|
+
l.$slots.leftSection ? C(l.$slots, "leftSection", { key: 0 }) : B("", !0),
|
|
1153
|
+
C(l.$slots, "default"),
|
|
1154
|
+
l.$slots.rightSection ? C(l.$slots, "rightSection", { key: 1 }) : B("", !0)
|
|
1043
1155
|
], 38));
|
|
1044
1156
|
}
|
|
1045
|
-
}),
|
|
1157
|
+
}), Lr = /* @__PURE__ */ T({
|
|
1046
1158
|
__name: "ColorSwatch",
|
|
1047
1159
|
props: {
|
|
1048
1160
|
color: {},
|
|
@@ -1050,35 +1162,35 @@ const ya = /* @__PURE__ */ Rr(Er, [["render", Or]]), wa = /* @__PURE__ */ R({
|
|
|
1050
1162
|
withBorder: { type: Boolean, default: !1 }
|
|
1051
1163
|
},
|
|
1052
1164
|
setup(e) {
|
|
1053
|
-
return (t, r) => (v(),
|
|
1165
|
+
return (t, r) => (v(), Y(Ce(t.is), {
|
|
1054
1166
|
class: k(["h-6 w-6 border rounded-full", [{
|
|
1055
1167
|
"border border-surface-border-base": t.withBorder,
|
|
1056
1168
|
"border border-transparent": !t.withBorder
|
|
1057
1169
|
}]]),
|
|
1058
|
-
style:
|
|
1170
|
+
style: I({
|
|
1059
1171
|
backgroundColor: t.color
|
|
1060
1172
|
})
|
|
1061
1173
|
}, null, 8, ["class", "style"]));
|
|
1062
1174
|
}
|
|
1063
1175
|
});
|
|
1064
|
-
function
|
|
1176
|
+
function De(e) {
|
|
1065
1177
|
"@babel/helpers - typeof";
|
|
1066
|
-
return
|
|
1178
|
+
return De = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1067
1179
|
return typeof t;
|
|
1068
1180
|
} : function(t) {
|
|
1069
1181
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1070
|
-
},
|
|
1182
|
+
}, De(e);
|
|
1071
1183
|
}
|
|
1072
|
-
var
|
|
1073
|
-
function
|
|
1074
|
-
if (e = e || "", t = t || {}, e instanceof
|
|
1184
|
+
var Wr = /^\s+/, jr = /\s+$/;
|
|
1185
|
+
function _(e, t) {
|
|
1186
|
+
if (e = e || "", t = t || {}, e instanceof _)
|
|
1075
1187
|
return e;
|
|
1076
|
-
if (!(this instanceof
|
|
1077
|
-
return new
|
|
1078
|
-
var r =
|
|
1188
|
+
if (!(this instanceof _))
|
|
1189
|
+
return new _(e, t);
|
|
1190
|
+
var r = Xr(e);
|
|
1079
1191
|
this._originalInput = e, this._r = r.r, this._g = r.g, this._b = r.b, this._a = r.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || r.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = r.ok;
|
|
1080
1192
|
}
|
|
1081
|
-
|
|
1193
|
+
_.prototype = {
|
|
1082
1194
|
isDark: function() {
|
|
1083
1195
|
return this.getBrightness() < 128;
|
|
1084
1196
|
},
|
|
@@ -1106,10 +1218,10 @@ g.prototype = {
|
|
|
1106
1218
|
return r = t.r / 255, n = t.g / 255, o = t.b / 255, r <= 0.03928 ? a = r / 12.92 : a = Math.pow((r + 0.055) / 1.055, 2.4), n <= 0.03928 ? s = n / 12.92 : s = Math.pow((n + 0.055) / 1.055, 2.4), o <= 0.03928 ? i = o / 12.92 : i = Math.pow((o + 0.055) / 1.055, 2.4), 0.2126 * a + 0.7152 * s + 0.0722 * i;
|
|
1107
1219
|
},
|
|
1108
1220
|
setAlpha: function(t) {
|
|
1109
|
-
return this._a =
|
|
1221
|
+
return this._a = Rt(t), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
1110
1222
|
},
|
|
1111
1223
|
toHsv: function() {
|
|
1112
|
-
var t =
|
|
1224
|
+
var t = ht(this._r, this._g, this._b);
|
|
1113
1225
|
return {
|
|
1114
1226
|
h: t.h * 360,
|
|
1115
1227
|
s: t.s,
|
|
@@ -1118,11 +1230,11 @@ g.prototype = {
|
|
|
1118
1230
|
};
|
|
1119
1231
|
},
|
|
1120
1232
|
toHsvString: function() {
|
|
1121
|
-
var t =
|
|
1233
|
+
var t = ht(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.v * 100);
|
|
1122
1234
|
return this._a == 1 ? "hsv(" + r + ", " + n + "%, " + o + "%)" : "hsva(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
1123
1235
|
},
|
|
1124
1236
|
toHsl: function() {
|
|
1125
|
-
var t =
|
|
1237
|
+
var t = pt(this._r, this._g, this._b);
|
|
1126
1238
|
return {
|
|
1127
1239
|
h: t.h * 360,
|
|
1128
1240
|
s: t.s,
|
|
@@ -1131,17 +1243,17 @@ g.prototype = {
|
|
|
1131
1243
|
};
|
|
1132
1244
|
},
|
|
1133
1245
|
toHslString: function() {
|
|
1134
|
-
var t =
|
|
1246
|
+
var t = pt(this._r, this._g, this._b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), o = Math.round(t.l * 100);
|
|
1135
1247
|
return this._a == 1 ? "hsl(" + r + ", " + n + "%, " + o + "%)" : "hsla(" + r + ", " + n + "%, " + o + "%, " + this._roundA + ")";
|
|
1136
1248
|
},
|
|
1137
1249
|
toHex: function(t) {
|
|
1138
|
-
return
|
|
1250
|
+
return mt(this._r, this._g, this._b, t);
|
|
1139
1251
|
},
|
|
1140
1252
|
toHexString: function(t) {
|
|
1141
1253
|
return "#" + this.toHex(t);
|
|
1142
1254
|
},
|
|
1143
1255
|
toHex8: function(t) {
|
|
1144
|
-
return
|
|
1256
|
+
return Gr(this._r, this._g, this._b, this._a, t);
|
|
1145
1257
|
},
|
|
1146
1258
|
toHex8String: function(t) {
|
|
1147
1259
|
return "#" + this.toHex8(t);
|
|
@@ -1169,13 +1281,13 @@ g.prototype = {
|
|
|
1169
1281
|
return this._a == 1 ? "rgb(" + Math.round(N(this._r, 255) * 100) + "%, " + Math.round(N(this._g, 255) * 100) + "%, " + Math.round(N(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(N(this._r, 255) * 100) + "%, " + Math.round(N(this._g, 255) * 100) + "%, " + Math.round(N(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
1170
1282
|
},
|
|
1171
1283
|
toName: function() {
|
|
1172
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
1284
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : ln[mt(this._r, this._g, this._b, !0)] || !1;
|
|
1173
1285
|
},
|
|
1174
1286
|
toFilter: function(t) {
|
|
1175
|
-
var r = "#" +
|
|
1287
|
+
var r = "#" + vt(this._r, this._g, this._b, this._a), n = r, o = this._gradientType ? "GradientType = 1, " : "";
|
|
1176
1288
|
if (t) {
|
|
1177
|
-
var a =
|
|
1178
|
-
n = "#" +
|
|
1289
|
+
var a = _(t);
|
|
1290
|
+
n = "#" + vt(a._r, a._g, a._b, a._a);
|
|
1179
1291
|
}
|
|
1180
1292
|
return "progid:DXImageTransform.Microsoft.gradient(" + o + "startColorstr=" + r + ",endColorstr=" + n + ")";
|
|
1181
1293
|
},
|
|
@@ -1186,75 +1298,75 @@ g.prototype = {
|
|
|
1186
1298
|
return a ? t === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
1187
1299
|
},
|
|
1188
1300
|
clone: function() {
|
|
1189
|
-
return
|
|
1301
|
+
return _(this.toString());
|
|
1190
1302
|
},
|
|
1191
1303
|
_applyModification: function(t, r) {
|
|
1192
1304
|
var n = t.apply(null, [this].concat([].slice.call(r)));
|
|
1193
1305
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
1194
1306
|
},
|
|
1195
1307
|
lighten: function() {
|
|
1196
|
-
return this._applyModification(
|
|
1308
|
+
return this._applyModification(Qr, arguments);
|
|
1197
1309
|
},
|
|
1198
1310
|
brighten: function() {
|
|
1199
|
-
return this._applyModification(
|
|
1311
|
+
return this._applyModification(en, arguments);
|
|
1200
1312
|
},
|
|
1201
1313
|
darken: function() {
|
|
1202
|
-
return this._applyModification(
|
|
1314
|
+
return this._applyModification(tn, arguments);
|
|
1203
1315
|
},
|
|
1204
1316
|
desaturate: function() {
|
|
1205
|
-
return this._applyModification(
|
|
1317
|
+
return this._applyModification(Jr, arguments);
|
|
1206
1318
|
},
|
|
1207
1319
|
saturate: function() {
|
|
1208
|
-
return this._applyModification(
|
|
1320
|
+
return this._applyModification(Kr, arguments);
|
|
1209
1321
|
},
|
|
1210
1322
|
greyscale: function() {
|
|
1211
|
-
return this._applyModification(
|
|
1323
|
+
return this._applyModification(Zr, arguments);
|
|
1212
1324
|
},
|
|
1213
1325
|
spin: function() {
|
|
1214
|
-
return this._applyModification(
|
|
1326
|
+
return this._applyModification(rn, arguments);
|
|
1215
1327
|
},
|
|
1216
1328
|
_applyCombination: function(t, r) {
|
|
1217
1329
|
return t.apply(null, [this].concat([].slice.call(r)));
|
|
1218
1330
|
},
|
|
1219
1331
|
analogous: function() {
|
|
1220
|
-
return this._applyCombination(
|
|
1332
|
+
return this._applyCombination(on, arguments);
|
|
1221
1333
|
},
|
|
1222
1334
|
complement: function() {
|
|
1223
|
-
return this._applyCombination(
|
|
1335
|
+
return this._applyCombination(nn, arguments);
|
|
1224
1336
|
},
|
|
1225
1337
|
monochromatic: function() {
|
|
1226
|
-
return this._applyCombination(
|
|
1338
|
+
return this._applyCombination(sn, arguments);
|
|
1227
1339
|
},
|
|
1228
1340
|
splitcomplement: function() {
|
|
1229
|
-
return this._applyCombination(
|
|
1341
|
+
return this._applyCombination(an, arguments);
|
|
1230
1342
|
},
|
|
1231
1343
|
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
1232
1344
|
// polyad: function (number) {
|
|
1233
1345
|
// return this._applyCombination(polyad, [number]);
|
|
1234
1346
|
// },
|
|
1235
1347
|
triad: function() {
|
|
1236
|
-
return this._applyCombination(
|
|
1348
|
+
return this._applyCombination(bt, [3]);
|
|
1237
1349
|
},
|
|
1238
1350
|
tetrad: function() {
|
|
1239
|
-
return this._applyCombination(
|
|
1351
|
+
return this._applyCombination(bt, [4]);
|
|
1240
1352
|
}
|
|
1241
1353
|
};
|
|
1242
|
-
|
|
1243
|
-
if (
|
|
1354
|
+
_.fromRatio = function(e, t) {
|
|
1355
|
+
if (De(e) == "object") {
|
|
1244
1356
|
var r = {};
|
|
1245
1357
|
for (var n in e)
|
|
1246
|
-
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] =
|
|
1358
|
+
e.hasOwnProperty(n) && (n === "a" ? r[n] = e[n] : r[n] = Re(e[n]));
|
|
1247
1359
|
e = r;
|
|
1248
1360
|
}
|
|
1249
|
-
return
|
|
1361
|
+
return _(e, t);
|
|
1250
1362
|
};
|
|
1251
|
-
function
|
|
1363
|
+
function Xr(e) {
|
|
1252
1364
|
var t = {
|
|
1253
1365
|
r: 0,
|
|
1254
1366
|
g: 0,
|
|
1255
1367
|
b: 0
|
|
1256
1368
|
}, r = 1, n = null, o = null, a = null, s = !1, i = !1;
|
|
1257
|
-
return typeof e == "string" && (e =
|
|
1369
|
+
return typeof e == "string" && (e = fn(e)), De(e) == "object" && (ce(e.r) && ce(e.g) && ce(e.b) ? (t = Yr(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ce(e.h) && ce(e.s) && ce(e.v) ? (n = Re(e.s), o = Re(e.v), t = Ur(e.h, n, o), s = !0, i = "hsv") : ce(e.h) && ce(e.s) && ce(e.l) && (n = Re(e.s), a = Re(e.l), t = qr(e.h, n, a), s = !0, i = "hsl"), e.hasOwnProperty("a") && (r = e.a)), r = Rt(r), {
|
|
1258
1370
|
ok: s,
|
|
1259
1371
|
format: e.format || i,
|
|
1260
1372
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -1263,14 +1375,14 @@ function Ir(e) {
|
|
|
1263
1375
|
a: r
|
|
1264
1376
|
};
|
|
1265
1377
|
}
|
|
1266
|
-
function
|
|
1378
|
+
function Yr(e, t, r) {
|
|
1267
1379
|
return {
|
|
1268
1380
|
r: N(e, 255) * 255,
|
|
1269
1381
|
g: N(t, 255) * 255,
|
|
1270
1382
|
b: N(r, 255) * 255
|
|
1271
1383
|
};
|
|
1272
1384
|
}
|
|
1273
|
-
function
|
|
1385
|
+
function pt(e, t, r) {
|
|
1274
1386
|
e = N(e, 255), t = N(t, 255), r = N(r, 255);
|
|
1275
1387
|
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = (n + o) / 2;
|
|
1276
1388
|
if (n == o)
|
|
@@ -1296,11 +1408,11 @@ function lt(e, t, r) {
|
|
|
1296
1408
|
l: i
|
|
1297
1409
|
};
|
|
1298
1410
|
}
|
|
1299
|
-
function
|
|
1411
|
+
function qr(e, t, r) {
|
|
1300
1412
|
var n, o, a;
|
|
1301
1413
|
e = N(e, 360), t = N(t, 100), r = N(r, 100);
|
|
1302
|
-
function s(u, d,
|
|
1303
|
-
return
|
|
1414
|
+
function s(u, d, p) {
|
|
1415
|
+
return p < 0 && (p += 1), p > 1 && (p -= 1), p < 1 / 6 ? u + (d - u) * 6 * p : p < 1 / 2 ? d : p < 2 / 3 ? u + (d - u) * (2 / 3 - p) * 6 : u;
|
|
1304
1416
|
}
|
|
1305
1417
|
if (t === 0)
|
|
1306
1418
|
n = o = a = r;
|
|
@@ -1314,7 +1426,7 @@ function Fr(e, t, r) {
|
|
|
1314
1426
|
b: a * 255
|
|
1315
1427
|
};
|
|
1316
1428
|
}
|
|
1317
|
-
function
|
|
1429
|
+
function ht(e, t, r) {
|
|
1318
1430
|
e = N(e, 255), t = N(t, 255), r = N(r, 255);
|
|
1319
1431
|
var n = Math.max(e, t, r), o = Math.min(e, t, r), a, s, i = n, l = n - o;
|
|
1320
1432
|
if (s = n === 0 ? 0 : l / n, n == o)
|
|
@@ -1339,130 +1451,130 @@ function it(e, t, r) {
|
|
|
1339
1451
|
v: i
|
|
1340
1452
|
};
|
|
1341
1453
|
}
|
|
1342
|
-
function
|
|
1454
|
+
function Ur(e, t, r) {
|
|
1343
1455
|
e = N(e, 360) * 6, t = N(t, 100), r = N(r, 100);
|
|
1344
|
-
var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t), i = r * (1 - (1 - o) * t), l = n % 6, u = [r, s, a, a, i, r][l], d = [i, r, r, s, a, a][l],
|
|
1456
|
+
var n = Math.floor(e), o = e - n, a = r * (1 - t), s = r * (1 - o * t), i = r * (1 - (1 - o) * t), l = n % 6, u = [r, s, a, a, i, r][l], d = [i, r, r, s, a, a][l], p = [a, a, i, r, r, s][l];
|
|
1345
1457
|
return {
|
|
1346
1458
|
r: u * 255,
|
|
1347
1459
|
g: d * 255,
|
|
1348
|
-
b:
|
|
1460
|
+
b: p * 255
|
|
1349
1461
|
};
|
|
1350
1462
|
}
|
|
1351
|
-
function
|
|
1352
|
-
var o = [
|
|
1463
|
+
function mt(e, t, r, n) {
|
|
1464
|
+
var o = [Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16)), Q(Math.round(r).toString(16))];
|
|
1353
1465
|
return n && o[0].charAt(0) == o[0].charAt(1) && o[1].charAt(0) == o[1].charAt(1) && o[2].charAt(0) == o[2].charAt(1) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
|
|
1354
1466
|
}
|
|
1355
|
-
function
|
|
1356
|
-
var a = [
|
|
1467
|
+
function Gr(e, t, r, n, o) {
|
|
1468
|
+
var a = [Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16)), Q(Math.round(r).toString(16)), Q(zt(n))];
|
|
1357
1469
|
return o && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
|
|
1358
1470
|
}
|
|
1359
|
-
function
|
|
1360
|
-
var o = [
|
|
1471
|
+
function vt(e, t, r, n) {
|
|
1472
|
+
var o = [Q(zt(n)), Q(Math.round(e).toString(16)), Q(Math.round(t).toString(16)), Q(Math.round(r).toString(16))];
|
|
1361
1473
|
return o.join("");
|
|
1362
1474
|
}
|
|
1363
|
-
|
|
1364
|
-
return !e || !t ? !1 :
|
|
1475
|
+
_.equals = function(e, t) {
|
|
1476
|
+
return !e || !t ? !1 : _(e).toRgbString() == _(t).toRgbString();
|
|
1365
1477
|
};
|
|
1366
|
-
|
|
1367
|
-
return
|
|
1478
|
+
_.random = function() {
|
|
1479
|
+
return _.fromRatio({
|
|
1368
1480
|
r: Math.random(),
|
|
1369
1481
|
g: Math.random(),
|
|
1370
1482
|
b: Math.random()
|
|
1371
1483
|
});
|
|
1372
1484
|
};
|
|
1373
|
-
function
|
|
1485
|
+
function Jr(e, t) {
|
|
1374
1486
|
t = t === 0 ? 0 : t || 10;
|
|
1375
|
-
var r =
|
|
1376
|
-
return r.s -= t / 100, r.s =
|
|
1487
|
+
var r = _(e).toHsl();
|
|
1488
|
+
return r.s -= t / 100, r.s = Ye(r.s), _(r);
|
|
1377
1489
|
}
|
|
1378
|
-
function
|
|
1490
|
+
function Kr(e, t) {
|
|
1379
1491
|
t = t === 0 ? 0 : t || 10;
|
|
1380
|
-
var r =
|
|
1381
|
-
return r.s += t / 100, r.s =
|
|
1492
|
+
var r = _(e).toHsl();
|
|
1493
|
+
return r.s += t / 100, r.s = Ye(r.s), _(r);
|
|
1382
1494
|
}
|
|
1383
|
-
function
|
|
1384
|
-
return
|
|
1495
|
+
function Zr(e) {
|
|
1496
|
+
return _(e).desaturate(100);
|
|
1385
1497
|
}
|
|
1386
|
-
function
|
|
1498
|
+
function Qr(e, t) {
|
|
1387
1499
|
t = t === 0 ? 0 : t || 10;
|
|
1388
|
-
var r =
|
|
1389
|
-
return r.l += t / 100, r.l =
|
|
1500
|
+
var r = _(e).toHsl();
|
|
1501
|
+
return r.l += t / 100, r.l = Ye(r.l), _(r);
|
|
1390
1502
|
}
|
|
1391
|
-
function
|
|
1503
|
+
function en(e, t) {
|
|
1392
1504
|
t = t === 0 ? 0 : t || 10;
|
|
1393
|
-
var r =
|
|
1394
|
-
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))),
|
|
1505
|
+
var r = _(e).toRgb();
|
|
1506
|
+
return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), _(r);
|
|
1395
1507
|
}
|
|
1396
|
-
function
|
|
1508
|
+
function tn(e, t) {
|
|
1397
1509
|
t = t === 0 ? 0 : t || 10;
|
|
1398
|
-
var r =
|
|
1399
|
-
return r.l -= t / 100, r.l =
|
|
1510
|
+
var r = _(e).toHsl();
|
|
1511
|
+
return r.l -= t / 100, r.l = Ye(r.l), _(r);
|
|
1400
1512
|
}
|
|
1401
|
-
function
|
|
1402
|
-
var r =
|
|
1403
|
-
return r.h = n < 0 ? 360 + n : n,
|
|
1513
|
+
function rn(e, t) {
|
|
1514
|
+
var r = _(e).toHsl(), n = (r.h + t) % 360;
|
|
1515
|
+
return r.h = n < 0 ? 360 + n : n, _(r);
|
|
1404
1516
|
}
|
|
1405
|
-
function
|
|
1406
|
-
var t =
|
|
1407
|
-
return t.h = (t.h + 180) % 360,
|
|
1517
|
+
function nn(e) {
|
|
1518
|
+
var t = _(e).toHsl();
|
|
1519
|
+
return t.h = (t.h + 180) % 360, _(t);
|
|
1408
1520
|
}
|
|
1409
|
-
function
|
|
1521
|
+
function bt(e, t) {
|
|
1410
1522
|
if (isNaN(t) || t <= 0)
|
|
1411
1523
|
throw new Error("Argument to polyad must be a positive number");
|
|
1412
|
-
for (var r =
|
|
1413
|
-
n.push(
|
|
1524
|
+
for (var r = _(e).toHsl(), n = [_(e)], o = 360 / t, a = 1; a < t; a++)
|
|
1525
|
+
n.push(_({
|
|
1414
1526
|
h: (r.h + a * o) % 360,
|
|
1415
1527
|
s: r.s,
|
|
1416
1528
|
l: r.l
|
|
1417
1529
|
}));
|
|
1418
1530
|
return n;
|
|
1419
1531
|
}
|
|
1420
|
-
function
|
|
1421
|
-
var t =
|
|
1422
|
-
return [
|
|
1532
|
+
function an(e) {
|
|
1533
|
+
var t = _(e).toHsl(), r = t.h;
|
|
1534
|
+
return [_(e), _({
|
|
1423
1535
|
h: (r + 72) % 360,
|
|
1424
1536
|
s: t.s,
|
|
1425
1537
|
l: t.l
|
|
1426
|
-
}),
|
|
1538
|
+
}), _({
|
|
1427
1539
|
h: (r + 216) % 360,
|
|
1428
1540
|
s: t.s,
|
|
1429
1541
|
l: t.l
|
|
1430
1542
|
})];
|
|
1431
1543
|
}
|
|
1432
|
-
function
|
|
1544
|
+
function on(e, t, r) {
|
|
1433
1545
|
t = t || 6, r = r || 30;
|
|
1434
|
-
var n =
|
|
1546
|
+
var n = _(e).toHsl(), o = 360 / r, a = [_(e)];
|
|
1435
1547
|
for (n.h = (n.h - (o * t >> 1) + 720) % 360; --t; )
|
|
1436
|
-
n.h = (n.h + o) % 360, a.push(
|
|
1548
|
+
n.h = (n.h + o) % 360, a.push(_(n));
|
|
1437
1549
|
return a;
|
|
1438
1550
|
}
|
|
1439
|
-
function
|
|
1551
|
+
function sn(e, t) {
|
|
1440
1552
|
t = t || 6;
|
|
1441
|
-
for (var r =
|
|
1442
|
-
s.push(
|
|
1553
|
+
for (var r = _(e).toHsv(), n = r.h, o = r.s, a = r.v, s = [], i = 1 / t; t--; )
|
|
1554
|
+
s.push(_({
|
|
1443
1555
|
h: n,
|
|
1444
1556
|
s: o,
|
|
1445
1557
|
v: a
|
|
1446
1558
|
})), a = (a + i) % 1;
|
|
1447
1559
|
return s;
|
|
1448
1560
|
}
|
|
1449
|
-
|
|
1561
|
+
_.mix = function(e, t, r) {
|
|
1450
1562
|
r = r === 0 ? 0 : r || 50;
|
|
1451
|
-
var n =
|
|
1563
|
+
var n = _(e).toRgb(), o = _(t).toRgb(), a = r / 100, s = {
|
|
1452
1564
|
r: (o.r - n.r) * a + n.r,
|
|
1453
1565
|
g: (o.g - n.g) * a + n.g,
|
|
1454
1566
|
b: (o.b - n.b) * a + n.b,
|
|
1455
1567
|
a: (o.a - n.a) * a + n.a
|
|
1456
1568
|
};
|
|
1457
|
-
return
|
|
1569
|
+
return _(s);
|
|
1458
1570
|
};
|
|
1459
|
-
|
|
1460
|
-
var r =
|
|
1571
|
+
_.readability = function(e, t) {
|
|
1572
|
+
var r = _(e), n = _(t);
|
|
1461
1573
|
return (Math.max(r.getLuminance(), n.getLuminance()) + 0.05) / (Math.min(r.getLuminance(), n.getLuminance()) + 0.05);
|
|
1462
1574
|
};
|
|
1463
|
-
|
|
1464
|
-
var n =
|
|
1465
|
-
switch (a = !1, o =
|
|
1575
|
+
_.isReadable = function(e, t, r) {
|
|
1576
|
+
var n = _.readability(e, t), o, a;
|
|
1577
|
+
switch (a = !1, o = pn(r), o.level + o.size) {
|
|
1466
1578
|
case "AAsmall":
|
|
1467
1579
|
case "AAAlarge":
|
|
1468
1580
|
a = n >= 4.5;
|
|
@@ -1476,17 +1588,17 @@ g.isReadable = function(e, t, r) {
|
|
|
1476
1588
|
}
|
|
1477
1589
|
return a;
|
|
1478
1590
|
};
|
|
1479
|
-
|
|
1591
|
+
_.mostReadable = function(e, t, r) {
|
|
1480
1592
|
var n = null, o = 0, a, s, i, l;
|
|
1481
1593
|
r = r || {}, s = r.includeFallbackColors, i = r.level, l = r.size;
|
|
1482
1594
|
for (var u = 0; u < t.length; u++)
|
|
1483
|
-
a =
|
|
1484
|
-
return
|
|
1595
|
+
a = _.readability(e, t[u]), a > o && (o = a, n = _(t[u]));
|
|
1596
|
+
return _.isReadable(e, n, {
|
|
1485
1597
|
level: i,
|
|
1486
1598
|
size: l
|
|
1487
|
-
}) || !s ? n : (r.includeFallbackColors = !1,
|
|
1599
|
+
}) || !s ? n : (r.includeFallbackColors = !1, _.mostReadable(e, ["#fff", "#000"], r));
|
|
1488
1600
|
};
|
|
1489
|
-
var
|
|
1601
|
+
var Je = _.names = {
|
|
1490
1602
|
aliceblue: "f0f8ff",
|
|
1491
1603
|
antiquewhite: "faebd7",
|
|
1492
1604
|
aqua: "0ff",
|
|
@@ -1636,46 +1748,46 @@ var Ye = g.names = {
|
|
|
1636
1748
|
whitesmoke: "f5f5f5",
|
|
1637
1749
|
yellow: "ff0",
|
|
1638
1750
|
yellowgreen: "9acd32"
|
|
1639
|
-
},
|
|
1640
|
-
function
|
|
1751
|
+
}, ln = _.hexNames = un(Je);
|
|
1752
|
+
function un(e) {
|
|
1641
1753
|
var t = {};
|
|
1642
1754
|
for (var r in e)
|
|
1643
1755
|
e.hasOwnProperty(r) && (t[e[r]] = r);
|
|
1644
1756
|
return t;
|
|
1645
1757
|
}
|
|
1646
|
-
function
|
|
1758
|
+
function Rt(e) {
|
|
1647
1759
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1648
1760
|
}
|
|
1649
1761
|
function N(e, t) {
|
|
1650
|
-
|
|
1651
|
-
var r =
|
|
1762
|
+
cn(e) && (e = "100%");
|
|
1763
|
+
var r = dn(e);
|
|
1652
1764
|
return e = Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
|
|
1653
1765
|
}
|
|
1654
|
-
function
|
|
1766
|
+
function Ye(e) {
|
|
1655
1767
|
return Math.min(1, Math.max(0, e));
|
|
1656
1768
|
}
|
|
1657
|
-
function
|
|
1769
|
+
function q(e) {
|
|
1658
1770
|
return parseInt(e, 16);
|
|
1659
1771
|
}
|
|
1660
|
-
function
|
|
1772
|
+
function cn(e) {
|
|
1661
1773
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
1662
1774
|
}
|
|
1663
|
-
function
|
|
1775
|
+
function dn(e) {
|
|
1664
1776
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
1665
1777
|
}
|
|
1666
|
-
function
|
|
1778
|
+
function Q(e) {
|
|
1667
1779
|
return e.length == 1 ? "0" + e : "" + e;
|
|
1668
1780
|
}
|
|
1669
|
-
function
|
|
1781
|
+
function Re(e) {
|
|
1670
1782
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
1671
1783
|
}
|
|
1672
|
-
function
|
|
1784
|
+
function zt(e) {
|
|
1673
1785
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1674
1786
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return
|
|
1787
|
+
function gt(e) {
|
|
1788
|
+
return q(e) / 255;
|
|
1677
1789
|
}
|
|
1678
|
-
var
|
|
1790
|
+
var Z = function() {
|
|
1679
1791
|
var e = "[-\\+]?\\d+%?", t = "[-\\+]?\\d*\\.\\d+%?", r = "(?:" + t + ")|(?:" + e + ")", n = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?", o = "[\\s|\\(]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")[,|\\s]+(" + r + ")\\s*\\)?";
|
|
1680
1792
|
return {
|
|
1681
1793
|
CSS_UNIT: new RegExp(r),
|
|
@@ -1691,14 +1803,14 @@ var U = function() {
|
|
|
1691
1803
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1692
1804
|
};
|
|
1693
1805
|
}();
|
|
1694
|
-
function
|
|
1695
|
-
return !!
|
|
1806
|
+
function ce(e) {
|
|
1807
|
+
return !!Z.CSS_UNIT.exec(e);
|
|
1696
1808
|
}
|
|
1697
|
-
function
|
|
1698
|
-
e = e.replace(
|
|
1809
|
+
function fn(e) {
|
|
1810
|
+
e = e.replace(Wr, "").replace(jr, "").toLowerCase();
|
|
1699
1811
|
var t = !1;
|
|
1700
|
-
if (
|
|
1701
|
-
e =
|
|
1812
|
+
if (Je[e])
|
|
1813
|
+
e = Je[e], t = !0;
|
|
1702
1814
|
else if (e == "transparent")
|
|
1703
1815
|
return {
|
|
1704
1816
|
r: 0,
|
|
@@ -1708,58 +1820,58 @@ function an(e) {
|
|
|
1708
1820
|
format: "name"
|
|
1709
1821
|
};
|
|
1710
1822
|
var r;
|
|
1711
|
-
return (r =
|
|
1823
|
+
return (r = Z.rgb.exec(e)) ? {
|
|
1712
1824
|
r: r[1],
|
|
1713
1825
|
g: r[2],
|
|
1714
1826
|
b: r[3]
|
|
1715
|
-
} : (r =
|
|
1827
|
+
} : (r = Z.rgba.exec(e)) ? {
|
|
1716
1828
|
r: r[1],
|
|
1717
1829
|
g: r[2],
|
|
1718
1830
|
b: r[3],
|
|
1719
1831
|
a: r[4]
|
|
1720
|
-
} : (r =
|
|
1832
|
+
} : (r = Z.hsl.exec(e)) ? {
|
|
1721
1833
|
h: r[1],
|
|
1722
1834
|
s: r[2],
|
|
1723
1835
|
l: r[3]
|
|
1724
|
-
} : (r =
|
|
1836
|
+
} : (r = Z.hsla.exec(e)) ? {
|
|
1725
1837
|
h: r[1],
|
|
1726
1838
|
s: r[2],
|
|
1727
1839
|
l: r[3],
|
|
1728
1840
|
a: r[4]
|
|
1729
|
-
} : (r =
|
|
1841
|
+
} : (r = Z.hsv.exec(e)) ? {
|
|
1730
1842
|
h: r[1],
|
|
1731
1843
|
s: r[2],
|
|
1732
1844
|
v: r[3]
|
|
1733
|
-
} : (r =
|
|
1845
|
+
} : (r = Z.hsva.exec(e)) ? {
|
|
1734
1846
|
h: r[1],
|
|
1735
1847
|
s: r[2],
|
|
1736
1848
|
v: r[3],
|
|
1737
1849
|
a: r[4]
|
|
1738
|
-
} : (r =
|
|
1739
|
-
r:
|
|
1740
|
-
g:
|
|
1741
|
-
b:
|
|
1742
|
-
a:
|
|
1850
|
+
} : (r = Z.hex8.exec(e)) ? {
|
|
1851
|
+
r: q(r[1]),
|
|
1852
|
+
g: q(r[2]),
|
|
1853
|
+
b: q(r[3]),
|
|
1854
|
+
a: gt(r[4]),
|
|
1743
1855
|
format: t ? "name" : "hex8"
|
|
1744
|
-
} : (r =
|
|
1745
|
-
r:
|
|
1746
|
-
g:
|
|
1747
|
-
b:
|
|
1856
|
+
} : (r = Z.hex6.exec(e)) ? {
|
|
1857
|
+
r: q(r[1]),
|
|
1858
|
+
g: q(r[2]),
|
|
1859
|
+
b: q(r[3]),
|
|
1748
1860
|
format: t ? "name" : "hex"
|
|
1749
|
-
} : (r =
|
|
1750
|
-
r:
|
|
1751
|
-
g:
|
|
1752
|
-
b:
|
|
1753
|
-
a:
|
|
1861
|
+
} : (r = Z.hex4.exec(e)) ? {
|
|
1862
|
+
r: q(r[1] + "" + r[1]),
|
|
1863
|
+
g: q(r[2] + "" + r[2]),
|
|
1864
|
+
b: q(r[3] + "" + r[3]),
|
|
1865
|
+
a: gt(r[4] + "" + r[4]),
|
|
1754
1866
|
format: t ? "name" : "hex8"
|
|
1755
|
-
} : (r =
|
|
1756
|
-
r:
|
|
1757
|
-
g:
|
|
1758
|
-
b:
|
|
1867
|
+
} : (r = Z.hex3.exec(e)) ? {
|
|
1868
|
+
r: q(r[1] + "" + r[1]),
|
|
1869
|
+
g: q(r[2] + "" + r[2]),
|
|
1870
|
+
b: q(r[3] + "" + r[3]),
|
|
1759
1871
|
format: t ? "name" : "hex"
|
|
1760
1872
|
} : !1;
|
|
1761
1873
|
}
|
|
1762
|
-
function
|
|
1874
|
+
function pn(e) {
|
|
1763
1875
|
var t, r;
|
|
1764
1876
|
return e = e || {
|
|
1765
1877
|
level: "AA",
|
|
@@ -1769,10 +1881,10 @@ function on(e) {
|
|
|
1769
1881
|
size: r
|
|
1770
1882
|
};
|
|
1771
1883
|
}
|
|
1772
|
-
function
|
|
1773
|
-
if (!
|
|
1774
|
-
return
|
|
1775
|
-
const e =
|
|
1884
|
+
function Ba() {
|
|
1885
|
+
if (!le)
|
|
1886
|
+
return g("dark");
|
|
1887
|
+
const e = g(document.documentElement.dataset.scheme);
|
|
1776
1888
|
return new MutationObserver((r) => {
|
|
1777
1889
|
r.forEach((n) => {
|
|
1778
1890
|
n.type === "attributes" && n.attributeName === "data-scheme" && (e.value = document.documentElement.dataset.scheme);
|
|
@@ -1782,37 +1894,37 @@ function ka() {
|
|
|
1782
1894
|
attributeFilter: ["data-scheme"]
|
|
1783
1895
|
}), e;
|
|
1784
1896
|
}
|
|
1785
|
-
function
|
|
1786
|
-
return
|
|
1897
|
+
function Na() {
|
|
1898
|
+
return xe("currentThemeScheme", null);
|
|
1787
1899
|
}
|
|
1788
|
-
function
|
|
1789
|
-
return
|
|
1900
|
+
function Ot() {
|
|
1901
|
+
return xe("currentThemeData", g(Ft));
|
|
1790
1902
|
}
|
|
1791
|
-
function
|
|
1792
|
-
return
|
|
1903
|
+
function Pa() {
|
|
1904
|
+
return xe("currentThemeName", g("default"));
|
|
1793
1905
|
}
|
|
1794
|
-
function
|
|
1906
|
+
function hn(e, t, r = {}) {
|
|
1795
1907
|
const n = [0.98, 0.96, 0.9, 0.8, 0.7, 0.6, 0.55, 0.4, 0.36, 0.3, 0.2], o = [1, 0.99, 0.98, 0.9, 0.8, 0.5, 0.2, 0.12, 0.1, 0.08, 0.06];
|
|
1796
1908
|
return r.primary === void 0 && (r.primary = n), r.secondary === void 0 && (r.secondary = n), r.tertiary === void 0 && (r.tertiary = n), r.error === void 0 && (r.error = n), r.surface === void 0 && (r.surface = o), m(() => ({
|
|
1797
1909
|
name: e,
|
|
1798
1910
|
colors: {
|
|
1799
|
-
primary:
|
|
1800
|
-
secondary:
|
|
1801
|
-
tertiary:
|
|
1802
|
-
error:
|
|
1803
|
-
surface:
|
|
1911
|
+
primary: Ee(c(t.primary), r.primary),
|
|
1912
|
+
secondary: Ee(c(t.secondary), r.secondary),
|
|
1913
|
+
tertiary: Ee(c(t.tertiary), r.tertiary),
|
|
1914
|
+
error: Ee(c(t.error), r.error),
|
|
1915
|
+
surface: Ee(c(t.surface), r.surface)
|
|
1804
1916
|
}
|
|
1805
1917
|
}));
|
|
1806
1918
|
}
|
|
1807
|
-
function
|
|
1808
|
-
const t =
|
|
1919
|
+
function Bt(e) {
|
|
1920
|
+
const t = g(e);
|
|
1809
1921
|
return {
|
|
1810
1922
|
...{
|
|
1811
1923
|
...Object.keys(t.value.colors).map((a) => {
|
|
1812
1924
|
const s = a;
|
|
1813
1925
|
return t.value.colors[s].reduce((l, u, d) => {
|
|
1814
|
-
const
|
|
1815
|
-
return l[`--r-color-${s}-${d}`] = `${
|
|
1926
|
+
const p = _(u).toRgb();
|
|
1927
|
+
return l[`--r-color-${s}-${d}`] = `${p.r} ${p.g} ${p.b}`, l;
|
|
1816
1928
|
}, {});
|
|
1817
1929
|
}).reduce((a, s) => ({
|
|
1818
1930
|
...a,
|
|
@@ -1826,25 +1938,25 @@ function Ct(e) {
|
|
|
1826
1938
|
// ...schemeStyles.value,
|
|
1827
1939
|
};
|
|
1828
1940
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const t =
|
|
1831
|
-
return
|
|
1941
|
+
function at(e) {
|
|
1942
|
+
const t = g("");
|
|
1943
|
+
return fe(() => {
|
|
1832
1944
|
e.id ? t.value = e.id : t.value = `switch-${Math.random().toString(36).slice(2)}-${Date.now().toString(36)}`;
|
|
1833
1945
|
}), t;
|
|
1834
1946
|
}
|
|
1835
|
-
const
|
|
1836
|
-
function
|
|
1837
|
-
const e =
|
|
1838
|
-
return
|
|
1947
|
+
const mn = Symbol("scheme");
|
|
1948
|
+
function vn() {
|
|
1949
|
+
const e = Tt("scheme", "light");
|
|
1950
|
+
return le && new MutationObserver(() => {
|
|
1839
1951
|
e.value !== document.documentElement.dataset.scheme && (e.value = document.documentElement.dataset.scheme);
|
|
1840
1952
|
}).observe(document.documentElement, {
|
|
1841
1953
|
attributes: !0,
|
|
1842
1954
|
attributeFilter: ["data-scheme"]
|
|
1843
1955
|
}), e;
|
|
1844
1956
|
}
|
|
1845
|
-
const
|
|
1957
|
+
const bn = ["id", "alt"], gn = ["for"], yn = { key: 0 }, Ia = /* @__PURE__ */ T({
|
|
1846
1958
|
__name: "ColorInput",
|
|
1847
|
-
props: /* @__PURE__ */
|
|
1959
|
+
props: /* @__PURE__ */ K({
|
|
1848
1960
|
label: {}
|
|
1849
1961
|
}, {
|
|
1850
1962
|
modelValue: {},
|
|
@@ -1852,11 +1964,11 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1852
1964
|
}),
|
|
1853
1965
|
emits: ["update:modelValue"],
|
|
1854
1966
|
setup(e) {
|
|
1855
|
-
const t =
|
|
1967
|
+
const t = ee(e, "modelValue"), r = xt(), n = at(r), o = g(null);
|
|
1856
1968
|
return (a, s) => {
|
|
1857
|
-
const i =
|
|
1969
|
+
const i = Lr;
|
|
1858
1970
|
return v(), w("div", null, [
|
|
1859
|
-
|
|
1971
|
+
je(A("input", {
|
|
1860
1972
|
id: c(n),
|
|
1861
1973
|
ref_key: "input",
|
|
1862
1974
|
ref: o,
|
|
@@ -1864,41 +1976,41 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1864
1976
|
alt: t.value,
|
|
1865
1977
|
type: "color",
|
|
1866
1978
|
class: "pointer-events-none absolute opacity-0"
|
|
1867
|
-
}, null, 8,
|
|
1868
|
-
[
|
|
1979
|
+
}, null, 8, bn), [
|
|
1980
|
+
[Gt, t.value]
|
|
1869
1981
|
]),
|
|
1870
|
-
|
|
1982
|
+
A("label", {
|
|
1871
1983
|
class: "flex items-center gap-2",
|
|
1872
1984
|
for: c(n)
|
|
1873
1985
|
}, [
|
|
1874
|
-
|
|
1986
|
+
ae(i, {
|
|
1875
1987
|
class: "cursor-pointer",
|
|
1876
1988
|
color: t.value ?? "#222"
|
|
1877
1989
|
}, null, 8, ["color"]),
|
|
1878
|
-
a.label ? (v(), w("span",
|
|
1879
|
-
], 8,
|
|
1990
|
+
a.label ? (v(), w("span", yn, ne(a.label), 1)) : B("", !0)
|
|
1991
|
+
], 8, gn)
|
|
1880
1992
|
]);
|
|
1881
1993
|
};
|
|
1882
1994
|
}
|
|
1883
|
-
}),
|
|
1995
|
+
}), wn = ["data-scheme", "data-theme"], _n = /* @__PURE__ */ T({
|
|
1884
1996
|
__name: "ThemeProvider",
|
|
1885
1997
|
props: {
|
|
1886
1998
|
theme: {},
|
|
1887
1999
|
scheme: {}
|
|
1888
2000
|
},
|
|
1889
2001
|
setup(e) {
|
|
1890
|
-
const t = e, r =
|
|
2002
|
+
const t = e, r = Ot(), n = m(() => Bt(t.theme ? t.theme : r.value)), o = Tt("scheme", "light"), a = m(() => t.scheme ? t.scheme : o.value);
|
|
1891
2003
|
return (s, i) => (v(), w("div", {
|
|
1892
|
-
style:
|
|
2004
|
+
style: I([c(n)]),
|
|
1893
2005
|
"data-scheme": c(a),
|
|
1894
2006
|
"data-theme": c(r).name
|
|
1895
2007
|
}, [
|
|
1896
|
-
|
|
1897
|
-
], 12,
|
|
2008
|
+
C(s.$slots, "default")
|
|
2009
|
+
], 12, wn));
|
|
1898
2010
|
}
|
|
1899
|
-
}),
|
|
2011
|
+
}), Nt = /* @__PURE__ */ T({
|
|
1900
2012
|
__name: "FullscreenOverlay",
|
|
1901
|
-
props: /* @__PURE__ */
|
|
2013
|
+
props: /* @__PURE__ */ K({
|
|
1902
2014
|
persistent: { type: Boolean, default: !1 },
|
|
1903
2015
|
blur: { type: [String, Boolean], default: !1 },
|
|
1904
2016
|
wrapperClass: {}
|
|
@@ -1908,7 +2020,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1908
2020
|
}),
|
|
1909
2021
|
emits: ["update:modelValue"],
|
|
1910
2022
|
setup(e) {
|
|
1911
|
-
const t = e, r =
|
|
2023
|
+
const t = e, r = ee(e, "modelValue"), n = g(null);
|
|
1912
2024
|
function o(l) {
|
|
1913
2025
|
t.persistent || l.target === n.value && (r.value = !1);
|
|
1914
2026
|
}
|
|
@@ -1924,8 +2036,8 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1924
2036
|
default:
|
|
1925
2037
|
return "";
|
|
1926
2038
|
}
|
|
1927
|
-
}), s =
|
|
1928
|
-
|
|
2039
|
+
}), s = g(0);
|
|
2040
|
+
be(() => {
|
|
1929
2041
|
r.value ? (document.body.style.overflow = "hidden", document.body.style.marginRight = `${s.value}px`) : setTimeout(() => {
|
|
1930
2042
|
document.querySelector(".modal-wrapper.op100") || (document.body.style.overflow = "", document.body.style.marginRight = "");
|
|
1931
2043
|
}, 300);
|
|
@@ -1933,13 +2045,13 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1933
2045
|
const u = window.innerWidth - document.body.clientWidth;
|
|
1934
2046
|
u !== 0 && (s.value = u);
|
|
1935
2047
|
}).observe(document.body);
|
|
1936
|
-
const i =
|
|
2048
|
+
const i = Ot();
|
|
1937
2049
|
return (l, u) => {
|
|
1938
|
-
const d =
|
|
1939
|
-
return v(),
|
|
1940
|
-
|
|
1941
|
-
default:
|
|
1942
|
-
|
|
2050
|
+
const d = _n;
|
|
2051
|
+
return v(), Y(Jt, { to: "body" }, [
|
|
2052
|
+
ae(d, { theme: c(i) }, {
|
|
2053
|
+
default: U(() => [
|
|
2054
|
+
A("div", {
|
|
1943
2055
|
ref_key: "wrapperRef",
|
|
1944
2056
|
ref: n,
|
|
1945
2057
|
class: k(["modal-wrapper fixed left-0 top-0 z-100 h-full w-full bg-surface-10/50 transition-all duration-300 md:items-center", [a.value, l.wrapperClass, {
|
|
@@ -1948,7 +2060,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1948
2060
|
}]]),
|
|
1949
2061
|
onClick: o
|
|
1950
2062
|
}, [
|
|
1951
|
-
|
|
2063
|
+
C(l.$slots, "default")
|
|
1952
2064
|
], 2)
|
|
1953
2065
|
]),
|
|
1954
2066
|
_: 3
|
|
@@ -1956,9 +2068,9 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1956
2068
|
]);
|
|
1957
2069
|
};
|
|
1958
2070
|
}
|
|
1959
|
-
}),
|
|
2071
|
+
}), xn = { class: "flex justify-end p-4 md:px-6 md:py-4 md:pb-0" }, kn = /* @__PURE__ */ A("i", { class: "i-tabler-x" }, null, -1), Sn = { class: "h-full flex flex-col items-center justify-center px-4 md:px-6" }, Ha = /* @__PURE__ */ T({
|
|
1960
2072
|
__name: "Drawer",
|
|
1961
|
-
props: /* @__PURE__ */
|
|
2073
|
+
props: /* @__PURE__ */ K({
|
|
1962
2074
|
persistent: { type: Boolean, default: !1 },
|
|
1963
2075
|
blur: { type: [String, Boolean], default: !1 },
|
|
1964
2076
|
position: { default: "left" }
|
|
@@ -1968,17 +2080,17 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1968
2080
|
}),
|
|
1969
2081
|
emits: ["update:modelValue"],
|
|
1970
2082
|
setup(e) {
|
|
1971
|
-
const t = e, r =
|
|
2083
|
+
const t = e, r = ee(e, "modelValue");
|
|
1972
2084
|
return (n, o) => {
|
|
1973
|
-
const a =
|
|
1974
|
-
return v(),
|
|
2085
|
+
const a = nt, s = Nt;
|
|
2086
|
+
return v(), Y(s, {
|
|
1975
2087
|
modelValue: r.value,
|
|
1976
2088
|
"onUpdate:modelValue": o[1] || (o[1] = (i) => r.value = i),
|
|
1977
2089
|
blur: t.blur,
|
|
1978
2090
|
persistent: t.persistent
|
|
1979
2091
|
}, {
|
|
1980
|
-
default:
|
|
1981
|
-
|
|
2092
|
+
default: U(() => [
|
|
2093
|
+
ae(tt, {
|
|
1982
2094
|
"enter-from-class": n.position === "left" ? "-translate-x-1/1" : "translate-x-1/1",
|
|
1983
2095
|
"enter-to-class": (n.position === "left", "translate-x-0"),
|
|
1984
2096
|
"leave-from-class": (n.position === "left", "translate-x-0"),
|
|
@@ -1986,26 +2098,26 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
1986
2098
|
"enter-active-class": "transition ease-out duration-300",
|
|
1987
2099
|
"leave-active-class": "transition ease-in duration-200"
|
|
1988
2100
|
}, {
|
|
1989
|
-
default:
|
|
2101
|
+
default: U(() => [
|
|
1990
2102
|
r.value ? (v(), w("div", {
|
|
1991
2103
|
key: 0,
|
|
1992
2104
|
class: k(["fixed h-full w-full bg-surface-low md:w-md", n.position === "left" ? "left-0" : "right-0"])
|
|
1993
2105
|
}, [
|
|
1994
|
-
|
|
1995
|
-
|
|
2106
|
+
A("div", xn, [
|
|
2107
|
+
ae(a, {
|
|
1996
2108
|
icon: "",
|
|
1997
2109
|
variant: "transparent",
|
|
1998
2110
|
class: "text-surface-on hover:text-surface-on",
|
|
1999
2111
|
onPointerup: o[0] || (o[0] = (i) => r.value = !1)
|
|
2000
2112
|
}, {
|
|
2001
|
-
default:
|
|
2002
|
-
|
|
2113
|
+
default: U(() => [
|
|
2114
|
+
kn
|
|
2003
2115
|
]),
|
|
2004
2116
|
_: 1
|
|
2005
2117
|
})
|
|
2006
2118
|
]),
|
|
2007
|
-
|
|
2008
|
-
|
|
2119
|
+
A("div", Sn, [
|
|
2120
|
+
C(n.$slots, "default")
|
|
2009
2121
|
])
|
|
2010
2122
|
], 2)) : B("", !0)
|
|
2011
2123
|
]),
|
|
@@ -2016,7 +2128,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2016
2128
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
2017
2129
|
};
|
|
2018
2130
|
}
|
|
2019
|
-
}),
|
|
2131
|
+
}), Va = /* @__PURE__ */ T({
|
|
2020
2132
|
__name: "Dropzone",
|
|
2021
2133
|
props: {
|
|
2022
2134
|
dashed: { type: Boolean, default: !0 },
|
|
@@ -2024,13 +2136,13 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2024
2136
|
},
|
|
2025
2137
|
emits: ["drop"],
|
|
2026
2138
|
setup(e, { emit: t }) {
|
|
2027
|
-
const r = e, n = t, o =
|
|
2139
|
+
const r = e, n = t, o = g(), { onChange: a, open: s } = Or({
|
|
2028
2140
|
accept: r.accept
|
|
2029
2141
|
});
|
|
2030
2142
|
a((l) => {
|
|
2031
2143
|
l ? n("drop", Array.from(l)) : n("drop", null);
|
|
2032
2144
|
});
|
|
2033
|
-
const { isOverDropZone: i } =
|
|
2145
|
+
const { isOverDropZone: i } = Er(o, {
|
|
2034
2146
|
onDrop: (l) => {
|
|
2035
2147
|
n("drop", l);
|
|
2036
2148
|
}
|
|
@@ -2045,10 +2157,10 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2045
2157
|
}, "h-full w-full flex cursor-pointer items-center justify-center rounded transition-background-color,border-color"]),
|
|
2046
2158
|
onPointerup: u[0] || (u[0] = () => c(s)())
|
|
2047
2159
|
}, [
|
|
2048
|
-
|
|
2160
|
+
C(l.$slots, "default")
|
|
2049
2161
|
], 34));
|
|
2050
2162
|
}
|
|
2051
|
-
}),
|
|
2163
|
+
}), Da = /* @__PURE__ */ T({
|
|
2052
2164
|
__name: "Image",
|
|
2053
2165
|
props: {
|
|
2054
2166
|
is: { default: "img" },
|
|
@@ -2062,24 +2174,24 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2062
2174
|
rounded: { default: "md" }
|
|
2063
2175
|
},
|
|
2064
2176
|
setup(e) {
|
|
2065
|
-
const t = e, r =
|
|
2177
|
+
const t = e, r = g(!1), n = g(null);
|
|
2066
2178
|
function o() {
|
|
2067
2179
|
r.value = !0;
|
|
2068
2180
|
}
|
|
2069
|
-
|
|
2181
|
+
fe(() => {
|
|
2070
2182
|
var s;
|
|
2071
2183
|
(s = n.value) != null && s.complete && o();
|
|
2072
2184
|
});
|
|
2073
|
-
const a =
|
|
2185
|
+
const a = ie(t);
|
|
2074
2186
|
return (s, i) => (v(), w("div", {
|
|
2075
|
-
style:
|
|
2187
|
+
style: I({
|
|
2076
2188
|
height: s.height,
|
|
2077
2189
|
width: s.width,
|
|
2078
2190
|
maxHeight: s.maxHeight,
|
|
2079
2191
|
maxWidth: s.maxWidth
|
|
2080
2192
|
})
|
|
2081
2193
|
}, [
|
|
2082
|
-
s.src ? (v(),
|
|
2194
|
+
s.src ? (v(), Y(Ce(s.is), Te({
|
|
2083
2195
|
key: 0,
|
|
2084
2196
|
ref_key: "img",
|
|
2085
2197
|
ref: n,
|
|
@@ -2102,14 +2214,14 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2102
2214
|
t.class,
|
|
2103
2215
|
c(a).class
|
|
2104
2216
|
]]),
|
|
2105
|
-
style:
|
|
2217
|
+
style: I([
|
|
2106
2218
|
s.style,
|
|
2107
2219
|
c(a).style
|
|
2108
2220
|
])
|
|
2109
2221
|
}, null, 6))
|
|
2110
2222
|
], 4));
|
|
2111
2223
|
}
|
|
2112
|
-
}),
|
|
2224
|
+
}), $n = { class: "relative" }, Fa = /* @__PURE__ */ T({
|
|
2113
2225
|
__name: "Indicator",
|
|
2114
2226
|
props: {
|
|
2115
2227
|
color: { default: "primary" },
|
|
@@ -2129,7 +2241,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2129
2241
|
default:
|
|
2130
2242
|
return typeof t.size == "number" || !Number.isNaN(Number(t.size)) ? `w-${t.size} h-${t.size}` : t.size;
|
|
2131
2243
|
}
|
|
2132
|
-
}), n =
|
|
2244
|
+
}), n = kt(), o = m(() => {
|
|
2133
2245
|
if (!n.label)
|
|
2134
2246
|
return "";
|
|
2135
2247
|
switch (t.size) {
|
|
@@ -2163,8 +2275,8 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2163
2275
|
return "bg-error-container text-white";
|
|
2164
2276
|
}
|
|
2165
2277
|
});
|
|
2166
|
-
return (i, l) => (v(), w("div",
|
|
2167
|
-
|
|
2278
|
+
return (i, l) => (v(), w("div", $n, [
|
|
2279
|
+
A("div", {
|
|
2168
2280
|
class: k([[c(a), c(o)], "absolute z-1"])
|
|
2169
2281
|
}, [
|
|
2170
2282
|
t.ping ? (v(), w("div", {
|
|
@@ -2176,9 +2288,9 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2176
2288
|
c(s)
|
|
2177
2289
|
]])
|
|
2178
2290
|
}, [
|
|
2179
|
-
i.$slots.label ?
|
|
2291
|
+
i.$slots.label ? C(i.$slots, "label", { key: 0 }) : B("", !0)
|
|
2180
2292
|
], 2)) : B("", !0),
|
|
2181
|
-
|
|
2293
|
+
A("div", {
|
|
2182
2294
|
class: k(["top-0 box-content border-2 border-surface-low rounded-full", [
|
|
2183
2295
|
{
|
|
2184
2296
|
[c(r)]: !i.$slots.label
|
|
@@ -2186,15 +2298,15 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2186
2298
|
c(s)
|
|
2187
2299
|
]])
|
|
2188
2300
|
}, [
|
|
2189
|
-
i.$slots.label ?
|
|
2301
|
+
i.$slots.label ? C(i.$slots, "label", { key: 0 }) : B("", !0)
|
|
2190
2302
|
], 2)
|
|
2191
2303
|
], 2),
|
|
2192
|
-
|
|
2304
|
+
C(i.$slots, "default")
|
|
2193
2305
|
]));
|
|
2194
2306
|
}
|
|
2195
|
-
}),
|
|
2307
|
+
}), La = /* @__PURE__ */ T({
|
|
2196
2308
|
__name: "Modal",
|
|
2197
|
-
props: /* @__PURE__ */
|
|
2309
|
+
props: /* @__PURE__ */ K({
|
|
2198
2310
|
persistent: { type: Boolean, default: !1 },
|
|
2199
2311
|
blur: { type: [String, Boolean], default: !1 }
|
|
2200
2312
|
}, {
|
|
@@ -2203,18 +2315,18 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2203
2315
|
}),
|
|
2204
2316
|
emits: ["update:modelValue"],
|
|
2205
2317
|
setup(e) {
|
|
2206
|
-
const t = e, r =
|
|
2318
|
+
const t = e, r = ee(e, "modelValue");
|
|
2207
2319
|
return (n, o) => {
|
|
2208
|
-
const a =
|
|
2209
|
-
return v(),
|
|
2320
|
+
const a = Nt;
|
|
2321
|
+
return v(), Y(a, {
|
|
2210
2322
|
modelValue: r.value,
|
|
2211
2323
|
"onUpdate:modelValue": o[0] || (o[0] = (s) => r.value = s),
|
|
2212
2324
|
blur: t.blur,
|
|
2213
2325
|
persistent: t.persistent,
|
|
2214
2326
|
"wrapper-class": "flex items-end justify-center"
|
|
2215
2327
|
}, {
|
|
2216
|
-
default:
|
|
2217
|
-
|
|
2328
|
+
default: U(() => [
|
|
2329
|
+
ae(tt, {
|
|
2218
2330
|
"enter-from-class": "translate-y-1/2",
|
|
2219
2331
|
"enter-to-class": "translate-y-0",
|
|
2220
2332
|
"leave-from-class": "translate-y-0",
|
|
@@ -2222,8 +2334,8 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2222
2334
|
"enter-active-class": "transition ease-out duration-300",
|
|
2223
2335
|
"leave-active-class": "transition ease-in duration-200"
|
|
2224
2336
|
}, {
|
|
2225
|
-
default:
|
|
2226
|
-
r.value ?
|
|
2337
|
+
default: U(() => [
|
|
2338
|
+
r.value ? C(n.$slots, "default", { key: 0 }) : B("", !0)
|
|
2227
2339
|
]),
|
|
2228
2340
|
_: 3
|
|
2229
2341
|
})
|
|
@@ -2232,13 +2344,13 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2232
2344
|
}, 8, ["modelValue", "blur", "persistent"]);
|
|
2233
2345
|
};
|
|
2234
2346
|
}
|
|
2235
|
-
}),
|
|
2347
|
+
}), Mn = {
|
|
2236
2348
|
key: 0,
|
|
2237
2349
|
class: "h-container w-container i-tabler-loader-2 shrink-0 animate-spin"
|
|
2238
|
-
},
|
|
2350
|
+
}, An = { key: 1 }, Cn = { class: "grow-1" }, Tn = {
|
|
2239
2351
|
key: 2,
|
|
2240
2352
|
class: "text-sm text-surface-on-low"
|
|
2241
|
-
},
|
|
2353
|
+
}, En = /* @__PURE__ */ A("i", { class: "i-tabler-x" }, null, -1), Rn = /* @__PURE__ */ T({
|
|
2242
2354
|
__name: "Notification",
|
|
2243
2355
|
props: {
|
|
2244
2356
|
title: {},
|
|
@@ -2253,7 +2365,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2253
2365
|
},
|
|
2254
2366
|
emits: ["close"],
|
|
2255
2367
|
setup(e) {
|
|
2256
|
-
const t = e, r =
|
|
2368
|
+
const t = e, r = ie(t), n = m(() => {
|
|
2257
2369
|
switch (t.color) {
|
|
2258
2370
|
case "secondary":
|
|
2259
2371
|
return "bg-secondary-container";
|
|
@@ -2277,7 +2389,7 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2277
2389
|
}
|
|
2278
2390
|
});
|
|
2279
2391
|
return (a, s) => {
|
|
2280
|
-
const i =
|
|
2392
|
+
const i = nt;
|
|
2281
2393
|
return v(), w("div", {
|
|
2282
2394
|
class: k(["relative min-h-16 min-w-80 w-full flex items-center gap-2 container-low p-3", [
|
|
2283
2395
|
{ "border-0": !a.withBorder },
|
|
@@ -2287,104 +2399,105 @@ const cn = ["id", "alt"], dn = ["for"], fn = { key: 0 }, Ma = /* @__PURE__ */ R(
|
|
|
2287
2399
|
"w-full": a.block
|
|
2288
2400
|
}
|
|
2289
2401
|
]]),
|
|
2290
|
-
style:
|
|
2402
|
+
style: I(c(r).style)
|
|
2291
2403
|
}, [
|
|
2292
2404
|
a.icon ? (v(), w("div", {
|
|
2293
2405
|
key: 0,
|
|
2294
2406
|
class: k(["leading-0", c(o)])
|
|
2295
2407
|
}, [
|
|
2296
|
-
a.loading ? (v(), w("i",
|
|
2408
|
+
a.loading ? (v(), w("i", Mn)) : (v(), w("i", {
|
|
2297
2409
|
key: 1,
|
|
2298
2410
|
class: k(["h-container w-container shrink-0", a.icon])
|
|
2299
2411
|
}, null, 2))
|
|
2300
|
-
], 2)) : (v(), w("div",
|
|
2301
|
-
|
|
2412
|
+
], 2)) : (v(), w("div", An, [
|
|
2413
|
+
A("div", {
|
|
2302
2414
|
class: k(["absolute left-[0.25rem] top-[0.25rem] h-[calc(100%-0.5rem)] w-1 rounded-full", [{
|
|
2303
2415
|
"animate-pulse": a.loading
|
|
2304
2416
|
}, c(n)]])
|
|
2305
2417
|
}, null, 2)
|
|
2306
2418
|
])),
|
|
2307
|
-
|
|
2419
|
+
A("div", Cn, [
|
|
2308
2420
|
a.title ? (v(), w("div", {
|
|
2309
2421
|
key: 0,
|
|
2310
2422
|
class: k([c(o), "text-base"])
|
|
2311
|
-
},
|
|
2312
|
-
a.$slots.message ?
|
|
2423
|
+
}, ne(a.title), 3)) : B("", !0),
|
|
2424
|
+
a.$slots.message ? C(a.$slots, "message", { key: 1 }) : a.message ? (v(), w("div", Tn, ne(a.message), 1)) : B("", !0)
|
|
2313
2425
|
]),
|
|
2314
|
-
a.closeable ? (v(),
|
|
2426
|
+
a.closeable ? (v(), Y(i, {
|
|
2315
2427
|
key: 2,
|
|
2316
2428
|
icon: "",
|
|
2317
2429
|
variant: "transparent",
|
|
2318
2430
|
class: "text-surface-on hover:text-surface-on",
|
|
2319
2431
|
onClick: s[0] || (s[0] = (l) => a.$emit("close"))
|
|
2320
2432
|
}, {
|
|
2321
|
-
default:
|
|
2322
|
-
|
|
2433
|
+
default: U(() => [
|
|
2434
|
+
En
|
|
2323
2435
|
]),
|
|
2324
2436
|
_: 1
|
|
2325
2437
|
})) : B("", !0)
|
|
2326
2438
|
], 6);
|
|
2327
2439
|
};
|
|
2328
2440
|
}
|
|
2329
|
-
}),
|
|
2330
|
-
let
|
|
2331
|
-
const
|
|
2332
|
-
const t =
|
|
2333
|
-
t && t.forEach((r) =>
|
|
2334
|
-
},
|
|
2441
|
+
}), Pt = /* @__PURE__ */ new Set(), X = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), zn = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakSet();
|
|
2442
|
+
let me, ot = 0, st = 0;
|
|
2443
|
+
const de = "__aa_tgt", Be = "__aa_del", Le = "__aa_new", On = (e) => {
|
|
2444
|
+
const t = Vn(e);
|
|
2445
|
+
t && t.forEach((r) => Dn(r));
|
|
2446
|
+
}, Bn = (e) => {
|
|
2335
2447
|
e.forEach((t) => {
|
|
2336
|
-
t.target ===
|
|
2448
|
+
t.target === me && Pn(), X.has(t.target) && we(t.target);
|
|
2337
2449
|
});
|
|
2338
2450
|
};
|
|
2339
|
-
function
|
|
2340
|
-
const t =
|
|
2451
|
+
function Nn(e) {
|
|
2452
|
+
const t = Ke.get(e);
|
|
2341
2453
|
t == null || t.disconnect();
|
|
2342
|
-
let r =
|
|
2454
|
+
let r = X.get(e), n = 0;
|
|
2343
2455
|
const o = 5;
|
|
2344
|
-
r || (r =
|
|
2345
|
-
const { offsetWidth: a, offsetHeight: s } =
|
|
2456
|
+
r || (r = Ae(e), X.set(e, r));
|
|
2457
|
+
const { offsetWidth: a, offsetHeight: s } = me, l = [
|
|
2346
2458
|
r.top - o,
|
|
2347
2459
|
a - (r.left + o + r.width),
|
|
2348
2460
|
s - (r.top + o + r.height),
|
|
2349
2461
|
r.left - o
|
|
2350
2462
|
].map((d) => `${-1 * Math.floor(d)}px`).join(" "), u = new IntersectionObserver(() => {
|
|
2351
|
-
++n > 1 &&
|
|
2463
|
+
++n > 1 && we(e);
|
|
2352
2464
|
}, {
|
|
2353
|
-
root:
|
|
2465
|
+
root: me,
|
|
2354
2466
|
threshold: 1,
|
|
2355
2467
|
rootMargin: l
|
|
2356
2468
|
});
|
|
2357
|
-
u.observe(e),
|
|
2469
|
+
u.observe(e), Ke.set(e, u);
|
|
2358
2470
|
}
|
|
2359
|
-
function
|
|
2360
|
-
clearTimeout(
|
|
2361
|
-
const t =
|
|
2362
|
-
|
|
2363
|
-
const n =
|
|
2471
|
+
function we(e) {
|
|
2472
|
+
clearTimeout(Fe.get(e));
|
|
2473
|
+
const t = qe(e), r = Ne(t) ? 500 : t.duration;
|
|
2474
|
+
Fe.set(e, setTimeout(async () => {
|
|
2475
|
+
const n = ge.get(e);
|
|
2364
2476
|
try {
|
|
2365
|
-
await (n == null ? void 0 : n.finished),
|
|
2477
|
+
await (n == null ? void 0 : n.finished), X.set(e, Ae(e)), Nn(e);
|
|
2366
2478
|
} catch {
|
|
2367
2479
|
}
|
|
2368
2480
|
}, r));
|
|
2369
2481
|
}
|
|
2370
|
-
function
|
|
2371
|
-
clearTimeout(
|
|
2372
|
-
|
|
2482
|
+
function Pn() {
|
|
2483
|
+
clearTimeout(Fe.get(me)), Fe.set(me, setTimeout(() => {
|
|
2484
|
+
Pt.forEach((e) => Dt(e, (t) => It(() => we(t))));
|
|
2373
2485
|
}, 100));
|
|
2374
2486
|
}
|
|
2375
|
-
function
|
|
2487
|
+
function In(e) {
|
|
2376
2488
|
setTimeout(() => {
|
|
2377
|
-
|
|
2489
|
+
zn.set(e, setInterval(() => It(we.bind(null, e)), 2e3));
|
|
2378
2490
|
}, Math.round(2e3 * Math.random()));
|
|
2379
2491
|
}
|
|
2380
|
-
function
|
|
2492
|
+
function It(e) {
|
|
2381
2493
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
2382
2494
|
}
|
|
2383
|
-
let
|
|
2384
|
-
typeof window < "u" &&
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2495
|
+
let Ze, _e;
|
|
2496
|
+
const Hn = typeof window < "u" && "ResizeObserver" in window;
|
|
2497
|
+
Hn && (me = document.documentElement, Ze = new MutationObserver(On), _e = new ResizeObserver(Bn), window.addEventListener("scroll", () => {
|
|
2498
|
+
st = window.scrollY, ot = window.scrollX;
|
|
2499
|
+
}), _e.observe(me));
|
|
2500
|
+
function Vn(e) {
|
|
2388
2501
|
return e.reduce((n, o) => [
|
|
2389
2502
|
...n,
|
|
2390
2503
|
...Array.from(o.addedNodes),
|
|
@@ -2393,23 +2506,23 @@ function En(e) {
|
|
|
2393
2506
|
if (n === !1)
|
|
2394
2507
|
return !1;
|
|
2395
2508
|
if (o.target instanceof Element) {
|
|
2396
|
-
if (
|
|
2509
|
+
if (Ue(o.target), !n.has(o.target)) {
|
|
2397
2510
|
n.add(o.target);
|
|
2398
2511
|
for (let a = 0; a < o.target.children.length; a++) {
|
|
2399
2512
|
const s = o.target.children.item(a);
|
|
2400
2513
|
if (s) {
|
|
2401
|
-
if (
|
|
2514
|
+
if (Be in s)
|
|
2402
2515
|
return !1;
|
|
2403
|
-
|
|
2516
|
+
Ue(o.target, s), n.add(s);
|
|
2404
2517
|
}
|
|
2405
2518
|
}
|
|
2406
2519
|
}
|
|
2407
2520
|
if (o.removedNodes.length)
|
|
2408
2521
|
for (let a = 0; a < o.removedNodes.length; a++) {
|
|
2409
2522
|
const s = o.removedNodes[a];
|
|
2410
|
-
if (
|
|
2523
|
+
if (Be in s)
|
|
2411
2524
|
return !1;
|
|
2412
|
-
s instanceof Element && (n.add(s),
|
|
2525
|
+
s instanceof Element && (n.add(s), Ue(o.target, s), $e.set(s, [
|
|
2413
2526
|
o.previousSibling,
|
|
2414
2527
|
o.nextSibling
|
|
2415
2528
|
]));
|
|
@@ -2418,18 +2531,18 @@ function En(e) {
|
|
|
2418
2531
|
return n;
|
|
2419
2532
|
}, /* @__PURE__ */ new Set());
|
|
2420
2533
|
}
|
|
2421
|
-
function
|
|
2422
|
-
!t && !(
|
|
2534
|
+
function Ue(e, t) {
|
|
2535
|
+
!t && !(de in e) ? Object.defineProperty(e, de, { value: e }) : t && !(de in t) && Object.defineProperty(t, de, { value: e });
|
|
2423
2536
|
}
|
|
2424
|
-
function
|
|
2537
|
+
function Dn(e) {
|
|
2425
2538
|
var t;
|
|
2426
|
-
const r = e.isConnected, n =
|
|
2427
|
-
r &&
|
|
2539
|
+
const r = e.isConnected, n = X.has(e);
|
|
2540
|
+
r && $e.has(e) && $e.delete(e), ge.has(e) && ((t = ge.get(e)) === null || t === void 0 || t.cancel()), Le in e ? yt(e) : n && r ? Ln(e) : n && !r ? Wn(e) : yt(e);
|
|
2428
2541
|
}
|
|
2429
|
-
function
|
|
2542
|
+
function re(e) {
|
|
2430
2543
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
2431
2544
|
}
|
|
2432
|
-
function
|
|
2545
|
+
function Fn(e) {
|
|
2433
2546
|
let t = e.parentElement;
|
|
2434
2547
|
for (; t; ) {
|
|
2435
2548
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -2438,8 +2551,8 @@ function On(e) {
|
|
|
2438
2551
|
}
|
|
2439
2552
|
return { x: 0, y: 0 };
|
|
2440
2553
|
}
|
|
2441
|
-
function
|
|
2442
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
2554
|
+
function Ae(e) {
|
|
2555
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = Fn(e);
|
|
2443
2556
|
return {
|
|
2444
2557
|
top: t.top + n,
|
|
2445
2558
|
left: t.left + r,
|
|
@@ -2447,69 +2560,69 @@ function ke(e) {
|
|
|
2447
2560
|
height: t.height
|
|
2448
2561
|
};
|
|
2449
2562
|
}
|
|
2450
|
-
function
|
|
2563
|
+
function Ht(e, t, r) {
|
|
2451
2564
|
let n = t.width, o = t.height, a = r.width, s = r.height;
|
|
2452
2565
|
const i = getComputedStyle(e);
|
|
2453
2566
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
2454
|
-
const u =
|
|
2567
|
+
const u = re(i.paddingTop) + re(i.paddingBottom) + re(i.borderTopWidth) + re(i.borderBottomWidth), d = re(i.paddingLeft) + re(i.paddingRight) + re(i.borderRightWidth) + re(i.borderLeftWidth);
|
|
2455
2568
|
n -= d, a -= d, o -= u, s -= u;
|
|
2456
2569
|
}
|
|
2457
2570
|
return [n, a, o, s].map(Math.round);
|
|
2458
2571
|
}
|
|
2459
|
-
function
|
|
2460
|
-
return
|
|
2572
|
+
function qe(e) {
|
|
2573
|
+
return de in e && Me.has(e[de]) ? Me.get(e[de]) : { duration: 250, easing: "ease-in-out" };
|
|
2461
2574
|
}
|
|
2462
|
-
function
|
|
2463
|
-
if (
|
|
2464
|
-
return e[
|
|
2575
|
+
function Vt(e) {
|
|
2576
|
+
if (de in e)
|
|
2577
|
+
return e[de];
|
|
2465
2578
|
}
|
|
2466
|
-
function
|
|
2467
|
-
const t =
|
|
2468
|
-
return t ?
|
|
2579
|
+
function lt(e) {
|
|
2580
|
+
const t = Vt(e);
|
|
2581
|
+
return t ? ze.has(t) : !1;
|
|
2469
2582
|
}
|
|
2470
|
-
function
|
|
2471
|
-
t.forEach((r) => r(e,
|
|
2583
|
+
function Dt(e, ...t) {
|
|
2584
|
+
t.forEach((r) => r(e, Me.has(e)));
|
|
2472
2585
|
for (let r = 0; r < e.children.length; r++) {
|
|
2473
2586
|
const n = e.children.item(r);
|
|
2474
|
-
n && t.forEach((o) => o(n,
|
|
2587
|
+
n && t.forEach((o) => o(n, Me.has(n)));
|
|
2475
2588
|
}
|
|
2476
2589
|
}
|
|
2477
|
-
function
|
|
2590
|
+
function it(e) {
|
|
2478
2591
|
return Array.isArray(e) ? e : [e];
|
|
2479
2592
|
}
|
|
2480
|
-
function
|
|
2593
|
+
function Ne(e) {
|
|
2481
2594
|
return typeof e == "function";
|
|
2482
2595
|
}
|
|
2483
|
-
function
|
|
2484
|
-
const t =
|
|
2485
|
-
if (!
|
|
2486
|
-
return
|
|
2596
|
+
function Ln(e) {
|
|
2597
|
+
const t = X.get(e), r = Ae(e);
|
|
2598
|
+
if (!lt(e))
|
|
2599
|
+
return X.set(e, r);
|
|
2487
2600
|
let n;
|
|
2488
2601
|
if (!t)
|
|
2489
2602
|
return;
|
|
2490
|
-
const o =
|
|
2603
|
+
const o = qe(e);
|
|
2491
2604
|
if (typeof o != "function") {
|
|
2492
|
-
const a = t.left - r.left, s = t.top - r.top, [i, l, u, d] =
|
|
2605
|
+
const a = t.left - r.left, s = t.top - r.top, [i, l, u, d] = Ht(e, t, r), p = {
|
|
2493
2606
|
transform: `translate(${a}px, ${s}px)`
|
|
2494
|
-
},
|
|
2607
|
+
}, f = {
|
|
2495
2608
|
transform: "translate(0, 0)"
|
|
2496
2609
|
};
|
|
2497
|
-
i !== l && (
|
|
2610
|
+
i !== l && (p.width = `${i}px`, f.width = `${l}px`), u !== d && (p.height = `${u}px`, f.height = `${d}px`), n = e.animate([p, f], {
|
|
2498
2611
|
duration: o.duration,
|
|
2499
2612
|
easing: o.easing
|
|
2500
2613
|
});
|
|
2501
2614
|
} else {
|
|
2502
|
-
const [a] =
|
|
2615
|
+
const [a] = it(o(e, "remain", t, r));
|
|
2503
2616
|
n = new Animation(a), n.play();
|
|
2504
2617
|
}
|
|
2505
|
-
|
|
2506
|
-
}
|
|
2507
|
-
function
|
|
2508
|
-
|
|
2509
|
-
const t =
|
|
2510
|
-
|
|
2511
|
-
const r =
|
|
2512
|
-
if (!
|
|
2618
|
+
ge.set(e, n), X.set(e, r), n.addEventListener("finish", we.bind(null, e));
|
|
2619
|
+
}
|
|
2620
|
+
function yt(e) {
|
|
2621
|
+
Le in e && delete e[Le];
|
|
2622
|
+
const t = Ae(e);
|
|
2623
|
+
X.set(e, t);
|
|
2624
|
+
const r = qe(e);
|
|
2625
|
+
if (!lt(e))
|
|
2513
2626
|
return;
|
|
2514
2627
|
let n;
|
|
2515
2628
|
if (typeof r != "function")
|
|
@@ -2522,31 +2635,31 @@ function pt(e) {
|
|
|
2522
2635
|
easing: "ease-in"
|
|
2523
2636
|
});
|
|
2524
2637
|
else {
|
|
2525
|
-
const [o] =
|
|
2638
|
+
const [o] = it(r(e, "add", t));
|
|
2526
2639
|
n = new Animation(o), n.play();
|
|
2527
2640
|
}
|
|
2528
|
-
|
|
2641
|
+
ge.set(e, n), n.addEventListener("finish", we.bind(null, e));
|
|
2529
2642
|
}
|
|
2530
|
-
function
|
|
2643
|
+
function wt(e, t) {
|
|
2531
2644
|
var r;
|
|
2532
|
-
e.remove(),
|
|
2533
|
-
if (
|
|
2645
|
+
e.remove(), X.delete(e), $e.delete(e), ge.delete(e), (r = Ke.get(e)) === null || r === void 0 || r.disconnect(), setTimeout(() => {
|
|
2646
|
+
if (Be in e && delete e[Be], Object.defineProperty(e, Le, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
2534
2647
|
for (const n in t)
|
|
2535
2648
|
e.style[n] = "";
|
|
2536
2649
|
}, 0);
|
|
2537
2650
|
}
|
|
2538
|
-
function
|
|
2651
|
+
function Wn(e) {
|
|
2539
2652
|
var t;
|
|
2540
|
-
if (
|
|
2653
|
+
if (!$e.has(e) || !X.has(e))
|
|
2541
2654
|
return;
|
|
2542
|
-
const [r, n] =
|
|
2543
|
-
Object.defineProperty(e,
|
|
2655
|
+
const [r, n] = $e.get(e);
|
|
2656
|
+
Object.defineProperty(e, Be, { value: !0, configurable: !0 });
|
|
2544
2657
|
const o = window.scrollX, a = window.scrollY;
|
|
2545
|
-
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t =
|
|
2546
|
-
return
|
|
2547
|
-
const [s, i, l, u] =
|
|
2548
|
-
(o !==
|
|
2549
|
-
let
|
|
2658
|
+
if (n && n.parentNode && n.parentNode instanceof Element ? n.parentNode.insertBefore(e, n) : r && r.parentNode ? r.parentNode.appendChild(e) : (t = Vt(e)) === null || t === void 0 || t.appendChild(e), !lt(e))
|
|
2659
|
+
return wt(e);
|
|
2660
|
+
const [s, i, l, u] = Xn(e), d = qe(e), p = X.get(e);
|
|
2661
|
+
(o !== ot || a !== st) && jn(e, o, a, d);
|
|
2662
|
+
let f, h = {
|
|
2550
2663
|
position: "absolute",
|
|
2551
2664
|
top: `${s}px`,
|
|
2552
2665
|
left: `${i}px`,
|
|
@@ -2557,8 +2670,8 @@ function Bn(e) {
|
|
|
2557
2670
|
transformOrigin: "center",
|
|
2558
2671
|
zIndex: "100"
|
|
2559
2672
|
};
|
|
2560
|
-
if (!
|
|
2561
|
-
Object.assign(e.style, h),
|
|
2673
|
+
if (!Ne(d))
|
|
2674
|
+
Object.assign(e.style, h), f = e.animate([
|
|
2562
2675
|
{
|
|
2563
2676
|
transform: "scale(1)",
|
|
2564
2677
|
opacity: 1
|
|
@@ -2569,66 +2682,66 @@ function Bn(e) {
|
|
|
2569
2682
|
}
|
|
2570
2683
|
], { duration: d.duration, easing: "ease-out" });
|
|
2571
2684
|
else {
|
|
2572
|
-
const [
|
|
2573
|
-
(
|
|
2685
|
+
const [b, x] = it(d(e, "remove", p));
|
|
2686
|
+
(x == null ? void 0 : x.styleReset) !== !1 && (h = (x == null ? void 0 : x.styleReset) || h, Object.assign(e.style, h)), f = new Animation(b), f.play();
|
|
2574
2687
|
}
|
|
2575
|
-
|
|
2688
|
+
ge.set(e, f), f.addEventListener("finish", wt.bind(null, e, h));
|
|
2576
2689
|
}
|
|
2577
|
-
function
|
|
2578
|
-
const o =
|
|
2579
|
-
if (getComputedStyle(
|
|
2690
|
+
function jn(e, t, r, n) {
|
|
2691
|
+
const o = ot - t, a = st - r, s = document.documentElement.style.scrollBehavior;
|
|
2692
|
+
if (getComputedStyle(me).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + o, window.scrollY + a), !e.parentElement)
|
|
2580
2693
|
return;
|
|
2581
2694
|
const l = e.parentElement;
|
|
2582
2695
|
let u = l.clientHeight, d = l.clientWidth;
|
|
2583
|
-
const
|
|
2584
|
-
function
|
|
2696
|
+
const p = performance.now();
|
|
2697
|
+
function f() {
|
|
2585
2698
|
requestAnimationFrame(() => {
|
|
2586
|
-
if (!
|
|
2587
|
-
const h = u - l.clientHeight,
|
|
2588
|
-
|
|
2589
|
-
left: window.scrollX -
|
|
2699
|
+
if (!Ne(n)) {
|
|
2700
|
+
const h = u - l.clientHeight, b = d - l.clientWidth;
|
|
2701
|
+
p + n.duration > performance.now() ? (window.scrollTo({
|
|
2702
|
+
left: window.scrollX - b,
|
|
2590
2703
|
top: window.scrollY - h
|
|
2591
|
-
}), u = l.clientHeight, d = l.clientWidth,
|
|
2704
|
+
}), u = l.clientHeight, d = l.clientWidth, f()) : document.documentElement.style.scrollBehavior = s;
|
|
2592
2705
|
}
|
|
2593
2706
|
});
|
|
2594
2707
|
}
|
|
2595
|
-
|
|
2708
|
+
f();
|
|
2596
2709
|
}
|
|
2597
|
-
function
|
|
2598
|
-
const t =
|
|
2710
|
+
function Xn(e) {
|
|
2711
|
+
const t = X.get(e), [r, , n] = Ht(e, t, Ae(e));
|
|
2599
2712
|
let o = e.parentElement;
|
|
2600
2713
|
for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
|
|
2601
2714
|
o = o.parentElement;
|
|
2602
2715
|
o || (o = document.body);
|
|
2603
|
-
const a = getComputedStyle(o), s =
|
|
2716
|
+
const a = getComputedStyle(o), s = X.get(o) || Ae(o), i = Math.round(t.top - s.top) - re(a.borderTopWidth), l = Math.round(t.left - s.left) - re(a.borderLeftWidth);
|
|
2604
2717
|
return [i, l, r, n];
|
|
2605
2718
|
}
|
|
2606
|
-
function
|
|
2607
|
-
return
|
|
2719
|
+
function Yn(e, t = {}) {
|
|
2720
|
+
return Ze && _e && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !Ne(t) && !t.disrespectUserMotionPreference || (ze.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), Dt(e, we, In, (o) => _e == null ? void 0 : _e.observe(o)), Ne(t) ? Me.set(e, t) : Me.set(e, { duration: 250, easing: "ease-in-out", ...t }), Ze.observe(e, { childList: !0 }), Pt.add(e))), Object.freeze({
|
|
2608
2721
|
parent: e,
|
|
2609
2722
|
enable: () => {
|
|
2610
|
-
|
|
2723
|
+
ze.add(e);
|
|
2611
2724
|
},
|
|
2612
2725
|
disable: () => {
|
|
2613
|
-
|
|
2726
|
+
ze.delete(e);
|
|
2614
2727
|
},
|
|
2615
|
-
isEnabled: () =>
|
|
2728
|
+
isEnabled: () => ze.has(e)
|
|
2616
2729
|
});
|
|
2617
2730
|
}
|
|
2618
|
-
const
|
|
2731
|
+
const qn = {
|
|
2619
2732
|
mounted: (e, t) => {
|
|
2620
|
-
|
|
2733
|
+
Yn(e, t.value || {});
|
|
2621
2734
|
},
|
|
2622
2735
|
// ignore ssr see #96:
|
|
2623
2736
|
getSSRProps: () => ({})
|
|
2624
|
-
},
|
|
2737
|
+
}, Un = { class: "fixed z-20 flex flex-col gap-2 p-2" }, Wa = /* @__PURE__ */ T({
|
|
2625
2738
|
__name: "NotificationSystem",
|
|
2626
2739
|
setup(e) {
|
|
2627
|
-
const t =
|
|
2740
|
+
const t = la();
|
|
2628
2741
|
return (r, n) => {
|
|
2629
|
-
const o =
|
|
2630
|
-
return
|
|
2631
|
-
(v(!0), w(
|
|
2742
|
+
const o = Rn;
|
|
2743
|
+
return je((v(), w("div", Un, [
|
|
2744
|
+
(v(!0), w(oe, null, Se(c(t), (a) => (v(), Y(o, {
|
|
2632
2745
|
key: a.hash,
|
|
2633
2746
|
"with-border": "",
|
|
2634
2747
|
closeable: "",
|
|
@@ -2640,11 +2753,11 @@ const Pn = {
|
|
|
2640
2753
|
onClose: (s) => c(t).splice(c(t).indexOf(a), 1)
|
|
2641
2754
|
}, null, 8, ["title", "message", "icon", "loading", "color", "onClose"]))), 128))
|
|
2642
2755
|
])), [
|
|
2643
|
-
[c(
|
|
2756
|
+
[c(qn)]
|
|
2644
2757
|
]);
|
|
2645
2758
|
};
|
|
2646
2759
|
}
|
|
2647
|
-
}),
|
|
2760
|
+
}), Gn = { class: "relative" }, ja = /* @__PURE__ */ T({
|
|
2648
2761
|
__name: "Overlay",
|
|
2649
2762
|
props: {
|
|
2650
2763
|
blur: { type: [Boolean, String], default: !1 },
|
|
@@ -2665,22 +2778,22 @@ const Pn = {
|
|
|
2665
2778
|
default:
|
|
2666
2779
|
return "";
|
|
2667
2780
|
}
|
|
2668
|
-
}), n =
|
|
2781
|
+
}), n = ie(t), o = g(null), a = _(t.color).toRgb(), s = m(() => ({
|
|
2669
2782
|
backgroundColor: `rgba(${a.r}, ${a.g}, ${a.b}, ${t.opacity / 100})`
|
|
2670
2783
|
}));
|
|
2671
|
-
return (i, l) => (v(), w("div",
|
|
2672
|
-
|
|
2673
|
-
|
|
2784
|
+
return (i, l) => (v(), w("div", Gn, [
|
|
2785
|
+
C(i.$slots, "default"),
|
|
2786
|
+
A("div", Te(i.$attrs, {
|
|
2674
2787
|
ref_key: "wrapperRef",
|
|
2675
2788
|
ref: o,
|
|
2676
2789
|
class: [[c(r), c(n).class], "absolute left-0 top-0 h-full w-full overflow-hidden md:items-center"],
|
|
2677
2790
|
style: [c(n).style, c(s)]
|
|
2678
2791
|
}), [
|
|
2679
|
-
|
|
2792
|
+
C(i.$slots, "content")
|
|
2680
2793
|
], 16)
|
|
2681
2794
|
]));
|
|
2682
2795
|
}
|
|
2683
|
-
}),
|
|
2796
|
+
}), Jn = /* @__PURE__ */ T({
|
|
2684
2797
|
__name: "Paper",
|
|
2685
2798
|
props: {
|
|
2686
2799
|
size: { default: "md" },
|
|
@@ -2693,44 +2806,44 @@ const Pn = {
|
|
|
2693
2806
|
},
|
|
2694
2807
|
setup(e) {
|
|
2695
2808
|
const t = e;
|
|
2696
|
-
function r(
|
|
2697
|
-
return ["primary", "secondary", "tertiary", "error"].includes(
|
|
2809
|
+
function r(x) {
|
|
2810
|
+
return ["primary", "secondary", "tertiary", "error"].includes(x) ? `rgb(var(--r-color-${x}-container))` : x;
|
|
2698
2811
|
}
|
|
2699
|
-
const n =
|
|
2812
|
+
const n = ie(t), { x: o, y: a } = Et(), s = g(null), { width: i, height: l, top: u, left: d } = Ve(s), p = m(() => Math.min(i.value, l.value)), f = m(() => t.loading ? {
|
|
2700
2813
|
background: "linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box",
|
|
2701
2814
|
"background-color": "var(--bg)",
|
|
2702
2815
|
"--bg": "rgba(var(--r-color-surface-low) / 1)",
|
|
2703
|
-
"--gradient": `radial-gradient(circle at center, ${r(t.color)} ${
|
|
2816
|
+
"--gradient": `radial-gradient(circle at center, ${r(t.color)} ${p.value * 0.5}px, var(--bg) ${p.value * 0.5}px)`,
|
|
2704
2817
|
"background-size": "200% 200%"
|
|
2705
2818
|
} : {}), h = m(() => {
|
|
2706
2819
|
if (t.traceAnimate) {
|
|
2707
|
-
const
|
|
2820
|
+
const x = m(() => ({
|
|
2708
2821
|
x: d.value + i.value / 2,
|
|
2709
2822
|
y: u.value + l.value / 2
|
|
2710
|
-
})),
|
|
2823
|
+
})), E = m(() => {
|
|
2711
2824
|
if (o.value < d.value || o.value > d.value + i.value || a.value < u.value || a.value > u.value + l.value)
|
|
2712
2825
|
return {
|
|
2713
2826
|
x: o.value,
|
|
2714
2827
|
y: a.value
|
|
2715
2828
|
};
|
|
2716
|
-
const
|
|
2717
|
-
let
|
|
2718
|
-
const $ = (a.value -
|
|
2719
|
-
return o.value <
|
|
2720
|
-
x:
|
|
2829
|
+
const V = x.value.x, D = x.value.y;
|
|
2830
|
+
let W, z;
|
|
2831
|
+
const $ = (a.value - D) / (o.value - V);
|
|
2832
|
+
return o.value < V ? (W = d.value, z = D + $ * (d.value - V)) : (W = d.value + i.value, z = D + $ * (W - V)), z < u.value ? (z = u.value, W = V + (z - D) / $) : z > u.value + l.value && (z = u.value + l.value, W = V + (z - D) / $), {
|
|
2833
|
+
x: W,
|
|
2721
2834
|
y: z
|
|
2722
2835
|
};
|
|
2723
2836
|
});
|
|
2724
2837
|
return {
|
|
2725
2838
|
"--bg": "rgba(var(--r-color-surface-low) / 1)",
|
|
2726
|
-
"--gradient": `radial-gradient(circle at ${
|
|
2839
|
+
"--gradient": `radial-gradient(circle at ${E.value.x - d.value}px ${E.value.y - u.value}px, ${r(t.color)} ${p.value * 0.5}px, var(--bg) ${p.value * 0.5}px)`,
|
|
2727
2840
|
background: "linear-gradient(var(--bg), var(--bg)) padding-box, var(--gradient) border-box",
|
|
2728
2841
|
"background-size": "200% 200%",
|
|
2729
2842
|
"background-color": "var(--bg)"
|
|
2730
2843
|
};
|
|
2731
2844
|
} else
|
|
2732
2845
|
return {};
|
|
2733
|
-
}),
|
|
2846
|
+
}), b = m(() => !i.value || !l.value ? [] : t.loading ? [
|
|
2734
2847
|
{
|
|
2735
2848
|
backgroundPosition: "0% 0%",
|
|
2736
2849
|
offset: 0
|
|
@@ -2748,29 +2861,29 @@ const Pn = {
|
|
|
2748
2861
|
offset: 0.75
|
|
2749
2862
|
}
|
|
2750
2863
|
] : []);
|
|
2751
|
-
return
|
|
2864
|
+
return kr(s, b, {
|
|
2752
2865
|
duration: 1e3,
|
|
2753
2866
|
iterations: Number.POSITIVE_INFINITY
|
|
2754
|
-
}), (
|
|
2867
|
+
}), (x, E) => (v(), Y(Ce(x.is), {
|
|
2755
2868
|
ref_key: "paperRef",
|
|
2756
2869
|
ref: s,
|
|
2757
2870
|
class: k(["relative container-low rounded-lg p-4", [
|
|
2758
2871
|
{
|
|
2759
|
-
"border-transparent": !
|
|
2872
|
+
"border-transparent": !x.withBorder
|
|
2760
2873
|
},
|
|
2761
2874
|
c(n).class
|
|
2762
2875
|
]]),
|
|
2763
|
-
style:
|
|
2876
|
+
style: I([c(n).style, c(f), c(h)])
|
|
2764
2877
|
}, {
|
|
2765
|
-
default:
|
|
2766
|
-
|
|
2878
|
+
default: U(() => [
|
|
2879
|
+
C(x.$slots, "default")
|
|
2767
2880
|
]),
|
|
2768
2881
|
_: 3
|
|
2769
2882
|
}, 8, ["class", "style"]));
|
|
2770
2883
|
}
|
|
2771
|
-
}),
|
|
2884
|
+
}), Kn = ["for"], Zn = { key: 1 }, Qn = ["id", "placeholder", "type"], ea = /* @__PURE__ */ T({
|
|
2772
2885
|
__name: "TextField",
|
|
2773
|
-
props: /* @__PURE__ */
|
|
2886
|
+
props: /* @__PURE__ */ K({
|
|
2774
2887
|
onChange: {},
|
|
2775
2888
|
color: { default: "primary" },
|
|
2776
2889
|
error: { type: Boolean },
|
|
@@ -2786,7 +2899,7 @@ const Pn = {
|
|
|
2786
2899
|
}),
|
|
2787
2900
|
emits: ["update:modelValue"],
|
|
2788
2901
|
setup(e, { expose: t }) {
|
|
2789
|
-
const r = e, n =
|
|
2902
|
+
const r = e, n = ee(e, "modelValue"), o = m(() => {
|
|
2790
2903
|
switch (r.size) {
|
|
2791
2904
|
case "sm":
|
|
2792
2905
|
return {
|
|
@@ -2824,33 +2937,33 @@ const Pn = {
|
|
|
2824
2937
|
default:
|
|
2825
2938
|
return "text-surface-on bg-surface-base border-surface-border-base focus:border-primary-container";
|
|
2826
2939
|
}
|
|
2827
|
-
}), i = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l =
|
|
2940
|
+
}), i = m(() => r.disabled ? "pointer-events-none filter grayscale opacity-60" : ""), l = ie(r), u = g(null);
|
|
2828
2941
|
t({
|
|
2829
2942
|
el: u
|
|
2830
2943
|
});
|
|
2831
|
-
const d =
|
|
2832
|
-
return (
|
|
2833
|
-
|
|
2944
|
+
const d = xt(), p = at(d);
|
|
2945
|
+
return (f, h) => (v(), w("div", null, [
|
|
2946
|
+
f.$slots.label || f.label ? (v(), w("label", {
|
|
2834
2947
|
key: 0,
|
|
2835
|
-
for: c(
|
|
2948
|
+
for: c(p),
|
|
2836
2949
|
class: k(["mb-1 block text-surface-on", [c(a)]])
|
|
2837
2950
|
}, [
|
|
2838
|
-
|
|
2839
|
-
], 10,
|
|
2840
|
-
|
|
2951
|
+
f.$slots.label ? C(f.$slots, "label", { key: 0 }) : (v(), w("span", Zn, ne(f.label), 1))
|
|
2952
|
+
], 10, Kn)) : B("", !0),
|
|
2953
|
+
je(A("input", Te({ id: c(p) }, f.$attrs, {
|
|
2841
2954
|
ref_key: "input",
|
|
2842
2955
|
ref: u,
|
|
2843
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
2956
|
+
"onUpdate:modelValue": h[0] || (h[0] = (b) => n.value = b),
|
|
2844
2957
|
class: ["w-full border px-2 py-1 outline-none transition-background-color,border-color,color", [c(s), c(i), c(l).class, c(o).base]],
|
|
2845
2958
|
style: [c(l).style],
|
|
2846
|
-
placeholder:
|
|
2959
|
+
placeholder: f.placeholder,
|
|
2847
2960
|
type: r.password ? "password" : "text"
|
|
2848
|
-
}), null, 16,
|
|
2849
|
-
[
|
|
2961
|
+
}), null, 16, Qn), [
|
|
2962
|
+
[Kt, n.value]
|
|
2850
2963
|
])
|
|
2851
2964
|
]));
|
|
2852
2965
|
}
|
|
2853
|
-
}),
|
|
2966
|
+
}), ta = { class: "flex gap-2" }, Xa = /* @__PURE__ */ T({
|
|
2854
2967
|
__name: "PinInput",
|
|
2855
2968
|
props: {
|
|
2856
2969
|
modelValue: {},
|
|
@@ -2859,7 +2972,7 @@ const Pn = {
|
|
|
2859
2972
|
password: { type: Boolean }
|
|
2860
2973
|
},
|
|
2861
2974
|
setup(e) {
|
|
2862
|
-
const t = e, r =
|
|
2975
|
+
const t = e, r = g([]);
|
|
2863
2976
|
function n(a) {
|
|
2864
2977
|
a.preventDefault(), a.stopPropagation();
|
|
2865
2978
|
const s = r.value.findIndex((l) => l.el === a.target), i = a.target.value ?? "";
|
|
@@ -2874,8 +2987,8 @@ const Pn = {
|
|
|
2874
2987
|
const i = r.value.findIndex((l) => l.el === a.target);
|
|
2875
2988
|
i !== 0 && (r.value[i - 1].el.focus(), r.value[i - 1].el.select(), s || (r.value[i - 1].el.value = ""));
|
|
2876
2989
|
}
|
|
2877
|
-
return (a, s) => (v(), w("div",
|
|
2878
|
-
(v(!0), w(
|
|
2990
|
+
return (a, s) => (v(), w("div", ta, [
|
|
2991
|
+
(v(!0), w(oe, null, Se(t.length, (i) => (v(), Y(ea, {
|
|
2879
2992
|
ref_for: !0,
|
|
2880
2993
|
ref_key: "inputs",
|
|
2881
2994
|
ref: r,
|
|
@@ -2884,12 +2997,12 @@ const Pn = {
|
|
|
2884
2997
|
style: { padding: "0" },
|
|
2885
2998
|
password: t.password,
|
|
2886
2999
|
onPointerup: s[0] || (s[0] = (l) => l.target.select()),
|
|
2887
|
-
onInput:
|
|
2888
|
-
onKeydown:
|
|
3000
|
+
onInput: St(n, ["stop", "prevent"]),
|
|
3001
|
+
onKeydown: Zt(o, ["backspace"])
|
|
2889
3002
|
}, null, 8, ["password"]))), 128))
|
|
2890
3003
|
]));
|
|
2891
3004
|
}
|
|
2892
|
-
}),
|
|
3005
|
+
}), Ya = /* @__PURE__ */ T({
|
|
2893
3006
|
__name: "Progress",
|
|
2894
3007
|
props: {
|
|
2895
3008
|
value: { default: 0 },
|
|
@@ -2921,10 +3034,10 @@ const Pn = {
|
|
|
2921
3034
|
case "error":
|
|
2922
3035
|
return "bg-error-containerl";
|
|
2923
3036
|
}
|
|
2924
|
-
}), o =
|
|
3037
|
+
}), o = ie(t);
|
|
2925
3038
|
return (a, s) => (v(), w("div", {
|
|
2926
3039
|
class: k(["relative w-full self-center overflow-hidden bg-surface-high transition-background-color,border-color,color", [c(r), c(o).class]]),
|
|
2927
|
-
style:
|
|
3040
|
+
style: I([c(o).style])
|
|
2928
3041
|
}, [
|
|
2929
3042
|
a.loading ? (v(), w("div", {
|
|
2930
3043
|
key: 1,
|
|
@@ -2932,83 +3045,83 @@ const Pn = {
|
|
|
2932
3045
|
}, null, 2)) : (v(), w("div", {
|
|
2933
3046
|
key: 0,
|
|
2934
3047
|
class: k(["h-full", [c(n)]]),
|
|
2935
|
-
style:
|
|
3048
|
+
style: I([{
|
|
2936
3049
|
width: `${(Number(a.value) - Number(a.min)) / (Number(a.max) - Number(a.min)) * 100}%`
|
|
2937
3050
|
}])
|
|
2938
3051
|
}, null, 6))
|
|
2939
3052
|
], 6));
|
|
2940
3053
|
}
|
|
2941
|
-
}),
|
|
3054
|
+
}), qa = {
|
|
2942
3055
|
primary: ["#e5f7ff", "#d3ebfa", "#a9d4f1", "#7cbde9", "#57a9e0", "#3f9cdc", "#3096dc", "#1f82c4", "#0f73b0", "#00649c", "#082f49"],
|
|
2943
3056
|
secondary: ["#e9fbf0", "#dcf1e3", "#badfc7", "#96cea9", "#77bf90", "#63b580", "#58b077", "#479a64", "#3b8a58", "#2c7749", "#022c22"],
|
|
2944
3057
|
tertiary: ["#fff7e1", "#ffedcd", "#fcd99e", "#f9c46b", "#f7b23f", "#f6a724", "#f5a113", "#da8c04", "#c37d00", "#aa6a00", "#572508"],
|
|
2945
3058
|
error: ["#ffeaea", "#fcd5d5", "#f2a8a9", "#ea7a7a", "#e25353", "#de3939", "#dd2b2b", "#c41e1f", "#af171a", "#9a0913", "#450a0a"],
|
|
2946
3059
|
surface: ["#fefefe", "#fafafa", "#f2f2f2", "#e8e8e8", "#c6c6c6", "#737373", "#525252", "#343434", "#262626", "#171717", "#121212"]
|
|
2947
|
-
},
|
|
2948
|
-
primary:
|
|
2949
|
-
secondary:
|
|
2950
|
-
tertiary:
|
|
2951
|
-
error:
|
|
2952
|
-
surface:
|
|
2953
|
-
}),
|
|
2954
|
-
function
|
|
2955
|
-
return
|
|
2956
|
-
}
|
|
2957
|
-
class
|
|
3060
|
+
}, ra = g("#3F9CDC"), na = g("#5999A6"), aa = g("#F76C22"), oa = g("#F95858"), sa = g("#121212"), Ft = hn("default", {
|
|
3061
|
+
primary: ra,
|
|
3062
|
+
secondary: na,
|
|
3063
|
+
tertiary: aa,
|
|
3064
|
+
error: oa,
|
|
3065
|
+
surface: sa
|
|
3066
|
+
}), Ua = Symbol("Notifications"), Lt = Qt([]);
|
|
3067
|
+
function la() {
|
|
3068
|
+
return Lt;
|
|
3069
|
+
}
|
|
3070
|
+
class Ga {
|
|
2958
3071
|
static show(t) {
|
|
2959
|
-
t.hash = Math.random().toString(36),
|
|
3072
|
+
t.hash = Math.random().toString(36), Lt.push(t);
|
|
2960
3073
|
}
|
|
2961
3074
|
}
|
|
2962
|
-
const
|
|
2963
|
-
function
|
|
2964
|
-
const t =
|
|
2965
|
-
return
|
|
3075
|
+
const Wt = Symbol("tabCurrent"), jt = Symbol("direction"), Ja = Symbol("tabValueList"), Xt = Symbol("childrenElementMapSymbol"), ut = [0.98, 0.96, 0.9, 0.8, 0.6, 0.55, 0.5, 0.3, 0.28, 0.2, 0.08];
|
|
3076
|
+
function ia(e) {
|
|
3077
|
+
const t = _(e).toHsl().l;
|
|
3078
|
+
return ut.reduce(
|
|
2966
3079
|
(r, n) => Math.abs(n - t) < Math.abs(r - t) ? n : r
|
|
2967
3080
|
);
|
|
2968
3081
|
}
|
|
2969
|
-
function
|
|
2970
|
-
const r =
|
|
2971
|
-
const i =
|
|
3082
|
+
function ua(e, t = ut) {
|
|
3083
|
+
const r = _(e), n = ia(r), o = t.findIndex((s) => s === n), a = t.map((s) => {
|
|
3084
|
+
const i = _({ h: r.toHsl().h, s: r.toHsl().s, l: s });
|
|
2972
3085
|
return i.saturate(0 * 100), i;
|
|
2973
3086
|
});
|
|
2974
3087
|
return { baseColorIndex: o, colors: a.map((s) => s.toHexString()) };
|
|
2975
3088
|
}
|
|
2976
|
-
function
|
|
2977
|
-
return
|
|
3089
|
+
function Ee(e, t = ut) {
|
|
3090
|
+
return ua(e, t).colors;
|
|
2978
3091
|
}
|
|
2979
|
-
const
|
|
3092
|
+
const Ka = /* @__PURE__ */ T({
|
|
2980
3093
|
__name: "RokuProvider",
|
|
2981
3094
|
props: {
|
|
2982
3095
|
is: { default: "div" },
|
|
2983
3096
|
theme: { default: "default" },
|
|
2984
3097
|
themes: { default: () => ({
|
|
2985
|
-
default:
|
|
3098
|
+
default: Ft.value
|
|
2986
3099
|
}) }
|
|
2987
3100
|
},
|
|
2988
3101
|
setup(e) {
|
|
2989
|
-
const t = e, r = m(() => t.themes[t.theme]), n =
|
|
2990
|
-
|
|
2991
|
-
if (!
|
|
3102
|
+
const t = e, r = m(() => t.themes[t.theme]), n = vn(), o = Nr();
|
|
3103
|
+
be(() => {
|
|
3104
|
+
if (!le)
|
|
2992
3105
|
return "dark";
|
|
2993
3106
|
n.value === "dark" ? document.documentElement.dataset.scheme = "dark" : n.value === "light" ? document.documentElement.dataset.scheme = "light" : o.value === "dark" ? document.documentElement.dataset.scheme = "dark" : document.documentElement.dataset.scheme = "light", localStorage.setItem("scheme", document.documentElement.dataset.scheme);
|
|
2994
|
-
}),
|
|
2995
|
-
const a = m(() =>
|
|
2996
|
-
return
|
|
2997
|
-
style:
|
|
3107
|
+
}), Oe(mn, n);
|
|
3108
|
+
const a = m(() => Bt(r.value));
|
|
3109
|
+
return Oe("currentThemeData", m(() => r.value)), (s, i) => (v(), Y(Ce(s.is), {
|
|
3110
|
+
style: I([
|
|
2998
3111
|
c(a)
|
|
2999
3112
|
]),
|
|
3000
3113
|
class: "text-surface-on transition-background-color,border-color,color"
|
|
3001
3114
|
}, {
|
|
3002
|
-
default:
|
|
3003
|
-
|
|
3115
|
+
default: U(() => [
|
|
3116
|
+
C(s.$slots, "default")
|
|
3004
3117
|
]),
|
|
3005
3118
|
_: 3
|
|
3006
3119
|
}, 8, ["style"]));
|
|
3007
3120
|
}
|
|
3008
|
-
}),
|
|
3121
|
+
}), ca = ["id"], da = ["for"], fa = ["for"], pa = /* @__PURE__ */ T({
|
|
3009
3122
|
inheritAttrs: !1,
|
|
3010
3123
|
__name: "Switch",
|
|
3011
|
-
props: /* @__PURE__ */
|
|
3124
|
+
props: /* @__PURE__ */ K({
|
|
3012
3125
|
size: { default: "md" },
|
|
3013
3126
|
animate: { type: Boolean, default: !0 },
|
|
3014
3127
|
options: {},
|
|
@@ -3026,9 +3139,9 @@ const Da = /* @__PURE__ */ R({
|
|
|
3026
3139
|
}),
|
|
3027
3140
|
emits: ["update:modelValue"],
|
|
3028
3141
|
setup(e) {
|
|
3029
|
-
const t = e, r =
|
|
3142
|
+
const t = e, r = ee(e, "modelValue");
|
|
3030
3143
|
t.value && (r.value = t.value);
|
|
3031
|
-
const n =
|
|
3144
|
+
const n = g(null), o = g(!1), a = m(() => {
|
|
3032
3145
|
switch (t.size) {
|
|
3033
3146
|
case "sm":
|
|
3034
3147
|
return {
|
|
@@ -3061,7 +3174,7 @@ const Da = /* @__PURE__ */ R({
|
|
|
3061
3174
|
} : {
|
|
3062
3175
|
indicator: "",
|
|
3063
3176
|
progress: ""
|
|
3064
|
-
}), i =
|
|
3177
|
+
}), i = at(t), l = m(() => {
|
|
3065
3178
|
let d = "bg-primary-container";
|
|
3066
3179
|
switch (t.color) {
|
|
3067
3180
|
case "secondary":
|
|
@@ -3078,41 +3191,41 @@ const Da = /* @__PURE__ */ R({
|
|
|
3078
3191
|
wrapper: r.value ? `border border-transparent ${d}` : "bg-surface-border-low border border-surface-border-low",
|
|
3079
3192
|
indicator: t.disabled ? "bg-surface-high" : "bg-white text-primary-container"
|
|
3080
3193
|
};
|
|
3081
|
-
}), u =
|
|
3082
|
-
return (d,
|
|
3194
|
+
}), u = ie(t);
|
|
3195
|
+
return (d, p) => (v(), w("div", {
|
|
3083
3196
|
role: "switch",
|
|
3084
3197
|
class: k(["relative flex items-center gap-2", {
|
|
3085
3198
|
"pointer-events-none filter-grayscale op-60": t.disabled
|
|
3086
3199
|
}])
|
|
3087
3200
|
}, [
|
|
3088
|
-
|
|
3201
|
+
je(A("input", Te({
|
|
3089
3202
|
id: c(i),
|
|
3090
|
-
"onUpdate:modelValue":
|
|
3203
|
+
"onUpdate:modelValue": p[0] || (p[0] = (f) => r.value = f)
|
|
3091
3204
|
}, d.$attrs, {
|
|
3092
3205
|
class: "hidden",
|
|
3093
3206
|
type: "checkbox"
|
|
3094
|
-
}), null, 16,
|
|
3095
|
-
[
|
|
3207
|
+
}), null, 16, ca), [
|
|
3208
|
+
[er, r.value]
|
|
3096
3209
|
]),
|
|
3097
|
-
|
|
3210
|
+
A("label", {
|
|
3098
3211
|
class: "leading-0 cursor-pointer!",
|
|
3099
3212
|
for: c(i)
|
|
3100
3213
|
}, [
|
|
3101
|
-
|
|
3214
|
+
A("div", {
|
|
3102
3215
|
ref_key: "wrapper",
|
|
3103
3216
|
ref: n,
|
|
3104
3217
|
class: k([[c(a).wrapper, c(l).wrapper, c(u).class], "relative inline-block transition-all"]),
|
|
3105
|
-
style:
|
|
3106
|
-
onPointerdown:
|
|
3107
|
-
onPointerup:
|
|
3108
|
-
onPointerleave:
|
|
3109
|
-
onPointerenter:
|
|
3218
|
+
style: I([c(u).style]),
|
|
3219
|
+
onPointerdown: p[1] || (p[1] = (f) => o.value = !0),
|
|
3220
|
+
onPointerup: p[2] || (p[2] = (f) => o.value = !1),
|
|
3221
|
+
onPointerleave: p[3] || (p[3] = (f) => o.value = !1),
|
|
3222
|
+
onPointerenter: p[4] || (p[4] = (f) => f.buttons === 1 && (o.value = !0))
|
|
3110
3223
|
}, [
|
|
3111
|
-
|
|
3224
|
+
A("div", {
|
|
3112
3225
|
class: k(["absolute top-50% -translate-y-50%", [c(a).indicator, c(l).indicator, c(s).indicator, r.value ? c(a).active : c(a).inactive, c(u).class]]),
|
|
3113
|
-
style:
|
|
3226
|
+
style: I([c(u).style])
|
|
3114
3227
|
}, null, 6),
|
|
3115
|
-
|
|
3228
|
+
ae(tt, {
|
|
3116
3229
|
"enter-active-class": "transition-all",
|
|
3117
3230
|
"enter-from-class": "opacity-0",
|
|
3118
3231
|
"enter-to-class": "opacity-100",
|
|
@@ -3121,7 +3234,7 @@ const Da = /* @__PURE__ */ R({
|
|
|
3121
3234
|
"leave-to-class": "opacity-0",
|
|
3122
3235
|
mode: "out-in"
|
|
3123
3236
|
}, {
|
|
3124
|
-
default:
|
|
3237
|
+
default: U(() => [
|
|
3125
3238
|
r.value ? (v(), w("i", {
|
|
3126
3239
|
key: "on",
|
|
3127
3240
|
class: k(["absolute top-1/2 -translate-y-50%", [c(a).icon, {
|
|
@@ -3141,40 +3254,40 @@ const Da = /* @__PURE__ */ R({
|
|
|
3141
3254
|
_: 1
|
|
3142
3255
|
})
|
|
3143
3256
|
], 38)
|
|
3144
|
-
], 8,
|
|
3257
|
+
], 8, da),
|
|
3145
3258
|
d.label ? (v(), w("label", {
|
|
3146
3259
|
key: 0,
|
|
3147
3260
|
for: c(i)
|
|
3148
|
-
},
|
|
3261
|
+
}, ne(d.label), 9, fa)) : B("", !0)
|
|
3149
3262
|
], 2));
|
|
3150
3263
|
}
|
|
3151
|
-
}),
|
|
3264
|
+
}), ha = { class: "dark:hidden" }, ma = { class: "light:hidden" }, Za = /* @__PURE__ */ T({
|
|
3152
3265
|
__name: "SchemeSwitch",
|
|
3153
3266
|
setup(e) {
|
|
3154
|
-
const t =
|
|
3155
|
-
|
|
3156
|
-
|
|
3267
|
+
const t = g(!1);
|
|
3268
|
+
J([t], () => {
|
|
3269
|
+
le && (t.value === !0 ? (document.documentElement.setAttribute("data-scheme", "dark"), localStorage.setItem("scheme", "dark")) : t.value === !1 && (document.documentElement.setAttribute("data-scheme", "light"), localStorage.setItem("scheme", "light")));
|
|
3157
3270
|
});
|
|
3158
|
-
const r =
|
|
3159
|
-
return
|
|
3160
|
-
|
|
3161
|
-
}),
|
|
3271
|
+
const r = g(!0), n = g(!1);
|
|
3272
|
+
return fe(() => {
|
|
3273
|
+
le && (t.value = localStorage.getItem("scheme") === "dark"), r.value = !1;
|
|
3274
|
+
}), We(() => {
|
|
3162
3275
|
n.value = !0;
|
|
3163
3276
|
}), (o, a) => {
|
|
3164
|
-
const s =
|
|
3165
|
-
return v(), w(
|
|
3166
|
-
|
|
3277
|
+
const s = pa;
|
|
3278
|
+
return v(), w(oe, null, [
|
|
3279
|
+
A("div", {
|
|
3167
3280
|
class: k({ hidden: !c(r) })
|
|
3168
3281
|
}, [
|
|
3169
|
-
|
|
3170
|
-
|
|
3282
|
+
A("div", ha, [
|
|
3283
|
+
ae(s, {
|
|
3171
3284
|
value: !1,
|
|
3172
3285
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
3173
3286
|
"off-icon": "i-line-md-sunny-outline-twotone-loop"
|
|
3174
3287
|
})
|
|
3175
3288
|
]),
|
|
3176
|
-
|
|
3177
|
-
|
|
3289
|
+
A("div", ma, [
|
|
3290
|
+
ae(s, {
|
|
3178
3291
|
value: !0,
|
|
3179
3292
|
color: "secondary",
|
|
3180
3293
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
@@ -3182,12 +3295,12 @@ const Da = /* @__PURE__ */ R({
|
|
|
3182
3295
|
})
|
|
3183
3296
|
])
|
|
3184
3297
|
], 2),
|
|
3185
|
-
|
|
3298
|
+
A("div", {
|
|
3186
3299
|
class: k({ hidden: c(r) })
|
|
3187
3300
|
}, [
|
|
3188
|
-
|
|
3301
|
+
ae(s, {
|
|
3189
3302
|
modelValue: c(t),
|
|
3190
|
-
"onUpdate:modelValue": a[0] || (a[0] = (i) =>
|
|
3303
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => tr(t) ? t.value = i : null),
|
|
3191
3304
|
animate: c(n),
|
|
3192
3305
|
color: "secondary",
|
|
3193
3306
|
"on-icon": "i-line-md-moon-twotone-alt-loop",
|
|
@@ -3197,62 +3310,81 @@ const Da = /* @__PURE__ */ R({
|
|
|
3197
3310
|
], 64);
|
|
3198
3311
|
};
|
|
3199
3312
|
}
|
|
3200
|
-
}),
|
|
3313
|
+
}), va = { class: "w-full flex items-center" }, ba = ["placeholder", "readonly", "value", "aria-label"], ga = /* @__PURE__ */ A("i", { class: "i-tabler-chevron-down pointer-events-none absolute right-2" }, null, -1), ya = {
|
|
3314
|
+
key: 0,
|
|
3315
|
+
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
3316
|
+
}, wa = ["onPointerdown", "onHover"], _a = { key: 0 }, xa = /* @__PURE__ */ A("i", { class: "i-tabler-check h-3 w-3" }, null, -1), ka = [
|
|
3317
|
+
xa
|
|
3318
|
+
], Sa = {
|
|
3201
3319
|
key: 0,
|
|
3202
3320
|
class: "flex cursor-default items-center justify-between gap-2 rounded p-1 px-2"
|
|
3203
|
-
},
|
|
3204
|
-
pa
|
|
3205
|
-
], Wa = /* @__PURE__ */ R({
|
|
3321
|
+
}, Qa = /* @__PURE__ */ T({
|
|
3206
3322
|
__name: "Select",
|
|
3207
|
-
props: /* @__PURE__ */
|
|
3323
|
+
props: /* @__PURE__ */ K({
|
|
3208
3324
|
ariaLabel: {},
|
|
3209
3325
|
options: { default() {
|
|
3210
3326
|
return [];
|
|
3211
3327
|
} },
|
|
3212
3328
|
size: { default: "md" },
|
|
3213
3329
|
noneText: { default: "No options" },
|
|
3330
|
+
notFoundText: { default: "Not found" },
|
|
3214
3331
|
rounded: { default: "md" },
|
|
3215
|
-
placeholder: { default: "" }
|
|
3332
|
+
placeholder: { default: "" },
|
|
3333
|
+
searchable: { type: Boolean, default: !1 },
|
|
3334
|
+
filter: { type: Function, default: (e, t) => e.includes(t) }
|
|
3216
3335
|
}, {
|
|
3217
3336
|
modelValue: { default: void 0 },
|
|
3218
3337
|
modelModifiers: {}
|
|
3219
3338
|
}),
|
|
3220
|
-
emits: /* @__PURE__ */
|
|
3339
|
+
emits: /* @__PURE__ */ K(["change", "input"], ["update:modelValue"]),
|
|
3221
3340
|
setup(e, { emit: t }) {
|
|
3222
|
-
const r = e, n = t, o =
|
|
3223
|
-
|
|
3224
|
-
l.value
|
|
3225
|
-
})
|
|
3226
|
-
|
|
3227
|
-
|
|
3341
|
+
const r = e, n = t, o = ie(r), a = ee(e, "modelValue"), s = g(null), i = g(null), l = g(!1);
|
|
3342
|
+
gr(i, () => {
|
|
3343
|
+
l.value = !1;
|
|
3344
|
+
});
|
|
3345
|
+
const u = g(-1), d = g(-1);
|
|
3346
|
+
be(() => {
|
|
3347
|
+
l.value || (d.value = -1);
|
|
3348
|
+
}), J(a, () => {
|
|
3228
3349
|
n("change", a.value);
|
|
3229
3350
|
});
|
|
3230
|
-
const p =
|
|
3231
|
-
function
|
|
3232
|
-
|
|
3233
|
-
|
|
3351
|
+
const p = m(() => a.value), f = m(() => h(p.value));
|
|
3352
|
+
function h(y) {
|
|
3353
|
+
return y ? typeof y == "string" || typeof y == "symbol" || typeof y == "number" ? String(y) : y.label ? y.label : y.id : "";
|
|
3354
|
+
}
|
|
3355
|
+
function b(y) {
|
|
3356
|
+
if (y)
|
|
3357
|
+
return typeof y == "string" || typeof y == "symbol" || typeof y == "number" ? y : y.id;
|
|
3234
3358
|
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3359
|
+
const x = g("");
|
|
3360
|
+
J(f, () => {
|
|
3361
|
+
x.value = f.value;
|
|
3362
|
+
}), be(() => {
|
|
3363
|
+
l.value || (x.value = f.value);
|
|
3364
|
+
});
|
|
3365
|
+
function E(y) {
|
|
3366
|
+
l.value = !0;
|
|
3367
|
+
const O = y.target;
|
|
3368
|
+
x.value = O.value, n("input", x.value);
|
|
3238
3369
|
}
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3370
|
+
const V = m(() => r.searchable && x.value !== f.value ? r.options.filter((y) => r.filter(h(y), x.value)) : r.options);
|
|
3371
|
+
ve("ArrowDown", (y) => {
|
|
3372
|
+
l.value && (y.preventDefault(), d.value = (d.value + 1) % r.options.length);
|
|
3373
|
+
}), ve("ArrowUp", (y) => {
|
|
3374
|
+
l.value && (y.preventDefault(), d.value = (d.value - 1 + r.options.length) % r.options.length);
|
|
3375
|
+
}), ve("Enter", () => {
|
|
3376
|
+
l.value && d.value !== -1 && (a.value = V.value[d.value], s.value.focus(), l.value = !1);
|
|
3245
3377
|
});
|
|
3246
|
-
function
|
|
3247
|
-
if (!l.value) {
|
|
3378
|
+
function D(y) {
|
|
3379
|
+
if (s.value.focus(), !l.value) {
|
|
3248
3380
|
l.value = !0;
|
|
3249
3381
|
return;
|
|
3250
3382
|
}
|
|
3251
|
-
a.value =
|
|
3383
|
+
a.value = y, l.value = !1;
|
|
3252
3384
|
}
|
|
3253
|
-
const
|
|
3385
|
+
const W = m(() => ({
|
|
3254
3386
|
input: "container-base focus:border-primary-container"
|
|
3255
|
-
})),
|
|
3387
|
+
})), z = m(() => {
|
|
3256
3388
|
switch (r.size) {
|
|
3257
3389
|
case "sm":
|
|
3258
3390
|
return {
|
|
@@ -3270,54 +3402,75 @@ const Da = /* @__PURE__ */ R({
|
|
|
3270
3402
|
dropdown: "text-base children:py-1"
|
|
3271
3403
|
};
|
|
3272
3404
|
}
|
|
3273
|
-
}),
|
|
3274
|
-
|
|
3405
|
+
}), $ = g(null), { height: R } = Ve($), { bottom: F } = Ve(s), P = m(() => l.value && le ? R.value === 0 ? !1 : document.documentElement.clientHeight - F.value > R.value : !1);
|
|
3406
|
+
function L(y, O) {
|
|
3407
|
+
return O ? typeof y == "string" || typeof y == "symbol" || typeof y == "number" ? y === O : typeof O == "string" || typeof O == "symbol" || typeof O == "number" ? !1 : y.id === O.id : !1;
|
|
3408
|
+
}
|
|
3409
|
+
const S = m(() => r.searchable ? "cursor-text" : "cursor-pointer");
|
|
3410
|
+
return (y, O) => (v(), w("div", {
|
|
3275
3411
|
ref_key: "wrapperRef",
|
|
3276
3412
|
ref: i,
|
|
3277
3413
|
class: "r-select-wrapper relative"
|
|
3278
3414
|
}, [
|
|
3279
|
-
|
|
3280
|
-
|
|
3415
|
+
A("div", va, [
|
|
3416
|
+
A("input", {
|
|
3281
3417
|
ref_key: "inputRef",
|
|
3282
3418
|
ref: s,
|
|
3283
|
-
class: k([[c(
|
|
3284
|
-
placeholder:
|
|
3285
|
-
style:
|
|
3286
|
-
readonly:
|
|
3287
|
-
value: c(
|
|
3288
|
-
"aria-label":
|
|
3419
|
+
class: k([[c(W).input, c(z).wrapper, c(o).class, c(S)], "r-select-input border outline-none outline-none focus-visible:outline-2"]),
|
|
3420
|
+
placeholder: y.placeholder,
|
|
3421
|
+
style: I([c(o).style]),
|
|
3422
|
+
readonly: !y.searchable,
|
|
3423
|
+
value: c(x),
|
|
3424
|
+
"aria-label": y.ariaLabel,
|
|
3289
3425
|
"aria-haspopup": "listbox",
|
|
3290
3426
|
autocomplete: "off",
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3427
|
+
onInput: E,
|
|
3428
|
+
onClick: O[0] || (O[0] = (ue) => l.value = !0)
|
|
3429
|
+
}, null, 46, ba),
|
|
3430
|
+
ga
|
|
3294
3431
|
]),
|
|
3295
3432
|
c(l) ? (v(), w("div", {
|
|
3296
3433
|
key: 0,
|
|
3297
3434
|
ref_key: "dropdownRef",
|
|
3298
|
-
ref:
|
|
3299
|
-
class: k(["absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1", [c(
|
|
3300
|
-
"bottom-10": !c(
|
|
3435
|
+
ref: $,
|
|
3436
|
+
class: k(["absolute z-10 mt-2 w-full flex-col overflow-hidden border container-base rounded p-1", [c(z).dropdown, {
|
|
3437
|
+
"bottom-10": !c(P)
|
|
3301
3438
|
}]])
|
|
3302
3439
|
}, [
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3440
|
+
y.options.length === 0 ? (v(), w("div", ya, [
|
|
3441
|
+
C(y.$slots, "none", {}, () => [
|
|
3442
|
+
He(ne(y.noneText), 1)
|
|
3443
|
+
])
|
|
3444
|
+
])) : (v(), w(oe, { key: 1 }, [
|
|
3445
|
+
(v(!0), w(oe, null, Se(c(V), (ue, pe) => (v(), w("div", {
|
|
3446
|
+
key: b(ue),
|
|
3447
|
+
class: k([{
|
|
3448
|
+
"hover:bg-surface-high border-transparent": c(d) !== pe,
|
|
3449
|
+
"container-filled-primary": c(d) === pe
|
|
3450
|
+
}, "flex cursor-pointer items-center justify-between gap-2 border rounded p-1 px-2"]),
|
|
3451
|
+
onPointerdown: (he) => D(ue),
|
|
3452
|
+
onHover: (he) => u.value = pe
|
|
3453
|
+
}, [
|
|
3454
|
+
C(y.$slots, "item", {
|
|
3455
|
+
data: ue,
|
|
3456
|
+
selected: L(ue, c(p))
|
|
3457
|
+
}, () => [
|
|
3458
|
+
He(ne(h(ue)), 1)
|
|
3459
|
+
]),
|
|
3460
|
+
L(ue, c(p)) ? (v(), w("div", _a, ka)) : B("", !0)
|
|
3461
|
+
], 42, wa))), 128)),
|
|
3462
|
+
y.searchable && c(V).length === 0 ? (v(), w("div", Sa, [
|
|
3463
|
+
C(y.$slots, "not-found", {}, () => [
|
|
3464
|
+
He(ne(y.notFoundText), 1)
|
|
3465
|
+
])
|
|
3466
|
+
])) : B("", !0)
|
|
3467
|
+
], 64))
|
|
3315
3468
|
], 2)) : B("", !0)
|
|
3316
3469
|
], 512));
|
|
3317
3470
|
}
|
|
3318
|
-
}),
|
|
3471
|
+
}), $a = { class: "relative inline-block w-full" }, eo = /* @__PURE__ */ T({
|
|
3319
3472
|
__name: "Slider",
|
|
3320
|
-
props: /* @__PURE__ */
|
|
3473
|
+
props: /* @__PURE__ */ K({
|
|
3321
3474
|
size: { default: "md" },
|
|
3322
3475
|
animate: { type: Boolean, default: !1 },
|
|
3323
3476
|
width: {},
|
|
@@ -3337,25 +3490,25 @@ const Da = /* @__PURE__ */ R({
|
|
|
3337
3490
|
emits: ["update:modelValue"],
|
|
3338
3491
|
setup(e) {
|
|
3339
3492
|
const t = e;
|
|
3340
|
-
function r(
|
|
3341
|
-
const
|
|
3342
|
-
for (let
|
|
3343
|
-
|
|
3344
|
-
return
|
|
3493
|
+
function r(R, F, P) {
|
|
3494
|
+
const L = [];
|
|
3495
|
+
for (let S = R; S <= F; S += P)
|
|
3496
|
+
L.push(S);
|
|
3497
|
+
return L[L.length - 1] !== F && L.push(F), L;
|
|
3345
3498
|
}
|
|
3346
|
-
function n(
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3349
|
-
const
|
|
3350
|
-
for (let
|
|
3351
|
-
|
|
3352
|
-
return
|
|
3499
|
+
function n(R, F) {
|
|
3500
|
+
const P = [];
|
|
3501
|
+
P.push(F[0]);
|
|
3502
|
+
const L = (F.length - 1) / (R - 1);
|
|
3503
|
+
for (let S = 1; S < R - 1; S++)
|
|
3504
|
+
P.push(F[Math.round(S * L)]);
|
|
3505
|
+
return P.push(F[F.length - 1]), P;
|
|
3353
3506
|
}
|
|
3354
|
-
const o = m(() => t.options ? t.options.length : t.tickNum ?? 0), a = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(o.value, a.value)), i =
|
|
3355
|
-
function d(
|
|
3356
|
-
return a.value.indexOf(
|
|
3507
|
+
const o = m(() => t.options ? t.options.length : t.tickNum ?? 0), a = m(() => t.options === void 0 ? r(t.min, t.max, t.step) : t.options), s = m(() => n(o.value, a.value)), i = ee(e, "modelValue"), l = m(() => a.value.length ?? 0), u = g(a.value.includes(i.value) ? a.value.indexOf(i.value) : 0);
|
|
3508
|
+
function d(R) {
|
|
3509
|
+
return a.value.indexOf(R);
|
|
3357
3510
|
}
|
|
3358
|
-
const
|
|
3511
|
+
const p = m(() => {
|
|
3359
3512
|
switch (t.color) {
|
|
3360
3513
|
case "primary":
|
|
3361
3514
|
return "bg-primary-containerl";
|
|
@@ -3366,7 +3519,7 @@ const Da = /* @__PURE__ */ R({
|
|
|
3366
3519
|
case "error":
|
|
3367
3520
|
return "bg-error-containerl";
|
|
3368
3521
|
}
|
|
3369
|
-
}),
|
|
3522
|
+
}), f = m(() => `dark:bg-white bg-${t.color}-containerl`), h = m(() => {
|
|
3370
3523
|
switch (t.color) {
|
|
3371
3524
|
case "primary":
|
|
3372
3525
|
return "dark:bg-primary-containerl bg-white";
|
|
@@ -3378,37 +3531,37 @@ const Da = /* @__PURE__ */ R({
|
|
|
3378
3531
|
return "dark:bg-error-containerl bg-white";
|
|
3379
3532
|
}
|
|
3380
3533
|
});
|
|
3381
|
-
|
|
3534
|
+
be(() => {
|
|
3382
3535
|
i.value = a.value[u.value];
|
|
3383
3536
|
});
|
|
3384
|
-
const
|
|
3385
|
-
function
|
|
3386
|
-
if (!
|
|
3537
|
+
const b = g(), x = g(), E = Ve(b), V = g(!1);
|
|
3538
|
+
function D(R) {
|
|
3539
|
+
if (!V.value)
|
|
3387
3540
|
return;
|
|
3388
|
-
if (!(
|
|
3389
|
-
|
|
3541
|
+
if (!(R.buttons === 1)) {
|
|
3542
|
+
V.value = !1;
|
|
3390
3543
|
return;
|
|
3391
3544
|
}
|
|
3392
|
-
|
|
3393
|
-
const { clientX:
|
|
3394
|
-
if (
|
|
3545
|
+
R.preventDefault(), R.stopPropagation();
|
|
3546
|
+
const { clientX: P } = R, L = E.left.value, y = E.right.value - L, O = Math.round((P - L) / y * (l.value - 1));
|
|
3547
|
+
if (O < 0) {
|
|
3395
3548
|
u.value = 0;
|
|
3396
3549
|
return;
|
|
3397
3550
|
}
|
|
3398
|
-
if (
|
|
3551
|
+
if (O > l.value - 1) {
|
|
3399
3552
|
u.value = l.value - 1;
|
|
3400
3553
|
return;
|
|
3401
3554
|
}
|
|
3402
|
-
u.value =
|
|
3555
|
+
u.value = O;
|
|
3403
3556
|
}
|
|
3404
|
-
|
|
3557
|
+
be(() => {
|
|
3405
3558
|
u.value = d(i.value);
|
|
3406
3559
|
});
|
|
3407
|
-
function
|
|
3408
|
-
|
|
3560
|
+
function W(R) {
|
|
3561
|
+
R.preventDefault(), R.stopPropagation(), V.value = !0, D(R);
|
|
3409
3562
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3563
|
+
H(b, "pointerdown", W), fe(() => {
|
|
3564
|
+
H(document, "pointermove", D), u.value = Math.max(0, d(i.value));
|
|
3412
3565
|
});
|
|
3413
3566
|
const z = m(() => {
|
|
3414
3567
|
switch (t.size) {
|
|
@@ -3450,86 +3603,86 @@ const Da = /* @__PURE__ */ R({
|
|
|
3450
3603
|
indicator: "",
|
|
3451
3604
|
progress: ""
|
|
3452
3605
|
});
|
|
3453
|
-
return (
|
|
3454
|
-
|
|
3606
|
+
return (R, F) => (v(), w("div", $a, [
|
|
3607
|
+
A("div", {
|
|
3455
3608
|
ref_key: "wrapper",
|
|
3456
|
-
ref:
|
|
3609
|
+
ref: b,
|
|
3457
3610
|
type: "size",
|
|
3458
3611
|
class: k(["w-full flex cursor-pointer items-center", c(z).wrapper]),
|
|
3459
|
-
onTouchmove: F[0] || (F[0] =
|
|
3612
|
+
onTouchmove: F[0] || (F[0] = St(() => {
|
|
3460
3613
|
}, ["prevent"]))
|
|
3461
3614
|
}, [
|
|
3462
|
-
|
|
3615
|
+
A("div", {
|
|
3463
3616
|
class: k(["w-full rounded-full bg-surface-3 transition-background-color,border-color,color dark:bg-surface-7", c(z).innerWrapper])
|
|
3464
3617
|
}, [
|
|
3465
|
-
|
|
3618
|
+
A("div", {
|
|
3466
3619
|
class: k(["relative flex", c(z).content]),
|
|
3467
|
-
style:
|
|
3620
|
+
style: I({
|
|
3468
3621
|
width: `${t.width}rem`,
|
|
3469
3622
|
minWidth: `${t.minWidth}rem`
|
|
3470
3623
|
})
|
|
3471
3624
|
}, [
|
|
3472
|
-
(v(!0), w(
|
|
3473
|
-
key:
|
|
3474
|
-
style:
|
|
3475
|
-
left: `${d(
|
|
3625
|
+
(v(!0), w(oe, null, Se(c(s), (P) => (v(), w("div", {
|
|
3626
|
+
key: P,
|
|
3627
|
+
style: I({
|
|
3628
|
+
left: `${d(P) / (c(l) - 1) * 100}%`
|
|
3476
3629
|
}),
|
|
3477
3630
|
class: k(["absolute top-50% rounded-full bg-surface-0", c(z).tick])
|
|
3478
3631
|
}, null, 6))), 128)),
|
|
3479
3632
|
c(u) !== -1 ? (v(), w("div", {
|
|
3480
3633
|
key: 0,
|
|
3481
3634
|
ref_key: "indicator",
|
|
3482
|
-
ref:
|
|
3483
|
-
class: k(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(z).indicator, c($).indicator, c(
|
|
3484
|
-
style:
|
|
3635
|
+
ref: x,
|
|
3636
|
+
class: k(["absolute top-50% cursor-pointer rounded-full transition-background-color,border-color,color", [c(z).indicator, c($).indicator, c(f)]]),
|
|
3637
|
+
style: I({
|
|
3485
3638
|
left: `${c(u) / (c(l) - 1) * 100}%`
|
|
3486
3639
|
})
|
|
3487
3640
|
}, [
|
|
3488
|
-
|
|
3641
|
+
A("div", {
|
|
3489
3642
|
class: k(["pointer-events-none absolute left-50% top-50% rounded-full transition-background-color,border-color,color", [c(z).indicatorInner, c(h)]])
|
|
3490
3643
|
}, null, 2)
|
|
3491
3644
|
], 6)) : B("", !0),
|
|
3492
|
-
|
|
3493
|
-
class: k(["pointer-events-none h-full rounded-full", [c(z).progress, c($).progress, c(
|
|
3494
|
-
style:
|
|
3645
|
+
A("div", {
|
|
3646
|
+
class: k(["pointer-events-none h-full rounded-full", [c(z).progress, c($).progress, c(p)]]),
|
|
3647
|
+
style: I({
|
|
3495
3648
|
width: `${c(u) / (c(l) - 1) * 100}%`
|
|
3496
3649
|
})
|
|
3497
3650
|
}, null, 6)
|
|
3498
3651
|
], 6)
|
|
3499
3652
|
], 2)
|
|
3500
3653
|
], 34),
|
|
3501
|
-
|
|
3654
|
+
A("div", {
|
|
3502
3655
|
class: "relative mx-1 h-1em text-xs text-surface-on-low",
|
|
3503
|
-
style:
|
|
3656
|
+
style: I({
|
|
3504
3657
|
width: `${t.width}rem`
|
|
3505
3658
|
})
|
|
3506
3659
|
}, [
|
|
3507
|
-
(v(!0), w(
|
|
3508
|
-
key:
|
|
3509
|
-
style:
|
|
3510
|
-
left: `${d(
|
|
3660
|
+
(v(!0), w(oe, null, Se(c(s), (P, L) => (v(), w("div", {
|
|
3661
|
+
key: L,
|
|
3662
|
+
style: I({
|
|
3663
|
+
left: `${d(P) / (c(l) - 1) * 100}%`
|
|
3511
3664
|
}),
|
|
3512
3665
|
class: k(["absolute w-auto flex rounded-full -translate-x-50%", c(z).tick])
|
|
3513
|
-
},
|
|
3666
|
+
}, ne(P), 7))), 128))
|
|
3514
3667
|
], 4)
|
|
3515
3668
|
]));
|
|
3516
3669
|
}
|
|
3517
|
-
}),
|
|
3670
|
+
}), Ma = { class: "h-full py-2" }, to = /* @__PURE__ */ T({
|
|
3518
3671
|
__name: "TabItem",
|
|
3519
3672
|
props: {
|
|
3520
3673
|
value: {},
|
|
3521
3674
|
color: { default: "primary" }
|
|
3522
3675
|
},
|
|
3523
3676
|
setup(e) {
|
|
3524
|
-
const t = e, r =
|
|
3677
|
+
const t = e, r = xe(Wt, g("")), n = g(null), o = m(() => r.value === t.value);
|
|
3525
3678
|
function a() {
|
|
3526
3679
|
r.value = t.value;
|
|
3527
3680
|
}
|
|
3528
|
-
const s =
|
|
3529
|
-
|
|
3681
|
+
const s = xe(Xt, /* @__PURE__ */ new Map());
|
|
3682
|
+
fe(() => {
|
|
3530
3683
|
s.set(t.value, n);
|
|
3531
3684
|
});
|
|
3532
|
-
const i =
|
|
3685
|
+
const i = xe(jt, m(() => "horizontal")), l = m(() => {
|
|
3533
3686
|
switch (i.value) {
|
|
3534
3687
|
case "horizontal":
|
|
3535
3688
|
return "flex-col rounded-tr-lg rounded-tl-lg";
|
|
@@ -3544,7 +3697,7 @@ const Da = /* @__PURE__ */ R({
|
|
|
3544
3697
|
return "absolute inset-0 right-100% h-full w-2px transition-background-color,border-color,color";
|
|
3545
3698
|
}
|
|
3546
3699
|
}), d = m(() => o.value ? "bg-primary-containerl" : "bg-surface-lowest");
|
|
3547
|
-
return (
|
|
3700
|
+
return (p, f) => (v(), w("button", {
|
|
3548
3701
|
ref_key: "tabRef",
|
|
3549
3702
|
ref: n,
|
|
3550
3703
|
type: "button",
|
|
@@ -3558,14 +3711,14 @@ const Da = /* @__PURE__ */ R({
|
|
|
3558
3711
|
key: 1,
|
|
3559
3712
|
class: k([c(u), c(d)])
|
|
3560
3713
|
}, null, 2)),
|
|
3561
|
-
|
|
3562
|
-
|
|
3714
|
+
A("div", Ma, [
|
|
3715
|
+
C(p.$slots, "default")
|
|
3563
3716
|
])
|
|
3564
3717
|
], 2));
|
|
3565
3718
|
}
|
|
3566
|
-
}),
|
|
3719
|
+
}), ro = /* @__PURE__ */ T({
|
|
3567
3720
|
__name: "Tabs",
|
|
3568
|
-
props: /* @__PURE__ */
|
|
3721
|
+
props: /* @__PURE__ */ K({
|
|
3569
3722
|
defaultValue: {},
|
|
3570
3723
|
direction: { default: "horizontal" }
|
|
3571
3724
|
}, {
|
|
@@ -3574,65 +3727,65 @@ const Da = /* @__PURE__ */ R({
|
|
|
3574
3727
|
}),
|
|
3575
3728
|
emits: ["update:modelValue"],
|
|
3576
3729
|
setup(e) {
|
|
3577
|
-
const t = e, r =
|
|
3578
|
-
var
|
|
3579
|
-
const u = (
|
|
3580
|
-
return (u == null ? void 0 : u.flatMap((
|
|
3730
|
+
const t = e, r = kt(), n = m(() => {
|
|
3731
|
+
var p;
|
|
3732
|
+
const u = (p = r.default) == null ? void 0 : p.call(r);
|
|
3733
|
+
return (u == null ? void 0 : u.flatMap((f) => f.type === oe ? f.children : f).filter((f) => {
|
|
3581
3734
|
var h;
|
|
3582
|
-
return ((h =
|
|
3583
|
-
}).map((
|
|
3584
|
-
}), o =
|
|
3735
|
+
return ((h = f == null ? void 0 : f.props) == null ? void 0 : h.value) !== void 0;
|
|
3736
|
+
}).map((f) => f.props.value)) ?? [];
|
|
3737
|
+
}), o = ee(e, "modelValue");
|
|
3585
3738
|
!o.value && n.value.length > 0 && (o.value = n.value[0]);
|
|
3586
|
-
const a =
|
|
3587
|
-
|
|
3739
|
+
const a = g(null);
|
|
3740
|
+
fe(() => {
|
|
3588
3741
|
t.defaultValue && (o.value = t.defaultValue);
|
|
3589
|
-
}),
|
|
3742
|
+
}), Oe(Wt, o);
|
|
3590
3743
|
const s = m(() => t.direction);
|
|
3591
|
-
|
|
3744
|
+
Oe(jt, s);
|
|
3592
3745
|
const i = /* @__PURE__ */ new Map();
|
|
3593
|
-
|
|
3746
|
+
Oe(Xt, i), ve("ArrowLeft", (u) => {
|
|
3594
3747
|
var h;
|
|
3595
3748
|
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "horizontal"))
|
|
3596
3749
|
return;
|
|
3597
|
-
const d = o.value ? n.value.indexOf(o.value) : 0,
|
|
3598
|
-
o.value =
|
|
3599
|
-
const
|
|
3600
|
-
if (
|
|
3601
|
-
const
|
|
3602
|
-
|
|
3750
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, p = d > 0 ? n.value[d - 1] : n.value[n.value.length - 1];
|
|
3751
|
+
o.value = p;
|
|
3752
|
+
const f = i.get(p);
|
|
3753
|
+
if (f) {
|
|
3754
|
+
const b = f.value;
|
|
3755
|
+
b && b.focus();
|
|
3603
3756
|
}
|
|
3604
|
-
}),
|
|
3757
|
+
}), ve("ArrowRight", (u) => {
|
|
3605
3758
|
var h;
|
|
3606
3759
|
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "horizontal"))
|
|
3607
3760
|
return;
|
|
3608
|
-
const d = o.value ? n.value.indexOf(o.value) : 0,
|
|
3609
|
-
o.value =
|
|
3610
|
-
const
|
|
3611
|
-
if (
|
|
3612
|
-
const
|
|
3613
|
-
|
|
3761
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, p = d < n.value.length - 1 ? o.value = n.value[d + 1] : o.value = n.value[0];
|
|
3762
|
+
o.value = p;
|
|
3763
|
+
const f = i.get(p);
|
|
3764
|
+
if (f) {
|
|
3765
|
+
const b = f.value;
|
|
3766
|
+
b && b.focus();
|
|
3614
3767
|
}
|
|
3615
|
-
}),
|
|
3768
|
+
}), ve("ArrowUp", (u) => {
|
|
3616
3769
|
var h;
|
|
3617
3770
|
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "vertical"))
|
|
3618
3771
|
return;
|
|
3619
|
-
const d = o.value ? n.value.indexOf(o.value) : 0,
|
|
3620
|
-
o.value =
|
|
3621
|
-
const
|
|
3622
|
-
if (
|
|
3623
|
-
const
|
|
3624
|
-
|
|
3772
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, p = d > 0 ? n.value[d - 1] : n.value[n.value.length - 1];
|
|
3773
|
+
o.value = p;
|
|
3774
|
+
const f = i.get(p);
|
|
3775
|
+
if (f) {
|
|
3776
|
+
const b = f.value;
|
|
3777
|
+
b && b.focus();
|
|
3625
3778
|
}
|
|
3626
|
-
}),
|
|
3779
|
+
}), ve("ArrowDown", (u) => {
|
|
3627
3780
|
var h;
|
|
3628
3781
|
if (!((h = a.value) != null && h.contains(document.activeElement)) || (u.preventDefault(), t.direction !== "vertical"))
|
|
3629
3782
|
return;
|
|
3630
|
-
const d = o.value ? n.value.indexOf(o.value) : 0,
|
|
3631
|
-
o.value =
|
|
3632
|
-
const
|
|
3633
|
-
if (
|
|
3634
|
-
const
|
|
3635
|
-
|
|
3783
|
+
const d = o.value ? n.value.indexOf(o.value) : 0, p = d < n.value.length - 1 ? n.value[d + 1] : n.value[0];
|
|
3784
|
+
o.value = p;
|
|
3785
|
+
const f = i.get(p);
|
|
3786
|
+
if (f) {
|
|
3787
|
+
const b = f.value;
|
|
3788
|
+
b && b.focus();
|
|
3636
3789
|
}
|
|
3637
3790
|
});
|
|
3638
3791
|
const l = m(() => {
|
|
@@ -3641,6 +3794,8 @@ const Da = /* @__PURE__ */ R({
|
|
|
3641
3794
|
return "flex-row";
|
|
3642
3795
|
case "vertical":
|
|
3643
3796
|
return "flex-col";
|
|
3797
|
+
default:
|
|
3798
|
+
return "flex-row";
|
|
3644
3799
|
}
|
|
3645
3800
|
});
|
|
3646
3801
|
return (u, d) => (v(), w("div", {
|
|
@@ -3648,85 +3803,99 @@ const Da = /* @__PURE__ */ R({
|
|
|
3648
3803
|
ref: a,
|
|
3649
3804
|
class: k(["flex", [c(l)]])
|
|
3650
3805
|
}, [
|
|
3651
|
-
|
|
3806
|
+
C(u.$slots, "default")
|
|
3652
3807
|
], 2));
|
|
3653
3808
|
}
|
|
3654
|
-
}),
|
|
3809
|
+
}), no = /* @__PURE__ */ T({
|
|
3655
3810
|
__name: "Tooltip",
|
|
3811
|
+
props: {
|
|
3812
|
+
timeout: { default: 1e3 }
|
|
3813
|
+
},
|
|
3656
3814
|
setup(e) {
|
|
3657
|
-
const t =
|
|
3658
|
-
return
|
|
3659
|
-
|
|
3660
|
-
}), (
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3815
|
+
const t = e, r = Et(), n = g(null), o = Ge(n), a = hr(o, t.timeout), s = g(0), i = g(0), l = g(null), u = Ge(l);
|
|
3816
|
+
return J(a, (d, p) => {
|
|
3817
|
+
a.value && d !== p && (s.value = r.x.value, i.value = r.y.value);
|
|
3818
|
+
}), (d, p) => {
|
|
3819
|
+
const f = Jn;
|
|
3820
|
+
return v(), w("div", null, [
|
|
3821
|
+
A("div", {
|
|
3822
|
+
ref_key: "hoverableRef",
|
|
3823
|
+
ref: n
|
|
3824
|
+
}, [
|
|
3825
|
+
C(d.$slots, "default")
|
|
3826
|
+
], 512),
|
|
3827
|
+
c(s) && c(i) && (c(a) || c(u)) ? (v(), w("div", {
|
|
3828
|
+
key: 0,
|
|
3829
|
+
ref_key: "tooltipRef",
|
|
3830
|
+
ref: l,
|
|
3831
|
+
class: "absolute z-10",
|
|
3832
|
+
style: I({
|
|
3833
|
+
left: `${c(s) + 20}px`,
|
|
3834
|
+
top: `${c(i) + 20}px`
|
|
3835
|
+
})
|
|
3836
|
+
}, [
|
|
3837
|
+
ae(f, { "with-border": "" }, {
|
|
3838
|
+
default: U(() => [
|
|
3839
|
+
C(d.$slots, "content")
|
|
3840
|
+
]),
|
|
3841
|
+
_: 3
|
|
3842
|
+
})
|
|
3843
|
+
], 4)) : B("", !0)
|
|
3844
|
+
]);
|
|
3845
|
+
};
|
|
3678
3846
|
}
|
|
3679
3847
|
});
|
|
3680
3848
|
export {
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3849
|
+
Ca as AspectRatio,
|
|
3850
|
+
rr as Avatar,
|
|
3851
|
+
nt as Btn,
|
|
3852
|
+
Ta as BtnGroup,
|
|
3853
|
+
Ea as ChatContainer,
|
|
3854
|
+
Ra as ChatMessage,
|
|
3855
|
+
za as ChatSystem,
|
|
3856
|
+
Oa as Chip,
|
|
3857
|
+
Ia as ColorInput,
|
|
3858
|
+
Lr as ColorSwatch,
|
|
3859
|
+
Ha as Drawer,
|
|
3860
|
+
Va as Dropzone,
|
|
3861
|
+
Nt as FullscreenOverlay,
|
|
3862
|
+
Da as Image,
|
|
3863
|
+
Fa as Indicator,
|
|
3864
|
+
La as Modal,
|
|
3865
|
+
Rn as Notification,
|
|
3866
|
+
Wa as NotificationSystem,
|
|
3867
|
+
Ga as Notifications,
|
|
3868
|
+
ja as Overlay,
|
|
3869
|
+
Jn as Paper,
|
|
3870
|
+
Xa as PinInput,
|
|
3871
|
+
Ya as Progress,
|
|
3872
|
+
Ka as RokuProvider,
|
|
3873
|
+
Za as SchemeSwitch,
|
|
3874
|
+
Qa as Select,
|
|
3875
|
+
eo as Slider,
|
|
3876
|
+
pa as Switch,
|
|
3877
|
+
to as TabItem,
|
|
3878
|
+
ro as Tabs,
|
|
3879
|
+
ea as TextField,
|
|
3880
|
+
_n as ThemeProvider,
|
|
3881
|
+
no as Tooltip,
|
|
3882
|
+
Xt as childrenElementMapSymbol,
|
|
3883
|
+
Ft as defaultTheme,
|
|
3884
|
+
jt as directionSymbol,
|
|
3885
|
+
Ee as generateColors,
|
|
3886
|
+
ua as generateColorsMap,
|
|
3887
|
+
Ua as notificationsSymbol,
|
|
3888
|
+
mn as schemeSymbol,
|
|
3889
|
+
Wt as tabCurrentSymbol,
|
|
3890
|
+
Ja as tabValueListSymbol,
|
|
3891
|
+
qa as themeColors,
|
|
3892
|
+
Ot as useCurrentThemeData,
|
|
3893
|
+
Pa as useCurrentThemeName,
|
|
3894
|
+
Na as useCurrentThemeScheme,
|
|
3895
|
+
at as useId,
|
|
3896
|
+
la as useNotifications,
|
|
3897
|
+
Ba as useRootTheme,
|
|
3898
|
+
vn as useSchemeString,
|
|
3899
|
+
hn as useThemeData,
|
|
3900
|
+
Bt as useThemeStyles
|
|
3732
3901
|
};
|