152 lines
7.6 KiB
TypeScript
152 lines
7.6 KiB
TypeScript
/* Metro module 9288; source: modules/rtc/native/SecureFramesCode.tsx; dependencies: [31, 27, 482, 33, 4501, 697, 4573, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun72648(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9474:6, offset: 0x01d4ca2e, size: 522 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.ActivityIndicator;
|
|
const env0_4 = value.View;
|
|
const Fonts = (ConstantsModule).Fonts;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
const env0_7 = value.Fragment;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const CODE_NORMAL = Fonts.CODE_NORMAL;
|
|
object.codeText = {fontFamily: CODE_NORMAL};
|
|
object.row = {'flexDirection': 'row', 'justifyContent': 'space-around', 'paddingVertical': 8};
|
|
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object.divider = {height: 1, backgroundColor: BORDER_SUBTLE};
|
|
const object4 = {'backgroundColor': null, 'borderTopRightRadius': null, 'borderTopLeftRadius': null,
|
|
'paddingVertical': 10, 'paddingHorizontal': 16, 'justifyContent': 'space-between', 'alignItems': 'center',
|
|
'flexDirection': 'row'};
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
|
|
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.codeHeader = object4;
|
|
const object5 = {'backgroundColor': null, 'paddingVertical': 8, 'paddingHorizontal': 16};
|
|
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object5.backgroundColor = BORDER_SUBTLE;
|
|
object5.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object5.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.code = object5;
|
|
object.loading = {minHeight: 126};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/rtc/native/SecureFramesCode.tsx');
|
|
exports.default = SecureFramesCode;
|
|
function SecureFramesCodeGrid({chunks, columns}) { // fn#72649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9474:852, offset: 0x01d4cc38, size: 119 bytes, params: 2, frame: 17
|
|
return (
|
|
<>
|
|
{useStyles().useMemo(function() {
|
|
var r1;
|
|
var r7;
|
|
var items2;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var items = [];
|
|
var Math = global.Math;
|
|
var value2 = Math.ceil(chunks.length / columns);
|
|
var value3 = 0;
|
|
if (value3 < value2) {
|
|
r1 = value3;
|
|
reducibleLoop1: while (true) {
|
|
items2 = [];
|
|
columnsBinding = columns;
|
|
if (value3 < columnsBinding) {
|
|
r7 = value3;
|
|
reducibleLoop2: while (true) {
|
|
columnsBinding = columns;
|
|
value4 = r1 * columnsBinding + r7;
|
|
items2.push(chunks[value4]);
|
|
value5 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
|
if (value5 < columnsBinding) {
|
|
r7 = value5;
|
|
continue reducibleLoop2;
|
|
}
|
|
break reducibleLoop2;
|
|
}
|
|
}
|
|
items.push(items2);
|
|
value6 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (value6 < value2) {
|
|
r1 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
return items;
|
|
}, [chunks, columns]).map(_fun72651)}
|
|
</>
|
|
);
|
|
function _fun72651(a0, a1) { // fn#72651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9474:1089, offset: 0x01d4cd2e, size: 195 bytes, params: 3, frame: 22
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
return (
|
|
<View key={'' + a0.join(' ') + '-' + a1}>
|
|
<View style={styles.row}>
|
|
{a0.map(_fun72652)}
|
|
</View>
|
|
{a1 < env0_3.length - 1 && <View style={styles.divider} />}
|
|
</View>
|
|
);
|
|
function _fun72652(a0, a1) { // fn#72652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9474:1144, offset: 0x01d4cdf1, size: 114 bytes, params: 3, frame: 19
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
style={styles.codeText}
|
|
variant="text-md/normal"
|
|
color="text-default"
|
|
key={'' + a0 + '-' + a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function SecureFramesCode({title, trailing, chunks, columns}) { // fn#72653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9474:1408, offset: 0x01d4ce63, size: 253 bytes, params: 2, frame: 25
|
|
const styles = useStyles();
|
|
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<>
|
|
<View style={styles.codeHeader}>
|
|
<Text color="mobile-text-heading-primary" variant="heading-md/semibold">
|
|
{title}
|
|
</Text>
|
|
{trailing}
|
|
</View>
|
|
<View style={styles.code}>
|
|
{
|
|
chunks != null
|
|
? (
|
|
<SecureFramesCodeGrid chunks={chunks} columns={columns} />
|
|
)
|
|
: (
|
|
<ActivityIndicator style={styles.loading} />
|
|
)
|
|
}
|
|
</View>
|
|
</>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun72648, 9288, [31, 27, 482, 33, 4501, 697, 4573,
|
|
2]) /* metro module 9288, dependencies: [31, 27, 482, 33, 4501, 697, 4573, 2] */;
|