@poe-platform/safe-js 0.1.330 → 0.1.332
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/safe-js/chunks/{chunk-2JLVAZLE.js → chunk-2DDJ54IW.js} +16 -10
- package/dist/safe-js/chunks/{chunk-2JLVAZLE.js.map → chunk-2DDJ54IW.js.map} +2 -2
- package/dist/safe-js/chunks/{chunk-Y6J2FYVI.js → chunk-SL2YVQ4O.js} +2 -2
- package/dist/safe-js/cli.js +2 -2
- package/dist/safe-js/core.js +1 -1
- package/dist/safe-js/index.js +2 -2
- package/package.json +2 -2
- /package/dist/safe-js/chunks/{chunk-Y6J2FYVI.js.map → chunk-SL2YVQ4O.js.map} +0 -0
|
@@ -14883,7 +14883,7 @@ function createFloat32ArrayPrototypes(budget, constructor) {
|
|
|
14883
14883
|
getters.push(getter);
|
|
14884
14884
|
Object.defineProperty(shared, key, { get: accessorAdapter(getter, "get"), configurable: true });
|
|
14885
14885
|
}
|
|
14886
|
-
for (const key of ["set", "slice", "subarray", "fill", "copyWithin", "reverse", "at", "includes", "indexOf"])
|
|
14886
|
+
for (const key of ["set", "slice", "subarray", "fill", "copyWithin", "reverse", "at", "includes", "indexOf", "lastIndexOf"])
|
|
14887
14887
|
Object.defineProperty(shared, key, { value: getFloat32Member(new Float32Array(0), key, budget, constructor), writable: true, configurable: true });
|
|
14888
14888
|
const arrayPrototype = resolveIntrinsicIdentity(budget, '["Array","prototype"]');
|
|
14889
14889
|
Object.defineProperty(shared, "toString", { value: getSandboxDataProperty(arrayPrototype, "toString", budget), writable: true, configurable: true });
|
|
@@ -14965,17 +14965,17 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
14965
14965
|
if (key === "byteLength") return storage.length * 4;
|
|
14966
14966
|
if (key === "byteOffset") return storage.byteOffset;
|
|
14967
14967
|
if (key === "BYTES_PER_ELEMENT") return 4;
|
|
14968
|
-
if (!["set", "slice", "subarray", "fill", "copyWithin", "reverse", "at", "includes", "indexOf"].includes(key)) return void 0;
|
|
14968
|
+
if (!["set", "slice", "subarray", "fill", "copyWithin", "reverse", "at", "includes", "indexOf", "lastIndexOf"].includes(key)) return void 0;
|
|
14969
14969
|
return createSandboxClosure({
|
|
14970
14970
|
guest: true,
|
|
14971
14971
|
sandbox: true,
|
|
14972
14972
|
name: key,
|
|
14973
|
-
length: key === "reverse" ? 0 : key === "set" || key === "fill" || key === "at" || key === "includes" || key === "indexOf" ? 1 : 2,
|
|
14973
|
+
length: key === "reverse" ? 0 : key === "set" || key === "fill" || key === "at" || key === "includes" || key === "indexOf" || key === "lastIndexOf" ? 1 : 2,
|
|
14974
14974
|
call: (args, context) => {
|
|
14975
14975
|
const receiver = context?.thisValue;
|
|
14976
14976
|
if (!isFloat32Array(receiver))
|
|
14977
14977
|
throw new TypeError(`Float32Array#${key} requires a Float32Array receiver.`);
|
|
14978
|
-
const storage2 = float32Storage(receiver, key === "slice" || key === "fill" || key === "copyWithin" || key === "reverse" || key === "at" || key === "includes" || key === "indexOf");
|
|
14978
|
+
const storage2 = float32Storage(receiver, key === "slice" || key === "fill" || key === "copyWithin" || key === "reverse" || key === "at" || key === "includes" || key === "indexOf" || key === "lastIndexOf");
|
|
14979
14979
|
if (key === "reverse") {
|
|
14980
14980
|
const release = retainValues(budget, () => [receiver, ...args]);
|
|
14981
14981
|
try {
|
|
@@ -15004,19 +15004,25 @@ function getFloat32Member(value, property, budget, defaultConstructor) {
|
|
|
15004
15004
|
}),
|
|
15005
15005
|
invokeClosure: context?.invokeClosure ?? ((callee, values, thisValue, construct) => invokeBuiltinClosure(callee, values, budget, context, thisValue, construct))
|
|
15006
15006
|
};
|
|
15007
|
-
if (key === "includes" || key === "indexOf") {
|
|
15007
|
+
if (key === "includes" || key === "indexOf" || key === "lastIndexOf") {
|
|
15008
15008
|
const notFound = key === "includes" ? false : -1;
|
|
15009
15009
|
if (storage2.length === 0) return notFound;
|
|
15010
15010
|
return (async () => {
|
|
15011
15011
|
const release = retainValues(budget, () => [receiver, ...args]);
|
|
15012
15012
|
try {
|
|
15013
|
-
const
|
|
15014
|
-
|
|
15013
|
+
const backwards = key === "lastIndexOf";
|
|
15014
|
+
const numeric = backwards && args.length < 2 ? storage2.length - 1 : await sandboxNumber(args[1], budget, bridge);
|
|
15015
|
+
let start = relativeIndex(numeric, storage2.length);
|
|
15016
|
+
if (backwards) {
|
|
15017
|
+
const integer2 = Number.isNaN(numeric) ? 0 : Math.trunc(numeric);
|
|
15018
|
+
start = integer2 < 0 ? storage2.length + integer2 : Math.min(integer2, storage2.length - 1);
|
|
15019
|
+
}
|
|
15020
|
+
for (let index = start; backwards ? index >= 0 : index < storage2.length; index += backwards ? -1 : 1) {
|
|
15015
15021
|
budget.visitNode();
|
|
15016
|
-
if (key
|
|
15022
|
+
if (key !== "includes" && !(index in receiver)) continue;
|
|
15017
15023
|
const element = receiver[index];
|
|
15018
15024
|
if (element === args[0] || key === "includes" && Number.isNaN(element) && Number.isNaN(args[0]))
|
|
15019
|
-
return key === "includes" ? true : index;
|
|
15025
|
+
return key === "includes" ? true : index + 0;
|
|
15020
15026
|
}
|
|
15021
15027
|
return notFound;
|
|
15022
15028
|
} finally {
|
|
@@ -42447,4 +42453,4 @@ export {
|
|
|
42447
42453
|
FileSnapshotBackend,
|
|
42448
42454
|
run
|
|
42449
42455
|
};
|
|
42450
|
-
//# sourceMappingURL=chunk-
|
|
42456
|
+
//# sourceMappingURL=chunk-2DDJ54IW.js.map
|