decord/source/__polyfill/14xxx/module_14294.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

175 lines
5.3 KiB
JavaScript

// Module ID: 14294
// Function ID: 14295
// Dependencies: [14295, 1162]
// Exports: createDataProperty, defineProperty, getInternalSlot, invariant, isLiteralPart, repeat, setInternalSlot, setMultiInternalSlots
// Module 14294
import e from "e" /* 1162 */;
import monadic from "monadic" /* 14295 */;
function getMultiInternalSlots(get, arg1) {
let length;
const items = [];
let num = 2;
if (2 < arguments.length) {
do {
items[num - 2] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
value = get.get(arg1);
require = value;
if (value) {
const _Object = Object;
return items.reduce((acc, item) => {
acc[item] = value[item];
return acc;
}, Object.create(null));
} else {
const _TypeError = TypeError;
const concat = "".concat;
const typeError = new TypeError("".concat(arg1, " InternalSlot has not been initialized"));
throw typeError;
}
}
let obj = { strategy: monadic.strategies.variadic };
const obj2 = { strategy: monadic.strategies.variadic };
const obj3 = { strategy: monadic.strategies.variadic };
const obj4 = { strategy: monadic.strategies.variadic };
export const repeat = function repeat(str, arg1) {
let length;
if (typeof str.repeat === "function") {
return str.repeat(arg1);
} else {
const _Array = Array;
const arr = new Array(arg1);
let num = 0;
if (0 < arr.length) {
do {
arr[num] = str;
num = num + 1;
length = arr.length;
} while (num < length);
}
return arr.join("");
}
};
export const setInternalSlot = function setInternalSlot(get, arg1, arg2, arg3) {
if (!get.get(arg1)) {
const _Object = Object;
const result = get.set(arg1, Object.create(null));
}
get.get(arg1)[arg2] = arg3;
};
export const setMultiInternalSlots = function setMultiInternalSlots(get, arg1, arg2) {
const keys = Object.keys(arg2);
for (let num = 0; num < keys.length; num = num + 1) {
let tmp = keys[num];
if (!get.get(arg1)) {
let _Object = Object;
let result = get.set(arg1, Object.create(null));
}
get.get(arg1)[tmp] = arg2[tmp];
}
};
export const getInternalSlot = function getInternalSlot(arg0, arg1, arg2) {
return getMultiInternalSlots(arg0, arg1, arg2)[arg2];
};
export { getMultiInternalSlots };
export const isLiteralPart = function isLiteralPart(type) {
return "literal" === type.type;
};
export const defineProperty = function defineProperty(arg0, arg1, value) {
Object.defineProperty(arg0, arg1, { configurable: true, enumerable: false, writable: true, value: value.value });
};
export const createDataProperty = function createDataProperty(arg0, direction, firstDay) {
Object.defineProperty(arg0, direction, { configurable: true, enumerable: true, writable: true, value: firstDay });
};
export const invariant = function invariant(arg0, arg1, arg2) {
let _Error = arg2;
if (undefined === arg2) {
_Error = Error;
}
if (!arg0) {
const _Error1 = new _Error(arg1);
throw _Error1;
}
};
export const UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
export const createMemoizedNumberFormat = monadic.memoize(() => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const bind = NumberFormat.bind;
const items1 = [undefined];
return new bind.apply(NumberFormat, e.__spreadArray(items1, items, false))();
}, { strategy: monadic.strategies.variadic });
export const createMemoizedDateTimeFormat = monadic.memoize(() => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const bind = DateTimeFormat.bind;
const items1 = [undefined];
return new bind.apply(DateTimeFormat, e.__spreadArray(items1, items, false))();
}, { strategy: monadic.strategies.variadic });
export const createMemoizedPluralRules = monadic.memoize(() => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const bind = PluralRules.bind;
const items1 = [undefined];
return new bind.apply(PluralRules, e.__spreadArray(items1, items, false))();
}, { strategy: monadic.strategies.variadic });
export const createMemoizedLocale = monadic.memoize(() => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const bind = Locale.bind;
const items1 = [undefined];
return new bind.apply(Locale, e.__spreadArray(items1, items, false))();
}, { strategy: monadic.strategies.variadic });
export const createMemoizedListFormat = monadic.memoize(() => {
let length;
const items = [];
let num = 0;
if (0 < arguments.length) {
do {
items[num] = arguments[num];
num = num + 1;
length = arguments.length;
} while (num < length);
}
const bind = ListFormat.bind;
const items1 = [undefined];
return new bind.apply(ListFormat, e.__spreadArray(items1, items, false))();
}, { strategy: monadic.strategies.variadic });