@yoast/ai-insights-client 1.4.90 → 1.4.91
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.
|
@@ -4,13 +4,13 @@ var Bu = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var ep = (t, e, n) => e in t ? $y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
6
|
var oe = (t, e, n) => ep(t, typeof e != "symbol" ? e + "" : e, n), mo = (t, e, n) => e.has(t) || Bu("Cannot " + n);
|
|
7
|
-
var
|
|
7
|
+
var I = (t, e, n) => (mo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), $ = (t, e, n) => e.has(t) ? Bu("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Y = (t, e, n, r) => (mo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), ye = (t, e, n) => (mo(t, e, "access private method"), n);
|
|
8
8
|
var Bs = (t, e, n, r) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
Y(t, e, i, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return I(t, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { jsx as f, jsxs as S, Fragment as xe } from "react/jsx-runtime";
|
|
@@ -1769,22 +1769,22 @@ var gi = class {
|
|
|
1769
1769
|
$(this, mr, !1);
|
|
1770
1770
|
}
|
|
1771
1771
|
setTimeoutProvider(t) {
|
|
1772
|
-
process.env.NODE_ENV !== "production" &&
|
|
1772
|
+
process.env.NODE_ENV !== "production" && I(this, mr) && t !== I(this, sn) && console.error(
|
|
1773
1773
|
"[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",
|
|
1774
|
-
{ previous:
|
|
1774
|
+
{ previous: I(this, sn), provider: t }
|
|
1775
1775
|
), Y(this, sn, t), process.env.NODE_ENV !== "production" && Y(this, mr, !1);
|
|
1776
1776
|
}
|
|
1777
1777
|
setTimeout(t, e) {
|
|
1778
|
-
return process.env.NODE_ENV !== "production" && Y(this, mr, !0),
|
|
1778
|
+
return process.env.NODE_ENV !== "production" && Y(this, mr, !0), I(this, sn).setTimeout(t, e);
|
|
1779
1779
|
}
|
|
1780
1780
|
clearTimeout(t) {
|
|
1781
|
-
|
|
1781
|
+
I(this, sn).clearTimeout(t);
|
|
1782
1782
|
}
|
|
1783
1783
|
setInterval(t, e) {
|
|
1784
|
-
return process.env.NODE_ENV !== "production" && Y(this, mr, !0),
|
|
1784
|
+
return process.env.NODE_ENV !== "production" && Y(this, mr, !0), I(this, sn).setInterval(t, e);
|
|
1785
1785
|
}
|
|
1786
1786
|
clearInterval(t) {
|
|
1787
|
-
|
|
1787
|
+
I(this, sn).clearInterval(t);
|
|
1788
1788
|
}
|
|
1789
1789
|
}, sn = new WeakMap(), mr = new WeakMap(), fh), hr = new Rm();
|
|
1790
1790
|
function Nm(t) {
|
|
@@ -1956,20 +1956,20 @@ var gr, Bn, Jr, hh, Um = (hh = class extends gi {
|
|
|
1956
1956
|
});
|
|
1957
1957
|
}
|
|
1958
1958
|
onSubscribe() {
|
|
1959
|
-
|
|
1959
|
+
I(this, Bn) || this.setEventListener(I(this, Jr));
|
|
1960
1960
|
}
|
|
1961
1961
|
onUnsubscribe() {
|
|
1962
1962
|
var e;
|
|
1963
|
-
this.hasListeners() || ((e =
|
|
1963
|
+
this.hasListeners() || ((e = I(this, Bn)) == null || e.call(this), Y(this, Bn, void 0));
|
|
1964
1964
|
}
|
|
1965
1965
|
setEventListener(e) {
|
|
1966
1966
|
var n;
|
|
1967
|
-
Y(this, Jr, e), (n =
|
|
1967
|
+
Y(this, Jr, e), (n = I(this, Bn)) == null || n.call(this), Y(this, Bn, e((r) => {
|
|
1968
1968
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
1969
1969
|
}));
|
|
1970
1970
|
}
|
|
1971
1971
|
setFocused(e) {
|
|
1972
|
-
|
|
1972
|
+
I(this, gr) !== e && (Y(this, gr, e), this.onFocus());
|
|
1973
1973
|
}
|
|
1974
1974
|
onFocus() {
|
|
1975
1975
|
const e = this.isFocused();
|
|
@@ -1979,7 +1979,7 @@ var gr, Bn, Jr, hh, Um = (hh = class extends gi {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
isFocused() {
|
|
1981
1981
|
var e;
|
|
1982
|
-
return typeof
|
|
1982
|
+
return typeof I(this, gr) == "boolean" ? I(this, gr) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
1983
1983
|
}
|
|
1984
1984
|
}, gr = new WeakMap(), Bn = new WeakMap(), Jr = new WeakMap(), hh), cu = new Um();
|
|
1985
1985
|
function al() {
|
|
@@ -2080,23 +2080,23 @@ var Ve = Wm(), Zr, Fn, $r, yh, Qm = (yh = class extends gi {
|
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
2082
|
onSubscribe() {
|
|
2083
|
-
|
|
2083
|
+
I(this, Fn) || this.setEventListener(I(this, $r));
|
|
2084
2084
|
}
|
|
2085
2085
|
onUnsubscribe() {
|
|
2086
2086
|
var e;
|
|
2087
|
-
this.hasListeners() || ((e =
|
|
2087
|
+
this.hasListeners() || ((e = I(this, Fn)) == null || e.call(this), Y(this, Fn, void 0));
|
|
2088
2088
|
}
|
|
2089
2089
|
setEventListener(e) {
|
|
2090
2090
|
var n;
|
|
2091
|
-
Y(this, $r, e), (n =
|
|
2091
|
+
Y(this, $r, e), (n = I(this, Fn)) == null || n.call(this), Y(this, Fn, e(this.setOnline.bind(this)));
|
|
2092
2092
|
}
|
|
2093
2093
|
setOnline(e) {
|
|
2094
|
-
|
|
2094
|
+
I(this, Zr) !== e && (Y(this, Zr, e), this.listeners.forEach((r) => {
|
|
2095
2095
|
r(e);
|
|
2096
2096
|
}));
|
|
2097
2097
|
}
|
|
2098
2098
|
isOnline() {
|
|
2099
|
-
return
|
|
2099
|
+
return I(this, Zr);
|
|
2100
2100
|
}
|
|
2101
2101
|
}, Zr = new WeakMap(), Fn = new WeakMap(), $r = new WeakMap(), yh), xa = new Qm();
|
|
2102
2102
|
function Gm(t) {
|
|
@@ -2188,7 +2188,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2188
2188
|
);
|
|
2189
2189
|
}
|
|
2190
2190
|
clearGcTimeout() {
|
|
2191
|
-
|
|
2191
|
+
I(this, vr) && (hr.clearTimeout(I(this, vr)), Y(this, vr, void 0));
|
|
2192
2192
|
}
|
|
2193
2193
|
}, vr = new WeakMap(), ph), br, ei, Bt, Ar, Je, ws, wr, Vt, vn, mh, qm = (mh = class extends zh {
|
|
2194
2194
|
constructor(e) {
|
|
@@ -2202,17 +2202,17 @@ var vr, ph, zh = (ph = class {
|
|
|
2202
2202
|
$(this, Je);
|
|
2203
2203
|
$(this, ws);
|
|
2204
2204
|
$(this, wr);
|
|
2205
|
-
Y(this, wr, !1), Y(this, ws, e.defaultOptions), this.setOptions(e.options), this.observers = [], Y(this, Ar, e.client), Y(this, Bt,
|
|
2205
|
+
Y(this, wr, !1), Y(this, ws, e.defaultOptions), this.setOptions(e.options), this.observers = [], Y(this, Ar, e.client), Y(this, Bt, I(this, Ar).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, Y(this, br, Vu(this.options)), this.state = (n = e.state) != null ? n : I(this, br), this.scheduleGc();
|
|
2206
2206
|
}
|
|
2207
2207
|
get meta() {
|
|
2208
2208
|
return this.options.meta;
|
|
2209
2209
|
}
|
|
2210
2210
|
get promise() {
|
|
2211
2211
|
var e;
|
|
2212
|
-
return (e =
|
|
2212
|
+
return (e = I(this, Je)) == null ? void 0 : e.promise;
|
|
2213
2213
|
}
|
|
2214
2214
|
setOptions(e) {
|
|
2215
|
-
if (this.options = { ...
|
|
2215
|
+
if (this.options = { ...I(this, ws), ...e }, this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
2216
2216
|
const n = Vu(this.options);
|
|
2217
2217
|
n.data !== void 0 && (this.setData(n.data, {
|
|
2218
2218
|
updatedAt: n.dataUpdatedAt,
|
|
@@ -2221,7 +2221,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
2223
|
optionalRemove() {
|
|
2224
|
-
!this.observers.length && this.state.fetchStatus === "idle" &&
|
|
2224
|
+
!this.observers.length && this.state.fetchStatus === "idle" && I(this, Bt).remove(this);
|
|
2225
2225
|
}
|
|
2226
2226
|
setData(e, n) {
|
|
2227
2227
|
const r = sl(this.state.data, e, this.options);
|
|
@@ -2237,14 +2237,14 @@ var vr, ph, zh = (ph = class {
|
|
|
2237
2237
|
}
|
|
2238
2238
|
cancel(e) {
|
|
2239
2239
|
var r, i;
|
|
2240
|
-
const n = (r =
|
|
2241
|
-
return (i =
|
|
2240
|
+
const n = (r = I(this, Je)) == null ? void 0 : r.promise;
|
|
2241
|
+
return (i = I(this, Je)) == null || i.cancel(e), n ? n.then(ct).catch(ct) : Promise.resolve();
|
|
2242
2242
|
}
|
|
2243
2243
|
destroy() {
|
|
2244
2244
|
super.destroy(), this.cancel({ silent: !0 });
|
|
2245
2245
|
}
|
|
2246
2246
|
reset() {
|
|
2247
|
-
this.destroy(), this.setState(
|
|
2247
|
+
this.destroy(), this.setState(I(this, br));
|
|
2248
2248
|
}
|
|
2249
2249
|
isActive() {
|
|
2250
2250
|
return this.observers.some(
|
|
@@ -2270,18 +2270,18 @@ var vr, ph, zh = (ph = class {
|
|
|
2270
2270
|
onFocus() {
|
|
2271
2271
|
var n;
|
|
2272
2272
|
const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
|
|
2273
|
-
e == null || e.refetch({ cancelRefetch: !1 }), (n =
|
|
2273
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (n = I(this, Je)) == null || n.continue();
|
|
2274
2274
|
}
|
|
2275
2275
|
onOnline() {
|
|
2276
2276
|
var n;
|
|
2277
2277
|
const e = this.observers.find((r) => r.shouldFetchOnReconnect());
|
|
2278
|
-
e == null || e.refetch({ cancelRefetch: !1 }), (n =
|
|
2278
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (n = I(this, Je)) == null || n.continue();
|
|
2279
2279
|
}
|
|
2280
2280
|
addObserver(e) {
|
|
2281
|
-
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(),
|
|
2281
|
+
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), I(this, Bt).notify({ type: "observerAdded", query: this, observer: e }));
|
|
2282
2282
|
}
|
|
2283
2283
|
removeObserver(e) {
|
|
2284
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((n) => n !== e), this.observers.length || (
|
|
2284
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((n) => n !== e), this.observers.length || (I(this, Je) && (I(this, wr) ? I(this, Je).cancel({ revert: !0 }) : I(this, Je).cancelRetry()), this.scheduleGc()), I(this, Bt).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
2285
2285
|
}
|
|
2286
2286
|
getObserversCount() {
|
|
2287
2287
|
return this.observers.length;
|
|
@@ -2294,11 +2294,11 @@ var vr, ph, zh = (ph = class {
|
|
|
2294
2294
|
if (this.state.fetchStatus !== "idle" && // If the promise in the retyer is already rejected, we have to definitely
|
|
2295
2295
|
// re-start the fetch; there is a chance that the query is still in a
|
|
2296
2296
|
// pending state when that happens
|
|
2297
|
-
((l =
|
|
2297
|
+
((l = I(this, Je)) == null ? void 0 : l.status()) !== "rejected") {
|
|
2298
2298
|
if (this.state.data !== void 0 && (n != null && n.cancelRefetch))
|
|
2299
2299
|
this.cancel({ silent: !0 });
|
|
2300
|
-
else if (
|
|
2301
|
-
return
|
|
2300
|
+
else if (I(this, Je))
|
|
2301
|
+
return I(this, Je).continueRetry(), I(this, Je).promise;
|
|
2302
2302
|
}
|
|
2303
2303
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
2304
2304
|
const C = this.observers.find((w) => w.options.queryFn);
|
|
@@ -2315,7 +2315,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2315
2315
|
}, s = () => {
|
|
2316
2316
|
const C = Wh(this.options, n), O = (() => {
|
|
2317
2317
|
const b = {
|
|
2318
|
-
client:
|
|
2318
|
+
client: I(this, Ar),
|
|
2319
2319
|
queryKey: this.queryKey,
|
|
2320
2320
|
meta: this.meta
|
|
2321
2321
|
};
|
|
@@ -2331,7 +2331,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2331
2331
|
fetchOptions: n,
|
|
2332
2332
|
options: this.options,
|
|
2333
2333
|
queryKey: this.queryKey,
|
|
2334
|
-
client:
|
|
2334
|
+
client: I(this, Ar),
|
|
2335
2335
|
state: this.state,
|
|
2336
2336
|
fetchFn: s
|
|
2337
2337
|
};
|
|
@@ -2342,7 +2342,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2342
2342
|
fn: o.fetchFn,
|
|
2343
2343
|
onCancel: (C) => {
|
|
2344
2344
|
C instanceof ol && C.revert && this.setState({
|
|
2345
|
-
...
|
|
2345
|
+
...I(this, ei),
|
|
2346
2346
|
fetchStatus: "idle"
|
|
2347
2347
|
}), r.abort();
|
|
2348
2348
|
},
|
|
@@ -2361,12 +2361,12 @@ var vr, ph, zh = (ph = class {
|
|
|
2361
2361
|
canRun: () => !0
|
|
2362
2362
|
}));
|
|
2363
2363
|
try {
|
|
2364
|
-
const C = await
|
|
2364
|
+
const C = await I(this, Je).start();
|
|
2365
2365
|
if (C === void 0)
|
|
2366
2366
|
throw process.env.NODE_ENV !== "production" && console.error(
|
|
2367
2367
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
2368
2368
|
), new Error(`${this.queryHash} data is undefined`);
|
|
2369
|
-
return this.setData(C), (h = (y =
|
|
2369
|
+
return this.setData(C), (h = (y = I(this, Bt).config).onSuccess) == null || h.call(y, C, this), (m = (p = I(this, Bt).config).onSettled) == null || m.call(
|
|
2370
2370
|
p,
|
|
2371
2371
|
C,
|
|
2372
2372
|
this.state.error,
|
|
@@ -2375,7 +2375,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2375
2375
|
} catch (C) {
|
|
2376
2376
|
if (C instanceof ol) {
|
|
2377
2377
|
if (C.silent)
|
|
2378
|
-
return
|
|
2378
|
+
return I(this, Je).promise;
|
|
2379
2379
|
if (C.revert) {
|
|
2380
2380
|
if (this.state.data === void 0)
|
|
2381
2381
|
throw C;
|
|
@@ -2385,11 +2385,11 @@ var vr, ph, zh = (ph = class {
|
|
|
2385
2385
|
throw ye(this, Vt, vn).call(this, {
|
|
2386
2386
|
type: "error",
|
|
2387
2387
|
error: C
|
|
2388
|
-
}), (v = (g =
|
|
2388
|
+
}), (v = (g = I(this, Bt).config).onError) == null || v.call(
|
|
2389
2389
|
g,
|
|
2390
2390
|
C,
|
|
2391
2391
|
this
|
|
2392
|
-
), (k = (x =
|
|
2392
|
+
), (k = (x = I(this, Bt).config).onSettled) == null || k.call(
|
|
2393
2393
|
x,
|
|
2394
2394
|
this.state.data,
|
|
2395
2395
|
C,
|
|
@@ -2468,7 +2468,7 @@ var vr, ph, zh = (ph = class {
|
|
|
2468
2468
|
this.state = n(this.state), Ve.batch(() => {
|
|
2469
2469
|
this.observers.forEach((r) => {
|
|
2470
2470
|
r.onQueryUpdate();
|
|
2471
|
-
}),
|
|
2471
|
+
}), I(this, Bt).notify({ query: this, type: "updated", action: e });
|
|
2472
2472
|
});
|
|
2473
2473
|
}, mh);
|
|
2474
2474
|
function Yh(t, e) {
|
|
@@ -2526,59 +2526,59 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2526
2526
|
this.refetch = this.refetch.bind(this);
|
|
2527
2527
|
}
|
|
2528
2528
|
onSubscribe() {
|
|
2529
|
-
this.listeners.size === 1 && (
|
|
2529
|
+
this.listeners.size === 1 && (I(this, be).addObserver(this), Ku(I(this, be), this.options) ? ye(this, Pe, Ui).call(this) : this.updateResult(), ye(this, Pe, dl).call(this));
|
|
2530
2530
|
}
|
|
2531
2531
|
onUnsubscribe() {
|
|
2532
2532
|
this.hasListeners() || this.destroy();
|
|
2533
2533
|
}
|
|
2534
2534
|
shouldFetchOnReconnect() {
|
|
2535
2535
|
return pl(
|
|
2536
|
-
|
|
2536
|
+
I(this, be),
|
|
2537
2537
|
this.options,
|
|
2538
2538
|
this.options.refetchOnReconnect
|
|
2539
2539
|
);
|
|
2540
2540
|
}
|
|
2541
2541
|
shouldFetchOnWindowFocus() {
|
|
2542
2542
|
return pl(
|
|
2543
|
-
|
|
2543
|
+
I(this, be),
|
|
2544
2544
|
this.options,
|
|
2545
2545
|
this.options.refetchOnWindowFocus
|
|
2546
2546
|
);
|
|
2547
2547
|
}
|
|
2548
2548
|
destroy() {
|
|
2549
|
-
this.listeners = /* @__PURE__ */ new Set(), ye(this, Pe, fl).call(this), ye(this, Pe, hl).call(this),
|
|
2549
|
+
this.listeners = /* @__PURE__ */ new Set(), ye(this, Pe, fl).call(this), ye(this, Pe, hl).call(this), I(this, be).removeObserver(this);
|
|
2550
2550
|
}
|
|
2551
2551
|
setOptions(e) {
|
|
2552
|
-
const n = this.options, r =
|
|
2553
|
-
if (this.options =
|
|
2552
|
+
const n = this.options, r = I(this, be);
|
|
2553
|
+
if (this.options = I(this, pt).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof Ft(this.options.enabled, I(this, be)) != "boolean")
|
|
2554
2554
|
throw new Error(
|
|
2555
2555
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
2556
2556
|
);
|
|
2557
|
-
ye(this, Pe, yl).call(this),
|
|
2557
|
+
ye(this, Pe, yl).call(this), I(this, be).setOptions(this.options), n._defaulted && !Aa(this.options, n) && I(this, pt).getQueryCache().notify({
|
|
2558
2558
|
type: "observerOptionsUpdated",
|
|
2559
|
-
query:
|
|
2559
|
+
query: I(this, be),
|
|
2560
2560
|
observer: this
|
|
2561
2561
|
});
|
|
2562
2562
|
const i = this.hasListeners();
|
|
2563
2563
|
i && Xu(
|
|
2564
|
-
|
|
2564
|
+
I(this, be),
|
|
2565
2565
|
r,
|
|
2566
2566
|
this.options,
|
|
2567
2567
|
n
|
|
2568
|
-
) && ye(this, Pe, Ui).call(this), this.updateResult(), i && (
|
|
2568
|
+
) && ye(this, Pe, Ui).call(this), this.updateResult(), i && (I(this, be) !== r || Ft(this.options.enabled, I(this, be)) !== Ft(n.enabled, I(this, be)) || Jn(this.options.staleTime, I(this, be)) !== Jn(n.staleTime, I(this, be))) && ye(this, Pe, ll).call(this);
|
|
2569
2569
|
const s = ye(this, Pe, ul).call(this);
|
|
2570
|
-
i && (
|
|
2570
|
+
i && (I(this, be) !== r || Ft(this.options.enabled, I(this, be)) !== Ft(n.enabled, I(this, be)) || s !== I(this, Hn)) && ye(this, Pe, cl).call(this, s);
|
|
2571
2571
|
}
|
|
2572
2572
|
getOptimisticResult(e) {
|
|
2573
|
-
const n =
|
|
2574
|
-
return Vm(this, r) && (Y(this, lt, r), Y(this, ti, this.options), Y(this, xr,
|
|
2573
|
+
const n = I(this, pt).getQueryCache().build(I(this, pt), e), r = this.createResult(n, e);
|
|
2574
|
+
return Vm(this, r) && (Y(this, lt, r), Y(this, ti, this.options), Y(this, xr, I(this, be).state)), r;
|
|
2575
2575
|
}
|
|
2576
2576
|
getCurrentResult() {
|
|
2577
|
-
return
|
|
2577
|
+
return I(this, lt);
|
|
2578
2578
|
}
|
|
2579
2579
|
trackResult(e, n) {
|
|
2580
2580
|
return new Proxy(e, {
|
|
2581
|
-
get: (r, i) => (this.trackProp(i), n == null || n(i), i === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender &&
|
|
2581
|
+
get: (r, i) => (this.trackProp(i), n == null || n(i), i === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender && I(this, xn).status === "pending" && I(this, xn).reject(
|
|
2582
2582
|
new Error(
|
|
2583
2583
|
"experimental_prefetchInRender feature flag is not enabled"
|
|
2584
2584
|
)
|
|
@@ -2586,10 +2586,10 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2586
2586
|
});
|
|
2587
2587
|
}
|
|
2588
2588
|
trackProp(e) {
|
|
2589
|
-
|
|
2589
|
+
I(this, ii).add(e);
|
|
2590
2590
|
}
|
|
2591
2591
|
getCurrentQuery() {
|
|
2592
|
-
return
|
|
2592
|
+
return I(this, be);
|
|
2593
2593
|
}
|
|
2594
2594
|
refetch({ ...e } = {}) {
|
|
2595
2595
|
return this.fetch({
|
|
@@ -2597,7 +2597,7 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2597
2597
|
});
|
|
2598
2598
|
}
|
|
2599
2599
|
fetchOptimistic(e) {
|
|
2600
|
-
const n =
|
|
2600
|
+
const n = I(this, pt).defaultQueryOptions(e), r = I(this, pt).getQueryCache().build(I(this, pt), n);
|
|
2601
2601
|
return r.fetch().then(() => this.createResult(r, n));
|
|
2602
2602
|
}
|
|
2603
2603
|
fetch(e) {
|
|
@@ -2605,15 +2605,15 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2605
2605
|
return ye(this, Pe, Ui).call(this, {
|
|
2606
2606
|
...e,
|
|
2607
2607
|
cancelRefetch: (n = e.cancelRefetch) != null ? n : !0
|
|
2608
|
-
}).then(() => (this.updateResult(),
|
|
2608
|
+
}).then(() => (this.updateResult(), I(this, lt)));
|
|
2609
2609
|
}
|
|
2610
2610
|
createResult(e, n) {
|
|
2611
2611
|
var M;
|
|
2612
|
-
const r =
|
|
2612
|
+
const r = I(this, be), i = this.options, s = I(this, lt), a = I(this, xr), o = I(this, ti), u = e !== r ? e.state : I(this, xs), { state: c } = e;
|
|
2613
2613
|
let d = { ...c }, y = !1, h;
|
|
2614
2614
|
if (n._optimisticResults) {
|
|
2615
|
-
const D = this.hasListeners(), L = !D && Ku(e, n),
|
|
2616
|
-
(L ||
|
|
2615
|
+
const D = this.hasListeners(), L = !D && Ku(e, n), T = D && Xu(e, r, n, i);
|
|
2616
|
+
(L || T) && (d = {
|
|
2617
2617
|
...d,
|
|
2618
2618
|
...Yh(c.data, e.options)
|
|
2619
2619
|
}), n._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
|
|
@@ -2624,8 +2624,8 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2624
2624
|
if (n.placeholderData !== void 0 && h === void 0 && g === "pending") {
|
|
2625
2625
|
let D;
|
|
2626
2626
|
s != null && s.isPlaceholderData && n.placeholderData === (o == null ? void 0 : o.placeholderData) ? (D = s.data, v = !0) : D = typeof n.placeholderData == "function" ? n.placeholderData(
|
|
2627
|
-
(M =
|
|
2628
|
-
|
|
2627
|
+
(M = I(this, ri)) == null ? void 0 : M.state.data,
|
|
2628
|
+
I(this, ri)
|
|
2629
2629
|
) : n.placeholderData, D !== void 0 && (g = "success", h = sl(
|
|
2630
2630
|
s == null ? void 0 : s.data,
|
|
2631
2631
|
D,
|
|
@@ -2633,15 +2633,15 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2633
2633
|
), y = !0);
|
|
2634
2634
|
}
|
|
2635
2635
|
if (n.select && h !== void 0 && !v)
|
|
2636
|
-
if (s && h === (a == null ? void 0 : a.data) && n.select ===
|
|
2637
|
-
h =
|
|
2636
|
+
if (s && h === (a == null ? void 0 : a.data) && n.select === I(this, Cs))
|
|
2637
|
+
h = I(this, ni);
|
|
2638
2638
|
else
|
|
2639
2639
|
try {
|
|
2640
2640
|
Y(this, Cs, n.select), h = n.select(h), h = sl(s == null ? void 0 : s.data, h, n), Y(this, ni, h), Y(this, Un, null);
|
|
2641
2641
|
} catch (D) {
|
|
2642
2642
|
Y(this, Un, D);
|
|
2643
2643
|
}
|
|
2644
|
-
|
|
2644
|
+
I(this, Un) && (p = I(this, Un), h = I(this, ni), m = Date.now(), g = "error");
|
|
2645
2645
|
const x = d.fetchStatus === "fetching", k = g === "pending", C = g === "error", w = k && x, O = h !== void 0, A = {
|
|
2646
2646
|
status: g,
|
|
2647
2647
|
fetchStatus: d.fetchStatus,
|
|
@@ -2667,7 +2667,7 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2667
2667
|
isRefetchError: C && O,
|
|
2668
2668
|
isStale: du(e, n),
|
|
2669
2669
|
refetch: this.refetch,
|
|
2670
|
-
promise:
|
|
2670
|
+
promise: I(this, xn),
|
|
2671
2671
|
isEnabled: Ft(n.enabled, e) !== !1
|
|
2672
2672
|
};
|
|
2673
2673
|
if (this.options.experimental_prefetchInRender) {
|
|
@@ -2676,38 +2676,38 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2676
2676
|
}, L = () => {
|
|
2677
2677
|
const U = Y(this, xn, A.promise = al());
|
|
2678
2678
|
D(U);
|
|
2679
|
-
},
|
|
2680
|
-
switch (
|
|
2679
|
+
}, T = I(this, xn);
|
|
2680
|
+
switch (T.status) {
|
|
2681
2681
|
case "pending":
|
|
2682
|
-
e.queryHash === r.queryHash && D(
|
|
2682
|
+
e.queryHash === r.queryHash && D(T);
|
|
2683
2683
|
break;
|
|
2684
2684
|
case "fulfilled":
|
|
2685
|
-
(A.status === "error" || A.data !==
|
|
2685
|
+
(A.status === "error" || A.data !== T.value) && L();
|
|
2686
2686
|
break;
|
|
2687
2687
|
case "rejected":
|
|
2688
|
-
(A.status !== "error" || A.error !==
|
|
2688
|
+
(A.status !== "error" || A.error !== T.reason) && L();
|
|
2689
2689
|
break;
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
2692
|
return A;
|
|
2693
2693
|
}
|
|
2694
2694
|
updateResult() {
|
|
2695
|
-
const e =
|
|
2696
|
-
if (Y(this, xr,
|
|
2695
|
+
const e = I(this, lt), n = this.createResult(I(this, be), this.options);
|
|
2696
|
+
if (Y(this, xr, I(this, be).state), Y(this, ti, this.options), I(this, xr).data !== void 0 && Y(this, ri, I(this, be)), Aa(n, e))
|
|
2697
2697
|
return;
|
|
2698
2698
|
Y(this, lt, n);
|
|
2699
2699
|
const r = () => {
|
|
2700
2700
|
if (!e)
|
|
2701
2701
|
return !0;
|
|
2702
2702
|
const { notifyOnChangeProps: i } = this.options, s = typeof i == "function" ? i() : i;
|
|
2703
|
-
if (s === "all" || !s && !
|
|
2703
|
+
if (s === "all" || !s && !I(this, ii).size)
|
|
2704
2704
|
return !0;
|
|
2705
2705
|
const a = new Set(
|
|
2706
|
-
s != null ? s :
|
|
2706
|
+
s != null ? s : I(this, ii)
|
|
2707
2707
|
);
|
|
2708
|
-
return this.options.throwOnError && a.add("error"), Object.keys(
|
|
2708
|
+
return this.options.throwOnError && a.add("error"), Object.keys(I(this, lt)).some((o) => {
|
|
2709
2709
|
const l = o;
|
|
2710
|
-
return
|
|
2710
|
+
return I(this, lt)[l] !== e[l] && a.has(l);
|
|
2711
2711
|
});
|
|
2712
2712
|
};
|
|
2713
2713
|
ye(this, Pe, Vh).call(this, { listeners: r() });
|
|
@@ -2717,7 +2717,7 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2717
2717
|
}
|
|
2718
2718
|
}, pt = new WeakMap(), be = new WeakMap(), xs = new WeakMap(), lt = new WeakMap(), xr = new WeakMap(), ti = new WeakMap(), xn = new WeakMap(), Un = new WeakMap(), Cs = new WeakMap(), ni = new WeakMap(), ri = new WeakMap(), Cr = new WeakMap(), Sr = new WeakMap(), Hn = new WeakMap(), ii = new WeakMap(), Pe = new WeakSet(), Ui = function(e) {
|
|
2719
2719
|
ye(this, Pe, yl).call(this);
|
|
2720
|
-
let n =
|
|
2720
|
+
let n = I(this, be).fetch(
|
|
2721
2721
|
this.options,
|
|
2722
2722
|
e
|
|
2723
2723
|
);
|
|
@@ -2726,39 +2726,39 @@ var pt, be, xs, lt, xr, ti, xn, Un, Cs, ni, ri, Cr, Sr, Hn, ii, Pe, Ui, ll, ul,
|
|
|
2726
2726
|
ye(this, Pe, fl).call(this);
|
|
2727
2727
|
const e = Jn(
|
|
2728
2728
|
this.options.staleTime,
|
|
2729
|
-
|
|
2729
|
+
I(this, be)
|
|
2730
2730
|
);
|
|
2731
|
-
if (Tr ||
|
|
2731
|
+
if (Tr || I(this, lt).isStale || !nl(e))
|
|
2732
2732
|
return;
|
|
2733
|
-
const r = Hh(
|
|
2733
|
+
const r = Hh(I(this, lt).dataUpdatedAt, e) + 1;
|
|
2734
2734
|
Y(this, Cr, hr.setTimeout(() => {
|
|
2735
|
-
|
|
2735
|
+
I(this, lt).isStale || this.updateResult();
|
|
2736
2736
|
}, r));
|
|
2737
2737
|
}, ul = function() {
|
|
2738
2738
|
var e;
|
|
2739
|
-
return (e = typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(
|
|
2739
|
+
return (e = typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(I(this, be)) : this.options.refetchInterval) != null ? e : !1;
|
|
2740
2740
|
}, cl = function(e) {
|
|
2741
|
-
ye(this, Pe, hl).call(this), Y(this, Hn, e), !(Tr || Ft(this.options.enabled,
|
|
2741
|
+
ye(this, Pe, hl).call(this), Y(this, Hn, e), !(Tr || Ft(this.options.enabled, I(this, be)) === !1 || !nl(I(this, Hn)) || I(this, Hn) === 0) && Y(this, Sr, hr.setInterval(() => {
|
|
2742
2742
|
(this.options.refetchIntervalInBackground || cu.isFocused()) && ye(this, Pe, Ui).call(this);
|
|
2743
|
-
},
|
|
2743
|
+
}, I(this, Hn)));
|
|
2744
2744
|
}, dl = function() {
|
|
2745
2745
|
ye(this, Pe, ll).call(this), ye(this, Pe, cl).call(this, ye(this, Pe, ul).call(this));
|
|
2746
2746
|
}, fl = function() {
|
|
2747
|
-
|
|
2747
|
+
I(this, Cr) && (hr.clearTimeout(I(this, Cr)), Y(this, Cr, void 0));
|
|
2748
2748
|
}, hl = function() {
|
|
2749
|
-
|
|
2749
|
+
I(this, Sr) && (hr.clearInterval(I(this, Sr)), Y(this, Sr, void 0));
|
|
2750
2750
|
}, yl = function() {
|
|
2751
|
-
const e =
|
|
2752
|
-
if (e ===
|
|
2751
|
+
const e = I(this, pt).getQueryCache().build(I(this, pt), this.options);
|
|
2752
|
+
if (e === I(this, be))
|
|
2753
2753
|
return;
|
|
2754
|
-
const n =
|
|
2754
|
+
const n = I(this, be);
|
|
2755
2755
|
Y(this, be, e), Y(this, xs, e.state), this.hasListeners() && (n == null || n.removeObserver(this), e.addObserver(this));
|
|
2756
2756
|
}, Vh = function(e) {
|
|
2757
2757
|
Ve.batch(() => {
|
|
2758
2758
|
e.listeners && this.listeners.forEach((n) => {
|
|
2759
|
-
n(
|
|
2760
|
-
}),
|
|
2761
|
-
query:
|
|
2759
|
+
n(I(this, lt));
|
|
2760
|
+
}), I(this, pt).getQueryCache().notify({
|
|
2761
|
+
query: I(this, be),
|
|
2762
2762
|
type: "observerResultsUpdated"
|
|
2763
2763
|
});
|
|
2764
2764
|
});
|
|
@@ -2807,14 +2807,14 @@ function Ju(t) {
|
|
|
2807
2807
|
if (w == null && C.pages.length)
|
|
2808
2808
|
return Promise.resolve(C);
|
|
2809
2809
|
const A = (() => {
|
|
2810
|
-
const
|
|
2810
|
+
const T = {
|
|
2811
2811
|
client: e.client,
|
|
2812
2812
|
queryKey: e.queryKey,
|
|
2813
2813
|
pageParam: w,
|
|
2814
2814
|
direction: O ? "backward" : "forward",
|
|
2815
2815
|
meta: e.options.meta
|
|
2816
2816
|
};
|
|
2817
|
-
return g(
|
|
2817
|
+
return g(T), T;
|
|
2818
2818
|
})(), M = await v(A), { maxPages: D } = e.options, L = O ? Fm : Bm;
|
|
2819
2819
|
return {
|
|
2820
2820
|
pages: L(C.pages, M, D),
|
|
@@ -2885,25 +2885,25 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2885
2885
|
return this.options.meta;
|
|
2886
2886
|
}
|
|
2887
2887
|
addObserver(e) {
|
|
2888
|
-
|
|
2888
|
+
I(this, an).includes(e) || (I(this, an).push(e), this.clearGcTimeout(), I(this, ut).notify({
|
|
2889
2889
|
type: "observerAdded",
|
|
2890
2890
|
mutation: this,
|
|
2891
2891
|
observer: e
|
|
2892
2892
|
}));
|
|
2893
2893
|
}
|
|
2894
2894
|
removeObserver(e) {
|
|
2895
|
-
Y(this, an,
|
|
2895
|
+
Y(this, an, I(this, an).filter((n) => n !== e)), this.scheduleGc(), I(this, ut).notify({
|
|
2896
2896
|
type: "observerRemoved",
|
|
2897
2897
|
mutation: this,
|
|
2898
2898
|
observer: e
|
|
2899
2899
|
});
|
|
2900
2900
|
}
|
|
2901
2901
|
optionalRemove() {
|
|
2902
|
-
|
|
2902
|
+
I(this, an).length || (this.state.status === "pending" ? this.scheduleGc() : I(this, ut).remove(this));
|
|
2903
2903
|
}
|
|
2904
2904
|
continue() {
|
|
2905
2905
|
var e, n;
|
|
2906
|
-
return (n = (e =
|
|
2906
|
+
return (n = (e = I(this, Or)) == null ? void 0 : e.continue()) != null ? n : (
|
|
2907
2907
|
// continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
2908
2908
|
this.execute(this.state.variables)
|
|
2909
2909
|
);
|
|
@@ -2913,14 +2913,14 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2913
2913
|
const n = () => {
|
|
2914
2914
|
ye(this, on, Dn).call(this, { type: "continue" });
|
|
2915
2915
|
}, r = {
|
|
2916
|
-
client:
|
|
2916
|
+
client: I(this, Ss),
|
|
2917
2917
|
meta: this.options.meta,
|
|
2918
2918
|
mutationKey: this.options.mutationKey
|
|
2919
2919
|
};
|
|
2920
2920
|
Y(this, Or, qh({
|
|
2921
2921
|
fn: () => this.options.mutationFn ? this.options.mutationFn(e, r) : Promise.reject(new Error("No mutationFn found")),
|
|
2922
|
-
onFail: (L,
|
|
2923
|
-
ye(this, on, Dn).call(this, { type: "failed", failureCount: L, error:
|
|
2922
|
+
onFail: (L, T) => {
|
|
2923
|
+
ye(this, on, Dn).call(this, { type: "failed", failureCount: L, error: T });
|
|
2924
2924
|
},
|
|
2925
2925
|
onPause: () => {
|
|
2926
2926
|
ye(this, on, Dn).call(this, { type: "pause" });
|
|
@@ -2929,33 +2929,33 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2929
2929
|
retry: (a = this.options.retry) != null ? a : 0,
|
|
2930
2930
|
retryDelay: this.options.retryDelay,
|
|
2931
2931
|
networkMode: this.options.networkMode,
|
|
2932
|
-
canRun: () =>
|
|
2932
|
+
canRun: () => I(this, ut).canRun(this)
|
|
2933
2933
|
}));
|
|
2934
|
-
const i = this.state.status === "pending", s = !
|
|
2934
|
+
const i = this.state.status === "pending", s = !I(this, Or).canStart();
|
|
2935
2935
|
try {
|
|
2936
2936
|
if (i)
|
|
2937
2937
|
n();
|
|
2938
2938
|
else {
|
|
2939
|
-
ye(this, on, Dn).call(this, { type: "pending", variables: e, isPaused: s }), await ((l = (o =
|
|
2939
|
+
ye(this, on, Dn).call(this, { type: "pending", variables: e, isPaused: s }), await ((l = (o = I(this, ut).config).onMutate) == null ? void 0 : l.call(
|
|
2940
2940
|
o,
|
|
2941
2941
|
e,
|
|
2942
2942
|
this,
|
|
2943
2943
|
r
|
|
2944
2944
|
));
|
|
2945
|
-
const
|
|
2945
|
+
const T = await ((c = (u = this.options).onMutate) == null ? void 0 : c.call(
|
|
2946
2946
|
u,
|
|
2947
2947
|
e,
|
|
2948
2948
|
r
|
|
2949
2949
|
));
|
|
2950
|
-
|
|
2950
|
+
T !== this.state.context && ye(this, on, Dn).call(this, {
|
|
2951
2951
|
type: "pending",
|
|
2952
|
-
context:
|
|
2952
|
+
context: T,
|
|
2953
2953
|
variables: e,
|
|
2954
2954
|
isPaused: s
|
|
2955
2955
|
});
|
|
2956
2956
|
}
|
|
2957
|
-
const L = await
|
|
2958
|
-
return await ((y = (d =
|
|
2957
|
+
const L = await I(this, Or).start();
|
|
2958
|
+
return await ((y = (d = I(this, ut).config).onSuccess) == null ? void 0 : y.call(
|
|
2959
2959
|
d,
|
|
2960
2960
|
L,
|
|
2961
2961
|
e,
|
|
@@ -2968,7 +2968,7 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2968
2968
|
e,
|
|
2969
2969
|
this.state.context,
|
|
2970
2970
|
r
|
|
2971
|
-
)), await ((g = (m =
|
|
2971
|
+
)), await ((g = (m = I(this, ut).config).onSettled) == null ? void 0 : g.call(
|
|
2972
2972
|
m,
|
|
2973
2973
|
L,
|
|
2974
2974
|
null,
|
|
@@ -2986,7 +2986,7 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2986
2986
|
)), ye(this, on, Dn).call(this, { type: "success", data: L }), L;
|
|
2987
2987
|
} catch (L) {
|
|
2988
2988
|
try {
|
|
2989
|
-
throw await ((C = (k =
|
|
2989
|
+
throw await ((C = (k = I(this, ut).config).onError) == null ? void 0 : C.call(
|
|
2990
2990
|
k,
|
|
2991
2991
|
L,
|
|
2992
2992
|
e,
|
|
@@ -2999,7 +2999,7 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
2999
2999
|
e,
|
|
3000
3000
|
this.state.context,
|
|
3001
3001
|
r
|
|
3002
|
-
)), await ((A = (b =
|
|
3002
|
+
)), await ((A = (b = I(this, ut).config).onSettled) == null ? void 0 : A.call(
|
|
3003
3003
|
b,
|
|
3004
3004
|
void 0,
|
|
3005
3005
|
L,
|
|
@@ -3019,7 +3019,7 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
3019
3019
|
ye(this, on, Dn).call(this, { type: "error", error: L });
|
|
3020
3020
|
}
|
|
3021
3021
|
} finally {
|
|
3022
|
-
|
|
3022
|
+
I(this, ut).runNext(this);
|
|
3023
3023
|
}
|
|
3024
3024
|
}
|
|
3025
3025
|
}, Ss = new WeakMap(), an = new WeakMap(), ut = new WeakMap(), Or = new WeakMap(), on = new WeakSet(), Dn = function(e) {
|
|
@@ -3077,9 +3077,9 @@ var Ss, an, ut, Or, on, Dn, vh, Xm = (vh = class extends zh {
|
|
|
3077
3077
|
}
|
|
3078
3078
|
};
|
|
3079
3079
|
this.state = n(this.state), Ve.batch(() => {
|
|
3080
|
-
|
|
3080
|
+
I(this, an).forEach((r) => {
|
|
3081
3081
|
r.onMutationUpdate(e);
|
|
3082
|
-
}),
|
|
3082
|
+
}), I(this, ut).notify({
|
|
3083
3083
|
mutation: this,
|
|
3084
3084
|
type: "updated",
|
|
3085
3085
|
action: e
|
|
@@ -3118,24 +3118,24 @@ var Cn, Kt, Os, bh, Jm = (bh = class extends gi {
|
|
|
3118
3118
|
return this.add(i), i;
|
|
3119
3119
|
}
|
|
3120
3120
|
add(e) {
|
|
3121
|
-
|
|
3121
|
+
I(this, Cn).add(e);
|
|
3122
3122
|
const n = Ws(e);
|
|
3123
3123
|
if (typeof n == "string") {
|
|
3124
|
-
const r =
|
|
3125
|
-
r ? r.push(e) :
|
|
3124
|
+
const r = I(this, Kt).get(n);
|
|
3125
|
+
r ? r.push(e) : I(this, Kt).set(n, [e]);
|
|
3126
3126
|
}
|
|
3127
3127
|
this.notify({ type: "added", mutation: e });
|
|
3128
3128
|
}
|
|
3129
3129
|
remove(e) {
|
|
3130
|
-
if (
|
|
3130
|
+
if (I(this, Cn).delete(e)) {
|
|
3131
3131
|
const n = Ws(e);
|
|
3132
3132
|
if (typeof n == "string") {
|
|
3133
|
-
const r =
|
|
3133
|
+
const r = I(this, Kt).get(n);
|
|
3134
3134
|
if (r)
|
|
3135
3135
|
if (r.length > 1) {
|
|
3136
3136
|
const i = r.indexOf(e);
|
|
3137
3137
|
i !== -1 && r.splice(i, 1);
|
|
3138
|
-
} else r[0] === e &&
|
|
3138
|
+
} else r[0] === e && I(this, Kt).delete(n);
|
|
3139
3139
|
}
|
|
3140
3140
|
}
|
|
3141
3141
|
this.notify({ type: "removed", mutation: e });
|
|
@@ -3143,7 +3143,7 @@ var Cn, Kt, Os, bh, Jm = (bh = class extends gi {
|
|
|
3143
3143
|
canRun(e) {
|
|
3144
3144
|
const n = Ws(e);
|
|
3145
3145
|
if (typeof n == "string") {
|
|
3146
|
-
const r =
|
|
3146
|
+
const r = I(this, Kt).get(n), i = r == null ? void 0 : r.find(
|
|
3147
3147
|
(s) => s.state.status === "pending"
|
|
3148
3148
|
);
|
|
3149
3149
|
return !i || i === e;
|
|
@@ -3154,20 +3154,20 @@ var Cn, Kt, Os, bh, Jm = (bh = class extends gi {
|
|
|
3154
3154
|
var r, i;
|
|
3155
3155
|
const n = Ws(e);
|
|
3156
3156
|
if (typeof n == "string") {
|
|
3157
|
-
const s = (r =
|
|
3157
|
+
const s = (r = I(this, Kt).get(n)) == null ? void 0 : r.find((a) => a !== e && a.state.isPaused);
|
|
3158
3158
|
return (i = s == null ? void 0 : s.continue()) != null ? i : Promise.resolve();
|
|
3159
3159
|
} else
|
|
3160
3160
|
return Promise.resolve();
|
|
3161
3161
|
}
|
|
3162
3162
|
clear() {
|
|
3163
3163
|
Ve.batch(() => {
|
|
3164
|
-
|
|
3164
|
+
I(this, Cn).forEach((e) => {
|
|
3165
3165
|
this.notify({ type: "removed", mutation: e });
|
|
3166
|
-
}),
|
|
3166
|
+
}), I(this, Cn).clear(), I(this, Kt).clear();
|
|
3167
3167
|
});
|
|
3168
3168
|
}
|
|
3169
3169
|
getAll() {
|
|
3170
|
-
return Array.from(
|
|
3170
|
+
return Array.from(I(this, Cn));
|
|
3171
3171
|
}
|
|
3172
3172
|
find(e) {
|
|
3173
3173
|
const n = { exact: !0, ...e };
|
|
@@ -3214,33 +3214,33 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3214
3214
|
setOptions(n) {
|
|
3215
3215
|
var i;
|
|
3216
3216
|
const r = this.options;
|
|
3217
|
-
this.options =
|
|
3217
|
+
this.options = I(this, Sn).defaultMutationOptions(n), Aa(this.options, r) || I(this, Sn).getMutationCache().notify({
|
|
3218
3218
|
type: "observerOptionsUpdated",
|
|
3219
|
-
mutation:
|
|
3219
|
+
mutation: I(this, mt),
|
|
3220
3220
|
observer: this
|
|
3221
|
-
}), r != null && r.mutationKey && this.options.mutationKey && Ir(r.mutationKey) !== Ir(this.options.mutationKey) ? this.reset() : ((i =
|
|
3221
|
+
}), r != null && r.mutationKey && this.options.mutationKey && Ir(r.mutationKey) !== Ir(this.options.mutationKey) ? this.reset() : ((i = I(this, mt)) == null ? void 0 : i.state.status) === "pending" && I(this, mt).setOptions(this.options);
|
|
3222
3222
|
}
|
|
3223
3223
|
onUnsubscribe() {
|
|
3224
3224
|
var n;
|
|
3225
|
-
this.hasListeners() || (n =
|
|
3225
|
+
this.hasListeners() || (n = I(this, mt)) == null || n.removeObserver(this);
|
|
3226
3226
|
}
|
|
3227
3227
|
onMutationUpdate(n) {
|
|
3228
3228
|
ye(this, Tn, ua).call(this), ye(this, Tn, ml).call(this, n);
|
|
3229
3229
|
}
|
|
3230
3230
|
getCurrentResult() {
|
|
3231
|
-
return
|
|
3231
|
+
return I(this, Wn);
|
|
3232
3232
|
}
|
|
3233
3233
|
reset() {
|
|
3234
3234
|
var n;
|
|
3235
|
-
(n =
|
|
3235
|
+
(n = I(this, mt)) == null || n.removeObserver(this), Y(this, mt, void 0), ye(this, Tn, ua).call(this), ye(this, Tn, ml).call(this);
|
|
3236
3236
|
}
|
|
3237
3237
|
mutate(n, r) {
|
|
3238
3238
|
var i;
|
|
3239
|
-
return Y(this, On, r), (i =
|
|
3239
|
+
return Y(this, On, r), (i = I(this, mt)) == null || i.removeObserver(this), Y(this, mt, I(this, Sn).getMutationCache().build(I(this, Sn), this.options)), I(this, mt).addObserver(this), I(this, mt).execute(n);
|
|
3240
3240
|
}
|
|
3241
3241
|
}, Sn = new WeakMap(), Wn = new WeakMap(), mt = new WeakMap(), On = new WeakMap(), Tn = new WeakSet(), ua = function() {
|
|
3242
3242
|
var r, i;
|
|
3243
|
-
const n = (i = (r =
|
|
3243
|
+
const n = (i = (r = I(this, mt)) == null ? void 0 : r.state) != null ? i : Kh();
|
|
3244
3244
|
Y(this, Wn, {
|
|
3245
3245
|
...n,
|
|
3246
3246
|
isPending: n.status === "pending",
|
|
@@ -3253,32 +3253,32 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3253
3253
|
}, ml = function(n) {
|
|
3254
3254
|
Ve.batch(() => {
|
|
3255
3255
|
var r, i, s, a, o, l, u, c;
|
|
3256
|
-
if (
|
|
3257
|
-
const d =
|
|
3258
|
-
client:
|
|
3256
|
+
if (I(this, On) && this.hasListeners()) {
|
|
3257
|
+
const d = I(this, Wn).variables, y = I(this, Wn).context, h = {
|
|
3258
|
+
client: I(this, Sn),
|
|
3259
3259
|
meta: this.options.meta,
|
|
3260
3260
|
mutationKey: this.options.mutationKey
|
|
3261
3261
|
};
|
|
3262
|
-
(n == null ? void 0 : n.type) === "success" ? ((i = (r =
|
|
3262
|
+
(n == null ? void 0 : n.type) === "success" ? ((i = (r = I(this, On)).onSuccess) == null || i.call(
|
|
3263
3263
|
r,
|
|
3264
3264
|
n.data,
|
|
3265
3265
|
d,
|
|
3266
3266
|
y,
|
|
3267
3267
|
h
|
|
3268
|
-
), (a = (s =
|
|
3268
|
+
), (a = (s = I(this, On)).onSettled) == null || a.call(
|
|
3269
3269
|
s,
|
|
3270
3270
|
n.data,
|
|
3271
3271
|
null,
|
|
3272
3272
|
d,
|
|
3273
3273
|
y,
|
|
3274
3274
|
h
|
|
3275
|
-
)) : (n == null ? void 0 : n.type) === "error" && ((l = (o =
|
|
3275
|
+
)) : (n == null ? void 0 : n.type) === "error" && ((l = (o = I(this, On)).onError) == null || l.call(
|
|
3276
3276
|
o,
|
|
3277
3277
|
n.error,
|
|
3278
3278
|
d,
|
|
3279
3279
|
y,
|
|
3280
3280
|
h
|
|
3281
|
-
), (c = (u =
|
|
3281
|
+
), (c = (u = I(this, On)).onSettled) == null || c.call(
|
|
3282
3282
|
u,
|
|
3283
3283
|
void 0,
|
|
3284
3284
|
n.error,
|
|
@@ -3288,7 +3288,7 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3288
3288
|
));
|
|
3289
3289
|
}
|
|
3290
3290
|
this.listeners.forEach((d) => {
|
|
3291
|
-
d(
|
|
3291
|
+
d(I(this, Wn));
|
|
3292
3292
|
});
|
|
3293
3293
|
});
|
|
3294
3294
|
}, Ah), ln, wh, $m = (wh = class extends gi {
|
|
@@ -3311,14 +3311,14 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3311
3311
|
}), this.add(a)), a;
|
|
3312
3312
|
}
|
|
3313
3313
|
add(e) {
|
|
3314
|
-
|
|
3314
|
+
I(this, ln).has(e.queryHash) || (I(this, ln).set(e.queryHash, e), this.notify({
|
|
3315
3315
|
type: "added",
|
|
3316
3316
|
query: e
|
|
3317
3317
|
}));
|
|
3318
3318
|
}
|
|
3319
3319
|
remove(e) {
|
|
3320
|
-
const n =
|
|
3321
|
-
n && (e.destroy(), n === e &&
|
|
3320
|
+
const n = I(this, ln).get(e.queryHash);
|
|
3321
|
+
n && (e.destroy(), n === e && I(this, ln).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
3322
3322
|
}
|
|
3323
3323
|
clear() {
|
|
3324
3324
|
Ve.batch(() => {
|
|
@@ -3328,10 +3328,10 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3328
3328
|
});
|
|
3329
3329
|
}
|
|
3330
3330
|
get(e) {
|
|
3331
|
-
return
|
|
3331
|
+
return I(this, ln).get(e);
|
|
3332
3332
|
}
|
|
3333
3333
|
getAll() {
|
|
3334
|
-
return [...
|
|
3334
|
+
return [...I(this, ln).values()];
|
|
3335
3335
|
}
|
|
3336
3336
|
find(e) {
|
|
3337
3337
|
const n = { exact: !0, ...e };
|
|
@@ -3377,21 +3377,21 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3377
3377
|
Y(this, Ge, t.queryCache || new $m()), Y(this, Qn, t.mutationCache || new Jm()), Y(this, Gn, t.defaultOptions || {}), Y(this, si, /* @__PURE__ */ new Map()), Y(this, ai, /* @__PURE__ */ new Map()), Y(this, qn, 0);
|
|
3378
3378
|
}
|
|
3379
3379
|
mount() {
|
|
3380
|
-
Bs(this, qn)._++,
|
|
3381
|
-
t && (await this.resumePausedMutations(),
|
|
3380
|
+
Bs(this, qn)._++, I(this, qn) === 1 && (Y(this, oi, cu.subscribe(async (t) => {
|
|
3381
|
+
t && (await this.resumePausedMutations(), I(this, Ge).onFocus());
|
|
3382
3382
|
})), Y(this, li, xa.subscribe(async (t) => {
|
|
3383
|
-
t && (await this.resumePausedMutations(),
|
|
3383
|
+
t && (await this.resumePausedMutations(), I(this, Ge).onOnline());
|
|
3384
3384
|
})));
|
|
3385
3385
|
}
|
|
3386
3386
|
unmount() {
|
|
3387
3387
|
var t, e;
|
|
3388
|
-
Bs(this, qn)._--,
|
|
3388
|
+
Bs(this, qn)._--, I(this, qn) === 0 && ((t = I(this, oi)) == null || t.call(this), Y(this, oi, void 0), (e = I(this, li)) == null || e.call(this), Y(this, li, void 0));
|
|
3389
3389
|
}
|
|
3390
3390
|
isFetching(t) {
|
|
3391
|
-
return
|
|
3391
|
+
return I(this, Ge).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
3392
3392
|
}
|
|
3393
3393
|
isMutating(t) {
|
|
3394
|
-
return
|
|
3394
|
+
return I(this, Qn).findAll({ ...t, status: "pending" }).length;
|
|
3395
3395
|
}
|
|
3396
3396
|
/**
|
|
3397
3397
|
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
@@ -3403,28 +3403,28 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3403
3403
|
getQueryData(t) {
|
|
3404
3404
|
var n;
|
|
3405
3405
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
3406
|
-
return (n =
|
|
3406
|
+
return (n = I(this, Ge).get(e.queryHash)) == null ? void 0 : n.state.data;
|
|
3407
3407
|
}
|
|
3408
3408
|
ensureQueryData(t) {
|
|
3409
|
-
const e = this.defaultQueryOptions(t), n =
|
|
3409
|
+
const e = this.defaultQueryOptions(t), n = I(this, Ge).build(this, e), r = n.state.data;
|
|
3410
3410
|
return r === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(Jn(e.staleTime, n)) && this.prefetchQuery(e), Promise.resolve(r));
|
|
3411
3411
|
}
|
|
3412
3412
|
getQueriesData(t) {
|
|
3413
|
-
return
|
|
3413
|
+
return I(this, Ge).findAll(t).map(({ queryKey: e, state: n }) => {
|
|
3414
3414
|
const r = n.data;
|
|
3415
3415
|
return [e, r];
|
|
3416
3416
|
});
|
|
3417
3417
|
}
|
|
3418
3418
|
setQueryData(t, e, n) {
|
|
3419
|
-
const r = this.defaultQueryOptions({ queryKey: t }), i =
|
|
3419
|
+
const r = this.defaultQueryOptions({ queryKey: t }), i = I(this, Ge).get(
|
|
3420
3420
|
r.queryHash
|
|
3421
3421
|
), s = i == null ? void 0 : i.state.data, a = _m(e, s);
|
|
3422
3422
|
if (a !== void 0)
|
|
3423
|
-
return
|
|
3423
|
+
return I(this, Ge).build(this, r).setData(a, { ...n, manual: !0 });
|
|
3424
3424
|
}
|
|
3425
3425
|
setQueriesData(t, e, n) {
|
|
3426
3426
|
return Ve.batch(
|
|
3427
|
-
() =>
|
|
3427
|
+
() => I(this, Ge).findAll(t).map(({ queryKey: r }) => [
|
|
3428
3428
|
r,
|
|
3429
3429
|
this.setQueryData(r, e, n)
|
|
3430
3430
|
])
|
|
@@ -3433,12 +3433,12 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3433
3433
|
getQueryState(t) {
|
|
3434
3434
|
var n;
|
|
3435
3435
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
3436
|
-
return (n =
|
|
3436
|
+
return (n = I(this, Ge).get(
|
|
3437
3437
|
e.queryHash
|
|
3438
3438
|
)) == null ? void 0 : n.state;
|
|
3439
3439
|
}
|
|
3440
3440
|
removeQueries(t) {
|
|
3441
|
-
const e =
|
|
3441
|
+
const e = I(this, Ge);
|
|
3442
3442
|
Ve.batch(() => {
|
|
3443
3443
|
e.findAll(t).forEach((n) => {
|
|
3444
3444
|
e.remove(n);
|
|
@@ -3446,7 +3446,7 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3446
3446
|
});
|
|
3447
3447
|
}
|
|
3448
3448
|
resetQueries(t, e) {
|
|
3449
|
-
const n =
|
|
3449
|
+
const n = I(this, Ge);
|
|
3450
3450
|
return Ve.batch(() => (n.findAll(t).forEach((r) => {
|
|
3451
3451
|
r.reset();
|
|
3452
3452
|
}), this.refetchQueries(
|
|
@@ -3459,14 +3459,14 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3459
3459
|
}
|
|
3460
3460
|
cancelQueries(t, e = {}) {
|
|
3461
3461
|
const n = { revert: !0, ...e }, r = Ve.batch(
|
|
3462
|
-
() =>
|
|
3462
|
+
() => I(this, Ge).findAll(t).map((i) => i.cancel(n))
|
|
3463
3463
|
);
|
|
3464
3464
|
return Promise.all(r).then(ct).catch(ct);
|
|
3465
3465
|
}
|
|
3466
3466
|
invalidateQueries(t, e = {}) {
|
|
3467
3467
|
return Ve.batch(() => {
|
|
3468
3468
|
var n, r;
|
|
3469
|
-
return
|
|
3469
|
+
return I(this, Ge).findAll(t).forEach((i) => {
|
|
3470
3470
|
i.invalidate();
|
|
3471
3471
|
}), (t == null ? void 0 : t.refetchType) === "none" ? Promise.resolve() : this.refetchQueries(
|
|
3472
3472
|
{
|
|
@@ -3483,7 +3483,7 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3483
3483
|
...e,
|
|
3484
3484
|
cancelRefetch: (i = e.cancelRefetch) != null ? i : !0
|
|
3485
3485
|
}, r = Ve.batch(
|
|
3486
|
-
() =>
|
|
3486
|
+
() => I(this, Ge).findAll(t).filter((s) => !s.isDisabled() && !s.isStatic()).map((s) => {
|
|
3487
3487
|
let a = s.fetch(void 0, n);
|
|
3488
3488
|
return n.throwOnError || (a = a.catch(ct)), s.state.fetchStatus === "paused" ? Promise.resolve() : a;
|
|
3489
3489
|
})
|
|
@@ -3493,7 +3493,7 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3493
3493
|
fetchQuery(t) {
|
|
3494
3494
|
const e = this.defaultQueryOptions(t);
|
|
3495
3495
|
e.retry === void 0 && (e.retry = !1);
|
|
3496
|
-
const n =
|
|
3496
|
+
const n = I(this, Ge).build(this, e);
|
|
3497
3497
|
return n.isStaleByTime(
|
|
3498
3498
|
Jn(e.staleTime, n)
|
|
3499
3499
|
) ? n.fetch(e) : Promise.resolve(n.state.data);
|
|
@@ -3511,40 +3511,40 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3511
3511
|
return t.behavior = Ju(t.pages), this.ensureQueryData(t);
|
|
3512
3512
|
}
|
|
3513
3513
|
resumePausedMutations() {
|
|
3514
|
-
return xa.isOnline() ?
|
|
3514
|
+
return xa.isOnline() ? I(this, Qn).resumePausedMutations() : Promise.resolve();
|
|
3515
3515
|
}
|
|
3516
3516
|
getQueryCache() {
|
|
3517
|
-
return
|
|
3517
|
+
return I(this, Ge);
|
|
3518
3518
|
}
|
|
3519
3519
|
getMutationCache() {
|
|
3520
|
-
return
|
|
3520
|
+
return I(this, Qn);
|
|
3521
3521
|
}
|
|
3522
3522
|
getDefaultOptions() {
|
|
3523
|
-
return
|
|
3523
|
+
return I(this, Gn);
|
|
3524
3524
|
}
|
|
3525
3525
|
setDefaultOptions(t) {
|
|
3526
3526
|
Y(this, Gn, t);
|
|
3527
3527
|
}
|
|
3528
3528
|
setQueryDefaults(t, e) {
|
|
3529
|
-
|
|
3529
|
+
I(this, si).set(Ir(t), {
|
|
3530
3530
|
queryKey: t,
|
|
3531
3531
|
defaultOptions: e
|
|
3532
3532
|
});
|
|
3533
3533
|
}
|
|
3534
3534
|
getQueryDefaults(t) {
|
|
3535
|
-
const e = [...
|
|
3535
|
+
const e = [...I(this, si).values()], n = {};
|
|
3536
3536
|
return e.forEach((r) => {
|
|
3537
3537
|
es(t, r.queryKey) && Object.assign(n, r.defaultOptions);
|
|
3538
3538
|
}), n;
|
|
3539
3539
|
}
|
|
3540
3540
|
setMutationDefaults(t, e) {
|
|
3541
|
-
|
|
3541
|
+
I(this, ai).set(Ir(t), {
|
|
3542
3542
|
mutationKey: t,
|
|
3543
3543
|
defaultOptions: e
|
|
3544
3544
|
});
|
|
3545
3545
|
}
|
|
3546
3546
|
getMutationDefaults(t) {
|
|
3547
|
-
const e = [...
|
|
3547
|
+
const e = [...I(this, ai).values()], n = {};
|
|
3548
3548
|
return e.forEach((r) => {
|
|
3549
3549
|
es(t, r.mutationKey) && Object.assign(n, r.defaultOptions);
|
|
3550
3550
|
}), n;
|
|
@@ -3553,7 +3553,7 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3553
3553
|
if (t._defaulted)
|
|
3554
3554
|
return t;
|
|
3555
3555
|
const e = {
|
|
3556
|
-
...
|
|
3556
|
+
...I(this, Gn).queries,
|
|
3557
3557
|
...this.getQueryDefaults(t.queryKey),
|
|
3558
3558
|
...t,
|
|
3559
3559
|
_defaulted: !0
|
|
@@ -3565,14 +3565,14 @@ var Sn, Wn, mt, On, Tn, ua, ml, Ah, Zm = (Ah = class extends gi {
|
|
|
3565
3565
|
}
|
|
3566
3566
|
defaultMutationOptions(t) {
|
|
3567
3567
|
return t != null && t._defaulted ? t : {
|
|
3568
|
-
...
|
|
3568
|
+
...I(this, Gn).mutations,
|
|
3569
3569
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
3570
3570
|
...t,
|
|
3571
3571
|
_defaulted: !0
|
|
3572
3572
|
};
|
|
3573
3573
|
}
|
|
3574
3574
|
clear() {
|
|
3575
|
-
|
|
3575
|
+
I(this, Ge).clear(), I(this, Qn).clear();
|
|
3576
3576
|
}
|
|
3577
3577
|
}, Ge = new WeakMap(), Qn = new WeakMap(), Gn = new WeakMap(), si = new WeakMap(), ai = new WeakMap(), qn = new WeakMap(), oi = new WeakMap(), li = new WeakMap(), xh), Xh = P.createContext(
|
|
3578
3578
|
void 0
|
|
@@ -5427,13 +5427,13 @@ function dt() {
|
|
|
5427
5427
|
function s(h, p, m, g) {
|
|
5428
5428
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
5429
5429
|
return wt(x, "_invoke", function(k, C, w) {
|
|
5430
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
5431
|
-
return O = E, b = 0, A = t,
|
|
5430
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
5431
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
5432
5432
|
} };
|
|
5433
5433
|
function U(_, E) {
|
|
5434
5434
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
5435
|
-
var R, N = D[e], z =
|
|
5436
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
5435
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
5436
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
5437
5437
|
}
|
|
5438
5438
|
if (R || _ > 1) return a;
|
|
5439
5439
|
throw L = !0, E;
|
|
@@ -5441,7 +5441,7 @@ function dt() {
|
|
|
5441
5441
|
return function(_, E, R) {
|
|
5442
5442
|
if (M > 1) throw TypeError("Generator is already running");
|
|
5443
5443
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
5444
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
5444
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
5445
5445
|
try {
|
|
5446
5446
|
if (M = 2, O) {
|
|
5447
5447
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -5450,7 +5450,7 @@ function dt() {
|
|
|
5450
5450
|
A = e.value, b < 2 && (b = 0);
|
|
5451
5451
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
5452
5452
|
O = t;
|
|
5453
|
-
} else if ((e = (L =
|
|
5453
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
5454
5454
|
} catch (N) {
|
|
5455
5455
|
O = t, b = 1, A = N;
|
|
5456
5456
|
} finally {
|
|
@@ -6838,13 +6838,13 @@ function Hi() {
|
|
|
6838
6838
|
function s(h, p, m, g) {
|
|
6839
6839
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
6840
6840
|
return xt(x, "_invoke", function(k, C, w) {
|
|
6841
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
6842
|
-
return O = E, b = 0, A = t,
|
|
6841
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
6842
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
6843
6843
|
} };
|
|
6844
6844
|
function U(_, E) {
|
|
6845
6845
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
6846
|
-
var R, N = D[e], z =
|
|
6847
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
6846
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
6847
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
6848
6848
|
}
|
|
6849
6849
|
if (R || _ > 1) return a;
|
|
6850
6850
|
throw L = !0, E;
|
|
@@ -6852,7 +6852,7 @@ function Hi() {
|
|
|
6852
6852
|
return function(_, E, R) {
|
|
6853
6853
|
if (M > 1) throw TypeError("Generator is already running");
|
|
6854
6854
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
6855
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
6855
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
6856
6856
|
try {
|
|
6857
6857
|
if (M = 2, O) {
|
|
6858
6858
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -6861,7 +6861,7 @@ function Hi() {
|
|
|
6861
6861
|
A = e.value, b < 2 && (b = 0);
|
|
6862
6862
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
6863
6863
|
O = t;
|
|
6864
|
-
} else if ((e = (L =
|
|
6864
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
6865
6865
|
} catch (N) {
|
|
6866
6866
|
O = t, b = 1, A = N;
|
|
6867
6867
|
} finally {
|
|
@@ -7217,7 +7217,7 @@ var a1 = {
|
|
|
7217
7217
|
return z == null || (G = z.data) === null || G === void 0 ? void 0 : G.brands;
|
|
7218
7218
|
}
|
|
7219
7219
|
}
|
|
7220
|
-
}), O = w.data, b = w.isLoading, A = w.error, M = w.refetch, D = Is(), L = D.data,
|
|
7220
|
+
}), O = w.data, b = w.isLoading, A = w.error, M = w.refetch, D = Is(), L = D.data, T = fn(!1), U = at(function() {
|
|
7221
7221
|
return O == null ? void 0 : O.find(function(N) {
|
|
7222
7222
|
return N.id === x;
|
|
7223
7223
|
});
|
|
@@ -7229,7 +7229,7 @@ var a1 = {
|
|
|
7229
7229
|
z && C(z);
|
|
7230
7230
|
}
|
|
7231
7231
|
}, [O, x, C, d, c.pathname]), we(function() {
|
|
7232
|
-
!x ||
|
|
7232
|
+
!x || T.current || (T.current = !0);
|
|
7233
7233
|
}, [U, x, d, c.pathname, O]);
|
|
7234
7234
|
var _ = it(function() {
|
|
7235
7235
|
M();
|
|
@@ -8239,7 +8239,7 @@ var Mi = Ns(Dc || (Dc = vA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-sla
|
|
|
8239
8239
|
}, bA = function(e) {
|
|
8240
8240
|
var n, r, i, s, a, o = e.enableCategories, l = o === void 0 ? !1 : o, u = ee("all"), c = Fc(u, 2), d = c[0], y = c[1], h = ee(1), p = Fc(h, 2), m = p[0], g = p[1], v = rr(), x = v.data, k = v.isLoading, C = v.isRefetching, w = x == null ? void 0 : x.citations, O = (x == null || (n = x.scores) === null || n === void 0 || (n = n.standardized) === null || n === void 0 ? void 0 : n.citations) || {}, b = Object.hasOwn(O, "previous"), A = w == null || (r = w.list) === null || r === void 0 ? void 0 : r.filter(function(E) {
|
|
8241
8241
|
return d === "all" ? !0 : E.category === d;
|
|
8242
|
-
}), M = 10, D = (A == null ? void 0 : A.length) || 0, L = Math.ceil(D / M),
|
|
8242
|
+
}), M = 10, D = (A == null ? void 0 : A.length) || 0, L = Math.ceil(D / M), T = (m - 1) * M, U = T + M, _ = A == null ? void 0 : A.slice(T, U);
|
|
8243
8243
|
return we(function() {
|
|
8244
8244
|
m > L && L > 0 && g(1);
|
|
8245
8245
|
}, [L, m, g, d]), /* @__PURE__ */ f(Be, { className: "yst-overflow-visible md:yst-col-span-2", children: /* @__PURE__ */ S(Be.Content, { className: "yst-flex yst-flex-col yst-gap-6", children: [
|
|
@@ -8291,7 +8291,7 @@ var Mi = Ns(Dc || (Dc = vA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-sla
|
|
|
8291
8291
|
// Show filtered results
|
|
8292
8292
|
_.map(function(E, R) {
|
|
8293
8293
|
return /* @__PURE__ */ f(Uc, { data: Bc(Bc({}, E), {}, {
|
|
8294
|
-
rank:
|
|
8294
|
+
rank: T + R + 1
|
|
8295
8295
|
}), totalQueries: x == null ? void 0 : x.numberOfQueries, isFirstScan: !b, enableCategories: l }, "citation-table-row-".concat(E.url, "-").concat(R));
|
|
8296
8296
|
})
|
|
8297
8297
|
) : (
|
|
@@ -8309,7 +8309,7 @@ var Mi = Ns(Dc || (Dc = vA(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-sla
|
|
|
8309
8309
|
A && A.length > M && /* @__PURE__ */ S("div", { className: "yst-flex yst-items-center yst-justify-end yst-gap-4", children: [
|
|
8310
8310
|
/* @__PURE__ */ S("p", { className: "yst-mb-0", children: [
|
|
8311
8311
|
"Showing ",
|
|
8312
|
-
|
|
8312
|
+
T + 1,
|
|
8313
8313
|
" to",
|
|
8314
8314
|
" ",
|
|
8315
8315
|
U > D ? D : U,
|
|
@@ -9893,7 +9893,7 @@ var $t = {
|
|
|
9893
9893
|
}, Y3 = function(e) {
|
|
9894
9894
|
var n = e.analyses, r = e.selectedAnalysisId, i = e.onAnalysisSelect, s = e.isLoading, a = s === void 0 ? !1 : s, o = e.isOpen, l = o === void 0 ? !1 : o, u = e.onClose, c = ee(/* @__PURE__ */ new Date()), d = Xc(c, 2), y = d[0], h = d[1], p = function(A) {
|
|
9895
9895
|
if (!A) return null;
|
|
9896
|
-
var M = A.slice(0, 10), D = M.split("-"), L = Xc(D, 3),
|
|
9896
|
+
var M = A.slice(0, 10), D = M.split("-"), L = Xc(D, 3), T = L[0], U = L[1], _ = L[2], E = Number(T), R = Number(U), N = Number(_);
|
|
9897
9897
|
return Number.isNaN(E) || Number.isNaN(R) || Number.isNaN(N) || R < 1 || R > 12 || N < 1 || N > 31 ? null : new Date(E, R - 1, N);
|
|
9898
9898
|
}, m = at(function() {
|
|
9899
9899
|
var b = /* @__PURE__ */ new Map();
|
|
@@ -9912,8 +9912,8 @@ var $t = {
|
|
|
9912
9912
|
A && h(A);
|
|
9913
9913
|
}
|
|
9914
9914
|
} else if (l && n.length > 0) {
|
|
9915
|
-
var M = n.reduce(function(L,
|
|
9916
|
-
return new Date(
|
|
9915
|
+
var M = n.reduce(function(L, T) {
|
|
9916
|
+
return new Date(T.createdAt) > new Date(L.createdAt) ? T : L;
|
|
9917
9917
|
}), D = p(M.createdAt);
|
|
9918
9918
|
D && h(D);
|
|
9919
9919
|
}
|
|
@@ -9934,10 +9934,10 @@ var $t = {
|
|
|
9934
9934
|
}, [g, y]), k = at(function() {
|
|
9935
9935
|
var b = FA(y), A = DA(y), M = new Date(b), D = M.getDay(), L = D === 0 ? 6 : D - 1;
|
|
9936
9936
|
M.setDate(M.getDate() - L);
|
|
9937
|
-
var
|
|
9938
|
-
return
|
|
9937
|
+
var T = new Date(A), U = T.getDay(), _ = U === 0 ? 0 : 7 - U;
|
|
9938
|
+
return T.setDate(T.getDate() + _), BA({
|
|
9939
9939
|
start: M,
|
|
9940
|
-
end:
|
|
9940
|
+
end: T
|
|
9941
9941
|
}).map(function(E) {
|
|
9942
9942
|
var R = Wi(E, "yyyy-MM-dd"), N = m.get(R) || [], z = N.find(function(G) {
|
|
9943
9943
|
return String(G.id) === String(r);
|
|
@@ -10142,7 +10142,7 @@ var Z3 = function(e) {
|
|
|
10142
10142
|
!l && !a && p(!h);
|
|
10143
10143
|
}, L = function(E) {
|
|
10144
10144
|
x(E), i(E), p(!1);
|
|
10145
|
-
},
|
|
10145
|
+
}, T = function() {
|
|
10146
10146
|
p(!1);
|
|
10147
10147
|
}, U = function(E) {
|
|
10148
10148
|
E.key === "Enter" || E.key === " " ? (E.preventDefault(), D()) : E.key === "Escape" && p(!1);
|
|
@@ -10176,7 +10176,7 @@ var Z3 = function(e) {
|
|
|
10176
10176
|
"yst-text-gray-400": l || a
|
|
10177
10177
|
}) })
|
|
10178
10178
|
] }),
|
|
10179
|
-
/* @__PURE__ */ f(Y3, { analyses: n, selectedAnalysisId: v, onAnalysisSelect: L, isLoading: a, isOpen: h, onClose:
|
|
10179
|
+
/* @__PURE__ */ f(Y3, { analyses: n, selectedAnalysisId: v, onAnalysisSelect: L, isLoading: a, isOpen: h, onClose: T })
|
|
10180
10180
|
] });
|
|
10181
10181
|
};
|
|
10182
10182
|
function Y0(t) {
|
|
@@ -10294,13 +10294,13 @@ function Il() {
|
|
|
10294
10294
|
function s(h, p, m, g) {
|
|
10295
10295
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
10296
10296
|
return Ct(x, "_invoke", function(k, C, w) {
|
|
10297
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
10298
|
-
return O = E, b = 0, A = t,
|
|
10297
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
10298
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
10299
10299
|
} };
|
|
10300
10300
|
function U(_, E) {
|
|
10301
10301
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
10302
|
-
var R, N = D[e], z =
|
|
10303
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
10302
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
10303
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
10304
10304
|
}
|
|
10305
10305
|
if (R || _ > 1) return a;
|
|
10306
10306
|
throw L = !0, E;
|
|
@@ -10308,7 +10308,7 @@ function Il() {
|
|
|
10308
10308
|
return function(_, E, R) {
|
|
10309
10309
|
if (M > 1) throw TypeError("Generator is already running");
|
|
10310
10310
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
10311
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
10311
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
10312
10312
|
try {
|
|
10313
10313
|
if (M = 2, O) {
|
|
10314
10314
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -10317,7 +10317,7 @@ function Il() {
|
|
|
10317
10317
|
A = e.value, b < 2 && (b = 0);
|
|
10318
10318
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
10319
10319
|
O = t;
|
|
10320
|
-
} else if ((e = (L =
|
|
10320
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
10321
10321
|
} catch (N) {
|
|
10322
10322
|
O = t, b = 1, A = N;
|
|
10323
10323
|
} finally {
|
|
@@ -10418,7 +10418,7 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10418
10418
|
return Se == null ? void 0 : Se.analyses;
|
|
10419
10419
|
}
|
|
10420
10420
|
}
|
|
10421
|
-
}),
|
|
10421
|
+
}), T = L.data, U = L.isLoading, _ = Za(u, c, {
|
|
10422
10422
|
query: {
|
|
10423
10423
|
enabled: !!u && !!c,
|
|
10424
10424
|
select: function(Ne) {
|
|
@@ -10450,7 +10450,7 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10450
10450
|
queryKey: $a(u)
|
|
10451
10451
|
})]);
|
|
10452
10452
|
case 1:
|
|
10453
|
-
V = (
|
|
10453
|
+
V = (T == null ? void 0 : T.filter(function(ie) {
|
|
10454
10454
|
return String(ie.id) !== String(c);
|
|
10455
10455
|
})) || [], V.length > 0 ? (X = V.reduce(function(ie, Re) {
|
|
10456
10456
|
var ht = ie.createdAt ? new Date(ie.createdAt).getTime() : 0, ar = Re.createdAt ? new Date(Re.createdAt).getTime() : 0;
|
|
@@ -10490,9 +10490,9 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10490
10490
|
})) || [{
|
|
10491
10491
|
value: "",
|
|
10492
10492
|
label: "Default model"
|
|
10493
|
-
}], tt =
|
|
10493
|
+
}], tt = T != null && T.some(function(me) {
|
|
10494
10494
|
return String(me.id) === String(c);
|
|
10495
|
-
}) ? c :
|
|
10495
|
+
}) ? c : T && T.length > 0 ? T[0].id : "latest", Xe = Ea(u, {
|
|
10496
10496
|
query: {
|
|
10497
10497
|
enabled: !!u,
|
|
10498
10498
|
select: function(Ne) {
|
|
@@ -10553,7 +10553,7 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10553
10553
|
}), Ci = !$e && (z == null ? void 0 : z.setupStatus) === "scheduledFirstAnalysis" ? "scheduledFirstAnalysis" : $e, Si = (s = Le[Ci]) !== null && s !== void 0 ? s : {
|
|
10554
10554
|
alertContent: null,
|
|
10555
10555
|
alertVariant: "info"
|
|
10556
|
-
}, Oi = Si.alertContent, ho = Si.alertVariant, yo = !U && (z == null ? void 0 : z.setupStatus) !== "pendingQuerySelection" && (
|
|
10556
|
+
}, Oi = Si.alertContent, ho = Si.alertVariant, yo = !U && (z == null ? void 0 : z.setupStatus) !== "pendingQuerySelection" && (T == null ? void 0 : T.length) === 0 && (z == null ? void 0 : z.nextScheduledAnalysis) === null, Ds = (
|
|
10557
10557
|
// analysis should be completed
|
|
10558
10558
|
$e === jn.completed && // data is available to show
|
|
10559
10559
|
x && // scan data is either updating or completed
|
|
@@ -10607,7 +10607,7 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10607
10607
|
/* @__PURE__ */ f(Fs.IconTrigger, { screenReaderTriggerLabel: "Open brand list options", disabled: U || D || M && (M == null ? void 0 : M.length) < 1, children: /* @__PURE__ */ f(mb, {}) }),
|
|
10608
10608
|
/* @__PURE__ */ f(Fs.List, { className: "yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start", children: /* @__PURE__ */ S(Fs.ButtonItem, { onClick: function() {
|
|
10609
10609
|
return K(!0);
|
|
10610
|
-
}, disabled: U || D || (E == null || (a = E.analysis) === null || a === void 0 ? void 0 : a.status) !== "completed" || !
|
|
10610
|
+
}, disabled: U || D || (E == null || (a = E.analysis) === null || a === void 0 ? void 0 : a.status) !== "completed" || !T || T.length === 0, className: "yst-flex yst-justify-start yst-gap-1.5 yst-text-red-600 hover:yst-bg-red-50", children: [
|
|
10611
10611
|
/* @__PURE__ */ f(mu, { className: "yst-h-4 yst-w-4" }),
|
|
10612
10612
|
"Delete analysis"
|
|
10613
10613
|
] }) })
|
|
@@ -10635,9 +10635,9 @@ var Mo = Ns($c || ($c = lw(["yst-flex-1 yst-space-y-2"]))), uw = function(e) {
|
|
|
10635
10635
|
] }),
|
|
10636
10636
|
/* @__PURE__ */ S(Mo, { children: [
|
|
10637
10637
|
/* @__PURE__ */ f(go, { htmlFor: "analysis-date", children: "Analysis date" }),
|
|
10638
|
-
/* @__PURE__ */ f(Z3, { analyses:
|
|
10638
|
+
/* @__PURE__ */ f(Z3, { analyses: T || [], selectedAnalysisId: tt, onAnalysisSelect: function(me) {
|
|
10639
10639
|
g("/brands/".concat(u, "/analysis/").concat(String(me)));
|
|
10640
|
-
}, isLoading: U, disabled: U || !
|
|
10640
|
+
}, isLoading: U, disabled: U || !T || T.length < 1, id: "analysis-date" })
|
|
10641
10641
|
] }),
|
|
10642
10642
|
/* @__PURE__ */ S(Mo, { children: [
|
|
10643
10643
|
/* @__PURE__ */ f(go, { htmlFor: "ai-tool", children: "AI model" }),
|
|
@@ -14710,15 +14710,15 @@ class xi extends Mn {
|
|
|
14710
14710
|
const n = this.axis, r = this.chart, i = this.options, { grid: s, position: a, border: o } = i, l = s.offset, u = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), y = ji(s), h = [], p = o.setContext(this.getContext()), m = p.display ? p.width : 0, g = m / 2, v = function(R) {
|
|
14711
14711
|
return lr(r, R, m);
|
|
14712
14712
|
};
|
|
14713
|
-
let x, k, C, w, O, b, A, M, D, L,
|
|
14713
|
+
let x, k, C, w, O, b, A, M, D, L, T, U;
|
|
14714
14714
|
if (a === "top")
|
|
14715
14715
|
x = v(this.bottom), b = this.bottom - y, M = x - g, L = v(e.top) + g, U = e.bottom;
|
|
14716
14716
|
else if (a === "bottom")
|
|
14717
14717
|
x = v(this.top), L = e.top, U = v(e.bottom) - g, b = x + g, M = this.top + y;
|
|
14718
14718
|
else if (a === "left")
|
|
14719
|
-
x = v(this.right), O = this.right - y, A = x - g, D = v(e.left) + g,
|
|
14719
|
+
x = v(this.right), O = this.right - y, A = x - g, D = v(e.left) + g, T = e.right;
|
|
14720
14720
|
else if (a === "right")
|
|
14721
|
-
x = v(this.left), D = e.left,
|
|
14721
|
+
x = v(this.left), D = e.left, T = v(e.right) - g, O = x + g, A = this.left + y;
|
|
14722
14722
|
else if (n === "x") {
|
|
14723
14723
|
if (a === "center")
|
|
14724
14724
|
x = v((e.top + e.bottom) / 2 + 0.5);
|
|
@@ -14734,19 +14734,19 @@ class xi extends Mn {
|
|
|
14734
14734
|
const R = Object.keys(a)[0], N = a[R];
|
|
14735
14735
|
x = v(this.chart.scales[R].getPixelForValue(N));
|
|
14736
14736
|
}
|
|
14737
|
-
O = x - g, A = O - y, D = e.left,
|
|
14737
|
+
O = x - g, A = O - y, D = e.left, T = e.right;
|
|
14738
14738
|
}
|
|
14739
14739
|
const _ = ge(i.ticks.maxTicksLimit, d), E = Math.max(1, Math.ceil(d / _));
|
|
14740
14740
|
for (k = 0; k < d; k += E) {
|
|
14741
14741
|
const R = this.getContext(k), N = s.setContext(R), z = o.setContext(R), G = N.lineWidth, B = N.color, W = z.dash || [], F = z.dashOffset, Q = N.tickWidth, H = N.tickColor, K = N.tickBorderDash || [], J = N.tickBorderDashOffset;
|
|
14742
|
-
C = eC(this, k, l), C !== void 0 && (w = lr(r, C, G), u ? O = A = D =
|
|
14742
|
+
C = eC(this, k, l), C !== void 0 && (w = lr(r, C, G), u ? O = A = D = T = w : b = M = L = U = w, h.push({
|
|
14743
14743
|
tx1: O,
|
|
14744
14744
|
ty1: b,
|
|
14745
14745
|
tx2: A,
|
|
14746
14746
|
ty2: M,
|
|
14747
14747
|
x1: D,
|
|
14748
14748
|
y1: L,
|
|
14749
|
-
x2:
|
|
14749
|
+
x2: T,
|
|
14750
14750
|
y2: U,
|
|
14751
14751
|
width: G,
|
|
14752
14752
|
color: B,
|
|
@@ -14762,7 +14762,7 @@ class xi extends Mn {
|
|
|
14762
14762
|
}
|
|
14763
14763
|
_computeLabelItems(e) {
|
|
14764
14764
|
const n = this.axis, r = this.options, { position: i, ticks: s } = r, a = this.isHorizontal(), o = this.ticks, { align: l, crossAlign: u, padding: c, mirror: d } = s, y = ji(r.grid), h = y + c, p = d ? -c : h, m = -Yn(this.labelRotation), g = [];
|
|
14765
|
-
let v, x, k, C, w, O, b, A, M, D, L,
|
|
14765
|
+
let v, x, k, C, w, O, b, A, M, D, L, T, U = "middle";
|
|
14766
14766
|
if (i === "top")
|
|
14767
14767
|
O = this.bottom - p, b = this._getXAxisLabelAlignment();
|
|
14768
14768
|
else if (i === "bottom")
|
|
@@ -14798,11 +14798,11 @@ class xi extends Mn {
|
|
|
14798
14798
|
A = this.getPixelForTick(v) + s.labelOffset, M = this._resolveTickFontOptions(v), D = M.lineHeight, L = We(C) ? C.length : 1;
|
|
14799
14799
|
const R = L / 2, N = E.color, z = E.textStrokeColor, G = E.textStrokeWidth;
|
|
14800
14800
|
let B = b;
|
|
14801
|
-
a ? (w = A, b === "inner" && (v === x - 1 ? B = this.options.reverse ? "left" : "right" : v === 0 ? B = this.options.reverse ? "right" : "left" : B = "center"), i === "top" ? u === "near" || m !== 0 ?
|
|
14801
|
+
a ? (w = A, b === "inner" && (v === x - 1 ? B = this.options.reverse ? "left" : "right" : v === 0 ? B = this.options.reverse ? "right" : "left" : B = "center"), i === "top" ? u === "near" || m !== 0 ? T = -L * D + D / 2 : u === "center" ? T = -_.highest.height / 2 - R * D + D : T = -_.highest.height + D / 2 : u === "near" || m !== 0 ? T = D / 2 : u === "center" ? T = _.highest.height / 2 - R * D : T = _.highest.height - L * D, d && (T *= -1), m !== 0 && !E.showLabelBackdrop && (w += D / 2 * Math.sin(m))) : (O = A, T = (1 - L) * D / 2);
|
|
14802
14802
|
let W;
|
|
14803
14803
|
if (E.showLabelBackdrop) {
|
|
14804
14804
|
const F = ot(E.backdropPadding), Q = _.heights[v], H = _.widths[v];
|
|
14805
|
-
let K =
|
|
14805
|
+
let K = T - F.top, J = 0 - F.left;
|
|
14806
14806
|
switch (U) {
|
|
14807
14807
|
case "middle":
|
|
14808
14808
|
K -= Q / 2;
|
|
@@ -14833,7 +14833,7 @@ class xi extends Mn {
|
|
|
14833
14833
|
g.push({
|
|
14834
14834
|
label: C,
|
|
14835
14835
|
font: M,
|
|
14836
|
-
textOffset:
|
|
14836
|
+
textOffset: T,
|
|
14837
14837
|
options: {
|
|
14838
14838
|
rotation: m,
|
|
14839
14839
|
color: N,
|
|
@@ -16722,16 +16722,16 @@ class nf extends Mn {
|
|
|
16722
16722
|
pointStyle: A.pointStyle,
|
|
16723
16723
|
rotation: A.rotation,
|
|
16724
16724
|
borderWidth: M
|
|
16725
|
-
}, L = l.xPlus(O, p / 2),
|
|
16726
|
-
sy(i, D, L,
|
|
16725
|
+
}, L = l.xPlus(O, p / 2), T = b + y;
|
|
16726
|
+
sy(i, D, L, T, a.pointStyleWidth && p);
|
|
16727
16727
|
} else {
|
|
16728
|
-
const D = b + Math.max((d - m) / 2, 0), L = l.leftForLtr(O, p),
|
|
16729
|
-
i.beginPath(), Object.values(
|
|
16728
|
+
const D = b + Math.max((d - m) / 2, 0), L = l.leftForLtr(O, p), T = Vr(A.borderRadius);
|
|
16729
|
+
i.beginPath(), Object.values(T).some((U) => U !== 0) ? Na(i, {
|
|
16730
16730
|
x: L,
|
|
16731
16731
|
y: D,
|
|
16732
16732
|
w: p,
|
|
16733
16733
|
h: m,
|
|
16734
|
-
radius:
|
|
16734
|
+
radius: T
|
|
16735
16735
|
}) : i.rect(L, D, p, m), i.fill(), M !== 0 && i.stroke();
|
|
16736
16736
|
}
|
|
16737
16737
|
i.restore();
|
|
@@ -16754,10 +16754,10 @@ class nf extends Mn {
|
|
|
16754
16754
|
this.legendItems.forEach((O, b) => {
|
|
16755
16755
|
i.strokeStyle = O.fontColor, i.fillStyle = O.fontColor;
|
|
16756
16756
|
const A = i.measureText(O.text).width, M = l.textAlign(O.textAlign || (O.textAlign = a.textAlign)), D = p + y + A;
|
|
16757
|
-
let L = h.x,
|
|
16758
|
-
l.setWidth(this.width), k ? b > 0 && L + D + c > this.right && (
|
|
16757
|
+
let L = h.x, T = h.y;
|
|
16758
|
+
l.setWidth(this.width), k ? b > 0 && L + D + c > this.right && (T = h.y += w, h.line++, L = h.x = rt(s, this.left + c, this.right - r[h.line])) : b > 0 && T + w > this.bottom && (L = h.x = L + n[h.line].width + c, h.line++, T = h.y = rt(s, this.top + C + c, this.bottom - n[h.line].height));
|
|
16759
16759
|
const U = l.x(L);
|
|
16760
|
-
if (v(U,
|
|
16760
|
+
if (v(U, T, O), L = ex(M, L + p + y, k ? L + D : this.right, e.rtl), x(l.x(L), T, O), k)
|
|
16761
16761
|
h.x += D + c;
|
|
16762
16762
|
else if (typeof O.text != "string") {
|
|
16763
16763
|
const _ = u.lineHeight;
|
|
@@ -17650,11 +17650,11 @@ function CS(t, e) {
|
|
|
17650
17650
|
for (v && (y && b !== a ? (n.push({
|
|
17651
17651
|
value: a
|
|
17652
17652
|
}), b < a && L++, Ji(Math.round((b + L * w) * O) / O, a, cf(a, C, t)) && L++) : b < a && L++); L < M; ++L) {
|
|
17653
|
-
const
|
|
17654
|
-
if (x &&
|
|
17653
|
+
const T = Math.round((b + L * w) * O) / O;
|
|
17654
|
+
if (x && T > o)
|
|
17655
17655
|
break;
|
|
17656
17656
|
n.push({
|
|
17657
|
-
value:
|
|
17657
|
+
value: T
|
|
17658
17658
|
});
|
|
17659
17659
|
}
|
|
17660
17660
|
return x && y && A !== o ? n.length && Ji(n[n.length - 1].value, o, cf(o, C, t)) ? n[n.length - 1].value = o : n.push({
|
|
@@ -18781,7 +18781,7 @@ function u6() {
|
|
|
18781
18781
|
},
|
|
18782
18782
|
enabled: !!M && !!D
|
|
18783
18783
|
}
|
|
18784
|
-
}),
|
|
18784
|
+
}), T = L.data, U = L.isLoading, _ = T == null || (t = T.analysis) === null || t === void 0 ? void 0 : t.scans, E = Array.isArray(_) && _.length > 0 ? _.reduce(function(_e, Qe) {
|
|
18785
18785
|
if (!_e)
|
|
18786
18786
|
return Qe;
|
|
18787
18787
|
if (!(Qe != null && Qe.finishedAt) || !(_e != null && _e.finishedAt))
|
|
@@ -19024,8 +19024,8 @@ var Qo = function() {
|
|
|
19024
19024
|
var M = A.isVisible, D = A.setIsVisible, L = function() {
|
|
19025
19025
|
D(!1);
|
|
19026
19026
|
};
|
|
19027
|
-
return /* @__PURE__ */ S($o, { id: "toast", isVisible: M, setIsVisible: function(
|
|
19028
|
-
|
|
19027
|
+
return /* @__PURE__ */ S($o, { id: "toast", isVisible: M, setIsVisible: function(T) {
|
|
19028
|
+
T || D(!1);
|
|
19029
19029
|
}, children: [
|
|
19030
19030
|
/* @__PURE__ */ S("div", { className: "yst-mb-3 yst-flex yst-items-start yst-gap-3", children: [
|
|
19031
19031
|
/* @__PURE__ */ f("img", { src: c6 }),
|
|
@@ -19282,8 +19282,8 @@ var t7 = function(e) {
|
|
|
19282
19282
|
var n = e.isRtl, r = n === void 0 ? !1 : n, i = e.className, s = e.style, a = e.token, o = a === void 0 ? "" : a, l = e.apiUrl, u = e.DebugInfo, c = e.basename, d = c === void 0 ? "/" : c, y = e.subpath, h = y === void 0 ? "/" : y, p = e.onNavigate, m = p === void 0 ? function() {
|
|
19283
19283
|
} : p, g = e.onLogout, v = g === void 0 ? function() {
|
|
19284
19284
|
} : g, x = e.onAddSubscription, k = x === void 0 ? function() {
|
|
19285
|
-
} : x, C = function(L,
|
|
19286
|
-
var U = L.endsWith("/") ? L.slice(0, -1) : L, _ =
|
|
19285
|
+
} : x, C = function(L, T) {
|
|
19286
|
+
var U = L.endsWith("/") ? L.slice(0, -1) : L, _ = T.startsWith("/") ? T : "/".concat(T);
|
|
19287
19287
|
return U + _ || "/";
|
|
19288
19288
|
}, w = ee(!!(o || l)), O = I6(w, 2), b = O[0], A = O[1], M = {
|
|
19289
19289
|
onAddSubscription: k,
|
|
@@ -19328,13 +19328,13 @@ function Yi() {
|
|
|
19328
19328
|
function s(h, p, m, g) {
|
|
19329
19329
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
19330
19330
|
return St(x, "_invoke", function(k, C, w) {
|
|
19331
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
19332
|
-
return O = E, b = 0, A = t,
|
|
19331
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
19332
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
19333
19333
|
} };
|
|
19334
19334
|
function U(_, E) {
|
|
19335
19335
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
19336
|
-
var R, N = D[e], z =
|
|
19337
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
19336
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
19337
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
19338
19338
|
}
|
|
19339
19339
|
if (R || _ > 1) return a;
|
|
19340
19340
|
throw L = !0, E;
|
|
@@ -19342,7 +19342,7 @@ function Yi() {
|
|
|
19342
19342
|
return function(_, E, R) {
|
|
19343
19343
|
if (M > 1) throw TypeError("Generator is already running");
|
|
19344
19344
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
19345
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
19345
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
19346
19346
|
try {
|
|
19347
19347
|
if (M = 2, O) {
|
|
19348
19348
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -19351,7 +19351,7 @@ function Yi() {
|
|
|
19351
19351
|
A = e.value, b < 2 && (b = 0);
|
|
19352
19352
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
19353
19353
|
O = t;
|
|
19354
|
-
} else if ((e = (L =
|
|
19354
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
19355
19355
|
} catch (N) {
|
|
19356
19356
|
O = t, b = 1, A = N;
|
|
19357
19357
|
} finally {
|
|
@@ -19566,8 +19566,8 @@ var F6 = function(e) {
|
|
|
19566
19566
|
);
|
|
19567
19567
|
}
|
|
19568
19568
|
}
|
|
19569
|
-
}), D = M.mutate, L = M.isPending,
|
|
19570
|
-
!d.trim() || !
|
|
19569
|
+
}), D = M.mutate, L = M.isPending, T = typeof (i == null ? void 0 : i.id) == "string" && i.id.length > 0 || typeof (i == null ? void 0 : i.id) == "number" && !isNaN(i.id), U = function() {
|
|
19570
|
+
!d.trim() || !T || b({
|
|
19571
19571
|
brandId: o,
|
|
19572
19572
|
data: {
|
|
19573
19573
|
groupName: d.trim(),
|
|
@@ -19595,7 +19595,7 @@ var F6 = function(e) {
|
|
|
19595
19595
|
}, N = function() {
|
|
19596
19596
|
return C(!1);
|
|
19597
19597
|
}, z = function() {
|
|
19598
|
-
if (!
|
|
19598
|
+
if (!T) {
|
|
19599
19599
|
console.error("Invalid groupId provided for ungrouping. groupToEdit?.id: ".concat(i == null ? void 0 : i.id, " (type: ").concat(ql(i == null ? void 0 : i.id), ")")), N();
|
|
19600
19600
|
return;
|
|
19601
19601
|
}
|
|
@@ -19631,14 +19631,14 @@ var F6 = function(e) {
|
|
|
19631
19631
|
] })
|
|
19632
19632
|
] }),
|
|
19633
19633
|
/* @__PURE__ */ f(Z.Container.Footer, { children: /* @__PURE__ */ S("div", { className: "yst-flex yst-w-full yst-items-center yst-justify-between", children: [
|
|
19634
|
-
/* @__PURE__ */ f("div", { className: "yst-flex yst-justify-start", children: /* @__PURE__ */ f(de, { variant: "tertiary", onClick: R, disabled: A || !
|
|
19634
|
+
/* @__PURE__ */ f("div", { className: "yst-flex yst-justify-start", children: /* @__PURE__ */ f(de, { variant: "tertiary", onClick: R, disabled: A || !T, className: "yst-text-red-600", children: "Ungroup brands" }) }),
|
|
19635
19635
|
/* @__PURE__ */ S("div", { className: "yst-flex yst-justify-end yst-gap-2", children: [
|
|
19636
19636
|
/* @__PURE__ */ f(de, { variant: "secondary", onClick: _, children: "Cancel" }),
|
|
19637
19637
|
/* @__PURE__ */ f(de, { variant: "primary", onClick: U, disabled: !d.trim() || A, isLoading: A, children: A ? "Saving..." : "Save changes" })
|
|
19638
19638
|
] })
|
|
19639
19639
|
] }) })
|
|
19640
19640
|
] }) }) }),
|
|
19641
|
-
/* @__PURE__ */ f(no, { isOpen: k, onClose: N, onConfirm: z, disabled: !
|
|
19641
|
+
/* @__PURE__ */ f(no, { isOpen: k, onClose: N, onConfirm: z, disabled: !T || L, isLoading: L, title: "Ungroup this brand group?", description: /* @__PURE__ */ S(xe, { children: [
|
|
19642
19642
|
/* @__PURE__ */ f("p", { children: "The group will be removed, but the brands inside will remain in your brand list." }),
|
|
19643
19643
|
/* @__PURE__ */ f("p", { children: "This action cannot be undone. To create a new group with these brands, simply select them and create a new group." })
|
|
19644
19644
|
] }), confirmText: "Yes, ungroup" })
|
|
@@ -19650,13 +19650,13 @@ function zl() {
|
|
|
19650
19650
|
function s(h, p, m, g) {
|
|
19651
19651
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
19652
19652
|
return Ot(x, "_invoke", function(k, C, w) {
|
|
19653
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
19654
|
-
return O = E, b = 0, A = t,
|
|
19653
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
19654
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
19655
19655
|
} };
|
|
19656
19656
|
function U(_, E) {
|
|
19657
19657
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
19658
|
-
var R, N = D[e], z =
|
|
19659
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
19658
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
19659
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
19660
19660
|
}
|
|
19661
19661
|
if (R || _ > 1) return a;
|
|
19662
19662
|
throw L = !0, E;
|
|
@@ -19664,7 +19664,7 @@ function zl() {
|
|
|
19664
19664
|
return function(_, E, R) {
|
|
19665
19665
|
if (M > 1) throw TypeError("Generator is already running");
|
|
19666
19666
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
19667
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
19667
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
19668
19668
|
try {
|
|
19669
19669
|
if (M = 2, O) {
|
|
19670
19670
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -19673,7 +19673,7 @@ function zl() {
|
|
|
19673
19673
|
A = e.value, b < 2 && (b = 0);
|
|
19674
19674
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
19675
19675
|
O = t;
|
|
19676
|
-
} else if ((e = (L =
|
|
19676
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
19677
19677
|
} catch (N) {
|
|
19678
19678
|
O = t, b = 1, A = N;
|
|
19679
19679
|
} finally {
|
|
@@ -19792,21 +19792,21 @@ var q6 = function(e) {
|
|
|
19792
19792
|
var n = e.isOpen, r = e.onClose, i = e.brandId, s = e.brandsToGroup, a = e.onGroupCreated, o = qt(), l = zt(), u = l.analysisId, c = ee(""), d = Tf(c, 2), y = d[0], h = d[1], p = ee([]), m = Tf(p, 2), g = m[0], v = m[1];
|
|
19793
19793
|
we(function() {
|
|
19794
19794
|
if (n && s.length > 0) {
|
|
19795
|
-
var
|
|
19796
|
-
h(String(
|
|
19797
|
-
var
|
|
19798
|
-
return String((
|
|
19795
|
+
var M, D = (M = s[0]) === null || M === void 0 ? void 0 : M.name;
|
|
19796
|
+
h(String(D || "New Group")), v(s.map(function(L) {
|
|
19797
|
+
var T;
|
|
19798
|
+
return String((T = L.id) !== null && T !== void 0 ? T : "");
|
|
19799
19799
|
}));
|
|
19800
19800
|
}
|
|
19801
19801
|
}, [n, s]);
|
|
19802
19802
|
var x = E0({
|
|
19803
19803
|
mutation: {
|
|
19804
19804
|
onSuccess: function() {
|
|
19805
|
-
var
|
|
19806
|
-
return zl().w(function(
|
|
19807
|
-
for (; ; ) switch (
|
|
19805
|
+
var M = U6(/* @__PURE__ */ zl().m(function L() {
|
|
19806
|
+
return zl().w(function(T) {
|
|
19807
|
+
for (; ; ) switch (T.n) {
|
|
19808
19808
|
case 0:
|
|
19809
|
-
return
|
|
19809
|
+
return T.n = 1, Promise.all([
|
|
19810
19810
|
o.invalidateQueries({
|
|
19811
19811
|
queryKey: Oa(i)
|
|
19812
19812
|
}),
|
|
@@ -19830,73 +19830,67 @@ var q6 = function(e) {
|
|
|
19830
19830
|
case 1:
|
|
19831
19831
|
a == null || a(), w();
|
|
19832
19832
|
case 2:
|
|
19833
|
-
return
|
|
19833
|
+
return T.a(2);
|
|
19834
19834
|
}
|
|
19835
|
-
},
|
|
19835
|
+
}, L);
|
|
19836
19836
|
}));
|
|
19837
|
-
function
|
|
19838
|
-
return
|
|
19837
|
+
function D() {
|
|
19838
|
+
return M.apply(this, arguments);
|
|
19839
19839
|
}
|
|
19840
|
-
return
|
|
19840
|
+
return D;
|
|
19841
19841
|
}(),
|
|
19842
|
-
onError: function(
|
|
19843
|
-
console.error("Error creating group:",
|
|
19842
|
+
onError: function(D) {
|
|
19843
|
+
console.error("Error creating group:", D);
|
|
19844
19844
|
}
|
|
19845
19845
|
}
|
|
19846
19846
|
}), k = x.mutate, C = x.isPending, w = function() {
|
|
19847
19847
|
h(""), v([]), r();
|
|
19848
19848
|
}, O = function() {
|
|
19849
19849
|
if (!(!y.trim() || g.length === 0)) {
|
|
19850
|
-
var
|
|
19851
|
-
var
|
|
19852
|
-
return String(
|
|
19850
|
+
var D = g.flatMap(function(L) {
|
|
19851
|
+
var T = s.find(function(U) {
|
|
19852
|
+
return String(U.id) === L;
|
|
19853
19853
|
});
|
|
19854
|
-
return
|
|
19855
|
-
return String(
|
|
19856
|
-
}) :
|
|
19854
|
+
return T && T.type === "group" && Array.isArray(T.groupedBrands) ? T.groupedBrands.map(function(U) {
|
|
19855
|
+
return String(U.id);
|
|
19856
|
+
}) : L;
|
|
19857
19857
|
});
|
|
19858
19858
|
k({
|
|
19859
19859
|
brandId: i,
|
|
19860
19860
|
data: {
|
|
19861
19861
|
groupName: y.trim(),
|
|
19862
|
-
brandIds:
|
|
19863
|
-
return
|
|
19862
|
+
brandIds: D.filter(function(L) {
|
|
19863
|
+
return L !== "";
|
|
19864
19864
|
})
|
|
19865
19865
|
}
|
|
19866
19866
|
});
|
|
19867
19867
|
}
|
|
19868
|
-
}, b = function(
|
|
19869
|
-
v(function(
|
|
19870
|
-
|
|
19871
|
-
return
|
|
19868
|
+
}, b = function(D) {
|
|
19869
|
+
v(function(L) {
|
|
19870
|
+
var T = L.filter(function(U) {
|
|
19871
|
+
return U !== D;
|
|
19872
19872
|
});
|
|
19873
|
+
return T.length === 0 && w(), T;
|
|
19873
19874
|
});
|
|
19874
|
-
}
|
|
19875
|
+
}, A = g.map(function(M) {
|
|
19876
|
+
var D = s.find(function(L) {
|
|
19877
|
+
return String(L.id) === M;
|
|
19878
|
+
});
|
|
19879
|
+
return D ? D.type === "group" ? "Group: ".concat(D.name) : D.name || "" : "";
|
|
19880
|
+
}).filter(Boolean);
|
|
19875
19881
|
return /* @__PURE__ */ f(Z, { isOpen: n, onClose: w, children: /* @__PURE__ */ f(Z.Panel, { children: /* @__PURE__ */ S(Z.Container, { children: [
|
|
19876
|
-
/* @__PURE__ */ f(Z.Container.Header, { children: /* @__PURE__ */ f(Z.Title, { children: "
|
|
19882
|
+
/* @__PURE__ */ f(Z.Container.Header, { children: /* @__PURE__ */ f(Z.Title, { children: "Create brand group" }) }),
|
|
19877
19883
|
/* @__PURE__ */ S(Z.Container.Content, { className: "yst-space-y-4", children: [
|
|
19878
19884
|
/* @__PURE__ */ S("div", { children: [
|
|
19879
19885
|
/* @__PURE__ */ f("label", { htmlFor: "groupName", className: "yst-mb-2 yst-block yst-text-sm yst-font-medium", children: "Group name" }),
|
|
19880
|
-
/* @__PURE__ */ f(Ua, { id: "groupName", value: y, onChange: function(
|
|
19881
|
-
return h(
|
|
19886
|
+
/* @__PURE__ */ f(Ua, { id: "groupName", value: y, onChange: function(M) {
|
|
19887
|
+
return h(M.target.value);
|
|
19882
19888
|
}, placeholder: "Enter group name", className: "yst-w-full" })
|
|
19883
19889
|
] }),
|
|
19884
19890
|
/* @__PURE__ */ S("div", { children: [
|
|
19885
|
-
/* @__PURE__ */ f(Ch, { readOnly: !0, id: "groupedBrands", label: "Brands in group (".concat(g.length, ")"), tags:
|
|
19886
|
-
var
|
|
19887
|
-
|
|
19888
|
-
});
|
|
19889
|
-
return M ? M.type === "group" ? "Group: ".concat(M.name) : M.name || "" : "";
|
|
19890
|
-
}).filter(Boolean), onRemoveTag: function(A) {
|
|
19891
|
-
var M = g.find(function(D) {
|
|
19892
|
-
var L = s.find(function(U) {
|
|
19893
|
-
return String(U.id) === D;
|
|
19894
|
-
});
|
|
19895
|
-
if (!L) return !1;
|
|
19896
|
-
var I = L.type === "group" ? "Group: ".concat(L.name) : L.name || "";
|
|
19897
|
-
return I === A;
|
|
19898
|
-
});
|
|
19899
|
-
M && b(M);
|
|
19891
|
+
/* @__PURE__ */ f(Ch, { readOnly: !0, id: "groupedBrands", label: "Brands in group (".concat(g.length, ")"), tags: A, onRemoveTag: function(M) {
|
|
19892
|
+
var D = g[M];
|
|
19893
|
+
D && b(D);
|
|
19900
19894
|
}, onAddTag: function() {
|
|
19901
19895
|
} }),
|
|
19902
19896
|
g.length === 0 && /* @__PURE__ */ f("p", { className: "yst-text-sm yst-italic yst-text-gray-500", children: "No brands selected" })
|
|
@@ -20012,7 +20006,7 @@ function e4(t) {
|
|
|
20012
20006
|
if (Array.isArray(t)) return t;
|
|
20013
20007
|
}
|
|
20014
20008
|
var t4 = function() {
|
|
20015
|
-
var e, n = _t(), r = ee(!1), i = tn(r, 2), s = i[0], a = i[1], o = ee({}), l = tn(o, 2), u = l[0], c = l[1], d = ee(""), y = tn(d, 2), h = y[0], p = y[1], m = ee(1), g = tn(m, 2), v = g[0], x = g[1], k = ee({}), C = tn(k, 2), w = C[0], O = C[1], b = ee(!1), A = tn(b, 2), M = A[0], D = A[1], L = ee(!1),
|
|
20009
|
+
var e, n = _t(), r = ee(!1), i = tn(r, 2), s = i[0], a = i[1], o = ee({}), l = tn(o, 2), u = l[0], c = l[1], d = ee(""), y = tn(d, 2), h = y[0], p = y[1], m = ee(1), g = tn(m, 2), v = g[0], x = g[1], k = ee({}), C = tn(k, 2), w = C[0], O = C[1], b = ee(!1), A = tn(b, 2), M = A[0], D = A[1], L = ee(!1), T = tn(L, 2), U = T[0], _ = T[1], E = ee(null), R = tn(E, 2), N = R[0], z = R[1], G = zt(), B = G.brandId;
|
|
20016
20010
|
function W(fe) {
|
|
20017
20011
|
return String(fe.id);
|
|
20018
20012
|
}
|
|
@@ -20306,13 +20300,13 @@ function Vl() {
|
|
|
20306
20300
|
function s(h, p, m, g) {
|
|
20307
20301
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
20308
20302
|
return Et(x, "_invoke", function(k, C, w) {
|
|
20309
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
20310
|
-
return O = E, b = 0, A = t,
|
|
20303
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
20304
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
20311
20305
|
} };
|
|
20312
20306
|
function U(_, E) {
|
|
20313
20307
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
20314
|
-
var R, N = D[e], z =
|
|
20315
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
20308
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
20309
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
20316
20310
|
}
|
|
20317
20311
|
if (R || _ > 1) return a;
|
|
20318
20312
|
throw L = !0, E;
|
|
@@ -20320,7 +20314,7 @@ function Vl() {
|
|
|
20320
20314
|
return function(_, E, R) {
|
|
20321
20315
|
if (M > 1) throw TypeError("Generator is already running");
|
|
20322
20316
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
20323
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
20317
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
20324
20318
|
try {
|
|
20325
20319
|
if (M = 2, O) {
|
|
20326
20320
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -20329,7 +20323,7 @@ function Vl() {
|
|
|
20329
20323
|
A = e.value, b < 2 && (b = 0);
|
|
20330
20324
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
20331
20325
|
O = t;
|
|
20332
|
-
} else if ((e = (L =
|
|
20326
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
20333
20327
|
} catch (N) {
|
|
20334
20328
|
O = t, b = 1, A = N;
|
|
20335
20329
|
} finally {
|
|
@@ -20512,13 +20506,13 @@ function Vi() {
|
|
|
20512
20506
|
function s(h, p, m, g) {
|
|
20513
20507
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
20514
20508
|
return Pt(x, "_invoke", function(k, C, w) {
|
|
20515
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
20516
|
-
return O = E, b = 0, A = t,
|
|
20509
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
20510
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
20517
20511
|
} };
|
|
20518
20512
|
function U(_, E) {
|
|
20519
20513
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
20520
|
-
var R, N = D[e], z =
|
|
20521
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
20514
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
20515
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
20522
20516
|
}
|
|
20523
20517
|
if (R || _ > 1) return a;
|
|
20524
20518
|
throw L = !0, E;
|
|
@@ -20526,7 +20520,7 @@ function Vi() {
|
|
|
20526
20520
|
return function(_, E, R) {
|
|
20527
20521
|
if (M > 1) throw TypeError("Generator is already running");
|
|
20528
20522
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
20529
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
20523
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
20530
20524
|
try {
|
|
20531
20525
|
if (M = 2, O) {
|
|
20532
20526
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -20535,7 +20529,7 @@ function Vi() {
|
|
|
20535
20529
|
A = e.value, b < 2 && (b = 0);
|
|
20536
20530
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
20537
20531
|
O = t;
|
|
20538
|
-
} else if ((e = (L =
|
|
20532
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
20539
20533
|
} catch (N) {
|
|
20540
20534
|
O = t, b = 1, A = N;
|
|
20541
20535
|
} finally {
|
|
@@ -20743,7 +20737,7 @@ var S4 = function(e) {
|
|
|
20743
20737
|
onSuccess: function() {
|
|
20744
20738
|
if (i && i.settings && i.settings.enableAutomaticAnalysis === !1)
|
|
20745
20739
|
return x(!1);
|
|
20746
|
-
x(!
|
|
20740
|
+
x(!T);
|
|
20747
20741
|
},
|
|
20748
20742
|
onError: function(E, R, N) {
|
|
20749
20743
|
N != null && N.previous && k.setQueryData(cn(), N.previous);
|
|
@@ -20790,12 +20784,12 @@ var S4 = function(e) {
|
|
|
20790
20784
|
if (E) {
|
|
20791
20785
|
if (!L)
|
|
20792
20786
|
return x(!0);
|
|
20793
|
-
if (!
|
|
20787
|
+
if (!T)
|
|
20794
20788
|
return M(!0);
|
|
20795
20789
|
x(!0);
|
|
20796
20790
|
} else
|
|
20797
20791
|
M(!1);
|
|
20798
|
-
}, L = Number(w == null ? void 0 : w.maxNumberOfActiveBrands) - Number(w == null ? void 0 : w.numberOfActiveBrands) > 0 || !!(i != null && (n = i.settings) !== null && n !== void 0 && n.enableAutomaticAnalysis),
|
|
20792
|
+
}, L = Number(w == null ? void 0 : w.maxNumberOfActiveBrands) - Number(w == null ? void 0 : w.numberOfActiveBrands) > 0 || !!(i != null && (n = i.settings) !== null && n !== void 0 && n.enableAutomaticAnalysis), T = V0(i == null ? void 0 : i.firstNextAnalysisOpportunity), U = (i == null ? void 0 : i.setupStatus) === "pendingQuerySelection";
|
|
20799
20793
|
return /* @__PURE__ */ S(xe, { children: [
|
|
20800
20794
|
/* @__PURE__ */ S("div", { className: ne("yst-flex yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-4 yst-py-4 yst-text-slate-800", {
|
|
20801
20795
|
"yst-border-b-[1px] yst-border-b-slate-200": !s
|
|
@@ -20823,7 +20817,7 @@ var S4 = function(e) {
|
|
|
20823
20817
|
return x(!1);
|
|
20824
20818
|
}, position: "center", as: "div", className: ne({
|
|
20825
20819
|
"yst-mx-auto yst-max-w-xl": L
|
|
20826
|
-
}), children: L ? /* @__PURE__ */ f(Z.Panel, { children:
|
|
20820
|
+
}), children: L ? /* @__PURE__ */ f(Z.Panel, { children: T ? (
|
|
20827
20821
|
// 1. Show confirmation if analysis is scheduled soon
|
|
20828
20822
|
/* @__PURE__ */ S(xe, { children: [
|
|
20829
20823
|
/* @__PURE__ */ f(Z.Container.Header, { className: "yst-mb-3 yst-w-full", children: /* @__PURE__ */ f(Z.Title, { as: "h3", className: "yst-text-lg yst-font-medium", children: "Start brand analysis now?" }) }),
|
|
@@ -22325,13 +22319,13 @@ function Xl() {
|
|
|
22325
22319
|
function s(h, p, m, g) {
|
|
22326
22320
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
22327
22321
|
return kt(x, "_invoke", function(k, C, w) {
|
|
22328
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
22329
|
-
return O = E, b = 0, A = t,
|
|
22322
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
22323
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
22330
22324
|
} };
|
|
22331
22325
|
function U(_, E) {
|
|
22332
22326
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
22333
|
-
var R, N = D[e], z =
|
|
22334
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
22327
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
22328
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
22335
22329
|
}
|
|
22336
22330
|
if (R || _ > 1) return a;
|
|
22337
22331
|
throw L = !0, E;
|
|
@@ -22339,7 +22333,7 @@ function Xl() {
|
|
|
22339
22333
|
return function(_, E, R) {
|
|
22340
22334
|
if (M > 1) throw TypeError("Generator is already running");
|
|
22341
22335
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
22342
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
22336
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
22343
22337
|
try {
|
|
22344
22338
|
if (M = 2, O) {
|
|
22345
22339
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -22348,7 +22342,7 @@ function Xl() {
|
|
|
22348
22342
|
A = e.value, b < 2 && (b = 0);
|
|
22349
22343
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
22350
22344
|
O = t;
|
|
22351
|
-
} else if ((e = (L =
|
|
22345
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
22352
22346
|
} catch (N) {
|
|
22353
22347
|
O = t, b = 1, A = N;
|
|
22354
22348
|
} finally {
|
|
@@ -22516,7 +22510,7 @@ var z4 = function() {
|
|
|
22516
22510
|
d(!1);
|
|
22517
22511
|
}
|
|
22518
22512
|
}
|
|
22519
|
-
}), L = D.mutate,
|
|
22513
|
+
}), L = D.mutate, T = D.isPending, U = D.error, _ = Br({
|
|
22520
22514
|
query: {
|
|
22521
22515
|
enabled: !!a,
|
|
22522
22516
|
select: function(Q) {
|
|
@@ -22659,7 +22653,7 @@ var z4 = function() {
|
|
|
22659
22653
|
] }),
|
|
22660
22654
|
/* @__PURE__ */ f(zy, { onBack: function() {
|
|
22661
22655
|
return e(-1);
|
|
22662
|
-
}, buttonText: "Generate queries", isButtonDisabled:
|
|
22656
|
+
}, buttonText: "Generate queries", isButtonDisabled: T || !!a || c, isLoading: T || !!a })
|
|
22663
22657
|
] });
|
|
22664
22658
|
};
|
|
22665
22659
|
const Y4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -22731,13 +22725,13 @@ function Jl() {
|
|
|
22731
22725
|
function s(h, p, m, g) {
|
|
22732
22726
|
var v = p && p.prototype instanceof o ? p : o, x = Object.create(v.prototype);
|
|
22733
22727
|
return Tt(x, "_invoke", function(k, C, w) {
|
|
22734
|
-
var O, b, A, M = 0, D = w || [], L = !1,
|
|
22735
|
-
return O = E, b = 0, A = t,
|
|
22728
|
+
var O, b, A, M = 0, D = w || [], L = !1, T = { p: 0, n: 0, v: t, a: U, f: U.bind(t, 4), d: function(E, R) {
|
|
22729
|
+
return O = E, b = 0, A = t, T.n = R, a;
|
|
22736
22730
|
} };
|
|
22737
22731
|
function U(_, E) {
|
|
22738
22732
|
for (b = _, A = E, e = 0; !L && M && !R && e < D.length; e++) {
|
|
22739
|
-
var R, N = D[e], z =
|
|
22740
|
-
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0,
|
|
22733
|
+
var R, N = D[e], z = T.p, G = N[2];
|
|
22734
|
+
_ > 3 ? (R = G === E) && (A = N[(b = N[4]) ? 5 : (b = 3, 3)], N[4] = N[5] = t) : N[0] <= z && ((R = _ < 2 && z < N[1]) ? (b = 0, T.v = E, T.n = N[1]) : z < G && (R = _ < 3 || N[0] > E || E > G) && (N[4] = _, N[5] = E, T.n = G, b = 0));
|
|
22741
22735
|
}
|
|
22742
22736
|
if (R || _ > 1) return a;
|
|
22743
22737
|
throw L = !0, E;
|
|
@@ -22745,7 +22739,7 @@ function Jl() {
|
|
|
22745
22739
|
return function(_, E, R) {
|
|
22746
22740
|
if (M > 1) throw TypeError("Generator is already running");
|
|
22747
22741
|
for (L && E === 1 && U(E, R), b = E, A = R; (e = b < 2 ? t : A) || !L; ) {
|
|
22748
|
-
O || (b ? b < 3 ? (b > 1 && (
|
|
22742
|
+
O || (b ? b < 3 ? (b > 1 && (T.n = -1), U(b, A)) : T.n = A : T.v = A);
|
|
22749
22743
|
try {
|
|
22750
22744
|
if (M = 2, O) {
|
|
22751
22745
|
if (b || (_ = "next"), e = O[_]) {
|
|
@@ -22754,7 +22748,7 @@ function Jl() {
|
|
|
22754
22748
|
A = e.value, b < 2 && (b = 0);
|
|
22755
22749
|
} else b === 1 && (e = O.return) && e.call(O), b < 2 && (A = TypeError("The iterator does not provide a '" + _ + "' method"), b = 1);
|
|
22756
22750
|
O = t;
|
|
22757
|
-
} else if ((e = (L =
|
|
22751
|
+
} else if ((e = (L = T.n < 0) ? A : k.call(C, T)) !== a) break;
|
|
22758
22752
|
} catch (N) {
|
|
22759
22753
|
O = t, b = 1, A = N;
|
|
22760
22754
|
} finally {
|
|
@@ -22878,7 +22872,7 @@ var Qr = 5, Ki = "Generating...", s8 = "Re-generating...", a8 = 100, o8 = 800, l
|
|
|
22878
22872
|
isRegenerating: !0
|
|
22879
22873
|
};
|
|
22880
22874
|
}), c8 = function() {
|
|
22881
|
-
var e, n, r, i = Qa(), s = i.brandId, a = "/setup/".concat(s, "/analysis"), o = _t(), l = qt(), u = vu(), c = pi.useRef(!1), d = ee(u8), y = gn(d, 2), h = y[0], p = y[1], m = ee(!1), g = gn(m, 2), v = g[0], x = g[1], k = ee([]), C = gn(k, 2), w = C[0], O = C[1], b = ee([]), A = gn(b, 2), M = A[0], D = A[1], L = ee(!1),
|
|
22875
|
+
var e, n, r, i = Qa(), s = i.brandId, a = "/setup/".concat(s, "/analysis"), o = _t(), l = qt(), u = vu(), c = pi.useRef(!1), d = ee(u8), y = gn(d, 2), h = y[0], p = y[1], m = ee(!1), g = gn(m, 2), v = g[0], x = g[1], k = ee([]), C = gn(k, 2), w = C[0], O = C[1], b = ee([]), A = gn(b, 2), M = A[0], D = A[1], L = ee(!1), T = gn(L, 2), U = T[0], _ = T[1], E = ee(null), R = gn(E, 2), N = R[0], z = R[1], G = ee(!1), B = gn(G, 2), W = B[0], F = B[1], Q = ee(!1), H = gn(Q, 2), K = H[0], J = H[1], se = ee(null), le = gn(se, 2), pe = le[0], ue = le[1], Ce = Hv(s || "", {
|
|
22882
22876
|
query: {
|
|
22883
22877
|
enabled: !!s
|
|
22884
22878
|
}
|
|
@@ -23327,7 +23321,7 @@ function h8() {
|
|
|
23327
23321
|
}
|
|
23328
23322
|
}
|
|
23329
23323
|
}
|
|
23330
|
-
var w = l, O = u, b = o, A = a, M = e, D = c, L = r,
|
|
23324
|
+
var w = l, O = u, b = o, A = a, M = e, D = c, L = r, T = p, U = h, _ = n, E = s, R = i, N = d, z = !1;
|
|
23331
23325
|
function G(q) {
|
|
23332
23326
|
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), B(q) || C(q) === l;
|
|
23333
23327
|
}
|
|
@@ -23367,7 +23361,7 @@ function h8() {
|
|
|
23367
23361
|
function Ce(q) {
|
|
23368
23362
|
return C(q) === d;
|
|
23369
23363
|
}
|
|
23370
|
-
Ee.AsyncMode = w, Ee.ConcurrentMode = O, Ee.ContextConsumer = b, Ee.ContextProvider = A, Ee.Element = M, Ee.ForwardRef = D, Ee.Fragment = L, Ee.Lazy =
|
|
23364
|
+
Ee.AsyncMode = w, Ee.ConcurrentMode = O, Ee.ContextConsumer = b, Ee.ContextProvider = A, Ee.Element = M, Ee.ForwardRef = D, Ee.Fragment = L, Ee.Lazy = T, Ee.Memo = U, Ee.Portal = _, Ee.Profiler = E, Ee.StrictMode = R, Ee.Suspense = N, Ee.isAsyncMode = G, Ee.isConcurrentMode = B, Ee.isContextConsumer = W, Ee.isContextProvider = F, Ee.isElement = Q, Ee.isForwardRef = H, Ee.isFragment = K, Ee.isLazy = J, Ee.isMemo = se, Ee.isPortal = le, Ee.isProfiler = pe, Ee.isStrictMode = ue, Ee.isSuspense = Ce, Ee.isValidElementType = k, Ee.typeOf = C;
|
|
23371
23365
|
}()), Ee;
|
|
23372
23366
|
}
|
|
23373
23367
|
var nh;
|
|
@@ -23527,7 +23521,7 @@ function m8() {
|
|
|
23527
23521
|
objectOf: A,
|
|
23528
23522
|
oneOf: b,
|
|
23529
23523
|
oneOfType: M,
|
|
23530
|
-
shape:
|
|
23524
|
+
shape: T,
|
|
23531
23525
|
exact: U
|
|
23532
23526
|
};
|
|
23533
23527
|
function p(B, W) {
|
|
@@ -23694,7 +23688,7 @@ function m8() {
|
|
|
23694
23688
|
(B || "React class") + ": " + W + " type `" + F + "." + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + H + "`."
|
|
23695
23689
|
);
|
|
23696
23690
|
}
|
|
23697
|
-
function
|
|
23691
|
+
function T(B) {
|
|
23698
23692
|
function W(F, Q, H, K, J) {
|
|
23699
23693
|
var se = F[Q], le = R(se);
|
|
23700
23694
|
if (le !== "object")
|
|
@@ -24048,9 +24042,9 @@ var k8 = function(e) {
|
|
|
24048
24042
|
b && /* @__PURE__ */ S(xe, { children: [
|
|
24049
24043
|
/* @__PURE__ */ f(wi, {}),
|
|
24050
24044
|
/* @__PURE__ */ f("div", { className: "yst-space-y-8", children: m == null || (r = m.queries) === null || r === void 0 ? void 0 : r.map(function(A) {
|
|
24051
|
-
var M, D = A.id, L = A.query,
|
|
24045
|
+
var M, D = A.id, L = A.query, T = D && (v == null || (M = v.completedQueries) === null || M === void 0 ? void 0 : M.includes(D));
|
|
24052
24046
|
return /* @__PURE__ */ S("div", { className: ne("yst-flex yst-items-center yst-justify-between yst-gap-3"), children: [
|
|
24053
|
-
|
|
24047
|
+
T === !0 ? (
|
|
24054
24048
|
// found
|
|
24055
24049
|
/* @__PURE__ */ f(j0, { className: "yst-h-5 yst-w-5 yst-text-green-400" })
|
|
24056
24050
|
) : (
|