swell-js 5.9.0 → 5.9.1
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 +4 -5
- 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 +2 -3
- 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 +121 -6
- package/dist/swell.cjs.map +1 -1
- package/dist/swell.umd.min.js +13676 -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';
|
|
@@ -16,8 +16,7 @@ import methods$c from './settings.mjs';
|
|
|
16
16
|
import PaymentController from './payment.mjs';
|
|
17
17
|
import methods$d from './locale.mjs';
|
|
18
18
|
import methods$e from './currency.mjs';
|
|
19
|
-
import './
|
|
20
|
-
import './round.577a8441.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.1',
|
|
460
459
|
options,
|
|
461
460
|
request,
|
|
462
461
|
|
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,6 +1,5 @@
|
|
|
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
|
|
|
@@ -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
|
|
package/dist/swell.cjs
CHANGED
|
@@ -1,9 +1,128 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const qs = require('qs');
|
|
4
3
|
const deepmerge = require('deepmerge');
|
|
5
4
|
const fastCase = require('fast-case');
|
|
6
5
|
|
|
6
|
+
/*!
|
|
7
|
+
* The UTF-8/RFC 3986 encoder in this file is adapted from qs 6.16.0 (lib/utils.js).
|
|
8
|
+
* That code was originally written by Brian White (mscdex) for the io.js core
|
|
9
|
+
* querystring library and adapted by qs for stricter adherence to RFC 3986.
|
|
10
|
+
*
|
|
11
|
+
* @license BSD-3-Clause
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) 2014, Nathan LaFreniere and other contributors
|
|
14
|
+
* (https://github.com/ljharb/qs/graphs/contributors)
|
|
15
|
+
* All rights reserved.
|
|
16
|
+
*
|
|
17
|
+
* Redistribution and use in source and binary forms, with or without
|
|
18
|
+
* modification, are permitted provided that the following conditions are met:
|
|
19
|
+
*
|
|
20
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
21
|
+
* list of conditions and the following disclaimer.
|
|
22
|
+
*
|
|
23
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
24
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
25
|
+
* and/or other materials provided with the distribution.
|
|
26
|
+
*
|
|
27
|
+
* 3. Neither the name of the copyright holder nor the names of its
|
|
28
|
+
* contributors may be used to endorse or promote products derived from
|
|
29
|
+
* this software without specific prior written permission.
|
|
30
|
+
*
|
|
31
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
32
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
33
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
34
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
35
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
36
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
37
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
38
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
39
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
40
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
const hex = Array.from({ length: 256 }, (_, c) =>
|
|
44
|
+
`%${c.toString(16).padStart(2, '0')}`.toUpperCase(),
|
|
45
|
+
);
|
|
46
|
+
const toISO = Date.prototype.toISOString;
|
|
47
|
+
|
|
48
|
+
function encode(value) {
|
|
49
|
+
if (value.length === 0) return value;
|
|
50
|
+
const string =
|
|
51
|
+
typeof value === 'symbol'
|
|
52
|
+
? Symbol.prototype.toString.call(value)
|
|
53
|
+
: String(value);
|
|
54
|
+
let out = '';
|
|
55
|
+
for (let j = 0; j < string.length; j += 1024) {
|
|
56
|
+
let segment = string.slice(j, j + 1024);
|
|
57
|
+
if (j + 1024 < string.length) {
|
|
58
|
+
const last = segment.charCodeAt(segment.length - 1);
|
|
59
|
+
if (last >= 0xd800 && last <= 0xdbff) {
|
|
60
|
+
segment = segment.slice(0, -1);
|
|
61
|
+
j -= 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (let i = 0; i < segment.length; ++i) {
|
|
65
|
+
let c = segment.charCodeAt(i);
|
|
66
|
+
if (
|
|
67
|
+
c === 0x2d ||
|
|
68
|
+
c === 0x2e ||
|
|
69
|
+
c === 0x5f ||
|
|
70
|
+
c === 0x7e ||
|
|
71
|
+
(c >= 0x30 && c <= 0x39) ||
|
|
72
|
+
(c >= 0x41 && c <= 0x5a) ||
|
|
73
|
+
(c >= 0x61 && c <= 0x7a)
|
|
74
|
+
) {
|
|
75
|
+
out += segment.charAt(i);
|
|
76
|
+
} else if (c < 0x80) {
|
|
77
|
+
out += hex[c];
|
|
78
|
+
} else if (c < 0x800) {
|
|
79
|
+
out += hex[0xc0 | (c >> 6)] + hex[0x80 | (c & 0x3f)];
|
|
80
|
+
} else if (c < 0xd800 || c >= 0xe000) {
|
|
81
|
+
out +=
|
|
82
|
+
hex[0xe0 | (c >> 12)] +
|
|
83
|
+
hex[0x80 | ((c >> 6) & 0x3f)] +
|
|
84
|
+
hex[0x80 | (c & 0x3f)];
|
|
85
|
+
} else {
|
|
86
|
+
i += 1;
|
|
87
|
+
c = 0x10000 + (((c & 0x3ff) << 10) | (segment.charCodeAt(i) & 0x3ff));
|
|
88
|
+
out +=
|
|
89
|
+
hex[0xf0 | (c >> 18)] +
|
|
90
|
+
hex[0x80 | ((c >> 12) & 0x3f)] +
|
|
91
|
+
hex[0x80 | ((c >> 6) & 0x3f)] +
|
|
92
|
+
hex[0x80 | (c & 0x3f)];
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return out;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function stringifyQuery(obj) {
|
|
100
|
+
if (typeof obj !== 'object' || obj === null) return '';
|
|
101
|
+
const parts = [];
|
|
102
|
+
const ancestors = new Set();
|
|
103
|
+
function walk(value, prefix) {
|
|
104
|
+
if (value === undefined) return;
|
|
105
|
+
if (value instanceof Date) value = toISO.call(value);
|
|
106
|
+
if (value === null) value = '';
|
|
107
|
+
const isObject = typeof value === 'object';
|
|
108
|
+
const isBuffer =
|
|
109
|
+
isObject &&
|
|
110
|
+
value.constructor &&
|
|
111
|
+
value.constructor.isBuffer &&
|
|
112
|
+
value.constructor.isBuffer(value);
|
|
113
|
+
if ((!isObject && typeof value !== 'function') || isBuffer) {
|
|
114
|
+
parts.push(`${encode(prefix)}=${encode(value)}`);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (ancestors.has(value)) throw new RangeError('Cyclic object value');
|
|
118
|
+
ancestors.add(value);
|
|
119
|
+
for (const key of Object.keys(value)) walk(value[key], `${prefix}[${key}]`);
|
|
120
|
+
ancestors.delete(value);
|
|
121
|
+
}
|
|
122
|
+
for (const key of Object.keys(obj)) walk(obj[key], key);
|
|
123
|
+
return parts.join('&');
|
|
124
|
+
}
|
|
125
|
+
|
|
7
126
|
/** Detect free variable `global` from Node.js. */
|
|
8
127
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
9
128
|
|
|
@@ -4573,10 +4692,6 @@ function trimEnd(str) {
|
|
|
4573
4692
|
return typeof str === 'string' ? str.replace(/[/]+$/, '') : '';
|
|
4574
4693
|
}
|
|
4575
4694
|
|
|
4576
|
-
function stringifyQuery(str) {
|
|
4577
|
-
return qs.stringify(str);
|
|
4578
|
-
}
|
|
4579
|
-
|
|
4580
4695
|
function map(arr, cb) {
|
|
4581
4696
|
return arr instanceof Array ? arr.map(cb) : [];
|
|
4582
4697
|
}
|
|
@@ -13210,7 +13325,7 @@ function swell(initStore = undefined, initKey, initOptions = {}) {
|
|
|
13210
13325
|
const api = {};
|
|
13211
13326
|
|
|
13212
13327
|
Object.assign(api, {
|
|
13213
|
-
version: '5.9.
|
|
13328
|
+
version: '5.9.1',
|
|
13214
13329
|
options,
|
|
13215
13330
|
request,
|
|
13216
13331
|
|