/* Metro module 6444; source: unknown; dependencies: [31, 27, 6445, 6446, 6447, 6451, 6449, 6452] */ function _fun50542(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:6, offset: 0x0121c6e0, size: 440 bytes, params: 8, frame: 21 var object2; var closure; var parseInt; let value = this; const env0_0 = require; if (value && value.__extends) { } if (!(value && value.__assign)) { closure = function() { var r3; r3 = global.Object.assign || _fun50549; env0_4 = r3; return r3.apply(this, arguments); }; } const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); value = require(31) /* metro dependency 31 */; const env0_6 = require(27) /* metro dependency 27 */; let version = value.version; const value2 = !!version; if (version) { parseInt = global.parseInt; version = value.version; value = parseInt(version.split('.')[0], 10); value = value >= 19; } const ComponentCompat = (require(6449) /* metro dependency 6449 */).ComponentCompat; value = _fun50550(ComponentCompat); exports.default = value; object2 = {}; object2.children = (require(6452) /* metro dependency 6452 */).element.isRequired; const value3 = require(6452) /* metro dependency 6452 */; const arrayOf = value3.arrayOf; const number = value3.number; object2.stickyHeaderIndices = Reflect.apply(arrayOf, value3, [number]); object2.stickyFooterIndices = value3.arrayOf(number); const func = value3.func; object2.overrideRowRenderer = func; object2.style = value3.object; object2.renderStickyContainer = func; object2.applyWindowCorrection = func; value.propTypes = object2; } function extendStatics(a0, a1) { // fn#50543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:78, offset: 0x0121c898, size: 78 bytes, params: 3, frame: 13 var r3; var Array; var value; const Object = global.Object; const setPrototypeOf = Object.setPrototypeOf; if (setPrototypeOf) { r3 = setPrototypeOf; } else { Array = global.Array; value = Object.create([]); value = value instanceof Array; r3 = value && (function(a0, a1) { a0.__proto__ = a1; }); } r3 = !r3 ? function(a0, a1) { var r3; var propertyName; var propertyName2; var hasOwnProperty; for (propertyName in a1) { hasOwnProperty = global.Object.prototype.hasOwnProperty; if (!hasOwnProperty.call(a1, propertyName)) { r3 = propertyName2; continue; } a0[propertyName] = a1[propertyName]; r3 = propertyName2; } } : r3; return r3(a0, a1); } function _fun50546(a0, a1) { // fn#50546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:293, offset: 0x0121c8e6, size: 177 bytes, params: 3, frame: 15 var r1; var value; var prototype; var closure2; var TypeError; var value3; var typeError; const env0_0 = a0; const closure = ___50547; if (typeof a1 === 'function') { extendStatics(a0, a1); if (a1 === null) { r1 = global.Object.create(a1); } else { prototype = a1.prototype; closure.prototype = prototype; prototype = closure.prototype; value = Object.create(prototype, {constructor: {value: closure}}); closure2 = new closure(); value = closure2 instanceof Object ? closure2 : value; r1 = value; } a0.prototype = r1; } else { if (a1 !== null) { TypeError = global.TypeError; value = global.String(a1); value = 'Class extends value ' + value; value3 = Object.create(TypeError.prototype, {constructor: {value: TypeError}}); value += ' is not a constructor or null'; typeError = new TypeError(); value = typeError instanceof Object ? typeError : value3; throw value; } extendStatics(a0, a1); if (a1 === null) { r1 = global.Object.create(a1); } else { prototype = a1.prototype; closure.prototype = prototype; prototype = closure.prototype; value = Object.create(prototype, {constructor: {value: closure}}); closure2 = new closure(); value = closure2 instanceof Object ? closure2 : value; r1 = value; } a0.prototype = r1; } } function _fun50548() { // fn#50548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:564, offset: 0x0121c9ab, size: 53 bytes, params: 1, frame: 13 const Object = global.Object; return (Object.assign || (function(a0) { var r2; var r10; var value3; var propertyName; var propertyName2; var hasOwnProperty; var value4; var value = arguments.length; var value2 = 1; if (value2 < value) { r2 = value2; while (true) { value3 = arguments[r2]; for (propertyName in value3) { hasOwnProperty = global.Object.prototype.hasOwnProperty; if (!hasOwnProperty.call(value3, propertyName)) { r10 = propertyName2; continue; } a0[propertyName] = value3[propertyName]; r10 = propertyName2; } value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value4 < value) { r2 = value4; continue; } break; } } return a0; })).apply(this, arguments); } function _fun50550(a0) { // fn#50550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:903, offset: 0x0121c9e0, size: 87 bytes, params: 2, frame: 14 const env0_0 = a0; const closure = StickyContainer; env0_3(closure, a0); closure.prototype.componentWillReceivePropsCompat = function(a0) { this._initParams(a0); }; closure.prototype.renderCompat = renderCompat; closure.prototype._getWindowCorrection = function(a0, a1, a2) { var r0; r0 = a2.applyWindowCorrection && a2.applyWindowCorrection(a0, a1, this._windowCorrection); r0 = !r0 ? this._windowCorrection : r0; return r0; }; closure.propTypes = {}; return closure; } function StickyContainer(a0, a1) { // fn#50551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:915, offset: 0x0121ca37, size: 386 bytes, params: 3, frame: 16 const value = this; const r0 = env0_0.call(value, a0, a1) || value; r0._recyclerRef = undefined; r0._stickyHeaderRef = null; r0._stickyFooterRef = null; r0._visibleIndicesAll = []; r0._windowCorrection = {'startCorrection': 0, 'endCorrection': 0, 'windowShift': 0}; r0._rlvRowRenderer = _rlvRowRenderer; r0._getRecyclerRef = _getRecyclerRef; r0._getCurrentWindowCorrection = _getCurrentWindowCorrection; r0._getStickyHeaderRef = _getStickyHeaderRef; r0._getStickyFooterRef = _getStickyFooterRef; r0._onVisibleIndicesChanged = _onVisibleIndicesChanged; r0._callStickyObjectsOnVisibleIndicesChanged = _callStickyObjectsOnVisibleIndicesChanged; r0._onScroll = _onScroll; r0._assertChildType = _assertChildType; r0._isChildRecyclerInstance = _isChildRecyclerInstance; r0._getLayoutForIndex = _getLayoutForIndex; r0._getDataForIndex = _getDataForIndex; r0._getLayoutTypeForIndex = _getLayoutTypeForIndex; r0._getExtendedState = _getExtendedState; r0._getRowRenderer = _getRowRenderer; r0._getRLVRenderedSize = _getRLVRenderedSize; r0._getContentDimension = _getContentDimension; r0._applyWindowCorrection = _applyWindowCorrection; r0._initParams = _initParams; r0._assertChildType(); const props = a0.children.props; r0._dataProvider = props.dataProvider; r0._layoutProvider = props.layoutProvider; r0._extendedState = props.extendedState; r0._rowRenderer = props.rowRenderer; r0._getWindowCorrection(0, 0, a0); return r0; } function renderCompat() { // fn#50572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:4231, offset: 0x0121d16b, size: 654 bytes, params: 1, frame: 28 var object6; var environment; var r1; var binding3; var createElement2; var property; var object2; var binding4; var createElement3; var object5; this._assertChildType(); const value = environment.__proto__; let binding = env1_5; const cloneElement = binding.cloneElement; let props = this.props; const children = props.children; const binding2 = env1_4; const value3 = Reflect.apply(cloneElement, binding, [children, binding2(binding2({}, this.props.children.props), {ref: this._getRecyclerRef, onVisibleIndicesChanged: this._onVisibleIndicesChanged, onScroll: this._onScroll, applyWindowCorrection: this._applyWindowCorrection, rowRenderer: this._rlvRowRenderer})]); binding = env1_5; const createElement = binding.createElement; const View = env1_6.View; object6 = {}; let r0 = this.props.style || ({flex: 1}); object6.style = r0; const stickyHeaderIndices = this.props.stickyHeaderIndices; const value4 = null; if (stickyHeaderIndices) { binding3 = env1_5; createElement2 = binding3.createElement; property = (require(6447) /* metro dependency 6447 */).default; object2 = {ref: ref_50573}; props = this.props; object2.stickyIndices = props.stickyHeaderIndices; object2.getLayoutForIndex = this._getLayoutForIndex; object2.getDataForIndex = this._getDataForIndex; object2.getLayoutTypeForIndex = this._getLayoutTypeForIndex; object2.getExtendedState = this._getExtendedState; object2.getRLVRenderedSize = this._getRLVRenderedSize; object2.getContentDimension = this._getContentDimension; object2.getRowRenderer = this._getRowRenderer; props = this.props; object2.overrideRowRenderer = props.overrideRowRenderer; props = this.props; object2.renderContainer = props.renderStickyContainer; object2.getWindowCorrection = this._getCurrentWindowCorrection; r0 = Reflect.apply(createElement2, binding3, [property, object2]); } else { r0 = value4; } if (this.props.stickyFooterIndices) { binding4 = env1_5; createElement3 = binding4.createElement; property = (require(6451) /* metro dependency 6451 */).default; object5 = {ref: ref_50574}; props = this.props; object5.stickyIndices = props.stickyFooterIndices; object5.getLayoutForIndex = this._getLayoutForIndex; object5.getDataForIndex = this._getDataForIndex; object5.getLayoutTypeForIndex = this._getLayoutTypeForIndex; object5.getExtendedState = this._getExtendedState; object5.getRLVRenderedSize = this._getRLVRenderedSize; object5.getContentDimension = this._getContentDimension; object5.getRowRenderer = this._getRowRenderer; props = this.props; object5.overrideRowRenderer = props.overrideRowRenderer; props = this.props; object5.renderContainer = props.renderStickyContainer; object5.getWindowCorrection = this._getCurrentWindowCorrection; props = this.props; object5.alwaysStickBottom = props.alwaysStickyFooter; r1 = Reflect.apply(createElement3, binding4, [property, object5]); } else { r1 = value4; } return Reflect.apply(createElement, binding, [View, object6, value3, r0, r1]); } function _rlvRowRenderer(a0, a1, a2, a3) { // fn#50552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:1156, owner: StickyContainer._rlvRowRenderer, offset: 0x0121cbb9, size: 161 bytes, params: 5, frame: 17 var binding; var value2; var value3; if (env0_0.props.alwaysStickyFooter) { binding = env0_0; value2 = binding._getRLVRenderedSize(); binding = env0_0; value3 = binding._getContentDimension(); if (value2 && value3 && value3.height > value2.height) { return env0_0._rowRenderer(a0, a1, a2, a3); } if (env0_0.props.stickyFooterIndices) { if (a2 !== env0_0.props.stickyFooterIndices[0]) { return env0_0._rowRenderer(a0, a1, a2, a3); } return null; } binding = env0_0; return binding._rowRenderer(a0, a1, a2, a3); } return env0_0._rowRenderer(a0, a1, a2, a3); } function _getRecyclerRef(a0) { // fn#50553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:1428, owner: StickyContainer._getRecyclerRef, offset: 0x0121cc5a, size: 154 bytes, params: 2, frame: 13 var property; var refNotAsFunctionException; env0_0._recyclerRef = a0; const binding = env2_7; const children = env0_0.props.children; const ref = binding ? children.props.ref : children.ref; if (ref) { if (typeof ref !== 'function') { property = (require(6445) /* metro dependency 6445 */).default; refNotAsFunctionException = (require(6446) /* metro dependency 6446 */).default.refNotAsFunctionException; throw new property(); } ref(a0); } } function _getCurrentWindowCorrection() { // fn#50554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:1652, owner: StickyContainer._getCurrentWindowCorrection, offset: 0x0121ccf4, size: 15 bytes, params: 1, frame: 1 return env0_0._windowCorrection; } function _getStickyHeaderRef(a0) { // fn#50555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:1713, owner: StickyContainer._getStickyHeaderRef, offset: 0x0121cd03, size: 59 bytes, params: 2, frame: 11 var binding; if (env0_0._stickyHeaderRef !== a0) { env0_0._stickyHeaderRef = a0; binding = env0_0; binding._callStickyObjectsOnVisibleIndicesChanged(env0_0._visibleIndicesAll); } } function _getStickyFooterRef(a0) { // fn#50556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:1861, owner: StickyContainer._getStickyFooterRef, offset: 0x0121cd3e, size: 59 bytes, params: 2, frame: 11 var binding; if (env0_0._stickyFooterRef !== a0) { env0_0._stickyFooterRef = a0; binding = env0_0; binding._callStickyObjectsOnVisibleIndicesChanged(env0_0._visibleIndicesAll); } } function _onVisibleIndicesChanged(a0, a1, a2) { // fn#50557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:2014, owner: StickyContainer._onVisibleIndicesChanged, offset: 0x0121cd79, size: 140 bytes, params: 4, frame: 15 var r1; env0_0._visibleIndicesAll = a0; env0_0._callStickyObjectsOnVisibleIndicesChanged(a0); let props = env0_0.props; const children = props.children; if (children) { props = env0_0.props; props = props.children.props; r1 = props; } else { r1 = children; } if (r1) { props = env0_0.props; props = props.children.props; r1 = props.onVisibleIndicesChanged; } if (r1) { props = env0_0.props; props = props.children.props; props.onVisibleIndicesChanged(a0, a1, a2); } } function _callStickyObjectsOnVisibleIndicesChanged(a0) { // fn#50558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:2289, owner: StickyContainer._callStickyObjectsOnVisibleIndicesChanged, offset: 0x0121ce05, size: 78 bytes, params: 2, frame: 12 if (env0_0._stickyHeaderRef) { env0_0._stickyHeaderRef.onVisibleIndicesChanged(a0); } if (env0_0._stickyFooterRef) { env0_0._stickyFooterRef.onVisibleIndicesChanged(a0); } } function StickyContainer_onScroll(a0, a1, a2) { // fn#50559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:2446, owner: StickyContainer._onScroll, offset: 0x0121ce53, size: 187 bytes, params: 4, frame: 16 var r1; const binding = env0_0; const _getWindowCorrection = binding._getWindowCorrection; let props = env0_0.props; Reflect.apply(_getWindowCorrection, binding, [a1, a2, props]); if (env0_0._stickyHeaderRef) { env0_0._stickyHeaderRef.onScroll(a2); } if (env0_0._stickyFooterRef) { env0_0._stickyFooterRef.onScroll(a2); } const children = env0_0.props.children; if (children) { props = env0_0.props; props = props.children.props; r1 = props.onScroll; } else { r1 = children; } if (r1) { props = env0_0.props; props = props.children.props; props.onScroll(a0, a1, a2); } } function _assertChildType() { // fn#50560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:2710, owner: StickyContainer._assertChildType, offset: 0x0121cf0e, size: 140 bytes, params: 1, frame: 13 const property = (require(6445) /* metro dependency 6445 */).default; var wrongStickyChildTypeException; const value = environment.__proto__.__proto__; const Children = env2_5.Children; if (Children.count(env0_0.props.children) !== 1) { wrongStickyChildTypeException = (require(6446) /* metro dependency 6446 */).default.wrongStickyChildTypeException; throw new property(); } const binding = env0_0; if (binding._isChildRecyclerInstance()) { return undefined; } wrongStickyChildTypeException = (require(6446) /* metro dependency 6446 */).default.wrongStickyChildTypeException; throw new property(); } function _isChildRecyclerInstance() { // fn#50561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:2898, owner: StickyContainer._isChildRecyclerInstance, offset: 0x0121cf9a, size: 86 bytes, params: 1, frame: 3 var r0; let props = env0_0.props; props = props.children.props; const dataProvider = props.dataProvider; if (dataProvider) { props = env0_0.props; props = props.children.props; r0 = props.rowRenderer; } else { r0 = dataProvider; } if (r0) { props = env0_0.props; props = props.children.props; r0 = props.layoutProvider; } return r0; } function _getLayoutForIndex(a0) { // fn#50562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3049, owner: StickyContainer._getLayoutForIndex, offset: 0x0121cff0, size: 46 bytes, params: 2, frame: 11 if (env0_0._recyclerRef) { return env0_0._recyclerRef.getLayout(a0); } } function _getDataForIndex(a0) { // fn#50563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3134, owner: StickyContainer._getDataForIndex, offset: 0x0121d01e, size: 29 bytes, params: 2, frame: 11 return env0_0._dataProvider.getDataForIndex(a0); } function _getLayoutTypeForIndex(a0) { // fn#50564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3214, owner: StickyContainer._getLayoutTypeForIndex, offset: 0x0121d03b, size: 29 bytes, params: 2, frame: 11 return env0_0._layoutProvider.getLayoutTypeForIndex(a0); } function _getExtendedState() { // fn#50565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3297, owner: StickyContainer._getExtendedState, offset: 0x0121d058, size: 15 bytes, params: 1, frame: 1 return env0_0._extendedState; } function _getRowRenderer() { // fn#50566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3351, owner: StickyContainer._getRowRenderer, offset: 0x0121d067, size: 15 bytes, params: 1, frame: 1 return env0_0._rowRenderer; } function _getRLVRenderedSize() { // fn#50567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3407, owner: StickyContainer._getRLVRenderedSize, offset: 0x0121d076, size: 42 bytes, params: 1, frame: 9 if (env0_0._recyclerRef) { return env0_0._recyclerRef.getRenderedSize(); } } function _getContentDimension() { // fn#50568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3500, owner: StickyContainer._getContentDimension, offset: 0x0121d0a0, size: 42 bytes, params: 1, frame: 9 if (env0_0._recyclerRef) { return env0_0._recyclerRef.getContentDimension(); } } function _applyWindowCorrection(a0, a1, a2) { // fn#50569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3599, owner: StickyContainer._applyWindowCorrection, offset: 0x0121d0ca, size: 56 bytes, params: 4, frame: 15 if (env0_0.props.applyWindowCorrection) { env0_0.props.applyWindowCorrection(a0, a1, a2); } } function _initParams({children}) { // fn#50570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:3698, owner: StickyContainer._initParams, offset: 0x0121d102, size: 84 bytes, params: 2, frame: 4 const props = children.props; env0_0._dataProvider = props.dataProvider; env0_0._layoutProvider = props.layoutProvider; env0_0._extendedState = props.extendedState; env0_0._rowRenderer = props.rowRenderer; } function renderCompatRef(a0) { // fn#50573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:4694, owner: renderCompat.ref, offset: 0x0121d3f9, size: 23 bytes, params: 2, frame: 11 return env0_0._getStickyHeaderRef(a0); } function renderCompatRef_50574(a0) { // fn#50574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6622:5313, owner: renderCompat.ref, offset: 0x0121d410, size: 23 bytes, params: 2, frame: 11 return env0_0._getStickyFooterRef(a0); }