@builtbystack/sq-shopify-theme-sdk 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -2
- package/dist/sq-shopify-theme-sdk.d.ts +38 -2
- package/dist/sq-shopify-theme-sdk.js +347 -259
- package/dist/sq-shopify-theme-sdk.umd.js +83 -51
- package/package.json +1 -1
|
@@ -54,29 +54,29 @@ function he(e, t) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
function Ke(e) {
|
|
57
|
-
return
|
|
57
|
+
return Ne(
|
|
58
58
|
e.source,
|
|
59
59
|
he(e.source, e.start)
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Ne(e, t) {
|
|
63
63
|
const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, c = t.line === 1 ? n : 0, p = t.column + c, h = `${e.name}:${a}:${p}
|
|
64
|
-
`, f = r.split(/\r\n|[\n\r]/g),
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
67
|
-
for (let T = 0; T <
|
|
68
|
-
g.push(
|
|
64
|
+
`, f = r.split(/\r\n|[\n\r]/g), C = f[i];
|
|
65
|
+
if (C.length > 120) {
|
|
66
|
+
const y = Math.floor(p / 80), I = p % 80, g = [];
|
|
67
|
+
for (let T = 0; T < C.length; T += 80)
|
|
68
|
+
g.push(C.slice(T, T + 80));
|
|
69
69
|
return h + Ie([
|
|
70
70
|
[`${a} |`, g[0]],
|
|
71
|
-
...g.slice(1,
|
|
71
|
+
...g.slice(1, y + 1).map((T) => ["|", T]),
|
|
72
72
|
["|", "^".padStart(I)],
|
|
73
|
-
["|", g[
|
|
73
|
+
["|", g[y + 1]]
|
|
74
74
|
]);
|
|
75
75
|
}
|
|
76
76
|
return h + Ie([
|
|
77
77
|
// Lines specified like this: ["prefix", "string"],
|
|
78
78
|
[`${a - 1} |`, f[i - 1]],
|
|
79
|
-
[`${a} |`,
|
|
79
|
+
[`${a} |`, C],
|
|
80
80
|
["|", "^".padStart(p)],
|
|
81
81
|
[`${a + 1} |`, f[i + 1]]
|
|
82
82
|
]);
|
|
@@ -97,7 +97,7 @@ function Ze(e) {
|
|
|
97
97
|
extensions: e[5]
|
|
98
98
|
} : t;
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class ye extends Error {
|
|
101
101
|
/**
|
|
102
102
|
* An array of `{ line, column }` locations within the source GraphQL document
|
|
103
103
|
* which correspond to this error.
|
|
@@ -138,18 +138,18 @@ class Ce extends Error {
|
|
|
138
138
|
*/
|
|
139
139
|
constructor(t, ...n) {
|
|
140
140
|
var r, i, s;
|
|
141
|
-
const { nodes: a, source: c, positions: p, path: h, originalError: f, extensions:
|
|
142
|
-
super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = f ?? void 0, this.nodes =
|
|
141
|
+
const { nodes: a, source: c, positions: p, path: h, originalError: f, extensions: C } = Ze(n);
|
|
142
|
+
super(t), this.name = "GraphQLError", this.path = h ?? void 0, this.originalError = f ?? void 0, this.nodes = Se(
|
|
143
143
|
Array.isArray(a) ? a : a ? [a] : void 0
|
|
144
144
|
);
|
|
145
|
-
const
|
|
145
|
+
const y = Se(
|
|
146
146
|
(r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
|
|
147
147
|
);
|
|
148
|
-
this.source = c ?? (
|
|
148
|
+
this.source = c ?? (y == null || (i = y[0]) === null || i === void 0 ? void 0 : i.source), this.positions = p ?? (y == null ? void 0 : y.map((g) => g.start)), this.locations = p && c ? p.map((g) => he(c, g)) : y == null ? void 0 : y.map((g) => he(g.source, g.start));
|
|
149
149
|
const I = Je(
|
|
150
150
|
f == null ? void 0 : f.extensions
|
|
151
151
|
) ? f == null ? void 0 : f.extensions : void 0;
|
|
152
|
-
this.extensions = (s =
|
|
152
|
+
this.extensions = (s = C ?? I) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, {
|
|
153
153
|
message: {
|
|
154
154
|
writable: !0,
|
|
155
155
|
enumerable: !0
|
|
@@ -173,7 +173,7 @@ class Ce extends Error {
|
|
|
173
173
|
value: f.stack,
|
|
174
174
|
writable: !0,
|
|
175
175
|
configurable: !0
|
|
176
|
-
}) : Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
176
|
+
}) : Error.captureStackTrace ? Error.captureStackTrace(this, ye) : Object.defineProperty(this, "stack", {
|
|
177
177
|
value: Error().stack,
|
|
178
178
|
writable: !0,
|
|
179
179
|
configurable: !0
|
|
@@ -193,7 +193,7 @@ class Ce extends Error {
|
|
|
193
193
|
for (const n of this.locations)
|
|
194
194
|
t += `
|
|
195
195
|
|
|
196
|
-
` +
|
|
196
|
+
` + Ne(this.source, n);
|
|
197
197
|
return t;
|
|
198
198
|
}
|
|
199
199
|
toJSON() {
|
|
@@ -203,11 +203,11 @@ class Ce extends Error {
|
|
|
203
203
|
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;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Se(e) {
|
|
207
207
|
return e === void 0 || e.length === 0 ? void 0 : e;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
return new
|
|
209
|
+
function P(e, t, n) {
|
|
210
|
+
return new ye(`Syntax Error: ${n}`, {
|
|
211
211
|
source: e,
|
|
212
212
|
positions: [t]
|
|
213
213
|
});
|
|
@@ -358,7 +358,7 @@ const be = {
|
|
|
358
358
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
359
359
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
360
360
|
}, et = new Set(Object.keys(be));
|
|
361
|
-
function
|
|
361
|
+
function Te(e) {
|
|
362
362
|
const t = e == null ? void 0 : e.kind;
|
|
363
363
|
return typeof t == "string" && et.has(t);
|
|
364
364
|
}
|
|
@@ -412,11 +412,11 @@ function it(e) {
|
|
|
412
412
|
function rt(e, t) {
|
|
413
413
|
const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((I) => I.length === 0 || fe(I.charCodeAt(0))), a = n.endsWith('\\"""'), c = e.endsWith('"') && !a, p = e.endsWith("\\"), h = c || p, f = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
414
414
|
(!i || e.length > 70 || h || s || a);
|
|
415
|
-
let
|
|
416
|
-
const
|
|
417
|
-
return (f && !
|
|
418
|
-
`),
|
|
419
|
-
`), '"""' +
|
|
415
|
+
let C = "";
|
|
416
|
+
const y = i && fe(e.charCodeAt(0));
|
|
417
|
+
return (f && !y || s) && (C += `
|
|
418
|
+
`), C += n, (f || h) && (C += `
|
|
419
|
+
`), '"""' + C + '"""';
|
|
420
420
|
}
|
|
421
421
|
var u;
|
|
422
422
|
(function(e) {
|
|
@@ -481,7 +481,7 @@ function Le(e) {
|
|
|
481
481
|
function we(e) {
|
|
482
482
|
return e >= 56320 && e <= 57343;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function M(e, t) {
|
|
485
485
|
const n = e.source.body.codePointAt(t);
|
|
486
486
|
if (n === void 0)
|
|
487
487
|
return u.EOF;
|
|
@@ -491,7 +491,7 @@ function F(e, t) {
|
|
|
491
491
|
}
|
|
492
492
|
return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function x(e, t, n, r, i) {
|
|
495
495
|
const s = e.line, a = 1 + n - e.lineStart;
|
|
496
496
|
return new De(t, n, r, s, a, i);
|
|
497
497
|
}
|
|
@@ -516,35 +516,35 @@ function ot(e, t) {
|
|
|
516
516
|
case 35:
|
|
517
517
|
return ut(e, i);
|
|
518
518
|
case 33:
|
|
519
|
-
return
|
|
519
|
+
return x(e, u.BANG, i, i + 1);
|
|
520
520
|
case 36:
|
|
521
|
-
return
|
|
521
|
+
return x(e, u.DOLLAR, i, i + 1);
|
|
522
522
|
case 38:
|
|
523
|
-
return
|
|
523
|
+
return x(e, u.AMP, i, i + 1);
|
|
524
524
|
case 40:
|
|
525
|
-
return
|
|
525
|
+
return x(e, u.PAREN_L, i, i + 1);
|
|
526
526
|
case 41:
|
|
527
|
-
return
|
|
527
|
+
return x(e, u.PAREN_R, i, i + 1);
|
|
528
528
|
case 46:
|
|
529
529
|
if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
|
|
530
|
-
return
|
|
530
|
+
return x(e, u.SPREAD, i, i + 3);
|
|
531
531
|
break;
|
|
532
532
|
case 58:
|
|
533
|
-
return
|
|
533
|
+
return x(e, u.COLON, i, i + 1);
|
|
534
534
|
case 61:
|
|
535
|
-
return
|
|
535
|
+
return x(e, u.EQUALS, i, i + 1);
|
|
536
536
|
case 64:
|
|
537
|
-
return
|
|
537
|
+
return x(e, u.AT, i, i + 1);
|
|
538
538
|
case 91:
|
|
539
|
-
return
|
|
539
|
+
return x(e, u.BRACKET_L, i, i + 1);
|
|
540
540
|
case 93:
|
|
541
|
-
return
|
|
541
|
+
return x(e, u.BRACKET_R, i, i + 1);
|
|
542
542
|
case 123:
|
|
543
|
-
return
|
|
543
|
+
return x(e, u.BRACE_L, i, i + 1);
|
|
544
544
|
case 124:
|
|
545
|
-
return
|
|
545
|
+
return x(e, u.PIPE, i, i + 1);
|
|
546
546
|
case 125:
|
|
547
|
-
return
|
|
547
|
+
return x(e, u.BRACE_R, i, i + 1);
|
|
548
548
|
case 34:
|
|
549
549
|
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? mt(e, i) : lt(e, i);
|
|
550
550
|
}
|
|
@@ -552,13 +552,13 @@ function ot(e, t) {
|
|
|
552
552
|
return ct(e, i, s);
|
|
553
553
|
if (_e(s))
|
|
554
554
|
return ft(e, i);
|
|
555
|
-
throw
|
|
555
|
+
throw P(
|
|
556
556
|
e.source,
|
|
557
557
|
i,
|
|
558
|
-
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${
|
|
558
|
+
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : G(s) || se(n, i) ? `Unexpected character: ${M(e, i)}.` : `Invalid character: ${M(e, i)}.`
|
|
559
559
|
);
|
|
560
560
|
}
|
|
561
|
-
return
|
|
561
|
+
return x(e, u.EOF, r, r);
|
|
562
562
|
}
|
|
563
563
|
function ut(e, t) {
|
|
564
564
|
const n = e.source.body, r = n.length;
|
|
@@ -574,7 +574,7 @@ function ut(e, t) {
|
|
|
574
574
|
else
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
|
-
return
|
|
577
|
+
return x(
|
|
578
578
|
e,
|
|
579
579
|
u.COMMENT,
|
|
580
580
|
t,
|
|
@@ -587,10 +587,10 @@ function ct(e, t, n) {
|
|
|
587
587
|
let i = t, s = n, a = !1;
|
|
588
588
|
if (s === 45 && (s = r.charCodeAt(++i)), s === 48) {
|
|
589
589
|
if (s = r.charCodeAt(++i), Y(s))
|
|
590
|
-
throw
|
|
590
|
+
throw P(
|
|
591
591
|
e.source,
|
|
592
592
|
i,
|
|
593
|
-
`Invalid number, unexpected digit after 0: ${
|
|
593
|
+
`Invalid number, unexpected digit after 0: ${M(
|
|
594
594
|
e,
|
|
595
595
|
i
|
|
596
596
|
)}.`
|
|
@@ -598,15 +598,15 @@ function ct(e, t, n) {
|
|
|
598
598
|
} else
|
|
599
599
|
i = ce(e, i, s), s = r.charCodeAt(i);
|
|
600
600
|
if (s === 46 && (a = !0, s = r.charCodeAt(++i), i = ce(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (a = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ce(e, i, s), s = r.charCodeAt(i)), s === 46 || _e(s))
|
|
601
|
-
throw
|
|
601
|
+
throw P(
|
|
602
602
|
e.source,
|
|
603
603
|
i,
|
|
604
|
-
`Invalid number, expected digit but got: ${
|
|
604
|
+
`Invalid number, expected digit but got: ${M(
|
|
605
605
|
e,
|
|
606
606
|
i
|
|
607
607
|
)}.`
|
|
608
608
|
);
|
|
609
|
-
return
|
|
609
|
+
return x(
|
|
610
610
|
e,
|
|
611
611
|
a ? u.FLOAT : u.INT,
|
|
612
612
|
t,
|
|
@@ -616,10 +616,10 @@ function ct(e, t, n) {
|
|
|
616
616
|
}
|
|
617
617
|
function ce(e, t, n) {
|
|
618
618
|
if (!Y(n))
|
|
619
|
-
throw
|
|
619
|
+
throw P(
|
|
620
620
|
e.source,
|
|
621
621
|
t,
|
|
622
|
-
`Invalid number, expected digit but got: ${
|
|
622
|
+
`Invalid number, expected digit but got: ${M(
|
|
623
623
|
e,
|
|
624
624
|
t
|
|
625
625
|
)}.`
|
|
@@ -636,7 +636,7 @@ function lt(e, t) {
|
|
|
636
636
|
for (; i < r; ) {
|
|
637
637
|
const c = n.charCodeAt(i);
|
|
638
638
|
if (c === 34)
|
|
639
|
-
return a += n.slice(s, i),
|
|
639
|
+
return a += n.slice(s, i), x(e, u.STRING, t, i + 1, a);
|
|
640
640
|
if (c === 92) {
|
|
641
641
|
a += n.slice(s, i);
|
|
642
642
|
const p = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? dt(e, i) : pt(e, i) : ht(e, i);
|
|
@@ -650,16 +650,16 @@ function lt(e, t) {
|
|
|
650
650
|
else if (se(n, i))
|
|
651
651
|
i += 2;
|
|
652
652
|
else
|
|
653
|
-
throw
|
|
653
|
+
throw P(
|
|
654
654
|
e.source,
|
|
655
655
|
i,
|
|
656
|
-
`Invalid character within String: ${
|
|
656
|
+
`Invalid character within String: ${M(
|
|
657
657
|
e,
|
|
658
658
|
i
|
|
659
659
|
)}.`
|
|
660
660
|
);
|
|
661
661
|
}
|
|
662
|
-
throw
|
|
662
|
+
throw P(e.source, i, "Unterminated string.");
|
|
663
663
|
}
|
|
664
664
|
function dt(e, t) {
|
|
665
665
|
const n = e.source.body;
|
|
@@ -677,7 +677,7 @@ function dt(e, t) {
|
|
|
677
677
|
if (r = r << 4 | j(s), r < 0)
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
|
-
throw
|
|
680
|
+
throw P(
|
|
681
681
|
e.source,
|
|
682
682
|
t,
|
|
683
683
|
`Invalid Unicode escape sequence: "${n.slice(
|
|
@@ -687,27 +687,27 @@ function dt(e, t) {
|
|
|
687
687
|
);
|
|
688
688
|
}
|
|
689
689
|
function pt(e, t) {
|
|
690
|
-
const n = e.source.body, r =
|
|
690
|
+
const n = e.source.body, r = xe(n, t + 2);
|
|
691
691
|
if (G(r))
|
|
692
692
|
return {
|
|
693
693
|
value: String.fromCodePoint(r),
|
|
694
694
|
size: 6
|
|
695
695
|
};
|
|
696
696
|
if (Le(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
|
|
697
|
-
const i =
|
|
697
|
+
const i = xe(n, t + 8);
|
|
698
698
|
if (we(i))
|
|
699
699
|
return {
|
|
700
700
|
value: String.fromCodePoint(r, i),
|
|
701
701
|
size: 12
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
throw
|
|
704
|
+
throw P(
|
|
705
705
|
e.source,
|
|
706
706
|
t,
|
|
707
707
|
`Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`
|
|
708
708
|
);
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function xe(e, t) {
|
|
711
711
|
return j(e.charCodeAt(t)) << 12 | j(e.charCodeAt(t + 1)) << 8 | j(e.charCodeAt(t + 2)) << 4 | j(e.charCodeAt(t + 3));
|
|
712
712
|
}
|
|
713
713
|
function j(e) {
|
|
@@ -758,7 +758,7 @@ function ht(e, t) {
|
|
|
758
758
|
size: 2
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
throw
|
|
761
|
+
throw P(
|
|
762
762
|
e.source,
|
|
763
763
|
t,
|
|
764
764
|
`Invalid character escape sequence: "${n.slice(
|
|
@@ -775,7 +775,7 @@ function mt(e, t) {
|
|
|
775
775
|
const h = n.charCodeAt(s);
|
|
776
776
|
if (h === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
777
777
|
c += n.slice(a, s), p.push(c);
|
|
778
|
-
const f =
|
|
778
|
+
const f = x(
|
|
779
779
|
e,
|
|
780
780
|
u.BLOCK_STRING,
|
|
781
781
|
t,
|
|
@@ -799,16 +799,16 @@ function mt(e, t) {
|
|
|
799
799
|
else if (se(n, s))
|
|
800
800
|
s += 2;
|
|
801
801
|
else
|
|
802
|
-
throw
|
|
802
|
+
throw P(
|
|
803
803
|
e.source,
|
|
804
804
|
s,
|
|
805
|
-
`Invalid character within String: ${
|
|
805
|
+
`Invalid character within String: ${M(
|
|
806
806
|
e,
|
|
807
807
|
s
|
|
808
808
|
)}.`
|
|
809
809
|
);
|
|
810
810
|
}
|
|
811
|
-
throw
|
|
811
|
+
throw P(e.source, s, "Unterminated string.");
|
|
812
812
|
}
|
|
813
813
|
function ft(e, t) {
|
|
814
814
|
const n = e.source.body, r = n.length;
|
|
@@ -820,7 +820,7 @@ function ft(e, t) {
|
|
|
820
820
|
else
|
|
821
821
|
break;
|
|
822
822
|
}
|
|
823
|
-
return
|
|
823
|
+
return x(
|
|
824
824
|
e,
|
|
825
825
|
u.NAME,
|
|
826
826
|
t,
|
|
@@ -828,7 +828,7 @@ function ft(e, t) {
|
|
|
828
828
|
n.slice(t, i)
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
|
-
const gt = 10,
|
|
831
|
+
const gt = 10, Me = 2;
|
|
832
832
|
function Ee(e) {
|
|
833
833
|
return ae(e, []);
|
|
834
834
|
}
|
|
@@ -839,18 +839,18 @@ function ae(e, t) {
|
|
|
839
839
|
case "function":
|
|
840
840
|
return e.name ? `[function ${e.name}]` : "[function]";
|
|
841
841
|
case "object":
|
|
842
|
-
return
|
|
842
|
+
return Ct(e, t);
|
|
843
843
|
default:
|
|
844
844
|
return String(e);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Ct(e, t) {
|
|
848
848
|
if (e === null)
|
|
849
849
|
return "null";
|
|
850
850
|
if (t.includes(e))
|
|
851
851
|
return "[Circular]";
|
|
852
852
|
const n = [...t, e];
|
|
853
|
-
if (
|
|
853
|
+
if (yt(e)) {
|
|
854
854
|
const r = e.toJSON();
|
|
855
855
|
if (r !== e)
|
|
856
856
|
return typeof r == "string" ? r : ae(r, n);
|
|
@@ -858,19 +858,19 @@ function yt(e, t) {
|
|
|
858
858
|
return At(e, n);
|
|
859
859
|
return Et(e, n);
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function yt(e) {
|
|
862
862
|
return typeof e.toJSON == "function";
|
|
863
863
|
}
|
|
864
864
|
function Et(e, t) {
|
|
865
865
|
const n = Object.entries(e);
|
|
866
|
-
return n.length === 0 ? "{}" : t.length >
|
|
866
|
+
return n.length === 0 ? "{}" : t.length > Me ? "[" + vt(e) + "]" : "{ " + n.map(
|
|
867
867
|
([i, s]) => i + ": " + ae(s, t)
|
|
868
868
|
).join(", ") + " }";
|
|
869
869
|
}
|
|
870
870
|
function At(e, t) {
|
|
871
871
|
if (e.length === 0)
|
|
872
872
|
return "[]";
|
|
873
|
-
if (t.length >
|
|
873
|
+
if (t.length > Me)
|
|
874
874
|
return "[Array]";
|
|
875
875
|
const n = Math.min(gt, e.length), r = e.length - n, i = [];
|
|
876
876
|
for (let s = 0; s < n; ++s)
|
|
@@ -919,7 +919,7 @@ spurious results.`);
|
|
|
919
919
|
return !1;
|
|
920
920
|
}
|
|
921
921
|
);
|
|
922
|
-
class
|
|
922
|
+
class Fe {
|
|
923
923
|
constructor(t, n = "GraphQL request", r = {
|
|
924
924
|
line: 1,
|
|
925
925
|
column: 1
|
|
@@ -936,15 +936,15 @@ class Me {
|
|
|
936
936
|
return "Source";
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return It(e,
|
|
939
|
+
function St(e) {
|
|
940
|
+
return It(e, Fe);
|
|
941
941
|
}
|
|
942
942
|
function Be(e, t) {
|
|
943
|
-
return new
|
|
943
|
+
return new Tt(e, t).parseDocument();
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Tt {
|
|
946
946
|
constructor(t, n = {}) {
|
|
947
|
-
const r =
|
|
947
|
+
const r = St(t) ? t : new Fe(t);
|
|
948
948
|
this._lexer = new st(r), this._options = n, this._tokenCounter = 0;
|
|
949
949
|
}
|
|
950
950
|
/**
|
|
@@ -1018,7 +1018,7 @@ class xt {
|
|
|
1018
1018
|
return this.parseDirectiveDefinition();
|
|
1019
1019
|
}
|
|
1020
1020
|
if (t)
|
|
1021
|
-
throw
|
|
1021
|
+
throw P(
|
|
1022
1022
|
this._lexer.source,
|
|
1023
1023
|
this._lexer.token.start,
|
|
1024
1024
|
"Unexpected description, descriptions are supported only on type definitions."
|
|
@@ -1292,7 +1292,7 @@ class xt {
|
|
|
1292
1292
|
if (t)
|
|
1293
1293
|
if (this.expectToken(u.DOLLAR), this._lexer.token.kind === u.NAME) {
|
|
1294
1294
|
const r = this._lexer.token.value;
|
|
1295
|
-
throw
|
|
1295
|
+
throw P(
|
|
1296
1296
|
this._lexer.source,
|
|
1297
1297
|
n.start,
|
|
1298
1298
|
`Unexpected variable "$${r}" in constant value.`
|
|
@@ -1639,7 +1639,7 @@ class xt {
|
|
|
1639
1639
|
*/
|
|
1640
1640
|
parseEnumValueName() {
|
|
1641
1641
|
if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null")
|
|
1642
|
-
throw
|
|
1642
|
+
throw P(
|
|
1643
1643
|
this._lexer.source,
|
|
1644
1644
|
this._lexer.token.start,
|
|
1645
1645
|
`${K(
|
|
@@ -1932,7 +1932,7 @@ class xt {
|
|
|
1932
1932
|
const n = this._lexer.token;
|
|
1933
1933
|
if (n.kind === t)
|
|
1934
1934
|
return this.advanceLexer(), n;
|
|
1935
|
-
throw
|
|
1935
|
+
throw P(
|
|
1936
1936
|
this._lexer.source,
|
|
1937
1937
|
n.start,
|
|
1938
1938
|
`Expected ${qe(t)}, found ${K(n)}.`
|
|
@@ -1954,7 +1954,7 @@ class xt {
|
|
|
1954
1954
|
if (n.kind === u.NAME && n.value === t)
|
|
1955
1955
|
this.advanceLexer();
|
|
1956
1956
|
else
|
|
1957
|
-
throw
|
|
1957
|
+
throw P(
|
|
1958
1958
|
this._lexer.source,
|
|
1959
1959
|
n.start,
|
|
1960
1960
|
`Expected "${t}", found ${K(n)}.`
|
|
@@ -1973,7 +1973,7 @@ class xt {
|
|
|
1973
1973
|
*/
|
|
1974
1974
|
unexpected(t) {
|
|
1975
1975
|
const n = t ?? this._lexer.token;
|
|
1976
|
-
return
|
|
1976
|
+
return P(
|
|
1977
1977
|
this._lexer.source,
|
|
1978
1978
|
n.start,
|
|
1979
1979
|
`Unexpected ${K(n)}.`
|
|
@@ -2036,7 +2036,7 @@ class xt {
|
|
|
2036
2036
|
advanceLexer() {
|
|
2037
2037
|
const { maxTokens: t } = this._options, n = this._lexer.advance();
|
|
2038
2038
|
if (t !== void 0 && n.kind !== u.EOF && (++this._tokenCounter, this._tokenCounter > t))
|
|
2039
|
-
throw
|
|
2039
|
+
throw P(
|
|
2040
2040
|
this._lexer.source,
|
|
2041
2041
|
n.start,
|
|
2042
2042
|
`Document contains more that ${t} tokens. Parsing aborted.`
|
|
@@ -2050,14 +2050,14 @@ function K(e) {
|
|
|
2050
2050
|
function qe(e) {
|
|
2051
2051
|
return at(e) ? `"${e}"` : e;
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2054
|
-
return `"${e.replace(
|
|
2053
|
+
function xt(e) {
|
|
2054
|
+
return `"${e.replace(Pt, Rt)}"`;
|
|
2055
2055
|
}
|
|
2056
|
-
const
|
|
2057
|
-
function
|
|
2058
|
-
return
|
|
2056
|
+
const Pt = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
2057
|
+
function Rt(e) {
|
|
2058
|
+
return Ot[e.charCodeAt(0)];
|
|
2059
2059
|
}
|
|
2060
|
-
const
|
|
2060
|
+
const Ot = [
|
|
2061
2061
|
"\\u0000",
|
|
2062
2062
|
"\\u0001",
|
|
2063
2063
|
"\\u0002",
|
|
@@ -2223,23 +2223,23 @@ const Nt = [
|
|
|
2223
2223
|
"\\u009D",
|
|
2224
2224
|
"\\u009E",
|
|
2225
2225
|
"\\u009F"
|
|
2226
|
-
],
|
|
2226
|
+
], Nt = Object.freeze({});
|
|
2227
2227
|
function Dt(e, t, n = be) {
|
|
2228
2228
|
const r = /* @__PURE__ */ new Map();
|
|
2229
2229
|
for (const D of Object.values(m))
|
|
2230
2230
|
r.set(D, bt(t, D));
|
|
2231
|
-
let i, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, f,
|
|
2232
|
-
const
|
|
2231
|
+
let i, s = Array.isArray(e), a = [e], c = -1, p = [], h = e, f, C;
|
|
2232
|
+
const y = [], I = [];
|
|
2233
2233
|
do {
|
|
2234
2234
|
c++;
|
|
2235
2235
|
const D = c === a.length, z = D && p.length !== 0;
|
|
2236
2236
|
if (D) {
|
|
2237
|
-
if (f = I.length === 0 ? void 0 :
|
|
2237
|
+
if (f = I.length === 0 ? void 0 : y[y.length - 1], h = C, C = I.pop(), z)
|
|
2238
2238
|
if (s) {
|
|
2239
2239
|
h = h.slice();
|
|
2240
2240
|
let b = 0;
|
|
2241
|
-
for (const [
|
|
2242
|
-
const Q =
|
|
2241
|
+
for (const [F, J] of p) {
|
|
2242
|
+
const Q = F - b;
|
|
2243
2243
|
J === null ? (h.splice(Q, 1), b++) : h[Q] = J;
|
|
2244
2244
|
}
|
|
2245
2245
|
} else {
|
|
@@ -2247,46 +2247,46 @@ function Dt(e, t, n = be) {
|
|
|
2247
2247
|
{},
|
|
2248
2248
|
Object.getOwnPropertyDescriptors(h)
|
|
2249
2249
|
);
|
|
2250
|
-
for (const [b,
|
|
2251
|
-
h[b] =
|
|
2250
|
+
for (const [b, F] of p)
|
|
2251
|
+
h[b] = F;
|
|
2252
2252
|
}
|
|
2253
2253
|
c = i.index, a = i.keys, p = i.edits, s = i.inArray, i = i.prev;
|
|
2254
|
-
} else if (
|
|
2255
|
-
if (f = s ? c : a[c], h =
|
|
2254
|
+
} else if (C) {
|
|
2255
|
+
if (f = s ? c : a[c], h = C[f], h == null)
|
|
2256
2256
|
continue;
|
|
2257
|
-
|
|
2257
|
+
y.push(f);
|
|
2258
2258
|
}
|
|
2259
2259
|
let _;
|
|
2260
2260
|
if (!Array.isArray(h)) {
|
|
2261
2261
|
var g, T;
|
|
2262
|
-
|
|
2262
|
+
Te(h) || Z(!1, `Invalid AST Node: ${Ee(h)}.`);
|
|
2263
2263
|
const b = D ? (g = r.get(h.kind)) === null || g === void 0 ? void 0 : g.leave : (T = r.get(h.kind)) === null || T === void 0 ? void 0 : T.enter;
|
|
2264
|
-
if (_ = b == null ? void 0 : b.call(t, h, f,
|
|
2264
|
+
if (_ = b == null ? void 0 : b.call(t, h, f, C, y, I), _ === Nt)
|
|
2265
2265
|
break;
|
|
2266
2266
|
if (_ === !1) {
|
|
2267
2267
|
if (!D) {
|
|
2268
|
-
|
|
2268
|
+
y.pop();
|
|
2269
2269
|
continue;
|
|
2270
2270
|
}
|
|
2271
2271
|
} else if (_ !== void 0 && (p.push([f, _]), !D))
|
|
2272
|
-
if (
|
|
2272
|
+
if (Te(_))
|
|
2273
2273
|
h = _;
|
|
2274
2274
|
else {
|
|
2275
|
-
|
|
2275
|
+
y.pop();
|
|
2276
2276
|
continue;
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
2279
|
if (_ === void 0 && z && p.push([f, h]), D)
|
|
2280
|
-
|
|
2280
|
+
y.pop();
|
|
2281
2281
|
else {
|
|
2282
|
-
var
|
|
2282
|
+
var N;
|
|
2283
2283
|
i = {
|
|
2284
2284
|
inArray: s,
|
|
2285
2285
|
index: c,
|
|
2286
2286
|
keys: a,
|
|
2287
2287
|
edits: p,
|
|
2288
2288
|
prev: i
|
|
2289
|
-
}, s = Array.isArray(h), a = s ? h : (
|
|
2289
|
+
}, s = Array.isArray(h), a = s ? h : (N = n[h.kind]) !== null && N !== void 0 ? N : [], c = -1, p = [], C && I.push(C), C = h;
|
|
2290
2290
|
}
|
|
2291
2291
|
} while (i !== void 0);
|
|
2292
2292
|
return p.length !== 0 ? p[p.length - 1][1] : e;
|
|
@@ -2378,7 +2378,7 @@ const _t = 80, Lt = {
|
|
|
2378
2378
|
leave: ({ value: e }) => e
|
|
2379
2379
|
},
|
|
2380
2380
|
StringValue: {
|
|
2381
|
-
leave: ({ value: e, block: t }) => t ? rt(e) :
|
|
2381
|
+
leave: ({ value: e, block: t }) => t ? rt(e) : xt(e)
|
|
2382
2382
|
},
|
|
2383
2383
|
BooleanValue: {
|
|
2384
2384
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2439,7 +2439,7 @@ const _t = 80, Lt = {
|
|
|
2439
2439
|
},
|
|
2440
2440
|
FieldDefinition: {
|
|
2441
2441
|
leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => A("", e, `
|
|
2442
|
-
`) + t + (
|
|
2442
|
+
`) + t + (Pe(n) ? A(`(
|
|
2443
2443
|
`, W(d(n, `
|
|
2444
2444
|
`)), `
|
|
2445
2445
|
)`) : A("(", d(n, ", "), ")")) + ": " + r + A(" ", d(i, " "))
|
|
@@ -2485,7 +2485,7 @@ const _t = 80, Lt = {
|
|
|
2485
2485
|
},
|
|
2486
2486
|
DirectiveDefinition: {
|
|
2487
2487
|
leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => A("", e, `
|
|
2488
|
-
`) + "directive @" + t + (
|
|
2488
|
+
`) + "directive @" + t + (Pe(n) ? A(`(
|
|
2489
2489
|
`, W(d(n, `
|
|
2490
2490
|
`)), `
|
|
2491
2491
|
)`) : A("(", d(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + d(i, " | ")
|
|
@@ -2558,31 +2558,31 @@ function W(e) {
|
|
|
2558
2558
|
return A(" ", e.replace(/\n/g, `
|
|
2559
2559
|
`));
|
|
2560
2560
|
}
|
|
2561
|
-
function
|
|
2561
|
+
function Pe(e) {
|
|
2562
2562
|
var t;
|
|
2563
2563
|
return (t = e == null ? void 0 : e.some((n) => n.includes(`
|
|
2564
2564
|
`))) !== null && t !== void 0 ? t : !1;
|
|
2565
2565
|
}
|
|
2566
|
-
var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(),
|
|
2566
|
+
var ee = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), Ve = !0, ie = !1;
|
|
2567
2567
|
function Ge(e) {
|
|
2568
2568
|
return e.replace(/[\s,]+/g, " ").trim();
|
|
2569
2569
|
}
|
|
2570
2570
|
function wt(e) {
|
|
2571
2571
|
return Ge(e.source.body.substring(e.start, e.end));
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2573
|
+
function Mt(e) {
|
|
2574
2574
|
var t = /* @__PURE__ */ new Set(), n = [];
|
|
2575
2575
|
return e.definitions.forEach(function(r) {
|
|
2576
2576
|
if (r.kind === "FragmentDefinition") {
|
|
2577
2577
|
var i = r.name.value, s = wt(r.loc), a = ge.get(i);
|
|
2578
|
-
a && !a.has(s) ?
|
|
2578
|
+
a && !a.has(s) ? Ve && console.warn("Warning: fragment with name " + i + ` already exists.
|
|
2579
2579
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
2580
2580
|
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`) : a || ge.set(i, a = /* @__PURE__ */ new Set()), a.add(s), t.has(s) || (t.add(s), n.push(r));
|
|
2581
2581
|
} else
|
|
2582
2582
|
n.push(r);
|
|
2583
2583
|
}), ne(ne({}, e), { definitions: n });
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2585
|
+
function Ft(e) {
|
|
2586
2586
|
var t = new Set(e.definitions);
|
|
2587
2587
|
t.forEach(function(r) {
|
|
2588
2588
|
r.loc && delete r.loc, Object.keys(r).forEach(function(i) {
|
|
@@ -2602,11 +2602,11 @@ function Bt(e) {
|
|
|
2602
2602
|
});
|
|
2603
2603
|
if (!n || n.kind !== "Document")
|
|
2604
2604
|
throw new Error("Not a valid GraphQL document.");
|
|
2605
|
-
ee.set(t, Mt(
|
|
2605
|
+
ee.set(t, Ft(Mt(n)));
|
|
2606
2606
|
}
|
|
2607
2607
|
return ee.get(t);
|
|
2608
2608
|
}
|
|
2609
|
-
function
|
|
2609
|
+
function V(e) {
|
|
2610
2610
|
for (var t = [], n = 1; n < arguments.length; n++)
|
|
2611
2611
|
t[n - 1] = arguments[n];
|
|
2612
2612
|
typeof e == "string" && (e = [e]);
|
|
@@ -2618,27 +2618,27 @@ function U(e) {
|
|
|
2618
2618
|
function qt() {
|
|
2619
2619
|
ee.clear(), ge.clear();
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2622
|
-
|
|
2621
|
+
function Vt() {
|
|
2622
|
+
Ve = !1;
|
|
2623
2623
|
}
|
|
2624
2624
|
function Gt() {
|
|
2625
2625
|
ie = !0;
|
|
2626
2626
|
}
|
|
2627
|
-
function
|
|
2627
|
+
function Ut() {
|
|
2628
2628
|
ie = !1;
|
|
2629
2629
|
}
|
|
2630
|
-
var
|
|
2631
|
-
gql:
|
|
2630
|
+
var $ = {
|
|
2631
|
+
gql: V,
|
|
2632
2632
|
resetCaches: qt,
|
|
2633
|
-
disableFragmentWarnings:
|
|
2633
|
+
disableFragmentWarnings: Vt,
|
|
2634
2634
|
enableExperimentalFragmentVariables: Gt,
|
|
2635
|
-
disableExperimentalFragmentVariables:
|
|
2635
|
+
disableExperimentalFragmentVariables: Ut
|
|
2636
2636
|
};
|
|
2637
2637
|
(function(e) {
|
|
2638
|
-
e.gql =
|
|
2639
|
-
})(
|
|
2640
|
-
|
|
2641
|
-
const
|
|
2638
|
+
e.gql = $.gql, e.resetCaches = $.resetCaches, e.disableFragmentWarnings = $.disableFragmentWarnings, e.enableExperimentalFragmentVariables = $.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = $.disableExperimentalFragmentVariables;
|
|
2639
|
+
})(V || (V = {}));
|
|
2640
|
+
V.default = V;
|
|
2641
|
+
const S = V, $t = S`
|
|
2642
2642
|
query GetLocationAvailabilities($sku: String!, $first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
2643
2643
|
locationAvailabilities(
|
|
2644
2644
|
sku: $sku
|
|
@@ -2677,7 +2677,7 @@ const x = U, Vt = x`
|
|
|
2677
2677
|
}
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
|
-
`, jt =
|
|
2680
|
+
`, jt = S`
|
|
2681
2681
|
query GetLocationAvailability($sku: String!, $locationID: ID!) {
|
|
2682
2682
|
locationAvailability(sku: $sku, locationID: $locationID) {
|
|
2683
2683
|
location {
|
|
@@ -2703,7 +2703,7 @@ const x = U, Vt = x`
|
|
|
2703
2703
|
inventoryQuantity
|
|
2704
2704
|
}
|
|
2705
2705
|
}
|
|
2706
|
-
`, Ht =
|
|
2706
|
+
`, Ht = S`
|
|
2707
2707
|
query GetPurchasingCustomerMetafield($namespace: String!, $key: String!) {
|
|
2708
2708
|
purchasingCustomerMetafield(namespace: $namespace, key: $key) {
|
|
2709
2709
|
id
|
|
@@ -2712,7 +2712,7 @@ const x = U, Vt = x`
|
|
|
2712
2712
|
value
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
|
-
`, Yt =
|
|
2715
|
+
`, Yt = S`
|
|
2716
2716
|
query GetPoints {
|
|
2717
2717
|
purchasingCustomer {
|
|
2718
2718
|
pointsApproved
|
|
@@ -2724,7 +2724,7 @@ const x = U, Vt = x`
|
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
2726
|
}
|
|
2727
|
-
`, zt =
|
|
2727
|
+
`, zt = S`
|
|
2728
2728
|
query GetLocations($first: Int, $after: String, $filter: LocationFilter, $isReverse: Boolean! = false) {
|
|
2729
2729
|
locations(first: $first, after: $after, filter: $filter, isReverse: $isReverse) {
|
|
2730
2730
|
nodes {
|
|
@@ -2755,7 +2755,7 @@ const x = U, Vt = x`
|
|
|
2755
2755
|
}
|
|
2756
2756
|
}
|
|
2757
2757
|
}
|
|
2758
|
-
`, Jt =
|
|
2758
|
+
`, Jt = S`
|
|
2759
2759
|
query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
2760
2760
|
purchasingCustomer {
|
|
2761
2761
|
id
|
|
@@ -2784,14 +2784,14 @@ const x = U, Vt = x`
|
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
2786
|
}
|
|
2787
|
-
`, Qt =
|
|
2787
|
+
`, Qt = S`
|
|
2788
2788
|
query GetPurchasingCustomerDiscountCodeCount {
|
|
2789
2789
|
purchasingCustomer {
|
|
2790
2790
|
id
|
|
2791
2791
|
orderPriceAdjustmentRuleCount
|
|
2792
2792
|
}
|
|
2793
2793
|
}
|
|
2794
|
-
`, Xt =
|
|
2794
|
+
`, Xt = S`
|
|
2795
2795
|
query GetPurchasingCustomerPointChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: PointChangeActivitySortKey! = CREATED_AT) {
|
|
2796
2796
|
purchasingCustomer {
|
|
2797
2797
|
id
|
|
@@ -2851,7 +2851,7 @@ const x = U, Vt = x`
|
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
2853
|
}
|
|
2854
|
-
`, Kt =
|
|
2854
|
+
`, Kt = S`
|
|
2855
2855
|
query GetPurchasingCustomerRank {
|
|
2856
2856
|
purchasingCustomer {
|
|
2857
2857
|
currentCustomerRank {
|
|
@@ -2892,14 +2892,14 @@ const x = U, Vt = x`
|
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
2895
|
-
`, Zt =
|
|
2895
|
+
`, Zt = S`
|
|
2896
2896
|
query GetSharingPurchasingCustomerCount {
|
|
2897
2897
|
purchasingCustomer {
|
|
2898
2898
|
id
|
|
2899
2899
|
sharingPurchasingCustomerCount
|
|
2900
2900
|
}
|
|
2901
2901
|
}
|
|
2902
|
-
`, Wt =
|
|
2902
|
+
`, Wt = S`
|
|
2903
2903
|
query GetPurchasingCustomerSharing {
|
|
2904
2904
|
purchasingCustomer {
|
|
2905
2905
|
id
|
|
@@ -2916,7 +2916,7 @@ const x = U, Vt = x`
|
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
`, en =
|
|
2919
|
+
`, en = S`
|
|
2920
2920
|
query GetProduct($id: String!, $first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ProductVariantSortKeys! = CREATED_AT) {
|
|
2921
2921
|
productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
|
|
2922
2922
|
id
|
|
@@ -2948,14 +2948,14 @@ const x = U, Vt = x`
|
|
|
2948
2948
|
}
|
|
2949
2949
|
}
|
|
2950
2950
|
}
|
|
2951
|
-
`, tn =
|
|
2951
|
+
`, tn = S`
|
|
2952
2952
|
query GetHasBackOrderProductVariantsByProductShopifyLegacyResourceID($id: String!) {
|
|
2953
2953
|
productByProductShopifyLegacyResourceID(productShopifyLegacyResourceID: $id) {
|
|
2954
2954
|
id
|
|
2955
2955
|
hasBackOrderProductVariants
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
|
-
`, nn =
|
|
2958
|
+
`, nn = S`
|
|
2959
2959
|
query GetPointCampaignOrderRuleTargetCustomerRank {
|
|
2960
2960
|
pointCampaignOrderRuleTargetCustomerRank {
|
|
2961
2961
|
pointCampaignOrderRule {
|
|
@@ -2968,7 +2968,7 @@ const x = U, Vt = x`
|
|
|
2968
2968
|
fixedPoint
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
|
-
`, rn =
|
|
2971
|
+
`, rn = S`
|
|
2972
2972
|
query GetEstimatedShopifyCartPoint($input: EstimatedShopifyCartPointInput!) {
|
|
2973
2973
|
estimatedShopifyCartPoint(input: $input) {
|
|
2974
2974
|
pointsEarning
|
|
@@ -2984,7 +2984,7 @@ const x = U, Vt = x`
|
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
|
-
`, sn =
|
|
2987
|
+
`, sn = S`
|
|
2988
2988
|
query GetEstimatedShopifyCartLineItemPoint($input: EstimatedShopifyCartLineItemPointInput!) {
|
|
2989
2989
|
estimatedShopifyCartLineItemPoint(input: $input) {
|
|
2990
2990
|
pointsEarning
|
|
@@ -3000,7 +3000,15 @@ const x = U, Vt = x`
|
|
|
3000
3000
|
}
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
|
-
`, an =
|
|
3003
|
+
`, an = S`
|
|
3004
|
+
query GetPurchasingCustomerSMS {
|
|
3005
|
+
purchasingCustomer {
|
|
3006
|
+
id
|
|
3007
|
+
smsVerified
|
|
3008
|
+
smsVerifiedPhone
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
`, on = S`
|
|
3004
3012
|
mutation PurchasingCustomerSendCustomerSharingActivationCode {
|
|
3005
3013
|
purchasingCustomerSendCustomerSharingActivationCode {
|
|
3006
3014
|
purchasingCustomer {
|
|
@@ -3016,7 +3024,7 @@ const x = U, Vt = x`
|
|
|
3016
3024
|
}
|
|
3017
3025
|
}
|
|
3018
3026
|
}
|
|
3019
|
-
`,
|
|
3027
|
+
`, un = S`
|
|
3020
3028
|
mutation PurchasingCustomerActivateCustomerSharing($email: String!, $activationCode: String!) {
|
|
3021
3029
|
purchasingCustomerActivateCustomerSharing(
|
|
3022
3030
|
input: {email: $email, activationCode: $activationCode}
|
|
@@ -3031,13 +3039,13 @@ const x = U, Vt = x`
|
|
|
3031
3039
|
}
|
|
3032
3040
|
}
|
|
3033
3041
|
}
|
|
3034
|
-
`,
|
|
3042
|
+
`, cn = S`
|
|
3035
3043
|
query GetMiles {
|
|
3036
3044
|
purchasingCustomer {
|
|
3037
3045
|
miles
|
|
3038
3046
|
}
|
|
3039
3047
|
}
|
|
3040
|
-
`,
|
|
3048
|
+
`, ln = S`
|
|
3041
3049
|
query GetPurchasingCustomerMileChangeActivities($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileChangeActivitySortKey! = CREATED_AT) {
|
|
3042
3050
|
purchasingCustomer {
|
|
3043
3051
|
id
|
|
@@ -3066,7 +3074,7 @@ const x = U, Vt = x`
|
|
|
3066
3074
|
}
|
|
3067
3075
|
}
|
|
3068
3076
|
}
|
|
3069
|
-
`,
|
|
3077
|
+
`, dn = S`
|
|
3070
3078
|
query GetMileItems($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: ShopifyMileItemSortKey! = CREATED_AT) {
|
|
3071
3079
|
mileItems(
|
|
3072
3080
|
first: $first
|
|
@@ -3094,7 +3102,7 @@ const x = U, Vt = x`
|
|
|
3094
3102
|
}
|
|
3095
3103
|
}
|
|
3096
3104
|
}
|
|
3097
|
-
`,
|
|
3105
|
+
`, pn = S`
|
|
3098
3106
|
query GetMileOrders($first: Int, $after: String, $isReverse: Boolean! = false, $sortKeys: MileOrderSortKey! = CREATED_AT) {
|
|
3099
3107
|
purchasingCustomer {
|
|
3100
3108
|
id
|
|
@@ -3120,6 +3128,7 @@ const x = U, Vt = x`
|
|
|
3120
3128
|
}
|
|
3121
3129
|
miles
|
|
3122
3130
|
exchangedAt
|
|
3131
|
+
isCancelled
|
|
3123
3132
|
}
|
|
3124
3133
|
pageInfo {
|
|
3125
3134
|
startCursor
|
|
@@ -3130,7 +3139,7 @@ const x = U, Vt = x`
|
|
|
3130
3139
|
}
|
|
3131
3140
|
}
|
|
3132
3141
|
}
|
|
3133
|
-
`,
|
|
3142
|
+
`, hn = S`
|
|
3134
3143
|
mutation MileItemExchange($mileItemID: ID!) {
|
|
3135
3144
|
mileItemExchange(input: {mileItemID: $mileItemID}) {
|
|
3136
3145
|
mileOrder {
|
|
@@ -3149,14 +3158,37 @@ const x = U, Vt = x`
|
|
|
3149
3158
|
}
|
|
3150
3159
|
miles
|
|
3151
3160
|
exchangedAt
|
|
3161
|
+
isCancelled
|
|
3162
|
+
}
|
|
3163
|
+
}
|
|
3164
|
+
}
|
|
3165
|
+
`, mn = S`
|
|
3166
|
+
mutation PurchasingCustomerSendSMSVerificationCode($phone: String!) {
|
|
3167
|
+
purchasingCustomerSendSMSVerificationCode(input: {phone: $phone}) {
|
|
3168
|
+
purchasingCustomer {
|
|
3169
|
+
id
|
|
3170
|
+
smsVerified
|
|
3171
|
+
smsVerifiedPhone
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
`, fn = S`
|
|
3176
|
+
mutation PurchasingCustomerVerifySMS($phone: String!, $verificationCode: String!) {
|
|
3177
|
+
purchasingCustomerVerifySMS(
|
|
3178
|
+
input: {phone: $phone, verificationCode: $verificationCode}
|
|
3179
|
+
) {
|
|
3180
|
+
purchasingCustomer {
|
|
3181
|
+
id
|
|
3182
|
+
smsVerified
|
|
3183
|
+
smsVerifiedPhone
|
|
3152
3184
|
}
|
|
3153
3185
|
}
|
|
3154
3186
|
}
|
|
3155
|
-
`,
|
|
3156
|
-
function
|
|
3187
|
+
`, gn = (e, t, n, r) => e();
|
|
3188
|
+
function Cn(e, t = gn) {
|
|
3157
3189
|
return {
|
|
3158
3190
|
GetLocationAvailabilities(n, r) {
|
|
3159
|
-
return t((i) => e.request(
|
|
3191
|
+
return t((i) => e.request($t, n, { ...r, ...i }), "GetLocationAvailabilities", "query", n);
|
|
3160
3192
|
},
|
|
3161
3193
|
GetLocationAvailability(n, r) {
|
|
3162
3194
|
return t((i) => e.request(jt, n, { ...r, ...i }), "GetLocationAvailability", "query", n);
|
|
@@ -3203,49 +3235,58 @@ function mn(e, t = hn) {
|
|
|
3203
3235
|
GetEstimatedShopifyCartLineItemPoint(n, r) {
|
|
3204
3236
|
return t((i) => e.request(sn, n, { ...r, ...i }), "GetEstimatedShopifyCartLineItemPoint", "query", n);
|
|
3205
3237
|
},
|
|
3238
|
+
GetPurchasingCustomerSMS(n, r) {
|
|
3239
|
+
return t((i) => e.request(an, n, { ...r, ...i }), "GetPurchasingCustomerSMS", "query", n);
|
|
3240
|
+
},
|
|
3206
3241
|
PurchasingCustomerSendCustomerSharingActivationCode(n, r) {
|
|
3207
|
-
return t((i) => e.request(
|
|
3242
|
+
return t((i) => e.request(on, n, { ...r, ...i }), "PurchasingCustomerSendCustomerSharingActivationCode", "mutation", n);
|
|
3208
3243
|
},
|
|
3209
3244
|
PurchasingCustomerActivateCustomerSharing(n, r) {
|
|
3210
|
-
return t((i) => e.request(
|
|
3245
|
+
return t((i) => e.request(un, n, { ...r, ...i }), "PurchasingCustomerActivateCustomerSharing", "mutation", n);
|
|
3211
3246
|
},
|
|
3212
3247
|
GetMiles(n, r) {
|
|
3213
|
-
return t((i) => e.request(
|
|
3248
|
+
return t((i) => e.request(cn, n, { ...r, ...i }), "GetMiles", "query", n);
|
|
3214
3249
|
},
|
|
3215
3250
|
GetPurchasingCustomerMileChangeActivities(n, r) {
|
|
3216
|
-
return t((i) => e.request(
|
|
3251
|
+
return t((i) => e.request(ln, n, { ...r, ...i }), "GetPurchasingCustomerMileChangeActivities", "query", n);
|
|
3217
3252
|
},
|
|
3218
3253
|
GetMileItems(n, r) {
|
|
3219
|
-
return t((i) => e.request(
|
|
3254
|
+
return t((i) => e.request(dn, n, { ...r, ...i }), "GetMileItems", "query", n);
|
|
3220
3255
|
},
|
|
3221
3256
|
GetMileOrders(n, r) {
|
|
3222
|
-
return t((i) => e.request(
|
|
3257
|
+
return t((i) => e.request(pn, n, { ...r, ...i }), "GetMileOrders", "query", n);
|
|
3223
3258
|
},
|
|
3224
3259
|
MileItemExchange(n, r) {
|
|
3225
|
-
return t((i) => e.request(
|
|
3260
|
+
return t((i) => e.request(hn, n, { ...r, ...i }), "MileItemExchange", "mutation", n);
|
|
3261
|
+
},
|
|
3262
|
+
PurchasingCustomerSendSMSVerificationCode(n, r) {
|
|
3263
|
+
return t((i) => e.request(mn, n, { ...r, ...i }), "PurchasingCustomerSendSMSVerificationCode", "mutation", n);
|
|
3264
|
+
},
|
|
3265
|
+
PurchasingCustomerVerifySMS(n, r) {
|
|
3266
|
+
return t((i) => e.request(fn, n, { ...r, ...i }), "PurchasingCustomerVerifySMS", "mutation", n);
|
|
3226
3267
|
}
|
|
3227
3268
|
};
|
|
3228
3269
|
}
|
|
3229
|
-
const Ae = JSON,
|
|
3270
|
+
const Ae = JSON, yn = (e) => e.toUpperCase(), En = (e) => {
|
|
3230
3271
|
const t = {};
|
|
3231
3272
|
return e.forEach((n, r) => {
|
|
3232
3273
|
t[r] = n;
|
|
3233
3274
|
}), t;
|
|
3234
|
-
},
|
|
3275
|
+
}, An = (e, t, n) => e.document ? e : {
|
|
3235
3276
|
document: e,
|
|
3236
3277
|
variables: t,
|
|
3237
3278
|
requestHeaders: n,
|
|
3238
3279
|
signal: void 0
|
|
3239
|
-
},
|
|
3280
|
+
}, vn = (e, t, n) => e.query ? e : {
|
|
3240
3281
|
query: e,
|
|
3241
3282
|
variables: t,
|
|
3242
3283
|
requestHeaders: n,
|
|
3243
3284
|
signal: void 0
|
|
3244
|
-
},
|
|
3285
|
+
}, In = (e, t) => e.documents ? e : {
|
|
3245
3286
|
documents: e,
|
|
3246
3287
|
requestHeaders: t,
|
|
3247
3288
|
signal: void 0
|
|
3248
|
-
},
|
|
3289
|
+
}, Re = (e) => {
|
|
3249
3290
|
var r, i;
|
|
3250
3291
|
let t;
|
|
3251
3292
|
const n = e.definitions.filter((s) => s.kind === "OperationDefinition");
|
|
@@ -3255,12 +3296,12 @@ const Ae = JSON, fn = (e) => e.toUpperCase(), gn = (e) => {
|
|
|
3255
3296
|
let n;
|
|
3256
3297
|
try {
|
|
3257
3298
|
const r = Be(e);
|
|
3258
|
-
n =
|
|
3299
|
+
n = Re(r);
|
|
3259
3300
|
} catch {
|
|
3260
3301
|
}
|
|
3261
3302
|
return { query: e, operationName: n };
|
|
3262
3303
|
}
|
|
3263
|
-
const t =
|
|
3304
|
+
const t = Re(e);
|
|
3264
3305
|
return { query: kt(e), operationName: t };
|
|
3265
3306
|
};
|
|
3266
3307
|
class H extends Error {
|
|
@@ -3276,13 +3317,13 @@ class H extends Error {
|
|
|
3276
3317
|
return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`;
|
|
3277
3318
|
}
|
|
3278
3319
|
}
|
|
3279
|
-
var
|
|
3280
|
-
function
|
|
3320
|
+
var Sn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3321
|
+
function Tn(e) {
|
|
3281
3322
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3282
3323
|
}
|
|
3283
|
-
var
|
|
3324
|
+
var Ce = { exports: {} };
|
|
3284
3325
|
(function(e, t) {
|
|
3285
|
-
var n = typeof self < "u" ? self :
|
|
3326
|
+
var n = typeof self < "u" ? self : Sn, r = function() {
|
|
3286
3327
|
function s() {
|
|
3287
3328
|
this.fetch = !1, this.DOMException = n.DOMException;
|
|
3288
3329
|
}
|
|
@@ -3320,12 +3361,12 @@ var ye = { exports: {} };
|
|
|
3320
3361
|
], f = ArrayBuffer.isView || function(o) {
|
|
3321
3362
|
return o && h.indexOf(Object.prototype.toString.call(o)) > -1;
|
|
3322
3363
|
};
|
|
3323
|
-
function
|
|
3364
|
+
function C(o) {
|
|
3324
3365
|
if (typeof o != "string" && (o = String(o)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(o))
|
|
3325
3366
|
throw new TypeError("Invalid character in header field name");
|
|
3326
3367
|
return o.toLowerCase();
|
|
3327
3368
|
}
|
|
3328
|
-
function
|
|
3369
|
+
function y(o) {
|
|
3329
3370
|
return typeof o != "string" && (o = String(o)), o;
|
|
3330
3371
|
}
|
|
3331
3372
|
function I(o) {
|
|
@@ -3349,17 +3390,17 @@ var ye = { exports: {} };
|
|
|
3349
3390
|
}, this);
|
|
3350
3391
|
}
|
|
3351
3392
|
g.prototype.append = function(o, l) {
|
|
3352
|
-
o =
|
|
3393
|
+
o = C(o), l = y(l);
|
|
3353
3394
|
var E = this.map[o];
|
|
3354
3395
|
this.map[o] = E ? E + ", " + l : l;
|
|
3355
3396
|
}, g.prototype.delete = function(o) {
|
|
3356
|
-
delete this.map[
|
|
3397
|
+
delete this.map[C(o)];
|
|
3357
3398
|
}, g.prototype.get = function(o) {
|
|
3358
|
-
return o =
|
|
3399
|
+
return o = C(o), this.has(o) ? this.map[o] : null;
|
|
3359
3400
|
}, g.prototype.has = function(o) {
|
|
3360
|
-
return this.map.hasOwnProperty(
|
|
3401
|
+
return this.map.hasOwnProperty(C(o));
|
|
3361
3402
|
}, g.prototype.set = function(o, l) {
|
|
3362
|
-
this.map[
|
|
3403
|
+
this.map[C(o)] = y(l);
|
|
3363
3404
|
}, g.prototype.forEach = function(o, l) {
|
|
3364
3405
|
for (var E in this.map)
|
|
3365
3406
|
this.map.hasOwnProperty(E) && o.call(l, this.map[E], E, this);
|
|
@@ -3384,7 +3425,7 @@ var ye = { exports: {} };
|
|
|
3384
3425
|
return Promise.reject(new TypeError("Already read"));
|
|
3385
3426
|
o.bodyUsed = !0;
|
|
3386
3427
|
}
|
|
3387
|
-
function
|
|
3428
|
+
function N(o) {
|
|
3388
3429
|
return new Promise(function(l, E) {
|
|
3389
3430
|
o.onload = function() {
|
|
3390
3431
|
l(o.result);
|
|
@@ -3394,16 +3435,16 @@ var ye = { exports: {} };
|
|
|
3394
3435
|
});
|
|
3395
3436
|
}
|
|
3396
3437
|
function D(o) {
|
|
3397
|
-
var l = new FileReader(), E =
|
|
3438
|
+
var l = new FileReader(), E = N(l);
|
|
3398
3439
|
return l.readAsArrayBuffer(o), E;
|
|
3399
3440
|
}
|
|
3400
3441
|
function z(o) {
|
|
3401
|
-
var l = new FileReader(), E =
|
|
3442
|
+
var l = new FileReader(), E = N(l);
|
|
3402
3443
|
return l.readAsText(o), E;
|
|
3403
3444
|
}
|
|
3404
3445
|
function _(o) {
|
|
3405
|
-
for (var l = new Uint8Array(o), E = new Array(l.length),
|
|
3406
|
-
E[
|
|
3446
|
+
for (var l = new Uint8Array(o), E = new Array(l.length), O = 0; O < l.length; O++)
|
|
3447
|
+
E[O] = String.fromCharCode(l[O]);
|
|
3407
3448
|
return E.join("");
|
|
3408
3449
|
}
|
|
3409
3450
|
function b(o) {
|
|
@@ -3412,7 +3453,7 @@ var ye = { exports: {} };
|
|
|
3412
3453
|
var l = new Uint8Array(o.byteLength);
|
|
3413
3454
|
return l.set(new Uint8Array(o)), l.buffer;
|
|
3414
3455
|
}
|
|
3415
|
-
function
|
|
3456
|
+
function F() {
|
|
3416
3457
|
return this.bodyUsed = !1, this._initBody = function(o) {
|
|
3417
3458
|
this._bodyInit = o, o ? typeof o == "string" ? this._bodyText = o : c.blob && Blob.prototype.isPrototypeOf(o) ? this._bodyBlob = o : c.formData && FormData.prototype.isPrototypeOf(o) ? this._bodyFormData = o : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) ? this._bodyText = o.toString() : c.arrayBuffer && c.blob && p(o) ? (this._bodyArrayBuffer = b(o.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : c.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(o) || f(o)) ? this._bodyArrayBuffer = b(o) : this._bodyText = o = Object.prototype.toString.call(o) : this._bodyText = "", this.headers.get("content-type") || (typeof o == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : c.searchParams && URLSearchParams.prototype.isPrototypeOf(o) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
3418
3459
|
}, c.blob && (this.blob = function() {
|
|
@@ -3440,7 +3481,7 @@ var ye = { exports: {} };
|
|
|
3440
3481
|
throw new Error("could not read FormData body as text");
|
|
3441
3482
|
return Promise.resolve(this._bodyText);
|
|
3442
3483
|
}, c.formData && (this.formData = function() {
|
|
3443
|
-
return this.text().then(
|
|
3484
|
+
return this.text().then(Ue);
|
|
3444
3485
|
}), this.json = function() {
|
|
3445
3486
|
return this.text().then(JSON.parse);
|
|
3446
3487
|
}, this;
|
|
@@ -3466,30 +3507,30 @@ var ye = { exports: {} };
|
|
|
3466
3507
|
w.prototype.clone = function() {
|
|
3467
3508
|
return new w(this, { body: this._bodyInit });
|
|
3468
3509
|
};
|
|
3469
|
-
function
|
|
3510
|
+
function Ue(o) {
|
|
3470
3511
|
var l = new FormData();
|
|
3471
3512
|
return o.trim().split("&").forEach(function(E) {
|
|
3472
3513
|
if (E) {
|
|
3473
|
-
var
|
|
3474
|
-
l.append(decodeURIComponent(
|
|
3514
|
+
var O = E.split("="), R = O.shift().replace(/\+/g, " "), v = O.join("=").replace(/\+/g, " ");
|
|
3515
|
+
l.append(decodeURIComponent(R), decodeURIComponent(v));
|
|
3475
3516
|
}
|
|
3476
3517
|
}), l;
|
|
3477
3518
|
}
|
|
3478
|
-
function
|
|
3519
|
+
function $e(o) {
|
|
3479
3520
|
var l = new g(), E = o.replace(/\r?\n[\t ]+/g, " ");
|
|
3480
|
-
return E.split(/\r?\n/).forEach(function(
|
|
3481
|
-
var
|
|
3521
|
+
return E.split(/\r?\n/).forEach(function(O) {
|
|
3522
|
+
var R = O.split(":"), v = R.shift().trim();
|
|
3482
3523
|
if (v) {
|
|
3483
|
-
var X =
|
|
3524
|
+
var X = R.join(":").trim();
|
|
3484
3525
|
l.append(v, X);
|
|
3485
3526
|
}
|
|
3486
3527
|
}), l;
|
|
3487
3528
|
}
|
|
3488
|
-
|
|
3529
|
+
F.call(w.prototype);
|
|
3489
3530
|
function L(o, l) {
|
|
3490
3531
|
l || (l = {}), this.type = "default", this.status = l.status === void 0 ? 200 : l.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in l ? l.statusText : "OK", this.headers = new g(l.headers), this.url = l.url || "", this._initBody(o);
|
|
3491
3532
|
}
|
|
3492
|
-
|
|
3533
|
+
F.call(L.prototype), L.prototype.clone = function() {
|
|
3493
3534
|
return new L(this._bodyInit, {
|
|
3494
3535
|
status: this.status,
|
|
3495
3536
|
statusText: this.statusText,
|
|
@@ -3511,39 +3552,39 @@ var ye = { exports: {} };
|
|
|
3511
3552
|
} catch {
|
|
3512
3553
|
a.DOMException = function(l, E) {
|
|
3513
3554
|
this.message = l, this.name = E;
|
|
3514
|
-
var
|
|
3515
|
-
this.stack =
|
|
3555
|
+
var O = Error(l);
|
|
3556
|
+
this.stack = O.stack;
|
|
3516
3557
|
}, a.DOMException.prototype = Object.create(Error.prototype), a.DOMException.prototype.constructor = a.DOMException;
|
|
3517
3558
|
}
|
|
3518
3559
|
function oe(o, l) {
|
|
3519
|
-
return new Promise(function(E,
|
|
3520
|
-
var
|
|
3521
|
-
if (
|
|
3522
|
-
return
|
|
3560
|
+
return new Promise(function(E, O) {
|
|
3561
|
+
var R = new w(o, l);
|
|
3562
|
+
if (R.signal && R.signal.aborted)
|
|
3563
|
+
return O(new a.DOMException("Aborted", "AbortError"));
|
|
3523
3564
|
var v = new XMLHttpRequest();
|
|
3524
3565
|
function X() {
|
|
3525
3566
|
v.abort();
|
|
3526
3567
|
}
|
|
3527
3568
|
v.onload = function() {
|
|
3528
|
-
var
|
|
3569
|
+
var U = {
|
|
3529
3570
|
status: v.status,
|
|
3530
3571
|
statusText: v.statusText,
|
|
3531
|
-
headers:
|
|
3572
|
+
headers: $e(v.getAllResponseHeaders() || "")
|
|
3532
3573
|
};
|
|
3533
|
-
|
|
3574
|
+
U.url = "responseURL" in v ? v.responseURL : U.headers.get("X-Request-URL");
|
|
3534
3575
|
var ue = "response" in v ? v.response : v.responseText;
|
|
3535
|
-
E(new L(ue,
|
|
3576
|
+
E(new L(ue, U));
|
|
3536
3577
|
}, v.onerror = function() {
|
|
3537
|
-
|
|
3578
|
+
O(new TypeError("Network request failed"));
|
|
3538
3579
|
}, v.ontimeout = function() {
|
|
3539
|
-
|
|
3580
|
+
O(new TypeError("Network request failed"));
|
|
3540
3581
|
}, v.onabort = function() {
|
|
3541
|
-
|
|
3542
|
-
}, v.open(
|
|
3543
|
-
v.setRequestHeader(ue,
|
|
3544
|
-
}),
|
|
3545
|
-
v.readyState === 4 &&
|
|
3546
|
-
}), v.send(typeof
|
|
3582
|
+
O(new a.DOMException("Aborted", "AbortError"));
|
|
3583
|
+
}, v.open(R.method, R.url, !0), R.credentials === "include" ? v.withCredentials = !0 : R.credentials === "omit" && (v.withCredentials = !1), "responseType" in v && c.blob && (v.responseType = "blob"), R.headers.forEach(function(U, ue) {
|
|
3584
|
+
v.setRequestHeader(ue, U);
|
|
3585
|
+
}), R.signal && (R.signal.addEventListener("abort", X), v.onreadystatechange = function() {
|
|
3586
|
+
v.readyState === 4 && R.signal.removeEventListener("abort", X);
|
|
3587
|
+
}), v.send(typeof R._bodyInit > "u" ? null : R._bodyInit);
|
|
3547
3588
|
});
|
|
3548
3589
|
}
|
|
3549
3590
|
return oe.polyfill = !0, s.fetch || (s.fetch = oe, s.Headers = g, s.Request = w, s.Response = L), a.Headers = g, a.Request = w, a.Response = L, a.fetch = oe, Object.defineProperty(a, "__esModule", { value: !0 }), a;
|
|
@@ -3551,54 +3592,54 @@ var ye = { exports: {} };
|
|
|
3551
3592
|
})(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill;
|
|
3552
3593
|
var i = r;
|
|
3553
3594
|
t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t;
|
|
3554
|
-
})(
|
|
3555
|
-
var re =
|
|
3556
|
-
const te = /* @__PURE__ */
|
|
3595
|
+
})(Ce, Ce.exports);
|
|
3596
|
+
var re = Ce.exports;
|
|
3597
|
+
const te = /* @__PURE__ */ Tn(re), xn = /* @__PURE__ */ ze({
|
|
3557
3598
|
__proto__: null,
|
|
3558
3599
|
default: te
|
|
3559
3600
|
}, [re]), B = (e) => {
|
|
3560
3601
|
let t = {};
|
|
3561
|
-
return e && (typeof Headers < "u" && e instanceof Headers ||
|
|
3602
|
+
return e && (typeof Headers < "u" && e instanceof Headers || xn && re.Headers && e instanceof re.Headers ? t = En(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
|
|
3562
3603
|
n && r !== void 0 && (t[n] = r);
|
|
3563
3604
|
}) : t = e), t;
|
|
3564
|
-
},
|
|
3605
|
+
}, Oe = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), Pn = (e) => {
|
|
3565
3606
|
if (!Array.isArray(e.query)) {
|
|
3566
|
-
const r = e, i = [`query=${encodeURIComponent(
|
|
3607
|
+
const r = e, i = [`query=${encodeURIComponent(Oe(r.query))}`];
|
|
3567
3608
|
return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
|
|
3568
3609
|
}
|
|
3569
3610
|
if (typeof e.variables < "u" && !Array.isArray(e.variables))
|
|
3570
3611
|
throw new Error("Cannot create query with given variable type, array expected");
|
|
3571
3612
|
const t = e, n = e.query.reduce((r, i, s) => (r.push({
|
|
3572
|
-
query:
|
|
3613
|
+
query: Oe(i),
|
|
3573
3614
|
variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
|
|
3574
3615
|
}), r), []);
|
|
3575
3616
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
3576
|
-
},
|
|
3617
|
+
}, Rn = (e) => async (t) => {
|
|
3577
3618
|
const { url: n, query: r, variables: i, operationName: s, fetch: a, fetchOptions: c, middleware: p } = t, h = { ...t.headers };
|
|
3578
|
-
let f = "",
|
|
3579
|
-
e === "POST" ? (
|
|
3619
|
+
let f = "", C;
|
|
3620
|
+
e === "POST" ? (C = Nn(r, i, s, c.jsonSerializer), typeof C == "string" && (h["Content-Type"] = "application/json")) : f = Pn({
|
|
3580
3621
|
query: r,
|
|
3581
3622
|
variables: i,
|
|
3582
3623
|
operationName: s,
|
|
3583
3624
|
jsonSerializer: c.jsonSerializer ?? Ae
|
|
3584
3625
|
});
|
|
3585
|
-
const
|
|
3626
|
+
const y = {
|
|
3586
3627
|
method: e,
|
|
3587
3628
|
headers: h,
|
|
3588
|
-
body:
|
|
3629
|
+
body: C,
|
|
3589
3630
|
...c
|
|
3590
3631
|
};
|
|
3591
|
-
let I = n, g =
|
|
3632
|
+
let I = n, g = y;
|
|
3592
3633
|
if (p) {
|
|
3593
|
-
const T = await Promise.resolve(p({ ...
|
|
3594
|
-
I =
|
|
3634
|
+
const T = await Promise.resolve(p({ ...y, url: n, operationName: s, variables: i })), { url: N, ...D } = T;
|
|
3635
|
+
I = N, g = D;
|
|
3595
3636
|
}
|
|
3596
3637
|
return f && (I = `${I}?${f}`), await a(I, g);
|
|
3597
3638
|
};
|
|
3598
|
-
class
|
|
3639
|
+
class On {
|
|
3599
3640
|
constructor(t, n = {}) {
|
|
3600
3641
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
|
|
3601
|
-
const [i, s, a] = r, c =
|
|
3642
|
+
const [i, s, a] = r, c = vn(i, s, a), { headers: p, fetch: h = te, method: f = "POST", requestMiddleware: C, responseMiddleware: y, ...I } = this.requestConfig, { url: g } = this;
|
|
3602
3643
|
c.signal !== void 0 && (I.signal = c.signal);
|
|
3603
3644
|
const { operationName: T } = le(c.query);
|
|
3604
3645
|
return de({
|
|
@@ -3613,18 +3654,18 @@ class Sn {
|
|
|
3613
3654
|
fetch: h,
|
|
3614
3655
|
method: f,
|
|
3615
3656
|
fetchOptions: I,
|
|
3616
|
-
middleware:
|
|
3617
|
-
}).then((
|
|
3618
|
-
throw
|
|
3657
|
+
middleware: C
|
|
3658
|
+
}).then((N) => (y && y(N), N)).catch((N) => {
|
|
3659
|
+
throw y && y(N), N;
|
|
3619
3660
|
});
|
|
3620
3661
|
};
|
|
3621
3662
|
}
|
|
3622
3663
|
async request(t, ...n) {
|
|
3623
|
-
const [r, i] = n, s =
|
|
3624
|
-
s.signal !== void 0 && (
|
|
3664
|
+
const [r, i] = n, s = An(t, r, i), { headers: a, fetch: c = te, method: p = "POST", requestMiddleware: h, responseMiddleware: f, ...C } = this.requestConfig, { url: y } = this;
|
|
3665
|
+
s.signal !== void 0 && (C.signal = s.signal);
|
|
3625
3666
|
const { query: I, operationName: g } = le(s.document);
|
|
3626
3667
|
return de({
|
|
3627
|
-
url:
|
|
3668
|
+
url: y,
|
|
3628
3669
|
query: I,
|
|
3629
3670
|
variables: s.variables,
|
|
3630
3671
|
headers: {
|
|
@@ -3634,7 +3675,7 @@ class Sn {
|
|
|
3634
3675
|
operationName: g,
|
|
3635
3676
|
fetch: c,
|
|
3636
3677
|
method: p,
|
|
3637
|
-
fetchOptions:
|
|
3678
|
+
fetchOptions: C,
|
|
3638
3679
|
middleware: h
|
|
3639
3680
|
}).then((T) => (f && f(T), T.data)).catch((T) => {
|
|
3640
3681
|
throw f && f(T), T;
|
|
@@ -3642,7 +3683,7 @@ class Sn {
|
|
|
3642
3683
|
}
|
|
3643
3684
|
// prettier-ignore
|
|
3644
3685
|
batchRequests(t, n) {
|
|
3645
|
-
const r =
|
|
3686
|
+
const r = In(t, n), { headers: i, ...s } = this.requestConfig;
|
|
3646
3687
|
r.signal !== void 0 && (s.signal = r.signal);
|
|
3647
3688
|
const a = r.documents.map(({ document: p }) => le(p).query), c = r.documents.map(({ variables: p }) => p);
|
|
3648
3689
|
return de({
|
|
@@ -3681,11 +3722,11 @@ class Sn {
|
|
|
3681
3722
|
}
|
|
3682
3723
|
}
|
|
3683
3724
|
const de = async (e) => {
|
|
3684
|
-
const { query: t, variables: n, fetchOptions: r } = e, i =
|
|
3725
|
+
const { query: t, variables: n, fetchOptions: r } = e, i = Rn(yn(e.method ?? "post")), s = Array.isArray(e.query), a = await i(e), c = await Dn(a, r.jsonSerializer ?? Ae), p = Array.isArray(c) ? !c.some(({ data: f }) => !f) : !!c.data, h = Array.isArray(c) || !c.errors || Array.isArray(c.errors) && !c.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
|
|
3685
3726
|
if (a.ok && h && p) {
|
|
3686
|
-
const { errors: f, ...
|
|
3727
|
+
const { errors: f, ...C } = (Array.isArray(c), c), y = r.errorPolicy === "ignore" ? C : c;
|
|
3687
3728
|
return {
|
|
3688
|
-
...s ? { data:
|
|
3729
|
+
...s ? { data: y } : y,
|
|
3689
3730
|
headers: a.headers,
|
|
3690
3731
|
status: a.status
|
|
3691
3732
|
};
|
|
@@ -3699,7 +3740,7 @@ const de = async (e) => {
|
|
|
3699
3740
|
{ query: t, variables: n }
|
|
3700
3741
|
);
|
|
3701
3742
|
}
|
|
3702
|
-
},
|
|
3743
|
+
}, Nn = (e, t, n, r) => {
|
|
3703
3744
|
const i = r ?? Ae;
|
|
3704
3745
|
if (!Array.isArray(e))
|
|
3705
3746
|
return i.stringify({ query: e, variables: t, operationName: n });
|
|
@@ -3707,18 +3748,18 @@ const de = async (e) => {
|
|
|
3707
3748
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
3708
3749
|
const s = e.reduce((a, c, p) => (a.push({ query: c, variables: t ? t[p] : void 0 }), a), []);
|
|
3709
3750
|
return i.stringify(s);
|
|
3710
|
-
},
|
|
3751
|
+
}, Dn = async (e, t) => {
|
|
3711
3752
|
let n;
|
|
3712
3753
|
return e.headers.forEach((r, i) => {
|
|
3713
3754
|
i.toLowerCase() === "content-type" && (n = r);
|
|
3714
3755
|
}), 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();
|
|
3715
3756
|
}, pe = (e) => typeof e == "function" ? e() : e;
|
|
3716
|
-
var
|
|
3717
|
-
class
|
|
3757
|
+
var bn = /* @__PURE__ */ ((e) => (e.Eur = "EUR", e.Jpy = "JPY", e.Usd = "USD", e))(bn || {}), kn = /* @__PURE__ */ ((e) => (e.Retail = "RETAIL", e.Warehouse = "WAREHOUSE", e))(kn || {});
|
|
3758
|
+
class Ln {
|
|
3718
3759
|
constructor(t) {
|
|
3719
3760
|
ve(this, "api");
|
|
3720
|
-
this.api =
|
|
3721
|
-
new
|
|
3761
|
+
this.api = Cn(
|
|
3762
|
+
new On(`${t}/apps/sq-api`, {
|
|
3722
3763
|
headers: {
|
|
3723
3764
|
"X-SQ-CLIENT": "ShopifyAppProxy"
|
|
3724
3765
|
}
|
|
@@ -4162,7 +4203,7 @@ class bn {
|
|
|
4162
4203
|
} : null;
|
|
4163
4204
|
}
|
|
4164
4205
|
/**
|
|
4165
|
-
* purchasingCustomerActivateCustomerSharing
|
|
4206
|
+
* purchasingCustomerActivateCustomerSharing はアクティベーションコードを入力して顧客を有効化する。
|
|
4166
4207
|
*/
|
|
4167
4208
|
async purchasingCustomerActivateCustomerSharing(t, n) {
|
|
4168
4209
|
if (n.length !== 6)
|
|
@@ -4286,11 +4327,23 @@ class bn {
|
|
|
4286
4327
|
endsAt: a.mileItem.endsAt ? new Date(a.mileItem.endsAt) : void 0
|
|
4287
4328
|
},
|
|
4288
4329
|
miles: a.miles,
|
|
4289
|
-
exchangedAt: new Date(a.exchangedAt)
|
|
4330
|
+
exchangedAt: new Date(a.exchangedAt),
|
|
4331
|
+
isCancelled: a.isCancelled
|
|
4290
4332
|
})),
|
|
4291
4333
|
pageInfo: s.purchasingCustomer.mileOrders.pageInfo
|
|
4292
4334
|
} : null;
|
|
4293
4335
|
}
|
|
4336
|
+
/**
|
|
4337
|
+
* getPurchasingCustomerSMS は顧客のSMS認証情報を返します。
|
|
4338
|
+
*/
|
|
4339
|
+
async getPurchasingCustomerSMS() {
|
|
4340
|
+
const t = await this.api.GetPurchasingCustomerSMS();
|
|
4341
|
+
return t.purchasingCustomer ? {
|
|
4342
|
+
id: t.purchasingCustomer.id,
|
|
4343
|
+
smsVerifiedPhone: t.purchasingCustomer.smsVerifiedPhone,
|
|
4344
|
+
smsVerified: t.purchasingCustomer.smsVerified
|
|
4345
|
+
} : null;
|
|
4346
|
+
}
|
|
4294
4347
|
/**
|
|
4295
4348
|
* mileItemExchange は指定したマイル商品を交換します。
|
|
4296
4349
|
*
|
|
@@ -4315,12 +4368,47 @@ class bn {
|
|
|
4315
4368
|
endsAt: n.mileItemExchange.mileOrder.mileItem.endsAt ? new Date(n.mileItemExchange.mileOrder.mileItem.endsAt) : void 0
|
|
4316
4369
|
},
|
|
4317
4370
|
miles: n.mileItemExchange.mileOrder.miles,
|
|
4318
|
-
exchangedAt: new Date(n.mileItemExchange.mileOrder.exchangedAt)
|
|
4371
|
+
exchangedAt: new Date(n.mileItemExchange.mileOrder.exchangedAt),
|
|
4372
|
+
isCancelled: n.mileItemExchange.mileOrder.isCancelled
|
|
4373
|
+
} : null;
|
|
4374
|
+
}
|
|
4375
|
+
/**
|
|
4376
|
+
* purchasingCustomerSendSMSVerificationCode は指定された電話番号に対して、SMS認証用コード(数字6桁)を送信します。
|
|
4377
|
+
*
|
|
4378
|
+
* @param {string} phone SMS認証コードを送信する電話番号
|
|
4379
|
+
*/
|
|
4380
|
+
async purchasingCustomerSendSMSVerificationCode(t) {
|
|
4381
|
+
var i;
|
|
4382
|
+
const r = (i = (await this.api.PurchasingCustomerSendSMSVerificationCode({
|
|
4383
|
+
phone: t
|
|
4384
|
+
})).purchasingCustomerSendSMSVerificationCode) == null ? void 0 : i.purchasingCustomer;
|
|
4385
|
+
return r ? {
|
|
4386
|
+
id: r.id,
|
|
4387
|
+
smsVerifiedPhone: r.smsVerifiedPhone,
|
|
4388
|
+
smsVerified: r.smsVerified
|
|
4389
|
+
} : null;
|
|
4390
|
+
}
|
|
4391
|
+
/**
|
|
4392
|
+
* purchasingCustomerVerifySMS はSMS認証用コード(数字6桁)を指定して、SMS認証を行います。
|
|
4393
|
+
*
|
|
4394
|
+
* @param {string} phone SMS認証コードを送信した電話番号
|
|
4395
|
+
* @param {string} verificationCode SMS認証用コード
|
|
4396
|
+
*/
|
|
4397
|
+
async purchasingCustomerVerifySMS(t, n) {
|
|
4398
|
+
var s;
|
|
4399
|
+
const i = (s = (await this.api.PurchasingCustomerVerifySMS({
|
|
4400
|
+
phone: t,
|
|
4401
|
+
verificationCode: n
|
|
4402
|
+
})).purchasingCustomerVerifySMS) == null ? void 0 : s.purchasingCustomer;
|
|
4403
|
+
return i ? {
|
|
4404
|
+
id: i.id,
|
|
4405
|
+
smsVerifiedPhone: i.smsVerifiedPhone,
|
|
4406
|
+
smsVerified: i.smsVerified
|
|
4319
4407
|
} : null;
|
|
4320
4408
|
}
|
|
4321
4409
|
}
|
|
4322
4410
|
export {
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4411
|
+
bn as CurrencyCode,
|
|
4412
|
+
kn as LocationType,
|
|
4413
|
+
Ln as SDK
|
|
4326
4414
|
};
|