decord/source/stores/RegionStore.tsx

156 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 15544
// Function ID: 119737
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1838, 22, 566, 686, 2]
2026-07-24 07:16:23 +00:00
// Module 15544 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import apply from "apply";
import initialize from "initialize";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
2026-07-23 10:11:24 +00:00
let c8 = null;
2026-07-20 16:05:17 +00:00
let closure_9 = {};
2026-07-23 10:11:24 +00:00
let tmp2 = ((Store) => {
2026-07-20 16:05:17 +00:00
class RegionStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, RegionStore);
obj = outer1_5(RegionStore);
tmp2 = outer1_4;
if (outer1_10()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(RegionStore, Store);
let obj = {
key: "initialize",
value() {
2026-07-23 10:11:24 +00:00
this.waitFor(outer1_7);
2026-07-20 16:05:17 +00:00
}
};
const items = [obj, , , , , ];
obj = {
key: "getOptimalRegion",
value() {
let tmp = arg0;
const self = this;
if (arg0 === undefined) {
tmp = null;
}
const regions = self.getRegions(tmp);
let tmp2 = null;
if (null != regions) {
let found = regions.find((optimal) => optimal.optimal);
if (null == found) {
2026-07-23 10:11:24 +00:00
found = RegionStore(outer1_1[6]).sample(regions);
const obj = RegionStore(outer1_1[6]);
2026-07-20 16:05:17 +00:00
}
tmp2 = found;
}
return tmp2;
}
};
items[1] = obj;
obj = {
key: "getOptimalRegionId",
value() {
let tmp = arg0;
const self = this;
if (arg0 === undefined) {
tmp = null;
}
const optimalRegion = self.getOptimalRegion(tmp);
let id = null;
if (null != optimalRegion) {
id = optimalRegion.id;
}
return id;
}
};
items[2] = obj;
items[3] = {
key: "getRandomRegion",
value() {
let tmp = arg0;
const self = this;
if (arg0 === undefined) {
tmp = null;
}
const regions = self.getRegions(tmp);
let sampleResult = null;
if (null != regions) {
2026-07-23 10:11:24 +00:00
sampleResult = RegionStore(outer1_1[6]).sample(regions);
const obj = RegionStore(outer1_1[6]);
2026-07-20 16:05:17 +00:00
}
return sampleResult;
}
};
items[4] = {
key: "getRandomRegionId",
value() {
let tmp = arg0;
const self = this;
if (arg0 === undefined) {
tmp = null;
}
const randomRegion = self.getRandomRegion(tmp);
let id = null;
if (null != randomRegion) {
id = randomRegion.id;
}
return id;
}
};
items[5] = {
key: "getRegions",
value(arg0) {
if (null != arg0) {
2026-07-23 10:11:24 +00:00
let tmp = outer1_9[arg0];
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
tmp = outer1_8;
2026-07-20 16:05:17 +00:00
}
return tmp;
}
};
return callback(RegionStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp2.displayName = "RegionStore";
2026-07-23 10:11:24 +00:00
tmp2 = new tmp2(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
LOAD_REGIONS: function handleLoadRegions(regions) {
2026-07-23 10:11:24 +00:00
const sortByResult = importDefault(22).sortBy(regions.regions, (name) => name.name);
2026-07-20 16:05:17 +00:00
if (null != regions.guildId) {
closure_9[regions.guildId] = sortByResult;
} else {
2026-07-23 10:11:24 +00:00
let c8 = sortByResult;
2026-07-20 16:05:17 +00:00
}
},
GUILD_DELETE: function handleDeleteGuild(arg0) {
2026-07-23 10:11:24 +00:00
delete tmp2[tmp];
2026-07-20 16:05:17 +00:00
}
});
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("stores/RegionStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp2;