decord/source/4686_ArraySpeciesCreate.js

45 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 4686
// Function ID: 4687
2026-08-24 06:08:38 +00:00
// Name: ArraySpeciesCreate
2026-08-25 06:04:03 +00:00
// Dependencies: [540, 4687, 541, 4688, 4690, 4696, 4650, 4698]
2026-08-24 06:08:38 +00:00
2026-08-25 06:04:03 +00:00
// Module 4686 (ArraySpeciesCreate)
2026-08-24 06:08:38 +00:00
import getEvalledConstructor from "getEvalledConstructor" /* 540 */;
import _mod541 from "module_541" /* 541 */;
2026-08-25 06:04:03 +00:00
import isInteger from "isInteger" /* 4687 */;
2026-08-24 06:08:38 +00:00
let closure_2 = getEvalledConstructor("%Symbol.species%", true);
export default function ArraySpeciesCreate(arg0, arg1) {
if (isInteger(arg1)) {
if (arg1 >= 0) {
2026-08-25 06:04:03 +00:00
if (tmp(4688)(arg0)) {
const tmp3 = tmp(4696)(arg0, "constructor");
2026-08-24 06:08:38 +00:00
let tmp5 = closure_2;
if (closure_2) {
2026-08-25 06:04:03 +00:00
tmp5 = tmp(4650)(tmp3);
2026-08-24 06:08:38 +00:00
}
let tmp6 = tmp3;
if (tmp5) {
2026-08-25 06:04:03 +00:00
const tmp7 = tmp(4696)(tmp3, tmp4);
2026-08-24 06:08:38 +00:00
tmp5 = null === tmp7;
tmp6 = tmp7;
}
if (undefined === tmp6) {
2026-08-25 06:04:03 +00:00
return tmp(4690)(arg1);
} else if (tmp(4698)(tmp6)) {
2026-08-24 06:08:38 +00:00
tmp6 = new tmp6(arg1);
return tmp6;
} else {
const tmp11 = new tmp(541)("C must be a constructor");
throw tmp11;
}
tmp4 = closure_2;
} else {
2026-08-25 06:04:03 +00:00
return tmp(4690)(arg1);
2026-08-24 06:08:38 +00:00
}
}
}
throw new _mod541("Assertion failed: length must be an integer >= 0");
};