@getauthui/core 0.1.5 → 0.1.6
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/README.md +2 -2
- package/dist/{authui-user-button-BeDiMjWw.js → authui-user-button-CLVW46Q6.js} +535 -436
- package/dist/authui.cdn.js +106 -66
- package/dist/authui.cdn.mjs +784 -685
- package/dist/authui.js +2 -2
- package/dist/components/authui-account.d.ts +4 -0
- package/dist/components/authui-account.d.ts.map +1 -1
- package/dist/components/authui-modal.d.ts +5 -0
- package/dist/components/authui-modal.d.ts.map +1 -1
- package/dist/components/authui-user-button.d.ts +4 -0
- package/dist/components/authui-user-button.d.ts.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { state as
|
|
2
|
-
import { css as
|
|
3
|
-
import { Client as
|
|
4
|
-
const
|
|
1
|
+
import { state as d, property as g, customElement as R, query as st } from "lit/decorators.js";
|
|
2
|
+
import { css as O, LitElement as rt, nothing as o, html as r, svg as h } from "lit";
|
|
3
|
+
import { Client as lt, Account as ct, Teams as xt, ID as H, Avatars as kt } from "appwrite";
|
|
4
|
+
const Ct = {
|
|
5
5
|
signIn: "Sign in",
|
|
6
6
|
dialogSignIn: "Sign in",
|
|
7
7
|
signUp: "Sign up",
|
|
@@ -43,6 +43,7 @@ const kt = {
|
|
|
43
43
|
resetPassword: "Reset password",
|
|
44
44
|
resetLinkSent: "If an account exists for {email}, a reset link is on its way.",
|
|
45
45
|
passwordUpdated: "Your password was updated. You can sign in now.",
|
|
46
|
+
passwordChanged: "Your password was updated.",
|
|
46
47
|
sendResetLink: "Send reset link",
|
|
47
48
|
requestNewLink: "Request a new link",
|
|
48
49
|
agreeTo: "By continuing you agree to our",
|
|
@@ -169,13 +170,13 @@ const kt = {
|
|
|
169
170
|
guestAccountDescription: "Add an email and password to keep your data.",
|
|
170
171
|
preview: "Preview"
|
|
171
172
|
};
|
|
172
|
-
function
|
|
173
|
+
function St(e, t = {}) {
|
|
173
174
|
return e.replace(
|
|
174
175
|
/\{(\w+)\}/g,
|
|
175
176
|
(i, s) => s in t ? String(t[s]) : `{${s}}`
|
|
176
177
|
);
|
|
177
178
|
}
|
|
178
|
-
const
|
|
179
|
+
const At = {
|
|
179
180
|
amazon: "Amazon",
|
|
180
181
|
apple: "Apple",
|
|
181
182
|
appwrite: "Appwrite",
|
|
@@ -227,9 +228,9 @@ const St = {
|
|
|
227
228
|
zoom: "Zoom"
|
|
228
229
|
};
|
|
229
230
|
function q(e) {
|
|
230
|
-
return
|
|
231
|
+
return At[e] ?? e.charAt(0).toUpperCase() + e.slice(1);
|
|
231
232
|
}
|
|
232
|
-
const
|
|
233
|
+
const j = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }), A = () => (/* @__PURE__ */ new Date()).toISOString(), U = (e) => new Date(Date.now() - e * 6e4).toISOString(), W = [
|
|
233
234
|
"amber",
|
|
234
235
|
"brave",
|
|
235
236
|
"calm",
|
|
@@ -242,13 +243,13 @@ const H = (e, t, i = 401) => Object.assign(new Error(t), { type: e, code: i }),
|
|
|
242
243
|
"juniper",
|
|
243
244
|
"kite",
|
|
244
245
|
"lumen"
|
|
245
|
-
],
|
|
246
|
+
], dt = () => `${W[Math.floor(Math.random() * W.length)]}-${W[Math.floor(Math.random() * W.length)]}`, _ = () => Math.random().toString(36).slice(2, 12), ht = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), Pt = {
|
|
246
247
|
name: "Ada Lovelace",
|
|
247
248
|
email: "ada@example.com",
|
|
248
249
|
phone: "+15550100"
|
|
249
250
|
};
|
|
250
|
-
class
|
|
251
|
-
constructor(t =
|
|
251
|
+
class It {
|
|
252
|
+
constructor(t = Pt) {
|
|
252
253
|
this.seed = t, this.user = null, this.mfaPending = !1, this.mfaEnabled = !1, this.totpEnrolled = !1, this.recoveryCodes = [], this.lastChallenge = 0, this.sessions = [], this.identities = [], this.logs = [], this.tokens = /* @__PURE__ */ new Map(), this.pendingAuthenticator = null;
|
|
253
254
|
}
|
|
254
255
|
// ───────────────────────── helpers ─────────────────────────
|
|
@@ -256,13 +257,13 @@ class Pt {
|
|
|
256
257
|
const i = t.anonymous ?? !1;
|
|
257
258
|
return this.user = {
|
|
258
259
|
$id: "preview-user",
|
|
259
|
-
$createdAt:
|
|
260
|
+
$createdAt: U(1440 * 30),
|
|
260
261
|
$updatedAt: A(),
|
|
261
262
|
name: i ? "" : t.name ?? this.seed.name,
|
|
262
|
-
registration:
|
|
263
|
+
registration: U(1440 * 30),
|
|
263
264
|
status: !0,
|
|
264
265
|
labels: [],
|
|
265
|
-
passwordUpdate: i ? "" :
|
|
266
|
+
passwordUpdate: i ? "" : U(1440 * 7),
|
|
266
267
|
email: i ? "" : t.email ?? this.seed.email,
|
|
267
268
|
phone: i ? "" : t.phone ?? this.seed.phone,
|
|
268
269
|
emailVerification: !i,
|
|
@@ -312,8 +313,8 @@ class Pt {
|
|
|
312
313
|
},
|
|
313
314
|
{
|
|
314
315
|
...i,
|
|
315
|
-
$id:
|
|
316
|
-
$createdAt:
|
|
316
|
+
$id: _(),
|
|
317
|
+
$createdAt: U(300),
|
|
317
318
|
provider: t,
|
|
318
319
|
ip: "198.51.100.7",
|
|
319
320
|
osCode: "IOS",
|
|
@@ -329,8 +330,8 @@ class Pt {
|
|
|
329
330
|
},
|
|
330
331
|
{
|
|
331
332
|
...i,
|
|
332
|
-
$id:
|
|
333
|
-
$createdAt:
|
|
333
|
+
$id: _(),
|
|
334
|
+
$createdAt: U(1440 * 3),
|
|
334
335
|
provider: "oauth2",
|
|
335
336
|
ip: "192.0.2.90",
|
|
336
337
|
osCode: "WIN",
|
|
@@ -345,8 +346,8 @@ class Pt {
|
|
|
345
346
|
], this.identities = [
|
|
346
347
|
{
|
|
347
348
|
$id: "identity-github",
|
|
348
|
-
$createdAt:
|
|
349
|
-
$updatedAt:
|
|
349
|
+
$createdAt: U(1440 * 20),
|
|
350
|
+
$updatedAt: U(1440 * 20),
|
|
350
351
|
userId: "preview-user",
|
|
351
352
|
provider: "github",
|
|
352
353
|
providerUid: "8675309",
|
|
@@ -366,7 +367,7 @@ class Pt {
|
|
|
366
367
|
},
|
|
367
368
|
{
|
|
368
369
|
event: "user.update.name",
|
|
369
|
-
time:
|
|
370
|
+
time: U(1440 * 2),
|
|
370
371
|
clientName: "Safari",
|
|
371
372
|
osName: "iOS",
|
|
372
373
|
countryName: "Germany",
|
|
@@ -374,7 +375,7 @@ class Pt {
|
|
|
374
375
|
},
|
|
375
376
|
{
|
|
376
377
|
event: "session.create",
|
|
377
|
-
time:
|
|
378
|
+
time: U(1440 * 3),
|
|
378
379
|
clientName: "Firefox",
|
|
379
380
|
osName: "Windows",
|
|
380
381
|
countryName: "United States",
|
|
@@ -384,9 +385,9 @@ class Pt {
|
|
|
384
385
|
}
|
|
385
386
|
requireUser() {
|
|
386
387
|
if (!this.user)
|
|
387
|
-
throw
|
|
388
|
+
throw j("general_unauthorized_scope", "User (role: guests) missing scope (account)");
|
|
388
389
|
if (this.mfaPending)
|
|
389
|
-
throw
|
|
390
|
+
throw j(
|
|
390
391
|
"user_more_factors_required",
|
|
391
392
|
"More factors are required to complete the sign in process."
|
|
392
393
|
);
|
|
@@ -394,7 +395,7 @@ class Pt {
|
|
|
394
395
|
}
|
|
395
396
|
requireRecentChallenge() {
|
|
396
397
|
if (Date.now() - this.lastChallenge > 30 * 6e4)
|
|
397
|
-
throw
|
|
398
|
+
throw j(
|
|
398
399
|
"user_challenge_required",
|
|
399
400
|
"A recently successful challenge is required to complete this action."
|
|
400
401
|
);
|
|
@@ -430,26 +431,26 @@ class Pt {
|
|
|
430
431
|
}
|
|
431
432
|
async createMagicURLToken(t, i) {
|
|
432
433
|
return this.tokens.set(t, { email: i }), this.delay({
|
|
433
|
-
$id:
|
|
434
|
+
$id: _(),
|
|
434
435
|
$createdAt: A(),
|
|
435
436
|
userId: t,
|
|
436
437
|
secret: "",
|
|
437
438
|
expire: "",
|
|
438
|
-
phrase:
|
|
439
|
+
phrase: dt()
|
|
439
440
|
});
|
|
440
441
|
}
|
|
441
442
|
async createEmailToken(t, i) {
|
|
442
443
|
return this.tokens.set(t, { email: i }), this.delay({
|
|
443
|
-
$id:
|
|
444
|
+
$id: _(),
|
|
444
445
|
$createdAt: A(),
|
|
445
446
|
userId: t,
|
|
446
447
|
secret: "",
|
|
447
448
|
expire: "",
|
|
448
|
-
phrase:
|
|
449
|
+
phrase: dt()
|
|
449
450
|
});
|
|
450
451
|
}
|
|
451
452
|
async createPhoneToken(t, i) {
|
|
452
|
-
return this.tokens.set(t, { phone: i }), this.delay({ $id:
|
|
453
|
+
return this.tokens.set(t, { phone: i }), this.delay({ $id: _(), $createdAt: A(), userId: t, secret: "", expire: "", phrase: "" });
|
|
453
454
|
}
|
|
454
455
|
async createSession(t) {
|
|
455
456
|
return this.delay(() => {
|
|
@@ -541,7 +542,7 @@ class Pt {
|
|
|
541
542
|
});
|
|
542
543
|
}
|
|
543
544
|
async createMFAChallenge() {
|
|
544
|
-
return this.delay({ $id:
|
|
545
|
+
return this.delay({ $id: _(), $createdAt: A(), userId: "preview-user", expire: "" });
|
|
545
546
|
}
|
|
546
547
|
async updateMFAChallenge() {
|
|
547
548
|
return this.delay(() => (this.mfaPending = !1, this.lastChallenge = Date.now(), this.sessions[0]));
|
|
@@ -570,32 +571,32 @@ class Pt {
|
|
|
570
571
|
async createMFARecoveryCodes() {
|
|
571
572
|
return this.delay(() => {
|
|
572
573
|
if (this.recoveryCodes.length > 0)
|
|
573
|
-
throw
|
|
574
|
-
return this.recoveryCodes = Array.from({ length: 6 },
|
|
574
|
+
throw j("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
|
|
575
|
+
return this.recoveryCodes = Array.from({ length: 6 }, ht), { recoveryCodes: this.recoveryCodes };
|
|
575
576
|
});
|
|
576
577
|
}
|
|
577
578
|
async getMFARecoveryCodes() {
|
|
578
579
|
return this.delay(() => (this.requireRecentChallenge(), { recoveryCodes: this.recoveryCodes }));
|
|
579
580
|
}
|
|
580
581
|
async updateMFARecoveryCodes() {
|
|
581
|
-
return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 },
|
|
582
|
+
return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 }, ht), { recoveryCodes: this.recoveryCodes }));
|
|
582
583
|
}
|
|
583
584
|
/** Forget everything, as a sign out would. */
|
|
584
585
|
reset() {
|
|
585
586
|
this.user = null, this.mfaPending = !1, this.sessions = [], this.identities = [], this.logs = [], this.tokens.clear();
|
|
586
587
|
}
|
|
587
588
|
}
|
|
588
|
-
function
|
|
589
|
+
function Et(e) {
|
|
589
590
|
let t = 2166136261;
|
|
590
591
|
const i = () => (t ^= t << 13, t ^= t >>> 17, t ^= t << 5, (t >>> 0) / 4294967296);
|
|
591
|
-
for (const
|
|
592
|
+
for (const $ of e) t = (t ^ $.charCodeAt(0)) * 16777619;
|
|
592
593
|
const s = 25;
|
|
593
594
|
let a = "";
|
|
594
|
-
const
|
|
595
|
-
for (let
|
|
596
|
-
for (let
|
|
597
|
-
!(
|
|
598
|
-
const u = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${
|
|
595
|
+
const c = ($, x) => `<rect x="${$}" y="${x}" width="7" height="7"/><rect x="${$ + 1}" y="${x + 1}" width="5" height="5" fill="#fff"/><rect x="${$ + 2}" y="${x + 2}" width="3" height="3"/>`;
|
|
596
|
+
for (let $ = 0; $ < s; $++)
|
|
597
|
+
for (let x = 0; x < s; x++)
|
|
598
|
+
!(x < 8 && $ < 8 || x >= s - 8 && $ < 8 || x < 8 && $ >= s - 8) && i() < 0.45 && (a += `<rect x="${x}" y="${$}" width="1" height="1"/>`);
|
|
599
|
+
const u = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${s}" shape-rendering="crispEdges"><rect width="${s}" height="${s}" fill="#fff"/><g fill="#000">${c(0, 0)}${c(s - 7, 0)}${c(0, s - 7)}${a}</g></svg>`;
|
|
599
600
|
return `data:image/svg+xml;utf8,${encodeURIComponent(u)}`;
|
|
600
601
|
}
|
|
601
602
|
const f = {
|
|
@@ -633,7 +634,7 @@ const f = {
|
|
|
633
634
|
targetAlreadyExists: "user_target_already_exists",
|
|
634
635
|
argumentInvalid: "general_argument_invalid"
|
|
635
636
|
};
|
|
636
|
-
function
|
|
637
|
+
function z(e) {
|
|
637
638
|
if (e && typeof e == "object") {
|
|
638
639
|
const t = e;
|
|
639
640
|
let i = typeof t.message == "string" ? t.message : "Unknown error";
|
|
@@ -646,10 +647,10 @@ function R(e) {
|
|
|
646
647
|
return { message: String(e), type: "", code: 0 };
|
|
647
648
|
}
|
|
648
649
|
function N(e, t) {
|
|
649
|
-
return
|
|
650
|
+
return z(e).type === t;
|
|
650
651
|
}
|
|
651
652
|
function K(e, t, i = "link") {
|
|
652
|
-
const s =
|
|
653
|
+
const s = z(e);
|
|
653
654
|
switch (s.type) {
|
|
654
655
|
case f.invalidCredentials:
|
|
655
656
|
return i === "password" ? t.errorCurrentPassword : t.errorInvalidCredentials;
|
|
@@ -692,11 +693,11 @@ function K(e, t, i = "link") {
|
|
|
692
693
|
return s.type === f.projectNotFound || s.type === f.unknownOrigin ? t.errorConfig : s.type === f.routeNotFound ? t.errorConfigEndpoint : s.code === 0 && /fetch|network/i.test(s.message) ? t.errorNetwork : /Invalid `\w+` param/i.test(s.message) ? t.errorGeneric : s.message ? s.message || t.errorGeneric : s.code === 404 || s.type === f.routeNotFound ? t.errorConfigEndpoint : t.errorGeneric;
|
|
693
694
|
}
|
|
694
695
|
function Ut(e) {
|
|
695
|
-
const t =
|
|
696
|
+
const t = z(e);
|
|
696
697
|
return !!(t.type === f.projectNotFound || t.type === f.unknownOrigin || t.type === f.routeNotFound || !t.message && t.code === 404 || t.code === 0 && /fetch|network|load failed|failed to fetch/i.test(t.message));
|
|
697
698
|
}
|
|
698
699
|
const J = (e) => `authui:active-team:${e}`;
|
|
699
|
-
function
|
|
700
|
+
function ut(e) {
|
|
700
701
|
if (typeof localStorage > "u" || !e) return null;
|
|
701
702
|
try {
|
|
702
703
|
return localStorage.getItem(J(e));
|
|
@@ -704,21 +705,21 @@ function dt(e) {
|
|
|
704
705
|
return null;
|
|
705
706
|
}
|
|
706
707
|
}
|
|
707
|
-
function
|
|
708
|
+
function Mt(e, t) {
|
|
708
709
|
if (!(typeof localStorage > "u" || !e))
|
|
709
710
|
try {
|
|
710
711
|
t ? localStorage.setItem(J(e), t) : localStorage.removeItem(J(e));
|
|
711
712
|
} catch {
|
|
712
713
|
}
|
|
713
714
|
}
|
|
714
|
-
const
|
|
715
|
+
const at = "authui:last-method";
|
|
715
716
|
function V(e) {
|
|
716
717
|
if (!(typeof localStorage > "u")) {
|
|
717
718
|
if (!e || e === "mfa" || e === "sign-up")
|
|
718
719
|
if (e === "sign-up") e = "email-password";
|
|
719
720
|
else return;
|
|
720
721
|
try {
|
|
721
|
-
localStorage.setItem(
|
|
722
|
+
localStorage.setItem(at, e);
|
|
722
723
|
} catch {
|
|
723
724
|
}
|
|
724
725
|
}
|
|
@@ -726,7 +727,7 @@ function V(e) {
|
|
|
726
727
|
function D() {
|
|
727
728
|
if (typeof localStorage > "u") return null;
|
|
728
729
|
try {
|
|
729
|
-
return localStorage.getItem(
|
|
730
|
+
return localStorage.getItem(at);
|
|
730
731
|
} catch {
|
|
731
732
|
return null;
|
|
732
733
|
}
|
|
@@ -734,19 +735,19 @@ function D() {
|
|
|
734
735
|
function ne() {
|
|
735
736
|
if (!(typeof localStorage > "u"))
|
|
736
737
|
try {
|
|
737
|
-
localStorage.removeItem(
|
|
738
|
+
localStorage.removeItem(at);
|
|
738
739
|
} catch {
|
|
739
740
|
}
|
|
740
741
|
}
|
|
741
742
|
const G = "authui:pending-oauth";
|
|
742
|
-
function
|
|
743
|
+
function Ot(e) {
|
|
743
744
|
if (!(typeof sessionStorage > "u"))
|
|
744
745
|
try {
|
|
745
746
|
sessionStorage.setItem(G, e);
|
|
746
747
|
} catch {
|
|
747
748
|
}
|
|
748
749
|
}
|
|
749
|
-
function
|
|
750
|
+
function wt() {
|
|
750
751
|
if (!(typeof sessionStorage > "u"))
|
|
751
752
|
try {
|
|
752
753
|
const e = sessionStorage.getItem(G);
|
|
@@ -754,7 +755,7 @@ function yt() {
|
|
|
754
755
|
} catch {
|
|
755
756
|
}
|
|
756
757
|
}
|
|
757
|
-
function
|
|
758
|
+
function pt() {
|
|
758
759
|
if (!(typeof sessionStorage > "u"))
|
|
759
760
|
try {
|
|
760
761
|
sessionStorage.removeItem(G);
|
|
@@ -771,7 +772,7 @@ function S(e, t, i) {
|
|
|
771
772
|
new Error(`Appwrite SDK is missing ${t[0]}(). Update the appwrite package.`)
|
|
772
773
|
);
|
|
773
774
|
}
|
|
774
|
-
const tt = "authui",
|
|
775
|
+
const tt = "authui", mt = ["userId", "secret", "expire", "project", "error", tt], ft = () => ({
|
|
775
776
|
status: "loading",
|
|
776
777
|
user: null,
|
|
777
778
|
mfaFactors: null,
|
|
@@ -781,7 +782,7 @@ const tt = "authui", ut = ["userId", "secret", "expire", "project", "error", tt]
|
|
|
781
782
|
});
|
|
782
783
|
class Ft {
|
|
783
784
|
constructor() {
|
|
784
|
-
this.client = null, this.account = null, this.config = null, this.state =
|
|
785
|
+
this.client = null, this.account = null, this.config = null, this.state = ft(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
|
|
785
786
|
}
|
|
786
787
|
// ───────────────────────────── configuration ─────────────────────────────
|
|
787
788
|
/** Configure the Appwrite client. Safe to call more than once; the last call wins. */
|
|
@@ -789,7 +790,7 @@ class Ft {
|
|
|
789
790
|
const i = t.endpoint.trim().replace(/\/+$/, "");
|
|
790
791
|
i && !i.endsWith("/v1") && console.warn(
|
|
791
792
|
`[authui] endpoint should end with /v1 (got "${t.endpoint}"). Without it Appwrite returns HTML 404 pages.`
|
|
792
|
-
), this.config = t, this.client = new
|
|
793
|
+
), this.config = t, this.client = new lt().setEndpoint(t.endpoint).setProject(t.project), this.preview = t.preview ? new It() : null, this.account = this.preview ? this.preview : new ct(this.client), this.teams = null, this.activeTeamId = ut(t.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
|
|
793
794
|
}
|
|
794
795
|
/**
|
|
795
796
|
* Called by <authui-config> when it is on the page but missing endpoint or project.
|
|
@@ -835,7 +836,7 @@ class Ft {
|
|
|
835
836
|
/** List teams the signed-in user belongs to. Empty in preview or when signed out. */
|
|
836
837
|
async listTeams() {
|
|
837
838
|
if (this.preview || !this.client || this.state.status !== "signed-in") return [];
|
|
838
|
-
this.teams ??= new
|
|
839
|
+
this.teams ??= new xt(this.client);
|
|
839
840
|
try {
|
|
840
841
|
return (await this.teams.list()).teams ?? [];
|
|
841
842
|
} catch (t) {
|
|
@@ -845,7 +846,7 @@ class Ft {
|
|
|
845
846
|
getActiveTeamId() {
|
|
846
847
|
if (this.activeTeamId) return this.activeTeamId;
|
|
847
848
|
const t = this.config?.project;
|
|
848
|
-
return t ? (this.activeTeamId =
|
|
849
|
+
return t ? (this.activeTeamId = ut(t), this.activeTeamId) : null;
|
|
849
850
|
}
|
|
850
851
|
/**
|
|
851
852
|
* Remember the active team locally and emit `active-team`.
|
|
@@ -853,10 +854,10 @@ class Ft {
|
|
|
853
854
|
*/
|
|
854
855
|
setActiveTeam(t) {
|
|
855
856
|
const i = this.config?.project;
|
|
856
|
-
i &&
|
|
857
|
+
i && Mt(i, t?.$id ?? null), this.activeTeamId = t?.$id ?? null, this.emit("active-team", { teamId: this.activeTeamId, team: t });
|
|
857
858
|
}
|
|
858
859
|
getStrings() {
|
|
859
|
-
return { ...
|
|
860
|
+
return { ...Ct, ...this.config?.strings ?? {} };
|
|
860
861
|
}
|
|
861
862
|
getState() {
|
|
862
863
|
return { ...this.state };
|
|
@@ -882,7 +883,7 @@ class Ft {
|
|
|
882
883
|
this.state = { ...this.state, ...t }, this.emit("change", this.getState());
|
|
883
884
|
}
|
|
884
885
|
fail(t) {
|
|
885
|
-
const i =
|
|
886
|
+
const i = z(t);
|
|
886
887
|
throw this.emit("error", i), t;
|
|
887
888
|
}
|
|
888
889
|
acct() {
|
|
@@ -929,8 +930,8 @@ class Ft {
|
|
|
929
930
|
console.warn(
|
|
930
931
|
`[authui] ${a} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
|
|
931
932
|
);
|
|
932
|
-
const
|
|
933
|
-
this.emit("error", { message: a, type:
|
|
933
|
+
const c = z(i);
|
|
934
|
+
this.emit("error", { message: a, type: c.type, code: c.code }), this.setState({
|
|
934
935
|
status: "signed-out",
|
|
935
936
|
user: null,
|
|
936
937
|
mfaFactors: null,
|
|
@@ -974,7 +975,7 @@ class Ft {
|
|
|
974
975
|
localStorage.removeItem("cookieFallback");
|
|
975
976
|
} catch {
|
|
976
977
|
}
|
|
977
|
-
this.config && !this.preview && (this.client = new
|
|
978
|
+
this.config && !this.preview && (this.client = new lt().setEndpoint(this.config.endpoint).setProject(this.config.project), this.account = new ct(this.client));
|
|
978
979
|
}
|
|
979
980
|
// ─────────────────────────────── sign in ───────────────────────────────
|
|
980
981
|
async signInWithEmailPassword(t, i) {
|
|
@@ -987,7 +988,7 @@ class Ft {
|
|
|
987
988
|
}
|
|
988
989
|
async signUp(t, i, s) {
|
|
989
990
|
try {
|
|
990
|
-
await this.acct().create(
|
|
991
|
+
await this.acct().create(H.unique(), t.trim(), i, s?.trim() || void 0), await this.acct().createEmailPasswordSession(t.trim(), i);
|
|
991
992
|
} catch (a) {
|
|
992
993
|
this.fail(a);
|
|
993
994
|
}
|
|
@@ -1030,7 +1031,7 @@ class Ft {
|
|
|
1030
1031
|
async sendMagicUrl(t) {
|
|
1031
1032
|
try {
|
|
1032
1033
|
return await this.acct().createMagicURLToken(
|
|
1033
|
-
|
|
1034
|
+
H.unique(),
|
|
1034
1035
|
t.trim(),
|
|
1035
1036
|
this.redirectUrl("magic-url"),
|
|
1036
1037
|
this.config?.securityPhrase ?? !0
|
|
@@ -1042,7 +1043,7 @@ class Ft {
|
|
|
1042
1043
|
async sendEmailOtp(t) {
|
|
1043
1044
|
try {
|
|
1044
1045
|
return await this.acct().createEmailToken(
|
|
1045
|
-
|
|
1046
|
+
H.unique(),
|
|
1046
1047
|
t.trim(),
|
|
1047
1048
|
this.config?.securityPhrase ?? !0
|
|
1048
1049
|
);
|
|
@@ -1052,7 +1053,7 @@ class Ft {
|
|
|
1052
1053
|
}
|
|
1053
1054
|
async sendPhoneOtp(t) {
|
|
1054
1055
|
try {
|
|
1055
|
-
return await this.acct().createPhoneToken(
|
|
1056
|
+
return await this.acct().createPhoneToken(H.unique(), t.replace(/[\s()-]/g, ""));
|
|
1056
1057
|
} catch (i) {
|
|
1057
1058
|
return this.fail(i);
|
|
1058
1059
|
}
|
|
@@ -1326,7 +1327,7 @@ class Ft {
|
|
|
1326
1327
|
/** Build the URL Appwrite should send the user back to for a given flow. */
|
|
1327
1328
|
redirectUrl(t) {
|
|
1328
1329
|
const i = this.config?.redirectUrl ?? (typeof window < "u" ? window.location.origin + window.location.pathname : ""), s = new URL(i, typeof window < "u" ? window.location.href : void 0);
|
|
1329
|
-
for (const a of
|
|
1330
|
+
for (const a of mt) s.searchParams.delete(a);
|
|
1330
1331
|
return s.searchParams.set(tt, t), s.toString();
|
|
1331
1332
|
}
|
|
1332
1333
|
setPending(t) {
|
|
@@ -1342,7 +1343,7 @@ class Ft {
|
|
|
1342
1343
|
if (!i) return !1;
|
|
1343
1344
|
const s = t.get("userId") ?? "", a = t.get("secret") ?? "";
|
|
1344
1345
|
this.cleanUrl();
|
|
1345
|
-
const
|
|
1346
|
+
const c = () => {
|
|
1346
1347
|
this.setState({
|
|
1347
1348
|
pending: {
|
|
1348
1349
|
type: "notice",
|
|
@@ -1355,10 +1356,10 @@ class Ft {
|
|
|
1355
1356
|
switch (i) {
|
|
1356
1357
|
case "oauth":
|
|
1357
1358
|
case "magic-url":
|
|
1358
|
-
s && a ? (await this.acct().createSession(s, a), i === "oauth" &&
|
|
1359
|
+
s && a ? (await this.acct().createSession(s, a), i === "oauth" && wt()) : (i === "oauth" && pt(), c());
|
|
1359
1360
|
break;
|
|
1360
1361
|
case "oauth-failed":
|
|
1361
|
-
|
|
1362
|
+
pt(), this.setState({
|
|
1362
1363
|
pending: {
|
|
1363
1364
|
type: "notice",
|
|
1364
1365
|
tone: "error",
|
|
@@ -1367,7 +1368,7 @@ class Ft {
|
|
|
1367
1368
|
});
|
|
1368
1369
|
break;
|
|
1369
1370
|
case "recovery":
|
|
1370
|
-
s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) :
|
|
1371
|
+
s && a ? this.setState({ pending: { type: "reset-password", userId: s, secret: a } }) : c();
|
|
1371
1372
|
break;
|
|
1372
1373
|
case "verify-email":
|
|
1373
1374
|
s && a ? (await S(
|
|
@@ -1380,27 +1381,27 @@ class Ft {
|
|
|
1380
1381
|
message: this.getStrings().emailVerified,
|
|
1381
1382
|
tone: "success"
|
|
1382
1383
|
}
|
|
1383
|
-
})) :
|
|
1384
|
+
})) : c();
|
|
1384
1385
|
break;
|
|
1385
1386
|
}
|
|
1386
1387
|
} catch (u) {
|
|
1387
|
-
const
|
|
1388
|
-
this.emit("error",
|
|
1388
|
+
const $ = z(u), x = K(u, this.getStrings(), "link");
|
|
1389
|
+
this.emit("error", $), this.setState({ pending: { type: "notice", message: x, tone: "error" } });
|
|
1389
1390
|
}
|
|
1390
1391
|
return !0;
|
|
1391
1392
|
}
|
|
1392
1393
|
cleanUrl() {
|
|
1393
1394
|
const t = new URL(window.location.href);
|
|
1394
|
-
for (const i of
|
|
1395
|
+
for (const i of mt) t.searchParams.delete(i);
|
|
1395
1396
|
window.history.replaceState(window.history.state, "", t.toString());
|
|
1396
1397
|
}
|
|
1397
1398
|
/** Test helper. */
|
|
1398
1399
|
reset() {
|
|
1399
|
-
this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state =
|
|
1400
|
+
this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = ft(), this.listeners.clear();
|
|
1400
1401
|
}
|
|
1401
1402
|
}
|
|
1402
1403
|
const n = new Ft();
|
|
1403
|
-
class
|
|
1404
|
+
class Tt {
|
|
1404
1405
|
constructor() {
|
|
1405
1406
|
this.listeners = /* @__PURE__ */ new Set(), this.observer = null, this.media = null, this.notify = () => {
|
|
1406
1407
|
const t = this.isDark("auto");
|
|
@@ -1428,14 +1429,14 @@ class Ot {
|
|
|
1428
1429
|
this.observer?.disconnect(), this.observer = null, this.media?.removeEventListener?.("change", this.notify), this.media = null;
|
|
1429
1430
|
}
|
|
1430
1431
|
}
|
|
1431
|
-
const
|
|
1432
|
+
const gt = new Tt(), vt = {
|
|
1432
1433
|
none: "0px",
|
|
1433
1434
|
sm: "0.25rem",
|
|
1434
1435
|
md: "0.625rem",
|
|
1435
1436
|
lg: "0.875rem",
|
|
1436
1437
|
xl: "1.125rem",
|
|
1437
1438
|
full: "1.5rem"
|
|
1438
|
-
},
|
|
1439
|
+
}, Rt = O`
|
|
1439
1440
|
:host {
|
|
1440
1441
|
/* Light theme (matches :root in the console) */
|
|
1441
1442
|
--authui-background: oklch(1 0 0);
|
|
@@ -1513,7 +1514,7 @@ const mt = new Ot(), ft = {
|
|
|
1513
1514
|
--authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
|
|
1514
1515
|
color-scheme: dark;
|
|
1515
1516
|
}
|
|
1516
|
-
`,
|
|
1517
|
+
`, _t = O`
|
|
1517
1518
|
*,
|
|
1518
1519
|
*::before,
|
|
1519
1520
|
*::after {
|
|
@@ -2318,25 +2319,25 @@ const mt = new Ot(), ft = {
|
|
|
2318
2319
|
}
|
|
2319
2320
|
}
|
|
2320
2321
|
`;
|
|
2321
|
-
var Dt = Object.defineProperty,
|
|
2322
|
-
for (var a = void 0,
|
|
2323
|
-
(u = e[
|
|
2322
|
+
var Dt = Object.defineProperty, zt = (e, t, i, s) => {
|
|
2323
|
+
for (var a = void 0, c = e.length - 1, u; c >= 0; c--)
|
|
2324
|
+
(u = e[c]) && (a = u(t, i, a) || a);
|
|
2324
2325
|
return a && Dt(t, i, a), a;
|
|
2325
|
-
},
|
|
2326
|
-
const
|
|
2326
|
+
}, M;
|
|
2327
|
+
const $t = (M = class extends rt {
|
|
2327
2328
|
constructor() {
|
|
2328
2329
|
super(...arguments), this.auth = n.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (t) => t.stopPropagation();
|
|
2329
2330
|
}
|
|
2330
2331
|
connectedCallback() {
|
|
2331
2332
|
super.connectedCallback();
|
|
2332
|
-
for (const t of
|
|
2333
|
+
for (const t of M.KEY_EVENTS) this.addEventListener(t, this.stopKeys);
|
|
2333
2334
|
this.auth = n.getState(), this.unsubscribeStore = n.on("change", (t) => {
|
|
2334
2335
|
this.auth = t, this.applyBranding();
|
|
2335
|
-
}), this.unsubscribeTheme =
|
|
2336
|
+
}), this.unsubscribeTheme = gt.subscribe(() => this.applyBranding()), this.applyBranding();
|
|
2336
2337
|
}
|
|
2337
2338
|
disconnectedCallback() {
|
|
2338
2339
|
super.disconnectedCallback();
|
|
2339
|
-
for (const t of
|
|
2340
|
+
for (const t of M.KEY_EVENTS) this.removeEventListener(t, this.stopKeys);
|
|
2340
2341
|
this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
|
|
2341
2342
|
}
|
|
2342
2343
|
get strings() {
|
|
@@ -2344,7 +2345,7 @@ const wt = (U = class extends st {
|
|
|
2344
2345
|
}
|
|
2345
2346
|
/** Translate a string key with optional `{placeholders}`. */
|
|
2346
2347
|
t(t, i) {
|
|
2347
|
-
return
|
|
2348
|
+
return St(this.strings[t], i);
|
|
2348
2349
|
}
|
|
2349
2350
|
get config() {
|
|
2350
2351
|
return n.getConfig();
|
|
@@ -2354,27 +2355,27 @@ const wt = (U = class extends st {
|
|
|
2354
2355
|
}
|
|
2355
2356
|
/** Push theme and branding from config onto the host element. */
|
|
2356
2357
|
applyBranding() {
|
|
2357
|
-
const t = this.config?.branding, i =
|
|
2358
|
+
const t = this.config?.branding, i = gt.isDark(t?.theme ?? "auto");
|
|
2358
2359
|
this.setAttribute("data-theme", i ? "dark" : "light"), t?.primary && (this.style.setProperty("--authui-primary", t.primary), this.style.setProperty(
|
|
2359
2360
|
"--authui-primary-foreground",
|
|
2360
2361
|
t.primaryForeground ?? "#ffffff"
|
|
2361
|
-
)), t?.radius &&
|
|
2362
|
+
)), t?.radius && vt[t.radius] && this.style.setProperty("--authui-radius", vt[t.radius]);
|
|
2362
2363
|
}
|
|
2363
2364
|
/** Emit a composed custom event from this element. */
|
|
2364
2365
|
fire(t, i) {
|
|
2365
2366
|
this.dispatchEvent(new CustomEvent(t, { detail: i, bubbles: !0, composed: !0 }));
|
|
2366
2367
|
}
|
|
2367
|
-
},
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
],
|
|
2371
|
-
let
|
|
2372
|
-
var
|
|
2373
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
2374
|
-
(u = e[
|
|
2375
|
-
return s && a &&
|
|
2368
|
+
}, M.styles = [Rt, _t], M.KEY_EVENTS = ["keydown", "keyup", "keypress"], M);
|
|
2369
|
+
zt([
|
|
2370
|
+
d()
|
|
2371
|
+
], $t.prototype, "auth");
|
|
2372
|
+
let E = $t;
|
|
2373
|
+
var Lt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, y = (e, t, i, s) => {
|
|
2374
|
+
for (var a = s > 1 ? void 0 : s ? Vt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
2375
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
2376
|
+
return s && a && Lt(t, i, a), a;
|
|
2376
2377
|
};
|
|
2377
|
-
let b = class extends
|
|
2378
|
+
let b = class extends rt {
|
|
2378
2379
|
constructor() {
|
|
2379
2380
|
super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.preview = "";
|
|
2380
2381
|
}
|
|
@@ -2424,7 +2425,7 @@ let b = class extends st {
|
|
|
2424
2425
|
};
|
|
2425
2426
|
}
|
|
2426
2427
|
};
|
|
2427
|
-
b.styles =
|
|
2428
|
+
b.styles = O`
|
|
2428
2429
|
:host {
|
|
2429
2430
|
display: none;
|
|
2430
2431
|
}
|
|
@@ -2484,38 +2485,38 @@ y([
|
|
|
2484
2485
|
g({ type: String })
|
|
2485
2486
|
], b.prototype, "preview", 2);
|
|
2486
2487
|
b = y([
|
|
2487
|
-
|
|
2488
|
+
R("authui-config")
|
|
2488
2489
|
], b);
|
|
2489
|
-
var
|
|
2490
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
2491
|
-
(u = e[
|
|
2492
|
-
return s && a &&
|
|
2490
|
+
var qt = Object.defineProperty, Nt = Object.getOwnPropertyDescriptor, Z = (e, t, i, s) => {
|
|
2491
|
+
for (var a = s > 1 ? void 0 : s ? Nt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
2492
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
2493
|
+
return s && a && qt(t, i, a), a;
|
|
2493
2494
|
};
|
|
2494
|
-
const
|
|
2495
|
-
let
|
|
2496
|
-
function
|
|
2497
|
-
if (!(typeof document > "u" ||
|
|
2498
|
-
|
|
2495
|
+
const bt = "authui-show:not([ready]){display:none}", oe = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
|
|
2496
|
+
let yt = !1;
|
|
2497
|
+
function Bt() {
|
|
2498
|
+
if (!(typeof document > "u" || yt)) {
|
|
2499
|
+
yt = !0;
|
|
2499
2500
|
try {
|
|
2500
2501
|
if (typeof CSSStyleSheet < "u" && "adoptedStyleSheets" in Document.prototype) {
|
|
2501
2502
|
const e = new CSSStyleSheet();
|
|
2502
|
-
e.replaceSync(
|
|
2503
|
+
e.replaceSync(bt), document.adoptedStyleSheets = [...document.adoptedStyleSheets, e];
|
|
2503
2504
|
return;
|
|
2504
2505
|
}
|
|
2505
2506
|
} catch {
|
|
2506
2507
|
}
|
|
2507
2508
|
if (!document.getElementById("authui-fouc")) {
|
|
2508
2509
|
const e = document.createElement("style");
|
|
2509
|
-
e.id = "authui-fouc", e.textContent =
|
|
2510
|
+
e.id = "authui-fouc", e.textContent = bt, document.head.appendChild(e);
|
|
2510
2511
|
}
|
|
2511
2512
|
}
|
|
2512
2513
|
}
|
|
2513
|
-
|
|
2514
|
-
const
|
|
2514
|
+
Bt();
|
|
2515
|
+
const Ht = ["loading", "signed-out", "signed-in", "mfa-required"];
|
|
2515
2516
|
function Q(e) {
|
|
2516
|
-
return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) =>
|
|
2517
|
+
return e ? e.split(/[\s,]+/).map((t) => t.trim()).filter((t) => Ht.includes(t)) : [];
|
|
2517
2518
|
}
|
|
2518
|
-
let B = class extends
|
|
2519
|
+
let B = class extends rt {
|
|
2519
2520
|
constructor() {
|
|
2520
2521
|
super(...arguments), this.when = "", this.unless = "", this.status = n.getState().status, this.unsubscribe = null;
|
|
2521
2522
|
}
|
|
@@ -2544,12 +2545,12 @@ Z([
|
|
|
2544
2545
|
g({ type: String })
|
|
2545
2546
|
], B.prototype, "unless", 2);
|
|
2546
2547
|
Z([
|
|
2547
|
-
|
|
2548
|
+
d()
|
|
2548
2549
|
], B.prototype, "status", 2);
|
|
2549
2550
|
B = Z([
|
|
2550
|
-
|
|
2551
|
+
R("authui-show")
|
|
2551
2552
|
], B);
|
|
2552
|
-
const jt =
|
|
2553
|
+
const jt = O`
|
|
2553
2554
|
:host {
|
|
2554
2555
|
display: block;
|
|
2555
2556
|
width: 100%;
|
|
@@ -2614,157 +2615,157 @@ const jt = F`
|
|
|
2614
2615
|
aria-hidden="true"
|
|
2615
2616
|
>
|
|
2616
2617
|
${e}
|
|
2617
|
-
</svg>`,
|
|
2618
|
+
</svg>`, l = {
|
|
2618
2619
|
mail: v(
|
|
2619
|
-
|
|
2620
|
+
h`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
|
|
2620
2621
|
),
|
|
2621
2622
|
phone: v(
|
|
2622
|
-
|
|
2623
|
+
h`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
|
|
2623
2624
|
),
|
|
2624
2625
|
user: v(
|
|
2625
|
-
|
|
2626
|
+
h`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
|
|
2626
2627
|
),
|
|
2627
2628
|
userX: v(
|
|
2628
|
-
|
|
2629
|
+
h`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
|
|
2629
2630
|
),
|
|
2630
2631
|
lock: v(
|
|
2631
|
-
|
|
2632
|
+
h`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
|
|
2632
2633
|
),
|
|
2633
2634
|
key: v(
|
|
2634
|
-
|
|
2635
|
+
h`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
|
|
2635
2636
|
),
|
|
2636
2637
|
shield: v(
|
|
2637
|
-
|
|
2638
|
+
h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
|
|
2638
2639
|
),
|
|
2639
2640
|
shieldCheck: v(
|
|
2640
|
-
|
|
2641
|
+
h`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
|
|
2641
2642
|
),
|
|
2642
2643
|
smartphone: v(
|
|
2643
|
-
|
|
2644
|
+
h`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
|
|
2644
2645
|
),
|
|
2645
2646
|
monitor: v(
|
|
2646
|
-
|
|
2647
|
+
h`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
|
|
2647
2648
|
),
|
|
2648
2649
|
globe: v(
|
|
2649
|
-
|
|
2650
|
+
h`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
|
|
2650
2651
|
),
|
|
2651
2652
|
logOut: v(
|
|
2652
|
-
|
|
2653
|
+
h`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
|
|
2653
2654
|
),
|
|
2654
2655
|
settings: v(
|
|
2655
|
-
|
|
2656
|
+
h`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
|
|
2656
2657
|
),
|
|
2657
|
-
x: v(
|
|
2658
|
-
check: v(
|
|
2658
|
+
x: v(h`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
|
|
2659
|
+
check: v(h`<path d="M20 6 9 17l-5-5"/>`),
|
|
2659
2660
|
users: v(
|
|
2660
|
-
|
|
2661
|
+
h`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
|
|
2661
2662
|
),
|
|
2662
2663
|
copy: v(
|
|
2663
|
-
|
|
2664
|
+
h`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
|
|
2664
2665
|
),
|
|
2665
2666
|
eye: v(
|
|
2666
|
-
|
|
2667
|
+
h`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
|
|
2667
2668
|
),
|
|
2668
2669
|
eyeOff: v(
|
|
2669
|
-
|
|
2670
|
+
h`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
|
|
2670
2671
|
),
|
|
2671
|
-
arrowLeft: v(
|
|
2672
|
+
arrowLeft: v(h`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
|
|
2672
2673
|
alert: v(
|
|
2673
|
-
|
|
2674
|
+
h`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
|
|
2674
2675
|
),
|
|
2675
|
-
info: v(
|
|
2676
|
-
checkCircle: v(
|
|
2676
|
+
info: v(h`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
|
|
2677
|
+
checkCircle: v(h`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
|
|
2677
2678
|
link: v(
|
|
2678
|
-
|
|
2679
|
+
h`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
|
|
2679
2680
|
),
|
|
2680
2681
|
activity: v(
|
|
2681
|
-
|
|
2682
|
+
h`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
|
|
2682
2683
|
),
|
|
2683
2684
|
trash: v(
|
|
2684
|
-
|
|
2685
|
+
h`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
|
|
2685
2686
|
),
|
|
2686
2687
|
sparkles: v(
|
|
2687
|
-
|
|
2688
|
+
h`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
|
|
2688
2689
|
),
|
|
2689
2690
|
refresh: v(
|
|
2690
|
-
|
|
2691
|
+
h`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
|
|
2691
2692
|
),
|
|
2692
|
-
chevronDown: v(
|
|
2693
|
+
chevronDown: v(h`<path d="m6 9 6 6 6-6"/>`),
|
|
2693
2694
|
ghost: v(
|
|
2694
|
-
|
|
2695
|
+
h`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
|
|
2695
2696
|
),
|
|
2696
2697
|
qr: v(
|
|
2697
|
-
|
|
2698
|
+
h`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
|
|
2698
2699
|
)
|
|
2699
|
-
}, w = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`,
|
|
2700
|
+
}, w = (e, t = "0 0 24 24") => r`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${t} aria-hidden="true">${e}</svg>`, Wt = {
|
|
2700
2701
|
google: w(
|
|
2701
|
-
|
|
2702
|
+
h`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
|
|
2702
2703
|
),
|
|
2703
2704
|
github: w(
|
|
2704
|
-
|
|
2705
|
+
h`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
|
|
2705
2706
|
),
|
|
2706
2707
|
apple: w(
|
|
2707
|
-
|
|
2708
|
+
h`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
|
|
2708
2709
|
),
|
|
2709
2710
|
facebook: w(
|
|
2710
|
-
|
|
2711
|
+
h`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
|
|
2711
2712
|
),
|
|
2712
2713
|
x: w(
|
|
2713
|
-
|
|
2714
|
+
h`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
|
|
2714
2715
|
),
|
|
2715
2716
|
microsoft: w(
|
|
2716
|
-
|
|
2717
|
+
h`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
|
|
2717
2718
|
),
|
|
2718
2719
|
discord: w(
|
|
2719
|
-
|
|
2720
|
+
h`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
|
|
2720
2721
|
),
|
|
2721
2722
|
gitlab: w(
|
|
2722
|
-
|
|
2723
|
+
h`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
|
|
2723
2724
|
),
|
|
2724
2725
|
linkedin: w(
|
|
2725
|
-
|
|
2726
|
+
h`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
|
|
2726
2727
|
),
|
|
2727
2728
|
slack: w(
|
|
2728
|
-
|
|
2729
|
+
h`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
|
|
2729
2730
|
),
|
|
2730
2731
|
twitch: w(
|
|
2731
|
-
|
|
2732
|
+
h`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
|
|
2732
2733
|
),
|
|
2733
2734
|
spotify: w(
|
|
2734
|
-
|
|
2735
|
+
h`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
|
|
2735
2736
|
),
|
|
2736
2737
|
notion: w(
|
|
2737
|
-
|
|
2738
|
+
h`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
|
|
2738
2739
|
),
|
|
2739
2740
|
dropbox: w(
|
|
2740
|
-
|
|
2741
|
+
h`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
|
|
2741
2742
|
),
|
|
2742
2743
|
figma: w(
|
|
2743
|
-
|
|
2744
|
+
h`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
|
|
2744
2745
|
),
|
|
2745
2746
|
bitbucket: w(
|
|
2746
|
-
|
|
2747
|
+
h`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
|
|
2747
2748
|
),
|
|
2748
2749
|
amazon: w(
|
|
2749
|
-
|
|
2750
|
+
h`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
|
|
2750
2751
|
),
|
|
2751
2752
|
paypal: w(
|
|
2752
|
-
|
|
2753
|
+
h`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
|
|
2753
2754
|
)
|
|
2754
2755
|
};
|
|
2755
2756
|
function et(e) {
|
|
2756
|
-
return
|
|
2757
|
+
return Wt[e] ?? l.globe;
|
|
2757
2758
|
}
|
|
2758
|
-
function
|
|
2759
|
+
function nt(e) {
|
|
2759
2760
|
const t = (e.trim()[0] ?? "?").toUpperCase();
|
|
2760
|
-
return /[A-Z0-9]/i.test(t) ? t :
|
|
2761
|
+
return /[A-Z0-9]/i.test(t) ? t : l.user;
|
|
2761
2762
|
}
|
|
2762
2763
|
function Y(e) {
|
|
2763
2764
|
typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
|
|
2764
2765
|
window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: e } }));
|
|
2765
2766
|
}));
|
|
2766
2767
|
}
|
|
2767
|
-
function
|
|
2768
|
+
function le() {
|
|
2768
2769
|
typeof window > "u" || window.dispatchEvent(new CustomEvent("authui:close"));
|
|
2769
2770
|
}
|
|
2770
2771
|
function it(e) {
|
|
@@ -2783,12 +2784,12 @@ function it(e) {
|
|
|
2783
2784
|
let s, a;
|
|
2784
2785
|
return !t.length || i <= 1 ? (s = 1, a = "passwordStrengthTooWeak") : i === 2 ? (s = 2, a = "passwordStrengthWeak") : i === 3 ? (s = 3, a = "passwordStrengthFair") : i >= 5 && t.long && t.lower && t.upper && t.number && t.symbol ? (s = 4, a = "passwordStrengthVeryStrong") : (s = 4, a = "passwordStrengthStrong"), { level: s, percent: s * 25, labelKey: a, checks: t };
|
|
2785
2786
|
}
|
|
2786
|
-
var
|
|
2787
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
2788
|
-
(u = e[
|
|
2789
|
-
return s && a &&
|
|
2787
|
+
var Kt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, C = (e, t, i, s) => {
|
|
2788
|
+
for (var a = s > 1 ? void 0 : s ? Gt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
2789
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
2790
|
+
return s && a && Kt(t, i, a), a;
|
|
2790
2791
|
};
|
|
2791
|
-
let
|
|
2792
|
+
let k = class extends E {
|
|
2792
2793
|
constructor() {
|
|
2793
2794
|
super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.onSignIn = (e) => {
|
|
2794
2795
|
e.preventDefault(), this.requireValid(e) && this.run(async () => {
|
|
@@ -2804,8 +2805,8 @@ let $ = class extends P {
|
|
|
2804
2805
|
});
|
|
2805
2806
|
}, this.onOAuth = (e) => {
|
|
2806
2807
|
this.run(async () => {
|
|
2807
|
-
if (
|
|
2808
|
-
|
|
2808
|
+
if (Ot(e), await n.signInWithOAuth(e), n.isPreview) {
|
|
2809
|
+
wt(), this.fire("authui-success", { method: "oauth" });
|
|
2809
2810
|
return;
|
|
2810
2811
|
}
|
|
2811
2812
|
await new Promise((t) => setTimeout(t, 4e3));
|
|
@@ -2935,14 +2936,14 @@ let $ = class extends P {
|
|
|
2935
2936
|
<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
|
|
2936
2937
|
${this.renderHeader()}
|
|
2937
2938
|
${this.notice ? r`<div class="alert alert-${this.notice.tone}" role="status">
|
|
2938
|
-
${this.notice.tone === "success" ?
|
|
2939
|
+
${this.notice.tone === "success" ? l.checkCircle : this.notice.tone === "error" ? l.alert : l.info}
|
|
2939
2940
|
<div class="alert-body">${this.notice.message}</div>
|
|
2940
2941
|
<button
|
|
2941
2942
|
class="btn btn-ghost btn-icon dismiss"
|
|
2942
2943
|
@click=${() => this.dismissNotice()}
|
|
2943
2944
|
aria-label=${this.t("close")}
|
|
2944
2945
|
>
|
|
2945
|
-
${
|
|
2946
|
+
${l.x}
|
|
2946
2947
|
</button>
|
|
2947
2948
|
</div>` : o}
|
|
2948
2949
|
${e}
|
|
@@ -2995,7 +2996,7 @@ let $ = class extends P {
|
|
|
2995
2996
|
}
|
|
2996
2997
|
renderError() {
|
|
2997
2998
|
return this.error ? r`<div class="alert alert-error" role="alert">
|
|
2998
|
-
${
|
|
2999
|
+
${l.alert}
|
|
2999
3000
|
<div class="alert-body">${this.error}</div>
|
|
3000
3001
|
</div>` : o;
|
|
3001
3002
|
}
|
|
@@ -3036,7 +3037,7 @@ let $ = class extends P {
|
|
|
3036
3037
|
aria-label=${this.showPassword ? this.t("hidePassword") : this.t("showPassword")}
|
|
3037
3038
|
tabindex="-1"
|
|
3038
3039
|
>
|
|
3039
|
-
${this.showPassword ?
|
|
3040
|
+
${this.showPassword ? l.eyeOff : l.eye}
|
|
3040
3041
|
</button>
|
|
3041
3042
|
</div>
|
|
3042
3043
|
${i && t ? r`<div class="strength" aria-live="polite">
|
|
@@ -3105,19 +3106,19 @@ let $ = class extends P {
|
|
|
3105
3106
|
backLink(e = "sign-in") {
|
|
3106
3107
|
return r`<div class="links">
|
|
3107
3108
|
<button type="button" class="btn btn-link" @click=${() => this.go(e)}>
|
|
3108
|
-
${
|
|
3109
|
+
${l.arrowLeft} ${this.t("back")}
|
|
3109
3110
|
</button>
|
|
3110
3111
|
</div>`;
|
|
3111
3112
|
}
|
|
3112
3113
|
renderStep() {
|
|
3113
3114
|
if (this.auth.configError)
|
|
3114
3115
|
return r`<div class="alert alert-error" role="alert">
|
|
3115
|
-
${
|
|
3116
|
+
${l.alert}
|
|
3116
3117
|
<div class="alert-body">${this.auth.configError}</div>
|
|
3117
3118
|
</div>`;
|
|
3118
3119
|
if (!this.auth.configured)
|
|
3119
3120
|
return r`<div class="alert alert-error" role="alert">
|
|
3120
|
-
${
|
|
3121
|
+
${l.alert}
|
|
3121
3122
|
<div class="alert-body">${this.t("errorNotConfigured")}</div>
|
|
3122
3123
|
</div>`;
|
|
3123
3124
|
if (this.auth.status === "loading")
|
|
@@ -3148,7 +3149,7 @@ let $ = class extends P {
|
|
|
3148
3149
|
<div class="stack">
|
|
3149
3150
|
<div class="row">
|
|
3150
3151
|
<div class="inline">
|
|
3151
|
-
<span class="avatar">${
|
|
3152
|
+
<span class="avatar">${nt(t)}</span>
|
|
3152
3153
|
<div class="row-main">
|
|
3153
3154
|
<span class="row-title" title=${t}>${t}</span>
|
|
3154
3155
|
${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
|
|
@@ -3166,10 +3167,10 @@ let $ = class extends P {
|
|
|
3166
3167
|
this.embedded ? this.fire("authui-open", { view: "account" }) : Y("account");
|
|
3167
3168
|
}}
|
|
3168
3169
|
>
|
|
3169
|
-
${
|
|
3170
|
+
${l.settings} ${this.t("manageAccount")}
|
|
3170
3171
|
</button>
|
|
3171
3172
|
<button class="btn btn-ghost btn-block" @click=${this.onSignOut} ?disabled=${this.busy}>
|
|
3172
|
-
${
|
|
3173
|
+
${l.logOut} ${this.t("signOut")}
|
|
3173
3174
|
</button>
|
|
3174
3175
|
</div>
|
|
3175
3176
|
</div>
|
|
@@ -3180,8 +3181,8 @@ let $ = class extends P {
|
|
|
3180
3181
|
if (e.length === 0) return o;
|
|
3181
3182
|
const t = D();
|
|
3182
3183
|
e.sort((s, a) => {
|
|
3183
|
-
const
|
|
3184
|
-
return
|
|
3184
|
+
const c = t === `oauth:${s}` ? 0 : 1, u = t === `oauth:${a}` ? 0 : 1;
|
|
3185
|
+
return c - u;
|
|
3185
3186
|
});
|
|
3186
3187
|
const i = e.length > 2;
|
|
3187
3188
|
return r`
|
|
@@ -3207,9 +3208,9 @@ let $ = class extends P {
|
|
|
3207
3208
|
}
|
|
3208
3209
|
renderSignIn() {
|
|
3209
3210
|
const e = this.config?.methods ?? {}, t = e.emailPassword !== !1, i = (e.oauth?.length ?? 0) > 0, s = [
|
|
3210
|
-
e.magicUrl ? { step: "magic-url", icon:
|
|
3211
|
-
e.emailOtp ? { step: "email-otp", icon:
|
|
3212
|
-
e.phone ? { step: "phone", icon:
|
|
3211
|
+
e.magicUrl ? { step: "magic-url", icon: l.link, label: this.t("sendMagicLink") } : null,
|
|
3212
|
+
e.emailOtp ? { step: "email-otp", icon: l.mail, label: this.t("continueWithEmail") } : null,
|
|
3213
|
+
e.phone ? { step: "phone", icon: l.smartphone, label: this.t("continueWithPhone") } : null
|
|
3213
3214
|
].filter(Boolean);
|
|
3214
3215
|
return r`
|
|
3215
3216
|
<div class="stack">
|
|
@@ -3229,14 +3230,14 @@ let $ = class extends P {
|
|
|
3229
3230
|
</form>` : this.renderError()}
|
|
3230
3231
|
${s.length > 0 ? r`<div class="stack-sm">
|
|
3231
3232
|
${s.map((a) => {
|
|
3232
|
-
const
|
|
3233
|
+
const c = D() === a.step;
|
|
3233
3234
|
return r`<button
|
|
3234
3235
|
type="button"
|
|
3235
|
-
class="btn btn-secondary btn-block ${
|
|
3236
|
+
class="btn btn-secondary btn-block ${c ? "last-used" : ""}"
|
|
3236
3237
|
@click=${() => this.go(a.step)}
|
|
3237
3238
|
>
|
|
3238
3239
|
${a.icon} ${a.label}
|
|
3239
|
-
${
|
|
3240
|
+
${c ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
|
|
3240
3241
|
</button>`;
|
|
3241
3242
|
})}
|
|
3242
3243
|
</div>` : o}
|
|
@@ -3246,7 +3247,7 @@ let $ = class extends P {
|
|
|
3246
3247
|
@click=${this.onGuest}
|
|
3247
3248
|
?disabled=${this.busy}
|
|
3248
3249
|
>
|
|
3249
|
-
${
|
|
3250
|
+
${l.ghost} ${this.t("continueAsGuest")}
|
|
3250
3251
|
${D() === "anonymous" ? r`<span class="last-used-badge">${this.t("lastUsed")}</span>` : o}
|
|
3251
3252
|
</button>` : o}
|
|
3252
3253
|
${t && this.config?.signUp !== !1 ? r`<div class="links">
|
|
@@ -3317,13 +3318,13 @@ let $ = class extends P {
|
|
|
3317
3318
|
this.step = "sign-in", this.error = "", this.notice = null, this.focusOnStep = !0, this.fire("authui-view", { view: "sign-in" });
|
|
3318
3319
|
}}
|
|
3319
3320
|
>
|
|
3320
|
-
${
|
|
3321
|
+
${l.arrowLeft} ${this.t("back")}
|
|
3321
3322
|
</button>
|
|
3322
3323
|
</div>
|
|
3323
3324
|
</div>
|
|
3324
3325
|
` : r`<div class="stack">
|
|
3325
3326
|
<div class="alert alert-error" role="alert">
|
|
3326
|
-
${
|
|
3327
|
+
${l.alert}
|
|
3327
3328
|
<div class="alert-body">${this.t("errorInvalidToken")}</div>
|
|
3328
3329
|
</div>
|
|
3329
3330
|
<div class="links">
|
|
@@ -3341,7 +3342,7 @@ let $ = class extends P {
|
|
|
3341
3342
|
}
|
|
3342
3343
|
phraseBox(e) {
|
|
3343
3344
|
return e ? r`<div class="alert alert-info">
|
|
3344
|
-
${
|
|
3345
|
+
${l.shield}
|
|
3345
3346
|
<div class="alert-title">
|
|
3346
3347
|
${this.t("securityPhrase")}: <span class="code">${e}</span>
|
|
3347
3348
|
</div>
|
|
@@ -3351,7 +3352,7 @@ let $ = class extends P {
|
|
|
3351
3352
|
renderMagicUrl() {
|
|
3352
3353
|
return this.token ? r`<div class="stack">
|
|
3353
3354
|
<div class="alert alert-success" role="status">
|
|
3354
|
-
${
|
|
3355
|
+
${l.mail}
|
|
3355
3356
|
<div class="alert-body">${this.t("magicLinkSent", { email: this.token.target })}</div>
|
|
3356
3357
|
</div>
|
|
3357
3358
|
${this.phraseBox(this.token.phrase)} ${this.backLink()}
|
|
@@ -3386,7 +3387,7 @@ let $ = class extends P {
|
|
|
3386
3387
|
const e = this.token?.kind === "phone", t = Date.now() < this.resendCooldownUntil;
|
|
3387
3388
|
return r`
|
|
3388
3389
|
<div class="alert alert-info" role="status">
|
|
3389
|
-
${e ?
|
|
3390
|
+
${e ? l.smartphone : l.mail}
|
|
3390
3391
|
<div class="alert-body">${this.t("codeSent", { target: this.token.target })}</div>
|
|
3391
3392
|
</div>
|
|
3392
3393
|
${this.phraseBox(this.token.phrase)}
|
|
@@ -3456,25 +3457,25 @@ let $ = class extends P {
|
|
|
3456
3457
|
const i = [
|
|
3457
3458
|
{
|
|
3458
3459
|
factor: "totp",
|
|
3459
|
-
icon:
|
|
3460
|
+
icon: l.smartphone,
|
|
3460
3461
|
label: this.t("mfaUseAuthenticator"),
|
|
3461
3462
|
available: e?.totp ?? !0
|
|
3462
3463
|
},
|
|
3463
3464
|
{
|
|
3464
3465
|
factor: "email",
|
|
3465
|
-
icon:
|
|
3466
|
+
icon: l.mail,
|
|
3466
3467
|
label: this.t("mfaUseEmail"),
|
|
3467
3468
|
available: e?.email ?? !0
|
|
3468
3469
|
},
|
|
3469
3470
|
{
|
|
3470
3471
|
factor: "phone",
|
|
3471
|
-
icon:
|
|
3472
|
+
icon: l.phone,
|
|
3472
3473
|
label: this.t("mfaUsePhone"),
|
|
3473
3474
|
available: e?.phone ?? !0
|
|
3474
3475
|
},
|
|
3475
3476
|
{
|
|
3476
3477
|
factor: "recoverycode",
|
|
3477
|
-
icon:
|
|
3478
|
+
icon: l.key,
|
|
3478
3479
|
label: this.t("mfaUseRecoveryCode"),
|
|
3479
3480
|
available: e?.recoveryCode ?? !0
|
|
3480
3481
|
}
|
|
@@ -3522,7 +3523,7 @@ let $ = class extends P {
|
|
|
3522
3523
|
</form>
|
|
3523
3524
|
<div class="links">
|
|
3524
3525
|
<button type="button" class="btn btn-link" @click=${() => this.challenge = null}>
|
|
3525
|
-
${
|
|
3526
|
+
${l.arrowLeft} ${this.t("back")}
|
|
3526
3527
|
</button>
|
|
3527
3528
|
<span aria-hidden="true">·</span>
|
|
3528
3529
|
<button type="button" class="btn btn-link" @click=${this.onCancelMfa}>
|
|
@@ -3533,57 +3534,57 @@ let $ = class extends P {
|
|
|
3533
3534
|
`;
|
|
3534
3535
|
}
|
|
3535
3536
|
};
|
|
3536
|
-
|
|
3537
|
-
|
|
3537
|
+
k.styles = [...E.styles, jt];
|
|
3538
|
+
C([
|
|
3538
3539
|
g({ type: String })
|
|
3539
|
-
],
|
|
3540
|
-
|
|
3540
|
+
], k.prototype, "view", 2);
|
|
3541
|
+
C([
|
|
3541
3542
|
g({ type: Boolean })
|
|
3542
|
-
],
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
],
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
],
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
],
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
],
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
],
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
],
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
],
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
],
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
],
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
],
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
],
|
|
3576
|
-
var
|
|
3577
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
3578
|
-
(u = e[
|
|
3579
|
-
return s && a &&
|
|
3543
|
+
], k.prototype, "embedded", 2);
|
|
3544
|
+
C([
|
|
3545
|
+
d()
|
|
3546
|
+
], k.prototype, "step", 2);
|
|
3547
|
+
C([
|
|
3548
|
+
d()
|
|
3549
|
+
], k.prototype, "busy", 2);
|
|
3550
|
+
C([
|
|
3551
|
+
d()
|
|
3552
|
+
], k.prototype, "error", 2);
|
|
3553
|
+
C([
|
|
3554
|
+
d()
|
|
3555
|
+
], k.prototype, "notice", 2);
|
|
3556
|
+
C([
|
|
3557
|
+
d()
|
|
3558
|
+
], k.prototype, "showPassword", 2);
|
|
3559
|
+
C([
|
|
3560
|
+
d()
|
|
3561
|
+
], k.prototype, "token", 2);
|
|
3562
|
+
C([
|
|
3563
|
+
d()
|
|
3564
|
+
], k.prototype, "resendCooldownUntil", 2);
|
|
3565
|
+
C([
|
|
3566
|
+
d()
|
|
3567
|
+
], k.prototype, "challenge", 2);
|
|
3568
|
+
C([
|
|
3569
|
+
d()
|
|
3570
|
+
], k.prototype, "recovery", 2);
|
|
3571
|
+
C([
|
|
3572
|
+
st("form input:not([type=hidden])")
|
|
3573
|
+
], k.prototype, "firstInput", 2);
|
|
3574
|
+
k = C([
|
|
3575
|
+
R("authui-sign-in")
|
|
3576
|
+
], k);
|
|
3577
|
+
var Yt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, m = (e, t, i, s) => {
|
|
3578
|
+
for (var a = s > 1 ? void 0 : s ? Zt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
3579
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
3580
|
+
return s && a && Yt(t, i, a), a;
|
|
3580
3581
|
};
|
|
3581
|
-
let p = class extends
|
|
3582
|
+
let p = class extends E {
|
|
3582
3583
|
constructor() {
|
|
3583
|
-
super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.onTabsKeydown = (e) => {
|
|
3584
|
+
super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.onTabsKeydown = (e) => {
|
|
3584
3585
|
const t = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
|
|
3585
3586
|
if (!t.length) return;
|
|
3586
|
-
const i = t.findIndex((
|
|
3587
|
+
const i = t.findIndex((c) => c.getAttribute("aria-selected") === "true");
|
|
3587
3588
|
let s = i;
|
|
3588
3589
|
if (e.key === "ArrowRight" || e.key === "ArrowDown") s = (i + 1) % t.length;
|
|
3589
3590
|
else if (e.key === "ArrowLeft" || e.key === "ArrowUp")
|
|
@@ -3624,7 +3625,7 @@ let p = class extends P {
|
|
|
3624
3625
|
Date.now() < this.verifyEmailCooldownUntil || this.run(
|
|
3625
3626
|
"verify",
|
|
3626
3627
|
async () => {
|
|
3627
|
-
await n.sendEmailVerification(), this.
|
|
3628
|
+
await n.sendEmailVerification(), this.startVerifyEmailCooldown();
|
|
3628
3629
|
},
|
|
3629
3630
|
this.t("verificationSent")
|
|
3630
3631
|
);
|
|
@@ -3651,7 +3652,7 @@ let p = class extends P {
|
|
|
3651
3652
|
async () => {
|
|
3652
3653
|
await n.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
|
|
3653
3654
|
},
|
|
3654
|
-
this.t("
|
|
3655
|
+
this.t("passwordChanged")
|
|
3655
3656
|
);
|
|
3656
3657
|
}
|
|
3657
3658
|
}, this.onToggleMfa = () => {
|
|
@@ -3721,9 +3722,12 @@ let p = class extends P {
|
|
|
3721
3722
|
}, this.onStepUpVerify = (e) => {
|
|
3722
3723
|
if (e.preventDefault(), !this.requireValid(e)) return;
|
|
3723
3724
|
const t = this.stepUp;
|
|
3724
|
-
t?.challenge &&
|
|
3725
|
-
|
|
3726
|
-
|
|
3725
|
+
t?.challenge && (async () => {
|
|
3726
|
+
let i = !1;
|
|
3727
|
+
await this.run("stepup-code", async () => {
|
|
3728
|
+
await n.completeMfaChallenge(t.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", i = !0;
|
|
3729
|
+
}), i && await t.retry();
|
|
3730
|
+
})();
|
|
3727
3731
|
}, this.onDeleteSession = (e) => {
|
|
3728
3732
|
this.run(`session-${e}`, async () => {
|
|
3729
3733
|
if ((this.sessions ?? []).some((i) => i.$id === e && i.current)) {
|
|
@@ -3753,6 +3757,9 @@ let p = class extends P {
|
|
|
3753
3757
|
connectedCallback() {
|
|
3754
3758
|
super.connectedCallback(), this.active = this.tab, this.hydrate();
|
|
3755
3759
|
}
|
|
3760
|
+
disconnectedCallback() {
|
|
3761
|
+
super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
|
|
3762
|
+
}
|
|
3756
3763
|
willUpdate(e) {
|
|
3757
3764
|
e.has("tab") && e.get("tab") !== void 0 && (this.active = this.tab), e.has("auth") && this.hydrate(), this.ensureLoaded();
|
|
3758
3765
|
}
|
|
@@ -3864,6 +3871,14 @@ let p = class extends P {
|
|
|
3864
3871
|
}
|
|
3865
3872
|
}
|
|
3866
3873
|
}
|
|
3874
|
+
startVerifyEmailCooldown() {
|
|
3875
|
+
this.verifyEmailCooldownUntil = Date.now() + 45e3, this.clearVerifyEmailCooldownTimer(), this.verifyEmailCooldownTimer = setInterval(() => {
|
|
3876
|
+
this.requestUpdate(), Date.now() >= this.verifyEmailCooldownUntil && this.clearVerifyEmailCooldownTimer();
|
|
3877
|
+
}, 1e3);
|
|
3878
|
+
}
|
|
3879
|
+
clearVerifyEmailCooldownTimer() {
|
|
3880
|
+
this.verifyEmailCooldownTimer && (clearInterval(this.verifyEmailCooldownTimer), this.verifyEmailCooldownTimer = null);
|
|
3881
|
+
}
|
|
3867
3882
|
bind(e) {
|
|
3868
3883
|
return (t) => {
|
|
3869
3884
|
this[e] = t.target.value;
|
|
@@ -3873,7 +3888,7 @@ let p = class extends P {
|
|
|
3873
3888
|
render() {
|
|
3874
3889
|
if (!this.auth.configured)
|
|
3875
3890
|
return r`<div class="alert alert-error" role="alert">
|
|
3876
|
-
${
|
|
3891
|
+
${l.alert}
|
|
3877
3892
|
<div class="alert-body">${this.t("errorNotConfigured")}</div>
|
|
3878
3893
|
</div>`;
|
|
3879
3894
|
if (this.auth.status === "loading")
|
|
@@ -3910,7 +3925,7 @@ let p = class extends P {
|
|
|
3910
3925
|
)}
|
|
3911
3926
|
</div>
|
|
3912
3927
|
${this.notice ? r`<div class="alert alert-${this.notice.tone}" role="status">
|
|
3913
|
-
${this.notice.tone === "success" ?
|
|
3928
|
+
${this.notice.tone === "success" ? l.checkCircle : l.info}
|
|
3914
3929
|
<div class="alert-body">${this.notice.message}</div>
|
|
3915
3930
|
<button
|
|
3916
3931
|
class="btn btn-ghost btn-icon dismiss"
|
|
@@ -3919,7 +3934,7 @@ let p = class extends P {
|
|
|
3919
3934
|
}}
|
|
3920
3935
|
aria-label=${this.t("close")}
|
|
3921
3936
|
>
|
|
3922
|
-
${
|
|
3937
|
+
${l.x}
|
|
3923
3938
|
</button>
|
|
3924
3939
|
</div>` : o}
|
|
3925
3940
|
${this.stepUp ? this.renderStepUp() : r`<div
|
|
@@ -3938,18 +3953,18 @@ let p = class extends P {
|
|
|
3938
3953
|
return r`
|
|
3939
3954
|
<div class="between">
|
|
3940
3955
|
<div class="identity">
|
|
3941
|
-
<span class="avatar">${
|
|
3956
|
+
<span class="avatar">${nt(t)}</span>
|
|
3942
3957
|
<div class="row-main">
|
|
3943
3958
|
<span class="row-title" title=${t}>
|
|
3944
3959
|
${t}
|
|
3945
|
-
${e.mfa ? r`<span class="badge badge-success">${
|
|
3960
|
+
${e.mfa ? r`<span class="badge badge-success">${l.shieldCheck} ${this.t("mfaBadge")}</span>` : o}
|
|
3946
3961
|
${n.isPreview ? r`<span class="badge badge-info">${this.t("preview")}</span>` : o}
|
|
3947
3962
|
</span>
|
|
3948
3963
|
${e.email && e.name ? r`<span class="row-sub" title=${e.email}>${e.email}</span>` : o}
|
|
3949
3964
|
</div>
|
|
3950
3965
|
</div>
|
|
3951
3966
|
<button class="btn btn-outline btn-sm" @click=${() => n.signOut()}>
|
|
3952
|
-
${
|
|
3967
|
+
${l.logOut} ${this.t("signOut")}
|
|
3953
3968
|
</button>
|
|
3954
3969
|
</div>
|
|
3955
3970
|
`;
|
|
@@ -3971,7 +3986,7 @@ let p = class extends P {
|
|
|
3971
3986
|
error(e) {
|
|
3972
3987
|
const t = this.errors[e];
|
|
3973
3988
|
return t ? r`<div class="alert alert-error" role="alert">
|
|
3974
|
-
${
|
|
3989
|
+
${l.alert}
|
|
3975
3990
|
<div class="alert-body">${t}</div>
|
|
3976
3991
|
</div>` : o;
|
|
3977
3992
|
}
|
|
@@ -3989,7 +4004,7 @@ let p = class extends P {
|
|
|
3989
4004
|
</section>`;
|
|
3990
4005
|
}
|
|
3991
4006
|
verifiedBadge(e) {
|
|
3992
|
-
return e ? r`<span class="badge badge-success">${
|
|
4007
|
+
return e ? r`<span class="badge badge-success">${l.check} ${this.t("verified")}</span>` : r`<span class="badge badge-warning">${this.t("unverified")}</span>`;
|
|
3993
4008
|
}
|
|
3994
4009
|
// ── Profile ──
|
|
3995
4010
|
renderProfile() {
|
|
@@ -4254,7 +4269,7 @@ let p = class extends P {
|
|
|
4254
4269
|
class="btn btn-outline btn-sm warn"
|
|
4255
4270
|
@click=${() => this.confirmDelete = !0}
|
|
4256
4271
|
>
|
|
4257
|
-
${
|
|
4272
|
+
${l.userX} ${this.t("deleteAccount")}
|
|
4258
4273
|
</button>`}`,
|
|
4259
4274
|
void 0,
|
|
4260
4275
|
!0
|
|
@@ -4349,7 +4364,7 @@ let p = class extends P {
|
|
|
4349
4364
|
</div>`;
|
|
4350
4365
|
}
|
|
4351
4366
|
renderMfaCard() {
|
|
4352
|
-
const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? n.isPreview ?
|
|
4367
|
+
const e = this.user, t = this.factors?.totp ?? !1, i = this.authenticator ? n.isPreview ? Et(this.authenticator.uri) : new kt(n.getClient()).getQR(this.authenticator.uri, 400, 1).toString() : "";
|
|
4353
4368
|
return this.card(
|
|
4354
4369
|
this.t("twoFactor"),
|
|
4355
4370
|
this.t("twoFactorDescription"),
|
|
@@ -4369,7 +4384,7 @@ let p = class extends P {
|
|
|
4369
4384
|
></button>
|
|
4370
4385
|
</div>
|
|
4371
4386
|
${e.mfa && !(this.factors?.totp || e.emailVerification || e.phoneVerification) ? r`<div class="alert alert-warning" role="status">
|
|
4372
|
-
${
|
|
4387
|
+
${l.alert}
|
|
4373
4388
|
<div class="alert-body">
|
|
4374
4389
|
${this.t("mfaNoFactorWarning")}
|
|
4375
4390
|
${this.factors?.totp ? o : r`<div class="links">
|
|
@@ -4389,7 +4404,7 @@ let p = class extends P {
|
|
|
4389
4404
|
<div class="toggle-row">
|
|
4390
4405
|
<div class="row-main">
|
|
4391
4406
|
<span class="row-title"
|
|
4392
|
-
>${
|
|
4407
|
+
>${l.smartphone} ${this.t("authenticatorApp")}
|
|
4393
4408
|
${t ? this.verifiedBadge(!0) : o}</span
|
|
4394
4409
|
>
|
|
4395
4410
|
</div>
|
|
@@ -4437,7 +4452,7 @@ let p = class extends P {
|
|
|
4437
4452
|
this.onCopySecret();
|
|
4438
4453
|
}}
|
|
4439
4454
|
>
|
|
4440
|
-
${this.copied ?
|
|
4455
|
+
${this.copied ? l.check : l.copy}
|
|
4441
4456
|
${this.copied ? this.t("copied") : this.t("authenticatorCopyKey")}
|
|
4442
4457
|
</button>
|
|
4443
4458
|
</div>
|
|
@@ -4479,7 +4494,7 @@ let p = class extends P {
|
|
|
4479
4494
|
this.t("recoveryCodesDescription") + " " + this.t("recoveryCodesOnceHint"),
|
|
4480
4495
|
r`<div class="kv">
|
|
4481
4496
|
${this.recoveryCodes ? r`<div class="alert alert-warning">
|
|
4482
|
-
${
|
|
4497
|
+
${l.alert}
|
|
4483
4498
|
<div class="alert-body">${this.t("recoveryCodesWarning")}</div>
|
|
4484
4499
|
</div>
|
|
4485
4500
|
<div class="codes">
|
|
@@ -4487,7 +4502,7 @@ let p = class extends P {
|
|
|
4487
4502
|
</div>
|
|
4488
4503
|
<div class="inline">
|
|
4489
4504
|
<button class="btn btn-outline btn-sm" @click=${this.onCopyCodes}>
|
|
4490
|
-
${this.copied ?
|
|
4505
|
+
${this.copied ? l.check : l.copy}
|
|
4491
4506
|
${this.copied ? this.t("copied") : this.t("copy")}
|
|
4492
4507
|
</button>
|
|
4493
4508
|
<button class="btn btn-ghost btn-sm" @click=${() => this.recoveryCodes = null}>
|
|
@@ -4499,7 +4514,7 @@ let p = class extends P {
|
|
|
4499
4514
|
@click=${this.onRecoveryCodes}
|
|
4500
4515
|
?disabled=${!!this.busy}
|
|
4501
4516
|
>
|
|
4502
|
-
${this.spinner("recovery")} ${
|
|
4517
|
+
${this.spinner("recovery")} ${l.key}
|
|
4503
4518
|
${e ? this.t("viewRecoveryCodes") : this.t("generateRecoveryCodes")}
|
|
4504
4519
|
</button>
|
|
4505
4520
|
${e ? this.confirmRegenerate ? r`<div class="inline">
|
|
@@ -4508,7 +4523,7 @@ let p = class extends P {
|
|
|
4508
4523
|
@click=${this.onRegenerateRecoveryCodes}
|
|
4509
4524
|
?disabled=${!!this.busy}
|
|
4510
4525
|
>
|
|
4511
|
-
${
|
|
4526
|
+
${l.refresh} ${this.t("regenerateRecoveryCodes")}
|
|
4512
4527
|
</button>
|
|
4513
4528
|
<button
|
|
4514
4529
|
class="btn btn-ghost btn-sm"
|
|
@@ -4521,7 +4536,7 @@ let p = class extends P {
|
|
|
4521
4536
|
@click=${this.onRegenerateRecoveryCodes}
|
|
4522
4537
|
?disabled=${!!this.busy}
|
|
4523
4538
|
>
|
|
4524
|
-
${
|
|
4539
|
+
${l.refresh} ${this.t("regenerateRecoveryCodes")}
|
|
4525
4540
|
</button>` : o}
|
|
4526
4541
|
</div>`}
|
|
4527
4542
|
${this.error("recovery")}
|
|
@@ -4533,25 +4548,25 @@ let p = class extends P {
|
|
|
4533
4548
|
const e = this.stepUp, t = this.factors, i = [
|
|
4534
4549
|
{
|
|
4535
4550
|
factor: "totp",
|
|
4536
|
-
icon:
|
|
4551
|
+
icon: l.smartphone,
|
|
4537
4552
|
label: this.t("mfaUseAuthenticator"),
|
|
4538
4553
|
available: t?.totp ?? !0
|
|
4539
4554
|
},
|
|
4540
4555
|
{
|
|
4541
4556
|
factor: "email",
|
|
4542
|
-
icon:
|
|
4557
|
+
icon: l.mail,
|
|
4543
4558
|
label: this.t("mfaUseEmail"),
|
|
4544
4559
|
available: t?.email ?? !0
|
|
4545
4560
|
},
|
|
4546
4561
|
{
|
|
4547
4562
|
factor: "phone",
|
|
4548
|
-
icon:
|
|
4563
|
+
icon: l.phone,
|
|
4549
4564
|
label: this.t("mfaUsePhone"),
|
|
4550
4565
|
available: t?.phone ?? !0
|
|
4551
4566
|
},
|
|
4552
4567
|
{
|
|
4553
4568
|
factor: "recoverycode",
|
|
4554
|
-
icon:
|
|
4569
|
+
icon: l.key,
|
|
4555
4570
|
label: this.t("mfaUseRecoveryCode"),
|
|
4556
4571
|
available: t?.recoveryCode ?? !0
|
|
4557
4572
|
}
|
|
@@ -4602,7 +4617,7 @@ let p = class extends P {
|
|
|
4602
4617
|
// ── Sessions ──
|
|
4603
4618
|
deviceIcon(e) {
|
|
4604
4619
|
const t = (e.deviceName || "").toLowerCase(), i = (e.osName || e.osCode || "").toLowerCase();
|
|
4605
|
-
return /phone|tablet|mobile/.test(t) || /ios|android|ipados/.test(i) ?
|
|
4620
|
+
return /phone|tablet|mobile/.test(t) || /ios|android|ipados/.test(i) ? l.smartphone : /desktop|browser/.test(t) || /mac|windows|linux|chrome os/.test(i) ? l.monitor : l.globe;
|
|
4606
4621
|
}
|
|
4607
4622
|
renderSessions() {
|
|
4608
4623
|
const e = this.sessions;
|
|
@@ -4634,7 +4649,7 @@ let p = class extends P {
|
|
|
4634
4649
|
?disabled=${!!this.busy}
|
|
4635
4650
|
aria-label=${this.t("signOutSession")}
|
|
4636
4651
|
>
|
|
4637
|
-
${
|
|
4652
|
+
${l.logOut}
|
|
4638
4653
|
</button>
|
|
4639
4654
|
</div>
|
|
4640
4655
|
</div>`
|
|
@@ -4650,7 +4665,7 @@ let p = class extends P {
|
|
|
4650
4665
|
@click=${this.onSignOutAll}
|
|
4651
4666
|
?disabled=${!!this.busy}
|
|
4652
4667
|
>
|
|
4653
|
-
${this.spinner("sessions-all")} ${
|
|
4668
|
+
${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
|
|
4654
4669
|
</button>
|
|
4655
4670
|
<button
|
|
4656
4671
|
class="btn btn-ghost btn-sm"
|
|
@@ -4663,7 +4678,7 @@ let p = class extends P {
|
|
|
4663
4678
|
@click=${this.onSignOutAll}
|
|
4664
4679
|
?disabled=${!!this.busy}
|
|
4665
4680
|
>
|
|
4666
|
-
${this.spinner("sessions-all")} ${
|
|
4681
|
+
${this.spinner("sessions-all")} ${l.logOut} ${this.t("signOutAllSessions")}
|
|
4667
4682
|
</button>`}`,
|
|
4668
4683
|
void 0,
|
|
4669
4684
|
!0
|
|
@@ -4752,8 +4767,8 @@ let p = class extends P {
|
|
|
4752
4767
|
}
|
|
4753
4768
|
};
|
|
4754
4769
|
p.styles = [
|
|
4755
|
-
...
|
|
4756
|
-
|
|
4770
|
+
...E.styles,
|
|
4771
|
+
O`
|
|
4757
4772
|
:host {
|
|
4758
4773
|
display: block;
|
|
4759
4774
|
width: 100%;
|
|
@@ -4856,115 +4871,123 @@ m([
|
|
|
4856
4871
|
g({ type: String })
|
|
4857
4872
|
], p.prototype, "tab", 2);
|
|
4858
4873
|
m([
|
|
4859
|
-
|
|
4874
|
+
d()
|
|
4860
4875
|
], p.prototype, "active", 2);
|
|
4861
4876
|
m([
|
|
4862
|
-
|
|
4877
|
+
d()
|
|
4863
4878
|
], p.prototype, "busy", 2);
|
|
4864
4879
|
m([
|
|
4865
|
-
|
|
4880
|
+
d()
|
|
4866
4881
|
], p.prototype, "notice", 2);
|
|
4867
4882
|
m([
|
|
4868
|
-
|
|
4883
|
+
d()
|
|
4869
4884
|
], p.prototype, "errors", 2);
|
|
4870
4885
|
m([
|
|
4871
|
-
|
|
4886
|
+
d()
|
|
4872
4887
|
], p.prototype, "nameInput", 2);
|
|
4873
4888
|
m([
|
|
4874
|
-
|
|
4889
|
+
d()
|
|
4875
4890
|
], p.prototype, "emailInput", 2);
|
|
4876
4891
|
m([
|
|
4877
|
-
|
|
4892
|
+
d()
|
|
4878
4893
|
], p.prototype, "emailPassword", 2);
|
|
4879
4894
|
m([
|
|
4880
|
-
|
|
4895
|
+
d()
|
|
4881
4896
|
], p.prototype, "phoneInput", 2);
|
|
4882
4897
|
m([
|
|
4883
|
-
|
|
4898
|
+
d()
|
|
4884
4899
|
], p.prototype, "phonePassword", 2);
|
|
4885
4900
|
m([
|
|
4886
|
-
|
|
4901
|
+
d()
|
|
4887
4902
|
], p.prototype, "phoneCode", 2);
|
|
4888
4903
|
m([
|
|
4889
|
-
|
|
4904
|
+
d()
|
|
4890
4905
|
], p.prototype, "phoneCodeSent", 2);
|
|
4891
4906
|
m([
|
|
4892
|
-
|
|
4907
|
+
d()
|
|
4893
4908
|
], p.prototype, "guestName", 2);
|
|
4894
4909
|
m([
|
|
4895
|
-
|
|
4910
|
+
d()
|
|
4896
4911
|
], p.prototype, "oldPassword", 2);
|
|
4897
4912
|
m([
|
|
4898
|
-
|
|
4913
|
+
d()
|
|
4899
4914
|
], p.prototype, "newPassword", 2);
|
|
4900
4915
|
m([
|
|
4901
|
-
|
|
4916
|
+
d()
|
|
4902
4917
|
], p.prototype, "newPasswordConfirm", 2);
|
|
4903
4918
|
m([
|
|
4904
|
-
|
|
4919
|
+
d()
|
|
4905
4920
|
], p.prototype, "authenticator", 2);
|
|
4906
4921
|
m([
|
|
4907
|
-
|
|
4922
|
+
d()
|
|
4908
4923
|
], p.prototype, "authenticatorCode", 2);
|
|
4909
4924
|
m([
|
|
4910
|
-
|
|
4925
|
+
d()
|
|
4911
4926
|
], p.prototype, "factors", 2);
|
|
4912
4927
|
m([
|
|
4913
|
-
|
|
4928
|
+
d()
|
|
4914
4929
|
], p.prototype, "recoveryCodes", 2);
|
|
4915
4930
|
m([
|
|
4916
|
-
|
|
4931
|
+
d()
|
|
4917
4932
|
], p.prototype, "stepUp", 2);
|
|
4918
4933
|
m([
|
|
4919
|
-
|
|
4934
|
+
d()
|
|
4920
4935
|
], p.prototype, "stepUpCode", 2);
|
|
4921
4936
|
m([
|
|
4922
|
-
|
|
4937
|
+
d()
|
|
4923
4938
|
], p.prototype, "copied", 2);
|
|
4924
4939
|
m([
|
|
4925
|
-
|
|
4940
|
+
d()
|
|
4926
4941
|
], p.prototype, "sessions", 2);
|
|
4927
4942
|
m([
|
|
4928
|
-
|
|
4943
|
+
d()
|
|
4929
4944
|
], p.prototype, "identities", 2);
|
|
4930
4945
|
m([
|
|
4931
|
-
|
|
4946
|
+
d()
|
|
4932
4947
|
], p.prototype, "logs", 2);
|
|
4933
4948
|
m([
|
|
4934
|
-
|
|
4949
|
+
d()
|
|
4935
4950
|
], p.prototype, "logsSupported", 2);
|
|
4936
4951
|
m([
|
|
4937
|
-
|
|
4952
|
+
d()
|
|
4938
4953
|
], p.prototype, "confirmDelete", 2);
|
|
4939
4954
|
m([
|
|
4940
|
-
|
|
4955
|
+
d()
|
|
4941
4956
|
], p.prototype, "confirmRegenerate", 2);
|
|
4942
4957
|
m([
|
|
4943
|
-
|
|
4958
|
+
d()
|
|
4944
4959
|
], p.prototype, "confirmRemoveAuthenticator", 2);
|
|
4945
4960
|
m([
|
|
4946
|
-
|
|
4961
|
+
d()
|
|
4947
4962
|
], p.prototype, "confirmSignOutAll", 2);
|
|
4948
4963
|
m([
|
|
4949
|
-
|
|
4964
|
+
d()
|
|
4950
4965
|
], p.prototype, "confirmDisconnectId", 2);
|
|
4951
4966
|
m([
|
|
4952
|
-
|
|
4967
|
+
d()
|
|
4953
4968
|
], p.prototype, "verifyEmailCooldownUntil", 2);
|
|
4954
4969
|
p = m([
|
|
4955
|
-
|
|
4970
|
+
R("authui-account")
|
|
4956
4971
|
], p);
|
|
4957
|
-
var
|
|
4958
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
4959
|
-
(u = e[
|
|
4960
|
-
return s && a &&
|
|
4972
|
+
var Xt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, F = (e, t, i, s) => {
|
|
4973
|
+
for (var a = s > 1 ? void 0 : s ? Qt(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
4974
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
4975
|
+
return s && a && Xt(t, i, a), a;
|
|
4961
4976
|
};
|
|
4962
|
-
let
|
|
4977
|
+
let P = class extends E {
|
|
4963
4978
|
constructor() {
|
|
4964
|
-
super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.onOpenEvent = (e) => {
|
|
4979
|
+
super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.scrollCue = !1, this.bodyResizeObserver = null, this.onOpenEvent = (e) => {
|
|
4965
4980
|
const t = e.detail ?? {};
|
|
4966
4981
|
this.show(t.view);
|
|
4967
|
-
}, this.onCloseEvent = () => this.hide(), this.
|
|
4982
|
+
}, this.onCloseEvent = () => this.hide(), this.syncScrollCue = () => {
|
|
4983
|
+
const e = this.bodyEl;
|
|
4984
|
+
if (!e) {
|
|
4985
|
+
this.scrollCue = !1;
|
|
4986
|
+
return;
|
|
4987
|
+
}
|
|
4988
|
+
const t = e.scrollHeight > e.clientHeight + 1, i = e.scrollTop + e.clientHeight >= e.scrollHeight - 4, s = t && !i;
|
|
4989
|
+
s !== this.scrollCue && (this.scrollCue = s);
|
|
4990
|
+
}, this.onSuccess = () => {
|
|
4968
4991
|
this.fire("authui-signed-in", this.auth.user), this.closeOnSuccess && !this.config?.successUrl && this.hide();
|
|
4969
4992
|
}, this.onInnerOpen = (e) => {
|
|
4970
4993
|
const t = e.detail?.view;
|
|
@@ -4977,7 +5000,7 @@ let M = class extends P {
|
|
|
4977
5000
|
super.connectedCallback(), window.addEventListener("authui:open", this.onOpenEvent), window.addEventListener("authui:close", this.onCloseEvent);
|
|
4978
5001
|
}
|
|
4979
5002
|
disconnectedCallback() {
|
|
4980
|
-
super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent);
|
|
5003
|
+
super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent), this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
|
|
4981
5004
|
}
|
|
4982
5005
|
show(e) {
|
|
4983
5006
|
e === "account" && this.auth.status !== "signed-in" ? this.view = "sign-in" : e ? this.view = e : this.auth.status === "signed-in" ? this.view = "account" : this.view = "sign-in", this.open = !0;
|
|
@@ -4985,11 +5008,23 @@ let M = class extends P {
|
|
|
4985
5008
|
hide() {
|
|
4986
5009
|
this.open = !1;
|
|
4987
5010
|
}
|
|
5011
|
+
observeBody() {
|
|
5012
|
+
this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
|
|
5013
|
+
const e = this.bodyEl;
|
|
5014
|
+
if (!e || typeof ResizeObserver > "u") {
|
|
5015
|
+
this.syncScrollCue();
|
|
5016
|
+
return;
|
|
5017
|
+
}
|
|
5018
|
+
this.bodyResizeObserver = new ResizeObserver(() => this.syncScrollCue()), this.bodyResizeObserver.observe(e), e.firstElementChild && this.bodyResizeObserver.observe(e.firstElementChild), this.syncScrollCue();
|
|
5019
|
+
}
|
|
4988
5020
|
updated(e) {
|
|
4989
|
-
if (e.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() =>
|
|
5021
|
+
if (e.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() => {
|
|
5022
|
+
this.focusPrimary(), this.observeBody();
|
|
5023
|
+
})), !this.open && this.dialog.open && this.dialog.close(), this.open || (this.scrollCue = !1, this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null)), e.has("auth")) {
|
|
4990
5024
|
const t = this.auth.pending;
|
|
4991
5025
|
t && t !== this.handledPending && t.type !== "notice" && (this.handledPending = t, this.view = "sign-in", this.open = !0), t?.type === "notice" && t !== this.handledPending && (this.handledPending = t, this.open = !0), this.open && this.view === "account" && this.auth.status !== "signed-in" && (this.view = "sign-in"), this.open && this.auth.status === "signed-out" && this.view === "account" && (this.view = "sign-in");
|
|
4992
5026
|
}
|
|
5027
|
+
this.open && (e.has("view") || e.has("auth") || e.has("open")) && requestAnimationFrame(() => this.observeBody());
|
|
4993
5028
|
}
|
|
4994
5029
|
focusPrimary() {
|
|
4995
5030
|
const e = this.dialog;
|
|
@@ -5013,26 +5048,31 @@ let M = class extends P {
|
|
|
5013
5048
|
@authui-open=${this.onInnerOpen}
|
|
5014
5049
|
@authui-success=${this.onSuccess}
|
|
5015
5050
|
>
|
|
5016
|
-
<div class="
|
|
5017
|
-
<
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5051
|
+
<div class="frame">
|
|
5052
|
+
<div class="chrome">
|
|
5053
|
+
<button
|
|
5054
|
+
class="btn btn-ghost btn-icon close"
|
|
5055
|
+
@click=${this.hide}
|
|
5056
|
+
aria-label=${this.t("close")}
|
|
5057
|
+
>
|
|
5058
|
+
${l.x}
|
|
5059
|
+
</button>
|
|
5060
|
+
</div>
|
|
5061
|
+
<div class="body" @scroll=${this.syncScrollCue}>
|
|
5062
|
+
${this.open ? t ? r`<authui-account embedded></authui-account>` : r`<authui-sign-in
|
|
5063
|
+
embedded
|
|
5064
|
+
.view=${this.view === "account" ? "sign-in" : this.view}
|
|
5065
|
+
></authui-sign-in>` : o}
|
|
5066
|
+
</div>
|
|
5067
|
+
<div class="scroll-fade ${this.scrollCue ? "show" : ""}" aria-hidden="true"></div>
|
|
5028
5068
|
</div>
|
|
5029
5069
|
</dialog>
|
|
5030
5070
|
`;
|
|
5031
5071
|
}
|
|
5032
5072
|
};
|
|
5033
|
-
|
|
5034
|
-
...
|
|
5035
|
-
|
|
5073
|
+
P.styles = [
|
|
5074
|
+
...E.styles,
|
|
5075
|
+
O`
|
|
5036
5076
|
:host {
|
|
5037
5077
|
display: contents;
|
|
5038
5078
|
}
|
|
@@ -5069,15 +5109,29 @@ M.styles = [
|
|
|
5069
5109
|
transform: none;
|
|
5070
5110
|
}
|
|
5071
5111
|
}
|
|
5072
|
-
.
|
|
5073
|
-
|
|
5112
|
+
.frame {
|
|
5113
|
+
display: flex;
|
|
5114
|
+
flex-direction: column;
|
|
5074
5115
|
max-height: calc(100dvh - 2rem);
|
|
5116
|
+
min-height: 0;
|
|
5117
|
+
position: relative;
|
|
5118
|
+
}
|
|
5119
|
+
.chrome {
|
|
5120
|
+
flex-shrink: 0;
|
|
5121
|
+
display: flex;
|
|
5122
|
+
justify-content: flex-end;
|
|
5123
|
+
align-items: center;
|
|
5124
|
+
padding: 8px 8px 0;
|
|
5125
|
+
background: var(--authui-background);
|
|
5126
|
+
}
|
|
5127
|
+
.body {
|
|
5128
|
+
padding: 4px 24px 28px;
|
|
5075
5129
|
overflow-y: auto;
|
|
5130
|
+
flex: 1 1 auto;
|
|
5131
|
+
min-height: 0;
|
|
5132
|
+
-webkit-overflow-scrolling: touch;
|
|
5076
5133
|
}
|
|
5077
5134
|
.close {
|
|
5078
|
-
position: absolute;
|
|
5079
|
-
top: 12px;
|
|
5080
|
-
inset-inline-end: 12px;
|
|
5081
5135
|
width: 32px;
|
|
5082
5136
|
height: 32px;
|
|
5083
5137
|
border-radius: var(--authui-radius-sm);
|
|
@@ -5086,36 +5140,56 @@ M.styles = [
|
|
|
5086
5140
|
.close:hover {
|
|
5087
5141
|
opacity: 1;
|
|
5088
5142
|
}
|
|
5143
|
+
.scroll-fade {
|
|
5144
|
+
pointer-events: none;
|
|
5145
|
+
position: absolute;
|
|
5146
|
+
inset-inline: 0;
|
|
5147
|
+
bottom: 0;
|
|
5148
|
+
height: 40px;
|
|
5149
|
+
border-radius: 0 0 var(--authui-radius-lg) var(--authui-radius-lg);
|
|
5150
|
+
background: linear-gradient(to top, var(--authui-background), transparent);
|
|
5151
|
+
opacity: 0;
|
|
5152
|
+
transition: opacity 150ms;
|
|
5153
|
+
}
|
|
5154
|
+
.scroll-fade.show {
|
|
5155
|
+
opacity: 1;
|
|
5156
|
+
}
|
|
5089
5157
|
authui-sign-in,
|
|
5090
5158
|
authui-account {
|
|
5091
5159
|
max-width: none;
|
|
5092
5160
|
}
|
|
5093
5161
|
`
|
|
5094
5162
|
];
|
|
5095
|
-
|
|
5163
|
+
F([
|
|
5096
5164
|
g({ type: Boolean, reflect: !0 })
|
|
5097
|
-
],
|
|
5098
|
-
|
|
5165
|
+
], P.prototype, "open", 2);
|
|
5166
|
+
F([
|
|
5099
5167
|
g({ type: String })
|
|
5100
|
-
],
|
|
5101
|
-
|
|
5168
|
+
], P.prototype, "view", 2);
|
|
5169
|
+
F([
|
|
5102
5170
|
g({ type: Boolean, attribute: "close-on-success" })
|
|
5103
|
-
],
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
],
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
],
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
],
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5171
|
+
], P.prototype, "closeOnSuccess", 2);
|
|
5172
|
+
F([
|
|
5173
|
+
d()
|
|
5174
|
+
], P.prototype, "handledPending", 2);
|
|
5175
|
+
F([
|
|
5176
|
+
d()
|
|
5177
|
+
], P.prototype, "scrollCue", 2);
|
|
5178
|
+
F([
|
|
5179
|
+
st("dialog")
|
|
5180
|
+
], P.prototype, "dialog", 2);
|
|
5181
|
+
F([
|
|
5182
|
+
st(".body")
|
|
5183
|
+
], P.prototype, "bodyEl", 2);
|
|
5184
|
+
P = F([
|
|
5185
|
+
R("authui-modal")
|
|
5186
|
+
], P);
|
|
5187
|
+
var Jt = Object.defineProperty, te = Object.getOwnPropertyDescriptor, X = (e, t, i, s) => {
|
|
5188
|
+
for (var a = s > 1 ? void 0 : s ? te(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
5189
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
5190
|
+
return s && a && Jt(t, i, a), a;
|
|
5117
5191
|
};
|
|
5118
|
-
let
|
|
5192
|
+
let L = class extends E {
|
|
5119
5193
|
constructor() {
|
|
5120
5194
|
super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
|
|
5121
5195
|
}
|
|
@@ -5132,9 +5206,9 @@ let z = class extends P {
|
|
|
5132
5206
|
</button>`;
|
|
5133
5207
|
}
|
|
5134
5208
|
};
|
|
5135
|
-
|
|
5136
|
-
...
|
|
5137
|
-
|
|
5209
|
+
L.styles = [
|
|
5210
|
+
...E.styles,
|
|
5211
|
+
O`
|
|
5138
5212
|
:host {
|
|
5139
5213
|
display: inline-block;
|
|
5140
5214
|
}
|
|
@@ -5145,24 +5219,26 @@ z.styles = [
|
|
|
5145
5219
|
];
|
|
5146
5220
|
X([
|
|
5147
5221
|
g({ type: String })
|
|
5148
|
-
],
|
|
5222
|
+
], L.prototype, "view", 2);
|
|
5149
5223
|
X([
|
|
5150
5224
|
g({ type: String })
|
|
5151
|
-
],
|
|
5225
|
+
], L.prototype, "variant", 2);
|
|
5152
5226
|
X([
|
|
5153
5227
|
g({ type: String })
|
|
5154
|
-
],
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
],
|
|
5158
|
-
var
|
|
5159
|
-
for (var a = s > 1 ? void 0 : s ?
|
|
5160
|
-
(u = e[
|
|
5161
|
-
return s && a &&
|
|
5228
|
+
], L.prototype, "size", 2);
|
|
5229
|
+
L = X([
|
|
5230
|
+
R("authui-button")
|
|
5231
|
+
], L);
|
|
5232
|
+
var ee = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, T = (e, t, i, s) => {
|
|
5233
|
+
for (var a = s > 1 ? void 0 : s ? ie(t, i) : t, c = e.length - 1, u; c >= 0; c--)
|
|
5234
|
+
(u = e[c]) && (a = (s ? u(t, i, a) : u(a)) || a);
|
|
5235
|
+
return s && a && ee(t, i, a), a;
|
|
5162
5236
|
};
|
|
5163
|
-
let
|
|
5237
|
+
let I = class extends E {
|
|
5164
5238
|
constructor() {
|
|
5165
|
-
super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.
|
|
5239
|
+
super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
|
|
5240
|
+
this.menuOpen && this.placeMenu();
|
|
5241
|
+
}, this.onDocumentClick = (e) => {
|
|
5166
5242
|
e.composedPath().includes(this) || (this.menuOpen = !1);
|
|
5167
5243
|
}, this.onKeydown = (e) => {
|
|
5168
5244
|
if (!this.menuOpen) {
|
|
@@ -5192,10 +5268,21 @@ let E = class extends P {
|
|
|
5192
5268
|
};
|
|
5193
5269
|
}
|
|
5194
5270
|
connectedCallback() {
|
|
5195
|
-
super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown);
|
|
5271
|
+
super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown), window.addEventListener("resize", this.onReposition), window.addEventListener("scroll", this.onReposition, !0);
|
|
5196
5272
|
}
|
|
5197
5273
|
disconnectedCallback() {
|
|
5198
|
-
super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown);
|
|
5274
|
+
super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown), window.removeEventListener("resize", this.onReposition), window.removeEventListener("scroll", this.onReposition, !0);
|
|
5275
|
+
}
|
|
5276
|
+
/** Flip the menu above the trigger when there is not enough space below. */
|
|
5277
|
+
placeMenu() {
|
|
5278
|
+
const e = this.renderRoot?.querySelector(".trigger"), t = this.renderRoot?.querySelector(".menu");
|
|
5279
|
+
if (!e || !t) return;
|
|
5280
|
+
const i = e.getBoundingClientRect(), s = 6, a = 8;
|
|
5281
|
+
t.style.maxHeight = "";
|
|
5282
|
+
const c = t.offsetHeight + s, u = window.innerHeight - i.bottom, $ = i.top, x = u < c && $ > u;
|
|
5283
|
+
x !== this.menuAbove && (this.menuAbove = x);
|
|
5284
|
+
const ot = Math.max(80, (x ? $ : u) - s - a);
|
|
5285
|
+
t.style.maxHeight = `${ot}px`;
|
|
5199
5286
|
}
|
|
5200
5287
|
focusMenuItem(e) {
|
|
5201
5288
|
[
|
|
@@ -5203,7 +5290,9 @@ let E = class extends P {
|
|
|
5203
5290
|
][e]?.focus();
|
|
5204
5291
|
}
|
|
5205
5292
|
updated(e) {
|
|
5206
|
-
e.has("menuOpen") && this.menuOpen
|
|
5293
|
+
e.has("menuOpen") && (this.menuOpen ? (this.showTeams && this.loadTeams(), requestAnimationFrame(() => {
|
|
5294
|
+
this.placeMenu(), this.focusMenuItem(0);
|
|
5295
|
+
})) : this.menuAbove = !1), this.menuOpen && (e.has("teams") || e.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
|
|
5207
5296
|
}
|
|
5208
5297
|
async loadTeams() {
|
|
5209
5298
|
this.teamsLoading = !0, this.activeTeamId = n.getActiveTeamId();
|
|
@@ -5233,10 +5322,10 @@ let E = class extends P {
|
|
|
5233
5322
|
aria-label=${s}
|
|
5234
5323
|
>
|
|
5235
5324
|
<span class="avatar"
|
|
5236
|
-
>${this.src ? r`<img src=${this.src} alt="" />` :
|
|
5325
|
+
>${this.src ? r`<img src=${this.src} alt="" />` : nt(s)}</span
|
|
5237
5326
|
>
|
|
5238
5327
|
</button>
|
|
5239
|
-
${this.menuOpen ? r`<div class="menu" role="menu">
|
|
5328
|
+
${this.menuOpen ? r`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
|
|
5240
5329
|
<div class="menu-header">
|
|
5241
5330
|
<span class="row-title" title=${s}>${s}</span>
|
|
5242
5331
|
${t.email && t.name ? r`<span class="row-sub" title=${t.email}>${t.email}</span>` : o}
|
|
@@ -5252,9 +5341,9 @@ let E = class extends P {
|
|
|
5252
5341
|
aria-checked=${a.$id === this.activeTeamId ? "true" : "false"}
|
|
5253
5342
|
@click=${() => this.selectTeam(a)}
|
|
5254
5343
|
>
|
|
5255
|
-
${
|
|
5344
|
+
${l.users}
|
|
5256
5345
|
<span title=${a.name}>${a.name}</span>
|
|
5257
|
-
${a.$id === this.activeTeamId ? r`<span class="check">${
|
|
5346
|
+
${a.$id === this.activeTeamId ? r`<span class="check">${l.check}</span>` : o}
|
|
5258
5347
|
</button>`
|
|
5259
5348
|
)}
|
|
5260
5349
|
</div>` : o}
|
|
@@ -5265,7 +5354,7 @@ let E = class extends P {
|
|
|
5265
5354
|
this.menuOpen = !1, Y("account");
|
|
5266
5355
|
}}
|
|
5267
5356
|
>
|
|
5268
|
-
${
|
|
5357
|
+
${l.settings} ${this.t("manageAccount")}
|
|
5269
5358
|
</button>
|
|
5270
5359
|
<button
|
|
5271
5360
|
class="menu-item"
|
|
@@ -5274,15 +5363,15 @@ let E = class extends P {
|
|
|
5274
5363
|
this.menuOpen = !1, n.signOut();
|
|
5275
5364
|
}}
|
|
5276
5365
|
>
|
|
5277
|
-
${
|
|
5366
|
+
${l.logOut} ${this.t("signOut")}
|
|
5278
5367
|
</button>
|
|
5279
5368
|
</div>` : o}
|
|
5280
5369
|
`;
|
|
5281
5370
|
}
|
|
5282
5371
|
};
|
|
5283
|
-
|
|
5284
|
-
...
|
|
5285
|
-
|
|
5372
|
+
I.styles = [
|
|
5373
|
+
...E.styles,
|
|
5374
|
+
O`
|
|
5286
5375
|
:host {
|
|
5287
5376
|
display: inline-block;
|
|
5288
5377
|
position: relative;
|
|
@@ -5307,9 +5396,12 @@ E.styles = [
|
|
|
5307
5396
|
.menu {
|
|
5308
5397
|
position: absolute;
|
|
5309
5398
|
top: calc(100% + 6px);
|
|
5399
|
+
bottom: auto;
|
|
5310
5400
|
inset-inline-end: 0;
|
|
5311
5401
|
min-width: 220px;
|
|
5312
5402
|
max-width: min(320px, 90vw);
|
|
5403
|
+
max-height: min(360px, calc(100dvh - 16px));
|
|
5404
|
+
overflow-y: auto;
|
|
5313
5405
|
background: var(--authui-popover);
|
|
5314
5406
|
color: var(--authui-popover-foreground);
|
|
5315
5407
|
border: 1px solid var(--authui-border);
|
|
@@ -5321,6 +5413,10 @@ E.styles = [
|
|
|
5321
5413
|
flex-direction: column;
|
|
5322
5414
|
gap: 2px;
|
|
5323
5415
|
}
|
|
5416
|
+
.menu.above {
|
|
5417
|
+
top: auto;
|
|
5418
|
+
bottom: calc(100% + 6px);
|
|
5419
|
+
}
|
|
5324
5420
|
.menu-header {
|
|
5325
5421
|
min-width: 0;
|
|
5326
5422
|
overflow: hidden;
|
|
@@ -5391,56 +5487,59 @@ E.styles = [
|
|
|
5391
5487
|
}
|
|
5392
5488
|
`
|
|
5393
5489
|
];
|
|
5394
|
-
|
|
5490
|
+
T([
|
|
5395
5491
|
g({ type: Boolean, attribute: "show-teams" })
|
|
5396
|
-
],
|
|
5397
|
-
|
|
5492
|
+
], I.prototype, "showTeams", 2);
|
|
5493
|
+
T([
|
|
5398
5494
|
g({ type: String })
|
|
5399
|
-
],
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
],
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
],
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
],
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
],
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
],
|
|
5495
|
+
], I.prototype, "src", 2);
|
|
5496
|
+
T([
|
|
5497
|
+
d()
|
|
5498
|
+
], I.prototype, "menuOpen", 2);
|
|
5499
|
+
T([
|
|
5500
|
+
d()
|
|
5501
|
+
], I.prototype, "menuAbove", 2);
|
|
5502
|
+
T([
|
|
5503
|
+
d()
|
|
5504
|
+
], I.prototype, "teams", 2);
|
|
5505
|
+
T([
|
|
5506
|
+
d()
|
|
5507
|
+
], I.prototype, "teamsLoading", 2);
|
|
5508
|
+
T([
|
|
5509
|
+
d()
|
|
5510
|
+
], I.prototype, "activeTeamId", 2);
|
|
5511
|
+
I = T([
|
|
5512
|
+
R("authui-user-button")
|
|
5513
|
+
], I);
|
|
5415
5514
|
export {
|
|
5416
5515
|
Ft as A,
|
|
5417
5516
|
oe as C,
|
|
5418
5517
|
f as E,
|
|
5419
|
-
|
|
5420
|
-
|
|
5518
|
+
bt as F,
|
|
5519
|
+
It as P,
|
|
5421
5520
|
n as a,
|
|
5422
5521
|
p as b,
|
|
5423
|
-
|
|
5424
|
-
|
|
5522
|
+
le as c,
|
|
5523
|
+
L as d,
|
|
5425
5524
|
b as e,
|
|
5426
|
-
|
|
5427
|
-
|
|
5525
|
+
E as f,
|
|
5526
|
+
P as g,
|
|
5428
5527
|
B as h,
|
|
5429
|
-
|
|
5430
|
-
|
|
5528
|
+
k as i,
|
|
5529
|
+
I as j,
|
|
5431
5530
|
ne as k,
|
|
5432
|
-
|
|
5433
|
-
|
|
5531
|
+
pt as l,
|
|
5532
|
+
Ct as m,
|
|
5434
5533
|
K as n,
|
|
5435
5534
|
Y as o,
|
|
5436
5535
|
D as p,
|
|
5437
|
-
|
|
5536
|
+
ut as q,
|
|
5438
5537
|
Ut as r,
|
|
5439
5538
|
q as s,
|
|
5440
5539
|
V as t,
|
|
5441
|
-
|
|
5540
|
+
wt as u,
|
|
5442
5541
|
it as v,
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5542
|
+
Mt as w,
|
|
5543
|
+
Ot as x,
|
|
5544
|
+
z as y
|
|
5446
5545
|
};
|