@clicktap/state 0.13.16 → 0.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +23 -23
- package/index.mjs +707 -600
- package/package.json +1 -1
- package/quote/QuoteProvider.d.ts +99 -12
- package/quote/actions/addItems.d.ts +4 -0
- package/quote/actions/index.d.ts +2 -0
- package/quote/actions/notifyUpdateItems.d.ts +6 -0
- package/quote/actions/refresh.d.ts +4 -0
- package/quote/actions/removeItems.d.ts +4 -0
- package/quote/actions/updateItems.d.ts +91 -0
- package/quote/actors/index.d.ts +1 -0
- package/quote/actors/updateItems.d.ts +23 -0
- package/quote/quote.d.ts +33 -4
- package/quote/types.d.ts +24 -2
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
1
|
+
import { jsx as ze } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as Je, useContext as Ye, useState as Mt, useEffect as qt, cloneElement as _n } from "react";
|
|
3
3
|
function In(e, t) {
|
|
4
4
|
for (var n = 0; n < t.length; n++) {
|
|
5
5
|
const s = t[n];
|
|
@@ -37,7 +37,7 @@ const xn = (e) => {
|
|
|
37
37
|
const t = An();
|
|
38
38
|
t && t.register(e);
|
|
39
39
|
};
|
|
40
|
-
class
|
|
40
|
+
class ut {
|
|
41
41
|
constructor(t) {
|
|
42
42
|
this._process = t, this._active = !1, this._current = null, this._last = null;
|
|
43
43
|
}
|
|
@@ -66,7 +66,7 @@ class at {
|
|
|
66
66
|
this._last = null;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
const Lt = ".", wn = "",
|
|
69
|
+
const Lt = ".", wn = "", Ut = "", bn = "#", On = "*", Pt = "xstate.init", Nn = "xstate.error", ce = "xstate.stop";
|
|
70
70
|
function kn(e, t) {
|
|
71
71
|
return {
|
|
72
72
|
type: `xstate.after.${e}.${t}`
|
|
@@ -90,7 +90,7 @@ function Ft(e, t) {
|
|
|
90
90
|
error: t
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Bt(e) {
|
|
94
94
|
return {
|
|
95
95
|
type: Pt,
|
|
96
96
|
input: e
|
|
@@ -102,7 +102,7 @@ function P(e) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
const Dn = (() => typeof Symbol == "function" && Symbol.observable || "@@observable")();
|
|
105
|
-
function
|
|
105
|
+
function dt(e, t) {
|
|
106
106
|
return `${e.sessionId}.${t}`;
|
|
107
107
|
}
|
|
108
108
|
let Rn = 0;
|
|
@@ -119,15 +119,15 @@ function Mn(e, t) {
|
|
|
119
119
|
delay: v,
|
|
120
120
|
id: S,
|
|
121
121
|
startedAt: Date.now()
|
|
122
|
-
},
|
|
123
|
-
d._snapshot._scheduledEvents[
|
|
124
|
-
const
|
|
125
|
-
delete o[
|
|
122
|
+
}, R = dt(f, S);
|
|
123
|
+
d._snapshot._scheduledEvents[R] = x;
|
|
124
|
+
const k = a.setTimeout(() => {
|
|
125
|
+
delete o[R], delete d._snapshot._scheduledEvents[R], d._relay(f, m, y);
|
|
126
126
|
}, v);
|
|
127
|
-
o[
|
|
127
|
+
o[R] = k;
|
|
128
128
|
},
|
|
129
129
|
cancel: (f, m) => {
|
|
130
|
-
const y =
|
|
130
|
+
const y = dt(f, m), v = o[y];
|
|
131
131
|
delete o[y], delete d._snapshot._scheduledEvents[y], a.clearTimeout(v);
|
|
132
132
|
},
|
|
133
133
|
cancelAll: (f) => {
|
|
@@ -192,9 +192,9 @@ function Mn(e, t) {
|
|
|
192
192
|
target: v,
|
|
193
193
|
event: S,
|
|
194
194
|
delay: x,
|
|
195
|
-
id:
|
|
195
|
+
id: R
|
|
196
196
|
} = f[m];
|
|
197
|
-
u.schedule(y, v, S, x,
|
|
197
|
+
u.schedule(y, v, S, x, R);
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
200
|
_clock: a,
|
|
@@ -202,12 +202,12 @@ function Mn(e, t) {
|
|
|
202
202
|
};
|
|
203
203
|
return d;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
const n =
|
|
207
|
-
return typeof s == "string" ? typeof n == "string" ? s === n : !1 : typeof n == "string" ? n in s : Object.keys(n).every((r) => r in s ?
|
|
205
|
+
function jt(e, t) {
|
|
206
|
+
const n = lt(e), s = lt(t);
|
|
207
|
+
return typeof s == "string" ? typeof n == "string" ? s === n : !1 : typeof n == "string" ? n in s : Object.keys(n).every((r) => r in s ? jt(n[r], s[r]) : !1);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (
|
|
209
|
+
function Xe(e) {
|
|
210
|
+
if (Vt(e))
|
|
211
211
|
return e;
|
|
212
212
|
let t = [], n = "";
|
|
213
213
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -223,15 +223,15 @@ function Ye(e) {
|
|
|
223
223
|
}
|
|
224
224
|
return t.push(n), t;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function lt(e) {
|
|
227
227
|
if (ls(e))
|
|
228
228
|
return e.value;
|
|
229
229
|
if (typeof e != "string")
|
|
230
230
|
return e;
|
|
231
|
-
const t =
|
|
232
|
-
return
|
|
231
|
+
const t = Xe(e);
|
|
232
|
+
return qn(t);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function qn(e) {
|
|
235
235
|
if (e.length === 1)
|
|
236
236
|
return e[0];
|
|
237
237
|
const t = {};
|
|
@@ -245,7 +245,7 @@ function Ln(e) {
|
|
|
245
245
|
}
|
|
246
246
|
return t;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function ht(e, t) {
|
|
249
249
|
const n = {}, s = Object.keys(e);
|
|
250
250
|
for (let r = 0; r < s.length; r++) {
|
|
251
251
|
const i = s[r];
|
|
@@ -253,11 +253,11 @@ function dt(e, t) {
|
|
|
253
253
|
}
|
|
254
254
|
return n;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
return
|
|
256
|
+
function $t(e) {
|
|
257
|
+
return Vt(e) ? e : [e];
|
|
258
258
|
}
|
|
259
259
|
function F(e) {
|
|
260
|
-
return e === void 0 ? [] :
|
|
260
|
+
return e === void 0 ? [] : $t(e);
|
|
261
261
|
}
|
|
262
262
|
function Fe(e, t, n, s) {
|
|
263
263
|
return typeof e == "function" ? e({
|
|
@@ -266,22 +266,22 @@ function Fe(e, t, n, s) {
|
|
|
266
266
|
self: s
|
|
267
267
|
}) : e;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Vt(e) {
|
|
270
270
|
return Array.isArray(e);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Ln(e) {
|
|
273
273
|
return e.type.startsWith("xstate.error.actor");
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
return
|
|
275
|
+
function W(e) {
|
|
276
|
+
return $t(e).map((t) => typeof t > "u" || typeof t == "string" ? {
|
|
277
277
|
target: t
|
|
278
278
|
} : t);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Ht(e) {
|
|
281
281
|
if (!(e === void 0 || e === wn))
|
|
282
282
|
return F(e);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function ft(e, t, n) {
|
|
285
285
|
var i, o, a;
|
|
286
286
|
const s = typeof e == "object", r = s ? e : void 0;
|
|
287
287
|
return {
|
|
@@ -290,21 +290,21 @@ function lt(e, t, n) {
|
|
|
290
290
|
complete: (a = s ? e.complete : n) == null ? void 0 : a.bind(r)
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function pt(e, t) {
|
|
294
294
|
return `${t}.${e}`;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Qe(e, t) {
|
|
297
297
|
const n = t.match(/^xstate\.invoke\.(\d+)\.(.*)/);
|
|
298
298
|
if (!n)
|
|
299
299
|
return e.implementations.actors[t];
|
|
300
300
|
const [, s, r] = n, o = e.getStateNodeById(r).config.invoke;
|
|
301
301
|
return (Array.isArray(o) ? o[s] : o).src;
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
let
|
|
303
|
+
const We = 1;
|
|
304
|
+
let C = /* @__PURE__ */ function(e) {
|
|
305
305
|
return e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped", e;
|
|
306
306
|
}({});
|
|
307
|
-
const
|
|
307
|
+
const Un = {
|
|
308
308
|
clock: {
|
|
309
309
|
setTimeout: (e, t) => setTimeout(e, t),
|
|
310
310
|
clearTimeout: (e) => clearTimeout(e)
|
|
@@ -312,7 +312,7 @@ const Pn = {
|
|
|
312
312
|
logger: console.log.bind(console),
|
|
313
313
|
devTools: !1
|
|
314
314
|
};
|
|
315
|
-
class
|
|
315
|
+
class Pn {
|
|
316
316
|
/**
|
|
317
317
|
* Creates a new actor instance for the given logic with the provided options, if any.
|
|
318
318
|
*
|
|
@@ -320,9 +320,9 @@ class Fn {
|
|
|
320
320
|
* @param options Actor options
|
|
321
321
|
*/
|
|
322
322
|
constructor(t, n) {
|
|
323
|
-
this.logic = t, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new
|
|
323
|
+
this.logic = t, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new ut(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = C.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this._systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
|
|
324
324
|
const s = {
|
|
325
|
-
...
|
|
325
|
+
...Un,
|
|
326
326
|
...n
|
|
327
327
|
}, {
|
|
328
328
|
clock: r,
|
|
@@ -336,7 +336,7 @@ class Fn {
|
|
|
336
336
|
this.system = o ? o.system : Mn(this, {
|
|
337
337
|
clock: r,
|
|
338
338
|
logger: i
|
|
339
|
-
}), h && !o && this.system.inspect(
|
|
339
|
+
}), h && !o && this.system.inspect(ft(h)), this.sessionId = this.system._bookId(), this.id = c ?? this.sessionId, this.logger = (n == null ? void 0 : n.logger) ?? this.system._logger, this.clock = (n == null ? void 0 : n.clock) ?? this.system._clock, this._parent = o, this._syncSnapshot = a, this.options = s, this.src = s.src ?? t, this.ref = this, this._actorScope = {
|
|
340
340
|
self: this,
|
|
341
341
|
id: this.id,
|
|
342
342
|
sessionId: this.sessionId,
|
|
@@ -466,8 +466,8 @@ class Fn {
|
|
|
466
466
|
*/
|
|
467
467
|
subscribe(t, n, s) {
|
|
468
468
|
var i;
|
|
469
|
-
const r =
|
|
470
|
-
if (this._processingStatus !==
|
|
469
|
+
const r = ft(t, n, s);
|
|
470
|
+
if (this._processingStatus !== C.Stopped)
|
|
471
471
|
this.observers.add(r);
|
|
472
472
|
else
|
|
473
473
|
switch (this._snapshot.status) {
|
|
@@ -511,7 +511,7 @@ class Fn {
|
|
|
511
511
|
* Starts the Actor from the initial state
|
|
512
512
|
*/
|
|
513
513
|
start() {
|
|
514
|
-
if (this._processingStatus ===
|
|
514
|
+
if (this._processingStatus === C.Running)
|
|
515
515
|
return this;
|
|
516
516
|
this._syncSnapshot && this.subscribe({
|
|
517
517
|
next: (s) => {
|
|
@@ -522,8 +522,8 @@ class Fn {
|
|
|
522
522
|
},
|
|
523
523
|
error: () => {
|
|
524
524
|
}
|
|
525
|
-
}), this.system._register(this.sessionId, this), this._systemId && this.system._set(this._systemId, this), this._processingStatus =
|
|
526
|
-
const t =
|
|
525
|
+
}), this.system._register(this.sessionId, this), this._systemId && this.system._set(this._systemId, this), this._processingStatus = C.Running;
|
|
526
|
+
const t = Bt(this.options.input);
|
|
527
527
|
switch (this.system._sendInspectionEvent({
|
|
528
528
|
type: "@xstate.event",
|
|
529
529
|
sourceRef: this._parent,
|
|
@@ -567,11 +567,11 @@ class Fn {
|
|
|
567
567
|
}, this._error(r);
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
|
-
this.update(n, t), t.type ===
|
|
570
|
+
this.update(n, t), t.type === ce && (this._stopProcedure(), this._complete());
|
|
571
571
|
}
|
|
572
572
|
_stop() {
|
|
573
|
-
return this._processingStatus ===
|
|
574
|
-
type:
|
|
573
|
+
return this._processingStatus === C.Stopped ? this : (this.mailbox.clear(), this._processingStatus === C.NotStarted ? (this._processingStatus = C.Stopped, this) : (this.mailbox.enqueue({
|
|
574
|
+
type: ce
|
|
575
575
|
}), this));
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
@@ -618,13 +618,13 @@ class Fn {
|
|
|
618
618
|
// right now, they are being stopped within the machine's transition
|
|
619
619
|
// but that could throw and leave us with "orphaned" active actors
|
|
620
620
|
_stopProcedure() {
|
|
621
|
-
return this._processingStatus !==
|
|
621
|
+
return this._processingStatus !== C.Running ? this : (this.system.scheduler.cancelAll(this), this.mailbox.clear(), this.mailbox = new ut(this._process.bind(this)), this._processingStatus = C.Stopped, this.system._unregister(this), this);
|
|
622
622
|
}
|
|
623
623
|
/**
|
|
624
624
|
* @internal
|
|
625
625
|
*/
|
|
626
626
|
_send(t) {
|
|
627
|
-
this._processingStatus !==
|
|
627
|
+
this._processingStatus !== C.Stopped && this.mailbox.enqueue(t);
|
|
628
628
|
}
|
|
629
629
|
/**
|
|
630
630
|
* Sends an event to the running Actor to trigger a transition.
|
|
@@ -642,7 +642,7 @@ class Fn {
|
|
|
642
642
|
}
|
|
643
643
|
toJSON() {
|
|
644
644
|
return {
|
|
645
|
-
xstate$$type:
|
|
645
|
+
xstate$$type: We,
|
|
646
646
|
id: this.id
|
|
647
647
|
};
|
|
648
648
|
}
|
|
@@ -682,10 +682,10 @@ class Fn {
|
|
|
682
682
|
return this._snapshot;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return new
|
|
685
|
+
function B(e, ...[t]) {
|
|
686
|
+
return new Pn(e, t);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Fn(e, t, n, s, {
|
|
689
689
|
sendId: r
|
|
690
690
|
}) {
|
|
691
691
|
const i = typeof r == "function" ? r(n, s) : r;
|
|
@@ -699,7 +699,7 @@ function Bn(e, t) {
|
|
|
699
699
|
function jn(e) {
|
|
700
700
|
function t(n, s) {
|
|
701
701
|
}
|
|
702
|
-
return t.type = "xstate.cancel", t.sendId = e, t.resolve =
|
|
702
|
+
return t.type = "xstate.cancel", t.sendId = e, t.resolve = Fn, t.execute = Bn, t;
|
|
703
703
|
}
|
|
704
704
|
function $n(e, t, n, s, {
|
|
705
705
|
id: r,
|
|
@@ -708,9 +708,9 @@ function $n(e, t, n, s, {
|
|
|
708
708
|
input: a,
|
|
709
709
|
syncSnapshot: c
|
|
710
710
|
}) {
|
|
711
|
-
const u = typeof o == "string" ?
|
|
711
|
+
const u = typeof o == "string" ? Qe(t.machine, o) : o, h = typeof r == "function" ? r(n) : r;
|
|
712
712
|
let d;
|
|
713
|
-
return u && (d =
|
|
713
|
+
return u && (d = B(u, {
|
|
714
714
|
id: h,
|
|
715
715
|
src: o,
|
|
716
716
|
parent: e.self,
|
|
@@ -721,7 +721,7 @@ function $n(e, t, n, s, {
|
|
|
721
721
|
event: n.event,
|
|
722
722
|
self: e.self
|
|
723
723
|
}) : a
|
|
724
|
-
})), [
|
|
724
|
+
})), [J(t, {
|
|
725
725
|
children: {
|
|
726
726
|
...t.children,
|
|
727
727
|
[h]: d
|
|
@@ -736,7 +736,7 @@ function Vn(e, {
|
|
|
736
736
|
actorRef: n
|
|
737
737
|
}) {
|
|
738
738
|
n && e.defer(() => {
|
|
739
|
-
n._processingStatus !==
|
|
739
|
+
n._processingStatus !== C.Stopped && n.start();
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
742
|
function Hn(...[e, {
|
|
@@ -756,13 +756,13 @@ function Gn(e, t, n, s, {
|
|
|
756
756
|
let a = t.children;
|
|
757
757
|
return o && (a = {
|
|
758
758
|
...a
|
|
759
|
-
}, delete a[o.id]), [
|
|
759
|
+
}, delete a[o.id]), [J(t, {
|
|
760
760
|
children: a
|
|
761
761
|
}), o];
|
|
762
762
|
}
|
|
763
763
|
function zn(e, t) {
|
|
764
764
|
if (t) {
|
|
765
|
-
if (e.system._unregister(t), t._processingStatus !==
|
|
765
|
+
if (e.system._unregister(t), t._processingStatus !== C.Running) {
|
|
766
766
|
e.stopChild(t);
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
@@ -771,19 +771,19 @@ function zn(e, t) {
|
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Gt(e) {
|
|
775
775
|
function t(n, s) {
|
|
776
776
|
}
|
|
777
777
|
return t.type = "xstate.stopChild", t.actorRef = e, t.resolve = Gn, t.execute = zn, t;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function Ke(e, t, n, s) {
|
|
780
780
|
const {
|
|
781
781
|
machine: r
|
|
782
782
|
} = s, i = typeof e == "function", o = i ? e : r.implementations.guards[typeof e == "string" ? e : e.type];
|
|
783
783
|
if (!i && !o)
|
|
784
784
|
throw new Error(`Guard '${typeof e == "string" ? e : e.type}' is not implemented.'.`);
|
|
785
785
|
if (typeof o != "function")
|
|
786
|
-
return
|
|
786
|
+
return Ke(o, t, n, s);
|
|
787
787
|
const a = {
|
|
788
788
|
context: t,
|
|
789
789
|
event: n
|
|
@@ -798,11 +798,11 @@ function We(e, t, n, s) {
|
|
|
798
798
|
// this holds all params
|
|
799
799
|
) : o(a, c);
|
|
800
800
|
}
|
|
801
|
-
const
|
|
802
|
-
function
|
|
801
|
+
const Ze = (e) => e.type === "atomic" || e.type === "final";
|
|
802
|
+
function ee(e) {
|
|
803
803
|
return Object.values(e.states).filter((t) => t.type !== "history");
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function de(e, t) {
|
|
806
806
|
const n = [];
|
|
807
807
|
if (t === e)
|
|
808
808
|
return n;
|
|
@@ -812,14 +812,14 @@ function ue(e, t) {
|
|
|
812
812
|
return n;
|
|
813
813
|
}
|
|
814
814
|
function ve(e) {
|
|
815
|
-
const t = new Set(e), n =
|
|
815
|
+
const t = new Set(e), n = Jt(t);
|
|
816
816
|
for (const s of t)
|
|
817
817
|
if (s.type === "compound" && (!n.get(s) || !n.get(s).length))
|
|
818
|
-
|
|
818
|
+
yt(s).forEach((r) => t.add(r));
|
|
819
819
|
else if (s.type === "parallel") {
|
|
820
|
-
for (const r of
|
|
820
|
+
for (const r of ee(s))
|
|
821
821
|
if (r.type !== "history" && !t.has(r)) {
|
|
822
|
-
const i =
|
|
822
|
+
const i = yt(r);
|
|
823
823
|
for (const o of i)
|
|
824
824
|
t.add(o);
|
|
825
825
|
}
|
|
@@ -831,35 +831,35 @@ function ve(e) {
|
|
|
831
831
|
}
|
|
832
832
|
return t;
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function zt(e, t) {
|
|
835
835
|
const n = t.get(e);
|
|
836
836
|
if (!n)
|
|
837
837
|
return {};
|
|
838
838
|
if (e.type === "compound") {
|
|
839
839
|
const r = n[0];
|
|
840
840
|
if (r) {
|
|
841
|
-
if (
|
|
841
|
+
if (Ze(r))
|
|
842
842
|
return r.key;
|
|
843
843
|
} else
|
|
844
844
|
return {};
|
|
845
845
|
}
|
|
846
846
|
const s = {};
|
|
847
847
|
for (const r of n)
|
|
848
|
-
s[r.key] =
|
|
848
|
+
s[r.key] = zt(r, t);
|
|
849
849
|
return s;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Jt(e) {
|
|
852
852
|
const t = /* @__PURE__ */ new Map();
|
|
853
853
|
for (const n of e)
|
|
854
854
|
t.has(n) || t.set(n, []), n.parent && (t.has(n.parent) || t.set(n.parent, []), t.get(n.parent).push(n));
|
|
855
855
|
return t;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function Yt(e, t) {
|
|
858
858
|
const n = ve(t);
|
|
859
|
-
return
|
|
859
|
+
return zt(e, Jt(n));
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
return t.type === "compound" ?
|
|
861
|
+
function et(e, t) {
|
|
862
|
+
return t.type === "compound" ? ee(t).some((n) => n.type === "final" && e.has(n)) : t.type === "parallel" ? ee(t).every((n) => et(e, n)) : t.type === "final";
|
|
863
863
|
}
|
|
864
864
|
const Se = (e) => e[0] === bn;
|
|
865
865
|
function Jn(e, t) {
|
|
@@ -904,13 +904,13 @@ function Yn(e) {
|
|
|
904
904
|
delay: i
|
|
905
905
|
} = r;
|
|
906
906
|
return {
|
|
907
|
-
|
|
907
|
+
...H(e, r.event, r),
|
|
908
908
|
delay: i
|
|
909
909
|
};
|
|
910
910
|
});
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
const s =
|
|
912
|
+
function H(e, t, n) {
|
|
913
|
+
const s = Ht(n.target), r = n.reenter ?? !1, i = Wn(e, s), o = {
|
|
914
914
|
...n,
|
|
915
915
|
actions: F(n.actions),
|
|
916
916
|
guard: n.guard,
|
|
@@ -930,27 +930,27 @@ function Xn(e) {
|
|
|
930
930
|
const t = /* @__PURE__ */ new Map();
|
|
931
931
|
if (e.config.on)
|
|
932
932
|
for (const n of Object.keys(e.config.on)) {
|
|
933
|
-
if (n ===
|
|
933
|
+
if (n === Ut)
|
|
934
934
|
throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');
|
|
935
935
|
const s = e.config.on[n];
|
|
936
|
-
t.set(n,
|
|
936
|
+
t.set(n, W(s).map((r) => H(e, n, r)));
|
|
937
937
|
}
|
|
938
938
|
if (e.config.onDone) {
|
|
939
939
|
const n = `xstate.done.state.${e.id}`;
|
|
940
|
-
t.set(n,
|
|
940
|
+
t.set(n, W(e.config.onDone).map((s) => H(e, n, s)));
|
|
941
941
|
}
|
|
942
942
|
for (const n of e.invoke) {
|
|
943
943
|
if (n.onDone) {
|
|
944
944
|
const s = `xstate.done.actor.${n.id}`;
|
|
945
|
-
t.set(s,
|
|
945
|
+
t.set(s, W(n.onDone).map((r) => H(e, s, r)));
|
|
946
946
|
}
|
|
947
947
|
if (n.onError) {
|
|
948
948
|
const s = `xstate.error.actor.${n.id}`;
|
|
949
|
-
t.set(s,
|
|
949
|
+
t.set(s, W(n.onError).map((r) => H(e, s, r)));
|
|
950
950
|
}
|
|
951
951
|
if (n.onSnapshot) {
|
|
952
952
|
const s = `xstate.snapshot.${n.id}`;
|
|
953
|
-
t.set(s,
|
|
953
|
+
t.set(s, W(n.onSnapshot).map((r) => H(e, s, r)));
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
956
|
for (const n of e.after) {
|
|
@@ -999,36 +999,36 @@ ${i.message}`);
|
|
|
999
999
|
throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1003
|
-
const t =
|
|
1002
|
+
function Xt(e) {
|
|
1003
|
+
const t = Ht(e.config.target);
|
|
1004
1004
|
return t ? {
|
|
1005
1005
|
target: t.map((n) => typeof n == "string" ? Te(e.parent, n) : n)
|
|
1006
1006
|
} : e.parent.initial;
|
|
1007
1007
|
}
|
|
1008
|
-
function
|
|
1008
|
+
function G(e) {
|
|
1009
1009
|
return e.type === "history";
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
const t =
|
|
1011
|
+
function yt(e) {
|
|
1012
|
+
const t = Qt(e);
|
|
1013
1013
|
for (const n of t)
|
|
1014
|
-
for (const s of
|
|
1014
|
+
for (const s of de(n, e))
|
|
1015
1015
|
t.add(s);
|
|
1016
1016
|
return t;
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function Qt(e) {
|
|
1019
1019
|
const t = /* @__PURE__ */ new Set();
|
|
1020
1020
|
function n(s) {
|
|
1021
1021
|
if (!t.has(s)) {
|
|
1022
1022
|
if (t.add(s), s.type === "compound")
|
|
1023
1023
|
n(s.initial.target[0]);
|
|
1024
1024
|
else if (s.type === "parallel")
|
|
1025
|
-
for (const r of
|
|
1025
|
+
for (const r of ee(s))
|
|
1026
1026
|
n(r);
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
1029
1029
|
return n(e), t;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function te(e, t) {
|
|
1032
1032
|
if (Se(t))
|
|
1033
1033
|
return e.machine.getStateNodeById(t);
|
|
1034
1034
|
if (!e.states)
|
|
@@ -1044,13 +1044,13 @@ function Te(e, t) {
|
|
|
1044
1044
|
return e.machine.getStateNodeById(t);
|
|
1045
1045
|
} catch {
|
|
1046
1046
|
}
|
|
1047
|
-
const n =
|
|
1047
|
+
const n = Xe(t).slice();
|
|
1048
1048
|
let s = e;
|
|
1049
1049
|
for (; n.length; ) {
|
|
1050
1050
|
const r = n.shift();
|
|
1051
1051
|
if (!r.length)
|
|
1052
1052
|
break;
|
|
1053
|
-
s =
|
|
1053
|
+
s = te(s, r);
|
|
1054
1054
|
}
|
|
1055
1055
|
return s;
|
|
1056
1056
|
}
|
|
@@ -1061,9 +1061,9 @@ function _e(e, t) {
|
|
|
1061
1061
|
throw new Error(`State '${t}' does not exist on '${e.id}'`);
|
|
1062
1062
|
return [e, r];
|
|
1063
1063
|
}
|
|
1064
|
-
const n = Object.keys(t), s = n.map((r) =>
|
|
1064
|
+
const n = Object.keys(t), s = n.map((r) => te(e, r)).filter(Boolean);
|
|
1065
1065
|
return [e.machine.root, e].concat(s, n.reduce((r, i) => {
|
|
1066
|
-
const o =
|
|
1066
|
+
const o = te(e, i);
|
|
1067
1067
|
if (!o)
|
|
1068
1068
|
return r;
|
|
1069
1069
|
const a = _e(o, t[i]);
|
|
@@ -1071,11 +1071,11 @@ function _e(e, t) {
|
|
|
1071
1071
|
}, []));
|
|
1072
1072
|
}
|
|
1073
1073
|
function Kn(e, t, n, s) {
|
|
1074
|
-
const i =
|
|
1074
|
+
const i = te(e, t).next(n, s);
|
|
1075
1075
|
return !i || !i.length ? e.next(n, s) : i;
|
|
1076
1076
|
}
|
|
1077
1077
|
function Zn(e, t, n, s) {
|
|
1078
|
-
const r = Object.keys(t), i =
|
|
1078
|
+
const r = Object.keys(t), i = te(e, r[0]), o = tt(i, t[r[0]], n, s);
|
|
1079
1079
|
return !o || !o.length ? e.next(n, s) : o;
|
|
1080
1080
|
}
|
|
1081
1081
|
function es(e, t, n, s) {
|
|
@@ -1084,18 +1084,18 @@ function es(e, t, n, s) {
|
|
|
1084
1084
|
const o = t[i];
|
|
1085
1085
|
if (!o)
|
|
1086
1086
|
continue;
|
|
1087
|
-
const a =
|
|
1087
|
+
const a = te(e, i), c = tt(a, o, n, s);
|
|
1088
1088
|
c && r.push(...c);
|
|
1089
1089
|
}
|
|
1090
1090
|
return r.length ? r : e.next(n, s);
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function tt(e, t, n, s) {
|
|
1093
1093
|
return typeof t == "string" ? Kn(e, t, n, s) : Object.keys(t).length === 1 ? Zn(e, t, n, s) : es(e, t, n, s);
|
|
1094
1094
|
}
|
|
1095
1095
|
function ts(e) {
|
|
1096
1096
|
return Object.keys(e.states).map((t) => e.states[t]).filter((t) => t.type === "history");
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function j(e, t) {
|
|
1099
1099
|
let n = e;
|
|
1100
1100
|
for (; n.parent && n.parent !== t; )
|
|
1101
1101
|
n = n.parent;
|
|
@@ -1111,14 +1111,14 @@ function ns(e, t) {
|
|
|
1111
1111
|
return !0;
|
|
1112
1112
|
return !1;
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1114
|
+
function Wt(e, t, n) {
|
|
1115
1115
|
const s = /* @__PURE__ */ new Set();
|
|
1116
1116
|
for (const r of e) {
|
|
1117
1117
|
let i = !1;
|
|
1118
1118
|
const o = /* @__PURE__ */ new Set();
|
|
1119
1119
|
for (const a of s)
|
|
1120
|
-
if (ns(
|
|
1121
|
-
if (
|
|
1120
|
+
if (ns(Be([r], t, n), Be([a], t, n)))
|
|
1121
|
+
if (j(r.source, a.source))
|
|
1122
1122
|
o.add(a);
|
|
1123
1123
|
else {
|
|
1124
1124
|
i = !0;
|
|
@@ -1134,31 +1134,31 @@ function Qt(e, t, n) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
function ss(e) {
|
|
1136
1136
|
const [t, ...n] = e;
|
|
1137
|
-
for (const s of
|
|
1138
|
-
if (n.every((r) =>
|
|
1137
|
+
for (const s of de(t, void 0))
|
|
1138
|
+
if (n.every((r) => j(r, s)))
|
|
1139
1139
|
return s;
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function nt(e, t) {
|
|
1142
1142
|
if (!e.target)
|
|
1143
1143
|
return [];
|
|
1144
1144
|
const n = /* @__PURE__ */ new Set();
|
|
1145
1145
|
for (const s of e.target)
|
|
1146
|
-
if (
|
|
1146
|
+
if (G(s))
|
|
1147
1147
|
if (t[s.id])
|
|
1148
1148
|
for (const r of t[s.id])
|
|
1149
1149
|
n.add(r);
|
|
1150
1150
|
else
|
|
1151
|
-
for (const r of
|
|
1151
|
+
for (const r of nt(Xt(s), t))
|
|
1152
1152
|
n.add(r);
|
|
1153
1153
|
else
|
|
1154
1154
|
n.add(s);
|
|
1155
1155
|
return [...n];
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
const n =
|
|
1157
|
+
function Kt(e, t) {
|
|
1158
|
+
const n = nt(e, t);
|
|
1159
1159
|
if (!n)
|
|
1160
1160
|
return;
|
|
1161
|
-
if (!e.reenter && n.every((r) => r === e.source ||
|
|
1161
|
+
if (!e.reenter && n.every((r) => r === e.source || j(r, e.source)))
|
|
1162
1162
|
return e.source;
|
|
1163
1163
|
const s = ss(n.concat(e.source));
|
|
1164
1164
|
if (s)
|
|
@@ -1166,15 +1166,15 @@ function Wt(e, t) {
|
|
|
1166
1166
|
if (!e.reenter)
|
|
1167
1167
|
return e.source.machine.root;
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function Be(e, t, n) {
|
|
1170
1170
|
var r;
|
|
1171
1171
|
const s = /* @__PURE__ */ new Set();
|
|
1172
1172
|
for (const i of e)
|
|
1173
1173
|
if ((r = i.target) != null && r.length) {
|
|
1174
|
-
const o =
|
|
1174
|
+
const o = Kt(i, n);
|
|
1175
1175
|
i.reenter && i.source === o && s.add(o);
|
|
1176
1176
|
for (const a of t)
|
|
1177
|
-
|
|
1177
|
+
j(a, o) && s.add(a);
|
|
1178
1178
|
}
|
|
1179
1179
|
return [...s];
|
|
1180
1180
|
}
|
|
@@ -1186,18 +1186,18 @@ function rs(e, t) {
|
|
|
1186
1186
|
return !1;
|
|
1187
1187
|
return !0;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function je(e, t, n, s, r, i) {
|
|
1190
1190
|
if (!e.length)
|
|
1191
1191
|
return t;
|
|
1192
1192
|
const o = new Set(t._nodes);
|
|
1193
1193
|
let a = t.historyValue;
|
|
1194
|
-
const c =
|
|
1194
|
+
const c = Wt(e, o, a);
|
|
1195
1195
|
let u = t;
|
|
1196
|
-
r || ([u, a] = cs(u, s, n, c, o, a, i)), u =
|
|
1196
|
+
r || ([u, a] = cs(u, s, n, c, o, a, i)), u = ne(u, s, n, c.flatMap((d) => d.actions), i), u = os(u, s, n, c, o, i, a, r);
|
|
1197
1197
|
const h = [...o];
|
|
1198
|
-
u.status === "done" && (u =
|
|
1198
|
+
u.status === "done" && (u = ne(u, s, n, h.sort((d, f) => f.order - d.order).flatMap((d) => d.exit), i));
|
|
1199
1199
|
try {
|
|
1200
|
-
return a === t.historyValue && rs(t._nodes, o) ? u :
|
|
1200
|
+
return a === t.historyValue && rs(t._nodes, o) ? u : J(u, {
|
|
1201
1201
|
_nodes: h,
|
|
1202
1202
|
historyValue: a
|
|
1203
1203
|
});
|
|
@@ -1229,14 +1229,14 @@ function os(e, t, n, s, r, i, o, a) {
|
|
|
1229
1229
|
const y = f.initial.actions;
|
|
1230
1230
|
m.push(...y);
|
|
1231
1231
|
}
|
|
1232
|
-
if (c =
|
|
1232
|
+
if (c = ne(c, t, n, m, i, f.invoke.map((y) => y.id)), f.type === "final") {
|
|
1233
1233
|
const y = f.parent;
|
|
1234
1234
|
let v = (y == null ? void 0 : y.type) === "parallel" ? y : y == null ? void 0 : y.parent, S = v || f;
|
|
1235
|
-
for ((y == null ? void 0 : y.type) === "compound" && i.push(Pe(y.id, f.output !== void 0 ? Fe(f.output, c.context, t, n.self) : void 0)); (v == null ? void 0 : v.type) === "parallel" && !d.has(v) &&
|
|
1235
|
+
for ((y == null ? void 0 : y.type) === "compound" && i.push(Pe(y.id, f.output !== void 0 ? Fe(f.output, c.context, t, n.self) : void 0)); (v == null ? void 0 : v.type) === "parallel" && !d.has(v) && et(r, v); )
|
|
1236
1236
|
d.add(v), i.push(Pe(v.id)), S = v, v = v.parent;
|
|
1237
1237
|
if (v)
|
|
1238
1238
|
continue;
|
|
1239
|
-
c =
|
|
1239
|
+
c = J(c, {
|
|
1240
1240
|
status: "done",
|
|
1241
1241
|
output: is(c, t, n, c.machine.root, S)
|
|
1242
1242
|
});
|
|
@@ -1246,70 +1246,70 @@ function os(e, t, n, s, r, i, o, a) {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
function as(e, t, n, s) {
|
|
1248
1248
|
for (const r of e) {
|
|
1249
|
-
const i =
|
|
1249
|
+
const i = Kt(r, t);
|
|
1250
1250
|
for (const a of r.target || [])
|
|
1251
|
-
!
|
|
1251
|
+
!G(a) && // if the target is different than the source then it will *definitely* be entered
|
|
1252
1252
|
(r.source !== a || // we know that the domain can't lie within the source
|
|
1253
1253
|
// if it's different than the source then it's outside of it and it means that the target has to be entered as well
|
|
1254
1254
|
r.source !== i || // reentering transitions always enter the target, even if it's the source itself
|
|
1255
|
-
r.reenter) && (s.add(a), n.add(a)),
|
|
1256
|
-
const o =
|
|
1255
|
+
r.reenter) && (s.add(a), n.add(a)), K(a, t, n, s);
|
|
1256
|
+
const o = nt(r, t);
|
|
1257
1257
|
for (const a of o) {
|
|
1258
|
-
const c =
|
|
1259
|
-
(i == null ? void 0 : i.type) === "parallel" && c.push(i),
|
|
1258
|
+
const c = de(a, i);
|
|
1259
|
+
(i == null ? void 0 : i.type) === "parallel" && c.push(i), Zt(s, t, n, c, !r.source.parent && r.reenter ? void 0 : i);
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function K(e, t, n, s) {
|
|
1264
1264
|
var r;
|
|
1265
|
-
if (
|
|
1265
|
+
if (G(e))
|
|
1266
1266
|
if (t[e.id]) {
|
|
1267
1267
|
const i = t[e.id];
|
|
1268
1268
|
for (const o of i)
|
|
1269
|
-
s.add(o),
|
|
1269
|
+
s.add(o), K(o, t, n, s);
|
|
1270
1270
|
for (const o of i)
|
|
1271
1271
|
Ne(o, e.parent, s, t, n);
|
|
1272
1272
|
} else {
|
|
1273
|
-
const i =
|
|
1273
|
+
const i = Xt(e);
|
|
1274
1274
|
for (const o of i.target)
|
|
1275
|
-
s.add(o), i === ((r = e.parent) == null ? void 0 : r.initial) && n.add(e.parent),
|
|
1275
|
+
s.add(o), i === ((r = e.parent) == null ? void 0 : r.initial) && n.add(e.parent), K(o, t, n, s);
|
|
1276
1276
|
for (const o of i.target)
|
|
1277
1277
|
Ne(o, e.parent, s, t, n);
|
|
1278
1278
|
}
|
|
1279
1279
|
else if (e.type === "compound") {
|
|
1280
1280
|
const [i] = e.initial.target;
|
|
1281
|
-
|
|
1281
|
+
G(i) || (s.add(i), n.add(i)), K(i, t, n, s), Ne(i, e, s, t, n);
|
|
1282
1282
|
} else if (e.type === "parallel")
|
|
1283
|
-
for (const i of
|
|
1284
|
-
[...s].some((o) =>
|
|
1283
|
+
for (const i of ee(e).filter((o) => !G(o)))
|
|
1284
|
+
[...s].some((o) => j(o, i)) || (G(i) || (s.add(i), n.add(i)), K(i, t, n, s));
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function Zt(e, t, n, s, r) {
|
|
1287
1287
|
for (const i of s)
|
|
1288
|
-
if ((!r ||
|
|
1289
|
-
for (const o of
|
|
1290
|
-
[...e].some((a) =>
|
|
1288
|
+
if ((!r || j(i, r)) && e.add(i), i.type === "parallel")
|
|
1289
|
+
for (const o of ee(i).filter((a) => !G(a)))
|
|
1290
|
+
[...e].some((a) => j(a, o)) || (e.add(o), K(o, t, n, e));
|
|
1291
1291
|
}
|
|
1292
1292
|
function Ne(e, t, n, s, r) {
|
|
1293
|
-
|
|
1293
|
+
Zt(n, s, r, de(e, t));
|
|
1294
1294
|
}
|
|
1295
1295
|
function cs(e, t, n, s, r, i, o) {
|
|
1296
1296
|
let a = e;
|
|
1297
|
-
const c =
|
|
1297
|
+
const c = Be(s, r, i);
|
|
1298
1298
|
c.sort((h, d) => d.order - h.order);
|
|
1299
1299
|
let u;
|
|
1300
1300
|
for (const h of c)
|
|
1301
1301
|
for (const d of ts(h)) {
|
|
1302
1302
|
let f;
|
|
1303
|
-
d.history === "deep" ? f = (m) =>
|
|
1303
|
+
d.history === "deep" ? f = (m) => Ze(m) && j(m, h) : f = (m) => m.parent === h, u ?? (u = {
|
|
1304
1304
|
...i
|
|
1305
1305
|
}), u[d.id] = Array.from(r).filter(f);
|
|
1306
1306
|
}
|
|
1307
1307
|
for (const h of c)
|
|
1308
|
-
a =
|
|
1308
|
+
a = ne(a, t, n, [...h.exit, ...h.invoke.map((d) => Gt(d.id))], o), r.delete(h);
|
|
1309
1309
|
return [a, u || i];
|
|
1310
1310
|
}
|
|
1311
|
-
let
|
|
1312
|
-
function
|
|
1311
|
+
let mt = !1;
|
|
1312
|
+
function en(e, t, n, s, r, i) {
|
|
1313
1313
|
const {
|
|
1314
1314
|
machine: o
|
|
1315
1315
|
} = e;
|
|
@@ -1325,9 +1325,9 @@ function Zt(e, t, n, s, r, i) {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
});
|
|
1327
1327
|
try {
|
|
1328
|
-
|
|
1328
|
+
mt = h, h(d, f);
|
|
1329
1329
|
} finally {
|
|
1330
|
-
|
|
1330
|
+
mt = !1;
|
|
1331
1331
|
}
|
|
1332
1332
|
};
|
|
1333
1333
|
const u = typeof c == "function", h = u ? c : (
|
|
@@ -1348,7 +1348,7 @@ function Zt(e, t, n, s, r, i) {
|
|
|
1348
1348
|
event: t
|
|
1349
1349
|
}) : c.params : void 0;
|
|
1350
1350
|
if (!("resolve" in h)) {
|
|
1351
|
-
n.self._processingStatus ===
|
|
1351
|
+
n.self._processingStatus === C.Running ? m() : n.defer(() => {
|
|
1352
1352
|
m();
|
|
1353
1353
|
});
|
|
1354
1354
|
continue;
|
|
@@ -1362,12 +1362,12 @@ function Zt(e, t, n, s, r, i) {
|
|
|
1362
1362
|
// this holds all params
|
|
1363
1363
|
r
|
|
1364
1364
|
);
|
|
1365
|
-
a = v, "retryResolve" in y && (i == null || i.push([y, S])), "execute" in y && (n.self._processingStatus ===
|
|
1365
|
+
a = v, "retryResolve" in y && (i == null || i.push([y, S])), "execute" in y && (n.self._processingStatus === C.Running ? y.execute(n, S) : n.defer(y.execute.bind(null, n, S))), x && (a = en(a, t, n, x, r, i));
|
|
1366
1366
|
}
|
|
1367
1367
|
return a;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1370
|
-
const o = i ? [] : void 0, a =
|
|
1369
|
+
function ne(e, t, n, s, r, i) {
|
|
1370
|
+
const o = i ? [] : void 0, a = en(e, t, n, s, {
|
|
1371
1371
|
internalQueue: r,
|
|
1372
1372
|
deferredActorIds: i
|
|
1373
1373
|
}, o);
|
|
@@ -1387,8 +1387,8 @@ function ke(e, t, n, s = []) {
|
|
|
1387
1387
|
_transitions: d
|
|
1388
1388
|
}), i.push(u);
|
|
1389
1389
|
}
|
|
1390
|
-
if (t.type ===
|
|
1391
|
-
return r =
|
|
1390
|
+
if (t.type === ce)
|
|
1391
|
+
return r = J(gt(r, t, n), {
|
|
1392
1392
|
status: "stopped"
|
|
1393
1393
|
}), o(r, t, []), {
|
|
1394
1394
|
snapshot: r,
|
|
@@ -1396,16 +1396,16 @@ function ke(e, t, n, s = []) {
|
|
|
1396
1396
|
};
|
|
1397
1397
|
let a = t;
|
|
1398
1398
|
if (a.type !== Pt) {
|
|
1399
|
-
const u = a, h =
|
|
1399
|
+
const u = a, h = Ln(u), d = Et(u, r);
|
|
1400
1400
|
if (h && !d.length)
|
|
1401
|
-
return r =
|
|
1401
|
+
return r = J(e, {
|
|
1402
1402
|
status: "error",
|
|
1403
1403
|
error: u.error
|
|
1404
1404
|
}), o(r, u, []), {
|
|
1405
1405
|
snapshot: r,
|
|
1406
1406
|
microstates: i
|
|
1407
1407
|
};
|
|
1408
|
-
r =
|
|
1408
|
+
r = je(
|
|
1409
1409
|
d,
|
|
1410
1410
|
e,
|
|
1411
1411
|
n,
|
|
@@ -1422,44 +1422,44 @@ function ke(e, t, n, s = []) {
|
|
|
1422
1422
|
if (!u.length) {
|
|
1423
1423
|
if (!s.length)
|
|
1424
1424
|
break;
|
|
1425
|
-
a = s.shift(), u =
|
|
1425
|
+
a = s.shift(), u = Et(a, r);
|
|
1426
1426
|
}
|
|
1427
|
-
r =
|
|
1427
|
+
r = je(u, r, n, a, !1, s), c = r !== h, o(r, a, u);
|
|
1428
1428
|
}
|
|
1429
|
-
return r.status !== "active" &&
|
|
1429
|
+
return r.status !== "active" && gt(r, a, n), {
|
|
1430
1430
|
snapshot: r,
|
|
1431
1431
|
microstates: i
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return
|
|
1434
|
+
function gt(e, t, n) {
|
|
1435
|
+
return ne(e, t, n, Object.values(e.children).map((s) => Gt(s)), []);
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function Et(e, t) {
|
|
1438
1438
|
return t.machine.getTransitionData(t, e);
|
|
1439
1439
|
}
|
|
1440
1440
|
function us(e, t) {
|
|
1441
|
-
const n = /* @__PURE__ */ new Set(), s = e._nodes.filter(
|
|
1441
|
+
const n = /* @__PURE__ */ new Set(), s = e._nodes.filter(Ze);
|
|
1442
1442
|
for (const r of s)
|
|
1443
1443
|
e:
|
|
1444
|
-
for (const i of [r].concat(
|
|
1444
|
+
for (const i of [r].concat(de(r, void 0)))
|
|
1445
1445
|
if (i.always) {
|
|
1446
1446
|
for (const o of i.always)
|
|
1447
|
-
if (o.guard === void 0 ||
|
|
1447
|
+
if (o.guard === void 0 || Ke(o.guard, e.context, t, e)) {
|
|
1448
1448
|
n.add(o);
|
|
1449
1449
|
break e;
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
1452
|
-
return
|
|
1452
|
+
return Wt(Array.from(n), new Set(e._nodes), e.historyValue);
|
|
1453
1453
|
}
|
|
1454
1454
|
function ds(e, t) {
|
|
1455
1455
|
const n = ve(_e(e, t));
|
|
1456
|
-
return
|
|
1456
|
+
return Yt(e, [...n]);
|
|
1457
1457
|
}
|
|
1458
1458
|
function ls(e) {
|
|
1459
1459
|
return !!e && typeof e == "object" && "machine" in e && "value" in e;
|
|
1460
1460
|
}
|
|
1461
1461
|
const hs = function(t) {
|
|
1462
|
-
return
|
|
1462
|
+
return jt(t, this.value);
|
|
1463
1463
|
}, fs = function(t) {
|
|
1464
1464
|
return this.tags.has(t);
|
|
1465
1465
|
}, ps = function(t) {
|
|
@@ -1493,7 +1493,7 @@ function ye(e, t) {
|
|
|
1493
1493
|
machine: t,
|
|
1494
1494
|
context: e.context,
|
|
1495
1495
|
_nodes: e._nodes,
|
|
1496
|
-
value:
|
|
1496
|
+
value: Yt(t.root, e._nodes),
|
|
1497
1497
|
tags: new Set(e._nodes.flatMap((n) => n.tags)),
|
|
1498
1498
|
children: e.children,
|
|
1499
1499
|
historyValue: e.historyValue || {},
|
|
@@ -1504,7 +1504,7 @@ function ye(e, t) {
|
|
|
1504
1504
|
toJSON: ys
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1507
|
+
function J(e, t = {}) {
|
|
1508
1508
|
return ye({
|
|
1509
1509
|
...e,
|
|
1510
1510
|
...t
|
|
@@ -1535,11 +1535,11 @@ function gs(e, t) {
|
|
|
1535
1535
|
}
|
|
1536
1536
|
return {
|
|
1537
1537
|
...f,
|
|
1538
|
-
context:
|
|
1538
|
+
context: tn(o),
|
|
1539
1539
|
children: m
|
|
1540
1540
|
};
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function tn(e) {
|
|
1543
1543
|
let t;
|
|
1544
1544
|
for (const n in e) {
|
|
1545
1545
|
const s = e[n];
|
|
@@ -1548,11 +1548,11 @@ function en(e) {
|
|
|
1548
1548
|
t ?? (t = Array.isArray(e) ? e.slice() : {
|
|
1549
1549
|
...e
|
|
1550
1550
|
}), t[n] = {
|
|
1551
|
-
xstate$$type:
|
|
1551
|
+
xstate$$type: We,
|
|
1552
1552
|
id: s.id
|
|
1553
1553
|
};
|
|
1554
1554
|
else {
|
|
1555
|
-
const r =
|
|
1555
|
+
const r = tn(s);
|
|
1556
1556
|
r !== s && (t ?? (t = Array.isArray(e) ? e.slice() : {
|
|
1557
1557
|
...e
|
|
1558
1558
|
}), t[n] = r);
|
|
@@ -1602,7 +1602,7 @@ function Ts(e, t) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
return n.type = "xstate.raise", n.event = e, n.id = t == null ? void 0 : t.id, n.delay = t == null ? void 0 : t.delay, n.resolve = Es, n.execute = vs, n;
|
|
1604
1604
|
}
|
|
1605
|
-
const
|
|
1605
|
+
const vt = /* @__PURE__ */ new WeakMap();
|
|
1606
1606
|
function _s(e) {
|
|
1607
1607
|
return {
|
|
1608
1608
|
config: e,
|
|
@@ -1614,7 +1614,7 @@ function _s(e) {
|
|
|
1614
1614
|
receivers: void 0,
|
|
1615
1615
|
dispose: void 0
|
|
1616
1616
|
};
|
|
1617
|
-
|
|
1617
|
+
vt.set(r, o), o.dispose = e({
|
|
1618
1618
|
input: n.input,
|
|
1619
1619
|
system: i,
|
|
1620
1620
|
self: r,
|
|
@@ -1628,8 +1628,8 @@ function _s(e) {
|
|
|
1628
1628
|
},
|
|
1629
1629
|
transition: (n, s, r) => {
|
|
1630
1630
|
var o, a;
|
|
1631
|
-
const i =
|
|
1632
|
-
return s.type ===
|
|
1631
|
+
const i = vt.get(r.self);
|
|
1632
|
+
return s.type === ce ? (n = {
|
|
1633
1633
|
...n,
|
|
1634
1634
|
status: "stopped",
|
|
1635
1635
|
error: void 0
|
|
@@ -1645,8 +1645,8 @@ function _s(e) {
|
|
|
1645
1645
|
restoreSnapshot: (n) => n
|
|
1646
1646
|
};
|
|
1647
1647
|
}
|
|
1648
|
-
const
|
|
1649
|
-
function
|
|
1648
|
+
const Tt = "xstate.promise.resolve", _t = "xstate.promise.reject", fe = /* @__PURE__ */ new WeakMap();
|
|
1649
|
+
function z(e) {
|
|
1650
1650
|
return {
|
|
1651
1651
|
config: e,
|
|
1652
1652
|
transition: (n, s, r) => {
|
|
@@ -1654,7 +1654,7 @@ function K(e) {
|
|
|
1654
1654
|
if (n.status !== "active")
|
|
1655
1655
|
return n;
|
|
1656
1656
|
switch (s.type) {
|
|
1657
|
-
case
|
|
1657
|
+
case Tt: {
|
|
1658
1658
|
const o = s.data;
|
|
1659
1659
|
return {
|
|
1660
1660
|
...n,
|
|
@@ -1663,14 +1663,14 @@ function K(e) {
|
|
|
1663
1663
|
input: void 0
|
|
1664
1664
|
};
|
|
1665
1665
|
}
|
|
1666
|
-
case
|
|
1666
|
+
case _t:
|
|
1667
1667
|
return {
|
|
1668
1668
|
...n,
|
|
1669
1669
|
status: "error",
|
|
1670
1670
|
error: s.data,
|
|
1671
1671
|
input: void 0
|
|
1672
1672
|
};
|
|
1673
|
-
case
|
|
1673
|
+
case ce:
|
|
1674
1674
|
return (i = fe.get(r.self)) == null || i.abort(), {
|
|
1675
1675
|
...n,
|
|
1676
1676
|
status: "stopped",
|
|
@@ -1694,12 +1694,12 @@ function K(e) {
|
|
|
1694
1694
|
signal: i.signal
|
|
1695
1695
|
})).then((a) => {
|
|
1696
1696
|
s.getSnapshot().status === "active" && (fe.delete(s), r._relay(s, s, {
|
|
1697
|
-
type:
|
|
1697
|
+
type: Tt,
|
|
1698
1698
|
data: a
|
|
1699
1699
|
}));
|
|
1700
1700
|
}, (a) => {
|
|
1701
1701
|
s.getSnapshot().status === "active" && (fe.delete(s), r._relay(s, s, {
|
|
1702
|
-
type:
|
|
1702
|
+
type: _t,
|
|
1703
1703
|
data: a
|
|
1704
1704
|
}));
|
|
1705
1705
|
});
|
|
@@ -1724,10 +1724,10 @@ function Is(e, {
|
|
|
1724
1724
|
input: u
|
|
1725
1725
|
} = a;
|
|
1726
1726
|
if (typeof o == "string") {
|
|
1727
|
-
const h =
|
|
1727
|
+
const h = Qe(t, o);
|
|
1728
1728
|
if (!h)
|
|
1729
1729
|
throw new Error(`Actor logic '${o}' not implemented in machine '${t.id}'`);
|
|
1730
|
-
const d =
|
|
1730
|
+
const d = B(h, {
|
|
1731
1731
|
id: a.id,
|
|
1732
1732
|
parent: e.self,
|
|
1733
1733
|
syncSnapshot: a.syncSnapshot,
|
|
@@ -1741,7 +1741,7 @@ function Is(e, {
|
|
|
1741
1741
|
});
|
|
1742
1742
|
return r[d.id] = d, d;
|
|
1743
1743
|
} else
|
|
1744
|
-
return
|
|
1744
|
+
return B(o, {
|
|
1745
1745
|
id: a.id,
|
|
1746
1746
|
parent: e.self,
|
|
1747
1747
|
syncSnapshot: a.syncSnapshot,
|
|
@@ -1753,7 +1753,7 @@ function Is(e, {
|
|
|
1753
1753
|
return (o, a) => {
|
|
1754
1754
|
const c = i(o, a);
|
|
1755
1755
|
return r[c.id] = c, e.defer(() => {
|
|
1756
|
-
c._processingStatus !==
|
|
1756
|
+
c._processingStatus !== C.Stopped && c.start();
|
|
1757
1757
|
}), c;
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
@@ -1778,7 +1778,7 @@ function Ss(e, t, n, s, {
|
|
|
1778
1778
|
a[u] = typeof h == "function" ? h(o, s) : h;
|
|
1779
1779
|
}
|
|
1780
1780
|
const c = Object.assign({}, t.context, a);
|
|
1781
|
-
return [
|
|
1781
|
+
return [J(t, {
|
|
1782
1782
|
context: c,
|
|
1783
1783
|
children: Object.keys(i).length ? {
|
|
1784
1784
|
...t.children,
|
|
@@ -1804,12 +1804,12 @@ function xs(e, {
|
|
|
1804
1804
|
}) {
|
|
1805
1805
|
e.defer(() => e.emit(t));
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function Ce(e) {
|
|
1808
1808
|
function t(n, s) {
|
|
1809
1809
|
}
|
|
1810
1810
|
return t.type = "xstate.emit", t.event = e, t.resolve = As, t.execute = xs, t;
|
|
1811
1811
|
}
|
|
1812
|
-
let
|
|
1812
|
+
let It = /* @__PURE__ */ function(e) {
|
|
1813
1813
|
return e.Parent = "#_parent", e.Internal = "#_internal", e;
|
|
1814
1814
|
}({});
|
|
1815
1815
|
function ws(e, t, n, s, {
|
|
@@ -1832,7 +1832,7 @@ function ws(e, t, n, s, {
|
|
|
1832
1832
|
const f = typeof r == "function" ? r(n, s) : r;
|
|
1833
1833
|
let m;
|
|
1834
1834
|
if (typeof f == "string") {
|
|
1835
|
-
if (f ===
|
|
1835
|
+
if (f === It.Parent ? m = e.self._parent : f === It.Internal ? m = e.self : f.startsWith("#_") ? m = t.children[f.slice(2)] : m = (y = c.deferredActorIds) != null && y.includes(f) ? f : t.children[f], !m)
|
|
1836
1836
|
throw new Error(`Unable to send event to actor '${f}' from machine '${t.machine.id}'.`);
|
|
1837
1837
|
} else
|
|
1838
1838
|
m = f || e.self;
|
|
@@ -1867,28 +1867,28 @@ function Os(e, t) {
|
|
|
1867
1867
|
);
|
|
1868
1868
|
});
|
|
1869
1869
|
}
|
|
1870
|
-
function
|
|
1870
|
+
function St(e, t, n) {
|
|
1871
1871
|
function s(r, i) {
|
|
1872
1872
|
}
|
|
1873
1873
|
return s.type = "xsnapshot.sendTo", s.to = e, s.event = t, s.id = n == null ? void 0 : n.id, s.delay = n == null ? void 0 : n.delay, s.resolve = ws, s.retryResolve = bs, s.execute = Os, s;
|
|
1874
1874
|
}
|
|
1875
|
-
const
|
|
1876
|
-
function
|
|
1877
|
-
let s =
|
|
1875
|
+
const At = /* @__PURE__ */ new WeakMap();
|
|
1876
|
+
function X(e, t, n) {
|
|
1877
|
+
let s = At.get(e);
|
|
1878
1878
|
return s ? t in s || (s[t] = n()) : (s = {
|
|
1879
1879
|
[t]: n()
|
|
1880
|
-
},
|
|
1880
|
+
}, At.set(e, s)), s[t];
|
|
1881
1881
|
}
|
|
1882
|
-
const Ns = {},
|
|
1882
|
+
const Ns = {}, ie = (e) => typeof e == "string" ? {
|
|
1883
1883
|
type: e
|
|
1884
1884
|
} : typeof e == "function" ? "resolve" in e ? {
|
|
1885
1885
|
type: e.type
|
|
1886
1886
|
} : {
|
|
1887
1887
|
type: e.name
|
|
1888
1888
|
} : e;
|
|
1889
|
-
class
|
|
1889
|
+
class st {
|
|
1890
1890
|
constructor(t, n) {
|
|
1891
|
-
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(Lt), this.type = this.config.type || (this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.description = this.config.description, this.order = this.machine.idMap.size, this.machine.idMap.set(this.id, this), this.states = this.config.states ?
|
|
1891
|
+
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(Lt), this.type = this.config.type || (this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.description = this.config.description, this.order = this.machine.idMap.size, this.machine.idMap.set(this.id, this), this.states = this.config.states ? ht(this.config.states, (s, r) => new st(s, {
|
|
1892
1892
|
_parent: this,
|
|
1893
1893
|
_key: r,
|
|
1894
1894
|
_machine: this.machine
|
|
@@ -1898,7 +1898,7 @@ class nt {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
/** @internal */
|
|
1900
1900
|
_initialize() {
|
|
1901
|
-
this.transitions = Xn(this), this.config.always && (this.always =
|
|
1901
|
+
this.transitions = Xn(this), this.config.always && (this.always = W(this.config.always).map((t) => H(this, Ut, t))), Object.keys(this.states).forEach((t) => {
|
|
1902
1902
|
this.states[t]._initialize();
|
|
1903
1903
|
});
|
|
1904
1904
|
}
|
|
@@ -1914,25 +1914,25 @@ class nt {
|
|
|
1914
1914
|
initial: this.initial ? {
|
|
1915
1915
|
target: this.initial.target,
|
|
1916
1916
|
source: this,
|
|
1917
|
-
actions: this.initial.actions.map(
|
|
1917
|
+
actions: this.initial.actions.map(ie),
|
|
1918
1918
|
eventType: null,
|
|
1919
1919
|
reenter: !1,
|
|
1920
1920
|
toJSON: () => ({
|
|
1921
1921
|
target: this.initial.target.map((t) => `#${t.id}`),
|
|
1922
1922
|
source: `#${this.id}`,
|
|
1923
|
-
actions: this.initial.actions.map(
|
|
1923
|
+
actions: this.initial.actions.map(ie),
|
|
1924
1924
|
eventType: null
|
|
1925
1925
|
})
|
|
1926
1926
|
} : void 0,
|
|
1927
1927
|
history: this.history,
|
|
1928
|
-
states:
|
|
1928
|
+
states: ht(this.states, (t) => t.definition),
|
|
1929
1929
|
on: this.on,
|
|
1930
1930
|
transitions: [...this.transitions.values()].flat().map((t) => ({
|
|
1931
1931
|
...t,
|
|
1932
|
-
actions: t.actions.map(
|
|
1932
|
+
actions: t.actions.map(ie)
|
|
1933
1933
|
})),
|
|
1934
|
-
entry: this.entry.map(
|
|
1935
|
-
exit: this.exit.map(
|
|
1934
|
+
entry: this.entry.map(ie),
|
|
1935
|
+
exit: this.exit.map(ie),
|
|
1936
1936
|
meta: this.meta,
|
|
1937
1937
|
order: this.order || -1,
|
|
1938
1938
|
output: this.output,
|
|
@@ -1949,11 +1949,11 @@ class nt {
|
|
|
1949
1949
|
* The logic invoked as actors by this state node.
|
|
1950
1950
|
*/
|
|
1951
1951
|
get invoke() {
|
|
1952
|
-
return
|
|
1952
|
+
return X(this, "invoke", () => F(this.config.invoke).map((t, n) => {
|
|
1953
1953
|
const {
|
|
1954
1954
|
src: s,
|
|
1955
1955
|
systemId: r
|
|
1956
|
-
} = t, i = t.id ??
|
|
1956
|
+
} = t, i = t.id ?? pt(this.id, n), o = typeof s == "string" ? s : `xstate.invoke.${pt(this.id, n)}`;
|
|
1957
1957
|
return {
|
|
1958
1958
|
...t,
|
|
1959
1959
|
src: o,
|
|
@@ -1979,26 +1979,26 @@ class nt {
|
|
|
1979
1979
|
* The mapping of events to transitions.
|
|
1980
1980
|
*/
|
|
1981
1981
|
get on() {
|
|
1982
|
-
return
|
|
1982
|
+
return X(this, "on", () => [...this.transitions].flatMap(([n, s]) => s.map((r) => [n, r])).reduce((n, [s, r]) => (n[s] = n[s] || [], n[s].push(r), n), {}));
|
|
1983
1983
|
}
|
|
1984
1984
|
get after() {
|
|
1985
|
-
return
|
|
1985
|
+
return X(this, "delayedTransitions", () => Yn(this));
|
|
1986
1986
|
}
|
|
1987
1987
|
get initial() {
|
|
1988
|
-
return
|
|
1988
|
+
return X(this, "initial", () => Qn(this, this.config.initial));
|
|
1989
1989
|
}
|
|
1990
1990
|
/** @internal */
|
|
1991
1991
|
next(t, n) {
|
|
1992
1992
|
const s = n.type, r = [];
|
|
1993
1993
|
let i;
|
|
1994
|
-
const o =
|
|
1994
|
+
const o = X(this, `candidates-${s}`, () => Jn(this, s));
|
|
1995
1995
|
for (const a of o) {
|
|
1996
1996
|
const {
|
|
1997
1997
|
guard: c
|
|
1998
1998
|
} = a, u = t.context;
|
|
1999
1999
|
let h = !1;
|
|
2000
2000
|
try {
|
|
2001
|
-
h = !c ||
|
|
2001
|
+
h = !c || Ke(c, u, n, t);
|
|
2002
2002
|
} catch (d) {
|
|
2003
2003
|
const f = typeof c == "string" ? c : typeof c == "object" ? c.type : void 0;
|
|
2004
2004
|
throw new Error(`Unable to evaluate guard ${f ? `'${f}' ` : ""}in transition for event '${s}' in state node '${this.id}':
|
|
@@ -2015,7 +2015,7 @@ ${d.message}`);
|
|
|
2015
2015
|
* All the event types accepted by this state node and its descendants.
|
|
2016
2016
|
*/
|
|
2017
2017
|
get events() {
|
|
2018
|
-
return
|
|
2018
|
+
return X(this, "events", () => {
|
|
2019
2019
|
const {
|
|
2020
2020
|
states: t
|
|
2021
2021
|
} = this, n = new Set(this.ownEvents);
|
|
@@ -2040,14 +2040,14 @@ ${d.message}`);
|
|
|
2040
2040
|
}
|
|
2041
2041
|
}
|
|
2042
2042
|
const ks = "#";
|
|
2043
|
-
class
|
|
2043
|
+
class rt {
|
|
2044
2044
|
constructor(t, n) {
|
|
2045
2045
|
this.config = t, this.version = void 0, this.schemas = void 0, this.implementations = void 0, this.__xstatenode = !0, this.idMap = /* @__PURE__ */ new Map(), this.root = void 0, this.id = void 0, this.states = void 0, this.events = void 0, this.__TResolvedTypesMeta = void 0, this.id = t.id || "(machine)", this.implementations = {
|
|
2046
2046
|
actors: (n == null ? void 0 : n.actors) ?? {},
|
|
2047
2047
|
actions: (n == null ? void 0 : n.actions) ?? {},
|
|
2048
2048
|
delays: (n == null ? void 0 : n.delays) ?? {},
|
|
2049
2049
|
guards: (n == null ? void 0 : n.guards) ?? {}
|
|
2050
|
-
}, this.version = this.config.version, this.schemas = this.config.schemas, this.transition = this.transition.bind(this), this.getInitialSnapshot = this.getInitialSnapshot.bind(this), this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this), this.restoreSnapshot = this.restoreSnapshot.bind(this), this.start = this.start.bind(this), this.root = new
|
|
2050
|
+
}, this.version = this.config.version, this.schemas = this.config.schemas, this.transition = this.transition.bind(this), this.getInitialSnapshot = this.getInitialSnapshot.bind(this), this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this), this.restoreSnapshot = this.restoreSnapshot.bind(this), this.start = this.start.bind(this), this.root = new st(t, {
|
|
2051
2051
|
_key: this.id,
|
|
2052
2052
|
_machine: this
|
|
2053
2053
|
}), this.root._initialize(), this.states = this.root.states, this.events = this.root.events;
|
|
@@ -2068,7 +2068,7 @@ class st {
|
|
|
2068
2068
|
actors: r,
|
|
2069
2069
|
delays: i
|
|
2070
2070
|
} = this.implementations;
|
|
2071
|
-
return new
|
|
2071
|
+
return new rt(this.config, {
|
|
2072
2072
|
actions: {
|
|
2073
2073
|
...n,
|
|
2074
2074
|
...t.actions
|
|
@@ -2093,7 +2093,7 @@ class st {
|
|
|
2093
2093
|
_nodes: [...s],
|
|
2094
2094
|
context: t.context || {},
|
|
2095
2095
|
children: {},
|
|
2096
|
-
status:
|
|
2096
|
+
status: et(s, this.root) ? "done" : t.status || "active",
|
|
2097
2097
|
output: t.output,
|
|
2098
2098
|
error: t.error,
|
|
2099
2099
|
historyValue: t.historyValue
|
|
@@ -2120,7 +2120,7 @@ class st {
|
|
|
2120
2120
|
return ke(t, n, s).microstates;
|
|
2121
2121
|
}
|
|
2122
2122
|
getTransitionData(t, n) {
|
|
2123
|
-
return
|
|
2123
|
+
return tt(this.root, t.value, t, n) || [];
|
|
2124
2124
|
}
|
|
2125
2125
|
/**
|
|
2126
2126
|
* The initial state _before_ evaluating any microsteps.
|
|
@@ -2135,7 +2135,7 @@ class st {
|
|
|
2135
2135
|
children: {},
|
|
2136
2136
|
status: "active"
|
|
2137
2137
|
}, this);
|
|
2138
|
-
return typeof r == "function" ?
|
|
2138
|
+
return typeof r == "function" ? ne(i, n, t, [D(({
|
|
2139
2139
|
spawn: a,
|
|
2140
2140
|
event: c,
|
|
2141
2141
|
self: u
|
|
@@ -2149,8 +2149,8 @@ class st {
|
|
|
2149
2149
|
* Returns the initial `State` instance, with reference to `self` as an `ActorRef`.
|
|
2150
2150
|
*/
|
|
2151
2151
|
getInitialSnapshot(t, n) {
|
|
2152
|
-
const s =
|
|
2153
|
-
target: [...
|
|
2152
|
+
const s = Bt(n), r = [], i = this.getPreInitialState(t, s, r), o = je([{
|
|
2153
|
+
target: [...Qt(this.root)],
|
|
2154
2154
|
source: this.root,
|
|
2155
2155
|
reenter: !0,
|
|
2156
2156
|
actions: [],
|
|
@@ -2168,7 +2168,7 @@ class st {
|
|
|
2168
2168
|
});
|
|
2169
2169
|
}
|
|
2170
2170
|
getStateNodeById(t) {
|
|
2171
|
-
const n =
|
|
2171
|
+
const n = Xe(t), s = n.slice(1), r = Se(n[0]) ? n[0].slice(ks.length) : n[0], i = this.idMap.get(r);
|
|
2172
2172
|
if (!i)
|
|
2173
2173
|
throw new Error(`Child state node '#${r}' does not exist on machine '${this.id}'`);
|
|
2174
2174
|
return Te(i, s);
|
|
@@ -2185,10 +2185,10 @@ class st {
|
|
|
2185
2185
|
restoreSnapshot(t, n) {
|
|
2186
2186
|
const s = {}, r = t.children;
|
|
2187
2187
|
Object.keys(r).forEach((c) => {
|
|
2188
|
-
const u = r[c], h = u.snapshot, d = u.src, f = typeof d == "string" ?
|
|
2188
|
+
const u = r[c], h = u.snapshot, d = u.src, f = typeof d == "string" ? Qe(this, d) : d;
|
|
2189
2189
|
if (!f)
|
|
2190
2190
|
return;
|
|
2191
|
-
const m =
|
|
2191
|
+
const m = B(f, {
|
|
2192
2192
|
id: c,
|
|
2193
2193
|
parent: n.self,
|
|
2194
2194
|
syncSnapshot: u.syncSnapshot,
|
|
@@ -2210,7 +2210,7 @@ class st {
|
|
|
2210
2210
|
for (let h in c) {
|
|
2211
2211
|
const d = c[h];
|
|
2212
2212
|
if (d && typeof d == "object") {
|
|
2213
|
-
if ("xstate$$type" in d && d.xstate$$type ===
|
|
2213
|
+
if ("xstate$$type" in d && d.xstate$$type === We) {
|
|
2214
2214
|
c[h] = u[d.id];
|
|
2215
2215
|
continue;
|
|
2216
2216
|
}
|
|
@@ -2223,7 +2223,7 @@ class st {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
2225
|
function Cs(e, t) {
|
|
2226
|
-
return new
|
|
2226
|
+
return new rt(e, t);
|
|
2227
2227
|
}
|
|
2228
2228
|
function Ae({
|
|
2229
2229
|
schemas: e,
|
|
@@ -2244,14 +2244,14 @@ function Ae({
|
|
|
2244
2244
|
})
|
|
2245
2245
|
};
|
|
2246
2246
|
}
|
|
2247
|
-
async function
|
|
2247
|
+
async function De(e, t) {
|
|
2248
2248
|
const n = await fetch(e, t);
|
|
2249
2249
|
return n.status === 200 ? n.json() : Promise.resolve({
|
|
2250
2250
|
message: n.statusText,
|
|
2251
2251
|
success: !1
|
|
2252
2252
|
});
|
|
2253
2253
|
}
|
|
2254
|
-
const
|
|
2254
|
+
const xt = Ae({
|
|
2255
2255
|
types: {
|
|
2256
2256
|
context: {},
|
|
2257
2257
|
events: {},
|
|
@@ -2319,13 +2319,13 @@ const At = Ae({
|
|
|
2319
2319
|
// },
|
|
2320
2320
|
},
|
|
2321
2321
|
actors: {
|
|
2322
|
-
refreshAccessToken:
|
|
2322
|
+
refreshAccessToken: z(async ({ input: e }) => {
|
|
2323
2323
|
let t;
|
|
2324
2324
|
if (typeof window > "u") {
|
|
2325
2325
|
if (e.context.refreshToken === "")
|
|
2326
2326
|
throw new Error("Unauthorized.");
|
|
2327
2327
|
try {
|
|
2328
|
-
const s = await
|
|
2328
|
+
const s = await De(
|
|
2329
2329
|
e.context.endpoints.ssrRefresh,
|
|
2330
2330
|
{
|
|
2331
2331
|
method: "POST",
|
|
@@ -2349,7 +2349,7 @@ const At = Ae({
|
|
|
2349
2349
|
throw console.log(n), new Error("Could not complete refresh request (server)");
|
|
2350
2350
|
}
|
|
2351
2351
|
} else {
|
|
2352
|
-
t = await
|
|
2352
|
+
t = await De(
|
|
2353
2353
|
e.context.endpoints.refresh,
|
|
2354
2354
|
{
|
|
2355
2355
|
method: "POST",
|
|
@@ -2377,9 +2377,9 @@ const At = Ae({
|
|
|
2377
2377
|
};
|
|
2378
2378
|
}
|
|
2379
2379
|
}),
|
|
2380
|
-
authenticate:
|
|
2380
|
+
authenticate: z(async ({ input: e }) => {
|
|
2381
2381
|
var s;
|
|
2382
|
-
const n = await
|
|
2382
|
+
const n = await De(
|
|
2383
2383
|
e.context.endpoints.login,
|
|
2384
2384
|
{
|
|
2385
2385
|
method: "POST",
|
|
@@ -2406,7 +2406,7 @@ const At = Ae({
|
|
|
2406
2406
|
accessToken: n.accessToken
|
|
2407
2407
|
};
|
|
2408
2408
|
}),
|
|
2409
|
-
unauthenticate:
|
|
2409
|
+
unauthenticate: z(async ({ input: e }) => (await fetch(e.context.endpoints.logout, {
|
|
2410
2410
|
method: "POST",
|
|
2411
2411
|
mode: "cors",
|
|
2412
2412
|
credentials: "include",
|
|
@@ -2548,13 +2548,13 @@ const At = Ae({
|
|
|
2548
2548
|
// },
|
|
2549
2549
|
// },
|
|
2550
2550
|
}
|
|
2551
|
-
}),
|
|
2551
|
+
}), nn = Je(
|
|
2552
2552
|
{}
|
|
2553
|
-
),
|
|
2554
|
-
const e =
|
|
2553
|
+
), Xr = () => {
|
|
2554
|
+
const e = Ye(nn), [t, n] = Mt(
|
|
2555
2555
|
typeof window < "u" && e.getSnapshot().value === "loggedIn"
|
|
2556
2556
|
);
|
|
2557
|
-
return
|
|
2557
|
+
return qt(() => {
|
|
2558
2558
|
if (typeof window > "u")
|
|
2559
2559
|
return;
|
|
2560
2560
|
const s = e.subscribe((r) => {
|
|
@@ -2564,19 +2564,19 @@ const At = Ae({
|
|
|
2564
2564
|
s.unsubscribe();
|
|
2565
2565
|
};
|
|
2566
2566
|
}, [e]), { authActor: e, isLoggedIn: t };
|
|
2567
|
-
},
|
|
2567
|
+
}, Qr = async (e = "", t = {
|
|
2568
2568
|
inspect: void 0,
|
|
2569
2569
|
endpoints: { login: "", logout: "", refresh: "", ssrRefresh: "" }
|
|
2570
2570
|
}) => typeof window < "u" ? (console.warn(
|
|
2571
2571
|
"App.getInitialProps::getAuth should not be run on the frontend. You are probably missing getServerSideProps in your page."
|
|
2572
|
-
),
|
|
2572
|
+
), B(xt, {
|
|
2573
2573
|
inspect: t.inspect,
|
|
2574
2574
|
input: {
|
|
2575
2575
|
initialContext: {
|
|
2576
2576
|
endpoints: t.endpoints
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
2579
|
-
}).start()) :
|
|
2579
|
+
}).start()) : B(xt, {
|
|
2580
2580
|
input: {
|
|
2581
2581
|
initialContext: {
|
|
2582
2582
|
endpoints: t.endpoints,
|
|
@@ -2585,8 +2585,8 @@ const At = Ae({
|
|
|
2585
2585
|
},
|
|
2586
2586
|
inspect: t.inspect
|
|
2587
2587
|
}).start();
|
|
2588
|
-
function
|
|
2589
|
-
return /* @__PURE__ */
|
|
2588
|
+
function Wr({ actor: e, children: t }) {
|
|
2589
|
+
return /* @__PURE__ */ ze(nn.Provider, { value: e, children: t });
|
|
2590
2590
|
}
|
|
2591
2591
|
let Ds = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
2592
2592
|
const Rs = Ae({
|
|
@@ -2667,7 +2667,7 @@ const Rs = Ae({
|
|
|
2667
2667
|
type: "final"
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
2670
|
-
}),
|
|
2670
|
+
}), Kr = Ae({
|
|
2671
2671
|
actors: {
|
|
2672
2672
|
timer: Rs
|
|
2673
2673
|
},
|
|
@@ -2759,11 +2759,11 @@ const Rs = Ae({
|
|
|
2759
2759
|
target: "idle"
|
|
2760
2760
|
},
|
|
2761
2761
|
RESUME_TIMER: {
|
|
2762
|
-
actions:
|
|
2762
|
+
actions: St("timer", { type: "RESUME_TIMER" })
|
|
2763
2763
|
// cond: (context) => context.duration > 0,
|
|
2764
2764
|
},
|
|
2765
2765
|
PAUSE_TIMER: {
|
|
2766
|
-
actions:
|
|
2766
|
+
actions: St("timer", { type: "PAUSE_TIMER" })
|
|
2767
2767
|
// cond: (context) => context.duration > 0,
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
@@ -2797,12 +2797,12 @@ const Rs = Ae({
|
|
|
2797
2797
|
}
|
|
2798
2798
|
}
|
|
2799
2799
|
}
|
|
2800
|
-
}),
|
|
2801
|
-
function
|
|
2800
|
+
}), sn = Je({}), Zr = () => Ye(sn);
|
|
2801
|
+
function ei({
|
|
2802
2802
|
children: e,
|
|
2803
2803
|
actor: t
|
|
2804
2804
|
}) {
|
|
2805
|
-
return /* @__PURE__ */
|
|
2805
|
+
return /* @__PURE__ */ ze(sn.Provider, { value: t, children: e });
|
|
2806
2806
|
}
|
|
2807
2807
|
function Ms({
|
|
2808
2808
|
context: e,
|
|
@@ -2816,7 +2816,7 @@ function Ms({
|
|
|
2816
2816
|
itemsAdded: n.output.itemsAdded
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function qs({
|
|
2820
2820
|
event: e
|
|
2821
2821
|
}) {
|
|
2822
2822
|
if (!e.type.includes("xstate.done.actor"))
|
|
@@ -2827,7 +2827,7 @@ function Ls({
|
|
|
2827
2827
|
itemsAdded: t.output.itemsAdded
|
|
2828
2828
|
};
|
|
2829
2829
|
}
|
|
2830
|
-
function
|
|
2830
|
+
function Ls({
|
|
2831
2831
|
event: e
|
|
2832
2832
|
}) {
|
|
2833
2833
|
if (!e.type.includes("xstate.done.actor"))
|
|
@@ -2838,6 +2838,23 @@ function qs({
|
|
|
2838
2838
|
itemsRemoved: t.output.itemsRemoved
|
|
2839
2839
|
};
|
|
2840
2840
|
}
|
|
2841
|
+
function Us({
|
|
2842
|
+
event: e
|
|
2843
|
+
}) {
|
|
2844
|
+
if (!e.type.includes("xstate.done.actor"))
|
|
2845
|
+
return {
|
|
2846
|
+
type: "EMIT_UPDATE_ITEMS",
|
|
2847
|
+
itemsUpdated: []
|
|
2848
|
+
};
|
|
2849
|
+
const t = e;
|
|
2850
|
+
return t.output.type !== "UPDATE_ITEMS_SUCCESS" ? {
|
|
2851
|
+
type: "EMIT_UPDATE_ITEMS",
|
|
2852
|
+
itemsUpdated: []
|
|
2853
|
+
} : {
|
|
2854
|
+
type: "EMIT_UPDATE_ITEMS",
|
|
2855
|
+
itemsUpdated: t.output.itemsUpdated
|
|
2856
|
+
};
|
|
2857
|
+
}
|
|
2841
2858
|
function Ps({
|
|
2842
2859
|
context: e,
|
|
2843
2860
|
event: t
|
|
@@ -2861,26 +2878,38 @@ function Fs({
|
|
|
2861
2878
|
quote: { ...e.quote, ...n.output.quote }
|
|
2862
2879
|
};
|
|
2863
2880
|
}
|
|
2864
|
-
|
|
2881
|
+
function Bs({
|
|
2882
|
+
context: e,
|
|
2883
|
+
event: t
|
|
2884
|
+
}) {
|
|
2885
|
+
if (!t.type.includes("xstate.done.actor"))
|
|
2886
|
+
return e;
|
|
2887
|
+
const n = t;
|
|
2888
|
+
return n.output.type !== "UPDATE_ITEMS_SUCCESS" ? e : {
|
|
2889
|
+
quote: { ...e.quote, ...n.output.quote },
|
|
2890
|
+
itemsUpdated: n.output.itemsUpdated
|
|
2891
|
+
};
|
|
2892
|
+
}
|
|
2893
|
+
const it = JSON, js = (e) => e.toUpperCase(), $s = (e) => {
|
|
2865
2894
|
const t = {};
|
|
2866
2895
|
return e.forEach((n, s) => {
|
|
2867
2896
|
t[s] = n;
|
|
2868
2897
|
}), t;
|
|
2869
|
-
},
|
|
2898
|
+
}, Vs = (e, t, n) => e.document ? e : {
|
|
2870
2899
|
document: e,
|
|
2871
2900
|
variables: t,
|
|
2872
2901
|
requestHeaders: n,
|
|
2873
2902
|
signal: void 0
|
|
2874
|
-
},
|
|
2903
|
+
}, Hs = (e, t, n) => e.query ? e : {
|
|
2875
2904
|
query: e,
|
|
2876
2905
|
variables: t,
|
|
2877
2906
|
requestHeaders: n,
|
|
2878
2907
|
signal: void 0
|
|
2879
|
-
},
|
|
2908
|
+
}, Gs = (e, t) => e.documents ? e : {
|
|
2880
2909
|
documents: e,
|
|
2881
2910
|
requestHeaders: t,
|
|
2882
2911
|
signal: void 0
|
|
2883
|
-
},
|
|
2912
|
+
}, zs = (e, t, ...n) => {
|
|
2884
2913
|
const [s, r] = n;
|
|
2885
2914
|
return e.document ? e : {
|
|
2886
2915
|
url: e,
|
|
@@ -2894,20 +2923,20 @@ function me(e, t) {
|
|
|
2894
2923
|
if (!!!e)
|
|
2895
2924
|
throw new Error(t);
|
|
2896
2925
|
}
|
|
2897
|
-
function
|
|
2926
|
+
function Js(e) {
|
|
2898
2927
|
return typeof e == "object" && e !== null;
|
|
2899
2928
|
}
|
|
2900
|
-
function
|
|
2929
|
+
function Ys(e, t) {
|
|
2901
2930
|
if (!!!e)
|
|
2902
2931
|
throw new Error(
|
|
2903
2932
|
t ?? "Unexpected invariant triggered."
|
|
2904
2933
|
);
|
|
2905
2934
|
}
|
|
2906
|
-
const
|
|
2907
|
-
function
|
|
2935
|
+
const Xs = /\r\n|[\n\r]/g;
|
|
2936
|
+
function $e(e, t) {
|
|
2908
2937
|
let n = 0, s = 1;
|
|
2909
|
-
for (const r of e.body.matchAll(
|
|
2910
|
-
if (typeof r.index == "number" ||
|
|
2938
|
+
for (const r of e.body.matchAll(Xs)) {
|
|
2939
|
+
if (typeof r.index == "number" || Ys(!1), r.index >= t)
|
|
2911
2940
|
break;
|
|
2912
2941
|
n = r.index + r[0].length, s += 1;
|
|
2913
2942
|
}
|
|
@@ -2916,27 +2945,27 @@ function je(e, t) {
|
|
|
2916
2945
|
column: t + 1 - n
|
|
2917
2946
|
};
|
|
2918
2947
|
}
|
|
2919
|
-
function
|
|
2920
|
-
return
|
|
2948
|
+
function Qs(e) {
|
|
2949
|
+
return rn(
|
|
2921
2950
|
e.source,
|
|
2922
|
-
|
|
2951
|
+
$e(e.source, e.start)
|
|
2923
2952
|
);
|
|
2924
2953
|
}
|
|
2925
|
-
function
|
|
2954
|
+
function rn(e, t) {
|
|
2926
2955
|
const n = e.locationOffset.column - 1, s = "".padStart(n) + e.body, r = t.line - 1, i = e.locationOffset.line - 1, o = t.line + i, a = t.line === 1 ? n : 0, c = t.column + a, u = `${e.name}:${o}:${c}
|
|
2927
2956
|
`, h = s.split(/\r\n|[\n\r]/g), d = h[r];
|
|
2928
2957
|
if (d.length > 120) {
|
|
2929
2958
|
const f = Math.floor(c / 80), m = c % 80, y = [];
|
|
2930
2959
|
for (let v = 0; v < d.length; v += 80)
|
|
2931
2960
|
y.push(d.slice(v, v + 80));
|
|
2932
|
-
return u +
|
|
2961
|
+
return u + wt([
|
|
2933
2962
|
[`${o} |`, y[0]],
|
|
2934
2963
|
...y.slice(1, f + 1).map((v) => ["|", v]),
|
|
2935
2964
|
["|", "^".padStart(m)],
|
|
2936
2965
|
["|", y[f + 1]]
|
|
2937
2966
|
]);
|
|
2938
2967
|
}
|
|
2939
|
-
return u +
|
|
2968
|
+
return u + wt([
|
|
2940
2969
|
// Lines specified like this: ["prefix", "string"],
|
|
2941
2970
|
[`${o - 1} |`, h[r - 1]],
|
|
2942
2971
|
[`${o} |`, d],
|
|
@@ -2944,12 +2973,12 @@ function sn(e, t) {
|
|
|
2944
2973
|
[`${o + 1} |`, h[r + 1]]
|
|
2945
2974
|
]);
|
|
2946
2975
|
}
|
|
2947
|
-
function
|
|
2976
|
+
function wt(e) {
|
|
2948
2977
|
const t = e.filter(([s, r]) => r !== void 0), n = Math.max(...t.map(([s]) => s.length));
|
|
2949
2978
|
return t.map(([s, r]) => s.padStart(n) + (r ? " " + r : "")).join(`
|
|
2950
2979
|
`);
|
|
2951
2980
|
}
|
|
2952
|
-
function
|
|
2981
|
+
function Ws(e) {
|
|
2953
2982
|
const t = e[0];
|
|
2954
2983
|
return t == null || "kind" in t || "length" in t ? {
|
|
2955
2984
|
nodes: t,
|
|
@@ -2960,7 +2989,7 @@ function Xs(e) {
|
|
|
2960
2989
|
extensions: e[5]
|
|
2961
2990
|
} : t;
|
|
2962
2991
|
}
|
|
2963
|
-
class
|
|
2992
|
+
class ot extends Error {
|
|
2964
2993
|
/**
|
|
2965
2994
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
2966
2995
|
* which correspond to this error.
|
|
@@ -3001,15 +3030,15 @@ class it extends Error {
|
|
|
3001
3030
|
*/
|
|
3002
3031
|
constructor(t, ...n) {
|
|
3003
3032
|
var s, r, i;
|
|
3004
|
-
const { nodes: o, source: a, positions: c, path: u, originalError: h, extensions: d } =
|
|
3005
|
-
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = h ?? void 0, this.nodes =
|
|
3033
|
+
const { nodes: o, source: a, positions: c, path: u, originalError: h, extensions: d } = Ws(n);
|
|
3034
|
+
super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = h ?? void 0, this.nodes = bt(
|
|
3006
3035
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
3007
3036
|
);
|
|
3008
|
-
const f =
|
|
3037
|
+
const f = bt(
|
|
3009
3038
|
(s = this.nodes) === null || s === void 0 ? void 0 : s.map((y) => y.loc).filter((y) => y != null)
|
|
3010
3039
|
);
|
|
3011
|
-
this.source = a ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? (f == null ? void 0 : f.map((y) => y.start)), this.locations = c && a ? c.map((y) =>
|
|
3012
|
-
const m =
|
|
3040
|
+
this.source = a ?? (f == null || (r = f[0]) === null || r === void 0 ? void 0 : r.source), this.positions = c ?? (f == null ? void 0 : f.map((y) => y.start)), this.locations = c && a ? c.map((y) => $e(a, y)) : f == null ? void 0 : f.map((y) => $e(y.source, y.start));
|
|
3041
|
+
const m = Js(
|
|
3013
3042
|
h == null ? void 0 : h.extensions
|
|
3014
3043
|
) ? h == null ? void 0 : h.extensions : void 0;
|
|
3015
3044
|
this.extensions = (i = d ?? m) !== null && i !== void 0 ? i : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
@@ -3036,7 +3065,7 @@ class it extends Error {
|
|
|
3036
3065
|
value: h.stack,
|
|
3037
3066
|
writable: !0,
|
|
3038
3067
|
configurable: !0
|
|
3039
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
3068
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, ot) : Object.defineProperty(this, "stack", {
|
|
3040
3069
|
value: Error().stack,
|
|
3041
3070
|
writable: !0,
|
|
3042
3071
|
configurable: !0
|
|
@@ -3051,12 +3080,12 @@ class it extends Error {
|
|
|
3051
3080
|
for (const n of this.nodes)
|
|
3052
3081
|
n.loc && (t += `
|
|
3053
3082
|
|
|
3054
|
-
` +
|
|
3083
|
+
` + Qs(n.loc));
|
|
3055
3084
|
else if (this.source && this.locations)
|
|
3056
3085
|
for (const n of this.locations)
|
|
3057
3086
|
t += `
|
|
3058
3087
|
|
|
3059
|
-
` +
|
|
3088
|
+
` + rn(this.source, n);
|
|
3060
3089
|
return t;
|
|
3061
3090
|
}
|
|
3062
3091
|
toJSON() {
|
|
@@ -3066,16 +3095,16 @@ class it extends Error {
|
|
|
3066
3095
|
return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
|
|
3067
3096
|
}
|
|
3068
3097
|
}
|
|
3069
|
-
function
|
|
3098
|
+
function bt(e) {
|
|
3070
3099
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
3071
3100
|
}
|
|
3072
3101
|
function b(e, t, n) {
|
|
3073
|
-
return new
|
|
3102
|
+
return new ot(`Syntax Error: ${n}`, {
|
|
3074
3103
|
source: e,
|
|
3075
3104
|
positions: [t]
|
|
3076
3105
|
});
|
|
3077
3106
|
}
|
|
3078
|
-
class
|
|
3107
|
+
class Ks {
|
|
3079
3108
|
/**
|
|
3080
3109
|
* The character offset at which this Node begins.
|
|
3081
3110
|
*/
|
|
@@ -3104,7 +3133,7 @@ class Qs {
|
|
|
3104
3133
|
};
|
|
3105
3134
|
}
|
|
3106
3135
|
}
|
|
3107
|
-
class
|
|
3136
|
+
class on {
|
|
3108
3137
|
/**
|
|
3109
3138
|
* The kind of Token.
|
|
3110
3139
|
*/
|
|
@@ -3146,7 +3175,7 @@ class rn {
|
|
|
3146
3175
|
};
|
|
3147
3176
|
}
|
|
3148
3177
|
}
|
|
3149
|
-
const
|
|
3178
|
+
const an = {
|
|
3150
3179
|
Name: [],
|
|
3151
3180
|
Document: ["definitions"],
|
|
3152
3181
|
OperationDefinition: [
|
|
@@ -3220,45 +3249,45 @@ const on = {
|
|
|
3220
3249
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
3221
3250
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
3222
3251
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
3223
|
-
},
|
|
3224
|
-
function
|
|
3252
|
+
}, Zs = new Set(Object.keys(an));
|
|
3253
|
+
function Ot(e) {
|
|
3225
3254
|
const t = e == null ? void 0 : e.kind;
|
|
3226
|
-
return typeof t == "string" &&
|
|
3255
|
+
return typeof t == "string" && Zs.has(t);
|
|
3227
3256
|
}
|
|
3228
|
-
var
|
|
3257
|
+
var Z;
|
|
3229
3258
|
(function(e) {
|
|
3230
3259
|
e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
|
|
3231
|
-
})(
|
|
3232
|
-
var
|
|
3260
|
+
})(Z || (Z = {}));
|
|
3261
|
+
var Ve;
|
|
3233
3262
|
(function(e) {
|
|
3234
3263
|
e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
|
|
3235
|
-
})(
|
|
3264
|
+
})(Ve || (Ve = {}));
|
|
3236
3265
|
var T;
|
|
3237
3266
|
(function(e) {
|
|
3238
3267
|
e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
|
|
3239
3268
|
})(T || (T = {}));
|
|
3240
|
-
function
|
|
3269
|
+
function He(e) {
|
|
3241
3270
|
return e === 9 || e === 32;
|
|
3242
3271
|
}
|
|
3243
|
-
function
|
|
3272
|
+
function ue(e) {
|
|
3244
3273
|
return e >= 48 && e <= 57;
|
|
3245
3274
|
}
|
|
3246
|
-
function
|
|
3275
|
+
function cn(e) {
|
|
3247
3276
|
return e >= 97 && e <= 122 || // A-Z
|
|
3248
3277
|
e >= 65 && e <= 90;
|
|
3249
3278
|
}
|
|
3250
|
-
function
|
|
3251
|
-
return
|
|
3279
|
+
function un(e) {
|
|
3280
|
+
return cn(e) || e === 95;
|
|
3252
3281
|
}
|
|
3253
|
-
function
|
|
3254
|
-
return
|
|
3282
|
+
function er(e) {
|
|
3283
|
+
return cn(e) || ue(e) || e === 95;
|
|
3255
3284
|
}
|
|
3256
|
-
function
|
|
3285
|
+
function tr(e) {
|
|
3257
3286
|
var t;
|
|
3258
3287
|
let n = Number.MAX_SAFE_INTEGER, s = null, r = -1;
|
|
3259
3288
|
for (let o = 0; o < e.length; ++o) {
|
|
3260
3289
|
var i;
|
|
3261
|
-
const a = e[o], c =
|
|
3290
|
+
const a = e[o], c = nr(a);
|
|
3262
3291
|
c !== a.length && (s = (i = s) !== null && i !== void 0 ? i : o, r = o, o !== 0 && c < n && (n = c));
|
|
3263
3292
|
}
|
|
3264
3293
|
return e.map((o, a) => a === 0 ? o : o.slice(n)).slice(
|
|
@@ -3266,17 +3295,17 @@ function Zs(e) {
|
|
|
3266
3295
|
r + 1
|
|
3267
3296
|
);
|
|
3268
3297
|
}
|
|
3269
|
-
function
|
|
3298
|
+
function nr(e) {
|
|
3270
3299
|
let t = 0;
|
|
3271
|
-
for (; t < e.length &&
|
|
3300
|
+
for (; t < e.length && He(e.charCodeAt(t)); )
|
|
3272
3301
|
++t;
|
|
3273
3302
|
return t;
|
|
3274
3303
|
}
|
|
3275
|
-
function
|
|
3276
|
-
const n = e.replace(/"""/g, '\\"""'), s = n.split(/\r\n|[\n\r]/g), r = s.length === 1, i = s.length > 1 && s.slice(1).every((m) => m.length === 0 ||
|
|
3304
|
+
function sr(e, t) {
|
|
3305
|
+
const n = e.replace(/"""/g, '\\"""'), s = n.split(/\r\n|[\n\r]/g), r = s.length === 1, i = s.length > 1 && s.slice(1).every((m) => m.length === 0 || He(m.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, c = e.endsWith("\\"), u = a || c, h = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
3277
3306
|
(!r || e.length > 70 || u || i || o);
|
|
3278
3307
|
let d = "";
|
|
3279
|
-
const f = r &&
|
|
3308
|
+
const f = r && He(e.charCodeAt(0));
|
|
3280
3309
|
return (h && !f || i) && (d += `
|
|
3281
3310
|
`), d += n, (h || u) && (d += `
|
|
3282
3311
|
`), '"""' + d + '"""';
|
|
@@ -3285,7 +3314,7 @@ var p;
|
|
|
3285
3314
|
(function(e) {
|
|
3286
3315
|
e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
|
|
3287
3316
|
})(p || (p = {}));
|
|
3288
|
-
class
|
|
3317
|
+
class rr {
|
|
3289
3318
|
/**
|
|
3290
3319
|
* The previously focused non-ignored token.
|
|
3291
3320
|
*/
|
|
@@ -3299,7 +3328,7 @@ class nr {
|
|
|
3299
3328
|
* The character offset at which the current line begins.
|
|
3300
3329
|
*/
|
|
3301
3330
|
constructor(t) {
|
|
3302
|
-
const n = new
|
|
3331
|
+
const n = new on(p.SOF, 0, 0, 0, 0);
|
|
3303
3332
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
3304
3333
|
}
|
|
3305
3334
|
get [Symbol.toStringTag]() {
|
|
@@ -3322,29 +3351,29 @@ class nr {
|
|
|
3322
3351
|
if (t.next)
|
|
3323
3352
|
t = t.next;
|
|
3324
3353
|
else {
|
|
3325
|
-
const n =
|
|
3354
|
+
const n = or(this, t.end);
|
|
3326
3355
|
t.next = n, n.prev = t, t = n;
|
|
3327
3356
|
}
|
|
3328
3357
|
while (t.kind === p.COMMENT);
|
|
3329
3358
|
return t;
|
|
3330
3359
|
}
|
|
3331
3360
|
}
|
|
3332
|
-
function
|
|
3361
|
+
function ir(e) {
|
|
3333
3362
|
return e === p.BANG || e === p.DOLLAR || e === p.AMP || e === p.PAREN_L || e === p.PAREN_R || e === p.SPREAD || e === p.COLON || e === p.EQUALS || e === p.AT || e === p.BRACKET_L || e === p.BRACKET_R || e === p.BRACE_L || e === p.PIPE || e === p.BRACE_R;
|
|
3334
3363
|
}
|
|
3335
|
-
function
|
|
3364
|
+
function se(e) {
|
|
3336
3365
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
3337
3366
|
}
|
|
3338
3367
|
function xe(e, t) {
|
|
3339
|
-
return
|
|
3368
|
+
return dn(e.charCodeAt(t)) && ln(e.charCodeAt(t + 1));
|
|
3340
3369
|
}
|
|
3341
|
-
function
|
|
3370
|
+
function dn(e) {
|
|
3342
3371
|
return e >= 55296 && e <= 56319;
|
|
3343
3372
|
}
|
|
3344
|
-
function
|
|
3373
|
+
function ln(e) {
|
|
3345
3374
|
return e >= 56320 && e <= 57343;
|
|
3346
3375
|
}
|
|
3347
|
-
function
|
|
3376
|
+
function Y(e, t) {
|
|
3348
3377
|
const n = e.source.body.codePointAt(t);
|
|
3349
3378
|
if (n === void 0)
|
|
3350
3379
|
return p.EOF;
|
|
@@ -3356,9 +3385,9 @@ function G(e, t) {
|
|
|
3356
3385
|
}
|
|
3357
3386
|
function w(e, t, n, s, r) {
|
|
3358
3387
|
const i = e.line, o = 1 + n - e.lineStart;
|
|
3359
|
-
return new
|
|
3388
|
+
return new on(t, n, s, i, o, r);
|
|
3360
3389
|
}
|
|
3361
|
-
function
|
|
3390
|
+
function or(e, t) {
|
|
3362
3391
|
const n = e.source.body, s = n.length;
|
|
3363
3392
|
let r = t;
|
|
3364
3393
|
for (; r < s; ) {
|
|
@@ -3377,7 +3406,7 @@ function rr(e, t) {
|
|
|
3377
3406
|
n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
|
|
3378
3407
|
continue;
|
|
3379
3408
|
case 35:
|
|
3380
|
-
return
|
|
3409
|
+
return ar(e, r);
|
|
3381
3410
|
case 33:
|
|
3382
3411
|
return w(e, p.BANG, r, r + 1);
|
|
3383
3412
|
case 36:
|
|
@@ -3409,28 +3438,28 @@ function rr(e, t) {
|
|
|
3409
3438
|
case 125:
|
|
3410
3439
|
return w(e, p.BRACE_R, r, r + 1);
|
|
3411
3440
|
case 34:
|
|
3412
|
-
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ?
|
|
3441
|
+
return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? fr(e, r) : ur(e, r);
|
|
3413
3442
|
}
|
|
3414
|
-
if (
|
|
3415
|
-
return
|
|
3416
|
-
if (
|
|
3417
|
-
return
|
|
3443
|
+
if (ue(i) || i === 45)
|
|
3444
|
+
return cr(e, r, i);
|
|
3445
|
+
if (un(i))
|
|
3446
|
+
return pr(e, r);
|
|
3418
3447
|
throw b(
|
|
3419
3448
|
e.source,
|
|
3420
3449
|
r,
|
|
3421
|
-
i === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` :
|
|
3450
|
+
i === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : se(i) || xe(n, r) ? `Unexpected character: ${Y(e, r)}.` : `Invalid character: ${Y(e, r)}.`
|
|
3422
3451
|
);
|
|
3423
3452
|
}
|
|
3424
3453
|
return w(e, p.EOF, s, s);
|
|
3425
3454
|
}
|
|
3426
|
-
function
|
|
3455
|
+
function ar(e, t) {
|
|
3427
3456
|
const n = e.source.body, s = n.length;
|
|
3428
3457
|
let r = t + 1;
|
|
3429
3458
|
for (; r < s; ) {
|
|
3430
3459
|
const i = n.charCodeAt(r);
|
|
3431
3460
|
if (i === 10 || i === 13)
|
|
3432
3461
|
break;
|
|
3433
|
-
if (
|
|
3462
|
+
if (se(i))
|
|
3434
3463
|
++r;
|
|
3435
3464
|
else if (xe(n, r))
|
|
3436
3465
|
r += 2;
|
|
@@ -3445,26 +3474,26 @@ function ir(e, t) {
|
|
|
3445
3474
|
n.slice(t + 1, r)
|
|
3446
3475
|
);
|
|
3447
3476
|
}
|
|
3448
|
-
function
|
|
3477
|
+
function cr(e, t, n) {
|
|
3449
3478
|
const s = e.source.body;
|
|
3450
3479
|
let r = t, i = n, o = !1;
|
|
3451
3480
|
if (i === 45 && (i = s.charCodeAt(++r)), i === 48) {
|
|
3452
|
-
if (i = s.charCodeAt(++r),
|
|
3481
|
+
if (i = s.charCodeAt(++r), ue(i))
|
|
3453
3482
|
throw b(
|
|
3454
3483
|
e.source,
|
|
3455
3484
|
r,
|
|
3456
|
-
`Invalid number, unexpected digit after 0: ${
|
|
3485
|
+
`Invalid number, unexpected digit after 0: ${Y(
|
|
3457
3486
|
e,
|
|
3458
3487
|
r
|
|
3459
3488
|
)}.`
|
|
3460
3489
|
);
|
|
3461
3490
|
} else
|
|
3462
|
-
r =
|
|
3463
|
-
if (i === 46 && (o = !0, i = s.charCodeAt(++r), r =
|
|
3491
|
+
r = Re(e, r, i), i = s.charCodeAt(r);
|
|
3492
|
+
if (i === 46 && (o = !0, i = s.charCodeAt(++r), r = Re(e, r, i), i = s.charCodeAt(r)), (i === 69 || i === 101) && (o = !0, i = s.charCodeAt(++r), (i === 43 || i === 45) && (i = s.charCodeAt(++r)), r = Re(e, r, i), i = s.charCodeAt(r)), i === 46 || un(i))
|
|
3464
3493
|
throw b(
|
|
3465
3494
|
e.source,
|
|
3466
3495
|
r,
|
|
3467
|
-
`Invalid number, expected digit but got: ${
|
|
3496
|
+
`Invalid number, expected digit but got: ${Y(
|
|
3468
3497
|
e,
|
|
3469
3498
|
r
|
|
3470
3499
|
)}.`
|
|
@@ -3477,23 +3506,23 @@ function or(e, t, n) {
|
|
|
3477
3506
|
s.slice(t, r)
|
|
3478
3507
|
);
|
|
3479
3508
|
}
|
|
3480
|
-
function
|
|
3481
|
-
if (!
|
|
3509
|
+
function Re(e, t, n) {
|
|
3510
|
+
if (!ue(n))
|
|
3482
3511
|
throw b(
|
|
3483
3512
|
e.source,
|
|
3484
3513
|
t,
|
|
3485
|
-
`Invalid number, expected digit but got: ${
|
|
3514
|
+
`Invalid number, expected digit but got: ${Y(
|
|
3486
3515
|
e,
|
|
3487
3516
|
t
|
|
3488
3517
|
)}.`
|
|
3489
3518
|
);
|
|
3490
3519
|
const s = e.source.body;
|
|
3491
3520
|
let r = t + 1;
|
|
3492
|
-
for (;
|
|
3521
|
+
for (; ue(s.charCodeAt(r)); )
|
|
3493
3522
|
++r;
|
|
3494
3523
|
return r;
|
|
3495
3524
|
}
|
|
3496
|
-
function
|
|
3525
|
+
function ur(e, t) {
|
|
3497
3526
|
const n = e.source.body, s = n.length;
|
|
3498
3527
|
let r = t + 1, i = r, o = "";
|
|
3499
3528
|
for (; r < s; ) {
|
|
@@ -3502,13 +3531,13 @@ function ar(e, t) {
|
|
|
3502
3531
|
return o += n.slice(i, r), w(e, p.STRING, t, r + 1, o);
|
|
3503
3532
|
if (a === 92) {
|
|
3504
3533
|
o += n.slice(i, r);
|
|
3505
|
-
const c = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ?
|
|
3534
|
+
const c = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? dr(e, r) : lr(e, r) : hr(e, r);
|
|
3506
3535
|
o += c.value, r += c.size, i = r;
|
|
3507
3536
|
continue;
|
|
3508
3537
|
}
|
|
3509
3538
|
if (a === 10 || a === 13)
|
|
3510
3539
|
break;
|
|
3511
|
-
if (
|
|
3540
|
+
if (se(a))
|
|
3512
3541
|
++r;
|
|
3513
3542
|
else if (xe(n, r))
|
|
3514
3543
|
r += 2;
|
|
@@ -3516,7 +3545,7 @@ function ar(e, t) {
|
|
|
3516
3545
|
throw b(
|
|
3517
3546
|
e.source,
|
|
3518
3547
|
r,
|
|
3519
|
-
`Invalid character within String: ${
|
|
3548
|
+
`Invalid character within String: ${Y(
|
|
3520
3549
|
e,
|
|
3521
3550
|
r
|
|
3522
3551
|
)}.`
|
|
@@ -3524,20 +3553,20 @@ function ar(e, t) {
|
|
|
3524
3553
|
}
|
|
3525
3554
|
throw b(e.source, r, "Unterminated string.");
|
|
3526
3555
|
}
|
|
3527
|
-
function
|
|
3556
|
+
function dr(e, t) {
|
|
3528
3557
|
const n = e.source.body;
|
|
3529
3558
|
let s = 0, r = 3;
|
|
3530
3559
|
for (; r < 12; ) {
|
|
3531
3560
|
const i = n.charCodeAt(t + r++);
|
|
3532
3561
|
if (i === 125) {
|
|
3533
|
-
if (r < 5 || !
|
|
3562
|
+
if (r < 5 || !se(s))
|
|
3534
3563
|
break;
|
|
3535
3564
|
return {
|
|
3536
3565
|
value: String.fromCodePoint(s),
|
|
3537
3566
|
size: r
|
|
3538
3567
|
};
|
|
3539
3568
|
}
|
|
3540
|
-
if (s = s << 4 |
|
|
3569
|
+
if (s = s << 4 | oe(i), s < 0)
|
|
3541
3570
|
break;
|
|
3542
3571
|
}
|
|
3543
3572
|
throw b(
|
|
@@ -3549,16 +3578,16 @@ function cr(e, t) {
|
|
|
3549
3578
|
)}".`
|
|
3550
3579
|
);
|
|
3551
3580
|
}
|
|
3552
|
-
function
|
|
3553
|
-
const n = e.source.body, s =
|
|
3554
|
-
if (
|
|
3581
|
+
function lr(e, t) {
|
|
3582
|
+
const n = e.source.body, s = Nt(n, t + 2);
|
|
3583
|
+
if (se(s))
|
|
3555
3584
|
return {
|
|
3556
3585
|
value: String.fromCodePoint(s),
|
|
3557
3586
|
size: 6
|
|
3558
3587
|
};
|
|
3559
|
-
if (
|
|
3560
|
-
const r =
|
|
3561
|
-
if (
|
|
3588
|
+
if (dn(s) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
3589
|
+
const r = Nt(n, t + 8);
|
|
3590
|
+
if (ln(r))
|
|
3562
3591
|
return {
|
|
3563
3592
|
value: String.fromCodePoint(s, r),
|
|
3564
3593
|
size: 12
|
|
@@ -3570,13 +3599,13 @@ function ur(e, t) {
|
|
|
3570
3599
|
`Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
|
|
3571
3600
|
);
|
|
3572
3601
|
}
|
|
3573
|
-
function
|
|
3574
|
-
return
|
|
3602
|
+
function Nt(e, t) {
|
|
3603
|
+
return oe(e.charCodeAt(t)) << 12 | oe(e.charCodeAt(t + 1)) << 8 | oe(e.charCodeAt(t + 2)) << 4 | oe(e.charCodeAt(t + 3));
|
|
3575
3604
|
}
|
|
3576
|
-
function
|
|
3605
|
+
function oe(e) {
|
|
3577
3606
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
3578
3607
|
}
|
|
3579
|
-
function
|
|
3608
|
+
function hr(e, t) {
|
|
3580
3609
|
const n = e.source.body;
|
|
3581
3610
|
switch (n.charCodeAt(t + 1)) {
|
|
3582
3611
|
case 34:
|
|
@@ -3630,7 +3659,7 @@ function dr(e, t) {
|
|
|
3630
3659
|
)}".`
|
|
3631
3660
|
);
|
|
3632
3661
|
}
|
|
3633
|
-
function
|
|
3662
|
+
function fr(e, t) {
|
|
3634
3663
|
const n = e.source.body, s = n.length;
|
|
3635
3664
|
let r = e.lineStart, i = t + 3, o = i, a = "";
|
|
3636
3665
|
const c = [];
|
|
@@ -3644,7 +3673,7 @@ function lr(e, t) {
|
|
|
3644
3673
|
t,
|
|
3645
3674
|
i + 3,
|
|
3646
3675
|
// Return a string of the lines joined with U+000A.
|
|
3647
|
-
|
|
3676
|
+
tr(c).join(`
|
|
3648
3677
|
`)
|
|
3649
3678
|
);
|
|
3650
3679
|
return e.line += c.length - 1, e.lineStart = r, h;
|
|
@@ -3657,7 +3686,7 @@ function lr(e, t) {
|
|
|
3657
3686
|
a += n.slice(o, i), c.push(a), u === 13 && n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, a = "", o = i, r = i;
|
|
3658
3687
|
continue;
|
|
3659
3688
|
}
|
|
3660
|
-
if (
|
|
3689
|
+
if (se(u))
|
|
3661
3690
|
++i;
|
|
3662
3691
|
else if (xe(n, i))
|
|
3663
3692
|
i += 2;
|
|
@@ -3665,7 +3694,7 @@ function lr(e, t) {
|
|
|
3665
3694
|
throw b(
|
|
3666
3695
|
e.source,
|
|
3667
3696
|
i,
|
|
3668
|
-
`Invalid character within String: ${
|
|
3697
|
+
`Invalid character within String: ${Y(
|
|
3669
3698
|
e,
|
|
3670
3699
|
i
|
|
3671
3700
|
)}.`
|
|
@@ -3673,12 +3702,12 @@ function lr(e, t) {
|
|
|
3673
3702
|
}
|
|
3674
3703
|
throw b(e.source, i, "Unterminated string.");
|
|
3675
3704
|
}
|
|
3676
|
-
function
|
|
3705
|
+
function pr(e, t) {
|
|
3677
3706
|
const n = e.source.body, s = n.length;
|
|
3678
3707
|
let r = t + 1;
|
|
3679
3708
|
for (; r < s; ) {
|
|
3680
3709
|
const i = n.charCodeAt(r);
|
|
3681
|
-
if (
|
|
3710
|
+
if (er(i))
|
|
3682
3711
|
++r;
|
|
3683
3712
|
else
|
|
3684
3713
|
break;
|
|
@@ -3691,8 +3720,8 @@ function hr(e, t) {
|
|
|
3691
3720
|
n.slice(t, r)
|
|
3692
3721
|
);
|
|
3693
3722
|
}
|
|
3694
|
-
const
|
|
3695
|
-
function
|
|
3723
|
+
const yr = 10, hn = 2;
|
|
3724
|
+
function at(e) {
|
|
3696
3725
|
return we(e, []);
|
|
3697
3726
|
}
|
|
3698
3727
|
function we(e, t) {
|
|
@@ -3702,45 +3731,45 @@ function we(e, t) {
|
|
|
3702
3731
|
case "function":
|
|
3703
3732
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
3704
3733
|
case "object":
|
|
3705
|
-
return
|
|
3734
|
+
return mr(e, t);
|
|
3706
3735
|
default:
|
|
3707
3736
|
return String(e);
|
|
3708
3737
|
}
|
|
3709
3738
|
}
|
|
3710
|
-
function
|
|
3739
|
+
function mr(e, t) {
|
|
3711
3740
|
if (e === null)
|
|
3712
3741
|
return "null";
|
|
3713
3742
|
if (t.includes(e))
|
|
3714
3743
|
return "[Circular]";
|
|
3715
3744
|
const n = [...t, e];
|
|
3716
|
-
if (
|
|
3745
|
+
if (gr(e)) {
|
|
3717
3746
|
const s = e.toJSON();
|
|
3718
3747
|
if (s !== e)
|
|
3719
3748
|
return typeof s == "string" ? s : we(s, n);
|
|
3720
3749
|
} else if (Array.isArray(e))
|
|
3721
|
-
return
|
|
3722
|
-
return
|
|
3750
|
+
return vr(e, n);
|
|
3751
|
+
return Er(e, n);
|
|
3723
3752
|
}
|
|
3724
|
-
function
|
|
3753
|
+
function gr(e) {
|
|
3725
3754
|
return typeof e.toJSON == "function";
|
|
3726
3755
|
}
|
|
3727
|
-
function
|
|
3756
|
+
function Er(e, t) {
|
|
3728
3757
|
const n = Object.entries(e);
|
|
3729
|
-
return n.length === 0 ? "{}" : t.length >
|
|
3758
|
+
return n.length === 0 ? "{}" : t.length > hn ? "[" + Tr(e) + "]" : "{ " + n.map(
|
|
3730
3759
|
([r, i]) => r + ": " + we(i, t)
|
|
3731
3760
|
).join(", ") + " }";
|
|
3732
3761
|
}
|
|
3733
|
-
function
|
|
3762
|
+
function vr(e, t) {
|
|
3734
3763
|
if (e.length === 0)
|
|
3735
3764
|
return "[]";
|
|
3736
|
-
if (t.length >
|
|
3765
|
+
if (t.length > hn)
|
|
3737
3766
|
return "[Array]";
|
|
3738
|
-
const n = Math.min(
|
|
3767
|
+
const n = Math.min(yr, e.length), s = e.length - n, r = [];
|
|
3739
3768
|
for (let i = 0; i < n; ++i)
|
|
3740
3769
|
r.push(we(e[i], t));
|
|
3741
3770
|
return s === 1 ? r.push("... 1 more item") : s > 1 && r.push(`... ${s} more items`), "[" + r.join(", ") + "]";
|
|
3742
3771
|
}
|
|
3743
|
-
function
|
|
3772
|
+
function Tr(e) {
|
|
3744
3773
|
const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
|
|
3745
3774
|
if (t === "Object" && typeof e.constructor == "function") {
|
|
3746
3775
|
const n = e.constructor.name;
|
|
@@ -3749,7 +3778,7 @@ function Er(e) {
|
|
|
3749
3778
|
}
|
|
3750
3779
|
return t;
|
|
3751
3780
|
}
|
|
3752
|
-
const
|
|
3781
|
+
const _r = (
|
|
3753
3782
|
/* c8 ignore next 6 */
|
|
3754
3783
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
3755
3784
|
globalThis.process && globalThis.process.env.NODE_ENV === "production" ? function(t, n) {
|
|
@@ -3764,7 +3793,7 @@ const vr = (
|
|
|
3764
3793
|
Symbol.toStringTag in t ? t[Symbol.toStringTag] : (s = t.constructor) === null || s === void 0 ? void 0 : s.name
|
|
3765
3794
|
);
|
|
3766
3795
|
if (r === i) {
|
|
3767
|
-
const o =
|
|
3796
|
+
const o = at(t);
|
|
3768
3797
|
throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
3769
3798
|
|
|
3770
3799
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
@@ -3782,12 +3811,12 @@ spurious results.`);
|
|
|
3782
3811
|
return !1;
|
|
3783
3812
|
}
|
|
3784
3813
|
);
|
|
3785
|
-
class
|
|
3814
|
+
class fn {
|
|
3786
3815
|
constructor(t, n = "GraphQL request", s = {
|
|
3787
3816
|
line: 1,
|
|
3788
3817
|
column: 1
|
|
3789
3818
|
}) {
|
|
3790
|
-
typeof t == "string" || me(!1, `Body must be a string. Received: ${
|
|
3819
|
+
typeof t == "string" || me(!1, `Body must be a string. Received: ${at(t)}.`), this.body = t, this.name = n, this.locationOffset = s, this.locationOffset.line > 0 || me(
|
|
3791
3820
|
!1,
|
|
3792
3821
|
"line in locationOffset is 1-indexed and must be positive."
|
|
3793
3822
|
), this.locationOffset.column > 0 || me(
|
|
@@ -3799,16 +3828,16 @@ class hn {
|
|
|
3799
3828
|
return "Source";
|
|
3800
3829
|
}
|
|
3801
3830
|
}
|
|
3802
|
-
function
|
|
3803
|
-
return
|
|
3831
|
+
function Ir(e) {
|
|
3832
|
+
return _r(e, fn);
|
|
3804
3833
|
}
|
|
3805
|
-
function
|
|
3806
|
-
return new
|
|
3834
|
+
function Sr(e, t) {
|
|
3835
|
+
return new Ar(e, t).parseDocument();
|
|
3807
3836
|
}
|
|
3808
|
-
class
|
|
3837
|
+
class Ar {
|
|
3809
3838
|
constructor(t, n = {}) {
|
|
3810
|
-
const s =
|
|
3811
|
-
this._lexer = new
|
|
3839
|
+
const s = Ir(t) ? t : new fn(t);
|
|
3840
|
+
this._lexer = new rr(s), this._options = n, this._tokenCounter = 0;
|
|
3812
3841
|
}
|
|
3813
3842
|
/**
|
|
3814
3843
|
* Converts a name lex token into a name parse node.
|
|
@@ -3910,7 +3939,7 @@ class Ir {
|
|
|
3910
3939
|
if (this.peek(p.BRACE_L))
|
|
3911
3940
|
return this.node(t, {
|
|
3912
3941
|
kind: T.OPERATION_DEFINITION,
|
|
3913
|
-
operation:
|
|
3942
|
+
operation: Z.QUERY,
|
|
3914
3943
|
name: void 0,
|
|
3915
3944
|
variableDefinitions: [],
|
|
3916
3945
|
directives: [],
|
|
@@ -3934,11 +3963,11 @@ class Ir {
|
|
|
3934
3963
|
const t = this.expectToken(p.NAME);
|
|
3935
3964
|
switch (t.value) {
|
|
3936
3965
|
case "query":
|
|
3937
|
-
return
|
|
3966
|
+
return Z.QUERY;
|
|
3938
3967
|
case "mutation":
|
|
3939
|
-
return
|
|
3968
|
+
return Z.MUTATION;
|
|
3940
3969
|
case "subscription":
|
|
3941
|
-
return
|
|
3970
|
+
return Z.SUBSCRIPTION;
|
|
3942
3971
|
}
|
|
3943
3972
|
throw this.unexpected(t);
|
|
3944
3973
|
}
|
|
@@ -4764,7 +4793,7 @@ class Ir {
|
|
|
4764
4793
|
*/
|
|
4765
4794
|
parseDirectiveLocation() {
|
|
4766
4795
|
const t = this._lexer.token, n = this.parseName();
|
|
4767
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
4796
|
+
if (Object.prototype.hasOwnProperty.call(Ve, n.value))
|
|
4768
4797
|
return n;
|
|
4769
4798
|
throw this.unexpected(t);
|
|
4770
4799
|
}
|
|
@@ -4775,7 +4804,7 @@ class Ir {
|
|
|
4775
4804
|
* given parsed object.
|
|
4776
4805
|
*/
|
|
4777
4806
|
node(t, n) {
|
|
4778
|
-
return this._options.noLocation !== !0 && (n.loc = new
|
|
4807
|
+
return this._options.noLocation !== !0 && (n.loc = new Ks(
|
|
4779
4808
|
t,
|
|
4780
4809
|
this._lexer.lastToken,
|
|
4781
4810
|
this._lexer.source
|
|
@@ -4798,7 +4827,7 @@ class Ir {
|
|
|
4798
4827
|
throw b(
|
|
4799
4828
|
this._lexer.source,
|
|
4800
4829
|
n.start,
|
|
4801
|
-
`Expected ${
|
|
4830
|
+
`Expected ${pn(t)}, found ${pe(n)}.`
|
|
4802
4831
|
);
|
|
4803
4832
|
}
|
|
4804
4833
|
/**
|
|
@@ -4908,19 +4937,19 @@ class Ir {
|
|
|
4908
4937
|
}
|
|
4909
4938
|
function pe(e) {
|
|
4910
4939
|
const t = e.value;
|
|
4911
|
-
return
|
|
4940
|
+
return pn(e.kind) + (t != null ? ` "${t}"` : "");
|
|
4912
4941
|
}
|
|
4913
|
-
function
|
|
4914
|
-
return
|
|
4915
|
-
}
|
|
4916
|
-
function Sr(e) {
|
|
4917
|
-
return `"${e.replace(Ar, xr)}"`;
|
|
4942
|
+
function pn(e) {
|
|
4943
|
+
return ir(e) ? `"${e}"` : e;
|
|
4918
4944
|
}
|
|
4919
|
-
const Ar = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
4920
4945
|
function xr(e) {
|
|
4921
|
-
return
|
|
4946
|
+
return `"${e.replace(wr, br)}"`;
|
|
4922
4947
|
}
|
|
4923
|
-
const wr = [
|
|
4948
|
+
const wr = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
4949
|
+
function br(e) {
|
|
4950
|
+
return Or[e.charCodeAt(0)];
|
|
4951
|
+
}
|
|
4952
|
+
const Or = [
|
|
4924
4953
|
"\\u0000",
|
|
4925
4954
|
"\\u0001",
|
|
4926
4955
|
"\\u0002",
|
|
@@ -5086,32 +5115,32 @@ const wr = [
|
|
|
5086
5115
|
"\\u009D",
|
|
5087
5116
|
"\\u009E",
|
|
5088
5117
|
"\\u009F"
|
|
5089
|
-
],
|
|
5090
|
-
function
|
|
5118
|
+
], Nr = Object.freeze({});
|
|
5119
|
+
function kr(e, t, n = an) {
|
|
5091
5120
|
const s = /* @__PURE__ */ new Map();
|
|
5092
5121
|
for (const x of Object.values(T))
|
|
5093
|
-
s.set(x,
|
|
5122
|
+
s.set(x, Cr(t, x));
|
|
5094
5123
|
let r, i = Array.isArray(e), o = [e], a = -1, c = [], u = e, h, d;
|
|
5095
5124
|
const f = [], m = [];
|
|
5096
5125
|
do {
|
|
5097
5126
|
a++;
|
|
5098
|
-
const x = a === o.length,
|
|
5127
|
+
const x = a === o.length, R = x && c.length !== 0;
|
|
5099
5128
|
if (x) {
|
|
5100
|
-
if (h = m.length === 0 ? void 0 : f[f.length - 1], u = d, d = m.pop(),
|
|
5129
|
+
if (h = m.length === 0 ? void 0 : f[f.length - 1], u = d, d = m.pop(), R)
|
|
5101
5130
|
if (i) {
|
|
5102
5131
|
u = u.slice();
|
|
5103
5132
|
let M = 0;
|
|
5104
|
-
for (const [
|
|
5105
|
-
const le =
|
|
5106
|
-
|
|
5133
|
+
for (const [U, $] of c) {
|
|
5134
|
+
const le = U - M;
|
|
5135
|
+
$ === null ? (u.splice(le, 1), M++) : u[le] = $;
|
|
5107
5136
|
}
|
|
5108
5137
|
} else {
|
|
5109
5138
|
u = Object.defineProperties(
|
|
5110
5139
|
{},
|
|
5111
5140
|
Object.getOwnPropertyDescriptors(u)
|
|
5112
5141
|
);
|
|
5113
|
-
for (const [M,
|
|
5114
|
-
u[M] =
|
|
5142
|
+
for (const [M, U] of c)
|
|
5143
|
+
u[M] = U;
|
|
5115
5144
|
}
|
|
5116
5145
|
a = r.index, o = r.keys, c = r.edits, i = r.inArray, r = r.prev;
|
|
5117
5146
|
} else if (d) {
|
|
@@ -5119,27 +5148,27 @@ function Or(e, t, n = on) {
|
|
|
5119
5148
|
continue;
|
|
5120
5149
|
f.push(h);
|
|
5121
5150
|
}
|
|
5122
|
-
let
|
|
5151
|
+
let k;
|
|
5123
5152
|
if (!Array.isArray(u)) {
|
|
5124
5153
|
var y, v;
|
|
5125
|
-
|
|
5154
|
+
Ot(u) || me(!1, `Invalid AST Node: ${at(u)}.`);
|
|
5126
5155
|
const M = x ? (y = s.get(u.kind)) === null || y === void 0 ? void 0 : y.leave : (v = s.get(u.kind)) === null || v === void 0 ? void 0 : v.enter;
|
|
5127
|
-
if (
|
|
5156
|
+
if (k = M == null ? void 0 : M.call(t, u, h, d, f, m), k === Nr)
|
|
5128
5157
|
break;
|
|
5129
|
-
if (
|
|
5158
|
+
if (k === !1) {
|
|
5130
5159
|
if (!x) {
|
|
5131
5160
|
f.pop();
|
|
5132
5161
|
continue;
|
|
5133
5162
|
}
|
|
5134
|
-
} else if (
|
|
5135
|
-
if (
|
|
5136
|
-
u =
|
|
5163
|
+
} else if (k !== void 0 && (c.push([h, k]), !x))
|
|
5164
|
+
if (Ot(k))
|
|
5165
|
+
u = k;
|
|
5137
5166
|
else {
|
|
5138
5167
|
f.pop();
|
|
5139
5168
|
continue;
|
|
5140
5169
|
}
|
|
5141
5170
|
}
|
|
5142
|
-
if (
|
|
5171
|
+
if (k === void 0 && R && c.push([h, u]), x)
|
|
5143
5172
|
f.pop();
|
|
5144
5173
|
else {
|
|
5145
5174
|
var S;
|
|
@@ -5154,7 +5183,7 @@ function Or(e, t, n = on) {
|
|
|
5154
5183
|
} while (r !== void 0);
|
|
5155
5184
|
return c.length !== 0 ? c[c.length - 1][1] : e;
|
|
5156
5185
|
}
|
|
5157
|
-
function
|
|
5186
|
+
function Cr(e, t) {
|
|
5158
5187
|
const n = e[t];
|
|
5159
5188
|
return typeof n == "object" ? n : typeof n == "function" ? {
|
|
5160
5189
|
enter: n,
|
|
@@ -5164,10 +5193,10 @@ function Nr(e, t) {
|
|
|
5164
5193
|
leave: e.leave
|
|
5165
5194
|
};
|
|
5166
5195
|
}
|
|
5167
|
-
function
|
|
5168
|
-
return
|
|
5196
|
+
function yn(e) {
|
|
5197
|
+
return kr(e, Rr);
|
|
5169
5198
|
}
|
|
5170
|
-
const
|
|
5199
|
+
const Dr = 80, Rr = {
|
|
5171
5200
|
Name: {
|
|
5172
5201
|
leave: (e) => e.value
|
|
5173
5202
|
},
|
|
@@ -5197,13 +5226,13 @@ const kr = 80, Cr = {
|
|
|
5197
5226
|
leave: ({ variable: e, type: t, defaultValue: n, directives: s }) => e + ": " + t + I(" = ", n) + I(" ", E(s, " "))
|
|
5198
5227
|
},
|
|
5199
5228
|
SelectionSet: {
|
|
5200
|
-
leave: ({ selections: e }) =>
|
|
5229
|
+
leave: ({ selections: e }) => q(e)
|
|
5201
5230
|
},
|
|
5202
5231
|
Field: {
|
|
5203
5232
|
leave({ alias: e, name: t, arguments: n, directives: s, selectionSet: r }) {
|
|
5204
5233
|
const i = I("", e, ": ") + t;
|
|
5205
5234
|
let o = i + I("(", E(n, ", "), ")");
|
|
5206
|
-
return o.length >
|
|
5235
|
+
return o.length > Dr && (o = i + I(`(
|
|
5207
5236
|
`, ge(E(n, `
|
|
5208
5237
|
`)), `
|
|
5209
5238
|
)`)), E([o, E(s, " "), r], " ");
|
|
@@ -5241,7 +5270,7 @@ const kr = 80, Cr = {
|
|
|
5241
5270
|
leave: ({ value: e }) => e
|
|
5242
5271
|
},
|
|
5243
5272
|
StringValue: {
|
|
5244
|
-
leave: ({ value: e, block: t }) => t ?
|
|
5273
|
+
leave: ({ value: e, block: t }) => t ? sr(e) : xr(e)
|
|
5245
5274
|
},
|
|
5246
5275
|
BooleanValue: {
|
|
5247
5276
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -5278,7 +5307,7 @@ const kr = 80, Cr = {
|
|
|
5278
5307
|
// Type System Definitions
|
|
5279
5308
|
SchemaDefinition: {
|
|
5280
5309
|
leave: ({ description: e, directives: t, operationTypes: n }) => I("", e, `
|
|
5281
|
-
`) + E(["schema", E(t, " "),
|
|
5310
|
+
`) + E(["schema", E(t, " "), q(n)], " ")
|
|
5282
5311
|
},
|
|
5283
5312
|
OperationTypeDefinition: {
|
|
5284
5313
|
leave: ({ operation: e, type: t }) => e + ": " + t
|
|
@@ -5295,14 +5324,14 @@ const kr = 80, Cr = {
|
|
|
5295
5324
|
t,
|
|
5296
5325
|
I("implements ", E(n, " & ")),
|
|
5297
5326
|
E(s, " "),
|
|
5298
|
-
|
|
5327
|
+
q(r)
|
|
5299
5328
|
],
|
|
5300
5329
|
" "
|
|
5301
5330
|
)
|
|
5302
5331
|
},
|
|
5303
5332
|
FieldDefinition: {
|
|
5304
5333
|
leave: ({ description: e, name: t, arguments: n, type: s, directives: r }) => I("", e, `
|
|
5305
|
-
`) + t + (
|
|
5334
|
+
`) + t + (kt(n) ? I(`(
|
|
5306
5335
|
`, ge(E(n, `
|
|
5307
5336
|
`)), `
|
|
5308
5337
|
)`) : I("(", E(n, ", "), ")")) + ": " + s + I(" ", E(r, " "))
|
|
@@ -5322,7 +5351,7 @@ const kr = 80, Cr = {
|
|
|
5322
5351
|
t,
|
|
5323
5352
|
I("implements ", E(n, " & ")),
|
|
5324
5353
|
E(s, " "),
|
|
5325
|
-
|
|
5354
|
+
q(r)
|
|
5326
5355
|
],
|
|
5327
5356
|
" "
|
|
5328
5357
|
)
|
|
@@ -5336,7 +5365,7 @@ const kr = 80, Cr = {
|
|
|
5336
5365
|
},
|
|
5337
5366
|
EnumTypeDefinition: {
|
|
5338
5367
|
leave: ({ description: e, name: t, directives: n, values: s }) => I("", e, `
|
|
5339
|
-
`) + E(["enum", t, E(n, " "),
|
|
5368
|
+
`) + E(["enum", t, E(n, " "), q(s)], " ")
|
|
5340
5369
|
},
|
|
5341
5370
|
EnumValueDefinition: {
|
|
5342
5371
|
leave: ({ description: e, name: t, directives: n }) => I("", e, `
|
|
@@ -5344,18 +5373,18 @@ const kr = 80, Cr = {
|
|
|
5344
5373
|
},
|
|
5345
5374
|
InputObjectTypeDefinition: {
|
|
5346
5375
|
leave: ({ description: e, name: t, directives: n, fields: s }) => I("", e, `
|
|
5347
|
-
`) + E(["input", t, E(n, " "),
|
|
5376
|
+
`) + E(["input", t, E(n, " "), q(s)], " ")
|
|
5348
5377
|
},
|
|
5349
5378
|
DirectiveDefinition: {
|
|
5350
5379
|
leave: ({ description: e, name: t, arguments: n, repeatable: s, locations: r }) => I("", e, `
|
|
5351
|
-
`) + "directive @" + t + (
|
|
5380
|
+
`) + "directive @" + t + (kt(n) ? I(`(
|
|
5352
5381
|
`, ge(E(n, `
|
|
5353
5382
|
`)), `
|
|
5354
5383
|
)`) : I("(", E(n, ", "), ")")) + (s ? " repeatable" : "") + " on " + E(r, " | ")
|
|
5355
5384
|
},
|
|
5356
5385
|
SchemaExtension: {
|
|
5357
5386
|
leave: ({ directives: e, operationTypes: t }) => E(
|
|
5358
|
-
["extend schema", E(e, " "),
|
|
5387
|
+
["extend schema", E(e, " "), q(t)],
|
|
5359
5388
|
" "
|
|
5360
5389
|
)
|
|
5361
5390
|
},
|
|
@@ -5369,7 +5398,7 @@ const kr = 80, Cr = {
|
|
|
5369
5398
|
e,
|
|
5370
5399
|
I("implements ", E(t, " & ")),
|
|
5371
5400
|
E(n, " "),
|
|
5372
|
-
|
|
5401
|
+
q(s)
|
|
5373
5402
|
],
|
|
5374
5403
|
" "
|
|
5375
5404
|
)
|
|
@@ -5381,7 +5410,7 @@ const kr = 80, Cr = {
|
|
|
5381
5410
|
e,
|
|
5382
5411
|
I("implements ", E(t, " & ")),
|
|
5383
5412
|
E(n, " "),
|
|
5384
|
-
|
|
5413
|
+
q(s)
|
|
5385
5414
|
],
|
|
5386
5415
|
" "
|
|
5387
5416
|
)
|
|
@@ -5398,17 +5427,17 @@ const kr = 80, Cr = {
|
|
|
5398
5427
|
)
|
|
5399
5428
|
},
|
|
5400
5429
|
EnumTypeExtension: {
|
|
5401
|
-
leave: ({ name: e, directives: t, values: n }) => E(["extend enum", e, E(t, " "),
|
|
5430
|
+
leave: ({ name: e, directives: t, values: n }) => E(["extend enum", e, E(t, " "), q(n)], " ")
|
|
5402
5431
|
},
|
|
5403
5432
|
InputObjectTypeExtension: {
|
|
5404
|
-
leave: ({ name: e, directives: t, fields: n }) => E(["extend input", e, E(t, " "),
|
|
5433
|
+
leave: ({ name: e, directives: t, fields: n }) => E(["extend input", e, E(t, " "), q(n)], " ")
|
|
5405
5434
|
}
|
|
5406
5435
|
};
|
|
5407
5436
|
function E(e, t = "") {
|
|
5408
5437
|
var n;
|
|
5409
5438
|
return (n = e == null ? void 0 : e.filter((s) => s).join(t)) !== null && n !== void 0 ? n : "";
|
|
5410
5439
|
}
|
|
5411
|
-
function
|
|
5440
|
+
function q(e) {
|
|
5412
5441
|
return I(`{
|
|
5413
5442
|
`, ge(E(e, `
|
|
5414
5443
|
`)), `
|
|
@@ -5421,49 +5450,49 @@ function ge(e) {
|
|
|
5421
5450
|
return I(" ", e.replace(/\n/g, `
|
|
5422
5451
|
`));
|
|
5423
5452
|
}
|
|
5424
|
-
function
|
|
5453
|
+
function kt(e) {
|
|
5425
5454
|
var t;
|
|
5426
5455
|
return (t = e == null ? void 0 : e.some((n) => n.includes(`
|
|
5427
5456
|
`))) !== null && t !== void 0 ? t : !1;
|
|
5428
5457
|
}
|
|
5429
|
-
const
|
|
5458
|
+
const Ct = (e) => {
|
|
5430
5459
|
var s, r;
|
|
5431
5460
|
let t;
|
|
5432
5461
|
const n = e.definitions.filter((i) => i.kind === "OperationDefinition");
|
|
5433
5462
|
return n.length === 1 && (t = (r = (s = n[0]) == null ? void 0 : s.name) == null ? void 0 : r.value), t;
|
|
5434
|
-
},
|
|
5463
|
+
}, Me = (e) => {
|
|
5435
5464
|
if (typeof e == "string") {
|
|
5436
5465
|
let n;
|
|
5437
5466
|
try {
|
|
5438
|
-
const s =
|
|
5439
|
-
n =
|
|
5467
|
+
const s = Sr(e);
|
|
5468
|
+
n = Ct(s);
|
|
5440
5469
|
} catch {
|
|
5441
5470
|
}
|
|
5442
5471
|
return { query: e, operationName: n };
|
|
5443
5472
|
}
|
|
5444
|
-
const t =
|
|
5445
|
-
return { query:
|
|
5473
|
+
const t = Ct(e);
|
|
5474
|
+
return { query: yn(e), operationName: t };
|
|
5446
5475
|
};
|
|
5447
|
-
class
|
|
5476
|
+
class ae extends Error {
|
|
5448
5477
|
constructor(t, n) {
|
|
5449
|
-
const s = `${
|
|
5478
|
+
const s = `${ae.extractMessage(t)}: ${JSON.stringify({
|
|
5450
5479
|
response: t,
|
|
5451
5480
|
request: n
|
|
5452
5481
|
})}`;
|
|
5453
|
-
super(s), Object.setPrototypeOf(this,
|
|
5482
|
+
super(s), Object.setPrototypeOf(this, ae.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, ae);
|
|
5454
5483
|
}
|
|
5455
5484
|
static extractMessage(t) {
|
|
5456
5485
|
var n, s;
|
|
5457
5486
|
return ((s = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : s.message) ?? `GraphQL Error (Code: ${t.status})`;
|
|
5458
5487
|
}
|
|
5459
5488
|
}
|
|
5460
|
-
var
|
|
5461
|
-
function
|
|
5489
|
+
var Mr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5490
|
+
function qr(e) {
|
|
5462
5491
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5463
5492
|
}
|
|
5464
|
-
var
|
|
5493
|
+
var Ge = { exports: {} };
|
|
5465
5494
|
(function(e, t) {
|
|
5466
|
-
var n = typeof self < "u" ? self :
|
|
5495
|
+
var n = typeof self < "u" ? self : Mr, s = function() {
|
|
5467
5496
|
function i() {
|
|
5468
5497
|
this.fetch = !1, this.DOMException = n.DOMException;
|
|
5469
5498
|
}
|
|
@@ -5578,11 +5607,11 @@ var He = { exports: {} };
|
|
|
5578
5607
|
var g = new FileReader(), _ = S(g);
|
|
5579
5608
|
return g.readAsArrayBuffer(l), _;
|
|
5580
5609
|
}
|
|
5581
|
-
function
|
|
5610
|
+
function R(l) {
|
|
5582
5611
|
var g = new FileReader(), _ = S(g);
|
|
5583
5612
|
return g.readAsText(l), _;
|
|
5584
5613
|
}
|
|
5585
|
-
function
|
|
5614
|
+
function k(l) {
|
|
5586
5615
|
for (var g = new Uint8Array(l), _ = new Array(g.length), N = 0; N < g.length; N++)
|
|
5587
5616
|
_[N] = String.fromCharCode(g[N]);
|
|
5588
5617
|
return _.join("");
|
|
@@ -5593,7 +5622,7 @@ var He = { exports: {} };
|
|
|
5593
5622
|
var g = new Uint8Array(l.byteLength);
|
|
5594
5623
|
return g.set(new Uint8Array(l)), g.buffer;
|
|
5595
5624
|
}
|
|
5596
|
-
function
|
|
5625
|
+
function U() {
|
|
5597
5626
|
return this.bodyUsed = !1, this._initBody = function(l) {
|
|
5598
5627
|
this._bodyInit = l, l ? typeof l == "string" ? this._bodyText = l : a.blob && Blob.prototype.isPrototypeOf(l) ? this._bodyBlob = l : a.formData && FormData.prototype.isPrototypeOf(l) ? this._bodyFormData = l : a.searchParams && URLSearchParams.prototype.isPrototypeOf(l) ? this._bodyText = l.toString() : a.arrayBuffer && a.blob && c(l) ? (this._bodyArrayBuffer = M(l.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(l) || h(l)) ? this._bodyArrayBuffer = M(l) : this._bodyText = l = Object.prototype.toString.call(l) : this._bodyText = "", this.headers.get("content-type") || (typeof l == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : a.searchParams && URLSearchParams.prototype.isPrototypeOf(l) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
5599
5628
|
}, a.blob && (this.blob = function() {
|
|
@@ -5614,9 +5643,9 @@ var He = { exports: {} };
|
|
|
5614
5643
|
if (l)
|
|
5615
5644
|
return l;
|
|
5616
5645
|
if (this._bodyBlob)
|
|
5617
|
-
return
|
|
5646
|
+
return R(this._bodyBlob);
|
|
5618
5647
|
if (this._bodyArrayBuffer)
|
|
5619
|
-
return Promise.resolve(
|
|
5648
|
+
return Promise.resolve(k(this._bodyArrayBuffer));
|
|
5620
5649
|
if (this._bodyFormData)
|
|
5621
5650
|
throw new Error("could not read FormData body as text");
|
|
5622
5651
|
return Promise.resolve(this._bodyText);
|
|
@@ -5626,15 +5655,15 @@ var He = { exports: {} };
|
|
|
5626
5655
|
return this.text().then(JSON.parse);
|
|
5627
5656
|
}, this;
|
|
5628
5657
|
}
|
|
5629
|
-
var
|
|
5658
|
+
var $ = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
5630
5659
|
function le(l) {
|
|
5631
5660
|
var g = l.toUpperCase();
|
|
5632
|
-
return
|
|
5661
|
+
return $.indexOf(g) > -1 ? g : l;
|
|
5633
5662
|
}
|
|
5634
|
-
function
|
|
5663
|
+
function V(l, g) {
|
|
5635
5664
|
g = g || {};
|
|
5636
5665
|
var _ = g.body;
|
|
5637
|
-
if (l instanceof
|
|
5666
|
+
if (l instanceof V) {
|
|
5638
5667
|
if (l.bodyUsed)
|
|
5639
5668
|
throw new TypeError("Already read");
|
|
5640
5669
|
this.url = l.url, this.credentials = l.credentials, g.headers || (this.headers = new y(l.headers)), this.method = l.method, this.mode = l.mode, this.signal = l.signal, !_ && l._bodyInit != null && (_ = l._bodyInit, l.bodyUsed = !0);
|
|
@@ -5644,8 +5673,8 @@ var He = { exports: {} };
|
|
|
5644
5673
|
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
5645
5674
|
this._initBody(_);
|
|
5646
5675
|
}
|
|
5647
|
-
|
|
5648
|
-
return new
|
|
5676
|
+
V.prototype.clone = function() {
|
|
5677
|
+
return new V(this, { body: this._bodyInit });
|
|
5649
5678
|
};
|
|
5650
5679
|
function En(l) {
|
|
5651
5680
|
var g = new FormData();
|
|
@@ -5666,26 +5695,26 @@ var He = { exports: {} };
|
|
|
5666
5695
|
}
|
|
5667
5696
|
}), g;
|
|
5668
5697
|
}
|
|
5669
|
-
|
|
5670
|
-
function
|
|
5698
|
+
U.call(V.prototype);
|
|
5699
|
+
function L(l, g) {
|
|
5671
5700
|
g || (g = {}), this.type = "default", this.status = g.status === void 0 ? 200 : g.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in g ? g.statusText : "OK", this.headers = new y(g.headers), this.url = g.url || "", this._initBody(l);
|
|
5672
5701
|
}
|
|
5673
|
-
|
|
5674
|
-
return new
|
|
5702
|
+
U.call(L.prototype), L.prototype.clone = function() {
|
|
5703
|
+
return new L(this._bodyInit, {
|
|
5675
5704
|
status: this.status,
|
|
5676
5705
|
statusText: this.statusText,
|
|
5677
5706
|
headers: new y(this.headers),
|
|
5678
5707
|
url: this.url
|
|
5679
5708
|
});
|
|
5680
|
-
},
|
|
5681
|
-
var l = new
|
|
5709
|
+
}, L.error = function() {
|
|
5710
|
+
var l = new L(null, { status: 0, statusText: "" });
|
|
5682
5711
|
return l.type = "error", l;
|
|
5683
5712
|
};
|
|
5684
5713
|
var Tn = [301, 302, 303, 307, 308];
|
|
5685
|
-
|
|
5714
|
+
L.redirect = function(l, g) {
|
|
5686
5715
|
if (Tn.indexOf(g) === -1)
|
|
5687
5716
|
throw new RangeError("Invalid status code");
|
|
5688
|
-
return new
|
|
5717
|
+
return new L(null, { status: g, headers: { location: l } });
|
|
5689
5718
|
}, o.DOMException = i.DOMException;
|
|
5690
5719
|
try {
|
|
5691
5720
|
new o.DOMException();
|
|
@@ -5698,7 +5727,7 @@ var He = { exports: {} };
|
|
|
5698
5727
|
}
|
|
5699
5728
|
function be(l, g) {
|
|
5700
5729
|
return new Promise(function(_, N) {
|
|
5701
|
-
var O = new
|
|
5730
|
+
var O = new V(l, g);
|
|
5702
5731
|
if (O.signal && O.signal.aborted)
|
|
5703
5732
|
return N(new o.DOMException("Aborted", "AbortError"));
|
|
5704
5733
|
var A = new XMLHttpRequest();
|
|
@@ -5706,62 +5735,62 @@ var He = { exports: {} };
|
|
|
5706
5735
|
A.abort();
|
|
5707
5736
|
}
|
|
5708
5737
|
A.onload = function() {
|
|
5709
|
-
var
|
|
5738
|
+
var re = {
|
|
5710
5739
|
status: A.status,
|
|
5711
5740
|
statusText: A.statusText,
|
|
5712
5741
|
headers: vn(A.getAllResponseHeaders() || "")
|
|
5713
5742
|
};
|
|
5714
|
-
|
|
5743
|
+
re.url = "responseURL" in A ? A.responseURL : re.headers.get("X-Request-URL");
|
|
5715
5744
|
var Oe = "response" in A ? A.response : A.responseText;
|
|
5716
|
-
_(new
|
|
5745
|
+
_(new L(Oe, re));
|
|
5717
5746
|
}, A.onerror = function() {
|
|
5718
5747
|
N(new TypeError("Network request failed"));
|
|
5719
5748
|
}, A.ontimeout = function() {
|
|
5720
5749
|
N(new TypeError("Network request failed"));
|
|
5721
5750
|
}, A.onabort = function() {
|
|
5722
5751
|
N(new o.DOMException("Aborted", "AbortError"));
|
|
5723
|
-
}, A.open(O.method, O.url, !0), O.credentials === "include" ? A.withCredentials = !0 : O.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && a.blob && (A.responseType = "blob"), O.headers.forEach(function(
|
|
5724
|
-
A.setRequestHeader(Oe,
|
|
5752
|
+
}, A.open(O.method, O.url, !0), O.credentials === "include" ? A.withCredentials = !0 : O.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && a.blob && (A.responseType = "blob"), O.headers.forEach(function(re, Oe) {
|
|
5753
|
+
A.setRequestHeader(Oe, re);
|
|
5725
5754
|
}), O.signal && (O.signal.addEventListener("abort", he), A.onreadystatechange = function() {
|
|
5726
5755
|
A.readyState === 4 && O.signal.removeEventListener("abort", he);
|
|
5727
5756
|
}), A.send(typeof O._bodyInit > "u" ? null : O._bodyInit);
|
|
5728
5757
|
});
|
|
5729
5758
|
}
|
|
5730
|
-
return be.polyfill = !0, i.fetch || (i.fetch = be, i.Headers = y, i.Request =
|
|
5759
|
+
return be.polyfill = !0, i.fetch || (i.fetch = be, i.Headers = y, i.Request = V, i.Response = L), o.Headers = y, o.Request = V, o.Response = L, o.fetch = be, Object.defineProperty(o, "__esModule", { value: !0 }), o;
|
|
5731
5760
|
})({});
|
|
5732
5761
|
})(s), s.fetch.ponyfill = !0, delete s.fetch.polyfill;
|
|
5733
5762
|
var r = s;
|
|
5734
5763
|
t = r.fetch, t.default = r.fetch, t.fetch = r.fetch, t.Headers = r.Headers, t.Request = r.Request, t.Response = r.Response, e.exports = t;
|
|
5735
|
-
})(
|
|
5736
|
-
var Ie =
|
|
5737
|
-
const Ee = /* @__PURE__ */
|
|
5764
|
+
})(Ge, Ge.exports);
|
|
5765
|
+
var Ie = Ge.exports;
|
|
5766
|
+
const Ee = /* @__PURE__ */ qr(Ie), Lr = /* @__PURE__ */ In({
|
|
5738
5767
|
__proto__: null,
|
|
5739
5768
|
default: Ee
|
|
5740
|
-
}, [Ie]),
|
|
5769
|
+
}, [Ie]), Q = (e) => {
|
|
5741
5770
|
let t = {};
|
|
5742
|
-
return e && (typeof Headers < "u" && e instanceof Headers ||
|
|
5771
|
+
return e && (typeof Headers < "u" && e instanceof Headers || Lr && Ie.Headers && e instanceof Ie.Headers ? t = $s(e) : Array.isArray(e) ? e.forEach(([n, s]) => {
|
|
5743
5772
|
n && s !== void 0 && (t[n] = s);
|
|
5744
5773
|
}) : t = e), t;
|
|
5745
|
-
},
|
|
5774
|
+
}, Dt = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Ur = (e) => {
|
|
5746
5775
|
if (!Array.isArray(e.query)) {
|
|
5747
|
-
const s = e, r = [`query=${encodeURIComponent(
|
|
5776
|
+
const s = e, r = [`query=${encodeURIComponent(Dt(s.query))}`];
|
|
5748
5777
|
return e.variables && r.push(`variables=${encodeURIComponent(s.jsonSerializer.stringify(s.variables))}`), s.operationName && r.push(`operationName=${encodeURIComponent(s.operationName)}`), r.join("&");
|
|
5749
5778
|
}
|
|
5750
5779
|
if (typeof e.variables < "u" && !Array.isArray(e.variables))
|
|
5751
5780
|
throw new Error("Cannot create query with given variable type, array expected");
|
|
5752
5781
|
const t = e, n = e.query.reduce((s, r, i) => (s.push({
|
|
5753
|
-
query:
|
|
5782
|
+
query: Dt(r),
|
|
5754
5783
|
variables: t.variables ? t.jsonSerializer.stringify(t.variables[i]) : void 0
|
|
5755
5784
|
}), s), []);
|
|
5756
5785
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
5757
|
-
},
|
|
5786
|
+
}, Pr = (e) => async (t) => {
|
|
5758
5787
|
const { url: n, query: s, variables: r, operationName: i, fetch: o, fetchOptions: a, middleware: c } = t, u = { ...t.headers };
|
|
5759
5788
|
let h = "", d;
|
|
5760
|
-
e === "POST" ? (d =
|
|
5789
|
+
e === "POST" ? (d = Fr(s, r, i, a.jsonSerializer), typeof d == "string" && (u["Content-Type"] = "application/json")) : h = Ur({
|
|
5761
5790
|
query: s,
|
|
5762
5791
|
variables: r,
|
|
5763
5792
|
operationName: i,
|
|
5764
|
-
jsonSerializer: a.jsonSerializer ??
|
|
5793
|
+
jsonSerializer: a.jsonSerializer ?? it
|
|
5765
5794
|
});
|
|
5766
5795
|
const f = {
|
|
5767
5796
|
method: e,
|
|
@@ -5776,19 +5805,19 @@ const Ee = /* @__PURE__ */ Rr(Ie), Mr = /* @__PURE__ */ In({
|
|
|
5776
5805
|
}
|
|
5777
5806
|
return h && (m = `${m}?${h}`), await o(m, y);
|
|
5778
5807
|
};
|
|
5779
|
-
class
|
|
5808
|
+
class mn {
|
|
5780
5809
|
constructor(t, n = {}) {
|
|
5781
5810
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...s) => {
|
|
5782
|
-
const [r, i, o] = s, a =
|
|
5811
|
+
const [r, i, o] = s, a = Hs(r, i, o), { headers: c, fetch: u = Ee, method: h = "POST", requestMiddleware: d, responseMiddleware: f, ...m } = this.requestConfig, { url: y } = this;
|
|
5783
5812
|
a.signal !== void 0 && (m.signal = a.signal);
|
|
5784
|
-
const { operationName: v } =
|
|
5785
|
-
return
|
|
5813
|
+
const { operationName: v } = Me(a.query);
|
|
5814
|
+
return qe({
|
|
5786
5815
|
url: y,
|
|
5787
5816
|
query: a.query,
|
|
5788
5817
|
variables: a.variables,
|
|
5789
5818
|
headers: {
|
|
5790
|
-
...
|
|
5791
|
-
...
|
|
5819
|
+
...Q(Le(c)),
|
|
5820
|
+
...Q(a.requestHeaders)
|
|
5792
5821
|
},
|
|
5793
5822
|
operationName: v,
|
|
5794
5823
|
fetch: u,
|
|
@@ -5801,16 +5830,16 @@ class yn {
|
|
|
5801
5830
|
};
|
|
5802
5831
|
}
|
|
5803
5832
|
async request(t, ...n) {
|
|
5804
|
-
const [s, r] = n, i =
|
|
5833
|
+
const [s, r] = n, i = Vs(t, s, r), { headers: o, fetch: a = Ee, method: c = "POST", requestMiddleware: u, responseMiddleware: h, ...d } = this.requestConfig, { url: f } = this;
|
|
5805
5834
|
i.signal !== void 0 && (d.signal = i.signal);
|
|
5806
|
-
const { query: m, operationName: y } =
|
|
5807
|
-
return
|
|
5835
|
+
const { query: m, operationName: y } = Me(i.document);
|
|
5836
|
+
return qe({
|
|
5808
5837
|
url: f,
|
|
5809
5838
|
query: m,
|
|
5810
5839
|
variables: i.variables,
|
|
5811
5840
|
headers: {
|
|
5812
|
-
...
|
|
5813
|
-
...
|
|
5841
|
+
...Q(Le(o)),
|
|
5842
|
+
...Q(i.requestHeaders)
|
|
5814
5843
|
},
|
|
5815
5844
|
operationName: y,
|
|
5816
5845
|
fetch: a,
|
|
@@ -5823,17 +5852,17 @@ class yn {
|
|
|
5823
5852
|
}
|
|
5824
5853
|
// prettier-ignore
|
|
5825
5854
|
batchRequests(t, n) {
|
|
5826
|
-
const s =
|
|
5855
|
+
const s = Gs(t, n), { headers: r, ...i } = this.requestConfig;
|
|
5827
5856
|
s.signal !== void 0 && (i.signal = s.signal);
|
|
5828
|
-
const o = s.documents.map(({ document: c }) =>
|
|
5829
|
-
return
|
|
5857
|
+
const o = s.documents.map(({ document: c }) => Me(c).query), a = s.documents.map(({ variables: c }) => c);
|
|
5858
|
+
return qe({
|
|
5830
5859
|
url: this.url,
|
|
5831
5860
|
query: o,
|
|
5832
5861
|
// @ts-expect-error TODO reconcile batch variables into system.
|
|
5833
5862
|
variables: a,
|
|
5834
5863
|
headers: {
|
|
5835
|
-
...
|
|
5836
|
-
...
|
|
5864
|
+
...Q(Le(r)),
|
|
5865
|
+
...Q(s.requestHeaders)
|
|
5837
5866
|
},
|
|
5838
5867
|
operationName: void 0,
|
|
5839
5868
|
fetch: this.requestConfig.fetch ?? Ee,
|
|
@@ -5861,8 +5890,8 @@ class yn {
|
|
|
5861
5890
|
return this.url = t, this;
|
|
5862
5891
|
}
|
|
5863
5892
|
}
|
|
5864
|
-
const
|
|
5865
|
-
const { query: t, variables: n, fetchOptions: s } = e, r =
|
|
5893
|
+
const qe = async (e) => {
|
|
5894
|
+
const { query: t, variables: n, fetchOptions: s } = e, r = Pr(js(e.method ?? "post")), i = Array.isArray(e.query), o = await r(e), a = await Br(o, s.jsonSerializer ?? it), c = Array.isArray(a) ? !a.some(({ data: h }) => !h) : !!a.data, u = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || s.errorPolicy === "all" || s.errorPolicy === "ignore";
|
|
5866
5895
|
if (o.ok && u && c) {
|
|
5867
5896
|
const { errors: h, ...d } = (Array.isArray(a), a), f = s.errorPolicy === "ignore" ? d : a;
|
|
5868
5897
|
return {
|
|
@@ -5874,33 +5903,33 @@ const Me = async (e) => {
|
|
|
5874
5903
|
const h = typeof a == "string" ? {
|
|
5875
5904
|
error: a
|
|
5876
5905
|
} : a;
|
|
5877
|
-
throw new
|
|
5906
|
+
throw new ae(
|
|
5878
5907
|
// @ts-expect-error TODO
|
|
5879
5908
|
{ ...h, status: o.status, headers: o.headers },
|
|
5880
5909
|
{ query: t, variables: n }
|
|
5881
5910
|
);
|
|
5882
5911
|
}
|
|
5883
5912
|
};
|
|
5884
|
-
async function
|
|
5885
|
-
const s =
|
|
5886
|
-
return new
|
|
5913
|
+
async function ct(e, t, ...n) {
|
|
5914
|
+
const s = zs(e, t, ...n);
|
|
5915
|
+
return new mn(s.url).request({
|
|
5887
5916
|
...s
|
|
5888
5917
|
});
|
|
5889
5918
|
}
|
|
5890
|
-
const
|
|
5891
|
-
const r = s ??
|
|
5919
|
+
const Fr = (e, t, n, s) => {
|
|
5920
|
+
const r = s ?? it;
|
|
5892
5921
|
if (!Array.isArray(e))
|
|
5893
5922
|
return r.stringify({ query: e, variables: t, operationName: n });
|
|
5894
5923
|
if (typeof t < "u" && !Array.isArray(t))
|
|
5895
5924
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
5896
5925
|
const i = e.reduce((o, a, c) => (o.push({ query: a, variables: t ? t[c] : void 0 }), o), []);
|
|
5897
5926
|
return r.stringify(i);
|
|
5898
|
-
},
|
|
5927
|
+
}, Br = async (e, t) => {
|
|
5899
5928
|
let n;
|
|
5900
5929
|
return e.headers.forEach((s, r) => {
|
|
5901
5930
|
r.toLowerCase() === "content-type" && (n = s);
|
|
5902
5931
|
}), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text();
|
|
5903
|
-
}, Le = (e) => typeof e == "function" ? e() : e,
|
|
5932
|
+
}, Le = (e) => typeof e == "function" ? e() : e, jr = z(
|
|
5904
5933
|
async ({ input: e }) => {
|
|
5905
5934
|
var t;
|
|
5906
5935
|
if (!e.endpoint || e.endpoint === "")
|
|
@@ -5912,7 +5941,7 @@ const Pr = (e, t, n, s) => {
|
|
|
5912
5941
|
if (!e.requestHeaders)
|
|
5913
5942
|
throw new Error("No request headers provided.");
|
|
5914
5943
|
try {
|
|
5915
|
-
const n = await
|
|
5944
|
+
const n = await ct(
|
|
5916
5945
|
e.endpoint,
|
|
5917
5946
|
e.document,
|
|
5918
5947
|
{ items: e.items },
|
|
@@ -5929,14 +5958,14 @@ const Pr = (e, t, n, s) => {
|
|
|
5929
5958
|
throw new Error("Request to add item(s) failed.");
|
|
5930
5959
|
}
|
|
5931
5960
|
}
|
|
5932
|
-
),
|
|
5961
|
+
), $r = z(async ({ input: e }) => {
|
|
5933
5962
|
var t;
|
|
5934
5963
|
if (!e.endpoint || e.endpoint === "")
|
|
5935
5964
|
throw new Error("No endpoint provided.");
|
|
5936
5965
|
if (e.items.length < 1)
|
|
5937
5966
|
throw new Error("No items provided.");
|
|
5938
5967
|
try {
|
|
5939
|
-
const n = await
|
|
5968
|
+
const n = await ct(
|
|
5940
5969
|
e.endpoint,
|
|
5941
5970
|
""
|
|
5942
5971
|
// input.document,
|
|
@@ -5953,7 +5982,7 @@ const Pr = (e, t, n, s) => {
|
|
|
5953
5982
|
} catch {
|
|
5954
5983
|
throw new Error("Request to remove item(s) failed.");
|
|
5955
5984
|
}
|
|
5956
|
-
}),
|
|
5985
|
+
}), Ue = typeof window > "u", Vr = z(
|
|
5957
5986
|
async ({ input: e }) => {
|
|
5958
5987
|
var n, s, r, i;
|
|
5959
5988
|
if (!e.endpoint)
|
|
@@ -5966,9 +5995,9 @@ const Pr = (e, t, n, s) => {
|
|
|
5966
5995
|
throw console.log("no request document"), new Error("No request document provided.");
|
|
5967
5996
|
if (!e.requestHeaders)
|
|
5968
5997
|
throw console.log("no headers"), new Error("No request headers provided.");
|
|
5969
|
-
const t = new
|
|
5970
|
-
|
|
5971
|
-
|
|
5998
|
+
const t = new mn(
|
|
5999
|
+
Ue ? e.endpointSsr : e.endpoint,
|
|
6000
|
+
Ue ? { fetch, method: "POST" } : {
|
|
5972
6001
|
credentials: "include",
|
|
5973
6002
|
method: "POST",
|
|
5974
6003
|
mode: "cors"
|
|
@@ -5976,9 +6005,9 @@ const Pr = (e, t, n, s) => {
|
|
|
5976
6005
|
);
|
|
5977
6006
|
try {
|
|
5978
6007
|
const { data: o, headers: a, status: c, errors: u, extensions: h } = await t.rawRequest(
|
|
5979
|
-
|
|
6008
|
+
yn(e.document),
|
|
5980
6009
|
{},
|
|
5981
|
-
|
|
6010
|
+
Ue ? {
|
|
5982
6011
|
...e.requestHeaders,
|
|
5983
6012
|
Cookie: `quote_${e.locale}=${e.quoteId ?? ""}`
|
|
5984
6013
|
} : e.requestHeaders
|
|
@@ -5995,7 +6024,34 @@ const Pr = (e, t, n, s) => {
|
|
|
5995
6024
|
throw console.log("refresh error", o), new Error("Request to add item(s) failed.");
|
|
5996
6025
|
}
|
|
5997
6026
|
}
|
|
5998
|
-
),
|
|
6027
|
+
), Hr = z(async ({ input: e }) => {
|
|
6028
|
+
var t;
|
|
6029
|
+
if (!e.endpoint || e.endpoint === "")
|
|
6030
|
+
throw new Error("No endpoint provided.");
|
|
6031
|
+
if (e.items.length < 1)
|
|
6032
|
+
throw new Error("No items provided.");
|
|
6033
|
+
if (!e.document)
|
|
6034
|
+
throw new Error("No request document provided.");
|
|
6035
|
+
if (!e.requestHeaders)
|
|
6036
|
+
throw new Error("No request headers provided.");
|
|
6037
|
+
try {
|
|
6038
|
+
const n = await ct(
|
|
6039
|
+
e.endpoint,
|
|
6040
|
+
e.document,
|
|
6041
|
+
{ items: e.items },
|
|
6042
|
+
e.requestHeaders
|
|
6043
|
+
);
|
|
6044
|
+
if (!((t = n.quoteUpdateItem) != null && t.quote))
|
|
6045
|
+
throw new Error("Could not add items to quote.");
|
|
6046
|
+
return {
|
|
6047
|
+
type: "UPDATE_ITEMS_SUCCESS",
|
|
6048
|
+
quote: n.quoteUpdateItem.quote,
|
|
6049
|
+
itemsUpdated: n.quoteUpdateItem.itemsUpdated
|
|
6050
|
+
};
|
|
6051
|
+
} catch {
|
|
6052
|
+
throw new Error("Request to add item(s) failed.");
|
|
6053
|
+
}
|
|
6054
|
+
}), Gr = ({ context: e }) => typeof window > "u" && e.quote.id !== "" || typeof window < "u", zr = ({ context: e }) => !!e.quote.items && e.quote.items.length > 0, Rt = Ae({
|
|
5999
6055
|
types: {
|
|
6000
6056
|
context: {},
|
|
6001
6057
|
emitted: {},
|
|
@@ -6004,26 +6060,29 @@ const Pr = (e, t, n, s) => {
|
|
|
6004
6060
|
},
|
|
6005
6061
|
actions: {
|
|
6006
6062
|
addItems: D(Ms),
|
|
6007
|
-
notifyAddItems:
|
|
6008
|
-
notifyRemoveItems:
|
|
6063
|
+
notifyAddItems: Ce(qs),
|
|
6064
|
+
notifyRemoveItems: Ce(Ls),
|
|
6065
|
+
notifyUpdateItems: Ce(Us),
|
|
6009
6066
|
removeItems: D(Ps),
|
|
6010
|
-
refresh: D(Fs)
|
|
6067
|
+
refresh: D(Fs),
|
|
6068
|
+
updateItems: D(Bs)
|
|
6011
6069
|
},
|
|
6012
6070
|
actors: {
|
|
6013
|
-
addItems:
|
|
6014
|
-
removeItems:
|
|
6015
|
-
refresh:
|
|
6071
|
+
addItems: jr,
|
|
6072
|
+
removeItems: $r,
|
|
6073
|
+
refresh: Vr,
|
|
6074
|
+
updateItems: Hr
|
|
6016
6075
|
},
|
|
6017
6076
|
guards: {
|
|
6018
|
-
canRefresh:
|
|
6019
|
-
hasItems:
|
|
6077
|
+
canRefresh: Gr,
|
|
6078
|
+
hasItems: zr
|
|
6020
6079
|
}
|
|
6021
6080
|
}).createMachine({
|
|
6022
6081
|
/** @todo do we need to add the view to the id? (e.g. quote_en-us) */
|
|
6023
6082
|
id: "quote",
|
|
6024
6083
|
initial: "initializing",
|
|
6025
6084
|
context: ({ input: e }) => {
|
|
6026
|
-
var t, n, s, r, i, o, a, c, u, h, d, f, m, y, v, S, x,
|
|
6085
|
+
var t, n, s, r, i, o, a, c, u, h, d, f, m, y, v, S, x, R, k, M, U, $;
|
|
6027
6086
|
return {
|
|
6028
6087
|
quote: {
|
|
6029
6088
|
id: "",
|
|
@@ -6092,7 +6151,11 @@ const Pr = (e, t, n, s) => {
|
|
|
6092
6151
|
},
|
|
6093
6152
|
removeItems: {
|
|
6094
6153
|
document: ((S = (v = e.initialContext.graphql) == null ? void 0 : v.removeItems) == null ? void 0 : S.document) ?? "",
|
|
6095
|
-
requestHeaders: ((
|
|
6154
|
+
requestHeaders: ((R = (x = e.initialContext.graphql) == null ? void 0 : x.removeItems) == null ? void 0 : R.requestHeaders) ?? void 0
|
|
6155
|
+
},
|
|
6156
|
+
updateItems: {
|
|
6157
|
+
document: ((M = (k = e.initialContext.graphql) == null ? void 0 : k.updateItems) == null ? void 0 : M.document) ?? "",
|
|
6158
|
+
requestHeaders: (($ = (U = e.initialContext.graphql) == null ? void 0 : U.updateItems) == null ? void 0 : $.requestHeaders) ?? void 0
|
|
6096
6159
|
}
|
|
6097
6160
|
}
|
|
6098
6161
|
};
|
|
@@ -6111,7 +6174,8 @@ const Pr = (e, t, n, s) => {
|
|
|
6111
6174
|
*/
|
|
6112
6175
|
empty: {
|
|
6113
6176
|
on: {
|
|
6114
|
-
ADD_ITEMS: "addingItems"
|
|
6177
|
+
ADD_ITEMS: "addingItems",
|
|
6178
|
+
UPDATE_ITEMS: "updatingItems"
|
|
6115
6179
|
}
|
|
6116
6180
|
},
|
|
6117
6181
|
/**
|
|
@@ -6121,7 +6185,8 @@ const Pr = (e, t, n, s) => {
|
|
|
6121
6185
|
on: {
|
|
6122
6186
|
ADD_ITEMS: "addingItems",
|
|
6123
6187
|
REMOVE_ITEMS: "removingItems",
|
|
6124
|
-
REFRESH: "refreshing"
|
|
6188
|
+
REFRESH: "refreshing",
|
|
6189
|
+
UPDATE_ITEMS: "updatingItems"
|
|
6125
6190
|
// CLEAR_ITEMS: 'clearing',
|
|
6126
6191
|
// APPLY_PROMOTION: 'applyingPromotion',
|
|
6127
6192
|
// REMOVE_PROMOTION: 'removingPromotion',
|
|
@@ -6258,36 +6323,78 @@ const Pr = (e, t, n, s) => {
|
|
|
6258
6323
|
}
|
|
6259
6324
|
]
|
|
6260
6325
|
}
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6326
|
+
},
|
|
6327
|
+
/**
|
|
6328
|
+
* Updating quote item(s):
|
|
6329
|
+
* Used for stateful updates to quote like number input on cart
|
|
6330
|
+
* or B2B grids where we are passing actual quantity instead of
|
|
6331
|
+
* incrementing or decrementing by N
|
|
6332
|
+
*
|
|
6333
|
+
* For example: { sku: "ABC", quantity: 5 } we want to update the
|
|
6334
|
+
* quantity from N -> 5 instead of incrementing/decrementing by 5
|
|
6335
|
+
*/
|
|
6336
|
+
updatingItems: {
|
|
6337
|
+
invoke: {
|
|
6338
|
+
/** @todo is there any way to limit the event to be a known event? */
|
|
6339
|
+
input: ({ context: e, event: t }) => {
|
|
6340
|
+
var n, s;
|
|
6341
|
+
return {
|
|
6342
|
+
endpoint: e.endpoints.client,
|
|
6343
|
+
items: t.type === "UPDATE_ITEMS" ? t.items : [],
|
|
6344
|
+
document: (n = e.graphql.updateItems) == null ? void 0 : n.document,
|
|
6345
|
+
requestHeaders: (s = e.graphql.updateItems) == null ? void 0 : s.requestHeaders
|
|
6346
|
+
};
|
|
6347
|
+
},
|
|
6348
|
+
src: "updateItems",
|
|
6349
|
+
onDone: [
|
|
6350
|
+
{
|
|
6351
|
+
actions: ["updateItems", "notifyUpdateItems"],
|
|
6352
|
+
target: "checkingItems"
|
|
6353
|
+
}
|
|
6354
|
+
],
|
|
6355
|
+
onError: [
|
|
6356
|
+
{
|
|
6357
|
+
/** @todo log error? */
|
|
6358
|
+
// actions: ['addItems'],
|
|
6359
|
+
guard: "hasItems",
|
|
6360
|
+
target: "active"
|
|
6361
|
+
},
|
|
6362
|
+
{
|
|
6363
|
+
target: "empty"
|
|
6364
|
+
}
|
|
6365
|
+
]
|
|
6366
|
+
}
|
|
6290
6367
|
}
|
|
6368
|
+
// invoke: {
|
|
6369
|
+
// /** @todo is there any way to limit the event to be a known event? */
|
|
6370
|
+
// input: ({ context, event }) => ({
|
|
6371
|
+
// endpoint: context.endpoints.client,
|
|
6372
|
+
// items: event.type === 'REMOVE_ITEMS' ? event.items : [],
|
|
6373
|
+
// document: context.graphql.removeItems?.document,
|
|
6374
|
+
// requestHeaders: context.graphql.removeItems?.requestHeaders,
|
|
6375
|
+
// }),
|
|
6376
|
+
// src: 'removeItems',
|
|
6377
|
+
// onDone: [
|
|
6378
|
+
// {
|
|
6379
|
+
// actions: ['removeItems'],
|
|
6380
|
+
// guard: 'hasItems',
|
|
6381
|
+
// target: 'active',
|
|
6382
|
+
// },
|
|
6383
|
+
// { target: 'empty' },
|
|
6384
|
+
// ],
|
|
6385
|
+
// onError: [
|
|
6386
|
+
// {
|
|
6387
|
+
// /** @todo log error? */
|
|
6388
|
+
// // actions: ['addItems'],
|
|
6389
|
+
// guard: 'hasItems',
|
|
6390
|
+
// target: 'active',
|
|
6391
|
+
// },
|
|
6392
|
+
// {
|
|
6393
|
+
// target: 'empty',
|
|
6394
|
+
// },
|
|
6395
|
+
// ],
|
|
6396
|
+
// },
|
|
6397
|
+
// },
|
|
6291
6398
|
/**
|
|
6292
6399
|
* Clear all items from quote and reset to empty, generate a new quoteId
|
|
6293
6400
|
*/
|
|
@@ -6318,15 +6425,15 @@ const Pr = (e, t, n, s) => {
|
|
|
6318
6425
|
// removingGiftCard: {},
|
|
6319
6426
|
// applyingSettings: {},
|
|
6320
6427
|
}
|
|
6321
|
-
}), gn =
|
|
6428
|
+
}), gn = Je(
|
|
6322
6429
|
{}
|
|
6323
|
-
),
|
|
6430
|
+
), ti = () => {
|
|
6324
6431
|
var c;
|
|
6325
|
-
const e =
|
|
6432
|
+
const e = Ye(gn);
|
|
6326
6433
|
if (!e || !e.getSnapshot)
|
|
6327
6434
|
throw new Error("quoteActor is not properly initialized");
|
|
6328
|
-
const [t, n] =
|
|
6329
|
-
|
|
6435
|
+
const [t, n] = Mt(() => e.getSnapshot());
|
|
6436
|
+
qt(() => {
|
|
6330
6437
|
if (!e || !e.getSnapshot) {
|
|
6331
6438
|
console.error("quoteActor is not properly initialized");
|
|
6332
6439
|
return;
|
|
@@ -6350,21 +6457,21 @@ const Pr = (e, t, n, s) => {
|
|
|
6350
6457
|
isRemovingItems: o,
|
|
6351
6458
|
isUpdatingItems: a
|
|
6352
6459
|
};
|
|
6353
|
-
},
|
|
6460
|
+
}, ni = async (e = {
|
|
6354
6461
|
inspect: void 0,
|
|
6355
6462
|
quote: { id: "", locale: "" },
|
|
6356
6463
|
endpoints: { client: "", server: "" },
|
|
6357
6464
|
graphql: {}
|
|
6358
6465
|
}) => typeof window < "u" ? (console.warn(
|
|
6359
6466
|
"App.getInitialProps::getAuth should not be run on the frontend. You are probably missing getServerSideProps in your page."
|
|
6360
|
-
),
|
|
6467
|
+
), B(Rt, {
|
|
6361
6468
|
inspect: e.inspect,
|
|
6362
6469
|
input: {
|
|
6363
6470
|
initialContext: {
|
|
6364
6471
|
endpoints: e.endpoints
|
|
6365
6472
|
}
|
|
6366
6473
|
}
|
|
6367
|
-
}).start()) :
|
|
6474
|
+
}).start()) : B(Rt, {
|
|
6368
6475
|
input: {
|
|
6369
6476
|
initialContext: {
|
|
6370
6477
|
endpoints: e.endpoints,
|
|
@@ -6377,23 +6484,23 @@ const Pr = (e, t, n, s) => {
|
|
|
6377
6484
|
},
|
|
6378
6485
|
inspect: e.inspect
|
|
6379
6486
|
}).start();
|
|
6380
|
-
function
|
|
6381
|
-
return /* @__PURE__ */
|
|
6487
|
+
function si({ actor: e, children: t }) {
|
|
6488
|
+
return /* @__PURE__ */ ze(gn.Provider, { value: e, children: t });
|
|
6382
6489
|
}
|
|
6383
6490
|
export {
|
|
6384
|
-
|
|
6385
|
-
|
|
6491
|
+
nn as AuthContext,
|
|
6492
|
+
Wr as AuthProvider,
|
|
6386
6493
|
gn as QuoteContext,
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6494
|
+
si as QuoteProvider,
|
|
6495
|
+
sn as ToastContext,
|
|
6496
|
+
ei as ToastProvider,
|
|
6497
|
+
xt as authMachine,
|
|
6498
|
+
Qr as getAuth,
|
|
6499
|
+
ni as getQuote,
|
|
6500
|
+
Rt as quoteMachine,
|
|
6394
6501
|
Rs as timerMachine,
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6502
|
+
Kr as toastMachine,
|
|
6503
|
+
Xr as useAuth,
|
|
6504
|
+
ti as useQuote,
|
|
6505
|
+
Zr as useToast
|
|
6399
6506
|
};
|