@strands.gg/accui 2.17.26 → 2.17.28
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/accui.css +1 -1
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +604 -612
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as De, S as lt, U as Xa, a as Ja, b as es, c as ts, d as kt, M as as, e as _t, f as Yt, g as xa, u as Oa, C as _a, h as Ze, i as
|
|
2
|
-
import { m as
|
|
3
|
-
import { defineComponent as Ve, computed as U, provide as Xt, onMounted as We, onUnmounted as xt, createElementBlock as o, openBlock as a, normalizeClass as be, createElementVNode as e, createBlock as Ce, renderSlot as je, Teleport as qt, createCommentVNode as I, toDisplayString as R, ref as
|
|
1
|
+
import { _ as De, S as lt, U as Xa, a as Ja, b as es, c as ts, d as kt, M as as, e as _t, f as Yt, g as xa, u as Oa, C as _a, h as Ze, i as gt, j as Ra, k as mt, l as Ht } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
2
|
+
import { m as ad } from "./StrandsUIPlugin-RTFzvRED.es.js";
|
|
3
|
+
import { defineComponent as Ve, computed as U, provide as Xt, onMounted as We, onUnmounted as xt, createElementBlock as o, openBlock as a, normalizeClass as be, createElementVNode as e, createBlock as Ce, renderSlot as je, Teleport as qt, createCommentVNode as I, toDisplayString as R, ref as M, watch as Le, createTextVNode as Q, reactive as Ye, withModifiers as Be, createStaticVNode as Jt, createVNode as d, withDirectives as Xe, withCtx as x, unref as n, vModelText as Je, nextTick as ht, Fragment as Ue, Transition as rt, createSlots as Zt, normalizeStyle as Oe, renderList as Ke, mergeProps as $a, useSlots as ga, inject as ma, resolveDynamicComponent as ot, onBeforeUnmount as Fa, withKeys as Re, h as oe, isMemoSame as ss, getCurrentInstance as os } from "vue";
|
|
4
4
|
import { u as pt, p as La } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
5
|
-
import { s as
|
|
5
|
+
import { s as od } from "./useStrandsConfig-CMKVW1p3.es.js";
|
|
6
6
|
import { u as ft } from "./useStrandsAuth-mv5zJr7L.es.js";
|
|
7
7
|
const ls = { class: "app-content" }, ns = {
|
|
8
8
|
key: 0,
|
|
@@ -54,7 +54,7 @@ const ls = { class: "app-content" }, ns = {
|
|
|
54
54
|
]))
|
|
55
55
|
], 2));
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
57
|
+
}), Mc = /* @__PURE__ */ De(us, [["__scopeId", "data-v-f18c1706"]]), ce = lt;
|
|
58
58
|
ce.Content = Xa;
|
|
59
59
|
ce.Anchor = Ja;
|
|
60
60
|
ce.Nuxt = es;
|
|
@@ -136,9 +136,9 @@ const Ha = kt("users", [
|
|
|
136
136
|
},
|
|
137
137
|
emits: ["update:modelValue", "change"],
|
|
138
138
|
setup(s, { emit: r }) {
|
|
139
|
-
const t = s, l = r, z =
|
|
140
|
-
Le(() => t.checked, (
|
|
141
|
-
|
|
139
|
+
const t = s, l = r, z = M(!1), V = U(() => t.modelValue !== void 0 ? !!t.modelValue : t.checked !== void 0 ? typeof t.checked == "string" ? t.checked === "" || t.checked === "true" : !!t.checked : z.value);
|
|
140
|
+
Le(() => t.checked, ($) => {
|
|
141
|
+
$ !== void 0 && (typeof $ == "string" ? z.value = $ === "" || $ === "true" : z.value = !!$);
|
|
142
142
|
}, { immediate: !0 });
|
|
143
143
|
const y = U(() => t.id || `ui-toggle-${Math.random().toString(36).substr(2, 9)}`), k = U(() => [
|
|
144
144
|
"ui-toggle",
|
|
@@ -154,10 +154,10 @@ const Ha = kt("users", [
|
|
|
154
154
|
}
|
|
155
155
|
]), g = () => {
|
|
156
156
|
if (t.disabled) return;
|
|
157
|
-
const
|
|
158
|
-
z.value =
|
|
157
|
+
const $ = !V.value;
|
|
158
|
+
z.value = $, l("update:modelValue", $), l("change", $);
|
|
159
159
|
};
|
|
160
|
-
return (
|
|
160
|
+
return ($, A) => (a(), o("div", hs, [
|
|
161
161
|
s.label ? (a(), o("label", {
|
|
162
162
|
key: 0,
|
|
163
163
|
for: y.value,
|
|
@@ -194,7 +194,7 @@ const Ha = kt("users", [
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["upload", "error"],
|
|
196
196
|
setup(s, { emit: r }) {
|
|
197
|
-
const t = s, l = r, z =
|
|
197
|
+
const t = s, l = r, z = M(), V = M(), y = M(), k = M(""), u = M(), g = M(t.size), $ = M(t.previewSize), A = M(t.size / 2.5), c = Ye({ x: 0, y: 0 }), h = M(1), H = M(0.1), D = M(3), C = M(!1), N = M(!1), p = M(!1), L = Ye({ x: 0, y: 0, imageX: 0, imageY: 0 });
|
|
198
198
|
We(() => {
|
|
199
199
|
if (V.value) {
|
|
200
200
|
const j = V.value.getContext("2d");
|
|
@@ -233,11 +233,11 @@ const Ha = kt("users", [
|
|
|
233
233
|
A.value * 2 / K.width,
|
|
234
234
|
A.value * 2 / K.height
|
|
235
235
|
), ae = ie;
|
|
236
|
-
|
|
236
|
+
H.value = ie, D.value = Math.max(1, ie);
|
|
237
237
|
const W = K.width * ae, le = K.height * ae;
|
|
238
|
-
c.x = (g.value - W) / 2, c.y = (g.value - le) / 2, h.value = ae, ue(),
|
|
238
|
+
c.x = (g.value - W) / 2, c.y = (g.value - le) / 2, h.value = ae, ue(), ht(() => {
|
|
239
239
|
N.value = !1;
|
|
240
|
-
}),
|
|
240
|
+
}), ht(() => {
|
|
241
241
|
b();
|
|
242
242
|
});
|
|
243
243
|
}, K.src = j;
|
|
@@ -252,7 +252,7 @@ const Ha = kt("users", [
|
|
|
252
252
|
if (!u.value || !y.value || !V.value) return;
|
|
253
253
|
const j = y.value.getContext("2d");
|
|
254
254
|
if (!j) return;
|
|
255
|
-
j.fillStyle = "#ffffff", j.fillRect(0, 0,
|
|
255
|
+
j.fillStyle = "#ffffff", j.fillRect(0, 0, $.value, $.value), j.save(), j.beginPath(), j.arc($.value / 2, $.value / 2, $.value / 2, 0, Math.PI * 2), j.clip();
|
|
256
256
|
const K = g.value / 2 - A.value, ie = g.value / 2 - A.value, ae = A.value * 2;
|
|
257
257
|
j.drawImage(
|
|
258
258
|
V.value,
|
|
@@ -262,8 +262,8 @@ const Ha = kt("users", [
|
|
|
262
262
|
ae,
|
|
263
263
|
0,
|
|
264
264
|
0,
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
$.value,
|
|
266
|
+
$.value
|
|
267
267
|
), j.restore();
|
|
268
268
|
}, te = (j) => {
|
|
269
269
|
u.value && (C.value = !0, L.x = j.clientX, L.y = j.clientY, L.imageX = c.x, L.imageY = c.y, document.addEventListener("mousemove", ye), document.addEventListener("mouseup", Me));
|
|
@@ -279,7 +279,7 @@ const Ha = kt("users", [
|
|
|
279
279
|
C.value = !1, document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", Me);
|
|
280
280
|
}, Ae = (j) => {
|
|
281
281
|
j.preventDefault();
|
|
282
|
-
const K = j.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(
|
|
282
|
+
const K = j.deltaY > 0 ? -0.05 : 0.05, ie = Math.max(H.value, Math.min(D.value, h.value + K));
|
|
283
283
|
if (ie !== h.value && u.value) {
|
|
284
284
|
p.value = !0;
|
|
285
285
|
const ae = u.value, W = g.value / 2, le = ae.width * h.value, _e = ae.height * h.value, Te = ae.width * ie, Ee = ae.height * ie, $e = c.x + le / 2 - W, re = c.y + _e / 2 - W, ve = ie / h.value, Ie = $e * ve, G = re * ve;
|
|
@@ -295,9 +295,9 @@ const Ha = kt("users", [
|
|
|
295
295
|
A.value * 2 / j.width,
|
|
296
296
|
A.value * 2 / j.height
|
|
297
297
|
), ie = K;
|
|
298
|
-
|
|
298
|
+
H.value = K, D.value = Math.max(1, K);
|
|
299
299
|
const ae = j.width * ie, W = j.height * ie;
|
|
300
|
-
c.x = (g.value - ae) / 2, c.y = (g.value - W) / 2, h.value = ie, ue(),
|
|
300
|
+
c.x = (g.value - ae) / 2, c.y = (g.value - W) / 2, h.value = ie, ue(), ht(() => {
|
|
301
301
|
N.value = !1;
|
|
302
302
|
}), b();
|
|
303
303
|
}, xe = async () => {
|
|
@@ -407,7 +407,7 @@ const Ha = kt("users", [
|
|
|
407
407
|
e("div", Ds, [
|
|
408
408
|
d(lt, {
|
|
409
409
|
onClick: K[2] || (K[2] = (ie) => {
|
|
410
|
-
h.value = Math.max(
|
|
410
|
+
h.value = Math.max(H.value, h.value - 0.1), ue(), b();
|
|
411
411
|
}),
|
|
412
412
|
icon: !0,
|
|
413
413
|
squircle: !0,
|
|
@@ -423,7 +423,7 @@ const Ha = kt("users", [
|
|
|
423
423
|
Xe(e("input", {
|
|
424
424
|
type: "range",
|
|
425
425
|
"onUpdate:modelValue": K[3] || (K[3] = (ie) => h.value = ie),
|
|
426
|
-
min:
|
|
426
|
+
min: H.value,
|
|
427
427
|
max: D.value,
|
|
428
428
|
step: 0.01,
|
|
429
429
|
class: "zoom-slider",
|
|
@@ -496,8 +496,8 @@ const Ha = kt("users", [
|
|
|
496
496
|
e("canvas", {
|
|
497
497
|
ref_key: "previewCanvas",
|
|
498
498
|
ref: y,
|
|
499
|
-
width:
|
|
500
|
-
height:
|
|
499
|
+
width: $.value,
|
|
500
|
+
height: $.value,
|
|
501
501
|
class: "preview-canvas"
|
|
502
502
|
}, null, 8, Os)
|
|
503
503
|
]),
|
|
@@ -559,8 +559,8 @@ class Sa {
|
|
|
559
559
|
{ freq: 783.99, time: 0.3 }
|
|
560
560
|
// G5
|
|
561
561
|
].forEach((u) => {
|
|
562
|
-
const g = r.createOscillator(),
|
|
563
|
-
g.connect(
|
|
562
|
+
const g = r.createOscillator(), $ = r.createGain();
|
|
563
|
+
g.connect($), $.connect(r.destination), g.type = "sine", g.frequency.setValueAtTime(u.freq, t + u.time), g.frequency.exponentialRampToValueAtTime(u.freq * 1.02, t + u.time + 0.1), g.frequency.exponentialRampToValueAtTime(u.freq, t + u.time + 0.4), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.08, t + u.time + 0.03), $.gain.linearRampToValueAtTime(0.06, t + u.time + 0.2), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.5), g.start(t + u.time), g.stop(t + u.time + 0.5);
|
|
564
564
|
});
|
|
565
565
|
const z = r.createOscillator(), V = r.createGain();
|
|
566
566
|
z.connect(V), V.connect(r.destination), z.type = "triangle", z.frequency.setValueAtTime(261.63, t), V.gain.setValueAtTime(0, t), V.gain.linearRampToValueAtTime(0.04, t + 0.1), V.gain.linearRampToValueAtTime(0.03, t + 0.4), V.gain.exponentialRampToValueAtTime(0.01, t + 0.8), z.start(t), z.stop(t + 0.8);
|
|
@@ -587,16 +587,16 @@ class Sa {
|
|
|
587
587
|
{ freq: 659.25, time: 0.8 }
|
|
588
588
|
// E5
|
|
589
589
|
].forEach((u) => {
|
|
590
|
-
const g = r.createOscillator(),
|
|
591
|
-
g.connect(
|
|
590
|
+
const g = r.createOscillator(), $ = r.createGain();
|
|
591
|
+
g.connect($), $.connect(r.destination), g.type = "sine", g.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.15, t + u.time + 0.05), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.8), g.start(t + u.time), g.stop(t + u.time + 0.8);
|
|
592
592
|
}), [
|
|
593
593
|
{ freq: 130.81, time: 0, duration: 1.5 },
|
|
594
594
|
// C3
|
|
595
595
|
{ freq: 196, time: 0.8, duration: 1.7 }
|
|
596
596
|
// G3
|
|
597
597
|
].forEach((u) => {
|
|
598
|
-
const g = r.createOscillator(),
|
|
599
|
-
g.connect(
|
|
598
|
+
const g = r.createOscillator(), $ = r.createGain();
|
|
599
|
+
g.connect($), $.connect(r.destination), g.type = "triangle", g.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.08, t + u.time + 0.3), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + u.duration), g.start(t + u.time), g.stop(t + u.time + u.duration);
|
|
600
600
|
}), [
|
|
601
601
|
{ freq: 1046.5, time: 1 },
|
|
602
602
|
// C6
|
|
@@ -605,11 +605,11 @@ class Sa {
|
|
|
605
605
|
{ freq: 1567.98, time: 1.6 }
|
|
606
606
|
// G6
|
|
607
607
|
].forEach((u) => {
|
|
608
|
-
const g = r.createOscillator(),
|
|
609
|
-
g.connect(
|
|
608
|
+
const g = r.createOscillator(), $ = r.createGain();
|
|
609
|
+
g.connect($), $.connect(r.destination), g.type = "sine", g.frequency.setValueAtTime(u.freq, t + u.time), $.gain.setValueAtTime(0, t + u.time), $.gain.linearRampToValueAtTime(0.1, t + u.time + 0.02), $.gain.exponentialRampToValueAtTime(0.01, t + u.time + 0.4), g.start(t + u.time), g.stop(t + u.time + 0.4);
|
|
610
610
|
}), [261.63, 329.63, 392, 523.25].forEach((u) => {
|
|
611
|
-
const g = r.createOscillator(),
|
|
612
|
-
g.connect(
|
|
611
|
+
const g = r.createOscillator(), $ = r.createGain();
|
|
612
|
+
g.connect($), $.connect(r.destination), g.type = "sine", g.frequency.setValueAtTime(u, t + 1.8), $.gain.setValueAtTime(0, t + 1.8), $.gain.linearRampToValueAtTime(0.12, t + 1.9), $.gain.exponentialRampToValueAtTime(0.01, t + l), g.start(t + 1.8), g.stop(t + l);
|
|
613
613
|
});
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
@@ -701,9 +701,9 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
701
701
|
},
|
|
702
702
|
emits: ["levelup"],
|
|
703
703
|
setup(s, { emit: r }) {
|
|
704
|
-
const t = s, l = r, z =
|
|
704
|
+
const t = s, l = r, z = M(!1), V = M(t.value), y = M("forward");
|
|
705
705
|
let k = null, u = t.value, g = t.level;
|
|
706
|
-
const
|
|
706
|
+
const $ = Kt, A = t.size ?? Kt, c = Kt / 2, h = U(() => t.thickness ?? 24), H = U(() => t.labelThickness ?? 46), D = U(() => t.gapAngle ?? 16), C = U(() => (Kt - h.value) / 2 - Da), N = U(() => (Kt - H.value) / 1.9 - Da), p = U(() => N.value + 10), L = U(() => C.value - h.value / 2 - so), O = U(() => t.levelLabel?.length ?? 0), S = U(() => O.value * no + lo), w = U(() => -S.value / 2), q = U(() => S.value / 2), Z = U(
|
|
707
707
|
() => xe(c, c, N.value, w.value, q.value)
|
|
708
708
|
), b = U(
|
|
709
709
|
() => (
|
|
@@ -778,7 +778,7 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
778
778
|
(a(), o("svg", {
|
|
779
779
|
width: n(A),
|
|
780
780
|
height: n(A),
|
|
781
|
-
viewBox: `0 0 ${n(
|
|
781
|
+
viewBox: `0 0 ${n($)} ${n($)}`,
|
|
782
782
|
style: { position: "relative" }
|
|
783
783
|
}, [
|
|
784
784
|
z.value ? (a(), o("g", Ks, [
|
|
@@ -810,7 +810,7 @@ const Fs = (s, r) => Sa.playLevelUp(s, r), qs = { class: "level-progress-contain
|
|
|
810
810
|
e("path", {
|
|
811
811
|
d: Z.value,
|
|
812
812
|
stroke: ue.value,
|
|
813
|
-
"stroke-width":
|
|
813
|
+
"stroke-width": H.value,
|
|
814
814
|
fill: "none",
|
|
815
815
|
"stroke-linecap": "round"
|
|
816
816
|
}, null, 8, Qs),
|
|
@@ -953,7 +953,7 @@ function uo(s = {}) {
|
|
|
953
953
|
closeOnEscape: r = !0,
|
|
954
954
|
priority: t = "normal",
|
|
955
955
|
component: l
|
|
956
|
-
} = s, z =
|
|
956
|
+
} = s, z = M(null), V = M(!1), y = M(null), k = async (A) => {
|
|
957
957
|
if (V.value) return;
|
|
958
958
|
const c = /* @__PURE__ */ Symbol("modal");
|
|
959
959
|
z.value = c;
|
|
@@ -964,10 +964,10 @@ function uo(s = {}) {
|
|
|
964
964
|
priority: t,
|
|
965
965
|
component: l
|
|
966
966
|
});
|
|
967
|
-
return y.value = h, V.value = !0, await
|
|
967
|
+
return y.value = h, V.value = !0, await ht(), h;
|
|
968
968
|
}, u = () => {
|
|
969
969
|
!z.value || !V.value || (Ft.remove(z.value), z.value = null, y.value = null, V.value = !1);
|
|
970
|
-
}, g = () => z.value ? document.querySelector(`[data-modal-id="${z.value.toString()}"]`) : null,
|
|
970
|
+
}, g = () => z.value ? document.querySelector(`[data-modal-id="${z.value.toString()}"]`) : null, $ = () => y.value ? document.querySelector(`.ui-app-modal-backdrop[style*="z-index: ${y.value.zIndex - 1}"]`) : null;
|
|
971
971
|
try {
|
|
972
972
|
xt(() => {
|
|
973
973
|
V.value && u();
|
|
@@ -984,7 +984,7 @@ function uo(s = {}) {
|
|
|
984
984
|
closeModal: u,
|
|
985
985
|
// Utilities
|
|
986
986
|
getModalContainer: g,
|
|
987
|
-
getModalBackdrop:
|
|
987
|
+
getModalBackdrop: $,
|
|
988
988
|
// Computed values
|
|
989
989
|
zIndex: () => y.value?.zIndex || 0,
|
|
990
990
|
isTopModal: () => {
|
|
@@ -993,15 +993,15 @@ function uo(s = {}) {
|
|
|
993
993
|
}
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function $c(s) {
|
|
997
997
|
const r = () => `[data-modal-id="${s.toString()}"]`, t = () => document.querySelector(r()) !== null;
|
|
998
998
|
return {
|
|
999
999
|
target: r(),
|
|
1000
1000
|
isAvailable: t
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const s =
|
|
1003
|
+
function Sc() {
|
|
1004
|
+
const s = M(Ft.state), r = Ft.subscribe((t) => {
|
|
1005
1005
|
s.value = t;
|
|
1006
1006
|
});
|
|
1007
1007
|
try {
|
|
@@ -1046,13 +1046,13 @@ const co = {
|
|
|
1046
1046
|
},
|
|
1047
1047
|
emits: ["update:modelValue", "open", "close"],
|
|
1048
1048
|
setup(s, { emit: r }) {
|
|
1049
|
-
const t = s, l = r, z =
|
|
1049
|
+
const t = s, l = r, z = M(!1), V = M(null), y = M(null), k = M(null), u = uo({
|
|
1050
1050
|
closeOnEscape: t.closeOnEscape,
|
|
1051
1051
|
priority: "normal",
|
|
1052
1052
|
component: "UiModal"
|
|
1053
1053
|
});
|
|
1054
|
-
|
|
1055
|
-
const g = U(() => t.modelValue !== void 0 ? t.modelValue : z.value),
|
|
1054
|
+
M(!0);
|
|
1055
|
+
const g = U(() => t.modelValue !== void 0 ? t.modelValue : z.value), $ = U(() => ({
|
|
1056
1056
|
sm: "ui-modal-size-sm",
|
|
1057
1057
|
md: "ui-modal-size-md",
|
|
1058
1058
|
lg: "ui-modal-size-lg",
|
|
@@ -1069,14 +1069,14 @@ const co = {
|
|
|
1069
1069
|
}, c = () => {
|
|
1070
1070
|
V.value && (k.value = V.value.querySelector('button, [tabindex]:not([tabindex="-1"]), a[href], input, select, textarea'), k.value || (k.value = V.value)), A();
|
|
1071
1071
|
}, h = () => {
|
|
1072
|
-
t.modelValue !== void 0 ? l("update:modelValue", !1) : z.value = !1, l("close"), u.closeModal(),
|
|
1072
|
+
t.modelValue !== void 0 ? l("update:modelValue", !1) : z.value = !1, l("close"), u.closeModal(), ht(() => {
|
|
1073
1073
|
k.value && document.contains(k.value) && k.value.focus(), k.value = null;
|
|
1074
1074
|
});
|
|
1075
1075
|
};
|
|
1076
1076
|
Le(g, async (D) => {
|
|
1077
|
-
D ? (u.isOpen.value || await u.openModal(h), await
|
|
1077
|
+
D ? (u.isOpen.value || await u.openModal(h), await ht(), y.value && y.value.focus()) : u.isOpen.value && u.closeModal();
|
|
1078
1078
|
});
|
|
1079
|
-
const
|
|
1079
|
+
const H = (D) => {
|
|
1080
1080
|
if (!g.value || D.key !== "Tab" || !y.value) return;
|
|
1081
1081
|
const C = y.value.querySelectorAll(
|
|
1082
1082
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
@@ -1086,9 +1086,9 @@ const co = {
|
|
|
1086
1086
|
D.shiftKey ? document.activeElement === p && (D.preventDefault(), L.focus()) : document.activeElement === L && (D.preventDefault(), p.focus());
|
|
1087
1087
|
};
|
|
1088
1088
|
return We(() => {
|
|
1089
|
-
document.addEventListener("keydown",
|
|
1089
|
+
document.addEventListener("keydown", H);
|
|
1090
1090
|
}), xt(() => {
|
|
1091
|
-
document.removeEventListener("keydown",
|
|
1091
|
+
document.removeEventListener("keydown", H);
|
|
1092
1092
|
}), (D, C) => (a(), o(Ue, null, [
|
|
1093
1093
|
D.$slots.trigger ? (a(), o("span", {
|
|
1094
1094
|
key: 0,
|
|
@@ -1119,7 +1119,7 @@ const co = {
|
|
|
1119
1119
|
padding: s.cardPadding,
|
|
1120
1120
|
shadow: s.cardShadow,
|
|
1121
1121
|
color: s.cardColor,
|
|
1122
|
-
class: be([s.cardClass,
|
|
1122
|
+
class: be([s.cardClass, $.value]),
|
|
1123
1123
|
tabindex: "-1"
|
|
1124
1124
|
}, Zt({
|
|
1125
1125
|
header: x(() => [
|
|
@@ -1837,12 +1837,12 @@ const co = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
return "#EA00A8";
|
|
1839
1839
|
}
|
|
1840
|
-
const l = s, z = r, V =
|
|
1840
|
+
const l = s, z = r, V = M(), y = M(), k = M(), u = M(0), g = M(1), $ = M(1), A = M(1), c = M(l.modelValue || t()), h = M({ r: 234, g: 0, b: 168 }), H = M(100), D = M(l.defaultColorFormat || "hex"), C = M({ h: 0, s: 0, l: 0 }), N = M({ l: 0, c: 0, h: 0 }), p = M(!1), L = M(!1), O = M(!1), S = M(!1), w = M(!1), q = U(() => p.value), Z = M(null), b = M(l.compareColor);
|
|
1841
1841
|
let T = null, te = null;
|
|
1842
|
-
const ue =
|
|
1842
|
+
const ue = M(!1);
|
|
1843
1843
|
let ye = "";
|
|
1844
1844
|
Le(() => [l.showContrast, l.compareColor], ([v, i], m) => {
|
|
1845
|
-
v && i && !S.value && (S.value = !0), typeof i == "string" && (b.value = i), m && i !== m[1] && (
|
|
1845
|
+
v && i && !S.value && (S.value = !0), typeof i == "string" && (b.value = i), m && i !== m[1] && (yt.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
1846
1846
|
}, { immediate: !0 }), Le(S, (v) => {
|
|
1847
1847
|
v && l.showContrast && l.compareColor && ea();
|
|
1848
1848
|
});
|
|
@@ -1874,7 +1874,7 @@ const co = {
|
|
|
1874
1874
|
if (ee.toLowerCase() === m && _.shades || _.shades?.some((Y) => Y.toLowerCase() === m))
|
|
1875
1875
|
return ee;
|
|
1876
1876
|
return null;
|
|
1877
|
-
}), K =
|
|
1877
|
+
}), K = M([]), ie = M(""), ae = U(() => {
|
|
1878
1878
|
if (!j.value)
|
|
1879
1879
|
return K.value;
|
|
1880
1880
|
const v = Ae.value[j.value], i = Se.value[j.value], m = v?.shades || i?.shades || [];
|
|
@@ -1893,8 +1893,8 @@ const co = {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
return m && (ie.value = m), m;
|
|
1895
1895
|
}), _e = (v) => v.toLowerCase() === at.value.toLowerCase(), Te = (v) => {
|
|
1896
|
-
const i = v.replace("#", ""), m = parseInt(i.substring(0, 2), 16), ee = parseInt(i.substring(2, 4), 16), _ = parseInt(i.substring(4, 6), 16), Y = Math.pow(m / 255, 2.4), F = Math.pow(ee / 255, 2.4),
|
|
1897
|
-
return 0.2126729 * Y + 0.7151522 * F + 0.072175 *
|
|
1896
|
+
const i = v.replace("#", ""), m = parseInt(i.substring(0, 2), 16), ee = parseInt(i.substring(2, 4), 16), _ = parseInt(i.substring(4, 6), 16), Y = Math.pow(m / 255, 2.4), F = Math.pow(ee / 255, 2.4), E = Math.pow(_ / 255, 2.4);
|
|
1897
|
+
return 0.2126729 * Y + 0.7151522 * F + 0.072175 * E < 0.3 ? "#ffffff" : "#000000";
|
|
1898
1898
|
}, Ee = (v) => {
|
|
1899
1899
|
const i = {
|
|
1900
1900
|
"--_color": v
|
|
@@ -1925,23 +1925,23 @@ const co = {
|
|
|
1925
1925
|
return v;
|
|
1926
1926
|
}, re = (v, i, m) => {
|
|
1927
1927
|
v = Math.round(v * 1e3) / 1e3, i = Math.round(i * 1e3) / 1e3, m = Math.round(m * 1e3) / 1e3;
|
|
1928
|
-
const ee = Math.floor(v / 60), _ = v / 60 - ee, Y = m * (1 - i), F = m * (1 - i * _),
|
|
1928
|
+
const ee = Math.floor(v / 60), _ = v / 60 - ee, Y = m * (1 - i), F = m * (1 - i * _), E = m * (1 - i * (1 - _));
|
|
1929
1929
|
let f, B, se;
|
|
1930
1930
|
switch (ee % 6) {
|
|
1931
1931
|
case 0:
|
|
1932
|
-
f = m, B =
|
|
1932
|
+
f = m, B = E, se = Y;
|
|
1933
1933
|
break;
|
|
1934
1934
|
case 1:
|
|
1935
1935
|
f = F, B = m, se = Y;
|
|
1936
1936
|
break;
|
|
1937
1937
|
case 2:
|
|
1938
|
-
f = Y, B = m, se =
|
|
1938
|
+
f = Y, B = m, se = E;
|
|
1939
1939
|
break;
|
|
1940
1940
|
case 3:
|
|
1941
1941
|
f = Y, B = F, se = m;
|
|
1942
1942
|
break;
|
|
1943
1943
|
case 4:
|
|
1944
|
-
f =
|
|
1944
|
+
f = E, B = Y, se = m;
|
|
1945
1945
|
break;
|
|
1946
1946
|
case 5:
|
|
1947
1947
|
f = m, B = Y, se = F;
|
|
@@ -1958,7 +1958,7 @@ const co = {
|
|
|
1958
1958
|
v /= 255, i /= 255, m /= 255;
|
|
1959
1959
|
const ee = Math.max(v, i, m), _ = Math.min(v, i, m), Y = ee - _;
|
|
1960
1960
|
let F = 0;
|
|
1961
|
-
const
|
|
1961
|
+
const E = ee === 0 ? 0 : Y / ee, f = ee;
|
|
1962
1962
|
if (Y !== 0)
|
|
1963
1963
|
switch (ee) {
|
|
1964
1964
|
case v:
|
|
@@ -1974,7 +1974,7 @@ const co = {
|
|
|
1974
1974
|
return {
|
|
1975
1975
|
h: Math.round(F * 1e3) / 1e3,
|
|
1976
1976
|
// 3 decimal precision
|
|
1977
|
-
s: Math.round(
|
|
1977
|
+
s: Math.round(E * 1e3) / 1e3,
|
|
1978
1978
|
v: Math.round(f * 1e3) / 1e3
|
|
1979
1979
|
};
|
|
1980
1980
|
}, Ie = (v) => {
|
|
@@ -1987,27 +1987,27 @@ const co = {
|
|
|
1987
1987
|
}, G = (v, i, m) => `#${((1 << 24) + (v << 16) + (i << 8) + m).toString(16).slice(1)}`, he = (v, i, m) => {
|
|
1988
1988
|
v /= 255, i /= 255, m /= 255;
|
|
1989
1989
|
const ee = Math.max(v, i, m), _ = Math.min(v, i, m), Y = ee - _, F = ee + _;
|
|
1990
|
-
let
|
|
1990
|
+
let E = 0, f = 0, B = F / 2;
|
|
1991
1991
|
if (Y !== 0)
|
|
1992
1992
|
switch (f = B > 0.5 ? Y / (2 - F) : Y / F, ee) {
|
|
1993
1993
|
case v:
|
|
1994
|
-
|
|
1994
|
+
E = ((i - m) / Y + (i < m ? 6 : 0)) / 6;
|
|
1995
1995
|
break;
|
|
1996
1996
|
case i:
|
|
1997
|
-
|
|
1997
|
+
E = ((m - v) / Y + 2) / 6;
|
|
1998
1998
|
break;
|
|
1999
1999
|
case m:
|
|
2000
|
-
|
|
2000
|
+
E = ((v - i) / Y + 4) / 6;
|
|
2001
2001
|
break;
|
|
2002
2002
|
}
|
|
2003
2003
|
return {
|
|
2004
|
-
h: Math.round(
|
|
2004
|
+
h: Math.round(E * 360),
|
|
2005
2005
|
s: Math.round(f * 100),
|
|
2006
2006
|
l: Math.round(B * 100)
|
|
2007
2007
|
};
|
|
2008
2008
|
}, X = (v, i, m) => {
|
|
2009
2009
|
v /= 360, i /= 100, m /= 100;
|
|
2010
|
-
const ee = (F,
|
|
2010
|
+
const ee = (F, E, f) => (f < 0 && (f += 1), f > 1 && (f -= 1), f < 1 / 6 ? F + (E - F) * 6 * f : f < 1 / 2 ? E : f < 2 / 3 ? F + (E - F) * (2 / 3 - f) * 6 : F);
|
|
2011
2011
|
if (i === 0)
|
|
2012
2012
|
return { r: Math.round(m * 255), g: Math.round(m * 255), b: Math.round(m * 255) };
|
|
2013
2013
|
const _ = m < 0.5 ? m * (1 + i) : m + i - m * i, Y = 2 * m - _;
|
|
@@ -2017,7 +2017,7 @@ const co = {
|
|
|
2017
2017
|
b: Math.round(ee(Y, _, v - 1 / 3) * 255)
|
|
2018
2018
|
};
|
|
2019
2019
|
}, fe = (v, i, m) => {
|
|
2020
|
-
const ee = (St) => (St /= 255, St <= 0.04045 ? St / 12.92 : Math.pow((St + 0.055) / 1.055, 2.4)), _ = ee(v), Y = ee(i), F = ee(m),
|
|
2020
|
+
const ee = (St) => (St /= 255, St <= 0.04045 ? St / 12.92 : Math.pow((St + 0.055) / 1.055, 2.4)), _ = ee(v), Y = ee(i), F = ee(m), E = 0.4122214708 * _ + 0.5363325363 * Y + 0.0514459929 * F, f = 0.2119034982 * _ + 0.6806995451 * Y + 0.1073969566 * F, B = 0.0883024619 * _ + 0.2817188376 * Y + 0.6299787005 * F, se = Math.sign(E) * Math.pow(Math.abs(E), 1 / 3), de = Math.sign(f) * Math.pow(Math.abs(f), 1 / 3), ke = Math.sign(B) * Math.pow(Math.abs(B), 1 / 3), ge = 0.2104542553 * se + 0.793617785 * de - 0.0040720468 * ke, me = 1.9779984951 * se - 2.428592205 * de + 0.4505937099 * ke, ze = 0.0259040371 * se + 0.7827717662 * de - 0.808675766 * ke, qe = ge, Ge = Math.sqrt(me * me + ze * ze);
|
|
2021
2021
|
let st = Math.atan2(ze, me) * 180 / Math.PI;
|
|
2022
2022
|
return st < 0 && (st += 360), {
|
|
2023
2023
|
l: Math.round(qe * 100),
|
|
@@ -2026,7 +2026,7 @@ const co = {
|
|
|
2026
2026
|
};
|
|
2027
2027
|
}, pe = (v, i, m) => {
|
|
2028
2028
|
v /= 100, i /= 100, m = m * Math.PI / 180;
|
|
2029
|
-
const ee = i * Math.cos(m), _ = i * Math.sin(m), Y = v + 0.3963377774 * ee + 0.2158037573 * _, F = v - 0.1055613458 * ee - 0.0638541728 * _,
|
|
2029
|
+
const ee = i * Math.cos(m), _ = i * Math.sin(m), Y = v + 0.3963377774 * ee + 0.2158037573 * _, F = v - 0.1055613458 * ee - 0.0638541728 * _, E = v - 0.0894841775 * ee - 1.291485548 * _, f = Y * Y * Y, B = F * F * F, se = E * E * E, de = 4.0767416621 * f - 3.3077115913 * B + 0.2309699292 * se, ke = -1.2684380046 * f + 2.6097574011 * B - 0.3413193965 * se, ge = -0.0041960863 * f - 0.7034186147 * B + 1.707614701 * se, me = (ze) => ze <= 31308e-7 ? ze * 12.92 : 1.055 * Math.pow(ze, 1 / 2.4) - 0.055;
|
|
2030
2030
|
return {
|
|
2031
2031
|
r: Math.max(0, Math.min(255, Math.round(me(de) * 255))),
|
|
2032
2032
|
g: Math.max(0, Math.min(255, Math.round(me(ke) * 255))),
|
|
@@ -2048,9 +2048,9 @@ const co = {
|
|
|
2048
2048
|
}, Fe = (v, i) => {
|
|
2049
2049
|
const m = Ie(v), ee = Ie(i);
|
|
2050
2050
|
if (!m || !ee) return 1;
|
|
2051
|
-
const _ = Ne(m.r, m.g, m.b), Y = Ne(ee.r, ee.g, ee.b), F = Math.max(_, Y),
|
|
2052
|
-
return (F + 0.05) / (
|
|
2053
|
-
},
|
|
2051
|
+
const _ = Ne(m.r, m.g, m.b), Y = Ne(ee.r, ee.g, ee.b), F = Math.max(_, Y), E = Math.min(_, Y);
|
|
2052
|
+
return (F + 0.05) / (E + 0.05);
|
|
2053
|
+
}, Ct = (v, i = "normal") => {
|
|
2054
2054
|
if (i === "large") {
|
|
2055
2055
|
if (v >= 4.5) return "AAA";
|
|
2056
2056
|
if (v >= 3) return "AA";
|
|
@@ -2059,7 +2059,7 @@ const co = {
|
|
|
2059
2059
|
if (v >= 4.5) return "AA";
|
|
2060
2060
|
}
|
|
2061
2061
|
return "FAIL";
|
|
2062
|
-
}, Pe = U(() => re(u.value, g.value,
|
|
2062
|
+
}, Pe = U(() => re(u.value, g.value, $.value)), Ut = U(() => `rgb(${Pe.value.r}, ${Pe.value.g}, ${Pe.value.b})`), at = U(() => {
|
|
2063
2063
|
const { r: v, g: i, b: m } = Pe.value;
|
|
2064
2064
|
return l.showAlpha && A.value < 0.99 ? `rgba(${v}, ${i}, ${m}, ${A.value})` : G(v, i, m);
|
|
2065
2065
|
}), ea = () => {
|
|
@@ -2070,8 +2070,8 @@ const co = {
|
|
|
2070
2070
|
const v = G(Pe.value.r, Pe.value.g, Pe.value.b), i = Fe(v, l.compareColor);
|
|
2071
2071
|
Z.value = {
|
|
2072
2072
|
ratio: i,
|
|
2073
|
-
normalText:
|
|
2074
|
-
largeText:
|
|
2073
|
+
normalText: Ct(i, "normal"),
|
|
2074
|
+
largeText: Ct(i, "large"),
|
|
2075
2075
|
currentColor: v,
|
|
2076
2076
|
compareColor: l.compareColor
|
|
2077
2077
|
};
|
|
@@ -2119,34 +2119,34 @@ const co = {
|
|
|
2119
2119
|
F.push(_[f]);
|
|
2120
2120
|
if (F.length > 0 && F[F.length - 1] !== _[_.length - 1] && F.push(_[_.length - 1]), F.length === 0) return "";
|
|
2121
2121
|
if (F.length === 1) return `M ${F[0].x} ${F[0].y}`;
|
|
2122
|
-
let
|
|
2122
|
+
let E = `M ${F[0].x} ${F[0].y}`;
|
|
2123
2123
|
if (F.length === 2)
|
|
2124
|
-
|
|
2124
|
+
E += ` L ${F[1].x} ${F[1].y}`;
|
|
2125
2125
|
else {
|
|
2126
2126
|
for (let B = 1; B < F.length - 1; B++) {
|
|
2127
2127
|
const se = F[B], de = F[B + 1], ke = (se.x + de.x) / 2, ge = (se.y + de.y) / 2;
|
|
2128
|
-
|
|
2128
|
+
E += ` Q ${se.x} ${se.y} ${ke} ${ge}`;
|
|
2129
2129
|
}
|
|
2130
2130
|
const f = F[F.length - 1];
|
|
2131
|
-
|
|
2131
|
+
E += ` Q ${f.x} ${f.y} ${f.x} ${f.y}`;
|
|
2132
2132
|
}
|
|
2133
|
-
return it.value =
|
|
2133
|
+
return it.value = E, E;
|
|
2134
2134
|
}), Dt = U(() => {
|
|
2135
2135
|
if (!S.value || !b.value) return "";
|
|
2136
2136
|
if (zt.value)
|
|
2137
2137
|
return zt.value;
|
|
2138
|
-
const v = dt, i = vt, m = 4.5, ee = (
|
|
2139
|
-
const B = Math.max(0, Math.min(v,
|
|
2138
|
+
const v = dt, i = vt, m = 4.5, ee = (E, f) => {
|
|
2139
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(i, f)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / i)), ge = re(u.value, de, ke), me = G(ge.r, ge.g, ge.b);
|
|
2140
2140
|
return Fe(me, b.value);
|
|
2141
2141
|
}, _ = [], Y = [];
|
|
2142
|
-
for (let
|
|
2142
|
+
for (let E = -20; E <= v + 20; E += 2) {
|
|
2143
2143
|
let f = !1, B = -1;
|
|
2144
2144
|
for (let se = i - 1; se >= 1; se--) {
|
|
2145
|
-
const de = ee(
|
|
2145
|
+
const de = ee(E, se), ke = ee(E, se - 1);
|
|
2146
2146
|
if (de >= m && ke < m) {
|
|
2147
2147
|
let ge = se - 1, me = se;
|
|
2148
2148
|
for (let ze = 0; ze < 8; ze++) {
|
|
2149
|
-
const qe = (ge + me) / 2, Ge = ee(
|
|
2149
|
+
const qe = (ge + me) / 2, Ge = ee(E, qe);
|
|
2150
2150
|
if (Math.abs(Ge - m) < 0.01) {
|
|
2151
2151
|
B = qe, f = !0;
|
|
2152
2152
|
break;
|
|
@@ -2157,44 +2157,44 @@ const co = {
|
|
|
2157
2157
|
break;
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
|
-
f && B >= 0 && Y.push({ x:
|
|
2160
|
+
f && B >= 0 && Y.push({ x: E, y: B });
|
|
2161
2161
|
}
|
|
2162
2162
|
if (Y.length === 0) return "";
|
|
2163
2163
|
if (Y.length > 4) {
|
|
2164
2164
|
_.push(Y[0]);
|
|
2165
|
-
const
|
|
2166
|
-
for (let B =
|
|
2165
|
+
const E = Math.floor(Y.length / 4);
|
|
2166
|
+
for (let B = E; B < Y.length - E; B += E)
|
|
2167
2167
|
_.push(Y[B]);
|
|
2168
2168
|
const f = Y[Y.length - 1];
|
|
2169
2169
|
_.push(f);
|
|
2170
2170
|
} else
|
|
2171
2171
|
_.push(...Y);
|
|
2172
2172
|
if (_.length > 0) {
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2173
|
+
const E = _[0], f = _[_.length - 1];
|
|
2174
|
+
E.x < 0 && (E.x = 0), f.x < v && f.y > 5 && f.y < i - 5 ? _.push({ x: v, y: f.y }) : f.x > v && (f.x = v);
|
|
2175
2175
|
}
|
|
2176
2176
|
if (_.length < 2) return "";
|
|
2177
2177
|
if (_.length === 2)
|
|
2178
2178
|
return `M ${_[0].x} ${_[0].y} L ${_[1].x} ${_[1].y}`;
|
|
2179
2179
|
let F = `M ${_[0].x} ${_[0].y}`;
|
|
2180
|
-
for (let
|
|
2181
|
-
const f = _[
|
|
2180
|
+
for (let E = 1; E < _.length; E++) {
|
|
2181
|
+
const f = _[E];
|
|
2182
2182
|
if (_.length <= 3)
|
|
2183
|
-
if (
|
|
2183
|
+
if (E === 1 && _.length === 3) {
|
|
2184
2184
|
F += ` Q ${f.x} ${f.y} ${_[2].x} ${_[2].y}`;
|
|
2185
2185
|
break;
|
|
2186
2186
|
} else
|
|
2187
2187
|
F += ` L ${f.x} ${f.y}`;
|
|
2188
2188
|
else {
|
|
2189
|
-
const B = _[
|
|
2190
|
-
if (
|
|
2191
|
-
const se = _[
|
|
2189
|
+
const B = _[E - 1];
|
|
2190
|
+
if (E === 1) {
|
|
2191
|
+
const se = _[E + 1], de = B.x + (f.x - B.x) * 0.3, ke = B.y + (f.y - B.y) * 0.3, ge = f.x - (se.x - B.x) * 0.1, me = f.y - (se.y - B.y) * 0.1;
|
|
2192
2192
|
F += ` C ${de} ${ke}, ${ge} ${me}, ${f.x} ${f.y}`;
|
|
2193
|
-
} else if (
|
|
2194
|
-
const se = _[
|
|
2193
|
+
} else if (E === _.length - 1) {
|
|
2194
|
+
const se = _[E - 2], de = B.x + (f.x - se.x) * 0.1, ke = B.y + (f.y - se.y) * 0.1, ge = f.x - (f.x - B.x) * 0.3, me = f.y - (f.y - B.y) * 0.3;
|
|
2195
2195
|
F += ` C ${de} ${ke}, ${ge} ${me}, ${f.x} ${f.y}`;
|
|
2196
2196
|
} else {
|
|
2197
|
-
const se = _[
|
|
2197
|
+
const se = _[E + 1], de = E >= 2 ? _[E - 2] : B, ke = B.x + (f.x - de.x) * 0.1, ge = B.y + (f.y - de.y) * 0.1, me = f.x - (se.x - B.x) * 0.1, ze = f.y - (se.y - B.y) * 0.1;
|
|
2198
2198
|
F += ` C ${ke} ${ge}, ${me} ${ze}, ${f.x} ${f.y}`;
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
@@ -2242,34 +2242,34 @@ const co = {
|
|
|
2242
2242
|
F.push(_[f]);
|
|
2243
2243
|
if (F.length > 0 && F[F.length - 1] !== _[_.length - 1] && F.push(_[_.length - 1]), F.length === 0) return "";
|
|
2244
2244
|
if (F.length === 1) return `M ${F[0].x} ${F[0].y}`;
|
|
2245
|
-
let
|
|
2245
|
+
let E = `M ${F[0].x} ${F[0].y}`;
|
|
2246
2246
|
if (F.length === 2)
|
|
2247
|
-
|
|
2247
|
+
E += ` L ${F[1].x} ${F[1].y}`;
|
|
2248
2248
|
else {
|
|
2249
2249
|
for (let B = 1; B < F.length - 1; B++) {
|
|
2250
2250
|
const se = F[B], de = F[B + 1], ke = (se.x + de.x) / 2, ge = (se.y + de.y) / 2;
|
|
2251
|
-
|
|
2251
|
+
E += ` Q ${se.x} ${se.y} ${ke} ${ge}`;
|
|
2252
2252
|
}
|
|
2253
2253
|
const f = F[F.length - 1];
|
|
2254
|
-
|
|
2254
|
+
E += ` Q ${f.x} ${f.y} ${f.x} ${f.y}`;
|
|
2255
2255
|
}
|
|
2256
|
-
return Vt.value =
|
|
2256
|
+
return Vt.value = E, E;
|
|
2257
2257
|
}), sa = U(() => {
|
|
2258
2258
|
if (!S.value || !b.value) return "";
|
|
2259
2259
|
if (It.value)
|
|
2260
2260
|
return It.value;
|
|
2261
|
-
const v = dt, i = vt, m = 3, ee = (
|
|
2262
|
-
const B = Math.max(0, Math.min(v,
|
|
2261
|
+
const v = dt, i = vt, m = 3, ee = (E, f) => {
|
|
2262
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(i, f)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / i)), ge = re(u.value, de, ke), me = G(ge.r, ge.g, ge.b);
|
|
2263
2263
|
return Fe(me, b.value);
|
|
2264
2264
|
}, _ = [], Y = [];
|
|
2265
|
-
for (let
|
|
2265
|
+
for (let E = -20; E <= v + 20; E += 2) {
|
|
2266
2266
|
let f = !1, B = -1;
|
|
2267
2267
|
for (let se = i - 1; se >= 1; se--) {
|
|
2268
|
-
const de = ee(
|
|
2268
|
+
const de = ee(E, se), ke = ee(E, se - 1);
|
|
2269
2269
|
if (de >= m && ke < m) {
|
|
2270
2270
|
let ge = se - 1, me = se;
|
|
2271
2271
|
for (let ze = 0; ze < 8; ze++) {
|
|
2272
|
-
const qe = (ge + me) / 2, Ge = ee(
|
|
2272
|
+
const qe = (ge + me) / 2, Ge = ee(E, qe);
|
|
2273
2273
|
if (Math.abs(Ge - m) < 0.01) {
|
|
2274
2274
|
B = qe, f = !0;
|
|
2275
2275
|
break;
|
|
@@ -2280,44 +2280,44 @@ const co = {
|
|
|
2280
2280
|
break;
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
2283
|
-
f && B >= 0 && Y.push({ x:
|
|
2283
|
+
f && B >= 0 && Y.push({ x: E, y: B });
|
|
2284
2284
|
}
|
|
2285
2285
|
if (Y.length === 0) return "";
|
|
2286
2286
|
if (Y.length > 4) {
|
|
2287
2287
|
_.push(Y[0]);
|
|
2288
|
-
const
|
|
2289
|
-
for (let B =
|
|
2288
|
+
const E = Math.floor(Y.length / 4);
|
|
2289
|
+
for (let B = E; B < Y.length - E; B += E)
|
|
2290
2290
|
_.push(Y[B]);
|
|
2291
2291
|
const f = Y[Y.length - 1];
|
|
2292
2292
|
_.push(f);
|
|
2293
2293
|
} else
|
|
2294
2294
|
_.push(...Y);
|
|
2295
2295
|
if (_.length > 0) {
|
|
2296
|
-
const
|
|
2297
|
-
|
|
2296
|
+
const E = _[0], f = _[_.length - 1];
|
|
2297
|
+
E.x < 0 && (E.x = 0), f.x < v && f.y > 5 && f.y < i - 5 ? _.push({ x: v, y: f.y }) : f.x > v && (f.x = v);
|
|
2298
2298
|
}
|
|
2299
2299
|
if (_.length < 2) return "";
|
|
2300
2300
|
if (_.length === 2)
|
|
2301
2301
|
return `M ${_[0].x} ${_[0].y} L ${_[1].x} ${_[1].y}`;
|
|
2302
2302
|
let F = `M ${_[0].x} ${_[0].y}`;
|
|
2303
|
-
for (let
|
|
2304
|
-
const f = _[
|
|
2303
|
+
for (let E = 1; E < _.length; E++) {
|
|
2304
|
+
const f = _[E];
|
|
2305
2305
|
if (_.length <= 3)
|
|
2306
|
-
if (
|
|
2306
|
+
if (E === 1 && _.length === 3) {
|
|
2307
2307
|
F += ` Q ${f.x} ${f.y} ${_[2].x} ${_[2].y}`;
|
|
2308
2308
|
break;
|
|
2309
2309
|
} else
|
|
2310
2310
|
F += ` L ${f.x} ${f.y}`;
|
|
2311
2311
|
else {
|
|
2312
|
-
const B = _[
|
|
2313
|
-
if (
|
|
2314
|
-
const se = _[
|
|
2312
|
+
const B = _[E - 1];
|
|
2313
|
+
if (E === 1) {
|
|
2314
|
+
const se = _[E + 1], de = B.x + (f.x - B.x) * 0.3, ke = B.y + (f.y - B.y) * 0.3, ge = f.x - (se.x - B.x) * 0.1, me = f.y - (se.y - B.y) * 0.1;
|
|
2315
2315
|
F += ` C ${de} ${ke}, ${ge} ${me}, ${f.x} ${f.y}`;
|
|
2316
|
-
} else if (
|
|
2317
|
-
const se = _[
|
|
2316
|
+
} else if (E === _.length - 1) {
|
|
2317
|
+
const se = _[E - 2], de = B.x + (f.x - se.x) * 0.1, ke = B.y + (f.y - se.y) * 0.1, ge = f.x - (f.x - B.x) * 0.3, me = f.y - (f.y - B.y) * 0.3;
|
|
2318
2318
|
F += ` C ${de} ${ke}, ${ge} ${me}, ${f.x} ${f.y}`;
|
|
2319
2319
|
} else {
|
|
2320
|
-
const se = _[
|
|
2320
|
+
const se = _[E + 1], de = E >= 2 ? _[E - 2] : B, ke = B.x + (f.x - de.x) * 0.1, ge = B.y + (f.y - de.y) * 0.1, me = f.x - (se.x - B.x) * 0.1, ze = f.y - (se.y - B.y) * 0.1;
|
|
2321
2321
|
F += ` C ${ke} ${ge}, ${me} ${ze}, ${f.x} ${f.y}`;
|
|
2322
2322
|
}
|
|
2323
2323
|
}
|
|
@@ -2327,21 +2327,21 @@ const co = {
|
|
|
2327
2327
|
U(() => {
|
|
2328
2328
|
if (!S.value || !et.value) return [];
|
|
2329
2329
|
const v = dt, i = vt, m = (_, Y) => {
|
|
2330
|
-
const F = Math.max(0, Math.min(v, _)),
|
|
2330
|
+
const F = Math.max(0, Math.min(v, _)), E = Math.max(0, Math.min(i, Y)), f = Math.max(0, Math.min(1, F / v)), B = Math.max(0, Math.min(1, 1 - E / i)), se = re(u.value, f, B), de = G(se.r, se.g, se.b);
|
|
2331
2331
|
return Fe(de, b.value);
|
|
2332
2332
|
}, ee = [];
|
|
2333
2333
|
for (let _ = 0; _ <= v; _ += 3)
|
|
2334
2334
|
for (let Y = 0; Y < i; Y++) {
|
|
2335
|
-
const F = m(_, Y),
|
|
2336
|
-
if (F < 3.1 &&
|
|
2335
|
+
const F = m(_, Y), E = m(_, Y + 1);
|
|
2336
|
+
if (F < 3.1 && E >= 3.1 || F >= 3.1 && E < 3.1) {
|
|
2337
2337
|
ee.push({ x: _, y: Y });
|
|
2338
2338
|
break;
|
|
2339
2339
|
}
|
|
2340
2340
|
}
|
|
2341
2341
|
for (let _ = i - 3; _ >= 0; _ -= 3)
|
|
2342
2342
|
for (let Y = 0; Y < v; Y++) {
|
|
2343
|
-
const F = m(Y, _),
|
|
2344
|
-
if (F < 3.1 &&
|
|
2343
|
+
const F = m(Y, _), E = m(Y + 1, _);
|
|
2344
|
+
if (F < 3.1 && E >= 3.1 || F >= 3.1 && E < 3.1) {
|
|
2345
2345
|
!ee.some(
|
|
2346
2346
|
(B) => Math.abs(B.x - Y) < 6 && Math.abs(B.y - _) < 6
|
|
2347
2347
|
) && ee.push({ x: Y, y: _ });
|
|
@@ -2350,51 +2350,51 @@ const co = {
|
|
|
2350
2350
|
}
|
|
2351
2351
|
return ee;
|
|
2352
2352
|
});
|
|
2353
|
-
const
|
|
2353
|
+
const yt = M([]), nt = M([]), it = M(""), zt = M(""), Vt = M(""), It = M(""), oa = U(() => S.value && b.value && (!yt.value.length || !nt.value.length)), Ca = U(() => S.value && b.value);
|
|
2354
2354
|
U(() => Ca.value), U(() => {
|
|
2355
2355
|
if (!S.value || !b.value) return [];
|
|
2356
|
-
if (q.value &&
|
|
2357
|
-
return
|
|
2358
|
-
const v = [], i = dt, m = vt, ee = 6, _ = (
|
|
2359
|
-
const B = Math.max(0, Math.min(i,
|
|
2356
|
+
if (q.value && yt.value.length > 0 || !oa.value && yt.value.length > 0)
|
|
2357
|
+
return yt.value;
|
|
2358
|
+
const v = [], i = dt, m = vt, ee = 6, _ = (E, f) => {
|
|
2359
|
+
const B = Math.max(0, Math.min(i, E)), se = Math.max(0, Math.min(m, f)), de = Math.max(0, Math.min(1, B / i)), ke = Math.max(0, Math.min(1, 1 - se / m)), ge = re(u.value, de, ke), me = G(ge.r, ge.g, ge.b);
|
|
2360
2360
|
return Fe(me, b.value);
|
|
2361
2361
|
}, Y = [];
|
|
2362
|
-
for (let
|
|
2362
|
+
for (let E = 0; E <= i; E += 6)
|
|
2363
2363
|
for (let f = 0; f < m - 1; f += 1) {
|
|
2364
|
-
const B = _(
|
|
2364
|
+
const B = _(E, f), se = _(E, f + 1);
|
|
2365
2365
|
if (B >= 4.5 && se < 4.5 || B < 4.5 && se >= 4.5) {
|
|
2366
2366
|
let de = f, ke = f + 1;
|
|
2367
2367
|
for (let ge = 0; ge < 6; ge++) {
|
|
2368
|
-
const me = (de + ke) / 2, ze = _(
|
|
2368
|
+
const me = (de + ke) / 2, ze = _(E, me);
|
|
2369
2369
|
if (Math.abs(ze - 4.5) < 0.05) {
|
|
2370
|
-
Y.push({ x:
|
|
2370
|
+
Y.push({ x: E, y: me });
|
|
2371
2371
|
break;
|
|
2372
2372
|
}
|
|
2373
2373
|
ze > 4.5 ? de = me : ke = me;
|
|
2374
2374
|
}
|
|
2375
|
-
(Y.length === 0 || Y[Y.length - 1].x !==
|
|
2375
|
+
(Y.length === 0 || Y[Y.length - 1].x !== E) && Y.push({ x: E, y: (de + ke) / 2 });
|
|
2376
2376
|
break;
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
|
-
const F = (
|
|
2379
|
+
const F = (E, f) => {
|
|
2380
2380
|
if (Y.length === 0) return 50;
|
|
2381
2381
|
let B = 1 / 0;
|
|
2382
2382
|
for (const se of Y) {
|
|
2383
2383
|
const de = Math.sqrt(
|
|
2384
|
-
Math.pow(
|
|
2384
|
+
Math.pow(E - se.x, 2) + Math.pow(f - se.y, 2)
|
|
2385
2385
|
);
|
|
2386
2386
|
B = Math.min(B, de);
|
|
2387
2387
|
}
|
|
2388
2388
|
return B;
|
|
2389
2389
|
};
|
|
2390
|
-
for (let
|
|
2390
|
+
for (let E = ee / 2; E < i; E += ee)
|
|
2391
2391
|
for (let f = ee / 2; f < m; f += ee)
|
|
2392
|
-
if (_(
|
|
2393
|
-
const se = F(
|
|
2392
|
+
if (_(E, f) < 4.5) {
|
|
2393
|
+
const se = F(E, f), de = 4;
|
|
2394
2394
|
if (se >= de) {
|
|
2395
2395
|
const ge = se - de, me = Math.min(ge / 40, 1), ze = 0.6, Ge = ze - (ze - 0.3) * Math.pow(me, 0.7), st = 1.8, ba = st - (st - 1.5) * Math.pow(me, 0.6);
|
|
2396
2396
|
Ge > 0.2 && ba > 0.8 && v.push({
|
|
2397
|
-
x:
|
|
2397
|
+
x: E,
|
|
2398
2398
|
y: f,
|
|
2399
2399
|
radius: ba,
|
|
2400
2400
|
opacity: Ge,
|
|
@@ -2402,7 +2402,7 @@ const co = {
|
|
|
2402
2402
|
});
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
return
|
|
2405
|
+
return yt.value = v, v;
|
|
2406
2406
|
}), U(() => {
|
|
2407
2407
|
if (!S.value || !b.value) return [];
|
|
2408
2408
|
if (q.value && nt.value.length > 0 || !oa.value && nt.value.length > 0)
|
|
@@ -2426,7 +2426,7 @@ const co = {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
2428
|
}
|
|
2429
|
-
const
|
|
2429
|
+
const E = (f, B) => {
|
|
2430
2430
|
let se = 1 / 0;
|
|
2431
2431
|
for (const de of F) {
|
|
2432
2432
|
const ke = Math.sqrt(Math.pow(f - de.x, 2) + Math.pow(B - de.y, 2));
|
|
@@ -2437,7 +2437,7 @@ const co = {
|
|
|
2437
2437
|
for (let f = _ / 2; f < i; f += _)
|
|
2438
2438
|
for (let B = _ / 2; B < m; B += _)
|
|
2439
2439
|
if (Y(f, B) < ee) {
|
|
2440
|
-
const de =
|
|
2440
|
+
const de = E(f, B), ke = 4;
|
|
2441
2441
|
if (de >= ke) {
|
|
2442
2442
|
const me = de - ke, ze = Math.min(me / 40, 1), qe = 0.6, st = qe - (qe - 0.3) * Math.pow(ze, 0.7), St = 1.8, Ia = St - (St - 1.5) * Math.pow(ze, 0.6);
|
|
2443
2443
|
st > 0.2 && Ia > 0.8 && v.push({
|
|
@@ -2454,19 +2454,19 @@ const co = {
|
|
|
2454
2454
|
});
|
|
2455
2455
|
const la = U(() => {
|
|
2456
2456
|
if (!S.value || !b.value) return "";
|
|
2457
|
-
const v = dt, i = vt, m = (F,
|
|
2458
|
-
const f = Math.max(0, Math.min(v, F)), B = Math.max(0, Math.min(i,
|
|
2457
|
+
const v = dt, i = vt, m = (F, E) => {
|
|
2458
|
+
const f = Math.max(0, Math.min(v, F)), B = Math.max(0, Math.min(i, E)), se = Math.max(0, Math.min(1, f / v)), de = Math.max(0, Math.min(1, 1 - B / i)), ke = re(u.value, se, de), ge = G(ke.r, ke.g, ke.b);
|
|
2459
2459
|
return Fe(ge, b.value);
|
|
2460
2460
|
}, ee = [], _ = [];
|
|
2461
2461
|
for (let F = -20; F <= v + 20; F += 2) {
|
|
2462
|
-
for (let
|
|
2463
|
-
if (m(F,
|
|
2464
|
-
ee.push({ x: F, y:
|
|
2462
|
+
for (let E = 0; E < i; E++)
|
|
2463
|
+
if (m(F, E) < 4.5) {
|
|
2464
|
+
ee.push({ x: F, y: E });
|
|
2465
2465
|
break;
|
|
2466
2466
|
}
|
|
2467
|
-
for (let
|
|
2468
|
-
if (m(F,
|
|
2469
|
-
_.push({ x: F, y:
|
|
2467
|
+
for (let E = i - 1; E >= 0; E--)
|
|
2468
|
+
if (m(F, E) < 4.5) {
|
|
2469
|
+
_.push({ x: F, y: E });
|
|
2470
2470
|
break;
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
@@ -2474,41 +2474,41 @@ const co = {
|
|
|
2474
2474
|
return "";
|
|
2475
2475
|
let Y = "M";
|
|
2476
2476
|
for (let F = 0; F < ee.length; F++) {
|
|
2477
|
-
const
|
|
2478
|
-
F === 0 ? Y += ` ${
|
|
2477
|
+
const E = ee[F];
|
|
2478
|
+
F === 0 ? Y += ` ${E.x} ${E.y}` : Y += ` L ${E.x} ${E.y}`;
|
|
2479
2479
|
}
|
|
2480
2480
|
for (let F = _.length - 1; F >= 0; F--) {
|
|
2481
|
-
const
|
|
2482
|
-
Y += ` L ${
|
|
2481
|
+
const E = _[F];
|
|
2482
|
+
Y += ` L ${E.x} ${E.y}`;
|
|
2483
2483
|
}
|
|
2484
2484
|
return Y += " Z", Y;
|
|
2485
2485
|
}), na = U(() => {
|
|
2486
2486
|
if (!S.value || !b.value) return "";
|
|
2487
|
-
const v = dt, i = vt, m = 3, ee = (
|
|
2488
|
-
const B = Math.max(0, Math.min(v,
|
|
2487
|
+
const v = dt, i = vt, m = 3, ee = (E, f) => {
|
|
2488
|
+
const B = Math.max(0, Math.min(v, E)), se = Math.max(0, Math.min(i, f)), de = Math.max(0, Math.min(1, B / v)), ke = Math.max(0, Math.min(1, 1 - se / i)), ge = re(u.value, de, ke), me = G(ge.r, ge.g, ge.b);
|
|
2489
2489
|
return Fe(me, b.value);
|
|
2490
2490
|
}, _ = [], Y = [];
|
|
2491
|
-
for (let
|
|
2491
|
+
for (let E = -20; E <= v + 20; E += 2) {
|
|
2492
2492
|
for (let f = 0; f < i; f++)
|
|
2493
|
-
if (ee(
|
|
2494
|
-
_.push({ x:
|
|
2493
|
+
if (ee(E, f) < m) {
|
|
2494
|
+
_.push({ x: E, y: f });
|
|
2495
2495
|
break;
|
|
2496
2496
|
}
|
|
2497
2497
|
for (let f = i - 1; f >= 0; f--)
|
|
2498
|
-
if (ee(
|
|
2499
|
-
Y.push({ x:
|
|
2498
|
+
if (ee(E, f) < m) {
|
|
2499
|
+
Y.push({ x: E, y: f });
|
|
2500
2500
|
break;
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
2503
|
if (_.length < 3 || Y.length < 3)
|
|
2504
2504
|
return "";
|
|
2505
2505
|
let F = "M";
|
|
2506
|
-
for (let
|
|
2507
|
-
const f = _[
|
|
2508
|
-
|
|
2506
|
+
for (let E = 0; E < _.length; E++) {
|
|
2507
|
+
const f = _[E];
|
|
2508
|
+
E === 0 ? F += ` ${f.x} ${f.y}` : F += ` L ${f.x} ${f.y}`;
|
|
2509
2509
|
}
|
|
2510
|
-
for (let
|
|
2511
|
-
const f = Y[
|
|
2510
|
+
for (let E = Y.length - 1; E >= 0; E--) {
|
|
2511
|
+
const f = Y[E];
|
|
2512
2512
|
F += ` L ${f.x} ${f.y}`;
|
|
2513
2513
|
}
|
|
2514
2514
|
return F += " Z", F;
|
|
@@ -2521,7 +2521,7 @@ const co = {
|
|
|
2521
2521
|
}, ra = (v) => {
|
|
2522
2522
|
if (!V.value) return;
|
|
2523
2523
|
const i = V.value.getBoundingClientRect(), m = "touches" in v ? v.touches[0].clientX : v.clientX, ee = "touches" in v ? v.touches[0].clientY : v.clientY, _ = Math.max(0, Math.min(i.width, m - i.left)), Y = Math.max(0, Math.min(i.height, ee - i.top));
|
|
2524
|
-
g.value = _ / i.width,
|
|
2524
|
+
g.value = _ / i.width, $.value = 1 - Y / i.height;
|
|
2525
2525
|
}, ua = (v) => {
|
|
2526
2526
|
l.disabled || (L.value = !0, ca(v), document.addEventListener("mousemove", Nt), document.addEventListener("mouseup", Bt), document.addEventListener("touchmove", Nt), document.addEventListener("touchend", Bt));
|
|
2527
2527
|
}, Nt = (v) => {
|
|
@@ -2541,14 +2541,14 @@ const co = {
|
|
|
2541
2541
|
}, we = (v) => {
|
|
2542
2542
|
if (!k.value) return;
|
|
2543
2543
|
const i = k.value.getBoundingClientRect(), m = "touches" in v ? v.touches[0].clientX : v.clientX, ee = Math.max(0, Math.min(i.width, m - i.left));
|
|
2544
|
-
A.value = ee / i.width,
|
|
2544
|
+
A.value = ee / i.width, H.value = Math.round(A.value * 100);
|
|
2545
2545
|
}, wt = () => {
|
|
2546
2546
|
const v = c.value;
|
|
2547
2547
|
if (v.length === 7 && v.startsWith("#")) {
|
|
2548
2548
|
const i = Ie(v);
|
|
2549
2549
|
if (i) {
|
|
2550
2550
|
const m = ve(i.r, i.g, i.b);
|
|
2551
|
-
u.value = m.h, g.value = m.s,
|
|
2551
|
+
u.value = m.h, g.value = m.s, $.value = m.v, Rt();
|
|
2552
2552
|
}
|
|
2553
2553
|
}
|
|
2554
2554
|
}, Pt = () => {
|
|
@@ -2558,23 +2558,23 @@ const co = {
|
|
|
2558
2558
|
const { r: v, g: i, b: m } = h.value;
|
|
2559
2559
|
if (v >= 0 && v <= 255 && i >= 0 && i <= 255 && m >= 0 && m <= 255) {
|
|
2560
2560
|
const ee = ve(v, i, m);
|
|
2561
|
-
u.value = ee.h, g.value = ee.s,
|
|
2561
|
+
u.value = ee.h, g.value = ee.s, $.value = ee.v, Ot(), ya(), ka();
|
|
2562
2562
|
}
|
|
2563
2563
|
}, ct = () => {
|
|
2564
2564
|
const { h: v, s: i, l: m } = C.value;
|
|
2565
2565
|
if (v >= 0 && v <= 360 && i >= 0 && i <= 100 && m >= 0 && m <= 100) {
|
|
2566
2566
|
const ee = X(v, i, m), _ = ve(ee.r, ee.g, ee.b);
|
|
2567
|
-
u.value = _.h, g.value = _.s,
|
|
2567
|
+
u.value = _.h, g.value = _.s, $.value = _.v, Ot(), Rt(), ka();
|
|
2568
2568
|
}
|
|
2569
2569
|
}, bt = () => {
|
|
2570
2570
|
const { l: v, c: i, h: m } = N.value;
|
|
2571
2571
|
if (v >= 0 && v <= 100 && i >= 0 && i <= 100 && m >= 0 && m <= 360) {
|
|
2572
2572
|
const ee = pe(v, i, m), _ = ve(ee.r, ee.g, ee.b);
|
|
2573
|
-
u.value = _.h, g.value = _.s,
|
|
2573
|
+
u.value = _.h, g.value = _.s, $.value = _.v, Ot(), Rt(), ya();
|
|
2574
2574
|
}
|
|
2575
2575
|
}, jt = () => {
|
|
2576
|
-
const v = Math.max(0, Math.min(100,
|
|
2577
|
-
A.value = v / 100,
|
|
2576
|
+
const v = Math.max(0, Math.min(100, H.value));
|
|
2577
|
+
A.value = v / 100, H.value = v;
|
|
2578
2578
|
}, va = () => {
|
|
2579
2579
|
const v = ["hex", "rgb", "hsl", "oklch"], m = (v.indexOf(D.value) + 1) % v.length;
|
|
2580
2580
|
D.value = v[m];
|
|
@@ -2595,7 +2595,7 @@ const co = {
|
|
|
2595
2595
|
const i = Ie(v);
|
|
2596
2596
|
if (i) {
|
|
2597
2597
|
const m = ve(i.r, i.g, i.b);
|
|
2598
|
-
u.value = m.h, g.value = m.s,
|
|
2598
|
+
u.value = m.h, g.value = m.s, $.value = m.v, Ot(), Rt();
|
|
2599
2599
|
}
|
|
2600
2600
|
}, Qa = () => {
|
|
2601
2601
|
S.value = !S.value;
|
|
@@ -2614,10 +2614,10 @@ const co = {
|
|
|
2614
2614
|
}
|
|
2615
2615
|
if (v) {
|
|
2616
2616
|
const i = ve(v.r, v.g, v.b);
|
|
2617
|
-
u.value = i.h, g.value = i.s,
|
|
2617
|
+
u.value = i.h, g.value = i.s, $.value = i.v, Ot(), Rt();
|
|
2618
2618
|
}
|
|
2619
2619
|
};
|
|
2620
|
-
return Le([u, g,
|
|
2620
|
+
return Le([u, g, $, A], () => {
|
|
2621
2621
|
Ot(), Rt(), ya(), ka();
|
|
2622
2622
|
const v = He(at.value);
|
|
2623
2623
|
v !== ye && (w.value ? (te && clearTimeout(te), te = setTimeout(() => {
|
|
@@ -2629,7 +2629,7 @@ const co = {
|
|
|
2629
2629
|
ue.value = !1;
|
|
2630
2630
|
}, 5)));
|
|
2631
2631
|
}, { deep: !0 }), Le(u, () => {
|
|
2632
|
-
S.value && l.compareColor && (
|
|
2632
|
+
S.value && l.compareColor && (yt.value = [], nt.value = [], it.value = "", zt.value = "", Vt.value = "", It.value = "");
|
|
2633
2633
|
}), Le(() => l.modelValue, (v) => {
|
|
2634
2634
|
if (v && !ue.value) {
|
|
2635
2635
|
const i = He(v), m = He(at.value);
|
|
@@ -2768,7 +2768,7 @@ const co = {
|
|
|
2768
2768
|
class: "ui-color-picker-cursor",
|
|
2769
2769
|
style: Oe({
|
|
2770
2770
|
left: `${g.value * 100}%`,
|
|
2771
|
-
top: `${(1 -
|
|
2771
|
+
top: `${(1 - $.value) * 100}%`,
|
|
2772
2772
|
backgroundColor: at.value
|
|
2773
2773
|
})
|
|
2774
2774
|
}, [...i[15] || (i[15] = [
|
|
@@ -2986,7 +2986,7 @@ const co = {
|
|
|
2986
2986
|
l.showAlpha ? (a(), o("div", Go, [
|
|
2987
2987
|
i[28] || (i[28] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
2988
2988
|
Xe(e("input", {
|
|
2989
|
-
"onUpdate:modelValue": i[4] || (i[4] = (m) =>
|
|
2989
|
+
"onUpdate:modelValue": i[4] || (i[4] = (m) => H.value = m),
|
|
2990
2990
|
onInput: jt,
|
|
2991
2991
|
class: "ui-color-picker-input",
|
|
2992
2992
|
type: "number",
|
|
@@ -2995,7 +2995,7 @@ const co = {
|
|
|
2995
2995
|
}, null, 544), [
|
|
2996
2996
|
[
|
|
2997
2997
|
Je,
|
|
2998
|
-
|
|
2998
|
+
H.value,
|
|
2999
2999
|
void 0,
|
|
3000
3000
|
{ number: !0 }
|
|
3001
3001
|
]
|
|
@@ -3074,7 +3074,7 @@ const co = {
|
|
|
3074
3074
|
l.showAlpha ? (a(), o("div", e1, [
|
|
3075
3075
|
i[32] || (i[32] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
3076
3076
|
Xe(e("input", {
|
|
3077
|
-
"onUpdate:modelValue": i[8] || (i[8] = (m) =>
|
|
3077
|
+
"onUpdate:modelValue": i[8] || (i[8] = (m) => H.value = m),
|
|
3078
3078
|
onInput: jt,
|
|
3079
3079
|
class: "ui-color-picker-input",
|
|
3080
3080
|
type: "number",
|
|
@@ -3083,7 +3083,7 @@ const co = {
|
|
|
3083
3083
|
}, null, 544), [
|
|
3084
3084
|
[
|
|
3085
3085
|
Je,
|
|
3086
|
-
|
|
3086
|
+
H.value,
|
|
3087
3087
|
void 0,
|
|
3088
3088
|
{ number: !0 }
|
|
3089
3089
|
]
|
|
@@ -3162,7 +3162,7 @@ const co = {
|
|
|
3162
3162
|
l.showAlpha ? (a(), o("div", n1, [
|
|
3163
3163
|
i[36] || (i[36] = e("label", { class: "ui-color-picker-label" }, "A", -1)),
|
|
3164
3164
|
Xe(e("input", {
|
|
3165
|
-
"onUpdate:modelValue": i[12] || (i[12] = (m) =>
|
|
3165
|
+
"onUpdate:modelValue": i[12] || (i[12] = (m) => H.value = m),
|
|
3166
3166
|
onInput: jt,
|
|
3167
3167
|
class: "ui-color-picker-input",
|
|
3168
3168
|
type: "number",
|
|
@@ -3171,7 +3171,7 @@ const co = {
|
|
|
3171
3171
|
}, null, 544), [
|
|
3172
3172
|
[
|
|
3173
3173
|
Je,
|
|
3174
|
-
|
|
3174
|
+
H.value,
|
|
3175
3175
|
void 0,
|
|
3176
3176
|
{ number: !0 }
|
|
3177
3177
|
]
|
|
@@ -3289,12 +3289,12 @@ const co = {
|
|
|
3289
3289
|
},
|
|
3290
3290
|
emits: ["update:modelValue"],
|
|
3291
3291
|
setup(s, { emit: r }) {
|
|
3292
|
-
const t = s, l = r, z =
|
|
3292
|
+
const t = s, l = r, z = M(), V = M(), y = M(!1), k = U({
|
|
3293
3293
|
get: () => t.modelValue,
|
|
3294
3294
|
set: (h) => l("update:modelValue", h)
|
|
3295
3295
|
}), u = U(() => t.modelValue || "#000000"), {
|
|
3296
3296
|
floatingStyle: g,
|
|
3297
|
-
updatePosition:
|
|
3297
|
+
updatePosition: $,
|
|
3298
3298
|
cleanup: A
|
|
3299
3299
|
} = Oa({
|
|
3300
3300
|
trigger: z,
|
|
@@ -3311,14 +3311,14 @@ const co = {
|
|
|
3311
3311
|
}
|
|
3312
3312
|
}
|
|
3313
3313
|
}), c = async () => {
|
|
3314
|
-
t.disabled || (y.value = !y.value, y.value && (await
|
|
3314
|
+
t.disabled || (y.value = !y.value, y.value && (await ht(), $()));
|
|
3315
3315
|
};
|
|
3316
3316
|
return Le(
|
|
3317
3317
|
[() => t.showContrast, () => t.compareColor],
|
|
3318
3318
|
() => {
|
|
3319
|
-
y.value &&
|
|
3319
|
+
y.value && ht(() => {
|
|
3320
3320
|
setTimeout(() => {
|
|
3321
|
-
|
|
3321
|
+
$();
|
|
3322
3322
|
}, 50);
|
|
3323
3323
|
});
|
|
3324
3324
|
},
|
|
@@ -3326,15 +3326,15 @@ const co = {
|
|
|
3326
3326
|
), Le(
|
|
3327
3327
|
() => t.modelValue,
|
|
3328
3328
|
() => {
|
|
3329
|
-
y.value && t.showContrast && t.compareColor &&
|
|
3329
|
+
y.value && t.showContrast && t.compareColor && ht(() => {
|
|
3330
3330
|
setTimeout(() => {
|
|
3331
|
-
|
|
3331
|
+
$();
|
|
3332
3332
|
}, 100);
|
|
3333
3333
|
});
|
|
3334
3334
|
}
|
|
3335
3335
|
), xt(() => {
|
|
3336
3336
|
A();
|
|
3337
|
-
}), (h,
|
|
3337
|
+
}), (h, H) => (a(), o("div", {
|
|
3338
3338
|
ref_key: "containerRef",
|
|
3339
3339
|
ref: z,
|
|
3340
3340
|
class: "ui-color-picker-button-container"
|
|
@@ -3356,7 +3356,7 @@ const co = {
|
|
|
3356
3356
|
d(n(_a))
|
|
3357
3357
|
]),
|
|
3358
3358
|
default: x(() => [
|
|
3359
|
-
|
|
3359
|
+
H[2] || (H[2] = Q(" Color ", -1))
|
|
3360
3360
|
]),
|
|
3361
3361
|
_: 1
|
|
3362
3362
|
}, 8, ["disabled"]),
|
|
@@ -3370,15 +3370,15 @@ const co = {
|
|
|
3370
3370
|
}, [
|
|
3371
3371
|
d(Za, $a({
|
|
3372
3372
|
modelValue: k.value,
|
|
3373
|
-
"onUpdate:modelValue":
|
|
3373
|
+
"onUpdate:modelValue": H[0] || (H[0] = (D) => k.value = D)
|
|
3374
3374
|
}, t, {
|
|
3375
|
-
"onUpdate:modelValue":
|
|
3375
|
+
"onUpdate:modelValue": H[1] || (H[1] = (D) => h.$emit("update:modelValue", D))
|
|
3376
3376
|
}), null, 16, ["modelValue"])
|
|
3377
3377
|
], 4)) : I("", !0)
|
|
3378
3378
|
]))
|
|
3379
3379
|
], 512));
|
|
3380
3380
|
}
|
|
3381
|
-
}), y1 = /* @__PURE__ */ De(C1, [["__scopeId", "data-v-2ccec31a"]]),
|
|
3381
|
+
}), y1 = /* @__PURE__ */ De(C1, [["__scopeId", "data-v-2ccec31a"]]), Ac = /* @__PURE__ */ Ve({
|
|
3382
3382
|
__name: "UiColorPicker",
|
|
3383
3383
|
props: {
|
|
3384
3384
|
modelValue: { default: "#EA00A8" },
|
|
@@ -3458,7 +3458,7 @@ const co = {
|
|
|
3458
3458
|
},
|
|
3459
3459
|
emits: ["rowClick", "rowSelect", "sort", "columnReorder", "cellUpdate"],
|
|
3460
3460
|
setup(s, { expose: r, emit: t }) {
|
|
3461
|
-
const l = s, z = t, V = ga(), y =
|
|
3461
|
+
const l = s, z = t, V = ga(), y = M(null), k = M([...l.data]), u = M([...l.columns]);
|
|
3462
3462
|
Le(() => l.data, (G) => {
|
|
3463
3463
|
k.value = [...G];
|
|
3464
3464
|
}, { deep: !0 }), Le(() => l.columns, (G) => {
|
|
@@ -3466,9 +3466,9 @@ const co = {
|
|
|
3466
3466
|
}, { deep: !0 });
|
|
3467
3467
|
const g = () => {
|
|
3468
3468
|
k.value = [...l.data], p.value.clear(), L.value.clear();
|
|
3469
|
-
},
|
|
3469
|
+
}, $ = () => {
|
|
3470
3470
|
u.value = [...l.columns];
|
|
3471
|
-
}, A =
|
|
3471
|
+
}, A = M(""), c = M("asc"), h = M({}), H = M({}), D = M(""), C = M(/* @__PURE__ */ new Set()), N = M(/* @__PURE__ */ new Set()), p = M(/* @__PURE__ */ new Set()), L = M(/* @__PURE__ */ new Map()), O = M(null), S = M(null), w = M(!1), q = M(0), Z = M(0), b = U(() => {
|
|
3472
3472
|
const G = {
|
|
3473
3473
|
"--_cols": l.columns.length.toString()
|
|
3474
3474
|
};
|
|
@@ -3539,7 +3539,7 @@ const co = {
|
|
|
3539
3539
|
fe != null && he.add(String(fe));
|
|
3540
3540
|
}), Array.from(he).sort().map((X) => ({ label: X, value: X }));
|
|
3541
3541
|
}, K = (G) => {
|
|
3542
|
-
|
|
3542
|
+
H.value[G] = !H.value[G];
|
|
3543
3543
|
}, ie = (G) => {
|
|
3544
3544
|
D.value = D.value === G ? "" : G;
|
|
3545
3545
|
}, ae = (G, he) => {
|
|
@@ -3557,8 +3557,8 @@ const co = {
|
|
|
3557
3557
|
for (let Pe = 0; Pe < Ne.length - 1; Pe++)
|
|
3558
3558
|
Fe = Fe[Ne[Pe]];
|
|
3559
3559
|
Fe[Ne[Ne.length - 1]] = X;
|
|
3560
|
-
const
|
|
3561
|
-
X !==
|
|
3560
|
+
const Ct = L.value.get(He);
|
|
3561
|
+
X !== Ct ? p.value.add(He) : p.value.delete(He), z("cellUpdate", G, he, X, pe);
|
|
3562
3562
|
}, le = (G, he) => {
|
|
3563
3563
|
if (l.reorderable) {
|
|
3564
3564
|
if (O.value = he, w.value = !0, q.value = G.clientX, Z.value = G.clientX, G.dataTransfer) {
|
|
@@ -3597,7 +3597,7 @@ const co = {
|
|
|
3597
3597
|
internalData: k,
|
|
3598
3598
|
internalColumns: u,
|
|
3599
3599
|
restoreData: g,
|
|
3600
|
-
restoreColumns:
|
|
3600
|
+
restoreColumns: $,
|
|
3601
3601
|
modifiedCells: p,
|
|
3602
3602
|
cellValues: L
|
|
3603
3603
|
});
|
|
@@ -3698,7 +3698,7 @@ const co = {
|
|
|
3698
3698
|
], 10, T1)) : I("", !0)
|
|
3699
3699
|
])
|
|
3700
3700
|
]),
|
|
3701
|
-
|
|
3701
|
+
H.value[X.key] ? (a(), o("div", z1, [
|
|
3702
3702
|
d(Ze, {
|
|
3703
3703
|
modelValue: h.value[X.key],
|
|
3704
3704
|
"onUpdate:modelValue": (pe) => h.value[X.key] = pe,
|
|
@@ -3857,7 +3857,7 @@ const co = {
|
|
|
3857
3857
|
], 6)
|
|
3858
3858
|
]));
|
|
3859
3859
|
}
|
|
3860
|
-
}),
|
|
3860
|
+
}), _c = /* @__PURE__ */ De(O1, [["__scopeId", "data-v-46867ee1"]]), R1 = { class: "ui-hero-content" }, F1 = {
|
|
3861
3861
|
key: 0,
|
|
3862
3862
|
class: "ui-hero-header"
|
|
3863
3863
|
}, q1 = {
|
|
@@ -3906,12 +3906,12 @@ const co = {
|
|
|
3906
3906
|
if (!r.gradient || r.variant !== "gradient" && r.variant !== "space") return null;
|
|
3907
3907
|
const { angle: A = "135deg", stops: c = [] } = r.gradient;
|
|
3908
3908
|
if (c.length === 0) return null;
|
|
3909
|
-
const h = c.sort((
|
|
3909
|
+
const h = c.sort((H, D) => H.position - D.position).map((H) => `${H.color} ${H.position}%`).join(", ");
|
|
3910
3910
|
return `linear-gradient(${A}, ${h})`;
|
|
3911
3911
|
}), g = U(() => {
|
|
3912
3912
|
const A = {};
|
|
3913
3913
|
return u.value && (A["--hero-custom-background"] = u.value), A;
|
|
3914
|
-
}),
|
|
3914
|
+
}), $ = U(() => {
|
|
3915
3915
|
const A = { ...k.value };
|
|
3916
3916
|
return u.value && (A["--shadow-gradient"] = u.value), A["--border-color"] = r.borderColor, A;
|
|
3917
3917
|
});
|
|
@@ -3920,7 +3920,7 @@ const co = {
|
|
|
3920
3920
|
`ui-hero-wrapper--${s.variant}`,
|
|
3921
3921
|
`ui-hero-wrapper--shadow-${s.shadow}`
|
|
3922
3922
|
]]),
|
|
3923
|
-
style: Oe(
|
|
3923
|
+
style: Oe($.value)
|
|
3924
3924
|
}, [
|
|
3925
3925
|
e("div", {
|
|
3926
3926
|
class: be(["ui-hero", [
|
|
@@ -3954,7 +3954,7 @@ const co = {
|
|
|
3954
3954
|
], 6)
|
|
3955
3955
|
], 6));
|
|
3956
3956
|
}
|
|
3957
|
-
}),
|
|
3957
|
+
}), Tc = /* @__PURE__ */ De(Q1, [["__scopeId", "data-v-00e0d581"]]), At = M("system"), Ma = M(!1), Ta = "strands-ui-theme";
|
|
3958
3958
|
function X1() {
|
|
3959
3959
|
return typeof window > "u" ? !1 : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3960
3960
|
}
|
|
@@ -4086,13 +4086,13 @@ const ol = {
|
|
|
4086
4086
|
includeLabel: { type: Boolean, default: !1 }
|
|
4087
4087
|
},
|
|
4088
4088
|
setup(s) {
|
|
4089
|
-
const r = s, { isForced: t } = sl(), { currentTheme: l, themeLabel: z, setTheme: V, cycleTheme: y, themeOptions: k } = al(), u = U(() => t.value), g =
|
|
4089
|
+
const r = s, { isForced: t } = sl(), { currentTheme: l, themeLabel: z, setTheme: V, cycleTheme: y, themeOptions: k } = al(), u = U(() => t.value), g = M(!1), $ = {
|
|
4090
4090
|
sun: ms,
|
|
4091
4091
|
moon: ps,
|
|
4092
4092
|
monitor: Ea,
|
|
4093
4093
|
"chevron-up": qa,
|
|
4094
4094
|
"chevron-down": _a
|
|
4095
|
-
}, A = (C) =>
|
|
4095
|
+
}, A = (C) => $[C] || Ea, c = U(() => l.value === "dark" ? "moon" : l.value === "light" ? "sun" : "monitor"), h = U(() => l.value === "dark" ? "Light" : l.value === "light" ? "System" : "Dark"), H = () => {
|
|
4096
4096
|
r.variant === "button" && y();
|
|
4097
4097
|
}, D = (C) => {
|
|
4098
4098
|
C.target.closest(".ui-theme-toggle-dropdown") || (g.value = !1);
|
|
@@ -4111,7 +4111,7 @@ const ol = {
|
|
|
4111
4111
|
variant: "ghost",
|
|
4112
4112
|
size: s.size,
|
|
4113
4113
|
disabled: u.value,
|
|
4114
|
-
onClick: N[0] || (N[0] = (p) => u.value ? null :
|
|
4114
|
+
onClick: N[0] || (N[0] = (p) => u.value ? null : H),
|
|
4115
4115
|
title: u.value ? "Theme is locked by app settings" : `Switch to ${h.value.toLowerCase()} theme`,
|
|
4116
4116
|
class: be(["ui-theme-toggle-button", { "ui-theme-toggle--disabled": u.value }])
|
|
4117
4117
|
}, Zt({
|
|
@@ -4219,7 +4219,7 @@ const ol = {
|
|
|
4219
4219
|
])) : I("", !0)
|
|
4220
4220
|
], 2));
|
|
4221
4221
|
}
|
|
4222
|
-
}),
|
|
4222
|
+
}), zc = /* @__PURE__ */ De(rl, [["__scopeId", "data-v-1edc8bae"]]), ul = {
|
|
4223
4223
|
key: 0,
|
|
4224
4224
|
class: "slider-header"
|
|
4225
4225
|
}, cl = ["for"], dl = {
|
|
@@ -4274,16 +4274,16 @@ const ol = {
|
|
|
4274
4274
|
},
|
|
4275
4275
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
4276
4276
|
setup(s, { emit: r }) {
|
|
4277
|
-
const t = s, l = r, z =
|
|
4277
|
+
const t = s, l = r, z = M(), V = M(!1), y = M(0), k = M(null), u = M(0), g = U(() => t.modelValue !== void 0 ? Number(t.modelValue) : t.value !== void 0 ? Number(t.value) : u.value);
|
|
4278
4278
|
Le(() => t.value, (S) => {
|
|
4279
4279
|
S !== void 0 && (u.value = Number(S));
|
|
4280
4280
|
}, { immediate: !0 }), Le(() => t.modelValue, (S) => {
|
|
4281
4281
|
S !== void 0 && (u.value = Number(S));
|
|
4282
4282
|
}, { immediate: !0 });
|
|
4283
|
-
const
|
|
4283
|
+
const $ = U(() => {
|
|
4284
4284
|
const S = t.max - t.min, w = (g.value - t.min) / S * 100;
|
|
4285
4285
|
return Math.max(0, Math.min(100, w));
|
|
4286
|
-
}), A = U(() => g.value?.toFixed(t.step < 1 ? 1 : 0) || "0"), c = U(() => `slider-size-${t.size}`), h = U(() => t.color ? `slider-color-${t.color}` : ""),
|
|
4286
|
+
}), A = U(() => g.value?.toFixed(t.step < 1 ? 1 : 0) || "0"), c = U(() => `slider-size-${t.size}`), h = U(() => t.color ? `slider-color-${t.color}` : ""), H = U(() => {
|
|
4287
4287
|
if (!t.showTicks) return [];
|
|
4288
4288
|
const S = [], w = t.max - t.min, q = w / (t.tickCount - 1);
|
|
4289
4289
|
for (let Z = 0; Z < t.tickCount; Z++) {
|
|
@@ -4362,18 +4362,18 @@ const ol = {
|
|
|
4362
4362
|
e("div", hl, [
|
|
4363
4363
|
e("div", {
|
|
4364
4364
|
class: "slider-progress",
|
|
4365
|
-
style: Oe({ width:
|
|
4365
|
+
style: Oe({ width: $.value + "%" })
|
|
4366
4366
|
}, null, 4)
|
|
4367
4367
|
]),
|
|
4368
4368
|
e("div", {
|
|
4369
4369
|
class: "slider-thumb",
|
|
4370
|
-
style: Oe({ left:
|
|
4370
|
+
style: Oe({ left: $.value + "%" })
|
|
4371
4371
|
}, null, 4)
|
|
4372
4372
|
]),
|
|
4373
4373
|
s.showMinMax ? (a(), o("div", gl, R(s.max) + R(s.unit), 1)) : I("", !0)
|
|
4374
4374
|
], 2),
|
|
4375
4375
|
s.showTicks ? (a(), o("div", Cl, [
|
|
4376
|
-
(a(!0), o(Ue, null, Ke(
|
|
4376
|
+
(a(!0), o(Ue, null, Ke(H.value, (q) => (a(), o("div", {
|
|
4377
4377
|
key: q.value,
|
|
4378
4378
|
class: "slider-tick",
|
|
4379
4379
|
style: Oe({ left: q.position + "%" })
|
|
@@ -4387,7 +4387,7 @@ const ol = {
|
|
|
4387
4387
|
])) : I("", !0)
|
|
4388
4388
|
], 2));
|
|
4389
4389
|
}
|
|
4390
|
-
}),
|
|
4390
|
+
}), Vc = /* @__PURE__ */ De(xl, [["__scopeId", "data-v-db4748a0"]]), Ml = {
|
|
4391
4391
|
key: 0,
|
|
4392
4392
|
class: "radio-group-label"
|
|
4393
4393
|
}, $l = {
|
|
@@ -4429,17 +4429,17 @@ const ol = {
|
|
|
4429
4429
|
},
|
|
4430
4430
|
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
4431
4431
|
setup(s, { emit: r }) {
|
|
4432
|
-
const t = s, l = r, z = U(() => `radio-group-size-${t.size}`), V = U(() => t.orientation === "horizontal" ? "radio-options-horizontal" : "radio-options-vertical"), y = (
|
|
4433
|
-
t.disabled ||
|
|
4434
|
-
}, k = (
|
|
4435
|
-
const c =
|
|
4432
|
+
const t = s, l = r, z = U(() => `radio-group-size-${t.size}`), V = U(() => t.orientation === "horizontal" ? "radio-options-horizontal" : "radio-options-vertical"), y = ($) => {
|
|
4433
|
+
t.disabled || $.disabled || t.modelValue !== $.value && (l("update:modelValue", $.value), l("change", $.value));
|
|
4434
|
+
}, k = ($) => {
|
|
4435
|
+
const c = $.target.value;
|
|
4436
4436
|
l("update:modelValue", c), l("change", c);
|
|
4437
|
-
}, u = (
|
|
4438
|
-
l("focus",
|
|
4439
|
-
}, g = (
|
|
4440
|
-
l("blur",
|
|
4437
|
+
}, u = ($) => {
|
|
4438
|
+
l("focus", $);
|
|
4439
|
+
}, g = ($) => {
|
|
4440
|
+
l("blur", $);
|
|
4441
4441
|
};
|
|
4442
|
-
return (
|
|
4442
|
+
return ($, A) => (a(), o("div", {
|
|
4443
4443
|
class: be(["radio-group", [
|
|
4444
4444
|
z.value,
|
|
4445
4445
|
{ "radio-group-disabled": s.disabled }
|
|
@@ -4500,7 +4500,7 @@ const ol = {
|
|
|
4500
4500
|
])) : I("", !0)
|
|
4501
4501
|
], 2));
|
|
4502
4502
|
}
|
|
4503
|
-
}),
|
|
4503
|
+
}), Ic = /* @__PURE__ */ De(Ul, [["__scopeId", "data-v-c78c278d"]]), Dl = {
|
|
4504
4504
|
key: 0,
|
|
4505
4505
|
class: "checkbox-group-label"
|
|
4506
4506
|
}, Nl = {
|
|
@@ -4572,7 +4572,7 @@ const ol = {
|
|
|
4572
4572
|
return C.length > 0 && C.every(
|
|
4573
4573
|
(N) => t.modelValue.includes(N.value)
|
|
4574
4574
|
);
|
|
4575
|
-
}), k = U(() => t.options.filter((N) => !N.disabled).some((N) => t.modelValue.includes(N.value))), u = (C) => t.modelValue.includes(C), g = (C) => t.options.find((p) => p.value === C)?.indeterminate || !1,
|
|
4575
|
+
}), k = U(() => t.options.filter((N) => !N.disabled).some((N) => t.modelValue.includes(N.value))), u = (C) => t.modelValue.includes(C), g = (C) => t.options.find((p) => p.value === C)?.indeterminate || !1, $ = (C) => {
|
|
4576
4576
|
t.disabled || C.disabled || A(C);
|
|
4577
4577
|
}, A = (C, N) => {
|
|
4578
4578
|
const p = [...t.modelValue], L = p.indexOf(C.value);
|
|
@@ -4590,7 +4590,7 @@ const ol = {
|
|
|
4590
4590
|
const N = C.map((L) => L.value), p = [.../* @__PURE__ */ new Set([...t.modelValue, ...N])];
|
|
4591
4591
|
l("update:modelValue", p), l("change", p);
|
|
4592
4592
|
}
|
|
4593
|
-
},
|
|
4593
|
+
}, H = (C) => {
|
|
4594
4594
|
l("focus", C);
|
|
4595
4595
|
}, D = (C) => {
|
|
4596
4596
|
l("blur", C);
|
|
@@ -4622,7 +4622,7 @@ const ol = {
|
|
|
4622
4622
|
"checkbox-option-indeterminate": g(p.value)
|
|
4623
4623
|
}
|
|
4624
4624
|
]]),
|
|
4625
|
-
onClick: (L) =>
|
|
4625
|
+
onClick: (L) => $(p)
|
|
4626
4626
|
}, [
|
|
4627
4627
|
e("input", {
|
|
4628
4628
|
id: `${s.fieldId}-${p.value}`,
|
|
@@ -4635,7 +4635,7 @@ const ol = {
|
|
|
4635
4635
|
indeterminate: g(p.value),
|
|
4636
4636
|
class: "checkbox-input",
|
|
4637
4637
|
onChange: (L) => A(p),
|
|
4638
|
-
onFocus:
|
|
4638
|
+
onFocus: H,
|
|
4639
4639
|
onBlur: D
|
|
4640
4640
|
}, null, 40, jl),
|
|
4641
4641
|
e("div", Ol, [
|
|
@@ -4707,7 +4707,7 @@ const ol = {
|
|
|
4707
4707
|
])) : I("", !0)
|
|
4708
4708
|
], 2));
|
|
4709
4709
|
}
|
|
4710
|
-
}),
|
|
4710
|
+
}), Lc = /* @__PURE__ */ De(on, [["__scopeId", "data-v-01e5e0f9"]]), ln = { class: "accui-component-scope" }, nn = {
|
|
4711
4711
|
key: 0,
|
|
4712
4712
|
class: "ui-pill-leading-icon"
|
|
4713
4713
|
}, rn = {
|
|
@@ -4779,7 +4779,7 @@ const ol = {
|
|
|
4779
4779
|
], 6))
|
|
4780
4780
|
]));
|
|
4781
4781
|
}
|
|
4782
|
-
}),
|
|
4782
|
+
}), Ec = /* @__PURE__ */ De(dn, [["__scopeId", "data-v-defab79f"]]), vn = (s, r) => {
|
|
4783
4783
|
const t = r[s];
|
|
4784
4784
|
if (!t) return !1;
|
|
4785
4785
|
if (typeof t == "function") {
|
|
@@ -4815,7 +4815,7 @@ const ol = {
|
|
|
4815
4815
|
], 2)) : I("", !0)
|
|
4816
4816
|
]));
|
|
4817
4817
|
}
|
|
4818
|
-
}), Et = /* @__PURE__ */ De(gn, [["__scopeId", "data-v-fe426315"]]), fa =
|
|
4818
|
+
}), Et = /* @__PURE__ */ De(gn, [["__scopeId", "data-v-fe426315"]]), fa = M([]), Ba = M(!1), Qe = M(!1);
|
|
4819
4819
|
function Tt() {
|
|
4820
4820
|
const { getUrl: s } = pt(), { currentSession: r } = ft(), t = U(() => fa.value.length > 0), l = U(
|
|
4821
4821
|
() => fa.value.filter(
|
|
@@ -4898,7 +4898,7 @@ function Tt() {
|
|
|
4898
4898
|
} finally {
|
|
4899
4899
|
Qe.value = !1;
|
|
4900
4900
|
}
|
|
4901
|
-
},
|
|
4901
|
+
}, $ = async (C, N) => {
|
|
4902
4902
|
Qe.value = !0;
|
|
4903
4903
|
try {
|
|
4904
4904
|
return (await z(s("mfaEmailVerify"), {
|
|
@@ -4948,7 +4948,7 @@ function Tt() {
|
|
|
4948
4948
|
default:
|
|
4949
4949
|
return "🔒";
|
|
4950
4950
|
}
|
|
4951
|
-
},
|
|
4951
|
+
}, H = (C) => {
|
|
4952
4952
|
switch (C) {
|
|
4953
4953
|
case "totp":
|
|
4954
4954
|
return "Authenticator App";
|
|
@@ -4979,12 +4979,12 @@ function Tt() {
|
|
|
4979
4979
|
verifyTotpSetup: k,
|
|
4980
4980
|
setupEmailMfa: u,
|
|
4981
4981
|
sendEmailMfaCode: g,
|
|
4982
|
-
verifyEmailMfaCode:
|
|
4982
|
+
verifyEmailMfaCode: $,
|
|
4983
4983
|
disableMfaDevice: A,
|
|
4984
4984
|
regenerateBackupCodes: c,
|
|
4985
4985
|
// Helper methods
|
|
4986
4986
|
getDeviceTypeIcon: h,
|
|
4987
|
-
getDeviceTypeName:
|
|
4987
|
+
getDeviceTypeName: H,
|
|
4988
4988
|
formatLastUsed: D
|
|
4989
4989
|
};
|
|
4990
4990
|
}
|
|
@@ -5120,23 +5120,23 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5120
5120
|
]);
|
|
5121
5121
|
}
|
|
5122
5122
|
}, u = s, g = r, {
|
|
5123
|
-
loading:
|
|
5123
|
+
loading: $,
|
|
5124
5124
|
getDeviceTypeName: A
|
|
5125
5125
|
} = Tt(), {
|
|
5126
5126
|
verifyMfa: c,
|
|
5127
5127
|
sendMfaEmailCode: h,
|
|
5128
|
-
getMfaWebAuthnChallenge:
|
|
5128
|
+
getMfaWebAuthnChallenge: H,
|
|
5129
5129
|
mfaSessionId: D,
|
|
5130
5130
|
loading: C,
|
|
5131
5131
|
loadingMessage: N,
|
|
5132
5132
|
isSendingMfaEmail: p,
|
|
5133
5133
|
isVerifyingMfa: L
|
|
5134
|
-
} = ft(), O = U(() =>
|
|
5134
|
+
} = ft(), O = U(() => $.value || C.value), S = U({
|
|
5135
5135
|
get: () => u.show,
|
|
5136
5136
|
set: ($e) => {
|
|
5137
5137
|
$e || g("close");
|
|
5138
5138
|
}
|
|
5139
|
-
}), w =
|
|
5139
|
+
}), w = M(null), q = M(""), Z = M(""), b = M(""), T = M(""), te = M(!1), ue = M(!1), ye = M(!1), Me = M(0);
|
|
5140
5140
|
let Ae = null;
|
|
5141
5141
|
const Se = U(() => (u.availableMfaMethods || []).filter(
|
|
5142
5142
|
(re) => re.device_type !== "hardware" && re.device_type !== "passkey"
|
|
@@ -5226,10 +5226,10 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5226
5226
|
try {
|
|
5227
5227
|
if (!window.navigator.credentials || !window.PublicKeyCredential)
|
|
5228
5228
|
throw new Error("Hardware keys are not supported in this browser");
|
|
5229
|
-
const re = await
|
|
5229
|
+
const re = await H(w.value.id), ve = re.challenge.publicKey || re.challenge, Ie = (Ne) => {
|
|
5230
5230
|
if (!Ne || typeof Ne != "string")
|
|
5231
5231
|
return new Uint8Array(0);
|
|
5232
|
-
const Fe = "=".repeat((4 - Ne.length % 4) % 4),
|
|
5232
|
+
const Fe = "=".repeat((4 - Ne.length % 4) % 4), Ct = (Ne + Fe).replace(/-/g, "+").replace(/_/g, "/"), Pe = window.atob(Ct), Ut = new Uint8Array(Pe.length);
|
|
5233
5233
|
for (let at = 0; at < Pe.length; ++at)
|
|
5234
5234
|
Ut[at] = Pe.charCodeAt(at);
|
|
5235
5235
|
return Ut;
|
|
@@ -5324,7 +5324,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5324
5324
|
default: x(() => [
|
|
5325
5325
|
e("div", yn, [
|
|
5326
5326
|
O.value && !ue.value ? (a(), o("div", kn, [
|
|
5327
|
-
d(n(
|
|
5327
|
+
d(n(gt), { size: 24 }),
|
|
5328
5328
|
e("span", wn, R(n(p) || n(L) ? n(N) : "Loading..."), 1)
|
|
5329
5329
|
])) : (a(), o("div", bn, [
|
|
5330
5330
|
Se.value.length > 1 ? (a(), o("div", xn, [
|
|
@@ -5562,7 +5562,7 @@ const Cn = { class: "accui-component-scope" }, yn = { class: "mfa-verification-c
|
|
|
5562
5562
|
}
|
|
5563
5563
|
}), Ka = /* @__PURE__ */ De(ei, [["__scopeId", "data-v-f0750b5a"]]), Pa = /* @__PURE__ */ new Map(), ti = 300 * 1e3;
|
|
5564
5564
|
function za(s = {}) {
|
|
5565
|
-
const { getUrl: r, config: t } = pt(), l =
|
|
5565
|
+
const { getUrl: r, config: t } = pt(), l = M([]), z = M(!1), V = M(null), y = U(
|
|
5566
5566
|
() => l.value.filter((c) => c.enabled)
|
|
5567
5567
|
), k = async () => {
|
|
5568
5568
|
const c = JSON.stringify(s), h = Pa.get(c);
|
|
@@ -5570,14 +5570,14 @@ function za(s = {}) {
|
|
|
5570
5570
|
return l.value = h.data, h.data;
|
|
5571
5571
|
z.value = !0, V.value = null;
|
|
5572
5572
|
try {
|
|
5573
|
-
let
|
|
5573
|
+
let H = r("oauthProviders");
|
|
5574
5574
|
const D = s.redirectUrl || t.value?.oauth2RedirectUrl;
|
|
5575
5575
|
if (D) {
|
|
5576
5576
|
const p = new URLSearchParams();
|
|
5577
5577
|
let L = D;
|
|
5578
|
-
D.startsWith("/") && (L = `${window.location.origin}${D}`), p.append("redirect_url", L),
|
|
5578
|
+
D.startsWith("/") && (L = `${window.location.origin}${D}`), p.append("redirect_url", L), H = `${H}?${p.toString()}`;
|
|
5579
5579
|
}
|
|
5580
|
-
const C = await fetch(
|
|
5580
|
+
const C = await fetch(H, {
|
|
5581
5581
|
method: "GET",
|
|
5582
5582
|
headers: {
|
|
5583
5583
|
"Content-Type": "application/json"
|
|
@@ -5592,19 +5592,19 @@ function za(s = {}) {
|
|
|
5592
5592
|
data: l.value,
|
|
5593
5593
|
timestamp: Date.now()
|
|
5594
5594
|
});
|
|
5595
|
-
} catch (
|
|
5596
|
-
const D =
|
|
5595
|
+
} catch (H) {
|
|
5596
|
+
const D = H instanceof Error ? H.message : "Failed to fetch OAuth providers";
|
|
5597
5597
|
V.value = D;
|
|
5598
5598
|
} finally {
|
|
5599
5599
|
z.value = !1;
|
|
5600
5600
|
}
|
|
5601
5601
|
}, u = async (c, h) => {
|
|
5602
|
-
const
|
|
5603
|
-
if (
|
|
5604
|
-
let L =
|
|
5605
|
-
|
|
5602
|
+
const H = { ...s, ...h }, D = new URLSearchParams();
|
|
5603
|
+
if (H.redirectUrl) {
|
|
5604
|
+
let L = H.redirectUrl;
|
|
5605
|
+
H.redirectUrl.startsWith("/") && (L = `${window.location.origin}${H.redirectUrl}`), D.append("redirect_url", L);
|
|
5606
5606
|
}
|
|
5607
|
-
|
|
5607
|
+
H.scopes && H.scopes.length > 0 && D.append("scopes", H.scopes.join(","));
|
|
5608
5608
|
const C = D.toString(), N = r("oauthProvider").replace("{provider_id}", c), p = C ? `${N}?${C}` : N;
|
|
5609
5609
|
try {
|
|
5610
5610
|
const L = await fetch(p, {
|
|
@@ -5627,16 +5627,16 @@ function za(s = {}) {
|
|
|
5627
5627
|
}
|
|
5628
5628
|
}, g = async (c, h) => {
|
|
5629
5629
|
try {
|
|
5630
|
-
const
|
|
5631
|
-
if (!
|
|
5630
|
+
const H = l.value.find((D) => D.id === c);
|
|
5631
|
+
if (!H)
|
|
5632
5632
|
throw new Error(`OAuth provider '${c}' not found`);
|
|
5633
|
-
if (!
|
|
5633
|
+
if (!H.auth_url)
|
|
5634
5634
|
throw new Error(`No auth URL configured for provider '${c}'`);
|
|
5635
|
-
window.location.href =
|
|
5636
|
-
} catch (
|
|
5637
|
-
throw V.value =
|
|
5635
|
+
window.location.href = H.auth_url;
|
|
5636
|
+
} catch (H) {
|
|
5637
|
+
throw V.value = H instanceof Error ? H.message : "Failed to redirect to OAuth provider", H;
|
|
5638
5638
|
}
|
|
5639
|
-
},
|
|
5639
|
+
}, $ = (c) => l.value.find((h) => h.id === c), A = (c) => {
|
|
5640
5640
|
if (c.iconUrl)
|
|
5641
5641
|
return c.iconUrl;
|
|
5642
5642
|
switch (c.id.toLowerCase()) {
|
|
@@ -5661,7 +5661,7 @@ function za(s = {}) {
|
|
|
5661
5661
|
fetchProviders: k,
|
|
5662
5662
|
getProviderAuthUrl: u,
|
|
5663
5663
|
redirectToProvider: g,
|
|
5664
|
-
getProviderById:
|
|
5664
|
+
getProviderById: $,
|
|
5665
5665
|
getProviderIcon: A
|
|
5666
5666
|
};
|
|
5667
5667
|
}
|
|
@@ -5817,18 +5817,18 @@ const ai = {
|
|
|
5817
5817
|
signIn: k,
|
|
5818
5818
|
mfaRequired: u,
|
|
5819
5819
|
availableMfaMethods: g,
|
|
5820
|
-
currentUser:
|
|
5820
|
+
currentUser: $,
|
|
5821
5821
|
loadingMessage: A
|
|
5822
5822
|
} = ft(), {
|
|
5823
5823
|
enabledProviders: c,
|
|
5824
5824
|
loading: h,
|
|
5825
|
-
fetchProviders:
|
|
5825
|
+
fetchProviders: H,
|
|
5826
5826
|
redirectToProvider: D
|
|
5827
5827
|
} = za({
|
|
5828
5828
|
redirectUrl: t.redirectUrl
|
|
5829
5829
|
});
|
|
5830
5830
|
We(() => {
|
|
5831
|
-
|
|
5831
|
+
H().catch((ae) => {
|
|
5832
5832
|
});
|
|
5833
5833
|
});
|
|
5834
5834
|
const C = U(() => c.value), N = {
|
|
@@ -5861,7 +5861,7 @@ const ai = {
|
|
|
5861
5861
|
async requestPasswordReset(ae) {
|
|
5862
5862
|
throw new Error("Password reset functionality is not yet implemented in the API. Please contact support.");
|
|
5863
5863
|
}
|
|
5864
|
-
}, p =
|
|
5864
|
+
}, p = M(t.mode), L = M(!1), O = M(""), S = M(!1), w = M(!1), q = Ye({
|
|
5865
5865
|
firstName: "",
|
|
5866
5866
|
lastName: "",
|
|
5867
5867
|
email: "",
|
|
@@ -5874,7 +5874,7 @@ const ai = {
|
|
|
5874
5874
|
ae && (w.value = !0);
|
|
5875
5875
|
}, { immediate: !0 });
|
|
5876
5876
|
const te = () => {
|
|
5877
|
-
w.value = !1, l("success",
|
|
5877
|
+
w.value = !1, l("success", $.value), y.value.onSignInUrl && typeof window < "u" && (window.location.href = y.value.onSignInUrl);
|
|
5878
5878
|
}, ue = () => {
|
|
5879
5879
|
w.value = !1;
|
|
5880
5880
|
}, ye = (ae) => {
|
|
@@ -6328,7 +6328,7 @@ const ai = {
|
|
|
6328
6328
|
loading: u,
|
|
6329
6329
|
currentUser: g
|
|
6330
6330
|
} = ft(), {
|
|
6331
|
-
enabledProviders:
|
|
6331
|
+
enabledProviders: $,
|
|
6332
6332
|
loading: A,
|
|
6333
6333
|
fetchProviders: c,
|
|
6334
6334
|
redirectToProvider: h
|
|
@@ -6341,7 +6341,7 @@ const ai = {
|
|
|
6341
6341
|
console.warn("Failed to fetch OAuth providers:", q);
|
|
6342
6342
|
});
|
|
6343
6343
|
});
|
|
6344
|
-
const
|
|
6344
|
+
const H = U(() => u.value), D = M(""), C = M(!1);
|
|
6345
6345
|
Le(V, (q) => {
|
|
6346
6346
|
q && (C.value = !0);
|
|
6347
6347
|
});
|
|
@@ -6399,8 +6399,8 @@ const ai = {
|
|
|
6399
6399
|
Q("to continue ")
|
|
6400
6400
|
])
|
|
6401
6401
|
], -1)),
|
|
6402
|
-
n(
|
|
6403
|
-
(a(!0), o(Ue, null, Ke(n(
|
|
6402
|
+
n($)?.length ? (a(), o("div", Ni, [
|
|
6403
|
+
(a(!0), o(Ue, null, Ke(n($), (b, T, te, ue) => {
|
|
6404
6404
|
const ye = [b.id, b.name, b.displayName, n(A)];
|
|
6405
6405
|
if (ue && ue.key === b.id && ss(ue, ye)) return ue;
|
|
6406
6406
|
const Me = (a(), Ce(n(ce), {
|
|
@@ -6432,7 +6432,7 @@ const ai = {
|
|
|
6432
6432
|
return Me.memo = ye, Me;
|
|
6433
6433
|
}, Z, 0), 128))
|
|
6434
6434
|
])) : I("", !0),
|
|
6435
|
-
n(
|
|
6435
|
+
n($)?.length ? (a(), o("div", qi, [...Z[7] || (Z[7] = [
|
|
6436
6436
|
e("span", { class: "divider-text" }, "Or sign in with email", -1)
|
|
6437
6437
|
])])) : I("", !0),
|
|
6438
6438
|
e("form", {
|
|
@@ -6494,8 +6494,8 @@ const ai = {
|
|
|
6494
6494
|
type: "submit",
|
|
6495
6495
|
variant: "primary",
|
|
6496
6496
|
"full-width": "",
|
|
6497
|
-
disabled:
|
|
6498
|
-
loading:
|
|
6497
|
+
disabled: H.value || !N.email || !N.password,
|
|
6498
|
+
loading: H.value,
|
|
6499
6499
|
"loading-text": "Signing in...",
|
|
6500
6500
|
class: "accui-auth-submit"
|
|
6501
6501
|
}, {
|
|
@@ -6549,7 +6549,7 @@ const ai = {
|
|
|
6549
6549
|
])
|
|
6550
6550
|
]));
|
|
6551
6551
|
}
|
|
6552
|
-
}),
|
|
6552
|
+
}), Hc = /* @__PURE__ */ De(Xi, [["__scopeId", "data-v-0ec23b52"]]), Ji = { class: "accui-component-scope" }, er = { class: "accui-auth-panel-container" }, tr = {
|
|
6553
6553
|
key: 0,
|
|
6554
6554
|
class: "accui-auth-panel"
|
|
6555
6555
|
}, ar = { class: "accui-auth-header" }, sr = { class: "accui-auth-content" }, or = { class: "signup-success" }, lr = { class: "signup-success-title" }, nr = { class: "signup-success-message" }, ir = {
|
|
@@ -6604,12 +6604,12 @@ const ai = {
|
|
|
6604
6604
|
console.warn("Failed to fetch OAuth providers:", O);
|
|
6605
6605
|
});
|
|
6606
6606
|
});
|
|
6607
|
-
const
|
|
6607
|
+
const $ = M(!1), A = M(""), c = M(!1), h = M(""), H = M("Magic Link Sent!"), D = M(""), C = Ye({
|
|
6608
6608
|
email: ""
|
|
6609
6609
|
});
|
|
6610
6610
|
U(() => C.email.trim() && C.email.includes("@"));
|
|
6611
6611
|
const N = async () => {
|
|
6612
|
-
|
|
6612
|
+
$.value = !0, A.value = "";
|
|
6613
6613
|
try {
|
|
6614
6614
|
const O = z("signUp"), S = await fetch(O, {
|
|
6615
6615
|
method: "POST",
|
|
@@ -6631,7 +6631,7 @@ const ai = {
|
|
|
6631
6631
|
throw new Error(q);
|
|
6632
6632
|
}
|
|
6633
6633
|
const w = await S.json();
|
|
6634
|
-
c.value = !0, D.value = C.email, h.value = w.message || "Magic link sent! Check your email.", w.message && (w.message.includes("already have an account") || w.message.includes("Welcome back") ?
|
|
6634
|
+
c.value = !0, D.value = C.email, h.value = w.message || "Magic link sent! Check your email.", w.message && (w.message.includes("already have an account") || w.message.includes("Welcome back") ? H.value = "Welcome Back!" : w.message.includes("Magic link sent") || w.message.includes("Check your email") ? H.value = "Magic Link Sent!" : H.value = "Success!"), l("success", {
|
|
6635
6635
|
email: C.email,
|
|
6636
6636
|
message: w.message || "Magic link sent! Check your email."
|
|
6637
6637
|
});
|
|
@@ -6647,10 +6647,10 @@ const ai = {
|
|
|
6647
6647
|
S = O.message;
|
|
6648
6648
|
A.value = S, l("error", S);
|
|
6649
6649
|
} finally {
|
|
6650
|
-
|
|
6650
|
+
$.value = !1;
|
|
6651
6651
|
}
|
|
6652
6652
|
}, p = () => {
|
|
6653
|
-
c.value = !1, h.value = "",
|
|
6653
|
+
c.value = !1, h.value = "", H.value = "Magic Link Sent!", D.value = "", C.email = "", A.value = "";
|
|
6654
6654
|
}, L = async (O) => {
|
|
6655
6655
|
try {
|
|
6656
6656
|
await g(O, {
|
|
@@ -6671,7 +6671,7 @@ const ai = {
|
|
|
6671
6671
|
e("div", sr, [
|
|
6672
6672
|
e("div", or, [
|
|
6673
6673
|
S[4] || (S[4] = e("div", { class: "signup-success-icon" }, "📧", -1)),
|
|
6674
|
-
e("h1", lr, R(
|
|
6674
|
+
e("h1", lr, R(H.value), 1),
|
|
6675
6675
|
e("p", nr, R(h.value), 1),
|
|
6676
6676
|
D.value ? (a(), o("div", ir, [
|
|
6677
6677
|
e("strong", null, R(D.value), 1)
|
|
@@ -6786,8 +6786,8 @@ const ai = {
|
|
|
6786
6786
|
type: "submit",
|
|
6787
6787
|
variant: "primary",
|
|
6788
6788
|
"full-width": "",
|
|
6789
|
-
disabled:
|
|
6790
|
-
loading:
|
|
6789
|
+
disabled: $.value || !C.email,
|
|
6790
|
+
loading: $.value,
|
|
6791
6791
|
"loading-text": "Sending magic link...",
|
|
6792
6792
|
class: "accui-auth-submit"
|
|
6793
6793
|
}, {
|
|
@@ -6849,7 +6849,7 @@ const ai = {
|
|
|
6849
6849
|
])
|
|
6850
6850
|
]));
|
|
6851
6851
|
}
|
|
6852
|
-
}),
|
|
6852
|
+
}), Uc = /* @__PURE__ */ De(Vr, [["__scopeId", "data-v-505263b9"]]), Ir = { class: "accui-component-scope" }, Lr = {
|
|
6853
6853
|
key: 0,
|
|
6854
6854
|
class: "complete-signup-container"
|
|
6855
6855
|
}, Er = { class: "complete-signup-success" }, Hr = {
|
|
@@ -6876,7 +6876,7 @@ const ai = {
|
|
|
6876
6876
|
},
|
|
6877
6877
|
emits: ["success", "error", "invalid-token", "request-new-link", "start-registration"],
|
|
6878
6878
|
setup(s, { emit: r }) {
|
|
6879
|
-
const t = s, l = r, { getUrl: z, getSupportEmail: V } = pt(t.config), { setAuthData: y } = ft(), k =
|
|
6879
|
+
const t = s, l = r, { getUrl: z, getSupportEmail: V } = pt(t.config), { setAuthData: y } = ft(), k = M(!1), u = M(!1), g = M(!1), $ = M(""), A = M(""), c = Ye({
|
|
6880
6880
|
firstName: "",
|
|
6881
6881
|
lastName: "",
|
|
6882
6882
|
password: ""
|
|
@@ -6884,7 +6884,7 @@ const ai = {
|
|
|
6884
6884
|
firstName: "",
|
|
6885
6885
|
lastName: "",
|
|
6886
6886
|
password: ""
|
|
6887
|
-
}),
|
|
6887
|
+
}), H = U(() => {
|
|
6888
6888
|
const p = c.password.trim(), L = c.password.length >= 8, O = !!t.token;
|
|
6889
6889
|
return p && L && O;
|
|
6890
6890
|
});
|
|
@@ -6911,13 +6911,13 @@ const ai = {
|
|
|
6911
6911
|
D.value && (window.location.href = D.value);
|
|
6912
6912
|
}, N = async () => {
|
|
6913
6913
|
if (!t.token) {
|
|
6914
|
-
|
|
6914
|
+
$.value = "Registration token is required";
|
|
6915
6915
|
return;
|
|
6916
6916
|
}
|
|
6917
|
-
if (
|
|
6917
|
+
if ($.value = "", Object.keys(h).forEach((p) => {
|
|
6918
6918
|
h[p] = "";
|
|
6919
|
-
}), !
|
|
6920
|
-
|
|
6919
|
+
}), !H.value) {
|
|
6920
|
+
$.value = "Please fill in all required fields correctly";
|
|
6921
6921
|
return;
|
|
6922
6922
|
}
|
|
6923
6923
|
g.value = !0;
|
|
@@ -6945,7 +6945,7 @@ const ai = {
|
|
|
6945
6945
|
C();
|
|
6946
6946
|
}, 2e3);
|
|
6947
6947
|
} catch (p) {
|
|
6948
|
-
p instanceof Error ? p.message.includes("CONFLICT") || p.message.includes("409") ?
|
|
6948
|
+
p instanceof Error ? p.message.includes("CONFLICT") || p.message.includes("409") ? $.value = "This account already exists. Please try signing in instead." : p.message.includes("BAD_REQUEST") || p.message.includes("400") ? ($.value = "Invalid or expired registration link. Please request a new one.", u.value = !0, l("invalid-token")) : $.value = p.message : $.value = "Failed to complete registration. Please try again.", l("error", $.value);
|
|
6949
6949
|
} finally {
|
|
6950
6950
|
g.value = !1;
|
|
6951
6951
|
}
|
|
@@ -7057,7 +7057,7 @@ const ai = {
|
|
|
7057
7057
|
type: "submit",
|
|
7058
7058
|
variant: "primary",
|
|
7059
7059
|
"full-width": "",
|
|
7060
|
-
disabled: g.value || !
|
|
7060
|
+
disabled: g.value || !H.value,
|
|
7061
7061
|
loading: g.value,
|
|
7062
7062
|
"loading-text": "Creating account..."
|
|
7063
7063
|
}, {
|
|
@@ -7067,13 +7067,13 @@ const ai = {
|
|
|
7067
7067
|
_: 1
|
|
7068
7068
|
}, 8, ["disabled", "loading"])
|
|
7069
7069
|
], 32),
|
|
7070
|
-
|
|
7070
|
+
$.value ? (a(), Ce(n(Ht), {
|
|
7071
7071
|
key: 0,
|
|
7072
7072
|
variant: "error",
|
|
7073
|
-
message:
|
|
7073
|
+
message: $.value,
|
|
7074
7074
|
class: "complete-signup-error-alert",
|
|
7075
7075
|
dismissible: "",
|
|
7076
|
-
onDismiss: L[4] || (L[4] = (O) =>
|
|
7076
|
+
onDismiss: L[4] || (L[4] = (O) => $.value = "")
|
|
7077
7077
|
}, null, 8, ["message"])) : I("", !0),
|
|
7078
7078
|
d(Et, {
|
|
7079
7079
|
config: t.config
|
|
@@ -7125,7 +7125,7 @@ const ai = {
|
|
|
7125
7125
|
]))
|
|
7126
7126
|
]));
|
|
7127
7127
|
}
|
|
7128
|
-
}),
|
|
7128
|
+
}), Dc = /* @__PURE__ */ De(Zr, [["__scopeId", "data-v-c7f95c2d"]]), Kr = {
|
|
7129
7129
|
key: 0,
|
|
7130
7130
|
class: "step-container"
|
|
7131
7131
|
}, Gr = { class: "step-actions" }, Yr = {
|
|
@@ -7158,14 +7158,14 @@ const ai = {
|
|
|
7158
7158
|
set: (S) => {
|
|
7159
7159
|
S || l("close");
|
|
7160
7160
|
}
|
|
7161
|
-
}), u =
|
|
7161
|
+
}), u = M(1), g = M(""), $ = M(""), A = M(""), c = M(""), h = M(null), H = M("");
|
|
7162
7162
|
Le(() => t.show, (S) => {
|
|
7163
|
-
S && (u.value = 1, g.value = "",
|
|
7163
|
+
S && (u.value = 1, g.value = "", $.value = "", A.value = "", c.value = "", h.value = null, H.value = "");
|
|
7164
7164
|
}), Le(() => h.value, async (S) => {
|
|
7165
7165
|
if (S?.qr_code_url)
|
|
7166
7166
|
try {
|
|
7167
7167
|
const w = `https://api.qrserver.com/v1/create-qr-code/?size=192x192&data=${encodeURIComponent(S.qr_code_url)}&bgcolor=ffffff&color=000000`;
|
|
7168
|
-
|
|
7168
|
+
H.value = w;
|
|
7169
7169
|
} catch (w) {
|
|
7170
7170
|
console.error("Failed to generate QR code:", w);
|
|
7171
7171
|
}
|
|
@@ -7174,15 +7174,15 @@ const ai = {
|
|
|
7174
7174
|
l("close");
|
|
7175
7175
|
}, C = async () => {
|
|
7176
7176
|
if (!g.value.trim()) {
|
|
7177
|
-
|
|
7177
|
+
$.value = "Device name is required";
|
|
7178
7178
|
return;
|
|
7179
7179
|
}
|
|
7180
|
-
|
|
7180
|
+
$.value = "";
|
|
7181
7181
|
try {
|
|
7182
7182
|
const S = await z(g.value.trim());
|
|
7183
7183
|
h.value = S, u.value = 2;
|
|
7184
7184
|
} catch (S) {
|
|
7185
|
-
console.error("Failed to setup TOTP:", S),
|
|
7185
|
+
console.error("Failed to setup TOTP:", S), $.value = S instanceof Error ? S.message : "Failed to setup TOTP";
|
|
7186
7186
|
}
|
|
7187
7187
|
}, N = (S) => {
|
|
7188
7188
|
c.value = "", S.length === 6 && p();
|
|
@@ -7224,7 +7224,7 @@ const ai = {
|
|
|
7224
7224
|
"onUpdate:modelValue": w[0] || (w[0] = (q) => g.value = q),
|
|
7225
7225
|
label: "Device Name",
|
|
7226
7226
|
placeholder: "My Authenticator",
|
|
7227
|
-
error:
|
|
7227
|
+
error: $.value,
|
|
7228
7228
|
disabled: n(y)
|
|
7229
7229
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7230
7230
|
e("div", Gr, [
|
|
@@ -7257,16 +7257,16 @@ const ai = {
|
|
|
7257
7257
|
e("p", { class: "step-description" }, " Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.) ")
|
|
7258
7258
|
], -1)),
|
|
7259
7259
|
e("div", Wr, [
|
|
7260
|
-
|
|
7260
|
+
H.value ? (a(), o("div", Qr, [
|
|
7261
7261
|
e("img", {
|
|
7262
|
-
src:
|
|
7262
|
+
src: H.value,
|
|
7263
7263
|
alt: "TOTP QR Code",
|
|
7264
7264
|
class: "qr-image",
|
|
7265
7265
|
width: "200",
|
|
7266
7266
|
height: "200"
|
|
7267
7267
|
}, null, 8, Xr)
|
|
7268
7268
|
])) : (a(), o("div", Jr, [
|
|
7269
|
-
d(n(
|
|
7269
|
+
d(n(gt), { size: 24 })
|
|
7270
7270
|
]))
|
|
7271
7271
|
]),
|
|
7272
7272
|
e("div", e2, [
|
|
@@ -7451,10 +7451,10 @@ const ai = {
|
|
|
7451
7451
|
set: (b) => {
|
|
7452
7452
|
b || l("close");
|
|
7453
7453
|
}
|
|
7454
|
-
}), g =
|
|
7454
|
+
}), g = M(1), $ = M(""), A = M(""), c = M(""), h = M(""), H = M(null), D = M(!1), C = M(0);
|
|
7455
7455
|
let N = null;
|
|
7456
7456
|
Le(() => t.show, (b) => {
|
|
7457
|
-
b && (g.value = 1,
|
|
7457
|
+
b && (g.value = 1, $.value = "", A.value = "", c.value = "", h.value = "", H.value = null, D.value = !1, C.value = 0, N && (clearInterval(N), N = null));
|
|
7458
7458
|
}), Le(c, () => {
|
|
7459
7459
|
h.value && (h.value = "");
|
|
7460
7460
|
}), Fa(() => {
|
|
@@ -7463,32 +7463,32 @@ const ai = {
|
|
|
7463
7463
|
const p = () => {
|
|
7464
7464
|
l("close");
|
|
7465
7465
|
}, L = async () => {
|
|
7466
|
-
if (
|
|
7466
|
+
if (!$.value.trim()) {
|
|
7467
7467
|
A.value = "Device name is required";
|
|
7468
7468
|
return;
|
|
7469
7469
|
}
|
|
7470
7470
|
A.value = "";
|
|
7471
7471
|
try {
|
|
7472
|
-
const b = await z(
|
|
7473
|
-
|
|
7472
|
+
const b = await z($.value.trim());
|
|
7473
|
+
H.value = b.device_id, await V(b.device_id), g.value = 2, q();
|
|
7474
7474
|
} catch (b) {
|
|
7475
7475
|
console.error("Failed to setup email MFA:", b), A.value = b instanceof Error ? b.message : "Failed to setup email MFA";
|
|
7476
7476
|
}
|
|
7477
7477
|
}, O = (b) => {
|
|
7478
7478
|
h.value = "", b.length === 6 && S();
|
|
7479
7479
|
}, S = async () => {
|
|
7480
|
-
if (!(!
|
|
7480
|
+
if (!(!H.value || !c.value)) {
|
|
7481
7481
|
h.value = "";
|
|
7482
7482
|
try {
|
|
7483
|
-
await y(
|
|
7483
|
+
await y(H.value, c.value) ? g.value = 3 : h.value = "Invalid verification code";
|
|
7484
7484
|
} catch (b) {
|
|
7485
7485
|
console.error("Failed to verify email MFA code:", b), h.value = b instanceof Error ? b.message : "Invalid verification code";
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
}, w = async () => {
|
|
7489
|
-
if (!(!
|
|
7489
|
+
if (!(!H.value || D.value))
|
|
7490
7490
|
try {
|
|
7491
|
-
await V(
|
|
7491
|
+
await V(H.value), q();
|
|
7492
7492
|
} catch (b) {
|
|
7493
7493
|
console.warn("Failed to resend email MFA verification code:", b);
|
|
7494
7494
|
}
|
|
@@ -7512,8 +7512,8 @@ const ai = {
|
|
|
7512
7512
|
e("p", { class: "email-mfa-setup-step-description" }, ' Give this email 2FA method a memorable name (e.g., "Personal Email", "Work Email") ')
|
|
7513
7513
|
], -1)),
|
|
7514
7514
|
d(n(Ze), {
|
|
7515
|
-
modelValue:
|
|
7516
|
-
"onUpdate:modelValue": T[0] || (T[0] = (te) =>
|
|
7515
|
+
modelValue: $.value,
|
|
7516
|
+
"onUpdate:modelValue": T[0] || (T[0] = (te) => $.value = te),
|
|
7517
7517
|
label: "Device Name",
|
|
7518
7518
|
placeholder: "Personal Email",
|
|
7519
7519
|
error: A.value,
|
|
@@ -7541,7 +7541,7 @@ const ai = {
|
|
|
7541
7541
|
}, 8, ["disabled"]),
|
|
7542
7542
|
d(n(ce), {
|
|
7543
7543
|
onClick: L,
|
|
7544
|
-
disabled:
|
|
7544
|
+
disabled: !$.value.trim() || n(k),
|
|
7545
7545
|
loading: n(k)
|
|
7546
7546
|
}, {
|
|
7547
7547
|
default: x(() => [...T[6] || (T[6] = [
|
|
@@ -7700,14 +7700,14 @@ const ai = {
|
|
|
7700
7700
|
},
|
|
7701
7701
|
emits: ["close", "success"],
|
|
7702
7702
|
setup(s, { emit: r }) {
|
|
7703
|
-
const t = s, l = r, { loading: z } = Tt(), { registerHardwareKey: V, completeHardwareKeyRegistration: y, currentSession: k } = ft(), u =
|
|
7703
|
+
const t = s, l = r, { loading: z } = Tt(), { registerHardwareKey: V, completeHardwareKeyRegistration: y, currentSession: k } = ft(), u = M(!1), g = U(() => z.value || u.value), $ = U(() => t.deviceType === "passkey" ? "Setup Passkey" : "Setup Hardware Key"), A = U({
|
|
7704
7704
|
get: () => t.show,
|
|
7705
7705
|
set: (b) => {
|
|
7706
7706
|
b || l("close");
|
|
7707
7707
|
}
|
|
7708
|
-
}), c =
|
|
7708
|
+
}), c = M(1), h = M(""), H = M(""), D = M("Please touch your hardware key when prompted"), C = M(""), N = M([]);
|
|
7709
7709
|
Le(() => t.show, (b) => {
|
|
7710
|
-
b && (c.value = 1, h.value = "",
|
|
7710
|
+
b && (c.value = 1, h.value = "", H.value = "", D.value = "Please touch your hardware key when prompted", C.value = "", N.value = []);
|
|
7711
7711
|
});
|
|
7712
7712
|
const p = () => {
|
|
7713
7713
|
l("close");
|
|
@@ -7794,10 +7794,10 @@ const ai = {
|
|
|
7794
7794
|
}
|
|
7795
7795
|
}, S = async () => {
|
|
7796
7796
|
if (!h.value.trim()) {
|
|
7797
|
-
|
|
7797
|
+
H.value = "Device name is required";
|
|
7798
7798
|
return;
|
|
7799
7799
|
}
|
|
7800
|
-
|
|
7800
|
+
H.value = "", c.value = 2;
|
|
7801
7801
|
}, w = async () => {
|
|
7802
7802
|
u.value = !0, c.value = 3, D.value = `Starting ${t.deviceType === "passkey" ? "passkey" : "hardware key"} registration...`;
|
|
7803
7803
|
try {
|
|
@@ -7865,7 +7865,7 @@ const ai = {
|
|
|
7865
7865
|
return (b, T) => (a(), Ce(ut, {
|
|
7866
7866
|
modelValue: A.value,
|
|
7867
7867
|
"onUpdate:modelValue": T[3] || (T[3] = (te) => A.value = te),
|
|
7868
|
-
title:
|
|
7868
|
+
title: $.value,
|
|
7869
7869
|
"card-class": "hardware-key-setup-modal"
|
|
7870
7870
|
}, {
|
|
7871
7871
|
default: x(() => [
|
|
@@ -7879,7 +7879,7 @@ const ai = {
|
|
|
7879
7879
|
"onUpdate:modelValue": T[0] || (T[0] = (te) => h.value = te),
|
|
7880
7880
|
label: "Device Name",
|
|
7881
7881
|
placeholder: "My Hardware Key",
|
|
7882
|
-
error:
|
|
7882
|
+
error: H.value,
|
|
7883
7883
|
disabled: g.value
|
|
7884
7884
|
}, null, 8, ["modelValue", "error", "disabled"]),
|
|
7885
7885
|
e("div", b2, [
|
|
@@ -7988,7 +7988,7 @@ const ai = {
|
|
|
7988
7988
|
c.value === 3 ? (a(), o("div", _2, [
|
|
7989
7989
|
e("div", T2, [
|
|
7990
7990
|
e("div", z2, [
|
|
7991
|
-
d(n(
|
|
7991
|
+
d(n(gt), {
|
|
7992
7992
|
size: 24,
|
|
7993
7993
|
class: "hardware-key-setup-loader"
|
|
7994
7994
|
})
|
|
@@ -8160,13 +8160,13 @@ const ai = {
|
|
|
8160
8160
|
set: (D) => {
|
|
8161
8161
|
D || l("close");
|
|
8162
8162
|
}
|
|
8163
|
-
}), u =
|
|
8163
|
+
}), u = M([]), g = M(!1);
|
|
8164
8164
|
Le(() => t.show, async (D) => {
|
|
8165
8165
|
D && t.device && (g.value = !1, u.value = []);
|
|
8166
8166
|
}), We(async () => {
|
|
8167
8167
|
t.show && t.device && (u.value = []);
|
|
8168
8168
|
});
|
|
8169
|
-
const
|
|
8169
|
+
const $ = () => {
|
|
8170
8170
|
l("close");
|
|
8171
8171
|
}, A = () => {
|
|
8172
8172
|
g.value = !0;
|
|
@@ -8187,7 +8187,7 @@ const ai = {
|
|
|
8187
8187
|
} catch (D) {
|
|
8188
8188
|
console.warn("Failed to copy backup codes to clipboard:", D);
|
|
8189
8189
|
}
|
|
8190
|
-
},
|
|
8190
|
+
}, H = () => {
|
|
8191
8191
|
if (u.value.length === 0) return;
|
|
8192
8192
|
const D = t.device?.device_name || "device", C = (/* @__PURE__ */ new Date()).toISOString().split("T")[0], N = `strands-backup-codes-${D}-${C}.txt`, p = [
|
|
8193
8193
|
"Strands Account Backup Codes",
|
|
@@ -8218,7 +8218,7 @@ const ai = {
|
|
|
8218
8218
|
}, {
|
|
8219
8219
|
default: x(() => [
|
|
8220
8220
|
n(V) ? (a(), o("div", F2, [
|
|
8221
|
-
d(n(
|
|
8221
|
+
d(n(gt), { size: 24 }),
|
|
8222
8222
|
C[2] || (C[2] = e("span", { class: "backup-codes-loading-text" }, "Loading backup codes...", -1))
|
|
8223
8223
|
])) : (a(), o("div", q2, [
|
|
8224
8224
|
s.device ? (a(), o("div", Z2, [
|
|
@@ -8278,7 +8278,7 @@ const ai = {
|
|
|
8278
8278
|
d(n(ce), {
|
|
8279
8279
|
variant: "secondary",
|
|
8280
8280
|
size: "sm",
|
|
8281
|
-
onClick:
|
|
8281
|
+
onClick: H
|
|
8282
8282
|
}, {
|
|
8283
8283
|
default: x(() => [...C[5] || (C[5] = [
|
|
8284
8284
|
Q(" 💾 Download ", -1)
|
|
@@ -8302,7 +8302,7 @@ const ai = {
|
|
|
8302
8302
|
}, 8, ["disabled", "loading"]),
|
|
8303
8303
|
d(n(ce), {
|
|
8304
8304
|
variant: "primary",
|
|
8305
|
-
onClick:
|
|
8305
|
+
onClick: $
|
|
8306
8306
|
}, {
|
|
8307
8307
|
default: x(() => [...C[8] || (C[8] = [
|
|
8308
8308
|
Q(" Done ", -1)
|
|
@@ -8372,7 +8372,7 @@ const ai = {
|
|
|
8372
8372
|
},
|
|
8373
8373
|
emits: ["confirm", "cancel"],
|
|
8374
8374
|
setup(s, { emit: r }) {
|
|
8375
|
-
const t = s, l = r, z =
|
|
8375
|
+
const t = s, l = r, z = M(!1), V = U({
|
|
8376
8376
|
get: () => t.show,
|
|
8377
8377
|
set: (u) => {
|
|
8378
8378
|
u || l("cancel");
|
|
@@ -8385,7 +8385,7 @@ const ai = {
|
|
|
8385
8385
|
return (u, g) => (a(), o("div", i3, [
|
|
8386
8386
|
d(ut, {
|
|
8387
8387
|
modelValue: V.value,
|
|
8388
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
8388
|
+
"onUpdate:modelValue": g[0] || (g[0] = ($) => V.value = $),
|
|
8389
8389
|
"card-class": "confirm-modal"
|
|
8390
8390
|
}, {
|
|
8391
8391
|
header: x(() => [
|
|
@@ -8465,7 +8465,7 @@ const ai = {
|
|
|
8465
8465
|
fetchMfaDevices: k,
|
|
8466
8466
|
disableMfaDevice: u,
|
|
8467
8467
|
sendEmailMfaCode: g
|
|
8468
|
-
} = Tt(),
|
|
8468
|
+
} = Tt(), $ = {
|
|
8469
8469
|
props: ["size"],
|
|
8470
8470
|
render() {
|
|
8471
8471
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -8504,7 +8504,7 @@ const ai = {
|
|
|
8504
8504
|
oe("path", { d: "M9 6.8a6 6 0 0 1 9 5.2c0 .47 0 1.17-.02 2" })
|
|
8505
8505
|
]);
|
|
8506
8506
|
}
|
|
8507
|
-
},
|
|
8507
|
+
}, H = {
|
|
8508
8508
|
props: ["size"],
|
|
8509
8509
|
render() {
|
|
8510
8510
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -8520,7 +8520,7 @@ const ai = {
|
|
|
8520
8520
|
oe("path", { d: "m12 17 .01 0" })
|
|
8521
8521
|
]);
|
|
8522
8522
|
}
|
|
8523
|
-
}, C =
|
|
8523
|
+
}, C = M("add"), N = Ye({}), p = Ye({}), L = M(!1), O = M(!1), S = M(!1), w = M(!1), q = U({
|
|
8524
8524
|
get: () => t.modelValue || !1,
|
|
8525
8525
|
set: (xe) => l("update:modelValue", xe)
|
|
8526
8526
|
}), Z = U(() => {
|
|
@@ -8578,7 +8578,7 @@ const ai = {
|
|
|
8578
8578
|
default: x(() => [
|
|
8579
8579
|
e("div", p3, [
|
|
8580
8580
|
n(V) ? (a(), o("div", f3, [
|
|
8581
|
-
d(n(
|
|
8581
|
+
d(n(gt), { size: 32 }),
|
|
8582
8582
|
ne[11] || (ne[11] = e("span", { class: "mfa-loading-text" }, "Loading MFA settings...", -1))
|
|
8583
8583
|
])) : (a(), o("div", m3, [
|
|
8584
8584
|
e("div", h3, [
|
|
@@ -8589,7 +8589,7 @@ const ai = {
|
|
|
8589
8589
|
]),
|
|
8590
8590
|
e("div", y3, [
|
|
8591
8591
|
n(z) ? (a(), o("span", k3, [
|
|
8592
|
-
d(
|
|
8592
|
+
d(H, {
|
|
8593
8593
|
size: 12,
|
|
8594
8594
|
class: "mfa-badge-icon"
|
|
8595
8595
|
}),
|
|
@@ -8612,7 +8612,7 @@ const ai = {
|
|
|
8612
8612
|
e("div", M3, [
|
|
8613
8613
|
e("div", $3, [
|
|
8614
8614
|
e("div", S3, [
|
|
8615
|
-
d(
|
|
8615
|
+
d($, { size: 24 })
|
|
8616
8616
|
]),
|
|
8617
8617
|
ne[14] || (ne[14] = e("div", { class: "mfa-device-option-info" }, [
|
|
8618
8618
|
e("h4", { class: "mfa-device-option-title" }, "Authenticator App"),
|
|
@@ -8698,7 +8698,7 @@ const ai = {
|
|
|
8698
8698
|
])) : j?.value === "manage" ? (a(), o("div", U3, [
|
|
8699
8699
|
n(y).length === 0 ? (a(), o("div", D3, [
|
|
8700
8700
|
e("div", N3, [
|
|
8701
|
-
d(
|
|
8701
|
+
d(H, { size: 48 })
|
|
8702
8702
|
]),
|
|
8703
8703
|
ne[24] || (ne[24] = e("h3", { class: "mfa-empty-title" }, "No MFA Devices", -1)),
|
|
8704
8704
|
ne[25] || (ne[25] = e("p", { class: "mfa-empty-description" }, "You haven't set up any multi-factor authentication devices yet.", -1)),
|
|
@@ -8719,7 +8719,7 @@ const ai = {
|
|
|
8719
8719
|
e("div", P3, [
|
|
8720
8720
|
e("div", j3, [
|
|
8721
8721
|
e("div", O3, [
|
|
8722
|
-
K.device_type === "totp" ? (a(), Ce(
|
|
8722
|
+
K.device_type === "totp" ? (a(), Ce($, {
|
|
8723
8723
|
key: 0,
|
|
8724
8724
|
size: 20
|
|
8725
8725
|
})) : K.device_type === "email" ? (a(), Ce(A, {
|
|
@@ -8860,7 +8860,7 @@ const ai = {
|
|
|
8860
8860
|
},
|
|
8861
8861
|
emits: ["close", "settings-updated"],
|
|
8862
8862
|
setup(s, { emit: r }) {
|
|
8863
|
-
const t = r, { currentUser: l, updateUserSettings: z } = ft(), V =
|
|
8863
|
+
const t = r, { currentUser: l, updateUserSettings: z } = ft(), V = M(!1), y = M(null), k = Ye({
|
|
8864
8864
|
levelUpSounds: l.value?.settings?.levelUpSounds ?? !0,
|
|
8865
8865
|
milestoneSounds: l.value?.settings?.milestoneSounds ?? !0
|
|
8866
8866
|
});
|
|
@@ -8873,7 +8873,7 @@ const ai = {
|
|
|
8873
8873
|
y.value || (y.value = "regular", Sa.playLevelUp(5), setTimeout(() => {
|
|
8874
8874
|
y.value === "regular" && (y.value = null);
|
|
8875
8875
|
}, 800));
|
|
8876
|
-
},
|
|
8876
|
+
}, $ = () => {
|
|
8877
8877
|
y.value || (y.value = "milestone", Sa.playLevelUp(50), setTimeout(() => {
|
|
8878
8878
|
y.value === "milestone" && (y.value = null);
|
|
8879
8879
|
}, 2500));
|
|
@@ -8898,11 +8898,11 @@ const ai = {
|
|
|
8898
8898
|
title: "Account Settings",
|
|
8899
8899
|
"card-class": "max-w-lg"
|
|
8900
8900
|
}, Zt({
|
|
8901
|
-
footer: x(({ handleClose:
|
|
8901
|
+
footer: x(({ handleClose: H }) => [
|
|
8902
8902
|
e("div", c4, [
|
|
8903
8903
|
d(lt, {
|
|
8904
8904
|
variant: "secondary",
|
|
8905
|
-
onClick:
|
|
8905
|
+
onClick: H
|
|
8906
8906
|
}, {
|
|
8907
8907
|
default: x(() => [...h[11] || (h[11] = [
|
|
8908
8908
|
Q(" Close ", -1)
|
|
@@ -8911,7 +8911,7 @@ const ai = {
|
|
|
8911
8911
|
}, 8, ["onClick"]),
|
|
8912
8912
|
d(lt, {
|
|
8913
8913
|
variant: "primary",
|
|
8914
|
-
onClick: (D) => A(
|
|
8914
|
+
onClick: (D) => A(H),
|
|
8915
8915
|
loading: V.value
|
|
8916
8916
|
}, {
|
|
8917
8917
|
default: x(() => [
|
|
@@ -8961,8 +8961,8 @@ const ai = {
|
|
|
8961
8961
|
id: "level-up-sounds",
|
|
8962
8962
|
modelValue: k.levelUpSounds,
|
|
8963
8963
|
"onUpdate:modelValue": [
|
|
8964
|
-
h[0] || (h[0] = (
|
|
8965
|
-
h[1] || (h[1] = (
|
|
8964
|
+
h[0] || (h[0] = (H) => k.levelUpSounds = H),
|
|
8965
|
+
h[1] || (h[1] = (H) => u("levelUpSounds", H))
|
|
8966
8966
|
]
|
|
8967
8967
|
}, null, 8, ["modelValue"])
|
|
8968
8968
|
])
|
|
@@ -8981,7 +8981,7 @@ const ai = {
|
|
|
8981
8981
|
d(lt, {
|
|
8982
8982
|
variant: "outline",
|
|
8983
8983
|
size: "sm",
|
|
8984
|
-
onClick:
|
|
8984
|
+
onClick: $,
|
|
8985
8985
|
disabled: y.value === "milestone",
|
|
8986
8986
|
"aria-label": y.value === "milestone" ? "Stop preview" : "Play preview",
|
|
8987
8987
|
class: "preview-icon-button"
|
|
@@ -9004,8 +9004,8 @@ const ai = {
|
|
|
9004
9004
|
id: "milestone-sounds",
|
|
9005
9005
|
modelValue: k.milestoneSounds,
|
|
9006
9006
|
"onUpdate:modelValue": [
|
|
9007
|
-
h[2] || (h[2] = (
|
|
9008
|
-
h[3] || (h[3] = (
|
|
9007
|
+
h[2] || (h[2] = (H) => k.milestoneSounds = H),
|
|
9008
|
+
h[3] || (h[3] = (H) => u("milestoneSounds", H))
|
|
9009
9009
|
]
|
|
9010
9010
|
}, null, 8, ["modelValue"])
|
|
9011
9011
|
])
|
|
@@ -9083,7 +9083,7 @@ const ai = {
|
|
|
9083
9083
|
oe("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
9084
9084
|
]);
|
|
9085
9085
|
}
|
|
9086
|
-
},
|
|
9086
|
+
}, $ = {
|
|
9087
9087
|
props: ["size"],
|
|
9088
9088
|
render() {
|
|
9089
9089
|
return oe("svg", { width: this.size, height: this.size, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, [
|
|
@@ -9101,7 +9101,7 @@ const ai = {
|
|
|
9101
9101
|
oe("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
9102
9102
|
]);
|
|
9103
9103
|
}
|
|
9104
|
-
}, c =
|
|
9104
|
+
}, c = M([]), h = M(null), H = M(!1), D = M(null), C = Ye({}), N = M(!1), p = U({
|
|
9105
9105
|
get: () => t.modelValue || !1,
|
|
9106
9106
|
set: (T) => l("update:modelValue", T)
|
|
9107
9107
|
});
|
|
@@ -9111,7 +9111,7 @@ const ai = {
|
|
|
9111
9111
|
(typeof t.modelValue > "u" || t.modelValue) && L();
|
|
9112
9112
|
});
|
|
9113
9113
|
const L = async () => {
|
|
9114
|
-
|
|
9114
|
+
H.value = !0, D.value = null;
|
|
9115
9115
|
try {
|
|
9116
9116
|
const T = await z();
|
|
9117
9117
|
if (c.value = T || [], c.value.length > 0) {
|
|
@@ -9126,7 +9126,7 @@ const ai = {
|
|
|
9126
9126
|
} catch (T) {
|
|
9127
9127
|
D.value = T instanceof Error ? T.message : "Failed to load sessions", console.error("Failed to load sessions:", T);
|
|
9128
9128
|
} finally {
|
|
9129
|
-
|
|
9129
|
+
H.value = !1;
|
|
9130
9130
|
}
|
|
9131
9131
|
}, O = async (T) => {
|
|
9132
9132
|
C[T] = !0;
|
|
@@ -9172,8 +9172,8 @@ const ai = {
|
|
|
9172
9172
|
}, {
|
|
9173
9173
|
default: x(() => [
|
|
9174
9174
|
e("div", p4, [
|
|
9175
|
-
|
|
9176
|
-
d(n(
|
|
9175
|
+
H.value ? (a(), o("div", f4, [
|
|
9176
|
+
d(n(gt), { size: 40 }),
|
|
9177
9177
|
te[1] || (te[1] = e("p", { class: "loading-text" }, "Loading sessions...", -1))
|
|
9178
9178
|
])) : c.value.length === 0 ? (a(), o("div", m4, [...te[2] || (te[2] = [
|
|
9179
9179
|
e("div", { class: "empty-icon" }, [
|
|
@@ -9268,7 +9268,7 @@ const ai = {
|
|
|
9268
9268
|
]),
|
|
9269
9269
|
e("div", N4, [
|
|
9270
9270
|
e("span", B4, [
|
|
9271
|
-
d(
|
|
9271
|
+
d($, { size: 14 })
|
|
9272
9272
|
]),
|
|
9273
9273
|
e("span", P4, " Last active " + R(Z(ue.last_activity_at || ue.created_at)), 1)
|
|
9274
9274
|
]),
|
|
@@ -9288,7 +9288,7 @@ const ai = {
|
|
|
9288
9288
|
disabled: N.value
|
|
9289
9289
|
}, {
|
|
9290
9290
|
default: x(() => [
|
|
9291
|
-
N.value ? (a(), Ce(n(
|
|
9291
|
+
N.value ? (a(), Ce(n(gt), {
|
|
9292
9292
|
key: 0,
|
|
9293
9293
|
size: 16
|
|
9294
9294
|
})) : (a(), o("span", q4, "End All Other Sessions"))
|
|
@@ -9391,7 +9391,7 @@ const ai = {
|
|
|
9391
9391
|
oe("circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor" })
|
|
9392
9392
|
]);
|
|
9393
9393
|
}
|
|
9394
|
-
}, V = s, y = r, { getSupportEmail: k, getUrl: u } = pt(V.config), { fetchProfile: g, updateProfile:
|
|
9394
|
+
}, V = s, y = r, { getSupportEmail: k, getUrl: u } = pt(V.config), { fetchProfile: g, updateProfile: $, changeEmail: A, changeUsername: c, getUsernameCooldown: h, checkUsernameAvailability: H, getUserSessions: D, currentUser: C, currentSession: N, isAuthenticated: p, refreshToken: L, signOut: O } = ft(), { activeMfaDevices: S, fetchMfaDevices: w } = Tt(), q = M(null), Z = M(!1), b = U(() => C.value || V.user || q.value), T = M(!1), te = M(!1), ue = M(!1), ye = M(!1), Me = M(!1), Ae = M(!1), Se = M(!1), xe = M(!1), ne = M(!1), j = M(!1), K = M(!1), ie = M(null), ae = M(""), W = M(""), le = M([]), _e = M(!1), Te = Ye({
|
|
9395
9395
|
canChange: !0,
|
|
9396
9396
|
cooldownEnd: null,
|
|
9397
9397
|
daysRemaining: 0
|
|
@@ -9399,7 +9399,7 @@ const ai = {
|
|
|
9399
9399
|
available: !1,
|
|
9400
9400
|
message: "",
|
|
9401
9401
|
checking: !1
|
|
9402
|
-
}), $e =
|
|
9402
|
+
}), $e = M(), re = Ye({
|
|
9403
9403
|
firstName: "",
|
|
9404
9404
|
lastName: "",
|
|
9405
9405
|
email: ""
|
|
@@ -9454,7 +9454,7 @@ const ai = {
|
|
|
9454
9454
|
return J.forEach((we) => {
|
|
9455
9455
|
we.device_type in P && P[we.device_type]++;
|
|
9456
9456
|
}), P;
|
|
9457
|
-
}),
|
|
9457
|
+
}), Ct = U(() => {
|
|
9458
9458
|
const J = [], P = Fe.value;
|
|
9459
9459
|
if (P.totp > 0 && J.push({
|
|
9460
9460
|
type: "totp",
|
|
@@ -9503,7 +9503,7 @@ const ai = {
|
|
|
9503
9503
|
const J = Dt.value * 5 / 360;
|
|
9504
9504
|
return Dt.value - aa.value - J;
|
|
9505
9505
|
});
|
|
9506
|
-
const sa = (J, P) => !J && !P ? "U" : `${J?.[0] || ""}${P?.[0] || ""}`.toUpperCase(),
|
|
9506
|
+
const sa = (J, P) => !J && !P ? "U" : `${J?.[0] || ""}${P?.[0] || ""}`.toUpperCase(), yt = async () => {
|
|
9507
9507
|
if (!(!V.autoFetch || V.user || !p.value)) {
|
|
9508
9508
|
Z.value = !0;
|
|
9509
9509
|
try {
|
|
@@ -9540,7 +9540,7 @@ const ai = {
|
|
|
9540
9540
|
nt();
|
|
9541
9541
|
}, 100);
|
|
9542
9542
|
}), We(() => {
|
|
9543
|
-
|
|
9543
|
+
yt(), nt();
|
|
9544
9544
|
});
|
|
9545
9545
|
const it = () => {
|
|
9546
9546
|
ae.value = "", W.value = "", Object.keys(he).forEach((J) => {
|
|
@@ -9549,7 +9549,7 @@ const ai = {
|
|
|
9549
9549
|
}, zt = async () => {
|
|
9550
9550
|
it(), T.value = !0;
|
|
9551
9551
|
try {
|
|
9552
|
-
const J = await
|
|
9552
|
+
const J = await $({
|
|
9553
9553
|
firstName: re.firstName,
|
|
9554
9554
|
lastName: re.lastName
|
|
9555
9555
|
});
|
|
@@ -9608,7 +9608,7 @@ const ai = {
|
|
|
9608
9608
|
}
|
|
9609
9609
|
Ee.checking = !0, Ee.message = "Checking availability...";
|
|
9610
9610
|
try {
|
|
9611
|
-
const P = await
|
|
9611
|
+
const P = await H(G.username);
|
|
9612
9612
|
if (Ee.available = P.available, Ee.message = P.message, !P.available) {
|
|
9613
9613
|
G.errors.username = "Username is not available";
|
|
9614
9614
|
return;
|
|
@@ -9781,7 +9781,7 @@ const ai = {
|
|
|
9781
9781
|
onClick: la,
|
|
9782
9782
|
disabled: te.value
|
|
9783
9783
|
}, [
|
|
9784
|
-
te.value ? (a(), Ce(n(
|
|
9784
|
+
te.value ? (a(), Ce(n(gt), {
|
|
9785
9785
|
key: 0,
|
|
9786
9786
|
size: 24,
|
|
9787
9787
|
variant: "spinner"
|
|
@@ -10008,8 +10008,8 @@ const ai = {
|
|
|
10008
10008
|
P[20] || (P[20] = e("h4", { class: "profile-field-title" }, "Two-Factor Authentication", -1)),
|
|
10009
10009
|
e("p", b0, R(b.value?.mfaEnabled ? "Enabled" : "Add extra security to your account"), 1)
|
|
10010
10010
|
]),
|
|
10011
|
-
|
|
10012
|
-
(a(!0), o(Ue, null, Ke(
|
|
10011
|
+
Ct.value.length > 0 ? (a(), o("div", x0, [
|
|
10012
|
+
(a(!0), o(Ue, null, Ke(Ct.value, (we) => (a(), o("div", {
|
|
10013
10013
|
key: we.type,
|
|
10014
10014
|
class: be([
|
|
10015
10015
|
"mfa-device-chip",
|
|
@@ -10244,19 +10244,19 @@ const ai = {
|
|
|
10244
10244
|
},
|
|
10245
10245
|
emits: ["success", "error", "back-to-signin"],
|
|
10246
10246
|
setup(s, { emit: r }) {
|
|
10247
|
-
const t = s, l = r, { getSupportEmail: z } = pt(t.config), V =
|
|
10247
|
+
const t = s, l = r, { getSupportEmail: z } = pt(t.config), V = M(!1), y = M(""), k = M(!1), u = Ye({
|
|
10248
10248
|
email: ""
|
|
10249
10249
|
}), g = async () => {
|
|
10250
10250
|
V.value = !0, y.value = "";
|
|
10251
10251
|
try {
|
|
10252
|
-
await new Promise((
|
|
10252
|
+
await new Promise(($) => setTimeout($, 1e3)), k.value = !0, l("success", u.email);
|
|
10253
10253
|
} catch {
|
|
10254
10254
|
y.value = "Failed to send password reset email. Please try again.", l("error", y.value);
|
|
10255
10255
|
} finally {
|
|
10256
10256
|
V.value = !1;
|
|
10257
10257
|
}
|
|
10258
10258
|
};
|
|
10259
|
-
return (
|
|
10259
|
+
return ($, A) => (a(), o("div", Z0, [
|
|
10260
10260
|
e("div", K0, [
|
|
10261
10261
|
d(n(_t), {
|
|
10262
10262
|
variant: "modern",
|
|
@@ -10313,7 +10313,7 @@ const ai = {
|
|
|
10313
10313
|
}, null, 8, ["message"])) : I("", !0),
|
|
10314
10314
|
e("div", G0, [
|
|
10315
10315
|
d(n(mt), {
|
|
10316
|
-
onClick: A[2] || (A[2] = (c) =>
|
|
10316
|
+
onClick: A[2] || (A[2] = (c) => $.$emit("back-to-signin")),
|
|
10317
10317
|
class: "accui-inline-flex accui-items-center accui-gap-2"
|
|
10318
10318
|
}, {
|
|
10319
10319
|
default: x(() => [...A[3] || (A[3] = [
|
|
@@ -10362,13 +10362,13 @@ const ai = {
|
|
|
10362
10362
|
])
|
|
10363
10363
|
]));
|
|
10364
10364
|
}
|
|
10365
|
-
}),
|
|
10366
|
-
key:
|
|
10367
|
-
class: "animate-fade-in"
|
|
10368
|
-
},
|
|
10365
|
+
}), Nc = /* @__PURE__ */ De(Q0, [["__scopeId", "data-v-d5af9f1c"]]), X0 = { class: "signed-in-wrapper" }, J0 = {
|
|
10366
|
+
key: 0,
|
|
10367
|
+
class: "animate-fade-in signed-in-loading"
|
|
10368
|
+
}, eu = {
|
|
10369
10369
|
key: 2,
|
|
10370
|
-
class: "animate-fade-in"
|
|
10371
|
-
},
|
|
10370
|
+
class: "animate-fade-in signed-in-fallback-wrapper"
|
|
10371
|
+
}, tu = /* @__PURE__ */ Ve({
|
|
10372
10372
|
__name: "SignedIn",
|
|
10373
10373
|
props: {
|
|
10374
10374
|
showFallback: { type: Boolean, default: !0 },
|
|
@@ -10376,52 +10376,44 @@ const ai = {
|
|
|
10376
10376
|
},
|
|
10377
10377
|
emits: ["sign-in-required"],
|
|
10378
10378
|
setup(s, { emit: r }) {
|
|
10379
|
-
const t = r, { isAuthenticated: l, isInitializing: z, user: V, signOut: y, initialize: k, isInitialized: u } = ft(), g =
|
|
10379
|
+
const t = r, { isAuthenticated: l, isInitializing: z, user: V, signOut: y, initialize: k, isInitialized: u } = ft(), g = M(!1);
|
|
10380
10380
|
We(async () => {
|
|
10381
|
-
|
|
10381
|
+
g.value = !0, await k(), await ht();
|
|
10382
10382
|
});
|
|
10383
|
-
const
|
|
10384
|
-
const E = !M.value && l.value;
|
|
10385
|
-
return console.log("[SignedIn] isSignedIn computed:", E, "(isLoading:", M.value, "isAuthenticated:", l.value, ")"), E;
|
|
10386
|
-
}), c = U(() => {
|
|
10387
|
-
const E = !M.value && !l.value;
|
|
10388
|
-
return console.log("[SignedIn] isSignedOut computed:", E), E;
|
|
10389
|
-
}), h = () => {
|
|
10383
|
+
const $ = U(() => g.value ? z.value || !u.value : !0), A = U(() => !$.value && l.value), c = U(() => !$.value && !l.value), h = () => {
|
|
10390
10384
|
t("sign-in-required");
|
|
10391
10385
|
};
|
|
10392
|
-
return (
|
|
10393
|
-
|
|
10394
|
-
|
|
10386
|
+
return (H, D) => (a(), o("div", X0, [
|
|
10387
|
+
$.value ? (a(), o("div", J0, [
|
|
10388
|
+
je(H.$slots, "loading", {}, () => [
|
|
10389
|
+
d(n(gt), {
|
|
10390
|
+
size: 30,
|
|
10391
|
+
variant: "circle",
|
|
10392
|
+
"show-particles": !0
|
|
10393
|
+
})
|
|
10394
|
+
], !0)
|
|
10395
|
+
])) : A.value ? (a(), o("div", {
|
|
10396
|
+
key: 1,
|
|
10395
10397
|
class: be(["animate-fade-in", s.inline ? "is_inline" : ""])
|
|
10396
10398
|
}, [
|
|
10397
|
-
je(
|
|
10399
|
+
je(H.$slots, "default", {
|
|
10398
10400
|
user: n(V),
|
|
10399
10401
|
signOut: n(y)
|
|
10400
10402
|
}, void 0, !0)
|
|
10401
|
-
], 2)) :
|
|
10402
|
-
|
|
10403
|
-
je(E.$slots, "fallback", { signIn: h }, () => [
|
|
10403
|
+
], 2)) : c.value && s.showFallback ? (a(), o("div", eu, [
|
|
10404
|
+
je(H.$slots, "fallback", { signIn: h }, () => [
|
|
10404
10405
|
e("div", { class: "signed-in-fallback" }, [
|
|
10405
|
-
D[0] || (D[0] = Jt('<div class="signed-in-icon-container" data-v-
|
|
10406
|
+
D[0] || (D[0] = Jt('<div class="signed-in-icon-container" data-v-9ef0aaac><svg class="signed-in-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-9ef0aaac><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" data-v-9ef0aaac></path></svg></div><h3 class="signed-in-title" data-v-9ef0aaac>Sign in required</h3><p class="signed-in-subtitle" data-v-9ef0aaac>You need to be signed in to access this content.</p>', 3)),
|
|
10406
10407
|
e("button", {
|
|
10407
10408
|
onClick: h,
|
|
10408
10409
|
class: "signed-in-button"
|
|
10409
10410
|
}, " Sign in ")
|
|
10410
10411
|
])
|
|
10411
10412
|
], !0)
|
|
10412
|
-
])) : I("", !0),
|
|
10413
|
-
M.value ? (a(), o("div", J0, [
|
|
10414
|
-
je(E.$slots, "loading", {}, () => [
|
|
10415
|
-
d(n(ht), {
|
|
10416
|
-
size: 30,
|
|
10417
|
-
variant: "circle",
|
|
10418
|
-
"show-particles": !0
|
|
10419
|
-
})
|
|
10420
|
-
], !0)
|
|
10421
10413
|
])) : I("", !0)
|
|
10422
|
-
]
|
|
10414
|
+
]));
|
|
10423
10415
|
}
|
|
10424
|
-
}),
|
|
10416
|
+
}), au = /* @__PURE__ */ De(tu, [["__scopeId", "data-v-9ef0aaac"]]), Bc = /* @__PURE__ */ Ve({
|
|
10425
10417
|
__name: "StrandsConfigProvider",
|
|
10426
10418
|
props: {
|
|
10427
10419
|
config: {}
|
|
@@ -10432,7 +10424,7 @@ const ai = {
|
|
|
10432
10424
|
La(r.config);
|
|
10433
10425
|
}), La(r.config), (t, l) => je(t.$slots, "default");
|
|
10434
10426
|
}
|
|
10435
|
-
}),
|
|
10427
|
+
}), su = ["fill", "stroke", "viewBox", "aria-hidden"], Pc = /* @__PURE__ */ Ve({
|
|
10436
10428
|
__name: "SvgIcon",
|
|
10437
10429
|
props: {
|
|
10438
10430
|
name: {},
|
|
@@ -10556,45 +10548,45 @@ const ai = {
|
|
|
10556
10548
|
"aria-hidden": s.ariaHidden
|
|
10557
10549
|
}, [
|
|
10558
10550
|
(a(), Ce(ot(y.value)))
|
|
10559
|
-
], 10,
|
|
10551
|
+
], 10, su));
|
|
10560
10552
|
}
|
|
10561
|
-
}),
|
|
10553
|
+
}), ou = ["onKeydown", "aria-expanded"], lu = { class: "mini-profile-avatar-container" }, nu = ["src", "alt", "width", "height"], iu = {
|
|
10562
10554
|
key: 1,
|
|
10563
10555
|
class: "mini-profile-avatar-default"
|
|
10564
|
-
},
|
|
10556
|
+
}, ru = { class: "mini-profile-content" }, uu = { class: "mini-profile-name" }, cu = { class: "mini-profile-email" }, du = ["src", "alt", "width", "height"], vu = {
|
|
10565
10557
|
key: 1,
|
|
10566
10558
|
class: "avatar-default"
|
|
10567
|
-
},
|
|
10559
|
+
}, pu = { key: 0 }, fu = ["onKeydown"], mu = { class: "dropdown-content" }, hu = {
|
|
10568
10560
|
key: 0,
|
|
10569
10561
|
class: "dropdown-header"
|
|
10570
|
-
},
|
|
10562
|
+
}, gu = {
|
|
10571
10563
|
key: 0,
|
|
10572
10564
|
class: "dropdown-avatar-container"
|
|
10573
|
-
},
|
|
10565
|
+
}, Cu = ["src", "alt"], yu = {
|
|
10574
10566
|
key: 1,
|
|
10575
10567
|
class: "dropdown-avatar-default"
|
|
10576
|
-
},
|
|
10568
|
+
}, ku = { class: "dropdown-user-details" }, wu = { class: "dropdown-user-name" }, bu = { class: "dropdown-user-email" }, xu = {
|
|
10577
10569
|
key: 1,
|
|
10578
10570
|
class: "dropdown-divider"
|
|
10579
|
-
},
|
|
10571
|
+
}, Mu = ["onKeydown", "aria-expanded"], $u = { class: "mini-profile-avatar-container" }, Su = ["src", "alt", "width", "height"], Au = {
|
|
10580
10572
|
key: 1,
|
|
10581
10573
|
class: "mini-profile-avatar-default"
|
|
10582
|
-
},
|
|
10574
|
+
}, _u = { class: "mini-profile-content" }, Tu = { class: "mini-profile-name" }, zu = { class: "mini-profile-email" }, Vu = ["src", "alt", "width", "height"], Iu = {
|
|
10583
10575
|
key: 1,
|
|
10584
10576
|
class: "avatar-default"
|
|
10585
|
-
},
|
|
10577
|
+
}, Lu = { key: 0 }, Eu = ["onKeydown"], Hu = { class: "dropdown-content" }, Uu = {
|
|
10586
10578
|
key: 0,
|
|
10587
10579
|
class: "dropdown-header"
|
|
10588
|
-
},
|
|
10580
|
+
}, Du = {
|
|
10589
10581
|
key: 0,
|
|
10590
10582
|
class: "dropdown-avatar-container"
|
|
10591
|
-
},
|
|
10583
|
+
}, Nu = ["src", "alt"], Bu = {
|
|
10592
10584
|
key: 1,
|
|
10593
10585
|
class: "dropdown-avatar-default"
|
|
10594
|
-
},
|
|
10586
|
+
}, Pu = { class: "dropdown-user-details" }, ju = { class: "dropdown-user-name" }, Ou = { class: "dropdown-user-email" }, Ru = {
|
|
10595
10587
|
key: 1,
|
|
10596
10588
|
class: "dropdown-divider"
|
|
10597
|
-
},
|
|
10589
|
+
}, Fu = { class: "sign-in-auth-wrapper" }, qu = /* @__PURE__ */ Ve({
|
|
10598
10590
|
__name: "StrandsUserButton",
|
|
10599
10591
|
props: {
|
|
10600
10592
|
hideUser: { type: Boolean, default: !1 },
|
|
@@ -10608,7 +10600,7 @@ const ai = {
|
|
|
10608
10600
|
},
|
|
10609
10601
|
emits: ["profile-updated", "signed-out", "signed-in"],
|
|
10610
10602
|
setup(s, { emit: r }) {
|
|
10611
|
-
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: y } = ft(), k =
|
|
10603
|
+
const t = s, l = r, { currentUser: z, signOut: V, isAuthenticated: y } = ft(), k = M(!1), u = M(!1), g = M(!1), $ = M(), A = M(), c = M(), h = U(() => A.value), { floatingStyle: H, updatePosition: D } = Oa({
|
|
10612
10604
|
trigger: h,
|
|
10613
10605
|
floating: c,
|
|
10614
10606
|
placement: "bottom-end",
|
|
@@ -10654,7 +10646,7 @@ const ai = {
|
|
|
10654
10646
|
return 64;
|
|
10655
10647
|
}
|
|
10656
10648
|
}), p = U(() => t.user ? t.user : y.value ? z.value : null), L = U(() => p.value ? p.value.username ? p.value.username : p.value.firstName && p.value.lastName ? `${p.value.firstName} ${p.value.lastName}` : p.value.firstName ? p.value.firstName : p.value.email || "User" : "User"), O = () => {
|
|
10657
|
-
k.value = !k.value, k.value &&
|
|
10649
|
+
k.value = !k.value, k.value && ht(() => {
|
|
10658
10650
|
D();
|
|
10659
10651
|
});
|
|
10660
10652
|
}, S = () => {
|
|
@@ -10685,7 +10677,7 @@ const ai = {
|
|
|
10685
10677
|
return (ne, j) => (a(), o("div", {
|
|
10686
10678
|
class: "accui-component-scope",
|
|
10687
10679
|
ref_key: "containerRef",
|
|
10688
|
-
ref:
|
|
10680
|
+
ref: $
|
|
10689
10681
|
}, [
|
|
10690
10682
|
t.user ? (a(), o(Ue, { key: 0 }, [
|
|
10691
10683
|
s.variant === "mini-profile" ? (a(), o("div", {
|
|
@@ -10706,7 +10698,7 @@ const ai = {
|
|
|
10706
10698
|
"aria-expanded": k.value,
|
|
10707
10699
|
"aria-label": "User menu"
|
|
10708
10700
|
}, [
|
|
10709
|
-
e("div",
|
|
10701
|
+
e("div", lu, [
|
|
10710
10702
|
d(n(Qt), {
|
|
10711
10703
|
size: N.value,
|
|
10712
10704
|
value: p.value?.xp || 0,
|
|
@@ -10724,7 +10716,7 @@ const ai = {
|
|
|
10724
10716
|
width: C.value,
|
|
10725
10717
|
height: C.value,
|
|
10726
10718
|
loading: "eager"
|
|
10727
|
-
}, null, 8,
|
|
10719
|
+
}, null, 8, nu)) : (a(), o("div", iu, [...j[3] || (j[3] = [
|
|
10728
10720
|
e("svg", {
|
|
10729
10721
|
class: "mini-profile-avatar-icon",
|
|
10730
10722
|
fill: "currentColor",
|
|
@@ -10738,9 +10730,9 @@ const ai = {
|
|
|
10738
10730
|
], -1)
|
|
10739
10731
|
])]))
|
|
10740
10732
|
]),
|
|
10741
|
-
e("div",
|
|
10742
|
-
e("div",
|
|
10743
|
-
e("div",
|
|
10733
|
+
e("div", ru, [
|
|
10734
|
+
e("div", uu, R(L.value), 1),
|
|
10735
|
+
e("div", cu, R(p.value?.email), 1)
|
|
10744
10736
|
]),
|
|
10745
10737
|
(a(), o("svg", {
|
|
10746
10738
|
class: be(["mini-profile-dropdown-arrow", { "dropdown-arrow-open": k.value }]),
|
|
@@ -10755,7 +10747,7 @@ const ai = {
|
|
|
10755
10747
|
d: "M19 9l-7 7-7-7"
|
|
10756
10748
|
}, null, -1)
|
|
10757
10749
|
])], 2))
|
|
10758
|
-
], 42,
|
|
10750
|
+
], 42, ou)) : (a(), o("div", {
|
|
10759
10751
|
key: 1,
|
|
10760
10752
|
ref_key: "triggerRef",
|
|
10761
10753
|
ref: A,
|
|
@@ -10785,7 +10777,7 @@ const ai = {
|
|
|
10785
10777
|
width: C.value,
|
|
10786
10778
|
height: C.value,
|
|
10787
10779
|
loading: "eager"
|
|
10788
|
-
}, null, 8,
|
|
10780
|
+
}, null, 8, du)) : (a(), o("div", vu, [...j[5] || (j[5] = [
|
|
10789
10781
|
e("svg", {
|
|
10790
10782
|
class: "avatar-icon",
|
|
10791
10783
|
fill: "currentColor",
|
|
@@ -10815,7 +10807,7 @@ const ai = {
|
|
|
10815
10807
|
])], 2))
|
|
10816
10808
|
]),
|
|
10817
10809
|
default: x(() => [
|
|
10818
|
-
s.hideUser ? I("", !0) : (a(), o("span",
|
|
10810
|
+
s.hideUser ? I("", !0) : (a(), o("span", pu, R(L.value), 1))
|
|
10819
10811
|
]),
|
|
10820
10812
|
_: 1
|
|
10821
10813
|
}, 8, ["size", "active", "onKeydown", "aria-expanded"])
|
|
@@ -10826,7 +10818,7 @@ const ai = {
|
|
|
10826
10818
|
ref_key: "dropdownRef",
|
|
10827
10819
|
ref: c,
|
|
10828
10820
|
class: "strands-user-dropdown",
|
|
10829
|
-
style: Oe(n(
|
|
10821
|
+
style: Oe(n(H)),
|
|
10830
10822
|
role: "menu",
|
|
10831
10823
|
"aria-orientation": "vertical",
|
|
10832
10824
|
onKeydown: [
|
|
@@ -10837,9 +10829,9 @@ const ai = {
|
|
|
10837
10829
|
Re(Be(T, ["prevent"]), ["end"])
|
|
10838
10830
|
]
|
|
10839
10831
|
}, [
|
|
10840
|
-
e("div",
|
|
10841
|
-
s.variant !== "mini-profile" ? (a(), o("div",
|
|
10842
|
-
p.value ? (a(), o("div",
|
|
10832
|
+
e("div", mu, [
|
|
10833
|
+
s.variant !== "mini-profile" ? (a(), o("div", hu, [
|
|
10834
|
+
p.value ? (a(), o("div", gu, [
|
|
10843
10835
|
d(n(Qt), {
|
|
10844
10836
|
size: 80,
|
|
10845
10837
|
value: p.value.xp,
|
|
@@ -10856,7 +10848,7 @@ const ai = {
|
|
|
10856
10848
|
class: "dropdown-avatar-image",
|
|
10857
10849
|
width: "64",
|
|
10858
10850
|
height: "64"
|
|
10859
|
-
}, null, 8,
|
|
10851
|
+
}, null, 8, Cu)) : (a(), o("div", yu, [...j[7] || (j[7] = [
|
|
10860
10852
|
e("svg", {
|
|
10861
10853
|
class: "dropdown-avatar-icon",
|
|
10862
10854
|
fill: "currentColor",
|
|
@@ -10870,13 +10862,13 @@ const ai = {
|
|
|
10870
10862
|
], -1)
|
|
10871
10863
|
])]))
|
|
10872
10864
|
])) : I("", !0),
|
|
10873
|
-
e("div",
|
|
10874
|
-
e("div",
|
|
10875
|
-
e("div",
|
|
10865
|
+
e("div", ku, [
|
|
10866
|
+
e("div", wu, R(L.value), 1),
|
|
10867
|
+
e("div", bu, R(p.value?.email), 1)
|
|
10876
10868
|
])
|
|
10877
10869
|
])) : I("", !0),
|
|
10878
10870
|
je(ne.$slots, "default", {}, void 0, !0),
|
|
10879
|
-
s.variant !== "mini-profile" ? (a(), o("div",
|
|
10871
|
+
s.variant !== "mini-profile" ? (a(), o("div", xu)) : I("", !0),
|
|
10880
10872
|
d(n(Lt), null, {
|
|
10881
10873
|
default: x(() => [
|
|
10882
10874
|
d(n(Lt).Item, {
|
|
@@ -10901,7 +10893,7 @@ const ai = {
|
|
|
10901
10893
|
_: 1
|
|
10902
10894
|
})
|
|
10903
10895
|
])
|
|
10904
|
-
], 44,
|
|
10896
|
+
], 44, fu)) : I("", !0)
|
|
10905
10897
|
])),
|
|
10906
10898
|
d(n(ut), {
|
|
10907
10899
|
modelValue: u.value,
|
|
@@ -10917,7 +10909,7 @@ const ai = {
|
|
|
10917
10909
|
]),
|
|
10918
10910
|
_: 1
|
|
10919
10911
|
}, 8, ["modelValue"])
|
|
10920
|
-
], 64)) : (a(), Ce(
|
|
10912
|
+
], 64)) : (a(), Ce(au, { key: 1 }, {
|
|
10921
10913
|
fallback: x(() => [
|
|
10922
10914
|
d(n(ce), {
|
|
10923
10915
|
onClick: Me,
|
|
@@ -10948,7 +10940,7 @@ const ai = {
|
|
|
10948
10940
|
"onUpdate:modelValue": j[2] || (j[2] = (K) => g.value = K)
|
|
10949
10941
|
}, {
|
|
10950
10942
|
default: x(() => [
|
|
10951
|
-
e("div",
|
|
10943
|
+
e("div", Fu, [
|
|
10952
10944
|
d(n(_i), {
|
|
10953
10945
|
onSignedIn: Ae,
|
|
10954
10946
|
onError: Se,
|
|
@@ -10961,7 +10953,7 @@ const ai = {
|
|
|
10961
10953
|
}, 8, ["modelValue"])
|
|
10962
10954
|
]),
|
|
10963
10955
|
loading: x(() => [
|
|
10964
|
-
d(
|
|
10956
|
+
d(gt, {
|
|
10965
10957
|
variant: "circle",
|
|
10966
10958
|
size: 30
|
|
10967
10959
|
})
|
|
@@ -10985,7 +10977,7 @@ const ai = {
|
|
|
10985
10977
|
"aria-expanded": k.value,
|
|
10986
10978
|
"aria-label": "User menu"
|
|
10987
10979
|
}, [
|
|
10988
|
-
e("div",
|
|
10980
|
+
e("div", $u, [
|
|
10989
10981
|
d(n(Qt), {
|
|
10990
10982
|
size: N.value,
|
|
10991
10983
|
value: p.value?.xp || 0,
|
|
@@ -11003,7 +10995,7 @@ const ai = {
|
|
|
11003
10995
|
width: C.value,
|
|
11004
10996
|
height: C.value,
|
|
11005
10997
|
loading: "eager"
|
|
11006
|
-
}, null, 8,
|
|
10998
|
+
}, null, 8, Su)) : (a(), o("div", Au, [...j[10] || (j[10] = [
|
|
11007
10999
|
e("svg", {
|
|
11008
11000
|
class: "mini-profile-avatar-icon",
|
|
11009
11001
|
fill: "currentColor",
|
|
@@ -11017,9 +11009,9 @@ const ai = {
|
|
|
11017
11009
|
], -1)
|
|
11018
11010
|
])]))
|
|
11019
11011
|
]),
|
|
11020
|
-
e("div",
|
|
11021
|
-
e("div",
|
|
11022
|
-
e("div",
|
|
11012
|
+
e("div", _u, [
|
|
11013
|
+
e("div", Tu, R(L.value), 1),
|
|
11014
|
+
e("div", zu, R(p.value?.email), 1)
|
|
11023
11015
|
]),
|
|
11024
11016
|
(a(), o("svg", {
|
|
11025
11017
|
class: be(["mini-profile-dropdown-arrow", { "dropdown-arrow-open": k.value }]),
|
|
@@ -11034,7 +11026,7 @@ const ai = {
|
|
|
11034
11026
|
d: "M19 9l-7 7-7-7"
|
|
11035
11027
|
}, null, -1)
|
|
11036
11028
|
])], 2))
|
|
11037
|
-
], 42,
|
|
11029
|
+
], 42, Mu)) : (a(), o("div", {
|
|
11038
11030
|
key: 1,
|
|
11039
11031
|
ref_key: "triggerRef",
|
|
11040
11032
|
ref: A,
|
|
@@ -11064,7 +11056,7 @@ const ai = {
|
|
|
11064
11056
|
width: C.value,
|
|
11065
11057
|
height: C.value,
|
|
11066
11058
|
loading: "eager"
|
|
11067
|
-
}, null, 8,
|
|
11059
|
+
}, null, 8, Vu)) : (a(), o("div", Iu, [...j[12] || (j[12] = [
|
|
11068
11060
|
e("svg", {
|
|
11069
11061
|
class: "avatar-icon",
|
|
11070
11062
|
fill: "currentColor",
|
|
@@ -11094,7 +11086,7 @@ const ai = {
|
|
|
11094
11086
|
])], 2))
|
|
11095
11087
|
]),
|
|
11096
11088
|
default: x(() => [
|
|
11097
|
-
s.hideUser ? I("", !0) : (a(), o("span",
|
|
11089
|
+
s.hideUser ? I("", !0) : (a(), o("span", Lu, R(L.value), 1))
|
|
11098
11090
|
]),
|
|
11099
11091
|
_: 1
|
|
11100
11092
|
}, 8, ["size", "active", "onKeydown", "aria-expanded"])
|
|
@@ -11105,7 +11097,7 @@ const ai = {
|
|
|
11105
11097
|
ref_key: "dropdownRef",
|
|
11106
11098
|
ref: c,
|
|
11107
11099
|
class: "strands-user-dropdown",
|
|
11108
|
-
style: Oe(n(
|
|
11100
|
+
style: Oe(n(H)),
|
|
11109
11101
|
role: "menu",
|
|
11110
11102
|
"aria-orientation": "vertical",
|
|
11111
11103
|
onKeydown: [
|
|
@@ -11116,9 +11108,9 @@ const ai = {
|
|
|
11116
11108
|
Re(Be(T, ["prevent"]), ["end"])
|
|
11117
11109
|
]
|
|
11118
11110
|
}, [
|
|
11119
|
-
e("div",
|
|
11120
|
-
s.variant !== "mini-profile" ? (a(), o("div",
|
|
11121
|
-
p.value ? (a(), o("div",
|
|
11111
|
+
e("div", Hu, [
|
|
11112
|
+
s.variant !== "mini-profile" ? (a(), o("div", Uu, [
|
|
11113
|
+
p.value ? (a(), o("div", Du, [
|
|
11122
11114
|
d(n(Qt), {
|
|
11123
11115
|
size: 80,
|
|
11124
11116
|
value: p.value.xp,
|
|
@@ -11135,7 +11127,7 @@ const ai = {
|
|
|
11135
11127
|
class: "dropdown-avatar-image",
|
|
11136
11128
|
width: "64",
|
|
11137
11129
|
height: "64"
|
|
11138
|
-
}, null, 8,
|
|
11130
|
+
}, null, 8, Nu)) : (a(), o("div", Bu, [...j[14] || (j[14] = [
|
|
11139
11131
|
e("svg", {
|
|
11140
11132
|
class: "dropdown-avatar-icon",
|
|
11141
11133
|
fill: "currentColor",
|
|
@@ -11149,13 +11141,13 @@ const ai = {
|
|
|
11149
11141
|
], -1)
|
|
11150
11142
|
])]))
|
|
11151
11143
|
])) : I("", !0),
|
|
11152
|
-
e("div",
|
|
11153
|
-
e("div",
|
|
11154
|
-
e("div",
|
|
11144
|
+
e("div", Pu, [
|
|
11145
|
+
e("div", ju, R(L.value), 1),
|
|
11146
|
+
e("div", Ou, R(p.value?.email), 1)
|
|
11155
11147
|
])
|
|
11156
11148
|
])) : I("", !0),
|
|
11157
11149
|
je(ne.$slots, "default", {}, void 0, !0),
|
|
11158
|
-
s.variant !== "mini-profile" ? (a(), o("div",
|
|
11150
|
+
s.variant !== "mini-profile" ? (a(), o("div", Ru)) : I("", !0),
|
|
11159
11151
|
d(n(Lt), null, {
|
|
11160
11152
|
default: x(() => [
|
|
11161
11153
|
d(n(Lt).Item, {
|
|
@@ -11180,7 +11172,7 @@ const ai = {
|
|
|
11180
11172
|
_: 1
|
|
11181
11173
|
})
|
|
11182
11174
|
])
|
|
11183
|
-
], 44,
|
|
11175
|
+
], 44, Eu)) : I("", !0)
|
|
11184
11176
|
])),
|
|
11185
11177
|
d(n(ut), {
|
|
11186
11178
|
modelValue: u.value,
|
|
@@ -11201,7 +11193,7 @@ const ai = {
|
|
|
11201
11193
|
}))
|
|
11202
11194
|
], 512));
|
|
11203
11195
|
}
|
|
11204
|
-
}),
|
|
11196
|
+
}), jc = /* @__PURE__ */ De(qu, [["__scopeId", "data-v-28bdd12c"]]), Zu = /* @__PURE__ */ Ve({
|
|
11205
11197
|
__name: "StrandsNav",
|
|
11206
11198
|
props: {
|
|
11207
11199
|
direction: { default: "column" }
|
|
@@ -11229,19 +11221,19 @@ const ai = {
|
|
|
11229
11221
|
je(k.$slots, "default", {}, void 0, !0)
|
|
11230
11222
|
], 2));
|
|
11231
11223
|
}
|
|
11232
|
-
}),
|
|
11224
|
+
}), Ku = /* @__PURE__ */ De(Zu, [["__scopeId", "data-v-dfb31e47"]]), Gu = {
|
|
11233
11225
|
key: 0,
|
|
11234
11226
|
class: "strands-nav-item-icon",
|
|
11235
11227
|
fill: "none",
|
|
11236
11228
|
stroke: "currentColor",
|
|
11237
11229
|
viewBox: "0 0 24 24"
|
|
11238
|
-
},
|
|
11230
|
+
}, Yu = ["d"], Wu = {
|
|
11239
11231
|
key: 0,
|
|
11240
11232
|
class: "strands-nav-item-icon",
|
|
11241
11233
|
fill: "none",
|
|
11242
11234
|
stroke: "currentColor",
|
|
11243
11235
|
viewBox: "0 0 24 24"
|
|
11244
|
-
},
|
|
11236
|
+
}, Qu = ["d"], Xu = /* @__PURE__ */ Ve({
|
|
11245
11237
|
__name: "StrandsNavItem",
|
|
11246
11238
|
props: {
|
|
11247
11239
|
variant: { default: "primary" },
|
|
@@ -11263,7 +11255,7 @@ const ai = {
|
|
|
11263
11255
|
align: {}
|
|
11264
11256
|
},
|
|
11265
11257
|
setup(s) {
|
|
11266
|
-
const r = s, t = ga(), l = ma("registerNavItem"), z = ma("unregisterNavItem"), V =
|
|
11258
|
+
const r = s, t = ga(), l = ma("registerNavItem"), z = ma("unregisterNavItem"), V = M(`nav-item-${Math.random().toString(36).substring(2, 11)}`), y = os(), k = U(() => {
|
|
11267
11259
|
if (typeof window < "u" && y) {
|
|
11268
11260
|
const h = y.vnode.el?.parentElement;
|
|
11269
11261
|
if (h)
|
|
@@ -11273,7 +11265,7 @@ const ai = {
|
|
|
11273
11265
|
}), u = () => {
|
|
11274
11266
|
try {
|
|
11275
11267
|
const h = t.default?.();
|
|
11276
|
-
return h ? h.map((
|
|
11268
|
+
return h ? h.map((H) => typeof H.children == "string" ? H.children : H.children && Array.isArray(H.children) ? H.children.map(
|
|
11277
11269
|
(D) => typeof D == "string" ? D : ""
|
|
11278
11270
|
).join("") : "").join("").trim() : "";
|
|
11279
11271
|
} catch {
|
|
@@ -11283,15 +11275,15 @@ const ai = {
|
|
|
11283
11275
|
"strands-nav-item",
|
|
11284
11276
|
`strands-nav-item--color-${r.color}`,
|
|
11285
11277
|
{ "strands-nav-item--disabled": r.disabled }
|
|
11286
|
-
],
|
|
11278
|
+
], $ = () => {
|
|
11287
11279
|
r.disabled;
|
|
11288
11280
|
}, A = (h) => {
|
|
11289
|
-
const
|
|
11281
|
+
const H = {
|
|
11290
11282
|
dashboard: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
|
|
11291
11283
|
settings: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",
|
|
11292
11284
|
help: "M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
11293
11285
|
};
|
|
11294
|
-
return
|
|
11286
|
+
return H[h] || H.dashboard;
|
|
11295
11287
|
}, c = U(() => ({
|
|
11296
11288
|
id: V.value,
|
|
11297
11289
|
label: u(),
|
|
@@ -11307,9 +11299,9 @@ const ai = {
|
|
|
11307
11299
|
z && z(V.value);
|
|
11308
11300
|
}), Le(() => [r.to, r.icon, r.disabled], () => {
|
|
11309
11301
|
l && l(c.value);
|
|
11310
|
-
}, { deep: !0 }), (h,
|
|
11302
|
+
}, { deep: !0 }), (h, H) => (a(), Ce(n(ce), {
|
|
11311
11303
|
to: r.to,
|
|
11312
|
-
onClick:
|
|
11304
|
+
onClick: $,
|
|
11313
11305
|
class: be(g()),
|
|
11314
11306
|
variant: r.variant,
|
|
11315
11307
|
color: r.color,
|
|
@@ -11321,13 +11313,13 @@ const ai = {
|
|
|
11321
11313
|
tabindex: "-1"
|
|
11322
11314
|
}, Zt({
|
|
11323
11315
|
default: x(() => [
|
|
11324
|
-
r.icon && r.type !== "button" ? (a(), o("svg",
|
|
11316
|
+
r.icon && r.type !== "button" ? (a(), o("svg", Wu, [
|
|
11325
11317
|
e("path", {
|
|
11326
11318
|
"stroke-linecap": "round",
|
|
11327
11319
|
"stroke-linejoin": "round",
|
|
11328
11320
|
"stroke-width": "2",
|
|
11329
11321
|
d: A(r.icon)
|
|
11330
|
-
}, null, 8,
|
|
11322
|
+
}, null, 8, Qu)
|
|
11331
11323
|
])) : I("", !0),
|
|
11332
11324
|
je(h.$slots, "default")
|
|
11333
11325
|
]),
|
|
@@ -11336,22 +11328,22 @@ const ai = {
|
|
|
11336
11328
|
r.type === "button" ? {
|
|
11337
11329
|
name: "icon",
|
|
11338
11330
|
fn: x(() => [
|
|
11339
|
-
r.icon ? (a(), o("svg",
|
|
11331
|
+
r.icon ? (a(), o("svg", Gu, [
|
|
11340
11332
|
e("path", {
|
|
11341
11333
|
"stroke-linecap": "round",
|
|
11342
11334
|
"stroke-linejoin": "round",
|
|
11343
11335
|
"stroke-width": "2",
|
|
11344
11336
|
d: A(r.icon)
|
|
11345
|
-
}, null, 8,
|
|
11337
|
+
}, null, 8, Yu)
|
|
11346
11338
|
])) : I("", !0)
|
|
11347
11339
|
]),
|
|
11348
11340
|
key: "0"
|
|
11349
11341
|
} : void 0
|
|
11350
11342
|
]), 1032, ["to", "class", "variant", "color", "size", "squircle", "disabled", "role"]));
|
|
11351
11343
|
}
|
|
11352
|
-
}), Lt =
|
|
11353
|
-
Lt.Item =
|
|
11354
|
-
const
|
|
11344
|
+
}), Lt = Ku;
|
|
11345
|
+
Lt.Item = Xu;
|
|
11346
|
+
const Ju = { class: "accui-p-2 accui-border-b" }, ec = /* @__PURE__ */ Ve({
|
|
11355
11347
|
__name: "VirtualList",
|
|
11356
11348
|
props: {
|
|
11357
11349
|
items: {},
|
|
@@ -11361,7 +11353,7 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11361
11353
|
overscan: { default: 5 }
|
|
11362
11354
|
},
|
|
11363
11355
|
setup(s, { expose: r }) {
|
|
11364
|
-
const t = s, l =
|
|
11356
|
+
const t = s, l = M(), z = M(0), V = U(() => {
|
|
11365
11357
|
const c = Math.floor(z.value / t.itemHeight), h = Math.min(
|
|
11366
11358
|
c + Math.ceil(t.containerHeight / t.itemHeight),
|
|
11367
11359
|
t.items.length - 1
|
|
@@ -11371,17 +11363,17 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11371
11363
|
end: Math.min(t.items.length - 1, h + t.overscan)
|
|
11372
11364
|
};
|
|
11373
11365
|
}), y = U(() => {
|
|
11374
|
-
const { start: c, end: h } = V.value,
|
|
11366
|
+
const { start: c, end: h } = V.value, H = [];
|
|
11375
11367
|
for (let D = c; D <= h; D++)
|
|
11376
|
-
|
|
11368
|
+
H.push({
|
|
11377
11369
|
index: D,
|
|
11378
11370
|
data: t.items[D],
|
|
11379
11371
|
top: D * t.itemHeight
|
|
11380
11372
|
});
|
|
11381
|
-
return
|
|
11373
|
+
return H;
|
|
11382
11374
|
}), k = U(() => t.items.length * t.itemHeight), u = (c) => typeof t.itemKey == "function" ? t.itemKey(c) : c[t.itemKey] || c.id || Math.random();
|
|
11383
11375
|
let g = null;
|
|
11384
|
-
const
|
|
11376
|
+
const $ = (c) => {
|
|
11385
11377
|
g && clearTimeout(g), g = setTimeout(() => {
|
|
11386
11378
|
const h = c.target;
|
|
11387
11379
|
z.value = h.scrollTop;
|
|
@@ -11392,53 +11384,53 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11392
11384
|
}), r({
|
|
11393
11385
|
scrollToItem: (c, h = "start") => {
|
|
11394
11386
|
if (!l.value) return;
|
|
11395
|
-
let
|
|
11396
|
-
h === "center" ?
|
|
11387
|
+
let H = c * t.itemHeight;
|
|
11388
|
+
h === "center" ? H -= t.containerHeight / 2 - t.itemHeight / 2 : h === "end" && (H -= t.containerHeight - t.itemHeight), l.value.scrollTop = Math.max(0, H);
|
|
11397
11389
|
}
|
|
11398
11390
|
}), (c, h) => (a(), o("div", {
|
|
11399
11391
|
ref_key: "scrollContainer",
|
|
11400
11392
|
ref: l,
|
|
11401
11393
|
style: Oe({ height: s.containerHeight + "px", overflowY: "auto" }),
|
|
11402
|
-
onScroll:
|
|
11394
|
+
onScroll: $,
|
|
11403
11395
|
class: "accui-virtual-list"
|
|
11404
11396
|
}, [
|
|
11405
11397
|
e("div", {
|
|
11406
11398
|
style: Oe({ height: k.value + "px", position: "relative" })
|
|
11407
11399
|
}, [
|
|
11408
|
-
(a(!0), o(Ue, null, Ke(y.value, (
|
|
11409
|
-
key: u(
|
|
11400
|
+
(a(!0), o(Ue, null, Ke(y.value, (H) => (a(), o("div", {
|
|
11401
|
+
key: u(H.data),
|
|
11410
11402
|
style: Oe({
|
|
11411
11403
|
position: "absolute",
|
|
11412
|
-
top:
|
|
11404
|
+
top: H.top + "px",
|
|
11413
11405
|
left: 0,
|
|
11414
11406
|
right: 0,
|
|
11415
11407
|
height: s.itemHeight + "px"
|
|
11416
11408
|
})
|
|
11417
11409
|
}, [
|
|
11418
11410
|
je(c.$slots, "default", {
|
|
11419
|
-
item:
|
|
11420
|
-
index:
|
|
11411
|
+
item: H.data,
|
|
11412
|
+
index: H.index
|
|
11421
11413
|
}, () => [
|
|
11422
|
-
e("div",
|
|
11414
|
+
e("div", Ju, R(JSON.stringify(H.data)), 1)
|
|
11423
11415
|
], !0)
|
|
11424
11416
|
], 4))), 128))
|
|
11425
11417
|
], 4)
|
|
11426
11418
|
], 36));
|
|
11427
11419
|
}
|
|
11428
|
-
}),
|
|
11429
|
-
},
|
|
11420
|
+
}), Oc = /* @__PURE__ */ De(ec, [["__scopeId", "data-v-1561f0b5"]]), Rc = () => {
|
|
11421
|
+
}, tc = { class: "accui-component-scope" }, ac = { class: "mfa-setup-header" }, sc = { class: "mfa-setup-status-container" }, oc = { class: "mfa-setup-content" }, lc = {
|
|
11430
11422
|
key: 0,
|
|
11431
11423
|
class: "mfa-setup-loading"
|
|
11432
|
-
},
|
|
11424
|
+
}, nc = {
|
|
11433
11425
|
key: 1,
|
|
11434
11426
|
class: "mfa-setup-sections"
|
|
11435
|
-
},
|
|
11427
|
+
}, ic = {
|
|
11436
11428
|
key: 0,
|
|
11437
11429
|
class: "mfa-setup-status-alert"
|
|
11438
|
-
},
|
|
11430
|
+
}, rc = { class: "mfa-setup-status-content" }, uc = { class: "mfa-setup-status-icon" }, cc = { class: "mfa-setup-methods-grid" }, dc = { class: "mfa-setup-method-content" }, vc = { class: "mfa-setup-method-icon mfa-setup-totp-icon" }, pc = { class: "mfa-setup-method-content" }, fc = { class: "mfa-setup-method-icon mfa-setup-email-icon" }, mc = {
|
|
11439
11431
|
key: 1,
|
|
11440
11432
|
class: "mfa-setup-manage-section"
|
|
11441
|
-
},
|
|
11433
|
+
}, hc = { class: "mfa-setup-manage-header" }, gc = { class: "mfa-setup-manage-description" }, Cc = { class: "mfa-setup-footer" }, yc = /* @__PURE__ */ Ve({
|
|
11442
11434
|
__name: "StrandsMFASetup",
|
|
11443
11435
|
props: {
|
|
11444
11436
|
show: { type: Boolean, default: !1 }
|
|
@@ -11523,14 +11515,14 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11523
11515
|
}, y = s, k = r, {
|
|
11524
11516
|
mfaEnabled: u,
|
|
11525
11517
|
loading: g,
|
|
11526
|
-
activeMfaDevices:
|
|
11518
|
+
activeMfaDevices: $,
|
|
11527
11519
|
fetchMfaDevices: A
|
|
11528
11520
|
} = Tt(), c = U({
|
|
11529
11521
|
get: () => y.show,
|
|
11530
11522
|
set: (q) => {
|
|
11531
11523
|
q || k("close");
|
|
11532
11524
|
}
|
|
11533
|
-
}), h =
|
|
11525
|
+
}), h = M(!1), H = M(!1), D = M(!1), C = M(!1);
|
|
11534
11526
|
Le(() => y.show, async (q) => {
|
|
11535
11527
|
q && await A();
|
|
11536
11528
|
}), We(async () => {
|
|
@@ -11541,35 +11533,35 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11541
11533
|
}, p = () => {
|
|
11542
11534
|
h.value = !0;
|
|
11543
11535
|
}, L = () => {
|
|
11544
|
-
|
|
11536
|
+
H.value = !0;
|
|
11545
11537
|
}, O = () => {
|
|
11546
11538
|
C.value = !0;
|
|
11547
11539
|
}, S = async () => {
|
|
11548
|
-
h.value = !1,
|
|
11540
|
+
h.value = !1, H.value = !1, D.value = !1, await A(), k("success");
|
|
11549
11541
|
}, w = async () => {
|
|
11550
11542
|
await A();
|
|
11551
11543
|
};
|
|
11552
|
-
return (q, Z) => (a(), o("div",
|
|
11544
|
+
return (q, Z) => (a(), o("div", tc, [
|
|
11553
11545
|
d(ut, {
|
|
11554
11546
|
modelValue: c.value,
|
|
11555
11547
|
"onUpdate:modelValue": Z[0] || (Z[0] = (b) => c.value = b),
|
|
11556
11548
|
"card-class": "mfa-setup-modal"
|
|
11557
11549
|
}, {
|
|
11558
11550
|
header: x(() => [
|
|
11559
|
-
e("div",
|
|
11551
|
+
e("div", ac, [
|
|
11560
11552
|
Z[5] || (Z[5] = e("div", null, [
|
|
11561
11553
|
e("h2", { class: "mfa-setup-title" }, "Two-Factor Authentication"),
|
|
11562
11554
|
e("p", { class: "mfa-setup-subtitle" }, "Add extra security to your account")
|
|
11563
11555
|
], -1)),
|
|
11564
|
-
e("div",
|
|
11556
|
+
e("div", sc, [
|
|
11565
11557
|
e("span", {
|
|
11566
|
-
class: be(["mfa-setup-status-badge", n(u) || n(
|
|
11567
|
-
}, R(n(u) || n(
|
|
11558
|
+
class: be(["mfa-setup-status-badge", n(u) || n($).length > 0 ? "mfa-setup-status-enabled" : "mfa-setup-status-disabled"])
|
|
11559
|
+
}, R(n(u) || n($).length > 0 ? "Enabled" : "Not Enabled"), 3)
|
|
11568
11560
|
])
|
|
11569
11561
|
])
|
|
11570
11562
|
]),
|
|
11571
11563
|
footer: x(() => [
|
|
11572
|
-
e("div",
|
|
11564
|
+
e("div", Cc, [
|
|
11573
11565
|
d(n(ce), {
|
|
11574
11566
|
variant: "secondary",
|
|
11575
11567
|
onClick: N,
|
|
@@ -11583,14 +11575,14 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11583
11575
|
])
|
|
11584
11576
|
]),
|
|
11585
11577
|
default: x(() => [
|
|
11586
|
-
e("div",
|
|
11587
|
-
n(g) ? (a(), o("div",
|
|
11588
|
-
d(n(
|
|
11578
|
+
e("div", oc, [
|
|
11579
|
+
n(g) ? (a(), o("div", lc, [
|
|
11580
|
+
d(n(gt), { size: 32 }),
|
|
11589
11581
|
Z[6] || (Z[6] = e("span", { class: "mfa-setup-loading-text" }, "Loading MFA settings...", -1))
|
|
11590
|
-
])) : (a(), o("div",
|
|
11591
|
-
n(u) || n(
|
|
11592
|
-
e("div",
|
|
11593
|
-
e("div",
|
|
11582
|
+
])) : (a(), o("div", nc, [
|
|
11583
|
+
n(u) || n($).length > 0 ? (a(), o("div", ic, [
|
|
11584
|
+
e("div", rc, [
|
|
11585
|
+
e("div", uc, [
|
|
11594
11586
|
d(z, {
|
|
11595
11587
|
size: 20,
|
|
11596
11588
|
class: "mfa-setup-shield-icon"
|
|
@@ -11604,13 +11596,13 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11604
11596
|
])) : I("", !0),
|
|
11605
11597
|
e("div", null, [
|
|
11606
11598
|
Z[12] || (Z[12] = e("h3", { class: "mfa-setup-methods-title" }, "Choose Your Authentication Method", -1)),
|
|
11607
|
-
e("div",
|
|
11599
|
+
e("div", cc, [
|
|
11608
11600
|
e("div", {
|
|
11609
11601
|
class: "mfa-setup-method-card",
|
|
11610
11602
|
onClick: p
|
|
11611
11603
|
}, [
|
|
11612
|
-
e("div",
|
|
11613
|
-
e("div",
|
|
11604
|
+
e("div", dc, [
|
|
11605
|
+
e("div", vc, [
|
|
11614
11606
|
d(t, {
|
|
11615
11607
|
size: 28,
|
|
11616
11608
|
class: "mfa-setup-icon-svg"
|
|
@@ -11638,8 +11630,8 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11638
11630
|
class: "mfa-setup-method-card",
|
|
11639
11631
|
onClick: L
|
|
11640
11632
|
}, [
|
|
11641
|
-
e("div",
|
|
11642
|
-
e("div",
|
|
11633
|
+
e("div", pc, [
|
|
11634
|
+
e("div", fc, [
|
|
11643
11635
|
d(l, {
|
|
11644
11636
|
size: 28,
|
|
11645
11637
|
class: "mfa-setup-icon-svg"
|
|
@@ -11665,11 +11657,11 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11665
11657
|
])
|
|
11666
11658
|
])
|
|
11667
11659
|
]),
|
|
11668
|
-
n(
|
|
11669
|
-
e("div",
|
|
11660
|
+
n($).length > 0 ? (a(), o("div", mc, [
|
|
11661
|
+
e("div", hc, [
|
|
11670
11662
|
e("div", null, [
|
|
11671
11663
|
Z[13] || (Z[13] = e("h3", { class: "mfa-setup-manage-title" }, "Manage Existing Methods", -1)),
|
|
11672
|
-
e("p",
|
|
11664
|
+
e("p", gc, R(n($).length) + " device(s) currently active", 1)
|
|
11673
11665
|
]),
|
|
11674
11666
|
d(n(ce), {
|
|
11675
11667
|
variant: "secondary",
|
|
@@ -11699,10 +11691,10 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11699
11691
|
onClose: Z[1] || (Z[1] = (b) => h.value = !1),
|
|
11700
11692
|
onSuccess: S
|
|
11701
11693
|
}, null, 8, ["show"])) : I("", !0),
|
|
11702
|
-
|
|
11694
|
+
H.value ? (a(), Ce(Ya, {
|
|
11703
11695
|
key: 1,
|
|
11704
|
-
show:
|
|
11705
|
-
onClose: Z[2] || (Z[2] = (b) =>
|
|
11696
|
+
show: H.value,
|
|
11697
|
+
onClose: Z[2] || (Z[2] = (b) => H.value = !1),
|
|
11706
11698
|
onSuccess: S
|
|
11707
11699
|
}, null, 8, ["show"])) : I("", !0),
|
|
11708
11700
|
D.value ? (a(), Ce(Aa, {
|
|
@@ -11719,20 +11711,20 @@ const Xu = { class: "accui-p-2 accui-border-b" }, Ju = /* @__PURE__ */ Ve({
|
|
|
11719
11711
|
}, null, 8, ["show"])) : I("", !0)
|
|
11720
11712
|
]));
|
|
11721
11713
|
}
|
|
11722
|
-
}),
|
|
11714
|
+
}), Fc = /* @__PURE__ */ De(yc, [["__scopeId", "data-v-5e4af8e5"]]);
|
|
11723
11715
|
function Gt() {
|
|
11724
|
-
const { config: s } = pt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(), z = async (
|
|
11716
|
+
const { config: s } = pt(), { currentSession: r, refreshToken: t, getAuthHeaders: l } = ft(), z = async ($, A = {}) => {
|
|
11725
11717
|
const {
|
|
11726
11718
|
autoRefresh: c = !0,
|
|
11727
11719
|
requireAuth: h = !0,
|
|
11728
|
-
baseURL:
|
|
11720
|
+
baseURL: H,
|
|
11729
11721
|
...D
|
|
11730
11722
|
} = A;
|
|
11731
11723
|
if (h && !r.value?.accessToken)
|
|
11732
11724
|
throw new Error("User is not authenticated");
|
|
11733
|
-
let C =
|
|
11734
|
-
const N =
|
|
11735
|
-
N && typeof
|
|
11725
|
+
let C = $;
|
|
11726
|
+
const N = H || s.value.baseUrl;
|
|
11727
|
+
N && typeof $ == "string" && !$.startsWith("http") && (C = new URL($, N).toString());
|
|
11736
11728
|
const p = new Headers(D.headers);
|
|
11737
11729
|
if (r.value?.accessToken)
|
|
11738
11730
|
try {
|
|
@@ -11764,29 +11756,29 @@ function Gt() {
|
|
|
11764
11756
|
};
|
|
11765
11757
|
return {
|
|
11766
11758
|
authenticatedFetch: z,
|
|
11767
|
-
get: (
|
|
11768
|
-
post: (
|
|
11759
|
+
get: ($, A) => z($, { ...A, method: "GET" }),
|
|
11760
|
+
post: ($, A, c) => {
|
|
11769
11761
|
const h = new Headers(c?.headers);
|
|
11770
|
-
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z(
|
|
11762
|
+
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z($, {
|
|
11771
11763
|
...c,
|
|
11772
11764
|
method: "POST",
|
|
11773
11765
|
headers: h,
|
|
11774
11766
|
body: typeof A == "object" ? JSON.stringify(A) : A
|
|
11775
11767
|
});
|
|
11776
11768
|
},
|
|
11777
|
-
put: (
|
|
11769
|
+
put: ($, A, c) => {
|
|
11778
11770
|
const h = new Headers(c?.headers);
|
|
11779
|
-
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z(
|
|
11771
|
+
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z($, {
|
|
11780
11772
|
...c,
|
|
11781
11773
|
method: "PUT",
|
|
11782
11774
|
headers: h,
|
|
11783
11775
|
body: typeof A == "object" ? JSON.stringify(A) : A
|
|
11784
11776
|
});
|
|
11785
11777
|
},
|
|
11786
|
-
delete: (
|
|
11787
|
-
patch: (
|
|
11778
|
+
delete: ($, A) => z($, { ...A, method: "DELETE" }),
|
|
11779
|
+
patch: ($, A, c) => {
|
|
11788
11780
|
const h = new Headers(c?.headers);
|
|
11789
|
-
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z(
|
|
11781
|
+
return A && typeof A == "object" && !h.has("Content-Type") && h.set("Content-Type", "application/json"), z($, {
|
|
11790
11782
|
...c,
|
|
11791
11783
|
method: "PATCH",
|
|
11792
11784
|
headers: h,
|
|
@@ -11795,7 +11787,7 @@ function Gt() {
|
|
|
11795
11787
|
}
|
|
11796
11788
|
};
|
|
11797
11789
|
}
|
|
11798
|
-
const
|
|
11790
|
+
const qc = {
|
|
11799
11791
|
get: async (s, r) => {
|
|
11800
11792
|
const { get: t } = Gt();
|
|
11801
11793
|
return t(s, r);
|
|
@@ -11816,120 +11808,120 @@ const Fc = {
|
|
|
11816
11808
|
const { patch: l } = Gt();
|
|
11817
11809
|
return l(s, r, t);
|
|
11818
11810
|
}
|
|
11819
|
-
},
|
|
11811
|
+
}, Zc = (s) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s), Kc = (s) => {
|
|
11820
11812
|
const r = [];
|
|
11821
11813
|
let t = 0;
|
|
11822
11814
|
s.length < 8 ? r.push("Password must be at least 8 characters long") : t += 1, /[A-Z]/.test(s) ? t += 1 : r.push("Password must contain at least one uppercase letter"), /[a-z]/.test(s) ? t += 1 : r.push("Password must contain at least one lowercase letter"), /\d/.test(s) ? t += 1 : r.push("Password must contain at least one number"), /[!@#$%^&*(),.?":{}|<>]/.test(s) ? t += 1 : r.push("Password must contain at least one special character");
|
|
11823
11815
|
const l = r.length === 0;
|
|
11824
11816
|
let z = "weak";
|
|
11825
11817
|
return t >= 4 ? z = "strong" : t >= 3 && (z = "medium"), { isValid: l, strength: z, errors: r };
|
|
11826
|
-
},
|
|
11818
|
+
}, Gc = (s) => s.trim().length >= 2, Yc = (s) => s.trim().length > 0, Wc = (s, r) => s === r, Qc = (s, r) => {
|
|
11827
11819
|
const t = s?.charAt(0).toUpperCase() || "", l = r?.charAt(0).toUpperCase() || "";
|
|
11828
11820
|
return t + l || "U";
|
|
11829
|
-
},
|
|
11821
|
+
}, Xc = (s) => (typeof s == "string" ? new Date(s) : s).toLocaleDateString("en-US", {
|
|
11830
11822
|
year: "numeric",
|
|
11831
11823
|
month: "long",
|
|
11832
11824
|
day: "numeric"
|
|
11833
|
-
}),
|
|
11825
|
+
}), Jc = (s, r) => {
|
|
11834
11826
|
let t;
|
|
11835
11827
|
return (...l) => {
|
|
11836
11828
|
clearTimeout(t), t = setTimeout(() => s(...l), r);
|
|
11837
11829
|
};
|
|
11838
11830
|
};
|
|
11839
11831
|
export {
|
|
11840
|
-
|
|
11832
|
+
qc as $authFetch,
|
|
11841
11833
|
Ii as IconGithub,
|
|
11842
11834
|
zi as IconGoogle,
|
|
11843
|
-
|
|
11835
|
+
au as SignedIn,
|
|
11844
11836
|
_i as StrandsAuth,
|
|
11845
11837
|
n3 as StrandsBackupCodesModal,
|
|
11846
|
-
|
|
11847
|
-
|
|
11838
|
+
Dc as StrandsCompleteSignUp,
|
|
11839
|
+
Bc as StrandsConfigProvider,
|
|
11848
11840
|
v3 as StrandsConfirmModal,
|
|
11849
11841
|
Ya as StrandsEmailMfaSetupModal,
|
|
11850
11842
|
Aa as StrandsHardwareKeySetupModal,
|
|
11851
11843
|
ha as StrandsLogo,
|
|
11852
|
-
|
|
11844
|
+
Fc as StrandsMFASetup,
|
|
11853
11845
|
Wa as StrandsMfaModal,
|
|
11854
11846
|
Ka as StrandsMfaVerification,
|
|
11855
11847
|
Lt as StrandsNav,
|
|
11856
|
-
|
|
11857
|
-
|
|
11848
|
+
Xu as StrandsNavItem,
|
|
11849
|
+
Nc as StrandsPasswordReset,
|
|
11858
11850
|
Et as StrandsSecuredFooter,
|
|
11859
11851
|
K4 as StrandsSessionsModal,
|
|
11860
11852
|
v4 as StrandsSettingsModal,
|
|
11861
|
-
|
|
11862
|
-
|
|
11853
|
+
Hc as StrandsSignIn,
|
|
11854
|
+
Uc as StrandsSignUp,
|
|
11863
11855
|
Ga as StrandsTotpSetupModal,
|
|
11864
|
-
|
|
11856
|
+
ad as StrandsUIPlugin,
|
|
11865
11857
|
Ht as StrandsUiAlert,
|
|
11866
|
-
|
|
11858
|
+
Mc as StrandsUiApp,
|
|
11867
11859
|
Rs as StrandsUiAvatarEditor,
|
|
11868
11860
|
ce as StrandsUiButton,
|
|
11869
11861
|
_t as StrandsUiCard,
|
|
11870
|
-
|
|
11871
|
-
|
|
11862
|
+
Lc as StrandsUiCheckboxGroup,
|
|
11863
|
+
Ac as StrandsUiColorPicker,
|
|
11872
11864
|
xa as StrandsUiDivider,
|
|
11873
|
-
|
|
11865
|
+
Tc as StrandsUiHero,
|
|
11874
11866
|
Ze as StrandsUiInput,
|
|
11875
11867
|
Qt as StrandsUiLevelProgress,
|
|
11876
11868
|
mt as StrandsUiLink,
|
|
11877
|
-
|
|
11869
|
+
gt as StrandsUiLoader,
|
|
11878
11870
|
ut as StrandsUiModal,
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11871
|
+
Ec as StrandsUiPill,
|
|
11872
|
+
Ic as StrandsUiRadioGroup,
|
|
11873
|
+
Vc as StrandsUiSlider,
|
|
11874
|
+
_c as StrandsUiTable,
|
|
11883
11875
|
Ra as StrandsUiTabs,
|
|
11884
|
-
|
|
11876
|
+
zc as StrandsUiThemeToggle,
|
|
11885
11877
|
Ua as StrandsUiToggle,
|
|
11886
11878
|
Yt as StrandsUiTooltip,
|
|
11887
|
-
|
|
11879
|
+
jc as StrandsUserButton,
|
|
11888
11880
|
ja as StrandsUserProfile,
|
|
11889
|
-
|
|
11881
|
+
Pc as SvgIcon,
|
|
11890
11882
|
Ht as UiAlert,
|
|
11891
|
-
|
|
11883
|
+
Mc as UiApp,
|
|
11892
11884
|
Rs as UiAvatarEditor,
|
|
11893
11885
|
Rs as UiAvatarEditorSimple,
|
|
11894
11886
|
ce as UiButton,
|
|
11895
11887
|
_t as UiCard,
|
|
11896
|
-
|
|
11897
|
-
|
|
11888
|
+
Lc as UiCheckboxGroup,
|
|
11889
|
+
Ac as UiColorPicker,
|
|
11898
11890
|
xa as UiDivider,
|
|
11899
|
-
|
|
11891
|
+
Tc as UiHero,
|
|
11900
11892
|
Ze as UiInput,
|
|
11901
11893
|
Qt as UiLevelProgress,
|
|
11902
11894
|
mt as UiLink,
|
|
11903
|
-
|
|
11895
|
+
gt as UiLoader,
|
|
11904
11896
|
ut as UiModal,
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11897
|
+
Ec as UiPill,
|
|
11898
|
+
Ic as UiRadioGroup,
|
|
11899
|
+
Vc as UiSlider,
|
|
11900
|
+
_c as UiTable,
|
|
11909
11901
|
Ra as UiTabs,
|
|
11910
|
-
|
|
11902
|
+
zc as UiThemeToggle,
|
|
11911
11903
|
Ua as UiToggle,
|
|
11912
11904
|
Yt as UiTooltip,
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11905
|
+
Oc as VirtualList,
|
|
11906
|
+
Jc as debounce,
|
|
11907
|
+
Xc as formatDate,
|
|
11908
|
+
Qc as getInitials,
|
|
11909
|
+
Yc as isRequired,
|
|
11910
|
+
Zc as isValidEmail,
|
|
11911
|
+
Gc as isValidName,
|
|
11912
|
+
Wc as passwordsMatch,
|
|
11913
|
+
Rc as preloadCriticalComponents,
|
|
11922
11914
|
La as provideStrandsConfig,
|
|
11923
|
-
|
|
11915
|
+
od as setStrandsConfig,
|
|
11924
11916
|
Co as tailwindColors,
|
|
11925
11917
|
Gt as useAuthenticatedFetch,
|
|
11926
11918
|
Oa as useFloatingPosition,
|
|
11927
|
-
|
|
11919
|
+
Sc as useGlobalModalStack,
|
|
11928
11920
|
uo as useModalStack,
|
|
11929
|
-
|
|
11921
|
+
$c as useModalTeleport,
|
|
11930
11922
|
za as useOAuthProviders,
|
|
11931
11923
|
ft as useStrandsAuth,
|
|
11932
11924
|
pt as useStrandsConfig,
|
|
11933
11925
|
sl as useTheme,
|
|
11934
|
-
|
|
11926
|
+
Kc as validatePassword
|
|
11935
11927
|
};
|