-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpride.js
3718 lines (3525 loc) · 107 KB
/
pride.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.js
var src_exports = {};
__export(src_exports, {
Pride: () => Pride_default
});
module.exports = __toCommonJS(src_exports);
// src/Pride/AllDatastores.js
var AllDatastores = {
array: [],
get(uid) {
return this.array.find((datastore) => {
return datastore.get("uid") === uid;
});
}
};
var AllDatastores_default = AllDatastores;
// node_modules/underscore/modules/index.js
var modules_exports = {};
__export(modules_exports, {
VERSION: () => VERSION,
after: () => after,
all: () => every,
allKeys: () => allKeys,
any: () => some,
assign: () => extendOwn_default,
before: () => before,
bind: () => bind_default,
bindAll: () => bindAll_default,
chain: () => chain,
chunk: () => chunk,
clone: () => clone,
collect: () => map,
compact: () => compact,
compose: () => compose,
constant: () => constant,
contains: () => contains,
countBy: () => countBy_default,
create: () => create,
debounce: () => debounce,
default: () => underscore_array_methods_default,
defaults: () => defaults_default,
defer: () => defer_default,
delay: () => delay_default,
detect: () => find,
difference: () => difference_default,
drop: () => rest,
each: () => each,
escape: () => escape_default,
every: () => every,
extend: () => extend_default,
extendOwn: () => extendOwn_default,
filter: () => filter,
find: () => find,
findIndex: () => findIndex_default,
findKey: () => findKey,
findLastIndex: () => findLastIndex_default,
findWhere: () => findWhere,
first: () => first,
flatten: () => flatten2,
foldl: () => reduce_default,
foldr: () => reduceRight_default,
forEach: () => each,
functions: () => functions,
get: () => get,
groupBy: () => groupBy_default,
has: () => has2,
head: () => first,
identity: () => identity,
include: () => contains,
includes: () => contains,
indexBy: () => indexBy_default,
indexOf: () => indexOf_default,
initial: () => initial,
inject: () => reduce_default,
intersection: () => intersection,
invert: () => invert,
invoke: () => invoke_default,
isArguments: () => isArguments_default,
isArray: () => isArray_default,
isArrayBuffer: () => isArrayBuffer_default,
isBoolean: () => isBoolean,
isDataView: () => isDataView_default,
isDate: () => isDate_default,
isElement: () => isElement,
isEmpty: () => isEmpty,
isEqual: () => isEqual,
isError: () => isError_default,
isFinite: () => isFinite2,
isFunction: () => isFunction_default,
isMap: () => isMap_default,
isMatch: () => isMatch,
isNaN: () => isNaN2,
isNull: () => isNull,
isNumber: () => isNumber_default,
isObject: () => isObject,
isRegExp: () => isRegExp_default,
isSet: () => isSet_default,
isString: () => isString_default,
isSymbol: () => isSymbol_default,
isTypedArray: () => isTypedArray_default,
isUndefined: () => isUndefined,
isWeakMap: () => isWeakMap_default,
isWeakSet: () => isWeakSet_default,
iteratee: () => iteratee,
keys: () => keys,
last: () => last,
lastIndexOf: () => lastIndexOf_default,
map: () => map,
mapObject: () => mapObject,
matcher: () => matcher,
matches: () => matcher,
max: () => max,
memoize: () => memoize,
methods: () => functions,
min: () => min,
mixin: () => mixin,
negate: () => negate,
noop: () => noop,
now: () => now_default,
object: () => object,
omit: () => omit_default,
once: () => once_default,
pairs: () => pairs,
partial: () => partial_default,
partition: () => partition_default,
pick: () => pick_default,
pluck: () => pluck,
property: () => property,
propertyOf: () => propertyOf,
random: () => random,
range: () => range,
reduce: () => reduce_default,
reduceRight: () => reduceRight_default,
reject: () => reject,
rest: () => rest,
restArguments: () => restArguments,
result: () => result,
sample: () => sample,
select: () => filter,
shuffle: () => shuffle,
size: () => size,
some: () => some,
sortBy: () => sortBy,
sortedIndex: () => sortedIndex,
tail: () => rest,
take: () => first,
tap: () => tap,
template: () => template,
templateSettings: () => templateSettings_default,
throttle: () => throttle,
times: () => times,
toArray: () => toArray,
toPath: () => toPath,
transpose: () => unzip,
unescape: () => unescape_default,
union: () => union_default,
uniq: () => uniq,
unique: () => uniq,
uniqueId: () => uniqueId,
unzip: () => unzip,
values: () => values,
where: () => where,
without: () => without_default,
wrap: () => wrap,
zip: () => zip_default
});
// node_modules/underscore/modules/_setup.js
var VERSION = "1.13.6";
var root = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {};
var ArrayProto = Array.prototype;
var ObjProto = Object.prototype;
var SymbolProto = typeof Symbol !== "undefined" ? Symbol.prototype : null;
var push = ArrayProto.push;
var slice = ArrayProto.slice;
var toString = ObjProto.toString;
var hasOwnProperty = ObjProto.hasOwnProperty;
var supportsArrayBuffer = typeof ArrayBuffer !== "undefined";
var supportsDataView = typeof DataView !== "undefined";
var nativeIsArray = Array.isArray;
var nativeKeys = Object.keys;
var nativeCreate = Object.create;
var nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
var _isNaN = isNaN;
var _isFinite = isFinite;
var hasEnumBug = !{ toString: null }.propertyIsEnumerable("toString");
var nonEnumerableProps = [
"valueOf",
"isPrototypeOf",
"toString",
"propertyIsEnumerable",
"hasOwnProperty",
"toLocaleString"
];
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
// node_modules/underscore/modules/restArguments.js
function restArguments(func, startIndex) {
startIndex = startIndex == null ? func.length - 1 : +startIndex;
return function() {
var length = Math.max(arguments.length - startIndex, 0), rest2 = Array(length), index = 0;
for (; index < length; index++) {
rest2[index] = arguments[index + startIndex];
}
switch (startIndex) {
case 0:
return func.call(this, rest2);
case 1:
return func.call(this, arguments[0], rest2);
case 2:
return func.call(this, arguments[0], arguments[1], rest2);
}
var args = Array(startIndex + 1);
for (index = 0; index < startIndex; index++) {
args[index] = arguments[index];
}
args[startIndex] = rest2;
return func.apply(this, args);
};
}
// node_modules/underscore/modules/isObject.js
function isObject(obj) {
var type = typeof obj;
return type === "function" || type === "object" && !!obj;
}
// node_modules/underscore/modules/isNull.js
function isNull(obj) {
return obj === null;
}
// node_modules/underscore/modules/isUndefined.js
function isUndefined(obj) {
return obj === void 0;
}
// node_modules/underscore/modules/isBoolean.js
function isBoolean(obj) {
return obj === true || obj === false || toString.call(obj) === "[object Boolean]";
}
// node_modules/underscore/modules/isElement.js
function isElement(obj) {
return !!(obj && obj.nodeType === 1);
}
// node_modules/underscore/modules/_tagTester.js
function tagTester(name) {
var tag = "[object " + name + "]";
return function(obj) {
return toString.call(obj) === tag;
};
}
// node_modules/underscore/modules/isString.js
var isString_default = tagTester("String");
// node_modules/underscore/modules/isNumber.js
var isNumber_default = tagTester("Number");
// node_modules/underscore/modules/isDate.js
var isDate_default = tagTester("Date");
// node_modules/underscore/modules/isRegExp.js
var isRegExp_default = tagTester("RegExp");
// node_modules/underscore/modules/isError.js
var isError_default = tagTester("Error");
// node_modules/underscore/modules/isSymbol.js
var isSymbol_default = tagTester("Symbol");
// node_modules/underscore/modules/isArrayBuffer.js
var isArrayBuffer_default = tagTester("ArrayBuffer");
// node_modules/underscore/modules/isFunction.js
var isFunction = tagTester("Function");
var nodelist = root.document && root.document.childNodes;
if (typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function") {
isFunction = function(obj) {
return typeof obj == "function" || false;
};
}
var isFunction_default = isFunction;
// node_modules/underscore/modules/_hasObjectTag.js
var hasObjectTag_default = tagTester("Object");
// node_modules/underscore/modules/_stringTagBug.js
var hasStringTagBug = supportsDataView && hasObjectTag_default(new DataView(new ArrayBuffer(8)));
var isIE11 = typeof Map !== "undefined" && hasObjectTag_default(/* @__PURE__ */ new Map());
// node_modules/underscore/modules/isDataView.js
var isDataView = tagTester("DataView");
function ie10IsDataView(obj) {
return obj != null && isFunction_default(obj.getInt8) && isArrayBuffer_default(obj.buffer);
}
var isDataView_default = hasStringTagBug ? ie10IsDataView : isDataView;
// node_modules/underscore/modules/isArray.js
var isArray_default = nativeIsArray || tagTester("Array");
// node_modules/underscore/modules/_has.js
function has(obj, key) {
return obj != null && hasOwnProperty.call(obj, key);
}
// node_modules/underscore/modules/isArguments.js
var isArguments = tagTester("Arguments");
(function() {
if (!isArguments(arguments)) {
isArguments = function(obj) {
return has(obj, "callee");
};
}
})();
var isArguments_default = isArguments;
// node_modules/underscore/modules/isFinite.js
function isFinite2(obj) {
return !isSymbol_default(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
}
// node_modules/underscore/modules/isNaN.js
function isNaN2(obj) {
return isNumber_default(obj) && _isNaN(obj);
}
// node_modules/underscore/modules/constant.js
function constant(value) {
return function() {
return value;
};
}
// node_modules/underscore/modules/_createSizePropertyCheck.js
function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
return typeof sizeProperty == "number" && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
};
}
// node_modules/underscore/modules/_shallowProperty.js
function shallowProperty(key) {
return function(obj) {
return obj == null ? void 0 : obj[key];
};
}
// node_modules/underscore/modules/_getByteLength.js
var getByteLength_default = shallowProperty("byteLength");
// node_modules/underscore/modules/_isBufferLike.js
var isBufferLike_default = createSizePropertyCheck(getByteLength_default);
// node_modules/underscore/modules/isTypedArray.js
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
function isTypedArray(obj) {
return nativeIsView ? nativeIsView(obj) && !isDataView_default(obj) : isBufferLike_default(obj) && typedArrayPattern.test(toString.call(obj));
}
var isTypedArray_default = supportsArrayBuffer ? isTypedArray : constant(false);
// node_modules/underscore/modules/_getLength.js
var getLength_default = shallowProperty("length");
// node_modules/underscore/modules/_collectNonEnumProps.js
function emulatedSet(keys2) {
var hash = {};
for (var l = keys2.length, i = 0; i < l; ++i) hash[keys2[i]] = true;
return {
contains: function(key) {
return hash[key] === true;
},
push: function(key) {
hash[key] = true;
return keys2.push(key);
}
};
}
function collectNonEnumProps(obj, keys2) {
keys2 = emulatedSet(keys2);
var nonEnumIdx = nonEnumerableProps.length;
var constructor = obj.constructor;
var proto = isFunction_default(constructor) && constructor.prototype || ObjProto;
var prop = "constructor";
if (has(obj, prop) && !keys2.contains(prop)) keys2.push(prop);
while (nonEnumIdx--) {
prop = nonEnumerableProps[nonEnumIdx];
if (prop in obj && obj[prop] !== proto[prop] && !keys2.contains(prop)) {
keys2.push(prop);
}
}
}
// node_modules/underscore/modules/keys.js
function keys(obj) {
if (!isObject(obj)) return [];
if (nativeKeys) return nativeKeys(obj);
var keys2 = [];
for (var key in obj) if (has(obj, key)) keys2.push(key);
if (hasEnumBug) collectNonEnumProps(obj, keys2);
return keys2;
}
// node_modules/underscore/modules/isEmpty.js
function isEmpty(obj) {
if (obj == null) return true;
var length = getLength_default(obj);
if (typeof length == "number" && (isArray_default(obj) || isString_default(obj) || isArguments_default(obj))) return length === 0;
return getLength_default(keys(obj)) === 0;
}
// node_modules/underscore/modules/isMatch.js
function isMatch(object2, attrs) {
var _keys = keys(attrs), length = _keys.length;
if (object2 == null) return !length;
var obj = Object(object2);
for (var i = 0; i < length; i++) {
var key = _keys[i];
if (attrs[key] !== obj[key] || !(key in obj)) return false;
}
return true;
}
// node_modules/underscore/modules/underscore.js
function _(obj) {
if (obj instanceof _) return obj;
if (!(this instanceof _)) return new _(obj);
this._wrapped = obj;
}
_.VERSION = VERSION;
_.prototype.value = function() {
return this._wrapped;
};
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
_.prototype.toString = function() {
return String(this._wrapped);
};
// node_modules/underscore/modules/_toBufferView.js
function toBufferView(bufferSource) {
return new Uint8Array(
bufferSource.buffer || bufferSource,
bufferSource.byteOffset || 0,
getByteLength_default(bufferSource)
);
}
// node_modules/underscore/modules/isEqual.js
var tagDataView = "[object DataView]";
function eq(a, b, aStack, bStack) {
if (a === b) return a !== 0 || 1 / a === 1 / b;
if (a == null || b == null) return false;
if (a !== a) return b !== b;
var type = typeof a;
if (type !== "function" && type !== "object" && typeof b != "object") return false;
return deepEq(a, b, aStack, bStack);
}
function deepEq(a, b, aStack, bStack) {
if (a instanceof _) a = a._wrapped;
if (b instanceof _) b = b._wrapped;
var className = toString.call(a);
if (className !== toString.call(b)) return false;
if (hasStringTagBug && className == "[object Object]" && isDataView_default(a)) {
if (!isDataView_default(b)) return false;
className = tagDataView;
}
switch (className) {
case "[object RegExp]":
case "[object String]":
return "" + a === "" + b;
case "[object Number]":
if (+a !== +a) return +b !== +b;
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
case "[object Date]":
case "[object Boolean]":
return +a === +b;
case "[object Symbol]":
return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
case "[object ArrayBuffer]":
case tagDataView:
return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
}
var areArrays = className === "[object Array]";
if (!areArrays && isTypedArray_default(a)) {
var byteLength = getByteLength_default(a);
if (byteLength !== getByteLength_default(b)) return false;
if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
areArrays = true;
}
if (!areArrays) {
if (typeof a != "object" || typeof b != "object") return false;
var aCtor = a.constructor, bCtor = b.constructor;
if (aCtor !== bCtor && !(isFunction_default(aCtor) && aCtor instanceof aCtor && isFunction_default(bCtor) && bCtor instanceof bCtor) && ("constructor" in a && "constructor" in b)) {
return false;
}
}
aStack = aStack || [];
bStack = bStack || [];
var length = aStack.length;
while (length--) {
if (aStack[length] === a) return bStack[length] === b;
}
aStack.push(a);
bStack.push(b);
if (areArrays) {
length = a.length;
if (length !== b.length) return false;
while (length--) {
if (!eq(a[length], b[length], aStack, bStack)) return false;
}
} else {
var _keys = keys(a), key;
length = _keys.length;
if (keys(b).length !== length) return false;
while (length--) {
key = _keys[length];
if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
}
}
aStack.pop();
bStack.pop();
return true;
}
function isEqual(a, b) {
return eq(a, b);
}
// node_modules/underscore/modules/allKeys.js
function allKeys(obj) {
if (!isObject(obj)) return [];
var keys2 = [];
for (var key in obj) keys2.push(key);
if (hasEnumBug) collectNonEnumProps(obj, keys2);
return keys2;
}
// node_modules/underscore/modules/_methodFingerprint.js
function ie11fingerprint(methods) {
var length = getLength_default(methods);
return function(obj) {
if (obj == null) return false;
var keys2 = allKeys(obj);
if (getLength_default(keys2)) return false;
for (var i = 0; i < length; i++) {
if (!isFunction_default(obj[methods[i]])) return false;
}
return methods !== weakMapMethods || !isFunction_default(obj[forEachName]);
};
}
var forEachName = "forEach";
var hasName = "has";
var commonInit = ["clear", "delete"];
var mapTail = ["get", hasName, "set"];
var mapMethods = commonInit.concat(forEachName, mapTail);
var weakMapMethods = commonInit.concat(mapTail);
var setMethods = ["add"].concat(commonInit, forEachName, hasName);
// node_modules/underscore/modules/isMap.js
var isMap_default = isIE11 ? ie11fingerprint(mapMethods) : tagTester("Map");
// node_modules/underscore/modules/isWeakMap.js
var isWeakMap_default = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester("WeakMap");
// node_modules/underscore/modules/isSet.js
var isSet_default = isIE11 ? ie11fingerprint(setMethods) : tagTester("Set");
// node_modules/underscore/modules/isWeakSet.js
var isWeakSet_default = tagTester("WeakSet");
// node_modules/underscore/modules/values.js
function values(obj) {
var _keys = keys(obj);
var length = _keys.length;
var values2 = Array(length);
for (var i = 0; i < length; i++) {
values2[i] = obj[_keys[i]];
}
return values2;
}
// node_modules/underscore/modules/pairs.js
function pairs(obj) {
var _keys = keys(obj);
var length = _keys.length;
var pairs2 = Array(length);
for (var i = 0; i < length; i++) {
pairs2[i] = [_keys[i], obj[_keys[i]]];
}
return pairs2;
}
// node_modules/underscore/modules/invert.js
function invert(obj) {
var result2 = {};
var _keys = keys(obj);
for (var i = 0, length = _keys.length; i < length; i++) {
result2[obj[_keys[i]]] = _keys[i];
}
return result2;
}
// node_modules/underscore/modules/functions.js
function functions(obj) {
var names = [];
for (var key in obj) {
if (isFunction_default(obj[key])) names.push(key);
}
return names.sort();
}
// node_modules/underscore/modules/_createAssigner.js
function createAssigner(keysFunc, defaults) {
return function(obj) {
var length = arguments.length;
if (defaults) obj = Object(obj);
if (length < 2 || obj == null) return obj;
for (var index = 1; index < length; index++) {
var source = arguments[index], keys2 = keysFunc(source), l = keys2.length;
for (var i = 0; i < l; i++) {
var key = keys2[i];
if (!defaults || obj[key] === void 0) obj[key] = source[key];
}
}
return obj;
};
}
// node_modules/underscore/modules/extend.js
var extend_default = createAssigner(allKeys);
// node_modules/underscore/modules/extendOwn.js
var extendOwn_default = createAssigner(keys);
// node_modules/underscore/modules/defaults.js
var defaults_default = createAssigner(allKeys, true);
// node_modules/underscore/modules/_baseCreate.js
function ctor() {
return function() {
};
}
function baseCreate(prototype) {
if (!isObject(prototype)) return {};
if (nativeCreate) return nativeCreate(prototype);
var Ctor = ctor();
Ctor.prototype = prototype;
var result2 = new Ctor();
Ctor.prototype = null;
return result2;
}
// node_modules/underscore/modules/create.js
function create(prototype, props) {
var result2 = baseCreate(prototype);
if (props) extendOwn_default(result2, props);
return result2;
}
// node_modules/underscore/modules/clone.js
function clone(obj) {
if (!isObject(obj)) return obj;
return isArray_default(obj) ? obj.slice() : extend_default({}, obj);
}
// node_modules/underscore/modules/tap.js
function tap(obj, interceptor) {
interceptor(obj);
return obj;
}
// node_modules/underscore/modules/toPath.js
function toPath(path) {
return isArray_default(path) ? path : [path];
}
_.toPath = toPath;
// node_modules/underscore/modules/_toPath.js
function toPath2(path) {
return _.toPath(path);
}
// node_modules/underscore/modules/_deepGet.js
function deepGet(obj, path) {
var length = path.length;
for (var i = 0; i < length; i++) {
if (obj == null) return void 0;
obj = obj[path[i]];
}
return length ? obj : void 0;
}
// node_modules/underscore/modules/get.js
function get(object2, path, defaultValue) {
var value = deepGet(object2, toPath2(path));
return isUndefined(value) ? defaultValue : value;
}
// node_modules/underscore/modules/has.js
function has2(obj, path) {
path = toPath2(path);
var length = path.length;
for (var i = 0; i < length; i++) {
var key = path[i];
if (!has(obj, key)) return false;
obj = obj[key];
}
return !!length;
}
// node_modules/underscore/modules/identity.js
function identity(value) {
return value;
}
// node_modules/underscore/modules/matcher.js
function matcher(attrs) {
attrs = extendOwn_default({}, attrs);
return function(obj) {
return isMatch(obj, attrs);
};
}
// node_modules/underscore/modules/property.js
function property(path) {
path = toPath2(path);
return function(obj) {
return deepGet(obj, path);
};
}
// node_modules/underscore/modules/_optimizeCb.js
function optimizeCb(func, context, argCount) {
if (context === void 0) return func;
switch (argCount == null ? 3 : argCount) {
case 1:
return function(value) {
return func.call(context, value);
};
case 3:
return function(value, index, collection) {
return func.call(context, value, index, collection);
};
case 4:
return function(accumulator, value, index, collection) {
return func.call(context, accumulator, value, index, collection);
};
}
return function() {
return func.apply(context, arguments);
};
}
// node_modules/underscore/modules/_baseIteratee.js
function baseIteratee(value, context, argCount) {
if (value == null) return identity;
if (isFunction_default(value)) return optimizeCb(value, context, argCount);
if (isObject(value) && !isArray_default(value)) return matcher(value);
return property(value);
}
// node_modules/underscore/modules/iteratee.js
function iteratee(value, context) {
return baseIteratee(value, context, Infinity);
}
_.iteratee = iteratee;
// node_modules/underscore/modules/_cb.js
function cb(value, context, argCount) {
if (_.iteratee !== iteratee) return _.iteratee(value, context);
return baseIteratee(value, context, argCount);
}
// node_modules/underscore/modules/mapObject.js
function mapObject(obj, iteratee2, context) {
iteratee2 = cb(iteratee2, context);
var _keys = keys(obj), length = _keys.length, results = {};
for (var index = 0; index < length; index++) {
var currentKey = _keys[index];
results[currentKey] = iteratee2(obj[currentKey], currentKey, obj);
}
return results;
}
// node_modules/underscore/modules/noop.js
function noop() {
}
// node_modules/underscore/modules/propertyOf.js
function propertyOf(obj) {
if (obj == null) return noop;
return function(path) {
return get(obj, path);
};
}
// node_modules/underscore/modules/times.js
function times(n, iteratee2, context) {
var accum = Array(Math.max(0, n));
iteratee2 = optimizeCb(iteratee2, context, 1);
for (var i = 0; i < n; i++) accum[i] = iteratee2(i);
return accum;
}
// node_modules/underscore/modules/random.js
function random(min2, max2) {
if (max2 == null) {
max2 = min2;
min2 = 0;
}
return min2 + Math.floor(Math.random() * (max2 - min2 + 1));
}
// node_modules/underscore/modules/now.js
var now_default = Date.now || function() {
return (/* @__PURE__ */ new Date()).getTime();
};
// node_modules/underscore/modules/_createEscaper.js
function createEscaper(map2) {
var escaper = function(match) {
return map2[match];
};
var source = "(?:" + keys(map2).join("|") + ")";
var testRegexp = RegExp(source);
var replaceRegexp = RegExp(source, "g");
return function(string) {
string = string == null ? "" : "" + string;
return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
};
}
// node_modules/underscore/modules/_escapeMap.js
var escapeMap_default = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"`": "`"
};
// node_modules/underscore/modules/escape.js
var escape_default = createEscaper(escapeMap_default);
// node_modules/underscore/modules/_unescapeMap.js
var unescapeMap_default = invert(escapeMap_default);
// node_modules/underscore/modules/unescape.js
var unescape_default = createEscaper(unescapeMap_default);
// node_modules/underscore/modules/templateSettings.js
var templateSettings_default = _.templateSettings = {
evaluate: /<%([\s\S]+?)%>/g,
interpolate: /<%=([\s\S]+?)%>/g,
escape: /<%-([\s\S]+?)%>/g
};
// node_modules/underscore/modules/template.js
var noMatch = /(.)^/;
var escapes = {
"'": "'",
"\\": "\\",
"\r": "r",
"\n": "n",
"\u2028": "u2028",
"\u2029": "u2029"
};
var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
function escapeChar(match) {
return "\\" + escapes[match];
}
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
function template(text, settings, oldSettings) {
if (!settings && oldSettings) settings = oldSettings;
settings = defaults_default({}, settings, _.templateSettings);
var matcher2 = RegExp([
(settings.escape || noMatch).source,
(settings.interpolate || noMatch).source,
(settings.evaluate || noMatch).source
].join("|") + "|$", "g");
var index = 0;
var source = "__p+='";
text.replace(matcher2, function(match, escape2, interpolate, evaluate, offset) {
source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
index = offset + match.length;
if (escape2) {
source += "'+\n((__t=(" + escape2 + "))==null?'':_.escape(__t))+\n'";
} else if (interpolate) {
source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
} else if (evaluate) {
source += "';\n" + evaluate + "\n__p+='";
}
return match;
});
source += "';\n";
var argument = settings.variable;
if (argument) {
if (!bareIdentifier.test(argument)) throw new Error(
"variable is not a bare identifier: " + argument
);
} else {
source = "with(obj||{}){\n" + source + "}\n";
argument = "obj";
}
source = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n";
var render;
try {
render = new Function(argument, "_", source);
} catch (e) {
e.source = source;
throw e;
}
var template2 = function(data) {
return render.call(this, data, _);
};
template2.source = "function(" + argument + "){\n" + source + "}";
return template2;
}
// node_modules/underscore/modules/result.js
function result(obj, path, fallback) {
path = toPath2(path);
var length = path.length;
if (!length) {
return isFunction_default(fallback) ? fallback.call(obj) : fallback;
}
for (var i = 0; i < length; i++) {
var prop = obj == null ? void 0 : obj[path[i]];
if (prop === void 0) {
prop = fallback;
i = length;
}
obj = isFunction_default(prop) ? prop.call(obj) : prop;
}
return obj;
}
// node_modules/underscore/modules/uniqueId.js
var idCounter = 0;
function uniqueId(prefix) {
var id = ++idCounter + "";
return prefix ? prefix + id : id;
}
// node_modules/underscore/modules/chain.js
function chain(obj) {
var instance = _(obj);
instance._chain = true;
return instance;
}
// node_modules/underscore/modules/_executeBound.js
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
var self2 = baseCreate(sourceFunc.prototype);
var result2 = sourceFunc.apply(self2, args);
if (isObject(result2)) return result2;
return self2;
}
// node_modules/underscore/modules/partial.js
var partial = restArguments(function(func, boundArgs) {
var placeholder = partial.placeholder;
var bound = function() {
var position = 0, length = boundArgs.length;
var args = Array(length);
for (var i = 0; i < length; i++) {
args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];
}
while (position < arguments.length) args.push(arguments[position++]);
return executeBound(func, bound, this, this, args);
};
return bound;
});
partial.placeholder = _;
var partial_default = partial;