mol_dump_lib 0.0.807 → 0.0.809
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 +355 -316
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +3396 -3242
- package/node.js.map +1 -1
- package/node.mjs +3396 -3242
- package/node.test.js +3667 -3491
- package/node.test.js.map +1 -1
- package/package.json +31 -28
- package/web.d.ts +173 -127
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +901 -704
- package/web.js.map +1 -1
- package/web.mjs +901 -704
- package/web.test.js +719 -664
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -275,64 +275,136 @@ var $;
|
|
|
275
275
|
$.$mol_style_prop = $mol_style_prop;
|
|
276
276
|
})($ || ($ = {}));
|
|
277
277
|
|
|
278
|
+
;
|
|
279
|
+
"use strict";
|
|
280
|
+
|
|
278
281
|
;
|
|
279
282
|
"use strict";
|
|
280
283
|
var $;
|
|
281
284
|
(function ($) {
|
|
282
|
-
$.$
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
'special',
|
|
288
|
-
'text',
|
|
289
|
-
'control',
|
|
290
|
-
'shade',
|
|
291
|
-
'line',
|
|
292
|
-
'focus',
|
|
293
|
-
'field',
|
|
294
|
-
'image',
|
|
295
|
-
'spirit',
|
|
296
|
-
]);
|
|
285
|
+
$.$mol_ambient_ref = Symbol('$mol_ambient_ref');
|
|
286
|
+
function $mol_ambient(overrides) {
|
|
287
|
+
return Object.setPrototypeOf(overrides, this || $);
|
|
288
|
+
}
|
|
289
|
+
$.$mol_ambient = $mol_ambient;
|
|
297
290
|
})($ || ($ = {}));
|
|
298
291
|
|
|
299
292
|
;
|
|
300
293
|
"use strict";
|
|
301
294
|
var $;
|
|
302
295
|
(function ($) {
|
|
303
|
-
|
|
296
|
+
const instances = new WeakSet();
|
|
297
|
+
function $mol_delegate(proto, target) {
|
|
298
|
+
const proxy = new Proxy(proto, {
|
|
299
|
+
get: (_, field) => {
|
|
300
|
+
const obj = target();
|
|
301
|
+
let val = Reflect.get(obj, field);
|
|
302
|
+
if (typeof val === 'function') {
|
|
303
|
+
val = val.bind(obj);
|
|
304
|
+
}
|
|
305
|
+
return val;
|
|
306
|
+
},
|
|
307
|
+
has: (_, field) => Reflect.has(target(), field),
|
|
308
|
+
set: (_, field, value) => Reflect.set(target(), field, value),
|
|
309
|
+
getOwnPropertyDescriptor: (_, field) => Reflect.getOwnPropertyDescriptor(target(), field),
|
|
310
|
+
ownKeys: () => Reflect.ownKeys(target()),
|
|
311
|
+
getPrototypeOf: () => Reflect.getPrototypeOf(target()),
|
|
312
|
+
setPrototypeOf: (_, donor) => Reflect.setPrototypeOf(target(), donor),
|
|
313
|
+
isExtensible: () => Reflect.isExtensible(target()),
|
|
314
|
+
preventExtensions: () => Reflect.preventExtensions(target()),
|
|
315
|
+
apply: (_, self, args) => Reflect.apply(target(), self, args),
|
|
316
|
+
construct: (_, args, retarget) => Reflect.construct(target(), args, retarget),
|
|
317
|
+
defineProperty: (_, field, descr) => Reflect.defineProperty(target(), field, descr),
|
|
318
|
+
deleteProperty: (_, field) => Reflect.deleteProperty(target(), field),
|
|
319
|
+
});
|
|
320
|
+
instances.add(proxy);
|
|
321
|
+
return proxy;
|
|
322
|
+
}
|
|
323
|
+
$.$mol_delegate = $mol_delegate;
|
|
324
|
+
Reflect.defineProperty($mol_delegate, Symbol.hasInstance, {
|
|
325
|
+
value: (obj) => instances.has(obj),
|
|
326
|
+
});
|
|
304
327
|
})($ || ($ = {}));
|
|
305
328
|
|
|
306
329
|
;
|
|
307
330
|
"use strict";
|
|
308
331
|
var $;
|
|
309
332
|
(function ($) {
|
|
310
|
-
$.$
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
333
|
+
$.$mol_owning_map = new WeakMap();
|
|
334
|
+
function $mol_owning_allow(having) {
|
|
335
|
+
try {
|
|
336
|
+
if (!having)
|
|
337
|
+
return false;
|
|
338
|
+
if (typeof having !== 'object' && typeof having !== 'function')
|
|
339
|
+
return false;
|
|
340
|
+
if (having instanceof $mol_delegate)
|
|
341
|
+
return false;
|
|
342
|
+
if (typeof having['destructor'] !== 'function')
|
|
343
|
+
return false;
|
|
344
|
+
return true;
|
|
345
|
+
}
|
|
346
|
+
catch {
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
$.$mol_owning_allow = $mol_owning_allow;
|
|
351
|
+
function $mol_owning_get(having, Owner) {
|
|
352
|
+
if (!$mol_owning_allow(having))
|
|
353
|
+
return null;
|
|
354
|
+
while (true) {
|
|
355
|
+
const owner = $.$mol_owning_map.get(having);
|
|
356
|
+
if (!owner)
|
|
357
|
+
return owner;
|
|
358
|
+
if (!Owner)
|
|
359
|
+
return owner;
|
|
360
|
+
if (owner instanceof Owner)
|
|
361
|
+
return owner;
|
|
362
|
+
having = owner;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
$.$mol_owning_get = $mol_owning_get;
|
|
366
|
+
function $mol_owning_check(owner, having) {
|
|
367
|
+
if (!$mol_owning_allow(having))
|
|
368
|
+
return false;
|
|
369
|
+
if ($.$mol_owning_map.get(having) !== owner)
|
|
370
|
+
return false;
|
|
371
|
+
return true;
|
|
372
|
+
}
|
|
373
|
+
$.$mol_owning_check = $mol_owning_check;
|
|
374
|
+
function $mol_owning_catch(owner, having) {
|
|
375
|
+
if (!$mol_owning_allow(having))
|
|
376
|
+
return false;
|
|
377
|
+
if ($.$mol_owning_map.get(having))
|
|
378
|
+
return false;
|
|
379
|
+
$.$mol_owning_map.set(having, owner);
|
|
380
|
+
return true;
|
|
381
|
+
}
|
|
382
|
+
$.$mol_owning_catch = $mol_owning_catch;
|
|
317
383
|
})($ || ($ = {}));
|
|
318
384
|
|
|
319
385
|
;
|
|
320
386
|
"use strict";
|
|
321
387
|
var $;
|
|
322
388
|
(function ($) {
|
|
323
|
-
$
|
|
389
|
+
function $mol_fail(error) {
|
|
390
|
+
throw error;
|
|
391
|
+
}
|
|
392
|
+
$.$mol_fail = $mol_fail;
|
|
324
393
|
})($ || ($ = {}));
|
|
325
394
|
|
|
326
395
|
;
|
|
327
396
|
"use strict";
|
|
328
397
|
var $;
|
|
329
398
|
(function ($) {
|
|
330
|
-
function $
|
|
399
|
+
function $mol_fail_hidden(error) {
|
|
331
400
|
throw error;
|
|
332
401
|
}
|
|
333
|
-
$.$
|
|
402
|
+
$.$mol_fail_hidden = $mol_fail_hidden;
|
|
334
403
|
})($ || ($ = {}));
|
|
335
404
|
|
|
405
|
+
;
|
|
406
|
+
"use strict";
|
|
407
|
+
|
|
336
408
|
;
|
|
337
409
|
"use strict";
|
|
338
410
|
var $;
|
|
@@ -369,473 +441,177 @@ var $;
|
|
|
369
441
|
"use strict";
|
|
370
442
|
var $;
|
|
371
443
|
(function ($) {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
el.appendChild(view);
|
|
382
|
-
break;
|
|
383
|
-
}
|
|
384
|
-
if (nextNode == view) {
|
|
385
|
-
nextNode = nextNode.nextSibling;
|
|
386
|
-
break;
|
|
387
|
-
}
|
|
388
|
-
else {
|
|
389
|
-
if (node_set.has(nextNode)) {
|
|
390
|
-
el.insertBefore(view, nextNode);
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
const nn = nextNode.nextSibling;
|
|
395
|
-
el.removeChild(nextNode);
|
|
396
|
-
nextNode = nn;
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
if (nextNode && nextNode.nodeName === '#text') {
|
|
403
|
-
const str = String(view);
|
|
404
|
-
if (nextNode.nodeValue !== str)
|
|
405
|
-
nextNode.nodeValue = str;
|
|
406
|
-
nextNode = nextNode.nextSibling;
|
|
407
|
-
}
|
|
408
|
-
else {
|
|
409
|
-
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
410
|
-
el.insertBefore(textNode, nextNode);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
444
|
+
class $mol_object2 {
|
|
445
|
+
static $ = $;
|
|
446
|
+
[Symbol.toStringTag];
|
|
447
|
+
[$mol_ambient_ref] = null;
|
|
448
|
+
get $() {
|
|
449
|
+
if (this[$mol_ambient_ref])
|
|
450
|
+
return this[$mol_ambient_ref];
|
|
451
|
+
const owner = $mol_owning_get(this);
|
|
452
|
+
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
413
453
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
454
|
+
set $(next) {
|
|
455
|
+
if (this[$mol_ambient_ref])
|
|
456
|
+
$mol_fail_hidden(new Error('Context already defined'));
|
|
457
|
+
this[$mol_ambient_ref] = next;
|
|
458
|
+
}
|
|
459
|
+
static create(init) {
|
|
460
|
+
const obj = new this;
|
|
461
|
+
if (init)
|
|
462
|
+
init(obj);
|
|
463
|
+
return obj;
|
|
464
|
+
}
|
|
465
|
+
static [Symbol.toPrimitive]() {
|
|
466
|
+
return this.toString();
|
|
467
|
+
}
|
|
468
|
+
static toString() {
|
|
469
|
+
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
470
|
+
}
|
|
471
|
+
static toJSON() {
|
|
472
|
+
return this.toString();
|
|
473
|
+
}
|
|
474
|
+
destructor() { }
|
|
475
|
+
static destructor() { }
|
|
476
|
+
toString() {
|
|
477
|
+
return this[Symbol.toStringTag] || this.constructor.name + '<>';
|
|
418
478
|
}
|
|
419
479
|
}
|
|
420
|
-
$.$
|
|
480
|
+
$.$mol_object2 = $mol_object2;
|
|
421
481
|
})($ || ($ = {}));
|
|
422
482
|
|
|
423
483
|
;
|
|
424
484
|
"use strict";
|
|
485
|
+
var $;
|
|
486
|
+
(function ($_1) {
|
|
487
|
+
let $$;
|
|
488
|
+
(function ($$) {
|
|
489
|
+
let $;
|
|
490
|
+
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
491
|
+
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
492
|
+
class $mol_object extends $mol_object2 {
|
|
493
|
+
static make(config) {
|
|
494
|
+
return super.create(obj => {
|
|
495
|
+
for (let key in config)
|
|
496
|
+
obj[key] = config[key];
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
$_1.$mol_object = $mol_object;
|
|
501
|
+
})($ || ($ = {}));
|
|
425
502
|
|
|
426
503
|
;
|
|
427
504
|
"use strict";
|
|
428
505
|
var $;
|
|
429
506
|
(function ($) {
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
createDocumentFragment: () => $mol_dom_context.document.createDocumentFragment(),
|
|
437
|
-
};
|
|
438
|
-
$.$mol_jsx_frag = '';
|
|
439
|
-
function $mol_jsx(Elem, props, ...childNodes) {
|
|
440
|
-
const id = props && props.id || '';
|
|
441
|
-
const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
|
|
442
|
-
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
|
|
443
|
-
if (Elem && $.$mol_jsx_booked) {
|
|
444
|
-
if ($.$mol_jsx_booked.has(id)) {
|
|
445
|
-
$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
|
|
446
|
-
}
|
|
447
|
-
else {
|
|
448
|
-
$.$mol_jsx_booked.add(id);
|
|
449
|
-
}
|
|
507
|
+
function $mol_guid(length = 8, exists = () => false) {
|
|
508
|
+
for (;;) {
|
|
509
|
+
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
510
|
+
if (exists(id))
|
|
511
|
+
continue;
|
|
512
|
+
return id;
|
|
450
513
|
}
|
|
451
|
-
let node = guid ? $.$mol_jsx_document.getElementById(guid) : null;
|
|
452
|
-
if ($.$mol_jsx_prefix) {
|
|
453
|
-
const prefix_ext = $.$mol_jsx_prefix;
|
|
454
|
-
const booked_ext = $.$mol_jsx_booked;
|
|
455
|
-
const crumbs_ext = $.$mol_jsx_crumbs;
|
|
456
|
-
for (const field in props) {
|
|
457
|
-
const func = props[field];
|
|
458
|
-
if (typeof func !== 'function')
|
|
459
|
-
continue;
|
|
460
|
-
const wrapper = function (...args) {
|
|
461
|
-
const prefix = $.$mol_jsx_prefix;
|
|
462
|
-
const booked = $.$mol_jsx_booked;
|
|
463
|
-
const crumbs = $.$mol_jsx_crumbs;
|
|
464
|
-
try {
|
|
465
|
-
$.$mol_jsx_prefix = prefix_ext;
|
|
466
|
-
$.$mol_jsx_booked = booked_ext;
|
|
467
|
-
$.$mol_jsx_crumbs = crumbs_ext;
|
|
468
|
-
return func.call(this, ...args);
|
|
469
|
-
}
|
|
470
|
-
finally {
|
|
471
|
-
$.$mol_jsx_prefix = prefix;
|
|
472
|
-
$.$mol_jsx_booked = booked;
|
|
473
|
-
$.$mol_jsx_crumbs = crumbs;
|
|
474
|
-
}
|
|
475
|
-
};
|
|
476
|
-
$mol_func_name_from(wrapper, func);
|
|
477
|
-
props[field] = wrapper;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
if (typeof Elem !== 'string') {
|
|
481
|
-
if ('prototype' in Elem) {
|
|
482
|
-
const view = node && node[String(Elem)] || new Elem;
|
|
483
|
-
Object.assign(view, props);
|
|
484
|
-
view[Symbol.toStringTag] = guid;
|
|
485
|
-
view.childNodes = childNodes;
|
|
486
|
-
if (!view.ownerDocument)
|
|
487
|
-
view.ownerDocument = $.$mol_jsx_document;
|
|
488
|
-
view.className = (crumbs_self ? crumbs_self + ' ' : '') + (Elem['name'] || Elem);
|
|
489
|
-
node = view.valueOf();
|
|
490
|
-
node[String(Elem)] = view;
|
|
491
|
-
return node;
|
|
492
|
-
}
|
|
493
|
-
else {
|
|
494
|
-
const prefix = $.$mol_jsx_prefix;
|
|
495
|
-
const booked = $.$mol_jsx_booked;
|
|
496
|
-
const crumbs = $.$mol_jsx_crumbs;
|
|
497
|
-
try {
|
|
498
|
-
$.$mol_jsx_prefix = guid;
|
|
499
|
-
$.$mol_jsx_booked = new Set;
|
|
500
|
-
$.$mol_jsx_crumbs = (crumbs_self ? crumbs_self + ' ' : '') + (Elem['name'] || Elem);
|
|
501
|
-
return Elem(props, ...childNodes);
|
|
502
|
-
}
|
|
503
|
-
finally {
|
|
504
|
-
$.$mol_jsx_prefix = prefix;
|
|
505
|
-
$.$mol_jsx_booked = booked;
|
|
506
|
-
$.$mol_jsx_crumbs = crumbs;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
if (!node) {
|
|
511
|
-
node = Elem
|
|
512
|
-
? $.$mol_jsx_document.createElementNS(props?.xmlns ?? 'http://www.w3.org/1999/xhtml', Elem)
|
|
513
|
-
: $.$mol_jsx_document.createDocumentFragment();
|
|
514
|
-
}
|
|
515
|
-
$mol_dom_render_children(node, [].concat(...childNodes));
|
|
516
|
-
if (!Elem)
|
|
517
|
-
return node;
|
|
518
|
-
if (guid)
|
|
519
|
-
node.id = guid;
|
|
520
|
-
for (const key in props) {
|
|
521
|
-
if (key === 'id')
|
|
522
|
-
continue;
|
|
523
|
-
if (typeof props[key] === 'string') {
|
|
524
|
-
if (typeof node[key] === 'string')
|
|
525
|
-
node[key] = props[key];
|
|
526
|
-
node.setAttribute(key, props[key]);
|
|
527
|
-
}
|
|
528
|
-
else if (props[key] &&
|
|
529
|
-
typeof props[key] === 'object' &&
|
|
530
|
-
Reflect.getPrototypeOf(props[key]) === Reflect.getPrototypeOf({})) {
|
|
531
|
-
if (typeof node[key] === 'object') {
|
|
532
|
-
Object.assign(node[key], props[key]);
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
else {
|
|
537
|
-
node[key] = props[key];
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
if ($.$mol_jsx_crumbs)
|
|
541
|
-
node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
|
|
542
|
-
return node;
|
|
543
|
-
}
|
|
544
|
-
$.$mol_jsx = $mol_jsx;
|
|
545
|
-
})($ || ($ = {}));
|
|
546
|
-
|
|
547
|
-
;
|
|
548
|
-
"use strict";
|
|
549
|
-
var $;
|
|
550
|
-
(function ($) {
|
|
551
|
-
$.$mol_ambient_ref = Symbol('$mol_ambient_ref');
|
|
552
|
-
function $mol_ambient(overrides) {
|
|
553
|
-
return Object.setPrototypeOf(overrides, this || $);
|
|
554
514
|
}
|
|
555
|
-
$.$
|
|
515
|
+
$.$mol_guid = $mol_guid;
|
|
556
516
|
})($ || ($ = {}));
|
|
557
517
|
|
|
558
518
|
;
|
|
559
519
|
"use strict";
|
|
560
520
|
var $;
|
|
561
521
|
(function ($) {
|
|
562
|
-
|
|
563
|
-
function $
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
val = val.bind(obj);
|
|
570
|
-
}
|
|
571
|
-
return val;
|
|
572
|
-
},
|
|
573
|
-
has: (_, field) => Reflect.has(target(), field),
|
|
574
|
-
set: (_, field, value) => Reflect.set(target(), field, value),
|
|
575
|
-
getOwnPropertyDescriptor: (_, field) => Reflect.getOwnPropertyDescriptor(target(), field),
|
|
576
|
-
ownKeys: () => Reflect.ownKeys(target()),
|
|
577
|
-
getPrototypeOf: () => Reflect.getPrototypeOf(target()),
|
|
578
|
-
setPrototypeOf: (_, donor) => Reflect.setPrototypeOf(target(), donor),
|
|
579
|
-
isExtensible: () => Reflect.isExtensible(target()),
|
|
580
|
-
preventExtensions: () => Reflect.preventExtensions(target()),
|
|
581
|
-
apply: (_, self, args) => Reflect.apply(target(), self, args),
|
|
582
|
-
construct: (_, args, retarget) => Reflect.construct(target(), args, retarget),
|
|
583
|
-
defineProperty: (_, field, descr) => Reflect.defineProperty(target(), field, descr),
|
|
584
|
-
deleteProperty: (_, field) => Reflect.deleteProperty(target(), field),
|
|
585
|
-
});
|
|
586
|
-
instances.add(proxy);
|
|
587
|
-
return proxy;
|
|
588
|
-
}
|
|
589
|
-
$.$mol_delegate = $mol_delegate;
|
|
590
|
-
Reflect.defineProperty($mol_delegate, Symbol.hasInstance, {
|
|
591
|
-
value: (obj) => instances.has(obj),
|
|
592
|
-
});
|
|
522
|
+
let $mol_wire_cursor;
|
|
523
|
+
(function ($mol_wire_cursor) {
|
|
524
|
+
$mol_wire_cursor[$mol_wire_cursor["stale"] = -1] = "stale";
|
|
525
|
+
$mol_wire_cursor[$mol_wire_cursor["doubt"] = -2] = "doubt";
|
|
526
|
+
$mol_wire_cursor[$mol_wire_cursor["fresh"] = -3] = "fresh";
|
|
527
|
+
$mol_wire_cursor[$mol_wire_cursor["final"] = -4] = "final";
|
|
528
|
+
})($mol_wire_cursor = $.$mol_wire_cursor || ($.$mol_wire_cursor = {}));
|
|
593
529
|
})($ || ($ = {}));
|
|
594
530
|
|
|
595
531
|
;
|
|
596
532
|
"use strict";
|
|
597
533
|
var $;
|
|
598
534
|
(function ($) {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
return false;
|
|
604
|
-
if (typeof having !== 'object' && typeof having !== 'function')
|
|
605
|
-
return false;
|
|
606
|
-
if (having instanceof $mol_delegate)
|
|
607
|
-
return false;
|
|
608
|
-
if (typeof having['destructor'] !== 'function')
|
|
609
|
-
return false;
|
|
610
|
-
return true;
|
|
535
|
+
class $mol_wire_pub extends Object {
|
|
536
|
+
constructor(id = `$mol_wire_pub:${$mol_guid()}`) {
|
|
537
|
+
super();
|
|
538
|
+
this[Symbol.toStringTag] = id;
|
|
611
539
|
}
|
|
612
|
-
|
|
613
|
-
|
|
540
|
+
[Symbol.toStringTag];
|
|
541
|
+
data = [];
|
|
542
|
+
static get [Symbol.species]() {
|
|
543
|
+
return Array;
|
|
614
544
|
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
if (!owner)
|
|
623
|
-
return owner;
|
|
624
|
-
if (!Owner)
|
|
625
|
-
return owner;
|
|
626
|
-
if (owner instanceof Owner)
|
|
627
|
-
return owner;
|
|
628
|
-
having = owner;
|
|
545
|
+
sub_from = 0;
|
|
546
|
+
get sub_list() {
|
|
547
|
+
const res = [];
|
|
548
|
+
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
549
|
+
res.push(this.data[i]);
|
|
550
|
+
}
|
|
551
|
+
return res;
|
|
629
552
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
return
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
553
|
+
get sub_empty() {
|
|
554
|
+
return this.sub_from === this.data.length;
|
|
555
|
+
}
|
|
556
|
+
sub_on(sub, pub_pos) {
|
|
557
|
+
const pos = this.data.length;
|
|
558
|
+
this.data.push(sub, pub_pos);
|
|
559
|
+
return pos;
|
|
560
|
+
}
|
|
561
|
+
sub_off(sub_pos) {
|
|
562
|
+
if (!(sub_pos < this.data.length)) {
|
|
563
|
+
$mol_fail(new Error(`Wrong pos ${sub_pos}`));
|
|
564
|
+
}
|
|
565
|
+
const end = this.data.length - 2;
|
|
566
|
+
if (sub_pos !== end) {
|
|
567
|
+
this.peer_move(end, sub_pos);
|
|
568
|
+
}
|
|
569
|
+
this.data.length = end;
|
|
570
|
+
if (end === this.sub_from)
|
|
571
|
+
this.reap();
|
|
572
|
+
}
|
|
573
|
+
reap() { }
|
|
574
|
+
promote() {
|
|
575
|
+
$mol_wire_auto()?.track_next(this);
|
|
576
|
+
}
|
|
577
|
+
fresh() { }
|
|
578
|
+
complete() { }
|
|
579
|
+
get incompleted() {
|
|
644
580
|
return false;
|
|
645
|
-
|
|
646
|
-
|
|
581
|
+
}
|
|
582
|
+
emit(quant = $mol_wire_cursor.stale) {
|
|
583
|
+
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
584
|
+
;
|
|
585
|
+
this.data[i].absorb(quant, this.data[i + 1]);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
peer_move(from_pos, to_pos) {
|
|
589
|
+
const peer = this.data[from_pos];
|
|
590
|
+
const self_pos = this.data[from_pos + 1];
|
|
591
|
+
this.data[to_pos] = peer;
|
|
592
|
+
this.data[to_pos + 1] = self_pos;
|
|
593
|
+
peer.peer_repos(self_pos, to_pos);
|
|
594
|
+
}
|
|
595
|
+
peer_repos(peer_pos, self_pos) {
|
|
596
|
+
this.data[peer_pos + 1] = self_pos;
|
|
597
|
+
}
|
|
647
598
|
}
|
|
648
|
-
$.$
|
|
599
|
+
$.$mol_wire_pub = $mol_wire_pub;
|
|
649
600
|
})($ || ($ = {}));
|
|
650
601
|
|
|
602
|
+
;
|
|
603
|
+
"use strict";
|
|
604
|
+
|
|
651
605
|
;
|
|
652
606
|
"use strict";
|
|
653
607
|
var $;
|
|
654
608
|
(function ($) {
|
|
655
|
-
|
|
656
|
-
|
|
609
|
+
$.$mol_wire_auto_sub = null;
|
|
610
|
+
function $mol_wire_auto(next = $.$mol_wire_auto_sub) {
|
|
611
|
+
return $.$mol_wire_auto_sub = next;
|
|
657
612
|
}
|
|
658
|
-
$.$
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
;
|
|
662
|
-
"use strict";
|
|
663
|
-
|
|
664
|
-
;
|
|
665
|
-
"use strict";
|
|
666
|
-
var $;
|
|
667
|
-
(function ($) {
|
|
668
|
-
class $mol_object2 {
|
|
669
|
-
static $ = $;
|
|
670
|
-
[Symbol.toStringTag];
|
|
671
|
-
[$mol_ambient_ref] = null;
|
|
672
|
-
get $() {
|
|
673
|
-
if (this[$mol_ambient_ref])
|
|
674
|
-
return this[$mol_ambient_ref];
|
|
675
|
-
const owner = $mol_owning_get(this);
|
|
676
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
677
|
-
}
|
|
678
|
-
set $(next) {
|
|
679
|
-
if (this[$mol_ambient_ref])
|
|
680
|
-
$mol_fail_hidden(new Error('Context already defined'));
|
|
681
|
-
this[$mol_ambient_ref] = next;
|
|
682
|
-
}
|
|
683
|
-
static create(init) {
|
|
684
|
-
const obj = new this;
|
|
685
|
-
if (init)
|
|
686
|
-
init(obj);
|
|
687
|
-
return obj;
|
|
688
|
-
}
|
|
689
|
-
static [Symbol.toPrimitive]() {
|
|
690
|
-
return this.toString();
|
|
691
|
-
}
|
|
692
|
-
static toString() {
|
|
693
|
-
return this[Symbol.toStringTag] || this.$.$mol_func_name(this);
|
|
694
|
-
}
|
|
695
|
-
static toJSON() {
|
|
696
|
-
return this.toString();
|
|
697
|
-
}
|
|
698
|
-
destructor() { }
|
|
699
|
-
static destructor() { }
|
|
700
|
-
toString() {
|
|
701
|
-
return this[Symbol.toStringTag] || this.constructor.name + '<>';
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
$.$mol_object2 = $mol_object2;
|
|
705
|
-
})($ || ($ = {}));
|
|
706
|
-
|
|
707
|
-
;
|
|
708
|
-
"use strict";
|
|
709
|
-
var $;
|
|
710
|
-
(function ($_1) {
|
|
711
|
-
let $$;
|
|
712
|
-
(function ($$) {
|
|
713
|
-
let $;
|
|
714
|
-
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
715
|
-
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
716
|
-
class $mol_object extends $mol_object2 {
|
|
717
|
-
static make(config) {
|
|
718
|
-
return super.create(obj => {
|
|
719
|
-
for (let key in config)
|
|
720
|
-
obj[key] = config[key];
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
$_1.$mol_object = $mol_object;
|
|
725
|
-
})($ || ($ = {}));
|
|
726
|
-
|
|
727
|
-
;
|
|
728
|
-
"use strict";
|
|
729
|
-
var $;
|
|
730
|
-
(function ($) {
|
|
731
|
-
function $mol_guid(length = 8, exists = () => false) {
|
|
732
|
-
for (;;) {
|
|
733
|
-
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
734
|
-
if (exists(id))
|
|
735
|
-
continue;
|
|
736
|
-
return id;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
$.$mol_guid = $mol_guid;
|
|
740
|
-
})($ || ($ = {}));
|
|
741
|
-
|
|
742
|
-
;
|
|
743
|
-
"use strict";
|
|
744
|
-
var $;
|
|
745
|
-
(function ($) {
|
|
746
|
-
let $mol_wire_cursor;
|
|
747
|
-
(function ($mol_wire_cursor) {
|
|
748
|
-
$mol_wire_cursor[$mol_wire_cursor["stale"] = -1] = "stale";
|
|
749
|
-
$mol_wire_cursor[$mol_wire_cursor["doubt"] = -2] = "doubt";
|
|
750
|
-
$mol_wire_cursor[$mol_wire_cursor["fresh"] = -3] = "fresh";
|
|
751
|
-
$mol_wire_cursor[$mol_wire_cursor["final"] = -4] = "final";
|
|
752
|
-
})($mol_wire_cursor = $.$mol_wire_cursor || ($.$mol_wire_cursor = {}));
|
|
753
|
-
})($ || ($ = {}));
|
|
754
|
-
|
|
755
|
-
;
|
|
756
|
-
"use strict";
|
|
757
|
-
var $;
|
|
758
|
-
(function ($) {
|
|
759
|
-
class $mol_wire_pub extends Object {
|
|
760
|
-
constructor(id = `$mol_wire_pub:${$mol_guid()}`) {
|
|
761
|
-
super();
|
|
762
|
-
this[Symbol.toStringTag] = id;
|
|
763
|
-
}
|
|
764
|
-
[Symbol.toStringTag];
|
|
765
|
-
data = [];
|
|
766
|
-
static get [Symbol.species]() {
|
|
767
|
-
return Array;
|
|
768
|
-
}
|
|
769
|
-
sub_from = 0;
|
|
770
|
-
get sub_list() {
|
|
771
|
-
const res = [];
|
|
772
|
-
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
773
|
-
res.push(this.data[i]);
|
|
774
|
-
}
|
|
775
|
-
return res;
|
|
776
|
-
}
|
|
777
|
-
get sub_empty() {
|
|
778
|
-
return this.sub_from === this.data.length;
|
|
779
|
-
}
|
|
780
|
-
sub_on(sub, pub_pos) {
|
|
781
|
-
const pos = this.data.length;
|
|
782
|
-
this.data.push(sub, pub_pos);
|
|
783
|
-
return pos;
|
|
784
|
-
}
|
|
785
|
-
sub_off(sub_pos) {
|
|
786
|
-
if (!(sub_pos < this.data.length)) {
|
|
787
|
-
$mol_fail(new Error(`Wrong pos ${sub_pos}`));
|
|
788
|
-
}
|
|
789
|
-
const end = this.data.length - 2;
|
|
790
|
-
if (sub_pos !== end) {
|
|
791
|
-
this.peer_move(end, sub_pos);
|
|
792
|
-
}
|
|
793
|
-
this.data.length = end;
|
|
794
|
-
if (end === this.sub_from)
|
|
795
|
-
this.reap();
|
|
796
|
-
}
|
|
797
|
-
reap() { }
|
|
798
|
-
promote() {
|
|
799
|
-
$mol_wire_auto()?.track_next(this);
|
|
800
|
-
}
|
|
801
|
-
fresh() { }
|
|
802
|
-
complete() { }
|
|
803
|
-
get incompleted() {
|
|
804
|
-
return false;
|
|
805
|
-
}
|
|
806
|
-
emit(quant = $mol_wire_cursor.stale) {
|
|
807
|
-
for (let i = this.sub_from; i < this.data.length; i += 2) {
|
|
808
|
-
;
|
|
809
|
-
this.data[i].absorb(quant, this.data[i + 1]);
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
peer_move(from_pos, to_pos) {
|
|
813
|
-
const peer = this.data[from_pos];
|
|
814
|
-
const self_pos = this.data[from_pos + 1];
|
|
815
|
-
this.data[to_pos] = peer;
|
|
816
|
-
this.data[to_pos + 1] = self_pos;
|
|
817
|
-
peer.peer_repos(self_pos, to_pos);
|
|
818
|
-
}
|
|
819
|
-
peer_repos(peer_pos, self_pos) {
|
|
820
|
-
this.data[peer_pos + 1] = self_pos;
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
$.$mol_wire_pub = $mol_wire_pub;
|
|
824
|
-
})($ || ($ = {}));
|
|
825
|
-
|
|
826
|
-
;
|
|
827
|
-
"use strict";
|
|
828
|
-
|
|
829
|
-
;
|
|
830
|
-
"use strict";
|
|
831
|
-
var $;
|
|
832
|
-
(function ($) {
|
|
833
|
-
$.$mol_wire_auto_sub = null;
|
|
834
|
-
function $mol_wire_auto(next = $.$mol_wire_auto_sub) {
|
|
835
|
-
return $.$mol_wire_auto_sub = next;
|
|
836
|
-
}
|
|
837
|
-
$.$mol_wire_auto = $mol_wire_auto;
|
|
838
|
-
$.$mol_wire_affected = [];
|
|
613
|
+
$.$mol_wire_auto = $mol_wire_auto;
|
|
614
|
+
$.$mol_wire_affected = [];
|
|
839
615
|
})($ || ($ = {}));
|
|
840
616
|
|
|
841
617
|
;
|
|
@@ -2115,22 +1891,676 @@ var $;
|
|
|
2115
1891
|
}
|
|
2116
1892
|
return atom.resync(args);
|
|
2117
1893
|
}
|
|
2118
|
-
};
|
|
2119
|
-
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
2120
|
-
Reflect.defineProperty(descr2.value, 'length', { value: orig.length });
|
|
2121
|
-
Object.assign(descr2.value, { orig });
|
|
2122
|
-
Reflect.defineProperty(host, field, descr2);
|
|
2123
|
-
return descr2;
|
|
1894
|
+
};
|
|
1895
|
+
Reflect.defineProperty(descr2.value, 'name', { value: orig.name + ' ' });
|
|
1896
|
+
Reflect.defineProperty(descr2.value, 'length', { value: orig.length });
|
|
1897
|
+
Object.assign(descr2.value, { orig });
|
|
1898
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1899
|
+
return descr2;
|
|
1900
|
+
}
|
|
1901
|
+
$.$mol_wire_plex = $mol_wire_plex;
|
|
1902
|
+
})($ || ($ = {}));
|
|
1903
|
+
|
|
1904
|
+
;
|
|
1905
|
+
"use strict";
|
|
1906
|
+
var $;
|
|
1907
|
+
(function ($) {
|
|
1908
|
+
$.$mol_mem = $mol_wire_solo;
|
|
1909
|
+
$.$mol_mem_key = $mol_wire_plex;
|
|
1910
|
+
})($ || ($ = {}));
|
|
1911
|
+
|
|
1912
|
+
;
|
|
1913
|
+
"use strict";
|
|
1914
|
+
var $;
|
|
1915
|
+
(function ($) {
|
|
1916
|
+
$.$mol_action = $mol_wire_method;
|
|
1917
|
+
})($ || ($ = {}));
|
|
1918
|
+
|
|
1919
|
+
;
|
|
1920
|
+
"use strict";
|
|
1921
|
+
var $;
|
|
1922
|
+
(function ($) {
|
|
1923
|
+
class $mol_state_arg extends $mol_object {
|
|
1924
|
+
prefix;
|
|
1925
|
+
static href(next) {
|
|
1926
|
+
if (next === undefined) {
|
|
1927
|
+
next = $mol_dom.location.href;
|
|
1928
|
+
}
|
|
1929
|
+
else if (!/^about:srcdoc/.test(next)) {
|
|
1930
|
+
new $mol_after_frame(() => {
|
|
1931
|
+
const next = this.href();
|
|
1932
|
+
const prev = $mol_dom.location.href;
|
|
1933
|
+
if (next === prev)
|
|
1934
|
+
return;
|
|
1935
|
+
const history = $mol_dom.history;
|
|
1936
|
+
history.replaceState(history.state, $mol_dom.document.title, next);
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
if ($mol_dom.parent && ($mol_dom.parent !== $mol_dom.self)) {
|
|
1940
|
+
$mol_dom.parent.postMessage(['hashchange', next], '*');
|
|
1941
|
+
}
|
|
1942
|
+
return next;
|
|
1943
|
+
}
|
|
1944
|
+
static href_normal() {
|
|
1945
|
+
return this.link({});
|
|
1946
|
+
}
|
|
1947
|
+
static href_absolute() {
|
|
1948
|
+
return new URL(this.href(), $mol_dom.location.href).toString();
|
|
1949
|
+
}
|
|
1950
|
+
static dict(next) {
|
|
1951
|
+
var href = this.href(next && this.make_link(next)).split(/#!?/)[1] || '';
|
|
1952
|
+
var chunks = href.split(this.separator);
|
|
1953
|
+
var params = {};
|
|
1954
|
+
chunks.forEach(chunk => {
|
|
1955
|
+
if (!chunk)
|
|
1956
|
+
return;
|
|
1957
|
+
var vals = chunk.split('=').map(decodeURIComponent);
|
|
1958
|
+
params[vals.shift()] = vals.join('=');
|
|
1959
|
+
});
|
|
1960
|
+
return params;
|
|
1961
|
+
}
|
|
1962
|
+
static dict_cut(except) {
|
|
1963
|
+
const dict = this.dict();
|
|
1964
|
+
const cut = {};
|
|
1965
|
+
for (const key in dict) {
|
|
1966
|
+
if (except.indexOf(key) >= 0)
|
|
1967
|
+
break;
|
|
1968
|
+
cut[key] = dict[key];
|
|
1969
|
+
}
|
|
1970
|
+
return cut;
|
|
1971
|
+
}
|
|
1972
|
+
static value(key, next) {
|
|
1973
|
+
const nextDict = (next === void 0) ? void 0 : { ...this.dict(), [key]: next };
|
|
1974
|
+
const next2 = this.dict(nextDict)[key];
|
|
1975
|
+
return (next2 == null) ? null : next2;
|
|
1976
|
+
}
|
|
1977
|
+
static link(next) {
|
|
1978
|
+
return this.make_link({
|
|
1979
|
+
...this.dict_cut(Object.keys(next)),
|
|
1980
|
+
...next,
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
static prolog = '!';
|
|
1984
|
+
static separator = '/';
|
|
1985
|
+
static make_link(next) {
|
|
1986
|
+
const chunks = [];
|
|
1987
|
+
for (let key in next) {
|
|
1988
|
+
if (null == next[key])
|
|
1989
|
+
continue;
|
|
1990
|
+
const val = next[key];
|
|
1991
|
+
chunks.push([key].concat(val ? [val] : []).map(this.encode).join('='));
|
|
1992
|
+
}
|
|
1993
|
+
return new URL('#' + this.prolog + chunks.join(this.separator), this.href_absolute()).toString();
|
|
1994
|
+
}
|
|
1995
|
+
static commit() {
|
|
1996
|
+
$mol_dom.history.pushState($mol_dom.history.state, $mol_dom.document.title, this.href());
|
|
1997
|
+
}
|
|
1998
|
+
static go(next) {
|
|
1999
|
+
$mol_dom.location.href = this.link(next);
|
|
2000
|
+
}
|
|
2001
|
+
static encode(str) {
|
|
2002
|
+
return encodeURIComponent(str).replace(/\(/g, '%28').replace(/\)/g, '%29');
|
|
2003
|
+
}
|
|
2004
|
+
constructor(prefix = '') {
|
|
2005
|
+
super();
|
|
2006
|
+
this.prefix = prefix;
|
|
2007
|
+
}
|
|
2008
|
+
value(key, next) {
|
|
2009
|
+
return this.constructor.value(this.prefix + key, next);
|
|
2010
|
+
}
|
|
2011
|
+
sub(postfix) {
|
|
2012
|
+
return new this.constructor(this.prefix + postfix + '.');
|
|
2013
|
+
}
|
|
2014
|
+
link(next) {
|
|
2015
|
+
var prefix = this.prefix;
|
|
2016
|
+
var dict = {};
|
|
2017
|
+
for (var key in next) {
|
|
2018
|
+
dict[prefix + key] = next[key];
|
|
2019
|
+
}
|
|
2020
|
+
return this.constructor.link(dict);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
__decorate([
|
|
2024
|
+
$mol_mem
|
|
2025
|
+
], $mol_state_arg, "href", null);
|
|
2026
|
+
__decorate([
|
|
2027
|
+
$mol_mem
|
|
2028
|
+
], $mol_state_arg, "href_normal", null);
|
|
2029
|
+
__decorate([
|
|
2030
|
+
$mol_mem
|
|
2031
|
+
], $mol_state_arg, "href_absolute", null);
|
|
2032
|
+
__decorate([
|
|
2033
|
+
$mol_mem
|
|
2034
|
+
], $mol_state_arg, "dict", null);
|
|
2035
|
+
__decorate([
|
|
2036
|
+
$mol_mem_key
|
|
2037
|
+
], $mol_state_arg, "dict_cut", null);
|
|
2038
|
+
__decorate([
|
|
2039
|
+
$mol_mem_key
|
|
2040
|
+
], $mol_state_arg, "value", null);
|
|
2041
|
+
__decorate([
|
|
2042
|
+
$mol_mem_key
|
|
2043
|
+
], $mol_state_arg, "make_link", null);
|
|
2044
|
+
__decorate([
|
|
2045
|
+
$mol_action
|
|
2046
|
+
], $mol_state_arg, "commit", null);
|
|
2047
|
+
__decorate([
|
|
2048
|
+
$mol_action
|
|
2049
|
+
], $mol_state_arg, "go", null);
|
|
2050
|
+
$.$mol_state_arg = $mol_state_arg;
|
|
2051
|
+
function $mol_state_arg_change() {
|
|
2052
|
+
$mol_state_arg.href($mol_dom.location.href);
|
|
2053
|
+
}
|
|
2054
|
+
self.addEventListener('hashchange', $mol_state_arg_change);
|
|
2055
|
+
})($ || ($ = {}));
|
|
2056
|
+
|
|
2057
|
+
;
|
|
2058
|
+
"use strict";
|
|
2059
|
+
var $;
|
|
2060
|
+
(function ($) {
|
|
2061
|
+
class $mol_media extends $mol_object2 {
|
|
2062
|
+
static match(query, next) {
|
|
2063
|
+
if (next !== undefined)
|
|
2064
|
+
return next;
|
|
2065
|
+
const res = this.$.$mol_dom_context.matchMedia?.(query) ?? {};
|
|
2066
|
+
res.onchange = () => this.match(query, res.matches);
|
|
2067
|
+
return res.matches;
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
__decorate([
|
|
2071
|
+
$mol_mem_key
|
|
2072
|
+
], $mol_media, "match", null);
|
|
2073
|
+
$.$mol_media = $mol_media;
|
|
2074
|
+
})($ || ($ = {}));
|
|
2075
|
+
|
|
2076
|
+
;
|
|
2077
|
+
"use strict";
|
|
2078
|
+
var $;
|
|
2079
|
+
(function ($) {
|
|
2080
|
+
function $mol_wire_solid() {
|
|
2081
|
+
let current = $mol_wire_auto();
|
|
2082
|
+
if (current.temp)
|
|
2083
|
+
current = current.host;
|
|
2084
|
+
if (current.reap !== nothing) {
|
|
2085
|
+
current?.sub_on(sub, sub.data.length);
|
|
2086
|
+
}
|
|
2087
|
+
current.reap = nothing;
|
|
2088
|
+
}
|
|
2089
|
+
$.$mol_wire_solid = $mol_wire_solid;
|
|
2090
|
+
const nothing = () => { };
|
|
2091
|
+
const sub = new $mol_wire_pub_sub;
|
|
2092
|
+
})($ || ($ = {}));
|
|
2093
|
+
|
|
2094
|
+
;
|
|
2095
|
+
"use strict";
|
|
2096
|
+
var $;
|
|
2097
|
+
(function ($) {
|
|
2098
|
+
$.$mol_mem_persist = $mol_wire_solid;
|
|
2099
|
+
})($ || ($ = {}));
|
|
2100
|
+
|
|
2101
|
+
;
|
|
2102
|
+
"use strict";
|
|
2103
|
+
var $;
|
|
2104
|
+
(function ($) {
|
|
2105
|
+
function $mol_wire_probe(task, def) {
|
|
2106
|
+
const warm = $mol_wire_fiber.warm;
|
|
2107
|
+
try {
|
|
2108
|
+
$mol_wire_fiber.warm = false;
|
|
2109
|
+
const res = task();
|
|
2110
|
+
if (res === undefined)
|
|
2111
|
+
return def;
|
|
2112
|
+
return res;
|
|
2113
|
+
}
|
|
2114
|
+
finally {
|
|
2115
|
+
$mol_wire_fiber.warm = warm;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
$.$mol_wire_probe = $mol_wire_probe;
|
|
2119
|
+
})($ || ($ = {}));
|
|
2120
|
+
|
|
2121
|
+
;
|
|
2122
|
+
"use strict";
|
|
2123
|
+
var $;
|
|
2124
|
+
(function ($) {
|
|
2125
|
+
$.$mol_mem_cached = $mol_wire_probe;
|
|
2126
|
+
})($ || ($ = {}));
|
|
2127
|
+
|
|
2128
|
+
;
|
|
2129
|
+
"use strict";
|
|
2130
|
+
var $;
|
|
2131
|
+
(function ($) {
|
|
2132
|
+
const factories = new WeakMap();
|
|
2133
|
+
function factory(val) {
|
|
2134
|
+
let make = factories.get(val);
|
|
2135
|
+
if (make)
|
|
2136
|
+
return make;
|
|
2137
|
+
make = $mol_func_name_from((...args) => new val(...args), val);
|
|
2138
|
+
factories.set(val, make);
|
|
2139
|
+
return make;
|
|
2140
|
+
}
|
|
2141
|
+
const getters = new WeakMap();
|
|
2142
|
+
function get_prop(host, field) {
|
|
2143
|
+
let props = getters.get(host);
|
|
2144
|
+
let get_val = props?.[field];
|
|
2145
|
+
if (get_val)
|
|
2146
|
+
return get_val;
|
|
2147
|
+
get_val = (next) => {
|
|
2148
|
+
if (next !== undefined)
|
|
2149
|
+
host[field] = next;
|
|
2150
|
+
return host[field];
|
|
2151
|
+
};
|
|
2152
|
+
Object.defineProperty(get_val, 'name', { value: field });
|
|
2153
|
+
if (!props) {
|
|
2154
|
+
props = {};
|
|
2155
|
+
getters.set(host, props);
|
|
2156
|
+
}
|
|
2157
|
+
props[field] = get_val;
|
|
2158
|
+
return get_val;
|
|
2159
|
+
}
|
|
2160
|
+
function $mol_wire_sync(obj) {
|
|
2161
|
+
return new Proxy(obj, {
|
|
2162
|
+
get(obj, field) {
|
|
2163
|
+
let val = obj[field];
|
|
2164
|
+
const temp = $mol_wire_task.getter(typeof val === 'function' ? val : get_prop(obj, field));
|
|
2165
|
+
if (typeof val !== 'function')
|
|
2166
|
+
return temp(obj, []).sync();
|
|
2167
|
+
return function $mol_wire_sync(...args) {
|
|
2168
|
+
const fiber = temp(obj, args);
|
|
2169
|
+
return fiber.sync();
|
|
2170
|
+
};
|
|
2171
|
+
},
|
|
2172
|
+
set(obj, field, next) {
|
|
2173
|
+
const temp = $mol_wire_task.getter(get_prop(obj, field));
|
|
2174
|
+
temp(obj, [next]).sync();
|
|
2175
|
+
return true;
|
|
2176
|
+
},
|
|
2177
|
+
construct(obj, args) {
|
|
2178
|
+
const temp = $mol_wire_task.getter(factory(obj));
|
|
2179
|
+
return temp(obj, args).sync();
|
|
2180
|
+
},
|
|
2181
|
+
apply(obj, self, args) {
|
|
2182
|
+
const temp = $mol_wire_task.getter(obj);
|
|
2183
|
+
return temp(self, args).sync();
|
|
2184
|
+
},
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
$.$mol_wire_sync = $mol_wire_sync;
|
|
2188
|
+
})($ || ($ = {}));
|
|
2189
|
+
|
|
2190
|
+
;
|
|
2191
|
+
"use strict";
|
|
2192
|
+
var $;
|
|
2193
|
+
(function ($) {
|
|
2194
|
+
class $mol_storage extends $mol_object2 {
|
|
2195
|
+
static native() {
|
|
2196
|
+
return this.$.$mol_dom_context.navigator.storage ?? {
|
|
2197
|
+
persisted: async () => false,
|
|
2198
|
+
persist: async () => false,
|
|
2199
|
+
estimate: async () => ({}),
|
|
2200
|
+
getDirectory: async () => null,
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
static persisted(next, cache) {
|
|
2204
|
+
$mol_mem_persist();
|
|
2205
|
+
if (cache)
|
|
2206
|
+
return Boolean(next);
|
|
2207
|
+
const native = this.native();
|
|
2208
|
+
if (next && !$mol_mem_cached(() => this.persisted())) {
|
|
2209
|
+
native.persist().then(actual => {
|
|
2210
|
+
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
2211
|
+
if (actual)
|
|
2212
|
+
this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
2213
|
+
else
|
|
2214
|
+
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
2215
|
+
});
|
|
2216
|
+
}
|
|
2217
|
+
return next ?? $mol_wire_sync(native).persisted();
|
|
2218
|
+
}
|
|
2219
|
+
static estimate() {
|
|
2220
|
+
return $mol_wire_sync(this.native() ?? {}).estimate();
|
|
2221
|
+
}
|
|
2222
|
+
static dir() {
|
|
2223
|
+
return $mol_wire_sync(this.native()).getDirectory();
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
__decorate([
|
|
2227
|
+
$mol_mem
|
|
2228
|
+
], $mol_storage, "native", null);
|
|
2229
|
+
__decorate([
|
|
2230
|
+
$mol_mem
|
|
2231
|
+
], $mol_storage, "persisted", null);
|
|
2232
|
+
$.$mol_storage = $mol_storage;
|
|
2233
|
+
})($ || ($ = {}));
|
|
2234
|
+
|
|
2235
|
+
;
|
|
2236
|
+
"use strict";
|
|
2237
|
+
var $;
|
|
2238
|
+
(function ($) {
|
|
2239
|
+
class $mol_state_local extends $mol_object {
|
|
2240
|
+
static 'native()';
|
|
2241
|
+
static native() {
|
|
2242
|
+
if (this['native()'])
|
|
2243
|
+
return this['native()'];
|
|
2244
|
+
check: try {
|
|
2245
|
+
const native = $mol_dom_context.localStorage;
|
|
2246
|
+
if (!native)
|
|
2247
|
+
break check;
|
|
2248
|
+
native.setItem('', '');
|
|
2249
|
+
native.removeItem('');
|
|
2250
|
+
return this['native()'] = native;
|
|
2251
|
+
}
|
|
2252
|
+
catch (error) {
|
|
2253
|
+
console.warn(error);
|
|
2254
|
+
}
|
|
2255
|
+
return this['native()'] = {
|
|
2256
|
+
getItem(key) {
|
|
2257
|
+
return this[':' + key];
|
|
2258
|
+
},
|
|
2259
|
+
setItem(key, value) {
|
|
2260
|
+
this[':' + key] = value;
|
|
2261
|
+
},
|
|
2262
|
+
removeItem(key) {
|
|
2263
|
+
this[':' + key] = void 0;
|
|
2264
|
+
}
|
|
2265
|
+
};
|
|
2266
|
+
}
|
|
2267
|
+
static changes(next) { return next; }
|
|
2268
|
+
static value(key, next) {
|
|
2269
|
+
this.changes();
|
|
2270
|
+
if (next === void 0)
|
|
2271
|
+
return JSON.parse(this.native().getItem(key) || 'null');
|
|
2272
|
+
if (next === null) {
|
|
2273
|
+
this.native().removeItem(key);
|
|
2274
|
+
}
|
|
2275
|
+
else {
|
|
2276
|
+
this.native().setItem(key, JSON.stringify(next));
|
|
2277
|
+
this.$.$mol_storage.persisted(true);
|
|
2278
|
+
}
|
|
2279
|
+
return next;
|
|
2280
|
+
}
|
|
2281
|
+
prefix() { return ''; }
|
|
2282
|
+
value(key, next) {
|
|
2283
|
+
return $mol_state_local.value(this.prefix() + '.' + key, next);
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
__decorate([
|
|
2287
|
+
$mol_mem
|
|
2288
|
+
], $mol_state_local, "changes", null);
|
|
2289
|
+
__decorate([
|
|
2290
|
+
$mol_mem_key
|
|
2291
|
+
], $mol_state_local, "value", null);
|
|
2292
|
+
$.$mol_state_local = $mol_state_local;
|
|
2293
|
+
})($ || ($ = {}));
|
|
2294
|
+
|
|
2295
|
+
;
|
|
2296
|
+
"use strict";
|
|
2297
|
+
var $;
|
|
2298
|
+
(function ($) {
|
|
2299
|
+
self.addEventListener('storage', event => $.$mol_state_local.changes(event));
|
|
2300
|
+
})($ || ($ = {}));
|
|
2301
|
+
|
|
2302
|
+
;
|
|
2303
|
+
"use strict";
|
|
2304
|
+
var $;
|
|
2305
|
+
(function ($) {
|
|
2306
|
+
function parse(theme) {
|
|
2307
|
+
if (theme === 'true')
|
|
2308
|
+
return true;
|
|
2309
|
+
if (theme === 'false')
|
|
2310
|
+
return false;
|
|
2311
|
+
return null;
|
|
2312
|
+
}
|
|
2313
|
+
function $mol_lights(next) {
|
|
2314
|
+
const arg = parse(this.$mol_state_arg.value('mol_lights'));
|
|
2315
|
+
const base = this.$mol_media.match('(prefers-color-scheme: light)');
|
|
2316
|
+
if (next === undefined) {
|
|
2317
|
+
return arg ?? this.$mol_state_local.value('$mol_lights') ?? base;
|
|
2318
|
+
}
|
|
2319
|
+
else {
|
|
2320
|
+
if (arg === null) {
|
|
2321
|
+
this.$mol_state_local.value('$mol_lights', next === base ? null : next);
|
|
2322
|
+
}
|
|
2323
|
+
else {
|
|
2324
|
+
this.$mol_state_arg.value('mol_lights', String(next));
|
|
2325
|
+
}
|
|
2326
|
+
return next;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
$.$mol_lights = $mol_lights;
|
|
2330
|
+
})($ || ($ = {}));
|
|
2331
|
+
|
|
2332
|
+
;
|
|
2333
|
+
"use strict";
|
|
2334
|
+
var $;
|
|
2335
|
+
(function ($) {
|
|
2336
|
+
$.$mol_theme = $mol_style_prop('mol_theme', [
|
|
2337
|
+
'back',
|
|
2338
|
+
'hover',
|
|
2339
|
+
'card',
|
|
2340
|
+
'current',
|
|
2341
|
+
'special',
|
|
2342
|
+
'text',
|
|
2343
|
+
'control',
|
|
2344
|
+
'shade',
|
|
2345
|
+
'line',
|
|
2346
|
+
'focus',
|
|
2347
|
+
'field',
|
|
2348
|
+
'image',
|
|
2349
|
+
'spirit',
|
|
2350
|
+
]);
|
|
2351
|
+
})($ || ($ = {}));
|
|
2352
|
+
|
|
2353
|
+
;
|
|
2354
|
+
"use strict";
|
|
2355
|
+
var $;
|
|
2356
|
+
(function ($) {
|
|
2357
|
+
$mol_style_attach("mol/theme/theme.css", ":root {\n\t--mol_theme_hue: 240deg;\n\t--mol_theme_hue_spread: 90deg;\n\tcolor-scheme: dark light;\n}\n\n:where([mol_theme]) {\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n\tbackground-color: var(--mol_theme_back);\n}\n\t\n:root, [mol_theme=\"$mol_theme_dark\"], :where([mol_theme=\"$mol_theme_dark\"]) [mol_theme] {\n\n\t--mol_theme_luma: -1;\n\t--mol_theme_image: invert(1) hue-rotate( 180deg );\n\t--mol_theme_spirit: hsl( 0deg, 0%, 0%, .75 );\n\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 20%, 10% );\n\t--mol_theme_card: hsl( var(--mol_theme_hue), 50%, 20%, .25 );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), 50%, 8%, .25 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0%, 80% );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 60%, 1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .25 );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, 65% );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 60%, 65% );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ), 60%, 65% );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ), 60%, 65% );\n\n} @supports( color: oklch( 0% 0 0deg ) ) {\n:root, [mol_theme=\"$mol_theme_dark\"], :where([mol_theme=\"$mol_theme_dark\"]) [mol_theme] {\n\t\n\t--mol_theme_back: oklch( 20% .03 var(--mol_theme_hue) );\n\t--mol_theme_card: oklch( 30% .05 var(--mol_theme_hue) / .25 );\n\t--mol_theme_field: oklch( 15% 0 var(--mol_theme_hue) / .25 );\n\t--mol_theme_hover: oklch( 70% 0 var(--mol_theme_hue) / .1 );\n\t\n\t--mol_theme_text: oklch( 80% 0 var(--mol_theme_hue) );\n\t--mol_theme_shade: oklch( 60% 0 var(--mol_theme_hue) );\n\t--mol_theme_line: oklch( 60% 0 var(--mol_theme_hue) / .25 );\n\t--mol_theme_focus: oklch( 80% .2 calc( var(--mol_theme_hue) + 180deg ) );\n\t\n\t--mol_theme_control: oklch( 70% .1 var(--mol_theme_hue) );\n\t--mol_theme_current: oklch( 70% .2 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) );\n\t--mol_theme_special: oklch( 70% .2 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) );\n\n} }\n\n[mol_theme=\"$mol_theme_light\"], :where([mol_theme=\"$mol_theme_light\"]) [mol_theme] {\n\t\n\t--mol_theme_luma: 1;\n\t--mol_theme_image: none;\n\t--mol_theme_spirit: hsl( 0deg, 0%, 100%, .75 );\n\t\n\t--mol_theme_back: hsl( var(--mol_theme_hue), 20%, 92% );\n\t--mol_theme_card: hsl( var(--mol_theme_hue), 50%, 100%, .5 );\n\t--mol_theme_field: hsl( var(--mol_theme_hue), 50%, 100%, .75 );\n\t--mol_theme_hover: hsl( var(--mol_theme_hue), 0%, 50%, .1 );\n\t\n\t--mol_theme_text: hsl( var(--mol_theme_hue), 0%, 0% );\n\t--mol_theme_shade: hsl( var(--mol_theme_hue), 0%, 40%, 1 );\n\t--mol_theme_line: hsl( var(--mol_theme_hue), 0%, 50%, .25 );\n\t--mol_theme_focus: hsl( calc( var(--mol_theme_hue) + 180deg ), 100%, 40% );\n\t\n\t--mol_theme_control: hsl( var(--mol_theme_hue), 80%, 30% );\n\t--mol_theme_current: hsl( calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ), 80%, 30% );\n\t--mol_theme_special: hsl( calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ), 80%, 30% );\n\n} @supports( color: oklch( 0% 0 0deg ) ) {\n[mol_theme=\"$mol_theme_light\"], :where([mol_theme=\"$mol_theme_light\"]) [mol_theme] {\n\t--mol_theme_back: oklch( 92% .01 var(--mol_theme_hue) );\n\t--mol_theme_card: oklch( 99% .01 var(--mol_theme_hue) / .5 );\n\t--mol_theme_field: oklch( 100% 0 var(--mol_theme_hue) / .5 );\n\t--mol_theme_hover: oklch( 70% 0 var(--mol_theme_hue) / .1 );\n\t\n\t--mol_theme_text: oklch( 20% 0 var(--mol_theme_hue) );\n\t--mol_theme_shade: oklch( 60% 0 var(--mol_theme_hue) );\n\t--mol_theme_line: oklch( 50% 0 var(--mol_theme_hue) / .25 );\n\t--mol_theme_focus: oklch( 60% .2 calc( var(--mol_theme_hue) + 180deg ) );\n\t\n\t--mol_theme_control: oklch( 40% .15 var(--mol_theme_hue) );\n\t--mol_theme_current: oklch( 50% .2 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) );\n\t--mol_theme_special: oklch( 50% .2 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) );\n\n} }\n\n:where( :root, [mol_theme=\"$mol_theme_dark\"] ) [mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_back: oklch( 25% .075 var(--mol_theme_hue) );\n\t--mol_theme_card: oklch( 35% .1 var(--mol_theme_hue) / .25 );\n}\n:where( [mol_theme=\"$mol_theme_light\"] ) [mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_back: oklch( 85% .075 var(--mol_theme_hue) );\n\t--mol_theme_card: oklch( 98% .03 var(--mol_theme_hue) / .25 );\n}\n\n:where( :root, [mol_theme=\"$mol_theme_dark\"] ) [mol_theme=\"$mol_theme_current\"] {\n\t--mol_theme_back: oklch( 25% .05 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) );\n\t--mol_theme_card: oklch( 35% .1 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) / .25 );\n}\n:where( [mol_theme=\"$mol_theme_light\"] ) [mol_theme=\"$mol_theme_current\"] {\n\t--mol_theme_back: oklch( 85% .05 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) );\n\t--mol_theme_card: oklch( 98% .03 calc( var(--mol_theme_hue) - var(--mol_theme_hue_spread) ) / .25 );\n}\n\n:where( :root, [mol_theme=\"$mol_theme_dark\"] ) [mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_back: oklch( 25% .05 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) );\n\t--mol_theme_card: oklch( 35% .1 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) / .25 );\n}\n:where( [mol_theme=\"$mol_theme_light\"] ) [mol_theme=\"$mol_theme_special\"] {\n\t--mol_theme_back: oklch( 85% .05 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) );\n\t--mol_theme_card: oklch( 98% .03 calc( var(--mol_theme_hue) + var(--mol_theme_hue_spread) ) / .25 );\n}\n\n:where( :root, [mol_theme=\"$mol_theme_dark\"] ) [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: oklch( 35% .1 calc( var(--mol_theme_hue) + 180deg ) );\n\t--mol_theme_card: oklch( 45% .15 calc( var(--mol_theme_hue) + 180deg ) / .25 );\n}\n:where( [mol_theme=\"$mol_theme_light\"] ) [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: oklch( 83% .1 calc( var(--mol_theme_hue) + 180deg ) );\n\t--mol_theme_card: oklch( 98% .03 calc( var(--mol_theme_hue) + 180deg ) / .25 );\n}\n\n");
|
|
2358
|
+
})($ || ($ = {}));
|
|
2359
|
+
|
|
2360
|
+
;
|
|
2361
|
+
"use strict";
|
|
2362
|
+
var $;
|
|
2363
|
+
(function ($) {
|
|
2364
|
+
$mol_style_attach('$mol_theme_lights', `:root { --mol_theme_back: oklch( ${$$.$mol_lights() ? 92 : 20}% .01 var(--mol_theme_hue) ) }`);
|
|
2365
|
+
})($ || ($ = {}));
|
|
2366
|
+
|
|
2367
|
+
;
|
|
2368
|
+
"use strict";
|
|
2369
|
+
var $;
|
|
2370
|
+
(function ($) {
|
|
2371
|
+
$.$mol_gap = $mol_style_prop('mol_gap', [
|
|
2372
|
+
'block',
|
|
2373
|
+
'text',
|
|
2374
|
+
'round',
|
|
2375
|
+
'space',
|
|
2376
|
+
'blur',
|
|
2377
|
+
]);
|
|
2378
|
+
})($ || ($ = {}));
|
|
2379
|
+
|
|
2380
|
+
;
|
|
2381
|
+
"use strict";
|
|
2382
|
+
var $;
|
|
2383
|
+
(function ($) {
|
|
2384
|
+
$mol_style_attach("mol/gap/gap.css", ":root {\n\t--mol_gap_block: .75rem;\n\t--mol_gap_text: .5rem .75rem;\n\t--mol_gap_round: .25rem;\n\t--mol_gap_space: .25rem;\n\t--mol_gap_blur: .5rem;\n}\n");
|
|
2385
|
+
})($ || ($ = {}));
|
|
2386
|
+
|
|
2387
|
+
;
|
|
2388
|
+
"use strict";
|
|
2389
|
+
var $;
|
|
2390
|
+
(function ($) {
|
|
2391
|
+
function $mol_dom_render_children(el, childNodes) {
|
|
2392
|
+
const node_set = new Set(childNodes);
|
|
2393
|
+
let nextNode = el.firstChild;
|
|
2394
|
+
for (let view of childNodes) {
|
|
2395
|
+
if (view == null)
|
|
2396
|
+
continue;
|
|
2397
|
+
if (view instanceof $mol_dom_context.Node) {
|
|
2398
|
+
while (true) {
|
|
2399
|
+
if (!nextNode) {
|
|
2400
|
+
el.appendChild(view);
|
|
2401
|
+
break;
|
|
2402
|
+
}
|
|
2403
|
+
if (nextNode == view) {
|
|
2404
|
+
nextNode = nextNode.nextSibling;
|
|
2405
|
+
break;
|
|
2406
|
+
}
|
|
2407
|
+
else {
|
|
2408
|
+
if (node_set.has(nextNode)) {
|
|
2409
|
+
el.insertBefore(view, nextNode);
|
|
2410
|
+
break;
|
|
2411
|
+
}
|
|
2412
|
+
else {
|
|
2413
|
+
const nn = nextNode.nextSibling;
|
|
2414
|
+
el.removeChild(nextNode);
|
|
2415
|
+
nextNode = nn;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
else {
|
|
2421
|
+
if (nextNode && nextNode.nodeName === '#text') {
|
|
2422
|
+
const str = String(view);
|
|
2423
|
+
if (nextNode.nodeValue !== str)
|
|
2424
|
+
nextNode.nodeValue = str;
|
|
2425
|
+
nextNode = nextNode.nextSibling;
|
|
2426
|
+
}
|
|
2427
|
+
else {
|
|
2428
|
+
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
2429
|
+
el.insertBefore(textNode, nextNode);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
while (nextNode) {
|
|
2434
|
+
const currNode = nextNode;
|
|
2435
|
+
nextNode = currNode.nextSibling;
|
|
2436
|
+
el.removeChild(currNode);
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
2440
|
+
})($ || ($ = {}));
|
|
2441
|
+
|
|
2442
|
+
;
|
|
2443
|
+
"use strict";
|
|
2444
|
+
|
|
2445
|
+
;
|
|
2446
|
+
"use strict";
|
|
2447
|
+
var $;
|
|
2448
|
+
(function ($) {
|
|
2449
|
+
$.$mol_jsx_prefix = '';
|
|
2450
|
+
$.$mol_jsx_crumbs = '';
|
|
2451
|
+
$.$mol_jsx_booked = null;
|
|
2452
|
+
$.$mol_jsx_document = {
|
|
2453
|
+
getElementById: () => null,
|
|
2454
|
+
createElementNS: (space, name) => $mol_dom_context.document.createElementNS(space, name),
|
|
2455
|
+
createDocumentFragment: () => $mol_dom_context.document.createDocumentFragment(),
|
|
2456
|
+
};
|
|
2457
|
+
$.$mol_jsx_frag = '';
|
|
2458
|
+
function $mol_jsx(Elem, props, ...childNodes) {
|
|
2459
|
+
const id = props && props.id || '';
|
|
2460
|
+
const guid = id ? $.$mol_jsx_prefix ? $.$mol_jsx_prefix + '/' + id : id : $.$mol_jsx_prefix;
|
|
2461
|
+
const crumbs_self = id ? $.$mol_jsx_crumbs.replace(/(\S+)/g, `$1_${id.replace(/\/.*/i, '')}`) : $.$mol_jsx_crumbs;
|
|
2462
|
+
if (Elem && $.$mol_jsx_booked) {
|
|
2463
|
+
if ($.$mol_jsx_booked.has(id)) {
|
|
2464
|
+
$mol_fail(new Error(`JSX already has tag with id ${JSON.stringify(guid)}`));
|
|
2465
|
+
}
|
|
2466
|
+
else {
|
|
2467
|
+
$.$mol_jsx_booked.add(id);
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
let node = guid ? $.$mol_jsx_document.getElementById(guid) : null;
|
|
2471
|
+
if ($.$mol_jsx_prefix) {
|
|
2472
|
+
const prefix_ext = $.$mol_jsx_prefix;
|
|
2473
|
+
const booked_ext = $.$mol_jsx_booked;
|
|
2474
|
+
const crumbs_ext = $.$mol_jsx_crumbs;
|
|
2475
|
+
for (const field in props) {
|
|
2476
|
+
const func = props[field];
|
|
2477
|
+
if (typeof func !== 'function')
|
|
2478
|
+
continue;
|
|
2479
|
+
const wrapper = function (...args) {
|
|
2480
|
+
const prefix = $.$mol_jsx_prefix;
|
|
2481
|
+
const booked = $.$mol_jsx_booked;
|
|
2482
|
+
const crumbs = $.$mol_jsx_crumbs;
|
|
2483
|
+
try {
|
|
2484
|
+
$.$mol_jsx_prefix = prefix_ext;
|
|
2485
|
+
$.$mol_jsx_booked = booked_ext;
|
|
2486
|
+
$.$mol_jsx_crumbs = crumbs_ext;
|
|
2487
|
+
return func.call(this, ...args);
|
|
2488
|
+
}
|
|
2489
|
+
finally {
|
|
2490
|
+
$.$mol_jsx_prefix = prefix;
|
|
2491
|
+
$.$mol_jsx_booked = booked;
|
|
2492
|
+
$.$mol_jsx_crumbs = crumbs;
|
|
2493
|
+
}
|
|
2494
|
+
};
|
|
2495
|
+
$mol_func_name_from(wrapper, func);
|
|
2496
|
+
props[field] = wrapper;
|
|
2497
|
+
}
|
|
2498
|
+
}
|
|
2499
|
+
if (typeof Elem !== 'string') {
|
|
2500
|
+
if ('prototype' in Elem) {
|
|
2501
|
+
const view = node && node[String(Elem)] || new Elem;
|
|
2502
|
+
Object.assign(view, props);
|
|
2503
|
+
view[Symbol.toStringTag] = guid;
|
|
2504
|
+
view.childNodes = childNodes;
|
|
2505
|
+
if (!view.ownerDocument)
|
|
2506
|
+
view.ownerDocument = $.$mol_jsx_document;
|
|
2507
|
+
view.className = (crumbs_self ? crumbs_self + ' ' : '') + (Elem['name'] || Elem);
|
|
2508
|
+
node = view.valueOf();
|
|
2509
|
+
node[String(Elem)] = view;
|
|
2510
|
+
return node;
|
|
2511
|
+
}
|
|
2512
|
+
else {
|
|
2513
|
+
const prefix = $.$mol_jsx_prefix;
|
|
2514
|
+
const booked = $.$mol_jsx_booked;
|
|
2515
|
+
const crumbs = $.$mol_jsx_crumbs;
|
|
2516
|
+
try {
|
|
2517
|
+
$.$mol_jsx_prefix = guid;
|
|
2518
|
+
$.$mol_jsx_booked = new Set;
|
|
2519
|
+
$.$mol_jsx_crumbs = (crumbs_self ? crumbs_self + ' ' : '') + (Elem['name'] || Elem);
|
|
2520
|
+
return Elem(props, ...childNodes);
|
|
2521
|
+
}
|
|
2522
|
+
finally {
|
|
2523
|
+
$.$mol_jsx_prefix = prefix;
|
|
2524
|
+
$.$mol_jsx_booked = booked;
|
|
2525
|
+
$.$mol_jsx_crumbs = crumbs;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
if (!node) {
|
|
2530
|
+
node = Elem
|
|
2531
|
+
? $.$mol_jsx_document.createElementNS(props?.xmlns ?? 'http://www.w3.org/1999/xhtml', Elem)
|
|
2532
|
+
: $.$mol_jsx_document.createDocumentFragment();
|
|
2533
|
+
}
|
|
2534
|
+
$mol_dom_render_children(node, [].concat(...childNodes));
|
|
2535
|
+
if (!Elem)
|
|
2536
|
+
return node;
|
|
2537
|
+
if (guid)
|
|
2538
|
+
node.id = guid;
|
|
2539
|
+
for (const key in props) {
|
|
2540
|
+
if (key === 'id')
|
|
2541
|
+
continue;
|
|
2542
|
+
if (typeof props[key] === 'string') {
|
|
2543
|
+
if (typeof node[key] === 'string')
|
|
2544
|
+
node[key] = props[key];
|
|
2545
|
+
node.setAttribute(key, props[key]);
|
|
2546
|
+
}
|
|
2547
|
+
else if (props[key] &&
|
|
2548
|
+
typeof props[key] === 'object' &&
|
|
2549
|
+
Reflect.getPrototypeOf(props[key]) === Reflect.getPrototypeOf({})) {
|
|
2550
|
+
if (typeof node[key] === 'object') {
|
|
2551
|
+
Object.assign(node[key], props[key]);
|
|
2552
|
+
continue;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
else {
|
|
2556
|
+
node[key] = props[key];
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
if ($.$mol_jsx_crumbs)
|
|
2560
|
+
node.className = (props?.['class'] ? props['class'] + ' ' : '') + crumbs_self;
|
|
2561
|
+
return node;
|
|
2124
2562
|
}
|
|
2125
|
-
$.$
|
|
2126
|
-
})($ || ($ = {}));
|
|
2127
|
-
|
|
2128
|
-
;
|
|
2129
|
-
"use strict";
|
|
2130
|
-
var $;
|
|
2131
|
-
(function ($) {
|
|
2132
|
-
$.$mol_mem = $mol_wire_solo;
|
|
2133
|
-
$.$mol_mem_key = $mol_wire_plex;
|
|
2563
|
+
$.$mol_jsx = $mol_jsx;
|
|
2134
2564
|
})($ || ($ = {}));
|
|
2135
2565
|
|
|
2136
2566
|
;
|
|
@@ -2462,26 +2892,6 @@ var $;
|
|
|
2462
2892
|
$.$mol_dom_qname = $mol_dom_qname;
|
|
2463
2893
|
})($ || ($ = {}));
|
|
2464
2894
|
|
|
2465
|
-
;
|
|
2466
|
-
"use strict";
|
|
2467
|
-
var $;
|
|
2468
|
-
(function ($) {
|
|
2469
|
-
function $mol_wire_probe(task, def) {
|
|
2470
|
-
const warm = $mol_wire_fiber.warm;
|
|
2471
|
-
try {
|
|
2472
|
-
$mol_wire_fiber.warm = false;
|
|
2473
|
-
const res = task();
|
|
2474
|
-
if (res === undefined)
|
|
2475
|
-
return def;
|
|
2476
|
-
return res;
|
|
2477
|
-
}
|
|
2478
|
-
finally {
|
|
2479
|
-
$mol_wire_fiber.warm = warm;
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
$.$mol_wire_probe = $mol_wire_probe;
|
|
2483
|
-
})($ || ($ = {}));
|
|
2484
|
-
|
|
2485
2895
|
;
|
|
2486
2896
|
"use strict";
|
|
2487
2897
|
var $;
|
|
@@ -2512,24 +2922,6 @@ var $;
|
|
|
2512
2922
|
$.$mol_const = $mol_const;
|
|
2513
2923
|
})($ || ($ = {}));
|
|
2514
2924
|
|
|
2515
|
-
;
|
|
2516
|
-
"use strict";
|
|
2517
|
-
var $;
|
|
2518
|
-
(function ($) {
|
|
2519
|
-
function $mol_wire_solid() {
|
|
2520
|
-
let current = $mol_wire_auto();
|
|
2521
|
-
if (current.temp)
|
|
2522
|
-
current = current.host;
|
|
2523
|
-
if (current.reap !== nothing) {
|
|
2524
|
-
current?.sub_on(sub, sub.data.length);
|
|
2525
|
-
}
|
|
2526
|
-
current.reap = nothing;
|
|
2527
|
-
}
|
|
2528
|
-
$.$mol_wire_solid = $mol_wire_solid;
|
|
2529
|
-
const nothing = () => { };
|
|
2530
|
-
const sub = new $mol_wire_pub_sub;
|
|
2531
|
-
})($ || ($ = {}));
|
|
2532
|
-
|
|
2533
2925
|
;
|
|
2534
2926
|
"use strict";
|
|
2535
2927
|
var $;
|
|
@@ -2663,7 +3055,7 @@ var $;
|
|
|
2663
3055
|
"use strict";
|
|
2664
3056
|
var $;
|
|
2665
3057
|
(function ($) {
|
|
2666
|
-
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\
|
|
3058
|
+
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\t/* background: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text); */\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n\toverscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\n}\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"], [mol_view_error=\"$mol_promise_blocker\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"$mol_promise_blocker\"]),\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
|
|
2667
3059
|
})($ || ($ = {}));
|
|
2668
3060
|
|
|
2669
3061
|
;
|
|
@@ -4325,13 +4717,6 @@ var $;
|
|
|
4325
4717
|
$.$mol_print = $mol_print;
|
|
4326
4718
|
})($ || ($ = {}));
|
|
4327
4719
|
|
|
4328
|
-
;
|
|
4329
|
-
"use strict";
|
|
4330
|
-
var $;
|
|
4331
|
-
(function ($) {
|
|
4332
|
-
$.$mol_mem_cached = $mol_wire_probe;
|
|
4333
|
-
})($ || ($ = {}));
|
|
4334
|
-
|
|
4335
4720
|
;
|
|
4336
4721
|
"use strict";
|
|
4337
4722
|
|
|
@@ -5003,68 +5388,6 @@ var $;
|
|
|
5003
5388
|
$.$mol_html_encode = $mol_html_encode;
|
|
5004
5389
|
})($ || ($ = {}));
|
|
5005
5390
|
|
|
5006
|
-
;
|
|
5007
|
-
"use strict";
|
|
5008
|
-
var $;
|
|
5009
|
-
(function ($) {
|
|
5010
|
-
const factories = new WeakMap();
|
|
5011
|
-
function factory(val) {
|
|
5012
|
-
let make = factories.get(val);
|
|
5013
|
-
if (make)
|
|
5014
|
-
return make;
|
|
5015
|
-
make = $mol_func_name_from((...args) => new val(...args), val);
|
|
5016
|
-
factories.set(val, make);
|
|
5017
|
-
return make;
|
|
5018
|
-
}
|
|
5019
|
-
const getters = new WeakMap();
|
|
5020
|
-
function get_prop(host, field) {
|
|
5021
|
-
let props = getters.get(host);
|
|
5022
|
-
let get_val = props?.[field];
|
|
5023
|
-
if (get_val)
|
|
5024
|
-
return get_val;
|
|
5025
|
-
get_val = (next) => {
|
|
5026
|
-
if (next !== undefined)
|
|
5027
|
-
host[field] = next;
|
|
5028
|
-
return host[field];
|
|
5029
|
-
};
|
|
5030
|
-
Object.defineProperty(get_val, 'name', { value: field });
|
|
5031
|
-
if (!props) {
|
|
5032
|
-
props = {};
|
|
5033
|
-
getters.set(host, props);
|
|
5034
|
-
}
|
|
5035
|
-
props[field] = get_val;
|
|
5036
|
-
return get_val;
|
|
5037
|
-
}
|
|
5038
|
-
function $mol_wire_sync(obj) {
|
|
5039
|
-
return new Proxy(obj, {
|
|
5040
|
-
get(obj, field) {
|
|
5041
|
-
let val = obj[field];
|
|
5042
|
-
const temp = $mol_wire_task.getter(typeof val === 'function' ? val : get_prop(obj, field));
|
|
5043
|
-
if (typeof val !== 'function')
|
|
5044
|
-
return temp(obj, []).sync();
|
|
5045
|
-
return function $mol_wire_sync(...args) {
|
|
5046
|
-
const fiber = temp(obj, args);
|
|
5047
|
-
return fiber.sync();
|
|
5048
|
-
};
|
|
5049
|
-
},
|
|
5050
|
-
set(obj, field, next) {
|
|
5051
|
-
const temp = $mol_wire_task.getter(get_prop(obj, field));
|
|
5052
|
-
temp(obj, [next]).sync();
|
|
5053
|
-
return true;
|
|
5054
|
-
},
|
|
5055
|
-
construct(obj, args) {
|
|
5056
|
-
const temp = $mol_wire_task.getter(factory(obj));
|
|
5057
|
-
return temp(obj, args).sync();
|
|
5058
|
-
},
|
|
5059
|
-
apply(obj, self, args) {
|
|
5060
|
-
const temp = $mol_wire_task.getter(obj);
|
|
5061
|
-
return temp(self, args).sync();
|
|
5062
|
-
},
|
|
5063
|
-
});
|
|
5064
|
-
}
|
|
5065
|
-
$.$mol_wire_sync = $mol_wire_sync;
|
|
5066
|
-
})($ || ($ = {}));
|
|
5067
|
-
|
|
5068
5391
|
;
|
|
5069
5392
|
"use strict";
|
|
5070
5393
|
|
|
@@ -5103,132 +5426,6 @@ var $;
|
|
|
5103
5426
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5104
5427
|
})($ || ($ = {}));
|
|
5105
5428
|
|
|
5106
|
-
;
|
|
5107
|
-
"use strict";
|
|
5108
|
-
var $;
|
|
5109
|
-
(function ($) {
|
|
5110
|
-
$.$mol_mem_persist = $mol_wire_solid;
|
|
5111
|
-
})($ || ($ = {}));
|
|
5112
|
-
|
|
5113
|
-
;
|
|
5114
|
-
"use strict";
|
|
5115
|
-
var $;
|
|
5116
|
-
(function ($) {
|
|
5117
|
-
class $mol_storage extends $mol_object2 {
|
|
5118
|
-
static native() {
|
|
5119
|
-
return this.$.$mol_dom_context.navigator.storage ?? {
|
|
5120
|
-
persisted: async () => false,
|
|
5121
|
-
persist: async () => false,
|
|
5122
|
-
estimate: async () => ({}),
|
|
5123
|
-
getDirectory: async () => null,
|
|
5124
|
-
};
|
|
5125
|
-
}
|
|
5126
|
-
static persisted(next, cache) {
|
|
5127
|
-
$mol_mem_persist();
|
|
5128
|
-
if (cache)
|
|
5129
|
-
return Boolean(next);
|
|
5130
|
-
const native = this.native();
|
|
5131
|
-
if (next && !$mol_mem_cached(() => this.persisted())) {
|
|
5132
|
-
native.persist().then(actual => {
|
|
5133
|
-
setTimeout(() => this.persisted(actual, 'cache'), 5000);
|
|
5134
|
-
if (actual)
|
|
5135
|
-
this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
|
|
5136
|
-
else
|
|
5137
|
-
this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
|
|
5138
|
-
});
|
|
5139
|
-
}
|
|
5140
|
-
return next ?? $mol_wire_sync(native).persisted();
|
|
5141
|
-
}
|
|
5142
|
-
static estimate() {
|
|
5143
|
-
return $mol_wire_sync(this.native() ?? {}).estimate();
|
|
5144
|
-
}
|
|
5145
|
-
static dir() {
|
|
5146
|
-
return $mol_wire_sync(this.native()).getDirectory();
|
|
5147
|
-
}
|
|
5148
|
-
}
|
|
5149
|
-
__decorate([
|
|
5150
|
-
$mol_mem
|
|
5151
|
-
], $mol_storage, "native", null);
|
|
5152
|
-
__decorate([
|
|
5153
|
-
$mol_mem
|
|
5154
|
-
], $mol_storage, "persisted", null);
|
|
5155
|
-
$.$mol_storage = $mol_storage;
|
|
5156
|
-
})($ || ($ = {}));
|
|
5157
|
-
|
|
5158
|
-
;
|
|
5159
|
-
"use strict";
|
|
5160
|
-
var $;
|
|
5161
|
-
(function ($) {
|
|
5162
|
-
class $mol_state_local extends $mol_object {
|
|
5163
|
-
static 'native()';
|
|
5164
|
-
static native() {
|
|
5165
|
-
if (this['native()'])
|
|
5166
|
-
return this['native()'];
|
|
5167
|
-
check: try {
|
|
5168
|
-
const native = $mol_dom_context.localStorage;
|
|
5169
|
-
if (!native)
|
|
5170
|
-
break check;
|
|
5171
|
-
native.setItem('', '');
|
|
5172
|
-
native.removeItem('');
|
|
5173
|
-
return this['native()'] = native;
|
|
5174
|
-
}
|
|
5175
|
-
catch (error) {
|
|
5176
|
-
console.warn(error);
|
|
5177
|
-
}
|
|
5178
|
-
return this['native()'] = {
|
|
5179
|
-
getItem(key) {
|
|
5180
|
-
return this[':' + key];
|
|
5181
|
-
},
|
|
5182
|
-
setItem(key, value) {
|
|
5183
|
-
this[':' + key] = value;
|
|
5184
|
-
},
|
|
5185
|
-
removeItem(key) {
|
|
5186
|
-
this[':' + key] = void 0;
|
|
5187
|
-
}
|
|
5188
|
-
};
|
|
5189
|
-
}
|
|
5190
|
-
static changes(next) { return next; }
|
|
5191
|
-
static value(key, next) {
|
|
5192
|
-
this.changes();
|
|
5193
|
-
if (next === void 0)
|
|
5194
|
-
return JSON.parse(this.native().getItem(key) || 'null');
|
|
5195
|
-
if (next === null) {
|
|
5196
|
-
this.native().removeItem(key);
|
|
5197
|
-
}
|
|
5198
|
-
else {
|
|
5199
|
-
this.native().setItem(key, JSON.stringify(next));
|
|
5200
|
-
this.$.$mol_storage.persisted(true);
|
|
5201
|
-
}
|
|
5202
|
-
return next;
|
|
5203
|
-
}
|
|
5204
|
-
prefix() { return ''; }
|
|
5205
|
-
value(key, next) {
|
|
5206
|
-
return $mol_state_local.value(this.prefix() + '.' + key, next);
|
|
5207
|
-
}
|
|
5208
|
-
}
|
|
5209
|
-
__decorate([
|
|
5210
|
-
$mol_mem
|
|
5211
|
-
], $mol_state_local, "changes", null);
|
|
5212
|
-
__decorate([
|
|
5213
|
-
$mol_mem_key
|
|
5214
|
-
], $mol_state_local, "value", null);
|
|
5215
|
-
$.$mol_state_local = $mol_state_local;
|
|
5216
|
-
})($ || ($ = {}));
|
|
5217
|
-
|
|
5218
|
-
;
|
|
5219
|
-
"use strict";
|
|
5220
|
-
var $;
|
|
5221
|
-
(function ($) {
|
|
5222
|
-
self.addEventListener('storage', event => $.$mol_state_local.changes(event));
|
|
5223
|
-
})($ || ($ = {}));
|
|
5224
|
-
|
|
5225
|
-
;
|
|
5226
|
-
"use strict";
|
|
5227
|
-
var $;
|
|
5228
|
-
(function ($) {
|
|
5229
|
-
$.$mol_action = $mol_wire_method;
|
|
5230
|
-
})($ || ($ = {}));
|
|
5231
|
-
|
|
5232
5429
|
;
|
|
5233
5430
|
"use strict";
|
|
5234
5431
|
var $;
|