mol_plot_all 1.2.130 → 1.2.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.d.ts +7 -10
- package/node.deps.json +1 -1
- package/node.esm.js +176 -89
- package/node.esm.js.map +1 -1
- package/node.js +176 -89
- package/node.js.map +1 -1
- package/node.test.js +203 -453
- package/node.test.js.map +1 -1
- package/node.view.tree +5 -1
- package/package.json +1 -1
- package/web.d.ts +7 -10
- package/web.deps.json +1 -1
- package/web.esm.js +176 -89
- package/web.esm.js.map +1 -1
- package/web.js +176 -89
- package/web.js.map +1 -1
- package/web.test.js +24 -361
- package/web.test.js.map +1 -1
- package/web.view.tree +5 -1
package/web.test.js
CHANGED
|
@@ -271,23 +271,16 @@ var $;
|
|
|
271
271
|
$.$mol_assert_ok($.$mol_compare_deep(1, 1));
|
|
272
272
|
$.$mol_assert_ok($.$mol_compare_deep(Number.NaN, Number.NaN));
|
|
273
273
|
$.$mol_assert_not($.$mol_compare_deep(1, 2));
|
|
274
|
-
},
|
|
275
|
-
'Number'() {
|
|
276
274
|
$.$mol_assert_ok($.$mol_compare_deep(Object(1), Object(1)));
|
|
277
|
-
$.$mol_assert_ok($.$mol_compare_deep(Object(Number.NaN), Object(Number.NaN)));
|
|
278
275
|
$.$mol_assert_not($.$mol_compare_deep(Object(1), Object(2)));
|
|
279
276
|
},
|
|
280
|
-
'
|
|
277
|
+
'POJO'() {
|
|
281
278
|
$.$mol_assert_ok($.$mol_compare_deep({}, {}));
|
|
282
|
-
},
|
|
283
|
-
'different POJOs'() {
|
|
284
279
|
$.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { b: 2 }));
|
|
285
|
-
},
|
|
286
|
-
'different POJOs with same keys but different values'() {
|
|
287
280
|
$.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { a: 2 }));
|
|
288
|
-
},
|
|
289
|
-
'different POJOs with different keys but same values'() {
|
|
290
281
|
$.$mol_assert_not($.$mol_compare_deep({}, { a: undefined }));
|
|
282
|
+
$.$mol_assert_ok($.$mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
283
|
+
$.$mol_assert_ok($.$mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
291
284
|
},
|
|
292
285
|
'Array'() {
|
|
293
286
|
$.$mol_assert_ok($.$mol_compare_deep([], []));
|
|
@@ -295,17 +288,12 @@ var $;
|
|
|
295
288
|
$.$mol_assert_not($.$mol_compare_deep([1, 2], [1, 3]));
|
|
296
289
|
$.$mol_assert_not($.$mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
297
290
|
},
|
|
298
|
-
'
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
'different classes with same values'() {
|
|
302
|
-
class Obj {
|
|
303
|
-
foo = 1;
|
|
291
|
+
'Non POJO are different'() {
|
|
292
|
+
class Thing extends Object {
|
|
304
293
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
$.$mol_assert_not($.$mol_compare_deep(a, b));
|
|
294
|
+
$.$mol_assert_not($.$mol_compare_deep(new Thing, new Thing));
|
|
295
|
+
$.$mol_assert_not($.$mol_compare_deep(() => 1, () => 1));
|
|
296
|
+
$.$mol_assert_not($.$mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
309
297
|
},
|
|
310
298
|
'same POJOs with cyclic reference'() {
|
|
311
299
|
const a = { foo: {} };
|
|
@@ -314,41 +302,6 @@ var $;
|
|
|
314
302
|
b['self'] = b;
|
|
315
303
|
$.$mol_assert_ok($.$mol_compare_deep(a, b));
|
|
316
304
|
},
|
|
317
|
-
'empty Element'() {
|
|
318
|
-
$.$mol_assert_ok($.$mol_compare_deep($.$mol_jsx("div", null), $.$mol_jsx("div", null)));
|
|
319
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", null), $.$mol_jsx("span", null)));
|
|
320
|
-
},
|
|
321
|
-
'Element with attributes'() {
|
|
322
|
-
$.$mol_assert_ok($.$mol_compare_deep($.$mol_jsx("div", { dir: "rtl" }), $.$mol_jsx("div", { dir: "rtl" })));
|
|
323
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", { dir: "rtl" }), $.$mol_jsx("div", null)));
|
|
324
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", { dir: "rtl" }), $.$mol_jsx("div", { dir: "ltr" })));
|
|
325
|
-
},
|
|
326
|
-
'Element with styles'() {
|
|
327
|
-
$.$mol_assert_ok($.$mol_compare_deep($.$mol_jsx("div", { style: { color: 'red' } }), $.$mol_jsx("div", { style: { color: 'red' } })));
|
|
328
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", { style: { color: 'red' } }), $.$mol_jsx("div", { style: {} })));
|
|
329
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", { style: { color: 'red' } }), $.$mol_jsx("div", { style: { color: 'blue' } })));
|
|
330
|
-
},
|
|
331
|
-
'Element with content'() {
|
|
332
|
-
$.$mol_assert_ok($.$mol_compare_deep($.$mol_jsx("div", null,
|
|
333
|
-
"foo",
|
|
334
|
-
$.$mol_jsx("br", null)), $.$mol_jsx("div", null,
|
|
335
|
-
"foo",
|
|
336
|
-
$.$mol_jsx("br", null))));
|
|
337
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", null,
|
|
338
|
-
"foo",
|
|
339
|
-
$.$mol_jsx("br", null)), $.$mol_jsx("div", null,
|
|
340
|
-
"bar",
|
|
341
|
-
$.$mol_jsx("br", null))));
|
|
342
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", null,
|
|
343
|
-
"foo",
|
|
344
|
-
$.$mol_jsx("br", null)), $.$mol_jsx("div", null,
|
|
345
|
-
"foo",
|
|
346
|
-
$.$mol_jsx("hr", null))));
|
|
347
|
-
},
|
|
348
|
-
'Element with handlers'() {
|
|
349
|
-
$.$mol_assert_ok($.$mol_compare_deep($.$mol_jsx("div", { onclick: () => 1 }), $.$mol_jsx("div", { onclick: () => 1 })));
|
|
350
|
-
$.$mol_assert_not($.$mol_compare_deep($.$mol_jsx("div", { onclick: () => 1 }), $.$mol_jsx("div", { onclick: () => 2 })));
|
|
351
|
-
},
|
|
352
305
|
'Date'() {
|
|
353
306
|
$.$mol_assert_ok($.$mol_compare_deep(new Date(12345), new Date(12345)));
|
|
354
307
|
$.$mol_assert_not($.$mol_compare_deep(new Date(12345), new Date(12346)));
|
|
@@ -360,8 +313,9 @@ var $;
|
|
|
360
313
|
},
|
|
361
314
|
'Map'() {
|
|
362
315
|
$.$mol_assert_ok($.$mol_compare_deep(new Map, new Map));
|
|
363
|
-
$.$mol_assert_ok($.$mol_compare_deep(new Map([[
|
|
316
|
+
$.$mol_assert_ok($.$mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
|
|
364
317
|
$.$mol_assert_not($.$mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
|
|
318
|
+
$.$mol_assert_not($.$mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
|
|
365
319
|
},
|
|
366
320
|
'Set'() {
|
|
367
321
|
$.$mol_assert_ok($.$mol_compare_deep(new Set, new Set));
|
|
@@ -373,106 +327,24 @@ var $;
|
|
|
373
327
|
$.$mol_assert_ok($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
374
328
|
$.$mol_assert_not($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
375
329
|
},
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
;
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
const a_stack = [];
|
|
384
|
-
const b_stack = [];
|
|
385
|
-
let cache = null;
|
|
386
|
-
function $mol_compare_deep(a, b) {
|
|
387
|
-
if (Object.is(a, b))
|
|
388
|
-
return true;
|
|
389
|
-
const a_type = typeof a;
|
|
390
|
-
const b_type = typeof b;
|
|
391
|
-
if (a_type !== b_type)
|
|
392
|
-
return false;
|
|
393
|
-
if (a_type === 'function')
|
|
394
|
-
return a['toString']() === b['toString']();
|
|
395
|
-
if (a_type !== 'object')
|
|
396
|
-
return false;
|
|
397
|
-
if (!a || !b)
|
|
398
|
-
return false;
|
|
399
|
-
if (a instanceof Error)
|
|
400
|
-
return false;
|
|
401
|
-
if (a['constructor'] !== b['constructor'])
|
|
402
|
-
return false;
|
|
403
|
-
if (a instanceof RegExp)
|
|
404
|
-
return a.toString() === b['toString']();
|
|
405
|
-
const ref = a_stack.indexOf(a);
|
|
406
|
-
if (ref >= 0) {
|
|
407
|
-
return Object.is(b_stack[ref], b);
|
|
408
|
-
}
|
|
409
|
-
if (!cache)
|
|
410
|
-
cache = new WeakMap;
|
|
411
|
-
let a_cache = cache.get(a);
|
|
412
|
-
if (a_cache) {
|
|
413
|
-
const b_cache = a_cache.get(b);
|
|
414
|
-
if (typeof b_cache === 'boolean')
|
|
415
|
-
return b_cache;
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
a_cache = new WeakMap();
|
|
419
|
-
cache.set(a, a_cache);
|
|
420
|
-
}
|
|
421
|
-
a_stack.push(a);
|
|
422
|
-
b_stack.push(b);
|
|
423
|
-
let result;
|
|
424
|
-
try {
|
|
425
|
-
if (Symbol.iterator in a) {
|
|
426
|
-
const a_iter = a[Symbol.iterator]();
|
|
427
|
-
const b_iter = b[Symbol.iterator]();
|
|
428
|
-
while (true) {
|
|
429
|
-
const a_next = a_iter.next();
|
|
430
|
-
const b_next = b_iter.next();
|
|
431
|
-
if (a_next.done !== b_next.done)
|
|
432
|
-
return result = false;
|
|
433
|
-
if (a_next.done)
|
|
434
|
-
break;
|
|
435
|
-
if (!$mol_compare_deep(a_next.value, b_next.value))
|
|
436
|
-
return result = false;
|
|
437
|
-
}
|
|
438
|
-
return result = true;
|
|
439
|
-
}
|
|
440
|
-
let count = 0;
|
|
441
|
-
for (let key in a) {
|
|
442
|
-
try {
|
|
443
|
-
if (!$mol_compare_deep(a[key], b[key]))
|
|
444
|
-
return result = false;
|
|
330
|
+
'Custom comparator'() {
|
|
331
|
+
class User {
|
|
332
|
+
name;
|
|
333
|
+
rand;
|
|
334
|
+
constructor(name, rand = Math.random()) {
|
|
335
|
+
this.name = name;
|
|
336
|
+
this.rand = rand;
|
|
445
337
|
}
|
|
446
|
-
|
|
447
|
-
|
|
338
|
+
[Symbol.toPrimitive](mode) {
|
|
339
|
+
return this.name;
|
|
448
340
|
}
|
|
449
|
-
++count;
|
|
450
|
-
}
|
|
451
|
-
for (let key in b) {
|
|
452
|
-
--count;
|
|
453
|
-
if (count < 0)
|
|
454
|
-
return result = false;
|
|
455
|
-
}
|
|
456
|
-
if (a instanceof Number || a instanceof String || a instanceof Symbol || a instanceof Boolean || a instanceof Date) {
|
|
457
|
-
if (!Object.is(a['valueOf'](), b['valueOf']()))
|
|
458
|
-
return result = false;
|
|
459
|
-
}
|
|
460
|
-
return result = true;
|
|
461
|
-
}
|
|
462
|
-
finally {
|
|
463
|
-
a_stack.pop();
|
|
464
|
-
b_stack.pop();
|
|
465
|
-
if (a_stack.length === 0) {
|
|
466
|
-
cache = null;
|
|
467
341
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
$.$mol_compare_deep = $mol_compare_deep;
|
|
342
|
+
$.$mol_assert_ok($.$mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
343
|
+
$.$mol_assert_not($.$mol_compare_deep(new User('Jin'), new User('John')));
|
|
344
|
+
},
|
|
345
|
+
});
|
|
474
346
|
})($ || ($ = {}));
|
|
475
|
-
//deep.js.map
|
|
347
|
+
//deep.test.js.map
|
|
476
348
|
;
|
|
477
349
|
"use strict";
|
|
478
350
|
var $;
|
|
@@ -874,129 +746,6 @@ var $;
|
|
|
874
746
|
;
|
|
875
747
|
"use strict";
|
|
876
748
|
var $;
|
|
877
|
-
(function ($) {
|
|
878
|
-
$.$mol_test({
|
|
879
|
-
'return source when same object'() {
|
|
880
|
-
const target = {};
|
|
881
|
-
$.$mol_assert_equal($.$mol_conform(target, target), target);
|
|
882
|
-
},
|
|
883
|
-
'return target when some is not object'() {
|
|
884
|
-
const obj = { a: 1 };
|
|
885
|
-
$.$mol_assert_equal($.$mol_conform(true, obj), true);
|
|
886
|
-
$.$mol_assert_equal($.$mol_conform(obj, true), obj);
|
|
887
|
-
},
|
|
888
|
-
'return target when some is null'() {
|
|
889
|
-
const obj = { a: 1 };
|
|
890
|
-
$.$mol_assert_equal($.$mol_conform(null, obj), null);
|
|
891
|
-
$.$mol_assert_equal($.$mol_conform(obj, null), obj);
|
|
892
|
-
},
|
|
893
|
-
'return target when some is undefined'() {
|
|
894
|
-
const obj = { a: 1 };
|
|
895
|
-
$.$mol_assert_equal($.$mol_conform(undefined, obj), undefined);
|
|
896
|
-
$.$mol_assert_equal($.$mol_conform(obj, undefined), obj);
|
|
897
|
-
},
|
|
898
|
-
'return target when different keys count'() {
|
|
899
|
-
const target = [1, 2, 3];
|
|
900
|
-
const source = [1, 2, 3, undefined];
|
|
901
|
-
const result = $.$mol_conform(target, source);
|
|
902
|
-
$.$mol_assert_equal(result, target);
|
|
903
|
-
$.$mol_assert_equal(result.join(','), '1,2,3');
|
|
904
|
-
},
|
|
905
|
-
'return source when array values are strong equal'() {
|
|
906
|
-
const source = [1, 2, 3];
|
|
907
|
-
$.$mol_assert_equal($.$mol_conform([1, 2, 3], source), source);
|
|
908
|
-
},
|
|
909
|
-
'return source when object values are strong equal'() {
|
|
910
|
-
const source = { a: 1, b: 2 };
|
|
911
|
-
$.$mol_assert_equal($.$mol_conform({ a: 1, b: 2 }, source), source);
|
|
912
|
-
},
|
|
913
|
-
'return target when some values are not equal'() {
|
|
914
|
-
const target = [1, 2, 3];
|
|
915
|
-
const source = [1, 2, 5];
|
|
916
|
-
const result = $.$mol_conform(target, source);
|
|
917
|
-
$.$mol_assert_equal(result, target);
|
|
918
|
-
$.$mol_assert_equal(result.join(','), '1,2,3');
|
|
919
|
-
},
|
|
920
|
-
'return source when values are deep equal'() {
|
|
921
|
-
const source = { foo: { bar: 1 } };
|
|
922
|
-
$.$mol_assert_equal($.$mol_conform({ foo: { bar: 1 } }, source), source);
|
|
923
|
-
},
|
|
924
|
-
'return target with equal values from source and not equal from target'() {
|
|
925
|
-
const source = { foo: { xxx: 1 }, bar: { xxx: 2 } };
|
|
926
|
-
const target = { foo: { xxx: 1 }, bar: { xxx: 3 } };
|
|
927
|
-
const result = $.$mol_conform(target, source);
|
|
928
|
-
$.$mol_assert_equal(result, target);
|
|
929
|
-
$.$mol_assert_equal(result.foo, source.foo);
|
|
930
|
-
$.$mol_assert_equal(result.bar, target.bar);
|
|
931
|
-
},
|
|
932
|
-
'return target when equal but with different class'() {
|
|
933
|
-
const target = { '0': 1 };
|
|
934
|
-
$.$mol_assert_equal($.$mol_conform(target, [1]), target);
|
|
935
|
-
},
|
|
936
|
-
'return target when conformer for class is not defined'() {
|
|
937
|
-
const Obj = class {
|
|
938
|
-
};
|
|
939
|
-
const source = new Obj;
|
|
940
|
-
const target = new Obj;
|
|
941
|
-
const result = $.$mol_conform(target, source);
|
|
942
|
-
$.$mol_assert_equal(result, target);
|
|
943
|
-
},
|
|
944
|
-
'return target when has cyclic reference'() {
|
|
945
|
-
const source = { foo: {} };
|
|
946
|
-
source['self'] = source;
|
|
947
|
-
const target = { foo: {} };
|
|
948
|
-
target['self'] = target;
|
|
949
|
-
const result = $.$mol_conform(target, source);
|
|
950
|
-
$.$mol_assert_equal(result, target);
|
|
951
|
-
$.$mol_assert_equal(result['self'], target);
|
|
952
|
-
$.$mol_assert_equal(result.foo, source.foo);
|
|
953
|
-
},
|
|
954
|
-
'return source when equal dates'() {
|
|
955
|
-
const source = new Date(12345);
|
|
956
|
-
const target = new Date(12345);
|
|
957
|
-
const result = $.$mol_conform(target, source);
|
|
958
|
-
$.$mol_assert_equal(result, source);
|
|
959
|
-
},
|
|
960
|
-
'return source when equal regular expressions'() {
|
|
961
|
-
const source = /\x22/mig;
|
|
962
|
-
const target = /\x22/mig;
|
|
963
|
-
const result = $.$mol_conform(target, source);
|
|
964
|
-
$.$mol_assert_equal(result, source);
|
|
965
|
-
},
|
|
966
|
-
'return cached value if already conformed'() {
|
|
967
|
-
const source = { foo: { xxx: 1 }, bar: { xxx: 3 } };
|
|
968
|
-
const target = { foo: { xxx: 2 }, bar: { xxx: 3 } };
|
|
969
|
-
const result = $.$mol_conform(target, source);
|
|
970
|
-
target.foo.xxx = 1;
|
|
971
|
-
$.$mol_assert_equal($.$mol_conform(target.foo, source.foo), target.foo);
|
|
972
|
-
},
|
|
973
|
-
'skip readlony fields'() {
|
|
974
|
-
const source = { foo: {}, bar: {} };
|
|
975
|
-
const target = { foo: {}, bar: {} };
|
|
976
|
-
Object.defineProperty(target, 'bar', { value: {}, writable: false });
|
|
977
|
-
const result = $.$mol_conform(target, source);
|
|
978
|
-
$.$mol_assert_equal(result, target);
|
|
979
|
-
$.$mol_assert_equal(result.foo, source.foo);
|
|
980
|
-
$.$mol_assert_equal(result.bar, target.bar);
|
|
981
|
-
},
|
|
982
|
-
'object with NaN'() {
|
|
983
|
-
const source = { foo: Number.NaN };
|
|
984
|
-
const target = { foo: Number.NaN };
|
|
985
|
-
const result = $.$mol_conform(target, source);
|
|
986
|
-
$.$mol_assert_equal(result, source);
|
|
987
|
-
},
|
|
988
|
-
'array with NaN'() {
|
|
989
|
-
const source = [Number.NaN];
|
|
990
|
-
const target = [Number.NaN];
|
|
991
|
-
const result = $.$mol_conform(target, source);
|
|
992
|
-
$.$mol_assert_equal(result, source);
|
|
993
|
-
},
|
|
994
|
-
});
|
|
995
|
-
})($ || ($ = {}));
|
|
996
|
-
//conform.test.js.map
|
|
997
|
-
;
|
|
998
|
-
"use strict";
|
|
999
|
-
var $;
|
|
1000
749
|
(function ($) {
|
|
1001
750
|
$.$mol_test({
|
|
1002
751
|
'trim array'() {
|
|
@@ -1585,92 +1334,6 @@ var $;
|
|
|
1585
1334
|
;
|
|
1586
1335
|
"use strict";
|
|
1587
1336
|
var $;
|
|
1588
|
-
(function ($) {
|
|
1589
|
-
$.$mol_test({
|
|
1590
|
-
'equal paths'() {
|
|
1591
|
-
const diff = $.$mol_diff_path([1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]);
|
|
1592
|
-
$.$mol_assert_like(diff, {
|
|
1593
|
-
prefix: [1, 2, 3, 4],
|
|
1594
|
-
suffix: [[], [], []],
|
|
1595
|
-
});
|
|
1596
|
-
},
|
|
1597
|
-
'different suffix'() {
|
|
1598
|
-
const diff = $.$mol_diff_path([1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 5, 4]);
|
|
1599
|
-
$.$mol_assert_like(diff, {
|
|
1600
|
-
prefix: [1, 2],
|
|
1601
|
-
suffix: [[3, 4], [3, 5], [5, 4]],
|
|
1602
|
-
});
|
|
1603
|
-
},
|
|
1604
|
-
'one contains other'() {
|
|
1605
|
-
const diff = $.$mol_diff_path([1, 2, 3, 4], [1, 2], [1, 2, 3]);
|
|
1606
|
-
$.$mol_assert_like(diff, {
|
|
1607
|
-
prefix: [1, 2],
|
|
1608
|
-
suffix: [[3, 4], [], [3]],
|
|
1609
|
-
});
|
|
1610
|
-
},
|
|
1611
|
-
'fully different'() {
|
|
1612
|
-
const diff = $.$mol_diff_path([1, 2], [3, 4], [5, 6]);
|
|
1613
|
-
$.$mol_assert_like(diff, {
|
|
1614
|
-
prefix: [],
|
|
1615
|
-
suffix: [[1, 2], [3, 4], [5, 6]],
|
|
1616
|
-
});
|
|
1617
|
-
},
|
|
1618
|
-
});
|
|
1619
|
-
})($ || ($ = {}));
|
|
1620
|
-
//path.test.js.map
|
|
1621
|
-
;
|
|
1622
|
-
"use strict";
|
|
1623
|
-
var $;
|
|
1624
|
-
(function ($) {
|
|
1625
|
-
function $mol_diff_path(...paths) {
|
|
1626
|
-
const limit = Math.min(...paths.map(path => path.length));
|
|
1627
|
-
lookup: for (var i = 0; i < limit; ++i) {
|
|
1628
|
-
const first = paths[0][i];
|
|
1629
|
-
for (let j = 1; j < paths.length; ++j) {
|
|
1630
|
-
if (paths[j][i] !== first)
|
|
1631
|
-
break lookup;
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
return {
|
|
1635
|
-
prefix: paths[0].slice(0, i),
|
|
1636
|
-
suffix: paths.map(path => path.slice(i)),
|
|
1637
|
-
};
|
|
1638
|
-
}
|
|
1639
|
-
$.$mol_diff_path = $mol_diff_path;
|
|
1640
|
-
})($ || ($ = {}));
|
|
1641
|
-
//path.js.map
|
|
1642
|
-
;
|
|
1643
|
-
"use strict";
|
|
1644
|
-
var $;
|
|
1645
|
-
(function ($) {
|
|
1646
|
-
class $mol_error_mix extends Error {
|
|
1647
|
-
errors;
|
|
1648
|
-
constructor(message, ...errors) {
|
|
1649
|
-
super(message);
|
|
1650
|
-
this.errors = errors;
|
|
1651
|
-
if (errors.length) {
|
|
1652
|
-
const stacks = [...errors.map(error => error.stack), this.stack];
|
|
1653
|
-
const diff = $.$mol_diff_path(...stacks.map(stack => {
|
|
1654
|
-
if (!stack)
|
|
1655
|
-
return [];
|
|
1656
|
-
return stack.split('\n').reverse();
|
|
1657
|
-
}));
|
|
1658
|
-
const head = diff.prefix.reverse().join('\n');
|
|
1659
|
-
const tails = diff.suffix.map(path => path.reverse().map(line => line.replace(/^(?!\s+at)/, '\tat (.) ')).join('\n')).join('\n\tat (.) -----\n');
|
|
1660
|
-
this.stack = `Error: ${this.constructor.name}\n\tat (.) /"""\\\n${tails}\n\tat (.) \\___/\n${head}`;
|
|
1661
|
-
this.message += errors.map(error => '\n' + error.message).join('');
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
toJSON() {
|
|
1665
|
-
return this.message;
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
$.$mol_error_mix = $mol_error_mix;
|
|
1669
|
-
})($ || ($ = {}));
|
|
1670
|
-
//mix.js.map
|
|
1671
|
-
;
|
|
1672
|
-
"use strict";
|
|
1673
|
-
var $;
|
|
1674
1337
|
(function ($) {
|
|
1675
1338
|
class $mol_view_tree_test_attributes_super extends $.$mol_view {
|
|
1676
1339
|
some() {
|