@codextech/commerce-platform 0.1.0
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 +51 -0
- package/dist/cart/index.d.ts +41 -0
- package/dist/cart/index.d.ts.map +1 -0
- package/dist/cart/index.js +278 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/catalog/index.d.ts +4 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +2 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/connectors/pinnacle/catalog.d.ts +63 -0
- package/dist/connectors/pinnacle/catalog.d.ts.map +1 -0
- package/dist/connectors/pinnacle/catalog.js +238 -0
- package/dist/connectors/pinnacle/catalog.js.map +1 -0
- package/dist/connectors/pinnacle/index.d.ts +3 -0
- package/dist/connectors/pinnacle/index.d.ts.map +1 -0
- package/dist/connectors/pinnacle/index.js +3 -0
- package/dist/connectors/pinnacle/index.js.map +1 -0
- package/dist/connectors/pinnacle/taxonomy.d.ts +53 -0
- package/dist/connectors/pinnacle/taxonomy.d.ts.map +1 -0
- package/dist/connectors/pinnacle/taxonomy.js +206 -0
- package/dist/connectors/pinnacle/taxonomy.js.map +1 -0
- package/dist/errors/index.d.ts +47 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +257 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/images/index.d.ts +31 -0
- package/dist/images/index.d.ts.map +1 -0
- package/dist/images/index.js +39 -0
- package/dist/images/index.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/money/index.d.ts +5 -0
- package/dist/money/index.d.ts.map +1 -0
- package/dist/money/index.js +29 -0
- package/dist/money/index.js.map +1 -0
- package/dist/react-router/index.d.ts +3 -0
- package/dist/react-router/index.d.ts.map +1 -0
- package/dist/react-router/index.js +2 -0
- package/dist/react-router/index.js.map +1 -0
- package/dist/shopify/index.d.ts +107 -0
- package/dist/shopify/index.d.ts.map +1 -0
- package/dist/shopify/index.js +524 -0
- package/dist/shopify/index.js.map +1 -0
- package/dist/types/index.d.ts +172 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
const DEFAULT_HOME_ACTION = { label: "Return home", url: "/" };
|
|
2
|
+
const DEFAULT_CATALOG_ACTION = { label: "Browse catalogue", url: "/parts/" };
|
|
3
|
+
const DEFAULT_CONTACT_ACTION = { label: "Contact support", url: "/contact/" };
|
|
4
|
+
export function classifyRouteError(error, surface = "root", options = {}) {
|
|
5
|
+
const status = getRouteErrorStatus(error);
|
|
6
|
+
const actions = getActions(options);
|
|
7
|
+
if (status === 404)
|
|
8
|
+
return notFoundForSurface(surface, actions);
|
|
9
|
+
if (status === 400) {
|
|
10
|
+
return {
|
|
11
|
+
status,
|
|
12
|
+
title: "Request could not be completed",
|
|
13
|
+
message: "The page request was missing required information.",
|
|
14
|
+
variant: "bad-request",
|
|
15
|
+
primaryAction: surface === "cart" ? actions.catalog : actions.home,
|
|
16
|
+
secondaryAction: surface === "cart" ? actions.home : actions.catalog,
|
|
17
|
+
contactAction: actions.contact,
|
|
18
|
+
callAction: actions.call,
|
|
19
|
+
showRetry: false,
|
|
20
|
+
showContact: true,
|
|
21
|
+
showCall: false,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
if (status === 401 || status === 403) {
|
|
25
|
+
return {
|
|
26
|
+
status,
|
|
27
|
+
title: "Access unavailable",
|
|
28
|
+
message: "We could not open this page from the current session.",
|
|
29
|
+
variant: "auth",
|
|
30
|
+
primaryAction: actions.home,
|
|
31
|
+
secondaryAction: actions.catalog,
|
|
32
|
+
contactAction: actions.contact,
|
|
33
|
+
callAction: actions.call,
|
|
34
|
+
showRetry: true,
|
|
35
|
+
showContact: true,
|
|
36
|
+
showCall: false,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return unavailableForSurface(surface, status, actions);
|
|
40
|
+
}
|
|
41
|
+
export function getRouteErrorStatus(error) {
|
|
42
|
+
if (isResponseLike(error))
|
|
43
|
+
return error.status;
|
|
44
|
+
if (isRouteErrorResponseLike(error))
|
|
45
|
+
return error.status;
|
|
46
|
+
if (isStorefrontApiErrorLike(error) && typeof error.status === "number")
|
|
47
|
+
return error.status;
|
|
48
|
+
return 500;
|
|
49
|
+
}
|
|
50
|
+
export function shouldLogRouteError(error) {
|
|
51
|
+
const status = getRouteErrorStatus(error);
|
|
52
|
+
if (status >= 500)
|
|
53
|
+
return true;
|
|
54
|
+
return isStorefrontApiErrorLike(error) && status >= 400;
|
|
55
|
+
}
|
|
56
|
+
export function routeErrorLogFields(error, request, source = "react-router") {
|
|
57
|
+
const url = new URL(request.url);
|
|
58
|
+
const status = getRouteErrorStatus(error);
|
|
59
|
+
return {
|
|
60
|
+
source,
|
|
61
|
+
timestamp: new Date().toISOString(),
|
|
62
|
+
method: request.method,
|
|
63
|
+
path: url.pathname,
|
|
64
|
+
queryPresent: url.searchParams.size > 0,
|
|
65
|
+
status,
|
|
66
|
+
errorType: getRouteErrorType(error),
|
|
67
|
+
errorName: error instanceof Error ? error.name : getRouteErrorType(error),
|
|
68
|
+
shopifyStatus: isStorefrontApiErrorLike(error) ? error.status : undefined,
|
|
69
|
+
shopifyErrorCount: isStorefrontApiErrorLike(error) ? error.errors?.length ?? 0 : undefined,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function notFoundForSurface(surface, actions) {
|
|
73
|
+
if (surface === "product") {
|
|
74
|
+
return {
|
|
75
|
+
status: 404,
|
|
76
|
+
title: "Product not found",
|
|
77
|
+
message: "We could not find that product. It may have sold or the link may be old.",
|
|
78
|
+
variant: "not-found",
|
|
79
|
+
primaryAction: actions.catalog,
|
|
80
|
+
secondaryAction: actions.home,
|
|
81
|
+
contactAction: actions.contact,
|
|
82
|
+
callAction: actions.call,
|
|
83
|
+
showRetry: false,
|
|
84
|
+
showContact: true,
|
|
85
|
+
showCall: Boolean(actions.call),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (surface === "collection") {
|
|
89
|
+
return {
|
|
90
|
+
status: 404,
|
|
91
|
+
title: "Collection not found",
|
|
92
|
+
message: "We could not find that collection. Browse the catalogue instead.",
|
|
93
|
+
variant: "not-found",
|
|
94
|
+
primaryAction: actions.catalog,
|
|
95
|
+
secondaryAction: actions.home,
|
|
96
|
+
contactAction: actions.contact,
|
|
97
|
+
callAction: actions.call,
|
|
98
|
+
showRetry: false,
|
|
99
|
+
showContact: false,
|
|
100
|
+
showCall: false,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
if (surface === "catalog" || surface === "search") {
|
|
104
|
+
return {
|
|
105
|
+
status: 404,
|
|
106
|
+
title: "Catalogue page not found",
|
|
107
|
+
message: "We could not find that catalogue page.",
|
|
108
|
+
variant: "not-found",
|
|
109
|
+
primaryAction: actions.catalog,
|
|
110
|
+
secondaryAction: actions.home,
|
|
111
|
+
contactAction: actions.contact,
|
|
112
|
+
callAction: actions.call,
|
|
113
|
+
showRetry: false,
|
|
114
|
+
showContact: false,
|
|
115
|
+
showCall: false,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
status: 404,
|
|
120
|
+
title: "Page not found",
|
|
121
|
+
message: "We could not find that page.",
|
|
122
|
+
variant: "not-found",
|
|
123
|
+
primaryAction: actions.home,
|
|
124
|
+
secondaryAction: actions.catalog,
|
|
125
|
+
contactAction: actions.contact,
|
|
126
|
+
callAction: actions.call,
|
|
127
|
+
showRetry: false,
|
|
128
|
+
showContact: false,
|
|
129
|
+
showCall: false,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function unavailableForSurface(surface, status, actions) {
|
|
133
|
+
if (surface === "catalog" || surface === "search") {
|
|
134
|
+
return {
|
|
135
|
+
status,
|
|
136
|
+
title: "Catalogue unavailable",
|
|
137
|
+
message: "We could not load the catalogue right now.",
|
|
138
|
+
variant: "catalog",
|
|
139
|
+
primaryAction: actions.catalog,
|
|
140
|
+
secondaryAction: actions.home,
|
|
141
|
+
contactAction: actions.contact,
|
|
142
|
+
callAction: actions.call,
|
|
143
|
+
showRetry: true,
|
|
144
|
+
showContact: true,
|
|
145
|
+
showCall: Boolean(actions.call),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (surface === "product") {
|
|
149
|
+
return {
|
|
150
|
+
status,
|
|
151
|
+
title: "Product unavailable",
|
|
152
|
+
message: "We could not load this product right now.",
|
|
153
|
+
variant: "product",
|
|
154
|
+
primaryAction: actions.catalog,
|
|
155
|
+
secondaryAction: actions.home,
|
|
156
|
+
contactAction: actions.contact,
|
|
157
|
+
callAction: actions.call,
|
|
158
|
+
showRetry: true,
|
|
159
|
+
showContact: true,
|
|
160
|
+
showCall: Boolean(actions.call),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
if (surface === "cart") {
|
|
164
|
+
return {
|
|
165
|
+
status,
|
|
166
|
+
title: "Cart unavailable",
|
|
167
|
+
message: "We could not load your cart right now.",
|
|
168
|
+
variant: "cart",
|
|
169
|
+
primaryAction: actions.catalog,
|
|
170
|
+
secondaryAction: actions.home,
|
|
171
|
+
contactAction: actions.contact,
|
|
172
|
+
callAction: actions.call,
|
|
173
|
+
showRetry: true,
|
|
174
|
+
showContact: true,
|
|
175
|
+
showCall: false,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (surface === "page" || surface === "policy") {
|
|
179
|
+
return {
|
|
180
|
+
status,
|
|
181
|
+
title: "Page unavailable",
|
|
182
|
+
message: "We could not load this page right now.",
|
|
183
|
+
variant: "page",
|
|
184
|
+
primaryAction: actions.home,
|
|
185
|
+
secondaryAction: actions.catalog,
|
|
186
|
+
contactAction: actions.contact,
|
|
187
|
+
callAction: actions.call,
|
|
188
|
+
showRetry: true,
|
|
189
|
+
showContact: true,
|
|
190
|
+
showCall: false,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (surface === "home") {
|
|
194
|
+
return {
|
|
195
|
+
status,
|
|
196
|
+
title: "Storefront unavailable",
|
|
197
|
+
message: "We could not load the storefront homepage right now.",
|
|
198
|
+
variant: "generic",
|
|
199
|
+
primaryAction: actions.catalog,
|
|
200
|
+
secondaryAction: actions.home,
|
|
201
|
+
contactAction: actions.contact,
|
|
202
|
+
callAction: actions.call,
|
|
203
|
+
showRetry: true,
|
|
204
|
+
showContact: true,
|
|
205
|
+
showCall: Boolean(actions.call),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
status,
|
|
210
|
+
title: "Something went wrong",
|
|
211
|
+
message: "Something went wrong. Please try again or contact support.",
|
|
212
|
+
variant: "generic",
|
|
213
|
+
primaryAction: actions.home,
|
|
214
|
+
secondaryAction: actions.catalog,
|
|
215
|
+
contactAction: actions.contact,
|
|
216
|
+
callAction: actions.call,
|
|
217
|
+
showRetry: true,
|
|
218
|
+
showContact: true,
|
|
219
|
+
showCall: false,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function getActions(options) {
|
|
223
|
+
return {
|
|
224
|
+
home: options.homeAction ?? DEFAULT_HOME_ACTION,
|
|
225
|
+
catalog: options.catalogAction ?? DEFAULT_CATALOG_ACTION,
|
|
226
|
+
contact: options.contactAction ?? DEFAULT_CONTACT_ACTION,
|
|
227
|
+
call: options.callAction,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
function getRouteErrorType(error) {
|
|
231
|
+
if (isResponseLike(error))
|
|
232
|
+
return "response";
|
|
233
|
+
if (isRouteErrorResponseLike(error))
|
|
234
|
+
return "route-response";
|
|
235
|
+
if (isStorefrontApiErrorLike(error))
|
|
236
|
+
return "shopify-storefront";
|
|
237
|
+
if (error instanceof Error)
|
|
238
|
+
return "error";
|
|
239
|
+
return typeof error;
|
|
240
|
+
}
|
|
241
|
+
function isResponseLike(error) {
|
|
242
|
+
return typeof Response !== "undefined" && error instanceof Response;
|
|
243
|
+
}
|
|
244
|
+
export function isRouteErrorResponseLike(error) {
|
|
245
|
+
if (!error || typeof error !== "object")
|
|
246
|
+
return false;
|
|
247
|
+
const candidate = error;
|
|
248
|
+
return (typeof candidate.status === "number" &&
|
|
249
|
+
(typeof candidate.statusText === "string" || "data" in candidate || "internal" in candidate));
|
|
250
|
+
}
|
|
251
|
+
function isStorefrontApiErrorLike(error) {
|
|
252
|
+
if (!error || typeof error !== "object")
|
|
253
|
+
return false;
|
|
254
|
+
const candidate = error;
|
|
255
|
+
return candidate.name === "StorefrontApiError" && (typeof candidate.status === "number" || candidate.status === null);
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAgDA,MAAM,mBAAmB,GAAqB,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACjF,MAAM,sBAAsB,GAAqB,EAAE,KAAK,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAC/F,MAAM,sBAAsB,GAAqB,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;AAEhG,MAAM,UAAU,kBAAkB,CAChC,KAAc,EACd,UAA6B,MAAM,EACnC,UAAuC,EAAE;IAEzC,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAEpC,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAEhE,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO;YACL,MAAM;YACN,KAAK,EAAE,gCAAgC;YACvC,OAAO,EAAE,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I,MAAM,IAAI,SAAS,IAAI,UAAU,IAAI,SAAS,CAAC,CAC7F,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,SAAS,GAAG,KAA+D,CAAC;IAClF,OAAO,SAAS,CAAC,IAAI,KAAK,oBAAoB,IAAI,CAAC,OAAO,SAAS,CAAC,MAAM,KAAK,QAAQ,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;AACxH,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ImageAsset {
|
|
2
|
+
local?: string;
|
|
3
|
+
cloudflareId?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
variants?: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export type ImageAssetRegistry<TAssetKey extends string = string> = Record<TAssetKey, ImageAsset>;
|
|
8
|
+
export interface ImageUrlOptions<TAssetKey extends string = string> {
|
|
9
|
+
assets?: Partial<ImageAssetRegistry<TAssetKey>>;
|
|
10
|
+
cloudflareImagesBaseUrl?: string | null;
|
|
11
|
+
variant?: string;
|
|
12
|
+
fallbackUrl?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ImageUrlResolverOptions<TAssetKey extends string = string> extends ImageUrlOptions<TAssetKey> {
|
|
15
|
+
defaultVariant?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ShopifyImageTransform {
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
maxHeight?: number;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
crop?: "CENTER" | "TOP" | "BOTTOM" | "LEFT" | "RIGHT";
|
|
23
|
+
scale?: number;
|
|
24
|
+
preferredContentType?: "JPG" | "PNG" | "WEBP";
|
|
25
|
+
}
|
|
26
|
+
export declare function makeImageAsset(asset: ImageAsset): ImageAsset;
|
|
27
|
+
export declare function getImageAsset<TAssetKey extends string>(assetOrKey: ImageAsset | TAssetKey, assets?: Partial<ImageAssetRegistry<TAssetKey>>): ImageAsset;
|
|
28
|
+
export declare function getImageUrl<TAssetKey extends string>(assetOrKey: ImageAsset | TAssetKey, options?: ImageUrlOptions<TAssetKey>): string;
|
|
29
|
+
export declare function createImageUrlResolver<TAssetKey extends string>(options: ImageUrlResolverOptions<TAssetKey>): (assetOrKey: ImageAsset | TAssetKey, variant?: string) => string;
|
|
30
|
+
export declare function buildShopifyImageUrl(sourceUrl: string, transform?: ShopifyImageTransform): string;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/images/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,MAAM,kBAAkB,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAElG,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM;IAChE,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC;IAChD,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,eAAe,CAAC,SAAS,CAAC;IAC5G,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC/C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAE5D;AAED,wBAAgB,aAAa,CAAC,SAAS,SAAS,MAAM,EACpD,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAM,GAClD,UAAU,CAMZ;AAED,wBAAgB,WAAW,CAAC,SAAS,SAAS,MAAM,EAClD,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,OAAO,GAAE,eAAe,CAAC,SAAS,CAAM,GACvC,MAAM,CASR;AAED,wBAAgB,sBAAsB,CAAC,SAAS,SAAS,MAAM,EAAE,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,IAClG,YAAY,UAAU,GAAG,SAAS,EAAE,gBAA+D,YAE5G;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,GAAE,qBAA0B,GAAG,MAAM,CAWrG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export function makeImageAsset(asset) {
|
|
2
|
+
return asset;
|
|
3
|
+
}
|
|
4
|
+
export function getImageAsset(assetOrKey, assets = {}) {
|
|
5
|
+
if (typeof assetOrKey === "string") {
|
|
6
|
+
return assets[assetOrKey] ?? { local: assetOrKey, cloudflareId: "", alt: "", variants: ["public"] };
|
|
7
|
+
}
|
|
8
|
+
return assetOrKey;
|
|
9
|
+
}
|
|
10
|
+
export function getImageUrl(assetOrKey, options = {}) {
|
|
11
|
+
const asset = getImageAsset(assetOrKey, options.assets);
|
|
12
|
+
const variant = options.variant ?? "public";
|
|
13
|
+
const baseUrl = stripTrailingSlashes(options.cloudflareImagesBaseUrl ?? "");
|
|
14
|
+
if (!asset.local && !asset.cloudflareId)
|
|
15
|
+
return options.fallbackUrl ?? "";
|
|
16
|
+
if (!baseUrl || !asset.cloudflareId)
|
|
17
|
+
return asset.local ?? options.fallbackUrl ?? "";
|
|
18
|
+
return `${baseUrl}/${stripEdgeSlashes(asset.cloudflareId)}/${variant}`;
|
|
19
|
+
}
|
|
20
|
+
export function createImageUrlResolver(options) {
|
|
21
|
+
return (assetOrKey, variant = options.defaultVariant ?? options.variant ?? "public") => getImageUrl(assetOrKey, { ...options, variant });
|
|
22
|
+
}
|
|
23
|
+
export function buildShopifyImageUrl(sourceUrl, transform = {}) {
|
|
24
|
+
if (!sourceUrl)
|
|
25
|
+
return "";
|
|
26
|
+
const url = new URL(sourceUrl);
|
|
27
|
+
const entries = Object.entries(transform).filter(([, value]) => value !== undefined && value !== null && value !== "");
|
|
28
|
+
for (const [key, value] of entries) {
|
|
29
|
+
url.searchParams.set(key, String(value));
|
|
30
|
+
}
|
|
31
|
+
return url.toString();
|
|
32
|
+
}
|
|
33
|
+
function stripTrailingSlashes(value) {
|
|
34
|
+
return value.replace(/\/+$/u, "");
|
|
35
|
+
}
|
|
36
|
+
function stripEdgeSlashes(value) {
|
|
37
|
+
return value.replace(/^\/+|\/+$/gu, "");
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/images/index.ts"],"names":[],"mappings":"AA8BA,MAAM,UAAU,cAAc,CAAC,KAAiB;IAC9C,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,UAAkC,EAClC,SAAiD,EAAE;IAEnD,IAAI,OAAO,UAAU,KAAK,QAAQ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I,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC;IAEvH,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,OAAO,EAAE,CAAC;QACnC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAa;IACzC,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./money/index.js";
|
|
3
|
+
export * from "./images/index.js";
|
|
4
|
+
export * from "./errors/index.js";
|
|
5
|
+
export * from "./connectors/pinnacle/index.js";
|
|
6
|
+
export * from "./catalog/index.js";
|
|
7
|
+
export * from "./cart/index.js";
|
|
8
|
+
export { ShopifyConfigError, StorefrontApiError, buildSearchQuery as buildShopifySearchQuery, createShopifyStorefrontClient, createShopifyStorefrontConfig, getCollectionByHandle as getShopifyCollectionByHandle, getCollections as getShopifyCollections, getHomepage as getShopifyHomepage, getProductByHandle as getShopifyProductByHandle, normalizeShopifyCollection, normalizeShopifyProduct, normalizeStoreDomain, searchProducts as searchShopifyProducts, searchProductsCatalog as searchShopifyProductsCatalog, storefrontRequest, } from "./shopify/index.js";
|
|
9
|
+
export type { ProductCatalogResult as ShopifyProductCatalogResult, ProductQueryOptions as ShopifyProductQueryOptions, ProductSearchInput as ShopifyProductSearchInput, ShopifyStorefrontClient, ShopifyStorefrontClientConfig, ShopifyStorefrontClientConfigInput, ShopifyStorefrontClientOptions, StorefrontFetch, } from "./shopify/index.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,IAAI,uBAAuB,EAC3C,6BAA6B,EAC7B,6BAA6B,EAC7B,qBAAqB,IAAI,4BAA4B,EACrD,cAAc,IAAI,qBAAqB,EACvC,WAAW,IAAI,kBAAkB,EACjC,kBAAkB,IAAI,yBAAyB,EAC/C,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,IAAI,qBAAqB,EACvC,qBAAqB,IAAI,4BAA4B,EACrD,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,oBAAoB,IAAI,2BAA2B,EACnD,mBAAmB,IAAI,0BAA0B,EACjD,kBAAkB,IAAI,yBAAyB,EAC/C,uBAAuB,EACvB,6BAA6B,EAC7B,kCAAkC,EAClC,8BAA8B,EAC9B,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./money/index.js";
|
|
3
|
+
export * from "./images/index.js";
|
|
4
|
+
export * from "./errors/index.js";
|
|
5
|
+
export * from "./connectors/pinnacle/index.js";
|
|
6
|
+
export * from "./catalog/index.js";
|
|
7
|
+
export * from "./cart/index.js";
|
|
8
|
+
export { ShopifyConfigError, StorefrontApiError, buildSearchQuery as buildShopifySearchQuery, createShopifyStorefrontClient, createShopifyStorefrontConfig, getCollectionByHandle as getShopifyCollectionByHandle, getCollections as getShopifyCollections, getHomepage as getShopifyHomepage, getProductByHandle as getShopifyProductByHandle, normalizeShopifyCollection, normalizeShopifyProduct, normalizeStoreDomain, searchProducts as searchShopifyProducts, searchProductsCatalog as searchShopifyProductsCatalog, storefrontRequest, } from "./shopify/index.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,IAAI,uBAAuB,EAC3C,6BAA6B,EAC7B,6BAA6B,EAC7B,qBAAqB,IAAI,4BAA4B,EACrD,cAAc,IAAI,qBAAqB,EACvC,WAAW,IAAI,kBAAkB,EACjC,kBAAkB,IAAI,yBAAyB,EAC/C,0BAA0B,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,IAAI,qBAAqB,EACvC,qBAAqB,IAAI,4BAA4B,EACrD,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Money, MoneyRange } from "../types/index.js";
|
|
2
|
+
export declare function formatMoney(money: Money, locale?: string): string;
|
|
3
|
+
export declare function formatMoneyRange(priceRange: MoneyRange, locale?: string): string;
|
|
4
|
+
export declare function isDiscounted(price: Money, compareAtPrice: Money | null): boolean;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI3D,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,SAAU,GAAG,MAAM,CAElE;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,SAAU,GAAG,MAAM,CASjF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,GAAG,IAAI,GAAG,OAAO,CAEhF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const formatters = new Map();
|
|
2
|
+
export function formatMoney(money, locale = "en-US") {
|
|
3
|
+
return getFormatter(locale, money.currencyCode).format(Number.parseFloat(money.amount));
|
|
4
|
+
}
|
|
5
|
+
export function formatMoneyRange(priceRange, locale = "en-US") {
|
|
6
|
+
const min = priceRange.minVariantPrice;
|
|
7
|
+
const max = priceRange.maxVariantPrice;
|
|
8
|
+
if (min.amount === max.amount && min.currencyCode === max.currencyCode) {
|
|
9
|
+
return formatMoney(min, locale);
|
|
10
|
+
}
|
|
11
|
+
return `${formatMoney(min, locale)} - ${formatMoney(max, locale)}`;
|
|
12
|
+
}
|
|
13
|
+
export function isDiscounted(price, compareAtPrice) {
|
|
14
|
+
return compareAtPrice !== null && Number.parseFloat(compareAtPrice.amount) > Number.parseFloat(price.amount);
|
|
15
|
+
}
|
|
16
|
+
function getFormatter(locale, currencyCode) {
|
|
17
|
+
const key = `${locale}\0${currencyCode}`;
|
|
18
|
+
let formatter = formatters.get(key);
|
|
19
|
+
if (!formatter) {
|
|
20
|
+
formatter = new Intl.NumberFormat(locale, {
|
|
21
|
+
style: "currency",
|
|
22
|
+
currency: currencyCode,
|
|
23
|
+
currencyDisplay: "narrowSymbol",
|
|
24
|
+
});
|
|
25
|
+
formatters.set(key, formatter);
|
|
26
|
+
}
|
|
27
|
+
return formatter;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG,IAAI,GAAG,EAA6B,CAAC;AAExD,MAAM,UAAU,WAAW,CAAC,KAAY,EAAE,MAAM,GAAG,OAAO;IACxD,OAAO,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,UAAsB,EAAE,MAAM,GAAG,OAAO;IACvE,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC;IACvC,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC;IAEvC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,EAAE,CAAC;QACvE,OAAO,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY,EAAE,cAA4B;IACrE,OAAO,cAAc,KAAK,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC/G,CAAC;AAED,SAAS,YAAY,CAAC,MAAc,EAAE,YAAoB;IACxD,MAAM,GAAG,GAAG,GAAG,MAAM,KAAK,YAAY,EAAE,CAAC;IACzC,IAAI,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,YAAY;YACtB,eAAe,EAAE,cAAc;SAChC,CAAC,CAAC;QACH,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react-router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,YAAY,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react-router/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { Collection, HomepageData, PageInfo, Product, StorefrontGraphQLError, StorefrontVariables } from "../types/index.js";
|
|
2
|
+
export interface ProductQueryOptions {
|
|
3
|
+
imageCount?: number | null;
|
|
4
|
+
variantCount?: number | null;
|
|
5
|
+
}
|
|
6
|
+
export interface ShopifyStorefrontClientConfigInput {
|
|
7
|
+
storeDomain: string;
|
|
8
|
+
storefrontAccessToken: string;
|
|
9
|
+
apiVersion?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface ShopifyStorefrontClientConfig {
|
|
12
|
+
storeDomain: string;
|
|
13
|
+
storefrontAccessToken: string;
|
|
14
|
+
apiVersion: string;
|
|
15
|
+
endpoint: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ShopifyStorefrontClientOptions {
|
|
18
|
+
fetch?: StorefrontFetch | undefined;
|
|
19
|
+
}
|
|
20
|
+
export interface ShopifyStorefrontClient {
|
|
21
|
+
readonly config: ShopifyStorefrontClientConfig;
|
|
22
|
+
request<TData, TVariables = StorefrontVariables>(query: string, variables?: TVariables): Promise<TData>;
|
|
23
|
+
}
|
|
24
|
+
interface ShopifyStorefrontTransport {
|
|
25
|
+
config: ShopifyStorefrontClientConfig;
|
|
26
|
+
fetch: StorefrontFetch;
|
|
27
|
+
}
|
|
28
|
+
export type StorefrontFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
29
|
+
export interface Connection<TNode> {
|
|
30
|
+
nodes?: TNode[] | null;
|
|
31
|
+
edges?: Array<{
|
|
32
|
+
node: TNode;
|
|
33
|
+
cursor?: string | null;
|
|
34
|
+
}> | null;
|
|
35
|
+
}
|
|
36
|
+
export interface ShopifyProductResponse extends Omit<Product, "images" | "variants"> {
|
|
37
|
+
images?: Connection<Product["images"][number]> | null;
|
|
38
|
+
variants?: Connection<Product["variants"][number]> | null;
|
|
39
|
+
}
|
|
40
|
+
export interface ShopifyCollectionResponse extends Omit<Collection, "products"> {
|
|
41
|
+
products?: Connection<ShopifyProductResponse> | null;
|
|
42
|
+
}
|
|
43
|
+
export interface ProductConnectionResponse extends Connection<ShopifyProductResponse> {
|
|
44
|
+
pageInfo?: PageInfo | null;
|
|
45
|
+
filters?: Array<{
|
|
46
|
+
id: string;
|
|
47
|
+
label: string;
|
|
48
|
+
type: string;
|
|
49
|
+
values: Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
label: string;
|
|
52
|
+
count: number;
|
|
53
|
+
input: unknown;
|
|
54
|
+
}>;
|
|
55
|
+
}> | null;
|
|
56
|
+
}
|
|
57
|
+
export interface ProductSearchInput {
|
|
58
|
+
query?: string | null;
|
|
59
|
+
make?: string | null;
|
|
60
|
+
model?: string | null;
|
|
61
|
+
year?: string | null;
|
|
62
|
+
productType?: string | null;
|
|
63
|
+
tags?: readonly string[];
|
|
64
|
+
productTypes?: readonly string[];
|
|
65
|
+
rawQueryParts?: readonly string[];
|
|
66
|
+
minPrice?: string | null;
|
|
67
|
+
maxPrice?: string | null;
|
|
68
|
+
available?: boolean | null;
|
|
69
|
+
first?: number | null;
|
|
70
|
+
last?: number | null;
|
|
71
|
+
after?: string | null;
|
|
72
|
+
before?: string | null;
|
|
73
|
+
sortMode?: string | null;
|
|
74
|
+
}
|
|
75
|
+
export interface ProductCatalogResult {
|
|
76
|
+
products: Product[];
|
|
77
|
+
pageInfo: PageInfo;
|
|
78
|
+
filters: ProductConnectionResponse["filters"];
|
|
79
|
+
query: string | null;
|
|
80
|
+
}
|
|
81
|
+
export declare class ShopifyConfigError extends Error {
|
|
82
|
+
constructor(message: string);
|
|
83
|
+
}
|
|
84
|
+
export declare class StorefrontApiError extends Error {
|
|
85
|
+
readonly status: number | null;
|
|
86
|
+
readonly errors: StorefrontGraphQLError[];
|
|
87
|
+
constructor(message: string, options?: {
|
|
88
|
+
status?: number | null;
|
|
89
|
+
errors?: StorefrontGraphQLError[] | undefined;
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export declare function createShopifyStorefrontConfig(input: ShopifyStorefrontClientConfigInput): ShopifyStorefrontClientConfig;
|
|
93
|
+
export declare function createShopifyStorefrontClient(input: ShopifyStorefrontClientConfigInput, options?: ShopifyStorefrontClientOptions): ShopifyStorefrontClient;
|
|
94
|
+
export declare function storefrontRequest<TData, TVariables = StorefrontVariables>(client: ShopifyStorefrontClient | ShopifyStorefrontTransport, query: string, variables?: TVariables): Promise<TData>;
|
|
95
|
+
export declare function getHomepage(client: ShopifyStorefrontClient): Promise<HomepageData>;
|
|
96
|
+
export declare function getCollections(client: ShopifyStorefrontClient, limit?: number): Promise<Collection[]>;
|
|
97
|
+
export declare function searchProducts(client: ShopifyStorefrontClient, input: ProductSearchInput, options?: ProductQueryOptions): Promise<Product[]>;
|
|
98
|
+
export declare function searchProductsCatalog(client: ShopifyStorefrontClient, input: ProductSearchInput, options?: ProductQueryOptions): Promise<ProductCatalogResult>;
|
|
99
|
+
export declare function getCollectionByHandle(client: ShopifyStorefrontClient, handle: string): Promise<Collection | null>;
|
|
100
|
+
export declare function getProductByHandle(client: ShopifyStorefrontClient, handle: string, options?: ProductQueryOptions): Promise<Product | null>;
|
|
101
|
+
export declare function buildSearchQuery(input: ProductSearchInput): string | null;
|
|
102
|
+
export declare function connectionNodes<TNode>(connection: Connection<TNode> | null | undefined): TNode[];
|
|
103
|
+
export declare function normalizeShopifyCollection(collection: ShopifyCollectionResponse): Collection;
|
|
104
|
+
export declare function normalizeShopifyProduct(product: ShopifyProductResponse): Product;
|
|
105
|
+
export declare function normalizeStoreDomain(storeDomain: string): string;
|
|
106
|
+
export {};
|
|
107
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shopify/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,sBAAsB,EAEtB,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAW3B,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,kCAAkC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,CAA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