@singlebase/elements 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authui-display-CKfGK5va.js → authui-display-BM_F3-5e.js} +473 -499
- package/dist/authui-display-BM_F3-5e.js.map +1 -0
- package/dist/{authui-display-aWNht0cW.cjs → authui-display-CMVHTNFz.cjs} +51 -51
- package/dist/authui-display-CMVHTNFz.cjs.map +1 -0
- package/dist/authui.cjs +1 -1
- package/dist/authui.js +2 -2
- package/dist/{chat-CEh6RygY.js → chat-BH_3e1jT.js} +793 -653
- package/dist/chat-BH_3e1jT.js.map +1 -0
- package/dist/{chat-C-gsskho.cjs → chat-ezUmd9II.cjs} +310 -287
- package/dist/chat-ezUmd9II.cjs.map +1 -0
- package/dist/chat-messages.d.ts +8 -1
- package/dist/chat.cjs +1 -1
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +1 -1
- package/dist/elements/authui.d.ts +0 -4
- package/dist/elements/chat.d.ts +46 -8
- package/dist/elements/uploader.d.ts +0 -6
- package/dist/files-4T62wkwj.cjs +77 -0
- package/dist/files-4T62wkwj.cjs.map +1 -0
- package/dist/{files-DDJWPzZW.js → files-DS-H-3yN.js} +56 -57
- package/dist/files-DS-H-3yN.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/messages.d.ts +0 -2
- package/dist/singlebase-elements.min.js +2004 -1917
- package/dist/singlebase-elements.min.js.map +1 -1
- package/dist/upload-messages.d.ts +0 -1
- package/dist/{uploader-660JIgIN.cjs → uploader-COP8PkJ6.cjs} +7 -7
- package/dist/uploader-COP8PkJ6.cjs.map +1 -0
- package/dist/{uploader-vfczkX51.js → uploader-tdMU9Gxv.js} +235 -262
- package/dist/uploader-tdMU9Gxv.js.map +1 -0
- package/dist/uploader.cjs +1 -1
- package/dist/uploader.js +2 -2
- package/dist/utils/branding.d.ts +5 -5
- package/package.json +3 -3
- package/dist/authui-display-CKfGK5va.js.map +0 -1
- package/dist/authui-display-aWNht0cW.cjs.map +0 -1
- package/dist/chat-C-gsskho.cjs.map +0 -1
- package/dist/chat-CEh6RygY.js.map +0 -1
- package/dist/files-DDJWPzZW.js.map +0 -1
- package/dist/files-DyxcjZsx.cjs +0 -75
- package/dist/files-DyxcjZsx.cjs.map +0 -1
- package/dist/uploader-660JIgIN.cjs.map +0 -1
- package/dist/uploader-vfczkX51.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var es = Object.defineProperty;
|
|
2
|
+
var Ue = (r) => {
|
|
3
|
+
throw TypeError(r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var b = (
|
|
7
|
-
var
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import { property as p, state as m, customElement as
|
|
5
|
+
var ss = (r, t, e) => t in r ? es(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
|
|
6
|
+
var b = (r, t, e) => ss(r, typeof t != "symbol" ? t + "" : t, e), Le = (r, t, e) => t.has(r) || Ue("Cannot " + e);
|
|
7
|
+
var n = (r, t, e) => (Le(r, t, "read from private field"), e ? e.call(r) : t.get(r)), o = (r, t, e) => t.has(r) ? Ue("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), l = (r, t, e, s) => (Le(r, t, "write to private field"), s ? s.call(r, e) : t.set(r, e), e);
|
|
8
|
+
import { LitElement as is, html as a, nothing as d, css as qe } from "lit";
|
|
9
|
+
import { property as p, state as m, customElement as we } from "lit/decorators.js";
|
|
10
10
|
import { ifDefined as k } from "lit/directives/if-defined.js";
|
|
11
|
-
import { SinglebaseAuthError as
|
|
12
|
-
import { s as
|
|
13
|
-
import { t as
|
|
14
|
-
import { getDefaultClient as
|
|
15
|
-
class
|
|
11
|
+
import { SinglebaseAuthError as Ee, mapErrorToHint as as, createFilesUploadApi as rs, resolveScreen as ns } from "@singlebase/singlebase-sdk";
|
|
12
|
+
import { s as os, r as ls } from "./uploader-tdMU9Gxv.js";
|
|
13
|
+
import { t as hs, b as ds, j as cs } from "./files-DS-H-3yN.js";
|
|
14
|
+
import { getDefaultClient as us, AUTHUI_PROP_KEYS as ps, authUIAttributeFor as gs, matchesPredicate as ms, validatePredicate as bs, getPath as Ae } from "@singlebase/core";
|
|
15
|
+
class fs {
|
|
16
16
|
constructor(t) {
|
|
17
17
|
b(this, "host");
|
|
18
18
|
b(this, "client", null);
|
|
@@ -31,7 +31,7 @@ class ws {
|
|
|
31
31
|
(t = this.unsubscribe) == null || t.call(this), this.unsubscribe = null;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const Me = {
|
|
35
35
|
signInTitle: "Sign in",
|
|
36
36
|
signUpTitle: "Create your account",
|
|
37
37
|
forgotTitle: "Reset your password",
|
|
@@ -161,68 +161,67 @@ const Ie = {
|
|
|
161
161
|
changeEmailElsewhereHint: "Your email is changed below, with a verification step.",
|
|
162
162
|
confirmChangeCta: "Confirm change",
|
|
163
163
|
codeLabel: "Verification code",
|
|
164
|
-
brandingLabel: "Auth by Singlebase",
|
|
165
164
|
linkRequiresSignIn: "Sign in first, then link a provider.",
|
|
166
165
|
oauthCallbackTitle: "Finishing sign-in",
|
|
167
166
|
oauthCallbackSub: "One moment while we complete your sign-in.",
|
|
168
167
|
oauthDenied: "Sign-in was cancelled or denied."
|
|
169
168
|
};
|
|
170
|
-
function
|
|
171
|
-
return
|
|
169
|
+
function vs(r) {
|
|
170
|
+
return r ? { ...Me, ...r } : Me;
|
|
172
171
|
}
|
|
173
|
-
var
|
|
174
|
-
for (var i =
|
|
175
|
-
(c =
|
|
176
|
-
return i &&
|
|
177
|
-
},
|
|
178
|
-
class $ extends
|
|
172
|
+
var ws = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, _ = (r, t, e, s) => {
|
|
173
|
+
for (var i = $s(t, e), h = r.length - 1, c; h >= 0; h--)
|
|
174
|
+
(c = r[h]) && (i = c(t, e, i) || i);
|
|
175
|
+
return i && ws(t, e, i), i;
|
|
176
|
+
}, x, U, L, A, M, N;
|
|
177
|
+
class $ extends is {
|
|
179
178
|
constructor() {
|
|
180
179
|
super(...arguments);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
b(this, "auth", new
|
|
180
|
+
o(this, x, null);
|
|
181
|
+
o(this, U, {});
|
|
182
|
+
o(this, L);
|
|
183
|
+
o(this, A);
|
|
184
|
+
o(this, M);
|
|
185
|
+
o(this, N);
|
|
186
|
+
b(this, "auth", new fs(this));
|
|
188
187
|
/** Config keys already applied, so a later render does not fight the host. */
|
|
189
188
|
b(this, "appliedConfig", /* @__PURE__ */ new Set());
|
|
190
189
|
}
|
|
191
190
|
get client() {
|
|
192
|
-
return
|
|
191
|
+
return n(this, x);
|
|
193
192
|
}
|
|
194
193
|
set client(e) {
|
|
195
|
-
|
|
194
|
+
l(this, x, e);
|
|
196
195
|
}
|
|
197
196
|
get messages() {
|
|
198
|
-
return
|
|
197
|
+
return n(this, U);
|
|
199
198
|
}
|
|
200
199
|
set messages(e) {
|
|
201
|
-
|
|
200
|
+
l(this, U, e);
|
|
202
201
|
}
|
|
203
202
|
get theme() {
|
|
204
|
-
return
|
|
203
|
+
return n(this, L);
|
|
205
204
|
}
|
|
206
205
|
set theme(e) {
|
|
207
|
-
|
|
206
|
+
l(this, L, e);
|
|
208
207
|
}
|
|
209
208
|
get density() {
|
|
210
|
-
return
|
|
209
|
+
return n(this, A);
|
|
211
210
|
}
|
|
212
211
|
set density(e) {
|
|
213
|
-
|
|
212
|
+
l(this, A, e);
|
|
214
213
|
}
|
|
215
214
|
get fieldStyle() {
|
|
216
|
-
return
|
|
215
|
+
return n(this, M);
|
|
217
216
|
}
|
|
218
217
|
set fieldStyle(e) {
|
|
219
|
-
|
|
218
|
+
l(this, M, e);
|
|
220
219
|
}
|
|
221
220
|
get radius() {
|
|
222
|
-
return
|
|
221
|
+
return n(this, N);
|
|
223
222
|
}
|
|
224
223
|
set radius(e) {
|
|
225
|
-
|
|
224
|
+
l(this, N, e);
|
|
226
225
|
}
|
|
227
226
|
/**
|
|
228
227
|
* Resolution order: an explicit `.client`, then the page's default
|
|
@@ -238,7 +237,7 @@ class $ extends rs {
|
|
|
238
237
|
*/
|
|
239
238
|
get resolvedClient() {
|
|
240
239
|
var e;
|
|
241
|
-
return this.client ? this.client : ((e =
|
|
240
|
+
return this.client ? this.client : ((e = us()) == null ? void 0 : e.auth) ?? null;
|
|
242
241
|
}
|
|
243
242
|
/** Page-wide UI config from SinglebaseClient({ authui }), if there is one. */
|
|
244
243
|
get uiConfig() {
|
|
@@ -252,7 +251,7 @@ class $ extends rs {
|
|
|
252
251
|
get msg() {
|
|
253
252
|
var s;
|
|
254
253
|
const e = (s = this.uiConfig) == null ? void 0 : s.messages;
|
|
255
|
-
return
|
|
254
|
+
return vs(e ? { ...e, ...this.messages } : this.messages);
|
|
256
255
|
}
|
|
257
256
|
/**
|
|
258
257
|
* Copies the page-wide config onto this element.
|
|
@@ -266,9 +265,9 @@ class $ extends rs {
|
|
|
266
265
|
applyUIConfig() {
|
|
267
266
|
const e = this.uiConfig;
|
|
268
267
|
if (e) {
|
|
269
|
-
for (const s of
|
|
268
|
+
for (const s of ps) {
|
|
270
269
|
const i = e[s];
|
|
271
|
-
i !== void 0 && s in this && (this.hasAttribute(
|
|
270
|
+
i !== void 0 && s in this && (this.hasAttribute(gs(s)) || this.appliedConfig.has(s) || (this.appliedConfig.add(s), this[s] = i));
|
|
272
271
|
}
|
|
273
272
|
for (const [s, i] of Object.entries(e.tokens ?? {}))
|
|
274
273
|
s.startsWith("--") && (this.style.getPropertyValue(s) || this.style.setProperty(s, i));
|
|
@@ -295,7 +294,7 @@ class $ extends rs {
|
|
|
295
294
|
super.willUpdate(e), this.auth.bind(this.resolvedClient), this.applyUIConfig();
|
|
296
295
|
}
|
|
297
296
|
}
|
|
298
|
-
|
|
297
|
+
x = new WeakMap(), U = new WeakMap(), L = new WeakMap(), A = new WeakMap(), M = new WeakMap(), N = new WeakMap(), b($, "styles", [hs, os]);
|
|
299
298
|
_([
|
|
300
299
|
p({ attribute: !1 })
|
|
301
300
|
], $.prototype, "client");
|
|
@@ -314,7 +313,7 @@ _([
|
|
|
314
313
|
_([
|
|
315
314
|
p({ reflect: !0 })
|
|
316
315
|
], $.prototype, "radius");
|
|
317
|
-
class
|
|
316
|
+
class Ce {
|
|
318
317
|
constructor(t) {
|
|
319
318
|
b(this, "host");
|
|
320
319
|
b(this, "client", null);
|
|
@@ -340,7 +339,7 @@ class ke {
|
|
|
340
339
|
});
|
|
341
340
|
}
|
|
342
341
|
}
|
|
343
|
-
const
|
|
342
|
+
const ys = [
|
|
344
343
|
"load",
|
|
345
344
|
"success",
|
|
346
345
|
"error",
|
|
@@ -355,7 +354,7 @@ const Ss = [
|
|
|
355
354
|
"expired",
|
|
356
355
|
"navigate",
|
|
357
356
|
"goto"
|
|
358
|
-
],
|
|
357
|
+
], Es = {
|
|
359
358
|
load: "auth:ready",
|
|
360
359
|
signin: "auth:signin",
|
|
361
360
|
signup: "auth:signup",
|
|
@@ -365,31 +364,31 @@ const Ss = [
|
|
|
365
364
|
error: "auth:error",
|
|
366
365
|
navigate: "auth:navigate"
|
|
367
366
|
};
|
|
368
|
-
function
|
|
369
|
-
return "on" +
|
|
367
|
+
function Ne(r) {
|
|
368
|
+
return "on" + r.replace(/(^|-)([a-z])/g, (t, e, s) => s.toUpperCase());
|
|
370
369
|
}
|
|
371
|
-
class
|
|
370
|
+
class Ss {
|
|
372
371
|
constructor(t) {
|
|
373
372
|
b(this, "unsubscribes", []);
|
|
374
373
|
b(this, "client", null);
|
|
375
374
|
this.host = t, t.addController(this);
|
|
376
375
|
}
|
|
377
376
|
bind(t) {
|
|
378
|
-
t !== this.client && (this.release(), this.client = t, t && (this.unsubscribes =
|
|
377
|
+
t !== this.client && (this.release(), this.client = t, t && (this.unsubscribes = ys.map(
|
|
379
378
|
(e) => t.on(e, (s) => this.publish(e, s))
|
|
380
379
|
)));
|
|
381
380
|
}
|
|
382
381
|
publish(t, e) {
|
|
383
|
-
const s = this.host[
|
|
382
|
+
const s = this.host[Ne(t)];
|
|
384
383
|
if (typeof s == "function")
|
|
385
384
|
try {
|
|
386
385
|
s.call(this.host, e);
|
|
387
386
|
} catch (c) {
|
|
388
|
-
console.error(`[singlebase] ${
|
|
387
|
+
console.error(`[singlebase] ${Ne(t)} threw:`, c);
|
|
389
388
|
}
|
|
390
389
|
const i = { detail: e, bubbles: !0, composed: !0 };
|
|
391
390
|
this.host.dispatchEvent(new CustomEvent(`singlebase-${t}`, i));
|
|
392
|
-
const h =
|
|
391
|
+
const h = Es[t];
|
|
393
392
|
h && this.host.dispatchEvent(new CustomEvent(h, i));
|
|
394
393
|
}
|
|
395
394
|
release() {
|
|
@@ -399,36 +398,36 @@ class Ps {
|
|
|
399
398
|
this.release(), this.client = null;
|
|
400
399
|
}
|
|
401
400
|
}
|
|
402
|
-
var
|
|
403
|
-
for (var i =
|
|
404
|
-
(c =
|
|
405
|
-
return i &&
|
|
401
|
+
var Cs = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, Pe = (r, t, e, s) => {
|
|
402
|
+
for (var i = Ps(t, e), h = r.length - 1, c; h >= 0; h--)
|
|
403
|
+
(c = r[h]) && (i = c(t, e, i) || i);
|
|
404
|
+
return i && Cs(t, e, i), i;
|
|
406
405
|
}, I, F, D;
|
|
407
|
-
class
|
|
406
|
+
class $e extends $ {
|
|
408
407
|
constructor() {
|
|
409
408
|
super(...arguments);
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
o(this, I, "idle");
|
|
410
|
+
o(this, F, "");
|
|
411
|
+
o(this, D, "");
|
|
413
412
|
b(this, "abortController", null);
|
|
414
413
|
}
|
|
415
414
|
get phase() {
|
|
416
|
-
return
|
|
415
|
+
return n(this, I);
|
|
417
416
|
}
|
|
418
417
|
set phase(e) {
|
|
419
|
-
|
|
418
|
+
l(this, I, e);
|
|
420
419
|
}
|
|
421
420
|
get formError() {
|
|
422
|
-
return
|
|
421
|
+
return n(this, F);
|
|
423
422
|
}
|
|
424
423
|
set formError(e) {
|
|
425
|
-
|
|
424
|
+
l(this, F, e);
|
|
426
425
|
}
|
|
427
426
|
get noticeMessage() {
|
|
428
|
-
return
|
|
427
|
+
return n(this, D);
|
|
429
428
|
}
|
|
430
429
|
set noticeMessage(e) {
|
|
431
|
-
|
|
430
|
+
l(this, D, e);
|
|
432
431
|
}
|
|
433
432
|
disconnectedCallback() {
|
|
434
433
|
var e;
|
|
@@ -452,8 +451,8 @@ class Ee extends $ {
|
|
|
452
451
|
return e instanceof DOMException && e.name === "AbortError";
|
|
453
452
|
}
|
|
454
453
|
describeError(e) {
|
|
455
|
-
if (e instanceof
|
|
456
|
-
const s =
|
|
454
|
+
if (e instanceof Ee) {
|
|
455
|
+
const s = as(e.code);
|
|
457
456
|
return s === "disable_retry_show_rate_limited" ? this.msg.rateLimitedMessage : s === "generic_credentials_message" ? this.msg.genericErrorMessage : this.msg.genericErrorMessage;
|
|
458
457
|
}
|
|
459
458
|
return this.msg.genericErrorMessage;
|
|
@@ -478,62 +477,62 @@ class Ee extends $ {
|
|
|
478
477
|
}
|
|
479
478
|
}
|
|
480
479
|
I = new WeakMap(), F = new WeakMap(), D = new WeakMap();
|
|
481
|
-
|
|
480
|
+
Pe([
|
|
482
481
|
m()
|
|
483
|
-
],
|
|
484
|
-
|
|
482
|
+
], $e.prototype, "phase");
|
|
483
|
+
Pe([
|
|
485
484
|
m()
|
|
486
|
-
],
|
|
487
|
-
|
|
485
|
+
], $e.prototype, "formError");
|
|
486
|
+
Pe([
|
|
488
487
|
m()
|
|
489
|
-
],
|
|
490
|
-
function
|
|
491
|
-
return [
|
|
488
|
+
], $e.prototype, "noticeMessage");
|
|
489
|
+
function Ve(r) {
|
|
490
|
+
return [r == null ? void 0 : r.first_name, r == null ? void 0 : r.last_name].filter(Boolean).join(" ").trim();
|
|
492
491
|
}
|
|
493
|
-
function
|
|
494
|
-
const t =
|
|
492
|
+
function Ge(r) {
|
|
493
|
+
const t = Ve(r);
|
|
495
494
|
if (t)
|
|
496
495
|
return t.split(/\s+/).map((s) => s[0]).join("").slice(0, 2).toUpperCase();
|
|
497
|
-
const e = (
|
|
496
|
+
const e = (r == null ? void 0 : r.email) ?? "";
|
|
498
497
|
return e ? e[0].toUpperCase() : "·";
|
|
499
498
|
}
|
|
500
|
-
var
|
|
501
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
502
|
-
(c =
|
|
503
|
-
return s && i &&
|
|
499
|
+
var ks = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, v = (r, t, e, s) => {
|
|
500
|
+
for (var i = s > 1 ? void 0 : s ? _s(t, e) : t, h = r.length - 1, c; h >= 0; h--)
|
|
501
|
+
(c = r[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
502
|
+
return s && i && ks(t, e, i), i;
|
|
504
503
|
};
|
|
505
|
-
const
|
|
506
|
-
var B, R, j, H, q, V, G, K, Y, W, z, J, Q, X, Z, tt, et, st, it, at, rt, nt, ot, lt, ht, dt,
|
|
507
|
-
let f = (
|
|
504
|
+
const Os = { profile_photo: !0 }, Ts = ".jpg,.jpeg,.png,.webp,image/jpeg,image/png,image/webp";
|
|
505
|
+
var B, R, j, H, q, V, G, K, Y, W, z, J, Q, X, Z, tt, et, st, it, at, rt, nt, ot, lt, ht, dt, De;
|
|
506
|
+
let f = (De = class extends $e {
|
|
508
507
|
constructor() {
|
|
509
508
|
super(...arguments);
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
b(this, "settingsCtl", new
|
|
509
|
+
o(this, B, "");
|
|
510
|
+
o(this, R, "");
|
|
511
|
+
o(this, j, null);
|
|
512
|
+
o(this, H, "singlebase-oauth-nonce");
|
|
513
|
+
o(this, q, "");
|
|
514
|
+
o(this, V, "");
|
|
515
|
+
o(this, G, !1);
|
|
516
|
+
o(this, K, "");
|
|
517
|
+
o(this, Y, "");
|
|
518
|
+
o(this, W, "");
|
|
519
|
+
o(this, z, "");
|
|
520
|
+
o(this, J, "");
|
|
521
|
+
o(this, Q, 0);
|
|
522
|
+
o(this, X, "");
|
|
523
|
+
o(this, Z, "");
|
|
524
|
+
o(this, tt, "");
|
|
525
|
+
o(this, et, "");
|
|
526
|
+
o(this, st, "");
|
|
527
|
+
o(this, it, "request");
|
|
528
|
+
o(this, at, "");
|
|
529
|
+
o(this, rt, "");
|
|
530
|
+
o(this, nt, "");
|
|
531
|
+
o(this, ot, "");
|
|
532
|
+
o(this, lt, "");
|
|
533
|
+
o(this, ht, "");
|
|
534
|
+
o(this, dt, "");
|
|
535
|
+
b(this, "settingsCtl", new Ce(this));
|
|
537
536
|
b(this, "flashTimer");
|
|
538
537
|
b(this, "uidBase", `sb-acct-${Math.random().toString(36).slice(2, 8)}`);
|
|
539
538
|
// ── profile photo ─────────────────────────────────────────
|
|
@@ -563,160 +562,160 @@ let f = (Re = class extends Ee {
|
|
|
563
562
|
});
|
|
564
563
|
}
|
|
565
564
|
get logoText() {
|
|
566
|
-
return
|
|
565
|
+
return n(this, B);
|
|
567
566
|
}
|
|
568
567
|
set logoText(t) {
|
|
569
|
-
|
|
568
|
+
l(this, B, t);
|
|
570
569
|
}
|
|
571
570
|
get logoUrl() {
|
|
572
|
-
return
|
|
571
|
+
return n(this, R);
|
|
573
572
|
}
|
|
574
573
|
set logoUrl(t) {
|
|
575
|
-
|
|
574
|
+
l(this, R, t);
|
|
576
575
|
}
|
|
577
576
|
get settings() {
|
|
578
|
-
return
|
|
577
|
+
return n(this, j);
|
|
579
578
|
}
|
|
580
579
|
set settings(t) {
|
|
581
|
-
|
|
580
|
+
l(this, j, t);
|
|
582
581
|
}
|
|
583
582
|
get nonceStorageKey() {
|
|
584
|
-
return
|
|
583
|
+
return n(this, H);
|
|
585
584
|
}
|
|
586
585
|
set nonceStorageKey(t) {
|
|
587
|
-
|
|
586
|
+
l(this, H, t);
|
|
588
587
|
}
|
|
589
588
|
get editMode() {
|
|
590
|
-
return
|
|
589
|
+
return n(this, q);
|
|
591
590
|
}
|
|
592
591
|
set editMode(t) {
|
|
593
|
-
|
|
592
|
+
l(this, q, t);
|
|
594
593
|
}
|
|
595
594
|
get toast() {
|
|
596
|
-
return
|
|
595
|
+
return n(this, V);
|
|
597
596
|
}
|
|
598
597
|
set toast(t) {
|
|
599
|
-
|
|
598
|
+
l(this, V, t);
|
|
600
599
|
}
|
|
601
600
|
get photoBusy() {
|
|
602
|
-
return
|
|
601
|
+
return n(this, G);
|
|
603
602
|
}
|
|
604
603
|
set photoBusy(t) {
|
|
605
|
-
|
|
604
|
+
l(this, G, t);
|
|
606
605
|
}
|
|
607
606
|
get photoFailed() {
|
|
608
|
-
return
|
|
607
|
+
return n(this, K);
|
|
609
608
|
}
|
|
610
609
|
set photoFailed(t) {
|
|
611
|
-
|
|
610
|
+
l(this, K, t);
|
|
612
611
|
}
|
|
613
612
|
get profileSaved() {
|
|
614
|
-
return
|
|
613
|
+
return n(this, Y);
|
|
615
614
|
}
|
|
616
615
|
set profileSaved(t) {
|
|
617
|
-
|
|
616
|
+
l(this, Y, t);
|
|
618
617
|
}
|
|
619
618
|
get passSaved() {
|
|
620
|
-
return
|
|
619
|
+
return n(this, W);
|
|
621
620
|
}
|
|
622
621
|
set passSaved(t) {
|
|
623
|
-
|
|
622
|
+
l(this, W, t);
|
|
624
623
|
}
|
|
625
624
|
get profileError() {
|
|
626
|
-
return
|
|
625
|
+
return n(this, z);
|
|
627
626
|
}
|
|
628
627
|
set profileError(t) {
|
|
629
|
-
|
|
628
|
+
l(this, z, t);
|
|
630
629
|
}
|
|
631
630
|
get newPassError() {
|
|
632
|
-
return
|
|
631
|
+
return n(this, J);
|
|
633
632
|
}
|
|
634
633
|
set newPassError(t) {
|
|
635
|
-
|
|
634
|
+
l(this, J, t);
|
|
636
635
|
}
|
|
637
636
|
get deleteStage() {
|
|
638
|
-
return
|
|
637
|
+
return n(this, Q);
|
|
639
638
|
}
|
|
640
639
|
set deleteStage(t) {
|
|
641
|
-
|
|
640
|
+
l(this, Q, t);
|
|
642
641
|
}
|
|
643
642
|
get confirmText() {
|
|
644
|
-
return
|
|
643
|
+
return n(this, X);
|
|
645
644
|
}
|
|
646
645
|
set confirmText(t) {
|
|
647
|
-
|
|
646
|
+
l(this, X, t);
|
|
648
647
|
}
|
|
649
648
|
get dFirst() {
|
|
650
|
-
return
|
|
649
|
+
return n(this, Z);
|
|
651
650
|
}
|
|
652
651
|
set dFirst(t) {
|
|
653
|
-
|
|
652
|
+
l(this, Z, t);
|
|
654
653
|
}
|
|
655
654
|
get dLast() {
|
|
656
|
-
return
|
|
655
|
+
return n(this, tt);
|
|
657
656
|
}
|
|
658
657
|
set dLast(t) {
|
|
659
|
-
|
|
658
|
+
l(this, tt, t);
|
|
660
659
|
}
|
|
661
660
|
get dPhone() {
|
|
662
|
-
return
|
|
661
|
+
return n(this, et);
|
|
663
662
|
}
|
|
664
663
|
set dPhone(t) {
|
|
665
|
-
|
|
664
|
+
l(this, et, t);
|
|
666
665
|
}
|
|
667
666
|
get dEmail() {
|
|
668
|
-
return
|
|
667
|
+
return n(this, st);
|
|
669
668
|
}
|
|
670
669
|
set dEmail(t) {
|
|
671
|
-
|
|
670
|
+
l(this, st, t);
|
|
672
671
|
}
|
|
673
672
|
get emailStep() {
|
|
674
|
-
return
|
|
673
|
+
return n(this, it);
|
|
675
674
|
}
|
|
676
675
|
set emailStep(t) {
|
|
677
|
-
|
|
676
|
+
l(this, it, t);
|
|
678
677
|
}
|
|
679
678
|
get dNewEmail() {
|
|
680
|
-
return
|
|
679
|
+
return n(this, at);
|
|
681
680
|
}
|
|
682
681
|
set dNewEmail(t) {
|
|
683
|
-
|
|
682
|
+
l(this, at, t);
|
|
684
683
|
}
|
|
685
684
|
get emailCode() {
|
|
686
|
-
return
|
|
685
|
+
return n(this, rt);
|
|
687
686
|
}
|
|
688
687
|
set emailCode(t) {
|
|
689
|
-
|
|
688
|
+
l(this, rt, t);
|
|
690
689
|
}
|
|
691
690
|
get emailError() {
|
|
692
|
-
return
|
|
691
|
+
return n(this, nt);
|
|
693
692
|
}
|
|
694
693
|
set emailError(t) {
|
|
695
|
-
|
|
694
|
+
l(this, nt, t);
|
|
696
695
|
}
|
|
697
696
|
get emailSaved() {
|
|
698
|
-
return
|
|
697
|
+
return n(this, ot);
|
|
699
698
|
}
|
|
700
699
|
set emailSaved(t) {
|
|
701
|
-
|
|
700
|
+
l(this, ot, t);
|
|
702
701
|
}
|
|
703
702
|
get curPass() {
|
|
704
|
-
return
|
|
703
|
+
return n(this, lt);
|
|
705
704
|
}
|
|
706
705
|
set curPass(t) {
|
|
707
|
-
|
|
706
|
+
l(this, lt, t);
|
|
708
707
|
}
|
|
709
708
|
get newPass() {
|
|
710
|
-
return
|
|
709
|
+
return n(this, ht);
|
|
711
710
|
}
|
|
712
711
|
set newPass(t) {
|
|
713
|
-
|
|
712
|
+
l(this, ht, t);
|
|
714
713
|
}
|
|
715
714
|
get confirmPass() {
|
|
716
|
-
return
|
|
715
|
+
return n(this, dt);
|
|
717
716
|
}
|
|
718
717
|
set confirmPass(t) {
|
|
719
|
-
|
|
718
|
+
l(this, dt, t);
|
|
720
719
|
}
|
|
721
720
|
uid(t) {
|
|
722
721
|
return `${this.uidBase}-${t}`;
|
|
@@ -746,10 +745,10 @@ let f = (Re = class extends Ee {
|
|
|
746
745
|
return t.status === "authenticated" ? t.user : null;
|
|
747
746
|
}
|
|
748
747
|
get fullName() {
|
|
749
|
-
return
|
|
748
|
+
return Ve(this.user);
|
|
750
749
|
}
|
|
751
750
|
get initials() {
|
|
752
|
-
return
|
|
751
|
+
return Ge(this.user);
|
|
753
752
|
}
|
|
754
753
|
/**
|
|
755
754
|
* The upload API bound to the same dispatcher as this widget's auth client,
|
|
@@ -758,7 +757,7 @@ let f = (Re = class extends Ee {
|
|
|
758
757
|
*/
|
|
759
758
|
get uploadClient() {
|
|
760
759
|
const t = this.resolvedClient;
|
|
761
|
-
return t ? (this.uploadClientFor !== t && (this.uploadClientFor = t, this.uploadClientCache = { files:
|
|
760
|
+
return t ? (this.uploadClientFor !== t && (this.uploadClientFor = t, this.uploadClientCache = { files: rs(t.dispatcher) }), this.uploadClientCache) : null;
|
|
762
761
|
}
|
|
763
762
|
startProfileEdit() {
|
|
764
763
|
const t = this.user;
|
|
@@ -1025,9 +1024,9 @@ let f = (Re = class extends Ee {
|
|
|
1025
1024
|
view="button"
|
|
1026
1025
|
max-files="1"
|
|
1027
1026
|
branding="false"
|
|
1028
|
-
accept=${
|
|
1027
|
+
accept=${Ts}
|
|
1029
1028
|
.client=${this.uploadClient}
|
|
1030
|
-
.options=${
|
|
1029
|
+
.options=${Os}
|
|
1031
1030
|
@singlebase-upload-selected=${this.onPhotoSelected}
|
|
1032
1031
|
@singlebase-upload-complete=${this.onPhotoUploaded}
|
|
1033
1032
|
@singlebase-upload-error=${this.onPhotoProblem}
|
|
@@ -1342,7 +1341,7 @@ let f = (Re = class extends Ee {
|
|
|
1342
1341
|
</div>
|
|
1343
1342
|
` : a`<p class="disabled-note">Not signed in.</p>`;
|
|
1344
1343
|
}
|
|
1345
|
-
}, B = new WeakMap(), R = new WeakMap(), j = new WeakMap(), H = new WeakMap(), q = new WeakMap(), V = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), it = new WeakMap(), at = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(),
|
|
1344
|
+
}, B = new WeakMap(), R = new WeakMap(), j = new WeakMap(), H = new WeakMap(), q = new WeakMap(), V = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), it = new WeakMap(), at = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), De);
|
|
1346
1345
|
v([
|
|
1347
1346
|
p({ attribute: "logo-text" })
|
|
1348
1347
|
], f.prototype, "logoText", 1);
|
|
@@ -1422,66 +1421,66 @@ v([
|
|
|
1422
1421
|
m()
|
|
1423
1422
|
], f.prototype, "confirmPass", 1);
|
|
1424
1423
|
f = v([
|
|
1425
|
-
|
|
1424
|
+
we("singlebase-authui-account")
|
|
1426
1425
|
], f);
|
|
1427
|
-
var
|
|
1428
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
1429
|
-
(c =
|
|
1430
|
-
return s && i &&
|
|
1431
|
-
}, ct, ut, pt, gt, mt, bt, ft,
|
|
1432
|
-
let E = (
|
|
1426
|
+
var xs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, C = (r, t, e, s) => {
|
|
1427
|
+
for (var i = s > 1 ? void 0 : s ? Us(t, e) : t, h = r.length - 1, c; h >= 0; h--)
|
|
1428
|
+
(c = r[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
1429
|
+
return s && i && xs(t, e, i), i;
|
|
1430
|
+
}, ct, ut, pt, gt, mt, bt, ft, Be;
|
|
1431
|
+
let E = (Be = class extends $e {
|
|
1433
1432
|
constructor() {
|
|
1434
1433
|
super(...arguments);
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
b(this, "settingsCtl", new
|
|
1434
|
+
o(this, ct, "signout");
|
|
1435
|
+
o(this, ut, "signin");
|
|
1436
|
+
o(this, pt, "");
|
|
1437
|
+
o(this, gt, "");
|
|
1438
|
+
o(this, mt, !1);
|
|
1439
|
+
o(this, bt, null);
|
|
1440
|
+
o(this, ft, "singlebase-oauth-nonce");
|
|
1441
|
+
b(this, "settingsCtl", new Ce(this));
|
|
1443
1442
|
}
|
|
1444
1443
|
get type() {
|
|
1445
|
-
return
|
|
1444
|
+
return n(this, ct);
|
|
1446
1445
|
}
|
|
1447
1446
|
set type(t) {
|
|
1448
|
-
|
|
1447
|
+
l(this, ct, t);
|
|
1449
1448
|
}
|
|
1450
1449
|
get intent() {
|
|
1451
|
-
return
|
|
1450
|
+
return n(this, ut);
|
|
1452
1451
|
}
|
|
1453
1452
|
set intent(t) {
|
|
1454
|
-
|
|
1453
|
+
l(this, ut, t);
|
|
1455
1454
|
}
|
|
1456
1455
|
get provider() {
|
|
1457
|
-
return
|
|
1456
|
+
return n(this, pt);
|
|
1458
1457
|
}
|
|
1459
1458
|
set provider(t) {
|
|
1460
|
-
|
|
1459
|
+
l(this, pt, t);
|
|
1461
1460
|
}
|
|
1462
1461
|
get providerName() {
|
|
1463
|
-
return
|
|
1462
|
+
return n(this, gt);
|
|
1464
1463
|
}
|
|
1465
1464
|
set providerName(t) {
|
|
1466
|
-
|
|
1465
|
+
l(this, gt, t);
|
|
1467
1466
|
}
|
|
1468
1467
|
get embedded() {
|
|
1469
|
-
return
|
|
1468
|
+
return n(this, mt);
|
|
1470
1469
|
}
|
|
1471
1470
|
set embedded(t) {
|
|
1472
|
-
|
|
1471
|
+
l(this, mt, t);
|
|
1473
1472
|
}
|
|
1474
1473
|
get settings() {
|
|
1475
|
-
return
|
|
1474
|
+
return n(this, bt);
|
|
1476
1475
|
}
|
|
1477
1476
|
set settings(t) {
|
|
1478
|
-
|
|
1477
|
+
l(this, bt, t);
|
|
1479
1478
|
}
|
|
1480
1479
|
get nonceStorageKey() {
|
|
1481
|
-
return
|
|
1480
|
+
return n(this, ft);
|
|
1482
1481
|
}
|
|
1483
1482
|
set nonceStorageKey(t) {
|
|
1484
|
-
|
|
1483
|
+
l(this, ft, t);
|
|
1485
1484
|
}
|
|
1486
1485
|
willUpdate(t) {
|
|
1487
1486
|
super.willUpdate(t), this.type === "oauth" && this.settingsCtl.load(this.resolvedClient, this.settings);
|
|
@@ -1520,9 +1519,9 @@ let E = (je = class extends Ee {
|
|
|
1520
1519
|
h = w.session.id_token, c = w.session.refresh_token;
|
|
1521
1520
|
}
|
|
1522
1521
|
await this.run(async () => {
|
|
1523
|
-
var
|
|
1522
|
+
var ye;
|
|
1524
1523
|
const w = await i.createOAuthNonce(this.signal);
|
|
1525
|
-
(
|
|
1524
|
+
(ye = globalThis.sessionStorage) == null || ye.setItem(this.nonceStorageKey, w);
|
|
1526
1525
|
const { oauth_redirect_url: y } = await i.startOAuth(
|
|
1527
1526
|
{
|
|
1528
1527
|
provider: t,
|
|
@@ -1628,7 +1627,7 @@ let E = (je = class extends Ee {
|
|
|
1628
1627
|
render() {
|
|
1629
1628
|
return this.type === "oauth" ? this.renderOAuth() : this.type === "link" ? this.renderLink() : this.renderSignOut();
|
|
1630
1629
|
}
|
|
1631
|
-
}, ct = new WeakMap(), ut = new WeakMap(), pt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), ft = new WeakMap(),
|
|
1630
|
+
}, ct = new WeakMap(), ut = new WeakMap(), pt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), ft = new WeakMap(), Be);
|
|
1632
1631
|
C([
|
|
1633
1632
|
p()
|
|
1634
1633
|
], E.prototype, "type", 1);
|
|
@@ -1651,14 +1650,14 @@ C([
|
|
|
1651
1650
|
p({ attribute: "nonce-storage-key" })
|
|
1652
1651
|
], E.prototype, "nonceStorageKey", 1);
|
|
1653
1652
|
E = C([
|
|
1654
|
-
|
|
1653
|
+
we("singlebase-authui-buttons")
|
|
1655
1654
|
], E);
|
|
1656
|
-
var
|
|
1657
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
1658
|
-
(c =
|
|
1659
|
-
return s && i &&
|
|
1660
|
-
},
|
|
1661
|
-
const
|
|
1655
|
+
var Ke = Object.defineProperty, Ls = Object.getOwnPropertyDescriptor, As = (r, t, e) => t in r ? Ke(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, g = (r, t, e, s) => {
|
|
1656
|
+
for (var i = s > 1 ? void 0 : s ? Ls(t, e) : t, h = r.length - 1, c; h >= 0; h--)
|
|
1657
|
+
(c = r[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
1658
|
+
return s && i && Ke(t, e, i), i;
|
|
1659
|
+
}, Ms = (r, t, e) => As(r, t + "", e);
|
|
1660
|
+
const Ye = [
|
|
1662
1661
|
"signin",
|
|
1663
1662
|
"signup",
|
|
1664
1663
|
"forgot",
|
|
@@ -1666,82 +1665,80 @@ const ze = [
|
|
|
1666
1665
|
"otp",
|
|
1667
1666
|
"newpass",
|
|
1668
1667
|
"invite"
|
|
1669
|
-
],
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1668
|
+
], We = ["account"], Ns = [...Ye, ...We, "oauth-callback"];
|
|
1669
|
+
function Ie(r) {
|
|
1670
|
+
return Ye.includes(r);
|
|
1672
1671
|
}
|
|
1673
|
-
function
|
|
1674
|
-
return
|
|
1672
|
+
function Is(r) {
|
|
1673
|
+
return We.includes(r);
|
|
1675
1674
|
}
|
|
1676
|
-
function
|
|
1677
|
-
return
|
|
1675
|
+
function Fe(r) {
|
|
1676
|
+
return Ns.includes(r);
|
|
1678
1677
|
}
|
|
1679
1678
|
const P = {
|
|
1680
1679
|
// An absent attribute must mean "default" (true), not false. Lit calls
|
|
1681
1680
|
// fromAttribute(null) when an attribute is *removed*, so returning false
|
|
1682
1681
|
// there would make removing `allow-oauth="false"` leave the flag off
|
|
1683
1682
|
// forever instead of restoring the default.
|
|
1684
|
-
fromAttribute: (
|
|
1685
|
-
toAttribute: (
|
|
1683
|
+
fromAttribute: (r) => r === null ? !0 : r !== "false",
|
|
1684
|
+
toAttribute: (r) => r ? null : "false"
|
|
1686
1685
|
};
|
|
1687
|
-
var vt, wt, $t, yt, Et, St, Ct, Pt, kt, _t, Ot,
|
|
1688
|
-
let u = (
|
|
1686
|
+
var vt, wt, $t, yt, Et, St, Ct, Pt, kt, _t, Ot, Tt, xt, Ut, Lt, At, Mt, Nt, It, Ft, Dt, Bt, Rt, jt, Ht, qt, Vt, Gt, Kt, Yt, Wt, zt, Jt, Qt, Xt, Zt, te, ee, se, ie, ae, re, ne, oe, le, he, de, Re;
|
|
1687
|
+
let u = (Re = class extends $ {
|
|
1689
1688
|
constructor() {
|
|
1690
1689
|
super(...arguments);
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
b(this, "settingsCtl", new ke(this));
|
|
1740
|
-
b(this, "bridge", new Ps(this));
|
|
1690
|
+
o(this, vt, "signin");
|
|
1691
|
+
o(this, wt, "");
|
|
1692
|
+
o(this, $t, !1);
|
|
1693
|
+
o(this, yt, null);
|
|
1694
|
+
o(this, Et, !0);
|
|
1695
|
+
o(this, St, !0);
|
|
1696
|
+
o(this, Ct, !0);
|
|
1697
|
+
o(this, Pt, !0);
|
|
1698
|
+
o(this, kt, !0);
|
|
1699
|
+
o(this, _t, !0);
|
|
1700
|
+
o(this, Ot, "card");
|
|
1701
|
+
o(this, Tt, "bottom");
|
|
1702
|
+
o(this, xt, !1);
|
|
1703
|
+
o(this, Ut, "");
|
|
1704
|
+
o(this, Lt, "");
|
|
1705
|
+
o(this, At, "");
|
|
1706
|
+
o(this, Mt, "");
|
|
1707
|
+
o(this, Nt, "");
|
|
1708
|
+
o(this, It, !0);
|
|
1709
|
+
o(this, Ft, "");
|
|
1710
|
+
o(this, Dt, "");
|
|
1711
|
+
o(this, Bt, "");
|
|
1712
|
+
o(this, Rt, "singlebase-oauth-nonce");
|
|
1713
|
+
o(this, jt, "");
|
|
1714
|
+
o(this, Ht, "");
|
|
1715
|
+
o(this, qt, "");
|
|
1716
|
+
o(this, Vt, 0);
|
|
1717
|
+
o(this, Gt, "");
|
|
1718
|
+
o(this, Kt, "");
|
|
1719
|
+
o(this, Yt, "");
|
|
1720
|
+
o(this, Wt, "");
|
|
1721
|
+
o(this, zt, "");
|
|
1722
|
+
o(this, Jt, "");
|
|
1723
|
+
o(this, Qt, "");
|
|
1724
|
+
o(this, Xt, "");
|
|
1725
|
+
o(this, Zt, "");
|
|
1726
|
+
o(this, te, ["", "", "", "", "", ""]);
|
|
1727
|
+
o(this, ee, "signin_code");
|
|
1728
|
+
o(this, se, !1);
|
|
1729
|
+
o(this, ie, "");
|
|
1730
|
+
o(this, ae, "");
|
|
1731
|
+
o(this, re, "");
|
|
1732
|
+
o(this, ne, "");
|
|
1733
|
+
o(this, oe, "");
|
|
1734
|
+
o(this, le, 0);
|
|
1735
|
+
o(this, he, !1);
|
|
1736
|
+
b(this, "settingsCtl", new Ce(this));
|
|
1737
|
+
b(this, "bridge", new Ss(this));
|
|
1741
1738
|
b(this, "uidBase", `sb-${Math.random().toString(36).slice(2, 8)}`);
|
|
1742
1739
|
b(this, "gotoUnsubscribe");
|
|
1743
1740
|
b(this, "gotoClient", null);
|
|
1744
|
-
|
|
1741
|
+
o(this, de, !1);
|
|
1745
1742
|
b(this, "abortController", null);
|
|
1746
1743
|
b(this, "onContinue", () => {
|
|
1747
1744
|
this.followRedirect() || (this.dispatchEvent(
|
|
@@ -1758,292 +1755,280 @@ let u = (He = class extends $ {
|
|
|
1758
1755
|
});
|
|
1759
1756
|
}
|
|
1760
1757
|
get initialScreen() {
|
|
1761
|
-
return
|
|
1758
|
+
return n(this, vt);
|
|
1762
1759
|
}
|
|
1763
1760
|
set initialScreen(t) {
|
|
1764
|
-
|
|
1761
|
+
l(this, vt, t);
|
|
1765
1762
|
}
|
|
1766
1763
|
get screen() {
|
|
1767
|
-
return
|
|
1764
|
+
return n(this, wt);
|
|
1768
1765
|
}
|
|
1769
1766
|
set screen(t) {
|
|
1770
|
-
|
|
1767
|
+
l(this, wt, t);
|
|
1771
1768
|
}
|
|
1772
1769
|
get noAccountView() {
|
|
1773
|
-
return
|
|
1770
|
+
return n(this, $t);
|
|
1774
1771
|
}
|
|
1775
1772
|
set noAccountView(t) {
|
|
1776
|
-
|
|
1773
|
+
l(this, $t, t);
|
|
1777
1774
|
}
|
|
1778
1775
|
get settings() {
|
|
1779
|
-
return
|
|
1776
|
+
return n(this, yt);
|
|
1780
1777
|
}
|
|
1781
1778
|
set settings(t) {
|
|
1782
|
-
|
|
1779
|
+
l(this, yt, t);
|
|
1783
1780
|
}
|
|
1784
1781
|
get authEnabled() {
|
|
1785
|
-
return
|
|
1782
|
+
return n(this, Et);
|
|
1786
1783
|
}
|
|
1787
1784
|
set authEnabled(t) {
|
|
1788
|
-
|
|
1785
|
+
l(this, Et, t);
|
|
1789
1786
|
}
|
|
1790
1787
|
get allowEmailSignin() {
|
|
1791
|
-
return
|
|
1788
|
+
return n(this, St);
|
|
1792
1789
|
}
|
|
1793
1790
|
set allowEmailSignin(t) {
|
|
1794
|
-
|
|
1791
|
+
l(this, St, t);
|
|
1795
1792
|
}
|
|
1796
1793
|
get allowEmailSignup() {
|
|
1797
|
-
return
|
|
1794
|
+
return n(this, Ct);
|
|
1798
1795
|
}
|
|
1799
1796
|
set allowEmailSignup(t) {
|
|
1800
|
-
|
|
1797
|
+
l(this, Ct, t);
|
|
1801
1798
|
}
|
|
1802
1799
|
get allowEmailOtp() {
|
|
1803
|
-
return
|
|
1800
|
+
return n(this, Pt);
|
|
1804
1801
|
}
|
|
1805
1802
|
set allowEmailOtp(t) {
|
|
1806
|
-
|
|
1803
|
+
l(this, Pt, t);
|
|
1807
1804
|
}
|
|
1808
1805
|
get allowOauth() {
|
|
1809
|
-
return
|
|
1806
|
+
return n(this, kt);
|
|
1810
1807
|
}
|
|
1811
1808
|
set allowOauth(t) {
|
|
1812
|
-
|
|
1809
|
+
l(this, kt, t);
|
|
1813
1810
|
}
|
|
1814
1811
|
get allowAccountCreation() {
|
|
1815
|
-
return
|
|
1812
|
+
return n(this, _t);
|
|
1816
1813
|
}
|
|
1817
1814
|
set allowAccountCreation(t) {
|
|
1818
|
-
|
|
1815
|
+
l(this, _t, t);
|
|
1819
1816
|
}
|
|
1820
1817
|
get layout() {
|
|
1821
|
-
return
|
|
1818
|
+
return n(this, Ot);
|
|
1822
1819
|
}
|
|
1823
1820
|
set layout(t) {
|
|
1824
|
-
|
|
1821
|
+
l(this, Ot, t);
|
|
1825
1822
|
}
|
|
1826
1823
|
get oauthPlacement() {
|
|
1827
|
-
return
|
|
1824
|
+
return n(this, Tt);
|
|
1828
1825
|
}
|
|
1829
1826
|
set oauthPlacement(t) {
|
|
1830
|
-
|
|
1827
|
+
l(this, Tt, t);
|
|
1831
1828
|
}
|
|
1832
1829
|
get stepped() {
|
|
1833
|
-
return
|
|
1830
|
+
return n(this, xt);
|
|
1834
1831
|
}
|
|
1835
1832
|
set stepped(t) {
|
|
1836
|
-
|
|
1833
|
+
l(this, xt, t);
|
|
1837
1834
|
}
|
|
1838
1835
|
get logoText() {
|
|
1839
|
-
return
|
|
1836
|
+
return n(this, Ut);
|
|
1840
1837
|
}
|
|
1841
1838
|
set logoText(t) {
|
|
1842
|
-
|
|
1839
|
+
l(this, Ut, t);
|
|
1843
1840
|
}
|
|
1844
1841
|
get logoUrl() {
|
|
1845
|
-
return
|
|
1842
|
+
return n(this, Lt);
|
|
1846
1843
|
}
|
|
1847
1844
|
set logoUrl(t) {
|
|
1848
|
-
|
|
1845
|
+
l(this, Lt, t);
|
|
1849
1846
|
}
|
|
1850
1847
|
get brandLine() {
|
|
1851
|
-
return
|
|
1848
|
+
return n(this, At);
|
|
1852
1849
|
}
|
|
1853
1850
|
set brandLine(t) {
|
|
1854
|
-
|
|
1851
|
+
l(this, At, t);
|
|
1855
1852
|
}
|
|
1856
1853
|
get brandFoot() {
|
|
1857
|
-
return
|
|
1854
|
+
return n(this, Mt);
|
|
1858
1855
|
}
|
|
1859
1856
|
set brandFoot(t) {
|
|
1860
|
-
|
|
1857
|
+
l(this, Mt, t);
|
|
1861
1858
|
}
|
|
1862
1859
|
get signInTitle() {
|
|
1863
|
-
return
|
|
1860
|
+
return n(this, Nt);
|
|
1864
1861
|
}
|
|
1865
1862
|
set signInTitle(t) {
|
|
1866
|
-
|
|
1863
|
+
l(this, Nt, t);
|
|
1867
1864
|
}
|
|
1868
1865
|
get branding() {
|
|
1869
|
-
return
|
|
1866
|
+
return n(this, It);
|
|
1870
1867
|
}
|
|
1871
1868
|
set branding(t) {
|
|
1872
|
-
|
|
1873
|
-
}
|
|
1874
|
-
get brandingText() {
|
|
1875
|
-
return r(this, Ft);
|
|
1876
|
-
}
|
|
1877
|
-
set brandingText(t) {
|
|
1878
|
-
o(this, Ft, t);
|
|
1879
|
-
}
|
|
1880
|
-
get brandingUrl() {
|
|
1881
|
-
return r(this, Dt);
|
|
1882
|
-
}
|
|
1883
|
-
set brandingUrl(t) {
|
|
1884
|
-
o(this, Dt, t);
|
|
1869
|
+
l(this, It, t);
|
|
1885
1870
|
}
|
|
1886
1871
|
get redirectUrl() {
|
|
1887
|
-
return
|
|
1872
|
+
return n(this, Ft);
|
|
1888
1873
|
}
|
|
1889
1874
|
set redirectUrl(t) {
|
|
1890
|
-
|
|
1875
|
+
l(this, Ft, t);
|
|
1891
1876
|
}
|
|
1892
1877
|
get tosUrl() {
|
|
1893
|
-
return
|
|
1878
|
+
return n(this, Dt);
|
|
1894
1879
|
}
|
|
1895
1880
|
set tosUrl(t) {
|
|
1896
|
-
|
|
1881
|
+
l(this, Dt, t);
|
|
1897
1882
|
}
|
|
1898
1883
|
get privacyUrl() {
|
|
1899
|
-
return
|
|
1884
|
+
return n(this, Bt);
|
|
1900
1885
|
}
|
|
1901
1886
|
set privacyUrl(t) {
|
|
1902
|
-
|
|
1887
|
+
l(this, Bt, t);
|
|
1903
1888
|
}
|
|
1904
1889
|
get nonceStorageKey() {
|
|
1905
|
-
return
|
|
1890
|
+
return n(this, Rt);
|
|
1906
1891
|
}
|
|
1907
1892
|
set nonceStorageKey(t) {
|
|
1908
|
-
|
|
1893
|
+
l(this, Rt, t);
|
|
1909
1894
|
}
|
|
1910
1895
|
get inviteEmail() {
|
|
1911
|
-
return
|
|
1896
|
+
return n(this, jt);
|
|
1912
1897
|
}
|
|
1913
1898
|
set inviteEmail(t) {
|
|
1914
|
-
|
|
1899
|
+
l(this, jt, t);
|
|
1915
1900
|
}
|
|
1916
1901
|
get inviteOrg() {
|
|
1917
|
-
return
|
|
1902
|
+
return n(this, Ht);
|
|
1918
1903
|
}
|
|
1919
1904
|
set inviteOrg(t) {
|
|
1920
|
-
|
|
1905
|
+
l(this, Ht, t);
|
|
1921
1906
|
}
|
|
1922
1907
|
get inviteCode() {
|
|
1923
|
-
return
|
|
1908
|
+
return n(this, qt);
|
|
1924
1909
|
}
|
|
1925
1910
|
set inviteCode(t) {
|
|
1926
|
-
|
|
1911
|
+
l(this, qt, t);
|
|
1927
1912
|
}
|
|
1928
1913
|
get step() {
|
|
1929
|
-
return
|
|
1914
|
+
return n(this, Vt);
|
|
1930
1915
|
}
|
|
1931
1916
|
set step(t) {
|
|
1932
|
-
|
|
1917
|
+
l(this, Vt, t);
|
|
1933
1918
|
}
|
|
1934
1919
|
get method() {
|
|
1935
|
-
return
|
|
1920
|
+
return n(this, Gt);
|
|
1936
1921
|
}
|
|
1937
1922
|
set method(t) {
|
|
1938
|
-
|
|
1923
|
+
l(this, Gt, t);
|
|
1939
1924
|
}
|
|
1940
1925
|
get email() {
|
|
1941
|
-
return
|
|
1926
|
+
return n(this, Kt);
|
|
1942
1927
|
}
|
|
1943
1928
|
set email(t) {
|
|
1944
|
-
|
|
1929
|
+
l(this, Kt, t);
|
|
1945
1930
|
}
|
|
1946
1931
|
get password() {
|
|
1947
|
-
return
|
|
1932
|
+
return n(this, Yt);
|
|
1948
1933
|
}
|
|
1949
1934
|
set password(t) {
|
|
1950
|
-
|
|
1935
|
+
l(this, Yt, t);
|
|
1951
1936
|
}
|
|
1952
1937
|
get name() {
|
|
1953
|
-
return
|
|
1938
|
+
return n(this, Wt);
|
|
1954
1939
|
}
|
|
1955
1940
|
set name(t) {
|
|
1956
|
-
|
|
1941
|
+
l(this, Wt, t);
|
|
1957
1942
|
}
|
|
1958
1943
|
get firstName() {
|
|
1959
|
-
return
|
|
1944
|
+
return n(this, zt);
|
|
1960
1945
|
}
|
|
1961
1946
|
set firstName(t) {
|
|
1962
|
-
|
|
1947
|
+
l(this, zt, t);
|
|
1963
1948
|
}
|
|
1964
1949
|
get lastName() {
|
|
1965
|
-
return
|
|
1950
|
+
return n(this, Jt);
|
|
1966
1951
|
}
|
|
1967
1952
|
set lastName(t) {
|
|
1968
|
-
|
|
1953
|
+
l(this, Jt, t);
|
|
1969
1954
|
}
|
|
1970
1955
|
get phone() {
|
|
1971
|
-
return
|
|
1956
|
+
return n(this, Qt);
|
|
1972
1957
|
}
|
|
1973
1958
|
set phone(t) {
|
|
1974
|
-
|
|
1959
|
+
l(this, Qt, t);
|
|
1975
1960
|
}
|
|
1976
1961
|
get newPass() {
|
|
1977
|
-
return
|
|
1962
|
+
return n(this, Xt);
|
|
1978
1963
|
}
|
|
1979
1964
|
set newPass(t) {
|
|
1980
|
-
|
|
1965
|
+
l(this, Xt, t);
|
|
1981
1966
|
}
|
|
1982
1967
|
get confirmPass() {
|
|
1983
|
-
return
|
|
1968
|
+
return n(this, Zt);
|
|
1984
1969
|
}
|
|
1985
1970
|
set confirmPass(t) {
|
|
1986
|
-
|
|
1971
|
+
l(this, Zt, t);
|
|
1987
1972
|
}
|
|
1988
1973
|
get code() {
|
|
1989
|
-
return
|
|
1974
|
+
return n(this, te);
|
|
1990
1975
|
}
|
|
1991
1976
|
set code(t) {
|
|
1992
|
-
|
|
1977
|
+
l(this, te, t);
|
|
1993
1978
|
}
|
|
1994
1979
|
get verifyNext() {
|
|
1995
|
-
return
|
|
1980
|
+
return n(this, ee);
|
|
1996
1981
|
}
|
|
1997
1982
|
set verifyNext(t) {
|
|
1998
|
-
|
|
1983
|
+
l(this, ee, t);
|
|
1999
1984
|
}
|
|
2000
1985
|
get loading() {
|
|
2001
|
-
return
|
|
1986
|
+
return n(this, se);
|
|
2002
1987
|
}
|
|
2003
1988
|
set loading(t) {
|
|
2004
|
-
|
|
1989
|
+
l(this, se, t);
|
|
2005
1990
|
}
|
|
2006
1991
|
get banner() {
|
|
2007
|
-
return
|
|
1992
|
+
return n(this, ie);
|
|
2008
1993
|
}
|
|
2009
1994
|
set banner(t) {
|
|
2010
|
-
|
|
1995
|
+
l(this, ie, t);
|
|
2011
1996
|
}
|
|
2012
1997
|
get notice() {
|
|
2013
|
-
return
|
|
1998
|
+
return n(this, ae);
|
|
2014
1999
|
}
|
|
2015
2000
|
set notice(t) {
|
|
2016
|
-
|
|
2001
|
+
l(this, ae, t);
|
|
2017
2002
|
}
|
|
2018
2003
|
get emailError() {
|
|
2019
|
-
return
|
|
2004
|
+
return n(this, re);
|
|
2020
2005
|
}
|
|
2021
2006
|
set emailError(t) {
|
|
2022
|
-
|
|
2007
|
+
l(this, re, t);
|
|
2023
2008
|
}
|
|
2024
2009
|
get passError() {
|
|
2025
|
-
return
|
|
2010
|
+
return n(this, ne);
|
|
2026
2011
|
}
|
|
2027
2012
|
set passError(t) {
|
|
2028
|
-
|
|
2013
|
+
l(this, ne, t);
|
|
2029
2014
|
}
|
|
2030
2015
|
get newPassError() {
|
|
2031
|
-
return
|
|
2016
|
+
return n(this, oe);
|
|
2032
2017
|
}
|
|
2033
2018
|
set newPassError(t) {
|
|
2034
|
-
|
|
2019
|
+
l(this, oe, t);
|
|
2035
2020
|
}
|
|
2036
2021
|
get attempts() {
|
|
2037
|
-
return
|
|
2022
|
+
return n(this, le);
|
|
2038
2023
|
}
|
|
2039
2024
|
set attempts(t) {
|
|
2040
|
-
|
|
2025
|
+
l(this, le, t);
|
|
2041
2026
|
}
|
|
2042
2027
|
get needsMfaCode() {
|
|
2043
|
-
return
|
|
2028
|
+
return n(this, he);
|
|
2044
2029
|
}
|
|
2045
2030
|
set needsMfaCode(t) {
|
|
2046
|
-
|
|
2031
|
+
l(this, he, t);
|
|
2047
2032
|
}
|
|
2048
2033
|
uid(t) {
|
|
2049
2034
|
return `${this.uidBase}-${t}`;
|
|
@@ -2065,7 +2050,7 @@ let u = (He = class extends $ {
|
|
|
2065
2050
|
var i;
|
|
2066
2051
|
if (t === this.gotoClient || ((i = this.gotoUnsubscribe) == null || i.call(this), this.gotoUnsubscribe = void 0, this.gotoClient = t, !t)) return;
|
|
2067
2052
|
const e = t.on("goto", ({ screen: h }) => {
|
|
2068
|
-
|
|
2053
|
+
Fe(h) && this.goto(h);
|
|
2069
2054
|
}), s = t.on("signin", () => {
|
|
2070
2055
|
this.followRedirect();
|
|
2071
2056
|
});
|
|
@@ -2108,7 +2093,7 @@ let u = (He = class extends $ {
|
|
|
2108
2093
|
/** The screen the host asked for, before any guarding is applied. */
|
|
2109
2094
|
get requestedScreen() {
|
|
2110
2095
|
const t = this.screen || this.initialScreen || "signin";
|
|
2111
|
-
return
|
|
2096
|
+
return Fe(t) ? t : "signin";
|
|
2112
2097
|
}
|
|
2113
2098
|
/**
|
|
2114
2099
|
* Resolves the screen actually rendered.
|
|
@@ -2121,7 +2106,7 @@ let u = (He = class extends $ {
|
|
|
2121
2106
|
get activeScreen() {
|
|
2122
2107
|
if (this.isOAuthCallback) return "oauth-callback";
|
|
2123
2108
|
const t = this.auth.state.status === "authenticated", e = this.requestedScreen;
|
|
2124
|
-
if (
|
|
2109
|
+
if (Is(e))
|
|
2125
2110
|
return t ? e : "signin";
|
|
2126
2111
|
if (t)
|
|
2127
2112
|
return this.screen !== "" || this.initialScreen !== "signin" ? e : "account";
|
|
@@ -2131,7 +2116,7 @@ let u = (He = class extends $ {
|
|
|
2131
2116
|
}
|
|
2132
2117
|
/** True when a signed-in user is sitting on a guest screen (spec: offer continue/sign out). */
|
|
2133
2118
|
get showsSignedInInterstitial() {
|
|
2134
|
-
return this.auth.state.status === "authenticated" &&
|
|
2119
|
+
return this.auth.state.status === "authenticated" && Ie(this.activeScreen);
|
|
2135
2120
|
}
|
|
2136
2121
|
// ── redirect ──────────────────────────────────────────────
|
|
2137
2122
|
/**
|
|
@@ -2144,7 +2129,7 @@ let u = (He = class extends $ {
|
|
|
2144
2129
|
*/
|
|
2145
2130
|
get redirectTarget() {
|
|
2146
2131
|
var t;
|
|
2147
|
-
return
|
|
2132
|
+
return ls(
|
|
2148
2133
|
this.redirectUrl || this.redirectParam,
|
|
2149
2134
|
(t = globalThis.location) == null ? void 0 : t.href,
|
|
2150
2135
|
(e) => console.warn(`[singlebase] ${e}`)
|
|
@@ -2167,10 +2152,10 @@ let u = (He = class extends $ {
|
|
|
2167
2152
|
return t.has("access_code") || t.has("error");
|
|
2168
2153
|
}
|
|
2169
2154
|
get callbackDone() {
|
|
2170
|
-
return
|
|
2155
|
+
return n(this, de);
|
|
2171
2156
|
}
|
|
2172
2157
|
set callbackDone(t) {
|
|
2173
|
-
|
|
2158
|
+
l(this, de, t);
|
|
2174
2159
|
}
|
|
2175
2160
|
/** Strips the provider's parameters so a reload cannot replay the exchange. */
|
|
2176
2161
|
cleanCallbackUrl() {
|
|
@@ -2213,12 +2198,7 @@ let u = (He = class extends $ {
|
|
|
2213
2198
|
return this.logoUrl ? a`<img class="brand-img" part="logo" src=${this.logoUrl} alt=${this.logoText} />` : this.logoText ? a`<div class="brand-mark" part="logo">${this.logoText}</div>` : d;
|
|
2214
2199
|
}
|
|
2215
2200
|
renderBranding() {
|
|
2216
|
-
return
|
|
2217
|
-
this.branding,
|
|
2218
|
-
this.brandingText,
|
|
2219
|
-
this.msg.brandingLabel,
|
|
2220
|
-
this.brandingUrl
|
|
2221
|
-
);
|
|
2201
|
+
return cs(this.branding, "Auth");
|
|
2222
2202
|
}
|
|
2223
2203
|
/** Every screen renders inside this, so the credit appears once and only once. */
|
|
2224
2204
|
panel(t) {
|
|
@@ -2263,7 +2243,7 @@ let u = (He = class extends $ {
|
|
|
2263
2243
|
}
|
|
2264
2244
|
}
|
|
2265
2245
|
describeError(t) {
|
|
2266
|
-
if (t instanceof
|
|
2246
|
+
if (t instanceof Ee) {
|
|
2267
2247
|
if (t.code === "AUTH_RATE_LIMITED") return this.msg.rateLimitedMessage;
|
|
2268
2248
|
if (t.code === "INVALID_TOKEN") return "That code is not valid. Check it and try again.";
|
|
2269
2249
|
}
|
|
@@ -2382,7 +2362,7 @@ let u = (He = class extends $ {
|
|
|
2382
2362
|
last_name: h.join(" ") || "—"
|
|
2383
2363
|
},
|
|
2384
2364
|
this.signal()
|
|
2385
|
-
), w =
|
|
2365
|
+
), w = ns({
|
|
2386
2366
|
next_action: c.next_action,
|
|
2387
2367
|
next_operation: c.next_operation
|
|
2388
2368
|
});
|
|
@@ -2410,11 +2390,11 @@ let u = (He = class extends $ {
|
|
|
2410
2390
|
this.signal()
|
|
2411
2391
|
), this.step = 0;
|
|
2412
2392
|
} catch (i) {
|
|
2413
|
-
if (i instanceof
|
|
2393
|
+
if (i instanceof Ee && i.code === "CODE_REQUIRED") {
|
|
2414
2394
|
this.needsMfaCode = !0, await e.requestCode({ email: this.email, purpose: "signin" }, this.signal()), this.notice = this.msg.codeSentNeutral;
|
|
2415
2395
|
return;
|
|
2416
2396
|
}
|
|
2417
|
-
if (i instanceof
|
|
2397
|
+
if (i instanceof Ee && i.code === "INVALID_CREDENTIALS") {
|
|
2418
2398
|
this.attempts += 1, this.banner = this.attempts >= 3 ? this.msg.rateLimitedMessage : "That email and password do not match.";
|
|
2419
2399
|
return;
|
|
2420
2400
|
}
|
|
@@ -2655,35 +2635,35 @@ let u = (He = class extends $ {
|
|
|
2655
2635
|
renderAccordion(t) {
|
|
2656
2636
|
const e = this.cfg, s = t === "signin" && e.allowEmailSignin || t === "signup" && e.allowEmailSignup || t === "otp" && e.allowEmailOtp, i = e.allowOauth;
|
|
2657
2637
|
if (!s && !i) return d;
|
|
2658
|
-
const h = s && i, c = s ? i && this.method || "email" : "oauth", w = c === "email", y = c === "oauth",
|
|
2659
|
-
<div class="acc-item ${
|
|
2638
|
+
const h = s && i, c = s ? i && this.method || "email" : "oauth", w = c === "email", y = c === "oauth", ye = t === "signup" ? this.msg.emailMethodTitleSignUp : this.msg.emailMethodTitle, Je = t === "otp" ? this.msg.emailMethodMetaOtp : t === "signup" ? this.msg.emailMethodMetaSignUp : this.msg.emailMethodMeta, ke = (Te, Qe, Xe, Ze, ts, xe) => a`
|
|
2639
|
+
<div class="acc-item ${Te ? "open" : ""} ${h ? "" : "bare"}" part="acc-item">
|
|
2660
2640
|
${h ? a`
|
|
2661
2641
|
<button
|
|
2662
2642
|
type="button"
|
|
2663
2643
|
class="acc-head"
|
|
2664
|
-
aria-expanded=${
|
|
2665
|
-
aria-controls=${this.uid(`acc-${
|
|
2666
|
-
@click=${
|
|
2644
|
+
aria-expanded=${Te ? "true" : "false"}
|
|
2645
|
+
aria-controls=${this.uid(`acc-${xe}`)}
|
|
2646
|
+
@click=${ts}
|
|
2667
2647
|
>
|
|
2668
2648
|
<span class="chev" aria-hidden="true">›</span>
|
|
2669
|
-
<span class="acc-title">${
|
|
2670
|
-
<span class="acc-meta">${
|
|
2649
|
+
<span class="acc-title">${Qe}</span>
|
|
2650
|
+
<span class="acc-meta">${Xe}</span>
|
|
2671
2651
|
</button>
|
|
2672
2652
|
` : d}
|
|
2673
|
-
<div class="acc-body" id=${this.uid(`acc-${
|
|
2653
|
+
<div class="acc-body" id=${this.uid(`acc-${xe}`)}>
|
|
2674
2654
|
<div class="acc-clip">
|
|
2675
|
-
<div class="acc-inner">${
|
|
2655
|
+
<div class="acc-inner">${Ze}</div>
|
|
2676
2656
|
</div>
|
|
2677
2657
|
</div>
|
|
2678
2658
|
</div>
|
|
2679
|
-
`,
|
|
2659
|
+
`, _e = s ? ke(
|
|
2680
2660
|
w,
|
|
2681
|
-
|
|
2682
|
-
|
|
2661
|
+
ye,
|
|
2662
|
+
Je,
|
|
2683
2663
|
this.renderEmailMethodBody(t),
|
|
2684
2664
|
() => this.method = w ? "" : "email",
|
|
2685
2665
|
"email"
|
|
2686
|
-
) : d,
|
|
2666
|
+
) : d, Oe = i ? ke(
|
|
2687
2667
|
y,
|
|
2688
2668
|
this.msg.oauthMethodTitle,
|
|
2689
2669
|
this.msg.oauthMethodMeta,
|
|
@@ -2703,7 +2683,7 @@ let u = (He = class extends $ {
|
|
|
2703
2683
|
) : d;
|
|
2704
2684
|
return a`
|
|
2705
2685
|
<div class="acc-wrap">
|
|
2706
|
-
${this.oauthPlacement === "top" ? a`${
|
|
2686
|
+
${this.oauthPlacement === "top" ? a`${Oe}${_e}` : a`${_e}${Oe}`}
|
|
2707
2687
|
</div>
|
|
2708
2688
|
`;
|
|
2709
2689
|
}
|
|
@@ -2946,7 +2926,7 @@ let u = (He = class extends $ {
|
|
|
2946
2926
|
`);
|
|
2947
2927
|
if (this.showsSignedInInterstitial)
|
|
2948
2928
|
return this.noAccountView ? d : this.panel(this.renderSignedIn());
|
|
2949
|
-
const e = this.cfg, s = !e.allowEmailSignin && !e.allowEmailOtp && !e.allowOauth, i = !e.authEnabled || s &&
|
|
2929
|
+
const e = this.cfg, s = !e.allowEmailSignin && !e.allowEmailOtp && !e.allowOauth, i = !e.authEnabled || s && Ie(t);
|
|
2950
2930
|
return a`
|
|
2951
2931
|
${this.layout === "split" ? a`
|
|
2952
2932
|
<div class="brand-panel">
|
|
@@ -2958,11 +2938,11 @@ let u = (He = class extends $ {
|
|
|
2958
2938
|
${this.panel(i ? this.renderBlocked() : this.renderGuest(t))}
|
|
2959
2939
|
`;
|
|
2960
2940
|
}
|
|
2961
|
-
}, vt = new WeakMap(), wt = new WeakMap(), $t = new WeakMap(), yt = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), kt = new WeakMap(), _t = new WeakMap(), Ot = new WeakMap(),
|
|
2962
|
-
|
|
2941
|
+
}, vt = new WeakMap(), wt = new WeakMap(), $t = new WeakMap(), yt = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), kt = new WeakMap(), _t = new WeakMap(), Ot = new WeakMap(), Tt = new WeakMap(), xt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), At = new WeakMap(), Mt = new WeakMap(), Nt = new WeakMap(), It = new WeakMap(), Ft = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), Rt = new WeakMap(), jt = new WeakMap(), Ht = new WeakMap(), qt = new WeakMap(), Vt = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), Yt = new WeakMap(), Wt = new WeakMap(), zt = new WeakMap(), Jt = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), he = new WeakMap(), de = new WeakMap(), Re);
|
|
2942
|
+
Ms(u, "styles", [
|
|
2963
2943
|
...$.styles,
|
|
2964
|
-
|
|
2965
|
-
|
|
2944
|
+
ds,
|
|
2945
|
+
qe`
|
|
2966
2946
|
/* the mock's root */
|
|
2967
2947
|
:host {
|
|
2968
2948
|
display: flex;
|
|
@@ -3107,12 +3087,6 @@ g([
|
|
|
3107
3087
|
g([
|
|
3108
3088
|
p({ converter: P, attribute: "branding" })
|
|
3109
3089
|
], u.prototype, "branding", 1);
|
|
3110
|
-
g([
|
|
3111
|
-
p({ attribute: "branding-text" })
|
|
3112
|
-
], u.prototype, "brandingText", 1);
|
|
3113
|
-
g([
|
|
3114
|
-
p({ attribute: "branding-url" })
|
|
3115
|
-
], u.prototype, "brandingUrl", 1);
|
|
3116
3090
|
g([
|
|
3117
3091
|
p({ attribute: "redirect-url" })
|
|
3118
3092
|
], u.prototype, "redirectUrl", 1);
|
|
@@ -3198,40 +3172,40 @@ g([
|
|
|
3198
3172
|
m()
|
|
3199
3173
|
], u.prototype, "callbackDone", 1);
|
|
3200
3174
|
u = g([
|
|
3201
|
-
|
|
3175
|
+
we("singlebase-authui")
|
|
3202
3176
|
], u);
|
|
3203
|
-
var
|
|
3204
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
3205
|
-
(c =
|
|
3206
|
-
return s && i &&
|
|
3177
|
+
var Fs = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, Se = (r, t, e, s) => {
|
|
3178
|
+
for (var i = s > 1 ? void 0 : s ? Ds(t, e) : t, h = r.length - 1, c; h >= 0; h--)
|
|
3179
|
+
(c = r[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
3180
|
+
return s && i && Fs(t, e, i), i;
|
|
3207
3181
|
};
|
|
3208
|
-
const
|
|
3209
|
-
var
|
|
3210
|
-
let
|
|
3182
|
+
const Bs = ["loading", "authenticated", "unauthenticated"];
|
|
3183
|
+
var ce, ue, pe, je;
|
|
3184
|
+
let T = (je = class extends $ {
|
|
3211
3185
|
constructor() {
|
|
3212
3186
|
super(...arguments);
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3187
|
+
o(this, ce, "");
|
|
3188
|
+
o(this, ue, null);
|
|
3189
|
+
o(this, pe, "unauthenticated");
|
|
3216
3190
|
b(this, "warnedFor", null);
|
|
3217
3191
|
}
|
|
3218
3192
|
get slot() {
|
|
3219
|
-
return
|
|
3193
|
+
return n(this, ce);
|
|
3220
3194
|
}
|
|
3221
3195
|
set slot(t) {
|
|
3222
|
-
|
|
3196
|
+
l(this, ce, t);
|
|
3223
3197
|
}
|
|
3224
3198
|
get predicate() {
|
|
3225
|
-
return
|
|
3199
|
+
return n(this, ue);
|
|
3226
3200
|
}
|
|
3227
3201
|
set predicate(t) {
|
|
3228
|
-
|
|
3202
|
+
l(this, ue, t);
|
|
3229
3203
|
}
|
|
3230
3204
|
get onMismatch() {
|
|
3231
|
-
return
|
|
3205
|
+
return n(this, pe);
|
|
3232
3206
|
}
|
|
3233
3207
|
set onMismatch(t) {
|
|
3234
|
-
|
|
3208
|
+
l(this, pe, t);
|
|
3235
3209
|
}
|
|
3236
3210
|
createRenderRoot() {
|
|
3237
3211
|
return this;
|
|
@@ -3244,21 +3218,21 @@ let x = (qe = class extends $ {
|
|
|
3244
3218
|
if (!this.predicate) return "authenticated";
|
|
3245
3219
|
this.warnOnce(this.predicate);
|
|
3246
3220
|
const e = this.auth.state.user;
|
|
3247
|
-
return
|
|
3221
|
+
return ms(e, this.predicate) ? "authenticated" : this.onMismatch === "hidden" ? "hidden" : "unauthenticated";
|
|
3248
3222
|
}
|
|
3249
3223
|
/** Surfaces a malformed predicate once, rather than silently never matching. */
|
|
3250
3224
|
warnOnce(t) {
|
|
3251
3225
|
const e = JSON.stringify(t);
|
|
3252
3226
|
if (this.warnedFor !== e) {
|
|
3253
3227
|
this.warnedFor = e;
|
|
3254
|
-
for (const s of
|
|
3228
|
+
for (const s of bs(t))
|
|
3255
3229
|
console.warn(`[singlebase] <singlebase-authui-guard> predicate: ${s}`);
|
|
3256
3230
|
}
|
|
3257
3231
|
}
|
|
3258
3232
|
render() {
|
|
3259
3233
|
const t = this.activeState;
|
|
3260
3234
|
if (this.slot) {
|
|
3261
|
-
const e =
|
|
3235
|
+
const e = Bs.includes(this.slot) && this.slot === t;
|
|
3262
3236
|
return this.toggleAttribute("hidden", !e), a`<slot></slot>`;
|
|
3263
3237
|
}
|
|
3264
3238
|
this.toggleAttribute("hidden", !1);
|
|
@@ -3268,76 +3242,76 @@ let x = (qe = class extends $ {
|
|
|
3268
3242
|
}
|
|
3269
3243
|
return a`<slot></slot>`;
|
|
3270
3244
|
}
|
|
3271
|
-
},
|
|
3272
|
-
|
|
3245
|
+
}, ce = new WeakMap(), ue = new WeakMap(), pe = new WeakMap(), je);
|
|
3246
|
+
Se([
|
|
3273
3247
|
p({ reflect: !0 })
|
|
3274
|
-
],
|
|
3275
|
-
|
|
3248
|
+
], T.prototype, "slot", 1);
|
|
3249
|
+
Se([
|
|
3276
3250
|
p({
|
|
3277
3251
|
converter: {
|
|
3278
|
-
fromAttribute: (
|
|
3279
|
-
if (!
|
|
3252
|
+
fromAttribute: (r) => {
|
|
3253
|
+
if (!r) return null;
|
|
3280
3254
|
try {
|
|
3281
|
-
return JSON.parse(
|
|
3255
|
+
return JSON.parse(r);
|
|
3282
3256
|
} catch {
|
|
3283
|
-
return console.error("[singlebase] guard predicate is not valid JSON:",
|
|
3257
|
+
return console.error("[singlebase] guard predicate is not valid JSON:", r), null;
|
|
3284
3258
|
}
|
|
3285
3259
|
},
|
|
3286
|
-
toAttribute: (
|
|
3260
|
+
toAttribute: (r) => r ? JSON.stringify(r) : null
|
|
3287
3261
|
}
|
|
3288
3262
|
})
|
|
3289
|
-
],
|
|
3290
|
-
|
|
3263
|
+
], T.prototype, "predicate", 1);
|
|
3264
|
+
Se([
|
|
3291
3265
|
p({ attribute: "on-mismatch" })
|
|
3292
|
-
],
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
],
|
|
3296
|
-
var
|
|
3297
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
3298
|
-
(c =
|
|
3299
|
-
return s && i &&
|
|
3300
|
-
},
|
|
3301
|
-
const
|
|
3302
|
-
var
|
|
3303
|
-
let S = (
|
|
3266
|
+
], T.prototype, "onMismatch", 1);
|
|
3267
|
+
T = Se([
|
|
3268
|
+
we("singlebase-authui-guard")
|
|
3269
|
+
], T);
|
|
3270
|
+
var ze = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, js = (r, t, e) => t in r ? ze(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, O = (r, t, e, s) => {
|
|
3271
|
+
for (var i = s > 1 ? void 0 : s ? Rs(t, e) : t, h = r.length - 1, c; h >= 0; h--)
|
|
3272
|
+
(c = r[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
3273
|
+
return s && i && ze(t, e, i), i;
|
|
3274
|
+
}, Hs = (r, t, e) => js(r, t + "", e);
|
|
3275
|
+
const qs = "profile_photo";
|
|
3276
|
+
var ge, me, be, fe, ve, He;
|
|
3277
|
+
let S = (He = class extends $ {
|
|
3304
3278
|
constructor() {
|
|
3305
3279
|
super(...arguments);
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3280
|
+
o(this, ge, "");
|
|
3281
|
+
o(this, me, "");
|
|
3282
|
+
o(this, be, !1);
|
|
3283
|
+
o(this, fe, "");
|
|
3284
|
+
o(this, ve, !1);
|
|
3311
3285
|
}
|
|
3312
3286
|
get path() {
|
|
3313
|
-
return
|
|
3287
|
+
return n(this, ge);
|
|
3314
3288
|
}
|
|
3315
3289
|
set path(t) {
|
|
3316
|
-
|
|
3290
|
+
l(this, ge, t);
|
|
3317
3291
|
}
|
|
3318
3292
|
get fallback() {
|
|
3319
|
-
return
|
|
3293
|
+
return n(this, me);
|
|
3320
3294
|
}
|
|
3321
3295
|
set fallback(t) {
|
|
3322
|
-
|
|
3296
|
+
l(this, me, t);
|
|
3323
3297
|
}
|
|
3324
3298
|
get avatar() {
|
|
3325
|
-
return
|
|
3299
|
+
return n(this, be);
|
|
3326
3300
|
}
|
|
3327
3301
|
set avatar(t) {
|
|
3328
|
-
|
|
3302
|
+
l(this, be, t);
|
|
3329
3303
|
}
|
|
3330
3304
|
get alt() {
|
|
3331
|
-
return
|
|
3305
|
+
return n(this, fe);
|
|
3332
3306
|
}
|
|
3333
3307
|
set alt(t) {
|
|
3334
|
-
|
|
3308
|
+
l(this, fe, t);
|
|
3335
3309
|
}
|
|
3336
3310
|
get imageFailed() {
|
|
3337
|
-
return
|
|
3311
|
+
return n(this, ve);
|
|
3338
3312
|
}
|
|
3339
3313
|
set imageFailed(t) {
|
|
3340
|
-
|
|
3314
|
+
l(this, ve, t);
|
|
3341
3315
|
}
|
|
3342
3316
|
willUpdate(t) {
|
|
3343
3317
|
super.willUpdate(t), (t.has("path") || t.has("avatar")) && (this.imageFailed = !1);
|
|
@@ -3350,13 +3324,13 @@ let S = (Ve = class extends $ {
|
|
|
3350
3324
|
get textValue() {
|
|
3351
3325
|
const t = this.profile;
|
|
3352
3326
|
if (!t || !this.path) return "";
|
|
3353
|
-
const e =
|
|
3327
|
+
const e = Ae(t, this.path);
|
|
3354
3328
|
return e == null || e === "" ? "" : Array.isArray(e) ? e.filter((s) => s != null).join(", ") : typeof e == "object" ? "" : String(e);
|
|
3355
3329
|
}
|
|
3356
3330
|
get avatarSrc() {
|
|
3357
3331
|
const t = this.profile;
|
|
3358
3332
|
if (!t) return "";
|
|
3359
|
-
const e =
|
|
3333
|
+
const e = Ae(t, this.path || qs);
|
|
3360
3334
|
return typeof e == "string" ? e : "";
|
|
3361
3335
|
}
|
|
3362
3336
|
render() {
|
|
@@ -3378,13 +3352,13 @@ let S = (Ve = class extends $ {
|
|
|
3378
3352
|
part="avatar-initials"
|
|
3379
3353
|
class="initials"
|
|
3380
3354
|
aria-hidden=${this.alt ? "false" : "true"}
|
|
3381
|
-
>${
|
|
3355
|
+
>${Ge(t)}</span
|
|
3382
3356
|
>`;
|
|
3383
3357
|
}
|
|
3384
|
-
},
|
|
3385
|
-
|
|
3358
|
+
}, ge = new WeakMap(), me = new WeakMap(), be = new WeakMap(), fe = new WeakMap(), ve = new WeakMap(), He);
|
|
3359
|
+
Hs(S, "styles", [
|
|
3386
3360
|
...$.styles,
|
|
3387
|
-
|
|
3361
|
+
qe`
|
|
3388
3362
|
/* Text sits in a sentence; an avatar is a box the host sizes. */
|
|
3389
3363
|
:host {
|
|
3390
3364
|
display: inline;
|
|
@@ -3440,22 +3414,22 @@ O([
|
|
|
3440
3414
|
m()
|
|
3441
3415
|
], S.prototype, "imageFailed", 1);
|
|
3442
3416
|
S = O([
|
|
3443
|
-
|
|
3417
|
+
we("singlebase-authui-display")
|
|
3444
3418
|
], S);
|
|
3445
3419
|
export {
|
|
3446
|
-
|
|
3447
|
-
|
|
3420
|
+
fs as A,
|
|
3421
|
+
Ce as S,
|
|
3448
3422
|
f as a,
|
|
3449
3423
|
E as b,
|
|
3450
3424
|
S as c,
|
|
3451
|
-
|
|
3425
|
+
T as d,
|
|
3452
3426
|
u as e,
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3427
|
+
Me as f,
|
|
3428
|
+
Ve as g,
|
|
3429
|
+
Ie as h,
|
|
3430
|
+
Ge as i,
|
|
3431
|
+
Is as j,
|
|
3432
|
+
Fe as k,
|
|
3433
|
+
vs as r
|
|
3460
3434
|
};
|
|
3461
|
-
//# sourceMappingURL=authui-display-
|
|
3435
|
+
//# sourceMappingURL=authui-display-BM_F3-5e.js.map
|