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