235 lines
12 KiB
React
235 lines
12 KiB
React
/* Metro module 319; source: unknown; dependencies: [29, 5, 31, 33, 320, 322, 90, 147, 323, 324, 327, 328, 253] */
|
|
import Module00005 from './module-00005.js'; /* Metro dependency 5 */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import Module00090 from './module-00090.js'; /* Metro dependency 90 */
|
|
import Module00147 from './module-00147.js'; /* Metro dependency 147 */
|
|
import Module00253 from './module-00253.js'; /* Metro dependency 253 */
|
|
import Module00320 from './module-00320.js'; /* Metro dependency 320 */
|
|
import Module00327 from './module-00327.js'; /* Metro dependency 327 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as moduleValue2 from './module-00323-convertObjectFitToResizeMode.js'; /* Metro dependency 323 */
|
|
import * as Module00324Module from './module-00324.js'; /* Metro dependency 324 */
|
|
|
|
function _fun4861(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:6, offset: 0x00ccf4e1, size: 345 bytes, params: 8, frame: 20
|
|
var r1;
|
|
let env0_0 = require;
|
|
const prefetch2 = prefetch;
|
|
const env0_3 = ['ref'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const BaseImage2 = BaseImage;
|
|
let value = Module00324Module;
|
|
value = value.unstable_getImageComponentDecorator();
|
|
if (value == null) {
|
|
r1 = BaseImage2;
|
|
} else {
|
|
value = value(BaseImage2);
|
|
r1 = value;
|
|
}
|
|
r1.displayName = 'Image';
|
|
r1.getSize = function(a0, a1, a2) {
|
|
var value = a2;
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var value3 = importDefault(dependencyMap[4]).getSize(a0);
|
|
if (typeof a1 !== 'function') {
|
|
return value3;
|
|
}
|
|
var value4 = value3.then(_fun4869);
|
|
value4.catch(value || _fun4870);
|
|
};
|
|
r1.getSizeWithHeaders = function(a0, a1, a2, a3) {
|
|
var value = a3;
|
|
var env0_0 = a0;
|
|
var env0_1 = a2;
|
|
var value3 = importDefault(dependencyMap[4]).getSizeWithHeaders(a0, a1);
|
|
if (typeof a2 !== 'function') {
|
|
return value3;
|
|
}
|
|
var value4 = value3.then(_fun4872);
|
|
value4.catch(value || _fun4873);
|
|
};
|
|
r1.prefetch = prefetch2;
|
|
r1.prefetchWithMetadata = function(a0, a1, a2, a3) {
|
|
return prefetch(a0, a3);
|
|
};
|
|
r1.abortPrefetch = abortPrefetch;
|
|
r1.queryCache = function(a0) {
|
|
return _queryCache.apply(this, arguments);
|
|
};
|
|
r1.resolveAssetSource = importDefault(90) /* metro dependency 90 */;
|
|
const env0_8 = (Module00253).create({base: {overflow: 'hidden'}});
|
|
exports.default = r1;
|
|
function prefetch(a0, a1) { // fn#4862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:158, offset: 0x00ccf63a, size: 69 bytes, params: 3, frame: 13
|
|
const binding = env0_7;
|
|
const value2 = typeof binding === 'bigint' ? binding : +binding;
|
|
env0_7 = typeof value2 === 'bigint' ? value2 + 1n : +value2 + 1;
|
|
if (a1) {
|
|
a1(value2);
|
|
}
|
|
return (Module00320).prefetchImage(a0, value2);
|
|
}
|
|
|
|
function _queryCache() { // fn#4863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:272, offset: 0x00ccf67f, size: 48 bytes, params: 1, frame: 14
|
|
return Module00005(_fun4865).apply(this, arguments);
|
|
function* _fun4865(a0) { // fn#4865, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:317, offset: 0x00ccf6b8, size: 52 bytes, params: 2, frame: 12
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
return env2_1(env2_2[4]).queryCache(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function BaseImage(a0) { // fn#4866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:391, offset: 0x00ccf6ec, size: 1055 bytes, params: 2, frame: 29
|
|
var width;
|
|
var height;
|
|
var items2;
|
|
var r12;
|
|
const ref = a0.ref;
|
|
const value2 = undefined;
|
|
const value3 = ObjectWithoutProperties(a0, env0_3);
|
|
const r14 = (require(322) /* metro dependency 322 */).getImageSourcesFromImageProps(value3) || ({uri: value2,
|
|
width: value2, height: value2});
|
|
const value5 = (Module00090)(value3.defaultSource);
|
|
const value6 = (Module00090)(value3.loadingIndicatorSource);
|
|
const children = value3.children;
|
|
const value7 = null;
|
|
if (value7 != children) {
|
|
throw new global.Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');
|
|
}
|
|
if (value7 != value3.defaultSource) {
|
|
if (value7 != value3.loadingIndicatorSource) {
|
|
throw new global.Error('The <Image> component cannot have defaultSource and loadingIndicatorSource at the same time. Please use either defaultSource or loadingIndicatorSource.');
|
|
}
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(r14)) {
|
|
items2 = [env0_8.base, value3.style];
|
|
r12 = r14;
|
|
} else {
|
|
if (r14.uri === '') {
|
|
global.console.warn('source.uri should not be an empty string');
|
|
}
|
|
width = r14.width;
|
|
width = value7 == width ? value3.width : width;
|
|
height = r14.height;
|
|
height = value7 == height ? value3.height : height;
|
|
items2 = [{width: width, height: height}, env0_8.base, value3.style];
|
|
r12 = [r14];
|
|
}
|
|
const onLoadStart = value3.onLoadStart;
|
|
const onLoad = value3.onLoad;
|
|
const onLoadEnd = value3.onLoadEnd;
|
|
const onError = value3.onError;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const object = {style: items2};
|
|
let r13 = onLoadStart || onLoad;
|
|
r13 = !r13 ? onLoadEnd : r13;
|
|
r13 = !r13 ? onError : r13;
|
|
object.shouldNotifyLoadEvents = !!r13;
|
|
object.src = r12;
|
|
object.source = r12;
|
|
object.headers = (value7 == r14 || value7 == r14[0] ? value2 : r14[0].headers) || (value7 == r14 ? value2 : r14.headers);
|
|
object.defaultSource = value5 || value7;
|
|
object.loadingIndicatorSrc = value6 || value7;
|
|
let property = value3['aria-label'];
|
|
let r1 = value7 != property ? property : value3.accessibilityLabel;
|
|
r1 = value7 == r1 ? value3.alt : r1;
|
|
object.accessibilityLabel = r1;
|
|
r1 = value7 == value3 ? value2 : value3['aria-labelledby'];
|
|
r1 = value7 == r1 ? value7 == value3 ? value2 : value3.accessibilityLabelledBy : r1;
|
|
object.accessibilityLabelledBy = r1;
|
|
object.accessible = value2 !== value3.alt || value3.accessible;
|
|
const object2 = {};
|
|
property = value3['aria-busy'];
|
|
object2.busy = value7 != property ? property : value7 == value3.accessibilityState ? value2 : value3.accessibilityState.busy;
|
|
property = value3['aria-checked'];
|
|
object2.checked = value7 != property ? property : value7 == value3.accessibilityState ? value2 : value3.accessibilityState.checked;
|
|
property = value3['aria-disabled'];
|
|
object2.disabled = value7 != property ? property : value7 == value3.accessibilityState ? value2 : value3.accessibilityState.disabled;
|
|
property = value3['aria-expanded'];
|
|
object2.expanded = value7 != property ? property : value7 == value3.accessibilityState ? value2 : value3.accessibilityState.expanded;
|
|
property = value3['aria-selected'];
|
|
object2.selected = value7 != property ? property : value7 == value3.accessibilityState ? value2 : value3.accessibilityState.selected;
|
|
object.accessibilityState = object2;
|
|
const env0_0 = Reflect.apply(assign, Object, [{}, value3, object]);
|
|
const value9 = (Module00147)(items2);
|
|
r1 = moduleValue2.convertObjectFitToResizeMode(value7 == value9 ? value2 : value9.objectFit) || value3.resizeMode;
|
|
r1 = !r1 ? value7 == value9 ? value2 : value9.resizeMode : r1;
|
|
if (r1) {
|
|
}
|
|
const env0_2 = (Module00324Module).useWrapRefWithImageAttachedCallbacks(ref);
|
|
const Consumer = (Module00327).Consumer;
|
|
return (
|
|
<Consumer>
|
|
{children}
|
|
</Consumer>
|
|
);
|
|
function children(a0) { // fn#4867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:2447, owner: BaseImage.children, offset: 0x00ccfb0b, size: 134 bytes, params: 2, frame: 19
|
|
const r7 = a0 !== null ? global.Object.assign({}, env0_0, {internal_analyticTag: a0}) : env0_0;
|
|
let value = environment.__proto__;
|
|
value = importDefault(328) /* metro dependency 328 */;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, r7, {resizeMode: env0_1, ref: env0_2})} />)(value);
|
|
}
|
|
|
|
}
|
|
|
|
function getSize(a0, a1, a2) { // fn#4868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:2700, offset: 0x00ccfb91, size: 104 bytes, params: 4, frame: 15
|
|
const value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const size = (Module00320).getSize(a0);
|
|
if (typeof a1 !== 'function') {
|
|
return size;
|
|
}
|
|
const value4 = size.then(function(a0) {
|
|
return require(a0.width, a0.height);
|
|
});
|
|
value4.catch(value || _fun4870);
|
|
function _fun4869({width, height}) { // fn#4869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:2790, offset: 0x00ccfbf9, size: 30 bytes, params: 2, frame: 13
|
|
return require(width, height);
|
|
}
|
|
|
|
function _fun4870() { // fn#4870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:2841, offset: 0x00ccfc17, size: 39 bytes, params: 1, frame: 12
|
|
global.console.warn('Failed to get size for image: ' + env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function getSizeWithHeaders(a0, a1, a2, a3) { // fn#4871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:2925, offset: 0x00ccfc3e, size: 108 bytes, params: 5, frame: 17
|
|
const value = a3;
|
|
const env0_0 = a0;
|
|
const env0_1 = a2;
|
|
const sizeWithHeaders = (Module00320).getSizeWithHeaders(a0, a1);
|
|
if (typeof a2 !== 'function') {
|
|
return sizeWithHeaders;
|
|
}
|
|
const value4 = sizeWithHeaders.then(function(a0) {
|
|
return importDefault(a0.width, a0.height);
|
|
});
|
|
value4.catch(value || _fun4873);
|
|
function _fun4872({width, height}) { // fn#4872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:3041, offset: 0x00ccfbf9, size: 30 bytes, params: 2, frame: 13
|
|
return importDefault(width, height);
|
|
}
|
|
|
|
function _fun4873() { // fn#4873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:3092, offset: 0x00ccfc17, size: 39 bytes, params: 1, frame: 12
|
|
global.console.warn('Failed to get size for image: ' + env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
function abortPrefetch(a0) { // fn#4875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:360:3275, offset: 0x00ccfcc1, size: 41 bytes, params: 2, frame: 12
|
|
(Module00320).abortRequest(a0);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun4861, 319, [29, 5, 31, 33, 320, 322, 90, 147, 323, 324, 327, 328,
|
|
253]) /* metro module 319, dependencies: [29, 5, 31, 33, 320, 322, 90, 147, 323, 324, 327, 328, 253] */;
|