227 lines
8.5 KiB
React
227 lines
8.5 KiB
React
/* Metro module 4084; source: unknown; dependencies: [5, 77, 4085, 4086] */
|
||
function _fun33482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:6, offset: 0x0103069f, size: 436 bytes, params: 8, frame: 24
|
||
var object2;
|
||
const env0_0 = require;
|
||
const Object = global.Object;
|
||
Object.defineProperty(exports, '__esModule', {value: true});
|
||
const value = importDefault(5) /* metro dependency 5 */;
|
||
const value2 = importDefault(77) /* metro dependency 77 */;
|
||
const HapticFeedbackTypes = (require(4085) /* metro dependency 4085 */).HapticFeedbackTypes;
|
||
const env0_4 = value2(value2(value2(value2(value2(value2({}, HapticFeedbackTypes.impactLight, 0.3),
|
||
HapticFeedbackTypes.impactMedium, 0.6), HapticFeedbackTypes.impactHeavy, 0.8), HapticFeedbackTypes.rigid, 1),
|
||
HapticFeedbackTypes.soft, 0.1), HapticFeedbackTypes.selection, 0.3);
|
||
const env0_5 = {'enableVibrateFallback': false, 'ignoreAndroidSystemSettings': false};
|
||
object2 = {setEnabled: function(a0) {
|
||
env0_6 = a0;
|
||
}, isEnabled: isEnabled_33484, trigger: trigger, stop: stop_33486, isSupported: isSupported,
|
||
triggerPattern: triggerPattern, playAHAP: playAHAP, impact: impact};
|
||
const env0_3 = value(_fun33492);
|
||
object2.getSystemHapticStatus = getSystemHapticStatus;
|
||
exports.default = object2;
|
||
}
|
||
|
||
function trigger() { // fn#33485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:542, offset: 0x01030853, size: 200 bytes, params: 1, frame: 19
|
||
const HapticFeedbackTypes = require(dependencyMap[2]).HapticFeedbackTypes;
|
||
var property;
|
||
var defaultImport;
|
||
var trigger;
|
||
var Object;
|
||
var assign;
|
||
var binding;
|
||
var error;
|
||
var console;
|
||
const r3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : HapticFeedbackTypes.selection;
|
||
const r32 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
let value = environment;
|
||
if (env0_6) {
|
||
try {
|
||
property = dependencyMap[3];
|
||
defaultImport = importDefault(property);
|
||
trigger = defaultImport.trigger;
|
||
Object = global.Object;
|
||
assign = Object.assign;
|
||
binding = env0_5;
|
||
value = Reflect.apply(assign, Object, [{}, binding, r32]);
|
||
Reflect.apply(trigger, defaultImport, [r3, value]);
|
||
} catch (error) {
|
||
console = global.console;
|
||
console.warn('RNReactNativeHapticFeedback: trigger failed –', error);
|
||
}
|
||
}
|
||
}
|
||
|
||
function stop_33486() { // fn#33486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:852, offset: 0x0103091b, size: 75 bytes, params: 1, frame: 13
|
||
var property;
|
||
var error;
|
||
var console;
|
||
let value = environment;
|
||
if (env0_6) {
|
||
try {
|
||
property = dependencyMap[3];
|
||
value = importDefault(property);
|
||
value.stop();
|
||
} catch (error) {
|
||
console = global.console;
|
||
console.warn('RNReactNativeHapticFeedback: stop failed –', error);
|
||
}
|
||
}
|
||
}
|
||
|
||
function isSupported() { // fn#33487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:978, offset: 0x01030966, size: 43 bytes, params: 1, frame: 11
|
||
var value;
|
||
var property;
|
||
var error;
|
||
try {
|
||
value = environment;
|
||
property = dependencyMap[3];
|
||
value = importDefault(property);
|
||
value = value.isSupported();
|
||
} catch (error) {
|
||
return false;
|
||
}
|
||
return value;
|
||
}
|
||
|
||
function triggerPattern(a0) { // fn#33488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:1069, offset: 0x01030991, size: 140 bytes, params: 2, frame: 19
|
||
var property;
|
||
var defaultImport;
|
||
var triggerPattern;
|
||
var Object;
|
||
var assign;
|
||
var binding;
|
||
var error;
|
||
var console;
|
||
const r3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||
let value = environment;
|
||
if (env0_6) {
|
||
try {
|
||
property = dependencyMap[3];
|
||
defaultImport = importDefault(property);
|
||
triggerPattern = defaultImport.triggerPattern;
|
||
Object = global.Object;
|
||
assign = Object.assign;
|
||
binding = env0_5;
|
||
value = Reflect.apply(assign, Object, [{}, binding, r3]);
|
||
Reflect.apply(triggerPattern, defaultImport, [a0, value]);
|
||
} catch (error) {
|
||
console = global.console;
|
||
console.warn('RNReactNativeHapticFeedback: triggerPattern failed –', error);
|
||
}
|
||
}
|
||
}
|
||
|
||
function playAHAP(a0) { // fn#33489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:1310, offset: 0x01030a1d, size: 88 bytes, params: 2, frame: 12
|
||
var Promise;
|
||
var property;
|
||
var error;
|
||
let value = environment;
|
||
if (env0_6) {
|
||
try {
|
||
property = dependencyMap[3];
|
||
value = importDefault(property);
|
||
value = value.playAHAP(a0);
|
||
} catch (error) {
|
||
Promise = global.Promise;
|
||
return Promise.resolve();
|
||
}
|
||
return value;
|
||
}
|
||
Promise = global.Promise;
|
||
return Promise.resolve();
|
||
}
|
||
|
||
function impact() { // fn#33490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:1436, offset: 0x01030a75, size: 338 bytes, params: 1, frame: 23
|
||
var r13;
|
||
const HapticFeedbackTypes = require(dependencyMap[2]).HapticFeedbackTypes;
|
||
var property;
|
||
var Math;
|
||
var max;
|
||
var Math2;
|
||
var defaultImport;
|
||
var triggerPattern;
|
||
var items2;
|
||
var Object;
|
||
var assign;
|
||
var binding;
|
||
var error;
|
||
var console;
|
||
const r5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : HapticFeedbackTypes.impactMedium;
|
||
let value = 0.7;
|
||
const r1 = arguments.length > 1 ? arguments[1] === undefined ? value : arguments[1] : value;
|
||
const r12 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||
value = environment;
|
||
if (env0_6) {
|
||
property = env0_4[r5];
|
||
r13 = property ?? 0.5;
|
||
Math = global.Math;
|
||
max = Math.max;
|
||
Math2 = global.Math;
|
||
try {
|
||
property = dependencyMap[3];
|
||
defaultImport = importDefault(property);
|
||
triggerPattern = defaultImport.triggerPattern;
|
||
items2 = [{time: 0, intensity: Reflect.apply(max, Math, [0, Math2.min(1, r1)]), sharpness: r13}];
|
||
Object = global.Object;
|
||
assign = Object.assign;
|
||
binding = env0_5;
|
||
value = Reflect.apply(assign, Object, [{}, binding, r12]);
|
||
Reflect.apply(triggerPattern, defaultImport, [items2, value]);
|
||
} catch (error) {
|
||
console = global.console;
|
||
console.warn('RNReactNativeHapticFeedback: impact failed –', error);
|
||
}
|
||
}
|
||
}
|
||
|
||
function* _fun33492() { // fn#33492, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4242:1928, offset: 0x01030bd0, size: 80 bytes, params: 1, frame: 12
|
||
var binding;
|
||
var binding2;
|
||
var property;
|
||
var getSystemHapticStatus;
|
||
var value3;
|
||
var error;
|
||
if (false) {
|
||
return undefined;
|
||
}
|
||
value = environment.__proto__;
|
||
try {
|
||
binding = env1_1;
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
try {
|
||
binding2 = env1_2;
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
try {
|
||
property = binding2[3];
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
try {
|
||
value = binding(property);
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
try {
|
||
getSystemHapticStatus = value.getSystemHapticStatus;
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
try {
|
||
value = Reflect.apply(getSystemHapticStatus, value, []);
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
yield value;
|
||
try {
|
||
value = undefined;
|
||
value3 = false;
|
||
} catch (error) {
|
||
return {'vibrationEnabled': false, 'ringerMode': null};
|
||
}
|
||
return value3 ? value : value;
|
||
}
|
||
|