quicksnack 3.46.1 → 3.46.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/bundle.js CHANGED
@@ -1470,14 +1470,6 @@ const FormGridCell = ({ position, align, rowOffset = 0, children, className, })
1470
1470
  return (React.createElement("div", { className: clsx(classes$3.formGridCell, rowOffset && classes$3.rowOffset, position.mobile && classes$3["mobile:position"], position.tablet && classes$3["tablet:position"], position.laptop && classes$3["laptop:position"], position.desktop && classes$3["desktop:position"], classNames, className), style: Object.assign(Object.assign({}, variables), dimensionVariables) }, children));
1471
1471
  };
1472
1472
 
1473
- const getFormGridWrapperProps = ({ position, align, label, hint, error, isRequired, }) => ({
1474
- position,
1475
- align,
1476
- label,
1477
- hint,
1478
- error,
1479
- isRequired,
1480
- });
1481
1473
  const FormGridWrapper = ({ position, align, label, hint, error, isRequired, children }) => (React.createElement(React.Fragment, null,
1482
1474
  React.createElement(FormGridCell, { position: position, align: align, className: "form-grid-cell__label-hint" },
1483
1475
  label && (React.createElement("label", { className: clsx(classes$4.label, !!error && classes$4.error) },
@@ -2018,6 +2010,1763 @@ var lodash_chunk = chunk;
2018
2010
 
2019
2011
  var _chunk = /*@__PURE__*/getDefaultExportFromCjs(lodash_chunk);
2020
2012
 
2013
+ var lodash_clonedeep = {exports: {}};
2014
+
2015
+ /**
2016
+ * lodash (Custom Build) <https://lodash.com/>
2017
+ * Build: `lodash modularize exports="npm" -o ./`
2018
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
2019
+ * Released under MIT license <https://lodash.com/license>
2020
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
2021
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
2022
+ */
2023
+ lodash_clonedeep.exports;
2024
+
2025
+ (function (module, exports) {
2026
+ /** Used as the size to enable large array optimizations. */
2027
+ var LARGE_ARRAY_SIZE = 200;
2028
+
2029
+ /** Used to stand-in for `undefined` hash values. */
2030
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
2031
+
2032
+ /** Used as references for various `Number` constants. */
2033
+ var MAX_SAFE_INTEGER = 9007199254740991;
2034
+
2035
+ /** `Object#toString` result references. */
2036
+ var argsTag = '[object Arguments]',
2037
+ arrayTag = '[object Array]',
2038
+ boolTag = '[object Boolean]',
2039
+ dateTag = '[object Date]',
2040
+ errorTag = '[object Error]',
2041
+ funcTag = '[object Function]',
2042
+ genTag = '[object GeneratorFunction]',
2043
+ mapTag = '[object Map]',
2044
+ numberTag = '[object Number]',
2045
+ objectTag = '[object Object]',
2046
+ promiseTag = '[object Promise]',
2047
+ regexpTag = '[object RegExp]',
2048
+ setTag = '[object Set]',
2049
+ stringTag = '[object String]',
2050
+ symbolTag = '[object Symbol]',
2051
+ weakMapTag = '[object WeakMap]';
2052
+
2053
+ var arrayBufferTag = '[object ArrayBuffer]',
2054
+ dataViewTag = '[object DataView]',
2055
+ float32Tag = '[object Float32Array]',
2056
+ float64Tag = '[object Float64Array]',
2057
+ int8Tag = '[object Int8Array]',
2058
+ int16Tag = '[object Int16Array]',
2059
+ int32Tag = '[object Int32Array]',
2060
+ uint8Tag = '[object Uint8Array]',
2061
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2062
+ uint16Tag = '[object Uint16Array]',
2063
+ uint32Tag = '[object Uint32Array]';
2064
+
2065
+ /**
2066
+ * Used to match `RegExp`
2067
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
2068
+ */
2069
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
2070
+
2071
+ /** Used to match `RegExp` flags from their coerced string values. */
2072
+ var reFlags = /\w*$/;
2073
+
2074
+ /** Used to detect host constructors (Safari). */
2075
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
2076
+
2077
+ /** Used to detect unsigned integer values. */
2078
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
2079
+
2080
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2081
+ var cloneableTags = {};
2082
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
2083
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2084
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
2085
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2086
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2087
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
2088
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
2089
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
2090
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
2091
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2092
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2093
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
2094
+ cloneableTags[weakMapTag] = false;
2095
+
2096
+ /** Detect free variable `global` from Node.js. */
2097
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
2098
+
2099
+ /** Detect free variable `self`. */
2100
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
2101
+
2102
+ /** Used as a reference to the global object. */
2103
+ var root = freeGlobal || freeSelf || Function('return this')();
2104
+
2105
+ /** Detect free variable `exports`. */
2106
+ var freeExports = exports && !exports.nodeType && exports;
2107
+
2108
+ /** Detect free variable `module`. */
2109
+ var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
2110
+
2111
+ /** Detect the popular CommonJS extension `module.exports`. */
2112
+ var moduleExports = freeModule && freeModule.exports === freeExports;
2113
+
2114
+ /**
2115
+ * Adds the key-value `pair` to `map`.
2116
+ *
2117
+ * @private
2118
+ * @param {Object} map The map to modify.
2119
+ * @param {Array} pair The key-value pair to add.
2120
+ * @returns {Object} Returns `map`.
2121
+ */
2122
+ function addMapEntry(map, pair) {
2123
+ // Don't return `map.set` because it's not chainable in IE 11.
2124
+ map.set(pair[0], pair[1]);
2125
+ return map;
2126
+ }
2127
+
2128
+ /**
2129
+ * Adds `value` to `set`.
2130
+ *
2131
+ * @private
2132
+ * @param {Object} set The set to modify.
2133
+ * @param {*} value The value to add.
2134
+ * @returns {Object} Returns `set`.
2135
+ */
2136
+ function addSetEntry(set, value) {
2137
+ // Don't return `set.add` because it's not chainable in IE 11.
2138
+ set.add(value);
2139
+ return set;
2140
+ }
2141
+
2142
+ /**
2143
+ * A specialized version of `_.forEach` for arrays without support for
2144
+ * iteratee shorthands.
2145
+ *
2146
+ * @private
2147
+ * @param {Array} [array] The array to iterate over.
2148
+ * @param {Function} iteratee The function invoked per iteration.
2149
+ * @returns {Array} Returns `array`.
2150
+ */
2151
+ function arrayEach(array, iteratee) {
2152
+ var index = -1,
2153
+ length = array ? array.length : 0;
2154
+
2155
+ while (++index < length) {
2156
+ if (iteratee(array[index], index, array) === false) {
2157
+ break;
2158
+ }
2159
+ }
2160
+ return array;
2161
+ }
2162
+
2163
+ /**
2164
+ * Appends the elements of `values` to `array`.
2165
+ *
2166
+ * @private
2167
+ * @param {Array} array The array to modify.
2168
+ * @param {Array} values The values to append.
2169
+ * @returns {Array} Returns `array`.
2170
+ */
2171
+ function arrayPush(array, values) {
2172
+ var index = -1,
2173
+ length = values.length,
2174
+ offset = array.length;
2175
+
2176
+ while (++index < length) {
2177
+ array[offset + index] = values[index];
2178
+ }
2179
+ return array;
2180
+ }
2181
+
2182
+ /**
2183
+ * A specialized version of `_.reduce` for arrays without support for
2184
+ * iteratee shorthands.
2185
+ *
2186
+ * @private
2187
+ * @param {Array} [array] The array to iterate over.
2188
+ * @param {Function} iteratee The function invoked per iteration.
2189
+ * @param {*} [accumulator] The initial value.
2190
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
2191
+ * the initial value.
2192
+ * @returns {*} Returns the accumulated value.
2193
+ */
2194
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
2195
+ var index = -1,
2196
+ length = array ? array.length : 0;
2197
+
2198
+ if (initAccum && length) {
2199
+ accumulator = array[++index];
2200
+ }
2201
+ while (++index < length) {
2202
+ accumulator = iteratee(accumulator, array[index], index, array);
2203
+ }
2204
+ return accumulator;
2205
+ }
2206
+
2207
+ /**
2208
+ * The base implementation of `_.times` without support for iteratee shorthands
2209
+ * or max array length checks.
2210
+ *
2211
+ * @private
2212
+ * @param {number} n The number of times to invoke `iteratee`.
2213
+ * @param {Function} iteratee The function invoked per iteration.
2214
+ * @returns {Array} Returns the array of results.
2215
+ */
2216
+ function baseTimes(n, iteratee) {
2217
+ var index = -1,
2218
+ result = Array(n);
2219
+
2220
+ while (++index < n) {
2221
+ result[index] = iteratee(index);
2222
+ }
2223
+ return result;
2224
+ }
2225
+
2226
+ /**
2227
+ * Gets the value at `key` of `object`.
2228
+ *
2229
+ * @private
2230
+ * @param {Object} [object] The object to query.
2231
+ * @param {string} key The key of the property to get.
2232
+ * @returns {*} Returns the property value.
2233
+ */
2234
+ function getValue(object, key) {
2235
+ return object == null ? undefined : object[key];
2236
+ }
2237
+
2238
+ /**
2239
+ * Checks if `value` is a host object in IE < 9.
2240
+ *
2241
+ * @private
2242
+ * @param {*} value The value to check.
2243
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
2244
+ */
2245
+ function isHostObject(value) {
2246
+ // Many host objects are `Object` objects that can coerce to strings
2247
+ // despite having improperly defined `toString` methods.
2248
+ var result = false;
2249
+ if (value != null && typeof value.toString != 'function') {
2250
+ try {
2251
+ result = !!(value + '');
2252
+ } catch (e) {}
2253
+ }
2254
+ return result;
2255
+ }
2256
+
2257
+ /**
2258
+ * Converts `map` to its key-value pairs.
2259
+ *
2260
+ * @private
2261
+ * @param {Object} map The map to convert.
2262
+ * @returns {Array} Returns the key-value pairs.
2263
+ */
2264
+ function mapToArray(map) {
2265
+ var index = -1,
2266
+ result = Array(map.size);
2267
+
2268
+ map.forEach(function(value, key) {
2269
+ result[++index] = [key, value];
2270
+ });
2271
+ return result;
2272
+ }
2273
+
2274
+ /**
2275
+ * Creates a unary function that invokes `func` with its argument transformed.
2276
+ *
2277
+ * @private
2278
+ * @param {Function} func The function to wrap.
2279
+ * @param {Function} transform The argument transform.
2280
+ * @returns {Function} Returns the new function.
2281
+ */
2282
+ function overArg(func, transform) {
2283
+ return function(arg) {
2284
+ return func(transform(arg));
2285
+ };
2286
+ }
2287
+
2288
+ /**
2289
+ * Converts `set` to an array of its values.
2290
+ *
2291
+ * @private
2292
+ * @param {Object} set The set to convert.
2293
+ * @returns {Array} Returns the values.
2294
+ */
2295
+ function setToArray(set) {
2296
+ var index = -1,
2297
+ result = Array(set.size);
2298
+
2299
+ set.forEach(function(value) {
2300
+ result[++index] = value;
2301
+ });
2302
+ return result;
2303
+ }
2304
+
2305
+ /** Used for built-in method references. */
2306
+ var arrayProto = Array.prototype,
2307
+ funcProto = Function.prototype,
2308
+ objectProto = Object.prototype;
2309
+
2310
+ /** Used to detect overreaching core-js shims. */
2311
+ var coreJsData = root['__core-js_shared__'];
2312
+
2313
+ /** Used to detect methods masquerading as native. */
2314
+ var maskSrcKey = (function() {
2315
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
2316
+ return uid ? ('Symbol(src)_1.' + uid) : '';
2317
+ }());
2318
+
2319
+ /** Used to resolve the decompiled source of functions. */
2320
+ var funcToString = funcProto.toString;
2321
+
2322
+ /** Used to check objects for own properties. */
2323
+ var hasOwnProperty = objectProto.hasOwnProperty;
2324
+
2325
+ /**
2326
+ * Used to resolve the
2327
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
2328
+ * of values.
2329
+ */
2330
+ var objectToString = objectProto.toString;
2331
+
2332
+ /** Used to detect if a method is native. */
2333
+ var reIsNative = RegExp('^' +
2334
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
2335
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
2336
+ );
2337
+
2338
+ /** Built-in value references. */
2339
+ var Buffer = moduleExports ? root.Buffer : undefined,
2340
+ Symbol = root.Symbol,
2341
+ Uint8Array = root.Uint8Array,
2342
+ getPrototype = overArg(Object.getPrototypeOf, Object),
2343
+ objectCreate = Object.create,
2344
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
2345
+ splice = arrayProto.splice;
2346
+
2347
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2348
+ var nativeGetSymbols = Object.getOwnPropertySymbols,
2349
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
2350
+ nativeKeys = overArg(Object.keys, Object);
2351
+
2352
+ /* Built-in method references that are verified to be native. */
2353
+ var DataView = getNative(root, 'DataView'),
2354
+ Map = getNative(root, 'Map'),
2355
+ Promise = getNative(root, 'Promise'),
2356
+ Set = getNative(root, 'Set'),
2357
+ WeakMap = getNative(root, 'WeakMap'),
2358
+ nativeCreate = getNative(Object, 'create');
2359
+
2360
+ /** Used to detect maps, sets, and weakmaps. */
2361
+ var dataViewCtorString = toSource(DataView),
2362
+ mapCtorString = toSource(Map),
2363
+ promiseCtorString = toSource(Promise),
2364
+ setCtorString = toSource(Set),
2365
+ weakMapCtorString = toSource(WeakMap);
2366
+
2367
+ /** Used to convert symbols to primitives and strings. */
2368
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
2369
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2370
+
2371
+ /**
2372
+ * Creates a hash object.
2373
+ *
2374
+ * @private
2375
+ * @constructor
2376
+ * @param {Array} [entries] The key-value pairs to cache.
2377
+ */
2378
+ function Hash(entries) {
2379
+ var index = -1,
2380
+ length = entries ? entries.length : 0;
2381
+
2382
+ this.clear();
2383
+ while (++index < length) {
2384
+ var entry = entries[index];
2385
+ this.set(entry[0], entry[1]);
2386
+ }
2387
+ }
2388
+
2389
+ /**
2390
+ * Removes all key-value entries from the hash.
2391
+ *
2392
+ * @private
2393
+ * @name clear
2394
+ * @memberOf Hash
2395
+ */
2396
+ function hashClear() {
2397
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
2398
+ }
2399
+
2400
+ /**
2401
+ * Removes `key` and its value from the hash.
2402
+ *
2403
+ * @private
2404
+ * @name delete
2405
+ * @memberOf Hash
2406
+ * @param {Object} hash The hash to modify.
2407
+ * @param {string} key The key of the value to remove.
2408
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2409
+ */
2410
+ function hashDelete(key) {
2411
+ return this.has(key) && delete this.__data__[key];
2412
+ }
2413
+
2414
+ /**
2415
+ * Gets the hash value for `key`.
2416
+ *
2417
+ * @private
2418
+ * @name get
2419
+ * @memberOf Hash
2420
+ * @param {string} key The key of the value to get.
2421
+ * @returns {*} Returns the entry value.
2422
+ */
2423
+ function hashGet(key) {
2424
+ var data = this.__data__;
2425
+ if (nativeCreate) {
2426
+ var result = data[key];
2427
+ return result === HASH_UNDEFINED ? undefined : result;
2428
+ }
2429
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
2430
+ }
2431
+
2432
+ /**
2433
+ * Checks if a hash value for `key` exists.
2434
+ *
2435
+ * @private
2436
+ * @name has
2437
+ * @memberOf Hash
2438
+ * @param {string} key The key of the entry to check.
2439
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2440
+ */
2441
+ function hashHas(key) {
2442
+ var data = this.__data__;
2443
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
2444
+ }
2445
+
2446
+ /**
2447
+ * Sets the hash `key` to `value`.
2448
+ *
2449
+ * @private
2450
+ * @name set
2451
+ * @memberOf Hash
2452
+ * @param {string} key The key of the value to set.
2453
+ * @param {*} value The value to set.
2454
+ * @returns {Object} Returns the hash instance.
2455
+ */
2456
+ function hashSet(key, value) {
2457
+ var data = this.__data__;
2458
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
2459
+ return this;
2460
+ }
2461
+
2462
+ // Add methods to `Hash`.
2463
+ Hash.prototype.clear = hashClear;
2464
+ Hash.prototype['delete'] = hashDelete;
2465
+ Hash.prototype.get = hashGet;
2466
+ Hash.prototype.has = hashHas;
2467
+ Hash.prototype.set = hashSet;
2468
+
2469
+ /**
2470
+ * Creates an list cache object.
2471
+ *
2472
+ * @private
2473
+ * @constructor
2474
+ * @param {Array} [entries] The key-value pairs to cache.
2475
+ */
2476
+ function ListCache(entries) {
2477
+ var index = -1,
2478
+ length = entries ? entries.length : 0;
2479
+
2480
+ this.clear();
2481
+ while (++index < length) {
2482
+ var entry = entries[index];
2483
+ this.set(entry[0], entry[1]);
2484
+ }
2485
+ }
2486
+
2487
+ /**
2488
+ * Removes all key-value entries from the list cache.
2489
+ *
2490
+ * @private
2491
+ * @name clear
2492
+ * @memberOf ListCache
2493
+ */
2494
+ function listCacheClear() {
2495
+ this.__data__ = [];
2496
+ }
2497
+
2498
+ /**
2499
+ * Removes `key` and its value from the list cache.
2500
+ *
2501
+ * @private
2502
+ * @name delete
2503
+ * @memberOf ListCache
2504
+ * @param {string} key The key of the value to remove.
2505
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2506
+ */
2507
+ function listCacheDelete(key) {
2508
+ var data = this.__data__,
2509
+ index = assocIndexOf(data, key);
2510
+
2511
+ if (index < 0) {
2512
+ return false;
2513
+ }
2514
+ var lastIndex = data.length - 1;
2515
+ if (index == lastIndex) {
2516
+ data.pop();
2517
+ } else {
2518
+ splice.call(data, index, 1);
2519
+ }
2520
+ return true;
2521
+ }
2522
+
2523
+ /**
2524
+ * Gets the list cache value for `key`.
2525
+ *
2526
+ * @private
2527
+ * @name get
2528
+ * @memberOf ListCache
2529
+ * @param {string} key The key of the value to get.
2530
+ * @returns {*} Returns the entry value.
2531
+ */
2532
+ function listCacheGet(key) {
2533
+ var data = this.__data__,
2534
+ index = assocIndexOf(data, key);
2535
+
2536
+ return index < 0 ? undefined : data[index][1];
2537
+ }
2538
+
2539
+ /**
2540
+ * Checks if a list cache value for `key` exists.
2541
+ *
2542
+ * @private
2543
+ * @name has
2544
+ * @memberOf ListCache
2545
+ * @param {string} key The key of the entry to check.
2546
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2547
+ */
2548
+ function listCacheHas(key) {
2549
+ return assocIndexOf(this.__data__, key) > -1;
2550
+ }
2551
+
2552
+ /**
2553
+ * Sets the list cache `key` to `value`.
2554
+ *
2555
+ * @private
2556
+ * @name set
2557
+ * @memberOf ListCache
2558
+ * @param {string} key The key of the value to set.
2559
+ * @param {*} value The value to set.
2560
+ * @returns {Object} Returns the list cache instance.
2561
+ */
2562
+ function listCacheSet(key, value) {
2563
+ var data = this.__data__,
2564
+ index = assocIndexOf(data, key);
2565
+
2566
+ if (index < 0) {
2567
+ data.push([key, value]);
2568
+ } else {
2569
+ data[index][1] = value;
2570
+ }
2571
+ return this;
2572
+ }
2573
+
2574
+ // Add methods to `ListCache`.
2575
+ ListCache.prototype.clear = listCacheClear;
2576
+ ListCache.prototype['delete'] = listCacheDelete;
2577
+ ListCache.prototype.get = listCacheGet;
2578
+ ListCache.prototype.has = listCacheHas;
2579
+ ListCache.prototype.set = listCacheSet;
2580
+
2581
+ /**
2582
+ * Creates a map cache object to store key-value pairs.
2583
+ *
2584
+ * @private
2585
+ * @constructor
2586
+ * @param {Array} [entries] The key-value pairs to cache.
2587
+ */
2588
+ function MapCache(entries) {
2589
+ var index = -1,
2590
+ length = entries ? entries.length : 0;
2591
+
2592
+ this.clear();
2593
+ while (++index < length) {
2594
+ var entry = entries[index];
2595
+ this.set(entry[0], entry[1]);
2596
+ }
2597
+ }
2598
+
2599
+ /**
2600
+ * Removes all key-value entries from the map.
2601
+ *
2602
+ * @private
2603
+ * @name clear
2604
+ * @memberOf MapCache
2605
+ */
2606
+ function mapCacheClear() {
2607
+ this.__data__ = {
2608
+ 'hash': new Hash,
2609
+ 'map': new (Map || ListCache),
2610
+ 'string': new Hash
2611
+ };
2612
+ }
2613
+
2614
+ /**
2615
+ * Removes `key` and its value from the map.
2616
+ *
2617
+ * @private
2618
+ * @name delete
2619
+ * @memberOf MapCache
2620
+ * @param {string} key The key of the value to remove.
2621
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2622
+ */
2623
+ function mapCacheDelete(key) {
2624
+ return getMapData(this, key)['delete'](key);
2625
+ }
2626
+
2627
+ /**
2628
+ * Gets the map value for `key`.
2629
+ *
2630
+ * @private
2631
+ * @name get
2632
+ * @memberOf MapCache
2633
+ * @param {string} key The key of the value to get.
2634
+ * @returns {*} Returns the entry value.
2635
+ */
2636
+ function mapCacheGet(key) {
2637
+ return getMapData(this, key).get(key);
2638
+ }
2639
+
2640
+ /**
2641
+ * Checks if a map value for `key` exists.
2642
+ *
2643
+ * @private
2644
+ * @name has
2645
+ * @memberOf MapCache
2646
+ * @param {string} key The key of the entry to check.
2647
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2648
+ */
2649
+ function mapCacheHas(key) {
2650
+ return getMapData(this, key).has(key);
2651
+ }
2652
+
2653
+ /**
2654
+ * Sets the map `key` to `value`.
2655
+ *
2656
+ * @private
2657
+ * @name set
2658
+ * @memberOf MapCache
2659
+ * @param {string} key The key of the value to set.
2660
+ * @param {*} value The value to set.
2661
+ * @returns {Object} Returns the map cache instance.
2662
+ */
2663
+ function mapCacheSet(key, value) {
2664
+ getMapData(this, key).set(key, value);
2665
+ return this;
2666
+ }
2667
+
2668
+ // Add methods to `MapCache`.
2669
+ MapCache.prototype.clear = mapCacheClear;
2670
+ MapCache.prototype['delete'] = mapCacheDelete;
2671
+ MapCache.prototype.get = mapCacheGet;
2672
+ MapCache.prototype.has = mapCacheHas;
2673
+ MapCache.prototype.set = mapCacheSet;
2674
+
2675
+ /**
2676
+ * Creates a stack cache object to store key-value pairs.
2677
+ *
2678
+ * @private
2679
+ * @constructor
2680
+ * @param {Array} [entries] The key-value pairs to cache.
2681
+ */
2682
+ function Stack(entries) {
2683
+ this.__data__ = new ListCache(entries);
2684
+ }
2685
+
2686
+ /**
2687
+ * Removes all key-value entries from the stack.
2688
+ *
2689
+ * @private
2690
+ * @name clear
2691
+ * @memberOf Stack
2692
+ */
2693
+ function stackClear() {
2694
+ this.__data__ = new ListCache;
2695
+ }
2696
+
2697
+ /**
2698
+ * Removes `key` and its value from the stack.
2699
+ *
2700
+ * @private
2701
+ * @name delete
2702
+ * @memberOf Stack
2703
+ * @param {string} key The key of the value to remove.
2704
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2705
+ */
2706
+ function stackDelete(key) {
2707
+ return this.__data__['delete'](key);
2708
+ }
2709
+
2710
+ /**
2711
+ * Gets the stack value for `key`.
2712
+ *
2713
+ * @private
2714
+ * @name get
2715
+ * @memberOf Stack
2716
+ * @param {string} key The key of the value to get.
2717
+ * @returns {*} Returns the entry value.
2718
+ */
2719
+ function stackGet(key) {
2720
+ return this.__data__.get(key);
2721
+ }
2722
+
2723
+ /**
2724
+ * Checks if a stack value for `key` exists.
2725
+ *
2726
+ * @private
2727
+ * @name has
2728
+ * @memberOf Stack
2729
+ * @param {string} key The key of the entry to check.
2730
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2731
+ */
2732
+ function stackHas(key) {
2733
+ return this.__data__.has(key);
2734
+ }
2735
+
2736
+ /**
2737
+ * Sets the stack `key` to `value`.
2738
+ *
2739
+ * @private
2740
+ * @name set
2741
+ * @memberOf Stack
2742
+ * @param {string} key The key of the value to set.
2743
+ * @param {*} value The value to set.
2744
+ * @returns {Object} Returns the stack cache instance.
2745
+ */
2746
+ function stackSet(key, value) {
2747
+ var cache = this.__data__;
2748
+ if (cache instanceof ListCache) {
2749
+ var pairs = cache.__data__;
2750
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
2751
+ pairs.push([key, value]);
2752
+ return this;
2753
+ }
2754
+ cache = this.__data__ = new MapCache(pairs);
2755
+ }
2756
+ cache.set(key, value);
2757
+ return this;
2758
+ }
2759
+
2760
+ // Add methods to `Stack`.
2761
+ Stack.prototype.clear = stackClear;
2762
+ Stack.prototype['delete'] = stackDelete;
2763
+ Stack.prototype.get = stackGet;
2764
+ Stack.prototype.has = stackHas;
2765
+ Stack.prototype.set = stackSet;
2766
+
2767
+ /**
2768
+ * Creates an array of the enumerable property names of the array-like `value`.
2769
+ *
2770
+ * @private
2771
+ * @param {*} value The value to query.
2772
+ * @param {boolean} inherited Specify returning inherited property names.
2773
+ * @returns {Array} Returns the array of property names.
2774
+ */
2775
+ function arrayLikeKeys(value, inherited) {
2776
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
2777
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
2778
+ var result = (isArray(value) || isArguments(value))
2779
+ ? baseTimes(value.length, String)
2780
+ : [];
2781
+
2782
+ var length = result.length,
2783
+ skipIndexes = !!length;
2784
+
2785
+ for (var key in value) {
2786
+ if ((inherited || hasOwnProperty.call(value, key)) &&
2787
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
2788
+ result.push(key);
2789
+ }
2790
+ }
2791
+ return result;
2792
+ }
2793
+
2794
+ /**
2795
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
2796
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2797
+ * for equality comparisons.
2798
+ *
2799
+ * @private
2800
+ * @param {Object} object The object to modify.
2801
+ * @param {string} key The key of the property to assign.
2802
+ * @param {*} value The value to assign.
2803
+ */
2804
+ function assignValue(object, key, value) {
2805
+ var objValue = object[key];
2806
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
2807
+ (value === undefined && !(key in object))) {
2808
+ object[key] = value;
2809
+ }
2810
+ }
2811
+
2812
+ /**
2813
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
2814
+ *
2815
+ * @private
2816
+ * @param {Array} array The array to inspect.
2817
+ * @param {*} key The key to search for.
2818
+ * @returns {number} Returns the index of the matched value, else `-1`.
2819
+ */
2820
+ function assocIndexOf(array, key) {
2821
+ var length = array.length;
2822
+ while (length--) {
2823
+ if (eq(array[length][0], key)) {
2824
+ return length;
2825
+ }
2826
+ }
2827
+ return -1;
2828
+ }
2829
+
2830
+ /**
2831
+ * The base implementation of `_.assign` without support for multiple sources
2832
+ * or `customizer` functions.
2833
+ *
2834
+ * @private
2835
+ * @param {Object} object The destination object.
2836
+ * @param {Object} source The source object.
2837
+ * @returns {Object} Returns `object`.
2838
+ */
2839
+ function baseAssign(object, source) {
2840
+ return object && copyObject(source, keys(source), object);
2841
+ }
2842
+
2843
+ /**
2844
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2845
+ * traversed objects.
2846
+ *
2847
+ * @private
2848
+ * @param {*} value The value to clone.
2849
+ * @param {boolean} [isDeep] Specify a deep clone.
2850
+ * @param {boolean} [isFull] Specify a clone including symbols.
2851
+ * @param {Function} [customizer] The function to customize cloning.
2852
+ * @param {string} [key] The key of `value`.
2853
+ * @param {Object} [object] The parent object of `value`.
2854
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2855
+ * @returns {*} Returns the cloned value.
2856
+ */
2857
+ function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
2858
+ var result;
2859
+ if (customizer) {
2860
+ result = object ? customizer(value, key, object, stack) : customizer(value);
2861
+ }
2862
+ if (result !== undefined) {
2863
+ return result;
2864
+ }
2865
+ if (!isObject(value)) {
2866
+ return value;
2867
+ }
2868
+ var isArr = isArray(value);
2869
+ if (isArr) {
2870
+ result = initCloneArray(value);
2871
+ if (!isDeep) {
2872
+ return copyArray(value, result);
2873
+ }
2874
+ } else {
2875
+ var tag = getTag(value),
2876
+ isFunc = tag == funcTag || tag == genTag;
2877
+
2878
+ if (isBuffer(value)) {
2879
+ return cloneBuffer(value, isDeep);
2880
+ }
2881
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2882
+ if (isHostObject(value)) {
2883
+ return object ? value : {};
2884
+ }
2885
+ result = initCloneObject(isFunc ? {} : value);
2886
+ if (!isDeep) {
2887
+ return copySymbols(value, baseAssign(result, value));
2888
+ }
2889
+ } else {
2890
+ if (!cloneableTags[tag]) {
2891
+ return object ? value : {};
2892
+ }
2893
+ result = initCloneByTag(value, tag, baseClone, isDeep);
2894
+ }
2895
+ }
2896
+ // Check for circular references and return its corresponding clone.
2897
+ stack || (stack = new Stack);
2898
+ var stacked = stack.get(value);
2899
+ if (stacked) {
2900
+ return stacked;
2901
+ }
2902
+ stack.set(value, result);
2903
+
2904
+ if (!isArr) {
2905
+ var props = isFull ? getAllKeys(value) : keys(value);
2906
+ }
2907
+ arrayEach(props || value, function(subValue, key) {
2908
+ if (props) {
2909
+ key = subValue;
2910
+ subValue = value[key];
2911
+ }
2912
+ // Recursively populate clone (susceptible to call stack limits).
2913
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
2914
+ });
2915
+ return result;
2916
+ }
2917
+
2918
+ /**
2919
+ * The base implementation of `_.create` without support for assigning
2920
+ * properties to the created object.
2921
+ *
2922
+ * @private
2923
+ * @param {Object} prototype The object to inherit from.
2924
+ * @returns {Object} Returns the new object.
2925
+ */
2926
+ function baseCreate(proto) {
2927
+ return isObject(proto) ? objectCreate(proto) : {};
2928
+ }
2929
+
2930
+ /**
2931
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2932
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2933
+ * symbols of `object`.
2934
+ *
2935
+ * @private
2936
+ * @param {Object} object The object to query.
2937
+ * @param {Function} keysFunc The function to get the keys of `object`.
2938
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
2939
+ * @returns {Array} Returns the array of property names and symbols.
2940
+ */
2941
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2942
+ var result = keysFunc(object);
2943
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
2944
+ }
2945
+
2946
+ /**
2947
+ * The base implementation of `getTag`.
2948
+ *
2949
+ * @private
2950
+ * @param {*} value The value to query.
2951
+ * @returns {string} Returns the `toStringTag`.
2952
+ */
2953
+ function baseGetTag(value) {
2954
+ return objectToString.call(value);
2955
+ }
2956
+
2957
+ /**
2958
+ * The base implementation of `_.isNative` without bad shim checks.
2959
+ *
2960
+ * @private
2961
+ * @param {*} value The value to check.
2962
+ * @returns {boolean} Returns `true` if `value` is a native function,
2963
+ * else `false`.
2964
+ */
2965
+ function baseIsNative(value) {
2966
+ if (!isObject(value) || isMasked(value)) {
2967
+ return false;
2968
+ }
2969
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
2970
+ return pattern.test(toSource(value));
2971
+ }
2972
+
2973
+ /**
2974
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
2975
+ *
2976
+ * @private
2977
+ * @param {Object} object The object to query.
2978
+ * @returns {Array} Returns the array of property names.
2979
+ */
2980
+ function baseKeys(object) {
2981
+ if (!isPrototype(object)) {
2982
+ return nativeKeys(object);
2983
+ }
2984
+ var result = [];
2985
+ for (var key in Object(object)) {
2986
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
2987
+ result.push(key);
2988
+ }
2989
+ }
2990
+ return result;
2991
+ }
2992
+
2993
+ /**
2994
+ * Creates a clone of `buffer`.
2995
+ *
2996
+ * @private
2997
+ * @param {Buffer} buffer The buffer to clone.
2998
+ * @param {boolean} [isDeep] Specify a deep clone.
2999
+ * @returns {Buffer} Returns the cloned buffer.
3000
+ */
3001
+ function cloneBuffer(buffer, isDeep) {
3002
+ if (isDeep) {
3003
+ return buffer.slice();
3004
+ }
3005
+ var result = new buffer.constructor(buffer.length);
3006
+ buffer.copy(result);
3007
+ return result;
3008
+ }
3009
+
3010
+ /**
3011
+ * Creates a clone of `arrayBuffer`.
3012
+ *
3013
+ * @private
3014
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
3015
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
3016
+ */
3017
+ function cloneArrayBuffer(arrayBuffer) {
3018
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3019
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
3020
+ return result;
3021
+ }
3022
+
3023
+ /**
3024
+ * Creates a clone of `dataView`.
3025
+ *
3026
+ * @private
3027
+ * @param {Object} dataView The data view to clone.
3028
+ * @param {boolean} [isDeep] Specify a deep clone.
3029
+ * @returns {Object} Returns the cloned data view.
3030
+ */
3031
+ function cloneDataView(dataView, isDeep) {
3032
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
3033
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
3034
+ }
3035
+
3036
+ /**
3037
+ * Creates a clone of `map`.
3038
+ *
3039
+ * @private
3040
+ * @param {Object} map The map to clone.
3041
+ * @param {Function} cloneFunc The function to clone values.
3042
+ * @param {boolean} [isDeep] Specify a deep clone.
3043
+ * @returns {Object} Returns the cloned map.
3044
+ */
3045
+ function cloneMap(map, isDeep, cloneFunc) {
3046
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
3047
+ return arrayReduce(array, addMapEntry, new map.constructor);
3048
+ }
3049
+
3050
+ /**
3051
+ * Creates a clone of `regexp`.
3052
+ *
3053
+ * @private
3054
+ * @param {Object} regexp The regexp to clone.
3055
+ * @returns {Object} Returns the cloned regexp.
3056
+ */
3057
+ function cloneRegExp(regexp) {
3058
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
3059
+ result.lastIndex = regexp.lastIndex;
3060
+ return result;
3061
+ }
3062
+
3063
+ /**
3064
+ * Creates a clone of `set`.
3065
+ *
3066
+ * @private
3067
+ * @param {Object} set The set to clone.
3068
+ * @param {Function} cloneFunc The function to clone values.
3069
+ * @param {boolean} [isDeep] Specify a deep clone.
3070
+ * @returns {Object} Returns the cloned set.
3071
+ */
3072
+ function cloneSet(set, isDeep, cloneFunc) {
3073
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
3074
+ return arrayReduce(array, addSetEntry, new set.constructor);
3075
+ }
3076
+
3077
+ /**
3078
+ * Creates a clone of the `symbol` object.
3079
+ *
3080
+ * @private
3081
+ * @param {Object} symbol The symbol object to clone.
3082
+ * @returns {Object} Returns the cloned symbol object.
3083
+ */
3084
+ function cloneSymbol(symbol) {
3085
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
3086
+ }
3087
+
3088
+ /**
3089
+ * Creates a clone of `typedArray`.
3090
+ *
3091
+ * @private
3092
+ * @param {Object} typedArray The typed array to clone.
3093
+ * @param {boolean} [isDeep] Specify a deep clone.
3094
+ * @returns {Object} Returns the cloned typed array.
3095
+ */
3096
+ function cloneTypedArray(typedArray, isDeep) {
3097
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
3098
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
3099
+ }
3100
+
3101
+ /**
3102
+ * Copies the values of `source` to `array`.
3103
+ *
3104
+ * @private
3105
+ * @param {Array} source The array to copy values from.
3106
+ * @param {Array} [array=[]] The array to copy values to.
3107
+ * @returns {Array} Returns `array`.
3108
+ */
3109
+ function copyArray(source, array) {
3110
+ var index = -1,
3111
+ length = source.length;
3112
+
3113
+ array || (array = Array(length));
3114
+ while (++index < length) {
3115
+ array[index] = source[index];
3116
+ }
3117
+ return array;
3118
+ }
3119
+
3120
+ /**
3121
+ * Copies properties of `source` to `object`.
3122
+ *
3123
+ * @private
3124
+ * @param {Object} source The object to copy properties from.
3125
+ * @param {Array} props The property identifiers to copy.
3126
+ * @param {Object} [object={}] The object to copy properties to.
3127
+ * @param {Function} [customizer] The function to customize copied values.
3128
+ * @returns {Object} Returns `object`.
3129
+ */
3130
+ function copyObject(source, props, object, customizer) {
3131
+ object || (object = {});
3132
+
3133
+ var index = -1,
3134
+ length = props.length;
3135
+
3136
+ while (++index < length) {
3137
+ var key = props[index];
3138
+
3139
+ var newValue = customizer
3140
+ ? customizer(object[key], source[key], key, object, source)
3141
+ : undefined;
3142
+
3143
+ assignValue(object, key, newValue === undefined ? source[key] : newValue);
3144
+ }
3145
+ return object;
3146
+ }
3147
+
3148
+ /**
3149
+ * Copies own symbol properties of `source` to `object`.
3150
+ *
3151
+ * @private
3152
+ * @param {Object} source The object to copy symbols from.
3153
+ * @param {Object} [object={}] The object to copy symbols to.
3154
+ * @returns {Object} Returns `object`.
3155
+ */
3156
+ function copySymbols(source, object) {
3157
+ return copyObject(source, getSymbols(source), object);
3158
+ }
3159
+
3160
+ /**
3161
+ * Creates an array of own enumerable property names and symbols of `object`.
3162
+ *
3163
+ * @private
3164
+ * @param {Object} object The object to query.
3165
+ * @returns {Array} Returns the array of property names and symbols.
3166
+ */
3167
+ function getAllKeys(object) {
3168
+ return baseGetAllKeys(object, keys, getSymbols);
3169
+ }
3170
+
3171
+ /**
3172
+ * Gets the data for `map`.
3173
+ *
3174
+ * @private
3175
+ * @param {Object} map The map to query.
3176
+ * @param {string} key The reference key.
3177
+ * @returns {*} Returns the map data.
3178
+ */
3179
+ function getMapData(map, key) {
3180
+ var data = map.__data__;
3181
+ return isKeyable(key)
3182
+ ? data[typeof key == 'string' ? 'string' : 'hash']
3183
+ : data.map;
3184
+ }
3185
+
3186
+ /**
3187
+ * Gets the native function at `key` of `object`.
3188
+ *
3189
+ * @private
3190
+ * @param {Object} object The object to query.
3191
+ * @param {string} key The key of the method to get.
3192
+ * @returns {*} Returns the function if it's native, else `undefined`.
3193
+ */
3194
+ function getNative(object, key) {
3195
+ var value = getValue(object, key);
3196
+ return baseIsNative(value) ? value : undefined;
3197
+ }
3198
+
3199
+ /**
3200
+ * Creates an array of the own enumerable symbol properties of `object`.
3201
+ *
3202
+ * @private
3203
+ * @param {Object} object The object to query.
3204
+ * @returns {Array} Returns the array of symbols.
3205
+ */
3206
+ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
3207
+
3208
+ /**
3209
+ * Gets the `toStringTag` of `value`.
3210
+ *
3211
+ * @private
3212
+ * @param {*} value The value to query.
3213
+ * @returns {string} Returns the `toStringTag`.
3214
+ */
3215
+ var getTag = baseGetTag;
3216
+
3217
+ // Fallback for data views, maps, sets, and weak maps in IE 11,
3218
+ // for data views in Edge < 14, and promises in Node.js.
3219
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
3220
+ (Map && getTag(new Map) != mapTag) ||
3221
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
3222
+ (Set && getTag(new Set) != setTag) ||
3223
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
3224
+ getTag = function(value) {
3225
+ var result = objectToString.call(value),
3226
+ Ctor = result == objectTag ? value.constructor : undefined,
3227
+ ctorString = Ctor ? toSource(Ctor) : undefined;
3228
+
3229
+ if (ctorString) {
3230
+ switch (ctorString) {
3231
+ case dataViewCtorString: return dataViewTag;
3232
+ case mapCtorString: return mapTag;
3233
+ case promiseCtorString: return promiseTag;
3234
+ case setCtorString: return setTag;
3235
+ case weakMapCtorString: return weakMapTag;
3236
+ }
3237
+ }
3238
+ return result;
3239
+ };
3240
+ }
3241
+
3242
+ /**
3243
+ * Initializes an array clone.
3244
+ *
3245
+ * @private
3246
+ * @param {Array} array The array to clone.
3247
+ * @returns {Array} Returns the initialized clone.
3248
+ */
3249
+ function initCloneArray(array) {
3250
+ var length = array.length,
3251
+ result = array.constructor(length);
3252
+
3253
+ // Add properties assigned by `RegExp#exec`.
3254
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
3255
+ result.index = array.index;
3256
+ result.input = array.input;
3257
+ }
3258
+ return result;
3259
+ }
3260
+
3261
+ /**
3262
+ * Initializes an object clone.
3263
+ *
3264
+ * @private
3265
+ * @param {Object} object The object to clone.
3266
+ * @returns {Object} Returns the initialized clone.
3267
+ */
3268
+ function initCloneObject(object) {
3269
+ return (typeof object.constructor == 'function' && !isPrototype(object))
3270
+ ? baseCreate(getPrototype(object))
3271
+ : {};
3272
+ }
3273
+
3274
+ /**
3275
+ * Initializes an object clone based on its `toStringTag`.
3276
+ *
3277
+ * **Note:** This function only supports cloning values with tags of
3278
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
3279
+ *
3280
+ * @private
3281
+ * @param {Object} object The object to clone.
3282
+ * @param {string} tag The `toStringTag` of the object to clone.
3283
+ * @param {Function} cloneFunc The function to clone values.
3284
+ * @param {boolean} [isDeep] Specify a deep clone.
3285
+ * @returns {Object} Returns the initialized clone.
3286
+ */
3287
+ function initCloneByTag(object, tag, cloneFunc, isDeep) {
3288
+ var Ctor = object.constructor;
3289
+ switch (tag) {
3290
+ case arrayBufferTag:
3291
+ return cloneArrayBuffer(object);
3292
+
3293
+ case boolTag:
3294
+ case dateTag:
3295
+ return new Ctor(+object);
3296
+
3297
+ case dataViewTag:
3298
+ return cloneDataView(object, isDeep);
3299
+
3300
+ case float32Tag: case float64Tag:
3301
+ case int8Tag: case int16Tag: case int32Tag:
3302
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
3303
+ return cloneTypedArray(object, isDeep);
3304
+
3305
+ case mapTag:
3306
+ return cloneMap(object, isDeep, cloneFunc);
3307
+
3308
+ case numberTag:
3309
+ case stringTag:
3310
+ return new Ctor(object);
3311
+
3312
+ case regexpTag:
3313
+ return cloneRegExp(object);
3314
+
3315
+ case setTag:
3316
+ return cloneSet(object, isDeep, cloneFunc);
3317
+
3318
+ case symbolTag:
3319
+ return cloneSymbol(object);
3320
+ }
3321
+ }
3322
+
3323
+ /**
3324
+ * Checks if `value` is a valid array-like index.
3325
+ *
3326
+ * @private
3327
+ * @param {*} value The value to check.
3328
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
3329
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
3330
+ */
3331
+ function isIndex(value, length) {
3332
+ length = length == null ? MAX_SAFE_INTEGER : length;
3333
+ return !!length &&
3334
+ (typeof value == 'number' || reIsUint.test(value)) &&
3335
+ (value > -1 && value % 1 == 0 && value < length);
3336
+ }
3337
+
3338
+ /**
3339
+ * Checks if `value` is suitable for use as unique object key.
3340
+ *
3341
+ * @private
3342
+ * @param {*} value The value to check.
3343
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
3344
+ */
3345
+ function isKeyable(value) {
3346
+ var type = typeof value;
3347
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
3348
+ ? (value !== '__proto__')
3349
+ : (value === null);
3350
+ }
3351
+
3352
+ /**
3353
+ * Checks if `func` has its source masked.
3354
+ *
3355
+ * @private
3356
+ * @param {Function} func The function to check.
3357
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
3358
+ */
3359
+ function isMasked(func) {
3360
+ return !!maskSrcKey && (maskSrcKey in func);
3361
+ }
3362
+
3363
+ /**
3364
+ * Checks if `value` is likely a prototype object.
3365
+ *
3366
+ * @private
3367
+ * @param {*} value The value to check.
3368
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
3369
+ */
3370
+ function isPrototype(value) {
3371
+ var Ctor = value && value.constructor,
3372
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
3373
+
3374
+ return value === proto;
3375
+ }
3376
+
3377
+ /**
3378
+ * Converts `func` to its source code.
3379
+ *
3380
+ * @private
3381
+ * @param {Function} func The function to process.
3382
+ * @returns {string} Returns the source code.
3383
+ */
3384
+ function toSource(func) {
3385
+ if (func != null) {
3386
+ try {
3387
+ return funcToString.call(func);
3388
+ } catch (e) {}
3389
+ try {
3390
+ return (func + '');
3391
+ } catch (e) {}
3392
+ }
3393
+ return '';
3394
+ }
3395
+
3396
+ /**
3397
+ * This method is like `_.clone` except that it recursively clones `value`.
3398
+ *
3399
+ * @static
3400
+ * @memberOf _
3401
+ * @since 1.0.0
3402
+ * @category Lang
3403
+ * @param {*} value The value to recursively clone.
3404
+ * @returns {*} Returns the deep cloned value.
3405
+ * @see _.clone
3406
+ * @example
3407
+ *
3408
+ * var objects = [{ 'a': 1 }, { 'b': 2 }];
3409
+ *
3410
+ * var deep = _.cloneDeep(objects);
3411
+ * console.log(deep[0] === objects[0]);
3412
+ * // => false
3413
+ */
3414
+ function cloneDeep(value) {
3415
+ return baseClone(value, true, true);
3416
+ }
3417
+
3418
+ /**
3419
+ * Performs a
3420
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
3421
+ * comparison between two values to determine if they are equivalent.
3422
+ *
3423
+ * @static
3424
+ * @memberOf _
3425
+ * @since 4.0.0
3426
+ * @category Lang
3427
+ * @param {*} value The value to compare.
3428
+ * @param {*} other The other value to compare.
3429
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
3430
+ * @example
3431
+ *
3432
+ * var object = { 'a': 1 };
3433
+ * var other = { 'a': 1 };
3434
+ *
3435
+ * _.eq(object, object);
3436
+ * // => true
3437
+ *
3438
+ * _.eq(object, other);
3439
+ * // => false
3440
+ *
3441
+ * _.eq('a', 'a');
3442
+ * // => true
3443
+ *
3444
+ * _.eq('a', Object('a'));
3445
+ * // => false
3446
+ *
3447
+ * _.eq(NaN, NaN);
3448
+ * // => true
3449
+ */
3450
+ function eq(value, other) {
3451
+ return value === other || (value !== value && other !== other);
3452
+ }
3453
+
3454
+ /**
3455
+ * Checks if `value` is likely an `arguments` object.
3456
+ *
3457
+ * @static
3458
+ * @memberOf _
3459
+ * @since 0.1.0
3460
+ * @category Lang
3461
+ * @param {*} value The value to check.
3462
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
3463
+ * else `false`.
3464
+ * @example
3465
+ *
3466
+ * _.isArguments(function() { return arguments; }());
3467
+ * // => true
3468
+ *
3469
+ * _.isArguments([1, 2, 3]);
3470
+ * // => false
3471
+ */
3472
+ function isArguments(value) {
3473
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
3474
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
3475
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
3476
+ }
3477
+
3478
+ /**
3479
+ * Checks if `value` is classified as an `Array` object.
3480
+ *
3481
+ * @static
3482
+ * @memberOf _
3483
+ * @since 0.1.0
3484
+ * @category Lang
3485
+ * @param {*} value The value to check.
3486
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
3487
+ * @example
3488
+ *
3489
+ * _.isArray([1, 2, 3]);
3490
+ * // => true
3491
+ *
3492
+ * _.isArray(document.body.children);
3493
+ * // => false
3494
+ *
3495
+ * _.isArray('abc');
3496
+ * // => false
3497
+ *
3498
+ * _.isArray(_.noop);
3499
+ * // => false
3500
+ */
3501
+ var isArray = Array.isArray;
3502
+
3503
+ /**
3504
+ * Checks if `value` is array-like. A value is considered array-like if it's
3505
+ * not a function and has a `value.length` that's an integer greater than or
3506
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
3507
+ *
3508
+ * @static
3509
+ * @memberOf _
3510
+ * @since 4.0.0
3511
+ * @category Lang
3512
+ * @param {*} value The value to check.
3513
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
3514
+ * @example
3515
+ *
3516
+ * _.isArrayLike([1, 2, 3]);
3517
+ * // => true
3518
+ *
3519
+ * _.isArrayLike(document.body.children);
3520
+ * // => true
3521
+ *
3522
+ * _.isArrayLike('abc');
3523
+ * // => true
3524
+ *
3525
+ * _.isArrayLike(_.noop);
3526
+ * // => false
3527
+ */
3528
+ function isArrayLike(value) {
3529
+ return value != null && isLength(value.length) && !isFunction(value);
3530
+ }
3531
+
3532
+ /**
3533
+ * This method is like `_.isArrayLike` except that it also checks if `value`
3534
+ * is an object.
3535
+ *
3536
+ * @static
3537
+ * @memberOf _
3538
+ * @since 4.0.0
3539
+ * @category Lang
3540
+ * @param {*} value The value to check.
3541
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
3542
+ * else `false`.
3543
+ * @example
3544
+ *
3545
+ * _.isArrayLikeObject([1, 2, 3]);
3546
+ * // => true
3547
+ *
3548
+ * _.isArrayLikeObject(document.body.children);
3549
+ * // => true
3550
+ *
3551
+ * _.isArrayLikeObject('abc');
3552
+ * // => false
3553
+ *
3554
+ * _.isArrayLikeObject(_.noop);
3555
+ * // => false
3556
+ */
3557
+ function isArrayLikeObject(value) {
3558
+ return isObjectLike(value) && isArrayLike(value);
3559
+ }
3560
+
3561
+ /**
3562
+ * Checks if `value` is a buffer.
3563
+ *
3564
+ * @static
3565
+ * @memberOf _
3566
+ * @since 4.3.0
3567
+ * @category Lang
3568
+ * @param {*} value The value to check.
3569
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
3570
+ * @example
3571
+ *
3572
+ * _.isBuffer(new Buffer(2));
3573
+ * // => true
3574
+ *
3575
+ * _.isBuffer(new Uint8Array(2));
3576
+ * // => false
3577
+ */
3578
+ var isBuffer = nativeIsBuffer || stubFalse;
3579
+
3580
+ /**
3581
+ * Checks if `value` is classified as a `Function` object.
3582
+ *
3583
+ * @static
3584
+ * @memberOf _
3585
+ * @since 0.1.0
3586
+ * @category Lang
3587
+ * @param {*} value The value to check.
3588
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
3589
+ * @example
3590
+ *
3591
+ * _.isFunction(_);
3592
+ * // => true
3593
+ *
3594
+ * _.isFunction(/abc/);
3595
+ * // => false
3596
+ */
3597
+ function isFunction(value) {
3598
+ // The use of `Object#toString` avoids issues with the `typeof` operator
3599
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
3600
+ var tag = isObject(value) ? objectToString.call(value) : '';
3601
+ return tag == funcTag || tag == genTag;
3602
+ }
3603
+
3604
+ /**
3605
+ * Checks if `value` is a valid array-like length.
3606
+ *
3607
+ * **Note:** This method is loosely based on
3608
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
3609
+ *
3610
+ * @static
3611
+ * @memberOf _
3612
+ * @since 4.0.0
3613
+ * @category Lang
3614
+ * @param {*} value The value to check.
3615
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
3616
+ * @example
3617
+ *
3618
+ * _.isLength(3);
3619
+ * // => true
3620
+ *
3621
+ * _.isLength(Number.MIN_VALUE);
3622
+ * // => false
3623
+ *
3624
+ * _.isLength(Infinity);
3625
+ * // => false
3626
+ *
3627
+ * _.isLength('3');
3628
+ * // => false
3629
+ */
3630
+ function isLength(value) {
3631
+ return typeof value == 'number' &&
3632
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
3633
+ }
3634
+
3635
+ /**
3636
+ * Checks if `value` is the
3637
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
3638
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
3639
+ *
3640
+ * @static
3641
+ * @memberOf _
3642
+ * @since 0.1.0
3643
+ * @category Lang
3644
+ * @param {*} value The value to check.
3645
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
3646
+ * @example
3647
+ *
3648
+ * _.isObject({});
3649
+ * // => true
3650
+ *
3651
+ * _.isObject([1, 2, 3]);
3652
+ * // => true
3653
+ *
3654
+ * _.isObject(_.noop);
3655
+ * // => true
3656
+ *
3657
+ * _.isObject(null);
3658
+ * // => false
3659
+ */
3660
+ function isObject(value) {
3661
+ var type = typeof value;
3662
+ return !!value && (type == 'object' || type == 'function');
3663
+ }
3664
+
3665
+ /**
3666
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
3667
+ * and has a `typeof` result of "object".
3668
+ *
3669
+ * @static
3670
+ * @memberOf _
3671
+ * @since 4.0.0
3672
+ * @category Lang
3673
+ * @param {*} value The value to check.
3674
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
3675
+ * @example
3676
+ *
3677
+ * _.isObjectLike({});
3678
+ * // => true
3679
+ *
3680
+ * _.isObjectLike([1, 2, 3]);
3681
+ * // => true
3682
+ *
3683
+ * _.isObjectLike(_.noop);
3684
+ * // => false
3685
+ *
3686
+ * _.isObjectLike(null);
3687
+ * // => false
3688
+ */
3689
+ function isObjectLike(value) {
3690
+ return !!value && typeof value == 'object';
3691
+ }
3692
+
3693
+ /**
3694
+ * Creates an array of the own enumerable property names of `object`.
3695
+ *
3696
+ * **Note:** Non-object values are coerced to objects. See the
3697
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3698
+ * for more details.
3699
+ *
3700
+ * @static
3701
+ * @since 0.1.0
3702
+ * @memberOf _
3703
+ * @category Object
3704
+ * @param {Object} object The object to query.
3705
+ * @returns {Array} Returns the array of property names.
3706
+ * @example
3707
+ *
3708
+ * function Foo() {
3709
+ * this.a = 1;
3710
+ * this.b = 2;
3711
+ * }
3712
+ *
3713
+ * Foo.prototype.c = 3;
3714
+ *
3715
+ * _.keys(new Foo);
3716
+ * // => ['a', 'b'] (iteration order is not guaranteed)
3717
+ *
3718
+ * _.keys('hi');
3719
+ * // => ['0', '1']
3720
+ */
3721
+ function keys(object) {
3722
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3723
+ }
3724
+
3725
+ /**
3726
+ * This method returns a new empty array.
3727
+ *
3728
+ * @static
3729
+ * @memberOf _
3730
+ * @since 4.13.0
3731
+ * @category Util
3732
+ * @returns {Array} Returns the new empty array.
3733
+ * @example
3734
+ *
3735
+ * var arrays = _.times(2, _.stubArray);
3736
+ *
3737
+ * console.log(arrays);
3738
+ * // => [[], []]
3739
+ *
3740
+ * console.log(arrays[0] === arrays[1]);
3741
+ * // => false
3742
+ */
3743
+ function stubArray() {
3744
+ return [];
3745
+ }
3746
+
3747
+ /**
3748
+ * This method returns `false`.
3749
+ *
3750
+ * @static
3751
+ * @memberOf _
3752
+ * @since 4.13.0
3753
+ * @category Util
3754
+ * @returns {boolean} Returns `false`.
3755
+ * @example
3756
+ *
3757
+ * _.times(2, _.stubFalse);
3758
+ * // => [false, false]
3759
+ */
3760
+ function stubFalse() {
3761
+ return false;
3762
+ }
3763
+
3764
+ module.exports = cloneDeep;
3765
+ } (lodash_clonedeep, lodash_clonedeep.exports));
3766
+
3767
+ var lodash_clonedeepExports = lodash_clonedeep.exports;
3768
+ var _clone = /*@__PURE__*/getDefaultExportFromCjs(lodash_clonedeepExports);
3769
+
2021
3770
  /**
2022
3771
  * Two dimensional array grid.
2023
3772
  * Useful to position elements with.
@@ -3319,8 +5068,8 @@ class FormPositioner {
3319
5068
  // Make sure the given grid is a valid grid:
3320
5069
  assertGridIsValid(Object.keys(this.fields), grid);
3321
5070
  // Update position attributes for the given fields:
3322
- const clonedFields = deepClone(this.fields);
3323
- Object.keys(this.fields).forEach((key) => {
5071
+ const clonedFields = _clone(this.fields);
5072
+ Object.keys(clonedFields).forEach((key) => {
3324
5073
  const fieldProps = clonedFields[key].props;
3325
5074
  const { topLeft, bottomRight } = grid.getCoordinatesForValue(key);
3326
5075
  if (fieldProps.position === undefined) {
@@ -3370,7 +5119,6 @@ class FormPositioner {
3370
5119
  };
3371
5120
  }
3372
5121
  }
3373
- const deepClone = (obj) => JSON.parse(JSON.stringify(obj));
3374
5122
 
3375
5123
  const ScaffoldFormContext = React.createContext({ factory: undefined });
3376
5124
  const ScaffoldFormProvider = ({ factory, children }) => (React.createElement(ScaffoldFormContext.Provider, { value: { factory: factory } }, children));
@@ -3394,17 +5142,19 @@ const getComponent = (field) => {
3394
5142
  return TextField;
3395
5143
  }
3396
5144
  };
5145
+ const isTextField = (field) => field.type === "TextField";
3397
5146
  const ScaffoldField = React.forwardRef((_a, ref) => {
3398
5147
  var { name, field } = _a, restProps = __rest(_a, ["name", "field"]);
3399
5148
  const { factory } = useScaffoldFormContext();
3400
- const formGridWrapperProps = getFormGridWrapperProps(field.props);
5149
+ const _b = field.props, { position, align, label, hint, error, isRequired } = _b, fieldProps = __rest(_b, ["position", "align", "label", "hint", "error", "isRequired"]);
3401
5150
  const Component = (factory === null || factory === void 0 ? void 0 : factory(field)) || getComponent(field);
3402
- // @ts-ignore
3403
- if (field.type === "TextField" && field.props.type === "hidden") {
5151
+ if (isTextField(field) &&
5152
+ !field.props.multiline &&
5153
+ field.props.type === "hidden") {
3404
5154
  return (React.createElement(Component, Object.assign({ ref: ref, name: name }, restProps, field.props)));
3405
5155
  }
3406
- return (React.createElement(FormGridWrapper, Object.assign({}, formGridWrapperProps),
3407
- React.createElement(Component, Object.assign({ ref: ref, name: name, placeholder: field.props.placeholder || formGridWrapperProps.label, className: clsx(!!formGridWrapperProps.error && "error", field.props.className) }, restProps, field.props))));
5156
+ return (React.createElement(FormGridWrapper, { position: position, align: align, label: label, hint: hint, error: error, isRequired: isRequired },
5157
+ React.createElement(Component, Object.assign({ ref: ref, name: name, placeholder: field.props.placeholder || label, className: clsx(!!error && "error", field.props.className) }, restProps, fieldProps))));
3408
5158
  });
3409
5159
 
3410
5160
  const ScaffoldForm = React.forwardRef((_a, ref) => {
@@ -3476,7 +5226,6 @@ exports.VerticalRhythmLaptop = VerticalRhythmLaptop;
3476
5226
  exports.VerticalRhythmMobile = VerticalRhythmMobile;
3477
5227
  exports.breakPoints = breakPoints;
3478
5228
  exports.calculatePasswordScore = calculatePasswordScore;
3479
- exports.getFormGridWrapperProps = getFormGridWrapperProps;
3480
5229
  exports.getResponsiveProps = getResponsiveProps;
3481
5230
  exports.isResponsiveObject = isResponsiveObject;
3482
5231
  exports.passwordHasLowerAndUppercase = passwordHasLowerAndUppercase;