decord/source/1196_isModalSupported.js

93 lines
2.6 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 1196
// Function ID: 1197
2026-07-20 16:05:17 +00:00
// Name: isModalSupported
2026-07-29 08:29:29 +00:00
// Dependencies: [17, 997, 1002, 816]
2026-07-20 16:05:17 +00:00
// Exports: base64ToUint8Array, feedbackAlertDialog, isModalSupported, isNativeDriverSupportedForColorAnimations, isValidEmail
2026-07-29 08:29:29 +00:00
// Module 1196 (isModalSupported)
2026-07-23 10:11:24 +00:00
import { Alert } from "get ActivityIndicator";
2026-07-20 16:05:17 +00:00
export const isModalSupported = function isModalSupported() {
2026-07-29 08:29:29 +00:00
let major;
let minor;
const ReactNativeVersion = require(997) /* TurboModuleRegistry */.ReactNativeLibraries.ReactNativeVersion;
2026-07-20 16:05:17 +00:00
let version;
if (null !== ReactNativeVersion) {
if (undefined !== ReactNativeVersion) {
version = ReactNativeVersion.version;
}
}
if (!version) {
version = {};
}
2026-07-29 08:29:29 +00:00
({ minor, major } = version);
let isFabricEnabledResult = require(1002) /* isHermesEnabled */.isFabricEnabled();
2026-07-20 16:05:17 +00:00
if (isFabricEnabledResult) {
2026-07-29 08:29:29 +00:00
isFabricEnabledResult = 0 === major;
2026-07-20 16:05:17 +00:00
}
if (isFabricEnabledResult) {
isFabricEnabledResult = minor;
}
if (isFabricEnabledResult) {
isFabricEnabledResult = minor < 71;
}
return !isFabricEnabledResult;
};
export const isNativeDriverSupportedForColorAnimations = function isNativeDriverSupportedForColorAnimations() {
let major;
let minor;
2026-07-29 08:29:29 +00:00
const ReactNativeVersion = require(997) /* TurboModuleRegistry */.ReactNativeLibraries.ReactNativeVersion;
2026-07-20 16:05:17 +00:00
let version;
if (null !== ReactNativeVersion) {
if (undefined !== ReactNativeVersion) {
version = ReactNativeVersion.version;
}
}
if (!version) {
version = {};
}
({ major, minor } = version);
let flag = major;
if (major) {
flag = major > 0;
}
if (!flag) {
let tmp = minor;
if (minor) {
tmp = minor >= 69;
}
flag = tmp;
}
if (!flag) {
flag = false;
}
return flag;
};
2026-07-29 08:29:29 +00:00
export const isValidEmail = (arg0) => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(arg0);
export const base64ToUint8Array = (closure_0) => {
2026-08-04 21:03:28 +00:00
if (typeof atob === "function") {
2026-07-20 16:05:17 +00:00
if (obj.isWeb()) {
const _atob = atob;
const _Uint8Array = Uint8Array;
2026-07-29 08:29:29 +00:00
const items = [];
HermesBuiltin.arraySpread(atob(closure_0), 0);
const uint8Array = new Uint8Array(items.map((str) => str.charCodeAt(0)));
2026-07-20 16:05:17 +00:00
return uint8Array;
}
2026-07-29 08:29:29 +00:00
obj = require(1002) /* isHermesEnabled */;
2026-07-20 16:05:17 +00:00
}
const error = new Error("atob is not available in this environment.");
throw error;
};
2026-07-29 08:29:29 +00:00
export const feedbackAlertDialog = (Alert) => {
2026-07-20 16:05:17 +00:00
if (obj.isWeb()) {
2026-07-29 08:29:29 +00:00
if (undefined !== tmp(816).RN_GLOBAL_OBJ.alert) {
const RN_GLOBAL_OBJ = tmp(816).RN_GLOBAL_OBJ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-29 08:29:29 +00:00
RN_GLOBAL_OBJ.alert("" + Alert + "\n" + arg1);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
Alert.alert(Alert, arg1);
2026-07-20 16:05:17 +00:00
};