@cal.macconnachie/web-components 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/cals-auth.js +178 -147
- package/dist/components/index.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +533 -460
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
s !== void 0 ? s.addInitializer((() => {
|
|
4
|
-
customElements.define(e, t);
|
|
5
|
-
})) : customElements.define(e, t);
|
|
6
|
-
};
|
|
7
|
-
const z = globalThis, Z = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yt = Symbol(), it = /* @__PURE__ */ new WeakMap();
|
|
8
|
-
let Et = class {
|
|
1
|
+
const z = globalThis, Z = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Q = Symbol(), ot = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let wt = class {
|
|
9
3
|
constructor(t, s, i) {
|
|
10
|
-
if (this._$cssResult$ = !0, i !==
|
|
4
|
+
if (this._$cssResult$ = !0, i !== Q) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
5
|
this.cssText = t, this.t = s;
|
|
12
6
|
}
|
|
13
7
|
get styleSheet() {
|
|
@@ -15,7 +9,7 @@ let Et = class {
|
|
|
15
9
|
const s = this.t;
|
|
16
10
|
if (Z && t === void 0) {
|
|
17
11
|
const i = s !== void 0 && s.length === 1;
|
|
18
|
-
i && (t =
|
|
12
|
+
i && (t = ot.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ot.set(s, t));
|
|
19
13
|
}
|
|
20
14
|
return t;
|
|
21
15
|
}
|
|
@@ -23,21 +17,28 @@ let Et = class {
|
|
|
23
17
|
return this.cssText;
|
|
24
18
|
}
|
|
25
19
|
};
|
|
26
|
-
const
|
|
20
|
+
const xt = (e) => new wt(typeof e == "string" ? e : e + "", void 0, Q), Et = (e, ...t) => {
|
|
21
|
+
const s = e.length === 1 ? e[0] : t.reduce(((i, r, o) => i + ((a) => {
|
|
22
|
+
if (a._$cssResult$ === !0) return a.cssText;
|
|
23
|
+
if (typeof a == "number") return a;
|
|
24
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
|
+
})(r) + e[o + 1]), e[0]);
|
|
26
|
+
return new wt(s, e, Q);
|
|
27
|
+
}, Tt = (e, t) => {
|
|
27
28
|
if (Z) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
|
|
28
29
|
else for (const s of t) {
|
|
29
30
|
const i = document.createElement("style"), r = z.litNonce;
|
|
30
31
|
r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
|
|
31
32
|
}
|
|
32
|
-
},
|
|
33
|
+
}, at = Z ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
33
34
|
let s = "";
|
|
34
35
|
for (const i of t.cssRules) s += i.cssText;
|
|
35
|
-
return
|
|
36
|
+
return xt(s);
|
|
36
37
|
})(e) : e;
|
|
37
|
-
const { is:
|
|
38
|
+
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: Dt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Rt, getPrototypeOf: It } = Object, F = globalThis, nt = F.trustedTypes, Nt = nt ? nt.emptyScript : "", Lt = F.reactiveElementPolyfillSupport, M = (e, t) => e, Y = { toAttribute(e, t) {
|
|
38
39
|
switch (t) {
|
|
39
40
|
case Boolean:
|
|
40
|
-
e = e ?
|
|
41
|
+
e = e ? Nt : null;
|
|
41
42
|
break;
|
|
42
43
|
case Object:
|
|
43
44
|
case Array:
|
|
@@ -62,44 +63,44 @@ const { is: Ot, defineProperty: Dt, getOwnPropertyDescriptor: Ut, getOwnProperty
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
return s;
|
|
65
|
-
} },
|
|
66
|
+
} }, X = (e, t) => !Pt(e, t), lt = { attribute: !0, type: String, converter: Y, reflect: !1, useDefault: !1, hasChanged: X };
|
|
66
67
|
Symbol.metadata ??= Symbol("metadata"), F.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
67
|
-
class
|
|
68
|
+
let U = class extends HTMLElement {
|
|
68
69
|
static addInitializer(t) {
|
|
69
70
|
this._$Ei(), (this.l ??= []).push(t);
|
|
70
71
|
}
|
|
71
72
|
static get observedAttributes() {
|
|
72
73
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
73
74
|
}
|
|
74
|
-
static createProperty(t, s =
|
|
75
|
+
static createProperty(t, s = lt) {
|
|
75
76
|
if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
76
77
|
const i = Symbol(), r = this.getPropertyDescriptor(t, i, s);
|
|
77
|
-
r !== void 0 &&
|
|
78
|
+
r !== void 0 && Ot(this.prototype, t, r);
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
static getPropertyDescriptor(t, s, i) {
|
|
81
|
-
const { get: r, set: o } =
|
|
82
|
+
const { get: r, set: o } = Dt(this.prototype, t) ?? { get() {
|
|
82
83
|
return this[s];
|
|
83
84
|
}, set(a) {
|
|
84
85
|
this[s] = a;
|
|
85
86
|
} };
|
|
86
87
|
return { get: r, set(a) {
|
|
87
|
-
const
|
|
88
|
-
o?.call(this, a), this.requestUpdate(t,
|
|
88
|
+
const c = r?.call(this);
|
|
89
|
+
o?.call(this, a), this.requestUpdate(t, c, i);
|
|
89
90
|
}, configurable: !0, enumerable: !0 };
|
|
90
91
|
}
|
|
91
92
|
static getPropertyOptions(t) {
|
|
92
|
-
return this.elementProperties.get(t) ??
|
|
93
|
+
return this.elementProperties.get(t) ?? lt;
|
|
93
94
|
}
|
|
94
95
|
static _$Ei() {
|
|
95
96
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
96
|
-
const t =
|
|
97
|
+
const t = It(this);
|
|
97
98
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
98
99
|
}
|
|
99
100
|
static finalize() {
|
|
100
101
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
101
102
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
102
|
-
const s = this.properties, i = [...
|
|
103
|
+
const s = this.properties, i = [...Ut(s), ...Rt(s)];
|
|
103
104
|
for (const r of i) this.createProperty(r, s[r]);
|
|
104
105
|
}
|
|
105
106
|
const t = this[Symbol.metadata];
|
|
@@ -118,8 +119,8 @@ class I extends HTMLElement {
|
|
|
118
119
|
const s = [];
|
|
119
120
|
if (Array.isArray(t)) {
|
|
120
121
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
121
|
-
for (const r of i) s.unshift(
|
|
122
|
-
} else t !== void 0 && s.push(
|
|
122
|
+
for (const r of i) s.unshift(at(r));
|
|
123
|
+
} else t !== void 0 && s.push(at(t));
|
|
123
124
|
return s;
|
|
124
125
|
}
|
|
125
126
|
static _$Eu(t, s) {
|
|
@@ -145,7 +146,7 @@ class I extends HTMLElement {
|
|
|
145
146
|
}
|
|
146
147
|
createRenderRoot() {
|
|
147
148
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
148
|
-
return
|
|
149
|
+
return Tt(t, this.constructor.elementStyles), t;
|
|
149
150
|
}
|
|
150
151
|
connectedCallback() {
|
|
151
152
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
@@ -161,23 +162,23 @@ class I extends HTMLElement {
|
|
|
161
162
|
_$ET(t, s) {
|
|
162
163
|
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
163
164
|
if (r !== void 0 && i.reflect === !0) {
|
|
164
|
-
const o = (i.converter?.toAttribute !== void 0 ? i.converter :
|
|
165
|
+
const o = (i.converter?.toAttribute !== void 0 ? i.converter : Y).toAttribute(s, i.type);
|
|
165
166
|
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
_$AK(t, s) {
|
|
169
170
|
const i = this.constructor, r = i._$Eh.get(t);
|
|
170
171
|
if (r !== void 0 && this._$Em !== r) {
|
|
171
|
-
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter :
|
|
172
|
+
const o = i.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Y;
|
|
172
173
|
this._$Em = r;
|
|
173
|
-
const
|
|
174
|
-
this[r] =
|
|
174
|
+
const c = a.fromAttribute(s, o.type);
|
|
175
|
+
this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
requestUpdate(t, s, i) {
|
|
178
179
|
if (t !== void 0) {
|
|
179
180
|
const r = this.constructor, o = this[t];
|
|
180
|
-
if (i ??= r.getPropertyOptions(t), !((i.hasChanged ??
|
|
181
|
+
if (i ??= r.getPropertyOptions(t), !((i.hasChanged ?? X)(o, s) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
181
182
|
this.C(t, s, i);
|
|
182
183
|
}
|
|
183
184
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -207,8 +208,8 @@ class I extends HTMLElement {
|
|
|
207
208
|
}
|
|
208
209
|
const i = this.constructor.elementProperties;
|
|
209
210
|
if (i.size > 0) for (const [r, o] of i) {
|
|
210
|
-
const { wrapped: a } = o,
|
|
211
|
-
a !== !0 || this._$AL.has(r) ||
|
|
211
|
+
const { wrapped: a } = o, c = this[r];
|
|
212
|
+
a !== !0 || this._$AL.has(r) || c === void 0 || this.C(r, void 0, o, c);
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
let t = !1;
|
|
@@ -244,94 +245,55 @@ class I extends HTMLElement {
|
|
|
244
245
|
}
|
|
245
246
|
firstUpdated(t) {
|
|
246
247
|
}
|
|
247
|
-
}
|
|
248
|
-
I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[M("elementProperties")] = /* @__PURE__ */ new Map(), I[M("finalized")] = /* @__PURE__ */ new Map(), Mt?.({ ReactiveElement: I }), (F.reactiveElementVersions ??= []).push("2.1.1");
|
|
249
|
-
const Ht = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: Q }, jt = (e = Ht, t, s) => {
|
|
250
|
-
const { kind: i, metadata: r } = s;
|
|
251
|
-
let o = globalThis.litPropertyMetadata.get(r);
|
|
252
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") {
|
|
253
|
-
const { name: a } = s;
|
|
254
|
-
return { set(h) {
|
|
255
|
-
const n = t.get.call(this);
|
|
256
|
-
t.set.call(this, h), this.requestUpdate(a, n, e);
|
|
257
|
-
}, init(h) {
|
|
258
|
-
return h !== void 0 && this.C(a, void 0, e, h), h;
|
|
259
|
-
} };
|
|
260
|
-
}
|
|
261
|
-
if (i === "setter") {
|
|
262
|
-
const { name: a } = s;
|
|
263
|
-
return function(h) {
|
|
264
|
-
const n = this[a];
|
|
265
|
-
t.call(this, h), this.requestUpdate(a, n, e);
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
throw Error("Unsupported decorator location: " + i);
|
|
269
248
|
};
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
function b(e) {
|
|
277
|
-
return k({ ...e, state: !0, attribute: !1 });
|
|
278
|
-
}
|
|
279
|
-
const qt = (e, t, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, s), s);
|
|
280
|
-
function X(e, t) {
|
|
281
|
-
return (s, i, r) => {
|
|
282
|
-
const o = (a) => a.renderRoot?.querySelector(e) ?? null;
|
|
283
|
-
return qt(s, i, { get() {
|
|
284
|
-
return o(this);
|
|
285
|
-
} });
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
const tt = globalThis, Y = tt.trustedTypes, nt = Y ? Y.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, wt = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, $t = "?" + x, zt = `<${$t}>`, D = document, K = () => D.createComment(""), H = (e) => e === null || typeof e != "object" && typeof e != "function", et = Array.isArray, Bt = (e) => et(e) || typeof e?.[Symbol.iterator] == "function", W = `[
|
|
289
|
-
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, lt = /-->/g, ht = />/g, T = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
|
|
290
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, bt = /^(?:script|style|textarea|title)$/i, U = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), O = D.createTreeWalker(D, 129);
|
|
291
|
-
function vt(e, t) {
|
|
249
|
+
U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[M("elementProperties")] = /* @__PURE__ */ new Map(), U[M("finalized")] = /* @__PURE__ */ new Map(), Lt?.({ ReactiveElement: U }), (F.reactiveElementVersions ??= []).push("2.1.1");
|
|
250
|
+
const tt = globalThis, K = tt.trustedTypes, ht = K ? K.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, bt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + C, Mt = `<${vt}>`, D = document, j = () => D.createComment(""), q = (e) => e === null || typeof e != "object" && typeof e != "function", et = Array.isArray, Ht = (e) => et(e) || typeof e?.[Symbol.iterator] == "function", W = `[
|
|
251
|
+
\f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, dt = />/g, T = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), pt = /'/g, ut = /"/g, At = /^(?:script|style|textarea|title)$/i, jt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = jt(1), x = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), gt = /* @__PURE__ */ new WeakMap(), O = D.createTreeWalker(D, 129);
|
|
253
|
+
function _t(e, t) {
|
|
292
254
|
if (!et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
293
|
-
return
|
|
255
|
+
return ht !== void 0 ? ht.createHTML(t) : t;
|
|
294
256
|
}
|
|
295
|
-
const
|
|
257
|
+
const qt = (e, t) => {
|
|
296
258
|
const s = e.length - 1, i = [];
|
|
297
259
|
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = N;
|
|
298
|
-
for (let
|
|
299
|
-
const n = e[
|
|
300
|
-
let
|
|
301
|
-
for (;
|
|
302
|
-
const u = a === T && e[
|
|
303
|
-
o += a === N ? n +
|
|
304
|
-
}
|
|
305
|
-
return [
|
|
260
|
+
for (let c = 0; c < s; c++) {
|
|
261
|
+
const n = e[c];
|
|
262
|
+
let h, d, l = -1, p = 0;
|
|
263
|
+
for (; p < n.length && (a.lastIndex = p, d = a.exec(n), d !== null); ) p = a.lastIndex, a === N ? d[1] === "!--" ? a = ct : d[1] !== void 0 ? a = dt : d[2] !== void 0 ? (At.test(d[2]) && (r = RegExp("</" + d[2], "g")), a = T) : d[3] !== void 0 && (a = T) : a === T ? d[0] === ">" ? (a = r ?? N, l = -1) : d[1] === void 0 ? l = -2 : (l = a.lastIndex - d[2].length, h = d[1], a = d[3] === void 0 ? T : d[3] === '"' ? ut : pt) : a === ut || a === pt ? a = T : a === ct || a === dt ? a = N : (a = T, r = void 0);
|
|
264
|
+
const u = a === T && e[c + 1].startsWith("/>") ? " " : "";
|
|
265
|
+
o += a === N ? n + Mt : l >= 0 ? (i.push(h), n.slice(0, l) + bt + n.slice(l) + C + u) : n + C + (l === -2 ? c : u);
|
|
266
|
+
}
|
|
267
|
+
return [_t(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
306
268
|
};
|
|
307
|
-
class
|
|
269
|
+
class B {
|
|
308
270
|
constructor({ strings: t, _$litType$: s }, i) {
|
|
309
271
|
let r;
|
|
310
272
|
this.parts = [];
|
|
311
273
|
let o = 0, a = 0;
|
|
312
|
-
const
|
|
313
|
-
if (this.el =
|
|
274
|
+
const c = t.length - 1, n = this.parts, [h, d] = qt(t, s);
|
|
275
|
+
if (this.el = B.createElement(h, i), O.currentNode = this.el.content, s === 2 || s === 3) {
|
|
314
276
|
const l = this.el.content.firstChild;
|
|
315
277
|
l.replaceWith(...l.childNodes);
|
|
316
278
|
}
|
|
317
|
-
for (; (r = O.nextNode()) !== null && n.length <
|
|
279
|
+
for (; (r = O.nextNode()) !== null && n.length < c; ) {
|
|
318
280
|
if (r.nodeType === 1) {
|
|
319
|
-
if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(
|
|
320
|
-
const
|
|
321
|
-
n.push({ type: 1, index: o, name:
|
|
322
|
-
} else l.startsWith(
|
|
323
|
-
if (
|
|
324
|
-
const l = r.textContent.split(
|
|
325
|
-
if (
|
|
326
|
-
r.textContent =
|
|
327
|
-
for (let u = 0; u <
|
|
328
|
-
r.append(l[
|
|
281
|
+
if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(bt)) {
|
|
282
|
+
const p = d[a++], u = r.getAttribute(l).split(C), $ = /([.?@])?(.*)/.exec(p);
|
|
283
|
+
n.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? zt : $[1] === "?" ? Yt : $[1] === "@" ? Kt : V }), r.removeAttribute(l);
|
|
284
|
+
} else l.startsWith(C) && (n.push({ type: 6, index: o }), r.removeAttribute(l));
|
|
285
|
+
if (At.test(r.tagName)) {
|
|
286
|
+
const l = r.textContent.split(C), p = l.length - 1;
|
|
287
|
+
if (p > 0) {
|
|
288
|
+
r.textContent = K ? K.emptyScript : "";
|
|
289
|
+
for (let u = 0; u < p; u++) r.append(l[u], j()), O.nextNode(), n.push({ type: 2, index: ++o });
|
|
290
|
+
r.append(l[p], j());
|
|
329
291
|
}
|
|
330
292
|
}
|
|
331
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
293
|
+
} else if (r.nodeType === 8) if (r.data === vt) n.push({ type: 2, index: o });
|
|
332
294
|
else {
|
|
333
295
|
let l = -1;
|
|
334
|
-
for (; (l = r.data.indexOf(
|
|
296
|
+
for (; (l = r.data.indexOf(C, l + 1)) !== -1; ) n.push({ type: 7, index: o }), l += C.length - 1;
|
|
335
297
|
}
|
|
336
298
|
o++;
|
|
337
299
|
}
|
|
@@ -342,12 +304,12 @@ class j {
|
|
|
342
304
|
}
|
|
343
305
|
}
|
|
344
306
|
function R(e, t, s = e, i) {
|
|
345
|
-
if (t ===
|
|
307
|
+
if (t === x) return t;
|
|
346
308
|
let r = i !== void 0 ? s._$Co?.[i] : s._$Cl;
|
|
347
|
-
const o =
|
|
309
|
+
const o = q(t) ? void 0 : t._$litDirective$;
|
|
348
310
|
return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(e), r._$AT(e, s, i)), i !== void 0 ? (s._$Co ??= [])[i] = r : s._$Cl = r), r !== void 0 && (t = R(e, r._$AS(e, t.values), r, i)), t;
|
|
349
311
|
}
|
|
350
|
-
let
|
|
312
|
+
let Bt = class {
|
|
351
313
|
constructor(t, s) {
|
|
352
314
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
|
|
353
315
|
}
|
|
@@ -360,11 +322,11 @@ let Kt = class {
|
|
|
360
322
|
u(t) {
|
|
361
323
|
const { el: { content: s }, parts: i } = this._$AD, r = (t?.creationScope ?? D).importNode(s, !0);
|
|
362
324
|
O.currentNode = r;
|
|
363
|
-
let o = O.nextNode(), a = 0,
|
|
325
|
+
let o = O.nextNode(), a = 0, c = 0, n = i[0];
|
|
364
326
|
for (; n !== void 0; ) {
|
|
365
327
|
if (a === n.index) {
|
|
366
|
-
let
|
|
367
|
-
n.type === 2 ?
|
|
328
|
+
let h;
|
|
329
|
+
n.type === 2 ? h = new I(o, o.nextSibling, this, t) : n.type === 1 ? h = new n.ctor(o, n.name, n.strings, this, t) : n.type === 6 && (h = new Ft(o, this, t)), this._$AV.push(h), n = i[++c];
|
|
368
330
|
}
|
|
369
331
|
a !== n?.index && (o = O.nextNode(), a++);
|
|
370
332
|
}
|
|
@@ -375,12 +337,12 @@ let Kt = class {
|
|
|
375
337
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
|
|
376
338
|
}
|
|
377
339
|
};
|
|
378
|
-
class
|
|
340
|
+
class I {
|
|
379
341
|
get _$AU() {
|
|
380
342
|
return this._$AM?._$AU ?? this._$Cv;
|
|
381
343
|
}
|
|
382
344
|
constructor(t, s, i, r) {
|
|
383
|
-
this.type = 2, this._$AH =
|
|
345
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
384
346
|
}
|
|
385
347
|
get parentNode() {
|
|
386
348
|
let t = this._$AA.parentNode;
|
|
@@ -394,7 +356,7 @@ class q {
|
|
|
394
356
|
return this._$AB;
|
|
395
357
|
}
|
|
396
358
|
_$AI(t, s = this) {
|
|
397
|
-
t = R(this, t, s),
|
|
359
|
+
t = R(this, t, s), q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
|
|
398
360
|
}
|
|
399
361
|
O(t) {
|
|
400
362
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -403,25 +365,25 @@ class q {
|
|
|
403
365
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
404
366
|
}
|
|
405
367
|
_(t) {
|
|
406
|
-
this._$AH !==
|
|
368
|
+
this._$AH !== g && q(this._$AH) ? this._$AA.nextSibling.data = t : this.T(D.createTextNode(t)), this._$AH = t;
|
|
407
369
|
}
|
|
408
370
|
$(t) {
|
|
409
|
-
const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
371
|
+
const { values: s, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = B.createElement(_t(i.h, i.h[0]), this.options)), i);
|
|
410
372
|
if (this._$AH?._$AD === r) this._$AH.p(s);
|
|
411
373
|
else {
|
|
412
|
-
const o = new
|
|
374
|
+
const o = new Bt(r, this), a = o.u(this.options);
|
|
413
375
|
o.p(s), this.T(a), this._$AH = o;
|
|
414
376
|
}
|
|
415
377
|
}
|
|
416
378
|
_$AC(t) {
|
|
417
|
-
let s =
|
|
418
|
-
return s === void 0 &&
|
|
379
|
+
let s = gt.get(t.strings);
|
|
380
|
+
return s === void 0 && gt.set(t.strings, s = new B(t)), s;
|
|
419
381
|
}
|
|
420
382
|
k(t) {
|
|
421
383
|
et(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
384
|
const s = this._$AH;
|
|
423
385
|
let i, r = 0;
|
|
424
|
-
for (const o of t) r === s.length ? s.push(i = new
|
|
386
|
+
for (const o of t) r === s.length ? s.push(i = new I(this.O(j()), this.O(j()), this, this.options)) : i = s[r], i._$AI(o), r++;
|
|
425
387
|
r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
|
|
426
388
|
}
|
|
427
389
|
_$AR(t = this._$AA.nextSibling, s) {
|
|
@@ -442,53 +404,53 @@ class V {
|
|
|
442
404
|
return this._$AM._$AU;
|
|
443
405
|
}
|
|
444
406
|
constructor(t, s, i, r, o) {
|
|
445
|
-
this.type = 1, this._$AH =
|
|
407
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = s, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
|
|
446
408
|
}
|
|
447
409
|
_$AI(t, s = this, i, r) {
|
|
448
410
|
const o = this.strings;
|
|
449
411
|
let a = !1;
|
|
450
|
-
if (o === void 0) t = R(this, t, s, 0), a = !
|
|
412
|
+
if (o === void 0) t = R(this, t, s, 0), a = !q(t) || t !== this._$AH && t !== x, a && (this._$AH = t);
|
|
451
413
|
else {
|
|
452
|
-
const
|
|
453
|
-
let n,
|
|
454
|
-
for (t = o[0], n = 0; n < o.length - 1; n++)
|
|
414
|
+
const c = t;
|
|
415
|
+
let n, h;
|
|
416
|
+
for (t = o[0], n = 0; n < o.length - 1; n++) h = R(this, c[i + n], s, n), h === x && (h = this._$AH[n]), a ||= !q(h) || h !== this._$AH[n], h === g ? t = g : t !== g && (t += (h ?? "") + o[n + 1]), this._$AH[n] = h;
|
|
455
417
|
}
|
|
456
418
|
a && !r && this.j(t);
|
|
457
419
|
}
|
|
458
420
|
j(t) {
|
|
459
|
-
t ===
|
|
421
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
460
422
|
}
|
|
461
423
|
}
|
|
462
|
-
class
|
|
424
|
+
class zt extends V {
|
|
463
425
|
constructor() {
|
|
464
426
|
super(...arguments), this.type = 3;
|
|
465
427
|
}
|
|
466
428
|
j(t) {
|
|
467
|
-
this.element[this.name] = t ===
|
|
429
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
468
430
|
}
|
|
469
431
|
}
|
|
470
|
-
class
|
|
432
|
+
class Yt extends V {
|
|
471
433
|
constructor() {
|
|
472
434
|
super(...arguments), this.type = 4;
|
|
473
435
|
}
|
|
474
436
|
j(t) {
|
|
475
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
437
|
+
this.element.toggleAttribute(this.name, !!t && t !== g);
|
|
476
438
|
}
|
|
477
439
|
}
|
|
478
|
-
class
|
|
440
|
+
class Kt extends V {
|
|
479
441
|
constructor(t, s, i, r, o) {
|
|
480
442
|
super(t, s, i, r, o), this.type = 5;
|
|
481
443
|
}
|
|
482
444
|
_$AI(t, s = this) {
|
|
483
|
-
if ((t = R(this, t, s, 0) ??
|
|
484
|
-
const i = this._$AH, r = t ===
|
|
445
|
+
if ((t = R(this, t, s, 0) ?? g) === x) return;
|
|
446
|
+
const i = this._$AH, r = t === g && i !== g || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== g && (i === g || r);
|
|
485
447
|
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
486
448
|
}
|
|
487
449
|
handleEvent(t) {
|
|
488
450
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
489
451
|
}
|
|
490
452
|
}
|
|
491
|
-
class
|
|
453
|
+
class Ft {
|
|
492
454
|
constructor(t, s, i) {
|
|
493
455
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
|
|
494
456
|
}
|
|
@@ -499,10 +461,90 @@ class Gt {
|
|
|
499
461
|
R(this, t);
|
|
500
462
|
}
|
|
501
463
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
505
|
-
|
|
464
|
+
const Vt = { I }, Wt = tt.litHtmlPolyfillSupport;
|
|
465
|
+
Wt?.(B, I), (tt.litHtmlVersions ??= []).push("3.3.1");
|
|
466
|
+
const Gt = (e, t, s) => {
|
|
467
|
+
const i = s?.renderBefore ?? t;
|
|
468
|
+
let r = i._$litPart$;
|
|
469
|
+
if (r === void 0) {
|
|
470
|
+
const o = s?.renderBefore ?? null;
|
|
471
|
+
i._$litPart$ = r = new I(t.insertBefore(j(), o), o, void 0, s ?? {});
|
|
472
|
+
}
|
|
473
|
+
return r._$AI(e), r;
|
|
474
|
+
};
|
|
475
|
+
const st = globalThis;
|
|
476
|
+
let H = class extends U {
|
|
477
|
+
constructor() {
|
|
478
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
479
|
+
}
|
|
480
|
+
createRenderRoot() {
|
|
481
|
+
const t = super.createRenderRoot();
|
|
482
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
483
|
+
}
|
|
484
|
+
update(t) {
|
|
485
|
+
const s = this.render();
|
|
486
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Gt(s, this.renderRoot, this.renderOptions);
|
|
487
|
+
}
|
|
488
|
+
connectedCallback() {
|
|
489
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
490
|
+
}
|
|
491
|
+
disconnectedCallback() {
|
|
492
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
|
+
}
|
|
494
|
+
render() {
|
|
495
|
+
return x;
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
H._$litElement$ = !0, H.finalized = !0, st.litElementHydrateSupport?.({ LitElement: H });
|
|
499
|
+
const Jt = st.litElementPolyfillSupport;
|
|
500
|
+
Jt?.({ LitElement: H });
|
|
501
|
+
(st.litElementVersions ??= []).push("4.2.1");
|
|
502
|
+
const Zt = (e) => (t, s) => {
|
|
503
|
+
s !== void 0 ? s.addInitializer((() => {
|
|
504
|
+
customElements.define(e, t);
|
|
505
|
+
})) : customElements.define(e, t);
|
|
506
|
+
};
|
|
507
|
+
const Qt = { attribute: !0, type: String, converter: Y, reflect: !1, hasChanged: X }, Xt = (e = Qt, t, s) => {
|
|
508
|
+
const { kind: i, metadata: r } = s;
|
|
509
|
+
let o = globalThis.litPropertyMetadata.get(r);
|
|
510
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(s.name, e), i === "accessor") {
|
|
511
|
+
const { name: a } = s;
|
|
512
|
+
return { set(c) {
|
|
513
|
+
const n = t.get.call(this);
|
|
514
|
+
t.set.call(this, c), this.requestUpdate(a, n, e);
|
|
515
|
+
}, init(c) {
|
|
516
|
+
return c !== void 0 && this.C(a, void 0, e, c), c;
|
|
517
|
+
} };
|
|
518
|
+
}
|
|
519
|
+
if (i === "setter") {
|
|
520
|
+
const { name: a } = s;
|
|
521
|
+
return function(c) {
|
|
522
|
+
const n = this[a];
|
|
523
|
+
t.call(this, c), this.requestUpdate(a, n, e);
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
throw Error("Unsupported decorator location: " + i);
|
|
527
|
+
};
|
|
528
|
+
function S(e) {
|
|
529
|
+
return (t, s) => typeof s == "object" ? Xt(e, t, s) : ((i, r, o) => {
|
|
530
|
+
const a = r.hasOwnProperty(o);
|
|
531
|
+
return r.constructor.createProperty(o, i), a ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
532
|
+
})(e, t, s);
|
|
533
|
+
}
|
|
534
|
+
function b(e) {
|
|
535
|
+
return S({ ...e, state: !0, attribute: !1 });
|
|
536
|
+
}
|
|
537
|
+
const te = (e, t, s) => (s.configurable = !0, s.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, s), s);
|
|
538
|
+
function it(e, t) {
|
|
539
|
+
return (s, i, r) => {
|
|
540
|
+
const o = (a) => a.renderRoot?.querySelector(e) ?? null;
|
|
541
|
+
return te(s, i, { get() {
|
|
542
|
+
return o(this);
|
|
543
|
+
} });
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
const St = { ATTRIBUTE: 1, CHILD: 2 }, kt = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
547
|
+
class Ct {
|
|
506
548
|
constructor(t) {
|
|
507
549
|
}
|
|
508
550
|
get _$AU() {
|
|
@@ -518,9 +560,9 @@ class St {
|
|
|
518
560
|
return this.render(...s);
|
|
519
561
|
}
|
|
520
562
|
}
|
|
521
|
-
const
|
|
563
|
+
const mt = kt(class extends Ct {
|
|
522
564
|
constructor(e) {
|
|
523
|
-
if (super(e), e.type !==
|
|
565
|
+
if (super(e), e.type !== St.ATTRIBUTE || e.name !== "class" || e.strings?.length > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
524
566
|
}
|
|
525
567
|
render(e) {
|
|
526
568
|
return " " + Object.keys(e).filter(((t) => e[t])).join(" ") + " ";
|
|
@@ -537,82 +579,82 @@ const ut = _t(class extends St {
|
|
|
537
579
|
const r = !!t[i];
|
|
538
580
|
r === this.st.has(i) || this.nt?.has(i) || (r ? (s.add(i), this.st.add(i)) : (s.remove(i), this.st.delete(i)));
|
|
539
581
|
}
|
|
540
|
-
return
|
|
582
|
+
return x;
|
|
541
583
|
}
|
|
542
584
|
});
|
|
543
|
-
const { I:
|
|
585
|
+
const { I: ee } = Vt, ft = () => document.createComment(""), L = (e, t, s) => {
|
|
544
586
|
const i = e._$AA.parentNode, r = t === void 0 ? e._$AB : t._$AA;
|
|
545
587
|
if (s === void 0) {
|
|
546
|
-
const o = i.insertBefore(
|
|
547
|
-
s = new
|
|
588
|
+
const o = i.insertBefore(ft(), r), a = i.insertBefore(ft(), r);
|
|
589
|
+
s = new ee(o, a, e, e.options);
|
|
548
590
|
} else {
|
|
549
|
-
const o = s._$AB.nextSibling, a = s._$AM,
|
|
550
|
-
if (
|
|
591
|
+
const o = s._$AB.nextSibling, a = s._$AM, c = a !== e;
|
|
592
|
+
if (c) {
|
|
551
593
|
let n;
|
|
552
594
|
s._$AQ?.(e), s._$AM = e, s._$AP !== void 0 && (n = e._$AU) !== a._$AU && s._$AP(n);
|
|
553
595
|
}
|
|
554
|
-
if (o !== r ||
|
|
596
|
+
if (o !== r || c) {
|
|
555
597
|
let n = s._$AA;
|
|
556
598
|
for (; n !== o; ) {
|
|
557
|
-
const
|
|
558
|
-
i.insertBefore(n, r), n =
|
|
599
|
+
const h = n.nextSibling;
|
|
600
|
+
i.insertBefore(n, r), n = h;
|
|
559
601
|
}
|
|
560
602
|
}
|
|
561
603
|
}
|
|
562
604
|
return s;
|
|
563
|
-
}, P = (e, t, s = e) => (e._$AI(t, s), e),
|
|
605
|
+
}, P = (e, t, s = e) => (e._$AI(t, s), e), se = {}, ie = (e, t = se) => e._$AH = t, re = (e) => e._$AH, G = (e) => {
|
|
564
606
|
e._$AR(), e._$AA.remove();
|
|
565
607
|
};
|
|
566
|
-
const
|
|
608
|
+
const yt = (e, t, s) => {
|
|
567
609
|
const i = /* @__PURE__ */ new Map();
|
|
568
610
|
for (let r = t; r <= s; r++) i.set(e[r], r);
|
|
569
611
|
return i;
|
|
570
|
-
},
|
|
612
|
+
}, $t = kt(class extends Ct {
|
|
571
613
|
constructor(e) {
|
|
572
|
-
if (super(e), e.type !==
|
|
614
|
+
if (super(e), e.type !== St.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
573
615
|
}
|
|
574
616
|
dt(e, t, s) {
|
|
575
617
|
let i;
|
|
576
618
|
s === void 0 ? s = t : t !== void 0 && (i = t);
|
|
577
619
|
const r = [], o = [];
|
|
578
620
|
let a = 0;
|
|
579
|
-
for (const
|
|
621
|
+
for (const c of e) r[a] = i ? i(c, a) : a, o[a] = s(c, a), a++;
|
|
580
622
|
return { values: o, keys: r };
|
|
581
623
|
}
|
|
582
624
|
render(e, t, s) {
|
|
583
625
|
return this.dt(e, t, s).values;
|
|
584
626
|
}
|
|
585
627
|
update(e, [t, s, i]) {
|
|
586
|
-
const r =
|
|
628
|
+
const r = re(e), { values: o, keys: a } = this.dt(t, s, i);
|
|
587
629
|
if (!Array.isArray(r)) return this.ut = a, o;
|
|
588
|
-
const
|
|
589
|
-
let
|
|
590
|
-
for (; l <=
|
|
591
|
-
else if (r[
|
|
592
|
-
else if (
|
|
593
|
-
else if (
|
|
594
|
-
else if (
|
|
595
|
-
else if (
|
|
596
|
-
else if (
|
|
597
|
-
const v =
|
|
598
|
-
if (
|
|
630
|
+
const c = this.ut ??= [], n = [];
|
|
631
|
+
let h, d, l = 0, p = r.length - 1, u = 0, $ = o.length - 1;
|
|
632
|
+
for (; l <= p && u <= $; ) if (r[l] === null) l++;
|
|
633
|
+
else if (r[p] === null) p--;
|
|
634
|
+
else if (c[l] === a[u]) n[u] = P(r[l], o[u]), l++, u++;
|
|
635
|
+
else if (c[p] === a[$]) n[$] = P(r[p], o[$]), p--, $--;
|
|
636
|
+
else if (c[l] === a[$]) n[$] = P(r[l], o[$]), L(e, n[$ + 1], r[l]), l++, $--;
|
|
637
|
+
else if (c[p] === a[u]) n[u] = P(r[p], o[u]), L(e, r[l], r[p]), p--, u++;
|
|
638
|
+
else if (h === void 0 && (h = yt(a, u, $), d = yt(c, l, p)), h.has(c[l])) if (h.has(c[p])) {
|
|
639
|
+
const v = d.get(a[u]), A = v !== void 0 ? r[v] : null;
|
|
640
|
+
if (A === null) {
|
|
599
641
|
const w = L(e, r[l]);
|
|
600
642
|
P(w, o[u]), n[u] = w;
|
|
601
|
-
} else n[u] = P(
|
|
643
|
+
} else n[u] = P(A, o[u]), L(e, r[l], A), r[v] = null;
|
|
602
644
|
u++;
|
|
603
|
-
} else G(r[
|
|
645
|
+
} else G(r[p]), p--;
|
|
604
646
|
else G(r[l]), l++;
|
|
605
|
-
for (; u <=
|
|
606
|
-
const v = L(e, n[
|
|
647
|
+
for (; u <= $; ) {
|
|
648
|
+
const v = L(e, n[$ + 1]);
|
|
607
649
|
P(v, o[u]), n[u++] = v;
|
|
608
650
|
}
|
|
609
|
-
for (; l <=
|
|
651
|
+
for (; l <= p; ) {
|
|
610
652
|
const v = r[l++];
|
|
611
653
|
v !== null && G(v);
|
|
612
654
|
}
|
|
613
|
-
return this.ut = a,
|
|
655
|
+
return this.ut = a, ie(e, n), x;
|
|
614
656
|
}
|
|
615
|
-
}),
|
|
657
|
+
}), oe = ({
|
|
616
658
|
baseUrl: e
|
|
617
659
|
}) => {
|
|
618
660
|
const t = {
|
|
@@ -626,92 +668,92 @@ const mt = (e, t, s) => {
|
|
|
626
668
|
};
|
|
627
669
|
return {
|
|
628
670
|
login: async ({
|
|
629
|
-
email:
|
|
630
|
-
password:
|
|
671
|
+
email: h,
|
|
672
|
+
password: d,
|
|
631
673
|
accessToken: l,
|
|
632
|
-
refreshToken:
|
|
674
|
+
refreshToken: p,
|
|
633
675
|
idToken: u
|
|
634
676
|
}) => {
|
|
635
|
-
const
|
|
677
|
+
const $ = await fetch(`${e}${t.login}`, {
|
|
636
678
|
method: "POST",
|
|
637
679
|
headers: {
|
|
638
680
|
"Content-Type": "application/json"
|
|
639
681
|
},
|
|
640
682
|
body: JSON.stringify({
|
|
641
|
-
email:
|
|
642
|
-
password:
|
|
683
|
+
email: h,
|
|
684
|
+
password: d,
|
|
643
685
|
accessToken: l,
|
|
644
|
-
refreshToken:
|
|
686
|
+
refreshToken: p,
|
|
645
687
|
idToken: u
|
|
646
688
|
})
|
|
647
689
|
});
|
|
648
|
-
if (
|
|
649
|
-
const v = await
|
|
690
|
+
if (!$.ok) {
|
|
691
|
+
const v = await $.json();
|
|
650
692
|
throw new Error(v.message || v.error || "Login failed");
|
|
651
693
|
}
|
|
652
|
-
return
|
|
694
|
+
return $.json();
|
|
653
695
|
},
|
|
654
696
|
logout: async ({
|
|
655
|
-
accessToken:
|
|
656
|
-
refreshToken:
|
|
697
|
+
accessToken: h,
|
|
698
|
+
refreshToken: d,
|
|
657
699
|
authToken: l
|
|
658
700
|
}) => {
|
|
659
|
-
const
|
|
701
|
+
const p = await fetch(`${e}${t.logout}`, {
|
|
660
702
|
method: "POST",
|
|
661
703
|
headers: {
|
|
662
704
|
"Content-Type": "application/json",
|
|
663
705
|
Authorization: `Bearer ${l}`
|
|
664
706
|
},
|
|
665
707
|
body: JSON.stringify({
|
|
666
|
-
accessToken:
|
|
667
|
-
refreshToken:
|
|
708
|
+
accessToken: h,
|
|
709
|
+
refreshToken: d
|
|
668
710
|
})
|
|
669
711
|
});
|
|
670
|
-
if (!
|
|
671
|
-
const u = await
|
|
712
|
+
if (!p.ok) {
|
|
713
|
+
const u = await p.json();
|
|
672
714
|
throw new Error(u.message || u.error || "Logout failed");
|
|
673
715
|
}
|
|
674
|
-
return
|
|
716
|
+
return p.json();
|
|
675
717
|
},
|
|
676
|
-
refresh: async ({ refreshToken:
|
|
677
|
-
const
|
|
718
|
+
refresh: async ({ refreshToken: h }) => {
|
|
719
|
+
const d = await fetch(`${e}${t.refresh}`, {
|
|
678
720
|
method: "POST",
|
|
679
721
|
headers: {
|
|
680
722
|
"Content-Type": "application/json"
|
|
681
723
|
},
|
|
682
724
|
body: JSON.stringify({
|
|
683
|
-
refreshToken:
|
|
725
|
+
refreshToken: h
|
|
684
726
|
})
|
|
685
727
|
});
|
|
686
|
-
if (!
|
|
687
|
-
const l = await
|
|
728
|
+
if (!d.ok) {
|
|
729
|
+
const l = await d.json();
|
|
688
730
|
throw new Error(l.message || l.error || "Failed to refresh token");
|
|
689
731
|
}
|
|
690
|
-
return
|
|
732
|
+
return d.json();
|
|
691
733
|
},
|
|
692
|
-
requestRegisterOtp: async ({ email:
|
|
693
|
-
const
|
|
734
|
+
requestRegisterOtp: async ({ email: h }) => {
|
|
735
|
+
const d = await fetch(`${e}${t.requestRegisterOtp}`, {
|
|
694
736
|
method: "POST",
|
|
695
737
|
headers: {
|
|
696
738
|
"Content-Type": "application/json"
|
|
697
739
|
},
|
|
698
740
|
body: JSON.stringify({
|
|
699
|
-
email:
|
|
741
|
+
email: h
|
|
700
742
|
})
|
|
701
743
|
});
|
|
702
|
-
if (!
|
|
703
|
-
const l = await
|
|
744
|
+
if (!d.ok) {
|
|
745
|
+
const l = await d.json();
|
|
704
746
|
throw new Error(l.message || l.error || "Failed to request OTP");
|
|
705
747
|
}
|
|
706
|
-
return
|
|
748
|
+
return d.json();
|
|
707
749
|
},
|
|
708
750
|
register: async ({
|
|
709
|
-
email:
|
|
710
|
-
password:
|
|
751
|
+
email: h,
|
|
752
|
+
password: d,
|
|
711
753
|
phone_number: l,
|
|
712
|
-
family_name:
|
|
754
|
+
family_name: p,
|
|
713
755
|
given_name: u,
|
|
714
|
-
code:
|
|
756
|
+
code: $
|
|
715
757
|
}) => {
|
|
716
758
|
const v = await fetch(`${e}${t.register}`, {
|
|
717
759
|
method: "POST",
|
|
@@ -719,97 +761,97 @@ const mt = (e, t, s) => {
|
|
|
719
761
|
"Content-Type": "application/json"
|
|
720
762
|
},
|
|
721
763
|
body: JSON.stringify({
|
|
722
|
-
email:
|
|
723
|
-
password:
|
|
764
|
+
email: h,
|
|
765
|
+
password: d,
|
|
724
766
|
phone_number: l,
|
|
725
|
-
family_name:
|
|
767
|
+
family_name: p,
|
|
726
768
|
given_name: u,
|
|
727
|
-
code:
|
|
769
|
+
code: $
|
|
728
770
|
})
|
|
729
771
|
});
|
|
730
772
|
if (!v.ok) {
|
|
731
|
-
const
|
|
732
|
-
throw new Error(
|
|
773
|
+
const A = await v.json();
|
|
774
|
+
throw new Error(A.message || A.error || "Registration failed");
|
|
733
775
|
}
|
|
734
776
|
return v.json();
|
|
735
777
|
},
|
|
736
|
-
requestResetPassword: async ({ email:
|
|
737
|
-
const
|
|
778
|
+
requestResetPassword: async ({ email: h }) => {
|
|
779
|
+
const d = await fetch(`${e}${t.requestResetPassword}`, {
|
|
738
780
|
method: "POST",
|
|
739
781
|
headers: {
|
|
740
782
|
"Content-Type": "application/json"
|
|
741
783
|
},
|
|
742
784
|
body: JSON.stringify({
|
|
743
|
-
email:
|
|
785
|
+
email: h
|
|
744
786
|
})
|
|
745
787
|
});
|
|
746
|
-
if (!
|
|
747
|
-
const l = await
|
|
788
|
+
if (!d.ok) {
|
|
789
|
+
const l = await d.json();
|
|
748
790
|
throw new Error(l.message || l.error || "Failed to request password reset");
|
|
749
791
|
}
|
|
750
|
-
return
|
|
792
|
+
return d.json();
|
|
751
793
|
},
|
|
752
794
|
resetPassword: async ({
|
|
753
|
-
email:
|
|
754
|
-
otp:
|
|
795
|
+
email: h,
|
|
796
|
+
otp: d,
|
|
755
797
|
newPassword: l
|
|
756
798
|
}) => {
|
|
757
|
-
const
|
|
799
|
+
const p = await fetch(`${e}${t.resetPassword}`, {
|
|
758
800
|
method: "POST",
|
|
759
801
|
headers: {
|
|
760
802
|
"Content-Type": "application/json"
|
|
761
803
|
},
|
|
762
804
|
body: JSON.stringify({
|
|
763
|
-
email:
|
|
764
|
-
otp:
|
|
805
|
+
email: h,
|
|
806
|
+
otp: d,
|
|
765
807
|
newPassword: l
|
|
766
808
|
})
|
|
767
809
|
});
|
|
768
|
-
if (!
|
|
769
|
-
const u = await
|
|
810
|
+
if (!p.ok) {
|
|
811
|
+
const u = await p.json();
|
|
770
812
|
throw new Error(u.message || u.error || "Failed to reset password");
|
|
771
813
|
}
|
|
772
|
-
return
|
|
814
|
+
return p.json();
|
|
773
815
|
}
|
|
774
816
|
};
|
|
775
817
|
}, J = {
|
|
776
818
|
AUTH_TOKEN: "authToken",
|
|
777
819
|
ACCESS_TOKEN: "accessToken",
|
|
778
820
|
REFRESH_TOKEN: "refreshToken"
|
|
779
|
-
},
|
|
821
|
+
}, ae = {
|
|
780
822
|
maxAge: 3600 * 24 * 7,
|
|
781
823
|
// 7 days
|
|
782
824
|
secure: !0,
|
|
783
825
|
sameSite: "lax",
|
|
784
826
|
path: "/"
|
|
785
|
-
},
|
|
786
|
-
const e = (n,
|
|
827
|
+
}, ne = () => {
|
|
828
|
+
const e = (n, h, d = {}) => {
|
|
787
829
|
const {
|
|
788
830
|
maxAge: l,
|
|
789
|
-
path:
|
|
831
|
+
path: p = "/",
|
|
790
832
|
secure: u = window.location.protocol === "https:",
|
|
791
|
-
sameSite:
|
|
833
|
+
sameSite: $ = "lax",
|
|
792
834
|
domain: v
|
|
793
|
-
} =
|
|
794
|
-
let
|
|
795
|
-
l !== void 0 && (
|
|
835
|
+
} = d;
|
|
836
|
+
let A = `${encodeURIComponent(n)}=${encodeURIComponent(h)}`;
|
|
837
|
+
l !== void 0 && (A += `; Max-Age=${l}`), A += `; Path=${p}`, u && (A += "; Secure"), A += `; SameSite=${$}`, v && (A += `; Domain=${v}`), document.cookie = A;
|
|
796
838
|
}, t = (n) => {
|
|
797
|
-
const
|
|
798
|
-
for (let l = 0; l <
|
|
799
|
-
let
|
|
800
|
-
for (;
|
|
801
|
-
|
|
802
|
-
if (
|
|
803
|
-
return decodeURIComponent(
|
|
839
|
+
const h = encodeURIComponent(n) + "=", d = document.cookie.split(";");
|
|
840
|
+
for (let l = 0; l < d.length; l++) {
|
|
841
|
+
let p = d[l];
|
|
842
|
+
for (; p.charAt(0) === " "; )
|
|
843
|
+
p = p.substring(1);
|
|
844
|
+
if (p.indexOf(h) === 0)
|
|
845
|
+
return decodeURIComponent(p.substring(h.length));
|
|
804
846
|
}
|
|
805
847
|
return null;
|
|
806
|
-
}, s = (n,
|
|
848
|
+
}, s = (n, h = {}) => {
|
|
807
849
|
e(n, "", {
|
|
808
|
-
...
|
|
850
|
+
...h,
|
|
809
851
|
maxAge: -1
|
|
810
852
|
});
|
|
811
|
-
}, i = (n) => t(n) !== null, r = (n,
|
|
812
|
-
e(J[n],
|
|
853
|
+
}, i = (n) => t(n) !== null, r = (n, h) => {
|
|
854
|
+
e(J[n], h, ae);
|
|
813
855
|
}, o = (n) => t(J[n]), a = (n) => {
|
|
814
856
|
s(J[n]);
|
|
815
857
|
};
|
|
@@ -825,11 +867,11 @@ const mt = (e, t, s) => {
|
|
|
825
867
|
a("AUTH_TOKEN"), a("ACCESS_TOKEN"), a("REFRESH_TOKEN");
|
|
826
868
|
}
|
|
827
869
|
};
|
|
828
|
-
},
|
|
870
|
+
}, le = ["code", "state", "error", "error_description"], he = (e) => {
|
|
829
871
|
if (e) return e;
|
|
830
872
|
const t = new URL(window.location.href);
|
|
831
|
-
return
|
|
832
|
-
},
|
|
873
|
+
return le.forEach((s) => t.searchParams.delete(s)), t.toString();
|
|
874
|
+
}, ce = ({
|
|
833
875
|
domain: e,
|
|
834
876
|
cognitoRegion: t,
|
|
835
877
|
userPoolId: s,
|
|
@@ -839,53 +881,53 @@ const mt = (e, t, s) => {
|
|
|
839
881
|
const o = {
|
|
840
882
|
domain: e,
|
|
841
883
|
clientId: i,
|
|
842
|
-
redirectUri:
|
|
884
|
+
redirectUri: he(r)
|
|
843
885
|
}, a = (w) => {
|
|
844
|
-
const
|
|
845
|
-
return crypto.getRandomValues(
|
|
846
|
-
},
|
|
847
|
-
const
|
|
886
|
+
const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", k = new Uint8Array(w);
|
|
887
|
+
return crypto.getRandomValues(k), Array.from(k).map((E) => _[E % _.length]).join("");
|
|
888
|
+
}, c = async (w) => {
|
|
889
|
+
const k = new TextEncoder().encode(w), E = await crypto.subtle.digest("SHA-256", k);
|
|
848
890
|
return btoa(String.fromCharCode(...new Uint8Array(E))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
849
891
|
}, n = async () => {
|
|
850
|
-
const w = a(128),
|
|
851
|
-
return sessionStorage.setItem("pkce_code_verifier", w), { codeVerifier: w, codeChallenge:
|
|
852
|
-
},
|
|
892
|
+
const w = a(128), _ = await c(w);
|
|
893
|
+
return sessionStorage.setItem("pkce_code_verifier", w), { codeVerifier: w, codeChallenge: _ };
|
|
894
|
+
}, h = () => {
|
|
853
895
|
const w = a(32);
|
|
854
896
|
return sessionStorage.setItem("oauth_state", w), w;
|
|
855
|
-
},
|
|
856
|
-
const { codeChallenge: w } = await n(),
|
|
897
|
+
}, d = async () => {
|
|
898
|
+
const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
|
|
857
899
|
response_type: "code",
|
|
858
900
|
client_id: o.clientId,
|
|
859
901
|
redirect_uri: o.redirectUri,
|
|
860
902
|
identity_provider: "Google",
|
|
861
903
|
scope: "openid email profile",
|
|
862
|
-
state:
|
|
904
|
+
state: _,
|
|
863
905
|
code_challenge_method: "S256",
|
|
864
906
|
code_challenge: w,
|
|
865
907
|
prompt: "select_account"
|
|
866
908
|
});
|
|
867
|
-
return `${o.domain}/oauth2/authorize?${
|
|
909
|
+
return `${o.domain}/oauth2/authorize?${k.toString()}`;
|
|
868
910
|
}, l = async () => {
|
|
869
|
-
const w = await
|
|
911
|
+
const w = await d();
|
|
870
912
|
window.location.href = w;
|
|
871
|
-
},
|
|
872
|
-
const { codeChallenge: w } = await n(),
|
|
913
|
+
}, p = async () => {
|
|
914
|
+
const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
|
|
873
915
|
response_type: "code",
|
|
874
916
|
client_id: o.clientId,
|
|
875
917
|
redirect_uri: o.redirectUri,
|
|
876
918
|
identity_provider: "SignInWithApple",
|
|
877
919
|
scope: "openid email profile",
|
|
878
|
-
state:
|
|
920
|
+
state: _,
|
|
879
921
|
code_challenge_method: "S256",
|
|
880
922
|
code_challenge: w
|
|
881
923
|
});
|
|
882
|
-
return `${o.domain}/oauth2/authorize?${
|
|
924
|
+
return `${o.domain}/oauth2/authorize?${k.toString()}`;
|
|
883
925
|
}, u = async () => {
|
|
884
|
-
const w = await
|
|
926
|
+
const w = await p();
|
|
885
927
|
window.location.href = w;
|
|
886
|
-
},
|
|
887
|
-
const
|
|
888
|
-
return sessionStorage.removeItem("oauth_state"),
|
|
928
|
+
}, $ = (w) => {
|
|
929
|
+
const _ = sessionStorage.getItem("oauth_state");
|
|
930
|
+
return sessionStorage.removeItem("oauth_state"), _ === w;
|
|
889
931
|
}, v = () => {
|
|
890
932
|
const w = sessionStorage.getItem("pkce_code_verifier");
|
|
891
933
|
return sessionStorage.removeItem("pkce_code_verifier"), w;
|
|
@@ -893,33 +935,33 @@ const mt = (e, t, s) => {
|
|
|
893
935
|
return {
|
|
894
936
|
redirectToGoogleAuth: l,
|
|
895
937
|
redirectToAppleAuth: u,
|
|
896
|
-
validateState:
|
|
938
|
+
validateState: $,
|
|
897
939
|
getCodeVerifier: v,
|
|
898
940
|
exchangeCodeForTokens: async (w) => {
|
|
899
|
-
const
|
|
900
|
-
if (!
|
|
941
|
+
const _ = v();
|
|
942
|
+
if (!_)
|
|
901
943
|
throw new Error("PKCE code verifier not found. Please restart the authentication flow.");
|
|
902
|
-
const
|
|
944
|
+
const k = new URLSearchParams({
|
|
903
945
|
grant_type: "authorization_code",
|
|
904
946
|
client_id: o.clientId,
|
|
905
947
|
code: w,
|
|
906
948
|
redirect_uri: o.redirectUri,
|
|
907
|
-
code_verifier:
|
|
949
|
+
code_verifier: _
|
|
908
950
|
}), E = await fetch(`${o.domain}/oauth2/token`, {
|
|
909
951
|
method: "POST",
|
|
910
952
|
headers: {
|
|
911
953
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
912
954
|
},
|
|
913
|
-
body:
|
|
955
|
+
body: k.toString()
|
|
914
956
|
});
|
|
915
957
|
if (!E.ok) {
|
|
916
|
-
const
|
|
917
|
-
throw new Error(`Token exchange failed: ${
|
|
958
|
+
const rt = await E.text();
|
|
959
|
+
throw new Error(`Token exchange failed: ${rt}`);
|
|
918
960
|
}
|
|
919
961
|
return E.json();
|
|
920
962
|
}
|
|
921
963
|
};
|
|
922
|
-
},
|
|
964
|
+
}, de = () => Et`
|
|
923
965
|
:host {
|
|
924
966
|
display: inline-block;
|
|
925
967
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
@@ -1419,15 +1461,25 @@ const mt = (e, t, s) => {
|
|
|
1419
1461
|
transition: none !important;
|
|
1420
1462
|
}
|
|
1421
1463
|
}`;
|
|
1422
|
-
var
|
|
1423
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1464
|
+
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, y = (e, t, s, i) => {
|
|
1465
|
+
for (var r = i > 1 ? void 0 : i ? ue(t, s) : t, o = e.length - 1, a; o >= 0; o--)
|
|
1424
1466
|
(a = e[o]) && (r = (i ? a(t, s, r) : a(r)) || r);
|
|
1425
|
-
return i && r &&
|
|
1467
|
+
return i && r && pe(t, s, r), r;
|
|
1426
1468
|
};
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1469
|
+
const ge = [
|
|
1470
|
+
"code",
|
|
1471
|
+
"state",
|
|
1472
|
+
"error",
|
|
1473
|
+
"error_description",
|
|
1474
|
+
"access_token",
|
|
1475
|
+
"id_token",
|
|
1476
|
+
"refresh_token",
|
|
1477
|
+
"token_type",
|
|
1478
|
+
"expires_in"
|
|
1479
|
+
];
|
|
1480
|
+
let m = class extends H {
|
|
1429
1481
|
constructor() {
|
|
1430
|
-
super(...arguments), this.open = !1, this.initialMode = "signin", this.logoUrl = "", this.baseUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.size = "sm", this.theme = "light", this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isClosing = !1, this.isVisible = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.lastDragEndTime = 0, this.cookies =
|
|
1482
|
+
super(...arguments), this.open = !1, this.initialMode = "signin", this.logoUrl = "", this.baseUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.oauthSpaDomain = "", this.size = "sm", this.theme = "light", this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isClosing = !1, this.isVisible = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.lastDragEndTime = 0, this.cookies = ne(), this.scrollPosition = 0, this.transitionDuration = 300, this.hasHandledOAuthCallback = !1, this.boundKeyHandler = (e) => {
|
|
1431
1483
|
e.key === "Escape" && this.isVisible && this.handleClose();
|
|
1432
1484
|
}, this.baseUrlErrorMessage = "Authentication service is not configured correctly. Please add an API domain or contact support.", this.handleClose = () => {
|
|
1433
1485
|
this.isClosing || !this.isVisible || (this.cleanupInlineStyles(), this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.isClosing = !0, setTimeout(() => {
|
|
@@ -1451,9 +1503,9 @@ let g = class extends Ct {
|
|
|
1451
1503
|
e > 5 && (this.lastDragEndTime = Date.now());
|
|
1452
1504
|
const t = Date.now() - this.dragStartTime, s = e / t, i = this.modalContainer.offsetHeight, r = Math.max(150, i * 0.3), a = e > r || s > 0.5;
|
|
1453
1505
|
this.isDragging = !1;
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
-
|
|
1506
|
+
const c = this.modalContainer, n = a ? i + i * 0.1 : 0;
|
|
1507
|
+
c.style.transition = "none", c.style.transform = `translateY(${e}px)`, requestAnimationFrame(() => {
|
|
1508
|
+
c.style.transition = `transform ${this.transitionDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`, c.style.transform = `translateY(${n}px)`;
|
|
1457
1509
|
}), setTimeout(() => {
|
|
1458
1510
|
this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, a ? (this.isVisible = !1, this.open = !1) : this.modalContainer && (this.modalContainer.style.transition = "", this.modalContainer.style.transform = "");
|
|
1459
1511
|
}, this.transitionDuration);
|
|
@@ -1477,7 +1529,7 @@ let g = class extends Ct {
|
|
|
1477
1529
|
getApiService() {
|
|
1478
1530
|
if (!this.hasApiBaseUrl())
|
|
1479
1531
|
throw new Error("API domain is not set");
|
|
1480
|
-
return this.apiService || (this.apiService =
|
|
1532
|
+
return this.apiService || (this.apiService = oe({
|
|
1481
1533
|
baseUrl: this.getNormalizedBaseUrl()
|
|
1482
1534
|
})), this.apiService;
|
|
1483
1535
|
}
|
|
@@ -1630,7 +1682,7 @@ let g = class extends Ct {
|
|
|
1630
1682
|
return null;
|
|
1631
1683
|
if (!this.oauthService) {
|
|
1632
1684
|
const e = this.oauthRedirectUri?.trim() ? this.oauthRedirectUri.trim() : void 0;
|
|
1633
|
-
this.oauthService =
|
|
1685
|
+
this.oauthService = ce({
|
|
1634
1686
|
domain: this.oauthDomain.trim(),
|
|
1635
1687
|
cognitoRegion: this.oauthRegion.trim(),
|
|
1636
1688
|
userPoolId: this.oauthUserPoolId.trim(),
|
|
@@ -1643,7 +1695,7 @@ let g = class extends Ct {
|
|
|
1643
1695
|
stripOAuthParamsFromUrl() {
|
|
1644
1696
|
const e = new URL(window.location.href);
|
|
1645
1697
|
let t = !1;
|
|
1646
|
-
for (const s of
|
|
1698
|
+
for (const s of ge)
|
|
1647
1699
|
e.searchParams.has(s) && (e.searchParams.delete(s), t = !0);
|
|
1648
1700
|
if (t) {
|
|
1649
1701
|
const s = e.searchParams.toString(), i = `${e.pathname}${s ? `?${s}` : ""}${e.hash}`;
|
|
@@ -1651,31 +1703,41 @@ let g = class extends Ct {
|
|
|
1651
1703
|
}
|
|
1652
1704
|
}
|
|
1653
1705
|
async handleOAuthCallbackIfPresent() {
|
|
1654
|
-
const e = new URLSearchParams(window.location.search), t = e.get("
|
|
1655
|
-
if (
|
|
1706
|
+
const e = new URLSearchParams(window.location.search), t = e.get("access_token"), s = e.get("id_token"), i = e.get("refresh_token"), r = e.get("code"), o = e.get("state"), a = e.get("error"), c = e.get("error_description");
|
|
1707
|
+
if ((t || s || r || a) && !this.hasHandledOAuthCallback) {
|
|
1656
1708
|
if (!this.hasApiBaseUrl()) {
|
|
1657
1709
|
this.error = this.baseUrlErrorMessage;
|
|
1658
1710
|
return;
|
|
1659
1711
|
}
|
|
1660
1712
|
this.hasHandledOAuthCallback = !0, this.isLoading = !0, this.error = "";
|
|
1661
1713
|
try {
|
|
1662
|
-
if (
|
|
1663
|
-
throw new Error(
|
|
1664
|
-
if (
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1714
|
+
if (a)
|
|
1715
|
+
throw new Error(c || `OAuth error: ${a}`);
|
|
1716
|
+
if (t && s && i) {
|
|
1717
|
+
const { accessToken: h, idToken: d, refreshToken: l } = await this.getApiService().login({
|
|
1718
|
+
accessToken: t,
|
|
1719
|
+
refreshToken: i,
|
|
1720
|
+
idToken: s
|
|
1721
|
+
});
|
|
1722
|
+
this.setAuthTokens(h, d, l ?? i);
|
|
1723
|
+
} else if (r && o) {
|
|
1724
|
+
if (!this.isOAuthConfigured())
|
|
1725
|
+
throw new Error("OAuth is not configured correctly. Please try again later.");
|
|
1726
|
+
const h = this.getOAuthService();
|
|
1727
|
+
if (!h)
|
|
1728
|
+
throw new Error("OAuth is not configured correctly. Please try again later.");
|
|
1729
|
+
if (!h.validateState(o))
|
|
1730
|
+
throw new Error("Invalid state parameter. Please try signing in again.");
|
|
1731
|
+
const d = await h.exchangeCodeForTokens(r), { accessToken: l, idToken: p, refreshToken: u } = await this.getApiService().login({
|
|
1732
|
+
accessToken: d.access_token,
|
|
1733
|
+
refreshToken: d.refresh_token,
|
|
1734
|
+
idToken: d.id_token
|
|
1735
|
+
});
|
|
1736
|
+
this.setAuthTokens(l, p, u ?? d.refresh_token);
|
|
1737
|
+
} else
|
|
1738
|
+
throw new Error("Missing required OAuth parameters");
|
|
1739
|
+
} catch (h) {
|
|
1740
|
+
this.error = h.message || "An unexpected error occurred during authentication";
|
|
1679
1741
|
} finally {
|
|
1680
1742
|
this.stripOAuthParamsFromUrl(), this.isLoading = !1;
|
|
1681
1743
|
}
|
|
@@ -1747,10 +1809,18 @@ let g = class extends Ct {
|
|
|
1747
1809
|
}
|
|
1748
1810
|
// OAuth handlers
|
|
1749
1811
|
handleGoogleSignIn() {
|
|
1750
|
-
this.
|
|
1812
|
+
this.handleOAuthSignIn("google");
|
|
1751
1813
|
}
|
|
1752
1814
|
handleAppleSignIn() {
|
|
1753
|
-
this.
|
|
1815
|
+
this.handleOAuthSignIn("apple");
|
|
1816
|
+
}
|
|
1817
|
+
handleOAuthSignIn(e) {
|
|
1818
|
+
if (this.oauthSpaDomain?.trim()) {
|
|
1819
|
+
const t = this.oauthSpaDomain.trim(), s = t.startsWith("http://") || t.startsWith("https://") ? t : `https://${t}`, i = s.endsWith("/") ? s.slice(0, -1) : s, r = window.location.href, o = `${i}?return_url=${encodeURIComponent(r)}&provider=${e}`;
|
|
1820
|
+
window.location.href = o;
|
|
1821
|
+
return;
|
|
1822
|
+
}
|
|
1823
|
+
e === "google" ? this.getOAuthService()?.redirectToGoogleAuth() : this.getOAuthService()?.redirectToAppleAuth();
|
|
1754
1824
|
}
|
|
1755
1825
|
// OTP input handlers
|
|
1756
1826
|
handleOtpInput(e, t, s) {
|
|
@@ -1817,7 +1887,7 @@ let g = class extends Ct {
|
|
|
1817
1887
|
}
|
|
1818
1888
|
render() {
|
|
1819
1889
|
if (!this.isVisible)
|
|
1820
|
-
return
|
|
1890
|
+
return g;
|
|
1821
1891
|
const e = {
|
|
1822
1892
|
"modal-overlay": !0,
|
|
1823
1893
|
"modal-overlay--closing": this.isClosing
|
|
@@ -1828,10 +1898,10 @@ let g = class extends Ct {
|
|
|
1828
1898
|
"modal-container--dragging": this.isDragging,
|
|
1829
1899
|
[`modal-container--${this.size}`]: !0
|
|
1830
1900
|
};
|
|
1831
|
-
return
|
|
1901
|
+
return f`
|
|
1832
1902
|
<!-- Modal/Drawer -->
|
|
1833
1903
|
<div
|
|
1834
|
-
class=${
|
|
1904
|
+
class=${mt(e)}
|
|
1835
1905
|
@click=${this.handleOverlayClick}
|
|
1836
1906
|
@touchstart=${this.handleDragStart}
|
|
1837
1907
|
@touchmove=${this.handleDragMove}
|
|
@@ -1839,7 +1909,7 @@ let g = class extends Ct {
|
|
|
1839
1909
|
@mousedown=${this.handleDragStart}
|
|
1840
1910
|
>
|
|
1841
1911
|
<div
|
|
1842
|
-
class=${
|
|
1912
|
+
class=${mt(t)}
|
|
1843
1913
|
@click=${(s) => s.stopPropagation()}
|
|
1844
1914
|
role="dialog"
|
|
1845
1915
|
aria-modal="true"
|
|
@@ -1868,8 +1938,8 @@ let g = class extends Ct {
|
|
|
1868
1938
|
renderContent() {
|
|
1869
1939
|
if (!this.hasApiBaseUrl()) {
|
|
1870
1940
|
const e = this.baseUrlErrorMessage;
|
|
1871
|
-
return
|
|
1872
|
-
${this.logoUrl.length > 0 ?
|
|
1941
|
+
return f`
|
|
1942
|
+
${this.logoUrl.length > 0 ? f`
|
|
1873
1943
|
<header class="modal-header">
|
|
1874
1944
|
<div class="auth-header">
|
|
1875
1945
|
<img
|
|
@@ -1881,7 +1951,7 @@ let g = class extends Ct {
|
|
|
1881
1951
|
/>
|
|
1882
1952
|
</div>
|
|
1883
1953
|
</header>
|
|
1884
|
-
` :
|
|
1954
|
+
` : g}
|
|
1885
1955
|
|
|
1886
1956
|
<div class="modal-body">
|
|
1887
1957
|
<div class="auth-form">
|
|
@@ -1892,9 +1962,9 @@ let g = class extends Ct {
|
|
|
1892
1962
|
</div>
|
|
1893
1963
|
`;
|
|
1894
1964
|
}
|
|
1895
|
-
return this.isLoggedIn ?
|
|
1965
|
+
return this.isLoggedIn ? f`
|
|
1896
1966
|
<!-- Header -->
|
|
1897
|
-
${this.logoUrl.length > 0 ?
|
|
1967
|
+
${this.logoUrl.length > 0 ? f`
|
|
1898
1968
|
<header class="modal-header">
|
|
1899
1969
|
<div class="auth-header">
|
|
1900
1970
|
<img
|
|
@@ -1906,7 +1976,7 @@ let g = class extends Ct {
|
|
|
1906
1976
|
/>
|
|
1907
1977
|
</div>
|
|
1908
1978
|
</header>
|
|
1909
|
-
` :
|
|
1979
|
+
` : g}
|
|
1910
1980
|
|
|
1911
1981
|
<!-- Body -->
|
|
1912
1982
|
<div class="modal-body">
|
|
@@ -1917,9 +1987,9 @@ let g = class extends Ct {
|
|
|
1917
1987
|
${this.renderAlerts()}
|
|
1918
1988
|
</div>
|
|
1919
1989
|
</div>
|
|
1920
|
-
` :
|
|
1990
|
+
` : f`
|
|
1921
1991
|
<!-- Header -->
|
|
1922
|
-
${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ?
|
|
1992
|
+
${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? f`
|
|
1923
1993
|
<header class="modal-header">
|
|
1924
1994
|
|
|
1925
1995
|
<div class="auth-header">
|
|
@@ -1932,7 +2002,7 @@ let g = class extends Ct {
|
|
|
1932
2002
|
/>
|
|
1933
2003
|
</div>
|
|
1934
2004
|
</header>
|
|
1935
|
-
` :
|
|
2005
|
+
` : g}
|
|
1936
2006
|
|
|
1937
2007
|
<!-- Body -->
|
|
1938
2008
|
<div class="modal-body">
|
|
@@ -1953,7 +2023,7 @@ let g = class extends Ct {
|
|
|
1953
2023
|
}
|
|
1954
2024
|
renderFormContent() {
|
|
1955
2025
|
if (this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form"))
|
|
1956
|
-
return
|
|
2026
|
+
return f`
|
|
1957
2027
|
<!-- Email -->
|
|
1958
2028
|
<label class="field">
|
|
1959
2029
|
<span class="field-label">Email Address</span>
|
|
@@ -1967,7 +2037,7 @@ let g = class extends Ct {
|
|
|
1967
2037
|
required
|
|
1968
2038
|
autocomplete="email"
|
|
1969
2039
|
/>
|
|
1970
|
-
${this.errors.email ?
|
|
2040
|
+
${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
|
|
1971
2041
|
</label>
|
|
1972
2042
|
|
|
1973
2043
|
<!-- Password -->
|
|
@@ -1982,18 +2052,18 @@ let g = class extends Ct {
|
|
|
1982
2052
|
required
|
|
1983
2053
|
autocomplete=${this.mode === "signup" ? "new-password" : "current-password"}
|
|
1984
2054
|
/>
|
|
1985
|
-
${this.errors.password ?
|
|
2055
|
+
${this.errors.password ? f`<span class="field-error">${this.errors.password}</span>` : g}
|
|
1986
2056
|
</label>
|
|
1987
2057
|
|
|
1988
|
-
${this.mode === "signin" && this.error ?
|
|
2058
|
+
${this.mode === "signin" && this.error ? f`
|
|
1989
2059
|
<div class="forgot-row">
|
|
1990
2060
|
<button type="button" class="text-btn" @click=${this.startReset}>
|
|
1991
2061
|
Forgot your password?
|
|
1992
2062
|
</button>
|
|
1993
2063
|
</div>
|
|
1994
|
-
` :
|
|
2064
|
+
` : g}
|
|
1995
2065
|
|
|
1996
|
-
${this.mode === "signup" ?
|
|
2066
|
+
${this.mode === "signup" ? f`
|
|
1997
2067
|
<!-- Confirm Password -->
|
|
1998
2068
|
<label class="field">
|
|
1999
2069
|
<span class="field-label">Confirm Password</span>
|
|
@@ -2006,7 +2076,7 @@ let g = class extends Ct {
|
|
|
2006
2076
|
required
|
|
2007
2077
|
autocomplete="new-password"
|
|
2008
2078
|
/>
|
|
2009
|
-
${this.errors.confirm_password ?
|
|
2079
|
+
${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
|
|
2010
2080
|
</label>
|
|
2011
2081
|
|
|
2012
2082
|
<!-- First Name -->
|
|
@@ -2021,7 +2091,7 @@ let g = class extends Ct {
|
|
|
2021
2091
|
required
|
|
2022
2092
|
autocomplete="given-name"
|
|
2023
2093
|
/>
|
|
2024
|
-
${this.errors.givenName ?
|
|
2094
|
+
${this.errors.givenName ? f`<span class="field-error">${this.errors.givenName}</span>` : g}
|
|
2025
2095
|
</label>
|
|
2026
2096
|
|
|
2027
2097
|
<!-- Last Name -->
|
|
@@ -2036,19 +2106,19 @@ let g = class extends Ct {
|
|
|
2036
2106
|
required
|
|
2037
2107
|
autocomplete="family-name"
|
|
2038
2108
|
/>
|
|
2039
|
-
${this.errors.familyName ?
|
|
2109
|
+
${this.errors.familyName ? f`<span class="field-error">${this.errors.familyName}</span>` : g}
|
|
2040
2110
|
</label>
|
|
2041
|
-
` :
|
|
2111
|
+
` : g}
|
|
2042
2112
|
`;
|
|
2043
2113
|
if (this.mode === "signup" && this.signupStep === "otp")
|
|
2044
|
-
return
|
|
2114
|
+
return f`
|
|
2045
2115
|
<div class="otp-section">
|
|
2046
2116
|
<label class="otp-label">Enter 6-digit code</label>
|
|
2047
2117
|
<div class="otp-inputs" role="group" aria-label="One time code">
|
|
2048
|
-
${
|
|
2118
|
+
${$t(
|
|
2049
2119
|
Array.from({ length: 6 }, (e, t) => t),
|
|
2050
2120
|
(e) => e,
|
|
2051
|
-
(e) =>
|
|
2121
|
+
(e) => f`
|
|
2052
2122
|
<input
|
|
2053
2123
|
class="otp-input signup-otp-input ${this.errors.signup_otp ? "otp-input--error" : ""}"
|
|
2054
2124
|
type="text"
|
|
@@ -2065,7 +2135,7 @@ let g = class extends Ct {
|
|
|
2065
2135
|
`
|
|
2066
2136
|
)}
|
|
2067
2137
|
</div>
|
|
2068
|
-
${this.errors.signup_otp ?
|
|
2138
|
+
${this.errors.signup_otp ? f`<p class="otp-error">${this.errors.signup_otp}</p>` : g}
|
|
2069
2139
|
</div>
|
|
2070
2140
|
<div class="forgot-row">
|
|
2071
2141
|
<button type="button" class="text-btn" @click=${this.backToSignupForm}>
|
|
@@ -2074,7 +2144,7 @@ let g = class extends Ct {
|
|
|
2074
2144
|
</div>
|
|
2075
2145
|
`;
|
|
2076
2146
|
if (this.resetStep === "request")
|
|
2077
|
-
return
|
|
2147
|
+
return f`
|
|
2078
2148
|
<label class="field">
|
|
2079
2149
|
<span class="field-label">Email Address</span>
|
|
2080
2150
|
<input
|
|
@@ -2087,7 +2157,7 @@ let g = class extends Ct {
|
|
|
2087
2157
|
required
|
|
2088
2158
|
autocomplete="email"
|
|
2089
2159
|
/>
|
|
2090
|
-
${this.errors.email ?
|
|
2160
|
+
${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
|
|
2091
2161
|
</label>
|
|
2092
2162
|
<div class="forgot-row">
|
|
2093
2163
|
<button type="button" class="text-btn" @click=${this.cancelReset}>
|
|
@@ -2097,7 +2167,7 @@ let g = class extends Ct {
|
|
|
2097
2167
|
`;
|
|
2098
2168
|
if (this.resetStep === "confirm") {
|
|
2099
2169
|
const e = this.otpDigits.every((t) => /^\d$/.test(t));
|
|
2100
|
-
return
|
|
2170
|
+
return f`
|
|
2101
2171
|
<label class="field">
|
|
2102
2172
|
<span class="field-label">Email Address</span>
|
|
2103
2173
|
<input
|
|
@@ -2109,16 +2179,16 @@ let g = class extends Ct {
|
|
|
2109
2179
|
required
|
|
2110
2180
|
autocomplete="email"
|
|
2111
2181
|
/>
|
|
2112
|
-
${this.errors.email ?
|
|
2182
|
+
${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
|
|
2113
2183
|
</label>
|
|
2114
2184
|
|
|
2115
2185
|
<div class="otp-section">
|
|
2116
2186
|
<label class="otp-label">Enter 6-digit code</label>
|
|
2117
2187
|
<div class="otp-inputs" role="group" aria-label="One time code">
|
|
2118
|
-
${
|
|
2188
|
+
${$t(
|
|
2119
2189
|
Array.from({ length: 6 }, (t, s) => s),
|
|
2120
2190
|
(t) => t,
|
|
2121
|
-
(t) =>
|
|
2191
|
+
(t) => f`
|
|
2122
2192
|
<input
|
|
2123
2193
|
class="otp-input reset-otp-input ${this.errors.otp ? "otp-input--error" : ""}"
|
|
2124
2194
|
type="text"
|
|
@@ -2135,10 +2205,10 @@ let g = class extends Ct {
|
|
|
2135
2205
|
`
|
|
2136
2206
|
)}
|
|
2137
2207
|
</div>
|
|
2138
|
-
${this.errors.otp ?
|
|
2208
|
+
${this.errors.otp ? f`<p class="otp-error">${this.errors.otp}</p>` : g}
|
|
2139
2209
|
</div>
|
|
2140
2210
|
|
|
2141
|
-
${e ?
|
|
2211
|
+
${e ? f`
|
|
2142
2212
|
<div class="new-password-fields">
|
|
2143
2213
|
<label class="field">
|
|
2144
2214
|
<span class="field-label">New Password</span>
|
|
@@ -2151,7 +2221,7 @@ let g = class extends Ct {
|
|
|
2151
2221
|
required
|
|
2152
2222
|
autocomplete="new-password"
|
|
2153
2223
|
/>
|
|
2154
|
-
${this.errors.new_password ?
|
|
2224
|
+
${this.errors.new_password ? f`<span class="field-error">${this.errors.new_password}</span>` : g}
|
|
2155
2225
|
</label>
|
|
2156
2226
|
|
|
2157
2227
|
<label class="field">
|
|
@@ -2165,10 +2235,10 @@ let g = class extends Ct {
|
|
|
2165
2235
|
required
|
|
2166
2236
|
autocomplete="new-password"
|
|
2167
2237
|
/>
|
|
2168
|
-
${this.errors.confirm_password ?
|
|
2238
|
+
${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
|
|
2169
2239
|
</label>
|
|
2170
2240
|
</div>
|
|
2171
|
-
` :
|
|
2241
|
+
` : g}
|
|
2172
2242
|
|
|
2173
2243
|
<div class="forgot-row">
|
|
2174
2244
|
<button type="button" class="text-btn" @click=${this.backToRequest}>
|
|
@@ -2177,35 +2247,35 @@ let g = class extends Ct {
|
|
|
2177
2247
|
</div>
|
|
2178
2248
|
`;
|
|
2179
2249
|
}
|
|
2180
|
-
return
|
|
2250
|
+
return g;
|
|
2181
2251
|
}
|
|
2182
2252
|
renderActions() {
|
|
2183
2253
|
if (this.resetStep === "request")
|
|
2184
|
-
return
|
|
2254
|
+
return f`
|
|
2185
2255
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2186
2256
|
${this.isLoading ? "Sending..." : "Send Reset Code"}
|
|
2187
2257
|
</button>
|
|
2188
2258
|
`;
|
|
2189
2259
|
if (this.resetStep === "confirm")
|
|
2190
|
-
return this.otpDigits.every((t) => /^\d$/.test(t)) ?
|
|
2260
|
+
return this.otpDigits.every((t) => /^\d$/.test(t)) ? f`
|
|
2191
2261
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2192
2262
|
${this.isLoading ? "Resetting..." : "Reset Password"}
|
|
2193
2263
|
</button>
|
|
2194
|
-
` :
|
|
2264
|
+
` : g;
|
|
2195
2265
|
if (this.mode === "signup" && this.signupStep === "otp") {
|
|
2196
2266
|
const e = this.signupOtpDigits.every((t) => /^\d$/.test(t));
|
|
2197
|
-
return
|
|
2267
|
+
return f`
|
|
2198
2268
|
<button type="submit" class="cta" ?disabled=${!e || this.isLoading}>
|
|
2199
2269
|
${this.isLoading ? "Completing..." : "Complete Registration"}
|
|
2200
2270
|
</button>
|
|
2201
2271
|
`;
|
|
2202
2272
|
}
|
|
2203
|
-
return
|
|
2273
|
+
return f`
|
|
2204
2274
|
<button type="submit" class="cta" ?disabled=${this.isLoading}>
|
|
2205
2275
|
${this.isLoading ? "Loading..." : this.mode === "signup" ? "Continue" : "Sign In"}
|
|
2206
2276
|
</button>
|
|
2207
2277
|
|
|
2208
|
-
${this.isOAuthConfigured() && this.mode === "signin" ?
|
|
2278
|
+
${this.isOAuthConfigured() && this.mode === "signin" ? f`
|
|
2209
2279
|
<div class="button-row">
|
|
2210
2280
|
<button
|
|
2211
2281
|
type="button"
|
|
@@ -2225,31 +2295,31 @@ let g = class extends Ct {
|
|
|
2225
2295
|
${this.renderAppleIcon()}
|
|
2226
2296
|
</button>
|
|
2227
2297
|
</div>
|
|
2228
|
-
` :
|
|
2298
|
+
` : g}
|
|
2229
2299
|
`;
|
|
2230
2300
|
}
|
|
2231
2301
|
renderAlerts() {
|
|
2232
|
-
return
|
|
2233
|
-
${this.notice ?
|
|
2302
|
+
return f`
|
|
2303
|
+
${this.notice ? f`
|
|
2234
2304
|
<div class="alert alert--success">
|
|
2235
2305
|
${this.notice}
|
|
2236
2306
|
<button class="alert-close" @click=${() => this.notice = ""} aria-label="Dismiss">
|
|
2237
2307
|
×
|
|
2238
2308
|
</button>
|
|
2239
2309
|
</div>
|
|
2240
|
-
` :
|
|
2241
|
-
${this.error ?
|
|
2310
|
+
` : g}
|
|
2311
|
+
${this.error ? f`
|
|
2242
2312
|
<div class="alert alert--error">
|
|
2243
2313
|
${this.error}
|
|
2244
2314
|
<button class="alert-close" @click=${() => this.error = ""} aria-label="Dismiss">
|
|
2245
2315
|
×
|
|
2246
2316
|
</button>
|
|
2247
2317
|
</div>
|
|
2248
|
-
` :
|
|
2318
|
+
` : g}
|
|
2249
2319
|
`;
|
|
2250
2320
|
}
|
|
2251
2321
|
renderFooter() {
|
|
2252
|
-
return this.isLoggedIn ?
|
|
2322
|
+
return this.isLoggedIn ? g : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? f`
|
|
2253
2323
|
<div class="auth-footer">
|
|
2254
2324
|
<p class="toggle-text">
|
|
2255
2325
|
${this.mode === "signup" ? "Already have an account?" : "Don't have an account?"}
|
|
@@ -2258,7 +2328,7 @@ let g = class extends Ct {
|
|
|
2258
2328
|
${this.mode === "signup" ? "Sign In" : "Sign Up"}
|
|
2259
2329
|
</button>
|
|
2260
2330
|
</div>
|
|
2261
|
-
` :
|
|
2331
|
+
` : f`
|
|
2262
2332
|
<div class="auth-footer">
|
|
2263
2333
|
<p class="toggle-text">
|
|
2264
2334
|
Having trouble? Email
|
|
@@ -2268,7 +2338,7 @@ let g = class extends Ct {
|
|
|
2268
2338
|
`;
|
|
2269
2339
|
}
|
|
2270
2340
|
renderGoogleIcon() {
|
|
2271
|
-
return
|
|
2341
|
+
return f`
|
|
2272
2342
|
<svg viewBox="-0.5 0 48 48" width="18" height="18" fill="none">
|
|
2273
2343
|
<path d="M9.82727273,24 C9.82727273,22.4757333 10.0804318,21.0144 10.5322727,19.6437333 L2.62345455,13.6042667 C1.08206818,16.7338667 0.213636364,20.2602667 0.213636364,24 C0.213636364,27.7365333 1.081,31.2608 2.62025,34.3882667 L10.5247955,28.3370667 C10.0772273,26.9728 9.82727273,25.5168 9.82727273,24" fill="#FBBC05"></path>
|
|
2274
2344
|
<path d="M23.7136364,10.1333333 C27.025,10.1333333 30.0159091,11.3066667 32.3659091,13.2266667 L39.2022727,6.4 C35.0363636,2.77333333 29.6954545,0.533333333 23.7136364,0.533333333 C14.4268636,0.533333333 6.44540909,5.84426667 2.62345455,13.6042667 L10.5322727,19.6437333 C12.3545909,14.112 17.5491591,10.1333333 23.7136364,10.1333333" fill="#EB4335"></path>
|
|
@@ -2278,7 +2348,7 @@ let g = class extends Ct {
|
|
|
2278
2348
|
`;
|
|
2279
2349
|
}
|
|
2280
2350
|
renderAppleIcon() {
|
|
2281
|
-
return
|
|
2351
|
+
return f`
|
|
2282
2352
|
<svg viewBox="-3.5 0 48 48" width="18" height="18" class="apple-icon">
|
|
2283
2353
|
<path d="M231.174735,567.792499 C232.740177,565.771699 233.926883,562.915484 233.497649,560 C230.939077,560.177808 227.948466,561.814769 226.203475,563.948463 C224.612784,565.88177 223.305444,568.757742 223.816036,571.549042 C226.613071,571.636535 229.499881,569.960061 231.174735,567.792499 L231.174735,567.792499 Z M245,595.217241 C243.880625,597.712195 243.341978,598.827022 241.899976,601.03692 C239.888467,604.121745 237.052156,607.962958 233.53412,607.991182 C230.411652,608.02505 229.606488,605.94498 225.367451,605.970382 C221.128414,605.99296 220.244696,608.030695 217.116618,607.999649 C213.601387,607.968603 210.913765,604.502761 208.902256,601.417937 C203.27452,592.79849 202.68257,582.680377 206.152914,577.298162 C208.621711,573.476705 212.515678,571.241407 216.173986,571.241407 C219.89682,571.241407 222.239372,573.296075 225.322563,573.296075 C228.313175,573.296075 230.133913,571.235762 234.440281,571.235762 C237.700215,571.235762 241.153726,573.022307 243.611302,576.10431 C235.554045,580.546683 236.85858,592.121127 245,595.217241 L245,595.217241 Z" transform="translate(-204.000000, -560.000000)" fill="#0b0b0a"></path>
|
|
2284
2354
|
</svg>
|
|
@@ -2317,121 +2387,124 @@ let g = class extends Ct {
|
|
|
2317
2387
|
}
|
|
2318
2388
|
}
|
|
2319
2389
|
};
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
],
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
],
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
],
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
],
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
],
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
],
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
],
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
],
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
],
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
],
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
],
|
|
2354
|
-
|
|
2390
|
+
m.styles = de();
|
|
2391
|
+
y([
|
|
2392
|
+
S({ type: Boolean, reflect: !0 })
|
|
2393
|
+
], m.prototype, "open", 2);
|
|
2394
|
+
y([
|
|
2395
|
+
S({ type: String, attribute: "initial-mode" })
|
|
2396
|
+
], m.prototype, "initialMode", 2);
|
|
2397
|
+
y([
|
|
2398
|
+
S({ type: String, attribute: "logo-url" })
|
|
2399
|
+
], m.prototype, "logoUrl", 2);
|
|
2400
|
+
y([
|
|
2401
|
+
S({ type: String, attribute: "api-domain" })
|
|
2402
|
+
], m.prototype, "baseUrl", 2);
|
|
2403
|
+
y([
|
|
2404
|
+
S({ type: String, attribute: "oauth-domain" })
|
|
2405
|
+
], m.prototype, "oauthDomain", 2);
|
|
2406
|
+
y([
|
|
2407
|
+
S({ type: String, attribute: "oauth-region" })
|
|
2408
|
+
], m.prototype, "oauthRegion", 2);
|
|
2409
|
+
y([
|
|
2410
|
+
S({ type: String, attribute: "oauth-user-pool-id" })
|
|
2411
|
+
], m.prototype, "oauthUserPoolId", 2);
|
|
2412
|
+
y([
|
|
2413
|
+
S({ type: String, attribute: "oauth-client-id" })
|
|
2414
|
+
], m.prototype, "oauthClientId", 2);
|
|
2415
|
+
y([
|
|
2416
|
+
S({ type: String, attribute: "oauth-redirect-uri" })
|
|
2417
|
+
], m.prototype, "oauthRedirectUri", 2);
|
|
2418
|
+
y([
|
|
2419
|
+
S({ type: String, attribute: "oauth-spa-domain" })
|
|
2420
|
+
], m.prototype, "oauthSpaDomain", 2);
|
|
2421
|
+
y([
|
|
2422
|
+
S({ type: String, attribute: "size" })
|
|
2423
|
+
], m.prototype, "size", 2);
|
|
2424
|
+
y([
|
|
2425
|
+
S({ type: String, attribute: "data-theme", reflect: !0 })
|
|
2426
|
+
], m.prototype, "theme", 2);
|
|
2427
|
+
y([
|
|
2355
2428
|
b()
|
|
2356
|
-
],
|
|
2357
|
-
|
|
2429
|
+
], m.prototype, "mode", 2);
|
|
2430
|
+
y([
|
|
2358
2431
|
b()
|
|
2359
|
-
],
|
|
2360
|
-
|
|
2432
|
+
], m.prototype, "resetStep", 2);
|
|
2433
|
+
y([
|
|
2361
2434
|
b()
|
|
2362
|
-
],
|
|
2363
|
-
|
|
2435
|
+
], m.prototype, "signupStep", 2);
|
|
2436
|
+
y([
|
|
2364
2437
|
b()
|
|
2365
|
-
],
|
|
2366
|
-
|
|
2438
|
+
], m.prototype, "isLoading", 2);
|
|
2439
|
+
y([
|
|
2367
2440
|
b()
|
|
2368
|
-
],
|
|
2369
|
-
|
|
2441
|
+
], m.prototype, "isClosing", 2);
|
|
2442
|
+
y([
|
|
2370
2443
|
b()
|
|
2371
|
-
],
|
|
2372
|
-
|
|
2444
|
+
], m.prototype, "isVisible", 2);
|
|
2445
|
+
y([
|
|
2373
2446
|
b()
|
|
2374
|
-
],
|
|
2375
|
-
|
|
2447
|
+
], m.prototype, "isLoggedIn", 2);
|
|
2448
|
+
y([
|
|
2376
2449
|
b()
|
|
2377
|
-
],
|
|
2378
|
-
|
|
2450
|
+
], m.prototype, "email", 2);
|
|
2451
|
+
y([
|
|
2379
2452
|
b()
|
|
2380
|
-
],
|
|
2381
|
-
|
|
2453
|
+
], m.prototype, "password", 2);
|
|
2454
|
+
y([
|
|
2382
2455
|
b()
|
|
2383
|
-
],
|
|
2384
|
-
|
|
2456
|
+
], m.prototype, "givenName", 2);
|
|
2457
|
+
y([
|
|
2385
2458
|
b()
|
|
2386
|
-
],
|
|
2387
|
-
|
|
2459
|
+
], m.prototype, "familyName", 2);
|
|
2460
|
+
y([
|
|
2388
2461
|
b()
|
|
2389
|
-
],
|
|
2390
|
-
|
|
2462
|
+
], m.prototype, "newPassword", 2);
|
|
2463
|
+
y([
|
|
2391
2464
|
b()
|
|
2392
|
-
],
|
|
2393
|
-
|
|
2465
|
+
], m.prototype, "confirmPassword", 2);
|
|
2466
|
+
y([
|
|
2394
2467
|
b()
|
|
2395
|
-
],
|
|
2396
|
-
|
|
2468
|
+
], m.prototype, "notice", 2);
|
|
2469
|
+
y([
|
|
2397
2470
|
b()
|
|
2398
|
-
],
|
|
2399
|
-
|
|
2471
|
+
], m.prototype, "error", 2);
|
|
2472
|
+
y([
|
|
2400
2473
|
b()
|
|
2401
|
-
],
|
|
2402
|
-
|
|
2474
|
+
], m.prototype, "errors", 2);
|
|
2475
|
+
y([
|
|
2403
2476
|
b()
|
|
2404
|
-
],
|
|
2405
|
-
|
|
2477
|
+
], m.prototype, "otpDigits", 2);
|
|
2478
|
+
y([
|
|
2406
2479
|
b()
|
|
2407
|
-
],
|
|
2408
|
-
|
|
2480
|
+
], m.prototype, "signupOtpDigits", 2);
|
|
2481
|
+
y([
|
|
2409
2482
|
b()
|
|
2410
|
-
],
|
|
2411
|
-
|
|
2483
|
+
], m.prototype, "isDragging", 2);
|
|
2484
|
+
y([
|
|
2412
2485
|
b()
|
|
2413
|
-
],
|
|
2414
|
-
|
|
2486
|
+
], m.prototype, "dragStartY", 2);
|
|
2487
|
+
y([
|
|
2415
2488
|
b()
|
|
2416
|
-
],
|
|
2417
|
-
|
|
2489
|
+
], m.prototype, "dragCurrentY", 2);
|
|
2490
|
+
y([
|
|
2418
2491
|
b()
|
|
2419
|
-
],
|
|
2420
|
-
|
|
2492
|
+
], m.prototype, "dragStartTime", 2);
|
|
2493
|
+
y([
|
|
2421
2494
|
b()
|
|
2422
|
-
],
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
],
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
],
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
],
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
],
|
|
2495
|
+
], m.prototype, "lastDragEndTime", 2);
|
|
2496
|
+
y([
|
|
2497
|
+
it(".modal-container")
|
|
2498
|
+
], m.prototype, "modalContainer", 2);
|
|
2499
|
+
y([
|
|
2500
|
+
it("#email-input")
|
|
2501
|
+
], m.prototype, "emailInput", 2);
|
|
2502
|
+
y([
|
|
2503
|
+
it(".modal-body")
|
|
2504
|
+
], m.prototype, "modalBody", 2);
|
|
2505
|
+
m = y([
|
|
2506
|
+
Zt("cals-auth")
|
|
2507
|
+
], m);
|
|
2435
2508
|
export {
|
|
2436
|
-
|
|
2509
|
+
m as CalsAuth
|
|
2437
2510
|
};
|