@builtbystack/sq-shopify-theme-sdk 0.0.19 → 0.0.22
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.doc.md +7 -0
- package/README.md +48 -1
- package/dist/sq-shopify-theme-sdk.d.ts +31 -1
- package/dist/sq-shopify-theme-sdk.js +219 -199
- package/dist/sq-shopify-theme-sdk.umd.js +25 -14
- package/package.json +2 -4
|
@@ -70,7 +70,7 @@ function nt(e) {
|
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
function Oe(e, t) {
|
|
73
|
-
const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s,
|
|
73
|
+
const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, u = t.line === 1 ? n : 0, h = t.column + u, p = `${e.name}:${o}:${h}
|
|
74
74
|
`, m = r.split(/\r\n|[\n\r]/g), y = m[i];
|
|
75
75
|
if (y.length > 120) {
|
|
76
76
|
const C = Math.floor(h / 80), T = h % 80, g = [];
|
|
@@ -148,14 +148,14 @@ class Ee extends Error {
|
|
|
148
148
|
*/
|
|
149
149
|
constructor(t, ...n) {
|
|
150
150
|
var r, i, s;
|
|
151
|
-
const { nodes: o, source:
|
|
151
|
+
const { nodes: o, source: u, positions: h, path: p, originalError: m, extensions: y } = rt(n);
|
|
152
152
|
super(t), this.name = "GraphQLError", this.path = p ?? void 0, this.originalError = m ?? void 0, this.nodes = Ne(
|
|
153
153
|
Array.isArray(o) ? o : o ? [o] : void 0
|
|
154
154
|
);
|
|
155
155
|
const C = Ne(
|
|
156
156
|
(r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null)
|
|
157
157
|
);
|
|
158
|
-
this.source =
|
|
158
|
+
this.source = u ?? (C == null || (i = C[0]) === null || i === void 0 ? void 0 : i.source), this.positions = h ?? (C == null ? void 0 : C.map((g) => g.start)), this.locations = h && u ? h.map((g) => pe(u, g)) : C == null ? void 0 : C.map((g) => pe(g.source, g.start));
|
|
159
159
|
const T = Ze(
|
|
160
160
|
m == null ? void 0 : m.extensions
|
|
161
161
|
) ? m == null ? void 0 : m.extensions : void 0;
|
|
@@ -405,22 +405,22 @@ function at(e) {
|
|
|
405
405
|
let n = Number.MAX_SAFE_INTEGER, r = null, i = -1;
|
|
406
406
|
for (let o = 0; o < e.length; ++o) {
|
|
407
407
|
var s;
|
|
408
|
-
const
|
|
409
|
-
h !==
|
|
408
|
+
const u = e[o], h = ct(u);
|
|
409
|
+
h !== u.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && h < n && (n = h));
|
|
410
410
|
}
|
|
411
|
-
return e.map((o,
|
|
411
|
+
return e.map((o, u) => u === 0 ? o : o.slice(n)).slice(
|
|
412
412
|
(t = r) !== null && t !== void 0 ? t : 0,
|
|
413
413
|
i + 1
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function ct(e) {
|
|
417
417
|
let t = 0;
|
|
418
418
|
for (; t < e.length && me(e.charCodeAt(t)); )
|
|
419
419
|
++t;
|
|
420
420
|
return t;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
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((T) => T.length === 0 || me(T.charCodeAt(0))), o = n.endsWith('\\"""'),
|
|
422
|
+
function ut(e, t) {
|
|
423
|
+
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((T) => T.length === 0 || me(T.charCodeAt(0))), o = n.endsWith('\\"""'), u = e.endsWith('"') && !o, h = e.endsWith("\\"), p = u || h, m = !(t != null && t.minimize) && // add leading and trailing new lines only if it improves readability
|
|
424
424
|
(!i || e.length > 70 || p || s || o);
|
|
425
425
|
let y = "";
|
|
426
426
|
const C = i && me(e.charCodeAt(0));
|
|
@@ -428,10 +428,10 @@ function ct(e, t) {
|
|
|
428
428
|
`), y += n, (m || p) && (y += `
|
|
429
429
|
`), '"""' + y + '"""';
|
|
430
430
|
}
|
|
431
|
-
var
|
|
431
|
+
var c;
|
|
432
432
|
(function(e) {
|
|
433
433
|
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";
|
|
434
|
-
})(
|
|
434
|
+
})(c || (c = {}));
|
|
435
435
|
class lt {
|
|
436
436
|
/**
|
|
437
437
|
* The previously focused non-ignored token.
|
|
@@ -446,7 +446,7 @@ class lt {
|
|
|
446
446
|
* The character offset at which the current line begins.
|
|
447
447
|
*/
|
|
448
448
|
constructor(t) {
|
|
449
|
-
const n = new Re(
|
|
449
|
+
const n = new Re(c.SOF, 0, 0, 0, 0);
|
|
450
450
|
this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
|
|
451
451
|
}
|
|
452
452
|
get [Symbol.toStringTag]() {
|
|
@@ -464,7 +464,7 @@ class lt {
|
|
|
464
464
|
*/
|
|
465
465
|
lookahead() {
|
|
466
466
|
let t = this.token;
|
|
467
|
-
if (t.kind !==
|
|
467
|
+
if (t.kind !== c.EOF)
|
|
468
468
|
do
|
|
469
469
|
if (t.next)
|
|
470
470
|
t = t.next;
|
|
@@ -472,12 +472,12 @@ class lt {
|
|
|
472
472
|
const n = ht(this, t.end);
|
|
473
473
|
t.next = n, n.prev = t, t = n;
|
|
474
474
|
}
|
|
475
|
-
while (t.kind ===
|
|
475
|
+
while (t.kind === c.COMMENT);
|
|
476
476
|
return t;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
function dt(e) {
|
|
480
|
-
return e ===
|
|
480
|
+
return e === c.BANG || e === c.DOLLAR || e === c.AMP || e === c.PAREN_L || e === c.PAREN_R || e === c.SPREAD || e === c.COLON || e === c.EQUALS || e === c.AT || e === c.BRACKET_L || e === c.BRACKET_R || e === c.BRACE_L || e === c.PIPE || e === c.BRACE_R;
|
|
481
481
|
}
|
|
482
482
|
function V(e) {
|
|
483
483
|
return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
|
|
@@ -494,7 +494,7 @@ function we(e) {
|
|
|
494
494
|
function F(e, t) {
|
|
495
495
|
const n = e.source.body.codePointAt(t);
|
|
496
496
|
if (n === void 0)
|
|
497
|
-
return
|
|
497
|
+
return c.EOF;
|
|
498
498
|
if (n >= 32 && n <= 126) {
|
|
499
499
|
const r = String.fromCodePoint(n);
|
|
500
500
|
return r === '"' ? `'"'` : `"${r}"`;
|
|
@@ -526,35 +526,35 @@ function ht(e, t) {
|
|
|
526
526
|
case 35:
|
|
527
527
|
return pt(e, i);
|
|
528
528
|
case 33:
|
|
529
|
-
return I(e,
|
|
529
|
+
return I(e, c.BANG, i, i + 1);
|
|
530
530
|
case 36:
|
|
531
|
-
return I(e,
|
|
531
|
+
return I(e, c.DOLLAR, i, i + 1);
|
|
532
532
|
case 38:
|
|
533
|
-
return I(e,
|
|
533
|
+
return I(e, c.AMP, i, i + 1);
|
|
534
534
|
case 40:
|
|
535
|
-
return I(e,
|
|
535
|
+
return I(e, c.PAREN_L, i, i + 1);
|
|
536
536
|
case 41:
|
|
537
|
-
return I(e,
|
|
537
|
+
return I(e, c.PAREN_R, i, i + 1);
|
|
538
538
|
case 46:
|
|
539
539
|
if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46)
|
|
540
|
-
return I(e,
|
|
540
|
+
return I(e, c.SPREAD, i, i + 3);
|
|
541
541
|
break;
|
|
542
542
|
case 58:
|
|
543
|
-
return I(e,
|
|
543
|
+
return I(e, c.COLON, i, i + 1);
|
|
544
544
|
case 61:
|
|
545
|
-
return I(e,
|
|
545
|
+
return I(e, c.EQUALS, i, i + 1);
|
|
546
546
|
case 64:
|
|
547
|
-
return I(e,
|
|
547
|
+
return I(e, c.AT, i, i + 1);
|
|
548
548
|
case 91:
|
|
549
|
-
return I(e,
|
|
549
|
+
return I(e, c.BRACKET_L, i, i + 1);
|
|
550
550
|
case 93:
|
|
551
|
-
return I(e,
|
|
551
|
+
return I(e, c.BRACKET_R, i, i + 1);
|
|
552
552
|
case 123:
|
|
553
|
-
return I(e,
|
|
553
|
+
return I(e, c.BRACE_L, i, i + 1);
|
|
554
554
|
case 124:
|
|
555
|
-
return I(e,
|
|
555
|
+
return I(e, c.PIPE, i, i + 1);
|
|
556
556
|
case 125:
|
|
557
|
-
return I(e,
|
|
557
|
+
return I(e, c.BRACE_R, i, i + 1);
|
|
558
558
|
case 34:
|
|
559
559
|
return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? Et(e, i) : mt(e, i);
|
|
560
560
|
}
|
|
@@ -568,7 +568,7 @@ function ht(e, t) {
|
|
|
568
568
|
s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : V(s) || se(n, i) ? `Unexpected character: ${F(e, i)}.` : `Invalid character: ${F(e, i)}.`
|
|
569
569
|
);
|
|
570
570
|
}
|
|
571
|
-
return I(e,
|
|
571
|
+
return I(e, c.EOF, r, r);
|
|
572
572
|
}
|
|
573
573
|
function pt(e, t) {
|
|
574
574
|
const n = e.source.body, r = n.length;
|
|
@@ -586,7 +586,7 @@ function pt(e, t) {
|
|
|
586
586
|
}
|
|
587
587
|
return I(
|
|
588
588
|
e,
|
|
589
|
-
|
|
589
|
+
c.COMMENT,
|
|
590
590
|
t,
|
|
591
591
|
i,
|
|
592
592
|
n.slice(t + 1, i)
|
|
@@ -606,8 +606,8 @@ function ft(e, t, n) {
|
|
|
606
606
|
)}.`
|
|
607
607
|
);
|
|
608
608
|
} else
|
|
609
|
-
i =
|
|
610
|
-
if (s === 46 && (o = !0, s = r.charCodeAt(++i), i =
|
|
609
|
+
i = ue(e, i, s), s = r.charCodeAt(i);
|
|
610
|
+
if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = ue(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = ue(e, i, s), s = r.charCodeAt(i)), s === 46 || Pe(s))
|
|
611
611
|
throw b(
|
|
612
612
|
e.source,
|
|
613
613
|
i,
|
|
@@ -618,13 +618,13 @@ function ft(e, t, n) {
|
|
|
618
618
|
);
|
|
619
619
|
return I(
|
|
620
620
|
e,
|
|
621
|
-
o ?
|
|
621
|
+
o ? c.FLOAT : c.INT,
|
|
622
622
|
t,
|
|
623
623
|
i,
|
|
624
624
|
r.slice(t, i)
|
|
625
625
|
);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function ue(e, t, n) {
|
|
628
628
|
if (!Y(n))
|
|
629
629
|
throw b(
|
|
630
630
|
e.source,
|
|
@@ -644,18 +644,18 @@ function mt(e, t) {
|
|
|
644
644
|
const n = e.source.body, r = n.length;
|
|
645
645
|
let i = t + 1, s = i, o = "";
|
|
646
646
|
for (; i < r; ) {
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
return o += n.slice(s, i), I(e,
|
|
650
|
-
if (
|
|
647
|
+
const u = n.charCodeAt(i);
|
|
648
|
+
if (u === 34)
|
|
649
|
+
return o += n.slice(s, i), I(e, c.STRING, t, i + 1, o);
|
|
650
|
+
if (u === 92) {
|
|
651
651
|
o += n.slice(s, i);
|
|
652
652
|
const h = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? gt(e, i) : yt(e, i) : Ct(e, i);
|
|
653
653
|
o += h.value, i += h.size, s = i;
|
|
654
654
|
continue;
|
|
655
655
|
}
|
|
656
|
-
if (
|
|
656
|
+
if (u === 10 || u === 13)
|
|
657
657
|
break;
|
|
658
|
-
if (V(
|
|
658
|
+
if (V(u))
|
|
659
659
|
++i;
|
|
660
660
|
else if (se(n, i))
|
|
661
661
|
i += 2;
|
|
@@ -684,7 +684,7 @@ function gt(e, t) {
|
|
|
684
684
|
size: i
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
|
-
if (r = r << 4 |
|
|
687
|
+
if (r = r << 4 | G(s), r < 0)
|
|
688
688
|
break;
|
|
689
689
|
}
|
|
690
690
|
throw b(
|
|
@@ -718,9 +718,9 @@ function yt(e, t) {
|
|
|
718
718
|
);
|
|
719
719
|
}
|
|
720
720
|
function be(e, t) {
|
|
721
|
-
return
|
|
721
|
+
return G(e.charCodeAt(t)) << 12 | G(e.charCodeAt(t + 1)) << 8 | G(e.charCodeAt(t + 2)) << 4 | G(e.charCodeAt(t + 3));
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function G(e) {
|
|
724
724
|
return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
|
|
725
725
|
}
|
|
726
726
|
function Ct(e, t) {
|
|
@@ -779,15 +779,15 @@ function Ct(e, t) {
|
|
|
779
779
|
}
|
|
780
780
|
function Et(e, t) {
|
|
781
781
|
const n = e.source.body, r = n.length;
|
|
782
|
-
let i = e.lineStart, s = t + 3, o = s,
|
|
782
|
+
let i = e.lineStart, s = t + 3, o = s, u = "";
|
|
783
783
|
const h = [];
|
|
784
784
|
for (; s < r; ) {
|
|
785
785
|
const p = n.charCodeAt(s);
|
|
786
786
|
if (p === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
|
|
787
|
-
|
|
787
|
+
u += n.slice(o, s), h.push(u);
|
|
788
788
|
const m = I(
|
|
789
789
|
e,
|
|
790
|
-
|
|
790
|
+
c.BLOCK_STRING,
|
|
791
791
|
t,
|
|
792
792
|
s + 3,
|
|
793
793
|
// Return a string of the lines joined with U+000A.
|
|
@@ -797,11 +797,11 @@ function Et(e, t) {
|
|
|
797
797
|
return e.line += h.length - 1, e.lineStart = i, m;
|
|
798
798
|
}
|
|
799
799
|
if (p === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
|
|
800
|
-
|
|
800
|
+
u += n.slice(o, s), o = s + 1, s += 4;
|
|
801
801
|
continue;
|
|
802
802
|
}
|
|
803
803
|
if (p === 10 || p === 13) {
|
|
804
|
-
|
|
804
|
+
u += n.slice(o, s), h.push(u), p === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", o = s, i = s;
|
|
805
805
|
continue;
|
|
806
806
|
}
|
|
807
807
|
if (V(p))
|
|
@@ -832,7 +832,7 @@ function vt(e, t) {
|
|
|
832
832
|
}
|
|
833
833
|
return I(
|
|
834
834
|
e,
|
|
835
|
-
|
|
835
|
+
c.NAME,
|
|
836
836
|
t,
|
|
837
837
|
i,
|
|
838
838
|
n.slice(t, i)
|
|
@@ -961,7 +961,7 @@ class Ot {
|
|
|
961
961
|
* Converts a name lex token into a name parse node.
|
|
962
962
|
*/
|
|
963
963
|
parseName() {
|
|
964
|
-
const t = this.expectToken(
|
|
964
|
+
const t = this.expectToken(c.NAME);
|
|
965
965
|
return this.node(t, {
|
|
966
966
|
kind: f.NAME,
|
|
967
967
|
value: t.value
|
|
@@ -975,9 +975,9 @@ class Ot {
|
|
|
975
975
|
return this.node(this._lexer.token, {
|
|
976
976
|
kind: f.DOCUMENT,
|
|
977
977
|
definitions: this.many(
|
|
978
|
-
|
|
978
|
+
c.SOF,
|
|
979
979
|
this.parseDefinition,
|
|
980
|
-
|
|
980
|
+
c.EOF
|
|
981
981
|
)
|
|
982
982
|
});
|
|
983
983
|
}
|
|
@@ -1005,10 +1005,10 @@ class Ot {
|
|
|
1005
1005
|
* - InputObjectTypeDefinition
|
|
1006
1006
|
*/
|
|
1007
1007
|
parseDefinition() {
|
|
1008
|
-
if (this.peek(
|
|
1008
|
+
if (this.peek(c.BRACE_L))
|
|
1009
1009
|
return this.parseOperationDefinition();
|
|
1010
1010
|
const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
|
|
1011
|
-
if (n.kind ===
|
|
1011
|
+
if (n.kind === c.NAME) {
|
|
1012
1012
|
switch (n.value) {
|
|
1013
1013
|
case "schema":
|
|
1014
1014
|
return this.parseSchemaDefinition();
|
|
@@ -1054,7 +1054,7 @@ class Ot {
|
|
|
1054
1054
|
*/
|
|
1055
1055
|
parseOperationDefinition() {
|
|
1056
1056
|
const t = this._lexer.token;
|
|
1057
|
-
if (this.peek(
|
|
1057
|
+
if (this.peek(c.BRACE_L))
|
|
1058
1058
|
return this.node(t, {
|
|
1059
1059
|
kind: f.OPERATION_DEFINITION,
|
|
1060
1060
|
operation: M.QUERY,
|
|
@@ -1065,7 +1065,7 @@ class Ot {
|
|
|
1065
1065
|
});
|
|
1066
1066
|
const n = this.parseOperationType();
|
|
1067
1067
|
let r;
|
|
1068
|
-
return this.peek(
|
|
1068
|
+
return this.peek(c.NAME) && (r = this.parseName()), this.node(t, {
|
|
1069
1069
|
kind: f.OPERATION_DEFINITION,
|
|
1070
1070
|
operation: n,
|
|
1071
1071
|
name: r,
|
|
@@ -1078,7 +1078,7 @@ class Ot {
|
|
|
1078
1078
|
* OperationType : one of query mutation subscription
|
|
1079
1079
|
*/
|
|
1080
1080
|
parseOperationType() {
|
|
1081
|
-
const t = this.expectToken(
|
|
1081
|
+
const t = this.expectToken(c.NAME);
|
|
1082
1082
|
switch (t.value) {
|
|
1083
1083
|
case "query":
|
|
1084
1084
|
return M.QUERY;
|
|
@@ -1094,9 +1094,9 @@ class Ot {
|
|
|
1094
1094
|
*/
|
|
1095
1095
|
parseVariableDefinitions() {
|
|
1096
1096
|
return this.optionalMany(
|
|
1097
|
-
|
|
1097
|
+
c.PAREN_L,
|
|
1098
1098
|
this.parseVariableDefinition,
|
|
1099
|
-
|
|
1099
|
+
c.PAREN_R
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
1102
|
/**
|
|
@@ -1106,8 +1106,8 @@ class Ot {
|
|
|
1106
1106
|
return this.node(this._lexer.token, {
|
|
1107
1107
|
kind: f.VARIABLE_DEFINITION,
|
|
1108
1108
|
variable: this.parseVariable(),
|
|
1109
|
-
type: (this.expectToken(
|
|
1110
|
-
defaultValue: this.expectOptionalToken(
|
|
1109
|
+
type: (this.expectToken(c.COLON), this.parseTypeReference()),
|
|
1110
|
+
defaultValue: this.expectOptionalToken(c.EQUALS) ? this.parseConstValueLiteral() : void 0,
|
|
1111
1111
|
directives: this.parseConstDirectives()
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
@@ -1116,7 +1116,7 @@ class Ot {
|
|
|
1116
1116
|
*/
|
|
1117
1117
|
parseVariable() {
|
|
1118
1118
|
const t = this._lexer.token;
|
|
1119
|
-
return this.expectToken(
|
|
1119
|
+
return this.expectToken(c.DOLLAR), this.node(t, {
|
|
1120
1120
|
kind: f.VARIABLE,
|
|
1121
1121
|
name: this.parseName()
|
|
1122
1122
|
});
|
|
@@ -1130,9 +1130,9 @@ class Ot {
|
|
|
1130
1130
|
return this.node(this._lexer.token, {
|
|
1131
1131
|
kind: f.SELECTION_SET,
|
|
1132
1132
|
selections: this.many(
|
|
1133
|
-
|
|
1133
|
+
c.BRACE_L,
|
|
1134
1134
|
this.parseSelection,
|
|
1135
|
-
|
|
1135
|
+
c.BRACE_R
|
|
1136
1136
|
)
|
|
1137
1137
|
});
|
|
1138
1138
|
}
|
|
@@ -1143,7 +1143,7 @@ class Ot {
|
|
|
1143
1143
|
* - InlineFragment
|
|
1144
1144
|
*/
|
|
1145
1145
|
parseSelection() {
|
|
1146
|
-
return this.peek(
|
|
1146
|
+
return this.peek(c.SPREAD) ? this.parseFragment() : this.parseField();
|
|
1147
1147
|
}
|
|
1148
1148
|
/**
|
|
1149
1149
|
* Field : Alias? Name Arguments? Directives? SelectionSet?
|
|
@@ -1153,13 +1153,13 @@ class Ot {
|
|
|
1153
1153
|
parseField() {
|
|
1154
1154
|
const t = this._lexer.token, n = this.parseName();
|
|
1155
1155
|
let r, i;
|
|
1156
|
-
return this.expectOptionalToken(
|
|
1156
|
+
return this.expectOptionalToken(c.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, {
|
|
1157
1157
|
kind: f.FIELD,
|
|
1158
1158
|
alias: r,
|
|
1159
1159
|
name: i,
|
|
1160
1160
|
arguments: this.parseArguments(!1),
|
|
1161
1161
|
directives: this.parseDirectives(!1),
|
|
1162
|
-
selectionSet: this.peek(
|
|
1162
|
+
selectionSet: this.peek(c.BRACE_L) ? this.parseSelectionSet() : void 0
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
1165
|
/**
|
|
@@ -1167,14 +1167,14 @@ class Ot {
|
|
|
1167
1167
|
*/
|
|
1168
1168
|
parseArguments(t) {
|
|
1169
1169
|
const n = t ? this.parseConstArgument : this.parseArgument;
|
|
1170
|
-
return this.optionalMany(
|
|
1170
|
+
return this.optionalMany(c.PAREN_L, n, c.PAREN_R);
|
|
1171
1171
|
}
|
|
1172
1172
|
/**
|
|
1173
1173
|
* Argument[Const] : Name : Value[?Const]
|
|
1174
1174
|
*/
|
|
1175
1175
|
parseArgument(t = !1) {
|
|
1176
1176
|
const n = this._lexer.token, r = this.parseName();
|
|
1177
|
-
return this.expectToken(
|
|
1177
|
+
return this.expectToken(c.COLON), this.node(n, {
|
|
1178
1178
|
kind: f.ARGUMENT,
|
|
1179
1179
|
name: r,
|
|
1180
1180
|
value: this.parseValueLiteral(t)
|
|
@@ -1193,9 +1193,9 @@ class Ot {
|
|
|
1193
1193
|
*/
|
|
1194
1194
|
parseFragment() {
|
|
1195
1195
|
const t = this._lexer.token;
|
|
1196
|
-
this.expectToken(
|
|
1196
|
+
this.expectToken(c.SPREAD);
|
|
1197
1197
|
const n = this.expectOptionalKeyword("on");
|
|
1198
|
-
return !n && this.peek(
|
|
1198
|
+
return !n && this.peek(c.NAME) ? this.node(t, {
|
|
1199
1199
|
kind: f.FRAGMENT_SPREAD,
|
|
1200
1200
|
name: this.parseFragmentName(),
|
|
1201
1201
|
directives: this.parseDirectives(!1)
|
|
@@ -1259,24 +1259,24 @@ class Ot {
|
|
|
1259
1259
|
parseValueLiteral(t) {
|
|
1260
1260
|
const n = this._lexer.token;
|
|
1261
1261
|
switch (n.kind) {
|
|
1262
|
-
case
|
|
1262
|
+
case c.BRACKET_L:
|
|
1263
1263
|
return this.parseList(t);
|
|
1264
|
-
case
|
|
1264
|
+
case c.BRACE_L:
|
|
1265
1265
|
return this.parseObject(t);
|
|
1266
|
-
case
|
|
1266
|
+
case c.INT:
|
|
1267
1267
|
return this.advanceLexer(), this.node(n, {
|
|
1268
1268
|
kind: f.INT,
|
|
1269
1269
|
value: n.value
|
|
1270
1270
|
});
|
|
1271
|
-
case
|
|
1271
|
+
case c.FLOAT:
|
|
1272
1272
|
return this.advanceLexer(), this.node(n, {
|
|
1273
1273
|
kind: f.FLOAT,
|
|
1274
1274
|
value: n.value
|
|
1275
1275
|
});
|
|
1276
|
-
case
|
|
1277
|
-
case
|
|
1276
|
+
case c.STRING:
|
|
1277
|
+
case c.BLOCK_STRING:
|
|
1278
1278
|
return this.parseStringLiteral();
|
|
1279
|
-
case
|
|
1279
|
+
case c.NAME:
|
|
1280
1280
|
switch (this.advanceLexer(), n.value) {
|
|
1281
1281
|
case "true":
|
|
1282
1282
|
return this.node(n, {
|
|
@@ -1298,9 +1298,9 @@ class Ot {
|
|
|
1298
1298
|
value: n.value
|
|
1299
1299
|
});
|
|
1300
1300
|
}
|
|
1301
|
-
case
|
|
1301
|
+
case c.DOLLAR:
|
|
1302
1302
|
if (t)
|
|
1303
|
-
if (this.expectToken(
|
|
1303
|
+
if (this.expectToken(c.DOLLAR), this._lexer.token.kind === c.NAME) {
|
|
1304
1304
|
const r = this._lexer.token.value;
|
|
1305
1305
|
throw b(
|
|
1306
1306
|
this._lexer.source,
|
|
@@ -1322,7 +1322,7 @@ class Ot {
|
|
|
1322
1322
|
return this.advanceLexer(), this.node(t, {
|
|
1323
1323
|
kind: f.STRING,
|
|
1324
1324
|
value: t.value,
|
|
1325
|
-
block: t.kind ===
|
|
1325
|
+
block: t.kind === c.BLOCK_STRING
|
|
1326
1326
|
});
|
|
1327
1327
|
}
|
|
1328
1328
|
/**
|
|
@@ -1334,7 +1334,7 @@ class Ot {
|
|
|
1334
1334
|
const n = () => this.parseValueLiteral(t);
|
|
1335
1335
|
return this.node(this._lexer.token, {
|
|
1336
1336
|
kind: f.LIST,
|
|
1337
|
-
values: this.any(
|
|
1337
|
+
values: this.any(c.BRACKET_L, n, c.BRACKET_R)
|
|
1338
1338
|
});
|
|
1339
1339
|
}
|
|
1340
1340
|
/**
|
|
@@ -1348,7 +1348,7 @@ class Ot {
|
|
|
1348
1348
|
const n = () => this.parseObjectField(t);
|
|
1349
1349
|
return this.node(this._lexer.token, {
|
|
1350
1350
|
kind: f.OBJECT,
|
|
1351
|
-
fields: this.any(
|
|
1351
|
+
fields: this.any(c.BRACE_L, n, c.BRACE_R)
|
|
1352
1352
|
});
|
|
1353
1353
|
}
|
|
1354
1354
|
/**
|
|
@@ -1356,7 +1356,7 @@ class Ot {
|
|
|
1356
1356
|
*/
|
|
1357
1357
|
parseObjectField(t) {
|
|
1358
1358
|
const n = this._lexer.token, r = this.parseName();
|
|
1359
|
-
return this.expectToken(
|
|
1359
|
+
return this.expectToken(c.COLON), this.node(n, {
|
|
1360
1360
|
kind: f.OBJECT_FIELD,
|
|
1361
1361
|
name: r,
|
|
1362
1362
|
value: this.parseValueLiteral(t)
|
|
@@ -1368,7 +1368,7 @@ class Ot {
|
|
|
1368
1368
|
*/
|
|
1369
1369
|
parseDirectives(t) {
|
|
1370
1370
|
const n = [];
|
|
1371
|
-
for (; this.peek(
|
|
1371
|
+
for (; this.peek(c.AT); )
|
|
1372
1372
|
n.push(this.parseDirective(t));
|
|
1373
1373
|
return n;
|
|
1374
1374
|
}
|
|
@@ -1382,7 +1382,7 @@ class Ot {
|
|
|
1382
1382
|
*/
|
|
1383
1383
|
parseDirective(t) {
|
|
1384
1384
|
const n = this._lexer.token;
|
|
1385
|
-
return this.expectToken(
|
|
1385
|
+
return this.expectToken(c.AT), this.node(n, {
|
|
1386
1386
|
kind: f.DIRECTIVE,
|
|
1387
1387
|
name: this.parseName(),
|
|
1388
1388
|
arguments: this.parseArguments(t)
|
|
@@ -1398,15 +1398,15 @@ class Ot {
|
|
|
1398
1398
|
parseTypeReference() {
|
|
1399
1399
|
const t = this._lexer.token;
|
|
1400
1400
|
let n;
|
|
1401
|
-
if (this.expectOptionalToken(
|
|
1401
|
+
if (this.expectOptionalToken(c.BRACKET_L)) {
|
|
1402
1402
|
const r = this.parseTypeReference();
|
|
1403
|
-
this.expectToken(
|
|
1403
|
+
this.expectToken(c.BRACKET_R), n = this.node(t, {
|
|
1404
1404
|
kind: f.LIST_TYPE,
|
|
1405
1405
|
type: r
|
|
1406
1406
|
});
|
|
1407
1407
|
} else
|
|
1408
1408
|
n = this.parseNamedType();
|
|
1409
|
-
return this.expectOptionalToken(
|
|
1409
|
+
return this.expectOptionalToken(c.BANG) ? this.node(t, {
|
|
1410
1410
|
kind: f.NON_NULL_TYPE,
|
|
1411
1411
|
type: n
|
|
1412
1412
|
}) : n;
|
|
@@ -1422,7 +1422,7 @@ class Ot {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
// Implements the parsing rules in the Type Definition section.
|
|
1424
1424
|
peekDescription() {
|
|
1425
|
-
return this.peek(
|
|
1425
|
+
return this.peek(c.STRING) || this.peek(c.BLOCK_STRING);
|
|
1426
1426
|
}
|
|
1427
1427
|
/**
|
|
1428
1428
|
* Description : StringValue
|
|
@@ -1440,9 +1440,9 @@ class Ot {
|
|
|
1440
1440
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1441
1441
|
this.expectKeyword("schema");
|
|
1442
1442
|
const r = this.parseConstDirectives(), i = this.many(
|
|
1443
|
-
|
|
1443
|
+
c.BRACE_L,
|
|
1444
1444
|
this.parseOperationTypeDefinition,
|
|
1445
|
-
|
|
1445
|
+
c.BRACE_R
|
|
1446
1446
|
);
|
|
1447
1447
|
return this.node(t, {
|
|
1448
1448
|
kind: f.SCHEMA_DEFINITION,
|
|
@@ -1456,7 +1456,7 @@ class Ot {
|
|
|
1456
1456
|
*/
|
|
1457
1457
|
parseOperationTypeDefinition() {
|
|
1458
1458
|
const t = this._lexer.token, n = this.parseOperationType();
|
|
1459
|
-
this.expectToken(
|
|
1459
|
+
this.expectToken(c.COLON);
|
|
1460
1460
|
const r = this.parseNamedType();
|
|
1461
1461
|
return this.node(t, {
|
|
1462
1462
|
kind: f.OPERATION_TYPE_DEFINITION,
|
|
@@ -1502,7 +1502,7 @@ class Ot {
|
|
|
1502
1502
|
* - ImplementsInterfaces & NamedType
|
|
1503
1503
|
*/
|
|
1504
1504
|
parseImplementsInterfaces() {
|
|
1505
|
-
return this.expectOptionalKeyword("implements") ? this.delimitedMany(
|
|
1505
|
+
return this.expectOptionalKeyword("implements") ? this.delimitedMany(c.AMP, this.parseNamedType) : [];
|
|
1506
1506
|
}
|
|
1507
1507
|
/**
|
|
1508
1508
|
* ```
|
|
@@ -1511,9 +1511,9 @@ class Ot {
|
|
|
1511
1511
|
*/
|
|
1512
1512
|
parseFieldsDefinition() {
|
|
1513
1513
|
return this.optionalMany(
|
|
1514
|
-
|
|
1514
|
+
c.BRACE_L,
|
|
1515
1515
|
this.parseFieldDefinition,
|
|
1516
|
-
|
|
1516
|
+
c.BRACE_R
|
|
1517
1517
|
);
|
|
1518
1518
|
}
|
|
1519
1519
|
/**
|
|
@@ -1522,7 +1522,7 @@ class Ot {
|
|
|
1522
1522
|
*/
|
|
1523
1523
|
parseFieldDefinition() {
|
|
1524
1524
|
const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs();
|
|
1525
|
-
this.expectToken(
|
|
1525
|
+
this.expectToken(c.COLON);
|
|
1526
1526
|
const s = this.parseTypeReference(), o = this.parseConstDirectives();
|
|
1527
1527
|
return this.node(t, {
|
|
1528
1528
|
kind: f.FIELD_DEFINITION,
|
|
@@ -1538,9 +1538,9 @@ class Ot {
|
|
|
1538
1538
|
*/
|
|
1539
1539
|
parseArgumentDefs() {
|
|
1540
1540
|
return this.optionalMany(
|
|
1541
|
-
|
|
1541
|
+
c.PAREN_L,
|
|
1542
1542
|
this.parseInputValueDef,
|
|
1543
|
-
|
|
1543
|
+
c.PAREN_R
|
|
1544
1544
|
);
|
|
1545
1545
|
}
|
|
1546
1546
|
/**
|
|
@@ -1549,10 +1549,10 @@ class Ot {
|
|
|
1549
1549
|
*/
|
|
1550
1550
|
parseInputValueDef() {
|
|
1551
1551
|
const t = this._lexer.token, n = this.parseDescription(), r = this.parseName();
|
|
1552
|
-
this.expectToken(
|
|
1552
|
+
this.expectToken(c.COLON);
|
|
1553
1553
|
const i = this.parseTypeReference();
|
|
1554
1554
|
let s;
|
|
1555
|
-
this.expectOptionalToken(
|
|
1555
|
+
this.expectOptionalToken(c.EQUALS) && (s = this.parseConstValueLiteral());
|
|
1556
1556
|
const o = this.parseConstDirectives();
|
|
1557
1557
|
return this.node(t, {
|
|
1558
1558
|
kind: f.INPUT_VALUE_DEFINITION,
|
|
@@ -1602,7 +1602,7 @@ class Ot {
|
|
|
1602
1602
|
* - UnionMemberTypes | NamedType
|
|
1603
1603
|
*/
|
|
1604
1604
|
parseUnionMemberTypes() {
|
|
1605
|
-
return this.expectOptionalToken(
|
|
1605
|
+
return this.expectOptionalToken(c.EQUALS) ? this.delimitedMany(c.PIPE, this.parseNamedType) : [];
|
|
1606
1606
|
}
|
|
1607
1607
|
/**
|
|
1608
1608
|
* EnumTypeDefinition :
|
|
@@ -1627,9 +1627,9 @@ class Ot {
|
|
|
1627
1627
|
*/
|
|
1628
1628
|
parseEnumValuesDefinition() {
|
|
1629
1629
|
return this.optionalMany(
|
|
1630
|
-
|
|
1630
|
+
c.BRACE_L,
|
|
1631
1631
|
this.parseEnumValueDefinition,
|
|
1632
|
-
|
|
1632
|
+
c.BRACE_R
|
|
1633
1633
|
);
|
|
1634
1634
|
}
|
|
1635
1635
|
/**
|
|
@@ -1681,9 +1681,9 @@ class Ot {
|
|
|
1681
1681
|
*/
|
|
1682
1682
|
parseInputFieldsDefinition() {
|
|
1683
1683
|
return this.optionalMany(
|
|
1684
|
-
|
|
1684
|
+
c.BRACE_L,
|
|
1685
1685
|
this.parseInputValueDef,
|
|
1686
|
-
|
|
1686
|
+
c.BRACE_R
|
|
1687
1687
|
);
|
|
1688
1688
|
}
|
|
1689
1689
|
/**
|
|
@@ -1701,7 +1701,7 @@ class Ot {
|
|
|
1701
1701
|
*/
|
|
1702
1702
|
parseTypeSystemExtension() {
|
|
1703
1703
|
const t = this._lexer.lookahead();
|
|
1704
|
-
if (t.kind ===
|
|
1704
|
+
if (t.kind === c.NAME)
|
|
1705
1705
|
switch (t.value) {
|
|
1706
1706
|
case "schema":
|
|
1707
1707
|
return this.parseSchemaExtension();
|
|
@@ -1731,9 +1731,9 @@ class Ot {
|
|
|
1731
1731
|
const t = this._lexer.token;
|
|
1732
1732
|
this.expectKeyword("extend"), this.expectKeyword("schema");
|
|
1733
1733
|
const n = this.parseConstDirectives(), r = this.optionalMany(
|
|
1734
|
-
|
|
1734
|
+
c.BRACE_L,
|
|
1735
1735
|
this.parseOperationTypeDefinition,
|
|
1736
|
-
|
|
1736
|
+
c.BRACE_R
|
|
1737
1737
|
);
|
|
1738
1738
|
if (n.length === 0 && r.length === 0)
|
|
1739
1739
|
throw this.unexpected();
|
|
@@ -1861,7 +1861,7 @@ class Ot {
|
|
|
1861
1861
|
*/
|
|
1862
1862
|
parseDirectiveDefinition() {
|
|
1863
1863
|
const t = this._lexer.token, n = this.parseDescription();
|
|
1864
|
-
this.expectKeyword("directive"), this.expectToken(
|
|
1864
|
+
this.expectKeyword("directive"), this.expectToken(c.AT);
|
|
1865
1865
|
const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
|
|
1866
1866
|
this.expectKeyword("on");
|
|
1867
1867
|
const o = this.parseDirectiveLocations();
|
|
@@ -1880,7 +1880,7 @@ class Ot {
|
|
|
1880
1880
|
* - DirectiveLocations | DirectiveLocation
|
|
1881
1881
|
*/
|
|
1882
1882
|
parseDirectiveLocations() {
|
|
1883
|
-
return this.delimitedMany(
|
|
1883
|
+
return this.delimitedMany(c.PIPE, this.parseDirectiveLocation);
|
|
1884
1884
|
}
|
|
1885
1885
|
/*
|
|
1886
1886
|
* DirectiveLocation :
|
|
@@ -1961,7 +1961,7 @@ class Ot {
|
|
|
1961
1961
|
*/
|
|
1962
1962
|
expectKeyword(t) {
|
|
1963
1963
|
const n = this._lexer.token;
|
|
1964
|
-
if (n.kind ===
|
|
1964
|
+
if (n.kind === c.NAME && n.value === t)
|
|
1965
1965
|
this.advanceLexer();
|
|
1966
1966
|
else
|
|
1967
1967
|
throw b(
|
|
@@ -1976,7 +1976,7 @@ class Ot {
|
|
|
1976
1976
|
*/
|
|
1977
1977
|
expectOptionalKeyword(t) {
|
|
1978
1978
|
const n = this._lexer.token;
|
|
1979
|
-
return n.kind ===
|
|
1979
|
+
return n.kind === c.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
|
|
1980
1980
|
}
|
|
1981
1981
|
/**
|
|
1982
1982
|
* Helper function for creating an error when an unexpected lexed token is encountered.
|
|
@@ -2045,7 +2045,7 @@ class Ot {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
advanceLexer() {
|
|
2047
2047
|
const { maxTokens: t } = this._options, n = this._lexer.advance();
|
|
2048
|
-
if (t !== void 0 && n.kind !==
|
|
2048
|
+
if (t !== void 0 && n.kind !== c.EOF && (++this._tokenCounter, this._tokenCounter > t))
|
|
2049
2049
|
throw b(
|
|
2050
2050
|
this._lexer.source,
|
|
2051
2051
|
n.start,
|
|
@@ -2238,11 +2238,11 @@ function wt(e, t, n = ke) {
|
|
|
2238
2238
|
const r = /* @__PURE__ */ new Map();
|
|
2239
2239
|
for (const R of Object.values(f))
|
|
2240
2240
|
r.set(R, Ft(t, R));
|
|
2241
|
-
let i, s = Array.isArray(e), o = [e],
|
|
2241
|
+
let i, s = Array.isArray(e), o = [e], u = -1, h = [], p = e, m, y;
|
|
2242
2242
|
const C = [], T = [];
|
|
2243
2243
|
do {
|
|
2244
|
-
|
|
2245
|
-
const R =
|
|
2244
|
+
u++;
|
|
2245
|
+
const R = u === o.length, z = R && h.length !== 0;
|
|
2246
2246
|
if (R) {
|
|
2247
2247
|
if (m = T.length === 0 ? void 0 : C[C.length - 1], p = y, y = T.pop(), z)
|
|
2248
2248
|
if (s) {
|
|
@@ -2260,9 +2260,9 @@ function wt(e, t, n = ke) {
|
|
|
2260
2260
|
for (const [k, B] of h)
|
|
2261
2261
|
p[k] = B;
|
|
2262
2262
|
}
|
|
2263
|
-
|
|
2263
|
+
u = i.index, o = i.keys, h = i.edits, s = i.inArray, i = i.prev;
|
|
2264
2264
|
} else if (y) {
|
|
2265
|
-
if (m = s ?
|
|
2265
|
+
if (m = s ? u : o[u], p = y[m], p == null)
|
|
2266
2266
|
continue;
|
|
2267
2267
|
C.push(m);
|
|
2268
2268
|
}
|
|
@@ -2292,11 +2292,11 @@ function wt(e, t, n = ke) {
|
|
|
2292
2292
|
var D;
|
|
2293
2293
|
i = {
|
|
2294
2294
|
inArray: s,
|
|
2295
|
-
index:
|
|
2295
|
+
index: u,
|
|
2296
2296
|
keys: o,
|
|
2297
2297
|
edits: h,
|
|
2298
2298
|
prev: i
|
|
2299
|
-
}, s = Array.isArray(p), o = s ? p : (D = n[p.kind]) !== null && D !== void 0 ? D : [],
|
|
2299
|
+
}, s = Array.isArray(p), o = s ? p : (D = n[p.kind]) !== null && D !== void 0 ? D : [], u = -1, h = [], y && T.push(y), y = p;
|
|
2300
2300
|
}
|
|
2301
2301
|
} while (i !== void 0);
|
|
2302
2302
|
return h.length !== 0 ? h[h.length - 1][1] : e;
|
|
@@ -2388,7 +2388,7 @@ const Ut = 80, Mt = {
|
|
|
2388
2388
|
leave: ({ value: e }) => e
|
|
2389
2389
|
},
|
|
2390
2390
|
StringValue: {
|
|
2391
|
-
leave: ({ value: e, block: t }) => t ?
|
|
2391
|
+
leave: ({ value: e, block: t }) => t ? ut(e) : Rt(e)
|
|
2392
2392
|
},
|
|
2393
2393
|
BooleanValue: {
|
|
2394
2394
|
leave: ({ value: e }) => e ? "true" : "false"
|
|
@@ -2618,7 +2618,7 @@ var ge = { exports: {} };
|
|
|
2618
2618
|
}();
|
|
2619
2619
|
(function(s) {
|
|
2620
2620
|
(function(o) {
|
|
2621
|
-
var
|
|
2621
|
+
var u = {
|
|
2622
2622
|
searchParams: "URLSearchParams" in s,
|
|
2623
2623
|
iterable: "Symbol" in s && "iterator" in Symbol,
|
|
2624
2624
|
blob: "FileReader" in s && "Blob" in s && function() {
|
|
@@ -2634,7 +2634,7 @@ var ge = { exports: {} };
|
|
|
2634
2634
|
function h(a) {
|
|
2635
2635
|
return a && DataView.prototype.isPrototypeOf(a);
|
|
2636
2636
|
}
|
|
2637
|
-
if (
|
|
2637
|
+
if (u.arrayBuffer)
|
|
2638
2638
|
var p = [
|
|
2639
2639
|
"[object Int8Array]",
|
|
2640
2640
|
"[object Uint8Array]",
|
|
@@ -2663,7 +2663,7 @@ var ge = { exports: {} };
|
|
|
2663
2663
|
return { done: E === void 0, value: E };
|
|
2664
2664
|
}
|
|
2665
2665
|
};
|
|
2666
|
-
return
|
|
2666
|
+
return u.iterable && (l[Symbol.iterator] = function() {
|
|
2667
2667
|
return l;
|
|
2668
2668
|
}), l;
|
|
2669
2669
|
}
|
|
@@ -2706,7 +2706,7 @@ var ge = { exports: {} };
|
|
|
2706
2706
|
return this.forEach(function(l, E) {
|
|
2707
2707
|
a.push([E, l]);
|
|
2708
2708
|
}), T(a);
|
|
2709
|
-
},
|
|
2709
|
+
}, u.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries);
|
|
2710
2710
|
function N(a) {
|
|
2711
2711
|
if (a.bodyUsed)
|
|
2712
2712
|
return Promise.reject(new TypeError("Already read"));
|
|
@@ -2742,8 +2742,8 @@ var ge = { exports: {} };
|
|
|
2742
2742
|
}
|
|
2743
2743
|
function B() {
|
|
2744
2744
|
return this.bodyUsed = !1, this._initBody = function(a) {
|
|
2745
|
-
this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a :
|
|
2746
|
-
},
|
|
2745
|
+
this._bodyInit = a, a ? typeof a == "string" ? this._bodyText = a : u.blob && Blob.prototype.isPrototypeOf(a) ? this._bodyBlob = a : u.formData && FormData.prototype.isPrototypeOf(a) ? this._bodyFormData = a : u.searchParams && URLSearchParams.prototype.isPrototypeOf(a) ? this._bodyText = a.toString() : u.arrayBuffer && u.blob && h(a) ? (this._bodyArrayBuffer = k(a.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : u.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(a) || m(a)) ? this._bodyArrayBuffer = k(a) : this._bodyText = a = Object.prototype.toString.call(a) : this._bodyText = "", this.headers.get("content-type") || (typeof a == "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(a) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2746
|
+
}, u.blob && (this.blob = function() {
|
|
2747
2747
|
var a = N(this);
|
|
2748
2748
|
if (a)
|
|
2749
2749
|
return a;
|
|
@@ -2767,8 +2767,8 @@ var ge = { exports: {} };
|
|
|
2767
2767
|
if (this._bodyFormData)
|
|
2768
2768
|
throw new Error("could not read FormData body as text");
|
|
2769
2769
|
return Promise.resolve(this._bodyText);
|
|
2770
|
-
},
|
|
2771
|
-
return this.text().then(
|
|
2770
|
+
}, u.formData && (this.formData = function() {
|
|
2771
|
+
return this.text().then($e);
|
|
2772
2772
|
}), this.json = function() {
|
|
2773
2773
|
return this.text().then(JSON.parse);
|
|
2774
2774
|
}, this;
|
|
@@ -2794,7 +2794,7 @@ var ge = { exports: {} };
|
|
|
2794
2794
|
w.prototype.clone = function() {
|
|
2795
2795
|
return new w(this, { body: this._bodyInit });
|
|
2796
2796
|
};
|
|
2797
|
-
function
|
|
2797
|
+
function $e(a) {
|
|
2798
2798
|
var l = new FormData();
|
|
2799
2799
|
return a.trim().split("&").forEach(function(E) {
|
|
2800
2800
|
if (E) {
|
|
@@ -2803,7 +2803,7 @@ var ge = { exports: {} };
|
|
|
2803
2803
|
}
|
|
2804
2804
|
}), l;
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function je(a) {
|
|
2807
2807
|
var l = new g(), E = a.replace(/\r?\n[\t ]+/g, " ");
|
|
2808
2808
|
return E.split(/\r?\n/).forEach(function(S) {
|
|
2809
2809
|
var x = S.split(":"), A = x.shift().trim();
|
|
@@ -2828,9 +2828,9 @@ var ge = { exports: {} };
|
|
|
2828
2828
|
var a = new L(null, { status: 0, statusText: "" });
|
|
2829
2829
|
return a.type = "error", a;
|
|
2830
2830
|
};
|
|
2831
|
-
var
|
|
2831
|
+
var Ge = [301, 302, 303, 307, 308];
|
|
2832
2832
|
L.redirect = function(a, l) {
|
|
2833
|
-
if (
|
|
2833
|
+
if (Ge.indexOf(l) === -1)
|
|
2834
2834
|
throw new RangeError("Invalid status code");
|
|
2835
2835
|
return new L(null, { status: l, headers: { location: a } });
|
|
2836
2836
|
}, o.DOMException = s.DOMException;
|
|
@@ -2853,22 +2853,22 @@ var ge = { exports: {} };
|
|
|
2853
2853
|
A.abort();
|
|
2854
2854
|
}
|
|
2855
2855
|
A.onload = function() {
|
|
2856
|
-
var
|
|
2856
|
+
var $ = {
|
|
2857
2857
|
status: A.status,
|
|
2858
2858
|
statusText: A.statusText,
|
|
2859
|
-
headers:
|
|
2859
|
+
headers: je(A.getAllResponseHeaders() || "")
|
|
2860
2860
|
};
|
|
2861
|
-
|
|
2862
|
-
var
|
|
2863
|
-
E(new L(
|
|
2861
|
+
$.url = "responseURL" in A ? A.responseURL : $.headers.get("X-Request-URL");
|
|
2862
|
+
var ce = "response" in A ? A.response : A.responseText;
|
|
2863
|
+
E(new L(ce, $));
|
|
2864
2864
|
}, A.onerror = function() {
|
|
2865
2865
|
S(new TypeError("Network request failed"));
|
|
2866
2866
|
}, A.ontimeout = function() {
|
|
2867
2867
|
S(new TypeError("Network request failed"));
|
|
2868
2868
|
}, A.onabort = function() {
|
|
2869
2869
|
S(new o.DOMException("Aborted", "AbortError"));
|
|
2870
|
-
}, A.open(x.method, x.url, !0), x.credentials === "include" ? A.withCredentials = !0 : x.credentials === "omit" && (A.withCredentials = !1), "responseType" in A &&
|
|
2871
|
-
A.setRequestHeader(
|
|
2870
|
+
}, A.open(x.method, x.url, !0), x.credentials === "include" ? A.withCredentials = !0 : x.credentials === "omit" && (A.withCredentials = !1), "responseType" in A && u.blob && (A.responseType = "blob"), x.headers.forEach(function($, ce) {
|
|
2871
|
+
A.setRequestHeader(ce, $);
|
|
2872
2872
|
}), x.signal && (x.signal.addEventListener("abort", X), A.onreadystatechange = function() {
|
|
2873
2873
|
A.readyState === 4 && x.signal.removeEventListener("abort", X);
|
|
2874
2874
|
}), A.send(typeof x._bodyInit > "u" ? null : x._bodyInit);
|
|
@@ -2881,15 +2881,15 @@ var ge = { exports: {} };
|
|
|
2881
2881
|
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;
|
|
2882
2882
|
})(ge, ge.exports);
|
|
2883
2883
|
var ne = ge.exports;
|
|
2884
|
-
const ee = /* @__PURE__ */ Vt(ne),
|
|
2884
|
+
const ee = /* @__PURE__ */ Vt(ne), $t = /* @__PURE__ */ ze({
|
|
2885
2885
|
__proto__: null,
|
|
2886
2886
|
default: ee
|
|
2887
2887
|
}, [ne]), U = (e) => {
|
|
2888
2888
|
let t = {};
|
|
2889
|
-
return e && (typeof Headers < "u" && e instanceof Headers ||
|
|
2889
|
+
return e && (typeof Headers < "u" && e instanceof Headers || $t && ne.Headers && e instanceof ne.Headers ? t = Je(e) : Array.isArray(e) ? e.forEach(([n, r]) => {
|
|
2890
2890
|
n && r !== void 0 && (t[n] = r);
|
|
2891
2891
|
}) : t = e), t;
|
|
2892
|
-
}, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(),
|
|
2892
|
+
}, De = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), jt = (e) => {
|
|
2893
2893
|
if (!Array.isArray(e.query)) {
|
|
2894
2894
|
const r = e, i = [`query=${encodeURIComponent(De(r.query))}`];
|
|
2895
2895
|
return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&");
|
|
@@ -2901,20 +2901,20 @@ const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
|
2901
2901
|
variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0
|
|
2902
2902
|
}), r), []);
|
|
2903
2903
|
return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`;
|
|
2904
|
-
},
|
|
2905
|
-
const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions:
|
|
2904
|
+
}, Gt = (e) => async (t) => {
|
|
2905
|
+
const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions: u, middleware: h } = t, p = { ...t.headers };
|
|
2906
2906
|
let m = "", y;
|
|
2907
|
-
e === "POST" ? (y = Yt(r, i, s,
|
|
2907
|
+
e === "POST" ? (y = Yt(r, i, s, u.jsonSerializer), typeof y == "string" && (p["Content-Type"] = "application/json")) : m = jt({
|
|
2908
2908
|
query: r,
|
|
2909
2909
|
variables: i,
|
|
2910
2910
|
operationName: s,
|
|
2911
|
-
jsonSerializer:
|
|
2911
|
+
jsonSerializer: u.jsonSerializer ?? Ce
|
|
2912
2912
|
});
|
|
2913
2913
|
const C = {
|
|
2914
2914
|
method: e,
|
|
2915
2915
|
headers: p,
|
|
2916
2916
|
body: y,
|
|
2917
|
-
...
|
|
2917
|
+
...u
|
|
2918
2918
|
};
|
|
2919
2919
|
let T = n, g = C;
|
|
2920
2920
|
if (h) {
|
|
@@ -2926,16 +2926,16 @@ const ee = /* @__PURE__ */ Vt(ne), jt = /* @__PURE__ */ ze({
|
|
|
2926
2926
|
class Ht {
|
|
2927
2927
|
constructor(t, n = {}) {
|
|
2928
2928
|
this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => {
|
|
2929
|
-
const [i, s, o] = r,
|
|
2930
|
-
|
|
2931
|
-
const { operationName: N } = le(
|
|
2929
|
+
const [i, s, o] = r, u = We(i, s, o), { headers: h, fetch: p = ee, method: m = "POST", requestMiddleware: y, responseMiddleware: C, ...T } = this.requestConfig, { url: g } = this;
|
|
2930
|
+
u.signal !== void 0 && (T.signal = u.signal);
|
|
2931
|
+
const { operationName: N } = le(u.query);
|
|
2932
2932
|
return de({
|
|
2933
2933
|
url: g,
|
|
2934
|
-
query:
|
|
2935
|
-
variables:
|
|
2934
|
+
query: u.query,
|
|
2935
|
+
variables: u.variables,
|
|
2936
2936
|
headers: {
|
|
2937
2937
|
...U(he(h)),
|
|
2938
|
-
...U(
|
|
2938
|
+
...U(u.requestHeaders)
|
|
2939
2939
|
},
|
|
2940
2940
|
operationName: N,
|
|
2941
2941
|
fetch: p,
|
|
@@ -2948,7 +2948,7 @@ class Ht {
|
|
|
2948
2948
|
};
|
|
2949
2949
|
}
|
|
2950
2950
|
async request(t, ...n) {
|
|
2951
|
-
const [r, i] = n, s = Xe(t, r, i), { headers: o, fetch:
|
|
2951
|
+
const [r, i] = n, s = Xe(t, r, i), { headers: o, fetch: u = ee, method: h = "POST", requestMiddleware: p, responseMiddleware: m, ...y } = this.requestConfig, { url: C } = this;
|
|
2952
2952
|
s.signal !== void 0 && (y.signal = s.signal);
|
|
2953
2953
|
const { query: T, operationName: g } = le(s.document);
|
|
2954
2954
|
return de({
|
|
@@ -2960,7 +2960,7 @@ class Ht {
|
|
|
2960
2960
|
...U(s.requestHeaders)
|
|
2961
2961
|
},
|
|
2962
2962
|
operationName: g,
|
|
2963
|
-
fetch:
|
|
2963
|
+
fetch: u,
|
|
2964
2964
|
method: h,
|
|
2965
2965
|
fetchOptions: y,
|
|
2966
2966
|
middleware: p
|
|
@@ -2972,12 +2972,12 @@ class Ht {
|
|
|
2972
2972
|
batchRequests(t, n) {
|
|
2973
2973
|
const r = Ke(t, n), { headers: i, ...s } = this.requestConfig;
|
|
2974
2974
|
r.signal !== void 0 && (s.signal = r.signal);
|
|
2975
|
-
const o = r.documents.map(({ document: h }) => le(h).query),
|
|
2975
|
+
const o = r.documents.map(({ document: h }) => le(h).query), u = r.documents.map(({ variables: h }) => h);
|
|
2976
2976
|
return de({
|
|
2977
2977
|
url: this.url,
|
|
2978
2978
|
query: o,
|
|
2979
2979
|
// @ts-expect-error TODO reconcile batch variables into system.
|
|
2980
|
-
variables:
|
|
2980
|
+
variables: u,
|
|
2981
2981
|
headers: {
|
|
2982
2982
|
...U(he(i)),
|
|
2983
2983
|
...U(r.requestHeaders)
|
|
@@ -3009,18 +3009,18 @@ class Ht {
|
|
|
3009
3009
|
}
|
|
3010
3010
|
}
|
|
3011
3011
|
const de = async (e) => {
|
|
3012
|
-
const { query: t, variables: n, fetchOptions: r } = e, i =
|
|
3012
|
+
const { query: t, variables: n, fetchOptions: r } = e, i = Gt(Qe(e.method ?? "post")), s = Array.isArray(e.query), o = await i(e), u = await zt(o, r.jsonSerializer ?? Ce), h = Array.isArray(u) ? !u.some(({ data: m }) => !m) : !!u.data, p = Array.isArray(u) || !u.errors || Array.isArray(u.errors) && !u.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore";
|
|
3013
3013
|
if (o.ok && p && h) {
|
|
3014
|
-
const { errors: m, ...y } = (Array.isArray(
|
|
3014
|
+
const { errors: m, ...y } = (Array.isArray(u), u), C = r.errorPolicy === "ignore" ? y : u;
|
|
3015
3015
|
return {
|
|
3016
3016
|
...s ? { data: C } : C,
|
|
3017
3017
|
headers: o.headers,
|
|
3018
3018
|
status: o.status
|
|
3019
3019
|
};
|
|
3020
3020
|
} else {
|
|
3021
|
-
const m = typeof
|
|
3022
|
-
error:
|
|
3023
|
-
} :
|
|
3021
|
+
const m = typeof u == "string" ? {
|
|
3022
|
+
error: u
|
|
3023
|
+
} : u;
|
|
3024
3024
|
throw new H(
|
|
3025
3025
|
// @ts-expect-error TODO
|
|
3026
3026
|
{ ...m, status: o.status, headers: o.headers },
|
|
@@ -3033,7 +3033,7 @@ const de = async (e) => {
|
|
|
3033
3033
|
return i.stringify({ query: e, variables: t, operationName: n });
|
|
3034
3034
|
if (typeof t < "u" && !Array.isArray(t))
|
|
3035
3035
|
throw new Error("Cannot create request body with given variable type, array expected");
|
|
3036
|
-
const s = e.reduce((o,
|
|
3036
|
+
const s = e.reduce((o, u, h) => (o.push({ query: u, variables: t ? t[h] : void 0 }), o), []);
|
|
3037
3037
|
return i.stringify(s);
|
|
3038
3038
|
}, zt = async (e, t) => {
|
|
3039
3039
|
let n;
|
|
@@ -3115,7 +3115,7 @@ function en() {
|
|
|
3115
3115
|
function tn() {
|
|
3116
3116
|
ie = !1;
|
|
3117
3117
|
}
|
|
3118
|
-
var
|
|
3118
|
+
var j = {
|
|
3119
3119
|
gql: q,
|
|
3120
3120
|
resetCaches: Kt,
|
|
3121
3121
|
disableFragmentWarnings: Zt,
|
|
@@ -3123,7 +3123,7 @@ var G = {
|
|
|
3123
3123
|
disableExperimentalFragmentVariables: tn
|
|
3124
3124
|
};
|
|
3125
3125
|
(function(e) {
|
|
3126
|
-
e.gql =
|
|
3126
|
+
e.gql = j.gql, e.resetCaches = j.resetCaches, e.disableFragmentWarnings = j.disableFragmentWarnings, e.enableExperimentalFragmentVariables = j.enableExperimentalFragmentVariables, e.disableExperimentalFragmentVariables = j.disableExperimentalFragmentVariables;
|
|
3127
3127
|
})(q || (q = {}));
|
|
3128
3128
|
q.default = q;
|
|
3129
3129
|
const O = q, nn = O`
|
|
@@ -3140,6 +3140,7 @@ const O = q, nn = O`
|
|
|
3140
3140
|
name
|
|
3141
3141
|
phone
|
|
3142
3142
|
mapURL
|
|
3143
|
+
tags
|
|
3143
3144
|
address {
|
|
3144
3145
|
id
|
|
3145
3146
|
countryCode
|
|
@@ -3172,6 +3173,7 @@ const O = q, nn = O`
|
|
|
3172
3173
|
name
|
|
3173
3174
|
phone
|
|
3174
3175
|
mapURL
|
|
3176
|
+
tags
|
|
3175
3177
|
address {
|
|
3176
3178
|
id
|
|
3177
3179
|
countryCode
|
|
@@ -3206,13 +3208,19 @@ const O = q, nn = O`
|
|
|
3206
3208
|
}
|
|
3207
3209
|
}
|
|
3208
3210
|
`, an = O`
|
|
3209
|
-
query GetLocations($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3210
|
-
locations(
|
|
3211
|
+
query GetLocations($tag: String, $provinceCodes: [String!], $first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3212
|
+
locations(
|
|
3213
|
+
first: $first
|
|
3214
|
+
after: $after
|
|
3215
|
+
isReverse: $isReverse
|
|
3216
|
+
filter: {tag: $tag, provinceCodes: $provinceCodes}
|
|
3217
|
+
) {
|
|
3211
3218
|
nodes {
|
|
3212
3219
|
id
|
|
3213
3220
|
name
|
|
3214
3221
|
phone
|
|
3215
3222
|
mapURL
|
|
3223
|
+
tags
|
|
3216
3224
|
address {
|
|
3217
3225
|
id
|
|
3218
3226
|
countryCode
|
|
@@ -3235,7 +3243,7 @@ const O = q, nn = O`
|
|
|
3235
3243
|
}
|
|
3236
3244
|
}
|
|
3237
3245
|
}
|
|
3238
|
-
`,
|
|
3246
|
+
`, cn = O`
|
|
3239
3247
|
query GetPurchasingCustomerDiscounts($first: Int, $after: String, $isReverse: Boolean! = false) {
|
|
3240
3248
|
purchasingCustomer {
|
|
3241
3249
|
id
|
|
@@ -3264,7 +3272,7 @@ const O = q, nn = O`
|
|
|
3264
3272
|
}
|
|
3265
3273
|
}
|
|
3266
3274
|
}
|
|
3267
|
-
`,
|
|
3275
|
+
`, un = O`
|
|
3268
3276
|
query GetPurchasingCustomerDiscountCodeCount {
|
|
3269
3277
|
purchasingCustomer {
|
|
3270
3278
|
id
|
|
@@ -3306,6 +3314,7 @@ const O = q, nn = O`
|
|
|
3306
3314
|
name
|
|
3307
3315
|
phone
|
|
3308
3316
|
mapURL
|
|
3317
|
+
tags
|
|
3309
3318
|
address {
|
|
3310
3319
|
id
|
|
3311
3320
|
countryCode
|
|
@@ -3399,6 +3408,7 @@ const O = q, nn = O`
|
|
|
3399
3408
|
id
|
|
3400
3409
|
title
|
|
3401
3410
|
hasBackOrderProductVariants
|
|
3411
|
+
isLocalPickupAvailable
|
|
3402
3412
|
productVariants(
|
|
3403
3413
|
first: $first
|
|
3404
3414
|
after: $after
|
|
@@ -3413,6 +3423,7 @@ const O = q, nn = O`
|
|
|
3413
3423
|
sku
|
|
3414
3424
|
}
|
|
3415
3425
|
isBackOrderEnable
|
|
3426
|
+
isLocalPickupAvailable
|
|
3416
3427
|
}
|
|
3417
3428
|
pageInfo {
|
|
3418
3429
|
startCursor
|
|
@@ -3473,10 +3484,10 @@ function Cn(e, t = yn) {
|
|
|
3473
3484
|
return t((i) => e.request(an, n, { ...r, ...i }), "GetLocations", "query", n);
|
|
3474
3485
|
},
|
|
3475
3486
|
GetPurchasingCustomerDiscounts(n, r) {
|
|
3476
|
-
return t((i) => e.request(
|
|
3487
|
+
return t((i) => e.request(cn, n, { ...r, ...i }), "GetPurchasingCustomerDiscounts", "query", n);
|
|
3477
3488
|
},
|
|
3478
3489
|
GetPurchasingCustomerDiscountCodeCount(n, r) {
|
|
3479
|
-
return t((i) => e.request(
|
|
3490
|
+
return t((i) => e.request(un, n, { ...r, ...i }), "GetPurchasingCustomerDiscountCodeCount", "query", n);
|
|
3480
3491
|
},
|
|
3481
3492
|
GetPurchasingCustomerPointChangeActivities(n, r) {
|
|
3482
3493
|
return t((i) => e.request(ln, n, { ...r, ...i }), "GetPurchasingCustomerPointChangeActivities", "query", n);
|
|
@@ -3535,6 +3546,7 @@ class vn {
|
|
|
3535
3546
|
name: o.location.name,
|
|
3536
3547
|
phone: o.location.phone,
|
|
3537
3548
|
mapURL: o.location.mapURL,
|
|
3549
|
+
tags: o.location.tags,
|
|
3538
3550
|
address: o.location.address ? {
|
|
3539
3551
|
id: o.location.address.id,
|
|
3540
3552
|
countryCode: o.location.address.countryCode,
|
|
@@ -3566,6 +3578,7 @@ class vn {
|
|
|
3566
3578
|
name: r.locationAvailability.location.name,
|
|
3567
3579
|
phone: r.locationAvailability.location.phone,
|
|
3568
3580
|
mapURL: r.locationAvailability.location.mapURL,
|
|
3581
|
+
tags: r.locationAvailability.location.tags,
|
|
3569
3582
|
address: r.locationAvailability.location.address ? {
|
|
3570
3583
|
id: r.locationAvailability.location.address.id,
|
|
3571
3584
|
countryCode: r.locationAvailability.location.address.countryCode,
|
|
@@ -3608,31 +3621,34 @@ class vn {
|
|
|
3608
3621
|
/**
|
|
3609
3622
|
* getLocations は ShopifyIntegration に紐づく LocationGroup の Location の一覧を取得します。
|
|
3610
3623
|
*
|
|
3624
|
+
* @param {string} [tag] 取得したいLocationのタグ。
|
|
3625
|
+
* @param {string[]} [provinceCodes] 取得したいLocationの都道府県コード。
|
|
3611
3626
|
* @param {number} [first] 取得してくる個数。デフォルトは250。
|
|
3612
3627
|
* @param {string} [after] ページングの値。指定しない場合先頭から取得してくる。
|
|
3613
3628
|
* @param {boolean} [isReverse] 並び順。デフォルトはfalse。
|
|
3614
3629
|
*/
|
|
3615
|
-
async getLocations(t, n, r) {
|
|
3616
|
-
const
|
|
3630
|
+
async getLocations(t, n, r, i, s) {
|
|
3631
|
+
const o = await this.api.GetLocations({ tag: t, provinceCodes: n, first: r, after: i, isReverse: s });
|
|
3617
3632
|
return {
|
|
3618
|
-
nodes:
|
|
3619
|
-
id:
|
|
3620
|
-
name:
|
|
3621
|
-
phone:
|
|
3622
|
-
mapURL:
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
+
nodes: o.locations.nodes.map((u) => ({
|
|
3634
|
+
id: u.id,
|
|
3635
|
+
name: u.name,
|
|
3636
|
+
phone: u.phone,
|
|
3637
|
+
mapURL: u.mapURL,
|
|
3638
|
+
tags: u.tags,
|
|
3639
|
+
address: u.address ? {
|
|
3640
|
+
id: u.address.id,
|
|
3641
|
+
countryCode: u.address.countryCode,
|
|
3642
|
+
country: u.address.country,
|
|
3643
|
+
postalCode: u.address.postalCode,
|
|
3644
|
+
provinceCode: u.address.provinceCode,
|
|
3645
|
+
province: u.address.province,
|
|
3646
|
+
city: u.address.city,
|
|
3647
|
+
address1: u.address.address1,
|
|
3648
|
+
address2: u.address.address2
|
|
3633
3649
|
} : void 0
|
|
3634
3650
|
})) ?? [],
|
|
3635
|
-
pageInfo:
|
|
3651
|
+
pageInfo: o.locations.pageInfo ?? null
|
|
3636
3652
|
};
|
|
3637
3653
|
}
|
|
3638
3654
|
/**
|
|
@@ -3711,6 +3727,7 @@ class vn {
|
|
|
3711
3727
|
name: o.retailLocation.name,
|
|
3712
3728
|
phone: o.retailLocation.phone,
|
|
3713
3729
|
mapURL: o.retailLocation.mapURL,
|
|
3730
|
+
tags: o.retailLocation.tags,
|
|
3714
3731
|
address: o.retailLocation.address ? {
|
|
3715
3732
|
id: o.retailLocation.address.id,
|
|
3716
3733
|
countryCode: o.retailLocation.address.countryCode,
|
|
@@ -3822,15 +3839,18 @@ class vn {
|
|
|
3822
3839
|
return o.productByProductShopifyLegacyResourceID ? {
|
|
3823
3840
|
id: o.productByProductShopifyLegacyResourceID.id,
|
|
3824
3841
|
title: o.productByProductShopifyLegacyResourceID.title,
|
|
3842
|
+
hasBackOrderProductVariants: o.productByProductShopifyLegacyResourceID.hasBackOrderProductVariants,
|
|
3843
|
+
isLocalPickupAvailable: o.productByProductShopifyLegacyResourceID.isLocalPickupAvailable,
|
|
3825
3844
|
variants: {
|
|
3826
3845
|
nodes: o.productByProductShopifyLegacyResourceID.productVariants.nodes.map(
|
|
3827
|
-
(
|
|
3828
|
-
id:
|
|
3829
|
-
title:
|
|
3830
|
-
isBackOrderEnable:
|
|
3846
|
+
(u) => ({
|
|
3847
|
+
id: u.id,
|
|
3848
|
+
title: u.title,
|
|
3849
|
+
isBackOrderEnable: u.isBackOrderEnable,
|
|
3850
|
+
isLocalPickupAvailable: u.isLocalPickupAvailable,
|
|
3831
3851
|
inventoryItem: {
|
|
3832
|
-
id:
|
|
3833
|
-
sku:
|
|
3852
|
+
id: u.inventoryItem.id,
|
|
3853
|
+
sku: u.inventoryItem.sku
|
|
3834
3854
|
}
|
|
3835
3855
|
})
|
|
3836
3856
|
),
|