@gjsify/example-dom-three-geometry-teapot 0.2.0 → 0.3.1
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/dist/gjs.js +1637 -173
- package/package.json +4 -4
package/dist/gjs.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
if(typeof globalThis.process==="undefined"){const _s=imports.system,_G=imports.gi.GLib;globalThis.process={platform:"linux",arch:"x64",version:"v20.0.0",env:new Proxy({},{get(_,p){return typeof p==="string"?(_G.getenv(p)??undefined):undefined},set(_,p,v){if(typeof p==="string")_G.setenv(p,String(v),true);return true},has(_,p){return typeof p==="string"&&_G.getenv(p)!==null},deleteProperty(_,p){if(typeof p==="string")_G.unsetenv(p);return true},ownKeys(){return _G.listenv()??[]},getOwnPropertyDescriptor(_,p){const v=_G.getenv(p);return v!==null?{value:v,writable:true,enumerable:true,configurable:true}:undefined}}),argv:_s?.programArgs?["gjs",_s.programInvocationName||"",..._s.programArgs]:["gjs"],versions:{},config:{},cwd(){return _G.get_current_dir()||"/"},exit(c){_s.exit(c??0)},stderr:{write(s){printerr(s)}},stdout:{write(s){print(s)}},stdin:null,exitCode:undefined,nextTick(fn,...a){Promise.resolve().then(()=>fn(...a))},hrtime(t){return t?[0,0]:[0,0]},};}
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -71,10 +72,10 @@ var init_console_gjs = __esm({
|
|
|
71
72
|
_groupIndentation;
|
|
72
73
|
_timers = /* @__PURE__ */ new Map();
|
|
73
74
|
_counters = /* @__PURE__ */ new Map();
|
|
74
|
-
constructor(stdoutOrOptions,
|
|
75
|
+
constructor(stdoutOrOptions, stderr2) {
|
|
75
76
|
if (stdoutOrOptions && typeof stdoutOrOptions.write === "function") {
|
|
76
77
|
this._stdout = stdoutOrOptions;
|
|
77
|
-
this._stderr =
|
|
78
|
+
this._stderr = stderr2 || this._stdout;
|
|
78
79
|
} else if (stdoutOrOptions && typeof stdoutOrOptions === "object") {
|
|
79
80
|
const opts = stdoutOrOptions;
|
|
80
81
|
this._stdout = opts.stdout;
|
|
@@ -253,10 +254,22 @@ var init_console_gjs = __esm({
|
|
|
253
254
|
});
|
|
254
255
|
|
|
255
256
|
// ../../../packages/gjs/utils/lib/esm/callable.js
|
|
257
|
+
function makeCallable(Cls) {
|
|
258
|
+
return new Proxy(Cls, {
|
|
259
|
+
apply(target, thisArg, args) {
|
|
260
|
+
const tmp = Reflect.construct(target, args, target);
|
|
261
|
+
for (const key of Reflect.ownKeys(tmp)) {
|
|
262
|
+
const desc = Object.getOwnPropertyDescriptor(tmp, key);
|
|
263
|
+
if (desc) Object.defineProperty(thisArg, key, desc);
|
|
264
|
+
}
|
|
265
|
+
return thisArg;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
256
269
|
var init_callable = __esm({
|
|
257
270
|
"../../../packages/gjs/utils/lib/esm/callable.js"() {
|
|
258
271
|
init_console_gjs();
|
|
259
|
-
|
|
272
|
+
init_auto_globals_53fe98c6e6();
|
|
260
273
|
}
|
|
261
274
|
});
|
|
262
275
|
|
|
@@ -298,7 +311,7 @@ var B64_CHARS, B64_LOOKUP;
|
|
|
298
311
|
var init_base64 = __esm({
|
|
299
312
|
"../../../packages/gjs/utils/lib/esm/base64.js"() {
|
|
300
313
|
init_console_gjs();
|
|
301
|
-
|
|
314
|
+
init_auto_globals_53fe98c6e6();
|
|
302
315
|
B64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
303
316
|
B64_LOOKUP = new Uint8Array(256);
|
|
304
317
|
for (let i = 0; i < B64_CHARS.length; i++) B64_LOOKUP[B64_CHARS.charCodeAt(i)] = i;
|
|
@@ -309,7 +322,7 @@ var init_base64 = __esm({
|
|
|
309
322
|
var init_byte_array = __esm({
|
|
310
323
|
"../../../packages/gjs/utils/lib/esm/byte-array.js"() {
|
|
311
324
|
init_console_gjs();
|
|
312
|
-
|
|
325
|
+
init_auto_globals_53fe98c6e6();
|
|
313
326
|
}
|
|
314
327
|
});
|
|
315
328
|
|
|
@@ -319,7 +332,7 @@ var glib_2_0_default;
|
|
|
319
332
|
var init_glib_2_0 = __esm({
|
|
320
333
|
"../../../node_modules/@girs/glib-2.0/glib-2.0.js"() {
|
|
321
334
|
init_console_gjs();
|
|
322
|
-
|
|
335
|
+
init_auto_globals_53fe98c6e6();
|
|
323
336
|
glib_2_0_default = GLib;
|
|
324
337
|
}
|
|
325
338
|
});
|
|
@@ -329,7 +342,7 @@ var glib_2_default;
|
|
|
329
342
|
var init_glib_2 = __esm({
|
|
330
343
|
"../../../node_modules/@girs/glib-2.0/index.js"() {
|
|
331
344
|
init_console_gjs();
|
|
332
|
-
|
|
345
|
+
init_auto_globals_53fe98c6e6();
|
|
333
346
|
init_glib_2_0();
|
|
334
347
|
glib_2_default = glib_2_0_default;
|
|
335
348
|
}
|
|
@@ -340,7 +353,7 @@ var byteArray;
|
|
|
340
353
|
var init_cli = __esm({
|
|
341
354
|
"../../../packages/gjs/utils/lib/esm/cli.js"() {
|
|
342
355
|
init_console_gjs();
|
|
343
|
-
|
|
356
|
+
init_auto_globals_53fe98c6e6();
|
|
344
357
|
init_glib_2();
|
|
345
358
|
byteArray = imports.byteArray;
|
|
346
359
|
}
|
|
@@ -350,7 +363,7 @@ var init_cli = __esm({
|
|
|
350
363
|
var init_defer = __esm({
|
|
351
364
|
"../../../packages/gjs/utils/lib/esm/defer.js"() {
|
|
352
365
|
init_console_gjs();
|
|
353
|
-
|
|
366
|
+
init_auto_globals_53fe98c6e6();
|
|
354
367
|
}
|
|
355
368
|
});
|
|
356
369
|
|
|
@@ -389,7 +402,7 @@ var VALID_ENCODINGS;
|
|
|
389
402
|
var init_encoding = __esm({
|
|
390
403
|
"../../../packages/gjs/utils/lib/esm/encoding.js"() {
|
|
391
404
|
init_console_gjs();
|
|
392
|
-
|
|
405
|
+
init_auto_globals_53fe98c6e6();
|
|
393
406
|
VALID_ENCODINGS = ["utf8", "ascii", "latin1", "binary", "base64", "base64url", "hex", "ucs2", "utf16le"];
|
|
394
407
|
}
|
|
395
408
|
});
|
|
@@ -403,15 +416,34 @@ function registerGlobal(name2, value2) {
|
|
|
403
416
|
var init_globals = __esm({
|
|
404
417
|
"../../../packages/gjs/utils/lib/esm/globals.js"() {
|
|
405
418
|
init_console_gjs();
|
|
406
|
-
|
|
419
|
+
init_auto_globals_53fe98c6e6();
|
|
407
420
|
}
|
|
408
421
|
});
|
|
409
422
|
|
|
410
423
|
// ../../../packages/gjs/utils/lib/esm/error.js
|
|
424
|
+
var initErrorV8Methods;
|
|
411
425
|
var init_error = __esm({
|
|
412
426
|
"../../../packages/gjs/utils/lib/esm/error.js"() {
|
|
413
427
|
init_console_gjs();
|
|
414
|
-
|
|
428
|
+
init_auto_globals_53fe98c6e6();
|
|
429
|
+
initErrorV8Methods = (ErrorConstructor) => {
|
|
430
|
+
if (!Error.captureStackTrace) {
|
|
431
|
+
Error.captureStackTrace = function(targetObject, constructorOpt) {
|
|
432
|
+
const container = new Error();
|
|
433
|
+
const target = constructorOpt || targetObject;
|
|
434
|
+
Object.defineProperty(target, "stack", {
|
|
435
|
+
configurable: true,
|
|
436
|
+
get: function getStack() {
|
|
437
|
+
var stack = container.stack;
|
|
438
|
+
Object.defineProperty(this, "stack", {
|
|
439
|
+
value: stack
|
|
440
|
+
});
|
|
441
|
+
return stack;
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
};
|
|
415
447
|
}
|
|
416
448
|
});
|
|
417
449
|
|
|
@@ -420,7 +452,7 @@ var byteArray2;
|
|
|
420
452
|
var init_file = __esm({
|
|
421
453
|
"../../../packages/gjs/utils/lib/esm/file.js"() {
|
|
422
454
|
init_console_gjs();
|
|
423
|
-
|
|
455
|
+
init_auto_globals_53fe98c6e6();
|
|
424
456
|
init_glib_2();
|
|
425
457
|
byteArray2 = imports.byteArray;
|
|
426
458
|
}
|
|
@@ -432,7 +464,7 @@ var gio_2_0_default;
|
|
|
432
464
|
var init_gio_2_0 = __esm({
|
|
433
465
|
"../../../node_modules/@girs/gio-2.0/gio-2.0.js"() {
|
|
434
466
|
init_console_gjs();
|
|
435
|
-
|
|
467
|
+
init_auto_globals_53fe98c6e6();
|
|
436
468
|
gio_2_0_default = Gio;
|
|
437
469
|
}
|
|
438
470
|
});
|
|
@@ -442,7 +474,7 @@ var gio_2_default;
|
|
|
442
474
|
var init_gio_2 = __esm({
|
|
443
475
|
"../../../node_modules/@girs/gio-2.0/index.js"() {
|
|
444
476
|
init_console_gjs();
|
|
445
|
-
|
|
477
|
+
init_auto_globals_53fe98c6e6();
|
|
446
478
|
init_gio_2_0();
|
|
447
479
|
gio_2_default = gio_2_0_default;
|
|
448
480
|
}
|
|
@@ -453,7 +485,7 @@ import GioUnix from "gi://GioUnix?version=2.0";
|
|
|
453
485
|
var init_giounix_2_0 = __esm({
|
|
454
486
|
"../../../node_modules/@girs/giounix-2.0/giounix-2.0.js"() {
|
|
455
487
|
init_console_gjs();
|
|
456
|
-
|
|
488
|
+
init_auto_globals_53fe98c6e6();
|
|
457
489
|
}
|
|
458
490
|
});
|
|
459
491
|
|
|
@@ -461,7 +493,7 @@ var init_giounix_2_0 = __esm({
|
|
|
461
493
|
var init_giounix_2 = __esm({
|
|
462
494
|
"../../../node_modules/@girs/giounix-2.0/index.js"() {
|
|
463
495
|
init_console_gjs();
|
|
464
|
-
|
|
496
|
+
init_auto_globals_53fe98c6e6();
|
|
465
497
|
init_giounix_2_0();
|
|
466
498
|
}
|
|
467
499
|
});
|
|
@@ -470,7 +502,7 @@ var init_giounix_2 = __esm({
|
|
|
470
502
|
var init_fs = __esm({
|
|
471
503
|
"../../../packages/gjs/utils/lib/esm/fs.js"() {
|
|
472
504
|
init_console_gjs();
|
|
473
|
-
|
|
505
|
+
init_auto_globals_53fe98c6e6();
|
|
474
506
|
init_gio_2();
|
|
475
507
|
init_giounix_2();
|
|
476
508
|
}
|
|
@@ -481,7 +513,7 @@ var byteArray3;
|
|
|
481
513
|
var init_gio = __esm({
|
|
482
514
|
"../../../packages/gjs/utils/lib/esm/gio.js"() {
|
|
483
515
|
init_console_gjs();
|
|
484
|
-
|
|
516
|
+
init_auto_globals_53fe98c6e6();
|
|
485
517
|
init_glib_2();
|
|
486
518
|
byteArray3 = imports.byteArray;
|
|
487
519
|
}
|
|
@@ -491,7 +523,7 @@ var init_gio = __esm({
|
|
|
491
523
|
var init_gio_errors = __esm({
|
|
492
524
|
"../../../packages/gjs/utils/lib/esm/gio-errors.js"() {
|
|
493
525
|
init_console_gjs();
|
|
494
|
-
|
|
526
|
+
init_auto_globals_53fe98c6e6();
|
|
495
527
|
}
|
|
496
528
|
});
|
|
497
529
|
|
|
@@ -500,7 +532,7 @@ var warnNotImplemented;
|
|
|
500
532
|
var init_message = __esm({
|
|
501
533
|
"../../../packages/gjs/utils/lib/esm/message.js"() {
|
|
502
534
|
init_console_gjs();
|
|
503
|
-
|
|
535
|
+
init_auto_globals_53fe98c6e6();
|
|
504
536
|
warnNotImplemented = (msg) => {
|
|
505
537
|
const message = msg ? `Not implemented: ${msg}` : "Not implemented";
|
|
506
538
|
console.warn(message);
|
|
@@ -510,10 +542,14 @@ var init_message = __esm({
|
|
|
510
542
|
});
|
|
511
543
|
|
|
512
544
|
// ../../../packages/gjs/utils/lib/esm/microtask.js
|
|
545
|
+
var queueMicrotask2;
|
|
513
546
|
var init_microtask = __esm({
|
|
514
547
|
"../../../packages/gjs/utils/lib/esm/microtask.js"() {
|
|
515
548
|
init_console_gjs();
|
|
516
|
-
|
|
549
|
+
init_auto_globals_53fe98c6e6();
|
|
550
|
+
queueMicrotask2 = (fn) => {
|
|
551
|
+
Promise.resolve().then(fn);
|
|
552
|
+
};
|
|
517
553
|
}
|
|
518
554
|
});
|
|
519
555
|
|
|
@@ -521,7 +557,7 @@ var init_microtask = __esm({
|
|
|
521
557
|
var init_next_tick = __esm({
|
|
522
558
|
"../../../packages/gjs/utils/lib/esm/next-tick.js"() {
|
|
523
559
|
init_console_gjs();
|
|
524
|
-
|
|
560
|
+
init_auto_globals_53fe98c6e6();
|
|
525
561
|
}
|
|
526
562
|
});
|
|
527
563
|
|
|
@@ -530,7 +566,7 @@ var File;
|
|
|
530
566
|
var init_path = __esm({
|
|
531
567
|
"../../../packages/gjs/utils/lib/esm/path.js"() {
|
|
532
568
|
init_console_gjs();
|
|
533
|
-
|
|
569
|
+
init_auto_globals_53fe98c6e6();
|
|
534
570
|
init_gio_2();
|
|
535
571
|
init_glib_2();
|
|
536
572
|
({ File } = gio_2_default);
|
|
@@ -542,16 +578,41 @@ var toString;
|
|
|
542
578
|
var init_structured_clone = __esm({
|
|
543
579
|
"../../../packages/gjs/utils/lib/esm/structured-clone.js"() {
|
|
544
580
|
init_console_gjs();
|
|
545
|
-
|
|
581
|
+
init_auto_globals_53fe98c6e6();
|
|
546
582
|
({ toString } = Object.prototype);
|
|
547
583
|
}
|
|
548
584
|
});
|
|
549
585
|
|
|
550
586
|
// ../../../packages/gjs/utils/lib/esm/main-loop.js
|
|
587
|
+
function ensureMainLoop() {
|
|
588
|
+
const gjsImports = globalThis.imports;
|
|
589
|
+
if (!gjsImports) return void 0;
|
|
590
|
+
if (_started) return _loop;
|
|
591
|
+
const GLibModule = gjsImports.gi.GLib;
|
|
592
|
+
_loop = new GLibModule.MainLoop(null, false);
|
|
593
|
+
_started = true;
|
|
594
|
+
if (GLibModule.main_depth() === 0) {
|
|
595
|
+
try {
|
|
596
|
+
_loop.runAsync();
|
|
597
|
+
} catch {
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
return _loop;
|
|
601
|
+
}
|
|
602
|
+
function quitMainLoop() {
|
|
603
|
+
if (_loop) {
|
|
604
|
+
_loop.quit();
|
|
605
|
+
_started = false;
|
|
606
|
+
_loop = null;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
var _started, _loop;
|
|
551
610
|
var init_main_loop = __esm({
|
|
552
611
|
"../../../packages/gjs/utils/lib/esm/main-loop.js"() {
|
|
553
612
|
init_console_gjs();
|
|
554
|
-
|
|
613
|
+
init_auto_globals_53fe98c6e6();
|
|
614
|
+
_started = false;
|
|
615
|
+
_loop = null;
|
|
555
616
|
}
|
|
556
617
|
});
|
|
557
618
|
|
|
@@ -559,7 +620,7 @@ var init_main_loop = __esm({
|
|
|
559
620
|
var init_esm = __esm({
|
|
560
621
|
"../../../packages/gjs/utils/lib/esm/index.js"() {
|
|
561
622
|
init_console_gjs();
|
|
562
|
-
|
|
623
|
+
init_auto_globals_53fe98c6e6();
|
|
563
624
|
init_callable();
|
|
564
625
|
init_base64();
|
|
565
626
|
init_byte_array();
|
|
@@ -586,7 +647,7 @@ var _encoder, BlobPolyfill, FilePolyfill, Blob2, File2;
|
|
|
586
647
|
var init_blob = __esm({
|
|
587
648
|
"../../../packages/node/buffer/lib/esm/blob.js"() {
|
|
588
649
|
init_console_gjs();
|
|
589
|
-
|
|
650
|
+
init_auto_globals_53fe98c6e6();
|
|
590
651
|
_encoder = new TextEncoder();
|
|
591
652
|
BlobPolyfill = class _BlobPolyfill {
|
|
592
653
|
_parts;
|
|
@@ -656,7 +717,7 @@ var init_blob = __esm({
|
|
|
656
717
|
var init_register = __esm({
|
|
657
718
|
"../../../packages/node/buffer/lib/esm/register.js"() {
|
|
658
719
|
init_console_gjs();
|
|
659
|
-
|
|
720
|
+
init_auto_globals_53fe98c6e6();
|
|
660
721
|
init_esm();
|
|
661
722
|
init_blob();
|
|
662
723
|
registerGlobal("Blob", Blob2);
|
|
@@ -758,7 +819,7 @@ var NAMED_COLORS, BLACK;
|
|
|
758
819
|
var init_color = __esm({
|
|
759
820
|
"../../../packages/dom/canvas2d-core/lib/esm/color.js"() {
|
|
760
821
|
init_console_gjs();
|
|
761
|
-
|
|
822
|
+
init_auto_globals_53fe98c6e6();
|
|
762
823
|
NAMED_COLORS = {
|
|
763
824
|
aliceblue: "#f0f8ff",
|
|
764
825
|
antiquewhite: "#faebd7",
|
|
@@ -1017,7 +1078,7 @@ var COMPOSITE_OP_MAP, LINE_CAP_MAP, LINE_JOIN_MAP;
|
|
|
1017
1078
|
var init_cairo_utils = __esm({
|
|
1018
1079
|
"../../../packages/dom/canvas2d-core/lib/esm/cairo-utils.js"() {
|
|
1019
1080
|
init_console_gjs();
|
|
1020
|
-
|
|
1081
|
+
init_auto_globals_53fe98c6e6();
|
|
1021
1082
|
COMPOSITE_OP_MAP = {
|
|
1022
1083
|
"source-over": 2,
|
|
1023
1084
|
// OVER
|
|
@@ -1123,7 +1184,7 @@ function cloneState(state) {
|
|
|
1123
1184
|
var init_canvas_state = __esm({
|
|
1124
1185
|
"../../../packages/dom/canvas2d-core/lib/esm/canvas-state.js"() {
|
|
1125
1186
|
init_console_gjs();
|
|
1126
|
-
|
|
1187
|
+
init_auto_globals_53fe98c6e6();
|
|
1127
1188
|
init_color();
|
|
1128
1189
|
}
|
|
1129
1190
|
});
|
|
@@ -1133,7 +1194,7 @@ var OurImageData;
|
|
|
1133
1194
|
var init_image_data = __esm({
|
|
1134
1195
|
"../../../packages/dom/canvas2d-core/lib/esm/image-data.js"() {
|
|
1135
1196
|
init_console_gjs();
|
|
1136
|
-
|
|
1197
|
+
init_auto_globals_53fe98c6e6();
|
|
1137
1198
|
OurImageData = class {
|
|
1138
1199
|
constructor(swOrData, sh, maybeHeight) {
|
|
1139
1200
|
this.colorSpace = "srgb";
|
|
@@ -1162,7 +1223,7 @@ var CanvasGradient;
|
|
|
1162
1223
|
var init_canvas_gradient = __esm({
|
|
1163
1224
|
"../../../packages/dom/canvas2d-core/lib/esm/canvas-gradient.js"() {
|
|
1164
1225
|
init_console_gjs();
|
|
1165
|
-
|
|
1226
|
+
init_auto_globals_53fe98c6e6();
|
|
1166
1227
|
init_color();
|
|
1167
1228
|
CanvasGradient = class {
|
|
1168
1229
|
constructor(type, x0, y0, x1, y1, r0, r1) {
|
|
@@ -1192,7 +1253,7 @@ var CanvasPattern;
|
|
|
1192
1253
|
var init_canvas_pattern = __esm({
|
|
1193
1254
|
"../../../packages/dom/canvas2d-core/lib/esm/canvas-pattern.js"() {
|
|
1194
1255
|
init_console_gjs();
|
|
1195
|
-
|
|
1256
|
+
init_auto_globals_53fe98c6e6();
|
|
1196
1257
|
CanvasPattern = class _CanvasPattern {
|
|
1197
1258
|
constructor(surface, repetition) {
|
|
1198
1259
|
this._pattern = new Cairo2.SurfacePattern(surface);
|
|
@@ -1254,7 +1315,7 @@ var Path2D;
|
|
|
1254
1315
|
var init_canvas_path = __esm({
|
|
1255
1316
|
"../../../packages/dom/canvas2d-core/lib/esm/canvas-path.js"() {
|
|
1256
1317
|
init_console_gjs();
|
|
1257
|
-
|
|
1318
|
+
init_auto_globals_53fe98c6e6();
|
|
1258
1319
|
init_cairo_utils();
|
|
1259
1320
|
Path2D = class _Path2D {
|
|
1260
1321
|
constructor(pathOrSvg) {
|
|
@@ -1368,7 +1429,7 @@ var CanvasRenderingContext2D;
|
|
|
1368
1429
|
var init_canvas_rendering_context_2d = __esm({
|
|
1369
1430
|
"../../../packages/dom/canvas2d-core/lib/esm/canvas-rendering-context-2d.js"() {
|
|
1370
1431
|
init_console_gjs();
|
|
1371
|
-
|
|
1432
|
+
init_auto_globals_53fe98c6e6();
|
|
1372
1433
|
init_color();
|
|
1373
1434
|
init_cairo_utils();
|
|
1374
1435
|
init_canvas_state();
|
|
@@ -2355,7 +2416,7 @@ var init_canvas_rendering_context_2d = __esm({
|
|
|
2355
2416
|
var init_esm2 = __esm({
|
|
2356
2417
|
"../../../packages/dom/canvas2d-core/lib/esm/index.js"() {
|
|
2357
2418
|
init_console_gjs();
|
|
2358
|
-
|
|
2419
|
+
init_auto_globals_53fe98c6e6();
|
|
2359
2420
|
init_canvas_rendering_context_2d();
|
|
2360
2421
|
init_canvas_gradient();
|
|
2361
2422
|
init_canvas_pattern();
|
|
@@ -2370,7 +2431,7 @@ var DOMExceptionCodes, _DOMExceptionPolyfill, DOMException2;
|
|
|
2370
2431
|
var init_esm3 = __esm({
|
|
2371
2432
|
"../../../packages/web/dom-exception/lib/esm/index.js"() {
|
|
2372
2433
|
init_console_gjs();
|
|
2373
|
-
|
|
2434
|
+
init_auto_globals_53fe98c6e6();
|
|
2374
2435
|
DOMExceptionCodes = {
|
|
2375
2436
|
IndexSizeError: 1,
|
|
2376
2437
|
HierarchyRequestError: 3,
|
|
@@ -2412,7 +2473,7 @@ var kType, kBubbles, kCancelable, kComposed, kTarget, kCurrentTarget, kEventPhas
|
|
|
2412
2473
|
var init_esm4 = __esm({
|
|
2413
2474
|
"../../../packages/web/dom-events/lib/esm/index.js"() {
|
|
2414
2475
|
init_console_gjs();
|
|
2415
|
-
|
|
2476
|
+
init_auto_globals_53fe98c6e6();
|
|
2416
2477
|
init_esm3();
|
|
2417
2478
|
kType = /* @__PURE__ */ Symbol("type");
|
|
2418
2479
|
kBubbles = /* @__PURE__ */ Symbol("bubbles");
|
|
@@ -2604,7 +2665,7 @@ var init_esm4 = __esm({
|
|
|
2604
2665
|
addEventListener(type, callback, options) {
|
|
2605
2666
|
if (callback === null) return;
|
|
2606
2667
|
const capture = typeof options === "boolean" ? options : options?.capture ?? false;
|
|
2607
|
-
const
|
|
2668
|
+
const once2 = typeof options === "object" ? options?.once ?? false : false;
|
|
2608
2669
|
const passive = typeof options === "object" ? options?.passive ?? false : false;
|
|
2609
2670
|
let list = this._listeners.get(type);
|
|
2610
2671
|
if (!list) {
|
|
@@ -2614,7 +2675,7 @@ var init_esm4 = __esm({
|
|
|
2614
2675
|
for (const entry2 of list) {
|
|
2615
2676
|
if (entry2.listener === callback && entry2.capture === capture) return;
|
|
2616
2677
|
}
|
|
2617
|
-
const entry = { listener: callback, capture, once, passive, removed: false };
|
|
2678
|
+
const entry = { listener: callback, capture, once: once2, passive, removed: false };
|
|
2618
2679
|
list.push(entry);
|
|
2619
2680
|
if (typeof options === "object" && options?.signal) {
|
|
2620
2681
|
options.signal.addEventListener("abort", () => {
|
|
@@ -2876,7 +2937,7 @@ var NodeType;
|
|
|
2876
2937
|
var init_node_type = __esm({
|
|
2877
2938
|
"../../../packages/dom/dom-elements/lib/esm/node-type.js"() {
|
|
2878
2939
|
init_console_gjs();
|
|
2879
|
-
|
|
2940
|
+
init_auto_globals_53fe98c6e6();
|
|
2880
2941
|
NodeType = {
|
|
2881
2942
|
ELEMENT_NODE: 1,
|
|
2882
2943
|
ATTRIBUTE_NODE: 2,
|
|
@@ -2896,7 +2957,7 @@ var NodeList;
|
|
|
2896
2957
|
var init_node_list = __esm({
|
|
2897
2958
|
"../../../packages/dom/dom-elements/lib/esm/node-list.js"() {
|
|
2898
2959
|
init_console_gjs();
|
|
2899
|
-
|
|
2960
|
+
init_auto_globals_53fe98c6e6();
|
|
2900
2961
|
NodeList = class {
|
|
2901
2962
|
constructor(items) {
|
|
2902
2963
|
this._items = items;
|
|
@@ -2936,7 +2997,7 @@ var nodeType, parentNode, childNodesList, elementChildren, isConnected, tagName,
|
|
|
2936
2997
|
var init_property_symbol = __esm({
|
|
2937
2998
|
"../../../packages/dom/dom-elements/lib/esm/property-symbol.js"() {
|
|
2938
2999
|
init_console_gjs();
|
|
2939
|
-
|
|
3000
|
+
init_auto_globals_53fe98c6e6();
|
|
2940
3001
|
nodeType = /* @__PURE__ */ Symbol("nodeType");
|
|
2941
3002
|
parentNode = /* @__PURE__ */ Symbol("parentNode");
|
|
2942
3003
|
childNodesList = /* @__PURE__ */ Symbol("childNodesList");
|
|
@@ -2959,7 +3020,7 @@ var _a, _b, _c, _d, _e, Node;
|
|
|
2959
3020
|
var init_node = __esm({
|
|
2960
3021
|
"../../../packages/dom/dom-elements/lib/esm/node.js"() {
|
|
2961
3022
|
init_console_gjs();
|
|
2962
|
-
|
|
3023
|
+
init_auto_globals_53fe98c6e6();
|
|
2963
3024
|
init_esm4();
|
|
2964
3025
|
init_node_type();
|
|
2965
3026
|
init_node_list();
|
|
@@ -3209,7 +3270,7 @@ var Attr;
|
|
|
3209
3270
|
var init_attr = __esm({
|
|
3210
3271
|
"../../../packages/dom/dom-elements/lib/esm/attr.js"() {
|
|
3211
3272
|
init_console_gjs();
|
|
3212
|
-
|
|
3273
|
+
init_auto_globals_53fe98c6e6();
|
|
3213
3274
|
init_property_symbol();
|
|
3214
3275
|
Attr = class {
|
|
3215
3276
|
constructor(name2, value2, namespaceURI2 = null, prefix2 = null, ownerElement2 = null) {
|
|
@@ -3246,7 +3307,7 @@ var NamespaceURI;
|
|
|
3246
3307
|
var init_namespace_uri = __esm({
|
|
3247
3308
|
"../../../packages/dom/dom-elements/lib/esm/namespace-uri.js"() {
|
|
3248
3309
|
init_console_gjs();
|
|
3249
|
-
|
|
3310
|
+
init_auto_globals_53fe98c6e6();
|
|
3250
3311
|
NamespaceURI = {
|
|
3251
3312
|
html: "http://www.w3.org/1999/xhtml",
|
|
3252
3313
|
svg: "http://www.w3.org/2000/svg",
|
|
@@ -3262,7 +3323,7 @@ var NamedNodeMap;
|
|
|
3262
3323
|
var init_named_node_map = __esm({
|
|
3263
3324
|
"../../../packages/dom/dom-elements/lib/esm/named-node-map.js"() {
|
|
3264
3325
|
init_console_gjs();
|
|
3265
|
-
|
|
3326
|
+
init_auto_globals_53fe98c6e6();
|
|
3266
3327
|
init_attr();
|
|
3267
3328
|
init_namespace_uri();
|
|
3268
3329
|
NamedNodeMap = class {
|
|
@@ -3392,7 +3453,7 @@ var _a2, _b2, _c2, _d2, _e2, _f, Element;
|
|
|
3392
3453
|
var init_element = __esm({
|
|
3393
3454
|
"../../../packages/dom/dom-elements/lib/esm/element.js"() {
|
|
3394
3455
|
init_console_gjs();
|
|
3395
|
-
|
|
3456
|
+
init_auto_globals_53fe98c6e6();
|
|
3396
3457
|
init_node();
|
|
3397
3458
|
init_node_type();
|
|
3398
3459
|
init_named_node_map();
|
|
@@ -3644,7 +3705,7 @@ var CSSStyleDeclaration, HTMLElement;
|
|
|
3644
3705
|
var init_html_element = __esm({
|
|
3645
3706
|
"../../../packages/dom/dom-elements/lib/esm/html-element.js"() {
|
|
3646
3707
|
init_console_gjs();
|
|
3647
|
-
|
|
3708
|
+
init_auto_globals_53fe98c6e6();
|
|
3648
3709
|
init_esm4();
|
|
3649
3710
|
init_element();
|
|
3650
3711
|
init_property_symbol();
|
|
@@ -4074,7 +4135,7 @@ var HTMLCanvasElement2;
|
|
|
4074
4135
|
var init_html_canvas_element = __esm({
|
|
4075
4136
|
"../../../packages/dom/dom-elements/lib/esm/html-canvas-element.js"() {
|
|
4076
4137
|
init_console_gjs();
|
|
4077
|
-
|
|
4138
|
+
init_auto_globals_53fe98c6e6();
|
|
4078
4139
|
init_html_element();
|
|
4079
4140
|
HTMLCanvasElement2 = class _HTMLCanvasElement extends HTMLElement {
|
|
4080
4141
|
constructor() {
|
|
@@ -4154,7 +4215,7 @@ var DOMMatrix, DOMMatrixReadOnly;
|
|
|
4154
4215
|
var init_dom_matrix = __esm({
|
|
4155
4216
|
"../../../packages/dom/dom-elements/lib/esm/dom-matrix.js"() {
|
|
4156
4217
|
init_console_gjs();
|
|
4157
|
-
|
|
4218
|
+
init_auto_globals_53fe98c6e6();
|
|
4158
4219
|
DOMMatrix = class _DOMMatrix {
|
|
4159
4220
|
constructor(init) {
|
|
4160
4221
|
this.a = 1;
|
|
@@ -4292,7 +4353,7 @@ function defineGlobalIfMissing(name2, value2) {
|
|
|
4292
4353
|
var init_helpers = __esm({
|
|
4293
4354
|
"../../../packages/dom/dom-elements/lib/esm/register/helpers.js"() {
|
|
4294
4355
|
init_console_gjs();
|
|
4295
|
-
|
|
4356
|
+
init_auto_globals_53fe98c6e6();
|
|
4296
4357
|
}
|
|
4297
4358
|
});
|
|
4298
4359
|
|
|
@@ -4301,7 +4362,7 @@ var CANVAS2D_KEY;
|
|
|
4301
4362
|
var init_canvas = __esm({
|
|
4302
4363
|
"../../../packages/dom/dom-elements/lib/esm/register/canvas.js"() {
|
|
4303
4364
|
init_console_gjs();
|
|
4304
|
-
|
|
4365
|
+
init_auto_globals_53fe98c6e6();
|
|
4305
4366
|
init_esm2();
|
|
4306
4367
|
init_html_canvas_element();
|
|
4307
4368
|
init_dom_matrix();
|
|
@@ -4326,7 +4387,7 @@ var CharacterData;
|
|
|
4326
4387
|
var init_character_data = __esm({
|
|
4327
4388
|
"../../../packages/dom/dom-elements/lib/esm/character-data.js"() {
|
|
4328
4389
|
init_console_gjs();
|
|
4329
|
-
|
|
4390
|
+
init_auto_globals_53fe98c6e6();
|
|
4330
4391
|
init_node();
|
|
4331
4392
|
init_node_type();
|
|
4332
4393
|
init_property_symbol();
|
|
@@ -4388,7 +4449,7 @@ var Comment;
|
|
|
4388
4449
|
var init_comment = __esm({
|
|
4389
4450
|
"../../../packages/dom/dom-elements/lib/esm/comment.js"() {
|
|
4390
4451
|
init_console_gjs();
|
|
4391
|
-
|
|
4452
|
+
init_auto_globals_53fe98c6e6();
|
|
4392
4453
|
init_character_data();
|
|
4393
4454
|
init_node_type();
|
|
4394
4455
|
init_property_symbol();
|
|
@@ -4416,7 +4477,7 @@ var gdkpixbuf_2_0_default;
|
|
|
4416
4477
|
var init_gdkpixbuf_2_0 = __esm({
|
|
4417
4478
|
"../../../node_modules/@girs/gdkpixbuf-2.0/gdkpixbuf-2.0.js"() {
|
|
4418
4479
|
init_console_gjs();
|
|
4419
|
-
|
|
4480
|
+
init_auto_globals_53fe98c6e6();
|
|
4420
4481
|
gdkpixbuf_2_0_default = GdkPixbuf2;
|
|
4421
4482
|
}
|
|
4422
4483
|
});
|
|
@@ -4426,7 +4487,7 @@ var gdkpixbuf_2_default;
|
|
|
4426
4487
|
var init_gdkpixbuf_2 = __esm({
|
|
4427
4488
|
"../../../node_modules/@girs/gdkpixbuf-2.0/index.js"() {
|
|
4428
4489
|
init_console_gjs();
|
|
4429
|
-
|
|
4490
|
+
init_auto_globals_53fe98c6e6();
|
|
4430
4491
|
init_gdkpixbuf_2_0();
|
|
4431
4492
|
gdkpixbuf_2_default = gdkpixbuf_2_0_default;
|
|
4432
4493
|
}
|
|
@@ -4438,7 +4499,7 @@ var HTMLImageElement2;
|
|
|
4438
4499
|
var init_html_image_element = __esm({
|
|
4439
4500
|
"../../../packages/dom/dom-elements/lib/esm/html-image-element.js"() {
|
|
4440
4501
|
init_console_gjs();
|
|
4441
|
-
|
|
4502
|
+
init_auto_globals_53fe98c6e6();
|
|
4442
4503
|
init_glib_2();
|
|
4443
4504
|
init_gio_2();
|
|
4444
4505
|
init_gdkpixbuf_2();
|
|
@@ -4673,7 +4734,7 @@ var HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTURE_DATA, HAVE_ENOUG
|
|
|
4673
4734
|
var init_html_media_element = __esm({
|
|
4674
4735
|
"../../../packages/dom/dom-elements/lib/esm/html-media-element.js"() {
|
|
4675
4736
|
init_console_gjs();
|
|
4676
|
-
|
|
4737
|
+
init_auto_globals_53fe98c6e6();
|
|
4677
4738
|
init_esm4();
|
|
4678
4739
|
init_html_element();
|
|
4679
4740
|
HAVE_NOTHING = 0;
|
|
@@ -4797,7 +4858,7 @@ var NS_PER_SECOND;
|
|
|
4797
4858
|
var init_gst_time = __esm({
|
|
4798
4859
|
"../../../packages/dom/dom-elements/lib/esm/gst-time.js"() {
|
|
4799
4860
|
init_console_gjs();
|
|
4800
|
-
|
|
4861
|
+
init_auto_globals_53fe98c6e6();
|
|
4801
4862
|
NS_PER_SECOND = 1e9;
|
|
4802
4863
|
}
|
|
4803
4864
|
});
|
|
@@ -4807,7 +4868,7 @@ var GST_STATE_PLAYING, GST_STATE_PAUSED, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, G
|
|
|
4807
4868
|
var init_html_video_element = __esm({
|
|
4808
4869
|
"../../../packages/dom/dom-elements/lib/esm/html-video-element.js"() {
|
|
4809
4870
|
init_console_gjs();
|
|
4810
|
-
|
|
4871
|
+
init_auto_globals_53fe98c6e6();
|
|
4811
4872
|
init_html_media_element();
|
|
4812
4873
|
init_esm4();
|
|
4813
4874
|
init_property_symbol();
|
|
@@ -4930,7 +4991,7 @@ var Text;
|
|
|
4930
4991
|
var init_text = __esm({
|
|
4931
4992
|
"../../../packages/dom/dom-elements/lib/esm/text.js"() {
|
|
4932
4993
|
init_console_gjs();
|
|
4933
|
-
|
|
4994
|
+
init_auto_globals_53fe98c6e6();
|
|
4934
4995
|
init_character_data();
|
|
4935
4996
|
init_node_type();
|
|
4936
4997
|
init_property_symbol();
|
|
@@ -4987,7 +5048,7 @@ var DocumentFragment;
|
|
|
4987
5048
|
var init_document_fragment = __esm({
|
|
4988
5049
|
"../../../packages/dom/dom-elements/lib/esm/document-fragment.js"() {
|
|
4989
5050
|
init_console_gjs();
|
|
4990
|
-
|
|
5051
|
+
init_auto_globals_53fe98c6e6();
|
|
4991
5052
|
init_node();
|
|
4992
5053
|
init_text();
|
|
4993
5054
|
init_node_type();
|
|
@@ -5105,7 +5166,7 @@ var Document, document2;
|
|
|
5105
5166
|
var init_document = __esm({
|
|
5106
5167
|
"../../../packages/dom/dom-elements/lib/esm/document.js"() {
|
|
5107
5168
|
init_console_gjs();
|
|
5108
|
-
|
|
5169
|
+
init_auto_globals_53fe98c6e6();
|
|
5109
5170
|
init_node();
|
|
5110
5171
|
init_html_element();
|
|
5111
5172
|
init_html_image_element();
|
|
@@ -5194,7 +5255,7 @@ var DOMTokenList;
|
|
|
5194
5255
|
var init_dom_token_list = __esm({
|
|
5195
5256
|
"../../../packages/dom/dom-elements/lib/esm/dom-token-list.js"() {
|
|
5196
5257
|
init_console_gjs();
|
|
5197
|
-
|
|
5258
|
+
init_auto_globals_53fe98c6e6();
|
|
5198
5259
|
DOMTokenList = class {
|
|
5199
5260
|
constructor(ownerElement2, attributeName) {
|
|
5200
5261
|
this._ownerElement = ownerElement2;
|
|
@@ -5309,7 +5370,7 @@ var Window;
|
|
|
5309
5370
|
var init_document2 = __esm({
|
|
5310
5371
|
"../../../packages/dom/dom-elements/lib/esm/register/document.js"() {
|
|
5311
5372
|
init_console_gjs();
|
|
5312
|
-
|
|
5373
|
+
init_auto_globals_53fe98c6e6();
|
|
5313
5374
|
init_esm4();
|
|
5314
5375
|
init_comment();
|
|
5315
5376
|
init_document();
|
|
@@ -5358,7 +5419,7 @@ var Image;
|
|
|
5358
5419
|
var init_image = __esm({
|
|
5359
5420
|
"../../../packages/dom/dom-elements/lib/esm/image.js"() {
|
|
5360
5421
|
init_console_gjs();
|
|
5361
|
-
|
|
5422
|
+
init_auto_globals_53fe98c6e6();
|
|
5362
5423
|
init_html_image_element();
|
|
5363
5424
|
Image = class extends HTMLImageElement2 {
|
|
5364
5425
|
/**
|
|
@@ -5384,7 +5445,7 @@ var init_image = __esm({
|
|
|
5384
5445
|
var init_image2 = __esm({
|
|
5385
5446
|
"../../../packages/dom/dom-elements/lib/esm/register/image.js"() {
|
|
5386
5447
|
init_console_gjs();
|
|
5387
|
-
|
|
5448
|
+
init_auto_globals_53fe98c6e6();
|
|
5388
5449
|
init_html_image_element();
|
|
5389
5450
|
init_image();
|
|
5390
5451
|
init_helpers();
|
|
@@ -5397,7 +5458,7 @@ var init_image2 = __esm({
|
|
|
5397
5458
|
var init_navigator = __esm({
|
|
5398
5459
|
"../../../packages/dom/dom-elements/lib/esm/register/navigator.js"() {
|
|
5399
5460
|
init_console_gjs();
|
|
5400
|
-
|
|
5461
|
+
init_auto_globals_53fe98c6e6();
|
|
5401
5462
|
if (typeof globalThis.navigator === "undefined") {
|
|
5402
5463
|
globalThis.navigator = {};
|
|
5403
5464
|
}
|
|
@@ -5512,7 +5573,7 @@ var textEncoder, textDecoder, hasSharedArrayBuffer, Buffer2, kMaxLength, kString
|
|
|
5512
5573
|
var init_buffer = __esm({
|
|
5513
5574
|
"../../../packages/node/buffer/lib/esm/buffer.js"() {
|
|
5514
5575
|
init_console_gjs();
|
|
5515
|
-
|
|
5576
|
+
init_auto_globals_53fe98c6e6();
|
|
5516
5577
|
init_esm();
|
|
5517
5578
|
textEncoder = new TextEncoder();
|
|
5518
5579
|
textDecoder = new TextDecoder();
|
|
@@ -6065,7 +6126,7 @@ var atob2, btoa;
|
|
|
6065
6126
|
var init_esm5 = __esm({
|
|
6066
6127
|
"../../../packages/node/buffer/lib/esm/index.js"() {
|
|
6067
6128
|
init_console_gjs();
|
|
6068
|
-
|
|
6129
|
+
init_auto_globals_53fe98c6e6();
|
|
6069
6130
|
init_buffer();
|
|
6070
6131
|
atob2 = globalThis.atob;
|
|
6071
6132
|
btoa = globalThis.btoa;
|
|
@@ -6076,7 +6137,7 @@ var init_esm5 = __esm({
|
|
|
6076
6137
|
var init_buffer2 = __esm({
|
|
6077
6138
|
"../../../packages/node/globals/lib/esm/register/buffer.js"() {
|
|
6078
6139
|
init_console_gjs();
|
|
6079
|
-
|
|
6140
|
+
init_auto_globals_53fe98c6e6();
|
|
6080
6141
|
init_esm5();
|
|
6081
6142
|
init_register();
|
|
6082
6143
|
if (!("Buffer" in globalThis)) {
|
|
@@ -6094,7 +6155,7 @@ var init_buffer2 = __esm({
|
|
|
6094
6155
|
var init_encoding2 = __esm({
|
|
6095
6156
|
"../../../packages/node/globals/lib/esm/register/encoding.js"() {
|
|
6096
6157
|
init_console_gjs();
|
|
6097
|
-
|
|
6158
|
+
init_auto_globals_53fe98c6e6();
|
|
6098
6159
|
init_glib_2();
|
|
6099
6160
|
if (typeof globalThis.btoa !== "function") {
|
|
6100
6161
|
Object.defineProperty(globalThis, "btoa", {
|
|
@@ -6128,6 +6189,1407 @@ var init_encoding2 = __esm({
|
|
|
6128
6189
|
}
|
|
6129
6190
|
});
|
|
6130
6191
|
|
|
6192
|
+
// ../../../packages/node/globals/lib/esm/register/microtask.js
|
|
6193
|
+
var init_microtask2 = __esm({
|
|
6194
|
+
"../../../packages/node/globals/lib/esm/register/microtask.js"() {
|
|
6195
|
+
init_console_gjs();
|
|
6196
|
+
init_auto_globals_53fe98c6e6();
|
|
6197
|
+
init_esm();
|
|
6198
|
+
if (typeof queueMicrotask !== "function") {
|
|
6199
|
+
Object.defineProperty(globalThis, "queueMicrotask", {
|
|
6200
|
+
value: queueMicrotask2,
|
|
6201
|
+
enumerable: true,
|
|
6202
|
+
writable: true,
|
|
6203
|
+
configurable: true
|
|
6204
|
+
});
|
|
6205
|
+
}
|
|
6206
|
+
}
|
|
6207
|
+
});
|
|
6208
|
+
|
|
6209
|
+
// ../../../packages/node/events/lib/esm/event-emitter.js
|
|
6210
|
+
function onceWrapper() {
|
|
6211
|
+
const { target, type, listener } = this;
|
|
6212
|
+
if (this.wrapperFn) target.removeListener(type, this.wrapperFn);
|
|
6213
|
+
const result = listener.apply(target, arguments);
|
|
6214
|
+
return result;
|
|
6215
|
+
}
|
|
6216
|
+
function _onceWrap(target, type, listener) {
|
|
6217
|
+
const state = { target, type, listener, wrapperFn: void 0 };
|
|
6218
|
+
const wrapped = onceWrapper.bind(state);
|
|
6219
|
+
state.wrapperFn = wrapped;
|
|
6220
|
+
wrapped.listener = listener;
|
|
6221
|
+
return wrapped;
|
|
6222
|
+
}
|
|
6223
|
+
function arrayClone(arr) {
|
|
6224
|
+
switch (arr.length) {
|
|
6225
|
+
case 0:
|
|
6226
|
+
return [];
|
|
6227
|
+
case 1:
|
|
6228
|
+
return [arr[0]];
|
|
6229
|
+
case 2:
|
|
6230
|
+
return [arr[0], arr[1]];
|
|
6231
|
+
case 3:
|
|
6232
|
+
return [arr[0], arr[1], arr[2]];
|
|
6233
|
+
default:
|
|
6234
|
+
return arr.slice();
|
|
6235
|
+
}
|
|
6236
|
+
}
|
|
6237
|
+
function checkListener(listener) {
|
|
6238
|
+
if (typeof listener !== "function") {
|
|
6239
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
6240
|
+
}
|
|
6241
|
+
}
|
|
6242
|
+
function validateNumber(value2, name2) {
|
|
6243
|
+
if (typeof value2 !== "number" || value2 !== value2) {
|
|
6244
|
+
throw new TypeError(`The "${name2}" argument must be of type number. Received type ${typeof value2}`);
|
|
6245
|
+
}
|
|
6246
|
+
}
|
|
6247
|
+
function spliceOne(list, index) {
|
|
6248
|
+
for (; index + 1 < list.length; index++) {
|
|
6249
|
+
list[index] = list[index + 1];
|
|
6250
|
+
}
|
|
6251
|
+
list.pop();
|
|
6252
|
+
}
|
|
6253
|
+
function unwrapListeners(arr) {
|
|
6254
|
+
const ret = new Array(arr.length);
|
|
6255
|
+
for (let i = 0; i < ret.length; ++i) {
|
|
6256
|
+
ret[i] = arr[i].listener ?? arr[i];
|
|
6257
|
+
}
|
|
6258
|
+
return ret;
|
|
6259
|
+
}
|
|
6260
|
+
function createAbortError(signal) {
|
|
6261
|
+
const err = new Error("The operation was aborted");
|
|
6262
|
+
err.name = "AbortError";
|
|
6263
|
+
err.code = "ABORT_ERR";
|
|
6264
|
+
if (signal?.reason) {
|
|
6265
|
+
err.cause = signal.reason;
|
|
6266
|
+
}
|
|
6267
|
+
return err;
|
|
6268
|
+
}
|
|
6269
|
+
var kCapture, kRejection, EventEmitter;
|
|
6270
|
+
var init_event_emitter = __esm({
|
|
6271
|
+
"../../../packages/node/events/lib/esm/event-emitter.js"() {
|
|
6272
|
+
init_console_gjs();
|
|
6273
|
+
init_auto_globals_53fe98c6e6();
|
|
6274
|
+
kCapture = /* @__PURE__ */ Symbol("kCapture");
|
|
6275
|
+
kRejection = /* @__PURE__ */ Symbol.for("nodejs.rejection");
|
|
6276
|
+
EventEmitter = class _EventEmitter {
|
|
6277
|
+
static defaultMaxListeners = 10;
|
|
6278
|
+
static errorMonitor = /* @__PURE__ */ Symbol("events.errorMonitor");
|
|
6279
|
+
static captureRejectionSymbol = kRejection;
|
|
6280
|
+
static _captureRejections = false;
|
|
6281
|
+
static get captureRejections() {
|
|
6282
|
+
return _EventEmitter._captureRejections;
|
|
6283
|
+
}
|
|
6284
|
+
static set captureRejections(value2) {
|
|
6285
|
+
if (typeof value2 !== "boolean") {
|
|
6286
|
+
throw new TypeError('The "captureRejections" argument must be of type boolean.');
|
|
6287
|
+
}
|
|
6288
|
+
_EventEmitter._captureRejections = value2;
|
|
6289
|
+
}
|
|
6290
|
+
_events;
|
|
6291
|
+
_eventsCount;
|
|
6292
|
+
_maxListeners;
|
|
6293
|
+
[kCapture];
|
|
6294
|
+
constructor(opts) {
|
|
6295
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
6296
|
+
this._eventsCount = 0;
|
|
6297
|
+
this._maxListeners = void 0;
|
|
6298
|
+
this[kCapture] = opts?.captureRejections ?? _EventEmitter._captureRejections;
|
|
6299
|
+
}
|
|
6300
|
+
setMaxListeners(n) {
|
|
6301
|
+
validateNumber(n, "n");
|
|
6302
|
+
if (n < 0) {
|
|
6303
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n);
|
|
6304
|
+
}
|
|
6305
|
+
this._maxListeners = n;
|
|
6306
|
+
return this;
|
|
6307
|
+
}
|
|
6308
|
+
getMaxListeners() {
|
|
6309
|
+
return this._maxListeners ?? _EventEmitter.defaultMaxListeners;
|
|
6310
|
+
}
|
|
6311
|
+
emit(type, ...args) {
|
|
6312
|
+
const events = this._events;
|
|
6313
|
+
let doError = type === "error";
|
|
6314
|
+
if (events !== void 0) {
|
|
6315
|
+
if (doError && events[_EventEmitter.errorMonitor] !== void 0) {
|
|
6316
|
+
this.emit(_EventEmitter.errorMonitor, ...args);
|
|
6317
|
+
}
|
|
6318
|
+
doError = doError && events.error === void 0;
|
|
6319
|
+
} else if (!doError) {
|
|
6320
|
+
return false;
|
|
6321
|
+
}
|
|
6322
|
+
if (doError) {
|
|
6323
|
+
let er;
|
|
6324
|
+
if (args.length > 0) {
|
|
6325
|
+
er = args[0];
|
|
6326
|
+
} else {
|
|
6327
|
+
er = new Error("Unhandled error.");
|
|
6328
|
+
}
|
|
6329
|
+
if (er instanceof Error) {
|
|
6330
|
+
throw er;
|
|
6331
|
+
}
|
|
6332
|
+
const err = new Error("Unhandled error. (" + er + ")");
|
|
6333
|
+
err.context = er;
|
|
6334
|
+
throw err;
|
|
6335
|
+
}
|
|
6336
|
+
const handler = events[type];
|
|
6337
|
+
if (handler === void 0) {
|
|
6338
|
+
return false;
|
|
6339
|
+
}
|
|
6340
|
+
if (typeof handler === "function") {
|
|
6341
|
+
const result = handler.apply(this, args);
|
|
6342
|
+
if (result !== void 0 && result !== null && this[kCapture]) {
|
|
6343
|
+
this._addCatch(result, type, args);
|
|
6344
|
+
}
|
|
6345
|
+
} else {
|
|
6346
|
+
const listeners = arrayClone(handler);
|
|
6347
|
+
const len = listeners.length;
|
|
6348
|
+
for (let i = 0; i < len; ++i) {
|
|
6349
|
+
const result = listeners[i].apply(this, args);
|
|
6350
|
+
if (result !== void 0 && result !== null && this[kCapture]) {
|
|
6351
|
+
this._addCatch(result, type, args);
|
|
6352
|
+
}
|
|
6353
|
+
}
|
|
6354
|
+
}
|
|
6355
|
+
return true;
|
|
6356
|
+
}
|
|
6357
|
+
_addCatch(result, type, args) {
|
|
6358
|
+
if (typeof result?.then === "function") {
|
|
6359
|
+
result.then(void 0, (err) => {
|
|
6360
|
+
const handler = this[kRejection];
|
|
6361
|
+
if (typeof handler === "function") {
|
|
6362
|
+
handler.call(this, err, type, ...args);
|
|
6363
|
+
} else {
|
|
6364
|
+
const prev = this[kCapture];
|
|
6365
|
+
try {
|
|
6366
|
+
this[kCapture] = false;
|
|
6367
|
+
this.emit("error", err);
|
|
6368
|
+
} finally {
|
|
6369
|
+
this[kCapture] = prev;
|
|
6370
|
+
}
|
|
6371
|
+
}
|
|
6372
|
+
});
|
|
6373
|
+
}
|
|
6374
|
+
}
|
|
6375
|
+
addListener(type, listener) {
|
|
6376
|
+
return this._addListener(type, listener, false);
|
|
6377
|
+
}
|
|
6378
|
+
on(type, listener) {
|
|
6379
|
+
return this._addListener(type, listener, false);
|
|
6380
|
+
}
|
|
6381
|
+
prependListener(type, listener) {
|
|
6382
|
+
return this._addListener(type, listener, true);
|
|
6383
|
+
}
|
|
6384
|
+
_addListener(type, listener, prepend) {
|
|
6385
|
+
checkListener(listener);
|
|
6386
|
+
let events = this._events;
|
|
6387
|
+
if (events === void 0) {
|
|
6388
|
+
events = this._events = /* @__PURE__ */ Object.create(null);
|
|
6389
|
+
this._eventsCount = 0;
|
|
6390
|
+
} else if (events.newListener !== void 0) {
|
|
6391
|
+
this.emit("newListener", type, listener.listener ?? listener);
|
|
6392
|
+
events = this._events;
|
|
6393
|
+
}
|
|
6394
|
+
let existing = events[type];
|
|
6395
|
+
if (existing === void 0) {
|
|
6396
|
+
events[type] = listener;
|
|
6397
|
+
++this._eventsCount;
|
|
6398
|
+
} else if (typeof existing === "function") {
|
|
6399
|
+
events[type] = prepend ? [listener, existing] : [existing, listener];
|
|
6400
|
+
} else {
|
|
6401
|
+
if (prepend) {
|
|
6402
|
+
existing.unshift(listener);
|
|
6403
|
+
} else {
|
|
6404
|
+
existing.push(listener);
|
|
6405
|
+
}
|
|
6406
|
+
}
|
|
6407
|
+
const m = this.getMaxListeners();
|
|
6408
|
+
if (m > 0) {
|
|
6409
|
+
const count2 = typeof events[type] === "function" ? 1 : events[type].length;
|
|
6410
|
+
if (count2 > m && !events[type].warned) {
|
|
6411
|
+
if (typeof events[type] !== "function") {
|
|
6412
|
+
events[type].warned = true;
|
|
6413
|
+
}
|
|
6414
|
+
const w = new Error(
|
|
6415
|
+
`Possible EventEmitter memory leak detected. ${count2} ${String(type)} listeners added to [${this.constructor.name}]. Use emitter.setMaxListeners() to increase limit`
|
|
6416
|
+
);
|
|
6417
|
+
w.name = "MaxListenersExceededWarning";
|
|
6418
|
+
console.warn(w.message);
|
|
6419
|
+
}
|
|
6420
|
+
}
|
|
6421
|
+
return this;
|
|
6422
|
+
}
|
|
6423
|
+
once(type, listener) {
|
|
6424
|
+
checkListener(listener);
|
|
6425
|
+
this.on(type, _onceWrap(this, type, listener));
|
|
6426
|
+
return this;
|
|
6427
|
+
}
|
|
6428
|
+
prependOnceListener(type, listener) {
|
|
6429
|
+
checkListener(listener);
|
|
6430
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
|
6431
|
+
return this;
|
|
6432
|
+
}
|
|
6433
|
+
removeListener(type, listener) {
|
|
6434
|
+
checkListener(listener);
|
|
6435
|
+
const events = this._events;
|
|
6436
|
+
if (events === void 0) {
|
|
6437
|
+
return this;
|
|
6438
|
+
}
|
|
6439
|
+
const list = events[type];
|
|
6440
|
+
if (list === void 0) {
|
|
6441
|
+
return this;
|
|
6442
|
+
}
|
|
6443
|
+
if (list === listener || list.listener === listener) {
|
|
6444
|
+
if (--this._eventsCount === 0) {
|
|
6445
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
6446
|
+
} else {
|
|
6447
|
+
delete events[type];
|
|
6448
|
+
if (events.removeListener) {
|
|
6449
|
+
this.emit("removeListener", type, list.listener ?? listener);
|
|
6450
|
+
}
|
|
6451
|
+
}
|
|
6452
|
+
} else if (typeof list !== "function") {
|
|
6453
|
+
let position = -1;
|
|
6454
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
6455
|
+
if (list[i] === listener || list[i].listener === listener) {
|
|
6456
|
+
position = i;
|
|
6457
|
+
break;
|
|
6458
|
+
}
|
|
6459
|
+
}
|
|
6460
|
+
if (position < 0) {
|
|
6461
|
+
return this;
|
|
6462
|
+
}
|
|
6463
|
+
if (position === 0) {
|
|
6464
|
+
list.shift();
|
|
6465
|
+
} else {
|
|
6466
|
+
spliceOne(list, position);
|
|
6467
|
+
}
|
|
6468
|
+
if (list.length === 1) {
|
|
6469
|
+
events[type] = list[0];
|
|
6470
|
+
}
|
|
6471
|
+
if (events.removeListener !== void 0) {
|
|
6472
|
+
this.emit("removeListener", type, listener.listener ?? listener);
|
|
6473
|
+
}
|
|
6474
|
+
}
|
|
6475
|
+
return this;
|
|
6476
|
+
}
|
|
6477
|
+
off(type, listener) {
|
|
6478
|
+
return this.removeListener(type, listener);
|
|
6479
|
+
}
|
|
6480
|
+
removeAllListeners(type) {
|
|
6481
|
+
const events = this._events;
|
|
6482
|
+
if (events === void 0) {
|
|
6483
|
+
return this;
|
|
6484
|
+
}
|
|
6485
|
+
if (events.removeListener === void 0) {
|
|
6486
|
+
if (arguments.length === 0) {
|
|
6487
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
6488
|
+
this._eventsCount = 0;
|
|
6489
|
+
} else if (events[type] !== void 0) {
|
|
6490
|
+
if (--this._eventsCount === 0) {
|
|
6491
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
6492
|
+
} else {
|
|
6493
|
+
delete events[type];
|
|
6494
|
+
}
|
|
6495
|
+
}
|
|
6496
|
+
return this;
|
|
6497
|
+
}
|
|
6498
|
+
if (arguments.length === 0) {
|
|
6499
|
+
const keys = Object.keys(events);
|
|
6500
|
+
for (let i = 0; i < keys.length; ++i) {
|
|
6501
|
+
const key = keys[i];
|
|
6502
|
+
if (key === "removeListener") continue;
|
|
6503
|
+
this.removeAllListeners(key);
|
|
6504
|
+
}
|
|
6505
|
+
this.removeAllListeners("removeListener");
|
|
6506
|
+
this._events = /* @__PURE__ */ Object.create(null);
|
|
6507
|
+
this._eventsCount = 0;
|
|
6508
|
+
return this;
|
|
6509
|
+
}
|
|
6510
|
+
const listeners = events[type];
|
|
6511
|
+
if (typeof listeners === "function") {
|
|
6512
|
+
this.removeListener(type, listeners);
|
|
6513
|
+
} else if (listeners !== void 0) {
|
|
6514
|
+
for (let i = listeners.length - 1; i >= 0; i--) {
|
|
6515
|
+
this.removeListener(type, listeners[i]);
|
|
6516
|
+
}
|
|
6517
|
+
}
|
|
6518
|
+
return this;
|
|
6519
|
+
}
|
|
6520
|
+
listeners(type) {
|
|
6521
|
+
const events = this._events;
|
|
6522
|
+
if (events === void 0) {
|
|
6523
|
+
return [];
|
|
6524
|
+
}
|
|
6525
|
+
const evlistener = events[type];
|
|
6526
|
+
if (evlistener === void 0) {
|
|
6527
|
+
return [];
|
|
6528
|
+
}
|
|
6529
|
+
if (typeof evlistener === "function") {
|
|
6530
|
+
return [evlistener.listener ?? evlistener];
|
|
6531
|
+
}
|
|
6532
|
+
return unwrapListeners(evlistener);
|
|
6533
|
+
}
|
|
6534
|
+
rawListeners(type) {
|
|
6535
|
+
const events = this._events;
|
|
6536
|
+
if (events === void 0) {
|
|
6537
|
+
return [];
|
|
6538
|
+
}
|
|
6539
|
+
const evlistener = events[type];
|
|
6540
|
+
if (evlistener === void 0) {
|
|
6541
|
+
return [];
|
|
6542
|
+
}
|
|
6543
|
+
if (typeof evlistener === "function") {
|
|
6544
|
+
return [evlistener];
|
|
6545
|
+
}
|
|
6546
|
+
return arrayClone(evlistener);
|
|
6547
|
+
}
|
|
6548
|
+
listenerCount(type) {
|
|
6549
|
+
const events = this._events;
|
|
6550
|
+
if (events === void 0) {
|
|
6551
|
+
return 0;
|
|
6552
|
+
}
|
|
6553
|
+
const evlistener = events[type];
|
|
6554
|
+
if (evlistener === void 0) {
|
|
6555
|
+
return 0;
|
|
6556
|
+
}
|
|
6557
|
+
if (typeof evlistener === "function") {
|
|
6558
|
+
return 1;
|
|
6559
|
+
}
|
|
6560
|
+
return evlistener.length;
|
|
6561
|
+
}
|
|
6562
|
+
eventNames() {
|
|
6563
|
+
return (this._eventsCount ?? 0) > 0 ? Reflect.ownKeys(this._events) : [];
|
|
6564
|
+
}
|
|
6565
|
+
// -- Static methods --
|
|
6566
|
+
/**
|
|
6567
|
+
* Returns a promise that resolves when the emitter emits the given event,
|
|
6568
|
+
* or rejects if the emitter emits 'error' while waiting.
|
|
6569
|
+
*/
|
|
6570
|
+
static once(emitter, name2, options) {
|
|
6571
|
+
return new Promise((resolve, reject) => {
|
|
6572
|
+
const signal = options?.signal;
|
|
6573
|
+
if (signal?.aborted) {
|
|
6574
|
+
reject(createAbortError(signal));
|
|
6575
|
+
return;
|
|
6576
|
+
}
|
|
6577
|
+
if (typeof emitter.addEventListener === "function") {
|
|
6578
|
+
const eventTarget = emitter;
|
|
6579
|
+
const handler = (...args) => {
|
|
6580
|
+
if (signal) {
|
|
6581
|
+
signal.removeEventListener("abort", abortHandler2);
|
|
6582
|
+
}
|
|
6583
|
+
resolve(args);
|
|
6584
|
+
};
|
|
6585
|
+
const errorHandler2 = (err) => {
|
|
6586
|
+
if (signal) {
|
|
6587
|
+
signal.removeEventListener("abort", abortHandler2);
|
|
6588
|
+
}
|
|
6589
|
+
eventTarget.removeEventListener("error", errorHandler2);
|
|
6590
|
+
reject(err);
|
|
6591
|
+
};
|
|
6592
|
+
const abortHandler2 = () => {
|
|
6593
|
+
eventTarget.removeEventListener(name2, handler);
|
|
6594
|
+
eventTarget.removeEventListener("error", errorHandler2);
|
|
6595
|
+
reject(createAbortError(signal));
|
|
6596
|
+
};
|
|
6597
|
+
eventTarget.addEventListener(name2, handler, { once: true });
|
|
6598
|
+
if (name2 !== "error") {
|
|
6599
|
+
eventTarget.addEventListener("error", errorHandler2, { once: true });
|
|
6600
|
+
}
|
|
6601
|
+
if (signal) {
|
|
6602
|
+
signal.addEventListener("abort", abortHandler2, { once: true });
|
|
6603
|
+
}
|
|
6604
|
+
return;
|
|
6605
|
+
}
|
|
6606
|
+
const ee = emitter;
|
|
6607
|
+
const eventHandler = (...args) => {
|
|
6608
|
+
if (signal) {
|
|
6609
|
+
signal.removeEventListener("abort", abortHandler);
|
|
6610
|
+
}
|
|
6611
|
+
if (errorHandler !== void 0) {
|
|
6612
|
+
ee.removeListener("error", errorHandler);
|
|
6613
|
+
}
|
|
6614
|
+
resolve(args);
|
|
6615
|
+
};
|
|
6616
|
+
let errorHandler;
|
|
6617
|
+
if (name2 !== "error") {
|
|
6618
|
+
errorHandler = (err) => {
|
|
6619
|
+
ee.removeListener(name2, eventHandler);
|
|
6620
|
+
if (signal) {
|
|
6621
|
+
signal.removeEventListener("abort", abortHandler);
|
|
6622
|
+
}
|
|
6623
|
+
reject(err);
|
|
6624
|
+
};
|
|
6625
|
+
ee.once("error", errorHandler);
|
|
6626
|
+
}
|
|
6627
|
+
ee.once(name2, eventHandler);
|
|
6628
|
+
const abortHandler = () => {
|
|
6629
|
+
ee.removeListener(name2, eventHandler);
|
|
6630
|
+
if (errorHandler) {
|
|
6631
|
+
ee.removeListener("error", errorHandler);
|
|
6632
|
+
}
|
|
6633
|
+
reject(createAbortError(signal));
|
|
6634
|
+
};
|
|
6635
|
+
if (signal) {
|
|
6636
|
+
signal.addEventListener("abort", abortHandler, { once: true });
|
|
6637
|
+
}
|
|
6638
|
+
});
|
|
6639
|
+
}
|
|
6640
|
+
/**
|
|
6641
|
+
* Returns an async iterator that yields event arguments each time the emitter emits.
|
|
6642
|
+
*/
|
|
6643
|
+
static on(emitter, event, options) {
|
|
6644
|
+
const signal = options?.signal;
|
|
6645
|
+
if (signal?.aborted) {
|
|
6646
|
+
throw createAbortError(signal);
|
|
6647
|
+
}
|
|
6648
|
+
const highWaterMark = options?.highWaterMark ?? Number.MAX_SAFE_INTEGER;
|
|
6649
|
+
const lowWaterMark = options?.lowWaterMark ?? 1;
|
|
6650
|
+
validateNumber(highWaterMark, "highWaterMark");
|
|
6651
|
+
validateNumber(lowWaterMark, "lowWaterMark");
|
|
6652
|
+
const unconsumedEvents = [];
|
|
6653
|
+
const unconsumedPromises = [];
|
|
6654
|
+
let error3 = null;
|
|
6655
|
+
let finished = false;
|
|
6656
|
+
let paused = false;
|
|
6657
|
+
const eventHandler = (...args) => {
|
|
6658
|
+
if (unconsumedPromises.length > 0) {
|
|
6659
|
+
const { resolve } = unconsumedPromises.shift();
|
|
6660
|
+
resolve({ value: args, done: false });
|
|
6661
|
+
} else {
|
|
6662
|
+
unconsumedEvents.push(args);
|
|
6663
|
+
if (unconsumedEvents.length >= highWaterMark && !paused) {
|
|
6664
|
+
paused = true;
|
|
6665
|
+
if (typeof emitter.pause === "function") {
|
|
6666
|
+
emitter.pause();
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
};
|
|
6671
|
+
const errorHandler = (err) => {
|
|
6672
|
+
error3 = err;
|
|
6673
|
+
if (unconsumedPromises.length > 0) {
|
|
6674
|
+
const { reject } = unconsumedPromises.shift();
|
|
6675
|
+
reject(err);
|
|
6676
|
+
}
|
|
6677
|
+
iterator.return();
|
|
6678
|
+
};
|
|
6679
|
+
const abortHandler = () => {
|
|
6680
|
+
errorHandler(createAbortError(signal));
|
|
6681
|
+
};
|
|
6682
|
+
emitter.on(event, eventHandler);
|
|
6683
|
+
if (event !== "error") {
|
|
6684
|
+
emitter.on("error", errorHandler);
|
|
6685
|
+
}
|
|
6686
|
+
if (signal) {
|
|
6687
|
+
signal.addEventListener("abort", abortHandler, { once: true });
|
|
6688
|
+
}
|
|
6689
|
+
const cleanup = () => {
|
|
6690
|
+
emitter.removeListener(event, eventHandler);
|
|
6691
|
+
emitter.removeListener("error", errorHandler);
|
|
6692
|
+
if (signal) {
|
|
6693
|
+
signal.removeEventListener("abort", abortHandler);
|
|
6694
|
+
}
|
|
6695
|
+
finished = true;
|
|
6696
|
+
for (const { resolve } of unconsumedPromises) {
|
|
6697
|
+
resolve({ value: void 0, done: true });
|
|
6698
|
+
}
|
|
6699
|
+
unconsumedPromises.length = 0;
|
|
6700
|
+
unconsumedEvents.length = 0;
|
|
6701
|
+
};
|
|
6702
|
+
const iterator = {
|
|
6703
|
+
next() {
|
|
6704
|
+
if (unconsumedEvents.length > 0) {
|
|
6705
|
+
const value2 = unconsumedEvents.shift();
|
|
6706
|
+
if (paused && unconsumedEvents.length < lowWaterMark) {
|
|
6707
|
+
paused = false;
|
|
6708
|
+
if (typeof emitter.resume === "function") {
|
|
6709
|
+
emitter.resume();
|
|
6710
|
+
}
|
|
6711
|
+
}
|
|
6712
|
+
return Promise.resolve({ value: value2, done: false });
|
|
6713
|
+
}
|
|
6714
|
+
if (error3) {
|
|
6715
|
+
const p = Promise.reject(error3);
|
|
6716
|
+
error3 = null;
|
|
6717
|
+
return p;
|
|
6718
|
+
}
|
|
6719
|
+
if (finished) {
|
|
6720
|
+
return Promise.resolve({ value: void 0, done: true });
|
|
6721
|
+
}
|
|
6722
|
+
return new Promise((resolve, reject) => {
|
|
6723
|
+
unconsumedPromises.push({ resolve, reject });
|
|
6724
|
+
});
|
|
6725
|
+
},
|
|
6726
|
+
return() {
|
|
6727
|
+
cleanup();
|
|
6728
|
+
return Promise.resolve({ value: void 0, done: true });
|
|
6729
|
+
},
|
|
6730
|
+
throw(err) {
|
|
6731
|
+
if (!finished) {
|
|
6732
|
+
error3 = err;
|
|
6733
|
+
cleanup();
|
|
6734
|
+
}
|
|
6735
|
+
return Promise.reject(err);
|
|
6736
|
+
},
|
|
6737
|
+
[Symbol.asyncIterator]() {
|
|
6738
|
+
return this;
|
|
6739
|
+
}
|
|
6740
|
+
};
|
|
6741
|
+
return iterator;
|
|
6742
|
+
}
|
|
6743
|
+
/**
|
|
6744
|
+
* Returns the number of listeners listening to the event name.
|
|
6745
|
+
* @deprecated Use emitter.listenerCount() instead.
|
|
6746
|
+
*/
|
|
6747
|
+
static listenerCount(emitter, type) {
|
|
6748
|
+
return emitter.listenerCount(type);
|
|
6749
|
+
}
|
|
6750
|
+
/**
|
|
6751
|
+
* Returns a copy of the array of listeners for the event named eventName.
|
|
6752
|
+
*/
|
|
6753
|
+
static getEventListeners(emitter, name2) {
|
|
6754
|
+
if (typeof emitter.listeners === "function") {
|
|
6755
|
+
return emitter.listeners(name2);
|
|
6756
|
+
}
|
|
6757
|
+
return [];
|
|
6758
|
+
}
|
|
6759
|
+
/**
|
|
6760
|
+
* Set max listeners on one or more emitters.
|
|
6761
|
+
*/
|
|
6762
|
+
static setMaxListeners(n, ...emitters) {
|
|
6763
|
+
validateNumber(n, "n");
|
|
6764
|
+
if (n < 0) {
|
|
6765
|
+
throw new RangeError('The value of "n" is out of range.');
|
|
6766
|
+
}
|
|
6767
|
+
if (emitters.length === 0) {
|
|
6768
|
+
_EventEmitter.defaultMaxListeners = n;
|
|
6769
|
+
} else {
|
|
6770
|
+
for (const emitter of emitters) {
|
|
6771
|
+
if (typeof emitter.setMaxListeners === "function") {
|
|
6772
|
+
emitter.setMaxListeners(n);
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6775
|
+
}
|
|
6776
|
+
}
|
|
6777
|
+
/**
|
|
6778
|
+
* Returns the currently set max listeners on the emitter.
|
|
6779
|
+
*/
|
|
6780
|
+
static getMaxListeners(emitter) {
|
|
6781
|
+
if (typeof emitter.getMaxListeners === "function") {
|
|
6782
|
+
return emitter.getMaxListeners();
|
|
6783
|
+
}
|
|
6784
|
+
return _EventEmitter.defaultMaxListeners;
|
|
6785
|
+
}
|
|
6786
|
+
/**
|
|
6787
|
+
* Listens once to an abort event on the provided signal and returns a disposable.
|
|
6788
|
+
*/
|
|
6789
|
+
static addAbortListener(signal, listener) {
|
|
6790
|
+
if (signal.aborted) {
|
|
6791
|
+
Promise.resolve().then(() => listener());
|
|
6792
|
+
}
|
|
6793
|
+
const handler = () => listener();
|
|
6794
|
+
signal.addEventListener("abort", handler, { once: true });
|
|
6795
|
+
return {
|
|
6796
|
+
[Symbol.dispose]() {
|
|
6797
|
+
signal.removeEventListener("abort", handler);
|
|
6798
|
+
}
|
|
6799
|
+
};
|
|
6800
|
+
}
|
|
6801
|
+
};
|
|
6802
|
+
EventEmitter.EventEmitter = EventEmitter;
|
|
6803
|
+
{
|
|
6804
|
+
const methods = [
|
|
6805
|
+
"setMaxListeners",
|
|
6806
|
+
"getMaxListeners",
|
|
6807
|
+
"emit",
|
|
6808
|
+
"addListener",
|
|
6809
|
+
"on",
|
|
6810
|
+
"prependListener",
|
|
6811
|
+
"once",
|
|
6812
|
+
"prependOnceListener",
|
|
6813
|
+
"removeListener",
|
|
6814
|
+
"off",
|
|
6815
|
+
"removeAllListeners",
|
|
6816
|
+
"listeners",
|
|
6817
|
+
"rawListeners",
|
|
6818
|
+
"listenerCount",
|
|
6819
|
+
"eventNames"
|
|
6820
|
+
];
|
|
6821
|
+
for (const m of methods) {
|
|
6822
|
+
const fn = EventEmitter.prototype[m];
|
|
6823
|
+
if (typeof fn === "function") {
|
|
6824
|
+
Object.defineProperty(EventEmitter.prototype, m, {
|
|
6825
|
+
enumerable: true,
|
|
6826
|
+
configurable: true,
|
|
6827
|
+
writable: true,
|
|
6828
|
+
value: fn
|
|
6829
|
+
});
|
|
6830
|
+
}
|
|
6831
|
+
}
|
|
6832
|
+
Object.defineProperty(EventEmitter.prototype, "_events", { enumerable: true, configurable: true, writable: true, value: void 0 });
|
|
6833
|
+
Object.defineProperty(EventEmitter.prototype, "_eventsCount", { enumerable: true, configurable: true, writable: true, value: 0 });
|
|
6834
|
+
Object.defineProperty(EventEmitter.prototype, "_maxListeners", { enumerable: true, configurable: true, writable: true, value: void 0 });
|
|
6835
|
+
}
|
|
6836
|
+
}
|
|
6837
|
+
});
|
|
6838
|
+
|
|
6839
|
+
// ../../../packages/node/events/lib/esm/index.js
|
|
6840
|
+
var EventEmitter2, captureRejectionSymbol, errorMonitor, defaultMaxListeners, setMaxListeners, getMaxListeners, once, on, getEventListeners, listenerCount, addAbortListener;
|
|
6841
|
+
var init_esm6 = __esm({
|
|
6842
|
+
"../../../packages/node/events/lib/esm/index.js"() {
|
|
6843
|
+
init_console_gjs();
|
|
6844
|
+
init_auto_globals_53fe98c6e6();
|
|
6845
|
+
init_esm();
|
|
6846
|
+
init_event_emitter();
|
|
6847
|
+
EventEmitter2 = makeCallable(EventEmitter);
|
|
6848
|
+
EventEmitter2.EventEmitter = EventEmitter2;
|
|
6849
|
+
captureRejectionSymbol = EventEmitter2.captureRejectionSymbol;
|
|
6850
|
+
errorMonitor = EventEmitter2.errorMonitor;
|
|
6851
|
+
defaultMaxListeners = EventEmitter2.defaultMaxListeners;
|
|
6852
|
+
setMaxListeners = EventEmitter2.setMaxListeners;
|
|
6853
|
+
getMaxListeners = EventEmitter2.getMaxListeners;
|
|
6854
|
+
once = EventEmitter2.once;
|
|
6855
|
+
on = EventEmitter2.on;
|
|
6856
|
+
getEventListeners = EventEmitter2.getEventListeners;
|
|
6857
|
+
listenerCount = EventEmitter2.listenerCount;
|
|
6858
|
+
addAbortListener = EventEmitter2.addAbortListener;
|
|
6859
|
+
}
|
|
6860
|
+
});
|
|
6861
|
+
|
|
6862
|
+
// ../../../packages/node/terminal-native/lib/esm/index.js
|
|
6863
|
+
var _mod, _gi, nativeTerminal;
|
|
6864
|
+
var init_esm7 = __esm({
|
|
6865
|
+
"../../../packages/node/terminal-native/lib/esm/index.js"() {
|
|
6866
|
+
init_console_gjs();
|
|
6867
|
+
init_auto_globals_53fe98c6e6();
|
|
6868
|
+
_mod = null;
|
|
6869
|
+
_gi = globalThis.imports?.gi;
|
|
6870
|
+
if (_gi) {
|
|
6871
|
+
try {
|
|
6872
|
+
_mod = _gi["GjsifyTerminal"];
|
|
6873
|
+
} catch {
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
nativeTerminal = _mod;
|
|
6877
|
+
}
|
|
6878
|
+
});
|
|
6879
|
+
|
|
6880
|
+
// ../../../packages/node/process/lib/esm/index.js
|
|
6881
|
+
function getGjsGlobal() {
|
|
6882
|
+
return globalThis;
|
|
6883
|
+
}
|
|
6884
|
+
function detectGjsVersion() {
|
|
6885
|
+
try {
|
|
6886
|
+
const system = getGjsGlobal().imports?.system;
|
|
6887
|
+
if (system?.version !== void 0) {
|
|
6888
|
+
const v = Number(system.version);
|
|
6889
|
+
const major = Math.floor(v / 1e4);
|
|
6890
|
+
const minor = Math.floor(v % 1e4 / 100);
|
|
6891
|
+
const patch = v % 100;
|
|
6892
|
+
return `${major}.${minor}.${patch}`;
|
|
6893
|
+
}
|
|
6894
|
+
} catch {
|
|
6895
|
+
}
|
|
6896
|
+
return void 0;
|
|
6897
|
+
}
|
|
6898
|
+
function detectNodeVersion() {
|
|
6899
|
+
if (typeof globalThis.process?.versions?.node === "string") {
|
|
6900
|
+
return globalThis.process.versions.node;
|
|
6901
|
+
}
|
|
6902
|
+
return void 0;
|
|
6903
|
+
}
|
|
6904
|
+
function detectVersionInfo() {
|
|
6905
|
+
const nodeVersion = detectNodeVersion();
|
|
6906
|
+
if (nodeVersion) {
|
|
6907
|
+
return {
|
|
6908
|
+
version: globalThis.process.version,
|
|
6909
|
+
versions: { ...globalThis.process.versions },
|
|
6910
|
+
title: globalThis.process?.title || "node"
|
|
6911
|
+
};
|
|
6912
|
+
}
|
|
6913
|
+
const gjsVersion = detectGjsVersion();
|
|
6914
|
+
const versions2 = {
|
|
6915
|
+
node: "20.0.0"
|
|
6916
|
+
// Compatibility version — many npm packages check process.versions.node
|
|
6917
|
+
};
|
|
6918
|
+
if (gjsVersion) versions2.gjs = gjsVersion;
|
|
6919
|
+
return {
|
|
6920
|
+
version: "v20.0.0",
|
|
6921
|
+
// Compatibility version for Node.js API level checks
|
|
6922
|
+
versions: versions2,
|
|
6923
|
+
title: "gjs"
|
|
6924
|
+
};
|
|
6925
|
+
}
|
|
6926
|
+
function detectPpid() {
|
|
6927
|
+
if (typeof globalThis.process?.ppid === "number") {
|
|
6928
|
+
return globalThis.process.ppid;
|
|
6929
|
+
}
|
|
6930
|
+
try {
|
|
6931
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
6932
|
+
if (GLib3) {
|
|
6933
|
+
const [, contents] = GLib3.file_get_contents("/proc/self/status");
|
|
6934
|
+
if (contents) {
|
|
6935
|
+
const str = new TextDecoder().decode(contents);
|
|
6936
|
+
const match = str.match(/PPid:\s+(\d+)/);
|
|
6937
|
+
if (match) return parseInt(match[1], 10);
|
|
6938
|
+
}
|
|
6939
|
+
}
|
|
6940
|
+
} catch {
|
|
6941
|
+
}
|
|
6942
|
+
return 0;
|
|
6943
|
+
}
|
|
6944
|
+
function detectPlatform() {
|
|
6945
|
+
try {
|
|
6946
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
6947
|
+
if (GLib3) {
|
|
6948
|
+
const osInfo = GLib3.get_os_info("ID");
|
|
6949
|
+
if (osInfo) return "linux";
|
|
6950
|
+
}
|
|
6951
|
+
} catch {
|
|
6952
|
+
}
|
|
6953
|
+
if (typeof getGjsGlobal().imports?.system !== "undefined") {
|
|
6954
|
+
return "linux";
|
|
6955
|
+
}
|
|
6956
|
+
if (typeof globalThis.process?.platform === "string") {
|
|
6957
|
+
return globalThis.process.platform;
|
|
6958
|
+
}
|
|
6959
|
+
return "linux";
|
|
6960
|
+
}
|
|
6961
|
+
function detectArch() {
|
|
6962
|
+
if (typeof globalThis.process?.arch === "string") {
|
|
6963
|
+
return globalThis.process.arch;
|
|
6964
|
+
}
|
|
6965
|
+
return "x64";
|
|
6966
|
+
}
|
|
6967
|
+
function getCwd() {
|
|
6968
|
+
try {
|
|
6969
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
6970
|
+
if (GLib3?.get_current_dir) return GLib3.get_current_dir();
|
|
6971
|
+
} catch {
|
|
6972
|
+
}
|
|
6973
|
+
return "/";
|
|
6974
|
+
}
|
|
6975
|
+
function getEnvProxy() {
|
|
6976
|
+
if (typeof globalThis.process?.env === "object") {
|
|
6977
|
+
return globalThis.process.env;
|
|
6978
|
+
}
|
|
6979
|
+
try {
|
|
6980
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
6981
|
+
if (GLib3) {
|
|
6982
|
+
return new Proxy({}, {
|
|
6983
|
+
get(_target2, prop) {
|
|
6984
|
+
if (typeof prop !== "string") return void 0;
|
|
6985
|
+
return GLib3.getenv(prop) ?? void 0;
|
|
6986
|
+
},
|
|
6987
|
+
set(_target2, prop, value2) {
|
|
6988
|
+
if (typeof prop !== "string") return false;
|
|
6989
|
+
GLib3.setenv(prop, String(value2), true);
|
|
6990
|
+
return true;
|
|
6991
|
+
},
|
|
6992
|
+
deleteProperty(_target2, prop) {
|
|
6993
|
+
if (typeof prop !== "string") return false;
|
|
6994
|
+
GLib3.unsetenv(prop);
|
|
6995
|
+
return true;
|
|
6996
|
+
},
|
|
6997
|
+
has(_target2, prop) {
|
|
6998
|
+
if (typeof prop !== "string") return false;
|
|
6999
|
+
return GLib3.getenv(prop) !== null;
|
|
7000
|
+
},
|
|
7001
|
+
ownKeys(_target2) {
|
|
7002
|
+
const envp = GLib3.listenv();
|
|
7003
|
+
return envp;
|
|
7004
|
+
},
|
|
7005
|
+
getOwnPropertyDescriptor(_target2, prop) {
|
|
7006
|
+
if (typeof prop !== "string") return void 0;
|
|
7007
|
+
const val = GLib3.getenv(prop);
|
|
7008
|
+
if (val === null) return void 0;
|
|
7009
|
+
return { configurable: true, enumerable: true, writable: true, value: val };
|
|
7010
|
+
}
|
|
7011
|
+
});
|
|
7012
|
+
}
|
|
7013
|
+
} catch {
|
|
7014
|
+
}
|
|
7015
|
+
return {};
|
|
7016
|
+
}
|
|
7017
|
+
function getArgv() {
|
|
7018
|
+
if (typeof globalThis.process?.argv !== "undefined") {
|
|
7019
|
+
return globalThis.process.argv;
|
|
7020
|
+
}
|
|
7021
|
+
try {
|
|
7022
|
+
const system = getGjsGlobal().imports?.system;
|
|
7023
|
+
if (system?.programArgs) {
|
|
7024
|
+
return ["gjs", system.programInvocationName || "", ...system.programArgs];
|
|
7025
|
+
}
|
|
7026
|
+
} catch {
|
|
7027
|
+
}
|
|
7028
|
+
return ["gjs"];
|
|
7029
|
+
}
|
|
7030
|
+
function getExecPath() {
|
|
7031
|
+
if (typeof globalThis.process?.execPath === "string") {
|
|
7032
|
+
return globalThis.process.execPath;
|
|
7033
|
+
}
|
|
7034
|
+
try {
|
|
7035
|
+
const system = getGjsGlobal().imports?.system;
|
|
7036
|
+
if (system?.programInvocationName) return system.programInvocationName;
|
|
7037
|
+
} catch {
|
|
7038
|
+
}
|
|
7039
|
+
return "/usr/bin/gjs";
|
|
7040
|
+
}
|
|
7041
|
+
function getPid() {
|
|
7042
|
+
if (typeof globalThis.process?.pid === "number") {
|
|
7043
|
+
return globalThis.process.pid;
|
|
7044
|
+
}
|
|
7045
|
+
try {
|
|
7046
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7047
|
+
if (GLib3) {
|
|
7048
|
+
const [, contents] = GLib3.file_get_contents("/proc/self/stat");
|
|
7049
|
+
if (contents) {
|
|
7050
|
+
const str = new TextDecoder().decode(contents);
|
|
7051
|
+
const pid2 = parseInt(str, 10);
|
|
7052
|
+
if (!isNaN(pid2)) return pid2;
|
|
7053
|
+
}
|
|
7054
|
+
}
|
|
7055
|
+
} catch {
|
|
7056
|
+
}
|
|
7057
|
+
return 0;
|
|
7058
|
+
}
|
|
7059
|
+
function getGioNamespace() {
|
|
7060
|
+
const _gi2 = globalThis.imports?.gi;
|
|
7061
|
+
if (!_gi2) return null;
|
|
7062
|
+
let gio = null;
|
|
7063
|
+
try {
|
|
7064
|
+
gio = _gi2["GioUnix"];
|
|
7065
|
+
} catch {
|
|
7066
|
+
}
|
|
7067
|
+
if (!gio) {
|
|
7068
|
+
try {
|
|
7069
|
+
gio = _gi2["Gio"];
|
|
7070
|
+
} catch {
|
|
7071
|
+
}
|
|
7072
|
+
}
|
|
7073
|
+
return gio;
|
|
7074
|
+
}
|
|
7075
|
+
function getMonotonicTime() {
|
|
7076
|
+
try {
|
|
7077
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7078
|
+
if (GLib3?.get_monotonic_time) {
|
|
7079
|
+
return BigInt(GLib3.get_monotonic_time()) * 1000n;
|
|
7080
|
+
}
|
|
7081
|
+
} catch {
|
|
7082
|
+
}
|
|
7083
|
+
if (typeof performance?.now === "function") {
|
|
7084
|
+
return BigInt(Math.round(performance.now() * 1e6));
|
|
7085
|
+
}
|
|
7086
|
+
return BigInt(Date.now()) * 1000000n;
|
|
7087
|
+
}
|
|
7088
|
+
var _encoder2, startTime, ProcessWriteStream, ProcessReadStream, hrtimeBase, Process, process, platform, arch, env, argv, argv0, execPath, pid, ppid, version, versions, cwd, chdir, exit, nextTick, hrtime, uptime, memoryUsage, cpuUsage, kill, abort, umask, emitWarning, execArgv, config, stdout, stderr, stdin, index_default;
|
|
7089
|
+
var init_esm8 = __esm({
|
|
7090
|
+
"../../../packages/node/process/lib/esm/index.js"() {
|
|
7091
|
+
init_console_gjs();
|
|
7092
|
+
init_auto_globals_53fe98c6e6();
|
|
7093
|
+
init_esm6();
|
|
7094
|
+
init_esm();
|
|
7095
|
+
init_esm7();
|
|
7096
|
+
_encoder2 = new TextEncoder();
|
|
7097
|
+
startTime = Date.now();
|
|
7098
|
+
ProcessWriteStream = class extends EventEmitter2 {
|
|
7099
|
+
fd;
|
|
7100
|
+
// Required by Stream.pipe(): without this, pipe skips dest.write() entirely.
|
|
7101
|
+
writable = true;
|
|
7102
|
+
_outGio = null;
|
|
7103
|
+
constructor(fd) {
|
|
7104
|
+
super();
|
|
7105
|
+
this.fd = fd;
|
|
7106
|
+
const gio = getGioNamespace();
|
|
7107
|
+
if (gio) {
|
|
7108
|
+
const Cls = gio.UnixOutputStream ?? gio.OutputStream;
|
|
7109
|
+
if (Cls) {
|
|
7110
|
+
try {
|
|
7111
|
+
this._outGio = Cls.new(this.fd, false);
|
|
7112
|
+
} catch {
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
}
|
|
7116
|
+
}
|
|
7117
|
+
write(data) {
|
|
7118
|
+
if (this._outGio) {
|
|
7119
|
+
try {
|
|
7120
|
+
const bytes = typeof data === "string" ? _encoder2.encode(data) : data;
|
|
7121
|
+
this._outGio.write_all(bytes, null);
|
|
7122
|
+
return true;
|
|
7123
|
+
} catch {
|
|
7124
|
+
}
|
|
7125
|
+
}
|
|
7126
|
+
if (this.fd === 2) {
|
|
7127
|
+
console.error(data);
|
|
7128
|
+
} else {
|
|
7129
|
+
console.log(data);
|
|
7130
|
+
}
|
|
7131
|
+
return true;
|
|
7132
|
+
}
|
|
7133
|
+
get isTTY() {
|
|
7134
|
+
if (nativeTerminal) return nativeTerminal.Terminal.is_tty(this.fd);
|
|
7135
|
+
try {
|
|
7136
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7137
|
+
if (GLib3) return !!GLib3.log_writer_supports_color(this.fd);
|
|
7138
|
+
} catch {
|
|
7139
|
+
}
|
|
7140
|
+
return false;
|
|
7141
|
+
}
|
|
7142
|
+
get columns() {
|
|
7143
|
+
if (nativeTerminal) {
|
|
7144
|
+
const [ok, , cols] = nativeTerminal.Terminal.get_size(this.fd);
|
|
7145
|
+
if (ok && cols > 0) return cols;
|
|
7146
|
+
}
|
|
7147
|
+
try {
|
|
7148
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7149
|
+
if (GLib3) {
|
|
7150
|
+
const c = parseInt(GLib3.getenv("COLUMNS") ?? "0", 10);
|
|
7151
|
+
if (c > 0) return c;
|
|
7152
|
+
}
|
|
7153
|
+
} catch {
|
|
7154
|
+
}
|
|
7155
|
+
return 80;
|
|
7156
|
+
}
|
|
7157
|
+
// stdout/stderr must never be closed — the process owns the fds.
|
|
7158
|
+
// pipe() calls end() when its source emits 'end' (e.g. MuteStream); no-op here.
|
|
7159
|
+
end() {
|
|
7160
|
+
}
|
|
7161
|
+
destroy() {
|
|
7162
|
+
}
|
|
7163
|
+
get rows() {
|
|
7164
|
+
if (nativeTerminal) {
|
|
7165
|
+
const [ok, rows] = nativeTerminal.Terminal.get_size(this.fd);
|
|
7166
|
+
if (ok && rows > 0) return rows;
|
|
7167
|
+
}
|
|
7168
|
+
try {
|
|
7169
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7170
|
+
if (GLib3) {
|
|
7171
|
+
const r = parseInt(GLib3.getenv("LINES") ?? "0", 10);
|
|
7172
|
+
if (r > 0) return r;
|
|
7173
|
+
}
|
|
7174
|
+
} catch {
|
|
7175
|
+
}
|
|
7176
|
+
return 24;
|
|
7177
|
+
}
|
|
7178
|
+
};
|
|
7179
|
+
ProcessReadStream = class extends EventEmitter2 {
|
|
7180
|
+
fd;
|
|
7181
|
+
isRaw = false;
|
|
7182
|
+
// Do NOT expose `readableFlowing` as an instance property: @inquirer/core uses
|
|
7183
|
+
// `'readableFlowing' in input` to defer startCycle() via setImmediate. In GJS,
|
|
7184
|
+
// setImmediate fires as a microtask — the property must stay absent so
|
|
7185
|
+
// @inquirer/core calls startCycle() synchronously on its own schedule.
|
|
7186
|
+
_gio = null;
|
|
7187
|
+
_stdinGio = null;
|
|
7188
|
+
_reading = false;
|
|
7189
|
+
_flowing = false;
|
|
7190
|
+
_sttyCleanupRegistered = false;
|
|
7191
|
+
_mainLoopHeld = false;
|
|
7192
|
+
// True while a read_bytes_async is in-flight. Prevents a second concurrent
|
|
7193
|
+
// read from starting when pause()+resume() fires between GLib iterations.
|
|
7194
|
+
_pendingRead = false;
|
|
7195
|
+
constructor(fd) {
|
|
7196
|
+
super();
|
|
7197
|
+
this.fd = fd;
|
|
7198
|
+
this._gio = getGioNamespace();
|
|
7199
|
+
}
|
|
7200
|
+
get isTTY() {
|
|
7201
|
+
if (nativeTerminal) return nativeTerminal.Terminal.is_tty(this.fd);
|
|
7202
|
+
return false;
|
|
7203
|
+
}
|
|
7204
|
+
setRawMode(mode) {
|
|
7205
|
+
if (nativeTerminal) {
|
|
7206
|
+
const ok = nativeTerminal.Terminal.set_raw_mode(this.fd, mode);
|
|
7207
|
+
if (ok) {
|
|
7208
|
+
this.isRaw = mode;
|
|
7209
|
+
return this;
|
|
7210
|
+
}
|
|
7211
|
+
}
|
|
7212
|
+
this._setRawModeViaStty(mode);
|
|
7213
|
+
this.isRaw = mode;
|
|
7214
|
+
return this;
|
|
7215
|
+
}
|
|
7216
|
+
_setRawModeViaStty(mode) {
|
|
7217
|
+
try {
|
|
7218
|
+
const _gi2 = globalThis.imports?.gi;
|
|
7219
|
+
const Gio3 = _gi2?.Gio ?? _gi2?.["Gio"];
|
|
7220
|
+
if (!Gio3) return;
|
|
7221
|
+
const STDIN_INHERIT = Gio3.SubprocessFlags?.STDIN_INHERIT ?? 2;
|
|
7222
|
+
const argv2 = mode ? ["stty", "-icanon", "-echo", "-icrnl", "min", "1", "time", "0"] : ["stty", "icanon", "echo", "icrnl"];
|
|
7223
|
+
const launcher = new Gio3.SubprocessLauncher({ flags: STDIN_INHERIT });
|
|
7224
|
+
const proc = launcher.spawnv(argv2);
|
|
7225
|
+
proc.wait(null);
|
|
7226
|
+
if (mode && !this._sttyCleanupRegistered) {
|
|
7227
|
+
this._sttyCleanupRegistered = true;
|
|
7228
|
+
const proc_ = globalThis.process;
|
|
7229
|
+
if (proc_?.once && typeof proc_.once === "function") {
|
|
7230
|
+
proc_.once("exit", () => this._setRawModeViaStty(false));
|
|
7231
|
+
}
|
|
7232
|
+
}
|
|
7233
|
+
} catch {
|
|
7234
|
+
}
|
|
7235
|
+
}
|
|
7236
|
+
setEncoding(_enc) {
|
|
7237
|
+
return this;
|
|
7238
|
+
}
|
|
7239
|
+
resume() {
|
|
7240
|
+
this._flowing = true;
|
|
7241
|
+
if (this._gio && this.fd === 0 && !this._reading) {
|
|
7242
|
+
this._startReading();
|
|
7243
|
+
}
|
|
7244
|
+
return this;
|
|
7245
|
+
}
|
|
7246
|
+
pause() {
|
|
7247
|
+
this._flowing = false;
|
|
7248
|
+
this._reading = false;
|
|
7249
|
+
if (this._mainLoopHeld) {
|
|
7250
|
+
this._mainLoopHeld = false;
|
|
7251
|
+
const _gi2 = globalThis.imports?.gi;
|
|
7252
|
+
const GLib3 = _gi2?.GLib ?? _gi2?.["GLib"];
|
|
7253
|
+
if (GLib3?.idle_add) {
|
|
7254
|
+
GLib3.idle_add(300, () => {
|
|
7255
|
+
if (!this._mainLoopHeld) quitMainLoop();
|
|
7256
|
+
return false;
|
|
7257
|
+
});
|
|
7258
|
+
} else {
|
|
7259
|
+
quitMainLoop();
|
|
7260
|
+
}
|
|
7261
|
+
}
|
|
7262
|
+
return this;
|
|
7263
|
+
}
|
|
7264
|
+
read() {
|
|
7265
|
+
return null;
|
|
7266
|
+
}
|
|
7267
|
+
_startReading() {
|
|
7268
|
+
if (!this._gio || this._reading) return;
|
|
7269
|
+
if (this._pendingRead) {
|
|
7270
|
+
this._reading = true;
|
|
7271
|
+
if (!this._mainLoopHeld) {
|
|
7272
|
+
this._mainLoopHeld = true;
|
|
7273
|
+
ensureMainLoop();
|
|
7274
|
+
}
|
|
7275
|
+
return;
|
|
7276
|
+
}
|
|
7277
|
+
this._reading = true;
|
|
7278
|
+
if (!this._mainLoopHeld) {
|
|
7279
|
+
this._mainLoopHeld = true;
|
|
7280
|
+
ensureMainLoop();
|
|
7281
|
+
}
|
|
7282
|
+
if (!this._stdinGio) {
|
|
7283
|
+
const Cls = this._gio.UnixInputStream ?? this._gio.InputStream;
|
|
7284
|
+
if (!Cls) {
|
|
7285
|
+
this._reading = false;
|
|
7286
|
+
return;
|
|
7287
|
+
}
|
|
7288
|
+
try {
|
|
7289
|
+
this._stdinGio = Cls.new(this.fd, false);
|
|
7290
|
+
} catch {
|
|
7291
|
+
this._reading = false;
|
|
7292
|
+
return;
|
|
7293
|
+
}
|
|
7294
|
+
}
|
|
7295
|
+
const loop = () => {
|
|
7296
|
+
if (!this._reading) {
|
|
7297
|
+
this._pendingRead = false;
|
|
7298
|
+
return;
|
|
7299
|
+
}
|
|
7300
|
+
this._pendingRead = true;
|
|
7301
|
+
this._stdinGio.read_bytes_async(
|
|
7302
|
+
4096,
|
|
7303
|
+
0,
|
|
7304
|
+
null,
|
|
7305
|
+
(src, res) => {
|
|
7306
|
+
this._pendingRead = false;
|
|
7307
|
+
try {
|
|
7308
|
+
const bytes = src.read_bytes_finish(res);
|
|
7309
|
+
const data = bytes?.get_data?.() ?? null;
|
|
7310
|
+
if (data && data.byteLength > 0) {
|
|
7311
|
+
this.emit("data", Buffer.from(data));
|
|
7312
|
+
} else if (data !== null && data.byteLength === 0) {
|
|
7313
|
+
this._reading = false;
|
|
7314
|
+
this.emit("end");
|
|
7315
|
+
return;
|
|
7316
|
+
}
|
|
7317
|
+
} catch {
|
|
7318
|
+
this._reading = false;
|
|
7319
|
+
return;
|
|
7320
|
+
}
|
|
7321
|
+
if (this._reading) loop();
|
|
7322
|
+
}
|
|
7323
|
+
);
|
|
7324
|
+
};
|
|
7325
|
+
loop();
|
|
7326
|
+
}
|
|
7327
|
+
};
|
|
7328
|
+
hrtimeBase = getMonotonicTime();
|
|
7329
|
+
Process = class extends EventEmitter2 {
|
|
7330
|
+
platform;
|
|
7331
|
+
arch;
|
|
7332
|
+
env;
|
|
7333
|
+
argv;
|
|
7334
|
+
argv0;
|
|
7335
|
+
execPath;
|
|
7336
|
+
pid;
|
|
7337
|
+
ppid;
|
|
7338
|
+
version;
|
|
7339
|
+
versions;
|
|
7340
|
+
title;
|
|
7341
|
+
execArgv;
|
|
7342
|
+
config;
|
|
7343
|
+
exitCode;
|
|
7344
|
+
constructor() {
|
|
7345
|
+
super();
|
|
7346
|
+
this.platform = detectPlatform();
|
|
7347
|
+
this.arch = detectArch();
|
|
7348
|
+
this.env = getEnvProxy();
|
|
7349
|
+
this.argv = getArgv();
|
|
7350
|
+
this.argv0 = this.argv[0] || "gjs";
|
|
7351
|
+
this.execPath = getExecPath();
|
|
7352
|
+
this.execArgv = globalThis.process?.execArgv ?? [];
|
|
7353
|
+
this.config = globalThis.process?.config ?? { target_defaults: {}, variables: {} };
|
|
7354
|
+
this.pid = getPid();
|
|
7355
|
+
this.ppid = detectPpid();
|
|
7356
|
+
const versionInfo = detectVersionInfo();
|
|
7357
|
+
this.version = versionInfo.version;
|
|
7358
|
+
this.versions = versionInfo.versions;
|
|
7359
|
+
this.title = versionInfo.title;
|
|
7360
|
+
}
|
|
7361
|
+
cwd() {
|
|
7362
|
+
return getCwd();
|
|
7363
|
+
}
|
|
7364
|
+
chdir(directory) {
|
|
7365
|
+
try {
|
|
7366
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7367
|
+
if (GLib3?.chdir) {
|
|
7368
|
+
if (!GLib3.file_test(
|
|
7369
|
+
directory,
|
|
7370
|
+
16
|
|
7371
|
+
/* G_FILE_TEST_EXISTS */
|
|
7372
|
+
)) {
|
|
7373
|
+
const err = new Error(`ENOENT: no such file or directory, chdir '${directory}'`);
|
|
7374
|
+
err.code = "ENOENT";
|
|
7375
|
+
err.syscall = "chdir";
|
|
7376
|
+
err.path = directory;
|
|
7377
|
+
throw err;
|
|
7378
|
+
}
|
|
7379
|
+
GLib3.chdir(directory);
|
|
7380
|
+
return;
|
|
7381
|
+
}
|
|
7382
|
+
} catch (e) {
|
|
7383
|
+
if (e && typeof e === "object" && e.code === "ENOENT") throw e;
|
|
7384
|
+
}
|
|
7385
|
+
const nativeProcess = globalThis.process;
|
|
7386
|
+
if (nativeProcess && nativeProcess !== this && typeof nativeProcess.chdir === "function") {
|
|
7387
|
+
nativeProcess.chdir(directory);
|
|
7388
|
+
return;
|
|
7389
|
+
}
|
|
7390
|
+
throw new Error("process.chdir() is not supported in this environment");
|
|
7391
|
+
}
|
|
7392
|
+
kill(pid2, signal) {
|
|
7393
|
+
const nativeProcess = globalThis.process;
|
|
7394
|
+
if (nativeProcess && nativeProcess !== this && typeof nativeProcess.kill === "function") {
|
|
7395
|
+
return nativeProcess.kill(pid2, signal);
|
|
7396
|
+
}
|
|
7397
|
+
try {
|
|
7398
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7399
|
+
if (GLib3) {
|
|
7400
|
+
const sig = typeof signal === "number" ? String(signal) : signal || "SIGTERM";
|
|
7401
|
+
const sigArg = sig.startsWith("SIG") ? `-${sig.slice(3)}` : `-${sig}`;
|
|
7402
|
+
GLib3.spawn_command_line_sync(`kill ${sigArg} ${pid2}`);
|
|
7403
|
+
return true;
|
|
7404
|
+
}
|
|
7405
|
+
} catch {
|
|
7406
|
+
}
|
|
7407
|
+
throw new Error("process.kill() is not supported in this environment");
|
|
7408
|
+
}
|
|
7409
|
+
exit(code) {
|
|
7410
|
+
this.exitCode = code ?? this.exitCode ?? 0;
|
|
7411
|
+
this.emit("exit", this.exitCode);
|
|
7412
|
+
const gjsImports = getGjsGlobal().imports;
|
|
7413
|
+
const GLib3 = gjsImports?.gi?.GLib;
|
|
7414
|
+
const system = gjsImports?.system;
|
|
7415
|
+
const idleAdd = GLib3?.idle_add;
|
|
7416
|
+
const sourceRemove = GLib3?.SOURCE_REMOVE;
|
|
7417
|
+
const priorityDefault = GLib3?.PRIORITY_DEFAULT;
|
|
7418
|
+
if (system?.exit && idleAdd && typeof priorityDefault === "number" && typeof sourceRemove === "boolean") {
|
|
7419
|
+
const exitCodeNow = this.exitCode;
|
|
7420
|
+
ensureMainLoop();
|
|
7421
|
+
idleAdd(priorityDefault, () => {
|
|
7422
|
+
quitMainLoop();
|
|
7423
|
+
system.exit(exitCodeNow);
|
|
7424
|
+
return sourceRemove;
|
|
7425
|
+
});
|
|
7426
|
+
return new Promise(() => {
|
|
7427
|
+
});
|
|
7428
|
+
}
|
|
7429
|
+
try {
|
|
7430
|
+
if (system?.exit) system.exit(this.exitCode);
|
|
7431
|
+
} catch {
|
|
7432
|
+
}
|
|
7433
|
+
const nativeProcess = globalThis.process;
|
|
7434
|
+
if (nativeProcess && nativeProcess !== this && typeof nativeProcess.exit === "function") {
|
|
7435
|
+
nativeProcess.exit(this.exitCode);
|
|
7436
|
+
}
|
|
7437
|
+
throw new Error(`process.exit(${this.exitCode})`);
|
|
7438
|
+
}
|
|
7439
|
+
nextTick(callback, ...args) {
|
|
7440
|
+
if (typeof queueMicrotask === "function") {
|
|
7441
|
+
queueMicrotask(() => callback(...args));
|
|
7442
|
+
} else {
|
|
7443
|
+
Promise.resolve().then(() => callback(...args));
|
|
7444
|
+
}
|
|
7445
|
+
}
|
|
7446
|
+
hrtime(time2) {
|
|
7447
|
+
const now = getMonotonicTime() - hrtimeBase;
|
|
7448
|
+
const seconds = Number(now / 1000000000n);
|
|
7449
|
+
const nanoseconds = Number(now % 1000000000n);
|
|
7450
|
+
if (time2) {
|
|
7451
|
+
let diffSec = seconds - time2[0];
|
|
7452
|
+
let diffNano = nanoseconds - time2[1];
|
|
7453
|
+
if (diffNano < 0) {
|
|
7454
|
+
diffSec--;
|
|
7455
|
+
diffNano += 1e9;
|
|
7456
|
+
}
|
|
7457
|
+
return [diffSec, diffNano];
|
|
7458
|
+
}
|
|
7459
|
+
return [seconds, nanoseconds];
|
|
7460
|
+
}
|
|
7461
|
+
uptime() {
|
|
7462
|
+
return (Date.now() - startTime) / 1e3;
|
|
7463
|
+
}
|
|
7464
|
+
memoryUsage() {
|
|
7465
|
+
try {
|
|
7466
|
+
const GLib3 = getGjsGlobal().imports?.gi?.GLib;
|
|
7467
|
+
if (GLib3) {
|
|
7468
|
+
const [, contents] = GLib3.file_get_contents("/proc/self/status");
|
|
7469
|
+
if (contents) {
|
|
7470
|
+
const str = new TextDecoder().decode(contents);
|
|
7471
|
+
const vmRSS = str.match(/VmRSS:\s+(\d+)/);
|
|
7472
|
+
const rss = vmRSS ? parseInt(vmRSS[1], 10) * 1024 : 0;
|
|
7473
|
+
return { rss, heapTotal: rss, heapUsed: rss, external: 0, arrayBuffers: 0 };
|
|
7474
|
+
}
|
|
7475
|
+
}
|
|
7476
|
+
} catch {
|
|
7477
|
+
}
|
|
7478
|
+
const nativeProcess = globalThis.process;
|
|
7479
|
+
if (nativeProcess && nativeProcess !== this && typeof nativeProcess.memoryUsage === "function") {
|
|
7480
|
+
return nativeProcess.memoryUsage();
|
|
7481
|
+
}
|
|
7482
|
+
return { rss: 0, heapTotal: 0, heapUsed: 0, external: 0, arrayBuffers: 0 };
|
|
7483
|
+
}
|
|
7484
|
+
cpuUsage(previousValue) {
|
|
7485
|
+
const nativeProcess = globalThis.process;
|
|
7486
|
+
if (nativeProcess && nativeProcess !== this && typeof nativeProcess.cpuUsage === "function") {
|
|
7487
|
+
return nativeProcess.cpuUsage(previousValue);
|
|
7488
|
+
}
|
|
7489
|
+
return { user: 0, system: 0 };
|
|
7490
|
+
}
|
|
7491
|
+
// Note: Cannot check globalThis.process.stdout here — on GJS globalThis.process
|
|
7492
|
+
// IS this instance, so that would cause infinite recursion.
|
|
7493
|
+
stdout = new ProcessWriteStream(1);
|
|
7494
|
+
stderr = new ProcessWriteStream(2);
|
|
7495
|
+
stdin = new ProcessReadStream(0);
|
|
7496
|
+
abort() {
|
|
7497
|
+
this.exit(1);
|
|
7498
|
+
}
|
|
7499
|
+
// no-op stubs for compatibility
|
|
7500
|
+
umask(mask) {
|
|
7501
|
+
return 18;
|
|
7502
|
+
}
|
|
7503
|
+
emitWarning(warning, name2) {
|
|
7504
|
+
if (typeof warning === "string") {
|
|
7505
|
+
console.warn(`(${name2 || "Warning"}): ${warning}`);
|
|
7506
|
+
} else {
|
|
7507
|
+
console.warn(warning.message);
|
|
7508
|
+
}
|
|
7509
|
+
}
|
|
7510
|
+
};
|
|
7511
|
+
Process.prototype.hrtime.bigint = function() {
|
|
7512
|
+
return getMonotonicTime() - hrtimeBase;
|
|
7513
|
+
};
|
|
7514
|
+
process = new Process();
|
|
7515
|
+
if (nativeTerminal) {
|
|
7516
|
+
try {
|
|
7517
|
+
const watcher = new nativeTerminal.ResizeWatcher();
|
|
7518
|
+
watcher.connect("resized", (_obj2, _rows, _cols) => {
|
|
7519
|
+
process.stdout.emit("resize");
|
|
7520
|
+
process.stderr.emit("resize");
|
|
7521
|
+
});
|
|
7522
|
+
watcher.start();
|
|
7523
|
+
} catch {
|
|
7524
|
+
}
|
|
7525
|
+
}
|
|
7526
|
+
platform = process.platform;
|
|
7527
|
+
arch = process.arch;
|
|
7528
|
+
env = process.env;
|
|
7529
|
+
argv = process.argv;
|
|
7530
|
+
argv0 = process.argv0;
|
|
7531
|
+
execPath = process.execPath;
|
|
7532
|
+
pid = process.pid;
|
|
7533
|
+
ppid = process.ppid;
|
|
7534
|
+
version = process.version;
|
|
7535
|
+
versions = process.versions;
|
|
7536
|
+
cwd = process.cwd.bind(process);
|
|
7537
|
+
chdir = process.chdir.bind(process);
|
|
7538
|
+
exit = process.exit.bind(process);
|
|
7539
|
+
nextTick = process.nextTick.bind(process);
|
|
7540
|
+
hrtime = process.hrtime.bind(process);
|
|
7541
|
+
uptime = process.uptime.bind(process);
|
|
7542
|
+
memoryUsage = process.memoryUsage.bind(process);
|
|
7543
|
+
cpuUsage = process.cpuUsage.bind(process);
|
|
7544
|
+
kill = process.kill.bind(process);
|
|
7545
|
+
abort = process.abort.bind(process);
|
|
7546
|
+
umask = process.umask.bind(process);
|
|
7547
|
+
emitWarning = process.emitWarning.bind(process);
|
|
7548
|
+
execArgv = process.execArgv;
|
|
7549
|
+
config = process.config;
|
|
7550
|
+
stdout = process.stdout;
|
|
7551
|
+
stderr = process.stderr;
|
|
7552
|
+
stdin = process.stdin;
|
|
7553
|
+
index_default = process;
|
|
7554
|
+
}
|
|
7555
|
+
});
|
|
7556
|
+
|
|
7557
|
+
// ../../../packages/node/globals/lib/esm/register/process.js
|
|
7558
|
+
var init_process = __esm({
|
|
7559
|
+
"../../../packages/node/globals/lib/esm/register/process.js"() {
|
|
7560
|
+
init_console_gjs();
|
|
7561
|
+
init_auto_globals_53fe98c6e6();
|
|
7562
|
+
init_esm();
|
|
7563
|
+
init_esm8();
|
|
7564
|
+
if (typeof Promise.withResolvers !== "function") {
|
|
7565
|
+
Promise.withResolvers = function() {
|
|
7566
|
+
let resolve;
|
|
7567
|
+
let reject;
|
|
7568
|
+
const promise = new Promise((res, rej) => {
|
|
7569
|
+
resolve = res;
|
|
7570
|
+
reject = rej;
|
|
7571
|
+
});
|
|
7572
|
+
return { promise, resolve, reject };
|
|
7573
|
+
};
|
|
7574
|
+
}
|
|
7575
|
+
initErrorV8Methods(Error);
|
|
7576
|
+
if (!("global" in globalThis)) {
|
|
7577
|
+
Object.defineProperty(globalThis, "global", {
|
|
7578
|
+
value: globalThis,
|
|
7579
|
+
writable: false,
|
|
7580
|
+
enumerable: false,
|
|
7581
|
+
configurable: true
|
|
7582
|
+
});
|
|
7583
|
+
}
|
|
7584
|
+
Object.defineProperty(globalThis, "process", {
|
|
7585
|
+
value: index_default,
|
|
7586
|
+
enumerable: false,
|
|
7587
|
+
writable: true,
|
|
7588
|
+
configurable: true
|
|
7589
|
+
});
|
|
7590
|
+
}
|
|
7591
|
+
});
|
|
7592
|
+
|
|
6131
7593
|
// ../../../packages/node/globals/lib/esm/register/timers.js
|
|
6132
7594
|
function getGLib() {
|
|
6133
7595
|
return globalThis.imports?.gi?.GLib;
|
|
@@ -6152,7 +7614,7 @@ var _isGjsTimer, GjsifyTimeout;
|
|
|
6152
7614
|
var init_timers = __esm({
|
|
6153
7615
|
"../../../packages/node/globals/lib/esm/register/timers.js"() {
|
|
6154
7616
|
init_console_gjs();
|
|
6155
|
-
|
|
7617
|
+
init_auto_globals_53fe98c6e6();
|
|
6156
7618
|
_isGjsTimer = getGLib() !== void 0;
|
|
6157
7619
|
GjsifyTimeout = class {
|
|
6158
7620
|
_id = null;
|
|
@@ -6256,10 +7718,10 @@ function encodeComponent(s) {
|
|
|
6256
7718
|
return encodeURIComponent(s).replace(/%20/g, "+");
|
|
6257
7719
|
}
|
|
6258
7720
|
var PARSE_FLAGS, URLSearchParams, URL2;
|
|
6259
|
-
var
|
|
7721
|
+
var init_esm9 = __esm({
|
|
6260
7722
|
"../../../packages/node/url/lib/esm/index.js"() {
|
|
6261
7723
|
init_console_gjs();
|
|
6262
|
-
|
|
7724
|
+
init_auto_globals_53fe98c6e6();
|
|
6263
7725
|
init_glib_2();
|
|
6264
7726
|
PARSE_FLAGS = glib_2_default.UriFlags.HAS_PASSWORD | glib_2_default.UriFlags.ENCODED | glib_2_default.UriFlags.SCHEME_NORMALIZE;
|
|
6265
7727
|
URLSearchParams = class _URLSearchParams {
|
|
@@ -6505,8 +7967,8 @@ var init_esm6 = __esm({
|
|
|
6505
7967
|
var init_url = __esm({
|
|
6506
7968
|
"../../../packages/node/globals/lib/esm/register/url.js"() {
|
|
6507
7969
|
init_console_gjs();
|
|
6508
|
-
|
|
6509
|
-
|
|
7970
|
+
init_auto_globals_53fe98c6e6();
|
|
7971
|
+
init_esm9();
|
|
6510
7972
|
if (typeof globalThis.URL !== "function") {
|
|
6511
7973
|
Object.defineProperty(globalThis, "URL", {
|
|
6512
7974
|
value: URL2,
|
|
@@ -6528,10 +7990,10 @@ var init_url = __esm({
|
|
|
6528
7990
|
|
|
6529
7991
|
// ../../../packages/node/perf_hooks/lib/esm/index.js
|
|
6530
7992
|
var performance2, PerformanceObserverStub, PerformanceEntryStub, PerformanceObserverEntryListStub, PerformanceObserver, PerformanceEntry, PerformanceObserverEntryList, PerformanceMark, PerformanceMeasure;
|
|
6531
|
-
var
|
|
7993
|
+
var init_esm10 = __esm({
|
|
6532
7994
|
"../../../packages/node/perf_hooks/lib/esm/index.js"() {
|
|
6533
7995
|
init_console_gjs();
|
|
6534
|
-
|
|
7996
|
+
init_auto_globals_53fe98c6e6();
|
|
6535
7997
|
if (globalThis.performance) {
|
|
6536
7998
|
performance2 = globalThis.performance;
|
|
6537
7999
|
} else {
|
|
@@ -6557,17 +8019,17 @@ var init_esm7 = __esm({
|
|
|
6557
8019
|
return entry;
|
|
6558
8020
|
},
|
|
6559
8021
|
measure(name2, startMark, endMark) {
|
|
6560
|
-
let
|
|
8022
|
+
let startTime2 = 0;
|
|
6561
8023
|
let endTime = _now();
|
|
6562
8024
|
if (startMark) {
|
|
6563
8025
|
const s = _entries.find((e) => e.entryType === "mark" && e.name === startMark);
|
|
6564
|
-
if (s)
|
|
8026
|
+
if (s) startTime2 = s.startTime;
|
|
6565
8027
|
}
|
|
6566
8028
|
if (endMark) {
|
|
6567
8029
|
const e = _entries.find((e2) => e2.entryType === "mark" && e2.name === endMark);
|
|
6568
8030
|
if (e) endTime = e.startTime;
|
|
6569
8031
|
}
|
|
6570
|
-
const entry = { name: name2, entryType: "measure", startTime, duration: endTime -
|
|
8032
|
+
const entry = { name: name2, entryType: "measure", startTime: startTime2, duration: endTime - startTime2 };
|
|
6571
8033
|
_entries.push(entry);
|
|
6572
8034
|
return entry;
|
|
6573
8035
|
},
|
|
@@ -6650,8 +8112,8 @@ var init_esm7 = __esm({
|
|
|
6650
8112
|
var init_performance = __esm({
|
|
6651
8113
|
"../../../packages/web/web-globals/lib/esm/register/performance.js"() {
|
|
6652
8114
|
init_console_gjs();
|
|
6653
|
-
|
|
6654
|
-
|
|
8115
|
+
init_auto_globals_53fe98c6e6();
|
|
8116
|
+
init_esm10();
|
|
6655
8117
|
if (typeof globalThis.performance === "undefined") {
|
|
6656
8118
|
globalThis.performance = performance2;
|
|
6657
8119
|
}
|
|
@@ -6663,10 +8125,10 @@ var init_performance = __esm({
|
|
|
6663
8125
|
|
|
6664
8126
|
// ../../../packages/web/abort-controller/lib/esm/index.js
|
|
6665
8127
|
var kAbort, kInternal, AbortSignal2, AbortController2;
|
|
6666
|
-
var
|
|
8128
|
+
var init_esm11 = __esm({
|
|
6667
8129
|
"../../../packages/web/abort-controller/lib/esm/index.js"() {
|
|
6668
8130
|
init_console_gjs();
|
|
6669
|
-
|
|
8131
|
+
init_auto_globals_53fe98c6e6();
|
|
6670
8132
|
init_esm4();
|
|
6671
8133
|
kAbort = /* @__PURE__ */ Symbol("abort");
|
|
6672
8134
|
kInternal = /* @__PURE__ */ Symbol("internal");
|
|
@@ -6755,8 +8217,8 @@ var init_esm8 = __esm({
|
|
|
6755
8217
|
var init_register2 = __esm({
|
|
6756
8218
|
"../../../packages/web/abort-controller/lib/esm/register.js"() {
|
|
6757
8219
|
init_console_gjs();
|
|
6758
|
-
|
|
6759
|
-
|
|
8220
|
+
init_auto_globals_53fe98c6e6();
|
|
8221
|
+
init_esm11();
|
|
6760
8222
|
if (typeof globalThis.AbortController === "undefined") {
|
|
6761
8223
|
globalThis.AbortController = AbortController2;
|
|
6762
8224
|
}
|
|
@@ -6771,7 +8233,7 @@ var toRegister;
|
|
|
6771
8233
|
var init_custom_events = __esm({
|
|
6772
8234
|
"../../../packages/web/dom-events/lib/esm/register/custom-events.js"() {
|
|
6773
8235
|
init_console_gjs();
|
|
6774
|
-
|
|
8236
|
+
init_auto_globals_53fe98c6e6();
|
|
6775
8237
|
init_esm4();
|
|
6776
8238
|
toRegister = {
|
|
6777
8239
|
CustomEvent: CustomEvent2,
|
|
@@ -6792,7 +8254,7 @@ var init_custom_events = __esm({
|
|
|
6792
8254
|
var init_register3 = __esm({
|
|
6793
8255
|
"../../../packages/web/dom-exception/lib/esm/register.js"() {
|
|
6794
8256
|
init_console_gjs();
|
|
6795
|
-
|
|
8257
|
+
init_auto_globals_53fe98c6e6();
|
|
6796
8258
|
init_esm3();
|
|
6797
8259
|
if (typeof globalThis.DOMException === "undefined") {
|
|
6798
8260
|
globalThis.DOMException = DOMException2;
|
|
@@ -6800,9 +8262,9 @@ var init_register3 = __esm({
|
|
|
6800
8262
|
}
|
|
6801
8263
|
});
|
|
6802
8264
|
|
|
6803
|
-
// node_modules/.cache/gjsify/auto-globals-
|
|
6804
|
-
var
|
|
6805
|
-
"node_modules/.cache/gjsify/auto-globals-
|
|
8265
|
+
// node_modules/.cache/gjsify/auto-globals-53fe98c6e6.mjs
|
|
8266
|
+
var init_auto_globals_53fe98c6e6 = __esm({
|
|
8267
|
+
"node_modules/.cache/gjsify/auto-globals-53fe98c6e6.mjs"() {
|
|
6806
8268
|
init_register();
|
|
6807
8269
|
init_canvas();
|
|
6808
8270
|
init_document2();
|
|
@@ -6810,6 +8272,8 @@ var init_auto_globals_97a682e619 = __esm({
|
|
|
6810
8272
|
init_navigator();
|
|
6811
8273
|
init_buffer2();
|
|
6812
8274
|
init_encoding2();
|
|
8275
|
+
init_microtask2();
|
|
8276
|
+
init_process();
|
|
6813
8277
|
init_timers();
|
|
6814
8278
|
init_url();
|
|
6815
8279
|
init_performance();
|
|
@@ -6825,7 +8289,7 @@ var require_twiddle = __commonJS({
|
|
|
6825
8289
|
"use strict";
|
|
6826
8290
|
"use restrict";
|
|
6827
8291
|
init_console_gjs();
|
|
6828
|
-
|
|
8292
|
+
init_auto_globals_53fe98c6e6();
|
|
6829
8293
|
var INT_BITS = 32;
|
|
6830
8294
|
exports.INT_BITS = INT_BITS;
|
|
6831
8295
|
exports.INT_MAX = 2147483647;
|
|
@@ -6980,7 +8444,7 @@ var require_twiddle = __commonJS({
|
|
|
6980
8444
|
var require_literals = __commonJS({
|
|
6981
8445
|
"../../../node_modules/glsl-tokenizer/lib/literals.js"(exports, module) {
|
|
6982
8446
|
init_console_gjs();
|
|
6983
|
-
|
|
8447
|
+
init_auto_globals_53fe98c6e6();
|
|
6984
8448
|
module.exports = [
|
|
6985
8449
|
// current
|
|
6986
8450
|
"precision",
|
|
@@ -7080,7 +8544,7 @@ var require_literals = __commonJS({
|
|
|
7080
8544
|
var require_operators = __commonJS({
|
|
7081
8545
|
"../../../node_modules/glsl-tokenizer/lib/operators.js"(exports, module) {
|
|
7082
8546
|
init_console_gjs();
|
|
7083
|
-
|
|
8547
|
+
init_auto_globals_53fe98c6e6();
|
|
7084
8548
|
module.exports = [
|
|
7085
8549
|
"<<=",
|
|
7086
8550
|
">>=",
|
|
@@ -7135,7 +8599,7 @@ var require_operators = __commonJS({
|
|
|
7135
8599
|
var require_builtins = __commonJS({
|
|
7136
8600
|
"../../../node_modules/glsl-tokenizer/lib/builtins.js"(exports, module) {
|
|
7137
8601
|
init_console_gjs();
|
|
7138
|
-
|
|
8602
|
+
init_auto_globals_53fe98c6e6();
|
|
7139
8603
|
module.exports = [
|
|
7140
8604
|
// Keep this list sorted
|
|
7141
8605
|
"abs",
|
|
@@ -7293,7 +8757,7 @@ var require_builtins = __commonJS({
|
|
|
7293
8757
|
var require_literals_300es = __commonJS({
|
|
7294
8758
|
"../../../node_modules/glsl-tokenizer/lib/literals-300es.js"(exports, module) {
|
|
7295
8759
|
init_console_gjs();
|
|
7296
|
-
|
|
8760
|
+
init_auto_globals_53fe98c6e6();
|
|
7297
8761
|
var v100 = require_literals();
|
|
7298
8762
|
module.exports = v100.slice().concat([
|
|
7299
8763
|
"layout",
|
|
@@ -7387,7 +8851,7 @@ var require_literals_300es = __commonJS({
|
|
|
7387
8851
|
var require_builtins_300es = __commonJS({
|
|
7388
8852
|
"../../../node_modules/glsl-tokenizer/lib/builtins-300es.js"(exports, module) {
|
|
7389
8853
|
init_console_gjs();
|
|
7390
|
-
|
|
8854
|
+
init_auto_globals_53fe98c6e6();
|
|
7391
8855
|
var v100 = require_builtins();
|
|
7392
8856
|
v100 = v100.slice().filter(function(b) {
|
|
7393
8857
|
return !/^(gl\_|texture)/.test(b);
|
|
@@ -7457,7 +8921,7 @@ var require_builtins_300es = __commonJS({
|
|
|
7457
8921
|
var require_glsl_tokenizer = __commonJS({
|
|
7458
8922
|
"../../../node_modules/glsl-tokenizer/index.js"(exports, module) {
|
|
7459
8923
|
init_console_gjs();
|
|
7460
|
-
|
|
8924
|
+
init_auto_globals_53fe98c6e6();
|
|
7461
8925
|
module.exports = tokenize2;
|
|
7462
8926
|
var literals100 = require_literals();
|
|
7463
8927
|
var operators = require_operators();
|
|
@@ -7790,7 +9254,7 @@ var require_glsl_tokenizer = __commonJS({
|
|
|
7790
9254
|
var require_string = __commonJS({
|
|
7791
9255
|
"../../../node_modules/glsl-tokenizer/string.js"(exports, module) {
|
|
7792
9256
|
init_console_gjs();
|
|
7793
|
-
|
|
9257
|
+
init_auto_globals_53fe98c6e6();
|
|
7794
9258
|
var tokenize2 = require_glsl_tokenizer();
|
|
7795
9259
|
module.exports = tokenizeString;
|
|
7796
9260
|
function tokenizeString(str, opt) {
|
|
@@ -7805,28 +9269,28 @@ var require_string = __commonJS({
|
|
|
7805
9269
|
|
|
7806
9270
|
// src/gjs/gjs.ts
|
|
7807
9271
|
init_console_gjs();
|
|
7808
|
-
|
|
9272
|
+
init_auto_globals_53fe98c6e6();
|
|
7809
9273
|
import Adw2 from "gi://Adw?version=1";
|
|
7810
9274
|
import Gio2 from "gi://Gio?version=2.0";
|
|
7811
9275
|
|
|
7812
9276
|
// src/gjs/teapot-window.ts
|
|
7813
9277
|
init_console_gjs();
|
|
7814
|
-
|
|
9278
|
+
init_auto_globals_53fe98c6e6();
|
|
7815
9279
|
import GObject2 from "gi://GObject?version=2.0";
|
|
7816
9280
|
import Gtk4 from "gi://Gtk?version=4.0";
|
|
7817
9281
|
import Adw from "gi://Adw?version=1";
|
|
7818
9282
|
|
|
7819
9283
|
// ../../../packages/framework/webgl/lib/esm/index.js
|
|
7820
9284
|
init_console_gjs();
|
|
7821
|
-
|
|
9285
|
+
init_auto_globals_53fe98c6e6();
|
|
7822
9286
|
|
|
7823
9287
|
// ../../../node_modules/@girs/gjs/index.js
|
|
7824
9288
|
init_console_gjs();
|
|
7825
|
-
|
|
9289
|
+
init_auto_globals_53fe98c6e6();
|
|
7826
9290
|
|
|
7827
9291
|
// ../../../node_modules/@girs/gjs/gjs.js
|
|
7828
9292
|
init_console_gjs();
|
|
7829
|
-
|
|
9293
|
+
init_auto_globals_53fe98c6e6();
|
|
7830
9294
|
var imports2 = globalThis.imports || {};
|
|
7831
9295
|
|
|
7832
9296
|
// ../../../packages/framework/webgl/lib/esm/index.js
|
|
@@ -7834,24 +9298,24 @@ init_gio_2();
|
|
|
7834
9298
|
|
|
7835
9299
|
// ../../../node_modules/@girs/gtk-4.0/index.js
|
|
7836
9300
|
init_console_gjs();
|
|
7837
|
-
|
|
9301
|
+
init_auto_globals_53fe98c6e6();
|
|
7838
9302
|
|
|
7839
9303
|
// ../../../node_modules/@girs/gtk-4.0/gtk-4.0.js
|
|
7840
9304
|
init_console_gjs();
|
|
7841
|
-
|
|
9305
|
+
init_auto_globals_53fe98c6e6();
|
|
7842
9306
|
import Gtk from "gi://Gtk?version=4.0";
|
|
7843
9307
|
|
|
7844
9308
|
// ../../../packages/framework/webgl/lib/esm/webgl-rendering-context.js
|
|
7845
9309
|
init_console_gjs();
|
|
7846
|
-
|
|
9310
|
+
init_auto_globals_53fe98c6e6();
|
|
7847
9311
|
|
|
7848
9312
|
// ../../../node_modules/@girs/gwebgl-0.1/index.js
|
|
7849
9313
|
init_console_gjs();
|
|
7850
|
-
|
|
9314
|
+
init_auto_globals_53fe98c6e6();
|
|
7851
9315
|
|
|
7852
9316
|
// ../../../node_modules/@girs/gwebgl-0.1/gwebgl-0.1.js
|
|
7853
9317
|
init_console_gjs();
|
|
7854
|
-
|
|
9318
|
+
init_auto_globals_53fe98c6e6();
|
|
7855
9319
|
import Gwebgl from "gi://Gwebgl?version=0.1";
|
|
7856
9320
|
var gwebgl_0_1_default = Gwebgl;
|
|
7857
9321
|
|
|
@@ -7860,7 +9324,7 @@ var gwebgl_0_default = gwebgl_0_1_default;
|
|
|
7860
9324
|
|
|
7861
9325
|
// ../../../packages/framework/webgl/lib/esm/webgl-context-base.js
|
|
7862
9326
|
init_console_gjs();
|
|
7863
|
-
|
|
9327
|
+
init_auto_globals_53fe98c6e6();
|
|
7864
9328
|
init_gdkpixbuf_2();
|
|
7865
9329
|
var bits = __toESM(require_twiddle(), 1);
|
|
7866
9330
|
var import_string = __toESM(require_string(), 1);
|
|
@@ -7868,7 +9332,7 @@ import GdkPixbuf3 from "gi://GdkPixbuf?version=2.0";
|
|
|
7868
9332
|
|
|
7869
9333
|
// ../../../packages/framework/webgl/lib/esm/webgl-context-attributes.js
|
|
7870
9334
|
init_console_gjs();
|
|
7871
|
-
|
|
9335
|
+
init_auto_globals_53fe98c6e6();
|
|
7872
9336
|
var WebGLContextAttributes = class {
|
|
7873
9337
|
constructor(alpha, depth, stencil, antialias, premultipliedAlpha, preserveDrawingBuffer, preferLowPowerToHighPerformance, failIfMajorPerformanceCaveat) {
|
|
7874
9338
|
this.alpha = alpha;
|
|
@@ -7892,11 +9356,11 @@ var WebGLContextAttributes = class {
|
|
|
7892
9356
|
|
|
7893
9357
|
// ../../../packages/framework/webgl/lib/esm/utils.js
|
|
7894
9358
|
init_console_gjs();
|
|
7895
|
-
|
|
9359
|
+
init_auto_globals_53fe98c6e6();
|
|
7896
9360
|
|
|
7897
9361
|
// ../../../packages/framework/webgl/lib/esm/webgl-uniform-location.js
|
|
7898
9362
|
init_console_gjs();
|
|
7899
|
-
|
|
9363
|
+
init_auto_globals_53fe98c6e6();
|
|
7900
9364
|
var WebGLUniformLocation = class {
|
|
7901
9365
|
constructor(_, program, info2) {
|
|
7902
9366
|
this._linkCount = 0;
|
|
@@ -8094,7 +9558,7 @@ function premultiplyAlpha(data) {
|
|
|
8094
9558
|
|
|
8095
9559
|
// ../../../packages/framework/webgl/lib/esm/extensions/oes-element-index-unit.js
|
|
8096
9560
|
init_console_gjs();
|
|
8097
|
-
|
|
9561
|
+
init_auto_globals_53fe98c6e6();
|
|
8098
9562
|
var OESElementIndexUint = class {
|
|
8099
9563
|
};
|
|
8100
9564
|
function getOESElementIndexUint(context) {
|
|
@@ -8108,7 +9572,7 @@ function getOESElementIndexUint(context) {
|
|
|
8108
9572
|
|
|
8109
9573
|
// ../../../packages/framework/webgl/lib/esm/extensions/oes-standard-derivatives.js
|
|
8110
9574
|
init_console_gjs();
|
|
8111
|
-
|
|
9575
|
+
init_auto_globals_53fe98c6e6();
|
|
8112
9576
|
var OESStandardDerivatives = class {
|
|
8113
9577
|
constructor() {
|
|
8114
9578
|
this.FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 35723;
|
|
@@ -8125,7 +9589,7 @@ function getOESStandardDerivatives(context) {
|
|
|
8125
9589
|
|
|
8126
9590
|
// ../../../packages/framework/webgl/lib/esm/extensions/oes-texture-float.js
|
|
8127
9591
|
init_console_gjs();
|
|
8128
|
-
|
|
9592
|
+
init_auto_globals_53fe98c6e6();
|
|
8129
9593
|
var OESTextureFloat = class {
|
|
8130
9594
|
};
|
|
8131
9595
|
function getOESTextureFloat(context) {
|
|
@@ -8139,7 +9603,7 @@ function getOESTextureFloat(context) {
|
|
|
8139
9603
|
|
|
8140
9604
|
// ../../../packages/framework/webgl/lib/esm/extensions/oes-texture-float-linear.js
|
|
8141
9605
|
init_console_gjs();
|
|
8142
|
-
|
|
9606
|
+
init_auto_globals_53fe98c6e6();
|
|
8143
9607
|
var OESTextureFloatLinear = class {
|
|
8144
9608
|
};
|
|
8145
9609
|
function getOESTextureFloatLinear(context) {
|
|
@@ -8153,7 +9617,7 @@ function getOESTextureFloatLinear(context) {
|
|
|
8153
9617
|
|
|
8154
9618
|
// ../../../packages/framework/webgl/lib/esm/extensions/stackgl-destroy-context.js
|
|
8155
9619
|
init_console_gjs();
|
|
8156
|
-
|
|
9620
|
+
init_auto_globals_53fe98c6e6();
|
|
8157
9621
|
var STACKGLDestroyContext = class {
|
|
8158
9622
|
constructor(ctx) {
|
|
8159
9623
|
this.destroy = ctx.destroy.bind(ctx);
|
|
@@ -8165,7 +9629,7 @@ function getSTACKGLDestroyContext(ctx) {
|
|
|
8165
9629
|
|
|
8166
9630
|
// ../../../packages/framework/webgl/lib/esm/extensions/stackgl-resize-drawing-buffer.js
|
|
8167
9631
|
init_console_gjs();
|
|
8168
|
-
|
|
9632
|
+
init_auto_globals_53fe98c6e6();
|
|
8169
9633
|
var STACKGLResizeDrawingBuffer = class {
|
|
8170
9634
|
constructor(ctx) {
|
|
8171
9635
|
this.resize = ctx.resize.bind(ctx);
|
|
@@ -8177,7 +9641,7 @@ function getSTACKGLResizeDrawingBuffer(ctx) {
|
|
|
8177
9641
|
|
|
8178
9642
|
// ../../../packages/framework/webgl/lib/esm/extensions/ext-blend-minmax.js
|
|
8179
9643
|
init_console_gjs();
|
|
8180
|
-
|
|
9644
|
+
init_auto_globals_53fe98c6e6();
|
|
8181
9645
|
var EXTBlendMinMax = class {
|
|
8182
9646
|
constructor() {
|
|
8183
9647
|
this.MIN_EXT = 32775;
|
|
@@ -8195,7 +9659,7 @@ function getEXTBlendMinMax(context) {
|
|
|
8195
9659
|
|
|
8196
9660
|
// ../../../packages/framework/webgl/lib/esm/extensions/ext-color-buffer-float.js
|
|
8197
9661
|
init_console_gjs();
|
|
8198
|
-
|
|
9662
|
+
init_auto_globals_53fe98c6e6();
|
|
8199
9663
|
var EXTColorBufferFloat = class {
|
|
8200
9664
|
};
|
|
8201
9665
|
function getEXTColorBufferFloat(context) {
|
|
@@ -8208,7 +9672,7 @@ function getEXTColorBufferFloat(context) {
|
|
|
8208
9672
|
|
|
8209
9673
|
// ../../../packages/framework/webgl/lib/esm/extensions/ext-color-buffer-half-float.js
|
|
8210
9674
|
init_console_gjs();
|
|
8211
|
-
|
|
9675
|
+
init_auto_globals_53fe98c6e6();
|
|
8212
9676
|
var EXTColorBufferHalfFloat = class {
|
|
8213
9677
|
};
|
|
8214
9678
|
function getEXTColorBufferHalfFloat(context) {
|
|
@@ -8221,7 +9685,7 @@ function getEXTColorBufferHalfFloat(context) {
|
|
|
8221
9685
|
|
|
8222
9686
|
// ../../../packages/framework/webgl/lib/esm/extensions/ext-texture-filter-anisotropic.js
|
|
8223
9687
|
init_console_gjs();
|
|
8224
|
-
|
|
9688
|
+
init_auto_globals_53fe98c6e6();
|
|
8225
9689
|
var EXTTextureFilterAnisotropic = class {
|
|
8226
9690
|
constructor() {
|
|
8227
9691
|
this.TEXTURE_MAX_ANISOTROPY_EXT = 34046;
|
|
@@ -8239,7 +9703,7 @@ function getEXTTextureFilterAnisotropic(context) {
|
|
|
8239
9703
|
|
|
8240
9704
|
// ../../../packages/framework/webgl/lib/esm/extensions/oes-texture-half-float.js
|
|
8241
9705
|
init_console_gjs();
|
|
8242
|
-
|
|
9706
|
+
init_auto_globals_53fe98c6e6();
|
|
8243
9707
|
var OESTextureHalfFloat = class {
|
|
8244
9708
|
constructor() {
|
|
8245
9709
|
this.HALF_FLOAT_OES = 36193;
|
|
@@ -8258,7 +9722,7 @@ function getOESTextureHalfFloat(context) {
|
|
|
8258
9722
|
|
|
8259
9723
|
// ../../../packages/framework/webgl/lib/esm/webgl-active-info.js
|
|
8260
9724
|
init_console_gjs();
|
|
8261
|
-
|
|
9725
|
+
init_auto_globals_53fe98c6e6();
|
|
8262
9726
|
var WebGLActiveInfo = class {
|
|
8263
9727
|
constructor(_) {
|
|
8264
9728
|
this.size = _.size;
|
|
@@ -8269,11 +9733,11 @@ var WebGLActiveInfo = class {
|
|
|
8269
9733
|
|
|
8270
9734
|
// ../../../packages/framework/webgl/lib/esm/webgl-framebuffer.js
|
|
8271
9735
|
init_console_gjs();
|
|
8272
|
-
|
|
9736
|
+
init_auto_globals_53fe98c6e6();
|
|
8273
9737
|
|
|
8274
9738
|
// ../../../packages/framework/webgl/lib/esm/linkable.js
|
|
8275
9739
|
init_console_gjs();
|
|
8276
|
-
|
|
9740
|
+
init_auto_globals_53fe98c6e6();
|
|
8277
9741
|
var Linkable = class {
|
|
8278
9742
|
constructor(_) {
|
|
8279
9743
|
this._ = 0;
|
|
@@ -8430,7 +9894,7 @@ var WebGLFramebuffer = class extends Linkable {
|
|
|
8430
9894
|
|
|
8431
9895
|
// ../../../packages/framework/webgl/lib/esm/webgl-buffer.js
|
|
8432
9896
|
init_console_gjs();
|
|
8433
|
-
|
|
9897
|
+
init_auto_globals_53fe98c6e6();
|
|
8434
9898
|
var WebGLBuffer = class extends Linkable {
|
|
8435
9899
|
constructor(_, ctx) {
|
|
8436
9900
|
super(_);
|
|
@@ -8447,7 +9911,7 @@ var WebGLBuffer = class extends Linkable {
|
|
|
8447
9911
|
|
|
8448
9912
|
// ../../../packages/framework/webgl/lib/esm/webgl-drawing-buffer-wrapper.js
|
|
8449
9913
|
init_console_gjs();
|
|
8450
|
-
|
|
9914
|
+
init_auto_globals_53fe98c6e6();
|
|
8451
9915
|
var WebGLDrawingBufferWrapper = class {
|
|
8452
9916
|
constructor(framebuffer, color, depthStencil) {
|
|
8453
9917
|
this._framebuffer = framebuffer;
|
|
@@ -8458,7 +9922,7 @@ var WebGLDrawingBufferWrapper = class {
|
|
|
8458
9922
|
|
|
8459
9923
|
// ../../../packages/framework/webgl/lib/esm/webgl-program.js
|
|
8460
9924
|
init_console_gjs();
|
|
8461
|
-
|
|
9925
|
+
init_auto_globals_53fe98c6e6();
|
|
8462
9926
|
var WebGLProgram = class extends Linkable {
|
|
8463
9927
|
constructor(_, ctx) {
|
|
8464
9928
|
super(_);
|
|
@@ -8483,7 +9947,7 @@ var WebGLProgram = class extends Linkable {
|
|
|
8483
9947
|
|
|
8484
9948
|
// ../../../packages/framework/webgl/lib/esm/webgl-renderbuffer.js
|
|
8485
9949
|
init_console_gjs();
|
|
8486
|
-
|
|
9950
|
+
init_auto_globals_53fe98c6e6();
|
|
8487
9951
|
var WebGLRenderbuffer = class extends Linkable {
|
|
8488
9952
|
constructor(_, ctx) {
|
|
8489
9953
|
super(_);
|
|
@@ -8506,7 +9970,7 @@ var WebGLRenderbuffer = class extends Linkable {
|
|
|
8506
9970
|
|
|
8507
9971
|
// ../../../packages/framework/webgl/lib/esm/webgl-shader.js
|
|
8508
9972
|
init_console_gjs();
|
|
8509
|
-
|
|
9973
|
+
init_auto_globals_53fe98c6e6();
|
|
8510
9974
|
var WebGLShader = class extends Linkable {
|
|
8511
9975
|
constructor(_, ctx, type) {
|
|
8512
9976
|
super(_);
|
|
@@ -8529,7 +9993,7 @@ var WebGLShader = class extends Linkable {
|
|
|
8529
9993
|
|
|
8530
9994
|
// ../../../packages/framework/webgl/lib/esm/webgl-shader-precision-format.js
|
|
8531
9995
|
init_console_gjs();
|
|
8532
|
-
|
|
9996
|
+
init_auto_globals_53fe98c6e6();
|
|
8533
9997
|
var WebGLShaderPrecisionFormat = class {
|
|
8534
9998
|
constructor(_) {
|
|
8535
9999
|
this.rangeMin = _.rangeMin;
|
|
@@ -8540,7 +10004,7 @@ var WebGLShaderPrecisionFormat = class {
|
|
|
8540
10004
|
|
|
8541
10005
|
// ../../../packages/framework/webgl/lib/esm/webgl-texture-unit.js
|
|
8542
10006
|
init_console_gjs();
|
|
8543
|
-
|
|
10007
|
+
init_auto_globals_53fe98c6e6();
|
|
8544
10008
|
var WebGLTextureUnit = class {
|
|
8545
10009
|
constructor(ctx, idx) {
|
|
8546
10010
|
this._mode = 0;
|
|
@@ -8553,7 +10017,7 @@ var WebGLTextureUnit = class {
|
|
|
8553
10017
|
|
|
8554
10018
|
// ../../../packages/framework/webgl/lib/esm/webgl-texture.js
|
|
8555
10019
|
init_console_gjs();
|
|
8556
|
-
|
|
10020
|
+
init_auto_globals_53fe98c6e6();
|
|
8557
10021
|
var WebGLTexture = class extends Linkable {
|
|
8558
10022
|
constructor(_, ctx) {
|
|
8559
10023
|
super(_);
|
|
@@ -8574,7 +10038,7 @@ var WebGLTexture = class extends Linkable {
|
|
|
8574
10038
|
|
|
8575
10039
|
// ../../../packages/framework/webgl/lib/esm/webgl-vertex-attribute.js
|
|
8576
10040
|
init_console_gjs();
|
|
8577
|
-
|
|
10041
|
+
init_auto_globals_53fe98c6e6();
|
|
8578
10042
|
var WebGLVertexArrayObjectAttribute = class {
|
|
8579
10043
|
constructor(ctx, idx) {
|
|
8580
10044
|
this._isPointer = false;
|
|
@@ -9508,9 +10972,9 @@ var WebGLContextBase = class {
|
|
|
9508
10972
|
const glArea = this.canvas.getGlArea();
|
|
9509
10973
|
const es = glArea.get_use_es();
|
|
9510
10974
|
const usesGlsl1Syntax = /\b(attribute|varying)\b/.test(source);
|
|
9511
|
-
const
|
|
9512
|
-
if (
|
|
9513
|
-
source = "#version " +
|
|
10975
|
+
const version2 = usesGlsl1Syntax ? es ? "100" : "120" : this._getGlslVersion(es);
|
|
10976
|
+
if (version2) {
|
|
10977
|
+
source = "#version " + version2 + "\n" + preamble + source;
|
|
9514
10978
|
} else if (preamble) {
|
|
9515
10979
|
source = preamble + source;
|
|
9516
10980
|
}
|
|
@@ -12226,12 +13690,12 @@ var WebGLRenderingContext2 = class extends WebGLContextBase {
|
|
|
12226
13690
|
|
|
12227
13691
|
// ../../../packages/framework/webgl/lib/esm/webgl2-rendering-context.js
|
|
12228
13692
|
init_console_gjs();
|
|
12229
|
-
|
|
13693
|
+
init_auto_globals_53fe98c6e6();
|
|
12230
13694
|
import GdkPixbuf4 from "gi://GdkPixbuf?version=2.0";
|
|
12231
13695
|
|
|
12232
13696
|
// ../../../packages/framework/webgl/lib/esm/webgl-query.js
|
|
12233
13697
|
init_console_gjs();
|
|
12234
|
-
|
|
13698
|
+
init_auto_globals_53fe98c6e6();
|
|
12235
13699
|
var WebGLQuery = class extends Linkable {
|
|
12236
13700
|
constructor(_, ctx) {
|
|
12237
13701
|
super(_);
|
|
@@ -12246,7 +13710,7 @@ var WebGLQuery = class extends Linkable {
|
|
|
12246
13710
|
|
|
12247
13711
|
// ../../../packages/framework/webgl/lib/esm/webgl-sampler.js
|
|
12248
13712
|
init_console_gjs();
|
|
12249
|
-
|
|
13713
|
+
init_auto_globals_53fe98c6e6();
|
|
12250
13714
|
var WebGLSampler = class extends Linkable {
|
|
12251
13715
|
constructor(_, ctx) {
|
|
12252
13716
|
super(_);
|
|
@@ -12261,7 +13725,7 @@ var WebGLSampler = class extends Linkable {
|
|
|
12261
13725
|
|
|
12262
13726
|
// ../../../packages/framework/webgl/lib/esm/webgl-sync.js
|
|
12263
13727
|
init_console_gjs();
|
|
12264
|
-
|
|
13728
|
+
init_auto_globals_53fe98c6e6();
|
|
12265
13729
|
var WebGLSync = class extends Linkable {
|
|
12266
13730
|
constructor(_, ctx) {
|
|
12267
13731
|
super(_);
|
|
@@ -12276,7 +13740,7 @@ var WebGLSync = class extends Linkable {
|
|
|
12276
13740
|
|
|
12277
13741
|
// ../../../packages/framework/webgl/lib/esm/webgl-transform-feedback.js
|
|
12278
13742
|
init_console_gjs();
|
|
12279
|
-
|
|
13743
|
+
init_auto_globals_53fe98c6e6();
|
|
12280
13744
|
var WebGLTransformFeedback = class extends Linkable {
|
|
12281
13745
|
constructor(_, ctx) {
|
|
12282
13746
|
super(_);
|
|
@@ -12291,7 +13755,7 @@ var WebGLTransformFeedback = class extends Linkable {
|
|
|
12291
13755
|
|
|
12292
13756
|
// ../../../packages/framework/webgl/lib/esm/webgl-vertex-array-object.js
|
|
12293
13757
|
init_console_gjs();
|
|
12294
|
-
|
|
13758
|
+
init_auto_globals_53fe98c6e6();
|
|
12295
13759
|
var WebGLVertexArrayObject = class extends Linkable {
|
|
12296
13760
|
constructor(_, ctx) {
|
|
12297
13761
|
super(_);
|
|
@@ -13577,11 +15041,11 @@ var WebGL2RenderingContext = class _WebGL2RenderingContext extends WebGLContextB
|
|
|
13577
15041
|
|
|
13578
15042
|
// ../../../packages/framework/webgl/lib/esm/html-canvas-element.js
|
|
13579
15043
|
init_console_gjs();
|
|
13580
|
-
|
|
15044
|
+
init_auto_globals_53fe98c6e6();
|
|
13581
15045
|
|
|
13582
15046
|
// ../../../packages/dom/dom-elements/lib/esm/index.js
|
|
13583
15047
|
init_console_gjs();
|
|
13584
|
-
|
|
15048
|
+
init_auto_globals_53fe98c6e6();
|
|
13585
15049
|
init_html_canvas_element();
|
|
13586
15050
|
|
|
13587
15051
|
// ../../../packages/framework/webgl/lib/esm/html-canvas-element.js
|
|
@@ -13647,25 +15111,25 @@ var HTMLCanvasElement3 = class extends HTMLCanvasElement2 {
|
|
|
13647
15111
|
|
|
13648
15112
|
// ../../../packages/framework/webgl/lib/esm/webgl-bridge.js
|
|
13649
15113
|
init_console_gjs();
|
|
13650
|
-
|
|
15114
|
+
init_auto_globals_53fe98c6e6();
|
|
13651
15115
|
import GObject from "gi://GObject";
|
|
13652
15116
|
import GLib2 from "gi://GLib?version=2.0";
|
|
13653
15117
|
import Gtk3 from "gi://Gtk?version=4.0";
|
|
13654
15118
|
|
|
13655
15119
|
// ../../../packages/framework/event-bridge/lib/esm/index.js
|
|
13656
15120
|
init_console_gjs();
|
|
13657
|
-
|
|
15121
|
+
init_auto_globals_53fe98c6e6();
|
|
13658
15122
|
|
|
13659
15123
|
// ../../../packages/framework/event-bridge/lib/esm/event-bridge.js
|
|
13660
15124
|
init_console_gjs();
|
|
13661
|
-
|
|
15125
|
+
init_auto_globals_53fe98c6e6();
|
|
13662
15126
|
init_esm4();
|
|
13663
15127
|
import Gtk2 from "gi://Gtk?version=4.0";
|
|
13664
15128
|
import Gdk4 from "gi://Gdk?version=4.0";
|
|
13665
15129
|
|
|
13666
15130
|
// ../../../packages/framework/event-bridge/lib/esm/key-map.js
|
|
13667
15131
|
init_console_gjs();
|
|
13668
|
-
|
|
15132
|
+
init_auto_globals_53fe98c6e6();
|
|
13669
15133
|
import Gdk3 from "gi://Gdk?version=4.0";
|
|
13670
15134
|
var SPECIAL_KEYS = {
|
|
13671
15135
|
Return: "Enter",
|
|
@@ -14189,15 +15653,15 @@ globalThis.WebGL2RenderingContext = WebGL2RenderingContext;
|
|
|
14189
15653
|
|
|
14190
15654
|
// src/three-demo.ts
|
|
14191
15655
|
init_console_gjs();
|
|
14192
|
-
|
|
15656
|
+
init_auto_globals_53fe98c6e6();
|
|
14193
15657
|
|
|
14194
15658
|
// ../../../node_modules/three/build/three.module.js
|
|
14195
15659
|
init_console_gjs();
|
|
14196
|
-
|
|
15660
|
+
init_auto_globals_53fe98c6e6();
|
|
14197
15661
|
|
|
14198
15662
|
// ../../../node_modules/three/build/three.core.js
|
|
14199
15663
|
init_console_gjs();
|
|
14200
|
-
|
|
15664
|
+
init_auto_globals_53fe98c6e6();
|
|
14201
15665
|
var REVISION = "184";
|
|
14202
15666
|
var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
|
|
14203
15667
|
var TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
|
|
@@ -27849,10 +29313,10 @@ var KeyframeTrack = class {
|
|
|
27849
29313
|
* @param {number} endTime - The end time.
|
|
27850
29314
|
* @return {KeyframeTrack} A reference to this keyframe track.
|
|
27851
29315
|
*/
|
|
27852
|
-
trim(
|
|
29316
|
+
trim(startTime2, endTime) {
|
|
27853
29317
|
const times = this.times, nKeys = times.length;
|
|
27854
29318
|
let from = 0, to = nKeys - 1;
|
|
27855
|
-
while (from !== nKeys && times[from] <
|
|
29319
|
+
while (from !== nKeys && times[from] < startTime2) {
|
|
27856
29320
|
++from;
|
|
27857
29321
|
}
|
|
27858
29322
|
while (to !== -1 && times[to] > endTime) {
|
|
@@ -32904,13 +34368,13 @@ function WebGLGeometries(gl, attributes2, info2, bindingStates) {
|
|
|
32904
34368
|
const indices = [];
|
|
32905
34369
|
const geometryIndex = geometry.index;
|
|
32906
34370
|
const geometryPosition = geometry.attributes.position;
|
|
32907
|
-
let
|
|
34371
|
+
let version2 = 0;
|
|
32908
34372
|
if (geometryPosition === void 0) {
|
|
32909
34373
|
return;
|
|
32910
34374
|
}
|
|
32911
34375
|
if (geometryIndex !== null) {
|
|
32912
34376
|
const array = geometryIndex.array;
|
|
32913
|
-
|
|
34377
|
+
version2 = geometryIndex.version;
|
|
32914
34378
|
for (let i = 0, l = array.length; i < l; i += 3) {
|
|
32915
34379
|
const a = array[i + 0];
|
|
32916
34380
|
const b = array[i + 1];
|
|
@@ -32919,7 +34383,7 @@ function WebGLGeometries(gl, attributes2, info2, bindingStates) {
|
|
|
32919
34383
|
}
|
|
32920
34384
|
} else {
|
|
32921
34385
|
const array = geometryPosition.array;
|
|
32922
|
-
|
|
34386
|
+
version2 = geometryPosition.version;
|
|
32923
34387
|
for (let i = 0, l = array.length / 3 - 1; i < l; i += 3) {
|
|
32924
34388
|
const a = i + 0;
|
|
32925
34389
|
const b = i + 1;
|
|
@@ -32928,7 +34392,7 @@ function WebGLGeometries(gl, attributes2, info2, bindingStates) {
|
|
|
32928
34392
|
}
|
|
32929
34393
|
}
|
|
32930
34394
|
const attribute = new (geometryPosition.count >= 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(indices, 1);
|
|
32931
|
-
attribute.version =
|
|
34395
|
+
attribute.version = version2;
|
|
32932
34396
|
const previousAttribute = wireframeAttributes.get(geometry);
|
|
32933
34397
|
if (previousAttribute) attributes2.remove(previousAttribute);
|
|
32934
34398
|
wireframeAttributes.set(geometry, attribute);
|
|
@@ -36339,14 +37803,14 @@ function WebGLState(gl, extensions) {
|
|
|
36339
37803
|
let currentPolygonOffsetUnits = null;
|
|
36340
37804
|
const maxTextures = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
|
|
36341
37805
|
let lineWidthAvailable = false;
|
|
36342
|
-
let
|
|
37806
|
+
let version2 = 0;
|
|
36343
37807
|
const glVersion = gl.getParameter(gl.VERSION);
|
|
36344
37808
|
if (glVersion.indexOf("WebGL") !== -1) {
|
|
36345
|
-
|
|
36346
|
-
lineWidthAvailable =
|
|
37809
|
+
version2 = parseFloat(/^WebGL (\d)/.exec(glVersion)[1]);
|
|
37810
|
+
lineWidthAvailable = version2 >= 1;
|
|
36347
37811
|
} else if (glVersion.indexOf("OpenGL ES") !== -1) {
|
|
36348
|
-
|
|
36349
|
-
lineWidthAvailable =
|
|
37812
|
+
version2 = parseFloat(/^OpenGL ES (\d)/.exec(glVersion)[1]);
|
|
37813
|
+
lineWidthAvailable = version2 >= 2;
|
|
36350
37814
|
}
|
|
36351
37815
|
let currentTextureSlot = null;
|
|
36352
37816
|
let currentBoundTextures = {};
|
|
@@ -41575,7 +43039,7 @@ var WebGLRenderer = class {
|
|
|
41575
43039
|
|
|
41576
43040
|
// ../../../node_modules/three/examples/jsm/controls/OrbitControls.js
|
|
41577
43041
|
init_console_gjs();
|
|
41578
|
-
|
|
43042
|
+
init_auto_globals_53fe98c6e6();
|
|
41579
43043
|
var _changeEvent = { type: "change" };
|
|
41580
43044
|
var _startEvent = { type: "start" };
|
|
41581
43045
|
var _endEvent = { type: "end" };
|
|
@@ -42487,7 +43951,7 @@ function interceptControlUp(event) {
|
|
|
42487
43951
|
|
|
42488
43952
|
// ../../../node_modules/three/examples/jsm/geometries/TeapotGeometry.js
|
|
42489
43953
|
init_console_gjs();
|
|
42490
|
-
|
|
43954
|
+
init_auto_globals_53fe98c6e6();
|
|
42491
43955
|
var TeapotGeometry = class extends BufferGeometry {
|
|
42492
43956
|
/**
|
|
42493
43957
|
* Constructs a new teapot geometry.
|
|
@@ -45447,7 +46911,7 @@ start.__type = [() => __\u03A9HTMLCanvasElement, "canvas", () => __\u03A9StartOp
|
|
|
45447
46911
|
|
|
45448
46912
|
// blueprint:./teapot-window.blp
|
|
45449
46913
|
init_console_gjs();
|
|
45450
|
-
|
|
46914
|
+
init_auto_globals_53fe98c6e6();
|
|
45451
46915
|
var teapot_window_default = '<?xml version="1.0" encoding="UTF-8"?>\n<!--\nDO NOT EDIT!\nThis file was @generated by blueprint-compiler. Instead, edit the\ncorresponding .blp file and regenerate this file with blueprint-compiler.\n-->\n<interface>\n <requires lib="gtk" version="4.0"/>\n <template class="TeapotWindow" parent="AdwApplicationWindow">\n <property name="default-width">1100</property>\n <property name="default-height">700</property>\n <property name="title">Three.js Teapot</property>\n <child type="breakpoint">\n <object class="AdwBreakpoint">\n <condition>max-width: 799sp</condition>\n <setter object="splitView" property="collapsed">true</setter>\n <setter object="splitView" property="show-sidebar">false</setter>\n </object>\n </child>\n <child type="breakpoint">\n <object class="AdwBreakpoint">\n <condition>min-width: 800sp</condition>\n <setter object="splitView" property="collapsed">false</setter>\n <setter object="splitView" property="show-sidebar">true</setter>\n </object>\n </child>\n <property name="content">\n <object class="GtkBox">\n <property name="orientation">1</property>\n <child>\n <object class="AdwHeaderBar">\n <child type="start">\n <object class="GtkToggleButton" id="sidebarToggleButton">\n <property name="icon-name">sidebar-show-symbolic</property>\n <property name="tooltip-text">Toggle Sidebar</property>\n <property name="active" bind-source="splitView" bind-property="show-sidebar" bind-flags="sync-create"/>\n </object>\n </child>\n <child type="end">\n <object class="GtkButton" id="pauseButton">\n <property name="icon-name">media-playback-pause-symbolic</property>\n <property name="tooltip-text">Pause Rendering</property>\n </object>\n </child>\n </object>\n </child>\n <child>\n <object class="AdwOverlaySplitView" id="splitView">\n <property name="sidebar-width-fraction">0.3</property>\n <property name="min-sidebar-width">280</property>\n <property name="max-sidebar-width">400</property>\n <property name="show-sidebar" bind-source="sidebarToggleButton" bind-property="active" bind-flags="sync-create"/>\n <property name="sidebar">\n <object class="GtkScrolledWindow">\n <property name="hscrollbar-policy">2</property>\n <child>\n <object class="GtkBox">\n <property name="orientation">1</property>\n <property name="spacing">12</property>\n <property name="margin-top">12</property>\n <property name="margin-bottom">12</property>\n <property name="margin-start">12</property>\n <property name="margin-end">12</property>\n <child>\n <object class="AdwPreferencesGroup">\n <property name="title">Geometry</property>\n <child>\n <object class="AdwComboRow" id="tessRow">\n <property name="title">Tessellation Level</property>\n </object>\n </child>\n <child>\n <object class="AdwSwitchRow" id="lidRow">\n <property name="title">Display Lid</property>\n <property name="active">true</property>\n </object>\n </child>\n <child>\n <object class="AdwSwitchRow" id="bodyRow">\n <property name="title">Display Body</property>\n <property name="active">true</property>\n </object>\n </child>\n <child>\n <object class="AdwSwitchRow" id="bottomRow">\n <property name="title">Display Bottom</property>\n <property name="active">true</property>\n </object>\n </child>\n <child>\n <object class="AdwSwitchRow" id="fitLidRow">\n <property name="title">Snug Lid</property>\n <property name="active">false</property>\n </object>\n </child>\n <child>\n <object class="AdwSwitchRow" id="nonblinnRow">\n <property name="title">Original Scale</property>\n <property name="active">false</property>\n </object>\n </child>\n </object>\n </child>\n <child>\n <object class="AdwPreferencesGroup">\n <property name="title">Material</property>\n <child>\n <object class="AdwComboRow" id="shadingRow">\n <property name="title">Shading</property>\n </object>\n </child>\n </object>\n </child>\n </object>\n </child>\n </object>\n </property>\n <property name="content">\n <object class="GtkBox" id="glAreaContainer">\n <property name="hexpand">true</property>\n <property name="vexpand">true</property>\n </object>\n </property>\n </object>\n </child>\n </object>\n </property>\n </template>\n</interface>';
|
|
45452
46916
|
|
|
45453
46917
|
// src/gjs/teapot-window.ts
|