mam 1.11.755 → 1.11.757

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.js CHANGED
@@ -647,7 +647,7 @@ var $;
647
647
  if (this[$mol_ambient_ref])
648
648
  return this[$mol_ambient_ref];
649
649
  const owner = $mol_owning_get(this);
650
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
650
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
651
651
  }
652
652
  set $(next) {
653
653
  if (this[$mol_ambient_ref])
@@ -2337,6 +2337,69 @@ var $;
2337
2337
  $.$mol_charset_decode = $mol_charset_decode;
2338
2338
  })($ || ($ = {}));
2339
2339
 
2340
+ ;
2341
+ "use strict";
2342
+ var $;
2343
+ (function ($) {
2344
+ let buf = new Uint8Array(2 ** 12);
2345
+ function $mol_charset_encode(str) {
2346
+ const capacity = str.length * 3;
2347
+ if (buf.byteLength < capacity)
2348
+ buf = new Uint8Array(capacity);
2349
+ return buf.slice(0, $mol_charset_encode_to(str, buf));
2350
+ }
2351
+ $.$mol_charset_encode = $mol_charset_encode;
2352
+ function $mol_charset_encode_to(str, buf, from = 0) {
2353
+ let pos = from;
2354
+ for (let i = 0; i < str.length; i++) {
2355
+ let code = str.charCodeAt(i);
2356
+ if (code < 0x80) {
2357
+ buf[pos++] = code;
2358
+ }
2359
+ else if (code < 0x800) {
2360
+ buf[pos++] = 0xc0 | (code >> 6);
2361
+ buf[pos++] = 0x80 | (code & 0x3f);
2362
+ }
2363
+ else if (code < 0xd800 || code >= 0xe000) {
2364
+ buf[pos++] = 0xe0 | (code >> 12);
2365
+ buf[pos++] = 0x80 | ((code >> 6) & 0x3f);
2366
+ buf[pos++] = 0x80 | (code & 0x3f);
2367
+ }
2368
+ else {
2369
+ const point = ((code - 0xd800) << 10) + str.charCodeAt(++i) + 0x2400;
2370
+ buf[pos++] = 0xf0 | (point >> 18);
2371
+ buf[pos++] = 0x80 | ((point >> 12) & 0x3f);
2372
+ buf[pos++] = 0x80 | ((point >> 6) & 0x3f);
2373
+ buf[pos++] = 0x80 | (point & 0x3f);
2374
+ }
2375
+ }
2376
+ return pos - from;
2377
+ }
2378
+ $.$mol_charset_encode_to = $mol_charset_encode_to;
2379
+ })($ || ($ = {}));
2380
+
2381
+ ;
2382
+ "use strict";
2383
+ var $;
2384
+ (function ($) {
2385
+ class $mol_file_transaction extends $mol_object {
2386
+ path() { return ''; }
2387
+ modes() { return []; }
2388
+ write(options) {
2389
+ return 0;
2390
+ }
2391
+ read() {
2392
+ return new Uint8Array();
2393
+ }
2394
+ truncate(size) { }
2395
+ close() { }
2396
+ destructor() {
2397
+ this.close();
2398
+ }
2399
+ }
2400
+ $.$mol_file_transaction = $mol_file_transaction;
2401
+ })($ || ($ = {}));
2402
+
2340
2403
  ;
2341
2404
  "use strict";
2342
2405
 
@@ -2392,6 +2455,24 @@ require = (req => Object.assign(function require(name) {
2392
2455
  return $node[name];
2393
2456
  }, req))(require);
2394
2457
 
2458
+ ;
2459
+ "use strict";
2460
+ var $;
2461
+ (function ($) {
2462
+ function $mol_wire_solid() {
2463
+ let current = $mol_wire_auto();
2464
+ if (current.temp)
2465
+ current = current.host;
2466
+ if (current.reap !== nothing) {
2467
+ current?.sub_on(sub, sub.data.length);
2468
+ }
2469
+ current.reap = nothing;
2470
+ }
2471
+ $.$mol_wire_solid = $mol_wire_solid;
2472
+ const nothing = () => { };
2473
+ const sub = new $mol_wire_pub_sub;
2474
+ })($ || ($ = {}));
2475
+
2395
2476
  ;
2396
2477
  "use strict";
2397
2478
  var $;
@@ -2590,58 +2671,6 @@ var $;
2590
2671
  $.$mol_exec = $mol_exec;
2591
2672
  })($ || ($ = {}));
2592
2673
 
2593
- ;
2594
- "use strict";
2595
- var $;
2596
- (function ($) {
2597
- const TextEncoder = globalThis.TextEncoder ?? $node.util.TextEncoder;
2598
- const encoder = new TextEncoder();
2599
- function $mol_charset_encode(value) {
2600
- return encoder.encode(value);
2601
- }
2602
- $.$mol_charset_encode = $mol_charset_encode;
2603
- })($ || ($ = {}));
2604
-
2605
- ;
2606
- "use strict";
2607
- var $;
2608
- (function ($) {
2609
- class $mol_file_transaction extends $mol_object {
2610
- path() { return ''; }
2611
- modes() { return []; }
2612
- write(options) {
2613
- return 0;
2614
- }
2615
- read() {
2616
- return new Uint8Array();
2617
- }
2618
- truncate(size) { }
2619
- close() { }
2620
- destructor() {
2621
- this.close();
2622
- }
2623
- }
2624
- $.$mol_file_transaction = $mol_file_transaction;
2625
- })($ || ($ = {}));
2626
-
2627
- ;
2628
- "use strict";
2629
- var $;
2630
- (function ($) {
2631
- function $mol_wire_solid() {
2632
- let current = $mol_wire_auto();
2633
- if (current.temp)
2634
- current = current.host;
2635
- if (current.reap !== nothing) {
2636
- current?.sub_on(sub, sub.data.length);
2637
- }
2638
- current.reap = nothing;
2639
- }
2640
- $.$mol_wire_solid = $mol_wire_solid;
2641
- const nothing = () => { };
2642
- const sub = new $mol_wire_pub_sub;
2643
- })($ || ($ = {}));
2644
-
2645
2674
  ;
2646
2675
  "use strict";
2647
2676
  var $;