@versini/sassysaint 8.69.0 → 8.70.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.C1qlLGOL.js → AboutChangelog._T5Lr2_6.js} +2 -2
- package/dist/chunks/{AboutEntry.MVgAFIQi.js → AboutEntry.DJ0OUM4_.js} +7 -7
- package/dist/chunks/{App.DnIeRbwI.js → App.CcqDGZun.js} +264 -261
- package/dist/chunks/{Chart.D4LA295Y.js → Chart.Dm81lz3L.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.B9uKu0Zq.js → ChatBubbleAssistant.D4Ru1U9N.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DBArpWQj.js → ChatBubbleUser.CvpUTP0y.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.DpDPvpwx.js → ChatHistoryTable.CDC3cvyT.js} +3 -3
- package/dist/chunks/{HistoryEntry.DyYYZjb-.js → HistoryEntry.C_3ek905.js} +3 -3
- package/dist/chunks/{ProfileEntry.BkfA5ilN.js → ProfileEntry.BcL78DD5.js} +2 -2
- package/dist/chunks/SettingsEntry.F8OD9jcf.js +444 -0
- package/dist/chunks/{Table.BSsGkgB1.js → Table.DvDzjCKJ.js} +2 -2
- package/dist/chunks/{UsageEntry.DA9Z1z3A.js → UsageEntry.BJMW3Rxc.js} +3 -3
- package/dist/chunks/UserMemoriesPanel.BByjrVlZ.js +347 -0
- package/dist/chunks/{index.DH2l4xnG.js → index.5sFEsLHg.js} +1 -1
- package/dist/chunks/{index.B3XB6cTq.js → index.B-4Q-F7F.js} +2 -2
- package/dist/chunks/{index.CaDLl4vX.js → index.BE-5S88E.js} +1 -1
- package/dist/chunks/{index.DXaLvF3n.js → index.ByjDYmg9.js} +487 -455
- package/dist/chunks/{index.BtXviUD3.js → index.CRvAVi49.js} +3 -3
- package/dist/chunks/index.CpmMOFcw.js +357 -0
- package/dist/chunks/{index.CKRmoShZ.js → index.DAjlwxaV.js} +1 -1
- package/dist/chunks/{index.Dta1BrG6.js → index.DZlzg3MC.js} +1 -1
- package/dist/chunks/{useMarkdown.BAKJP0y9.js → useMarkdown.4pam55Dz.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunks/SettingsEntry.CfM4w4sE.js +0 -794
- package/dist/chunks/UserMemoriesPanel.BI0GoJUN.js +0 -208
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as h, jsxs as q, Fragment as
|
|
1
|
+
import { jsx as h, jsxs as q, Fragment as Cr } from "react/jsx-runtime";
|
|
2
2
|
import * as H from "react";
|
|
3
|
-
import
|
|
3
|
+
import oe, { createContext as Lt, useReducer as Or, useCallback as z, useRef as j, useEffect as W, useSyncExternalStore as Ks, useContext as it, useState as ie, useMemo as Ye, useId as Gs, useLayoutEffect as ze, Suspense as Bs, lazy as Ws } from "react";
|
|
4
4
|
import y from "clsx";
|
|
5
5
|
var ke = class {
|
|
6
6
|
constructor() {
|
|
@@ -73,7 +73,7 @@ function Qs(e, t) {
|
|
|
73
73
|
function _t(e) {
|
|
74
74
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function kr(e, t) {
|
|
77
77
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
78
78
|
}
|
|
79
79
|
function de(e, t) {
|
|
@@ -82,7 +82,7 @@ function de(e, t) {
|
|
|
82
82
|
function Q(e, t) {
|
|
83
83
|
return typeof e == "function" ? e(t) : e;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Zt(e, t) {
|
|
86
86
|
const {
|
|
87
87
|
type: r = "all",
|
|
88
88
|
exact: s,
|
|
@@ -105,7 +105,7 @@ function Xt(e, t) {
|
|
|
105
105
|
}
|
|
106
106
|
return !(typeof o == "boolean" && t.isStale() !== o || a && a !== t.state.fetchStatus || n && !n(t));
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function er(e, t) {
|
|
109
109
|
const { exact: r, status: s, predicate: a, mutationKey: n } = e;
|
|
110
110
|
if (n) {
|
|
111
111
|
if (!t.options.mutationKey)
|
|
@@ -134,7 +134,7 @@ var Js = Object.prototype.hasOwnProperty;
|
|
|
134
134
|
function Rt(e, t) {
|
|
135
135
|
if (e === t)
|
|
136
136
|
return e;
|
|
137
|
-
const r =
|
|
137
|
+
const r = tr(e) && tr(t);
|
|
138
138
|
if (!r && !(Ct(e) && Ct(t))) return t;
|
|
139
139
|
const a = (r ? e : Object.keys(e)).length, n = r ? t : Object.keys(t), i = n.length, o = r ? new Array(i) : {};
|
|
140
140
|
let c = 0;
|
|
@@ -153,7 +153,7 @@ function Rt(e, t) {
|
|
|
153
153
|
}
|
|
154
154
|
return a === i && c === a ? e : o;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Xe(e, t) {
|
|
157
157
|
if (!t || Object.keys(e).length !== Object.keys(t).length)
|
|
158
158
|
return !1;
|
|
159
159
|
for (const r in e)
|
|
@@ -161,19 +161,19 @@ function ze(e, t) {
|
|
|
161
161
|
return !1;
|
|
162
162
|
return !0;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function tr(e) {
|
|
165
165
|
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
166
166
|
}
|
|
167
167
|
function Ct(e) {
|
|
168
|
-
if (!
|
|
168
|
+
if (!rr(e))
|
|
169
169
|
return !1;
|
|
170
170
|
const t = e.constructor;
|
|
171
171
|
if (t === void 0)
|
|
172
172
|
return !0;
|
|
173
173
|
const r = t.prototype;
|
|
174
|
-
return !(!
|
|
174
|
+
return !(!rr(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function rr(e) {
|
|
177
177
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
178
178
|
}
|
|
179
179
|
function Ys(e) {
|
|
@@ -205,13 +205,13 @@ function Xs(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
|
-
var
|
|
209
|
-
function
|
|
210
|
-
return process.env.NODE_ENV !== "production" && e.queryFn ===
|
|
208
|
+
var Ze = Symbol();
|
|
209
|
+
function Nr(e, t) {
|
|
210
|
+
return process.env.NODE_ENV !== "production" && e.queryFn === Ze && console.error(
|
|
211
211
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
|
|
212
|
-
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn ===
|
|
212
|
+
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === Ze ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Pr(e, t) {
|
|
215
215
|
return typeof e == "function" ? e(...t) : !!e;
|
|
216
216
|
}
|
|
217
217
|
var Zs = class extends ke {
|
|
@@ -365,19 +365,19 @@ var $ = ta(), ra = class extends ke {
|
|
|
365
365
|
isOnline() {
|
|
366
366
|
return this.#e;
|
|
367
367
|
}
|
|
368
|
-
},
|
|
368
|
+
}, et = new ra();
|
|
369
369
|
function sa(e) {
|
|
370
370
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return (e ?? "online") === "online" ?
|
|
372
|
+
function $r(e) {
|
|
373
|
+
return (e ?? "online") === "online" ? et.isOnline() : !0;
|
|
374
374
|
}
|
|
375
375
|
var Nt = class extends Error {
|
|
376
376
|
constructor(e) {
|
|
377
377
|
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
|
-
function
|
|
380
|
+
function xr(e) {
|
|
381
381
|
let t = !1, r = 0, s;
|
|
382
382
|
const a = kt(), n = () => a.status !== "pending", i = (g) => {
|
|
383
383
|
if (!n()) {
|
|
@@ -388,7 +388,7 @@ function $r(e) {
|
|
|
388
388
|
t = !0;
|
|
389
389
|
}, c = () => {
|
|
390
390
|
t = !1;
|
|
391
|
-
}, f = () => Ft.isFocused() && (e.networkMode === "always" ||
|
|
391
|
+
}, f = () => Ft.isFocused() && (e.networkMode === "always" || et.isOnline()) && e.canRun(), d = () => $r(e.networkMode) && e.canRun(), u = (g) => {
|
|
392
392
|
n() || (s?.(), a.resolve(g));
|
|
393
393
|
}, l = (g) => {
|
|
394
394
|
n() || (s?.(), a.reject(g));
|
|
@@ -432,7 +432,7 @@ function $r(e) {
|
|
|
432
432
|
start: () => (d() ? p() : m().then(p), a)
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
var
|
|
435
|
+
var Mr = class {
|
|
436
436
|
#e;
|
|
437
437
|
destroy() {
|
|
438
438
|
this.clearGcTimeout();
|
|
@@ -451,7 +451,7 @@ var xr = class {
|
|
|
451
451
|
clearGcTimeout() {
|
|
452
452
|
this.#e && (fe.clearTimeout(this.#e), this.#e = void 0);
|
|
453
453
|
}
|
|
454
|
-
}, aa = class extends
|
|
454
|
+
}, aa = class extends Mr {
|
|
455
455
|
#e;
|
|
456
456
|
#t;
|
|
457
457
|
#r;
|
|
@@ -460,7 +460,7 @@ var xr = class {
|
|
|
460
460
|
#i;
|
|
461
461
|
#o;
|
|
462
462
|
constructor(e) {
|
|
463
|
-
super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e =
|
|
463
|
+
super(), this.#o = !1, this.#i = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#a = e.client, this.#r = this.#a.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#e = sr(this.options), this.state = e.state ?? this.#e, this.scheduleGc();
|
|
464
464
|
}
|
|
465
465
|
get meta() {
|
|
466
466
|
return this.options.meta;
|
|
@@ -470,7 +470,7 @@ var xr = class {
|
|
|
470
470
|
}
|
|
471
471
|
setOptions(e) {
|
|
472
472
|
if (this.options = { ...this.#i, ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
473
|
-
const t =
|
|
473
|
+
const t = sr(this.options);
|
|
474
474
|
t.data !== void 0 && (this.setData(t.data, {
|
|
475
475
|
updatedAt: t.dataUpdatedAt,
|
|
476
476
|
manual: !0
|
|
@@ -508,7 +508,7 @@ var xr = class {
|
|
|
508
508
|
);
|
|
509
509
|
}
|
|
510
510
|
isDisabled() {
|
|
511
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
511
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === Ze || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
512
512
|
}
|
|
513
513
|
isStatic() {
|
|
514
514
|
return this.getObserversCount() > 0 ? this.observers.some(
|
|
@@ -521,7 +521,7 @@ var xr = 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 : !kr(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 xr = class {
|
|
|
564
564
|
get: () => (this.#o = !0, r.signal)
|
|
565
565
|
});
|
|
566
566
|
}, a = () => {
|
|
567
|
-
const o =
|
|
567
|
+
const o = Nr(this.options, t), f = (() => {
|
|
568
568
|
const d = {
|
|
569
569
|
client: this.#a,
|
|
570
570
|
queryKey: this.queryKey,
|
|
@@ -588,7 +588,7 @@ var xr = 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 = xr({
|
|
592
592
|
initialPromise: t?.initialPromise,
|
|
593
593
|
fn: i.fetchFn,
|
|
594
594
|
onCancel: (o) => {
|
|
@@ -669,7 +669,7 @@ var xr = class {
|
|
|
669
669
|
case "fetch":
|
|
670
670
|
return {
|
|
671
671
|
...r,
|
|
672
|
-
...
|
|
672
|
+
...Dr(r.data, this.options),
|
|
673
673
|
fetchMeta: e.meta ?? null
|
|
674
674
|
};
|
|
675
675
|
case "success":
|
|
@@ -719,18 +719,18 @@ var xr = class {
|
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
function
|
|
722
|
+
function Dr(e, t) {
|
|
723
723
|
return {
|
|
724
724
|
fetchFailureCount: 0,
|
|
725
725
|
fetchFailureReason: null,
|
|
726
|
-
fetchStatus:
|
|
726
|
+
fetchStatus: $r(t.networkMode) ? "fetching" : "paused",
|
|
727
727
|
...e === void 0 && {
|
|
728
728
|
error: null,
|
|
729
729
|
status: "pending"
|
|
730
730
|
}
|
|
731
731
|
};
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function sr(e) {
|
|
734
734
|
const t = typeof e.initialData == "function" ? e.initialData() : e.initialData, r = t !== void 0, s = r ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
|
|
735
735
|
return {
|
|
736
736
|
data: t,
|
|
@@ -772,7 +772,7 @@ var na = class extends ke {
|
|
|
772
772
|
this.refetch = this.refetch.bind(this);
|
|
773
773
|
}
|
|
774
774
|
onSubscribe() {
|
|
775
|
-
this.listeners.size === 1 && (this.#t.addObserver(this),
|
|
775
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), ar(this.#t, this.options) ? this.#d() : this.updateResult(), this.#E());
|
|
776
776
|
}
|
|
777
777
|
onUnsubscribe() {
|
|
778
778
|
this.hasListeners() || this.destroy();
|
|
@@ -800,13 +800,13 @@ var na = class extends ke {
|
|
|
800
800
|
throw new Error(
|
|
801
801
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
802
802
|
);
|
|
803
|
-
this.#v(), this.#t.setOptions(this.options), t._defaulted && !
|
|
803
|
+
this.#v(), this.#t.setOptions(this.options), t._defaulted && !Xe(this.options, t) && this.#e.getQueryCache().notify({
|
|
804
804
|
type: "observerOptionsUpdated",
|
|
805
805
|
query: this.#t,
|
|
806
806
|
observer: this
|
|
807
807
|
});
|
|
808
808
|
const s = this.hasListeners();
|
|
809
|
-
s &&
|
|
809
|
+
s && nr(
|
|
810
810
|
this.#t,
|
|
811
811
|
r,
|
|
812
812
|
this.options,
|
|
@@ -868,7 +868,7 @@ var na = class extends ke {
|
|
|
868
868
|
);
|
|
869
869
|
if (me || this.#a.isStale || !_t(e))
|
|
870
870
|
return;
|
|
871
|
-
const r =
|
|
871
|
+
const r = kr(this.#a.dataUpdatedAt, e) + 1;
|
|
872
872
|
this.#l = fe.setTimeout(() => {
|
|
873
873
|
this.#a.isStale || this.updateResult();
|
|
874
874
|
}, r);
|
|
@@ -894,10 +894,10 @@ var na = class extends ke {
|
|
|
894
894
|
const r = this.#t, s = this.options, a = this.#a, n = this.#s, i = this.#i, c = e !== r ? e.state : this.#r, { state: f } = e;
|
|
895
895
|
let d = { ...f }, u = !1, l;
|
|
896
896
|
if (t._optimisticResults) {
|
|
897
|
-
const v = this.hasListeners(), x = !v &&
|
|
897
|
+
const v = this.hasListeners(), x = !v && ar(e, t), _ = v && nr(e, r, t, s);
|
|
898
898
|
(x || _) && (d = {
|
|
899
899
|
...d,
|
|
900
|
-
...
|
|
900
|
+
...Dr(f.data, e.options)
|
|
901
901
|
}), t._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
|
|
902
902
|
}
|
|
903
903
|
let { error: m, errorUpdatedAt: p, status: g } = d;
|
|
@@ -975,7 +975,7 @@ var na = class extends ke {
|
|
|
975
975
|
}
|
|
976
976
|
updateResult() {
|
|
977
977
|
const e = this.#a, t = this.createResult(this.#t, this.options);
|
|
978
|
-
if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t),
|
|
978
|
+
if (this.#s = this.#t.state, this.#i = this.options, this.#s.data !== void 0 && (this.#f = this.#t), Xe(t, e))
|
|
979
979
|
return;
|
|
980
980
|
this.#a = t;
|
|
981
981
|
const r = () => {
|
|
@@ -1018,7 +1018,7 @@ var na = class extends ke {
|
|
|
1018
1018
|
function ia(e, t) {
|
|
1019
1019
|
return Q(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function ar(e, t) {
|
|
1022
1022
|
return ia(e, t) || e.state.data !== void 0 && Pt(e, t, t.refetchOnMount);
|
|
1023
1023
|
}
|
|
1024
1024
|
function Pt(e, t, r) {
|
|
@@ -1028,16 +1028,16 @@ function Pt(e, t, r) {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
return !1;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function nr(e, t, r, s) {
|
|
1032
1032
|
return (e !== t || Q(s.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Ht(e, r);
|
|
1033
1033
|
}
|
|
1034
1034
|
function Ht(e, t) {
|
|
1035
1035
|
return Q(t.enabled, e) !== !1 && e.isStaleByTime(de(t.staleTime, e));
|
|
1036
1036
|
}
|
|
1037
1037
|
function oa(e, t) {
|
|
1038
|
-
return !
|
|
1038
|
+
return !Xe(e.getCurrentResult(), t);
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function ir(e) {
|
|
1041
1041
|
return {
|
|
1042
1042
|
onFetch: (t, r) => {
|
|
1043
1043
|
const s = t.options, a = t.fetchOptions?.meta?.fetchMore?.direction, n = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
|
|
@@ -1051,20 +1051,20 @@ function nr(e) {
|
|
|
1051
1051
|
d = !0;
|
|
1052
1052
|
}), t.signal)
|
|
1053
1053
|
});
|
|
1054
|
-
}, l =
|
|
1054
|
+
}, l = Nr(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)
|
|
1058
1058
|
return Promise.resolve(p);
|
|
1059
1059
|
const O = (() => {
|
|
1060
|
-
const
|
|
1060
|
+
const Y = {
|
|
1061
1061
|
client: t.client,
|
|
1062
1062
|
queryKey: t.queryKey,
|
|
1063
1063
|
pageParam: g,
|
|
1064
1064
|
direction: b ? "backward" : "forward",
|
|
1065
1065
|
meta: t.options.meta
|
|
1066
1066
|
};
|
|
1067
|
-
return u(
|
|
1067
|
+
return u(Y), Y;
|
|
1068
1068
|
})(), A = await l(O), { maxPages: K } = t.options, R = b ? Xs : zs;
|
|
1069
1069
|
return {
|
|
1070
1070
|
pages: R(p.pages, A, K),
|
|
@@ -1072,7 +1072,7 @@ function nr(e) {
|
|
|
1072
1072
|
};
|
|
1073
1073
|
};
|
|
1074
1074
|
if (a && n.length) {
|
|
1075
|
-
const p = a === "backward", g = p ? ca :
|
|
1075
|
+
const p = a === "backward", g = p ? ca : or, b = {
|
|
1076
1076
|
pages: n,
|
|
1077
1077
|
pageParams: i
|
|
1078
1078
|
}, E = g(s, b);
|
|
@@ -1080,7 +1080,7 @@ function nr(e) {
|
|
|
1080
1080
|
} else {
|
|
1081
1081
|
const p = e ?? n.length;
|
|
1082
1082
|
do {
|
|
1083
|
-
const g = c === 0 ? i[0] ?? s.initialPageParam :
|
|
1083
|
+
const g = c === 0 ? i[0] ?? s.initialPageParam : or(s, o);
|
|
1084
1084
|
if (c > 0 && g == null)
|
|
1085
1085
|
break;
|
|
1086
1086
|
o = await m(o, g), c++;
|
|
@@ -1101,7 +1101,7 @@ function nr(e) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function or(e, { pages: t, pageParams: r }) {
|
|
1105
1105
|
const s = t.length - 1;
|
|
1106
1106
|
return t.length > 0 ? e.getNextPageParam(
|
|
1107
1107
|
t[s],
|
|
@@ -1113,13 +1113,13 @@ function ir(e, { pages: t, pageParams: r }) {
|
|
|
1113
1113
|
function ca(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 la = class extends
|
|
1116
|
+
var la = class extends Mr {
|
|
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 || Lr(), 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 xr {
|
|
|
1156
1156
|
meta: this.options.meta,
|
|
1157
1157
|
mutationKey: this.options.mutationKey
|
|
1158
1158
|
};
|
|
1159
|
-
this.#a =
|
|
1159
|
+
this.#a = xr({
|
|
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 xr {
|
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
1318
|
};
|
|
1319
|
-
function
|
|
1319
|
+
function Lr() {
|
|
1320
1320
|
return {
|
|
1321
1321
|
context: void 0,
|
|
1322
1322
|
data: void 0,
|
|
@@ -1348,7 +1348,7 @@ var ua = class extends ke {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
add(e) {
|
|
1350
1350
|
this.#e.add(e);
|
|
1351
|
-
const t =
|
|
1351
|
+
const t = He(e);
|
|
1352
1352
|
if (typeof t == "string") {
|
|
1353
1353
|
const r = this.#t.get(t);
|
|
1354
1354
|
r ? r.push(e) : this.#t.set(t, [e]);
|
|
@@ -1357,7 +1357,7 @@ var ua = class extends ke {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
remove(e) {
|
|
1359
1359
|
if (this.#e.delete(e)) {
|
|
1360
|
-
const t =
|
|
1360
|
+
const t = He(e);
|
|
1361
1361
|
if (typeof t == "string") {
|
|
1362
1362
|
const r = this.#t.get(t);
|
|
1363
1363
|
if (r)
|
|
@@ -1370,7 +1370,7 @@ var ua = class extends ke {
|
|
|
1370
1370
|
this.notify({ type: "removed", mutation: e });
|
|
1371
1371
|
}
|
|
1372
1372
|
canRun(e) {
|
|
1373
|
-
const t =
|
|
1373
|
+
const t = He(e);
|
|
1374
1374
|
if (typeof t == "string") {
|
|
1375
1375
|
const s = this.#t.get(t)?.find(
|
|
1376
1376
|
(a) => a.state.status === "pending"
|
|
@@ -1380,7 +1380,7 @@ var ua = class extends ke {
|
|
|
1380
1380
|
return !0;
|
|
1381
1381
|
}
|
|
1382
1382
|
runNext(e) {
|
|
1383
|
-
const t =
|
|
1383
|
+
const t = He(e);
|
|
1384
1384
|
return typeof t == "string" ? this.#t.get(t)?.find((s) => s !== e && s.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
|
|
1385
1385
|
}
|
|
1386
1386
|
clear() {
|
|
@@ -1396,11 +1396,11 @@ var ua = class extends ke {
|
|
|
1396
1396
|
find(e) {
|
|
1397
1397
|
const t = { exact: !0, ...e };
|
|
1398
1398
|
return this.getAll().find(
|
|
1399
|
-
(r) =>
|
|
1399
|
+
(r) => er(t, r)
|
|
1400
1400
|
);
|
|
1401
1401
|
}
|
|
1402
1402
|
findAll(e = {}) {
|
|
1403
|
-
return this.getAll().filter((t) =>
|
|
1403
|
+
return this.getAll().filter((t) => er(e, t));
|
|
1404
1404
|
}
|
|
1405
1405
|
notify(e) {
|
|
1406
1406
|
$.batch(() => {
|
|
@@ -1418,7 +1418,7 @@ var ua = class extends ke {
|
|
|
1418
1418
|
);
|
|
1419
1419
|
}
|
|
1420
1420
|
};
|
|
1421
|
-
function
|
|
1421
|
+
function He(e) {
|
|
1422
1422
|
return e.options.scope?.id;
|
|
1423
1423
|
}
|
|
1424
1424
|
var da = class extends ke {
|
|
@@ -1434,7 +1434,7 @@ var da = class extends ke {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
setOptions(e) {
|
|
1436
1436
|
const t = this.options;
|
|
1437
|
-
this.options = this.#e.defaultMutationOptions(e),
|
|
1437
|
+
this.options = this.#e.defaultMutationOptions(e), Xe(this.options, t) || this.#e.getMutationCache().notify({
|
|
1438
1438
|
type: "observerOptionsUpdated",
|
|
1439
1439
|
mutation: this.#r,
|
|
1440
1440
|
observer: this
|
|
@@ -1456,7 +1456,7 @@ var da = class extends ke {
|
|
|
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 ?? Lr();
|
|
1460
1460
|
this.#t = {
|
|
1461
1461
|
...e,
|
|
1462
1462
|
isPending: e.status === "pending",
|
|
@@ -1547,12 +1547,12 @@ var da = class extends ke {
|
|
|
1547
1547
|
find(e) {
|
|
1548
1548
|
const t = { exact: !0, ...e };
|
|
1549
1549
|
return this.getAll().find(
|
|
1550
|
-
(r) =>
|
|
1550
|
+
(r) => Zt(t, r)
|
|
1551
1551
|
);
|
|
1552
1552
|
}
|
|
1553
1553
|
findAll(e = {}) {
|
|
1554
1554
|
const t = this.getAll();
|
|
1555
|
-
return Object.keys(e).length > 0 ? t.filter((r) =>
|
|
1555
|
+
return Object.keys(e).length > 0 ? t.filter((r) => Zt(e, r)) : t;
|
|
1556
1556
|
}
|
|
1557
1557
|
notify(e) {
|
|
1558
1558
|
$.batch(() => {
|
|
@@ -1590,7 +1590,7 @@ var da = class extends ke {
|
|
|
1590
1590
|
mount() {
|
|
1591
1591
|
this.#i++, this.#i === 1 && (this.#o = Ft.subscribe(async (e) => {
|
|
1592
1592
|
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
1593
|
-
}), this.#n =
|
|
1593
|
+
}), this.#n = et.subscribe(async (e) => {
|
|
1594
1594
|
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
1595
1595
|
}));
|
|
1596
1596
|
}
|
|
@@ -1706,16 +1706,16 @@ var da = class extends ke {
|
|
|
1706
1706
|
return this.fetchQuery(e).then(B).catch(B);
|
|
1707
1707
|
}
|
|
1708
1708
|
fetchInfiniteQuery(e) {
|
|
1709
|
-
return e.behavior =
|
|
1709
|
+
return e.behavior = ir(e.pages), this.fetchQuery(e);
|
|
1710
1710
|
}
|
|
1711
1711
|
prefetchInfiniteQuery(e) {
|
|
1712
1712
|
return this.fetchInfiniteQuery(e).then(B).catch(B);
|
|
1713
1713
|
}
|
|
1714
1714
|
ensureInfiniteQueryData(e) {
|
|
1715
|
-
return e.behavior =
|
|
1715
|
+
return e.behavior = ir(e.pages), this.ensureQueryData(e);
|
|
1716
1716
|
}
|
|
1717
1717
|
resumePausedMutations() {
|
|
1718
|
-
return
|
|
1718
|
+
return et.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
1719
1719
|
}
|
|
1720
1720
|
getQueryCache() {
|
|
1721
1721
|
return this.#e;
|
|
@@ -1765,7 +1765,7 @@ var da = class extends ke {
|
|
|
1765
1765
|
return t.queryHash || (t.queryHash = Ut(
|
|
1766
1766
|
t.queryKey,
|
|
1767
1767
|
t
|
|
1768
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn ===
|
|
1768
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === Ze && (t.enabled = !1), t;
|
|
1769
1769
|
}
|
|
1770
1770
|
defaultMutationOptions(e) {
|
|
1771
1771
|
return e?._defaulted ? e : {
|
|
@@ -1778,10 +1778,10 @@ var da = class extends ke {
|
|
|
1778
1778
|
clear() {
|
|
1779
1779
|
this.#e.clear(), this.#t.clear();
|
|
1780
1780
|
}
|
|
1781
|
-
},
|
|
1781
|
+
}, Ur = H.createContext(
|
|
1782
1782
|
void 0
|
|
1783
|
-
),
|
|
1784
|
-
const t = H.useContext(
|
|
1783
|
+
), Le = (e) => {
|
|
1784
|
+
const t = H.useContext(Ur);
|
|
1785
1785
|
if (!t)
|
|
1786
1786
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1787
1787
|
return t;
|
|
@@ -1790,7 +1790,7 @@ var da = class extends ke {
|
|
|
1790
1790
|
children: t
|
|
1791
1791
|
}) => (H.useEffect(() => (e.mount(), () => {
|
|
1792
1792
|
e.unmount();
|
|
1793
|
-
}), [e]), /* @__PURE__ */ h(
|
|
1793
|
+
}), [e]), /* @__PURE__ */ h(Ur.Provider, { value: e, children: t })), pa = H.createContext(!1), ya = () => H.useContext(pa);
|
|
1794
1794
|
function ga() {
|
|
1795
1795
|
let e = !1;
|
|
1796
1796
|
return {
|
|
@@ -1815,7 +1815,7 @@ var ba = H.createContext(ga()), Ea = () => H.useContext(ba), wa = (e, 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 || Pr(r, [e.error, s])), Ta = (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,7 +1823,7 @@ var ba = H.createContext(ga()), Ea = () => H.useContext(ba), wa = (e, t) => {
|
|
|
1823
1823
|
1e3
|
|
1824
1824
|
));
|
|
1825
1825
|
}
|
|
1826
|
-
}, Aa = (e, t) => e.isLoading && e.isFetching && !t, Ia = (e, t) => e?.suspense && t.isPending,
|
|
1826
|
+
}, Aa = (e, t) => e.isLoading && e.isFetching && !t, Ia = (e, t) => e?.suspense && t.isPending, cr = (e, t, r) => t.fetchOptimistic(e).catch(() => {
|
|
1827
1827
|
r.clearReset();
|
|
1828
1828
|
});
|
|
1829
1829
|
function _a(e, t, r) {
|
|
@@ -1831,7 +1831,7 @@ function _a(e, t, r) {
|
|
|
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 = ya(), a = Ea(), n =
|
|
1834
|
+
const s = ya(), a = Ea(), n = Le(), 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(
|
|
@@ -1856,7 +1856,7 @@ function _a(e, t, r) {
|
|
|
1856
1856
|
), H.useEffect(() => {
|
|
1857
1857
|
c.setOptions(i);
|
|
1858
1858
|
}, [i, c]), Ia(i, f))
|
|
1859
|
-
throw
|
|
1859
|
+
throw cr(i, c, a);
|
|
1860
1860
|
if (va({
|
|
1861
1861
|
result: f,
|
|
1862
1862
|
errorResetBoundary: a,
|
|
@@ -1870,7 +1870,7 @@ function _a(e, t, r) {
|
|
|
1870
1870
|
f
|
|
1871
1871
|
), i.experimental_prefetchInRender && !me && Aa(f, s) && (o ? (
|
|
1872
1872
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1873
|
-
|
|
1873
|
+
cr(i, c, a)
|
|
1874
1874
|
) : (
|
|
1875
1875
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1876
1876
|
n.getQueryCache().get(i.queryHash)?.promise
|
|
@@ -1878,11 +1878,11 @@ function _a(e, t, r) {
|
|
|
1878
1878
|
c.updateResult();
|
|
1879
1879
|
}), i.notifyOnChangeProps ? f : c.trackResult(f);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1881
|
+
function ge(e, t) {
|
|
1882
1882
|
return _a(e, na);
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
const r =
|
|
1884
|
+
function Kt(e, t) {
|
|
1885
|
+
const r = Le(), [s] = H.useState(
|
|
1886
1886
|
() => new da(
|
|
1887
1887
|
r,
|
|
1888
1888
|
e
|
|
@@ -1904,7 +1904,7 @@ function Ur(e, t) {
|
|
|
1904
1904
|
},
|
|
1905
1905
|
[s]
|
|
1906
1906
|
);
|
|
1907
|
-
if (a.error &&
|
|
1907
|
+
if (a.error && Pr(s.options.throwOnError, [a.error]))
|
|
1908
1908
|
throw a.error;
|
|
1909
1909
|
return { ...a, mutate: n, mutateAsync: a.mutate };
|
|
1910
1910
|
}
|
|
@@ -1948,7 +1948,7 @@ awIDAQAB
|
|
|
1948
1948
|
LOGOUT: "logout",
|
|
1949
1949
|
LOGIN: "login",
|
|
1950
1950
|
REFRESH: "refresh"
|
|
1951
|
-
},
|
|
1951
|
+
}, Ke = new TextEncoder(), Oe = new TextDecoder();
|
|
1952
1952
|
function Ca(...e) {
|
|
1953
1953
|
const t = e.reduce((a, { length: n }) => a + n, 0), r = new Uint8Array(t);
|
|
1954
1954
|
let s = 0;
|
|
@@ -1966,24 +1966,24 @@ function Hr(e) {
|
|
|
1966
1966
|
}
|
|
1967
1967
|
function $e(e) {
|
|
1968
1968
|
if (Uint8Array.fromBase64)
|
|
1969
|
-
return Uint8Array.fromBase64(typeof e == "string" ? e :
|
|
1969
|
+
return Uint8Array.fromBase64(typeof e == "string" ? e : Oe.decode(e), {
|
|
1970
1970
|
alphabet: "base64url"
|
|
1971
1971
|
});
|
|
1972
1972
|
let t = e;
|
|
1973
|
-
t instanceof Uint8Array && (t =
|
|
1973
|
+
t instanceof Uint8Array && (t = Oe.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, "");
|
|
1974
1974
|
try {
|
|
1975
1975
|
return Hr(t);
|
|
1976
1976
|
} catch {
|
|
1977
1977
|
throw new TypeError("The input to be decoded is not correctly encoded.");
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
|
-
let
|
|
1980
|
+
let be = class extends Error {
|
|
1981
1981
|
static code = "ERR_JOSE_GENERIC";
|
|
1982
1982
|
code = "ERR_JOSE_GENERIC";
|
|
1983
1983
|
constructor(t, r) {
|
|
1984
1984
|
super(t, r), this.name = this.constructor.name, Error.captureStackTrace?.(this, this.constructor);
|
|
1985
1985
|
}
|
|
1986
|
-
}, X = class extends
|
|
1986
|
+
}, X = class extends be {
|
|
1987
1987
|
static code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
1988
1988
|
code = "ERR_JWT_CLAIM_VALIDATION_FAILED";
|
|
1989
1989
|
claim;
|
|
@@ -1992,7 +1992,7 @@ let ge = class extends Error {
|
|
|
1992
1992
|
constructor(t, r, s = "unspecified", a = "unspecified") {
|
|
1993
1993
|
super(t, { cause: { claim: s, reason: a, payload: r } }), this.claim = s, this.reason = a, this.payload = r;
|
|
1994
1994
|
}
|
|
1995
|
-
},
|
|
1995
|
+
}, lr = class extends be {
|
|
1996
1996
|
static code = "ERR_JWT_EXPIRED";
|
|
1997
1997
|
code = "ERR_JWT_EXPIRED";
|
|
1998
1998
|
claim;
|
|
@@ -2001,20 +2001,20 @@ let ge = 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
|
-
}, Oa = class extends
|
|
2004
|
+
}, Oa = class extends be {
|
|
2005
2005
|
static code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2006
2006
|
code = "ERR_JOSE_ALG_NOT_ALLOWED";
|
|
2007
|
-
},
|
|
2007
|
+
}, ne = class extends be {
|
|
2008
2008
|
static code = "ERR_JOSE_NOT_SUPPORTED";
|
|
2009
2009
|
code = "ERR_JOSE_NOT_SUPPORTED";
|
|
2010
|
-
}, L = class extends
|
|
2010
|
+
}, L = class extends be {
|
|
2011
2011
|
static code = "ERR_JWS_INVALID";
|
|
2012
2012
|
code = "ERR_JWS_INVALID";
|
|
2013
|
-
},
|
|
2013
|
+
}, se = class extends be {
|
|
2014
2014
|
static code = "ERR_JWT_INVALID";
|
|
2015
2015
|
code = "ERR_JWT_INVALID";
|
|
2016
2016
|
};
|
|
2017
|
-
class ka extends
|
|
2017
|
+
class ka extends be {
|
|
2018
2018
|
static code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2019
2019
|
code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED";
|
|
2020
2020
|
constructor(t = "signature verification failed", r) {
|
|
@@ -2024,7 +2024,7 @@ class ka extends ge {
|
|
|
2024
2024
|
function Z(e, t = "algorithm.name") {
|
|
2025
2025
|
return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function ve(e, t) {
|
|
2028
2028
|
return e.name === t;
|
|
2029
2029
|
}
|
|
2030
2030
|
function ft(e) {
|
|
@@ -2051,7 +2051,7 @@ function $a(e, t, r) {
|
|
|
2051
2051
|
case "HS256":
|
|
2052
2052
|
case "HS384":
|
|
2053
2053
|
case "HS512": {
|
|
2054
|
-
if (!
|
|
2054
|
+
if (!ve(e.algorithm, "HMAC"))
|
|
2055
2055
|
throw Z("HMAC");
|
|
2056
2056
|
const s = parseInt(t.slice(2), 10);
|
|
2057
2057
|
if (ft(e.algorithm.hash) !== s)
|
|
@@ -2061,7 +2061,7 @@ function $a(e, t, r) {
|
|
|
2061
2061
|
case "RS256":
|
|
2062
2062
|
case "RS384":
|
|
2063
2063
|
case "RS512": {
|
|
2064
|
-
if (!
|
|
2064
|
+
if (!ve(e.algorithm, "RSASSA-PKCS1-v1_5"))
|
|
2065
2065
|
throw Z("RSASSA-PKCS1-v1_5");
|
|
2066
2066
|
const s = parseInt(t.slice(2), 10);
|
|
2067
2067
|
if (ft(e.algorithm.hash) !== s)
|
|
@@ -2071,7 +2071,7 @@ function $a(e, t, r) {
|
|
|
2071
2071
|
case "PS256":
|
|
2072
2072
|
case "PS384":
|
|
2073
2073
|
case "PS512": {
|
|
2074
|
-
if (!
|
|
2074
|
+
if (!ve(e.algorithm, "RSA-PSS"))
|
|
2075
2075
|
throw Z("RSA-PSS");
|
|
2076
2076
|
const s = parseInt(t.slice(2), 10);
|
|
2077
2077
|
if (ft(e.algorithm.hash) !== s)
|
|
@@ -2080,21 +2080,21 @@ function $a(e, t, r) {
|
|
|
2080
2080
|
}
|
|
2081
2081
|
case "Ed25519":
|
|
2082
2082
|
case "EdDSA": {
|
|
2083
|
-
if (!
|
|
2083
|
+
if (!ve(e.algorithm, "Ed25519"))
|
|
2084
2084
|
throw Z("Ed25519");
|
|
2085
2085
|
break;
|
|
2086
2086
|
}
|
|
2087
2087
|
case "ML-DSA-44":
|
|
2088
2088
|
case "ML-DSA-65":
|
|
2089
2089
|
case "ML-DSA-87": {
|
|
2090
|
-
if (!
|
|
2090
|
+
if (!ve(e.algorithm, t))
|
|
2091
2091
|
throw Z(t);
|
|
2092
2092
|
break;
|
|
2093
2093
|
}
|
|
2094
2094
|
case "ES256":
|
|
2095
2095
|
case "ES384":
|
|
2096
2096
|
case "ES512": {
|
|
2097
|
-
if (!
|
|
2097
|
+
if (!ve(e.algorithm, "ECDSA"))
|
|
2098
2098
|
throw Z("ECDSA");
|
|
2099
2099
|
const s = Na(t);
|
|
2100
2100
|
if (e.algorithm.namedCurve !== s)
|
|
@@ -2167,7 +2167,7 @@ const Me = (e) => {
|
|
|
2167
2167
|
if (e[r] !== t[r])
|
|
2168
2168
|
return !1;
|
|
2169
2169
|
return !0;
|
|
2170
|
-
}, Ua = (e) => ({ data: e, pos: 0 }),
|
|
2170
|
+
}, Ua = (e) => ({ data: e, pos: 0 }), tt = (e) => {
|
|
2171
2171
|
const t = e.data[e.pos++];
|
|
2172
2172
|
if (t & 128) {
|
|
2173
2173
|
const r = t & 127;
|
|
@@ -2177,20 +2177,20 @@ const Me = (e) => {
|
|
|
2177
2177
|
return s;
|
|
2178
2178
|
}
|
|
2179
2179
|
return t;
|
|
2180
|
-
},
|
|
2180
|
+
}, rt = (e, t, r) => {
|
|
2181
2181
|
if (e.data[e.pos++] !== t)
|
|
2182
2182
|
throw new Error(r);
|
|
2183
2183
|
}, jr = (e, t) => {
|
|
2184
2184
|
const r = e.data.subarray(e.pos, e.pos + t);
|
|
2185
2185
|
return e.pos += t, r;
|
|
2186
2186
|
}, Fa = (e) => {
|
|
2187
|
-
|
|
2188
|
-
const t =
|
|
2187
|
+
rt(e, 6, "Expected algorithm OID");
|
|
2188
|
+
const t = tt(e);
|
|
2189
2189
|
return jr(e, t);
|
|
2190
2190
|
};
|
|
2191
2191
|
function Ha(e) {
|
|
2192
|
-
|
|
2193
|
-
const t =
|
|
2192
|
+
rt(e, 48, "Invalid SPKI structure"), tt(e), rt(e, 48, "Expected algorithm identifier");
|
|
2193
|
+
const t = tt(e);
|
|
2194
2194
|
return { algIdStart: e.pos, algIdLength: t };
|
|
2195
2195
|
}
|
|
2196
2196
|
const Ka = (e) => {
|
|
@@ -2199,8 +2199,8 @@ const Ka = (e) => {
|
|
|
2199
2199
|
return "X25519";
|
|
2200
2200
|
if (!mt(t, [42, 134, 72, 206, 61, 2, 1]))
|
|
2201
2201
|
throw new Error("Unsupported key algorithm");
|
|
2202
|
-
|
|
2203
|
-
const r =
|
|
2202
|
+
rt(e, 6, "Expected curve OID");
|
|
2203
|
+
const r = tt(e), s = jr(e, r);
|
|
2204
2204
|
for (const { name: a, oid: n } of [
|
|
2205
2205
|
{ name: "P-256", oid: [42, 134, 72, 206, 61, 3, 1, 7] },
|
|
2206
2206
|
{ name: "P-384", oid: [43, 129, 4, 0, 34] },
|
|
@@ -2246,7 +2246,7 @@ const Ka = (e) => {
|
|
|
2246
2246
|
const c = s.getNamedCurve(t);
|
|
2247
2247
|
a = c === "X25519" ? { name: "X25519" } : { name: "ECDH", namedCurve: c };
|
|
2248
2248
|
} catch {
|
|
2249
|
-
throw new
|
|
2249
|
+
throw new ne("Invalid or unsupported key format");
|
|
2250
2250
|
}
|
|
2251
2251
|
n = [];
|
|
2252
2252
|
break;
|
|
@@ -2261,7 +2261,7 @@ const Ka = (e) => {
|
|
|
2261
2261
|
a = { name: r }, n = i();
|
|
2262
2262
|
break;
|
|
2263
2263
|
default:
|
|
2264
|
-
throw new
|
|
2264
|
+
throw new ne('Invalid or unsupported "alg" (Algorithm) value');
|
|
2265
2265
|
}
|
|
2266
2266
|
return crypto.subtle.importKey(e, t, a, s?.extractable ?? !0, n);
|
|
2267
2267
|
}, Ba = (e, t) => Hr(e.replace(t, "")), Wa = (e, t, r) => {
|
|
@@ -2283,7 +2283,7 @@ function qa(e) {
|
|
|
2283
2283
|
t = { name: e.alg }, r = e.priv ? ["sign"] : ["verify"];
|
|
2284
2284
|
break;
|
|
2285
2285
|
default:
|
|
2286
|
-
throw new
|
|
2286
|
+
throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
2287
2287
|
}
|
|
2288
2288
|
break;
|
|
2289
2289
|
}
|
|
@@ -2309,7 +2309,7 @@ function qa(e) {
|
|
|
2309
2309
|
}, r = e.d ? ["decrypt", "unwrapKey"] : ["encrypt", "wrapKey"];
|
|
2310
2310
|
break;
|
|
2311
2311
|
default:
|
|
2312
|
-
throw new
|
|
2312
|
+
throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
2313
2313
|
}
|
|
2314
2314
|
break;
|
|
2315
2315
|
}
|
|
@@ -2331,7 +2331,7 @@ function qa(e) {
|
|
|
2331
2331
|
t = { name: "ECDH", namedCurve: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
2332
2332
|
break;
|
|
2333
2333
|
default:
|
|
2334
|
-
throw new
|
|
2334
|
+
throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
2335
2335
|
}
|
|
2336
2336
|
break;
|
|
2337
2337
|
}
|
|
@@ -2348,12 +2348,12 @@ function qa(e) {
|
|
|
2348
2348
|
t = { name: e.crv }, r = e.d ? ["deriveBits"] : [];
|
|
2349
2349
|
break;
|
|
2350
2350
|
default:
|
|
2351
|
-
throw new
|
|
2351
|
+
throw new ne('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');
|
|
2352
2352
|
}
|
|
2353
2353
|
break;
|
|
2354
2354
|
}
|
|
2355
2355
|
default:
|
|
2356
|
-
throw new
|
|
2356
|
+
throw new ne('Invalid or unsupported JWK "kty" (Key Type) Parameter value');
|
|
2357
2357
|
}
|
|
2358
2358
|
return { algorithm: t, keyUsages: r };
|
|
2359
2359
|
}
|
|
@@ -2379,7 +2379,7 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2379
2379
|
r !== void 0 ? n = new Map([...Object.entries(r), ...t.entries()]) : n = t;
|
|
2380
2380
|
for (const i of s.crit) {
|
|
2381
2381
|
if (!n.has(i))
|
|
2382
|
-
throw new
|
|
2382
|
+
throw new ne(`Extension Header Parameter "${i}" is not recognized`);
|
|
2383
2383
|
if (a[i] === void 0)
|
|
2384
2384
|
throw new e(`Extension Header Parameter "${i}" is missing`);
|
|
2385
2385
|
if (n.get(i) && s[i] === void 0)
|
|
@@ -2392,7 +2392,7 @@ const Qa = (e, t, r, s, a) => {
|
|
|
2392
2392
|
if (t)
|
|
2393
2393
|
return new Set(t);
|
|
2394
2394
|
};
|
|
2395
|
-
function
|
|
2395
|
+
function Gt(e) {
|
|
2396
2396
|
return Me(e) && typeof e.kty == "string";
|
|
2397
2397
|
}
|
|
2398
2398
|
function Ya(e) {
|
|
@@ -2404,17 +2404,17 @@ function za(e) {
|
|
|
2404
2404
|
function Xa(e) {
|
|
2405
2405
|
return e.kty === "oct" && typeof e.k == "string";
|
|
2406
2406
|
}
|
|
2407
|
-
let
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2410
|
-
let a =
|
|
2407
|
+
let Ce;
|
|
2408
|
+
const ur = async (e, t, r, s = !1) => {
|
|
2409
|
+
Ce ||= /* @__PURE__ */ new WeakMap();
|
|
2410
|
+
let a = Ce.get(e);
|
|
2411
2411
|
if (a?.[r])
|
|
2412
2412
|
return a[r];
|
|
2413
2413
|
const n = await ja({ ...t, alg: r });
|
|
2414
|
-
return s && Object.freeze(e), a ? a[r] = n :
|
|
2414
|
+
return s && Object.freeze(e), a ? a[r] = n : Ce.set(e, { [r]: n }), n;
|
|
2415
2415
|
}, Za = (e, t) => {
|
|
2416
|
-
|
|
2417
|
-
let r =
|
|
2416
|
+
Ce ||= /* @__PURE__ */ new WeakMap();
|
|
2417
|
+
let r = Ce.get(e);
|
|
2418
2418
|
if (r?.[t])
|
|
2419
2419
|
return r[t];
|
|
2420
2420
|
const s = e.type === "public", a = !!s;
|
|
@@ -2507,7 +2507,7 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2507
2507
|
}
|
|
2508
2508
|
if (!n)
|
|
2509
2509
|
throw new TypeError("given KeyObject instance cannot be used for this algorithm");
|
|
2510
|
-
return r ? r[t] = n :
|
|
2510
|
+
return r ? r[t] = n : Ce.set(e, { [t]: n }), n;
|
|
2511
2511
|
}, en = async (e, t) => {
|
|
2512
2512
|
if (e instanceof Uint8Array || Br(e))
|
|
2513
2513
|
return e;
|
|
@@ -2522,12 +2522,12 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2522
2522
|
throw s;
|
|
2523
2523
|
}
|
|
2524
2524
|
let r = e.export({ format: "jwk" });
|
|
2525
|
-
return
|
|
2525
|
+
return ur(e, r, t);
|
|
2526
2526
|
}
|
|
2527
|
-
if (
|
|
2528
|
-
return e.k ? $e(e.k) :
|
|
2527
|
+
if (Gt(e))
|
|
2528
|
+
return e.k ? $e(e.k) : ur(e, e, t, !0);
|
|
2529
2529
|
throw new Error("unreachable");
|
|
2530
|
-
},
|
|
2530
|
+
}, Re = (e) => e?.[Symbol.toStringTag], $t = (e, t, r) => {
|
|
2531
2531
|
if (t.use !== void 0) {
|
|
2532
2532
|
let s;
|
|
2533
2533
|
switch (r) {
|
|
@@ -2572,7 +2572,7 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2572
2572
|
return !0;
|
|
2573
2573
|
}, tn = (e, t, r) => {
|
|
2574
2574
|
if (!(t instanceof Uint8Array)) {
|
|
2575
|
-
if (
|
|
2575
|
+
if (Gt(t)) {
|
|
2576
2576
|
if (Xa(t) && $t(e, t, r))
|
|
2577
2577
|
return;
|
|
2578
2578
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
@@ -2580,10 +2580,10 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2580
2580
|
if (!qr(t))
|
|
2581
2581
|
throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key", "Uint8Array"));
|
|
2582
2582
|
if (t.type !== "secret")
|
|
2583
|
-
throw new TypeError(`${
|
|
2583
|
+
throw new TypeError(`${Re(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
2584
2584
|
}
|
|
2585
2585
|
}, rn = (e, t, r) => {
|
|
2586
|
-
if (
|
|
2586
|
+
if (Gt(t))
|
|
2587
2587
|
switch (r) {
|
|
2588
2588
|
case "decrypt":
|
|
2589
2589
|
case "sign":
|
|
@@ -2599,20 +2599,20 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2599
2599
|
if (!qr(t))
|
|
2600
2600
|
throw new TypeError(Gr(e, t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
2601
2601
|
if (t.type === "secret")
|
|
2602
|
-
throw new TypeError(`${
|
|
2602
|
+
throw new TypeError(`${Re(t)} instances for asymmetric algorithms must not be of type "secret"`);
|
|
2603
2603
|
if (t.type === "public")
|
|
2604
2604
|
switch (r) {
|
|
2605
2605
|
case "sign":
|
|
2606
|
-
throw new TypeError(`${
|
|
2606
|
+
throw new TypeError(`${Re(t)} instances for asymmetric algorithm signing must be of type "private"`);
|
|
2607
2607
|
case "decrypt":
|
|
2608
|
-
throw new TypeError(`${
|
|
2608
|
+
throw new TypeError(`${Re(t)} instances for asymmetric algorithm decryption must be of type "private"`);
|
|
2609
2609
|
}
|
|
2610
2610
|
if (t.type === "private")
|
|
2611
2611
|
switch (r) {
|
|
2612
2612
|
case "verify":
|
|
2613
|
-
throw new TypeError(`${
|
|
2613
|
+
throw new TypeError(`${Re(t)} instances for asymmetric algorithm verifying must be of type "public"`);
|
|
2614
2614
|
case "encrypt":
|
|
2615
|
-
throw new TypeError(`${
|
|
2615
|
+
throw new TypeError(`${Re(t)} instances for asymmetric algorithm encryption must be of type "public"`);
|
|
2616
2616
|
}
|
|
2617
2617
|
}, sn = (e, t, r) => {
|
|
2618
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) ? tn(e, t, r) : rn(e, t, r);
|
|
@@ -2643,7 +2643,7 @@ const lr = async (e, t, r, s = !1) => {
|
|
|
2643
2643
|
case "ML-DSA-87":
|
|
2644
2644
|
return { name: e };
|
|
2645
2645
|
default:
|
|
2646
|
-
throw new
|
|
2646
|
+
throw new ne(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
2647
2647
|
}
|
|
2648
2648
|
}, nn = async (e, t, r) => {
|
|
2649
2649
|
if (t instanceof Uint8Array) {
|
|
@@ -2679,7 +2679,7 @@ async function cn(e, t, r) {
|
|
|
2679
2679
|
if (e.protected)
|
|
2680
2680
|
try {
|
|
2681
2681
|
const g = $e(e.protected);
|
|
2682
|
-
s = JSON.parse(
|
|
2682
|
+
s = JSON.parse(Oe.decode(g));
|
|
2683
2683
|
} catch {
|
|
2684
2684
|
throw new L("JWS Protected Header is invalid");
|
|
2685
2685
|
}
|
|
@@ -2705,7 +2705,7 @@ async function cn(e, t, r) {
|
|
|
2705
2705
|
throw new L("JWS Payload must be a string or an Uint8Array instance");
|
|
2706
2706
|
let f = !1;
|
|
2707
2707
|
typeof t == "function" && (t = await t(s, e), f = !0), sn(o, t, "verify");
|
|
2708
|
-
const d = Ca(
|
|
2708
|
+
const d = Ca(Ke.encode(e.protected ?? ""), Ke.encode("."), typeof e.payload == "string" ? Ke.encode(e.payload) : e.payload);
|
|
2709
2709
|
let u;
|
|
2710
2710
|
try {
|
|
2711
2711
|
u = $e(e.signature);
|
|
@@ -2722,12 +2722,12 @@ async function cn(e, t, r) {
|
|
|
2722
2722
|
} catch {
|
|
2723
2723
|
throw new L("Failed to base64url decode the payload");
|
|
2724
2724
|
}
|
|
2725
|
-
else typeof e.payload == "string" ? m =
|
|
2725
|
+
else typeof e.payload == "string" ? m = Ke.encode(e.payload) : m = e.payload;
|
|
2726
2726
|
const p = { payload: m };
|
|
2727
2727
|
return e.protected !== void 0 && (p.protectedHeader = s), e.header !== void 0 && (p.unprotectedHeader = e.header), f ? { ...p, key: l } : p;
|
|
2728
2728
|
}
|
|
2729
2729
|
async function ln(e, t, r) {
|
|
2730
|
-
if (e instanceof Uint8Array && (e =
|
|
2730
|
+
if (e instanceof Uint8Array && (e = Oe.decode(e)), typeof e != "string")
|
|
2731
2731
|
throw new L("Compact JWS must be a string or Uint8Array");
|
|
2732
2732
|
const { 0: s, 1: a, 2: n, length: i } = e.split(".");
|
|
2733
2733
|
if (i !== 3)
|
|
@@ -2735,7 +2735,7 @@ async function ln(e, t, r) {
|
|
|
2735
2735
|
const o = await cn({ payload: a, protected: s, signature: n }, t, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
|
|
2736
2736
|
return typeof t == "function" ? { ...c, key: o.key } : c;
|
|
2737
2737
|
}
|
|
2738
|
-
const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60,
|
|
2738
|
+
const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Bt = Qr * 24, dn = Bt * 7, hn = Bt * 365.25, fn = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i, dr = (e) => {
|
|
2739
2739
|
const t = fn.exec(e);
|
|
2740
2740
|
if (!t || t[4] && t[1])
|
|
2741
2741
|
throw new TypeError("Invalid time period format");
|
|
@@ -2766,7 +2766,7 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Gt = Qr
|
|
|
2766
2766
|
case "day":
|
|
2767
2767
|
case "days":
|
|
2768
2768
|
case "d":
|
|
2769
|
-
a = Math.round(r *
|
|
2769
|
+
a = Math.round(r * Bt);
|
|
2770
2770
|
break;
|
|
2771
2771
|
case "week":
|
|
2772
2772
|
case "weeks":
|
|
@@ -2778,17 +2778,17 @@ const un = (e) => Math.floor(e.getTime() / 1e3), Vr = 60, Qr = Vr * 60, Gt = Qr
|
|
|
2778
2778
|
break;
|
|
2779
2779
|
}
|
|
2780
2780
|
return t[1] === "-" || t[4] === "ago" ? -a : a;
|
|
2781
|
-
},
|
|
2781
|
+
}, hr = (e) => e.includes("/") ? e.toLowerCase() : `application/${e.toLowerCase()}`, mn = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1;
|
|
2782
2782
|
function pn(e, t, r = {}) {
|
|
2783
2783
|
let s;
|
|
2784
2784
|
try {
|
|
2785
|
-
s = JSON.parse(
|
|
2785
|
+
s = JSON.parse(Oe.decode(t));
|
|
2786
2786
|
} catch {
|
|
2787
2787
|
}
|
|
2788
2788
|
if (!Me(s))
|
|
2789
|
-
throw new
|
|
2789
|
+
throw new se("JWT Claims Set must be a top-level JSON object");
|
|
2790
2790
|
const { typ: a } = r;
|
|
2791
|
-
if (a && (typeof e.typ != "string" ||
|
|
2791
|
+
if (a && (typeof e.typ != "string" || hr(e.typ) !== hr(a)))
|
|
2792
2792
|
throw new X('unexpected "typ" JWT header value', s, "typ", "check_failed");
|
|
2793
2793
|
const { requiredClaims: n = [], issuer: i, subject: o, audience: c, maxTokenAge: f } = r, d = [...n];
|
|
2794
2794
|
f !== void 0 && d.push("iat"), c !== void 0 && d.push("aud"), o !== void 0 && d.push("sub"), i !== void 0 && d.push("iss");
|
|
@@ -2804,7 +2804,7 @@ function pn(e, t, r = {}) {
|
|
|
2804
2804
|
let u;
|
|
2805
2805
|
switch (typeof r.clockTolerance) {
|
|
2806
2806
|
case "string":
|
|
2807
|
-
u =
|
|
2807
|
+
u = dr(r.clockTolerance);
|
|
2808
2808
|
break;
|
|
2809
2809
|
case "number":
|
|
2810
2810
|
u = r.clockTolerance;
|
|
@@ -2828,12 +2828,12 @@ function pn(e, t, r = {}) {
|
|
|
2828
2828
|
if (typeof s.exp != "number")
|
|
2829
2829
|
throw new X('"exp" claim must be a number', s, "exp", "invalid");
|
|
2830
2830
|
if (s.exp <= m - u)
|
|
2831
|
-
throw new
|
|
2831
|
+
throw new lr('"exp" claim timestamp check failed', s, "exp", "check_failed");
|
|
2832
2832
|
}
|
|
2833
2833
|
if (f) {
|
|
2834
|
-
const p = m - s.iat, g = typeof f == "number" ? f :
|
|
2834
|
+
const p = m - s.iat, g = typeof f == "number" ? f : dr(f);
|
|
2835
2835
|
if (p - u > g)
|
|
2836
|
-
throw new
|
|
2836
|
+
throw new lr('"iat" claim timestamp check failed (too far in the past)', s, "iat", "check_failed");
|
|
2837
2837
|
if (p < 0 - u)
|
|
2838
2838
|
throw new X('"iat" claim timestamp check failed (it should be in the past)', s, "iat", "check_failed");
|
|
2839
2839
|
}
|
|
@@ -2842,34 +2842,34 @@ function pn(e, t, r = {}) {
|
|
|
2842
2842
|
async function yn(e, t, r) {
|
|
2843
2843
|
const s = await ln(e, t, r);
|
|
2844
2844
|
if (s.protectedHeader.crit?.includes("b64") && s.protectedHeader.b64 === !1)
|
|
2845
|
-
throw new
|
|
2845
|
+
throw new se("JWTs MUST NOT use unencoded payload");
|
|
2846
2846
|
const a = { payload: pn(s.protectedHeader, s.payload, r), protectedHeader: s.protectedHeader };
|
|
2847
2847
|
return typeof t == "function" ? { ...a, key: s.key } : a;
|
|
2848
2848
|
}
|
|
2849
2849
|
function gn(e) {
|
|
2850
2850
|
if (typeof e != "string")
|
|
2851
|
-
throw new
|
|
2851
|
+
throw new se("JWTs must use Compact JWS serialization, JWT must be a string");
|
|
2852
2852
|
const { 1: t, length: r } = e.split(".");
|
|
2853
2853
|
if (r === 5)
|
|
2854
|
-
throw new
|
|
2854
|
+
throw new se("Only JWTs using Compact JWS serialization can be decoded");
|
|
2855
2855
|
if (r !== 3)
|
|
2856
|
-
throw new
|
|
2856
|
+
throw new se("Invalid JWT");
|
|
2857
2857
|
if (!t)
|
|
2858
|
-
throw new
|
|
2858
|
+
throw new se("JWTs must contain a payload");
|
|
2859
2859
|
let s;
|
|
2860
2860
|
try {
|
|
2861
2861
|
s = $e(t);
|
|
2862
2862
|
} catch {
|
|
2863
|
-
throw new
|
|
2863
|
+
throw new se("Failed to base64url decode the payload");
|
|
2864
2864
|
}
|
|
2865
2865
|
let a;
|
|
2866
2866
|
try {
|
|
2867
|
-
a = JSON.parse(
|
|
2867
|
+
a = JSON.parse(Oe.decode(s));
|
|
2868
2868
|
} catch {
|
|
2869
|
-
throw new
|
|
2869
|
+
throw new se("Failed to parse the decoded payload as JSON");
|
|
2870
2870
|
}
|
|
2871
2871
|
if (!Me(a))
|
|
2872
|
-
throw new
|
|
2872
|
+
throw new se("Invalid JWT Claims Set");
|
|
2873
2873
|
return a;
|
|
2874
2874
|
}
|
|
2875
2875
|
const De = async (e) => {
|
|
@@ -2903,25 +2903,25 @@ function Sn() {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
return pt(wn);
|
|
2905
2905
|
}
|
|
2906
|
-
const vn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
2907
|
-
function
|
|
2908
|
-
if (
|
|
2909
|
-
return
|
|
2906
|
+
const vn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), fr = { randomUUID: vn };
|
|
2907
|
+
function mr(e, t, r) {
|
|
2908
|
+
if (fr.randomUUID && !e)
|
|
2909
|
+
return fr.randomUUID();
|
|
2910
2910
|
e = e || {};
|
|
2911
2911
|
const s = e.random ?? e.rng?.() ?? Sn();
|
|
2912
2912
|
if (s.length < 16)
|
|
2913
2913
|
throw new Error("Random bytes length must be >= 16");
|
|
2914
2914
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, En(s);
|
|
2915
2915
|
}
|
|
2916
|
-
const
|
|
2916
|
+
const pr = globalThis.crypto, Tn = (e) => `${mr()}${mr()}`.slice(0, e), An = (e) => btoa(
|
|
2917
2917
|
[...new Uint8Array(e)].map((t) => String.fromCharCode(t)).join("")
|
|
2918
2918
|
);
|
|
2919
2919
|
async function In(e) {
|
|
2920
|
-
if (!
|
|
2920
|
+
if (!pr.subtle)
|
|
2921
2921
|
throw new Error(
|
|
2922
2922
|
"crypto.subtle is available only in secure contexts (HTTPS)."
|
|
2923
2923
|
);
|
|
2924
|
-
const t = new TextEncoder().encode(e), r = await
|
|
2924
|
+
const t = new TextEncoder().encode(e), r = await pr.subtle.digest("SHA-256", t);
|
|
2925
2925
|
return An(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
2926
2926
|
}
|
|
2927
2927
|
async function _n(e) {
|
|
@@ -2953,13 +2953,13 @@ function ee(e) {
|
|
|
2953
2953
|
r += String.fromCharCode(s);
|
|
2954
2954
|
return btoa(r).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
2955
2955
|
}
|
|
2956
|
-
function
|
|
2956
|
+
function st(e) {
|
|
2957
2957
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = (4 - t.length % 4) % 4, s = t.padEnd(t.length + r, "="), a = atob(s), n = new ArrayBuffer(a.length), i = new Uint8Array(n);
|
|
2958
2958
|
for (let o = 0; o < a.length; o++)
|
|
2959
2959
|
i[o] = a.charCodeAt(o);
|
|
2960
2960
|
return n;
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2962
|
+
function Wt() {
|
|
2963
2963
|
return On.stubThis(globalThis?.PublicKeyCredential !== void 0 && typeof globalThis.PublicKeyCredential == "function");
|
|
2964
2964
|
}
|
|
2965
2965
|
const On = {
|
|
@@ -2969,7 +2969,7 @@ function Yr(e) {
|
|
|
2969
2969
|
const { id: t } = e;
|
|
2970
2970
|
return {
|
|
2971
2971
|
...e,
|
|
2972
|
-
id:
|
|
2972
|
+
id: st(t),
|
|
2973
2973
|
/**
|
|
2974
2974
|
* `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer
|
|
2975
2975
|
* transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports
|
|
@@ -3112,14 +3112,14 @@ function Zr(e) {
|
|
|
3112
3112
|
async function $n(e) {
|
|
3113
3113
|
!e.optionsJSON && e.challenge && (console.warn("startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3114
3114
|
const { optionsJSON: t, useAutoRegister: r = !1 } = e;
|
|
3115
|
-
if (!
|
|
3115
|
+
if (!Wt())
|
|
3116
3116
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3117
3117
|
const s = {
|
|
3118
3118
|
...t,
|
|
3119
|
-
challenge:
|
|
3119
|
+
challenge: st(t.challenge),
|
|
3120
3120
|
user: {
|
|
3121
3121
|
...t.user,
|
|
3122
|
-
id:
|
|
3122
|
+
id: st(t.user.id)
|
|
3123
3123
|
},
|
|
3124
3124
|
excludeCredentials: t.excludeCredentials?.map(Yr)
|
|
3125
3125
|
}, a = {};
|
|
@@ -3178,7 +3178,7 @@ function gt(e, t) {
|
|
|
3178
3178
|
`, t);
|
|
3179
3179
|
}
|
|
3180
3180
|
function xn() {
|
|
3181
|
-
if (!
|
|
3181
|
+
if (!Wt())
|
|
3182
3182
|
return bt.stubThis(new Promise((t) => t(!1)));
|
|
3183
3183
|
const e = globalThis.PublicKeyCredential;
|
|
3184
3184
|
return e?.isConditionalMediationAvailable === void 0 ? bt.stubThis(new Promise((t) => t(!1))) : bt.stubThis(e.isConditionalMediationAvailable());
|
|
@@ -3230,13 +3230,13 @@ function Mn({ error: e, options: t }) {
|
|
|
3230
3230
|
async function Dn(e) {
|
|
3231
3231
|
!e.optionsJSON && e.challenge && (console.warn("startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information."), e = { optionsJSON: e });
|
|
3232
3232
|
const { optionsJSON: t, useBrowserAutofill: r = !1, verifyBrowserAutofillInput: s = !0 } = e;
|
|
3233
|
-
if (!
|
|
3233
|
+
if (!Wt())
|
|
3234
3234
|
throw new Error("WebAuthn is not supported in this browser");
|
|
3235
3235
|
let a;
|
|
3236
3236
|
t.allowCredentials?.length !== 0 && (a = t.allowCredentials?.map(Yr));
|
|
3237
3237
|
const n = {
|
|
3238
3238
|
...t,
|
|
3239
|
-
challenge:
|
|
3239
|
+
challenge: st(t.challenge),
|
|
3240
3240
|
allowCredentials: a
|
|
3241
3241
|
}, i = {};
|
|
3242
3242
|
if (r) {
|
|
@@ -3274,36 +3274,36 @@ async function Dn(e) {
|
|
|
3274
3274
|
function es(e, t) {
|
|
3275
3275
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
|
|
3276
3276
|
}
|
|
3277
|
-
const
|
|
3277
|
+
const yr = (e, t) => {
|
|
3278
3278
|
const r = JSON.stringify(
|
|
3279
3279
|
typeof t == "function" ? t() : t
|
|
3280
3280
|
);
|
|
3281
3281
|
window.localStorage.setItem(e, r), es(e, r);
|
|
3282
3282
|
}, Ln = (e) => {
|
|
3283
3283
|
window.localStorage.removeItem(e), es(e, null);
|
|
3284
|
-
},
|
|
3285
|
-
function
|
|
3284
|
+
}, gr = (e) => window.localStorage.getItem(e), Un = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
3285
|
+
function Ge({
|
|
3286
3286
|
key: e,
|
|
3287
3287
|
initialValue: t
|
|
3288
3288
|
}) {
|
|
3289
|
-
const r = Ks(Un, () =>
|
|
3289
|
+
const r = Ks(Un, () => gr(e)), s = z(
|
|
3290
3290
|
(i) => {
|
|
3291
3291
|
try {
|
|
3292
3292
|
const o = typeof i == "function" ? i(JSON.parse(r)) : i;
|
|
3293
|
-
o == null ? Ln(e) :
|
|
3293
|
+
o == null ? Ln(e) : yr(e, o);
|
|
3294
3294
|
} catch (o) {
|
|
3295
3295
|
console.warn(o);
|
|
3296
3296
|
}
|
|
3297
3297
|
},
|
|
3298
3298
|
[e, r]
|
|
3299
|
-
), a =
|
|
3299
|
+
), a = z(() => {
|
|
3300
3300
|
s(t);
|
|
3301
|
-
}, [t, s]), n =
|
|
3301
|
+
}, [t, s]), n = z(() => {
|
|
3302
3302
|
s(null);
|
|
3303
3303
|
}, [s]);
|
|
3304
3304
|
return W(() => {
|
|
3305
3305
|
try {
|
|
3306
|
-
|
|
3306
|
+
gr(e) === null && typeof t < "u" && yr(e, t);
|
|
3307
3307
|
} catch (i) {
|
|
3308
3308
|
console.warn(i);
|
|
3309
3309
|
}
|
|
@@ -3325,17 +3325,17 @@ function Kn() {
|
|
|
3325
3325
|
}
|
|
3326
3326
|
return Et(Hn);
|
|
3327
3327
|
}
|
|
3328
|
-
const Gn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
|
|
3328
|
+
const Gn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), br = { randomUUID: Gn };
|
|
3329
3329
|
function wt(e, t, r) {
|
|
3330
|
-
if (
|
|
3331
|
-
return
|
|
3330
|
+
if (br.randomUUID && !e)
|
|
3331
|
+
return br.randomUUID();
|
|
3332
3332
|
e = e || {};
|
|
3333
3333
|
const s = e.random ?? e.rng?.() ?? Kn();
|
|
3334
3334
|
if (s.length < 16)
|
|
3335
3335
|
throw new Error("Random bytes length must be >= 16");
|
|
3336
3336
|
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, Fn(s);
|
|
3337
3337
|
}
|
|
3338
|
-
const
|
|
3338
|
+
const Te = "Your session has expired. For your security, please log in again to continue.", Bn = "Your session has been successfully terminated.", St = "Login failed. Please try again.", Wn = "Error getting access token, please re-authenticate.", qn = "You forgot to wrap your component in <AuthProvider>.", Be = "@@auth@@", Ne = "LOADING", Ve = "LOGIN", ts = "LOGOUT", Ue = "success", te = "failure", rs = "include", ss = "POST", as = "application/json", We = {
|
|
3339
3339
|
GET_REGISTRATION_OPTIONS: `mutation GetPasskeyRegistrationOptions(
|
|
3340
3340
|
$clientId: String!,
|
|
3341
3341
|
$username: String!,
|
|
@@ -3416,24 +3416,24 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
3416
3416
|
email
|
|
3417
3417
|
}
|
|
3418
3418
|
}`
|
|
3419
|
-
},
|
|
3419
|
+
}, Ae = {
|
|
3420
3420
|
GET_REGISTRATION_OPTIONS: {
|
|
3421
|
-
schema:
|
|
3421
|
+
schema: We.GET_REGISTRATION_OPTIONS,
|
|
3422
3422
|
method: "getPasskeyRegistrationOptions"
|
|
3423
3423
|
},
|
|
3424
3424
|
VERIFY_REGISTRATION: {
|
|
3425
|
-
schema:
|
|
3425
|
+
schema: We.VERIFY_REGISTRATION,
|
|
3426
3426
|
method: "verifyPasskeyRegistration"
|
|
3427
3427
|
},
|
|
3428
3428
|
GET_AUTHENTICATION_OPTIONS: {
|
|
3429
|
-
schema:
|
|
3429
|
+
schema: We.GET_AUTHENTICATION_OPTIONS,
|
|
3430
3430
|
method: "getPasskeyAuthenticationOptions"
|
|
3431
3431
|
},
|
|
3432
3432
|
VERIFY_AUTHENTICATION: {
|
|
3433
|
-
schema:
|
|
3433
|
+
schema: We.VERIFY_AUTHENTICATION,
|
|
3434
3434
|
method: "verifyPasskeyAuthentication"
|
|
3435
3435
|
}
|
|
3436
|
-
},
|
|
3436
|
+
}, Ie = async ({
|
|
3437
3437
|
accessToken: e,
|
|
3438
3438
|
type: t,
|
|
3439
3439
|
clientId: r,
|
|
@@ -3458,7 +3458,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
3458
3458
|
return { status: te, data: [] };
|
|
3459
3459
|
const { data: o } = await i.json();
|
|
3460
3460
|
return {
|
|
3461
|
-
status:
|
|
3461
|
+
status: Ue,
|
|
3462
3462
|
data: o[t.method]
|
|
3463
3463
|
};
|
|
3464
3464
|
} catch (n) {
|
|
@@ -3484,7 +3484,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
3484
3484
|
return { status: te, data: [] };
|
|
3485
3485
|
const { data: n } = await a.json();
|
|
3486
3486
|
return {
|
|
3487
|
-
status:
|
|
3487
|
+
status: Ue,
|
|
3488
3488
|
data: n || []
|
|
3489
3489
|
};
|
|
3490
3490
|
} catch (a) {
|
|
@@ -3592,7 +3592,7 @@ const ve = "Your session has expired. For your security, please log in again to
|
|
|
3592
3592
|
}
|
|
3593
3593
|
});
|
|
3594
3594
|
return a?.data?.code ? {
|
|
3595
|
-
status:
|
|
3595
|
+
status: Ue,
|
|
3596
3596
|
data: a.data.code
|
|
3597
3597
|
} : {
|
|
3598
3598
|
status: te,
|
|
@@ -3684,7 +3684,7 @@ class Zn {
|
|
|
3684
3684
|
domain: n
|
|
3685
3685
|
});
|
|
3686
3686
|
return o.status ? (this.accessToken = o.accessToken, this.refreshToken = o.refreshToken, {
|
|
3687
|
-
status:
|
|
3687
|
+
status: Ue,
|
|
3688
3688
|
newAccessToken: o.accessToken,
|
|
3689
3689
|
newRefreshToken: o.refreshToken
|
|
3690
3690
|
}) : {
|
|
@@ -3696,34 +3696,34 @@ class Zn {
|
|
|
3696
3696
|
};
|
|
3697
3697
|
}
|
|
3698
3698
|
}
|
|
3699
|
-
const
|
|
3699
|
+
const _e = () => {
|
|
3700
3700
|
throw new Error(qn);
|
|
3701
3701
|
}, is = Lt({
|
|
3702
3702
|
isAuthenticated: !1,
|
|
3703
3703
|
isLoading: !1,
|
|
3704
|
-
login:
|
|
3705
|
-
logout:
|
|
3706
|
-
getAccessToken:
|
|
3707
|
-
getIdToken:
|
|
3708
|
-
registeringForPasskey:
|
|
3709
|
-
loginWithPasskey:
|
|
3704
|
+
login: _e,
|
|
3705
|
+
logout: _e,
|
|
3706
|
+
getAccessToken: _e,
|
|
3707
|
+
getIdToken: _e,
|
|
3708
|
+
registeringForPasskey: _e,
|
|
3709
|
+
loginWithPasskey: _e,
|
|
3710
3710
|
logoutReason: "",
|
|
3711
3711
|
authenticationType: ""
|
|
3712
3712
|
}), ei = () => ({
|
|
3713
|
-
...
|
|
3714
|
-
}), ti = (e) =>
|
|
3713
|
+
...it(is)
|
|
3714
|
+
}), ti = (e) => z(
|
|
3715
3715
|
(...t) => {
|
|
3716
3716
|
e && console.info(`==> [Auth ${Date.now()}]: `, ...t);
|
|
3717
3717
|
},
|
|
3718
3718
|
[e]
|
|
3719
|
-
), ri =
|
|
3719
|
+
), ri = oe.createContext({
|
|
3720
3720
|
state: ns,
|
|
3721
3721
|
dispatch: () => {
|
|
3722
3722
|
}
|
|
3723
3723
|
}), si = (e, t) => t?.type === Ne ? {
|
|
3724
3724
|
...e,
|
|
3725
3725
|
isLoading: t.payload.isLoading
|
|
3726
|
-
} : t?.type ===
|
|
3726
|
+
} : t?.type === Ve ? {
|
|
3727
3727
|
...e,
|
|
3728
3728
|
isLoading: !1,
|
|
3729
3729
|
isAuthenticated: !0,
|
|
@@ -3740,7 +3740,7 @@ const Ie = () => {
|
|
|
3740
3740
|
} : e, ai = ({ children: e }) => {
|
|
3741
3741
|
const t = ei();
|
|
3742
3742
|
return /* @__PURE__ */ h(Jr.Provider, { value: t, children: e });
|
|
3743
|
-
},
|
|
3743
|
+
}, Er = ({
|
|
3744
3744
|
children: e,
|
|
3745
3745
|
sessionExpiration: t,
|
|
3746
3746
|
clientId: r,
|
|
@@ -3748,20 +3748,20 @@ const Ie = () => {
|
|
|
3748
3748
|
debug: a = !1,
|
|
3749
3749
|
endpoint: n = Vn ? "https://auth.gizmette.local.com:3003" : "https://mylogin.gizmette.com/auth"
|
|
3750
3750
|
}) => {
|
|
3751
|
-
const [i, o] =
|
|
3751
|
+
const [i, o] = Or(si, {
|
|
3752
3752
|
...ns,
|
|
3753
3753
|
debug: a
|
|
3754
|
-
}), c = ti(a), f = j(!1), [d, u, , l] =
|
|
3755
|
-
key: `${
|
|
3756
|
-
}), [m, p, , g] =
|
|
3757
|
-
key: `${
|
|
3758
|
-
}), [b, E, , O] =
|
|
3754
|
+
}), c = ti(a), f = j(!1), [d, u, , l] = Ge({
|
|
3755
|
+
key: `${Be}::${r}::@@user@@`
|
|
3756
|
+
}), [m, p, , g] = Ge({
|
|
3757
|
+
key: `${Be}::${r}::@@access@@`
|
|
3758
|
+
}), [b, E, , O] = Ge(
|
|
3759
3759
|
{
|
|
3760
|
-
key: `${
|
|
3760
|
+
key: `${Be}::${r}::@@refresh@@`
|
|
3761
3761
|
}
|
|
3762
|
-
), [A, K, , R] =
|
|
3763
|
-
key: `${
|
|
3764
|
-
}),
|
|
3762
|
+
), [A, K, , R] = Ge({
|
|
3763
|
+
key: `${Be}::${r}::@@nonce@@`
|
|
3764
|
+
}), Y = new Zn(m, b), C = z(() => {
|
|
3765
3765
|
c("removeLocalStorage: removing local storage"), l(), g(), O(), R();
|
|
3766
3766
|
}, [
|
|
3767
3767
|
g,
|
|
@@ -3769,7 +3769,7 @@ const Ie = () => {
|
|
|
3769
3769
|
R,
|
|
3770
3770
|
O,
|
|
3771
3771
|
c
|
|
3772
|
-
]), v =
|
|
3772
|
+
]), v = z(
|
|
3773
3773
|
(w) => {
|
|
3774
3774
|
c(
|
|
3775
3775
|
"removeStateAndLocalStorage: removing state and local storage with reason: ",
|
|
@@ -3777,12 +3777,12 @@ const Ie = () => {
|
|
|
3777
3777
|
), o({
|
|
3778
3778
|
type: ts,
|
|
3779
3779
|
payload: {
|
|
3780
|
-
logoutReason: w ||
|
|
3780
|
+
logoutReason: w || Te
|
|
3781
3781
|
}
|
|
3782
3782
|
}), C(), o({ type: Ne, payload: { isLoading: !1 } });
|
|
3783
3783
|
},
|
|
3784
3784
|
[C, c]
|
|
3785
|
-
), x =
|
|
3785
|
+
), x = z(
|
|
3786
3786
|
async (w) => {
|
|
3787
3787
|
c("invalidateAndLogout: invalidating and logging out");
|
|
3788
3788
|
const { user: T } = i, S = T?.userId || Qn(d);
|
|
@@ -3794,7 +3794,7 @@ const Ie = () => {
|
|
|
3794
3794
|
domain: s,
|
|
3795
3795
|
idToken: d,
|
|
3796
3796
|
endpoint: n
|
|
3797
|
-
}), v(w ||
|
|
3797
|
+
}), v(w || Te);
|
|
3798
3798
|
},
|
|
3799
3799
|
[
|
|
3800
3800
|
d,
|
|
@@ -3812,7 +3812,7 @@ const Ie = () => {
|
|
|
3812
3812
|
try {
|
|
3813
3813
|
const w = await De(d);
|
|
3814
3814
|
w && w.payload[F.USER_ID_KEY] !== "" ? (c("useEffect: setting the authentication state"), o({
|
|
3815
|
-
type:
|
|
3815
|
+
type: Ve,
|
|
3816
3816
|
payload: {
|
|
3817
3817
|
authenticationType: w.payload[F.AUTH_TYPE_KEY],
|
|
3818
3818
|
user: {
|
|
@@ -3821,11 +3821,11 @@ const Ie = () => {
|
|
|
3821
3821
|
email: w.payload[F.EMAIL_KEY]
|
|
3822
3822
|
}
|
|
3823
3823
|
}
|
|
3824
|
-
})) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(
|
|
3824
|
+
})) : (c("useEffect: invalid JWT, invalidating and logging out"), await x(Te));
|
|
3825
3825
|
} catch {
|
|
3826
3826
|
c(
|
|
3827
3827
|
"useEffect: exception validating JWT, invalidating and logging out"
|
|
3828
|
-
), await x(
|
|
3828
|
+
), await x(Te);
|
|
3829
3829
|
}
|
|
3830
3830
|
})() : (c("useEffect: setting the loading state to false"), o({ type: Ne, payload: { isLoading: !1 } })), () => {
|
|
3831
3831
|
f.current = !0;
|
|
@@ -3835,14 +3835,14 @@ const Ie = () => {
|
|
|
3835
3835
|
o({ type: Ne, payload: { isLoading: !0 } }), C();
|
|
3836
3836
|
const S = wt();
|
|
3837
3837
|
K(S), c("login: Logging in with password");
|
|
3838
|
-
const { code_verifier: le, code_challenge: ue } = await _n(),
|
|
3838
|
+
const { code_verifier: le, code_challenge: ue } = await _n(), Xt = await zn({
|
|
3839
3839
|
endpoint: n,
|
|
3840
3840
|
nonce: S,
|
|
3841
3841
|
clientId: r,
|
|
3842
3842
|
code_challenge: ue
|
|
3843
3843
|
});
|
|
3844
|
-
if (
|
|
3845
|
-
const
|
|
3844
|
+
if (Xt.status) {
|
|
3845
|
+
const Se = await Yn({
|
|
3846
3846
|
endpoint: n,
|
|
3847
3847
|
username: w,
|
|
3848
3848
|
password: T,
|
|
@@ -3850,19 +3850,19 @@ const Ie = () => {
|
|
|
3850
3850
|
sessionExpiration: t,
|
|
3851
3851
|
nonce: S,
|
|
3852
3852
|
type: Pe.CODE,
|
|
3853
|
-
code:
|
|
3853
|
+
code: Xt.data,
|
|
3854
3854
|
code_verifier: le,
|
|
3855
3855
|
domain: s,
|
|
3856
3856
|
ua: navigator.userAgent
|
|
3857
3857
|
});
|
|
3858
|
-
return
|
|
3859
|
-
type:
|
|
3858
|
+
return Se.status ? (u(Se.idToken), p(Se.accessToken), E(Se.refreshToken), o({
|
|
3859
|
+
type: Ve,
|
|
3860
3860
|
payload: {
|
|
3861
3861
|
authenticationType: Pe.CODE,
|
|
3862
3862
|
user: {
|
|
3863
|
-
userId:
|
|
3863
|
+
userId: Se.userId,
|
|
3864
3864
|
username: w,
|
|
3865
|
-
email:
|
|
3865
|
+
email: Se.email
|
|
3866
3866
|
}
|
|
3867
3867
|
}
|
|
3868
3868
|
}), !0) : (v(St), !1);
|
|
@@ -3881,7 +3881,7 @@ const Ie = () => {
|
|
|
3881
3881
|
return m;
|
|
3882
3882
|
}
|
|
3883
3883
|
c("getAccessToken: invalid access token, trying to refresh it");
|
|
3884
|
-
const S = await
|
|
3884
|
+
const S = await Y.refreshtoken({
|
|
3885
3885
|
endpoint: n,
|
|
3886
3886
|
clientId: r,
|
|
3887
3887
|
userId: T.userId,
|
|
@@ -3890,11 +3890,11 @@ const Ie = () => {
|
|
|
3890
3890
|
});
|
|
3891
3891
|
return S.status && S.status === "success" && S.newAccessToken ? (p(S.newAccessToken), E(S.newRefreshToken), S.newAccessToken) : (c(
|
|
3892
3892
|
"getAccessToken: invalid refresh token, need to re-authenticate"
|
|
3893
|
-
), await x(
|
|
3893
|
+
), await x(Te), "");
|
|
3894
3894
|
}
|
|
3895
3895
|
return c(
|
|
3896
3896
|
"getAccessToken: user is not authenticated, cannot get access token"
|
|
3897
|
-
), await x(
|
|
3897
|
+
), await x(Te), "";
|
|
3898
3898
|
} catch {
|
|
3899
3899
|
return c(
|
|
3900
3900
|
"getAccessToken: exception occurred, invalidating and logging out"
|
|
@@ -3902,11 +3902,11 @@ const Ie = () => {
|
|
|
3902
3902
|
}
|
|
3903
3903
|
}, V = () => i.isAuthenticated && d ? d : "", ce = async () => {
|
|
3904
3904
|
const { user: w } = i;
|
|
3905
|
-
let T = await
|
|
3905
|
+
let T = await Ie({
|
|
3906
3906
|
endpoint: n,
|
|
3907
3907
|
accessToken: m,
|
|
3908
3908
|
clientId: r,
|
|
3909
|
-
type:
|
|
3909
|
+
type: Ae.GET_REGISTRATION_OPTIONS,
|
|
3910
3910
|
params: {
|
|
3911
3911
|
clientId: r,
|
|
3912
3912
|
id: w?.userId,
|
|
@@ -3918,11 +3918,11 @@ const Ie = () => {
|
|
|
3918
3918
|
const S = await $n({
|
|
3919
3919
|
optionsJSON: T.data
|
|
3920
3920
|
});
|
|
3921
|
-
return T = await
|
|
3921
|
+
return T = await Ie({
|
|
3922
3922
|
endpoint: n,
|
|
3923
3923
|
accessToken: m,
|
|
3924
3924
|
clientId: r,
|
|
3925
|
-
type:
|
|
3925
|
+
type: Ae.VERIFY_REGISTRATION,
|
|
3926
3926
|
params: {
|
|
3927
3927
|
clientId: r,
|
|
3928
3928
|
id: w?.userId,
|
|
@@ -3931,11 +3931,11 @@ const Ie = () => {
|
|
|
3931
3931
|
}
|
|
3932
3932
|
}), !!(T.status && T.data.length > 0);
|
|
3933
3933
|
} catch {
|
|
3934
|
-
return await
|
|
3934
|
+
return await Ie({
|
|
3935
3935
|
endpoint: n,
|
|
3936
3936
|
accessToken: m,
|
|
3937
3937
|
clientId: r,
|
|
3938
|
-
type:
|
|
3938
|
+
type: Ae.VERIFY_REGISTRATION,
|
|
3939
3939
|
params: {
|
|
3940
3940
|
clientId: r,
|
|
3941
3941
|
id: w?.userId,
|
|
@@ -3945,16 +3945,16 @@ const Ie = () => {
|
|
|
3945
3945
|
}), !1;
|
|
3946
3946
|
}
|
|
3947
3947
|
return !1;
|
|
3948
|
-
},
|
|
3948
|
+
}, we = async () => {
|
|
3949
3949
|
o({ type: Ne, payload: { isLoading: !0 } }), C();
|
|
3950
3950
|
const w = wt();
|
|
3951
3951
|
K(w), c("loginWithPasskey");
|
|
3952
3952
|
const T = wt();
|
|
3953
|
-
let S = await
|
|
3953
|
+
let S = await Ie({
|
|
3954
3954
|
endpoint: n,
|
|
3955
3955
|
accessToken: m,
|
|
3956
3956
|
clientId: r,
|
|
3957
|
-
type:
|
|
3957
|
+
type: Ae.GET_AUTHENTICATION_OPTIONS,
|
|
3958
3958
|
params: {
|
|
3959
3959
|
id: T,
|
|
3960
3960
|
clientId: r
|
|
@@ -3965,11 +3965,11 @@ const Ie = () => {
|
|
|
3965
3965
|
const le = await Dn({
|
|
3966
3966
|
optionsJSON: S.data
|
|
3967
3967
|
});
|
|
3968
|
-
return S = await
|
|
3968
|
+
return S = await Ie({
|
|
3969
3969
|
endpoint: n,
|
|
3970
3970
|
accessToken: m,
|
|
3971
3971
|
clientId: r,
|
|
3972
|
-
type:
|
|
3972
|
+
type: Ae.VERIFY_AUTHENTICATION,
|
|
3973
3973
|
params: {
|
|
3974
3974
|
clientId: r,
|
|
3975
3975
|
id: T,
|
|
@@ -3979,8 +3979,8 @@ const Ie = () => {
|
|
|
3979
3979
|
sessionExpiration: t,
|
|
3980
3980
|
ua: navigator.userAgent
|
|
3981
3981
|
}
|
|
3982
|
-
}), S.data.status ===
|
|
3983
|
-
type:
|
|
3982
|
+
}), S.data.status === Ue ? (u(S.data.idToken), p(S.data.accessToken), E(S.data.refreshToken), o({
|
|
3983
|
+
type: Ve,
|
|
3984
3984
|
payload: {
|
|
3985
3985
|
authenticationType: Pe.PASSKEY,
|
|
3986
3986
|
user: {
|
|
@@ -3991,11 +3991,11 @@ const Ie = () => {
|
|
|
3991
3991
|
}
|
|
3992
3992
|
}), !0) : (v(St), !1);
|
|
3993
3993
|
} catch {
|
|
3994
|
-
return await
|
|
3994
|
+
return await Ie({
|
|
3995
3995
|
endpoint: n,
|
|
3996
3996
|
accessToken: m,
|
|
3997
3997
|
clientId: r,
|
|
3998
|
-
type:
|
|
3998
|
+
type: Ae.VERIFY_AUTHENTICATION,
|
|
3999
3999
|
params: {
|
|
4000
4000
|
clientId: r,
|
|
4001
4001
|
id: T,
|
|
@@ -4018,7 +4018,7 @@ const Ie = () => {
|
|
|
4018
4018
|
getAccessToken: N,
|
|
4019
4019
|
getIdToken: V,
|
|
4020
4020
|
registeringForPasskey: ce,
|
|
4021
|
-
loginWithPasskey:
|
|
4021
|
+
loginWithPasskey: we
|
|
4022
4022
|
},
|
|
4023
4023
|
children: /* @__PURE__ */ h(ai, { children: e })
|
|
4024
4024
|
}
|
|
@@ -4038,16 +4038,16 @@ try {
|
|
|
4038
4038
|
} catch {
|
|
4039
4039
|
}
|
|
4040
4040
|
const os = () => {
|
|
4041
|
-
const e =
|
|
4041
|
+
const e = it(Jr);
|
|
4042
4042
|
if (!e)
|
|
4043
4043
|
throw new Error("useAuth must be used within an AuthHookProvider");
|
|
4044
4044
|
return e;
|
|
4045
|
-
}, nc = "I'm having trouble right now. Please try again later.", ic = "action-search", oc = "action-sort", cc = "action-toggle-prompt", lc = "action-reset-prompt", cs = "sassy-saint-", uc = "search", dc = "sort", hc = "sort-timestamp", fc = "sort-token-usage", mc = "sort-memory-direction", pc = "sort-memory-column", yc = "favorites-only", gc = "private-disclosure", bc = "reasoning-disclosure", ls = "service-worker", Ec = "chat-id",
|
|
4046
|
-
let vt = null,
|
|
4045
|
+
}, nc = "I'm having trouble right now. Please try again later.", ic = "action-search", oc = "action-sort", cc = "action-toggle-prompt", lc = "action-reset-prompt", cs = "sassy-saint-", uc = "search", dc = "sort", hc = "sort-timestamp", fc = "sort-token-usage", mc = "sort-memory-direction", pc = "sort-memory-column", yc = "favorites-only", gc = "private-disclosure", bc = "reasoning-disclosure", ls = "service-worker", Ec = "chat-id", wr = "b44c68f0-e5b3-4a1d-a3e3-df8632b0223b", wc = 10, Sc = 30, vc = "av-prompt", Tc = "av-prompt-editable", Ac = "size-5 sm:size-4", Ic = 30, _c = 15, Rc = 130, Cc = 160, Oc = 16, kc = 24, Nc = 76, Pc = 76;
|
|
4046
|
+
let vt = null, ae = !1;
|
|
4047
4047
|
typeof window < "u" && "serviceWorker" in navigator && navigator.serviceWorker.addEventListener("controllerchange", () => {
|
|
4048
|
-
|
|
4048
|
+
ae && (ae = !1, window.location.reload());
|
|
4049
4049
|
});
|
|
4050
|
-
function
|
|
4050
|
+
function qt() {
|
|
4051
4051
|
return "serviceWorker" in navigator;
|
|
4052
4052
|
}
|
|
4053
4053
|
function xt() {
|
|
@@ -4065,7 +4065,7 @@ function ni(e) {
|
|
|
4065
4065
|
async function us() {
|
|
4066
4066
|
if (!xt())
|
|
4067
4067
|
return !1;
|
|
4068
|
-
if (!
|
|
4068
|
+
if (!qt())
|
|
4069
4069
|
return console.warn("[SW] Service workers not supported"), !1;
|
|
4070
4070
|
try {
|
|
4071
4071
|
return vt = await navigator.serviceWorker.register("/sw.js", {
|
|
@@ -4083,7 +4083,7 @@ async function us() {
|
|
|
4083
4083
|
}
|
|
4084
4084
|
}
|
|
4085
4085
|
async function ii() {
|
|
4086
|
-
if (!
|
|
4086
|
+
if (!qt())
|
|
4087
4087
|
return !1;
|
|
4088
4088
|
try {
|
|
4089
4089
|
const e = await navigator.serviceWorker.getRegistration();
|
|
@@ -4094,17 +4094,17 @@ async function ii() {
|
|
|
4094
4094
|
}
|
|
4095
4095
|
async function $c(e) {
|
|
4096
4096
|
if (ni(e), e) {
|
|
4097
|
-
|
|
4097
|
+
ae = !0;
|
|
4098
4098
|
try {
|
|
4099
4099
|
sessionStorage.setItem("sw-toggle-pending", "enabled");
|
|
4100
4100
|
} catch {
|
|
4101
4101
|
}
|
|
4102
|
-
await us(), navigator.serviceWorker.controller &&
|
|
4102
|
+
await us(), navigator.serviceWorker.controller && ae && (ae = !1, window.location.reload());
|
|
4103
4103
|
try {
|
|
4104
4104
|
navigator.serviceWorker.ready.then(() => {
|
|
4105
|
-
|
|
4105
|
+
ae && xt() && (ae = !1, window.location.reload());
|
|
4106
4106
|
}), setTimeout(() => {
|
|
4107
|
-
|
|
4107
|
+
ae && xt() && (ae = !1, window.location.reload());
|
|
4108
4108
|
}, 3e3);
|
|
4109
4109
|
} catch {
|
|
4110
4110
|
}
|
|
@@ -4114,7 +4114,7 @@ async function $c(e) {
|
|
|
4114
4114
|
} catch {
|
|
4115
4115
|
}
|
|
4116
4116
|
try {
|
|
4117
|
-
|
|
4117
|
+
qt() && await oi();
|
|
4118
4118
|
} catch (t) {
|
|
4119
4119
|
console.warn("[SW] Failed to invalidate cache:", t);
|
|
4120
4120
|
}
|
|
@@ -4174,8 +4174,8 @@ async function xc(e = {}) {
|
|
|
4174
4174
|
return console.warn("[SW] getCacheInfo failed:", r), { version: Tt(), caches: [], totalItems: 0 };
|
|
4175
4175
|
}
|
|
4176
4176
|
}
|
|
4177
|
-
const Mc = "user", Dc = "assistant", Lc = "data",
|
|
4178
|
-
|
|
4177
|
+
const Mc = "user", Dc = "assistant", Lc = "data", Fe = "OpenAI", lt = "Anthropic", ut = "Google", ds = "Perplexity", Uc = Fe, ci = [
|
|
4178
|
+
Fe,
|
|
4179
4179
|
lt,
|
|
4180
4180
|
ut
|
|
4181
4181
|
], hs = "gpt-5", fs = "gpt-5-mini", ms = "gpt-5-nano", ps = "gpt-4.1-nano", ys = "claude-haiku-4-5-20251001", gs = "claude-sonnet-4-5-20250929", bs = "gemini-2.5-flash", Es = "gemini-2.5-pro", ws = "sonar", Ss = "sonar-pro", Fc = {
|
|
@@ -4190,7 +4190,7 @@ const Mc = "user", Dc = "assistant", Lc = "data", Ue = "OpenAI", lt = "Anthropic
|
|
|
4190
4190
|
[ws]: "Sonar",
|
|
4191
4191
|
[Ss]: "Sonar Pro"
|
|
4192
4192
|
}, vs = {
|
|
4193
|
-
[
|
|
4193
|
+
[Fe]: [
|
|
4194
4194
|
ps,
|
|
4195
4195
|
hs,
|
|
4196
4196
|
fs,
|
|
@@ -4204,7 +4204,7 @@ const Mc = "user", Dc = "assistant", Lc = "data", Ue = "OpenAI", lt = "Anthropic
|
|
|
4204
4204
|
li,
|
|
4205
4205
|
ui
|
|
4206
4206
|
],
|
|
4207
|
-
[
|
|
4207
|
+
[Fe]: [
|
|
4208
4208
|
di,
|
|
4209
4209
|
hi,
|
|
4210
4210
|
fi
|
|
@@ -4234,7 +4234,7 @@ const Mc = "user", Dc = "assistant", Lc = "data", Ue = "OpenAI", lt = "Anthropic
|
|
|
4234
4234
|
for (const [s, a] of Object.entries(
|
|
4235
4235
|
vs
|
|
4236
4236
|
))
|
|
4237
|
-
a.includes(r) && (s ===
|
|
4237
|
+
a.includes(r) && (s === Fe || s === lt || s === ut) && t.add(s);
|
|
4238
4238
|
return ci.filter((r) => t.has(r));
|
|
4239
4239
|
}, gi = (e) => {
|
|
4240
4240
|
const t = /* @__PURE__ */ new Map();
|
|
@@ -4460,10 +4460,13 @@ const G = {
|
|
|
4460
4460
|
DELETE_MEMORY: `mutation DeleteMemory($user: String!, $memoryId: String!) {
|
|
4461
4461
|
deleteMemory(user: $user, memoryId: $memoryId)
|
|
4462
4462
|
}`,
|
|
4463
|
+
UPDATE_MEMORY: `mutation UpdateMemory($user: String!, $memoryId: String!, $description: String!) {
|
|
4464
|
+
updateMemory(user: $user, memoryId: $memoryId, description: $description)
|
|
4465
|
+
}`,
|
|
4463
4466
|
DELETE_MEMORIES: `mutation DeleteMemories($user: String!) {
|
|
4464
4467
|
deleteMemories(user: $user)
|
|
4465
4468
|
}`
|
|
4466
|
-
},
|
|
4469
|
+
}, J = {
|
|
4467
4470
|
GET_LOCATION: {
|
|
4468
4471
|
schema: G.GET_LOCATION,
|
|
4469
4472
|
method: "location"
|
|
@@ -4519,10 +4522,13 @@ const G = {
|
|
|
4519
4522
|
DELETE_MEMORY: {
|
|
4520
4523
|
schema: G.DELETE_MEMORY
|
|
4521
4524
|
},
|
|
4525
|
+
UPDATE_MEMORY: {
|
|
4526
|
+
schema: G.UPDATE_MEMORY
|
|
4527
|
+
},
|
|
4522
4528
|
DELETE_MEMORIES: {
|
|
4523
4529
|
schema: G.DELETE_MEMORIES
|
|
4524
4530
|
}
|
|
4525
|
-
}, wi = process.env.PUBLIC_SASSY_API_SERVER_URL,
|
|
4531
|
+
}, wi = process.env.PUBLIC_SASSY_API_SERVER_URL, ye = async ({
|
|
4526
4532
|
query: e,
|
|
4527
4533
|
data: t,
|
|
4528
4534
|
headers: r = {},
|
|
@@ -4545,13 +4551,13 @@ const G = {
|
|
|
4545
4551
|
try {
|
|
4546
4552
|
let r;
|
|
4547
4553
|
if (e.noAuth === !0)
|
|
4548
|
-
r = await
|
|
4554
|
+
r = await ye({
|
|
4549
4555
|
query: e.type.schema,
|
|
4550
4556
|
data: t
|
|
4551
4557
|
});
|
|
4552
4558
|
else {
|
|
4553
4559
|
const n = `Bearer ${e.accessToken}`;
|
|
4554
|
-
r = await
|
|
4560
|
+
r = await ye({
|
|
4555
4561
|
headers: {
|
|
4556
4562
|
authorization: n
|
|
4557
4563
|
},
|
|
@@ -4584,7 +4590,7 @@ const G = {
|
|
|
4584
4590
|
};
|
|
4585
4591
|
return t && (a.model = t), await Ts({
|
|
4586
4592
|
accessToken: r,
|
|
4587
|
-
type:
|
|
4593
|
+
type: J.SET_USER_PREFERENCES,
|
|
4588
4594
|
params: a
|
|
4589
4595
|
});
|
|
4590
4596
|
}, Jc = async ({
|
|
@@ -4593,12 +4599,12 @@ const G = {
|
|
|
4593
4599
|
username: r
|
|
4594
4600
|
}) => await Ts({
|
|
4595
4601
|
accessToken: t,
|
|
4596
|
-
type:
|
|
4602
|
+
type: J.SET_USER_PREFERENCES,
|
|
4597
4603
|
params: {
|
|
4598
4604
|
user: r,
|
|
4599
4605
|
plan: e
|
|
4600
4606
|
}
|
|
4601
|
-
}),
|
|
4607
|
+
}), re = {
|
|
4602
4608
|
CHATS: "chats",
|
|
4603
4609
|
CHATS_STATS: "chatsStats",
|
|
4604
4610
|
CAPABILITIES: "capabilities",
|
|
@@ -4606,16 +4612,16 @@ const G = {
|
|
|
4606
4612
|
PREFERENCES: "preferences",
|
|
4607
4613
|
USAGE: "usage",
|
|
4608
4614
|
USER_MEMORIES: "userMemories"
|
|
4609
|
-
}, Yc = () =>
|
|
4610
|
-
queryKey: [
|
|
4611
|
-
queryFn: async () => await
|
|
4612
|
-
type:
|
|
4615
|
+
}, Yc = () => ge({
|
|
4616
|
+
queryKey: [re.CAPABILITIES],
|
|
4617
|
+
queryFn: async () => await Ee({
|
|
4618
|
+
type: J.GET_SERVER_CAPABILITIES,
|
|
4613
4619
|
noAuth: !0
|
|
4614
4620
|
})
|
|
4615
|
-
}), zc = () =>
|
|
4616
|
-
queryKey: [
|
|
4617
|
-
queryFn: async () => await
|
|
4618
|
-
type:
|
|
4621
|
+
}), zc = () => ge({
|
|
4622
|
+
queryKey: [re.CHANGELOGS],
|
|
4623
|
+
queryFn: async () => await Ee({
|
|
4624
|
+
type: J.GET_CHANGELOGS,
|
|
4619
4625
|
noAuth: !0,
|
|
4620
4626
|
params: {
|
|
4621
4627
|
client: !0
|
|
@@ -4624,25 +4630,25 @@ const G = {
|
|
|
4624
4630
|
}), Si = ({
|
|
4625
4631
|
user: e,
|
|
4626
4632
|
getAccessToken: t
|
|
4627
|
-
}) =>
|
|
4628
|
-
queryKey: [
|
|
4629
|
-
queryFn: async () => await
|
|
4633
|
+
}) => ge({
|
|
4634
|
+
queryKey: [re.PREFERENCES, e],
|
|
4635
|
+
queryFn: async () => await Ee({
|
|
4630
4636
|
params: {
|
|
4631
4637
|
user: e
|
|
4632
4638
|
},
|
|
4633
|
-
type:
|
|
4639
|
+
type: J.GET_USER_PREFERENCES,
|
|
4634
4640
|
getAccessToken: t
|
|
4635
4641
|
})
|
|
4636
4642
|
}), Xc = ({
|
|
4637
4643
|
user: e,
|
|
4638
4644
|
getAccessToken: t
|
|
4639
|
-
}) =>
|
|
4640
|
-
queryKey: [
|
|
4641
|
-
queryFn: async () => await
|
|
4645
|
+
}) => ge({
|
|
4646
|
+
queryKey: [re.CHATS_STATS, e],
|
|
4647
|
+
queryFn: async () => await Ee({
|
|
4642
4648
|
params: {
|
|
4643
4649
|
user: e
|
|
4644
4650
|
},
|
|
4645
|
-
type:
|
|
4651
|
+
type: J.GET_CHATS_STATS,
|
|
4646
4652
|
getAccessToken: t
|
|
4647
4653
|
})
|
|
4648
4654
|
}), Zc = ({
|
|
@@ -4652,12 +4658,12 @@ const G = {
|
|
|
4652
4658
|
sortedCell: s,
|
|
4653
4659
|
getAccessToken: a,
|
|
4654
4660
|
enabled: n = !0
|
|
4655
|
-
}) =>
|
|
4661
|
+
}) => ge({
|
|
4656
4662
|
enabled: n,
|
|
4657
4663
|
staleTime: 60 * 1e3,
|
|
4658
4664
|
// 1 minute
|
|
4659
|
-
queryKey: [
|
|
4660
|
-
queryFn: async () => await
|
|
4665
|
+
queryKey: [re.CHATS, e, t, r, s],
|
|
4666
|
+
queryFn: async () => await Ee({
|
|
4661
4667
|
params: {
|
|
4662
4668
|
user: e,
|
|
4663
4669
|
searchString: t,
|
|
@@ -4666,7 +4672,7 @@ const G = {
|
|
|
4666
4672
|
limit: 1,
|
|
4667
4673
|
truncateSize: 100
|
|
4668
4674
|
},
|
|
4669
|
-
type:
|
|
4675
|
+
type: J.GET_CHATS,
|
|
4670
4676
|
getAccessToken: a
|
|
4671
4677
|
})
|
|
4672
4678
|
}), el = ({
|
|
@@ -4675,16 +4681,16 @@ const G = {
|
|
|
4675
4681
|
year: r = (/* @__PURE__ */ new Date()).getFullYear().toString(),
|
|
4676
4682
|
getAccessToken: s,
|
|
4677
4683
|
enabled: a = !0
|
|
4678
|
-
}) =>
|
|
4684
|
+
}) => ge({
|
|
4679
4685
|
enabled: a,
|
|
4680
|
-
queryKey: [
|
|
4681
|
-
queryFn: async () => await
|
|
4686
|
+
queryKey: [re.USAGE, e, t, r],
|
|
4687
|
+
queryFn: async () => await Ee({
|
|
4682
4688
|
params: {
|
|
4683
4689
|
user: e,
|
|
4684
4690
|
month: t,
|
|
4685
4691
|
year: r
|
|
4686
4692
|
},
|
|
4687
|
-
type:
|
|
4693
|
+
type: J.GET_USAGE,
|
|
4688
4694
|
getAccessToken: s
|
|
4689
4695
|
})
|
|
4690
4696
|
}), tl = ({
|
|
@@ -4692,25 +4698,50 @@ const G = {
|
|
|
4692
4698
|
query: t,
|
|
4693
4699
|
getAccessToken: r,
|
|
4694
4700
|
enabled: s = !0
|
|
4695
|
-
}) =>
|
|
4701
|
+
}) => ge({
|
|
4696
4702
|
enabled: s && !!e,
|
|
4697
|
-
queryKey: [
|
|
4698
|
-
queryFn: async () => await
|
|
4703
|
+
queryKey: [re.USER_MEMORIES, e, t],
|
|
4704
|
+
queryFn: async () => await Ee({
|
|
4699
4705
|
params: { user: e, query: t },
|
|
4700
|
-
type:
|
|
4706
|
+
type: J.GET_USER_MEMORIES,
|
|
4701
4707
|
getAccessToken: r
|
|
4702
4708
|
})
|
|
4703
4709
|
}), rl = ({
|
|
4704
4710
|
getAccessToken: e
|
|
4705
4711
|
}) => {
|
|
4706
|
-
const t =
|
|
4707
|
-
return
|
|
4712
|
+
const t = Le();
|
|
4713
|
+
return Kt({
|
|
4714
|
+
mutationFn: async ({
|
|
4715
|
+
user: r,
|
|
4716
|
+
memoryId: s,
|
|
4717
|
+
description: a
|
|
4718
|
+
}) => {
|
|
4719
|
+
const n = await e(), i = await ye({
|
|
4720
|
+
query: J.UPDATE_MEMORY.schema,
|
|
4721
|
+
data: { user: r, memoryId: s, description: a },
|
|
4722
|
+
headers: { authorization: `Bearer ${n}` }
|
|
4723
|
+
}), { data: o, errors: c } = await i.json();
|
|
4724
|
+
if (c)
|
|
4725
|
+
throw new Error(c[0]?.message || "Update memory failed");
|
|
4726
|
+
return o.updateMemory;
|
|
4727
|
+
},
|
|
4728
|
+
onSuccess: (r, s) => {
|
|
4729
|
+
t.invalidateQueries({
|
|
4730
|
+
queryKey: [re.USER_MEMORIES, s.user]
|
|
4731
|
+
});
|
|
4732
|
+
}
|
|
4733
|
+
});
|
|
4734
|
+
}, sl = ({
|
|
4735
|
+
getAccessToken: e
|
|
4736
|
+
}) => {
|
|
4737
|
+
const t = Le();
|
|
4738
|
+
return Kt({
|
|
4708
4739
|
mutationFn: async ({
|
|
4709
4740
|
user: r,
|
|
4710
4741
|
memoryId: s
|
|
4711
4742
|
}) => {
|
|
4712
|
-
const a = await e(), n = await
|
|
4713
|
-
query:
|
|
4743
|
+
const a = await e(), n = await ye({
|
|
4744
|
+
query: J.DELETE_MEMORY.schema,
|
|
4714
4745
|
data: { user: r, memoryId: s },
|
|
4715
4746
|
headers: { authorization: `Bearer ${a}` }
|
|
4716
4747
|
}), { data: i, errors: o } = await n.json();
|
|
@@ -4720,18 +4751,18 @@ const G = {
|
|
|
4720
4751
|
},
|
|
4721
4752
|
onSuccess: (r, s) => {
|
|
4722
4753
|
t.invalidateQueries({
|
|
4723
|
-
queryKey: [
|
|
4754
|
+
queryKey: [re.USER_MEMORIES, s.user]
|
|
4724
4755
|
});
|
|
4725
4756
|
}
|
|
4726
4757
|
});
|
|
4727
|
-
},
|
|
4758
|
+
}, al = ({
|
|
4728
4759
|
getAccessToken: e
|
|
4729
4760
|
}) => {
|
|
4730
|
-
const t =
|
|
4731
|
-
return
|
|
4761
|
+
const t = Le();
|
|
4762
|
+
return Kt({
|
|
4732
4763
|
mutationFn: async ({ user: r }) => {
|
|
4733
|
-
const s = await e(), a = await
|
|
4734
|
-
query:
|
|
4764
|
+
const s = await e(), a = await ye({
|
|
4765
|
+
query: J.DELETE_MEMORIES.schema,
|
|
4735
4766
|
data: { user: r },
|
|
4736
4767
|
headers: { authorization: `Bearer ${s}` }
|
|
4737
4768
|
}), { data: n, errors: i } = await a.json();
|
|
@@ -4741,11 +4772,11 @@ const G = {
|
|
|
4741
4772
|
},
|
|
4742
4773
|
onSuccess: (r, s) => {
|
|
4743
4774
|
t.invalidateQueries({
|
|
4744
|
-
queryKey: [
|
|
4775
|
+
queryKey: [re.USER_MEMORIES, s.user]
|
|
4745
4776
|
});
|
|
4746
4777
|
}
|
|
4747
4778
|
});
|
|
4748
|
-
},
|
|
4779
|
+
}, Ee = async ({
|
|
4749
4780
|
params: e,
|
|
4750
4781
|
type: t,
|
|
4751
4782
|
noAuth: r,
|
|
@@ -4755,13 +4786,13 @@ const G = {
|
|
|
4755
4786
|
const a = t?.data ? t.data(e) : e;
|
|
4756
4787
|
let n;
|
|
4757
4788
|
if (r === !0)
|
|
4758
|
-
n = await
|
|
4789
|
+
n = await ye({
|
|
4759
4790
|
query: t.schema,
|
|
4760
4791
|
data: a
|
|
4761
4792
|
});
|
|
4762
4793
|
else if (s) {
|
|
4763
4794
|
const f = await s();
|
|
4764
|
-
n = await
|
|
4795
|
+
n = await ye({
|
|
4765
4796
|
headers: {
|
|
4766
4797
|
authorization: `Bearer ${f}`
|
|
4767
4798
|
},
|
|
@@ -4783,7 +4814,7 @@ const G = {
|
|
|
4783
4814
|
}
|
|
4784
4815
|
}, As = Lt(
|
|
4785
4816
|
void 0
|
|
4786
|
-
),
|
|
4817
|
+
), Sr = {
|
|
4787
4818
|
capabilities: /* @__PURE__ */ new Set(),
|
|
4788
4819
|
allowedModels: [],
|
|
4789
4820
|
version: null,
|
|
@@ -4793,10 +4824,10 @@ const G = {
|
|
|
4793
4824
|
getAccessToken: t,
|
|
4794
4825
|
children: r
|
|
4795
4826
|
}) => {
|
|
4796
|
-
const [s, a] =
|
|
4827
|
+
const [s, a] = ie(Sr), n = Ye(
|
|
4797
4828
|
() => e ? `entitlements:${e}` : null,
|
|
4798
4829
|
[e]
|
|
4799
|
-
), i =
|
|
4830
|
+
), i = z(() => {
|
|
4800
4831
|
if (!n)
|
|
4801
4832
|
return !1;
|
|
4802
4833
|
try {
|
|
@@ -4847,7 +4878,7 @@ const G = {
|
|
|
4847
4878
|
} catch {
|
|
4848
4879
|
}
|
|
4849
4880
|
}, [o.data, n]);
|
|
4850
|
-
const c =
|
|
4881
|
+
const c = z(
|
|
4851
4882
|
(u) => {
|
|
4852
4883
|
const l = u?.entitlements;
|
|
4853
4884
|
if (l && (a({
|
|
@@ -4869,13 +4900,13 @@ const G = {
|
|
|
4869
4900
|
}
|
|
4870
4901
|
},
|
|
4871
4902
|
[n]
|
|
4872
|
-
), f =
|
|
4873
|
-
if (a(
|
|
4903
|
+
), f = z(() => {
|
|
4904
|
+
if (a(Sr), n)
|
|
4874
4905
|
try {
|
|
4875
4906
|
sessionStorage.removeItem(n);
|
|
4876
4907
|
} catch {
|
|
4877
4908
|
}
|
|
4878
|
-
}, [n]), d =
|
|
4909
|
+
}, [n]), d = Ye(
|
|
4879
4910
|
() => ({
|
|
4880
4911
|
...s,
|
|
4881
4912
|
check: (u, l) => s.status !== "ready" ? !1 : Ei(s.capabilities, u, { any: l?.any }),
|
|
@@ -4886,13 +4917,13 @@ const G = {
|
|
|
4886
4917
|
);
|
|
4887
4918
|
return /* @__PURE__ */ h(As.Provider, { value: d, children: r });
|
|
4888
4919
|
};
|
|
4889
|
-
function
|
|
4890
|
-
const e =
|
|
4920
|
+
function nl() {
|
|
4921
|
+
const e = it(As);
|
|
4891
4922
|
if (!e)
|
|
4892
4923
|
throw new Error("useEntitlements must be used within EntitlementsProvider");
|
|
4893
4924
|
return e;
|
|
4894
4925
|
}
|
|
4895
|
-
const
|
|
4926
|
+
const vr = (e) => Number.isFinite(e) ? e : 0;
|
|
4896
4927
|
function Ti(e) {
|
|
4897
4928
|
return {
|
|
4898
4929
|
days: Math.trunc(e / 864e5),
|
|
@@ -4900,8 +4931,8 @@ function Ti(e) {
|
|
|
4900
4931
|
minutes: Math.trunc(e / 6e4 % 60),
|
|
4901
4932
|
seconds: Math.trunc(e / 1e3 % 60),
|
|
4902
4933
|
milliseconds: Math.trunc(e % 1e3),
|
|
4903
|
-
microseconds: Math.trunc(
|
|
4904
|
-
nanoseconds: Math.trunc(
|
|
4934
|
+
microseconds: Math.trunc(vr(e * 1e3) % 1e3),
|
|
4935
|
+
nanoseconds: Math.trunc(vr(e * 1e6) % 1e3)
|
|
4905
4936
|
};
|
|
4906
4937
|
}
|
|
4907
4938
|
function Ai(e) {
|
|
@@ -4972,7 +5003,7 @@ function ki(e, t) {
|
|
|
4972
5003
|
const f = t.colonNotation ? ":" : " ";
|
|
4973
5004
|
return typeof t.unitCount == "number" && (a = a.slice(0, Math.max(t.unitCount, 1))), s + a.join(f);
|
|
4974
5005
|
}
|
|
4975
|
-
const Is = process.env.NODE_ENV === "production",
|
|
5006
|
+
const Is = process.env.NODE_ENV === "production", jt = !Is, _s = jt ? "gizmette.local.com" : "gizmette.com", Vt = (e, t) => {
|
|
4976
5007
|
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;
|
|
4977
5008
|
return {
|
|
4978
5009
|
dir: r,
|
|
@@ -4983,12 +5014,12 @@ const Is = process.env.NODE_ENV === "production", qt = !Is, _s = qt ? "gizmette.
|
|
|
4983
5014
|
}, Ni = (e) => {
|
|
4984
5015
|
if (!e && e !== 0)
|
|
4985
5016
|
return "N/A";
|
|
4986
|
-
const t =
|
|
5017
|
+
const t = Vt(e, !1);
|
|
4987
5018
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
4988
5019
|
}, Pi = (e) => {
|
|
4989
5020
|
if (!e && e !== 0)
|
|
4990
5021
|
return "N/A";
|
|
4991
|
-
const t =
|
|
5022
|
+
const t = Vt(e, !0);
|
|
4992
5023
|
return `${t.deg}° ${t.min}' ${t.sec}" ${t.dir}`;
|
|
4993
5024
|
}, $i = async () => {
|
|
4994
5025
|
const e = {
|
|
@@ -5141,7 +5172,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5141
5172
|
theme: c,
|
|
5142
5173
|
transition: f,
|
|
5143
5174
|
icon: d
|
|
5144
|
-
}), Qi = (e, t) => t === "ready" && !!e && e.length > 0,
|
|
5175
|
+
}), Qi = (e, t) => t === "ready" && !!e && e.length > 0, il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, DOMAIN: _s, canEvaluateModels: Qi, convertCamelCaseToReadable: ji, convertDDToDMS: Vt, convertLatitudeToDMS: Ni, convertLongitudeToDMS: Pi, debounce: Gi, durationFormatter: Hi, extractAverage: Li, getCurrentGeoLocation: $i, getLayoutPaddingClass: Cs, getMessageContaintWrapperClass: Rs, isDev: jt, isLastMessageFromRole: Ui, isPWAMode: qi, isProbablyMobile: ks, isProbablyTablet: Ns, isProbablyiPad: Wi, isProbablyiPhone: Bi, isProd: Is, isTauri: Os, numberFormatter: Fi, obfuscate: xi, pluralize: Ki, renderDataAsList: Di, toastOptions: Vi, unObfuscate: Mi }, Symbol.toStringTag, { value: "Module" })), Tr = "av-button", dt = "icon", Qt = "button", Mt = "link", Ji = ({
|
|
5145
5176
|
type: e,
|
|
5146
5177
|
size: t,
|
|
5147
5178
|
labelRight: r,
|
|
@@ -5151,7 +5182,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5151
5182
|
}) => {
|
|
5152
5183
|
const i = "max-h-8 py-0 px-2", o = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
5153
5184
|
switch (e) {
|
|
5154
|
-
case
|
|
5185
|
+
case Qt:
|
|
5155
5186
|
case Mt:
|
|
5156
5187
|
return y({
|
|
5157
5188
|
[i]: t === "small",
|
|
@@ -5185,7 +5216,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5185
5216
|
}) => {
|
|
5186
5217
|
const a = "text-sm font-medium", n = "text-base font-medium", i = "text-lg font-medium";
|
|
5187
5218
|
switch (e) {
|
|
5188
|
-
case
|
|
5219
|
+
case Qt:
|
|
5189
5220
|
case Mt:
|
|
5190
5221
|
return y({
|
|
5191
5222
|
"text-center": e === Mt,
|
|
@@ -5434,8 +5465,8 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5434
5465
|
align: p,
|
|
5435
5466
|
radius: g,
|
|
5436
5467
|
animated: b
|
|
5437
|
-
}) => (l || (l = "primary"), r ? y(
|
|
5438
|
-
|
|
5468
|
+
}) => (l || (l = "primary"), r ? y(Tr, t) : y(
|
|
5469
|
+
Tr,
|
|
5439
5470
|
zi({
|
|
5440
5471
|
mode: s,
|
|
5441
5472
|
variant: l,
|
|
@@ -5467,7 +5498,7 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5467
5498
|
t
|
|
5468
5499
|
)), io = (e, t, r) => {
|
|
5469
5500
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
5470
|
-
},
|
|
5501
|
+
}, Jt = oe.forwardRef((e, t) => {
|
|
5471
5502
|
const { onClick: r, noInternalClick: s = !1, ...a } = e;
|
|
5472
5503
|
return /* @__PURE__ */ h(
|
|
5473
5504
|
"button",
|
|
@@ -5480,8 +5511,8 @@ const Ui = (e, t) => t && t.messages.length > 0 && t.messages[t.messages.length
|
|
|
5480
5511
|
}
|
|
5481
5512
|
);
|
|
5482
5513
|
});
|
|
5483
|
-
|
|
5484
|
-
const $s =
|
|
5514
|
+
Jt.displayName = "BaseButton";
|
|
5515
|
+
const $s = oe.forwardRef(
|
|
5485
5516
|
({
|
|
5486
5517
|
children: e,
|
|
5487
5518
|
disabled: t = !1,
|
|
@@ -5498,7 +5529,7 @@ const $s = ie.forwardRef(
|
|
|
5498
5529
|
...l
|
|
5499
5530
|
}, m) => {
|
|
5500
5531
|
const p = Ps({
|
|
5501
|
-
type:
|
|
5532
|
+
type: Qt,
|
|
5502
5533
|
mode: r,
|
|
5503
5534
|
focusMode: s,
|
|
5504
5535
|
fullWidth: a,
|
|
@@ -5512,7 +5543,7 @@ const $s = ie.forwardRef(
|
|
|
5512
5543
|
radius: u
|
|
5513
5544
|
});
|
|
5514
5545
|
return /* @__PURE__ */ h(
|
|
5515
|
-
|
|
5546
|
+
Jt,
|
|
5516
5547
|
{
|
|
5517
5548
|
ref: m,
|
|
5518
5549
|
className: p,
|
|
@@ -5528,10 +5559,10 @@ function oo() {
|
|
|
5528
5559
|
const e = j(!1);
|
|
5529
5560
|
return W(() => (e.current = !0, () => {
|
|
5530
5561
|
e.current = !1;
|
|
5531
|
-
}), []),
|
|
5562
|
+
}), []), z(() => e.current, []);
|
|
5532
5563
|
}
|
|
5533
5564
|
function xs(e) {
|
|
5534
|
-
return
|
|
5565
|
+
return Ye(() => e.every((t) => t == null) ? () => {
|
|
5535
5566
|
} : (t) => {
|
|
5536
5567
|
e.forEach((r) => {
|
|
5537
5568
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
@@ -5548,8 +5579,8 @@ const co = {
|
|
|
5548
5579
|
bottom: 0,
|
|
5549
5580
|
right: 0
|
|
5550
5581
|
};
|
|
5551
|
-
function
|
|
5552
|
-
const t = oo(), r = j(0), s = j(null), [a, n] =
|
|
5582
|
+
function Qe(e) {
|
|
5583
|
+
const t = oo(), r = j(0), s = j(null), [a, n] = ie(co), i = Ye(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((o) => {
|
|
5553
5584
|
const c = o[0];
|
|
5554
5585
|
c && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
5555
5586
|
s.current && t() && n(c.contentRect);
|
|
@@ -5570,7 +5601,7 @@ function Ms(e) {
|
|
|
5570
5601
|
return typeof r == "number" || typeof r == "string" ? `${s}${r}` : `${s}${t}`;
|
|
5571
5602
|
}
|
|
5572
5603
|
}
|
|
5573
|
-
const
|
|
5604
|
+
const qe = {
|
|
5574
5605
|
small: 24,
|
|
5575
5606
|
// w-6
|
|
5576
5607
|
medium: 32,
|
|
@@ -5584,7 +5615,7 @@ const We = {
|
|
|
5584
5615
|
// px-3 x 2
|
|
5585
5616
|
large: 32
|
|
5586
5617
|
// px-4 x 2
|
|
5587
|
-
}, uo = 2, ho = 300,
|
|
5618
|
+
}, uo = 2, ho = 300, at = oe.forwardRef(
|
|
5588
5619
|
({
|
|
5589
5620
|
children: e,
|
|
5590
5621
|
disabled: t = !1,
|
|
@@ -5608,7 +5639,7 @@ const We = {
|
|
|
5608
5639
|
animated: A = !1,
|
|
5609
5640
|
...K
|
|
5610
5641
|
}, R) => {
|
|
5611
|
-
const
|
|
5642
|
+
const Y = Ps({
|
|
5612
5643
|
type: dt,
|
|
5613
5644
|
mode: r,
|
|
5614
5645
|
focusMode: s,
|
|
@@ -5625,15 +5656,15 @@ const We = {
|
|
|
5625
5656
|
radius: b,
|
|
5626
5657
|
variant: E,
|
|
5627
5658
|
animated: A
|
|
5628
|
-
}), C = ao({ mode: r, raw: o, iconClassName: O, variant: E }), v = no({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] =
|
|
5629
|
-
return
|
|
5630
|
-
ce && ce.current && A && (w.current =
|
|
5631
|
-
}, [
|
|
5659
|
+
}), C = ao({ mode: r, raw: o, iconClassName: O, variant: E }), v = no({ animated: A }), x = "flex items-center justify-center relative w-full h-full overflow-hidden", [_, I] = Qe(), [N, V] = Qe(), [ce, we] = Qe(), w = j(0), T = j(null), S = j(null), le = xs([R, T]);
|
|
5660
|
+
return ze(() => {
|
|
5661
|
+
ce && ce.current && A && (w.current = we.width + lo[u] + (c ? 0 : uo), T.current && !T.current.style.width && (T.current.style.width = `${qe[u]}px`));
|
|
5662
|
+
}, [we, ce, u, c, A]), ze(() => {
|
|
5632
5663
|
if (T && T.current && A) {
|
|
5633
|
-
let ue =
|
|
5634
|
-
l && _ && I.width > 0 ? ue = I.width + w.current : m && N && V.width > 0 && (ue = V.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 >
|
|
5664
|
+
let ue = qe[u];
|
|
5665
|
+
l && _ && I.width > 0 ? ue = I.width + w.current : m && N && V.width > 0 && (ue = V.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 > qe[u] && (S.current = setTimeout(() => {
|
|
5635
5666
|
_.current && l && (_.current.style.opacity = "1"), N.current && m && (N.current.style.opacity = "1"), S.current = null;
|
|
5636
|
-
}, ho * 0.8))), ue ===
|
|
5667
|
+
}, ho * 0.8))), ue === qe[u] && (_.current && (_.current.style.opacity = "0"), N.current && (N.current.style.opacity = "0"));
|
|
5637
5668
|
}
|
|
5638
5669
|
}, [
|
|
5639
5670
|
I,
|
|
@@ -5647,17 +5678,17 @@ const We = {
|
|
|
5647
5678
|
]), W(() => () => {
|
|
5648
5679
|
S.current && clearTimeout(S.current);
|
|
5649
5680
|
}, []), /* @__PURE__ */ h(
|
|
5650
|
-
|
|
5681
|
+
Jt,
|
|
5651
5682
|
{
|
|
5652
5683
|
ref: le,
|
|
5653
|
-
className:
|
|
5684
|
+
className: Y,
|
|
5654
5685
|
disabled: t,
|
|
5655
5686
|
type: i,
|
|
5656
5687
|
"aria-label": f || d,
|
|
5657
5688
|
...K,
|
|
5658
5689
|
children: /* @__PURE__ */ q("div", { className: x, children: [
|
|
5659
5690
|
/* @__PURE__ */ h(
|
|
5660
|
-
|
|
5691
|
+
Ar,
|
|
5661
5692
|
{
|
|
5662
5693
|
label: m,
|
|
5663
5694
|
labelRef: N,
|
|
@@ -5668,7 +5699,7 @@ const We = {
|
|
|
5668
5699
|
),
|
|
5669
5700
|
/* @__PURE__ */ h("span", { ref: ce, className: C, children: e }),
|
|
5670
5701
|
/* @__PURE__ */ h(
|
|
5671
|
-
|
|
5702
|
+
Ar,
|
|
5672
5703
|
{
|
|
5673
5704
|
label: l,
|
|
5674
5705
|
labelRef: _,
|
|
@@ -5681,7 +5712,7 @@ const We = {
|
|
|
5681
5712
|
}
|
|
5682
5713
|
);
|
|
5683
5714
|
}
|
|
5684
|
-
),
|
|
5715
|
+
), Ar = ({
|
|
5685
5716
|
labelRef: e,
|
|
5686
5717
|
labelClass: t,
|
|
5687
5718
|
label: r,
|
|
@@ -5696,7 +5727,7 @@ const We = {
|
|
|
5696
5727
|
children: r && /* @__PURE__ */ h("span", { className: s, children: r })
|
|
5697
5728
|
}
|
|
5698
5729
|
);
|
|
5699
|
-
|
|
5730
|
+
at.displayName = "ButtonIcon";
|
|
5700
5731
|
/*!
|
|
5701
5732
|
@versini/ui-button v8.1.3
|
|
5702
5733
|
© 2025 gizmette.com
|
|
@@ -5710,7 +5741,7 @@ try {
|
|
|
5710
5741
|
});
|
|
5711
5742
|
} catch {
|
|
5712
5743
|
}
|
|
5713
|
-
const fo =
|
|
5744
|
+
const fo = oe.forwardRef(
|
|
5714
5745
|
({
|
|
5715
5746
|
children: e,
|
|
5716
5747
|
mode: t = "system",
|
|
@@ -5736,7 +5767,7 @@ const fo = ie.forwardRef(
|
|
|
5736
5767
|
}
|
|
5737
5768
|
) : "";
|
|
5738
5769
|
return /* @__PURE__ */ h("div", { className: i, children: /* @__PURE__ */ h(
|
|
5739
|
-
|
|
5770
|
+
at,
|
|
5740
5771
|
{
|
|
5741
5772
|
className: r,
|
|
5742
5773
|
ref: n,
|
|
@@ -5751,7 +5782,7 @@ const fo = ie.forwardRef(
|
|
|
5751
5782
|
}
|
|
5752
5783
|
);
|
|
5753
5784
|
fo.displayName = "ButtonSort";
|
|
5754
|
-
const
|
|
5785
|
+
const Je = "av-card", mo = ({
|
|
5755
5786
|
className: e,
|
|
5756
5787
|
headerClassName: t,
|
|
5757
5788
|
bodyClassName: r,
|
|
@@ -5761,7 +5792,7 @@ const Qe = "av-card", mo = ({
|
|
|
5761
5792
|
noBorder: i
|
|
5762
5793
|
}) => {
|
|
5763
5794
|
const o = y(
|
|
5764
|
-
|
|
5795
|
+
Je,
|
|
5765
5796
|
"rounded-md",
|
|
5766
5797
|
{
|
|
5767
5798
|
"border-none": i,
|
|
@@ -5775,7 +5806,7 @@ const Qe = "av-card", mo = ({
|
|
|
5775
5806
|
"border-border-accent bg-surface-dark text-copy-light dark:border-border-dark dark:bg-surface-lighter dark:text-copy-dark": a === "alt-system"
|
|
5776
5807
|
},
|
|
5777
5808
|
e
|
|
5778
|
-
), c = t || y(`${
|
|
5809
|
+
), c = t || y(`${Je}__header mt-0 border-b-2`, {
|
|
5779
5810
|
"text-copy-light border-border-accent": a === "darker",
|
|
5780
5811
|
"border-border-accent": a === "dark",
|
|
5781
5812
|
"border-border-medium": a === "light",
|
|
@@ -5783,7 +5814,7 @@ const Qe = "av-card", mo = ({
|
|
|
5783
5814
|
"border-border-accent dark:border-border-medium": a === "alt-system",
|
|
5784
5815
|
"mb-4": !n,
|
|
5785
5816
|
"mb-2": n
|
|
5786
|
-
}), f = y(r), d = s || y(`${
|
|
5817
|
+
}), f = y(r), d = s || y(`${Je}__footer pt-2`);
|
|
5787
5818
|
return {
|
|
5788
5819
|
wrapper: o,
|
|
5789
5820
|
header: c,
|
|
@@ -5814,7 +5845,7 @@ const yo = ({
|
|
|
5814
5845
|
...u
|
|
5815
5846
|
}) => {
|
|
5816
5847
|
let l = null, m = null;
|
|
5817
|
-
const p = typeof e == "string", g = Ms(
|
|
5848
|
+
const p = typeof e == "string", g = Ms(Je), b = mo({
|
|
5818
5849
|
className: n,
|
|
5819
5850
|
headerClassName: t,
|
|
5820
5851
|
bodyClassName: i,
|
|
@@ -6022,7 +6053,7 @@ try {
|
|
|
6022
6053
|
});
|
|
6023
6054
|
} catch {
|
|
6024
6055
|
}
|
|
6025
|
-
const So = "av-flexgrid",
|
|
6056
|
+
const So = "av-flexgrid", je = "av-flexgrid-item", nt = 0.25, Dt = oe.createContext({
|
|
6026
6057
|
columnGap: 0,
|
|
6027
6058
|
rowGap: 0
|
|
6028
6059
|
}), vo = ({
|
|
@@ -6048,8 +6079,8 @@ const So = "av-flexgrid", qe = "av-flexgrid-item", at = 0.25, Dt = ie.createCont
|
|
|
6048
6079
|
* by the columnGap and rowGap that will be applied
|
|
6049
6080
|
* to all FlexgridItems (see context and paddings).
|
|
6050
6081
|
*/
|
|
6051
|
-
marginLeft: r * -1 *
|
|
6052
|
-
marginTop: s * -1 *
|
|
6082
|
+
marginLeft: r * -1 * nt + "rem",
|
|
6083
|
+
marginTop: s * -1 * nt + "rem"
|
|
6053
6084
|
}, u = y(
|
|
6054
6085
|
So,
|
|
6055
6086
|
"box-border flex flex-wrap"
|
|
@@ -6133,20 +6164,20 @@ const So = "av-flexgrid", qe = "av-flexgrid-item", at = 0.25, Dt = ie.createCont
|
|
|
6133
6164
|
span: t
|
|
6134
6165
|
}) => {
|
|
6135
6166
|
if (!t)
|
|
6136
|
-
return y(e,
|
|
6167
|
+
return y(e, je, "box-border basis-auto");
|
|
6137
6168
|
if (typeof t == "number")
|
|
6138
|
-
return y(e,
|
|
6169
|
+
return y(e, je, "box-border max-w-full", {
|
|
6139
6170
|
[`${At(t)}`]: !0
|
|
6140
6171
|
});
|
|
6141
6172
|
if (typeof t == "string")
|
|
6142
|
-
return y(e,
|
|
6173
|
+
return y(e, je, "box-border basis-auto", {
|
|
6143
6174
|
"max-w-full grow": t === "auto"
|
|
6144
6175
|
});
|
|
6145
6176
|
if (typeof t == "object") {
|
|
6146
6177
|
const r = Object.entries(t).map(([s, a]) => s === "fallback" ? At(a) : At(a, s));
|
|
6147
6178
|
return y(
|
|
6148
6179
|
e,
|
|
6149
|
-
|
|
6180
|
+
je,
|
|
6150
6181
|
"box-border",
|
|
6151
6182
|
r
|
|
6152
6183
|
);
|
|
@@ -6157,9 +6188,9 @@ const So = "av-flexgrid", qe = "av-flexgrid-item", at = 0.25, Dt = ie.createCont
|
|
|
6157
6188
|
span: r,
|
|
6158
6189
|
...s
|
|
6159
6190
|
}) => {
|
|
6160
|
-
const { columnGap: a, rowGap: n } =
|
|
6161
|
-
paddingLeft: a *
|
|
6162
|
-
paddingTop: n *
|
|
6191
|
+
const { columnGap: a, rowGap: n } = it(Dt), i = {
|
|
6192
|
+
paddingLeft: a * nt + "rem",
|
|
6193
|
+
paddingTop: n * nt + "rem"
|
|
6163
6194
|
}, o = To({
|
|
6164
6195
|
className: t,
|
|
6165
6196
|
span: r
|
|
@@ -6209,7 +6240,7 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6209
6240
|
t({
|
|
6210
6241
|
type: Ls
|
|
6211
6242
|
}), typeof e == "function" && e();
|
|
6212
|
-
},
|
|
6243
|
+
}, Ir = ({
|
|
6213
6244
|
children: e,
|
|
6214
6245
|
clearAnnouncementDelay: t,
|
|
6215
6246
|
clearAnnouncementTimeoutRef: r,
|
|
@@ -6235,13 +6266,13 @@ const Ds = "SET_ANNOUNCEMENT", Ls = "CLEAR_ANNOUNCEMENT", Ao = {
|
|
|
6235
6266
|
onAnnouncementClear: n,
|
|
6236
6267
|
dispatch: i
|
|
6237
6268
|
}) => {
|
|
6238
|
-
clearTimeout(t.current), r ? t.current = setTimeout(
|
|
6269
|
+
clearTimeout(t.current), r ? t.current = setTimeout(Ir, r, {
|
|
6239
6270
|
children: e,
|
|
6240
6271
|
clearAnnouncementDelay: s,
|
|
6241
6272
|
clearAnnouncementTimeoutRef: a,
|
|
6242
6273
|
onAnnouncementClear: n,
|
|
6243
6274
|
dispatch: i
|
|
6244
|
-
}) :
|
|
6275
|
+
}) : Ir({
|
|
6245
6276
|
children: e,
|
|
6246
6277
|
clearAnnouncementDelay: s,
|
|
6247
6278
|
clearAnnouncementTimeoutRef: a,
|
|
@@ -6260,7 +6291,7 @@ function Us({
|
|
|
6260
6291
|
visible: o,
|
|
6261
6292
|
...c
|
|
6262
6293
|
}) {
|
|
6263
|
-
const f = j(null), d = j(null), [u, l] =
|
|
6294
|
+
const f = j(null), d = j(null), [u, l] = Or(Io, {
|
|
6264
6295
|
announcement: null
|
|
6265
6296
|
});
|
|
6266
6297
|
let m = r;
|
|
@@ -6445,7 +6476,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
|
|
|
6445
6476
|
helperText: g,
|
|
6446
6477
|
rightElement: b
|
|
6447
6478
|
};
|
|
6448
|
-
},
|
|
6479
|
+
}, Yt = oe.forwardRef(
|
|
6449
6480
|
({
|
|
6450
6481
|
id: e,
|
|
6451
6482
|
name: t,
|
|
@@ -6467,7 +6498,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
|
|
|
6467
6498
|
size: E = "md",
|
|
6468
6499
|
...O
|
|
6469
6500
|
}, A) => {
|
|
6470
|
-
const [K, R] =
|
|
6501
|
+
const [K, R] = Qe(), [Y, C] = ie(0), v = Ms({ id: e, prefix: `${Fs}-` }), x = `${t} error, ${p}`, _ = j(null), I = j(null), N = {
|
|
6471
6502
|
xs: { label: "-25px", helperText: "30px" },
|
|
6472
6503
|
sm: { label: "-29px", helperText: "34px" },
|
|
6473
6504
|
md: { label: "-33px", helperText: "38px" },
|
|
@@ -6485,13 +6516,13 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
|
|
|
6485
6516
|
size: E,
|
|
6486
6517
|
rightElementClassName: b
|
|
6487
6518
|
});
|
|
6488
|
-
return
|
|
6519
|
+
return ze(() => {
|
|
6489
6520
|
R && R.width && C(R.width + 18 + 10);
|
|
6490
|
-
}, [R]),
|
|
6491
|
-
const { label: ce, helperText:
|
|
6521
|
+
}, [R]), ze(() => {
|
|
6522
|
+
const { label: ce, helperText: we } = N[E];
|
|
6492
6523
|
_?.current?.style.setProperty("--av-text-input-label", ce), I?.current?.style.setProperty(
|
|
6493
6524
|
"--av-text-input-helper-text",
|
|
6494
|
-
|
|
6525
|
+
we
|
|
6495
6526
|
);
|
|
6496
6527
|
}, [E]), /* @__PURE__ */ q("div", { className: V.wrapper, children: [
|
|
6497
6528
|
/* @__PURE__ */ h(
|
|
@@ -6515,7 +6546,7 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
|
|
|
6515
6546
|
className: V.input,
|
|
6516
6547
|
...p && { "aria-describedby": `${v}-helper` },
|
|
6517
6548
|
...s && { "aria-invalid": "true" },
|
|
6518
|
-
...g && !a && { style: { paddingRight:
|
|
6549
|
+
...g && !a && { style: { paddingRight: Y } },
|
|
6519
6550
|
...O
|
|
6520
6551
|
}
|
|
6521
6552
|
),
|
|
@@ -6550,8 +6581,8 @@ const Fs = "av-text-input", Co = "av-text-input-wrapper", It = "av-text-input-he
|
|
|
6550
6581
|
] });
|
|
6551
6582
|
}
|
|
6552
6583
|
);
|
|
6553
|
-
|
|
6554
|
-
const Mo = 500, Do = 5e3, Lo = 2e4, Hs =
|
|
6584
|
+
Yt.displayName = "TextInput";
|
|
6585
|
+
const Mo = 500, Do = 5e3, Lo = 2e4, Hs = oe.forwardRef(
|
|
6555
6586
|
({
|
|
6556
6587
|
name: e,
|
|
6557
6588
|
disabled: t,
|
|
@@ -6565,7 +6596,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = ie.forwardRef(
|
|
|
6565
6596
|
rightElement: f,
|
|
6566
6597
|
...d
|
|
6567
6598
|
}, u) => {
|
|
6568
|
-
const [l, m] =
|
|
6599
|
+
const [l, m] = ie(!0), [p, g] = ie({
|
|
6569
6600
|
message: null,
|
|
6570
6601
|
politeness: null
|
|
6571
6602
|
}), b = j(!0), E = j(null), O = j(null), A = xs([u, O]), K = l ? "Show" : "Hide", R = () => {
|
|
@@ -6576,7 +6607,7 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = ie.forwardRef(
|
|
|
6576
6607
|
message: `${r} hiding characters`
|
|
6577
6608
|
}), a && a(!0);
|
|
6578
6609
|
}, Lo));
|
|
6579
|
-
},
|
|
6610
|
+
}, Y = (I) => {
|
|
6580
6611
|
I.preventDefault();
|
|
6581
6612
|
const N = !b.current;
|
|
6582
6613
|
b.current = N, R(), m(N), g({
|
|
@@ -6596,9 +6627,9 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = ie.forwardRef(
|
|
|
6596
6627
|
};
|
|
6597
6628
|
return W(() => () => {
|
|
6598
6629
|
E.current && clearTimeout(E.current);
|
|
6599
|
-
}, []), /* @__PURE__ */ q(
|
|
6630
|
+
}, []), /* @__PURE__ */ q(Cr, { children: [
|
|
6600
6631
|
/* @__PURE__ */ h(
|
|
6601
|
-
|
|
6632
|
+
Yt,
|
|
6602
6633
|
{
|
|
6603
6634
|
ref: A,
|
|
6604
6635
|
name: e,
|
|
@@ -6609,10 +6640,10 @@ const Mo = 500, Do = 5e3, Lo = 2e4, Hs = ie.forwardRef(
|
|
|
6609
6640
|
onBlur: v,
|
|
6610
6641
|
onFocus: x,
|
|
6611
6642
|
onChange: _,
|
|
6612
|
-
rightElement:
|
|
6643
|
+
rightElement: oe.cloneElement(f, {
|
|
6613
6644
|
ref: u,
|
|
6614
6645
|
label: K,
|
|
6615
|
-
onClick:
|
|
6646
|
+
onClick: Y,
|
|
6616
6647
|
onBlur: C,
|
|
6617
6648
|
disabled: t
|
|
6618
6649
|
}),
|
|
@@ -6645,9 +6676,9 @@ try {
|
|
|
6645
6676
|
});
|
|
6646
6677
|
} catch {
|
|
6647
6678
|
}
|
|
6648
|
-
const Uo = "ASK! ME! ANYTHING!", Fo = "Log in with a password", Ho = "Log in with a Passkey",
|
|
6649
|
-
Press Enter to send it or Shift+Enter for new line.`,
|
|
6650
|
-
Press Ctrl+Enter to send it or Enter for new line.`,
|
|
6679
|
+
const Uo = "ASK! ME! ANYTHING!", Fo = "Log in with a password", Ho = "Log in with a Passkey", ol = "Log out", Ko = "Password", cl = "Usage", ll = "Profile", ul = "Settings", dl = "Chat history", hl = "About", zt = "Type your message here.", fl = zt, ml = `${zt}
|
|
6680
|
+
Press Enter to send it or Shift+Enter for new line.`, pl = `${zt}
|
|
6681
|
+
Press Ctrl+Enter to send it or Enter for new line.`, yl = "{{clipboard}}", P = "Review important details.", gl = [
|
|
6651
6682
|
`Sometimes, ${k} just makes stuff up. ${P}`,
|
|
6652
6683
|
`${k} may invent facts on the fly. ${P}`,
|
|
6653
6684
|
`${k} may be confidently wrong. ${P}`,
|
|
@@ -6668,17 +6699,17 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6668
6699
|
`Sometimes, ${k} howls at the moon. ${P}`,
|
|
6669
6700
|
`${k} may dig up imaginary bones. ${P}`,
|
|
6670
6701
|
`${k} may sniff out nonsense. ${P}`
|
|
6671
|
-
],
|
|
6702
|
+
], bl = "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.", El = "Default provider set to", wl = "Chat successfully deleted!", Sl = "Chat successfully saved!", vl = "Caching enabled. Assets are now stored locally.", Tl = "Caching disabled. Local asset cache cleared.", Al = "av-sassy", Il = {
|
|
6672
6703
|
0: ["January", "February", "March"],
|
|
6673
6704
|
3: ["April", "May", "June"],
|
|
6674
6705
|
6: ["July", "August", "September"],
|
|
6675
6706
|
9: ["October", "November", "December"]
|
|
6676
|
-
},
|
|
6707
|
+
}, _l = {
|
|
6677
6708
|
0: ["Jan", "Feb", "Mar"],
|
|
6678
6709
|
3: ["Apr", "May", "Jun"],
|
|
6679
6710
|
6: ["Jul", "Aug", "Sep"],
|
|
6680
6711
|
9: ["Oct", "Nov", "Dec"]
|
|
6681
|
-
},
|
|
6712
|
+
}, Rl = {
|
|
6682
6713
|
PREFERENCES: {
|
|
6683
6714
|
TITLE: "User profile",
|
|
6684
6715
|
USERNAME: "Username",
|
|
@@ -6755,7 +6786,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6755
6786
|
]
|
|
6756
6787
|
}
|
|
6757
6788
|
), Bo = () => {
|
|
6758
|
-
const { login: e, logoutReason: t, loginWithPasskey: r } = os(), [s, a] =
|
|
6789
|
+
const { login: e, logoutReason: t, loginWithPasskey: r } = os(), [s, a] = ie(""), [n, i] = ie(""), [o, c] = ie(!0), [f, d] = ie({
|
|
6759
6790
|
username: "",
|
|
6760
6791
|
password: ""
|
|
6761
6792
|
}), u = async (l) => {
|
|
@@ -6780,7 +6811,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6780
6811
|
/* @__PURE__ */ h("form", { className: "mt-5", onSubmit: u, children: /* @__PURE__ */ h(vo, { alignHorizontal: "center", children: /* @__PURE__ */ h(he, { span: 6, children: /* @__PURE__ */ q(yo, { mode: "dark", children: [
|
|
6781
6812
|
/* @__PURE__ */ h(he, { 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 }) }),
|
|
6782
6813
|
/* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
|
|
6783
|
-
|
|
6814
|
+
Yt,
|
|
6784
6815
|
{
|
|
6785
6816
|
className: "mt-7",
|
|
6786
6817
|
required: !0,
|
|
@@ -6813,7 +6844,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6813
6844
|
name: "password",
|
|
6814
6845
|
label: Ko,
|
|
6815
6846
|
rightElement: /* @__PURE__ */ h(
|
|
6816
|
-
|
|
6847
|
+
at,
|
|
6817
6848
|
{
|
|
6818
6849
|
focusMode: "light",
|
|
6819
6850
|
mode: "dark",
|
|
@@ -6844,10 +6875,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6844
6875
|
children: Fo
|
|
6845
6876
|
}
|
|
6846
6877
|
) }),
|
|
6847
|
-
!Os() && /* @__PURE__ */ q(
|
|
6878
|
+
!Os() && /* @__PURE__ */ q(Cr, { children: [
|
|
6848
6879
|
/* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h("div", { className: "text-center text-copy-light mt-2 mb-2", children: "or" }) }),
|
|
6849
6880
|
/* @__PURE__ */ h(he, { span: 12, children: /* @__PURE__ */ h(
|
|
6850
|
-
|
|
6881
|
+
at,
|
|
6851
6882
|
{
|
|
6852
6883
|
variant: "selected",
|
|
6853
6884
|
mode: "dark",
|
|
@@ -6862,10 +6893,10 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6862
6893
|
] })
|
|
6863
6894
|
] }) }) }) })
|
|
6864
6895
|
] });
|
|
6865
|
-
}, Wo = new URL(document.location.href).searchParams,
|
|
6896
|
+
}, Wo = new URL(document.location.href).searchParams, _r = !!Wo.get("debug") || !1, qo = Ws(() => import(
|
|
6866
6897
|
/* webpackChunkName: "LazyApp" */
|
|
6867
|
-
"./App.
|
|
6868
|
-
).then((e) => e.App)), jo = new fa(),
|
|
6898
|
+
"./App.CcqDGZun.js"
|
|
6899
|
+
).then((e) => e.App)), jo = new fa(), Rr = ({
|
|
6869
6900
|
isComponent: e,
|
|
6870
6901
|
headerHeight: t
|
|
6871
6902
|
}) => {
|
|
@@ -6886,16 +6917,16 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6886
6917
|
e || us().catch((s) => {
|
|
6887
6918
|
console.error("[SW] Failed to register service worker:", s);
|
|
6888
6919
|
});
|
|
6889
|
-
}, [e]),
|
|
6890
|
-
|
|
6920
|
+
}, [e]), jt ? /* @__PURE__ */ h(
|
|
6921
|
+
Er,
|
|
6891
6922
|
{
|
|
6892
|
-
clientId:
|
|
6923
|
+
clientId: wr,
|
|
6893
6924
|
domain: r,
|
|
6894
|
-
debug:
|
|
6925
|
+
debug: _r,
|
|
6895
6926
|
endpoint: process.env.PUBLIC_AUTH_SERVER_URL,
|
|
6896
|
-
children: /* @__PURE__ */ h(
|
|
6927
|
+
children: /* @__PURE__ */ h(Rr, { isComponent: e, headerHeight: t })
|
|
6897
6928
|
}
|
|
6898
|
-
) : /* @__PURE__ */ h(
|
|
6929
|
+
) : /* @__PURE__ */ h(Er, { clientId: wr, domain: r, debug: _r, children: /* @__PURE__ */ h(Rr, { isComponent: e, headerHeight: t }) })), Cl = ({ domain: e, headerHeight: t }) => /* @__PURE__ */ h(
|
|
6899
6930
|
Vo,
|
|
6900
6931
|
{
|
|
6901
6932
|
isComponent: !0,
|
|
@@ -6904,23 +6935,23 @@ Press Ctrl+Enter to send it or Enter for new line.`, pl = "{{clipboard}}", P = "
|
|
|
6904
6935
|
}
|
|
6905
6936
|
);
|
|
6906
6937
|
export {
|
|
6907
|
-
|
|
6938
|
+
hl as ABOUT_TITLE,
|
|
6908
6939
|
lc as ACTION_RESET_PROMPT,
|
|
6909
6940
|
ic as ACTION_SEARCH,
|
|
6910
6941
|
oc as ACTION_SORT,
|
|
6911
6942
|
cc as ACTION_TOGGLE_PROMPT,
|
|
6912
|
-
|
|
6943
|
+
Al as APP_CLASSNAME,
|
|
6913
6944
|
Uc as B,
|
|
6914
6945
|
$s as C,
|
|
6915
|
-
|
|
6916
|
-
|
|
6946
|
+
Rl as CARDS,
|
|
6947
|
+
yl as CLIPBOARD_PROMPT,
|
|
6917
6948
|
Ac as DEFAULT_ICON_ACTION_SIZE,
|
|
6918
6949
|
Dc as E,
|
|
6919
6950
|
nc as ERROR_MESSAGE,
|
|
6920
6951
|
Vc as Et,
|
|
6921
|
-
|
|
6952
|
+
gl as FOOTER_DISCLAIMERS,
|
|
6922
6953
|
gi as H,
|
|
6923
|
-
|
|
6954
|
+
dl as HISTORY_TITLE,
|
|
6924
6955
|
ht as I,
|
|
6925
6956
|
Sc as INFINITE_SCROLL_LIMIT,
|
|
6926
6957
|
wc as INFINITE_SCROLL_THRESHOLD,
|
|
@@ -6928,9 +6959,9 @@ export {
|
|
|
6928
6959
|
Pc as INPUT_BOTTOM_OFFSET_EXTRA,
|
|
6929
6960
|
Nc as INPUT_BOTTOM_OFFSET_IPAD,
|
|
6930
6961
|
kc as INPUT_BOTTOM_OFFSET_IPHONE,
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6962
|
+
pl as INPUT_PLACEHOLDER_TEXT_CMD_ENTER,
|
|
6963
|
+
ml as INPUT_PLACEHOLDER_TEXT_ENTER,
|
|
6964
|
+
fl as INPUT_PLACEHOLDER_TEXT_MOBILE,
|
|
6934
6965
|
Gc as J,
|
|
6935
6966
|
Hc as K,
|
|
6936
6967
|
vo as L,
|
|
@@ -6945,32 +6976,32 @@ export {
|
|
|
6945
6976
|
mc as LOCAL_STORAGE_SORT_MEMORY_DIRECTION,
|
|
6946
6977
|
hc as LOCAL_STORAGE_SORT_TIMESTAMP,
|
|
6947
6978
|
fc as LOCAL_STORAGE_SORT_TOKEN_USAGE,
|
|
6948
|
-
|
|
6979
|
+
ol as LOG_OUT,
|
|
6949
6980
|
Go as Logo,
|
|
6950
6981
|
lt as O,
|
|
6951
|
-
|
|
6952
|
-
|
|
6982
|
+
ll as PROFILE_TITLE,
|
|
6983
|
+
bl as PROMPTS_DESCRIPTION,
|
|
6953
6984
|
vc as PROMPT_CLASSNAME,
|
|
6954
6985
|
Tc as PROMPT_EDITABLE_AREA_CLASSNAME,
|
|
6955
6986
|
k as Q,
|
|
6956
6987
|
yo as S,
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6988
|
+
J as SERVICE_TYPES,
|
|
6989
|
+
ul as SETTINGS_TITLE,
|
|
6990
|
+
Cl as SassySaint,
|
|
6991
|
+
Tl as TOAST_CACHE_DISABLED,
|
|
6992
|
+
vl as TOAST_CACHE_ENABLED,
|
|
6993
|
+
wl as TOAST_CHAT_DELETED,
|
|
6994
|
+
Sl as TOAST_CHAT_SAVED,
|
|
6995
|
+
El as TOAST_PROVIDER_CHANGED,
|
|
6996
|
+
Il as TRIMESTERS,
|
|
6997
|
+
_l as TRIMESTERS_SHORT,
|
|
6967
6998
|
_c as UI_BUTTON_SCROLL_BUFFER,
|
|
6968
6999
|
Rc as UI_DEFAULT_MAIN_HEIGHT,
|
|
6969
7000
|
Cc as UI_DEFAULT_MAIN_HEIGHT_IPHONE,
|
|
6970
7001
|
Ic as UI_FOOTER_BUFFER,
|
|
6971
|
-
|
|
7002
|
+
cl as USAGE_TITLE,
|
|
6972
7003
|
Lc as Y,
|
|
6973
|
-
|
|
7004
|
+
Yt as Y$1,
|
|
6974
7005
|
Kc as Z,
|
|
6975
7006
|
fo as b,
|
|
6976
7007
|
ut as c,
|
|
@@ -6983,10 +7014,10 @@ export {
|
|
|
6983
7014
|
$i as getCurrentGeoLocation,
|
|
6984
7015
|
Cs as getLayoutPaddingClass,
|
|
6985
7016
|
Rs as getMessageContaintWrapperClass,
|
|
6986
|
-
|
|
7017
|
+
Qe as h,
|
|
6987
7018
|
$c as handleServiceWorkerToggle,
|
|
6988
7019
|
Ms as i,
|
|
6989
|
-
|
|
7020
|
+
jt as isDev,
|
|
6990
7021
|
qi as isPWAMode,
|
|
6991
7022
|
ks as isProbablyMobile,
|
|
6992
7023
|
Wi as isProbablyiPad,
|
|
@@ -7004,25 +7035,26 @@ export {
|
|
|
7004
7035
|
xi as obfuscate,
|
|
7005
7036
|
Wc as ot,
|
|
7006
7037
|
Ki as pluralize,
|
|
7007
|
-
|
|
7038
|
+
Fe as r,
|
|
7008
7039
|
Di as renderDataAsList,
|
|
7009
7040
|
wi as serverUrl,
|
|
7010
7041
|
Qc as setNewProvider,
|
|
7011
7042
|
Jc as setUserPlan,
|
|
7012
7043
|
qc as st,
|
|
7013
|
-
|
|
7044
|
+
at as te,
|
|
7014
7045
|
Mi as unObfuscate,
|
|
7015
7046
|
zc as useChangelogs,
|
|
7016
7047
|
Zc as useChatsHistory,
|
|
7017
7048
|
el as useChatsUsage,
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7049
|
+
al as useDeleteAllMemories,
|
|
7050
|
+
sl as useDeleteMemory,
|
|
7051
|
+
nl as useEntitlements,
|
|
7021
7052
|
Yc as useServerCapabilities,
|
|
7053
|
+
rl as useUpdateMemory,
|
|
7022
7054
|
Xc as useUserChatStats,
|
|
7023
7055
|
tl as useUserMemories,
|
|
7024
7056
|
Si as useUserPreferences,
|
|
7025
|
-
|
|
7057
|
+
il as utilities,
|
|
7026
7058
|
Fc as x,
|
|
7027
7059
|
Us as x$1
|
|
7028
7060
|
};
|