325 lines
18 KiB
JavaScript
325 lines
18 KiB
JavaScript
/* Metro module 1146; source: unknown; dependencies: [57, 77, 6, 7, 15, 17, 18, 31, 1032, 1147, 826, 1148] */
|
|
import * as ClassCallCheckModule from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import * as CreateClassModule from './module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import * as PossibleConstructorReturnModule from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import * as Module00017Module from './module-00017.js'; /* Metro dependency 17 */
|
|
import * as InheritsModule from './module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module00057Module from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as Module00077Module from './module-00077.js'; /* Metro dependency 77 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
import * as Module01032Module from './module-01032.js'; /* Metro dependency 1032 */
|
|
import * as REACT_Module from './module-01147-REACT_.js'; /* Metro dependency 1147 */
|
|
import * as HoistNonReactStaticsModule from './module-01148-hoistNonReactStatics.js'; /* Metro dependency 1148 */
|
|
|
|
function _fun12709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:6, offset: 0x00dd3143, size: 295 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
let Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
const Component = (ReactModule).Component;
|
|
value = _fun12713(Component);
|
|
Object = global.Object;
|
|
Object.assign(value, {defaultProps: {'disabled': false, 'includeRender': true, 'includeUpdates': true}});
|
|
exports.Profiler = value;
|
|
exports.UNKNOWN_COMPONENT = 'unknown';
|
|
exports.useProfiler = useProfiler;
|
|
exports.withProfiler = withProfiler;
|
|
function _isNativeReflectConstruct_12710() { // fn#12710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:105, offset: 0x00dd326a, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_12710_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun12713(a0) { // fn#12713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:414, offset: 0x00dd32c8, size: 160 bytes, params: 2, frame: 16
|
|
const Profiler2 = Profiler;
|
|
InheritsModule(Profiler2, a0);
|
|
return CreateClassModule(Profiler2, [{key: 'componentDidMount', value: function() {
|
|
if (this._mountSpan) {
|
|
this._mountSpan.end();
|
|
}
|
|
}}, {key: 'shouldComponentUpdate', value: value_12716}, {key: 'componentDidUpdate', value: function() {
|
|
if (this._updateSpan) {
|
|
this._updateSpan.end();
|
|
this._updateSpan = undefined;
|
|
}
|
|
}}, {key: 'componentWillUnmount', value: value_12720}, {key: 'render', value: function() {
|
|
return this.props.children;
|
|
}}]);
|
|
function Profiler(a0) { // fn#12714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:439, offset: 0x00dd3368, size: 306 bytes, params: 2, frame: 22
|
|
var r0;
|
|
var moduleValue;
|
|
var startInactiveSpan;
|
|
const REACT_MOUNT_OP = (REACT_Module).REACT_MOUNT_OP;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
const value = environment.__proto__;
|
|
let binding = env1_4;
|
|
binding(this, Profiler);
|
|
let object = [a0];
|
|
const value3 = env1_7(Profiler);
|
|
const value6 = env1_6(this, _isNativeReflectConstruct_12710() ? global.Reflect.construct(value3, object,
|
|
env1_7(this).constructor) : value3.apply(this, object));
|
|
const {name, disabled} = value6.props;
|
|
if (disabled === undefined) {
|
|
moduleValue = require(1032) /* metro dependency 1032 */;
|
|
startInactiveSpan = moduleValue.startInactiveSpan;
|
|
object = {};
|
|
object.name = '<' + name + '>';
|
|
object.onlyIfParent = true;
|
|
object.op = REACT_MOUNT_OP;
|
|
binding = env1_3;
|
|
object.attributes = binding(binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ui.react.profiler'),
|
|
'ui.component_name', name);
|
|
value6._mountSpan = Reflect.apply(startInactiveSpan, moduleValue, [object]);
|
|
r0 = value6;
|
|
} else if (disabled) {
|
|
r0 = env1_6(value6);
|
|
} else {
|
|
moduleValue = require(1032) /* metro dependency 1032 */;
|
|
startInactiveSpan = moduleValue.startInactiveSpan;
|
|
object = {};
|
|
object.name = '<' + name + '>';
|
|
object.onlyIfParent = true;
|
|
object.op = REACT_MOUNT_OP;
|
|
binding = env1_3;
|
|
object.attributes = binding(binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ui.react.profiler'),
|
|
'ui.component_name', name);
|
|
value6._mountSpan = Reflect.apply(startInactiveSpan, moduleValue, [object]);
|
|
r0 = value6;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_12716({updateProps, includeUpdates}) { // fn#12716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:1078, offset: 0x00dd34b9, size: 197 bytes, params: 2, frame: 17
|
|
var environment;
|
|
var value;
|
|
if (includeUpdates === undefined) {
|
|
if (this._mountSpan) {
|
|
if (updateProps !== this.props.updateProps) {
|
|
value = global.Object.keys(updateProps);
|
|
value = value.filter(_fun12717);
|
|
if (value.length > 0) {
|
|
value = environment.__proto__;
|
|
value = require(826) /* metro dependency 826 */;
|
|
var env0_3 = value.timestampInSeconds();
|
|
value = require(826) /* metro dependency 826 */;
|
|
this._updateSpan = value.withActiveSpan(this._mountSpan, _fun12718);
|
|
}
|
|
}
|
|
}
|
|
} else if (includeUpdates) {
|
|
if (this._mountSpan) {
|
|
if (updateProps !== this.props.updateProps) {
|
|
value = global.Object.keys(updateProps);
|
|
value = value.filter(_fun12717);
|
|
if (value.length > 0) {
|
|
value = environment.__proto__;
|
|
value = require(826) /* metro dependency 826 */;
|
|
var env0_3 = value.timestampInSeconds();
|
|
value = require(826) /* metro dependency 826 */;
|
|
this._updateSpan = value.withActiveSpan(this._mountSpan, _fun12718);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
function _fun12717(a0) { // fn#12717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:1252, offset: 0x00dd357e, size: 39 bytes, params: 2, frame: 3
|
|
return updateProps[a0] !== env0_0.props.updateProps[a0];
|
|
}
|
|
|
|
function _fun12718() { // fn#12718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:1413, offset: 0x00dd35a5, size: 206 bytes, params: 1, frame: 23
|
|
let value = environment.__proto__.__proto__;
|
|
const startInactiveSpan = Module01032Module.startInactiveSpan;
|
|
const object = {};
|
|
const binding = env0_0;
|
|
object.name = '<' + binding.props.name + '>';
|
|
object.onlyIfParent = true;
|
|
const REACT_UPDATE_OP = (REACT_Module).REACT_UPDATE_OP;
|
|
object.op = REACT_UPDATE_OP;
|
|
object.startTime = env0_3;
|
|
const binding2 = env2_3;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
value = binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ui.react.profiler');
|
|
value = binding2(value, 'ui.component_name', binding.props.name);
|
|
object.attributes = binding2(value, 'ui.react.changed_props', Module00057Module);
|
|
return Reflect.apply(startInactiveSpan, Module01032Module, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
function value_12720() { // fn#12720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:1870, offset: 0x00dd369a, size: 164 bytes, params: 1, frame: 18
|
|
var environment;
|
|
var spanToJSON;
|
|
var timestamp;
|
|
var withActiveSpan;
|
|
let value = environment.__proto__;
|
|
const env0_0 = (require(826) /* metro dependency 826 */).timestampInSeconds();
|
|
const props = this.props;
|
|
const env0_1 = props.name;
|
|
const includeRender = props.includeRender;
|
|
const r4 = includeRender === undefined || includeRender;
|
|
let _mountSpan = this._mountSpan;
|
|
if (_mountSpan) {
|
|
if (r4) {
|
|
value = require(826) /* metro dependency 826 */;
|
|
spanToJSON = value.spanToJSON;
|
|
_mountSpan = this._mountSpan;
|
|
timestamp = Reflect.apply(spanToJSON, value, [_mountSpan]).timestamp;
|
|
value = require(826) /* metro dependency 826 */;
|
|
withActiveSpan = value.withActiveSpan;
|
|
_mountSpan = this._mountSpan;
|
|
Reflect.apply(withActiveSpan, value, [_mountSpan, _fun12721]);
|
|
}
|
|
}
|
|
function _fun12721() { // fn#12721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:2111, offset: 0x00dd373e, size: 186 bytes, params: 1, frame: 22
|
|
let value = environment.__proto__.__proto__;
|
|
const startInactiveSpan = Module01032Module.startInactiveSpan;
|
|
const object = {onlyIfParent: true};
|
|
const nameBinding = name;
|
|
object.name = '<' + nameBinding + '>';
|
|
const REACT_RENDER_OP = (REACT_Module).REACT_RENDER_OP;
|
|
object.op = REACT_RENDER_OP;
|
|
object.startTime = timestamp;
|
|
const binding = env2_3;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
object.attributes = binding(binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ui.react.profiler'),
|
|
'ui.component_name', nameBinding);
|
|
value = Reflect.apply(startInactiveSpan, Module01032Module, [object]);
|
|
if (value) {
|
|
value.end(env0_0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useProfiler(a0) { // fn#12723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:2569, offset: 0x00dd3807, size: 115 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {'disabled': false,
|
|
'hasRenderSpan': true};
|
|
const binding = env0_9;
|
|
const env0_2Binding = Module00057Module(binding.useState(_fun12724), 1)[0];
|
|
binding.useEffect(_fun12725, []);
|
|
function _fun12724() { // fn#12724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:2699, offset: 0x00dd387a, size: 186 bytes, params: 1, frame: 21
|
|
var value2;
|
|
const REACT_MOUNT_OP = (REACT_Module).REACT_MOUNT_OP;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (Module00826Module).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
if (env0_1 == null) {
|
|
value2 = environment.__proto__;
|
|
} else if (env0_1.disabled) {
|
|
return undefined;
|
|
}
|
|
const startInactiveSpan = Module01032Module.startInactiveSpan;
|
|
const object = {};
|
|
const binding = env0_0;
|
|
object.name = '<' + binding + '>';
|
|
object.onlyIfParent = true;
|
|
object.op = REACT_MOUNT_OP;
|
|
const binding2 = env1_3;
|
|
object.attributes = binding2(binding2({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.ui.react.profiler'),
|
|
'ui.component_name', binding);
|
|
return Reflect.apply(startInactiveSpan, Module01032Module, [object]);
|
|
}
|
|
|
|
function _fun12725() { // fn#12725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:2963, offset: 0x00dd3934, size: 32 bytes, params: 1, frame: 9
|
|
if (Module00057Module) {
|
|
Module00057Module.end();
|
|
}
|
|
return _fun12726;
|
|
function _fun12726() { // fn#12726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:2992, offset: 0x00dd3954, size: 255 bytes, params: 1, frame: 24
|
|
var value2;
|
|
var moduleValue;
|
|
var timestamp;
|
|
var value3;
|
|
var moduleValue3;
|
|
var startInactiveSpan;
|
|
var object;
|
|
var binding;
|
|
var binding2;
|
|
let value = environment.__proto__;
|
|
if (env1_2) {
|
|
if (env1_1.hasRenderSpan) {
|
|
value2 = environment.__proto__.__proto__;
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
timestamp = moduleValue.spanToJSON(env1_2).timestamp;
|
|
value3 = (require(826) /* metro dependency 826 */).timestampInSeconds();
|
|
moduleValue3 = require(1032) /* metro dependency 1032 */;
|
|
startInactiveSpan = moduleValue3.startInactiveSpan;
|
|
object = {};
|
|
binding = env1_0;
|
|
object.name = '<' + binding + '>';
|
|
object.onlyIfParent = true;
|
|
object.op = (require(1147) /* metro dependency 1147 */).REACT_RENDER_OP;
|
|
object.startTime = timestamp;
|
|
binding2 = env2_3;
|
|
value = binding2({}, (require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
'auto.ui.react.profiler');
|
|
object.attributes = binding2(value, 'ui.component_name', binding);
|
|
value = Reflect.apply(startInactiveSpan, moduleValue3, [object]);
|
|
if (value) {
|
|
value.end(value3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function withProfiler(a0, a1) { // fn#12727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:3343, offset: 0x00dd3a53, size: 140 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let r6 = a1?.name || a0.displayName;
|
|
r6 = !r6 ? a0.name : r6;
|
|
r6 = !r6 ? 'unknown' : r6;
|
|
const Wrapped2 = Wrapped;
|
|
Wrapped2.displayName = 'profiler(' + r6 + ')';
|
|
(HoistNonReactStaticsModule).hoistNonReactStatics(Wrapped2, a0);
|
|
return Wrapped2;
|
|
function Wrapped(a0) { // fn#12728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1273:3428, owner: withProfiler.Wrapped, offset: 0x00dd3adf, size: 108 bytes, params: 2, frame: 21
|
|
const binding = env1_9;
|
|
const createElement = binding.createElement;
|
|
const binding2 = env1_10;
|
|
let Object = global.Object;
|
|
const value2 = Object.assign({}, require, {name: Module00057Module, updateProps: a0});
|
|
const createElement2 = binding.createElement;
|
|
const binding3 = env0_0;
|
|
Object = global.Object;
|
|
return Reflect.apply(createElement, binding, [binding2, value2, Reflect.apply(createElement2, binding, [binding3,
|
|
Object.assign({}, a0)])]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun12709, 1146, [57, 77, 6, 7, 15, 17, 18, 31, 1032, 1147, 826,
|
|
1148]) /* metro module 1146, dependencies: [57, 77, 6, 7, 15, 17, 18, 31, 1032, 1147, 826, 1148] */;
|