@spscommerce/utils 5.0.0-rc1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/lib/array/flatten.d.ts +1 -1
  2. package/lib/array/flatten.spec.d.ts +1 -1
  3. package/lib/array/index.d.ts +3 -3
  4. package/lib/array/is-subset.d.ts +4 -4
  5. package/lib/array/is-subset.spec.d.ts +1 -1
  6. package/lib/array/range.d.ts +5 -5
  7. package/lib/array/range.spec.d.ts +1 -1
  8. package/lib/classes/custom-event.d.ts +4 -4
  9. package/lib/classes/index.d.ts +1 -1
  10. package/lib/data/doctypes.d.ts +4 -6
  11. package/lib/data/index.d.ts +1 -1
  12. package/lib/decorators/cast-to-number.d.ts +5 -4
  13. package/lib/decorators/debounced.broken_spec.d.ts +0 -0
  14. package/lib/decorators/debounced.d.ts +11 -11
  15. package/lib/decorators/index.d.ts +5 -5
  16. package/lib/decorators/locked-to-animation-frames.d.ts +4 -11
  17. package/lib/decorators/locked-to-animation-frames.spec.d.ts +0 -1
  18. package/lib/decorators/simple-metadata-decorator-applicator.d.ts +11 -12
  19. package/lib/decorators/tick-delay.d.ts +6 -6
  20. package/lib/function/debounce.d.ts +9 -9
  21. package/lib/function/debounce.spec.d.ts +1 -1
  22. package/lib/function/debounced-function.interface.d.ts +10 -10
  23. package/lib/function/delayed-function.interface.d.ts +10 -9
  24. package/lib/function/index.d.ts +6 -6
  25. package/lib/function/lock-to-animation-frames.d.ts +7 -7
  26. package/lib/function/lock-to-animation-frames.spec.d.ts +0 -1
  27. package/lib/function/on-next-tick.d.ts +8 -8
  28. package/lib/function/on-next-tick.spec.d.ts +1 -1
  29. package/lib/function/op.d.ts +32 -31
  30. package/lib/function/op.spec.d.ts +1 -1
  31. package/lib/index.cjs.js +1 -1400
  32. package/lib/index.d.ts +9 -9
  33. package/lib/index.es.js +1024 -0
  34. package/lib/number/constrain.d.ts +7 -6
  35. package/lib/number/decimal-round.d.ts +7 -7
  36. package/lib/number/decimal-round.spec.d.ts +1 -1
  37. package/lib/number/index.d.ts +3 -3
  38. package/lib/number/to-file-size-string.d.ts +5 -4
  39. package/lib/object/copy-property.d.ts +6 -6
  40. package/lib/object/copy-property.spec.d.ts +1 -1
  41. package/lib/object/crumble-path.d.ts +6 -5
  42. package/lib/object/crumble-path.spec.d.ts +1 -1
  43. package/lib/object/deep-freeze.d.ts +1 -1
  44. package/lib/object/deep-freeze.spec.d.ts +1 -1
  45. package/lib/object/diff.d.ts +12 -12
  46. package/lib/object/diff.spec.d.ts +1 -1
  47. package/lib/object/for-each-entry-deep.d.ts +4 -4
  48. package/lib/object/for-each-entry-deep.spec.d.ts +1 -1
  49. package/lib/object/for-each-nested-object.d.ts +4 -4
  50. package/lib/object/for-each-nested-object.spec.d.ts +1 -1
  51. package/lib/object/get-path.d.ts +5 -4
  52. package/lib/object/get-path.spec.d.ts +1 -1
  53. package/lib/object/index.d.ts +13 -13
  54. package/lib/object/merge-deep.d.ts +4 -4
  55. package/lib/object/merge-deep.spec.d.ts +1 -1
  56. package/lib/object/merge-properties-deep.d.ts +4 -4
  57. package/lib/object/merge-properties-deep.spec.d.ts +1 -1
  58. package/lib/object/omit.d.ts +1 -1
  59. package/lib/object/omit.spec.d.ts +1 -1
  60. package/lib/object/set-path.d.ts +2 -2
  61. package/lib/object/set-path.spec.d.ts +1 -1
  62. package/lib/object/traverse-path.d.ts +2 -2
  63. package/lib/object/values.d.ts +2 -2
  64. package/lib/object/values.spec.d.ts +1 -1
  65. package/lib/string/code.template-tag.d.ts +2 -2
  66. package/lib/string/index.d.ts +3 -3
  67. package/lib/string/parse-file-size.d.ts +5 -4
  68. package/lib/string/template.d.ts +15 -13
  69. package/lib/string/template.spec.d.ts +1 -1
  70. package/lib/typings.d.ts +1 -1
  71. package/package.json +15 -16
  72. package/tsconfig.json +1 -1
  73. package/vite.config.js +20 -0
  74. package/lib/decorators/debounced.spec.d.ts +0 -1
  75. package/lib/index.esm.js +0 -1336
  76. package/rollup.config.js +0 -24
package/lib/index.cjs.js CHANGED
@@ -1,1400 +1 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var isPlainObject = require('lodash.isplainobject');
6
- var isNilImport = require('lodash.isnil');
7
- var isEmptyImport = require('lodash.isempty');
8
-
9
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
-
11
- function _interopNamespace(e) {
12
- if (e && e.__esModule) return e;
13
- var n = Object.create(null);
14
- if (e) {
15
- Object.keys(e).forEach(function (k) {
16
- if (k !== 'default') {
17
- var d = Object.getOwnPropertyDescriptor(e, k);
18
- Object.defineProperty(n, k, d.get ? d : {
19
- enumerable: true,
20
- get: function () {
21
- return e[k];
22
- }
23
- });
24
- }
25
- });
26
- }
27
- n['default'] = e;
28
- return Object.freeze(n);
29
- }
30
-
31
- var isPlainObject__default = /*#__PURE__*/_interopDefaultLegacy(isPlainObject);
32
- var isNilImport__namespace = /*#__PURE__*/_interopNamespace(isNilImport);
33
- var isEmptyImport__namespace = /*#__PURE__*/_interopNamespace(isEmptyImport);
34
-
35
- function flatten(arg) {
36
- if (!Array.isArray(arg)) {
37
- return arg;
38
- }
39
- return arg.reduce(function (acc, x) { return acc.concat(flatten(x)); }, []);
40
- }
41
-
42
- /*! *****************************************************************************
43
- Copyright (c) Microsoft Corporation.
44
-
45
- Permission to use, copy, modify, and/or distribute this software for any
46
- purpose with or without fee is hereby granted.
47
-
48
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
49
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
50
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
51
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
52
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
53
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
54
- PERFORMANCE OF THIS SOFTWARE.
55
- ***************************************************************************** */
56
-
57
- var __assign = function() {
58
- __assign = Object.assign || function __assign(t) {
59
- for (var s, i = 1, n = arguments.length; i < n; i++) {
60
- s = arguments[i];
61
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
62
- }
63
- return t;
64
- };
65
- return __assign.apply(this, arguments);
66
- };
67
-
68
- function __awaiter(thisArg, _arguments, P, generator) {
69
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
70
- return new (P || (P = Promise))(function (resolve, reject) {
71
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
72
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
73
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
74
- step((generator = generator.apply(thisArg, _arguments || [])).next());
75
- });
76
- }
77
-
78
- function __generator(thisArg, body) {
79
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
80
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
81
- function verb(n) { return function (v) { return step([n, v]); }; }
82
- function step(op) {
83
- if (f) throw new TypeError("Generator is already executing.");
84
- while (_) try {
85
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
86
- if (y = 0, t) op = [op[0] & 2, t.value];
87
- switch (op[0]) {
88
- case 0: case 1: t = op; break;
89
- case 4: _.label++; return { value: op[1], done: false };
90
- case 5: _.label++; y = op[1]; op = [0]; continue;
91
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
92
- default:
93
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
94
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
95
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
96
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
97
- if (t[2]) _.ops.pop();
98
- _.trys.pop(); continue;
99
- }
100
- op = body.call(thisArg, _);
101
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
102
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
103
- }
104
- }
105
-
106
- function __values(o) {
107
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
108
- if (m) return m.call(o);
109
- if (o && typeof o.length === "number") return {
110
- next: function () {
111
- if (o && i >= o.length) o = void 0;
112
- return { value: o && o[i++], done: !o };
113
- }
114
- };
115
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
116
- }
117
-
118
- function __read(o, n) {
119
- var m = typeof Symbol === "function" && o[Symbol.iterator];
120
- if (!m) return o;
121
- var i = m.call(o), r, ar = [], e;
122
- try {
123
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
124
- }
125
- catch (error) { e = { error: error }; }
126
- finally {
127
- try {
128
- if (r && !r.done && (m = i["return"])) m.call(i);
129
- }
130
- finally { if (e) throw e.error; }
131
- }
132
- return ar;
133
- }
134
-
135
- function __spreadArray(to, from, pack) {
136
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
137
- if (ar || !(i in from)) {
138
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
139
- ar[i] = from[i];
140
- }
141
- }
142
- return to.concat(ar || Array.prototype.slice.call(from));
143
- }
144
-
145
- /**
146
- * Tests if candidate is a subset of array
147
- */
148
- function isSubset(candidate, array) {
149
- var e_1, _a;
150
- /* Set.prototype.has is required by the ECMAScript spec to be
151
- * implemented in sub-linear time, so by converting array to Set
152
- * we can avoid n^2 complexity. (In WebKit, Sets are HashMaps
153
- * internally, so has() is constant time) */
154
- var set = new Set(array);
155
- try {
156
- for (var candidate_1 = __values(candidate), candidate_1_1 = candidate_1.next(); !candidate_1_1.done; candidate_1_1 = candidate_1.next()) {
157
- var member = candidate_1_1.value;
158
- if (!set.has(member)) {
159
- return false;
160
- }
161
- }
162
- }
163
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
164
- finally {
165
- try {
166
- if (candidate_1_1 && !candidate_1_1.done && (_a = candidate_1.return)) _a.call(candidate_1);
167
- }
168
- finally { if (e_1) throw e_1.error; }
169
- }
170
- return true;
171
- }
172
-
173
- /**
174
- * If the function is set to be called, cancel the
175
- * timeout that would call it. Reset id & pending to defaults.
176
- *
177
- * @returns - Whether an invocation was actually canceled or not.
178
- */
179
- function resetDebouncedFn() {
180
- this.pending = false;
181
- if (typeof this.id === 'number') {
182
- clearTimeout(this.id);
183
- delete this.id;
184
- return true;
185
- }
186
- return false;
187
- }
188
- /**
189
- * Takes in a function and returns a new function that debounces it.
190
- * The returned function returns an observable that can be subscribed to
191
- * if you need to have something happen when the debounced function
192
- * finally gets called and returns a value.
193
- */
194
- function debounce(functionToDebounce, milliseconds, thisArg) {
195
- var debFn = function debouncedFn() {
196
- var _this = this;
197
- var args = [];
198
- for (var _i = 0; _i < arguments.length; _i++) {
199
- args[_i] = arguments[_i];
200
- }
201
- return new Promise(function (resolve, reject) {
202
- debFn.reset();
203
- debFn.pending = true;
204
- debFn.id = window.setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
205
- var output, err_1;
206
- return __generator(this, function (_a) {
207
- switch (_a.label) {
208
- case 0:
209
- _a.trys.push([0, 3, 4, 5]);
210
- output = functionToDebounce.apply(thisArg || this, args);
211
- if (!(output instanceof Promise)) return [3 /*break*/, 2];
212
- return [4 /*yield*/, output];
213
- case 1:
214
- output = _a.sent();
215
- _a.label = 2;
216
- case 2:
217
- resolve(output);
218
- return [3 /*break*/, 5];
219
- case 3:
220
- err_1 = _a.sent();
221
- reject(err_1);
222
- return [3 /*break*/, 5];
223
- case 4:
224
- debFn.reset();
225
- return [7 /*endfinally*/];
226
- case 5: return [2 /*return*/];
227
- }
228
- });
229
- }); }, milliseconds);
230
- });
231
- };
232
- debFn.reset = resetDebouncedFn.bind(debFn);
233
- return debFn;
234
- }
235
-
236
- /**
237
- * If the function is set to be called, cancel the
238
- * timeout that would call it. Reset id & pending to defaults.
239
- *
240
- * @returns - Whether an invocation was actually canceled or not.
241
- */
242
- function resetLockedFn() {
243
- this.pending = false;
244
- if (typeof this.id === 'number') {
245
- window.cancelAnimationFrame(this.id);
246
- delete this.id;
247
- return true;
248
- }
249
- return false;
250
- }
251
- /**
252
- * Return a new function to replace the passed in one which ensures that
253
- * the given function will run only in `requestAnimationFrame()` and at
254
- * most once per frame.
255
- */
256
- function lockToAnimationFrames(functionToLock, thisArg) {
257
- var lockFn = function lockedFn() {
258
- var _this = this;
259
- var args = [];
260
- for (var _i = 0; _i < arguments.length; _i++) {
261
- args[_i] = arguments[_i];
262
- }
263
- if (lockFn.pending) {
264
- lockFn.reset();
265
- }
266
- lockFn.id = window.requestAnimationFrame(function () {
267
- if (functionToLock) {
268
- functionToLock.apply(thisArg || _this, args);
269
- }
270
- lockFn.reset();
271
- });
272
- lockFn.pending = true;
273
- };
274
- lockFn.pending = false;
275
- lockFn.reset = resetLockedFn.bind(lockFn);
276
- return lockFn;
277
- }
278
-
279
- /**
280
- * Enqueues the given function to run on the next "tick" of the JS event
281
- * loop cycle. If you ever encounter the "value changed after it was
282
- * checked" error in Angular when trying to assign a value of a
283
- * component class, performing that assignment on the next tick, i.e. when
284
- * all of Angular's current cycle is finished, will resolve that error.
285
- */
286
- function onNextTick(fn, thisArg) {
287
- var boundFn = thisArg ? fn.bind(thisArg) : fn;
288
- setTimeout(boundFn, 0);
289
- }
290
-
291
- /* eslint-disable */
292
- // @dynamic
293
- /** Functions for various operators, most useful in combination
294
- * with functional programming tools like map, filter, and reduce.
295
- */
296
- var Op = /** @class */ (function () {
297
- function Op() {
298
- }
299
- Op.ADD = function (a, b) { return a + b; };
300
- Op.AND = function (a, b) { return a && b; };
301
- Op.BAND = function (a, b) { return a & b; };
302
- Op.BOR = function (a, b) { return a | b; };
303
- Op.BXOR = function (a, b) { return a ^ b; };
304
- Op.BNOT = function (a) { return ~a; };
305
- Op.DECR = function (a) { return --a; };
306
- Op.DIV = function (a, b) { return a / b; };
307
- Op.EQ = function (a, b) { return a === b; };
308
- Op.EXP = function (a, b) { return Math.pow(a, b); };
309
- Op.GT = function (a, b) { return a > b; };
310
- Op.GTE = function (a, b) { return a >= b; };
311
- Op.INCR = function (a) { return ++a; };
312
- Op.LSHIFT = function (a, b) { return a << b; };
313
- Op.LT = function (a, b) { return a < b; };
314
- Op.LTE = function (a, b) { return a <= b; };
315
- Op.MUL = function (a, b) { return a * b; };
316
- Op.NEG = function (a) { return -a; };
317
- Op.NEQ = function (a, b) { return a !== b; };
318
- Op.NOT = function (a) { return !a; };
319
- Op.OR = function (a, b) { return a || b; };
320
- Op.REM = function (a, b) { return a % b; };
321
- Op.RSHIFT = function (a, b) { return a >> b; };
322
- Op.RSHIFT_ZF = function (a, b) { return a >>> b; };
323
- Op.SUB = function (a, b) { return a - b; };
324
- Op.XOR = function (a, b) { return (a || b) && !(a && b); };
325
- return Op;
326
- }());
327
-
328
- /**
329
- * Unlike lodash range, includes the specified end number.
330
- * So range(1, 10) gives you 1-10 instead of 1-9.
331
- */
332
- function range(start, end) {
333
- if (!Number.isInteger(start)) {
334
- throw new Error('start must be an integer');
335
- }
336
- if (!Number.isInteger(end)) {
337
- throw new Error('end must be an integer');
338
- }
339
- return new Array(Math.abs(end - start) + 1).fill(start).map(start > end ? Op.SUB : Op.ADD);
340
- }
341
-
342
- /** docs:ignore */
343
- var CustomEvent = /** @class */ (function () {
344
- // This was intended to be a replacement for Event that allows subclassing
345
- // However it doesn't work in all browsers
346
- function CustomEvent(eventName, initDict) {
347
- var e_1, _a, e_2, _b, e_3, _c;
348
- if (initDict === void 0) { initDict = {}; }
349
- var event;
350
- if (typeof Event === 'function') {
351
- event = new Event(eventName, initDict);
352
- }
353
- else {
354
- // IE11
355
- event = document.createEvent('Event');
356
- event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
357
- try {
358
- for (var _d = __values(Object.keys(initDict)), _e = _d.next(); !_e.done; _e = _d.next()) {
359
- var key = _e.value;
360
- if (key !== 'bubbles' && key !== 'cancelable') {
361
- event[key] = initDict[key];
362
- }
363
- }
364
- }
365
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
366
- finally {
367
- try {
368
- if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
369
- }
370
- finally { if (e_1) throw e_1.error; }
371
- }
372
- }
373
- Object.setPrototypeOf(this, event);
374
- /* Native functions like the getters, setters, and methods on Event.prototype
375
- * cannot be called with "this" being a custom object. So what we're doing here
376
- * works around that. */
377
- var descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
378
- try {
379
- for (var _f = __values(Object.keys(descriptors)), _g = _f.next(); !_g.done; _g = _f.next()) {
380
- var propKey = _g.value;
381
- var descriptor = descriptors[propKey];
382
- try {
383
- for (var _h = (e_3 = void 0, __values(Object.keys(descriptor))), _j = _h.next(); !_j.done; _j = _h.next()) {
384
- var key = _j.value;
385
- if (typeof descriptor[key] === 'function') {
386
- descriptor[key] = descriptor[key].bind(event);
387
- }
388
- }
389
- }
390
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
391
- finally {
392
- try {
393
- if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
394
- }
395
- finally { if (e_3) throw e_3.error; }
396
- }
397
- }
398
- }
399
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
400
- finally {
401
- try {
402
- if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
403
- }
404
- finally { if (e_2) throw e_2.error; }
405
- }
406
- Object.defineProperties(this, descriptors);
407
- }
408
- return CustomEvent;
409
- }());
410
-
411
- var EDI_DOCUMENT_TYPE = Object.freeze({
412
- 100: { name: 'Insurance Plan Description' },
413
- 101: { name: 'Name and Address Lists' },
414
- 104: { name: 'Air Shipment Information' },
415
- 106: { name: 'Motor Carrier Rate Proposal' },
416
- 107: { name: 'Request for Motor Carrier Rate Proposal' },
417
- 108: { name: 'Response to a Motor Carrier Rate Proposal' },
418
- 109: { name: 'Vessel Content Details' },
419
- 110: { name: 'Air Freight Details and Invoice' },
420
- 112: { name: 'Property Damage Report' },
421
- 120: { name: 'Vehicle Shipping Order' },
422
- 121: { name: 'Vehicle Service' },
423
- 124: { name: 'Vehicle Damage' },
424
- 125: { name: 'Multilevel Railcar Load Details' },
425
- 126: { name: 'Vehicle Application Advice' },
426
- 127: { name: 'Vehicle Baying Order' },
427
- 128: { name: 'Dealer Information' },
428
- 129: { name: 'Vehicle Carrier Rate Update' },
429
- 130: { name: 'Student Educational Record (Transcript)' },
430
- 131: { name: 'Student Educational Record (Transcript) Acknowledgment' },
431
- 135: { name: 'Student Loan Application' },
432
- 138: { name: 'Testing Results Request and Report' },
433
- 139: { name: 'Student Loan Guarantee Result' },
434
- 140: { name: 'Product Registration' },
435
- 141: { name: 'Product Service Claim Response' },
436
- 142: { name: 'Product Service Claim' },
437
- 143: { name: 'Product Service Notification' },
438
- 144: { name: 'Student Loan Transfer and Status Verification' },
439
- 146: { name: 'Request for Student Educational Record (Transcript)' },
440
- 147: { name: 'Response to Request for Student Educational Record (Transcript)' },
441
- 148: { name: 'Report of Injury, Illness or Incident' },
442
- 149: { name: 'Notice of Tax Adjustment or Assessment' },
443
- 150: { name: 'Tax Rate Notification' },
444
- 151: { name: 'Electronic Filing of Tax Return Data Acknowledgment' },
445
- 152: { name: 'Statistical Government Information' },
446
- 153: { name: 'Unemployment Insurance Tax Claim or Charge Information' },
447
- 154: { name: 'Uniform Commercial Code Filing' },
448
- 155: { name: 'Business Credit Report' },
449
- 157: { name: 'Notice of Power of Attorney' },
450
- 159: { name: 'Motion Picture Booking Confirmation' },
451
- 160: { name: 'Transportation Automatic Equipment Identification' },
452
- 161: { name: 'Train Sheet' },
453
- 169: { name: 'Transportation Appointment Schedule Information' },
454
- 170: { name: 'Revenue Receipts Statement' },
455
- 175: { name: 'Court and Law Enforcement Notice' },
456
- 176: { name: 'Court Submission TYPE' },
457
- 180: { name: 'Return Merchandise Authorization and Notification' },
458
- 185: { name: 'Royalty Regulatory Report' },
459
- 186: { name: 'Insurance Underwriting Requirements Reporting' },
460
- 188: { name: 'Educational Course Inventory' },
461
- 189: { name: 'Application for Admission to Educational Institutions' },
462
- 190: { name: 'Student Enrollment Verification' },
463
- 191: { name: 'Student Loan Pre-Claims and Claims' },
464
- 194: { name: 'Grant or Assistance Application' },
465
- 195: { name: 'Federal Communications Commission (FCC) License Application' },
466
- 196: { name: 'Contractor Cost Data Reporting' },
467
- 197: { name: 'Real Estate Title Evidence' },
468
- 198: { name: 'Loan Verification Information' },
469
- 199: { name: 'Real Estate Settlement Information' },
470
- 200: { name: 'Mortgage Credit Report' },
471
- 201: { name: 'Residential Loan Application' },
472
- 202: { name: 'Secondary Mortgage Market Loan Delivery' },
473
- 203: { name: 'Secondary Mortgage Market Investor Report' },
474
- 204: { name: 'Motor Carrier Load Tender' },
475
- 205: { name: 'Mortgage Note' },
476
- 206: { name: 'Real Estate Inspection' },
477
- 210: { name: 'Motor Carrier Freight Details and Invoice' },
478
- 211: { name: 'Motor Carrier Bill of Lading', edifactId: 'IFTMCE' },
479
- 212: { name: 'Motor Carrier Delivery Trailer Manifest' },
480
- 213: { name: 'Motor Carrier Shipment Status Inquiry' },
481
- 214: { name: 'Transportation Carrier Shipment Status Message' },
482
- 215: { name: 'Motor Carrier Pick-up Manifest' },
483
- 216: { name: 'Motor Carrier Shipment Pick-up Notification' },
484
- 217: { name: 'Motor Carrier Loading and Route Guide' },
485
- 218: { name: 'Motor Carrier Tariff Information' },
486
- 219: { name: 'Logistics Service Request' },
487
- 220: { name: 'Logistics Service Response' },
488
- 222: { name: 'Cartage Work Assignment' },
489
- 223: { name: 'Consolidators Freight Bill and Invoice' },
490
- 224: { name: 'Motor Carrier Summary Freight Bill Manifest' },
491
- 225: { name: 'Response to a Cartage Work Assignment' },
492
- 240: { name: 'Motor Carrier Package Status' },
493
- 242: { name: 'Data Status Tracking' },
494
- 244: { name: 'Product Source Information' },
495
- 248: { name: 'Account Assignment/Inquiry and Service/Status' },
496
- 249: { name: 'Animal Toxicological Data' },
497
- 250: { name: 'Purchase Order Shipment Management Document' },
498
- 251: { name: 'Pricing Support' },
499
- 252: { name: 'Insurance Producer Administration' },
500
- 255: { name: 'Underwriting Information Services' },
501
- 256: { name: 'Periodic Compensation' },
502
- 260: { name: 'Application for Mortgage Insurance Benefits' },
503
- 261: { name: 'Real Estate Information Request' },
504
- 262: { name: 'Real Estate Information Report' },
505
- 263: { name: 'Residential Mortgage Insurance Application Response' },
506
- 264: { name: 'Mortgage Loan Default Status' },
507
- 265: { name: 'Real Estate Title Insurance Services Order' },
508
- 266: { name: 'Mortgage or Property Record Change Notification' },
509
- 267: { name: 'Individual Life, Annuity and Disability Application' },
510
- 268: { name: 'Annuity Activity' },
511
- 270: { name: 'Eligibility, Coverage or Benefit Inquiry' },
512
- 271: { name: 'Eligibility, Coverage or Benefit Information' },
513
- 272: { name: 'Property and Casualty Loss Notification' },
514
- 273: { name: 'Insurance/Annuity Application Status' },
515
- 274: { name: 'Health Care Provider Information' },
516
- 275: { name: 'Patient Information' },
517
- 276: { name: 'Health Care Claim Status Request' },
518
- 277: { name: 'Health Care Claim Status Notification' },
519
- 278: { name: 'Health Care Services Insurance/Benefit Review Information' },
520
- 280: { name: 'Voter Registration Information' },
521
- 285: { name: 'Commercial Vehicle Safety and Credentials Information Exchange' },
522
- 286: { name: 'Commercial Vehicle Credentials' },
523
- 288: { name: 'Wage Determination' },
524
- 290: { name: 'Cooperative Advertising Agreements' },
525
- 300: { name: 'Reservation (Booking Request) (Ocean)' },
526
- 301: { name: 'Confirmation (Ocean)', edifactId: 'IFTMBC' },
527
- 303: { name: 'Booking Cancellation (Ocean)' },
528
- 304: { name: 'Shipping Instructions' },
529
- 309: { name: 'U.S. Customs Manifest' },
530
- 310: { name: 'Freight Receipt and Invoice (Ocean)' },
531
- 311: { name: 'Canadian Customs Information' },
532
- 312: { name: 'Arrival Notice (Ocean)' },
533
- 313: { name: 'Shipment Status Inquiry (Ocean)' },
534
- 315: { name: 'Status Details (Ocean)' },
535
- 317: { name: 'Delivery/Pickup Order' },
536
- 319: { name: 'Terminal Information' },
537
- 322: { name: 'Terminal Operations and Intermodal Ramp Activity' },
538
- 323: { name: 'Vessel Schedule and Itinerary (Ocean)' },
539
- 324: { name: 'Vessel Stow Plan (Ocean)' },
540
- 325: { name: 'Consolidation of Goods In Container' },
541
- 326: { name: 'Consignment Summary List' },
542
- 350: { name: 'U.S. Customs Status Information' },
543
- 352: { name: 'U.S. Customs Carrier General Order Status' },
544
- 353: { name: 'U.S. Customs Events Advisory Details' },
545
- 354: { name: 'U.S. Customs Automated Manifest Archive Status' },
546
- 355: { name: 'U.S. Customs Acceptance/Rejection' },
547
- 356: { name: 'U.S. Customs Permit to Transfer Request' },
548
- 357: { name: 'U.S. Customs In-Bond Information' },
549
- 358: { name: 'U.S. Customs Consist Information' },
550
- 361: { name: 'Carrier Interchange Agreement (Ocean)' },
551
- 362: { name: 'Cargo Insurance Advice of Shipment' },
552
- 404: { name: 'Rail Carrier Shipment Information' },
553
- 410: { name: 'Rail Carrier Freight Details and Invoice' },
554
- 411: { name: 'Rail Carrier Freight Details and Invoice Summary' },
555
- 412: { name: 'Trailer or Container Repair Billing' },
556
- 414: { name: 'Rail Carhire Settlements' },
557
- 417: { name: 'Rail Carrier Waybill Interchange' },
558
- 418: { name: 'Rail Advance Interchange Consist' },
559
- 419: { name: 'Advance Car Disposition' },
560
- 420: { name: 'Car Handling Information' },
561
- 421: { name: 'Estimated Time of Arrival and Car Scheduling' },
562
- 422: { name: "Shipper's Car Order" },
563
- 423: { name: 'Rail Industrial Switch List' },
564
- 424: { name: 'Rail Carrier Services Settlement' },
565
- 425: { name: 'Rail Waybill Request' },
566
- 426: { name: 'Rail Revenue Waybill' },
567
- 427: { name: 'Rail Waybill Response' },
568
- 429: { name: 'Railroad Retirement Activity' },
569
- 431: { name: 'Railroad Station Master File' },
570
- 432: { name: 'Rail Deprescription' },
571
- 433: { name: 'Railroad Reciprocal Switch File' },
572
- 434: { name: 'Railroad Mark Register Update Activity' },
573
- 435: { name: 'Standard Transportation Commodity Code (STCC) Master' },
574
- 436: { name: 'Locomotive Information' },
575
- 437: { name: 'Railroad Junctions and Interchanges Activity' },
576
- 440: { name: 'Shipment Weights' },
577
- 451: { name: 'Railroad Event Report' },
578
- 452: { name: 'Railroad Problem Log Inquiry or Advice' },
579
- 453: { name: 'Railroad Service Commitment Advice' },
580
- 455: { name: 'Railroad Parameter Trace Registration' },
581
- 456: { name: 'Railroad Equipment Inquiry or Advice' },
582
- 460: { name: 'Railroad Price Distribution Request or Response' },
583
- 463: { name: 'Rail Rate Reply' },
584
- 466: { name: 'Rate Request' },
585
- 468: { name: 'Rate Docket Journal Log' },
586
- 470: { name: 'Railroad Clearance' },
587
- 475: { name: 'Rail Route File Maintenance' },
588
- 485: { name: 'Ratemaking Action' },
589
- 486: { name: 'Rate Docket Expiration' },
590
- 490: { name: 'Rate Group Definition' },
591
- 492: { name: 'Miscellaneous Rates' },
592
- 494: { name: 'Rail Scale Rates' },
593
- 500: { name: 'Medical Event Reporting' },
594
- 501: { name: 'Vendor Performance Review' },
595
- 503: { name: 'Pricing History' },
596
- 504: { name: 'Clauses and Provisions' },
597
- 511: { name: 'Requisition' },
598
- 517: { name: 'Material Obligation Validation' },
599
- 521: { name: 'Income or Asset Offset' },
600
- 527: { name: 'Material Due-In and Receipt' },
601
- 536: { name: 'Logistics Reassignment' },
602
- 540: { name: 'Notice of Employment Status' },
603
- 561: { name: 'Contract Abstract' },
604
- 567: { name: 'Contract Completion Status' },
605
- 568: { name: 'Contract Payment Management Report' },
606
- 601: { name: 'U.S. Customs Export Shipment Information' },
607
- 602: { name: 'Transportation Services Tender' },
608
- 620: { name: 'Excavation Communication' },
609
- 625: { name: 'Well Information' },
610
- 650: { name: 'Maintenance Service Order' },
611
- 715: { name: 'Intermodal Group Loading Plan' },
612
- 805: { name: 'Contract Pricing Proposal' },
613
- 806: { name: 'Project Schedule Reporting' },
614
- 810: { name: 'Invoice', edifactId: 'INVOIC' },
615
- 811: { name: 'Consolidated Service Invoice/Statement' },
616
- 812: { name: 'Credit/Debit Adjustment' },
617
- 813: { name: 'Electronic Filing of Tax Return Data' },
618
- 814: { name: 'General Request, Response or Confirmation' },
619
- 815: { name: 'Cryptographic Service Message' },
620
- 816: { name: 'Organizational Relationships' },
621
- 818: { name: 'Commission Sales Report' },
622
- 819: { name: 'Operating Expense Statement' },
623
- 820: { name: 'Payment Order/Remittance Advice', edifactId: 'REMADV' },
624
- 821: { name: 'Financial Information Reporting' },
625
- 822: { name: 'Account Analysis' },
626
- 823: { name: 'Lockbox' },
627
- 824: { name: 'Application Advice', edifactId: 'APERAK' },
628
- 826: { name: 'Tax Information Exchange' },
629
- 827: { name: 'Financial Return Notice' },
630
- 828: { name: 'Debit Authorization' },
631
- 829: { name: 'Payment Cancellation Request' },
632
- 830: { name: 'Planning Schedule with Release Capability', edifactId: 'DELFOR' },
633
- 831: { name: 'Application Control Totals' },
634
- 832: { name: 'Price/Sales Catalog', edifactId: 'PRICAT' },
635
- 833: { name: 'Mortgage Credit Report Order' },
636
- 834: { name: 'Benefit Enrollment and Maintenance' },
637
- 835: { name: 'Health Care Claim Payment/Advice' },
638
- 836: { name: 'Procurement Notices' },
639
- 837: { name: 'Health Care Claim' },
640
- 838: { name: 'Trading Partner Profile' },
641
- 839: { name: 'Project Cost Reporting' },
642
- 840: { name: 'Request for Quotation', edifactId: 'REQUOTE' },
643
- 841: { name: 'Specifications/Technical Information' },
644
- 842: { name: 'Nonconformance Report' },
645
- 843: { name: 'Response to Request for Quotation', edifactId: 'QUOTES' },
646
- 844: { name: 'Product Transfer Account Adjustment', edifactId: 'SSDCLM' },
647
- 845: { name: 'Price Authorization Acknowledgment/Status', edifactId: 'ATHSTS' },
648
- 846: { name: 'Inventory Inquiry/Advice', edifactId: 'INVRPT' },
649
- 847: { name: 'Material Claim' },
650
- 848: { name: 'Material Safety Data Sheet' },
651
- 849: { name: 'Response to Product Transfer Account Adjustment' },
652
- 850: { name: 'Purchase Order', edifactId: 'ORDERS' },
653
- 851: { name: 'Asset Schedule' },
654
- 852: { name: 'Product Activity Data', edifactId: 'SLSRPT' },
655
- 853: { name: 'Routing and Carrier Instruction' },
656
- 854: { name: 'Shipment Delivery Discrepancy Information' },
657
- 855: { name: 'Purchase Order Acknowledgment', edifactId: 'ORDRSP' },
658
- 856: { name: 'Advance Ship Notice/Manifest', edifactId: 'DESADV' },
659
- 857: { name: 'Shipment and Billing Notice' },
660
- 858: { name: 'Shipment Information' },
661
- 859: { name: 'Freight Invoice' },
662
- 860: { name: 'Purchase Order Change', edifactId: 'ORDCHG' },
663
- 861: { name: 'Receiving Advice/Acceptance Certificate', edifactId: 'RECADV' },
664
- 862: { name: 'Shipping Schedule', edifactId: 'DELJIT' },
665
- 863: { name: 'Report of Test Results' },
666
- 864: { name: 'Text Message' },
667
- 865: { name: 'Purchase Order Change', edifactId: 'ORDRSP' },
668
- 866: { name: 'Production Sequence' },
669
- 867: { name: 'Product Transfer and Resale Report', edifactId: 'SLSRPT' },
670
- 868: { name: 'Electronic Form Structure' },
671
- 869: { name: 'Order Status Inquiry', edifactId: 'ORSSTA' },
672
- 870: { name: 'Order Status Report', edifactId: 'ORDREP' },
673
- 871: { name: 'Component Parts Content' },
674
- 872: { name: 'Residential Mortgage Insurance Application' },
675
- 875: { name: 'Grocery Products Purchase Order' },
676
- 876: { name: 'Grocery Products Purchase Order Change' },
677
- 877: { name: 'Manufacturer Coupon Family Code Structure' },
678
- 878: { name: 'Product Authorization/De-authorization' },
679
- 879: { name: 'Price Information' },
680
- 880: { name: 'Grocery Products Invoice' },
681
- 881: { name: 'Manufacturer Coupon Redemption Detail' },
682
- 882: { name: 'Direct Store Delivery Summary Information' },
683
- 883: { name: 'Market Development Fund Allocation' },
684
- 884: { name: 'Market Development Fund Settlement' },
685
- 885: { name: 'Retail Account Characteristics' },
686
- 886: { name: 'Customer Call Reporting' },
687
- 887: { name: 'Coupon Notification' },
688
- 888: { name: 'Item Maintenance' },
689
- 889: { name: 'Promotion Announcement' },
690
- 891: { name: 'Deduction Research Report' },
691
- 893: { name: 'Item Information Request' },
692
- 894: { name: 'Delivery/Return Base Record' },
693
- 895: { name: 'Delivery/Return Acknowledgment or Adjustment' },
694
- 896: { name: 'Product Dimension Maintenance' },
695
- 920: { name: 'Loss or Damage Claim - General Commodities' },
696
- 924: { name: 'Loss or Damage Claim - Motor Vehicle' },
697
- 925: { name: 'Claim Tracer' },
698
- 926: { name: 'Claim Status Report and Tracer Reply' },
699
- 928: { name: 'Automotive Inspection Detail' },
700
- 940: { name: 'Warehouse Shipping Order' },
701
- 943: { name: 'Warehouse Stock Transfer Shipment Advice' },
702
- 944: { name: 'Warehouse Stock Transfer Receipt Advice' },
703
- 945: { name: 'Warehouse Shipping Advice' },
704
- 947: { name: 'Warehouse Inventory Adjustment Advice' },
705
- 980: { name: 'Functional Group Totals' },
706
- 990: { name: 'Response to a Load Tender' },
707
- 996: { name: 'File Transfer' },
708
- 997: { name: 'Functional Acknowledgment', edifactId: 'CONTROL' },
709
- 998: { name: 'Set Cancellation' },
710
- 999: { name: 'Implementation Acknowledgment' },
711
- });
712
-
713
- /** A property decorated with this will have any value assigned
714
- * to it cast to a number with the unary `+` operator.
715
- */
716
- function castToNumber() {
717
- return function (target, key) {
718
- var _a;
719
- var internalKey = "_" + key;
720
- Object.defineProperties(target, (_a = {},
721
- _a[internalKey] = {
722
- enumerable: false,
723
- configurable: true,
724
- writable: true,
725
- value: undefined,
726
- },
727
- _a[key] = {
728
- enumerable: true,
729
- configurable: true,
730
- get: function () {
731
- return this[internalKey];
732
- },
733
- set: function (newValue) {
734
- this[internalKey] = +newValue;
735
- },
736
- },
737
- _a));
738
- };
739
- }
740
-
741
- /**
742
- * Decorator that applies `debounce`
743
- */
744
- function debounced(ms) {
745
- return function (target, propertyKey, descriptor) {
746
- var originalDescriptorCopy = __assign({}, descriptor);
747
- originalDescriptorCopy.get = function get() {
748
- /* Make a new copy each time; if you don't then every instance after the first
749
- * one of the class containing the decorated method will break. */
750
- var newDescriptorWithDebounced = __assign({}, originalDescriptorCopy);
751
- newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
752
- Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
753
- return newDescriptorWithDebounced.value;
754
- };
755
- originalDescriptorCopy.configurable = true;
756
- delete originalDescriptorCopy.writable;
757
- delete originalDescriptorCopy.value;
758
- return originalDescriptorCopy;
759
- };
760
- }
761
-
762
- /**
763
- * Decorator that applies `lockToAnimationFrames`
764
- */
765
- function lockedToAnimationFrames(target, propertyKey, descriptor) {
766
- var originalDescriptorCopy = __assign({}, descriptor);
767
- originalDescriptorCopy.get = function get() {
768
- /* Make a new copy each time; if you don't then every instance after the first
769
- * one of the class containing the decorated method will break. */
770
- var newDescriptor = __assign({}, originalDescriptorCopy);
771
- newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
772
- Object.defineProperty(this, propertyKey, newDescriptor);
773
- return newDescriptor.value;
774
- };
775
- originalDescriptorCopy.configurable = true;
776
- delete originalDescriptorCopy.writable;
777
- delete originalDescriptorCopy.value;
778
- return originalDescriptorCopy;
779
- }
780
-
781
- /** This would be simpler to understand as a factory that returns a decorator function,
782
- * but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
783
- * that takes in a metadata object as an argument and assigns its values along with
784
- * default values to the decorated method. The decorator will look like a standard
785
- * decorator but calling this method and returning the result is the only thing it
786
- * needs to do.
787
- */
788
- function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
789
- var updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
790
- var getter = updatedDescriptor.get;
791
- var value = updatedDescriptor.value;
792
- updatedDescriptor.get = function get() {
793
- var e_1, _a;
794
- var self = this;
795
- var fn = value || getter.call(this);
796
- var boundFn = fn.bind(this);
797
- var updatedMetadata = __assign(__assign({}, defaults), metadata);
798
- var _loop_1 = function (prop) {
799
- if (typeof metadata[prop] === 'function') {
800
- Object.defineProperty(boundFn, prop, {
801
- get: function () {
802
- return updatedMetadata[prop](self);
803
- },
804
- });
805
- }
806
- else {
807
- boundFn[prop] = updatedMetadata[prop];
808
- }
809
- };
810
- try {
811
- for (var _b = __values(Object.keys(defaults)), _c = _b.next(); !_c.done; _c = _b.next()) {
812
- var prop = _c.value;
813
- _loop_1(prop);
814
- }
815
- }
816
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
817
- finally {
818
- try {
819
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
820
- }
821
- finally { if (e_1) throw e_1.error; }
822
- }
823
- Object.defineProperty(this, key, {
824
- writable: true,
825
- configurable: true,
826
- enumerable: updatedDescriptor.enumerable,
827
- value: boundFn,
828
- });
829
- return boundFn;
830
- };
831
- delete updatedDescriptor.value;
832
- delete updatedDescriptor.writable;
833
- return updatedDescriptor;
834
- }
835
-
836
- /** Method decorator that configures the method to always run the tick after it's invoked */
837
- function tickDelay(target, propertyKey, descriptor) {
838
- var originalDescriptorCopy = __assign({}, descriptor);
839
- originalDescriptorCopy.get = function get() {
840
- /* Make a new copy each time; if you don't then every instance after the first
841
- * one of the class containing the decorated method will break. */
842
- var newDescriptor = __assign({}, originalDescriptorCopy);
843
- var boundFn = originalDescriptorCopy.value.bind(this);
844
- newDescriptor.value = function () { return setTimeout(boundFn, 0); };
845
- Object.defineProperty(this, propertyKey, newDescriptor);
846
- return newDescriptor.value;
847
- };
848
- originalDescriptorCopy.configurable = true;
849
- delete originalDescriptorCopy.writable;
850
- delete originalDescriptorCopy.value;
851
- return originalDescriptorCopy;
852
- }
853
-
854
- /** Constrains a number to the given range. If the number is below the
855
- * low end of the range, the low end will be returned. If the number is
856
- * above the top end of the range, the top end will be returned. Otherwise
857
- * the number itself will be returned.
858
- */
859
- function constrain(n, range) {
860
- if (!n || n < range[0]) {
861
- return range[0];
862
- }
863
- if (n > range[1]) {
864
- return range[1];
865
- }
866
- return n;
867
- }
868
-
869
- /**
870
- * Progressively rounds `num` to `decimalPlaces` places. This differs from other
871
- * rounding methods out there such as lodash's, which are not progressive. For example,
872
- * `(0.149).toFixed(1)` and lodash `_.round(0.149, 1)` both return `0.1`, but this
873
- * function rounds `0.149` to `0.15` and then `0.15` to `0.2` and returns `0.2`.
874
- */
875
- function decimalRound(num, decimalPlaces) {
876
- if (decimalPlaces === void 0) { decimalPlaces = 0; }
877
- var integralAndFractionalSplit = String(num).split('.');
878
- var allDecimalPlaces = integralAndFractionalSplit.length > 1
879
- ? integralAndFractionalSplit[1].length
880
- : 0;
881
- var roundedNum = num;
882
- for (var i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
883
- roundedNum = Number(Math.round(Number(roundedNum + "e" + i)) + "e-" + i);
884
- }
885
- return roundedNum;
886
- }
887
-
888
- /** Converts a file size in bytes to a human-friendly string. For example,
889
- * `toFileSizeString(2048)` will return `"2.00KB"`.
890
- */
891
- function toFileSizeString(n, precision) {
892
- if (precision === void 0) { precision = 2; }
893
- if (n > Number.MAX_SAFE_INTEGER) {
894
- throw new Error('Number is greater than MAX_SAFE_INTEGER; '
895
- + 'toFileSizeString does not support orders of magnitude '
896
- + 'higher than petabytes for this reason until BigInt '
897
- + 'achieves broad browser support.');
898
- }
899
- var magnitude = Math.min(Math.floor(Math.log(n) / Math.log(1024)), 5);
900
- var unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'][magnitude];
901
- var decimalPlaces = magnitude ? precision : 0;
902
- return decimalRound(n / (Math.pow(1024, magnitude)), decimalPlaces).toFixed(decimalPlaces) + unit;
903
- }
904
-
905
- /** Converts a path to crumbs.
906
- * For example:
907
- * "a.b[0].c" -> ["a", "b", "0", "c"]
908
- */
909
- function crumblePath(path) {
910
- return typeof path === 'string' ? path.match(/[^.[\]]+/g) || [] : [].concat(path);
911
- }
912
-
913
- /**
914
- * Copy a property from one object to another using its property descriptor.
915
- * In other words, if it's a getter/setter on `sourceObject` it'll be the same
916
- * getter/setter on `destObject`. If it's just a value it'll be just a value.
917
- */
918
- function copyProperty(propName, sourceObject, destObject) {
919
- Object.defineProperty(destObject, propName, Object.getOwnPropertyDescriptor(sourceObject, propName));
920
- }
921
-
922
- /*
923
- * Recursive Object.freeze on plain objects and arrays
924
- */
925
- function deepFreeze(obj) {
926
- var e_1, _a;
927
- Object.freeze(obj);
928
- try {
929
- for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
930
- var key = _c.value;
931
- var val = obj[key];
932
- if (isPlainObject__default['default'](val) || Array.isArray(val)) {
933
- deepFreeze(val);
934
- }
935
- }
936
- }
937
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
938
- finally {
939
- try {
940
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
941
- }
942
- finally { if (e_1) throw e_1.error; }
943
- }
944
- }
945
-
946
- exports.DiffChange = void 0;
947
- (function (DiffChange) {
948
- DiffChange[DiffChange["ADDITION"] = 0] = "ADDITION";
949
- DiffChange[DiffChange["DELETION"] = 1] = "DELETION";
950
- DiffChange[DiffChange["ALTERATION"] = 2] = "ALTERATION";
951
- })(exports.DiffChange || (exports.DiffChange = {}));
952
- function diff(o1, o2, parentPath) {
953
- var e_1, _a;
954
- if (parentPath === void 0) { parentPath = []; }
955
- var d = [];
956
- try {
957
- for (var _b = __values(new Set(__spreadArray(__spreadArray([], __read(Object.keys(o1))), __read(Object.keys(o2))))), _c = _b.next(); !_c.done; _c = _b.next()) {
958
- var key = _c.value;
959
- var o1HasKey = Object.prototype.hasOwnProperty.call(o1, key);
960
- var o2HasKey = Object.prototype.hasOwnProperty.call(o2, key);
961
- if (o1HasKey && !o2HasKey) {
962
- d.push({
963
- type: exports.DiffChange.DELETION,
964
- key: key, parentPath: parentPath,
965
- objects: [o1, o2],
966
- });
967
- }
968
- else if (!o1HasKey && o2HasKey) {
969
- d.push({
970
- type: exports.DiffChange.ADDITION,
971
- key: key, parentPath: parentPath,
972
- objects: [o1, o2],
973
- });
974
- }
975
- else if ((isPlainObject__default['default'](o1[key]) && isPlainObject__default['default'](o2[key]))
976
- || (Array.isArray(o1[key]) && Array.isArray(o2[key]))) {
977
- d = d.concat(diff(o1[key], o2[key], __spreadArray(__spreadArray([], __read(parentPath)), [key])));
978
- }
979
- else if (o1[key] !== o2[key]) {
980
- d.push({
981
- type: exports.DiffChange.ALTERATION,
982
- key: key, parentPath: parentPath,
983
- objects: [o1, o2],
984
- });
985
- }
986
- }
987
- }
988
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
989
- finally {
990
- try {
991
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
992
- }
993
- finally { if (e_1) throw e_1.error; }
994
- }
995
- return d;
996
- }
997
-
998
- /**
999
- * Recursively navigate a nested object & call `fn` for each key/value pair
1000
- */
1001
- function forEachEntryDeep(object, fn) {
1002
- var e_1, _a;
1003
- try {
1004
- for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
1005
- var key = _c.value;
1006
- var value = object[key];
1007
- if (isPlainObject__default['default'](value) || Array.isArray(value)) {
1008
- forEachEntryDeep(value, fn);
1009
- }
1010
- else {
1011
- fn(key, value, object);
1012
- }
1013
- }
1014
- }
1015
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1016
- finally {
1017
- try {
1018
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1019
- }
1020
- finally { if (e_1) throw e_1.error; }
1021
- }
1022
- }
1023
-
1024
- /**
1025
- * Recursively navigate a nested object & call `fn` for each subobject
1026
- */
1027
- function forEachNestedObject(object, fn, path) {
1028
- var e_1, _a;
1029
- if (path === void 0) { path = []; }
1030
- fn(path, object);
1031
- try {
1032
- for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
1033
- var key = _c.value;
1034
- var value = object[key];
1035
- if (isPlainObject__default['default'](value) || Array.isArray(value)) {
1036
- var newPath = path.concat(key);
1037
- forEachNestedObject(value, fn, newPath);
1038
- }
1039
- }
1040
- }
1041
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1042
- finally {
1043
- try {
1044
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1045
- }
1046
- finally { if (e_1) throw e_1.error; }
1047
- }
1048
- }
1049
-
1050
- var isNil = isNilImport__namespace.default || isNilImport__namespace;
1051
- var isEmpty$1 = isEmptyImport__namespace.default || isEmptyImport__namespace;
1052
- /** Get the value at `path` starting from `object`.
1053
- * Allows optional chaining, e.g. `get(obj, 'a.b?.c')`
1054
- */
1055
- function getPath(object, path, defaultValue, allOptional) {
1056
- var e_1, _a, _b;
1057
- if (allOptional === void 0) { allOptional = false; }
1058
- if (isEmpty$1(path)) {
1059
- return object;
1060
- }
1061
- var value = object;
1062
- try {
1063
- for (var _c = __values(crumblePath(path)), _d = _c.next(); !_d.done; _d = _c.next()) {
1064
- var crumb = _d.value;
1065
- var key = crumb;
1066
- var optional = void 0;
1067
- if (typeof crumb === 'string') {
1068
- _b = __read(crumb.match(/^([^?]+)(\?)?$/), 3), key = _b[1], optional = _b[2];
1069
- }
1070
- value = value[key];
1071
- if (isNil(value) && (optional || allOptional)) {
1072
- return defaultValue;
1073
- }
1074
- }
1075
- }
1076
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1077
- finally {
1078
- try {
1079
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
1080
- }
1081
- finally { if (e_1) throw e_1.error; }
1082
- }
1083
- return isNil(value) ? defaultValue : value;
1084
- }
1085
-
1086
- /*
1087
- * Return a copy of `obj` without the key `key`
1088
- */
1089
- function omit(obj) {
1090
- var e_1, _a;
1091
- var keys = [];
1092
- for (var _i = 1; _i < arguments.length; _i++) {
1093
- keys[_i - 1] = arguments[_i];
1094
- }
1095
- var keySet = new Set(keys);
1096
- var result = {};
1097
- try {
1098
- for (var _b = __values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
1099
- var k = _c.value;
1100
- if (!keySet.has(k)) {
1101
- result[k] = obj[k];
1102
- }
1103
- }
1104
- }
1105
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1106
- finally {
1107
- try {
1108
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1109
- }
1110
- finally { if (e_1) throw e_1.error; }
1111
- }
1112
- return result;
1113
- }
1114
-
1115
- var isEmpty = isEmptyImport__namespace.default || isEmptyImport__namespace;
1116
- /** Set the value at `path` on `object`. */
1117
- function setPath(object, path, newValue) {
1118
- var e_1, _a;
1119
- if (typeof object !== 'object') {
1120
- throw new Error('object is required');
1121
- }
1122
- if (isEmpty(path)) {
1123
- throw new Error('path is required');
1124
- }
1125
- var crumbs = crumblePath(path);
1126
- var finalCrumb = crumbs.splice(crumbs.length - 1, 1)[0];
1127
- var current = object;
1128
- try {
1129
- for (var crumbs_1 = __values(crumbs), crumbs_1_1 = crumbs_1.next(); !crumbs_1_1.done; crumbs_1_1 = crumbs_1.next()) {
1130
- var crumb = crumbs_1_1.value;
1131
- current = current[crumb];
1132
- if (typeof current !== 'object') {
1133
- throw new Error("Cannot set value at given path: Path deadends at " + String(crumb));
1134
- }
1135
- }
1136
- }
1137
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1138
- finally {
1139
- try {
1140
- if (crumbs_1_1 && !crumbs_1_1.done && (_a = crumbs_1.return)) _a.call(crumbs_1);
1141
- }
1142
- finally { if (e_1) throw e_1.error; }
1143
- }
1144
- current[finalCrumb] = newValue;
1145
- }
1146
-
1147
- /** Generator for iterating down a path on an object. */
1148
- function traversePath(object, path) {
1149
- var obj, _a, _b, crumb, e_1_1;
1150
- var e_1, _c;
1151
- return __generator(this, function (_d) {
1152
- switch (_d.label) {
1153
- case 0: return [4 /*yield*/, object];
1154
- case 1:
1155
- _d.sent();
1156
- obj = object;
1157
- _d.label = 2;
1158
- case 2:
1159
- _d.trys.push([2, 7, 8, 9]);
1160
- _a = __values(crumblePath(path)), _b = _a.next();
1161
- _d.label = 3;
1162
- case 3:
1163
- if (!!_b.done) return [3 /*break*/, 6];
1164
- crumb = _b.value;
1165
- obj = obj[crumb];
1166
- return [4 /*yield*/, obj];
1167
- case 4:
1168
- _d.sent();
1169
- _d.label = 5;
1170
- case 5:
1171
- _b = _a.next();
1172
- return [3 /*break*/, 3];
1173
- case 6: return [3 /*break*/, 9];
1174
- case 7:
1175
- e_1_1 = _d.sent();
1176
- e_1 = { error: e_1_1 };
1177
- return [3 /*break*/, 9];
1178
- case 8:
1179
- try {
1180
- if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
1181
- }
1182
- finally { if (e_1) throw e_1.error; }
1183
- return [7 /*endfinally*/];
1184
- case 9: return [2 /*return*/];
1185
- }
1186
- });
1187
- }
1188
-
1189
- /**
1190
- * Recursive merge of any number of objects
1191
- */
1192
- function mergeDeep() {
1193
- var e_1, _a, e_2, _b;
1194
- var objectsToMerge = [];
1195
- for (var _i = 0; _i < arguments.length; _i++) {
1196
- objectsToMerge[_i] = arguments[_i];
1197
- }
1198
- var result = {};
1199
- try {
1200
- for (var objectsToMerge_1 = __values(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
1201
- var mergee = objectsToMerge_1_1.value;
1202
- try {
1203
- for (var _c = (e_2 = void 0, __values(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
1204
- var key = _d.value;
1205
- if (Object.prototype.hasOwnProperty.call(result, key)
1206
- && Object.getOwnPropertyDescriptor(result, key).writable
1207
- && isPlainObject__default['default'](result[key])) {
1208
- result[key] = mergeDeep(result[key], mergee[key]);
1209
- }
1210
- else if (isPlainObject__default['default'](mergee[key])) {
1211
- result[key] = mergeDeep({}, mergee[key]);
1212
- }
1213
- else {
1214
- result[key] = mergee[key];
1215
- }
1216
- }
1217
- }
1218
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1219
- finally {
1220
- try {
1221
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
1222
- }
1223
- finally { if (e_2) throw e_2.error; }
1224
- }
1225
- }
1226
- }
1227
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1228
- finally {
1229
- try {
1230
- if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
1231
- }
1232
- finally { if (e_1) throw e_1.error; }
1233
- }
1234
- return result;
1235
- }
1236
-
1237
- /**
1238
- * Recursive merge of any number of objects using `copyProperty()` rather than assignment
1239
- */
1240
- function mergePropertiesDeep() {
1241
- var e_1, _a, e_2, _b;
1242
- var objectsToMerge = [];
1243
- for (var _i = 0; _i < arguments.length; _i++) {
1244
- objectsToMerge[_i] = arguments[_i];
1245
- }
1246
- var result = {};
1247
- try {
1248
- for (var objectsToMerge_1 = __values(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
1249
- var mergee = objectsToMerge_1_1.value;
1250
- try {
1251
- for (var _c = (e_2 = void 0, __values(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
1252
- var key = _d.value;
1253
- if (Object.prototype.hasOwnProperty.call(result, key)
1254
- && Object.getOwnPropertyDescriptor(result, key).writable
1255
- && isPlainObject__default['default'](result[key])) {
1256
- result[key] = mergePropertiesDeep(result[key], mergee[key]);
1257
- }
1258
- else if (isPlainObject__default['default'](mergee[key])) {
1259
- result[key] = mergePropertiesDeep({}, mergee[key]);
1260
- }
1261
- else {
1262
- copyProperty(key, mergee, result);
1263
- }
1264
- }
1265
- }
1266
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1267
- finally {
1268
- try {
1269
- if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
1270
- }
1271
- finally { if (e_2) throw e_2.error; }
1272
- }
1273
- }
1274
- }
1275
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1276
- finally {
1277
- try {
1278
- if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
1279
- }
1280
- finally { if (e_1) throw e_1.error; }
1281
- }
1282
- return result;
1283
- }
1284
-
1285
- /** Returns the values of an object. */
1286
- function values(object) {
1287
- var e_1, _a;
1288
- var vals = [];
1289
- try {
1290
- for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
1291
- var key = _c.value;
1292
- vals.push(object[key]);
1293
- }
1294
- }
1295
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1296
- finally {
1297
- try {
1298
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1299
- }
1300
- finally { if (e_1) throw e_1.error; }
1301
- }
1302
- return vals;
1303
- }
1304
-
1305
- /** Template tag function for making strings containing code blocks easier to deal with. */
1306
- function code(strings) {
1307
- var interpolations = [];
1308
- for (var _i = 1; _i < arguments.length; _i++) {
1309
- interpolations[_i - 1] = arguments[_i];
1310
- }
1311
- var s = strings.reduce(function (a, b, i) { return a + (i <= interpolations.length ? interpolations[i - 1] : '') + b; });
1312
- var leadingWhitespace = Math.min.apply(Math, __spreadArray([], __read(s.split(/[\r\n]/)
1313
- .filter(function (l) { return l.trim(); })
1314
- .map(function (l) { return l.match(/^ */)[0].length; }))));
1315
- return s.replace(new RegExp("^ {" + leadingWhitespace + "}", 'gm'), '').trim();
1316
- }
1317
-
1318
- /** Parses a string as a file size and returns the size in bytes. For example,
1319
- * `parseFileSize("2KB")` will return `2048`.
1320
- */
1321
- function parseFileSize(fileSize) {
1322
- var unitMatch = fileSize.match(/[A-Z]?B$/);
1323
- if (!unitMatch) {
1324
- throw new Error("Input to parseFileSize (\"" + fileSize + "\") doesn't seem like a file size; "
1325
- + 'cannot identify a unit (e.g. KB, GB)');
1326
- }
1327
- var _a = __read(unitMatch, 1), unit = _a[0];
1328
- var num = +fileSize.replace(unit, '');
1329
- if (Number.isNaN(num)) {
1330
- throw new Error("Could not parse a number out of input to parseFileSize (\"" + fileSize + "\")");
1331
- }
1332
- var magnitude = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'].indexOf(unit);
1333
- if (magnitude === -1) {
1334
- throw new Error('parseFileSize does not support units above PB');
1335
- }
1336
- return Math.ceil(num * (Math.pow(1024, magnitude)));
1337
- }
1338
-
1339
- var REGEX_REPLACEMENT = /(<%=|{{)(.+?)(%>|}})/g;
1340
- var REGEX_IF = /<%\?(.+?)%>(.+?)<\/%>/g;
1341
- var SYMBOL_TEMPLATE_SOURCE = Symbol('sps.utils.templateSrc');
1342
- /**
1343
- * Every string templating thing out there whether lodash, doT, handlebars, etc
1344
- * is extremely complicated to cover a variety of use cases. This just has two
1345
- * very simple features and great caution should be exercised in making it any more
1346
- * complex than that. A value can be interpolated like so:
1347
- * `<%= foo.bar %>`
1348
- * And a basic "if" conditional can be used like so:
1349
- * `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
1350
- * You can put interpolations inside a conditional, as you'd expect. That's it.
1351
- */
1352
- function template(string) {
1353
- var fn = function (data) { return string
1354
- .replace(REGEX_IF, function (match, pathToCheck, content) { return (getPath(data, pathToCheck.trim()) ? content : ''); })
1355
- .replace(REGEX_REPLACEMENT, function (match, _, pathToInterpolate) { return getPath(data, pathToInterpolate.trim(), ''); }); };
1356
- fn[SYMBOL_TEMPLATE_SOURCE] = string;
1357
- return fn;
1358
- }
1359
- function isTemplate(x) {
1360
- return typeof x === 'string' && (REGEX_REPLACEMENT.test(x) || REGEX_IF.test(x));
1361
- }
1362
- function isTemplateFn(x) {
1363
- return typeof x === 'function' && Object.prototype.hasOwnProperty.call(x, SYMBOL_TEMPLATE_SOURCE);
1364
- }
1365
-
1366
- exports.CustomEvent = CustomEvent;
1367
- exports.EDI_DOCUMENT_TYPE = EDI_DOCUMENT_TYPE;
1368
- exports.Op = Op;
1369
- exports.castToNumber = castToNumber;
1370
- exports.code = code;
1371
- exports.constrain = constrain;
1372
- exports.copyProperty = copyProperty;
1373
- exports.crumblePath = crumblePath;
1374
- exports.debounce = debounce;
1375
- exports.debounced = debounced;
1376
- exports.decimalRound = decimalRound;
1377
- exports.deepFreeze = deepFreeze;
1378
- exports.diff = diff;
1379
- exports.flatten = flatten;
1380
- exports.forEachEntryDeep = forEachEntryDeep;
1381
- exports.forEachNestedObject = forEachNestedObject;
1382
- exports.getPath = getPath;
1383
- exports.isSubset = isSubset;
1384
- exports.isTemplate = isTemplate;
1385
- exports.isTemplateFn = isTemplateFn;
1386
- exports.lockToAnimationFrames = lockToAnimationFrames;
1387
- exports.lockedToAnimationFrames = lockedToAnimationFrames;
1388
- exports.mergeDeep = mergeDeep;
1389
- exports.mergePropertiesDeep = mergePropertiesDeep;
1390
- exports.omit = omit;
1391
- exports.onNextTick = onNextTick;
1392
- exports.parseFileSize = parseFileSize;
1393
- exports.range = range;
1394
- exports.setPath = setPath;
1395
- exports.simpleMetadataDecoratorApplicator = simpleMetadataDecoratorApplicator;
1396
- exports.template = template;
1397
- exports.tickDelay = tickDelay;
1398
- exports.toFileSizeString = toFileSizeString;
1399
- exports.traversePath = traversePath;
1400
- exports.values = values;
1
+ "use strict";var ze=Object.defineProperty;var Q=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var Y=(e,t,n)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))Ue.call(t,n)&&Y(e,n,t[n]);if(Q)for(var n of Q(t))We.call(t,n)&&Y(e,n,t[n]);return e};Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";function Z(e,t){return t.forEach(function(n){Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function ee(e){return Array.isArray(e)?e.reduce((t,n)=>t.concat(ee(n)),[]):e}function He(e,t){const n=new Set(t);for(const r of e)if(!n.has(r))return!1;return!0}function Ke(){return this.pending=!1,typeof this.id=="number"?(clearTimeout(this.id),delete this.id,!0):!1}function te(e,t,n){const r=function(...i){return new Promise((c,m)=>{r.reset(),r.pending=!0;function S(){(async()=>{try{let u=e.apply(n||this,i);u instanceof Promise&&(u=await u),c(u)}catch(u){m(u)}finally{r.reset()}})()}r.id=window.setTimeout(S,t)})};return r.reset=Ke.bind(r),r}function Xe(){return this.pending=!1,typeof this.id=="number"?(window.cancelAnimationFrame(this.id),delete this.id,!0):!1}function ne(e,t){const n=function(...o){n.pending&&n.reset(),n.id=window.requestAnimationFrame(()=>{e&&e.apply(t||this,o),n.reset()}),n.pending=!0};return n.pending=!1,n.reset=Xe.bind(n),n}function Je(e,t){const n=t?e.bind(t):e;setTimeout(n,0)}const N={add:(e,t)=>e+t,and:(e,t)=>e&&t,band:(e,t)=>e&t,bor:(e,t)=>e|t,bxor:(e,t)=>e^t,bnot:e=>~e,decr:e=>e-1,div:(e,t)=>e/t,eq:(e,t)=>e===t,exp:(e,t)=>e**t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t,incr:e=>e+1,lshift:(e,t)=>e<<t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,mul:(e,t)=>e*t,neg:e=>-e,neq:(e,t)=>e!==t,not:e=>!e,or:(e,t)=>e||t,rem:(e,t)=>e%t,rshift:(e,t)=>e>>t,rshift_zf:(e,t)=>e>>>t,sub:(e,t)=>e-t,xor:(e,t)=>(e||t)&&!(e&&t)};function Qe(e,t){if(!Number.isInteger(e))throw new Error("start must be an integer");if(!Number.isInteger(t))throw new Error("end must be an integer");return new Array(Math.abs(t-e)+1).fill(e).map(e>t?N.sub:N.add)}class Ye{constructor(t,n={}){let r;if(typeof Event=="function")r=new Event(t,n);else{r=document.createEvent("Event"),r.initEvent(t,n.bubbles,n.cancelable);for(const i of Object.keys(n))i!=="bubbles"&&i!=="cancelable"&&(r[i]=n[i])}Object.setPrototypeOf(this,r);const o=Object.getOwnPropertyDescriptors(Event.prototype);for(const i of Object.keys(o)){const c=o[i];for(const m of Object.keys(c))typeof c[m]=="function"&&(c[m]=c[m].bind(r))}Object.defineProperties(this,o)}}const Ze=Object.freeze({100:{name:"Insurance Plan Description"},101:{name:"Name and Address Lists"},104:{name:"Air Shipment Information"},106:{name:"Motor Carrier Rate Proposal"},107:{name:"Request for Motor Carrier Rate Proposal"},108:{name:"Response to a Motor Carrier Rate Proposal"},109:{name:"Vessel Content Details"},110:{name:"Air Freight Details and Invoice"},112:{name:"Property Damage Report"},120:{name:"Vehicle Shipping Order"},121:{name:"Vehicle Service"},124:{name:"Vehicle Damage"},125:{name:"Multilevel Railcar Load Details"},126:{name:"Vehicle Application Advice"},127:{name:"Vehicle Baying Order"},128:{name:"Dealer Information"},129:{name:"Vehicle Carrier Rate Update"},130:{name:"Student Educational Record (Transcript)"},131:{name:"Student Educational Record (Transcript) Acknowledgment"},135:{name:"Student Loan Application"},138:{name:"Testing Results Request and Report"},139:{name:"Student Loan Guarantee Result"},140:{name:"Product Registration"},141:{name:"Product Service Claim Response"},142:{name:"Product Service Claim"},143:{name:"Product Service Notification"},144:{name:"Student Loan Transfer and Status Verification"},146:{name:"Request for Student Educational Record (Transcript)"},147:{name:"Response to Request for Student Educational Record (Transcript)"},148:{name:"Report of Injury, Illness or Incident"},149:{name:"Notice of Tax Adjustment or Assessment"},150:{name:"Tax Rate Notification"},151:{name:"Electronic Filing of Tax Return Data Acknowledgment"},152:{name:"Statistical Government Information"},153:{name:"Unemployment Insurance Tax Claim or Charge Information"},154:{name:"Uniform Commercial Code Filing"},155:{name:"Business Credit Report"},157:{name:"Notice of Power of Attorney"},159:{name:"Motion Picture Booking Confirmation"},160:{name:"Transportation Automatic Equipment Identification"},161:{name:"Train Sheet"},169:{name:"Transportation Appointment Schedule Information"},170:{name:"Revenue Receipts Statement"},175:{name:"Court and Law Enforcement Notice"},176:{name:"Court Submission TYPE"},180:{name:"Return Merchandise Authorization and Notification"},185:{name:"Royalty Regulatory Report"},186:{name:"Insurance Underwriting Requirements Reporting"},188:{name:"Educational Course Inventory"},189:{name:"Application for Admission to Educational Institutions"},190:{name:"Student Enrollment Verification"},191:{name:"Student Loan Pre-Claims and Claims"},194:{name:"Grant or Assistance Application"},195:{name:"Federal Communications Commission (FCC) License Application"},196:{name:"Contractor Cost Data Reporting"},197:{name:"Real Estate Title Evidence"},198:{name:"Loan Verification Information"},199:{name:"Real Estate Settlement Information"},200:{name:"Mortgage Credit Report"},201:{name:"Residential Loan Application"},202:{name:"Secondary Mortgage Market Loan Delivery"},203:{name:"Secondary Mortgage Market Investor Report"},204:{name:"Motor Carrier Load Tender"},205:{name:"Mortgage Note"},206:{name:"Real Estate Inspection"},210:{name:"Motor Carrier Freight Details and Invoice"},211:{name:"Motor Carrier Bill of Lading",edifactId:"IFTMCE"},212:{name:"Motor Carrier Delivery Trailer Manifest"},213:{name:"Motor Carrier Shipment Status Inquiry"},214:{name:"Transportation Carrier Shipment Status Message"},215:{name:"Motor Carrier Pick-up Manifest"},216:{name:"Motor Carrier Shipment Pick-up Notification"},217:{name:"Motor Carrier Loading and Route Guide"},218:{name:"Motor Carrier Tariff Information"},219:{name:"Logistics Service Request"},220:{name:"Logistics Service Response"},222:{name:"Cartage Work Assignment"},223:{name:"Consolidators Freight Bill and Invoice"},224:{name:"Motor Carrier Summary Freight Bill Manifest"},225:{name:"Response to a Cartage Work Assignment"},240:{name:"Motor Carrier Package Status"},242:{name:"Data Status Tracking"},244:{name:"Product Source Information"},248:{name:"Account Assignment/Inquiry and Service/Status"},249:{name:"Animal Toxicological Data"},250:{name:"Purchase Order Shipment Management Document"},251:{name:"Pricing Support"},252:{name:"Insurance Producer Administration"},255:{name:"Underwriting Information Services"},256:{name:"Periodic Compensation"},260:{name:"Application for Mortgage Insurance Benefits"},261:{name:"Real Estate Information Request"},262:{name:"Real Estate Information Report"},263:{name:"Residential Mortgage Insurance Application Response"},264:{name:"Mortgage Loan Default Status"},265:{name:"Real Estate Title Insurance Services Order"},266:{name:"Mortgage or Property Record Change Notification"},267:{name:"Individual Life, Annuity and Disability Application"},268:{name:"Annuity Activity"},270:{name:"Eligibility, Coverage or Benefit Inquiry"},271:{name:"Eligibility, Coverage or Benefit Information"},272:{name:"Property and Casualty Loss Notification"},273:{name:"Insurance/Annuity Application Status"},274:{name:"Health Care Provider Information"},275:{name:"Patient Information"},276:{name:"Health Care Claim Status Request"},277:{name:"Health Care Claim Status Notification"},278:{name:"Health Care Services Insurance/Benefit Review Information"},280:{name:"Voter Registration Information"},285:{name:"Commercial Vehicle Safety and Credentials Information Exchange"},286:{name:"Commercial Vehicle Credentials"},288:{name:"Wage Determination"},290:{name:"Cooperative Advertising Agreements"},300:{name:"Reservation (Booking Request) (Ocean)"},301:{name:"Confirmation (Ocean)",edifactId:"IFTMBC"},303:{name:"Booking Cancellation (Ocean)"},304:{name:"Shipping Instructions"},309:{name:"U.S. Customs Manifest"},310:{name:"Freight Receipt and Invoice (Ocean)"},311:{name:"Canadian Customs Information"},312:{name:"Arrival Notice (Ocean)"},313:{name:"Shipment Status Inquiry (Ocean)"},315:{name:"Status Details (Ocean)"},317:{name:"Delivery/Pickup Order"},319:{name:"Terminal Information"},322:{name:"Terminal Operations and Intermodal Ramp Activity"},323:{name:"Vessel Schedule and Itinerary (Ocean)"},324:{name:"Vessel Stow Plan (Ocean)"},325:{name:"Consolidation of Goods In Container"},326:{name:"Consignment Summary List"},350:{name:"U.S. Customs Status Information"},352:{name:"U.S. Customs Carrier General Order Status"},353:{name:"U.S. Customs Events Advisory Details"},354:{name:"U.S. Customs Automated Manifest Archive Status"},355:{name:"U.S. Customs Acceptance/Rejection"},356:{name:"U.S. Customs Permit to Transfer Request"},357:{name:"U.S. Customs In-Bond Information"},358:{name:"U.S. Customs Consist Information"},361:{name:"Carrier Interchange Agreement (Ocean)"},362:{name:"Cargo Insurance Advice of Shipment"},404:{name:"Rail Carrier Shipment Information"},410:{name:"Rail Carrier Freight Details and Invoice"},411:{name:"Rail Carrier Freight Details and Invoice Summary"},412:{name:"Trailer or Container Repair Billing"},414:{name:"Rail Carhire Settlements"},417:{name:"Rail Carrier Waybill Interchange"},418:{name:"Rail Advance Interchange Consist"},419:{name:"Advance Car Disposition"},420:{name:"Car Handling Information"},421:{name:"Estimated Time of Arrival and Car Scheduling"},422:{name:"Shipper's Car Order"},423:{name:"Rail Industrial Switch List"},424:{name:"Rail Carrier Services Settlement"},425:{name:"Rail Waybill Request"},426:{name:"Rail Revenue Waybill"},427:{name:"Rail Waybill Response"},429:{name:"Railroad Retirement Activity"},431:{name:"Railroad Station Master File"},432:{name:"Rail Deprescription"},433:{name:"Railroad Reciprocal Switch File"},434:{name:"Railroad Mark Register Update Activity"},435:{name:"Standard Transportation Commodity Code (STCC) Master"},436:{name:"Locomotive Information"},437:{name:"Railroad Junctions and Interchanges Activity"},440:{name:"Shipment Weights"},451:{name:"Railroad Event Report"},452:{name:"Railroad Problem Log Inquiry or Advice"},453:{name:"Railroad Service Commitment Advice"},455:{name:"Railroad Parameter Trace Registration"},456:{name:"Railroad Equipment Inquiry or Advice"},460:{name:"Railroad Price Distribution Request or Response"},463:{name:"Rail Rate Reply"},466:{name:"Rate Request"},468:{name:"Rate Docket Journal Log"},470:{name:"Railroad Clearance"},475:{name:"Rail Route File Maintenance"},485:{name:"Ratemaking Action"},486:{name:"Rate Docket Expiration"},490:{name:"Rate Group Definition"},492:{name:"Miscellaneous Rates"},494:{name:"Rail Scale Rates"},500:{name:"Medical Event Reporting"},501:{name:"Vendor Performance Review"},503:{name:"Pricing History"},504:{name:"Clauses and Provisions"},511:{name:"Requisition"},517:{name:"Material Obligation Validation"},521:{name:"Income or Asset Offset"},527:{name:"Material Due-In and Receipt"},536:{name:"Logistics Reassignment"},540:{name:"Notice of Employment Status"},561:{name:"Contract Abstract"},567:{name:"Contract Completion Status"},568:{name:"Contract Payment Management Report"},601:{name:"U.S. Customs Export Shipment Information"},602:{name:"Transportation Services Tender"},620:{name:"Excavation Communication"},625:{name:"Well Information"},650:{name:"Maintenance Service Order"},715:{name:"Intermodal Group Loading Plan"},805:{name:"Contract Pricing Proposal"},806:{name:"Project Schedule Reporting"},810:{name:"Invoice",edifactId:"INVOIC"},811:{name:"Consolidated Service Invoice/Statement"},812:{name:"Credit/Debit Adjustment"},813:{name:"Electronic Filing of Tax Return Data"},814:{name:"General Request, Response or Confirmation"},815:{name:"Cryptographic Service Message"},816:{name:"Organizational Relationships"},818:{name:"Commission Sales Report"},819:{name:"Operating Expense Statement"},820:{name:"Payment Order/Remittance Advice",edifactId:"REMADV"},821:{name:"Financial Information Reporting"},822:{name:"Account Analysis"},823:{name:"Lockbox"},824:{name:"Application Advice",edifactId:"APERAK"},826:{name:"Tax Information Exchange"},827:{name:"Financial Return Notice"},828:{name:"Debit Authorization"},829:{name:"Payment Cancellation Request"},830:{name:"Planning Schedule with Release Capability",edifactId:"DELFOR"},831:{name:"Application Control Totals"},832:{name:"Price/Sales Catalog",edifactId:"PRICAT"},833:{name:"Mortgage Credit Report Order"},834:{name:"Benefit Enrollment and Maintenance"},835:{name:"Health Care Claim Payment/Advice"},836:{name:"Procurement Notices"},837:{name:"Health Care Claim"},838:{name:"Trading Partner Profile"},839:{name:"Project Cost Reporting"},840:{name:"Request for Quotation",edifactId:"REQUOTE"},841:{name:"Specifications/Technical Information"},842:{name:"Nonconformance Report"},843:{name:"Response to Request for Quotation",edifactId:"QUOTES"},844:{name:"Product Transfer Account Adjustment",edifactId:"SSDCLM"},845:{name:"Price Authorization Acknowledgment/Status",edifactId:"ATHSTS"},846:{name:"Inventory Inquiry/Advice",edifactId:"INVRPT"},847:{name:"Material Claim"},848:{name:"Material Safety Data Sheet"},849:{name:"Response to Product Transfer Account Adjustment"},850:{name:"Purchase Order",edifactId:"ORDERS"},851:{name:"Asset Schedule"},852:{name:"Product Activity Data",edifactId:"SLSRPT"},853:{name:"Routing and Carrier Instruction"},854:{name:"Shipment Delivery Discrepancy Information"},855:{name:"Purchase Order Acknowledgment",edifactId:"ORDRSP"},856:{name:"Advance Ship Notice/Manifest",edifactId:"DESADV"},857:{name:"Shipment and Billing Notice"},858:{name:"Shipment Information"},859:{name:"Freight Invoice"},860:{name:"Purchase Order Change",edifactId:"ORDCHG"},861:{name:"Receiving Advice/Acceptance Certificate",edifactId:"RECADV"},862:{name:"Shipping Schedule",edifactId:"DELJIT"},863:{name:"Report of Test Results"},864:{name:"Text Message"},865:{name:"Purchase Order Change",edifactId:"ORDRSP"},866:{name:"Production Sequence"},867:{name:"Product Transfer and Resale Report",edifactId:"SLSRPT"},868:{name:"Electronic Form Structure"},869:{name:"Order Status Inquiry",edifactId:"ORSSTA"},870:{name:"Order Status Report",edifactId:"ORDREP"},871:{name:"Component Parts Content"},872:{name:"Residential Mortgage Insurance Application"},875:{name:"Grocery Products Purchase Order"},876:{name:"Grocery Products Purchase Order Change"},877:{name:"Manufacturer Coupon Family Code Structure"},878:{name:"Product Authorization/De-authorization"},879:{name:"Price Information"},880:{name:"Grocery Products Invoice"},881:{name:"Manufacturer Coupon Redemption Detail"},882:{name:"Direct Store Delivery Summary Information"},883:{name:"Market Development Fund Allocation"},884:{name:"Market Development Fund Settlement"},885:{name:"Retail Account Characteristics"},886:{name:"Customer Call Reporting"},887:{name:"Coupon Notification"},888:{name:"Item Maintenance"},889:{name:"Promotion Announcement"},891:{name:"Deduction Research Report"},893:{name:"Item Information Request"},894:{name:"Delivery/Return Base Record"},895:{name:"Delivery/Return Acknowledgment or Adjustment"},896:{name:"Product Dimension Maintenance"},920:{name:"Loss or Damage Claim - General Commodities"},924:{name:"Loss or Damage Claim - Motor Vehicle"},925:{name:"Claim Tracer"},926:{name:"Claim Status Report and Tracer Reply"},928:{name:"Automotive Inspection Detail"},940:{name:"Warehouse Shipping Order"},943:{name:"Warehouse Stock Transfer Shipment Advice"},944:{name:"Warehouse Stock Transfer Receipt Advice"},945:{name:"Warehouse Shipping Advice"},947:{name:"Warehouse Inventory Adjustment Advice"},980:{name:"Functional Group Totals"},990:{name:"Response to a Load Tender"},996:{name:"File Transfer"},997:{name:"Functional Acknowledgment",edifactId:"CONTROL"},998:{name:"Set Cancellation"},999:{name:"Implementation Acknowledgment"}});function et(){return(e,t)=>{const n=`_${String(t)}`;Object.defineProperties(e,{[n]:{enumerable:!1,configurable:!0,writable:!0,value:void 0},[t]:{enumerable:!0,configurable:!0,get(){return this[n]},set(r){this[n]=Number(r)}}})}}function tt(e){return(t,n,r)=>{const o=f({},r);return o.get=function(){const c=f({},o);return c.value=te(o.value,e,this),Object.defineProperty(this,n,c),c.value},o.configurable=!0,delete o.writable,delete o.value,o}}function nt(e,t,n){const r=f({},n);return n.get=function(){const i=f({},r);return i.value=ne(r.value,this),Object.defineProperty(this,t,i),i.value},n.configurable=!0,delete n.writable,delete n.value,n}function rt(e,t,n,r,o){const i=o||Object.getOwnPropertyDescriptor(n,r),c=i.get,{value:m}=i;return i.get=function(){const u=this,p=(m||c.call(this)).bind(this),C=f(f({},t),e);for(const g of Object.keys(t))typeof e[g]=="function"?Object.defineProperty(p,g,{get(){return C[g](u)}}):p[g]=C[g];return Object.defineProperty(this,r,{writable:!0,configurable:!0,enumerable:i.enumerable,value:p}),p},delete i.value,delete i.writable,i}function at(e,t,n){const r=f({},n);return r.get=function(){const i=f({},r),c=r.value.bind(this);return i.value=()=>setTimeout(c,0),Object.defineProperty(this,t,i),i.value},r.configurable=!0,delete r.writable,delete r.value,r}function ot(e,t){return!e||e<t[0]?t[0]:e>t[1]?t[1]:e}function re(e,t=0){const n=String(e).split("."),r=n.length>1?n[1].length:0;let o=e;for(let i=r-1;i>=t;i-=1)o=Number(`${Math.round(Number(`${o}e${i}`))}e-${i}`);return o}function it(e,t=2){if(e>Number.MAX_SAFE_INTEGER)throw new Error("Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support.");const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),5),r=["B","KB","MB","GB","TB","PB"][n],o=n?t:0;return re(e/1024**n,o).toFixed(o)+r}function A(e){return typeof e=="string"?e.match(/[^.[\]]+/g)||[]:[].concat(e)}function ae(e,t,n){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}var O=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ct="[object Object]";function st(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function mt(e,t){return function(n){return e(t(n))}}var ut=Function.prototype,oe=Object.prototype,ie=ut.toString,lt=oe.hasOwnProperty,ft=ie.call(Object),dt=oe.toString,pt=mt(Object.getPrototypeOf,Object);function gt(e){return!!e&&typeof e=="object"}function yt(e){if(!gt(e)||dt.call(e)!=ct||st(e))return!1;var t=pt(e);if(t===null)return!0;var n=lt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ie.call(n)==ft}var d=yt;function ce(e){Object.freeze(e);for(const t of Object.keys(e)){const n=e[t];(d(n)||Array.isArray(n))&&ce(n)}}exports.DiffChange=void 0;(function(e){e[e.ADDITION=0]="ADDITION",e[e.DELETION=1]="DELETION",e[e.ALTERATION=2]="ALTERATION"})(exports.DiffChange||(exports.DiffChange={}));function se(e,t,n=[]){let r=[];for(const o of new Set([...Object.keys(e),...Object.keys(t)])){const i=Object.prototype.hasOwnProperty.call(e,o),c=Object.prototype.hasOwnProperty.call(t,o);i&&!c?r.push({type:1,key:o,parentPath:n,objects:[e,t]}):!i&&c?r.push({type:0,key:o,parentPath:n,objects:[e,t]}):d(e[o])&&d(t[o])||Array.isArray(e[o])&&Array.isArray(t[o])?r=r.concat(se(e[o],t[o],[...n,o])):e[o]!==t[o]&&r.push({type:2,key:o,parentPath:n,objects:[e,t]})}return r}function me(e,t){for(const n of Object.keys(e)){const r=e[n];d(r)||Array.isArray(r)?me(r,t):t(n,r,e)}}function ue(e,t,n=[]){t(n,e);for(const r of Object.keys(e)){const o=e[r];if(d(o)||Array.isArray(o)){const i=n.concat(r);ue(o,t,i)}}}function bt(e){return e==null}var L=bt,ht=Object.freeze(Z({__proto__:null,[Symbol.toStringTag]:"Module",default:L},[L])),P={exports:{}};(function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c="[object Map]",m="[object Object]",S="[object Promise]",u="[object Set]",T="[object WeakMap]",p="[object DataView]",C=/[\\^$.*+?()[\]{}|]/g,g=/^\[object .+?Constructor\]$/,ye=typeof O=="object"&&O&&O.Object===Object&&O,be=typeof self=="object"&&self&&self.Object===Object&&self,y=ye||be||Function("return this")(),V=t&&!t.nodeType&&t,G=V&&!0&&e&&!e.nodeType&&e,he=G&&G.exports===V;function Se(a,s){return a==null?void 0:a[s]}function Re(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Ce(a,s){return function(l){return a(s(l))}}var ve=Function.prototype,v=Object.prototype,E=y["__core-js_shared__"],$=function(){var a=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),z=ve.toString,M=v.hasOwnProperty,I=v.toString,Ie=RegExp("^"+z.call(M).replace(C,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=he?y.Buffer:void 0,W=v.propertyIsEnumerable,Ae=U?U.isBuffer:void 0,Oe=Ce(Object.keys,Object),j=R(y,"DataView"),w=R(y,"Map"),D=R(y,"Promise"),k=R(y,"Set"),F=R(y,"WeakMap"),Pe=!W.call({valueOf:1},"valueOf"),Te=h(j),Ee=h(w),Me=h(D),je=h(k),we=h(F);function De(a){return I.call(a)}function ke(a){if(!X(a)||Fe(a))return!1;var s=K(a)||Re(a)?Ie:g;return s.test(h(a))}function R(a,s){var l=Se(a,s);return ke(l)?l:void 0}var b=De;(j&&b(new j(new ArrayBuffer(1)))!=p||w&&b(new w)!=c||D&&b(D.resolve())!=S||k&&b(new k)!=u||F&&b(new F)!=T)&&(b=function(a){var s=I.call(a),l=s==m?a.constructor:void 0,J=l?h(l):void 0;if(J)switch(J){case Te:return p;case Ee:return c;case Me:return S;case je:return u;case we:return T}return s});function Fe(a){return!!$&&$ in a}function Ne(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||v;return a===l}function h(a){if(a!=null){try{return z.call(a)}catch{}try{return a+""}catch{}}return""}function Le(a){return _e(a)&&M.call(a,"callee")&&(!W.call(a,"callee")||I.call(a)==r)}var Be=Array.isArray;function H(a){return a!=null&&Ve(a.length)&&!K(a)}function _e(a){return Ge(a)&&H(a)}var qe=Ae||$e;function xe(a){if(H(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||qe(a)||Le(a)))return!a.length;var s=b(a);if(s==c||s==u)return!a.size;if(Pe||Ne(a))return!Oe(a).length;for(var l in a)if(M.call(a,l))return!1;return!0}function K(a){var s=X(a)?I.call(a):"";return s==o||s==i}function Ve(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=n}function X(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function Ge(a){return!!a&&typeof a=="object"}function $e(){return!1}e.exports=xe})(P,P.exports);var B=P.exports,le=Object.freeze(Z({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[P.exports]));const fe=L||ht,St=B||le;function _(e,t,n,r=!1){if(St(t))return e;let o=e;for(const i of A(t)){let c=i,m;if(typeof i=="string"&&([,c,m]=/^([^?]+)(\?)?$/.exec(i)),o=o[c],fe(o)&&(m||r))return n}return fe(o)?n:o}function Rt(e,...t){const n=new Set(t),r={};for(const o of Object.keys(e))n.has(o)||(r[o]=e[o]);return r}const Ct=B||le;function vt(e,t,n){if(typeof e!="object")throw new Error("object is required");if(Ct(t))throw new Error("path is required");const r=A(t),o=r.splice(r.length-1,1)[0];let i=e;for(const c of r)if(i=i[c],typeof i!="object")throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);i[o]=n}function*It(e,t){yield e;let n=e;for(const r of A(t))n=n[r],yield n}function q(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&d(t[r])?t[r]=q(t[r],n[r]):d(n[r])?t[r]=q({},n[r]):t[r]=n[r];return t}function x(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&d(t[r])?t[r]=x(t[r],n[r]):d(n[r])?t[r]=x({},n[r]):ae(r,n,t);return t}function At(e){const t=[];for(const n of Object.keys(e))t.push(e[n]);return t}function Ot(e,...t){const n=e.reduce((o,i,c)=>`${o}${c<=t.length?String(t[c-1]):""}${i}`),r=Math.min(...n.split(/[\r\n]/).filter(o=>o.trim()).map(o=>/^ */.exec(o)[0].length));return n.replace(new RegExp(`^ {${r}}`,"gm"),"").trim()}function Pt(e){const t=/[A-Z]?B$/.exec(e);if(!t)throw new Error(`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);const[n]=t,r=Number(e.replace(n,""));if(Number.isNaN(r))throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);const o=["B","KB","MB","GB","TB","PB"].indexOf(n);if(o===-1)throw new Error("parseFileSize does not support units above PB");return Math.ceil(r*1024**o)}const de=/(<%=|{{)(.+?)(%>|}})/g,pe=/<%\?(.+?)%>(.+?)<\/%>/g,ge=Symbol("sps.utils.templateSrc");function Tt(e){const t=n=>e.replace(pe,(r,o,i)=>_(n,o.trim())?i:"").replace(de,(r,o,i)=>_(n,i.trim(),""));return t[ge]=e,t}function Et(e){return typeof e=="string"&&(de.test(e)||pe.test(e))}function Mt(e){return typeof e=="function"&&Object.prototype.hasOwnProperty.call(e,ge)}exports.CustomEvent=Ye;exports.EDI_DOCUMENT_TYPE=Ze;exports.Op=N;exports.castToNumber=et;exports.code=Ot;exports.constrain=ot;exports.copyProperty=ae;exports.crumblePath=A;exports.debounce=te;exports.debounced=tt;exports.decimalRound=re;exports.deepFreeze=ce;exports.diff=se;exports.flatten=ee;exports.forEachEntryDeep=me;exports.forEachNestedObject=ue;exports.getPath=_;exports.isSubset=He;exports.isTemplate=Et;exports.isTemplateFn=Mt;exports.lockToAnimationFrames=ne;exports.lockedToAnimationFrames=nt;exports.mergeDeep=q;exports.mergePropertiesDeep=x;exports.omit=Rt;exports.onNextTick=Je;exports.parseFileSize=Pt;exports.range=Qe;exports.setPath=vt;exports.simpleMetadataDecoratorApplicator=rt;exports.template=Tt;exports.tickDelay=at;exports.toFileSizeString=it;exports.traversePath=It;exports.values=At;