67 lines
3.4 KiB
React
67 lines
3.4 KiB
React
/* Metro module 1657; source: unknown; dependencies: [6, 7, 1635, 1647, 1618] */
|
|
function _fun18220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1784:6, offset: 0x00e83246, size: 104 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
exports.default = _fun18221();
|
|
}
|
|
|
|
function _fun18221() { // fn#18221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1784:122, offset: 0x00e832ae, size: 149 bytes, params: 1, frame: 15
|
|
return env0_3(Sensor, [{key: 'register', value: value_18223}, {key: 'isRunning', value: function() {
|
|
return this.sensorId !== -1 && this.sensorId !== null;
|
|
}}, {key: 'isAvailable', value: function() {
|
|
return this.sensorId !== -1;
|
|
}}, {key: 'getSharedValue', value: function() {
|
|
return this.data;
|
|
}}, {key: 'unregister', value: value_18227}]);
|
|
}
|
|
|
|
function Sensor(a0, a1) { // fn#18222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1784:143, offset: 0x00e83343, size: 191 bytes, params: 3, frame: 16
|
|
var r1;
|
|
let value = environment.__proto__;
|
|
env1_2(this, Sensor);
|
|
this.listenersNumber = 0;
|
|
this.sensorId = null;
|
|
this.sensorType = a0;
|
|
this.config = a1;
|
|
const SensorType = (require(1635) /* metro dependency 1635 */).SensorType;
|
|
const ROTATION = SensorType.ROTATION;
|
|
if (a0 === ROTATION) {
|
|
value = require(1647) /* metro dependency 1647 */;
|
|
value = value.makeMutable({'qw': 0, 'qx': 0, 'qy': 0, 'qz': 0, 'yaw': 0, 'pitch': 0, 'roll': 0,
|
|
'interfaceOrientation': 0});
|
|
r1 = value;
|
|
} else {
|
|
value = require(1647) /* metro dependency 1647 */;
|
|
value = value.makeMutable({'x': 0, 'y': 0, 'z': 0, 'interfaceOrientation': 0});
|
|
r1 = value;
|
|
}
|
|
this.data = r1;
|
|
}
|
|
|
|
function value_18223(a0) { // fn#18223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1784:503, offset: 0x00e83402, size: 121 bytes, params: 2, frame: 20
|
|
const config = this.config;
|
|
const sensorType = this.sensorType;
|
|
let value = environment.__proto__;
|
|
const ReanimatedModule = (require(1618) /* metro dependency 1618 */).ReanimatedModule;
|
|
const registerSensor = ReanimatedModule.registerSensor;
|
|
const interval = config.interval;
|
|
value = -1;
|
|
this.sensorId = Reflect.apply(registerSensor, ReanimatedModule, [sensorType,
|
|
interval === 'auto' ? value : config.interval, config.iosReferenceFrame, a0]);
|
|
return value !== this.sensorId;
|
|
}
|
|
|
|
function value_18227() { // fn#18227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1784:966, offset: 0x00e834b4, size: 95 bytes, params: 1, frame: 13
|
|
var ReanimatedModule;
|
|
if (this.sensorId !== null && this.sensorId !== -1) {
|
|
value = environment.__proto__;
|
|
ReanimatedModule = (require(1618) /* metro dependency 1618 */).ReanimatedModule;
|
|
ReanimatedModule.unregisterSensor(this.sensorId);
|
|
}
|
|
this.sensorId = null;
|
|
}
|
|
|