@versini/sassysaint 8.72.2 → 8.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.CXOnXOxv.js → AboutChangelog.Cp9PopiO.js} +2 -2
- package/dist/chunks/{AboutEntry.BqghyPht.js → AboutEntry.BOb5_aZI.js} +7 -7
- package/dist/chunks/{App.DiTqgtxP.js → App.Ck78giBC.js} +2310 -2275
- package/dist/chunks/{Chart.zHnmf0lE.js → Chart.C1dgaS-F.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BCUcCov2.js → ChatBubbleAssistant.CT2jmjen.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DeTLiCnK.js → ChatBubbleUser.CM1FzHNQ.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BLuVDrmn.js → ChatHistoryTable._Rzl_5Sk.js} +3 -3
- package/dist/chunks/{HistoryEntry.DfYIUhAQ.js → HistoryEntry.DM6RInwR.js} +3 -3
- package/dist/chunks/{ProfileEntry.AoEbtJwx.js → ProfileEntry.Naot3F9p.js} +2 -2
- package/dist/chunks/{SettingsEntry.DxeR3V3h.js → SettingsEntry.Du0GDXgA.js} +109 -108
- package/dist/chunks/{Table.DEwmX1g0.js → Table.JtsJZQLY.js} +2 -2
- package/dist/chunks/{UsageEntry.Dm5VMDaB.js → UsageEntry.C18Kaf6V.js} +3 -3
- package/dist/chunks/{UserMemoriesPanel.DfUqGJlK.js → UserMemoriesPanel.C9gXdvcN.js} +4 -4
- package/dist/chunks/{index.C1N6IHak.js → index.BYZBF4_0.js} +1 -1
- package/dist/chunks/{index.DMxEcskX.js → index.Ce0bioPG.js} +1 -1
- package/dist/chunks/{index.Cs_I2oBS.js → index.D0pvrKFC.js} +1 -1
- package/dist/chunks/{index.BWK5jDpV.js → index.DBqrJ-of.js} +2 -2
- package/dist/chunks/{index.D-zPjU38.js → index.DTBMKq5O.js} +651 -649
- package/dist/chunks/{index.TGXUnVDl.js → index.DdEAWm8o.js} +1 -1
- package/dist/chunks/{index.CjmLIeXl.js → index.GppF30Qs.js} +1 -1
- package/dist/chunks/{index.DyFmi5Zp.js → index.ce_hM2eo.js} +3 -3
- package/dist/chunks/{useMarkdown.6gAYVpMt.js → useMarkdown.CfYCs10-.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as h, jsxs as V, Fragment as
|
|
1
|
+
import { jsx as h, jsxs as V, Fragment as kr } from "react/jsx-runtime";
|
|
2
2
|
import * as H from "react";
|
|
3
|
-
import oe, { createContext as Ft, useReducer as
|
|
3
|
+
import oe, { createContext as Ft, useReducer as Nr, useCallback as X, useRef as j, useEffect as W, useSyncExternalStore as Gs, useContext as ct, useState as ie, useMemo as ze, useId as Bs, useLayoutEffect as Xe, Suspense as qs, lazy as Ws } from "react";
|
|
4
4
|
import y from "clsx";
|
|
5
5
|
var Ne = class {
|
|
6
6
|
constructor() {
|
|
@@ -18,7 +18,7 @@ var Ne = class {
|
|
|
18
18
|
}
|
|
19
19
|
onUnsubscribe() {
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, Vs = {
|
|
22
22
|
// We need the wrapper function syntax below instead of direct references to
|
|
23
23
|
// global setTimeout etc.
|
|
24
24
|
//
|
|
@@ -33,14 +33,14 @@ var Ne = class {
|
|
|
33
33
|
clearTimeout: (e) => clearTimeout(e),
|
|
34
34
|
setInterval: (e, t) => setInterval(e, t),
|
|
35
35
|
clearInterval: (e) => clearInterval(e)
|
|
36
|
-
},
|
|
36
|
+
}, js = class {
|
|
37
37
|
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
38
38
|
// type at app boot; and if we leave that type, then any new timer provider
|
|
39
39
|
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
40
40
|
//
|
|
41
41
|
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
42
42
|
// this class is unsafe internally to allow for extension.
|
|
43
|
-
#e =
|
|
43
|
+
#e = Vs;
|
|
44
44
|
#t = !1;
|
|
45
45
|
setTimeoutProvider(e) {
|
|
46
46
|
process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error(
|
|
@@ -60,20 +60,20 @@ var Ne = class {
|
|
|
60
60
|
clearInterval(e) {
|
|
61
61
|
this.#e.clearInterval(e);
|
|
62
62
|
}
|
|
63
|
-
}, ge = new
|
|
64
|
-
function
|
|
63
|
+
}, ge = new js();
|
|
64
|
+
function Qs(e) {
|
|
65
65
|
setTimeout(e, 0);
|
|
66
66
|
}
|
|
67
67
|
var be = typeof window > "u" || "Deno" in globalThis;
|
|
68
68
|
function q() {
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Js(e, t) {
|
|
71
71
|
return typeof e == "function" ? e(t) : e;
|
|
72
72
|
}
|
|
73
73
|
function Ct(e) {
|
|
74
74
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Pr(e, t) {
|
|
77
77
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
78
78
|
}
|
|
79
79
|
function de(e, t) {
|
|
@@ -130,7 +130,7 @@ function Ee(e) {
|
|
|
130
130
|
function De(e, t) {
|
|
131
131
|
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((r) => De(e[r], t[r])) : !1;
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var Ys = Object.prototype.hasOwnProperty;
|
|
134
134
|
function Ot(e, t) {
|
|
135
135
|
if (e === t)
|
|
136
136
|
return e;
|
|
@@ -141,7 +141,7 @@ function Ot(e, t) {
|
|
|
141
141
|
for (let f = 0; f < i; f++) {
|
|
142
142
|
const d = r ? f : n[f], u = e[d], l = t[d];
|
|
143
143
|
if (u === l) {
|
|
144
|
-
o[d] = u, (r ? f < a :
|
|
144
|
+
o[d] = u, (r ? f < a : Ys.call(e, d)) && c++;
|
|
145
145
|
continue;
|
|
146
146
|
}
|
|
147
147
|
if (u === null || l === null || typeof u != "object" || typeof l != "object") {
|
|
@@ -176,7 +176,7 @@ function kt(e) {
|
|
|
176
176
|
function sr(e) {
|
|
177
177
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function zs(e) {
|
|
180
180
|
return new Promise((t) => {
|
|
181
181
|
ge.setTimeout(t, e);
|
|
182
182
|
});
|
|
@@ -197,24 +197,24 @@ function Nt(e, t, r) {
|
|
|
197
197
|
}
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Xs(e, t, r = 0) {
|
|
201
201
|
const s = [...e, t];
|
|
202
202
|
return r && s.length > r ? s.slice(1) : s;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Zs(e, t, r = 0) {
|
|
205
205
|
const s = [t, ...e];
|
|
206
206
|
return r && s.length > r ? s.slice(0, -1) : s;
|
|
207
207
|
}
|
|
208
208
|
var et = Symbol();
|
|
209
|
-
function
|
|
209
|
+
function $r(e, t) {
|
|
210
210
|
return process.env.NODE_ENV !== "production" && e.queryFn === et && console.error(
|
|
211
211
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
|
|
212
212
|
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === et ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function xr(e, t) {
|
|
215
215
|
return typeof e == "function" ? e(...t) : !!e;
|
|
216
216
|
}
|
|
217
|
-
var
|
|
217
|
+
var ea = class extends Ne {
|
|
218
218
|
#e;
|
|
219
219
|
#t;
|
|
220
220
|
#r;
|
|
@@ -251,7 +251,7 @@ var Zs = class extends Ne {
|
|
|
251
251
|
isFocused() {
|
|
252
252
|
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
253
253
|
}
|
|
254
|
-
}, Kt = new
|
|
254
|
+
}, Kt = new ea();
|
|
255
255
|
function Pt() {
|
|
256
256
|
let e, t;
|
|
257
257
|
const r = new Promise((a, n) => {
|
|
@@ -274,13 +274,13 @@ function Pt() {
|
|
|
274
274
|
}), t(a);
|
|
275
275
|
}, r;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
function
|
|
277
|
+
var ta = Qs;
|
|
278
|
+
function ra() {
|
|
279
279
|
let e = [], t = 0, r = (o) => {
|
|
280
280
|
o();
|
|
281
281
|
}, s = (o) => {
|
|
282
282
|
o();
|
|
283
|
-
}, a =
|
|
283
|
+
}, a = ta;
|
|
284
284
|
const n = (o) => {
|
|
285
285
|
t ? e.push(o) : a(() => {
|
|
286
286
|
r(o);
|
|
@@ -334,7 +334,7 @@ function ta() {
|
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
var $ =
|
|
337
|
+
var $ = ra(), sa = class extends Ne {
|
|
338
338
|
#e = !0;
|
|
339
339
|
#t;
|
|
340
340
|
#r;
|
|
@@ -365,11 +365,11 @@ var $ = ta(), ra = class extends Ne {
|
|
|
365
365
|
isOnline() {
|
|
366
366
|
return this.#e;
|
|
367
367
|
}
|
|
368
|
-
}, tt = new
|
|
369
|
-
function
|
|
368
|
+
}, tt = new sa();
|
|
369
|
+
function aa(e) {
|
|
370
370
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Mr(e) {
|
|
373
373
|
return (e ?? "online") === "online" ? tt.isOnline() : !0;
|
|
374
374
|
}
|
|
375
375
|
var $t = class extends Error {
|
|
@@ -377,7 +377,7 @@ var $t = class extends Error {
|
|
|
377
377
|
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
|
-
function
|
|
380
|
+
function Dr(e) {
|
|
381
381
|
let t = !1, r = 0, s;
|
|
382
382
|
const a = Pt(), n = () => a.status !== "pending", i = (g) => {
|
|
383
383
|
if (!n()) {
|
|
@@ -388,7 +388,7 @@ function Mr(e) {
|
|
|
388
388
|
t = !0;
|
|
389
389
|
}, c = () => {
|
|
390
390
|
t = !1;
|
|
391
|
-
}, f = () => Kt.isFocused() && (e.networkMode === "always" || tt.isOnline()) && e.canRun(), d = () =>
|
|
391
|
+
}, f = () => Kt.isFocused() && (e.networkMode === "always" || tt.isOnline()) && e.canRun(), d = () => Mr(e.networkMode) && e.canRun(), u = (g) => {
|
|
392
392
|
n() || (s?.(), a.resolve(g));
|
|
393
393
|
}, l = (g) => {
|
|
394
394
|
n() || (s?.(), a.reject(g));
|
|
@@ -411,12 +411,12 @@ function Mr(e) {
|
|
|
411
411
|
Promise.resolve(g).then(u).catch((E) => {
|
|
412
412
|
if (n())
|
|
413
413
|
return;
|
|
414
|
-
const O = e.retry ?? (be ? 0 : 3), A = e.retryDelay ??
|
|
414
|
+
const O = e.retry ?? (be ? 0 : 3), A = e.retryDelay ?? aa, K = typeof A == "function" ? A(r, E) : A, R = O === !0 || typeof O == "number" && r < O || typeof O == "function" && O(r, E);
|
|
415
415
|
if (t || !R) {
|
|
416
416
|
l(E);
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
|
-
r++, e.onFail?.(r, E),
|
|
419
|
+
r++, e.onFail?.(r, E), zs(K).then(() => f() ? void 0 : m()).then(() => {
|
|
420
420
|
t ? l(E) : p();
|
|
421
421
|
});
|
|
422
422
|
});
|
|
@@ -432,7 +432,7 @@ function Mr(e) {
|
|
|
432
432
|
start: () => (d() ? p() : m().then(p), a)
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
var
|
|
435
|
+
var Lr = class {
|
|
436
436
|
#e;
|
|
437
437
|
destroy() {
|
|
438
438
|
this.clearGcTimeout();
|
|
@@ -451,7 +451,7 @@ var Dr = class {
|
|
|
451
451
|
clearGcTimeout() {
|
|
452
452
|
this.#e && (ge.clearTimeout(this.#e), this.#e = void 0);
|
|
453
453
|
}
|
|
454
|
-
},
|
|
454
|
+
}, na = class extends Lr {
|
|
455
455
|
#e;
|
|
456
456
|
#t;
|
|
457
457
|
#r;
|
|
@@ -521,7 +521,7 @@ var Dr = class {
|
|
|
521
521
|
) : this.state.data === void 0 || this.state.isInvalidated;
|
|
522
522
|
}
|
|
523
523
|
isStaleByTime(e = 0) {
|
|
524
|
-
return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !
|
|
524
|
+
return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !Pr(this.state.dataUpdatedAt, e);
|
|
525
525
|
}
|
|
526
526
|
onFocus() {
|
|
527
527
|
this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#s?.continue();
|
|
@@ -564,7 +564,7 @@ var Dr = class {
|
|
|
564
564
|
get: () => (this.#o = !0, r.signal)
|
|
565
565
|
});
|
|
566
566
|
}, a = () => {
|
|
567
|
-
const o =
|
|
567
|
+
const o = $r(this.options, t), f = (() => {
|
|
568
568
|
const d = {
|
|
569
569
|
client: this.#a,
|
|
570
570
|
queryKey: this.queryKey,
|
|
@@ -588,7 +588,7 @@ var Dr = class {
|
|
|
588
588
|
};
|
|
589
589
|
return s(o), o;
|
|
590
590
|
})();
|
|
591
|
-
this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s =
|
|
591
|
+
this.options.behavior?.onFetch(i, this), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#n({ type: "fetch", meta: i.fetchOptions?.meta }), this.#s = Dr({
|
|
592
592
|
initialPromise: t?.initialPromise,
|
|
593
593
|
fn: i.fetchFn,
|
|
594
594
|
onCancel: (o) => {
|
|
@@ -669,7 +669,7 @@ var Dr = class {
|
|
|
669
669
|
case "fetch":
|
|
670
670
|
return {
|
|
671
671
|
...r,
|
|
672
|
-
...
|
|
672
|
+
...Ur(r.data, this.options),
|
|
673
673
|
fetchMeta: e.meta ?? null
|
|
674
674
|
};
|
|
675
675
|
case "success":
|
|
@@ -719,11 +719,11 @@ var Dr = class {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
function
|
|
722
|
+
function Ur(e, t) {
|
|
723
723
|
return {
|
|
724
724
|
fetchFailureCount: 0,
|
|
725
725
|
fetchFailureReason: null,
|
|
726
|
-
fetchStatus:
|
|
726
|
+
fetchStatus: Mr(t.networkMode) ? "fetching" : "paused",
|
|
727
727
|
...e === void 0 && {
|
|
728
728
|
error: null,
|
|
729
729
|
status: "pending"
|
|
@@ -747,7 +747,7 @@ function ar(e) {
|
|
|
747
747
|
fetchStatus: "idle"
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
-
var
|
|
750
|
+
var ia = class extends Ne {
|
|
751
751
|
constructor(e, t) {
|
|
752
752
|
super(), this.options = t, this.#e = e, this.#n = null, this.#o = Pt(), this.bindMethods(), this.setOptions(t);
|
|
753
753
|
}
|
|
@@ -817,7 +817,7 @@ var na = class extends Ne {
|
|
|
817
817
|
}
|
|
818
818
|
getOptimisticResult(e) {
|
|
819
819
|
const t = this.#e.getQueryCache().build(this.#e, e), r = this.createResult(t, e);
|
|
820
|
-
return
|
|
820
|
+
return ca(this, r) && (this.#a = r, this.#i = this.options, this.#s = this.#t.state), r;
|
|
821
821
|
}
|
|
822
822
|
getCurrentResult() {
|
|
823
823
|
return this.#a;
|
|
@@ -868,7 +868,7 @@ var na = class extends Ne {
|
|
|
868
868
|
);
|
|
869
869
|
if (be || this.#a.isStale || !Ct(e))
|
|
870
870
|
return;
|
|
871
|
-
const r =
|
|
871
|
+
const r = Pr(this.#a.dataUpdatedAt, e) + 1;
|
|
872
872
|
this.#l = ge.setTimeout(() => {
|
|
873
873
|
this.#a.isStale || this.updateResult();
|
|
874
874
|
}, r);
|
|
@@ -897,7 +897,7 @@ var na = class extends Ne {
|
|
|
897
897
|
const v = this.hasListeners(), x = !v && nr(e, t), _ = v && ir(e, r, t, s);
|
|
898
898
|
(x || _) && (d = {
|
|
899
899
|
...d,
|
|
900
|
-
...
|
|
900
|
+
...Ur(f.data, e.options)
|
|
901
901
|
}), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
|
|
902
902
|
}
|
|
903
903
|
let { error: m, errorUpdatedAt: p, status: g } = d;
|
|
@@ -1015,11 +1015,11 @@ var na = class extends Ne {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
};
|
|
1018
|
-
function
|
|
1018
|
+
function oa(e, t) {
|
|
1019
1019
|
return Y(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1020
1020
|
}
|
|
1021
1021
|
function nr(e, t) {
|
|
1022
|
-
return
|
|
1022
|
+
return oa(e, t) || e.state.data !== void 0 && xt(e, t, t.refetchOnMount);
|
|
1023
1023
|
}
|
|
1024
1024
|
function xt(e, t, r) {
|
|
1025
1025
|
if (Y(t.enabled, e) !== !1 && de(t.staleTime, e) !== "static") {
|
|
@@ -1034,7 +1034,7 @@ function ir(e, t, r, s) {
|
|
|
1034
1034
|
function Gt(e, t) {
|
|
1035
1035
|
return Y(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function ca(e, t) {
|
|
1038
1038
|
return !Ze(e.getCurrentResult(), t);
|
|
1039
1039
|
}
|
|
1040
1040
|
function or(e) {
|
|
@@ -1051,7 +1051,7 @@ function or(e) {
|
|
|
1051
1051
|
d = !0;
|
|
1052
1052
|
}), t.signal)
|
|
1053
1053
|
});
|
|
1054
|
-
}, l =
|
|
1054
|
+
}, l = $r(t.options, t.fetchOptions), m = async (p, g, b) => {
|
|
1055
1055
|
if (d)
|
|
1056
1056
|
return Promise.reject();
|
|
1057
1057
|
if (g == null && p.pages.length)
|
|
@@ -1065,14 +1065,14 @@ function or(e) {
|
|
|
1065
1065
|
meta: t.options.meta
|
|
1066
1066
|
};
|
|
1067
1067
|
return u(z), z;
|
|
1068
|
-
})(), A = await l(O), { maxPages: K } = t.options, R = b ?
|
|
1068
|
+
})(), A = await l(O), { maxPages: K } = t.options, R = b ? Zs : Xs;
|
|
1069
1069
|
return {
|
|
1070
1070
|
pages: R(p.pages, A, K),
|
|
1071
1071
|
pageParams: R(p.pageParams, g, K)
|
|
1072
1072
|
};
|
|
1073
1073
|
};
|
|
1074
1074
|
if (a && n.length) {
|
|
1075
|
-
const p = a === "backward", g = p ?
|
|
1075
|
+
const p = a === "backward", g = p ? la : cr, b = {
|
|
1076
1076
|
pages: n,
|
|
1077
1077
|
pageParams: i
|
|
1078
1078
|
}, E = g(s, b);
|
|
@@ -1110,16 +1110,16 @@ function cr(e, { pages: t, pageParams: r }) {
|
|
|
1110
1110
|
r
|
|
1111
1111
|
) : void 0;
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function la(e, { pages: t, pageParams: r }) {
|
|
1114
1114
|
return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
|
|
1115
1115
|
}
|
|
1116
|
-
var
|
|
1116
|
+
var ua = class extends Lr {
|
|
1117
1117
|
#e;
|
|
1118
1118
|
#t;
|
|
1119
1119
|
#r;
|
|
1120
1120
|
#a;
|
|
1121
1121
|
constructor(e) {
|
|
1122
|
-
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state ||
|
|
1122
|
+
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#r = e.mutationCache, this.#t = [], this.state = e.state || Fr(), this.setOptions(e.options), this.scheduleGc();
|
|
1123
1123
|
}
|
|
1124
1124
|
setOptions(e) {
|
|
1125
1125
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -1156,7 +1156,7 @@ var la = class extends Dr {
|
|
|
1156
1156
|
meta: this.options.meta,
|
|
1157
1157
|
mutationKey: this.options.mutationKey
|
|
1158
1158
|
};
|
|
1159
|
-
this.#a =
|
|
1159
|
+
this.#a = Dr({
|
|
1160
1160
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
|
|
1161
1161
|
onFail: (n, i) => {
|
|
1162
1162
|
this.#s({ type: "failed", failureCount: n, error: i });
|
|
@@ -1316,7 +1316,7 @@ var la = class extends Dr {
|
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
1318
|
};
|
|
1319
|
-
function
|
|
1319
|
+
function Fr() {
|
|
1320
1320
|
return {
|
|
1321
1321
|
context: void 0,
|
|
1322
1322
|
data: void 0,
|
|
@@ -1329,7 +1329,7 @@ function Ur() {
|
|
|
1329
1329
|
submittedAt: 0
|
|
1330
1330
|
};
|
|
1331
1331
|
}
|
|
1332
|
-
var
|
|
1332
|
+
var da = class extends Ne {
|
|
1333
1333
|
constructor(e = {}) {
|
|
1334
1334
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
|
|
1335
1335
|
}
|
|
@@ -1337,7 +1337,7 @@ var ua = class extends Ne {
|
|
|
1337
1337
|
#t;
|
|
1338
1338
|
#r;
|
|
1339
1339
|
build(e, t, r) {
|
|
1340
|
-
const s = new
|
|
1340
|
+
const s = new ua({
|
|
1341
1341
|
client: e,
|
|
1342
1342
|
mutationCache: this,
|
|
1343
1343
|
mutationId: ++this.#r,
|
|
@@ -1421,7 +1421,7 @@ var ua = class extends Ne {
|
|
|
1421
1421
|
function Ke(e) {
|
|
1422
1422
|
return e.options.scope?.id;
|
|
1423
1423
|
}
|
|
1424
|
-
var
|
|
1424
|
+
var ha = class extends Ne {
|
|
1425
1425
|
#e;
|
|
1426
1426
|
#t = void 0;
|
|
1427
1427
|
#r;
|
|
@@ -1456,7 +1456,7 @@ var da = class extends Ne {
|
|
|
1456
1456
|
return this.#a = t, this.#r?.removeObserver(this), this.#r = this.#e.getMutationCache().build(this.#e, this.options), this.#r.addObserver(this), this.#r.execute(e);
|
|
1457
1457
|
}
|
|
1458
1458
|
#s() {
|
|
1459
|
-
const e = this.#r?.state ??
|
|
1459
|
+
const e = this.#r?.state ?? Fr();
|
|
1460
1460
|
this.#t = {
|
|
1461
1461
|
...e,
|
|
1462
1462
|
isPending: e.status === "pending",
|
|
@@ -1504,7 +1504,7 @@ var da = class extends Ne {
|
|
|
1504
1504
|
});
|
|
1505
1505
|
});
|
|
1506
1506
|
}
|
|
1507
|
-
},
|
|
1507
|
+
}, fa = class extends Ne {
|
|
1508
1508
|
constructor(e = {}) {
|
|
1509
1509
|
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
1510
1510
|
}
|
|
@@ -1512,7 +1512,7 @@ var da = class extends Ne {
|
|
|
1512
1512
|
build(e, t, r) {
|
|
1513
1513
|
const s = t.queryKey, a = t.queryHash ?? Ht(s, t);
|
|
1514
1514
|
let n = this.get(a);
|
|
1515
|
-
return n || (n = new
|
|
1515
|
+
return n || (n = new na({
|
|
1516
1516
|
client: e,
|
|
1517
1517
|
queryKey: s,
|
|
1518
1518
|
queryHash: a,
|
|
@@ -1575,7 +1575,7 @@ var da = class extends Ne {
|
|
|
1575
1575
|
});
|
|
1576
1576
|
});
|
|
1577
1577
|
}
|
|
1578
|
-
},
|
|
1578
|
+
}, ma = class {
|
|
1579
1579
|
#e;
|
|
1580
1580
|
#t;
|
|
1581
1581
|
#r;
|
|
@@ -1585,7 +1585,7 @@ var da = class extends Ne {
|
|
|
1585
1585
|
#o;
|
|
1586
1586
|
#n;
|
|
1587
1587
|
constructor(e = {}) {
|
|
1588
|
-
this.#e = e.queryCache || new
|
|
1588
|
+
this.#e = e.queryCache || new fa(), this.#t = e.mutationCache || new da(), this.#r = e.defaultOptions || {}, this.#a = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#i = 0;
|
|
1589
1589
|
}
|
|
1590
1590
|
mount() {
|
|
1591
1591
|
this.#i++, this.#i === 1 && (this.#o = Kt.subscribe(async (e) => {
|
|
@@ -1627,7 +1627,7 @@ var da = class extends Ne {
|
|
|
1627
1627
|
setQueryData(e, t, r) {
|
|
1628
1628
|
const s = this.defaultQueryOptions({ queryKey: e }), n = this.#e.get(
|
|
1629
1629
|
s.queryHash
|
|
1630
|
-
)?.state.data, i =
|
|
1630
|
+
)?.state.data, i = Js(t, n);
|
|
1631
1631
|
if (i !== void 0)
|
|
1632
1632
|
return this.#e.build(this, s).setData(i, { ...r, manual: !0 });
|
|
1633
1633
|
}
|
|
@@ -1778,20 +1778,20 @@ var da = class extends Ne {
|
|
|
1778
1778
|
clear() {
|
|
1779
1779
|
this.#e.clear(), this.#t.clear();
|
|
1780
1780
|
}
|
|
1781
|
-
},
|
|
1781
|
+
}, Hr = H.createContext(
|
|
1782
1782
|
void 0
|
|
1783
1783
|
), he = (e) => {
|
|
1784
|
-
const t = H.useContext(
|
|
1784
|
+
const t = H.useContext(Hr);
|
|
1785
1785
|
if (!t)
|
|
1786
1786
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1787
1787
|
return t;
|
|
1788
|
-
},
|
|
1788
|
+
}, pa = ({
|
|
1789
1789
|
client: e,
|
|
1790
1790
|
children: t
|
|
1791
1791
|
}) => (H.useEffect(() => (e.mount(), () => {
|
|
1792
1792
|
e.unmount();
|
|
1793
|
-
}), [e]), /* @__PURE__ */ h(
|
|
1794
|
-
function
|
|
1793
|
+
}), [e]), /* @__PURE__ */ h(Hr.Provider, { value: e, children: t })), ya = H.createContext(!1), ga = () => H.useContext(ya);
|
|
1794
|
+
function ba() {
|
|
1795
1795
|
let e = !1;
|
|
1796
1796
|
return {
|
|
1797
1797
|
clearReset: () => {
|
|
@@ -1803,19 +1803,19 @@ function ga() {
|
|
|
1803
1803
|
isReset: () => e
|
|
1804
1804
|
};
|
|
1805
1805
|
}
|
|
1806
|
-
var
|
|
1806
|
+
var Ea = H.createContext(ba()), wa = () => H.useContext(Ea), Sa = (e, t) => {
|
|
1807
1807
|
(e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
|
|
1808
|
-
},
|
|
1808
|
+
}, va = (e) => {
|
|
1809
1809
|
H.useEffect(() => {
|
|
1810
1810
|
e.clearReset();
|
|
1811
1811
|
}, [e]);
|
|
1812
|
-
},
|
|
1812
|
+
}, Ta = ({
|
|
1813
1813
|
result: e,
|
|
1814
1814
|
errorResetBoundary: t,
|
|
1815
1815
|
throwOnError: r,
|
|
1816
1816
|
query: s,
|
|
1817
1817
|
suspense: a
|
|
1818
|
-
}) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 ||
|
|
1818
|
+
}) => e.isError && !t.isReset() && !e.isFetching && s && (a && e.data === void 0 || xr(r, [e.error, s])), Aa = (e) => {
|
|
1819
1819
|
if (e.suspense) {
|
|
1820
1820
|
const r = (a) => a === "static" ? a : Math.max(a ?? 1e3, 1e3), s = e.staleTime;
|
|
1821
1821
|
e.staleTime = typeof s == "function" ? (...a) => r(s(...a)) : r(s), typeof e.gcTime == "number" && (e.gcTime = Math.max(
|
|
@@ -1823,20 +1823,20 @@ var ba = H.createContext(ga()), Ea = () => H.useContext(ba), wa = (e, t) => {
|
|
|
1823
1823
|
1e3
|
|
1824
1824
|
));
|
|
1825
1825
|
}
|
|
1826
|
-
},
|
|
1826
|
+
}, Ia = (e, t) => e.isLoading && e.isFetching && !t, _a = (e, t) => e?.suspense && t.isPending, lr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
|
|
1827
1827
|
r.clearReset();
|
|
1828
1828
|
});
|
|
1829
|
-
function
|
|
1829
|
+
function Ra(e, t, r) {
|
|
1830
1830
|
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
1831
1831
|
throw new Error(
|
|
1832
1832
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1833
1833
|
);
|
|
1834
|
-
const s =
|
|
1834
|
+
const s = ga(), a = wa(), n = he(), i = n.defaultQueryOptions(e);
|
|
1835
1835
|
n.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
1836
1836
|
i
|
|
1837
1837
|
), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
|
|
1838
1838
|
`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
1839
|
-
)), i._optimisticResults = s ? "isRestoring" : "optimistic",
|
|
1839
|
+
)), i._optimisticResults = s ? "isRestoring" : "optimistic", Aa(i), Sa(i, a), va(a);
|
|
1840
1840
|
const o = !n.getQueryCache().get(i.queryHash), [c] = H.useState(
|
|
1841
1841
|
() => new t(
|
|
1842
1842
|
n,
|
|
@@ -1855,9 +1855,9 @@ function _a(e, t, r) {
|
|
|
1855
1855
|
() => c.getCurrentResult()
|
|
1856
1856
|
), H.useEffect(() => {
|
|
1857
1857
|
c.setOptions(i);
|
|
1858
|
-
}, [i, c]),
|
|
1858
|
+
}, [i, c]), _a(i, f))
|
|
1859
1859
|
throw lr(i, c, a);
|
|
1860
|
-
if (
|
|
1860
|
+
if (Ta({
|
|
1861
1861
|
result: f,
|
|
1862
1862
|
errorResetBoundary: a,
|
|
1863
1863
|
throwOnError: i.throwOnError,
|
|
@@ -1868,7 +1868,7 @@ function _a(e, t, r) {
|
|
|
1868
1868
|
return n.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
1869
1869
|
i,
|
|
1870
1870
|
f
|
|
1871
|
-
), i.experimental_prefetchInRender && !be &&
|
|
1871
|
+
), i.experimental_prefetchInRender && !be && Ia(f, s) && (o ? (
|
|
1872
1872
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1873
1873
|
lr(i, c, a)
|
|
1874
1874
|
) : (
|
|
@@ -1879,11 +1879,11 @@ function _a(e, t, r) {
|
|
|
1879
1879
|
}), i.notifyOnChangeProps ? f : c.trackResult(f);
|
|
1880
1880
|
}
|
|
1881
1881
|
function fe(e, t) {
|
|
1882
|
-
return
|
|
1882
|
+
return Ra(e, ia);
|
|
1883
1883
|
}
|
|
1884
1884
|
function Pe(e, t) {
|
|
1885
1885
|
const r = he(), [s] = H.useState(
|
|
1886
|
-
() => new
|
|
1886
|
+
() => new ha(
|
|
1887
1887
|
r,
|
|
1888
1888
|
e
|
|
1889
1889
|
)
|
|
@@ -1904,7 +1904,7 @@ function Pe(e, t) {
|
|
|
1904
1904
|
},
|
|
1905
1905
|
[s]
|
|
1906
1906
|
);
|
|
1907
|
-
if (a.error &&
|
|
1907
|
+
if (a.error && xr(s.options.throwOnError, [a.error]))
|
|
1908
1908
|
throw a.error;
|
|
1909
1909
|
return { ...a, mutate: n, mutateAsync: a.mutate };
|
|
1910
1910
|
}
|
|
@@ -1925,7 +1925,7 @@ const xe = {
|
|
|
1925
1925
|
CODE: "code",
|
|
1926
1926
|
REFRESH_TOKEN: "refresh_token",
|
|
1927
1927
|
PASSKEY: "passkey"
|
|
1928
|
-
},
|
|
1928
|
+
}, Kr = {
|
|
1929
1929
|
CLIENT_ID: "X-Auth-ClientId"
|
|
1930
1930
|
}, F = {
|
|
1931
1931
|
ALG: "RS256",
|
|
@@ -1935,7 +1935,7 @@ const xe = {
|
|
|
1935
1935
|
NONCE_KEY: "_nonce",
|
|
1936
1936
|
AUTH_TYPE_KEY: "auth_type",
|
|
1937
1937
|
ISSUER: "gizmette.com"
|
|
1938
|
-
},
|
|
1938
|
+
}, Ca = `-----BEGIN PUBLIC KEY-----
|
|
1939
1939
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsF6i3Jd9fY/3COqCw/m7
|
|
1940
1940
|
w5PKyTYLGAI2I6SIIdpe6i6DOCbEkmDz7LdVsBqwNtVi8gvWYIj+8ol6rU3qu1v5
|
|
1941
1941
|
i1Jd45GSK4kzkVdgCmQZbM5ak0KI99q5wsrAIzUd+LRJ2HRvWtr5IYdsIiXaQjle
|
|
@@ -1949,14 +1949,14 @@ awIDAQAB
|
|
|
1949
1949
|
LOGIN: "login",
|
|
1950
1950
|
REFRESH: "refresh"
|
|
1951
1951
|
}, Ge = new TextEncoder(), ke = new TextDecoder();
|
|
1952
|
-
function
|
|
1952
|
+
function Oa(...e) {
|
|
1953
1953
|
const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
|
|
1954
1954
|
let s = 0;
|
|
1955
1955
|
for (const a of e)
|
|
1956
1956
|
r.set(a, s), s += a.length;
|
|
1957
1957
|
return r;
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Gr(e) {
|
|
1960
1960
|
if (Uint8Array.fromBase64)
|
|
1961
1961
|
return Uint8Array.fromBase64(e);
|
|
1962
1962
|
const t = atob(e), r = new Uint8Array(t.length);
|
|
@@ -1972,7 +1972,7 @@ function Me(e) {
|
|
|
1972
1972
|
let t = e;
|
|
1973
1973
|
t instanceof Uint8Array && (t = ke.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
1974
1974
|
try {
|
|
1975
|
-
return
|
|
1975
|
+
return Gr(t);
|
|
1976
1976
|
} catch {
|
|
1977
1977
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
1978
1978
|
}
|
|
@@ -2001,7 +2001,7 @@ let we = class extends Error {
|
|
|
2001
2001
|
constructor(t, r, s = "unspecified", a = "unspecified") {
|
|
2002
2002
|
super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
|
|
2003
2003
|
}
|
|
2004
|
-
},
|
|
2004
|
+
}, ka = class extends we {
|
|
2005
2005
|
static code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2006
2006
|
code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2007
2007
|
}, ne = class extends we {
|
|
@@ -2014,7 +2014,7 @@ let we = class extends Error {
|
|
|
2014
2014
|
static code = "ERR_JWT_INVALID";
|
|
2015
2015
|
code = "ERR_JWT_INVALID";
|
|
2016
2016
|
};
|
|
2017
|
-
class
|
|
2017
|
+
class Na extends we {
|
|
2018
2018
|
static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2019
2019
|
code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2020
2020
|
constructor(t = "signature verification failed", r) {
|
|
@@ -2030,7 +2030,7 @@ function Te(e, t) {
|
|
|
2030
2030
|
function pt(e) {
|
|
2031
2031
|
return parseInt(e.name.slice(4), 10);
|
|
2032
2032
|
}
|
|
2033
|
-
function
|
|
2033
|
+
function Pa(e) {
|
|
2034
2034
|
switch (e) {
|
|
2035
2035
|
case "ES256":
|
|
2036
2036
|
return "P-256";
|
|
@@ -2042,11 +2042,11 @@ function Na(e) {
|
|
|
2042
2042
|
throw new Error("unreachable");
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function $a(e, t) {
|
|
2046
2046
|
if (!e.usages.includes(t))
|
|
2047
2047
|
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2049
|
+
function xa(e, t, r) {
|
|
2050
2050
|
switch (t) {
|
|
2051
2051
|
case "HS256":
|
|
2052
2052
|
case "HS384":
|
|
@@ -2096,7 +2096,7 @@ function $a(e, t, r) {
|
|
|
2096
2096
|
case "ES512": {
|
|
2097
2097
|
if (!Te(e.algorithm, "ECDSA"))
|
|
2098
2098
|
throw ee("ECDSA");
|
|
2099
|
-
const s =
|
|
2099
|
+
const s = Pa(t);
|
|
2100
2100
|
if (e.algorithm.namedCurve !== s)
|
|
2101
2101
|
throw ee(s, "algorithm.namedCurve");
|
|
2102
2102
|
break;
|
|
@@ -2104,26 +2104,26 @@ function $a(e, t, r) {
|
|
|
2104
2104
|
default:
|
|
2105
2105
|
throw new TypeError("CryptoKey does not support this operation");
|
|
2106
2106
|
}
|
|
2107
|
-
|
|
2107
|
+
$a(e, r);
|
|
2108
2108
|
}
|
|
2109
|
-
function
|
|
2109
|
+
function Br(e, t, ...r) {
|
|
2110
2110
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
2111
2111
|
const s = r.pop();
|
|
2112
2112
|
e += `one of type ${r.join(", ")}, or ${s}.`;
|
|
2113
2113
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
2114
2114
|
return t == null ? e += ` Received ${t}` : typeof t == "function" && t.name ? e += ` Received function ${t.name}` : typeof t == "object" && t != null && t.constructor?.name && (e += ` Received an instance of ${t.constructor.name}`), e;
|
|
2115
2115
|
}
|
|
2116
|
-
const
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2116
|
+
const Ma = (e, ...t) => Br("Key must be ", e, ...t);
|
|
2117
|
+
function qr(e, t, ...r) {
|
|
2118
|
+
return Br(`Key for the ${e} algorithm must be `, t, ...r);
|
|
2119
2119
|
}
|
|
2120
|
-
function
|
|
2120
|
+
function Wr(e) {
|
|
2121
2121
|
return e?.[Symbol.toStringTag] === "CryptoKey";
|
|
2122
2122
|
}
|
|
2123
|
-
function
|
|
2123
|
+
function Vr(e) {
|
|
2124
2124
|
return e?.[Symbol.toStringTag] === "KeyObject";
|
|
2125
2125
|
}
|
|
2126
|
-
const
|
|
2126
|
+
const jr = (e) => Wr(e) || Vr(e), Da = (...e) => {
|
|
2127
2127
|
const t = e.filter(Boolean);
|
|
2128
2128
|
if (t.length === 0 || t.length === 1)
|
|
2129
2129
|
return !0;
|
|
@@ -2142,11 +2142,11 @@ const Vr = (e) => qr(e) || Wr(e), Ma = (...e) => {
|
|
|
2142
2142
|
}
|
|
2143
2143
|
return !0;
|
|
2144
2144
|
};
|
|
2145
|
-
function
|
|
2145
|
+
function La(e) {
|
|
2146
2146
|
return typeof e == "object" && e !== null;
|
|
2147
2147
|
}
|
|
2148
2148
|
const Le = (e) => {
|
|
2149
|
-
if (!
|
|
2149
|
+
if (!La(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
2150
2150
|
return !1;
|
|
2151
2151
|
if (Object.getPrototypeOf(e) === null)
|
|
2152
2152
|
return !0;
|
|
@@ -2154,7 +2154,7 @@ const Le = (e) => {
|
|
|
2154
2154
|
for (; Object.getPrototypeOf(t) !== null; )
|
|
2155
2155
|
t = Object.getPrototypeOf(t);
|
|
2156
2156
|
return Object.getPrototypeOf(e) === t;
|
|
2157
|
-
},
|
|
2157
|
+
}, Ua = (e, t) => {
|
|
2158
2158
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
2159
2159
|
const { modulusLength: r } = t.algorithm;
|
|
2160
2160
|
if (typeof r != "number" || r < 2048)
|
|
@@ -2167,7 +2167,7 @@ const Le = (e) => {
|
|
|
2167
2167
|
if (e[r] !== t[r])
|
|
2168
2168
|
return !1;
|
|
2169
2169
|
return !0;
|
|
2170
|
-
},
|
|
2170
|
+
}, Fa = (e) => ({ data: e, pos: 0 }), rt = (e) => {
|
|
2171
2171
|
const t = e.data[e.pos++];
|
|
2172
2172
|
if (t & 128) {
|
|
2173
2173
|
const r = t & 127;
|
|
@@ -2180,27 +2180,27 @@ const Le = (e) => {
|
|
|
2180
2180
|
}, st = (e, t, r) => {
|
|
2181
2181
|
if (e.data[e.pos++] !== t)
|
|
2182
2182
|
throw new Error(r);
|
|
2183
|
-
},
|
|
2183
|
+
}, Qr = (e, t) => {
|
|
2184
2184
|
const r = e.data.subarray(e.pos, e.pos + t);
|
|
2185
2185
|
return e.pos += t, r;
|
|
2186
|
-
},
|
|
2186
|
+
}, Ha = (e) => {
|
|
2187
2187
|
st(e, 6, "Expected algorithm OID");
|
|
2188
2188
|
const t = rt(e);
|
|
2189
|
-
return
|
|
2189
|
+
return Qr(e, t);
|
|
2190
2190
|
};
|
|
2191
|
-
function
|
|
2191
|
+
function Ka(e) {
|
|
2192
2192
|
st(e, 48, "Invalid SPKI structure"), rt(e), st(e, 48, "Expected algorithm identifier");
|
|
2193
2193
|
const t = rt(e);
|
|
2194
2194
|
return { algIdStart: e.pos, algIdLength: t };
|
|
2195
2195
|
}
|
|
2196
|
-
const
|
|
2197
|
-
const t =
|
|
2196
|
+
const Ga = (e) => {
|
|
2197
|
+
const t = Ha(e);
|
|
2198
2198
|
if (yt(t, [43, 101, 110]))
|
|
2199
2199
|
return "X25519";
|
|
2200
2200
|
if (!yt(t, [42, 134, 72, 206, 61, 2, 1]))
|
|
2201
2201
|
throw new Error("Unsupported key algorithm");
|
|
2202
2202
|
st(e, 6, "Expected curve OID");
|
|
2203
|
-
const r = rt(e), s =
|
|
2203
|
+
const r = rt(e), s = Qr(e, r);
|
|
2204
2204
|
for (const { name: a, oid: n } of [
|
|
2205
2205
|
{ name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
|
|
2206
2206
|
{ name: "P-384", oid: [43, 129, 4, 0, 34] },
|
|
@@ -2209,7 +2209,7 @@ const Ka = (e) => {
|
|
|
2209
2209
|
if (yt(s, n))
|
|
2210
2210
|
return a;
|
|
2211
2211
|
throw new Error("Unsupported named curve");
|
|
2212
|
-
},
|
|
2212
|
+
}, Ba = async (e, t, r, s) => {
|
|
2213
2213
|
let a, n;
|
|
2214
2214
|
const i = () => ["verify"], o = () => ["encrypt", "wrapKey"];
|
|
2215
2215
|
switch (r) {
|
|
@@ -2264,15 +2264,15 @@ const Ka = (e) => {
|
|
|
2264
2264
|
throw new ne('Invalid or unsupported "alg" (Algorithm) value');
|
|
2265
2265
|
}
|
|
2266
2266
|
return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
|
|
2267
|
-
},
|
|
2268
|
-
const s =
|
|
2267
|
+
}, qa = (e, t) => Gr(e.replace(t, "")), Wa = (e, t, r) => {
|
|
2268
|
+
const s = qa(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
|
|
2269
2269
|
let a = r;
|
|
2270
2270
|
return t?.startsWith?.("ECDH-ES") && (a ||= {}, a.getNamedCurve = (n) => {
|
|
2271
|
-
const i =
|
|
2272
|
-
return
|
|
2273
|
-
}),
|
|
2271
|
+
const i = Fa(n);
|
|
2272
|
+
return Ka(i), Ga(i);
|
|
2273
|
+
}), Ba("spki", s, t, a);
|
|
2274
2274
|
};
|
|
2275
|
-
function
|
|
2275
|
+
function Va(e) {
|
|
2276
2276
|
let t, r;
|
|
2277
2277
|
switch (e.kty) {
|
|
2278
2278
|
case "AKP": {
|
|
@@ -2357,18 +2357,18 @@ function Wa(e) {
|
|
|
2357
2357
|
}
|
|
2358
2358
|
return { algorithm: t, keyUsages: r };
|
|
2359
2359
|
}
|
|
2360
|
-
const
|
|
2360
|
+
const ja = async (e) => {
|
|
2361
2361
|
if (!e.alg)
|
|
2362
2362
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
2363
|
-
const { algorithm: t, keyUsages: r } =
|
|
2363
|
+
const { algorithm: t, keyUsages: r } = Va(e), s = { ...e };
|
|
2364
2364
|
return s.kty !== "AKP" && delete s.alg, delete s.use, crypto.subtle.importKey("jwk", s, t, e.ext ?? !(e.d || e.priv), e.key_ops ?? r);
|
|
2365
2365
|
};
|
|
2366
|
-
async function
|
|
2366
|
+
async function Qa(e, t, r) {
|
|
2367
2367
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
2368
2368
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
2369
|
-
return
|
|
2369
|
+
return Wa(e, t, r);
|
|
2370
2370
|
}
|
|
2371
|
-
const
|
|
2371
|
+
const Ja = (e, t, r, s, a) => {
|
|
2372
2372
|
if (a.crit !== void 0 && s?.crit === void 0)
|
|
2373
2373
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
2374
2374
|
if (!s || s.crit === void 0)
|
|
@@ -2386,7 +2386,7 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2386
2386
|
throw new e(`Extension Header Parameter "${i}" MUST be integrity protected`);
|
|
2387
2387
|
}
|
|
2388
2388
|
return new Set(s.crit);
|
|
2389
|
-
},
|
|
2389
|
+
}, Ya = (e, t) => {
|
|
2390
2390
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
2391
2391
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
2392
2392
|
if (t)
|
|
@@ -2395,13 +2395,13 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2395
2395
|
function Bt(e) {
|
|
2396
2396
|
return Le(e) && typeof e.kty == "string";
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function za(e) {
|
|
2399
2399
|
return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2401
|
+
function Xa(e) {
|
|
2402
2402
|
return e.kty !== "oct" && typeof e.d > "u" && typeof e.priv > "u";
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2404
|
+
function Za(e) {
|
|
2405
2405
|
return e.kty === "oct" && typeof e.k == "string";
|
|
2406
2406
|
}
|
|
2407
2407
|
let Oe;
|
|
@@ -2410,9 +2410,9 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2410
2410
|
let a = Oe.get(e);
|
|
2411
2411
|
if (a?.[r])
|
|
2412
2412
|
return a[r];
|
|
2413
|
-
const n = await
|
|
2413
|
+
const n = await ja({ ...t, alg: r });
|
|
2414
2414
|
return s && Object.freeze(e), a ? a[r] = n : Oe.set(e, { [r]: n }), n;
|
|
2415
|
-
},
|
|
2415
|
+
}, en = (e, t) => {
|
|
2416
2416
|
Oe ||= /* @__PURE__ */ new WeakMap();
|
|
2417
2417
|
let r = Oe.get(e);
|
|
2418
2418
|
if (r?.[t])
|
|
@@ -2508,15 +2508,15 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2508
2508
|
if (!n)
|
|
2509
2509
|
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
2510
2510
|
return r ? r[t] = n : Oe.set(e, { [t]: n }), n;
|
|
2511
|
-
},
|
|
2512
|
-
if (e instanceof Uint8Array ||
|
|
2511
|
+
}, tn = async (e, t) => {
|
|
2512
|
+
if (e instanceof Uint8Array || Wr(e))
|
|
2513
2513
|
return e;
|
|
2514
|
-
if (
|
|
2514
|
+
if (Vr(e)) {
|
|
2515
2515
|
if (e.type === "secret")
|
|
2516
2516
|
return e.export();
|
|
2517
2517
|
if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
|
|
2518
2518
|
try {
|
|
2519
|
-
return
|
|
2519
|
+
return en(e, t);
|
|
2520
2520
|
} catch (s) {
|
|
2521
2521
|
if (s instanceof TypeError)
|
|
2522
2522
|
throw s;
|
|
@@ -2570,34 +2570,34 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2570
2570
|
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`);
|
|
2571
2571
|
}
|
|
2572
2572
|
return !0;
|
|
2573
|
-
},
|
|
2573
|
+
}, rn = (e, t, r) => {
|
|
2574
2574
|
if (!(t instanceof Uint8Array)) {
|
|
2575
2575
|
if (Bt(t)) {
|
|
2576
|
-
if (
|
|
2576
|
+
if (Za(t) && Mt(e, t, r))
|
|
2577
2577
|
return;
|
|
2578
2578
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
2579
2579
|
}
|
|
2580
|
-
if (!
|
|
2581
|
-
throw new TypeError(
|
|
2580
|
+
if (!jr(t))
|
|
2581
|
+
throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
2582
2582
|
if (t.type !== "secret")
|
|
2583
2583
|
throw new TypeError(`${Ce(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
2584
2584
|
}
|
|
2585
|
-
},
|
|
2585
|
+
}, sn = (e, t, r) => {
|
|
2586
2586
|
if (Bt(t))
|
|
2587
2587
|
switch (r) {
|
|
2588
2588
|
case "decrypt":
|
|
2589
2589
|
case "sign":
|
|
2590
|
-
if (
|
|
2590
|
+
if (za(t) && Mt(e, t, r))
|
|
2591
2591
|
return;
|
|
2592
2592
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
2593
2593
|
case "encrypt":
|
|
2594
2594
|
case "verify":
|
|
2595
|
-
if (
|
|
2595
|
+
if (Xa(t) && Mt(e, t, r))
|
|
2596
2596
|
return;
|
|
2597
2597
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
2598
2598
|
}
|
|
2599
|
-
if (!
|
|
2600
|
-
throw new TypeError(
|
|
2599
|
+
if (!jr(t))
|
|
2600
|
+
throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2601
2601
|
if (t.type === "secret")
|
|
2602
2602
|
throw new TypeError(`${Ce(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
2603
2603
|
if (t.type === "public")
|
|
@@ -2614,9 +2614,9 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2614
2614
|
case "encrypt":
|
|
2615
2615
|
throw new TypeError(`${Ce(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
2616
2616
|
}
|
|
2617
|
-
},
|
|
2618
|
-
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ?
|
|
2619
|
-
},
|
|
2617
|
+
}, an = (e, t, r) => {
|
|
2618
|
+
e.startsWith("HS") || e === "dir" || e.startsWith("PBES2") || /^A(?:128|192|256)(?:GCM)?(?:KW)?$/.test(e) || /^A(?:128|192|256)CBC-HS(?:256|384|512)$/.test(e) ? rn(e, t, r) : sn(e, t, r);
|
|
2619
|
+
}, nn = (e, t) => {
|
|
2620
2620
|
const r = `SHA-${e.slice(-3)}`;
|
|
2621
2621
|
switch (e) {
|
|
2622
2622
|
case "HS256":
|
|
@@ -2645,24 +2645,24 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2645
2645
|
default:
|
|
2646
2646
|
throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
2647
2647
|
}
|
|
2648
|
-
},
|
|
2648
|
+
}, on = async (e, t, r) => {
|
|
2649
2649
|
if (t instanceof Uint8Array) {
|
|
2650
2650
|
if (!e.startsWith("HS"))
|
|
2651
|
-
throw new TypeError(
|
|
2651
|
+
throw new TypeError(Ma(t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2652
2652
|
return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
2653
2653
|
}
|
|
2654
|
-
return
|
|
2655
|
-
},
|
|
2656
|
-
const a = await
|
|
2657
|
-
|
|
2658
|
-
const n =
|
|
2654
|
+
return xa(t, e, r), t;
|
|
2655
|
+
}, cn = async (e, t, r, s) => {
|
|
2656
|
+
const a = await on(e, t, "verify");
|
|
2657
|
+
Ua(e, a);
|
|
2658
|
+
const n = nn(e, a.algorithm);
|
|
2659
2659
|
try {
|
|
2660
2660
|
return await crypto.subtle.verify(n, a, r, s);
|
|
2661
2661
|
} catch {
|
|
2662
2662
|
return !1;
|
|
2663
2663
|
}
|
|
2664
2664
|
};
|
|
2665
|
-
async function
|
|
2665
|
+
async function ln(e, t, r) {
|
|
2666
2666
|
if (!Le(e))
|
|
2667
2667
|
throw new L("Flattened JWS must be an object");
|
|
2668
2668
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -2683,38 +2683,38 @@ async function cn(e, t, r) {
|
|
|
2683
2683
|
} catch {
|
|
2684
2684
|
throw new L("JWS Protected Header is invalid");
|
|
2685
2685
|
}
|
|
2686
|
-
if (!
|
|
2686
|
+
if (!Da(s, e.header))
|
|
2687
2687
|
throw new L("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
2688
2688
|
const a = {
|
|
2689
2689
|
...s,
|
|
2690
2690
|
...e.header
|
|
2691
|
-
}, n =
|
|
2691
|
+
}, n = Ja(L, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
|
|
2692
2692
|
let i = !0;
|
|
2693
2693
|
if (n.has("b64") && (i = s.b64, typeof i != "boolean"))
|
|
2694
2694
|
throw new L('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
2695
2695
|
const { alg: o } = a;
|
|
2696
2696
|
if (typeof o != "string" || !o)
|
|
2697
2697
|
throw new L('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
2698
|
-
const c = r &&
|
|
2698
|
+
const c = r && Ya("algorithms", r.algorithms);
|
|
2699
2699
|
if (c && !c.has(o))
|
|
2700
|
-
throw new
|
|
2700
|
+
throw new ka('"alg" (Algorithm) Header Parameter value not allowed');
|
|
2701
2701
|
if (i) {
|
|
2702
2702
|
if (typeof e.payload != "string")
|
|
2703
2703
|
throw new L("JWS Payload must be a string");
|
|
2704
2704
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
2705
2705
|
throw new L("JWS Payload must be a string or an Uint8Array instance");
|
|
2706
2706
|
let f = !1;
|
|
2707
|
-
typeof t == "function" && (t = await t(s, e), f = !0),
|
|
2708
|
-
const d =
|
|
2707
|
+
typeof t == "function" && (t = await t(s, e), f = !0), an(o, t, "verify");
|
|
2708
|
+
const d = Oa(Ge.encode(e.protected ?? ""), Ge.encode("."), typeof e.payload == "string" ? Ge.encode(e.payload) : e.payload);
|
|
2709
2709
|
let u;
|
|
2710
2710
|
try {
|
|
2711
2711
|
u = Me(e.signature);
|
|
2712
2712
|
} catch {
|
|
2713
2713
|
throw new L("Failed to base64url decode the signature");
|
|
2714
2714
|
}
|
|
2715
|
-
const l = await
|
|
2716
|
-
if (!await
|
|
2717
|
-
throw new
|
|
2715
|
+
const l = await tn(t, o);
|
|
2716
|
+
if (!await cn(o, l, u, d))
|
|
2717
|
+
throw new Na();
|
|
2718
2718
|
let m;
|
|
2719
2719
|
if (i)
|
|
2720
2720
|
try {
|
|
@@ -2726,17 +2726,17 @@ async function cn(e, t, r) {
|
|
|
2726
2726
|
const p = { payload: m };
|
|
2727
2727
|
return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
|
|
2728
2728
|
}
|
|
2729
|
-
async function
|
|
2729
|
+
async function un(e, t, r) {
|
|
2730
2730
|
if (e instanceof Uint8Array && (e = ke.decode(e)), typeof e != "string")
|
|
2731
2731
|
throw new L("Compact JWS must be a string or Uint8Array");
|
|
2732
2732
|
const { 0: s, 1: a, 2: n, length: i } = e.split(".");
|
|
2733
2733
|
if (i !== 3)
|
|
2734
2734
|
throw new L("Invalid Compact JWS");
|
|
2735
|
-
const o = await
|
|
2735
|
+
const o = await ln({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
|
|
2736
2736
|
return typeof t == "function" ? { ...c, key: o.key } : c;
|
|
2737
2737
|
}
|
|
2738
|
-
const
|
|
2739
|
-
const t =
|
|
2738
|
+
const dn = (e) => Math.floor(e.getTime() / 1e3), Jr = 60, Yr = Jr * 60, qt = Yr * 24, hn = qt * 7, fn = qt * 365.25, mn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, hr = (e) => {
|
|
2739
|
+
const t = mn.exec(e);
|
|
2740
2740
|
if (!t || t[4] && t[1])
|
|
2741
2741
|
throw new TypeError("Invalid time period format");
|
|
2742
2742
|
const r = parseFloat(t[2]), s = t[3].toLowerCase();
|
|
@@ -2754,14 +2754,14 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Qr = 60, Jr = Qr * 60, qt = Jr
|
|
|
2754
2754
|
case "min":
|
|
2755
2755
|
case "mins":
|
|
2756
2756
|
case "m":
|
|
2757
|
-
a = Math.round(r *
|
|
2757
|
+
a = Math.round(r * Jr);
|
|
2758
2758
|
break;
|
|
2759
2759
|
case "hour":
|
|
2760
2760
|
case "hours":
|
|
2761
2761
|
case "hr":
|
|
2762
2762
|
case "hrs":
|
|
2763
2763
|
case "h":
|
|
2764
|
-
a = Math.round(r *
|
|
2764
|
+
a = Math.round(r * Yr);
|
|
2765
2765
|
break;
|
|
2766
2766
|
case "day":
|
|
2767
2767
|
case "days":
|
|
@@ -2771,15 +2771,15 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Qr = 60, Jr = Qr * 60, qt = Jr
|
|
|
2771
2771
|
case "week":
|
|
2772
2772
|
case "weeks":
|
|
2773
2773
|
case "w":
|
|
2774
|
-
a = Math.round(r *
|
|
2774
|
+
a = Math.round(r * hn);
|
|
2775
2775
|
break;
|
|
2776
2776
|
default:
|
|
2777
|
-
a = Math.round(r *
|
|
2777
|
+
a = Math.round(r * fn);
|
|
2778
2778
|
break;
|
|
2779
2779
|
}
|
|
2780
2780
|
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
2781
|
-
}, fr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`,
|
|
2782
|
-
function
|
|
2781
|
+
}, fr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, pn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
|
|
2782
|
+
function yn(e, t, r = {}) {
|
|
2783
2783
|
let s;
|
|
2784
2784
|
try {
|
|
2785
2785
|
s = JSON.parse(ke.decode(t));
|
|
@@ -2799,7 +2799,7 @@ function pn(e, t, r = {}) {
|
|
|
2799
2799
|
throw new Z('unexpected "iss" claim value', s, "iss", "check_failed");
|
|
2800
2800
|
if (o && s.sub !== o)
|
|
2801
2801
|
throw new Z('unexpected "sub" claim value', s, "sub", "check_failed");
|
|
2802
|
-
if (c && !
|
|
2802
|
+
if (c && !pn(s.aud, typeof c == "string" ? [c] : c))
|
|
2803
2803
|
throw new Z('unexpected "aud" claim value', s, "aud", "check_failed");
|
|
2804
2804
|
let u;
|
|
2805
2805
|
switch (typeof r.clockTolerance) {
|
|
@@ -2815,7 +2815,7 @@ function pn(e, t, r = {}) {
|
|
|
2815
2815
|
default:
|
|
2816
2816
|
throw new TypeError("Invalid clockTolerance option type");
|
|
2817
2817
|
}
|
|
2818
|
-
const { currentDate: l } = r, m =
|
|
2818
|
+
const { currentDate: l } = r, m = dn(l || /* @__PURE__ */ new Date());
|
|
2819
2819
|
if ((s.iat !== void 0 || f) && typeof s.iat != "number")
|
|
2820
2820
|
throw new Z('"iat" claim must be a number', s, "iat", "invalid");
|
|
2821
2821
|
if (s.nbf !== void 0) {
|
|
@@ -2839,14 +2839,14 @@ function pn(e, t, r = {}) {
|
|
|
2839
2839
|
}
|
|
2840
2840
|
return s;
|
|
2841
2841
|
}
|
|
2842
|
-
async function
|
|
2843
|
-
const s = await
|
|
2842
|
+
async function gn(e, t, r) {
|
|
2843
|
+
const s = await un(e, t, r);
|
|
2844
2844
|
if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
|
|
2845
2845
|
throw new se("JWTs MUST NOT use unencoded payload");
|
|
2846
|
-
const a = { payload:
|
|
2846
|
+
const a = { payload: yn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
|
|
2847
2847
|
return typeof t == "function" ? { ...a, key: s.key } : a;
|
|
2848
2848
|
}
|
|
2849
|
-
function
|
|
2849
|
+
function bn(e) {
|
|
2850
2850
|
if (typeof e != "string")
|
|
2851
2851
|
throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
2852
2852
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -2874,65 +2874,65 @@ function gn(e) {
|
|
|
2874
2874
|
}
|
|
2875
2875
|
const Ue = async (e) => {
|
|
2876
2876
|
try {
|
|
2877
|
-
const t = F.ALG, r = await
|
|
2878
|
-
return await
|
|
2877
|
+
const t = F.ALG, r = await Qa(Ca, t);
|
|
2878
|
+
return await gn(e, r, {
|
|
2879
2879
|
issuer: F.ISSUER
|
|
2880
2880
|
});
|
|
2881
2881
|
} catch {
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
|
-
},
|
|
2884
|
+
}, En = (e) => {
|
|
2885
2885
|
try {
|
|
2886
|
-
return
|
|
2886
|
+
return bn(e);
|
|
2887
2887
|
} catch {
|
|
2888
2888
|
return;
|
|
2889
2889
|
}
|
|
2890
2890
|
}, M = [];
|
|
2891
2891
|
for (let e = 0; e < 256; ++e)
|
|
2892
2892
|
M.push((e + 256).toString(16).slice(1));
|
|
2893
|
-
function
|
|
2893
|
+
function wn(e, t = 0) {
|
|
2894
2894
|
return (M[e[t + 0]] + M[e[t + 1]] + M[e[t + 2]] + M[e[t + 3]] + "-" + M[e[t + 4]] + M[e[t + 5]] + "-" + M[e[t + 6]] + M[e[t + 7]] + "-" + M[e[t + 8]] + M[e[t + 9]] + "-" + M[e[t + 10]] + M[e[t + 11]] + M[e[t + 12]] + M[e[t + 13]] + M[e[t + 14]] + M[e[t + 15]]).toLowerCase();
|
|
2895
2895
|
}
|
|
2896
2896
|
let gt;
|
|
2897
|
-
const
|
|
2898
|
-
function
|
|
2897
|
+
const Sn = new Uint8Array(16);
|
|
2898
|
+
function vn() {
|
|
2899
2899
|
if (!gt) {
|
|
2900
2900
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2901
2901
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2902
2902
|
gt = crypto.getRandomValues.bind(crypto);
|
|
2903
2903
|
}
|
|
2904
|
-
return gt(
|
|
2904
|
+
return gt(Sn);
|
|
2905
2905
|
}
|
|
2906
|
-
const
|
|
2906
|
+
const Tn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Tn };
|
|
2907
2907
|
function pr(e, t, r) {
|
|
2908
2908
|
if (mr.randomUUID && !e)
|
|
2909
2909
|
return mr.randomUUID();
|
|
2910
2910
|
e = e || {};
|
|
2911
|
-
const s = e.random ?? e.rng?.() ??
|
|
2911
|
+
const s = e.random ?? e.rng?.() ?? vn();
|
|
2912
2912
|
if (s.length < 16)
|
|
2913
2913
|
throw new Error("Random bytes length must be >= 16");
|
|
2914
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
2914
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, wn(s);
|
|
2915
2915
|
}
|
|
2916
|
-
const yr = globalThis.crypto,
|
|
2916
|
+
const yr = globalThis.crypto, An = (e) => `${pr()}${pr()}`.slice(0, e), In = (e) => btoa(
|
|
2917
2917
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
2918
2918
|
);
|
|
2919
|
-
async function
|
|
2919
|
+
async function _n(e) {
|
|
2920
2920
|
if (!yr.subtle)
|
|
2921
2921
|
throw new Error(
|
|
2922
2922
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
2923
2923
|
);
|
|
2924
2924
|
const t = new TextEncoder().encode(e), r = await yr.subtle.digest("SHA-256", t);
|
|
2925
|
-
return
|
|
2925
|
+
return In(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
2926
2926
|
}
|
|
2927
|
-
async function
|
|
2928
|
-
const r =
|
|
2927
|
+
async function Rn(e) {
|
|
2928
|
+
const r = An(43), s = await _n(r);
|
|
2929
2929
|
return {
|
|
2930
2930
|
code_verifier: r,
|
|
2931
2931
|
code_challenge: s
|
|
2932
2932
|
};
|
|
2933
2933
|
}
|
|
2934
|
-
const
|
|
2935
|
-
var
|
|
2934
|
+
const zr = Ft(null);
|
|
2935
|
+
var Cn = Object.defineProperty, On = (e, t, r) => t in e ? Cn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, bt = (e, t, r) => On(e, typeof t != "symbol" ? t + "" : t, r);
|
|
2936
2936
|
/*!
|
|
2937
2937
|
@versini/auth-provider v8.0.5
|
|
2938
2938
|
© 2025 gizmette.com
|
|
@@ -2960,12 +2960,12 @@ function at(e) {
|
|
|
2960
2960
|
return n;
|
|
2961
2961
|
}
|
|
2962
2962
|
function Wt() {
|
|
2963
|
-
return
|
|
2963
|
+
return kn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2964
2964
|
}
|
|
2965
|
-
const
|
|
2965
|
+
const kn = {
|
|
2966
2966
|
stubThis: (e) => e
|
|
2967
2967
|
};
|
|
2968
|
-
function
|
|
2968
|
+
function Xr(e) {
|
|
2969
2969
|
const { id: t } = e;
|
|
2970
2970
|
return {
|
|
2971
2971
|
...e,
|
|
@@ -2978,7 +2978,7 @@ function zr(e) {
|
|
|
2978
2978
|
transports: e.transports
|
|
2979
2979
|
};
|
|
2980
2980
|
}
|
|
2981
|
-
function
|
|
2981
|
+
function Zr(e) {
|
|
2982
2982
|
return (
|
|
2983
2983
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
2984
2984
|
e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
|
|
@@ -2994,7 +2994,7 @@ let U = class extends Error {
|
|
|
2994
2994
|
}), this.name = a ?? s.name, this.code = r;
|
|
2995
2995
|
}
|
|
2996
2996
|
};
|
|
2997
|
-
function
|
|
2997
|
+
function Nn({ error: e, options: t }) {
|
|
2998
2998
|
const { publicKey: r } = t;
|
|
2999
2999
|
if (!r)
|
|
3000
3000
|
throw Error("options was missing required publicKey property");
|
|
@@ -3052,7 +3052,7 @@ function kn({ error: e, options: t }) {
|
|
|
3052
3052
|
});
|
|
3053
3053
|
if (e.name === "SecurityError") {
|
|
3054
3054
|
const s = globalThis.location.hostname;
|
|
3055
|
-
if (
|
|
3055
|
+
if (Zr(s)) {
|
|
3056
3056
|
if (r.rp.id !== s)
|
|
3057
3057
|
return new U({
|
|
3058
3058
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -3080,7 +3080,7 @@ function kn({ error: e, options: t }) {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
return e;
|
|
3082
3082
|
}
|
|
3083
|
-
class
|
|
3083
|
+
class Pn {
|
|
3084
3084
|
constructor() {
|
|
3085
3085
|
Object.defineProperty(this, "controller", {
|
|
3086
3086
|
enumerable: !0,
|
|
@@ -3104,12 +3104,12 @@ class Nn {
|
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
const
|
|
3108
|
-
function
|
|
3109
|
-
if (e && !(
|
|
3107
|
+
const es = new Pn(), $n = ["cross-platform", "platform"];
|
|
3108
|
+
function ts(e) {
|
|
3109
|
+
if (e && !($n.indexOf(e) < 0))
|
|
3110
3110
|
return e;
|
|
3111
3111
|
}
|
|
3112
|
-
async function
|
|
3112
|
+
async function xn(e) {
|
|
3113
3113
|
!e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3114
3114
|
const { optionsJSON: t, useAutoRegister: r = !1 } = e;
|
|
3115
3115
|
if (!Wt())
|
|
@@ -3121,14 +3121,14 @@ async function $n(e) {
|
|
|
3121
3121
|
...t.user,
|
|
3122
3122
|
id: at(t.user.id)
|
|
3123
3123
|
},
|
|
3124
|
-
excludeCredentials: t.excludeCredentials?.map(
|
|
3124
|
+
excludeCredentials: t.excludeCredentials?.map(Xr)
|
|
3125
3125
|
}, a = {};
|
|
3126
|
-
r && (a.mediation = "conditional"), a.publicKey = s, a.signal =
|
|
3126
|
+
r && (a.mediation = "conditional"), a.publicKey = s, a.signal = es.createNewAbortSignal();
|
|
3127
3127
|
let n;
|
|
3128
3128
|
try {
|
|
3129
3129
|
n = await navigator.credentials.create(a);
|
|
3130
3130
|
} catch (p) {
|
|
3131
|
-
throw
|
|
3131
|
+
throw Nn({ error: p, options: a });
|
|
3132
3132
|
}
|
|
3133
3133
|
if (!n)
|
|
3134
3134
|
throw new Error("Registration was not completed");
|
|
@@ -3170,14 +3170,14 @@ async function $n(e) {
|
|
|
3170
3170
|
},
|
|
3171
3171
|
type: f,
|
|
3172
3172
|
clientExtensionResults: n.getClientExtensionResults(),
|
|
3173
|
-
authenticatorAttachment:
|
|
3173
|
+
authenticatorAttachment: ts(n.authenticatorAttachment)
|
|
3174
3174
|
};
|
|
3175
3175
|
}
|
|
3176
3176
|
function Et(e, t) {
|
|
3177
3177
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
3178
3178
|
`, t);
|
|
3179
3179
|
}
|
|
3180
|
-
function
|
|
3180
|
+
function Mn() {
|
|
3181
3181
|
if (!Wt())
|
|
3182
3182
|
return wt.stubThis(new Promise((t) => t(!1)));
|
|
3183
3183
|
const e = globalThis.PublicKeyCredential;
|
|
@@ -3186,7 +3186,7 @@ function xn() {
|
|
|
3186
3186
|
const wt = {
|
|
3187
3187
|
stubThis: (e) => e
|
|
3188
3188
|
};
|
|
3189
|
-
function
|
|
3189
|
+
function Dn({ error: e, options: t }) {
|
|
3190
3190
|
const { publicKey: r } = t;
|
|
3191
3191
|
if (!r)
|
|
3192
3192
|
throw Error("options was missing required publicKey property");
|
|
@@ -3206,7 +3206,7 @@ function Mn({ error: e, options: t }) {
|
|
|
3206
3206
|
});
|
|
3207
3207
|
if (e.name === "SecurityError") {
|
|
3208
3208
|
const s = globalThis.location.hostname;
|
|
3209
|
-
if (
|
|
3209
|
+
if (Zr(s)) {
|
|
3210
3210
|
if (r.rpId !== s)
|
|
3211
3211
|
return new U({
|
|
3212
3212
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -3227,31 +3227,31 @@ function Mn({ error: e, options: t }) {
|
|
|
3227
3227
|
}
|
|
3228
3228
|
return e;
|
|
3229
3229
|
}
|
|
3230
|
-
async function
|
|
3230
|
+
async function Ln(e) {
|
|
3231
3231
|
!e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3232
3232
|
const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
|
|
3233
3233
|
if (!Wt())
|
|
3234
3234
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3235
3235
|
let a;
|
|
3236
|
-
t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(
|
|
3236
|
+
t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Xr));
|
|
3237
3237
|
const n = {
|
|
3238
3238
|
...t,
|
|
3239
3239
|
challenge: at(t.challenge),
|
|
3240
3240
|
allowCredentials: a
|
|
3241
3241
|
}, i = {};
|
|
3242
3242
|
if (r) {
|
|
3243
|
-
if (!await
|
|
3243
|
+
if (!await Mn())
|
|
3244
3244
|
throw Error("Browser does not support WebAuthn autofill");
|
|
3245
3245
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
|
|
3246
3246
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
3247
3247
|
i.mediation = "conditional", n.allowCredentials = [];
|
|
3248
3248
|
}
|
|
3249
|
-
i.publicKey = n, i.signal =
|
|
3249
|
+
i.publicKey = n, i.signal = es.createNewAbortSignal();
|
|
3250
3250
|
let o;
|
|
3251
3251
|
try {
|
|
3252
3252
|
o = await navigator.credentials.get(i);
|
|
3253
3253
|
} catch (m) {
|
|
3254
|
-
throw
|
|
3254
|
+
throw Dn({ error: m, options: i });
|
|
3255
3255
|
}
|
|
3256
3256
|
if (!o)
|
|
3257
3257
|
throw new Error("Authentication was not completed");
|
|
@@ -3268,29 +3268,29 @@ async function Dn(e) {
|
|
|
3268
3268
|
},
|
|
3269
3269
|
type: u,
|
|
3270
3270
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
3271
|
-
authenticatorAttachment:
|
|
3271
|
+
authenticatorAttachment: ts(o.authenticatorAttachment)
|
|
3272
3272
|
};
|
|
3273
3273
|
}
|
|
3274
|
-
function
|
|
3274
|
+
function rs(e, t) {
|
|
3275
3275
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
3276
3276
|
}
|
|
3277
3277
|
const gr = (e, t) => {
|
|
3278
3278
|
const r = JSON.stringify(
|
|
3279
3279
|
typeof t == "function" ? t() : t
|
|
3280
3280
|
);
|
|
3281
|
-
window.localStorage.setItem(e, r),
|
|
3282
|
-
},
|
|
3283
|
-
window.localStorage.removeItem(e),
|
|
3284
|
-
}, br = (e) => window.localStorage.getItem(e),
|
|
3281
|
+
window.localStorage.setItem(e, r), rs(e, r);
|
|
3282
|
+
}, Un = (e) => {
|
|
3283
|
+
window.localStorage.removeItem(e), rs(e, null);
|
|
3284
|
+
}, br = (e) => window.localStorage.getItem(e), Fn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
3285
3285
|
function Be({
|
|
3286
3286
|
key: e,
|
|
3287
3287
|
initialValue: t
|
|
3288
3288
|
}) {
|
|
3289
|
-
const r =
|
|
3289
|
+
const r = Gs(Fn, () => br(e)), s = X(
|
|
3290
3290
|
(i) => {
|
|
3291
3291
|
try {
|
|
3292
3292
|
const o = typeof i == "function" ? i(JSON.parse(r)) : i;
|
|
3293
|
-
o == null ?
|
|
3293
|
+
o == null ? Un(e) : gr(e, o);
|
|
3294
3294
|
} catch (o) {
|
|
3295
3295
|
console.warn(o);
|
|
3296
3296
|
}
|
|
@@ -3312,30 +3312,30 @@ function Be({
|
|
|
3312
3312
|
const D = [];
|
|
3313
3313
|
for (let e = 0; e < 256; ++e)
|
|
3314
3314
|
D.push((e + 256).toString(16).slice(1));
|
|
3315
|
-
function
|
|
3315
|
+
function Hn(e, t = 0) {
|
|
3316
3316
|
return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
|
|
3317
3317
|
}
|
|
3318
3318
|
let St;
|
|
3319
|
-
const
|
|
3320
|
-
function
|
|
3319
|
+
const Kn = new Uint8Array(16);
|
|
3320
|
+
function Gn() {
|
|
3321
3321
|
if (!St) {
|
|
3322
3322
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3323
3323
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3324
3324
|
St = crypto.getRandomValues.bind(crypto);
|
|
3325
3325
|
}
|
|
3326
|
-
return St(
|
|
3326
|
+
return St(Kn);
|
|
3327
3327
|
}
|
|
3328
|
-
const
|
|
3328
|
+
const Bn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Er = { randomUUID: Bn };
|
|
3329
3329
|
function vt(e, t, r) {
|
|
3330
3330
|
if (Er.randomUUID && !e)
|
|
3331
3331
|
return Er.randomUUID();
|
|
3332
3332
|
e = e || {};
|
|
3333
|
-
const s = e.random ?? e.rng?.() ??
|
|
3333
|
+
const s = e.random ?? e.rng?.() ?? Gn();
|
|
3334
3334
|
if (s.length < 16)
|
|
3335
3335
|
throw new Error("Random bytes length must be >= 16");
|
|
3336
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
3336
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Hn(s);
|
|
3337
3337
|
}
|
|
3338
|
-
const Ae = "Your session has expired. For your security, please log in again to continue.",
|
|
3338
|
+
const Ae = "Your session has expired. For your security, please log in again to continue.", qn = "Your session has been successfully terminated.", Tt = "Login failed. Please try again.", Wn = "Error getting access token, please re-authenticate.", Vn = "You forgot to wrap your component in <AuthProvider>.", qe = "@@auth@@", $e = "LOADING", Qe = "LOGIN", ss = "LOGOUT", Fe = "success", re = "failure", as = "include", ns = "POST", is = "application/json", We = {
|
|
3339
3339
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
3340
3340
|
$clientId: String!,
|
|
3341
3341
|
$username: String!,
|
|
@@ -3442,12 +3442,12 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3442
3442
|
}) => {
|
|
3443
3443
|
try {
|
|
3444
3444
|
const n = `Bearer ${e}`, i = await fetch(`${a}/graphql`, {
|
|
3445
|
-
credentials:
|
|
3446
|
-
method:
|
|
3445
|
+
credentials: as,
|
|
3446
|
+
method: ns,
|
|
3447
3447
|
headers: {
|
|
3448
3448
|
authorization: n,
|
|
3449
|
-
"Content-Type":
|
|
3450
|
-
[
|
|
3449
|
+
"Content-Type": is,
|
|
3450
|
+
[Kr.CLIENT_ID]: `${r}`
|
|
3451
3451
|
},
|
|
3452
3452
|
body: JSON.stringify({
|
|
3453
3453
|
query: t.schema,
|
|
@@ -3472,11 +3472,11 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3472
3472
|
}) => {
|
|
3473
3473
|
try {
|
|
3474
3474
|
const a = await fetch(`${s}/${e}`, {
|
|
3475
|
-
credentials:
|
|
3476
|
-
method:
|
|
3475
|
+
credentials: as,
|
|
3476
|
+
method: ns,
|
|
3477
3477
|
headers: {
|
|
3478
|
-
"Content-Type":
|
|
3479
|
-
[
|
|
3478
|
+
"Content-Type": is,
|
|
3479
|
+
[Kr.CLIENT_ID]: `${t}`
|
|
3480
3480
|
},
|
|
3481
3481
|
body: JSON.stringify(r)
|
|
3482
3482
|
});
|
|
@@ -3490,21 +3490,21 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3490
3490
|
} catch (a) {
|
|
3491
3491
|
return console.error(a), { status: re, data: [] };
|
|
3492
3492
|
}
|
|
3493
|
-
},
|
|
3493
|
+
}, jn = process.env.NODE_ENV === "production", Qn = !jn, os = {
|
|
3494
3494
|
isLoading: !0,
|
|
3495
3495
|
isAuthenticated: !1,
|
|
3496
3496
|
user: void 0,
|
|
3497
3497
|
logoutReason: "",
|
|
3498
3498
|
debug: !1,
|
|
3499
3499
|
authenticationType: ""
|
|
3500
|
-
},
|
|
3500
|
+
}, Jn = (e) => {
|
|
3501
3501
|
try {
|
|
3502
|
-
const t =
|
|
3502
|
+
const t = En(e);
|
|
3503
3503
|
return t ? t[F.USER_ID_KEY] : "";
|
|
3504
3504
|
} catch {
|
|
3505
3505
|
return "";
|
|
3506
3506
|
}
|
|
3507
|
-
},
|
|
3507
|
+
}, Yn = async ({
|
|
3508
3508
|
userId: e,
|
|
3509
3509
|
clientId: t,
|
|
3510
3510
|
domain: r,
|
|
@@ -3529,7 +3529,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3529
3529
|
status: re
|
|
3530
3530
|
};
|
|
3531
3531
|
}
|
|
3532
|
-
},
|
|
3532
|
+
}, zn = async ({
|
|
3533
3533
|
username: e,
|
|
3534
3534
|
password: t,
|
|
3535
3535
|
clientId: r,
|
|
@@ -3574,7 +3574,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3574
3574
|
status: !1
|
|
3575
3575
|
};
|
|
3576
3576
|
}
|
|
3577
|
-
},
|
|
3577
|
+
}, Xn = async ({
|
|
3578
3578
|
nonce: e,
|
|
3579
3579
|
clientId: t,
|
|
3580
3580
|
code_challenge: r,
|
|
@@ -3604,7 +3604,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3604
3604
|
data: ""
|
|
3605
3605
|
};
|
|
3606
3606
|
}
|
|
3607
|
-
},
|
|
3607
|
+
}, Zn = async ({
|
|
3608
3608
|
clientId: e,
|
|
3609
3609
|
userId: t,
|
|
3610
3610
|
nonce: r,
|
|
@@ -3641,7 +3641,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3641
3641
|
};
|
|
3642
3642
|
}
|
|
3643
3643
|
};
|
|
3644
|
-
class
|
|
3644
|
+
class ei {
|
|
3645
3645
|
constructor(t = null, r = null) {
|
|
3646
3646
|
bt(this, "refreshTokenPromise", null), bt(this, "accessToken"), bt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
3647
3647
|
}
|
|
@@ -3674,7 +3674,7 @@ class Zn {
|
|
|
3674
3674
|
}) {
|
|
3675
3675
|
const i = await Ue(this.refreshToken);
|
|
3676
3676
|
if (i && i.payload[F.USER_ID_KEY] !== "") {
|
|
3677
|
-
const o = await
|
|
3677
|
+
const o = await Zn({
|
|
3678
3678
|
endpoint: t,
|
|
3679
3679
|
clientId: r,
|
|
3680
3680
|
userId: s,
|
|
@@ -3697,8 +3697,8 @@ class Zn {
|
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
3699
|
const Re = () => {
|
|
3700
|
-
throw new Error(
|
|
3701
|
-
},
|
|
3700
|
+
throw new Error(Vn);
|
|
3701
|
+
}, cs = Ft({
|
|
3702
3702
|
isAuthenticated: !1,
|
|
3703
3703
|
isLoading: !1,
|
|
3704
3704
|
login: Re,
|
|
@@ -3709,18 +3709,18 @@ const Re = () => {
|
|
|
3709
3709
|
loginWithPasskey: Re,
|
|
3710
3710
|
logoutReason: "",
|
|
3711
3711
|
authenticationType: ""
|
|
3712
|
-
}),
|
|
3713
|
-
...ct(
|
|
3714
|
-
}),
|
|
3712
|
+
}), ti = () => ({
|
|
3713
|
+
...ct(cs)
|
|
3714
|
+
}), ri = (e) => X(
|
|
3715
3715
|
(...t) => {
|
|
3716
3716
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
3717
3717
|
},
|
|
3718
3718
|
[e]
|
|
3719
|
-
),
|
|
3720
|
-
state:
|
|
3719
|
+
), si = oe.createContext({
|
|
3720
|
+
state: os,
|
|
3721
3721
|
dispatch: () => {
|
|
3722
3722
|
}
|
|
3723
|
-
}),
|
|
3723
|
+
}), ai = (e, t) => t?.type === $e ? {
|
|
3724
3724
|
...e,
|
|
3725
3725
|
isLoading: t.payload.isLoading
|
|
3726
3726
|
} : t?.type === Qe ? {
|
|
@@ -3730,28 +3730,28 @@ const Re = () => {
|
|
|
3730
3730
|
user: t.payload.user,
|
|
3731
3731
|
authenticationType: t.payload.authenticationType,
|
|
3732
3732
|
logoutReason: ""
|
|
3733
|
-
} : t?.type ===
|
|
3733
|
+
} : t?.type === ss ? {
|
|
3734
3734
|
...e,
|
|
3735
3735
|
isLoading: !1,
|
|
3736
3736
|
isAuthenticated: !1,
|
|
3737
3737
|
user: void 0,
|
|
3738
3738
|
authenticationType: "",
|
|
3739
3739
|
logoutReason: t.payload.logoutReason
|
|
3740
|
-
} : e,
|
|
3741
|
-
const t =
|
|
3742
|
-
return /* @__PURE__ */ h(
|
|
3740
|
+
} : e, ni = ({ children: e }) => {
|
|
3741
|
+
const t = ti();
|
|
3742
|
+
return /* @__PURE__ */ h(zr.Provider, { value: t, children: e });
|
|
3743
3743
|
}, wr = ({
|
|
3744
3744
|
children: e,
|
|
3745
3745
|
sessionExpiration: t,
|
|
3746
3746
|
clientId: r,
|
|
3747
3747
|
domain: s = "",
|
|
3748
3748
|
debug: a = !1,
|
|
3749
|
-
endpoint: n =
|
|
3749
|
+
endpoint: n = Qn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
3750
3750
|
}) => {
|
|
3751
|
-
const [i, o] =
|
|
3752
|
-
...
|
|
3751
|
+
const [i, o] = Nr(ai, {
|
|
3752
|
+
...os,
|
|
3753
3753
|
debug: a
|
|
3754
|
-
}), c =
|
|
3754
|
+
}), c = ri(a), f = j(!1), [d, u, , l] = Be({
|
|
3755
3755
|
key: `${qe}::${r}::@@user@@`
|
|
3756
3756
|
}), [m, p, , g] = Be({
|
|
3757
3757
|
key: `${qe}::${r}::@@access@@`
|
|
@@ -3761,7 +3761,7 @@ const Re = () => {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
), [A, K, , R] = Be({
|
|
3763
3763
|
key: `${qe}::${r}::@@nonce@@`
|
|
3764
|
-
}), z = new
|
|
3764
|
+
}), z = new ei(m, b), C = X(() => {
|
|
3765
3765
|
c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
|
|
3766
3766
|
}, [
|
|
3767
3767
|
g,
|
|
@@ -3775,7 +3775,7 @@ const Re = () => {
|
|
|
3775
3775
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
3776
3776
|
w
|
|
3777
3777
|
), o({
|
|
3778
|
-
type:
|
|
3778
|
+
type: ss,
|
|
3779
3779
|
payload: {
|
|
3780
3780
|
logoutReason: w || Ae
|
|
3781
3781
|
}
|
|
@@ -3785,10 +3785,10 @@ const Re = () => {
|
|
|
3785
3785
|
), x = X(
|
|
3786
3786
|
async (w) => {
|
|
3787
3787
|
c("invalidateAndLogout: invalidating and logging out");
|
|
3788
|
-
const { user: T } = i, S = T?.userId ||
|
|
3788
|
+
const { user: T } = i, S = T?.userId || Jn(d);
|
|
3789
3789
|
S || c(
|
|
3790
3790
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
3791
|
-
), await
|
|
3791
|
+
), await Yn({
|
|
3792
3792
|
userId: S,
|
|
3793
3793
|
clientId: r,
|
|
3794
3794
|
domain: s,
|
|
@@ -3835,14 +3835,14 @@ const Re = () => {
|
|
|
3835
3835
|
o({ type: $e, payload: { isLoading: !0 } }), C();
|
|
3836
3836
|
const S = vt();
|
|
3837
3837
|
K(S), c("login: Logging in with password");
|
|
3838
|
-
const { code_verifier: le, code_challenge: ue } = await
|
|
3838
|
+
const { code_verifier: le, code_challenge: ue } = await Rn(), Zt = await Xn({
|
|
3839
3839
|
endpoint: n,
|
|
3840
3840
|
nonce: S,
|
|
3841
3841
|
clientId: r,
|
|
3842
3842
|
code_challenge: ue
|
|
3843
3843
|
});
|
|
3844
3844
|
if (Zt.status) {
|
|
3845
|
-
const ve = await
|
|
3845
|
+
const ve = await zn({
|
|
3846
3846
|
endpoint: n,
|
|
3847
3847
|
username: w,
|
|
3848
3848
|
password: T,
|
|
@@ -3869,7 +3869,7 @@ const Re = () => {
|
|
|
3869
3869
|
}
|
|
3870
3870
|
return !1;
|
|
3871
3871
|
}, I = async (w) => {
|
|
3872
|
-
w?.preventDefault(), await x(
|
|
3872
|
+
w?.preventDefault(), await x(qn);
|
|
3873
3873
|
}, N = async () => {
|
|
3874
3874
|
const { isAuthenticated: w, user: T } = i;
|
|
3875
3875
|
try {
|
|
@@ -3898,7 +3898,7 @@ const Re = () => {
|
|
|
3898
3898
|
} catch {
|
|
3899
3899
|
return c(
|
|
3900
3900
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
3901
|
-
), await x(
|
|
3901
|
+
), await x(Wn), "";
|
|
3902
3902
|
}
|
|
3903
3903
|
}, J = () => i.isAuthenticated && d ? d : "", ce = async () => {
|
|
3904
3904
|
const { user: w } = i;
|
|
@@ -3915,7 +3915,7 @@ const Re = () => {
|
|
|
3915
3915
|
});
|
|
3916
3916
|
if (T.status)
|
|
3917
3917
|
try {
|
|
3918
|
-
const S = await
|
|
3918
|
+
const S = await xn({
|
|
3919
3919
|
optionsJSON: T.data
|
|
3920
3920
|
});
|
|
3921
3921
|
return T = await _e({
|
|
@@ -3962,7 +3962,7 @@ const Re = () => {
|
|
|
3962
3962
|
});
|
|
3963
3963
|
if (S.status)
|
|
3964
3964
|
try {
|
|
3965
|
-
const le = await
|
|
3965
|
+
const le = await Ln({
|
|
3966
3966
|
optionsJSON: S.data
|
|
3967
3967
|
});
|
|
3968
3968
|
return S = await _e({
|
|
@@ -4008,8 +4008,8 @@ const Re = () => {
|
|
|
4008
4008
|
}
|
|
4009
4009
|
return !1;
|
|
4010
4010
|
};
|
|
4011
|
-
return /* @__PURE__ */ h(
|
|
4012
|
-
|
|
4011
|
+
return /* @__PURE__ */ h(si.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ h(
|
|
4012
|
+
cs.Provider,
|
|
4013
4013
|
{
|
|
4014
4014
|
value: {
|
|
4015
4015
|
...i,
|
|
@@ -4020,7 +4020,7 @@ const Re = () => {
|
|
|
4020
4020
|
registeringForPasskey: ce,
|
|
4021
4021
|
loginWithPasskey: Se
|
|
4022
4022
|
},
|
|
4023
|
-
children: /* @__PURE__ */ h(
|
|
4023
|
+
children: /* @__PURE__ */ h(ni, { children: e })
|
|
4024
4024
|
}
|
|
4025
4025
|
) });
|
|
4026
4026
|
};
|
|
@@ -4037,12 +4037,12 @@ try {
|
|
|
4037
4037
|
});
|
|
4038
4038
|
} catch {
|
|
4039
4039
|
}
|
|
4040
|
-
const
|
|
4041
|
-
const e = ct(
|
|
4040
|
+
const ls = () => {
|
|
4041
|
+
const e = ct(zr);
|
|
4042
4042
|
if (!e)
|
|
4043
4043
|
throw new Error("useAuth must be used within an AuthHookProvider");
|
|
4044
4044
|
return e;
|
|
4045
|
-
},
|
|
4045
|
+
}, oc = "I'm having trouble right now. Please try again later.", cc = "action-search", lc = "action-sort", uc = "action-toggle-prompt", dc = "action-reset-prompt", us = "sassy-saint-", hc = "search", fc = "sort", mc = "sort-timestamp", pc = "sort-token-usage", yc = "sort-memory-direction", gc = "sort-memory-column", bc = "favorites-only", Ec = "private-disclosure", wc = "reasoning-disclosure", ds = "service-worker", Sc = "chat-id", vc = "sassysaint-oled-mode", Sr = "data-oled-mode", vr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", Tc = 10, Ac = 30, Ic = "av-prompt", _c = "av-prompt-editable", Rc = "size-5 sm:size-4", Cc = 30, Oc = 15, kc = 130, Nc = 160, Pc = 16, $c = 24, xc = 76, Mc = 76;
|
|
4046
4046
|
let At = null, ae = !1;
|
|
4047
4047
|
typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
|
|
4048
4048
|
ae && (ae = !1, window.location.reload());
|
|
@@ -4052,17 +4052,17 @@ function Vt() {
|
|
|
4052
4052
|
}
|
|
4053
4053
|
function Dt() {
|
|
4054
4054
|
const e = localStorage.getItem(
|
|
4055
|
-
|
|
4055
|
+
us + ds
|
|
4056
4056
|
);
|
|
4057
4057
|
return e === null ? !1 : e === "true";
|
|
4058
4058
|
}
|
|
4059
|
-
function
|
|
4059
|
+
function ii(e) {
|
|
4060
4060
|
localStorage.setItem(
|
|
4061
|
-
|
|
4061
|
+
us + ds,
|
|
4062
4062
|
e.toString()
|
|
4063
4063
|
);
|
|
4064
4064
|
}
|
|
4065
|
-
async function
|
|
4065
|
+
async function hs() {
|
|
4066
4066
|
if (!Dt())
|
|
4067
4067
|
return !1;
|
|
4068
4068
|
if (!Vt())
|
|
@@ -4082,7 +4082,7 @@ async function ds() {
|
|
|
4082
4082
|
return console.error("[SW] Service worker registration failed:", e), !1;
|
|
4083
4083
|
}
|
|
4084
4084
|
}
|
|
4085
|
-
async function
|
|
4085
|
+
async function oi() {
|
|
4086
4086
|
if (!Vt())
|
|
4087
4087
|
return !1;
|
|
4088
4088
|
try {
|
|
@@ -4092,14 +4092,14 @@ async function ii() {
|
|
|
4092
4092
|
return console.error("[SW] Service worker un-registration failed:", e), !1;
|
|
4093
4093
|
}
|
|
4094
4094
|
}
|
|
4095
|
-
async function
|
|
4096
|
-
if (
|
|
4095
|
+
async function Dc(e) {
|
|
4096
|
+
if (ii(e), e) {
|
|
4097
4097
|
ae = !0;
|
|
4098
4098
|
try {
|
|
4099
4099
|
sessionStorage.setItem("sw-toggle-pending", "enabled");
|
|
4100
4100
|
} catch {
|
|
4101
4101
|
}
|
|
4102
|
-
await
|
|
4102
|
+
await hs(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
|
|
4103
4103
|
try {
|
|
4104
4104
|
navigator.serviceWorker.ready.then(() => {
|
|
4105
4105
|
ae && Dt() && (ae = !1, window.location.reload());
|
|
@@ -4114,14 +4114,14 @@ async function Mc(e) {
|
|
|
4114
4114
|
} catch {
|
|
4115
4115
|
}
|
|
4116
4116
|
try {
|
|
4117
|
-
Vt() && await
|
|
4117
|
+
Vt() && await ci();
|
|
4118
4118
|
} catch (t) {
|
|
4119
4119
|
console.warn("[SW] Failed to invalidate cache:", t);
|
|
4120
4120
|
}
|
|
4121
|
-
await
|
|
4121
|
+
await oi(), window.location.reload();
|
|
4122
4122
|
}
|
|
4123
4123
|
}
|
|
4124
|
-
async function
|
|
4124
|
+
async function ci() {
|
|
4125
4125
|
try {
|
|
4126
4126
|
if ("caches" in window) {
|
|
4127
4127
|
const e = await caches.keys();
|
|
@@ -4147,7 +4147,7 @@ async function oi() {
|
|
|
4147
4147
|
function It() {
|
|
4148
4148
|
return "unknown";
|
|
4149
4149
|
}
|
|
4150
|
-
async function
|
|
4150
|
+
async function Lc(e = {}) {
|
|
4151
4151
|
const { urlLimitPerCache: t } = e;
|
|
4152
4152
|
if (!("caches" in window))
|
|
4153
4153
|
return { version: It(), caches: [], totalItems: 0 };
|
|
@@ -4174,44 +4174,44 @@ async function Dc(e = {}) {
|
|
|
4174
4174
|
return console.warn("[SW] getCacheInfo failed:", r), { version: It(), caches: [], totalItems: 0 };
|
|
4175
4175
|
}
|
|
4176
4176
|
}
|
|
4177
|
-
const
|
|
4177
|
+
const Uc = "user", Fc = "assistant", Hc = "data", He = "OpenAI", dt = "Anthropic", ht = "Google", fs = "Perplexity", Kc = He, li = [
|
|
4178
4178
|
He,
|
|
4179
4179
|
dt,
|
|
4180
4180
|
ht
|
|
4181
|
-
],
|
|
4182
|
-
[
|
|
4183
|
-
[
|
|
4184
|
-
[
|
|
4185
|
-
[
|
|
4186
|
-
[
|
|
4187
|
-
[
|
|
4188
|
-
[
|
|
4189
|
-
[
|
|
4190
|
-
[
|
|
4191
|
-
[
|
|
4192
|
-
},
|
|
4181
|
+
], ms = "gpt-5", ps = "gpt-5-mini", ys = "gpt-5-nano", gs = "gpt-4.1-nano", bs = "claude-haiku-4-5-20251001", Es = "claude-sonnet-4-5-20250929", ws = "gemini-2.5-flash", Ss = "gemini-2.5-pro", vs = "sonar", Ts = "sonar-pro", Gc = {
|
|
4182
|
+
[ms]: "GPT-5",
|
|
4183
|
+
[ps]: "GPT-5 Mini",
|
|
4184
|
+
[ys]: "GPT-5 Nano",
|
|
4185
|
+
[gs]: "GPT-4.1 Nano",
|
|
4186
|
+
[bs]: "Claude Haiku 4.5",
|
|
4187
|
+
[Es]: "Claude Sonnet 4.5",
|
|
4188
|
+
[ws]: "Gemini 2.5 Flash",
|
|
4189
|
+
[Ss]: "Gemini 2.5 Pro",
|
|
4190
|
+
[vs]: "Sonar",
|
|
4191
|
+
[Ts]: "Sonar Pro"
|
|
4192
|
+
}, As = {
|
|
4193
4193
|
[He]: [
|
|
4194
|
-
|
|
4195
|
-
fs,
|
|
4194
|
+
gs,
|
|
4196
4195
|
ms,
|
|
4197
|
-
ps
|
|
4196
|
+
ps,
|
|
4197
|
+
ys
|
|
4198
4198
|
],
|
|
4199
|
-
[dt]: [
|
|
4200
|
-
[ht]: [
|
|
4201
|
-
[
|
|
4202
|
-
},
|
|
4199
|
+
[dt]: [bs, Es],
|
|
4200
|
+
[ht]: [ws, Ss],
|
|
4201
|
+
[fs]: [vs, Ts]
|
|
4202
|
+
}, ui = "claude-sonnet-4", di = "claude-3", hi = "gpt-", fi = "o3", mi = "o4", pi = "gemini", yi = "sonar", gi = {
|
|
4203
4203
|
[dt]: [
|
|
4204
|
-
|
|
4205
|
-
|
|
4204
|
+
ui,
|
|
4205
|
+
di
|
|
4206
4206
|
],
|
|
4207
4207
|
[He]: [
|
|
4208
|
-
di,
|
|
4209
4208
|
hi,
|
|
4210
|
-
fi
|
|
4209
|
+
fi,
|
|
4210
|
+
mi
|
|
4211
4211
|
],
|
|
4212
|
-
[ht]: [
|
|
4213
|
-
[
|
|
4214
|
-
},
|
|
4212
|
+
[ht]: [pi],
|
|
4213
|
+
[fs]: [yi]
|
|
4214
|
+
}, Bc = "x-diggidy-chat-id", qc = "timestamp", Wc = "tokenUsage", k = "Diggidy", Vc = {
|
|
4215
4215
|
TOOL: {
|
|
4216
4216
|
MEMORIES: "getUserMemories"
|
|
4217
4217
|
},
|
|
@@ -4219,50 +4219,50 @@ const Lc = "user", Uc = "assistant", Fc = "data", He = "OpenAI", dt = "Anthropic
|
|
|
4219
4219
|
ATTACHMENTS: "addon:attachments",
|
|
4220
4220
|
REASONING: "addon:reasoning"
|
|
4221
4221
|
}
|
|
4222
|
-
},
|
|
4222
|
+
}, jc = (e) => {
|
|
4223
4223
|
for (const [t, r] of Object.entries(
|
|
4224
|
-
|
|
4224
|
+
gi
|
|
4225
4225
|
))
|
|
4226
4226
|
if (r.some((s) => e.startsWith(s)))
|
|
4227
4227
|
return t;
|
|
4228
4228
|
return null;
|
|
4229
|
-
},
|
|
4229
|
+
}, Qc = (e) => {
|
|
4230
4230
|
if (!e || e.length === 0)
|
|
4231
4231
|
return [];
|
|
4232
4232
|
const t = /* @__PURE__ */ new Set();
|
|
4233
4233
|
for (const r of e)
|
|
4234
4234
|
for (const [s, a] of Object.entries(
|
|
4235
|
-
|
|
4235
|
+
As
|
|
4236
4236
|
))
|
|
4237
4237
|
a.includes(r) && (s === He || s === dt || s === ht) && t.add(s);
|
|
4238
|
-
return
|
|
4239
|
-
},
|
|
4238
|
+
return li.filter((r) => t.has(r));
|
|
4239
|
+
}, bi = (e) => {
|
|
4240
4240
|
const t = /* @__PURE__ */ new Map();
|
|
4241
4241
|
if (!e || e.length === 0)
|
|
4242
4242
|
return t;
|
|
4243
4243
|
for (const r of e)
|
|
4244
4244
|
for (const [s, a] of Object.entries(
|
|
4245
|
-
|
|
4245
|
+
As
|
|
4246
4246
|
))
|
|
4247
4247
|
if (a.includes(r)) {
|
|
4248
4248
|
t.has(s) || t.set(s, []), t.get(s)?.push(r);
|
|
4249
4249
|
break;
|
|
4250
4250
|
}
|
|
4251
4251
|
return t;
|
|
4252
|
-
},
|
|
4253
|
-
const t =
|
|
4252
|
+
}, Jc = (e) => {
|
|
4253
|
+
const t = bi(e);
|
|
4254
4254
|
for (const r of t.values())
|
|
4255
4255
|
if (r.length > 1)
|
|
4256
4256
|
return !0;
|
|
4257
4257
|
return !1;
|
|
4258
|
-
},
|
|
4259
|
-
function
|
|
4258
|
+
}, Yc = (e, t) => !e || !t || t.length === 0 ? !1 : t.includes(e);
|
|
4259
|
+
function Ei(e) {
|
|
4260
4260
|
return e ? new Set(e) : null;
|
|
4261
4261
|
}
|
|
4262
|
-
function
|
|
4262
|
+
function wi(e, t, r) {
|
|
4263
4263
|
if (!t || Array.isArray(t) && t.length === 0)
|
|
4264
4264
|
return !0;
|
|
4265
|
-
const s = e instanceof Set ? e :
|
|
4265
|
+
const s = e instanceof Set ? e : Ei(e);
|
|
4266
4266
|
return !s || s.size === 0 ? !1 : typeof t == "string" ? s.has(t) : r?.any === !0 ? t.some((a) => s.has(a)) : t.every((a) => s.has(a));
|
|
4267
4267
|
}
|
|
4268
4268
|
const G = {
|
|
@@ -4534,12 +4534,12 @@ const G = {
|
|
|
4534
4534
|
schema: G.DELETE_MEMORIES,
|
|
4535
4535
|
method: "deleteMemories"
|
|
4536
4536
|
}
|
|
4537
|
-
},
|
|
4537
|
+
}, Si = process.env.PUBLIC_SASSY_API_SERVER_URL, nt = async ({
|
|
4538
4538
|
query: e,
|
|
4539
4539
|
data: t,
|
|
4540
4540
|
headers: r = {},
|
|
4541
4541
|
...s
|
|
4542
|
-
}) => await fetch(`${
|
|
4542
|
+
}) => await fetch(`${Si}/graphql`, {
|
|
4543
4543
|
method: "POST",
|
|
4544
4544
|
credentials: "include",
|
|
4545
4545
|
headers: {
|
|
@@ -4584,7 +4584,7 @@ const G = {
|
|
|
4584
4584
|
} catch (r) {
|
|
4585
4585
|
throw console.error(r), r;
|
|
4586
4586
|
}
|
|
4587
|
-
},
|
|
4587
|
+
}, zc = async ({
|
|
4588
4588
|
provider: e,
|
|
4589
4589
|
model: t,
|
|
4590
4590
|
accessToken: r,
|
|
@@ -4599,7 +4599,7 @@ const G = {
|
|
|
4599
4599
|
type: B.SET_USER_PREFERENCES,
|
|
4600
4600
|
params: a
|
|
4601
4601
|
});
|
|
4602
|
-
},
|
|
4602
|
+
}, Xc = async ({
|
|
4603
4603
|
plan: e,
|
|
4604
4604
|
accessToken: t,
|
|
4605
4605
|
username: r
|
|
@@ -4619,13 +4619,13 @@ const G = {
|
|
|
4619
4619
|
PREFERENCES: "preferences",
|
|
4620
4620
|
USAGE: "usage",
|
|
4621
4621
|
USER_MEMORIES: "userMemories"
|
|
4622
|
-
},
|
|
4622
|
+
}, Zc = () => fe({
|
|
4623
4623
|
queryKey: [Q.CAPABILITIES],
|
|
4624
4624
|
queryFn: async () => await pe({
|
|
4625
4625
|
type: B.GET_SERVER_CAPABILITIES,
|
|
4626
4626
|
noAuth: !0
|
|
4627
4627
|
})
|
|
4628
|
-
}),
|
|
4628
|
+
}), el = () => fe({
|
|
4629
4629
|
queryKey: [Q.CHANGELOGS],
|
|
4630
4630
|
queryFn: async () => await pe({
|
|
4631
4631
|
type: B.GET_CHANGELOGS,
|
|
@@ -4634,7 +4634,7 @@ const G = {
|
|
|
4634
4634
|
client: !0
|
|
4635
4635
|
}
|
|
4636
4636
|
})
|
|
4637
|
-
}),
|
|
4637
|
+
}), vi = ({
|
|
4638
4638
|
user: e,
|
|
4639
4639
|
getAccessToken: t
|
|
4640
4640
|
}) => fe({
|
|
@@ -4646,7 +4646,7 @@ const G = {
|
|
|
4646
4646
|
type: B.GET_USER_PREFERENCES,
|
|
4647
4647
|
getAccessToken: t
|
|
4648
4648
|
})
|
|
4649
|
-
}),
|
|
4649
|
+
}), tl = ({
|
|
4650
4650
|
user: e,
|
|
4651
4651
|
getAccessToken: t
|
|
4652
4652
|
}) => fe({
|
|
@@ -4658,7 +4658,7 @@ const G = {
|
|
|
4658
4658
|
type: B.GET_CHATS_STATS,
|
|
4659
4659
|
getAccessToken: t
|
|
4660
4660
|
})
|
|
4661
|
-
}),
|
|
4661
|
+
}), rl = ({
|
|
4662
4662
|
user: e,
|
|
4663
4663
|
searchString: t,
|
|
4664
4664
|
sortDirection: r,
|
|
@@ -4682,7 +4682,7 @@ const G = {
|
|
|
4682
4682
|
type: B.GET_CHATS,
|
|
4683
4683
|
getAccessToken: a
|
|
4684
4684
|
})
|
|
4685
|
-
}),
|
|
4685
|
+
}), sl = ({
|
|
4686
4686
|
chatId: e,
|
|
4687
4687
|
getAccessToken: t,
|
|
4688
4688
|
enabled: r = !0
|
|
@@ -4694,7 +4694,7 @@ const G = {
|
|
|
4694
4694
|
type: B.GET_CHAT,
|
|
4695
4695
|
getAccessToken: t
|
|
4696
4696
|
})
|
|
4697
|
-
}),
|
|
4697
|
+
}), al = ({
|
|
4698
4698
|
getAccessToken: e
|
|
4699
4699
|
}) => {
|
|
4700
4700
|
const t = he();
|
|
@@ -4717,7 +4717,7 @@ const G = {
|
|
|
4717
4717
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4718
4718
|
}
|
|
4719
4719
|
});
|
|
4720
|
-
},
|
|
4720
|
+
}, nl = ({
|
|
4721
4721
|
getAccessToken: e
|
|
4722
4722
|
}) => {
|
|
4723
4723
|
const t = he();
|
|
@@ -4734,7 +4734,7 @@ const G = {
|
|
|
4734
4734
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4735
4735
|
}
|
|
4736
4736
|
});
|
|
4737
|
-
},
|
|
4737
|
+
}, il = ({
|
|
4738
4738
|
getAccessToken: e
|
|
4739
4739
|
}) => {
|
|
4740
4740
|
const t = he();
|
|
@@ -4751,7 +4751,7 @@ const G = {
|
|
|
4751
4751
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4752
4752
|
}
|
|
4753
4753
|
});
|
|
4754
|
-
},
|
|
4754
|
+
}, ol = ({
|
|
4755
4755
|
user: e,
|
|
4756
4756
|
month: t,
|
|
4757
4757
|
year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
|
|
@@ -4769,7 +4769,7 @@ const G = {
|
|
|
4769
4769
|
type: B.GET_USAGE,
|
|
4770
4770
|
getAccessToken: s
|
|
4771
4771
|
})
|
|
4772
|
-
}),
|
|
4772
|
+
}), cl = ({
|
|
4773
4773
|
user: e,
|
|
4774
4774
|
query: t,
|
|
4775
4775
|
getAccessToken: r,
|
|
@@ -4782,7 +4782,7 @@ const G = {
|
|
|
4782
4782
|
type: B.GET_USER_MEMORIES,
|
|
4783
4783
|
getAccessToken: r
|
|
4784
4784
|
})
|
|
4785
|
-
}),
|
|
4785
|
+
}), ll = ({
|
|
4786
4786
|
getAccessToken: e
|
|
4787
4787
|
}) => {
|
|
4788
4788
|
const t = he();
|
|
@@ -4805,7 +4805,7 @@ const G = {
|
|
|
4805
4805
|
});
|
|
4806
4806
|
}
|
|
4807
4807
|
});
|
|
4808
|
-
},
|
|
4808
|
+
}, ul = ({
|
|
4809
4809
|
getAccessToken: e
|
|
4810
4810
|
}) => {
|
|
4811
4811
|
const t = he();
|
|
@@ -4827,7 +4827,7 @@ const G = {
|
|
|
4827
4827
|
});
|
|
4828
4828
|
}
|
|
4829
4829
|
});
|
|
4830
|
-
},
|
|
4830
|
+
}, dl = ({
|
|
4831
4831
|
getAccessToken: e
|
|
4832
4832
|
}) => {
|
|
4833
4833
|
const t = he();
|
|
@@ -4882,19 +4882,19 @@ const G = {
|
|
|
4882
4882
|
} catch (a) {
|
|
4883
4883
|
return Promise.reject(a);
|
|
4884
4884
|
}
|
|
4885
|
-
},
|
|
4885
|
+
}, Is = Ft(
|
|
4886
4886
|
void 0
|
|
4887
|
-
),
|
|
4887
|
+
), Tr = {
|
|
4888
4888
|
capabilities: /* @__PURE__ */ new Set(),
|
|
4889
4889
|
allowedModels: [],
|
|
4890
4890
|
version: null,
|
|
4891
4891
|
status: "idle"
|
|
4892
|
-
},
|
|
4892
|
+
}, Ti = ({
|
|
4893
4893
|
user: e,
|
|
4894
4894
|
getAccessToken: t,
|
|
4895
4895
|
children: r
|
|
4896
4896
|
}) => {
|
|
4897
|
-
const [s, a] = ie(
|
|
4897
|
+
const [s, a] = ie(Tr), n = ze(
|
|
4898
4898
|
() => e ? `entitlements:${e}` : null,
|
|
4899
4899
|
[e]
|
|
4900
4900
|
), i = X(() => {
|
|
@@ -4919,7 +4919,7 @@ const G = {
|
|
|
4919
4919
|
W(() => {
|
|
4920
4920
|
s.status === "idle" && i();
|
|
4921
4921
|
}, [i, s.status]);
|
|
4922
|
-
const o =
|
|
4922
|
+
const o = vi({ user: e, getAccessToken: t });
|
|
4923
4923
|
W(() => {
|
|
4924
4924
|
o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
|
|
4925
4925
|
}, [o.isLoading, s.status]), W(() => {
|
|
@@ -4971,7 +4971,7 @@ const G = {
|
|
|
4971
4971
|
},
|
|
4972
4972
|
[n]
|
|
4973
4973
|
), f = X(() => {
|
|
4974
|
-
if (a(
|
|
4974
|
+
if (a(Tr), n)
|
|
4975
4975
|
try {
|
|
4976
4976
|
sessionStorage.removeItem(n);
|
|
4977
4977
|
} catch {
|
|
@@ -4979,33 +4979,33 @@ const G = {
|
|
|
4979
4979
|
}, [n]), d = ze(
|
|
4980
4980
|
() => ({
|
|
4981
4981
|
...s,
|
|
4982
|
-
check: (u, l) => s.status !== "ready" ? !1 :
|
|
4982
|
+
check: (u, l) => s.status !== "ready" ? !1 : wi(s.capabilities, u, { any: l?.any }),
|
|
4983
4983
|
loadFromProfile: c,
|
|
4984
4984
|
reset: f
|
|
4985
4985
|
}),
|
|
4986
4986
|
[s, c, f]
|
|
4987
4987
|
);
|
|
4988
|
-
return /* @__PURE__ */ h(
|
|
4988
|
+
return /* @__PURE__ */ h(Is.Provider, { value: d, children: r });
|
|
4989
4989
|
};
|
|
4990
|
-
function
|
|
4991
|
-
const e = ct(
|
|
4990
|
+
function hl() {
|
|
4991
|
+
const e = ct(Is);
|
|
4992
4992
|
if (!e)
|
|
4993
4993
|
throw new Error("useEntitlements must be used within EntitlementsProvider");
|
|
4994
4994
|
return e;
|
|
4995
4995
|
}
|
|
4996
|
-
const
|
|
4997
|
-
function
|
|
4996
|
+
const Ar = (e) => Number.isFinite(e) ? e : 0;
|
|
4997
|
+
function Ai(e) {
|
|
4998
4998
|
return {
|
|
4999
4999
|
days: Math.trunc(e / 864e5),
|
|
5000
5000
|
hours: Math.trunc(e / 36e5 % 24),
|
|
5001
5001
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
5002
5002
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
5003
5003
|
milliseconds: Math.trunc(e % 1e3),
|
|
5004
|
-
microseconds: Math.trunc(
|
|
5005
|
-
nanoseconds: Math.trunc(
|
|
5004
|
+
microseconds: Math.trunc(Ar(e * 1e3) % 1e3),
|
|
5005
|
+
nanoseconds: Math.trunc(Ar(e * 1e6) % 1e3)
|
|
5006
5006
|
};
|
|
5007
5007
|
}
|
|
5008
|
-
function
|
|
5008
|
+
function Ii(e) {
|
|
5009
5009
|
return {
|
|
5010
5010
|
days: e / 86400000n,
|
|
5011
5011
|
hours: e / 3600000n % 24n,
|
|
@@ -5016,20 +5016,20 @@ function Ai(e) {
|
|
|
5016
5016
|
nanoseconds: 0n
|
|
5017
5017
|
};
|
|
5018
5018
|
}
|
|
5019
|
-
function
|
|
5019
|
+
function _i(e) {
|
|
5020
5020
|
switch (typeof e) {
|
|
5021
5021
|
case "number": {
|
|
5022
5022
|
if (Number.isFinite(e))
|
|
5023
|
-
return
|
|
5023
|
+
return Ai(e);
|
|
5024
5024
|
break;
|
|
5025
5025
|
}
|
|
5026
5026
|
case "bigint":
|
|
5027
|
-
return
|
|
5027
|
+
return Ii(e);
|
|
5028
5028
|
}
|
|
5029
5029
|
throw new TypeError("Expected a finite number or bigint");
|
|
5030
5030
|
}
|
|
5031
|
-
const
|
|
5032
|
-
function
|
|
5031
|
+
const Ri = (e) => e === 0 || e === 0n, Ci = (e, t) => t === 1 || t === 1n ? e : `${e}s`, Oi = 1e-7, ki = 24n * 60n * 60n * 1000n;
|
|
5032
|
+
function Ni(e, t) {
|
|
5033
5033
|
const r = typeof e == "bigint";
|
|
5034
5034
|
if (!r && !Number.isFinite(e))
|
|
5035
5035
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -5038,18 +5038,18 @@ function ki(e, t) {
|
|
|
5038
5038
|
e = e < 0 ? -e : e, t.colonNotation && (t.compact = !1, t.formatSubMilliseconds = !1, t.separateMilliseconds = !1, t.verbose = !1), t.compact && (t.unitCount = 1, t.secondsDecimalDigits = 0, t.millisecondsDecimalDigits = 0);
|
|
5039
5039
|
let a = [];
|
|
5040
5040
|
const n = (d, u) => {
|
|
5041
|
-
const l = Math.floor(d * 10 ** u +
|
|
5041
|
+
const l = Math.floor(d * 10 ** u + Oi);
|
|
5042
5042
|
return (Math.round(l) / 10 ** u).toFixed(u);
|
|
5043
5043
|
}, i = (d, u, l, m) => {
|
|
5044
|
-
if (!((a.length === 0 || !t.colonNotation) &&
|
|
5044
|
+
if (!((a.length === 0 || !t.colonNotation) && Ri(d) && !(t.colonNotation && l === "m"))) {
|
|
5045
5045
|
if (m ??= String(d), t.colonNotation) {
|
|
5046
5046
|
const p = m.includes(".") ? m.split(".")[0].length : m.length, g = a.length > 0 ? 2 : 1;
|
|
5047
5047
|
m = "0".repeat(Math.max(0, g - p)) + m;
|
|
5048
5048
|
} else
|
|
5049
|
-
m += t.verbose ? " " +
|
|
5049
|
+
m += t.verbose ? " " + Ci(u, d) : l;
|
|
5050
5050
|
a.push(m);
|
|
5051
5051
|
}
|
|
5052
|
-
}, o =
|
|
5052
|
+
}, o = _i(e), c = BigInt(o.days);
|
|
5053
5053
|
if (t.hideYearAndDays ? i(BigInt(c) * 24n + BigInt(o.hours), "hour", "h") : (t.hideYear ? i(c, "day", "d") : (i(c / 365n, "year", "y"), i(c % 365n, "day", "d")), i(Number(o.hours), "hour", "h")), i(Number(o.minutes), "minute", "m"), !t.hideSeconds)
|
|
5054
5054
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3 && !t.subSecondsAsDecimals) {
|
|
5055
5055
|
const d = Number(o.seconds), u = Number(o.milliseconds), l = Number(o.microseconds), m = Number(o.nanoseconds);
|
|
@@ -5065,7 +5065,7 @@ function ki(e, t) {
|
|
|
5065
5065
|
);
|
|
5066
5066
|
}
|
|
5067
5067
|
} else {
|
|
5068
|
-
const d = (r ? Number(e %
|
|
5068
|
+
const d = (r ? Number(e % ki) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = n(d, u), m = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
|
5069
5069
|
i(Number.parseFloat(m), "second", "s", m);
|
|
5070
5070
|
}
|
|
5071
5071
|
if (a.length === 0)
|
|
@@ -5073,7 +5073,7 @@ function ki(e, t) {
|
|
|
5073
5073
|
const f = t.colonNotation ? ":" : " ";
|
|
5074
5074
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
|
|
5075
5075
|
}
|
|
5076
|
-
const
|
|
5076
|
+
const _s = process.env.NODE_ENV === "production", jt = !_s, Rs = jt ? "gizmette.local.com" : "gizmette.com", Qt = (e, t) => {
|
|
5077
5077
|
const r = e < 0 ? t ? "W" : "S" : t ? "E" : "N", s = 0 | Math.abs(e), a = 0 | Math.abs(e) * 60 % 60, n = (0 | Math.abs(e) * 60 % 1 * 6e3) / 100;
|
|
5078
5078
|
return {
|
|
5079
5079
|
dir: r,
|
|
@@ -5081,17 +5081,17 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5081
5081
|
min: a,
|
|
5082
5082
|
sec: n
|
|
5083
5083
|
};
|
|
5084
|
-
},
|
|
5084
|
+
}, Pi = (e) => {
|
|
5085
5085
|
if (!e && e !== 0)
|
|
5086
5086
|
return "N/A";
|
|
5087
5087
|
const t = Qt(e, !1);
|
|
5088
5088
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
5089
|
-
},
|
|
5089
|
+
}, $i = (e) => {
|
|
5090
5090
|
if (!e && e !== 0)
|
|
5091
5091
|
return "N/A";
|
|
5092
5092
|
const t = Qt(e, !0);
|
|
5093
5093
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
5094
|
-
},
|
|
5094
|
+
}, xi = async () => {
|
|
5095
5095
|
const e = {
|
|
5096
5096
|
/**
|
|
5097
5097
|
* A boolean value that indicates the application would like to receive the
|
|
@@ -5134,18 +5134,18 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5134
5134
|
e
|
|
5135
5135
|
);
|
|
5136
5136
|
});
|
|
5137
|
-
},
|
|
5137
|
+
}, Mi = (e) => window.btoa(
|
|
5138
5138
|
encodeURIComponent(e).replace(
|
|
5139
5139
|
/%([0-9A-F]{2})/g,
|
|
5140
5140
|
function(r, s) {
|
|
5141
5141
|
return String.fromCharCode(+`0x${s}`);
|
|
5142
5142
|
}
|
|
5143
5143
|
)
|
|
5144
|
-
),
|
|
5144
|
+
), Di = (e) => decodeURIComponent(
|
|
5145
5145
|
window.atob(e).split("").map(function(t) {
|
|
5146
5146
|
return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
|
|
5147
5147
|
}).join("")
|
|
5148
|
-
),
|
|
5148
|
+
), Li = (e, t, r) => t ? Object.keys(t).map((s) => /* @__PURE__ */ h("dl", { className: "my-0", children: /* @__PURE__ */ V("div", { className: "flex items-center justify-between", children: [
|
|
5149
5149
|
/* @__PURE__ */ h(
|
|
5150
5150
|
"dt",
|
|
5151
5151
|
{
|
|
@@ -5167,7 +5167,7 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5167
5167
|
}
|
|
5168
5168
|
)
|
|
5169
5169
|
] }) }, `${e}-${s}`)) : null;
|
|
5170
|
-
function
|
|
5170
|
+
function Ui({
|
|
5171
5171
|
data: e,
|
|
5172
5172
|
formatter: t = (r) => r
|
|
5173
5173
|
}) {
|
|
@@ -5179,15 +5179,15 @@ function Li({
|
|
|
5179
5179
|
);
|
|
5180
5180
|
return t(s ? s / r.length : 0);
|
|
5181
5181
|
}
|
|
5182
|
-
const
|
|
5182
|
+
const Fi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Hi = new Intl.NumberFormat("en", {
|
|
5183
5183
|
style: "decimal",
|
|
5184
5184
|
signDisplay: "never",
|
|
5185
5185
|
minimumFractionDigits: 0,
|
|
5186
5186
|
maximumFractionDigits: 0
|
|
5187
|
-
}),
|
|
5187
|
+
}), Ki = (e) => e > 0 ? Ni(e, {
|
|
5188
5188
|
secondsDecimalDigits: 2,
|
|
5189
5189
|
unitCount: 2
|
|
5190
|
-
}) : "N/A",
|
|
5190
|
+
}) : "N/A", Cs = ({
|
|
5191
5191
|
isAuthenticated: e,
|
|
5192
5192
|
extraClass: t
|
|
5193
5193
|
}) => y(
|
|
@@ -5196,7 +5196,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5196
5196
|
"flex-1 overflow-y-auto",
|
|
5197
5197
|
e ? "pt-0" : "pt-10",
|
|
5198
5198
|
t
|
|
5199
|
-
),
|
|
5199
|
+
), Os = ({
|
|
5200
5200
|
extraClass: e
|
|
5201
5201
|
} = {}) => y(
|
|
5202
5202
|
"flex flex-col",
|
|
@@ -5204,21 +5204,21 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5204
5204
|
"sm:px-5 px-2",
|
|
5205
5205
|
"transition-all ease-in-out duration-500",
|
|
5206
5206
|
e
|
|
5207
|
-
),
|
|
5207
|
+
), Gi = (e, t) => t === 1 ? e : `${e}s`, Bi = (e, t) => {
|
|
5208
5208
|
let r;
|
|
5209
5209
|
return (...s) => {
|
|
5210
5210
|
window.clearTimeout(r), r = window.setTimeout(() => e(...s), t);
|
|
5211
5211
|
};
|
|
5212
|
-
},
|
|
5213
|
-
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r =
|
|
5212
|
+
}, ks = () => !!window?.__VERSINI_DIGGIDY_TAURI__, Ns = () => window.innerWidth < 403, Ps = () => window.innerWidth >= 403 && window.innerWidth <= 1220, qi = () => {
|
|
5213
|
+
const e = ["iPhone Simulator", "iPhone"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), r = Ns(), s = navigator.maxTouchPoints > 1;
|
|
5214
5214
|
return e && t && r && s;
|
|
5215
|
-
},
|
|
5216
|
-
const e = ["iPad Simulator", "iPad"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t =
|
|
5215
|
+
}, Wi = () => {
|
|
5216
|
+
const e = ["iPad Simulator", "iPad"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = Ps(), r = navigator.maxTouchPoints > 1;
|
|
5217
5217
|
return e && t && r;
|
|
5218
|
-
},
|
|
5218
|
+
}, Vi = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, ji = (e) => {
|
|
5219
5219
|
const t = e.replace(/([A-Z])/g, " $1");
|
|
5220
5220
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
5221
|
-
},
|
|
5221
|
+
}, Qi = ({
|
|
5222
5222
|
autoClose: e = 3e3,
|
|
5223
5223
|
containerId: t,
|
|
5224
5224
|
position: r = "top-center",
|
|
@@ -5242,7 +5242,9 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5242
5242
|
theme: c,
|
|
5243
5243
|
transition: f,
|
|
5244
5244
|
icon: d
|
|
5245
|
-
}),
|
|
5245
|
+
}), Ji = (e, t) => t === "ready" && !!e && e.length > 0, Yi = (e) => {
|
|
5246
|
+
e ? document.documentElement.setAttribute(Sr, "true") : document.documentElement.removeAttribute(Sr);
|
|
5247
|
+
}, fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Rs, applyOledMode: Yi, canEvaluateModels: Ji, convertCamelCaseToReadable: ji, convertDDToDMS: Qt, convertLatitudeToDMS: Pi, convertLongitudeToDMS: $i, debounce: Bi, durationFormatter: Ki, extractAverage: Ui, getCurrentGeoLocation: xi, getLayoutPaddingClass: Os, getMessageContaintWrapperClass: Cs, isDev: jt, isLastMessageFromRole: Fi, isPWAMode: Vi, isProbablyMobile: Ns, isProbablyTablet: Ps, isProbablyiPad: Wi, isProbablyiPhone: qi, isProd: _s, isTauri: ks, numberFormatter: Hi, obfuscate: Mi, pluralize: Gi, renderDataAsList: Li, toastOptions: Qi, unObfuscate: Di }, Symbol.toStringTag, { value: "Module" })), Ir = "av-button", ft = "icon", Jt = "button", Lt = "link", zi = ({
|
|
5246
5248
|
type: e,
|
|
5247
5249
|
size: t,
|
|
5248
5250
|
labelRight: r,
|
|
@@ -5278,7 +5280,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5278
5280
|
"h-12": t === "large" && n && (r || s)
|
|
5279
5281
|
});
|
|
5280
5282
|
}
|
|
5281
|
-
},
|
|
5283
|
+
}, Xi = ({
|
|
5282
5284
|
type: e,
|
|
5283
5285
|
size: t,
|
|
5284
5286
|
labelRight: r,
|
|
@@ -5301,7 +5303,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5301
5303
|
[i]: t === "large" && (r || s)
|
|
5302
5304
|
});
|
|
5303
5305
|
}
|
|
5304
|
-
},
|
|
5306
|
+
}, Zi = ({
|
|
5305
5307
|
mode: e,
|
|
5306
5308
|
noBackground: t,
|
|
5307
5309
|
truncate: r,
|
|
@@ -5337,7 +5339,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5337
5339
|
return y("not-prose text-copy-lighter", {
|
|
5338
5340
|
truncate: r
|
|
5339
5341
|
});
|
|
5340
|
-
},
|
|
5342
|
+
}, eo = ({
|
|
5341
5343
|
mode: e,
|
|
5342
5344
|
noBackground: t,
|
|
5343
5345
|
variant: r
|
|
@@ -5367,13 +5369,13 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5367
5369
|
if (r === "selected")
|
|
5368
5370
|
return "bg-action-selected-dark";
|
|
5369
5371
|
}
|
|
5370
|
-
},
|
|
5372
|
+
}, to = ({
|
|
5371
5373
|
radius: e
|
|
5372
5374
|
}) => y({
|
|
5373
5375
|
"rounded-full": e === "large",
|
|
5374
5376
|
"rounded-md": e === "medium",
|
|
5375
5377
|
"rounded-xs": e === "small"
|
|
5376
|
-
}),
|
|
5378
|
+
}), ro = ({
|
|
5377
5379
|
mode: e,
|
|
5378
5380
|
disabled: t,
|
|
5379
5381
|
variant: r
|
|
@@ -5411,7 +5413,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5411
5413
|
});
|
|
5412
5414
|
if (r === "selected")
|
|
5413
5415
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
5414
|
-
},
|
|
5416
|
+
}, so = ({
|
|
5415
5417
|
mode: e,
|
|
5416
5418
|
disabled: t,
|
|
5417
5419
|
variant: r
|
|
@@ -5449,7 +5451,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5449
5451
|
});
|
|
5450
5452
|
if (r === "selected")
|
|
5451
5453
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
5452
|
-
},
|
|
5454
|
+
}, ao = ({
|
|
5453
5455
|
mode: e,
|
|
5454
5456
|
noBorder: t,
|
|
5455
5457
|
variant: r
|
|
@@ -5479,14 +5481,14 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5479
5481
|
});
|
|
5480
5482
|
if (r === "selected")
|
|
5481
5483
|
return "border border-border-selected-dark";
|
|
5482
|
-
},
|
|
5484
|
+
}, no = ({
|
|
5483
5485
|
focusMode: e
|
|
5484
5486
|
}) => y("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
5485
5487
|
"focus:outline-focus-dark": e === "dark",
|
|
5486
5488
|
"focus:outline-focus-light": e === "light",
|
|
5487
5489
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
5488
5490
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
5489
|
-
}),
|
|
5491
|
+
}), io = ({
|
|
5490
5492
|
mode: e,
|
|
5491
5493
|
raw: t,
|
|
5492
5494
|
iconClassName: r,
|
|
@@ -5513,11 +5515,11 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5513
5515
|
} : s === "selected" && (a = {
|
|
5514
5516
|
"text-copy-lighter": !0
|
|
5515
5517
|
}), y(a, r);
|
|
5516
|
-
},
|
|
5518
|
+
}, oo = ({
|
|
5517
5519
|
animated: e
|
|
5518
5520
|
}) => y({
|
|
5519
5521
|
"transition-opacity duration-300 ease-in-out": e
|
|
5520
|
-
}),
|
|
5522
|
+
}), $s = ({
|
|
5521
5523
|
type: e,
|
|
5522
5524
|
className: t,
|
|
5523
5525
|
raw: r,
|
|
@@ -5535,17 +5537,17 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5535
5537
|
align: p,
|
|
5536
5538
|
radius: g,
|
|
5537
5539
|
animated: b
|
|
5538
|
-
}) => (l || (l = "primary"), r ? y(
|
|
5539
|
-
|
|
5540
|
-
|
|
5540
|
+
}) => (l || (l = "primary"), r ? y(Ir, t) : y(
|
|
5541
|
+
Ir,
|
|
5542
|
+
Zi({
|
|
5541
5543
|
mode: s,
|
|
5542
5544
|
variant: l,
|
|
5543
5545
|
noBackground: u,
|
|
5544
5546
|
truncate: m
|
|
5545
5547
|
}),
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5548
|
+
eo({ mode: s, noBackground: u, variant: l }),
|
|
5549
|
+
to({ radius: g }),
|
|
5550
|
+
zi({
|
|
5549
5551
|
type: e,
|
|
5550
5552
|
size: o,
|
|
5551
5553
|
labelRight: f,
|
|
@@ -5553,11 +5555,11 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5553
5555
|
align: p,
|
|
5554
5556
|
animated: b
|
|
5555
5557
|
}),
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5558
|
+
Xi({ type: e, size: o, labelRight: f, labelLeft: d }),
|
|
5559
|
+
ao({ mode: s, variant: l, noBorder: c }),
|
|
5560
|
+
no({ focusMode: a }),
|
|
5561
|
+
ro({ mode: s, variant: l, disabled: n }),
|
|
5562
|
+
so({ mode: s, variant: l, disabled: n }),
|
|
5561
5563
|
{
|
|
5562
5564
|
"w-full": i,
|
|
5563
5565
|
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
@@ -5566,7 +5568,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5566
5568
|
"transition-[width] duration-300 ease-in": e === ft && b
|
|
5567
5569
|
}),
|
|
5568
5570
|
t
|
|
5569
|
-
)),
|
|
5571
|
+
)), co = (e, t, r) => {
|
|
5570
5572
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
5571
5573
|
}, Yt = oe.forwardRef((e, t) => {
|
|
5572
5574
|
const { onClick: r, noInternalClick: s = !1, ...a } = e;
|
|
@@ -5575,14 +5577,14 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5575
5577
|
{
|
|
5576
5578
|
ref: t,
|
|
5577
5579
|
onClick: (n) => {
|
|
5578
|
-
|
|
5580
|
+
co(n, s, r);
|
|
5579
5581
|
},
|
|
5580
5582
|
...a
|
|
5581
5583
|
}
|
|
5582
5584
|
);
|
|
5583
5585
|
});
|
|
5584
5586
|
Yt.displayName = "BaseButton";
|
|
5585
|
-
const
|
|
5587
|
+
const xs = oe.forwardRef(
|
|
5586
5588
|
({
|
|
5587
5589
|
children: e,
|
|
5588
5590
|
disabled: t = !1,
|
|
@@ -5598,7 +5600,7 @@ const $s = oe.forwardRef(
|
|
|
5598
5600
|
radius: u = "large",
|
|
5599
5601
|
...l
|
|
5600
5602
|
}, m) => {
|
|
5601
|
-
const p =
|
|
5603
|
+
const p = $s({
|
|
5602
5604
|
type: Jt,
|
|
5603
5605
|
mode: r,
|
|
5604
5606
|
focusMode: s,
|
|
@@ -5624,14 +5626,14 @@ const $s = oe.forwardRef(
|
|
|
5624
5626
|
);
|
|
5625
5627
|
}
|
|
5626
5628
|
);
|
|
5627
|
-
|
|
5628
|
-
function
|
|
5629
|
+
xs.displayName = "Button";
|
|
5630
|
+
function lo() {
|
|
5629
5631
|
const e = j(!1);
|
|
5630
5632
|
return W(() => (e.current = !0, () => {
|
|
5631
5633
|
e.current = !1;
|
|
5632
5634
|
}), []), X(() => e.current, []);
|
|
5633
5635
|
}
|
|
5634
|
-
function
|
|
5636
|
+
function Ms(e) {
|
|
5635
5637
|
return ze(() => e.every((t) => t == null) ? () => {
|
|
5636
5638
|
} : (t) => {
|
|
5637
5639
|
e.forEach((r) => {
|
|
@@ -5639,7 +5641,7 @@ function xs(e) {
|
|
|
5639
5641
|
});
|
|
5640
5642
|
}, [...e]);
|
|
5641
5643
|
}
|
|
5642
|
-
const
|
|
5644
|
+
const uo = {
|
|
5643
5645
|
x: 0,
|
|
5644
5646
|
y: 0,
|
|
5645
5647
|
width: 0,
|
|
@@ -5650,7 +5652,7 @@ const co = {
|
|
|
5650
5652
|
right: 0
|
|
5651
5653
|
};
|
|
5652
5654
|
function Je(e) {
|
|
5653
|
-
const t =
|
|
5655
|
+
const t = lo(), r = j(0), s = j(null), [a, n] = ie(uo), i = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
|
|
5654
5656
|
const c = o[0];
|
|
5655
5657
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
5656
5658
|
s.current && t() && n(c.contentRect);
|
|
@@ -5660,8 +5662,8 @@ function Je(e) {
|
|
|
5660
5662
|
i?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
5661
5663
|
}), [i, e]), [s, a];
|
|
5662
5664
|
}
|
|
5663
|
-
function
|
|
5664
|
-
const t =
|
|
5665
|
+
function Ds(e) {
|
|
5666
|
+
const t = Bs();
|
|
5665
5667
|
if (!e)
|
|
5666
5668
|
return t;
|
|
5667
5669
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -5678,14 +5680,14 @@ const Ve = {
|
|
|
5678
5680
|
// w-8
|
|
5679
5681
|
large: 48
|
|
5680
5682
|
// w-12
|
|
5681
|
-
},
|
|
5683
|
+
}, ho = {
|
|
5682
5684
|
small: 16,
|
|
5683
5685
|
// px-2 x 2
|
|
5684
5686
|
medium: 24,
|
|
5685
5687
|
// px-3 x 2
|
|
5686
5688
|
large: 32
|
|
5687
5689
|
// px-4 x 2
|
|
5688
|
-
},
|
|
5690
|
+
}, fo = 2, mo = 300, it = oe.forwardRef(
|
|
5689
5691
|
({
|
|
5690
5692
|
children: e,
|
|
5691
5693
|
disabled: t = !1,
|
|
@@ -5709,7 +5711,7 @@ const Ve = {
|
|
|
5709
5711
|
animated: A = !1,
|
|
5710
5712
|
...K
|
|
5711
5713
|
}, R) => {
|
|
5712
|
-
const z =
|
|
5714
|
+
const z = $s({
|
|
5713
5715
|
type: ft,
|
|
5714
5716
|
mode: r,
|
|
5715
5717
|
focusMode: s,
|
|
@@ -5726,15 +5728,15 @@ const Ve = {
|
|
|
5726
5728
|
radius: b,
|
|
5727
5729
|
variant: E,
|
|
5728
5730
|
animated: A
|
|
5729
|
-
}), C =
|
|
5731
|
+
}), C = io({ mode: r, raw: o, iconClassName: O, variant: E }), v = oo({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Je(), [N, J] = Je(), [ce, Se] = Je(), w = j(0), T = j(null), S = j(null), le = Ms([R, T]);
|
|
5730
5732
|
return Xe(() => {
|
|
5731
|
-
ce && ce.current && A && (w.current = Se.width +
|
|
5733
|
+
ce && ce.current && A && (w.current = Se.width + ho[u] + (c ? 0 : fo), T.current && !T.current.style.width && (T.current.style.width = `${Ve[u]}px`));
|
|
5732
5734
|
}, [Se, ce, u, c, A]), Xe(() => {
|
|
5733
5735
|
if (T && T.current && A) {
|
|
5734
5736
|
let ue = Ve[u];
|
|
5735
5737
|
l && _ && I.width > 0 ? ue = I.width + w.current : m && N && J.width > 0 && (ue = J.width + w.current), S.current && clearTimeout(S.current), ue !== parseInt(T.current.style.width || "0", 10) && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"), T.current.style.width = `${ue}px`, ue > Ve[u] && (S.current = setTimeout(() => {
|
|
5736
5738
|
_.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
|
|
5737
|
-
},
|
|
5739
|
+
}, mo * 0.8))), ue === Ve[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
|
|
5738
5740
|
}
|
|
5739
5741
|
}, [
|
|
5740
5742
|
I,
|
|
@@ -5758,7 +5760,7 @@ const Ve = {
|
|
|
5758
5760
|
...K,
|
|
5759
5761
|
children: /* @__PURE__ */ V("div", { className: x, children: [
|
|
5760
5762
|
/* @__PURE__ */ h(
|
|
5761
|
-
|
|
5763
|
+
_r,
|
|
5762
5764
|
{
|
|
5763
5765
|
label: m,
|
|
5764
5766
|
labelRef: N,
|
|
@@ -5769,7 +5771,7 @@ const Ve = {
|
|
|
5769
5771
|
),
|
|
5770
5772
|
/* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
|
|
5771
5773
|
/* @__PURE__ */ h(
|
|
5772
|
-
|
|
5774
|
+
_r,
|
|
5773
5775
|
{
|
|
5774
5776
|
label: l,
|
|
5775
5777
|
labelRef: _,
|
|
@@ -5782,7 +5784,7 @@ const Ve = {
|
|
|
5782
5784
|
}
|
|
5783
5785
|
);
|
|
5784
5786
|
}
|
|
5785
|
-
),
|
|
5787
|
+
), _r = ({
|
|
5786
5788
|
labelRef: e,
|
|
5787
5789
|
labelClass: t,
|
|
5788
5790
|
label: r,
|
|
@@ -5811,7 +5813,7 @@ try {
|
|
|
5811
5813
|
});
|
|
5812
5814
|
} catch {
|
|
5813
5815
|
}
|
|
5814
|
-
const
|
|
5816
|
+
const po = oe.forwardRef(
|
|
5815
5817
|
({
|
|
5816
5818
|
children: e,
|
|
5817
5819
|
mode: t = "system",
|
|
@@ -5851,8 +5853,8 @@ const fo = oe.forwardRef(
|
|
|
5851
5853
|
) });
|
|
5852
5854
|
}
|
|
5853
5855
|
);
|
|
5854
|
-
|
|
5855
|
-
const Ye = "av-card",
|
|
5856
|
+
po.displayName = "ButtonSort";
|
|
5857
|
+
const Ye = "av-card", yo = ({
|
|
5856
5858
|
className: e,
|
|
5857
5859
|
headerClassName: t,
|
|
5858
5860
|
bodyClassName: r,
|
|
@@ -5892,7 +5894,7 @@ const Ye = "av-card", mo = ({
|
|
|
5892
5894
|
footer: d
|
|
5893
5895
|
};
|
|
5894
5896
|
};
|
|
5895
|
-
function
|
|
5897
|
+
function go({
|
|
5896
5898
|
id: e,
|
|
5897
5899
|
content: t,
|
|
5898
5900
|
userAriaLabelledby: r,
|
|
@@ -5900,7 +5902,7 @@ function po({
|
|
|
5900
5902
|
}) {
|
|
5901
5903
|
return typeof t == "string" ? /* @__PURE__ */ h("h2", { id: e, className: s, children: t }) : r ? /* @__PURE__ */ h("div", { className: s, children: t }) : t ? /* @__PURE__ */ h("div", { className: s, id: e, children: t }) : null;
|
|
5902
5904
|
}
|
|
5903
|
-
const
|
|
5905
|
+
const bo = ({
|
|
5904
5906
|
header: e,
|
|
5905
5907
|
headerClassName: t,
|
|
5906
5908
|
footer: r,
|
|
@@ -5915,7 +5917,7 @@ const yo = ({
|
|
|
5915
5917
|
...u
|
|
5916
5918
|
}) => {
|
|
5917
5919
|
let l = null, m = null;
|
|
5918
|
-
const p = typeof e == "string", g =
|
|
5920
|
+
const p = typeof e == "string", g = Ds(Ye), b = yo({
|
|
5919
5921
|
className: n,
|
|
5920
5922
|
headerClassName: t,
|
|
5921
5923
|
bodyClassName: i,
|
|
@@ -5934,7 +5936,7 @@ const yo = ({
|
|
|
5934
5936
|
...u,
|
|
5935
5937
|
children: [
|
|
5936
5938
|
/* @__PURE__ */ h(
|
|
5937
|
-
|
|
5939
|
+
go,
|
|
5938
5940
|
{
|
|
5939
5941
|
...l && { id: l },
|
|
5940
5942
|
content: e,
|
|
@@ -6004,7 +6006,7 @@ try {
|
|
|
6004
6006
|
});
|
|
6005
6007
|
} catch {
|
|
6006
6008
|
}
|
|
6007
|
-
const
|
|
6009
|
+
const Eo = ({
|
|
6008
6010
|
className: e,
|
|
6009
6011
|
viewBox: t,
|
|
6010
6012
|
title: r,
|
|
@@ -6021,7 +6023,7 @@ const go = ({
|
|
|
6021
6023
|
...a,
|
|
6022
6024
|
children: /* @__PURE__ */ h("path", { d: "M927.943 30.81c0-2.381-1.191-5.954-3.573-7.145-7.146-4.763-19.055-1.19-26.2 0-17.864 2.382-34.537 4.764-53.592 4.764-26.2 0-53.591-1.19-79.791-4.764-23.819-3.572-44.064-10.718-69.074-3.572-35.727 9.527-58.355 38.109-57.164 75.028 1.191 21.436-2.382 38.109-9.527 57.164-7.146 17.864-15.482 20.245-32.155 20.245-115.52 0-229.848-1.19-345.367 0h-63.119c-29.773 0-59.546 5.955-89.319 0-21.436-4.763-42.873-15.482-58.355-30.964-3.573-3.572-10.718-14.29-14.29-14.29-4.765 1.19-4.765 15.481-4.765 19.054 0 15.482 5.955 30.964 5.955 46.446s-7.145 28.582-11.91 42.873c-4.763 16.673-4.763 33.346-2.381 50.019 4.764 27.39 9.527 55.973 11.91 84.555 2.381 25.01 2.381 48.828 4.763 73.837 2.382 20.246 3.573 29.773 29.773 33.346 30.964 4.764 30.964-5.955 38.11-26.2 9.527-25.01 17.863-51.21 27.39-76.22 8.337-19.054 15.482-60.736 67.883-40.49 28.582 10.718 58.355 16.672 88.128 25.009 32.155 8.336 65.5 16.673 97.655 22.627 65.501 13.1 132.193 20.246 200.075 23.819 7.146 0 11.91 0 16.673 5.954 17.864 22.628-3.573 63.119 41.682 70.265 40.491 5.954 40.491-22.628 45.255-47.637 2.382-14.291 4.764-27.391 8.337-40.492 1.19-5.954 5.954-11.909 10.718-15.481 55.973-33.346 88.128-98.847 78.6-164.347-1.19-10.719-4.763-21.437-3.572-33.346 2.382-23.819 32.155-33.346 50.018-42.873 22.628-13.1 47.637-25.01 66.692-42.873 13.1-11.91 23.818-27.392 29.773-44.064 3.573-5.955 5.955-14.292 4.764-20.246M737.395 190.395c-2.381 25.01-13.1 36.919-35.727 41.682-40.491 8.337-66.692-19.054-54.783-58.355 8.337-26.2 17.864-51.21 29.773-75.028 11.91-23.818 22.628-23.818 36.919-1.19 17.864 28.581 27.391 59.545 23.818 92.891m38.11-109.564c-7.146 0-13.1-5.955-13.1-13.1 0-7.146 5.954-13.1 13.1-13.1 7.145 0 13.1 5.954 13.1 13.1 0 7.145-5.955 13.1-13.1 13.1" })
|
|
6023
6025
|
}
|
|
6024
|
-
),
|
|
6026
|
+
), wo = ({
|
|
6025
6027
|
className: e,
|
|
6026
6028
|
viewBox: t,
|
|
6027
6029
|
title: r,
|
|
@@ -6047,7 +6049,7 @@ const go = ({
|
|
|
6047
6049
|
/* @__PURE__ */ h("path", { d: "M5.1 9.2C13.3-1.2 28.4-3.1 38.8 5.1l592 464c10.4 8.2 12.3 23.3 4.1 33.7s-23.3 12.3-33.7 4.1l-592-464C-1.2 34.7-3.1 19.6 5.1 9.2" })
|
|
6048
6050
|
]
|
|
6049
6051
|
}
|
|
6050
|
-
),
|
|
6052
|
+
), So = ({
|
|
6051
6053
|
className: e,
|
|
6052
6054
|
viewBox: t,
|
|
6053
6055
|
title: r,
|
|
@@ -6083,7 +6085,7 @@ const go = ({
|
|
|
6083
6085
|
]
|
|
6084
6086
|
}
|
|
6085
6087
|
);
|
|
6086
|
-
},
|
|
6088
|
+
}, vo = ({
|
|
6087
6089
|
className: e,
|
|
6088
6090
|
viewBox: t,
|
|
6089
6091
|
title: r,
|
|
@@ -6123,10 +6125,10 @@ try {
|
|
|
6123
6125
|
});
|
|
6124
6126
|
} catch {
|
|
6125
6127
|
}
|
|
6126
|
-
const
|
|
6128
|
+
const To = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createContext({
|
|
6127
6129
|
columnGap: 0,
|
|
6128
6130
|
rowGap: 0
|
|
6129
|
-
}),
|
|
6131
|
+
}), Ao = ({
|
|
6130
6132
|
children: e,
|
|
6131
6133
|
className: t,
|
|
6132
6134
|
columnGap: r = 1,
|
|
@@ -6152,7 +6154,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6152
6154
|
marginLeft: r * -1 * ot + "rem",
|
|
6153
6155
|
marginTop: s * -1 * ot + "rem"
|
|
6154
6156
|
}, u = y(
|
|
6155
|
-
|
|
6157
|
+
To,
|
|
6156
6158
|
"box-border flex flex-wrap"
|
|
6157
6159
|
), l = { columnGap: r, rowGap: s };
|
|
6158
6160
|
return t ? /* @__PURE__ */ h("div", { className: t, children: /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) }) }) : /* @__PURE__ */ h("div", { className: u, style: d, ...f, children: /* @__PURE__ */ h(Ut.Provider, { value: l, children: e }) });
|
|
@@ -6229,7 +6231,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6229
6231
|
"lg:basis-full": e === 12 && t === "lg",
|
|
6230
6232
|
"xl:basis-full": e === 12 && t === "xl",
|
|
6231
6233
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
6232
|
-
}),
|
|
6234
|
+
}), Io = ({
|
|
6233
6235
|
className: e,
|
|
6234
6236
|
span: t
|
|
6235
6237
|
}) => {
|
|
@@ -6261,7 +6263,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6261
6263
|
const { columnGap: a, rowGap: n } = ct(Ut), i = {
|
|
6262
6264
|
paddingLeft: a * ot + "rem",
|
|
6263
6265
|
paddingTop: n * ot + "rem"
|
|
6264
|
-
}, o =
|
|
6266
|
+
}, o = Io({
|
|
6265
6267
|
className: t,
|
|
6266
6268
|
span: r
|
|
6267
6269
|
});
|
|
@@ -6280,7 +6282,7 @@ try {
|
|
|
6280
6282
|
});
|
|
6281
6283
|
} catch {
|
|
6282
6284
|
}
|
|
6283
|
-
const
|
|
6285
|
+
const Ls = "SET_ANNOUNCEMENT", Us = "CLEAR_ANNOUNCEMENT", _o = {
|
|
6284
6286
|
alert: null,
|
|
6285
6287
|
alertdialog: null,
|
|
6286
6288
|
log: "polite",
|
|
@@ -6288,14 +6290,14 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6288
6290
|
progressbar: null,
|
|
6289
6291
|
status: "polite",
|
|
6290
6292
|
timer: "assertive"
|
|
6291
|
-
},
|
|
6293
|
+
}, Ro = (e, t) => {
|
|
6292
6294
|
switch (t?.type) {
|
|
6293
|
-
case
|
|
6295
|
+
case Ls:
|
|
6294
6296
|
return {
|
|
6295
6297
|
...e,
|
|
6296
6298
|
announcement: t.payload
|
|
6297
6299
|
};
|
|
6298
|
-
case
|
|
6300
|
+
case Us:
|
|
6299
6301
|
return {
|
|
6300
6302
|
...e,
|
|
6301
6303
|
announcement: null
|
|
@@ -6303,14 +6305,14 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6303
6305
|
default:
|
|
6304
6306
|
return e;
|
|
6305
6307
|
}
|
|
6306
|
-
},
|
|
6308
|
+
}, Co = ({
|
|
6307
6309
|
onAnnouncementClear: e,
|
|
6308
6310
|
dispatch: t
|
|
6309
6311
|
}) => {
|
|
6310
6312
|
t({
|
|
6311
|
-
type:
|
|
6313
|
+
type: Us
|
|
6312
6314
|
}), typeof e == "function" && e();
|
|
6313
|
-
},
|
|
6315
|
+
}, Rr = ({
|
|
6314
6316
|
children: e,
|
|
6315
6317
|
clearAnnouncementDelay: t,
|
|
6316
6318
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -6318,16 +6320,16 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6318
6320
|
dispatch: a
|
|
6319
6321
|
}) => {
|
|
6320
6322
|
clearTimeout(r.current), e !== null && a({
|
|
6321
|
-
type:
|
|
6323
|
+
type: Ls,
|
|
6322
6324
|
payload: e
|
|
6323
6325
|
}), t && (r.current = setTimeout(
|
|
6324
|
-
() =>
|
|
6326
|
+
() => Co({
|
|
6325
6327
|
onAnnouncementClear: s,
|
|
6326
6328
|
dispatch: a
|
|
6327
6329
|
}),
|
|
6328
6330
|
t
|
|
6329
6331
|
));
|
|
6330
|
-
},
|
|
6332
|
+
}, Oo = ({
|
|
6331
6333
|
children: e,
|
|
6332
6334
|
announcementTimeoutRef: t,
|
|
6333
6335
|
announcementDelay: r,
|
|
@@ -6336,13 +6338,13 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6336
6338
|
onAnnouncementClear: n,
|
|
6337
6339
|
dispatch: i
|
|
6338
6340
|
}) => {
|
|
6339
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
6341
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Rr, r, {
|
|
6340
6342
|
children: e,
|
|
6341
6343
|
clearAnnouncementDelay: s,
|
|
6342
6344
|
clearAnnouncementTimeoutRef: a,
|
|
6343
6345
|
onAnnouncementClear: n,
|
|
6344
6346
|
dispatch: i
|
|
6345
|
-
}) :
|
|
6347
|
+
}) : Rr({
|
|
6346
6348
|
children: e,
|
|
6347
6349
|
clearAnnouncementDelay: s,
|
|
6348
6350
|
clearAnnouncementTimeoutRef: a,
|
|
@@ -6350,7 +6352,7 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6350
6352
|
dispatch: i
|
|
6351
6353
|
});
|
|
6352
6354
|
};
|
|
6353
|
-
function
|
|
6355
|
+
function Fs({
|
|
6354
6356
|
children: e,
|
|
6355
6357
|
className: t,
|
|
6356
6358
|
politeness: r,
|
|
@@ -6361,12 +6363,12 @@ function Us({
|
|
|
6361
6363
|
visible: o,
|
|
6362
6364
|
...c
|
|
6363
6365
|
}) {
|
|
6364
|
-
const f = j(null), d = j(null), [u, l] =
|
|
6366
|
+
const f = j(null), d = j(null), [u, l] = Nr(Ro, {
|
|
6365
6367
|
announcement: null
|
|
6366
6368
|
});
|
|
6367
6369
|
let m = r;
|
|
6368
|
-
typeof m > "u" && (m = s ?
|
|
6369
|
-
|
|
6370
|
+
typeof m > "u" && (m = s ? _o[s] : "assertive"), W(() => {
|
|
6371
|
+
Oo({
|
|
6370
6372
|
announcementTimeoutRef: f,
|
|
6371
6373
|
announcementDelay: a,
|
|
6372
6374
|
children: e,
|
|
@@ -6408,21 +6410,21 @@ try {
|
|
|
6408
6410
|
});
|
|
6409
6411
|
} catch {
|
|
6410
6412
|
}
|
|
6411
|
-
const
|
|
6413
|
+
const Hs = "av-text-input", ko = "av-text-input-wrapper", Rt = "av-text-input-helper-text", No = ({
|
|
6412
6414
|
mode: e
|
|
6413
6415
|
}) => y({
|
|
6414
6416
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
6415
6417
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
6416
6418
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
6417
6419
|
"bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
|
|
6418
|
-
}),
|
|
6420
|
+
}), Po = ({
|
|
6419
6421
|
focusMode: e
|
|
6420
6422
|
}) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
6421
6423
|
"focus:outline-focus-dark": e === "dark",
|
|
6422
6424
|
"focus:outline-focus-light": e === "light",
|
|
6423
6425
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
6424
6426
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
6425
|
-
}),
|
|
6427
|
+
}), $o = ({
|
|
6426
6428
|
noBorder: e,
|
|
6427
6429
|
error: t
|
|
6428
6430
|
}) => y("border-2", {
|
|
@@ -6430,7 +6432,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6430
6432
|
"focus:border-border-dark": !e && t,
|
|
6431
6433
|
"border-border-error-dark": !e && t,
|
|
6432
6434
|
"border-transparent": e
|
|
6433
|
-
}),
|
|
6435
|
+
}), xo = ({
|
|
6434
6436
|
disabled: e,
|
|
6435
6437
|
raw: t,
|
|
6436
6438
|
error: r,
|
|
@@ -6454,7 +6456,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6454
6456
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": s === "system",
|
|
6455
6457
|
"text-copy-lighter dark:text-copy-error-dark": s === "alt-system"
|
|
6456
6458
|
});
|
|
6457
|
-
},
|
|
6459
|
+
}, Mo = ({
|
|
6458
6460
|
error: e,
|
|
6459
6461
|
raw: t,
|
|
6460
6462
|
mode: r,
|
|
@@ -6481,7 +6483,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6481
6483
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
6482
6484
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
6483
6485
|
});
|
|
6484
|
-
},
|
|
6486
|
+
}, Do = ({
|
|
6485
6487
|
className: e,
|
|
6486
6488
|
inputClassName: t,
|
|
6487
6489
|
raw: r,
|
|
@@ -6495,7 +6497,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6495
6497
|
}) => {
|
|
6496
6498
|
const d = r ? e : y(
|
|
6497
6499
|
"relative flex w-full flex-col justify-center",
|
|
6498
|
-
|
|
6500
|
+
ko,
|
|
6499
6501
|
e
|
|
6500
6502
|
);
|
|
6501
6503
|
let u = "";
|
|
@@ -6517,22 +6519,22 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6517
6519
|
break;
|
|
6518
6520
|
}
|
|
6519
6521
|
const l = r ? y(t) : y(
|
|
6520
|
-
|
|
6522
|
+
Hs,
|
|
6521
6523
|
u,
|
|
6522
6524
|
"rounded-md text-base px-4",
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6525
|
+
No({ mode: i }),
|
|
6526
|
+
Po({ focusMode: o }),
|
|
6527
|
+
$o({ noBorder: a, error: n }),
|
|
6526
6528
|
{
|
|
6527
6529
|
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
6528
6530
|
},
|
|
6529
6531
|
t
|
|
6530
|
-
), m = r ? void 0 : "sr-only", p =
|
|
6532
|
+
), m = r ? void 0 : "sr-only", p = xo({
|
|
6531
6533
|
disabled: s,
|
|
6532
6534
|
raw: r,
|
|
6533
6535
|
error: n,
|
|
6534
6536
|
mode: i
|
|
6535
|
-
}), g =
|
|
6537
|
+
}), g = Mo({
|
|
6536
6538
|
error: n,
|
|
6537
6539
|
raw: r,
|
|
6538
6540
|
mode: i,
|
|
@@ -6568,13 +6570,13 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6568
6570
|
size: E = "md",
|
|
6569
6571
|
...O
|
|
6570
6572
|
}, A) => {
|
|
6571
|
-
const [K, R] = Je(), [z, C] = ie(0), v =
|
|
6573
|
+
const [K, R] = Je(), [z, C] = ie(0), v = Ds({ id: e, prefix: `${Hs}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
|
|
6572
6574
|
xs: { label: "-25px", helperText: "30px" },
|
|
6573
6575
|
sm: { label: "-29px", helperText: "34px" },
|
|
6574
6576
|
md: { label: "-33px", helperText: "38px" },
|
|
6575
6577
|
lg: { label: "-15px", helperText: "22px" },
|
|
6576
6578
|
xl: { label: "-19px", helperText: "25px" }
|
|
6577
|
-
}, J =
|
|
6579
|
+
}, J = Do({
|
|
6578
6580
|
className: n,
|
|
6579
6581
|
inputClassName: i,
|
|
6580
6582
|
error: s,
|
|
@@ -6647,12 +6649,12 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6647
6649
|
children: g
|
|
6648
6650
|
}
|
|
6649
6651
|
),
|
|
6650
|
-
s && p && /* @__PURE__ */ h(
|
|
6652
|
+
s && p && /* @__PURE__ */ h(Fs, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
|
|
6651
6653
|
] });
|
|
6652
6654
|
}
|
|
6653
6655
|
);
|
|
6654
6656
|
zt.displayName = "TextInput";
|
|
6655
|
-
const
|
|
6657
|
+
const Lo = 500, Uo = 5e3, Fo = 2e4, Ks = oe.forwardRef(
|
|
6656
6658
|
({
|
|
6657
6659
|
name: e,
|
|
6658
6660
|
disabled: t,
|
|
@@ -6669,19 +6671,19 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6669
6671
|
const [l, m] = ie(!0), [p, g] = ie({
|
|
6670
6672
|
message: null,
|
|
6671
6673
|
politeness: null
|
|
6672
|
-
}), b = j(!0), E = j(null), O = j(null), A =
|
|
6674
|
+
}), b = j(!0), E = j(null), O = j(null), A = Ms([u, O]), K = l ? "Show" : "Hide", R = () => {
|
|
6673
6675
|
E.current && clearTimeout(E.current), b.current || (E.current = setTimeout(() => {
|
|
6674
6676
|
b.current = !0, m(!0), g({
|
|
6675
|
-
announcementTimeout:
|
|
6677
|
+
announcementTimeout: Uo,
|
|
6676
6678
|
politeness: "polite",
|
|
6677
6679
|
message: `${r} hiding characters`
|
|
6678
6680
|
}), a && a(!0);
|
|
6679
|
-
},
|
|
6681
|
+
}, Fo));
|
|
6680
6682
|
}, z = (I) => {
|
|
6681
6683
|
I.preventDefault();
|
|
6682
6684
|
const N = !b.current;
|
|
6683
6685
|
b.current = N, R(), m(N), g({
|
|
6684
|
-
announcementTimeout:
|
|
6686
|
+
announcementTimeout: Lo,
|
|
6685
6687
|
politeness: "assertive",
|
|
6686
6688
|
message: N ? "Characters hidden" : "Characters showing"
|
|
6687
6689
|
}), a && a(N);
|
|
@@ -6697,7 +6699,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6697
6699
|
};
|
|
6698
6700
|
return W(() => () => {
|
|
6699
6701
|
E.current && clearTimeout(E.current);
|
|
6700
|
-
}, []), /* @__PURE__ */ V(
|
|
6702
|
+
}, []), /* @__PURE__ */ V(kr, { children: [
|
|
6701
6703
|
/* @__PURE__ */ h(
|
|
6702
6704
|
zt,
|
|
6703
6705
|
{
|
|
@@ -6721,7 +6723,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6721
6723
|
}
|
|
6722
6724
|
),
|
|
6723
6725
|
/* @__PURE__ */ h(
|
|
6724
|
-
|
|
6726
|
+
Fs,
|
|
6725
6727
|
{
|
|
6726
6728
|
role: "status",
|
|
6727
6729
|
politeness: p.politeness,
|
|
@@ -6732,7 +6734,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6732
6734
|
] });
|
|
6733
6735
|
}
|
|
6734
6736
|
);
|
|
6735
|
-
|
|
6737
|
+
Ks.displayName = "TextInputMask";
|
|
6736
6738
|
/*!
|
|
6737
6739
|
@versini/ui-textinput v5.0.6
|
|
6738
6740
|
© 2025 gizmette.com
|
|
@@ -6746,9 +6748,9 @@ try {
|
|
|
6746
6748
|
});
|
|
6747
6749
|
} catch {
|
|
6748
6750
|
}
|
|
6749
|
-
const
|
|
6750
|
-
Press Enter to send it or Shift+Enter for new line.`,
|
|
6751
|
-
Press Ctrl+Enter to send it or Enter for new line.`,
|
|
6751
|
+
const Ho = "ASK! ME! ANYTHING!", Ko = "Log in with a password", Go = "Log in with a Passkey", ml = "Log out", Bo = "Password", pl = "Usage", yl = "Profile", gl = "Settings", bl = "Chat history", El = "About", Xt = "Type your message here.", wl = Xt, Sl = `${Xt}
|
|
6752
|
+
Press Enter to send it or Shift+Enter for new line.`, vl = `${Xt}
|
|
6753
|
+
Press Ctrl+Enter to send it or Enter for new line.`, Tl = "{{clipboard}}", P = "Review important details.", Al = [
|
|
6752
6754
|
`Sometimes, ${k} just makes stuff up. ${P}`,
|
|
6753
6755
|
`${k} may invent facts on the fly. ${P}`,
|
|
6754
6756
|
`${k} may be confidently wrong. ${P}`,
|
|
@@ -6769,17 +6771,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6769
6771
|
`Sometimes, ${k} howls at the moon. ${P}`,
|
|
6770
6772
|
`${k} may dig up imaginary bones. ${P}`,
|
|
6771
6773
|
`${k} may sniff out nonsense. ${P}`
|
|
6772
|
-
],
|
|
6774
|
+
], Il = "Prompts are pre-filled menus available on the main screen, to help you quickly start requests. If you select the 'Private Chat' checkbox, the corresponding chat will not be saved. If you select the 'Clipboard Access' checkbox, your clipboard content (if any) will be provided to the request.", _l = "Default provider set to", Rl = "Chat successfully deleted!", Cl = "Chat successfully saved!", Ol = "Caching enabled. Assets are now stored locally.", kl = "Caching disabled. Local asset cache cleared.", Nl = "av-sassy", Pl = {
|
|
6773
6775
|
0: ["January", "February", "March"],
|
|
6774
6776
|
3: ["April", "May", "June"],
|
|
6775
6777
|
6: ["July", "August", "September"],
|
|
6776
6778
|
9: ["October", "November", "December"]
|
|
6777
|
-
},
|
|
6779
|
+
}, $l = {
|
|
6778
6780
|
0: ["Jan", "Feb", "Mar"],
|
|
6779
6781
|
3: ["Apr", "May", "Jun"],
|
|
6780
6782
|
6: ["Jul", "Aug", "Sep"],
|
|
6781
6783
|
9: ["Oct", "Nov", "Dec"]
|
|
6782
|
-
},
|
|
6784
|
+
}, xl = {
|
|
6783
6785
|
PREFERENCES: {
|
|
6784
6786
|
TITLE: "User profile",
|
|
6785
6787
|
USERNAME: "Username",
|
|
@@ -6829,7 +6831,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6829
6831
|
SEND_ON_ENTER: "The following option allows you to choose whether you want to send a message when you press Enter or if you want to use Ctrl+Enter (Cmd+Enter on Mac). If you choose to send a message on Enter, you will need use Shift+Enter to insert a new line.",
|
|
6830
6832
|
USE_MEMORY: "The following option allows you to choose whether you want to enable memory for your chats. When enabled, Diggidy will remember your previous interactions and use them to provide more relevant responses."
|
|
6831
6833
|
}
|
|
6832
|
-
},
|
|
6834
|
+
}, qo = ({
|
|
6833
6835
|
className: e,
|
|
6834
6836
|
isCapabilitiesSuccess: t,
|
|
6835
6837
|
capabilities: r
|
|
@@ -6841,7 +6843,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6841
6843
|
"flex items-center justify-center text-slate-300"
|
|
6842
6844
|
),
|
|
6843
6845
|
children: [
|
|
6844
|
-
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(
|
|
6846
|
+
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(Eo, {}) }),
|
|
6845
6847
|
/* @__PURE__ */ V("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
6846
6848
|
/* @__PURE__ */ h("h1", { children: k }),
|
|
6847
6849
|
/* @__PURE__ */ h(
|
|
@@ -6850,14 +6852,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6850
6852
|
className: y({
|
|
6851
6853
|
"text-red-500": t && r?.runningMode === "development"
|
|
6852
6854
|
}),
|
|
6853
|
-
children:
|
|
6855
|
+
children: Ho
|
|
6854
6856
|
}
|
|
6855
6857
|
)
|
|
6856
6858
|
] })
|
|
6857
6859
|
]
|
|
6858
6860
|
}
|
|
6859
|
-
),
|
|
6860
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
6861
|
+
), Wo = () => {
|
|
6862
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = ls(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
|
|
6861
6863
|
username: "",
|
|
6862
6864
|
password: ""
|
|
6863
6865
|
}), u = async (l) => {
|
|
@@ -6869,17 +6871,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6869
6871
|
}, 500);
|
|
6870
6872
|
}), W(() => {
|
|
6871
6873
|
t && i(t);
|
|
6872
|
-
}, [t]), /* @__PURE__ */ V("main", { className:
|
|
6874
|
+
}, [t]), /* @__PURE__ */ V("main", { className: Os({ extraClass: "mt-5" }), children: [
|
|
6873
6875
|
/* @__PURE__ */ h(
|
|
6874
6876
|
"div",
|
|
6875
6877
|
{
|
|
6876
|
-
className:
|
|
6878
|
+
className: Cs({
|
|
6877
6879
|
extraClass: "rounded-md pb-10"
|
|
6878
6880
|
}),
|
|
6879
|
-
children: /* @__PURE__ */ h(
|
|
6881
|
+
children: /* @__PURE__ */ h(qo, {})
|
|
6880
6882
|
}
|
|
6881
6883
|
),
|
|
6882
|
-
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(
|
|
6884
|
+
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Ao, { alignHorizontal: "center", children: /* @__PURE__ */ h(ye, { span: 6, children: /* @__PURE__ */ V(bo, { mode: "dark", children: [
|
|
6883
6885
|
/* @__PURE__ */ h(ye, { span: 12, className: "mt-7", children: n && /* @__PURE__ */ h("div", { className: "p-2 text-sm text-center text-copy-error-light bg-surface-darker", children: n }) }),
|
|
6884
6886
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6885
6887
|
zt,
|
|
@@ -6903,7 +6905,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6903
6905
|
}
|
|
6904
6906
|
) }),
|
|
6905
6907
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6906
|
-
|
|
6908
|
+
Ks,
|
|
6907
6909
|
{
|
|
6908
6910
|
className: "mt-7",
|
|
6909
6911
|
required: !0,
|
|
@@ -6913,14 +6915,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6913
6915
|
mode: "dark",
|
|
6914
6916
|
focusMode: "light",
|
|
6915
6917
|
name: "password",
|
|
6916
|
-
label:
|
|
6918
|
+
label: Bo,
|
|
6917
6919
|
rightElement: /* @__PURE__ */ h(
|
|
6918
6920
|
it,
|
|
6919
6921
|
{
|
|
6920
6922
|
focusMode: "light",
|
|
6921
6923
|
mode: "dark",
|
|
6922
6924
|
label: o ? "Show" : "Hide",
|
|
6923
|
-
children: o ? /* @__PURE__ */ h(
|
|
6925
|
+
children: o ? /* @__PURE__ */ h(vo, {}) : /* @__PURE__ */ h(wo, {})
|
|
6924
6926
|
}
|
|
6925
6927
|
),
|
|
6926
6928
|
onMaskChange: c,
|
|
@@ -6935,7 +6937,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6935
6937
|
}
|
|
6936
6938
|
) }),
|
|
6937
6939
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6938
|
-
|
|
6940
|
+
xs,
|
|
6939
6941
|
{
|
|
6940
6942
|
mode: "dark",
|
|
6941
6943
|
focusMode: "light",
|
|
@@ -6943,10 +6945,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6943
6945
|
noBorder: !0,
|
|
6944
6946
|
type: "submit",
|
|
6945
6947
|
className: "mt-7",
|
|
6946
|
-
children:
|
|
6948
|
+
children: Ko
|
|
6947
6949
|
}
|
|
6948
6950
|
) }),
|
|
6949
|
-
!
|
|
6951
|
+
!ks() && /* @__PURE__ */ V(kr, { children: [
|
|
6950
6952
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
6951
6953
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6952
6954
|
it,
|
|
@@ -6956,49 +6958,49 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6956
6958
|
focusMode: "light",
|
|
6957
6959
|
fullWidth: !0,
|
|
6958
6960
|
className: "mb-4",
|
|
6959
|
-
labelRight:
|
|
6961
|
+
labelRight: Go,
|
|
6960
6962
|
onClick: r,
|
|
6961
|
-
children: /* @__PURE__ */ h(
|
|
6963
|
+
children: /* @__PURE__ */ h(So, { size: "size-7" })
|
|
6962
6964
|
}
|
|
6963
6965
|
) })
|
|
6964
6966
|
] })
|
|
6965
6967
|
] }) }) }) })
|
|
6966
6968
|
] });
|
|
6967
|
-
},
|
|
6969
|
+
}, Vo = new URL(document.location.href).searchParams, Cr = !!Vo.get("debug") || !1, jo = Ws(() => import(
|
|
6968
6970
|
/* webpackChunkName: "LazyApp" */
|
|
6969
|
-
"./App.
|
|
6970
|
-
).then((e) => e.App)),
|
|
6971
|
+
"./App.Ck78giBC.js"
|
|
6972
|
+
).then((e) => e.App)), Qo = new ma(), Or = ({
|
|
6971
6973
|
isComponent: e,
|
|
6972
6974
|
headerHeight: t
|
|
6973
6975
|
}) => {
|
|
6974
|
-
const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } =
|
|
6975
|
-
return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(
|
|
6976
|
-
|
|
6976
|
+
const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = ls();
|
|
6977
|
+
return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(qs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(pa, { client: Qo, children: /* @__PURE__ */ h(
|
|
6978
|
+
Ti,
|
|
6977
6979
|
{
|
|
6978
6980
|
user: a?.username,
|
|
6979
6981
|
getAccessToken: n,
|
|
6980
|
-
children: /* @__PURE__ */ h(
|
|
6982
|
+
children: /* @__PURE__ */ h(jo, { isComponent: e, headerHeight: t })
|
|
6981
6983
|
}
|
|
6982
|
-
) }) }) : /* @__PURE__ */ h(
|
|
6983
|
-
},
|
|
6984
|
+
) }) }) : /* @__PURE__ */ h(Wo, {});
|
|
6985
|
+
}, Jo = ({
|
|
6984
6986
|
isComponent: e = !1,
|
|
6985
6987
|
headerHeight: t = 0,
|
|
6986
|
-
domain: r =
|
|
6988
|
+
domain: r = Rs
|
|
6987
6989
|
}) => (W(() => {
|
|
6988
|
-
e ||
|
|
6990
|
+
e || hs().catch((s) => {
|
|
6989
6991
|
console.error("[SW] Failed to register service worker:", s);
|
|
6990
6992
|
});
|
|
6991
6993
|
}, [e]), jt ? /* @__PURE__ */ h(
|
|
6992
6994
|
wr,
|
|
6993
6995
|
{
|
|
6994
|
-
clientId:
|
|
6996
|
+
clientId: vr,
|
|
6995
6997
|
domain: r,
|
|
6996
|
-
debug:
|
|
6998
|
+
debug: Cr,
|
|
6997
6999
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
6998
|
-
children: /* @__PURE__ */ h(
|
|
7000
|
+
children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t })
|
|
6999
7001
|
}
|
|
7000
|
-
) : /* @__PURE__ */ h(wr, { clientId:
|
|
7001
|
-
|
|
7002
|
+
) : /* @__PURE__ */ h(wr, { clientId: vr, domain: r, debug: Cr, children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t }) })), Ml = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
|
|
7003
|
+
Jo,
|
|
7002
7004
|
{
|
|
7003
7005
|
isComponent: !0,
|
|
7004
7006
|
domain: e,
|
|
@@ -7006,133 +7008,133 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
7006
7008
|
}
|
|
7007
7009
|
);
|
|
7008
7010
|
export {
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
gl as HISTORY_TITLE,
|
|
7011
|
+
El as ABOUT_TITLE,
|
|
7012
|
+
dc as ACTION_RESET_PROMPT,
|
|
7013
|
+
cc as ACTION_SEARCH,
|
|
7014
|
+
lc as ACTION_SORT,
|
|
7015
|
+
uc as ACTION_TOGGLE_PROMPT,
|
|
7016
|
+
Nl as APP_CLASSNAME,
|
|
7017
|
+
Kc as B,
|
|
7018
|
+
xs as C,
|
|
7019
|
+
xl as CARDS,
|
|
7020
|
+
Tl as CLIPBOARD_PROMPT,
|
|
7021
|
+
Rc as DEFAULT_ICON_ACTION_SIZE,
|
|
7022
|
+
Fc as E,
|
|
7023
|
+
oc as ERROR_MESSAGE,
|
|
7024
|
+
Yc as Et,
|
|
7025
|
+
Al as FOOTER_DISCLAIMERS,
|
|
7026
|
+
bi as H,
|
|
7027
|
+
bl as HISTORY_TITLE,
|
|
7027
7028
|
mt as I,
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7029
|
+
Ac as INFINITE_SCROLL_LIMIT,
|
|
7030
|
+
Tc as INFINITE_SCROLL_THRESHOLD,
|
|
7031
|
+
Pc as INPUT_BOTTOM_OFFSET,
|
|
7032
|
+
Mc as INPUT_BOTTOM_OFFSET_EXTRA,
|
|
7033
|
+
xc as INPUT_BOTTOM_OFFSET_IPAD,
|
|
7034
|
+
$c as INPUT_BOTTOM_OFFSET_IPHONE,
|
|
7035
|
+
vl as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
|
|
7036
|
+
Sl as INPUT_PLACEHOLDER_TEXT_ENTER,
|
|
7037
|
+
wl as INPUT_PLACEHOLDER_TEXT_MOBILE,
|
|
7038
|
+
Wc as J,
|
|
7039
|
+
Bc as K,
|
|
7040
|
+
Ao as L,
|
|
7041
|
+
Sc as LOCAL_STORAGE_CHAT_ID,
|
|
7042
|
+
bc as LOCAL_STORAGE_FAVORITES_ONLY,
|
|
7043
|
+
vc as LOCAL_STORAGE_OLED_MODE,
|
|
7044
|
+
us as LOCAL_STORAGE_PREFIX,
|
|
7045
|
+
Ec as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
7046
|
+
wc as LOCAL_STORAGE_REASONING_DISCLOSURE,
|
|
7047
|
+
hc as LOCAL_STORAGE_SEARCH,
|
|
7048
|
+
fc as LOCAL_STORAGE_SORT,
|
|
7049
|
+
gc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
|
|
7050
|
+
yc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
|
|
7051
|
+
mc as LOCAL_STORAGE_SORT_TIMESTAMP,
|
|
7052
|
+
pc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
|
|
7053
|
+
ml as LOG_OUT,
|
|
7054
|
+
qo as Logo,
|
|
7054
7055
|
dt as O,
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7056
|
+
yl as PROFILE_TITLE,
|
|
7057
|
+
Il as PROMPTS_DESCRIPTION,
|
|
7058
|
+
Ic as PROMPT_CLASSNAME,
|
|
7059
|
+
_c as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
7059
7060
|
k as Q,
|
|
7060
|
-
|
|
7061
|
+
bo as S,
|
|
7061
7062
|
B as SERVICE_TYPES,
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7063
|
+
gl as SETTINGS_TITLE,
|
|
7064
|
+
Ml as SassySaint,
|
|
7065
|
+
kl as TOAST_CACHE_DISABLED,
|
|
7066
|
+
Ol as TOAST_CACHE_ENABLED,
|
|
7067
|
+
Rl as TOAST_CHAT_DELETED,
|
|
7068
|
+
Cl as TOAST_CHAT_SAVED,
|
|
7069
|
+
_l as TOAST_PROVIDER_CHANGED,
|
|
7070
|
+
Pl as TRIMESTERS,
|
|
7071
|
+
$l as TRIMESTERS_SHORT,
|
|
7072
|
+
Oc as UI_BUTTON_SCROLL_BUFFER,
|
|
7073
|
+
kc as UI_DEFAULT_MAIN_HEIGHT,
|
|
7074
|
+
Nc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
|
|
7075
|
+
Cc as UI_FOOTER_BUFFER,
|
|
7076
|
+
pl as USAGE_TITLE,
|
|
7077
|
+
Hc as Y,
|
|
7077
7078
|
zt as Y$1,
|
|
7078
|
-
|
|
7079
|
-
|
|
7079
|
+
qc as Z,
|
|
7080
|
+
Yi as applyOledMode,
|
|
7081
|
+
po as b,
|
|
7080
7082
|
ht as c,
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7083
|
+
Ji as canEvaluateModels,
|
|
7084
|
+
ji as convertCamelCaseToReadable,
|
|
7085
|
+
Bi as debounce,
|
|
7086
|
+
Uc as e,
|
|
7087
|
+
Jc as et,
|
|
7088
|
+
Lc as getCacheInfo,
|
|
7089
|
+
xi as getCurrentGeoLocation,
|
|
7090
|
+
Os as getLayoutPaddingClass,
|
|
7091
|
+
Cs as getMessageContaintWrapperClass,
|
|
7090
7092
|
me as graphQLRequest,
|
|
7091
7093
|
Je as h,
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
+
Dc as handleServiceWorkerToggle,
|
|
7095
|
+
Ds as i,
|
|
7094
7096
|
jt as isDev,
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7097
|
+
Vi as isPWAMode,
|
|
7098
|
+
Ns as isProbablyMobile,
|
|
7099
|
+
Wi as isProbablyiPad,
|
|
7100
|
+
qi as isProbablyiPhone,
|
|
7099
7101
|
Dt as isServiceWorkerEnabled,
|
|
7100
|
-
|
|
7102
|
+
ks as isTauri,
|
|
7101
7103
|
xe as it,
|
|
7102
7104
|
ye as j,
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7105
|
+
So as l,
|
|
7106
|
+
ls as n,
|
|
7107
|
+
Vc as nt,
|
|
7108
|
+
Hi as numberFormatter,
|
|
7109
|
+
Ms as o,
|
|
7110
|
+
Mi as obfuscate,
|
|
7111
|
+
jc as ot,
|
|
7112
|
+
Gi as pluralize,
|
|
7111
7113
|
He as r,
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7114
|
+
Li as renderDataAsList,
|
|
7115
|
+
Si as serverUrl,
|
|
7116
|
+
zc as setNewProvider,
|
|
7117
|
+
Xc as setUserPlan,
|
|
7118
|
+
Qc as st,
|
|
7117
7119
|
it as te,
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7120
|
+
Di as unObfuscate,
|
|
7121
|
+
el as useChangelogs,
|
|
7122
|
+
sl as useChat,
|
|
7123
|
+
rl as useChatsHistory,
|
|
7124
|
+
ol as useChatsUsage,
|
|
7125
|
+
dl as useDeleteAllMemories,
|
|
7126
|
+
nl as useDeleteChat,
|
|
7127
|
+
ul as useDeleteMemory,
|
|
7128
|
+
hl as useEntitlements,
|
|
7127
7129
|
he as useQueryClient,
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7130
|
+
al as useSaveChat,
|
|
7131
|
+
Zc as useServerCapabilities,
|
|
7132
|
+
il as useToggleFavoriteChat,
|
|
7133
|
+
ll as useUpdateMemory,
|
|
7134
|
+
tl as useUserChatStats,
|
|
7135
|
+
cl as useUserMemories,
|
|
7136
|
+
vi as useUserPreferences,
|
|
7137
|
+
fl as utilities,
|
|
7138
|
+
Gc as x,
|
|
7139
|
+
Fs as x$1
|
|
7138
7140
|
};
|