@dxos/node-std 0.6.13 → 0.6.14-main.1366248
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/lib/browser/assert.mjs +1 -1
- package/dist/lib/browser/{chunk-EC477KOW.mjs → chunk-GM2BGSSZ.mjs} +398 -2
- package/dist/lib/browser/chunk-GM2BGSSZ.mjs.map +7 -0
- package/dist/lib/browser/inject-globals.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/util.mjs +1 -1
- package/dist/lib/node/inject-globals.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/util.cjs +377 -1
- package/dist/lib/node/util.cjs.map +4 -4
- package/dist/lib/node-esm/_/config.mjs +22 -0
- package/dist/lib/node-esm/_/config.mjs.map +7 -0
- package/dist/lib/node-esm/assert.mjs +10 -0
- package/dist/lib/node-esm/assert.mjs.map +7 -0
- package/dist/lib/node-esm/buffer.mjs +15 -0
- package/dist/lib/node-esm/buffer.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-KIVTZY6Z.mjs +113 -0
- package/dist/lib/node-esm/chunk-KIVTZY6Z.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RZY7P3LC.mjs +39 -0
- package/dist/lib/node-esm/chunk-RZY7P3LC.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SI3SGBPB.mjs +30 -0
- package/dist/lib/node-esm/chunk-SI3SGBPB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SOGAFZTS.mjs +1798 -0
- package/dist/lib/node-esm/chunk-SOGAFZTS.mjs.map +7 -0
- package/dist/lib/node-esm/crypto.mjs +11 -0
- package/dist/lib/node-esm/crypto.mjs.map +7 -0
- package/dist/lib/node-esm/events.mjs +11 -0
- package/dist/lib/node-esm/events.mjs.map +7 -0
- package/dist/lib/node-esm/fs/promises.mjs +70 -0
- package/dist/lib/node-esm/fs/promises.mjs.map +7 -0
- package/dist/lib/node-esm/fs.mjs +28 -0
- package/dist/lib/node-esm/fs.mjs.map +7 -0
- package/dist/lib/node-esm/globals.mjs +6 -0
- package/dist/lib/node-esm/globals.mjs.map +7 -0
- package/dist/lib/node-esm/inject-globals.mjs +21 -0
- package/dist/lib/node-esm/inject-globals.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/lib/node-esm/path.mjs +441 -0
- package/dist/lib/node-esm/path.mjs.map +7 -0
- package/dist/lib/node-esm/stream.mjs +15 -0
- package/dist/lib/node-esm/stream.mjs.map +7 -0
- package/dist/lib/node-esm/util.mjs +2556 -0
- package/dist/lib/node-esm/util.mjs.map +7 -0
- package/package.json +8 -7
- package/dist/lib/browser/chunk-EC477KOW.mjs.map +0 -7
package/dist/lib/node/util.cjs
CHANGED
|
@@ -545,6 +545,382 @@ var require_has_property_descriptors = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
|
545
545
|
module2.exports = hasPropertyDescriptors;
|
|
546
546
|
}
|
|
547
547
|
});
|
|
548
|
+
var require_es_errors = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
549
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) {
|
|
550
|
+
"use strict";
|
|
551
|
+
module2.exports = Error;
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
var require_eval = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
555
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) {
|
|
556
|
+
"use strict";
|
|
557
|
+
module2.exports = EvalError;
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
var require_range = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
561
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) {
|
|
562
|
+
"use strict";
|
|
563
|
+
module2.exports = RangeError;
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
var require_ref = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
567
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) {
|
|
568
|
+
"use strict";
|
|
569
|
+
module2.exports = ReferenceError;
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
var require_syntax = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
573
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) {
|
|
574
|
+
"use strict";
|
|
575
|
+
module2.exports = SyntaxError;
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
var require_type = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
579
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) {
|
|
580
|
+
"use strict";
|
|
581
|
+
module2.exports = TypeError;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
var require_uri = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
585
|
+
"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) {
|
|
586
|
+
"use strict";
|
|
587
|
+
module2.exports = URIError;
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
var require_has_proto2 = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
591
|
+
"node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports2, module2) {
|
|
592
|
+
"use strict";
|
|
593
|
+
var test = {
|
|
594
|
+
__proto__: null,
|
|
595
|
+
foo: {}
|
|
596
|
+
};
|
|
597
|
+
var $Object = Object;
|
|
598
|
+
module2.exports = function hasProto() {
|
|
599
|
+
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
var require_hasown2 = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
604
|
+
"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports2, module2) {
|
|
605
|
+
"use strict";
|
|
606
|
+
var call = Function.prototype.call;
|
|
607
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
608
|
+
var bind = require_function_bind();
|
|
609
|
+
module2.exports = bind.call(call, $hasOwn);
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
var require_get_intrinsic2 = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
613
|
+
"node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports2, module2) {
|
|
614
|
+
"use strict";
|
|
615
|
+
var undefined2;
|
|
616
|
+
var $Error = require_es_errors();
|
|
617
|
+
var $EvalError = require_eval();
|
|
618
|
+
var $RangeError = require_range();
|
|
619
|
+
var $ReferenceError = require_ref();
|
|
620
|
+
var $SyntaxError = require_syntax();
|
|
621
|
+
var $TypeError = require_type();
|
|
622
|
+
var $URIError = require_uri();
|
|
623
|
+
var $Function = Function;
|
|
624
|
+
var getEvalledConstructor = function(expressionSyntax) {
|
|
625
|
+
try {
|
|
626
|
+
return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
|
|
627
|
+
} catch (e) {
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
631
|
+
if ($gOPD) {
|
|
632
|
+
try {
|
|
633
|
+
$gOPD({}, "");
|
|
634
|
+
} catch (e) {
|
|
635
|
+
$gOPD = null;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
var throwTypeError = function() {
|
|
639
|
+
throw new $TypeError();
|
|
640
|
+
};
|
|
641
|
+
var ThrowTypeError = $gOPD ? function() {
|
|
642
|
+
try {
|
|
643
|
+
arguments.callee;
|
|
644
|
+
return throwTypeError;
|
|
645
|
+
} catch (calleeThrows) {
|
|
646
|
+
try {
|
|
647
|
+
return $gOPD(arguments, "callee").get;
|
|
648
|
+
} catch (gOPDthrows) {
|
|
649
|
+
return throwTypeError;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}() : throwTypeError;
|
|
653
|
+
var hasSymbols = require_has_symbols()();
|
|
654
|
+
var hasProto = require_has_proto2()();
|
|
655
|
+
var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
|
|
656
|
+
return x.__proto__;
|
|
657
|
+
} : null);
|
|
658
|
+
var needsEval = {};
|
|
659
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
|
|
660
|
+
var INTRINSICS = {
|
|
661
|
+
__proto__: null,
|
|
662
|
+
"%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
|
|
663
|
+
"%Array%": Array,
|
|
664
|
+
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
|
|
665
|
+
"%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
|
|
666
|
+
"%AsyncFromSyncIteratorPrototype%": undefined2,
|
|
667
|
+
"%AsyncFunction%": needsEval,
|
|
668
|
+
"%AsyncGenerator%": needsEval,
|
|
669
|
+
"%AsyncGeneratorFunction%": needsEval,
|
|
670
|
+
"%AsyncIteratorPrototype%": needsEval,
|
|
671
|
+
"%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
|
|
672
|
+
"%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
|
|
673
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
|
|
674
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
|
|
675
|
+
"%Boolean%": Boolean,
|
|
676
|
+
"%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
|
|
677
|
+
"%Date%": Date,
|
|
678
|
+
"%decodeURI%": decodeURI,
|
|
679
|
+
"%decodeURIComponent%": decodeURIComponent,
|
|
680
|
+
"%encodeURI%": encodeURI,
|
|
681
|
+
"%encodeURIComponent%": encodeURIComponent,
|
|
682
|
+
"%Error%": $Error,
|
|
683
|
+
"%eval%": eval,
|
|
684
|
+
// eslint-disable-line no-eval
|
|
685
|
+
"%EvalError%": $EvalError,
|
|
686
|
+
"%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
|
|
687
|
+
"%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
|
|
688
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
|
|
689
|
+
"%Function%": $Function,
|
|
690
|
+
"%GeneratorFunction%": needsEval,
|
|
691
|
+
"%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
|
|
692
|
+
"%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
|
|
693
|
+
"%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
|
|
694
|
+
"%isFinite%": isFinite,
|
|
695
|
+
"%isNaN%": isNaN,
|
|
696
|
+
"%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
|
|
697
|
+
"%JSON%": typeof JSON === "object" ? JSON : undefined2,
|
|
698
|
+
"%Map%": typeof Map === "undefined" ? undefined2 : Map,
|
|
699
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
700
|
+
"%Math%": Math,
|
|
701
|
+
"%Number%": Number,
|
|
702
|
+
"%Object%": Object,
|
|
703
|
+
"%parseFloat%": parseFloat,
|
|
704
|
+
"%parseInt%": parseInt,
|
|
705
|
+
"%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
|
|
706
|
+
"%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
|
|
707
|
+
"%RangeError%": $RangeError,
|
|
708
|
+
"%ReferenceError%": $ReferenceError,
|
|
709
|
+
"%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
|
|
710
|
+
"%RegExp%": RegExp,
|
|
711
|
+
"%Set%": typeof Set === "undefined" ? undefined2 : Set,
|
|
712
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
713
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
|
|
714
|
+
"%String%": String,
|
|
715
|
+
"%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
|
|
716
|
+
"%Symbol%": hasSymbols ? Symbol : undefined2,
|
|
717
|
+
"%SyntaxError%": $SyntaxError,
|
|
718
|
+
"%ThrowTypeError%": ThrowTypeError,
|
|
719
|
+
"%TypedArray%": TypedArray,
|
|
720
|
+
"%TypeError%": $TypeError,
|
|
721
|
+
"%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
|
|
722
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
|
|
723
|
+
"%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
|
|
724
|
+
"%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
|
|
725
|
+
"%URIError%": $URIError,
|
|
726
|
+
"%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
|
|
727
|
+
"%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
|
|
728
|
+
"%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
|
|
729
|
+
};
|
|
730
|
+
if (getProto) {
|
|
731
|
+
try {
|
|
732
|
+
null.error;
|
|
733
|
+
} catch (e) {
|
|
734
|
+
errorProto = getProto(getProto(e));
|
|
735
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
var errorProto;
|
|
739
|
+
var doEval = function doEval2(name) {
|
|
740
|
+
var value;
|
|
741
|
+
if (name === "%AsyncFunction%") {
|
|
742
|
+
value = getEvalledConstructor("async function () {}");
|
|
743
|
+
} else if (name === "%GeneratorFunction%") {
|
|
744
|
+
value = getEvalledConstructor("function* () {}");
|
|
745
|
+
} else if (name === "%AsyncGeneratorFunction%") {
|
|
746
|
+
value = getEvalledConstructor("async function* () {}");
|
|
747
|
+
} else if (name === "%AsyncGenerator%") {
|
|
748
|
+
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
749
|
+
if (fn) {
|
|
750
|
+
value = fn.prototype;
|
|
751
|
+
}
|
|
752
|
+
} else if (name === "%AsyncIteratorPrototype%") {
|
|
753
|
+
var gen = doEval2("%AsyncGenerator%");
|
|
754
|
+
if (gen && getProto) {
|
|
755
|
+
value = getProto(gen.prototype);
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
INTRINSICS[name] = value;
|
|
759
|
+
return value;
|
|
760
|
+
};
|
|
761
|
+
var LEGACY_ALIASES = {
|
|
762
|
+
__proto__: null,
|
|
763
|
+
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
764
|
+
"%ArrayPrototype%": ["Array", "prototype"],
|
|
765
|
+
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
766
|
+
"%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
|
|
767
|
+
"%ArrayProto_keys%": ["Array", "prototype", "keys"],
|
|
768
|
+
"%ArrayProto_values%": ["Array", "prototype", "values"],
|
|
769
|
+
"%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
|
|
770
|
+
"%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
|
|
771
|
+
"%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
|
|
772
|
+
"%BooleanPrototype%": ["Boolean", "prototype"],
|
|
773
|
+
"%DataViewPrototype%": ["DataView", "prototype"],
|
|
774
|
+
"%DatePrototype%": ["Date", "prototype"],
|
|
775
|
+
"%ErrorPrototype%": ["Error", "prototype"],
|
|
776
|
+
"%EvalErrorPrototype%": ["EvalError", "prototype"],
|
|
777
|
+
"%Float32ArrayPrototype%": ["Float32Array", "prototype"],
|
|
778
|
+
"%Float64ArrayPrototype%": ["Float64Array", "prototype"],
|
|
779
|
+
"%FunctionPrototype%": ["Function", "prototype"],
|
|
780
|
+
"%Generator%": ["GeneratorFunction", "prototype"],
|
|
781
|
+
"%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
|
|
782
|
+
"%Int8ArrayPrototype%": ["Int8Array", "prototype"],
|
|
783
|
+
"%Int16ArrayPrototype%": ["Int16Array", "prototype"],
|
|
784
|
+
"%Int32ArrayPrototype%": ["Int32Array", "prototype"],
|
|
785
|
+
"%JSONParse%": ["JSON", "parse"],
|
|
786
|
+
"%JSONStringify%": ["JSON", "stringify"],
|
|
787
|
+
"%MapPrototype%": ["Map", "prototype"],
|
|
788
|
+
"%NumberPrototype%": ["Number", "prototype"],
|
|
789
|
+
"%ObjectPrototype%": ["Object", "prototype"],
|
|
790
|
+
"%ObjProto_toString%": ["Object", "prototype", "toString"],
|
|
791
|
+
"%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
|
|
792
|
+
"%PromisePrototype%": ["Promise", "prototype"],
|
|
793
|
+
"%PromiseProto_then%": ["Promise", "prototype", "then"],
|
|
794
|
+
"%Promise_all%": ["Promise", "all"],
|
|
795
|
+
"%Promise_reject%": ["Promise", "reject"],
|
|
796
|
+
"%Promise_resolve%": ["Promise", "resolve"],
|
|
797
|
+
"%RangeErrorPrototype%": ["RangeError", "prototype"],
|
|
798
|
+
"%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
|
|
799
|
+
"%RegExpPrototype%": ["RegExp", "prototype"],
|
|
800
|
+
"%SetPrototype%": ["Set", "prototype"],
|
|
801
|
+
"%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
|
|
802
|
+
"%StringPrototype%": ["String", "prototype"],
|
|
803
|
+
"%SymbolPrototype%": ["Symbol", "prototype"],
|
|
804
|
+
"%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
|
|
805
|
+
"%TypedArrayPrototype%": ["TypedArray", "prototype"],
|
|
806
|
+
"%TypeErrorPrototype%": ["TypeError", "prototype"],
|
|
807
|
+
"%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
|
|
808
|
+
"%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
|
|
809
|
+
"%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
|
|
810
|
+
"%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
|
|
811
|
+
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
812
|
+
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
813
|
+
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
814
|
+
};
|
|
815
|
+
var bind = require_function_bind();
|
|
816
|
+
var hasOwn = require_hasown2();
|
|
817
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
818
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
819
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
820
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
821
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
822
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
823
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
824
|
+
var stringToPath = function stringToPath2(string) {
|
|
825
|
+
var first = $strSlice(string, 0, 1);
|
|
826
|
+
var last = $strSlice(string, -1);
|
|
827
|
+
if (first === "%" && last !== "%") {
|
|
828
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
|
|
829
|
+
} else if (last === "%" && first !== "%") {
|
|
830
|
+
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
831
|
+
}
|
|
832
|
+
var result = [];
|
|
833
|
+
$replace(string, rePropName, function(match, number, quote, subString) {
|
|
834
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
|
|
835
|
+
});
|
|
836
|
+
return result;
|
|
837
|
+
};
|
|
838
|
+
var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
|
|
839
|
+
var intrinsicName = name;
|
|
840
|
+
var alias;
|
|
841
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
842
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
843
|
+
intrinsicName = "%" + alias[0] + "%";
|
|
844
|
+
}
|
|
845
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
846
|
+
var value = INTRINSICS[intrinsicName];
|
|
847
|
+
if (value === needsEval) {
|
|
848
|
+
value = doEval(intrinsicName);
|
|
849
|
+
}
|
|
850
|
+
if (typeof value === "undefined" && !allowMissing) {
|
|
851
|
+
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
852
|
+
}
|
|
853
|
+
return {
|
|
854
|
+
alias,
|
|
855
|
+
name: intrinsicName,
|
|
856
|
+
value
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
860
|
+
};
|
|
861
|
+
module2.exports = function GetIntrinsic(name, allowMissing) {
|
|
862
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
863
|
+
throw new $TypeError("intrinsic name must be a non-empty string");
|
|
864
|
+
}
|
|
865
|
+
if (arguments.length > 1 && typeof allowMissing !== "boolean") {
|
|
866
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
867
|
+
}
|
|
868
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
869
|
+
throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
870
|
+
}
|
|
871
|
+
var parts = stringToPath(name);
|
|
872
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
873
|
+
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
874
|
+
var intrinsicRealName = intrinsic.name;
|
|
875
|
+
var value = intrinsic.value;
|
|
876
|
+
var skipFurtherCaching = false;
|
|
877
|
+
var alias = intrinsic.alias;
|
|
878
|
+
if (alias) {
|
|
879
|
+
intrinsicBaseName = alias[0];
|
|
880
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
881
|
+
}
|
|
882
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
883
|
+
var part = parts[i];
|
|
884
|
+
var first = $strSlice(part, 0, 1);
|
|
885
|
+
var last = $strSlice(part, -1);
|
|
886
|
+
if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
|
|
887
|
+
throw new $SyntaxError("property names with quotes must have matching quotes");
|
|
888
|
+
}
|
|
889
|
+
if (part === "constructor" || !isOwn) {
|
|
890
|
+
skipFurtherCaching = true;
|
|
891
|
+
}
|
|
892
|
+
intrinsicBaseName += "." + part;
|
|
893
|
+
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
894
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
895
|
+
value = INTRINSICS[intrinsicRealName];
|
|
896
|
+
} else if (value != null) {
|
|
897
|
+
if (!(part in value)) {
|
|
898
|
+
if (!allowMissing) {
|
|
899
|
+
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
900
|
+
}
|
|
901
|
+
return void 0;
|
|
902
|
+
}
|
|
903
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
904
|
+
var desc = $gOPD(value, part);
|
|
905
|
+
isOwn = !!desc;
|
|
906
|
+
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
907
|
+
value = desc.get;
|
|
908
|
+
} else {
|
|
909
|
+
value = value[part];
|
|
910
|
+
}
|
|
911
|
+
} else {
|
|
912
|
+
isOwn = hasOwn(value, part);
|
|
913
|
+
value = value[part];
|
|
914
|
+
}
|
|
915
|
+
if (isOwn && !skipFurtherCaching) {
|
|
916
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return value;
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
});
|
|
548
924
|
var require_gopd = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
549
925
|
"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) {
|
|
550
926
|
"use strict";
|
|
@@ -564,7 +940,7 @@ var require_define_data_property = (0, import_chunk_6SZKM6EC.__commonJS)({
|
|
|
564
940
|
"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(exports2, module2) {
|
|
565
941
|
"use strict";
|
|
566
942
|
var hasPropertyDescriptors = require_has_property_descriptors()();
|
|
567
|
-
var GetIntrinsic =
|
|
943
|
+
var GetIntrinsic = require_get_intrinsic2();
|
|
568
944
|
var $defineProperty = hasPropertyDescriptors && GetIntrinsic("%Object.defineProperty%", true);
|
|
569
945
|
if ($defineProperty) {
|
|
570
946
|
try {
|