@versini/sassysaint 8.72.3 → 8.73.1
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.BaVovIwT.js → AboutChangelog.2b2DI_SN.js} +2 -2
- package/dist/chunks/{AboutEntry.BexEe72F.js → AboutEntry.BHq7KBa1.js} +5 -5
- package/dist/chunks/{App.HJ8OjcNd.js → App.DcQF9Hq9.js} +2328 -2293
- package/dist/chunks/{Chart.DHj_C5CU.js → Chart.DAdepX81.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.C2NxhySP.js → ChatBubbleAssistant.BF3Bj7JJ.js} +17 -17
- package/dist/chunks/{ChatBubbleUser.urjT1Sdg.js → ChatBubbleUser.B5uyfOKG.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.DSGJqIoP.js → ChatHistoryTable.BwjPu3FF.js} +8 -8
- package/dist/chunks/{HistoryEntry.PDsk0uAb.js → HistoryEntry.Cj5Hwpkx.js} +16 -15
- package/dist/chunks/{ProfileEntry.kywCcS_E.js → ProfileEntry.Ce801i2m.js} +21 -21
- package/dist/chunks/{SettingsEntry.CB_MJ5IS.js → SettingsEntry.fNHoX42W.js} +90 -83
- package/dist/chunks/{Table.DYvNevNY.js → Table.J1RcsDNn.js} +2 -2
- package/dist/chunks/{UsageEntry.DI19bWph.js → UsageEntry.k-Ljpdg9.js} +3 -3
- package/dist/chunks/{UserMemoriesPanel.5_VruK6N.js → UserMemoriesPanel.C0BI-Pbv.js} +4 -4
- package/dist/chunks/{index.KH6o-K7D.js → index.BqnKf1sr.js} +1 -1
- package/dist/chunks/{index.DfkAbrhT.js → index.C_OZL-ky.js} +1 -1
- package/dist/chunks/{index.3GGd3G3_.js → index.CauWbyr8.js} +3 -3
- package/dist/chunks/{index.3mZhoz3R.js → index.CmXD-yP7.js} +13 -13
- package/dist/chunks/{index.DjfdeQTy.js → index.FbsVqChk.js} +1 -1
- package/dist/chunks/{index.DPdhQccX.js → index.RnO-M1tm.js} +2 -2
- package/dist/chunks/{index.eneNSOKh.js → index.nSgn5ZFo.js} +1 -1
- package/dist/chunks/{index.1AQ-LDj6.js → index.uzB9FupG.js} +653 -648
- package/dist/chunks/{useMarkdown.C4_PqYi7.js → useMarkdown.rLeRHXfb.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,20 +2001,22 @@ 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 {
|
|
2008
2008
|
static code = "ERR_JOSE_NOT_SUPPORTED";
|
|
2009
2009
|
code = "ERR_JOSE_NOT_SUPPORTED";
|
|
2010
|
-
}
|
|
2010
|
+
};
|
|
2011
|
+
class L extends we {
|
|
2011
2012
|
static code = "ERR_JWS_INVALID";
|
|
2012
2013
|
code = "ERR_JWS_INVALID";
|
|
2013
|
-
}
|
|
2014
|
+
}
|
|
2015
|
+
let se = class extends we {
|
|
2014
2016
|
static code = "ERR_JWT_INVALID";
|
|
2015
2017
|
code = "ERR_JWT_INVALID";
|
|
2016
2018
|
};
|
|
2017
|
-
class
|
|
2019
|
+
class Na extends we {
|
|
2018
2020
|
static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2019
2021
|
code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2020
2022
|
constructor(t = "signature verification failed", r) {
|
|
@@ -2030,7 +2032,7 @@ function Te(e, t) {
|
|
|
2030
2032
|
function pt(e) {
|
|
2031
2033
|
return parseInt(e.name.slice(4), 10);
|
|
2032
2034
|
}
|
|
2033
|
-
function
|
|
2035
|
+
function Pa(e) {
|
|
2034
2036
|
switch (e) {
|
|
2035
2037
|
case "ES256":
|
|
2036
2038
|
return "P-256";
|
|
@@ -2042,11 +2044,11 @@ function Na(e) {
|
|
|
2042
2044
|
throw new Error("unreachable");
|
|
2043
2045
|
}
|
|
2044
2046
|
}
|
|
2045
|
-
function
|
|
2047
|
+
function $a(e, t) {
|
|
2046
2048
|
if (!e.usages.includes(t))
|
|
2047
2049
|
throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`);
|
|
2048
2050
|
}
|
|
2049
|
-
function
|
|
2051
|
+
function xa(e, t, r) {
|
|
2050
2052
|
switch (t) {
|
|
2051
2053
|
case "HS256":
|
|
2052
2054
|
case "HS384":
|
|
@@ -2096,7 +2098,7 @@ function $a(e, t, r) {
|
|
|
2096
2098
|
case "ES512": {
|
|
2097
2099
|
if (!Te(e.algorithm, "ECDSA"))
|
|
2098
2100
|
throw ee("ECDSA");
|
|
2099
|
-
const s =
|
|
2101
|
+
const s = Pa(t);
|
|
2100
2102
|
if (e.algorithm.namedCurve !== s)
|
|
2101
2103
|
throw ee(s, "algorithm.namedCurve");
|
|
2102
2104
|
break;
|
|
@@ -2104,26 +2106,26 @@ function $a(e, t, r) {
|
|
|
2104
2106
|
default:
|
|
2105
2107
|
throw new TypeError("CryptoKey does not support this operation");
|
|
2106
2108
|
}
|
|
2107
|
-
|
|
2109
|
+
$a(e, r);
|
|
2108
2110
|
}
|
|
2109
|
-
function
|
|
2111
|
+
function Br(e, t, ...r) {
|
|
2110
2112
|
if (r = r.filter(Boolean), r.length > 2) {
|
|
2111
2113
|
const s = r.pop();
|
|
2112
2114
|
e += `one of type ${r.join(", ")}, or ${s}.`;
|
|
2113
2115
|
} else r.length === 2 ? e += `one of type ${r[0]} or ${r[1]}.` : e += `of type ${r[0]}.`;
|
|
2114
2116
|
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
2117
|
}
|
|
2116
|
-
const
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2118
|
+
const Ma = (e, ...t) => Br("Key must be ", e, ...t);
|
|
2119
|
+
function qr(e, t, ...r) {
|
|
2120
|
+
return Br(`Key for the ${e} algorithm must be `, t, ...r);
|
|
2119
2121
|
}
|
|
2120
|
-
function
|
|
2122
|
+
function Wr(e) {
|
|
2121
2123
|
return e?.[Symbol.toStringTag] === "CryptoKey";
|
|
2122
2124
|
}
|
|
2123
|
-
function
|
|
2125
|
+
function Vr(e) {
|
|
2124
2126
|
return e?.[Symbol.toStringTag] === "KeyObject";
|
|
2125
2127
|
}
|
|
2126
|
-
const
|
|
2128
|
+
const jr = (e) => Wr(e) || Vr(e), Da = (...e) => {
|
|
2127
2129
|
const t = e.filter(Boolean);
|
|
2128
2130
|
if (t.length === 0 || t.length === 1)
|
|
2129
2131
|
return !0;
|
|
@@ -2142,11 +2144,11 @@ const Vr = (e) => qr(e) || Wr(e), Ma = (...e) => {
|
|
|
2142
2144
|
}
|
|
2143
2145
|
return !0;
|
|
2144
2146
|
};
|
|
2145
|
-
function
|
|
2147
|
+
function La(e) {
|
|
2146
2148
|
return typeof e == "object" && e !== null;
|
|
2147
2149
|
}
|
|
2148
2150
|
const Le = (e) => {
|
|
2149
|
-
if (!
|
|
2151
|
+
if (!La(e) || Object.prototype.toString.call(e) !== "[object Object]")
|
|
2150
2152
|
return !1;
|
|
2151
2153
|
if (Object.getPrototypeOf(e) === null)
|
|
2152
2154
|
return !0;
|
|
@@ -2154,7 +2156,7 @@ const Le = (e) => {
|
|
|
2154
2156
|
for (; Object.getPrototypeOf(t) !== null; )
|
|
2155
2157
|
t = Object.getPrototypeOf(t);
|
|
2156
2158
|
return Object.getPrototypeOf(e) === t;
|
|
2157
|
-
},
|
|
2159
|
+
}, Ua = (e, t) => {
|
|
2158
2160
|
if (e.startsWith("RS") || e.startsWith("PS")) {
|
|
2159
2161
|
const { modulusLength: r } = t.algorithm;
|
|
2160
2162
|
if (typeof r != "number" || r < 2048)
|
|
@@ -2167,7 +2169,7 @@ const Le = (e) => {
|
|
|
2167
2169
|
if (e[r] !== t[r])
|
|
2168
2170
|
return !1;
|
|
2169
2171
|
return !0;
|
|
2170
|
-
},
|
|
2172
|
+
}, Fa = (e) => ({ data: e, pos: 0 }), rt = (e) => {
|
|
2171
2173
|
const t = e.data[e.pos++];
|
|
2172
2174
|
if (t & 128) {
|
|
2173
2175
|
const r = t & 127;
|
|
@@ -2180,27 +2182,27 @@ const Le = (e) => {
|
|
|
2180
2182
|
}, st = (e, t, r) => {
|
|
2181
2183
|
if (e.data[e.pos++] !== t)
|
|
2182
2184
|
throw new Error(r);
|
|
2183
|
-
},
|
|
2185
|
+
}, Qr = (e, t) => {
|
|
2184
2186
|
const r = e.data.subarray(e.pos, e.pos + t);
|
|
2185
2187
|
return e.pos += t, r;
|
|
2186
|
-
},
|
|
2188
|
+
}, Ha = (e) => {
|
|
2187
2189
|
st(e, 6, "Expected algorithm OID");
|
|
2188
2190
|
const t = rt(e);
|
|
2189
|
-
return
|
|
2191
|
+
return Qr(e, t);
|
|
2190
2192
|
};
|
|
2191
|
-
function
|
|
2193
|
+
function Ka(e) {
|
|
2192
2194
|
st(e, 48, "Invalid SPKI structure"), rt(e), st(e, 48, "Expected algorithm identifier");
|
|
2193
2195
|
const t = rt(e);
|
|
2194
2196
|
return { algIdStart: e.pos, algIdLength: t };
|
|
2195
2197
|
}
|
|
2196
|
-
const
|
|
2197
|
-
const t =
|
|
2198
|
+
const Ga = (e) => {
|
|
2199
|
+
const t = Ha(e);
|
|
2198
2200
|
if (yt(t, [43, 101, 110]))
|
|
2199
2201
|
return "X25519";
|
|
2200
2202
|
if (!yt(t, [42, 134, 72, 206, 61, 2, 1]))
|
|
2201
2203
|
throw new Error("Unsupported key algorithm");
|
|
2202
2204
|
st(e, 6, "Expected curve OID");
|
|
2203
|
-
const r = rt(e), s =
|
|
2205
|
+
const r = rt(e), s = Qr(e, r);
|
|
2204
2206
|
for (const { name: a, oid: n } of [
|
|
2205
2207
|
{ name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
|
|
2206
2208
|
{ name: "P-384", oid: [43, 129, 4, 0, 34] },
|
|
@@ -2209,7 +2211,7 @@ const Ka = (e) => {
|
|
|
2209
2211
|
if (yt(s, n))
|
|
2210
2212
|
return a;
|
|
2211
2213
|
throw new Error("Unsupported named curve");
|
|
2212
|
-
},
|
|
2214
|
+
}, Ba = async (e, t, r, s) => {
|
|
2213
2215
|
let a, n;
|
|
2214
2216
|
const i = () => ["verify"], o = () => ["encrypt", "wrapKey"];
|
|
2215
2217
|
switch (r) {
|
|
@@ -2264,15 +2266,15 @@ const Ka = (e) => {
|
|
|
2264
2266
|
throw new ne('Invalid or unsupported "alg" (Algorithm) value');
|
|
2265
2267
|
}
|
|
2266
2268
|
return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
|
|
2267
|
-
},
|
|
2268
|
-
const s =
|
|
2269
|
+
}, qa = (e, t) => Gr(e.replace(t, "")), Wa = (e, t, r) => {
|
|
2270
|
+
const s = qa(e, /(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g);
|
|
2269
2271
|
let a = r;
|
|
2270
2272
|
return t?.startsWith?.("ECDH-ES") && (a ||= {}, a.getNamedCurve = (n) => {
|
|
2271
|
-
const i =
|
|
2272
|
-
return
|
|
2273
|
-
}),
|
|
2273
|
+
const i = Fa(n);
|
|
2274
|
+
return Ka(i), Ga(i);
|
|
2275
|
+
}), Ba("spki", s, t, a);
|
|
2274
2276
|
};
|
|
2275
|
-
function
|
|
2277
|
+
function Va(e) {
|
|
2276
2278
|
let t, r;
|
|
2277
2279
|
switch (e.kty) {
|
|
2278
2280
|
case "AKP": {
|
|
@@ -2357,18 +2359,18 @@ function Wa(e) {
|
|
|
2357
2359
|
}
|
|
2358
2360
|
return { algorithm: t, keyUsages: r };
|
|
2359
2361
|
}
|
|
2360
|
-
const
|
|
2362
|
+
const ja = async (e) => {
|
|
2361
2363
|
if (!e.alg)
|
|
2362
2364
|
throw new TypeError('"alg" argument is required when "jwk.alg" is not present');
|
|
2363
|
-
const { algorithm: t, keyUsages: r } =
|
|
2365
|
+
const { algorithm: t, keyUsages: r } = Va(e), s = { ...e };
|
|
2364
2366
|
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
2367
|
};
|
|
2366
|
-
async function
|
|
2368
|
+
async function Qa(e, t, r) {
|
|
2367
2369
|
if (e.indexOf("-----BEGIN PUBLIC KEY-----") !== 0)
|
|
2368
2370
|
throw new TypeError('"spki" must be SPKI formatted string');
|
|
2369
|
-
return
|
|
2371
|
+
return Wa(e, t, r);
|
|
2370
2372
|
}
|
|
2371
|
-
const
|
|
2373
|
+
const Ja = (e, t, r, s, a) => {
|
|
2372
2374
|
if (a.crit !== void 0 && s?.crit === void 0)
|
|
2373
2375
|
throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');
|
|
2374
2376
|
if (!s || s.crit === void 0)
|
|
@@ -2386,7 +2388,7 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2386
2388
|
throw new e(`Extension Header Parameter "${i}" MUST be integrity protected`);
|
|
2387
2389
|
}
|
|
2388
2390
|
return new Set(s.crit);
|
|
2389
|
-
},
|
|
2391
|
+
}, Ya = (e, t) => {
|
|
2390
2392
|
if (t !== void 0 && (!Array.isArray(t) || t.some((r) => typeof r != "string")))
|
|
2391
2393
|
throw new TypeError(`"${e}" option must be an array of strings`);
|
|
2392
2394
|
if (t)
|
|
@@ -2395,13 +2397,13 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2395
2397
|
function Bt(e) {
|
|
2396
2398
|
return Le(e) && typeof e.kty == "string";
|
|
2397
2399
|
}
|
|
2398
|
-
function
|
|
2400
|
+
function za(e) {
|
|
2399
2401
|
return e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string");
|
|
2400
2402
|
}
|
|
2401
|
-
function
|
|
2403
|
+
function Xa(e) {
|
|
2402
2404
|
return e.kty !== "oct" && typeof e.d > "u" && typeof e.priv > "u";
|
|
2403
2405
|
}
|
|
2404
|
-
function
|
|
2406
|
+
function Za(e) {
|
|
2405
2407
|
return e.kty === "oct" && typeof e.k == "string";
|
|
2406
2408
|
}
|
|
2407
2409
|
let Oe;
|
|
@@ -2410,9 +2412,9 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2410
2412
|
let a = Oe.get(e);
|
|
2411
2413
|
if (a?.[r])
|
|
2412
2414
|
return a[r];
|
|
2413
|
-
const n = await
|
|
2415
|
+
const n = await ja({ ...t, alg: r });
|
|
2414
2416
|
return s && Object.freeze(e), a ? a[r] = n : Oe.set(e, { [r]: n }), n;
|
|
2415
|
-
},
|
|
2417
|
+
}, en = (e, t) => {
|
|
2416
2418
|
Oe ||= /* @__PURE__ */ new WeakMap();
|
|
2417
2419
|
let r = Oe.get(e);
|
|
2418
2420
|
if (r?.[t])
|
|
@@ -2508,15 +2510,15 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2508
2510
|
if (!n)
|
|
2509
2511
|
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
2510
2512
|
return r ? r[t] = n : Oe.set(e, { [t]: n }), n;
|
|
2511
|
-
},
|
|
2512
|
-
if (e instanceof Uint8Array ||
|
|
2513
|
+
}, tn = async (e, t) => {
|
|
2514
|
+
if (e instanceof Uint8Array || Wr(e))
|
|
2513
2515
|
return e;
|
|
2514
|
-
if (
|
|
2516
|
+
if (Vr(e)) {
|
|
2515
2517
|
if (e.type === "secret")
|
|
2516
2518
|
return e.export();
|
|
2517
2519
|
if ("toCryptoKey" in e && typeof e.toCryptoKey == "function")
|
|
2518
2520
|
try {
|
|
2519
|
-
return
|
|
2521
|
+
return en(e, t);
|
|
2520
2522
|
} catch (s) {
|
|
2521
2523
|
if (s instanceof TypeError)
|
|
2522
2524
|
throw s;
|
|
@@ -2570,34 +2572,34 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2570
2572
|
throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${s}" when present`);
|
|
2571
2573
|
}
|
|
2572
2574
|
return !0;
|
|
2573
|
-
},
|
|
2575
|
+
}, rn = (e, t, r) => {
|
|
2574
2576
|
if (!(t instanceof Uint8Array)) {
|
|
2575
2577
|
if (Bt(t)) {
|
|
2576
|
-
if (
|
|
2578
|
+
if (Za(t) && Mt(e, t, r))
|
|
2577
2579
|
return;
|
|
2578
2580
|
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
2581
|
}
|
|
2580
|
-
if (!
|
|
2581
|
-
throw new TypeError(
|
|
2582
|
+
if (!jr(t))
|
|
2583
|
+
throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
2582
2584
|
if (t.type !== "secret")
|
|
2583
2585
|
throw new TypeError(`${Ce(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
2584
2586
|
}
|
|
2585
|
-
},
|
|
2587
|
+
}, sn = (e, t, r) => {
|
|
2586
2588
|
if (Bt(t))
|
|
2587
2589
|
switch (r) {
|
|
2588
2590
|
case "decrypt":
|
|
2589
2591
|
case "sign":
|
|
2590
|
-
if (
|
|
2592
|
+
if (za(t) && Mt(e, t, r))
|
|
2591
2593
|
return;
|
|
2592
2594
|
throw new TypeError("JSON Web Key for this operation be a private JWK");
|
|
2593
2595
|
case "encrypt":
|
|
2594
2596
|
case "verify":
|
|
2595
|
-
if (
|
|
2597
|
+
if (Xa(t) && Mt(e, t, r))
|
|
2596
2598
|
return;
|
|
2597
2599
|
throw new TypeError("JSON Web Key for this operation be a public JWK");
|
|
2598
2600
|
}
|
|
2599
|
-
if (!
|
|
2600
|
-
throw new TypeError(
|
|
2601
|
+
if (!jr(t))
|
|
2602
|
+
throw new TypeError(qr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2601
2603
|
if (t.type === "secret")
|
|
2602
2604
|
throw new TypeError(`${Ce(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
2603
2605
|
if (t.type === "public")
|
|
@@ -2614,9 +2616,9 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2614
2616
|
case "encrypt":
|
|
2615
2617
|
throw new TypeError(`${Ce(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
2616
2618
|
}
|
|
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
|
-
},
|
|
2619
|
+
}, an = (e, t, r) => {
|
|
2620
|
+
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);
|
|
2621
|
+
}, nn = (e, t) => {
|
|
2620
2622
|
const r = `SHA-${e.slice(-3)}`;
|
|
2621
2623
|
switch (e) {
|
|
2622
2624
|
case "HS256":
|
|
@@ -2645,24 +2647,24 @@ const dr = async (e, t, r, s = !1) => {
|
|
|
2645
2647
|
default:
|
|
2646
2648
|
throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
2647
2649
|
}
|
|
2648
|
-
},
|
|
2650
|
+
}, on = async (e, t, r) => {
|
|
2649
2651
|
if (t instanceof Uint8Array) {
|
|
2650
2652
|
if (!e.startsWith("HS"))
|
|
2651
|
-
throw new TypeError(
|
|
2653
|
+
throw new TypeError(Ma(t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2652
2654
|
return crypto.subtle.importKey("raw", t, { hash: `SHA-${e.slice(-3)}`, name: "HMAC" }, !1, [r]);
|
|
2653
2655
|
}
|
|
2654
|
-
return
|
|
2655
|
-
},
|
|
2656
|
-
const a = await
|
|
2657
|
-
|
|
2658
|
-
const n =
|
|
2656
|
+
return xa(t, e, r), t;
|
|
2657
|
+
}, cn = async (e, t, r, s) => {
|
|
2658
|
+
const a = await on(e, t, "verify");
|
|
2659
|
+
Ua(e, a);
|
|
2660
|
+
const n = nn(e, a.algorithm);
|
|
2659
2661
|
try {
|
|
2660
2662
|
return await crypto.subtle.verify(n, a, r, s);
|
|
2661
2663
|
} catch {
|
|
2662
2664
|
return !1;
|
|
2663
2665
|
}
|
|
2664
2666
|
};
|
|
2665
|
-
async function
|
|
2667
|
+
async function ln(e, t, r) {
|
|
2666
2668
|
if (!Le(e))
|
|
2667
2669
|
throw new L("Flattened JWS must be an object");
|
|
2668
2670
|
if (e.protected === void 0 && e.header === void 0)
|
|
@@ -2683,38 +2685,38 @@ async function cn(e, t, r) {
|
|
|
2683
2685
|
} catch {
|
|
2684
2686
|
throw new L("JWS Protected Header is invalid");
|
|
2685
2687
|
}
|
|
2686
|
-
if (!
|
|
2688
|
+
if (!Da(s, e.header))
|
|
2687
2689
|
throw new L("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
2688
2690
|
const a = {
|
|
2689
2691
|
...s,
|
|
2690
2692
|
...e.header
|
|
2691
|
-
}, n =
|
|
2693
|
+
}, n = Ja(L, /* @__PURE__ */ new Map([["b64", !0]]), r?.crit, s, a);
|
|
2692
2694
|
let i = !0;
|
|
2693
2695
|
if (n.has("b64") && (i = s.b64, typeof i != "boolean"))
|
|
2694
2696
|
throw new L('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
|
|
2695
2697
|
const { alg: o } = a;
|
|
2696
2698
|
if (typeof o != "string" || !o)
|
|
2697
2699
|
throw new L('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
2698
|
-
const c = r &&
|
|
2700
|
+
const c = r && Ya("algorithms", r.algorithms);
|
|
2699
2701
|
if (c && !c.has(o))
|
|
2700
|
-
throw new
|
|
2702
|
+
throw new ka('"alg" (Algorithm) Header Parameter value not allowed');
|
|
2701
2703
|
if (i) {
|
|
2702
2704
|
if (typeof e.payload != "string")
|
|
2703
2705
|
throw new L("JWS Payload must be a string");
|
|
2704
2706
|
} else if (typeof e.payload != "string" && !(e.payload instanceof Uint8Array))
|
|
2705
2707
|
throw new L("JWS Payload must be a string or an Uint8Array instance");
|
|
2706
2708
|
let f = !1;
|
|
2707
|
-
typeof t == "function" && (t = await t(s, e), f = !0),
|
|
2708
|
-
const d =
|
|
2709
|
+
typeof t == "function" && (t = await t(s, e), f = !0), an(o, t, "verify");
|
|
2710
|
+
const d = Oa(Ge.encode(e.protected ?? ""), Ge.encode("."), typeof e.payload == "string" ? Ge.encode(e.payload) : e.payload);
|
|
2709
2711
|
let u;
|
|
2710
2712
|
try {
|
|
2711
2713
|
u = Me(e.signature);
|
|
2712
2714
|
} catch {
|
|
2713
2715
|
throw new L("Failed to base64url decode the signature");
|
|
2714
2716
|
}
|
|
2715
|
-
const l = await
|
|
2716
|
-
if (!await
|
|
2717
|
-
throw new
|
|
2717
|
+
const l = await tn(t, o);
|
|
2718
|
+
if (!await cn(o, l, u, d))
|
|
2719
|
+
throw new Na();
|
|
2718
2720
|
let m;
|
|
2719
2721
|
if (i)
|
|
2720
2722
|
try {
|
|
@@ -2726,17 +2728,17 @@ async function cn(e, t, r) {
|
|
|
2726
2728
|
const p = { payload: m };
|
|
2727
2729
|
return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
|
|
2728
2730
|
}
|
|
2729
|
-
async function
|
|
2731
|
+
async function un(e, t, r) {
|
|
2730
2732
|
if (e instanceof Uint8Array && (e = ke.decode(e)), typeof e != "string")
|
|
2731
2733
|
throw new L("Compact JWS must be a string or Uint8Array");
|
|
2732
2734
|
const { 0: s, 1: a, 2: n, length: i } = e.split(".");
|
|
2733
2735
|
if (i !== 3)
|
|
2734
2736
|
throw new L("Invalid Compact JWS");
|
|
2735
|
-
const o = await
|
|
2737
|
+
const o = await ln({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
|
|
2736
2738
|
return typeof t == "function" ? { ...c, key: o.key } : c;
|
|
2737
2739
|
}
|
|
2738
|
-
const
|
|
2739
|
-
const t =
|
|
2740
|
+
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) => {
|
|
2741
|
+
const t = mn.exec(e);
|
|
2740
2742
|
if (!t || t[4] && t[1])
|
|
2741
2743
|
throw new TypeError("Invalid time period format");
|
|
2742
2744
|
const r = parseFloat(t[2]), s = t[3].toLowerCase();
|
|
@@ -2754,14 +2756,14 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Qr = 60, Jr = Qr * 60, qt = Jr
|
|
|
2754
2756
|
case "min":
|
|
2755
2757
|
case "mins":
|
|
2756
2758
|
case "m":
|
|
2757
|
-
a = Math.round(r *
|
|
2759
|
+
a = Math.round(r * Jr);
|
|
2758
2760
|
break;
|
|
2759
2761
|
case "hour":
|
|
2760
2762
|
case "hours":
|
|
2761
2763
|
case "hr":
|
|
2762
2764
|
case "hrs":
|
|
2763
2765
|
case "h":
|
|
2764
|
-
a = Math.round(r *
|
|
2766
|
+
a = Math.round(r * Yr);
|
|
2765
2767
|
break;
|
|
2766
2768
|
case "day":
|
|
2767
2769
|
case "days":
|
|
@@ -2771,15 +2773,15 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Qr = 60, Jr = Qr * 60, qt = Jr
|
|
|
2771
2773
|
case "week":
|
|
2772
2774
|
case "weeks":
|
|
2773
2775
|
case "w":
|
|
2774
|
-
a = Math.round(r *
|
|
2776
|
+
a = Math.round(r * hn);
|
|
2775
2777
|
break;
|
|
2776
2778
|
default:
|
|
2777
|
-
a = Math.round(r *
|
|
2779
|
+
a = Math.round(r * fn);
|
|
2778
2780
|
break;
|
|
2779
2781
|
}
|
|
2780
2782
|
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
2781
|
-
}, fr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`,
|
|
2782
|
-
function
|
|
2783
|
+
}, 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;
|
|
2784
|
+
function yn(e, t, r = {}) {
|
|
2783
2785
|
let s;
|
|
2784
2786
|
try {
|
|
2785
2787
|
s = JSON.parse(ke.decode(t));
|
|
@@ -2799,7 +2801,7 @@ function pn(e, t, r = {}) {
|
|
|
2799
2801
|
throw new Z('unexpected "iss" claim value', s, "iss", "check_failed");
|
|
2800
2802
|
if (o && s.sub !== o)
|
|
2801
2803
|
throw new Z('unexpected "sub" claim value', s, "sub", "check_failed");
|
|
2802
|
-
if (c && !
|
|
2804
|
+
if (c && !pn(s.aud, typeof c == "string" ? [c] : c))
|
|
2803
2805
|
throw new Z('unexpected "aud" claim value', s, "aud", "check_failed");
|
|
2804
2806
|
let u;
|
|
2805
2807
|
switch (typeof r.clockTolerance) {
|
|
@@ -2815,7 +2817,7 @@ function pn(e, t, r = {}) {
|
|
|
2815
2817
|
default:
|
|
2816
2818
|
throw new TypeError("Invalid clockTolerance option type");
|
|
2817
2819
|
}
|
|
2818
|
-
const { currentDate: l } = r, m =
|
|
2820
|
+
const { currentDate: l } = r, m = dn(l || /* @__PURE__ */ new Date());
|
|
2819
2821
|
if ((s.iat !== void 0 || f) && typeof s.iat != "number")
|
|
2820
2822
|
throw new Z('"iat" claim must be a number', s, "iat", "invalid");
|
|
2821
2823
|
if (s.nbf !== void 0) {
|
|
@@ -2839,14 +2841,14 @@ function pn(e, t, r = {}) {
|
|
|
2839
2841
|
}
|
|
2840
2842
|
return s;
|
|
2841
2843
|
}
|
|
2842
|
-
async function
|
|
2843
|
-
const s = await
|
|
2844
|
+
async function gn(e, t, r) {
|
|
2845
|
+
const s = await un(e, t, r);
|
|
2844
2846
|
if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
|
|
2845
2847
|
throw new se("JWTs MUST NOT use unencoded payload");
|
|
2846
|
-
const a = { payload:
|
|
2848
|
+
const a = { payload: yn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
|
|
2847
2849
|
return typeof t == "function" ? { ...a, key: s.key } : a;
|
|
2848
2850
|
}
|
|
2849
|
-
function
|
|
2851
|
+
function bn(e) {
|
|
2850
2852
|
if (typeof e != "string")
|
|
2851
2853
|
throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
2852
2854
|
const { 1: t, length: r } = e.split(".");
|
|
@@ -2874,65 +2876,65 @@ function gn(e) {
|
|
|
2874
2876
|
}
|
|
2875
2877
|
const Ue = async (e) => {
|
|
2876
2878
|
try {
|
|
2877
|
-
const t = F.ALG, r = await
|
|
2878
|
-
return await
|
|
2879
|
+
const t = F.ALG, r = await Qa(Ca, t);
|
|
2880
|
+
return await gn(e, r, {
|
|
2879
2881
|
issuer: F.ISSUER
|
|
2880
2882
|
});
|
|
2881
2883
|
} catch {
|
|
2882
2884
|
return;
|
|
2883
2885
|
}
|
|
2884
|
-
},
|
|
2886
|
+
}, En = (e) => {
|
|
2885
2887
|
try {
|
|
2886
|
-
return
|
|
2888
|
+
return bn(e);
|
|
2887
2889
|
} catch {
|
|
2888
2890
|
return;
|
|
2889
2891
|
}
|
|
2890
2892
|
}, M = [];
|
|
2891
2893
|
for (let e = 0; e < 256; ++e)
|
|
2892
2894
|
M.push((e + 256).toString(16).slice(1));
|
|
2893
|
-
function
|
|
2895
|
+
function wn(e, t = 0) {
|
|
2894
2896
|
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
2897
|
}
|
|
2896
2898
|
let gt;
|
|
2897
|
-
const
|
|
2898
|
-
function
|
|
2899
|
+
const Sn = new Uint8Array(16);
|
|
2900
|
+
function vn() {
|
|
2899
2901
|
if (!gt) {
|
|
2900
2902
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
2901
2903
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
2902
2904
|
gt = crypto.getRandomValues.bind(crypto);
|
|
2903
2905
|
}
|
|
2904
|
-
return gt(
|
|
2906
|
+
return gt(Sn);
|
|
2905
2907
|
}
|
|
2906
|
-
const
|
|
2908
|
+
const Tn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mr = { randomUUID: Tn };
|
|
2907
2909
|
function pr(e, t, r) {
|
|
2908
2910
|
if (mr.randomUUID && !e)
|
|
2909
2911
|
return mr.randomUUID();
|
|
2910
2912
|
e = e || {};
|
|
2911
|
-
const s = e.random ?? e.rng?.() ??
|
|
2913
|
+
const s = e.random ?? e.rng?.() ?? vn();
|
|
2912
2914
|
if (s.length < 16)
|
|
2913
2915
|
throw new Error("Random bytes length must be >= 16");
|
|
2914
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
2916
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, wn(s);
|
|
2915
2917
|
}
|
|
2916
|
-
const yr = globalThis.crypto,
|
|
2918
|
+
const yr = globalThis.crypto, An = (e) => `${pr()}${pr()}`.slice(0, e), In = (e) => btoa(
|
|
2917
2919
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
2918
2920
|
);
|
|
2919
|
-
async function
|
|
2921
|
+
async function _n(e) {
|
|
2920
2922
|
if (!yr.subtle)
|
|
2921
2923
|
throw new Error(
|
|
2922
2924
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
2923
2925
|
);
|
|
2924
2926
|
const t = new TextEncoder().encode(e), r = await yr.subtle.digest("SHA-256", t);
|
|
2925
|
-
return
|
|
2927
|
+
return In(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
2926
2928
|
}
|
|
2927
|
-
async function
|
|
2928
|
-
const r =
|
|
2929
|
+
async function Rn(e) {
|
|
2930
|
+
const r = An(43), s = await _n(r);
|
|
2929
2931
|
return {
|
|
2930
2932
|
code_verifier: r,
|
|
2931
2933
|
code_challenge: s
|
|
2932
2934
|
};
|
|
2933
2935
|
}
|
|
2934
|
-
const
|
|
2935
|
-
var
|
|
2936
|
+
const zr = Ft(null);
|
|
2937
|
+
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
2938
|
/*!
|
|
2937
2939
|
@versini/auth-provider v8.0.5
|
|
2938
2940
|
© 2025 gizmette.com
|
|
@@ -2960,12 +2962,12 @@ function at(e) {
|
|
|
2960
2962
|
return n;
|
|
2961
2963
|
}
|
|
2962
2964
|
function Wt() {
|
|
2963
|
-
return
|
|
2965
|
+
return kn.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2964
2966
|
}
|
|
2965
|
-
const
|
|
2967
|
+
const kn = {
|
|
2966
2968
|
stubThis: (e) => e
|
|
2967
2969
|
};
|
|
2968
|
-
function
|
|
2970
|
+
function Xr(e) {
|
|
2969
2971
|
const { id: t } = e;
|
|
2970
2972
|
return {
|
|
2971
2973
|
...e,
|
|
@@ -2978,7 +2980,7 @@ function zr(e) {
|
|
|
2978
2980
|
transports: e.transports
|
|
2979
2981
|
};
|
|
2980
2982
|
}
|
|
2981
|
-
function
|
|
2983
|
+
function Zr(e) {
|
|
2982
2984
|
return (
|
|
2983
2985
|
// Consider localhost valid as well since it's okay wrt Secure Contexts
|
|
2984
2986
|
e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)
|
|
@@ -2994,7 +2996,7 @@ let U = class extends Error {
|
|
|
2994
2996
|
}), this.name = a ?? s.name, this.code = r;
|
|
2995
2997
|
}
|
|
2996
2998
|
};
|
|
2997
|
-
function
|
|
2999
|
+
function Nn({ error: e, options: t }) {
|
|
2998
3000
|
const { publicKey: r } = t;
|
|
2999
3001
|
if (!r)
|
|
3000
3002
|
throw Error("options was missing required publicKey property");
|
|
@@ -3052,7 +3054,7 @@ function kn({ error: e, options: t }) {
|
|
|
3052
3054
|
});
|
|
3053
3055
|
if (e.name === "SecurityError") {
|
|
3054
3056
|
const s = globalThis.location.hostname;
|
|
3055
|
-
if (
|
|
3057
|
+
if (Zr(s)) {
|
|
3056
3058
|
if (r.rp.id !== s)
|
|
3057
3059
|
return new U({
|
|
3058
3060
|
message: `The RP ID "${r.rp.id}" is invalid for this domain`,
|
|
@@ -3080,7 +3082,7 @@ function kn({ error: e, options: t }) {
|
|
|
3080
3082
|
}
|
|
3081
3083
|
return e;
|
|
3082
3084
|
}
|
|
3083
|
-
class
|
|
3085
|
+
class Pn {
|
|
3084
3086
|
constructor() {
|
|
3085
3087
|
Object.defineProperty(this, "controller", {
|
|
3086
3088
|
enumerable: !0,
|
|
@@ -3104,12 +3106,12 @@ class Nn {
|
|
|
3104
3106
|
}
|
|
3105
3107
|
}
|
|
3106
3108
|
}
|
|
3107
|
-
const
|
|
3108
|
-
function
|
|
3109
|
-
if (e && !(
|
|
3109
|
+
const es = new Pn(), $n = ["cross-platform", "platform"];
|
|
3110
|
+
function ts(e) {
|
|
3111
|
+
if (e && !($n.indexOf(e) < 0))
|
|
3110
3112
|
return e;
|
|
3111
3113
|
}
|
|
3112
|
-
async function
|
|
3114
|
+
async function xn(e) {
|
|
3113
3115
|
!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
3116
|
const { optionsJSON: t, useAutoRegister: r = !1 } = e;
|
|
3115
3117
|
if (!Wt())
|
|
@@ -3121,14 +3123,14 @@ async function $n(e) {
|
|
|
3121
3123
|
...t.user,
|
|
3122
3124
|
id: at(t.user.id)
|
|
3123
3125
|
},
|
|
3124
|
-
excludeCredentials: t.excludeCredentials?.map(
|
|
3126
|
+
excludeCredentials: t.excludeCredentials?.map(Xr)
|
|
3125
3127
|
}, a = {};
|
|
3126
|
-
r && (a.mediation = "conditional"), a.publicKey = s, a.signal =
|
|
3128
|
+
r && (a.mediation = "conditional"), a.publicKey = s, a.signal = es.createNewAbortSignal();
|
|
3127
3129
|
let n;
|
|
3128
3130
|
try {
|
|
3129
3131
|
n = await navigator.credentials.create(a);
|
|
3130
3132
|
} catch (p) {
|
|
3131
|
-
throw
|
|
3133
|
+
throw Nn({ error: p, options: a });
|
|
3132
3134
|
}
|
|
3133
3135
|
if (!n)
|
|
3134
3136
|
throw new Error("Registration was not completed");
|
|
@@ -3170,14 +3172,14 @@ async function $n(e) {
|
|
|
3170
3172
|
},
|
|
3171
3173
|
type: f,
|
|
3172
3174
|
clientExtensionResults: n.getClientExtensionResults(),
|
|
3173
|
-
authenticatorAttachment:
|
|
3175
|
+
authenticatorAttachment: ts(n.authenticatorAttachment)
|
|
3174
3176
|
};
|
|
3175
3177
|
}
|
|
3176
3178
|
function Et(e, t) {
|
|
3177
3179
|
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
3178
3180
|
`, t);
|
|
3179
3181
|
}
|
|
3180
|
-
function
|
|
3182
|
+
function Mn() {
|
|
3181
3183
|
if (!Wt())
|
|
3182
3184
|
return wt.stubThis(new Promise((t) => t(!1)));
|
|
3183
3185
|
const e = globalThis.PublicKeyCredential;
|
|
@@ -3186,7 +3188,7 @@ function xn() {
|
|
|
3186
3188
|
const wt = {
|
|
3187
3189
|
stubThis: (e) => e
|
|
3188
3190
|
};
|
|
3189
|
-
function
|
|
3191
|
+
function Dn({ error: e, options: t }) {
|
|
3190
3192
|
const { publicKey: r } = t;
|
|
3191
3193
|
if (!r)
|
|
3192
3194
|
throw Error("options was missing required publicKey property");
|
|
@@ -3206,7 +3208,7 @@ function Mn({ error: e, options: t }) {
|
|
|
3206
3208
|
});
|
|
3207
3209
|
if (e.name === "SecurityError") {
|
|
3208
3210
|
const s = globalThis.location.hostname;
|
|
3209
|
-
if (
|
|
3211
|
+
if (Zr(s)) {
|
|
3210
3212
|
if (r.rpId !== s)
|
|
3211
3213
|
return new U({
|
|
3212
3214
|
message: `The RP ID "${r.rpId}" is invalid for this domain`,
|
|
@@ -3227,31 +3229,31 @@ function Mn({ error: e, options: t }) {
|
|
|
3227
3229
|
}
|
|
3228
3230
|
return e;
|
|
3229
3231
|
}
|
|
3230
|
-
async function
|
|
3232
|
+
async function Ln(e) {
|
|
3231
3233
|
!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
3234
|
const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
|
|
3233
3235
|
if (!Wt())
|
|
3234
3236
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3235
3237
|
let a;
|
|
3236
|
-
t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(
|
|
3238
|
+
t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Xr));
|
|
3237
3239
|
const n = {
|
|
3238
3240
|
...t,
|
|
3239
3241
|
challenge: at(t.challenge),
|
|
3240
3242
|
allowCredentials: a
|
|
3241
3243
|
}, i = {};
|
|
3242
3244
|
if (r) {
|
|
3243
|
-
if (!await
|
|
3245
|
+
if (!await Mn())
|
|
3244
3246
|
throw Error("Browser does not support WebAuthn autofill");
|
|
3245
3247
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && s)
|
|
3246
3248
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
3247
3249
|
i.mediation = "conditional", n.allowCredentials = [];
|
|
3248
3250
|
}
|
|
3249
|
-
i.publicKey = n, i.signal =
|
|
3251
|
+
i.publicKey = n, i.signal = es.createNewAbortSignal();
|
|
3250
3252
|
let o;
|
|
3251
3253
|
try {
|
|
3252
3254
|
o = await navigator.credentials.get(i);
|
|
3253
3255
|
} catch (m) {
|
|
3254
|
-
throw
|
|
3256
|
+
throw Dn({ error: m, options: i });
|
|
3255
3257
|
}
|
|
3256
3258
|
if (!o)
|
|
3257
3259
|
throw new Error("Authentication was not completed");
|
|
@@ -3268,29 +3270,29 @@ async function Dn(e) {
|
|
|
3268
3270
|
},
|
|
3269
3271
|
type: u,
|
|
3270
3272
|
clientExtensionResults: o.getClientExtensionResults(),
|
|
3271
|
-
authenticatorAttachment:
|
|
3273
|
+
authenticatorAttachment: ts(o.authenticatorAttachment)
|
|
3272
3274
|
};
|
|
3273
3275
|
}
|
|
3274
|
-
function
|
|
3276
|
+
function rs(e, t) {
|
|
3275
3277
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
3276
3278
|
}
|
|
3277
3279
|
const gr = (e, t) => {
|
|
3278
3280
|
const r = JSON.stringify(
|
|
3279
3281
|
typeof t == "function" ? t() : t
|
|
3280
3282
|
);
|
|
3281
|
-
window.localStorage.setItem(e, r),
|
|
3282
|
-
},
|
|
3283
|
-
window.localStorage.removeItem(e),
|
|
3284
|
-
}, br = (e) => window.localStorage.getItem(e),
|
|
3283
|
+
window.localStorage.setItem(e, r), rs(e, r);
|
|
3284
|
+
}, Un = (e) => {
|
|
3285
|
+
window.localStorage.removeItem(e), rs(e, null);
|
|
3286
|
+
}, br = (e) => window.localStorage.getItem(e), Fn = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
3285
3287
|
function Be({
|
|
3286
3288
|
key: e,
|
|
3287
3289
|
initialValue: t
|
|
3288
3290
|
}) {
|
|
3289
|
-
const r =
|
|
3291
|
+
const r = Gs(Fn, () => br(e)), s = X(
|
|
3290
3292
|
(i) => {
|
|
3291
3293
|
try {
|
|
3292
3294
|
const o = typeof i == "function" ? i(JSON.parse(r)) : i;
|
|
3293
|
-
o == null ?
|
|
3295
|
+
o == null ? Un(e) : gr(e, o);
|
|
3294
3296
|
} catch (o) {
|
|
3295
3297
|
console.warn(o);
|
|
3296
3298
|
}
|
|
@@ -3312,30 +3314,30 @@ function Be({
|
|
|
3312
3314
|
const D = [];
|
|
3313
3315
|
for (let e = 0; e < 256; ++e)
|
|
3314
3316
|
D.push((e + 256).toString(16).slice(1));
|
|
3315
|
-
function
|
|
3317
|
+
function Hn(e, t = 0) {
|
|
3316
3318
|
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
3319
|
}
|
|
3318
3320
|
let St;
|
|
3319
|
-
const
|
|
3320
|
-
function
|
|
3321
|
+
const Kn = new Uint8Array(16);
|
|
3322
|
+
function Gn() {
|
|
3321
3323
|
if (!St) {
|
|
3322
3324
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3323
3325
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3324
3326
|
St = crypto.getRandomValues.bind(crypto);
|
|
3325
3327
|
}
|
|
3326
|
-
return St(
|
|
3328
|
+
return St(Kn);
|
|
3327
3329
|
}
|
|
3328
|
-
const
|
|
3330
|
+
const Bn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Er = { randomUUID: Bn };
|
|
3329
3331
|
function vt(e, t, r) {
|
|
3330
3332
|
if (Er.randomUUID && !e)
|
|
3331
3333
|
return Er.randomUUID();
|
|
3332
3334
|
e = e || {};
|
|
3333
|
-
const s = e.random ?? e.rng?.() ??
|
|
3335
|
+
const s = e.random ?? e.rng?.() ?? Gn();
|
|
3334
3336
|
if (s.length < 16)
|
|
3335
3337
|
throw new Error("Random bytes length must be >= 16");
|
|
3336
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
3338
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Hn(s);
|
|
3337
3339
|
}
|
|
3338
|
-
const Ae = "Your session has expired. For your security, please log in again to continue.",
|
|
3340
|
+
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
3341
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
3340
3342
|
$clientId: String!,
|
|
3341
3343
|
$username: String!,
|
|
@@ -3442,12 +3444,12 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3442
3444
|
}) => {
|
|
3443
3445
|
try {
|
|
3444
3446
|
const n = `Bearer ${e}`, i = await fetch(`${a}/graphql`, {
|
|
3445
|
-
credentials:
|
|
3446
|
-
method:
|
|
3447
|
+
credentials: as,
|
|
3448
|
+
method: ns,
|
|
3447
3449
|
headers: {
|
|
3448
3450
|
authorization: n,
|
|
3449
|
-
"Content-Type":
|
|
3450
|
-
[
|
|
3451
|
+
"Content-Type": is,
|
|
3452
|
+
[Kr.CLIENT_ID]: `${r}`
|
|
3451
3453
|
},
|
|
3452
3454
|
body: JSON.stringify({
|
|
3453
3455
|
query: t.schema,
|
|
@@ -3472,11 +3474,11 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3472
3474
|
}) => {
|
|
3473
3475
|
try {
|
|
3474
3476
|
const a = await fetch(`${s}/${e}`, {
|
|
3475
|
-
credentials:
|
|
3476
|
-
method:
|
|
3477
|
+
credentials: as,
|
|
3478
|
+
method: ns,
|
|
3477
3479
|
headers: {
|
|
3478
|
-
"Content-Type":
|
|
3479
|
-
[
|
|
3480
|
+
"Content-Type": is,
|
|
3481
|
+
[Kr.CLIENT_ID]: `${t}`
|
|
3480
3482
|
},
|
|
3481
3483
|
body: JSON.stringify(r)
|
|
3482
3484
|
});
|
|
@@ -3490,21 +3492,21 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3490
3492
|
} catch (a) {
|
|
3491
3493
|
return console.error(a), { status: re, data: [] };
|
|
3492
3494
|
}
|
|
3493
|
-
},
|
|
3495
|
+
}, jn = process.env.NODE_ENV === "production", Qn = !jn, os = {
|
|
3494
3496
|
isLoading: !0,
|
|
3495
3497
|
isAuthenticated: !1,
|
|
3496
3498
|
user: void 0,
|
|
3497
3499
|
logoutReason: "",
|
|
3498
3500
|
debug: !1,
|
|
3499
3501
|
authenticationType: ""
|
|
3500
|
-
},
|
|
3502
|
+
}, Jn = (e) => {
|
|
3501
3503
|
try {
|
|
3502
|
-
const t =
|
|
3504
|
+
const t = En(e);
|
|
3503
3505
|
return t ? t[F.USER_ID_KEY] : "";
|
|
3504
3506
|
} catch {
|
|
3505
3507
|
return "";
|
|
3506
3508
|
}
|
|
3507
|
-
},
|
|
3509
|
+
}, Yn = async ({
|
|
3508
3510
|
userId: e,
|
|
3509
3511
|
clientId: t,
|
|
3510
3512
|
domain: r,
|
|
@@ -3529,7 +3531,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3529
3531
|
status: re
|
|
3530
3532
|
};
|
|
3531
3533
|
}
|
|
3532
|
-
},
|
|
3534
|
+
}, zn = async ({
|
|
3533
3535
|
username: e,
|
|
3534
3536
|
password: t,
|
|
3535
3537
|
clientId: r,
|
|
@@ -3574,7 +3576,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3574
3576
|
status: !1
|
|
3575
3577
|
};
|
|
3576
3578
|
}
|
|
3577
|
-
},
|
|
3579
|
+
}, Xn = async ({
|
|
3578
3580
|
nonce: e,
|
|
3579
3581
|
clientId: t,
|
|
3580
3582
|
code_challenge: r,
|
|
@@ -3604,7 +3606,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3604
3606
|
data: ""
|
|
3605
3607
|
};
|
|
3606
3608
|
}
|
|
3607
|
-
},
|
|
3609
|
+
}, Zn = async ({
|
|
3608
3610
|
clientId: e,
|
|
3609
3611
|
userId: t,
|
|
3610
3612
|
nonce: r,
|
|
@@ -3641,7 +3643,7 @@ const Ae = "Your session has expired. For your security, please log in again to
|
|
|
3641
3643
|
};
|
|
3642
3644
|
}
|
|
3643
3645
|
};
|
|
3644
|
-
class
|
|
3646
|
+
class ei {
|
|
3645
3647
|
constructor(t = null, r = null) {
|
|
3646
3648
|
bt(this, "refreshTokenPromise", null), bt(this, "accessToken"), bt(this, "refreshToken"), this.accessToken = t || "", this.refreshToken = r || "";
|
|
3647
3649
|
}
|
|
@@ -3674,7 +3676,7 @@ class Zn {
|
|
|
3674
3676
|
}) {
|
|
3675
3677
|
const i = await Ue(this.refreshToken);
|
|
3676
3678
|
if (i && i.payload[F.USER_ID_KEY] !== "") {
|
|
3677
|
-
const o = await
|
|
3679
|
+
const o = await Zn({
|
|
3678
3680
|
endpoint: t,
|
|
3679
3681
|
clientId: r,
|
|
3680
3682
|
userId: s,
|
|
@@ -3697,8 +3699,8 @@ class Zn {
|
|
|
3697
3699
|
}
|
|
3698
3700
|
}
|
|
3699
3701
|
const Re = () => {
|
|
3700
|
-
throw new Error(
|
|
3701
|
-
},
|
|
3702
|
+
throw new Error(Vn);
|
|
3703
|
+
}, cs = Ft({
|
|
3702
3704
|
isAuthenticated: !1,
|
|
3703
3705
|
isLoading: !1,
|
|
3704
3706
|
login: Re,
|
|
@@ -3709,18 +3711,18 @@ const Re = () => {
|
|
|
3709
3711
|
loginWithPasskey: Re,
|
|
3710
3712
|
logoutReason: "",
|
|
3711
3713
|
authenticationType: ""
|
|
3712
|
-
}),
|
|
3713
|
-
...ct(
|
|
3714
|
-
}),
|
|
3714
|
+
}), ti = () => ({
|
|
3715
|
+
...ct(cs)
|
|
3716
|
+
}), ri = (e) => X(
|
|
3715
3717
|
(...t) => {
|
|
3716
3718
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
3717
3719
|
},
|
|
3718
3720
|
[e]
|
|
3719
|
-
),
|
|
3720
|
-
state:
|
|
3721
|
+
), si = oe.createContext({
|
|
3722
|
+
state: os,
|
|
3721
3723
|
dispatch: () => {
|
|
3722
3724
|
}
|
|
3723
|
-
}),
|
|
3725
|
+
}), ai = (e, t) => t?.type === $e ? {
|
|
3724
3726
|
...e,
|
|
3725
3727
|
isLoading: t.payload.isLoading
|
|
3726
3728
|
} : t?.type === Qe ? {
|
|
@@ -3730,28 +3732,28 @@ const Re = () => {
|
|
|
3730
3732
|
user: t.payload.user,
|
|
3731
3733
|
authenticationType: t.payload.authenticationType,
|
|
3732
3734
|
logoutReason: ""
|
|
3733
|
-
} : t?.type ===
|
|
3735
|
+
} : t?.type === ss ? {
|
|
3734
3736
|
...e,
|
|
3735
3737
|
isLoading: !1,
|
|
3736
3738
|
isAuthenticated: !1,
|
|
3737
3739
|
user: void 0,
|
|
3738
3740
|
authenticationType: "",
|
|
3739
3741
|
logoutReason: t.payload.logoutReason
|
|
3740
|
-
} : e,
|
|
3741
|
-
const t =
|
|
3742
|
-
return /* @__PURE__ */ h(
|
|
3742
|
+
} : e, ni = ({ children: e }) => {
|
|
3743
|
+
const t = ti();
|
|
3744
|
+
return /* @__PURE__ */ h(zr.Provider, { value: t, children: e });
|
|
3743
3745
|
}, wr = ({
|
|
3744
3746
|
children: e,
|
|
3745
3747
|
sessionExpiration: t,
|
|
3746
3748
|
clientId: r,
|
|
3747
3749
|
domain: s = "",
|
|
3748
3750
|
debug: a = !1,
|
|
3749
|
-
endpoint: n =
|
|
3751
|
+
endpoint: n = Qn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
3750
3752
|
}) => {
|
|
3751
|
-
const [i, o] =
|
|
3752
|
-
...
|
|
3753
|
+
const [i, o] = Nr(ai, {
|
|
3754
|
+
...os,
|
|
3753
3755
|
debug: a
|
|
3754
|
-
}), c =
|
|
3756
|
+
}), c = ri(a), f = j(!1), [d, u, , l] = Be({
|
|
3755
3757
|
key: `${qe}::${r}::@@user@@`
|
|
3756
3758
|
}), [m, p, , g] = Be({
|
|
3757
3759
|
key: `${qe}::${r}::@@access@@`
|
|
@@ -3761,7 +3763,7 @@ const Re = () => {
|
|
|
3761
3763
|
}
|
|
3762
3764
|
), [A, K, , R] = Be({
|
|
3763
3765
|
key: `${qe}::${r}::@@nonce@@`
|
|
3764
|
-
}), z = new
|
|
3766
|
+
}), z = new ei(m, b), C = X(() => {
|
|
3765
3767
|
c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
|
|
3766
3768
|
}, [
|
|
3767
3769
|
g,
|
|
@@ -3775,7 +3777,7 @@ const Re = () => {
|
|
|
3775
3777
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
3776
3778
|
w
|
|
3777
3779
|
), o({
|
|
3778
|
-
type:
|
|
3780
|
+
type: ss,
|
|
3779
3781
|
payload: {
|
|
3780
3782
|
logoutReason: w || Ae
|
|
3781
3783
|
}
|
|
@@ -3785,10 +3787,10 @@ const Re = () => {
|
|
|
3785
3787
|
), x = X(
|
|
3786
3788
|
async (w) => {
|
|
3787
3789
|
c("invalidateAndLogout: invalidating and logging out");
|
|
3788
|
-
const { user: T } = i, S = T?.userId ||
|
|
3790
|
+
const { user: T } = i, S = T?.userId || Jn(d);
|
|
3789
3791
|
S || c(
|
|
3790
3792
|
"invalidateAndLogout: user cannot be identified, logging out without userId"
|
|
3791
|
-
), await
|
|
3793
|
+
), await Yn({
|
|
3792
3794
|
userId: S,
|
|
3793
3795
|
clientId: r,
|
|
3794
3796
|
domain: s,
|
|
@@ -3835,14 +3837,14 @@ const Re = () => {
|
|
|
3835
3837
|
o({ type: $e, payload: { isLoading: !0 } }), C();
|
|
3836
3838
|
const S = vt();
|
|
3837
3839
|
K(S), c("login: Logging in with password");
|
|
3838
|
-
const { code_verifier: le, code_challenge: ue } = await
|
|
3840
|
+
const { code_verifier: le, code_challenge: ue } = await Rn(), Zt = await Xn({
|
|
3839
3841
|
endpoint: n,
|
|
3840
3842
|
nonce: S,
|
|
3841
3843
|
clientId: r,
|
|
3842
3844
|
code_challenge: ue
|
|
3843
3845
|
});
|
|
3844
3846
|
if (Zt.status) {
|
|
3845
|
-
const ve = await
|
|
3847
|
+
const ve = await zn({
|
|
3846
3848
|
endpoint: n,
|
|
3847
3849
|
username: w,
|
|
3848
3850
|
password: T,
|
|
@@ -3869,7 +3871,7 @@ const Re = () => {
|
|
|
3869
3871
|
}
|
|
3870
3872
|
return !1;
|
|
3871
3873
|
}, I = async (w) => {
|
|
3872
|
-
w?.preventDefault(), await x(
|
|
3874
|
+
w?.preventDefault(), await x(qn);
|
|
3873
3875
|
}, N = async () => {
|
|
3874
3876
|
const { isAuthenticated: w, user: T } = i;
|
|
3875
3877
|
try {
|
|
@@ -3898,7 +3900,7 @@ const Re = () => {
|
|
|
3898
3900
|
} catch {
|
|
3899
3901
|
return c(
|
|
3900
3902
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
3901
|
-
), await x(
|
|
3903
|
+
), await x(Wn), "";
|
|
3902
3904
|
}
|
|
3903
3905
|
}, J = () => i.isAuthenticated && d ? d : "", ce = async () => {
|
|
3904
3906
|
const { user: w } = i;
|
|
@@ -3915,7 +3917,7 @@ const Re = () => {
|
|
|
3915
3917
|
});
|
|
3916
3918
|
if (T.status)
|
|
3917
3919
|
try {
|
|
3918
|
-
const S = await
|
|
3920
|
+
const S = await xn({
|
|
3919
3921
|
optionsJSON: T.data
|
|
3920
3922
|
});
|
|
3921
3923
|
return T = await _e({
|
|
@@ -3962,7 +3964,7 @@ const Re = () => {
|
|
|
3962
3964
|
});
|
|
3963
3965
|
if (S.status)
|
|
3964
3966
|
try {
|
|
3965
|
-
const le = await
|
|
3967
|
+
const le = await Ln({
|
|
3966
3968
|
optionsJSON: S.data
|
|
3967
3969
|
});
|
|
3968
3970
|
return S = await _e({
|
|
@@ -4008,8 +4010,8 @@ const Re = () => {
|
|
|
4008
4010
|
}
|
|
4009
4011
|
return !1;
|
|
4010
4012
|
};
|
|
4011
|
-
return /* @__PURE__ */ h(
|
|
4012
|
-
|
|
4013
|
+
return /* @__PURE__ */ h(si.Provider, { value: { state: i, dispatch: o }, children: /* @__PURE__ */ h(
|
|
4014
|
+
cs.Provider,
|
|
4013
4015
|
{
|
|
4014
4016
|
value: {
|
|
4015
4017
|
...i,
|
|
@@ -4020,7 +4022,7 @@ const Re = () => {
|
|
|
4020
4022
|
registeringForPasskey: ce,
|
|
4021
4023
|
loginWithPasskey: Se
|
|
4022
4024
|
},
|
|
4023
|
-
children: /* @__PURE__ */ h(
|
|
4025
|
+
children: /* @__PURE__ */ h(ni, { children: e })
|
|
4024
4026
|
}
|
|
4025
4027
|
) });
|
|
4026
4028
|
};
|
|
@@ -4037,12 +4039,12 @@ try {
|
|
|
4037
4039
|
});
|
|
4038
4040
|
} catch {
|
|
4039
4041
|
}
|
|
4040
|
-
const
|
|
4041
|
-
const e = ct(
|
|
4042
|
+
const ls = () => {
|
|
4043
|
+
const e = ct(zr);
|
|
4042
4044
|
if (!e)
|
|
4043
4045
|
throw new Error("useAuth must be used within an AuthHookProvider");
|
|
4044
4046
|
return e;
|
|
4045
|
-
},
|
|
4047
|
+
}, 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
4048
|
let At = null, ae = !1;
|
|
4047
4049
|
typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
|
|
4048
4050
|
ae && (ae = !1, window.location.reload());
|
|
@@ -4052,17 +4054,17 @@ function Vt() {
|
|
|
4052
4054
|
}
|
|
4053
4055
|
function Dt() {
|
|
4054
4056
|
const e = localStorage.getItem(
|
|
4055
|
-
|
|
4057
|
+
us + ds
|
|
4056
4058
|
);
|
|
4057
4059
|
return e === null ? !1 : e === "true";
|
|
4058
4060
|
}
|
|
4059
|
-
function
|
|
4061
|
+
function ii(e) {
|
|
4060
4062
|
localStorage.setItem(
|
|
4061
|
-
|
|
4063
|
+
us + ds,
|
|
4062
4064
|
e.toString()
|
|
4063
4065
|
);
|
|
4064
4066
|
}
|
|
4065
|
-
async function
|
|
4067
|
+
async function hs() {
|
|
4066
4068
|
if (!Dt())
|
|
4067
4069
|
return !1;
|
|
4068
4070
|
if (!Vt())
|
|
@@ -4082,7 +4084,7 @@ async function ds() {
|
|
|
4082
4084
|
return console.error("[SW] Service worker registration failed:", e), !1;
|
|
4083
4085
|
}
|
|
4084
4086
|
}
|
|
4085
|
-
async function
|
|
4087
|
+
async function oi() {
|
|
4086
4088
|
if (!Vt())
|
|
4087
4089
|
return !1;
|
|
4088
4090
|
try {
|
|
@@ -4092,14 +4094,14 @@ async function ii() {
|
|
|
4092
4094
|
return console.error("[SW] Service worker un-registration failed:", e), !1;
|
|
4093
4095
|
}
|
|
4094
4096
|
}
|
|
4095
|
-
async function
|
|
4096
|
-
if (
|
|
4097
|
+
async function Dc(e) {
|
|
4098
|
+
if (ii(e), e) {
|
|
4097
4099
|
ae = !0;
|
|
4098
4100
|
try {
|
|
4099
4101
|
sessionStorage.setItem("sw-toggle-pending", "enabled");
|
|
4100
4102
|
} catch {
|
|
4101
4103
|
}
|
|
4102
|
-
await
|
|
4104
|
+
await hs(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
|
|
4103
4105
|
try {
|
|
4104
4106
|
navigator.serviceWorker.ready.then(() => {
|
|
4105
4107
|
ae && Dt() && (ae = !1, window.location.reload());
|
|
@@ -4114,14 +4116,14 @@ async function Mc(e) {
|
|
|
4114
4116
|
} catch {
|
|
4115
4117
|
}
|
|
4116
4118
|
try {
|
|
4117
|
-
Vt() && await
|
|
4119
|
+
Vt() && await ci();
|
|
4118
4120
|
} catch (t) {
|
|
4119
4121
|
console.warn("[SW] Failed to invalidate cache:", t);
|
|
4120
4122
|
}
|
|
4121
|
-
await
|
|
4123
|
+
await oi(), window.location.reload();
|
|
4122
4124
|
}
|
|
4123
4125
|
}
|
|
4124
|
-
async function
|
|
4126
|
+
async function ci() {
|
|
4125
4127
|
try {
|
|
4126
4128
|
if ("caches" in window) {
|
|
4127
4129
|
const e = await caches.keys();
|
|
@@ -4147,7 +4149,7 @@ async function oi() {
|
|
|
4147
4149
|
function It() {
|
|
4148
4150
|
return "unknown";
|
|
4149
4151
|
}
|
|
4150
|
-
async function
|
|
4152
|
+
async function Lc(e = {}) {
|
|
4151
4153
|
const { urlLimitPerCache: t } = e;
|
|
4152
4154
|
if (!("caches" in window))
|
|
4153
4155
|
return { version: It(), caches: [], totalItems: 0 };
|
|
@@ -4174,44 +4176,45 @@ async function Dc(e = {}) {
|
|
|
4174
4176
|
return console.warn("[SW] getCacheInfo failed:", r), { version: It(), caches: [], totalItems: 0 };
|
|
4175
4177
|
}
|
|
4176
4178
|
}
|
|
4177
|
-
const
|
|
4179
|
+
const Uc = "user", Fc = "assistant", Hc = "data", He = "OpenAI", dt = "Anthropic", ht = "Google", fs = "Perplexity", Kc = He, li = [
|
|
4178
4180
|
He,
|
|
4179
4181
|
dt,
|
|
4180
4182
|
ht
|
|
4181
|
-
],
|
|
4182
|
-
[
|
|
4183
|
-
[
|
|
4184
|
-
[
|
|
4185
|
-
[
|
|
4186
|
-
[
|
|
4187
|
-
[
|
|
4188
|
-
[
|
|
4189
|
-
[
|
|
4190
|
-
[
|
|
4191
|
-
[
|
|
4192
|
-
},
|
|
4183
|
+
], 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 = {
|
|
4184
|
+
[ms]: "GPT-5",
|
|
4185
|
+
[ps]: "GPT-5 Mini",
|
|
4186
|
+
[ys]: "GPT-5 Nano",
|
|
4187
|
+
[gs]: "GPT-4.1 Nano",
|
|
4188
|
+
[bs]: "Claude Haiku 4.5",
|
|
4189
|
+
[Es]: "Claude Sonnet 4.5",
|
|
4190
|
+
[ws]: "Gemini 2.5 Flash",
|
|
4191
|
+
[Ss]: "Gemini 2.5 Pro",
|
|
4192
|
+
[vs]: "Sonar",
|
|
4193
|
+
[Ts]: "Sonar Pro"
|
|
4194
|
+
}, As = {
|
|
4193
4195
|
[He]: [
|
|
4194
|
-
|
|
4195
|
-
fs,
|
|
4196
|
+
gs,
|
|
4196
4197
|
ms,
|
|
4197
|
-
ps
|
|
4198
|
+
ps,
|
|
4199
|
+
ys
|
|
4198
4200
|
],
|
|
4199
|
-
[dt]: [
|
|
4200
|
-
[ht]: [
|
|
4201
|
-
[
|
|
4202
|
-
},
|
|
4201
|
+
[dt]: [bs, Es],
|
|
4202
|
+
[ht]: [ws, Ss],
|
|
4203
|
+
[fs]: [vs, Ts]
|
|
4204
|
+
}, ui = "claude-sonnet-4", di = "claude-haiku-4", hi = "claude-3", fi = "gpt-", mi = "o3", pi = "o4", yi = "gemini", gi = "sonar", bi = {
|
|
4203
4205
|
[dt]: [
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
+
ui,
|
|
4207
|
+
di,
|
|
4208
|
+
hi
|
|
4206
4209
|
],
|
|
4207
4210
|
[He]: [
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
+
fi,
|
|
4212
|
+
mi,
|
|
4213
|
+
pi
|
|
4211
4214
|
],
|
|
4212
|
-
[ht]: [
|
|
4213
|
-
[
|
|
4214
|
-
},
|
|
4215
|
+
[ht]: [yi],
|
|
4216
|
+
[fs]: [gi]
|
|
4217
|
+
}, Bc = "x-diggidy-chat-id", qc = "timestamp", Wc = "tokenUsage", k = "Diggidy", Vc = {
|
|
4215
4218
|
TOOL: {
|
|
4216
4219
|
MEMORIES: "getUserMemories"
|
|
4217
4220
|
},
|
|
@@ -4219,50 +4222,50 @@ const Lc = "user", Uc = "assistant", Fc = "data", He = "OpenAI", dt = "Anthropic
|
|
|
4219
4222
|
ATTACHMENTS: "addon:attachments",
|
|
4220
4223
|
REASONING: "addon:reasoning"
|
|
4221
4224
|
}
|
|
4222
|
-
},
|
|
4225
|
+
}, jc = (e) => {
|
|
4223
4226
|
for (const [t, r] of Object.entries(
|
|
4224
|
-
|
|
4227
|
+
bi
|
|
4225
4228
|
))
|
|
4226
4229
|
if (r.some((s) => e.startsWith(s)))
|
|
4227
4230
|
return t;
|
|
4228
4231
|
return null;
|
|
4229
|
-
},
|
|
4232
|
+
}, Qc = (e) => {
|
|
4230
4233
|
if (!e || e.length === 0)
|
|
4231
4234
|
return [];
|
|
4232
4235
|
const t = /* @__PURE__ */ new Set();
|
|
4233
4236
|
for (const r of e)
|
|
4234
4237
|
for (const [s, a] of Object.entries(
|
|
4235
|
-
|
|
4238
|
+
As
|
|
4236
4239
|
))
|
|
4237
4240
|
a.includes(r) && (s === He || s === dt || s === ht) && t.add(s);
|
|
4238
|
-
return
|
|
4239
|
-
},
|
|
4241
|
+
return li.filter((r) => t.has(r));
|
|
4242
|
+
}, Ei = (e) => {
|
|
4240
4243
|
const t = /* @__PURE__ */ new Map();
|
|
4241
4244
|
if (!e || e.length === 0)
|
|
4242
4245
|
return t;
|
|
4243
4246
|
for (const r of e)
|
|
4244
4247
|
for (const [s, a] of Object.entries(
|
|
4245
|
-
|
|
4248
|
+
As
|
|
4246
4249
|
))
|
|
4247
4250
|
if (a.includes(r)) {
|
|
4248
4251
|
t.has(s) || t.set(s, []), t.get(s)?.push(r);
|
|
4249
4252
|
break;
|
|
4250
4253
|
}
|
|
4251
4254
|
return t;
|
|
4252
|
-
},
|
|
4253
|
-
const t =
|
|
4255
|
+
}, Jc = (e) => {
|
|
4256
|
+
const t = Ei(e);
|
|
4254
4257
|
for (const r of t.values())
|
|
4255
4258
|
if (r.length > 1)
|
|
4256
4259
|
return !0;
|
|
4257
4260
|
return !1;
|
|
4258
|
-
},
|
|
4259
|
-
function
|
|
4261
|
+
}, Yc = (e, t) => !e || !t || t.length === 0 ? !1 : t.includes(e);
|
|
4262
|
+
function wi(e) {
|
|
4260
4263
|
return e ? new Set(e) : null;
|
|
4261
4264
|
}
|
|
4262
|
-
function
|
|
4265
|
+
function Si(e, t, r) {
|
|
4263
4266
|
if (!t || Array.isArray(t) && t.length === 0)
|
|
4264
4267
|
return !0;
|
|
4265
|
-
const s = e instanceof Set ? e :
|
|
4268
|
+
const s = e instanceof Set ? e : wi(e);
|
|
4266
4269
|
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
4270
|
}
|
|
4268
4271
|
const G = {
|
|
@@ -4534,12 +4537,12 @@ const G = {
|
|
|
4534
4537
|
schema: G.DELETE_MEMORIES,
|
|
4535
4538
|
method: "deleteMemories"
|
|
4536
4539
|
}
|
|
4537
|
-
},
|
|
4540
|
+
}, vi = process.env.PUBLIC_SASSY_API_SERVER_URL, nt = async ({
|
|
4538
4541
|
query: e,
|
|
4539
4542
|
data: t,
|
|
4540
4543
|
headers: r = {},
|
|
4541
4544
|
...s
|
|
4542
|
-
}) => await fetch(`${
|
|
4545
|
+
}) => await fetch(`${vi}/graphql`, {
|
|
4543
4546
|
method: "POST",
|
|
4544
4547
|
credentials: "include",
|
|
4545
4548
|
headers: {
|
|
@@ -4584,7 +4587,7 @@ const G = {
|
|
|
4584
4587
|
} catch (r) {
|
|
4585
4588
|
throw console.error(r), r;
|
|
4586
4589
|
}
|
|
4587
|
-
},
|
|
4590
|
+
}, zc = async ({
|
|
4588
4591
|
provider: e,
|
|
4589
4592
|
model: t,
|
|
4590
4593
|
accessToken: r,
|
|
@@ -4599,7 +4602,7 @@ const G = {
|
|
|
4599
4602
|
type: B.SET_USER_PREFERENCES,
|
|
4600
4603
|
params: a
|
|
4601
4604
|
});
|
|
4602
|
-
},
|
|
4605
|
+
}, Xc = async ({
|
|
4603
4606
|
plan: e,
|
|
4604
4607
|
accessToken: t,
|
|
4605
4608
|
username: r
|
|
@@ -4619,13 +4622,13 @@ const G = {
|
|
|
4619
4622
|
PREFERENCES: "preferences",
|
|
4620
4623
|
USAGE: "usage",
|
|
4621
4624
|
USER_MEMORIES: "userMemories"
|
|
4622
|
-
},
|
|
4625
|
+
}, Zc = () => fe({
|
|
4623
4626
|
queryKey: [Q.CAPABILITIES],
|
|
4624
4627
|
queryFn: async () => await pe({
|
|
4625
4628
|
type: B.GET_SERVER_CAPABILITIES,
|
|
4626
4629
|
noAuth: !0
|
|
4627
4630
|
})
|
|
4628
|
-
}),
|
|
4631
|
+
}), el = () => fe({
|
|
4629
4632
|
queryKey: [Q.CHANGELOGS],
|
|
4630
4633
|
queryFn: async () => await pe({
|
|
4631
4634
|
type: B.GET_CHANGELOGS,
|
|
@@ -4634,7 +4637,7 @@ const G = {
|
|
|
4634
4637
|
client: !0
|
|
4635
4638
|
}
|
|
4636
4639
|
})
|
|
4637
|
-
}),
|
|
4640
|
+
}), Ti = ({
|
|
4638
4641
|
user: e,
|
|
4639
4642
|
getAccessToken: t
|
|
4640
4643
|
}) => fe({
|
|
@@ -4646,7 +4649,7 @@ const G = {
|
|
|
4646
4649
|
type: B.GET_USER_PREFERENCES,
|
|
4647
4650
|
getAccessToken: t
|
|
4648
4651
|
})
|
|
4649
|
-
}),
|
|
4652
|
+
}), tl = ({
|
|
4650
4653
|
user: e,
|
|
4651
4654
|
getAccessToken: t
|
|
4652
4655
|
}) => fe({
|
|
@@ -4658,7 +4661,7 @@ const G = {
|
|
|
4658
4661
|
type: B.GET_CHATS_STATS,
|
|
4659
4662
|
getAccessToken: t
|
|
4660
4663
|
})
|
|
4661
|
-
}),
|
|
4664
|
+
}), rl = ({
|
|
4662
4665
|
user: e,
|
|
4663
4666
|
searchString: t,
|
|
4664
4667
|
sortDirection: r,
|
|
@@ -4682,7 +4685,7 @@ const G = {
|
|
|
4682
4685
|
type: B.GET_CHATS,
|
|
4683
4686
|
getAccessToken: a
|
|
4684
4687
|
})
|
|
4685
|
-
}),
|
|
4688
|
+
}), sl = ({
|
|
4686
4689
|
chatId: e,
|
|
4687
4690
|
getAccessToken: t,
|
|
4688
4691
|
enabled: r = !0
|
|
@@ -4694,7 +4697,7 @@ const G = {
|
|
|
4694
4697
|
type: B.GET_CHAT,
|
|
4695
4698
|
getAccessToken: t
|
|
4696
4699
|
})
|
|
4697
|
-
}),
|
|
4700
|
+
}), al = ({
|
|
4698
4701
|
getAccessToken: e
|
|
4699
4702
|
}) => {
|
|
4700
4703
|
const t = he();
|
|
@@ -4717,7 +4720,7 @@ const G = {
|
|
|
4717
4720
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4718
4721
|
}
|
|
4719
4722
|
});
|
|
4720
|
-
},
|
|
4723
|
+
}, nl = ({
|
|
4721
4724
|
getAccessToken: e
|
|
4722
4725
|
}) => {
|
|
4723
4726
|
const t = he();
|
|
@@ -4734,7 +4737,7 @@ const G = {
|
|
|
4734
4737
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4735
4738
|
}
|
|
4736
4739
|
});
|
|
4737
|
-
},
|
|
4740
|
+
}, il = ({
|
|
4738
4741
|
getAccessToken: e
|
|
4739
4742
|
}) => {
|
|
4740
4743
|
const t = he();
|
|
@@ -4751,7 +4754,7 @@ const G = {
|
|
|
4751
4754
|
t.invalidateQueries({ queryKey: [Q.CHATS, s.userId] });
|
|
4752
4755
|
}
|
|
4753
4756
|
});
|
|
4754
|
-
},
|
|
4757
|
+
}, ol = ({
|
|
4755
4758
|
user: e,
|
|
4756
4759
|
month: t,
|
|
4757
4760
|
year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
|
|
@@ -4769,7 +4772,7 @@ const G = {
|
|
|
4769
4772
|
type: B.GET_USAGE,
|
|
4770
4773
|
getAccessToken: s
|
|
4771
4774
|
})
|
|
4772
|
-
}),
|
|
4775
|
+
}), cl = ({
|
|
4773
4776
|
user: e,
|
|
4774
4777
|
query: t,
|
|
4775
4778
|
getAccessToken: r,
|
|
@@ -4782,7 +4785,7 @@ const G = {
|
|
|
4782
4785
|
type: B.GET_USER_MEMORIES,
|
|
4783
4786
|
getAccessToken: r
|
|
4784
4787
|
})
|
|
4785
|
-
}),
|
|
4788
|
+
}), ll = ({
|
|
4786
4789
|
getAccessToken: e
|
|
4787
4790
|
}) => {
|
|
4788
4791
|
const t = he();
|
|
@@ -4805,7 +4808,7 @@ const G = {
|
|
|
4805
4808
|
});
|
|
4806
4809
|
}
|
|
4807
4810
|
});
|
|
4808
|
-
},
|
|
4811
|
+
}, ul = ({
|
|
4809
4812
|
getAccessToken: e
|
|
4810
4813
|
}) => {
|
|
4811
4814
|
const t = he();
|
|
@@ -4827,7 +4830,7 @@ const G = {
|
|
|
4827
4830
|
});
|
|
4828
4831
|
}
|
|
4829
4832
|
});
|
|
4830
|
-
},
|
|
4833
|
+
}, dl = ({
|
|
4831
4834
|
getAccessToken: e
|
|
4832
4835
|
}) => {
|
|
4833
4836
|
const t = he();
|
|
@@ -4882,19 +4885,19 @@ const G = {
|
|
|
4882
4885
|
} catch (a) {
|
|
4883
4886
|
return Promise.reject(a);
|
|
4884
4887
|
}
|
|
4885
|
-
},
|
|
4888
|
+
}, Is = Ft(
|
|
4886
4889
|
void 0
|
|
4887
|
-
),
|
|
4890
|
+
), Tr = {
|
|
4888
4891
|
capabilities: /* @__PURE__ */ new Set(),
|
|
4889
4892
|
allowedModels: [],
|
|
4890
4893
|
version: null,
|
|
4891
4894
|
status: "idle"
|
|
4892
|
-
},
|
|
4895
|
+
}, Ai = ({
|
|
4893
4896
|
user: e,
|
|
4894
4897
|
getAccessToken: t,
|
|
4895
4898
|
children: r
|
|
4896
4899
|
}) => {
|
|
4897
|
-
const [s, a] = ie(
|
|
4900
|
+
const [s, a] = ie(Tr), n = ze(
|
|
4898
4901
|
() => e ? `entitlements:${e}` : null,
|
|
4899
4902
|
[e]
|
|
4900
4903
|
), i = X(() => {
|
|
@@ -4919,7 +4922,7 @@ const G = {
|
|
|
4919
4922
|
W(() => {
|
|
4920
4923
|
s.status === "idle" && i();
|
|
4921
4924
|
}, [i, s.status]);
|
|
4922
|
-
const o =
|
|
4925
|
+
const o = Ti({ user: e, getAccessToken: t });
|
|
4923
4926
|
W(() => {
|
|
4924
4927
|
o.isLoading && s.status === "idle" && a((u) => ({ ...u, status: "loading" }));
|
|
4925
4928
|
}, [o.isLoading, s.status]), W(() => {
|
|
@@ -4971,7 +4974,7 @@ const G = {
|
|
|
4971
4974
|
},
|
|
4972
4975
|
[n]
|
|
4973
4976
|
), f = X(() => {
|
|
4974
|
-
if (a(
|
|
4977
|
+
if (a(Tr), n)
|
|
4975
4978
|
try {
|
|
4976
4979
|
sessionStorage.removeItem(n);
|
|
4977
4980
|
} catch {
|
|
@@ -4979,33 +4982,33 @@ const G = {
|
|
|
4979
4982
|
}, [n]), d = ze(
|
|
4980
4983
|
() => ({
|
|
4981
4984
|
...s,
|
|
4982
|
-
check: (u, l) => s.status !== "ready" ? !1 :
|
|
4985
|
+
check: (u, l) => s.status !== "ready" ? !1 : Si(s.capabilities, u, { any: l?.any }),
|
|
4983
4986
|
loadFromProfile: c,
|
|
4984
4987
|
reset: f
|
|
4985
4988
|
}),
|
|
4986
4989
|
[s, c, f]
|
|
4987
4990
|
);
|
|
4988
|
-
return /* @__PURE__ */ h(
|
|
4991
|
+
return /* @__PURE__ */ h(Is.Provider, { value: d, children: r });
|
|
4989
4992
|
};
|
|
4990
|
-
function
|
|
4991
|
-
const e = ct(
|
|
4993
|
+
function hl() {
|
|
4994
|
+
const e = ct(Is);
|
|
4992
4995
|
if (!e)
|
|
4993
4996
|
throw new Error("useEntitlements must be used within EntitlementsProvider");
|
|
4994
4997
|
return e;
|
|
4995
4998
|
}
|
|
4996
|
-
const
|
|
4997
|
-
function
|
|
4999
|
+
const Ar = (e) => Number.isFinite(e) ? e : 0;
|
|
5000
|
+
function Ii(e) {
|
|
4998
5001
|
return {
|
|
4999
5002
|
days: Math.trunc(e / 864e5),
|
|
5000
5003
|
hours: Math.trunc(e / 36e5 % 24),
|
|
5001
5004
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
5002
5005
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
5003
5006
|
milliseconds: Math.trunc(e % 1e3),
|
|
5004
|
-
microseconds: Math.trunc(
|
|
5005
|
-
nanoseconds: Math.trunc(
|
|
5007
|
+
microseconds: Math.trunc(Ar(e * 1e3) % 1e3),
|
|
5008
|
+
nanoseconds: Math.trunc(Ar(e * 1e6) % 1e3)
|
|
5006
5009
|
};
|
|
5007
5010
|
}
|
|
5008
|
-
function
|
|
5011
|
+
function _i(e) {
|
|
5009
5012
|
return {
|
|
5010
5013
|
days: e / 86400000n,
|
|
5011
5014
|
hours: e / 3600000n % 24n,
|
|
@@ -5016,20 +5019,20 @@ function Ai(e) {
|
|
|
5016
5019
|
nanoseconds: 0n
|
|
5017
5020
|
};
|
|
5018
5021
|
}
|
|
5019
|
-
function
|
|
5022
|
+
function Ri(e) {
|
|
5020
5023
|
switch (typeof e) {
|
|
5021
5024
|
case "number": {
|
|
5022
5025
|
if (Number.isFinite(e))
|
|
5023
|
-
return
|
|
5026
|
+
return Ii(e);
|
|
5024
5027
|
break;
|
|
5025
5028
|
}
|
|
5026
5029
|
case "bigint":
|
|
5027
|
-
return
|
|
5030
|
+
return _i(e);
|
|
5028
5031
|
}
|
|
5029
5032
|
throw new TypeError("Expected a finite number or bigint");
|
|
5030
5033
|
}
|
|
5031
|
-
const
|
|
5032
|
-
function
|
|
5034
|
+
const Ci = (e) => e === 0 || e === 0n, Oi = (e, t) => t === 1 || t === 1n ? e : `${e}s`, ki = 1e-7, Ni = 24n * 60n * 60n * 1000n;
|
|
5035
|
+
function Pi(e, t) {
|
|
5033
5036
|
const r = typeof e == "bigint";
|
|
5034
5037
|
if (!r && !Number.isFinite(e))
|
|
5035
5038
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -5038,18 +5041,18 @@ function ki(e, t) {
|
|
|
5038
5041
|
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
5042
|
let a = [];
|
|
5040
5043
|
const n = (d, u) => {
|
|
5041
|
-
const l = Math.floor(d * 10 ** u +
|
|
5044
|
+
const l = Math.floor(d * 10 ** u + ki);
|
|
5042
5045
|
return (Math.round(l) / 10 ** u).toFixed(u);
|
|
5043
5046
|
}, i = (d, u, l, m) => {
|
|
5044
|
-
if (!((a.length === 0 || !t.colonNotation) &&
|
|
5047
|
+
if (!((a.length === 0 || !t.colonNotation) && Ci(d) && !(t.colonNotation && l === "m"))) {
|
|
5045
5048
|
if (m ??= String(d), t.colonNotation) {
|
|
5046
5049
|
const p = m.includes(".") ? m.split(".")[0].length : m.length, g = a.length > 0 ? 2 : 1;
|
|
5047
5050
|
m = "0".repeat(Math.max(0, g - p)) + m;
|
|
5048
5051
|
} else
|
|
5049
|
-
m += t.verbose ? " " +
|
|
5052
|
+
m += t.verbose ? " " + Oi(u, d) : l;
|
|
5050
5053
|
a.push(m);
|
|
5051
5054
|
}
|
|
5052
|
-
}, o =
|
|
5055
|
+
}, o = Ri(e), c = BigInt(o.days);
|
|
5053
5056
|
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
5057
|
if (t.separateMilliseconds || t.formatSubMilliseconds || !t.colonNotation && e < 1e3 && !t.subSecondsAsDecimals) {
|
|
5055
5058
|
const d = Number(o.seconds), u = Number(o.milliseconds), l = Number(o.microseconds), m = Number(o.nanoseconds);
|
|
@@ -5065,7 +5068,7 @@ function ki(e, t) {
|
|
|
5065
5068
|
);
|
|
5066
5069
|
}
|
|
5067
5070
|
} else {
|
|
5068
|
-
const d = (r ? Number(e %
|
|
5071
|
+
const d = (r ? Number(e % Ni) : e) / 1e3 % 60, u = typeof t.secondsDecimalDigits == "number" ? t.secondsDecimalDigits : 1, l = n(d, u), m = t.keepDecimalsOnWholeSeconds ? l : l.replace(/\.0+$/, "");
|
|
5069
5072
|
i(Number.parseFloat(m), "second", "s", m);
|
|
5070
5073
|
}
|
|
5071
5074
|
if (a.length === 0)
|
|
@@ -5073,7 +5076,7 @@ function ki(e, t) {
|
|
|
5073
5076
|
const f = t.colonNotation ? ":" : " ";
|
|
5074
5077
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
|
|
5075
5078
|
}
|
|
5076
|
-
const
|
|
5079
|
+
const _s = process.env.NODE_ENV === "production", jt = !_s, Rs = jt ? "gizmette.local.com" : "gizmette.com", Qt = (e, t) => {
|
|
5077
5080
|
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
5081
|
return {
|
|
5079
5082
|
dir: r,
|
|
@@ -5081,17 +5084,17 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5081
5084
|
min: a,
|
|
5082
5085
|
sec: n
|
|
5083
5086
|
};
|
|
5084
|
-
},
|
|
5087
|
+
}, $i = (e) => {
|
|
5085
5088
|
if (!e && e !== 0)
|
|
5086
5089
|
return "N/A";
|
|
5087
5090
|
const t = Qt(e, !1);
|
|
5088
5091
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
5089
|
-
},
|
|
5092
|
+
}, xi = (e) => {
|
|
5090
5093
|
if (!e && e !== 0)
|
|
5091
5094
|
return "N/A";
|
|
5092
5095
|
const t = Qt(e, !0);
|
|
5093
5096
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
5094
|
-
},
|
|
5097
|
+
}, Mi = async () => {
|
|
5095
5098
|
const e = {
|
|
5096
5099
|
/**
|
|
5097
5100
|
* A boolean value that indicates the application would like to receive the
|
|
@@ -5134,18 +5137,18 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5134
5137
|
e
|
|
5135
5138
|
);
|
|
5136
5139
|
});
|
|
5137
|
-
},
|
|
5140
|
+
}, Di = (e) => window.btoa(
|
|
5138
5141
|
encodeURIComponent(e).replace(
|
|
5139
5142
|
/%([0-9A-F]{2})/g,
|
|
5140
5143
|
function(r, s) {
|
|
5141
5144
|
return String.fromCharCode(+`0x${s}`);
|
|
5142
5145
|
}
|
|
5143
5146
|
)
|
|
5144
|
-
),
|
|
5147
|
+
), Li = (e) => decodeURIComponent(
|
|
5145
5148
|
window.atob(e).split("").map(function(t) {
|
|
5146
5149
|
return `%${`00${t.charCodeAt(0).toString(16)}`.slice(-2)}`;
|
|
5147
5150
|
}).join("")
|
|
5148
|
-
),
|
|
5151
|
+
), Ui = (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
5152
|
/* @__PURE__ */ h(
|
|
5150
5153
|
"dt",
|
|
5151
5154
|
{
|
|
@@ -5167,7 +5170,7 @@ const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.
|
|
|
5167
5170
|
}
|
|
5168
5171
|
)
|
|
5169
5172
|
] }) }, `${e}-${s}`)) : null;
|
|
5170
|
-
function
|
|
5173
|
+
function Fi({
|
|
5171
5174
|
data: e,
|
|
5172
5175
|
formatter: t = (r) => r
|
|
5173
5176
|
}) {
|
|
@@ -5179,15 +5182,15 @@ function Li({
|
|
|
5179
5182
|
);
|
|
5180
5183
|
return t(s ? s / r.length : 0);
|
|
5181
5184
|
}
|
|
5182
|
-
const
|
|
5185
|
+
const Hi = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length - 1].message.role === e, Ki = new Intl.NumberFormat("en", {
|
|
5183
5186
|
style: "decimal",
|
|
5184
5187
|
signDisplay: "never",
|
|
5185
5188
|
minimumFractionDigits: 0,
|
|
5186
5189
|
maximumFractionDigits: 0
|
|
5187
|
-
}),
|
|
5190
|
+
}), Gi = (e) => e > 0 ? Pi(e, {
|
|
5188
5191
|
secondsDecimalDigits: 2,
|
|
5189
5192
|
unitCount: 2
|
|
5190
|
-
}) : "N/A",
|
|
5193
|
+
}) : "N/A", Cs = ({
|
|
5191
5194
|
isAuthenticated: e,
|
|
5192
5195
|
extraClass: t
|
|
5193
5196
|
}) => y(
|
|
@@ -5196,7 +5199,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5196
5199
|
"flex-1 overflow-y-auto",
|
|
5197
5200
|
e ? "pt-0" : "pt-10",
|
|
5198
5201
|
t
|
|
5199
|
-
),
|
|
5202
|
+
), Os = ({
|
|
5200
5203
|
extraClass: e
|
|
5201
5204
|
} = {}) => y(
|
|
5202
5205
|
"flex flex-col",
|
|
@@ -5204,21 +5207,21 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5204
5207
|
"sm:px-5 px-2",
|
|
5205
5208
|
"transition-all ease-in-out duration-500",
|
|
5206
5209
|
e
|
|
5207
|
-
),
|
|
5210
|
+
), Bi = (e, t) => t === 1 ? e : `${e}s`, qi = (e, t) => {
|
|
5208
5211
|
let r;
|
|
5209
5212
|
return (...s) => {
|
|
5210
5213
|
window.clearTimeout(r), r = window.setTimeout(() => e(...s), t);
|
|
5211
5214
|
};
|
|
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 =
|
|
5215
|
+
}, ks = () => !!window?.__VERSINI_DIGGIDY_TAURI__, Ns = () => window.innerWidth < 403, Ps = () => window.innerWidth >= 403 && window.innerWidth <= 1220, Wi = () => {
|
|
5216
|
+
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
5217
|
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 =
|
|
5218
|
+
}, Vi = () => {
|
|
5219
|
+
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
5220
|
return e && t && r;
|
|
5218
|
-
},
|
|
5221
|
+
}, ji = () => window.matchMedia("(display-mode: standalone)").matches || window.navigator.standalone === !0, Qi = (e) => {
|
|
5219
5222
|
const t = e.replace(/([A-Z])/g, " $1");
|
|
5220
5223
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
5221
|
-
},
|
|
5224
|
+
}, Ji = ({
|
|
5222
5225
|
autoClose: e = 3e3,
|
|
5223
5226
|
containerId: t,
|
|
5224
5227
|
position: r = "top-center",
|
|
@@ -5242,7 +5245,9 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5242
5245
|
theme: c,
|
|
5243
5246
|
transition: f,
|
|
5244
5247
|
icon: d
|
|
5245
|
-
}),
|
|
5248
|
+
}), Yi = (e, t) => t === "ready" && !!e && e.length > 0, zi = (e) => {
|
|
5249
|
+
e ? document.documentElement.setAttribute(Sr, "true") : document.documentElement.removeAttribute(Sr);
|
|
5250
|
+
}, fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: Rs, applyOledMode: zi, canEvaluateModels: Yi, convertCamelCaseToReadable: Qi, convertDDToDMS: Qt, convertLatitudeToDMS: $i, convertLongitudeToDMS: xi, debounce: qi, durationFormatter: Gi, extractAverage: Fi, getCurrentGeoLocation: Mi, getLayoutPaddingClass: Os, getMessageContaintWrapperClass: Cs, isDev: jt, isLastMessageFromRole: Hi, isPWAMode: ji, isProbablyMobile: Ns, isProbablyTablet: Ps, isProbablyiPad: Vi, isProbablyiPhone: Wi, isProd: _s, isTauri: ks, numberFormatter: Ki, obfuscate: Di, pluralize: Bi, renderDataAsList: Ui, toastOptions: Ji, unObfuscate: Li }, Symbol.toStringTag, { value: "Module" })), Ir = "av-button", ft = "icon", Jt = "button", Lt = "link", Xi = ({
|
|
5246
5251
|
type: e,
|
|
5247
5252
|
size: t,
|
|
5248
5253
|
labelRight: r,
|
|
@@ -5278,7 +5283,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5278
5283
|
"h-12": t === "large" && n && (r || s)
|
|
5279
5284
|
});
|
|
5280
5285
|
}
|
|
5281
|
-
},
|
|
5286
|
+
}, Zi = ({
|
|
5282
5287
|
type: e,
|
|
5283
5288
|
size: t,
|
|
5284
5289
|
labelRight: r,
|
|
@@ -5301,7 +5306,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5301
5306
|
[i]: t === "large" && (r || s)
|
|
5302
5307
|
});
|
|
5303
5308
|
}
|
|
5304
|
-
},
|
|
5309
|
+
}, eo = ({
|
|
5305
5310
|
mode: e,
|
|
5306
5311
|
noBackground: t,
|
|
5307
5312
|
truncate: r,
|
|
@@ -5337,7 +5342,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5337
5342
|
return y("not-prose text-copy-lighter", {
|
|
5338
5343
|
truncate: r
|
|
5339
5344
|
});
|
|
5340
|
-
},
|
|
5345
|
+
}, to = ({
|
|
5341
5346
|
mode: e,
|
|
5342
5347
|
noBackground: t,
|
|
5343
5348
|
variant: r
|
|
@@ -5367,13 +5372,13 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5367
5372
|
if (r === "selected")
|
|
5368
5373
|
return "bg-action-selected-dark";
|
|
5369
5374
|
}
|
|
5370
|
-
},
|
|
5375
|
+
}, ro = ({
|
|
5371
5376
|
radius: e
|
|
5372
5377
|
}) => y({
|
|
5373
5378
|
"rounded-full": e === "large",
|
|
5374
5379
|
"rounded-md": e === "medium",
|
|
5375
5380
|
"rounded-xs": e === "small"
|
|
5376
|
-
}),
|
|
5381
|
+
}), so = ({
|
|
5377
5382
|
mode: e,
|
|
5378
5383
|
disabled: t,
|
|
5379
5384
|
variant: r
|
|
@@ -5411,7 +5416,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5411
5416
|
});
|
|
5412
5417
|
if (r === "selected")
|
|
5413
5418
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
5414
|
-
},
|
|
5419
|
+
}, ao = ({
|
|
5415
5420
|
mode: e,
|
|
5416
5421
|
disabled: t,
|
|
5417
5422
|
variant: r
|
|
@@ -5449,7 +5454,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5449
5454
|
});
|
|
5450
5455
|
if (r === "selected")
|
|
5451
5456
|
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
5452
|
-
},
|
|
5457
|
+
}, no = ({
|
|
5453
5458
|
mode: e,
|
|
5454
5459
|
noBorder: t,
|
|
5455
5460
|
variant: r
|
|
@@ -5479,14 +5484,14 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5479
5484
|
});
|
|
5480
5485
|
if (r === "selected")
|
|
5481
5486
|
return "border border-border-selected-dark";
|
|
5482
|
-
},
|
|
5487
|
+
}, io = ({
|
|
5483
5488
|
focusMode: e
|
|
5484
5489
|
}) => y("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
5485
5490
|
"focus:outline-focus-dark": e === "dark",
|
|
5486
5491
|
"focus:outline-focus-light": e === "light",
|
|
5487
5492
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
5488
5493
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
5489
|
-
}),
|
|
5494
|
+
}), oo = ({
|
|
5490
5495
|
mode: e,
|
|
5491
5496
|
raw: t,
|
|
5492
5497
|
iconClassName: r,
|
|
@@ -5513,11 +5518,11 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5513
5518
|
} : s === "selected" && (a = {
|
|
5514
5519
|
"text-copy-lighter": !0
|
|
5515
5520
|
}), y(a, r);
|
|
5516
|
-
},
|
|
5521
|
+
}, co = ({
|
|
5517
5522
|
animated: e
|
|
5518
5523
|
}) => y({
|
|
5519
5524
|
"transition-opacity duration-300 ease-in-out": e
|
|
5520
|
-
}),
|
|
5525
|
+
}), $s = ({
|
|
5521
5526
|
type: e,
|
|
5522
5527
|
className: t,
|
|
5523
5528
|
raw: r,
|
|
@@ -5535,17 +5540,17 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5535
5540
|
align: p,
|
|
5536
5541
|
radius: g,
|
|
5537
5542
|
animated: b
|
|
5538
|
-
}) => (l || (l = "primary"), r ? y(
|
|
5539
|
-
|
|
5540
|
-
|
|
5543
|
+
}) => (l || (l = "primary"), r ? y(Ir, t) : y(
|
|
5544
|
+
Ir,
|
|
5545
|
+
eo({
|
|
5541
5546
|
mode: s,
|
|
5542
5547
|
variant: l,
|
|
5543
5548
|
noBackground: u,
|
|
5544
5549
|
truncate: m
|
|
5545
5550
|
}),
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5551
|
+
to({ mode: s, noBackground: u, variant: l }),
|
|
5552
|
+
ro({ radius: g }),
|
|
5553
|
+
Xi({
|
|
5549
5554
|
type: e,
|
|
5550
5555
|
size: o,
|
|
5551
5556
|
labelRight: f,
|
|
@@ -5553,11 +5558,11 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5553
5558
|
align: p,
|
|
5554
5559
|
animated: b
|
|
5555
5560
|
}),
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
+
Zi({ type: e, size: o, labelRight: f, labelLeft: d }),
|
|
5562
|
+
no({ mode: s, variant: l, noBorder: c }),
|
|
5563
|
+
io({ focusMode: a }),
|
|
5564
|
+
so({ mode: s, variant: l, disabled: n }),
|
|
5565
|
+
ao({ mode: s, variant: l, disabled: n }),
|
|
5561
5566
|
{
|
|
5562
5567
|
"w-full": i,
|
|
5563
5568
|
"disabled:cursor-not-allowed disabled:opacity-50": n
|
|
@@ -5566,7 +5571,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5566
5571
|
"transition-[width] duration-300 ease-in": e === ft && b
|
|
5567
5572
|
}),
|
|
5568
5573
|
t
|
|
5569
|
-
)),
|
|
5574
|
+
)), lo = (e, t, r) => {
|
|
5570
5575
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
5571
5576
|
}, Yt = oe.forwardRef((e, t) => {
|
|
5572
5577
|
const { onClick: r, noInternalClick: s = !1, ...a } = e;
|
|
@@ -5575,14 +5580,14 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5575
5580
|
{
|
|
5576
5581
|
ref: t,
|
|
5577
5582
|
onClick: (n) => {
|
|
5578
|
-
|
|
5583
|
+
lo(n, s, r);
|
|
5579
5584
|
},
|
|
5580
5585
|
...a
|
|
5581
5586
|
}
|
|
5582
5587
|
);
|
|
5583
5588
|
});
|
|
5584
5589
|
Yt.displayName = "BaseButton";
|
|
5585
|
-
const
|
|
5590
|
+
const xs = oe.forwardRef(
|
|
5586
5591
|
({
|
|
5587
5592
|
children: e,
|
|
5588
5593
|
disabled: t = !1,
|
|
@@ -5598,7 +5603,7 @@ const $s = oe.forwardRef(
|
|
|
5598
5603
|
radius: u = "large",
|
|
5599
5604
|
...l
|
|
5600
5605
|
}, m) => {
|
|
5601
|
-
const p =
|
|
5606
|
+
const p = $s({
|
|
5602
5607
|
type: Jt,
|
|
5603
5608
|
mode: r,
|
|
5604
5609
|
focusMode: s,
|
|
@@ -5624,14 +5629,14 @@ const $s = oe.forwardRef(
|
|
|
5624
5629
|
);
|
|
5625
5630
|
}
|
|
5626
5631
|
);
|
|
5627
|
-
|
|
5628
|
-
function
|
|
5632
|
+
xs.displayName = "Button";
|
|
5633
|
+
function uo() {
|
|
5629
5634
|
const e = j(!1);
|
|
5630
5635
|
return W(() => (e.current = !0, () => {
|
|
5631
5636
|
e.current = !1;
|
|
5632
5637
|
}), []), X(() => e.current, []);
|
|
5633
5638
|
}
|
|
5634
|
-
function
|
|
5639
|
+
function Ms(e) {
|
|
5635
5640
|
return ze(() => e.every((t) => t == null) ? () => {
|
|
5636
5641
|
} : (t) => {
|
|
5637
5642
|
e.forEach((r) => {
|
|
@@ -5639,7 +5644,7 @@ function xs(e) {
|
|
|
5639
5644
|
});
|
|
5640
5645
|
}, [...e]);
|
|
5641
5646
|
}
|
|
5642
|
-
const
|
|
5647
|
+
const ho = {
|
|
5643
5648
|
x: 0,
|
|
5644
5649
|
y: 0,
|
|
5645
5650
|
width: 0,
|
|
@@ -5650,7 +5655,7 @@ const co = {
|
|
|
5650
5655
|
right: 0
|
|
5651
5656
|
};
|
|
5652
5657
|
function Je(e) {
|
|
5653
|
-
const t =
|
|
5658
|
+
const t = uo(), r = j(0), s = j(null), [a, n] = ie(ho), i = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
|
|
5654
5659
|
const c = o[0];
|
|
5655
5660
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
5656
5661
|
s.current && t() && n(c.contentRect);
|
|
@@ -5660,8 +5665,8 @@ function Je(e) {
|
|
|
5660
5665
|
i?.disconnect(), r.current && cancelAnimationFrame(r.current);
|
|
5661
5666
|
}), [i, e]), [s, a];
|
|
5662
5667
|
}
|
|
5663
|
-
function
|
|
5664
|
-
const t =
|
|
5668
|
+
function Ds(e) {
|
|
5669
|
+
const t = Bs();
|
|
5665
5670
|
if (!e)
|
|
5666
5671
|
return t;
|
|
5667
5672
|
if (typeof e == "number" || typeof e == "string")
|
|
@@ -5678,14 +5683,14 @@ const Ve = {
|
|
|
5678
5683
|
// w-8
|
|
5679
5684
|
large: 48
|
|
5680
5685
|
// w-12
|
|
5681
|
-
},
|
|
5686
|
+
}, fo = {
|
|
5682
5687
|
small: 16,
|
|
5683
5688
|
// px-2 x 2
|
|
5684
5689
|
medium: 24,
|
|
5685
5690
|
// px-3 x 2
|
|
5686
5691
|
large: 32
|
|
5687
5692
|
// px-4 x 2
|
|
5688
|
-
},
|
|
5693
|
+
}, mo = 2, po = 300, it = oe.forwardRef(
|
|
5689
5694
|
({
|
|
5690
5695
|
children: e,
|
|
5691
5696
|
disabled: t = !1,
|
|
@@ -5709,7 +5714,7 @@ const Ve = {
|
|
|
5709
5714
|
animated: A = !1,
|
|
5710
5715
|
...K
|
|
5711
5716
|
}, R) => {
|
|
5712
|
-
const z =
|
|
5717
|
+
const z = $s({
|
|
5713
5718
|
type: ft,
|
|
5714
5719
|
mode: r,
|
|
5715
5720
|
focusMode: s,
|
|
@@ -5726,15 +5731,15 @@ const Ve = {
|
|
|
5726
5731
|
radius: b,
|
|
5727
5732
|
variant: E,
|
|
5728
5733
|
animated: A
|
|
5729
|
-
}), C =
|
|
5734
|
+
}), C = oo({ mode: r, raw: o, iconClassName: O, variant: E }), v = co({ 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
5735
|
return Xe(() => {
|
|
5731
|
-
ce && ce.current && A && (w.current = Se.width +
|
|
5736
|
+
ce && ce.current && A && (w.current = Se.width + fo[u] + (c ? 0 : mo), T.current && !T.current.style.width && (T.current.style.width = `${Ve[u]}px`));
|
|
5732
5737
|
}, [Se, ce, u, c, A]), Xe(() => {
|
|
5733
5738
|
if (T && T.current && A) {
|
|
5734
5739
|
let ue = Ve[u];
|
|
5735
5740
|
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
5741
|
_.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
|
|
5737
|
-
},
|
|
5742
|
+
}, po * 0.8))), ue === Ve[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
|
|
5738
5743
|
}
|
|
5739
5744
|
}, [
|
|
5740
5745
|
I,
|
|
@@ -5758,7 +5763,7 @@ const Ve = {
|
|
|
5758
5763
|
...K,
|
|
5759
5764
|
children: /* @__PURE__ */ V("div", { className: x, children: [
|
|
5760
5765
|
/* @__PURE__ */ h(
|
|
5761
|
-
|
|
5766
|
+
_r,
|
|
5762
5767
|
{
|
|
5763
5768
|
label: m,
|
|
5764
5769
|
labelRef: N,
|
|
@@ -5769,7 +5774,7 @@ const Ve = {
|
|
|
5769
5774
|
),
|
|
5770
5775
|
/* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
|
|
5771
5776
|
/* @__PURE__ */ h(
|
|
5772
|
-
|
|
5777
|
+
_r,
|
|
5773
5778
|
{
|
|
5774
5779
|
label: l,
|
|
5775
5780
|
labelRef: _,
|
|
@@ -5782,7 +5787,7 @@ const Ve = {
|
|
|
5782
5787
|
}
|
|
5783
5788
|
);
|
|
5784
5789
|
}
|
|
5785
|
-
),
|
|
5790
|
+
), _r = ({
|
|
5786
5791
|
labelRef: e,
|
|
5787
5792
|
labelClass: t,
|
|
5788
5793
|
label: r,
|
|
@@ -5811,7 +5816,7 @@ try {
|
|
|
5811
5816
|
});
|
|
5812
5817
|
} catch {
|
|
5813
5818
|
}
|
|
5814
|
-
const
|
|
5819
|
+
const yo = oe.forwardRef(
|
|
5815
5820
|
({
|
|
5816
5821
|
children: e,
|
|
5817
5822
|
mode: t = "system",
|
|
@@ -5851,8 +5856,8 @@ const fo = oe.forwardRef(
|
|
|
5851
5856
|
) });
|
|
5852
5857
|
}
|
|
5853
5858
|
);
|
|
5854
|
-
|
|
5855
|
-
const Ye = "av-card",
|
|
5859
|
+
yo.displayName = "ButtonSort";
|
|
5860
|
+
const Ye = "av-card", go = ({
|
|
5856
5861
|
className: e,
|
|
5857
5862
|
headerClassName: t,
|
|
5858
5863
|
bodyClassName: r,
|
|
@@ -5892,7 +5897,7 @@ const Ye = "av-card", mo = ({
|
|
|
5892
5897
|
footer: d
|
|
5893
5898
|
};
|
|
5894
5899
|
};
|
|
5895
|
-
function
|
|
5900
|
+
function bo({
|
|
5896
5901
|
id: e,
|
|
5897
5902
|
content: t,
|
|
5898
5903
|
userAriaLabelledby: r,
|
|
@@ -5900,7 +5905,7 @@ function po({
|
|
|
5900
5905
|
}) {
|
|
5901
5906
|
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
5907
|
}
|
|
5903
|
-
const
|
|
5908
|
+
const Eo = ({
|
|
5904
5909
|
header: e,
|
|
5905
5910
|
headerClassName: t,
|
|
5906
5911
|
footer: r,
|
|
@@ -5915,7 +5920,7 @@ const yo = ({
|
|
|
5915
5920
|
...u
|
|
5916
5921
|
}) => {
|
|
5917
5922
|
let l = null, m = null;
|
|
5918
|
-
const p = typeof e == "string", g =
|
|
5923
|
+
const p = typeof e == "string", g = Ds(Ye), b = go({
|
|
5919
5924
|
className: n,
|
|
5920
5925
|
headerClassName: t,
|
|
5921
5926
|
bodyClassName: i,
|
|
@@ -5934,7 +5939,7 @@ const yo = ({
|
|
|
5934
5939
|
...u,
|
|
5935
5940
|
children: [
|
|
5936
5941
|
/* @__PURE__ */ h(
|
|
5937
|
-
|
|
5942
|
+
bo,
|
|
5938
5943
|
{
|
|
5939
5944
|
...l && { id: l },
|
|
5940
5945
|
content: e,
|
|
@@ -6004,7 +6009,7 @@ try {
|
|
|
6004
6009
|
});
|
|
6005
6010
|
} catch {
|
|
6006
6011
|
}
|
|
6007
|
-
const
|
|
6012
|
+
const wo = ({
|
|
6008
6013
|
className: e,
|
|
6009
6014
|
viewBox: t,
|
|
6010
6015
|
title: r,
|
|
@@ -6021,7 +6026,7 @@ const go = ({
|
|
|
6021
6026
|
...a,
|
|
6022
6027
|
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
6028
|
}
|
|
6024
|
-
),
|
|
6029
|
+
), So = ({
|
|
6025
6030
|
className: e,
|
|
6026
6031
|
viewBox: t,
|
|
6027
6032
|
title: r,
|
|
@@ -6047,7 +6052,7 @@ const go = ({
|
|
|
6047
6052
|
/* @__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
6053
|
]
|
|
6049
6054
|
}
|
|
6050
|
-
),
|
|
6055
|
+
), vo = ({
|
|
6051
6056
|
className: e,
|
|
6052
6057
|
viewBox: t,
|
|
6053
6058
|
title: r,
|
|
@@ -6083,7 +6088,7 @@ const go = ({
|
|
|
6083
6088
|
]
|
|
6084
6089
|
}
|
|
6085
6090
|
);
|
|
6086
|
-
},
|
|
6091
|
+
}, To = ({
|
|
6087
6092
|
className: e,
|
|
6088
6093
|
viewBox: t,
|
|
6089
6094
|
title: r,
|
|
@@ -6123,10 +6128,10 @@ try {
|
|
|
6123
6128
|
});
|
|
6124
6129
|
} catch {
|
|
6125
6130
|
}
|
|
6126
|
-
const
|
|
6131
|
+
const Ao = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createContext({
|
|
6127
6132
|
columnGap: 0,
|
|
6128
6133
|
rowGap: 0
|
|
6129
|
-
}),
|
|
6134
|
+
}), Io = ({
|
|
6130
6135
|
children: e,
|
|
6131
6136
|
className: t,
|
|
6132
6137
|
columnGap: r = 1,
|
|
@@ -6152,7 +6157,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6152
6157
|
marginLeft: r * -1 * ot + "rem",
|
|
6153
6158
|
marginTop: s * -1 * ot + "rem"
|
|
6154
6159
|
}, u = y(
|
|
6155
|
-
|
|
6160
|
+
Ao,
|
|
6156
6161
|
"box-border flex flex-wrap"
|
|
6157
6162
|
), l = { columnGap: r, rowGap: s };
|
|
6158
6163
|
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 +6234,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6229
6234
|
"lg:basis-full": e === 12 && t === "lg",
|
|
6230
6235
|
"xl:basis-full": e === 12 && t === "xl",
|
|
6231
6236
|
"2xl:basis-full": e === 12 && t === "2xl"
|
|
6232
|
-
}),
|
|
6237
|
+
}), _o = ({
|
|
6233
6238
|
className: e,
|
|
6234
6239
|
span: t
|
|
6235
6240
|
}) => {
|
|
@@ -6261,7 +6266,7 @@ const So = "av-flexgrid", je = "av-flexgrid-item", ot = 0.25, Ut = oe.createCont
|
|
|
6261
6266
|
const { columnGap: a, rowGap: n } = ct(Ut), i = {
|
|
6262
6267
|
paddingLeft: a * ot + "rem",
|
|
6263
6268
|
paddingTop: n * ot + "rem"
|
|
6264
|
-
}, o =
|
|
6269
|
+
}, o = _o({
|
|
6265
6270
|
className: t,
|
|
6266
6271
|
span: r
|
|
6267
6272
|
});
|
|
@@ -6280,7 +6285,7 @@ try {
|
|
|
6280
6285
|
});
|
|
6281
6286
|
} catch {
|
|
6282
6287
|
}
|
|
6283
|
-
const
|
|
6288
|
+
const Ls = "SET_ANNOUNCEMENT", Us = "CLEAR_ANNOUNCEMENT", Ro = {
|
|
6284
6289
|
alert: null,
|
|
6285
6290
|
alertdialog: null,
|
|
6286
6291
|
log: "polite",
|
|
@@ -6288,14 +6293,14 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6288
6293
|
progressbar: null,
|
|
6289
6294
|
status: "polite",
|
|
6290
6295
|
timer: "assertive"
|
|
6291
|
-
},
|
|
6296
|
+
}, Co = (e, t) => {
|
|
6292
6297
|
switch (t?.type) {
|
|
6293
|
-
case
|
|
6298
|
+
case Ls:
|
|
6294
6299
|
return {
|
|
6295
6300
|
...e,
|
|
6296
6301
|
announcement: t.payload
|
|
6297
6302
|
};
|
|
6298
|
-
case
|
|
6303
|
+
case Us:
|
|
6299
6304
|
return {
|
|
6300
6305
|
...e,
|
|
6301
6306
|
announcement: null
|
|
@@ -6303,14 +6308,14 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6303
6308
|
default:
|
|
6304
6309
|
return e;
|
|
6305
6310
|
}
|
|
6306
|
-
},
|
|
6311
|
+
}, Oo = ({
|
|
6307
6312
|
onAnnouncementClear: e,
|
|
6308
6313
|
dispatch: t
|
|
6309
6314
|
}) => {
|
|
6310
6315
|
t({
|
|
6311
|
-
type:
|
|
6316
|
+
type: Us
|
|
6312
6317
|
}), typeof e == "function" && e();
|
|
6313
|
-
},
|
|
6318
|
+
}, Rr = ({
|
|
6314
6319
|
children: e,
|
|
6315
6320
|
clearAnnouncementDelay: t,
|
|
6316
6321
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -6318,16 +6323,16 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6318
6323
|
dispatch: a
|
|
6319
6324
|
}) => {
|
|
6320
6325
|
clearTimeout(r.current), e !== null && a({
|
|
6321
|
-
type:
|
|
6326
|
+
type: Ls,
|
|
6322
6327
|
payload: e
|
|
6323
6328
|
}), t && (r.current = setTimeout(
|
|
6324
|
-
() =>
|
|
6329
|
+
() => Oo({
|
|
6325
6330
|
onAnnouncementClear: s,
|
|
6326
6331
|
dispatch: a
|
|
6327
6332
|
}),
|
|
6328
6333
|
t
|
|
6329
6334
|
));
|
|
6330
|
-
},
|
|
6335
|
+
}, ko = ({
|
|
6331
6336
|
children: e,
|
|
6332
6337
|
announcementTimeoutRef: t,
|
|
6333
6338
|
announcementDelay: r,
|
|
@@ -6336,13 +6341,13 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6336
6341
|
onAnnouncementClear: n,
|
|
6337
6342
|
dispatch: i
|
|
6338
6343
|
}) => {
|
|
6339
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
6344
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Rr, r, {
|
|
6340
6345
|
children: e,
|
|
6341
6346
|
clearAnnouncementDelay: s,
|
|
6342
6347
|
clearAnnouncementTimeoutRef: a,
|
|
6343
6348
|
onAnnouncementClear: n,
|
|
6344
6349
|
dispatch: i
|
|
6345
|
-
}) :
|
|
6350
|
+
}) : Rr({
|
|
6346
6351
|
children: e,
|
|
6347
6352
|
clearAnnouncementDelay: s,
|
|
6348
6353
|
clearAnnouncementTimeoutRef: a,
|
|
@@ -6350,7 +6355,7 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6350
6355
|
dispatch: i
|
|
6351
6356
|
});
|
|
6352
6357
|
};
|
|
6353
|
-
function
|
|
6358
|
+
function Fs({
|
|
6354
6359
|
children: e,
|
|
6355
6360
|
className: t,
|
|
6356
6361
|
politeness: r,
|
|
@@ -6361,12 +6366,12 @@ function Us({
|
|
|
6361
6366
|
visible: o,
|
|
6362
6367
|
...c
|
|
6363
6368
|
}) {
|
|
6364
|
-
const f = j(null), d = j(null), [u, l] =
|
|
6369
|
+
const f = j(null), d = j(null), [u, l] = Nr(Co, {
|
|
6365
6370
|
announcement: null
|
|
6366
6371
|
});
|
|
6367
6372
|
let m = r;
|
|
6368
|
-
typeof m > "u" && (m = s ?
|
|
6369
|
-
|
|
6373
|
+
typeof m > "u" && (m = s ? Ro[s] : "assertive"), W(() => {
|
|
6374
|
+
ko({
|
|
6370
6375
|
announcementTimeoutRef: f,
|
|
6371
6376
|
announcementDelay: a,
|
|
6372
6377
|
children: e,
|
|
@@ -6408,21 +6413,21 @@ try {
|
|
|
6408
6413
|
});
|
|
6409
6414
|
} catch {
|
|
6410
6415
|
}
|
|
6411
|
-
const
|
|
6416
|
+
const Hs = "av-text-input", No = "av-text-input-wrapper", Rt = "av-text-input-helper-text", Po = ({
|
|
6412
6417
|
mode: e
|
|
6413
6418
|
}) => y({
|
|
6414
6419
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
|
6415
6420
|
"bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
|
|
6416
6421
|
"bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
|
|
6417
6422
|
"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
|
-
}),
|
|
6423
|
+
}), $o = ({
|
|
6419
6424
|
focusMode: e
|
|
6420
6425
|
}) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
|
|
6421
6426
|
"focus:outline-focus-dark": e === "dark",
|
|
6422
6427
|
"focus:outline-focus-light": e === "light",
|
|
6423
6428
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
6424
6429
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
6425
|
-
}),
|
|
6430
|
+
}), xo = ({
|
|
6426
6431
|
noBorder: e,
|
|
6427
6432
|
error: t
|
|
6428
6433
|
}) => y("border-2", {
|
|
@@ -6430,7 +6435,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6430
6435
|
"focus:border-border-dark": !e && t,
|
|
6431
6436
|
"border-border-error-dark": !e && t,
|
|
6432
6437
|
"border-transparent": e
|
|
6433
|
-
}),
|
|
6438
|
+
}), Mo = ({
|
|
6434
6439
|
disabled: e,
|
|
6435
6440
|
raw: t,
|
|
6436
6441
|
error: r,
|
|
@@ -6454,7 +6459,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6454
6459
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": s === "system",
|
|
6455
6460
|
"text-copy-lighter dark:text-copy-error-dark": s === "alt-system"
|
|
6456
6461
|
});
|
|
6457
|
-
},
|
|
6462
|
+
}, Do = ({
|
|
6458
6463
|
error: e,
|
|
6459
6464
|
raw: t,
|
|
6460
6465
|
mode: r,
|
|
@@ -6481,7 +6486,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6481
6486
|
"text-copy-error-dark dark:text-copy-error-light dark:bg-surface-darker": r === "system",
|
|
6482
6487
|
"dark:text-copy-error-dark text-copy-error-light bg-surface-darker": r === "alt-system"
|
|
6483
6488
|
});
|
|
6484
|
-
},
|
|
6489
|
+
}, Lo = ({
|
|
6485
6490
|
className: e,
|
|
6486
6491
|
inputClassName: t,
|
|
6487
6492
|
raw: r,
|
|
@@ -6495,7 +6500,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6495
6500
|
}) => {
|
|
6496
6501
|
const d = r ? e : y(
|
|
6497
6502
|
"relative flex w-full flex-col justify-center",
|
|
6498
|
-
|
|
6503
|
+
No,
|
|
6499
6504
|
e
|
|
6500
6505
|
);
|
|
6501
6506
|
let u = "";
|
|
@@ -6517,22 +6522,22 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6517
6522
|
break;
|
|
6518
6523
|
}
|
|
6519
6524
|
const l = r ? y(t) : y(
|
|
6520
|
-
|
|
6525
|
+
Hs,
|
|
6521
6526
|
u,
|
|
6522
6527
|
"rounded-md text-base px-4",
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6528
|
+
Po({ mode: i }),
|
|
6529
|
+
$o({ focusMode: o }),
|
|
6530
|
+
xo({ noBorder: a, error: n }),
|
|
6526
6531
|
{
|
|
6527
6532
|
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
6528
6533
|
},
|
|
6529
6534
|
t
|
|
6530
|
-
), m = r ? void 0 : "sr-only", p =
|
|
6535
|
+
), m = r ? void 0 : "sr-only", p = Mo({
|
|
6531
6536
|
disabled: s,
|
|
6532
6537
|
raw: r,
|
|
6533
6538
|
error: n,
|
|
6534
6539
|
mode: i
|
|
6535
|
-
}), g =
|
|
6540
|
+
}), g = Do({
|
|
6536
6541
|
error: n,
|
|
6537
6542
|
raw: r,
|
|
6538
6543
|
mode: i,
|
|
@@ -6568,13 +6573,13 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6568
6573
|
size: E = "md",
|
|
6569
6574
|
...O
|
|
6570
6575
|
}, A) => {
|
|
6571
|
-
const [K, R] = Je(), [z, C] = ie(0), v =
|
|
6576
|
+
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
6577
|
xs: { label: "-25px", helperText: "30px" },
|
|
6573
6578
|
sm: { label: "-29px", helperText: "34px" },
|
|
6574
6579
|
md: { label: "-33px", helperText: "38px" },
|
|
6575
6580
|
lg: { label: "-15px", helperText: "22px" },
|
|
6576
6581
|
xl: { label: "-19px", helperText: "25px" }
|
|
6577
|
-
}, J =
|
|
6582
|
+
}, J = Lo({
|
|
6578
6583
|
className: n,
|
|
6579
6584
|
inputClassName: i,
|
|
6580
6585
|
error: s,
|
|
@@ -6647,12 +6652,12 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", Rt = "av-text-input-he
|
|
|
6647
6652
|
children: g
|
|
6648
6653
|
}
|
|
6649
6654
|
),
|
|
6650
|
-
s && p && /* @__PURE__ */ h(
|
|
6655
|
+
s && p && /* @__PURE__ */ h(Fs, { politeness: "polite", clearAnnouncementDelay: 500, children: x })
|
|
6651
6656
|
] });
|
|
6652
6657
|
}
|
|
6653
6658
|
);
|
|
6654
6659
|
zt.displayName = "TextInput";
|
|
6655
|
-
const
|
|
6660
|
+
const Uo = 500, Fo = 5e3, Ho = 2e4, Ks = oe.forwardRef(
|
|
6656
6661
|
({
|
|
6657
6662
|
name: e,
|
|
6658
6663
|
disabled: t,
|
|
@@ -6669,19 +6674,19 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6669
6674
|
const [l, m] = ie(!0), [p, g] = ie({
|
|
6670
6675
|
message: null,
|
|
6671
6676
|
politeness: null
|
|
6672
|
-
}), b = j(!0), E = j(null), O = j(null), A =
|
|
6677
|
+
}), b = j(!0), E = j(null), O = j(null), A = Ms([u, O]), K = l ? "Show" : "Hide", R = () => {
|
|
6673
6678
|
E.current && clearTimeout(E.current), b.current || (E.current = setTimeout(() => {
|
|
6674
6679
|
b.current = !0, m(!0), g({
|
|
6675
|
-
announcementTimeout:
|
|
6680
|
+
announcementTimeout: Fo,
|
|
6676
6681
|
politeness: "polite",
|
|
6677
6682
|
message: `${r} hiding characters`
|
|
6678
6683
|
}), a && a(!0);
|
|
6679
|
-
},
|
|
6684
|
+
}, Ho));
|
|
6680
6685
|
}, z = (I) => {
|
|
6681
6686
|
I.preventDefault();
|
|
6682
6687
|
const N = !b.current;
|
|
6683
6688
|
b.current = N, R(), m(N), g({
|
|
6684
|
-
announcementTimeout:
|
|
6689
|
+
announcementTimeout: Uo,
|
|
6685
6690
|
politeness: "assertive",
|
|
6686
6691
|
message: N ? "Characters hidden" : "Characters showing"
|
|
6687
6692
|
}), a && a(N);
|
|
@@ -6697,7 +6702,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6697
6702
|
};
|
|
6698
6703
|
return W(() => () => {
|
|
6699
6704
|
E.current && clearTimeout(E.current);
|
|
6700
|
-
}, []), /* @__PURE__ */ V(
|
|
6705
|
+
}, []), /* @__PURE__ */ V(kr, { children: [
|
|
6701
6706
|
/* @__PURE__ */ h(
|
|
6702
6707
|
zt,
|
|
6703
6708
|
{
|
|
@@ -6721,7 +6726,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6721
6726
|
}
|
|
6722
6727
|
),
|
|
6723
6728
|
/* @__PURE__ */ h(
|
|
6724
|
-
|
|
6729
|
+
Fs,
|
|
6725
6730
|
{
|
|
6726
6731
|
role: "status",
|
|
6727
6732
|
politeness: p.politeness,
|
|
@@ -6732,7 +6737,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
|
6732
6737
|
] });
|
|
6733
6738
|
}
|
|
6734
6739
|
);
|
|
6735
|
-
|
|
6740
|
+
Ks.displayName = "TextInputMask";
|
|
6736
6741
|
/*!
|
|
6737
6742
|
@versini/ui-textinput v5.0.6
|
|
6738
6743
|
© 2025 gizmette.com
|
|
@@ -6746,9 +6751,9 @@ try {
|
|
|
6746
6751
|
});
|
|
6747
6752
|
} catch {
|
|
6748
6753
|
}
|
|
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.`,
|
|
6754
|
+
const Ko = "ASK! ME! ANYTHING!", Go = "Log in with a password", Bo = "Log in with a Passkey", ml = "Log out", qo = "Password", pl = "Usage", yl = "Profile", gl = "Settings", bl = "Chat history", El = "About", Xt = "Type your message here.", wl = Xt, Sl = `${Xt}
|
|
6755
|
+
Press Enter to send it or Shift+Enter for new line.`, vl = `${Xt}
|
|
6756
|
+
Press Ctrl+Enter to send it or Enter for new line.`, Tl = "{{clipboard}}", P = "Review important details.", Al = [
|
|
6752
6757
|
`Sometimes, ${k} just makes stuff up. ${P}`,
|
|
6753
6758
|
`${k} may invent facts on the fly. ${P}`,
|
|
6754
6759
|
`${k} may be confidently wrong. ${P}`,
|
|
@@ -6769,17 +6774,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6769
6774
|
`Sometimes, ${k} howls at the moon. ${P}`,
|
|
6770
6775
|
`${k} may dig up imaginary bones. ${P}`,
|
|
6771
6776
|
`${k} may sniff out nonsense. ${P}`
|
|
6772
|
-
],
|
|
6777
|
+
], 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
6778
|
0: ["January", "February", "March"],
|
|
6774
6779
|
3: ["April", "May", "June"],
|
|
6775
6780
|
6: ["July", "August", "September"],
|
|
6776
6781
|
9: ["October", "November", "December"]
|
|
6777
|
-
},
|
|
6782
|
+
}, $l = {
|
|
6778
6783
|
0: ["Jan", "Feb", "Mar"],
|
|
6779
6784
|
3: ["Apr", "May", "Jun"],
|
|
6780
6785
|
6: ["Jul", "Aug", "Sep"],
|
|
6781
6786
|
9: ["Oct", "Nov", "Dec"]
|
|
6782
|
-
},
|
|
6787
|
+
}, xl = {
|
|
6783
6788
|
PREFERENCES: {
|
|
6784
6789
|
TITLE: "User profile",
|
|
6785
6790
|
USERNAME: "Username",
|
|
@@ -6829,7 +6834,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6829
6834
|
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
6835
|
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
6836
|
}
|
|
6832
|
-
},
|
|
6837
|
+
}, Wo = ({
|
|
6833
6838
|
className: e,
|
|
6834
6839
|
isCapabilitiesSuccess: t,
|
|
6835
6840
|
capabilities: r
|
|
@@ -6841,7 +6846,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6841
6846
|
"flex items-center justify-center text-slate-300"
|
|
6842
6847
|
),
|
|
6843
6848
|
children: [
|
|
6844
|
-
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(
|
|
6849
|
+
/* @__PURE__ */ h("div", { className: "basis-1/4", children: /* @__PURE__ */ h(wo, {}) }),
|
|
6845
6850
|
/* @__PURE__ */ V("div", { className: "prose prose-sm prose-light md:prose-base prose-h1:mb-0 prose-h2:mt-0", children: [
|
|
6846
6851
|
/* @__PURE__ */ h("h1", { children: k }),
|
|
6847
6852
|
/* @__PURE__ */ h(
|
|
@@ -6850,14 +6855,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6850
6855
|
className: y({
|
|
6851
6856
|
"text-red-500": t && r?.runningMode === "development"
|
|
6852
6857
|
}),
|
|
6853
|
-
children:
|
|
6858
|
+
children: Ko
|
|
6854
6859
|
}
|
|
6855
6860
|
)
|
|
6856
6861
|
] })
|
|
6857
6862
|
]
|
|
6858
6863
|
}
|
|
6859
|
-
),
|
|
6860
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } =
|
|
6864
|
+
), Vo = () => {
|
|
6865
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = ls(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
|
|
6861
6866
|
username: "",
|
|
6862
6867
|
password: ""
|
|
6863
6868
|
}), u = async (l) => {
|
|
@@ -6869,17 +6874,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6869
6874
|
}, 500);
|
|
6870
6875
|
}), W(() => {
|
|
6871
6876
|
t && i(t);
|
|
6872
|
-
}, [t]), /* @__PURE__ */ V("main", { className:
|
|
6877
|
+
}, [t]), /* @__PURE__ */ V("main", { className: Os({ extraClass: "mt-5" }), children: [
|
|
6873
6878
|
/* @__PURE__ */ h(
|
|
6874
6879
|
"div",
|
|
6875
6880
|
{
|
|
6876
|
-
className:
|
|
6881
|
+
className: Cs({
|
|
6877
6882
|
extraClass: "rounded-md pb-10"
|
|
6878
6883
|
}),
|
|
6879
|
-
children: /* @__PURE__ */ h(
|
|
6884
|
+
children: /* @__PURE__ */ h(Wo, {})
|
|
6880
6885
|
}
|
|
6881
6886
|
),
|
|
6882
|
-
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(
|
|
6887
|
+
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(Io, { alignHorizontal: "center", children: /* @__PURE__ */ h(ye, { span: 6, children: /* @__PURE__ */ V(Eo, { mode: "dark", children: [
|
|
6883
6888
|
/* @__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
6889
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6885
6890
|
zt,
|
|
@@ -6903,7 +6908,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6903
6908
|
}
|
|
6904
6909
|
) }),
|
|
6905
6910
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6906
|
-
|
|
6911
|
+
Ks,
|
|
6907
6912
|
{
|
|
6908
6913
|
className: "mt-7",
|
|
6909
6914
|
required: !0,
|
|
@@ -6913,14 +6918,14 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6913
6918
|
mode: "dark",
|
|
6914
6919
|
focusMode: "light",
|
|
6915
6920
|
name: "password",
|
|
6916
|
-
label:
|
|
6921
|
+
label: qo,
|
|
6917
6922
|
rightElement: /* @__PURE__ */ h(
|
|
6918
6923
|
it,
|
|
6919
6924
|
{
|
|
6920
6925
|
focusMode: "light",
|
|
6921
6926
|
mode: "dark",
|
|
6922
6927
|
label: o ? "Show" : "Hide",
|
|
6923
|
-
children: o ? /* @__PURE__ */ h(
|
|
6928
|
+
children: o ? /* @__PURE__ */ h(To, {}) : /* @__PURE__ */ h(So, {})
|
|
6924
6929
|
}
|
|
6925
6930
|
),
|
|
6926
6931
|
onMaskChange: c,
|
|
@@ -6935,7 +6940,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6935
6940
|
}
|
|
6936
6941
|
) }),
|
|
6937
6942
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6938
|
-
|
|
6943
|
+
xs,
|
|
6939
6944
|
{
|
|
6940
6945
|
mode: "dark",
|
|
6941
6946
|
focusMode: "light",
|
|
@@ -6943,10 +6948,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6943
6948
|
noBorder: !0,
|
|
6944
6949
|
type: "submit",
|
|
6945
6950
|
className: "mt-7",
|
|
6946
|
-
children:
|
|
6951
|
+
children: Go
|
|
6947
6952
|
}
|
|
6948
6953
|
) }),
|
|
6949
|
-
!
|
|
6954
|
+
!ks() && /* @__PURE__ */ V(kr, { children: [
|
|
6950
6955
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
6951
6956
|
/* @__PURE__ */ h(ye, { span: 12, children: /* @__PURE__ */ h(
|
|
6952
6957
|
it,
|
|
@@ -6956,49 +6961,49 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
6956
6961
|
focusMode: "light",
|
|
6957
6962
|
fullWidth: !0,
|
|
6958
6963
|
className: "mb-4",
|
|
6959
|
-
labelRight:
|
|
6964
|
+
labelRight: Bo,
|
|
6960
6965
|
onClick: r,
|
|
6961
|
-
children: /* @__PURE__ */ h(
|
|
6966
|
+
children: /* @__PURE__ */ h(vo, { size: "size-7" })
|
|
6962
6967
|
}
|
|
6963
6968
|
) })
|
|
6964
6969
|
] })
|
|
6965
6970
|
] }) }) }) })
|
|
6966
6971
|
] });
|
|
6967
|
-
},
|
|
6972
|
+
}, jo = new URL(document.location.href).searchParams, Cr = !!jo.get("debug") || !1, Qo = Ws(() => import(
|
|
6968
6973
|
/* webpackChunkName: "LazyApp" */
|
|
6969
|
-
"./App.
|
|
6970
|
-
).then((e) => e.App)),
|
|
6974
|
+
"./App.DcQF9Hq9.js"
|
|
6975
|
+
).then((e) => e.App)), Jo = new ma(), Or = ({
|
|
6971
6976
|
isComponent: e,
|
|
6972
6977
|
headerHeight: t
|
|
6973
6978
|
}) => {
|
|
6974
|
-
const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } =
|
|
6975
|
-
return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(
|
|
6976
|
-
|
|
6979
|
+
const { isAuthenticated: r, isLoading: s, user: a, getAccessToken: n } = ls();
|
|
6980
|
+
return s ? /* @__PURE__ */ h("div", {}) : r ? /* @__PURE__ */ h(qs, { fallback: /* @__PURE__ */ h("div", {}), children: /* @__PURE__ */ h(pa, { client: Jo, children: /* @__PURE__ */ h(
|
|
6981
|
+
Ai,
|
|
6977
6982
|
{
|
|
6978
6983
|
user: a?.username,
|
|
6979
6984
|
getAccessToken: n,
|
|
6980
|
-
children: /* @__PURE__ */ h(
|
|
6985
|
+
children: /* @__PURE__ */ h(Qo, { isComponent: e, headerHeight: t })
|
|
6981
6986
|
}
|
|
6982
|
-
) }) }) : /* @__PURE__ */ h(
|
|
6983
|
-
},
|
|
6987
|
+
) }) }) : /* @__PURE__ */ h(Vo, {});
|
|
6988
|
+
}, Yo = ({
|
|
6984
6989
|
isComponent: e = !1,
|
|
6985
6990
|
headerHeight: t = 0,
|
|
6986
|
-
domain: r =
|
|
6991
|
+
domain: r = Rs
|
|
6987
6992
|
}) => (W(() => {
|
|
6988
|
-
e ||
|
|
6993
|
+
e || hs().catch((s) => {
|
|
6989
6994
|
console.error("[SW] Failed to register service worker:", s);
|
|
6990
6995
|
});
|
|
6991
6996
|
}, [e]), jt ? /* @__PURE__ */ h(
|
|
6992
6997
|
wr,
|
|
6993
6998
|
{
|
|
6994
|
-
clientId:
|
|
6999
|
+
clientId: vr,
|
|
6995
7000
|
domain: r,
|
|
6996
|
-
debug:
|
|
7001
|
+
debug: Cr,
|
|
6997
7002
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
6998
|
-
children: /* @__PURE__ */ h(
|
|
7003
|
+
children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t })
|
|
6999
7004
|
}
|
|
7000
|
-
) : /* @__PURE__ */ h(wr, { clientId:
|
|
7001
|
-
|
|
7005
|
+
) : /* @__PURE__ */ h(wr, { clientId: vr, domain: r, debug: Cr, children: /* @__PURE__ */ h(Or, { isComponent: e, headerHeight: t }) })), Ml = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
|
|
7006
|
+
Yo,
|
|
7002
7007
|
{
|
|
7003
7008
|
isComponent: !0,
|
|
7004
7009
|
domain: e,
|
|
@@ -7006,133 +7011,133 @@ Press Ctrl+Enter to send it or Enter for new line.`, vl = "{{clipboard}}", P = "
|
|
|
7006
7011
|
}
|
|
7007
7012
|
);
|
|
7008
7013
|
export {
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
nc as ERROR_MESSAGE,
|
|
7014
|
+
k as $,
|
|
7015
|
+
El as ABOUT_TITLE,
|
|
7016
|
+
dc as ACTION_RESET_PROMPT,
|
|
7017
|
+
cc as ACTION_SEARCH,
|
|
7018
|
+
lc as ACTION_SORT,
|
|
7019
|
+
uc as ACTION_TOGGLE_PROMPT,
|
|
7020
|
+
Nl as APP_CLASSNAME,
|
|
7021
|
+
xs as C,
|
|
7022
|
+
xl as CARDS,
|
|
7023
|
+
Tl as CLIPBOARD_PROMPT,
|
|
7024
|
+
Rc as DEFAULT_ICON_ACTION_SIZE,
|
|
7025
|
+
Fc as E,
|
|
7026
|
+
oc as ERROR_MESSAGE,
|
|
7023
7027
|
Jc as Et,
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7028
|
+
Kc as F,
|
|
7029
|
+
Al as FOOTER_DISCLAIMERS,
|
|
7030
|
+
bl as HISTORY_TITLE,
|
|
7027
7031
|
mt as I,
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7032
|
+
Ac as INFINITE_SCROLL_LIMIT,
|
|
7033
|
+
Tc as INFINITE_SCROLL_THRESHOLD,
|
|
7034
|
+
Pc as INPUT_BOTTOM_OFFSET,
|
|
7035
|
+
Mc as INPUT_BOTTOM_OFFSET_EXTRA,
|
|
7036
|
+
xc as INPUT_BOTTOM_OFFSET_IPAD,
|
|
7037
|
+
$c as INPUT_BOTTOM_OFFSET_IPHONE,
|
|
7038
|
+
vl as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
|
|
7039
|
+
Sl as INPUT_PLACEHOLDER_TEXT_ENTER,
|
|
7040
|
+
wl as INPUT_PLACEHOLDER_TEXT_MOBILE,
|
|
7037
7041
|
qc as J,
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
mc as
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
Go as Logo,
|
|
7042
|
+
Io as L,
|
|
7043
|
+
Sc as LOCAL_STORAGE_CHAT_ID,
|
|
7044
|
+
bc as LOCAL_STORAGE_FAVORITES_ONLY,
|
|
7045
|
+
vc as LOCAL_STORAGE_OLED_MODE,
|
|
7046
|
+
us as LOCAL_STORAGE_PREFIX,
|
|
7047
|
+
Ec as LOCAL_STORAGE_PRIVATE_DISCLOSURE,
|
|
7048
|
+
wc as LOCAL_STORAGE_REASONING_DISCLOSURE,
|
|
7049
|
+
hc as LOCAL_STORAGE_SEARCH,
|
|
7050
|
+
fc as LOCAL_STORAGE_SORT,
|
|
7051
|
+
gc as LOCAL_STORAGE_SORT_MEMORY_COLUMN,
|
|
7052
|
+
yc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
|
|
7053
|
+
mc as LOCAL_STORAGE_SORT_TIMESTAMP,
|
|
7054
|
+
pc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
|
|
7055
|
+
ml as LOG_OUT,
|
|
7056
|
+
Wo as Logo,
|
|
7054
7057
|
dt as O,
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7058
|
+
yl as PROFILE_TITLE,
|
|
7059
|
+
Il as PROMPTS_DESCRIPTION,
|
|
7060
|
+
Ic as PROMPT_CLASSNAME,
|
|
7061
|
+
_c as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
7062
|
+
Wc as Q,
|
|
7063
|
+
Eo as S,
|
|
7061
7064
|
B as SERVICE_TYPES,
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
zt as Y
|
|
7065
|
+
gl as SETTINGS_TITLE,
|
|
7066
|
+
Ml as SassySaint,
|
|
7067
|
+
kl as TOAST_CACHE_DISABLED,
|
|
7068
|
+
Ol as TOAST_CACHE_ENABLED,
|
|
7069
|
+
Rl as TOAST_CHAT_DELETED,
|
|
7070
|
+
Cl as TOAST_CHAT_SAVED,
|
|
7071
|
+
_l as TOAST_PROVIDER_CHANGED,
|
|
7072
|
+
Pl as TRIMESTERS,
|
|
7073
|
+
$l as TRIMESTERS_SHORT,
|
|
7074
|
+
Oc as UI_BUTTON_SCROLL_BUFFER,
|
|
7075
|
+
kc as UI_DEFAULT_MAIN_HEIGHT,
|
|
7076
|
+
Nc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
|
|
7077
|
+
Cc as UI_FOOTER_BUFFER,
|
|
7078
|
+
pl as USAGE_TITLE,
|
|
7079
|
+
Ei as V,
|
|
7080
|
+
zt as Y,
|
|
7078
7081
|
Bc as Z,
|
|
7079
|
-
|
|
7082
|
+
zi as applyOledMode,
|
|
7083
|
+
Hc as b,
|
|
7084
|
+
yo as b$1,
|
|
7080
7085
|
ht as c,
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7086
|
+
Yi as canEvaluateModels,
|
|
7087
|
+
Qi as convertCamelCaseToReadable,
|
|
7088
|
+
qi as debounce,
|
|
7089
|
+
Uc as e,
|
|
7085
7090
|
Qc as et,
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7091
|
+
Lc as getCacheInfo,
|
|
7092
|
+
Mi as getCurrentGeoLocation,
|
|
7093
|
+
Os as getLayoutPaddingClass,
|
|
7094
|
+
Cs as getMessageContaintWrapperClass,
|
|
7090
7095
|
me as graphQLRequest,
|
|
7091
7096
|
Je as h,
|
|
7092
|
-
|
|
7093
|
-
|
|
7097
|
+
Dc as handleServiceWorkerToggle,
|
|
7098
|
+
Ds as i,
|
|
7094
7099
|
jt as isDev,
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7100
|
+
ji as isPWAMode,
|
|
7101
|
+
Ns as isProbablyMobile,
|
|
7102
|
+
Vi as isProbablyiPad,
|
|
7103
|
+
Wi as isProbablyiPhone,
|
|
7099
7104
|
Dt as isServiceWorkerEnabled,
|
|
7100
|
-
|
|
7105
|
+
ks as isTauri,
|
|
7101
7106
|
xe as it,
|
|
7102
7107
|
ye as j,
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7108
|
+
Gc as j$1,
|
|
7109
|
+
vo as l,
|
|
7110
|
+
ls as n,
|
|
7111
|
+
Ki as numberFormatter,
|
|
7112
|
+
Ms as o,
|
|
7113
|
+
Di as obfuscate,
|
|
7109
7114
|
Vc as ot,
|
|
7110
|
-
|
|
7115
|
+
Bi as pluralize,
|
|
7111
7116
|
He as r,
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
zc as
|
|
7117
|
+
Ui as renderDataAsList,
|
|
7118
|
+
Yc as rt,
|
|
7119
|
+
vi as serverUrl,
|
|
7120
|
+
zc as setNewProvider,
|
|
7121
|
+
Xc as setUserPlan,
|
|
7116
7122
|
jc as st,
|
|
7117
7123
|
it as te,
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7124
|
+
Li as unObfuscate,
|
|
7125
|
+
el as useChangelogs,
|
|
7126
|
+
sl as useChat,
|
|
7127
|
+
rl as useChatsHistory,
|
|
7128
|
+
ol as useChatsUsage,
|
|
7129
|
+
dl as useDeleteAllMemories,
|
|
7130
|
+
nl as useDeleteChat,
|
|
7131
|
+
ul as useDeleteMemory,
|
|
7132
|
+
hl as useEntitlements,
|
|
7127
7133
|
he as useQueryClient,
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7131
|
-
|
|
7132
|
-
|
|
7133
|
-
|
|
7134
|
-
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
Us as x$1
|
|
7134
|
+
al as useSaveChat,
|
|
7135
|
+
Zc as useServerCapabilities,
|
|
7136
|
+
il as useToggleFavoriteChat,
|
|
7137
|
+
ll as useUpdateMemory,
|
|
7138
|
+
tl as useUserChatStats,
|
|
7139
|
+
cl as useUserMemories,
|
|
7140
|
+
Ti as useUserPreferences,
|
|
7141
|
+
fl as utilities,
|
|
7142
|
+
Fs as x
|
|
7138
7143
|
};
|