mol_crypto_lib 0.0.210 → 0.0.211

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.test.js CHANGED
@@ -19,7 +19,7 @@ var $;
19
19
  (function ($) {
20
20
  })($ || ($ = {}));
21
21
  module.exports = $;
22
- //mam.js.map
22
+ //mam.ts
23
23
  ;
24
24
  "use strict";
25
25
  var $;
@@ -61,7 +61,7 @@ var $;
61
61
  }
62
62
  $.$mol_crypto_secret = $mol_crypto_secret;
63
63
  })($ || ($ = {}));
64
- //secret.js.map
64
+ //mol/crypto/secret/secret.ts
65
65
  ;
66
66
  "use strict";
67
67
  var $;
@@ -117,7 +117,7 @@ var $;
117
117
  $.$mol_crypto_cipher_private = $mol_crypto_cipher_private;
118
118
  $.$mol_crypto_cipher_ecrypted_size = 128;
119
119
  })($ || ($ = {}));
120
- //cipher.js.map
120
+ //mol/crypto/cipher/cipher.ts
121
121
  ;
122
122
  "use strict";
123
123
  var $;
@@ -173,7 +173,7 @@ var $;
173
173
  $.$mol_crypto_auditor_private = $mol_crypto_auditor_private;
174
174
  $.$mol_crypto_auditor_sign_size = 64;
175
175
  })($ || ($ = {}));
176
- //auditor.js.map
176
+ //mol/crypto/auditor/auditor.ts
177
177
  ;
178
178
  "use strict";
179
179
  var $;
@@ -183,7 +183,7 @@ var $;
183
183
  }
184
184
  $.$mol_crypto_salt = $mol_crypto_salt;
185
185
  })($ || ($ = {}));
186
- //salt.js.map
186
+ //mol/crypto/salt/salt.ts
187
187
  ;
188
188
  "use strict";
189
189
  var $;
@@ -193,7 +193,7 @@ var $;
193
193
  }
194
194
  $.$mol_fail = $mol_fail;
195
195
  })($ || ($ = {}));
196
- //fail.js.map
196
+ //mol/fail/fail.ts
197
197
  ;
198
198
  "use strict";
199
199
  var $;
@@ -203,7 +203,7 @@ var $;
203
203
  }
204
204
  $.$mol_fail_hidden = $mol_fail_hidden;
205
205
  })($ || ($ = {}));
206
- //hidden.js.map
206
+ //mol/fail/hidden/hidden.ts
207
207
  ;
208
208
  "use strict";
209
209
  var $;
@@ -213,7 +213,7 @@ var $;
213
213
  }
214
214
  $.$mol_test_complete = $mol_test_complete;
215
215
  })($ || ($ = {}));
216
- //test.node.test.js.map
216
+ //mol/test/test.node.test.ts
217
217
  ;
218
218
  "use strict";
219
219
  var $;
@@ -231,12 +231,18 @@ var $;
231
231
  $_1.$mol_test_all = [];
232
232
  async function $mol_test_run() {
233
233
  for (var test of $_1.$mol_test_all) {
234
- let context = Object.create($_1.$$);
234
+ let context = Object.create($$);
235
235
  for (let mock of $_1.$mol_test_mocks)
236
236
  await mock(context);
237
- await test(context);
237
+ const res = test(context);
238
+ if (res instanceof Promise) {
239
+ await new Promise((done, fail) => {
240
+ res.then(done, fail);
241
+ setTimeout(() => fail(new Error('Test timeout: ' + test.name)), 1000);
242
+ });
243
+ }
238
244
  }
239
- $_1.$$.$mol_log3_done({
245
+ $$.$mol_log3_done({
240
246
  place: '$mol_test',
241
247
  message: 'All tests passed',
242
248
  count: $_1.$mol_test_all.length,
@@ -254,7 +260,7 @@ var $;
254
260
  await $mol_test_run();
255
261
  }
256
262
  finally {
257
- $_1.$$.$mol_test_complete();
263
+ $$.$mol_test_complete();
258
264
  }
259
265
  }, 0);
260
266
  }
@@ -267,10 +273,10 @@ var $;
267
273
  for (let api of forbidden) {
268
274
  context[api] = new Proxy(function () { }, {
269
275
  get() {
270
- $_1.$mol_fail_hidden(new Error(`${api} is forbidden in tests`));
276
+ $mol_fail_hidden(new Error(`${api} is forbidden in tests`));
271
277
  },
272
278
  apply() {
273
- $_1.$mol_fail_hidden(new Error(`${api} is forbidden in tests`));
279
+ $mol_fail_hidden(new Error(`${api} is forbidden in tests`));
274
280
  },
275
281
  });
276
282
  }
@@ -298,16 +304,16 @@ var $;
298
304
  },
299
305
  });
300
306
  })($ || ($ = {}));
301
- //test.test.js.map
307
+ //mol/test/test.test.ts
302
308
  ;
303
309
  "use strict";
304
310
  var $;
305
311
  (function ($) {
306
312
  })($ || ($ = {}));
307
- //context.js.map
313
+ //mol/dom/context/context.ts
308
314
  ;
309
315
  "use strict";
310
- //node.js.map
316
+ //node/node.ts
311
317
  ;
312
318
  "use strict";
313
319
  var $node = new Proxy({ require }, {
@@ -346,14 +352,14 @@ var $node = new Proxy({ require }, {
346
352
  require = (req => Object.assign(function require(name) {
347
353
  return $node[name];
348
354
  }, req))(require);
349
- //node.node.js.map
355
+ //node/node.node.ts
350
356
  ;
351
357
  "use strict";
352
358
  var $;
353
359
  (function ($) {
354
360
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
355
361
  })($ || ($ = {}));
356
- //context.node.js.map
362
+ //mol/dom/context/context.node.ts
357
363
  ;
358
364
  "use strict";
359
365
  var $;
@@ -364,7 +370,7 @@ var $;
364
370
  for (let view of childNodes) {
365
371
  if (view == null)
366
372
  continue;
367
- if (view instanceof $.$mol_dom_context.Node) {
373
+ if (view instanceof $mol_dom_context.Node) {
368
374
  while (true) {
369
375
  if (!nextNode) {
370
376
  el.appendChild(view);
@@ -395,7 +401,7 @@ var $;
395
401
  nextNode = nextNode.nextSibling;
396
402
  }
397
403
  else {
398
- const textNode = $.$mol_dom_context.document.createTextNode(String(view));
404
+ const textNode = $mol_dom_context.document.createTextNode(String(view));
399
405
  el.insertBefore(textNode, nextNode);
400
406
  }
401
407
  }
@@ -408,88 +414,88 @@ var $;
408
414
  }
409
415
  $.$mol_dom_render_children = $mol_dom_render_children;
410
416
  })($ || ($ = {}));
411
- //children.js.map
417
+ //mol/dom/render/children/children.ts
412
418
  ;
413
419
  "use strict";
414
- //error.js.map
420
+ //mol/type/error/error.ts
415
421
  ;
416
422
  "use strict";
417
- //assert.test.js.map
423
+ //mol/type/assert/assert.test.ts
418
424
  ;
419
425
  "use strict";
420
- //assert.js.map
426
+ //mol/type/assert/assert.ts
421
427
  ;
422
428
  "use strict";
423
- //deep.test.js.map
429
+ //mol/type/partial/deep/deep.test.ts
424
430
  ;
425
431
  "use strict";
426
- //deep.js.map
432
+ //mol/type/partial/deep/deep.ts
427
433
  ;
428
434
  "use strict";
429
435
  var $;
430
436
  (function ($) {
431
- $.$mol_test({
437
+ $mol_test({
432
438
  'Make empty div'() {
433
- $.$mol_assert_equal(($.$mol_jsx("div", null)).outerHTML, '<div></div>');
439
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
434
440
  },
435
441
  'Define native field'() {
436
- const dom = $.$mol_jsx("input", { value: '123' });
437
- $.$mol_assert_equal(dom.outerHTML, '<input value="123">');
438
- $.$mol_assert_equal(dom.value, '123');
442
+ const dom = $mol_jsx("input", { value: '123' });
443
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
444
+ $mol_assert_equal(dom.value, '123');
439
445
  },
440
446
  'Define classes'() {
441
- const dom = $.$mol_jsx("div", { class: 'foo bar' });
442
- $.$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
447
+ const dom = $mol_jsx("div", { class: 'foo bar' });
448
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
443
449
  },
444
450
  'Define styles'() {
445
- const dom = $.$mol_jsx("div", { style: { color: 'red' } });
446
- $.$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
451
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
452
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
447
453
  },
448
454
  'Define dataset'() {
449
- const dom = $.$mol_jsx("div", { dataset: { foo: 'bar' } });
450
- $.$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
455
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
456
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
451
457
  },
452
458
  'Define attributes'() {
453
- const dom = $.$mol_jsx("div", { lang: "ru", hidden: true });
454
- $.$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
459
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
460
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
455
461
  },
456
462
  'Define child nodes'() {
457
- const dom = $.$mol_jsx("div", null,
463
+ const dom = $mol_jsx("div", null,
458
464
  "hello",
459
- $.$mol_jsx("strong", null, "world"),
465
+ $mol_jsx("strong", null, "world"),
460
466
  "!");
461
- $.$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
467
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
462
468
  },
463
469
  'Function as component'() {
464
470
  const Button = ({ hint }, target) => {
465
- return $.$mol_jsx("button", { title: hint }, target());
471
+ return $mol_jsx("button", { title: hint }, target());
466
472
  };
467
- const dom = $.$mol_jsx(Button, { id: "/foo", hint: "click me" }, () => 'hey!');
468
- $.$mol_assert_equal(dom.outerHTML, '<button title="click me" id="/foo">hey!</button>');
473
+ const dom = $mol_jsx(Button, { id: "/foo", hint: "click me" }, () => 'hey!');
474
+ $mol_assert_equal(dom.outerHTML, '<button title="click me" id="/foo">hey!</button>');
469
475
  },
470
476
  'Nested guid generation'() {
471
477
  const Foo = () => {
472
- return $.$mol_jsx("div", null,
473
- $.$mol_jsx(Bar, { id: "/bar" },
474
- $.$mol_jsx("img", { id: "/icon" })));
478
+ return $mol_jsx("div", null,
479
+ $mol_jsx(Bar, { id: "/bar" },
480
+ $mol_jsx("img", { id: "/icon" })));
475
481
  };
476
482
  const Bar = (props, icon) => {
477
- return $.$mol_jsx("span", null, icon);
483
+ return $mol_jsx("span", null, icon);
478
484
  };
479
- const dom = $.$mol_jsx(Foo, { id: "/foo" });
480
- $.$mol_assert_equal(dom.outerHTML, '<div id="/foo"><span id="/foo/bar"><img id="/foo/icon"></span></div>');
485
+ const dom = $mol_jsx(Foo, { id: "/foo" });
486
+ $mol_assert_equal(dom.outerHTML, '<div id="/foo"><span id="/foo/bar"><img id="/foo/icon"></span></div>');
481
487
  },
482
488
  'Fail on non unique ids'() {
483
489
  const App = () => {
484
- return $.$mol_jsx("div", null,
485
- $.$mol_jsx("span", { id: "/bar" }),
486
- $.$mol_jsx("span", { id: "/bar" }));
490
+ return $mol_jsx("div", null,
491
+ $mol_jsx("span", { id: "/bar" }),
492
+ $mol_jsx("span", { id: "/bar" }));
487
493
  };
488
- $.$mol_assert_fail(() => $.$mol_jsx(App, { id: "/foo" }), 'JSX already has tag with id "/bar"');
494
+ $mol_assert_fail(() => $mol_jsx(App, { id: "/foo" }), 'JSX already has tag with id "/bar"');
489
495
  },
490
496
  });
491
497
  })($ || ($ = {}));
492
- //jsx.test.js.map
498
+ //mol/jsx/jsx.test.tsx
493
499
  ;
494
500
  "use strict";
495
501
  var $;
@@ -498,15 +504,15 @@ var $;
498
504
  $.$mol_jsx_booked = null;
499
505
  $.$mol_jsx_document = {
500
506
  getElementById: () => null,
501
- createElementNS: (space, name) => $.$mol_dom_context.document.createElementNS(space, name),
502
- createDocumentFragment: () => $.$mol_dom_context.document.createDocumentFragment(),
507
+ createElementNS: (space, name) => $mol_dom_context.document.createElementNS(space, name),
508
+ createDocumentFragment: () => $mol_dom_context.document.createDocumentFragment(),
503
509
  };
504
510
  $.$mol_jsx_frag = '';
505
511
  function $mol_jsx(Elem, props, ...childNodes) {
506
512
  const id = props && props.id || '';
507
513
  if (Elem && $.$mol_jsx_booked) {
508
514
  if ($.$mol_jsx_booked.has(id)) {
509
- $.$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(id)}`));
515
+ $mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(id)}`));
510
516
  }
511
517
  else {
512
518
  $.$mol_jsx_booked.add(id);
@@ -545,7 +551,7 @@ var $;
545
551
  ? $.$mol_jsx_document.createElementNS(props?.xmlns ?? 'http://www.w3.org/1999/xhtml', Elem)
546
552
  : $.$mol_jsx_document.createDocumentFragment();
547
553
  }
548
- $.$mol_dom_render_children(node, [].concat(...childNodes));
554
+ $mol_dom_render_children(node, [].concat(...childNodes));
549
555
  if (!Elem)
550
556
  return node;
551
557
  for (const key in props) {
@@ -571,77 +577,77 @@ var $;
571
577
  }
572
578
  $.$mol_jsx = $mol_jsx;
573
579
  })($ || ($ = {}));
574
- //jsx.js.map
580
+ //mol/jsx/jsx.ts
575
581
  ;
576
582
  "use strict";
577
583
  var $;
578
584
  (function ($) {
579
- $.$mol_test({
585
+ $mol_test({
580
586
  'nulls & undefineds'() {
581
- $.$mol_assert_ok($.$mol_compare_deep(null, null));
582
- $.$mol_assert_ok($.$mol_compare_deep(undefined, undefined));
583
- $.$mol_assert_not($.$mol_compare_deep(undefined, null));
584
- $.$mol_assert_not($.$mol_compare_deep({}, null));
587
+ $mol_assert_ok($mol_compare_deep(null, null));
588
+ $mol_assert_ok($mol_compare_deep(undefined, undefined));
589
+ $mol_assert_not($mol_compare_deep(undefined, null));
590
+ $mol_assert_not($mol_compare_deep({}, null));
585
591
  },
586
592
  'number'() {
587
- $.$mol_assert_ok($.$mol_compare_deep(1, 1));
588
- $.$mol_assert_ok($.$mol_compare_deep(Number.NaN, Number.NaN));
589
- $.$mol_assert_not($.$mol_compare_deep(1, 2));
590
- $.$mol_assert_ok($.$mol_compare_deep(Object(1), Object(1)));
591
- $.$mol_assert_not($.$mol_compare_deep(Object(1), Object(2)));
593
+ $mol_assert_ok($mol_compare_deep(1, 1));
594
+ $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
595
+ $mol_assert_not($mol_compare_deep(1, 2));
596
+ $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
597
+ $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
592
598
  },
593
599
  'POJO'() {
594
- $.$mol_assert_ok($.$mol_compare_deep({}, {}));
595
- $.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { b: 2 }));
596
- $.$mol_assert_not($.$mol_compare_deep({ a: 1 }, { a: 2 }));
597
- $.$mol_assert_not($.$mol_compare_deep({}, { a: undefined }));
598
- $.$mol_assert_ok($.$mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
599
- $.$mol_assert_ok($.$mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
600
+ $mol_assert_ok($mol_compare_deep({}, {}));
601
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
602
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
603
+ $mol_assert_not($mol_compare_deep({}, { a: undefined }));
604
+ $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
605
+ $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
600
606
  },
601
607
  'Array'() {
602
- $.$mol_assert_ok($.$mol_compare_deep([], []));
603
- $.$mol_assert_ok($.$mol_compare_deep([1, [2]], [1, [2]]));
604
- $.$mol_assert_not($.$mol_compare_deep([1, 2], [1, 3]));
605
- $.$mol_assert_not($.$mol_compare_deep([1, 2,], [1, 3, undefined]));
608
+ $mol_assert_ok($mol_compare_deep([], []));
609
+ $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
610
+ $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
611
+ $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
606
612
  },
607
613
  'Non POJO are different'() {
608
614
  class Thing extends Object {
609
615
  }
610
- $.$mol_assert_not($.$mol_compare_deep(new Thing, new Thing));
611
- $.$mol_assert_not($.$mol_compare_deep(() => 1, () => 1));
612
- $.$mol_assert_not($.$mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
616
+ $mol_assert_not($mol_compare_deep(new Thing, new Thing));
617
+ $mol_assert_not($mol_compare_deep(() => 1, () => 1));
618
+ $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
613
619
  },
614
620
  'same POJOs with cyclic reference'() {
615
621
  const a = { foo: {} };
616
622
  a['self'] = a;
617
623
  const b = { foo: {} };
618
624
  b['self'] = b;
619
- $.$mol_assert_ok($.$mol_compare_deep(a, b));
625
+ $mol_assert_ok($mol_compare_deep(a, b));
620
626
  },
621
627
  'Date'() {
622
- $.$mol_assert_ok($.$mol_compare_deep(new Date(12345), new Date(12345)));
623
- $.$mol_assert_not($.$mol_compare_deep(new Date(12345), new Date(12346)));
628
+ $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
629
+ $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
624
630
  },
625
631
  'RegExp'() {
626
- $.$mol_assert_ok($.$mol_compare_deep(/\x22/mig, /\x22/mig));
627
- $.$mol_assert_not($.$mol_compare_deep(/\x22/mig, /\x21/mig));
628
- $.$mol_assert_not($.$mol_compare_deep(/\x22/mig, /\x22/mg));
632
+ $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
633
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
634
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
629
635
  },
630
636
  'Map'() {
631
- $.$mol_assert_ok($.$mol_compare_deep(new Map, new Map));
632
- $.$mol_assert_ok($.$mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
633
- $.$mol_assert_not($.$mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
634
- $.$mol_assert_not($.$mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
637
+ $mol_assert_ok($mol_compare_deep(new Map, new Map));
638
+ $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
639
+ $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
640
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
635
641
  },
636
642
  'Set'() {
637
- $.$mol_assert_ok($.$mol_compare_deep(new Set, new Set));
638
- $.$mol_assert_ok($.$mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
639
- $.$mol_assert_not($.$mol_compare_deep(new Set([1]), new Set([2])));
643
+ $mol_assert_ok($mol_compare_deep(new Set, new Set));
644
+ $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
645
+ $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
640
646
  },
641
647
  'Uint8Array'() {
642
- $.$mol_assert_ok($.$mol_compare_deep(new Uint8Array, new Uint8Array));
643
- $.$mol_assert_ok($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
644
- $.$mol_assert_not($.$mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
648
+ $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
649
+ $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
650
+ $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
645
651
  },
646
652
  'Custom comparator'() {
647
653
  class User {
@@ -655,17 +661,17 @@ var $;
655
661
  return this.name;
656
662
  }
657
663
  }
658
- $.$mol_assert_ok($.$mol_compare_deep(new User('Jin'), new User('Jin')));
659
- $.$mol_assert_not($.$mol_compare_deep(new User('Jin'), new User('John')));
664
+ $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
665
+ $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
660
666
  },
661
667
  });
662
668
  })($ || ($ = {}));
663
- //deep.test.js.map
669
+ //mol/compare/deep/deep.test.tsx
664
670
  ;
665
671
  "use strict";
666
672
  var $;
667
673
  (function ($) {
668
- let cache = new WeakMap();
674
+ $.$mol_compare_deep_cache = new WeakMap();
669
675
  function $mol_compare_deep(left, right) {
670
676
  if (Object.is(left, right))
671
677
  return true;
@@ -691,7 +697,7 @@ var $;
691
697
  return Object.is(left.valueOf(), right['valueOf']());
692
698
  if (left instanceof RegExp)
693
699
  return left.source === right['source'] && left.flags === right['flags'];
694
- let left_cache = cache.get(left);
700
+ let left_cache = $.$mol_compare_deep_cache.get(left);
695
701
  if (left_cache) {
696
702
  const right_cache = left_cache.get(right);
697
703
  if (typeof right_cache === 'boolean')
@@ -699,7 +705,7 @@ var $;
699
705
  }
700
706
  else {
701
707
  left_cache = new WeakMap([[right, true]]);
702
- cache.set(left, left_cache);
708
+ $.$mol_compare_deep_cache.set(left, left_cache);
703
709
  }
704
710
  let result;
705
711
  try {
@@ -783,50 +789,50 @@ var $;
783
789
  return Object.is(left[Symbol.toPrimitive]('default'), right[Symbol.toPrimitive]('default'));
784
790
  }
785
791
  })($ || ($ = {}));
786
- //deep.js.map
792
+ //mol/compare/deep/deep.ts
787
793
  ;
788
794
  "use strict";
789
795
  var $;
790
796
  (function ($) {
791
797
  function $mol_dom_serialize(node) {
792
- const serializer = new $.$mol_dom_context.XMLSerializer;
798
+ const serializer = new $mol_dom_context.XMLSerializer;
793
799
  return serializer.serializeToString(node);
794
800
  }
795
801
  $.$mol_dom_serialize = $mol_dom_serialize;
796
802
  })($ || ($ = {}));
797
- //serialize.js.map
803
+ //mol/dom/serialize/serialize.ts
798
804
  ;
799
805
  "use strict";
800
806
  var $;
801
807
  (function ($) {
802
- $.$mol_test({
808
+ $mol_test({
803
809
  'must be false'() {
804
- $.$mol_assert_not(0);
810
+ $mol_assert_not(0);
805
811
  },
806
812
  'must be true'() {
807
- $.$mol_assert_ok(1);
813
+ $mol_assert_ok(1);
808
814
  },
809
815
  'two must be equal'() {
810
- $.$mol_assert_equal(2, 2);
816
+ $mol_assert_equal(2, 2);
811
817
  },
812
818
  'three must be equal'() {
813
- $.$mol_assert_equal(2, 2, 2);
819
+ $mol_assert_equal(2, 2, 2);
814
820
  },
815
821
  'two must be unique'() {
816
- $.$mol_assert_unique([3], [3]);
822
+ $mol_assert_unique([3], [3]);
817
823
  },
818
824
  'three must be unique'() {
819
- $.$mol_assert_unique([3], [3], [3]);
825
+ $mol_assert_unique([3], [3], [3]);
820
826
  },
821
827
  'two must be alike'() {
822
- $.$mol_assert_like([3], [3]);
828
+ $mol_assert_like([3], [3]);
823
829
  },
824
830
  'three must be alike'() {
825
- $.$mol_assert_like([3], [3], [3]);
831
+ $mol_assert_like([3], [3], [3]);
826
832
  },
827
833
  });
828
834
  })($ || ($ = {}));
829
- //assert.test.js.map
835
+ //mol/assert/assert.test.ts
830
836
  ;
831
837
  "use strict";
832
838
  var $;
@@ -834,13 +840,13 @@ var $;
834
840
  function $mol_assert_ok(value) {
835
841
  if (value)
836
842
  return;
837
- $.$mol_fail(new Error(`${value} ≠ true`));
843
+ $mol_fail(new Error(`${value} ≠ true`));
838
844
  }
839
845
  $.$mol_assert_ok = $mol_assert_ok;
840
846
  function $mol_assert_not(value) {
841
847
  if (!value)
842
848
  return;
843
- $.$mol_fail(new Error(`${value} ≠ false`));
849
+ $mol_fail(new Error(`${value} ≠ false`));
844
850
  }
845
851
  $.$mol_assert_not = $mol_assert_not;
846
852
  function $mol_assert_fail(handler, ErrorRight) {
@@ -864,7 +870,7 @@ var $;
864
870
  finally {
865
871
  $.$mol_fail = fail;
866
872
  }
867
- $.$mol_fail(new Error('Not failed'));
873
+ $mol_fail(new Error('Not failed'));
868
874
  }
869
875
  $.$mol_assert_fail = $mol_assert_fail;
870
876
  function $mol_assert_equal(...args) {
@@ -875,7 +881,7 @@ var $;
875
881
  if (Number.isNaN(args[i]) && Number.isNaN(args[j]))
876
882
  continue;
877
883
  if (args[i] !== args[j])
878
- $.$mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
884
+ $mol_fail(new Error(`Not equal (${i + 1}:${j + 1})\n${args[i]}\n${args[j]}`));
879
885
  }
880
886
  }
881
887
  }
@@ -886,7 +892,7 @@ var $;
886
892
  if (i === j)
887
893
  continue;
888
894
  if (args[i] === args[j] || (Number.isNaN(args[i]) && Number.isNaN(args[j]))) {
889
- $.$mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
895
+ $mol_fail(new Error(`args[${i}] = args[${j}] = ${args[i]}`));
890
896
  }
891
897
  }
892
898
  }
@@ -894,7 +900,7 @@ var $;
894
900
  $.$mol_assert_unique = $mol_assert_unique;
895
901
  function $mol_assert_like(head, ...tail) {
896
902
  for (let [index, value] of Object.entries(tail)) {
897
- if (!$.$mol_compare_deep(value, head)) {
903
+ if (!$mol_compare_deep(value, head)) {
898
904
  const print = (val) => {
899
905
  if (!val)
900
906
  return val;
@@ -910,118 +916,118 @@ var $;
910
916
  return val;
911
917
  }
912
918
  };
913
- return $.$mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
919
+ return $mol_fail(new Error(`Not like (1:${+index + 2})\n${print(head)}\n---\n${print(value)}`));
914
920
  }
915
921
  }
916
922
  }
917
923
  $.$mol_assert_like = $mol_assert_like;
918
924
  function $mol_assert_dom(left, right) {
919
- $mol_assert_equal($.$mol_dom_serialize(left), $.$mol_dom_serialize(right));
925
+ $mol_assert_equal($mol_dom_serialize(left), $mol_dom_serialize(right));
920
926
  }
921
927
  $.$mol_assert_dom = $mol_assert_dom;
922
928
  })($ || ($ = {}));
923
- //assert.js.map
929
+ //mol/assert/assert.ts
924
930
  ;
925
931
  "use strict";
926
932
  var $;
927
933
  (function ($) {
928
- $.$mol_test({
934
+ $mol_test({
929
935
  async 'sizes'() {
930
- const cipher = await $.$mol_crypto_secret.generate();
936
+ const cipher = await $mol_crypto_secret.generate();
931
937
  const key = await cipher.serial();
932
- $.$mol_assert_equal(key.byteLength, $.$mol_crypto_secret.size);
938
+ $mol_assert_equal(key.byteLength, $mol_crypto_secret.size);
933
939
  const data = new Uint8Array([1, 2, 3]);
934
- const salt = $.$mol_crypto_salt();
940
+ const salt = $mol_crypto_salt();
935
941
  const closed = await cipher.encrypt(data, salt);
936
- $.$mol_assert_equal(closed.byteLength, data.byteLength + $.$mol_crypto_secret.extra);
942
+ $mol_assert_equal(closed.byteLength, data.byteLength + $mol_crypto_secret.extra);
937
943
  },
938
944
  async 'decrypt self encrypted with auto generated key'() {
939
- const cipher = await $.$mol_crypto_secret.generate();
945
+ const cipher = await $mol_crypto_secret.generate();
940
946
  const data = new Uint8Array([1, 2, 3]);
941
- const salt = $.$mol_crypto_salt();
947
+ const salt = $mol_crypto_salt();
942
948
  const closed = await cipher.encrypt(data, salt);
943
949
  const opened = await cipher.decrypt(closed, salt);
944
- $.$mol_assert_like(data, new Uint8Array(opened));
950
+ $mol_assert_like(data, new Uint8Array(opened));
945
951
  },
946
952
  async 'decrypt encrypted with exported auto generated key'() {
947
953
  const data = new Uint8Array([1, 2, 3]);
948
- const salt = $.$mol_crypto_salt();
949
- const Alice = await $.$mol_crypto_secret.generate();
954
+ const salt = $mol_crypto_salt();
955
+ const Alice = await $mol_crypto_secret.generate();
950
956
  const closed = await Alice.encrypt(data, salt);
951
- const Bob = await $.$mol_crypto_secret.from(await Alice.serial());
957
+ const Bob = await $mol_crypto_secret.from(await Alice.serial());
952
958
  const opened = await Bob.decrypt(closed, salt);
953
- $.$mol_assert_like(data, new Uint8Array(opened));
959
+ $mol_assert_like(data, new Uint8Array(opened));
954
960
  },
955
961
  });
956
962
  })($ || ($ = {}));
957
- //secret.test.js.map
963
+ //mol/crypto/secret/secret.test.ts
958
964
  ;
959
965
  "use strict";
960
966
  var $;
961
967
  (function ($) {
962
- $.$mol_test({
968
+ $mol_test({
963
969
  async 'sizes'() {
964
- const pair = await $.$$.$mol_crypto_cipher_pair();
970
+ const pair = await $$.$mol_crypto_cipher_pair();
965
971
  const key_private = await pair.private.serial();
966
- $.$mol_assert_ok(key_private.byteLength > 630);
967
- $.$mol_assert_ok(key_private.byteLength < 640);
972
+ $mol_assert_ok(key_private.byteLength > 630);
973
+ $mol_assert_ok(key_private.byteLength < 640);
968
974
  const key_public = await pair.public.serial();
969
- $.$mol_assert_equal(key_public.byteLength, $.$mol_crypto_cipher_public.size);
975
+ $mol_assert_equal(key_public.byteLength, $mol_crypto_cipher_public.size);
970
976
  const data = new Uint8Array([1, 2, 3]);
971
977
  const closed = await pair.public.encrypt(data);
972
- $.$mol_assert_equal(closed.byteLength, $.$mol_crypto_cipher_ecrypted_size);
978
+ $mol_assert_equal(closed.byteLength, $mol_crypto_cipher_ecrypted_size);
973
979
  },
974
980
  async 'decrypt self encrypted with auto generated key'() {
975
- const pair = await $.$$.$mol_crypto_cipher_pair();
981
+ const pair = await $$.$mol_crypto_cipher_pair();
976
982
  const data = new Uint8Array([1, 2, 3]);
977
983
  const closed = await pair.public.encrypt(data);
978
984
  const opened = await pair.private.decrypt(closed);
979
- $.$mol_assert_like(data, new Uint8Array(opened));
985
+ $mol_assert_like(data, new Uint8Array(opened));
980
986
  },
981
987
  async 'decrypt encrypted with exported auto generated key'() {
982
- const pair = await $.$$.$mol_crypto_cipher_pair();
988
+ const pair = await $$.$mol_crypto_cipher_pair();
983
989
  const data = new Uint8Array([1, 2, 3]);
984
- const Alice = await $.$mol_crypto_cipher_public.from(await pair.public.serial());
990
+ const Alice = await $mol_crypto_cipher_public.from(await pair.public.serial());
985
991
  const closed = await Alice.encrypt(data);
986
- const Bob = await $.$mol_crypto_cipher_private.from(await pair.private.serial());
992
+ const Bob = await $mol_crypto_cipher_private.from(await pair.private.serial());
987
993
  const opened = await Bob.decrypt(closed);
988
- $.$mol_assert_like(data, new Uint8Array(opened));
994
+ $mol_assert_like(data, new Uint8Array(opened));
989
995
  },
990
996
  });
991
997
  })($ || ($ = {}));
992
- //cipher.test.js.map
998
+ //mol/crypto/cipher/cipher.test.ts
993
999
  ;
994
1000
  "use strict";
995
1001
  var $;
996
1002
  (function ($) {
997
- $.$mol_test({
1003
+ $mol_test({
998
1004
  async 'sizes'() {
999
- const pair = await $.$$.$mol_crypto_auditor_pair();
1005
+ const pair = await $$.$mol_crypto_auditor_pair();
1000
1006
  const key_private = await pair.private.serial();
1001
- $.$mol_assert_equal(key_private.byteLength, $.$mol_crypto_auditor_private.size);
1007
+ $mol_assert_equal(key_private.byteLength, $mol_crypto_auditor_private.size);
1002
1008
  const key_public = await pair.public.serial();
1003
- $.$mol_assert_equal(key_public.byteLength, $.$mol_crypto_auditor_public.size);
1009
+ $mol_assert_equal(key_public.byteLength, $mol_crypto_auditor_public.size);
1004
1010
  const data = new Uint8Array([1, 2, 3]);
1005
1011
  const sign = await pair.private.sign(data);
1006
- $.$mol_assert_equal(sign.byteLength, $.$mol_crypto_auditor_sign_size);
1012
+ $mol_assert_equal(sign.byteLength, $mol_crypto_auditor_sign_size);
1007
1013
  },
1008
1014
  async 'verify self signed with auto generated key'() {
1009
- const auditor = await $.$$.$mol_crypto_auditor_pair();
1015
+ const auditor = await $$.$mol_crypto_auditor_pair();
1010
1016
  const data = new Uint8Array([1, 2, 3]);
1011
1017
  const sign = await auditor.private.sign(data);
1012
- $.$mol_assert_ok(await auditor.public.verify(data, sign));
1018
+ $mol_assert_ok(await auditor.public.verify(data, sign));
1013
1019
  },
1014
1020
  async 'verify signed with exported auto generated key'() {
1015
- const pair = await $.$$.$mol_crypto_auditor_pair();
1021
+ const pair = await $$.$mol_crypto_auditor_pair();
1016
1022
  const data = new Uint8Array([1, 2, 3]);
1017
- const Alice = await $.$mol_crypto_auditor_private.from(await pair.private.serial());
1023
+ const Alice = await $mol_crypto_auditor_private.from(await pair.private.serial());
1018
1024
  const sign = await Alice.sign(data);
1019
- const Bob = await $.$mol_crypto_auditor_public.from(await pair.public.serial());
1020
- $.$mol_assert_ok(await Bob.verify(data, sign));
1025
+ const Bob = await $mol_crypto_auditor_public.from(await pair.public.serial());
1026
+ $mol_assert_ok(await Bob.verify(data, sign));
1021
1027
  },
1022
1028
  });
1023
1029
  })($ || ($ = {}));
1024
- //auditor.test.js.map
1030
+ //mol/crypto/auditor/auditor.test.ts
1025
1031
  ;
1026
1032
  "use strict";
1027
1033
  var $;
@@ -1045,7 +1051,7 @@ var $;
1045
1051
  $.$mol_log3_area_lazy = $mol_log3_area_lazy;
1046
1052
  $.$mol_log3_stack = [];
1047
1053
  })($ || ($ = {}));
1048
- //log3.js.map
1054
+ //mol/log3/log3.ts
1049
1055
  ;
1050
1056
  "use strict";
1051
1057
  var $;
@@ -1073,12 +1079,12 @@ var $;
1073
1079
  $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', 'magenta');
1074
1080
  $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', 'cyan');
1075
1081
  })($ || ($ = {}));
1076
- //log3.node.js.map
1082
+ //mol/log3/log3.node.ts
1077
1083
  ;
1078
1084
  "use strict";
1079
1085
  var $;
1080
1086
  (function ($_1) {
1081
- $_1.$mol_test_mocks.push($ => {
1087
+ $mol_test_mocks.push($ => {
1082
1088
  $.$mol_log3_come = () => { };
1083
1089
  $.$mol_log3_done = () => { };
1084
1090
  $.$mol_log3_fail = () => { };
@@ -1087,7 +1093,7 @@ var $;
1087
1093
  $.$mol_log3_area = () => () => { };
1088
1094
  });
1089
1095
  })($ || ($ = {}));
1090
- //log3.test.js.map
1096
+ //mol/log3/log3.test.ts
1091
1097
  ;
1092
1098
  "use strict";
1093
1099
  var $;
@@ -1097,7 +1103,7 @@ var $;
1097
1103
  }
1098
1104
  $.$mol_env = $mol_env;
1099
1105
  })($ || ($ = {}));
1100
- //env.js.map
1106
+ //mol/env/env.ts
1101
1107
  ;
1102
1108
  "use strict";
1103
1109
  var $;
@@ -1106,7 +1112,7 @@ var $;
1106
1112
  return this.process.env;
1107
1113
  };
1108
1114
  })($ || ($ = {}));
1109
- //env.node.js.map
1115
+ //mol/env/env.node.ts
1110
1116
  ;
1111
1117
  "use strict";
1112
1118
  var $;
@@ -1126,14 +1132,14 @@ var $;
1126
1132
  env: this.$mol_env(),
1127
1133
  });
1128
1134
  if (res.status || res.error)
1129
- return $.$mol_fail(res.error || new Error(res.stderr.toString()));
1135
+ return $mol_fail(res.error || new Error(res.stderr.toString()));
1130
1136
  if (!res.stdout)
1131
1137
  res.stdout = Buffer.from([]);
1132
1138
  return res;
1133
1139
  }
1134
1140
  $.$mol_exec = $mol_exec;
1135
1141
  })($ || ($ = {}));
1136
- //exec.node.js.map
1142
+ //mol/exec/exec.node.ts
1137
1143
  ;
1138
1144
  "use strict";
1139
1145
  var $;
@@ -1144,29 +1150,29 @@ var $;
1144
1150
  }
1145
1151
  $.$mol_ambient = $mol_ambient;
1146
1152
  })($ || ($ = {}));
1147
- //ambient.js.map
1153
+ //mol/ambient/ambient.ts
1148
1154
  ;
1149
1155
  "use strict";
1150
1156
  var $;
1151
1157
  (function ($) {
1152
- $.$mol_test({
1158
+ $mol_test({
1153
1159
  'get'() {
1154
- const proxy = $.$mol_delegate({}, () => ({ foo: 777 }));
1155
- $.$mol_assert_equal(proxy.foo, 777);
1160
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1161
+ $mol_assert_equal(proxy.foo, 777);
1156
1162
  },
1157
1163
  'has'() {
1158
- const proxy = $.$mol_delegate({}, () => ({ foo: 777 }));
1159
- $.$mol_assert_equal('foo' in proxy, true);
1164
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1165
+ $mol_assert_equal('foo' in proxy, true);
1160
1166
  },
1161
1167
  'set'() {
1162
1168
  const target = { foo: 777 };
1163
- const proxy = $.$mol_delegate({}, () => target);
1169
+ const proxy = $mol_delegate({}, () => target);
1164
1170
  proxy.foo = 123;
1165
- $.$mol_assert_equal(target.foo, 123);
1171
+ $mol_assert_equal(target.foo, 123);
1166
1172
  },
1167
1173
  'getOwnPropertyDescriptor'() {
1168
- const proxy = $.$mol_delegate({}, () => ({ foo: 777 }));
1169
- $.$mol_assert_like(Object.getOwnPropertyDescriptor(proxy, 'foo'), {
1174
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1175
+ $mol_assert_like(Object.getOwnPropertyDescriptor(proxy, 'foo'), {
1170
1176
  value: 777,
1171
1177
  writable: true,
1172
1178
  enumerable: true,
@@ -1174,40 +1180,40 @@ var $;
1174
1180
  });
1175
1181
  },
1176
1182
  'ownKeys'() {
1177
- const proxy = $.$mol_delegate({}, () => ({ foo: 777, [Symbol.toStringTag]: 'bar' }));
1178
- $.$mol_assert_like(Reflect.ownKeys(proxy), ['foo', Symbol.toStringTag]);
1183
+ const proxy = $mol_delegate({}, () => ({ foo: 777, [Symbol.toStringTag]: 'bar' }));
1184
+ $mol_assert_like(Reflect.ownKeys(proxy), ['foo', Symbol.toStringTag]);
1179
1185
  },
1180
1186
  'getPrototypeOf'() {
1181
1187
  class Foo {
1182
1188
  }
1183
- const proxy = $.$mol_delegate({}, () => new Foo);
1184
- $.$mol_assert_equal(Object.getPrototypeOf(proxy), Foo.prototype);
1189
+ const proxy = $mol_delegate({}, () => new Foo);
1190
+ $mol_assert_equal(Object.getPrototypeOf(proxy), Foo.prototype);
1185
1191
  },
1186
1192
  'setPrototypeOf'() {
1187
1193
  class Foo {
1188
1194
  }
1189
1195
  const target = {};
1190
- const proxy = $.$mol_delegate({}, () => target);
1196
+ const proxy = $mol_delegate({}, () => target);
1191
1197
  Object.setPrototypeOf(proxy, Foo.prototype);
1192
- $.$mol_assert_equal(Object.getPrototypeOf(target), Foo.prototype);
1198
+ $mol_assert_equal(Object.getPrototypeOf(target), Foo.prototype);
1193
1199
  },
1194
1200
  'instanceof'() {
1195
1201
  class Foo {
1196
1202
  }
1197
- const proxy = $.$mol_delegate({}, () => new Foo);
1198
- $.$mol_assert_ok(proxy instanceof Foo);
1199
- $.$mol_assert_ok(proxy instanceof $.$mol_delegate);
1203
+ const proxy = $mol_delegate({}, () => new Foo);
1204
+ $mol_assert_ok(proxy instanceof Foo);
1205
+ $mol_assert_ok(proxy instanceof $mol_delegate);
1200
1206
  },
1201
1207
  'autobind'() {
1202
1208
  class Foo {
1203
1209
  }
1204
- const proxy = $.$mol_delegate({}, () => new Foo);
1205
- $.$mol_assert_ok(proxy instanceof Foo);
1206
- $.$mol_assert_ok(proxy instanceof $.$mol_delegate);
1210
+ const proxy = $mol_delegate({}, () => new Foo);
1211
+ $mol_assert_ok(proxy instanceof Foo);
1212
+ $mol_assert_ok(proxy instanceof $mol_delegate);
1207
1213
  },
1208
1214
  });
1209
1215
  })($ || ($ = {}));
1210
- //delegate.test.js.map
1216
+ //mol/delegate/delegate.test.ts
1211
1217
  ;
1212
1218
  "use strict";
1213
1219
  var $;
@@ -1244,7 +1250,7 @@ var $;
1244
1250
  value: (obj) => instances.has(obj),
1245
1251
  });
1246
1252
  })($ || ($ = {}));
1247
- //delegate.js.map
1253
+ //mol/delegate/delegate.ts
1248
1254
  ;
1249
1255
  "use strict";
1250
1256
  var $;
@@ -1256,7 +1262,7 @@ var $;
1256
1262
  return false;
1257
1263
  if (typeof having !== 'object')
1258
1264
  return false;
1259
- if (having instanceof $.$mol_delegate)
1265
+ if (having instanceof $mol_delegate)
1260
1266
  return false;
1261
1267
  if (typeof having['destructor'] !== 'function')
1262
1268
  return false;
@@ -1300,30 +1306,30 @@ var $;
1300
1306
  }
1301
1307
  $.$mol_owning_catch = $mol_owning_catch;
1302
1308
  })($ || ($ = {}));
1303
- //owning.js.map
1309
+ //mol/owning/owning.ts
1304
1310
  ;
1305
1311
  "use strict";
1306
- //writable.test.js.map
1312
+ //mol/type/writable/writable.test.ts
1307
1313
  ;
1308
1314
  "use strict";
1309
- //writable.js.map
1315
+ //mol/type/writable/writable.ts
1310
1316
  ;
1311
1317
  "use strict";
1312
1318
  var $;
1313
1319
  (function ($) {
1314
1320
  class $mol_object2 {
1315
1321
  static $ = $;
1316
- [$.$mol_ambient_ref] = null;
1322
+ [$mol_ambient_ref] = null;
1317
1323
  get $() {
1318
- if (this[$.$mol_ambient_ref])
1319
- return this[$.$mol_ambient_ref];
1320
- const owner = $.$mol_owning_get(this);
1321
- return this[$.$mol_ambient_ref] = owner?.$ || $mol_object2.$;
1324
+ if (this[$mol_ambient_ref])
1325
+ return this[$mol_ambient_ref];
1326
+ const owner = $mol_owning_get(this);
1327
+ return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
1322
1328
  }
1323
1329
  set $(next) {
1324
- if (this[$.$mol_ambient_ref])
1325
- $.$mol_fail_hidden(new Error('Context already defined'));
1326
- this[$.$mol_ambient_ref] = next;
1330
+ if (this[$mol_ambient_ref])
1331
+ $mol_fail_hidden(new Error('Context already defined'));
1332
+ this[$mol_ambient_ref] = next;
1327
1333
  }
1328
1334
  static create(init) {
1329
1335
  const obj = new this;
@@ -1349,7 +1355,7 @@ var $;
1349
1355
  }
1350
1356
  $.$mol_object2 = $mol_object2;
1351
1357
  })($ || ($ = {}));
1352
- //object2.js.map
1358
+ //mol/object2/object2.ts
1353
1359
  ;
1354
1360
  "use strict";
1355
1361
  var $;
@@ -1360,7 +1366,7 @@ var $;
1360
1366
  let warned = false;
1361
1367
  descr.value = function $mol_deprecated_wrapper(...args) {
1362
1368
  if (!warned) {
1363
- $.$$.$mol_log3_warn({
1369
+ $$.$mol_log3_warn({
1364
1370
  place: `${host.constructor.name}::${field}`,
1365
1371
  message: `Deprecated`,
1366
1372
  hint: message,
@@ -1373,54 +1379,54 @@ var $;
1373
1379
  }
1374
1380
  $.$mol_deprecated = $mol_deprecated;
1375
1381
  })($ || ($ = {}));
1376
- //deprecated.js.map
1382
+ //mol/deprecated/deprecated.ts
1377
1383
  ;
1378
1384
  "use strict";
1379
1385
  var $;
1380
1386
  (function ($_1) {
1381
- $_1.$mol_test({
1387
+ $mol_test({
1382
1388
  'tree parsing'() {
1383
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("foo\nbar\n").sub.length, 2);
1384
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("foo\nbar\n").sub[1].type, "bar");
1385
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("foo\n\n\n").sub.length, 1);
1386
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("=foo\n\\bar\n").sub.length, 2);
1387
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
1388
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
1389
- $_1.$mol_assert_equal($_1.$mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
1390
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
1389
+ $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub.length, 2);
1390
+ $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub[1].type, "bar");
1391
+ $mol_assert_equal($mol_tree.fromString("foo\n\n\n").sub.length, 1);
1392
+ $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub.length, 2);
1393
+ $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
1394
+ $mol_assert_equal($mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
1395
+ $mol_assert_equal($mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
1396
+ $mol_assert_equal($mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
1391
1397
  },
1392
1398
  'inserting'() {
1393
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b c d').insert(new $_1.$mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
1394
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b').insert(new $_1.$mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
1395
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b c d').insert(new $_1.$mol_tree, 0, 0, 0).toString(), 'a b \\\n');
1396
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b').insert(new $_1.$mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
1397
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b c d').insert(new $_1.$mol_tree, null, null, null).toString(), 'a b \\\n');
1398
- $_1.$mol_assert_equal($_1.$mol_tree.fromString('a b').insert(new $_1.$mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
1399
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
1400
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
1401
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 0, 0, 0).toString(), 'a b \\\n');
1402
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
1403
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, null, null, null).toString(), 'a b \\\n');
1404
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
1399
1405
  },
1400
1406
  'fromJSON'() {
1401
- $_1.$mol_assert_equal($_1.$mol_tree.fromJSON([]).toString(), '/\n');
1402
- $_1.$mol_assert_equal($_1.$mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
1403
- $_1.$mol_assert_equal($_1.$mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
1404
- $_1.$mol_assert_equal($_1.$mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
1405
- $_1.$mol_assert_equal($_1.$mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
1407
+ $mol_assert_equal($mol_tree.fromJSON([]).toString(), '/\n');
1408
+ $mol_assert_equal($mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
1409
+ $mol_assert_equal($mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
1410
+ $mol_assert_equal($mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
1411
+ $mol_assert_equal($mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
1406
1412
  },
1407
1413
  'toJSON'() {
1408
- $_1.$mol_assert_equal(JSON.stringify($_1.$mol_tree.fromString('/\n').sub[0]), '[]');
1409
- $_1.$mol_assert_equal(JSON.stringify($_1.$mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
1410
- $_1.$mol_assert_equal(JSON.stringify($_1.$mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
1411
- $_1.$mol_assert_equal(JSON.stringify($_1.$mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
1412
- $_1.$mol_assert_equal(JSON.stringify($_1.$mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
1414
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n').sub[0]), '[]');
1415
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
1416
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
1417
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
1418
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
1413
1419
  },
1414
1420
  'hack'() {
1415
- const res = $_1.$mol_tree.fromString(`foo bar xxx`).hack({
1421
+ const res = $mol_tree.fromString(`foo bar xxx`).hack({
1416
1422
  '': (tree, context) => [tree.hack(context)],
1417
1423
  'bar': (tree, context) => [tree.hack(context).clone({ type: '777' })],
1418
1424
  });
1419
- $_1.$mol_assert_equal(res.toString(), new $_1.$mol_tree({ type: 'foo 777 xxx' }).toString());
1425
+ $mol_assert_equal(res.toString(), new $mol_tree({ type: 'foo 777 xxx' }).toString());
1420
1426
  },
1421
1427
  'errors handling'($) {
1422
1428
  const errors = [];
1423
- class Tree extends $_1.$mol_tree {
1429
+ class Tree extends $mol_tree {
1424
1430
  static $ = $.$mol_ambient({
1425
1431
  $mol_fail: error => errors.push(error.message)
1426
1432
  });
@@ -1429,17 +1435,17 @@ var $;
1429
1435
  \t \tfoo
1430
1436
  bar \\data
1431
1437
  `, 'test');
1432
- $_1.$mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
1438
+ $mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
1433
1439
  },
1434
1440
  });
1435
1441
  })($ || ($ = {}));
1436
- //tree.test.js.map
1442
+ //mol/tree/tree.test.ts
1437
1443
  ;
1438
1444
  "use strict";
1439
1445
  var $;
1440
1446
  (function ($) {
1441
1447
  $.$mol_tree_convert = Symbol('$mol_tree_convert');
1442
- class $mol_tree extends $.$mol_object2 {
1448
+ class $mol_tree extends $mol_object2 {
1443
1449
  type;
1444
1450
  data;
1445
1451
  sub;
@@ -1752,7 +1758,7 @@ var $;
1752
1758
  const sub = [].concat(...this.sub.map(child => {
1753
1759
  const handle = context[child.type] || context[''];
1754
1760
  if (!handle)
1755
- $.$mol_fail(child.error('Handler not defined'));
1761
+ $mol_fail(child.error('Handler not defined'));
1756
1762
  return handle(child, context);
1757
1763
  }));
1758
1764
  return this.clone({ sub });
@@ -1762,16 +1768,16 @@ var $;
1762
1768
  }
1763
1769
  }
1764
1770
  __decorate([
1765
- $.$mol_deprecated('Use $mol_tree:hack')
1771
+ $mol_deprecated('Use $mol_tree:hack')
1766
1772
  ], $mol_tree.prototype, "transform", null);
1767
1773
  $.$mol_tree = $mol_tree;
1768
1774
  })($ || ($ = {}));
1769
- //tree.js.map
1775
+ //mol/tree/tree.ts
1770
1776
  ;
1771
1777
  "use strict";
1772
- //equals.test.js.map
1778
+ //mol/type/equals/equals.test.ts
1773
1779
  ;
1774
1780
  "use strict";
1775
- //equals.js.map
1781
+ //mol/type/equals/equals.ts
1776
1782
 
1777
1783
  //# sourceMappingURL=node.test.js.map