swell-js 5.9.0 → 5.9.2
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/dist/api.mjs +8 -7
- package/dist/attributes.mjs +3 -4
- package/dist/cache.mjs +3 -4
- package/dist/card.mjs +3 -4
- package/dist/cart.mjs +3 -4
- package/dist/categories.mjs +3 -4
- package/dist/cookie.mjs +3 -4
- package/dist/currency.mjs +66 -24
- package/dist/{find.18f1ac6d.mjs → find.ba551a2e.mjs} +125 -5
- package/dist/{index.777df7a8.mjs → index.3949a230.mjs} +3 -8
- package/dist/index.mjs +3 -4
- package/dist/locale.mjs +1 -2
- package/dist/payment.mjs +3 -4
- package/dist/products.mjs +3 -4
- package/dist/{round.577a8441.mjs → round.c68b8be5.mjs} +1 -1
- package/dist/settings.mjs +3 -4
- package/dist/subscriptions.mjs +3 -4
- package/dist/swell.cjs +187 -27
- package/dist/swell.cjs.map +1 -1
- package/dist/swell.umd.min.js +13721 -18861
- package/dist/swell.umd.min.js.map +1 -1
- package/dist/utils/index.mjs +3 -4
- package/package.json +3 -3
package/dist/api.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import { getCookie, setCookie } from './cookie.mjs';
|
|
|
3
3
|
import methods$4 from './cache.mjs';
|
|
4
4
|
import methods$3 from './cart.mjs';
|
|
5
5
|
import methods$6 from './account.mjs';
|
|
6
|
-
import { j as isFunction, l as loadScript, e as isObject, v as vaultRequest, k as isEmpty, d as defaultMethods, x as trimEnd, y as utils, z as trimStart, A as trimBoth, b as toSnake,
|
|
7
|
-
import '
|
|
6
|
+
import { j as isFunction, l as loadScript, e as isObject, v as vaultRequest, k as isEmpty, d as defaultMethods, x as trimEnd, y as utils, z as trimStart, A as trimBoth, b as toSnake, o as base64Encode, i as isServer, t as toCamel } from './index.3949a230.mjs';
|
|
7
|
+
import { Q as stringifyQuery } from './find.ba551a2e.mjs';
|
|
8
8
|
import 'deepmerge';
|
|
9
9
|
import 'fast-case';
|
|
10
10
|
import methods$7 from './products.mjs';
|
|
@@ -15,9 +15,8 @@ import methods$b from './content.mjs';
|
|
|
15
15
|
import methods$c from './settings.mjs';
|
|
16
16
|
import PaymentController from './payment.mjs';
|
|
17
17
|
import methods$d from './locale.mjs';
|
|
18
|
-
import methods$e from './currency.mjs';
|
|
19
|
-
import './
|
|
20
|
-
import './round.577a8441.mjs';
|
|
18
|
+
import methods$e, { isCurrencyCode } from './currency.mjs';
|
|
19
|
+
import './round.c68b8be5.mjs';
|
|
21
20
|
|
|
22
21
|
class AppComponent {
|
|
23
22
|
#preact = null;
|
|
@@ -456,7 +455,7 @@ function swell(initStore = undefined, initKey, initOptions = {}) {
|
|
|
456
455
|
const api = {};
|
|
457
456
|
|
|
458
457
|
Object.assign(api, {
|
|
459
|
-
version: '5.9.
|
|
458
|
+
version: '5.9.2',
|
|
460
459
|
options,
|
|
461
460
|
request,
|
|
462
461
|
|
|
@@ -572,8 +571,10 @@ function swell(initStore = undefined, initKey, initOptions = {}) {
|
|
|
572
571
|
|
|
573
572
|
const session = allOptions.session || allOptions.getCookie('swell-session');
|
|
574
573
|
const locale = allOptions.locale || allOptions.getCookie('swell-locale');
|
|
574
|
+
const cookieCurrency = allOptions.getCookie('swell-currency');
|
|
575
575
|
const currency =
|
|
576
|
-
allOptions.currency ||
|
|
576
|
+
allOptions.currency ||
|
|
577
|
+
(isCurrencyCode(cookieCurrency) ? cookieCurrency : undefined);
|
|
577
578
|
const path = allOptions.path || '/api';
|
|
578
579
|
|
|
579
580
|
const baseUrl = `${allOptions.url}${allOptions.base || ''}${path}`;
|
package/dist/attributes.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { d as defaultMethods } from './index.
|
|
2
|
-
import '
|
|
3
|
-
import './
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { d as defaultMethods } from './index.3949a230.mjs';
|
|
2
|
+
import './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/cache.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { s as set, m as merge, t as toCamel, a as toCamelPath } from './index.
|
|
2
|
-
import { g as get } from './find.
|
|
3
|
-
import '
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { s as set, m as merge, t as toCamel, a as toCamelPath } from './index.3949a230.mjs';
|
|
2
|
+
import { g as get } from './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/card.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { b as toSnake, v as vaultRequest } from './index.
|
|
2
|
-
import '
|
|
3
|
-
import './
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { b as toSnake, v as vaultRequest } from './index.3949a230.mjs';
|
|
2
|
+
import './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/cart.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { c as cloneDeep } from './index.
|
|
1
|
+
import './find.ba551a2e.mjs';
|
|
2
|
+
import { c as cloneDeep } from './index.3949a230.mjs';
|
|
3
3
|
import 'deepmerge';
|
|
4
4
|
import 'fast-case';
|
|
5
5
|
import { cleanProductOptions } from './products.mjs';
|
|
6
|
-
import './
|
|
7
|
-
import './round.577a8441.mjs';
|
|
6
|
+
import './round.c68b8be5.mjs';
|
|
8
7
|
import './attributes.mjs';
|
|
9
8
|
|
|
10
9
|
function methods(api, options) {
|
package/dist/categories.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { d as defaultMethods } from './index.
|
|
2
|
-
import '
|
|
3
|
-
import './
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { d as defaultMethods } from './index.3949a230.mjs';
|
|
2
|
+
import './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/cookie.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { i as isServer } from './index.
|
|
2
|
-
import '
|
|
3
|
-
import './
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { i as isServer } from './index.3949a230.mjs';
|
|
2
|
+
import './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/currency.mjs
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import { r as round } from './round.577a8441.mjs';
|
|
1
|
+
import { f as find, g as get } from './find.ba551a2e.mjs';
|
|
2
|
+
import { r as round } from './round.c68b8be5.mjs';
|
|
4
3
|
import 'deepmerge';
|
|
5
4
|
import 'fast-case';
|
|
6
5
|
|
|
7
6
|
const FORMATTERS = {};
|
|
8
7
|
|
|
8
|
+
// A currency code is three letters. Anything else, such as a pending settings
|
|
9
|
+
// Promise that was stringified to "[object Promise]", is not a currency.
|
|
10
|
+
function isCurrencyCode(value) {
|
|
11
|
+
return typeof value === 'string' && /^[a-z]{3}$/i.test(value);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function defaultLocale() {
|
|
15
|
+
return typeof navigator === 'object' ? navigator.language : 'en-US';
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
function methods(api, opt) {
|
|
19
|
+
// Reads a store setting without ever returning a Promise. Until settings
|
|
20
|
+
// load, this starts the request and reports `loaded: false`.
|
|
21
|
+
function readSetting(path, def) {
|
|
22
|
+
const value = opt.api.settings.get(path, def);
|
|
23
|
+
|
|
24
|
+
if (value && typeof value.then === 'function') {
|
|
25
|
+
value.catch(() => {}); // callers that await settings report the error
|
|
26
|
+
return { loaded: false, value: def };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return { loaded: true, value };
|
|
30
|
+
}
|
|
31
|
+
|
|
10
32
|
return {
|
|
11
33
|
code: null,
|
|
12
34
|
state: null,
|
|
@@ -24,52 +46,72 @@ function methods(api, opt) {
|
|
|
24
46
|
|
|
25
47
|
selected() {
|
|
26
48
|
if (!this.code) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
49
|
+
const cookieCode = opt.getCookie('swell-currency');
|
|
50
|
+
|
|
51
|
+
if (isCurrencyCode(cookieCode)) {
|
|
52
|
+
this.set(cookieCode);
|
|
53
|
+
} else {
|
|
54
|
+
const storeCode = readSetting('store.currency');
|
|
55
|
+
|
|
56
|
+
if (!storeCode.loaded) {
|
|
57
|
+
// Settings are still loading: use a stand-in without saving it,
|
|
58
|
+
// so the store currency is picked up once they arrive.
|
|
59
|
+
return 'USD';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
this.set(isCurrencyCode(storeCode.value) ? storeCode.value : 'USD');
|
|
63
|
+
}
|
|
31
64
|
}
|
|
32
65
|
|
|
33
66
|
return this.code;
|
|
34
67
|
},
|
|
35
68
|
|
|
36
69
|
get() {
|
|
37
|
-
|
|
38
|
-
|
|
70
|
+
const code = this.selected();
|
|
71
|
+
|
|
72
|
+
if (this.state) {
|
|
73
|
+
return this.state;
|
|
39
74
|
}
|
|
40
|
-
|
|
41
|
-
|
|
75
|
+
|
|
76
|
+
if (!readSetting('store.currencies').loaded) {
|
|
77
|
+
// Not cached, so the currency's rate and decimals apply once
|
|
78
|
+
// settings load.
|
|
79
|
+
return { code };
|
|
42
80
|
}
|
|
43
|
-
|
|
81
|
+
|
|
82
|
+
return this.set(code);
|
|
44
83
|
},
|
|
45
84
|
|
|
46
85
|
set(code = 'USD') {
|
|
47
|
-
|
|
48
|
-
|
|
86
|
+
if (!isCurrencyCode(code)) {
|
|
87
|
+
// Never store or persist something that isn't a currency code.
|
|
88
|
+
return this.state || { code: this.code || 'USD' };
|
|
89
|
+
}
|
|
49
90
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
91
|
+
const list = readSetting('store.currencies', []);
|
|
92
|
+
const state = (list.loaded && find(list.value, { code })) || { code };
|
|
93
|
+
|
|
94
|
+
this.code = code;
|
|
95
|
+
// Only cache a state built from the loaded currency list.
|
|
96
|
+
this.state = list.loaded ? state : null;
|
|
97
|
+
this.locale = String(readSetting('store.locale', defaultLocale()).value);
|
|
56
98
|
|
|
57
99
|
opt.setCookie('swell-currency', code);
|
|
58
100
|
|
|
59
|
-
return
|
|
101
|
+
return state;
|
|
60
102
|
},
|
|
61
103
|
|
|
62
104
|
format(amount, params = {}) {
|
|
63
105
|
let state = this.get();
|
|
64
106
|
if (params.code && params.code !== state.code) {
|
|
65
|
-
const list =
|
|
107
|
+
const list = readSetting('store.currencies', []).value;
|
|
66
108
|
state = find(list, { code: params.code }) || { code: params.code };
|
|
67
109
|
}
|
|
68
110
|
|
|
69
111
|
const { code = 'USD', type, decimals, rate } = state;
|
|
70
112
|
const formatCode = params.code || code;
|
|
71
113
|
const formatRate = params.rate || rate;
|
|
72
|
-
const formatLocale = params.locale || this.locale;
|
|
114
|
+
const formatLocale = params.locale || this.locale || defaultLocale();
|
|
73
115
|
const formatDecimals = 'decimals' in params ? params.decimals : decimals;
|
|
74
116
|
const { convert = true } = params;
|
|
75
117
|
|
|
@@ -194,4 +236,4 @@ function methods(api, opt) {
|
|
|
194
236
|
};
|
|
195
237
|
}
|
|
196
238
|
|
|
197
|
-
export { methods as default };
|
|
239
|
+
export { methods as default, isCurrencyCode };
|
|
@@ -1,3 +1,123 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The UTF-8/RFC 3986 encoder in this file is adapted from qs 6.16.0 (lib/utils.js).
|
|
3
|
+
* That code was originally written by Brian White (mscdex) for the io.js core
|
|
4
|
+
* querystring library and adapted by qs for stricter adherence to RFC 3986.
|
|
5
|
+
*
|
|
6
|
+
* @license BSD-3-Clause
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) 2014, Nathan LaFreniere and other contributors
|
|
9
|
+
* (https://github.com/ljharb/qs/graphs/contributors)
|
|
10
|
+
* All rights reserved.
|
|
11
|
+
*
|
|
12
|
+
* Redistribution and use in source and binary forms, with or without
|
|
13
|
+
* modification, are permitted provided that the following conditions are met:
|
|
14
|
+
*
|
|
15
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
16
|
+
* list of conditions and the following disclaimer.
|
|
17
|
+
*
|
|
18
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
19
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
20
|
+
* and/or other materials provided with the distribution.
|
|
21
|
+
*
|
|
22
|
+
* 3. Neither the name of the copyright holder nor the names of its
|
|
23
|
+
* contributors may be used to endorse or promote products derived from
|
|
24
|
+
* this software without specific prior written permission.
|
|
25
|
+
*
|
|
26
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
27
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
28
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
29
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
30
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
31
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
32
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
33
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
34
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
35
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
const hex = Array.from({ length: 256 }, (_, c) =>
|
|
39
|
+
`%${c.toString(16).padStart(2, '0')}`.toUpperCase(),
|
|
40
|
+
);
|
|
41
|
+
const toISO = Date.prototype.toISOString;
|
|
42
|
+
|
|
43
|
+
function encode(value) {
|
|
44
|
+
if (value.length === 0) return value;
|
|
45
|
+
const string =
|
|
46
|
+
typeof value === 'symbol'
|
|
47
|
+
? Symbol.prototype.toString.call(value)
|
|
48
|
+
: String(value);
|
|
49
|
+
let out = '';
|
|
50
|
+
for (let j = 0; j < string.length; j += 1024) {
|
|
51
|
+
let segment = string.slice(j, j + 1024);
|
|
52
|
+
if (j + 1024 < string.length) {
|
|
53
|
+
const last = segment.charCodeAt(segment.length - 1);
|
|
54
|
+
if (last >= 0xd800 && last <= 0xdbff) {
|
|
55
|
+
segment = segment.slice(0, -1);
|
|
56
|
+
j -= 1;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
for (let i = 0; i < segment.length; ++i) {
|
|
60
|
+
let c = segment.charCodeAt(i);
|
|
61
|
+
if (
|
|
62
|
+
c === 0x2d ||
|
|
63
|
+
c === 0x2e ||
|
|
64
|
+
c === 0x5f ||
|
|
65
|
+
c === 0x7e ||
|
|
66
|
+
(c >= 0x30 && c <= 0x39) ||
|
|
67
|
+
(c >= 0x41 && c <= 0x5a) ||
|
|
68
|
+
(c >= 0x61 && c <= 0x7a)
|
|
69
|
+
) {
|
|
70
|
+
out += segment.charAt(i);
|
|
71
|
+
} else if (c < 0x80) {
|
|
72
|
+
out += hex[c];
|
|
73
|
+
} else if (c < 0x800) {
|
|
74
|
+
out += hex[0xc0 | (c >> 6)] + hex[0x80 | (c & 0x3f)];
|
|
75
|
+
} else if (c < 0xd800 || c >= 0xe000) {
|
|
76
|
+
out +=
|
|
77
|
+
hex[0xe0 | (c >> 12)] +
|
|
78
|
+
hex[0x80 | ((c >> 6) & 0x3f)] +
|
|
79
|
+
hex[0x80 | (c & 0x3f)];
|
|
80
|
+
} else {
|
|
81
|
+
i += 1;
|
|
82
|
+
c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
|
|
83
|
+
out +=
|
|
84
|
+
hex[0xf0 | (c >> 18)] +
|
|
85
|
+
hex[0x80 | ((c >> 12) & 0x3f)] +
|
|
86
|
+
hex[0x80 | ((c >> 6) & 0x3f)] +
|
|
87
|
+
hex[0x80 | (c & 0x3f)];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return out;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function stringifyQuery(obj) {
|
|
95
|
+
if (typeof obj !== 'object' || obj === null) return '';
|
|
96
|
+
const parts = [];
|
|
97
|
+
const ancestors = new Set();
|
|
98
|
+
function walk(value, prefix) {
|
|
99
|
+
if (value === undefined) return;
|
|
100
|
+
if (value instanceof Date) value = toISO.call(value);
|
|
101
|
+
if (value === null) value = '';
|
|
102
|
+
const isObject = typeof value === 'object';
|
|
103
|
+
const isBuffer =
|
|
104
|
+
isObject &&
|
|
105
|
+
value.constructor &&
|
|
106
|
+
value.constructor.isBuffer &&
|
|
107
|
+
value.constructor.isBuffer(value);
|
|
108
|
+
if ((!isObject && typeof value !== 'function') || isBuffer) {
|
|
109
|
+
parts.push(`${encode(prefix)}=${encode(value)}`);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (ancestors.has(value)) throw new RangeError('Cyclic object value');
|
|
113
|
+
ancestors.add(value);
|
|
114
|
+
for (const key of Object.keys(value)) walk(value[key], `${prefix}[${key}]`);
|
|
115
|
+
ancestors.delete(value);
|
|
116
|
+
}
|
|
117
|
+
for (const key of Object.keys(obj)) walk(obj[key], key);
|
|
118
|
+
return parts.join('&');
|
|
119
|
+
}
|
|
120
|
+
|
|
1
121
|
/** Detect free variable `global` from Node.js. */
|
|
2
122
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
3
123
|
|
|
@@ -1210,9 +1330,9 @@ function cacheHas(cache, key) {
|
|
|
1210
1330
|
}
|
|
1211
1331
|
|
|
1212
1332
|
/* Built-in method references that are verified to be native. */
|
|
1213
|
-
var Set = getNative(root$1, 'Set');
|
|
1333
|
+
var Set$1 = getNative(root$1, 'Set');
|
|
1214
1334
|
|
|
1215
|
-
const Set$
|
|
1335
|
+
const Set$2 = Set$1;
|
|
1216
1336
|
|
|
1217
1337
|
/**
|
|
1218
1338
|
* Converts `set` to an array of its values.
|
|
@@ -2235,7 +2355,7 @@ var dataViewTag = '[object DataView]';
|
|
|
2235
2355
|
var dataViewCtorString = toSource(DataView$1),
|
|
2236
2356
|
mapCtorString = toSource(Map$1),
|
|
2237
2357
|
promiseCtorString = toSource(Promise$2),
|
|
2238
|
-
setCtorString = toSource(Set$
|
|
2358
|
+
setCtorString = toSource(Set$2),
|
|
2239
2359
|
weakMapCtorString = toSource(WeakMap$1);
|
|
2240
2360
|
|
|
2241
2361
|
/**
|
|
@@ -2251,7 +2371,7 @@ var getTag = baseGetTag;
|
|
|
2251
2371
|
if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag) ||
|
|
2252
2372
|
(Map$1 && getTag(new Map$1) != mapTag) ||
|
|
2253
2373
|
(Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
|
|
2254
|
-
(Set$
|
|
2374
|
+
(Set$2 && getTag(new Set$2) != setTag) ||
|
|
2255
2375
|
(WeakMap$1 && getTag(new WeakMap$1) != weakMapTag)) {
|
|
2256
2376
|
getTag = function(value) {
|
|
2257
2377
|
var result = baseGetTag(value),
|
|
@@ -2964,4 +3084,4 @@ var find = createFind(findIndex);
|
|
|
2964
3084
|
|
|
2965
3085
|
const find$1 = find;
|
|
2966
3086
|
|
|
2967
|
-
export { arrayLikeKeys as A, getSymbols$1 as B, overArg as C, stubArray as D, baseGetAllKeys as E, isObjectLike as F, getTag$1 as G, nodeUtil$1 as H, baseUnary as I, isBuffer$1 as J, Stack as K, getAllKeys as L, baseIsEqual as M, isTypedArray$1 as N, baseKeys as O, findIndex as P, Set$
|
|
3087
|
+
export { arrayLikeKeys as A, getSymbols$1 as B, overArg as C, stubArray as D, baseGetAllKeys as E, isObjectLike as F, getTag$1 as G, nodeUtil$1 as H, baseUnary as I, isBuffer$1 as J, Stack as K, getAllKeys as L, baseIsEqual as M, isTypedArray$1 as N, baseKeys as O, findIndex as P, stringifyQuery as Q, Set$2 as S, Uint8Array$1 as U, toInteger as a, toString as b, getNative as c, castPath as d, eq as e, find$1 as f, get as g, toKey as h, isObject as i, isIndex as j, baseFindIndex as k, SetCache as l, cacheHas as m, baseGet as n, hasIn as o, Symbol$2 as p, isArray$1 as q, root$1 as r, setToArray as s, toNumber as t, isArguments$1 as u, arrayPush as v, identity as w, keys as x, isPrototype as y, isArrayLike as z };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { r as round } from './round.577a8441.mjs';
|
|
1
|
+
import { c as getNative, e as eq, i as isObject$1, d as castPath, h as toKey, j as isIndex, k as baseFindIndex, S as Set, s as setToArray, l as SetCache, m as cacheHas, n as baseGet, o as hasIn, p as Symbol$1, q as isArray, u as isArguments, v as arrayPush, w as identity, x as keys, y as isPrototype, z as isArrayLike, A as arrayLikeKeys, r as root, B as getSymbols, C as overArg, D as stubArray, E as baseGetAllKeys, U as Uint8Array, F as isObjectLike, G as getTag, H as nodeUtil, I as baseUnary, J as isBuffer, K as Stack, L as getAllKeys, b as toString, M as baseIsEqual, N as isTypedArray, O as baseKeys, f as find, P as findIndex, g as get, Q as stringifyQuery, t as toNumber } from './find.ba551a2e.mjs';
|
|
2
|
+
import { r as round } from './round.c68b8be5.mjs';
|
|
4
3
|
import deepmerge from 'deepmerge';
|
|
5
4
|
import { camelize, decamelize, camelizeKeys, decamelizeKeys } from 'fast-case';
|
|
6
5
|
|
|
@@ -1553,10 +1552,6 @@ function trimEnd(str) {
|
|
|
1553
1552
|
return typeof str === 'string' ? str.replace(/[/]+$/, '') : '';
|
|
1554
1553
|
}
|
|
1555
1554
|
|
|
1556
|
-
function stringifyQuery(str) {
|
|
1557
|
-
return stringify(str);
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
1555
|
function map(arr, cb) {
|
|
1561
1556
|
return arr instanceof Array ? arr.map(cb) : [];
|
|
1562
1557
|
}
|
|
@@ -1803,4 +1798,4 @@ const utils = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
1803
1798
|
vaultRequest
|
|
1804
1799
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
1805
1800
|
|
|
1806
|
-
export { trimBoth as A,
|
|
1801
|
+
export { trimBoth as A, toLower as B, map as C, toCamelPath as a, toSnake as b, cloneDeep as c, defaultMethods as d, isObject as e, camelCase as f, snakeCase as g, isEqual as h, isServer as i, isFunction as j, isEmpty as k, loadScript as l, merge as m, isLiveMode as n, base64Encode as o, pick$1 as p, getLocationParams as q, reduce as r, set as s, toCamel as t, uniq as u, vaultRequest as v, removeUrlParams as w, trimEnd as x, utils as y, trimStart as z };
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { default } from './api.mjs';
|
|
2
2
|
import './card.mjs';
|
|
3
|
-
import './index.
|
|
4
|
-
import '
|
|
5
|
-
import './
|
|
6
|
-
import './round.577a8441.mjs';
|
|
3
|
+
import './index.3949a230.mjs';
|
|
4
|
+
import './find.ba551a2e.mjs';
|
|
5
|
+
import './round.c68b8be5.mjs';
|
|
7
6
|
import 'deepmerge';
|
|
8
7
|
import 'fast-case';
|
|
9
8
|
import './cookie.mjs';
|
package/dist/locale.mjs
CHANGED
package/dist/payment.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import methods from './cart.mjs';
|
|
2
2
|
import methods$1 from './settings.mjs';
|
|
3
|
-
import { e as isObject, j as isFunction, l as loadScript, c as cloneDeep, v as vaultRequest, b as toSnake, p as pick, k as isEmpty, n as isLiveMode, o as base64Encode, q as getLocationParams, w as removeUrlParams, t as toCamel } from './index.
|
|
4
|
-
import { g as get } from './find.
|
|
5
|
-
import 'qs';
|
|
3
|
+
import { e as isObject, j as isFunction, l as loadScript, c as cloneDeep, v as vaultRequest, b as toSnake, p as pick, k as isEmpty, n as isLiveMode, o as base64Encode, q as getLocationParams, w as removeUrlParams, t as toCamel } from './index.3949a230.mjs';
|
|
4
|
+
import { g as get } from './find.ba551a2e.mjs';
|
|
6
5
|
import 'deepmerge';
|
|
7
6
|
import 'fast-case';
|
|
8
7
|
import './products.mjs';
|
|
9
8
|
import './attributes.mjs';
|
|
10
|
-
import './round.
|
|
9
|
+
import './round.c68b8be5.mjs';
|
|
11
10
|
|
|
12
11
|
const SCRIPT_HANDLERS = {
|
|
13
12
|
'stripe-js': loadStripe,
|
package/dist/products.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { d as defaultMethods, r as reduce, b as toSnake, t as toCamel, g as snakeCase, u as uniq, h as isEqual } from './index.
|
|
1
|
+
import { d as defaultMethods, r as reduce, b as toSnake, t as toCamel, g as snakeCase, u as uniq, h as isEqual } from './index.3949a230.mjs';
|
|
2
2
|
import methods$1 from './attributes.mjs';
|
|
3
|
-
import { g as get, f as find } from './find.
|
|
4
|
-
import '
|
|
5
|
-
import './round.577a8441.mjs';
|
|
3
|
+
import { g as get, f as find } from './find.ba551a2e.mjs';
|
|
4
|
+
import './round.c68b8be5.mjs';
|
|
6
5
|
import 'deepmerge';
|
|
7
6
|
import 'fast-case';
|
|
8
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as root, t as toNumber, a as toInteger, b as toString } from './find.
|
|
1
|
+
import { r as root, t as toNumber, a as toInteger, b as toString } from './find.ba551a2e.mjs';
|
|
2
2
|
|
|
3
3
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
4
4
|
var nativeIsFinite = root.isFinite,
|
package/dist/settings.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { s as set, t as toCamel, m as merge, c as cloneDeep, e as isObject, f as camelCase } from './index.
|
|
2
|
-
import { g as get, f as find } from './find.
|
|
3
|
-
import '
|
|
4
|
-
import './round.577a8441.mjs';
|
|
1
|
+
import { s as set, t as toCamel, m as merge, c as cloneDeep, e as isObject, f as camelCase } from './index.3949a230.mjs';
|
|
2
|
+
import { g as get, f as find } from './find.ba551a2e.mjs';
|
|
3
|
+
import './round.c68b8be5.mjs';
|
|
5
4
|
import 'deepmerge';
|
|
6
5
|
import 'fast-case';
|
|
7
6
|
|
package/dist/subscriptions.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { cleanProductOptions } from './products.mjs';
|
|
2
|
-
import { d as defaultMethods } from './index.
|
|
2
|
+
import { d as defaultMethods } from './index.3949a230.mjs';
|
|
3
3
|
import './attributes.mjs';
|
|
4
|
-
import './find.
|
|
5
|
-
import '
|
|
6
|
-
import './round.577a8441.mjs';
|
|
4
|
+
import './find.ba551a2e.mjs';
|
|
5
|
+
import './round.c68b8be5.mjs';
|
|
7
6
|
import 'deepmerge';
|
|
8
7
|
import 'fast-case';
|
|
9
8
|
|