/* Metro module 14340; source: modules/auth/native/components/RegisterAgeGate.tsx; dependencies: [57, 31, 27, 5078, 14304, 14305, 661, 33, 4501, 697, 3738, 14341, 3868, 1484, 14302, 566, 8986, 14320, 14303, 44, 9001, 1244, 7682, 8554, 14342, 4578, 8970, 9068, 4002, 2] */ function _fun108525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:6, offset: 0x02323f5e, size: 545 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = importAll(31) /* metro dependency 31 */; const env0_5 = (require(27) /* metro dependency 27 */).View; const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */; let value = require(14304) /* metro dependency 14304: RegistrationUIStore */; const env0_7 = value.updateRegistrationOptions; const env0_8 = value.useRegistrationUIStore; value = require(14305) /* metro dependency 14305: RegistrationConstants */; const env0_9 = value.RegisterTransitionSteps; const env0_10 = value.RegistrationTransitionActionTypes; const env0_11 = (require(661) /* metro dependency 661: Constants */).AuthStates; value = require(33) /* metro dependency 33 */; const env0_12 = value.jsx; const env0_13 = value.jsxs; const env0_14 = value.Fragment; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; const env0_15 = Reflect.apply(createStyles, value, [{inputGroup: {'marginTop': 24, 'marginBottom': 24}, flexGrow: {flexGrow: 1}, button: {'flexGrow': 0, 'marginBottom': 4, 'marginTop': 16, 'flexDirection': 'column'}, datePickerButton: {color: INTERACTIVE_TEXT_DEFAULT}, page: {flex: 1}}]); value = importDefault(3738) /* metro dependency 3738 */; value = value.utc(); const env0_17 = value.toDate(); const env0_18 = value.clone().endOf('year').toDate(); value = value.clone(); value = value.subtract(100, 'years'); const env0_19 = value.toDate(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/auth/native/components/RegisterAgeGate.tsx'); exports.default = RegisterAgeGate; } function RegisterAgeGate() { // fn#108526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14537:788, offset: 0x0232417f, size: 1593 bytes, params: 1, frame: 42 const value2 = undefined; const styles = useStyles(); const nativeModule = require(3868) /* metro dependency 3868: native */; const useThemeContext = nativeModule.useThemeContext; const theme = Reflect.apply(useThemeContext, nativeModule, []).theme; const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(); const binding = env0_4; const useContext = binding.useContext; const TrackRegistrationContext = (require(14302) /* metro dependency 14302: Auth */).TrackRegistrationContext; const value3 = Reflect.apply(useContext, binding, [TrackRegistrationContext]); let useState = binding.useState; let getState = useRegistrationUIStore.getState; const birthday = Reflect.apply(getState, useRegistrationUIStore, []).registrationOptions.birthday; const value4 = null; const value5 = Reflect.apply(useState, binding, [value4 != birthday && (importDefault(14341) /* metro dependency 14341: isDateValidDateOfBirth */)(birthday) ? birthday : value4]); const binding2 = env0_3; const value6 = binding2(value5, 2); const property = value6[0]; var env0_3 = value6[1]; useState = binding.useState; getState = useRegistrationUIStore.getState; const consent = Reflect.apply(getState, useRegistrationUIStore, []).registrationOptions.consent; const value8 = binding2(Reflect.apply(useState, binding, [value4 != consent && consent]), 2); const property2 = value8[0]; var env0_4 = property2; const env0_5 = value8[1]; const value9 = binding.useMemo(_fun108527, [property]); useState = binding.useState; const value10 = binding2(Reflect.apply(useState, binding, [false]), 2); const property3 = value10[0]; const env0_6 = value10[1]; const value11 = useRegistrationUIStore(function(a0) { return a0.submitting; }); const authenticationConsentRequired = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore], function() { return ConsentStore.getAuthenticationConsentRequired(); }); const value12 = useRegistrationUIStore(function(a0) { return a0.errors; }); const value13 = (importDefault(8986) /* metro dependency 8986: getError */)('consent', value12); const r22 = value4 != value13 ? value13 : value12.message; const defaultImport2 = importDefault(14320) /* metro dependency 14320: useAuthFlowBackHandler */; const registrationStepsUtilsModule = require(14303) /* metro dependency 14303: RegistrationStepsUtils */; const getPreviousRegistrationTransitionStep = registrationStepsUtilsModule.getPreviousRegistrationTransitionStep; const AGE_GATE = AuthStates.AGE_GATE; defaultImport2(Reflect.apply(getPreviousRegistrationTransitionStep, registrationStepsUtilsModule, [AGE_GATE])); env0_4.useEffect(_fun108531, [value3]); const value14 = (importDefault(14341) /* metro dependency 14341: isDateValidDateOfBirth */)(property); const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14; const AuthFormView = importDefault(9001) /* metro dependency 9001: AuthFormView */; const object = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const string = intl.string; const NgL2GX = (require(1244) /* metro dependency 1244: indexNative */).t.NgL2GX; object.headerText = Reflect.apply(string, intl, [NgL2GX]); object.contentStyle = styles.flexGrow; const Input = (require(7682) /* metro dependency 7682: InputNative */).Input; const inputProps = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xNpFJ6), errorMessage: value14 ? value4 : value4 != property ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.udnqh6) : value4}; const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton; const items2 = []; const PrivacyHint = importDefault(14342) /* metro dependency 14342: PrivacyHint */; const Boolean = global.Boolean; items2[1] = ; const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; items2[2] =