@getauthui/core 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{authui-user-button-BeDiMjWw.js → authui-user-button-CLVW46Q6.js} +535 -436
- package/dist/authui.cdn.js +106 -66
- package/dist/authui.cdn.mjs +784 -685
- package/dist/authui.js +2 -2
- package/dist/components/authui-account.d.ts +4 -0
- package/dist/components/authui-account.d.ts.map +1 -1
- package/dist/components/authui-modal.d.ts +5 -0
- package/dist/components/authui-modal.d.ts.map +1 -1
- package/dist/components/authui-user-button.d.ts +4 -0
- package/dist/components/authui-user-button.d.ts.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/authui.cdn.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const kt = globalThis, hi = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, fi = /* @__PURE__ */ Symbol(),
|
|
2
|
-
let
|
|
1
|
+
const kt = globalThis, hi = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, fi = /* @__PURE__ */ Symbol(), Si = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let Qi = class {
|
|
3
3
|
constructor(e, n, i) {
|
|
4
4
|
if (this._$cssResult$ = !0, i !== fi) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
5
|
this.cssText = e, this.t = n;
|
|
@@ -9,7 +9,7 @@ let Zi = class {
|
|
|
9
9
|
const n = this.t;
|
|
10
10
|
if (hi && e === void 0) {
|
|
11
11
|
const i = n !== void 0 && n.length === 1;
|
|
12
|
-
i && (e =
|
|
12
|
+
i && (e = Si.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Si.set(n, e));
|
|
13
13
|
}
|
|
14
14
|
return e;
|
|
15
15
|
}
|
|
@@ -17,25 +17,25 @@ let Zi = class {
|
|
|
17
17
|
return this.cssText;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
const cn = (t) => new
|
|
20
|
+
const cn = (t) => new Qi(typeof t == "string" ? t : t + "", void 0, fi), We = (t, ...e) => {
|
|
21
21
|
const n = t.length === 1 ? t[0] : e.reduce((i, o, a) => i + ((s) => {
|
|
22
22
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
23
23
|
if (typeof s == "number") return s;
|
|
24
24
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
25
|
})(o) + t[a + 1], t[0]);
|
|
26
|
-
return new
|
|
26
|
+
return new Qi(n, t, fi);
|
|
27
27
|
}, dn = (t, e) => {
|
|
28
28
|
if (hi) t.adoptedStyleSheets = e.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
|
|
29
29
|
else for (const n of e) {
|
|
30
30
|
const i = document.createElement("style"), o = kt.litNonce;
|
|
31
31
|
o !== void 0 && i.setAttribute("nonce", o), i.textContent = n.cssText, t.appendChild(i);
|
|
32
32
|
}
|
|
33
|
-
},
|
|
33
|
+
}, $i = hi ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
|
|
34
34
|
let n = "";
|
|
35
35
|
for (const i of e.cssRules) n += i.cssText;
|
|
36
36
|
return cn(n);
|
|
37
37
|
})(t) : t;
|
|
38
|
-
const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object, Mt = globalThis, ji = Mt.trustedTypes, yn = ji ? ji.emptyScript : "", mn = Mt.reactiveElementPolyfillSupport, ut = (t, e) => t,
|
|
38
|
+
const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnPropertyNames: hn, getOwnPropertySymbols: fn, getPrototypeOf: gn } = Object, Mt = globalThis, ji = Mt.trustedTypes, yn = ji ? ji.emptyScript : "", mn = Mt.reactiveElementPolyfillSupport, ut = (t, e) => t, jt = { toAttribute(t, e) {
|
|
39
39
|
switch (e) {
|
|
40
40
|
case Boolean:
|
|
41
41
|
t = t ? yn : null;
|
|
@@ -63,16 +63,16 @@ const { is: ln, defineProperty: un, getOwnPropertyDescriptor: pn, getOwnProperty
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
return n;
|
|
66
|
-
} }, gi = (t, e) => !ln(t, e),
|
|
66
|
+
} }, gi = (t, e) => !ln(t, e), Pi = { attribute: !0, type: String, converter: jt, reflect: !1, useDefault: !1, hasChanged: gi };
|
|
67
67
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), Mt.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
|
-
let
|
|
68
|
+
let et = class extends HTMLElement {
|
|
69
69
|
static addInitializer(e) {
|
|
70
70
|
this._$Ei(), (this.l ??= []).push(e);
|
|
71
71
|
}
|
|
72
72
|
static get observedAttributes() {
|
|
73
73
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
74
74
|
}
|
|
75
|
-
static createProperty(e, n =
|
|
75
|
+
static createProperty(e, n = Pi) {
|
|
76
76
|
if (n.state && (n.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((n = Object.create(n)).wrapped = !0), this.elementProperties.set(e, n), !n.noAccessor) {
|
|
77
77
|
const i = /* @__PURE__ */ Symbol(), o = this.getPropertyDescriptor(e, i, n);
|
|
78
78
|
o !== void 0 && un(this.prototype, e, o);
|
|
@@ -90,7 +90,7 @@ let Fe = class extends HTMLElement {
|
|
|
90
90
|
}, configurable: !0, enumerable: !0 };
|
|
91
91
|
}
|
|
92
92
|
static getPropertyOptions(e) {
|
|
93
|
-
return this.elementProperties.get(e) ??
|
|
93
|
+
return this.elementProperties.get(e) ?? Pi;
|
|
94
94
|
}
|
|
95
95
|
static _$Ei() {
|
|
96
96
|
if (this.hasOwnProperty(ut("elementProperties"))) return;
|
|
@@ -119,8 +119,8 @@ let Fe = class extends HTMLElement {
|
|
|
119
119
|
const n = [];
|
|
120
120
|
if (Array.isArray(e)) {
|
|
121
121
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
122
|
-
for (const o of i) n.unshift(
|
|
123
|
-
} else e !== void 0 && n.push(
|
|
122
|
+
for (const o of i) n.unshift($i(o));
|
|
123
|
+
} else e !== void 0 && n.push($i(e));
|
|
124
124
|
return n;
|
|
125
125
|
}
|
|
126
126
|
static _$Eu(e, n) {
|
|
@@ -162,14 +162,14 @@ let Fe = class extends HTMLElement {
|
|
|
162
162
|
_$ET(e, n) {
|
|
163
163
|
const i = this.constructor.elementProperties.get(e), o = this.constructor._$Eu(e, i);
|
|
164
164
|
if (o !== void 0 && i.reflect === !0) {
|
|
165
|
-
const a = (i.converter?.toAttribute !== void 0 ? i.converter :
|
|
165
|
+
const a = (i.converter?.toAttribute !== void 0 ? i.converter : jt).toAttribute(n, i.type);
|
|
166
166
|
this._$Em = e, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$Em = null;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
_$AK(e, n) {
|
|
170
170
|
const i = this.constructor, o = i._$Eh.get(e);
|
|
171
171
|
if (o !== void 0 && this._$Em !== o) {
|
|
172
|
-
const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter :
|
|
172
|
+
const a = i.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : a.converter?.fromAttribute !== void 0 ? a.converter : jt;
|
|
173
173
|
this._$Em = o;
|
|
174
174
|
const r = s.fromAttribute(n, a.type);
|
|
175
175
|
this[o] = r ?? this._$Ej?.get(o) ?? r, this._$Em = null;
|
|
@@ -246,13 +246,13 @@ let Fe = class extends HTMLElement {
|
|
|
246
246
|
firstUpdated(e) {
|
|
247
247
|
}
|
|
248
248
|
};
|
|
249
|
-
|
|
250
|
-
const yi = globalThis,
|
|
251
|
-
\f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
252
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
253
|
-
function
|
|
249
|
+
et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (Mt.reactiveElementVersions ??= []).push("2.1.2");
|
|
250
|
+
const yi = globalThis, Ci = (t) => t, Pt = yi.trustedTypes, xi = Pt ? Pt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Xe = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Xe, wn = `<${zi}>`, Te = document, ht = () => Te.createComment(""), ft = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, bn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Vt = `[
|
|
251
|
+
\f\r]`, ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Mi = />/g, Je = RegExp(`>|${Vt}(?:([^\\s"'>=/]+)(${Vt}*=${Vt}*(?:[^
|
|
252
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ri = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), b = Fi(1), G = Fi(2), it = /* @__PURE__ */ Symbol.for("lit-noChange"), M = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
|
|
253
|
+
function en(t, e) {
|
|
254
254
|
if (!mi(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
255
|
-
return
|
|
255
|
+
return xi !== void 0 ? xi.createHTML(e) : e;
|
|
256
256
|
}
|
|
257
257
|
const vn = (t, e) => {
|
|
258
258
|
const n = t.length - 1, i = [];
|
|
@@ -260,11 +260,11 @@ const vn = (t, e) => {
|
|
|
260
260
|
for (let r = 0; r < n; r++) {
|
|
261
261
|
const d = t[r];
|
|
262
262
|
let c, p, u = -1, m = 0;
|
|
263
|
-
for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === ct ? p[1] === "!--" ? s =
|
|
264
|
-
const
|
|
265
|
-
a += s === ct ? d + wn : u >= 0 ? (i.push(c), d.slice(0, u) +
|
|
263
|
+
for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === ct ? p[1] === "!--" ? s = Ui : p[1] !== void 0 ? s = Mi : p[2] !== void 0 ? (Oi.test(p[2]) && (o = RegExp("</" + p[2], "g")), s = Je) : p[3] !== void 0 && (s = Je) : s === Je ? p[0] === ">" ? (s = o ?? ct, u = -1) : p[1] === void 0 ? u = -2 : (u = s.lastIndex - p[2].length, c = p[1], s = p[3] === void 0 ? Je : p[3] === '"' ? Ei : Ri) : s === Ei || s === Ri ? s = Je : s === Ui || s === Mi ? s = ct : (s = Je, o = void 0);
|
|
264
|
+
const $ = s === Je && t[r + 1].startsWith("/>") ? " " : "";
|
|
265
|
+
a += s === ct ? d + wn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Xe + $) : d + Xe + (u === -2 ? r : $);
|
|
266
266
|
}
|
|
267
|
-
return [
|
|
267
|
+
return [en(t, a + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
268
268
|
};
|
|
269
269
|
class gt {
|
|
270
270
|
constructor({ strings: e, _$litType$: n }, i) {
|
|
@@ -272,42 +272,42 @@ class gt {
|
|
|
272
272
|
this.parts = [];
|
|
273
273
|
let a = 0, s = 0;
|
|
274
274
|
const r = e.length - 1, d = this.parts, [c, p] = vn(e, n);
|
|
275
|
-
if (this.el = gt.createElement(c, i),
|
|
275
|
+
if (this.el = gt.createElement(c, i), Ze.currentNode = this.el.content, n === 2 || n === 3) {
|
|
276
276
|
const u = this.el.content.firstChild;
|
|
277
277
|
u.replaceWith(...u.childNodes);
|
|
278
278
|
}
|
|
279
|
-
for (; (o =
|
|
279
|
+
for (; (o = Ze.nextNode()) !== null && d.length < r; ) {
|
|
280
280
|
if (o.nodeType === 1) {
|
|
281
|
-
if (o.hasAttributes()) for (const u of o.getAttributeNames()) if (u.endsWith(
|
|
282
|
-
const m = p[s++],
|
|
283
|
-
d.push({ type: 1, index: a, name:
|
|
284
|
-
} else u.startsWith(
|
|
285
|
-
if (
|
|
286
|
-
const u = o.textContent.split(
|
|
281
|
+
if (o.hasAttributes()) for (const u of o.getAttributeNames()) if (u.endsWith(Ti)) {
|
|
282
|
+
const m = p[s++], $ = o.getAttribute(u).split(Xe), E = /([.?@])?(.*)/.exec(m);
|
|
283
|
+
d.push({ type: 1, index: a, name: E[2], strings: $, ctor: E[1] === "." ? An : E[1] === "?" ? kn : E[1] === "@" ? Sn : Rt }), o.removeAttribute(u);
|
|
284
|
+
} else u.startsWith(Xe) && (d.push({ type: 6, index: a }), o.removeAttribute(u));
|
|
285
|
+
if (Oi.test(o.tagName)) {
|
|
286
|
+
const u = o.textContent.split(Xe), m = u.length - 1;
|
|
287
287
|
if (m > 0) {
|
|
288
288
|
o.textContent = Pt ? Pt.emptyScript : "";
|
|
289
|
-
for (let
|
|
289
|
+
for (let $ = 0; $ < m; $++) o.append(u[$], ht()), Ze.nextNode(), d.push({ type: 2, index: ++a });
|
|
290
290
|
o.append(u[m], ht());
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
} else if (o.nodeType === 8) if (o.data ===
|
|
293
|
+
} else if (o.nodeType === 8) if (o.data === zi) d.push({ type: 2, index: a });
|
|
294
294
|
else {
|
|
295
295
|
let u = -1;
|
|
296
|
-
for (; (u = o.data.indexOf(
|
|
296
|
+
for (; (u = o.data.indexOf(Xe, u + 1)) !== -1; ) d.push({ type: 7, index: a }), u += Xe.length - 1;
|
|
297
297
|
}
|
|
298
298
|
a++;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
static createElement(e, n) {
|
|
302
|
-
const i =
|
|
302
|
+
const i = Te.createElement("template");
|
|
303
303
|
return i.innerHTML = e, i;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
if (e ===
|
|
306
|
+
function nt(t, e, n = t, i) {
|
|
307
|
+
if (e === it) return e;
|
|
308
308
|
let o = i !== void 0 ? n._$Co?.[i] : n._$Cl;
|
|
309
309
|
const a = ft(e) ? void 0 : e._$litDirective$;
|
|
310
|
-
return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e =
|
|
310
|
+
return o?.constructor !== a && (o?._$AO?.(!1), a === void 0 ? o = void 0 : (o = new a(t), o._$AT(t, n, i)), i !== void 0 ? (n._$Co ??= [])[i] = o : n._$Cl = o), o !== void 0 && (e = nt(t, o._$AS(t, e.values), o, i)), e;
|
|
311
311
|
}
|
|
312
312
|
class In {
|
|
313
313
|
constructor(e, n) {
|
|
@@ -320,17 +320,17 @@ class In {
|
|
|
320
320
|
return this._$AM._$AU;
|
|
321
321
|
}
|
|
322
322
|
u(e) {
|
|
323
|
-
const { el: { content: n }, parts: i } = this._$AD, o = (e?.creationScope ??
|
|
324
|
-
|
|
325
|
-
let a =
|
|
323
|
+
const { el: { content: n }, parts: i } = this._$AD, o = (e?.creationScope ?? Te).importNode(n, !0);
|
|
324
|
+
Ze.currentNode = o;
|
|
325
|
+
let a = Ze.nextNode(), s = 0, r = 0, d = i[0];
|
|
326
326
|
for (; d !== void 0; ) {
|
|
327
327
|
if (s === d.index) {
|
|
328
328
|
let c;
|
|
329
|
-
d.type === 2 ? c = new bt(a, a.nextSibling, this, e) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, e) : d.type === 6 && (c = new
|
|
329
|
+
d.type === 2 ? c = new bt(a, a.nextSibling, this, e) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, e) : d.type === 6 && (c = new $n(a, this, e)), this._$AV.push(c), d = i[++r];
|
|
330
330
|
}
|
|
331
|
-
s !== d?.index && (a =
|
|
331
|
+
s !== d?.index && (a = Ze.nextNode(), s++);
|
|
332
332
|
}
|
|
333
|
-
return
|
|
333
|
+
return Ze.currentNode = Te, o;
|
|
334
334
|
}
|
|
335
335
|
p(e) {
|
|
336
336
|
let n = 0;
|
|
@@ -356,7 +356,7 @@ class bt {
|
|
|
356
356
|
return this._$AB;
|
|
357
357
|
}
|
|
358
358
|
_$AI(e, n = this) {
|
|
359
|
-
e =
|
|
359
|
+
e = nt(this, e, n), ft(e) ? e === M || e == null || e === "" ? (this._$AH !== M && this._$AR(), this._$AH = M) : e !== this._$AH && e !== it && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : bn(e) ? this.k(e) : this._(e);
|
|
360
360
|
}
|
|
361
361
|
O(e) {
|
|
362
362
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -365,10 +365,10 @@ class bt {
|
|
|
365
365
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
366
366
|
}
|
|
367
367
|
_(e) {
|
|
368
|
-
this._$AH !== M && ft(this._$AH) ? this._$AA.nextSibling.data = e : this.T(
|
|
368
|
+
this._$AH !== M && ft(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Te.createTextNode(e)), this._$AH = e;
|
|
369
369
|
}
|
|
370
370
|
$(e) {
|
|
371
|
-
const { values: n, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = gt.createElement(
|
|
371
|
+
const { values: n, _$litType$: i } = e, o = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = gt.createElement(en(i.h, i.h[0]), this.options)), i);
|
|
372
372
|
if (this._$AH?._$AD === o) this._$AH.p(n);
|
|
373
373
|
else {
|
|
374
374
|
const a = new In(o, this), s = a.u(this.options);
|
|
@@ -388,8 +388,8 @@ class bt {
|
|
|
388
388
|
}
|
|
389
389
|
_$AR(e = this._$AA.nextSibling, n) {
|
|
390
390
|
for (this._$AP?.(!1, !0, n); e !== this._$AB; ) {
|
|
391
|
-
const i =
|
|
392
|
-
|
|
391
|
+
const i = Ci(e).nextSibling;
|
|
392
|
+
Ci(e).remove(), e = i;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
setConnected(e) {
|
|
@@ -409,11 +409,11 @@ class Rt {
|
|
|
409
409
|
_$AI(e, n = this, i, o) {
|
|
410
410
|
const a = this.strings;
|
|
411
411
|
let s = !1;
|
|
412
|
-
if (a === void 0) e =
|
|
412
|
+
if (a === void 0) e = nt(this, e, n, 0), s = !ft(e) || e !== this._$AH && e !== it, s && (this._$AH = e);
|
|
413
413
|
else {
|
|
414
414
|
const r = e;
|
|
415
415
|
let d, c;
|
|
416
|
-
for (e = a[0], d = 0; d < a.length - 1; d++) c =
|
|
416
|
+
for (e = a[0], d = 0; d < a.length - 1; d++) c = nt(this, r[i + d], n, d), c === it && (c = this._$AH[d]), s ||= !ft(c) || c !== this._$AH[d], c === M ? e = M : e !== M && (e += (c ?? "") + a[d + 1]), this._$AH[d] = c;
|
|
417
417
|
}
|
|
418
418
|
s && !o && this.j(e);
|
|
419
419
|
}
|
|
@@ -442,7 +442,7 @@ class Sn extends Rt {
|
|
|
442
442
|
super(e, n, i, o, a), this.type = 5;
|
|
443
443
|
}
|
|
444
444
|
_$AI(e, n = this) {
|
|
445
|
-
if ((e =
|
|
445
|
+
if ((e = nt(this, e, n, 0) ?? M) === it) return;
|
|
446
446
|
const i = this._$AH, o = e === M && i !== M || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, a = e !== M && (i === M || o);
|
|
447
447
|
o && this.element.removeEventListener(this.name, this, i), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
448
448
|
}
|
|
@@ -450,7 +450,7 @@ class Sn extends Rt {
|
|
|
450
450
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class $n {
|
|
454
454
|
constructor(e, n, i) {
|
|
455
455
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = i;
|
|
456
456
|
}
|
|
@@ -458,11 +458,11 @@ class jn {
|
|
|
458
458
|
return this._$AM._$AU;
|
|
459
459
|
}
|
|
460
460
|
_$AI(e) {
|
|
461
|
-
|
|
461
|
+
nt(this, e);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
const
|
|
465
|
-
|
|
464
|
+
const jn = yi.litHtmlPolyfillSupport;
|
|
465
|
+
jn?.(gt, bt), (yi.litHtmlVersions ??= []).push("3.3.3");
|
|
466
466
|
const Pn = (t, e, n) => {
|
|
467
467
|
const i = n?.renderBefore ?? e;
|
|
468
468
|
let o = i._$litPart$;
|
|
@@ -473,7 +473,7 @@ const Pn = (t, e, n) => {
|
|
|
473
473
|
return o._$AI(t), o;
|
|
474
474
|
};
|
|
475
475
|
const wi = globalThis;
|
|
476
|
-
class
|
|
476
|
+
class Qe extends et {
|
|
477
477
|
constructor() {
|
|
478
478
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
479
479
|
}
|
|
@@ -492,19 +492,19 @@ class Je extends Fe {
|
|
|
492
492
|
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
493
493
|
}
|
|
494
494
|
render() {
|
|
495
|
-
return
|
|
495
|
+
return it;
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
|
|
498
|
+
Qe._$litElement$ = !0, Qe.finalized = !0, wi.litElementHydrateSupport?.({ LitElement: Qe });
|
|
499
499
|
const Cn = wi.litElementPolyfillSupport;
|
|
500
|
-
Cn?.({ LitElement:
|
|
500
|
+
Cn?.({ LitElement: Qe });
|
|
501
501
|
(wi.litElementVersions ??= []).push("4.2.2");
|
|
502
|
-
const
|
|
502
|
+
const ze = (t) => (e, n) => {
|
|
503
503
|
n !== void 0 ? n.addInitializer(() => {
|
|
504
504
|
customElements.define(t, e);
|
|
505
505
|
}) : customElements.define(t, e);
|
|
506
506
|
};
|
|
507
|
-
const xn = { attribute: !0, type: String, converter:
|
|
507
|
+
const xn = { attribute: !0, type: String, converter: jt, reflect: !1, hasChanged: gi }, Un = (t = xn, e, n) => {
|
|
508
508
|
const { kind: i, metadata: o } = n;
|
|
509
509
|
let a = globalThis.litPropertyMetadata.get(o);
|
|
510
510
|
if (a === void 0 && globalThis.litPropertyMetadata.set(o, a = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), a.set(n.name, t), i === "accessor") {
|
|
@@ -531,11 +531,11 @@ function ee(t) {
|
|
|
531
531
|
return o.constructor.createProperty(a, i), s ? Object.getOwnPropertyDescriptor(o, a) : void 0;
|
|
532
532
|
})(t, e, n);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function V(t) {
|
|
535
535
|
return ee({ ...t, state: !0, attribute: !1 });
|
|
536
536
|
}
|
|
537
537
|
const Mn = (t, e, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, n), n);
|
|
538
|
-
function
|
|
538
|
+
function bi(t, e) {
|
|
539
539
|
return (n, i, o) => {
|
|
540
540
|
const a = (s) => s.renderRoot?.querySelector(t) ?? null;
|
|
541
541
|
return Mn(n, i, { get() {
|
|
@@ -546,13 +546,13 @@ function en(t, e) {
|
|
|
546
546
|
function Rn(t) {
|
|
547
547
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
548
548
|
}
|
|
549
|
-
var dt = { exports: {} }, Wt = { exports: {} }, St = { exports: {} },
|
|
549
|
+
var dt = { exports: {} }, Wt = { exports: {} }, St = { exports: {} }, En = St.exports, _i;
|
|
550
550
|
function tn() {
|
|
551
|
-
return
|
|
551
|
+
return _i || (_i = 1, (function(t) {
|
|
552
552
|
(function(e) {
|
|
553
|
-
var n, i = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, o = Math.ceil, a = Math.floor, s = "[BigNumber Error] ", r = s + "Number primitive has more than 15 significant digits: ", d = 1e14, c = 14, p = 9007199254740991, u = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], m = 1e7,
|
|
554
|
-
function
|
|
555
|
-
var L, te, X, U = x.prototype = { constructor: x, toString: null, valueOf: null }, Y = new x(1), Q = 20, ie = 4, ce = -7, de = 21, Ue = -1e7, Ae = 1e7,
|
|
553
|
+
var n, i = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, o = Math.ceil, a = Math.floor, s = "[BigNumber Error] ", r = s + "Number primitive has more than 15 significant digits: ", d = 1e14, c = 14, p = 9007199254740991, u = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], m = 1e7, $ = 1e9;
|
|
554
|
+
function E(H) {
|
|
555
|
+
var L, te, X, U = x.prototype = { constructor: x, toString: null, valueOf: null }, Y = new x(1), Q = 20, ie = 4, ce = -7, de = 21, Ue = -1e7, Ae = 1e7, _e = !1, st = 1, Be = 0, Lt = {
|
|
556
556
|
prefix: "",
|
|
557
557
|
groupSize: 3,
|
|
558
558
|
secondaryGroupSize: 0,
|
|
@@ -562,9 +562,9 @@ function tn() {
|
|
|
562
562
|
fractionGroupSeparator: " ",
|
|
563
563
|
// non-breaking space
|
|
564
564
|
suffix: ""
|
|
565
|
-
},
|
|
565
|
+
}, Ye = "0123456789abcdefghijklmnopqrstuvwxyz", Nt = !0;
|
|
566
566
|
function x(l, f) {
|
|
567
|
-
var g, k, w, I,
|
|
567
|
+
var g, k, w, I, j, y, v, S, A = this;
|
|
568
568
|
if (!(A instanceof x)) return new x(l, f);
|
|
569
569
|
if (f == null) {
|
|
570
570
|
if (l && l._isBigNumber === !0) {
|
|
@@ -573,7 +573,7 @@ function tn() {
|
|
|
573
573
|
}
|
|
574
574
|
if ((y = typeof l == "number") && l * 0 == 0) {
|
|
575
575
|
if (A.s = 1 / l < 0 ? (l = -l, -1) : 1, l === ~~l) {
|
|
576
|
-
for (I = 0,
|
|
576
|
+
for (I = 0, j = l; j >= 10; j /= 10, I++) ;
|
|
577
577
|
I > Ae ? A.c = A.e = null : (A.e = I, A.c = [l]);
|
|
578
578
|
return;
|
|
579
579
|
}
|
|
@@ -582,9 +582,9 @@ function tn() {
|
|
|
582
582
|
if (!i.test(S = String(l))) return X(A, S, y);
|
|
583
583
|
A.s = S.charCodeAt(0) == 45 ? (S = S.slice(1), -1) : 1;
|
|
584
584
|
}
|
|
585
|
-
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (
|
|
585
|
+
(I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (j = S.search(/e/i)) > 0 ? (I < 0 && (I = j), I += +S.slice(j + 1), S = S.substring(0, j)) : I < 0 && (I = S.length);
|
|
586
586
|
} else {
|
|
587
|
-
if (
|
|
587
|
+
if (q(f, 2, Ye.length, "Base"), f == 10 && Nt)
|
|
588
588
|
return A = new x(l), Se(A, Q + A.e + 1, ie);
|
|
589
589
|
if (S = String(l), y = typeof l == "number") {
|
|
590
590
|
if (l * 0 != 0) return X(A, S, y, f);
|
|
@@ -592,51 +592,51 @@ function tn() {
|
|
|
592
592
|
throw Error(r + l);
|
|
593
593
|
} else
|
|
594
594
|
A.s = S.charCodeAt(0) === 45 ? (S = S.slice(1), -1) : 1;
|
|
595
|
-
for (g =
|
|
596
|
-
if (g.indexOf(k = S.charAt(
|
|
595
|
+
for (g = Ye.slice(0, f), I = j = 0, v = S.length; j < v; j++)
|
|
596
|
+
if (g.indexOf(k = S.charAt(j)) < 0) {
|
|
597
597
|
if (k == ".") {
|
|
598
|
-
if (
|
|
598
|
+
if (j > I) {
|
|
599
599
|
I = v;
|
|
600
600
|
continue;
|
|
601
601
|
}
|
|
602
602
|
} else if (!w && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
|
|
603
|
-
w = !0,
|
|
603
|
+
w = !0, j = -1, I = 0;
|
|
604
604
|
continue;
|
|
605
605
|
}
|
|
606
606
|
return X(A, String(l), y, f);
|
|
607
607
|
}
|
|
608
608
|
y = !1, S = te(S, f, 10, A.s), (I = S.indexOf(".")) > -1 ? S = S.replace(".", "") : I = S.length;
|
|
609
609
|
}
|
|
610
|
-
for (
|
|
610
|
+
for (j = 0; S.charCodeAt(j) === 48; j++) ;
|
|
611
611
|
for (v = S.length; S.charCodeAt(--v) === 48; ) ;
|
|
612
|
-
if (S = S.slice(
|
|
613
|
-
if (v -=
|
|
612
|
+
if (S = S.slice(j, ++v)) {
|
|
613
|
+
if (v -= j, y && x.DEBUG && v > 15 && (l > p || l !== a(l)))
|
|
614
614
|
throw Error(r + A.s * l);
|
|
615
|
-
if ((I = I -
|
|
615
|
+
if ((I = I - j - 1) > Ae)
|
|
616
616
|
A.c = A.e = null;
|
|
617
617
|
else if (I < Ue)
|
|
618
618
|
A.c = [A.e = 0];
|
|
619
619
|
else {
|
|
620
|
-
if (A.e = I, A.c = [],
|
|
621
|
-
for (
|
|
622
|
-
A.c.push(+S.slice(
|
|
623
|
-
|
|
620
|
+
if (A.e = I, A.c = [], j = (I + 1) % c, I < 0 && (j += c), j < v) {
|
|
621
|
+
for (j && A.c.push(+S.slice(0, j)), v -= c; j < v; )
|
|
622
|
+
A.c.push(+S.slice(j, j += c));
|
|
623
|
+
j = c - (S = S.slice(j)).length;
|
|
624
624
|
} else
|
|
625
|
-
|
|
626
|
-
for (;
|
|
625
|
+
j -= v;
|
|
626
|
+
for (; j--; S += "0") ;
|
|
627
627
|
A.c.push(+S);
|
|
628
628
|
}
|
|
629
629
|
} else
|
|
630
630
|
A.c = [A.e = 0];
|
|
631
631
|
}
|
|
632
|
-
x.clone =
|
|
632
|
+
x.clone = E, x.ROUND_UP = 0, x.ROUND_DOWN = 1, x.ROUND_CEIL = 2, x.ROUND_FLOOR = 3, x.ROUND_HALF_UP = 4, x.ROUND_HALF_DOWN = 5, x.ROUND_HALF_EVEN = 6, x.ROUND_HALF_CEIL = 7, x.ROUND_HALF_FLOOR = 8, x.EUCLID = 9, x.config = x.set = function(l) {
|
|
633
633
|
var f, g;
|
|
634
634
|
if (l != null)
|
|
635
635
|
if (typeof l == "object") {
|
|
636
|
-
if (l.hasOwnProperty(f = "DECIMAL_PLACES") && (g = l[f],
|
|
636
|
+
if (l.hasOwnProperty(f = "DECIMAL_PLACES") && (g = l[f], q(g, 0, $, f), Q = g), l.hasOwnProperty(f = "ROUNDING_MODE") && (g = l[f], q(g, 0, 8, f), ie = g), l.hasOwnProperty(f = "EXPONENTIAL_AT") && (g = l[f], g && g.pop ? (q(g[0], -$, 0, f), q(g[1], 0, $, f), ce = g[0], de = g[1]) : (q(g, -$, $, f), ce = -(de = g < 0 ? -g : g))), l.hasOwnProperty(f = "RANGE"))
|
|
637
637
|
if (g = l[f], g && g.pop)
|
|
638
|
-
|
|
639
|
-
else if (
|
|
638
|
+
q(g[0], -$, -1, f), q(g[1], 1, $, f), Ue = g[0], Ae = g[1];
|
|
639
|
+
else if (q(g, -$, $, f), g)
|
|
640
640
|
Ue = -(Ae = g < 0 ? -g : g);
|
|
641
641
|
else
|
|
642
642
|
throw Error(s + f + " cannot be zero: " + g);
|
|
@@ -644,19 +644,19 @@ function tn() {
|
|
|
644
644
|
if (g = l[f], g === !!g)
|
|
645
645
|
if (g)
|
|
646
646
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
647
|
-
|
|
647
|
+
_e = g;
|
|
648
648
|
else
|
|
649
|
-
throw
|
|
649
|
+
throw _e = !g, Error(s + "crypto unavailable");
|
|
650
650
|
else
|
|
651
|
-
|
|
651
|
+
_e = g;
|
|
652
652
|
else
|
|
653
653
|
throw Error(s + f + " not true or false: " + g);
|
|
654
|
-
if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f],
|
|
654
|
+
if (l.hasOwnProperty(f = "MODULO_MODE") && (g = l[f], q(g, 0, 9, f), st = g), l.hasOwnProperty(f = "POW_PRECISION") && (g = l[f], q(g, 0, $, f), Be = g), l.hasOwnProperty(f = "FORMAT"))
|
|
655
655
|
if (g = l[f], typeof g == "object") Lt = g;
|
|
656
656
|
else throw Error(s + f + " not an object: " + g);
|
|
657
657
|
if (l.hasOwnProperty(f = "ALPHABET"))
|
|
658
658
|
if (g = l[f], typeof g == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(g))
|
|
659
|
-
Nt = g.slice(0, 10) == "0123456789",
|
|
659
|
+
Nt = g.slice(0, 10) == "0123456789", Ye = g;
|
|
660
660
|
else
|
|
661
661
|
throw Error(s + f + " invalid: " + g);
|
|
662
662
|
} else
|
|
@@ -666,18 +666,18 @@ function tn() {
|
|
|
666
666
|
ROUNDING_MODE: ie,
|
|
667
667
|
EXPONENTIAL_AT: [ce, de],
|
|
668
668
|
RANGE: [Ue, Ae],
|
|
669
|
-
CRYPTO:
|
|
669
|
+
CRYPTO: _e,
|
|
670
670
|
MODULO_MODE: st,
|
|
671
|
-
POW_PRECISION:
|
|
671
|
+
POW_PRECISION: Be,
|
|
672
672
|
FORMAT: Lt,
|
|
673
|
-
ALPHABET:
|
|
673
|
+
ALPHABET: Ye
|
|
674
674
|
};
|
|
675
675
|
}, x.isBigNumber = function(l) {
|
|
676
676
|
if (!l || l._isBigNumber !== !0) return !1;
|
|
677
677
|
if (!x.DEBUG) return !0;
|
|
678
678
|
var f, g, k = l.c, w = l.e, I = l.s;
|
|
679
679
|
e: if ({}.toString.call(k) == "[object Array]") {
|
|
680
|
-
if ((I === 1 || I === -1) && w >=
|
|
680
|
+
if ((I === 1 || I === -1) && w >= -$ && w <= $ && w === a(w)) {
|
|
681
681
|
if (k[0] === 0) {
|
|
682
682
|
if (w === 0 && k.length === 1) return !0;
|
|
683
683
|
break e;
|
|
@@ -692,9 +692,9 @@ function tn() {
|
|
|
692
692
|
return !0;
|
|
693
693
|
throw Error(s + "Invalid BigNumber: " + l);
|
|
694
694
|
}, x.maximum = x.max = function() {
|
|
695
|
-
return
|
|
695
|
+
return ki(arguments, -1);
|
|
696
696
|
}, x.minimum = x.min = function() {
|
|
697
|
-
return
|
|
697
|
+
return ki(arguments, 1);
|
|
698
698
|
}, x.random = (function() {
|
|
699
699
|
var l = 9007199254740992, f = Math.random() * l & 2097151 ? function() {
|
|
700
700
|
return a(Math.random() * l);
|
|
@@ -702,22 +702,22 @@ function tn() {
|
|
|
702
702
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
703
703
|
};
|
|
704
704
|
return function(g) {
|
|
705
|
-
var k, w, I,
|
|
706
|
-
if (g == null ? g = Q :
|
|
705
|
+
var k, w, I, j, y, v = 0, S = [], A = new x(Y);
|
|
706
|
+
if (g == null ? g = Q : q(g, 0, $), j = o(g / c), _e)
|
|
707
707
|
if (crypto.getRandomValues) {
|
|
708
|
-
for (k = crypto.getRandomValues(new Uint32Array(
|
|
708
|
+
for (k = crypto.getRandomValues(new Uint32Array(j *= 2)); v < j; )
|
|
709
709
|
y = k[v] * 131072 + (k[v + 1] >>> 11), y >= 9e15 ? (w = crypto.getRandomValues(new Uint32Array(2)), k[v] = w[0], k[v + 1] = w[1]) : (S.push(y % 1e14), v += 2);
|
|
710
|
-
v =
|
|
710
|
+
v = j / 2;
|
|
711
711
|
} else if (crypto.randomBytes) {
|
|
712
|
-
for (k = crypto.randomBytes(
|
|
712
|
+
for (k = crypto.randomBytes(j *= 7); v < j; )
|
|
713
713
|
y = (k[v] & 31) * 281474976710656 + k[v + 1] * 1099511627776 + k[v + 2] * 4294967296 + k[v + 3] * 16777216 + (k[v + 4] << 16) + (k[v + 5] << 8) + k[v + 6], y >= 9e15 ? crypto.randomBytes(7).copy(k, v) : (S.push(y % 1e14), v += 7);
|
|
714
|
-
v =
|
|
714
|
+
v = j / 7;
|
|
715
715
|
} else
|
|
716
|
-
throw
|
|
717
|
-
if (!
|
|
718
|
-
for (; v <
|
|
716
|
+
throw _e = !1, Error(s + "crypto unavailable");
|
|
717
|
+
if (!_e)
|
|
718
|
+
for (; v < j; )
|
|
719
719
|
y = f(), y < 9e15 && (S[v++] = y % 1e14);
|
|
720
|
-
for (
|
|
720
|
+
for (j = S[--v], g %= c, j && g && (y = u[c - g], S[v] = a(j / y) * y); S[v] === 0; S.pop(), v--) ;
|
|
721
721
|
if (v < 0)
|
|
722
722
|
S = [I = 0];
|
|
723
723
|
else {
|
|
@@ -733,21 +733,21 @@ function tn() {
|
|
|
733
733
|
}, te = /* @__PURE__ */ (function() {
|
|
734
734
|
var l = "0123456789";
|
|
735
735
|
function f(g, k, w, I) {
|
|
736
|
-
for (var
|
|
736
|
+
for (var j, y = [0], v, S = 0, A = g.length; S < A; ) {
|
|
737
737
|
for (v = y.length; v--; y[v] *= k) ;
|
|
738
|
-
for (y[0] += I.indexOf(g.charAt(S++)),
|
|
739
|
-
y[
|
|
738
|
+
for (y[0] += I.indexOf(g.charAt(S++)), j = 0; j < y.length; j++)
|
|
739
|
+
y[j] > w - 1 && (y[j + 1] == null && (y[j + 1] = 0), y[j + 1] += y[j] / w | 0, y[j] %= w);
|
|
740
740
|
}
|
|
741
741
|
return y.reverse();
|
|
742
742
|
}
|
|
743
|
-
return function(g, k, w, I,
|
|
743
|
+
return function(g, k, w, I, j) {
|
|
744
744
|
var y, v, S, A, C, D, B, ne, le = g.indexOf("."), he = Q, F = ie;
|
|
745
|
-
for (le >= 0 && (A =
|
|
746
|
-
ae(
|
|
745
|
+
for (le >= 0 && (A = Be, Be = 0, g = g.replace(".", ""), ne = new x(k), D = ne.pow(g.length - le), Be = A, ne.c = f(
|
|
746
|
+
ae(W(D.c), D.e, "0"),
|
|
747
747
|
10,
|
|
748
748
|
w,
|
|
749
749
|
l
|
|
750
|
-
), ne.e = ne.c.length), B = f(g, k, w,
|
|
750
|
+
), ne.e = ne.c.length), B = f(g, k, w, j ? (y = Ye, l) : (y = l, Ye)), S = A = B.length; B[--A] == 0; B.pop()) ;
|
|
751
751
|
if (!B[0]) return y.charAt(0);
|
|
752
752
|
if (le < 0 ? --S : (D.c = B, D.e = S, D.s = I, D = L(D, ne, he, F, w), B = D.c, C = D.r, S = D.e), v = S + he + 1, le = B[v], A = w / 2, C = C || v < 0 || B[v + 1] != null, C = F < 4 ? (le != null || C) && (F == 0 || F == (D.s < 0 ? 3 : 2)) : le > A || le == A && (F == 4 || C || F == 6 && B[v - 1] & 1 || F == (D.s < 0 ? 8 : 7)), v < 1 || !B[0])
|
|
753
753
|
g = C ? ae(y.charAt(1), -he, y.charAt(0)) : y.charAt(0);
|
|
@@ -763,15 +763,15 @@ function tn() {
|
|
|
763
763
|
};
|
|
764
764
|
})(), L = /* @__PURE__ */ (function() {
|
|
765
765
|
function l(k, w, I) {
|
|
766
|
-
var
|
|
766
|
+
var j, y, v, S, A = 0, C = k.length, D = w % m, B = w / m | 0;
|
|
767
767
|
for (k = k.slice(); C--; )
|
|
768
|
-
v = k[C] % m, S = k[C] / m | 0,
|
|
768
|
+
v = k[C] % m, S = k[C] / m | 0, j = B * v + S * D, y = D * v + j % m * m + A, A = (y / I | 0) + (j / m | 0) + B * S, k[C] = y % I;
|
|
769
769
|
return A && (k = [A].concat(k)), k;
|
|
770
770
|
}
|
|
771
|
-
function f(k, w, I,
|
|
771
|
+
function f(k, w, I, j) {
|
|
772
772
|
var y, v;
|
|
773
|
-
if (I !=
|
|
774
|
-
v = I >
|
|
773
|
+
if (I != j)
|
|
774
|
+
v = I > j ? 1 : -1;
|
|
775
775
|
else
|
|
776
776
|
for (y = v = 0; y < I; y++)
|
|
777
777
|
if (k[y] != w[y]) {
|
|
@@ -780,26 +780,26 @@ function tn() {
|
|
|
780
780
|
}
|
|
781
781
|
return v;
|
|
782
782
|
}
|
|
783
|
-
function g(k, w, I,
|
|
783
|
+
function g(k, w, I, j) {
|
|
784
784
|
for (var y = 0; I--; )
|
|
785
|
-
k[I] -= y, y = k[I] < w[I] ? 1 : 0, k[I] = y *
|
|
785
|
+
k[I] -= y, y = k[I] < w[I] ? 1 : 0, k[I] = y * j + k[I] - w[I];
|
|
786
786
|
for (; !k[0] && k.length > 1; k.splice(0, 1)) ;
|
|
787
787
|
}
|
|
788
|
-
return function(k, w, I,
|
|
789
|
-
var v, S, A, C, D, B, ne, le, he, F, re, me, vt, Bt, Xt, Me, rt,
|
|
788
|
+
return function(k, w, I, j, y) {
|
|
789
|
+
var v, S, A, C, D, B, ne, le, he, F, re, me, vt, Bt, Xt, Me, rt, $e = k.s == w.s ? 1 : -1, be = k.c, ue = w.c;
|
|
790
790
|
if (!be || !be[0] || !ue || !ue[0])
|
|
791
791
|
return new x(
|
|
792
792
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
793
793
|
!k.s || !w.s || (be ? ue && be[0] == ue[0] : !ue) ? NaN : (
|
|
794
794
|
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
|
|
795
|
-
be && be[0] == 0 || !ue ?
|
|
795
|
+
be && be[0] == 0 || !ue ? $e * 0 : $e / 0
|
|
796
796
|
)
|
|
797
797
|
);
|
|
798
|
-
for (le = new x(
|
|
799
|
-
if (ue[A] > (be[A] || 0) && S--,
|
|
798
|
+
for (le = new x($e), he = le.c = [], S = k.e - w.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(w.e / c), $e = $e / c | 0), A = 0; ue[A] == (be[A] || 0); A++) ;
|
|
799
|
+
if (ue[A] > (be[A] || 0) && S--, $e < 0)
|
|
800
800
|
he.push(1), C = !0;
|
|
801
801
|
else {
|
|
802
|
-
for (Bt = be.length, Me = ue.length, A = 0,
|
|
802
|
+
for (Bt = be.length, Me = ue.length, A = 0, $e += 2, D = a(y / (ue[0] + 1)), D > 1 && (ue = l(ue, D, y), be = l(be, D, y), Me = ue.length, Bt = be.length), vt = Me, F = be.slice(0, Me), re = F.length; re < Me; F[re++] = 0) ;
|
|
803
803
|
rt = ue.slice(), rt = [0].concat(rt), Xt = ue[0], ue[1] >= y / 2 && Xt++;
|
|
804
804
|
do {
|
|
805
805
|
if (D = 0, v = f(ue, F, Me, re), v < 0) {
|
|
@@ -813,32 +813,32 @@ function tn() {
|
|
|
813
813
|
D++, g(F, Me < re ? rt : ue, re, y), re = F.length;
|
|
814
814
|
} else v === 0 && (D++, F = [0]);
|
|
815
815
|
he[A++] = D, F[0] ? F[re++] = be[vt] || 0 : (F = [be[vt]], re = 1);
|
|
816
|
-
} while ((vt++ < Bt || F[0] != null) &&
|
|
816
|
+
} while ((vt++ < Bt || F[0] != null) && $e--);
|
|
817
817
|
C = F[0] != null, he[0] || he.splice(0, 1);
|
|
818
818
|
}
|
|
819
819
|
if (y == d) {
|
|
820
|
-
for (A = 1,
|
|
821
|
-
Se(le, I + (le.e = A + S * c - 1) + 1,
|
|
820
|
+
for (A = 1, $e = he[0]; $e >= 10; $e /= 10, A++) ;
|
|
821
|
+
Se(le, I + (le.e = A + S * c - 1) + 1, j, C);
|
|
822
822
|
} else
|
|
823
823
|
le.e = S, le.r = +C;
|
|
824
824
|
return le;
|
|
825
825
|
};
|
|
826
826
|
})();
|
|
827
827
|
function Ht(l, f, g, k) {
|
|
828
|
-
var w, I,
|
|
829
|
-
if (g == null ? g = ie :
|
|
830
|
-
if (w = l.c[0],
|
|
831
|
-
v =
|
|
832
|
-
else if (l = Se(new x(l), f, g), I = l.e, v =
|
|
828
|
+
var w, I, j, y, v;
|
|
829
|
+
if (g == null ? g = ie : q(g, 0, 8), !l.c) return l.toString();
|
|
830
|
+
if (w = l.c[0], j = l.e, f == null)
|
|
831
|
+
v = W(l.c), v = k == 1 || k == 2 && (j <= ce || j >= de) ? J(v, j) : ae(v, j, "0");
|
|
832
|
+
else if (l = Se(new x(l), f, g), I = l.e, v = W(l.c), y = v.length, k == 1 || k == 2 && (f <= I || I <= ce)) {
|
|
833
833
|
for (; y < f; v += "0", y++) ;
|
|
834
834
|
v = J(v, I);
|
|
835
|
-
} else if (f -=
|
|
835
|
+
} else if (f -= j + (k === 2 && I > j), v = ae(v, I, "0"), I + 1 > y) {
|
|
836
836
|
if (--f > 0) for (v += "."; f--; v += "0") ;
|
|
837
837
|
} else if (f += I - y, f > 0)
|
|
838
838
|
for (I + 1 == y && (v += "."); f--; v += "0") ;
|
|
839
839
|
return l.s < 0 && w ? "-" + v : v;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function ki(l, f) {
|
|
842
842
|
for (var g, k, w = 1, I = new x(l[0]); w < l.length; w++)
|
|
843
843
|
k = new x(l[w]), (!k.s || (g = K(I, k)) === f || g === 0 && I.s === f) && (I = k);
|
|
844
844
|
return I;
|
|
@@ -850,50 +850,50 @@ function tn() {
|
|
|
850
850
|
}
|
|
851
851
|
X = /* @__PURE__ */ (function() {
|
|
852
852
|
var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, w = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
853
|
-
return function(I,
|
|
854
|
-
var S, A = y ?
|
|
853
|
+
return function(I, j, y, v) {
|
|
854
|
+
var S, A = y ? j : j.replace(w, "");
|
|
855
855
|
if (k.test(A))
|
|
856
856
|
I.s = isNaN(A) ? null : A < 0 ? -1 : 1;
|
|
857
857
|
else {
|
|
858
858
|
if (!y && (A = A.replace(l, function(C, D, B) {
|
|
859
859
|
return S = (B = B.toLowerCase()) == "x" ? 16 : B == "b" ? 2 : 8, !v || v == S ? D : C;
|
|
860
|
-
}), v && (S = v, A = A.replace(f, "$1").replace(g, "0.$1")),
|
|
860
|
+
}), v && (S = v, A = A.replace(f, "$1").replace(g, "0.$1")), j != A))
|
|
861
861
|
return new x(A, S);
|
|
862
862
|
if (x.DEBUG)
|
|
863
|
-
throw Error(s + "Not a" + (v ? " base " + v : "") + " number: " +
|
|
863
|
+
throw Error(s + "Not a" + (v ? " base " + v : "") + " number: " + j);
|
|
864
864
|
I.s = null;
|
|
865
865
|
}
|
|
866
866
|
I.c = I.e = null;
|
|
867
867
|
};
|
|
868
868
|
})();
|
|
869
869
|
function Se(l, f, g, k) {
|
|
870
|
-
var w, I,
|
|
870
|
+
var w, I, j, y, v, S, A, C = l.c, D = u;
|
|
871
871
|
if (C) {
|
|
872
872
|
e: {
|
|
873
873
|
for (w = 1, y = C[0]; y >= 10; y /= 10, w++) ;
|
|
874
874
|
if (I = f - w, I < 0)
|
|
875
|
-
I += c,
|
|
875
|
+
I += c, j = f, v = C[S = 0], A = a(v / D[w - j - 1] % 10);
|
|
876
876
|
else if (S = o((I + 1) / c), S >= C.length)
|
|
877
877
|
if (k) {
|
|
878
878
|
for (; C.length <= S; C.push(0)) ;
|
|
879
|
-
v = A = 0, w = 1, I %= c,
|
|
879
|
+
v = A = 0, w = 1, I %= c, j = I - c + 1;
|
|
880
880
|
} else
|
|
881
881
|
break e;
|
|
882
882
|
else {
|
|
883
883
|
for (v = y = C[S], w = 1; y >= 10; y /= 10, w++) ;
|
|
884
|
-
I %= c,
|
|
884
|
+
I %= c, j = I - c + w, A = j < 0 ? 0 : a(v / D[w - j - 1] % 10);
|
|
885
885
|
}
|
|
886
886
|
if (k = k || f < 0 || // Are there any non-zero digits after the rounding digit?
|
|
887
887
|
// The expression n % pows10[d - j - 1] returns all digits of n to the right
|
|
888
888
|
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
|
|
889
|
-
C[S + 1] != null || (
|
|
890
|
-
(I > 0 ?
|
|
889
|
+
C[S + 1] != null || (j < 0 ? v : v % D[w - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
890
|
+
(I > 0 ? j > 0 ? v / D[w - j] : 0 : C[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !C[0])
|
|
891
891
|
return C.length = 0, k ? (f -= l.e + 1, C[0] = D[(c - f % c) % c], l.e = -f || 0) : C[0] = l.e = 0, l;
|
|
892
|
-
if (I == 0 ? (C.length = S, y = 1, S--) : (C.length = S + 1, y = D[c - I], C[S] =
|
|
892
|
+
if (I == 0 ? (C.length = S, y = 1, S--) : (C.length = S + 1, y = D[c - I], C[S] = j > 0 ? a(v / D[w - j] % D[j]) * y : 0), k)
|
|
893
893
|
for (; ; )
|
|
894
894
|
if (S == 0) {
|
|
895
|
-
for (I = 1,
|
|
896
|
-
for (
|
|
895
|
+
for (I = 1, j = C[0]; j >= 10; j /= 10, I++) ;
|
|
896
|
+
for (j = C[0] += y, y = 1; j >= 10; j /= 10, y++) ;
|
|
897
897
|
I != y && (l.e++, C[0] == d && (C[0] = 1));
|
|
898
898
|
break;
|
|
899
899
|
} else {
|
|
@@ -906,9 +906,9 @@ function tn() {
|
|
|
906
906
|
}
|
|
907
907
|
return l;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Le(l) {
|
|
910
910
|
var f, g = l.e;
|
|
911
|
-
return g === null ? l.toString() : (f =
|
|
911
|
+
return g === null ? l.toString() : (f = W(l.c), f = g <= ce || g >= de ? J(f, g) : ae(f, g, "0"), l.s < 0 ? "-" + f : f);
|
|
912
912
|
}
|
|
913
913
|
return U.absoluteValue = U.abs = function() {
|
|
914
914
|
var l = new x(this);
|
|
@@ -918,7 +918,7 @@ function tn() {
|
|
|
918
918
|
}, U.decimalPlaces = U.dp = function(l, f) {
|
|
919
919
|
var g, k, w, I = this;
|
|
920
920
|
if (l != null)
|
|
921
|
-
return
|
|
921
|
+
return q(l, 0, $), f == null ? f = ie : q(f, 0, 8), Se(new x(I), l + I.e + 1, f);
|
|
922
922
|
if (!(g = I.c)) return null;
|
|
923
923
|
if (k = ((w = g.length - 1) - Z(this.e / c)) * c, w = g[w]) for (; w % 10 == 0; w /= 10, k--) ;
|
|
924
924
|
return k < 0 && (k = 0), k;
|
|
@@ -927,20 +927,20 @@ function tn() {
|
|
|
927
927
|
}, U.dividedToIntegerBy = U.idiv = function(l, f) {
|
|
928
928
|
return L(this, new x(l, f), 0, 1);
|
|
929
929
|
}, U.exponentiatedBy = U.pow = function(l, f) {
|
|
930
|
-
var g, k, w, I,
|
|
930
|
+
var g, k, w, I, j, y, v, S, A, C = this;
|
|
931
931
|
if (l = new x(l), l.c && !l.isInteger())
|
|
932
|
-
throw Error(s + "Exponent not an integer: " +
|
|
932
|
+
throw Error(s + "Exponent not an integer: " + Le(l));
|
|
933
933
|
if (f != null && (f = new x(f)), y = l.e > 14, !C.c || !C.c[0] || C.c[0] == 1 && !C.e && C.c.length == 1 || !l.c || !l.c[0])
|
|
934
|
-
return A = new x(Math.pow(+
|
|
934
|
+
return A = new x(Math.pow(+Le(C), y ? l.s * (2 - N(l)) : +Le(l))), f ? A.mod(f) : A;
|
|
935
935
|
if (v = l.s < 0, f) {
|
|
936
936
|
if (f.c ? !f.c[0] : !f.s) return new x(NaN);
|
|
937
937
|
k = !v && C.isInteger() && f.isInteger(), k && (C = C.mod(f));
|
|
938
938
|
} else {
|
|
939
939
|
if (l.e > 9 && (C.e > 0 || C.e < -1 || (C.e == 0 ? C.c[0] > 1 || y && C.c[1] >= 24e7 : C.c[0] < 8e13 || y && C.c[0] <= 9999975e7)))
|
|
940
940
|
return I = C.s < 0 && N(l) ? -0 : 0, C.e > -1 && (I = 1 / I), new x(v ? 1 / I : I);
|
|
941
|
-
|
|
941
|
+
Be && (I = o(Be / c + 2));
|
|
942
942
|
}
|
|
943
|
-
for (y ? (g = new x(0.5), v && (l.s = 1), S = N(l)) : (w = Math.abs(+
|
|
943
|
+
for (y ? (g = new x(0.5), v && (l.s = 1), S = N(l)) : (w = Math.abs(+Le(l)), S = w % 2), A = new x(Y); ; ) {
|
|
944
944
|
if (S) {
|
|
945
945
|
if (A = A.times(C), !A.c) break;
|
|
946
946
|
I ? A.c.length > I && (A.c.length = I) : k && (A = A.mod(f));
|
|
@@ -951,15 +951,15 @@ function tn() {
|
|
|
951
951
|
} else if (l = l.times(g), Se(l, l.e + 1, 1), l.e > 14)
|
|
952
952
|
S = N(l);
|
|
953
953
|
else {
|
|
954
|
-
if (w = +
|
|
954
|
+
if (w = +Le(l), w === 0) break;
|
|
955
955
|
S = w % 2;
|
|
956
956
|
}
|
|
957
957
|
C = C.times(C), I ? C.c && C.c.length > I && (C.c.length = I) : k && (C = C.mod(f));
|
|
958
958
|
}
|
|
959
|
-
return k ? A : (v && (A = Y.div(A)), f ? A.mod(f) : I ? Se(A,
|
|
959
|
+
return k ? A : (v && (A = Y.div(A)), f ? A.mod(f) : I ? Se(A, Be, ie, j) : A);
|
|
960
960
|
}, U.integerValue = function(l) {
|
|
961
961
|
var f = new x(this);
|
|
962
|
-
return l == null ? l = ie :
|
|
962
|
+
return l == null ? l = ie : q(l, 0, 8), Se(f, f.e + 1, l);
|
|
963
963
|
}, U.isEqualTo = U.eq = function(l, f) {
|
|
964
964
|
return K(this, new x(l, f)) === 0;
|
|
965
965
|
}, U.isFinite = function() {
|
|
@@ -983,15 +983,15 @@ function tn() {
|
|
|
983
983
|
}, U.isZero = function() {
|
|
984
984
|
return !!this.c && this.c[0] == 0;
|
|
985
985
|
}, U.minus = function(l, f) {
|
|
986
|
-
var g, k, w, I,
|
|
986
|
+
var g, k, w, I, j = this, y = j.s;
|
|
987
987
|
if (l = new x(l, f), f = l.s, !y || !f) return new x(NaN);
|
|
988
988
|
if (y != f)
|
|
989
|
-
return l.s = -f,
|
|
990
|
-
var v =
|
|
989
|
+
return l.s = -f, j.plus(l);
|
|
990
|
+
var v = j.e / c, S = l.e / c, A = j.c, C = l.c;
|
|
991
991
|
if (!v || !S) {
|
|
992
|
-
if (!A || !C) return A ? (l.s = -f, l) : new x(C ?
|
|
992
|
+
if (!A || !C) return A ? (l.s = -f, l) : new x(C ? j : NaN);
|
|
993
993
|
if (!A[0] || !C[0])
|
|
994
|
-
return C[0] ? (l.s = -f, l) : new x(A[0] ?
|
|
994
|
+
return C[0] ? (l.s = -f, l) : new x(A[0] ? j : (
|
|
995
995
|
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
|
|
996
996
|
ie == 3 ? -0 : 0
|
|
997
997
|
));
|
|
@@ -1019,13 +1019,13 @@ function tn() {
|
|
|
1019
1019
|
var g, k, w = this;
|
|
1020
1020
|
return l = new x(l, f), !w.c || !l.s || l.c && !l.c[0] ? new x(NaN) : !l.c || w.c && !w.c[0] ? new x(w) : (st == 9 ? (k = l.s, l.s = 1, g = L(w, l, 0, 3), l.s = k, g.s *= k) : g = L(w, l, 0, st), l = w.minus(g.times(l)), !l.c[0] && st == 1 && (l.s = w.s), l);
|
|
1021
1021
|
}, U.multipliedBy = U.times = function(l, f) {
|
|
1022
|
-
var g, k, w, I,
|
|
1022
|
+
var g, k, w, I, j, y, v, S, A, C, D, B, ne, le, he, F = this, re = F.c, me = (l = new x(l, f)).c;
|
|
1023
1023
|
if (!re || !me || !re[0] || !me[0])
|
|
1024
1024
|
return !F.s || !l.s || re && !re[0] && !me || me && !me[0] && !re ? l.c = l.e = l.s = null : (l.s *= F.s, !re || !me ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
|
|
1025
1025
|
for (k = Z(F.e / c) + Z(l.e / c), l.s *= F.s, v = re.length, C = me.length, v < C && (ne = re, re = me, me = ne, w = v, v = C, C = w), w = v + C, ne = []; w--; ne.push(0)) ;
|
|
1026
1026
|
for (le = d, he = m, w = C; --w >= 0; ) {
|
|
1027
|
-
for (g = 0, D = me[w] % he, B = me[w] / he | 0,
|
|
1028
|
-
S = re[
|
|
1027
|
+
for (g = 0, D = me[w] % he, B = me[w] / he | 0, j = v, I = w + j; I > w; )
|
|
1028
|
+
S = re[--j] % he, A = re[j] / he | 0, y = B * S + A * D, S = D * S + y % he * he + ne[I] + g, g = (S / le | 0) + (y / he | 0) + B * A, ne[I--] = S % le;
|
|
1029
1029
|
ne[I] = g;
|
|
1030
1030
|
}
|
|
1031
1031
|
return g ? ++k : ne.splice(0, 1), Dt(l, ne, k);
|
|
@@ -1037,22 +1037,22 @@ function tn() {
|
|
|
1037
1037
|
if (l = new x(l, f), f = l.s, !w || !f) return new x(NaN);
|
|
1038
1038
|
if (w != f)
|
|
1039
1039
|
return l.s = -f, k.minus(l);
|
|
1040
|
-
var I = k.e / c,
|
|
1041
|
-
if (!I ||
|
|
1040
|
+
var I = k.e / c, j = l.e / c, y = k.c, v = l.c;
|
|
1041
|
+
if (!I || !j) {
|
|
1042
1042
|
if (!y || !v) return new x(w / 0);
|
|
1043
1043
|
if (!y[0] || !v[0]) return v[0] ? l : new x(y[0] ? k : w * 0);
|
|
1044
1044
|
}
|
|
1045
|
-
if (I = Z(I),
|
|
1046
|
-
for (w > 0 ? (
|
|
1045
|
+
if (I = Z(I), j = Z(j), y = y.slice(), w = I - j) {
|
|
1046
|
+
for (w > 0 ? (j = I, g = v) : (w = -w, g = y), g.reverse(); w--; g.push(0)) ;
|
|
1047
1047
|
g.reverse();
|
|
1048
1048
|
}
|
|
1049
1049
|
for (w = y.length, f = v.length, w - f < 0 && (g = v, v = y, y = g, f = w), w = 0; f; )
|
|
1050
1050
|
w = (y[--f] = y[f] + v[f] + w) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
|
|
1051
|
-
return w && (y = [w].concat(y),
|
|
1051
|
+
return w && (y = [w].concat(y), ++j), Dt(l, y, j);
|
|
1052
1052
|
}, U.precision = U.sd = function(l, f) {
|
|
1053
1053
|
var g, k, w, I = this;
|
|
1054
1054
|
if (l != null && l !== !!l)
|
|
1055
|
-
return
|
|
1055
|
+
return q(l, 1, $), f == null ? f = ie : q(f, 0, 8), Se(new x(I), l, f);
|
|
1056
1056
|
if (!(g = I.c)) return null;
|
|
1057
1057
|
if (w = g.length - 1, k = w * c + 1, w = g[w]) {
|
|
1058
1058
|
for (; w % 10 == 0; w /= 10, k--) ;
|
|
@@ -1060,14 +1060,14 @@ function tn() {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
return l && I.e + 1 > k && (k = I.e + 1), k;
|
|
1062
1062
|
}, U.shiftedBy = function(l) {
|
|
1063
|
-
return
|
|
1063
|
+
return q(l, -p, p), this.times("1e" + l);
|
|
1064
1064
|
}, U.squareRoot = U.sqrt = function() {
|
|
1065
|
-
var l, f, g, k, w, I = this,
|
|
1066
|
-
if (y !== 1 ||
|
|
1067
|
-
return new x(!y || y < 0 && (
|
|
1068
|
-
if (y = Math.sqrt(+
|
|
1065
|
+
var l, f, g, k, w, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new x("0.5");
|
|
1066
|
+
if (y !== 1 || !j || !j[0])
|
|
1067
|
+
return new x(!y || y < 0 && (!j || j[0]) ? NaN : j ? I : 1 / 0);
|
|
1068
|
+
if (y = Math.sqrt(+Le(I)), y == 0 || y == 1 / 0 ? (f = W(j), (f.length + v) % 2 == 0 && (f += "0"), y = Math.sqrt(+f), v = Z((v + 1) / 2) - (v < 0 || v % 2), y == 1 / 0 ? f = "5e" + v : (f = y.toExponential(), f = f.slice(0, f.indexOf("e") + 1) + v), g = new x(f)) : g = new x(y + ""), g.c[0]) {
|
|
1069
1069
|
for (v = g.e, y = v + S, y < 3 && (y = 0); ; )
|
|
1070
|
-
if (w = g, g = A.times(w.plus(L(I, w, S, 1))),
|
|
1070
|
+
if (w = g, g = A.times(w.plus(L(I, w, S, 1))), W(w.c).slice(0, y) === (f = W(g.c)).slice(0, y))
|
|
1071
1071
|
if (g.e < v && --y, f = f.slice(y - 3, y + 1), f == "9999" || !k && f == "4999") {
|
|
1072
1072
|
if (!k && (Se(w, w.e + Q + 2, 0), w.times(w).eq(I))) {
|
|
1073
1073
|
g = w;
|
|
@@ -1081,9 +1081,9 @@ function tn() {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
return Se(g, g.e + Q + 1, ie, l);
|
|
1083
1083
|
}, U.toExponential = function(l, f) {
|
|
1084
|
-
return l != null && (
|
|
1084
|
+
return l != null && (q(l, 0, $), l++), Ht(this, l, f, 1);
|
|
1085
1085
|
}, U.toFixed = function(l, f) {
|
|
1086
|
-
return l != null && (
|
|
1086
|
+
return l != null && (q(l, 0, $), l = l + this.e + 1), Ht(this, l, f);
|
|
1087
1087
|
}, U.toFormat = function(l, f, g) {
|
|
1088
1088
|
var k, w = this;
|
|
1089
1089
|
if (g == null)
|
|
@@ -1091,7 +1091,7 @@ function tn() {
|
|
|
1091
1091
|
else if (typeof g != "object")
|
|
1092
1092
|
throw Error(s + "Argument not an object: " + g);
|
|
1093
1093
|
if (k = w.toFixed(l, f), w.c) {
|
|
1094
|
-
var I,
|
|
1094
|
+
var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], C = j[1], D = w.s < 0, B = D ? A.slice(1) : A, ne = B.length;
|
|
1095
1095
|
if (v && (I = y, y = v, v = I, ne -= I), y > 0 && ne > 0) {
|
|
1096
1096
|
for (I = ne % y || y, A = B.substr(0, I); I < ne; I += y) A += S + B.substr(I, y);
|
|
1097
1097
|
v > 0 && (A += S + B.slice(I)), D && (A = "-" + A);
|
|
@@ -1103,31 +1103,31 @@ function tn() {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
return (g.prefix || "") + k + (g.suffix || "");
|
|
1105
1105
|
}, U.toFraction = function(l) {
|
|
1106
|
-
var f, g, k, w, I,
|
|
1106
|
+
var f, g, k, w, I, j, y, v, S, A, C, D, B = this, ne = B.c;
|
|
1107
1107
|
if (l != null && (y = new x(l), !y.isInteger() && (y.c || y.s !== 1) || y.lt(Y)))
|
|
1108
|
-
throw Error(s + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") +
|
|
1108
|
+
throw Error(s + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + Le(y));
|
|
1109
1109
|
if (!ne) return new x(B);
|
|
1110
|
-
for (f = new x(Y), S = g = new x(Y), k = v = new x(Y), D =
|
|
1110
|
+
for (f = new x(Y), S = g = new x(Y), k = v = new x(Y), D = W(ne), I = f.e = D.length - B.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = Ae, Ae = 1 / 0, y = new x(D), v.c[0] = 0; A = L(y, f, 0, 1), w = g.plus(A.times(k)), w.comparedTo(l) != 1; )
|
|
1111
1111
|
g = k, k = w, S = v.plus(A.times(w = S)), v = w, f = y.minus(A.times(w = f)), y = w;
|
|
1112
1112
|
return w = L(l.minus(g), k, 0, 1), v = v.plus(w.times(S)), g = g.plus(w.times(k)), v.s = S.s = B.s, I = I * 2, C = L(S, k, I, ie).minus(B).abs().comparedTo(
|
|
1113
1113
|
L(v, g, I, ie).minus(B).abs()
|
|
1114
|
-
) < 1 ? [S, k] : [v, g], Ae =
|
|
1114
|
+
) < 1 ? [S, k] : [v, g], Ae = j, C;
|
|
1115
1115
|
}, U.toNumber = function() {
|
|
1116
|
-
return +
|
|
1116
|
+
return +Le(this);
|
|
1117
1117
|
}, U.toPrecision = function(l, f) {
|
|
1118
|
-
return l != null &&
|
|
1118
|
+
return l != null && q(l, 1, $), Ht(this, l, f, 2);
|
|
1119
1119
|
}, U.toString = function(l) {
|
|
1120
1120
|
var f, g = this, k = g.s, w = g.e;
|
|
1121
|
-
return w === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = w <= ce || w >= de ? J(
|
|
1121
|
+
return w === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = w <= ce || w >= de ? J(W(g.c), w) : ae(W(g.c), w, "0") : l === 10 && Nt ? (g = Se(new x(g), Q + w + 1, ie), f = ae(W(g.c), g.e, "0")) : (q(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), w, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
|
|
1122
1122
|
}, U.valueOf = U.toJSON = function() {
|
|
1123
|
-
return
|
|
1123
|
+
return Le(this);
|
|
1124
1124
|
}, U._isBigNumber = !0, H != null && x.set(H), x;
|
|
1125
1125
|
}
|
|
1126
1126
|
function Z(H) {
|
|
1127
1127
|
var L = H | 0;
|
|
1128
1128
|
return H > 0 || H === L ? L : L - 1;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function W(H) {
|
|
1131
1131
|
for (var L, te, X = 1, U = H.length, Y = H[0] + ""; X < U; ) {
|
|
1132
1132
|
for (L = H[X++] + "", te = c - L.length; te--; L = "0" + L) ;
|
|
1133
1133
|
Y += L;
|
|
@@ -1145,7 +1145,7 @@ function tn() {
|
|
|
1145
1145
|
for (ie = (ce = U.length) < (de = Y.length) ? ce : de, Q = 0; Q < ie; Q++) if (U[Q] != Y[Q]) return U[Q] > Y[Q] ^ te ? 1 : -1;
|
|
1146
1146
|
return ce == de ? 0 : ce > de ^ te ? 1 : -1;
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function q(H, L, te, X) {
|
|
1149
1149
|
if (H < L || H > te || H !== a(H))
|
|
1150
1150
|
throw Error(s + (X || "Argument") + (typeof H == "number" ? H < L || H > te ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(H));
|
|
1151
1151
|
}
|
|
@@ -1167,13 +1167,13 @@ function tn() {
|
|
|
1167
1167
|
} else L < X && (H = H.slice(0, L) + "." + H.slice(L));
|
|
1168
1168
|
return H;
|
|
1169
1169
|
}
|
|
1170
|
-
n =
|
|
1171
|
-
})(
|
|
1170
|
+
n = E(), n.default = n.BigNumber = n, t.exports ? t.exports = n : (e || (e = typeof self < "u" && self ? self : window), e.BigNumber = n);
|
|
1171
|
+
})(En);
|
|
1172
1172
|
})(St)), St.exports;
|
|
1173
1173
|
}
|
|
1174
|
-
var
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1174
|
+
var Li;
|
|
1175
|
+
function qn() {
|
|
1176
|
+
return Li || (Li = 1, (function(t) {
|
|
1177
1177
|
var e = tn(), n = t.exports;
|
|
1178
1178
|
(function() {
|
|
1179
1179
|
var i = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, o, a, s = {
|
|
@@ -1193,47 +1193,47 @@ function En() {
|
|
|
1193
1193
|
}) + '"' : '"' + p + '"';
|
|
1194
1194
|
}
|
|
1195
1195
|
function c(p, u) {
|
|
1196
|
-
var m,
|
|
1197
|
-
switch (
|
|
1196
|
+
var m, $, E, Z, W = o, K, q = u[p], N = q != null && (q instanceof e || e.isBigNumber(q));
|
|
1197
|
+
switch (q && typeof q == "object" && typeof q.toJSON == "function" && (q = q.toJSON(p)), typeof r == "function" && (q = r.call(u, p, q)), typeof q) {
|
|
1198
1198
|
case "string":
|
|
1199
|
-
return N ?
|
|
1199
|
+
return N ? q : d(q);
|
|
1200
1200
|
case "number":
|
|
1201
|
-
return isFinite(
|
|
1201
|
+
return isFinite(q) ? String(q) : "null";
|
|
1202
1202
|
case "boolean":
|
|
1203
1203
|
case "null":
|
|
1204
1204
|
case "bigint":
|
|
1205
|
-
return String(
|
|
1205
|
+
return String(q);
|
|
1206
1206
|
// If the type is 'object', we might be dealing with an object or an array or
|
|
1207
1207
|
// null.
|
|
1208
1208
|
case "object":
|
|
1209
|
-
if (!
|
|
1209
|
+
if (!q)
|
|
1210
1210
|
return "null";
|
|
1211
|
-
if (o += a, K = [], Object.prototype.toString.apply(
|
|
1212
|
-
for (Z =
|
|
1213
|
-
K[m] = c(m,
|
|
1214
|
-
return
|
|
1211
|
+
if (o += a, K = [], Object.prototype.toString.apply(q) === "[object Array]") {
|
|
1212
|
+
for (Z = q.length, m = 0; m < Z; m += 1)
|
|
1213
|
+
K[m] = c(m, q) || "null";
|
|
1214
|
+
return E = K.length === 0 ? "[]" : o ? `[
|
|
1215
1215
|
` + o + K.join(`,
|
|
1216
1216
|
` + o) + `
|
|
1217
|
-
` +
|
|
1217
|
+
` + W + "]" : "[" + K.join(",") + "]", o = W, E;
|
|
1218
1218
|
}
|
|
1219
1219
|
if (r && typeof r == "object")
|
|
1220
1220
|
for (Z = r.length, m = 0; m < Z; m += 1)
|
|
1221
|
-
typeof r[m] == "string" && (
|
|
1221
|
+
typeof r[m] == "string" && ($ = r[m], E = c($, q), E && K.push(d($) + (o ? ": " : ":") + E));
|
|
1222
1222
|
else
|
|
1223
|
-
Object.keys(
|
|
1224
|
-
var ae = c(J,
|
|
1223
|
+
Object.keys(q).forEach(function(J) {
|
|
1224
|
+
var ae = c(J, q);
|
|
1225
1225
|
ae && K.push(d(J) + (o ? ": " : ":") + ae);
|
|
1226
1226
|
});
|
|
1227
|
-
return
|
|
1227
|
+
return E = K.length === 0 ? "{}" : o ? `{
|
|
1228
1228
|
` + o + K.join(`,
|
|
1229
1229
|
` + o) + `
|
|
1230
|
-
` +
|
|
1230
|
+
` + W + "}" : "{" + K.join(",") + "}", o = W, E;
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
typeof n.stringify != "function" && (n.stringify = function(p, u, m) {
|
|
1234
|
-
var
|
|
1234
|
+
var $;
|
|
1235
1235
|
if (o = "", a = "", typeof m == "number")
|
|
1236
|
-
for (
|
|
1236
|
+
for ($ = 0; $ < m; $ += 1)
|
|
1237
1237
|
a += " ";
|
|
1238
1238
|
else typeof m == "string" && (a = m);
|
|
1239
1239
|
if (r = u, u && typeof u != "function" && (typeof u != "object" || typeof u.length != "number"))
|
|
@@ -1243,10 +1243,10 @@ function En() {
|
|
|
1243
1243
|
})();
|
|
1244
1244
|
})(Wt)), Wt.exports;
|
|
1245
1245
|
}
|
|
1246
|
-
var Gt,
|
|
1246
|
+
var Gt, Ni;
|
|
1247
1247
|
function _n() {
|
|
1248
|
-
if (
|
|
1249
|
-
|
|
1248
|
+
if (Ni) return Gt;
|
|
1249
|
+
Ni = 1;
|
|
1250
1250
|
var t = null;
|
|
1251
1251
|
const e = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, n = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
|
|
1252
1252
|
var i = function(o) {
|
|
@@ -1311,7 +1311,7 @@ function _n() {
|
|
|
1311
1311
|
p("Bad number");
|
|
1312
1312
|
else
|
|
1313
1313
|
return t == null && (t = tn()), J.length > 15 ? a.storeAsString ? J : a.useNativeBigInt ? BigInt(J) : new t(J) : a.alwaysParseAsBig ? a.useNativeBigInt ? BigInt(N) : new t(N) : N;
|
|
1314
|
-
},
|
|
1314
|
+
}, $ = function() {
|
|
1315
1315
|
var N, J, ae = "", H;
|
|
1316
1316
|
if (r === '"')
|
|
1317
1317
|
for (var L = s; u(); ) {
|
|
@@ -1330,7 +1330,7 @@ function _n() {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
}
|
|
1332
1332
|
p("Bad string");
|
|
1333
|
-
},
|
|
1333
|
+
}, E = function() {
|
|
1334
1334
|
for (; r && r <= " "; )
|
|
1335
1335
|
u();
|
|
1336
1336
|
}, Z = function() {
|
|
@@ -1343,39 +1343,39 @@ function _n() {
|
|
|
1343
1343
|
return u("n"), u("u"), u("l"), u("l"), null;
|
|
1344
1344
|
}
|
|
1345
1345
|
p("Unexpected '" + r + "'");
|
|
1346
|
-
},
|
|
1346
|
+
}, W, K = function() {
|
|
1347
1347
|
var N = [];
|
|
1348
1348
|
if (r === "[") {
|
|
1349
|
-
if (u("["),
|
|
1349
|
+
if (u("["), E(), r === "]")
|
|
1350
1350
|
return u("]"), N;
|
|
1351
1351
|
for (; r; ) {
|
|
1352
|
-
if (N.push(
|
|
1352
|
+
if (N.push(W()), E(), r === "]")
|
|
1353
1353
|
return u("]"), N;
|
|
1354
|
-
u(","),
|
|
1354
|
+
u(","), E();
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
1357
|
p("Bad array");
|
|
1358
|
-
},
|
|
1358
|
+
}, q = function() {
|
|
1359
1359
|
var N, J = /* @__PURE__ */ Object.create(null);
|
|
1360
1360
|
if (r === "{") {
|
|
1361
|
-
if (u("{"),
|
|
1361
|
+
if (u("{"), E(), r === "}")
|
|
1362
1362
|
return u("}"), J;
|
|
1363
1363
|
for (; r; ) {
|
|
1364
|
-
if (N =
|
|
1364
|
+
if (N = $(), E(), u(":"), a.strict === !0 && Object.hasOwnProperty.call(J, N) && p('Duplicate key "' + N + '"'), e.test(N) === !0 ? a.protoAction === "error" ? p("Object contains forbidden prototype property") : a.protoAction === "ignore" ? W() : J[N] = W() : n.test(N) === !0 ? a.constructorAction === "error" ? p("Object contains forbidden constructor property") : a.constructorAction === "ignore" ? W() : J[N] = W() : J[N] = W(), E(), r === "}")
|
|
1365
1365
|
return u("}"), J;
|
|
1366
|
-
u(","),
|
|
1366
|
+
u(","), E();
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
p("Bad object");
|
|
1370
1370
|
};
|
|
1371
|
-
return
|
|
1372
|
-
switch (
|
|
1371
|
+
return W = function() {
|
|
1372
|
+
switch (E(), r) {
|
|
1373
1373
|
case "{":
|
|
1374
|
-
return
|
|
1374
|
+
return q();
|
|
1375
1375
|
case "[":
|
|
1376
1376
|
return K();
|
|
1377
1377
|
case '"':
|
|
1378
|
-
return
|
|
1378
|
+
return $();
|
|
1379
1379
|
case "-":
|
|
1380
1380
|
return m();
|
|
1381
1381
|
default:
|
|
@@ -1383,7 +1383,7 @@ function _n() {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
}, function(N, J) {
|
|
1385
1385
|
var ae;
|
|
1386
|
-
return c = N + "", s = 0, r = " ", ae =
|
|
1386
|
+
return c = N + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
|
|
1387
1387
|
var X, U = L[te];
|
|
1388
1388
|
return U && typeof U == "object" && Object.keys(U).forEach(function(Y) {
|
|
1389
1389
|
X = H(U, Y), X !== void 0 ? U[Y] = X : delete U[Y];
|
|
@@ -1393,11 +1393,11 @@ function _n() {
|
|
|
1393
1393
|
};
|
|
1394
1394
|
return Gt = i, Gt;
|
|
1395
1395
|
}
|
|
1396
|
-
var
|
|
1396
|
+
var Hi;
|
|
1397
1397
|
function Ln() {
|
|
1398
|
-
if (
|
|
1399
|
-
|
|
1400
|
-
var t =
|
|
1398
|
+
if (Hi) return dt.exports;
|
|
1399
|
+
Hi = 1;
|
|
1400
|
+
var t = qn().stringify, e = _n();
|
|
1401
1401
|
return dt.exports = function(n) {
|
|
1402
1402
|
return {
|
|
1403
1403
|
parse: e(n),
|
|
@@ -1406,7 +1406,7 @@ function Ln() {
|
|
|
1406
1406
|
}, dt.exports.parse = e(), dt.exports.stringify = t, dt.exports;
|
|
1407
1407
|
}
|
|
1408
1408
|
var Nn = Ln();
|
|
1409
|
-
const
|
|
1409
|
+
const vi = /* @__PURE__ */ Rn(Nn);
|
|
1410
1410
|
function Ie(t, e, n, i) {
|
|
1411
1411
|
function o(a) {
|
|
1412
1412
|
return a instanceof n ? a : new n(function(s) {
|
|
@@ -1438,8 +1438,8 @@ function Hn(t, e, n, i) {
|
|
|
1438
1438
|
if (typeof e == "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1439
1439
|
return n === "m" ? i : n === "a" ? i.call(t) : i ? i.value : e.get(t);
|
|
1440
1440
|
}
|
|
1441
|
-
var
|
|
1442
|
-
class
|
|
1441
|
+
var $t, nn;
|
|
1442
|
+
class Ve {
|
|
1443
1443
|
/**
|
|
1444
1444
|
* Uses the provided ID as the ID for the resource.
|
|
1445
1445
|
*
|
|
@@ -1456,7 +1456,7 @@ class Xe {
|
|
|
1456
1456
|
* @returns {string}
|
|
1457
1457
|
*/
|
|
1458
1458
|
static unique(e = 7) {
|
|
1459
|
-
const n = Hn(
|
|
1459
|
+
const n = Hn($t, $t, "m", nn).call($t);
|
|
1460
1460
|
let i = "";
|
|
1461
1461
|
for (let o = 0; o < e; o++) {
|
|
1462
1462
|
const a = Math.floor(Math.random() * 16).toString(16);
|
|
@@ -1465,11 +1465,11 @@ class Xe {
|
|
|
1465
1465
|
return n + i;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
|
|
1468
|
+
$t = Ve, nn = function() {
|
|
1469
1469
|
const e = /* @__PURE__ */ new Date(), n = Math.floor(e.getTime() / 1e3), i = e.getMilliseconds();
|
|
1470
1470
|
return n.toString(16) + i.toString(16).padStart(5, "0");
|
|
1471
1471
|
};
|
|
1472
|
-
const
|
|
1472
|
+
const Et = vi({ useNativeBigInt: !0 });
|
|
1473
1473
|
class P {
|
|
1474
1474
|
/**
|
|
1475
1475
|
* Constructor for Query class.
|
|
@@ -1487,7 +1487,7 @@ class P {
|
|
|
1487
1487
|
* @returns {string}
|
|
1488
1488
|
*/
|
|
1489
1489
|
toString() {
|
|
1490
|
-
return
|
|
1490
|
+
return Et.stringify({
|
|
1491
1491
|
method: this.method,
|
|
1492
1492
|
attribute: this.attribute,
|
|
1493
1493
|
values: this.values
|
|
@@ -1537,9 +1537,9 @@ P.createdBetween = (t, e) => P.between("$createdAt", t, e);
|
|
|
1537
1537
|
P.updatedBefore = (t) => P.lessThan("$updatedAt", t);
|
|
1538
1538
|
P.updatedAfter = (t) => P.greaterThan("$updatedAt", t);
|
|
1539
1539
|
P.updatedBetween = (t, e) => P.between("$updatedAt", t, e);
|
|
1540
|
-
P.or = (t) => new P("or", void 0, t.map((e) =>
|
|
1541
|
-
P.and = (t) => new P("and", void 0, t.map((e) =>
|
|
1542
|
-
P.elemMatch = (t, e) => new P("elemMatch", t, e.map((n) =>
|
|
1540
|
+
P.or = (t) => new P("or", void 0, t.map((e) => Et.parse(e))).toString();
|
|
1541
|
+
P.and = (t) => new P("and", void 0, t.map((e) => Et.parse(e))).toString();
|
|
1542
|
+
P.elemMatch = (t, e) => new P("elemMatch", t, e.map((n) => Et.parse(n))).toString();
|
|
1543
1543
|
P.distanceEqual = (t, e, n, i = !0) => new P("distanceEqual", t, [
|
|
1544
1544
|
[e, n, i]
|
|
1545
1545
|
]).toString();
|
|
@@ -1569,7 +1569,7 @@ P.overlaps = (t, e) => new P("overlaps", t, [e]).toString();
|
|
|
1569
1569
|
P.notOverlaps = (t, e) => new P("notOverlaps", t, [e]).toString();
|
|
1570
1570
|
P.touches = (t, e) => new P("touches", t, [e]).toString();
|
|
1571
1571
|
P.notTouches = (t, e) => new P("notTouches", t, [e]).toString();
|
|
1572
|
-
const Dn =
|
|
1572
|
+
const Dn = vi({ storeAsString: !1 }), Bn = vi({ useNativeBigInt: !0 }), Xn = BigInt(Number.MAX_SAFE_INTEGER), Vn = BigInt(Number.MIN_SAFE_INTEGER), Wn = BigInt("9223372036854775807"), Gn = BigInt("-9223372036854775808");
|
|
1573
1573
|
function Kn(t) {
|
|
1574
1574
|
return t !== null && typeof t == "object" && t._isBigNumber === !0 && typeof t.isInteger == "function" && typeof t.toFixed == "function" && typeof t.toNumber == "function";
|
|
1575
1575
|
}
|
|
@@ -1677,10 +1677,10 @@ class Ce {
|
|
|
1677
1677
|
this.realtime.reconnect = !0;
|
|
1678
1678
|
return;
|
|
1679
1679
|
}
|
|
1680
|
-
const
|
|
1681
|
-
console.error(`Realtime got disconnected. Reconnect will be attempted in ${
|
|
1680
|
+
const $ = this.realtime.getTimeout();
|
|
1681
|
+
console.error(`Realtime got disconnected. Reconnect will be attempted in ${$ / 1e3} seconds.`, c.reason), setTimeout(() => {
|
|
1682
1682
|
this.realtime.reconnectAttempts++, this.realtime.createSocket();
|
|
1683
|
-
},
|
|
1683
|
+
}, $);
|
|
1684
1684
|
})) : ((a = this.realtime.socket) === null || a === void 0 ? void 0 : a.readyState) === WebSocket.OPEN && this.realtime.sendPendingSubscribes();
|
|
1685
1685
|
},
|
|
1686
1686
|
sendPendingSubscribes: () => {
|
|
@@ -1955,7 +1955,7 @@ class Ce {
|
|
|
1955
1955
|
let r = "";
|
|
1956
1956
|
const d = this.realtime.subscriptions.size + 1;
|
|
1957
1957
|
for (let c = 0; c < d; c++) {
|
|
1958
|
-
const p =
|
|
1958
|
+
const p = Ve.unique();
|
|
1959
1959
|
if (!this.realtime.subscriptions.has(p)) {
|
|
1960
1960
|
r = p;
|
|
1961
1961
|
break;
|
|
@@ -2022,9 +2022,9 @@ class Ce {
|
|
|
2022
2022
|
throw new Error("File not found in payload");
|
|
2023
2023
|
if (p.size <= Ce.CHUNK_SIZE)
|
|
2024
2024
|
return yield this.call(i, o, a, s);
|
|
2025
|
-
const u = Math.ceil(p.size / Ce.CHUNK_SIZE), m = Math.min(Ce.CHUNK_SIZE, p.size),
|
|
2026
|
-
Z[c] = new File([
|
|
2027
|
-
const
|
|
2025
|
+
const u = Math.ceil(p.size / Ce.CHUNK_SIZE), m = Math.min(Ce.CHUNK_SIZE, p.size), $ = Object.assign(Object.assign({}, a), { "content-range": `bytes 0-${m - 1}/${p.size}` }), E = p.slice(0, m), Z = Object.assign({}, s);
|
|
2026
|
+
Z[c] = new File([E], p.name);
|
|
2027
|
+
const W = yield this.call(i, o, $, Z), K = W?.$id;
|
|
2028
2028
|
if (r && typeof r == "function" && r({
|
|
2029
2029
|
$id: K,
|
|
2030
2030
|
progress: Math.round(m / p.size * 100),
|
|
@@ -2032,14 +2032,14 @@ class Ce {
|
|
|
2032
2032
|
chunksTotal: u,
|
|
2033
2033
|
chunksUploaded: 1
|
|
2034
2034
|
}), u === 1)
|
|
2035
|
-
return
|
|
2036
|
-
const
|
|
2035
|
+
return W;
|
|
2036
|
+
const q = [];
|
|
2037
2037
|
for (let Y = 1; Y < u; Y++) {
|
|
2038
2038
|
const Q = Y * Ce.CHUNK_SIZE, ie = Math.min(Q + Ce.CHUNK_SIZE, p.size);
|
|
2039
|
-
|
|
2039
|
+
q.push({ start: Q, end: ie });
|
|
2040
2040
|
}
|
|
2041
2041
|
const N = 8;
|
|
2042
|
-
let J = 1, ae = m, H =
|
|
2042
|
+
let J = 1, ae = m, H = W, L = null, te = !1;
|
|
2043
2043
|
const X = (Y) => {
|
|
2044
2044
|
var Q;
|
|
2045
2045
|
const ie = Y?.chunksUploaded, ce = (Q = Y?.chunksTotal) !== null && Q !== void 0 ? Q : u;
|
|
@@ -2062,16 +2062,16 @@ class Ce {
|
|
|
2062
2062
|
let ie = 0, ce = 0, de = 0;
|
|
2063
2063
|
const Ue = () => {
|
|
2064
2064
|
if (!te) {
|
|
2065
|
-
if (de ===
|
|
2065
|
+
if (de === q.length) {
|
|
2066
2066
|
Y();
|
|
2067
2067
|
return;
|
|
2068
2068
|
}
|
|
2069
|
-
for (; ce < N && ie <
|
|
2070
|
-
const Ae =
|
|
2069
|
+
for (; ce < N && ie < q.length; ) {
|
|
2070
|
+
const Ae = q[ie++];
|
|
2071
2071
|
ce++, U(Ae).then(() => {
|
|
2072
2072
|
ce--, de++, Ue();
|
|
2073
|
-
}).catch((
|
|
2074
|
-
te = !0, Q(
|
|
2073
|
+
}).catch((_e) => {
|
|
2074
|
+
te = !0, Q(_e);
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
2077
|
}
|
|
@@ -2092,24 +2092,24 @@ class Ce {
|
|
|
2092
2092
|
return Ie(this, arguments, void 0, function* (i, o, a = {}, s = {}, r = "json") {
|
|
2093
2093
|
var d, c, p;
|
|
2094
2094
|
const { uri: u, options: m } = this.prepareRequest(i, o, a, s);
|
|
2095
|
-
let
|
|
2096
|
-
const
|
|
2097
|
-
if (
|
|
2095
|
+
let $ = null;
|
|
2096
|
+
const E = yield fetch(u, m);
|
|
2097
|
+
if (E.type === "opaque")
|
|
2098
2098
|
throw new h(`Invalid Origin. Register your new client (${window.location.host}) as a new Web platform on your project console dashboard`, 403, "forbidden", "");
|
|
2099
|
-
const Z =
|
|
2100
|
-
if (Z && Z.split(";").forEach((K) => console.warn("Warning: " + K)), !((d =
|
|
2101
|
-
message: yield
|
|
2102
|
-
}, 400 <=
|
|
2099
|
+
const Z = E.headers.get("x-appwrite-warning");
|
|
2100
|
+
if (Z && Z.split(";").forEach((K) => console.warn("Warning: " + K)), !((d = E.headers.get("content-type")) === null || d === void 0) && d.includes("application/json") ? $ = we.parse(yield E.text()) : r === "arrayBuffer" ? $ = yield E.arrayBuffer() : $ = {
|
|
2101
|
+
message: yield E.text()
|
|
2102
|
+
}, 400 <= E.status) {
|
|
2103
2103
|
let K;
|
|
2104
|
-
throw !((c =
|
|
2104
|
+
throw !((c = E.headers.get("content-type")) === null || c === void 0) && c.includes("application/json") || r === "arrayBuffer" ? K = we.stringify($) : K = $?.message, new h((p = $?.message) !== null && p !== void 0 ? p : K, E.status, $?.type, K);
|
|
2105
2105
|
}
|
|
2106
|
-
const
|
|
2107
|
-
return typeof window < "u" && window.localStorage &&
|
|
2108
|
-
value: () => we.stringify(
|
|
2106
|
+
const W = E.headers.get("X-Fallback-Cookies");
|
|
2107
|
+
return typeof window < "u" && window.localStorage && W && (window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."), window.localStorage.setItem("cookieFallback", W)), $ && typeof $ == "object" && Object.defineProperty($, "toString", {
|
|
2108
|
+
value: () => we.stringify($),
|
|
2109
2109
|
writable: !0,
|
|
2110
2110
|
enumerable: !1,
|
|
2111
2111
|
configurable: !0
|
|
2112
|
-
}),
|
|
2112
|
+
}), $;
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
2115
2115
|
static flatten(e, n = "") {
|
|
@@ -3351,13 +3351,13 @@ class on {
|
|
|
3351
3351
|
emailHash: n[5],
|
|
3352
3352
|
name: n[6]
|
|
3353
3353
|
};
|
|
3354
|
-
const o = i.width, a = i.height, s = i.quality, r = i.output, d = i.rating, c = i.userId, p = i.emailHash, u = i.name, m = "/avatars/photo",
|
|
3355
|
-
typeof o < "u" && (
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3358
|
-
for (const [Z,
|
|
3359
|
-
|
|
3360
|
-
return
|
|
3354
|
+
const o = i.width, a = i.height, s = i.quality, r = i.output, d = i.rating, c = i.userId, p = i.emailHash, u = i.name, m = "/avatars/photo", $ = {};
|
|
3355
|
+
typeof o < "u" && ($.width = o), typeof a < "u" && ($.height = a), typeof s < "u" && ($.quality = s), typeof r < "u" && ($.output = r), typeof d < "u" && ($.rating = d), typeof c < "u" && ($.userId = c), typeof p < "u" && ($.emailHash = p), typeof u < "u" && ($.name = u);
|
|
3356
|
+
const E = new URL(this.client.config.endpoint + m);
|
|
3357
|
+
$.project = this.client.config.project, $.impersonateuserid = this.client.config.impersonateuserid;
|
|
3358
|
+
for (const [Z, W] of Object.entries(ye.flatten($)))
|
|
3359
|
+
E.searchParams.append(Z, W);
|
|
3360
|
+
return E.toString();
|
|
3361
3361
|
}
|
|
3362
3362
|
getQR(e, ...n) {
|
|
3363
3363
|
let i;
|
|
@@ -3402,11 +3402,11 @@ class on {
|
|
|
3402
3402
|
quality: n[17],
|
|
3403
3403
|
output: n[18]
|
|
3404
3404
|
};
|
|
3405
|
-
const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale,
|
|
3405
|
+
const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, q = i.permissions, N = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
|
|
3406
3406
|
if (typeof o > "u")
|
|
3407
3407
|
throw new h('Missing required parameter: "url"');
|
|
3408
3408
|
const te = "/avatars/screenshots", X = {};
|
|
3409
|
-
typeof o < "u" && (X.url = o), typeof a < "u" && (X.headers = a), typeof s < "u" && (X.viewportWidth = s), typeof r < "u" && (X.viewportHeight = r), typeof d < "u" && (X.scale = d), typeof c < "u" && (X.theme = c), typeof p < "u" && (X.userAgent = p), typeof u < "u" && (X.fullpage = u), typeof m < "u" && (X.locale = m), typeof
|
|
3409
|
+
typeof o < "u" && (X.url = o), typeof a < "u" && (X.headers = a), typeof s < "u" && (X.viewportWidth = s), typeof r < "u" && (X.viewportHeight = r), typeof d < "u" && (X.scale = d), typeof c < "u" && (X.theme = c), typeof p < "u" && (X.userAgent = p), typeof u < "u" && (X.fullpage = u), typeof m < "u" && (X.locale = m), typeof $ < "u" && (X.timezone = $), typeof E < "u" && (X.latitude = E), typeof Z < "u" && (X.longitude = Z), typeof W < "u" && (X.accuracy = W), typeof K < "u" && (X.touch = K), typeof q < "u" && (X.permissions = q), typeof N < "u" && (X.sleep = N), typeof J < "u" && (X.width = J), typeof ae < "u" && (X.height = ae), typeof H < "u" && (X.quality = H), typeof L < "u" && (X.output = L);
|
|
3410
3410
|
const U = new URL(this.client.config.endpoint + te);
|
|
3411
3411
|
X.project = this.client.config.project, X.impersonateuserid = this.client.config.impersonateuserid;
|
|
3412
3412
|
for (const [Y, Q] of Object.entries(ye.flatten(X)))
|
|
@@ -3527,11 +3527,11 @@ class Jn {
|
|
|
3527
3527
|
throw new h('Missing required parameter: "collectionId"');
|
|
3528
3528
|
const p = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
3529
3529
|
typeof s < "u" && (u.queries = s), typeof r < "u" && (u.transactionId = r), typeof d < "u" && (u.total = d), typeof c < "u" && (u.ttl = c);
|
|
3530
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3530
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3531
3531
|
"X-Appwrite-Project": this.client.config.project,
|
|
3532
3532
|
accept: "application/json"
|
|
3533
3533
|
};
|
|
3534
|
-
return this.client.call("get", m,
|
|
3534
|
+
return this.client.call("get", m, $, u);
|
|
3535
3535
|
}
|
|
3536
3536
|
createDocument(e, ...n) {
|
|
3537
3537
|
let i;
|
|
@@ -3554,12 +3554,12 @@ class Jn {
|
|
|
3554
3554
|
throw new h('Missing required parameter: "data"');
|
|
3555
3555
|
const p = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
3556
3556
|
typeof s < "u" && (u.documentId = s), typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3557
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3557
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3558
3558
|
"X-Appwrite-Project": this.client.config.project,
|
|
3559
3559
|
"content-type": "application/json",
|
|
3560
3560
|
accept: "application/json"
|
|
3561
3561
|
};
|
|
3562
|
-
return this.client.call("post", m,
|
|
3562
|
+
return this.client.call("post", m, $, u);
|
|
3563
3563
|
}
|
|
3564
3564
|
getDocument(e, ...n) {
|
|
3565
3565
|
let i;
|
|
@@ -3604,12 +3604,12 @@ class Jn {
|
|
|
3604
3604
|
throw new h('Missing required parameter: "documentId"');
|
|
3605
3605
|
const p = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
3606
3606
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3607
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3607
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3608
3608
|
"X-Appwrite-Project": this.client.config.project,
|
|
3609
3609
|
"content-type": "application/json",
|
|
3610
3610
|
accept: "application/json"
|
|
3611
3611
|
};
|
|
3612
|
-
return this.client.call("put", m,
|
|
3612
|
+
return this.client.call("put", m, $, u);
|
|
3613
3613
|
}
|
|
3614
3614
|
updateDocument(e, ...n) {
|
|
3615
3615
|
let i;
|
|
@@ -3630,12 +3630,12 @@ class Jn {
|
|
|
3630
3630
|
throw new h('Missing required parameter: "documentId"');
|
|
3631
3631
|
const p = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
3632
3632
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3633
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3633
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3634
3634
|
"X-Appwrite-Project": this.client.config.project,
|
|
3635
3635
|
"content-type": "application/json",
|
|
3636
3636
|
accept: "application/json"
|
|
3637
3637
|
};
|
|
3638
|
-
return this.client.call("patch", m,
|
|
3638
|
+
return this.client.call("patch", m, $, u);
|
|
3639
3639
|
}
|
|
3640
3640
|
deleteDocument(e, ...n) {
|
|
3641
3641
|
let i;
|
|
@@ -3682,12 +3682,12 @@ class Jn {
|
|
|
3682
3682
|
throw new h('Missing required parameter: "attribute"');
|
|
3683
3683
|
const u = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))).replace("{attribute}", encodeURIComponent(String(r))), m = {};
|
|
3684
3684
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.min = c), typeof p < "u" && (m.transactionId = p);
|
|
3685
|
-
const
|
|
3685
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
3686
3686
|
"X-Appwrite-Project": this.client.config.project,
|
|
3687
3687
|
"content-type": "application/json",
|
|
3688
3688
|
accept: "application/json"
|
|
3689
3689
|
};
|
|
3690
|
-
return this.client.call("patch",
|
|
3690
|
+
return this.client.call("patch", $, E, m);
|
|
3691
3691
|
}
|
|
3692
3692
|
incrementDocumentAttribute(e, ...n) {
|
|
3693
3693
|
let i;
|
|
@@ -3711,12 +3711,12 @@ class Jn {
|
|
|
3711
3711
|
throw new h('Missing required parameter: "attribute"');
|
|
3712
3712
|
const u = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))).replace("{attribute}", encodeURIComponent(String(r))), m = {};
|
|
3713
3713
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.max = c), typeof p < "u" && (m.transactionId = p);
|
|
3714
|
-
const
|
|
3714
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
3715
3715
|
"X-Appwrite-Project": this.client.config.project,
|
|
3716
3716
|
"content-type": "application/json",
|
|
3717
3717
|
accept: "application/json"
|
|
3718
3718
|
};
|
|
3719
|
-
return this.client.call("patch",
|
|
3719
|
+
return this.client.call("patch", $, E, m);
|
|
3720
3720
|
}
|
|
3721
3721
|
}
|
|
3722
3722
|
class Zn {
|
|
@@ -3832,11 +3832,11 @@ class Zn {
|
|
|
3832
3832
|
throw new h('Missing required parameter: "collectionId"');
|
|
3833
3833
|
const p = "/documentsdb/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
3834
3834
|
typeof s < "u" && (u.queries = s), typeof r < "u" && (u.transactionId = r), typeof d < "u" && (u.total = d), typeof c < "u" && (u.ttl = c);
|
|
3835
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3835
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3836
3836
|
"X-Appwrite-Project": this.client.config.project,
|
|
3837
3837
|
accept: "application/json"
|
|
3838
3838
|
};
|
|
3839
|
-
return this.client.call("get", m,
|
|
3839
|
+
return this.client.call("get", m, $, u);
|
|
3840
3840
|
}
|
|
3841
3841
|
createDocument(e, ...n) {
|
|
3842
3842
|
let i;
|
|
@@ -3859,12 +3859,12 @@ class Zn {
|
|
|
3859
3859
|
throw new h('Missing required parameter: "data"');
|
|
3860
3860
|
const p = "/documentsdb/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
3861
3861
|
typeof s < "u" && (u.documentId = s), typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3862
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3862
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3863
3863
|
"X-Appwrite-Project": this.client.config.project,
|
|
3864
3864
|
"content-type": "application/json",
|
|
3865
3865
|
accept: "application/json"
|
|
3866
3866
|
};
|
|
3867
|
-
return this.client.call("post", m,
|
|
3867
|
+
return this.client.call("post", m, $, u);
|
|
3868
3868
|
}
|
|
3869
3869
|
createDocuments(e, ...n) {
|
|
3870
3870
|
let i;
|
|
@@ -3933,12 +3933,12 @@ class Zn {
|
|
|
3933
3933
|
throw new h('Missing required parameter: "documentId"');
|
|
3934
3934
|
const p = "/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
3935
3935
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3936
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3936
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3937
3937
|
"X-Appwrite-Project": this.client.config.project,
|
|
3938
3938
|
"content-type": "application/json",
|
|
3939
3939
|
accept: "application/json"
|
|
3940
3940
|
};
|
|
3941
|
-
return this.client.call("put", m,
|
|
3941
|
+
return this.client.call("put", m, $, u);
|
|
3942
3942
|
}
|
|
3943
3943
|
updateDocument(e, ...n) {
|
|
3944
3944
|
let i;
|
|
@@ -3959,12 +3959,12 @@ class Zn {
|
|
|
3959
3959
|
throw new h('Missing required parameter: "documentId"');
|
|
3960
3960
|
const p = "/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
3961
3961
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
3962
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
3962
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
3963
3963
|
"X-Appwrite-Project": this.client.config.project,
|
|
3964
3964
|
"content-type": "application/json",
|
|
3965
3965
|
accept: "application/json"
|
|
3966
3966
|
};
|
|
3967
|
-
return this.client.call("patch", m,
|
|
3967
|
+
return this.client.call("patch", m, $, u);
|
|
3968
3968
|
}
|
|
3969
3969
|
deleteDocument(e, ...n) {
|
|
3970
3970
|
let i;
|
|
@@ -4011,12 +4011,12 @@ class Zn {
|
|
|
4011
4011
|
throw new h('Missing required parameter: "attribute"');
|
|
4012
4012
|
const u = "/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))).replace("{attribute}", encodeURIComponent(String(r))), m = {};
|
|
4013
4013
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.min = c), typeof p < "u" && (m.transactionId = p);
|
|
4014
|
-
const
|
|
4014
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
4015
4015
|
"X-Appwrite-Project": this.client.config.project,
|
|
4016
4016
|
"content-type": "application/json",
|
|
4017
4017
|
accept: "application/json"
|
|
4018
4018
|
};
|
|
4019
|
-
return this.client.call("patch",
|
|
4019
|
+
return this.client.call("patch", $, E, m);
|
|
4020
4020
|
}
|
|
4021
4021
|
incrementDocumentAttribute(e, ...n) {
|
|
4022
4022
|
let i;
|
|
@@ -4040,12 +4040,12 @@ class Zn {
|
|
|
4040
4040
|
throw new h('Missing required parameter: "attribute"');
|
|
4041
4041
|
const u = "/documentsdb/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))).replace("{attribute}", encodeURIComponent(String(r))), m = {};
|
|
4042
4042
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.max = c), typeof p < "u" && (m.transactionId = p);
|
|
4043
|
-
const
|
|
4043
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
4044
4044
|
"X-Appwrite-Project": this.client.config.project,
|
|
4045
4045
|
"content-type": "application/json",
|
|
4046
4046
|
accept: "application/json"
|
|
4047
4047
|
};
|
|
4048
|
-
return this.client.call("patch",
|
|
4048
|
+
return this.client.call("patch", $, E, m);
|
|
4049
4049
|
}
|
|
4050
4050
|
}
|
|
4051
4051
|
class Qn {
|
|
@@ -4086,12 +4086,12 @@ class Qn {
|
|
|
4086
4086
|
throw new h('Missing required parameter: "functionId"');
|
|
4087
4087
|
const u = "/functions/{functionId}/executions".replace("{functionId}", encodeURIComponent(String(o))), m = {};
|
|
4088
4088
|
typeof a < "u" && (m.body = a), typeof s < "u" && (m.async = s), typeof r < "u" && (m.path = r), typeof d < "u" && (m.method = d), typeof c < "u" && (m.headers = c), typeof p < "u" && (m.scheduledAt = p);
|
|
4089
|
-
const
|
|
4089
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
4090
4090
|
"X-Appwrite-Project": this.client.config.project,
|
|
4091
4091
|
"content-type": "application/json",
|
|
4092
4092
|
accept: "application/json"
|
|
4093
4093
|
};
|
|
4094
|
-
return this.client.call("post",
|
|
4094
|
+
return this.client.call("post", $, E, m);
|
|
4095
4095
|
}
|
|
4096
4096
|
getExecution(e, ...n) {
|
|
4097
4097
|
let i;
|
|
@@ -4463,12 +4463,12 @@ class eo {
|
|
|
4463
4463
|
throw new h('Missing required parameter: "presenceId"');
|
|
4464
4464
|
const p = "/presences/{presenceId}".replace("{presenceId}", encodeURIComponent(String(o))), u = {};
|
|
4465
4465
|
typeof a < "u" && (u.status = a), typeof s < "u" && (u.expiresAt = s), typeof r < "u" && (u.metadata = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.purge = c);
|
|
4466
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4466
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4467
4467
|
"X-Appwrite-Project": this.client.config.project,
|
|
4468
4468
|
"content-type": "application/json",
|
|
4469
4469
|
accept: "application/json"
|
|
4470
4470
|
};
|
|
4471
|
-
return this.client.call("patch", m,
|
|
4471
|
+
return this.client.call("patch", m, $, u);
|
|
4472
4472
|
}
|
|
4473
4473
|
delete(e) {
|
|
4474
4474
|
let n;
|
|
@@ -4526,12 +4526,12 @@ class to {
|
|
|
4526
4526
|
throw new h('Missing required parameter: "file"');
|
|
4527
4527
|
const p = "/storage/buckets/{bucketId}/files".replace("{bucketId}", encodeURIComponent(String(a))), u = {};
|
|
4528
4528
|
typeof s < "u" && (u.fileId = s), typeof r < "u" && (u.file = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.folder = c);
|
|
4529
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4529
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4530
4530
|
"X-Appwrite-Project": this.client.config.project,
|
|
4531
4531
|
"content-type": "multipart/form-data",
|
|
4532
4532
|
accept: "application/json"
|
|
4533
4533
|
};
|
|
4534
|
-
return this.client.chunkedUpload("post", m,
|
|
4534
|
+
return this.client.chunkedUpload("post", m, $, u, o);
|
|
4535
4535
|
}
|
|
4536
4536
|
getFile(e, ...n) {
|
|
4537
4537
|
let i;
|
|
@@ -4627,14 +4627,14 @@ class to {
|
|
|
4627
4627
|
output: n[11],
|
|
4628
4628
|
token: n[12]
|
|
4629
4629
|
};
|
|
4630
|
-
const o = i.bucketId, a = i.fileId, s = i.width, r = i.height, d = i.gravity, c = i.quality, p = i.borderWidth, u = i.borderColor, m = i.borderRadius,
|
|
4630
|
+
const o = i.bucketId, a = i.fileId, s = i.width, r = i.height, d = i.gravity, c = i.quality, p = i.borderWidth, u = i.borderColor, m = i.borderRadius, $ = i.opacity, E = i.rotation, Z = i.background, W = i.output, K = i.token;
|
|
4631
4631
|
if (typeof o > "u")
|
|
4632
4632
|
throw new h('Missing required parameter: "bucketId"');
|
|
4633
4633
|
if (typeof a > "u")
|
|
4634
4634
|
throw new h('Missing required parameter: "fileId"');
|
|
4635
|
-
const
|
|
4636
|
-
typeof s < "u" && (N.width = s), typeof r < "u" && (N.height = r), typeof d < "u" && (N.gravity = d), typeof c < "u" && (N.quality = c), typeof p < "u" && (N.borderWidth = p), typeof u < "u" && (N.borderColor = u), typeof m < "u" && (N.borderRadius = m), typeof
|
|
4637
|
-
const J = new URL(this.client.config.endpoint +
|
|
4635
|
+
const q = "/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}", encodeURIComponent(String(o))).replace("{fileId}", encodeURIComponent(String(a))), N = {};
|
|
4636
|
+
typeof s < "u" && (N.width = s), typeof r < "u" && (N.height = r), typeof d < "u" && (N.gravity = d), typeof c < "u" && (N.quality = c), typeof p < "u" && (N.borderWidth = p), typeof u < "u" && (N.borderColor = u), typeof m < "u" && (N.borderRadius = m), typeof $ < "u" && (N.opacity = $), typeof E < "u" && (N.rotation = E), typeof Z < "u" && (N.background = Z), typeof W < "u" && (N.output = W), typeof K < "u" && (N.token = K);
|
|
4637
|
+
const J = new URL(this.client.config.endpoint + q);
|
|
4638
4638
|
N.project = this.client.config.project, N.impersonateuserid = this.client.config.impersonateuserid;
|
|
4639
4639
|
for (const [ae, H] of Object.entries(ye.flatten(N)))
|
|
4640
4640
|
J.searchParams.append(ae, H);
|
|
@@ -4774,11 +4774,11 @@ class io {
|
|
|
4774
4774
|
throw new h('Missing required parameter: "tableId"');
|
|
4775
4775
|
const p = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))), u = {};
|
|
4776
4776
|
typeof s < "u" && (u.queries = s), typeof r < "u" && (u.transactionId = r), typeof d < "u" && (u.total = d), typeof c < "u" && (u.ttl = c);
|
|
4777
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4777
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4778
4778
|
"X-Appwrite-Project": this.client.config.project,
|
|
4779
4779
|
accept: "application/json"
|
|
4780
4780
|
};
|
|
4781
|
-
return this.client.call("get", m,
|
|
4781
|
+
return this.client.call("get", m, $, u);
|
|
4782
4782
|
}
|
|
4783
4783
|
createRow(e, ...n) {
|
|
4784
4784
|
let i;
|
|
@@ -4801,12 +4801,12 @@ class io {
|
|
|
4801
4801
|
throw new h('Missing required parameter: "data"');
|
|
4802
4802
|
const p = "/tablesdb/{databaseId}/tables/{tableId}/rows".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))), u = {};
|
|
4803
4803
|
typeof s < "u" && (u.rowId = s), typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
4804
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4804
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4805
4805
|
"X-Appwrite-Project": this.client.config.project,
|
|
4806
4806
|
"content-type": "application/json",
|
|
4807
4807
|
accept: "application/json"
|
|
4808
4808
|
};
|
|
4809
|
-
return this.client.call("post", m,
|
|
4809
|
+
return this.client.call("post", m, $, u);
|
|
4810
4810
|
}
|
|
4811
4811
|
getRow(e, ...n) {
|
|
4812
4812
|
let i;
|
|
@@ -4851,12 +4851,12 @@ class io {
|
|
|
4851
4851
|
throw new h('Missing required parameter: "rowId"');
|
|
4852
4852
|
const p = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))).replace("{rowId}", encodeURIComponent(String(s))), u = {};
|
|
4853
4853
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
4854
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4854
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4855
4855
|
"X-Appwrite-Project": this.client.config.project,
|
|
4856
4856
|
"content-type": "application/json",
|
|
4857
4857
|
accept: "application/json"
|
|
4858
4858
|
};
|
|
4859
|
-
return this.client.call("put", m,
|
|
4859
|
+
return this.client.call("put", m, $, u);
|
|
4860
4860
|
}
|
|
4861
4861
|
updateRow(e, ...n) {
|
|
4862
4862
|
let i;
|
|
@@ -4877,12 +4877,12 @@ class io {
|
|
|
4877
4877
|
throw new h('Missing required parameter: "rowId"');
|
|
4878
4878
|
const p = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))).replace("{rowId}", encodeURIComponent(String(s))), u = {};
|
|
4879
4879
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
4880
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
4880
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
4881
4881
|
"X-Appwrite-Project": this.client.config.project,
|
|
4882
4882
|
"content-type": "application/json",
|
|
4883
4883
|
accept: "application/json"
|
|
4884
4884
|
};
|
|
4885
|
-
return this.client.call("patch", m,
|
|
4885
|
+
return this.client.call("patch", m, $, u);
|
|
4886
4886
|
}
|
|
4887
4887
|
deleteRow(e, ...n) {
|
|
4888
4888
|
let i;
|
|
@@ -4929,12 +4929,12 @@ class io {
|
|
|
4929
4929
|
throw new h('Missing required parameter: "column"');
|
|
4930
4930
|
const u = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/decrement".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))).replace("{rowId}", encodeURIComponent(String(s))).replace("{column}", encodeURIComponent(String(r))), m = {};
|
|
4931
4931
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.min = c), typeof p < "u" && (m.transactionId = p);
|
|
4932
|
-
const
|
|
4932
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
4933
4933
|
"X-Appwrite-Project": this.client.config.project,
|
|
4934
4934
|
"content-type": "application/json",
|
|
4935
4935
|
accept: "application/json"
|
|
4936
4936
|
};
|
|
4937
|
-
return this.client.call("patch",
|
|
4937
|
+
return this.client.call("patch", $, E, m);
|
|
4938
4938
|
}
|
|
4939
4939
|
incrementRowColumn(e, ...n) {
|
|
4940
4940
|
let i;
|
|
@@ -4958,12 +4958,12 @@ class io {
|
|
|
4958
4958
|
throw new h('Missing required parameter: "column"');
|
|
4959
4959
|
const u = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/{column}/increment".replace("{databaseId}", encodeURIComponent(String(o))).replace("{tableId}", encodeURIComponent(String(a))).replace("{rowId}", encodeURIComponent(String(s))).replace("{column}", encodeURIComponent(String(r))), m = {};
|
|
4960
4960
|
typeof d < "u" && (m.value = d), typeof c < "u" && (m.max = c), typeof p < "u" && (m.transactionId = p);
|
|
4961
|
-
const
|
|
4961
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
4962
4962
|
"X-Appwrite-Project": this.client.config.project,
|
|
4963
4963
|
"content-type": "application/json",
|
|
4964
4964
|
accept: "application/json"
|
|
4965
4965
|
};
|
|
4966
|
-
return this.client.call("patch",
|
|
4966
|
+
return this.client.call("patch", $, E, m);
|
|
4967
4967
|
}
|
|
4968
4968
|
}
|
|
4969
4969
|
class an {
|
|
@@ -5186,12 +5186,12 @@ class an {
|
|
|
5186
5186
|
throw new h('Missing required parameter: "roles"');
|
|
5187
5187
|
const u = "/teams/{teamId}/memberships".replace("{teamId}", encodeURIComponent(String(o))), m = {};
|
|
5188
5188
|
typeof s < "u" && (m.email = s), typeof r < "u" && (m.userId = r), typeof d < "u" && (m.phone = d), typeof a < "u" && (m.roles = a), typeof c < "u" && (m.url = c), typeof p < "u" && (m.name = p);
|
|
5189
|
-
const
|
|
5189
|
+
const $ = new URL(this.client.config.endpoint + u), E = {
|
|
5190
5190
|
"X-Appwrite-Project": this.client.config.project,
|
|
5191
5191
|
"content-type": "application/json",
|
|
5192
5192
|
accept: "application/json"
|
|
5193
5193
|
};
|
|
5194
|
-
return this.client.call("post",
|
|
5194
|
+
return this.client.call("post", $, E, m);
|
|
5195
5195
|
}
|
|
5196
5196
|
getMembership(e, ...n) {
|
|
5197
5197
|
let i;
|
|
@@ -5424,11 +5424,11 @@ class no {
|
|
|
5424
5424
|
throw new h('Missing required parameter: "collectionId"');
|
|
5425
5425
|
const p = "/vectorsdb/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
5426
5426
|
typeof s < "u" && (u.queries = s), typeof r < "u" && (u.transactionId = r), typeof d < "u" && (u.total = d), typeof c < "u" && (u.ttl = c);
|
|
5427
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
5427
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
5428
5428
|
"X-Appwrite-Project": this.client.config.project,
|
|
5429
5429
|
accept: "application/json"
|
|
5430
5430
|
};
|
|
5431
|
-
return this.client.call("get", m,
|
|
5431
|
+
return this.client.call("get", m, $, u);
|
|
5432
5432
|
}
|
|
5433
5433
|
createDocument(e, ...n) {
|
|
5434
5434
|
let i;
|
|
@@ -5451,12 +5451,12 @@ class no {
|
|
|
5451
5451
|
throw new h('Missing required parameter: "data"');
|
|
5452
5452
|
const p = "/vectorsdb/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
5453
5453
|
typeof s < "u" && (u.documentId = s), typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
5454
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
5454
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
5455
5455
|
"X-Appwrite-Project": this.client.config.project,
|
|
5456
5456
|
"content-type": "application/json",
|
|
5457
5457
|
accept: "application/json"
|
|
5458
5458
|
};
|
|
5459
|
-
return this.client.call("post", m,
|
|
5459
|
+
return this.client.call("post", m, $, u);
|
|
5460
5460
|
}
|
|
5461
5461
|
createQuery(e, ...n) {
|
|
5462
5462
|
let i;
|
|
@@ -5475,12 +5475,12 @@ class no {
|
|
|
5475
5475
|
throw new h('Missing required parameter: "collectionId"');
|
|
5476
5476
|
const p = "/vectorsdb/{databaseId}/collections/{collectionId}/documents/query".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))), u = {};
|
|
5477
5477
|
typeof s < "u" && (u.queries = s), typeof r < "u" && (u.transactionId = r), typeof d < "u" && (u.total = d), typeof c < "u" && (u.ttl = c);
|
|
5478
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
5478
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
5479
5479
|
"X-Appwrite-Project": this.client.config.project,
|
|
5480
5480
|
"content-type": "application/json",
|
|
5481
5481
|
accept: "application/json"
|
|
5482
5482
|
};
|
|
5483
|
-
return this.client.call("post", m,
|
|
5483
|
+
return this.client.call("post", m, $, u);
|
|
5484
5484
|
}
|
|
5485
5485
|
getDocument(e, ...n) {
|
|
5486
5486
|
let i;
|
|
@@ -5525,12 +5525,12 @@ class no {
|
|
|
5525
5525
|
throw new h('Missing required parameter: "documentId"');
|
|
5526
5526
|
const p = "/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
5527
5527
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
5528
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
5528
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
5529
5529
|
"X-Appwrite-Project": this.client.config.project,
|
|
5530
5530
|
"content-type": "application/json",
|
|
5531
5531
|
accept: "application/json"
|
|
5532
5532
|
};
|
|
5533
|
-
return this.client.call("put", m,
|
|
5533
|
+
return this.client.call("put", m, $, u);
|
|
5534
5534
|
}
|
|
5535
5535
|
updateDocument(e, ...n) {
|
|
5536
5536
|
let i;
|
|
@@ -5551,12 +5551,12 @@ class no {
|
|
|
5551
5551
|
throw new h('Missing required parameter: "documentId"');
|
|
5552
5552
|
const p = "/vectorsdb/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", encodeURIComponent(String(o))).replace("{collectionId}", encodeURIComponent(String(a))).replace("{documentId}", encodeURIComponent(String(s))), u = {};
|
|
5553
5553
|
typeof r < "u" && (u.data = r), typeof d < "u" && (u.permissions = d), typeof c < "u" && (u.transactionId = c);
|
|
5554
|
-
const m = new URL(this.client.config.endpoint + p),
|
|
5554
|
+
const m = new URL(this.client.config.endpoint + p), $ = {
|
|
5555
5555
|
"X-Appwrite-Project": this.client.config.project,
|
|
5556
5556
|
"content-type": "application/json",
|
|
5557
5557
|
accept: "application/json"
|
|
5558
5558
|
};
|
|
5559
|
-
return this.client.call("patch", m,
|
|
5559
|
+
return this.client.call("patch", m, $, u);
|
|
5560
5560
|
}
|
|
5561
5561
|
deleteDocument(e, ...n) {
|
|
5562
5562
|
let i;
|
|
@@ -5674,7 +5674,7 @@ class oo {
|
|
|
5674
5674
|
}), p.addEventListener("close", (u) => Ie(this, void 0, void 0, function* () {
|
|
5675
5675
|
if (c !== this.connectionId || p !== this.socket)
|
|
5676
5676
|
return;
|
|
5677
|
-
if (this.appConnected = !1, this.stopHeartbeat(), this.onCloseCallbacks.forEach((
|
|
5677
|
+
if (this.appConnected = !1, this.stopHeartbeat(), this.onCloseCallbacks.forEach(($) => $()), !this.reconnect || u.code === Ct.POLICY_VIOLATION) {
|
|
5678
5678
|
this.reconnect = !0;
|
|
5679
5679
|
return;
|
|
5680
5680
|
}
|
|
@@ -5682,15 +5682,15 @@ class oo {
|
|
|
5682
5682
|
console.log(`Realtime disconnected. Re-connecting in ${m / 1e3} seconds.`), yield this.sleep(m), this.reconnectAttempts++;
|
|
5683
5683
|
try {
|
|
5684
5684
|
yield this.createSocket();
|
|
5685
|
-
} catch (
|
|
5686
|
-
console.error("Failed to reconnect:",
|
|
5685
|
+
} catch ($) {
|
|
5686
|
+
console.error("Failed to reconnect:", $);
|
|
5687
5687
|
}
|
|
5688
5688
|
})), p.addEventListener("error", (u) => {
|
|
5689
5689
|
if (c !== this.connectionId || p !== this.socket)
|
|
5690
5690
|
return;
|
|
5691
5691
|
this.stopHeartbeat();
|
|
5692
5692
|
const m = new Error("WebSocket error");
|
|
5693
|
-
console.error("WebSocket error:", m.message), this.onErrorCallbacks.forEach((
|
|
5693
|
+
console.error("WebSocket error:", m.message), this.onErrorCallbacks.forEach(($) => $(m)), d(m);
|
|
5694
5694
|
});
|
|
5695
5695
|
} catch (c) {
|
|
5696
5696
|
d(c);
|
|
@@ -5728,7 +5728,7 @@ class oo {
|
|
|
5728
5728
|
generateUniqueSubscriptionId() {
|
|
5729
5729
|
const e = this.activeSubscriptions.size + 1;
|
|
5730
5730
|
for (let n = 0; n < e; n++) {
|
|
5731
|
-
const i =
|
|
5731
|
+
const i = Ve.unique();
|
|
5732
5732
|
if (!this.activeSubscriptions.has(i))
|
|
5733
5733
|
return i;
|
|
5734
5734
|
}
|
|
@@ -5773,13 +5773,13 @@ class oo {
|
|
|
5773
5773
|
}
|
|
5774
5774
|
subscribe(e, n) {
|
|
5775
5775
|
return Ie(this, arguments, void 0, function* (i, o, a = []) {
|
|
5776
|
-
const r = (Array.isArray(i) ? i : [i]).map((
|
|
5777
|
-
for (const
|
|
5778
|
-
if (Array.isArray(
|
|
5779
|
-
for (const Z of
|
|
5776
|
+
const r = (Array.isArray(i) ? i : [i]).map((E) => this.channelToString(E)), d = new Set(r), c = [];
|
|
5777
|
+
for (const E of a ?? [])
|
|
5778
|
+
if (Array.isArray(E))
|
|
5779
|
+
for (const Z of E)
|
|
5780
5780
|
c.push(typeof Z == "string" ? Z : Z.toString());
|
|
5781
5781
|
else
|
|
5782
|
-
c.push(typeof
|
|
5782
|
+
c.push(typeof E == "string" ? E : E.toString());
|
|
5783
5783
|
const p = this.generateUniqueSubscriptionId();
|
|
5784
5784
|
this.activeSubscriptions.set(p, {
|
|
5785
5785
|
channels: d,
|
|
@@ -5794,22 +5794,22 @@ class oo {
|
|
|
5794
5794
|
const u = () => Ie(this, void 0, void 0, function* () {
|
|
5795
5795
|
this.activeSubscriptions.has(p) && (this.activeSubscriptions.delete(p), this.pendingSubscribes.delete(p), this.sendUnsubscribeMessage([p]));
|
|
5796
5796
|
});
|
|
5797
|
-
return { unsubscribe: u, update: (
|
|
5797
|
+
return { unsubscribe: u, update: (E) => Ie(this, void 0, void 0, function* () {
|
|
5798
5798
|
const Z = this.activeSubscriptions.get(p);
|
|
5799
5799
|
if (Z) {
|
|
5800
|
-
if (
|
|
5801
|
-
const
|
|
5802
|
-
Z.channels = new Set(
|
|
5800
|
+
if (E.channels !== void 0) {
|
|
5801
|
+
const W = E.channels.map((K) => this.channelToString(K));
|
|
5802
|
+
Z.channels = new Set(W);
|
|
5803
5803
|
}
|
|
5804
|
-
if (
|
|
5805
|
-
const
|
|
5806
|
-
for (const K of
|
|
5804
|
+
if (E.queries !== void 0) {
|
|
5805
|
+
const W = [];
|
|
5806
|
+
for (const K of E.queries)
|
|
5807
5807
|
if (Array.isArray(K))
|
|
5808
|
-
for (const
|
|
5809
|
-
|
|
5808
|
+
for (const q of K)
|
|
5809
|
+
W.push(typeof q == "string" ? q : q.toString());
|
|
5810
5810
|
else
|
|
5811
|
-
|
|
5812
|
-
Z.queries =
|
|
5811
|
+
W.push(typeof K == "string" ? K : K.toString());
|
|
5812
|
+
Z.queries = W;
|
|
5813
5813
|
}
|
|
5814
5814
|
this.enqueuePendingSubscribe(p), this.subCallDepth++;
|
|
5815
5815
|
try {
|
|
@@ -5914,13 +5914,13 @@ class oo {
|
|
|
5914
5914
|
}
|
|
5915
5915
|
}
|
|
5916
5916
|
}
|
|
5917
|
-
class
|
|
5917
|
+
class at {
|
|
5918
5918
|
}
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5919
|
+
at.read = (t) => `read("${t}")`;
|
|
5920
|
+
at.write = (t) => `write("${t}")`;
|
|
5921
|
+
at.create = (t) => `create("${t}")`;
|
|
5922
|
+
at.update = (t) => `update("${t}")`;
|
|
5923
|
+
at.delete = (t) => `delete("${t}")`;
|
|
5924
5924
|
class ao {
|
|
5925
5925
|
/**
|
|
5926
5926
|
* Grants access to anyone.
|
|
@@ -6002,7 +6002,7 @@ class ao {
|
|
|
6002
6002
|
return `label:${e}`;
|
|
6003
6003
|
}
|
|
6004
6004
|
}
|
|
6005
|
-
function
|
|
6005
|
+
function Ne(t) {
|
|
6006
6006
|
if (t == null)
|
|
6007
6007
|
throw new Error("Channel ID is required");
|
|
6008
6008
|
const e = String(t).trim();
|
|
@@ -6015,7 +6015,7 @@ class Pe {
|
|
|
6015
6015
|
this.segments = e;
|
|
6016
6016
|
}
|
|
6017
6017
|
next(e, n) {
|
|
6018
|
-
const i = n === void 0 ? [...this.segments, e] : [...this.segments, e,
|
|
6018
|
+
const i = n === void 0 ? [...this.segments, e] : [...this.segments, e, Ne(n)];
|
|
6019
6019
|
return new Pe(i);
|
|
6020
6020
|
}
|
|
6021
6021
|
resolve(e) {
|
|
@@ -6060,28 +6060,28 @@ class Pe {
|
|
|
6060
6060
|
}
|
|
6061
6061
|
// --- ROOT FACTORIES ---
|
|
6062
6062
|
static database(e) {
|
|
6063
|
-
return new Pe(["databases",
|
|
6063
|
+
return new Pe(["databases", Ne(e)]);
|
|
6064
6064
|
}
|
|
6065
6065
|
static execution(e) {
|
|
6066
|
-
return new Pe(["executions",
|
|
6066
|
+
return new Pe(["executions", Ne(e)]);
|
|
6067
6067
|
}
|
|
6068
6068
|
static tablesdb(e) {
|
|
6069
|
-
return new Pe(["tablesdb",
|
|
6069
|
+
return new Pe(["tablesdb", Ne(e)]);
|
|
6070
6070
|
}
|
|
6071
6071
|
static bucket(e) {
|
|
6072
|
-
return new Pe(["buckets",
|
|
6072
|
+
return new Pe(["buckets", Ne(e)]);
|
|
6073
6073
|
}
|
|
6074
6074
|
static function(e) {
|
|
6075
|
-
return new Pe(["functions",
|
|
6075
|
+
return new Pe(["functions", Ne(e)]);
|
|
6076
6076
|
}
|
|
6077
6077
|
static team(e) {
|
|
6078
|
-
return new Pe(["teams",
|
|
6078
|
+
return new Pe(["teams", Ne(e)]);
|
|
6079
6079
|
}
|
|
6080
6080
|
static membership(e) {
|
|
6081
|
-
return new Pe(["memberships",
|
|
6081
|
+
return new Pe(["memberships", Ne(e)]);
|
|
6082
6082
|
}
|
|
6083
6083
|
static presence(e) {
|
|
6084
|
-
return new Pe(["presences",
|
|
6084
|
+
return new Pe(["presences", Ne(e)]);
|
|
6085
6085
|
}
|
|
6086
6086
|
static account() {
|
|
6087
6087
|
return "account";
|
|
@@ -6311,7 +6311,7 @@ const ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6311
6311
|
},
|
|
6312
6312
|
Functions: Qn,
|
|
6313
6313
|
Graphql: Tn,
|
|
6314
|
-
ID:
|
|
6314
|
+
ID: Ve,
|
|
6315
6315
|
get ImageFormat() {
|
|
6316
6316
|
return ni;
|
|
6317
6317
|
},
|
|
@@ -6325,7 +6325,7 @@ const ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6325
6325
|
},
|
|
6326
6326
|
Operator: T,
|
|
6327
6327
|
Organization: Fn,
|
|
6328
|
-
Permission:
|
|
6328
|
+
Permission: at,
|
|
6329
6329
|
Presences: eo,
|
|
6330
6330
|
Query: P,
|
|
6331
6331
|
Realtime: oo,
|
|
@@ -6379,6 +6379,7 @@ const ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6379
6379
|
resetPassword: "Reset password",
|
|
6380
6380
|
resetLinkSent: "If an account exists for {email}, a reset link is on its way.",
|
|
6381
6381
|
passwordUpdated: "Your password was updated. You can sign in now.",
|
|
6382
|
+
passwordChanged: "Your password was updated.",
|
|
6382
6383
|
sendResetLink: "Send reset link",
|
|
6383
6384
|
requestNewLink: "Request a new link",
|
|
6384
6385
|
agreeTo: "By continuing you agree to our",
|
|
@@ -6565,7 +6566,7 @@ const co = {
|
|
|
6565
6566
|
function pt(t) {
|
|
6566
6567
|
return co[t] ?? t.charAt(0).toUpperCase() + t.slice(1);
|
|
6567
6568
|
}
|
|
6568
|
-
const It = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), xe = () => (/* @__PURE__ */ new Date()).toISOString(),
|
|
6569
|
+
const It = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), xe = () => (/* @__PURE__ */ new Date()).toISOString(), He = (t) => new Date(Date.now() - t * 6e4).toISOString(), At = [
|
|
6569
6570
|
"amber",
|
|
6570
6571
|
"brave",
|
|
6571
6572
|
"calm",
|
|
@@ -6578,7 +6579,7 @@ const It = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }),
|
|
|
6578
6579
|
"juniper",
|
|
6579
6580
|
"kite",
|
|
6580
6581
|
"lumen"
|
|
6581
|
-
],
|
|
6582
|
+
], Di = () => `${At[Math.floor(Math.random() * At.length)]}-${At[Math.floor(Math.random() * At.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
|
|
6582
6583
|
name: "Ada Lovelace",
|
|
6583
6584
|
email: "ada@example.com",
|
|
6584
6585
|
phone: "+15550100"
|
|
@@ -6592,13 +6593,13 @@ class uo {
|
|
|
6592
6593
|
const n = e.anonymous ?? !1;
|
|
6593
6594
|
return this.user = {
|
|
6594
6595
|
$id: "preview-user",
|
|
6595
|
-
$createdAt:
|
|
6596
|
+
$createdAt: He(1440 * 30),
|
|
6596
6597
|
$updatedAt: xe(),
|
|
6597
6598
|
name: n ? "" : e.name ?? this.seed.name,
|
|
6598
|
-
registration:
|
|
6599
|
+
registration: He(1440 * 30),
|
|
6599
6600
|
status: !0,
|
|
6600
6601
|
labels: [],
|
|
6601
|
-
passwordUpdate: n ? "" :
|
|
6602
|
+
passwordUpdate: n ? "" : He(1440 * 7),
|
|
6602
6603
|
email: n ? "" : e.email ?? this.seed.email,
|
|
6603
6604
|
phone: n ? "" : e.phone ?? this.seed.phone,
|
|
6604
6605
|
emailVerification: !n,
|
|
@@ -6648,8 +6649,8 @@ class uo {
|
|
|
6648
6649
|
},
|
|
6649
6650
|
{
|
|
6650
6651
|
...n,
|
|
6651
|
-
$id:
|
|
6652
|
-
$createdAt:
|
|
6652
|
+
$id: Oe(),
|
|
6653
|
+
$createdAt: He(300),
|
|
6653
6654
|
provider: e,
|
|
6654
6655
|
ip: "198.51.100.7",
|
|
6655
6656
|
osCode: "IOS",
|
|
@@ -6665,8 +6666,8 @@ class uo {
|
|
|
6665
6666
|
},
|
|
6666
6667
|
{
|
|
6667
6668
|
...n,
|
|
6668
|
-
$id:
|
|
6669
|
-
$createdAt:
|
|
6669
|
+
$id: Oe(),
|
|
6670
|
+
$createdAt: He(1440 * 3),
|
|
6670
6671
|
provider: "oauth2",
|
|
6671
6672
|
ip: "192.0.2.90",
|
|
6672
6673
|
osCode: "WIN",
|
|
@@ -6681,8 +6682,8 @@ class uo {
|
|
|
6681
6682
|
], this.identities = [
|
|
6682
6683
|
{
|
|
6683
6684
|
$id: "identity-github",
|
|
6684
|
-
$createdAt:
|
|
6685
|
-
$updatedAt:
|
|
6685
|
+
$createdAt: He(1440 * 20),
|
|
6686
|
+
$updatedAt: He(1440 * 20),
|
|
6686
6687
|
userId: "preview-user",
|
|
6687
6688
|
provider: "github",
|
|
6688
6689
|
providerUid: "8675309",
|
|
@@ -6702,7 +6703,7 @@ class uo {
|
|
|
6702
6703
|
},
|
|
6703
6704
|
{
|
|
6704
6705
|
event: "user.update.name",
|
|
6705
|
-
time:
|
|
6706
|
+
time: He(1440 * 2),
|
|
6706
6707
|
clientName: "Safari",
|
|
6707
6708
|
osName: "iOS",
|
|
6708
6709
|
countryName: "Germany",
|
|
@@ -6710,7 +6711,7 @@ class uo {
|
|
|
6710
6711
|
},
|
|
6711
6712
|
{
|
|
6712
6713
|
event: "session.create",
|
|
6713
|
-
time:
|
|
6714
|
+
time: He(1440 * 3),
|
|
6714
6715
|
clientName: "Firefox",
|
|
6715
6716
|
osName: "Windows",
|
|
6716
6717
|
countryName: "United States",
|
|
@@ -6766,26 +6767,26 @@ class uo {
|
|
|
6766
6767
|
}
|
|
6767
6768
|
async createMagicURLToken(e, n) {
|
|
6768
6769
|
return this.tokens.set(e, { email: n }), this.delay({
|
|
6769
|
-
$id:
|
|
6770
|
+
$id: Oe(),
|
|
6770
6771
|
$createdAt: xe(),
|
|
6771
6772
|
userId: e,
|
|
6772
6773
|
secret: "",
|
|
6773
6774
|
expire: "",
|
|
6774
|
-
phrase:
|
|
6775
|
+
phrase: Di()
|
|
6775
6776
|
});
|
|
6776
6777
|
}
|
|
6777
6778
|
async createEmailToken(e, n) {
|
|
6778
6779
|
return this.tokens.set(e, { email: n }), this.delay({
|
|
6779
|
-
$id:
|
|
6780
|
+
$id: Oe(),
|
|
6780
6781
|
$createdAt: xe(),
|
|
6781
6782
|
userId: e,
|
|
6782
6783
|
secret: "",
|
|
6783
6784
|
expire: "",
|
|
6784
|
-
phrase:
|
|
6785
|
+
phrase: Di()
|
|
6785
6786
|
});
|
|
6786
6787
|
}
|
|
6787
6788
|
async createPhoneToken(e, n) {
|
|
6788
|
-
return this.tokens.set(e, { phone: n }), this.delay({ $id:
|
|
6789
|
+
return this.tokens.set(e, { phone: n }), this.delay({ $id: Oe(), $createdAt: xe(), userId: e, secret: "", expire: "", phrase: "" });
|
|
6789
6790
|
}
|
|
6790
6791
|
async createSession(e) {
|
|
6791
6792
|
return this.delay(() => {
|
|
@@ -6877,7 +6878,7 @@ class uo {
|
|
|
6877
6878
|
});
|
|
6878
6879
|
}
|
|
6879
6880
|
async createMFAChallenge() {
|
|
6880
|
-
return this.delay({ $id:
|
|
6881
|
+
return this.delay({ $id: Oe(), $createdAt: xe(), userId: "preview-user", expire: "" });
|
|
6881
6882
|
}
|
|
6882
6883
|
async updateMFAChallenge() {
|
|
6883
6884
|
return this.delay(() => (this.mfaPending = !1, this.lastChallenge = Date.now(), this.sessions[0]));
|
|
@@ -6907,14 +6908,14 @@ class uo {
|
|
|
6907
6908
|
return this.delay(() => {
|
|
6908
6909
|
if (this.recoveryCodes.length > 0)
|
|
6909
6910
|
throw It("user_recovery_codes_already_exists", "Recovery codes already generated.", 409);
|
|
6910
|
-
return this.recoveryCodes = Array.from({ length: 6 },
|
|
6911
|
+
return this.recoveryCodes = Array.from({ length: 6 }, Bi), { recoveryCodes: this.recoveryCodes };
|
|
6911
6912
|
});
|
|
6912
6913
|
}
|
|
6913
6914
|
async getMFARecoveryCodes() {
|
|
6914
6915
|
return this.delay(() => (this.requireRecentChallenge(), { recoveryCodes: this.recoveryCodes }));
|
|
6915
6916
|
}
|
|
6916
6917
|
async updateMFARecoveryCodes() {
|
|
6917
|
-
return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 },
|
|
6918
|
+
return this.delay(() => (this.requireRecentChallenge(), this.recoveryCodes = Array.from({ length: 6 }, Bi), { recoveryCodes: this.recoveryCodes }));
|
|
6918
6919
|
}
|
|
6919
6920
|
/** Forget everything, as a sign out would. */
|
|
6920
6921
|
reset() {
|
|
@@ -6969,7 +6970,7 @@ const oe = {
|
|
|
6969
6970
|
targetAlreadyExists: "user_target_already_exists",
|
|
6970
6971
|
argumentInvalid: "general_argument_invalid"
|
|
6971
6972
|
};
|
|
6972
|
-
function
|
|
6973
|
+
function tt(t) {
|
|
6973
6974
|
if (t && typeof t == "object") {
|
|
6974
6975
|
const e = t;
|
|
6975
6976
|
let n = typeof e.message == "string" ? e.message : "Unknown error";
|
|
@@ -6982,10 +6983,10 @@ function et(t) {
|
|
|
6982
6983
|
return { message: String(t), type: "", code: 0 };
|
|
6983
6984
|
}
|
|
6984
6985
|
function yt(t, e) {
|
|
6985
|
-
return
|
|
6986
|
+
return tt(t).type === e;
|
|
6986
6987
|
}
|
|
6987
6988
|
function xt(t, e, n = "link") {
|
|
6988
|
-
const i =
|
|
6989
|
+
const i = tt(t);
|
|
6989
6990
|
switch (i.type) {
|
|
6990
6991
|
case oe.invalidCredentials:
|
|
6991
6992
|
return n === "password" ? e.errorCurrentPassword : e.errorInvalidCredentials;
|
|
@@ -7028,11 +7029,11 @@ function xt(t, e, n = "link") {
|
|
|
7028
7029
|
return i.type === oe.projectNotFound || i.type === oe.unknownOrigin ? e.errorConfig : i.type === oe.routeNotFound ? e.errorConfigEndpoint : i.code === 0 && /fetch|network/i.test(i.message) ? e.errorNetwork : /Invalid `\w+` param/i.test(i.message) ? e.errorGeneric : i.message ? i.message || e.errorGeneric : i.code === 404 || i.type === oe.routeNotFound ? e.errorConfigEndpoint : e.errorGeneric;
|
|
7029
7030
|
}
|
|
7030
7031
|
function ho(t) {
|
|
7031
|
-
const e =
|
|
7032
|
+
const e = tt(t);
|
|
7032
7033
|
return !!(e.type === oe.projectNotFound || e.type === oe.unknownOrigin || e.type === oe.routeNotFound || !e.message && e.code === 404 || e.code === 0 && /fetch|network|load failed|failed to fetch/i.test(e.message));
|
|
7033
7034
|
}
|
|
7034
7035
|
const di = (t) => `authui:active-team:${t}`;
|
|
7035
|
-
function
|
|
7036
|
+
function Xi(t) {
|
|
7036
7037
|
if (typeof localStorage > "u" || !t) return null;
|
|
7037
7038
|
try {
|
|
7038
7039
|
return localStorage.getItem(di(t));
|
|
@@ -7047,22 +7048,22 @@ function fo(t, e) {
|
|
|
7047
7048
|
} catch {
|
|
7048
7049
|
}
|
|
7049
7050
|
}
|
|
7050
|
-
const
|
|
7051
|
+
const Ii = "authui:last-method";
|
|
7051
7052
|
function lt(t) {
|
|
7052
7053
|
if (!(typeof localStorage > "u")) {
|
|
7053
7054
|
if (!t || t === "mfa" || t === "sign-up")
|
|
7054
7055
|
if (t === "sign-up") t = "email-password";
|
|
7055
7056
|
else return;
|
|
7056
7057
|
try {
|
|
7057
|
-
localStorage.setItem(
|
|
7058
|
+
localStorage.setItem(Ii, t);
|
|
7058
7059
|
} catch {
|
|
7059
7060
|
}
|
|
7060
7061
|
}
|
|
7061
7062
|
}
|
|
7062
|
-
function
|
|
7063
|
+
function Fe() {
|
|
7063
7064
|
if (typeof localStorage > "u") return null;
|
|
7064
7065
|
try {
|
|
7065
|
-
return localStorage.getItem(
|
|
7066
|
+
return localStorage.getItem(Ii);
|
|
7066
7067
|
} catch {
|
|
7067
7068
|
return null;
|
|
7068
7069
|
}
|
|
@@ -7070,7 +7071,7 @@ function Oe() {
|
|
|
7070
7071
|
function ta() {
|
|
7071
7072
|
if (!(typeof localStorage > "u"))
|
|
7072
7073
|
try {
|
|
7073
|
-
localStorage.removeItem(
|
|
7074
|
+
localStorage.removeItem(Ii);
|
|
7074
7075
|
} catch {
|
|
7075
7076
|
}
|
|
7076
7077
|
}
|
|
@@ -7090,14 +7091,14 @@ function sn() {
|
|
|
7090
7091
|
} catch {
|
|
7091
7092
|
}
|
|
7092
7093
|
}
|
|
7093
|
-
function
|
|
7094
|
+
function Vi() {
|
|
7094
7095
|
if (!(typeof sessionStorage > "u"))
|
|
7095
7096
|
try {
|
|
7096
7097
|
sessionStorage.removeItem(Ut);
|
|
7097
7098
|
} catch {
|
|
7098
7099
|
}
|
|
7099
7100
|
}
|
|
7100
|
-
function
|
|
7101
|
+
function je(t, e, n) {
|
|
7101
7102
|
for (const i of e) {
|
|
7102
7103
|
const o = t[i];
|
|
7103
7104
|
if (typeof o == "function")
|
|
@@ -7107,7 +7108,7 @@ function $e(t, e, n) {
|
|
|
7107
7108
|
new Error(`Appwrite SDK is missing ${e[0]}(). Update the appwrite package.`)
|
|
7108
7109
|
);
|
|
7109
7110
|
}
|
|
7110
|
-
const li = "authui",
|
|
7111
|
+
const li = "authui", Wi = ["userId", "secret", "expire", "project", "error", li], Gi = () => ({
|
|
7111
7112
|
status: "loading",
|
|
7112
7113
|
user: null,
|
|
7113
7114
|
mfaFactors: null,
|
|
@@ -7117,7 +7118,7 @@ const li = "authui", Vi = ["userId", "secret", "expire", "project", "error", li]
|
|
|
7117
7118
|
});
|
|
7118
7119
|
class yo {
|
|
7119
7120
|
constructor() {
|
|
7120
|
-
this.client = null, this.account = null, this.config = null, this.state =
|
|
7121
|
+
this.client = null, this.account = null, this.config = null, this.state = Gi(), this.listeners = /* @__PURE__ */ new Map(), this.refreshPromise = null, this.preview = null, this.teams = null, this.activeTeamId = null;
|
|
7121
7122
|
}
|
|
7122
7123
|
// ───────────────────────────── configuration ─────────────────────────────
|
|
7123
7124
|
/** Configure the Appwrite client. Safe to call more than once; the last call wins. */
|
|
@@ -7125,7 +7126,7 @@ class yo {
|
|
|
7125
7126
|
const n = e.endpoint.trim().replace(/\/+$/, "");
|
|
7126
7127
|
n && !n.endsWith("/v1") && console.warn(
|
|
7127
7128
|
`[authui] endpoint should end with /v1 (got "${e.endpoint}"). Without it Appwrite returns HTML 404 pages.`
|
|
7128
|
-
), this.config = e, this.client = new Ce().setEndpoint(e.endpoint).setProject(e.project), this.preview = e.preview ? new uo() : null, this.account = this.preview ? this.preview : new Yt(this.client), this.teams = null, this.activeTeamId =
|
|
7129
|
+
), this.config = e, this.client = new Ce().setEndpoint(e.endpoint).setProject(e.project), this.preview = e.preview ? new uo() : null, this.account = this.preview ? this.preview : new Yt(this.client), this.teams = null, this.activeTeamId = Xi(e.project), this.setState({ configured: !0, status: "loading", configError: null }), this.preview ? this.refresh() : typeof window < "u" && this.handleRedirect().then(() => this.refresh());
|
|
7129
7130
|
}
|
|
7130
7131
|
/**
|
|
7131
7132
|
* Called by <authui-config> when it is on the page but missing endpoint or project.
|
|
@@ -7181,7 +7182,7 @@ class yo {
|
|
|
7181
7182
|
getActiveTeamId() {
|
|
7182
7183
|
if (this.activeTeamId) return this.activeTeamId;
|
|
7183
7184
|
const e = this.config?.project;
|
|
7184
|
-
return e ? (this.activeTeamId =
|
|
7185
|
+
return e ? (this.activeTeamId = Xi(e), this.activeTeamId) : null;
|
|
7185
7186
|
}
|
|
7186
7187
|
/**
|
|
7187
7188
|
* Remember the active team locally and emit `active-team`.
|
|
@@ -7218,7 +7219,7 @@ class yo {
|
|
|
7218
7219
|
this.state = { ...this.state, ...e }, this.emit("change", this.getState());
|
|
7219
7220
|
}
|
|
7220
7221
|
fail(e) {
|
|
7221
|
-
const n =
|
|
7222
|
+
const n = tt(e);
|
|
7222
7223
|
throw this.emit("error", n), e;
|
|
7223
7224
|
}
|
|
7224
7225
|
acct() {
|
|
@@ -7241,7 +7242,7 @@ class yo {
|
|
|
7241
7242
|
if (yt(n, oe.moreFactorsRequired)) {
|
|
7242
7243
|
let i = null;
|
|
7243
7244
|
try {
|
|
7244
|
-
i = await
|
|
7245
|
+
i = await je(
|
|
7245
7246
|
this.account,
|
|
7246
7247
|
["listMFAFactors", "listMfaFactors"],
|
|
7247
7248
|
[]
|
|
@@ -7265,7 +7266,7 @@ class yo {
|
|
|
7265
7266
|
console.warn(
|
|
7266
7267
|
`[authui] ${o} (endpoint=${this.config?.endpoint ?? "?"}, project=${this.config?.project ?? "?"})`
|
|
7267
7268
|
);
|
|
7268
|
-
const a =
|
|
7269
|
+
const a = tt(n);
|
|
7269
7270
|
this.emit("error", { message: o, type: a.type, code: a.code }), this.setState({
|
|
7270
7271
|
status: "signed-out",
|
|
7271
7272
|
user: null,
|
|
@@ -7323,7 +7324,7 @@ class yo {
|
|
|
7323
7324
|
}
|
|
7324
7325
|
async signUp(e, n, i) {
|
|
7325
7326
|
try {
|
|
7326
|
-
await this.acct().create(
|
|
7327
|
+
await this.acct().create(Ve.unique(), e.trim(), n, i?.trim() || void 0), await this.acct().createEmailPasswordSession(e.trim(), n);
|
|
7327
7328
|
} catch (o) {
|
|
7328
7329
|
this.fail(o);
|
|
7329
7330
|
}
|
|
@@ -7366,7 +7367,7 @@ class yo {
|
|
|
7366
7367
|
async sendMagicUrl(e) {
|
|
7367
7368
|
try {
|
|
7368
7369
|
return await this.acct().createMagicURLToken(
|
|
7369
|
-
|
|
7370
|
+
Ve.unique(),
|
|
7370
7371
|
e.trim(),
|
|
7371
7372
|
this.redirectUrl("magic-url"),
|
|
7372
7373
|
this.config?.securityPhrase ?? !0
|
|
@@ -7378,7 +7379,7 @@ class yo {
|
|
|
7378
7379
|
async sendEmailOtp(e) {
|
|
7379
7380
|
try {
|
|
7380
7381
|
return await this.acct().createEmailToken(
|
|
7381
|
-
|
|
7382
|
+
Ve.unique(),
|
|
7382
7383
|
e.trim(),
|
|
7383
7384
|
this.config?.securityPhrase ?? !0
|
|
7384
7385
|
);
|
|
@@ -7388,7 +7389,7 @@ class yo {
|
|
|
7388
7389
|
}
|
|
7389
7390
|
async sendPhoneOtp(e) {
|
|
7390
7391
|
try {
|
|
7391
|
-
return await this.acct().createPhoneToken(
|
|
7392
|
+
return await this.acct().createPhoneToken(Ve.unique(), e.replace(/[\s()-]/g, ""));
|
|
7392
7393
|
} catch (n) {
|
|
7393
7394
|
return this.fail(n);
|
|
7394
7395
|
}
|
|
@@ -7405,7 +7406,7 @@ class yo {
|
|
|
7405
7406
|
// ─────────────────────────────── MFA ───────────────────────────────
|
|
7406
7407
|
async createMfaChallenge(e) {
|
|
7407
7408
|
try {
|
|
7408
|
-
return await
|
|
7409
|
+
return await je(
|
|
7409
7410
|
this.acct(),
|
|
7410
7411
|
["createMFAChallenge", "createMfaChallenge"],
|
|
7411
7412
|
[e]
|
|
@@ -7417,7 +7418,7 @@ class yo {
|
|
|
7417
7418
|
/** Verify a challenge. Completes a pending sign in, or acts as a step-up for protected actions. */
|
|
7418
7419
|
async completeMfaChallenge(e, n, i = {}) {
|
|
7419
7420
|
try {
|
|
7420
|
-
await
|
|
7421
|
+
await je(
|
|
7421
7422
|
this.acct(),
|
|
7422
7423
|
["updateMFAChallenge", "updateMfaChallenge"],
|
|
7423
7424
|
[e, n.trim()]
|
|
@@ -7429,7 +7430,7 @@ class yo {
|
|
|
7429
7430
|
}
|
|
7430
7431
|
async listMfaFactors() {
|
|
7431
7432
|
try {
|
|
7432
|
-
return await
|
|
7433
|
+
return await je(this.acct(), ["listMFAFactors", "listMfaFactors"], []);
|
|
7433
7434
|
} catch (e) {
|
|
7434
7435
|
return this.fail(e);
|
|
7435
7436
|
}
|
|
@@ -7444,7 +7445,7 @@ class yo {
|
|
|
7444
7445
|
}
|
|
7445
7446
|
async addAuthenticator() {
|
|
7446
7447
|
try {
|
|
7447
|
-
return await
|
|
7448
|
+
return await je(
|
|
7448
7449
|
this.acct(),
|
|
7449
7450
|
["createMFAAuthenticator", "createMfaAuthenticator"],
|
|
7450
7451
|
["totp"]
|
|
@@ -7455,7 +7456,7 @@ class yo {
|
|
|
7455
7456
|
}
|
|
7456
7457
|
async verifyAuthenticator(e) {
|
|
7457
7458
|
try {
|
|
7458
|
-
await
|
|
7459
|
+
await je(
|
|
7459
7460
|
this.acct(),
|
|
7460
7461
|
["updateMFAAuthenticator", "updateMfaAuthenticator"],
|
|
7461
7462
|
["totp", e.trim()]
|
|
@@ -7468,7 +7469,7 @@ class yo {
|
|
|
7468
7469
|
/** Requires a recent MFA challenge (server rejects with user_challenge_required otherwise). */
|
|
7469
7470
|
async removeAuthenticator() {
|
|
7470
7471
|
try {
|
|
7471
|
-
await
|
|
7472
|
+
await je(this.acct(), ["deleteMFAAuthenticator", "deleteMfaAuthenticator"], ["totp"]);
|
|
7472
7473
|
} catch (e) {
|
|
7473
7474
|
this.fail(e);
|
|
7474
7475
|
}
|
|
@@ -7476,7 +7477,7 @@ class yo {
|
|
|
7476
7477
|
}
|
|
7477
7478
|
async createRecoveryCodes() {
|
|
7478
7479
|
try {
|
|
7479
|
-
return (await
|
|
7480
|
+
return (await je(
|
|
7480
7481
|
this.acct(),
|
|
7481
7482
|
["createMFARecoveryCodes", "createMfaRecoveryCodes"],
|
|
7482
7483
|
[]
|
|
@@ -7488,7 +7489,7 @@ class yo {
|
|
|
7488
7489
|
/** Requires a recent MFA challenge. */
|
|
7489
7490
|
async regenerateRecoveryCodes() {
|
|
7490
7491
|
try {
|
|
7491
|
-
return (await
|
|
7492
|
+
return (await je(
|
|
7492
7493
|
this.acct(),
|
|
7493
7494
|
["updateMFARecoveryCodes", "updateMfaRecoveryCodes"],
|
|
7494
7495
|
[]
|
|
@@ -7500,7 +7501,7 @@ class yo {
|
|
|
7500
7501
|
/** Requires a recent MFA challenge. */
|
|
7501
7502
|
async getRecoveryCodes() {
|
|
7502
7503
|
try {
|
|
7503
|
-
return (await
|
|
7504
|
+
return (await je(
|
|
7504
7505
|
this.acct(),
|
|
7505
7506
|
["getMFARecoveryCodes", "getMfaRecoveryCodes"],
|
|
7506
7507
|
[]
|
|
@@ -7622,7 +7623,7 @@ class yo {
|
|
|
7622
7623
|
}
|
|
7623
7624
|
async sendEmailVerification() {
|
|
7624
7625
|
try {
|
|
7625
|
-
await
|
|
7626
|
+
await je(
|
|
7626
7627
|
this.acct(),
|
|
7627
7628
|
["createEmailVerification", "createVerification"],
|
|
7628
7629
|
[this.redirectUrl("verify-email")]
|
|
@@ -7662,7 +7663,7 @@ class yo {
|
|
|
7662
7663
|
/** Build the URL Appwrite should send the user back to for a given flow. */
|
|
7663
7664
|
redirectUrl(e) {
|
|
7664
7665
|
const n = this.config?.redirectUrl ?? (typeof window < "u" ? window.location.origin + window.location.pathname : ""), i = new URL(n, typeof window < "u" ? window.location.href : void 0);
|
|
7665
|
-
for (const o of
|
|
7666
|
+
for (const o of Wi) i.searchParams.delete(o);
|
|
7666
7667
|
return i.searchParams.set(li, e), i.toString();
|
|
7667
7668
|
}
|
|
7668
7669
|
setPending(e) {
|
|
@@ -7691,10 +7692,10 @@ class yo {
|
|
|
7691
7692
|
switch (n) {
|
|
7692
7693
|
case "oauth":
|
|
7693
7694
|
case "magic-url":
|
|
7694
|
-
i && o ? (await this.acct().createSession(i, o), n === "oauth" && sn()) : (n === "oauth" &&
|
|
7695
|
+
i && o ? (await this.acct().createSession(i, o), n === "oauth" && sn()) : (n === "oauth" && Vi(), a());
|
|
7695
7696
|
break;
|
|
7696
7697
|
case "oauth-failed":
|
|
7697
|
-
|
|
7698
|
+
Vi(), this.setState({
|
|
7698
7699
|
pending: {
|
|
7699
7700
|
type: "notice",
|
|
7700
7701
|
tone: "error",
|
|
@@ -7706,7 +7707,7 @@ class yo {
|
|
|
7706
7707
|
i && o ? this.setState({ pending: { type: "reset-password", userId: i, secret: o } }) : a();
|
|
7707
7708
|
break;
|
|
7708
7709
|
case "verify-email":
|
|
7709
|
-
i && o ? (await
|
|
7710
|
+
i && o ? (await je(
|
|
7710
7711
|
this.acct(),
|
|
7711
7712
|
["updateEmailVerification", "updateVerification"],
|
|
7712
7713
|
[i, o]
|
|
@@ -7720,19 +7721,19 @@ class yo {
|
|
|
7720
7721
|
break;
|
|
7721
7722
|
}
|
|
7722
7723
|
} catch (s) {
|
|
7723
|
-
const r =
|
|
7724
|
+
const r = tt(s), d = xt(s, this.getStrings(), "link");
|
|
7724
7725
|
this.emit("error", r), this.setState({ pending: { type: "notice", message: d, tone: "error" } });
|
|
7725
7726
|
}
|
|
7726
7727
|
return !0;
|
|
7727
7728
|
}
|
|
7728
7729
|
cleanUrl() {
|
|
7729
7730
|
const e = new URL(window.location.href);
|
|
7730
|
-
for (const n of
|
|
7731
|
+
for (const n of Wi) e.searchParams.delete(n);
|
|
7731
7732
|
window.history.replaceState(window.history.state, "", e.toString());
|
|
7732
7733
|
}
|
|
7733
7734
|
/** Test helper. */
|
|
7734
7735
|
reset() {
|
|
7735
|
-
this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state =
|
|
7736
|
+
this.client = null, this.account = null, this.teams = null, this.activeTeamId = null, this.preview = null, this.config = null, this.state = Gi(), this.listeners.clear();
|
|
7736
7737
|
}
|
|
7737
7738
|
}
|
|
7738
7739
|
const R = new yo();
|
|
@@ -7764,7 +7765,7 @@ class mo {
|
|
|
7764
7765
|
this.observer?.disconnect(), this.observer = null, this.media?.removeEventListener?.("change", this.notify), this.media = null;
|
|
7765
7766
|
}
|
|
7766
7767
|
}
|
|
7767
|
-
const
|
|
7768
|
+
const Ki = new mo(), Yi = {
|
|
7768
7769
|
none: "0px",
|
|
7769
7770
|
sm: "0.25rem",
|
|
7770
7771
|
md: "0.625rem",
|
|
@@ -8658,21 +8659,21 @@ var vo = Object.defineProperty, Io = (t, e, n, i) => {
|
|
|
8658
8659
|
for (var o = void 0, a = t.length - 1, s; a >= 0; a--)
|
|
8659
8660
|
(s = t[a]) && (o = s(e, n, o) || o);
|
|
8660
8661
|
return o && vo(e, n, o), o;
|
|
8661
|
-
},
|
|
8662
|
-
const rn = (
|
|
8662
|
+
}, De;
|
|
8663
|
+
const rn = (De = class extends Qe {
|
|
8663
8664
|
constructor() {
|
|
8664
8665
|
super(...arguments), this.auth = R.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (e) => e.stopPropagation();
|
|
8665
8666
|
}
|
|
8666
8667
|
connectedCallback() {
|
|
8667
8668
|
super.connectedCallback();
|
|
8668
|
-
for (const e of
|
|
8669
|
+
for (const e of De.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
|
|
8669
8670
|
this.auth = R.getState(), this.unsubscribeStore = R.on("change", (e) => {
|
|
8670
8671
|
this.auth = e, this.applyBranding();
|
|
8671
|
-
}), this.unsubscribeTheme =
|
|
8672
|
+
}), this.unsubscribeTheme = Ki.subscribe(() => this.applyBranding()), this.applyBranding();
|
|
8672
8673
|
}
|
|
8673
8674
|
disconnectedCallback() {
|
|
8674
8675
|
super.disconnectedCallback();
|
|
8675
|
-
for (const e of
|
|
8676
|
+
for (const e of De.KEY_EVENTS) this.removeEventListener(e, this.stopKeys);
|
|
8676
8677
|
this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
|
|
8677
8678
|
}
|
|
8678
8679
|
get strings() {
|
|
@@ -8690,27 +8691,27 @@ const rn = (Ne = class extends Je {
|
|
|
8690
8691
|
}
|
|
8691
8692
|
/** Push theme and branding from config onto the host element. */
|
|
8692
8693
|
applyBranding() {
|
|
8693
|
-
const e = this.config?.branding, n =
|
|
8694
|
+
const e = this.config?.branding, n = Ki.isDark(e?.theme ?? "auto");
|
|
8694
8695
|
this.setAttribute("data-theme", n ? "dark" : "light"), e?.primary && (this.style.setProperty("--authui-primary", e.primary), this.style.setProperty(
|
|
8695
8696
|
"--authui-primary-foreground",
|
|
8696
8697
|
e.primaryForeground ?? "#ffffff"
|
|
8697
|
-
)), e?.radius &&
|
|
8698
|
+
)), e?.radius && Yi[e.radius] && this.style.setProperty("--authui-radius", Yi[e.radius]);
|
|
8698
8699
|
}
|
|
8699
8700
|
/** Emit a composed custom event from this element. */
|
|
8700
8701
|
fire(e, n) {
|
|
8701
8702
|
this.dispatchEvent(new CustomEvent(e, { detail: n, bubbles: !0, composed: !0 }));
|
|
8702
8703
|
}
|
|
8703
|
-
},
|
|
8704
|
+
}, De.styles = [wo, bo], De.KEY_EVENTS = ["keydown", "keyup", "keypress"], De);
|
|
8704
8705
|
Io([
|
|
8705
|
-
|
|
8706
|
+
V()
|
|
8706
8707
|
], rn.prototype, "auth");
|
|
8707
|
-
let
|
|
8708
|
+
let qe = rn;
|
|
8708
8709
|
var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, fe = (t, e, n, i) => {
|
|
8709
8710
|
for (var o = i > 1 ? void 0 : i ? ko(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
8710
8711
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
8711
8712
|
return i && o && Ao(e, n, o), o;
|
|
8712
8713
|
};
|
|
8713
|
-
let pe = class extends
|
|
8714
|
+
let pe = class extends Qe {
|
|
8714
8715
|
constructor() {
|
|
8715
8716
|
super(...arguments), this.endpoint = "", this.project = "", this.redirectUrl = "", this.successUrl = "", this.methods = "email-password", this.signUp = "true", this.requireName = "true", this.mfa = "true", this.securityPhrase = "true", this.name = "", this.logo = "", this.theme = "auto", this.radius = "", this.primary = "", this.primaryForeground = "", this.termsUrl = "", this.privacyUrl = "", this.preview = "";
|
|
8716
8717
|
}
|
|
@@ -8820,38 +8821,38 @@ fe([
|
|
|
8820
8821
|
ee({ type: String })
|
|
8821
8822
|
], pe.prototype, "preview", 2);
|
|
8822
8823
|
pe = fe([
|
|
8823
|
-
|
|
8824
|
+
ze("authui-config")
|
|
8824
8825
|
], pe);
|
|
8825
|
-
var So = Object.defineProperty,
|
|
8826
|
-
for (var o = i > 1 ? void 0 : i ?
|
|
8826
|
+
var So = Object.defineProperty, $o = Object.getOwnPropertyDescriptor, qt = (t, e, n, i) => {
|
|
8827
|
+
for (var o = i > 1 ? void 0 : i ? $o(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
8827
8828
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
8828
8829
|
return i && o && So(e, n, o), o;
|
|
8829
8830
|
};
|
|
8830
|
-
const
|
|
8831
|
-
let
|
|
8832
|
-
function
|
|
8833
|
-
if (!(typeof document > "u" ||
|
|
8834
|
-
|
|
8831
|
+
const Ji = "authui-show:not([ready]){display:none}", ia = "authui-show:not([ready]){display:none}authui-button:not(:defined),authui-user-button:not(:defined){visibility:hidden}";
|
|
8832
|
+
let Zi = !1;
|
|
8833
|
+
function jo() {
|
|
8834
|
+
if (!(typeof document > "u" || Zi)) {
|
|
8835
|
+
Zi = !0;
|
|
8835
8836
|
try {
|
|
8836
8837
|
if (typeof CSSStyleSheet < "u" && "adoptedStyleSheets" in Document.prototype) {
|
|
8837
8838
|
const t = new CSSStyleSheet();
|
|
8838
|
-
t.replaceSync(
|
|
8839
|
+
t.replaceSync(Ji), document.adoptedStyleSheets = [...document.adoptedStyleSheets, t];
|
|
8839
8840
|
return;
|
|
8840
8841
|
}
|
|
8841
8842
|
} catch {
|
|
8842
8843
|
}
|
|
8843
8844
|
if (!document.getElementById("authui-fouc")) {
|
|
8844
8845
|
const t = document.createElement("style");
|
|
8845
|
-
t.id = "authui-fouc", t.textContent =
|
|
8846
|
+
t.id = "authui-fouc", t.textContent = Ji, document.head.appendChild(t);
|
|
8846
8847
|
}
|
|
8847
8848
|
}
|
|
8848
8849
|
}
|
|
8849
|
-
|
|
8850
|
+
jo();
|
|
8850
8851
|
const Po = ["loading", "signed-out", "signed-in", "mfa-required"];
|
|
8851
8852
|
function Kt(t) {
|
|
8852
8853
|
return t ? t.split(/[\s,]+/).map((e) => e.trim()).filter((e) => Po.includes(e)) : [];
|
|
8853
8854
|
}
|
|
8854
|
-
let mt = class extends
|
|
8855
|
+
let mt = class extends Qe {
|
|
8855
8856
|
constructor() {
|
|
8856
8857
|
super(...arguments), this.when = "", this.unless = "", this.status = R.getState().status, this.unsubscribe = null;
|
|
8857
8858
|
}
|
|
@@ -8873,17 +8874,17 @@ let mt = class extends Je {
|
|
|
8873
8874
|
return this.visible ? b`<slot></slot>` : M;
|
|
8874
8875
|
}
|
|
8875
8876
|
};
|
|
8876
|
-
|
|
8877
|
+
qt([
|
|
8877
8878
|
ee({ type: String })
|
|
8878
8879
|
], mt.prototype, "when", 2);
|
|
8879
|
-
|
|
8880
|
+
qt([
|
|
8880
8881
|
ee({ type: String })
|
|
8881
8882
|
], mt.prototype, "unless", 2);
|
|
8882
|
-
|
|
8883
|
-
|
|
8883
|
+
qt([
|
|
8884
|
+
V()
|
|
8884
8885
|
], mt.prototype, "status", 2);
|
|
8885
|
-
mt =
|
|
8886
|
-
|
|
8886
|
+
mt = qt([
|
|
8887
|
+
ze("authui-show")
|
|
8887
8888
|
], mt);
|
|
8888
8889
|
const Co = We`
|
|
8889
8890
|
:host {
|
|
@@ -8952,146 +8953,146 @@ const Co = We`
|
|
|
8952
8953
|
${t}
|
|
8953
8954
|
</svg>`, _ = {
|
|
8954
8955
|
mail: se(
|
|
8955
|
-
|
|
8956
|
+
G`<rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/>`
|
|
8956
8957
|
),
|
|
8957
8958
|
phone: se(
|
|
8958
|
-
|
|
8959
|
+
G`<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>`
|
|
8959
8960
|
),
|
|
8960
8961
|
user: se(
|
|
8961
|
-
|
|
8962
|
+
G`<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`
|
|
8962
8963
|
),
|
|
8963
8964
|
userX: se(
|
|
8964
|
-
|
|
8965
|
+
G`<path d="M2 21a8 8 0 0 1 11.873-7"/><circle cx="10" cy="8" r="5"/><path d="m17 17 5 5"/><path d="m22 17-5 5"/>`
|
|
8965
8966
|
),
|
|
8966
8967
|
lock: se(
|
|
8967
|
-
|
|
8968
|
+
G`<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`
|
|
8968
8969
|
),
|
|
8969
8970
|
key: se(
|
|
8970
|
-
|
|
8971
|
+
G`<path d="m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"/><path d="m21 2-9.6 9.6"/><circle cx="7.5" cy="15.5" r="5.5"/>`
|
|
8971
8972
|
),
|
|
8972
8973
|
shield: se(
|
|
8973
|
-
|
|
8974
|
+
G`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>`
|
|
8974
8975
|
),
|
|
8975
8976
|
shieldCheck: se(
|
|
8976
|
-
|
|
8977
|
+
G`<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/>`
|
|
8977
8978
|
),
|
|
8978
8979
|
smartphone: se(
|
|
8979
|
-
|
|
8980
|
+
G`<rect width="14" height="20" x="5" y="2" rx="2" ry="2"/><path d="M12 18h.01"/>`
|
|
8980
8981
|
),
|
|
8981
8982
|
monitor: se(
|
|
8982
|
-
|
|
8983
|
+
G`<rect width="20" height="14" x="2" y="3" rx="2"/><line x1="8" x2="16" y1="21" y2="21"/><line x1="12" x2="12" y1="17" y2="21"/>`
|
|
8983
8984
|
),
|
|
8984
8985
|
globe: se(
|
|
8985
|
-
|
|
8986
|
+
G`<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>`
|
|
8986
8987
|
),
|
|
8987
8988
|
logOut: se(
|
|
8988
|
-
|
|
8989
|
+
G`<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" x2="9" y1="12" y2="12"/>`
|
|
8989
8990
|
),
|
|
8990
8991
|
settings: se(
|
|
8991
|
-
|
|
8992
|
+
G`<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>`
|
|
8992
8993
|
),
|
|
8993
|
-
x: se(
|
|
8994
|
-
check: se(
|
|
8994
|
+
x: se(G`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`),
|
|
8995
|
+
check: se(G`<path d="M20 6 9 17l-5-5"/>`),
|
|
8995
8996
|
users: se(
|
|
8996
|
-
|
|
8997
|
+
G`<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`
|
|
8997
8998
|
),
|
|
8998
8999
|
copy: se(
|
|
8999
|
-
|
|
9000
|
+
G`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`
|
|
9000
9001
|
),
|
|
9001
9002
|
eye: se(
|
|
9002
|
-
|
|
9003
|
+
G`<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>`
|
|
9003
9004
|
),
|
|
9004
9005
|
eyeOff: se(
|
|
9005
|
-
|
|
9006
|
+
G`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>`
|
|
9006
9007
|
),
|
|
9007
|
-
arrowLeft: se(
|
|
9008
|
+
arrowLeft: se(G`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`),
|
|
9008
9009
|
alert: se(
|
|
9009
|
-
|
|
9010
|
+
G`<circle cx="12" cy="12" r="10"/><line x1="12" x2="12" y1="8" y2="12"/><line x1="12" x2="12.01" y1="16" y2="16"/>`
|
|
9010
9011
|
),
|
|
9011
|
-
info: se(
|
|
9012
|
-
checkCircle: se(
|
|
9012
|
+
info: se(G`<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>`),
|
|
9013
|
+
checkCircle: se(G`<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>`),
|
|
9013
9014
|
link: se(
|
|
9014
|
-
|
|
9015
|
+
G`<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
|
|
9015
9016
|
),
|
|
9016
9017
|
activity: se(
|
|
9017
|
-
|
|
9018
|
+
G`<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>`
|
|
9018
9019
|
),
|
|
9019
9020
|
trash: se(
|
|
9020
|
-
|
|
9021
|
+
G`<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>`
|
|
9021
9022
|
),
|
|
9022
9023
|
sparkles: se(
|
|
9023
|
-
|
|
9024
|
+
G`<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/>`
|
|
9024
9025
|
),
|
|
9025
9026
|
refresh: se(
|
|
9026
|
-
|
|
9027
|
+
G`<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>`
|
|
9027
9028
|
),
|
|
9028
|
-
chevronDown: se(
|
|
9029
|
+
chevronDown: se(G`<path d="m6 9 6 6 6-6"/>`),
|
|
9029
9030
|
ghost: se(
|
|
9030
|
-
|
|
9031
|
+
G`<path d="M9 10h.01"/><path d="M15 10h.01"/><path d="M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z"/>`
|
|
9031
9032
|
),
|
|
9032
9033
|
qr: se(
|
|
9033
|
-
|
|
9034
|
+
G`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
|
|
9034
9035
|
)
|
|
9035
9036
|
}, ge = (t, e = "0 0 24 24") => b`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, xo = {
|
|
9036
9037
|
google: ge(
|
|
9037
|
-
|
|
9038
|
+
G`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
|
|
9038
9039
|
),
|
|
9039
9040
|
github: ge(
|
|
9040
|
-
|
|
9041
|
+
G`<path fill="currentColor" d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/>`
|
|
9041
9042
|
),
|
|
9042
9043
|
apple: ge(
|
|
9043
|
-
|
|
9044
|
+
G`<path fill="currentColor" d="M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z"/>`
|
|
9044
9045
|
),
|
|
9045
9046
|
facebook: ge(
|
|
9046
|
-
|
|
9047
|
+
G`<path fill="#1877F2" d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>`
|
|
9047
9048
|
),
|
|
9048
9049
|
x: ge(
|
|
9049
|
-
|
|
9050
|
+
G`<path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>`
|
|
9050
9051
|
),
|
|
9051
9052
|
microsoft: ge(
|
|
9052
|
-
|
|
9053
|
+
G`<path fill="#F25022" d="M1 1h10v10H1z"/><path fill="#7FBA00" d="M13 1h10v10H13z"/><path fill="#00A4EF" d="M1 13h10v10H1z"/><path fill="#FFB900" d="M13 13h10v10H13z"/>`
|
|
9053
9054
|
),
|
|
9054
9055
|
discord: ge(
|
|
9055
|
-
|
|
9056
|
+
G`<path fill="#5865F2" d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/>`
|
|
9056
9057
|
),
|
|
9057
9058
|
gitlab: ge(
|
|
9058
|
-
|
|
9059
|
+
G`<path fill="#FC6D26" d="m23.6 9.593-.033-.086L20.3.98a.851.851 0 0 0-.336-.405.876.876 0 0 0-1.001.054.874.874 0 0 0-.29.44l-2.205 6.748H7.535L5.33 1.069a.857.857 0 0 0-.29-.441.876.876 0 0 0-1.001-.054.86.86 0 0 0-.336.405L.436 9.502l-.032.086a6.066 6.066 0 0 0 2.012 7.01l.011.009.03.021 4.976 3.727 2.462 1.863 1.5 1.132a1.009 1.009 0 0 0 1.22 0l1.5-1.132 2.461-1.863 5.006-3.75.013-.01a6.068 6.068 0 0 0 2.006-7.002z"/>`
|
|
9059
9060
|
),
|
|
9060
9061
|
linkedin: ge(
|
|
9061
|
-
|
|
9062
|
+
G`<path fill="#0A66C2" d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>`
|
|
9062
9063
|
),
|
|
9063
9064
|
slack: ge(
|
|
9064
|
-
|
|
9065
|
+
G`<path fill="#E01E5A" d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"/><path fill="#36C5F0" d="M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"/><path fill="#2EB67D" d="M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"/><path fill="#ECB22E" d="M15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.315A2.527 2.527 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"/>`
|
|
9065
9066
|
),
|
|
9066
9067
|
twitch: ge(
|
|
9067
|
-
|
|
9068
|
+
G`<path fill="#9146FF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0 1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>`
|
|
9068
9069
|
),
|
|
9069
9070
|
spotify: ge(
|
|
9070
|
-
|
|
9071
|
+
G`<path fill="#1DB954" d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"/>`
|
|
9071
9072
|
),
|
|
9072
9073
|
notion: ge(
|
|
9073
|
-
|
|
9074
|
+
G`<path fill="currentColor" d="M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"/>`
|
|
9074
9075
|
),
|
|
9075
9076
|
dropbox: ge(
|
|
9076
|
-
|
|
9077
|
+
G`<path fill="#0061FF" d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807zm12 0-6 3.822 6 3.822 6-3.822-6-3.822zM0 13.274l6 3.822 6.001-3.822L6 9.452l-6 3.822zm18-3.822-6 3.822 6 3.822 6-3.822-6-3.822zM6 18.371l6.001 3.822 6-3.822-6-3.822L6 18.371z"/>`
|
|
9077
9078
|
),
|
|
9078
9079
|
figma: ge(
|
|
9079
|
-
|
|
9080
|
+
G`<path fill="#F24E1E" d="M8 24a4 4 0 0 0 4-4v-4H8a4 4 0 0 0 0 8z"/><path fill="#A259FF" d="M4 12a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#FF7262" d="M4 4a4 4 0 0 1 4-4h4v8H8a4 4 0 0 1-4-4z"/><path fill="#1ABCFE" d="M12 0h4a4 4 0 0 1 0 8h-4V0z"/><path fill="#0ACF83" d="M20 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0z"/>`
|
|
9080
9081
|
),
|
|
9081
9082
|
bitbucket: ge(
|
|
9082
|
-
|
|
9083
|
+
G`<path fill="#2684FF" d="M.778 1.213a.768.768 0 0 0-.768.892l3.263 19.81c.084.5.515.868 1.022.873H19.95a.772.772 0 0 0 .77-.646l3.27-20.03a.768.768 0 0 0-.768-.891zM14.52 15.53H9.522L8.17 8.466h7.561z"/>`
|
|
9083
9084
|
),
|
|
9084
9085
|
amazon: ge(
|
|
9085
|
-
|
|
9086
|
+
G`<path fill="currentColor" d="M.045 18.02c.072-.116.187-.124.348-.022 3.636 2.11 7.594 3.166 11.87 3.166 2.852 0 5.668-.533 8.447-1.595l.315-.14c.138-.06.234-.1.293-.13.226-.088.39-.046.525.13.12.174.09.336-.12.48-.256.19-.6.41-1.006.654-1.244.743-2.64 1.316-4.185 1.726a17.617 17.617 0 0 1-10.951-.577 17.88 17.88 0 0 1-5.43-3.35c-.1-.074-.151-.15-.151-.22 0-.047.021-.09.051-.13zm6.565-6.218c0-1.005.247-1.863.743-2.577.495-.71 1.17-1.25 2.04-1.615.796-.335 1.756-.575 2.912-.72.39-.046 1.033-.103 1.92-.174v-.37c0-.93-.105-1.558-.3-1.875-.302-.43-.78-.65-1.44-.65h-.182c-.48.046-.896.196-1.246.46-.35.27-.575.63-.675 1.096-.06.3-.206.465-.435.51l-2.52-.315c-.248-.06-.372-.18-.372-.39 0-.046.007-.09.022-.15.247-1.29.855-2.25 1.82-2.88.976-.616 2.1-.975 3.39-1.05h.54c1.65 0 2.957.434 3.888 1.29.135.15.27.3.405.48.12.165.224.314.283.45.075.134.15.33.195.57.06.254.105.42.135.51.03.104.062.3.076.615.01.313.02.493.02.553v5.28c0 .376.06.72.165 1.036.105.313.21.54.315.674l.51.674c.09.136.136.256.136.36 0 .12-.06.226-.18.314-1.2 1.05-1.86 1.62-1.963 1.71-.165.135-.373.15-.61.045a6.62 6.62 0 0 1-.526-.496l-.31-.347a9.858 9.858 0 0 1-.317-.42l-.3-.435c-.81.886-1.603 1.44-2.4 1.665-.494.15-1.093.227-1.83.227-1.11 0-2.04-.343-2.76-1.034-.72-.69-1.08-1.665-1.08-2.94l-.05-.076zm3.753-.438c0 .566.14 1.02.425 1.364.285.34.675.512 1.155.512.045 0 .106-.007.195-.02.09-.016.134-.023.166-.023.614-.16 1.08-.553 1.424-1.178.165-.28.285-.58.36-.91.09-.32.12-.59.135-.8.015-.195.015-.54.015-1.005v-.54c-.84 0-1.484.06-1.92.18-1.275.36-1.92 1.17-1.92 2.43l-.035-.01zm9.162 7.027c.03-.06.075-.11.132-.17.362-.243.714-.41 1.05-.5a8.094 8.094 0 0 1 1.612-.24c.14-.012.28 0 .41.03.65.06 1.05.168 1.172.33.063.09.099.228.099.39v.15c0 .51-.149 1.11-.424 1.8-.278.69-.664 1.248-1.156 1.68-.073.06-.14.09-.197.09-.03 0-.06 0-.09-.012-.09-.044-.107-.12-.064-.24.54-1.26.806-2.143.806-2.64 0-.15-.03-.27-.087-.344-.145-.166-.55-.257-1.224-.257-.243 0-.533.016-.87.045-.363.045-.7.09-1 .135-.09 0-.148-.014-.18-.044-.03-.03-.036-.06-.02-.106 0-.014.007-.03.02-.06z"/>`
|
|
9086
9087
|
),
|
|
9087
9088
|
paypal: ge(
|
|
9088
|
-
|
|
9089
|
+
G`<path fill="#003087" d="M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z"/>`
|
|
9089
9090
|
)
|
|
9090
9091
|
};
|
|
9091
9092
|
function ui(t) {
|
|
9092
9093
|
return xo[t] ?? _.globe;
|
|
9093
9094
|
}
|
|
9094
|
-
function
|
|
9095
|
+
function Ai(t) {
|
|
9095
9096
|
const e = (t.trim()[0] ?? "?").toUpperCase();
|
|
9096
9097
|
return /[A-Z0-9]/i.test(e) ? e : _.user;
|
|
9097
9098
|
}
|
|
@@ -9124,7 +9125,7 @@ var Mo = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, ke = (t, e
|
|
|
9124
9125
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
9125
9126
|
return i && o && Mo(e, n, o), o;
|
|
9126
9127
|
};
|
|
9127
|
-
let ve = class extends
|
|
9128
|
+
let ve = class extends qe {
|
|
9128
9129
|
constructor() {
|
|
9129
9130
|
super(...arguments), this.view = "sign-in", this.embedded = !1, this.step = "sign-in", this.busy = !1, this.error = "", this.notice = null, this.showPassword = !1, this.token = null, this.focusOnStep = !1, this.resendCooldownUntil = 0, this.challenge = null, this.recovery = null, this.email = "", this.password = "", this.passwordConfirm = "", this.name = "", this.phone = "", this.code = "", this.onSignIn = (t) => {
|
|
9130
9131
|
t.preventDefault(), this.requireValid(t) && this.run(async () => {
|
|
@@ -9484,7 +9485,7 @@ let ve = class extends Re {
|
|
|
9484
9485
|
<div class="stack">
|
|
9485
9486
|
<div class="row">
|
|
9486
9487
|
<div class="inline">
|
|
9487
|
-
<span class="avatar">${
|
|
9488
|
+
<span class="avatar">${Ai(e)}</span>
|
|
9488
9489
|
<div class="row-main">
|
|
9489
9490
|
<span class="row-title" title=${e}>${e}</span>
|
|
9490
9491
|
${t.email && t.name ? b`<span class="row-sub" title=${t.email}>${t.email}</span>` : M}
|
|
@@ -9514,7 +9515,7 @@ let ve = class extends Re {
|
|
|
9514
9515
|
renderProviders() {
|
|
9515
9516
|
const t = [...this.config?.methods?.oauth ?? []];
|
|
9516
9517
|
if (t.length === 0) return M;
|
|
9517
|
-
const e =
|
|
9518
|
+
const e = Fe();
|
|
9518
9519
|
t.sort((i, o) => {
|
|
9519
9520
|
const a = e === `oauth:${i}` ? 0 : 1, s = e === `oauth:${o}` ? 0 : 1;
|
|
9520
9521
|
return a - s;
|
|
@@ -9552,11 +9553,11 @@ let ve = class extends Re {
|
|
|
9552
9553
|
${this.renderProviders()}
|
|
9553
9554
|
${n && (e || i.length > 0) ? b`<div class="separator-text">${this.t("or")}</div>` : M}
|
|
9554
9555
|
${e ? b`<form
|
|
9555
|
-
class="form ${
|
|
9556
|
+
class="form ${Fe() === "email-password" ? "last-used-form" : ""}"
|
|
9556
9557
|
@submit=${this.onSignIn}
|
|
9557
9558
|
novalidate
|
|
9558
9559
|
>
|
|
9559
|
-
${
|
|
9560
|
+
${Fe() === "email-password" ? b`<p class="hint">
|
|
9560
9561
|
<span class="last-used-badge">${this.t("lastUsed")}</span>
|
|
9561
9562
|
</p>` : M}
|
|
9562
9563
|
${this.emailField()}
|
|
@@ -9565,7 +9566,7 @@ let ve = class extends Re {
|
|
|
9565
9566
|
</form>` : this.renderError()}
|
|
9566
9567
|
${i.length > 0 ? b`<div class="stack-sm">
|
|
9567
9568
|
${i.map((o) => {
|
|
9568
|
-
const a =
|
|
9569
|
+
const a = Fe() === o.step;
|
|
9569
9570
|
return b`<button
|
|
9570
9571
|
type="button"
|
|
9571
9572
|
class="btn btn-secondary btn-block ${a ? "last-used" : ""}"
|
|
@@ -9578,12 +9579,12 @@ let ve = class extends Re {
|
|
|
9578
9579
|
</div>` : M}
|
|
9579
9580
|
${t.anonymous ? b`<button
|
|
9580
9581
|
type="button"
|
|
9581
|
-
class="btn btn-ghost btn-block ${
|
|
9582
|
+
class="btn btn-ghost btn-block ${Fe() === "anonymous" ? "last-used" : ""}"
|
|
9582
9583
|
@click=${this.onGuest}
|
|
9583
9584
|
?disabled=${this.busy}
|
|
9584
9585
|
>
|
|
9585
9586
|
${_.ghost} ${this.t("continueAsGuest")}
|
|
9586
|
-
${
|
|
9587
|
+
${Fe() === "anonymous" ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : M}
|
|
9587
9588
|
</button>` : M}
|
|
9588
9589
|
${e && this.config?.signUp !== !1 ? b`<div class="links">
|
|
9589
9590
|
<span>${this.t("noAccount")}</span>
|
|
@@ -9869,7 +9870,7 @@ let ve = class extends Re {
|
|
|
9869
9870
|
`;
|
|
9870
9871
|
}
|
|
9871
9872
|
};
|
|
9872
|
-
ve.styles = [...
|
|
9873
|
+
ve.styles = [...qe.styles, Co];
|
|
9873
9874
|
ke([
|
|
9874
9875
|
ee({ type: String })
|
|
9875
9876
|
], ve.prototype, "view", 2);
|
|
@@ -9877,46 +9878,46 @@ ke([
|
|
|
9877
9878
|
ee({ type: Boolean })
|
|
9878
9879
|
], ve.prototype, "embedded", 2);
|
|
9879
9880
|
ke([
|
|
9880
|
-
|
|
9881
|
+
V()
|
|
9881
9882
|
], ve.prototype, "step", 2);
|
|
9882
9883
|
ke([
|
|
9883
|
-
|
|
9884
|
+
V()
|
|
9884
9885
|
], ve.prototype, "busy", 2);
|
|
9885
9886
|
ke([
|
|
9886
|
-
|
|
9887
|
+
V()
|
|
9887
9888
|
], ve.prototype, "error", 2);
|
|
9888
9889
|
ke([
|
|
9889
|
-
|
|
9890
|
+
V()
|
|
9890
9891
|
], ve.prototype, "notice", 2);
|
|
9891
9892
|
ke([
|
|
9892
|
-
|
|
9893
|
+
V()
|
|
9893
9894
|
], ve.prototype, "showPassword", 2);
|
|
9894
9895
|
ke([
|
|
9895
|
-
|
|
9896
|
+
V()
|
|
9896
9897
|
], ve.prototype, "token", 2);
|
|
9897
9898
|
ke([
|
|
9898
|
-
|
|
9899
|
+
V()
|
|
9899
9900
|
], ve.prototype, "resendCooldownUntil", 2);
|
|
9900
9901
|
ke([
|
|
9901
|
-
|
|
9902
|
+
V()
|
|
9902
9903
|
], ve.prototype, "challenge", 2);
|
|
9903
9904
|
ke([
|
|
9904
|
-
|
|
9905
|
+
V()
|
|
9905
9906
|
], ve.prototype, "recovery", 2);
|
|
9906
9907
|
ke([
|
|
9907
|
-
|
|
9908
|
+
bi("form input:not([type=hidden])")
|
|
9908
9909
|
], ve.prototype, "firstInput", 2);
|
|
9909
9910
|
ve = ke([
|
|
9910
|
-
|
|
9911
|
+
ze("authui-sign-in")
|
|
9911
9912
|
], ve);
|
|
9912
|
-
var
|
|
9913
|
-
for (var o = i > 1 ? void 0 : i ?
|
|
9913
|
+
var Eo = Object.defineProperty, qo = Object.getOwnPropertyDescriptor, O = (t, e, n, i) => {
|
|
9914
|
+
for (var o = i > 1 ? void 0 : i ? qo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
9914
9915
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
9915
|
-
return i && o &&
|
|
9916
|
+
return i && o && Eo(e, n, o), o;
|
|
9916
9917
|
};
|
|
9917
|
-
let z = class extends
|
|
9918
|
+
let z = class extends qe {
|
|
9918
9919
|
constructor() {
|
|
9919
|
-
super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.onTabsKeydown = (t) => {
|
|
9920
|
+
super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.onTabsKeydown = (t) => {
|
|
9920
9921
|
const e = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
|
|
9921
9922
|
if (!e.length) return;
|
|
9922
9923
|
const n = e.findIndex((a) => a.getAttribute("aria-selected") === "true");
|
|
@@ -9960,7 +9961,7 @@ let z = class extends Re {
|
|
|
9960
9961
|
Date.now() < this.verifyEmailCooldownUntil || this.run(
|
|
9961
9962
|
"verify",
|
|
9962
9963
|
async () => {
|
|
9963
|
-
await R.sendEmailVerification(), this.
|
|
9964
|
+
await R.sendEmailVerification(), this.startVerifyEmailCooldown();
|
|
9964
9965
|
},
|
|
9965
9966
|
this.t("verificationSent")
|
|
9966
9967
|
);
|
|
@@ -9987,7 +9988,7 @@ let z = class extends Re {
|
|
|
9987
9988
|
async () => {
|
|
9988
9989
|
await R.updatePassword(this.newPassword, this.oldPassword), this.oldPassword = this.newPassword = this.newPasswordConfirm = "";
|
|
9989
9990
|
},
|
|
9990
|
-
this.t("
|
|
9991
|
+
this.t("passwordChanged")
|
|
9991
9992
|
);
|
|
9992
9993
|
}
|
|
9993
9994
|
}, this.onToggleMfa = () => {
|
|
@@ -10057,9 +10058,12 @@ let z = class extends Re {
|
|
|
10057
10058
|
}, this.onStepUpVerify = (t) => {
|
|
10058
10059
|
if (t.preventDefault(), !this.requireValid(t)) return;
|
|
10059
10060
|
const e = this.stepUp;
|
|
10060
|
-
e?.challenge &&
|
|
10061
|
-
|
|
10062
|
-
|
|
10061
|
+
e?.challenge && (async () => {
|
|
10062
|
+
let n = !1;
|
|
10063
|
+
await this.run("stepup-code", async () => {
|
|
10064
|
+
await R.completeMfaChallenge(e.challenge.id, this.stepUpCode, { signIn: !1 }), this.stepUp = null, this.stepUpCode = "", n = !0;
|
|
10065
|
+
}), n && await e.retry();
|
|
10066
|
+
})();
|
|
10063
10067
|
}, this.onDeleteSession = (t) => {
|
|
10064
10068
|
this.run(`session-${t}`, async () => {
|
|
10065
10069
|
if ((this.sessions ?? []).some((n) => n.$id === t && n.current)) {
|
|
@@ -10089,6 +10093,9 @@ let z = class extends Re {
|
|
|
10089
10093
|
connectedCallback() {
|
|
10090
10094
|
super.connectedCallback(), this.active = this.tab, this.hydrate();
|
|
10091
10095
|
}
|
|
10096
|
+
disconnectedCallback() {
|
|
10097
|
+
super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
|
|
10098
|
+
}
|
|
10092
10099
|
willUpdate(t) {
|
|
10093
10100
|
t.has("tab") && t.get("tab") !== void 0 && (this.active = this.tab), t.has("auth") && this.hydrate(), this.ensureLoaded();
|
|
10094
10101
|
}
|
|
@@ -10200,6 +10207,14 @@ let z = class extends Re {
|
|
|
10200
10207
|
}
|
|
10201
10208
|
}
|
|
10202
10209
|
}
|
|
10210
|
+
startVerifyEmailCooldown() {
|
|
10211
|
+
this.verifyEmailCooldownUntil = Date.now() + 45e3, this.clearVerifyEmailCooldownTimer(), this.verifyEmailCooldownTimer = setInterval(() => {
|
|
10212
|
+
this.requestUpdate(), Date.now() >= this.verifyEmailCooldownUntil && this.clearVerifyEmailCooldownTimer();
|
|
10213
|
+
}, 1e3);
|
|
10214
|
+
}
|
|
10215
|
+
clearVerifyEmailCooldownTimer() {
|
|
10216
|
+
this.verifyEmailCooldownTimer && (clearInterval(this.verifyEmailCooldownTimer), this.verifyEmailCooldownTimer = null);
|
|
10217
|
+
}
|
|
10203
10218
|
bind(t) {
|
|
10204
10219
|
return (e) => {
|
|
10205
10220
|
this[t] = e.target.value;
|
|
@@ -10274,7 +10289,7 @@ let z = class extends Re {
|
|
|
10274
10289
|
return b`
|
|
10275
10290
|
<div class="between">
|
|
10276
10291
|
<div class="identity">
|
|
10277
|
-
<span class="avatar">${
|
|
10292
|
+
<span class="avatar">${Ai(e)}</span>
|
|
10278
10293
|
<div class="row-main">
|
|
10279
10294
|
<span class="row-title" title=${e}>
|
|
10280
10295
|
${e}
|
|
@@ -11088,7 +11103,7 @@ let z = class extends Re {
|
|
|
11088
11103
|
}
|
|
11089
11104
|
};
|
|
11090
11105
|
z.styles = [
|
|
11091
|
-
...
|
|
11106
|
+
...qe.styles,
|
|
11092
11107
|
We`
|
|
11093
11108
|
:host {
|
|
11094
11109
|
display: block;
|
|
@@ -11192,115 +11207,123 @@ O([
|
|
|
11192
11207
|
ee({ type: String })
|
|
11193
11208
|
], z.prototype, "tab", 2);
|
|
11194
11209
|
O([
|
|
11195
|
-
|
|
11210
|
+
V()
|
|
11196
11211
|
], z.prototype, "active", 2);
|
|
11197
11212
|
O([
|
|
11198
|
-
|
|
11213
|
+
V()
|
|
11199
11214
|
], z.prototype, "busy", 2);
|
|
11200
11215
|
O([
|
|
11201
|
-
|
|
11216
|
+
V()
|
|
11202
11217
|
], z.prototype, "notice", 2);
|
|
11203
11218
|
O([
|
|
11204
|
-
|
|
11219
|
+
V()
|
|
11205
11220
|
], z.prototype, "errors", 2);
|
|
11206
11221
|
O([
|
|
11207
|
-
|
|
11222
|
+
V()
|
|
11208
11223
|
], z.prototype, "nameInput", 2);
|
|
11209
11224
|
O([
|
|
11210
|
-
|
|
11225
|
+
V()
|
|
11211
11226
|
], z.prototype, "emailInput", 2);
|
|
11212
11227
|
O([
|
|
11213
|
-
|
|
11228
|
+
V()
|
|
11214
11229
|
], z.prototype, "emailPassword", 2);
|
|
11215
11230
|
O([
|
|
11216
|
-
|
|
11231
|
+
V()
|
|
11217
11232
|
], z.prototype, "phoneInput", 2);
|
|
11218
11233
|
O([
|
|
11219
|
-
|
|
11234
|
+
V()
|
|
11220
11235
|
], z.prototype, "phonePassword", 2);
|
|
11221
11236
|
O([
|
|
11222
|
-
|
|
11237
|
+
V()
|
|
11223
11238
|
], z.prototype, "phoneCode", 2);
|
|
11224
11239
|
O([
|
|
11225
|
-
|
|
11240
|
+
V()
|
|
11226
11241
|
], z.prototype, "phoneCodeSent", 2);
|
|
11227
11242
|
O([
|
|
11228
|
-
|
|
11243
|
+
V()
|
|
11229
11244
|
], z.prototype, "guestName", 2);
|
|
11230
11245
|
O([
|
|
11231
|
-
|
|
11246
|
+
V()
|
|
11232
11247
|
], z.prototype, "oldPassword", 2);
|
|
11233
11248
|
O([
|
|
11234
|
-
|
|
11249
|
+
V()
|
|
11235
11250
|
], z.prototype, "newPassword", 2);
|
|
11236
11251
|
O([
|
|
11237
|
-
|
|
11252
|
+
V()
|
|
11238
11253
|
], z.prototype, "newPasswordConfirm", 2);
|
|
11239
11254
|
O([
|
|
11240
|
-
|
|
11255
|
+
V()
|
|
11241
11256
|
], z.prototype, "authenticator", 2);
|
|
11242
11257
|
O([
|
|
11243
|
-
|
|
11258
|
+
V()
|
|
11244
11259
|
], z.prototype, "authenticatorCode", 2);
|
|
11245
11260
|
O([
|
|
11246
|
-
|
|
11261
|
+
V()
|
|
11247
11262
|
], z.prototype, "factors", 2);
|
|
11248
11263
|
O([
|
|
11249
|
-
|
|
11264
|
+
V()
|
|
11250
11265
|
], z.prototype, "recoveryCodes", 2);
|
|
11251
11266
|
O([
|
|
11252
|
-
|
|
11267
|
+
V()
|
|
11253
11268
|
], z.prototype, "stepUp", 2);
|
|
11254
11269
|
O([
|
|
11255
|
-
|
|
11270
|
+
V()
|
|
11256
11271
|
], z.prototype, "stepUpCode", 2);
|
|
11257
11272
|
O([
|
|
11258
|
-
|
|
11273
|
+
V()
|
|
11259
11274
|
], z.prototype, "copied", 2);
|
|
11260
11275
|
O([
|
|
11261
|
-
|
|
11276
|
+
V()
|
|
11262
11277
|
], z.prototype, "sessions", 2);
|
|
11263
11278
|
O([
|
|
11264
|
-
|
|
11279
|
+
V()
|
|
11265
11280
|
], z.prototype, "identities", 2);
|
|
11266
11281
|
O([
|
|
11267
|
-
|
|
11282
|
+
V()
|
|
11268
11283
|
], z.prototype, "logs", 2);
|
|
11269
11284
|
O([
|
|
11270
|
-
|
|
11285
|
+
V()
|
|
11271
11286
|
], z.prototype, "logsSupported", 2);
|
|
11272
11287
|
O([
|
|
11273
|
-
|
|
11288
|
+
V()
|
|
11274
11289
|
], z.prototype, "confirmDelete", 2);
|
|
11275
11290
|
O([
|
|
11276
|
-
|
|
11291
|
+
V()
|
|
11277
11292
|
], z.prototype, "confirmRegenerate", 2);
|
|
11278
11293
|
O([
|
|
11279
|
-
|
|
11294
|
+
V()
|
|
11280
11295
|
], z.prototype, "confirmRemoveAuthenticator", 2);
|
|
11281
11296
|
O([
|
|
11282
|
-
|
|
11297
|
+
V()
|
|
11283
11298
|
], z.prototype, "confirmSignOutAll", 2);
|
|
11284
11299
|
O([
|
|
11285
|
-
|
|
11300
|
+
V()
|
|
11286
11301
|
], z.prototype, "confirmDisconnectId", 2);
|
|
11287
11302
|
O([
|
|
11288
|
-
|
|
11303
|
+
V()
|
|
11289
11304
|
], z.prototype, "verifyEmailCooldownUntil", 2);
|
|
11290
11305
|
z = O([
|
|
11291
|
-
|
|
11306
|
+
ze("authui-account")
|
|
11292
11307
|
], z);
|
|
11293
|
-
var _o = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor,
|
|
11308
|
+
var _o = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Ge = (t, e, n, i) => {
|
|
11294
11309
|
for (var o = i > 1 ? void 0 : i ? Lo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11295
11310
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11296
11311
|
return i && o && _o(e, n, o), o;
|
|
11297
11312
|
};
|
|
11298
|
-
let
|
|
11313
|
+
let Re = class extends qe {
|
|
11299
11314
|
constructor() {
|
|
11300
|
-
super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.onOpenEvent = (t) => {
|
|
11315
|
+
super(...arguments), this.open = !1, this.view = "sign-in", this.closeOnSuccess = !0, this.handledPending = null, this.scrollCue = !1, this.bodyResizeObserver = null, this.onOpenEvent = (t) => {
|
|
11301
11316
|
const e = t.detail ?? {};
|
|
11302
11317
|
this.show(e.view);
|
|
11303
|
-
}, this.onCloseEvent = () => this.hide(), this.
|
|
11318
|
+
}, this.onCloseEvent = () => this.hide(), this.syncScrollCue = () => {
|
|
11319
|
+
const t = this.bodyEl;
|
|
11320
|
+
if (!t) {
|
|
11321
|
+
this.scrollCue = !1;
|
|
11322
|
+
return;
|
|
11323
|
+
}
|
|
11324
|
+
const e = t.scrollHeight > t.clientHeight + 1, n = t.scrollTop + t.clientHeight >= t.scrollHeight - 4, i = e && !n;
|
|
11325
|
+
i !== this.scrollCue && (this.scrollCue = i);
|
|
11326
|
+
}, this.onSuccess = () => {
|
|
11304
11327
|
this.fire("authui-signed-in", this.auth.user), this.closeOnSuccess && !this.config?.successUrl && this.hide();
|
|
11305
11328
|
}, this.onInnerOpen = (t) => {
|
|
11306
11329
|
const e = t.detail?.view;
|
|
@@ -11313,7 +11336,7 @@ let Ve = class extends Re {
|
|
|
11313
11336
|
super.connectedCallback(), window.addEventListener("authui:open", this.onOpenEvent), window.addEventListener("authui:close", this.onCloseEvent);
|
|
11314
11337
|
}
|
|
11315
11338
|
disconnectedCallback() {
|
|
11316
|
-
super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent);
|
|
11339
|
+
super.disconnectedCallback(), window.removeEventListener("authui:open", this.onOpenEvent), window.removeEventListener("authui:close", this.onCloseEvent), this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
|
|
11317
11340
|
}
|
|
11318
11341
|
show(t) {
|
|
11319
11342
|
t === "account" && this.auth.status !== "signed-in" ? this.view = "sign-in" : t ? this.view = t : this.auth.status === "signed-in" ? this.view = "account" : this.view = "sign-in", this.open = !0;
|
|
@@ -11321,11 +11344,23 @@ let Ve = class extends Re {
|
|
|
11321
11344
|
hide() {
|
|
11322
11345
|
this.open = !1;
|
|
11323
11346
|
}
|
|
11347
|
+
observeBody() {
|
|
11348
|
+
this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null;
|
|
11349
|
+
const t = this.bodyEl;
|
|
11350
|
+
if (!t || typeof ResizeObserver > "u") {
|
|
11351
|
+
this.syncScrollCue();
|
|
11352
|
+
return;
|
|
11353
|
+
}
|
|
11354
|
+
this.bodyResizeObserver = new ResizeObserver(() => this.syncScrollCue()), this.bodyResizeObserver.observe(t), t.firstElementChild && this.bodyResizeObserver.observe(t.firstElementChild), this.syncScrollCue();
|
|
11355
|
+
}
|
|
11324
11356
|
updated(t) {
|
|
11325
|
-
if (t.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() =>
|
|
11357
|
+
if (t.has("open") && this.dialog && (this.open && !this.dialog.open && (this.dialog.showModal(), requestAnimationFrame(() => {
|
|
11358
|
+
this.focusPrimary(), this.observeBody();
|
|
11359
|
+
})), !this.open && this.dialog.open && this.dialog.close(), this.open || (this.scrollCue = !1, this.bodyResizeObserver?.disconnect(), this.bodyResizeObserver = null)), t.has("auth")) {
|
|
11326
11360
|
const e = this.auth.pending;
|
|
11327
11361
|
e && e !== this.handledPending && e.type !== "notice" && (this.handledPending = e, this.view = "sign-in", this.open = !0), e?.type === "notice" && e !== this.handledPending && (this.handledPending = e, this.open = !0), this.open && this.view === "account" && this.auth.status !== "signed-in" && (this.view = "sign-in"), this.open && this.auth.status === "signed-out" && this.view === "account" && (this.view = "sign-in");
|
|
11328
11362
|
}
|
|
11363
|
+
this.open && (t.has("view") || t.has("auth") || t.has("open")) && requestAnimationFrame(() => this.observeBody());
|
|
11329
11364
|
}
|
|
11330
11365
|
focusPrimary() {
|
|
11331
11366
|
const t = this.dialog;
|
|
@@ -11349,25 +11384,30 @@ let Ve = class extends Re {
|
|
|
11349
11384
|
@authui-open=${this.onInnerOpen}
|
|
11350
11385
|
@authui-success=${this.onSuccess}
|
|
11351
11386
|
>
|
|
11352
|
-
<div class="
|
|
11353
|
-
<
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11387
|
+
<div class="frame">
|
|
11388
|
+
<div class="chrome">
|
|
11389
|
+
<button
|
|
11390
|
+
class="btn btn-ghost btn-icon close"
|
|
11391
|
+
@click=${this.hide}
|
|
11392
|
+
aria-label=${this.t("close")}
|
|
11393
|
+
>
|
|
11394
|
+
${_.x}
|
|
11395
|
+
</button>
|
|
11396
|
+
</div>
|
|
11397
|
+
<div class="body" @scroll=${this.syncScrollCue}>
|
|
11398
|
+
${this.open ? e ? b`<authui-account embedded></authui-account>` : b`<authui-sign-in
|
|
11399
|
+
embedded
|
|
11400
|
+
.view=${this.view === "account" ? "sign-in" : this.view}
|
|
11401
|
+
></authui-sign-in>` : M}
|
|
11402
|
+
</div>
|
|
11403
|
+
<div class="scroll-fade ${this.scrollCue ? "show" : ""}" aria-hidden="true"></div>
|
|
11364
11404
|
</div>
|
|
11365
11405
|
</dialog>
|
|
11366
11406
|
`;
|
|
11367
11407
|
}
|
|
11368
11408
|
};
|
|
11369
|
-
|
|
11370
|
-
...
|
|
11409
|
+
Re.styles = [
|
|
11410
|
+
...qe.styles,
|
|
11371
11411
|
We`
|
|
11372
11412
|
:host {
|
|
11373
11413
|
display: contents;
|
|
@@ -11405,15 +11445,29 @@ Ve.styles = [
|
|
|
11405
11445
|
transform: none;
|
|
11406
11446
|
}
|
|
11407
11447
|
}
|
|
11408
|
-
.
|
|
11409
|
-
|
|
11448
|
+
.frame {
|
|
11449
|
+
display: flex;
|
|
11450
|
+
flex-direction: column;
|
|
11410
11451
|
max-height: calc(100dvh - 2rem);
|
|
11452
|
+
min-height: 0;
|
|
11453
|
+
position: relative;
|
|
11454
|
+
}
|
|
11455
|
+
.chrome {
|
|
11456
|
+
flex-shrink: 0;
|
|
11457
|
+
display: flex;
|
|
11458
|
+
justify-content: flex-end;
|
|
11459
|
+
align-items: center;
|
|
11460
|
+
padding: 8px 8px 0;
|
|
11461
|
+
background: var(--authui-background);
|
|
11462
|
+
}
|
|
11463
|
+
.body {
|
|
11464
|
+
padding: 4px 24px 28px;
|
|
11411
11465
|
overflow-y: auto;
|
|
11466
|
+
flex: 1 1 auto;
|
|
11467
|
+
min-height: 0;
|
|
11468
|
+
-webkit-overflow-scrolling: touch;
|
|
11412
11469
|
}
|
|
11413
11470
|
.close {
|
|
11414
|
-
position: absolute;
|
|
11415
|
-
top: 12px;
|
|
11416
|
-
inset-inline-end: 12px;
|
|
11417
11471
|
width: 32px;
|
|
11418
11472
|
height: 32px;
|
|
11419
11473
|
border-radius: var(--authui-radius-sm);
|
|
@@ -11422,36 +11476,56 @@ Ve.styles = [
|
|
|
11422
11476
|
.close:hover {
|
|
11423
11477
|
opacity: 1;
|
|
11424
11478
|
}
|
|
11479
|
+
.scroll-fade {
|
|
11480
|
+
pointer-events: none;
|
|
11481
|
+
position: absolute;
|
|
11482
|
+
inset-inline: 0;
|
|
11483
|
+
bottom: 0;
|
|
11484
|
+
height: 40px;
|
|
11485
|
+
border-radius: 0 0 var(--authui-radius-lg) var(--authui-radius-lg);
|
|
11486
|
+
background: linear-gradient(to top, var(--authui-background), transparent);
|
|
11487
|
+
opacity: 0;
|
|
11488
|
+
transition: opacity 150ms;
|
|
11489
|
+
}
|
|
11490
|
+
.scroll-fade.show {
|
|
11491
|
+
opacity: 1;
|
|
11492
|
+
}
|
|
11425
11493
|
authui-sign-in,
|
|
11426
11494
|
authui-account {
|
|
11427
11495
|
max-width: none;
|
|
11428
11496
|
}
|
|
11429
11497
|
`
|
|
11430
11498
|
];
|
|
11431
|
-
|
|
11499
|
+
Ge([
|
|
11432
11500
|
ee({ type: Boolean, reflect: !0 })
|
|
11433
|
-
],
|
|
11434
|
-
|
|
11501
|
+
], Re.prototype, "open", 2);
|
|
11502
|
+
Ge([
|
|
11435
11503
|
ee({ type: String })
|
|
11436
|
-
],
|
|
11437
|
-
|
|
11504
|
+
], Re.prototype, "view", 2);
|
|
11505
|
+
Ge([
|
|
11438
11506
|
ee({ type: Boolean, attribute: "close-on-success" })
|
|
11439
|
-
],
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
],
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
],
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
],
|
|
11507
|
+
], Re.prototype, "closeOnSuccess", 2);
|
|
11508
|
+
Ge([
|
|
11509
|
+
V()
|
|
11510
|
+
], Re.prototype, "handledPending", 2);
|
|
11511
|
+
Ge([
|
|
11512
|
+
V()
|
|
11513
|
+
], Re.prototype, "scrollCue", 2);
|
|
11514
|
+
Ge([
|
|
11515
|
+
bi("dialog")
|
|
11516
|
+
], Re.prototype, "dialog", 2);
|
|
11517
|
+
Ge([
|
|
11518
|
+
bi(".body")
|
|
11519
|
+
], Re.prototype, "bodyEl", 2);
|
|
11520
|
+
Re = Ge([
|
|
11521
|
+
ze("authui-modal")
|
|
11522
|
+
], Re);
|
|
11449
11523
|
var No = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, _t = (t, e, n, i) => {
|
|
11450
11524
|
for (var o = i > 1 ? void 0 : i ? Ho(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11451
11525
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11452
11526
|
return i && o && No(e, n, o), o;
|
|
11453
11527
|
};
|
|
11454
|
-
let
|
|
11528
|
+
let ot = class extends qe {
|
|
11455
11529
|
constructor() {
|
|
11456
11530
|
super(...arguments), this.view = "sign-in", this.variant = "primary", this.size = "md";
|
|
11457
11531
|
}
|
|
@@ -11468,8 +11542,8 @@ let nt = class extends Re {
|
|
|
11468
11542
|
</button>`;
|
|
11469
11543
|
}
|
|
11470
11544
|
};
|
|
11471
|
-
|
|
11472
|
-
...
|
|
11545
|
+
ot.styles = [
|
|
11546
|
+
...qe.styles,
|
|
11473
11547
|
We`
|
|
11474
11548
|
:host {
|
|
11475
11549
|
display: inline-block;
|
|
@@ -11481,24 +11555,26 @@ nt.styles = [
|
|
|
11481
11555
|
];
|
|
11482
11556
|
_t([
|
|
11483
11557
|
ee({ type: String })
|
|
11484
|
-
],
|
|
11558
|
+
], ot.prototype, "view", 2);
|
|
11485
11559
|
_t([
|
|
11486
11560
|
ee({ type: String })
|
|
11487
|
-
],
|
|
11561
|
+
], ot.prototype, "variant", 2);
|
|
11488
11562
|
_t([
|
|
11489
11563
|
ee({ type: String })
|
|
11490
|
-
],
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
],
|
|
11494
|
-
var Do = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor,
|
|
11564
|
+
], ot.prototype, "size", 2);
|
|
11565
|
+
ot = _t([
|
|
11566
|
+
ze("authui-button")
|
|
11567
|
+
], ot);
|
|
11568
|
+
var Do = Object.defineProperty, Bo = Object.getOwnPropertyDescriptor, Ke = (t, e, n, i) => {
|
|
11495
11569
|
for (var o = i > 1 ? void 0 : i ? Bo(e, n) : e, a = t.length - 1, s; a >= 0; a--)
|
|
11496
11570
|
(s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
|
|
11497
11571
|
return i && o && Do(e, n, o), o;
|
|
11498
11572
|
};
|
|
11499
|
-
let
|
|
11573
|
+
let Ee = class extends qe {
|
|
11500
11574
|
constructor() {
|
|
11501
|
-
super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.
|
|
11575
|
+
super(...arguments), this.showTeams = !1, this.src = "", this.menuOpen = !1, this.menuAbove = !1, this.teams = [], this.teamsLoading = !1, this.activeTeamId = null, this.onReposition = () => {
|
|
11576
|
+
this.menuOpen && this.placeMenu();
|
|
11577
|
+
}, this.onDocumentClick = (t) => {
|
|
11502
11578
|
t.composedPath().includes(this) || (this.menuOpen = !1);
|
|
11503
11579
|
}, this.onKeydown = (t) => {
|
|
11504
11580
|
if (!this.menuOpen) {
|
|
@@ -11528,10 +11604,21 @@ let He = class extends Re {
|
|
|
11528
11604
|
};
|
|
11529
11605
|
}
|
|
11530
11606
|
connectedCallback() {
|
|
11531
|
-
super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown);
|
|
11607
|
+
super.connectedCallback(), document.addEventListener("click", this.onDocumentClick, !0), document.addEventListener("keydown", this.onKeydown), this.addEventListener("keydown", this.onKeydown), window.addEventListener("resize", this.onReposition), window.addEventListener("scroll", this.onReposition, !0);
|
|
11532
11608
|
}
|
|
11533
11609
|
disconnectedCallback() {
|
|
11534
|
-
super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown);
|
|
11610
|
+
super.disconnectedCallback(), document.removeEventListener("click", this.onDocumentClick, !0), document.removeEventListener("keydown", this.onKeydown), this.removeEventListener("keydown", this.onKeydown), window.removeEventListener("resize", this.onReposition), window.removeEventListener("scroll", this.onReposition, !0);
|
|
11611
|
+
}
|
|
11612
|
+
/** Flip the menu above the trigger when there is not enough space below. */
|
|
11613
|
+
placeMenu() {
|
|
11614
|
+
const t = this.renderRoot?.querySelector(".trigger"), e = this.renderRoot?.querySelector(".menu");
|
|
11615
|
+
if (!t || !e) return;
|
|
11616
|
+
const n = t.getBoundingClientRect(), i = 6, o = 8;
|
|
11617
|
+
e.style.maxHeight = "";
|
|
11618
|
+
const a = e.offsetHeight + i, s = window.innerHeight - n.bottom, r = n.top, d = s < a && r > s;
|
|
11619
|
+
d !== this.menuAbove && (this.menuAbove = d);
|
|
11620
|
+
const c = Math.max(80, (d ? r : s) - i - o);
|
|
11621
|
+
e.style.maxHeight = `${c}px`;
|
|
11535
11622
|
}
|
|
11536
11623
|
focusMenuItem(t) {
|
|
11537
11624
|
[
|
|
@@ -11539,7 +11626,9 @@ let He = class extends Re {
|
|
|
11539
11626
|
][t]?.focus();
|
|
11540
11627
|
}
|
|
11541
11628
|
updated(t) {
|
|
11542
|
-
t.has("menuOpen") && this.menuOpen
|
|
11629
|
+
t.has("menuOpen") && (this.menuOpen ? (this.showTeams && this.loadTeams(), requestAnimationFrame(() => {
|
|
11630
|
+
this.placeMenu(), this.focusMenuItem(0);
|
|
11631
|
+
})) : this.menuAbove = !1), this.menuOpen && (t.has("teams") || t.has("teamsLoading")) && requestAnimationFrame(() => this.placeMenu());
|
|
11543
11632
|
}
|
|
11544
11633
|
async loadTeams() {
|
|
11545
11634
|
this.teamsLoading = !0, this.activeTeamId = R.getActiveTeamId();
|
|
@@ -11569,10 +11658,10 @@ let He = class extends Re {
|
|
|
11569
11658
|
aria-label=${i}
|
|
11570
11659
|
>
|
|
11571
11660
|
<span class="avatar"
|
|
11572
|
-
>${this.src ? b`<img src=${this.src} alt="" />` :
|
|
11661
|
+
>${this.src ? b`<img src=${this.src} alt="" />` : Ai(i)}</span
|
|
11573
11662
|
>
|
|
11574
11663
|
</button>
|
|
11575
|
-
${this.menuOpen ? b`<div class="menu" role="menu">
|
|
11664
|
+
${this.menuOpen ? b`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
|
|
11576
11665
|
<div class="menu-header">
|
|
11577
11666
|
<span class="row-title" title=${i}>${i}</span>
|
|
11578
11667
|
${e.email && e.name ? b`<span class="row-sub" title=${e.email}>${e.email}</span>` : M}
|
|
@@ -11616,8 +11705,8 @@ let He = class extends Re {
|
|
|
11616
11705
|
`;
|
|
11617
11706
|
}
|
|
11618
11707
|
};
|
|
11619
|
-
|
|
11620
|
-
...
|
|
11708
|
+
Ee.styles = [
|
|
11709
|
+
...qe.styles,
|
|
11621
11710
|
We`
|
|
11622
11711
|
:host {
|
|
11623
11712
|
display: inline-block;
|
|
@@ -11643,9 +11732,12 @@ He.styles = [
|
|
|
11643
11732
|
.menu {
|
|
11644
11733
|
position: absolute;
|
|
11645
11734
|
top: calc(100% + 6px);
|
|
11735
|
+
bottom: auto;
|
|
11646
11736
|
inset-inline-end: 0;
|
|
11647
11737
|
min-width: 220px;
|
|
11648
11738
|
max-width: min(320px, 90vw);
|
|
11739
|
+
max-height: min(360px, calc(100dvh - 16px));
|
|
11740
|
+
overflow-y: auto;
|
|
11649
11741
|
background: var(--authui-popover);
|
|
11650
11742
|
color: var(--authui-popover-foreground);
|
|
11651
11743
|
border: 1px solid var(--authui-border);
|
|
@@ -11657,6 +11749,10 @@ He.styles = [
|
|
|
11657
11749
|
flex-direction: column;
|
|
11658
11750
|
gap: 2px;
|
|
11659
11751
|
}
|
|
11752
|
+
.menu.above {
|
|
11753
|
+
top: auto;
|
|
11754
|
+
bottom: calc(100% + 6px);
|
|
11755
|
+
}
|
|
11660
11756
|
.menu-header {
|
|
11661
11757
|
min-width: 0;
|
|
11662
11758
|
overflow: hidden;
|
|
@@ -11727,27 +11823,30 @@ He.styles = [
|
|
|
11727
11823
|
}
|
|
11728
11824
|
`
|
|
11729
11825
|
];
|
|
11730
|
-
|
|
11826
|
+
Ke([
|
|
11731
11827
|
ee({ type: Boolean, attribute: "show-teams" })
|
|
11732
|
-
],
|
|
11733
|
-
|
|
11828
|
+
], Ee.prototype, "showTeams", 2);
|
|
11829
|
+
Ke([
|
|
11734
11830
|
ee({ type: String })
|
|
11735
|
-
],
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
],
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
],
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
],
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
],
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
],
|
|
11831
|
+
], Ee.prototype, "src", 2);
|
|
11832
|
+
Ke([
|
|
11833
|
+
V()
|
|
11834
|
+
], Ee.prototype, "menuOpen", 2);
|
|
11835
|
+
Ke([
|
|
11836
|
+
V()
|
|
11837
|
+
], Ee.prototype, "menuAbove", 2);
|
|
11838
|
+
Ke([
|
|
11839
|
+
V()
|
|
11840
|
+
], Ee.prototype, "teams", 2);
|
|
11841
|
+
Ke([
|
|
11842
|
+
V()
|
|
11843
|
+
], Ee.prototype, "teamsLoading", 2);
|
|
11844
|
+
Ke([
|
|
11845
|
+
V()
|
|
11846
|
+
], Ee.prototype, "activeTeamId", 2);
|
|
11847
|
+
Ee = Ke([
|
|
11848
|
+
ze("authui-user-button")
|
|
11849
|
+
], Ee);
|
|
11751
11850
|
function Xo(t) {
|
|
11752
11851
|
return R.configure(t), zo;
|
|
11753
11852
|
}
|
|
@@ -11795,30 +11894,30 @@ export {
|
|
|
11795
11894
|
yo as AuthStore,
|
|
11796
11895
|
zo as AuthUI,
|
|
11797
11896
|
z as AuthUIAccount,
|
|
11798
|
-
|
|
11897
|
+
ot as AuthUIButton,
|
|
11799
11898
|
pe as AuthUIConfigElement,
|
|
11800
|
-
|
|
11801
|
-
|
|
11899
|
+
qe as AuthUIElement,
|
|
11900
|
+
Re as AuthUIModal,
|
|
11802
11901
|
mt as AuthUIShow,
|
|
11803
11902
|
ve as AuthUISignIn,
|
|
11804
|
-
|
|
11903
|
+
Ee as AuthUIUserButton,
|
|
11805
11904
|
ia as CRITICAL_FOUC_CSS,
|
|
11806
11905
|
oe as ErrorTypes,
|
|
11807
|
-
|
|
11906
|
+
Ji as FOUC_CSS,
|
|
11808
11907
|
uo as PreviewAccount,
|
|
11809
11908
|
ea as appwrite,
|
|
11810
11909
|
R as authStore,
|
|
11811
11910
|
ta as clearLastMethod,
|
|
11812
|
-
|
|
11911
|
+
Vi as clearPendingOAuth,
|
|
11813
11912
|
Wo as close,
|
|
11814
11913
|
Uo as closeModal,
|
|
11815
11914
|
so as defaultStrings,
|
|
11816
11915
|
xt as describeError,
|
|
11817
11916
|
Zo as getAccount,
|
|
11818
11917
|
Jo as getClient,
|
|
11819
|
-
|
|
11918
|
+
Fe as getLastMethod,
|
|
11820
11919
|
Yo as getState,
|
|
11821
|
-
|
|
11920
|
+
Xi as getStoredActiveTeamId,
|
|
11822
11921
|
Ko as getUser,
|
|
11823
11922
|
Xo as init,
|
|
11824
11923
|
ho as isConfigError,
|
|
@@ -11833,5 +11932,5 @@ export {
|
|
|
11833
11932
|
fo as setStoredActiveTeamId,
|
|
11834
11933
|
Go as signOut,
|
|
11835
11934
|
go as stashPendingOAuth,
|
|
11836
|
-
|
|
11935
|
+
tt as toAuthUIError
|
|
11837
11936
|
};
|