@stonecrop/graphql-client 0.2.23 → 0.2.25

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.
@@ -1,4 +1,4 @@
1
- function Dt(e, t) {
1
+ function St(e, t) {
2
2
  for (var n = 0; n < t.length; n++) {
3
3
  const i = t[n];
4
4
  if (typeof i != "string" && !Array.isArray(i)) {
@@ -79,7 +79,7 @@ var ae = 9e15, ne = 1e9, Be = "0123456789abcdef", Ie = "2.3025850929940456840179
79
79
  // Whether to use cryptographically-secure random number generation, if available.
80
80
  crypto: !1
81
81
  // true/false
82
- }, at, Z, O = !0, De = "[DecimalError] ", te = De + "Invalid argument: ", ct = De + "Precision limit exceeded", ut = De + "crypto unavailable", lt = "[object Decimal]", V = Math.floor, F = Math.pow, xt = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, St = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Ct = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, ft = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, z = 1e7, A = 7, kt = 9007199254740991, Rt = Ie.length - 1, qe = Oe.length - 1, m = { toStringTag: lt };
82
+ }, at, Q, O = !0, De = "[DecimalError] ", te = De + "Invalid argument: ", ct = De + "Precision limit exceeded", ut = De + "crypto unavailable", lt = "[object Decimal]", V = Math.floor, F = Math.pow, xt = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Ct = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, kt = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, ft = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, z = 1e7, A = 7, Rt = 9007199254740991, Lt = Ie.length - 1, qe = Oe.length - 1, m = { toStringTag: lt };
83
83
  m.absoluteValue = m.abs = function() {
84
84
  var e = new this.constructor(this);
85
85
  return e.s < 0 && (e.s = 1), T(e);
@@ -89,35 +89,28 @@ m.ceil = function() {
89
89
  };
90
90
  m.clampedTo = m.clamp = function(e, t) {
91
91
  var n, i = this, r = i.constructor;
92
- if (e = new r(e), t = new r(t), !e.s || !t.s)
93
- return new r(NaN);
94
- if (e.gt(t))
95
- throw Error(te + t);
92
+ if (e = new r(e), t = new r(t), !e.s || !t.s) return new r(NaN);
93
+ if (e.gt(t)) throw Error(te + t);
96
94
  return n = i.cmp(e), n < 0 ? e : i.cmp(t) > 0 ? t : new r(i);
97
95
  };
98
96
  m.comparedTo = m.cmp = function(e) {
99
97
  var t, n, i, r, s = this, o = s.d, a = (e = new s.constructor(e)).d, u = s.s, c = e.s;
100
98
  if (!o || !a)
101
99
  return !u || !c ? NaN : u !== c ? u : o === a ? 0 : !o ^ u < 0 ? 1 : -1;
102
- if (!o[0] || !a[0])
103
- return o[0] ? u : a[0] ? -c : 0;
104
- if (u !== c)
105
- return u;
106
- if (s.e !== e.e)
107
- return s.e > e.e ^ u < 0 ? 1 : -1;
100
+ if (!o[0] || !a[0]) return o[0] ? u : a[0] ? -c : 0;
101
+ if (u !== c) return u;
102
+ if (s.e !== e.e) return s.e > e.e ^ u < 0 ? 1 : -1;
108
103
  for (i = o.length, r = a.length, t = 0, n = i < r ? i : r; t < n; ++t)
109
- if (o[t] !== a[t])
110
- return o[t] > a[t] ^ u < 0 ? 1 : -1;
104
+ if (o[t] !== a[t]) return o[t] > a[t] ^ u < 0 ? 1 : -1;
111
105
  return i === r ? 0 : i > r ^ u < 0 ? 1 : -1;
112
106
  };
113
107
  m.cosine = m.cos = function() {
114
108
  var e, t, n = this, i = n.constructor;
115
- return n.d ? n.d[0] ? (e = i.precision, t = i.rounding, i.precision = e + Math.max(n.e, n.sd()) + A, i.rounding = 1, n = Lt(i, gt(i, n)), i.precision = e, i.rounding = t, T(Z == 2 || Z == 3 ? n.neg() : n, e, t, !0)) : new i(1) : new i(NaN);
109
+ return n.d ? n.d[0] ? (e = i.precision, t = i.rounding, i.precision = e + Math.max(n.e, n.sd()) + A, i.rounding = 1, n = Ft(i, gt(i, n)), i.precision = e, i.rounding = t, T(Q == 2 || Q == 3 ? n.neg() : n, e, t, !0)) : new i(1) : new i(NaN);
116
110
  };
117
111
  m.cubeRoot = m.cbrt = function() {
118
112
  var e, t, n, i, r, s, o, a, u, c, l = this, f = l.constructor;
119
- if (!l.isFinite() || l.isZero())
120
- return new f(l);
113
+ if (!l.isFinite() || l.isZero()) return new f(l);
121
114
  for (O = !1, s = l.s * F(l.s * l, 1 / 3), !s || Math.abs(s) == 1 / 0 ? (n = B(l.d), e = l.e, (s = (e - n.length + 1) % 3) && (n += s == 1 || s == -2 ? "0" : "00"), s = F(n, 1 / 3), e = V((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)), s == 1 / 0 ? n = "5e" + e : (n = s.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + e), i = new f(n), i.s = l.s) : i = new f(s.toString()), o = (e = f.precision) + 3; ; )
122
115
  if (a = i, u = a.times(a).times(a), c = u.plus(l), i = k(c.plus(l).times(a), c.plus(u), o + 2, 1), B(a.d).slice(0, o) === (n = B(i.d)).slice(0, o))
123
116
  if (n = n.slice(o - 3, o + 1), n == "9999" || !r && n == "4999") {
@@ -135,9 +128,7 @@ m.cubeRoot = m.cbrt = function() {
135
128
  m.decimalPlaces = m.dp = function() {
136
129
  var e, t = this.d, n = NaN;
137
130
  if (t) {
138
- if (e = t.length - 1, n = (e - V(this.e / A)) * A, e = t[e], e)
139
- for (; e % 10 == 0; e /= 10)
140
- n--;
131
+ if (e = t.length - 1, n = (e - V(this.e / A)) * A, e = t[e], e) for (; e % 10 == 0; e /= 10) n--;
141
132
  n < 0 && (n = 0);
142
133
  }
143
134
  return n;
@@ -164,23 +155,20 @@ m.greaterThanOrEqualTo = m.gte = function(e) {
164
155
  };
165
156
  m.hyperbolicCosine = m.cosh = function() {
166
157
  var e, t, n, i, r, s = this, o = s.constructor, a = new o(1);
167
- if (!s.isFinite())
168
- return new o(s.s ? 1 / 0 : NaN);
169
- if (s.isZero())
170
- return a;
171
- n = o.precision, i = o.rounding, o.precision = n + Math.max(s.e, s.sd()) + 4, o.rounding = 1, r = s.d.length, r < 32 ? (e = Math.ceil(r / 3), t = (1 / Se(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), s = ue(o, 1, s.times(t), new o(1), !0);
158
+ if (!s.isFinite()) return new o(s.s ? 1 / 0 : NaN);
159
+ if (s.isZero()) return a;
160
+ n = o.precision, i = o.rounding, o.precision = n + Math.max(s.e, s.sd()) + 4, o.rounding = 1, r = s.d.length, r < 32 ? (e = Math.ceil(r / 3), t = (1 / xe(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), s = ue(o, 1, s.times(t), new o(1), !0);
172
161
  for (var u, c = e, l = new o(8); c--; )
173
162
  u = s.times(s), s = a.minus(u.times(l.minus(u.times(l))));
174
163
  return T(s, o.precision = n, o.rounding = i, !0);
175
164
  };
176
165
  m.hyperbolicSine = m.sinh = function() {
177
166
  var e, t, n, i, r = this, s = r.constructor;
178
- if (!r.isFinite() || r.isZero())
179
- return new s(r);
167
+ if (!r.isFinite() || r.isZero()) return new s(r);
180
168
  if (t = s.precision, n = s.rounding, s.precision = t + Math.max(r.e, r.sd()) + 4, s.rounding = 1, i = r.d.length, i < 3)
181
169
  r = ue(s, 2, r, r, !0);
182
170
  else {
183
- e = 1.4 * Math.sqrt(i), e = e > 16 ? 16 : e | 0, r = r.times(1 / Se(5, e)), r = ue(s, 2, r, r, !0);
171
+ e = 1.4 * Math.sqrt(i), e = e > 16 ? 16 : e | 0, r = r.times(1 / xe(5, e)), r = ue(s, 2, r, r, !0);
184
172
  for (var o, a = new s(5), u = new s(16), c = new s(20); e--; )
185
173
  o = r.times(r), r = r.times(a.plus(o.times(u.times(o).plus(c))));
186
174
  }
@@ -218,17 +206,13 @@ m.inverseTangent = m.atan = function() {
218
206
  if (c.abs().eq(1) && f + 4 <= qe)
219
207
  return o = J(l, f + 4, h).times(0.25), o.s = c.s, o;
220
208
  } else {
221
- if (!c.s)
222
- return new l(NaN);
209
+ if (!c.s) return new l(NaN);
223
210
  if (f + 4 <= qe)
224
211
  return o = J(l, f + 4, h).times(0.5), o.s = c.s, o;
225
212
  }
226
- for (l.precision = a = f + 10, l.rounding = 1, n = Math.min(28, a / A + 2 | 0), e = n; e; --e)
227
- c = c.div(c.times(c).plus(1).sqrt().plus(1));
213
+ for (l.precision = a = f + 10, l.rounding = 1, n = Math.min(28, a / A + 2 | 0), e = n; e; --e) c = c.div(c.times(c).plus(1).sqrt().plus(1));
228
214
  for (O = !1, t = Math.ceil(a / A), i = 1, u = c.times(c), o = new l(c), r = c; e !== -1; )
229
- if (r = r.times(u), s = o.minus(r.div(i += 2)), r = r.times(u), o = s.plus(r.div(i += 2)), o.d[t] !== void 0)
230
- for (e = t; o.d[e] === s.d[e] && e--; )
231
- ;
215
+ if (r = r.times(u), s = o.minus(r.div(i += 2)), r = r.times(u), o = s.plus(r.div(i += 2)), o.d[t] !== void 0) for (e = t; o.d[e] === s.d[e] && e--; ) ;
232
216
  return n && (o = o.times(2 << n - 1)), O = !0, T(o, l.precision = f, l.rounding = h, !0);
233
217
  };
234
218
  m.isFinite = function() {
@@ -260,8 +244,7 @@ m.logarithm = m.log = function(e) {
260
244
  if (e == null)
261
245
  e = new l(10), t = !0;
262
246
  else {
263
- if (e = new l(e), n = e.d, e.s < 0 || !n || !n[0] || e.eq(1))
264
- return new l(NaN);
247
+ if (e = new l(e), n = e.d, e.s < 0 || !n || !n[0] || e.eq(1)) return new l(NaN);
265
248
  t = e.eq(10);
266
249
  }
267
250
  if (n = c.d, c.s < 0 || !n || !n[0] || c.eq(1))
@@ -270,8 +253,7 @@ m.logarithm = m.log = function(e) {
270
253
  if (n.length > 1)
271
254
  s = !0;
272
255
  else {
273
- for (r = n[0]; r % 10 === 0; )
274
- r /= 10;
256
+ for (r = n[0]; r % 10 === 0; ) r /= 10;
275
257
  s = r !== 1;
276
258
  }
277
259
  if (O = !1, a = f + E, o = ee(c, a), i = t ? _e(l, a + 10) : ee(e, a), u = k(o, i, a, 1), ge(u.d, r = f, h))
@@ -290,17 +272,13 @@ m.minus = m.sub = function(e) {
290
272
  if (E.s != e.s)
291
273
  return e.s = -e.s, E.plus(e);
292
274
  if (c = E.d, h = e.d, a = N.precision, u = N.rounding, !c[0] || !h[0]) {
293
- if (h[0])
294
- e.s = -e.s;
295
- else if (c[0])
296
- e = new N(E);
297
- else
298
- return new N(u === 3 ? -0 : 0);
275
+ if (h[0]) e.s = -e.s;
276
+ else if (c[0]) e = new N(E);
277
+ else return new N(u === 3 ? -0 : 0);
299
278
  return O ? T(e, a, u) : e;
300
279
  }
301
280
  if (n = V(e.e / A), l = V(E.e / A), c = c.slice(), s = l - n, s) {
302
- for (f = s < 0, f ? (t = c, s = -s, o = h.length) : (t = h, n = l, o = c.length), i = Math.max(Math.ceil(a / A), o) + 2, s > i && (s = i, t.length = 1), t.reverse(), i = s; i--; )
303
- t.push(0);
281
+ for (f = s < 0, f ? (t = c, s = -s, o = h.length) : (t = h, n = l, o = c.length), i = Math.max(Math.ceil(a / A), o) + 2, s > i && (s = i, t.length = 1), t.reverse(), i = s; i--; ) t.push(0);
304
282
  t.reverse();
305
283
  } else {
306
284
  for (i = c.length, o = h.length, f = i < o, f && (o = i), i = 0; i < o; i++)
@@ -310,21 +288,17 @@ m.minus = m.sub = function(e) {
310
288
  }
311
289
  s = 0;
312
290
  }
313
- for (f && (t = c, c = h, h = t, e.s = -e.s), o = c.length, i = h.length - o; i > 0; --i)
314
- c[o++] = 0;
291
+ for (f && (t = c, c = h, h = t, e.s = -e.s), o = c.length, i = h.length - o; i > 0; --i) c[o++] = 0;
315
292
  for (i = h.length; i > s; ) {
316
293
  if (c[--i] < h[i]) {
317
- for (r = i; r && c[--r] === 0; )
318
- c[r] = z - 1;
294
+ for (r = i; r && c[--r] === 0; ) c[r] = z - 1;
319
295
  --c[r], c[i] += z;
320
296
  }
321
297
  c[i] -= h[i];
322
298
  }
323
- for (; c[--o] === 0; )
324
- c.pop();
325
- for (; c[0] === 0; c.shift())
326
- --n;
327
- return c[0] ? (e.d = c, e.e = xe(c, n), O ? T(e, a, u) : e) : new N(u === 3 ? -0 : 0);
299
+ for (; c[--o] === 0; ) c.pop();
300
+ for (; c[0] === 0; c.shift()) --n;
301
+ return c[0] ? (e.d = c, e.e = Se(c, n), O ? T(e, a, u) : e) : new N(u === 3 ? -0 : 0);
328
302
  };
329
303
  m.modulo = m.mod = function(e) {
330
304
  var t, n = this, i = n.constructor;
@@ -349,20 +323,17 @@ m.plus = m.add = function(e) {
349
323
  if (c = f.d, l = e.d, a = h.precision, u = h.rounding, !c[0] || !l[0])
350
324
  return l[0] || (e = new h(f)), O ? T(e, a, u) : e;
351
325
  if (s = V(f.e / A), i = V(e.e / A), c = c.slice(), r = s - i, r) {
352
- for (r < 0 ? (n = c, r = -r, o = l.length) : (n = l, i = s, o = c.length), s = Math.ceil(a / A), o = s > o ? s + 1 : o + 1, r > o && (r = o, n.length = 1), n.reverse(); r--; )
353
- n.push(0);
326
+ for (r < 0 ? (n = c, r = -r, o = l.length) : (n = l, i = s, o = c.length), s = Math.ceil(a / A), o = s > o ? s + 1 : o + 1, r > o && (r = o, n.length = 1), n.reverse(); r--; ) n.push(0);
354
327
  n.reverse();
355
328
  }
356
329
  for (o = c.length, r = l.length, o - r < 0 && (r = o, n = l, l = c, c = n), t = 0; r; )
357
330
  t = (c[--r] = c[r] + l[r] + t) / z | 0, c[r] %= z;
358
- for (t && (c.unshift(t), ++i), o = c.length; c[--o] == 0; )
359
- c.pop();
360
- return e.d = c, e.e = xe(c, i), O ? T(e, a, u) : e;
331
+ for (t && (c.unshift(t), ++i), o = c.length; c[--o] == 0; ) c.pop();
332
+ return e.d = c, e.e = Se(c, i), O ? T(e, a, u) : e;
361
333
  };
362
334
  m.precision = m.sd = function(e) {
363
335
  var t, n = this;
364
- if (e !== void 0 && e !== !!e && e !== 1 && e !== 0)
365
- throw Error(te + e);
336
+ if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(te + e);
366
337
  return n.d ? (t = ht(n.d), e && n.e + 1 > t && (t = n.e + 1)) : t = NaN, t;
367
338
  };
368
339
  m.round = function() {
@@ -371,7 +342,7 @@ m.round = function() {
371
342
  };
372
343
  m.sine = m.sin = function() {
373
344
  var e, t, n = this, i = n.constructor;
374
- return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + Math.max(n.e, n.sd()) + A, i.rounding = 1, n = Pt(i, gt(i, n)), i.precision = e, i.rounding = t, T(Z > 2 ? n.neg() : n, e, t, !0)) : new i(NaN);
345
+ return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + Math.max(n.e, n.sd()) + A, i.rounding = 1, n = Mt(i, gt(i, n)), i.precision = e, i.rounding = t, T(Q > 2 ? n.neg() : n, e, t, !0)) : new i(NaN);
375
346
  };
376
347
  m.squareRoot = m.sqrt = function() {
377
348
  var e, t, n, i, r, s, o = this, a = o.d, u = o.e, c = o.s, l = o.constructor;
@@ -393,22 +364,20 @@ m.squareRoot = m.sqrt = function() {
393
364
  };
394
365
  m.tangent = m.tan = function() {
395
366
  var e, t, n = this, i = n.constructor;
396
- return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 10, i.rounding = 1, n = n.sin(), n.s = 1, n = k(n, new i(1).minus(n.times(n)).sqrt(), e + 10, 0), i.precision = e, i.rounding = t, T(Z == 2 || Z == 4 ? n.neg() : n, e, t, !0)) : new i(NaN);
367
+ return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 10, i.rounding = 1, n = n.sin(), n.s = 1, n = k(n, new i(1).minus(n.times(n)).sqrt(), e + 10, 0), i.precision = e, i.rounding = t, T(Q == 2 || Q == 4 ? n.neg() : n, e, t, !0)) : new i(NaN);
397
368
  };
398
369
  m.times = m.mul = function(e) {
399
370
  var t, n, i, r, s, o, a, u, c, l = this, f = l.constructor, h = l.d, E = (e = new f(e)).d;
400
371
  if (e.s *= l.s, !h || !h[0] || !E || !E[0])
401
372
  return new f(!e.s || h && !h[0] && !E || E && !E[0] && !h ? NaN : !h || !E ? e.s / 0 : e.s * 0);
402
- for (n = V(l.e / A) + V(e.e / A), u = h.length, c = E.length, u < c && (s = h, h = E, E = s, o = u, u = c, c = o), s = [], o = u + c, i = o; i--; )
403
- s.push(0);
373
+ for (n = V(l.e / A) + V(e.e / A), u = h.length, c = E.length, u < c && (s = h, h = E, E = s, o = u, u = c, c = o), s = [], o = u + c, i = o; i--; ) s.push(0);
404
374
  for (i = c; --i >= 0; ) {
405
375
  for (t = 0, r = u + i; r > i; )
406
376
  a = s[r] + E[i] * h[r - i - 1] + t, s[r--] = a % z | 0, t = a / z | 0;
407
377
  s[r] = (s[r] + t) % z | 0;
408
378
  }
409
- for (; !s[--o]; )
410
- s.pop();
411
- return t ? ++n : s.shift(), e.d = s, e.e = xe(s, n), O ? T(e, f.precision, f.rounding) : e;
379
+ for (; !s[--o]; ) s.pop();
380
+ return t ? ++n : s.shift(), e.d = s, e.e = Se(s, n), O ? T(e, f.precision, f.rounding) : e;
412
381
  };
413
382
  m.toBinary = function(e, t) {
414
383
  return Je(this, 2, e, t);
@@ -427,13 +396,11 @@ m.toFixed = function(e, t) {
427
396
  };
428
397
  m.toFraction = function(e) {
429
398
  var t, n, i, r, s, o, a, u, c, l, f, h, E = this, N = E.d, y = E.constructor;
430
- if (!N)
431
- return new y(E);
399
+ if (!N) return new y(E);
432
400
  if (c = n = new y(1), i = u = new y(0), t = new y(i), s = t.e = ht(N) - E.e - 1, o = s % A, t.d[0] = F(10, o < 0 ? A + o : o), e == null)
433
401
  e = s > 0 ? t : c;
434
402
  else {
435
- if (a = new y(e), !a.isInt() || a.lt(c))
436
- throw Error(te + a);
403
+ if (a = new y(e), !a.isInt() || a.lt(c)) throw Error(te + a);
437
404
  e = a.gt(t) ? s > 0 ? t : c : a;
438
405
  }
439
406
  for (O = !1, a = new y(B(N)), l = y.precision, y.precision = s = N.length * A * 2; f = k(a, t, 0, 1, 1), r = n.plus(f.times(i)), r.cmp(e) != 1; )
@@ -446,12 +413,10 @@ m.toHexadecimal = m.toHex = function(e, t) {
446
413
  m.toNearest = function(e, t) {
447
414
  var n = this, i = n.constructor;
448
415
  if (n = new i(n), e == null) {
449
- if (!n.d)
450
- return n;
416
+ if (!n.d) return n;
451
417
  e = new i(1), t = i.rounding;
452
418
  } else {
453
- if (e = new i(e), t === void 0 ? t = i.rounding : $(t, 0, 8), !n.d)
454
- return e.s ? n : e;
419
+ if (e = new i(e), t === void 0 ? t = i.rounding : $(t, 0, 8), !n.d) return e.s ? n : e;
455
420
  if (!e.d)
456
421
  return e.s && (e.s = n.s), e;
457
422
  }
@@ -465,17 +430,13 @@ m.toOctal = function(e, t) {
465
430
  };
466
431
  m.toPower = m.pow = function(e) {
467
432
  var t, n, i, r, s, o, a = this, u = a.constructor, c = +(e = new u(e));
468
- if (!a.d || !e.d || !a.d[0] || !e.d[0])
469
- return new u(F(+a, c));
470
- if (a = new u(a), a.eq(1))
471
- return a;
472
- if (i = u.precision, s = u.rounding, e.eq(1))
473
- return T(a, i, s);
474
- if (t = V(e.e / A), t >= e.d.length - 1 && (n = c < 0 ? -c : c) <= kt)
433
+ if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new u(F(+a, c));
434
+ if (a = new u(a), a.eq(1)) return a;
435
+ if (i = u.precision, s = u.rounding, e.eq(1)) return T(a, i, s);
436
+ if (t = V(e.e / A), t >= e.d.length - 1 && (n = c < 0 ? -c : c) <= Rt)
475
437
  return r = dt(u, a, n, i), e.s < 0 ? new u(1).div(r) : T(r, i, s);
476
438
  if (o = a.s, o < 0) {
477
- if (t < e.d.length - 1)
478
- return new u(NaN);
439
+ if (t < e.d.length - 1) return new u(NaN);
479
440
  if (e.d[t] & 1 || (o = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)
480
441
  return a.s = o, a;
481
442
  }
@@ -508,8 +469,7 @@ function B(e) {
508
469
  o = e[t], i = o + "", n = A - i.length, n && (s += K(n));
509
470
  } else if (o === 0)
510
471
  return "0";
511
- for (; o % 10 === 0; )
512
- o /= 10;
472
+ for (; o % 10 === 0; ) o /= 10;
513
473
  return s + o;
514
474
  }
515
475
  function $(e, t, n) {
@@ -518,24 +478,21 @@ function $(e, t, n) {
518
478
  }
519
479
  function ge(e, t, n, i) {
520
480
  var r, s, o, a;
521
- for (s = e[0]; s >= 10; s /= 10)
522
- --t;
481
+ for (s = e[0]; s >= 10; s /= 10) --t;
523
482
  return --t < 0 ? (t += A, r = 0) : (r = Math.ceil((t + 1) / A), t %= A), s = F(10, A - t), a = e[r] % s | 0, i == null ? t < 3 ? (t == 0 ? a = a / 100 | 0 : t == 1 && (a = a / 10 | 0), o = n < 4 && a == 99999 || n > 3 && a == 49999 || a == 5e4 || a == 0) : o = (n < 4 && a + 1 == s || n > 3 && a + 1 == s / 2) && (e[r + 1] / s / 100 | 0) == F(10, t - 2) - 1 || (a == s / 2 || a == 0) && (e[r + 1] / s / 100 | 0) == 0 : t < 4 ? (t == 0 ? a = a / 1e3 | 0 : t == 1 ? a = a / 100 | 0 : t == 2 && (a = a / 10 | 0), o = (i || n < 4) && a == 9999 || !i && n > 3 && a == 4999) : o = ((i || n < 4) && a + 1 == s || !i && n > 3 && a + 1 == s / 2) && (e[r + 1] / s / 1e3 | 0) == F(10, t - 3) - 1, o;
524
483
  }
525
484
  function ve(e, t, n) {
526
485
  for (var i, r = [0], s, o = 0, a = e.length; o < a; ) {
527
- for (s = r.length; s--; )
528
- r[s] *= t;
486
+ for (s = r.length; s--; ) r[s] *= t;
529
487
  for (r[0] += Be.indexOf(e.charAt(o++)), i = 0; i < r.length; i++)
530
488
  r[i] > n - 1 && (r[i + 1] === void 0 && (r[i + 1] = 0), r[i + 1] += r[i] / n | 0, r[i] %= n);
531
489
  }
532
490
  return r.reverse();
533
491
  }
534
- function Lt(e, t) {
492
+ function Ft(e, t) {
535
493
  var n, i, r;
536
- if (t.isZero())
537
- return t;
538
- i = t.d.length, i < 32 ? (n = Math.ceil(i / 3), r = (1 / Se(4, n)).toString()) : (n = 16, r = "2.3283064365386962890625e-10"), e.precision += n, t = ue(e, 1, t.times(r), new e(1));
494
+ if (t.isZero()) return t;
495
+ i = t.d.length, i < 32 ? (n = Math.ceil(i / 3), r = (1 / xe(4, n)).toString()) : (n = 16, r = "2.3283064365386962890625e-10"), e.precision += n, t = ue(e, 1, t.times(r), new e(1));
539
496
  for (var s = n; s--; ) {
540
497
  var o = t.times(t);
541
498
  t = o.times(o).minus(o).times(8).plus(1);
@@ -564,11 +521,10 @@ var k = /* @__PURE__ */ function() {
564
521
  function n(i, r, s, o) {
565
522
  for (var a = 0; s--; )
566
523
  i[s] -= a, a = i[s] < r[s] ? 1 : 0, i[s] = a * o + i[s] - r[s];
567
- for (; !i[0] && i.length > 1; )
568
- i.shift();
524
+ for (; !i[0] && i.length > 1; ) i.shift();
569
525
  }
570
526
  return function(i, r, s, o, a, u) {
571
- var c, l, f, h, E, N, y, x, b, U, _, S, G, j, Q, H, ie, he, R, se, W = i.constructor, d = i.s == r.s ? 1 : -1, g = i.d, v = r.d;
527
+ var c, l, f, h, E, N, y, S, b, U, _, x, G, j, Z, H, ie, he, R, se, W = i.constructor, d = i.s == r.s ? 1 : -1, g = i.d, v = r.d;
572
528
  if (!g || !g[0] || !v || !v[0])
573
529
  return new W(
574
530
  // Return NaN if either NaN, or both Infinity or 0.
@@ -577,21 +533,19 @@ var k = /* @__PURE__ */ function() {
577
533
  g && g[0] == 0 || !v ? d * 0 : d / 0
578
534
  )
579
535
  );
580
- for (u ? (E = 1, l = i.e - r.e) : (u = z, E = A, l = V(i.e / E) - V(r.e / E)), R = v.length, ie = g.length, b = new W(d), U = b.d = [], f = 0; v[f] == (g[f] || 0); f++)
581
- ;
536
+ for (u ? (E = 1, l = i.e - r.e) : (u = z, E = A, l = V(i.e / E) - V(r.e / E)), R = v.length, ie = g.length, b = new W(d), U = b.d = [], f = 0; v[f] == (g[f] || 0); f++) ;
582
537
  if (v[f] > (g[f] || 0) && l--, s == null ? (j = s = W.precision, o = W.rounding) : a ? j = s + (i.e - r.e) + 1 : j = s, j < 0)
583
538
  U.push(1), N = !0;
584
539
  else {
585
540
  if (j = j / E + 2 | 0, f = 0, R == 1) {
586
541
  for (h = 0, v = v[0], j++; (f < ie || h) && j--; f++)
587
- Q = h * u + (g[f] || 0), U[f] = Q / v | 0, h = Q % v | 0;
542
+ Z = h * u + (g[f] || 0), U[f] = Z / v | 0, h = Z % v | 0;
588
543
  N = h || f < ie;
589
544
  } else {
590
- for (h = u / (v[0] + 1) | 0, h > 1 && (v = e(v, h, u), g = e(g, h, u), R = v.length, ie = g.length), H = R, _ = g.slice(0, R), S = _.length; S < R; )
591
- _[S++] = 0;
545
+ for (h = u / (v[0] + 1) | 0, h > 1 && (v = e(v, h, u), g = e(g, h, u), R = v.length, ie = g.length), H = R, _ = g.slice(0, R), x = _.length; x < R; ) _[x++] = 0;
592
546
  se = v.slice(), se.unshift(0), he = v[0], v[1] >= u / 2 && ++he;
593
547
  do
594
- h = 0, c = t(v, _, R, S), c < 0 ? (G = _[0], R != S && (G = G * u + (_[1] || 0)), h = G / he | 0, h > 1 ? (h >= u && (h = u - 1), y = e(v, h, u), x = y.length, S = _.length, c = t(y, _, x, S), c == 1 && (h--, n(y, R < x ? se : v, x, u))) : (h == 0 && (c = h = 1), y = v.slice()), x = y.length, x < S && y.unshift(0), n(_, y, S, u), c == -1 && (S = _.length, c = t(v, _, R, S), c < 1 && (h++, n(_, R < S ? se : v, S, u))), S = _.length) : c === 0 && (h++, _ = [0]), U[f++] = h, c && _[0] ? _[S++] = g[H] || 0 : (_ = [g[H]], S = 1);
548
+ h = 0, c = t(v, _, R, x), c < 0 ? (G = _[0], R != x && (G = G * u + (_[1] || 0)), h = G / he | 0, h > 1 ? (h >= u && (h = u - 1), y = e(v, h, u), S = y.length, x = _.length, c = t(y, _, S, x), c == 1 && (h--, n(y, R < S ? se : v, S, u))) : (h == 0 && (c = h = 1), y = v.slice()), S = y.length, S < x && y.unshift(0), n(_, y, x, u), c == -1 && (x = _.length, c = t(v, _, R, x), c < 1 && (h++, n(_, R < x ? se : v, x, u))), x = _.length) : c === 0 && (h++, _ = [0]), U[f++] = h, c && _[0] ? _[x++] = g[H] || 0 : (_ = [g[H]], x = 1);
595
549
  while ((H++ < ie || _[0] !== void 0) && j--);
596
550
  N = _[0] !== void 0;
597
551
  }
@@ -600,8 +554,7 @@ var k = /* @__PURE__ */ function() {
600
554
  if (E == 1)
601
555
  b.e = l, at = N;
602
556
  else {
603
- for (f = 1, h = U[0]; h >= 10; h /= 10)
604
- f++;
557
+ for (f = 1, h = U[0]; h >= 10; h /= 10) f++;
605
558
  b.e = f + l * E - 1, T(b, a ? s + b.e + 1 : s, o, N);
606
559
  }
607
560
  return b;
@@ -609,83 +562,68 @@ var k = /* @__PURE__ */ function() {
609
562
  }();
610
563
  function T(e, t, n, i) {
611
564
  var r, s, o, a, u, c, l, f, h, E = e.constructor;
612
- e:
613
- if (t != null) {
614
- if (f = e.d, !f)
615
- return e;
616
- for (r = 1, a = f[0]; a >= 10; a /= 10)
617
- r++;
618
- if (s = t - r, s < 0)
619
- s += A, o = t, l = f[h = 0], u = l / F(10, r - o - 1) % 10 | 0;
620
- else if (h = Math.ceil((s + 1) / A), a = f.length, h >= a)
621
- if (i) {
622
- for (; a++ <= h; )
623
- f.push(0);
624
- l = u = 0, r = 1, s %= A, o = s - A + 1;
625
- } else
626
- break e;
627
- else {
628
- for (l = a = f[h], r = 1; a >= 10; a /= 10)
629
- r++;
630
- s %= A, o = s - A + r, u = o < 0 ? 0 : l / F(10, r - o - 1) % 10 | 0;
631
- }
632
- if (i = i || t < 0 || f[h + 1] !== void 0 || (o < 0 ? l : l % F(10, r - o - 1)), c = n < 4 ? (u || i) && (n == 0 || n == (e.s < 0 ? 3 : 2)) : u > 5 || u == 5 && (n == 4 || i || n == 6 && // Check whether the digit to the left of the rounding digit is odd.
633
- (s > 0 ? o > 0 ? l / F(10, r - o) : 0 : f[h - 1]) % 10 & 1 || n == (e.s < 0 ? 8 : 7)), t < 1 || !f[0])
634
- return f.length = 0, c ? (t -= e.e + 1, f[0] = F(10, (A - t % A) % A), e.e = -t || 0) : f[0] = e.e = 0, e;
635
- if (s == 0 ? (f.length = h, a = 1, h--) : (f.length = h + 1, a = F(10, A - s), f[h] = o > 0 ? (l / F(10, r - o) % F(10, o) | 0) * a : 0), c)
636
- for (; ; )
637
- if (h == 0) {
638
- for (s = 1, o = f[0]; o >= 10; o /= 10)
639
- s++;
640
- for (o = f[0] += a, a = 1; o >= 10; o /= 10)
641
- a++;
642
- s != a && (e.e++, f[0] == z && (f[0] = 1));
643
- break;
644
- } else {
645
- if (f[h] += a, f[h] != z)
646
- break;
647
- f[h--] = 0, a = 1;
648
- }
649
- for (s = f.length; f[--s] === 0; )
650
- f.pop();
565
+ e: if (t != null) {
566
+ if (f = e.d, !f) return e;
567
+ for (r = 1, a = f[0]; a >= 10; a /= 10) r++;
568
+ if (s = t - r, s < 0)
569
+ s += A, o = t, l = f[h = 0], u = l / F(10, r - o - 1) % 10 | 0;
570
+ else if (h = Math.ceil((s + 1) / A), a = f.length, h >= a)
571
+ if (i) {
572
+ for (; a++ <= h; ) f.push(0);
573
+ l = u = 0, r = 1, s %= A, o = s - A + 1;
574
+ } else
575
+ break e;
576
+ else {
577
+ for (l = a = f[h], r = 1; a >= 10; a /= 10) r++;
578
+ s %= A, o = s - A + r, u = o < 0 ? 0 : l / F(10, r - o - 1) % 10 | 0;
651
579
  }
580
+ if (i = i || t < 0 || f[h + 1] !== void 0 || (o < 0 ? l : l % F(10, r - o - 1)), c = n < 4 ? (u || i) && (n == 0 || n == (e.s < 0 ? 3 : 2)) : u > 5 || u == 5 && (n == 4 || i || n == 6 && // Check whether the digit to the left of the rounding digit is odd.
581
+ (s > 0 ? o > 0 ? l / F(10, r - o) : 0 : f[h - 1]) % 10 & 1 || n == (e.s < 0 ? 8 : 7)), t < 1 || !f[0])
582
+ return f.length = 0, c ? (t -= e.e + 1, f[0] = F(10, (A - t % A) % A), e.e = -t || 0) : f[0] = e.e = 0, e;
583
+ if (s == 0 ? (f.length = h, a = 1, h--) : (f.length = h + 1, a = F(10, A - s), f[h] = o > 0 ? (l / F(10, r - o) % F(10, o) | 0) * a : 0), c)
584
+ for (; ; )
585
+ if (h == 0) {
586
+ for (s = 1, o = f[0]; o >= 10; o /= 10) s++;
587
+ for (o = f[0] += a, a = 1; o >= 10; o /= 10) a++;
588
+ s != a && (e.e++, f[0] == z && (f[0] = 1));
589
+ break;
590
+ } else {
591
+ if (f[h] += a, f[h] != z) break;
592
+ f[h--] = 0, a = 1;
593
+ }
594
+ for (s = f.length; f[--s] === 0; ) f.pop();
595
+ }
652
596
  return O && (e.e > E.maxE ? (e.d = null, e.e = NaN) : e.e < E.minE && (e.e = 0, e.d = [0])), e;
653
597
  }
654
598
  function X(e, t, n) {
655
- if (!e.isFinite())
656
- return mt(e);
599
+ if (!e.isFinite()) return mt(e);
657
600
  var i, r = e.e, s = B(e.d), o = s.length;
658
601
  return t ? (n && (i = n - o) > 0 ? s = s.charAt(0) + "." + s.slice(1) + K(i) : o > 1 && (s = s.charAt(0) + "." + s.slice(1)), s = s + (e.e < 0 ? "e" : "e+") + e.e) : r < 0 ? (s = "0." + K(-r - 1) + s, n && (i = n - o) > 0 && (s += K(i))) : r >= o ? (s += K(r + 1 - o), n && (i = n - r - 1) > 0 && (s = s + "." + K(i))) : ((i = r + 1) < o && (s = s.slice(0, i) + "." + s.slice(i)), n && (i = n - o) > 0 && (r + 1 === o && (s += "."), s += K(i))), s;
659
602
  }
660
- function xe(e, t) {
603
+ function Se(e, t) {
661
604
  var n = e[0];
662
- for (t *= A; n >= 10; n /= 10)
663
- t++;
605
+ for (t *= A; n >= 10; n /= 10) t++;
664
606
  return t;
665
607
  }
666
608
  function _e(e, t, n) {
667
- if (t > Rt)
609
+ if (t > Lt)
668
610
  throw O = !0, n && (e.precision = n), Error(ct);
669
611
  return T(new e(Ie), t, 1, !0);
670
612
  }
671
613
  function J(e, t, n) {
672
- if (t > qe)
673
- throw Error(ct);
614
+ if (t > qe) throw Error(ct);
674
615
  return T(new e(Oe), t, n, !0);
675
616
  }
676
617
  function ht(e) {
677
618
  var t = e.length - 1, n = t * A + 1;
678
619
  if (t = e[t], t) {
679
- for (; t % 10 == 0; t /= 10)
680
- n--;
681
- for (t = e[0]; t >= 10; t /= 10)
682
- n++;
620
+ for (; t % 10 == 0; t /= 10) n--;
621
+ for (t = e[0]; t >= 10; t /= 10) n++;
683
622
  }
684
623
  return n;
685
624
  }
686
625
  function K(e) {
687
- for (var t = ""; e--; )
688
- t += "0";
626
+ for (var t = ""; e--; ) t += "0";
689
627
  return t;
690
628
  }
691
629
  function dt(e, t, n, i) {
@@ -699,7 +637,7 @@ function dt(e, t, n, i) {
699
637
  }
700
638
  return O = !0, s;
701
639
  }
702
- function Qe(e) {
640
+ function Ze(e) {
703
641
  return e.d[e.d.length - 1] & 1;
704
642
  }
705
643
  function pt(e, t, n) {
@@ -720,8 +658,7 @@ function Ve(e, t) {
720
658
  e = e.times(a), f += 5;
721
659
  for (i = Math.log(F(2, f)) / Math.LN10 * 2 + 5 | 0, u += i, n = s = o = new h(1), h.precision = u; ; ) {
722
660
  if (s = T(s.times(e), u, 1), n = n.times(++l), a = o.plus(k(s, n, u, 1)), B(a.d).slice(0, u) === B(o.d).slice(0, u)) {
723
- for (r = f; r--; )
724
- o = T(o.times(o), u, 1);
661
+ for (r = f; r--; ) o = T(o.times(o), u, 1);
725
662
  if (t == null)
726
663
  if (c < 3 && ge(o.d, u - i, E, c))
727
664
  h.precision = u += 10, n = s = a = new h(1), l = 0, c++;
@@ -734,10 +671,10 @@ function Ve(e, t) {
734
671
  }
735
672
  }
736
673
  function ee(e, t) {
737
- var n, i, r, s, o, a, u, c, l, f, h, E = 1, N = 10, y = e, x = y.d, b = y.constructor, U = b.rounding, _ = b.precision;
738
- if (y.s < 0 || !x || !x[0] || !y.e && x[0] == 1 && x.length == 1)
739
- return new b(x && !x[0] ? -1 / 0 : y.s != 1 ? NaN : x ? 0 : y);
740
- if (t == null ? (O = !1, l = _) : l = t, b.precision = l += N, n = B(x), i = n.charAt(0), Math.abs(s = y.e) < 15e14) {
674
+ var n, i, r, s, o, a, u, c, l, f, h, E = 1, N = 10, y = e, S = y.d, b = y.constructor, U = b.rounding, _ = b.precision;
675
+ if (y.s < 0 || !S || !S[0] || !y.e && S[0] == 1 && S.length == 1)
676
+ return new b(S && !S[0] ? -1 / 0 : y.s != 1 ? NaN : S ? 0 : y);
677
+ if (t == null ? (O = !1, l = _) : l = t, b.precision = l += N, n = B(S), i = n.charAt(0), Math.abs(s = y.e) < 15e14) {
741
678
  for (; i < 7 && i != 1 || i == 1 && n.charAt(1) > 3; )
742
679
  y = y.times(e), n = B(y.d), i = n.charAt(0), E++;
743
680
  s = y.e, i > 1 ? (y = new b("0." + n), s++) : y = new b(i + "." + n.slice(1));
@@ -760,48 +697,42 @@ function mt(e) {
760
697
  }
761
698
  function je(e, t) {
762
699
  var n, i, r;
763
- for ((n = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (i = t.search(/e/i)) > 0 ? (n < 0 && (n = i), n += +t.slice(i + 1), t = t.substring(0, i)) : n < 0 && (n = t.length), i = 0; t.charCodeAt(i) === 48; i++)
764
- ;
765
- for (r = t.length; t.charCodeAt(r - 1) === 48; --r)
766
- ;
700
+ for ((n = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (i = t.search(/e/i)) > 0 ? (n < 0 && (n = i), n += +t.slice(i + 1), t = t.substring(0, i)) : n < 0 && (n = t.length), i = 0; t.charCodeAt(i) === 48; i++) ;
701
+ for (r = t.length; t.charCodeAt(r - 1) === 48; --r) ;
767
702
  if (t = t.slice(i, r), t) {
768
703
  if (r -= i, e.e = n = n - i - 1, e.d = [], i = (n + 1) % A, n < 0 && (i += A), i < r) {
769
- for (i && e.d.push(+t.slice(0, i)), r -= A; i < r; )
770
- e.d.push(+t.slice(i, i += A));
704
+ for (i && e.d.push(+t.slice(0, i)), r -= A; i < r; ) e.d.push(+t.slice(i, i += A));
771
705
  t = t.slice(i), i = A - t.length;
772
706
  } else
773
707
  i -= r;
774
- for (; i--; )
775
- t += "0";
708
+ for (; i--; ) t += "0";
776
709
  e.d.push(+t), O && (e.e > e.constructor.maxE ? (e.d = null, e.e = NaN) : e.e < e.constructor.minE && (e.e = 0, e.d = [0]));
777
710
  } else
778
711
  e.e = 0, e.d = [0];
779
712
  return e;
780
713
  }
781
- function Ft(e, t) {
714
+ function Pt(e, t) {
782
715
  var n, i, r, s, o, a, u, c, l;
783
716
  if (t.indexOf("_") > -1) {
784
- if (t = t.replace(/(\d)_(?=\d)/g, "$1"), ft.test(t))
785
- return je(e, t);
717
+ if (t = t.replace(/(\d)_(?=\d)/g, "$1"), ft.test(t)) return je(e, t);
786
718
  } else if (t === "Infinity" || t === "NaN")
787
719
  return +t || (e.s = NaN), e.e = NaN, e.d = null, e;
788
- if (St.test(t))
720
+ if (Ct.test(t))
789
721
  n = 16, t = t.toLowerCase();
790
722
  else if (xt.test(t))
791
723
  n = 2;
792
- else if (Ct.test(t))
724
+ else if (kt.test(t))
793
725
  n = 8;
794
726
  else
795
727
  throw Error(te + t);
796
- for (s = t.search(/p/i), s > 0 ? (u = +t.slice(s + 1), t = t.substring(2, s)) : t = t.slice(2), s = t.indexOf("."), o = s >= 0, i = e.constructor, o && (t = t.replace(".", ""), a = t.length, s = a - s, r = dt(i, new i(n), s, s * 2)), c = ve(t, n, z), l = c.length - 1, s = l; c[s] === 0; --s)
797
- c.pop();
798
- return s < 0 ? new i(e.s * 0) : (e.e = xe(c, l), e.d = c, O = !1, o && (e = k(e, r, a * 4)), u && (e = e.times(Math.abs(u) < 54 ? F(2, u) : le.pow(2, u))), O = !0, e);
728
+ for (s = t.search(/p/i), s > 0 ? (u = +t.slice(s + 1), t = t.substring(2, s)) : t = t.slice(2), s = t.indexOf("."), o = s >= 0, i = e.constructor, o && (t = t.replace(".", ""), a = t.length, s = a - s, r = dt(i, new i(n), s, s * 2)), c = ve(t, n, z), l = c.length - 1, s = l; c[s] === 0; --s) c.pop();
729
+ return s < 0 ? new i(e.s * 0) : (e.e = Se(c, l), e.d = c, O = !1, o && (e = k(e, r, a * 4)), u && (e = e.times(Math.abs(u) < 54 ? F(2, u) : le.pow(2, u))), O = !0, e);
799
730
  }
800
- function Pt(e, t) {
731
+ function Mt(e, t) {
801
732
  var n, i = t.d.length;
802
733
  if (i < 3)
803
734
  return t.isZero() ? t : ue(e, 2, t, t);
804
- n = 1.4 * Math.sqrt(i), n = n > 16 ? 16 : n | 0, t = t.times(1 / Se(5, n)), t = ue(e, 2, t, t);
735
+ n = 1.4 * Math.sqrt(i), n = n > 16 ? 16 : n | 0, t = t.times(1 / xe(5, n)), t = ue(e, 2, t, t);
805
736
  for (var r, s = new e(5), o = new e(16), a = new e(20); n--; )
806
737
  r = t.times(t), t = t.times(s.plus(r.times(o.times(r).minus(a))));
807
738
  return t;
@@ -810,30 +741,27 @@ function ue(e, t, n, i, r) {
810
741
  var s, o, a, u, c = e.precision, l = Math.ceil(c / A);
811
742
  for (O = !1, u = n.times(n), a = new e(i); ; ) {
812
743
  if (o = k(a.times(u), new e(t++ * t++), c, 1), a = r ? i.plus(o) : i.minus(o), i = k(o.times(u), new e(t++ * t++), c, 1), o = a.plus(i), o.d[l] !== void 0) {
813
- for (s = l; o.d[s] === a.d[s] && s--; )
814
- ;
815
- if (s == -1)
816
- break;
744
+ for (s = l; o.d[s] === a.d[s] && s--; ) ;
745
+ if (s == -1) break;
817
746
  }
818
747
  s = a, a = i, i = o, o = s;
819
748
  }
820
749
  return O = !0, o.d.length = l + 1, o;
821
750
  }
822
- function Se(e, t) {
823
- for (var n = e; --t; )
824
- n *= e;
751
+ function xe(e, t) {
752
+ for (var n = e; --t; ) n *= e;
825
753
  return n;
826
754
  }
827
755
  function gt(e, t) {
828
756
  var n, i = t.s < 0, r = J(e, e.precision, 1), s = r.times(0.5);
829
757
  if (t = t.abs(), t.lte(s))
830
- return Z = i ? 4 : 1, t;
758
+ return Q = i ? 4 : 1, t;
831
759
  if (n = t.divToInt(r), n.isZero())
832
- Z = i ? 3 : 2;
760
+ Q = i ? 3 : 2;
833
761
  else {
834
762
  if (t = t.minus(n.times(r)), t.lte(s))
835
- return Z = Qe(n) ? i ? 2 : 3 : i ? 4 : 1, t;
836
- Z = Qe(n) ? i ? 1 : 4 : i ? 3 : 2;
763
+ return Q = Ze(n) ? i ? 2 : 3 : i ? 4 : 1, t;
764
+ Q = Ze(n) ? i ? 1 : 4 : i ? 3 : 2;
837
765
  }
838
766
  return t.minus(r).abs();
839
767
  }
@@ -842,39 +770,29 @@ function Je(e, t, n, i) {
842
770
  if (N ? ($(n, 1, ne), i === void 0 ? i = E.rounding : $(i, 0, 8)) : (n = E.precision, i = E.rounding), !e.isFinite())
843
771
  l = mt(e);
844
772
  else {
845
- for (l = X(e), o = l.indexOf("."), N ? (r = 2, t == 16 ? n = n * 4 - 3 : t == 8 && (n = n * 3 - 2)) : r = t, o >= 0 && (l = l.replace(".", ""), h = new E(1), h.e = l.length - o, h.d = ve(X(h), 10, r), h.e = h.d.length), f = ve(l, 10, r), s = u = f.length; f[--u] == 0; )
846
- f.pop();
773
+ for (l = X(e), o = l.indexOf("."), N ? (r = 2, t == 16 ? n = n * 4 - 3 : t == 8 && (n = n * 3 - 2)) : r = t, o >= 0 && (l = l.replace(".", ""), h = new E(1), h.e = l.length - o, h.d = ve(X(h), 10, r), h.e = h.d.length), f = ve(l, 10, r), s = u = f.length; f[--u] == 0; ) f.pop();
847
774
  if (!f[0])
848
775
  l = N ? "0p+0" : "0";
849
776
  else {
850
777
  if (o < 0 ? s-- : (e = new E(e), e.d = f, e.e = s, e = k(e, h, n, i, 0, r), f = e.d, s = e.e, c = at), o = f[n], a = r / 2, c = c || f[n + 1] !== void 0, c = i < 4 ? (o !== void 0 || c) && (i === 0 || i === (e.s < 0 ? 3 : 2)) : o > a || o === a && (i === 4 || c || i === 6 && f[n - 1] & 1 || i === (e.s < 0 ? 8 : 7)), f.length = n, c)
851
778
  for (; ++f[--n] > r - 1; )
852
779
  f[n] = 0, n || (++s, f.unshift(1));
853
- for (u = f.length; !f[u - 1]; --u)
854
- ;
855
- for (o = 0, l = ""; o < u; o++)
856
- l += Be.charAt(f[o]);
780
+ for (u = f.length; !f[u - 1]; --u) ;
781
+ for (o = 0, l = ""; o < u; o++) l += Be.charAt(f[o]);
857
782
  if (N) {
858
783
  if (u > 1)
859
784
  if (t == 16 || t == 8) {
860
- for (o = t == 16 ? 4 : 3, --u; u % o; u++)
861
- l += "0";
862
- for (f = ve(l, r, t), u = f.length; !f[u - 1]; --u)
863
- ;
864
- for (o = 1, l = "1."; o < u; o++)
865
- l += Be.charAt(f[o]);
785
+ for (o = t == 16 ? 4 : 3, --u; u % o; u++) l += "0";
786
+ for (f = ve(l, r, t), u = f.length; !f[u - 1]; --u) ;
787
+ for (o = 1, l = "1."; o < u; o++) l += Be.charAt(f[o]);
866
788
  } else
867
789
  l = l.charAt(0) + "." + l.slice(1);
868
790
  l = l + (s < 0 ? "p" : "p+") + s;
869
791
  } else if (s < 0) {
870
- for (; ++s; )
871
- l = "0" + l;
792
+ for (; ++s; ) l = "0" + l;
872
793
  l = "0." + l;
873
- } else if (++s > u)
874
- for (s -= u; s--; )
875
- l += "0";
876
- else
877
- s < u && (l = l.slice(0, s) + "." + l.slice(s));
794
+ } else if (++s > u) for (s -= u; s--; ) l += "0";
795
+ else s < u && (l = l.slice(0, s) + "." + l.slice(s));
878
796
  }
879
797
  l = (t == 16 ? "0x" : t == 2 ? "0b" : t == 8 ? "0o" : "") + l;
880
798
  }
@@ -884,47 +802,46 @@ function We(e, t) {
884
802
  if (e.length > t)
885
803
  return e.length = t, !0;
886
804
  }
887
- function Mt(e) {
805
+ function Bt(e) {
888
806
  return new this(e).abs();
889
807
  }
890
- function Bt(e) {
808
+ function Ut(e) {
891
809
  return new this(e).acos();
892
810
  }
893
- function Ut(e) {
811
+ function qt(e) {
894
812
  return new this(e).acosh();
895
813
  }
896
- function qt(e, t) {
814
+ function Vt(e, t) {
897
815
  return new this(e).plus(t);
898
816
  }
899
- function Vt(e) {
817
+ function jt(e) {
900
818
  return new this(e).asin();
901
819
  }
902
- function jt(e) {
820
+ function $t(e) {
903
821
  return new this(e).asinh();
904
822
  }
905
- function $t(e) {
823
+ function Ht(e) {
906
824
  return new this(e).atan();
907
825
  }
908
- function Ht(e) {
826
+ function Gt(e) {
909
827
  return new this(e).atanh();
910
828
  }
911
- function Gt(e, t) {
829
+ function Yt(e, t) {
912
830
  e = new this(e), t = new this(t);
913
831
  var n, i = this.precision, r = this.rounding, s = i + 4;
914
832
  return !e.s || !t.s ? n = new this(NaN) : !e.d && !t.d ? (n = J(this, s, 1).times(t.s > 0 ? 0.25 : 0.75), n.s = e.s) : !t.d || e.isZero() ? (n = t.s < 0 ? J(this, i, r) : new this(0), n.s = e.s) : !e.d || t.isZero() ? (n = J(this, s, 1).times(0.5), n.s = e.s) : t.s < 0 ? (this.precision = s, this.rounding = 1, n = this.atan(k(e, t, s, 1)), t = J(this, s, 1), this.precision = i, this.rounding = r, n = e.s < 0 ? n.minus(t) : n.plus(t)) : n = this.atan(k(e, t, s, 1)), n;
915
833
  }
916
- function Yt(e) {
834
+ function Jt(e) {
917
835
  return new this(e).cbrt();
918
836
  }
919
- function Jt(e) {
837
+ function zt(e) {
920
838
  return T(e = new this(e), e.e + 1, 2);
921
839
  }
922
- function zt(e, t, n) {
840
+ function Xt(e, t, n) {
923
841
  return new this(e).clamp(t, n);
924
842
  }
925
- function Xt(e) {
926
- if (!e || typeof e != "object")
927
- throw Error(De + "Object expected");
843
+ function Qt(e) {
844
+ if (!e || typeof e != "object") throw Error(De + "Object expected");
928
845
  var t, n, i, r = e.defaults === !0, s = [
929
846
  "precision",
930
847
  1,
@@ -950,10 +867,8 @@ function Xt(e) {
950
867
  ];
951
868
  for (t = 0; t < s.length; t += 3)
952
869
  if (n = s[t], r && (this[n] = Ue[n]), (i = e[n]) !== void 0)
953
- if (V(i) === i && i >= s[t + 1] && i <= s[t + 2])
954
- this[n] = i;
955
- else
956
- throw Error(te + n + ": " + i);
870
+ if (V(i) === i && i >= s[t + 1] && i <= s[t + 2]) this[n] = i;
871
+ else throw Error(te + n + ": " + i);
957
872
  if (n = "crypto", r && (this[n] = Ue[n]), (i = e[n]) !== void 0)
958
873
  if (i === !0 || i === !1 || i === 0 || i === 1)
959
874
  if (i)
@@ -970,15 +885,14 @@ function Xt(e) {
970
885
  function Zt(e) {
971
886
  return new this(e).cos();
972
887
  }
973
- function Qt(e) {
888
+ function Wt(e) {
974
889
  return new this(e).cosh();
975
890
  }
976
891
  function Et(e) {
977
892
  var t, n, i;
978
893
  function r(s) {
979
894
  var o, a, u, c = this;
980
- if (!(c instanceof r))
981
- return new r(s);
895
+ if (!(c instanceof r)) return new r(s);
982
896
  if (c.constructor = r, Ke(s)) {
983
897
  c.s = s.s, O ? !s.d || s.e > r.maxE ? (c.e = NaN, c.d = null) : s.e < r.minE ? (c.e = 0, c.d = [0]) : (c.e = s.e, c.d = s.d.slice()) : (c.e = s.e, c.d = s.d ? s.d.slice() : s.d);
984
898
  return;
@@ -989,8 +903,7 @@ function Et(e) {
989
903
  return;
990
904
  }
991
905
  if (s < 0 ? (s = -s, c.s = -1) : c.s = 1, s === ~~s && s < 1e7) {
992
- for (o = 0, a = s; a >= 10; a /= 10)
993
- o++;
906
+ for (o = 0, a = s; a >= 10; a /= 10) o++;
994
907
  O ? o > r.maxE ? (c.e = NaN, c.d = null) : o < r.minE ? (c.e = 0, c.d = [0]) : (c.e = o, c.d = [s]) : (c.e = o, c.d = [s]);
995
908
  return;
996
909
  } else if (s * 0 !== 0) {
@@ -1000,23 +913,22 @@ function Et(e) {
1000
913
  return je(c, s.toString());
1001
914
  } else if (u !== "string")
1002
915
  throw Error(te + s);
1003
- return (a = s.charCodeAt(0)) === 45 ? (s = s.slice(1), c.s = -1) : (a === 43 && (s = s.slice(1)), c.s = 1), ft.test(s) ? je(c, s) : Ft(c, s);
916
+ return (a = s.charCodeAt(0)) === 45 ? (s = s.slice(1), c.s = -1) : (a === 43 && (s = s.slice(1)), c.s = 1), ft.test(s) ? je(c, s) : Pt(c, s);
1004
917
  }
1005
- if (r.prototype = m, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Xt, r.clone = Et, r.isDecimal = Ke, r.abs = Mt, r.acos = Bt, r.acosh = Ut, r.add = qt, r.asin = Vt, r.asinh = jt, r.atan = $t, r.atanh = Ht, r.atan2 = Gt, r.cbrt = Yt, r.ceil = Jt, r.clamp = zt, r.cos = Zt, r.cosh = Qt, r.div = Wt, r.exp = Kt, r.floor = en, r.hypot = tn, r.ln = nn, r.log = rn, r.log10 = on, r.log2 = sn, r.max = an, r.min = cn, r.mod = un, r.mul = ln, r.pow = fn, r.random = hn, r.round = dn, r.sign = pn, r.sin = mn, r.sinh = gn, r.sqrt = En, r.sub = Nn, r.sum = yn, r.tan = vn, r.tanh = wn, r.trunc = Tn, e === void 0 && (e = {}), e && e.defaults !== !0)
1006
- for (i = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], t = 0; t < i.length; )
1007
- e.hasOwnProperty(n = i[t++]) || (e[n] = this[n]);
918
+ if (r.prototype = m, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Qt, r.clone = Et, r.isDecimal = Ke, r.abs = Bt, r.acos = Ut, r.acosh = qt, r.add = Vt, r.asin = jt, r.asinh = $t, r.atan = Ht, r.atanh = Gt, r.atan2 = Yt, r.cbrt = Jt, r.ceil = zt, r.clamp = Xt, r.cos = Zt, r.cosh = Wt, r.div = Kt, r.exp = en, r.floor = tn, r.hypot = nn, r.ln = rn, r.log = sn, r.log10 = an, r.log2 = on, r.max = cn, r.min = un, r.mod = ln, r.mul = fn, r.pow = hn, r.random = dn, r.round = pn, r.sign = mn, r.sin = gn, r.sinh = En, r.sqrt = Nn, r.sub = yn, r.sum = vn, r.tan = wn, r.tanh = Tn, r.trunc = An, e === void 0 && (e = {}), e && e.defaults !== !0)
919
+ for (i = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], t = 0; t < i.length; ) e.hasOwnProperty(n = i[t++]) || (e[n] = this[n]);
1008
920
  return r.config(e), r;
1009
921
  }
1010
- function Wt(e, t) {
922
+ function Kt(e, t) {
1011
923
  return new this(e).div(t);
1012
924
  }
1013
- function Kt(e) {
925
+ function en(e) {
1014
926
  return new this(e).exp();
1015
927
  }
1016
- function en(e) {
928
+ function tn(e) {
1017
929
  return T(e = new this(e), e.e + 1, 3);
1018
930
  }
1019
- function tn() {
931
+ function nn() {
1020
932
  var e, t, n = new this(0);
1021
933
  for (O = !1, e = 0; e < arguments.length; )
1022
934
  if (t = new this(arguments[e++]), t.d)
@@ -1031,34 +943,34 @@ function tn() {
1031
943
  function Ke(e) {
1032
944
  return e instanceof le || e && e.toStringTag === lt || !1;
1033
945
  }
1034
- function nn(e) {
946
+ function rn(e) {
1035
947
  return new this(e).ln();
1036
948
  }
1037
- function rn(e, t) {
949
+ function sn(e, t) {
1038
950
  return new this(e).log(t);
1039
951
  }
1040
- function sn(e) {
952
+ function on(e) {
1041
953
  return new this(e).log(2);
1042
954
  }
1043
- function on(e) {
955
+ function an(e) {
1044
956
  return new this(e).log(10);
1045
957
  }
1046
- function an() {
958
+ function cn() {
1047
959
  return pt(this, arguments, "lt");
1048
960
  }
1049
- function cn() {
961
+ function un() {
1050
962
  return pt(this, arguments, "gt");
1051
963
  }
1052
- function un(e, t) {
964
+ function ln(e, t) {
1053
965
  return new this(e).mod(t);
1054
966
  }
1055
- function ln(e, t) {
967
+ function fn(e, t) {
1056
968
  return new this(e).mul(t);
1057
969
  }
1058
- function fn(e, t) {
970
+ function hn(e, t) {
1059
971
  return new this(e).pow(t);
1060
972
  }
1061
- function hn(e) {
973
+ function dn(e) {
1062
974
  var t, n, i, r, s = 0, o = new this(1), a = [];
1063
975
  if (e === void 0 ? e = this.precision : $(e, 1, ne), i = Math.ceil(e / A), this.crypto)
1064
976
  if (crypto.getRandomValues)
@@ -1070,53 +982,47 @@ function hn(e) {
1070
982
  s = i / 4;
1071
983
  } else
1072
984
  throw Error(ut);
1073
- else
1074
- for (; s < i; )
1075
- a[s++] = Math.random() * 1e7 | 0;
1076
- for (i = a[--s], e %= A, i && e && (r = F(10, A - e), a[s] = (i / r | 0) * r); a[s] === 0; s--)
1077
- a.pop();
985
+ else for (; s < i; ) a[s++] = Math.random() * 1e7 | 0;
986
+ for (i = a[--s], e %= A, i && e && (r = F(10, A - e), a[s] = (i / r | 0) * r); a[s] === 0; s--) a.pop();
1078
987
  if (s < 0)
1079
988
  n = 0, a = [0];
1080
989
  else {
1081
- for (n = -1; a[0] === 0; n -= A)
1082
- a.shift();
1083
- for (i = 1, r = a[0]; r >= 10; r /= 10)
1084
- i++;
990
+ for (n = -1; a[0] === 0; n -= A) a.shift();
991
+ for (i = 1, r = a[0]; r >= 10; r /= 10) i++;
1085
992
  i < A && (n -= A - i);
1086
993
  }
1087
994
  return o.e = n, o.d = a, o;
1088
995
  }
1089
- function dn(e) {
996
+ function pn(e) {
1090
997
  return T(e = new this(e), e.e + 1, this.rounding);
1091
998
  }
1092
- function pn(e) {
999
+ function mn(e) {
1093
1000
  return e = new this(e), e.d ? e.d[0] ? e.s : 0 * e.s : e.s || NaN;
1094
1001
  }
1095
- function mn(e) {
1002
+ function gn(e) {
1096
1003
  return new this(e).sin();
1097
1004
  }
1098
- function gn(e) {
1005
+ function En(e) {
1099
1006
  return new this(e).sinh();
1100
1007
  }
1101
- function En(e) {
1008
+ function Nn(e) {
1102
1009
  return new this(e).sqrt();
1103
1010
  }
1104
- function Nn(e, t) {
1011
+ function yn(e, t) {
1105
1012
  return new this(e).sub(t);
1106
1013
  }
1107
- function yn() {
1014
+ function vn() {
1108
1015
  var e = 0, t = arguments, n = new this(t[e]);
1109
- for (O = !1; n.s && ++e < t.length; )
1110
- n = n.plus(t[e]);
1016
+ for (O = !1; n.s && ++e < t.length; ) n = n.plus(t[e]);
1111
1017
  return O = !0, T(n, this.precision, this.rounding);
1112
1018
  }
1113
- function vn(e) {
1019
+ function wn(e) {
1114
1020
  return new this(e).tan();
1115
1021
  }
1116
- function wn(e) {
1022
+ function Tn(e) {
1117
1023
  return new this(e).tanh();
1118
1024
  }
1119
- function Tn(e) {
1025
+ function An(e) {
1120
1026
  return T(e = new this(e), e.e + 1, 1);
1121
1027
  }
1122
1028
  m[Symbol.for("nodejs.util.inspect.custom")] = m.toString;
@@ -1124,22 +1030,22 @@ m[Symbol.toStringTag] = "Decimal";
1124
1030
  var le = m.constructor = Et(Ue);
1125
1031
  Ie = new le(Ie);
1126
1032
  Oe = new le(Oe);
1127
- const ze = JSON, An = (e) => e.toUpperCase(), In = (e) => {
1033
+ const ze = JSON, In = (e) => e.toUpperCase(), On = (e) => {
1128
1034
  const t = {};
1129
1035
  return e.forEach((n, i) => {
1130
1036
  t[i] = n;
1131
1037
  }), t;
1132
- }, On = (e, t, n) => e.document ? e : {
1038
+ }, _n = (e, t, n) => e.document ? e : {
1133
1039
  document: e,
1134
1040
  variables: t,
1135
1041
  requestHeaders: n,
1136
1042
  signal: void 0
1137
- }, _n = (e, t, n) => e.query ? e : {
1043
+ }, bn = (e, t, n) => e.query ? e : {
1138
1044
  query: e,
1139
1045
  variables: t,
1140
1046
  requestHeaders: n,
1141
1047
  signal: void 0
1142
- }, bn = (e, t) => e.documents ? e : {
1048
+ }, Dn = (e, t) => e.documents ? e : {
1143
1049
  documents: e,
1144
1050
  requestHeaders: t,
1145
1051
  signal: void 0
@@ -1148,7 +1054,7 @@ function we(e, t) {
1148
1054
  if (!!!e)
1149
1055
  throw new Error(t);
1150
1056
  }
1151
- function Dn(e) {
1057
+ function Sn(e) {
1152
1058
  return typeof e == "object" && e !== null;
1153
1059
  }
1154
1060
  function xn(e, t) {
@@ -1157,10 +1063,10 @@ function xn(e, t) {
1157
1063
  t ?? "Unexpected invariant triggered."
1158
1064
  );
1159
1065
  }
1160
- const Sn = /\r\n|[\n\r]/g;
1066
+ const Cn = /\r\n|[\n\r]/g;
1161
1067
  function $e(e, t) {
1162
1068
  let n = 0, i = 1;
1163
- for (const r of e.body.matchAll(Sn)) {
1069
+ for (const r of e.body.matchAll(Cn)) {
1164
1070
  if (typeof r.index == "number" || xn(!1), r.index >= t)
1165
1071
  break;
1166
1072
  n = r.index + r[0].length, i += 1;
@@ -1170,7 +1076,7 @@ function $e(e, t) {
1170
1076
  column: t + 1 - n
1171
1077
  };
1172
1078
  }
1173
- function Cn(e) {
1079
+ function kn(e) {
1174
1080
  return Nt(
1175
1081
  e.source,
1176
1082
  $e(e.source, e.start)
@@ -1203,7 +1109,7 @@ function et(e) {
1203
1109
  return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
1204
1110
  `);
1205
1111
  }
1206
- function kn(e) {
1112
+ function Rn(e) {
1207
1113
  const t = e[0];
1208
1114
  return t == null || "kind" in t || "length" in t ? {
1209
1115
  nodes: t,
@@ -1255,7 +1161,7 @@ class Xe extends Error {
1255
1161
  */
1256
1162
  constructor(t, ...n) {
1257
1163
  var i, r, s;
1258
- const { nodes: o, source: a, positions: u, path: c, originalError: l, extensions: f } = kn(n);
1164
+ const { nodes: o, source: a, positions: u, path: c, originalError: l, extensions: f } = Rn(n);
1259
1165
  super(t), this.name = "GraphQLError", this.path = c ?? void 0, this.originalError = l ?? void 0, this.nodes = tt(
1260
1166
  Array.isArray(o) ? o : o ? [o] : void 0
1261
1167
  );
@@ -1263,7 +1169,7 @@ class Xe extends Error {
1263
1169
  (i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null)
1264
1170
  );
1265
1171
  this.source = a ?? (h == null || (r = h[0]) === null || r === void 0 ? void 0 : r.source), this.positions = u ?? (h == null ? void 0 : h.map((N) => N.start)), this.locations = u && a ? u.map((N) => $e(a, N)) : h == null ? void 0 : h.map((N) => $e(N.source, N.start));
1266
- const E = Dn(
1172
+ const E = Sn(
1267
1173
  l == null ? void 0 : l.extensions
1268
1174
  ) ? l == null ? void 0 : l.extensions : void 0;
1269
1175
  this.extensions = (s = f ?? E) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
@@ -1305,7 +1211,7 @@ class Xe extends Error {
1305
1211
  for (const n of this.nodes)
1306
1212
  n.loc && (t += `
1307
1213
 
1308
- ` + Cn(n.loc));
1214
+ ` + kn(n.loc));
1309
1215
  else if (this.source && this.locations)
1310
1216
  for (const n of this.locations)
1311
1217
  t += `
@@ -1329,7 +1235,7 @@ function P(e, t, n) {
1329
1235
  positions: [t]
1330
1236
  });
1331
1237
  }
1332
- class Rn {
1238
+ class Ln {
1333
1239
  /**
1334
1240
  * The character offset at which this Node begins.
1335
1241
  */
@@ -1474,10 +1380,10 @@ const vt = {
1474
1380
  UnionTypeExtension: ["name", "directives", "types"],
1475
1381
  EnumTypeExtension: ["name", "directives", "values"],
1476
1382
  InputObjectTypeExtension: ["name", "directives", "fields"]
1477
- }, Ln = new Set(Object.keys(vt));
1383
+ }, Fn = new Set(Object.keys(vt));
1478
1384
  function nt(e) {
1479
1385
  const t = e == null ? void 0 : e.kind;
1480
- return typeof t == "string" && Ln.has(t);
1386
+ return typeof t == "string" && Fn.has(t);
1481
1387
  }
1482
1388
  var ce;
1483
1389
  (function(e) {
@@ -1504,15 +1410,15 @@ function wt(e) {
1504
1410
  function Tt(e) {
1505
1411
  return wt(e) || e === 95;
1506
1412
  }
1507
- function Fn(e) {
1413
+ function Pn(e) {
1508
1414
  return wt(e) || Ee(e) || e === 95;
1509
1415
  }
1510
- function Pn(e) {
1416
+ function Mn(e) {
1511
1417
  var t;
1512
1418
  let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
1513
1419
  for (let o = 0; o < e.length; ++o) {
1514
1420
  var s;
1515
- const a = e[o], u = Mn(a);
1421
+ const a = e[o], u = Bn(a);
1516
1422
  u !== a.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && u < n && (n = u));
1517
1423
  }
1518
1424
  return e.map((o, a) => a === 0 ? o : o.slice(n)).slice(
@@ -1520,13 +1426,13 @@ function Pn(e) {
1520
1426
  r + 1
1521
1427
  );
1522
1428
  }
1523
- function Mn(e) {
1429
+ function Bn(e) {
1524
1430
  let t = 0;
1525
1431
  for (; t < e.length && Ge(e.charCodeAt(t)); )
1526
1432
  ++t;
1527
1433
  return t;
1528
1434
  }
1529
- function Bn(e, t) {
1435
+ function Un(e, t) {
1530
1436
  const n = e.replace(/"""/g, '\\"""'), i = n.split(/\r\n|[\n\r]/g), r = i.length === 1, s = i.length > 1 && i.slice(1).every((E) => E.length === 0 || Ge(E.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, u = e.endsWith("\\"), c = a || u, l = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
1531
1437
  (!r || e.length > 70 || c || s || o);
1532
1438
  let f = "";
@@ -1539,7 +1445,7 @@ var p;
1539
1445
  (function(e) {
1540
1446
  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";
1541
1447
  })(p || (p = {}));
1542
- class Un {
1448
+ class qn {
1543
1449
  /**
1544
1450
  * The previously focused non-ignored token.
1545
1451
  */
@@ -1576,14 +1482,14 @@ class Un {
1576
1482
  if (t.next)
1577
1483
  t = t.next;
1578
1484
  else {
1579
- const n = Vn(this, t.end);
1485
+ const n = jn(this, t.end);
1580
1486
  t.next = n, n.prev = t, t = n;
1581
1487
  }
1582
1488
  while (t.kind === p.COMMENT);
1583
1489
  return t;
1584
1490
  }
1585
1491
  }
1586
- function qn(e) {
1492
+ function Vn(e) {
1587
1493
  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;
1588
1494
  }
1589
1495
  function fe(e) {
@@ -1612,7 +1518,7 @@ function L(e, t, n, i, r) {
1612
1518
  const s = e.line, o = 1 + n - e.lineStart;
1613
1519
  return new yt(t, n, i, s, o, r);
1614
1520
  }
1615
- function Vn(e, t) {
1521
+ function jn(e, t) {
1616
1522
  const n = e.source.body, i = n.length;
1617
1523
  let r = t;
1618
1524
  for (; r < i; ) {
@@ -1631,7 +1537,7 @@ function Vn(e, t) {
1631
1537
  n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
1632
1538
  continue;
1633
1539
  case 35:
1634
- return jn(e, r);
1540
+ return $n(e, r);
1635
1541
  case 33:
1636
1542
  return L(e, p.BANG, r, r + 1);
1637
1543
  case 36:
@@ -1663,12 +1569,12 @@ function Vn(e, t) {
1663
1569
  case 125:
1664
1570
  return L(e, p.BRACE_R, r, r + 1);
1665
1571
  case 34:
1666
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? zn(e, r) : Hn(e, r);
1572
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Xn(e, r) : Gn(e, r);
1667
1573
  }
1668
1574
  if (Ee(s) || s === 45)
1669
- return $n(e, r, s);
1575
+ return Hn(e, r, s);
1670
1576
  if (Tt(s))
1671
- return Xn(e, r);
1577
+ return Qn(e, r);
1672
1578
  throw P(
1673
1579
  e.source,
1674
1580
  r,
@@ -1677,7 +1583,7 @@ function Vn(e, t) {
1677
1583
  }
1678
1584
  return L(e, p.EOF, i, i);
1679
1585
  }
1680
- function jn(e, t) {
1586
+ function $n(e, t) {
1681
1587
  const n = e.source.body, i = n.length;
1682
1588
  let r = t + 1;
1683
1589
  for (; r < i; ) {
@@ -1699,7 +1605,7 @@ function jn(e, t) {
1699
1605
  n.slice(t + 1, r)
1700
1606
  );
1701
1607
  }
1702
- function $n(e, t, n) {
1608
+ function Hn(e, t, n) {
1703
1609
  const i = e.source.body;
1704
1610
  let r = t, s = n, o = !1;
1705
1611
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
@@ -1747,7 +1653,7 @@ function Le(e, t, n) {
1747
1653
  ++r;
1748
1654
  return r;
1749
1655
  }
1750
- function Hn(e, t) {
1656
+ function Gn(e, t) {
1751
1657
  const n = e.source.body, i = n.length;
1752
1658
  let r = t + 1, s = r, o = "";
1753
1659
  for (; r < i; ) {
@@ -1756,7 +1662,7 @@ function Hn(e, t) {
1756
1662
  return o += n.slice(s, r), L(e, p.STRING, t, r + 1, o);
1757
1663
  if (a === 92) {
1758
1664
  o += n.slice(s, r);
1759
- const u = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Gn(e, r) : Yn(e, r) : Jn(e, r);
1665
+ const u = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Yn(e, r) : Jn(e, r) : zn(e, r);
1760
1666
  o += u.value, r += u.size, s = r;
1761
1667
  continue;
1762
1668
  }
@@ -1778,7 +1684,7 @@ function Hn(e, t) {
1778
1684
  }
1779
1685
  throw P(e.source, r, "Unterminated string.");
1780
1686
  }
1781
- function Gn(e, t) {
1687
+ function Yn(e, t) {
1782
1688
  const n = e.source.body;
1783
1689
  let i = 0, r = 3;
1784
1690
  for (; r < 12; ) {
@@ -1803,7 +1709,7 @@ function Gn(e, t) {
1803
1709
  )}".`
1804
1710
  );
1805
1711
  }
1806
- function Yn(e, t) {
1712
+ function Jn(e, t) {
1807
1713
  const n = e.source.body, i = it(n, t + 2);
1808
1714
  if (fe(i))
1809
1715
  return {
@@ -1830,7 +1736,7 @@ function it(e, t) {
1830
1736
  function pe(e) {
1831
1737
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
1832
1738
  }
1833
- function Jn(e, t) {
1739
+ function zn(e, t) {
1834
1740
  const n = e.source.body;
1835
1741
  switch (n.charCodeAt(t + 1)) {
1836
1742
  case 34:
@@ -1884,7 +1790,7 @@ function Jn(e, t) {
1884
1790
  )}".`
1885
1791
  );
1886
1792
  }
1887
- function zn(e, t) {
1793
+ function Xn(e, t) {
1888
1794
  const n = e.source.body, i = n.length;
1889
1795
  let r = e.lineStart, s = t + 3, o = s, a = "";
1890
1796
  const u = [];
@@ -1898,7 +1804,7 @@ function zn(e, t) {
1898
1804
  t,
1899
1805
  s + 3,
1900
1806
  // Return a string of the lines joined with U+000A.
1901
- Pn(u).join(`
1807
+ Mn(u).join(`
1902
1808
  `)
1903
1809
  );
1904
1810
  return e.line += u.length - 1, e.lineStart = r, l;
@@ -1927,12 +1833,12 @@ function zn(e, t) {
1927
1833
  }
1928
1834
  throw P(e.source, s, "Unterminated string.");
1929
1835
  }
1930
- function Xn(e, t) {
1836
+ function Qn(e, t) {
1931
1837
  const n = e.source.body, i = n.length;
1932
1838
  let r = t + 1;
1933
1839
  for (; r < i; ) {
1934
1840
  const s = n.charCodeAt(r);
1935
- if (Fn(s))
1841
+ if (Pn(s))
1936
1842
  ++r;
1937
1843
  else
1938
1844
  break;
@@ -1946,7 +1852,7 @@ function Xn(e, t) {
1946
1852
  );
1947
1853
  }
1948
1854
  const Zn = 10, Ot = 2;
1949
- function Ze(e) {
1855
+ function Qe(e) {
1950
1856
  return ke(e, []);
1951
1857
  }
1952
1858
  function ke(e, t) {
@@ -1956,35 +1862,35 @@ function ke(e, t) {
1956
1862
  case "function":
1957
1863
  return e.name ? `[function ${e.name}]` : "[function]";
1958
1864
  case "object":
1959
- return Qn(e, t);
1865
+ return Wn(e, t);
1960
1866
  default:
1961
1867
  return String(e);
1962
1868
  }
1963
1869
  }
1964
- function Qn(e, t) {
1870
+ function Wn(e, t) {
1965
1871
  if (e === null)
1966
1872
  return "null";
1967
1873
  if (t.includes(e))
1968
1874
  return "[Circular]";
1969
1875
  const n = [...t, e];
1970
- if (Wn(e)) {
1876
+ if (Kn(e)) {
1971
1877
  const i = e.toJSON();
1972
1878
  if (i !== e)
1973
1879
  return typeof i == "string" ? i : ke(i, n);
1974
1880
  } else if (Array.isArray(e))
1975
- return ei(e, n);
1976
- return Kn(e, n);
1881
+ return ti(e, n);
1882
+ return ei(e, n);
1977
1883
  }
1978
- function Wn(e) {
1884
+ function Kn(e) {
1979
1885
  return typeof e.toJSON == "function";
1980
1886
  }
1981
- function Kn(e, t) {
1887
+ function ei(e, t) {
1982
1888
  const n = Object.entries(e);
1983
- return n.length === 0 ? "{}" : t.length > Ot ? "[" + ti(e) + "]" : "{ " + n.map(
1889
+ return n.length === 0 ? "{}" : t.length > Ot ? "[" + ni(e) + "]" : "{ " + n.map(
1984
1890
  ([r, s]) => r + ": " + ke(s, t)
1985
1891
  ).join(", ") + " }";
1986
1892
  }
1987
- function ei(e, t) {
1893
+ function ti(e, t) {
1988
1894
  if (e.length === 0)
1989
1895
  return "[]";
1990
1896
  if (t.length > Ot)
@@ -1994,7 +1900,7 @@ function ei(e, t) {
1994
1900
  r.push(ke(e[s], t));
1995
1901
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
1996
1902
  }
1997
- function ti(e) {
1903
+ function ni(e) {
1998
1904
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
1999
1905
  if (t === "Object" && typeof e.constructor == "function") {
2000
1906
  const n = e.constructor.name;
@@ -2003,7 +1909,7 @@ function ti(e) {
2003
1909
  }
2004
1910
  return t;
2005
1911
  }
2006
- const ni = (
1912
+ const ii = (
2007
1913
  /* c8 ignore next 6 */
2008
1914
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
2009
1915
  // eslint-disable-next-line no-undef
@@ -2019,7 +1925,7 @@ const ni = (
2019
1925
  Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
2020
1926
  );
2021
1927
  if (r === s) {
2022
- const o = Ze(t);
1928
+ const o = Qe(t);
2023
1929
  throw new Error(`Cannot use ${r} "${o}" from another module or realm.
2024
1930
 
2025
1931
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -2042,7 +1948,7 @@ class _t {
2042
1948
  line: 1,
2043
1949
  column: 1
2044
1950
  }) {
2045
- typeof t == "string" || we(!1, `Body must be a string. Received: ${Ze(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || we(
1951
+ typeof t == "string" || we(!1, `Body must be a string. Received: ${Qe(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || we(
2046
1952
  !1,
2047
1953
  "line in locationOffset is 1-indexed and must be positive."
2048
1954
  ), this.locationOffset.column > 0 || we(
@@ -2054,16 +1960,16 @@ class _t {
2054
1960
  return "Source";
2055
1961
  }
2056
1962
  }
2057
- function ii(e) {
2058
- return ni(e, _t);
1963
+ function ri(e) {
1964
+ return ii(e, _t);
2059
1965
  }
2060
- function ri(e, t) {
2061
- return new si(e, t).parseDocument();
1966
+ function si(e, t) {
1967
+ return new oi(e, t).parseDocument();
2062
1968
  }
2063
- class si {
1969
+ class oi {
2064
1970
  constructor(t, n = {}) {
2065
- const i = ii(t) ? t : new _t(t);
2066
- this._lexer = new Un(i), this._options = n, this._tokenCounter = 0;
1971
+ const i = ri(t) ? t : new _t(t);
1972
+ this._lexer = new qn(i), this._options = n, this._tokenCounter = 0;
2067
1973
  }
2068
1974
  /**
2069
1975
  * Converts a name lex token into a name parse node.
@@ -3030,7 +2936,7 @@ class si {
3030
2936
  * given parsed object.
3031
2937
  */
3032
2938
  node(t, n) {
3033
- return this._options.noLocation !== !0 && (n.loc = new Rn(
2939
+ return this._options.noLocation !== !0 && (n.loc = new Ln(
3034
2940
  t,
3035
2941
  this._lexer.lastToken,
3036
2942
  this._lexer.source
@@ -3166,16 +3072,16 @@ function ye(e) {
3166
3072
  return bt(e.kind) + (t != null ? ` "${t}"` : "");
3167
3073
  }
3168
3074
  function bt(e) {
3169
- return qn(e) ? `"${e}"` : e;
3075
+ return Vn(e) ? `"${e}"` : e;
3170
3076
  }
3171
- function oi(e) {
3172
- return `"${e.replace(ai, ci)}"`;
3077
+ function ai(e) {
3078
+ return `"${e.replace(ci, ui)}"`;
3173
3079
  }
3174
- const ai = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
3175
- function ci(e) {
3176
- return ui[e.charCodeAt(0)];
3080
+ const ci = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
3081
+ function ui(e) {
3082
+ return li[e.charCodeAt(0)];
3177
3083
  }
3178
- const ui = [
3084
+ const li = [
3179
3085
  "\\u0000",
3180
3086
  "\\u0001",
3181
3087
  "\\u0002",
@@ -3341,11 +3247,11 @@ const ui = [
3341
3247
  "\\u009D",
3342
3248
  "\\u009E",
3343
3249
  "\\u009F"
3344
- ], li = Object.freeze({});
3345
- function fi(e, t, n = vt) {
3250
+ ], fi = Object.freeze({});
3251
+ function hi(e, t, n = vt) {
3346
3252
  const i = /* @__PURE__ */ new Map();
3347
3253
  for (const b of Object.values(I))
3348
- i.set(b, hi(t, b));
3254
+ i.set(b, di(t, b));
3349
3255
  let r, s = Array.isArray(e), o = [e], a = -1, u = [], c = e, l, f;
3350
3256
  const h = [], E = [];
3351
3257
  do {
@@ -3355,18 +3261,18 @@ function fi(e, t, n = vt) {
3355
3261
  if (l = E.length === 0 ? void 0 : h[h.length - 1], c = f, f = E.pop(), U)
3356
3262
  if (s) {
3357
3263
  c = c.slice();
3358
- let S = 0;
3264
+ let x = 0;
3359
3265
  for (const [G, j] of u) {
3360
- const Q = G - S;
3361
- j === null ? (c.splice(Q, 1), S++) : c[Q] = j;
3266
+ const Z = G - x;
3267
+ j === null ? (c.splice(Z, 1), x++) : c[Z] = j;
3362
3268
  }
3363
3269
  } else {
3364
3270
  c = Object.defineProperties(
3365
3271
  {},
3366
3272
  Object.getOwnPropertyDescriptors(c)
3367
3273
  );
3368
- for (const [S, G] of u)
3369
- c[S] = G;
3274
+ for (const [x, G] of u)
3275
+ c[x] = G;
3370
3276
  }
3371
3277
  a = r.index, o = r.keys, u = r.edits, s = r.inArray, r = r.prev;
3372
3278
  } else if (f) {
@@ -3377,9 +3283,9 @@ function fi(e, t, n = vt) {
3377
3283
  let _;
3378
3284
  if (!Array.isArray(c)) {
3379
3285
  var N, y;
3380
- nt(c) || we(!1, `Invalid AST Node: ${Ze(c)}.`);
3381
- const S = b ? (N = i.get(c.kind)) === null || N === void 0 ? void 0 : N.leave : (y = i.get(c.kind)) === null || y === void 0 ? void 0 : y.enter;
3382
- if (_ = S == null ? void 0 : S.call(t, c, l, f, h, E), _ === li)
3286
+ nt(c) || we(!1, `Invalid AST Node: ${Qe(c)}.`);
3287
+ const x = b ? (N = i.get(c.kind)) === null || N === void 0 ? void 0 : N.leave : (y = i.get(c.kind)) === null || y === void 0 ? void 0 : y.enter;
3288
+ if (_ = x == null ? void 0 : x.call(t, c, l, f, h, E), _ === fi)
3383
3289
  break;
3384
3290
  if (_ === !1) {
3385
3291
  if (!b) {
@@ -3397,19 +3303,19 @@ function fi(e, t, n = vt) {
3397
3303
  if (_ === void 0 && U && u.push([l, c]), b)
3398
3304
  h.pop();
3399
3305
  else {
3400
- var x;
3306
+ var S;
3401
3307
  r = {
3402
3308
  inArray: s,
3403
3309
  index: a,
3404
3310
  keys: o,
3405
3311
  edits: u,
3406
3312
  prev: r
3407
- }, s = Array.isArray(c), o = s ? c : (x = n[c.kind]) !== null && x !== void 0 ? x : [], a = -1, u = [], f && E.push(f), f = c;
3313
+ }, s = Array.isArray(c), o = s ? c : (S = n[c.kind]) !== null && S !== void 0 ? S : [], a = -1, u = [], f && E.push(f), f = c;
3408
3314
  }
3409
3315
  } while (r !== void 0);
3410
3316
  return u.length !== 0 ? u[u.length - 1][1] : e;
3411
3317
  }
3412
- function hi(e, t) {
3318
+ function di(e, t) {
3413
3319
  const n = e[t];
3414
3320
  return typeof n == "object" ? n : typeof n == "function" ? {
3415
3321
  enter: n,
@@ -3419,10 +3325,10 @@ function hi(e, t) {
3419
3325
  leave: e.leave
3420
3326
  };
3421
3327
  }
3422
- function di(e) {
3423
- return fi(e, mi);
3328
+ function pi(e) {
3329
+ return hi(e, gi);
3424
3330
  }
3425
- const pi = 80, mi = {
3331
+ const mi = 80, gi = {
3426
3332
  Name: {
3427
3333
  leave: (e) => e.value
3428
3334
  },
@@ -3458,7 +3364,7 @@ const pi = 80, mi = {
3458
3364
  leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
3459
3365
  const s = D("", e, ": ") + t;
3460
3366
  let o = s + D("(", w(n, ", "), ")");
3461
- return o.length > pi && (o = s + D(`(
3367
+ return o.length > mi && (o = s + D(`(
3462
3368
  `, Te(w(n, `
3463
3369
  `)), `
3464
3370
  )`)), w([o, w(i, " "), r], " ");
@@ -3496,7 +3402,7 @@ const pi = 80, mi = {
3496
3402
  leave: ({ value: e }) => e
3497
3403
  },
3498
3404
  StringValue: {
3499
- leave: ({ value: e, block: t }) => t ? Bn(e) : oi(e)
3405
+ leave: ({ value: e, block: t }) => t ? Un(e) : ai(e)
3500
3406
  },
3501
3407
  BooleanValue: {
3502
3408
  leave: ({ value: e }) => e ? "true" : "false"
@@ -3690,14 +3596,14 @@ const st = (e) => {
3690
3596
  if (typeof e == "string") {
3691
3597
  let n;
3692
3598
  try {
3693
- const i = ri(e);
3599
+ const i = si(e);
3694
3600
  n = st(i);
3695
3601
  } catch {
3696
3602
  }
3697
3603
  return { query: e, operationName: n };
3698
3604
  }
3699
3605
  const t = st(e);
3700
- return { query: di(e), operationName: t };
3606
+ return { query: pi(e), operationName: t };
3701
3607
  };
3702
3608
  class me extends Error {
3703
3609
  constructor(t, n) {
@@ -3712,13 +3618,13 @@ class me extends Error {
3712
3618
  return ((i = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : i.message) ?? `GraphQL Error (Code: ${t.status})`;
3713
3619
  }
3714
3620
  }
3715
- var gi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3716
- function Ei(e) {
3621
+ var Ei = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3622
+ function Ni(e) {
3717
3623
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3718
3624
  }
3719
3625
  var Ye = { exports: {} };
3720
3626
  (function(e, t) {
3721
- var n = typeof self < "u" ? self : gi, i = function() {
3627
+ var n = typeof self < "u" ? self : Ei, i = function() {
3722
3628
  function s() {
3723
3629
  this.fetch = !1, this.DOMException = n.DOMException;
3724
3630
  }
@@ -3820,7 +3726,7 @@ var Ye = { exports: {} };
3820
3726
  return Promise.reject(new TypeError("Already read"));
3821
3727
  d.bodyUsed = !0;
3822
3728
  }
3823
- function x(d) {
3729
+ function S(d) {
3824
3730
  return new Promise(function(g, v) {
3825
3731
  d.onload = function() {
3826
3732
  g(d.result);
@@ -3830,11 +3736,11 @@ var Ye = { exports: {} };
3830
3736
  });
3831
3737
  }
3832
3738
  function b(d) {
3833
- var g = new FileReader(), v = x(g);
3739
+ var g = new FileReader(), v = S(g);
3834
3740
  return g.readAsArrayBuffer(d), v;
3835
3741
  }
3836
3742
  function U(d) {
3837
- var g = new FileReader(), v = x(g);
3743
+ var g = new FileReader(), v = S(g);
3838
3744
  return g.readAsText(d), v;
3839
3745
  }
3840
3746
  function _(d) {
@@ -3842,7 +3748,7 @@ var Ye = { exports: {} };
3842
3748
  v[q] = String.fromCharCode(g[q]);
3843
3749
  return v.join("");
3844
3750
  }
3845
- function S(d) {
3751
+ function x(d) {
3846
3752
  if (d.slice)
3847
3753
  return d.slice(0);
3848
3754
  var g = new Uint8Array(d.byteLength);
@@ -3850,7 +3756,7 @@ var Ye = { exports: {} };
3850
3756
  }
3851
3757
  function G() {
3852
3758
  return this.bodyUsed = !1, this._initBody = function(d) {
3853
- this._bodyInit = d, d ? typeof d == "string" ? this._bodyText = d : a.blob && Blob.prototype.isPrototypeOf(d) ? this._bodyBlob = d : a.formData && FormData.prototype.isPrototypeOf(d) ? this._bodyFormData = d : a.searchParams && URLSearchParams.prototype.isPrototypeOf(d) ? this._bodyText = d.toString() : a.arrayBuffer && a.blob && u(d) ? (this._bodyArrayBuffer = S(d.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(d) || l(d)) ? this._bodyArrayBuffer = S(d) : this._bodyText = d = Object.prototype.toString.call(d) : this._bodyText = "", this.headers.get("content-type") || (typeof d == "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(d) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
3759
+ this._bodyInit = d, d ? typeof d == "string" ? this._bodyText = d : a.blob && Blob.prototype.isPrototypeOf(d) ? this._bodyBlob = d : a.formData && FormData.prototype.isPrototypeOf(d) ? this._bodyFormData = d : a.searchParams && URLSearchParams.prototype.isPrototypeOf(d) ? this._bodyText = d.toString() : a.arrayBuffer && a.blob && u(d) ? (this._bodyArrayBuffer = x(d.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(d) || l(d)) ? this._bodyArrayBuffer = x(d) : this._bodyText = d = Object.prototype.toString.call(d) : this._bodyText = "", this.headers.get("content-type") || (typeof d == "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(d) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
3854
3760
  }, a.blob && (this.blob = function() {
3855
3761
  var d = y(this);
3856
3762
  if (d)
@@ -3882,7 +3788,7 @@ var Ye = { exports: {} };
3882
3788
  }, this;
3883
3789
  }
3884
3790
  var j = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
3885
- function Q(d) {
3791
+ function Z(d) {
3886
3792
  var g = d.toUpperCase();
3887
3793
  return j.indexOf(g) > -1 ? g : d;
3888
3794
  }
@@ -3895,7 +3801,7 @@ var Ye = { exports: {} };
3895
3801
  this.url = d.url, this.credentials = d.credentials, g.headers || (this.headers = new N(d.headers)), this.method = d.method, this.mode = d.mode, this.signal = d.signal, !v && d._bodyInit != null && (v = d._bodyInit, d.bodyUsed = !0);
3896
3802
  } else
3897
3803
  this.url = String(d);
3898
- if (this.credentials = g.credentials || this.credentials || "same-origin", (g.headers || !this.headers) && (this.headers = new N(g.headers)), this.method = Q(g.method || this.method || "GET"), this.mode = g.mode || this.mode || null, this.signal = g.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && v)
3804
+ if (this.credentials = g.credentials || this.credentials || "same-origin", (g.headers || !this.headers) && (this.headers = new N(g.headers)), this.method = Z(g.method || this.method || "GET"), this.mode = g.mode || this.mode || null, this.signal = g.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && v)
3899
3805
  throw new TypeError("Body not allowed for GET or HEAD requests");
3900
3806
  this._initBody(v);
3901
3807
  }
@@ -3989,15 +3895,15 @@ var Ye = { exports: {} };
3989
3895
  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;
3990
3896
  })(Ye, Ye.exports);
3991
3897
  var be = Ye.exports;
3992
- const Ae = /* @__PURE__ */ Ei(be), Ni = /* @__PURE__ */ Dt({
3898
+ const Ae = /* @__PURE__ */ Ni(be), yi = /* @__PURE__ */ St({
3993
3899
  __proto__: null,
3994
3900
  default: Ae
3995
3901
  }, [be]), oe = (e) => {
3996
3902
  let t = {};
3997
- return e && (typeof Headers < "u" && e instanceof Headers || Ni && be.Headers && e instanceof be.Headers ? t = In(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
3903
+ return e && (typeof Headers < "u" && e instanceof Headers || yi && be.Headers && e instanceof be.Headers ? t = On(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
3998
3904
  n && i !== void 0 && (t[n] = i);
3999
3905
  }) : t = e), t;
4000
- }, ot = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), yi = (e) => {
3906
+ }, ot = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), vi = (e) => {
4001
3907
  if (!Array.isArray(e.query)) {
4002
3908
  const i = e, r = [`query=${encodeURIComponent(ot(i.query))}`];
4003
3909
  return e.variables && r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`), i.operationName && r.push(`operationName=${encodeURIComponent(i.operationName)}`), r.join("&");
@@ -4009,10 +3915,10 @@ const Ae = /* @__PURE__ */ Ei(be), Ni = /* @__PURE__ */ Dt({
4009
3915
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
4010
3916
  }), i), []);
4011
3917
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
4012
- }, vi = (e) => async (t) => {
3918
+ }, wi = (e) => async (t) => {
4013
3919
  const { url: n, query: i, variables: r, operationName: s, fetch: o, fetchOptions: a, middleware: u } = t, c = { ...t.headers };
4014
3920
  let l = "", f;
4015
- e === "POST" ? (f = Ti(i, r, s, a.jsonSerializer), typeof f == "string" && (c["Content-Type"] = "application/json")) : l = yi({
3921
+ e === "POST" ? (f = Ai(i, r, s, a.jsonSerializer), typeof f == "string" && (c["Content-Type"] = "application/json")) : l = vi({
4016
3922
  query: i,
4017
3923
  variables: r,
4018
3924
  operationName: s,
@@ -4026,15 +3932,15 @@ const Ae = /* @__PURE__ */ Ei(be), Ni = /* @__PURE__ */ Dt({
4026
3932
  };
4027
3933
  let E = n, N = h;
4028
3934
  if (u) {
4029
- const y = await Promise.resolve(u({ ...h, url: n, operationName: s, variables: r })), { url: x, ...b } = y;
4030
- E = x, N = b;
3935
+ const y = await Promise.resolve(u({ ...h, url: n, operationName: s, variables: r })), { url: S, ...b } = y;
3936
+ E = S, N = b;
4031
3937
  }
4032
3938
  return l && (E = `${E}?${l}`), await o(E, N);
4033
3939
  };
4034
- class wi {
3940
+ class Ti {
4035
3941
  constructor(t, n = {}) {
4036
3942
  this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
4037
- const [r, s, o] = i, a = _n(r, s, o), { headers: u, fetch: c = Ae, method: l = "POST", requestMiddleware: f, responseMiddleware: h, ...E } = this.requestConfig, { url: N } = this;
3943
+ const [r, s, o] = i, a = bn(r, s, o), { headers: u, fetch: c = Ae, method: l = "POST", requestMiddleware: f, responseMiddleware: h, ...E } = this.requestConfig, { url: N } = this;
4038
3944
  a.signal !== void 0 && (E.signal = a.signal);
4039
3945
  const { operationName: y } = Fe(a.query);
4040
3946
  return Pe({
@@ -4050,13 +3956,13 @@ class wi {
4050
3956
  method: l,
4051
3957
  fetchOptions: E,
4052
3958
  middleware: f
4053
- }).then((x) => (h && h(x), x)).catch((x) => {
4054
- throw h && h(x), x;
3959
+ }).then((S) => (h && h(S), S)).catch((S) => {
3960
+ throw h && h(S), S;
4055
3961
  });
4056
3962
  };
4057
3963
  }
4058
3964
  async request(t, ...n) {
4059
- const [i, r] = n, s = On(t, i, r), { headers: o, fetch: a = Ae, method: u = "POST", requestMiddleware: c, responseMiddleware: l, ...f } = this.requestConfig, { url: h } = this;
3965
+ const [i, r] = n, s = _n(t, i, r), { headers: o, fetch: a = Ae, method: u = "POST", requestMiddleware: c, responseMiddleware: l, ...f } = this.requestConfig, { url: h } = this;
4060
3966
  s.signal !== void 0 && (f.signal = s.signal);
4061
3967
  const { query: E, operationName: N } = Fe(s.document);
4062
3968
  return Pe({
@@ -4078,7 +3984,7 @@ class wi {
4078
3984
  }
4079
3985
  // prettier-ignore
4080
3986
  batchRequests(t, n) {
4081
- const i = bn(t, n), { headers: r, ...s } = this.requestConfig;
3987
+ const i = Dn(t, n), { headers: r, ...s } = this.requestConfig;
4082
3988
  i.signal !== void 0 && (s.signal = i.signal);
4083
3989
  const o = i.documents.map(({ document: u }) => Fe(u).query), a = i.documents.map(({ variables: u }) => u);
4084
3990
  return Pe({
@@ -4117,7 +4023,7 @@ class wi {
4117
4023
  }
4118
4024
  }
4119
4025
  const Pe = async (e) => {
4120
- const { query: t, variables: n, fetchOptions: i } = e, r = vi(An(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), a = await Ai(o, i.jsonSerializer ?? ze), u = Array.isArray(a) ? !a.some(({ data: l }) => !l) : !!a.data, c = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
4026
+ const { query: t, variables: n, fetchOptions: i } = e, r = wi(In(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), a = await Ii(o, i.jsonSerializer ?? ze), u = Array.isArray(a) ? !a.some(({ data: l }) => !l) : !!a.data, c = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || i.errorPolicy === "all" || i.errorPolicy === "ignore";
4121
4027
  if (o.ok && c && u) {
4122
4028
  const { errors: l, ...f } = (Array.isArray(a), a), h = i.errorPolicy === "ignore" ? f : a;
4123
4029
  return {
@@ -4135,7 +4041,7 @@ const Pe = async (e) => {
4135
4041
  { query: t, variables: n }
4136
4042
  );
4137
4043
  }
4138
- }, Ti = (e, t, n, i) => {
4044
+ }, Ai = (e, t, n, i) => {
4139
4045
  const r = i ?? ze;
4140
4046
  if (!Array.isArray(e))
4141
4047
  return r.stringify({ query: e, variables: t, operationName: n });
@@ -4143,13 +4049,13 @@ const Pe = async (e) => {
4143
4049
  throw new Error("Cannot create request body with given variable type, array expected");
4144
4050
  const s = e.reduce((o, a, u) => (o.push({ query: a, variables: t ? t[u] : void 0 }), o), []);
4145
4051
  return r.stringify(s);
4146
- }, Ai = async (e, t) => {
4052
+ }, Ii = async (e, t) => {
4147
4053
  let n;
4148
4054
  return e.headers.forEach((i, r) => {
4149
4055
  r.toLowerCase() === "content-type" && (n = i);
4150
4056
  }), 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();
4151
- }, Me = (e) => typeof e == "function" ? e() : e, Ii = (e, ...t) => e.reduce((n, i, r) => `${n}${i}${r in t ? String(t[r]) : ""}`, ""), Oi = {
4152
- getMeta: Ii`
4057
+ }, Me = (e) => typeof e == "function" ? e() : e, Dt = (e, ...t) => e.reduce((n, i, r) => `${n}${i}${r in t ? String(t[r]) : ""}`, ""), Oi = {
4058
+ getMeta: Dt`
4153
4059
  query getDoctype($doctype: String!) {
4154
4060
  getMeta(doctype: $doctype) {
4155
4061
  id
@@ -4160,7 +4066,53 @@ const Pe = async (e) => {
4160
4066
  }
4161
4067
  }
4162
4068
  `
4163
- }, _i = (e) => JSON.parse(e, (t, n) => {
4069
+ }, bi = Dt`
4070
+ type Doctype {
4071
+ id: ID!
4072
+ name: String!
4073
+ workflow: String!
4074
+ schema: String!
4075
+ actions: String!
4076
+ }
4077
+
4078
+ type DoctypeField {
4079
+ id: ID!
4080
+ label: String!
4081
+ fieldtype: String
4082
+ component: String
4083
+ required: Boolean
4084
+ readonly: Boolean
4085
+ }
4086
+
4087
+ type DoctypeWorkflow {
4088
+ name: String!
4089
+ machine: StateMachine!
4090
+ }
4091
+
4092
+ type StateMachine {
4093
+ id: ID!
4094
+ }
4095
+
4096
+ type DoctypeAction {
4097
+ eventName: String!
4098
+ callback: String
4099
+ }
4100
+
4101
+ type Query {
4102
+ getMeta(doctype: String!): Doctype # ∪ error
4103
+ getRecords(doctype: String!, filters: [String]): [String] # ∪ error
4104
+ getRecord(doctype: String!, id: ID!): String # ∪ error
4105
+ }
4106
+
4107
+ type Mutation {
4108
+ runAction(doctype: String!, id: [ID!]!, functionName: String!): [String!]! # ∪ error
4109
+ }
4110
+
4111
+ schema {
4112
+ query: Query
4113
+ mutation: Mutation
4114
+ }
4115
+ `, _i = (e) => JSON.parse(e, (t, n) => {
4164
4116
  if (typeof n == "string")
4165
4117
  try {
4166
4118
  return JSON.parse(n, (i, r) => typeof r == "string" && !isNaN(Number(r)) ? new le(r) : r);
@@ -4170,9 +4122,9 @@ const Pe = async (e) => {
4170
4122
  else if (!isNaN(Number(n)))
4171
4123
  return new le(n);
4172
4124
  return n;
4173
- }), bi = {
4125
+ }), Di = {
4174
4126
  getMeta: async (e, t) => {
4175
- const n = new wi(t || "/graphql", {
4127
+ const n = new Ti(t || "/graphql", {
4176
4128
  jsonSerializer: {
4177
4129
  stringify: (r) => JSON.stringify(r),
4178
4130
  // process the request object before sending; leave as default JSON
@@ -4187,6 +4139,8 @@ const Pe = async (e) => {
4187
4139
  }
4188
4140
  };
4189
4141
  export {
4190
- bi as methods
4142
+ Di as methods,
4143
+ Oi as queries,
4144
+ bi as typeDefs
4191
4145
  };
4192
4146
  //# sourceMappingURL=graphql-client.js.map