@stonecrop/graphql-client 0.4.17 → 0.4.19

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 xt(e, t) {
1
+ function Lt(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)) {
@@ -21,7 +21,7 @@ function xt(e, t) {
21
21
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
22
22
  * MIT Licence
23
23
  */
24
- var Be = 9e15, ne = 1e9, Ue = "0123456789abcdef", Ie = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Oe = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", qe = {
24
+ var le = 9e15, ie = 1e9, je = "0123456789abcdef", De = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", Se = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", $e = {
25
25
  // These values must be integers within the stated ranges (inclusive).
26
26
  // Most of these values can be changed at run-time using the `Decimal.config` method.
27
27
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -70,30 +70,30 @@ var Be = 9e15, ne = 1e9, Ue = "0123456789abcdef", Ie = "2.3025850929940456840179
70
70
  // 0 to EXP_LIMIT
71
71
  // The minimum exponent value, beneath which underflow to zero occurs.
72
72
  // JavaScript numbers: -324 (5e-324)
73
- minE: -9e15,
73
+ minE: -le,
74
74
  // -1 to -EXP_LIMIT
75
75
  // The maximum exponent value, above which overflow to Infinity occurs.
76
76
  // JavaScript numbers: 308 (1.7976931348623157e+308)
77
- maxE: Be,
77
+ maxE: le,
78
78
  // 1 to EXP_LIMIT
79
79
  // Whether to use cryptographically-secure random number generation, if available.
80
80
  crypto: !1
81
81
  // true/false
82
- }, ct, Q, O = !0, be = "[DecimalError] ", te = be + "Invalid argument: ", ut = be + "Precision limit exceeded", lt = be + "crypto unavailable", ft = "[object Decimal]", V = Math.floor, F = Math.pow, Ct = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, kt = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Rt = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, ht = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, z = 1e7, A = 7, Lt = 9007199254740991, Ft = Ie.length - 1, Ve = Oe.length - 1, m = { toStringTag: ft };
83
- m.absoluteValue = m.abs = function() {
82
+ }, ht, W, I = !0, ke = "[DecimalError] ", ne = ke + "Invalid argument: ", dt = ke + "Precision limit exceeded", pt = ke + "crypto unavailable", mt = "[object Decimal]", j = Math.floor, P = Math.pow, Ft = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Pt = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Mt = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, gt = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, Q = 1e7, T = 7, Bt = 9007199254740991, Ut = De.length - 1, He = Se.length - 1, g = { toStringTag: mt };
83
+ g.absoluteValue = g.abs = function() {
84
84
  var e = new this.constructor(this);
85
- return e.s < 0 && (e.s = 1), T(e);
85
+ return e.s < 0 && (e.s = 1), v(e);
86
86
  };
87
- m.ceil = function() {
88
- return T(new this.constructor(this), this.e + 1, 2);
87
+ g.ceil = function() {
88
+ return v(new this.constructor(this), this.e + 1, 2);
89
89
  };
90
- m.clampedTo = m.clamp = function(e, t) {
90
+ g.clampedTo = g.clamp = function(e, t) {
91
91
  var n, i = this, r = i.constructor;
92
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);
93
+ if (e.gt(t)) throw Error(ne + t);
94
94
  return n = i.cmp(e), n < 0 ? e : i.cmp(t) > 0 ? t : new r(i);
95
95
  };
96
- m.comparedTo = m.cmp = function(e) {
96
+ g.comparedTo = g.cmp = function(e) {
97
97
  var t, n, i, r, s = this, o = s.d, a = (e = new s.constructor(e)).d, u = s.s, c = e.s;
98
98
  if (!o || !a)
99
99
  return !u || !c ? NaN : u !== c ? u : o === a ? 0 : !o ^ u < 0 ? 1 : -1;
@@ -104,143 +104,143 @@ m.comparedTo = m.cmp = function(e) {
104
104
  if (o[t] !== a[t]) return o[t] > a[t] ^ u < 0 ? 1 : -1;
105
105
  return i === r ? 0 : i > r ^ u < 0 ? 1 : -1;
106
106
  };
107
- m.cosine = m.cos = function() {
107
+ g.cosine = g.cos = function() {
108
108
  var e, t, n = this, i = n.constructor;
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 = Pt(i, Et(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);
109
+ return n.d ? n.d[0] ? (e = i.precision, t = i.rounding, i.precision = e + Math.max(n.e, n.sd()) + T, i.rounding = 1, n = qt(i, vt(i, n)), i.precision = e, i.rounding = t, v(W == 2 || W == 3 ? n.neg() : n, e, t, !0)) : new i(1) : new i(NaN);
110
110
  };
111
- m.cubeRoot = m.cbrt = function() {
111
+ g.cubeRoot = g.cbrt = function() {
112
112
  var e, t, n, i, r, s, o, a, u, c, l = this, f = l.constructor;
113
113
  if (!l.isFinite() || l.isZero()) return new f(l);
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; ; )
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))
114
+ for (I = !1, s = l.s * P(l.s * l, 1 / 3), !s || Math.abs(s) == 1 / 0 ? (n = U(l.d), e = l.e, (s = (e - n.length + 1) % 3) && (n += s == 1 || s == -2 ? "0" : "00"), s = P(n, 1 / 3), e = j((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; ; )
115
+ if (a = i, u = a.times(a).times(a), c = u.plus(l), i = R(c.plus(l).times(a), c.plus(u), o + 2, 1), U(a.d).slice(0, o) === (n = U(i.d)).slice(0, o))
116
116
  if (n = n.slice(o - 3, o + 1), n == "9999" || !r && n == "4999") {
117
- if (!r && (T(a, e + 1, 0), a.times(a).times(a).eq(l))) {
117
+ if (!r && (v(a, e + 1, 0), a.times(a).times(a).eq(l))) {
118
118
  i = a;
119
119
  break;
120
120
  }
121
121
  o += 4, r = 1;
122
122
  } else {
123
- (!+n || !+n.slice(1) && n.charAt(0) == "5") && (T(i, e + 1, 1), t = !i.times(i).times(i).eq(l));
123
+ (!+n || !+n.slice(1) && n.charAt(0) == "5") && (v(i, e + 1, 1), t = !i.times(i).times(i).eq(l));
124
124
  break;
125
125
  }
126
- return O = !0, T(i, e, f.rounding, t);
126
+ return I = !0, v(i, e, f.rounding, t);
127
127
  };
128
- m.decimalPlaces = m.dp = function() {
128
+ g.decimalPlaces = g.dp = function() {
129
129
  var e, t = this.d, n = NaN;
130
130
  if (t) {
131
- if (e = t.length - 1, n = (e - V(this.e / A)) * A, e = t[e], e) for (; e % 10 == 0; e /= 10) n--;
131
+ if (e = t.length - 1, n = (e - j(this.e / T)) * T, e = t[e], e) for (; e % 10 == 0; e /= 10) n--;
132
132
  n < 0 && (n = 0);
133
133
  }
134
134
  return n;
135
135
  };
136
- m.dividedBy = m.div = function(e) {
137
- return k(this, new this.constructor(e));
136
+ g.dividedBy = g.div = function(e) {
137
+ return R(this, new this.constructor(e));
138
138
  };
139
- m.dividedToIntegerBy = m.divToInt = function(e) {
139
+ g.dividedToIntegerBy = g.divToInt = function(e) {
140
140
  var t = this, n = t.constructor;
141
- return T(k(t, new n(e), 0, 1, 1), n.precision, n.rounding);
141
+ return v(R(t, new n(e), 0, 1, 1), n.precision, n.rounding);
142
142
  };
143
- m.equals = m.eq = function(e) {
143
+ g.equals = g.eq = function(e) {
144
144
  return this.cmp(e) === 0;
145
145
  };
146
- m.floor = function() {
147
- return T(new this.constructor(this), this.e + 1, 3);
146
+ g.floor = function() {
147
+ return v(new this.constructor(this), this.e + 1, 3);
148
148
  };
149
- m.greaterThan = m.gt = function(e) {
149
+ g.greaterThan = g.gt = function(e) {
150
150
  return this.cmp(e) > 0;
151
151
  };
152
- m.greaterThanOrEqualTo = m.gte = function(e) {
152
+ g.greaterThanOrEqualTo = g.gte = function(e) {
153
153
  var t = this.cmp(e);
154
154
  return t == 1 || t === 0;
155
155
  };
156
- m.hyperbolicCosine = m.cosh = function() {
156
+ g.hyperbolicCosine = g.cosh = function() {
157
157
  var e, t, n, i, r, s = this, o = s.constructor, a = new o(1);
158
158
  if (!s.isFinite()) return new o(s.s ? 1 / 0 : NaN);
159
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 = ce(o, 1, s.times(t), new o(1), !0);
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 / Le(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), s = he(o, 1, s.times(t), new o(1), !0);
161
161
  for (var u, c = e, l = new o(8); c--; )
162
162
  u = s.times(s), s = a.minus(u.times(l.minus(u.times(l))));
163
- return T(s, o.precision = n, o.rounding = i, !0);
163
+ return v(s, o.precision = n, o.rounding = i, !0);
164
164
  };
165
- m.hyperbolicSine = m.sinh = function() {
165
+ g.hyperbolicSine = g.sinh = function() {
166
166
  var e, t, n, i, r = this, s = r.constructor;
167
167
  if (!r.isFinite() || r.isZero()) return new s(r);
168
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)
169
- r = ce(s, 2, r, r, !0);
169
+ r = he(s, 2, r, r, !0);
170
170
  else {
171
- e = 1.4 * Math.sqrt(i), e = e > 16 ? 16 : e | 0, r = r.times(1 / xe(5, e)), r = ce(s, 2, r, r, !0);
171
+ e = 1.4 * Math.sqrt(i), e = e > 16 ? 16 : e | 0, r = r.times(1 / Le(5, e)), r = he(s, 2, r, r, !0);
172
172
  for (var o, a = new s(5), u = new s(16), c = new s(20); e--; )
173
173
  o = r.times(r), r = r.times(a.plus(o.times(u.times(o).plus(c))));
174
174
  }
175
- return s.precision = t, s.rounding = n, T(r, t, n, !0);
175
+ return s.precision = t, s.rounding = n, v(r, t, n, !0);
176
176
  };
177
- m.hyperbolicTangent = m.tanh = function() {
177
+ g.hyperbolicTangent = g.tanh = function() {
178
178
  var e, t, n = this, i = n.constructor;
179
- return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 7, i.rounding = 1, k(n.sinh(), n.cosh(), i.precision = e, i.rounding = t)) : new i(n.s);
179
+ return n.isFinite() ? n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 7, i.rounding = 1, R(n.sinh(), n.cosh(), i.precision = e, i.rounding = t)) : new i(n.s);
180
180
  };
181
- m.inverseCosine = m.acos = function() {
181
+ g.inverseCosine = g.acos = function() {
182
182
  var e, t = this, n = t.constructor, i = t.abs().cmp(1), r = n.precision, s = n.rounding;
183
- return i !== -1 ? i === 0 ? t.isNeg() ? J(n, r, s) : new n(0) : new n(NaN) : t.isZero() ? J(n, r + 4, s).times(0.5) : (n.precision = r + 6, n.rounding = 1, t = t.asin(), e = J(n, r + 4, s).times(0.5), n.precision = r, n.rounding = s, e.minus(t));
183
+ return i !== -1 ? i === 0 ? t.isNeg() ? X(n, r, s) : new n(0) : new n(NaN) : t.isZero() ? X(n, r + 4, s).times(0.5) : (n.precision = r + 6, n.rounding = 1, t = t.asin(), e = X(n, r + 4, s).times(0.5), n.precision = r, n.rounding = s, e.minus(t));
184
184
  };
185
- m.inverseHyperbolicCosine = m.acosh = function() {
185
+ g.inverseHyperbolicCosine = g.acosh = function() {
186
186
  var e, t, n = this, i = n.constructor;
187
- return n.lte(1) ? new i(n.eq(1) ? 0 : NaN) : n.isFinite() ? (e = i.precision, t = i.rounding, i.precision = e + Math.max(Math.abs(n.e), n.sd()) + 4, i.rounding = 1, O = !1, n = n.times(n).minus(1).sqrt().plus(n), O = !0, i.precision = e, i.rounding = t, n.ln()) : new i(n);
187
+ return n.lte(1) ? new i(n.eq(1) ? 0 : NaN) : n.isFinite() ? (e = i.precision, t = i.rounding, i.precision = e + Math.max(Math.abs(n.e), n.sd()) + 4, i.rounding = 1, I = !1, n = n.times(n).minus(1).sqrt().plus(n), I = !0, i.precision = e, i.rounding = t, n.ln()) : new i(n);
188
188
  };
189
- m.inverseHyperbolicSine = m.asinh = function() {
189
+ g.inverseHyperbolicSine = g.asinh = function() {
190
190
  var e, t, n = this, i = n.constructor;
191
- return !n.isFinite() || n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 2 * Math.max(Math.abs(n.e), n.sd()) + 6, i.rounding = 1, O = !1, n = n.times(n).plus(1).sqrt().plus(n), O = !0, i.precision = e, i.rounding = t, n.ln());
191
+ return !n.isFinite() || n.isZero() ? new i(n) : (e = i.precision, t = i.rounding, i.precision = e + 2 * Math.max(Math.abs(n.e), n.sd()) + 6, i.rounding = 1, I = !1, n = n.times(n).plus(1).sqrt().plus(n), I = !0, i.precision = e, i.rounding = t, n.ln());
192
192
  };
193
- m.inverseHyperbolicTangent = m.atanh = function() {
193
+ g.inverseHyperbolicTangent = g.atanh = function() {
194
194
  var e, t, n, i, r = this, s = r.constructor;
195
- return r.isFinite() ? r.e >= 0 ? new s(r.abs().eq(1) ? r.s / 0 : r.isZero() ? r : NaN) : (e = s.precision, t = s.rounding, i = r.sd(), Math.max(i, e) < 2 * -r.e - 1 ? T(new s(r), e, t, !0) : (s.precision = n = i - r.e, r = k(r.plus(1), new s(1).minus(r), n + e, 1), s.precision = e + 4, s.rounding = 1, r = r.ln(), s.precision = e, s.rounding = t, r.times(0.5))) : new s(NaN);
195
+ return r.isFinite() ? r.e >= 0 ? new s(r.abs().eq(1) ? r.s / 0 : r.isZero() ? r : NaN) : (e = s.precision, t = s.rounding, i = r.sd(), Math.max(i, e) < 2 * -r.e - 1 ? v(new s(r), e, t, !0) : (s.precision = n = i - r.e, r = R(r.plus(1), new s(1).minus(r), n + e, 1), s.precision = e + 4, s.rounding = 1, r = r.ln(), s.precision = e, s.rounding = t, r.times(0.5))) : new s(NaN);
196
196
  };
197
- m.inverseSine = m.asin = function() {
197
+ g.inverseSine = g.asin = function() {
198
198
  var e, t, n, i, r = this, s = r.constructor;
199
- return r.isZero() ? new s(r) : (t = r.abs().cmp(1), n = s.precision, i = s.rounding, t !== -1 ? t === 0 ? (e = J(s, n + 4, i).times(0.5), e.s = r.s, e) : new s(NaN) : (s.precision = n + 6, s.rounding = 1, r = r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(), s.precision = n, s.rounding = i, r.times(2)));
199
+ return r.isZero() ? new s(r) : (t = r.abs().cmp(1), n = s.precision, i = s.rounding, t !== -1 ? t === 0 ? (e = X(s, n + 4, i).times(0.5), e.s = r.s, e) : new s(NaN) : (s.precision = n + 6, s.rounding = 1, r = r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(), s.precision = n, s.rounding = i, r.times(2)));
200
200
  };
201
- m.inverseTangent = m.atan = function() {
202
- var e, t, n, i, r, s, o, a, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
201
+ g.inverseTangent = g.atan = function() {
202
+ var e, t, n, i, r, s, o, a, u, c = this, l = c.constructor, f = l.precision, d = l.rounding;
203
203
  if (c.isFinite()) {
204
204
  if (c.isZero())
205
205
  return new l(c);
206
- if (c.abs().eq(1) && f + 4 <= Ve)
207
- return o = J(l, f + 4, h).times(0.25), o.s = c.s, o;
206
+ if (c.abs().eq(1) && f + 4 <= He)
207
+ return o = X(l, f + 4, d).times(0.25), o.s = c.s, o;
208
208
  } else {
209
209
  if (!c.s) return new l(NaN);
210
- if (f + 4 <= Ve)
211
- return o = J(l, f + 4, h).times(0.5), o.s = c.s, o;
210
+ if (f + 4 <= He)
211
+ return o = X(l, f + 4, d).times(0.5), o.s = c.s, o;
212
212
  }
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));
214
- for (O = !1, t = Math.ceil(a / A), i = 1, u = c.times(c), o = new l(c), r = c; e !== -1; )
213
+ for (l.precision = a = f + 10, l.rounding = 1, n = Math.min(28, a / T + 2 | 0), e = n; e; --e) c = c.div(c.times(c).plus(1).sqrt().plus(1));
214
+ for (I = !1, t = Math.ceil(a / T), i = 1, u = c.times(c), o = new l(c), r = c; e !== -1; )
215
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--; ) ;
216
- return n && (o = o.times(2 << n - 1)), O = !0, T(o, l.precision = f, l.rounding = h, !0);
216
+ return n && (o = o.times(2 << n - 1)), I = !0, v(o, l.precision = f, l.rounding = d, !0);
217
217
  };
218
- m.isFinite = function() {
218
+ g.isFinite = function() {
219
219
  return !!this.d;
220
220
  };
221
- m.isInteger = m.isInt = function() {
222
- return !!this.d && V(this.e / A) > this.d.length - 2;
221
+ g.isInteger = g.isInt = function() {
222
+ return !!this.d && j(this.e / T) > this.d.length - 2;
223
223
  };
224
- m.isNaN = function() {
224
+ g.isNaN = function() {
225
225
  return !this.s;
226
226
  };
227
- m.isNegative = m.isNeg = function() {
227
+ g.isNegative = g.isNeg = function() {
228
228
  return this.s < 0;
229
229
  };
230
- m.isPositive = m.isPos = function() {
230
+ g.isPositive = g.isPos = function() {
231
231
  return this.s > 0;
232
232
  };
233
- m.isZero = function() {
233
+ g.isZero = function() {
234
234
  return !!this.d && this.d[0] === 0;
235
235
  };
236
- m.lessThan = m.lt = function(e) {
236
+ g.lessThan = g.lt = function(e) {
237
237
  return this.cmp(e) < 0;
238
238
  };
239
- m.lessThanOrEqualTo = m.lte = function(e) {
239
+ g.lessThanOrEqualTo = g.lte = function(e) {
240
240
  return this.cmp(e) < 1;
241
241
  };
242
- m.logarithm = m.log = function(e) {
243
- var t, n, i, r, s, o, a, u, c = this, l = c.constructor, f = l.precision, h = l.rounding, E = 5;
242
+ g.logarithm = g.log = function(e) {
243
+ var t, n, i, r, s, o, a, u, c = this, l = c.constructor, f = l.precision, d = l.rounding, y = 5;
244
244
  if (e == null)
245
245
  e = new l(10), t = !0;
246
246
  else {
@@ -256,250 +256,250 @@ m.logarithm = m.log = function(e) {
256
256
  for (r = n[0]; r % 10 === 0; ) r /= 10;
257
257
  s = r !== 1;
258
258
  }
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))
259
+ if (I = !1, a = f + y, o = te(c, a), i = t ? xe(l, a + 10) : te(e, a), u = R(o, i, a, 1), ye(u.d, r = f, d))
260
260
  do
261
- if (a += 10, o = ee(c, a), i = t ? _e(l, a + 10) : ee(e, a), u = k(o, i, a, 1), !s) {
262
- +B(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = T(u, f + 1, 0));
261
+ if (a += 10, o = te(c, a), i = t ? xe(l, a + 10) : te(e, a), u = R(o, i, a, 1), !s) {
262
+ +U(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = v(u, f + 1, 0));
263
263
  break;
264
264
  }
265
- while (ge(u.d, r += 10, h));
266
- return O = !0, T(u, f, h);
265
+ while (ye(u.d, r += 10, d));
266
+ return I = !0, v(u, f, d);
267
267
  };
268
- m.minus = m.sub = function(e) {
269
- var t, n, i, r, s, o, a, u, c, l, f, h, E = this, N = E.constructor;
270
- if (e = new N(e), !E.d || !e.d)
271
- return !E.s || !e.s ? e = new N(NaN) : E.d ? e.s = -e.s : e = new N(e.d || E.s !== e.s ? E : NaN), e;
272
- if (E.s != e.s)
273
- return e.s = -e.s, E.plus(e);
274
- if (c = E.d, h = e.d, a = N.precision, u = N.rounding, !c[0] || !h[0]) {
275
- if (h[0]) e.s = -e.s;
276
- else if (c[0]) e = new N(E);
268
+ g.minus = g.sub = function(e) {
269
+ var t, n, i, r, s, o, a, u, c, l, f, d, y = this, N = y.constructor;
270
+ if (e = new N(e), !y.d || !e.d)
271
+ return !y.s || !e.s ? e = new N(NaN) : y.d ? e.s = -e.s : e = new N(e.d || y.s !== e.s ? y : NaN), e;
272
+ if (y.s != e.s)
273
+ return e.s = -e.s, y.plus(e);
274
+ if (c = y.d, d = e.d, a = N.precision, u = N.rounding, !c[0] || !d[0]) {
275
+ if (d[0]) e.s = -e.s;
276
+ else if (c[0]) e = new N(y);
277
277
  else return new N(u === 3 ? -0 : 0);
278
- return O ? T(e, a, u) : e;
278
+ return I ? v(e, a, u) : e;
279
279
  }
280
- if (n = V(e.e / A), l = V(E.e / A), c = c.slice(), s = l - n, s) {
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);
280
+ if (n = j(e.e / T), l = j(y.e / T), c = c.slice(), s = l - n, s) {
281
+ for (f = s < 0, f ? (t = c, s = -s, o = d.length) : (t = d, n = l, o = c.length), i = Math.max(Math.ceil(a / T), o) + 2, s > i && (s = i, t.length = 1), t.reverse(), i = s; i--; ) t.push(0);
282
282
  t.reverse();
283
283
  } else {
284
- for (i = c.length, o = h.length, f = i < o, f && (o = i), i = 0; i < o; i++)
285
- if (c[i] != h[i]) {
286
- f = c[i] < h[i];
284
+ for (i = c.length, o = d.length, f = i < o, f && (o = i), i = 0; i < o; i++)
285
+ if (c[i] != d[i]) {
286
+ f = c[i] < d[i];
287
287
  break;
288
288
  }
289
289
  s = 0;
290
290
  }
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;
292
- for (i = h.length; i > s; ) {
293
- if (c[--i] < h[i]) {
294
- for (r = i; r && c[--r] === 0; ) c[r] = z - 1;
295
- --c[r], c[i] += z;
291
+ for (f && (t = c, c = d, d = t, e.s = -e.s), o = c.length, i = d.length - o; i > 0; --i) c[o++] = 0;
292
+ for (i = d.length; i > s; ) {
293
+ if (c[--i] < d[i]) {
294
+ for (r = i; r && c[--r] === 0; ) c[r] = Q - 1;
295
+ --c[r], c[i] += Q;
296
296
  }
297
- c[i] -= h[i];
297
+ c[i] -= d[i];
298
298
  }
299
299
  for (; c[--o] === 0; ) c.pop();
300
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);
301
+ return c[0] ? (e.d = c, e.e = Re(c, n), I ? v(e, a, u) : e) : new N(u === 3 ? -0 : 0);
302
302
  };
303
- m.modulo = m.mod = function(e) {
303
+ g.modulo = g.mod = function(e) {
304
304
  var t, n = this, i = n.constructor;
305
- return e = new i(e), !n.d || !e.s || e.d && !e.d[0] ? new i(NaN) : !e.d || n.d && !n.d[0] ? T(new i(n), i.precision, i.rounding) : (O = !1, i.modulo == 9 ? (t = k(n, e.abs(), 0, 3, 1), t.s *= e.s) : t = k(n, e, 0, i.modulo, 1), t = t.times(e), O = !0, n.minus(t));
305
+ return e = new i(e), !n.d || !e.s || e.d && !e.d[0] ? new i(NaN) : !e.d || n.d && !n.d[0] ? v(new i(n), i.precision, i.rounding) : (I = !1, i.modulo == 9 ? (t = R(n, e.abs(), 0, 3, 1), t.s *= e.s) : t = R(n, e, 0, i.modulo, 1), t = t.times(e), I = !0, n.minus(t));
306
306
  };
307
- m.naturalExponential = m.exp = function() {
308
- return je(this);
307
+ g.naturalExponential = g.exp = function() {
308
+ return Ge(this);
309
309
  };
310
- m.naturalLogarithm = m.ln = function() {
311
- return ee(this);
310
+ g.naturalLogarithm = g.ln = function() {
311
+ return te(this);
312
312
  };
313
- m.negated = m.neg = function() {
313
+ g.negated = g.neg = function() {
314
314
  var e = new this.constructor(this);
315
- return e.s = -e.s, T(e);
315
+ return e.s = -e.s, v(e);
316
316
  };
317
- m.plus = m.add = function(e) {
318
- var t, n, i, r, s, o, a, u, c, l, f = this, h = f.constructor;
319
- if (e = new h(e), !f.d || !e.d)
320
- return !f.s || !e.s ? e = new h(NaN) : f.d || (e = new h(e.d || f.s === e.s ? f : NaN)), e;
317
+ g.plus = g.add = function(e) {
318
+ var t, n, i, r, s, o, a, u, c, l, f = this, d = f.constructor;
319
+ if (e = new d(e), !f.d || !e.d)
320
+ return !f.s || !e.s ? e = new d(NaN) : f.d || (e = new d(e.d || f.s === e.s ? f : NaN)), e;
321
321
  if (f.s != e.s)
322
322
  return e.s = -e.s, f.minus(e);
323
- if (c = f.d, l = e.d, a = h.precision, u = h.rounding, !c[0] || !l[0])
324
- return l[0] || (e = new h(f)), O ? T(e, a, u) : e;
325
- if (s = V(f.e / A), i = V(e.e / A), c = c.slice(), r = s - i, r) {
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);
323
+ if (c = f.d, l = e.d, a = d.precision, u = d.rounding, !c[0] || !l[0])
324
+ return l[0] || (e = new d(f)), I ? v(e, a, u) : e;
325
+ if (s = j(f.e / T), i = j(e.e / T), c = c.slice(), r = s - i, r) {
326
+ for (r < 0 ? (n = c, r = -r, o = l.length) : (n = l, i = s, o = c.length), s = Math.ceil(a / T), o = s > o ? s + 1 : o + 1, r > o && (r = o, n.length = 1), n.reverse(); r--; ) n.push(0);
327
327
  n.reverse();
328
328
  }
329
329
  for (o = c.length, r = l.length, o - r < 0 && (r = o, n = l, l = c, c = n), t = 0; r; )
330
- t = (c[--r] = c[r] + l[r] + t) / z | 0, c[r] %= z;
330
+ t = (c[--r] = c[r] + l[r] + t) / Q | 0, c[r] %= Q;
331
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;
332
+ return e.d = c, e.e = Re(c, i), I ? v(e, a, u) : e;
333
333
  };
334
- m.precision = m.sd = function(e) {
334
+ g.precision = g.sd = function(e) {
335
335
  var t, n = this;
336
- if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(te + e);
337
- return n.d ? (t = dt(n.d), e && n.e + 1 > t && (t = n.e + 1)) : t = NaN, t;
336
+ if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(ne + e);
337
+ return n.d ? (t = Et(n.d), e && n.e + 1 > t && (t = n.e + 1)) : t = NaN, t;
338
338
  };
339
- m.round = function() {
339
+ g.round = function() {
340
340
  var e = this, t = e.constructor;
341
- return T(new t(e), e.e + 1, t.rounding);
341
+ return v(new t(e), e.e + 1, t.rounding);
342
342
  };
343
- m.sine = m.sin = function() {
343
+ g.sine = g.sin = function() {
344
344
  var e, t, n = this, i = n.constructor;
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 = Bt(i, Et(i, n)), i.precision = e, i.rounding = t, T(Q > 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()) + T, i.rounding = 1, n = jt(i, vt(i, n)), i.precision = e, i.rounding = t, v(W > 2 ? n.neg() : n, e, t, !0)) : new i(NaN);
346
346
  };
347
- m.squareRoot = m.sqrt = function() {
347
+ g.squareRoot = g.sqrt = function() {
348
348
  var e, t, n, i, r, s, o = this, a = o.d, u = o.e, c = o.s, l = o.constructor;
349
349
  if (c !== 1 || !a || !a[0])
350
350
  return new l(!c || c < 0 && (!a || a[0]) ? NaN : a ? o : 1 / 0);
351
- for (O = !1, c = Math.sqrt(+o), c == 0 || c == 1 / 0 ? (t = B(a), (t.length + u) % 2 == 0 && (t += "0"), c = Math.sqrt(t), u = V((u + 1) / 2) - (u < 0 || u % 2), c == 1 / 0 ? t = "5e" + u : (t = c.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + u), i = new l(t)) : i = new l(c.toString()), n = (u = l.precision) + 3; ; )
352
- if (s = i, i = s.plus(k(o, s, n + 2, 1)).times(0.5), B(s.d).slice(0, n) === (t = B(i.d)).slice(0, n))
351
+ for (I = !1, c = Math.sqrt(+o), c == 0 || c == 1 / 0 ? (t = U(a), (t.length + u) % 2 == 0 && (t += "0"), c = Math.sqrt(t), u = j((u + 1) / 2) - (u < 0 || u % 2), c == 1 / 0 ? t = "5e" + u : (t = c.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + u), i = new l(t)) : i = new l(c.toString()), n = (u = l.precision) + 3; ; )
352
+ if (s = i, i = s.plus(R(o, s, n + 2, 1)).times(0.5), U(s.d).slice(0, n) === (t = U(i.d)).slice(0, n))
353
353
  if (t = t.slice(n - 3, n + 1), t == "9999" || !r && t == "4999") {
354
- if (!r && (T(s, u + 1, 0), s.times(s).eq(o))) {
354
+ if (!r && (v(s, u + 1, 0), s.times(s).eq(o))) {
355
355
  i = s;
356
356
  break;
357
357
  }
358
358
  n += 4, r = 1;
359
359
  } else {
360
- (!+t || !+t.slice(1) && t.charAt(0) == "5") && (T(i, u + 1, 1), e = !i.times(i).eq(o));
360
+ (!+t || !+t.slice(1) && t.charAt(0) == "5") && (v(i, u + 1, 1), e = !i.times(i).eq(o));
361
361
  break;
362
362
  }
363
- return O = !0, T(i, u, l.rounding, e);
363
+ return I = !0, v(i, u, l.rounding, e);
364
364
  };
365
- m.tangent = m.tan = function() {
365
+ g.tangent = g.tan = function() {
366
366
  var e, t, n = this, i = n.constructor;
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);
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 = R(n, new i(1).minus(n.times(n)).sqrt(), e + 10, 0), i.precision = e, i.rounding = t, v(W == 2 || W == 4 ? n.neg() : n, e, t, !0)) : new i(NaN);
368
368
  };
369
- m.times = m.mul = function(e) {
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;
371
- if (e.s *= l.s, !h || !h[0] || !E || !E[0])
372
- return new f(!e.s || h && !h[0] && !E || E && !E[0] && !h ? NaN : !h || !E ? e.s / 0 : e.s * 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);
369
+ g.times = g.mul = function(e) {
370
+ var t, n, i, r, s, o, a, u, c, l = this, f = l.constructor, d = l.d, y = (e = new f(e)).d;
371
+ if (e.s *= l.s, !d || !d[0] || !y || !y[0])
372
+ return new f(!e.s || d && !d[0] && !y || y && !y[0] && !d ? NaN : !d || !y ? e.s / 0 : e.s * 0);
373
+ for (n = j(l.e / T) + j(e.e / T), u = d.length, c = y.length, u < c && (s = d, d = y, y = s, o = u, u = c, c = o), s = [], o = u + c, i = o; i--; ) s.push(0);
374
374
  for (i = c; --i >= 0; ) {
375
375
  for (t = 0, r = u + i; r > i; )
376
- a = s[r] + E[i] * h[r - i - 1] + t, s[r--] = a % z | 0, t = a / z | 0;
377
- s[r] = (s[r] + t) % z | 0;
376
+ a = s[r] + y[i] * d[r - i - 1] + t, s[r--] = a % Q | 0, t = a / Q | 0;
377
+ s[r] = (s[r] + t) % Q | 0;
378
378
  }
379
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;
380
+ return t ? ++n : s.shift(), e.d = s, e.e = Re(s, n), I ? v(e, f.precision, f.rounding) : e;
381
381
  };
382
- m.toBinary = function(e, t) {
383
- return Je(this, 2, e, t);
382
+ g.toBinary = function(e, t) {
383
+ return Qe(this, 2, e, t);
384
384
  };
385
- m.toDecimalPlaces = m.toDP = function(e, t) {
385
+ g.toDecimalPlaces = g.toDP = function(e, t) {
386
386
  var n = this, i = n.constructor;
387
- return n = new i(n), e === void 0 ? n : ($(e, 0, ne), t === void 0 ? t = i.rounding : $(t, 0, 8), T(n, e + n.e + 1, t));
387
+ return n = new i(n), e === void 0 ? n : (G(e, 0, ie), t === void 0 ? t = i.rounding : G(t, 0, 8), v(n, e + n.e + 1, t));
388
388
  };
389
- m.toExponential = function(e, t) {
389
+ g.toExponential = function(e, t) {
390
390
  var n, i = this, r = i.constructor;
391
- return e === void 0 ? n = X(i, !0) : ($(e, 0, ne), t === void 0 ? t = r.rounding : $(t, 0, 8), i = T(new r(i), e + 1, t), n = X(i, !0, e + 1)), i.isNeg() && !i.isZero() ? "-" + n : n;
391
+ return e === void 0 ? n = Z(i, !0) : (G(e, 0, ie), t === void 0 ? t = r.rounding : G(t, 0, 8), i = v(new r(i), e + 1, t), n = Z(i, !0, e + 1)), i.isNeg() && !i.isZero() ? "-" + n : n;
392
392
  };
393
- m.toFixed = function(e, t) {
393
+ g.toFixed = function(e, t) {
394
394
  var n, i, r = this, s = r.constructor;
395
- return e === void 0 ? n = X(r) : ($(e, 0, ne), t === void 0 ? t = s.rounding : $(t, 0, 8), i = T(new s(r), e + r.e + 1, t), n = X(i, !1, e + i.e + 1)), r.isNeg() && !r.isZero() ? "-" + n : n;
395
+ return e === void 0 ? n = Z(r) : (G(e, 0, ie), t === void 0 ? t = s.rounding : G(t, 0, 8), i = v(new s(r), e + r.e + 1, t), n = Z(i, !1, e + i.e + 1)), r.isNeg() && !r.isZero() ? "-" + n : n;
396
396
  };
397
- m.toFraction = function(e) {
398
- var t, n, i, r, s, o, a, u, c, l, f, h, E = this, N = E.d, y = E.constructor;
399
- if (!N) return new y(E);
400
- if (c = n = new y(1), i = u = new y(0), t = new y(i), s = t.e = dt(N) - E.e - 1, o = s % A, t.d[0] = F(10, o < 0 ? A + o : o), e == null)
397
+ g.toFraction = function(e) {
398
+ var t, n, i, r, s, o, a, u, c, l, f, d, y = this, N = y.d, E = y.constructor;
399
+ if (!N) return new E(y);
400
+ if (c = n = new E(1), i = u = new E(0), t = new E(i), s = t.e = Et(N) - y.e - 1, o = s % T, t.d[0] = P(10, o < 0 ? T + o : o), e == null)
401
401
  e = s > 0 ? t : c;
402
402
  else {
403
- if (a = new y(e), !a.isInt() || a.lt(c)) throw Error(te + a);
403
+ if (a = new E(e), !a.isInt() || a.lt(c)) throw Error(ne + a);
404
404
  e = a.gt(t) ? s > 0 ? t : c : a;
405
405
  }
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; )
406
+ for (I = !1, a = new E(U(N)), l = E.precision, E.precision = s = N.length * T * 2; f = R(a, t, 0, 1, 1), r = n.plus(f.times(i)), r.cmp(e) != 1; )
407
407
  n = i, i = r, r = c, c = u.plus(f.times(r)), u = r, r = t, t = a.minus(f.times(r)), a = r;
408
- return r = k(e.minus(n), i, 0, 1, 1), u = u.plus(r.times(c)), n = n.plus(r.times(i)), u.s = c.s = E.s, h = k(c, i, s, 1).minus(E).abs().cmp(k(u, n, s, 1).minus(E).abs()) < 1 ? [c, i] : [u, n], y.precision = l, O = !0, h;
408
+ return r = R(e.minus(n), i, 0, 1, 1), u = u.plus(r.times(c)), n = n.plus(r.times(i)), u.s = c.s = y.s, d = R(c, i, s, 1).minus(y).abs().cmp(R(u, n, s, 1).minus(y).abs()) < 1 ? [c, i] : [u, n], E.precision = l, I = !0, d;
409
409
  };
410
- m.toHexadecimal = m.toHex = function(e, t) {
411
- return Je(this, 16, e, t);
410
+ g.toHexadecimal = g.toHex = function(e, t) {
411
+ return Qe(this, 16, e, t);
412
412
  };
413
- m.toNearest = function(e, t) {
413
+ g.toNearest = function(e, t) {
414
414
  var n = this, i = n.constructor;
415
415
  if (n = new i(n), e == null) {
416
416
  if (!n.d) return n;
417
417
  e = new i(1), t = i.rounding;
418
418
  } else {
419
- if (e = new i(e), t === void 0 ? t = i.rounding : $(t, 0, 8), !n.d) return e.s ? n : e;
419
+ if (e = new i(e), t === void 0 ? t = i.rounding : G(t, 0, 8), !n.d) return e.s ? n : e;
420
420
  if (!e.d)
421
421
  return e.s && (e.s = n.s), e;
422
422
  }
423
- return e.d[0] ? (O = !1, n = k(n, e, 0, t, 1).times(e), O = !0, T(n)) : (e.s = n.s, n = e), n;
423
+ return e.d[0] ? (I = !1, n = R(n, e, 0, t, 1).times(e), I = !0, v(n)) : (e.s = n.s, n = e), n;
424
424
  };
425
- m.toNumber = function() {
425
+ g.toNumber = function() {
426
426
  return +this;
427
427
  };
428
- m.toOctal = function(e, t) {
429
- return Je(this, 8, e, t);
428
+ g.toOctal = function(e, t) {
429
+ return Qe(this, 8, e, t);
430
430
  };
431
- m.toPower = m.pow = function(e) {
431
+ g.toPower = g.pow = function(e) {
432
432
  var t, n, i, r, s, o, a = this, u = a.constructor, c = +(e = new u(e));
433
- if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new u(F(+a, c));
433
+ if (!a.d || !e.d || !a.d[0] || !e.d[0]) return new u(P(+a, c));
434
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) <= Lt)
437
- return r = pt(u, a, n, i), e.s < 0 ? new u(1).div(r) : T(r, i, s);
435
+ if (i = u.precision, s = u.rounding, e.eq(1)) return v(a, i, s);
436
+ if (t = j(e.e / T), t >= e.d.length - 1 && (n = c < 0 ? -c : c) <= Bt)
437
+ return r = yt(u, a, n, i), e.s < 0 ? new u(1).div(r) : v(r, i, s);
438
438
  if (o = a.s, o < 0) {
439
439
  if (t < e.d.length - 1) return new u(NaN);
440
- if (e.d[t] & 1 || (o = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)
440
+ if ((e.d[t] & 1) == 0 && (o = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1)
441
441
  return a.s = o, a;
442
442
  }
443
- return n = F(+a, c), t = n == 0 || !isFinite(n) ? V(c * (Math.log("0." + B(a.d)) / Math.LN10 + a.e + 1)) : new u(n + "").e, t > u.maxE + 1 || t < u.minE - 1 ? new u(t > 0 ? o / 0 : 0) : (O = !1, u.rounding = a.s = 1, n = Math.min(12, (t + "").length), r = je(e.times(ee(a, i + n)), i), r.d && (r = T(r, i + 5, 1), ge(r.d, i, s) && (t = i + 10, r = T(je(e.times(ee(a, t + n)), t), t + 5, 1), +B(r.d).slice(i + 1, i + 15) + 1 == 1e14 && (r = T(r, i + 1, 0)))), r.s = o, O = !0, u.rounding = s, T(r, i, s));
443
+ return n = P(+a, c), t = n == 0 || !isFinite(n) ? j(c * (Math.log("0." + U(a.d)) / Math.LN10 + a.e + 1)) : new u(n + "").e, t > u.maxE + 1 || t < u.minE - 1 ? new u(t > 0 ? o / 0 : 0) : (I = !1, u.rounding = a.s = 1, n = Math.min(12, (t + "").length), r = Ge(e.times(te(a, i + n)), i), r.d && (r = v(r, i + 5, 1), ye(r.d, i, s) && (t = i + 10, r = v(Ge(e.times(te(a, t + n)), t), t + 5, 1), +U(r.d).slice(i + 1, i + 15) + 1 == 1e14 && (r = v(r, i + 1, 0)))), r.s = o, I = !0, u.rounding = s, v(r, i, s));
444
444
  };
445
- m.toPrecision = function(e, t) {
445
+ g.toPrecision = function(e, t) {
446
446
  var n, i = this, r = i.constructor;
447
- return e === void 0 ? n = X(i, i.e <= r.toExpNeg || i.e >= r.toExpPos) : ($(e, 1, ne), t === void 0 ? t = r.rounding : $(t, 0, 8), i = T(new r(i), e, t), n = X(i, e <= i.e || i.e <= r.toExpNeg, e)), i.isNeg() && !i.isZero() ? "-" + n : n;
447
+ return e === void 0 ? n = Z(i, i.e <= r.toExpNeg || i.e >= r.toExpPos) : (G(e, 1, ie), t === void 0 ? t = r.rounding : G(t, 0, 8), i = v(new r(i), e, t), n = Z(i, e <= i.e || i.e <= r.toExpNeg, e)), i.isNeg() && !i.isZero() ? "-" + n : n;
448
448
  };
449
- m.toSignificantDigits = m.toSD = function(e, t) {
449
+ g.toSignificantDigits = g.toSD = function(e, t) {
450
450
  var n = this, i = n.constructor;
451
- return e === void 0 ? (e = i.precision, t = i.rounding) : ($(e, 1, ne), t === void 0 ? t = i.rounding : $(t, 0, 8)), T(new i(n), e, t);
451
+ return e === void 0 ? (e = i.precision, t = i.rounding) : (G(e, 1, ie), t === void 0 ? t = i.rounding : G(t, 0, 8)), v(new i(n), e, t);
452
452
  };
453
- m.toString = function() {
454
- var e = this, t = e.constructor, n = X(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
453
+ g.toString = function() {
454
+ var e = this, t = e.constructor, n = Z(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
455
455
  return e.isNeg() && !e.isZero() ? "-" + n : n;
456
456
  };
457
- m.truncated = m.trunc = function() {
458
- return T(new this.constructor(this), this.e + 1, 1);
457
+ g.truncated = g.trunc = function() {
458
+ return v(new this.constructor(this), this.e + 1, 1);
459
459
  };
460
- m.valueOf = m.toJSON = function() {
461
- var e = this, t = e.constructor, n = X(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
460
+ g.valueOf = g.toJSON = function() {
461
+ var e = this, t = e.constructor, n = Z(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
462
462
  return e.isNeg() ? "-" + n : n;
463
463
  };
464
- function B(e) {
464
+ function U(e) {
465
465
  var t, n, i, r = e.length - 1, s = "", o = e[0];
466
466
  if (r > 0) {
467
467
  for (s += o, t = 1; t < r; t++)
468
- i = e[t] + "", n = A - i.length, n && (s += K(n)), s += i;
469
- o = e[t], i = o + "", n = A - i.length, n && (s += K(n));
468
+ i = e[t] + "", n = T - i.length, n && (s += ee(n)), s += i;
469
+ o = e[t], i = o + "", n = T - i.length, n && (s += ee(n));
470
470
  } else if (o === 0)
471
471
  return "0";
472
472
  for (; o % 10 === 0; ) o /= 10;
473
473
  return s + o;
474
474
  }
475
- function $(e, t, n) {
475
+ function G(e, t, n) {
476
476
  if (e !== ~~e || e < t || e > n)
477
- throw Error(te + e);
477
+ throw Error(ne + e);
478
478
  }
479
- function ge(e, t, n, i) {
479
+ function ye(e, t, n, i) {
480
480
  var r, s, o, a;
481
481
  for (s = e[0]; s >= 10; s /= 10) --t;
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;
482
+ return --t < 0 ? (t += T, r = 0) : (r = Math.ceil((t + 1) / T), t %= T), s = P(10, T - 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) == P(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) == P(10, t - 3) - 1, o;
483
483
  }
484
- function ve(e, t, n) {
484
+ function Ie(e, t, n) {
485
485
  for (var i, r = [0], s, o = 0, a = e.length; o < a; ) {
486
486
  for (s = r.length; s--; ) r[s] *= t;
487
- for (r[0] += Ue.indexOf(e.charAt(o++)), i = 0; i < r.length; i++)
487
+ for (r[0] += je.indexOf(e.charAt(o++)), i = 0; i < r.length; i++)
488
488
  r[i] > n - 1 && (r[i + 1] === void 0 && (r[i + 1] = 0), r[i + 1] += r[i] / n | 0, r[i] %= n);
489
489
  }
490
490
  return r.reverse();
491
491
  }
492
- function Pt(e, t) {
492
+ function qt(e, t) {
493
493
  var n, i, r;
494
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 = ce(e, 1, t.times(r), new e(1));
495
+ i = t.d.length, i < 32 ? (n = Math.ceil(i / 3), r = (1 / Le(4, n)).toString()) : (n = 16, r = "2.3283064365386962890625e-10"), e.precision += n, t = he(e, 1, t.times(r), new e(1));
496
496
  for (var s = n; s--; ) {
497
497
  var o = t.times(t);
498
498
  t = o.times(o).minus(o).times(8).plus(1);
499
499
  }
500
500
  return e.precision -= n, t;
501
501
  }
502
- var k = /* @__PURE__ */ function() {
502
+ var R = /* @__PURE__ */ function() {
503
503
  function e(i, r, s) {
504
504
  var o, a = 0, u = i.length;
505
505
  for (i = i.slice(); u--; )
@@ -524,123 +524,123 @@ var k = /* @__PURE__ */ function() {
524
524
  for (; !i[0] && i.length > 1; ) i.shift();
525
525
  }
526
526
  return function(i, r, s, o, a, u) {
527
- var c, l, f, h, E, N, y, S, D, U, _, x, G, j, Z, H, ie, fe, R, se, W = i.constructor, d = i.s == r.s ? 1 : -1, g = i.d, v = r.d;
528
- if (!g || !g[0] || !v || !v[0])
529
- return new W(
527
+ var c, l, f, d, y, N, E, x, O, q, b, C, J, $, K, ae, H, me, Y, V, ce = i.constructor, re = i.s == r.s ? 1 : -1, h = i.d, p = r.d;
528
+ if (!h || !h[0] || !p || !p[0])
529
+ return new ce(
530
530
  // Return NaN if either NaN, or both Infinity or 0.
531
- !i.s || !r.s || (g ? v && g[0] == v[0] : !v) ? NaN : (
531
+ !i.s || !r.s || (h ? p && h[0] == p[0] : !p) ? NaN : (
532
532
  // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
533
- g && g[0] == 0 || !v ? d * 0 : d / 0
533
+ h && h[0] == 0 || !p ? re * 0 : re / 0
534
534
  )
535
535
  );
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, D = new W(d), U = D.d = [], f = 0; v[f] == (g[f] || 0); f++) ;
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)
538
- U.push(1), N = !0;
536
+ for (u ? (y = 1, l = i.e - r.e) : (u = Q, y = T, l = j(i.e / y) - j(r.e / y)), Y = p.length, H = h.length, O = new ce(re), q = O.d = [], f = 0; p[f] == (h[f] || 0); f++) ;
537
+ if (p[f] > (h[f] || 0) && l--, s == null ? ($ = s = ce.precision, o = ce.rounding) : a ? $ = s + (i.e - r.e) + 1 : $ = s, $ < 0)
538
+ q.push(1), N = !0;
539
539
  else {
540
- if (j = j / E + 2 | 0, f = 0, R == 1) {
541
- for (h = 0, v = v[0], j++; (f < ie || h) && j--; f++)
542
- Z = h * u + (g[f] || 0), U[f] = Z / v | 0, h = Z % v | 0;
543
- N = h || f < ie;
540
+ if ($ = $ / y + 2 | 0, f = 0, Y == 1) {
541
+ for (d = 0, p = p[0], $++; (f < H || d) && $--; f++)
542
+ K = d * u + (h[f] || 0), q[f] = K / p | 0, d = K % p | 0;
543
+ N = d || f < H;
544
544
  } else {
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;
546
- se = v.slice(), se.unshift(0), fe = v[0], v[1] >= u / 2 && ++fe;
545
+ for (d = u / (p[0] + 1) | 0, d > 1 && (p = e(p, d, u), h = e(h, d, u), Y = p.length, H = h.length), ae = Y, b = h.slice(0, Y), C = b.length; C < Y; ) b[C++] = 0;
546
+ V = p.slice(), V.unshift(0), me = p[0], p[1] >= u / 2 && ++me;
547
547
  do
548
- h = 0, c = t(v, _, R, x), c < 0 ? (G = _[0], R != x && (G = G * u + (_[1] || 0)), h = G / fe | 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);
549
- while ((H++ < ie || _[0] !== void 0) && j--);
550
- N = _[0] !== void 0;
548
+ d = 0, c = t(p, b, Y, C), c < 0 ? (J = b[0], Y != C && (J = J * u + (b[1] || 0)), d = J / me | 0, d > 1 ? (d >= u && (d = u - 1), E = e(p, d, u), x = E.length, C = b.length, c = t(E, b, x, C), c == 1 && (d--, n(E, Y < x ? V : p, x, u))) : (d == 0 && (c = d = 1), E = p.slice()), x = E.length, x < C && E.unshift(0), n(b, E, C, u), c == -1 && (C = b.length, c = t(p, b, Y, C), c < 1 && (d++, n(b, Y < C ? V : p, C, u))), C = b.length) : c === 0 && (d++, b = [0]), q[f++] = d, c && b[0] ? b[C++] = h[ae] || 0 : (b = [h[ae]], C = 1);
549
+ while ((ae++ < H || b[0] !== void 0) && $--);
550
+ N = b[0] !== void 0;
551
551
  }
552
- U[0] || U.shift();
552
+ q[0] || q.shift();
553
553
  }
554
- if (E == 1)
555
- D.e = l, ct = N;
554
+ if (y == 1)
555
+ O.e = l, ht = N;
556
556
  else {
557
- for (f = 1, h = U[0]; h >= 10; h /= 10) f++;
558
- D.e = f + l * E - 1, T(D, a ? s + D.e + 1 : s, o, N);
557
+ for (f = 1, d = q[0]; d >= 10; d /= 10) f++;
558
+ O.e = f + l * y - 1, v(O, a ? s + O.e + 1 : s, o, N);
559
559
  }
560
- return D;
560
+ return O;
561
561
  };
562
562
  }();
563
- function T(e, t, n, i) {
564
- var r, s, o, a, u, c, l, f, h, E = e.constructor;
563
+ function v(e, t, n, i) {
564
+ var r, s, o, a, u, c, l, f, d, y = e.constructor;
565
565
  e: if (t != null) {
566
566
  if (f = e.d, !f) return e;
567
567
  for (r = 1, a = f[0]; a >= 10; a /= 10) r++;
568
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)
569
+ s += T, o = t, l = f[d = 0], u = l / P(10, r - o - 1) % 10 | 0;
570
+ else if (d = Math.ceil((s + 1) / T), a = f.length, d >= a)
571
571
  if (i) {
572
- for (; a++ <= h; ) f.push(0);
573
- l = u = 0, r = 1, s %= A, o = s - A + 1;
572
+ for (; a++ <= d; ) f.push(0);
573
+ l = u = 0, r = 1, s %= T, o = s - T + 1;
574
574
  } else
575
575
  break e;
576
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;
577
+ for (l = a = f[d], r = 1; a >= 10; a /= 10) r++;
578
+ s %= T, o = s - T + r, u = o < 0 ? 0 : l / P(10, r - o - 1) % 10 | 0;
579
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)
580
+ if (i = i || t < 0 || f[d + 1] !== void 0 || (o < 0 ? l : l % P(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 / P(10, r - o) : 0 : f[d - 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] = P(10, (T - t % T) % T), e.e = -t || 0) : f[0] = e.e = 0, e;
583
+ if (s == 0 ? (f.length = d, a = 1, d--) : (f.length = d + 1, a = P(10, T - s), f[d] = o > 0 ? (l / P(10, r - o) % P(10, o) | 0) * a : 0), c)
584
584
  for (; ; )
585
- if (h == 0) {
585
+ if (d == 0) {
586
586
  for (s = 1, o = f[0]; o >= 10; o /= 10) s++;
587
587
  for (o = f[0] += a, a = 1; o >= 10; o /= 10) a++;
588
- s != a && (e.e++, f[0] == z && (f[0] = 1));
588
+ s != a && (e.e++, f[0] == Q && (f[0] = 1));
589
589
  break;
590
590
  } else {
591
- if (f[h] += a, f[h] != z) break;
592
- f[h--] = 0, a = 1;
591
+ if (f[d] += a, f[d] != Q) break;
592
+ f[d--] = 0, a = 1;
593
593
  }
594
594
  for (s = f.length; f[--s] === 0; ) f.pop();
595
595
  }
596
- return O && (e.e > E.maxE ? (e.d = null, e.e = NaN) : e.e < E.minE && (e.e = 0, e.d = [0])), e;
596
+ return I && (e.e > y.maxE ? (e.d = null, e.e = NaN) : e.e < y.minE && (e.e = 0, e.d = [0])), e;
597
597
  }
598
- function X(e, t, n) {
599
- if (!e.isFinite()) return gt(e);
600
- var i, r = e.e, s = B(e.d), o = s.length;
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;
598
+ function Z(e, t, n) {
599
+ if (!e.isFinite()) return wt(e);
600
+ var i, r = e.e, s = U(e.d), o = s.length;
601
+ return t ? (n && (i = n - o) > 0 ? s = s.charAt(0) + "." + s.slice(1) + ee(i) : o > 1 && (s = s.charAt(0) + "." + s.slice(1)), s = s + (e.e < 0 ? "e" : "e+") + e.e) : r < 0 ? (s = "0." + ee(-r - 1) + s, n && (i = n - o) > 0 && (s += ee(i))) : r >= o ? (s += ee(r + 1 - o), n && (i = n - r - 1) > 0 && (s = s + "." + ee(i))) : ((i = r + 1) < o && (s = s.slice(0, i) + "." + s.slice(i)), n && (i = n - o) > 0 && (r + 1 === o && (s += "."), s += ee(i))), s;
602
602
  }
603
- function Se(e, t) {
603
+ function Re(e, t) {
604
604
  var n = e[0];
605
- for (t *= A; n >= 10; n /= 10) t++;
605
+ for (t *= T; n >= 10; n /= 10) t++;
606
606
  return t;
607
607
  }
608
- function _e(e, t, n) {
609
- if (t > Ft)
610
- throw O = !0, n && (e.precision = n), Error(ut);
611
- return T(new e(Ie), t, 1, !0);
608
+ function xe(e, t, n) {
609
+ if (t > Ut)
610
+ throw I = !0, n && (e.precision = n), Error(dt);
611
+ return v(new e(De), t, 1, !0);
612
612
  }
613
- function J(e, t, n) {
614
- if (t > Ve) throw Error(ut);
615
- return T(new e(Oe), t, n, !0);
613
+ function X(e, t, n) {
614
+ if (t > He) throw Error(dt);
615
+ return v(new e(Se), t, n, !0);
616
616
  }
617
- function dt(e) {
618
- var t = e.length - 1, n = t * A + 1;
617
+ function Et(e) {
618
+ var t = e.length - 1, n = t * T + 1;
619
619
  if (t = e[t], t) {
620
620
  for (; t % 10 == 0; t /= 10) n--;
621
621
  for (t = e[0]; t >= 10; t /= 10) n++;
622
622
  }
623
623
  return n;
624
624
  }
625
- function K(e) {
625
+ function ee(e) {
626
626
  for (var t = ""; e--; ) t += "0";
627
627
  return t;
628
628
  }
629
- function pt(e, t, n, i) {
630
- var r, s = new e(1), o = Math.ceil(i / A + 4);
631
- for (O = !1; ; ) {
632
- if (n % 2 && (s = s.times(t), We(s.d, o) && (r = !0)), n = V(n / 2), n === 0) {
629
+ function yt(e, t, n, i) {
630
+ var r, s = new e(1), o = Math.ceil(i / T + 4);
631
+ for (I = !1; ; ) {
632
+ if (n % 2 && (s = s.times(t), nt(s.d, o) && (r = !0)), n = j(n / 2), n === 0) {
633
633
  n = s.d.length - 1, r && s.d[n] === 0 && ++s.d[n];
634
634
  break;
635
635
  }
636
- t = t.times(t), We(t.d, o);
636
+ t = t.times(t), nt(t.d, o);
637
637
  }
638
- return O = !0, s;
638
+ return I = !0, s;
639
639
  }
640
- function Ze(e) {
640
+ function tt(e) {
641
641
  return e.d[e.d.length - 1] & 1;
642
642
  }
643
- function mt(e, t, n) {
643
+ function Nt(e, t, n) {
644
644
  for (var i, r = new e(t[0]), s = 0; ++s < t.length; )
645
645
  if (i = new e(t[s]), i.s)
646
646
  r[n](i) && (r = i);
@@ -650,141 +650,141 @@ function mt(e, t, n) {
650
650
  }
651
651
  return r;
652
652
  }
653
- function je(e, t) {
654
- var n, i, r, s, o, a, u, c = 0, l = 0, f = 0, h = e.constructor, E = h.rounding, N = h.precision;
653
+ function Ge(e, t) {
654
+ var n, i, r, s, o, a, u, c = 0, l = 0, f = 0, d = e.constructor, y = d.rounding, N = d.precision;
655
655
  if (!e.d || !e.d[0] || e.e > 17)
656
- return new h(e.d ? e.d[0] ? e.s < 0 ? 0 : 1 / 0 : 1 : e.s ? e.s < 0 ? 0 : e : NaN);
657
- for (t == null ? (O = !1, u = N) : u = t, a = new h(0.03125); e.e > -2; )
656
+ return new d(e.d ? e.d[0] ? e.s < 0 ? 0 : 1 / 0 : 1 : e.s ? e.s < 0 ? 0 : e : NaN);
657
+ for (t == null ? (I = !1, u = N) : u = t, a = new d(0.03125); e.e > -2; )
658
658
  e = e.times(a), f += 5;
659
- for (i = Math.log(F(2, f)) / Math.LN10 * 2 + 5 | 0, u += i, n = s = o = new h(1), h.precision = u; ; ) {
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)) {
661
- for (r = f; r--; ) o = T(o.times(o), u, 1);
659
+ for (i = Math.log(P(2, f)) / Math.LN10 * 2 + 5 | 0, u += i, n = s = o = new d(1), d.precision = u; ; ) {
660
+ if (s = v(s.times(e), u, 1), n = n.times(++l), a = o.plus(R(s, n, u, 1)), U(a.d).slice(0, u) === U(o.d).slice(0, u)) {
661
+ for (r = f; r--; ) o = v(o.times(o), u, 1);
662
662
  if (t == null)
663
- if (c < 3 && ge(o.d, u - i, E, c))
664
- h.precision = u += 10, n = s = a = new h(1), l = 0, c++;
663
+ if (c < 3 && ye(o.d, u - i, y, c))
664
+ d.precision = u += 10, n = s = a = new d(1), l = 0, c++;
665
665
  else
666
- return T(o, h.precision = N, E, O = !0);
666
+ return v(o, d.precision = N, y, I = !0);
667
667
  else
668
- return h.precision = N, o;
668
+ return d.precision = N, o;
669
669
  }
670
670
  o = a;
671
671
  }
672
672
  }
673
- function ee(e, t) {
674
- var n, i, r, s, o, a, u, c, l, f, h, E = 1, N = 10, y = e, S = y.d, D = y.constructor, U = D.rounding, _ = D.precision;
675
- if (y.s < 0 || !S || !S[0] || !y.e && S[0] == 1 && S.length == 1)
676
- return new D(S && !S[0] ? -1 / 0 : y.s != 1 ? NaN : S ? 0 : y);
677
- if (t == null ? (O = !1, l = _) : l = t, D.precision = l += N, n = B(S), i = n.charAt(0), Math.abs(s = y.e) < 15e14) {
673
+ function te(e, t) {
674
+ var n, i, r, s, o, a, u, c, l, f, d, y = 1, N = 10, E = e, x = E.d, O = E.constructor, q = O.rounding, b = O.precision;
675
+ if (E.s < 0 || !x || !x[0] || !E.e && x[0] == 1 && x.length == 1)
676
+ return new O(x && !x[0] ? -1 / 0 : E.s != 1 ? NaN : x ? 0 : E);
677
+ if (t == null ? (I = !1, l = b) : l = t, O.precision = l += N, n = U(x), i = n.charAt(0), Math.abs(s = E.e) < 15e14) {
678
678
  for (; i < 7 && i != 1 || i == 1 && n.charAt(1) > 3; )
679
- y = y.times(e), n = B(y.d), i = n.charAt(0), E++;
680
- s = y.e, i > 1 ? (y = new D("0." + n), s++) : y = new D(i + "." + n.slice(1));
679
+ E = E.times(e), n = U(E.d), i = n.charAt(0), y++;
680
+ s = E.e, i > 1 ? (E = new O("0." + n), s++) : E = new O(i + "." + n.slice(1));
681
681
  } else
682
- return c = _e(D, l + 2, _).times(s + ""), y = ee(new D(i + "." + n.slice(1)), l - N).plus(c), D.precision = _, t == null ? T(y, _, U, O = !0) : y;
683
- for (f = y, u = o = y = k(y.minus(1), y.plus(1), l, 1), h = T(y.times(y), l, 1), r = 3; ; ) {
684
- if (o = T(o.times(h), l, 1), c = u.plus(k(o, new D(r), l, 1)), B(c.d).slice(0, l) === B(u.d).slice(0, l))
685
- if (u = u.times(2), s !== 0 && (u = u.plus(_e(D, l + 2, _).times(s + ""))), u = k(u, new D(E), l, 1), t == null)
686
- if (ge(u.d, l - N, U, a))
687
- D.precision = l += N, c = o = y = k(f.minus(1), f.plus(1), l, 1), h = T(y.times(y), l, 1), r = a = 1;
682
+ return c = xe(O, l + 2, b).times(s + ""), E = te(new O(i + "." + n.slice(1)), l - N).plus(c), O.precision = b, t == null ? v(E, b, q, I = !0) : E;
683
+ for (f = E, u = o = E = R(E.minus(1), E.plus(1), l, 1), d = v(E.times(E), l, 1), r = 3; ; ) {
684
+ if (o = v(o.times(d), l, 1), c = u.plus(R(o, new O(r), l, 1)), U(c.d).slice(0, l) === U(u.d).slice(0, l))
685
+ if (u = u.times(2), s !== 0 && (u = u.plus(xe(O, l + 2, b).times(s + ""))), u = R(u, new O(y), l, 1), t == null)
686
+ if (ye(u.d, l - N, q, a))
687
+ O.precision = l += N, c = o = E = R(f.minus(1), f.plus(1), l, 1), d = v(E.times(E), l, 1), r = a = 1;
688
688
  else
689
- return T(u, D.precision = _, U, O = !0);
689
+ return v(u, O.precision = b, q, I = !0);
690
690
  else
691
- return D.precision = _, u;
691
+ return O.precision = b, u;
692
692
  u = c, r += 2;
693
693
  }
694
694
  }
695
- function gt(e) {
695
+ function wt(e) {
696
696
  return String(e.s * e.s / 0);
697
697
  }
698
- function $e(e, t) {
698
+ function Ye(e, t) {
699
699
  var n, i, r;
700
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
701
  for (r = t.length; t.charCodeAt(r - 1) === 48; --r) ;
702
702
  if (t = t.slice(i, r), t) {
703
- if (r -= i, e.e = n = n - i - 1, e.d = [], i = (n + 1) % A, n < 0 && (i += A), i < r) {
704
- for (i && e.d.push(+t.slice(0, i)), r -= A; i < r; ) e.d.push(+t.slice(i, i += A));
705
- t = t.slice(i), i = A - t.length;
703
+ if (r -= i, e.e = n = n - i - 1, e.d = [], i = (n + 1) % T, n < 0 && (i += T), i < r) {
704
+ for (i && e.d.push(+t.slice(0, i)), r -= T; i < r; ) e.d.push(+t.slice(i, i += T));
705
+ t = t.slice(i), i = T - t.length;
706
706
  } else
707
707
  i -= r;
708
708
  for (; i--; ) t += "0";
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]));
709
+ e.d.push(+t), I && (e.e > e.constructor.maxE ? (e.d = null, e.e = NaN) : e.e < e.constructor.minE && (e.e = 0, e.d = [0]));
710
710
  } else
711
711
  e.e = 0, e.d = [0];
712
712
  return e;
713
713
  }
714
- function Mt(e, t) {
714
+ function Vt(e, t) {
715
715
  var n, i, r, s, o, a, u, c, l;
716
716
  if (t.indexOf("_") > -1) {
717
- if (t = t.replace(/(\d)_(?=\d)/g, "$1"), ht.test(t)) return $e(e, t);
717
+ if (t = t.replace(/(\d)_(?=\d)/g, "$1"), gt.test(t)) return Ye(e, t);
718
718
  } else if (t === "Infinity" || t === "NaN")
719
719
  return +t || (e.s = NaN), e.e = NaN, e.d = null, e;
720
- if (kt.test(t))
720
+ if (Pt.test(t))
721
721
  n = 16, t = t.toLowerCase();
722
- else if (Ct.test(t))
722
+ else if (Ft.test(t))
723
723
  n = 2;
724
- else if (Rt.test(t))
724
+ else if (Mt.test(t))
725
725
  n = 8;
726
726
  else
727
- throw Error(te + t);
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 = pt(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) : ue.pow(2, u))), O = !0, e);
727
+ throw Error(ne + t);
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 = yt(i, new i(n), s, s * 2)), c = Ie(t, n, Q), l = c.length - 1, s = l; c[s] === 0; --s) c.pop();
729
+ return s < 0 ? new i(e.s * 0) : (e.e = Re(c, l), e.d = c, I = !1, o && (e = R(e, r, a * 4)), u && (e = e.times(Math.abs(u) < 54 ? P(2, u) : de.pow(2, u))), I = !0, e);
730
730
  }
731
- function Bt(e, t) {
731
+ function jt(e, t) {
732
732
  var n, i = t.d.length;
733
733
  if (i < 3)
734
- return t.isZero() ? t : ce(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 = ce(e, 2, t, t);
734
+ return t.isZero() ? t : he(e, 2, t, t);
735
+ n = 1.4 * Math.sqrt(i), n = n > 16 ? 16 : n | 0, t = t.times(1 / Le(5, n)), t = he(e, 2, t, t);
736
736
  for (var r, s = new e(5), o = new e(16), a = new e(20); n--; )
737
737
  r = t.times(t), t = t.times(s.plus(r.times(o.times(r).minus(a))));
738
738
  return t;
739
739
  }
740
- function ce(e, t, n, i, r) {
741
- var s, o, a, u, c = e.precision, l = Math.ceil(c / A);
742
- for (O = !1, u = n.times(n), a = new e(i); ; ) {
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) {
740
+ function he(e, t, n, i, r) {
741
+ var s, o, a, u, c = e.precision, l = Math.ceil(c / T);
742
+ for (I = !1, u = n.times(n), a = new e(i); ; ) {
743
+ if (o = R(a.times(u), new e(t++ * t++), c, 1), a = r ? i.plus(o) : i.minus(o), i = R(o.times(u), new e(t++ * t++), c, 1), o = a.plus(i), o.d[l] !== void 0) {
744
744
  for (s = l; o.d[s] === a.d[s] && s--; ) ;
745
745
  if (s == -1) break;
746
746
  }
747
747
  s = a, a = i, i = o, o = s;
748
748
  }
749
- return O = !0, o.d.length = l + 1, o;
749
+ return I = !0, o.d.length = l + 1, o;
750
750
  }
751
- function xe(e, t) {
751
+ function Le(e, t) {
752
752
  for (var n = e; --t; ) n *= e;
753
753
  return n;
754
754
  }
755
- function Et(e, t) {
756
- var n, i = t.s < 0, r = J(e, e.precision, 1), s = r.times(0.5);
755
+ function vt(e, t) {
756
+ var n, i = t.s < 0, r = X(e, e.precision, 1), s = r.times(0.5);
757
757
  if (t = t.abs(), t.lte(s))
758
- return Q = i ? 4 : 1, t;
758
+ return W = i ? 4 : 1, t;
759
759
  if (n = t.divToInt(r), n.isZero())
760
- Q = i ? 3 : 2;
760
+ W = i ? 3 : 2;
761
761
  else {
762
762
  if (t = t.minus(n.times(r)), t.lte(s))
763
- return Q = Ze(n) ? i ? 2 : 3 : i ? 4 : 1, t;
764
- Q = Ze(n) ? i ? 1 : 4 : i ? 3 : 2;
763
+ return W = tt(n) ? i ? 2 : 3 : i ? 4 : 1, t;
764
+ W = tt(n) ? i ? 1 : 4 : i ? 3 : 2;
765
765
  }
766
766
  return t.minus(r).abs();
767
767
  }
768
- function Je(e, t, n, i) {
769
- var r, s, o, a, u, c, l, f, h, E = e.constructor, N = n !== void 0;
770
- if (N ? ($(n, 1, ne), i === void 0 ? i = E.rounding : $(i, 0, 8)) : (n = E.precision, i = E.rounding), !e.isFinite())
771
- l = gt(e);
768
+ function Qe(e, t, n, i) {
769
+ var r, s, o, a, u, c, l, f, d, y = e.constructor, N = n !== void 0;
770
+ if (N ? (G(n, 1, ie), i === void 0 ? i = y.rounding : G(i, 0, 8)) : (n = y.precision, i = y.rounding), !e.isFinite())
771
+ l = wt(e);
772
772
  else {
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();
773
+ for (l = Z(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(".", ""), d = new y(1), d.e = l.length - o, d.d = Ie(Z(d), 10, r), d.e = d.d.length), f = Ie(l, 10, r), s = u = f.length; f[--u] == 0; ) f.pop();
774
774
  if (!f[0])
775
775
  l = N ? "0p+0" : "0";
776
776
  else {
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 = ct), 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)
777
+ if (o < 0 ? s-- : (e = new y(e), e.d = f, e.e = s, e = R(e, d, n, i, 0, r), f = e.d, s = e.e, c = ht), 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)
778
778
  for (; ++f[--n] > r - 1; )
779
779
  f[n] = 0, n || (++s, f.unshift(1));
780
780
  for (u = f.length; !f[u - 1]; --u) ;
781
- for (o = 0, l = ""; o < u; o++) l += Ue.charAt(f[o]);
781
+ for (o = 0, l = ""; o < u; o++) l += je.charAt(f[o]);
782
782
  if (N) {
783
783
  if (u > 1)
784
784
  if (t == 16 || t == 8) {
785
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 += Ue.charAt(f[o]);
786
+ for (f = Ie(l, r, t), u = f.length; !f[u - 1]; --u) ;
787
+ for (o = 1, l = "1."; o < u; o++) l += je.charAt(f[o]);
788
788
  } else
789
789
  l = l.charAt(0) + "." + l.slice(1);
790
790
  l = l + (s < 0 ? "p" : "p+") + s;
@@ -798,103 +798,103 @@ function Je(e, t, n, i) {
798
798
  }
799
799
  return e.s < 0 ? "-" + l : l;
800
800
  }
801
- function We(e, t) {
801
+ function nt(e, t) {
802
802
  if (e.length > t)
803
803
  return e.length = t, !0;
804
804
  }
805
- function Ut(e) {
805
+ function $t(e) {
806
806
  return new this(e).abs();
807
807
  }
808
- function qt(e) {
808
+ function Ht(e) {
809
809
  return new this(e).acos();
810
810
  }
811
- function Vt(e) {
811
+ function Gt(e) {
812
812
  return new this(e).acosh();
813
813
  }
814
- function jt(e, t) {
814
+ function Yt(e, t) {
815
815
  return new this(e).plus(t);
816
816
  }
817
- function $t(e) {
817
+ function Jt(e) {
818
818
  return new this(e).asin();
819
819
  }
820
- function Ht(e) {
820
+ function zt(e) {
821
821
  return new this(e).asinh();
822
822
  }
823
- function Gt(e) {
823
+ function Xt(e) {
824
824
  return new this(e).atan();
825
825
  }
826
- function Yt(e) {
826
+ function Qt(e) {
827
827
  return new this(e).atanh();
828
828
  }
829
- function Jt(e, t) {
829
+ function Zt(e, t) {
830
830
  e = new this(e), t = new this(t);
831
831
  var n, i = this.precision, r = this.rounding, s = i + 4;
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;
832
+ return !e.s || !t.s ? n = new this(NaN) : !e.d && !t.d ? (n = X(this, s, 1).times(t.s > 0 ? 0.25 : 0.75), n.s = e.s) : !t.d || e.isZero() ? (n = t.s < 0 ? X(this, i, r) : new this(0), n.s = e.s) : !e.d || t.isZero() ? (n = X(this, s, 1).times(0.5), n.s = e.s) : t.s < 0 ? (this.precision = s, this.rounding = 1, n = this.atan(R(e, t, s, 1)), t = X(this, s, 1), this.precision = i, this.rounding = r, n = e.s < 0 ? n.minus(t) : n.plus(t)) : n = this.atan(R(e, t, s, 1)), n;
833
833
  }
834
- function zt(e) {
834
+ function Wt(e) {
835
835
  return new this(e).cbrt();
836
836
  }
837
- function Xt(e) {
838
- return T(e = new this(e), e.e + 1, 2);
837
+ function Kt(e) {
838
+ return v(e = new this(e), e.e + 1, 2);
839
839
  }
840
- function Qt(e, t, n) {
840
+ function en(e, t, n) {
841
841
  return new this(e).clamp(t, n);
842
842
  }
843
- function Zt(e) {
844
- if (!e || typeof e != "object") throw Error(be + "Object expected");
843
+ function tn(e) {
844
+ if (!e || typeof e != "object") throw Error(ke + "Object expected");
845
845
  var t, n, i, r = e.defaults === !0, s = [
846
846
  "precision",
847
847
  1,
848
- ne,
848
+ ie,
849
849
  "rounding",
850
850
  0,
851
851
  8,
852
852
  "toExpNeg",
853
- -9e15,
853
+ -le,
854
854
  0,
855
855
  "toExpPos",
856
856
  0,
857
- Be,
857
+ le,
858
858
  "maxE",
859
859
  0,
860
- Be,
860
+ le,
861
861
  "minE",
862
- -9e15,
862
+ -le,
863
863
  0,
864
864
  "modulo",
865
865
  0,
866
866
  9
867
867
  ];
868
868
  for (t = 0; t < s.length; t += 3)
869
- if (n = s[t], r && (this[n] = qe[n]), (i = e[n]) !== void 0)
870
- if (V(i) === i && i >= s[t + 1] && i <= s[t + 2]) this[n] = i;
871
- else throw Error(te + n + ": " + i);
872
- if (n = "crypto", r && (this[n] = qe[n]), (i = e[n]) !== void 0)
869
+ if (n = s[t], r && (this[n] = $e[n]), (i = e[n]) !== void 0)
870
+ if (j(i) === i && i >= s[t + 1] && i <= s[t + 2]) this[n] = i;
871
+ else throw Error(ne + n + ": " + i);
872
+ if (n = "crypto", r && (this[n] = $e[n]), (i = e[n]) !== void 0)
873
873
  if (i === !0 || i === !1 || i === 0 || i === 1)
874
874
  if (i)
875
875
  if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
876
876
  this[n] = !0;
877
877
  else
878
- throw Error(lt);
878
+ throw Error(pt);
879
879
  else
880
880
  this[n] = !1;
881
881
  else
882
- throw Error(te + n + ": " + i);
882
+ throw Error(ne + n + ": " + i);
883
883
  return this;
884
884
  }
885
- function Wt(e) {
885
+ function nn(e) {
886
886
  return new this(e).cos();
887
887
  }
888
- function Kt(e) {
888
+ function rn(e) {
889
889
  return new this(e).cosh();
890
890
  }
891
- function Nt(e) {
891
+ function Tt(e) {
892
892
  var t, n, i;
893
893
  function r(s) {
894
894
  var o, a, u, c = this;
895
895
  if (!(c instanceof r)) return new r(s);
896
- if (c.constructor = r, Ke(s)) {
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);
896
+ if (c.constructor = r, it(s)) {
897
+ c.s = s.s, I ? !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);
898
898
  return;
899
899
  }
900
900
  if (u = typeof s, u === "number") {
@@ -904,75 +904,75 @@ function Nt(e) {
904
904
  }
905
905
  if (s < 0 ? (s = -s, c.s = -1) : c.s = 1, s === ~~s && s < 1e7) {
906
906
  for (o = 0, a = s; a >= 10; a /= 10) o++;
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]);
907
+ I ? 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]);
908
908
  return;
909
909
  } else if (s * 0 !== 0) {
910
910
  s || (c.s = NaN), c.e = NaN, c.d = null;
911
911
  return;
912
912
  }
913
- return $e(c, s.toString());
913
+ return Ye(c, s.toString());
914
914
  } else if (u !== "string")
915
- throw Error(te + s);
916
- return (a = s.charCodeAt(0)) === 45 ? (s = s.slice(1), c.s = -1) : (a === 43 && (s = s.slice(1)), c.s = 1), ht.test(s) ? $e(c, s) : Mt(c, s);
915
+ throw Error(ne + s);
916
+ return (a = s.charCodeAt(0)) === 45 ? (s = s.slice(1), c.s = -1) : (a === 43 && (s = s.slice(1)), c.s = 1), gt.test(s) ? Ye(c, s) : Vt(c, s);
917
917
  }
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 = Zt, r.clone = Nt, r.isDecimal = Ke, r.abs = Ut, r.acos = qt, r.acosh = Vt, r.add = jt, r.asin = $t, r.asinh = Ht, r.atan = Gt, r.atanh = Yt, r.atan2 = Jt, r.cbrt = zt, r.ceil = Xt, r.clamp = Qt, r.cos = Wt, r.cosh = Kt, r.div = en, r.exp = tn, r.floor = nn, r.hypot = rn, r.ln = sn, r.log = on, r.log10 = cn, r.log2 = an, r.max = un, r.min = ln, r.mod = fn, r.mul = hn, r.pow = dn, r.random = pn, r.round = mn, r.sign = gn, r.sin = En, r.sinh = Nn, r.sqrt = yn, r.sub = vn, r.sum = wn, r.tan = Tn, r.tanh = An, r.trunc = In, e === void 0 && (e = {}), e && e.defaults !== !0)
918
+ if (r.prototype = g, 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 = tn, r.clone = Tt, r.isDecimal = it, r.abs = $t, r.acos = Ht, r.acosh = Gt, r.add = Yt, r.asin = Jt, r.asinh = zt, r.atan = Xt, r.atanh = Qt, r.atan2 = Zt, r.cbrt = Wt, r.ceil = Kt, r.clamp = en, r.cos = nn, r.cosh = rn, r.div = sn, r.exp = on, r.floor = an, r.hypot = cn, r.ln = un, r.log = ln, r.log10 = hn, r.log2 = fn, r.max = dn, r.min = pn, r.mod = mn, r.mul = gn, r.pow = En, r.random = yn, r.round = Nn, r.sign = wn, r.sin = vn, r.sinh = Tn, r.sqrt = An, r.sub = In, r.sum = On, r.tan = bn, r.tanh = _n, r.trunc = Dn, e === void 0 && (e = {}), e && e.defaults !== !0)
919
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]);
920
920
  return r.config(e), r;
921
921
  }
922
- function en(e, t) {
922
+ function sn(e, t) {
923
923
  return new this(e).div(t);
924
924
  }
925
- function tn(e) {
925
+ function on(e) {
926
926
  return new this(e).exp();
927
927
  }
928
- function nn(e) {
929
- return T(e = new this(e), e.e + 1, 3);
928
+ function an(e) {
929
+ return v(e = new this(e), e.e + 1, 3);
930
930
  }
931
- function rn() {
931
+ function cn() {
932
932
  var e, t, n = new this(0);
933
- for (O = !1, e = 0; e < arguments.length; )
933
+ for (I = !1, e = 0; e < arguments.length; )
934
934
  if (t = new this(arguments[e++]), t.d)
935
935
  n.d && (n = n.plus(t.times(t)));
936
936
  else {
937
937
  if (t.s)
938
- return O = !0, new this(1 / 0);
938
+ return I = !0, new this(1 / 0);
939
939
  n = t;
940
940
  }
941
- return O = !0, n.sqrt();
941
+ return I = !0, n.sqrt();
942
942
  }
943
- function Ke(e) {
944
- return e instanceof ue || e && e.toStringTag === ft || !1;
943
+ function it(e) {
944
+ return e instanceof de || e && e.toStringTag === mt || !1;
945
945
  }
946
- function sn(e) {
946
+ function un(e) {
947
947
  return new this(e).ln();
948
948
  }
949
- function on(e, t) {
949
+ function ln(e, t) {
950
950
  return new this(e).log(t);
951
951
  }
952
- function an(e) {
952
+ function fn(e) {
953
953
  return new this(e).log(2);
954
954
  }
955
- function cn(e) {
955
+ function hn(e) {
956
956
  return new this(e).log(10);
957
957
  }
958
- function un() {
959
- return mt(this, arguments, "lt");
958
+ function dn() {
959
+ return Nt(this, arguments, "lt");
960
960
  }
961
- function ln() {
962
- return mt(this, arguments, "gt");
961
+ function pn() {
962
+ return Nt(this, arguments, "gt");
963
963
  }
964
- function fn(e, t) {
964
+ function mn(e, t) {
965
965
  return new this(e).mod(t);
966
966
  }
967
- function hn(e, t) {
967
+ function gn(e, t) {
968
968
  return new this(e).mul(t);
969
969
  }
970
- function dn(e, t) {
970
+ function En(e, t) {
971
971
  return new this(e).pow(t);
972
972
  }
973
- function pn(e) {
973
+ function yn(e) {
974
974
  var t, n, i, r, s = 0, o = new this(1), a = [];
975
- if (e === void 0 ? e = this.precision : $(e, 1, ne), i = Math.ceil(e / A), this.crypto)
975
+ if (e === void 0 ? e = this.precision : G(e, 1, ie), i = Math.ceil(e / T), this.crypto)
976
976
  if (crypto.getRandomValues)
977
977
  for (t = crypto.getRandomValues(new Uint32Array(i)); s < i; )
978
978
  r = t[s], r >= 429e7 ? t[s] = crypto.getRandomValues(new Uint32Array(1))[0] : a[s++] = r % 1e7;
@@ -981,93 +981,93 @@ function pn(e) {
981
981
  r = t[s] + (t[s + 1] << 8) + (t[s + 2] << 16) + ((t[s + 3] & 127) << 24), r >= 214e7 ? crypto.randomBytes(4).copy(t, s) : (a.push(r % 1e7), s += 4);
982
982
  s = i / 4;
983
983
  } else
984
- throw Error(lt);
984
+ throw Error(pt);
985
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();
986
+ for (i = a[--s], e %= T, i && e && (r = P(10, T - e), a[s] = (i / r | 0) * r); a[s] === 0; s--) a.pop();
987
987
  if (s < 0)
988
988
  n = 0, a = [0];
989
989
  else {
990
- for (n = -1; a[0] === 0; n -= A) a.shift();
990
+ for (n = -1; a[0] === 0; n -= T) a.shift();
991
991
  for (i = 1, r = a[0]; r >= 10; r /= 10) i++;
992
- i < A && (n -= A - i);
992
+ i < T && (n -= T - i);
993
993
  }
994
994
  return o.e = n, o.d = a, o;
995
995
  }
996
- function mn(e) {
997
- return T(e = new this(e), e.e + 1, this.rounding);
996
+ function Nn(e) {
997
+ return v(e = new this(e), e.e + 1, this.rounding);
998
998
  }
999
- function gn(e) {
999
+ function wn(e) {
1000
1000
  return e = new this(e), e.d ? e.d[0] ? e.s : 0 * e.s : e.s || NaN;
1001
1001
  }
1002
- function En(e) {
1002
+ function vn(e) {
1003
1003
  return new this(e).sin();
1004
1004
  }
1005
- function Nn(e) {
1005
+ function Tn(e) {
1006
1006
  return new this(e).sinh();
1007
1007
  }
1008
- function yn(e) {
1008
+ function An(e) {
1009
1009
  return new this(e).sqrt();
1010
1010
  }
1011
- function vn(e, t) {
1011
+ function In(e, t) {
1012
1012
  return new this(e).sub(t);
1013
1013
  }
1014
- function wn() {
1014
+ function On() {
1015
1015
  var e = 0, t = arguments, n = new this(t[e]);
1016
- for (O = !1; n.s && ++e < t.length; ) n = n.plus(t[e]);
1017
- return O = !0, T(n, this.precision, this.rounding);
1016
+ for (I = !1; n.s && ++e < t.length; ) n = n.plus(t[e]);
1017
+ return I = !0, v(n, this.precision, this.rounding);
1018
1018
  }
1019
- function Tn(e) {
1019
+ function bn(e) {
1020
1020
  return new this(e).tan();
1021
1021
  }
1022
- function An(e) {
1022
+ function _n(e) {
1023
1023
  return new this(e).tanh();
1024
1024
  }
1025
- function In(e) {
1026
- return T(e = new this(e), e.e + 1, 1);
1025
+ function Dn(e) {
1026
+ return v(e = new this(e), e.e + 1, 1);
1027
1027
  }
1028
- m[Symbol.for("nodejs.util.inspect.custom")] = m.toString;
1029
- m[Symbol.toStringTag] = "Decimal";
1030
- var ue = m.constructor = Nt(qe);
1031
- Ie = new ue(Ie);
1032
- Oe = new ue(Oe);
1033
- const ze = JSON, On = (e) => e.toUpperCase(), _n = (e) => {
1028
+ g[Symbol.for("nodejs.util.inspect.custom")] = g.toString;
1029
+ g[Symbol.toStringTag] = "Decimal";
1030
+ var de = g.constructor = Tt($e);
1031
+ De = new de(De);
1032
+ Se = new de(Se);
1033
+ const Ze = JSON, Sn = (e) => e.toUpperCase(), xn = (e) => {
1034
1034
  const t = {};
1035
1035
  return e.forEach((n, i) => {
1036
1036
  t[i] = n;
1037
1037
  }), t;
1038
- }, Dn = (e, t, n) => e.document ? e : {
1038
+ }, Cn = (e, t, n) => e.document ? e : {
1039
1039
  document: e,
1040
1040
  variables: t,
1041
1041
  requestHeaders: n,
1042
1042
  signal: void 0
1043
- }, bn = (e, t, n) => e.query ? e : {
1043
+ }, kn = (e, t, n) => e.query ? e : {
1044
1044
  query: e,
1045
1045
  variables: t,
1046
1046
  requestHeaders: n,
1047
1047
  signal: void 0
1048
- }, Sn = (e, t) => e.documents ? e : {
1048
+ }, Rn = (e, t) => e.documents ? e : {
1049
1049
  documents: e,
1050
1050
  requestHeaders: t,
1051
1051
  signal: void 0
1052
1052
  };
1053
- function we(e, t) {
1053
+ function Oe(e, t) {
1054
1054
  if (!!!e)
1055
1055
  throw new Error(t);
1056
1056
  }
1057
- function xn(e) {
1057
+ function Ln(e) {
1058
1058
  return typeof e == "object" && e !== null;
1059
1059
  }
1060
- function Cn(e, t) {
1060
+ function Fn(e, t) {
1061
1061
  if (!!!e)
1062
1062
  throw new Error(
1063
1063
  "Unexpected invariant triggered."
1064
1064
  );
1065
1065
  }
1066
- const kn = /\r\n|[\n\r]/g;
1067
- function He(e, t) {
1066
+ const Pn = /\r\n|[\n\r]/g;
1067
+ function Je(e, t) {
1068
1068
  let n = 0, i = 1;
1069
- for (const r of e.body.matchAll(kn)) {
1070
- if (typeof r.index == "number" || Cn(!1), r.index >= t)
1069
+ for (const r of e.body.matchAll(Pn)) {
1070
+ if (typeof r.index == "number" || Fn(!1), r.index >= t)
1071
1071
  break;
1072
1072
  n = r.index + r[0].length, i += 1;
1073
1073
  }
@@ -1076,27 +1076,27 @@ function He(e, t) {
1076
1076
  column: t + 1 - n
1077
1077
  };
1078
1078
  }
1079
- function Rn(e) {
1080
- return yt(
1079
+ function Mn(e) {
1080
+ return At(
1081
1081
  e.source,
1082
- He(e.source, e.start)
1082
+ Je(e.source, e.start)
1083
1083
  );
1084
1084
  }
1085
- function yt(e, t) {
1085
+ function At(e, t) {
1086
1086
  const n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, a = t.line === 1 ? n : 0, u = t.column + a, c = `${e.name}:${o}:${u}
1087
1087
  `, l = i.split(/\r\n|[\n\r]/g), f = l[r];
1088
1088
  if (f.length > 120) {
1089
- const h = Math.floor(u / 80), E = u % 80, N = [];
1090
- for (let y = 0; y < f.length; y += 80)
1091
- N.push(f.slice(y, y + 80));
1092
- return c + et([
1089
+ const d = Math.floor(u / 80), y = u % 80, N = [];
1090
+ for (let E = 0; E < f.length; E += 80)
1091
+ N.push(f.slice(E, E + 80));
1092
+ return c + rt([
1093
1093
  [`${o} |`, N[0]],
1094
- ...N.slice(1, h + 1).map((y) => ["|", y]),
1095
- ["|", "^".padStart(E)],
1096
- ["|", N[h + 1]]
1094
+ ...N.slice(1, d + 1).map((E) => ["|", E]),
1095
+ ["|", "^".padStart(y)],
1096
+ ["|", N[d + 1]]
1097
1097
  ]);
1098
1098
  }
1099
- return c + et([
1099
+ return c + rt([
1100
1100
  // Lines specified like this: ["prefix", "string"],
1101
1101
  [`${o - 1} |`, l[r - 1]],
1102
1102
  [`${o} |`, f],
@@ -1104,12 +1104,12 @@ function yt(e, t) {
1104
1104
  [`${o + 1} |`, l[r + 1]]
1105
1105
  ]);
1106
1106
  }
1107
- function et(e) {
1107
+ function rt(e) {
1108
1108
  const t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
1109
1109
  return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
1110
1110
  `);
1111
1111
  }
1112
- function Ln(e) {
1112
+ function Bn(e) {
1113
1113
  const t = e[0];
1114
1114
  return t == null || "kind" in t || "length" in t ? {
1115
1115
  nodes: t,
@@ -1120,7 +1120,7 @@ function Ln(e) {
1120
1120
  extensions: e[5]
1121
1121
  } : t;
1122
1122
  }
1123
- class Xe extends Error {
1123
+ class We extends Error {
1124
1124
  /**
1125
1125
  * An array of `{ line, column }` locations within the source GraphQL document
1126
1126
  * which correspond to this error.
@@ -1161,18 +1161,18 @@ class Xe extends Error {
1161
1161
  */
1162
1162
  constructor(t, ...n) {
1163
1163
  var i, r, s;
1164
- const { nodes: o, source: a, positions: u, path: c, originalError: l, extensions: f } = Ln(n);
1165
- super(t), this.name = "GraphQLError", this.path = c ?? void 0, this.originalError = l ?? void 0, this.nodes = tt(
1164
+ const { nodes: o, source: a, positions: u, path: c, originalError: l, extensions: f } = Bn(n);
1165
+ super(t), this.name = "GraphQLError", this.path = c ?? void 0, this.originalError = l ?? void 0, this.nodes = st(
1166
1166
  Array.isArray(o) ? o : o ? [o] : void 0
1167
1167
  );
1168
- const h = tt(
1168
+ const d = st(
1169
1169
  (i = this.nodes) === null || i === void 0 ? void 0 : i.map((N) => N.loc).filter((N) => N != null)
1170
1170
  );
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) => He(a, N)) : h == null ? void 0 : h.map((N) => He(N.source, N.start));
1172
- const E = xn(
1171
+ this.source = a ?? (d == null || (r = d[0]) === null || r === void 0 ? void 0 : r.source), this.positions = u ?? (d == null ? void 0 : d.map((N) => N.start)), this.locations = u && a ? u.map((N) => Je(a, N)) : d == null ? void 0 : d.map((N) => Je(N.source, N.start));
1172
+ const y = Ln(
1173
1173
  l == null ? void 0 : l.extensions
1174
1174
  ) ? l == null ? void 0 : l.extensions : void 0;
1175
- this.extensions = (s = f ?? E) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
1175
+ this.extensions = (s = f ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
1176
1176
  message: {
1177
1177
  writable: !0,
1178
1178
  enumerable: !0
@@ -1196,7 +1196,7 @@ class Xe extends Error {
1196
1196
  value: l.stack,
1197
1197
  writable: !0,
1198
1198
  configurable: !0
1199
- }) : Error.captureStackTrace ? Error.captureStackTrace(this, Xe) : Object.defineProperty(this, "stack", {
1199
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, We) : Object.defineProperty(this, "stack", {
1200
1200
  value: Error().stack,
1201
1201
  writable: !0,
1202
1202
  configurable: !0
@@ -1211,12 +1211,12 @@ class Xe extends Error {
1211
1211
  for (const n of this.nodes)
1212
1212
  n.loc && (t += `
1213
1213
 
1214
- ` + Rn(n.loc));
1214
+ ` + Mn(n.loc));
1215
1215
  else if (this.source && this.locations)
1216
1216
  for (const n of this.locations)
1217
1217
  t += `
1218
1218
 
1219
- ` + yt(this.source, n);
1219
+ ` + At(this.source, n);
1220
1220
  return t;
1221
1221
  }
1222
1222
  toJSON() {
@@ -1226,16 +1226,16 @@ class Xe extends Error {
1226
1226
  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;
1227
1227
  }
1228
1228
  }
1229
- function tt(e) {
1229
+ function st(e) {
1230
1230
  return e === void 0 || e.length === 0 ? void 0 : e;
1231
1231
  }
1232
- function P(e, t, n) {
1233
- return new Xe(`Syntax Error: ${n}`, {
1232
+ function M(e, t, n) {
1233
+ return new We(`Syntax Error: ${n}`, {
1234
1234
  source: e,
1235
1235
  positions: [t]
1236
1236
  });
1237
1237
  }
1238
- class Fn {
1238
+ class Un {
1239
1239
  /**
1240
1240
  * The character offset at which this Node begins.
1241
1241
  */
@@ -1264,7 +1264,7 @@ class Fn {
1264
1264
  };
1265
1265
  }
1266
1266
  }
1267
- class vt {
1267
+ class It {
1268
1268
  /**
1269
1269
  * The kind of Token.
1270
1270
  */
@@ -1306,7 +1306,7 @@ class vt {
1306
1306
  };
1307
1307
  }
1308
1308
  }
1309
- const wt = {
1309
+ const Ot = {
1310
1310
  Name: [],
1311
1311
  Document: ["definitions"],
1312
1312
  OperationDefinition: [
@@ -1380,45 +1380,45 @@ const wt = {
1380
1380
  UnionTypeExtension: ["name", "directives", "types"],
1381
1381
  EnumTypeExtension: ["name", "directives", "values"],
1382
1382
  InputObjectTypeExtension: ["name", "directives", "fields"]
1383
- }, Pn = new Set(Object.keys(wt));
1384
- function nt(e) {
1383
+ }, qn = new Set(Object.keys(Ot));
1384
+ function ot(e) {
1385
1385
  const t = e == null ? void 0 : e.kind;
1386
- return typeof t == "string" && Pn.has(t);
1386
+ return typeof t == "string" && qn.has(t);
1387
1387
  }
1388
- var ae;
1388
+ var fe;
1389
1389
  (function(e) {
1390
1390
  e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
1391
- })(ae || (ae = {}));
1392
- var Ge;
1391
+ })(fe || (fe = {}));
1392
+ var ze;
1393
1393
  (function(e) {
1394
1394
  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";
1395
- })(Ge || (Ge = {}));
1396
- var I;
1395
+ })(ze || (ze = {}));
1396
+ var A;
1397
1397
  (function(e) {
1398
1398
  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";
1399
- })(I || (I = {}));
1400
- function Ye(e) {
1399
+ })(A || (A = {}));
1400
+ function Xe(e) {
1401
1401
  return e === 9 || e === 32;
1402
1402
  }
1403
- function Ee(e) {
1403
+ function Ne(e) {
1404
1404
  return e >= 48 && e <= 57;
1405
1405
  }
1406
- function Tt(e) {
1406
+ function bt(e) {
1407
1407
  return e >= 97 && e <= 122 || // A-Z
1408
1408
  e >= 65 && e <= 90;
1409
1409
  }
1410
- function At(e) {
1411
- return Tt(e) || e === 95;
1410
+ function _t(e) {
1411
+ return bt(e) || e === 95;
1412
1412
  }
1413
- function Mn(e) {
1414
- return Tt(e) || Ee(e) || e === 95;
1413
+ function Vn(e) {
1414
+ return bt(e) || Ne(e) || e === 95;
1415
1415
  }
1416
- function Bn(e) {
1416
+ function jn(e) {
1417
1417
  var t;
1418
1418
  let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
1419
1419
  for (let o = 0; o < e.length; ++o) {
1420
1420
  var s;
1421
- const a = e[o], u = Un(a);
1421
+ const a = e[o], u = $n(a);
1422
1422
  u !== a.length && (i = (s = i) !== null && s !== void 0 ? s : o, r = o, o !== 0 && u < n && (n = u));
1423
1423
  }
1424
1424
  return e.map((o, a) => a === 0 ? o : o.slice(n)).slice(
@@ -1426,28 +1426,28 @@ function Bn(e) {
1426
1426
  r + 1
1427
1427
  );
1428
1428
  }
1429
- function Un(e) {
1429
+ function $n(e) {
1430
1430
  let t = 0;
1431
- for (; t < e.length && Ye(e.charCodeAt(t)); )
1431
+ for (; t < e.length && Xe(e.charCodeAt(t)); )
1432
1432
  ++t;
1433
1433
  return t;
1434
1434
  }
1435
- function qn(e, t) {
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 || Ye(E.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, u = e.endsWith("\\"), c = a || u, l = (
1435
+ function Hn(e, t) {
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((y) => y.length === 0 || Xe(y.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, u = e.endsWith("\\"), c = a || u, l = (
1437
1437
  // add leading and trailing new lines only if it improves readability
1438
1438
  !r || e.length > 70 || c || s || o
1439
1439
  );
1440
1440
  let f = "";
1441
- const h = r && Ye(e.charCodeAt(0));
1442
- return (l && !h || s) && (f += `
1441
+ const d = r && Xe(e.charCodeAt(0));
1442
+ return (l && !d || s) && (f += `
1443
1443
  `), f += n, (l || c) && (f += `
1444
1444
  `), '"""' + f + '"""';
1445
1445
  }
1446
- var p;
1446
+ var m;
1447
1447
  (function(e) {
1448
1448
  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";
1449
- })(p || (p = {}));
1450
- class Vn {
1449
+ })(m || (m = {}));
1450
+ class Gn {
1451
1451
  /**
1452
1452
  * The previously focused non-ignored token.
1453
1453
  */
@@ -1461,7 +1461,7 @@ class Vn {
1461
1461
  * The character offset at which the current line begins.
1462
1462
  */
1463
1463
  constructor(t) {
1464
- const n = new vt(p.SOF, 0, 0, 0, 0);
1464
+ const n = new It(m.SOF, 0, 0, 0, 0);
1465
1465
  this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
1466
1466
  }
1467
1467
  get [Symbol.toStringTag]() {
@@ -1479,48 +1479,48 @@ class Vn {
1479
1479
  */
1480
1480
  lookahead() {
1481
1481
  let t = this.token;
1482
- if (t.kind !== p.EOF)
1482
+ if (t.kind !== m.EOF)
1483
1483
  do
1484
1484
  if (t.next)
1485
1485
  t = t.next;
1486
1486
  else {
1487
- const n = $n(this, t.end);
1487
+ const n = Jn(this, t.end);
1488
1488
  t.next = n, n.prev = t, t = n;
1489
1489
  }
1490
- while (t.kind === p.COMMENT);
1490
+ while (t.kind === m.COMMENT);
1491
1491
  return t;
1492
1492
  }
1493
1493
  }
1494
- function jn(e) {
1495
- 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;
1494
+ function Yn(e) {
1495
+ return e === m.BANG || e === m.DOLLAR || e === m.AMP || e === m.PAREN_L || e === m.PAREN_R || e === m.SPREAD || e === m.COLON || e === m.EQUALS || e === m.AT || e === m.BRACKET_L || e === m.BRACKET_R || e === m.BRACE_L || e === m.PIPE || e === m.BRACE_R;
1496
1496
  }
1497
- function le(e) {
1497
+ function pe(e) {
1498
1498
  return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
1499
1499
  }
1500
- function Ce(e, t) {
1501
- return It(e.charCodeAt(t)) && Ot(e.charCodeAt(t + 1));
1500
+ function Fe(e, t) {
1501
+ return Dt(e.charCodeAt(t)) && St(e.charCodeAt(t + 1));
1502
1502
  }
1503
- function It(e) {
1503
+ function Dt(e) {
1504
1504
  return e >= 55296 && e <= 56319;
1505
1505
  }
1506
- function Ot(e) {
1506
+ function St(e) {
1507
1507
  return e >= 56320 && e <= 57343;
1508
1508
  }
1509
- function re(e, t) {
1509
+ function oe(e, t) {
1510
1510
  const n = e.source.body.codePointAt(t);
1511
1511
  if (n === void 0)
1512
- return p.EOF;
1512
+ return m.EOF;
1513
1513
  if (n >= 32 && n <= 126) {
1514
1514
  const i = String.fromCodePoint(n);
1515
1515
  return i === '"' ? `'"'` : `"${i}"`;
1516
1516
  }
1517
1517
  return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
1518
1518
  }
1519
- function L(e, t, n, i, r) {
1519
+ function F(e, t, n, i, r) {
1520
1520
  const s = e.line, o = 1 + n - e.lineStart;
1521
- return new vt(t, n, i, s, o, r);
1521
+ return new It(t, n, i, s, o, r);
1522
1522
  }
1523
- function $n(e, t) {
1523
+ function Jn(e, t) {
1524
1524
  const n = e.source.body, i = n.length;
1525
1525
  let r = t;
1526
1526
  for (; r < i; ) {
@@ -1561,7 +1561,7 @@ function $n(e, t) {
1561
1561
  continue;
1562
1562
  // Comment
1563
1563
  case 35:
1564
- return Hn(e, r);
1564
+ return zn(e, r);
1565
1565
  // Token ::
1566
1566
  // - Punctuator
1567
1567
  // - Name
@@ -1571,169 +1571,169 @@ function $n(e, t) {
1571
1571
  //
1572
1572
  // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }
1573
1573
  case 33:
1574
- return L(e, p.BANG, r, r + 1);
1574
+ return F(e, m.BANG, r, r + 1);
1575
1575
  case 36:
1576
- return L(e, p.DOLLAR, r, r + 1);
1576
+ return F(e, m.DOLLAR, r, r + 1);
1577
1577
  case 38:
1578
- return L(e, p.AMP, r, r + 1);
1578
+ return F(e, m.AMP, r, r + 1);
1579
1579
  case 40:
1580
- return L(e, p.PAREN_L, r, r + 1);
1580
+ return F(e, m.PAREN_L, r, r + 1);
1581
1581
  case 41:
1582
- return L(e, p.PAREN_R, r, r + 1);
1582
+ return F(e, m.PAREN_R, r, r + 1);
1583
1583
  case 46:
1584
1584
  if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46)
1585
- return L(e, p.SPREAD, r, r + 3);
1585
+ return F(e, m.SPREAD, r, r + 3);
1586
1586
  break;
1587
1587
  case 58:
1588
- return L(e, p.COLON, r, r + 1);
1588
+ return F(e, m.COLON, r, r + 1);
1589
1589
  case 61:
1590
- return L(e, p.EQUALS, r, r + 1);
1590
+ return F(e, m.EQUALS, r, r + 1);
1591
1591
  case 64:
1592
- return L(e, p.AT, r, r + 1);
1592
+ return F(e, m.AT, r, r + 1);
1593
1593
  case 91:
1594
- return L(e, p.BRACKET_L, r, r + 1);
1594
+ return F(e, m.BRACKET_L, r, r + 1);
1595
1595
  case 93:
1596
- return L(e, p.BRACKET_R, r, r + 1);
1596
+ return F(e, m.BRACKET_R, r, r + 1);
1597
1597
  case 123:
1598
- return L(e, p.BRACE_L, r, r + 1);
1598
+ return F(e, m.BRACE_L, r, r + 1);
1599
1599
  case 124:
1600
- return L(e, p.PIPE, r, r + 1);
1600
+ return F(e, m.PIPE, r, r + 1);
1601
1601
  case 125:
1602
- return L(e, p.BRACE_R, r, r + 1);
1602
+ return F(e, m.BRACE_R, r, r + 1);
1603
1603
  // StringValue
1604
1604
  case 34:
1605
- return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Qn(e, r) : Yn(e, r);
1605
+ return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? ei(e, r) : Qn(e, r);
1606
1606
  }
1607
- if (Ee(s) || s === 45)
1608
- return Gn(e, r, s);
1609
- if (At(s))
1610
- return Zn(e, r);
1611
- throw P(
1607
+ if (Ne(s) || s === 45)
1608
+ return Xn(e, r, s);
1609
+ if (_t(s))
1610
+ return ti(e, r);
1611
+ throw M(
1612
1612
  e.source,
1613
1613
  r,
1614
- s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : le(s) || Ce(n, r) ? `Unexpected character: ${re(e, r)}.` : `Invalid character: ${re(e, r)}.`
1614
+ s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : pe(s) || Fe(n, r) ? `Unexpected character: ${oe(e, r)}.` : `Invalid character: ${oe(e, r)}.`
1615
1615
  );
1616
1616
  }
1617
- return L(e, p.EOF, i, i);
1617
+ return F(e, m.EOF, i, i);
1618
1618
  }
1619
- function Hn(e, t) {
1619
+ function zn(e, t) {
1620
1620
  const n = e.source.body, i = n.length;
1621
1621
  let r = t + 1;
1622
1622
  for (; r < i; ) {
1623
1623
  const s = n.charCodeAt(r);
1624
1624
  if (s === 10 || s === 13)
1625
1625
  break;
1626
- if (le(s))
1626
+ if (pe(s))
1627
1627
  ++r;
1628
- else if (Ce(n, r))
1628
+ else if (Fe(n, r))
1629
1629
  r += 2;
1630
1630
  else
1631
1631
  break;
1632
1632
  }
1633
- return L(
1633
+ return F(
1634
1634
  e,
1635
- p.COMMENT,
1635
+ m.COMMENT,
1636
1636
  t,
1637
1637
  r,
1638
1638
  n.slice(t + 1, r)
1639
1639
  );
1640
1640
  }
1641
- function Gn(e, t, n) {
1641
+ function Xn(e, t, n) {
1642
1642
  const i = e.source.body;
1643
1643
  let r = t, s = n, o = !1;
1644
1644
  if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
1645
- if (s = i.charCodeAt(++r), Ee(s))
1646
- throw P(
1645
+ if (s = i.charCodeAt(++r), Ne(s))
1646
+ throw M(
1647
1647
  e.source,
1648
1648
  r,
1649
- `Invalid number, unexpected digit after 0: ${re(
1649
+ `Invalid number, unexpected digit after 0: ${oe(
1650
1650
  e,
1651
1651
  r
1652
1652
  )}.`
1653
1653
  );
1654
1654
  } else
1655
- r = Le(e, r, s), s = i.charCodeAt(r);
1656
- if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = Le(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = Le(e, r, s), s = i.charCodeAt(r)), s === 46 || At(s))
1657
- throw P(
1655
+ r = Be(e, r, s), s = i.charCodeAt(r);
1656
+ if (s === 46 && (o = !0, s = i.charCodeAt(++r), r = Be(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (o = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = Be(e, r, s), s = i.charCodeAt(r)), s === 46 || _t(s))
1657
+ throw M(
1658
1658
  e.source,
1659
1659
  r,
1660
- `Invalid number, expected digit but got: ${re(
1660
+ `Invalid number, expected digit but got: ${oe(
1661
1661
  e,
1662
1662
  r
1663
1663
  )}.`
1664
1664
  );
1665
- return L(
1665
+ return F(
1666
1666
  e,
1667
- o ? p.FLOAT : p.INT,
1667
+ o ? m.FLOAT : m.INT,
1668
1668
  t,
1669
1669
  r,
1670
1670
  i.slice(t, r)
1671
1671
  );
1672
1672
  }
1673
- function Le(e, t, n) {
1674
- if (!Ee(n))
1675
- throw P(
1673
+ function Be(e, t, n) {
1674
+ if (!Ne(n))
1675
+ throw M(
1676
1676
  e.source,
1677
1677
  t,
1678
- `Invalid number, expected digit but got: ${re(
1678
+ `Invalid number, expected digit but got: ${oe(
1679
1679
  e,
1680
1680
  t
1681
1681
  )}.`
1682
1682
  );
1683
1683
  const i = e.source.body;
1684
1684
  let r = t + 1;
1685
- for (; Ee(i.charCodeAt(r)); )
1685
+ for (; Ne(i.charCodeAt(r)); )
1686
1686
  ++r;
1687
1687
  return r;
1688
1688
  }
1689
- function Yn(e, t) {
1689
+ function Qn(e, t) {
1690
1690
  const n = e.source.body, i = n.length;
1691
1691
  let r = t + 1, s = r, o = "";
1692
1692
  for (; r < i; ) {
1693
1693
  const a = n.charCodeAt(r);
1694
1694
  if (a === 34)
1695
- return o += n.slice(s, r), L(e, p.STRING, t, r + 1, o);
1695
+ return o += n.slice(s, r), F(e, m.STRING, t, r + 1, o);
1696
1696
  if (a === 92) {
1697
1697
  o += n.slice(s, r);
1698
- const u = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Jn(e, r) : zn(e, r) : Xn(e, r);
1698
+ const u = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Zn(e, r) : Wn(e, r) : Kn(e, r);
1699
1699
  o += u.value, r += u.size, s = r;
1700
1700
  continue;
1701
1701
  }
1702
1702
  if (a === 10 || a === 13)
1703
1703
  break;
1704
- if (le(a))
1704
+ if (pe(a))
1705
1705
  ++r;
1706
- else if (Ce(n, r))
1706
+ else if (Fe(n, r))
1707
1707
  r += 2;
1708
1708
  else
1709
- throw P(
1709
+ throw M(
1710
1710
  e.source,
1711
1711
  r,
1712
- `Invalid character within String: ${re(
1712
+ `Invalid character within String: ${oe(
1713
1713
  e,
1714
1714
  r
1715
1715
  )}.`
1716
1716
  );
1717
1717
  }
1718
- throw P(e.source, r, "Unterminated string.");
1718
+ throw M(e.source, r, "Unterminated string.");
1719
1719
  }
1720
- function Jn(e, t) {
1720
+ function Zn(e, t) {
1721
1721
  const n = e.source.body;
1722
1722
  let i = 0, r = 3;
1723
1723
  for (; r < 12; ) {
1724
1724
  const s = n.charCodeAt(t + r++);
1725
1725
  if (s === 125) {
1726
- if (r < 5 || !le(i))
1726
+ if (r < 5 || !pe(i))
1727
1727
  break;
1728
1728
  return {
1729
1729
  value: String.fromCodePoint(i),
1730
1730
  size: r
1731
1731
  };
1732
1732
  }
1733
- if (i = i << 4 | de(s), i < 0)
1733
+ if (i = i << 4 | ge(s), i < 0)
1734
1734
  break;
1735
1735
  }
1736
- throw P(
1736
+ throw M(
1737
1737
  e.source,
1738
1738
  t,
1739
1739
  `Invalid Unicode escape sequence: "${n.slice(
@@ -1742,34 +1742,34 @@ function Jn(e, t) {
1742
1742
  )}".`
1743
1743
  );
1744
1744
  }
1745
- function zn(e, t) {
1746
- const n = e.source.body, i = it(n, t + 2);
1747
- if (le(i))
1745
+ function Wn(e, t) {
1746
+ const n = e.source.body, i = at(n, t + 2);
1747
+ if (pe(i))
1748
1748
  return {
1749
1749
  value: String.fromCodePoint(i),
1750
1750
  size: 6
1751
1751
  };
1752
- if (It(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
1753
- const r = it(n, t + 8);
1754
- if (Ot(r))
1752
+ if (Dt(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
1753
+ const r = at(n, t + 8);
1754
+ if (St(r))
1755
1755
  return {
1756
1756
  value: String.fromCodePoint(i, r),
1757
1757
  size: 12
1758
1758
  };
1759
1759
  }
1760
- throw P(
1760
+ throw M(
1761
1761
  e.source,
1762
1762
  t,
1763
1763
  `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
1764
1764
  );
1765
1765
  }
1766
- function it(e, t) {
1767
- return de(e.charCodeAt(t)) << 12 | de(e.charCodeAt(t + 1)) << 8 | de(e.charCodeAt(t + 2)) << 4 | de(e.charCodeAt(t + 3));
1766
+ function at(e, t) {
1767
+ return ge(e.charCodeAt(t)) << 12 | ge(e.charCodeAt(t + 1)) << 8 | ge(e.charCodeAt(t + 2)) << 4 | ge(e.charCodeAt(t + 3));
1768
1768
  }
1769
- function de(e) {
1769
+ function ge(e) {
1770
1770
  return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
1771
1771
  }
1772
- function Xn(e, t) {
1772
+ function Kn(e, t) {
1773
1773
  const n = e.source.body;
1774
1774
  switch (n.charCodeAt(t + 1)) {
1775
1775
  case 34:
@@ -1814,7 +1814,7 @@ function Xn(e, t) {
1814
1814
  size: 2
1815
1815
  };
1816
1816
  }
1817
- throw P(
1817
+ throw M(
1818
1818
  e.source,
1819
1819
  t,
1820
1820
  `Invalid character escape sequence: "${n.slice(
@@ -1823,7 +1823,7 @@ function Xn(e, t) {
1823
1823
  )}".`
1824
1824
  );
1825
1825
  }
1826
- function Qn(e, t) {
1826
+ function ei(e, t) {
1827
1827
  const n = e.source.body, i = n.length;
1828
1828
  let r = e.lineStart, s = t + 3, o = s, a = "";
1829
1829
  const u = [];
@@ -1831,13 +1831,13 @@ function Qn(e, t) {
1831
1831
  const c = n.charCodeAt(s);
1832
1832
  if (c === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
1833
1833
  a += n.slice(o, s), u.push(a);
1834
- const l = L(
1834
+ const l = F(
1835
1835
  e,
1836
- p.BLOCK_STRING,
1836
+ m.BLOCK_STRING,
1837
1837
  t,
1838
1838
  s + 3,
1839
1839
  // Return a string of the lines joined with U+000A.
1840
- Bn(u).join(`
1840
+ jn(u).join(`
1841
1841
  `)
1842
1842
  );
1843
1843
  return e.line += u.length - 1, e.lineStart = r, l;
@@ -1850,90 +1850,90 @@ function Qn(e, t) {
1850
1850
  a += n.slice(o, s), u.push(a), c === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, a = "", o = s, r = s;
1851
1851
  continue;
1852
1852
  }
1853
- if (le(c))
1853
+ if (pe(c))
1854
1854
  ++s;
1855
- else if (Ce(n, s))
1855
+ else if (Fe(n, s))
1856
1856
  s += 2;
1857
1857
  else
1858
- throw P(
1858
+ throw M(
1859
1859
  e.source,
1860
1860
  s,
1861
- `Invalid character within String: ${re(
1861
+ `Invalid character within String: ${oe(
1862
1862
  e,
1863
1863
  s
1864
1864
  )}.`
1865
1865
  );
1866
1866
  }
1867
- throw P(e.source, s, "Unterminated string.");
1867
+ throw M(e.source, s, "Unterminated string.");
1868
1868
  }
1869
- function Zn(e, t) {
1869
+ function ti(e, t) {
1870
1870
  const n = e.source.body, i = n.length;
1871
1871
  let r = t + 1;
1872
1872
  for (; r < i; ) {
1873
1873
  const s = n.charCodeAt(r);
1874
- if (Mn(s))
1874
+ if (Vn(s))
1875
1875
  ++r;
1876
1876
  else
1877
1877
  break;
1878
1878
  }
1879
- return L(
1879
+ return F(
1880
1880
  e,
1881
- p.NAME,
1881
+ m.NAME,
1882
1882
  t,
1883
1883
  r,
1884
1884
  n.slice(t, r)
1885
1885
  );
1886
1886
  }
1887
- const Wn = 10, _t = 2;
1888
- function Qe(e) {
1889
- return ke(e, []);
1887
+ const ni = 10, xt = 2;
1888
+ function Ke(e) {
1889
+ return Pe(e, []);
1890
1890
  }
1891
- function ke(e, t) {
1891
+ function Pe(e, t) {
1892
1892
  switch (typeof e) {
1893
1893
  case "string":
1894
1894
  return JSON.stringify(e);
1895
1895
  case "function":
1896
1896
  return e.name ? `[function ${e.name}]` : "[function]";
1897
1897
  case "object":
1898
- return Kn(e, t);
1898
+ return ii(e, t);
1899
1899
  default:
1900
1900
  return String(e);
1901
1901
  }
1902
1902
  }
1903
- function Kn(e, t) {
1903
+ function ii(e, t) {
1904
1904
  if (e === null)
1905
1905
  return "null";
1906
1906
  if (t.includes(e))
1907
1907
  return "[Circular]";
1908
1908
  const n = [...t, e];
1909
- if (ei(e)) {
1909
+ if (ri(e)) {
1910
1910
  const i = e.toJSON();
1911
1911
  if (i !== e)
1912
- return typeof i == "string" ? i : ke(i, n);
1912
+ return typeof i == "string" ? i : Pe(i, n);
1913
1913
  } else if (Array.isArray(e))
1914
- return ni(e, n);
1915
- return ti(e, n);
1914
+ return oi(e, n);
1915
+ return si(e, n);
1916
1916
  }
1917
- function ei(e) {
1917
+ function ri(e) {
1918
1918
  return typeof e.toJSON == "function";
1919
1919
  }
1920
- function ti(e, t) {
1920
+ function si(e, t) {
1921
1921
  const n = Object.entries(e);
1922
- return n.length === 0 ? "{}" : t.length > _t ? "[" + ii(e) + "]" : "{ " + n.map(
1923
- ([r, s]) => r + ": " + ke(s, t)
1922
+ return n.length === 0 ? "{}" : t.length > xt ? "[" + ai(e) + "]" : "{ " + n.map(
1923
+ ([r, s]) => r + ": " + Pe(s, t)
1924
1924
  ).join(", ") + " }";
1925
1925
  }
1926
- function ni(e, t) {
1926
+ function oi(e, t) {
1927
1927
  if (e.length === 0)
1928
1928
  return "[]";
1929
- if (t.length > _t)
1929
+ if (t.length > xt)
1930
1930
  return "[Array]";
1931
- const n = Math.min(Wn, e.length), i = e.length - n, r = [];
1931
+ const n = Math.min(ni, e.length), i = e.length - n, r = [];
1932
1932
  for (let s = 0; s < n; ++s)
1933
- r.push(ke(e[s], t));
1933
+ r.push(Pe(e[s], t));
1934
1934
  return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
1935
1935
  }
1936
- function ii(e) {
1936
+ function ai(e) {
1937
1937
  const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
1938
1938
  if (t === "Object" && typeof e.constructor == "function") {
1939
1939
  const n = e.constructor.name;
@@ -1942,7 +1942,7 @@ function ii(e) {
1942
1942
  }
1943
1943
  return t;
1944
1944
  }
1945
- const ri = (
1945
+ const ci = (
1946
1946
  /* c8 ignore next 6 */
1947
1947
  // FIXME: https://github.com/graphql/graphql-js/issues/2317
1948
1948
  // eslint-disable-next-line no-undef
@@ -1958,7 +1958,7 @@ const ri = (
1958
1958
  Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name
1959
1959
  );
1960
1960
  if (r === s) {
1961
- const o = Qe(t);
1961
+ const o = Ke(t);
1962
1962
  throw new Error(`Cannot use ${r} "${o}" from another module or realm.
1963
1963
 
1964
1964
  Ensure that there is only one instance of "graphql" in the node_modules
@@ -1976,15 +1976,15 @@ spurious results.`);
1976
1976
  return !1;
1977
1977
  }
1978
1978
  );
1979
- class Dt {
1979
+ class Ct {
1980
1980
  constructor(t, n = "GraphQL request", i = {
1981
1981
  line: 1,
1982
1982
  column: 1
1983
1983
  }) {
1984
- 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(
1984
+ typeof t == "string" || Oe(!1, `Body must be a string. Received: ${Ke(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || Oe(
1985
1985
  !1,
1986
1986
  "line in locationOffset is 1-indexed and must be positive."
1987
- ), this.locationOffset.column > 0 || we(
1987
+ ), this.locationOffset.column > 0 || Oe(
1988
1988
  !1,
1989
1989
  "column in locationOffset is 1-indexed and must be positive."
1990
1990
  );
@@ -1993,24 +1993,24 @@ class Dt {
1993
1993
  return "Source";
1994
1994
  }
1995
1995
  }
1996
- function si(e) {
1997
- return ri(e, Dt);
1996
+ function ui(e) {
1997
+ return ci(e, Ct);
1998
1998
  }
1999
- function oi(e, t) {
2000
- return new ai(e, t).parseDocument();
1999
+ function li(e, t) {
2000
+ return new fi(e, t).parseDocument();
2001
2001
  }
2002
- class ai {
2002
+ class fi {
2003
2003
  constructor(t, n = {}) {
2004
- const i = si(t) ? t : new Dt(t);
2005
- this._lexer = new Vn(i), this._options = n, this._tokenCounter = 0;
2004
+ const i = ui(t) ? t : new Ct(t);
2005
+ this._lexer = new Gn(i), this._options = n, this._tokenCounter = 0;
2006
2006
  }
2007
2007
  /**
2008
2008
  * Converts a name lex token into a name parse node.
2009
2009
  */
2010
2010
  parseName() {
2011
- const t = this.expectToken(p.NAME);
2011
+ const t = this.expectToken(m.NAME);
2012
2012
  return this.node(t, {
2013
- kind: I.NAME,
2013
+ kind: A.NAME,
2014
2014
  value: t.value
2015
2015
  });
2016
2016
  }
@@ -2020,11 +2020,11 @@ class ai {
2020
2020
  */
2021
2021
  parseDocument() {
2022
2022
  return this.node(this._lexer.token, {
2023
- kind: I.DOCUMENT,
2023
+ kind: A.DOCUMENT,
2024
2024
  definitions: this.many(
2025
- p.SOF,
2025
+ m.SOF,
2026
2026
  this.parseDefinition,
2027
- p.EOF
2027
+ m.EOF
2028
2028
  )
2029
2029
  });
2030
2030
  }
@@ -2052,10 +2052,10 @@ class ai {
2052
2052
  * - InputObjectTypeDefinition
2053
2053
  */
2054
2054
  parseDefinition() {
2055
- if (this.peek(p.BRACE_L))
2055
+ if (this.peek(m.BRACE_L))
2056
2056
  return this.parseOperationDefinition();
2057
2057
  const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
2058
- if (n.kind === p.NAME) {
2058
+ if (n.kind === m.NAME) {
2059
2059
  switch (n.value) {
2060
2060
  case "schema":
2061
2061
  return this.parseSchemaDefinition();
@@ -2075,7 +2075,7 @@ class ai {
2075
2075
  return this.parseDirectiveDefinition();
2076
2076
  }
2077
2077
  if (t)
2078
- throw P(
2078
+ throw M(
2079
2079
  this._lexer.source,
2080
2080
  this._lexer.token.start,
2081
2081
  "Unexpected description, descriptions are supported only on type definitions."
@@ -2101,10 +2101,10 @@ class ai {
2101
2101
  */
2102
2102
  parseOperationDefinition() {
2103
2103
  const t = this._lexer.token;
2104
- if (this.peek(p.BRACE_L))
2104
+ if (this.peek(m.BRACE_L))
2105
2105
  return this.node(t, {
2106
- kind: I.OPERATION_DEFINITION,
2107
- operation: ae.QUERY,
2106
+ kind: A.OPERATION_DEFINITION,
2107
+ operation: fe.QUERY,
2108
2108
  name: void 0,
2109
2109
  variableDefinitions: [],
2110
2110
  directives: [],
@@ -2112,8 +2112,8 @@ class ai {
2112
2112
  });
2113
2113
  const n = this.parseOperationType();
2114
2114
  let i;
2115
- return this.peek(p.NAME) && (i = this.parseName()), this.node(t, {
2116
- kind: I.OPERATION_DEFINITION,
2115
+ return this.peek(m.NAME) && (i = this.parseName()), this.node(t, {
2116
+ kind: A.OPERATION_DEFINITION,
2117
2117
  operation: n,
2118
2118
  name: i,
2119
2119
  variableDefinitions: this.parseVariableDefinitions(),
@@ -2125,14 +2125,14 @@ class ai {
2125
2125
  * OperationType : one of query mutation subscription
2126
2126
  */
2127
2127
  parseOperationType() {
2128
- const t = this.expectToken(p.NAME);
2128
+ const t = this.expectToken(m.NAME);
2129
2129
  switch (t.value) {
2130
2130
  case "query":
2131
- return ae.QUERY;
2131
+ return fe.QUERY;
2132
2132
  case "mutation":
2133
- return ae.MUTATION;
2133
+ return fe.MUTATION;
2134
2134
  case "subscription":
2135
- return ae.SUBSCRIPTION;
2135
+ return fe.SUBSCRIPTION;
2136
2136
  }
2137
2137
  throw this.unexpected(t);
2138
2138
  }
@@ -2141,9 +2141,9 @@ class ai {
2141
2141
  */
2142
2142
  parseVariableDefinitions() {
2143
2143
  return this.optionalMany(
2144
- p.PAREN_L,
2144
+ m.PAREN_L,
2145
2145
  this.parseVariableDefinition,
2146
- p.PAREN_R
2146
+ m.PAREN_R
2147
2147
  );
2148
2148
  }
2149
2149
  /**
@@ -2151,10 +2151,10 @@ class ai {
2151
2151
  */
2152
2152
  parseVariableDefinition() {
2153
2153
  return this.node(this._lexer.token, {
2154
- kind: I.VARIABLE_DEFINITION,
2154
+ kind: A.VARIABLE_DEFINITION,
2155
2155
  variable: this.parseVariable(),
2156
- type: (this.expectToken(p.COLON), this.parseTypeReference()),
2157
- defaultValue: this.expectOptionalToken(p.EQUALS) ? this.parseConstValueLiteral() : void 0,
2156
+ type: (this.expectToken(m.COLON), this.parseTypeReference()),
2157
+ defaultValue: this.expectOptionalToken(m.EQUALS) ? this.parseConstValueLiteral() : void 0,
2158
2158
  directives: this.parseConstDirectives()
2159
2159
  });
2160
2160
  }
@@ -2163,8 +2163,8 @@ class ai {
2163
2163
  */
2164
2164
  parseVariable() {
2165
2165
  const t = this._lexer.token;
2166
- return this.expectToken(p.DOLLAR), this.node(t, {
2167
- kind: I.VARIABLE,
2166
+ return this.expectToken(m.DOLLAR), this.node(t, {
2167
+ kind: A.VARIABLE,
2168
2168
  name: this.parseName()
2169
2169
  });
2170
2170
  }
@@ -2175,11 +2175,11 @@ class ai {
2175
2175
  */
2176
2176
  parseSelectionSet() {
2177
2177
  return this.node(this._lexer.token, {
2178
- kind: I.SELECTION_SET,
2178
+ kind: A.SELECTION_SET,
2179
2179
  selections: this.many(
2180
- p.BRACE_L,
2180
+ m.BRACE_L,
2181
2181
  this.parseSelection,
2182
- p.BRACE_R
2182
+ m.BRACE_R
2183
2183
  )
2184
2184
  });
2185
2185
  }
@@ -2190,7 +2190,7 @@ class ai {
2190
2190
  * - InlineFragment
2191
2191
  */
2192
2192
  parseSelection() {
2193
- return this.peek(p.SPREAD) ? this.parseFragment() : this.parseField();
2193
+ return this.peek(m.SPREAD) ? this.parseFragment() : this.parseField();
2194
2194
  }
2195
2195
  /**
2196
2196
  * Field : Alias? Name Arguments? Directives? SelectionSet?
@@ -2200,13 +2200,13 @@ class ai {
2200
2200
  parseField() {
2201
2201
  const t = this._lexer.token, n = this.parseName();
2202
2202
  let i, r;
2203
- return this.expectOptionalToken(p.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
2204
- kind: I.FIELD,
2203
+ return this.expectOptionalToken(m.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
2204
+ kind: A.FIELD,
2205
2205
  alias: i,
2206
2206
  name: r,
2207
2207
  arguments: this.parseArguments(!1),
2208
2208
  directives: this.parseDirectives(!1),
2209
- selectionSet: this.peek(p.BRACE_L) ? this.parseSelectionSet() : void 0
2209
+ selectionSet: this.peek(m.BRACE_L) ? this.parseSelectionSet() : void 0
2210
2210
  });
2211
2211
  }
2212
2212
  /**
@@ -2214,15 +2214,15 @@ class ai {
2214
2214
  */
2215
2215
  parseArguments(t) {
2216
2216
  const n = t ? this.parseConstArgument : this.parseArgument;
2217
- return this.optionalMany(p.PAREN_L, n, p.PAREN_R);
2217
+ return this.optionalMany(m.PAREN_L, n, m.PAREN_R);
2218
2218
  }
2219
2219
  /**
2220
2220
  * Argument[Const] : Name : Value[?Const]
2221
2221
  */
2222
2222
  parseArgument(t = !1) {
2223
2223
  const n = this._lexer.token, i = this.parseName();
2224
- return this.expectToken(p.COLON), this.node(n, {
2225
- kind: I.ARGUMENT,
2224
+ return this.expectToken(m.COLON), this.node(n, {
2225
+ kind: A.ARGUMENT,
2226
2226
  name: i,
2227
2227
  value: this.parseValueLiteral(t)
2228
2228
  });
@@ -2240,14 +2240,14 @@ class ai {
2240
2240
  */
2241
2241
  parseFragment() {
2242
2242
  const t = this._lexer.token;
2243
- this.expectToken(p.SPREAD);
2243
+ this.expectToken(m.SPREAD);
2244
2244
  const n = this.expectOptionalKeyword("on");
2245
- return !n && this.peek(p.NAME) ? this.node(t, {
2246
- kind: I.FRAGMENT_SPREAD,
2245
+ return !n && this.peek(m.NAME) ? this.node(t, {
2246
+ kind: A.FRAGMENT_SPREAD,
2247
2247
  name: this.parseFragmentName(),
2248
2248
  directives: this.parseDirectives(!1)
2249
2249
  }) : this.node(t, {
2250
- kind: I.INLINE_FRAGMENT,
2250
+ kind: A.INLINE_FRAGMENT,
2251
2251
  typeCondition: n ? this.parseNamedType() : void 0,
2252
2252
  directives: this.parseDirectives(!1),
2253
2253
  selectionSet: this.parseSelectionSet()
@@ -2262,14 +2262,14 @@ class ai {
2262
2262
  parseFragmentDefinition() {
2263
2263
  const t = this._lexer.token;
2264
2264
  return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
2265
- kind: I.FRAGMENT_DEFINITION,
2265
+ kind: A.FRAGMENT_DEFINITION,
2266
2266
  name: this.parseFragmentName(),
2267
2267
  variableDefinitions: this.parseVariableDefinitions(),
2268
2268
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
2269
2269
  directives: this.parseDirectives(!1),
2270
2270
  selectionSet: this.parseSelectionSet()
2271
2271
  }) : this.node(t, {
2272
- kind: I.FRAGMENT_DEFINITION,
2272
+ kind: A.FRAGMENT_DEFINITION,
2273
2273
  name: this.parseFragmentName(),
2274
2274
  typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
2275
2275
  directives: this.parseDirectives(!1),
@@ -2306,50 +2306,50 @@ class ai {
2306
2306
  parseValueLiteral(t) {
2307
2307
  const n = this._lexer.token;
2308
2308
  switch (n.kind) {
2309
- case p.BRACKET_L:
2309
+ case m.BRACKET_L:
2310
2310
  return this.parseList(t);
2311
- case p.BRACE_L:
2311
+ case m.BRACE_L:
2312
2312
  return this.parseObject(t);
2313
- case p.INT:
2313
+ case m.INT:
2314
2314
  return this.advanceLexer(), this.node(n, {
2315
- kind: I.INT,
2315
+ kind: A.INT,
2316
2316
  value: n.value
2317
2317
  });
2318
- case p.FLOAT:
2318
+ case m.FLOAT:
2319
2319
  return this.advanceLexer(), this.node(n, {
2320
- kind: I.FLOAT,
2320
+ kind: A.FLOAT,
2321
2321
  value: n.value
2322
2322
  });
2323
- case p.STRING:
2324
- case p.BLOCK_STRING:
2323
+ case m.STRING:
2324
+ case m.BLOCK_STRING:
2325
2325
  return this.parseStringLiteral();
2326
- case p.NAME:
2326
+ case m.NAME:
2327
2327
  switch (this.advanceLexer(), n.value) {
2328
2328
  case "true":
2329
2329
  return this.node(n, {
2330
- kind: I.BOOLEAN,
2330
+ kind: A.BOOLEAN,
2331
2331
  value: !0
2332
2332
  });
2333
2333
  case "false":
2334
2334
  return this.node(n, {
2335
- kind: I.BOOLEAN,
2335
+ kind: A.BOOLEAN,
2336
2336
  value: !1
2337
2337
  });
2338
2338
  case "null":
2339
2339
  return this.node(n, {
2340
- kind: I.NULL
2340
+ kind: A.NULL
2341
2341
  });
2342
2342
  default:
2343
2343
  return this.node(n, {
2344
- kind: I.ENUM,
2344
+ kind: A.ENUM,
2345
2345
  value: n.value
2346
2346
  });
2347
2347
  }
2348
- case p.DOLLAR:
2348
+ case m.DOLLAR:
2349
2349
  if (t)
2350
- if (this.expectToken(p.DOLLAR), this._lexer.token.kind === p.NAME) {
2350
+ if (this.expectToken(m.DOLLAR), this._lexer.token.kind === m.NAME) {
2351
2351
  const i = this._lexer.token.value;
2352
- throw P(
2352
+ throw M(
2353
2353
  this._lexer.source,
2354
2354
  n.start,
2355
2355
  `Unexpected variable "$${i}" in constant value.`
@@ -2367,9 +2367,9 @@ class ai {
2367
2367
  parseStringLiteral() {
2368
2368
  const t = this._lexer.token;
2369
2369
  return this.advanceLexer(), this.node(t, {
2370
- kind: I.STRING,
2370
+ kind: A.STRING,
2371
2371
  value: t.value,
2372
- block: t.kind === p.BLOCK_STRING
2372
+ block: t.kind === m.BLOCK_STRING
2373
2373
  });
2374
2374
  }
2375
2375
  /**
@@ -2380,8 +2380,8 @@ class ai {
2380
2380
  parseList(t) {
2381
2381
  const n = () => this.parseValueLiteral(t);
2382
2382
  return this.node(this._lexer.token, {
2383
- kind: I.LIST,
2384
- values: this.any(p.BRACKET_L, n, p.BRACKET_R)
2383
+ kind: A.LIST,
2384
+ values: this.any(m.BRACKET_L, n, m.BRACKET_R)
2385
2385
  });
2386
2386
  }
2387
2387
  /**
@@ -2394,8 +2394,8 @@ class ai {
2394
2394
  parseObject(t) {
2395
2395
  const n = () => this.parseObjectField(t);
2396
2396
  return this.node(this._lexer.token, {
2397
- kind: I.OBJECT,
2398
- fields: this.any(p.BRACE_L, n, p.BRACE_R)
2397
+ kind: A.OBJECT,
2398
+ fields: this.any(m.BRACE_L, n, m.BRACE_R)
2399
2399
  });
2400
2400
  }
2401
2401
  /**
@@ -2403,8 +2403,8 @@ class ai {
2403
2403
  */
2404
2404
  parseObjectField(t) {
2405
2405
  const n = this._lexer.token, i = this.parseName();
2406
- return this.expectToken(p.COLON), this.node(n, {
2407
- kind: I.OBJECT_FIELD,
2406
+ return this.expectToken(m.COLON), this.node(n, {
2407
+ kind: A.OBJECT_FIELD,
2408
2408
  name: i,
2409
2409
  value: this.parseValueLiteral(t)
2410
2410
  });
@@ -2415,7 +2415,7 @@ class ai {
2415
2415
  */
2416
2416
  parseDirectives(t) {
2417
2417
  const n = [];
2418
- for (; this.peek(p.AT); )
2418
+ for (; this.peek(m.AT); )
2419
2419
  n.push(this.parseDirective(t));
2420
2420
  return n;
2421
2421
  }
@@ -2429,8 +2429,8 @@ class ai {
2429
2429
  */
2430
2430
  parseDirective(t) {
2431
2431
  const n = this._lexer.token;
2432
- return this.expectToken(p.AT), this.node(n, {
2433
- kind: I.DIRECTIVE,
2432
+ return this.expectToken(m.AT), this.node(n, {
2433
+ kind: A.DIRECTIVE,
2434
2434
  name: this.parseName(),
2435
2435
  arguments: this.parseArguments(t)
2436
2436
  });
@@ -2445,16 +2445,16 @@ class ai {
2445
2445
  parseTypeReference() {
2446
2446
  const t = this._lexer.token;
2447
2447
  let n;
2448
- if (this.expectOptionalToken(p.BRACKET_L)) {
2448
+ if (this.expectOptionalToken(m.BRACKET_L)) {
2449
2449
  const i = this.parseTypeReference();
2450
- this.expectToken(p.BRACKET_R), n = this.node(t, {
2451
- kind: I.LIST_TYPE,
2450
+ this.expectToken(m.BRACKET_R), n = this.node(t, {
2451
+ kind: A.LIST_TYPE,
2452
2452
  type: i
2453
2453
  });
2454
2454
  } else
2455
2455
  n = this.parseNamedType();
2456
- return this.expectOptionalToken(p.BANG) ? this.node(t, {
2457
- kind: I.NON_NULL_TYPE,
2456
+ return this.expectOptionalToken(m.BANG) ? this.node(t, {
2457
+ kind: A.NON_NULL_TYPE,
2458
2458
  type: n
2459
2459
  }) : n;
2460
2460
  }
@@ -2463,13 +2463,13 @@ class ai {
2463
2463
  */
2464
2464
  parseNamedType() {
2465
2465
  return this.node(this._lexer.token, {
2466
- kind: I.NAMED_TYPE,
2466
+ kind: A.NAMED_TYPE,
2467
2467
  name: this.parseName()
2468
2468
  });
2469
2469
  }
2470
2470
  // Implements the parsing rules in the Type Definition section.
2471
2471
  peekDescription() {
2472
- return this.peek(p.STRING) || this.peek(p.BLOCK_STRING);
2472
+ return this.peek(m.STRING) || this.peek(m.BLOCK_STRING);
2473
2473
  }
2474
2474
  /**
2475
2475
  * Description : StringValue
@@ -2487,12 +2487,12 @@ class ai {
2487
2487
  const t = this._lexer.token, n = this.parseDescription();
2488
2488
  this.expectKeyword("schema");
2489
2489
  const i = this.parseConstDirectives(), r = this.many(
2490
- p.BRACE_L,
2490
+ m.BRACE_L,
2491
2491
  this.parseOperationTypeDefinition,
2492
- p.BRACE_R
2492
+ m.BRACE_R
2493
2493
  );
2494
2494
  return this.node(t, {
2495
- kind: I.SCHEMA_DEFINITION,
2495
+ kind: A.SCHEMA_DEFINITION,
2496
2496
  description: n,
2497
2497
  directives: i,
2498
2498
  operationTypes: r
@@ -2503,10 +2503,10 @@ class ai {
2503
2503
  */
2504
2504
  parseOperationTypeDefinition() {
2505
2505
  const t = this._lexer.token, n = this.parseOperationType();
2506
- this.expectToken(p.COLON);
2506
+ this.expectToken(m.COLON);
2507
2507
  const i = this.parseNamedType();
2508
2508
  return this.node(t, {
2509
- kind: I.OPERATION_TYPE_DEFINITION,
2509
+ kind: A.OPERATION_TYPE_DEFINITION,
2510
2510
  operation: n,
2511
2511
  type: i
2512
2512
  });
@@ -2519,7 +2519,7 @@ class ai {
2519
2519
  this.expectKeyword("scalar");
2520
2520
  const i = this.parseName(), r = this.parseConstDirectives();
2521
2521
  return this.node(t, {
2522
- kind: I.SCALAR_TYPE_DEFINITION,
2522
+ kind: A.SCALAR_TYPE_DEFINITION,
2523
2523
  description: n,
2524
2524
  name: i,
2525
2525
  directives: r
@@ -2535,7 +2535,7 @@ class ai {
2535
2535
  this.expectKeyword("type");
2536
2536
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
2537
2537
  return this.node(t, {
2538
- kind: I.OBJECT_TYPE_DEFINITION,
2538
+ kind: A.OBJECT_TYPE_DEFINITION,
2539
2539
  description: n,
2540
2540
  name: i,
2541
2541
  interfaces: r,
@@ -2549,7 +2549,7 @@ class ai {
2549
2549
  * - ImplementsInterfaces & NamedType
2550
2550
  */
2551
2551
  parseImplementsInterfaces() {
2552
- return this.expectOptionalKeyword("implements") ? this.delimitedMany(p.AMP, this.parseNamedType) : [];
2552
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(m.AMP, this.parseNamedType) : [];
2553
2553
  }
2554
2554
  /**
2555
2555
  * ```
@@ -2558,9 +2558,9 @@ class ai {
2558
2558
  */
2559
2559
  parseFieldsDefinition() {
2560
2560
  return this.optionalMany(
2561
- p.BRACE_L,
2561
+ m.BRACE_L,
2562
2562
  this.parseFieldDefinition,
2563
- p.BRACE_R
2563
+ m.BRACE_R
2564
2564
  );
2565
2565
  }
2566
2566
  /**
@@ -2569,10 +2569,10 @@ class ai {
2569
2569
  */
2570
2570
  parseFieldDefinition() {
2571
2571
  const t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
2572
- this.expectToken(p.COLON);
2572
+ this.expectToken(m.COLON);
2573
2573
  const s = this.parseTypeReference(), o = this.parseConstDirectives();
2574
2574
  return this.node(t, {
2575
- kind: I.FIELD_DEFINITION,
2575
+ kind: A.FIELD_DEFINITION,
2576
2576
  description: n,
2577
2577
  name: i,
2578
2578
  arguments: r,
@@ -2585,9 +2585,9 @@ class ai {
2585
2585
  */
2586
2586
  parseArgumentDefs() {
2587
2587
  return this.optionalMany(
2588
- p.PAREN_L,
2588
+ m.PAREN_L,
2589
2589
  this.parseInputValueDef,
2590
- p.PAREN_R
2590
+ m.PAREN_R
2591
2591
  );
2592
2592
  }
2593
2593
  /**
@@ -2596,13 +2596,13 @@ class ai {
2596
2596
  */
2597
2597
  parseInputValueDef() {
2598
2598
  const t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
2599
- this.expectToken(p.COLON);
2599
+ this.expectToken(m.COLON);
2600
2600
  const r = this.parseTypeReference();
2601
2601
  let s;
2602
- this.expectOptionalToken(p.EQUALS) && (s = this.parseConstValueLiteral());
2602
+ this.expectOptionalToken(m.EQUALS) && (s = this.parseConstValueLiteral());
2603
2603
  const o = this.parseConstDirectives();
2604
2604
  return this.node(t, {
2605
- kind: I.INPUT_VALUE_DEFINITION,
2605
+ kind: A.INPUT_VALUE_DEFINITION,
2606
2606
  description: n,
2607
2607
  name: i,
2608
2608
  type: r,
@@ -2619,7 +2619,7 @@ class ai {
2619
2619
  this.expectKeyword("interface");
2620
2620
  const i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition();
2621
2621
  return this.node(t, {
2622
- kind: I.INTERFACE_TYPE_DEFINITION,
2622
+ kind: A.INTERFACE_TYPE_DEFINITION,
2623
2623
  description: n,
2624
2624
  name: i,
2625
2625
  interfaces: r,
@@ -2636,7 +2636,7 @@ class ai {
2636
2636
  this.expectKeyword("union");
2637
2637
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
2638
2638
  return this.node(t, {
2639
- kind: I.UNION_TYPE_DEFINITION,
2639
+ kind: A.UNION_TYPE_DEFINITION,
2640
2640
  description: n,
2641
2641
  name: i,
2642
2642
  directives: r,
@@ -2649,7 +2649,7 @@ class ai {
2649
2649
  * - UnionMemberTypes | NamedType
2650
2650
  */
2651
2651
  parseUnionMemberTypes() {
2652
- return this.expectOptionalToken(p.EQUALS) ? this.delimitedMany(p.PIPE, this.parseNamedType) : [];
2652
+ return this.expectOptionalToken(m.EQUALS) ? this.delimitedMany(m.PIPE, this.parseNamedType) : [];
2653
2653
  }
2654
2654
  /**
2655
2655
  * EnumTypeDefinition :
@@ -2660,7 +2660,7 @@ class ai {
2660
2660
  this.expectKeyword("enum");
2661
2661
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
2662
2662
  return this.node(t, {
2663
- kind: I.ENUM_TYPE_DEFINITION,
2663
+ kind: A.ENUM_TYPE_DEFINITION,
2664
2664
  description: n,
2665
2665
  name: i,
2666
2666
  directives: r,
@@ -2674,9 +2674,9 @@ class ai {
2674
2674
  */
2675
2675
  parseEnumValuesDefinition() {
2676
2676
  return this.optionalMany(
2677
- p.BRACE_L,
2677
+ m.BRACE_L,
2678
2678
  this.parseEnumValueDefinition,
2679
- p.BRACE_R
2679
+ m.BRACE_R
2680
2680
  );
2681
2681
  }
2682
2682
  /**
@@ -2685,7 +2685,7 @@ class ai {
2685
2685
  parseEnumValueDefinition() {
2686
2686
  const t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
2687
2687
  return this.node(t, {
2688
- kind: I.ENUM_VALUE_DEFINITION,
2688
+ kind: A.ENUM_VALUE_DEFINITION,
2689
2689
  description: n,
2690
2690
  name: i,
2691
2691
  directives: r
@@ -2696,10 +2696,10 @@ class ai {
2696
2696
  */
2697
2697
  parseEnumValueName() {
2698
2698
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
2699
- throw P(
2699
+ throw M(
2700
2700
  this._lexer.source,
2701
2701
  this._lexer.token.start,
2702
- `${ye(
2702
+ `${ve(
2703
2703
  this._lexer.token
2704
2704
  )} is reserved and cannot be used for an enum value.`
2705
2705
  );
@@ -2714,7 +2714,7 @@ class ai {
2714
2714
  this.expectKeyword("input");
2715
2715
  const i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
2716
2716
  return this.node(t, {
2717
- kind: I.INPUT_OBJECT_TYPE_DEFINITION,
2717
+ kind: A.INPUT_OBJECT_TYPE_DEFINITION,
2718
2718
  description: n,
2719
2719
  name: i,
2720
2720
  directives: r,
@@ -2728,9 +2728,9 @@ class ai {
2728
2728
  */
2729
2729
  parseInputFieldsDefinition() {
2730
2730
  return this.optionalMany(
2731
- p.BRACE_L,
2731
+ m.BRACE_L,
2732
2732
  this.parseInputValueDef,
2733
- p.BRACE_R
2733
+ m.BRACE_R
2734
2734
  );
2735
2735
  }
2736
2736
  /**
@@ -2748,7 +2748,7 @@ class ai {
2748
2748
  */
2749
2749
  parseTypeSystemExtension() {
2750
2750
  const t = this._lexer.lookahead();
2751
- if (t.kind === p.NAME)
2751
+ if (t.kind === m.NAME)
2752
2752
  switch (t.value) {
2753
2753
  case "schema":
2754
2754
  return this.parseSchemaExtension();
@@ -2778,14 +2778,14 @@ class ai {
2778
2778
  const t = this._lexer.token;
2779
2779
  this.expectKeyword("extend"), this.expectKeyword("schema");
2780
2780
  const n = this.parseConstDirectives(), i = this.optionalMany(
2781
- p.BRACE_L,
2781
+ m.BRACE_L,
2782
2782
  this.parseOperationTypeDefinition,
2783
- p.BRACE_R
2783
+ m.BRACE_R
2784
2784
  );
2785
2785
  if (n.length === 0 && i.length === 0)
2786
2786
  throw this.unexpected();
2787
2787
  return this.node(t, {
2788
- kind: I.SCHEMA_EXTENSION,
2788
+ kind: A.SCHEMA_EXTENSION,
2789
2789
  directives: n,
2790
2790
  operationTypes: i
2791
2791
  });
@@ -2801,7 +2801,7 @@ class ai {
2801
2801
  if (i.length === 0)
2802
2802
  throw this.unexpected();
2803
2803
  return this.node(t, {
2804
- kind: I.SCALAR_TYPE_EXTENSION,
2804
+ kind: A.SCALAR_TYPE_EXTENSION,
2805
2805
  name: n,
2806
2806
  directives: i
2807
2807
  });
@@ -2819,7 +2819,7 @@ class ai {
2819
2819
  if (i.length === 0 && r.length === 0 && s.length === 0)
2820
2820
  throw this.unexpected();
2821
2821
  return this.node(t, {
2822
- kind: I.OBJECT_TYPE_EXTENSION,
2822
+ kind: A.OBJECT_TYPE_EXTENSION,
2823
2823
  name: n,
2824
2824
  interfaces: i,
2825
2825
  directives: r,
@@ -2839,7 +2839,7 @@ class ai {
2839
2839
  if (i.length === 0 && r.length === 0 && s.length === 0)
2840
2840
  throw this.unexpected();
2841
2841
  return this.node(t, {
2842
- kind: I.INTERFACE_TYPE_EXTENSION,
2842
+ kind: A.INTERFACE_TYPE_EXTENSION,
2843
2843
  name: n,
2844
2844
  interfaces: i,
2845
2845
  directives: r,
@@ -2858,7 +2858,7 @@ class ai {
2858
2858
  if (i.length === 0 && r.length === 0)
2859
2859
  throw this.unexpected();
2860
2860
  return this.node(t, {
2861
- kind: I.UNION_TYPE_EXTENSION,
2861
+ kind: A.UNION_TYPE_EXTENSION,
2862
2862
  name: n,
2863
2863
  directives: i,
2864
2864
  types: r
@@ -2876,7 +2876,7 @@ class ai {
2876
2876
  if (i.length === 0 && r.length === 0)
2877
2877
  throw this.unexpected();
2878
2878
  return this.node(t, {
2879
- kind: I.ENUM_TYPE_EXTENSION,
2879
+ kind: A.ENUM_TYPE_EXTENSION,
2880
2880
  name: n,
2881
2881
  directives: i,
2882
2882
  values: r
@@ -2894,7 +2894,7 @@ class ai {
2894
2894
  if (i.length === 0 && r.length === 0)
2895
2895
  throw this.unexpected();
2896
2896
  return this.node(t, {
2897
- kind: I.INPUT_OBJECT_TYPE_EXTENSION,
2897
+ kind: A.INPUT_OBJECT_TYPE_EXTENSION,
2898
2898
  name: n,
2899
2899
  directives: i,
2900
2900
  fields: r
@@ -2908,12 +2908,12 @@ class ai {
2908
2908
  */
2909
2909
  parseDirectiveDefinition() {
2910
2910
  const t = this._lexer.token, n = this.parseDescription();
2911
- this.expectKeyword("directive"), this.expectToken(p.AT);
2911
+ this.expectKeyword("directive"), this.expectToken(m.AT);
2912
2912
  const i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
2913
2913
  this.expectKeyword("on");
2914
2914
  const o = this.parseDirectiveLocations();
2915
2915
  return this.node(t, {
2916
- kind: I.DIRECTIVE_DEFINITION,
2916
+ kind: A.DIRECTIVE_DEFINITION,
2917
2917
  description: n,
2918
2918
  name: i,
2919
2919
  arguments: r,
@@ -2927,7 +2927,7 @@ class ai {
2927
2927
  * - DirectiveLocations | DirectiveLocation
2928
2928
  */
2929
2929
  parseDirectiveLocations() {
2930
- return this.delimitedMany(p.PIPE, this.parseDirectiveLocation);
2930
+ return this.delimitedMany(m.PIPE, this.parseDirectiveLocation);
2931
2931
  }
2932
2932
  /*
2933
2933
  * DirectiveLocation :
@@ -2958,7 +2958,7 @@ class ai {
2958
2958
  */
2959
2959
  parseDirectiveLocation() {
2960
2960
  const t = this._lexer.token, n = this.parseName();
2961
- if (Object.prototype.hasOwnProperty.call(Ge, n.value))
2961
+ if (Object.prototype.hasOwnProperty.call(ze, n.value))
2962
2962
  return n;
2963
2963
  throw this.unexpected(t);
2964
2964
  }
@@ -2969,7 +2969,7 @@ class ai {
2969
2969
  * given parsed object.
2970
2970
  */
2971
2971
  node(t, n) {
2972
- return this._options.noLocation !== !0 && (n.loc = new Fn(
2972
+ return this._options.noLocation !== !0 && (n.loc = new Un(
2973
2973
  t,
2974
2974
  this._lexer.lastToken,
2975
2975
  this._lexer.source
@@ -2989,10 +2989,10 @@ class ai {
2989
2989
  const n = this._lexer.token;
2990
2990
  if (n.kind === t)
2991
2991
  return this.advanceLexer(), n;
2992
- throw P(
2992
+ throw M(
2993
2993
  this._lexer.source,
2994
2994
  n.start,
2995
- `Expected ${bt(t)}, found ${ye(n)}.`
2995
+ `Expected ${kt(t)}, found ${ve(n)}.`
2996
2996
  );
2997
2997
  }
2998
2998
  /**
@@ -3008,13 +3008,13 @@ class ai {
3008
3008
  */
3009
3009
  expectKeyword(t) {
3010
3010
  const n = this._lexer.token;
3011
- if (n.kind === p.NAME && n.value === t)
3011
+ if (n.kind === m.NAME && n.value === t)
3012
3012
  this.advanceLexer();
3013
3013
  else
3014
- throw P(
3014
+ throw M(
3015
3015
  this._lexer.source,
3016
3016
  n.start,
3017
- `Expected "${t}", found ${ye(n)}.`
3017
+ `Expected "${t}", found ${ve(n)}.`
3018
3018
  );
3019
3019
  }
3020
3020
  /**
@@ -3023,17 +3023,17 @@ class ai {
3023
3023
  */
3024
3024
  expectOptionalKeyword(t) {
3025
3025
  const n = this._lexer.token;
3026
- return n.kind === p.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
3026
+ return n.kind === m.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
3027
3027
  }
3028
3028
  /**
3029
3029
  * Helper function for creating an error when an unexpected lexed token is encountered.
3030
3030
  */
3031
3031
  unexpected(t) {
3032
3032
  const n = t ?? this._lexer.token;
3033
- return P(
3033
+ return M(
3034
3034
  this._lexer.source,
3035
3035
  n.start,
3036
- `Unexpected ${ye(n)}.`
3036
+ `Unexpected ${ve(n)}.`
3037
3037
  );
3038
3038
  }
3039
3039
  /**
@@ -3092,29 +3092,29 @@ class ai {
3092
3092
  }
3093
3093
  advanceLexer() {
3094
3094
  const { maxTokens: t } = this._options, n = this._lexer.advance();
3095
- if (t !== void 0 && n.kind !== p.EOF && (++this._tokenCounter, this._tokenCounter > t))
3096
- throw P(
3095
+ if (t !== void 0 && n.kind !== m.EOF && (++this._tokenCounter, this._tokenCounter > t))
3096
+ throw M(
3097
3097
  this._lexer.source,
3098
3098
  n.start,
3099
3099
  `Document contains more that ${t} tokens. Parsing aborted.`
3100
3100
  );
3101
3101
  }
3102
3102
  }
3103
- function ye(e) {
3103
+ function ve(e) {
3104
3104
  const t = e.value;
3105
- return bt(e.kind) + (t != null ? ` "${t}"` : "");
3105
+ return kt(e.kind) + (t != null ? ` "${t}"` : "");
3106
3106
  }
3107
- function bt(e) {
3108
- return jn(e) ? `"${e}"` : e;
3107
+ function kt(e) {
3108
+ return Yn(e) ? `"${e}"` : e;
3109
3109
  }
3110
- function ci(e) {
3111
- return `"${e.replace(ui, li)}"`;
3110
+ function hi(e) {
3111
+ return `"${e.replace(di, pi)}"`;
3112
3112
  }
3113
- const ui = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
3114
- function li(e) {
3115
- return fi[e.charCodeAt(0)];
3113
+ const di = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
3114
+ function pi(e) {
3115
+ return mi[e.charCodeAt(0)];
3116
3116
  }
3117
- const fi = [
3117
+ const mi = [
3118
3118
  "\\u0000",
3119
3119
  "\\u0001",
3120
3120
  "\\u0002",
@@ -3280,75 +3280,75 @@ const fi = [
3280
3280
  "\\u009D",
3281
3281
  "\\u009E",
3282
3282
  "\\u009F"
3283
- ], hi = Object.freeze({});
3284
- function di(e, t, n = wt) {
3283
+ ], gi = Object.freeze({});
3284
+ function Ei(e, t, n = Ot) {
3285
3285
  const i = /* @__PURE__ */ new Map();
3286
- for (const D of Object.values(I))
3287
- i.set(D, pi(t, D));
3286
+ for (const O of Object.values(A))
3287
+ i.set(O, yi(t, O));
3288
3288
  let r, s = Array.isArray(e), o = [e], a = -1, u = [], c = e, l, f;
3289
- const h = [], E = [];
3289
+ const d = [], y = [];
3290
3290
  do {
3291
3291
  a++;
3292
- const D = a === o.length, U = D && u.length !== 0;
3293
- if (D) {
3294
- if (l = E.length === 0 ? void 0 : h[h.length - 1], c = f, f = E.pop(), U)
3292
+ const O = a === o.length, q = O && u.length !== 0;
3293
+ if (O) {
3294
+ if (l = y.length === 0 ? void 0 : d[d.length - 1], c = f, f = y.pop(), q)
3295
3295
  if (s) {
3296
3296
  c = c.slice();
3297
- let x = 0;
3298
- for (const [G, j] of u) {
3299
- const Z = G - x;
3300
- j === null ? (c.splice(Z, 1), x++) : c[Z] = j;
3297
+ let C = 0;
3298
+ for (const [J, $] of u) {
3299
+ const K = J - C;
3300
+ $ === null ? (c.splice(K, 1), C++) : c[K] = $;
3301
3301
  }
3302
3302
  } else {
3303
3303
  c = Object.defineProperties(
3304
3304
  {},
3305
3305
  Object.getOwnPropertyDescriptors(c)
3306
3306
  );
3307
- for (const [x, G] of u)
3308
- c[x] = G;
3307
+ for (const [C, J] of u)
3308
+ c[C] = J;
3309
3309
  }
3310
3310
  a = r.index, o = r.keys, u = r.edits, s = r.inArray, r = r.prev;
3311
3311
  } else if (f) {
3312
3312
  if (l = s ? a : o[a], c = f[l], c == null)
3313
3313
  continue;
3314
- h.push(l);
3314
+ d.push(l);
3315
3315
  }
3316
- let _;
3316
+ let b;
3317
3317
  if (!Array.isArray(c)) {
3318
- var N, y;
3319
- nt(c) || we(!1, `Invalid AST Node: ${Qe(c)}.`);
3320
- const x = D ? (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;
3321
- if (_ = x == null ? void 0 : x.call(t, c, l, f, h, E), _ === hi)
3318
+ var N, E;
3319
+ ot(c) || Oe(!1, `Invalid AST Node: ${Ke(c)}.`);
3320
+ const C = O ? (N = i.get(c.kind)) === null || N === void 0 ? void 0 : N.leave : (E = i.get(c.kind)) === null || E === void 0 ? void 0 : E.enter;
3321
+ if (b = C == null ? void 0 : C.call(t, c, l, f, d, y), b === gi)
3322
3322
  break;
3323
- if (_ === !1) {
3324
- if (!D) {
3325
- h.pop();
3323
+ if (b === !1) {
3324
+ if (!O) {
3325
+ d.pop();
3326
3326
  continue;
3327
3327
  }
3328
- } else if (_ !== void 0 && (u.push([l, _]), !D))
3329
- if (nt(_))
3330
- c = _;
3328
+ } else if (b !== void 0 && (u.push([l, b]), !O))
3329
+ if (ot(b))
3330
+ c = b;
3331
3331
  else {
3332
- h.pop();
3332
+ d.pop();
3333
3333
  continue;
3334
3334
  }
3335
3335
  }
3336
- if (_ === void 0 && U && u.push([l, c]), D)
3337
- h.pop();
3336
+ if (b === void 0 && q && u.push([l, c]), O)
3337
+ d.pop();
3338
3338
  else {
3339
- var S;
3339
+ var x;
3340
3340
  r = {
3341
3341
  inArray: s,
3342
3342
  index: a,
3343
3343
  keys: o,
3344
3344
  edits: u,
3345
3345
  prev: r
3346
- }, 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;
3346
+ }, s = Array.isArray(c), o = s ? c : (x = n[c.kind]) !== null && x !== void 0 ? x : [], a = -1, u = [], f && y.push(f), f = c;
3347
3347
  }
3348
3348
  } while (r !== void 0);
3349
3349
  return u.length !== 0 ? u[u.length - 1][1] : e;
3350
3350
  }
3351
- function pi(e, t) {
3351
+ function yi(e, t) {
3352
3352
  const n = e[t];
3353
3353
  return typeof n == "object" ? n : typeof n == "function" ? {
3354
3354
  enter: n,
@@ -3358,10 +3358,10 @@ function pi(e, t) {
3358
3358
  leave: e.leave
3359
3359
  };
3360
3360
  }
3361
- function mi(e) {
3362
- return di(e, Ei);
3361
+ function Ni(e) {
3362
+ return Ei(e, vi);
3363
3363
  }
3364
- const gi = 80, Ei = {
3364
+ const wi = 80, vi = {
3365
3365
  Name: {
3366
3366
  leave: (e) => e.value
3367
3367
  },
@@ -3376,7 +3376,7 @@ const gi = 80, Ei = {
3376
3376
  },
3377
3377
  OperationDefinition: {
3378
3378
  leave(e) {
3379
- const t = b("(", w(e.variableDefinitions, ", "), ")"), n = w(
3379
+ const t = D("(", w(e.variableDefinitions, ", "), ")"), n = w(
3380
3380
  [
3381
3381
  e.operation,
3382
3382
  w([e.name, t]),
@@ -3388,17 +3388,17 @@ const gi = 80, Ei = {
3388
3388
  }
3389
3389
  },
3390
3390
  VariableDefinition: {
3391
- leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + b(" = ", n) + b(" ", w(i, " "))
3391
+ leave: ({ variable: e, type: t, defaultValue: n, directives: i }) => e + ": " + t + D(" = ", n) + D(" ", w(i, " "))
3392
3392
  },
3393
3393
  SelectionSet: {
3394
- leave: ({ selections: e }) => Y(e)
3394
+ leave: ({ selections: e }) => z(e)
3395
3395
  },
3396
3396
  Field: {
3397
3397
  leave({ alias: e, name: t, arguments: n, directives: i, selectionSet: r }) {
3398
- const s = b("", e, ": ") + t;
3399
- let o = s + b("(", w(n, ", "), ")");
3400
- return o.length > gi && (o = s + b(`(
3401
- `, Te(w(n, `
3398
+ const s = D("", e, ": ") + t;
3399
+ let o = s + D("(", w(n, ", "), ")");
3400
+ return o.length > wi && (o = s + D(`(
3401
+ `, be(w(n, `
3402
3402
  `)), `
3403
3403
  )`)), w([o, w(i, " "), r], " ");
3404
3404
  }
@@ -3408,13 +3408,13 @@ const gi = 80, Ei = {
3408
3408
  },
3409
3409
  // Fragments
3410
3410
  FragmentSpread: {
3411
- leave: ({ name: e, directives: t }) => "..." + e + b(" ", w(t, " "))
3411
+ leave: ({ name: e, directives: t }) => "..." + e + D(" ", w(t, " "))
3412
3412
  },
3413
3413
  InlineFragment: {
3414
3414
  leave: ({ typeCondition: e, directives: t, selectionSet: n }) => w(
3415
3415
  [
3416
3416
  "...",
3417
- b("on ", e),
3417
+ D("on ", e),
3418
3418
  w(t, " "),
3419
3419
  n
3420
3420
  ],
@@ -3424,7 +3424,7 @@ const gi = 80, Ei = {
3424
3424
  FragmentDefinition: {
3425
3425
  leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: i, selectionSet: r }) => (
3426
3426
  // or removed in the future.
3427
- `fragment ${e}${b("(", w(n, ", "), ")")} on ${t} ${b("", w(i, " "), " ")}` + r
3427
+ `fragment ${e}${D("(", w(n, ", "), ")")} on ${t} ${D("", w(i, " "), " ")}` + r
3428
3428
  )
3429
3429
  },
3430
3430
  // Value
@@ -3435,7 +3435,7 @@ const gi = 80, Ei = {
3435
3435
  leave: ({ value: e }) => e
3436
3436
  },
3437
3437
  StringValue: {
3438
- leave: ({ value: e, block: t }) => t ? qn(e) : ci(e)
3438
+ leave: ({ value: e, block: t }) => t ? Hn(e) : hi(e)
3439
3439
  },
3440
3440
  BooleanValue: {
3441
3441
  leave: ({ value: e }) => e ? "true" : "false"
@@ -3457,7 +3457,7 @@ const gi = 80, Ei = {
3457
3457
  },
3458
3458
  // Directive
3459
3459
  Directive: {
3460
- leave: ({ name: e, arguments: t }) => "@" + e + b("(", w(t, ", "), ")")
3460
+ leave: ({ name: e, arguments: t }) => "@" + e + D("(", w(t, ", "), ")")
3461
3461
  },
3462
3462
  // Type
3463
3463
  NamedType: {
@@ -3471,85 +3471,85 @@ const gi = 80, Ei = {
3471
3471
  },
3472
3472
  // Type System Definitions
3473
3473
  SchemaDefinition: {
3474
- leave: ({ description: e, directives: t, operationTypes: n }) => b("", e, `
3475
- `) + w(["schema", w(t, " "), Y(n)], " ")
3474
+ leave: ({ description: e, directives: t, operationTypes: n }) => D("", e, `
3475
+ `) + w(["schema", w(t, " "), z(n)], " ")
3476
3476
  },
3477
3477
  OperationTypeDefinition: {
3478
3478
  leave: ({ operation: e, type: t }) => e + ": " + t
3479
3479
  },
3480
3480
  ScalarTypeDefinition: {
3481
- leave: ({ description: e, name: t, directives: n }) => b("", e, `
3481
+ leave: ({ description: e, name: t, directives: n }) => D("", e, `
3482
3482
  `) + w(["scalar", t, w(n, " ")], " ")
3483
3483
  },
3484
3484
  ObjectTypeDefinition: {
3485
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => b("", e, `
3485
+ leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => D("", e, `
3486
3486
  `) + w(
3487
3487
  [
3488
3488
  "type",
3489
3489
  t,
3490
- b("implements ", w(n, " & ")),
3490
+ D("implements ", w(n, " & ")),
3491
3491
  w(i, " "),
3492
- Y(r)
3492
+ z(r)
3493
3493
  ],
3494
3494
  " "
3495
3495
  )
3496
3496
  },
3497
3497
  FieldDefinition: {
3498
- leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => b("", e, `
3499
- `) + t + (rt(n) ? b(`(
3500
- `, Te(w(n, `
3498
+ leave: ({ description: e, name: t, arguments: n, type: i, directives: r }) => D("", e, `
3499
+ `) + t + (ct(n) ? D(`(
3500
+ `, be(w(n, `
3501
3501
  `)), `
3502
- )`) : b("(", w(n, ", "), ")")) + ": " + i + b(" ", w(r, " "))
3502
+ )`) : D("(", w(n, ", "), ")")) + ": " + i + D(" ", w(r, " "))
3503
3503
  },
3504
3504
  InputValueDefinition: {
3505
- leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => b("", e, `
3505
+ leave: ({ description: e, name: t, type: n, defaultValue: i, directives: r }) => D("", e, `
3506
3506
  `) + w(
3507
- [t + ": " + n, b("= ", i), w(r, " ")],
3507
+ [t + ": " + n, D("= ", i), w(r, " ")],
3508
3508
  " "
3509
3509
  )
3510
3510
  },
3511
3511
  InterfaceTypeDefinition: {
3512
- leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => b("", e, `
3512
+ leave: ({ description: e, name: t, interfaces: n, directives: i, fields: r }) => D("", e, `
3513
3513
  `) + w(
3514
3514
  [
3515
3515
  "interface",
3516
3516
  t,
3517
- b("implements ", w(n, " & ")),
3517
+ D("implements ", w(n, " & ")),
3518
3518
  w(i, " "),
3519
- Y(r)
3519
+ z(r)
3520
3520
  ],
3521
3521
  " "
3522
3522
  )
3523
3523
  },
3524
3524
  UnionTypeDefinition: {
3525
- leave: ({ description: e, name: t, directives: n, types: i }) => b("", e, `
3525
+ leave: ({ description: e, name: t, directives: n, types: i }) => D("", e, `
3526
3526
  `) + w(
3527
- ["union", t, w(n, " "), b("= ", w(i, " | "))],
3527
+ ["union", t, w(n, " "), D("= ", w(i, " | "))],
3528
3528
  " "
3529
3529
  )
3530
3530
  },
3531
3531
  EnumTypeDefinition: {
3532
- leave: ({ description: e, name: t, directives: n, values: i }) => b("", e, `
3533
- `) + w(["enum", t, w(n, " "), Y(i)], " ")
3532
+ leave: ({ description: e, name: t, directives: n, values: i }) => D("", e, `
3533
+ `) + w(["enum", t, w(n, " "), z(i)], " ")
3534
3534
  },
3535
3535
  EnumValueDefinition: {
3536
- leave: ({ description: e, name: t, directives: n }) => b("", e, `
3536
+ leave: ({ description: e, name: t, directives: n }) => D("", e, `
3537
3537
  `) + w([t, w(n, " ")], " ")
3538
3538
  },
3539
3539
  InputObjectTypeDefinition: {
3540
- leave: ({ description: e, name: t, directives: n, fields: i }) => b("", e, `
3541
- `) + w(["input", t, w(n, " "), Y(i)], " ")
3540
+ leave: ({ description: e, name: t, directives: n, fields: i }) => D("", e, `
3541
+ `) + w(["input", t, w(n, " "), z(i)], " ")
3542
3542
  },
3543
3543
  DirectiveDefinition: {
3544
- leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => b("", e, `
3545
- `) + "directive @" + t + (rt(n) ? b(`(
3546
- `, Te(w(n, `
3544
+ leave: ({ description: e, name: t, arguments: n, repeatable: i, locations: r }) => D("", e, `
3545
+ `) + "directive @" + t + (ct(n) ? D(`(
3546
+ `, be(w(n, `
3547
3547
  `)), `
3548
- )`) : b("(", w(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + w(r, " | ")
3548
+ )`) : D("(", w(n, ", "), ")")) + (i ? " repeatable" : "") + " on " + w(r, " | ")
3549
3549
  },
3550
3550
  SchemaExtension: {
3551
3551
  leave: ({ directives: e, operationTypes: t }) => w(
3552
- ["extend schema", w(e, " "), Y(t)],
3552
+ ["extend schema", w(e, " "), z(t)],
3553
3553
  " "
3554
3554
  )
3555
3555
  },
@@ -3561,9 +3561,9 @@ const gi = 80, Ei = {
3561
3561
  [
3562
3562
  "extend type",
3563
3563
  e,
3564
- b("implements ", w(t, " & ")),
3564
+ D("implements ", w(t, " & ")),
3565
3565
  w(n, " "),
3566
- Y(i)
3566
+ z(i)
3567
3567
  ],
3568
3568
  " "
3569
3569
  )
@@ -3573,9 +3573,9 @@ const gi = 80, Ei = {
3573
3573
  [
3574
3574
  "extend interface",
3575
3575
  e,
3576
- b("implements ", w(t, " & ")),
3576
+ D("implements ", w(t, " & ")),
3577
3577
  w(n, " "),
3578
- Y(i)
3578
+ z(i)
3579
3579
  ],
3580
3580
  " "
3581
3581
  )
@@ -3586,78 +3586,79 @@ const gi = 80, Ei = {
3586
3586
  "extend union",
3587
3587
  e,
3588
3588
  w(t, " "),
3589
- b("= ", w(n, " | "))
3589
+ D("= ", w(n, " | "))
3590
3590
  ],
3591
3591
  " "
3592
3592
  )
3593
3593
  },
3594
3594
  EnumTypeExtension: {
3595
- leave: ({ name: e, directives: t, values: n }) => w(["extend enum", e, w(t, " "), Y(n)], " ")
3595
+ leave: ({ name: e, directives: t, values: n }) => w(["extend enum", e, w(t, " "), z(n)], " ")
3596
3596
  },
3597
3597
  InputObjectTypeExtension: {
3598
- leave: ({ name: e, directives: t, fields: n }) => w(["extend input", e, w(t, " "), Y(n)], " ")
3598
+ leave: ({ name: e, directives: t, fields: n }) => w(["extend input", e, w(t, " "), z(n)], " ")
3599
3599
  }
3600
3600
  };
3601
3601
  function w(e, t = "") {
3602
3602
  var n;
3603
3603
  return (n = e == null ? void 0 : e.filter((i) => i).join(t)) !== null && n !== void 0 ? n : "";
3604
3604
  }
3605
- function Y(e) {
3606
- return b(`{
3607
- `, Te(w(e, `
3605
+ function z(e) {
3606
+ return D(`{
3607
+ `, be(w(e, `
3608
3608
  `)), `
3609
3609
  }`);
3610
3610
  }
3611
- function b(e, t, n = "") {
3611
+ function D(e, t, n = "") {
3612
3612
  return t != null && t !== "" ? e + t + n : "";
3613
3613
  }
3614
- function Te(e) {
3615
- return b(" ", e.replace(/\n/g, `
3614
+ function be(e) {
3615
+ return D(" ", e.replace(/\n/g, `
3616
3616
  `));
3617
3617
  }
3618
- function rt(e) {
3618
+ function ct(e) {
3619
3619
  var t;
3620
3620
  return (t = e == null ? void 0 : e.some((n) => n.includes(`
3621
3621
  `))) !== null && t !== void 0 ? t : !1;
3622
3622
  }
3623
- const st = (e) => {
3623
+ const ut = (e) => {
3624
3624
  var i, r;
3625
3625
  let t;
3626
3626
  const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
3627
3627
  return n.length === 1 && (t = (r = (i = n[0]) == null ? void 0 : i.name) == null ? void 0 : r.value), t;
3628
- }, Fe = (e) => {
3628
+ }, Ue = (e) => {
3629
3629
  if (typeof e == "string") {
3630
3630
  let n;
3631
3631
  try {
3632
- const i = oi(e);
3633
- n = st(i);
3632
+ const i = li(e);
3633
+ n = ut(i);
3634
3634
  } catch {
3635
3635
  }
3636
3636
  return { query: e, operationName: n };
3637
3637
  }
3638
- const t = st(e);
3639
- return { query: mi(e), operationName: t };
3638
+ const t = ut(e);
3639
+ return { query: Ni(e), operationName: t };
3640
3640
  };
3641
- class me extends Error {
3641
+ class Ee extends Error {
3642
3642
  constructor(t, n) {
3643
- const i = `${me.extractMessage(t)}: ${JSON.stringify({
3643
+ const i = `${Ee.extractMessage(t)}: ${JSON.stringify({
3644
3644
  response: t,
3645
3645
  request: n
3646
3646
  })}`;
3647
- super(i), Object.setPrototypeOf(this, me.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, me);
3647
+ super(i), Object.setPrototypeOf(this, Ee.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, Ee);
3648
3648
  }
3649
3649
  static extractMessage(t) {
3650
3650
  var n, i;
3651
3651
  return ((i = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : i.message) ?? `GraphQL Error (Code: ${t.status})`;
3652
3652
  }
3653
3653
  }
3654
- function Ni(e) {
3654
+ var Te = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3655
+ function Ti(e) {
3655
3656
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3656
3657
  }
3657
- var pe = { exports: {} }, yi = pe.exports, ot;
3658
- function vi() {
3659
- return ot || (ot = 1, function(e, t) {
3660
- var n = typeof self < "u" ? self : yi, i = function() {
3658
+ var Ae = { exports: {} }, lt;
3659
+ function Ai() {
3660
+ return lt || (lt = 1, function(e, t) {
3661
+ var n = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof Te < "u" && Te, i = function() {
3661
3662
  function s() {
3662
3663
  this.fetch = !1, this.DOMException = n.DOMException;
3663
3664
  }
@@ -3665,24 +3666,25 @@ function vi() {
3665
3666
  }();
3666
3667
  (function(s) {
3667
3668
  (function(o) {
3668
- var a = {
3669
- searchParams: "URLSearchParams" in s,
3670
- iterable: "Symbol" in s && "iterator" in Symbol,
3671
- blob: "FileReader" in s && "Blob" in s && function() {
3669
+ var a = typeof s < "u" && s || typeof self < "u" && self || // eslint-disable-next-line no-undef
3670
+ typeof Te < "u" && Te || {}, u = {
3671
+ searchParams: "URLSearchParams" in a,
3672
+ iterable: "Symbol" in a && "iterator" in Symbol,
3673
+ blob: "FileReader" in a && "Blob" in a && function() {
3672
3674
  try {
3673
3675
  return new Blob(), !0;
3674
3676
  } catch {
3675
3677
  return !1;
3676
3678
  }
3677
3679
  }(),
3678
- formData: "FormData" in s,
3679
- arrayBuffer: "ArrayBuffer" in s
3680
+ formData: "FormData" in a,
3681
+ arrayBuffer: "ArrayBuffer" in a
3680
3682
  };
3681
- function u(d) {
3682
- return d && DataView.prototype.isPrototypeOf(d);
3683
+ function c(h) {
3684
+ return h && DataView.prototype.isPrototypeOf(h);
3683
3685
  }
3684
- if (a.arrayBuffer)
3685
- var c = [
3686
+ if (u.arrayBuffer)
3687
+ var l = [
3686
3688
  "[object Int8Array]",
3687
3689
  "[object Uint8Array]",
3688
3690
  "[object Uint8ClampedArray]",
@@ -3692,108 +3694,112 @@ function vi() {
3692
3694
  "[object Uint32Array]",
3693
3695
  "[object Float32Array]",
3694
3696
  "[object Float64Array]"
3695
- ], l = ArrayBuffer.isView || function(d) {
3696
- return d && c.indexOf(Object.prototype.toString.call(d)) > -1;
3697
+ ], f = ArrayBuffer.isView || function(h) {
3698
+ return h && l.indexOf(Object.prototype.toString.call(h)) > -1;
3697
3699
  };
3698
- function f(d) {
3699
- if (typeof d != "string" && (d = String(d)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(d))
3700
- throw new TypeError("Invalid character in header field name");
3701
- return d.toLowerCase();
3700
+ function d(h) {
3701
+ if (typeof h != "string" && (h = String(h)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(h) || h === "")
3702
+ throw new TypeError('Invalid character in header field name: "' + h + '"');
3703
+ return h.toLowerCase();
3702
3704
  }
3703
- function h(d) {
3704
- return typeof d != "string" && (d = String(d)), d;
3705
+ function y(h) {
3706
+ return typeof h != "string" && (h = String(h)), h;
3705
3707
  }
3706
- function E(d) {
3707
- var g = {
3708
+ function N(h) {
3709
+ var p = {
3708
3710
  next: function() {
3709
- var v = d.shift();
3710
- return { done: v === void 0, value: v };
3711
+ var _ = h.shift();
3712
+ return { done: _ === void 0, value: _ };
3711
3713
  }
3712
3714
  };
3713
- return a.iterable && (g[Symbol.iterator] = function() {
3714
- return g;
3715
- }), g;
3715
+ return u.iterable && (p[Symbol.iterator] = function() {
3716
+ return p;
3717
+ }), p;
3716
3718
  }
3717
- function N(d) {
3718
- this.map = {}, d instanceof N ? d.forEach(function(g, v) {
3719
- this.append(v, g);
3720
- }, this) : Array.isArray(d) ? d.forEach(function(g) {
3721
- this.append(g[0], g[1]);
3722
- }, this) : d && Object.getOwnPropertyNames(d).forEach(function(g) {
3723
- this.append(g, d[g]);
3719
+ function E(h) {
3720
+ this.map = {}, h instanceof E ? h.forEach(function(p, _) {
3721
+ this.append(_, p);
3722
+ }, this) : Array.isArray(h) ? h.forEach(function(p) {
3723
+ if (p.length != 2)
3724
+ throw new TypeError("Headers constructor: expected name/value pair to be length 2, found" + p.length);
3725
+ this.append(p[0], p[1]);
3726
+ }, this) : h && Object.getOwnPropertyNames(h).forEach(function(p) {
3727
+ this.append(p, h[p]);
3724
3728
  }, this);
3725
3729
  }
3726
- N.prototype.append = function(d, g) {
3727
- d = f(d), g = h(g);
3728
- var v = this.map[d];
3729
- this.map[d] = v ? v + ", " + g : g;
3730
- }, N.prototype.delete = function(d) {
3731
- delete this.map[f(d)];
3732
- }, N.prototype.get = function(d) {
3733
- return d = f(d), this.has(d) ? this.map[d] : null;
3734
- }, N.prototype.has = function(d) {
3735
- return this.map.hasOwnProperty(f(d));
3736
- }, N.prototype.set = function(d, g) {
3737
- this.map[f(d)] = h(g);
3738
- }, N.prototype.forEach = function(d, g) {
3739
- for (var v in this.map)
3740
- this.map.hasOwnProperty(v) && d.call(g, this.map[v], v, this);
3741
- }, N.prototype.keys = function() {
3742
- var d = [];
3743
- return this.forEach(function(g, v) {
3744
- d.push(v);
3745
- }), E(d);
3746
- }, N.prototype.values = function() {
3747
- var d = [];
3748
- return this.forEach(function(g) {
3749
- d.push(g);
3750
- }), E(d);
3751
- }, N.prototype.entries = function() {
3752
- var d = [];
3753
- return this.forEach(function(g, v) {
3754
- d.push([v, g]);
3755
- }), E(d);
3756
- }, a.iterable && (N.prototype[Symbol.iterator] = N.prototype.entries);
3757
- function y(d) {
3758
- if (d.bodyUsed)
3759
- return Promise.reject(new TypeError("Already read"));
3760
- d.bodyUsed = !0;
3730
+ E.prototype.append = function(h, p) {
3731
+ h = d(h), p = y(p);
3732
+ var _ = this.map[h];
3733
+ this.map[h] = _ ? _ + ", " + p : p;
3734
+ }, E.prototype.delete = function(h) {
3735
+ delete this.map[d(h)];
3736
+ }, E.prototype.get = function(h) {
3737
+ return h = d(h), this.has(h) ? this.map[h] : null;
3738
+ }, E.prototype.has = function(h) {
3739
+ return this.map.hasOwnProperty(d(h));
3740
+ }, E.prototype.set = function(h, p) {
3741
+ this.map[d(h)] = y(p);
3742
+ }, E.prototype.forEach = function(h, p) {
3743
+ for (var _ in this.map)
3744
+ this.map.hasOwnProperty(_) && h.call(p, this.map[_], _, this);
3745
+ }, E.prototype.keys = function() {
3746
+ var h = [];
3747
+ return this.forEach(function(p, _) {
3748
+ h.push(_);
3749
+ }), N(h);
3750
+ }, E.prototype.values = function() {
3751
+ var h = [];
3752
+ return this.forEach(function(p) {
3753
+ h.push(p);
3754
+ }), N(h);
3755
+ }, E.prototype.entries = function() {
3756
+ var h = [];
3757
+ return this.forEach(function(p, _) {
3758
+ h.push([_, p]);
3759
+ }), N(h);
3760
+ }, u.iterable && (E.prototype[Symbol.iterator] = E.prototype.entries);
3761
+ function x(h) {
3762
+ if (!h._noBody) {
3763
+ if (h.bodyUsed)
3764
+ return Promise.reject(new TypeError("Already read"));
3765
+ h.bodyUsed = !0;
3766
+ }
3761
3767
  }
3762
- function S(d) {
3763
- return new Promise(function(g, v) {
3764
- d.onload = function() {
3765
- g(d.result);
3766
- }, d.onerror = function() {
3767
- v(d.error);
3768
+ function O(h) {
3769
+ return new Promise(function(p, _) {
3770
+ h.onload = function() {
3771
+ p(h.result);
3772
+ }, h.onerror = function() {
3773
+ _(h.error);
3768
3774
  };
3769
3775
  });
3770
3776
  }
3771
- function D(d) {
3772
- var g = new FileReader(), v = S(g);
3773
- return g.readAsArrayBuffer(d), v;
3777
+ function q(h) {
3778
+ var p = new FileReader(), _ = O(p);
3779
+ return p.readAsArrayBuffer(h), _;
3774
3780
  }
3775
- function U(d) {
3776
- var g = new FileReader(), v = S(g);
3777
- return g.readAsText(d), v;
3781
+ function b(h) {
3782
+ var p = new FileReader(), _ = O(p), k = /charset=([A-Za-z0-9_-]+)/.exec(h.type), L = k ? k[1] : "utf-8";
3783
+ return p.readAsText(h, L), _;
3778
3784
  }
3779
- function _(d) {
3780
- for (var g = new Uint8Array(d), v = new Array(g.length), q = 0; q < g.length; q++)
3781
- v[q] = String.fromCharCode(g[q]);
3782
- return v.join("");
3785
+ function C(h) {
3786
+ for (var p = new Uint8Array(h), _ = new Array(p.length), k = 0; k < p.length; k++)
3787
+ _[k] = String.fromCharCode(p[k]);
3788
+ return _.join("");
3783
3789
  }
3784
- function x(d) {
3785
- if (d.slice)
3786
- return d.slice(0);
3787
- var g = new Uint8Array(d.byteLength);
3788
- return g.set(new Uint8Array(d)), g.buffer;
3790
+ function J(h) {
3791
+ if (h.slice)
3792
+ return h.slice(0);
3793
+ var p = new Uint8Array(h.byteLength);
3794
+ return p.set(new Uint8Array(h)), p.buffer;
3789
3795
  }
3790
- function G() {
3791
- return this.bodyUsed = !1, this._initBody = function(d) {
3792
- 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"));
3793
- }, a.blob && (this.blob = function() {
3794
- var d = y(this);
3795
- if (d)
3796
- return d;
3796
+ function $() {
3797
+ return this.bodyUsed = !1, this._initBody = function(h) {
3798
+ this.bodyUsed = this.bodyUsed, this._bodyInit = h, h ? typeof h == "string" ? this._bodyText = h : u.blob && Blob.prototype.isPrototypeOf(h) ? this._bodyBlob = h : u.formData && FormData.prototype.isPrototypeOf(h) ? this._bodyFormData = h : u.searchParams && URLSearchParams.prototype.isPrototypeOf(h) ? this._bodyText = h.toString() : u.arrayBuffer && u.blob && c(h) ? (this._bodyArrayBuffer = J(h.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(h) || f(h)) ? this._bodyArrayBuffer = J(h) : this._bodyText = h = Object.prototype.toString.call(h) : (this._noBody = !0, this._bodyText = ""), this.headers.get("content-type") || (typeof h == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : u.searchParams && URLSearchParams.prototype.isPrototypeOf(h) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
3799
+ }, u.blob && (this.blob = function() {
3800
+ var h = x(this);
3801
+ if (h)
3802
+ return h;
3797
3803
  if (this._bodyBlob)
3798
3804
  return Promise.resolve(this._bodyBlob);
3799
3805
  if (this._bodyArrayBuffer)
@@ -3801,237 +3807,299 @@ function vi() {
3801
3807
  if (this._bodyFormData)
3802
3808
  throw new Error("could not read FormData body as blob");
3803
3809
  return Promise.resolve(new Blob([this._bodyText]));
3804
- }, this.arrayBuffer = function() {
3805
- return this._bodyArrayBuffer ? y(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(D);
3806
- }), this.text = function() {
3807
- var d = y(this);
3808
- if (d)
3809
- return d;
3810
+ }), this.arrayBuffer = function() {
3811
+ if (this._bodyArrayBuffer) {
3812
+ var h = x(this);
3813
+ return h || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
3814
+ this._bodyArrayBuffer.buffer.slice(
3815
+ this._bodyArrayBuffer.byteOffset,
3816
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
3817
+ )
3818
+ ) : Promise.resolve(this._bodyArrayBuffer));
3819
+ } else {
3820
+ if (u.blob)
3821
+ return this.blob().then(q);
3822
+ throw new Error("could not read as ArrayBuffer");
3823
+ }
3824
+ }, this.text = function() {
3825
+ var h = x(this);
3826
+ if (h)
3827
+ return h;
3810
3828
  if (this._bodyBlob)
3811
- return U(this._bodyBlob);
3829
+ return b(this._bodyBlob);
3812
3830
  if (this._bodyArrayBuffer)
3813
- return Promise.resolve(_(this._bodyArrayBuffer));
3831
+ return Promise.resolve(C(this._bodyArrayBuffer));
3814
3832
  if (this._bodyFormData)
3815
3833
  throw new Error("could not read FormData body as text");
3816
3834
  return Promise.resolve(this._bodyText);
3817
- }, a.formData && (this.formData = function() {
3818
- return this.text().then(ie);
3835
+ }, u.formData && (this.formData = function() {
3836
+ return this.text().then(me);
3819
3837
  }), this.json = function() {
3820
3838
  return this.text().then(JSON.parse);
3821
3839
  }, this;
3822
3840
  }
3823
- var j = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
3824
- function Z(d) {
3825
- var g = d.toUpperCase();
3826
- return j.indexOf(g) > -1 ? g : d;
3841
+ var K = ["CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE"];
3842
+ function ae(h) {
3843
+ var p = h.toUpperCase();
3844
+ return K.indexOf(p) > -1 ? p : h;
3827
3845
  }
3828
- function H(d, g) {
3829
- g = g || {};
3830
- var v = g.body;
3831
- if (d instanceof H) {
3832
- if (d.bodyUsed)
3846
+ function H(h, p) {
3847
+ if (!(this instanceof H))
3848
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
3849
+ p = p || {};
3850
+ var _ = p.body;
3851
+ if (h instanceof H) {
3852
+ if (h.bodyUsed)
3833
3853
  throw new TypeError("Already read");
3834
- 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);
3854
+ this.url = h.url, this.credentials = h.credentials, p.headers || (this.headers = new E(h.headers)), this.method = h.method, this.mode = h.mode, this.signal = h.signal, !_ && h._bodyInit != null && (_ = h._bodyInit, h.bodyUsed = !0);
3835
3855
  } else
3836
- this.url = String(d);
3837
- 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)
3856
+ this.url = String(h);
3857
+ if (this.credentials = p.credentials || this.credentials || "same-origin", (p.headers || !this.headers) && (this.headers = new E(p.headers)), this.method = ae(p.method || this.method || "GET"), this.mode = p.mode || this.mode || null, this.signal = p.signal || this.signal || function() {
3858
+ if ("AbortController" in a) {
3859
+ var S = new AbortController();
3860
+ return S.signal;
3861
+ }
3862
+ }(), this.referrer = null, (this.method === "GET" || this.method === "HEAD") && _)
3838
3863
  throw new TypeError("Body not allowed for GET or HEAD requests");
3839
- this._initBody(v);
3864
+ if (this._initBody(_), (this.method === "GET" || this.method === "HEAD") && (p.cache === "no-store" || p.cache === "no-cache")) {
3865
+ var k = /([?&])_=[^&]*/;
3866
+ if (k.test(this.url))
3867
+ this.url = this.url.replace(k, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
3868
+ else {
3869
+ var L = /\?/;
3870
+ this.url += (L.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
3871
+ }
3872
+ }
3840
3873
  }
3841
3874
  H.prototype.clone = function() {
3842
3875
  return new H(this, { body: this._bodyInit });
3843
3876
  };
3844
- function ie(d) {
3845
- var g = new FormData();
3846
- return d.trim().split("&").forEach(function(v) {
3847
- if (v) {
3848
- var q = v.split("="), M = q.shift().replace(/\+/g, " "), C = q.join("=").replace(/\+/g, " ");
3849
- g.append(decodeURIComponent(M), decodeURIComponent(C));
3877
+ function me(h) {
3878
+ var p = new FormData();
3879
+ return h.trim().split("&").forEach(function(_) {
3880
+ if (_) {
3881
+ var k = _.split("="), L = k.shift().replace(/\+/g, " "), S = k.join("=").replace(/\+/g, " ");
3882
+ p.append(decodeURIComponent(L), decodeURIComponent(S));
3850
3883
  }
3851
- }), g;
3884
+ }), p;
3852
3885
  }
3853
- function fe(d) {
3854
- var g = new N(), v = d.replace(/\r?\n[\t ]+/g, " ");
3855
- return v.split(/\r?\n/).forEach(function(q) {
3856
- var M = q.split(":"), C = M.shift().trim();
3857
- if (C) {
3858
- var Ne = M.join(":").trim();
3859
- g.append(C, Ne);
3886
+ function Y(h) {
3887
+ var p = new E(), _ = h.replace(/\r?\n[\t ]+/g, " ");
3888
+ return _.split("\r").map(function(k) {
3889
+ return k.indexOf(`
3890
+ `) === 0 ? k.substr(1, k.length) : k;
3891
+ }).forEach(function(k) {
3892
+ var L = k.split(":"), S = L.shift().trim();
3893
+ if (S) {
3894
+ var we = L.join(":").trim();
3895
+ try {
3896
+ p.append(S, we);
3897
+ } catch (Me) {
3898
+ console.warn("Response " + Me.message);
3899
+ }
3860
3900
  }
3861
- }), g;
3901
+ }), p;
3862
3902
  }
3863
- G.call(H.prototype);
3864
- function R(d, g) {
3865
- 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 N(g.headers), this.url = g.url || "", this._initBody(d);
3903
+ $.call(H.prototype);
3904
+ function V(h, p) {
3905
+ if (!(this instanceof V))
3906
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
3907
+ if (p || (p = {}), this.type = "default", this.status = p.status === void 0 ? 200 : p.status, this.status < 200 || this.status > 599)
3908
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
3909
+ this.ok = this.status >= 200 && this.status < 300, this.statusText = p.statusText === void 0 ? "" : "" + p.statusText, this.headers = new E(p.headers), this.url = p.url || "", this._initBody(h);
3866
3910
  }
3867
- G.call(R.prototype), R.prototype.clone = function() {
3868
- return new R(this._bodyInit, {
3911
+ $.call(V.prototype), V.prototype.clone = function() {
3912
+ return new V(this._bodyInit, {
3869
3913
  status: this.status,
3870
3914
  statusText: this.statusText,
3871
- headers: new N(this.headers),
3915
+ headers: new E(this.headers),
3872
3916
  url: this.url
3873
3917
  });
3874
- }, R.error = function() {
3875
- var d = new R(null, { status: 0, statusText: "" });
3876
- return d.type = "error", d;
3918
+ }, V.error = function() {
3919
+ var h = new V(null, { status: 200, statusText: "" });
3920
+ return h.ok = !1, h.status = 0, h.type = "error", h;
3877
3921
  };
3878
- var se = [301, 302, 303, 307, 308];
3879
- R.redirect = function(d, g) {
3880
- if (se.indexOf(g) === -1)
3922
+ var ce = [301, 302, 303, 307, 308];
3923
+ V.redirect = function(h, p) {
3924
+ if (ce.indexOf(p) === -1)
3881
3925
  throw new RangeError("Invalid status code");
3882
- return new R(null, { status: g, headers: { location: d } });
3883
- }, o.DOMException = s.DOMException;
3926
+ return new V(null, { status: p, headers: { location: h } });
3927
+ }, o.DOMException = a.DOMException;
3884
3928
  try {
3885
3929
  new o.DOMException();
3886
3930
  } catch {
3887
- o.DOMException = function(g, v) {
3888
- this.message = g, this.name = v;
3889
- var q = Error(g);
3890
- this.stack = q.stack;
3931
+ o.DOMException = function(p, _) {
3932
+ this.message = p, this.name = _;
3933
+ var k = Error(p);
3934
+ this.stack = k.stack;
3891
3935
  }, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException;
3892
3936
  }
3893
- function W(d, g) {
3894
- return new Promise(function(v, q) {
3895
- var M = new H(d, g);
3896
- if (M.signal && M.signal.aborted)
3897
- return q(new o.DOMException("Aborted", "AbortError"));
3898
- var C = new XMLHttpRequest();
3899
- function Ne() {
3900
- C.abort();
3937
+ function re(h, p) {
3938
+ return new Promise(function(_, k) {
3939
+ var L = new H(h, p);
3940
+ if (L.signal && L.signal.aborted)
3941
+ return k(new o.DOMException("Aborted", "AbortError"));
3942
+ var S = new XMLHttpRequest();
3943
+ function we() {
3944
+ S.abort();
3901
3945
  }
3902
- C.onload = function() {
3903
- var he = {
3904
- status: C.status,
3905
- statusText: C.statusText,
3906
- headers: fe(C.getAllResponseHeaders() || "")
3946
+ S.onload = function() {
3947
+ var B = {
3948
+ statusText: S.statusText,
3949
+ headers: Y(S.getAllResponseHeaders() || "")
3907
3950
  };
3908
- he.url = "responseURL" in C ? C.responseURL : he.headers.get("X-Request-URL");
3909
- var Re = "response" in C ? C.response : C.responseText;
3910
- v(new R(Re, he));
3911
- }, C.onerror = function() {
3912
- q(new TypeError("Network request failed"));
3913
- }, C.ontimeout = function() {
3914
- q(new TypeError("Network request failed"));
3915
- }, C.onabort = function() {
3916
- q(new o.DOMException("Aborted", "AbortError"));
3917
- }, C.open(M.method, M.url, !0), M.credentials === "include" ? C.withCredentials = !0 : M.credentials === "omit" && (C.withCredentials = !1), "responseType" in C && a.blob && (C.responseType = "blob"), M.headers.forEach(function(he, Re) {
3918
- C.setRequestHeader(Re, he);
3919
- }), M.signal && (M.signal.addEventListener("abort", Ne), C.onreadystatechange = function() {
3920
- C.readyState === 4 && M.signal.removeEventListener("abort", Ne);
3921
- }), C.send(typeof M._bodyInit > "u" ? null : M._bodyInit);
3951
+ L.url.indexOf("file://") === 0 && (S.status < 200 || S.status > 599) ? B.status = 200 : B.status = S.status, B.url = "responseURL" in S ? S.responseURL : B.headers.get("X-Request-URL");
3952
+ var se = "response" in S ? S.response : S.responseText;
3953
+ setTimeout(function() {
3954
+ _(new V(se, B));
3955
+ }, 0);
3956
+ }, S.onerror = function() {
3957
+ setTimeout(function() {
3958
+ k(new TypeError("Network request failed"));
3959
+ }, 0);
3960
+ }, S.ontimeout = function() {
3961
+ setTimeout(function() {
3962
+ k(new TypeError("Network request timed out"));
3963
+ }, 0);
3964
+ }, S.onabort = function() {
3965
+ setTimeout(function() {
3966
+ k(new o.DOMException("Aborted", "AbortError"));
3967
+ }, 0);
3968
+ };
3969
+ function Me(B) {
3970
+ try {
3971
+ return B === "" && a.location.href ? a.location.href : B;
3972
+ } catch {
3973
+ return B;
3974
+ }
3975
+ }
3976
+ if (S.open(L.method, Me(L.url), !0), L.credentials === "include" ? S.withCredentials = !0 : L.credentials === "omit" && (S.withCredentials = !1), "responseType" in S && (u.blob ? S.responseType = "blob" : u.arrayBuffer && (S.responseType = "arraybuffer")), p && typeof p.headers == "object" && !(p.headers instanceof E || a.Headers && p.headers instanceof a.Headers)) {
3977
+ var et = [];
3978
+ Object.getOwnPropertyNames(p.headers).forEach(function(B) {
3979
+ et.push(d(B)), S.setRequestHeader(B, y(p.headers[B]));
3980
+ }), L.headers.forEach(function(B, se) {
3981
+ et.indexOf(se) === -1 && S.setRequestHeader(se, B);
3982
+ });
3983
+ } else
3984
+ L.headers.forEach(function(B, se) {
3985
+ S.setRequestHeader(se, B);
3986
+ });
3987
+ L.signal && (L.signal.addEventListener("abort", we), S.onreadystatechange = function() {
3988
+ S.readyState === 4 && L.signal.removeEventListener("abort", we);
3989
+ }), S.send(typeof L._bodyInit > "u" ? null : L._bodyInit);
3922
3990
  });
3923
3991
  }
3924
- return W.polyfill = !0, s.fetch || (s.fetch = W, s.Headers = N, s.Request = H, s.Response = R), o.Headers = N, o.Request = H, o.Response = R, o.fetch = W, Object.defineProperty(o, "__esModule", { value: !0 }), o;
3992
+ return re.polyfill = !0, a.fetch || (a.fetch = re, a.Headers = E, a.Request = H, a.Response = V), o.Headers = E, o.Request = H, o.Response = V, o.fetch = re, Object.defineProperty(o, "__esModule", { value: !0 }), o;
3925
3993
  })({});
3926
3994
  })(i), i.fetch.ponyfill = !0, delete i.fetch.polyfill;
3927
- var r = i;
3995
+ var r = n.fetch ? n : i;
3928
3996
  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;
3929
- }(pe, pe.exports)), pe.exports;
3997
+ }(Ae, Ae.exports)), Ae.exports;
3930
3998
  }
3931
- var De = vi();
3932
- const Ae = /* @__PURE__ */ Ni(De), wi = /* @__PURE__ */ xt({
3999
+ var Ce = Ai();
4000
+ const _e = /* @__PURE__ */ Ti(Ce), Ii = /* @__PURE__ */ Lt({
3933
4001
  __proto__: null,
3934
- default: Ae
3935
- }, [De]), oe = (e) => {
4002
+ default: _e
4003
+ }, [Ce]), ue = (e) => {
3936
4004
  let t = {};
3937
- return e && (typeof Headers < "u" && e instanceof Headers || wi && De.Headers && e instanceof De.Headers ? t = _n(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
4005
+ return e && (typeof Headers < "u" && e instanceof Headers || Ii && Ce.Headers && e instanceof Ce.Headers ? t = xn(e) : Array.isArray(e) ? e.forEach(([n, i]) => {
3938
4006
  n && i !== void 0 && (t[n] = i);
3939
4007
  }) : t = e), t;
3940
- }, at = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Ti = (e) => {
4008
+ }, ft = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Oi = (e) => {
3941
4009
  if (!Array.isArray(e.query)) {
3942
- const i = e, r = [`query=${encodeURIComponent(at(i.query))}`];
4010
+ const i = e, r = [`query=${encodeURIComponent(ft(i.query))}`];
3943
4011
  return e.variables && r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`), i.operationName && r.push(`operationName=${encodeURIComponent(i.operationName)}`), r.join("&");
3944
4012
  }
3945
4013
  if (typeof e.variables < "u" && !Array.isArray(e.variables))
3946
4014
  throw new Error("Cannot create query with given variable type, array expected");
3947
4015
  const t = e, n = e.query.reduce((i, r, s) => (i.push({
3948
- query: at(r),
4016
+ query: ft(r),
3949
4017
  variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
3950
4018
  }), i), []);
3951
4019
  return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
3952
- }, Ai = (e) => async (t) => {
4020
+ }, bi = (e) => async (t) => {
3953
4021
  const { url: n, query: i, variables: r, operationName: s, fetch: o, fetchOptions: a, middleware: u } = t, c = { ...t.headers };
3954
4022
  let l = "", f;
3955
- e === "POST" ? (f = Oi(i, r, s, a.jsonSerializer), typeof f == "string" && (c["Content-Type"] = "application/json")) : l = Ti({
4023
+ e === "POST" ? (f = Di(i, r, s, a.jsonSerializer), typeof f == "string" && (c["Content-Type"] = "application/json")) : l = Oi({
3956
4024
  query: i,
3957
4025
  variables: r,
3958
4026
  operationName: s,
3959
- jsonSerializer: a.jsonSerializer ?? ze
4027
+ jsonSerializer: a.jsonSerializer ?? Ze
3960
4028
  });
3961
- const h = {
4029
+ const d = {
3962
4030
  method: e,
3963
4031
  headers: c,
3964
4032
  body: f,
3965
4033
  ...a
3966
4034
  };
3967
- let E = n, N = h;
4035
+ let y = n, N = d;
3968
4036
  if (u) {
3969
- const y = await Promise.resolve(u({ ...h, url: n, operationName: s, variables: r })), { url: S, ...D } = y;
3970
- E = S, N = D;
4037
+ const E = await Promise.resolve(u({ ...d, url: n, operationName: s, variables: r })), { url: x, ...O } = E;
4038
+ y = x, N = O;
3971
4039
  }
3972
- return l && (E = `${E}?${l}`), await o(E, N);
4040
+ return l && (y = `${y}?${l}`), await o(y, N);
3973
4041
  };
3974
- class Ii {
4042
+ class _i {
3975
4043
  constructor(t, n = {}) {
3976
4044
  this.url = t, this.requestConfig = n, this.rawRequest = async (...i) => {
3977
- 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;
3978
- a.signal !== void 0 && (E.signal = a.signal);
3979
- const { operationName: y } = Fe(a.query);
3980
- return Pe({
4045
+ const [r, s, o] = i, a = kn(r, s, o), { headers: u, fetch: c = _e, method: l = "POST", requestMiddleware: f, responseMiddleware: d, ...y } = this.requestConfig, { url: N } = this;
4046
+ a.signal !== void 0 && (y.signal = a.signal);
4047
+ const { operationName: E } = Ue(a.query);
4048
+ return qe({
3981
4049
  url: N,
3982
4050
  query: a.query,
3983
4051
  variables: a.variables,
3984
4052
  headers: {
3985
- ...oe(Me(u)),
3986
- ...oe(a.requestHeaders)
4053
+ ...ue(Ve(u)),
4054
+ ...ue(a.requestHeaders)
3987
4055
  },
3988
- operationName: y,
4056
+ operationName: E,
3989
4057
  fetch: c,
3990
4058
  method: l,
3991
- fetchOptions: E,
4059
+ fetchOptions: y,
3992
4060
  middleware: f
3993
- }).then((S) => (h && h(S), S)).catch((S) => {
3994
- throw h && h(S), S;
4061
+ }).then((x) => (d && d(x), x)).catch((x) => {
4062
+ throw d && d(x), x;
3995
4063
  });
3996
4064
  };
3997
4065
  }
3998
4066
  async request(t, ...n) {
3999
- const [i, r] = n, s = Dn(t, i, r), { headers: o, fetch: a = Ae, method: u = "POST", requestMiddleware: c, responseMiddleware: l, ...f } = this.requestConfig, { url: h } = this;
4067
+ const [i, r] = n, s = Cn(t, i, r), { headers: o, fetch: a = _e, method: u = "POST", requestMiddleware: c, responseMiddleware: l, ...f } = this.requestConfig, { url: d } = this;
4000
4068
  s.signal !== void 0 && (f.signal = s.signal);
4001
- const { query: E, operationName: N } = Fe(s.document);
4002
- return Pe({
4003
- url: h,
4004
- query: E,
4069
+ const { query: y, operationName: N } = Ue(s.document);
4070
+ return qe({
4071
+ url: d,
4072
+ query: y,
4005
4073
  variables: s.variables,
4006
4074
  headers: {
4007
- ...oe(Me(o)),
4008
- ...oe(s.requestHeaders)
4075
+ ...ue(Ve(o)),
4076
+ ...ue(s.requestHeaders)
4009
4077
  },
4010
4078
  operationName: N,
4011
4079
  fetch: a,
4012
4080
  method: u,
4013
4081
  fetchOptions: f,
4014
4082
  middleware: c
4015
- }).then((y) => (l && l(y), y.data)).catch((y) => {
4016
- throw l && l(y), y;
4083
+ }).then((E) => (l && l(E), E.data)).catch((E) => {
4084
+ throw l && l(E), E;
4017
4085
  });
4018
4086
  }
4019
4087
  // prettier-ignore
4020
4088
  batchRequests(t, n) {
4021
- const i = Sn(t, n), { headers: r, ...s } = this.requestConfig;
4089
+ const i = Rn(t, n), { headers: r, ...s } = this.requestConfig;
4022
4090
  i.signal !== void 0 && (s.signal = i.signal);
4023
- const o = i.documents.map(({ document: u }) => Fe(u).query), a = i.documents.map(({ variables: u }) => u);
4024
- return Pe({
4091
+ const o = i.documents.map(({ document: u }) => Ue(u).query), a = i.documents.map(({ variables: u }) => u);
4092
+ return qe({
4025
4093
  url: this.url,
4026
4094
  query: o,
4027
4095
  // @ts-expect-error TODO reconcile batch variables into system.
4028
4096
  variables: a,
4029
4097
  headers: {
4030
- ...oe(Me(r)),
4031
- ...oe(i.requestHeaders)
4098
+ ...ue(Ve(r)),
4099
+ ...ue(i.requestHeaders)
4032
4100
  },
4033
4101
  operationName: void 0,
4034
- fetch: this.requestConfig.fetch ?? Ae,
4102
+ fetch: this.requestConfig.fetch ?? _e,
4035
4103
  method: this.requestConfig.method || "POST",
4036
4104
  fetchOptions: s,
4037
4105
  middleware: this.requestConfig.requestMiddleware
@@ -4056,12 +4124,12 @@ class Ii {
4056
4124
  return this.url = t, this;
4057
4125
  }
4058
4126
  }
4059
- const Pe = async (e) => {
4060
- const { query: t, variables: n, fetchOptions: i } = e, r = Ai(On(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), a = await _i(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";
4127
+ const qe = async (e) => {
4128
+ const { query: t, variables: n, fetchOptions: i } = e, r = bi(Sn(e.method ?? "post")), s = Array.isArray(e.query), o = await r(e), a = await Si(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";
4061
4129
  if (o.ok && c && u) {
4062
- const { errors: l, ...f } = (Array.isArray(a), a), h = i.errorPolicy === "ignore" ? f : a;
4130
+ const { errors: l, ...f } = (Array.isArray(a), a), d = i.errorPolicy === "ignore" ? f : a;
4063
4131
  return {
4064
- ...s ? { data: h } : h,
4132
+ ...s ? { data: d } : d,
4065
4133
  headers: o.headers,
4066
4134
  status: o.status
4067
4135
  };
@@ -4069,27 +4137,27 @@ const Pe = async (e) => {
4069
4137
  const l = typeof a == "string" ? {
4070
4138
  error: a
4071
4139
  } : a;
4072
- throw new me(
4140
+ throw new Ee(
4073
4141
  // @ts-expect-error TODO
4074
4142
  { ...l, status: o.status, headers: o.headers },
4075
4143
  { query: t, variables: n }
4076
4144
  );
4077
4145
  }
4078
- }, Oi = (e, t, n, i) => {
4079
- const r = i ?? ze;
4146
+ }, Di = (e, t, n, i) => {
4147
+ const r = i ?? Ze;
4080
4148
  if (!Array.isArray(e))
4081
4149
  return r.stringify({ query: e, variables: t, operationName: n });
4082
4150
  if (typeof t < "u" && !Array.isArray(t))
4083
4151
  throw new Error("Cannot create request body with given variable type, array expected");
4084
4152
  const s = e.reduce((o, a, u) => (o.push({ query: a, variables: t ? t[u] : void 0 }), o), []);
4085
4153
  return r.stringify(s);
4086
- }, _i = async (e, t) => {
4154
+ }, Si = async (e, t) => {
4087
4155
  let n;
4088
4156
  return e.headers.forEach((i, r) => {
4089
4157
  r.toLowerCase() === "content-type" && (n = i);
4090
4158
  }), 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();
4091
- }, Me = (e) => typeof e == "function" ? e() : e, St = (e, ...t) => e.reduce((n, i, r) => `${n}${i}${r in t ? String(t[r]) : ""}`, ""), Di = {
4092
- getMeta: St`
4159
+ }, Ve = (e) => typeof e == "function" ? e() : e, Rt = (e, ...t) => e.reduce((n, i, r) => `${n}${i}${r in t ? String(t[r]) : ""}`, ""), xi = {
4160
+ getMeta: Rt`
4093
4161
  query getDoctype($doctype: String!) {
4094
4162
  getMeta(doctype: $doctype) {
4095
4163
  id
@@ -4100,7 +4168,7 @@ const Pe = async (e) => {
4100
4168
  }
4101
4169
  }
4102
4170
  `
4103
- }, Si = St`
4171
+ }, ki = Rt`
4104
4172
  type Doctype {
4105
4173
  id: ID!
4106
4174
  name: String!
@@ -4146,35 +4214,35 @@ const Pe = async (e) => {
4146
4214
  query: Query
4147
4215
  mutation: Mutation
4148
4216
  }
4149
- `, bi = (e) => JSON.parse(e, (t, n) => {
4217
+ `, Ci = (e) => JSON.parse(e, (t, n) => {
4150
4218
  if (typeof n == "string")
4151
4219
  try {
4152
- return JSON.parse(n, (i, r) => typeof r == "string" && !isNaN(Number(r)) ? new ue(r) : r);
4220
+ return JSON.parse(n, (i, r) => typeof r == "string" && !isNaN(Number(r)) ? new de(r) : r);
4153
4221
  } catch {
4154
4222
  return n;
4155
4223
  }
4156
4224
  else if (!isNaN(Number(n)))
4157
- return new ue(n);
4225
+ return new de(n);
4158
4226
  return n;
4159
- }), xi = {
4227
+ }), Ri = {
4160
4228
  getMeta: async (e, t) => {
4161
- const n = new Ii(t || "/graphql", {
4229
+ const n = new _i(t || "/graphql", {
4162
4230
  jsonSerializer: {
4163
4231
  stringify: (r) => JSON.stringify(r),
4164
4232
  // process the request object before sending; leave as default JSON
4165
- parse: bi
4233
+ parse: Ci
4166
4234
  // process the response meta object
4167
4235
  }
4168
4236
  }), { getMeta: i } = await n.request({
4169
- document: Di.getMeta,
4237
+ document: xi.getMeta,
4170
4238
  variables: { doctype: e }
4171
4239
  });
4172
4240
  return i;
4173
4241
  }
4174
4242
  };
4175
4243
  export {
4176
- xi as methods,
4177
- Di as queries,
4178
- Si as typeDefs
4244
+ Ri as methods,
4245
+ xi as queries,
4246
+ ki as typeDefs
4179
4247
  };
4180
4248
  //# sourceMappingURL=graphql-client.js.map